@treasuredata/tdx 2026.3.6 → 2026.3.8

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.
Files changed (208) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/auth-command.js.map +1 -1
  11. package/dist/commands/auth-login-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/profile-command.js +1 -1
  35. package/dist/commands/profiles-command.d.ts.map +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/profiles-command.js.map +1 -1
  38. package/dist/commands/query-command.js +1 -1
  39. package/dist/commands/schedule-command.js +1 -1
  40. package/dist/commands/segment-command.js +1 -1
  41. package/dist/commands/segment-create-command.js +1 -1
  42. package/dist/commands/segment-fields-command.js +1 -1
  43. package/dist/commands/segment-pull-command.js +1 -1
  44. package/dist/commands/segment-push-command.js +1 -1
  45. package/dist/commands/segment-update-command.js +1 -1
  46. package/dist/commands/segment-use-command.js +1 -1
  47. package/dist/commands/segment-validate-command.js +1 -1
  48. package/dist/commands/segments.js +1 -1
  49. package/dist/commands/show.js +1 -1
  50. package/dist/commands/status-command.js +1 -1
  51. package/dist/commands/tables.js +1 -1
  52. package/dist/commands/unset-command.js +1 -1
  53. package/dist/commands/upgrade-command.js +1 -1
  54. package/dist/commands/use-command.js +1 -1
  55. package/dist/commands/user-command.d.ts.map +1 -1
  56. package/dist/commands/user-command.js +1 -1
  57. package/dist/commands/user-command.js.map +1 -1
  58. package/dist/commands/workflow-command.js +1 -1
  59. package/dist/core/auth.js +1 -1
  60. package/dist/core/command-output.js +1 -1
  61. package/dist/core/config.js +1 -1
  62. package/dist/core/connection-cache.js +1 -1
  63. package/dist/core/constants.js +1 -1
  64. package/dist/core/credential-cache.js +1 -1
  65. package/dist/core/global-context.js +1 -1
  66. package/dist/core/keychain.js +1 -1
  67. package/dist/core/oauth-keychain.js +1 -1
  68. package/dist/core/oauth.d.ts.map +1 -1
  69. package/dist/core/oauth.js +1 -1
  70. package/dist/core/oauth.js.map +1 -1
  71. package/dist/core/profile.js +1 -1
  72. package/dist/core/project-config.js +1 -1
  73. package/dist/core/session.js +1 -1
  74. package/dist/core/user-cache.js +1 -1
  75. package/dist/core/version.js +1 -1
  76. package/dist/index.js +1 -1
  77. package/dist/mcp/server.js +1 -1
  78. package/dist/mcp/tools/index.js +1 -1
  79. package/dist/mcp/tools/tdx-run.js +1 -1
  80. package/dist/mcp/tools/tdx-search.js +1 -1
  81. package/dist/mcp/utils.js +1 -1
  82. package/dist/proxy/claude-usage-tracker.js +1 -1
  83. package/dist/proxy/passthrough-server.js +1 -1
  84. package/dist/proxy/sse-usage-parser.js +1 -1
  85. package/dist/sdk/agent/agent-config.js +1 -1
  86. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  87. package/dist/sdk/agent/agent-yaml.js +1 -1
  88. package/dist/sdk/agent/test/evaluator.js +1 -1
  89. package/dist/sdk/agent/test/executor.js +1 -1
  90. package/dist/sdk/agent/test/index.js +1 -1
  91. package/dist/sdk/agent/test/output.js +1 -1
  92. package/dist/sdk/agent/test/parser.js +1 -1
  93. package/dist/sdk/agent/tool-target-registry.js +1 -1
  94. package/dist/sdk/api.js +1 -1
  95. package/dist/sdk/client/cdp-api-client.js +1 -1
  96. package/dist/sdk/client/delivery-api-client.js +1 -1
  97. package/dist/sdk/client/endpoints.js +1 -1
  98. package/dist/sdk/client/engage-api-client.js +1 -1
  99. package/dist/sdk/client/http-client.js +1 -1
  100. package/dist/sdk/client/llm-api-client.js +1 -1
  101. package/dist/sdk/client/oauth-refresh.js +1 -1
  102. package/dist/sdk/client/rate-limiter.js +1 -1
  103. package/dist/sdk/client/td-api-client.js +1 -1
  104. package/dist/sdk/client/trino-api-client.js +1 -1
  105. package/dist/sdk/client/workflow-client.js +1 -1
  106. package/dist/sdk/connection-validator.js +1 -1
  107. package/dist/sdk/connection.js +1 -1
  108. package/dist/sdk/delivery.js +1 -1
  109. package/dist/sdk/engage/campaign-pull.js +1 -1
  110. package/dist/sdk/engage/campaign-push.js +1 -1
  111. package/dist/sdk/engage/campaign-validator.js +1 -1
  112. package/dist/sdk/engage/campaign-yaml.js +1 -1
  113. package/dist/sdk/engage/template-pull.js +1 -1
  114. package/dist/sdk/engage/template-push.js +1 -1
  115. package/dist/sdk/engage/template-validator.js +1 -1
  116. package/dist/sdk/engage/template-yaml.js +1 -1
  117. package/dist/sdk/engage/types/campaign-def.js +1 -1
  118. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  119. package/dist/sdk/engage/types/template-schema.js +1 -1
  120. package/dist/sdk/engage.js +1 -1
  121. package/dist/sdk/errors.js +1 -1
  122. package/dist/sdk/index.js +1 -1
  123. package/dist/sdk/io/index.js +1 -1
  124. package/dist/sdk/io/node-filesystem.js +1 -1
  125. package/dist/sdk/job.js +1 -1
  126. package/dist/sdk/journey.js +1 -1
  127. package/dist/sdk/llm/chat-cache.js +1 -1
  128. package/dist/sdk/llm/index.js +1 -1
  129. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  130. package/dist/sdk/llm/model-factors.js +1 -1
  131. package/dist/sdk/personalization.js +1 -1
  132. package/dist/sdk/query/index.js +1 -1
  133. package/dist/sdk/query/sql-parser.js +1 -1
  134. package/dist/sdk/realtime.js +1 -1
  135. package/dist/sdk/schedule.js +1 -1
  136. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  137. package/dist/sdk/segment/fields-display.js +1 -1
  138. package/dist/sdk/segment/file-discovery.js +1 -1
  139. package/dist/sdk/segment/journey-utils.js +1 -1
  140. package/dist/sdk/segment/journey-validator.js +1 -1
  141. package/dist/sdk/segment/journey-yaml.js +1 -1
  142. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  143. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  144. package/dist/sdk/segment/pull-workflow.js +1 -1
  145. package/dist/sdk/segment/push-recovery.js +1 -1
  146. package/dist/sdk/segment/push-workflow.js +1 -1
  147. package/dist/sdk/segment/resolution-context.js +1 -1
  148. package/dist/sdk/segment/segment-path-parser.js +1 -1
  149. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  150. package/dist/sdk/segment/segment-validator.js +1 -1
  151. package/dist/sdk/segment/target-resolution.js +1 -1
  152. package/dist/sdk/segment/tdx-config.js +1 -1
  153. package/dist/sdk/segment/types/activation-schema.js +1 -1
  154. package/dist/sdk/segment/types/journey-def.js +1 -1
  155. package/dist/sdk/segment/types/journey-schema.js +1 -1
  156. package/dist/sdk/segment/types/segment-def.js +1 -1
  157. package/dist/sdk/segment/types/segment-schema.js +1 -1
  158. package/dist/sdk/segment/validate-files.js +1 -1
  159. package/dist/sdk/segment/yaml-validator.js +1 -1
  160. package/dist/sdk/segment.js +1 -1
  161. package/dist/sdk/types/index.js +1 -1
  162. package/dist/sdk/types/progress.js +1 -1
  163. package/dist/sdk/user.js +1 -1
  164. package/dist/sdk/util/format-detector.js +1 -1
  165. package/dist/sdk/util/formatters.js +1 -1
  166. package/dist/sdk/util/index.js +1 -1
  167. package/dist/sdk/util/paginate.js +1 -1
  168. package/dist/sdk/util/tree-formatter.js +1 -1
  169. package/dist/sdk/workflow/archive-validation.js +1 -1
  170. package/dist/sdk/workflow/clone-workflow.js +1 -1
  171. package/dist/sdk/workflow/index.js +1 -1
  172. package/dist/sdk/workflow/pull-workflow.js +1 -1
  173. package/dist/sdk/workflow/push-workflow.js +1 -1
  174. package/dist/sdk/workflow/tdx-config.js +1 -1
  175. package/dist/sdk/workflow/workflow-utils.js +1 -1
  176. package/dist/test-utils/command-runner.js +1 -1
  177. package/dist/test-utils/factories.js +1 -1
  178. package/dist/test-utils/fixtures.js +1 -1
  179. package/dist/test-utils/http-mock.js +1 -1
  180. package/dist/test-utils/index.js +1 -1
  181. package/dist/utils/async.js +1 -1
  182. package/dist/utils/colors.js +1 -1
  183. package/dist/utils/diff.js +1 -1
  184. package/dist/utils/file-permissions.js +1 -1
  185. package/dist/utils/file-reader.js +1 -1
  186. package/dist/utils/github-releases.js +1 -1
  187. package/dist/utils/global-cache.js +1 -1
  188. package/dist/utils/json-loader.js +1 -1
  189. package/dist/utils/local-cache.js +1 -1
  190. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  191. package/dist/utils/logger/formatters/index.js +1 -1
  192. package/dist/utils/logger/handlers/console-handler.js +1 -1
  193. package/dist/utils/logger/handlers/file-handler.js +1 -1
  194. package/dist/utils/logger/handlers/index.js +1 -1
  195. package/dist/utils/logger/handlers/null-handler.js +1 -1
  196. package/dist/utils/logger/index.js +1 -1
  197. package/dist/utils/logger/logger.js +1 -1
  198. package/dist/utils/logger/types.js +1 -1
  199. package/dist/utils/option-validation.js +1 -1
  200. package/dist/utils/process.js +1 -1
  201. package/dist/utils/prompt.js +1 -1
  202. package/dist/utils/spinner.js +1 -1
  203. package/dist/utils/sse-parser.js +1 -1
  204. package/dist/utils/string-utils.js +1 -1
  205. package/dist/utils/table-ref-parser.js +1 -1
  206. package/dist/utils/tdx-logger.js +1 -1
  207. package/dist/utils/version-check.js +1 -1
  208. package/package.json +1 -1
