@treasuredata/tdx 2026.3.42 → 2026.3.43

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 (219) 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-login-command.js +1 -1
  11. package/dist/commands/cas-command.js +1 -1
  12. package/dist/commands/cas-segment-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-statusline-command.js +1 -1
  16. package/dist/commands/claude-usage-command.js +1 -1
  17. package/dist/commands/command.js +1 -1
  18. package/dist/commands/connection-command.js +1 -1
  19. package/dist/commands/databases.js +1 -1
  20. package/dist/commands/delivery-command.js +1 -1
  21. package/dist/commands/describe.js +1 -1
  22. package/dist/commands/engage-campaign-pull-command.js +1 -1
  23. package/dist/commands/engage-campaign-push-command.js +1 -1
  24. package/dist/commands/engage-campaign-validate-command.js +1 -1
  25. package/dist/commands/engage-command.js +1 -1
  26. package/dist/commands/engage-template-pull-command.js +1 -1
  27. package/dist/commands/engage-template-push-command.js +1 -1
  28. package/dist/commands/engage-template-validate-command.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/journey-command.js +1 -1
  31. package/dist/commands/journey-validate-command.js +1 -1
  32. package/dist/commands/llm-command.js +1 -1
  33. package/dist/commands/mcp-command.js +1 -1
  34. package/dist/commands/parent-segment-command.js +1 -1
  35. package/dist/commands/policy-command.js +1 -1
  36. package/dist/commands/profile-command.js +1 -1
  37. package/dist/commands/profiles-command.js +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.js +1 -1
  56. package/dist/commands/work-command.js +1 -1
  57. package/dist/commands/workflow-command.js +1 -1
  58. package/dist/core/auth.js +1 -1
  59. package/dist/core/command-output.js +1 -1
  60. package/dist/core/config.js +1 -1
  61. package/dist/core/connection-cache.js +1 -1
  62. package/dist/core/constants.js +1 -1
  63. package/dist/core/credential-cache.js +1 -1
  64. package/dist/core/global-context.js +1 -1
  65. package/dist/core/keychain.js +1 -1
  66. package/dist/core/oauth-keychain.js +1 -1
  67. package/dist/core/oauth.js +1 -1
  68. package/dist/core/profile.js +1 -1
  69. package/dist/core/project-config.js +1 -1
  70. package/dist/core/session.js +1 -1
  71. package/dist/core/user-cache.js +1 -1
  72. package/dist/core/version.js +1 -1
  73. package/dist/index.js +1 -1
  74. package/dist/mcp/server.js +1 -1
  75. package/dist/mcp/tools/index.js +1 -1
  76. package/dist/mcp/tools/tdx-run.js +1 -1
  77. package/dist/mcp/tools/tdx-search.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/frontmatter.js +1 -1
  182. package/dist/sdk/workspace/git.js +1 -1
  183. package/dist/sdk/workspace/index.js +1 -1
  184. package/dist/sdk/workspace/templates.js +1 -1
  185. package/dist/sdk/workspace/weekly.js +1 -1
  186. package/dist/sdk/workspace/wikilinks.js +1 -1
  187. package/dist/test-utils/command-runner.js +1 -1
  188. package/dist/test-utils/factories.js +1 -1
  189. package/dist/test-utils/fixtures.js +1 -1
  190. package/dist/test-utils/http-mock.js +1 -1
  191. package/dist/test-utils/index.js +1 -1
  192. package/dist/utils/async.js +1 -1
  193. package/dist/utils/colors.js +1 -1
  194. package/dist/utils/diff.js +1 -1
  195. package/dist/utils/file-permissions.js +1 -1
  196. package/dist/utils/file-reader.js +1 -1
  197. package/dist/utils/github-releases.js +1 -1
  198. package/dist/utils/global-cache.js +1 -1
  199. package/dist/utils/json-loader.js +1 -1
  200. package/dist/utils/local-cache.js +1 -1
  201. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  202. package/dist/utils/logger/formatters/index.js +1 -1
  203. package/dist/utils/logger/handlers/console-handler.js +1 -1
  204. package/dist/utils/logger/handlers/file-handler.js +1 -1
  205. package/dist/utils/logger/handlers/index.js +1 -1
  206. package/dist/utils/logger/handlers/null-handler.js +1 -1
  207. package/dist/utils/logger/index.js +1 -1
  208. package/dist/utils/logger/logger.js +1 -1
  209. package/dist/utils/logger/types.js +1 -1
  210. package/dist/utils/option-validation.js +1 -1
  211. package/dist/utils/process.js +1 -1
  212. package/dist/utils/prompt.js +1 -1
  213. package/dist/utils/spinner.js +1 -1
  214. package/dist/utils/sse-parser.js +1 -1
  215. package/dist/utils/string-utils.js +1 -1
  216. package/dist/utils/table-ref-parser.js +1 -1
  217. package/dist/utils/tdx-logger.js +1 -1
  218. package/dist/utils/version-check.js +1 -1
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- const a142_0x5501f9=a142_0x179d;(function(_0x147419,_0x15e320){const _0xad541b=a142_0x179d,_0x1e02f8=_0x147419();while(!![]){try{const _0x107344=-parseInt(_0xad541b(0x19f))/0x1+parseInt(_0xad541b(0x12a))/0x2+-parseInt(_0xad541b(0x15b))/0x3*(parseInt(_0xad541b(0x144))/0x4)+parseInt(_0xad541b(0x110))/0x5+-parseInt(_0xad541b(0x122))/0x6*(parseInt(_0xad541b(0x11c))/0x7)+parseInt(_0xad541b(0x1ad))/0x8+parseInt(_0xad541b(0x1ae))/0x9;if(_0x107344===_0x15e320)break;else _0x1e02f8['push'](_0x1e02f8['shift']());}catch(_0x100ef7){_0x1e02f8['push'](_0x1e02f8['shift']());}}}(a142_0x5731,0x681c9));import*as a142_0x161d34 from'yaml';import{safeParseYaml}from'./yaml-validator.js';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';import{SegmentDefSchema}from'./types/segment-schema.js';const SCHEDULE_TYPE_TO_REPEAT_UNIT={'daily':a142_0x5501f9(0x18b),'hourly':a142_0x5501f9(0x119),'weekly':'week','monthly':a142_0x5501f9(0x12f),'minutes_interval':a142_0x5501f9(0x17e)},REPEAT_UNIT_TO_SCHEDULE_TYPE={'day':'daily','hour':'hourly','week':a142_0x5501f9(0x16f),'month':a142_0x5501f9(0x170),'minute':a142_0x5501f9(0x164)};function filterRuleAsRuleDef(_0xe3062a){return _0xe3062a;}function ruleDefAsFilterRule(_0x233f17){return _0x233f17;}export function segmentResponseToDefSync(_0x41cf09,_0x2c0e51){const _0x4af0f2=a142_0x5501f9,_0x31b620=_0x41cf09[_0x4af0f2(0x1b6)]&&_0x4af0f2(0x125)in _0x41cf09[_0x4af0f2(0x1b6)]&&_0x41cf09['rule'][_0x4af0f2(0x125)];return{'type':'segment','name':_0x41cf09[_0x4af0f2(0x176)],..._0x41cf09['description']&&{'description':_0x41cf09[_0x4af0f2(0x188)]},..._0x2c0e51&&{'folder':_0x2c0e51},..._0x31b620&&{'rule':apiRuleToYaml(_0x41cf09['rule'])},..._0x41cf09[_0x4af0f2(0x15f)]!==undefined&&{'kind':_0x41cf09[_0x4af0f2(0x15f)]===0x0?_0x4af0f2(0x167):_0x41cf09[_0x4af0f2(0x15f)]===0x1?_0x4af0f2(0x14f):_0x4af0f2(0x1b5)},..._0x41cf09[_0x4af0f2(0x12d)]!==undefined&&{'visible':_0x41cf09[_0x4af0f2(0x12d)]}};}export async function segmentResponseToDef(_0x3f5f92,_0x366c12,_0x29da65){const _0x2c0c56=a142_0x5501f9,_0x2d78ee=segmentResponseToDefSync(_0x3f5f92,_0x29da65);if(!_0x366c12||!_0x366c12['resolveSegmentName'])return _0x2d78ee;return _0x2d78ee['rule']&&(_0x2d78ee['rule']=await resolveRuleSegmentRefs(_0x2d78ee[_0x2c0c56(0x1b6)],_0x366c12['resolveSegmentName'])),_0x2d78ee;}export function apiRuleToYaml(_0x42ff26){const _0x4bded7=a142_0x5501f9,_0x236c47=(_0x42ff26[_0x4bded7(0x18d)]||[])['map'](apiConditionToYaml);if(_0x236c47[_0x4bded7(0x192)]===0x1&&!_0x42ff26['description']&&_0x4bded7(0x125)in _0x236c47[0x0]&&(_0x236c47[0x0][_0x4bded7(0x125)]===_0x4bded7(0x13a)||_0x236c47[0x0][_0x4bded7(0x125)]==='Or')){const _0x32de99=_0x236c47[0x0],_0x461d1c=_0x32de99['description']!==undefined;if(_0x32de99[_0x4bded7(0x125)]===_0x42ff26[_0x4bded7(0x125)]&&_0x32de99[_0x4bded7(0x18d)]&&!_0x461d1c)return{'type':_0x42ff26[_0x4bded7(0x125)],'conditions':_0x32de99[_0x4bded7(0x18d)]};}return{'type':_0x42ff26[_0x4bded7(0x125)],'conditions':_0x236c47,..._0x42ff26['description']&&{'description':_0x42ff26[_0x4bded7(0x188)]}};}export async function resolveRuleSegmentRefs(_0x5d61c4,_0x13da4c){const _0x19505f=a142_0x5501f9;return transformRuleSegmentRefs(_0x5d61c4,_0x13da4c,_0xc3ea99=>/^\d+$/[_0x19505f(0x141)](_0xc3ea99));}async function transformConditionSegmentRefs(_0x168ae2,_0x569daa,_0x7d091b,_0x32dbf5){const _0x141aef=a142_0x5501f9;if(_0x141aef(0x199)in _0x168ae2&&(_0x168ae2[_0x141aef(0x125)]===_0x141aef(0x154)||_0x168ae2[_0x141aef(0x125)]==='exclude')){const _0x95c75c=_0x168ae2;if(_0x7d091b(_0x95c75c[_0x141aef(0x199)]))return{..._0x95c75c,'segment':await _0x569daa(_0x95c75c[_0x141aef(0x199)])};return _0x168ae2;}if(_0x141aef(0x18d)in _0x168ae2&&_0x168ae2[_0x141aef(0x18d)]){const _0x10ea9b=_0x168ae2,_0x9de165=await Promise[_0x141aef(0x13d)](_0x10ea9b[_0x141aef(0x18d)][_0x141aef(0x126)](_0x1d02b0=>transformConditionSegmentRefs(_0x1d02b0,_0x569daa,_0x7d091b,_0x32dbf5)));return{..._0x10ea9b,'conditions':_0x9de165};}if(_0x141aef(0x14a)in _0x168ae2&&_0x168ae2['filter']){const _0x1403e4=_0x168ae2,_0x22e949=await _0x32dbf5(filterRuleAsRuleDef(_0x1403e4[_0x141aef(0x14a)]),_0x569daa);return{..._0x1403e4,'filter':ruleDefAsFilterRule(_0x22e949)};}return _0x168ae2;}async function transformRuleSegmentRefs(_0x241b97,_0x5adb7a,_0x583618){const _0x53f4f5=a142_0x5501f9,_0x3fd3d3=(_0x3771d9,_0x48ef56)=>transformRuleSegmentRefs(_0x3771d9,_0x48ef56,_0x583618),_0x27625d=await Promise[_0x53f4f5(0x13d)](_0x241b97['conditions'][_0x53f4f5(0x126)](_0x36f323=>transformConditionSegmentRefs(_0x36f323,_0x5adb7a,_0x583618,_0x3fd3d3)));return{..._0x241b97,'conditions':_0x27625d};}export async function resolveRuleSegmentIds(_0x4e6690,_0x1bd4e0){const _0x19f319=a142_0x5501f9;return transformRuleSegmentRefs(_0x4e6690,_0x1bd4e0,_0x4dc2f4=>!/^\d+$/[_0x19f319(0x141)](_0x4dc2f4));}function isBehaviorApiCondition(_0x19cb89){const _0x3f8cbd=a142_0x5501f9;if(!_0x19cb89[_0x3f8cbd(0x1a4)]?.[_0x3f8cbd(0x150)]?.[_0x3f8cbd(0x176)])return![];return!![];}function apiConditionToYaml(_0x592836){const _0x35e6e7=a142_0x5501f9;if(_0x592836['type']===_0x35e6e7(0x13a)||_0x592836[_0x35e6e7(0x125)]==='Or'){if(_0x592836[_0x35e6e7(0x18d)]){const _0x47b3b6=_0x592836[_0x35e6e7(0x18d)][_0x35e6e7(0x126)](apiConditionToYaml),_0x1ca0c9=_0x592836[_0x35e6e7(0x188)]!==undefined;if(_0x47b3b6[_0x35e6e7(0x192)]===0x1&&!_0x1ca0c9)return _0x47b3b6[0x0];return{'type':_0x592836[_0x35e6e7(0x125)],'conditions':_0x47b3b6,..._0x592836[_0x35e6e7(0x188)]!==undefined&&{'description':_0x592836['description']}};}}if(_0x592836['type']===_0x35e6e7(0x175)&&_0x592836[_0x35e6e7(0x1a4)]&&_0x592836[_0x35e6e7(0x17c)]){const _0x23ce85=_0x592836[_0x35e6e7(0x1a4)]['aggregation']?buildAggregationDefFromApi(_0x592836['leftValue'][_0x35e6e7(0x13c)]):undefined;if(isBehaviorApiCondition(_0x592836)){const _0x5aa182=_0x592836[_0x35e6e7(0x1a4)]['source'][_0x35e6e7(0x176)];return{'type':'Behavior','attribute':'','operator':apiOperatorToYaml(_0x592836[_0x35e6e7(0x17c)]),..._0x592836[_0x35e6e7(0x17f)]&&_0x592836[_0x35e6e7(0x17f)]!==_0x35e6e7(0x15c)?{'arrayMatching':_0x592836[_0x35e6e7(0x17f)]}:{},..._0x592836[_0x35e6e7(0x1b4)]?{'exclude':_0x592836[_0x35e6e7(0x1b4)]}:{},..._0x23ce85?{'aggregation':_0x23ce85}:{},'source':_0x5aa182,..._0x592836['leftValue'][_0x35e6e7(0x14a)]?{'filter':apiRuleToYaml(_0x592836['leftValue'][_0x35e6e7(0x14a)])}:{},..._0x592836[_0x35e6e7(0x160)]!==undefined&&_0x592836[_0x35e6e7(0x160)]!==null?{'limit':_0x592836['limit']}:{}};}return{'type':_0x35e6e7(0x175),'attribute':_0x592836[_0x35e6e7(0x1a4)][_0x35e6e7(0x176)]||'','operator':apiOperatorToYaml(_0x592836[_0x35e6e7(0x17c)]),..._0x592836[_0x35e6e7(0x17f)]&&_0x592836[_0x35e6e7(0x17f)]!=='any'?{'arrayMatching':_0x592836[_0x35e6e7(0x17f)]}:{},..._0x592836['exclude']?{'exclude':_0x592836['exclude']}:{},..._0x23ce85?{'aggregation':_0x23ce85}:{},..._0x592836[_0x35e6e7(0x1a4)][_0x35e6e7(0x14a)]?{'filter':apiRuleToYaml(_0x592836[_0x35e6e7(0x1a4)]['filter'])}:{},..._0x592836[_0x35e6e7(0x160)]!==undefined&&_0x592836[_0x35e6e7(0x160)]!==null?{'limit':_0x592836[_0x35e6e7(0x160)]}:{}};}if(_0x592836[_0x35e6e7(0x125)]===_0x35e6e7(0x189)&&_0x592836[_0x35e6e7(0x136)]&&_0x592836[_0x35e6e7(0x17c)])return{'type':_0x35e6e7(0x189),'column':_0x592836[_0x35e6e7(0x136)],'operator':apiOperatorToYaml(_0x592836[_0x35e6e7(0x17c)])};if(_0x592836['type']===_0x35e6e7(0x179)&&_0x592836['id'])return{'type':_0x592836[_0x35e6e7(0x1b4)]?'exclude':_0x35e6e7(0x154),'segment':_0x592836['id']};return{'type':_0x35e6e7(0x13a),'conditions':[]};}function isTemporalOperator(_0x139ea3){const _0x284211=a142_0x5501f9;return _0x139ea3===_0x284211(0x11d)||_0x139ea3==='TimeWithinNext';}function isBetweenOperator(_0x25973){const _0x25fec9=a142_0x5501f9;return _0x25973===_0x25fec9(0x12e);}function getEffectiveValue(_0x15c22c){const _0x5d8b9d=a142_0x5501f9,_0x10b3a2=_0x15c22c[_0x5d8b9d(0x15d)];return _0x15c22c[_0x5d8b9d(0x116)]??_0x10b3a2;}function parseNumericValue(_0x43234b){const _0x2ebaa6=a142_0x5501f9;if(typeof _0x43234b==='object'&&_0x43234b!==null)return _0x43234b;if(_0x43234b==='')return _0x43234b;const _0x4ec5fb=Number(_0x43234b);return Number[_0x2ebaa6(0x14b)](_0x4ec5fb)?_0x4ec5fb:_0x43234b;}function apiOperatorToYaml(_0x59a524){const _0xf27377=a142_0x5501f9;if(isBetweenOperator(_0x59a524[_0xf27377(0x125)]))return{'type':mapApiOperatorType(_0x59a524['type']),..._0x59a524[_0xf27377(0x168)]!==undefined&&{'not':_0x59a524[_0xf27377(0x168)]},..._0x59a524[_0xf27377(0x137)]!==undefined&&{'min':parseNumericValue(_0x59a524['minValue'])},..._0x59a524[_0xf27377(0x151)]!==undefined&&{'max':parseNumericValue(_0x59a524[_0xf27377(0x151)])}};if(_0x59a524[_0xf27377(0x125)]===_0xf27377(0x16e))return{'type':'TimeRange',..._0x59a524[_0xf27377(0x168)]!==undefined&&{'not':_0x59a524[_0xf27377(0x168)]},..._0x59a524[_0xf27377(0x180)]!==undefined&&{'duration':_0x59a524[_0xf27377(0x180)]},..._0x59a524[_0xf27377(0x1b3)]!==undefined&&{'from':_0x59a524[_0xf27377(0x1b3)]},..._0x59a524[_0xf27377(0x178)]!==undefined&&{'reverse':_0x59a524[_0xf27377(0x178)]}};let _0xc2f9b1;if(_0x59a524[_0xf27377(0x174)]&&_0x59a524['rightValues']['length']>0x0)_0xc2f9b1=_0x59a524['rightValues'];else{if(_0x59a524[_0xf27377(0x111)]!==undefined)_0xc2f9b1=_0x59a524[_0xf27377(0x111)];else isTemporalOperator(_0x59a524['type'])&&_0x59a524[_0xf27377(0x116)]!==undefined&&(_0xc2f9b1=_0x59a524[_0xf27377(0x116)]);}return{'type':mapApiOperatorType(_0x59a524[_0xf27377(0x125)]),..._0x59a524['not']!==undefined&&{'not':_0x59a524[_0xf27377(0x168)]},..._0xc2f9b1!==undefined&&{'value':_0xc2f9b1},..._0x59a524[_0xf27377(0x1b1)]!==undefined&&{'unit':_0x59a524['unit']}};}function mapApiOperatorType(_0x34965a){return _0x34965a;}export function segmentDefToCreateRequest(_0x378371,_0x38030c){const _0x171401=a142_0x5501f9,_0x166151={'name':_0x378371['name']};return _0x378371[_0x171401(0x188)]&&(_0x166151[_0x171401(0x188)]=_0x378371[_0x171401(0x188)]),_0x378371[_0x171401(0x1b6)]&&(_0x166151[_0x171401(0x1b6)]=yamlRuleToApi(_0x378371[_0x171401(0x1b6)])),_0x378371[_0x171401(0x15f)]&&(_0x166151[_0x171401(0x15f)]=_0x378371[_0x171401(0x15f)]===_0x171401(0x167)?0x0:_0x378371[_0x171401(0x15f)]==='realtime'?0x1:0x2),_0x378371['visible']!==undefined&&(_0x166151[_0x171401(0x12d)]=_0x378371[_0x171401(0x112)]),_0x38030c&&(_0x166151['segmentFolderId']=_0x38030c),_0x166151;}export function segmentDefToUpdateRequest(_0x3aa4b2){const _0x26d3b3=a142_0x5501f9,_0x36ec6c={'name':_0x3aa4b2['name']};return _0x3aa4b2['description']!==undefined&&(_0x36ec6c[_0x26d3b3(0x188)]=_0x3aa4b2['description']),_0x3aa4b2['rule']&&(_0x36ec6c['rule']=yamlRuleToApi(_0x3aa4b2[_0x26d3b3(0x1b6)])),_0x3aa4b2['kind']&&(_0x36ec6c[_0x26d3b3(0x15f)]=_0x3aa4b2['kind']==='batch'?0x0:_0x3aa4b2[_0x26d3b3(0x15f)]==='realtime'?0x1:0x2),_0x36ec6c;}export function yamlRuleToApi(_0x3a8eee){const _0x313280=a142_0x5501f9,_0x10e547=_0x3a8eee['conditions'][_0x313280(0x126)](yamlConditionToApi),_0x592214=_0x10e547[_0x313280(0x19e)](_0x34b8b6=>(_0x34b8b6[_0x313280(0x125)]===_0x313280(0x13a)||_0x34b8b6[_0x313280(0x125)]==='Or')&&_0x34b8b6[_0x313280(0x188)]!==undefined);if(!_0x592214&&_0x10e547[_0x313280(0x192)]>0x0)return{'type':_0x3a8eee['type'],'conditions':_0x10e547[_0x313280(0x126)](_0x274f14=>({'type':_0x313280(0x13a),'description':_0x3a8eee[_0x313280(0x188)]||'','conditions':[_0x274f14]}))};return{'type':_0x3a8eee['type'],'conditions':_0x10e547,..._0x3a8eee[_0x313280(0x188)]&&{'description':_0x3a8eee[_0x313280(0x188)]}};}function yamlFilterRuleToApi(_0x4fd7c6){const _0x2cc5d4=a142_0x5501f9,_0x1f8fd3=_0x4fd7c6[_0x2cc5d4(0x18d)]['map'](yamlConditionToApi);return{'type':_0x4fd7c6[_0x2cc5d4(0x125)],'conditions':_0x1f8fd3};}function yamlConditionToApi(_0x56a86f){const _0xf8a024=a142_0x5501f9;if(_0xf8a024(0x199)in _0x56a86f&&(_0x56a86f[_0xf8a024(0x125)]===_0xf8a024(0x154)||_0x56a86f[_0xf8a024(0x125)]===_0xf8a024(0x1b4))){const _0x2e9b45=_0x56a86f;return{'type':_0xf8a024(0x179),'id':_0x2e9b45[_0xf8a024(0x199)],'exclude':_0x2e9b45[_0xf8a024(0x125)]===_0xf8a024(0x1b4)};}if(_0xf8a024(0x125)in _0x56a86f&&(_0x56a86f[_0xf8a024(0x125)]===_0xf8a024(0x13a)||_0x56a86f[_0xf8a024(0x125)]==='Or')){const _0x5d7ff6=_0x56a86f;return{'type':_0x5d7ff6[_0xf8a024(0x125)],'conditions':_0x5d7ff6[_0xf8a024(0x18d)][_0xf8a024(0x126)](yamlConditionToApi),..._0x5d7ff6[_0xf8a024(0x188)]&&{'description':_0x5d7ff6[_0xf8a024(0x188)]}};}if('column'in _0x56a86f&&_0x56a86f[_0xf8a024(0x125)]==='Column'){const _0x1e3c5e=_0x56a86f;return{'type':_0xf8a024(0x189),'column':_0x1e3c5e[_0xf8a024(0x136)],'operator':yamlOperatorToApi(_0x1e3c5e[_0xf8a024(0x17c)])};}const _0x58cf2e=_0x56a86f,_0x1a0574={'type':_0xf8a024(0x175),'leftValue':buildLeftValue(_0x58cf2e),'operator':yamlOperatorToApi(_0x58cf2e[_0xf8a024(0x17c)]),'exclude':_0x58cf2e[_0xf8a024(0x1b4)]??![],'arrayMatching':_0x58cf2e[_0xf8a024(0x17f)]??_0xf8a024(0x15c)};return _0x58cf2e[_0xf8a024(0x160)]!==undefined&&(_0x1a0574[_0xf8a024(0x160)]=_0x58cf2e[_0xf8a024(0x160)]),_0x1a0574;}function buildAggregationDefFromApi(_0x1c0854){const _0x2deaeb=a142_0x5501f9,_0xbb2a24=_0x1c0854[_0x2deaeb(0x125)];if(_0xbb2a24===_0x2deaeb(0x14e))return{'type':_0xbb2a24,'columns':_0x1c0854['columns']??[]};if(_0xbb2a24===_0x2deaeb(0x17a)||_0xbb2a24==='Last')return{'type':_0xbb2a24,'column':_0x1c0854[_0x2deaeb(0x136)]??'','orderColumn':_0x1c0854[_0x2deaeb(0x146)]??'',..._0x1c0854[_0x2deaeb(0x128)]&&{'groupingColumns':_0x1c0854['groupingColumns']}};if(_0xbb2a24===_0x2deaeb(0x145))return{'type':_0xbb2a24,..._0x1c0854['groupingColumns']&&{'groupingColumns':_0x1c0854[_0x2deaeb(0x128)]}};return{'type':_0xbb2a24,'column':_0x1c0854[_0x2deaeb(0x136)]??'',..._0x1c0854[_0x2deaeb(0x128)]&&{'groupingColumns':_0x1c0854[_0x2deaeb(0x128)]}};}function buildLeftValue(_0x534910){const _0x36c8f5=a142_0x5501f9,_0x286417={};_0x534910[_0x36c8f5(0x11a)]&&_0x534910[_0x36c8f5(0x125)]!==_0x36c8f5(0x117)&&(_0x286417[_0x36c8f5(0x176)]=_0x534910['attribute']);if(_0x534910[_0x36c8f5(0x13c)]){const _0x25a1ff=_0x534910['aggregation'];if(_0x25a1ff[_0x36c8f5(0x125)]==='CountDistinct')_0x286417[_0x36c8f5(0x13c)]={'type':_0x36c8f5(0x14e),'columns':_0x25a1ff[_0x36c8f5(0x155)]};else{if(_0x25a1ff['type']==='First'||_0x25a1ff[_0x36c8f5(0x125)]==='Last')_0x286417[_0x36c8f5(0x13c)]={'type':_0x25a1ff['type'],'column':_0x25a1ff['column'],'orderColumn':_0x25a1ff[_0x36c8f5(0x146)],..._0x25a1ff['groupingColumns']&&{'groupingColumns':_0x25a1ff[_0x36c8f5(0x128)]}};else _0x25a1ff[_0x36c8f5(0x125)]===_0x36c8f5(0x145)?_0x286417['aggregation']={'type':_0x36c8f5(0x145),..._0x25a1ff[_0x36c8f5(0x128)]&&{'groupingColumns':_0x25a1ff[_0x36c8f5(0x128)]}}:_0x286417['aggregation']={'type':_0x25a1ff[_0x36c8f5(0x125)],'column':_0x25a1ff[_0x36c8f5(0x136)],..._0x25a1ff['groupingColumns']&&{'groupingColumns':_0x25a1ff['groupingColumns']}};}}return _0x534910[_0x36c8f5(0x150)]&&(_0x286417[_0x36c8f5(0x150)]={'name':_0x534910[_0x36c8f5(0x150)]}),_0x534910[_0x36c8f5(0x14a)]&&(_0x286417[_0x36c8f5(0x14a)]=yamlFilterRuleToApi(filterRuleAsRuleDef(_0x534910[_0x36c8f5(0x14a)]))),_0x286417;}function yamlOperatorToApi(_0x19dcbd){const _0x584c77=a142_0x5501f9,_0x1c1368={'type':mapYamlOperatorType(_0x19dcbd[_0x584c77(0x125)]),'not':_0x19dcbd[_0x584c77(0x168)]??![]};if(isBetweenOperator(_0x19dcbd[_0x584c77(0x125)]))return _0x19dcbd[_0x584c77(0x195)]!==undefined&&(_0x1c1368['minValue']=typeof _0x19dcbd['min']===_0x584c77(0x124)?_0x19dcbd[_0x584c77(0x195)]:String(_0x19dcbd[_0x584c77(0x195)])),_0x19dcbd[_0x584c77(0x171)]!==undefined&&(_0x1c1368['maxValue']=typeof _0x19dcbd[_0x584c77(0x171)]===_0x584c77(0x124)?_0x19dcbd['max']:String(_0x19dcbd['max'])),_0x1c1368;if(_0x19dcbd[_0x584c77(0x125)]===_0x584c77(0x16e))return _0x19dcbd[_0x584c77(0x180)]&&(_0x1c1368[_0x584c77(0x180)]=_0x19dcbd[_0x584c77(0x180)]),_0x19dcbd[_0x584c77(0x1b3)]&&(_0x1c1368[_0x584c77(0x1b3)]=_0x19dcbd[_0x584c77(0x1b3)]),_0x19dcbd[_0x584c77(0x178)]!==undefined&&(_0x1c1368['reverse']=_0x19dcbd[_0x584c77(0x178)]),_0x1c1368;const _0xf6b016=getEffectiveValue(_0x19dcbd);if(_0xf6b016!==undefined){if(Array[_0x584c77(0x19d)](_0xf6b016))_0x1c1368[_0x584c77(0x174)]=_0xf6b016;else isTemporalOperator(_0x19dcbd['type'])?_0x1c1368[_0x584c77(0x116)]=_0xf6b016:_0x1c1368[_0x584c77(0x111)]=_0xf6b016;}return _0x19dcbd[_0x584c77(0x1b1)]&&(_0x1c1368[_0x584c77(0x1b1)]=_0x19dcbd[_0x584c77(0x1b1)]),_0x1c1368;}function mapYamlOperatorType(_0x34d8da){return _0x34d8da;}function a142_0x5731(){const _0x2742ca=['2143360nsYirV','13046292NPRIHb','add','localRuleToName','unit','forEach','from','exclude','funnel_stage','rule','order_by','repeatSubFrequency','2056265jInELs','rightValue','visible','joinRow','getSchema','start_at','value','Behavior','notifyOn','hour','attribute','connectionNameToTypeMap','1491JxuzYl','TimeWithinPast','folder','entries','string','has','21198eTpSfL','join_strategy','object','type','map','Connector:\x20','groupingColumns','valid','529962SidfQN','JOURNEY_SYNTAX_ERROR','schedule','isVisible','Between','month','startAt','connectorConfig','toLowerCase','push','email_recipients','end_on','column','minValue','activationTemplateId','\x22:\x0a','And','nestedWorkflowProjectName','aggregation','all','repeat_sub_frequency','nestedWorkflowName','errors','test','formatting','join_row','1868ScPptu','Count','orderColumn','syndicationBehavior','Invalid\x20connector_config\x20for\x20activation\x20\x22','warn','filter','isFinite','lockEnabled','timezone','CountDistinct','realtime','source','maxValue','replace','endOn','include','columns','stringify','INVALID_ARGUMENT','nested_workflow_name','orderBy','Unknown\x20email\x20recipient:\x20','2733cjvJAL','any','values','notification','kind','limit','null','activation_template_id','connector_config','minutes_interval','\x0a\x0aAvailable\x20fields:\x0a','keys','batch','not','Equal','connector_config\x20for\x20activation\x20\x22','conditions[','connection','__UNRESOLVED__','TimeRange','weekly','monthly','max','localeCompare','connectionId','rightValues','Value','name','warnings','reverse','Reference','First','emailToIdMap','operator','rule:','minute','arrayMatching','duration','connectionNameToIdMap','Please\x20specify\x20a\x20valid\x20attribute\x20name.','run_after_journey_refresh','repeat_unit','emailRecipients','set','behavior_table','description','Column','usedNames','day','CONNECTOR_INVALID_CONFIG','conditions','lock_enabled','get','attributes','].attribute\x20cannot\x20be\x20empty.\x0a','length','activationParams','nested_workflow_project_name','min','cron','ruleHashToName','sort','segment','allColumns','Unknown\x20connection:\x20','scheduleOption','isArray','every','789335vQRfPn','behavior','visibility','behaviorTableName','scheduleType','leftValue','activations:','notify_on','all_columns','repeatFrequency','\x27:\x20','repeat_frequency','joinStrategy','repeatUnit'];a142_0x5731=function(){return _0x2742ca;};return a142_0x5731();}export function toYamlString(_0x50cc05){const _0x28321d=a142_0x5501f9,_0x305e97=JSON['parse'](JSON['stringify'](_0x50cc05)),_0x58c65b=a142_0x161d34[_0x28321d(0x156)](_0x305e97,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x5e590e=[_0x28321d(0x17d)];let _0x42bf10=_0x58c65b;for(const _0x367f8e of _0x5e590e){_0x42bf10=_0x42bf10[_0x28321d(0x152)](new RegExp('^('+_0x367f8e+')','m'),(_0xb0995c,_0x1f202e,_0x4ba07a)=>{if(_0x4ba07a===0x0||_0x42bf10[_0x4ba07a-0x1]==='\x0a'&&_0x42bf10[_0x4ba07a-0x2]==='\x0a')return _0x1f202e;return'\x0a'+_0x1f202e;});}return _0x42bf10;}export function parseYamlString(_0x37b7c4){return parseSegmentYamlFile(_0x37b7c4);}export function isSegmentYaml(_0x322a12){const _0x14f395=a142_0x5501f9;if(typeof _0x322a12!==_0x14f395(0x124)||_0x322a12===null)return![];const _0x1dbb33=_0x322a12;return _0x1dbb33['type']===_0x14f395(0x199)||_0x1dbb33[_0x14f395(0x125)]===undefined;}export function generateTemplate(_0x1a2aef='New\x20Segment'){const _0x3505c8=a142_0x5501f9,_0x28af0b={'type':_0x3505c8(0x199),'name':_0x1a2aef,'description':'Segment\x20description','rule':{'type':_0x3505c8(0x13a),'conditions':[{'type':'Value','attribute':'attribute_name','operator':{'type':_0x3505c8(0x169),'value':_0x3505c8(0x116)}}]}};return toYamlString(_0x28af0b);}export function segmentToYamlString(_0x2d452b){const _0x150fef=a142_0x5501f9,_0x307588=JSON['parse'](JSON[_0x150fef(0x156)](_0x2d452b)),_0x37fb81=a142_0x161d34[_0x150fef(0x156)](_0x307588,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x150fef(0x161)}),_0x3976be=[_0x150fef(0x17d),_0x150fef(0x1a5)];let _0x5c1f4a=_0x37fb81;for(const _0x32da93 of _0x3976be){_0x5c1f4a=_0x5c1f4a[_0x150fef(0x152)](new RegExp('^('+_0x32da93+')','m'),(_0x3c846b,_0x5ba169,_0x1518df)=>{if(_0x1518df===0x0||_0x5c1f4a[_0x1518df-0x1]==='\x0a'&&_0x5c1f4a[_0x1518df-0x2]==='\x0a')return _0x5ba169;return'\x0a'+_0x5ba169;});}return _0x5c1f4a;}export function parseSegmentYamlFile(_0x21c044){return safeParseYaml(_0x21c044,SegmentDefSchema);}export function normalizeChildSegmentYaml(_0xc31116){const _0x5e7512=a142_0x5501f9;return{'type':'segment','name':_0xc31116[_0x5e7512(0x176)],..._0xc31116['description']!==undefined&&{'description':_0xc31116['description']},..._0xc31116[_0x5e7512(0x11e)]!==undefined&&{'folder':_0xc31116[_0x5e7512(0x11e)]},..._0xc31116[_0x5e7512(0x1b6)]&&{'rule':normalizeRule(_0xc31116['rule'])},..._0xc31116[_0x5e7512(0x15f)]!==undefined&&{'kind':_0xc31116['kind']},..._0xc31116[_0x5e7512(0x112)]!==undefined&&{'visible':_0xc31116['visible']},..._0xc31116['activations']&&{'activations':_0xc31116['activations'][_0x5e7512(0x126)](normalizeActivation)}};}export function normalizeRule(_0xe5a06e){const _0x307951=a142_0x5501f9;return{'type':_0xe5a06e['type'],'conditions':_0xe5a06e[_0x307951(0x18d)][_0x307951(0x126)](normalizeCondition),..._0xe5a06e['description']!==undefined&&{'description':_0xe5a06e[_0x307951(0x188)]}};}function normalizeCondition(_0x11aab5){const _0x30a989=a142_0x5501f9;if(_0x30a989(0x199)in _0x11aab5&&(_0x11aab5[_0x30a989(0x125)]==='include'||_0x11aab5[_0x30a989(0x125)]===_0x30a989(0x1b4))){const _0x47bdd2=_0x11aab5;return{'type':_0x47bdd2[_0x30a989(0x125)],'segment':_0x47bdd2[_0x30a989(0x199)]};}if(_0x30a989(0x125)in _0x11aab5&&(_0x11aab5[_0x30a989(0x125)]===_0x30a989(0x13a)||_0x11aab5[_0x30a989(0x125)]==='Or')){const _0xf1ca0e=_0x11aab5;return{'type':_0xf1ca0e[_0x30a989(0x125)],'conditions':_0xf1ca0e[_0x30a989(0x18d)]['map'](normalizeCondition),..._0xf1ca0e[_0x30a989(0x188)]!==undefined&&{'description':_0xf1ca0e[_0x30a989(0x188)]}};}if(_0x30a989(0x136)in _0x11aab5&&_0x11aab5[_0x30a989(0x125)]===_0x30a989(0x189)){const _0x4740d7=_0x11aab5;return{'type':'Column','column':_0x4740d7['column'],'operator':normalizeOperator(_0x4740d7[_0x30a989(0x17c)])};}const _0x2b95c6=_0x11aab5;return{'type':'Value','attribute':_0x2b95c6['attribute'],'operator':normalizeOperator(_0x2b95c6['operator']),..._0x2b95c6['arrayMatching']!==undefined&&{'arrayMatching':_0x2b95c6[_0x30a989(0x17f)]},..._0x2b95c6['exclude']!==undefined&&{'exclude':_0x2b95c6[_0x30a989(0x1b4)]},..._0x2b95c6[_0x30a989(0x13c)]!==undefined&&{'aggregation':_0x2b95c6[_0x30a989(0x13c)]},..._0x2b95c6[_0x30a989(0x150)]!==undefined&&{'source':_0x2b95c6[_0x30a989(0x150)]},..._0x2b95c6[_0x30a989(0x14a)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x2b95c6['filter'])))},..._0x2b95c6[_0x30a989(0x160)]!==undefined&&{'limit':_0x2b95c6[_0x30a989(0x160)]}};}function normalizeOperator(_0x4f2714){const _0xf4f23e=a142_0x5501f9;if(isBetweenOperator(_0x4f2714['type']))return{'type':_0x4f2714[_0xf4f23e(0x125)],..._0x4f2714[_0xf4f23e(0x168)]!==undefined&&{'not':_0x4f2714[_0xf4f23e(0x168)]},..._0x4f2714[_0xf4f23e(0x195)]!==undefined&&{'min':_0x4f2714[_0xf4f23e(0x195)]},..._0x4f2714[_0xf4f23e(0x171)]!==undefined&&{'max':_0x4f2714[_0xf4f23e(0x171)]}};const _0x2c5360=getEffectiveValue(_0x4f2714);return{'type':_0x4f2714[_0xf4f23e(0x125)],..._0x4f2714[_0xf4f23e(0x168)]!==undefined&&{'not':_0x4f2714[_0xf4f23e(0x168)]},..._0x2c5360!==undefined&&{'value':_0x2c5360},..._0x4f2714[_0xf4f23e(0x1b1)]!==undefined&&{'unit':_0x4f2714[_0xf4f23e(0x1b1)]},..._0x4f2714['duration']!==undefined&&{'duration':_0x4f2714[_0xf4f23e(0x180)]},..._0x4f2714[_0xf4f23e(0x1b3)]!==undefined&&{'from':_0x4f2714[_0xf4f23e(0x1b3)]},..._0x4f2714['reverse']!==undefined&&{'reverse':_0x4f2714[_0xf4f23e(0x178)]}};}function normalizeActivation(_0x8e75c8){const _0xdafaca=a142_0x5501f9;return{'name':_0x8e75c8[_0xdafaca(0x176)],'connection':_0x8e75c8[_0xdafaca(0x16c)],..._0x8e75c8[_0xdafaca(0x188)]!==undefined&&{'description':_0x8e75c8['description']},..._0x8e75c8[_0xdafaca(0x1a7)]!==undefined&&{'all_columns':_0x8e75c8[_0xdafaca(0x1a7)]},..._0x8e75c8[_0xdafaca(0x155)]!==undefined&&{'columns':_0x8e75c8[_0xdafaca(0x155)]},..._0x8e75c8['behavior']!==undefined&&{'behavior':_0x8e75c8[_0xdafaca(0x1a0)]},..._0x8e75c8[_0xdafaca(0x12c)]!==undefined&&{'schedule':_0x8e75c8['schedule']},..._0x8e75c8[_0xdafaca(0x15e)]!==undefined&&{'notification':_0x8e75c8[_0xdafaca(0x15e)]},..._0x8e75c8[_0xdafaca(0x163)]!==undefined&&{'connector_config':_0x8e75c8[_0xdafaca(0x163)]},..._0x8e75c8[_0xdafaca(0x162)]!==undefined&&{'activation_template_id':_0x8e75c8[_0xdafaca(0x162)]},..._0x8e75c8[_0xdafaca(0x194)]!==undefined&&{'nested_workflow_project_name':_0x8e75c8[_0xdafaca(0x194)]},..._0x8e75c8[_0xdafaca(0x158)]!==undefined&&{'nested_workflow_name':_0x8e75c8[_0xdafaca(0x158)]},..._0x8e75c8[_0xdafaca(0x18e)]!==undefined&&{'lock_enabled':_0x8e75c8[_0xdafaca(0x18e)]}};}function getColumnName(_0x966afc){const _0x260321=a142_0x5501f9;return _0x966afc[_0x260321(0x136)]||_0x966afc[_0x260321(0x176)];}export function activationResponseToDef(_0x1f6234,_0x1b4a3a,_0x2a339b){const _0x9c6a16=a142_0x5501f9,_0x3f9a90=_0x1f6234['connectionId']||'',_0x151672=_0x2a339b?.[_0x9c6a16(0x18f)](_0x3f9a90)??_0x3f9a90,_0x3de3a9={'name':_0x1f6234['name'],'connection':_0x151672};_0x1f6234[_0x9c6a16(0x188)]&&(_0x3de3a9[_0x9c6a16(0x188)]=_0x1f6234[_0x9c6a16(0x188)]);let _0x4e3c17=[];_0x1f6234[_0x9c6a16(0x155)]&&_0x1f6234[_0x9c6a16(0x155)][_0x9c6a16(0x192)]>0x0&&(_0x4e3c17=_0x1f6234[_0x9c6a16(0x155)][_0x9c6a16(0x14a)](_0x47f1df=>_0x47f1df&&getColumnName(_0x47f1df))[_0x9c6a16(0x126)](_0x14db8a=>{const _0xaf01d0=_0x9c6a16,_0x4d2371=getColumnName(_0x14db8a);if(_0x14db8a[_0xaf01d0(0x125)]||_0x14db8a[_0xaf01d0(0x1a1)])return{'name':_0x4d2371,..._0x14db8a[_0xaf01d0(0x125)]&&{'type':_0x14db8a[_0xaf01d0(0x125)]},..._0x14db8a['visibility']&&{'visibility':_0x14db8a[_0xaf01d0(0x1a1)]}};return _0x4d2371;}));_0x4e3c17[_0x9c6a16(0x192)]>0x0&&(_0x3de3a9['columns']=_0x4e3c17);_0x1f6234[_0x9c6a16(0x19a)]!==undefined&&(_0x1f6234[_0x9c6a16(0x19a)]===![]&&_0x4e3c17[_0x9c6a16(0x192)]===0x0?_0x3de3a9[_0x9c6a16(0x1a7)]=!![]:_0x3de3a9[_0x9c6a16(0x1a7)]=_0x1f6234[_0x9c6a16(0x19a)]);const _0x4070d0={};let _0x576f7a=![];_0x1f6234[_0x9c6a16(0x1a3)]&&(_0x4070d0['type']=_0x1f6234['scheduleType'],_0x576f7a=!![]);_0x1f6234[_0x9c6a16(0x1ac)]&&(_0x4070d0[_0x9c6a16(0x184)]=_0x1f6234[_0x9c6a16(0x1ac)],_0x576f7a=!![]);_0x1f6234['repeatFrequency']!==undefined&&_0x1f6234['repeatFrequency']!==null&&(_0x4070d0['repeat_frequency']=_0x1f6234['repeatFrequency'],_0x576f7a=!![]);_0x1f6234['repeatSubFrequency']&&_0x1f6234[_0x9c6a16(0x1b8)]['length']>0x0&&(_0x4070d0['repeat_sub_frequency']=_0x1f6234['repeatSubFrequency'],_0x576f7a=!![]);_0x1f6234['startAt']!==undefined&&(_0x4070d0[_0x9c6a16(0x115)]=_0x1f6234[_0x9c6a16(0x130)],_0x576f7a=!![]);_0x1f6234['endOn']!==undefined&&(_0x4070d0[_0x9c6a16(0x135)]=_0x1f6234[_0x9c6a16(0x153)],_0x576f7a=!![]);_0x1f6234[_0x9c6a16(0x14d)]&&(_0x4070d0[_0x9c6a16(0x14d)]=_0x1f6234[_0x9c6a16(0x14d)],_0x576f7a=!![]);_0x576f7a&&(_0x3de3a9[_0x9c6a16(0x12c)]=_0x4070d0);(_0x1f6234[_0x9c6a16(0x118)]&&_0x1f6234[_0x9c6a16(0x118)][_0x9c6a16(0x192)]>0x0||_0x1f6234[_0x9c6a16(0x185)]&&_0x1f6234[_0x9c6a16(0x185)][_0x9c6a16(0x192)]>0x0)&&(_0x3de3a9[_0x9c6a16(0x15e)]={},_0x1f6234[_0x9c6a16(0x118)]&&_0x1f6234[_0x9c6a16(0x118)]['length']>0x0&&(_0x3de3a9[_0x9c6a16(0x15e)][_0x9c6a16(0x1a6)]=_0x1f6234[_0x9c6a16(0x118)]),_0x1f6234[_0x9c6a16(0x185)]&&_0x1f6234['emailRecipients']['length']>0x0&&(_0x3de3a9[_0x9c6a16(0x15e)][_0x9c6a16(0x134)]=_0x1f6234[_0x9c6a16(0x185)][_0x9c6a16(0x126)](_0x5703d9=>{const _0x12479a=_0x9c6a16,_0x3aa92a=_0x1b4a3a?.[_0x12479a(0x18f)](_0x5703d9);return _0x3aa92a??String(_0x5703d9);})));_0x1f6234['connectorConfig']&&Object[_0x9c6a16(0x166)](_0x1f6234[_0x9c6a16(0x131)])['length']>0x0&&(_0x3de3a9[_0x9c6a16(0x163)]=normalizeConnectorConfigForYaml(_0x1f6234[_0x9c6a16(0x131)]));_0x1f6234[_0x9c6a16(0x138)]&&(_0x3de3a9[_0x9c6a16(0x162)]=_0x1f6234['activationTemplateId']);if(_0x1f6234[_0x9c6a16(0x147)]){const _0x56ef99={},_0x4d2896=_0x1f6234[_0x9c6a16(0x147)];_0x4d2896[_0x9c6a16(0x155)]&&_0x4d2896['columns'][_0x9c6a16(0x192)]>0x0&&(_0x56ef99[_0x9c6a16(0x155)]=_0x4d2896[_0x9c6a16(0x155)][_0x9c6a16(0x14a)](_0x3ac3ef=>_0x3ac3ef&&getColumnName(_0x3ac3ef))[_0x9c6a16(0x126)](_0x2da126=>({'name':getColumnName(_0x2da126),..._0x2da126['type']&&{'type':_0x2da126['type']},..._0x2da126[_0x9c6a16(0x1a1)]&&{'visibility':_0x2da126[_0x9c6a16(0x1a1)]}}))),_0x4d2896['behaviorTableName']&&(_0x56ef99[_0x9c6a16(0x187)]=_0x4d2896[_0x9c6a16(0x1a2)]),_0x4d2896[_0x9c6a16(0x113)]!==undefined&&(_0x56ef99[_0x9c6a16(0x143)]=_0x4d2896['joinRow']),_0x4d2896[_0x9c6a16(0x1ab)]&&(_0x56ef99['join_strategy']=_0x4d2896['joinStrategy']),_0x4d2896[_0x9c6a16(0x142)]&&(_0x56ef99[_0x9c6a16(0x142)]=_0x4d2896[_0x9c6a16(0x142)]),_0x4d2896[_0x9c6a16(0x159)]&&_0x4d2896[_0x9c6a16(0x159)][_0x9c6a16(0x192)]>0x0&&(_0x56ef99[_0x9c6a16(0x1b7)]=_0x4d2896[_0x9c6a16(0x159)]),Object['keys'](_0x56ef99)[_0x9c6a16(0x192)]>0x0&&(_0x3de3a9[_0x9c6a16(0x1a0)]=_0x56ef99);}return _0x1f6234['nestedWorkflowProjectName']&&(_0x3de3a9[_0x9c6a16(0x194)]=_0x1f6234[_0x9c6a16(0x13b)]),_0x1f6234[_0x9c6a16(0x13f)]&&(_0x3de3a9['nested_workflow_name']=_0x1f6234[_0x9c6a16(0x13f)]),_0x1f6234['lockEnabled']!==undefined&&(_0x3de3a9[_0x9c6a16(0x18e)]=_0x1f6234[_0x9c6a16(0x14c)]),_0x3de3a9;}export function journeyActivationStepToYaml(_0xf8a8e,_0x339504,_0x278adb){const _0x237b63=a142_0x5501f9,_0x524339=_0xf8a8e[_0x237b63(0x190)][_0x237b63(0x193)],_0x2fb3e1=_0x524339[_0x237b63(0x173)]||'',_0x436d6e=_0x278adb?.[_0x237b63(0x18f)](_0x2fb3e1)??_0x2fb3e1,_0x17b2a4={'name':_0x524339['name']||'','connection':_0x436d6e};_0xf8a8e[_0x237b63(0x190)]['runAfterJourneyRefresh']&&(_0x17b2a4[_0x237b63(0x183)]=!![]);_0x524339[_0x237b63(0x188)]&&(_0x17b2a4['description']=_0x524339[_0x237b63(0x188)]);let _0x276576=[];_0x524339[_0x237b63(0x155)]&&_0x524339['columns'][_0x237b63(0x192)]>0x0&&(_0x276576=_0x524339[_0x237b63(0x155)][_0x237b63(0x14a)](_0x5cd1ce=>_0x5cd1ce&&getColumnName(_0x5cd1ce))[_0x237b63(0x126)](_0x1dc79e=>{const _0x5006e7=_0x237b63,_0x25d1ce=getColumnName(_0x1dc79e);if(_0x1dc79e[_0x5006e7(0x125)]||_0x1dc79e[_0x5006e7(0x1a1)])return{'name':_0x25d1ce,..._0x1dc79e['type']&&{'type':_0x1dc79e[_0x5006e7(0x125)]},..._0x1dc79e[_0x5006e7(0x1a1)]&&{'visibility':_0x1dc79e[_0x5006e7(0x1a1)]}};return _0x25d1ce;}));_0x276576[_0x237b63(0x192)]>0x0&&(_0x17b2a4[_0x237b63(0x155)]=_0x276576);_0x524339['allColumns']!==undefined&&(_0x524339[_0x237b63(0x19a)]===![]&&_0x276576[_0x237b63(0x192)]===0x0?_0x17b2a4['all_columns']=!![]:_0x17b2a4[_0x237b63(0x1a7)]=_0x524339[_0x237b63(0x19a)]);const _0x4cf5f3={};let _0x693272=![];_0x524339['scheduleType']&&(_0x4cf5f3[_0x237b63(0x125)]=_0x524339[_0x237b63(0x1a3)],_0x693272=!![]);_0x524339['repeatUnit']&&(_0x4cf5f3['repeat_unit']=_0x524339['repeatUnit'],_0x693272=!![]);_0x524339[_0x237b63(0x1a8)]!==undefined&&_0x524339[_0x237b63(0x1a8)]!==null&&(_0x4cf5f3[_0x237b63(0x1aa)]=_0x524339[_0x237b63(0x1a8)],_0x693272=!![]);_0x524339[_0x237b63(0x130)]!==undefined&&(_0x4cf5f3['start_at']=_0x524339[_0x237b63(0x130)],_0x693272=!![]);_0x524339[_0x237b63(0x153)]!==undefined&&(_0x4cf5f3[_0x237b63(0x135)]=_0x524339[_0x237b63(0x153)],_0x693272=!![]);_0x524339[_0x237b63(0x14d)]&&(_0x4cf5f3['timezone']=_0x524339[_0x237b63(0x14d)],_0x693272=!![]);_0x693272&&(_0x17b2a4[_0x237b63(0x12c)]=_0x4cf5f3);(_0x524339['notifyOn']&&_0x524339[_0x237b63(0x118)][_0x237b63(0x192)]>0x0||_0x524339[_0x237b63(0x185)]&&_0x524339['emailRecipients'][_0x237b63(0x192)]>0x0)&&(_0x17b2a4[_0x237b63(0x15e)]={},_0x524339[_0x237b63(0x118)]&&_0x524339[_0x237b63(0x118)][_0x237b63(0x192)]>0x0&&(_0x17b2a4[_0x237b63(0x15e)]['notify_on']=_0x524339[_0x237b63(0x118)]),_0x524339[_0x237b63(0x185)]&&_0x524339['emailRecipients'][_0x237b63(0x192)]>0x0&&(_0x17b2a4['notification'][_0x237b63(0x134)]=_0x524339['emailRecipients']['map'](_0x5b291a=>{const _0x3fc6e8=_0x237b63,_0x5ab80c=_0x339504?.[_0x3fc6e8(0x18f)](_0x5b291a);return _0x5ab80c??String(_0x5b291a);})));_0x524339[_0x237b63(0x131)]&&Object[_0x237b63(0x166)](_0x524339[_0x237b63(0x131)])[_0x237b63(0x192)]>0x0&&(_0x17b2a4[_0x237b63(0x163)]=normalizeConnectorConfigForYaml(_0x524339[_0x237b63(0x131)]));_0x524339[_0x237b63(0x138)]&&(_0x17b2a4[_0x237b63(0x162)]=_0x524339[_0x237b63(0x138)]);if(_0x524339[_0x237b63(0x147)]){const _0x2bc274={},_0x49e54a=_0x524339[_0x237b63(0x147)];_0x49e54a['columns']&&_0x49e54a[_0x237b63(0x155)][_0x237b63(0x192)]>0x0&&(_0x2bc274[_0x237b63(0x155)]=_0x49e54a[_0x237b63(0x155)][_0x237b63(0x14a)](_0x50a0eb=>_0x50a0eb&&getColumnName(_0x50a0eb))[_0x237b63(0x126)](_0x3a8471=>({'name':getColumnName(_0x3a8471),..._0x3a8471['type']&&{'type':_0x3a8471[_0x237b63(0x125)]},..._0x3a8471[_0x237b63(0x1a1)]&&{'visibility':_0x3a8471[_0x237b63(0x1a1)]}}))),_0x49e54a['behaviorTableName']&&(_0x2bc274[_0x237b63(0x187)]=_0x49e54a[_0x237b63(0x1a2)]),_0x49e54a[_0x237b63(0x113)]!==undefined&&(_0x2bc274[_0x237b63(0x143)]=_0x49e54a[_0x237b63(0x113)]),_0x49e54a[_0x237b63(0x1ab)]&&(_0x2bc274[_0x237b63(0x123)]=_0x49e54a[_0x237b63(0x1ab)]),_0x49e54a[_0x237b63(0x142)]&&(_0x2bc274[_0x237b63(0x142)]=_0x49e54a[_0x237b63(0x142)]),_0x49e54a[_0x237b63(0x159)]&&_0x49e54a['orderBy'][_0x237b63(0x192)]>0x0&&(_0x2bc274[_0x237b63(0x1b7)]=_0x49e54a[_0x237b63(0x159)]),Object[_0x237b63(0x166)](_0x2bc274)['length']>0x0&&(_0x17b2a4[_0x237b63(0x1a0)]=_0x2bc274);}return _0x17b2a4;}export function segmentWithActivationsToYaml(_0x4656d1,_0x3e50b0,_0x24620e,_0x5a0a91,_0xd4cd0b){const _0x4abb50=a142_0x5501f9,_0x247242=segmentResponseToDefSync(_0x4656d1,_0x24620e);return _0x3e50b0['length']>0x0&&(_0x247242['activations']=_0x3e50b0[_0x4abb50(0x126)](_0x10aa69=>activationResponseToDef(_0x10aa69,_0x5a0a91,_0xd4cd0b))),_0x247242;}function normalizeColumn(_0x10dc79){const _0x2e92bf=a142_0x5501f9;if(typeof _0x10dc79===_0x2e92bf(0x120))return{'column':_0x10dc79,'source':{'column':_0x10dc79}};return{'column':_0x10dc79[_0x2e92bf(0x176)],'source':{'column':_0x10dc79[_0x2e92bf(0x176)]},..._0x10dc79[_0x2e92bf(0x125)]&&{'type':_0x10dc79[_0x2e92bf(0x125)]},..._0x10dc79[_0x2e92bf(0x1a1)]&&{'visibility':_0x10dc79[_0x2e92bf(0x1a1)]}};}export async function activationDefToCreateRequest(_0x4ddc57,_0x1b85b7){const _0x24bb39=a142_0x5501f9,_0x145d8a=_0x1b85b7?.[_0x24bb39(0x17b)],_0x34dae3=_0x1b85b7?.[_0x24bb39(0x181)],_0x43699f=_0x4ddc57[_0x24bb39(0x16c)];let _0x283975;const _0x66a3e1=parseInt(_0x43699f,0xa);if(!isNaN(_0x66a3e1)&&String(_0x66a3e1)===_0x43699f)_0x283975=_0x66a3e1;else{const _0x740572=_0x34dae3?.[_0x24bb39(0x18f)](_0x43699f);if(_0x740572===undefined)throw new SDKError(ErrorCode['CONNECTION_NOT_FOUND'],_0x24bb39(0x19b)+_0x43699f,undefined,{'helpText':'Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections'});_0x283975=_0x740572;}const _0x107ed5={'name':_0x4ddc57[_0x24bb39(0x176)],'connectionId':_0x283975};_0x4ddc57[_0x24bb39(0x188)]&&(_0x107ed5[_0x24bb39(0x188)]=_0x4ddc57[_0x24bb39(0x188)]);let _0x58d2bf=[];_0x4ddc57['columns']&&_0x4ddc57[_0x24bb39(0x155)]['length']>0x0&&(_0x58d2bf=_0x4ddc57[_0x24bb39(0x155)]['filter'](_0x499663=>_0x499663!=null)[_0x24bb39(0x126)](normalizeColumn));_0x58d2bf[_0x24bb39(0x192)]>0x0&&(_0x107ed5['columns']=_0x58d2bf);_0x4ddc57['all_columns']!==undefined&&(_0x4ddc57[_0x24bb39(0x1a7)]===![]&&_0x58d2bf[_0x24bb39(0x192)]===0x0?_0x107ed5[_0x24bb39(0x19a)]=!![]:_0x107ed5[_0x24bb39(0x19a)]=_0x4ddc57[_0x24bb39(0x1a7)]);if(_0x4ddc57[_0x24bb39(0x12c)]){const _0x9c9527=_0x4ddc57[_0x24bb39(0x12c)],_0x57c1a6=_0x9c9527[_0x24bb39(0x125)]??REPEAT_UNIT_TO_SCHEDULE_TYPE[_0x9c9527[_0x24bb39(0x184)]];_0x57c1a6&&(_0x107ed5['scheduleType']=_0x57c1a6);const _0x523716=_0x9c9527['repeat_unit']??SCHEDULE_TYPE_TO_REPEAT_UNIT[_0x9c9527[_0x24bb39(0x125)]];_0x523716&&(_0x107ed5[_0x24bb39(0x1ac)]=_0x523716);_0x9c9527[_0x24bb39(0x1aa)]!==undefined&&(_0x107ed5[_0x24bb39(0x1a8)]=_0x9c9527[_0x24bb39(0x1aa)]);_0x9c9527[_0x24bb39(0x13e)]&&(_0x107ed5[_0x24bb39(0x1b8)]=_0x9c9527[_0x24bb39(0x13e)]);_0x9c9527['start_at']!==undefined&&(_0x107ed5[_0x24bb39(0x130)]=_0x9c9527[_0x24bb39(0x115)]);_0x9c9527[_0x24bb39(0x135)]!==undefined&&(_0x107ed5[_0x24bb39(0x153)]=_0x9c9527[_0x24bb39(0x135)]);_0x9c9527['timezone']&&(_0x107ed5[_0x24bb39(0x14d)]=_0x9c9527[_0x24bb39(0x14d)]);if(_0x57c1a6&&_0x57c1a6!=='none'&&_0x57c1a6!==_0x24bb39(0x196)&&_0x9c9527[_0x24bb39(0x115)]){const _0xd78710=_0x9c9527[_0x24bb39(0x115)]['match'](/T(\d{2}:\d{2})/);_0xd78710&&(_0x107ed5[_0x24bb39(0x19c)]=_0xd78710[0x1]);}}_0x4ddc57['notification']&&(_0x4ddc57['notification'][_0x24bb39(0x1a6)]&&(_0x107ed5[_0x24bb39(0x118)]=_0x4ddc57['notification'][_0x24bb39(0x1a6)]),_0x4ddc57[_0x24bb39(0x15e)][_0x24bb39(0x134)]&&(_0x107ed5[_0x24bb39(0x185)]=_0x4ddc57[_0x24bb39(0x15e)][_0x24bb39(0x134)][_0x24bb39(0x126)](_0x23be36=>{const _0x39dd43=_0x24bb39,_0x2f1e64=Number(_0x23be36);if(!isNaN(_0x2f1e64)&&String(_0x2f1e64)===_0x23be36)return _0x2f1e64;const _0x202fa9=_0x145d8a?.[_0x39dd43(0x18f)](_0x23be36[_0x39dd43(0x132)]());if(_0x202fa9===undefined)throw new SDKError(ErrorCode[_0x39dd43(0x157)],_0x39dd43(0x15a)+_0x23be36+'.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.');return _0x202fa9;})));if(_0x4ddc57[_0x24bb39(0x163)]){const _0x3e7be8=_0x1b85b7?.[_0x24bb39(0x11b)]?.[_0x24bb39(0x18f)](_0x43699f);if(_0x3e7be8&&_0x1b85b7?.[_0x24bb39(0x114)])try{const _0x413fc6=await _0x1b85b7[_0x24bb39(0x114)](_0x3e7be8),_0x179d73=validateConnectorConfig(_0x4ddc57['connector_config'],_0x413fc6);if(!_0x179d73[_0x24bb39(0x129)])throw new SDKError(ErrorCode[_0x24bb39(0x18c)],_0x24bb39(0x148)+_0x4ddc57['name']+_0x24bb39(0x139)+formatValidationErrors(_0x179d73[_0x24bb39(0x140)]),undefined,{'helpText':_0x24bb39(0x127)+_0x3e7be8+_0x24bb39(0x165)+formatSchemaAsHelp(_0x413fc6)});if(_0x179d73[_0x24bb39(0x177)][_0x24bb39(0x192)]>0x0){const _0x37065f=formatValidationWarnings(_0x179d73['warnings']);console[_0x24bb39(0x149)](_0x24bb39(0x16a)+_0x4ddc57[_0x24bb39(0x176)]+_0x24bb39(0x139)+_0x37065f);}_0x107ed5[_0x24bb39(0x131)]=transformConfigToLegacy(_0x4ddc57[_0x24bb39(0x163)],_0x413fc6);}catch(_0x3d1906){if(_0x3d1906 instanceof SDKError&&_0x3d1906['code']===ErrorCode['CONNECTOR_SCHEMA_NOT_FOUND'])_0x107ed5[_0x24bb39(0x131)]=_0x4ddc57[_0x24bb39(0x163)];else throw _0x3d1906;}else _0x107ed5[_0x24bb39(0x131)]=_0x4ddc57[_0x24bb39(0x163)];}_0x4ddc57[_0x24bb39(0x162)]!==undefined&&(_0x107ed5[_0x24bb39(0x138)]=_0x4ddc57[_0x24bb39(0x162)]);if(_0x4ddc57[_0x24bb39(0x1a0)]){const _0x7d8189=_0x4ddc57[_0x24bb39(0x1a0)],_0x21d76d={};if(_0x7d8189[_0x24bb39(0x155)]&&_0x7d8189['columns'][_0x24bb39(0x192)]>0x0){const _0x57f4bc=_0x7d8189[_0x24bb39(0x155)][_0x24bb39(0x14a)](_0x2fdcb3=>_0x2fdcb3&&_0x2fdcb3['name'])[_0x24bb39(0x126)](normalizeColumn);_0x57f4bc['length']>0x0&&(_0x21d76d[_0x24bb39(0x155)]=_0x57f4bc);}_0x7d8189['behavior_table']&&(_0x21d76d['behaviorTableName']=_0x7d8189[_0x24bb39(0x187)]),_0x7d8189[_0x24bb39(0x143)]!==undefined&&(_0x21d76d[_0x24bb39(0x113)]=_0x7d8189['join_row']),_0x7d8189[_0x24bb39(0x123)]&&(_0x21d76d[_0x24bb39(0x1ab)]=_0x7d8189[_0x24bb39(0x123)]),_0x7d8189[_0x24bb39(0x142)]&&(_0x21d76d[_0x24bb39(0x142)]=_0x7d8189[_0x24bb39(0x142)]),_0x7d8189['order_by']&&(_0x21d76d[_0x24bb39(0x159)]=_0x7d8189[_0x24bb39(0x1b7)]),_0x107ed5[_0x24bb39(0x147)]=_0x21d76d;}return _0x4ddc57['nested_workflow_project_name']&&(_0x107ed5[_0x24bb39(0x13b)]=_0x4ddc57['nested_workflow_project_name']),_0x4ddc57[_0x24bb39(0x158)]&&(_0x107ed5['nestedWorkflowName']=_0x4ddc57[_0x24bb39(0x158)]),_0x4ddc57['lock_enabled']!==undefined&&(_0x107ed5['lockEnabled']=_0x4ddc57[_0x24bb39(0x18e)]),_0x107ed5;}export async function activationDefToUpdateRequest(_0x1b5d81,_0x59d344){return activationDefToCreateRequest(_0x1b5d81,_0x59d344);}export function deepSortObject(_0x326c9d){const _0x47dd30=a142_0x5501f9;if(_0x326c9d===null||typeof _0x326c9d!==_0x47dd30(0x124))return _0x326c9d;if(Array['isArray'](_0x326c9d))return _0x326c9d['map'](deepSortObject)['sort']((_0xa5cb5f,_0x54eee3)=>JSON[_0x47dd30(0x156)](_0xa5cb5f)[_0x47dd30(0x172)](JSON[_0x47dd30(0x156)](_0x54eee3)));const _0x3c59bb={};for(const _0x454197 of Object[_0x47dd30(0x166)](_0x326c9d)[_0x47dd30(0x198)]()){_0x3c59bb[_0x454197]=deepSortObject(_0x326c9d[_0x454197]);}return _0x3c59bb;}export function serializeRule(_0x3dcf27){const _0x120942=a142_0x5501f9;return JSON[_0x120942(0x156)](deepSortObject(_0x3dcf27));}export function normalizeRuleForMatching(_0x16cb29){return normalizeConditionsForMatching(_0x16cb29);}function normalizeConditionsForMatching(_0x31ca57){const _0x52ab93=a142_0x5501f9;if(_0x31ca57===null||typeof _0x31ca57!=='object')return _0x31ca57;if(Array[_0x52ab93(0x19d)](_0x31ca57))return _0x31ca57[_0x52ab93(0x126)](normalizeConditionsForMatching);const _0x20cf4d=_0x31ca57;if((_0x20cf4d[_0x52ab93(0x125)]===_0x52ab93(0x154)||_0x20cf4d[_0x52ab93(0x125)]===_0x52ab93(0x1b4))&&typeof _0x20cf4d[_0x52ab93(0x199)]===_0x52ab93(0x120))return{..._0x20cf4d,'segment':'__SEGMENT_REF__'};const _0x330d9d={};for(const _0x6936bd of Object[_0x52ab93(0x166)](_0x20cf4d)){_0x330d9d[_0x6936bd]=normalizeConditionsForMatching(_0x20cf4d[_0x6936bd]);}return _0x330d9d;}export function serializeRuleForMatching(_0x5cbd91){return JSON['stringify'](deepSortObject(normalizeRuleForMatching(_0x5cbd91)));}function a142_0x179d(_0x504938,_0x55c1c1){_0x504938=_0x504938-0x110;const _0x573176=a142_0x5731();let _0x179d7c=_0x573176[_0x504938];return _0x179d7c;}export function expandSegmentReferences(_0x43730e,_0x82703b,_0x330d55=new Set()){return expandConditions(_0x43730e,_0x82703b,_0x330d55);}function expandConditions(_0x582eb5,_0x4e7b3b,_0x4b8c6d){const _0x5d99d2=a142_0x5501f9;if(_0x582eb5===null||typeof _0x582eb5!==_0x5d99d2(0x124))return _0x582eb5;if(Array[_0x5d99d2(0x19d)](_0x582eb5))return _0x582eb5[_0x5d99d2(0x126)](_0x19c247=>expandConditions(_0x19c247,_0x4e7b3b,_0x4b8c6d));const _0x5a913c=_0x582eb5;if((_0x5a913c['type']===_0x5d99d2(0x154)||_0x5a913c['type']===_0x5d99d2(0x1b4))&&typeof _0x5a913c['segment']===_0x5d99d2(0x120)){const _0x344601=_0x5a913c[_0x5d99d2(0x199)],_0x1da5ba=_0x4e7b3b[_0x5d99d2(0x18f)](_0x344601);if(_0x1da5ba&&!_0x4b8c6d[_0x5d99d2(0x121)](_0x344601)){const _0xa7e40d=new Set(_0x4b8c6d);_0xa7e40d['add'](_0x344601);const _0x47a976=expandConditions(_0x1da5ba,_0x4e7b3b,_0xa7e40d);return{'type':_0x5a913c[_0x5d99d2(0x125)],'expanded_rule':_0x47a976};}return{'type':_0x5a913c[_0x5d99d2(0x125)],'expanded_rule':_0x5d99d2(0x16d)};}const _0x7e1d37={};for(const _0x5a2378 of Object['keys'](_0x5a913c)){_0x7e1d37[_0x5a2378]=expandConditions(_0x5a913c[_0x5a2378],_0x4e7b3b,_0x4b8c6d);}return _0x7e1d37;}export function serializeExpandedRule(_0x33888c,_0x23643d){const _0x25cd85=a142_0x5501f9,_0x51a0bc=expandSegmentReferences(_0x33888c,_0x23643d);return JSON[_0x25cd85(0x156)](deepSortObject(_0x51a0bc));}export function createSegmentNameContext(_0x5987b4){const _0x4dd337=a142_0x5501f9,_0x25b869=new Set(),_0x1382c8=new Map(),_0x27ae0c=new Map();if(_0x5987b4)for(const [_0x38faed,_0x1fc63b]of Object[_0x4dd337(0x11f)](_0x5987b4)){if(_0x1fc63b['rule']){const _0x1b978e=serializeRule(_0x1fc63b[_0x4dd337(0x1b6)]);_0x27ae0c[_0x4dd337(0x186)](_0x1b978e,_0x38faed),_0x25b869[_0x4dd337(0x1af)](_0x38faed);}}return{'usedNames':_0x25b869,'ruleHashToName':_0x1382c8,'localRuleToName':_0x5987b4?_0x27ae0c:undefined};}export function resolveSegmentName(_0x3aafe3,_0x1c08df,_0x5de955,_0x2c7226){const _0x18aa6d=a142_0x5501f9,_0x1f5dd6=serializeRule(_0x1c08df);if(_0x5de955[_0x18aa6d(0x1b0)]){const _0x250468=_0x5de955[_0x18aa6d(0x1b0)][_0x18aa6d(0x18f)](_0x1f5dd6);if(_0x250468)return{'name':_0x250468,'isDuplicate':![],'isLocalMatch':!![]};}const _0x43b688=_0x5de955[_0x18aa6d(0x197)][_0x18aa6d(0x18f)](_0x1f5dd6);if(_0x43b688)return{'name':_0x43b688,'isDuplicate':!![],'isLocalMatch':![]};const _0x50d7bd=_0x2c7226(_0x3aafe3);let _0x4b9e72=_0x50d7bd||_0x3aafe3,_0x3868a3=_0x4b9e72,_0x350358=0x2;while(_0x5de955['usedNames']['has'](_0x3868a3)){_0x3868a3=_0x4b9e72+'_'+_0x350358,_0x350358++;}return _0x5de955[_0x18aa6d(0x18a)][_0x18aa6d(0x1af)](_0x3868a3),_0x5de955[_0x18aa6d(0x197)][_0x18aa6d(0x186)](_0x1f5dd6,_0x3868a3),{'name':_0x3868a3,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x2b32eb){const _0x507489=[],_0x598fe9=_0xcf7362=>{const _0x3344c6=a142_0x179d;if(!_0xcf7362||typeof _0xcf7362!==_0x3344c6(0x124))return;if(Array[_0x3344c6(0x19d)](_0xcf7362)){_0xcf7362[_0x3344c6(0x1b2)](_0x598fe9);return;}const _0x3c3da4=_0xcf7362;(_0x3c3da4[_0x3344c6(0x125)]==='include'||_0x3c3da4[_0x3344c6(0x125)]===_0x3344c6(0x1b4))&&typeof _0x3c3da4['segment']===_0x3344c6(0x120)&&_0x507489[_0x3344c6(0x133)](_0x3c3da4[_0x3344c6(0x199)]);for(const _0x5b486d of Object['values'](_0x3c3da4)){_0x598fe9(_0x5b486d);}};return _0x598fe9(_0x2b32eb),_0x507489;}export function validateSegmentRule(_0x4d90fd,_0x831fd5){const _0x1625f3=a142_0x5501f9;if(!_0x831fd5||!_0x831fd5[_0x1625f3(0x18d)])return;for(let _0x2a302b=0x0;_0x2a302b<_0x831fd5['conditions']['length'];_0x2a302b++){const _0x6498bc=_0x831fd5[_0x1625f3(0x18d)][_0x2a302b];if(_0x1625f3(0x125)in _0x6498bc&&_0x6498bc['type']==='Value'){const _0x555d86=_0x6498bc,_0x41ee85=_0x555d86[_0x1625f3(0x150)]||_0x555d86[_0x1625f3(0x13c)];if((!_0x555d86[_0x1625f3(0x11a)]||_0x555d86['attribute']==='')&&!_0x41ee85)throw new SDKError(ErrorCode[_0x1625f3(0x12b)],'Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27'+_0x4d90fd+_0x1625f3(0x1a9)+(_0x1625f3(0x16b)+_0x2a302b+_0x1625f3(0x191))+_0x1625f3(0x182));}}}
1
+ const a142_0x210957=a142_0x394c;(function(_0xab2e33,_0x1565e3){const _0x2ea848=a142_0x394c,_0x3310d1=_0xab2e33();while(!![]){try{const _0x28b823=parseInt(_0x2ea848(0x16d))/0x1+parseInt(_0x2ea848(0x1b2))/0x2+parseInt(_0x2ea848(0x1b0))/0x3*(parseInt(_0x2ea848(0x18f))/0x4)+parseInt(_0x2ea848(0x190))/0x5*(parseInt(_0x2ea848(0x168))/0x6)+parseInt(_0x2ea848(0x18c))/0x7*(parseInt(_0x2ea848(0x1c5))/0x8)+parseInt(_0x2ea848(0x1d6))/0x9+-parseInt(_0x2ea848(0x153))/0xa;if(_0x28b823===_0x1565e3)break;else _0x3310d1['push'](_0x3310d1['shift']());}catch(_0x30aedd){_0x3310d1['push'](_0x3310d1['shift']());}}}(a142_0x57b7,0x30fb6));import*as a142_0x477cbb from'yaml';import{safeParseYaml}from'./yaml-validator.js';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';import{SegmentDefSchema}from'./types/segment-schema.js';const SCHEDULE_TYPE_TO_REPEAT_UNIT={'daily':a142_0x210957(0x143),'hourly':a142_0x210957(0x161),'weekly':'week','monthly':a142_0x210957(0x1b3),'minutes_interval':a142_0x210957(0x1c4)},REPEAT_UNIT_TO_SCHEDULE_TYPE={'day':a142_0x210957(0x14d),'hour':a142_0x210957(0x1c7),'week':a142_0x210957(0x1c0),'month':a142_0x210957(0x18a),'minute':a142_0x210957(0x1b9)};function filterRuleAsRuleDef(_0x46cb01){return _0x46cb01;}function ruleDefAsFilterRule(_0x1fea1d){return _0x1fea1d;}export function segmentResponseToDefSync(_0x410848,_0x53fb84){const _0x30bdb4=a142_0x210957,_0x4a6ecd=_0x410848[_0x30bdb4(0x19e)]&&_0x30bdb4(0x196)in _0x410848[_0x30bdb4(0x19e)]&&_0x410848[_0x30bdb4(0x19e)]['type'];return{'type':_0x30bdb4(0x180),'name':_0x410848[_0x30bdb4(0x139)],..._0x410848[_0x30bdb4(0x159)]&&{'description':_0x410848[_0x30bdb4(0x159)]},..._0x53fb84&&{'folder':_0x53fb84},..._0x4a6ecd&&{'rule':apiRuleToYaml(_0x410848[_0x30bdb4(0x19e)])},..._0x410848[_0x30bdb4(0x1cc)]!==undefined&&{'kind':_0x410848[_0x30bdb4(0x1cc)]===0x0?_0x30bdb4(0x14e):_0x410848['kind']===0x1?_0x30bdb4(0x149):'funnel_stage'},..._0x410848[_0x30bdb4(0x1be)]!==undefined&&{'visible':_0x410848[_0x30bdb4(0x1be)]}};}export async function segmentResponseToDef(_0x2ca10a,_0x403668,_0x5cb632){const _0x8265a5=a142_0x210957,_0x1b10d0=segmentResponseToDefSync(_0x2ca10a,_0x5cb632);if(!_0x403668||!_0x403668['resolveSegmentName'])return _0x1b10d0;return _0x1b10d0[_0x8265a5(0x19e)]&&(_0x1b10d0['rule']=await resolveRuleSegmentRefs(_0x1b10d0['rule'],_0x403668['resolveSegmentName'])),_0x1b10d0;}export function apiRuleToYaml(_0x1179a5){const _0x554187=a142_0x210957,_0x2bd8dc=(_0x1179a5[_0x554187(0x174)]||[])[_0x554187(0x166)](apiConditionToYaml);if(_0x2bd8dc['length']===0x1&&!_0x1179a5['description']&&'type'in _0x2bd8dc[0x0]&&(_0x2bd8dc[0x0][_0x554187(0x196)]===_0x554187(0x1bc)||_0x2bd8dc[0x0][_0x554187(0x196)]==='Or')){const _0x4dfda2=_0x2bd8dc[0x0],_0x1d9254=_0x4dfda2[_0x554187(0x159)]!==undefined;if(_0x4dfda2[_0x554187(0x196)]===_0x1179a5[_0x554187(0x196)]&&_0x4dfda2[_0x554187(0x174)]&&!_0x1d9254)return{'type':_0x1179a5[_0x554187(0x196)],'conditions':_0x4dfda2[_0x554187(0x174)]};}return{'type':_0x1179a5[_0x554187(0x196)],'conditions':_0x2bd8dc,..._0x1179a5[_0x554187(0x159)]&&{'description':_0x1179a5[_0x554187(0x159)]}};}export async function resolveRuleSegmentRefs(_0x52d862,_0x32d7fc){return transformRuleSegmentRefs(_0x52d862,_0x32d7fc,_0x82e16=>/^\d+$/['test'](_0x82e16));}async function transformConditionSegmentRefs(_0x2b7e75,_0x2bcf86,_0x1eb7e3,_0x544816){const _0x5aba54=a142_0x210957;if(_0x5aba54(0x180)in _0x2b7e75&&(_0x2b7e75[_0x5aba54(0x196)]===_0x5aba54(0x1cd)||_0x2b7e75[_0x5aba54(0x196)]===_0x5aba54(0x1a7))){const _0x30fffd=_0x2b7e75;if(_0x1eb7e3(_0x30fffd['segment']))return{..._0x30fffd,'segment':await _0x2bcf86(_0x30fffd['segment'])};return _0x2b7e75;}if(_0x5aba54(0x174)in _0x2b7e75&&_0x2b7e75['conditions']){const _0x38044e=_0x2b7e75,_0x11b04d=await Promise['all'](_0x38044e[_0x5aba54(0x174)][_0x5aba54(0x166)](_0x4809ad=>transformConditionSegmentRefs(_0x4809ad,_0x2bcf86,_0x1eb7e3,_0x544816)));return{..._0x38044e,'conditions':_0x11b04d};}if('filter'in _0x2b7e75&&_0x2b7e75[_0x5aba54(0x157)]){const _0x216780=_0x2b7e75,_0x5c4f89=await _0x544816(filterRuleAsRuleDef(_0x216780[_0x5aba54(0x157)]),_0x2bcf86);return{..._0x216780,'filter':ruleDefAsFilterRule(_0x5c4f89)};}return _0x2b7e75;}async function transformRuleSegmentRefs(_0x8022e9,_0x4716ff,_0x1858ae){const _0x44d3ae=a142_0x210957,_0x3403ee=(_0x389273,_0x3c3d26)=>transformRuleSegmentRefs(_0x389273,_0x3c3d26,_0x1858ae),_0x347775=await Promise[_0x44d3ae(0x192)](_0x8022e9[_0x44d3ae(0x174)][_0x44d3ae(0x166)](_0x23256a=>transformConditionSegmentRefs(_0x23256a,_0x4716ff,_0x1858ae,_0x3403ee)));return{..._0x8022e9,'conditions':_0x347775};}export async function resolveRuleSegmentIds(_0x117087,_0x1d13d8){return transformRuleSegmentRefs(_0x117087,_0x1d13d8,_0xee9317=>!/^\d+$/['test'](_0xee9317));}function isBehaviorApiCondition(_0x37067b){const _0xf63cfc=a142_0x210957;if(!_0x37067b[_0xf63cfc(0x1cb)]?.['source']?.['name'])return![];return!![];}function apiConditionToYaml(_0x1a15f3){const _0x3c8441=a142_0x210957;if(_0x1a15f3[_0x3c8441(0x196)]==='And'||_0x1a15f3[_0x3c8441(0x196)]==='Or'){if(_0x1a15f3[_0x3c8441(0x174)]){const _0x5396ad=_0x1a15f3[_0x3c8441(0x174)][_0x3c8441(0x166)](apiConditionToYaml),_0xdc6d4f=_0x1a15f3[_0x3c8441(0x159)]!==undefined;if(_0x5396ad[_0x3c8441(0x12f)]===0x1&&!_0xdc6d4f)return _0x5396ad[0x0];return{'type':_0x1a15f3[_0x3c8441(0x196)],'conditions':_0x5396ad,..._0x1a15f3[_0x3c8441(0x159)]!==undefined&&{'description':_0x1a15f3[_0x3c8441(0x159)]}};}}if(_0x1a15f3['type']==='Value'&&_0x1a15f3[_0x3c8441(0x1cb)]&&_0x1a15f3[_0x3c8441(0x182)]){const _0x54918b=_0x1a15f3[_0x3c8441(0x1cb)]['aggregation']?buildAggregationDefFromApi(_0x1a15f3[_0x3c8441(0x1cb)]['aggregation']):undefined;if(isBehaviorApiCondition(_0x1a15f3)){const _0x3c0778=_0x1a15f3[_0x3c8441(0x1cb)][_0x3c8441(0x16f)][_0x3c8441(0x139)];return{'type':_0x3c8441(0x177),'attribute':'','operator':apiOperatorToYaml(_0x1a15f3[_0x3c8441(0x182)]),..._0x1a15f3[_0x3c8441(0x1c6)]&&_0x1a15f3[_0x3c8441(0x1c6)]!==_0x3c8441(0x1b1)?{'arrayMatching':_0x1a15f3[_0x3c8441(0x1c6)]}:{},..._0x1a15f3[_0x3c8441(0x1a7)]?{'exclude':_0x1a15f3['exclude']}:{},..._0x54918b?{'aggregation':_0x54918b}:{},'source':_0x3c0778,..._0x1a15f3['leftValue']['filter']?{'filter':apiRuleToYaml(_0x1a15f3[_0x3c8441(0x1cb)][_0x3c8441(0x157)])}:{},..._0x1a15f3[_0x3c8441(0x189)]!==undefined&&_0x1a15f3[_0x3c8441(0x189)]!==null?{'limit':_0x1a15f3['limit']}:{}};}return{'type':'Value','attribute':_0x1a15f3[_0x3c8441(0x1cb)]['name']||'','operator':apiOperatorToYaml(_0x1a15f3['operator']),..._0x1a15f3[_0x3c8441(0x1c6)]&&_0x1a15f3['arrayMatching']!==_0x3c8441(0x1b1)?{'arrayMatching':_0x1a15f3[_0x3c8441(0x1c6)]}:{},..._0x1a15f3[_0x3c8441(0x1a7)]?{'exclude':_0x1a15f3['exclude']}:{},..._0x54918b?{'aggregation':_0x54918b}:{},..._0x1a15f3[_0x3c8441(0x1cb)][_0x3c8441(0x157)]?{'filter':apiRuleToYaml(_0x1a15f3[_0x3c8441(0x1cb)][_0x3c8441(0x157)])}:{},..._0x1a15f3[_0x3c8441(0x189)]!==undefined&&_0x1a15f3[_0x3c8441(0x189)]!==null?{'limit':_0x1a15f3[_0x3c8441(0x189)]}:{}};}if(_0x1a15f3[_0x3c8441(0x196)]===_0x3c8441(0x17f)&&_0x1a15f3[_0x3c8441(0x15c)]&&_0x1a15f3[_0x3c8441(0x182)])return{'type':_0x3c8441(0x17f),'column':_0x1a15f3[_0x3c8441(0x15c)],'operator':apiOperatorToYaml(_0x1a15f3['operator'])};if(_0x1a15f3['type']===_0x3c8441(0x18e)&&_0x1a15f3['id'])return{'type':_0x1a15f3[_0x3c8441(0x1a7)]?_0x3c8441(0x1a7):_0x3c8441(0x1cd),'segment':_0x1a15f3['id']};return{'type':_0x3c8441(0x1bc),'conditions':[]};}function isTemporalOperator(_0x294257){const _0x929fb1=a142_0x210957;return _0x294257===_0x929fb1(0x191)||_0x294257===_0x929fb1(0x1d4);}function isBetweenOperator(_0x2e9cfa){return _0x2e9cfa==='Between';}function getEffectiveValue(_0x4d2c4b){const _0x561c10=a142_0x210957,_0x5f04d2=_0x4d2c4b[_0x561c10(0x1d2)];return _0x4d2c4b[_0x561c10(0x172)]??_0x5f04d2;}function parseNumericValue(_0x30bc28){if(typeof _0x30bc28==='object'&&_0x30bc28!==null)return _0x30bc28;if(_0x30bc28==='')return _0x30bc28;const _0x5b20dd=Number(_0x30bc28);return Number['isFinite'](_0x5b20dd)?_0x5b20dd:_0x30bc28;}function apiOperatorToYaml(_0x15fdfb){const _0x757d13=a142_0x210957;if(isBetweenOperator(_0x15fdfb[_0x757d13(0x196)]))return{'type':mapApiOperatorType(_0x15fdfb['type']),..._0x15fdfb[_0x757d13(0x137)]!==undefined&&{'not':_0x15fdfb[_0x757d13(0x137)]},..._0x15fdfb[_0x757d13(0x1d7)]!==undefined&&{'min':parseNumericValue(_0x15fdfb[_0x757d13(0x1d7)])},..._0x15fdfb['maxValue']!==undefined&&{'max':parseNumericValue(_0x15fdfb['maxValue'])}};if(_0x15fdfb[_0x757d13(0x196)]===_0x757d13(0x13e))return{'type':'TimeRange',..._0x15fdfb[_0x757d13(0x137)]!==undefined&&{'not':_0x15fdfb[_0x757d13(0x137)]},..._0x15fdfb[_0x757d13(0x1a0)]!==undefined&&{'duration':_0x15fdfb[_0x757d13(0x1a0)]},..._0x15fdfb[_0x757d13(0x1a9)]!==undefined&&{'from':_0x15fdfb[_0x757d13(0x1a9)]},..._0x15fdfb[_0x757d13(0x1b5)]!==undefined&&{'reverse':_0x15fdfb[_0x757d13(0x1b5)]}};let _0x4caeeb;if(_0x15fdfb[_0x757d13(0x15f)]&&_0x15fdfb['rightValues'][_0x757d13(0x12f)]>0x0)_0x4caeeb=_0x15fdfb['rightValues'];else{if(_0x15fdfb['rightValue']!==undefined)_0x4caeeb=_0x15fdfb[_0x757d13(0x152)];else isTemporalOperator(_0x15fdfb[_0x757d13(0x196)])&&_0x15fdfb[_0x757d13(0x172)]!==undefined&&(_0x4caeeb=_0x15fdfb[_0x757d13(0x172)]);}return{'type':mapApiOperatorType(_0x15fdfb[_0x757d13(0x196)]),..._0x15fdfb['not']!==undefined&&{'not':_0x15fdfb[_0x757d13(0x137)]},..._0x4caeeb!==undefined&&{'value':_0x4caeeb},..._0x15fdfb[_0x757d13(0x1bb)]!==undefined&&{'unit':_0x15fdfb[_0x757d13(0x1bb)]}};}function mapApiOperatorType(_0x4f9033){return _0x4f9033;}export function segmentDefToCreateRequest(_0x184654,_0x3ee5f3){const _0x474eba=a142_0x210957,_0x4e0b89={'name':_0x184654[_0x474eba(0x139)]};return _0x184654['description']&&(_0x4e0b89['description']=_0x184654[_0x474eba(0x159)]),_0x184654[_0x474eba(0x19e)]&&(_0x4e0b89['rule']=yamlRuleToApi(_0x184654[_0x474eba(0x19e)])),_0x184654[_0x474eba(0x1cc)]&&(_0x4e0b89[_0x474eba(0x1cc)]=_0x184654[_0x474eba(0x1cc)]==='batch'?0x0:_0x184654[_0x474eba(0x1cc)]==='realtime'?0x1:0x2),_0x184654[_0x474eba(0x188)]!==undefined&&(_0x4e0b89['isVisible']=_0x184654[_0x474eba(0x188)]),_0x3ee5f3&&(_0x4e0b89[_0x474eba(0x175)]=_0x3ee5f3),_0x4e0b89;}export function segmentDefToUpdateRequest(_0x3984d9){const _0x10e9b6=a142_0x210957,_0x222f79={'name':_0x3984d9[_0x10e9b6(0x139)]};return _0x3984d9[_0x10e9b6(0x159)]!==undefined&&(_0x222f79[_0x10e9b6(0x159)]=_0x3984d9['description']),_0x3984d9[_0x10e9b6(0x19e)]&&(_0x222f79[_0x10e9b6(0x19e)]=yamlRuleToApi(_0x3984d9['rule'])),_0x3984d9['kind']&&(_0x222f79[_0x10e9b6(0x1cc)]=_0x3984d9[_0x10e9b6(0x1cc)]===_0x10e9b6(0x14e)?0x0:_0x3984d9[_0x10e9b6(0x1cc)]===_0x10e9b6(0x149)?0x1:0x2),_0x222f79;}export function yamlRuleToApi(_0x32bd1a){const _0x3c2dea=a142_0x210957,_0x38593d=_0x32bd1a['conditions']['map'](yamlConditionToApi),_0x199e55=_0x38593d['every'](_0x559174=>(_0x559174['type']===_0x3c2dea(0x1bc)||_0x559174['type']==='Or')&&_0x559174[_0x3c2dea(0x159)]!==undefined);if(!_0x199e55&&_0x38593d[_0x3c2dea(0x12f)]>0x0)return{'type':_0x32bd1a[_0x3c2dea(0x196)],'conditions':_0x38593d[_0x3c2dea(0x166)](_0x42a56d=>({'type':_0x3c2dea(0x1bc),'description':_0x32bd1a[_0x3c2dea(0x159)]||'','conditions':[_0x42a56d]}))};return{'type':_0x32bd1a[_0x3c2dea(0x196)],'conditions':_0x38593d,..._0x32bd1a[_0x3c2dea(0x159)]&&{'description':_0x32bd1a[_0x3c2dea(0x159)]}};}function yamlFilterRuleToApi(_0x2a9f3f){const _0x48a6d3=a142_0x210957,_0x2809b7=_0x2a9f3f[_0x48a6d3(0x174)][_0x48a6d3(0x166)](yamlConditionToApi);return{'type':_0x2a9f3f[_0x48a6d3(0x196)],'conditions':_0x2809b7};}function yamlConditionToApi(_0xd9c21c){const _0x542536=a142_0x210957;if(_0x542536(0x180)in _0xd9c21c&&(_0xd9c21c[_0x542536(0x196)]===_0x542536(0x1cd)||_0xd9c21c['type']==='exclude')){const _0x10797f=_0xd9c21c;return{'type':_0x542536(0x18e),'id':_0x10797f[_0x542536(0x180)],'exclude':_0x10797f[_0x542536(0x196)]===_0x542536(0x1a7)};}if(_0x542536(0x196)in _0xd9c21c&&(_0xd9c21c[_0x542536(0x196)]===_0x542536(0x1bc)||_0xd9c21c['type']==='Or')){const _0xfb2b17=_0xd9c21c;return{'type':_0xfb2b17[_0x542536(0x196)],'conditions':_0xfb2b17[_0x542536(0x174)][_0x542536(0x166)](yamlConditionToApi),..._0xfb2b17[_0x542536(0x159)]&&{'description':_0xfb2b17[_0x542536(0x159)]}};}if(_0x542536(0x15c)in _0xd9c21c&&_0xd9c21c['type']===_0x542536(0x17f)){const _0x4e4228=_0xd9c21c;return{'type':_0x542536(0x17f),'column':_0x4e4228[_0x542536(0x15c)],'operator':yamlOperatorToApi(_0x4e4228[_0x542536(0x182)])};}const _0x4b6772=_0xd9c21c,_0x1fa46b={'type':'Value','leftValue':buildLeftValue(_0x4b6772),'operator':yamlOperatorToApi(_0x4b6772['operator']),'exclude':_0x4b6772[_0x542536(0x1a7)]??![],'arrayMatching':_0x4b6772[_0x542536(0x1c6)]??'any'};return _0x4b6772[_0x542536(0x189)]!==undefined&&(_0x1fa46b[_0x542536(0x189)]=_0x4b6772[_0x542536(0x189)]),_0x1fa46b;}function buildAggregationDefFromApi(_0xb67eab){const _0x204856=a142_0x210957,_0x44452c=_0xb67eab[_0x204856(0x196)];if(_0x44452c==='CountDistinct')return{'type':_0x44452c,'columns':_0xb67eab['columns']??[]};if(_0x44452c===_0x204856(0x185)||_0x44452c===_0x204856(0x136))return{'type':_0x44452c,'column':_0xb67eab[_0x204856(0x15c)]??'','orderColumn':_0xb67eab['orderColumn']??'',..._0xb67eab['groupingColumns']&&{'groupingColumns':_0xb67eab[_0x204856(0x140)]}};if(_0x44452c==='Count')return{'type':_0x44452c,..._0xb67eab[_0x204856(0x140)]&&{'groupingColumns':_0xb67eab[_0x204856(0x140)]}};return{'type':_0x44452c,'column':_0xb67eab[_0x204856(0x15c)]??'',..._0xb67eab['groupingColumns']&&{'groupingColumns':_0xb67eab[_0x204856(0x140)]}};}function buildLeftValue(_0x5bc210){const _0x36e86e=a142_0x210957,_0x1eb6cd={};_0x5bc210[_0x36e86e(0x17a)]&&_0x5bc210['type']!==_0x36e86e(0x177)&&(_0x1eb6cd[_0x36e86e(0x139)]=_0x5bc210[_0x36e86e(0x17a)]);if(_0x5bc210[_0x36e86e(0x15e)]){const _0x505efe=_0x5bc210[_0x36e86e(0x15e)];if(_0x505efe[_0x36e86e(0x196)]===_0x36e86e(0x17e))_0x1eb6cd[_0x36e86e(0x15e)]={'type':_0x36e86e(0x17e),'columns':_0x505efe[_0x36e86e(0x1d0)]};else{if(_0x505efe['type']==='First'||_0x505efe[_0x36e86e(0x196)]===_0x36e86e(0x136))_0x1eb6cd[_0x36e86e(0x15e)]={'type':_0x505efe[_0x36e86e(0x196)],'column':_0x505efe['column'],'orderColumn':_0x505efe[_0x36e86e(0x14f)],..._0x505efe['groupingColumns']&&{'groupingColumns':_0x505efe[_0x36e86e(0x140)]}};else _0x505efe['type']===_0x36e86e(0x1bd)?_0x1eb6cd['aggregation']={'type':_0x36e86e(0x1bd),..._0x505efe[_0x36e86e(0x140)]&&{'groupingColumns':_0x505efe[_0x36e86e(0x140)]}}:_0x1eb6cd[_0x36e86e(0x15e)]={'type':_0x505efe['type'],'column':_0x505efe[_0x36e86e(0x15c)],..._0x505efe[_0x36e86e(0x140)]&&{'groupingColumns':_0x505efe[_0x36e86e(0x140)]}};}}return _0x5bc210[_0x36e86e(0x16f)]&&(_0x1eb6cd[_0x36e86e(0x16f)]={'name':_0x5bc210[_0x36e86e(0x16f)]}),_0x5bc210[_0x36e86e(0x157)]&&(_0x1eb6cd[_0x36e86e(0x157)]=yamlFilterRuleToApi(filterRuleAsRuleDef(_0x5bc210[_0x36e86e(0x157)]))),_0x1eb6cd;}function yamlOperatorToApi(_0x1dbf85){const _0x5540b1=a142_0x210957,_0x3e462b={'type':mapYamlOperatorType(_0x1dbf85['type']),'not':_0x1dbf85[_0x5540b1(0x137)]??![]};if(isBetweenOperator(_0x1dbf85[_0x5540b1(0x196)]))return _0x1dbf85[_0x5540b1(0x1ac)]!==undefined&&(_0x3e462b['minValue']=typeof _0x1dbf85[_0x5540b1(0x1ac)]===_0x5540b1(0x184)?_0x1dbf85[_0x5540b1(0x1ac)]:String(_0x1dbf85[_0x5540b1(0x1ac)])),_0x1dbf85['max']!==undefined&&(_0x3e462b[_0x5540b1(0x13a)]=typeof _0x1dbf85['max']==='object'?_0x1dbf85[_0x5540b1(0x164)]:String(_0x1dbf85[_0x5540b1(0x164)])),_0x3e462b;if(_0x1dbf85[_0x5540b1(0x196)]===_0x5540b1(0x13e))return _0x1dbf85[_0x5540b1(0x1a0)]&&(_0x3e462b[_0x5540b1(0x1a0)]=_0x1dbf85[_0x5540b1(0x1a0)]),_0x1dbf85[_0x5540b1(0x1a9)]&&(_0x3e462b[_0x5540b1(0x1a9)]=_0x1dbf85[_0x5540b1(0x1a9)]),_0x1dbf85['reverse']!==undefined&&(_0x3e462b[_0x5540b1(0x1b5)]=_0x1dbf85[_0x5540b1(0x1b5)]),_0x3e462b;const _0x23f564=getEffectiveValue(_0x1dbf85);if(_0x23f564!==undefined){if(Array[_0x5540b1(0x1c2)](_0x23f564))_0x3e462b[_0x5540b1(0x15f)]=_0x23f564;else isTemporalOperator(_0x1dbf85[_0x5540b1(0x196)])?_0x3e462b[_0x5540b1(0x172)]=_0x23f564:_0x3e462b['rightValue']=_0x23f564;}return _0x1dbf85[_0x5540b1(0x1bb)]&&(_0x3e462b['unit']=_0x1dbf85[_0x5540b1(0x1bb)]),_0x3e462b;}function mapYamlOperatorType(_0x1cbd1f){return _0x1cbd1f;}export function toYamlString(_0x2d008b){const _0xbaf51f=a142_0x210957,_0x106d52=JSON[_0xbaf51f(0x1a5)](JSON[_0xbaf51f(0x1ae)](_0x2d008b)),_0x47f8ad=a142_0x477cbb[_0xbaf51f(0x1ae)](_0x106d52,{'indent':0x2,'lineWidth':0x0,'nullStr':_0xbaf51f(0x138)}),_0x54964b=[_0xbaf51f(0x173)];let _0x101bbe=_0x47f8ad;for(const _0x3600e4 of _0x54964b){_0x101bbe=_0x101bbe['replace'](new RegExp('^('+_0x3600e4+')','m'),(_0x535201,_0x4ecb07,_0x2f361b)=>{if(_0x2f361b===0x0||_0x101bbe[_0x2f361b-0x1]==='\x0a'&&_0x101bbe[_0x2f361b-0x2]==='\x0a')return _0x4ecb07;return'\x0a'+_0x4ecb07;});}return _0x101bbe;}export function parseYamlString(_0x5a1bc2){return parseSegmentYamlFile(_0x5a1bc2);}function a142_0x394c(_0x2384ac,_0x1255af){_0x2384ac=_0x2384ac-0x12e;const _0x57b7b8=a142_0x57b7();let _0x394c41=_0x57b7b8[_0x2384ac];return _0x394c41;}export function isSegmentYaml(_0x53e219){const _0x4bda21=a142_0x210957;if(typeof _0x53e219!==_0x4bda21(0x184)||_0x53e219===null)return![];const _0x16bed0=_0x53e219;return _0x16bed0[_0x4bda21(0x196)]==='segment'||_0x16bed0[_0x4bda21(0x196)]===undefined;}export function generateTemplate(_0x213f4e=a142_0x210957(0x12e)){const _0xe7bc91=a142_0x210957,_0xf90017={'type':'segment','name':_0x213f4e,'description':_0xe7bc91(0x18d),'rule':{'type':_0xe7bc91(0x1bc),'conditions':[{'type':_0xe7bc91(0x162),'attribute':_0xe7bc91(0x19b),'operator':{'type':_0xe7bc91(0x186),'value':_0xe7bc91(0x172)}}]}};return toYamlString(_0xf90017);}export function segmentToYamlString(_0x191d4d){const _0x3d21af=a142_0x210957,_0x1bf3f5=JSON['parse'](JSON[_0x3d21af(0x1ae)](_0x191d4d)),_0x6ab1d6=a142_0x477cbb[_0x3d21af(0x1ae)](_0x1bf3f5,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x3d21af(0x138)}),_0x41ee4c=[_0x3d21af(0x173),_0x3d21af(0x181)];let _0x576601=_0x6ab1d6;for(const _0x4b5b01 of _0x41ee4c){_0x576601=_0x576601['replace'](new RegExp('^('+_0x4b5b01+')','m'),(_0x3d2d41,_0x31f80a,_0x3148b6)=>{if(_0x3148b6===0x0||_0x576601[_0x3148b6-0x1]==='\x0a'&&_0x576601[_0x3148b6-0x2]==='\x0a')return _0x31f80a;return'\x0a'+_0x31f80a;});}return _0x576601;}export function parseSegmentYamlFile(_0x5448e0){return safeParseYaml(_0x5448e0,SegmentDefSchema);}export function normalizeChildSegmentYaml(_0x2572f9){const _0x226f04=a142_0x210957;return{'type':_0x226f04(0x180),'name':_0x2572f9[_0x226f04(0x139)],..._0x2572f9[_0x226f04(0x159)]!==undefined&&{'description':_0x2572f9['description']},..._0x2572f9['folder']!==undefined&&{'folder':_0x2572f9[_0x226f04(0x154)]},..._0x2572f9[_0x226f04(0x19e)]&&{'rule':normalizeRule(_0x2572f9[_0x226f04(0x19e)])},..._0x2572f9[_0x226f04(0x1cc)]!==undefined&&{'kind':_0x2572f9[_0x226f04(0x1cc)]},..._0x2572f9['visible']!==undefined&&{'visible':_0x2572f9['visible']},..._0x2572f9[_0x226f04(0x13b)]&&{'activations':_0x2572f9[_0x226f04(0x13b)][_0x226f04(0x166)](normalizeActivation)}};}export function normalizeRule(_0x2f679a){const _0x5bb697=a142_0x210957;return{'type':_0x2f679a[_0x5bb697(0x196)],'conditions':_0x2f679a['conditions'][_0x5bb697(0x166)](normalizeCondition),..._0x2f679a[_0x5bb697(0x159)]!==undefined&&{'description':_0x2f679a[_0x5bb697(0x159)]}};}function normalizeCondition(_0x210394){const _0x38001a=a142_0x210957;if(_0x38001a(0x180)in _0x210394&&(_0x210394[_0x38001a(0x196)]===_0x38001a(0x1cd)||_0x210394[_0x38001a(0x196)]===_0x38001a(0x1a7))){const _0x488316=_0x210394;return{'type':_0x488316[_0x38001a(0x196)],'segment':_0x488316[_0x38001a(0x180)]};}if(_0x38001a(0x196)in _0x210394&&(_0x210394['type']==='And'||_0x210394[_0x38001a(0x196)]==='Or')){const _0x1e3c7d=_0x210394;return{'type':_0x1e3c7d['type'],'conditions':_0x1e3c7d[_0x38001a(0x174)]['map'](normalizeCondition),..._0x1e3c7d[_0x38001a(0x159)]!==undefined&&{'description':_0x1e3c7d['description']}};}if('column'in _0x210394&&_0x210394[_0x38001a(0x196)]==='Column'){const _0x5c3221=_0x210394;return{'type':_0x38001a(0x17f),'column':_0x5c3221['column'],'operator':normalizeOperator(_0x5c3221[_0x38001a(0x182)])};}const _0x3c301a=_0x210394;return{'type':_0x38001a(0x162),'attribute':_0x3c301a['attribute'],'operator':normalizeOperator(_0x3c301a['operator']),..._0x3c301a['arrayMatching']!==undefined&&{'arrayMatching':_0x3c301a[_0x38001a(0x1c6)]},..._0x3c301a['exclude']!==undefined&&{'exclude':_0x3c301a[_0x38001a(0x1a7)]},..._0x3c301a['aggregation']!==undefined&&{'aggregation':_0x3c301a['aggregation']},..._0x3c301a[_0x38001a(0x16f)]!==undefined&&{'source':_0x3c301a[_0x38001a(0x16f)]},..._0x3c301a[_0x38001a(0x157)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x3c301a['filter'])))},..._0x3c301a[_0x38001a(0x189)]!==undefined&&{'limit':_0x3c301a[_0x38001a(0x189)]}};}function normalizeOperator(_0x553a9f){const _0x43714c=a142_0x210957;if(isBetweenOperator(_0x553a9f['type']))return{'type':_0x553a9f[_0x43714c(0x196)],..._0x553a9f[_0x43714c(0x137)]!==undefined&&{'not':_0x553a9f[_0x43714c(0x137)]},..._0x553a9f['min']!==undefined&&{'min':_0x553a9f[_0x43714c(0x1ac)]},..._0x553a9f[_0x43714c(0x164)]!==undefined&&{'max':_0x553a9f[_0x43714c(0x164)]}};const _0x3d49b5=getEffectiveValue(_0x553a9f);return{'type':_0x553a9f[_0x43714c(0x196)],..._0x553a9f[_0x43714c(0x137)]!==undefined&&{'not':_0x553a9f[_0x43714c(0x137)]},..._0x3d49b5!==undefined&&{'value':_0x3d49b5},..._0x553a9f[_0x43714c(0x1bb)]!==undefined&&{'unit':_0x553a9f[_0x43714c(0x1bb)]},..._0x553a9f[_0x43714c(0x1a0)]!==undefined&&{'duration':_0x553a9f['duration']},..._0x553a9f[_0x43714c(0x1a9)]!==undefined&&{'from':_0x553a9f[_0x43714c(0x1a9)]},..._0x553a9f[_0x43714c(0x1b5)]!==undefined&&{'reverse':_0x553a9f[_0x43714c(0x1b5)]}};}function normalizeActivation(_0xdb3240){const _0x3116b3=a142_0x210957;return{'name':_0xdb3240[_0x3116b3(0x139)],'connection':_0xdb3240[_0x3116b3(0x17b)],..._0xdb3240[_0x3116b3(0x159)]!==undefined&&{'description':_0xdb3240[_0x3116b3(0x159)]},..._0xdb3240[_0x3116b3(0x1b8)]!==undefined&&{'all_columns':_0xdb3240[_0x3116b3(0x1b8)]},..._0xdb3240[_0x3116b3(0x1d0)]!==undefined&&{'columns':_0xdb3240[_0x3116b3(0x1d0)]},..._0xdb3240[_0x3116b3(0x1a1)]!==undefined&&{'behavior':_0xdb3240[_0x3116b3(0x1a1)]},..._0xdb3240[_0x3116b3(0x1c8)]!==undefined&&{'schedule':_0xdb3240[_0x3116b3(0x1c8)]},..._0xdb3240[_0x3116b3(0x19c)]!==undefined&&{'notification':_0xdb3240[_0x3116b3(0x19c)]},..._0xdb3240[_0x3116b3(0x195)]!==undefined&&{'connector_config':_0xdb3240[_0x3116b3(0x195)]},..._0xdb3240[_0x3116b3(0x1ba)]!==undefined&&{'activation_template_id':_0xdb3240[_0x3116b3(0x1ba)]},..._0xdb3240[_0x3116b3(0x1c3)]!==undefined&&{'nested_workflow_project_name':_0xdb3240['nested_workflow_project_name']},..._0xdb3240[_0x3116b3(0x142)]!==undefined&&{'nested_workflow_name':_0xdb3240[_0x3116b3(0x142)]},..._0xdb3240['lock_enabled']!==undefined&&{'lock_enabled':_0xdb3240['lock_enabled']}};}function getColumnName(_0x563348){const _0x43aae7=a142_0x210957;return _0x563348[_0x43aae7(0x15c)]||_0x563348[_0x43aae7(0x139)];}export function activationResponseToDef(_0x4341f8,_0x4b69a8,_0x4c158e){const _0x2f4daf=a142_0x210957,_0x4ddf34=_0x4341f8['connectionId']||'',_0x422f9a=_0x4c158e?.['get'](_0x4ddf34)??_0x4ddf34,_0x5d6e83={'name':_0x4341f8['name'],'connection':_0x422f9a};_0x4341f8[_0x2f4daf(0x159)]&&(_0x5d6e83[_0x2f4daf(0x159)]=_0x4341f8['description']);let _0x2ca399=[];_0x4341f8[_0x2f4daf(0x1d0)]&&_0x4341f8[_0x2f4daf(0x1d0)][_0x2f4daf(0x12f)]>0x0&&(_0x2ca399=_0x4341f8[_0x2f4daf(0x1d0)][_0x2f4daf(0x157)](_0x150f51=>_0x150f51&&getColumnName(_0x150f51))['map'](_0xa2ad55=>{const _0x34a09a=_0x2f4daf,_0x5d04c3=getColumnName(_0xa2ad55);if(_0xa2ad55['type']||_0xa2ad55[_0x34a09a(0x14a)])return{'name':_0x5d04c3,..._0xa2ad55[_0x34a09a(0x196)]&&{'type':_0xa2ad55[_0x34a09a(0x196)]},..._0xa2ad55[_0x34a09a(0x14a)]&&{'visibility':_0xa2ad55[_0x34a09a(0x14a)]}};return _0x5d04c3;}));_0x2ca399[_0x2f4daf(0x12f)]>0x0&&(_0x5d6e83[_0x2f4daf(0x1d0)]=_0x2ca399);_0x4341f8[_0x2f4daf(0x1af)]!==undefined&&(_0x4341f8[_0x2f4daf(0x1af)]===![]&&_0x2ca399[_0x2f4daf(0x12f)]===0x0?_0x5d6e83[_0x2f4daf(0x1b8)]=!![]:_0x5d6e83[_0x2f4daf(0x1b8)]=_0x4341f8[_0x2f4daf(0x1af)]);const _0x1bd2a6={};let _0x96cb5b=![];_0x4341f8[_0x2f4daf(0x183)]&&(_0x1bd2a6[_0x2f4daf(0x196)]=_0x4341f8['scheduleType'],_0x96cb5b=!![]);_0x4341f8[_0x2f4daf(0x1c1)]&&(_0x1bd2a6['repeat_unit']=_0x4341f8['repeatUnit'],_0x96cb5b=!![]);_0x4341f8[_0x2f4daf(0x194)]!==undefined&&_0x4341f8[_0x2f4daf(0x194)]!==null&&(_0x1bd2a6[_0x2f4daf(0x19f)]=_0x4341f8[_0x2f4daf(0x194)],_0x96cb5b=!![]);_0x4341f8[_0x2f4daf(0x197)]&&_0x4341f8['repeatSubFrequency'][_0x2f4daf(0x12f)]>0x0&&(_0x1bd2a6[_0x2f4daf(0x1a8)]=_0x4341f8['repeatSubFrequency'],_0x96cb5b=!![]);_0x4341f8[_0x2f4daf(0x17d)]!==undefined&&(_0x1bd2a6[_0x2f4daf(0x155)]=_0x4341f8['startAt'],_0x96cb5b=!![]);_0x4341f8[_0x2f4daf(0x1c9)]!==undefined&&(_0x1bd2a6[_0x2f4daf(0x19d)]=_0x4341f8[_0x2f4daf(0x1c9)],_0x96cb5b=!![]);_0x4341f8[_0x2f4daf(0x131)]&&(_0x1bd2a6['timezone']=_0x4341f8[_0x2f4daf(0x131)],_0x96cb5b=!![]);_0x96cb5b&&(_0x5d6e83[_0x2f4daf(0x1c8)]=_0x1bd2a6);(_0x4341f8[_0x2f4daf(0x146)]&&_0x4341f8[_0x2f4daf(0x146)]['length']>0x0||_0x4341f8[_0x2f4daf(0x158)]&&_0x4341f8[_0x2f4daf(0x158)][_0x2f4daf(0x12f)]>0x0)&&(_0x5d6e83['notification']={},_0x4341f8[_0x2f4daf(0x146)]&&_0x4341f8['notifyOn'][_0x2f4daf(0x12f)]>0x0&&(_0x5d6e83['notification'][_0x2f4daf(0x1d5)]=_0x4341f8[_0x2f4daf(0x146)]),_0x4341f8[_0x2f4daf(0x158)]&&_0x4341f8[_0x2f4daf(0x158)][_0x2f4daf(0x12f)]>0x0&&(_0x5d6e83[_0x2f4daf(0x19c)]['email_recipients']=_0x4341f8['emailRecipients'][_0x2f4daf(0x166)](_0x382f5c=>{const _0x2b6517=_0x4b69a8?.['get'](_0x382f5c);return _0x2b6517??String(_0x382f5c);})));_0x4341f8[_0x2f4daf(0x141)]&&Object[_0x2f4daf(0x148)](_0x4341f8[_0x2f4daf(0x141)])[_0x2f4daf(0x12f)]>0x0&&(_0x5d6e83[_0x2f4daf(0x195)]=normalizeConnectorConfigForYaml(_0x4341f8[_0x2f4daf(0x141)]));_0x4341f8[_0x2f4daf(0x1cf)]&&(_0x5d6e83['activation_template_id']=_0x4341f8[_0x2f4daf(0x1cf)]);if(_0x4341f8[_0x2f4daf(0x151)]){const _0x6e552e={},_0xfa1a10=_0x4341f8[_0x2f4daf(0x151)];_0xfa1a10[_0x2f4daf(0x1d0)]&&_0xfa1a10[_0x2f4daf(0x1d0)][_0x2f4daf(0x12f)]>0x0&&(_0x6e552e[_0x2f4daf(0x1d0)]=_0xfa1a10['columns']['filter'](_0x44f6e3=>_0x44f6e3&&getColumnName(_0x44f6e3))[_0x2f4daf(0x166)](_0x10b64d=>({'name':getColumnName(_0x10b64d),..._0x10b64d[_0x2f4daf(0x196)]&&{'type':_0x10b64d[_0x2f4daf(0x196)]},..._0x10b64d['visibility']&&{'visibility':_0x10b64d[_0x2f4daf(0x14a)]}}))),_0xfa1a10[_0x2f4daf(0x144)]&&(_0x6e552e[_0x2f4daf(0x156)]=_0xfa1a10[_0x2f4daf(0x144)]),_0xfa1a10[_0x2f4daf(0x1a4)]!==undefined&&(_0x6e552e['join_row']=_0xfa1a10[_0x2f4daf(0x1a4)]),_0xfa1a10[_0x2f4daf(0x1b7)]&&(_0x6e552e[_0x2f4daf(0x169)]=_0xfa1a10['joinStrategy']),_0xfa1a10[_0x2f4daf(0x1a2)]&&(_0x6e552e[_0x2f4daf(0x1a2)]=_0xfa1a10[_0x2f4daf(0x1a2)]),_0xfa1a10[_0x2f4daf(0x147)]&&_0xfa1a10[_0x2f4daf(0x147)]['length']>0x0&&(_0x6e552e[_0x2f4daf(0x1d1)]=_0xfa1a10[_0x2f4daf(0x147)]),Object[_0x2f4daf(0x148)](_0x6e552e)[_0x2f4daf(0x12f)]>0x0&&(_0x5d6e83['behavior']=_0x6e552e);}return _0x4341f8[_0x2f4daf(0x163)]&&(_0x5d6e83['nested_workflow_project_name']=_0x4341f8['nestedWorkflowProjectName']),_0x4341f8[_0x2f4daf(0x16e)]&&(_0x5d6e83[_0x2f4daf(0x142)]=_0x4341f8['nestedWorkflowName']),_0x4341f8[_0x2f4daf(0x17c)]!==undefined&&(_0x5d6e83[_0x2f4daf(0x179)]=_0x4341f8[_0x2f4daf(0x17c)]),_0x5d6e83;}export function journeyActivationStepToYaml(_0x39917a,_0x399f85,_0x440ec6){const _0x3cd9e0=a142_0x210957,_0x5c5a6b=_0x39917a[_0x3cd9e0(0x134)][_0x3cd9e0(0x135)],_0x14ceaf=_0x5c5a6b['connectionId']||'',_0x3c8097=_0x440ec6?.['get'](_0x14ceaf)??_0x14ceaf,_0x148bfe={'name':_0x5c5a6b[_0x3cd9e0(0x139)]||'','connection':_0x3c8097};_0x39917a['attributes'][_0x3cd9e0(0x165)]&&(_0x148bfe[_0x3cd9e0(0x167)]=!![]);_0x5c5a6b[_0x3cd9e0(0x159)]&&(_0x148bfe[_0x3cd9e0(0x159)]=_0x5c5a6b['description']);let _0x61f17c=[];_0x5c5a6b[_0x3cd9e0(0x1d0)]&&_0x5c5a6b['columns'][_0x3cd9e0(0x12f)]>0x0&&(_0x61f17c=_0x5c5a6b[_0x3cd9e0(0x1d0)][_0x3cd9e0(0x157)](_0x202fcd=>_0x202fcd&&getColumnName(_0x202fcd))[_0x3cd9e0(0x166)](_0x61253f=>{const _0x2072bc=_0x3cd9e0,_0x1eb828=getColumnName(_0x61253f);if(_0x61253f['type']||_0x61253f[_0x2072bc(0x14a)])return{'name':_0x1eb828,..._0x61253f[_0x2072bc(0x196)]&&{'type':_0x61253f[_0x2072bc(0x196)]},..._0x61253f[_0x2072bc(0x14a)]&&{'visibility':_0x61253f[_0x2072bc(0x14a)]}};return _0x1eb828;}));_0x61f17c[_0x3cd9e0(0x12f)]>0x0&&(_0x148bfe[_0x3cd9e0(0x1d0)]=_0x61f17c);_0x5c5a6b[_0x3cd9e0(0x1af)]!==undefined&&(_0x5c5a6b[_0x3cd9e0(0x1af)]===![]&&_0x61f17c[_0x3cd9e0(0x12f)]===0x0?_0x148bfe['all_columns']=!![]:_0x148bfe[_0x3cd9e0(0x1b8)]=_0x5c5a6b[_0x3cd9e0(0x1af)]);const _0x3a6104={};let _0x26b4d8=![];_0x5c5a6b[_0x3cd9e0(0x183)]&&(_0x3a6104[_0x3cd9e0(0x196)]=_0x5c5a6b[_0x3cd9e0(0x183)],_0x26b4d8=!![]);_0x5c5a6b[_0x3cd9e0(0x1c1)]&&(_0x3a6104[_0x3cd9e0(0x1b6)]=_0x5c5a6b[_0x3cd9e0(0x1c1)],_0x26b4d8=!![]);_0x5c5a6b[_0x3cd9e0(0x194)]!==undefined&&_0x5c5a6b[_0x3cd9e0(0x194)]!==null&&(_0x3a6104[_0x3cd9e0(0x19f)]=_0x5c5a6b['repeatFrequency'],_0x26b4d8=!![]);_0x5c5a6b[_0x3cd9e0(0x17d)]!==undefined&&(_0x3a6104[_0x3cd9e0(0x155)]=_0x5c5a6b['startAt'],_0x26b4d8=!![]);_0x5c5a6b['endOn']!==undefined&&(_0x3a6104[_0x3cd9e0(0x19d)]=_0x5c5a6b[_0x3cd9e0(0x1c9)],_0x26b4d8=!![]);_0x5c5a6b[_0x3cd9e0(0x131)]&&(_0x3a6104[_0x3cd9e0(0x131)]=_0x5c5a6b[_0x3cd9e0(0x131)],_0x26b4d8=!![]);_0x26b4d8&&(_0x148bfe[_0x3cd9e0(0x1c8)]=_0x3a6104);(_0x5c5a6b[_0x3cd9e0(0x146)]&&_0x5c5a6b[_0x3cd9e0(0x146)][_0x3cd9e0(0x12f)]>0x0||_0x5c5a6b[_0x3cd9e0(0x158)]&&_0x5c5a6b[_0x3cd9e0(0x158)][_0x3cd9e0(0x12f)]>0x0)&&(_0x148bfe[_0x3cd9e0(0x19c)]={},_0x5c5a6b['notifyOn']&&_0x5c5a6b['notifyOn']['length']>0x0&&(_0x148bfe[_0x3cd9e0(0x19c)]['notify_on']=_0x5c5a6b[_0x3cd9e0(0x146)]),_0x5c5a6b[_0x3cd9e0(0x158)]&&_0x5c5a6b['emailRecipients'][_0x3cd9e0(0x12f)]>0x0&&(_0x148bfe[_0x3cd9e0(0x19c)][_0x3cd9e0(0x1b4)]=_0x5c5a6b[_0x3cd9e0(0x158)][_0x3cd9e0(0x166)](_0x12baff=>{const _0x21c015=_0x3cd9e0,_0x52420f=_0x399f85?.[_0x21c015(0x150)](_0x12baff);return _0x52420f??String(_0x12baff);})));_0x5c5a6b[_0x3cd9e0(0x141)]&&Object[_0x3cd9e0(0x148)](_0x5c5a6b[_0x3cd9e0(0x141)])[_0x3cd9e0(0x12f)]>0x0&&(_0x148bfe[_0x3cd9e0(0x195)]=normalizeConnectorConfigForYaml(_0x5c5a6b[_0x3cd9e0(0x141)]));_0x5c5a6b[_0x3cd9e0(0x1cf)]&&(_0x148bfe[_0x3cd9e0(0x1ba)]=_0x5c5a6b[_0x3cd9e0(0x1cf)]);if(_0x5c5a6b['syndicationBehavior']){const _0x1c4bab={},_0x298156=_0x5c5a6b[_0x3cd9e0(0x151)];_0x298156[_0x3cd9e0(0x1d0)]&&_0x298156[_0x3cd9e0(0x1d0)][_0x3cd9e0(0x12f)]>0x0&&(_0x1c4bab[_0x3cd9e0(0x1d0)]=_0x298156[_0x3cd9e0(0x1d0)][_0x3cd9e0(0x157)](_0x25512f=>_0x25512f&&getColumnName(_0x25512f))[_0x3cd9e0(0x166)](_0xeef53f=>({'name':getColumnName(_0xeef53f),..._0xeef53f[_0x3cd9e0(0x196)]&&{'type':_0xeef53f[_0x3cd9e0(0x196)]},..._0xeef53f[_0x3cd9e0(0x14a)]&&{'visibility':_0xeef53f[_0x3cd9e0(0x14a)]}}))),_0x298156[_0x3cd9e0(0x144)]&&(_0x1c4bab[_0x3cd9e0(0x156)]=_0x298156[_0x3cd9e0(0x144)]),_0x298156['joinRow']!==undefined&&(_0x1c4bab[_0x3cd9e0(0x1a6)]=_0x298156['joinRow']),_0x298156[_0x3cd9e0(0x1b7)]&&(_0x1c4bab[_0x3cd9e0(0x169)]=_0x298156['joinStrategy']),_0x298156[_0x3cd9e0(0x1a2)]&&(_0x1c4bab['formatting']=_0x298156[_0x3cd9e0(0x1a2)]),_0x298156[_0x3cd9e0(0x147)]&&_0x298156[_0x3cd9e0(0x147)][_0x3cd9e0(0x12f)]>0x0&&(_0x1c4bab[_0x3cd9e0(0x1d1)]=_0x298156[_0x3cd9e0(0x147)]),Object['keys'](_0x1c4bab)[_0x3cd9e0(0x12f)]>0x0&&(_0x148bfe[_0x3cd9e0(0x1a1)]=_0x1c4bab);}return _0x148bfe;}export function segmentWithActivationsToYaml(_0x30c223,_0x44e760,_0x32438f,_0x43c6be,_0x56db0c){const _0x4e8caf=a142_0x210957,_0xb216a1=segmentResponseToDefSync(_0x30c223,_0x32438f);return _0x44e760[_0x4e8caf(0x12f)]>0x0&&(_0xb216a1[_0x4e8caf(0x13b)]=_0x44e760['map'](_0x289b9a=>activationResponseToDef(_0x289b9a,_0x43c6be,_0x56db0c))),_0xb216a1;}function normalizeColumn(_0x177d47){const _0x33f80a=a142_0x210957;if(typeof _0x177d47===_0x33f80a(0x178))return{'column':_0x177d47,'source':{'column':_0x177d47}};return{'column':_0x177d47[_0x33f80a(0x139)],'source':{'column':_0x177d47['name']},..._0x177d47['type']&&{'type':_0x177d47[_0x33f80a(0x196)]},..._0x177d47['visibility']&&{'visibility':_0x177d47[_0x33f80a(0x14a)]}};}function a142_0x57b7(){const _0x50c1e6=['join_strategy','cron','__UNRESOLVED__','add','209994gDbIWP','nestedWorkflowName','source','conditions[','sort','value','rule:','conditions','segmentFolderId','].attribute\x20cannot\x20be\x20empty.\x0a','Behavior','string','lock_enabled','attribute','connection','lockEnabled','startAt','CountDistinct','Column','segment','activations:','operator','scheduleType','object','First','Equal','has','visible','limit','monthly','Connector:\x20','2240273yWQuof','Segment\x20description','Reference','155668XgSvBR','536065ptqfOT','TimeWithinPast','all','entries','repeatFrequency','connector_config','type','repeatSubFrequency','errors','match','getSchema','attribute_name','notification','end_on','rule','repeat_frequency','duration','behavior','formatting','Please\x20specify\x20a\x20valid\x20attribute\x20name.','joinRow','parse','join_row','exclude','repeat_sub_frequency','from','CONNECTION_NOT_FOUND','warnings','min','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','stringify','allColumns','6YLHtEi','any','606804NTSxzZ','month','email_recipients','reverse','repeat_unit','joinStrategy','all_columns','minutes_interval','activation_template_id','unit','And','Count','isVisible','CONNECTOR_SCHEMA_NOT_FOUND','weekly','repeatUnit','isArray','nested_workflow_project_name','minute','8itdTkS','arrayMatching','hourly','schedule','endOn','usedNames','leftValue','kind','include','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','activationTemplateId','columns','order_by','values','localRuleToName','TimeWithinNext','notify_on','1121481vtLDdm','minValue','New\x20Segment','length','emailToIdMap','timezone','Unknown\x20connection:\x20','Unknown\x20email\x20recipient:\x20','attributes','activationParams','Last','not','null','name','maxValue','activations','valid','ruleHashToName','TimeRange','INVALID_ARGUMENT','groupingColumns','connectorConfig','nested_workflow_name','day','behaviorTableName','__SEGMENT_REF__','notifyOn','orderBy','keys','realtime','visibility','\x22:\x0a','none','daily','batch','orderColumn','get','syndicationBehavior','rightValue','11568870OVKxJq','folder','start_at','behavior_table','filter','emailRecipients','description','forEach','\x0a\x0aAvailable\x20fields:\x0a','column','toLowerCase','aggregation','rightValues','CONNECTOR_INVALID_CONFIG','hour','Value','nestedWorkflowProjectName','max','runAfterJourneyRefresh','map','run_after_journey_refresh','18OsUWmu'];a142_0x57b7=function(){return _0x50c1e6;};return a142_0x57b7();}export async function activationDefToCreateRequest(_0xaaef52,_0xd7c393){const _0x34f450=a142_0x210957,_0x4d482d=_0xd7c393?.[_0x34f450(0x130)],_0x3470d1=_0xd7c393?.['connectionNameToIdMap'],_0x358b9b=_0xaaef52[_0x34f450(0x17b)];let _0x476cdc;const _0x109ebe=parseInt(_0x358b9b,0xa);if(!isNaN(_0x109ebe)&&String(_0x109ebe)===_0x358b9b)_0x476cdc=_0x109ebe;else{const _0x47e257=_0x3470d1?.[_0x34f450(0x150)](_0x358b9b);if(_0x47e257===undefined)throw new SDKError(ErrorCode[_0x34f450(0x1aa)],_0x34f450(0x132)+_0x358b9b,undefined,{'helpText':'Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections'});_0x476cdc=_0x47e257;}const _0x226357={'name':_0xaaef52[_0x34f450(0x139)],'connectionId':_0x476cdc};_0xaaef52['description']&&(_0x226357['description']=_0xaaef52[_0x34f450(0x159)]);let _0x222df0=[];_0xaaef52[_0x34f450(0x1d0)]&&_0xaaef52[_0x34f450(0x1d0)][_0x34f450(0x12f)]>0x0&&(_0x222df0=_0xaaef52[_0x34f450(0x1d0)][_0x34f450(0x157)](_0x4a838b=>_0x4a838b!=null)[_0x34f450(0x166)](normalizeColumn));_0x222df0[_0x34f450(0x12f)]>0x0&&(_0x226357[_0x34f450(0x1d0)]=_0x222df0);_0xaaef52[_0x34f450(0x1b8)]!==undefined&&(_0xaaef52[_0x34f450(0x1b8)]===![]&&_0x222df0[_0x34f450(0x12f)]===0x0?_0x226357[_0x34f450(0x1af)]=!![]:_0x226357[_0x34f450(0x1af)]=_0xaaef52[_0x34f450(0x1b8)]);if(_0xaaef52[_0x34f450(0x1c8)]){const _0xf602d1=_0xaaef52[_0x34f450(0x1c8)],_0x26913e=_0xf602d1[_0x34f450(0x196)]??REPEAT_UNIT_TO_SCHEDULE_TYPE[_0xf602d1[_0x34f450(0x1b6)]];_0x26913e&&(_0x226357[_0x34f450(0x183)]=_0x26913e);const _0x170b60=_0xf602d1[_0x34f450(0x1b6)]??SCHEDULE_TYPE_TO_REPEAT_UNIT[_0xf602d1[_0x34f450(0x196)]];_0x170b60&&(_0x226357[_0x34f450(0x1c1)]=_0x170b60);_0xf602d1[_0x34f450(0x19f)]!==undefined&&(_0x226357['repeatFrequency']=_0xf602d1['repeat_frequency']);_0xf602d1[_0x34f450(0x1a8)]&&(_0x226357[_0x34f450(0x197)]=_0xf602d1['repeat_sub_frequency']);_0xf602d1[_0x34f450(0x155)]!==undefined&&(_0x226357[_0x34f450(0x17d)]=_0xf602d1['start_at']);_0xf602d1[_0x34f450(0x19d)]!==undefined&&(_0x226357[_0x34f450(0x1c9)]=_0xf602d1['end_on']);_0xf602d1[_0x34f450(0x131)]&&(_0x226357['timezone']=_0xf602d1[_0x34f450(0x131)]);if(_0x26913e&&_0x26913e!==_0x34f450(0x14c)&&_0x26913e!==_0x34f450(0x16a)&&_0xf602d1[_0x34f450(0x155)]){const _0x91658b=_0xf602d1[_0x34f450(0x155)][_0x34f450(0x199)](/T(\d{2}:\d{2})/);_0x91658b&&(_0x226357['scheduleOption']=_0x91658b[0x1]);}}_0xaaef52['notification']&&(_0xaaef52[_0x34f450(0x19c)]['notify_on']&&(_0x226357[_0x34f450(0x146)]=_0xaaef52[_0x34f450(0x19c)][_0x34f450(0x1d5)]),_0xaaef52[_0x34f450(0x19c)][_0x34f450(0x1b4)]&&(_0x226357[_0x34f450(0x158)]=_0xaaef52[_0x34f450(0x19c)]['email_recipients'][_0x34f450(0x166)](_0x3bc4c4=>{const _0x197696=_0x34f450,_0x3d8e7a=Number(_0x3bc4c4);if(!isNaN(_0x3d8e7a)&&String(_0x3d8e7a)===_0x3bc4c4)return _0x3d8e7a;const _0x26c0f3=_0x4d482d?.[_0x197696(0x150)](_0x3bc4c4[_0x197696(0x15d)]());if(_0x26c0f3===undefined)throw new SDKError(ErrorCode[_0x197696(0x13f)],_0x197696(0x133)+_0x3bc4c4+_0x197696(0x1ce));return _0x26c0f3;})));if(_0xaaef52[_0x34f450(0x195)]){const _0x3d402a=_0xd7c393?.['connectionNameToTypeMap']?.[_0x34f450(0x150)](_0x358b9b);if(_0x3d402a&&_0xd7c393?.[_0x34f450(0x19a)])try{const _0x9bdd2c=await _0xd7c393['getSchema'](_0x3d402a),_0x234086=validateConnectorConfig(_0xaaef52['connector_config'],_0x9bdd2c);if(!_0x234086[_0x34f450(0x13c)])throw new SDKError(ErrorCode[_0x34f450(0x160)],'Invalid\x20connector_config\x20for\x20activation\x20\x22'+_0xaaef52[_0x34f450(0x139)]+_0x34f450(0x14b)+formatValidationErrors(_0x234086[_0x34f450(0x198)]),undefined,{'helpText':_0x34f450(0x18b)+_0x3d402a+_0x34f450(0x15b)+formatSchemaAsHelp(_0x9bdd2c)});if(_0x234086['warnings'][_0x34f450(0x12f)]>0x0){const _0x57a855=formatValidationWarnings(_0x234086[_0x34f450(0x1ab)]);console['warn']('connector_config\x20for\x20activation\x20\x22'+_0xaaef52['name']+_0x34f450(0x14b)+_0x57a855);}_0x226357[_0x34f450(0x141)]=transformConfigToLegacy(_0xaaef52['connector_config'],_0x9bdd2c);}catch(_0x4131aa){if(_0x4131aa instanceof SDKError&&_0x4131aa['code']===ErrorCode[_0x34f450(0x1bf)])_0x226357[_0x34f450(0x141)]=_0xaaef52[_0x34f450(0x195)];else throw _0x4131aa;}else _0x226357[_0x34f450(0x141)]=_0xaaef52['connector_config'];}_0xaaef52[_0x34f450(0x1ba)]!==undefined&&(_0x226357[_0x34f450(0x1cf)]=_0xaaef52['activation_template_id']);if(_0xaaef52[_0x34f450(0x1a1)]){const _0x53bc43=_0xaaef52[_0x34f450(0x1a1)],_0x1f37a6={};if(_0x53bc43[_0x34f450(0x1d0)]&&_0x53bc43[_0x34f450(0x1d0)][_0x34f450(0x12f)]>0x0){const _0x283de0=_0x53bc43[_0x34f450(0x1d0)][_0x34f450(0x157)](_0x51b318=>_0x51b318&&_0x51b318[_0x34f450(0x139)])[_0x34f450(0x166)](normalizeColumn);_0x283de0[_0x34f450(0x12f)]>0x0&&(_0x1f37a6[_0x34f450(0x1d0)]=_0x283de0);}_0x53bc43['behavior_table']&&(_0x1f37a6[_0x34f450(0x144)]=_0x53bc43[_0x34f450(0x156)]),_0x53bc43[_0x34f450(0x1a6)]!==undefined&&(_0x1f37a6['joinRow']=_0x53bc43[_0x34f450(0x1a6)]),_0x53bc43[_0x34f450(0x169)]&&(_0x1f37a6[_0x34f450(0x1b7)]=_0x53bc43[_0x34f450(0x169)]),_0x53bc43['formatting']&&(_0x1f37a6[_0x34f450(0x1a2)]=_0x53bc43[_0x34f450(0x1a2)]),_0x53bc43['order_by']&&(_0x1f37a6[_0x34f450(0x147)]=_0x53bc43['order_by']),_0x226357[_0x34f450(0x151)]=_0x1f37a6;}return _0xaaef52[_0x34f450(0x1c3)]&&(_0x226357[_0x34f450(0x163)]=_0xaaef52[_0x34f450(0x1c3)]),_0xaaef52[_0x34f450(0x142)]&&(_0x226357[_0x34f450(0x16e)]=_0xaaef52[_0x34f450(0x142)]),_0xaaef52[_0x34f450(0x179)]!==undefined&&(_0x226357[_0x34f450(0x17c)]=_0xaaef52[_0x34f450(0x179)]),_0x226357;}export async function activationDefToUpdateRequest(_0x1624d8,_0x3faf14){return activationDefToCreateRequest(_0x1624d8,_0x3faf14);}export function deepSortObject(_0x4571a4){const _0x4837cc=a142_0x210957;if(_0x4571a4===null||typeof _0x4571a4!==_0x4837cc(0x184))return _0x4571a4;if(Array[_0x4837cc(0x1c2)](_0x4571a4))return _0x4571a4[_0x4837cc(0x166)](deepSortObject)[_0x4837cc(0x171)]((_0x19c669,_0x2940bb)=>JSON[_0x4837cc(0x1ae)](_0x19c669)['localeCompare'](JSON[_0x4837cc(0x1ae)](_0x2940bb)));const _0x53e2d5={};for(const _0x54e368 of Object[_0x4837cc(0x148)](_0x4571a4)[_0x4837cc(0x171)]()){_0x53e2d5[_0x54e368]=deepSortObject(_0x4571a4[_0x54e368]);}return _0x53e2d5;}export function serializeRule(_0x46ca77){const _0x2d7ee1=a142_0x210957;return JSON[_0x2d7ee1(0x1ae)](deepSortObject(_0x46ca77));}export function normalizeRuleForMatching(_0x53a5ea){return normalizeConditionsForMatching(_0x53a5ea);}function normalizeConditionsForMatching(_0x56536a){const _0xd6b1a8=a142_0x210957;if(_0x56536a===null||typeof _0x56536a!==_0xd6b1a8(0x184))return _0x56536a;if(Array[_0xd6b1a8(0x1c2)](_0x56536a))return _0x56536a[_0xd6b1a8(0x166)](normalizeConditionsForMatching);const _0x35465d=_0x56536a;if((_0x35465d[_0xd6b1a8(0x196)]===_0xd6b1a8(0x1cd)||_0x35465d['type']===_0xd6b1a8(0x1a7))&&typeof _0x35465d[_0xd6b1a8(0x180)]===_0xd6b1a8(0x178))return{..._0x35465d,'segment':_0xd6b1a8(0x145)};const _0x1acf7b={};for(const _0x4dfe13 of Object[_0xd6b1a8(0x148)](_0x35465d)){_0x1acf7b[_0x4dfe13]=normalizeConditionsForMatching(_0x35465d[_0x4dfe13]);}return _0x1acf7b;}export function serializeRuleForMatching(_0x39253b){const _0x5bdad5=a142_0x210957;return JSON[_0x5bdad5(0x1ae)](deepSortObject(normalizeRuleForMatching(_0x39253b)));}export function expandSegmentReferences(_0x4651fa,_0x2e3262,_0x5b4657=new Set()){return expandConditions(_0x4651fa,_0x2e3262,_0x5b4657);}function expandConditions(_0x3ab7ff,_0x4e51dc,_0x4e1e5a){const _0x1e99aa=a142_0x210957;if(_0x3ab7ff===null||typeof _0x3ab7ff!==_0x1e99aa(0x184))return _0x3ab7ff;if(Array[_0x1e99aa(0x1c2)](_0x3ab7ff))return _0x3ab7ff[_0x1e99aa(0x166)](_0x12514a=>expandConditions(_0x12514a,_0x4e51dc,_0x4e1e5a));const _0x4c02f9=_0x3ab7ff;if((_0x4c02f9['type']==='include'||_0x4c02f9[_0x1e99aa(0x196)]==='exclude')&&typeof _0x4c02f9[_0x1e99aa(0x180)]===_0x1e99aa(0x178)){const _0x119852=_0x4c02f9[_0x1e99aa(0x180)],_0x559f31=_0x4e51dc[_0x1e99aa(0x150)](_0x119852);if(_0x559f31&&!_0x4e1e5a[_0x1e99aa(0x187)](_0x119852)){const _0x5991de=new Set(_0x4e1e5a);_0x5991de[_0x1e99aa(0x16c)](_0x119852);const _0xeb6f02=expandConditions(_0x559f31,_0x4e51dc,_0x5991de);return{'type':_0x4c02f9[_0x1e99aa(0x196)],'expanded_rule':_0xeb6f02};}return{'type':_0x4c02f9['type'],'expanded_rule':_0x1e99aa(0x16b)};}const _0x1c08d7={};for(const _0x558334 of Object['keys'](_0x4c02f9)){_0x1c08d7[_0x558334]=expandConditions(_0x4c02f9[_0x558334],_0x4e51dc,_0x4e1e5a);}return _0x1c08d7;}export function serializeExpandedRule(_0x3146ec,_0x1381eb){const _0x59038e=expandSegmentReferences(_0x3146ec,_0x1381eb);return JSON['stringify'](deepSortObject(_0x59038e));}export function createSegmentNameContext(_0x4bca2e){const _0x1126e8=a142_0x210957,_0x340c92=new Set(),_0x120804=new Map(),_0x5cf0f5=new Map();if(_0x4bca2e)for(const [_0x212d91,_0x1b8828]of Object[_0x1126e8(0x193)](_0x4bca2e)){if(_0x1b8828[_0x1126e8(0x19e)]){const _0x30f38f=serializeRule(_0x1b8828['rule']);_0x5cf0f5['set'](_0x30f38f,_0x212d91),_0x340c92['add'](_0x212d91);}}return{'usedNames':_0x340c92,'ruleHashToName':_0x120804,'localRuleToName':_0x4bca2e?_0x5cf0f5:undefined};}export function resolveSegmentName(_0x2fdcfb,_0x2ff385,_0x457678,_0x4ec20e){const _0x40f3dd=a142_0x210957,_0x269ec8=serializeRule(_0x2ff385);if(_0x457678[_0x40f3dd(0x1d3)]){const _0x366005=_0x457678[_0x40f3dd(0x1d3)][_0x40f3dd(0x150)](_0x269ec8);if(_0x366005)return{'name':_0x366005,'isDuplicate':![],'isLocalMatch':!![]};}const _0x339516=_0x457678[_0x40f3dd(0x13d)]['get'](_0x269ec8);if(_0x339516)return{'name':_0x339516,'isDuplicate':!![],'isLocalMatch':![]};const _0x297355=_0x4ec20e(_0x2fdcfb);let _0x45668d=_0x297355||_0x2fdcfb,_0x445203=_0x45668d,_0x82804e=0x2;while(_0x457678[_0x40f3dd(0x1ca)][_0x40f3dd(0x187)](_0x445203)){_0x445203=_0x45668d+'_'+_0x82804e,_0x82804e++;}return _0x457678[_0x40f3dd(0x1ca)][_0x40f3dd(0x16c)](_0x445203),_0x457678['ruleHashToName']['set'](_0x269ec8,_0x445203),{'name':_0x445203,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x2f7062){const _0x1ef172=[],_0x357359=_0x143e80=>{const _0x42b361=a142_0x394c;if(!_0x143e80||typeof _0x143e80!==_0x42b361(0x184))return;if(Array['isArray'](_0x143e80)){_0x143e80[_0x42b361(0x15a)](_0x357359);return;}const _0x13ad16=_0x143e80;(_0x13ad16[_0x42b361(0x196)]==='include'||_0x13ad16['type']===_0x42b361(0x1a7))&&typeof _0x13ad16[_0x42b361(0x180)]===_0x42b361(0x178)&&_0x1ef172['push'](_0x13ad16[_0x42b361(0x180)]);for(const _0x1e549e of Object[_0x42b361(0x1d2)](_0x13ad16)){_0x357359(_0x1e549e);}};return _0x357359(_0x2f7062),_0x1ef172;}export function validateSegmentRule(_0x5f2e25,_0x41282f){const _0x194265=a142_0x210957;if(!_0x41282f||!_0x41282f['conditions'])return;for(let _0x6903ab=0x0;_0x6903ab<_0x41282f[_0x194265(0x174)][_0x194265(0x12f)];_0x6903ab++){const _0x45e555=_0x41282f[_0x194265(0x174)][_0x6903ab];if(_0x194265(0x196)in _0x45e555&&_0x45e555[_0x194265(0x196)]==='Value'){const _0xd733ad=_0x45e555,_0x572a1d=_0xd733ad['source']||_0xd733ad[_0x194265(0x15e)];if((!_0xd733ad[_0x194265(0x17a)]||_0xd733ad['attribute']==='')&&!_0x572a1d)throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x194265(0x1ad)+_0x5f2e25+'\x27:\x20'+(_0x194265(0x170)+_0x6903ab+_0x194265(0x176))+_0x194265(0x1a3));}}}
@@ -1 +1 @@
1
- (function(_0x5b6c47,_0x38d1cd){const _0x3fe69e=a143_0x2727,_0x2c9486=_0x5b6c47();while(!![]){try{const _0x11c257=-parseInt(_0x3fe69e(0xeb))/0x1*(parseInt(_0x3fe69e(0xbe))/0x2)+-parseInt(_0x3fe69e(0xcb))/0x3+-parseInt(_0x3fe69e(0xde))/0x4*(parseInt(_0x3fe69e(0xe0))/0x5)+-parseInt(_0x3fe69e(0xea))/0x6+-parseInt(_0x3fe69e(0xd5))/0x7+parseInt(_0x3fe69e(0xd9))/0x8+parseInt(_0x3fe69e(0xe1))/0x9;if(_0x11c257===_0x38d1cd)break;else _0x2c9486['push'](_0x2c9486['shift']());}catch(_0x9fb25c){_0x2c9486['push'](_0x2c9486['shift']());}}}(a143_0x11be,0xe3dcc));import a143_0xe3e92 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0xa7fa3b){const _0x54bdea=a143_0x2727,_0x12219a=_0xa7fa3b[_0x54bdea(0xe3)][_0x54bdea(0xd7)](_0x1d44e5=>({'column_name':_0x1d44e5['name'],'column_type':_0x1d44e5[_0x54bdea(0xec)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0xa7fa3b,'columns':[{'name':_0x54bdea(0xda),'type':_0x54bdea(0xc9)},{'name':'column_type','type':_0x54bdea(0xc9)},{'name':'null','type':_0x54bdea(0xc9)},{'name':_0x54bdea(0xdb),'type':'varchar'},{'name':'default','type':_0x54bdea(0xc9)},{'name':_0x54bdea(0xee),'type':'varchar'}],'data':_0x12219a};}function a143_0x11be(){const _0x5576d4=['\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','attribute','set','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','Unknown','varchar','localeCompare','1876593gZLTeY','filter','slice','entries','data','matrixColumnName','tableName','behaviorName','Attributes','SELECT\x20*\x20FROM\x20(\x0a','100604AlUrid','size','map','execute','6092328rJUZGa','column_name','key','setJobId','Fetching\x20schema...','280toShpB','get','38270yNuMpI','21883338pnXgej','error','columns','cyan','behavior','Schema\x20query:\x0a','trim','\x20\x20\x20\x20','some','3760632WDjUax','2IDSeCO','type','verbose','extra','information_schema','fields','startsWith','query','displayName','source','bold','parentTableName','457244IkjiRi','sort','length','name','dim','matrixTableName'];a143_0x11be=function(){return _0x5576d4;};return a143_0x11be();}export async function executeSchemaQuery(_0x291ce5,_0x4115e2,_0xe867cb){const _0xc758bb=a143_0x2727,_0x5ccd99=_0x291ce5[_0xc758bb(0xe7)]()['replace'](/;+$/,''),_0x269334=_0xc758bb(0xd4)+_0x5ccd99+_0xc758bb(0xc7);_0xe867cb[_0xc758bb(0xed)]&&console[_0xc758bb(0xe2)](_0xc758bb(0xe6)+_0x269334);const _0x449f51=await withProgressSpinner(_0xc758bb(0xdd),async _0x5f4d96=>{const _0x1426e6=_0xc758bb,_0x534e62=await _0x4115e2[_0x1426e6(0xf2)][_0x1426e6(0xd8)](_0x269334,{'catalog':'td','schema':_0x1426e6(0xef),'onJobId':_0x1d94ef=>{const _0x3ac53e=_0x1426e6;_0x5f4d96[_0x3ac53e(0xdc)](_0x1d94ef);}});return _0x534e62;},{'verbose':_0xe867cb[_0xc758bb(0xed)]});return buildSchemaResult(_0x449f51[_0xc758bb(0xcf)]);}function columnName(_0x1e5047){const _0x5c9d43=a143_0x2727;return _0x1e5047[_0x5c9d43(0xd0)]||_0x1e5047['parentColumn']||_0x1e5047[_0x5c9d43(0xc1)];}function formatFieldLine(_0x2494ff,_0x4dbfba,_0x15f7e1){const _0x469bb7=a143_0x2727,_0x28f57b=_0x2494ff!==_0x4dbfba?'\x20'+a143_0xe3e92[_0x469bb7(0xc2)]('('+_0x4dbfba+')'):'';return _0x469bb7(0xe8)+_0x2494ff+_0x28f57b+':\x20'+a143_0xe3e92[_0x469bb7(0xe4)](_0x15f7e1);}function a143_0x2727(_0x3141c3,_0x26ac1e){_0x3141c3=_0x3141c3-0xbe;const _0x11be9e=a143_0x11be();let _0x272729=_0x11be9e[_0x3141c3];return _0x272729;}function sortByColumnName(_0x22b312){const _0x47a0c3=a143_0x2727;return[..._0x22b312][_0x47a0c3(0xbf)]((_0x367d4f,_0x1a3851)=>columnName(_0x367d4f)['localeCompare'](columnName(_0x1a3851)));}export function displayFieldsHumanReadable(_0x2ae4fb,_0x2bbbe0){const _0x5e7ced=a143_0x2727,_0x158b33=_0x2ae4fb[_0x5e7ced(0xcc)](_0x330c32=>_0x330c32['source']===_0x5e7ced(0xc5)),_0x33d085=_0x2ae4fb['filter'](_0x2a978e=>_0x2a978e[_0x5e7ced(0xf4)]===_0x5e7ced(0xe5)),_0x104bcb=new Map();for(const _0x59ec0e of _0x158b33){const _0x30e784=_0x59ec0e['groupingName']||_0x59ec0e['parentTableName']||_0x5e7ced(0xc8),_0x1769b4=_0x104bcb[_0x5e7ced(0xdf)](_0x30e784);_0x1769b4?_0x1769b4[_0x5e7ced(0xf0)]['push'](_0x59ec0e):_0x104bcb['set'](_0x30e784,{'displayName':_0x30e784,'tableName':_0x59ec0e[_0x5e7ced(0xf6)],'fields':[_0x59ec0e]});}const _0x17726e=new Map();for(const _0xb32c8e of _0x33d085){const _0xea676e=_0xb32c8e[_0x5e7ced(0xd2)]||_0x5e7ced(0xc8),_0x5a868d=_0x17726e[_0x5e7ced(0xdf)](_0xea676e)||[];_0x5a868d['push'](_0xb32c8e),_0x17726e[_0x5e7ced(0xc6)](_0xea676e,_0x5a868d);}console['error']('\x0a'+a143_0xe3e92[_0x5e7ced(0xf5)](_0x2bbbe0));if(_0x104bcb[_0x5e7ced(0xd6)]>0x0){console[_0x5e7ced(0xe2)]('\x0a'+a143_0xe3e92['dim'](_0x5e7ced(0xd3)));const _0x2ecb5f=[..._0x104bcb[_0x5e7ced(0xce)]()][_0x5e7ced(0xbf)]((_0x39ee03,_0x58c67b)=>_0x39ee03[0x0][_0x5e7ced(0xca)](_0x58c67b[0x0]));for(const [,_0xd44dcd]of _0x2ecb5f){const _0x207aa6=_0xd44dcd[_0x5e7ced(0xd1)]&&_0xd44dcd[_0x5e7ced(0xd1)]!==_0xd44dcd[_0x5e7ced(0xf3)]?'\x20'+a143_0xe3e92[_0x5e7ced(0xc2)]('('+_0xd44dcd[_0x5e7ced(0xd1)]+')'):'';console[_0x5e7ced(0xe2)]('\x20\x20'+a143_0xe3e92['bold'](_0xd44dcd[_0x5e7ced(0xf3)])+_0x207aa6);for(const _0x1033bc of sortByColumnName(_0xd44dcd[_0x5e7ced(0xf0)])){console[_0x5e7ced(0xe2)](formatFieldLine(columnName(_0x1033bc),_0x1033bc['name'],_0x1033bc[_0x5e7ced(0xec)]));}}}if(_0x17726e[_0x5e7ced(0xd6)]>0x0){console[_0x5e7ced(0xe2)]('\x0a'+a143_0xe3e92['dim']('Behaviors'));const _0x229873=[..._0x17726e[_0x5e7ced(0xce)]()][_0x5e7ced(0xbf)]((_0x1c1c31,_0x1f7cd2)=>_0x1c1c31[0x0][_0x5e7ced(0xca)](_0x1f7cd2[0x0]));for(const [_0x590abd,_0x372e64]of _0x229873){const _0x3477a7=_0x372e64[0x0],_0x402be0=_0x3477a7?.['matrixTableName'];if(_0x402be0){const _0x143634=_0x402be0!==_0x590abd?'\x20'+a143_0xe3e92['dim']('('+_0x590abd+')'):'';console['error']('\x20\x20'+a143_0xe3e92[_0x5e7ced(0xf5)](_0x402be0)+_0x143634);}else{const _0x1b2e84=_0x3477a7?.[_0x5e7ced(0xf6)]||'';console[_0x5e7ced(0xe2)]('\x20\x20'+a143_0xe3e92[_0x5e7ced(0xf5)](_0x590abd)+(_0x1b2e84?'\x20'+a143_0xe3e92[_0x5e7ced(0xc2)]('('+_0x1b2e84+')'):''));}for(const _0x258c2a of sortByColumnName(_0x372e64)){const _0x4a7324=_0x258c2a['name'][_0x5e7ced(0xf1)](_0x590abd+'.')?_0x258c2a[_0x5e7ced(0xc1)][_0x5e7ced(0xcd)](_0x590abd[_0x5e7ced(0xc0)]+0x1):_0x258c2a[_0x5e7ced(0xc1)];console[_0x5e7ced(0xe2)](formatFieldLine(columnName(_0x258c2a),_0x4a7324,_0x258c2a[_0x5e7ced(0xec)]));}}}const _0x2bbfe3=_0x2ae4fb[_0x5e7ced(0xe9)](_0x5495f7=>_0x5495f7[_0x5e7ced(0xd0)]||_0x5495f7[_0x5e7ced(0xc3)]);_0x2bbfe3&&(console['error']('\x0a'+a143_0xe3e92[_0x5e7ced(0xc2)]('Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).')),console[_0x5e7ced(0xe2)](a143_0xe3e92[_0x5e7ced(0xc2)](_0x5e7ced(0xc4)))),console[_0x5e7ced(0xe2)]('');}
1
+ (function(_0x278a7f,_0x4bb56f){const _0x517168=a143_0x2636,_0x1f54ad=_0x278a7f();while(!![]){try{const _0x54f2c7=-parseInt(_0x517168(0x117))/0x1*(-parseInt(_0x517168(0x110))/0x2)+parseInt(_0x517168(0x121))/0x3*(parseInt(_0x517168(0x11e))/0x4)+parseInt(_0x517168(0x11c))/0x5*(parseInt(_0x517168(0x123))/0x6)+-parseInt(_0x517168(0x104))/0x7*(parseInt(_0x517168(0xf1))/0x8)+parseInt(_0x517168(0x118))/0x9+-parseInt(_0x517168(0x125))/0xa+-parseInt(_0x517168(0x11d))/0xb;if(_0x54f2c7===_0x4bb56f)break;else _0x1f54ad['push'](_0x1f54ad['shift']());}catch(_0x4e023d){_0x1f54ad['push'](_0x1f54ad['shift']());}}}(a143_0x794e,0xa518f));function a143_0x794e(){const _0x47f157=['trim','sort','fields','1hvYGEN','1944927sqeyKy','get','bold','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','35440OxKNze','4295247MPqNuL','732HklXQT','information_schema','size','1875njgIUS','entries','1098XggzUz','set','1743680dWEvIK','displayName','varchar','type','verbose','startsWith','error','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','Behaviors','setJobId','replace','8kBtfuz','column_type','Unknown','data','Attributes','default','localeCompare','\x20\x20\x20\x20','filter','query','SELECT\x20*\x20FROM\x20(\x0a','column_name','tableName','behaviorName','Schema\x20query:\x0a','columns','attribute','null','dim','4441843IapBsa','groupingName','parentTableName','some','slice','name','parentColumn','key','source','cyan','matrixColumnName','push','496102hbekPX','matrixTableName','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','YES'];a143_0x794e=function(){return _0x47f157;};return a143_0x794e();}import a143_0x27f07a from'chalk';function a143_0x2636(_0x31a0da,_0x47ae81){_0x31a0da=_0x31a0da-0xeb;const _0x794e38=a143_0x794e();let _0x2636ed=_0x794e38[_0x31a0da];return _0x2636ed;}import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x144ed8){const _0x144a5f=a143_0x2636,_0x539634=_0x144ed8[_0x144a5f(0x100)]['map'](_0x20fc14=>({'column_name':_0x20fc14[_0x144a5f(0x109)],'column_type':_0x20fc14[_0x144a5f(0x128)],'null':_0x144a5f(0x113),'key':null,'default':null,'extra':null}));return{..._0x144ed8,'columns':[{'name':_0x144a5f(0xfc),'type':'varchar'},{'name':_0x144a5f(0xf2),'type':_0x144a5f(0x127)},{'name':_0x144a5f(0x102),'type':_0x144a5f(0x127)},{'name':_0x144a5f(0x10b),'type':_0x144a5f(0x127)},{'name':_0x144a5f(0xf6),'type':_0x144a5f(0x127)},{'name':'extra','type':'varchar'}],'data':_0x539634};}export async function executeSchemaQuery(_0x4a04ac,_0x3b18c4,_0x487751){const _0x5f444b=a143_0x2636,_0x2dc7ce=_0x4a04ac[_0x5f444b(0x114)]()[_0x5f444b(0xf0)](/;+$/,''),_0x5691e2=_0x5f444b(0xfb)+_0x2dc7ce+_0x5f444b(0xed);_0x487751[_0x5f444b(0x129)]&&console[_0x5f444b(0xec)](_0x5f444b(0xff)+_0x5691e2);const _0x28eeb1=await withProgressSpinner('Fetching\x20schema...',async _0x182d68=>{const _0x9ac924=_0x5f444b,_0x193261=await _0x3b18c4[_0x9ac924(0xfa)]['execute'](_0x5691e2,{'catalog':'td','schema':_0x9ac924(0x11f),'onJobId':_0x46ba15=>{const _0x8319de=_0x9ac924;_0x182d68[_0x8319de(0xef)](_0x46ba15);}});return _0x193261;},{'verbose':_0x487751[_0x5f444b(0x129)]});return buildSchemaResult(_0x28eeb1[_0x5f444b(0xf4)]);}function columnName(_0x5c7fdd){const _0x11717c=a143_0x2636;return _0x5c7fdd[_0x11717c(0x10e)]||_0x5c7fdd[_0x11717c(0x10a)]||_0x5c7fdd[_0x11717c(0x109)];}function formatFieldLine(_0x534ac6,_0x4ba128,_0x568d28){const _0x55d908=a143_0x2636,_0x2b50c1=_0x534ac6!==_0x4ba128?'\x20'+a143_0x27f07a[_0x55d908(0x103)]('('+_0x4ba128+')'):'';return _0x55d908(0xf8)+_0x534ac6+_0x2b50c1+':\x20'+a143_0x27f07a[_0x55d908(0x10d)](_0x568d28);}function sortByColumnName(_0x21ce07){const _0x376f9d=a143_0x2636;return[..._0x21ce07][_0x376f9d(0x115)]((_0x5e8958,_0x37df28)=>columnName(_0x5e8958)['localeCompare'](columnName(_0x37df28)));}export function displayFieldsHumanReadable(_0x28bf3c,_0x3fa7d9){const _0x1ebbd0=a143_0x2636,_0x204e0d=_0x28bf3c[_0x1ebbd0(0xf9)](_0x338f0a=>_0x338f0a[_0x1ebbd0(0x10c)]===_0x1ebbd0(0x101)),_0x3fc287=_0x28bf3c[_0x1ebbd0(0xf9)](_0x4c0a29=>_0x4c0a29[_0x1ebbd0(0x10c)]==='behavior'),_0x340f3e=new Map();for(const _0xaffee5 of _0x204e0d){const _0x5e4d8f=_0xaffee5[_0x1ebbd0(0x105)]||_0xaffee5[_0x1ebbd0(0x106)]||_0x1ebbd0(0xf3),_0x454ae9=_0x340f3e[_0x1ebbd0(0x119)](_0x5e4d8f);_0x454ae9?_0x454ae9[_0x1ebbd0(0x116)][_0x1ebbd0(0x10f)](_0xaffee5):_0x340f3e['set'](_0x5e4d8f,{'displayName':_0x5e4d8f,'tableName':_0xaffee5[_0x1ebbd0(0x106)],'fields':[_0xaffee5]});}const _0x781111=new Map();for(const _0x1d0bea of _0x3fc287){const _0x3c929b=_0x1d0bea[_0x1ebbd0(0xfe)]||'Unknown',_0x339fe6=_0x781111['get'](_0x3c929b)||[];_0x339fe6['push'](_0x1d0bea),_0x781111[_0x1ebbd0(0x124)](_0x3c929b,_0x339fe6);}console[_0x1ebbd0(0xec)]('\x0a'+a143_0x27f07a[_0x1ebbd0(0x11a)](_0x3fa7d9));if(_0x340f3e[_0x1ebbd0(0x120)]>0x0){console[_0x1ebbd0(0xec)]('\x0a'+a143_0x27f07a[_0x1ebbd0(0x103)](_0x1ebbd0(0xf5)));const _0x2c30ee=[..._0x340f3e[_0x1ebbd0(0x122)]()][_0x1ebbd0(0x115)]((_0x5aa712,_0x5d8b41)=>_0x5aa712[0x0][_0x1ebbd0(0xf7)](_0x5d8b41[0x0]));for(const [,_0x3e68d2]of _0x2c30ee){const _0x156c2a=_0x3e68d2[_0x1ebbd0(0xfd)]&&_0x3e68d2[_0x1ebbd0(0xfd)]!==_0x3e68d2[_0x1ebbd0(0x126)]?'\x20'+a143_0x27f07a[_0x1ebbd0(0x103)]('('+_0x3e68d2[_0x1ebbd0(0xfd)]+')'):'';console['error']('\x20\x20'+a143_0x27f07a[_0x1ebbd0(0x11a)](_0x3e68d2[_0x1ebbd0(0x126)])+_0x156c2a);for(const _0x3fe148 of sortByColumnName(_0x3e68d2['fields'])){console['error'](formatFieldLine(columnName(_0x3fe148),_0x3fe148[_0x1ebbd0(0x109)],_0x3fe148[_0x1ebbd0(0x128)]));}}}if(_0x781111['size']>0x0){console['error']('\x0a'+a143_0x27f07a[_0x1ebbd0(0x103)](_0x1ebbd0(0xee)));const _0x2a1963=[..._0x781111[_0x1ebbd0(0x122)]()][_0x1ebbd0(0x115)]((_0x2d774f,_0x2fce70)=>_0x2d774f[0x0][_0x1ebbd0(0xf7)](_0x2fce70[0x0]));for(const [_0x100b8b,_0x32860c]of _0x2a1963){const _0x5858da=_0x32860c[0x0],_0x2b6f1c=_0x5858da?.[_0x1ebbd0(0x111)];if(_0x2b6f1c){const _0x155464=_0x2b6f1c!==_0x100b8b?'\x20'+a143_0x27f07a['dim']('('+_0x100b8b+')'):'';console[_0x1ebbd0(0xec)]('\x20\x20'+a143_0x27f07a[_0x1ebbd0(0x11a)](_0x2b6f1c)+_0x155464);}else{const _0x41819e=_0x5858da?.[_0x1ebbd0(0x106)]||'';console[_0x1ebbd0(0xec)]('\x20\x20'+a143_0x27f07a[_0x1ebbd0(0x11a)](_0x100b8b)+(_0x41819e?'\x20'+a143_0x27f07a[_0x1ebbd0(0x103)]('('+_0x41819e+')'):''));}for(const _0x4bcf1c of sortByColumnName(_0x32860c)){const _0x4f48b0=_0x4bcf1c[_0x1ebbd0(0x109)][_0x1ebbd0(0xeb)](_0x100b8b+'.')?_0x4bcf1c[_0x1ebbd0(0x109)][_0x1ebbd0(0x108)](_0x100b8b['length']+0x1):_0x4bcf1c['name'];console[_0x1ebbd0(0xec)](formatFieldLine(columnName(_0x4bcf1c),_0x4f48b0,_0x4bcf1c[_0x1ebbd0(0x128)]));}}}const _0x43d20d=_0x28bf3c[_0x1ebbd0(0x107)](_0x36f9d2=>_0x36f9d2[_0x1ebbd0(0x10e)]||_0x36f9d2[_0x1ebbd0(0x111)]);_0x43d20d&&(console[_0x1ebbd0(0xec)]('\x0a'+a143_0x27f07a[_0x1ebbd0(0x103)](_0x1ebbd0(0x112))),console['error'](a143_0x27f07a[_0x1ebbd0(0x103)](_0x1ebbd0(0x11b)))),console[_0x1ebbd0(0xec)]('');}
@@ -1 +1 @@
1
- (function(_0x55269d,_0x21bcfb){const _0x2d8e55=a144_0x592f,_0x3f9d68=_0x55269d();while(!![]){try{const _0x5b26a8=-parseInt(_0x2d8e55(0x1f3))/0x1+-parseInt(_0x2d8e55(0x1f0))/0x2+-parseInt(_0x2d8e55(0x1f2))/0x3+parseInt(_0x2d8e55(0x1f4))/0x4*(-parseInt(_0x2d8e55(0x1f5))/0x5)+-parseInt(_0x2d8e55(0x1fa))/0x6+parseInt(_0x2d8e55(0x1eb))/0x7+parseInt(_0x2d8e55(0x1f7))/0x8;if(_0x5b26a8===_0x21bcfb)break;else _0x3f9d68['push'](_0x3f9d68['shift']());}catch(_0x4cfd4b){_0x3f9d68['push'](_0x3f9d68['shift']());}}}(a144_0x8aea,0xe9a01));import{readdirSync,statSync}from'fs';function a144_0x592f(_0x140894,_0x3aa15e){_0x140894=_0x140894-0x1eb;const _0x8aea25=a144_0x8aea();let _0x592f4d=_0x8aea25[_0x140894];return _0x592f4d;}import a144_0x5b86ba from'path';function a144_0x8aea(){const _0x71b118=['10178220JKPVht','name','relative','push','11240131EsKyit','map','extname','.yml','dirname','1344224qaCldl','isDirectory','1881777woOZZJ','14538CWuagr','12VxNbSU','409055NYbnst','endsWith','20855264DTtQsX','join','.yaml'];a144_0x8aea=function(){return _0x71b118;};return a144_0x8aea();}export function findYamlFiles(_0x16627a){const _0x2c559a=[];function _0x655666(_0x4769c5){const _0x42e060=a144_0x592f,_0x10d397=readdirSync(_0x4769c5,{'withFileTypes':!![]});for(const _0x36917e of _0x10d397){const _0x3e6580=a144_0x5b86ba[_0x42e060(0x1f8)](_0x4769c5,_0x36917e[_0x42e060(0x1fb)]);if(_0x36917e[_0x42e060(0x1f1)]())_0x655666(_0x3e6580);else(_0x36917e[_0x42e060(0x1fb)][_0x42e060(0x1f6)](_0x42e060(0x1ee))||_0x36917e[_0x42e060(0x1fb)][_0x42e060(0x1f6)](_0x42e060(0x1f9)))&&_0x2c559a[_0x42e060(0x1fd)](_0x3e6580);}}return _0x655666(_0x16627a),_0x2c559a;}export function discoverYamlFiles(_0x45d280){const _0x4a0ad8=a144_0x592f,_0x15edc3=findYamlFiles(_0x45d280);return _0x15edc3[_0x4a0ad8(0x1ec)](_0x3b8684=>{const _0x3f33c1=_0x4a0ad8,_0x1fb3c5=a144_0x5b86ba[_0x3f33c1(0x1fc)](_0x45d280,_0x3b8684),_0x3072e8=a144_0x5b86ba[_0x3f33c1(0x1ef)](_0x1fb3c5);return{'absolutePath':_0x3b8684,'relativePath':_0x1fb3c5,'folderPath':_0x3072e8==='.'?'':_0x3072e8};});}export function isYamlFile(_0x30231d){const _0x59c355=a144_0x592f;try{const _0x4c0dd6=statSync(_0x30231d);if(!_0x4c0dd6['isFile']())return![];const _0x17d4b2=a144_0x5b86ba[_0x59c355(0x1ed)](_0x30231d)['toLowerCase']();return _0x17d4b2==='.yml'||_0x17d4b2===_0x59c355(0x1f9);}catch{return![];}}
1
+ (function(_0x118d71,_0x124987){const _0x5e658a=a144_0x3599,_0x1d424c=_0x118d71();while(!![]){try{const _0x25e511=parseInt(_0x5e658a(0xe2))/0x1*(parseInt(_0x5e658a(0xf8))/0x2)+-parseInt(_0x5e658a(0xf1))/0x3*(-parseInt(_0x5e658a(0xf3))/0x4)+-parseInt(_0x5e658a(0xf0))/0x5+-parseInt(_0x5e658a(0xe3))/0x6*(parseInt(_0x5e658a(0xe9))/0x7)+parseInt(_0x5e658a(0xf4))/0x8*(parseInt(_0x5e658a(0xea))/0x9)+-parseInt(_0x5e658a(0xf5))/0xa*(parseInt(_0x5e658a(0xe4))/0xb)+-parseInt(_0x5e658a(0xe6))/0xc*(-parseInt(_0x5e658a(0xe8))/0xd);if(_0x25e511===_0x124987)break;else _0x1d424c['push'](_0x1d424c['shift']());}catch(_0x52b1df){_0x1d424c['push'](_0x1d424c['shift']());}}}(a144_0x3b6c,0x23725));function a144_0x3599(_0x52ecb0,_0x502daf){_0x52ecb0=_0x52ecb0-0xe2;const _0x3b6c34=a144_0x3b6c();let _0x359949=_0x3b6c34[_0x52ecb0];return _0x359949;}import{readdirSync,statSync}from'fs';import a144_0x4d0c0e from'path';export function findYamlFiles(_0x14758b){const _0x31da46=[];function _0x1f8c63(_0x31e26e){const _0x59c6b4=a144_0x3599,_0x144733=readdirSync(_0x31e26e,{'withFileTypes':!![]});for(const _0x45f69f of _0x144733){const _0x3731e2=a144_0x4d0c0e[_0x59c6b4(0xed)](_0x31e26e,_0x45f69f[_0x59c6b4(0xf2)]);if(_0x45f69f[_0x59c6b4(0xee)]())_0x1f8c63(_0x3731e2);else(_0x45f69f[_0x59c6b4(0xf2)][_0x59c6b4(0xe7)](_0x59c6b4(0xe5))||_0x45f69f[_0x59c6b4(0xf2)][_0x59c6b4(0xe7)](_0x59c6b4(0xec)))&&_0x31da46[_0x59c6b4(0xeb)](_0x3731e2);}}return _0x1f8c63(_0x14758b),_0x31da46;}export function discoverYamlFiles(_0x5d75ee){const _0x1c6b05=findYamlFiles(_0x5d75ee);return _0x1c6b05['map'](_0x3463e8=>{const _0x200565=a144_0x3599,_0x2f0780=a144_0x4d0c0e[_0x200565(0xf7)](_0x5d75ee,_0x3463e8),_0x21cdbb=a144_0x4d0c0e[_0x200565(0xf6)](_0x2f0780);return{'absolutePath':_0x3463e8,'relativePath':_0x2f0780,'folderPath':_0x21cdbb==='.'?'':_0x21cdbb};});}export function isYamlFile(_0x5c906f){const _0x1aa6f7=a144_0x3599;try{const _0x3c56b2=statSync(_0x5c906f);if(!_0x3c56b2['isFile']())return![];const _0x33cad5=a144_0x4d0c0e['extname'](_0x5c906f)[_0x1aa6f7(0xef)]();return _0x33cad5==='.yml'||_0x33cad5===_0x1aa6f7(0xec);}catch{return![];}}function a144_0x3b6c(){const _0xda2236=['toLowerCase','222925kpLMHh','63CyurGc','name','44276mPFFxk','88TaqPfq','20fqgdRQ','dirname','relative','4652KuQUHP','61LaoQlb','322086qNBkNz','1035903uqRPTG','.yml','12sLSMZi','endsWith','396578Ujqems','14ZqfqRK','65979yCMuUm','push','.yaml','join','isDirectory'];a144_0x3b6c=function(){return _0xda2236;};return a144_0x3b6c();}
@@ -1 +1 @@
1
- (function(_0x3ce249,_0x4af3c3){const _0x50eb9f=a145_0x5b43,_0x2be656=_0x3ce249();while(!![]){try{const _0x1a2642=parseInt(_0x50eb9f(0x1aa))/0x1+-parseInt(_0x50eb9f(0x172))/0x2*(parseInt(_0x50eb9f(0x1a3))/0x3)+-parseInt(_0x50eb9f(0x19d))/0x4*(parseInt(_0x50eb9f(0x1b1))/0x5)+parseInt(_0x50eb9f(0x18c))/0x6*(parseInt(_0x50eb9f(0x1a9))/0x7)+-parseInt(_0x50eb9f(0x1b3))/0x8*(parseInt(_0x50eb9f(0x188))/0x9)+-parseInt(_0x50eb9f(0x1ab))/0xa*(parseInt(_0x50eb9f(0x16d))/0xb)+parseInt(_0x50eb9f(0x180))/0xc;if(_0x1a2642===_0x4af3c3)break;else _0x2be656['push'](_0x2be656['shift']());}catch(_0x520e16){_0x2be656['push'](_0x2be656['shift']());}}}(a145_0x5a30,0xcedca));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x44a4b8){const _0x424f89=a145_0x5b43;return _0x44a4b8[_0x424f89(0x196)]()[_0x424f89(0x183)](/\s+/g,'_')[_0x424f89(0x183)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x424f89(0x183)](/_+/g,'_')[_0x424f89(0x183)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x4652aa){const _0x1e3f58=a145_0x5b43,_0x57dbae=_0x4652aa[_0x1e3f58(0x1af)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x57dbae){const _0x3c7624=_0x57dbae[0x1][_0x1e3f58(0x196)](),_0x155abf=_0x57dbae[0x2],_0x8780b6=_0x155abf[_0x1e3f58(0x183)](/-/g,'')['slice'](0x0,0x4)[_0x1e3f58(0x196)]();return _0x3c7624+'_'+_0x8780b6;}const _0x1eb36c=_0x4652aa[_0x1e3f58(0x1af)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x1eb36c){const _0x49d54f=_0x1eb36c[0x1],_0x124280=_0x1eb36c[0x2]['toLowerCase'](),_0x391344=_0x49d54f['replace'](/-/g,'')[_0x1e3f58(0x16a)](0x0,0x4)['toLowerCase']();return _0x124280+'_'+_0x391344;}return undefined;}function stableStringify(_0x1b789a){const _0x5c2744=a145_0x5b43;if(Array[_0x5c2744(0x1a0)](_0x1b789a))return'['+_0x1b789a[_0x5c2744(0x19f)](_0x4947e6=>stableStringify(_0x4947e6))['join'](',')+']';if(_0x1b789a&&typeof _0x1b789a==='object'){const _0x54cefa=_0x1b789a,_0x1f5c6f=Object[_0x5c2744(0x181)](_0x54cefa)[_0x5c2744(0x179)](),_0x55f03e=_0x1f5c6f[_0x5c2744(0x19f)](_0x28a5d5=>'\x22'+_0x28a5d5+'\x22:'+stableStringify(_0x54cefa[_0x28a5d5]));return'{'+_0x55f03e['join'](',')+'}';}const _0x15a327=JSON['stringify'](_0x1b789a);return _0x15a327===undefined?'null':_0x15a327;}export function consolidateActivationsByContent(_0x2d4631){const _0x4f39d6=a145_0x5b43,_0x2b06e2={},_0x2d345a=new Map(),_0x21c3c2=new Map();for(const _0x35edde of _0x2d4631){if(!_0x35edde)continue;for(const [_0x30e352,_0x19851a]of Object[_0x4f39d6(0x194)](_0x35edde)){const _0x518568={'name':_0x19851a[_0x4f39d6(0x182)],'connection':_0x19851a[_0x4f39d6(0x17a)],..._0x19851a['all_columns']!==undefined&&{'all_columns':_0x19851a[_0x4f39d6(0x169)]},..._0x19851a[_0x4f39d6(0x185)]!==undefined&&{'columns':_0x19851a['columns']},..._0x19851a[_0x4f39d6(0x174)]!==undefined&&{'behavior':_0x19851a['behavior']},..._0x19851a['schedule']!==undefined&&{'schedule':_0x19851a['schedule']},..._0x19851a['notification']!==undefined&&{'notification':_0x19851a['notification']},..._0x19851a[_0x4f39d6(0x16f)]!==undefined&&{'connector_config':_0x19851a[_0x4f39d6(0x16f)]},..._0x19851a[_0x4f39d6(0x19e)]!==undefined&&{'activation_template_id':_0x19851a[_0x4f39d6(0x19e)]}},_0x38998a=stableStringify(_0x518568),_0xac6de8=_0x21c3c2[_0x4f39d6(0x193)](_0x38998a);_0xac6de8?_0x2d345a['set'](_0x30e352,_0xac6de8):(_0x2b06e2[_0x30e352]=_0x19851a,_0x2d345a[_0x4f39d6(0x192)](_0x30e352,_0x30e352),_0x21c3c2[_0x4f39d6(0x192)](_0x38998a,_0x30e352));}}return{'merged':_0x2b06e2,'nameMapping':_0x2d345a};}export function updateActivationReferences(_0x393ac0,_0x14e269){const _0x86a5de=a145_0x5b43;if(!_0x393ac0)return;for(const _0x5a93d4 of _0x393ac0){if(!_0x5a93d4['steps'])continue;for(const _0x1c3ec1 of _0x5a93d4[_0x86a5de(0x19a)]){if(_0x1c3ec1[_0x86a5de(0x17b)]===_0x86a5de(0x178)&&_0x1c3ec1[_0x86a5de(0x173)]?.['activation']){const _0x54f664=_0x14e269[_0x86a5de(0x193)](_0x1c3ec1[_0x86a5de(0x173)][_0x86a5de(0x178)]);_0x54f664&&_0x54f664!==_0x1c3ec1[_0x86a5de(0x173)][_0x86a5de(0x178)]&&(_0x1c3ec1['with'][_0x86a5de(0x178)]=_0x54f664);}}}}export function consolidateSegmentsByContent(_0x5cb057,_0x43284c){const _0x2509bc=a145_0x5b43,_0x3f62bb={},_0x5c5d51=new Map(),_0x176294=new Map();for(const _0x57ae10 of _0x5cb057){if(!_0x57ae10)continue;for(const [_0x280e9f,_0x5ef5cc]of Object[_0x2509bc(0x194)](_0x57ae10)){if(!_0x5ef5cc[_0x2509bc(0x1a5)]){_0x3f62bb[_0x280e9f]=_0x5ef5cc,_0x5c5d51[_0x2509bc(0x192)](_0x280e9f,_0x280e9f);continue;}const _0x2cb526=_0x5ef5cc[_0x2509bc(0x16e)]&&_0x5ef5cc['description'][_0x2509bc(0x186)]()?_0x5ef5cc[_0x2509bc(0x16e)]:undefined,_0x12ecb8=JSON[_0x2509bc(0x1b2)]({'description':_0x2cb526,'rule':deepSortObject(_0x5ef5cc[_0x2509bc(0x1a5)])}),_0x2a6eb1=_0x176294['get'](_0x12ecb8);if(_0x2a6eb1){const _0x2f43d8={..._0x5ef5cc['description']!==undefined&&{'description':_0x5ef5cc[_0x2509bc(0x16e)]},'rule':_0x5ef5cc[_0x2509bc(0x1a5)]?deepSortObject(_0x5ef5cc[_0x2509bc(0x1a5)]):_0x5ef5cc[_0x2509bc(0x1a5)]};if(_0x280e9f<_0x2a6eb1){_0x3f62bb[_0x280e9f]=_0x2f43d8,delete _0x3f62bb[_0x2a6eb1];for(const [_0xb33c41,_0x32aa7d]of _0x5c5d51[_0x2509bc(0x194)]()){_0x32aa7d===_0x2a6eb1&&_0x5c5d51['set'](_0xb33c41,_0x280e9f);}_0x5c5d51[_0x2509bc(0x192)](_0x280e9f,_0x280e9f),_0x176294[_0x2509bc(0x192)](_0x12ecb8,_0x280e9f);}else _0x3f62bb[_0x2a6eb1]=_0x2f43d8,_0x5c5d51[_0x2509bc(0x192)](_0x280e9f,_0x2a6eb1);}else{let _0x13ed7d=_0x280e9f;if(_0x43284c){const _0x1200a3=_0x43284c[_0x2509bc(0x193)](_0x12ecb8);_0x1200a3&&_0x1200a3[_0x2509bc(0x18f)]>0x0&&(_0x13ed7d=_0x1200a3[_0x2509bc(0x16a)]()[_0x2509bc(0x179)]()[0x0]);}const _0x5c72a5={..._0x5ef5cc[_0x2509bc(0x16e)]!==undefined&&{'description':_0x5ef5cc[_0x2509bc(0x16e)]},'rule':_0x5ef5cc['rule']?deepSortObject(_0x5ef5cc[_0x2509bc(0x1a5)]):_0x5ef5cc[_0x2509bc(0x1a5)]};_0x3f62bb[_0x13ed7d]=_0x5c72a5,_0x5c5d51[_0x2509bc(0x192)](_0x280e9f,_0x13ed7d),_0x176294['set'](_0x12ecb8,_0x13ed7d);}}}return{'merged':_0x3f62bb,'nameMapping':_0x5c5d51};}export function updateSegmentReferences(_0xcff7a6,_0x505da2){const _0x5443b6=a145_0x5b43;if(!_0xcff7a6)return;for(const _0x1c9956 of _0xcff7a6){if(_0x1c9956[_0x5443b6(0x1b4)]?.[_0x5443b6(0x170)]){const _0x1fa996=_0x505da2[_0x5443b6(0x193)](_0x1c9956['entry_criteria']['segment']);_0x1fa996&&(_0x1c9956[_0x5443b6(0x1b4)][_0x5443b6(0x170)]=_0x1fa996);}if(_0x1c9956[_0x5443b6(0x17f)])for(const _0x4f192b of _0x1c9956[_0x5443b6(0x17f)]){if(_0x4f192b[_0x5443b6(0x170)]){const _0x455c83=_0x505da2[_0x5443b6(0x193)](_0x4f192b[_0x5443b6(0x170)]);_0x455c83&&(_0x4f192b[_0x5443b6(0x170)]=_0x455c83);}}if(_0x1c9956[_0x5443b6(0x18b)]?.['segment']){const _0x32c07f=_0x505da2[_0x5443b6(0x193)](_0x1c9956[_0x5443b6(0x18b)][_0x5443b6(0x170)]);_0x32c07f&&(_0x1c9956[_0x5443b6(0x18b)][_0x5443b6(0x170)]=_0x32c07f);}if(_0x1c9956['steps'])for(const _0x49dce0 of _0x1c9956[_0x5443b6(0x19a)]){if(_0x49dce0[_0x5443b6(0x17b)]===_0x5443b6(0x18e)&&_0x49dce0['with']?.[_0x5443b6(0x199)])for(const _0x1bde26 of _0x49dce0[_0x5443b6(0x173)]['branches']){if(_0x1bde26[_0x5443b6(0x170)]){const _0x89d5bb=_0x505da2[_0x5443b6(0x193)](_0x1bde26[_0x5443b6(0x170)]);_0x89d5bb&&(_0x1bde26[_0x5443b6(0x170)]=_0x89d5bb);}}if(_0x49dce0[_0x5443b6(0x17b)]==='wait'&&_0x49dce0['with']?.['condition']?.[_0x5443b6(0x170)]){const _0x58feb8=_0x505da2['get'](_0x49dce0['with']['condition'][_0x5443b6(0x170)]);_0x58feb8&&(_0x49dce0[_0x5443b6(0x173)][_0x5443b6(0x18a)][_0x5443b6(0x170)]=_0x58feb8);}}}}export function updateSegmentRefsInSegments(_0x578ba9,_0x3d8826){const _0x2fe163=a145_0x5b43;for(const _0x18fb51 of Object['values'](_0x578ba9)){_0x18fb51['rule']&&updateSegmentRefsInRule(_0x18fb51[_0x2fe163(0x1a5)],_0x3d8826);}}function updateSegmentRefsInRule(_0x31ce2c,_0x2b37e1){const _0x281228=a145_0x5b43;if(_0x31ce2c===null||typeof _0x31ce2c!==_0x281228(0x190))return;if(Array['isArray'](_0x31ce2c)){for(const _0x1a920b of _0x31ce2c){updateSegmentRefsInRule(_0x1a920b,_0x2b37e1);}return;}const _0x135b8d=_0x31ce2c;if((_0x135b8d[_0x281228(0x17b)]===_0x281228(0x1ac)||_0x135b8d[_0x281228(0x17b)]==='exclude')&&typeof _0x135b8d[_0x281228(0x170)]===_0x281228(0x18d)){const _0x7262d0=_0x2b37e1['get'](_0x135b8d[_0x281228(0x170)]);_0x7262d0&&(_0x135b8d[_0x281228(0x170)]=_0x7262d0);}if(_0x135b8d['conditions']&&Array[_0x281228(0x1a0)](_0x135b8d['conditions']))for(const _0x3592f3 of _0x135b8d['conditions']){updateSegmentRefsInRule(_0x3592f3,_0x2b37e1);}}export function buildJourneysArray(_0x5bd7a3,_0x2f71dd){const _0x4d25cf=a145_0x5b43;return _0x5bd7a3[_0x4d25cf(0x19f)](_0x1979b4=>{const _0x1043ab=_0x4d25cf,_0x4b6b39=_0x2f71dd?_0x1979b4[_0x1043ab(0x1a1)]['id']===_0x2f71dd:_0x5bd7a3['length']===0x1,_0x29ed13=_0x1979b4[_0x1043ab(0x1a8)][_0x1043ab(0x175)]?.[0x0],_0x25baa9=_0x29ed13?.[_0x1043ab(0x1a2)]||_0x1979b4['yaml'][_0x1043ab(0x1a2)],_0x8ff890={'version':_0x29ed13?.[_0x1043ab(0x19c)]||_0x1979b4[_0x1043ab(0x1a8)][_0x1043ab(0x19c)]||_0x1979b4[_0x1043ab(0x1a1)][_0x1043ab(0x182)],'state':_0x1979b4[_0x1043ab(0x1a1)]['state']==='launched'?_0x1043ab(0x184):_0x1043ab(0x177),'stages':_0x29ed13?.['stages']||_0x1979b4[_0x1043ab(0x1a8)][_0x1043ab(0x17d)]||[],'id':_0x29ed13?.['id']||_0x1979b4[_0x1043ab(0x1a8)]['id'],'version_number':_0x29ed13?.['version_number']||_0x1979b4[_0x1043ab(0x1a8)][_0x1043ab(0x19b)]};return _0x25baa9&&(_0x8ff890[_0x1043ab(0x1a2)]=_0x25baa9),_0x4b6b39&&(_0x8ff890['latest']=!![]),_0x8ff890;});}export function buildMergedJourneyDef(_0xbecfea,_0x4d1054,_0x94efd3){const _0x21ca06=a145_0x5b43,_0x3f567e=_0xbecfea[0x0][_0x21ca06(0x1a8)],_0x4205ec=buildJourneysArray(_0xbecfea,_0x94efd3),{merged:_0xe2fd70,nameMapping:_0x48623b}=consolidateSegmentsByContent(_0xbecfea[_0x21ca06(0x19f)](_0x25dccd=>_0x25dccd[_0x21ca06(0x1a8)]['segments']),_0x4d1054);updateSegmentRefsInSegments(_0xe2fd70,_0x48623b);const _0x3a7293=Array[_0x21ca06(0x1b5)](_0x48623b[_0x21ca06(0x194)]())[_0x21ca06(0x187)](([_0x427e87,_0x2d230f])=>_0x427e87!==_0x2d230f&&_0x427e87['startsWith'](_0x21ca06(0x1b4)));let _0x124b2d=_0xe2fd70,_0x5a41f5=new Map();if(_0x3a7293){const _0x218306=consolidateSegmentsByContent([_0xe2fd70],_0x4d1054);_0x124b2d=_0x218306[_0x21ca06(0x191)],_0x5a41f5=_0x218306[_0x21ca06(0x1ae)];}const _0x29690d=new Map(_0x48623b);for(const [_0x162b31,_0x2543d2]of _0x5a41f5[_0x21ca06(0x194)]()){_0x29690d['set'](_0x162b31,_0x2543d2);}for(const [_0x57eeb0,_0x250635]of _0x29690d[_0x21ca06(0x194)]()){let _0x4c2736=_0x250635,_0x5d4d3b=0x0;while(_0x29690d[_0x21ca06(0x1ad)](_0x4c2736)&&_0x29690d[_0x21ca06(0x193)](_0x4c2736)!==_0x4c2736&&_0x5d4d3b<MAX_MAPPING_CHAIN_DEPTH){_0x4c2736=_0x29690d['get'](_0x4c2736),_0x5d4d3b++;}_0x4c2736!==_0x250635&&_0x29690d[_0x21ca06(0x192)](_0x57eeb0,_0x4c2736);}for(const _0x1bd3b5 of _0x4205ec){updateSegmentReferences(_0x1bd3b5[_0x21ca06(0x17d)],_0x29690d);}const {merged:_0x32d377,nameMapping:_0x556da5}=consolidateActivationsByContent(_0xbecfea[_0x21ca06(0x19f)](_0x3e474e=>_0x3e474e['yaml'][_0x21ca06(0x16b)]));for(const _0x54e13d of _0x4205ec){updateActivationReferences(_0x54e13d[_0x21ca06(0x17d)],_0x556da5);}let _0x48fc52=_0x3f567e['goal'];if(_0x48fc52?.['segment']){const _0x492f6d=_0x29690d[_0x21ca06(0x193)](_0x48fc52[_0x21ca06(0x170)]);_0x492f6d&&(_0x48fc52={..._0x48fc52,'segment':_0x492f6d});}for(const _0x545da3 of _0x4205ec){if(_0x545da3[_0x21ca06(0x1a2)]?.[_0x21ca06(0x170)]){const _0xa2c814=_0x29690d[_0x21ca06(0x193)](_0x545da3[_0x21ca06(0x1a2)][_0x21ca06(0x170)]);_0xa2c814&&(_0x545da3['goal']={..._0x545da3[_0x21ca06(0x1a2)],'segment':_0xa2c814});}}return _0x4205ec[_0x21ca06(0x187)](_0x331a84=>_0x331a84['goal'])&&(_0x48fc52=undefined),{'type':_0x21ca06(0x17e),'name':_0x3f567e['name'],'description':_0x3f567e[_0x21ca06(0x16e)],'goal':_0x48fc52,'reentry':_0x3f567e[_0x21ca06(0x195)],'segments':Object['keys'](_0x124b2d)[_0x21ca06(0x18f)]>0x0?_0x124b2d:undefined,'activations':Object[_0x21ca06(0x181)](_0x32d377)['length']>0x0?_0x32d377:undefined,'journeys':_0x4205ec,'bundle_id':_0x3f567e[_0x21ca06(0x1a7)],'bundle_name':_0x3f567e[_0x21ca06(0x189)]};}function a145_0x5b43(_0x3f1acf,_0x16d7df){_0x3f1acf=_0x3f1acf-0x169;const _0x5a30f8=a145_0x5a30();let _0x5b43d0=_0x5a30f8[_0x3f1acf];return _0x5b43d0;}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x17f63f,_0x171451,_0x4b44b9,_0x164b09){const _0x2cf98f=a145_0x5b43,_0x435605=_0x17f63f+':'+_0x171451,_0x139cb8=_0x4b44b9[_0x2cf98f(0x193)](_0x435605);if(_0x139cb8)return _0x139cb8;const _0x350cd6=await _0x164b09(_0x17f63f),_0x38200c=_0x350cd6[_0x2cf98f(0x171)][_0x2cf98f(0x1b0)]||_0x350cd6[_0x2cf98f(0x171)]['name'],_0x2bb93d=_0x350cd6[_0x2cf98f(0x171)][_0x2cf98f(0x197)][_0x2cf98f(0x16c)](_0x2932ab=>String(_0x2932ab['id'])===String(_0x171451)),_0x3c2689=_0x2bb93d?.['name']||_0x171451,_0x336ec0={'journeyName':_0x38200c,'stageName':_0x3c2689};return _0x4b44b9[_0x2cf98f(0x192)](_0x435605,_0x336ec0),_0x336ec0;}export function formatApiJourneyName(_0x1cb81d,_0x480277){return _0x480277+'\x20('+_0x1cb81d+')';}export function isLocalJourneyRef(_0x4a12ee){const _0xe86dbd=a145_0x5b43;return _0x4a12ee['endsWith']('.yml')||_0x4a12ee['endsWith'](_0xe86dbd(0x176));}function a145_0x5a30(){const _0xaef112=['segment','attributes','2GiUKqP','with','behavior','journeys','.yaml','draft','activation','sort','connection','type','push','stages','journey','exit_criteria','26243088QsNPRl','keys','name','replace','launched','columns','trim','some','5799483napKxD','bundle_name','condition','milestone','36HKeqzx','string','decision_point','length','object','merged','set','get','entries','reentry','toLowerCase','journeyStages','versions','branches','steps','version_number','version','1218860DnewsB','activation_template_id','map','isArray','item','goal','2478489xdTJdX','wait','rule','index','bundle_id','yaml','1015763cBlLZp','1066944PdQjDG','20ABRDqs','include','has','nameMapping','match','journeyBundleName','5pjiUpP','stringify','16HxEhJU','entry_criteria','from','all_columns','slice','activations','find','4716602DITCCx','description','connector_config'];a145_0x5a30=function(){return _0xaef112;};return a145_0x5a30();}export function buildLocalRuleToNameMapping(_0x106fb8){const _0x20ac51=a145_0x5b43,_0x3828ef=new Map();if(!_0x106fb8)return _0x3828ef;for(const [_0x2153b5,_0x2f6d58]of Object[_0x20ac51(0x194)](_0x106fb8)){if(_0x2f6d58['rule']){const _0x2d2ce6=serializeRule(_0x2f6d58[_0x20ac51(0x1a5)]),_0x44ef31=_0x3828ef[_0x20ac51(0x193)](_0x2d2ce6)||[];_0x44ef31[_0x20ac51(0x17c)](_0x2153b5),_0x3828ef['set'](_0x2d2ce6,_0x44ef31);}}return _0x3828ef;}export function buildLocalRuleToNameMappingFromJourney(_0x223625){const _0x216bdb=a145_0x5b43,_0x3a893d=_0x223625['segments'];if(!_0x3a893d)return new Map();const _0x369464=collectSegmentUsageCounts(_0x223625),_0x9eb819=new Map();let _0x332215=0x0;for(const [_0x311c93,_0xaf0812]of Object[_0x216bdb(0x194)](_0x3a893d)){if(!_0xaf0812[_0x216bdb(0x1a5)]){_0x332215++;continue;}const _0x27e7c9=serializeRule(_0xaf0812[_0x216bdb(0x1a5)]),_0xb5ffae=_0x9eb819['get'](_0x27e7c9)||[];_0xb5ffae['push']({'name':_0x311c93,'index':_0x332215}),_0x9eb819[_0x216bdb(0x192)](_0x27e7c9,_0xb5ffae),_0x332215++;}const _0x2a9299=new Map();for(const [_0x24c9f6,_0x485bf1]of _0x9eb819){const _0x57a671=_0x485bf1[_0x216bdb(0x16a)]()[_0x216bdb(0x179)]((_0x54c05a,_0x221aab)=>{const _0x56f0bc=_0x216bdb,_0x167cd8=_0x369464['get'](_0x54c05a[_0x56f0bc(0x182)])||0x0,_0x291266=_0x369464[_0x56f0bc(0x193)](_0x221aab[_0x56f0bc(0x182)])||0x0;if(_0x167cd8!==_0x291266)return _0x291266-_0x167cd8;return _0x54c05a[_0x56f0bc(0x1a6)]-_0x221aab[_0x56f0bc(0x1a6)];})[_0x216bdb(0x19f)](_0x51e53e=>_0x51e53e['name']);_0x2a9299[_0x216bdb(0x192)](_0x24c9f6,_0x57a671);}return _0x2a9299;}export function collectSegmentUsageCounts(_0x4bb88a){const _0x43b449=a145_0x5b43,_0x1c2431=new Map(),_0x426685=_0x1300aa=>{const _0x55e5ae=a145_0x5b43;if(!_0x1300aa)return;_0x1c2431[_0x55e5ae(0x192)](_0x1300aa,(_0x1c2431[_0x55e5ae(0x193)](_0x1300aa)||0x0)+0x1);},_0x37996e=_0x1d66f0=>{const _0x4b3f95=a145_0x5b43;for(const _0x18054d of _0x1d66f0){_0x426685(_0x18054d[_0x4b3f95(0x1b4)]?.[_0x4b3f95(0x170)]);if(_0x18054d[_0x4b3f95(0x17f)])for(const _0x56c079 of _0x18054d[_0x4b3f95(0x17f)]){_0x426685(_0x56c079[_0x4b3f95(0x170)]);}_0x426685(_0x18054d[_0x4b3f95(0x18b)]?.['segment']);if(_0x18054d[_0x4b3f95(0x19a)])for(const _0x1b1e93 of _0x18054d['steps']){if(_0x1b1e93[_0x4b3f95(0x17b)]===_0x4b3f95(0x18e))for(const _0x2b5c53 of _0x1b1e93[_0x4b3f95(0x173)][_0x4b3f95(0x199)]){_0x426685(_0x2b5c53[_0x4b3f95(0x170)]);}else _0x1b1e93[_0x4b3f95(0x17b)]===_0x4b3f95(0x1a4)&&_0x426685(_0x1b1e93[_0x4b3f95(0x173)][_0x4b3f95(0x18a)]?.[_0x4b3f95(0x170)]);}}};_0x426685(_0x4bb88a[_0x43b449(0x1a2)]?.[_0x43b449(0x170)]);if(_0x4bb88a[_0x43b449(0x175)])for(const _0x4b58b2 of _0x4bb88a[_0x43b449(0x175)]){_0x426685(_0x4b58b2[_0x43b449(0x1a2)]?.[_0x43b449(0x170)]),_0x37996e(_0x4b58b2['stages']);}_0x4bb88a['stages']&&_0x37996e(_0x4bb88a['stages']);if(_0x4bb88a[_0x43b449(0x198)])for(const _0x55f76e of _0x4bb88a[_0x43b449(0x198)]){_0x37996e(_0x55f76e[_0x43b449(0x17d)]);}return _0x1c2431;}
1
+ (function(_0x2c10f8,_0x29d285){const _0x4eac82=a145_0x2dfd,_0x1e3d88=_0x2c10f8();while(!![]){try{const _0x56721a=-parseInt(_0x4eac82(0x11d))/0x1+-parseInt(_0x4eac82(0x134))/0x2*(parseInt(_0x4eac82(0x105))/0x3)+parseInt(_0x4eac82(0xf6))/0x4*(parseInt(_0x4eac82(0xfd))/0x5)+parseInt(_0x4eac82(0x133))/0x6*(-parseInt(_0x4eac82(0x135))/0x7)+-parseInt(_0x4eac82(0x10d))/0x8*(-parseInt(_0x4eac82(0x110))/0x9)+-parseInt(_0x4eac82(0xf7))/0xa*(-parseInt(_0x4eac82(0x13a))/0xb)+parseInt(_0x4eac82(0xed))/0xc;if(_0x56721a===_0x29d285)break;else _0x1e3d88['push'](_0x1e3d88['shift']());}catch(_0x3a59f9){_0x1e3d88['push'](_0x1e3d88['shift']());}}}(a145_0x9736,0xbc1ce));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x591a20){const _0x2c1f6c=a145_0x2dfd;return _0x591a20[_0x2c1f6c(0x114)]()[_0x2c1f6c(0x11f)](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x2c1f6c(0x11f)](/_+/g,'_')[_0x2c1f6c(0x11f)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x59195a){const _0xe066c=a145_0x2dfd,_0x4b0fbe=_0x59195a['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x4b0fbe){const _0x343497=_0x4b0fbe[0x1][_0xe066c(0x114)](),_0x26695b=_0x4b0fbe[0x2],_0x374e59=_0x26695b[_0xe066c(0x11f)](/-/g,'')[_0xe066c(0x11a)](0x0,0x4)[_0xe066c(0x114)]();return _0x343497+'_'+_0x374e59;}const _0x49e469=_0x59195a[_0xe066c(0x132)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x49e469){const _0x39c618=_0x49e469[0x1],_0xcd088=_0x49e469[0x2][_0xe066c(0x114)](),_0x4d49e9=_0x39c618[_0xe066c(0x11f)](/-/g,'')[_0xe066c(0x11a)](0x0,0x4)[_0xe066c(0x114)]();return _0xcd088+'_'+_0x4d49e9;}return undefined;}function stableStringify(_0x5d2f71){const _0xa34ba2=a145_0x2dfd;if(Array[_0xa34ba2(0xf2)](_0x5d2f71))return'['+_0x5d2f71[_0xa34ba2(0x136)](_0x3fc91e=>stableStringify(_0x3fc91e))[_0xa34ba2(0x127)](',')+']';if(_0x5d2f71&&typeof _0x5d2f71==='object'){const _0x376531=_0x5d2f71,_0x3523b8=Object[_0xa34ba2(0x11c)](_0x376531)[_0xa34ba2(0x106)](),_0x2d63f8=_0x3523b8['map'](_0x502c3e=>'\x22'+_0x502c3e+'\x22:'+stableStringify(_0x376531[_0x502c3e]));return'{'+_0x2d63f8['join'](',')+'}';}const _0x446789=JSON[_0xa34ba2(0x11e)](_0x5d2f71);return _0x446789===undefined?_0xa34ba2(0x121):_0x446789;}export function consolidateActivationsByContent(_0x2d2541){const _0x5b648a=a145_0x2dfd,_0x5c4543={},_0x4b1b75=new Map(),_0x18407e=new Map();for(const _0x20ff46 of _0x2d2541){if(!_0x20ff46)continue;for(const [_0x118b16,_0xe1daed]of Object['entries'](_0x20ff46)){const _0x2525a9={'name':_0xe1daed[_0x5b648a(0x12c)],'connection':_0xe1daed[_0x5b648a(0xfa)],..._0xe1daed[_0x5b648a(0xf4)]!==undefined&&{'all_columns':_0xe1daed[_0x5b648a(0xf4)]},..._0xe1daed['columns']!==undefined&&{'columns':_0xe1daed['columns']},..._0xe1daed['behavior']!==undefined&&{'behavior':_0xe1daed[_0x5b648a(0xe8)]},..._0xe1daed[_0x5b648a(0x12b)]!==undefined&&{'schedule':_0xe1daed[_0x5b648a(0x12b)]},..._0xe1daed[_0x5b648a(0x131)]!==undefined&&{'notification':_0xe1daed['notification']},..._0xe1daed['connector_config']!==undefined&&{'connector_config':_0xe1daed[_0x5b648a(0x10f)]},..._0xe1daed[_0x5b648a(0x10b)]!==undefined&&{'activation_template_id':_0xe1daed['activation_template_id']}},_0x74fa2e=stableStringify(_0x2525a9),_0x4804e9=_0x18407e[_0x5b648a(0x130)](_0x74fa2e);_0x4804e9?_0x4b1b75[_0x5b648a(0x137)](_0x118b16,_0x4804e9):(_0x5c4543[_0x118b16]=_0xe1daed,_0x4b1b75[_0x5b648a(0x137)](_0x118b16,_0x118b16),_0x18407e[_0x5b648a(0x137)](_0x74fa2e,_0x118b16));}}return{'merged':_0x5c4543,'nameMapping':_0x4b1b75};}export function updateActivationReferences(_0x4332a6,_0x3f9eb4){const _0x138e2d=a145_0x2dfd;if(!_0x4332a6)return;for(const _0x3e43ee of _0x4332a6){if(!_0x3e43ee['steps'])continue;for(const _0x22380b of _0x3e43ee[_0x138e2d(0x129)]){if(_0x22380b[_0x138e2d(0x124)]===_0x138e2d(0x116)&&_0x22380b[_0x138e2d(0x119)]?.['activation']){const _0x374dd3=_0x3f9eb4[_0x138e2d(0x130)](_0x22380b[_0x138e2d(0x119)][_0x138e2d(0x116)]);_0x374dd3&&_0x374dd3!==_0x22380b['with']['activation']&&(_0x22380b[_0x138e2d(0x119)]['activation']=_0x374dd3);}}}}export function consolidateSegmentsByContent(_0x4b85f7,_0x5dc3e8){const _0x7eec3a=a145_0x2dfd,_0xfc0ce9={},_0x1d58a9=new Map(),_0x3cdd1a=new Map();for(const _0x2cd19a of _0x4b85f7){if(!_0x2cd19a)continue;for(const [_0x56dbb4,_0x38ab69]of Object[_0x7eec3a(0xe7)](_0x2cd19a)){if(!_0x38ab69[_0x7eec3a(0x12a)]){_0xfc0ce9[_0x56dbb4]=_0x38ab69,_0x1d58a9['set'](_0x56dbb4,_0x56dbb4);continue;}const _0x5ee53a=_0x38ab69[_0x7eec3a(0xef)]&&_0x38ab69['description'][_0x7eec3a(0x120)]()?_0x38ab69[_0x7eec3a(0xef)]:undefined,_0x2bde9e=JSON[_0x7eec3a(0x11e)]({'description':_0x5ee53a,'rule':deepSortObject(_0x38ab69[_0x7eec3a(0x12a)])}),_0x93b3a=_0x3cdd1a[_0x7eec3a(0x130)](_0x2bde9e);if(_0x93b3a){const _0x43c734={..._0x38ab69[_0x7eec3a(0xef)]!==undefined&&{'description':_0x38ab69[_0x7eec3a(0xef)]},'rule':_0x38ab69['rule']?deepSortObject(_0x38ab69[_0x7eec3a(0x12a)]):_0x38ab69[_0x7eec3a(0x12a)]};if(_0x56dbb4<_0x93b3a){_0xfc0ce9[_0x56dbb4]=_0x43c734,delete _0xfc0ce9[_0x93b3a];for(const [_0x47fc90,_0x1d9522]of _0x1d58a9[_0x7eec3a(0xe7)]()){_0x1d9522===_0x93b3a&&_0x1d58a9[_0x7eec3a(0x137)](_0x47fc90,_0x56dbb4);}_0x1d58a9[_0x7eec3a(0x137)](_0x56dbb4,_0x56dbb4),_0x3cdd1a['set'](_0x2bde9e,_0x56dbb4);}else _0xfc0ce9[_0x93b3a]=_0x43c734,_0x1d58a9[_0x7eec3a(0x137)](_0x56dbb4,_0x93b3a);}else{let _0x834f41=_0x56dbb4;if(_0x5dc3e8){const _0x41a72f=_0x5dc3e8[_0x7eec3a(0x130)](_0x2bde9e);_0x41a72f&&_0x41a72f[_0x7eec3a(0xf9)]>0x0&&(_0x834f41=_0x41a72f[_0x7eec3a(0x11a)]()[_0x7eec3a(0x106)]()[0x0]);}const _0x2ea9a8={..._0x38ab69[_0x7eec3a(0xef)]!==undefined&&{'description':_0x38ab69[_0x7eec3a(0xef)]},'rule':_0x38ab69[_0x7eec3a(0x12a)]?deepSortObject(_0x38ab69[_0x7eec3a(0x12a)]):_0x38ab69[_0x7eec3a(0x12a)]};_0xfc0ce9[_0x834f41]=_0x2ea9a8,_0x1d58a9['set'](_0x56dbb4,_0x834f41),_0x3cdd1a[_0x7eec3a(0x137)](_0x2bde9e,_0x834f41);}}}return{'merged':_0xfc0ce9,'nameMapping':_0x1d58a9};}export function updateSegmentReferences(_0x1b1ed2,_0x320925){const _0x2f6c10=a145_0x2dfd;if(!_0x1b1ed2)return;for(const _0x534cb8 of _0x1b1ed2){if(_0x534cb8[_0x2f6c10(0xf0)]?.['segment']){const _0x6f1d71=_0x320925[_0x2f6c10(0x130)](_0x534cb8[_0x2f6c10(0xf0)]['segment']);_0x6f1d71&&(_0x534cb8[_0x2f6c10(0xf0)]['segment']=_0x6f1d71);}if(_0x534cb8[_0x2f6c10(0xfc)])for(const _0x663816 of _0x534cb8[_0x2f6c10(0xfc)]){if(_0x663816[_0x2f6c10(0x111)]){const _0x47de56=_0x320925['get'](_0x663816[_0x2f6c10(0x111)]);_0x47de56&&(_0x663816[_0x2f6c10(0x111)]=_0x47de56);}}if(_0x534cb8['milestone']?.['segment']){const _0x45bd73=_0x320925[_0x2f6c10(0x130)](_0x534cb8[_0x2f6c10(0xf1)]['segment']);_0x45bd73&&(_0x534cb8[_0x2f6c10(0xf1)][_0x2f6c10(0x111)]=_0x45bd73);}if(_0x534cb8[_0x2f6c10(0x129)])for(const _0x4b4d86 of _0x534cb8[_0x2f6c10(0x129)]){if(_0x4b4d86[_0x2f6c10(0x124)]===_0x2f6c10(0x12f)&&_0x4b4d86[_0x2f6c10(0x119)]?.['branches'])for(const _0x570ec9 of _0x4b4d86[_0x2f6c10(0x119)]['branches']){if(_0x570ec9[_0x2f6c10(0x111)]){const _0x25c3b8=_0x320925[_0x2f6c10(0x130)](_0x570ec9[_0x2f6c10(0x111)]);_0x25c3b8&&(_0x570ec9['segment']=_0x25c3b8);}}if(_0x4b4d86[_0x2f6c10(0x124)]==='wait'&&_0x4b4d86[_0x2f6c10(0x119)]?.[_0x2f6c10(0x109)]?.[_0x2f6c10(0x111)]){const _0x49d4ff=_0x320925['get'](_0x4b4d86['with'][_0x2f6c10(0x109)][_0x2f6c10(0x111)]);_0x49d4ff&&(_0x4b4d86[_0x2f6c10(0x119)]['condition'][_0x2f6c10(0x111)]=_0x49d4ff);}}}}export function updateSegmentRefsInSegments(_0x9fb3a7,_0x305aac){const _0x79c48a=a145_0x2dfd;for(const _0x2f166c of Object[_0x79c48a(0x11b)](_0x9fb3a7)){_0x2f166c[_0x79c48a(0x12a)]&&updateSegmentRefsInRule(_0x2f166c[_0x79c48a(0x12a)],_0x305aac);}}function updateSegmentRefsInRule(_0x2364f3,_0x254592){const _0x1bcf49=a145_0x2dfd;if(_0x2364f3===null||typeof _0x2364f3!=='object')return;if(Array[_0x1bcf49(0xf2)](_0x2364f3)){for(const _0x51c4f8 of _0x2364f3){updateSegmentRefsInRule(_0x51c4f8,_0x254592);}return;}const _0x113bcc=_0x2364f3;if((_0x113bcc[_0x1bcf49(0x124)]===_0x1bcf49(0xea)||_0x113bcc[_0x1bcf49(0x124)]===_0x1bcf49(0x112))&&typeof _0x113bcc[_0x1bcf49(0x111)]===_0x1bcf49(0xf5)){const _0x18a6e5=_0x254592[_0x1bcf49(0x130)](_0x113bcc[_0x1bcf49(0x111)]);_0x18a6e5&&(_0x113bcc[_0x1bcf49(0x111)]=_0x18a6e5);}if(_0x113bcc[_0x1bcf49(0x138)]&&Array['isArray'](_0x113bcc[_0x1bcf49(0x138)]))for(const _0x219f1e of _0x113bcc[_0x1bcf49(0x138)]){updateSegmentRefsInRule(_0x219f1e,_0x254592);}}export function buildJourneysArray(_0x1e0cfb,_0x37e326){const _0x474f66=a145_0x2dfd;return _0x1e0cfb[_0x474f66(0x136)](_0x182cec=>{const _0x1289ce=_0x474f66,_0x43fb6b=_0x37e326?_0x182cec[_0x1289ce(0x10c)]['id']===_0x37e326:_0x1e0cfb['length']===0x1,_0x331641=_0x182cec['yaml'][_0x1289ce(0x113)]?.[0x0],_0x3f4e72=_0x331641?.['goal']||_0x182cec[_0x1289ce(0x123)][_0x1289ce(0x108)],_0xb61951={'version':_0x331641?.[_0x1289ce(0xfb)]||_0x182cec['yaml'][_0x1289ce(0xfb)]||_0x182cec[_0x1289ce(0x10c)]['name'],'state':_0x182cec[_0x1289ce(0x10c)][_0x1289ce(0x101)]==='launched'?_0x1289ce(0xe9):_0x1289ce(0x118),'stages':_0x331641?.[_0x1289ce(0x122)]||_0x182cec[_0x1289ce(0x123)][_0x1289ce(0x122)]||[],'id':_0x331641?.['id']||_0x182cec[_0x1289ce(0x123)]['id'],'version_number':_0x331641?.[_0x1289ce(0x117)]||_0x182cec['yaml']['version_number']};return _0x3f4e72&&(_0xb61951[_0x1289ce(0x108)]=_0x3f4e72),_0x43fb6b&&(_0xb61951[_0x1289ce(0x125)]=!![]),_0xb61951;});}export function buildMergedJourneyDef(_0x13dba2,_0xa7f167,_0x4adeda){const _0x1853bb=a145_0x2dfd,_0x47e75c=_0x13dba2[0x0]['yaml'],_0x33af86=buildJourneysArray(_0x13dba2,_0x4adeda),{merged:_0x1e2de3,nameMapping:_0x4a3f66}=consolidateSegmentsByContent(_0x13dba2[_0x1853bb(0x136)](_0x44c1b7=>_0x44c1b7[_0x1853bb(0x123)][_0x1853bb(0x139)]),_0xa7f167);updateSegmentRefsInSegments(_0x1e2de3,_0x4a3f66);const _0x3e95c7=Array[_0x1853bb(0x103)](_0x4a3f66[_0x1853bb(0xe7)]())[_0x1853bb(0x115)](([_0x5060b0,_0x45e0f6])=>_0x5060b0!==_0x45e0f6&&_0x5060b0['startsWith'](_0x1853bb(0xf0)));let _0x10c791=_0x1e2de3,_0x2c56c1=new Map();if(_0x3e95c7){const _0x46dfcf=consolidateSegmentsByContent([_0x1e2de3],_0xa7f167);_0x10c791=_0x46dfcf[_0x1853bb(0xeb)],_0x2c56c1=_0x46dfcf[_0x1853bb(0xee)];}const _0x441bf2=new Map(_0x4a3f66);for(const [_0x1697f5,_0x247c75]of _0x2c56c1[_0x1853bb(0xe7)]()){_0x441bf2['set'](_0x1697f5,_0x247c75);}for(const [_0x41788d,_0x42a159]of _0x441bf2[_0x1853bb(0xe7)]()){let _0x5c5afc=_0x42a159,_0x198b97=0x0;while(_0x441bf2['has'](_0x5c5afc)&&_0x441bf2['get'](_0x5c5afc)!==_0x5c5afc&&_0x198b97<MAX_MAPPING_CHAIN_DEPTH){_0x5c5afc=_0x441bf2[_0x1853bb(0x130)](_0x5c5afc),_0x198b97++;}_0x5c5afc!==_0x42a159&&_0x441bf2[_0x1853bb(0x137)](_0x41788d,_0x5c5afc);}for(const _0x3f44c3 of _0x33af86){updateSegmentReferences(_0x3f44c3[_0x1853bb(0x122)],_0x441bf2);}const {merged:_0x300f06,nameMapping:_0x53c841}=consolidateActivationsByContent(_0x13dba2['map'](_0x4dbcf1=>_0x4dbcf1['yaml'][_0x1853bb(0x104)]));for(const _0x2807dd of _0x33af86){updateActivationReferences(_0x2807dd[_0x1853bb(0x122)],_0x53c841);}let _0x100c31=_0x47e75c[_0x1853bb(0x108)];if(_0x100c31?.[_0x1853bb(0x111)]){const _0x4d5246=_0x441bf2[_0x1853bb(0x130)](_0x100c31['segment']);_0x4d5246&&(_0x100c31={..._0x100c31,'segment':_0x4d5246});}for(const _0x4a0c66 of _0x33af86){if(_0x4a0c66['goal']?.[_0x1853bb(0x111)]){const _0x36a6a4=_0x441bf2[_0x1853bb(0x130)](_0x4a0c66[_0x1853bb(0x108)][_0x1853bb(0x111)]);_0x36a6a4&&(_0x4a0c66[_0x1853bb(0x108)]={..._0x4a0c66[_0x1853bb(0x108)],'segment':_0x36a6a4});}}return _0x33af86[_0x1853bb(0x115)](_0xe17c47=>_0xe17c47[_0x1853bb(0x108)])&&(_0x100c31=undefined),{'type':_0x1853bb(0xf3),'name':_0x47e75c['name'],'description':_0x47e75c[_0x1853bb(0xef)],'goal':_0x100c31,'reentry':_0x47e75c[_0x1853bb(0x107)],'segments':Object[_0x1853bb(0x11c)](_0x10c791)[_0x1853bb(0xf9)]>0x0?_0x10c791:undefined,'activations':Object[_0x1853bb(0x11c)](_0x300f06)[_0x1853bb(0xf9)]>0x0?_0x300f06:undefined,'journeys':_0x33af86,'bundle_id':_0x47e75c[_0x1853bb(0xf8)],'bundle_name':_0x47e75c[_0x1853bb(0xfe)]};}function a145_0x2dfd(_0x577e67,_0x2f9428){_0x577e67=_0x577e67-0xe7;const _0x973681=a145_0x9736();let _0x2dfd25=_0x973681[_0x577e67];return _0x2dfd25;}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x245710,_0x515a70,_0x1f43fc,_0x1b63b1){const _0x553053=a145_0x2dfd,_0x3cda39=_0x245710+':'+_0x515a70,_0x650fda=_0x1f43fc[_0x553053(0x130)](_0x3cda39);if(_0x650fda)return _0x650fda;const _0x2ed69e=await _0x1b63b1(_0x245710),_0x4e145b=_0x2ed69e['attributes'][_0x553053(0x10a)]||_0x2ed69e[_0x553053(0xec)]['name'],_0x4deb65=_0x2ed69e[_0x553053(0xec)][_0x553053(0x128)][_0x553053(0x100)](_0x107cdb=>String(_0x107cdb['id'])===String(_0x515a70)),_0x7e5431=_0x4deb65?.[_0x553053(0x12c)]||_0x515a70,_0x43f483={'journeyName':_0x4e145b,'stageName':_0x7e5431};return _0x1f43fc[_0x553053(0x137)](_0x3cda39,_0x43f483),_0x43f483;}function a145_0x9736(){const _0x229f9f=['set','conditions','segments','11gVOkyv','entries','behavior','launched','include','merged','attributes','26798160vYwsiy','nameMapping','description','entry_criteria','milestone','isArray','journey','all_columns','string','4xSbfqI','9714470hPRsys','bundle_id','length','connection','version','exit_criteria','1998365xJIzwA','bundle_name','versions','find','state','push','from','activations','6OhxwEw','sort','reentry','goal','condition','journeyBundleName','activation_template_id','item','9352fLYlon','index','connector_config','1575bpprfW','segment','exclude','journeys','toLowerCase','some','activation','version_number','draft','with','slice','values','keys','1483501deoIza','stringify','replace','trim','null','stages','yaml','type','latest','branches','join','journeyStages','steps','rule','schedule','name','endsWith','.yaml','decision_point','get','notification','match','2081172hwKeeK','514278tshwLe','21ydmVbO','map'];a145_0x9736=function(){return _0x229f9f;};return a145_0x9736();}export function formatApiJourneyName(_0x566a6b,_0x101646){return _0x101646+'\x20('+_0x566a6b+')';}export function isLocalJourneyRef(_0xa66c64){const _0x44976c=a145_0x2dfd;return _0xa66c64['endsWith']('.yml')||_0xa66c64[_0x44976c(0x12d)](_0x44976c(0x12e));}export function buildLocalRuleToNameMapping(_0x2ca41b){const _0x4b7363=a145_0x2dfd,_0x42eff0=new Map();if(!_0x2ca41b)return _0x42eff0;for(const [_0x3deb9e,_0x288930]of Object['entries'](_0x2ca41b)){if(_0x288930[_0x4b7363(0x12a)]){const _0x15b02e=serializeRule(_0x288930['rule']),_0x497904=_0x42eff0[_0x4b7363(0x130)](_0x15b02e)||[];_0x497904[_0x4b7363(0x102)](_0x3deb9e),_0x42eff0[_0x4b7363(0x137)](_0x15b02e,_0x497904);}}return _0x42eff0;}export function buildLocalRuleToNameMappingFromJourney(_0x54ebc4){const _0x102750=a145_0x2dfd,_0x2b1705=_0x54ebc4['segments'];if(!_0x2b1705)return new Map();const _0x594fff=collectSegmentUsageCounts(_0x54ebc4),_0x465f67=new Map();let _0x4fc9a1=0x0;for(const [_0x36d102,_0x264afb]of Object[_0x102750(0xe7)](_0x2b1705)){if(!_0x264afb[_0x102750(0x12a)]){_0x4fc9a1++;continue;}const _0x2e7899=serializeRule(_0x264afb[_0x102750(0x12a)]),_0x3df9ef=_0x465f67[_0x102750(0x130)](_0x2e7899)||[];_0x3df9ef[_0x102750(0x102)]({'name':_0x36d102,'index':_0x4fc9a1}),_0x465f67['set'](_0x2e7899,_0x3df9ef),_0x4fc9a1++;}const _0x5b3657=new Map();for(const [_0x3bf66d,_0x4c3571]of _0x465f67){const _0x5390a5=_0x4c3571[_0x102750(0x11a)]()['sort']((_0x51468f,_0xcb043e)=>{const _0x18fbf5=_0x102750,_0x24ee7b=_0x594fff[_0x18fbf5(0x130)](_0x51468f['name'])||0x0,_0xecce67=_0x594fff['get'](_0xcb043e['name'])||0x0;if(_0x24ee7b!==_0xecce67)return _0xecce67-_0x24ee7b;return _0x51468f[_0x18fbf5(0x10e)]-_0xcb043e[_0x18fbf5(0x10e)];})[_0x102750(0x136)](_0x5e4e24=>_0x5e4e24[_0x102750(0x12c)]);_0x5b3657[_0x102750(0x137)](_0x3bf66d,_0x5390a5);}return _0x5b3657;}export function collectSegmentUsageCounts(_0xd25817){const _0x1e4290=a145_0x2dfd,_0x68cdd6=new Map(),_0x1577ce=_0x1bd806=>{const _0x5968b9=a145_0x2dfd;if(!_0x1bd806)return;_0x68cdd6[_0x5968b9(0x137)](_0x1bd806,(_0x68cdd6[_0x5968b9(0x130)](_0x1bd806)||0x0)+0x1);},_0xfdbc29=_0x4309ec=>{const _0x2f365d=a145_0x2dfd;for(const _0x5c6bbd of _0x4309ec){_0x1577ce(_0x5c6bbd[_0x2f365d(0xf0)]?.['segment']);if(_0x5c6bbd[_0x2f365d(0xfc)])for(const _0x45204c of _0x5c6bbd[_0x2f365d(0xfc)]){_0x1577ce(_0x45204c[_0x2f365d(0x111)]);}_0x1577ce(_0x5c6bbd[_0x2f365d(0xf1)]?.['segment']);if(_0x5c6bbd[_0x2f365d(0x129)])for(const _0x4a4b77 of _0x5c6bbd['steps']){if(_0x4a4b77[_0x2f365d(0x124)]==='decision_point')for(const _0x1aeb00 of _0x4a4b77[_0x2f365d(0x119)][_0x2f365d(0x126)]){_0x1577ce(_0x1aeb00[_0x2f365d(0x111)]);}else _0x4a4b77[_0x2f365d(0x124)]==='wait'&&_0x1577ce(_0x4a4b77[_0x2f365d(0x119)][_0x2f365d(0x109)]?.[_0x2f365d(0x111)]);}}};_0x1577ce(_0xd25817['goal']?.[_0x1e4290(0x111)]);if(_0xd25817[_0x1e4290(0x113)])for(const _0x5361a4 of _0xd25817[_0x1e4290(0x113)]){_0x1577ce(_0x5361a4[_0x1e4290(0x108)]?.[_0x1e4290(0x111)]),_0xfdbc29(_0x5361a4[_0x1e4290(0x122)]);}_0xd25817[_0x1e4290(0x122)]&&_0xfdbc29(_0xd25817[_0x1e4290(0x122)]);if(_0xd25817[_0x1e4290(0xff)])for(const _0x3e34bf of _0xd25817[_0x1e4290(0xff)]){_0xfdbc29(_0x3e34bf[_0x1e4290(0x122)]);}return _0x68cdd6;}