@@ -1 +1 @@
1
- const a113_0x19ece3=a113_0x4ddb;function a113_0x5042(){const _0x39234a=['\x22:\x20','12eUKsRS','trim','Use\x20\x22tdx\x20engage\x20workspace\x20list\x22\x20to\x20see\x20available\x20workspaces.','updatedAt','resolveTemplateId','deleteTemplate','268772cUPsee','normalizeAlwaysOnCampaign','listAllAlwaysOnCampaigns','pauseCampaign','Always-on\x20campaign\x20not\x20found\x20with\x20ID:\x20','map','Always-on\x20campaign\x20not\x20found:\x20','getWorkspaceFull','resumeCampaign','audienceName','Workspace\x20not\x20found\x20with\x20ID:\x20','data','launchCampaign','enableUtmTracking','5BuZaCx','Multiple\x20always-on\x20campaigns\x20found\x20with\x20name\x20\x22','campaignType','Campaign\x20not\x20found:\x20','filter','Use\x20\x22tdx\x20engage\x20template\x20list\x22\x20to\x20see\x20available\x20templates.','Use\x20\x22tdx\x20engage\x20campaign\x20list\x20--type\x20always-on\x22\x20to\x20see\x20available\x20campaigns.','135467PltSeN','Workspace\x20not\x20found:\x20','name','getAlwaysOnCampaignFull','launchAlwaysOnCampaign','status','length','INVALID_ARGUMENT','81IIGSRR','listAlwaysOnCampaigns','updateWorkspace','launchedAt','performAlwaysOnCampaignAction','Use\x20the\x20workspace\x20UUID\x20directly\x20to\x20select\x20a\x20specific\x20workspace.','resumedAt','updateAlwaysOnCampaign','segmentId','669185sfaLlX','resumeAlwaysOnCampaign','resolveAlwaysOnCampaignId','updateCampaign','Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20template\x20UUID\x20directly.','listAllTemplates','ownerUser','7nOKRSZ','getCampaignFull','audienceId','pauseAlwaysOnCampaign','createTemplate','3689832tfdyVq','2hedyrA','description','client','getCampaign','getAlwaysOnCampaign','getTemplateFull','251870ZDRXUr','segmentName','createCampaign','offset','getWorkspace','resolveCampaignId','test','duplicateCampaign','join','code','finishedAt','finishAlwaysOnCampaign','subjectTemplate','Multiple\x20campaigns\x20found\x20with\x20name\x20\x22','deleteWorkspace','listAllCampaigns','listCampaigns','isUUID','440CzEbwh','normalizeWorkspace','duplicateAlwaysOnCampaign','createWorkspace','applicableParentSegments','resolveWorkspaceId','type','getTemplate','limit','listTemplates','ensureArray','normalizeCampaign','Use\x20\x22tdx\x20engage\x20campaign\x20list\x22\x20to\x20see\x20available\x20campaigns.','workspaceConfig','listWorkspaces','createAlwaysOnCampaign','createdAt','applicableDomains','updateTemplate','375BWNQwh','377kkZHvj','normalizeTemplate','2406684dfxNBW','attributes','deleteCampaign','-updatedAt','workspaceId','NOT_FOUND'];a113_0x5042=function(){return _0x39234a;};return a113_0x5042();}(function(_0x12f4c1,_0x5f296e){const _0xcd4cdc=a113_0x4ddb,_0x52499d=_0x12f4c1();while(!![]){try{const _0x5ea70=-parseInt(_0xcd4cdc(0x250))/0x1*(-parseInt(_0xcd4cdc(0x200))/0x2)+parseInt(_0xcd4cdc(0x22b))/0x3*(parseInt(_0xcd4cdc(0x218))/0x4)+parseInt(_0xcd4cdc(0x249))/0x5*(parseInt(_0xcd4cdc(0x22e))/0x6)+-parseInt(_0xcd4cdc(0x1fa))/0x7*(-parseInt(_0xcd4cdc(0x1ff))/0x8)+parseInt(_0xcd4cdc(0x258))/0x9*(-parseInt(_0xcd4cdc(0x206))/0xa)+-parseInt(_0xcd4cdc(0x1f3))/0xb*(-parseInt(_0xcd4cdc(0x235))/0xc)+-parseInt(_0xcd4cdc(0x22c))/0xd*(parseInt(_0xcd4cdc(0x23b))/0xe);if(_0x5ea70===_0x5f296e)break;else _0x52499d['push'](_0x52499d['shift']());}catch(_0x299e9e){_0x52499d['push'](_0x52499d['shift']());}}}(a113_0x5042,0x468ca));function a113_0x4ddb(_0x2bd022,_0x223cd1){_0x2bd022=_0x2bd022-0x1ef;const _0x5042f8=a113_0x5042();let _0x4ddbcb=_0x5042f8[_0x2bd022];return _0x4ddbcb;}import{EngageApiClient}from'./client/engage-api-client.js';import{SDKError,ErrorCode}from'./errors.js';import{paginate}from'./util/paginate.js';export class EngageSDK{[a113_0x19ece3(0x202)];constructor(_0x56f235){const _0x39a0f7=a113_0x19ece3;this[_0x39a0f7(0x202)]=new EngageApiClient(_0x56f235);}[a113_0x19ece3(0x222)](_0x56bf3b){return Array['isArray'](_0x56bf3b)?_0x56bf3b:[_0x56bf3b];}['isUUID'](_0xff220d){const _0x510c89=a113_0x19ece3;return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x510c89(0x20c)](_0xff220d);}async[a113_0x19ece3(0x1f8)](_0x245c72){const _0x4b9fb3=a113_0x19ece3;return paginate((_0x52b22b,_0x224c81)=>this[_0x4b9fb3(0x202)][_0x4b9fb3(0x221)]({'workspaceId':_0x245c72,'limit':_0x52b22b,'offset':_0x224c81}));}async[a113_0x19ece3(0x215)](_0x46b82e){const _0x9b7e11=a113_0x19ece3;return paginate((_0x5ab4cc,_0x2c1b08)=>this[_0x9b7e11(0x202)]['listCampaigns']({'workspaceId':_0x46b82e,'limit':_0x5ab4cc,'offset':_0x2c1b08}));}[a113_0x19ece3(0x223)](_0xc715aa){const _0x55e896=a113_0x19ece3;return{'id':_0xc715aa['id'],'name':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x252)],'campaignType':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x24b)],'status':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x255)],'description':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x201)],'workspaceId':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x232)],'audienceId':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x1fc)],'audienceName':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x244)],'segmentId':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x1f2)],'segmentName':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x207)],'enableUtmTracking':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x248)],'createdAt':_0xc715aa['attributes'][_0x55e896(0x228)],'updatedAt':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x238)],'launchedAt':_0xc715aa[_0x55e896(0x22f)][_0x55e896(0x25b)]};}[a113_0x19ece3(0x22d)](_0x453000){const _0x2d3f02=a113_0x19ece3;return{'id':_0x453000['id'],'name':_0x453000['attributes']['name'],'subjectTemplate':_0x453000[_0x2d3f02(0x22f)][_0x2d3f02(0x212)],'workspaceId':_0x453000[_0x2d3f02(0x22f)][_0x2d3f02(0x232)],'editorType':_0x453000[_0x2d3f02(0x22f)]['editorType'],'createdAt':_0x453000['attributes']['createdAt'],'updatedAt':_0x453000['attributes']['updatedAt']};}[a113_0x19ece3(0x219)](_0x57772a){const _0x10120b=a113_0x19ece3;return{'id':_0x57772a['id'],'name':_0x57772a['attributes'][_0x10120b(0x252)],'description':_0x57772a[_0x10120b(0x22f)][_0x10120b(0x201)],'ownerName':_0x57772a[_0x10120b(0x22f)][_0x10120b(0x1f9)][_0x10120b(0x252)],'domainCount':_0x57772a[_0x10120b(0x22f)][_0x10120b(0x225)][_0x10120b(0x229)][_0x10120b(0x256)],'segmentCount':_0x57772a[_0x10120b(0x22f)]['workspaceConfig'][_0x10120b(0x21c)]['length'],'createdAt':_0x57772a[_0x10120b(0x22f)][_0x10120b(0x228)],'updatedAt':_0x57772a['attributes'][_0x10120b(0x238)]};}async[a113_0x19ece3(0x20b)](_0x30864f,_0x4abc47){const _0x3f2f0c=a113_0x19ece3;if(this[_0x3f2f0c(0x217)](_0x30864f))try{return await this[_0x3f2f0c(0x202)][_0x3f2f0c(0x203)](_0x30864f),_0x30864f;}catch(_0x448de4){if(_0x448de4 instanceof SDKError&&_0x448de4[_0x3f2f0c(0x20f)]===ErrorCode[_0x3f2f0c(0x233)])throw new SDKError(ErrorCode[_0x3f2f0c(0x233)],'Campaign\x20not\x20found\x20with\x20ID:\x20'+_0x30864f,_0x448de4,{'helpText':_0x3f2f0c(0x224)});throw _0x448de4;}const _0x3f08ff=await this[_0x3f2f0c(0x215)](_0x4abc47),_0x102bae=_0x30864f[_0x3f2f0c(0x236)](),_0x241034=_0x3f08ff[_0x3f2f0c(0x24d)](_0x2b746e=>_0x2b746e[_0x3f2f0c(0x22f)][_0x3f2f0c(0x252)][_0x3f2f0c(0x236)]()===_0x102bae);if(_0x241034[_0x3f2f0c(0x256)]===0x0)throw new SDKError(ErrorCode[_0x3f2f0c(0x233)],_0x3f2f0c(0x24c)+_0x30864f,undefined,{'helpText':'Use\x20\x22tdx\x20engage\x20campaign\x20list\x22\x20to\x20see\x20available\x20campaigns.'});if(_0x241034[_0x3f2f0c(0x256)]>0x1){const _0x2f7a12=_0x241034[_0x3f2f0c(0x240)](_0x1c0ac5=>_0x1c0ac5['id'])[_0x3f2f0c(0x20e)](',\x20');throw new SDKError(ErrorCode[_0x3f2f0c(0x257)],_0x3f2f0c(0x213)+_0x30864f+_0x3f2f0c(0x234)+_0x2f7a12,undefined,{'helpText':'Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20campaign\x20UUID\x20directly.'});}return _0x241034[0x0]['id'];}async[a113_0x19ece3(0x239)](_0x3f8704,_0x2b63e8){const _0x1875b7=a113_0x19ece3;if(this[_0x1875b7(0x217)](_0x3f8704))try{const _0x383204=await this[_0x1875b7(0x202)][_0x1875b7(0x21f)](_0x3f8704),_0x40cf33=this[_0x1875b7(0x222)](_0x383204[_0x1875b7(0x246)])[0x0];return{'id':_0x3f8704,'name':_0x40cf33[_0x1875b7(0x22f)]['name']};}catch(_0x408106){if(_0x408106 instanceof SDKError&&_0x408106[_0x1875b7(0x20f)]===ErrorCode[_0x1875b7(0x233)])throw new SDKError(ErrorCode['NOT_FOUND'],'Email\x20template\x20not\x20found\x20with\x20ID:\x20'+_0x3f8704,_0x408106,{'helpText':_0x1875b7(0x24e)});throw _0x408106;}const _0x4f714f=await this['listAllTemplates'](_0x2b63e8),_0x5f0224=_0x3f8704[_0x1875b7(0x236)](),_0x2e1618=_0x4f714f[_0x1875b7(0x24d)](_0x4a12bb=>_0x4a12bb[_0x1875b7(0x22f)]['name'][_0x1875b7(0x236)]()===_0x5f0224);if(_0x2e1618[_0x1875b7(0x256)]===0x0)throw new SDKError(ErrorCode[_0x1875b7(0x233)],'Email\x20template\x20not\x20found:\x20'+_0x3f8704,undefined,{'helpText':_0x1875b7(0x24e)});if(_0x2e1618[_0x1875b7(0x256)]>0x1){const _0x1b7143=_0x2e1618['map'](_0x5cf3af=>_0x5cf3af['id'])[_0x1875b7(0x20e)](',\x20');throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Multiple\x20templates\x20found\x20with\x20name\x20\x22'+_0x3f8704+_0x1875b7(0x234)+_0x1b7143,undefined,{'helpText':_0x1875b7(0x1f7)});}return{'id':_0x2e1618[0x0]['id'],'name':_0x2e1618[0x0][_0x1875b7(0x22f)][_0x1875b7(0x252)]};}async[a113_0x19ece3(0x21d)](_0x36e24a){const _0x1a943d=a113_0x19ece3;if(this[_0x1a943d(0x217)](_0x36e24a))try{return await this[_0x1a943d(0x202)][_0x1a943d(0x20a)](_0x36e24a),_0x36e24a;}catch(_0x4a8eb2){if(_0x4a8eb2 instanceof SDKError&&_0x4a8eb2[_0x1a943d(0x20f)]===ErrorCode[_0x1a943d(0x233)])throw new SDKError(ErrorCode[_0x1a943d(0x233)],_0x1a943d(0x245)+_0x36e24a,_0x4a8eb2,{'helpText':_0x1a943d(0x237)});throw _0x4a8eb2;}const _0x262ed1=await this[_0x1a943d(0x202)]['listWorkspaces']({'name':_0x36e24a}),_0x212850=this['ensureArray'](_0x262ed1['data']),_0x4d87a4=_0x36e24a['trim'](),_0x5aed99=_0x212850[_0x1a943d(0x24d)](_0x585ce5=>_0x585ce5['attributes']['name']['trim']()===_0x4d87a4);if(_0x5aed99[_0x1a943d(0x256)]===0x0)throw new SDKError(ErrorCode[_0x1a943d(0x233)],_0x1a943d(0x251)+_0x36e24a,undefined,{'helpText':_0x1a943d(0x237)});if(_0x5aed99[_0x1a943d(0x256)]>0x1){const _0x4eedb5=_0x5aed99[_0x1a943d(0x240)](_0x46bf4d=>_0x46bf4d['id'])[_0x1a943d(0x20e)](',\x20');throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Multiple\x20workspaces\x20found\x20with\x20name\x20\x22'+_0x36e24a+_0x1a943d(0x234)+_0x4eedb5,undefined,{'helpText':_0x1a943d(0x1ef)});}return _0x5aed99[0x0]['id'];}async['listCampaigns'](_0x288aac){const _0xbe10de=a113_0x19ece3,_0x10c0a5=await paginate((_0x58564d,_0x596801)=>this[_0xbe10de(0x202)][_0xbe10de(0x216)]({'campaignType':_0x288aac?.[_0xbe10de(0x21e)],'status':_0x288aac?.[_0xbe10de(0x255)],'workspaceId':_0x288aac?.[_0xbe10de(0x232)],'limit':_0x58564d,'offset':_0x596801}),_0x288aac?.[_0xbe10de(0x220)],_0x288aac?.[_0xbe10de(0x209)]);return _0x10c0a5['map'](_0x46abdc=>this[_0xbe10de(0x223)](_0x46abdc));}async[a113_0x19ece3(0x203)](_0x339368,_0x4a0788){const _0xcc3436=a113_0x19ece3,_0x42424c=await this[_0xcc3436(0x20b)](_0x339368,_0x4a0788),_0x1edd51=await this[_0xcc3436(0x202)][_0xcc3436(0x203)](_0x42424c);return this['normalizeCampaign'](_0x1edd51[_0xcc3436(0x246)]);}async[a113_0x19ece3(0x1fb)](_0x36b627,_0x27d8d5){const _0x28c477=a113_0x19ece3,_0x304983=await this[_0x28c477(0x20b)](_0x36b627,_0x27d8d5),_0x181e75=await this[_0x28c477(0x202)][_0x28c477(0x203)](_0x304983);return _0x181e75[_0x28c477(0x246)];}async['createCampaign'](_0xbe84b5){const _0x4f6162=a113_0x19ece3,_0x4269ee=await this[_0x4f6162(0x202)][_0x4f6162(0x208)](_0xbe84b5);return this['normalizeCampaign'](_0x4269ee['data']);}async[a113_0x19ece3(0x1f6)](_0x4b39ab,_0x592f12,_0x132232){const _0x5bd5fb=a113_0x19ece3,_0x1580ae=await this[_0x5bd5fb(0x20b)](_0x4b39ab,_0x132232),_0x704ad8=await this[_0x5bd5fb(0x202)][_0x5bd5fb(0x1f6)](_0x1580ae,_0x592f12);return this['normalizeCampaign'](_0x704ad8['data']);}async[a113_0x19ece3(0x230)](_0x387284,_0x578abf){const _0x5955d6=a113_0x19ece3,_0x4d3298=await this['resolveCampaignId'](_0x387284,_0x578abf);await this[_0x5955d6(0x202)][_0x5955d6(0x230)](_0x4d3298);}async[a113_0x19ece3(0x247)](_0x5e8cc2,_0x4b2564){const _0x2b9e13=a113_0x19ece3,_0x54151e=await this[_0x2b9e13(0x20b)](_0x5e8cc2,_0x4b2564);await this[_0x2b9e13(0x202)][_0x2b9e13(0x247)](_0x54151e);}async[a113_0x19ece3(0x23e)](_0x3e3ecf,_0x19bb93){const _0x1ae31e=a113_0x19ece3,_0x1d4c3d=await this[_0x1ae31e(0x20b)](_0x3e3ecf,_0x19bb93);await this[_0x1ae31e(0x202)][_0x1ae31e(0x23e)](_0x1d4c3d);}async['resumeCampaign'](_0x53d862,_0x4a674c){const _0x108d04=a113_0x19ece3,_0x328a3c=await this['resolveCampaignId'](_0x53d862,_0x4a674c);await this[_0x108d04(0x202)][_0x108d04(0x243)](_0x328a3c);}async['duplicateCampaign'](_0xb2c9de,_0xd2b09b){const _0x14db18=a113_0x19ece3,_0x52b12e=await this['resolveCampaignId'](_0xb2c9de,_0xd2b09b),_0x3de632=await this[_0x14db18(0x202)][_0x14db18(0x20d)](_0x52b12e);return this[_0x14db18(0x223)](_0x3de632[_0x14db18(0x246)]);}async['listTemplates'](_0x5b0e22){const _0x587812=a113_0x19ece3,_0x461a89=await paginate((_0x370d22,_0x3b6cc6)=>this[_0x587812(0x202)][_0x587812(0x221)]({'workspaceId':_0x5b0e22?.[_0x587812(0x232)],'limit':_0x370d22,'offset':_0x3b6cc6,'sort':_0x587812(0x231)}),_0x5b0e22?.['limit'],_0x5b0e22?.[_0x587812(0x209)]);return _0x461a89[_0x587812(0x240)](_0x296375=>this['normalizeTemplate'](_0x296375));}async['getTemplate'](_0x3fd981,_0x42fe75){const _0xc1b414=a113_0x19ece3,{id:_0x26fe70}=await this[_0xc1b414(0x239)](_0x3fd981,_0x42fe75),_0x2feb17=await this[_0xc1b414(0x202)][_0xc1b414(0x21f)](_0x26fe70);return this[_0xc1b414(0x22d)](_0x2feb17[_0xc1b414(0x246)]);}async[a113_0x19ece3(0x205)](_0x49342e,_0x3d1b10){const _0x515e12=a113_0x19ece3,{id:_0x48e964}=await this['resolveTemplateId'](_0x49342e,_0x3d1b10),_0x493907=await this[_0x515e12(0x202)][_0x515e12(0x21f)](_0x48e964);return _0x493907[_0x515e12(0x246)];}async[a113_0x19ece3(0x1fe)](_0x1916c8){const _0x434dce=a113_0x19ece3,_0x20e37c=await this[_0x434dce(0x202)][_0x434dce(0x1fe)](_0x1916c8);return this[_0x434dce(0x22d)](_0x20e37c['data']);}async[a113_0x19ece3(0x22a)](_0x5e85ad,_0x2ff54c,_0xb12cc9){const _0x29e654=a113_0x19ece3,{id:_0x5aaf98}=await this['resolveTemplateId'](_0x5e85ad,_0xb12cc9),_0x251415=await this['client'][_0x29e654(0x22a)](_0x5aaf98,_0x2ff54c);return this[_0x29e654(0x22d)](_0x251415['data']);}async['deleteTemplate'](_0x59817e,_0x4aee32){const _0x36a0a3=a113_0x19ece3,{id:_0x257276}=await this['resolveTemplateId'](_0x59817e,_0x4aee32);await this[_0x36a0a3(0x202)][_0x36a0a3(0x23a)](_0x257276);}async[a113_0x19ece3(0x226)](_0x36446b){const _0x5f3120=a113_0x19ece3,_0x4f8c8f=await paginate((_0x3b5c41,_0x554396)=>this['client'][_0x5f3120(0x226)]({'name':_0x36446b?.[_0x5f3120(0x252)],'limit':_0x3b5c41,'offset':_0x554396}),_0x36446b?.[_0x5f3120(0x220)],_0x36446b?.[_0x5f3120(0x209)]);return _0x4f8c8f[_0x5f3120(0x240)](_0x37f4ce=>this[_0x5f3120(0x219)](_0x37f4ce));}async[a113_0x19ece3(0x20a)](_0x55ccc1){const _0x466688=a113_0x19ece3,_0x1f890c=await this[_0x466688(0x21d)](_0x55ccc1),_0xe9b54=await this[_0x466688(0x202)]['getWorkspace'](_0x1f890c);return this[_0x466688(0x219)](_0xe9b54['data']);}async[a113_0x19ece3(0x242)](_0x521a7a){const _0x4fd2aa=a113_0x19ece3,_0x3c823d=await this[_0x4fd2aa(0x21d)](_0x521a7a),_0x263fc6=await this[_0x4fd2aa(0x202)][_0x4fd2aa(0x20a)](_0x3c823d);return _0x263fc6[_0x4fd2aa(0x246)];}async[a113_0x19ece3(0x21b)](_0x537aaf){const _0x3437dc=a113_0x19ece3,_0x344a60=await this[_0x3437dc(0x202)][_0x3437dc(0x21b)](_0x537aaf);return this['normalizeWorkspace'](_0x344a60[_0x3437dc(0x246)]);}async[a113_0x19ece3(0x25a)](_0x29c369,_0x417067){const _0x3aec5a=a113_0x19ece3,_0x1836e3=await this[_0x3aec5a(0x21d)](_0x29c369),_0x569827=await this['client'][_0x3aec5a(0x25a)](_0x1836e3,_0x417067);return this[_0x3aec5a(0x219)](_0x569827[_0x3aec5a(0x246)]);}async[a113_0x19ece3(0x214)](_0x40cf05){const _0x32c5e7=a113_0x19ece3,_0x2ca0f1=await this[_0x32c5e7(0x21d)](_0x40cf05);await this[_0x32c5e7(0x202)]['deleteWorkspace'](_0x2ca0f1);}async[a113_0x19ece3(0x23d)](_0x411c38){const _0x5c6f4d=a113_0x19ece3;return paginate((_0x445185,_0x5dbfa2)=>this[_0x5c6f4d(0x202)][_0x5c6f4d(0x259)](_0x411c38,{'limit':_0x445185,'offset':_0x5dbfa2}));}[a113_0x19ece3(0x23c)](_0x284ed6){const _0x292c96=a113_0x19ece3;return{'id':_0x284ed6['id'],'name':_0x284ed6[_0x292c96(0x22f)][_0x292c96(0x252)],'campaignType':_0x284ed6[_0x292c96(0x22f)][_0x292c96(0x24b)],'status':_0x284ed6[_0x292c96(0x22f)][_0x292c96(0x255)],'description':_0x284ed6[_0x292c96(0x22f)][_0x292c96(0x201)],'workspaceId':_0x284ed6[_0x292c96(0x22f)][_0x292c96(0x232)],'audienceId':_0x284ed6['attributes']['audienceId'],'audienceName':_0x284ed6[_0x292c96(0x22f)][_0x292c96(0x244)],'enableUtmTracking':_0x284ed6['attributes']['enableUtmTracking'],'createdAt':_0x284ed6[_0x292c96(0x22f)]['createdAt'],'updatedAt':_0x284ed6['attributes'][_0x292c96(0x238)],'launchedAt':_0x284ed6[_0x292c96(0x22f)][_0x292c96(0x25b)],'pausedAt':_0x284ed6['attributes']['pausedAt'],'resumedAt':_0x284ed6[_0x292c96(0x22f)][_0x292c96(0x1f0)],'finishedAt':_0x284ed6['attributes'][_0x292c96(0x210)]};}async['resolveAlwaysOnCampaignId'](_0xa9cb38,_0x4df878){const _0x5944ae=a113_0x19ece3;if(this[_0x5944ae(0x217)](_0x4df878))try{return await this['client'][_0x5944ae(0x204)](_0xa9cb38,_0x4df878),_0x4df878;}catch(_0x83cd12){if(_0x83cd12 instanceof SDKError&&_0x83cd12['code']===ErrorCode[_0x5944ae(0x233)])throw new SDKError(ErrorCode[_0x5944ae(0x233)],_0x5944ae(0x23f)+_0x4df878,_0x83cd12,{'helpText':_0x5944ae(0x24f)});throw _0x83cd12;}const _0x466147=await this['listAllAlwaysOnCampaigns'](_0xa9cb38),_0x5bde1b=_0x4df878[_0x5944ae(0x236)](),_0x38ec9d=_0x466147[_0x5944ae(0x24d)](_0x59c030=>_0x59c030['attributes'][_0x5944ae(0x252)][_0x5944ae(0x236)]()===_0x5bde1b);if(_0x38ec9d['length']===0x0)throw new SDKError(ErrorCode[_0x5944ae(0x233)],_0x5944ae(0x241)+_0x4df878,undefined,{'helpText':_0x5944ae(0x24f)});if(_0x38ec9d['length']>0x1){const _0x4f8639=_0x38ec9d[_0x5944ae(0x240)](_0x284ae9=>_0x284ae9['id'])[_0x5944ae(0x20e)](',\x20');throw new SDKError(ErrorCode[_0x5944ae(0x257)],_0x5944ae(0x24a)+_0x4df878+_0x5944ae(0x234)+_0x4f8639,undefined,{'helpText':'Use\x20the\x20campaign\x20UUID\x20directly\x20to\x20select\x20a\x20specific\x20campaign.'});}return _0x38ec9d[0x0]['id'];}async['listAlwaysOnCampaigns'](_0x47a6ee){const _0x3ce230=a113_0x19ece3,_0x28cc24=await paginate((_0x35f5fe,_0xcdb8df)=>this[_0x3ce230(0x202)][_0x3ce230(0x259)](_0x47a6ee['workspaceId'],{'campaignType':_0x47a6ee[_0x3ce230(0x21e)],'status':_0x47a6ee[_0x3ce230(0x255)],'limit':_0x35f5fe,'offset':_0xcdb8df}),_0x47a6ee[_0x3ce230(0x220)],_0x47a6ee[_0x3ce230(0x209)]);return _0x28cc24[_0x3ce230(0x240)](_0xddee92=>this[_0x3ce230(0x23c)](_0xddee92));}async[a113_0x19ece3(0x204)](_0x5ad695,_0x42972b){const _0x5e8e20=a113_0x19ece3,_0x1730f1=await this['resolveAlwaysOnCampaignId'](_0x5ad695,_0x42972b),_0x36fbb3=await this['client'][_0x5e8e20(0x204)](_0x5ad695,_0x1730f1);return this['normalizeAlwaysOnCampaign'](_0x36fbb3[_0x5e8e20(0x246)]);}async[a113_0x19ece3(0x253)](_0x4ddbbb,_0x526c0b){const _0x34f122=a113_0x19ece3,_0xb0d46c=await this['resolveAlwaysOnCampaignId'](_0x4ddbbb,_0x526c0b),_0x12c1bb=await this[_0x34f122(0x202)][_0x34f122(0x204)](_0x4ddbbb,_0xb0d46c);return _0x12c1bb[_0x34f122(0x246)];}async[a113_0x19ece3(0x227)](_0x3a093c,_0x4b054a){const _0x456b89=a113_0x19ece3,_0x5b7a09=await this['client'][_0x456b89(0x227)](_0x3a093c,_0x4b054a);return this[_0x456b89(0x23c)](_0x5b7a09[_0x456b89(0x246)]);}async[a113_0x19ece3(0x1f1)](_0x480e4b,_0x59bb69,_0x268098){const _0x35070d=a113_0x19ece3,_0x1ba1cb=await this[_0x35070d(0x1f5)](_0x480e4b,_0x59bb69),_0x1c67ca=await this[_0x35070d(0x202)]['updateAlwaysOnCampaign'](_0x480e4b,_0x1ba1cb,_0x268098);return this[_0x35070d(0x23c)](_0x1c67ca['data']);}async['deleteAlwaysOnCampaign'](_0xe489d2,_0x5625b5){const _0x113f6f=a113_0x19ece3,_0x52dbb0=await this[_0x113f6f(0x1f5)](_0xe489d2,_0x5625b5);await this['client']['deleteAlwaysOnCampaign'](_0xe489d2,_0x52dbb0);}async[a113_0x19ece3(0x25c)](_0x3ec628,_0x23c6ef,_0x530730){const _0xd54bcd=a113_0x19ece3,_0x1ca323=await this[_0xd54bcd(0x1f5)](_0x3ec628,_0x23c6ef);await _0x530730(_0x3ec628,_0x1ca323);}async[a113_0x19ece3(0x254)](_0x1276fb,_0x5eb52d){const _0x51d9de=a113_0x19ece3;await this[_0x51d9de(0x25c)](_0x1276fb,_0x5eb52d,(_0x1aac3f,_0xc02c4)=>this[_0x51d9de(0x202)]['launchAlwaysOnCampaign'](_0x1aac3f,_0xc02c4));}async['pauseAlwaysOnCampaign'](_0x3b202b,_0x5eccaa){const _0x722e36=a113_0x19ece3;await this[_0x722e36(0x25c)](_0x3b202b,_0x5eccaa,(_0x18c4e9,_0xc22802)=>this[_0x722e36(0x202)][_0x722e36(0x1fd)](_0x18c4e9,_0xc22802));}async['resumeAlwaysOnCampaign'](_0x7b1122,_0x2ca3b4){const _0x2ff108=a113_0x19ece3;await this[_0x2ff108(0x25c)](_0x7b1122,_0x2ca3b4,(_0x1b412f,_0x2d18c4)=>this['client'][_0x2ff108(0x1f4)](_0x1b412f,_0x2d18c4));}async[a113_0x19ece3(0x211)](_0x57be42,_0x19d0fd){const _0x3ab16a=a113_0x19ece3;await this[_0x3ab16a(0x25c)](_0x57be42,_0x19d0fd,(_0x4d94c2,_0x4de932)=>this[_0x3ab16a(0x202)][_0x3ab16a(0x211)](_0x4d94c2,_0x4de932));}async[a113_0x19ece3(0x21a)](_0x740401,_0x409cbb,_0x569a07){const _0x3f4aa0=a113_0x19ece3,_0x2bc6a1=await this[_0x3f4aa0(0x1f5)](_0x740401,_0x409cbb),_0x448340=await this[_0x3f4aa0(0x202)][_0x3f4aa0(0x21a)](_0x740401,_0x2bc6a1,_0x569a07);return this['normalizeAlwaysOnCampaign'](_0x448340[_0x3f4aa0(0x246)]);}}
1
+ function a113_0x3200(){const _0x352170=['deleteWorkspace','-updatedAt','getCampaign','applicableParentSegments','audienceId','resolveCampaignId','listAllAlwaysOnCampaigns','data','547180toZTQq','performAlwaysOnCampaignAction','listAllCampaigns','normalizeAlwaysOnCampaign','updateCampaign','pauseAlwaysOnCampaign','offset','393722mziBYm','filter','isUUID','listTemplates','subjectTemplate','duplicateCampaign','getWorkspace','\x22:\x20','Use\x20\x22tdx\x20engage\x20workspace\x20list\x22\x20to\x20see\x20available\x20workspaces.','243531VAvWDt','getAlwaysOnCampaign','resumeAlwaysOnCampaign','resumedAt','updateWorkspace','createdAt','createWorkspace','editorType','Multiple\x20templates\x20found\x20with\x20name\x20\x22','5967gsKnvk','description','Multiple\x20campaigns\x20found\x20with\x20name\x20\x22','length','Email\x20template\x20not\x20found\x20with\x20ID:\x20','deleteCampaign','Use\x20\x22tdx\x20engage\x20campaign\x20list\x22\x20to\x20see\x20available\x20campaigns.','listCampaigns','433056XHAGsC','launchAlwaysOnCampaign','normalizeWorkspace','resolveWorkspaceId','workspaceConfig','limit','Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20campaign\x20UUID\x20directly.','applicableDomains','listAlwaysOnCampaigns','join','11HyIJgB','normalizeTemplate','audienceName','Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20template\x20UUID\x20directly.','deleteTemplate','campaignType','INVALID_ARGUMENT','Use\x20\x22tdx\x20engage\x20template\x20list\x22\x20to\x20see\x20available\x20templates.','createCampaign','finishedAt','resolveAlwaysOnCampaignId','8ByXzRQ','getTemplate','updateTemplate','client','status','ensureArray','resolveTemplateId','trim','getTemplateFull','duplicateAlwaysOnCampaign','createAlwaysOnCampaign','finishAlwaysOnCampaign','Multiple\x20always-on\x20campaigns\x20found\x20with\x20name\x20\x22','244CnMGsT','listAllTemplates','pauseCampaign','enableUtmTracking','workspaceId','4984370mvcPmH','attributes','getCampaignFull','createTemplate','Use\x20\x22tdx\x20engage\x20campaign\x20list\x20--type\x20always-on\x22\x20to\x20see\x20available\x20campaigns.','map','deleteAlwaysOnCampaign','Use\x20the\x20campaign\x20UUID\x20directly\x20to\x20select\x20a\x20specific\x20campaign.','780456MnXbuH','resumeCampaign','segmentId','updatedAt','12DloADN','listWorkspaces','name','normalizeCampaign','NOT_FOUND','Campaign\x20not\x20found\x20with\x20ID:\x20','type'];a113_0x3200=function(){return _0x352170;};return a113_0x3200();}const a113_0x57da41=a113_0x1326;(function(_0x515a01,_0x5ae210){const _0x40b44c=a113_0x1326,_0x14a910=_0x515a01();while(!![]){try{const _0x1624ca=parseInt(_0x40b44c(0xf5))/0x1+parseInt(_0x40b44c(0x124))/0x2+parseInt(_0x40b44c(0xed))/0x3*(-parseInt(_0x40b44c(0x117))/0x4)+-parseInt(_0x40b44c(0x137))/0x5+parseInt(_0x40b44c(0x128))/0x6*(parseInt(_0x40b44c(0xdb))/0x7)+-parseInt(_0x40b44c(0x10a))/0x8*(-parseInt(_0x40b44c(0xe4))/0x9)+-parseInt(_0x40b44c(0x11c))/0xa*(parseInt(_0x40b44c(0xff))/0xb);if(_0x1624ca===_0x5ae210)break;else _0x14a910['push'](_0x14a910['shift']());}catch(_0x151eff){_0x14a910['push'](_0x14a910['shift']());}}}(a113_0x3200,0x390a1));import{EngageApiClient}from'./client/engage-api-client.js';import{SDKError,ErrorCode}from'./errors.js';import{paginate}from'./util/paginate.js';function a113_0x1326(_0x1eaf3a,_0x31826b){_0x1eaf3a=_0x1eaf3a-0xdb;const _0x3200b0=a113_0x3200();let _0x132699=_0x3200b0[_0x1eaf3a];return _0x132699;}export class EngageSDK{['client'];constructor(_0x50f99d){const _0x3df1c2=a113_0x1326;this[_0x3df1c2(0x10d)]=new EngageApiClient(_0x50f99d);}['ensureArray'](_0xef980b){return Array['isArray'](_0xef980b)?_0xef980b:[_0xef980b];}[a113_0x57da41(0xdd)](_0x42a422){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x42a422);}async[a113_0x57da41(0x118)](_0x9231f0){const _0x340fe=a113_0x57da41;return paginate((_0x141a5e,_0x14714a)=>this[_0x340fe(0x10d)][_0x340fe(0xde)]({'workspaceId':_0x9231f0,'limit':_0x141a5e,'offset':_0x14714a}));}async[a113_0x57da41(0x139)](_0x2796f1){const _0x424ecf=a113_0x57da41;return paginate((_0x41d891,_0x416549)=>this[_0x424ecf(0x10d)][_0x424ecf(0xf4)]({'workspaceId':_0x2796f1,'limit':_0x41d891,'offset':_0x416549}));}[a113_0x57da41(0x12b)](_0x36d94b){const _0x3667f8=a113_0x57da41;return{'id':_0x36d94b['id'],'name':_0x36d94b[_0x3667f8(0x11d)][_0x3667f8(0x12a)],'campaignType':_0x36d94b[_0x3667f8(0x11d)][_0x3667f8(0x104)],'status':_0x36d94b[_0x3667f8(0x11d)][_0x3667f8(0x10e)],'description':_0x36d94b[_0x3667f8(0x11d)][_0x3667f8(0xee)],'workspaceId':_0x36d94b['attributes'][_0x3667f8(0x11b)],'audienceId':_0x36d94b['attributes'][_0x3667f8(0x133)],'audienceName':_0x36d94b[_0x3667f8(0x11d)][_0x3667f8(0x101)],'segmentId':_0x36d94b['attributes'][_0x3667f8(0x126)],'segmentName':_0x36d94b['attributes']['segmentName'],'enableUtmTracking':_0x36d94b['attributes']['enableUtmTracking'],'createdAt':_0x36d94b[_0x3667f8(0x11d)][_0x3667f8(0xe9)],'updatedAt':_0x36d94b['attributes'][_0x3667f8(0x127)],'launchedAt':_0x36d94b[_0x3667f8(0x11d)]['launchedAt']};}[a113_0x57da41(0x100)](_0x3be56b){const _0x5581ee=a113_0x57da41;return{'id':_0x3be56b['id'],'name':_0x3be56b[_0x5581ee(0x11d)]['name'],'subjectTemplate':_0x3be56b[_0x5581ee(0x11d)][_0x5581ee(0xdf)],'workspaceId':_0x3be56b[_0x5581ee(0x11d)]['workspaceId'],'editorType':_0x3be56b[_0x5581ee(0x11d)][_0x5581ee(0xeb)],'createdAt':_0x3be56b[_0x5581ee(0x11d)][_0x5581ee(0xe9)],'updatedAt':_0x3be56b[_0x5581ee(0x11d)]['updatedAt']};}[a113_0x57da41(0xf7)](_0x297262){const _0x5eb8bc=a113_0x57da41;return{'id':_0x297262['id'],'name':_0x297262[_0x5eb8bc(0x11d)]['name'],'description':_0x297262[_0x5eb8bc(0x11d)][_0x5eb8bc(0xee)],'ownerName':_0x297262['attributes']['ownerUser']['name'],'domainCount':_0x297262['attributes'][_0x5eb8bc(0xf9)][_0x5eb8bc(0xfc)][_0x5eb8bc(0xf0)],'segmentCount':_0x297262[_0x5eb8bc(0x11d)][_0x5eb8bc(0xf9)][_0x5eb8bc(0x132)][_0x5eb8bc(0xf0)],'createdAt':_0x297262[_0x5eb8bc(0x11d)][_0x5eb8bc(0xe9)],'updatedAt':_0x297262['attributes'][_0x5eb8bc(0x127)]};}async['resolveCampaignId'](_0x299f5f,_0x4e98e6){const _0x1e0239=a113_0x57da41;if(this[_0x1e0239(0xdd)](_0x299f5f))try{return await this['client']['getCampaign'](_0x299f5f),_0x299f5f;}catch(_0x37f8c4){if(_0x37f8c4 instanceof SDKError&&_0x37f8c4['code']===ErrorCode[_0x1e0239(0x12c)])throw new SDKError(ErrorCode[_0x1e0239(0x12c)],_0x1e0239(0x12d)+_0x299f5f,_0x37f8c4,{'helpText':_0x1e0239(0xf3)});throw _0x37f8c4;}const _0x53853f=await this[_0x1e0239(0x139)](_0x4e98e6),_0x1ba926=_0x299f5f[_0x1e0239(0x111)](),_0x5827ab=_0x53853f[_0x1e0239(0xdc)](_0x58cdc5=>_0x58cdc5['attributes']['name'][_0x1e0239(0x111)]()===_0x1ba926);if(_0x5827ab['length']===0x0)throw new SDKError(ErrorCode[_0x1e0239(0x12c)],'Campaign\x20not\x20found:\x20'+_0x299f5f,undefined,{'helpText':_0x1e0239(0xf3)});if(_0x5827ab[_0x1e0239(0xf0)]>0x1){const _0x4507b5=_0x5827ab[_0x1e0239(0x121)](_0x353137=>_0x353137['id'])['join'](',\x20');throw new SDKError(ErrorCode[_0x1e0239(0x105)],_0x1e0239(0xef)+_0x299f5f+_0x1e0239(0xe2)+_0x4507b5,undefined,{'helpText':_0x1e0239(0xfb)});}return _0x5827ab[0x0]['id'];}async[a113_0x57da41(0x110)](_0x1e4d3c,_0x5ba9f9){const _0x20c230=a113_0x57da41;if(this[_0x20c230(0xdd)](_0x1e4d3c))try{const _0x6db774=await this['client'][_0x20c230(0x10b)](_0x1e4d3c),_0x192dd0=this['ensureArray'](_0x6db774['data'])[0x0];return{'id':_0x1e4d3c,'name':_0x192dd0['attributes'][_0x20c230(0x12a)]};}catch(_0x4012ab){if(_0x4012ab instanceof SDKError&&_0x4012ab['code']===ErrorCode[_0x20c230(0x12c)])throw new SDKError(ErrorCode[_0x20c230(0x12c)],_0x20c230(0xf1)+_0x1e4d3c,_0x4012ab,{'helpText':_0x20c230(0x106)});throw _0x4012ab;}const _0x1ab93c=await this[_0x20c230(0x118)](_0x5ba9f9),_0x221f9b=_0x1e4d3c['trim'](),_0xc80f14=_0x1ab93c['filter'](_0x4140d0=>_0x4140d0[_0x20c230(0x11d)][_0x20c230(0x12a)]['trim']()===_0x221f9b);if(_0xc80f14[_0x20c230(0xf0)]===0x0)throw new SDKError(ErrorCode[_0x20c230(0x12c)],'Email\x20template\x20not\x20found:\x20'+_0x1e4d3c,undefined,{'helpText':'Use\x20\x22tdx\x20engage\x20template\x20list\x22\x20to\x20see\x20available\x20templates.'});if(_0xc80f14[_0x20c230(0xf0)]>0x1){const _0x3d107e=_0xc80f14[_0x20c230(0x121)](_0x26c4ee=>_0x26c4ee['id'])[_0x20c230(0xfe)](',\x20');throw new SDKError(ErrorCode[_0x20c230(0x105)],_0x20c230(0xec)+_0x1e4d3c+_0x20c230(0xe2)+_0x3d107e,undefined,{'helpText':_0x20c230(0x102)});}return{'id':_0xc80f14[0x0]['id'],'name':_0xc80f14[0x0]['attributes']['name']};}async['resolveWorkspaceId'](_0x49a4d8){const _0x15674f=a113_0x57da41;if(this[_0x15674f(0xdd)](_0x49a4d8))try{return await this['client'][_0x15674f(0xe1)](_0x49a4d8),_0x49a4d8;}catch(_0x1a8157){if(_0x1a8157 instanceof SDKError&&_0x1a8157['code']===ErrorCode[_0x15674f(0x12c)])throw new SDKError(ErrorCode[_0x15674f(0x12c)],'Workspace\x20not\x20found\x20with\x20ID:\x20'+_0x49a4d8,_0x1a8157,{'helpText':'Use\x20\x22tdx\x20engage\x20workspace\x20list\x22\x20to\x20see\x20available\x20workspaces.'});throw _0x1a8157;}const _0x301608=await this[_0x15674f(0x10d)][_0x15674f(0x129)]({'name':_0x49a4d8}),_0x3f4070=this[_0x15674f(0x10f)](_0x301608['data']),_0x26c600=_0x49a4d8['trim'](),_0xedac46=_0x3f4070[_0x15674f(0xdc)](_0x382f7d=>_0x382f7d[_0x15674f(0x11d)][_0x15674f(0x12a)][_0x15674f(0x111)]()===_0x26c600);if(_0xedac46[_0x15674f(0xf0)]===0x0)throw new SDKError(ErrorCode[_0x15674f(0x12c)],'Workspace\x20not\x20found:\x20'+_0x49a4d8,undefined,{'helpText':_0x15674f(0xe3)});if(_0xedac46[_0x15674f(0xf0)]>0x1){const _0x551be0=_0xedac46[_0x15674f(0x121)](_0x552194=>_0x552194['id'])[_0x15674f(0xfe)](',\x20');throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Multiple\x20workspaces\x20found\x20with\x20name\x20\x22'+_0x49a4d8+'\x22:\x20'+_0x551be0,undefined,{'helpText':'Use\x20the\x20workspace\x20UUID\x20directly\x20to\x20select\x20a\x20specific\x20workspace.'});}return _0xedac46[0x0]['id'];}async[a113_0x57da41(0xf4)](_0x311a1a){const _0x34507a=a113_0x57da41,_0x41fdfd=await paginate((_0x1be489,_0x19626e)=>this[_0x34507a(0x10d)][_0x34507a(0xf4)]({'campaignType':_0x311a1a?.[_0x34507a(0x12e)],'status':_0x311a1a?.[_0x34507a(0x10e)],'workspaceId':_0x311a1a?.[_0x34507a(0x11b)],'limit':_0x1be489,'offset':_0x19626e}),_0x311a1a?.['limit'],_0x311a1a?.[_0x34507a(0x13d)]);return _0x41fdfd['map'](_0x22bf7c=>this[_0x34507a(0x12b)](_0x22bf7c));}async[a113_0x57da41(0x131)](_0x35b08f,_0x388d46){const _0x5d5181=a113_0x57da41,_0x81a5a3=await this[_0x5d5181(0x134)](_0x35b08f,_0x388d46),_0x14dfd8=await this[_0x5d5181(0x10d)][_0x5d5181(0x131)](_0x81a5a3);return this['normalizeCampaign'](_0x14dfd8['data']);}async[a113_0x57da41(0x11e)](_0x299597,_0xbeb830){const _0x5b1179=a113_0x57da41,_0x1e3bda=await this['resolveCampaignId'](_0x299597,_0xbeb830),_0x15acd4=await this[_0x5b1179(0x10d)]['getCampaign'](_0x1e3bda);return _0x15acd4[_0x5b1179(0x136)];}async[a113_0x57da41(0x107)](_0x2a0cce){const _0xe94cca=a113_0x57da41,_0x22257=await this['client'][_0xe94cca(0x107)](_0x2a0cce);return this['normalizeCampaign'](_0x22257[_0xe94cca(0x136)]);}async[a113_0x57da41(0x13b)](_0x42c666,_0x52d924,_0x45272b){const _0x2b9353=a113_0x57da41,_0x5305af=await this[_0x2b9353(0x134)](_0x42c666,_0x45272b),_0x314295=await this[_0x2b9353(0x10d)][_0x2b9353(0x13b)](_0x5305af,_0x52d924);return this['normalizeCampaign'](_0x314295[_0x2b9353(0x136)]);}async[a113_0x57da41(0xf2)](_0x92870b,_0x2fada5){const _0xd9d891=a113_0x57da41,_0x36152a=await this[_0xd9d891(0x134)](_0x92870b,_0x2fada5);await this[_0xd9d891(0x10d)][_0xd9d891(0xf2)](_0x36152a);}async['launchCampaign'](_0x1fa80b,_0x37e32e){const _0x14457d=a113_0x57da41,_0x4b7abd=await this['resolveCampaignId'](_0x1fa80b,_0x37e32e);await this[_0x14457d(0x10d)]['launchCampaign'](_0x4b7abd);}async[a113_0x57da41(0x119)](_0x5e0c9e,_0x53440e){const _0x1607fb=await this['resolveCampaignId'](_0x5e0c9e,_0x53440e);await this['client']['pauseCampaign'](_0x1607fb);}async[a113_0x57da41(0x125)](_0xf655b3,_0x43e410){const _0x3853cf=a113_0x57da41,_0x1454dd=await this[_0x3853cf(0x134)](_0xf655b3,_0x43e410);await this[_0x3853cf(0x10d)][_0x3853cf(0x125)](_0x1454dd);}async[a113_0x57da41(0xe0)](_0x5da76a,_0x49b168){const _0x1521ed=a113_0x57da41,_0x4b3806=await this[_0x1521ed(0x134)](_0x5da76a,_0x49b168),_0x5b4f25=await this[_0x1521ed(0x10d)]['duplicateCampaign'](_0x4b3806);return this[_0x1521ed(0x12b)](_0x5b4f25[_0x1521ed(0x136)]);}async['listTemplates'](_0x325feb){const _0x26fd17=a113_0x57da41,_0x59503e=await paginate((_0x1638a2,_0x437e98)=>this[_0x26fd17(0x10d)][_0x26fd17(0xde)]({'workspaceId':_0x325feb?.[_0x26fd17(0x11b)],'limit':_0x1638a2,'offset':_0x437e98,'sort':_0x26fd17(0x130)}),_0x325feb?.[_0x26fd17(0xfa)],_0x325feb?.['offset']);return _0x59503e[_0x26fd17(0x121)](_0x264b41=>this[_0x26fd17(0x100)](_0x264b41));}async[a113_0x57da41(0x10b)](_0x2e0844,_0x55f1dc){const _0x587af4=a113_0x57da41,{id:_0x514859}=await this[_0x587af4(0x110)](_0x2e0844,_0x55f1dc),_0x130834=await this[_0x587af4(0x10d)][_0x587af4(0x10b)](_0x514859);return this[_0x587af4(0x100)](_0x130834['data']);}async[a113_0x57da41(0x112)](_0xedb078,_0x26306d){const _0x267ab3=a113_0x57da41,{id:_0x5e1a28}=await this[_0x267ab3(0x110)](_0xedb078,_0x26306d),_0x452e9d=await this[_0x267ab3(0x10d)][_0x267ab3(0x10b)](_0x5e1a28);return _0x452e9d[_0x267ab3(0x136)];}async['createTemplate'](_0x26b147){const _0x1c352c=a113_0x57da41,_0x13249e=await this[_0x1c352c(0x10d)][_0x1c352c(0x11f)](_0x26b147);return this[_0x1c352c(0x100)](_0x13249e[_0x1c352c(0x136)]);}async[a113_0x57da41(0x10c)](_0x19e890,_0x2c6451,_0x23eeb4){const _0x4be24e=a113_0x57da41,{id:_0x3b652f}=await this['resolveTemplateId'](_0x19e890,_0x23eeb4),_0x2f0f30=await this[_0x4be24e(0x10d)][_0x4be24e(0x10c)](_0x3b652f,_0x2c6451);return this[_0x4be24e(0x100)](_0x2f0f30['data']);}async[a113_0x57da41(0x103)](_0x2368a9,_0x3526e0){const _0x15ea4a=a113_0x57da41,{id:_0x3e293b}=await this[_0x15ea4a(0x110)](_0x2368a9,_0x3526e0);await this[_0x15ea4a(0x10d)][_0x15ea4a(0x103)](_0x3e293b);}async['listWorkspaces'](_0x5ba4b4){const _0x5b7653=a113_0x57da41,_0x48b6d4=await paginate((_0x30bfe3,_0xd80e33)=>this[_0x5b7653(0x10d)][_0x5b7653(0x129)]({'name':_0x5ba4b4?.['name'],'limit':_0x30bfe3,'offset':_0xd80e33}),_0x5ba4b4?.[_0x5b7653(0xfa)],_0x5ba4b4?.[_0x5b7653(0x13d)]);return _0x48b6d4[_0x5b7653(0x121)](_0x30803f=>this[_0x5b7653(0xf7)](_0x30803f));}async['getWorkspace'](_0x1d08e4){const _0x59fd82=a113_0x57da41,_0x4d3af4=await this['resolveWorkspaceId'](_0x1d08e4),_0xa7050=await this[_0x59fd82(0x10d)]['getWorkspace'](_0x4d3af4);return this['normalizeWorkspace'](_0xa7050[_0x59fd82(0x136)]);}async['getWorkspaceFull'](_0x614792){const _0x1cca0b=a113_0x57da41,_0x58ae66=await this['resolveWorkspaceId'](_0x614792),_0x21b624=await this[_0x1cca0b(0x10d)][_0x1cca0b(0xe1)](_0x58ae66);return _0x21b624[_0x1cca0b(0x136)];}async[a113_0x57da41(0xea)](_0x3bee5e){const _0x4493e0=a113_0x57da41,_0x4dccd7=await this[_0x4493e0(0x10d)][_0x4493e0(0xea)](_0x3bee5e);return this['normalizeWorkspace'](_0x4dccd7[_0x4493e0(0x136)]);}async[a113_0x57da41(0xe8)](_0x289a24,_0x1a91c6){const _0x2bfc9f=a113_0x57da41,_0x358def=await this[_0x2bfc9f(0xf8)](_0x289a24),_0x5f0853=await this[_0x2bfc9f(0x10d)][_0x2bfc9f(0xe8)](_0x358def,_0x1a91c6);return this[_0x2bfc9f(0xf7)](_0x5f0853[_0x2bfc9f(0x136)]);}async[a113_0x57da41(0x12f)](_0x9d5685){const _0xaddffb=a113_0x57da41,_0x8b2b4a=await this[_0xaddffb(0xf8)](_0x9d5685);await this['client'][_0xaddffb(0x12f)](_0x8b2b4a);}async[a113_0x57da41(0x135)](_0x5137cb){const _0x328233=a113_0x57da41;return paginate((_0x12863c,_0x5d490f)=>this['client'][_0x328233(0xfd)](_0x5137cb,{'limit':_0x12863c,'offset':_0x5d490f}));}['normalizeAlwaysOnCampaign'](_0x1872fa){const _0x2f3ce0=a113_0x57da41;return{'id':_0x1872fa['id'],'name':_0x1872fa[_0x2f3ce0(0x11d)][_0x2f3ce0(0x12a)],'campaignType':_0x1872fa[_0x2f3ce0(0x11d)][_0x2f3ce0(0x104)],'status':_0x1872fa[_0x2f3ce0(0x11d)][_0x2f3ce0(0x10e)],'description':_0x1872fa[_0x2f3ce0(0x11d)][_0x2f3ce0(0xee)],'workspaceId':_0x1872fa[_0x2f3ce0(0x11d)][_0x2f3ce0(0x11b)],'audienceId':_0x1872fa[_0x2f3ce0(0x11d)][_0x2f3ce0(0x133)],'audienceName':_0x1872fa[_0x2f3ce0(0x11d)][_0x2f3ce0(0x101)],'enableUtmTracking':_0x1872fa[_0x2f3ce0(0x11d)][_0x2f3ce0(0x11a)],'createdAt':_0x1872fa[_0x2f3ce0(0x11d)][_0x2f3ce0(0xe9)],'updatedAt':_0x1872fa[_0x2f3ce0(0x11d)][_0x2f3ce0(0x127)],'launchedAt':_0x1872fa[_0x2f3ce0(0x11d)]['launchedAt'],'pausedAt':_0x1872fa[_0x2f3ce0(0x11d)]['pausedAt'],'resumedAt':_0x1872fa['attributes'][_0x2f3ce0(0xe7)],'finishedAt':_0x1872fa[_0x2f3ce0(0x11d)][_0x2f3ce0(0x108)]};}async[a113_0x57da41(0x109)](_0x140a1e,_0x1dea22){const _0x53ebcd=a113_0x57da41;if(this[_0x53ebcd(0xdd)](_0x1dea22))try{return await this[_0x53ebcd(0x10d)][_0x53ebcd(0xe5)](_0x140a1e,_0x1dea22),_0x1dea22;}catch(_0x4d251b){if(_0x4d251b instanceof SDKError&&_0x4d251b['code']===ErrorCode[_0x53ebcd(0x12c)])throw new SDKError(ErrorCode[_0x53ebcd(0x12c)],'Always-on\x20campaign\x20not\x20found\x20with\x20ID:\x20'+_0x1dea22,_0x4d251b,{'helpText':_0x53ebcd(0x120)});throw _0x4d251b;}const _0x4aed40=await this['listAllAlwaysOnCampaigns'](_0x140a1e),_0x3027a5=_0x1dea22[_0x53ebcd(0x111)](),_0x4c60bf=_0x4aed40[_0x53ebcd(0xdc)](_0x25b13e=>_0x25b13e[_0x53ebcd(0x11d)][_0x53ebcd(0x12a)][_0x53ebcd(0x111)]()===_0x3027a5);if(_0x4c60bf['length']===0x0)throw new SDKError(ErrorCode[_0x53ebcd(0x12c)],'Always-on\x20campaign\x20not\x20found:\x20'+_0x1dea22,undefined,{'helpText':'Use\x20\x22tdx\x20engage\x20campaign\x20list\x20--type\x20always-on\x22\x20to\x20see\x20available\x20campaigns.'});if(_0x4c60bf[_0x53ebcd(0xf0)]>0x1){const _0x2d47e6=_0x4c60bf['map'](_0x15df1e=>_0x15df1e['id'])['join'](',\x20');throw new SDKError(ErrorCode[_0x53ebcd(0x105)],_0x53ebcd(0x116)+_0x1dea22+_0x53ebcd(0xe2)+_0x2d47e6,undefined,{'helpText':_0x53ebcd(0x123)});}return _0x4c60bf[0x0]['id'];}async[a113_0x57da41(0xfd)](_0x590df7){const _0x37eb39=a113_0x57da41,_0x233897=await paginate((_0x44926b,_0x187322)=>this[_0x37eb39(0x10d)][_0x37eb39(0xfd)](_0x590df7[_0x37eb39(0x11b)],{'campaignType':_0x590df7['type'],'status':_0x590df7[_0x37eb39(0x10e)],'limit':_0x44926b,'offset':_0x187322}),_0x590df7[_0x37eb39(0xfa)],_0x590df7[_0x37eb39(0x13d)]);return _0x233897[_0x37eb39(0x121)](_0x43489c=>this[_0x37eb39(0x13a)](_0x43489c));}async['getAlwaysOnCampaign'](_0x503853,_0x187eb3){const _0x1ab9d7=a113_0x57da41,_0x500844=await this[_0x1ab9d7(0x109)](_0x503853,_0x187eb3),_0x57b5ce=await this['client'][_0x1ab9d7(0xe5)](_0x503853,_0x500844);return this['normalizeAlwaysOnCampaign'](_0x57b5ce[_0x1ab9d7(0x136)]);}async['getAlwaysOnCampaignFull'](_0xdcf43f,_0x390f5c){const _0x1776bc=a113_0x57da41,_0x7dfc88=await this[_0x1776bc(0x109)](_0xdcf43f,_0x390f5c),_0x1a2635=await this[_0x1776bc(0x10d)]['getAlwaysOnCampaign'](_0xdcf43f,_0x7dfc88);return _0x1a2635[_0x1776bc(0x136)];}async[a113_0x57da41(0x114)](_0x272dcf,_0x3372bd){const _0x25afca=a113_0x57da41,_0x1426c0=await this[_0x25afca(0x10d)]['createAlwaysOnCampaign'](_0x272dcf,_0x3372bd);return this['normalizeAlwaysOnCampaign'](_0x1426c0[_0x25afca(0x136)]);}async['updateAlwaysOnCampaign'](_0x2180cc,_0x20536e,_0x12a6a){const _0x29463b=a113_0x57da41,_0x4e29a4=await this[_0x29463b(0x109)](_0x2180cc,_0x20536e),_0x3424b6=await this[_0x29463b(0x10d)]['updateAlwaysOnCampaign'](_0x2180cc,_0x4e29a4,_0x12a6a);return this['normalizeAlwaysOnCampaign'](_0x3424b6[_0x29463b(0x136)]);}async[a113_0x57da41(0x122)](_0x4bd69b,_0x5ddc62){const _0x18a3ad=a113_0x57da41,_0xa38ae6=await this['resolveAlwaysOnCampaignId'](_0x4bd69b,_0x5ddc62);await this[_0x18a3ad(0x10d)][_0x18a3ad(0x122)](_0x4bd69b,_0xa38ae6);}async['performAlwaysOnCampaignAction'](_0x321de3,_0x49e60f,_0x44df4f){const _0x3dfe84=a113_0x57da41,_0x4884e5=await this[_0x3dfe84(0x109)](_0x321de3,_0x49e60f);await _0x44df4f(_0x321de3,_0x4884e5);}async[a113_0x57da41(0xf6)](_0x1bcd84,_0xccba01){const _0x521b56=a113_0x57da41;await this[_0x521b56(0x138)](_0x1bcd84,_0xccba01,(_0xbf1475,_0x5c1bee)=>this['client'][_0x521b56(0xf6)](_0xbf1475,_0x5c1bee));}async['pauseAlwaysOnCampaign'](_0xe2a441,_0xc6a312){const _0x333b6e=a113_0x57da41;await this[_0x333b6e(0x138)](_0xe2a441,_0xc6a312,(_0x39fab4,_0x2fae55)=>this['client'][_0x333b6e(0x13c)](_0x39fab4,_0x2fae55));}async[a113_0x57da41(0xe6)](_0x19fc6c,_0x26cf62){const _0x254101=a113_0x57da41;await this['performAlwaysOnCampaignAction'](_0x19fc6c,_0x26cf62,(_0x268e44,_0x3b8ae4)=>this[_0x254101(0x10d)][_0x254101(0xe6)](_0x268e44,_0x3b8ae4));}async[a113_0x57da41(0x115)](_0x3e4644,_0x385b62){const _0x2272ca=a113_0x57da41;await this[_0x2272ca(0x138)](_0x3e4644,_0x385b62,(_0x85c710,_0x54e60f)=>this[_0x2272ca(0x10d)][_0x2272ca(0x115)](_0x85c710,_0x54e60f));}async[a113_0x57da41(0x113)](_0x5562a4,_0x14024c,_0x54db59){const _0x124a90=a113_0x57da41,_0x176141=await this[_0x124a90(0x109)](_0x5562a4,_0x14024c),_0xc13bd6=await this[_0x124a90(0x10d)][_0x124a90(0x113)](_0x5562a4,_0x176141,_0x54db59);return this[_0x124a90(0x13a)](_0xc13bd6[_0x124a90(0x136)]);}}
@@ -1 +1 @@
1
- const a114_0x581c23=a114_0x4be7;function a114_0x4be7(_0x3827c2,_0x4cbe41){_0x3827c2=_0x3827c2-0x10a;const _0x1df96c=a114_0x1df9();let _0x4be7bb=_0x1df96c[_0x3827c2];return _0x4be7bb;}(function(_0x57b120,_0x45cd0d){const _0x1c91d9=a114_0x4be7,_0x28b984=_0x57b120();while(!![]){try{const _0xb017d3=-parseInt(_0x1c91d9(0x12d))/0x1+parseInt(_0x1c91d9(0x115))/0x2+-parseInt(_0x1c91d9(0x128))/0x3+parseInt(_0x1c91d9(0x13c))/0x4*(parseInt(_0x1c91d9(0x14c))/0x5)+-parseInt(_0x1c91d9(0x155))/0x6*(-parseInt(_0x1c91d9(0x12b))/0x7)+-parseInt(_0x1c91d9(0x136))/0x8+parseInt(_0x1c91d9(0x11e))/0x9;if(_0xb017d3===_0x45cd0d)break;else _0x28b984['push'](_0x28b984['shift']());}catch(_0x17f431){_0x28b984['push'](_0x28b984['shift']());}}}(a114_0x1df9,0x50023));export var ErrorCategory;function a114_0x1df9(){const _0x18434a=['JOURNEY_NOT_FOUND','status','Unknown\x20error','PROXY_CONNECTION_FAILURE','UNAVAILABLE','TRINO_SYNTAX_ERROR','LLM_PROJECT_NOT_FOUND','1843809VXLgME','TRINO_USER_CANCELLED','HTTP\x20400','1127riYHmQ','DATABASE_NOT_FOUND','654184EOoMis','CONNECTION_NOT_FOUND','AGENT_EVALUATION_ERROR','TIMEOUT','isUserError','CONNECTOR_SCHEMA_NOT_FOUND','INVALID_PROFILE_CONFIG','USER_ERROR','stack','3198792pdrPtS','TRINO_INVALID_ARGUMENT','CLAUDE_CODE_NOT_FOUND','WORKFLOW_SECRET_NOT_FOUND','UNAUTHENTICATED','INVALID_REQUEST','8tPPQaM','SEGMENT_FOLDER_NOT_FOUND','MISSING_ARGUMENT','INSTALLATION_FAILED','Record\x20not\x20found','message','SEGMENT_SYNTAX_ERROR','includes','name','originalMessage','TRINO_INTERNAL_ERROR','helpText','category','JOURNEY_UPDATE_ERROR','INTERNAL','LLM_CHAT_CREATION_FAILURE','801835eiDmWH','HTTP_REQUEST_FAILURE','replace','RATE_LIMITED','CHAT_NOT_FOUND','INVALID_ARGUMENT','LLM_MALFORMED_MESSAGE','NOT_FOUND','JOURNEY_SYNTAX_ERROR','11460kPHVhe','code','ACTIVATION_UPDATE_ERROR','isRetryable','LLM_EMPTY_MESSAGE','CANCELLED','some','TRINO_INSUFFICIENT_RESOURCES','AGENT_SYNTAX_ERROR','CLAUDE_CODE_UNSUPPORTED_VERSION','\x0aCaused\x20by:\x20','WORKFLOW_ARCHIVE_CORRUPTED','TRINO_NOT_FOUND','isInternalError','ACTIVATION_SYNTAX_ERROR','cause','SEGMENT_NOT_FOUND','CONNECTOR_INVALID_CONFIG','ALREADY_EXISTS','461110sqIHDb','AGENT_NOT_FOUND','LLM_STREAM_ERROR','404','TABLE_NOT_FOUND','SEGMENT_UPDATE_ERROR','PERMISSION_DENIED','WORKFLOW_PROJECT_NOT_FOUND','COMMAND_NOT_FOUND','10237968iNNaox','AGENT_UPDATE_ERROR','INTERNAL_ERROR'];a114_0x1df9=function(){return _0x18434a;};return a114_0x1df9();}(function(_0x30dbd8){const _0x5cad32=a114_0x4be7;_0x30dbd8[_0x5cad32(0x134)]=_0x5cad32(0x134),_0x30dbd8[_0x5cad32(0x120)]='INTERNAL_ERROR';}(ErrorCategory||(ErrorCategory={})));export var ErrorCode;(function(_0x582c2f){const _0xef4d37=a114_0x4be7;_0x582c2f[_0xef4d37(0x13e)]=_0xef4d37(0x13e),_0x582c2f[_0xef4d37(0x151)]='INVALID_ARGUMENT',_0x582c2f[_0xef4d37(0x153)]='NOT_FOUND',_0x582c2f[_0xef4d37(0x12c)]=_0xef4d37(0x12c),_0x582c2f[_0xef4d37(0x119)]=_0xef4d37(0x119),_0x582c2f[_0xef4d37(0x127)]=_0xef4d37(0x127),_0x582c2f[_0xef4d37(0x116)]=_0xef4d37(0x116),_0x582c2f[_0xef4d37(0x11c)]=_0xef4d37(0x11c),_0x582c2f[_0xef4d37(0x139)]=_0xef4d37(0x139),_0x582c2f[_0xef4d37(0x10d)]=_0xef4d37(0x10d),_0x582c2f[_0xef4d37(0x150)]=_0xef4d37(0x150),_0x582c2f['CONNECTION_NOT_FOUND']=_0xef4d37(0x12e),_0x582c2f[_0xef4d37(0x112)]=_0xef4d37(0x112),_0x582c2f[_0xef4d37(0x13d)]='SEGMENT_FOLDER_NOT_FOUND',_0x582c2f['SEGMENT_SYNTAX_ERROR']=_0xef4d37(0x142),_0x582c2f[_0xef4d37(0x11a)]='SEGMENT_UPDATE_ERROR',_0x582c2f['ACTIVATION_SYNTAX_ERROR']='ACTIVATION_SYNTAX_ERROR',_0x582c2f[_0xef4d37(0x157)]=_0xef4d37(0x157),_0x582c2f[_0xef4d37(0x113)]=_0xef4d37(0x113),_0x582c2f[_0xef4d37(0x132)]='CONNECTOR_SCHEMA_NOT_FOUND',_0x582c2f[_0xef4d37(0x121)]=_0xef4d37(0x121),_0x582c2f[_0xef4d37(0x154)]=_0xef4d37(0x154),_0x582c2f[_0xef4d37(0x149)]=_0xef4d37(0x149),_0x582c2f['AGENT_SYNTAX_ERROR']=_0xef4d37(0x10a),_0x582c2f[_0xef4d37(0x11f)]=_0xef4d37(0x11f),_0x582c2f[_0xef4d37(0x12f)]=_0xef4d37(0x12f),_0x582c2f[_0xef4d37(0x159)]=_0xef4d37(0x159),_0x582c2f[_0xef4d37(0x11d)]=_0xef4d37(0x11d),_0x582c2f[_0xef4d37(0x138)]=_0xef4d37(0x138),_0x582c2f[_0xef4d37(0x10b)]=_0xef4d37(0x10b),_0x582c2f[_0xef4d37(0x13f)]=_0xef4d37(0x13f),_0x582c2f[_0xef4d37(0x11b)]=_0xef4d37(0x11b),_0x582c2f['UNAUTHENTICATED']=_0xef4d37(0x13a),_0x582c2f[_0xef4d37(0x114)]=_0xef4d37(0x114),_0x582c2f[_0xef4d37(0x15a)]=_0xef4d37(0x15a),_0x582c2f[_0xef4d37(0x13b)]=_0xef4d37(0x13b),_0x582c2f[_0xef4d37(0x133)]=_0xef4d37(0x133),_0x582c2f[_0xef4d37(0x126)]='TRINO_SYNTAX_ERROR',_0x582c2f[_0xef4d37(0x10e)]=_0xef4d37(0x10e),_0x582c2f[_0xef4d37(0x137)]=_0xef4d37(0x137),_0x582c2f[_0xef4d37(0x129)]=_0xef4d37(0x129),_0x582c2f[_0xef4d37(0x125)]=_0xef4d37(0x125),_0x582c2f[_0xef4d37(0x130)]=_0xef4d37(0x130),_0x582c2f[_0xef4d37(0x14d)]=_0xef4d37(0x14d),_0x582c2f[_0xef4d37(0x124)]=_0xef4d37(0x124),_0x582c2f[_0xef4d37(0x14a)]='INTERNAL',_0x582c2f['RATE_LIMITED']=_0xef4d37(0x14f),_0x582c2f[_0xef4d37(0x146)]=_0xef4d37(0x146),_0x582c2f['TRINO_INSUFFICIENT_RESOURCES']=_0xef4d37(0x15c),_0x582c2f['LLM_MALFORMED_MESSAGE']=_0xef4d37(0x152),_0x582c2f['LLM_STREAM_ERROR']=_0xef4d37(0x117),_0x582c2f[_0xef4d37(0x14b)]='LLM_CHAT_CREATION_FAILURE';}(ErrorCode||(ErrorCode={})));const ERROR_CODE_CATEGORY={[ErrorCode[a114_0x581c23(0x13e)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x151)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x581c23(0x153)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x12c)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x581c23(0x119)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x127)]]:ErrorCategory['USER_ERROR'],[ErrorCode['AGENT_NOT_FOUND']]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x581c23(0x11c)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode['WORKFLOW_SECRET_NOT_FOUND']]:ErrorCategory['USER_ERROR'],[ErrorCode['WORKFLOW_ARCHIVE_CORRUPTED']]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode['CHAT_NOT_FOUND']]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x12e)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x112)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x581c23(0x13d)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode['SEGMENT_SYNTAX_ERROR']]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x11a)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x581c23(0x110)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x157)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x113)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode['CONNECTOR_SCHEMA_NOT_FOUND']]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x121)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x154)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x581c23(0x149)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x10a)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x11f)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x12f)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a114_0x581c23(0x159)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode['COMMAND_NOT_FOUND']]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x581c23(0x138)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x10b)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x581c23(0x13f)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x581c23(0x11b)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x581c23(0x13a)]]:ErrorCategory['USER_ERROR'],[ErrorCode['ALREADY_EXISTS']]:ErrorCategory['USER_ERROR'],[ErrorCode['CANCELLED']]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x13b)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode[a114_0x581c23(0x133)]]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode['TRINO_SYNTAX_ERROR']]:ErrorCategory['USER_ERROR'],[ErrorCode['TRINO_NOT_FOUND']]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode['TRINO_INVALID_ARGUMENT']]:ErrorCategory['USER_ERROR'],[ErrorCode['TRINO_USER_CANCELLED']]:ErrorCategory[a114_0x581c23(0x134)],[ErrorCode['UNAVAILABLE']]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a114_0x581c23(0x130)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a114_0x581c23(0x14d)]]:ErrorCategory[a114_0x581c23(0x120)],[ErrorCode[a114_0x581c23(0x124)]]:ErrorCategory[a114_0x581c23(0x120)],[ErrorCode[a114_0x581c23(0x14a)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a114_0x581c23(0x14f)]]:ErrorCategory[a114_0x581c23(0x120)],[ErrorCode[a114_0x581c23(0x146)]]:ErrorCategory[a114_0x581c23(0x120)],[ErrorCode[a114_0x581c23(0x15c)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode['LLM_MALFORMED_MESSAGE']]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a114_0x581c23(0x117)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a114_0x581c23(0x14b)]]:ErrorCategory[a114_0x581c23(0x120)]};export function getErrorCategory(_0x5e8334){return ERROR_CODE_CATEGORY[_0x5e8334];}export function isRetryableError(_0x31d70f){return getErrorCategory(_0x31d70f)===ErrorCategory['INTERNAL_ERROR'];}export class SDKError extends Error{['code'];['helpText'];[a114_0x581c23(0x111)];constructor(_0x40a430,_0x3a705f,_0x5955b4,_0x29165a){const _0x381ae5=a114_0x581c23;super('['+_0x40a430+']\x20'+_0x3a705f),this[_0x381ae5(0x144)]='SDKError',this[_0x381ae5(0x156)]=_0x40a430,this[_0x381ae5(0x147)]=_0x29165a?.[_0x381ae5(0x147)],this['cause']=_0x5955b4,_0x5955b4 instanceof Error&&(this[_0x381ae5(0x135)]=this['stack']+_0x381ae5(0x10c)+_0x5955b4[_0x381ae5(0x135)]);}get[a114_0x581c23(0x148)](){const _0x16bb34=a114_0x581c23;return getErrorCategory(this[_0x16bb34(0x156)]);}[a114_0x581c23(0x158)](){const _0x1c95ca=a114_0x581c23;return isRetryableError(this[_0x1c95ca(0x156)]);}[a114_0x581c23(0x131)](){const _0x6734b6=a114_0x581c23;return this[_0x6734b6(0x148)]===ErrorCategory[_0x6734b6(0x134)];}[a114_0x581c23(0x10f)](){return this['category']===ErrorCategory['INTERNAL_ERROR'];}get['originalMessage'](){const _0xbbefe1=a114_0x581c23;return this[_0xbbefe1(0x141)][_0xbbefe1(0x14e)](/^\[.*?\]\s*/,'');}}export function isHttp400Error(_0xbd029){const _0x448e74=a114_0x581c23;if(!_0xbd029)return![];const _0x2dc54b=_0xbd029;if(_0x2dc54b[_0x448e74(0x122)]===0x190)return!![];const _0x1e721b=_0xbd029?.[_0x448e74(0x141)]||'';if(_0x1e721b[_0x448e74(0x143)](_0x448e74(0x12a)))return!![];const _0x311e43=_0xbd029;if(_0x311e43[_0x448e74(0x111)])return isHttp400Error(_0x311e43['cause']);return![];}export function isHttp404Error(_0x1297ee){const _0x3eb124=a114_0x581c23;if(!_0x1297ee)return![];const _0x56d5ab=_0x1297ee;if(_0x56d5ab[_0x3eb124(0x122)]===0x194)return!![];const _0xdcd659=_0x1297ee?.[_0x3eb124(0x141)]||'';if(_0xdcd659['includes'](_0x3eb124(0x118))||_0xdcd659[_0x3eb124(0x143)](_0x3eb124(0x140)))return!![];const _0x558c60=_0x1297ee;if(_0x558c60[_0x3eb124(0x111)])return isHttp404Error(_0x558c60[_0x3eb124(0x111)]);return![];}export function getErrorMessage(_0x3bca74){const _0x51c2f4=a114_0x581c23;if(!_0x3bca74)return _0x51c2f4(0x123);if(_0x3bca74 instanceof SDKError)return _0x3bca74[_0x51c2f4(0x145)];if(_0x3bca74 instanceof Error)return _0x3bca74[_0x51c2f4(0x141)][_0x51c2f4(0x14e)](/^\[.*?\]\s*/,'');return String(_0x3bca74);}export function errorContains(_0x4959f9,..._0xee5801){const _0x12e60b=a114_0x581c23,_0x52641b=_0x4959f9?.[_0x12e60b(0x141)]||'',_0x56cb88=_0x4959f9?.[_0x12e60b(0x111)],_0x50f761=_0x56cb88?.[_0x12e60b(0x141)]||'';return _0xee5801[_0x12e60b(0x15b)](_0x1d2fda=>_0x52641b[_0x12e60b(0x143)](_0x1d2fda)||_0x50f761['includes'](_0x1d2fda));}
1
+ const a114_0x6d8bce=a114_0x59e2;(function(_0x5c2f14,_0x3a3a84){const _0x30b4c3=a114_0x59e2,_0x55fa7f=_0x5c2f14();while(!![]){try{const _0x318675=-parseInt(_0x30b4c3(0x1be))/0x1*(parseInt(_0x30b4c3(0x1ab))/0x2)+parseInt(_0x30b4c3(0x1bc))/0x3*(parseInt(_0x30b4c3(0x1a3))/0x4)+-parseInt(_0x30b4c3(0x17f))/0x5*(parseInt(_0x30b4c3(0x184))/0x6)+parseInt(_0x30b4c3(0x196))/0x7+-parseInt(_0x30b4c3(0x1b4))/0x8+parseInt(_0x30b4c3(0x1a4))/0x9+parseInt(_0x30b4c3(0x1cc))/0xa;if(_0x318675===_0x3a3a84)break;else _0x55fa7f['push'](_0x55fa7f['shift']());}catch(_0x157228){_0x55fa7f['push'](_0x55fa7f['shift']());}}}(a114_0xdc96,0x37064));export var ErrorCategory;(function(_0x47f289){const _0x5da437=a114_0x59e2;_0x47f289[_0x5da437(0x1c3)]='USER_ERROR',_0x47f289[_0x5da437(0x1b1)]=_0x5da437(0x1b1);}(ErrorCategory||(ErrorCategory={})));export var ErrorCode;(function(_0x268a23){const _0x16aeec=a114_0x59e2;_0x268a23[_0x16aeec(0x1a2)]=_0x16aeec(0x1a2),_0x268a23['INVALID_ARGUMENT']=_0x16aeec(0x1ac),_0x268a23[_0x16aeec(0x1a7)]=_0x16aeec(0x1a7),_0x268a23[_0x16aeec(0x199)]='DATABASE_NOT_FOUND',_0x268a23['TABLE_NOT_FOUND']=_0x16aeec(0x187),_0x268a23[_0x16aeec(0x1b6)]=_0x16aeec(0x1b6),_0x268a23[_0x16aeec(0x1c0)]=_0x16aeec(0x1c0),_0x268a23[_0x16aeec(0x1b8)]='WORKFLOW_PROJECT_NOT_FOUND',_0x268a23[_0x16aeec(0x1ad)]=_0x16aeec(0x1ad),_0x268a23[_0x16aeec(0x194)]='WORKFLOW_ARCHIVE_CORRUPTED',_0x268a23[_0x16aeec(0x18a)]=_0x16aeec(0x18a),_0x268a23[_0x16aeec(0x1b2)]=_0x16aeec(0x1b2),_0x268a23[_0x16aeec(0x1c2)]=_0x16aeec(0x1c2),_0x268a23['SEGMENT_FOLDER_NOT_FOUND']='SEGMENT_FOLDER_NOT_FOUND',_0x268a23[_0x16aeec(0x1c4)]=_0x16aeec(0x1c4),_0x268a23[_0x16aeec(0x1aa)]=_0x16aeec(0x1aa),_0x268a23[_0x16aeec(0x1c6)]=_0x16aeec(0x1c6),_0x268a23[_0x16aeec(0x19a)]=_0x16aeec(0x19a),_0x268a23[_0x16aeec(0x198)]=_0x16aeec(0x198),_0x268a23['CONNECTOR_SCHEMA_NOT_FOUND']=_0x16aeec(0x17e),_0x268a23[_0x16aeec(0x1ca)]=_0x16aeec(0x1ca),_0x268a23[_0x16aeec(0x19d)]='JOURNEY_SYNTAX_ERROR',_0x268a23['JOURNEY_UPDATE_ERROR']='JOURNEY_UPDATE_ERROR',_0x268a23[_0x16aeec(0x1a1)]=_0x16aeec(0x1a1),_0x268a23['AGENT_UPDATE_ERROR']=_0x16aeec(0x1c7),_0x268a23[_0x16aeec(0x1c5)]='AGENT_EVALUATION_ERROR',_0x268a23[_0x16aeec(0x1b7)]=_0x16aeec(0x1b7),_0x268a23[_0x16aeec(0x1a6)]=_0x16aeec(0x1a6),_0x268a23[_0x16aeec(0x1b5)]=_0x16aeec(0x1b5),_0x268a23['CLAUDE_CODE_UNSUPPORTED_VERSION']='CLAUDE_CODE_UNSUPPORTED_VERSION',_0x268a23['INSTALLATION_FAILED']=_0x16aeec(0x191),_0x268a23[_0x16aeec(0x1c9)]=_0x16aeec(0x1c9),_0x268a23['UNAUTHENTICATED']=_0x16aeec(0x1cd),_0x268a23[_0x16aeec(0x188)]=_0x16aeec(0x188),_0x268a23[_0x16aeec(0x18f)]='CANCELLED',_0x268a23[_0x16aeec(0x1af)]=_0x16aeec(0x1af),_0x268a23[_0x16aeec(0x19b)]=_0x16aeec(0x19b),_0x268a23[_0x16aeec(0x1ae)]='TRINO_SYNTAX_ERROR',_0x268a23[_0x16aeec(0x183)]=_0x16aeec(0x183),_0x268a23[_0x16aeec(0x1a5)]=_0x16aeec(0x1a5),_0x268a23[_0x16aeec(0x1c8)]=_0x16aeec(0x1c8),_0x268a23[_0x16aeec(0x186)]='UNAVAILABLE',_0x268a23[_0x16aeec(0x182)]=_0x16aeec(0x182),_0x268a23[_0x16aeec(0x190)]=_0x16aeec(0x190),_0x268a23[_0x16aeec(0x1ce)]=_0x16aeec(0x1ce),_0x268a23[_0x16aeec(0x1a0)]=_0x16aeec(0x1a0),_0x268a23[_0x16aeec(0x1b3)]=_0x16aeec(0x1b3),_0x268a23[_0x16aeec(0x192)]='TRINO_INTERNAL_ERROR',_0x268a23[_0x16aeec(0x1b9)]=_0x16aeec(0x1b9),_0x268a23[_0x16aeec(0x1b0)]=_0x16aeec(0x1b0),_0x268a23[_0x16aeec(0x1cf)]=_0x16aeec(0x1cf),_0x268a23[_0x16aeec(0x185)]=_0x16aeec(0x185);}(ErrorCode||(ErrorCode={})));const ERROR_CODE_CATEGORY={[ErrorCode['MISSING_ARGUMENT']]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode['INVALID_ARGUMENT']]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x6d8bce(0x1a7)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x199)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x6d8bce(0x187)]]:ErrorCategory['USER_ERROR'],[ErrorCode['LLM_PROJECT_NOT_FOUND']]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode['AGENT_NOT_FOUND']]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode['WORKFLOW_PROJECT_NOT_FOUND']]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x6d8bce(0x1ad)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x194)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode['CHAT_NOT_FOUND']]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1b2)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1c2)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x19e)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1c4)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1aa)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1c6)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x19a)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x198)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x17e)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1ca)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode['JOURNEY_SYNTAX_ERROR']]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x18e)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1a1)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1c7)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1c5)]]:ErrorCategory[a114_0x6d8bce(0x1b1)],[ErrorCode[a114_0x6d8bce(0x1b7)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1a6)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1b5)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1bf)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x191)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x6d8bce(0x1c9)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1cd)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a114_0x6d8bce(0x188)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode['CANCELLED']]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1af)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x19b)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1ae)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x183)]]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x1a5)]]:ErrorCategory['USER_ERROR'],[ErrorCode['TRINO_USER_CANCELLED']]:ErrorCategory[a114_0x6d8bce(0x1c3)],[ErrorCode[a114_0x6d8bce(0x186)]]:ErrorCategory[a114_0x6d8bce(0x1b1)],[ErrorCode[a114_0x6d8bce(0x182)]]:ErrorCategory[a114_0x6d8bce(0x1b1)],[ErrorCode[a114_0x6d8bce(0x190)]]:ErrorCategory[a114_0x6d8bce(0x1b1)],[ErrorCode[a114_0x6d8bce(0x1ce)]]:ErrorCategory[a114_0x6d8bce(0x1b1)],[ErrorCode[a114_0x6d8bce(0x1a0)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a114_0x6d8bce(0x1b3)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a114_0x6d8bce(0x192)]]:ErrorCategory[a114_0x6d8bce(0x1b1)],[ErrorCode[a114_0x6d8bce(0x1b9)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a114_0x6d8bce(0x1b0)]]:ErrorCategory[a114_0x6d8bce(0x1b1)],[ErrorCode[a114_0x6d8bce(0x1cf)]]:ErrorCategory[a114_0x6d8bce(0x1b1)],[ErrorCode['LLM_CHAT_CREATION_FAILURE']]:ErrorCategory[a114_0x6d8bce(0x1b1)]};export function getErrorCategory(_0x122d36){return ERROR_CODE_CATEGORY[_0x122d36];}function a114_0xdc96(){const _0x2396cc=['12IBqtXx','LLM_CHAT_CREATION_FAILURE','UNAVAILABLE','TABLE_NOT_FOUND','ALREADY_EXISTS','isInternalError','CHAT_NOT_FOUND','originalMessage','helpText','status','JOURNEY_UPDATE_ERROR','CANCELLED','HTTP_REQUEST_FAILURE','INSTALLATION_FAILED','TRINO_INTERNAL_ERROR','SDKError','WORKFLOW_ARCHIVE_CORRUPTED','isRetryable','1486611UfSgjh','name','CONNECTOR_INVALID_CONFIG','DATABASE_NOT_FOUND','ACTIVATION_UPDATE_ERROR','INVALID_PROFILE_CONFIG','404','JOURNEY_SYNTAX_ERROR','SEGMENT_FOLDER_NOT_FOUND','cause','INTERNAL','AGENT_SYNTAX_ERROR','MISSING_ARGUMENT','36jpJMwX','441477FZlPPs','TRINO_INVALID_ARGUMENT','COMMAND_NOT_FOUND','NOT_FOUND','some','isUserError','SEGMENT_UPDATE_ERROR','6zjGVDa','INVALID_ARGUMENT','WORKFLOW_SECRET_NOT_FOUND','TRINO_SYNTAX_ERROR','INVALID_REQUEST','LLM_MALFORMED_MESSAGE','INTERNAL_ERROR','CONNECTION_NOT_FOUND','RATE_LIMITED','606976xAgGZa','CLAUDE_CODE_NOT_FOUND','LLM_PROJECT_NOT_FOUND','LLM_EMPTY_MESSAGE','WORKFLOW_PROJECT_NOT_FOUND','TRINO_INSUFFICIENT_RESOURCES','HTTP\x20400','stack','78186ZZoxTV','Unknown\x20error','61177thHCIW','CLAUDE_CODE_UNSUPPORTED_VERSION','AGENT_NOT_FOUND','includes','SEGMENT_NOT_FOUND','USER_ERROR','SEGMENT_SYNTAX_ERROR','AGENT_EVALUATION_ERROR','ACTIVATION_SYNTAX_ERROR','AGENT_UPDATE_ERROR','TRINO_USER_CANCELLED','PERMISSION_DENIED','JOURNEY_NOT_FOUND','category','231250xHLFPh','UNAUTHENTICATED','PROXY_CONNECTION_FAILURE','LLM_STREAM_ERROR','message','CONNECTOR_SCHEMA_NOT_FOUND','85815MoZGdZ','replace','code','TIMEOUT','TRINO_NOT_FOUND'];a114_0xdc96=function(){return _0x2396cc;};return a114_0xdc96();}export function isRetryableError(_0xdd30d){const _0x281668=a114_0x6d8bce;return getErrorCategory(_0xdd30d)===ErrorCategory[_0x281668(0x1b1)];}export class SDKError extends Error{['code'];[a114_0x6d8bce(0x18c)];[a114_0x6d8bce(0x19f)];constructor(_0x175484,_0x356056,_0xd7bb63,_0x404487){const _0x3dd115=a114_0x6d8bce;super('['+_0x175484+']\x20'+_0x356056),this[_0x3dd115(0x197)]=_0x3dd115(0x193),this['code']=_0x175484,this[_0x3dd115(0x18c)]=_0x404487?.['helpText'],this[_0x3dd115(0x19f)]=_0xd7bb63,_0xd7bb63 instanceof Error&&(this[_0x3dd115(0x1bb)]=this[_0x3dd115(0x1bb)]+'\x0aCaused\x20by:\x20'+_0xd7bb63['stack']);}get[a114_0x6d8bce(0x1cb)](){const _0x26dd97=a114_0x6d8bce;return getErrorCategory(this[_0x26dd97(0x181)]);}[a114_0x6d8bce(0x195)](){const _0x511f3e=a114_0x6d8bce;return isRetryableError(this[_0x511f3e(0x181)]);}[a114_0x6d8bce(0x1a9)](){const _0x3c4aeb=a114_0x6d8bce;return this[_0x3c4aeb(0x1cb)]===ErrorCategory[_0x3c4aeb(0x1c3)];}[a114_0x6d8bce(0x189)](){const _0x1d17af=a114_0x6d8bce;return this[_0x1d17af(0x1cb)]===ErrorCategory[_0x1d17af(0x1b1)];}get[a114_0x6d8bce(0x18b)](){const _0x5df46d=a114_0x6d8bce;return this['message'][_0x5df46d(0x180)](/^\[.*?\]\s*/,'');}}export function isHttp400Error(_0x369252){const _0x83a9b9=a114_0x6d8bce;if(!_0x369252)return![];const _0x1bc40d=_0x369252;if(_0x1bc40d[_0x83a9b9(0x18d)]===0x190)return!![];const _0x5f2fd0=_0x369252?.['message']||'';if(_0x5f2fd0[_0x83a9b9(0x1c1)](_0x83a9b9(0x1ba)))return!![];const _0x2dc62a=_0x369252;if(_0x2dc62a[_0x83a9b9(0x19f)])return isHttp400Error(_0x2dc62a['cause']);return![];}export function isHttp404Error(_0x4f564a){const _0x2e0fb7=a114_0x6d8bce;if(!_0x4f564a)return![];const _0x398716=_0x4f564a;if(_0x398716['status']===0x194)return!![];const _0x258c6c=_0x4f564a?.[_0x2e0fb7(0x1d0)]||'';if(_0x258c6c[_0x2e0fb7(0x1c1)](_0x2e0fb7(0x19c))||_0x258c6c[_0x2e0fb7(0x1c1)]('Record\x20not\x20found'))return!![];const _0x262488=_0x4f564a;if(_0x262488[_0x2e0fb7(0x19f)])return isHttp404Error(_0x262488[_0x2e0fb7(0x19f)]);return![];}export function getErrorMessage(_0x2022a4){const _0x9139c5=a114_0x6d8bce;if(!_0x2022a4)return _0x9139c5(0x1bd);if(_0x2022a4 instanceof SDKError)return _0x2022a4['originalMessage'];if(_0x2022a4 instanceof Error)return _0x2022a4[_0x9139c5(0x1d0)][_0x9139c5(0x180)](/^\[.*?\]\s*/,'');return String(_0x2022a4);}function a114_0x59e2(_0x27ea44,_0x1a6954){_0x27ea44=_0x27ea44-0x17e;const _0xdc96a5=a114_0xdc96();let _0x59e2a3=_0xdc96a5[_0x27ea44];return _0x59e2a3;}export function errorContains(_0x337cf4,..._0x346282){const _0x5a29d2=a114_0x6d8bce,_0x1b464a=_0x337cf4?.[_0x5a29d2(0x1d0)]||'',_0x2229a8=_0x337cf4?.[_0x5a29d2(0x19f)],_0x3c754b=_0x2229a8?.['message']||'';return _0x346282[_0x5a29d2(0x1a8)](_0x572f83=>_0x1b464a[_0x5a29d2(0x1c1)](_0x572f83)||_0x3c754b['includes'](_0x572f83));}
package/dist/sdk/index.js CHANGED
@@ -1 +1 @@
1
- const a115_0x5bbe10=a115_0x1ae5;(function(_0x5c017c,_0xeac0ab){const _0x3b35f1=a115_0x1ae5,_0x33953e=_0x5c017c();while(!![]){try{const _0x34c227=-parseInt(_0x3b35f1(0xd0))/0x1*(parseInt(_0x3b35f1(0xba))/0x2)+parseInt(_0x3b35f1(0xc1))/0x3*(-parseInt(_0x3b35f1(0xcf))/0x4)+parseInt(_0x3b35f1(0xca))/0x5*(-parseInt(_0x3b35f1(0xc9))/0x6)+-parseInt(_0x3b35f1(0xc8))/0x7+-parseInt(_0x3b35f1(0xb4))/0x8*(-parseInt(_0x3b35f1(0xcd))/0x9)+parseInt(_0x3b35f1(0xc3))/0xa*(parseInt(_0x3b35f1(0xb8))/0xb)+parseInt(_0x3b35f1(0xbd))/0xc;if(_0x34c227===_0xeac0ab)break;else _0x33953e['push'](_0x33953e['shift']());}catch(_0x3b2e3d){_0x33953e['push'](_0x33953e['shift']());}}}(a115_0x5d71,0x96b72));import{loadUserConfigOnce,getAPIKey,getAccessToken,loadGlobalProxy,resolveSite}from'../core/config.js';import{SegmentSDK}from'./segment.js';import{JourneySDK}from'./journey.js';import{WorkflowSDK}from'./workflow/index.js';import{LLMSDK}from'./llm/index.js';import{JobSDK}from'./job.js';import{UserSDK}from'./user.js';function a115_0x1ae5(_0x23b59e,_0x59edda){_0x23b59e=_0x23b59e-0xb1;const _0x5d71d4=a115_0x5d71();let _0x1ae505=_0x5d71d4[_0x23b59e];return _0x1ae505;}import{RawAPI}from'./api.js';import{QuerySDK}from'./query/index.js';import{EngageSDK}from'./engage.js';import{DeliverySDK}from'./delivery.js';import{ConnectionSDK}from'./connection.js';function a115_0x5d71(){const _0x3190bd=['3754177fdArru','119298NeaPQO','105nnMvcR','personalization','segment','2801583TGuHKq','accessToken','92kNpCOT','1ggnpAl','user','connection','proxy','query','schedules','engage','8HzwiZe','llm','delivery','profile','686444GEaZrz','api','1662086rJJrJY','site','catch','36191052NxFPgx','INFO','isInitialized','journey','136929jJozeT','_tdxInstance','20Cukjds','realtime','context','workflow','init'];a115_0x5d71=function(){return _0x3190bd;};return a115_0x5d71();}import{ScheduleSDK}from'./schedule.js';import{RealtimeSDK}from'./realtime.js';import{PersonalizationSDK}from'./personalization.js';import{Logger,LogLevel,FileHandler,DefaultLogFormatter}from'../utils/logger/index.js';export*from'./errors.js';export*from'./segment.js';export*from'./segment/parent-segment-preview.js';export*from'./journey.js';export*from'./workflow/index.js';export*from'./llm/index.js';export*from'./job.js';export*from'./user.js';export*from'./api.js';export*from'./query/index.js';export*from'./engage.js';export*from'./delivery.js';export*from'./connection.js';export*from'./schedule.js';export*from'./realtime.js';export*from'./personalization.js';export{Logger,LogLevel}from'../utils/logger/index.js';export{getLLMProxyEndpoint,getConsoleUrl,getEndpoint,LLM_PROXY_ENDPOINTS}from'./client/endpoints.js';export class TDX{[a115_0x5bbe10(0xc5)];['query'];['segment'];['journey'];[a115_0x5bbe10(0xc6)];[a115_0x5bbe10(0xb5)];['jobs'];['user'];[a115_0x5bbe10(0xb3)];[a115_0x5bbe10(0xb6)];[a115_0x5bbe10(0xd2)];['schedules'];['realtime'];[a115_0x5bbe10(0xcb)];[a115_0x5bbe10(0xb9)];static['create'](_0x529812={}){const _0x46a631=a115_0x5bbe10,_0x29fcf0=resolveSite(_0x529812[_0x46a631(0xbb)]||'us01'),_0x48978e=_0x529812['logLevel']??LogLevel[_0x46a631(0xbe)],_0x4074d1=_0x529812[_0x46a631(0xb7)];let _0x4c780d=_0x529812[_0x46a631(0xce)];!_0x4c780d&&(_0x4c780d=getAccessToken(_0x4074d1));let _0x20db4d=_0x529812['apiKey'];!_0x20db4d&&(loadUserConfigOnce(),_0x20db4d=getAPIKey(_0x4074d1));let _0x4ca9fa=_0x529812[_0x46a631(0xd3)];return!_0x4ca9fa&&(_0x4ca9fa=loadGlobalProxy()||process.env.HTTPS_PROXY||process.env.HTTP_PROXY),!Logger[_0x46a631(0xbf)]()&&Logger[_0x46a631(0xc7)]({'defaultLevel':_0x48978e,'handlers':[new FileHandler()],'formatter':new DefaultLogFormatter({'colors':!![]})})[_0x46a631(0xbc)](()=>{}),new TDX({'site':_0x29fcf0,'apiKey':_0x20db4d,'accessToken':_0x4c780d,'logLevel':_0x48978e,'profile':_0x4074d1,'proxy':_0x4ca9fa});}constructor(_0xea5169){const _0x2d94e0=a115_0x5bbe10;this[_0x2d94e0(0xc5)]=_0xea5169,this[_0x2d94e0(0xb1)]=new QuerySDK(_0xea5169),this['segment']=new SegmentSDK(_0xea5169),this[_0x2d94e0(0xc0)]=new JourneySDK(_0xea5169),this['workflow']=new WorkflowSDK(_0xea5169),this[_0x2d94e0(0xb5)]=new LLMSDK(_0xea5169),this['jobs']=new JobSDK(_0xea5169),this[_0x2d94e0(0xd1)]=new UserSDK(_0xea5169),this[_0x2d94e0(0xb3)]=new EngageSDK(_0xea5169),this[_0x2d94e0(0xb6)]=new DeliverySDK(_0xea5169),this[_0x2d94e0(0xd2)]=new ConnectionSDK(_0xea5169),this[_0x2d94e0(0xb2)]=new ScheduleSDK(_0xea5169),this[_0x2d94e0(0xc4)]=new RealtimeSDK(_0xea5169),this['personalization']=new PersonalizationSDK(_0xea5169),this[_0x2d94e0(0xb9)]=new RawAPI(_0xea5169),this[_0x2d94e0(0xcc)][_0x2d94e0(0xc2)]=this;}}
1
+ const a115_0x3b20b1=a115_0x99bb;(function(_0x4fcaca,_0x29d8f7){const _0x5dafcf=a115_0x99bb,_0x5796f3=_0x4fcaca();while(!![]){try{const _0x39f3e7=parseInt(_0x5dafcf(0x8a))/0x1+-parseInt(_0x5dafcf(0x75))/0x2*(parseInt(_0x5dafcf(0x8e))/0x3)+-parseInt(_0x5dafcf(0x7c))/0x4*(parseInt(_0x5dafcf(0x89))/0x5)+parseInt(_0x5dafcf(0x85))/0x6+-parseInt(_0x5dafcf(0x73))/0x7*(parseInt(_0x5dafcf(0x84))/0x8)+-parseInt(_0x5dafcf(0x7f))/0x9*(parseInt(_0x5dafcf(0x7a))/0xa)+-parseInt(_0x5dafcf(0x78))/0xb*(-parseInt(_0x5dafcf(0x82))/0xc);if(_0x39f3e7===_0x29d8f7)break;else _0x5796f3['push'](_0x5796f3['shift']());}catch(_0x5c916f){_0x5796f3['push'](_0x5796f3['shift']());}}}(a115_0x3e8b,0x74774));import{loadUserConfigOnce,getAPIKey,getAccessToken,loadGlobalProxy,resolveSite}from'../core/config.js';import{SegmentSDK}from'./segment.js';import{JourneySDK}from'./journey.js';import{WorkflowSDK}from'./workflow/index.js';function a115_0x99bb(_0x528380,_0x22ad7d){_0x528380=_0x528380-0x72;const _0x3e8bbf=a115_0x3e8b();let _0x99bbec=_0x3e8bbf[_0x528380];return _0x99bbec;}import{LLMSDK}from'./llm/index.js';import{JobSDK}from'./job.js';import{UserSDK}from'./user.js';import{RawAPI}from'./api.js';import{QuerySDK}from'./query/index.js';import{EngageSDK}from'./engage.js';import{DeliverySDK}from'./delivery.js';import{ConnectionSDK}from'./connection.js';import{ScheduleSDK}from'./schedule.js';import{RealtimeSDK}from'./realtime.js';import{PersonalizationSDK}from'./personalization.js';import{Logger,LogLevel,FileHandler,DefaultLogFormatter}from'../utils/logger/index.js';export*from'./errors.js';export*from'./segment.js';export*from'./segment/parent-segment-preview.js';export*from'./journey.js';export*from'./workflow/index.js';export*from'./llm/index.js';export*from'./job.js';export*from'./user.js';export*from'./api.js';export*from'./query/index.js';export*from'./engage.js';export*from'./delivery.js';export*from'./connection.js';export*from'./schedule.js';function a115_0x3e8b(){const _0x83d8e8=['context','1163485IRFGAM','674990mSLnqT','connection','us01','_tdxInstance','618tMYyhb','create','apiKey','INFO','profile','llm','workflow','user','4235189hYthsy','schedules','9254MLuOic','query','delivery','77NEmkaH','segment','216770paRLiU','accessToken','4rIGeTS','realtime','personalization','81pcCGvA','jobs','journey','2953824dpygfA','api','8XOTWdq','389814ophoTU','catch','engage'];a115_0x3e8b=function(){return _0x83d8e8;};return a115_0x3e8b();}export*from'./realtime.js';export*from'./personalization.js';export{Logger,LogLevel}from'../utils/logger/index.js';export{getLLMProxyEndpoint,getConsoleUrl,getEndpoint,LLM_PROXY_ENDPOINTS}from'./client/endpoints.js';export class TDX{['context'];[a115_0x3b20b1(0x76)];['segment'];[a115_0x3b20b1(0x81)];['workflow'];[a115_0x3b20b1(0x93)];[a115_0x3b20b1(0x80)];[a115_0x3b20b1(0x72)];[a115_0x3b20b1(0x87)];[a115_0x3b20b1(0x77)];[a115_0x3b20b1(0x8b)];[a115_0x3b20b1(0x74)];[a115_0x3b20b1(0x7d)];[a115_0x3b20b1(0x7e)];[a115_0x3b20b1(0x83)];static[a115_0x3b20b1(0x8f)](_0x47b9af={}){const _0x39e8e2=a115_0x3b20b1,_0x3faf46=resolveSite(_0x47b9af['site']||_0x39e8e2(0x8c)),_0x46ca1b=_0x47b9af['logLevel']??LogLevel[_0x39e8e2(0x91)],_0x153241=_0x47b9af[_0x39e8e2(0x92)];let _0x3dd225=_0x47b9af[_0x39e8e2(0x7b)];!_0x3dd225&&(_0x3dd225=getAccessToken(_0x153241));let _0x2c9b99=_0x47b9af[_0x39e8e2(0x90)];!_0x2c9b99&&(loadUserConfigOnce(),_0x2c9b99=getAPIKey(_0x153241));let _0x12e01c=_0x47b9af['proxy'];return!_0x12e01c&&(_0x12e01c=loadGlobalProxy()||process.env.HTTPS_PROXY||process.env.HTTP_PROXY),!Logger['isInitialized']()&&Logger['init']({'defaultLevel':_0x46ca1b,'handlers':[new FileHandler()],'formatter':new DefaultLogFormatter({'colors':!![]})})[_0x39e8e2(0x86)](()=>{}),new TDX({'site':_0x3faf46,'apiKey':_0x2c9b99,'accessToken':_0x3dd225,'logLevel':_0x46ca1b,'profile':_0x153241,'proxy':_0x12e01c});}constructor(_0x1a1267){const _0x1d4ca0=a115_0x3b20b1;this[_0x1d4ca0(0x88)]=_0x1a1267,this[_0x1d4ca0(0x76)]=new QuerySDK(_0x1a1267),this[_0x1d4ca0(0x79)]=new SegmentSDK(_0x1a1267),this[_0x1d4ca0(0x81)]=new JourneySDK(_0x1a1267),this[_0x1d4ca0(0x94)]=new WorkflowSDK(_0x1a1267),this[_0x1d4ca0(0x93)]=new LLMSDK(_0x1a1267),this[_0x1d4ca0(0x80)]=new JobSDK(_0x1a1267),this[_0x1d4ca0(0x72)]=new UserSDK(_0x1a1267),this[_0x1d4ca0(0x87)]=new EngageSDK(_0x1a1267),this[_0x1d4ca0(0x77)]=new DeliverySDK(_0x1a1267),this[_0x1d4ca0(0x8b)]=new ConnectionSDK(_0x1a1267),this[_0x1d4ca0(0x74)]=new ScheduleSDK(_0x1a1267),this[_0x1d4ca0(0x7d)]=new RealtimeSDK(_0x1a1267),this['personalization']=new PersonalizationSDK(_0x1a1267),this[_0x1d4ca0(0x83)]=new RawAPI(_0x1a1267),this[_0x1d4ca0(0x79)][_0x1d4ca0(0x8d)]=this;}}
@@ -1 +1 @@
1
- function a116_0x443c(){var _0x10cd64=['109BANBjC','1622336xEZysQ','10SdDkFw','10328RAWfOs','76ElrZIH','605352ZJjPUJ','255230jcvioG','2969343eIddzr','3740352FPltzi','6100659vBhRjc'];a116_0x443c=function(){return _0x10cd64;};return a116_0x443c();}function a116_0x480d(_0x563624,_0x5e017c){_0x563624=_0x563624-0xc6;var _0x443c30=a116_0x443c();var _0x480d03=_0x443c30[_0x563624];return _0x480d03;}(function(_0xa4c4e4,_0xc9f748){var _0x5bb1a0=a116_0x480d,_0x525b08=_0xa4c4e4();while(!![]){try{var _0x2f5f3c=parseInt(_0x5bb1a0(0xc8))/0x1*(parseInt(_0x5bb1a0(0xcb))/0x2)+-parseInt(_0x5bb1a0(0xcf))/0x3+-parseInt(_0x5bb1a0(0xcc))/0x4*(-parseInt(_0x5bb1a0(0xce))/0x5)+-parseInt(_0x5bb1a0(0xcd))/0x6+parseInt(_0x5bb1a0(0xc6))/0x7+parseInt(_0x5bb1a0(0xc9))/0x8+parseInt(_0x5bb1a0(0xc7))/0x9*(-parseInt(_0x5bb1a0(0xca))/0xa);if(_0x2f5f3c===_0xc9f748)break;else _0x525b08['push'](_0x525b08['shift']());}catch(_0x202d49){_0x525b08['push'](_0x525b08['shift']());}}}(a116_0x443c,0x7a66a));export{nodeFileSystem,nodeFileSystemSync}from'./node-filesystem.js';
1
+ function a116_0x4f58(){var _0x3dc4e9=['688ppiJLz','4599jnNIfq','1769176mfZWIf','1201872jTWuvu','3eMANNS','12878syPQoh','8125007WJBlLT','3802130RDXbTs','95599mREBTt','270xMQENW','5YaGtdH'];a116_0x4f58=function(){return _0x3dc4e9;};return a116_0x4f58();}(function(_0x32e483,_0x41d4e4){var _0x36f14f=a116_0x2941,_0x43f427=_0x32e483();while(!![]){try{var _0x4e38a2=-parseInt(_0x36f14f(0xe8))/0x1*(-parseInt(_0x36f14f(0xe9))/0x2)+parseInt(_0x36f14f(0xe7))/0x3+-parseInt(_0x36f14f(0xe6))/0x4*(-parseInt(_0x36f14f(0xe3))/0x5)+-parseInt(_0x36f14f(0xe2))/0x6*(-parseInt(_0x36f14f(0xe1))/0x7)+parseInt(_0x36f14f(0xe4))/0x8*(-parseInt(_0x36f14f(0xe5))/0x9)+-parseInt(_0x36f14f(0xe0))/0xa+-parseInt(_0x36f14f(0xdf))/0xb;if(_0x4e38a2===_0x41d4e4)break;else _0x43f427['push'](_0x43f427['shift']());}catch(_0x3cd65c){_0x43f427['push'](_0x43f427['shift']());}}}(a116_0x4f58,0x4ca94));function a116_0x2941(_0x16fa4b,_0x25a14b){_0x16fa4b=_0x16fa4b-0xdf;var _0x4f5823=a116_0x4f58();var _0x2941c4=_0x4f5823[_0x16fa4b];return _0x2941c4;}export{nodeFileSystem,nodeFileSystemSync}from'./node-filesystem.js';
@@ -1 +1 @@
1
- const a117_0x369cbe=a117_0x55cf;(function(_0x42bfc7,_0x5b3148){const _0x1af004=a117_0x55cf,_0x284faa=_0x42bfc7();while(!![]){try{const _0x4f97cd=-parseInt(_0x1af004(0xe1))/0x1+parseInt(_0x1af004(0xdc))/0x2*(parseInt(_0x1af004(0xdd))/0x3)+parseInt(_0x1af004(0xe0))/0x4*(parseInt(_0x1af004(0xdf))/0x5)+-parseInt(_0x1af004(0xd6))/0x6+parseInt(_0x1af004(0xe5))/0x7*(-parseInt(_0x1af004(0xde))/0x8)+-parseInt(_0x1af004(0xdb))/0x9*(-parseInt(_0x1af004(0xd9))/0xa)+-parseInt(_0x1af004(0xd3))/0xb*(-parseInt(_0x1af004(0xe4))/0xc);if(_0x4f97cd===_0x5b3148)break;else _0x284faa['push'](_0x284faa['shift']());}catch(_0x5d0d77){_0x284faa['push'](_0x284faa['shift']());}}}(a117_0xf8bb,0x47ccb));import*as a117_0x9ad7cc from'node:fs';function a117_0x55cf(_0x2f7a72,_0x1ed3d1){_0x2f7a72=_0x2f7a72-0xcf;const _0xf8bbf4=a117_0xf8bb();let _0x55cf20=_0xf8bbf4[_0x2f7a72];return _0x55cf20;}import*as a117_0x1eb945 from'node:fs/promises';function a117_0xf8bb(){const _0x174111=['mkdir','2399970TsFcZp','readFile','utf-8','10BLAmsp','isDirectory','4933809IONpSC','2318vXYpiT','1317aeAIBk','114952AdqqIu','1021065TLAxRO','4leLcCZ','584684BTkaCn','unlinkSync','readFileSync','7968xeoPSq','203gTLfoP','writeFile','writeFileSync','existsSync','isFile','unlink','mkdirSync','7194JDezxy','readdirSync'];a117_0xf8bb=function(){return _0x174111;};return a117_0xf8bb();}export const nodeFileSystem={'readFile':_0x116dcf=>a117_0x1eb945[a117_0x369cbe(0xd7)](_0x116dcf,a117_0x369cbe(0xd8)),'writeFile':(_0x531826,_0x4be942)=>a117_0x1eb945[a117_0x369cbe(0xe6)](_0x531826,_0x4be942,a117_0x369cbe(0xd8)),'exists':async _0x48f239=>{try{return await a117_0x1eb945['access'](_0x48f239),!![];}catch{return![];}},'mkdir':async(_0x4ba918,_0x1b84e9)=>{const _0x131b5e=a117_0x369cbe;await a117_0x1eb945[_0x131b5e(0xd5)](_0x4ba918,_0x1b84e9);},'readdir':_0x2de977=>a117_0x1eb945['readdir'](_0x2de977),'stat':async _0x33fdde=>{const _0x53c468=a117_0x369cbe,_0x3dcb63=await a117_0x1eb945['stat'](_0x33fdde);return{'isDirectory':()=>_0x3dcb63['isDirectory'](),'isFile':()=>_0x3dcb63[_0x53c468(0xd0)]()};},'unlink':_0x132ec7=>a117_0x1eb945[a117_0x369cbe(0xd1)](_0x132ec7)};export const nodeFileSystemSync={'readFileSync':_0x20a22e=>a117_0x9ad7cc[a117_0x369cbe(0xe3)](_0x20a22e,'utf-8'),'writeFileSync':(_0x442a2a,_0x424b13)=>a117_0x9ad7cc[a117_0x369cbe(0xe7)](_0x442a2a,_0x424b13,'utf-8'),'existsSync':_0x59f14a=>a117_0x9ad7cc[a117_0x369cbe(0xcf)](_0x59f14a),'mkdirSync':(_0x41b8eb,_0x4bc0c7)=>{const _0x888704=a117_0x369cbe;a117_0x9ad7cc[_0x888704(0xd2)](_0x41b8eb,_0x4bc0c7);},'readdirSync':_0x2868e2=>a117_0x9ad7cc[a117_0x369cbe(0xd4)](_0x2868e2),'statSync':_0x14c18c=>{const _0x1b20df=a117_0x369cbe,_0x2d9654=a117_0x9ad7cc['statSync'](_0x14c18c);return{'isDirectory':()=>_0x2d9654[_0x1b20df(0xda)](),'isFile':()=>_0x2d9654[_0x1b20df(0xd0)]()};},'unlinkSync':_0x2b536d=>a117_0x9ad7cc[a117_0x369cbe(0xe2)](_0x2b536d)};
1
+ function a117_0x2cbd(_0x38c345,_0x8aa0b8){_0x38c345=_0x38c345-0xfd;const _0x203c87=a117_0x203c();let _0x2cbd7d=_0x203c87[_0x38c345];return _0x2cbd7d;}const a117_0x1ebc37=a117_0x2cbd;(function(_0x68f782,_0x5c8902){const _0x49de8b=a117_0x2cbd,_0x57f8d6=_0x68f782();while(!![]){try{const _0x4f72df=-parseInt(_0x49de8b(0x102))/0x1+-parseInt(_0x49de8b(0x10c))/0x2+parseInt(_0x49de8b(0x10a))/0x3*(parseInt(_0x49de8b(0x113))/0x4)+parseInt(_0x49de8b(0x10f))/0x5*(-parseInt(_0x49de8b(0x112))/0x6)+parseInt(_0x49de8b(0xff))/0x7*(parseInt(_0x49de8b(0x109))/0x8)+parseInt(_0x49de8b(0x103))/0x9*(-parseInt(_0x49de8b(0x107))/0xa)+parseInt(_0x49de8b(0x10b))/0xb*(parseInt(_0x49de8b(0x111))/0xc);if(_0x4f72df===_0x5c8902)break;else _0x57f8d6['push'](_0x57f8d6['shift']());}catch(_0x448280){_0x57f8d6['push'](_0x57f8d6['shift']());}}}(a117_0x203c,0x303df));function a117_0x203c(){const _0x5530fe=['5EfSNPN','mkdir','12jdWYAG','1741326pQcNvk','58092DZjHev','writeFile','unlinkSync','stat','3633ouVeut','statSync','isDirectory','40555sCqzUn','81xqUqqr','readFileSync','readdir','access','28270yrLdGD','utf-8','6024ETKGdA','21yAIwJB','792781fpLEtR','21442KfZaGa','existsSync','isFile'];a117_0x203c=function(){return _0x5530fe;};return a117_0x203c();}import*as a117_0x33c695 from'node:fs';import*as a117_0x151273 from'node:fs/promises';export const nodeFileSystem={'readFile':_0x32fc1d=>a117_0x151273['readFile'](_0x32fc1d,a117_0x1ebc37(0x108)),'writeFile':(_0x3b1314,_0x39491f)=>a117_0x151273[a117_0x1ebc37(0x114)](_0x3b1314,_0x39491f,a117_0x1ebc37(0x108)),'exists':async _0x1c1286=>{const _0x4904c9=a117_0x1ebc37;try{return await a117_0x151273[_0x4904c9(0x106)](_0x1c1286),!![];}catch{return![];}},'mkdir':async(_0x4fea20,_0x5bd1fa)=>{const _0x5f5295=a117_0x1ebc37;await a117_0x151273[_0x5f5295(0x110)](_0x4fea20,_0x5bd1fa);},'readdir':_0x2db2fa=>a117_0x151273[a117_0x1ebc37(0x105)](_0x2db2fa),'stat':async _0x41055b=>{const _0x76dec2=a117_0x1ebc37,_0x3003ef=await a117_0x151273[_0x76dec2(0xfe)](_0x41055b);return{'isDirectory':()=>_0x3003ef[_0x76dec2(0x101)](),'isFile':()=>_0x3003ef[_0x76dec2(0x10e)]()};},'unlink':_0x46e890=>a117_0x151273['unlink'](_0x46e890)};export const nodeFileSystemSync={'readFileSync':_0x2a9056=>a117_0x33c695[a117_0x1ebc37(0x104)](_0x2a9056,a117_0x1ebc37(0x108)),'writeFileSync':(_0x5a39a3,_0x460a66)=>a117_0x33c695['writeFileSync'](_0x5a39a3,_0x460a66,a117_0x1ebc37(0x108)),'existsSync':_0x2771a8=>a117_0x33c695[a117_0x1ebc37(0x10d)](_0x2771a8),'mkdirSync':(_0x53ac45,_0x14a856)=>{a117_0x33c695['mkdirSync'](_0x53ac45,_0x14a856);},'readdirSync':_0x4beb7b=>a117_0x33c695['readdirSync'](_0x4beb7b),'statSync':_0x4c4d47=>{const _0x2fefd7=a117_0x1ebc37,_0x57a182=a117_0x33c695[_0x2fefd7(0x100)](_0x4c4d47);return{'isDirectory':()=>_0x57a182[_0x2fefd7(0x101)](),'isFile':()=>_0x57a182[_0x2fefd7(0x10e)]()};},'unlinkSync':_0x2a9e81=>a117_0x33c695[a117_0x1ebc37(0xfd)](_0x2a9e81)};
package/dist/sdk/job.js CHANGED
@@ -1 +1 @@
1
- const a119_0x197417=a119_0x18e2;(function(_0x19d8e9,_0x330bfb){const _0x5cd3f6=a119_0x18e2,_0x5b47c0=_0x19d8e9();while(!![]){try{const _0x57837d=-parseInt(_0x5cd3f6(0x87))/0x1+parseInt(_0x5cd3f6(0x89))/0x2+-parseInt(_0x5cd3f6(0x76))/0x3*(parseInt(_0x5cd3f6(0x8d))/0x4)+-parseInt(_0x5cd3f6(0x74))/0x5+-parseInt(_0x5cd3f6(0x8b))/0x6+parseInt(_0x5cd3f6(0x84))/0x7*(parseInt(_0x5cd3f6(0x79))/0x8)+parseInt(_0x5cd3f6(0x7f))/0x9;if(_0x57837d===_0x330bfb)break;else _0x5b47c0['push'](_0x5b47c0['shift']());}catch(_0x2fee84){_0x5b47c0['push'](_0x5b47c0['shift']());}}}(a119_0x333e,0x98f45));import{TDApiClient}from'./client/td-api-client.js';function normalizeTimestamp(_0x3943d4){const _0x52f11d=a119_0x18e2;if(!_0x3943d4)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x52f11d(0x85)](_0x3943d4))return _0x3943d4;return _0x3943d4['replace'](_0x52f11d(0x82),'Z')[_0x52f11d(0x77)]('\x20','T');}function a119_0x333e(){const _0x1426d5=['1815122jiIHyA','map','2631546SVBlOv','end_at','77676fASILd','result','5307865cmUMuH','listJobs','105Lmdrte','replace','submitPrestoJob','712eNKaaJ','show','client','getJobResult','hive','start_at','14118039HtokPo','trino','updated_at','\x20UTC','getUserInfo','90727NhAVYg','test','submitHiveJob','823431cfzarx','cancelJob'];a119_0x333e=function(){return _0x1426d5;};return a119_0x333e();}function a119_0x18e2(_0x41c752,_0x42ca68){_0x41c752=_0x41c752-0x73;const _0x333e7d=a119_0x333e();let _0x18e28c=_0x333e7d[_0x41c752];return _0x18e28c;}export class JobSDK{[a119_0x197417(0x7b)];constructor(_0x47f57f){const _0x193b8c=a119_0x197417;this[_0x193b8c(0x7b)]=new TDApiClient(_0x47f57f);}async['list'](_0x79cbb4){const _0x4f10d8=a119_0x197417,_0x2c5b83=await this['client'][_0x4f10d8(0x75)](_0x79cbb4);return _0x2c5b83[_0x4f10d8(0x8a)](_0x4e9e61=>({..._0x4e9e61,'created_at':normalizeTimestamp(_0x4e9e61['created_at']),'updated_at':normalizeTimestamp(_0x4e9e61[_0x4f10d8(0x81)]),'start_at':normalizeTimestamp(_0x4e9e61['start_at']),'end_at':normalizeTimestamp(_0x4e9e61['end_at'])}));}async[a119_0x197417(0x7a)](_0x463649){const _0x25afcd=a119_0x197417,_0x9f3b52=await this[_0x25afcd(0x7b)]['showJob'](_0x463649);return{..._0x9f3b52,'created_at':normalizeTimestamp(_0x9f3b52['created_at']),'updated_at':normalizeTimestamp(_0x9f3b52[_0x25afcd(0x81)]),'start_at':normalizeTimestamp(_0x9f3b52[_0x25afcd(0x7e)]),'end_at':normalizeTimestamp(_0x9f3b52[_0x25afcd(0x8c)])};}async['kill'](_0x1f2fe9){const _0x1d210f=a119_0x197417;await this[_0x1d210f(0x7b)][_0x1d210f(0x88)](_0x1f2fe9);}async['submit'](_0x50f63a,_0x338eb3,_0x246a7c=a119_0x197417(0x80),_0x2ef8bb){const _0x5b12ee=a119_0x197417;return _0x246a7c===_0x5b12ee(0x7d)?await this[_0x5b12ee(0x7b)][_0x5b12ee(0x86)](_0x50f63a,_0x338eb3,_0x2ef8bb):await this['client'][_0x5b12ee(0x78)](_0x50f63a,_0x338eb3,_0x2ef8bb);}async[a119_0x197417(0x73)](_0x3d4af8){const _0x1db0e0=a119_0x197417;return await this[_0x1db0e0(0x7b)][_0x1db0e0(0x7c)](_0x3d4af8);}async[a119_0x197417(0x83)](){const _0x1d60f3=a119_0x197417;return await this['client'][_0x1d60f3(0x83)]();}}
1
+ const a119_0x4e950d=a119_0x4045;function a119_0x4045(_0x31069e,_0x1e61ea){_0x31069e=_0x31069e-0x135;const _0x12d4d8=a119_0x12d4();let _0x4045a4=_0x12d4d8[_0x31069e];return _0x4045a4;}(function(_0x3f06d,_0xe4dbb){const _0x15a41b=a119_0x4045,_0xe978ab=_0x3f06d();while(!![]){try{const _0x1318dc=parseInt(_0x15a41b(0x143))/0x1*(-parseInt(_0x15a41b(0x135))/0x2)+-parseInt(_0x15a41b(0x14b))/0x3+parseInt(_0x15a41b(0x13f))/0x4+parseInt(_0x15a41b(0x151))/0x5*(-parseInt(_0x15a41b(0x139))/0x6)+parseInt(_0x15a41b(0x136))/0x7+-parseInt(_0x15a41b(0x149))/0x8+-parseInt(_0x15a41b(0x14f))/0x9*(-parseInt(_0x15a41b(0x138))/0xa);if(_0x1318dc===_0xe4dbb)break;else _0xe978ab['push'](_0xe978ab['shift']());}catch(_0x52a444){_0xe978ab['push'](_0xe978ab['shift']());}}}(a119_0x12d4,0x8cd57));function a119_0x12d4(){const _0x44cbb9=['getUserInfo','getJobResult','2844816wFnjsY','replace','\x20UTC','submitPrestoJob','301933isZyXo','result','show','map','trino','listJobs','28256KjQedA','created_at','742302SjrxWE','test','client','end_at','43371qfgNwV','hive','1863655FffNhj','2BZTdPs','850080NssTSm','start_at','1390sZhvRT','6CjFOLe','submitHiveJob','kill','updated_at'];a119_0x12d4=function(){return _0x44cbb9;};return a119_0x12d4();}import{TDApiClient}from'./client/td-api-client.js';function normalizeTimestamp(_0x222f8f){const _0x52c683=a119_0x4045;if(!_0x222f8f)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x52c683(0x14c)](_0x222f8f))return _0x222f8f;return _0x222f8f[_0x52c683(0x140)](_0x52c683(0x141),'Z')[_0x52c683(0x140)]('\x20','T');}export class JobSDK{[a119_0x4e950d(0x14d)];constructor(_0x5df86c){const _0x4401bd=a119_0x4e950d;this[_0x4401bd(0x14d)]=new TDApiClient(_0x5df86c);}async['list'](_0x32f548){const _0x4b643d=a119_0x4e950d,_0x3787b7=await this['client'][_0x4b643d(0x148)](_0x32f548);return _0x3787b7[_0x4b643d(0x146)](_0x2f7bb4=>({..._0x2f7bb4,'created_at':normalizeTimestamp(_0x2f7bb4[_0x4b643d(0x14a)]),'updated_at':normalizeTimestamp(_0x2f7bb4[_0x4b643d(0x13c)]),'start_at':normalizeTimestamp(_0x2f7bb4[_0x4b643d(0x137)]),'end_at':normalizeTimestamp(_0x2f7bb4[_0x4b643d(0x14e)])}));}async[a119_0x4e950d(0x145)](_0xfca7bd){const _0x35817d=a119_0x4e950d,_0x328f88=await this['client']['showJob'](_0xfca7bd);return{..._0x328f88,'created_at':normalizeTimestamp(_0x328f88[_0x35817d(0x14a)]),'updated_at':normalizeTimestamp(_0x328f88[_0x35817d(0x13c)]),'start_at':normalizeTimestamp(_0x328f88[_0x35817d(0x137)]),'end_at':normalizeTimestamp(_0x328f88['end_at'])};}async[a119_0x4e950d(0x13b)](_0x555536){const _0x3946da=a119_0x4e950d;await this[_0x3946da(0x14d)]['cancelJob'](_0x555536);}async['submit'](_0x53dff4,_0x4022cf,_0x1f18b7=a119_0x4e950d(0x147),_0x298789){const _0x2427de=a119_0x4e950d;return _0x1f18b7===_0x2427de(0x150)?await this['client'][_0x2427de(0x13a)](_0x53dff4,_0x4022cf,_0x298789):await this[_0x2427de(0x14d)][_0x2427de(0x142)](_0x53dff4,_0x4022cf,_0x298789);}async[a119_0x4e950d(0x144)](_0x3df5aa){const _0x4eebe2=a119_0x4e950d;return await this['client'][_0x4eebe2(0x13e)](_0x3df5aa);}async['getUserInfo'](){const _0x59bcce=a119_0x4e950d;return await this[_0x59bcce(0x14d)][_0x59bcce(0x13d)]();}}
@@ -1 +1 @@
1
- const a120_0xa3fbe1=a120_0x58bb;(function(_0x2a7c95,_0x368f0e){const _0x2c3642=a120_0x58bb,_0x2ab094=_0x2a7c95();while(!![]){try{const _0x4d3f33=-parseInt(_0x2c3642(0x180))/0x1+-parseInt(_0x2c3642(0x177))/0x2*(parseInt(_0x2c3642(0x151))/0x3)+parseInt(_0x2c3642(0x184))/0x4+parseInt(_0x2c3642(0x18e))/0x5+parseInt(_0x2c3642(0x199))/0x6+parseInt(_0x2c3642(0x152))/0x7+parseInt(_0x2c3642(0x13e))/0x8*(parseInt(_0x2c3642(0x16f))/0x9);if(_0x4d3f33===_0x368f0e)break;else _0x2ab094['push'](_0x2ab094['shift']());}catch(_0x309c97){_0x2ab094['push'](_0x2ab094['shift']());}}}(a120_0x1020,0xe7fa5));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x1c8de5){const _0x447403=a120_0x58bb;return _0x1c8de5[_0x447403(0x18f)]??_0x1c8de5[_0x447403(0x1ae)]?.[_0x447403(0x18f)]??undefined;}function getVersionNumber(_0x39fa9a){const _0x4d8b30=a120_0x58bb;return _0x39fa9a[_0x4d8b30(0x165)]??_0x39fa9a[_0x4d8b30(0x1ae)]?.[_0x4d8b30(0x165)]??0x0;}function getState(_0x100ee1){const _0x402770=a120_0x58bb;return _0x100ee1[_0x402770(0x17c)]??_0x100ee1['attributes']?.[_0x402770(0x17c)];}export function deduplicateJourneysByBundle(_0x2eba9e){const _0x1d711f=a120_0x58bb,_0x271370=new Map();let _0x182311=0x0;for(const _0x21dded of _0x2eba9e){const _0x1a4376=getBundleId(_0x21dded);if(!_0x1a4376){const _0x562ae9='no-bundle-'+(_0x21dded['id']??_0x1d711f(0x1a3)+_0x182311++);_0x271370[_0x1d711f(0x13d)](_0x562ae9,_0x21dded);continue;}const _0x2cf8c1=_0x271370[_0x1d711f(0x13c)](_0x1a4376);if(!_0x2cf8c1)_0x271370[_0x1d711f(0x13d)](_0x1a4376,_0x21dded);else{const _0x1cd262=getState(_0x2cf8c1)==='launched',_0x1be88b=getState(_0x21dded)===_0x1d711f(0x181);if(_0x1be88b&&!_0x1cd262)_0x271370[_0x1d711f(0x13d)](_0x1a4376,_0x21dded);else{if(!_0x1be88b&&_0x1cd262){}else{const _0x1f4128=getVersionNumber(_0x2cf8c1),_0x1c6dd9=getVersionNumber(_0x21dded);_0x1c6dd9>_0x1f4128&&_0x271370[_0x1d711f(0x13d)](_0x1a4376,_0x21dded);}}}}return Array[_0x1d711f(0x173)](_0x271370[_0x1d711f(0x164)]());}const VALID_JOURNEY_STATES=new Set(['draft',a120_0xa3fbe1(0x147),a120_0xa3fbe1(0x181)]);export function parseJourneyState(_0x22eadd){const _0x31bebd=a120_0xa3fbe1;if(typeof _0x22eadd===_0x31bebd(0x137)&&VALID_JOURNEY_STATES[_0x31bebd(0x185)](_0x22eadd))return _0x22eadd;return _0x31bebd(0x1a8);}export function entityToJourneyListItem(_0x40525e,_0x5cc0c0){const _0x1dc9ea=a120_0xa3fbe1,_0x5f175e=_0x40525e[_0x1dc9ea(0x1ae)];return{'id':_0x40525e['id'],'name':_0x5f175e[_0x1dc9ea(0x138)]??'','journeyBundleName':_0x5f175e['journeyBundleName']??_0x5f175e['name']??'','journeyBundleId':_0x5f175e['journeyBundleId']??'','versionNumber':_0x5f175e[_0x1dc9ea(0x165)],'description':_0x5f175e[_0x1dc9ea(0x1a6)]??null,'state':parseJourneyState(_0x5f175e[_0x1dc9ea(0x17c)]),'paused':_0x5f175e['paused']??![],'audienceId':_0x5cc0c0,'folderId':_0x5f175e['segmentFolderId']??_0x40525e['relationships']?.[_0x1dc9ea(0x172)]?.[_0x1dc9ea(0x162)]?.['id']??null,'createdAt':_0x5f175e[_0x1dc9ea(0x191)]??'','updatedAt':_0x5f175e[_0x1dc9ea(0x150)]??''};}function convertToColumnId(_0x299c5f){return _0x299c5f['replace'](/-/g,'_');}function getStepEntries(_0x3b74e8){const _0x2af0f6=a120_0xa3fbe1;if(!_0x3b74e8)return[];if(Array['isArray'](_0x3b74e8))return _0x3b74e8['map'](_0x1a92a5=>[_0x1a92a5['id'],_0x1a92a5]);return Object[_0x2af0f6(0x1ad)](_0x3b74e8);}export function flattenJourneyActivation(_0x570a65){const _0x1dd23d=a120_0xa3fbe1,{activationParams:_0x1d0ce1,activationId:_0x170563,runAfterJourneyRefresh:_0x546e7d}=_0x570a65[_0x1dd23d(0x1ae)];return{'id':_0x570a65['id'],'activationId':_0x170563,'runAfterJourneyRefresh':_0x546e7d,..._0x1d0ce1};}function col(_0x2e6efc,_0x48401e={}){const _0xf1e516=a120_0xa3fbe1;return{'column':_0x2e6efc,'direction':null,'stageIndex':null,'stageName':null,'category':_0xf1e516(0x14e),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x48401e};}export function generateColumnMapping(_0x4672a9){const _0x21b500=a120_0xa3fbe1,_0x10fa7d=[];_0x10fa7d['push'](col('cdp_customer_id')),_0x10fa7d[_0x21b500(0x170)](col('intime_journey',{'direction':'in','category':_0x21b500(0x143)})),_0x10fa7d[_0x21b500(0x170)](col(_0x21b500(0x158),{'direction':_0x21b500(0x153),'category':_0x21b500(0x143)}));_0x4672a9[_0x21b500(0x1ae)][_0x21b500(0x1ab)]&&_0x10fa7d[_0x21b500(0x170)](col(_0x21b500(0x15e),{'direction':'in','category':_0x21b500(0x1ab),'detail':_0x4672a9['attributes'][_0x21b500(0x1ab)][_0x21b500(0x138)]||null}));const _0xc663f=_0x4672a9[_0x21b500(0x1ae)]['journeyStages']||[];for(let _0x8a5a5=0x0;_0x8a5a5<_0xc663f[_0x21b500(0x1a9)];_0x8a5a5++){const _0x595bd7=_0xc663f[_0x8a5a5],_0xcc1e53=_0x595bd7[_0x21b500(0x138)],_0x4910ba={'stageIndex':_0x8a5a5,'stageName':_0xcc1e53},_0x22a003=_0x595bd7[_0x21b500(0x1b7)]?.[_0x21b500(0x138)]||null;_0x10fa7d[_0x21b500(0x170)](col(_0x21b500(0x1af)+_0x8a5a5,{..._0x4910ba,'direction':'in','category':_0x21b500(0x190),'detail':_0x22a003})),_0x10fa7d[_0x21b500(0x170)](col(_0x21b500(0x16a)+_0x8a5a5,{..._0x4910ba,'direction':'out','category':_0x21b500(0x190),'detail':_0x22a003}));_0x595bd7[_0x21b500(0x15c)]&&_0x10fa7d[_0x21b500(0x170)](col(_0x21b500(0x1af)+_0x8a5a5+'_milestone',{..._0x4910ba,'direction':'in','category':_0x21b500(0x15c),'detail':_0x595bd7[_0x21b500(0x15c)][_0x21b500(0x138)]||null}));const _0x16e3a1=_0x595bd7[_0x21b500(0x155)]||_0x595bd7[_0x21b500(0x1a2)]||[];for(let _0x499b1e=0x0;_0x499b1e<_0x16e3a1[_0x21b500(0x1a9)];_0x499b1e++){_0x10fa7d[_0x21b500(0x170)](col(_0x21b500(0x1af)+_0x8a5a5+_0x21b500(0x166)+_0x499b1e,{..._0x4910ba,'direction':'in','category':_0x21b500(0x193),'detail':_0x16e3a1[_0x499b1e][_0x21b500(0x138)]||null}));}const _0x406744=getStepEntries(_0x595bd7[_0x21b500(0x13f)]);for(const [_0x536f9c,_0x2202d2]of _0x406744){const _0x5e3184=convertToColumnId(_0x536f9c),_0x102bfb=_0x2202d2[_0x21b500(0x17d)]||null,_0x4071e9=_0x2202d2[_0x21b500(0x138)]||null,_0x5f3d03={..._0x4910ba,'stepType':_0x102bfb,'stepName':_0x4071e9,'stepId':_0x536f9c};_0x10fa7d['push'](col('intime_stage_'+_0x8a5a5+'_'+_0x5e3184,{..._0x5f3d03,'direction':'in','category':'step'})),_0x10fa7d['push'](col(_0x21b500(0x16a)+_0x8a5a5+'_'+_0x5e3184,{..._0x5f3d03,'direction':_0x21b500(0x153),'category':_0x21b500(0x14c)}));if(_0x2202d2[_0x21b500(0x17d)]===_0x21b500(0x19a)&&_0x2202d2[_0x21b500(0x19b)])for(const _0x26cbc2 of _0x2202d2[_0x21b500(0x19b)]){_0x26cbc2['segmentId']&&_0x10fa7d[_0x21b500(0x170)](col(_0x21b500(0x1af)+_0x8a5a5+'_'+_0x5e3184+'_'+_0x26cbc2[_0x21b500(0x183)],{..._0x5f3d03,'direction':'in','category':_0x21b500(0x14b),'detail':_0x26cbc2['name']||(_0x26cbc2[_0x21b500(0x194)]?_0x21b500(0x1b5):null)}));}if((_0x2202d2[_0x21b500(0x17d)]===_0x21b500(0x189)||_0x2202d2[_0x21b500(0x17d)]===_0x21b500(0x14f))&&_0x2202d2[_0x21b500(0x14d)])for(const _0x542346 of _0x2202d2[_0x21b500(0x14d)]){_0x542346['id']&&_0x10fa7d[_0x21b500(0x170)](col('intime_stage_'+_0x8a5a5+'_'+_0x5e3184+_0x21b500(0x1a7)+convertToColumnId(_0x542346['id']),{..._0x5f3d03,'direction':'in','category':_0x21b500(0x188),'detail':_0x542346['name']||null}));}if(_0x2202d2['type']===_0x21b500(0x182)||_0x2202d2[_0x21b500(0x17d)]==='Wait'){const _0x3eea88=[];if(_0x2202d2[_0x21b500(0x1b9)])_0x3eea88[_0x21b500(0x170)](_0x2202d2['conditionSegmentId']);else{if(Array[_0x21b500(0x154)](_0x2202d2[_0x21b500(0x17b)]))for(const _0x1e3c27 of _0x2202d2[_0x21b500(0x17b)]){_0x1e3c27[_0x21b500(0x183)]&&!_0x1e3c27[_0x21b500(0x14a)]&&_0x3eea88['push'](_0x1e3c27[_0x21b500(0x183)]);}else _0x2202d2[_0x21b500(0x142)]?.[_0x21b500(0x183)]&&_0x3eea88['push'](_0x2202d2[_0x21b500(0x142)]['segmentId']);}for(const _0x34b9a2 of _0x3eea88){_0x10fa7d[_0x21b500(0x170)](col(_0x21b500(0x1af)+_0x8a5a5+'_'+_0x5e3184+'_'+_0x34b9a2,{..._0x5f3d03,'direction':'in','category':_0x21b500(0x14b)}));}}}}return _0x10fa7d['push'](col(_0x21b500(0x15a))),_0x10fa7d;}export function aggregateJourneyHistory(_0x47c719){const _0x50171b=a120_0xa3fbe1,_0x570989=_0x47c719['reduce']((_0x4dd998,_0x577d44)=>_0x4dd998+(_0x577d44['entryInflux']??0x0),0x0),_0x5a0e7e=_0x47c719[_0x50171b(0x163)]((_0x51d7a3,_0x3624cd)=>_0x51d7a3+(_0x3624cd[_0x50171b(0x198)]??0x0),0x0),_0x224d05=_0x47c719[_0x50171b(0x163)]((_0x21f778,_0x2e46ef)=>_0x21f778+((_0x2e46ef[_0x50171b(0x1a4)]??0x0)+(_0x2e46ef[_0x50171b(0x13b)]??0x0)),0x0),_0x1e93fc=_0x47c719[_0x47c719[_0x50171b(0x1a9)]-0x1];return{'size':_0x1e93fc?.[_0x50171b(0x19f)]??0x0,'entered':_0x570989,'goal_achieved':_0x5a0e7e,'completion_rate':_0x5a0e7e&&_0x570989?_0x5a0e7e/_0x570989*0x64:0x0,'exit_or_jump':_0x224d05,'exit_or_jump_rate':_0x224d05&&_0x570989?_0x224d05/_0x570989*0x64:0x0};}function a120_0x1020(){const _0x450614=['fetchTrafficRaw','journeys','simulation','getActivation','folder-segment','timedOutPath','branch','step','variants','fixed','ABTest','updatedAt','148206Pvlhhc','5459104dbpRnl','out','isArray','exitCriterias','\x20in\x20journey\x20','update','outtime_journey','getStatistics','time','listActivationsFlat','milestone','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','intime_goal','getConversionSankeyChart','cdp_audience_','includeAllVersions','data','reduce','values','versionNumber','_exit_','listEntitiesByFolder','listJourneysWithDetailsFromParentSegment','client','outtime_stage_','updateJourney','rootFolderId','all','resumeJourney','144okuKht','push','createJourney','parentFolder','from','getJourney','sort','filter','34KINCAM','getJourneyBundle','journeyBundleName','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','conditions','state','type','getLatestJourneyId','conversion','1894513MSSMjV','launched','WaitStep','segmentId','2403932LvFdrm','has','journeyStageId','createJourneyActivation','variant','AbTest','lastVersionNumber','limit','journeyStages','milestoneInflux','7905485yELzkd','journeyBundleId','stage','createdAt','resume','exit_criteria','excluded','Journey\x20activation\x20step\x20not\x20found:\x20','find','create','goalInflux','1772928jChMEv','DecisionPoint','branches','INVALID_ARGUMENT','getActivationSankeyChart','listSegmentFolders','size','listJourneys','listJourneysFromParentSegment','exitCriteria','idx-','exitInflux','exitOrJumpSize','description','_variant_','draft','length','add','goal','getTrafficData','entries','attributes','intime_stage_','getJourneyStatistics','toLowerCase','listActivations','paused','listVersions','Excluded\x20profiles','completionRate','entryCriteria','pauseJourney','conditionSegmentId','latestJourneyId','goalSize','activation','getBundle','history','JOURNEY_NOT_FOUND','journeyId','applyVersionDeduplication','string','name','map','Journey\x20not\x20found:\x20','jumpInflux','get','set','213544TiLjPw','steps','NOT_FOUND','listJourneyActivations','waitCondition','journey','listJourneysWithDetails'];a120_0x1020=function(){return _0x450614;};return a120_0x1020();}export function aggregateStageHistory(_0x7d8880){const _0x3e9586=a120_0xa3fbe1,_0x4542a5=_0x7d8880[_0x3e9586(0x163)]((_0x4206ce,_0x2f68de)=>_0x4206ce+(_0x2f68de['entryInflux']??0x0),0x0),_0x31ae3c=_0x7d8880['reduce']((_0x2c82c7,_0x3b9bea)=>_0x2c82c7+(_0x3b9bea[_0x3e9586(0x18d)]??0x0),0x0),_0x58e9a2=_0x7d8880['reduce']((_0x523e49,_0x273067)=>_0x523e49+((_0x273067['exitInflux']??0x0)+(_0x273067[_0x3e9586(0x13b)]??0x0)),0x0),_0x1ddb13=_0x7d8880[_0x7d8880[_0x3e9586(0x1a9)]-0x1];return{'size':_0x1ddb13?.[_0x3e9586(0x19f)]??0x0,'entered':_0x4542a5,'milestone':_0x31ae3c,'milestone_rate':_0x31ae3c&&_0x4542a5?_0x31ae3c/_0x4542a5*0x64:0x0,'exit_or_jump':_0x58e9a2,'exit_or_jump_rate':_0x58e9a2&&_0x4542a5?_0x58e9a2/_0x4542a5*0x64:0x0};}export function assembleJourneyStats(_0x263150,_0x448be2){const _0x436a77=a120_0xa3fbe1,_0x40bffc=!!(_0x448be2?.[_0x436a77(0x173)]||_0x448be2?.['to'])&&!!_0x263150['history']?.[_0x436a77(0x1a9)];if(_0x40bffc){const _0x3bc7e5=aggregateJourneyHistory(_0x263150[_0x436a77(0x133)]),_0x310400={'journey_id':_0x263150[_0x436a77(0x135)],..._0x448be2?.['from']&&{'from':_0x448be2[_0x436a77(0x173)]},..._0x448be2?.['to']&&{'to':_0x448be2['to']},..._0x3bc7e5};return _0x448be2?.['includeHistory']&&(_0x310400[_0x436a77(0x133)]=_0x263150['history']),_0x310400;}return{'journey_id':_0x263150[_0x436a77(0x135)],'size':_0x263150[_0x436a77(0x19f)],'entered':_0x263150['enteredSize'],'goal_achieved':_0x263150[_0x436a77(0x1bb)],'completion_rate':_0x263150[_0x436a77(0x1b6)],'exit_or_jump':_0x263150[_0x436a77(0x1a5)],'exit_or_jump_rate':_0x263150['exitOrJumpRate']};}function a120_0x58bb(_0x1e95b2,_0x233285){_0x1e95b2=_0x1e95b2-0x131;const _0x10202d=a120_0x1020();let _0x58bbf0=_0x10202d[_0x1e95b2];return _0x58bbf0;}export function formatVersionsFromBundle(_0x51c707){const _0x4e4671=a120_0xa3fbe1,_0x54bd26=_0x51c707['journeys'][_0x4e4671(0x139)](_0x6365a3=>({'journeyId':_0x6365a3['id'],'versionNumber':_0x6365a3[_0x4e4671(0x1ae)][_0x4e4671(0x165)]??0x0,'name':_0x6365a3[_0x4e4671(0x1ae)][_0x4e4671(0x138)],'state':_0x6365a3[_0x4e4671(0x1ae)][_0x4e4671(0x17c)],'paused':_0x6365a3[_0x4e4671(0x1ae)][_0x4e4671(0x1b3)],'createdAt':_0x6365a3[_0x4e4671(0x1ae)][_0x4e4671(0x191)],'updatedAt':_0x6365a3['attributes'][_0x4e4671(0x150)]}));return _0x54bd26[_0x4e4671(0x175)]((_0x1334d3,_0x2ff739)=>_0x1334d3[_0x4e4671(0x165)]-_0x2ff739[_0x4e4671(0x165)]),_0x54bd26;}export function synthesizePreBundleVersion(_0x34149){const _0x3347da=a120_0xa3fbe1;return{'journeyId':_0x34149['id'],'versionNumber':0x1,'name':_0x34149['attributes']['name'],'state':_0x34149[_0x3347da(0x1ae)]['state'],'paused':_0x34149[_0x3347da(0x1ae)]['paused'],'createdAt':_0x34149['attributes']['createdAt'],'updatedAt':_0x34149[_0x3347da(0x1ae)][_0x3347da(0x150)]};}export function buildStageNameMap(_0x502926){const _0x3daf4a=a120_0xa3fbe1;return new Map(_0x502926['attributes'][_0x3daf4a(0x18c)]?.['map'](_0x4dbd85=>[_0x4dbd85['id'],_0x4dbd85[_0x3daf4a(0x138)]])??[]);}export class JourneySDK{[a120_0xa3fbe1(0x169)];constructor(_0x47c952){const _0x3a93b5=a120_0xa3fbe1;this[_0x3a93b5(0x169)]=new CDPApiClient(_0x47c952);}['applyVersionDeduplication'](_0x15b240,_0x5d7142){return _0x5d7142?_0x15b240:deduplicateJourneysByBundle(_0x15b240);}async[a120_0xa3fbe1(0x144)](_0x3d92dd,_0x4f80a1){const _0x158b0a=a120_0xa3fbe1;try{const _0x518110=await this['client'][_0x158b0a(0x144)](_0x3d92dd);return{'journeys':this[_0x158b0a(0x136)](_0x518110[_0x158b0a(0x146)],_0x4f80a1),'activationStepsById':_0x518110['activationStepsById']};}catch(_0x25793e){if(isHttp404Error(_0x25793e))return{'journeys':[],'activationStepsById':new Map()};throw _0x25793e;}}async[a120_0xa3fbe1(0x1a1)](_0x143cc5,_0x401250,_0x1c4894){const _0x25fe44=a120_0xa3fbe1;let _0x5aa6ed=_0x401250;if(!_0x5aa6ed)try{const _0x2c3cc0=await this['client']['getParentSegmentFull'](_0x143cc5);_0x5aa6ed=_0x2c3cc0[_0x25fe44(0x16c)]??undefined;}catch(_0x2aa14d){if(isHttp404Error(_0x2aa14d))return[];throw _0x2aa14d;}if(!_0x5aa6ed)return[];let _0x19af92;if(_0x1c4894?.[_0x25fe44(0x161)]){const _0x2693d9=await this['client']['listSegmentFolders'](_0x143cc5),_0x21692b=_0x2693d9[_0x25fe44(0x139)](_0x5efe2a=>this['client'][_0x25fe44(0x1a0)](_0x5efe2a['id'])),_0x252e06=await Promise[_0x25fe44(0x16d)](_0x21692b),_0x1f4953=new Set();_0x19af92=_0x252e06['flat']()[_0x25fe44(0x176)](_0x52d6ac=>{const _0x175619=_0x25fe44;if(_0x1f4953[_0x175619(0x185)](_0x52d6ac['id']))return![];return _0x1f4953[_0x175619(0x1aa)](_0x52d6ac['id']),!![];});}else{const _0x53a9d2=await this[_0x25fe44(0x169)]['listEntitiesByFolder'](_0x5aa6ed,0x20,![]),_0x1d73c3=_0x53a9d2[_0x25fe44(0x162)],_0x742e13=_0x1d73c3[_0x25fe44(0x176)](_0x3dc3fd=>_0x3dc3fd[_0x25fe44(0x17d)]===_0x25fe44(0x143));_0x19af92=_0x742e13[_0x25fe44(0x139)](_0x4f70d4=>entityToJourneyListItem(_0x4f70d4,_0x143cc5));}return this[_0x25fe44(0x136)](_0x19af92,_0x1c4894?.[_0x25fe44(0x161)]);}async['listJourneysWithFolders'](_0x3c50f0,_0x5cd370,_0x4c3e49){const _0x4c8ce8=a120_0xa3fbe1;if(!_0x5cd370)return{'journeys':[],'folders':[]};const _0x24400b=await this[_0x4c8ce8(0x169)][_0x4c8ce8(0x167)](_0x5cd370,0x20,![]),_0x373a6b=_0x24400b[_0x4c8ce8(0x162)],_0x110689=_0x373a6b['filter'](_0x37f397=>_0x37f397[_0x4c8ce8(0x17d)]===_0x4c8ce8(0x149)&&_0x37f397['id']!==_0x5cd370),_0x297c45=_0x110689[_0x4c8ce8(0x139)](_0x266714=>({'id':_0x266714['id'],'name':_0x266714[_0x4c8ce8(0x1ae)][_0x4c8ce8(0x138)]})),_0xfc317a=_0x373a6b[_0x4c8ce8(0x176)](_0x182f9d=>_0x182f9d[_0x4c8ce8(0x17d)]==='journey'),_0x177227=_0xfc317a['map'](_0x37c233=>entityToJourneyListItem(_0x37c233,_0x3c50f0));return{'journeys':this[_0x4c8ce8(0x136)](_0x177227,_0x4c3e49?.[_0x4c8ce8(0x161)]),'folders':_0x297c45};}async[a120_0xa3fbe1(0x168)](_0x2f710d,_0x4d591c){const _0x3c0e68=a120_0xa3fbe1;let _0x4a2bb8;try{_0x4a2bb8=await this[_0x3c0e68(0x169)][_0x3c0e68(0x19e)](_0x2f710d);}catch(_0x4a8d94){if(isHttp404Error(_0x4a8d94))return{'journeys':[],'activationStepsById':new Map()};throw _0x4a8d94;}const _0x491d17=_0x4a2bb8[_0x3c0e68(0x139)](async _0x437bf7=>{const _0x38bcbe=_0x3c0e68;return await this[_0x38bcbe(0x144)](_0x437bf7['id'],_0x4d591c?.['includeAllVersions']);}),_0x3d18c1=await Promise['all'](_0x491d17),_0xac1c4e=new Map(),_0x16cdf6=[];for(const _0x53d5e0 of _0x3d18c1){_0x16cdf6['push'](..._0x53d5e0['journeys']);for(const [_0x5c4423,_0x4403b6]of _0x53d5e0['activationStepsById']){_0xac1c4e['set'](_0x5c4423,_0x4403b6);}}const _0x124bc2=new Set(),_0x513fde=_0x16cdf6[_0x3c0e68(0x176)](_0x50af48=>{const _0x2df8d9=_0x3c0e68;if(_0x124bc2[_0x2df8d9(0x185)](_0x50af48['id']))return![];return _0x124bc2[_0x2df8d9(0x1aa)](_0x50af48['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x513fde,_0x4d591c?.[_0x3c0e68(0x161)]),'activationStepsById':_0xac1c4e};}async[a120_0xa3fbe1(0x174)](_0xd028ec){const _0xb33a63=a120_0xa3fbe1;try{return await this[_0xb33a63(0x169)][_0xb33a63(0x174)](_0xd028ec);}catch(_0xbdc9dc){if(isHttp404Error(_0xbdc9dc))throw new SDKError(ErrorCode[_0xb33a63(0x134)],'Journey\x20not\x20found:\x20'+_0xd028ec,_0xbdc9dc);throw _0xbdc9dc;}}async['resolveJourneyId'](_0x6e3f70,_0xcd240d){const _0x4a01c5=a120_0xa3fbe1,_0x23dda0=await this['listJourneysFromParentSegment'](_0x6e3f70),_0x159ca9=_0x23dda0[_0x4a01c5(0x196)](_0x2223a9=>_0x2223a9[_0x4a01c5(0x179)][_0x4a01c5(0x1b1)]()===_0xcd240d['toLowerCase']());if(!_0x159ca9)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x4a01c5(0x13a)+_0xcd240d,undefined,{'helpText':_0x4a01c5(0x15d)});return _0x159ca9['id'];}async[a120_0xa3fbe1(0x159)](_0x23cdb1,_0x1840cb){const _0x2a2f35=a120_0xa3fbe1;try{return await this[_0x2a2f35(0x169)][_0x2a2f35(0x1b0)](_0x23cdb1,_0x1840cb);}catch(_0x3396c2){if(isHttp404Error(_0x3396c2))throw new SDKError(ErrorCode[_0x2a2f35(0x134)],'Journey\x20not\x20found:\x20'+_0x23cdb1,_0x3396c2);throw _0x3396c2;}}async[a120_0xa3fbe1(0x1ac)](_0x220e15,_0x5145a9){const _0x34c1f9=a120_0xa3fbe1,_0x4c6aaa={'from':_0x5145a9?.['from'],'to':_0x5145a9?.['to'],'limit':_0x5145a9?.[_0x34c1f9(0x18b)]},_0x538fc9=_0x5145a9?.['type']!==_0x34c1f9(0x17f);try{const [_0x26ef10,_0x3c4c83]=await Promise[_0x34c1f9(0x16d)]([this['fetchTrafficRaw'](_0x220e15,_0x5145a9?.[_0x34c1f9(0x17d)],_0x4c6aaa),_0x538fc9?this['getJourney'](_0x220e15):undefined]);if(_0x26ef10['activation']&&_0x3c4c83){const _0x575603=buildStageNameMap(_0x3c4c83);_0x26ef10[_0x34c1f9(0x131)]=_0x26ef10[_0x34c1f9(0x131)][_0x34c1f9(0x139)](_0x1049f7=>({..._0x1049f7,'journeyStageName':_0x575603[_0x34c1f9(0x13c)](_0x1049f7[_0x34c1f9(0x186)])??_0x1049f7[_0x34c1f9(0x186)]}));}return _0x26ef10;}catch(_0x3af1ca){if(isHttp404Error(_0x3af1ca))throw new SDKError(ErrorCode[_0x34c1f9(0x134)],_0x34c1f9(0x13a)+_0x220e15,_0x3af1ca);throw _0x3af1ca;}}async[a120_0xa3fbe1(0x145)](_0x3a6e5d,_0x39ce14,_0x33a25c){const _0x204b96=a120_0xa3fbe1;if(_0x39ce14==='conversion'){const _0xd73c24=await this[_0x204b96(0x169)][_0x204b96(0x15f)](_0x3a6e5d,_0x33a25c);return{'conversion':_0xd73c24};}if(_0x39ce14===_0x204b96(0x131)){const _0x2057c9=await this['client'][_0x204b96(0x19d)](_0x3a6e5d,_0x33a25c);return{'activation':_0x2057c9};}const [_0x165ab8,_0x473fec]=await Promise['all']([this[_0x204b96(0x169)][_0x204b96(0x15f)](_0x3a6e5d,_0x33a25c),this['client'][_0x204b96(0x19d)](_0x3a6e5d,_0x33a25c)]);return{'conversion':_0x165ab8,'activation':_0x473fec};}async['pause'](_0x2d109b){const _0x1c5a85=a120_0xa3fbe1;try{return await this['client'][_0x1c5a85(0x1b8)](_0x2d109b);}catch(_0x9f8ae1){if(isHttp404Error(_0x9f8ae1))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x2d109b,_0x9f8ae1);throw _0x9f8ae1;}}async[a120_0xa3fbe1(0x192)](_0x836a14){const _0x323422=a120_0xa3fbe1;try{return await this[_0x323422(0x169)][_0x323422(0x16e)](_0x836a14);}catch(_0x34597a){if(isHttp404Error(_0x34597a))throw new SDKError(ErrorCode[_0x323422(0x134)],'Journey\x20not\x20found:\x20'+_0x836a14,_0x34597a);throw _0x34597a;}}async[a120_0xa3fbe1(0x197)](_0x31678d){const _0x36f34e=a120_0xa3fbe1;return await this['client'][_0x36f34e(0x171)](_0x31678d);}async[a120_0xa3fbe1(0x157)](_0xed9d60,_0x593e96){const _0x106858=a120_0xa3fbe1;try{return await this[_0x106858(0x169)][_0x106858(0x16b)](_0xed9d60,_0x593e96);}catch(_0x6bf35e){if(isHttp404Error(_0x6bf35e))throw new SDKError(ErrorCode[_0x106858(0x134)],_0x106858(0x13a)+_0xed9d60,_0x6bf35e);throw _0x6bf35e;}}async[a120_0xa3fbe1(0x148)](_0x5908d3,_0x33930d){const _0x42487a=a120_0xa3fbe1;try{return await this[_0x42487a(0x169)]['getJourneyActivation'](_0x5908d3,_0x33930d);}catch(_0x57ff92){if(isHttp404Error(_0x57ff92))throw new SDKError(ErrorCode[_0x42487a(0x140)],_0x42487a(0x195)+_0x33930d+_0x42487a(0x156)+_0x5908d3,_0x57ff92);throw _0x57ff92;}}async[a120_0xa3fbe1(0x1b2)](_0x48e915){const _0x3ce455=a120_0xa3fbe1;try{return await this[_0x3ce455(0x169)][_0x3ce455(0x141)](_0x48e915);}catch(_0x42df97){if(isHttp404Error(_0x42df97))return[];throw _0x42df97;}}async[a120_0xa3fbe1(0x15b)](_0x481b11){const _0x5eca7d=a120_0xa3fbe1,_0x458a45=await this[_0x5eca7d(0x1b2)](_0x481b11);return _0x458a45[_0x5eca7d(0x139)](flattenJourneyActivation);}async['createActivation'](_0x4198e6,_0x5e5b4a){const _0x342549=a120_0xa3fbe1;return await this[_0x342549(0x169)][_0x342549(0x187)](_0x4198e6,_0x5e5b4a);}async['getColumnMapping'](_0x3494f7){const _0x5a007f=a120_0xa3fbe1,_0xe1f56a=await this['getJourney'](_0x3494f7),_0x173c1c=generateColumnMapping(_0xe1f56a);return{'journeyId':_0xe1f56a['id'],'journeyName':_0xe1f56a[_0x5a007f(0x1ae)][_0x5a007f(0x138)],'database':_0x5a007f(0x160)+_0xe1f56a['attributes']['audienceId'],'table':'journey_'+_0xe1f56a['id'],'columns':_0x173c1c};}async['getBundle'](_0x524cc1){const _0x3f78d6=a120_0xa3fbe1;return this['client'][_0x3f78d6(0x178)](_0x524cc1);}async[a120_0xa3fbe1(0x17e)](_0x39cd10){const _0x1e1a70=a120_0xa3fbe1;if(!_0x39cd10)return undefined;try{const _0xfa7529=await this[_0x1e1a70(0x132)](_0x39cd10);return _0xfa7529[_0x1e1a70(0x1ba)];}catch{return undefined;}}async[a120_0xa3fbe1(0x1b4)](_0x59d262){const _0x5921ec=a120_0xa3fbe1,_0xd7cd00=await this[_0x5921ec(0x174)](_0x59d262),_0x1eab8c=_0xd7cd00['attributes'][_0x5921ec(0x18f)];if(!_0x1eab8c)return{'bundleId':'','bundleName':_0xd7cd00[_0x5921ec(0x1ae)][_0x5921ec(0x138)],'bundleDescription':_0xd7cd00['attributes']['description']??null,'latestJourneyId':_0xd7cd00['id'],'versions':[synthesizePreBundleVersion(_0xd7cd00)]};const _0x42620d=await this[_0x5921ec(0x132)](_0x1eab8c);return{'bundleId':_0x1eab8c,'bundleName':_0x42620d[_0x5921ec(0x138)],'bundleDescription':_0x42620d[_0x5921ec(0x1a6)]??null,'latestJourneyId':_0x42620d[_0x5921ec(0x1ba)],'versions':formatVersionsFromBundle(_0x42620d)};}async['createVersion'](_0x2fa247){const _0x562a9e=a120_0xa3fbe1,_0x7d23d3=await this['getJourney'](_0x2fa247),_0x264ad0=_0x7d23d3['attributes'][_0x562a9e(0x18f)];if(!_0x264ad0)throw new SDKError(ErrorCode[_0x562a9e(0x19c)],_0x562a9e(0x17a));await this[_0x562a9e(0x169)]['checkJourneyAppendable'](_0x264ad0);const _0x541b1d=await this[_0x562a9e(0x169)]['getJourneyBundle'](_0x264ad0),_0x1b6dd0=_0x541b1d[_0x562a9e(0x138)]+'\x20v'+(_0x541b1d[_0x562a9e(0x18a)]+0x1);return this['client']['createJourneyVersion'](_0x264ad0,{'sourceId':_0x2fa247,'attributes':{'name':_0x1b6dd0}});}}
1
+ const a120_0x208032=a120_0x109a;(function(_0x30f197,_0x425b01){const _0x4dd139=a120_0x109a,_0x561134=_0x30f197();while(!![]){try{const _0x18443d=-parseInt(_0x4dd139(0x1de))/0x1*(parseInt(_0x4dd139(0x1da))/0x2)+-parseInt(_0x4dd139(0x1ff))/0x3+-parseInt(_0x4dd139(0x1d5))/0x4*(parseInt(_0x4dd139(0x1ae))/0x5)+parseInt(_0x4dd139(0x1c9))/0x6+-parseInt(_0x4dd139(0x1b4))/0x7*(-parseInt(_0x4dd139(0x1f0))/0x8)+parseInt(_0x4dd139(0x194))/0x9*(-parseInt(_0x4dd139(0x197))/0xa)+parseInt(_0x4dd139(0x1b0))/0xb;if(_0x18443d===_0x425b01)break;else _0x561134['push'](_0x561134['shift']());}catch(_0x7a7450){_0x561134['push'](_0x561134['shift']());}}}(a120_0x52b6,0xc0fca));import{CDPApiClient}from'./client/cdp-api-client.js';function a120_0x52b6(){const _0x56a066=['exitOrJumpRate','8dtggvC','branches','reduce','journey','updateJourney','updatedAt','resolveJourneyId','conversion','createVersion','string','journeyBundleName','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','intime_goal','includeHistory','latestJourneyId','659100nZVybZ','lastVersionNumber','listJourneysWithDetails','entryInflux','createdAt','has','goalInflux','includeAllVersions','DecisionPoint','entries','listSegmentFolders','waitCondition','set','toLowerCase','listEntitiesByFolder','branch','client','getStatistics','listJourneyActivations','add','intime_stage_','listActivationsFlat','parentFolder','size','name','idx-','journey_','from','variants','simulation','activation','journeyId','length','paused','getJourneyBundle','segmentId','attributes','NOT_FOUND','exitCriteria','36009oCrmVP','completionRate','time','2110mIvsom','exitInflux','push','WaitStep','JOURNEY_NOT_FOUND','launched','flat','filter','listJourneysWithDetailsFromParentSegment','_exit_','draft','cdp_audience_','getConversionSankeyChart','map','pause','_milestone','update','values','pauseJourney','Wait','folder-segment','steps','journeyStages','40XhEwDo','_variant_','20539530wNVrJE','createJourney','checkJourneyAppendable','Journey\x20activation\x20step\x20not\x20found:\x20','3982237aYQVRE','getJourney','milestone','goal','state','\x20in\x20journey\x20','outtime_stage_','getActivationSankeyChart','data','listJourneys','fetchTrafficRaw','createActivation','listActivations','journeys','get','journeyStageId','getJourneyActivation','description','type','out','listJourneysFromParentSegment','1797534Hevdia','cdp_customer_id','outtime_journey','enteredSize','versionNumber','variant','timedOutPath','find','journeyBundleId','listVersions','excluded','entryCriteria','224528GHVMwb','segmentFolderId','isArray','history','getJourneyStatistics','38keDNbu','listJourneysWithFolders','relationships','resumeJourney','22751OdLrPY','getActivation','step','getBundle','conditions','exit_criteria','jumpInflux','all','activationStepsById','milestoneInflux','exitCriterias','applyVersionDeduplication','stage','limit','Journey\x20not\x20found:\x20','resume','conditionSegmentId'];a120_0x52b6=function(){return _0x56a066;};return a120_0x52b6();}import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x37078f){const _0x3d0b79=a120_0x109a;return _0x37078f[_0x3d0b79(0x1d1)]??_0x37078f[_0x3d0b79(0x191)]?.[_0x3d0b79(0x1d1)]??undefined;}function getVersionNumber(_0xd86ea5){const _0x19133c=a120_0x109a;return _0xd86ea5[_0x19133c(0x1cd)]??_0xd86ea5[_0x19133c(0x191)]?.['versionNumber']??0x0;}function a120_0x109a(_0x568628,_0x567979){_0x568628=_0x568628-0x17a;const _0x52b69a=a120_0x52b6();let _0x109a94=_0x52b69a[_0x568628];return _0x109a94;}function getState(_0x2f9712){const _0xefc89f=a120_0x109a;return _0x2f9712[_0xefc89f(0x1b8)]??_0x2f9712[_0xefc89f(0x191)]?.[_0xefc89f(0x1b8)];}export function deduplicateJourneysByBundle(_0x4573d8){const _0x3384cd=a120_0x109a,_0x4a7f80=new Map();let _0x56bc12=0x0;for(const _0xac6323 of _0x4573d8){const _0x477f5f=getBundleId(_0xac6323);if(!_0x477f5f){const _0x3b1171='no-bundle-'+(_0xac6323['id']??_0x3384cd(0x186)+_0x56bc12++);_0x4a7f80[_0x3384cd(0x20b)](_0x3b1171,_0xac6323);continue;}const _0x47a576=_0x4a7f80['get'](_0x477f5f);if(!_0x47a576)_0x4a7f80[_0x3384cd(0x20b)](_0x477f5f,_0xac6323);else{const _0x907960=getState(_0x47a576)==='launched',_0x56d9da=getState(_0xac6323)===_0x3384cd(0x19c);if(_0x56d9da&&!_0x907960)_0x4a7f80[_0x3384cd(0x20b)](_0x477f5f,_0xac6323);else{if(!_0x56d9da&&_0x907960){}else{const _0x3b3573=getVersionNumber(_0x47a576),_0x47ab8f=getVersionNumber(_0xac6323);_0x47ab8f>_0x3b3573&&_0x4a7f80['set'](_0x477f5f,_0xac6323);}}}}return Array[_0x3384cd(0x188)](_0x4a7f80[_0x3384cd(0x1a8)]());}const VALID_JOURNEY_STATES=new Set([a120_0x208032(0x1a1),a120_0x208032(0x18a),a120_0x208032(0x19c)]);export function parseJourneyState(_0xd49e01){const _0x484dad=a120_0x208032;if(typeof _0xd49e01===_0x484dad(0x1f9)&&VALID_JOURNEY_STATES[_0x484dad(0x204)](_0xd49e01))return _0xd49e01;return _0x484dad(0x1a1);}export function entityToJourneyListItem(_0x30a3d1,_0x55574c){const _0x4d794f=a120_0x208032,_0x5cba50=_0x30a3d1[_0x4d794f(0x191)];return{'id':_0x30a3d1['id'],'name':_0x5cba50['name']??'','journeyBundleName':_0x5cba50[_0x4d794f(0x1fa)]??_0x5cba50[_0x4d794f(0x185)]??'','journeyBundleId':_0x5cba50[_0x4d794f(0x1d1)]??'','versionNumber':_0x5cba50['versionNumber'],'description':_0x5cba50['description']??null,'state':parseJourneyState(_0x5cba50[_0x4d794f(0x1b8)]),'paused':_0x5cba50[_0x4d794f(0x18e)]??![],'audienceId':_0x55574c,'folderId':_0x5cba50[_0x4d794f(0x1d6)]??_0x30a3d1[_0x4d794f(0x1dc)]?.[_0x4d794f(0x183)]?.[_0x4d794f(0x1bc)]?.['id']??null,'createdAt':_0x5cba50['createdAt']??'','updatedAt':_0x5cba50['updatedAt']??''};}function convertToColumnId(_0x3fcd8e){return _0x3fcd8e['replace'](/-/g,'_');}function getStepEntries(_0x356db1){const _0x3dae1b=a120_0x208032;if(!_0x356db1)return[];if(Array[_0x3dae1b(0x1d7)](_0x356db1))return _0x356db1[_0x3dae1b(0x1a4)](_0x3243f4=>[_0x3243f4['id'],_0x3243f4]);return Object[_0x3dae1b(0x208)](_0x356db1);}export function flattenJourneyActivation(_0x48bd1f){const _0x183344=a120_0x208032,{activationParams:_0x3a3781,activationId:_0x46b4db,runAfterJourneyRefresh:_0x4126e5}=_0x48bd1f[_0x183344(0x191)];return{'id':_0x48bd1f['id'],'activationId':_0x46b4db,'runAfterJourneyRefresh':_0x4126e5,..._0x3a3781};}function col(_0x34ad08,_0x22dda9={}){return{'column':_0x34ad08,'direction':null,'stageIndex':null,'stageName':null,'category':'fixed','stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x22dda9};}export function generateColumnMapping(_0x20c1ee){const _0x5d22ba=a120_0x208032,_0x2155cc=[];_0x2155cc['push'](col(_0x5d22ba(0x1ca))),_0x2155cc[_0x5d22ba(0x199)](col('intime_journey',{'direction':'in','category':_0x5d22ba(0x1f3)})),_0x2155cc[_0x5d22ba(0x199)](col(_0x5d22ba(0x1cb),{'direction':_0x5d22ba(0x1c7),'category':_0x5d22ba(0x1f3)}));_0x20c1ee['attributes'][_0x5d22ba(0x1b7)]&&_0x2155cc[_0x5d22ba(0x199)](col(_0x5d22ba(0x1fc),{'direction':'in','category':'goal','detail':_0x20c1ee[_0x5d22ba(0x191)][_0x5d22ba(0x1b7)][_0x5d22ba(0x185)]||null}));const _0x3003c3=_0x20c1ee[_0x5d22ba(0x191)][_0x5d22ba(0x1ad)]||[];for(let _0x5cfe5f=0x0;_0x5cfe5f<_0x3003c3['length'];_0x5cfe5f++){const _0x1ab93e=_0x3003c3[_0x5cfe5f],_0x2ce719=_0x1ab93e[_0x5d22ba(0x185)],_0xf080ef={'stageIndex':_0x5cfe5f,'stageName':_0x2ce719},_0x3daee1=_0x1ab93e[_0x5d22ba(0x1d4)]?.[_0x5d22ba(0x185)]||null;_0x2155cc['push'](col(_0x5d22ba(0x181)+_0x5cfe5f,{..._0xf080ef,'direction':'in','category':_0x5d22ba(0x1ea),'detail':_0x3daee1})),_0x2155cc[_0x5d22ba(0x199)](col(_0x5d22ba(0x1ba)+_0x5cfe5f,{..._0xf080ef,'direction':_0x5d22ba(0x1c7),'category':_0x5d22ba(0x1ea),'detail':_0x3daee1}));_0x1ab93e[_0x5d22ba(0x1b6)]&&_0x2155cc[_0x5d22ba(0x199)](col(_0x5d22ba(0x181)+_0x5cfe5f+_0x5d22ba(0x1a6),{..._0xf080ef,'direction':'in','category':_0x5d22ba(0x1b6),'detail':_0x1ab93e[_0x5d22ba(0x1b6)][_0x5d22ba(0x185)]||null}));const _0x38e3f5=_0x1ab93e[_0x5d22ba(0x1e8)]||_0x1ab93e[_0x5d22ba(0x193)]||[];for(let _0x4bd284=0x0;_0x4bd284<_0x38e3f5['length'];_0x4bd284++){_0x2155cc[_0x5d22ba(0x199)](col('intime_stage_'+_0x5cfe5f+_0x5d22ba(0x1a0)+_0x4bd284,{..._0xf080ef,'direction':'in','category':_0x5d22ba(0x1e3),'detail':_0x38e3f5[_0x4bd284]['name']||null}));}const _0x26e5c6=getStepEntries(_0x1ab93e[_0x5d22ba(0x1ac)]);for(const [_0x57cd4a,_0x36a399]of _0x26e5c6){const _0x10591b=convertToColumnId(_0x57cd4a),_0x3ac184=_0x36a399[_0x5d22ba(0x1c6)]||null,_0x3e07f4=_0x36a399[_0x5d22ba(0x185)]||null,_0x56db4b={..._0xf080ef,'stepType':_0x3ac184,'stepName':_0x3e07f4,'stepId':_0x57cd4a};_0x2155cc[_0x5d22ba(0x199)](col(_0x5d22ba(0x181)+_0x5cfe5f+'_'+_0x10591b,{..._0x56db4b,'direction':'in','category':_0x5d22ba(0x1e0)})),_0x2155cc[_0x5d22ba(0x199)](col('outtime_stage_'+_0x5cfe5f+'_'+_0x10591b,{..._0x56db4b,'direction':_0x5d22ba(0x1c7),'category':_0x5d22ba(0x1e0)}));if(_0x36a399['type']===_0x5d22ba(0x207)&&_0x36a399[_0x5d22ba(0x1f1)])for(const _0x4e3d01 of _0x36a399[_0x5d22ba(0x1f1)]){_0x4e3d01[_0x5d22ba(0x190)]&&_0x2155cc[_0x5d22ba(0x199)](col(_0x5d22ba(0x181)+_0x5cfe5f+'_'+_0x10591b+'_'+_0x4e3d01[_0x5d22ba(0x190)],{..._0x56db4b,'direction':'in','category':_0x5d22ba(0x17c),'detail':_0x4e3d01[_0x5d22ba(0x185)]||(_0x4e3d01[_0x5d22ba(0x1d3)]?'Excluded\x20profiles':null)}));}if((_0x36a399[_0x5d22ba(0x1c6)]==='AbTest'||_0x36a399[_0x5d22ba(0x1c6)]==='ABTest')&&_0x36a399[_0x5d22ba(0x189)])for(const _0x498152 of _0x36a399[_0x5d22ba(0x189)]){_0x498152['id']&&_0x2155cc[_0x5d22ba(0x199)](col('intime_stage_'+_0x5cfe5f+'_'+_0x10591b+_0x5d22ba(0x1af)+convertToColumnId(_0x498152['id']),{..._0x56db4b,'direction':'in','category':_0x5d22ba(0x1ce),'detail':_0x498152[_0x5d22ba(0x185)]||null}));}if(_0x36a399[_0x5d22ba(0x1c6)]===_0x5d22ba(0x19a)||_0x36a399[_0x5d22ba(0x1c6)]===_0x5d22ba(0x1aa)){const _0x228097=[];if(_0x36a399[_0x5d22ba(0x1ee)])_0x228097['push'](_0x36a399['conditionSegmentId']);else{if(Array[_0x5d22ba(0x1d7)](_0x36a399[_0x5d22ba(0x1e2)]))for(const _0x18e0f3 of _0x36a399[_0x5d22ba(0x1e2)]){_0x18e0f3[_0x5d22ba(0x190)]&&!_0x18e0f3[_0x5d22ba(0x1cf)]&&_0x228097[_0x5d22ba(0x199)](_0x18e0f3[_0x5d22ba(0x190)]);}else _0x36a399['waitCondition']?.[_0x5d22ba(0x190)]&&_0x228097[_0x5d22ba(0x199)](_0x36a399[_0x5d22ba(0x20a)]['segmentId']);}for(const _0x336ebf of _0x228097){_0x2155cc[_0x5d22ba(0x199)](col(_0x5d22ba(0x181)+_0x5cfe5f+'_'+_0x10591b+'_'+_0x336ebf,{..._0x56db4b,'direction':'in','category':_0x5d22ba(0x17c)}));}}}}return _0x2155cc[_0x5d22ba(0x199)](col(_0x5d22ba(0x196))),_0x2155cc;}export function aggregateJourneyHistory(_0x1382b2){const _0x29684e=a120_0x208032,_0x36e33a=_0x1382b2[_0x29684e(0x1f2)]((_0x3fba22,_0x77c61c)=>_0x3fba22+(_0x77c61c[_0x29684e(0x202)]??0x0),0x0),_0x2cbca5=_0x1382b2[_0x29684e(0x1f2)]((_0x463f25,_0x32bb71)=>_0x463f25+(_0x32bb71[_0x29684e(0x205)]??0x0),0x0),_0x275f33=_0x1382b2[_0x29684e(0x1f2)]((_0x5ba685,_0x3a561e)=>_0x5ba685+((_0x3a561e[_0x29684e(0x198)]??0x0)+(_0x3a561e[_0x29684e(0x1e4)]??0x0)),0x0),_0x28a3ec=_0x1382b2[_0x1382b2[_0x29684e(0x18d)]-0x1];return{'size':_0x28a3ec?.[_0x29684e(0x184)]??0x0,'entered':_0x36e33a,'goal_achieved':_0x2cbca5,'completion_rate':_0x2cbca5&&_0x36e33a?_0x2cbca5/_0x36e33a*0x64:0x0,'exit_or_jump':_0x275f33,'exit_or_jump_rate':_0x275f33&&_0x36e33a?_0x275f33/_0x36e33a*0x64:0x0};}export function aggregateStageHistory(_0x10ab0c){const _0x544846=a120_0x208032,_0xff6e7=_0x10ab0c[_0x544846(0x1f2)]((_0x4d88ce,_0x24ce4d)=>_0x4d88ce+(_0x24ce4d[_0x544846(0x202)]??0x0),0x0),_0x37e1c2=_0x10ab0c[_0x544846(0x1f2)]((_0x51d718,_0x4a4a4d)=>_0x51d718+(_0x4a4a4d[_0x544846(0x1e7)]??0x0),0x0),_0x4f06b7=_0x10ab0c[_0x544846(0x1f2)]((_0x4e4345,_0x37f634)=>_0x4e4345+((_0x37f634[_0x544846(0x198)]??0x0)+(_0x37f634['jumpInflux']??0x0)),0x0),_0x3d893b=_0x10ab0c[_0x10ab0c[_0x544846(0x18d)]-0x1];return{'size':_0x3d893b?.[_0x544846(0x184)]??0x0,'entered':_0xff6e7,'milestone':_0x37e1c2,'milestone_rate':_0x37e1c2&&_0xff6e7?_0x37e1c2/_0xff6e7*0x64:0x0,'exit_or_jump':_0x4f06b7,'exit_or_jump_rate':_0x4f06b7&&_0xff6e7?_0x4f06b7/_0xff6e7*0x64:0x0};}export function assembleJourneyStats(_0x4be929,_0x568ca5){const _0x4aa2ca=a120_0x208032,_0x254a70=!!(_0x568ca5?.[_0x4aa2ca(0x188)]||_0x568ca5?.['to'])&&!!_0x4be929[_0x4aa2ca(0x1d8)]?.[_0x4aa2ca(0x18d)];if(_0x254a70){const _0x1673ad=aggregateJourneyHistory(_0x4be929[_0x4aa2ca(0x1d8)]),_0xc921cc={'journey_id':_0x4be929[_0x4aa2ca(0x18c)],..._0x568ca5?.[_0x4aa2ca(0x188)]&&{'from':_0x568ca5[_0x4aa2ca(0x188)]},..._0x568ca5?.['to']&&{'to':_0x568ca5['to']},..._0x1673ad};return _0x568ca5?.[_0x4aa2ca(0x1fd)]&&(_0xc921cc[_0x4aa2ca(0x1d8)]=_0x4be929['history']),_0xc921cc;}return{'journey_id':_0x4be929[_0x4aa2ca(0x18c)],'size':_0x4be929['size'],'entered':_0x4be929[_0x4aa2ca(0x1cc)],'goal_achieved':_0x4be929['goalSize'],'completion_rate':_0x4be929[_0x4aa2ca(0x195)],'exit_or_jump':_0x4be929['exitOrJumpSize'],'exit_or_jump_rate':_0x4be929[_0x4aa2ca(0x1ef)]};}export function formatVersionsFromBundle(_0x11b04f){const _0x28cfda=a120_0x208032,_0x5bae47=_0x11b04f[_0x28cfda(0x1c1)][_0x28cfda(0x1a4)](_0x2af1a9=>({'journeyId':_0x2af1a9['id'],'versionNumber':_0x2af1a9[_0x28cfda(0x191)]['versionNumber']??0x0,'name':_0x2af1a9[_0x28cfda(0x191)][_0x28cfda(0x185)],'state':_0x2af1a9[_0x28cfda(0x191)]['state'],'paused':_0x2af1a9[_0x28cfda(0x191)][_0x28cfda(0x18e)],'createdAt':_0x2af1a9[_0x28cfda(0x191)][_0x28cfda(0x203)],'updatedAt':_0x2af1a9['attributes'][_0x28cfda(0x1f5)]}));return _0x5bae47['sort']((_0xdb6d81,_0x16ba3d)=>_0xdb6d81[_0x28cfda(0x1cd)]-_0x16ba3d[_0x28cfda(0x1cd)]),_0x5bae47;}export function synthesizePreBundleVersion(_0x35739e){const _0x2ffcb9=a120_0x208032;return{'journeyId':_0x35739e['id'],'versionNumber':0x1,'name':_0x35739e['attributes'][_0x2ffcb9(0x185)],'state':_0x35739e[_0x2ffcb9(0x191)]['state'],'paused':_0x35739e[_0x2ffcb9(0x191)][_0x2ffcb9(0x18e)],'createdAt':_0x35739e[_0x2ffcb9(0x191)][_0x2ffcb9(0x203)],'updatedAt':_0x35739e[_0x2ffcb9(0x191)][_0x2ffcb9(0x1f5)]};}export function buildStageNameMap(_0x329c2e){const _0x1cee6d=a120_0x208032;return new Map(_0x329c2e[_0x1cee6d(0x191)][_0x1cee6d(0x1ad)]?.[_0x1cee6d(0x1a4)](_0x236f00=>[_0x236f00['id'],_0x236f00[_0x1cee6d(0x185)]])??[]);}export class JourneySDK{[a120_0x208032(0x17d)];constructor(_0x4dcffd){const _0x30d285=a120_0x208032;this[_0x30d285(0x17d)]=new CDPApiClient(_0x4dcffd);}['applyVersionDeduplication'](_0x426a7a,_0x4abaef){return _0x4abaef?_0x426a7a:deduplicateJourneysByBundle(_0x426a7a);}async[a120_0x208032(0x201)](_0x1f0c8a,_0x234dfd){const _0x2b1fbe=a120_0x208032;try{const _0x4c2d96=await this[_0x2b1fbe(0x17d)][_0x2b1fbe(0x201)](_0x1f0c8a);return{'journeys':this[_0x2b1fbe(0x1e9)](_0x4c2d96[_0x2b1fbe(0x1c1)],_0x234dfd),'activationStepsById':_0x4c2d96[_0x2b1fbe(0x1e6)]};}catch(_0xff5b0c){if(isHttp404Error(_0xff5b0c))return{'journeys':[],'activationStepsById':new Map()};throw _0xff5b0c;}}async['listJourneysFromParentSegment'](_0xef60e5,_0x8c329e,_0x597594){const _0x353f05=a120_0x208032;let _0x32db20=_0x8c329e;if(!_0x32db20)try{const _0x4639a6=await this[_0x353f05(0x17d)]['getParentSegmentFull'](_0xef60e5);_0x32db20=_0x4639a6['rootFolderId']??undefined;}catch(_0x2bd2df){if(isHttp404Error(_0x2bd2df))return[];throw _0x2bd2df;}if(!_0x32db20)return[];let _0x453247;if(_0x597594?.[_0x353f05(0x206)]){const _0x1b704c=await this[_0x353f05(0x17d)][_0x353f05(0x209)](_0xef60e5),_0x1999dc=_0x1b704c[_0x353f05(0x1a4)](_0x240a63=>this[_0x353f05(0x17d)][_0x353f05(0x1bd)](_0x240a63['id'])),_0x48c1a9=await Promise[_0x353f05(0x1e5)](_0x1999dc),_0x5a5c80=new Set();_0x453247=_0x48c1a9[_0x353f05(0x19d)]()[_0x353f05(0x19e)](_0xd00546=>{const _0x423eb4=_0x353f05;if(_0x5a5c80[_0x423eb4(0x204)](_0xd00546['id']))return![];return _0x5a5c80[_0x423eb4(0x180)](_0xd00546['id']),!![];});}else{const _0x5e7484=await this[_0x353f05(0x17d)][_0x353f05(0x17b)](_0x32db20,0x20,![]),_0x58c3fa=_0x5e7484[_0x353f05(0x1bc)],_0x1c315f=_0x58c3fa[_0x353f05(0x19e)](_0x3d84f9=>_0x3d84f9[_0x353f05(0x1c6)]===_0x353f05(0x1f3));_0x453247=_0x1c315f[_0x353f05(0x1a4)](_0x1106b2=>entityToJourneyListItem(_0x1106b2,_0xef60e5));}return this[_0x353f05(0x1e9)](_0x453247,_0x597594?.[_0x353f05(0x206)]);}async[a120_0x208032(0x1db)](_0x233da7,_0x5b5d1e,_0x591bda){const _0x1e28e9=a120_0x208032;if(!_0x5b5d1e)return{'journeys':[],'folders':[]};const _0x2698cf=await this['client'][_0x1e28e9(0x17b)](_0x5b5d1e,0x20,![]),_0x5655ec=_0x2698cf['data'],_0x47efce=_0x5655ec[_0x1e28e9(0x19e)](_0x278ce0=>_0x278ce0['type']===_0x1e28e9(0x1ab)&&_0x278ce0['id']!==_0x5b5d1e),_0x3d16c9=_0x47efce[_0x1e28e9(0x1a4)](_0x45fb6b=>({'id':_0x45fb6b['id'],'name':_0x45fb6b[_0x1e28e9(0x191)]['name']})),_0x54a27e=_0x5655ec[_0x1e28e9(0x19e)](_0x417160=>_0x417160[_0x1e28e9(0x1c6)]==='journey'),_0xd3b5c9=_0x54a27e[_0x1e28e9(0x1a4)](_0x315c56=>entityToJourneyListItem(_0x315c56,_0x233da7));return{'journeys':this[_0x1e28e9(0x1e9)](_0xd3b5c9,_0x591bda?.[_0x1e28e9(0x206)]),'folders':_0x3d16c9};}async[a120_0x208032(0x19f)](_0x4712a4,_0x1fa029){const _0x13afa2=a120_0x208032;let _0x522f6e;try{_0x522f6e=await this[_0x13afa2(0x17d)][_0x13afa2(0x209)](_0x4712a4);}catch(_0x16ff38){if(isHttp404Error(_0x16ff38))return{'journeys':[],'activationStepsById':new Map()};throw _0x16ff38;}const _0x4822f3=_0x522f6e['map'](async _0x556eb3=>{const _0x2f1055=_0x13afa2;return await this['listJourneysWithDetails'](_0x556eb3['id'],_0x1fa029?.[_0x2f1055(0x206)]);}),_0xc30657=await Promise['all'](_0x4822f3),_0xb79371=new Map(),_0x56d88b=[];for(const _0x484418 of _0xc30657){_0x56d88b[_0x13afa2(0x199)](..._0x484418['journeys']);for(const [_0x4ed59b,_0x336060]of _0x484418[_0x13afa2(0x1e6)]){_0xb79371[_0x13afa2(0x20b)](_0x4ed59b,_0x336060);}}const _0x1a9638=new Set(),_0x43a6c4=_0x56d88b[_0x13afa2(0x19e)](_0x449e44=>{const _0x1fec86=_0x13afa2;if(_0x1a9638[_0x1fec86(0x204)](_0x449e44['id']))return![];return _0x1a9638[_0x1fec86(0x180)](_0x449e44['id']),!![];});return{'journeys':this[_0x13afa2(0x1e9)](_0x43a6c4,_0x1fa029?.[_0x13afa2(0x206)]),'activationStepsById':_0xb79371};}async['getJourney'](_0x280dcd){const _0x20c6db=a120_0x208032;try{return await this[_0x20c6db(0x17d)][_0x20c6db(0x1b5)](_0x280dcd);}catch(_0x4e40ac){if(isHttp404Error(_0x4e40ac))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x20c6db(0x1ec)+_0x280dcd,_0x4e40ac);throw _0x4e40ac;}}async[a120_0x208032(0x1f6)](_0x2174c6,_0x3b7a57){const _0x3d60ef=a120_0x208032,_0x32051c=await this[_0x3d60ef(0x1c8)](_0x2174c6),_0x3e3214=_0x32051c[_0x3d60ef(0x1d0)](_0x1a5f19=>_0x1a5f19[_0x3d60ef(0x1fa)][_0x3d60ef(0x17a)]()===_0x3b7a57[_0x3d60ef(0x17a)]());if(!_0x3e3214)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x3d60ef(0x1ec)+_0x3b7a57,undefined,{'helpText':_0x3d60ef(0x1fb)});return _0x3e3214['id'];}async[a120_0x208032(0x17e)](_0x59e05e,_0x211b43){const _0x3c4e46=a120_0x208032;try{return await this[_0x3c4e46(0x17d)][_0x3c4e46(0x1d9)](_0x59e05e,_0x211b43);}catch(_0x21fc32){if(isHttp404Error(_0x21fc32))throw new SDKError(ErrorCode[_0x3c4e46(0x19b)],_0x3c4e46(0x1ec)+_0x59e05e,_0x21fc32);throw _0x21fc32;}}async['getTrafficData'](_0x26fc14,_0x40485d){const _0x144c52=a120_0x208032,_0x2bf111={'from':_0x40485d?.[_0x144c52(0x188)],'to':_0x40485d?.['to'],'limit':_0x40485d?.[_0x144c52(0x1eb)]},_0x2323b9=_0x40485d?.[_0x144c52(0x1c6)]!==_0x144c52(0x1f7);try{const [_0x1f3d65,_0x4b5253]=await Promise[_0x144c52(0x1e5)]([this[_0x144c52(0x1be)](_0x26fc14,_0x40485d?.[_0x144c52(0x1c6)],_0x2bf111),_0x2323b9?this[_0x144c52(0x1b5)](_0x26fc14):undefined]);if(_0x1f3d65[_0x144c52(0x18b)]&&_0x4b5253){const _0x2273cd=buildStageNameMap(_0x4b5253);_0x1f3d65[_0x144c52(0x18b)]=_0x1f3d65[_0x144c52(0x18b)][_0x144c52(0x1a4)](_0x28707=>({..._0x28707,'journeyStageName':_0x2273cd[_0x144c52(0x1c2)](_0x28707['journeyStageId'])??_0x28707[_0x144c52(0x1c3)]}));}return _0x1f3d65;}catch(_0x30e3f6){if(isHttp404Error(_0x30e3f6))throw new SDKError(ErrorCode[_0x144c52(0x19b)],_0x144c52(0x1ec)+_0x26fc14,_0x30e3f6);throw _0x30e3f6;}}async[a120_0x208032(0x1be)](_0x4ec675,_0x5f8c70,_0x4afb21){const _0x3cea38=a120_0x208032;if(_0x5f8c70===_0x3cea38(0x1f7)){const _0x1f3acb=await this[_0x3cea38(0x17d)]['getConversionSankeyChart'](_0x4ec675,_0x4afb21);return{'conversion':_0x1f3acb};}if(_0x5f8c70==='activation'){const _0x2557a3=await this[_0x3cea38(0x17d)][_0x3cea38(0x1bb)](_0x4ec675,_0x4afb21);return{'activation':_0x2557a3};}const [_0x5e8533,_0x43af0f]=await Promise[_0x3cea38(0x1e5)]([this['client'][_0x3cea38(0x1a3)](_0x4ec675,_0x4afb21),this[_0x3cea38(0x17d)]['getActivationSankeyChart'](_0x4ec675,_0x4afb21)]);return{'conversion':_0x5e8533,'activation':_0x43af0f};}async[a120_0x208032(0x1a5)](_0xd82af5){const _0x37befe=a120_0x208032;try{return await this['client'][_0x37befe(0x1a9)](_0xd82af5);}catch(_0x4be5f8){if(isHttp404Error(_0x4be5f8))throw new SDKError(ErrorCode[_0x37befe(0x19b)],'Journey\x20not\x20found:\x20'+_0xd82af5,_0x4be5f8);throw _0x4be5f8;}}async[a120_0x208032(0x1ed)](_0x43ced6){const _0x1ffc98=a120_0x208032;try{return await this[_0x1ffc98(0x17d)][_0x1ffc98(0x1dd)](_0x43ced6);}catch(_0x486427){if(isHttp404Error(_0x486427))throw new SDKError(ErrorCode[_0x1ffc98(0x19b)],_0x1ffc98(0x1ec)+_0x43ced6,_0x486427);throw _0x486427;}}async['create'](_0x3887cb){const _0x5a7244=a120_0x208032;return await this[_0x5a7244(0x17d)][_0x5a7244(0x1b1)](_0x3887cb);}async[a120_0x208032(0x1a7)](_0x440617,_0x2ae99b){const _0x5ecbf7=a120_0x208032;try{return await this[_0x5ecbf7(0x17d)][_0x5ecbf7(0x1f4)](_0x440617,_0x2ae99b);}catch(_0xb7089){if(isHttp404Error(_0xb7089))throw new SDKError(ErrorCode[_0x5ecbf7(0x19b)],_0x5ecbf7(0x1ec)+_0x440617,_0xb7089);throw _0xb7089;}}async[a120_0x208032(0x1df)](_0x5d00bd,_0x5d2f76){const _0x1d556a=a120_0x208032;try{return await this['client'][_0x1d556a(0x1c4)](_0x5d00bd,_0x5d2f76);}catch(_0x53eea2){if(isHttp404Error(_0x53eea2))throw new SDKError(ErrorCode[_0x1d556a(0x192)],_0x1d556a(0x1b3)+_0x5d2f76+_0x1d556a(0x1b9)+_0x5d00bd,_0x53eea2);throw _0x53eea2;}}async[a120_0x208032(0x1c0)](_0x51c49f){const _0x162a76=a120_0x208032;try{return await this['client'][_0x162a76(0x17f)](_0x51c49f);}catch(_0x288d41){if(isHttp404Error(_0x288d41))return[];throw _0x288d41;}}async[a120_0x208032(0x182)](_0x3a83c1){const _0x4dd21c=a120_0x208032,_0xee873f=await this[_0x4dd21c(0x1c0)](_0x3a83c1);return _0xee873f[_0x4dd21c(0x1a4)](flattenJourneyActivation);}async[a120_0x208032(0x1bf)](_0x26491e,_0x37d374){const _0x5e29f7=a120_0x208032;return await this[_0x5e29f7(0x17d)]['createJourneyActivation'](_0x26491e,_0x37d374);}async['getColumnMapping'](_0x3cfeb5){const _0x2b79e7=a120_0x208032,_0x4fbde6=await this[_0x2b79e7(0x1b5)](_0x3cfeb5),_0x5de1f4=generateColumnMapping(_0x4fbde6);return{'journeyId':_0x4fbde6['id'],'journeyName':_0x4fbde6[_0x2b79e7(0x191)][_0x2b79e7(0x185)],'database':_0x2b79e7(0x1a2)+_0x4fbde6[_0x2b79e7(0x191)]['audienceId'],'table':_0x2b79e7(0x187)+_0x4fbde6['id'],'columns':_0x5de1f4};}async[a120_0x208032(0x1e1)](_0x160b49){const _0x53f277=a120_0x208032;return this[_0x53f277(0x17d)]['getJourneyBundle'](_0x160b49);}async['getLatestJourneyId'](_0x5799bc){if(!_0x5799bc)return undefined;try{const _0x107724=await this['getBundle'](_0x5799bc);return _0x107724['latestJourneyId'];}catch{return undefined;}}async[a120_0x208032(0x1d2)](_0x25d227){const _0x43bb94=a120_0x208032,_0x5ed09b=await this[_0x43bb94(0x1b5)](_0x25d227),_0x19958f=_0x5ed09b['attributes'][_0x43bb94(0x1d1)];if(!_0x19958f)return{'bundleId':'','bundleName':_0x5ed09b[_0x43bb94(0x191)][_0x43bb94(0x185)],'bundleDescription':_0x5ed09b[_0x43bb94(0x191)]['description']??null,'latestJourneyId':_0x5ed09b['id'],'versions':[synthesizePreBundleVersion(_0x5ed09b)]};const _0x19b9b0=await this['getBundle'](_0x19958f);return{'bundleId':_0x19958f,'bundleName':_0x19b9b0[_0x43bb94(0x185)],'bundleDescription':_0x19b9b0[_0x43bb94(0x1c5)]??null,'latestJourneyId':_0x19b9b0[_0x43bb94(0x1fe)],'versions':formatVersionsFromBundle(_0x19b9b0)};}async[a120_0x208032(0x1f8)](_0x1f3892){const _0x4adae0=a120_0x208032,_0x193fdd=await this[_0x4adae0(0x1b5)](_0x1f3892),_0x1ba259=_0x193fdd['attributes'][_0x4adae0(0x1d1)];if(!_0x1ba259)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this[_0x4adae0(0x17d)][_0x4adae0(0x1b2)](_0x1ba259);const _0x182b60=await this['client'][_0x4adae0(0x18f)](_0x1ba259),_0x4924b=_0x182b60[_0x4adae0(0x185)]+'\x20v'+(_0x182b60[_0x4adae0(0x200)]+0x1);return this[_0x4adae0(0x17d)]['createJourneyVersion'](_0x1ba259,{'sourceId':_0x1f3892,'attributes':{'name':_0x4924b}});}}
@@ -1 +1 @@
1
- function a121_0x5096(){const _0x3ee8c1=['last_chat_id','1347269hgBvMe','918440TtFnCe','2157185rJFRKo','write','31AetOBu','2139530UuvPWV','3000zgYJEm','18kHBSah','807777oLnGvd','2112840AQVvnx','clear','4xRRtwX'];a121_0x5096=function(){return _0x3ee8c1;};return a121_0x5096();}const a121_0x50d24f=a121_0x174e;(function(_0x589d9c,_0x4ce06f){const _0xdfb75b=a121_0x174e,_0x31d149=_0x589d9c();while(!![]){try{const _0x5e8f2b=parseInt(_0xdfb75b(0xc0))/0x1*(-parseInt(_0xdfb75b(0xc2))/0x2)+-parseInt(_0xdfb75b(0xc4))/0x3*(parseInt(_0xdfb75b(0xc7))/0x4)+-parseInt(_0xdfb75b(0xcb))/0x5+parseInt(_0xdfb75b(0xc5))/0x6+parseInt(_0xdfb75b(0xc9))/0x7+parseInt(_0xdfb75b(0xca))/0x8+parseInt(_0xdfb75b(0xc3))/0x9*(parseInt(_0xdfb75b(0xc1))/0xa);if(_0x5e8f2b===_0x4ce06f)break;else _0x31d149['push'](_0x31d149['shift']());}catch(_0x33837b){_0x31d149['push'](_0x31d149['shift']());}}}(a121_0x5096,0x5309a));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a121_0x50d24f(0xc8),'llm/chat');export function saveLastChatId(_0x1d6f13){const _0x1c42f=a121_0x50d24f;chatIdCache[_0x1c42f(0xbf)](_0x1d6f13);}export function loadLastChatId(){return chatIdCache['read']();}function a121_0x174e(_0x23aee5,_0x4acb40){_0x23aee5=_0x23aee5-0xbf;const _0x5096f3=a121_0x5096();let _0x174e8b=_0x5096f3[_0x23aee5];return _0x174e8b;}export function clearLastChatId(){const _0x4f93a8=a121_0x50d24f;chatIdCache[_0x4f93a8(0xc6)]();}
1
+ const a121_0x1d107a=a121_0x80a0;function a121_0x4adc(){const _0x1cc96f=['last_chat_id','llm/chat','write','307191eblOie','read','65185VbDBXv','733058ACrFBh','1736670ikegAr','5571tEkOYV','328JufXvw','clear','168147JuQQdS','4177236Kyxjns','192FqkYPP','12BHpWbN'];a121_0x4adc=function(){return _0x1cc96f;};return a121_0x4adc();}(function(_0x3fb507,_0x3015ef){const _0x2f19ce=a121_0x80a0,_0x3edebf=_0x3fb507();while(!![]){try{const _0x46e42a=parseInt(_0x2f19ce(0xa8))/0x1+-parseInt(_0x2f19ce(0xab))/0x2+parseInt(_0x2f19ce(0xad))/0x3*(parseInt(_0x2f19ce(0xae))/0x4)+parseInt(_0x2f19ce(0xaa))/0x5*(-parseInt(_0x2f19ce(0xa4))/0x6)+parseInt(_0x2f19ce(0xa2))/0x7+-parseInt(_0x2f19ce(0xa3))/0x8*(parseInt(_0x2f19ce(0xa1))/0x9)+parseInt(_0x2f19ce(0xac))/0xa;if(_0x46e42a===_0x3015ef)break;else _0x3edebf['push'](_0x3edebf['shift']());}catch(_0x398a1e){_0x3edebf['push'](_0x3edebf['shift']());}}}(a121_0x4adc,0x5ef15));import{createTextCache}from'../../utils/local-cache.js';function a121_0x80a0(_0x17d5c6,_0x447a20){_0x17d5c6=_0x17d5c6-0xa1;const _0x4adc5d=a121_0x4adc();let _0x80a0be=_0x4adc5d[_0x17d5c6];return _0x80a0be;}const chatIdCache=createTextCache(a121_0x1d107a(0xa5),a121_0x1d107a(0xa6));export function saveLastChatId(_0x159b9f){const _0x515413=a121_0x1d107a;chatIdCache[_0x515413(0xa7)](_0x159b9f);}export function loadLastChatId(){const _0x43c78=a121_0x1d107a;return chatIdCache[_0x43c78(0xa9)]();}export function clearLastChatId(){const _0x157657=a121_0x1d107a;chatIdCache[_0x157657(0xaf)]();}