@treasuredata/tdx 2026.3.44 → 2026.3.45

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 (221) 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.d.ts.map +1 -1
  141. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  142. package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
  143. package/dist/sdk/segment/fields-display.js +1 -1
  144. package/dist/sdk/segment/file-discovery.js +1 -1
  145. package/dist/sdk/segment/journey-utils.js +1 -1
  146. package/dist/sdk/segment/journey-validator.js +1 -1
  147. package/dist/sdk/segment/journey-yaml.js +1 -1
  148. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  149. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  150. package/dist/sdk/segment/pull-workflow.js +1 -1
  151. package/dist/sdk/segment/push-recovery.js +1 -1
  152. package/dist/sdk/segment/push-workflow.js +1 -1
  153. package/dist/sdk/segment/resolution-context.js +1 -1
  154. package/dist/sdk/segment/segment-path-parser.js +1 -1
  155. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  156. package/dist/sdk/segment/segment-validator.js +1 -1
  157. package/dist/sdk/segment/target-resolution.js +1 -1
  158. package/dist/sdk/segment/tdx-config.js +1 -1
  159. package/dist/sdk/segment/types/activation-schema.js +1 -1
  160. package/dist/sdk/segment/types/journey-def.js +1 -1
  161. package/dist/sdk/segment/types/journey-schema.js +1 -1
  162. package/dist/sdk/segment/types/segment-def.js +1 -1
  163. package/dist/sdk/segment/types/segment-schema.js +1 -1
  164. package/dist/sdk/segment/validate-files.js +1 -1
  165. package/dist/sdk/segment/yaml-validator.js +1 -1
  166. package/dist/sdk/segment.js +1 -1
  167. package/dist/sdk/types/index.js +1 -1
  168. package/dist/sdk/types/progress.js +1 -1
  169. package/dist/sdk/types/workspace.js +1 -1
  170. package/dist/sdk/user.js +1 -1
  171. package/dist/sdk/util/format-detector.js +1 -1
  172. package/dist/sdk/util/formatters.js +1 -1
  173. package/dist/sdk/util/index.js +1 -1
  174. package/dist/sdk/util/paginate.js +1 -1
  175. package/dist/sdk/util/tree-formatter.js +1 -1
  176. package/dist/sdk/workflow/archive-validation.js +1 -1
  177. package/dist/sdk/workflow/clone-workflow.js +1 -1
  178. package/dist/sdk/workflow/index.js +1 -1
  179. package/dist/sdk/workflow/pull-workflow.js +1 -1
  180. package/dist/sdk/workflow/push-workflow.js +1 -1
  181. package/dist/sdk/workflow/tdx-config.js +1 -1
  182. package/dist/sdk/workflow/workflow-utils.js +1 -1
  183. package/dist/sdk/workspace/frontmatter.js +1 -1
  184. package/dist/sdk/workspace/git.js +1 -1
  185. package/dist/sdk/workspace/index.js +1 -1
  186. package/dist/sdk/workspace/templates.js +1 -1
  187. package/dist/sdk/workspace/weekly.js +1 -1
  188. package/dist/sdk/workspace/wikilinks.js +1 -1
  189. package/dist/test-utils/command-runner.js +1 -1
  190. package/dist/test-utils/factories.js +1 -1
  191. package/dist/test-utils/fixtures.js +1 -1
  192. package/dist/test-utils/http-mock.js +1 -1
  193. package/dist/test-utils/index.js +1 -1
  194. package/dist/utils/async.js +1 -1
  195. package/dist/utils/colors.js +1 -1
  196. package/dist/utils/diff.js +1 -1
  197. package/dist/utils/file-permissions.js +1 -1
  198. package/dist/utils/file-reader.js +1 -1
  199. package/dist/utils/github-releases.js +1 -1
  200. package/dist/utils/global-cache.js +1 -1
  201. package/dist/utils/json-loader.js +1 -1
  202. package/dist/utils/local-cache.js +1 -1
  203. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  204. package/dist/utils/logger/formatters/index.js +1 -1
  205. package/dist/utils/logger/handlers/console-handler.js +1 -1
  206. package/dist/utils/logger/handlers/file-handler.js +1 -1
  207. package/dist/utils/logger/handlers/index.js +1 -1
  208. package/dist/utils/logger/handlers/null-handler.js +1 -1
  209. package/dist/utils/logger/index.js +1 -1
  210. package/dist/utils/logger/logger.js +1 -1
  211. package/dist/utils/logger/types.js +1 -1
  212. package/dist/utils/option-validation.js +1 -1
  213. package/dist/utils/process.js +1 -1
  214. package/dist/utils/prompt.js +1 -1
  215. package/dist/utils/spinner.js +1 -1
  216. package/dist/utils/sse-parser.js +1 -1
  217. package/dist/utils/string-utils.js +1 -1
  218. package/dist/utils/table-ref-parser.js +1 -1
  219. package/dist/utils/tdx-logger.js +1 -1
  220. package/dist/utils/version-check.js +1 -1
  221. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x1b6dcb,_0x23b730){const _0x4ca218=a156_0x4c1c,_0x29b1f3=_0x1b6dcb();while(!![]){try{const _0x3485d8=parseInt(_0x4ca218(0x189))/0x1+parseInt(_0x4ca218(0x1c7))/0x2+-parseInt(_0x4ca218(0x1c6))/0x3+parseInt(_0x4ca218(0x1af))/0x4+-parseInt(_0x4ca218(0x1c1))/0x5*(parseInt(_0x4ca218(0x1b5))/0x6)+parseInt(_0x4ca218(0x1a6))/0x7+parseInt(_0x4ca218(0x197))/0x8*(parseInt(_0x4ca218(0x191))/0x9);if(_0x3485d8===_0x23b730)break;else _0x29b1f3['push'](_0x29b1f3['shift']());}catch(_0x29e663){_0x29b1f3['push'](_0x29b1f3['shift']());}}}(a156_0x513c,0x1b432));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x7e5722,_0x5226d5={},_0x20596a={}){const _0x4858e5=a156_0x4c1c;if(_0x20596a[_0x4858e5(0x1ad)])return runSemanticChecks(_0x7e5722,_0x5226d5);const _0x8eb36f=SegmentDefSchema['safeParse'](_0x7e5722);if(_0x8eb36f[_0x4858e5(0x19a)])return runSemanticChecks(_0x8eb36f[_0x4858e5(0x1a7)],_0x5226d5);return zodErrorsToValidationResult(_0x8eb36f['error'],_0x5226d5);}export function validateRuleDef(_0x48a464,_0x488c34,_0x106740){const _0x545a50=a156_0x4c1c;if(!_0x48a464)return[];const _0x3ffb8b=RuleDefSchema['safeParse'](_0x48a464);if(_0x3ffb8b[_0x545a50(0x19a)])return checkRule(_0x3ffb8b['data'],_0x488c34,_0x106740);const _0x217952=flattenZodIssues(_0x3ffb8b[_0x545a50(0x192)][_0x545a50(0x1b4)]);return _0x217952['map'](_0xfb0042=>{const _0x1bfc51=_0x545a50,_0x1ffc10=formatZodPath(_0xfb0042[_0x1bfc51(0x1cd)]),_0x1aca3d=_0x1ffc10?_0x488c34+'.'+_0x1ffc10:_0x488c34,_0x55559c=mapZodIssueToCode(_0xfb0042,_0x1ffc10),_0x3040b0=getLocationFromPath(_0x106740[_0x1bfc51(0x1c8)],_0x106740[_0x1bfc51(0x1a8)],pathToArray(_0x1aca3d));return{'level':_0x1bfc51(0x192),'path':_0x1aca3d,'code':_0x55559c,'message':_0xfb0042['message'],..._0x3040b0&&{'location':_0x3040b0}};});}function zodErrorsToValidationResult(_0x916498,_0x23d1a4){const _0x194a0=a156_0x4c1c,_0xec0288=flattenZodIssues(_0x916498[_0x194a0(0x1b4)]),_0x3609e9=_0xec0288[_0x194a0(0x1a9)](_0x32f7be=>{const _0x3874aa=_0x194a0,_0x1d988b=formatZodPath(_0x32f7be['path']),_0x134d77=mapZodIssueToCode(_0x32f7be,_0x1d988b),_0x2ab27b=getLocationFromPath(_0x23d1a4[_0x3874aa(0x1c8)],_0x23d1a4['source'],_0x32f7be[_0x3874aa(0x1cd)]['map'](_0x4188e0=>typeof _0x4188e0===_0x3874aa(0x188)?String(_0x4188e0):_0x4188e0));return{'level':'error','path':_0x1d988b,'code':_0x134d77,'message':_0x32f7be[_0x3874aa(0x1c3)],..._0x2ab27b&&{'location':_0x2ab27b}};});return{'valid':![],'errors':_0x3609e9,'warnings':[]};}function mapZodIssueToCode(_0x375abe,_0x312a0d){const _0x387d79=a156_0x4c1c,_0x297d24=_0x375abe[_0x387d79(0x1cb)]==='custom'?_0x375abe[_0x387d79(0x1b1)]:undefined;if(_0x312a0d===_0x387d79(0x1b3))return _0x387d79(0x1a1);if(_0x312a0d===_0x387d79(0x18a)||_0x312a0d[_0x387d79(0x18b)]('.type')){if(_0x375abe[_0x387d79(0x1cb)]==='invalid_value'){if(_0x312a0d===_0x387d79(0x18a)||_0x312a0d[_0x387d79(0x1c2)](/\.conditions\[\d+\]\.type$/))return _0x387d79(0x1b7);}}if(_0x312a0d[_0x387d79(0x18b)](_0x387d79(0x1b8)))return _0x387d79(0x1b9);if(_0x312a0d[_0x387d79(0x18b)](_0x387d79(0x18d)))return _0x387d79(0x1b6);if(_0x297d24?.[_0x387d79(0x190)]===_0x387d79(0x1c9))return _0x387d79(0x1c9);if(_0x297d24?.[_0x387d79(0x190)]===_0x387d79(0x18f))return _0x387d79(0x18f);if(_0x312a0d[_0x387d79(0x18b)](_0x387d79(0x19d))||_0x312a0d==='conditions')return _0x387d79(0x18e);if(_0x312a0d[_0x387d79(0x1ba)]('arrayMatching'))return _0x387d79(0x1c0);if(_0x312a0d[_0x387d79(0x18b)](_0x387d79(0x1ce)))return _0x387d79(0x19f);return _0x387d79(0x19c);}function a156_0x4c1c(_0x5dd024,_0xf31f25){_0x5dd024=_0x5dd024-0x187;const _0x513cc6=a156_0x513c();let _0x4c1cb1=_0x513cc6[_0x5dd024];return _0x4c1cb1;}function a156_0x513c(){const _0x4c9038=['description','INVALID_ARRAY_MATCHING','5350YFhVYN','match','message','filter','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','550764EaqAcv','37330BcbELz','document','MISSING_BETWEEN_BOUNDS','level','code','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','path','.segment','EMPTY_CONDITIONS','symbol','38645nuHbdu','rule.type','endsWith','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','.operator.value','MISSING_CONDITIONS','MISSING_TIME_UNIT','validationCode','9svZPQM','error','\x27\x20with\x20attribute\x20\x27','conditions','.filter','EMPTY_ATTRIBUTE','1177096bnZtEq','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','.source','success','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','SEGMENT_SCHEMA_ERROR','.conditions','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','MISSING_SEGMENT_REFERENCE','BEHAVIOR_SOURCE_MISSING_FILTER','MISSING_NAME','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','Attribute\x20\x27','length','type','231042jrbJSi','data','source','map','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','.attribute','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','skipSchema','rule','363884HAhAQy','attribute','params','Behavior\x20source\x20\x27','name','issues','186raFmWX','MISSING_OPERATOR_VALUE','INVALID_RULE_TYPE','.operator.type','INVALID_OPERATOR_TYPE','includes','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','warning','.conditions[','push'];a156_0x513c=function(){return _0x4c9038;};return a156_0x513c();}function runSemanticChecks(_0x509516,_0x41f168){const _0x334810=a156_0x4c1c,_0x2fb2ef=[];_0x509516[_0x334810(0x1ae)]&&_0x2fb2ef[_0x334810(0x1be)](...checkRule(_0x509516[_0x334810(0x1ae)],_0x334810(0x1ae),_0x41f168));const _0x54f016=_0x2fb2ef[_0x334810(0x1c4)](_0x4ddf7a=>_0x4ddf7a[_0x334810(0x1ca)]==='error'),_0x377446=_0x2fb2ef[_0x334810(0x1c4)](_0x543dd1=>_0x543dd1['level']===_0x334810(0x1bc));return{'valid':_0x54f016[_0x334810(0x1a4)]===0x0,'errors':_0x54f016,'warnings':_0x377446};}function checkRule(_0x185e29,_0x170406,_0x5b06dc){const _0x1f279b=a156_0x4c1c,_0x217076=[];if(_0x185e29[_0x1f279b(0x194)]['length']===0x0)return _0x217076[_0x1f279b(0x1be)]({'level':_0x1f279b(0x192),'path':_0x170406+_0x1f279b(0x19d),'code':'EMPTY_CONDITIONS','message':_0x1f279b(0x1a2),'location':getLocationFromPath(_0x5b06dc[_0x1f279b(0x1c8)],_0x5b06dc[_0x1f279b(0x1a8)],pathToArray(_0x170406+_0x1f279b(0x19d)))}),_0x217076;return _0x217076['push'](...checkConditions(_0x185e29[_0x1f279b(0x194)],_0x170406,_0x5b06dc)),_0x217076;}function checkConditions(_0xbb216a,_0x5c2322,_0x4d0a2b){const _0x1b0f2e=a156_0x4c1c,_0x4449d3=[];for(let _0x7e66cf=0x0;_0x7e66cf<_0xbb216a[_0x1b0f2e(0x1a4)];_0x7e66cf++){const _0x40b52f=_0xbb216a[_0x7e66cf],_0x473b6f=_0x5c2322+_0x1b0f2e(0x1bd)+_0x7e66cf+']';_0x4449d3[_0x1b0f2e(0x1be)](...checkCondition(_0x40b52f,_0x473b6f,_0x4d0a2b));}return _0x4449d3;}function checkCondition(_0xbf4bfc,_0x3c57f3,_0x5d50ab){const _0xf8ab15=a156_0x4c1c,_0x44ad7b=[];if(_0xbf4bfc[_0xf8ab15(0x1a5)]==='And'||_0xbf4bfc[_0xf8ab15(0x1a5)]==='Or'){if(_0xbf4bfc['conditions'][_0xf8ab15(0x1a4)]===0x0)_0x44ad7b[_0xf8ab15(0x1be)]({'level':_0xf8ab15(0x192),'path':_0x3c57f3+_0xf8ab15(0x19d),'code':_0xf8ab15(0x187),'message':_0xbf4bfc[_0xf8ab15(0x1a5)]+_0xf8ab15(0x18c),'location':getLocationFromPath(_0x5d50ab[_0xf8ab15(0x1c8)],_0x5d50ab[_0xf8ab15(0x1a8)],pathToArray(_0x3c57f3+_0xf8ab15(0x19d)))});else{const _0x34022d=_0xbf4bfc[_0xf8ab15(0x1bf)]!==undefined;!_0x34022d&&_0x44ad7b[_0xf8ab15(0x1be)]({'level':'warning','path':_0x3c57f3,'code':'NESTED_CONDITION_GROUP','message':_0xbf4bfc['type']+_0xf8ab15(0x1bb)+_0xf8ab15(0x19b)+'conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x5d50ab[_0xf8ab15(0x1c8)],_0x5d50ab[_0xf8ab15(0x1a8)],pathToArray(_0x3c57f3))}),_0x44ad7b[_0xf8ab15(0x1be)](...checkConditions(_0xbf4bfc[_0xf8ab15(0x194)],_0x3c57f3,_0x5d50ab));}return _0x44ad7b;}if(_0xbf4bfc[_0xf8ab15(0x1a5)]==='Value'||_0xbf4bfc[_0xf8ab15(0x1a5)]==='Behavior'){const _0x700702=_0xbf4bfc,_0x1b85f6=_0x700702[_0xf8ab15(0x1a8)],_0x5a7fa4=_0x700702['aggregation'],_0xe781f3=_0x1b85f6||_0x5a7fa4;(!_0x700702[_0xf8ab15(0x1b0)]||_0x700702[_0xf8ab15(0x1b0)]==='')&&(!_0xe781f3&&_0x44ad7b[_0xf8ab15(0x1be)]({'level':_0xf8ab15(0x192),'path':_0x3c57f3+_0xf8ab15(0x1ab),'code':_0xf8ab15(0x196),'message':'Attribute\x20name\x20cannot\x20be\x20empty','location':getLocationFromPath(_0x5d50ab['document'],_0x5d50ab[_0xf8ab15(0x1a8)],pathToArray(_0x3c57f3+_0xf8ab15(0x1ab)))}));_0x700702[_0xf8ab15(0x1c4)]&&_0x44ad7b[_0xf8ab15(0x1be)](...checkRule(_0x700702[_0xf8ab15(0x1c4)],_0x3c57f3+_0xf8ab15(0x195),_0x5d50ab));if(_0x700702[_0xf8ab15(0x1a8)]){const _0x1c41e2=_0x700702[_0xf8ab15(0x1b0)]&&_0x700702['attribute']!=='';_0x1c41e2&&!_0x700702[_0xf8ab15(0x1c4)]&&_0x44ad7b['push']({'level':_0xf8ab15(0x192),'path':_0x3c57f3+_0xf8ab15(0x199),'code':_0xf8ab15(0x1a0),'message':_0xf8ab15(0x1b2)+_0x700702['source']+_0xf8ab15(0x193)+_0x700702[_0xf8ab15(0x1b0)]+'\x27\x20'+_0xf8ab15(0x1c5)+_0xf8ab15(0x1aa)+_0xf8ab15(0x1ac),'location':getLocationFromPath(_0x5d50ab[_0xf8ab15(0x1c8)],_0x5d50ab[_0xf8ab15(0x1a8)],pathToArray(_0x3c57f3+'.source'))}),_0x1c41e2&&_0x700702[_0xf8ab15(0x1c4)]&&_0x44ad7b['push']({'level':_0xf8ab15(0x1bc),'path':_0x3c57f3+'.attribute','code':_0xf8ab15(0x19e),'message':_0xf8ab15(0x1a3)+_0x700702[_0xf8ab15(0x1b0)]+_0xf8ab15(0x1cc)+_0xf8ab15(0x198),'location':getLocationFromPath(_0x5d50ab[_0xf8ab15(0x1c8)],_0x5d50ab['source'],pathToArray(_0x3c57f3+'.attribute'))});}}return _0x44ad7b;}
1
+ function a156_0xe3dc(_0x351fc8,_0x1b39fb){_0x351fc8=_0x351fc8-0x89;const _0x35e3f3=a156_0x35e3();let _0xe3dc7c=_0x35e3f3[_0x351fc8];return _0xe3dc7c;}(function(_0x254379,_0x45a66d){const _0x49c576=a156_0xe3dc,_0x362913=_0x254379();while(!![]){try{const _0x1cafdc=parseInt(_0x49c576(0xb7))/0x1+parseInt(_0x49c576(0xb6))/0x2+-parseInt(_0x49c576(0x95))/0x3+-parseInt(_0x49c576(0x97))/0x4*(parseInt(_0x49c576(0xc3))/0x5)+-parseInt(_0x49c576(0x9b))/0x6*(parseInt(_0x49c576(0xce))/0x7)+parseInt(_0x49c576(0xbe))/0x8+parseInt(_0x49c576(0xa9))/0x9*(parseInt(_0x49c576(0xbc))/0xa);if(_0x1cafdc===_0x45a66d)break;else _0x362913['push'](_0x362913['shift']());}catch(_0x4bb0cb){_0x362913['push'](_0x362913['shift']());}}}(a156_0x35e3,0xab6b6));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x546dce,_0x339cda={},_0x1f01e8={}){const _0x2ab37c=a156_0xe3dc;if(_0x1f01e8['skipSchema'])return runSemanticChecks(_0x546dce,_0x339cda);const _0x12b7f8=SegmentDefSchema[_0x2ab37c(0x94)](_0x546dce);if(_0x12b7f8[_0x2ab37c(0xa0)])return runSemanticChecks(_0x12b7f8[_0x2ab37c(0x8e)],_0x339cda);return zodErrorsToValidationResult(_0x12b7f8[_0x2ab37c(0xaa)],_0x339cda);}export function validateRuleDef(_0x20fe2c,_0x218448,_0x52f043){const _0x2e0bf1=a156_0xe3dc;if(!_0x20fe2c)return[];const _0x3eff99=RuleDefSchema[_0x2e0bf1(0x94)](_0x20fe2c);if(_0x3eff99[_0x2e0bf1(0xa0)])return checkRule(_0x3eff99['data'],_0x218448,_0x52f043);const _0x40e128=flattenZodIssues(_0x3eff99[_0x2e0bf1(0xaa)][_0x2e0bf1(0xa1)]);return _0x40e128[_0x2e0bf1(0xba)](_0x13364b=>{const _0x3ac7a3=_0x2e0bf1,_0x37bbe4=formatZodPath(_0x13364b[_0x3ac7a3(0xa7)]),_0xcf03a1=_0x37bbe4?_0x218448+'.'+_0x37bbe4:_0x218448,_0x326ba9=mapZodIssueToCode(_0x13364b,_0x37bbe4),_0x453ad2=getLocationFromPath(_0x52f043[_0x3ac7a3(0x9e)],_0x52f043['source'],pathToArray(_0xcf03a1));return{'level':_0x3ac7a3(0xaa),'path':_0xcf03a1,'code':_0x326ba9,'message':_0x13364b[_0x3ac7a3(0x91)],..._0x453ad2&&{'location':_0x453ad2}};});}function zodErrorsToValidationResult(_0x20a895,_0x1f5ed5){const _0x503f6a=a156_0xe3dc,_0x123ccf=flattenZodIssues(_0x20a895[_0x503f6a(0xa1)]),_0x529d3f=_0x123ccf[_0x503f6a(0xba)](_0x3b3480=>{const _0x5ccb91=_0x503f6a,_0x427f77=formatZodPath(_0x3b3480['path']),_0xc7b81=mapZodIssueToCode(_0x3b3480,_0x427f77),_0x52d8ad=getLocationFromPath(_0x1f5ed5['document'],_0x1f5ed5[_0x5ccb91(0x89)],_0x3b3480[_0x5ccb91(0xa7)][_0x5ccb91(0xba)](_0x2d7eef=>typeof _0x2d7eef===_0x5ccb91(0xa4)?String(_0x2d7eef):_0x2d7eef));return{'level':_0x5ccb91(0xaa),'path':_0x427f77,'code':_0xc7b81,'message':_0x3b3480['message'],..._0x52d8ad&&{'location':_0x52d8ad}};});return{'valid':![],'errors':_0x529d3f,'warnings':[]};}function mapZodIssueToCode(_0x367e4a,_0x4140fe){const _0x428808=a156_0xe3dc,_0x452d77=_0x367e4a['code']===_0x428808(0xae)?_0x367e4a[_0x428808(0xbb)]:undefined;if(_0x4140fe==='name')return _0x428808(0xd3);if(_0x4140fe===_0x428808(0xb3)||_0x4140fe[_0x428808(0x8b)]('.type')){if(_0x367e4a[_0x428808(0xa2)]===_0x428808(0x9c)){if(_0x4140fe===_0x428808(0xb3)||_0x4140fe['match'](/\.conditions\[\d+\]\.type$/))return _0x428808(0x9f);}}if(_0x4140fe[_0x428808(0x8b)](_0x428808(0x96)))return _0x428808(0xaf);if(_0x4140fe[_0x428808(0x8b)](_0x428808(0x8a)))return _0x428808(0x9a);if(_0x452d77?.['validationCode']===_0x428808(0x8d))return'MISSING_BETWEEN_BOUNDS';if(_0x452d77?.[_0x428808(0xc2)]===_0x428808(0x9d))return'MISSING_TIME_UNIT';if(_0x4140fe['endsWith'](_0x428808(0xb5))||_0x4140fe===_0x428808(0xc9))return _0x428808(0xb9);if(_0x4140fe[_0x428808(0x99)]('arrayMatching'))return _0x428808(0xc8);if(_0x4140fe[_0x428808(0x8b)](_0x428808(0xca)))return _0x428808(0xb2);return _0x428808(0x98);}function runSemanticChecks(_0x2b70c7,_0x2e3412){const _0x380c7a=a156_0xe3dc,_0x4bb305=[];_0x2b70c7[_0x380c7a(0xc5)]&&_0x4bb305[_0x380c7a(0xcc)](...checkRule(_0x2b70c7['rule'],_0x380c7a(0xc5),_0x2e3412));const _0x4a0267=_0x4bb305[_0x380c7a(0xb1)](_0x51aa2a=>_0x51aa2a[_0x380c7a(0xac)]==='error'),_0x101464=_0x4bb305[_0x380c7a(0xb1)](_0x124c88=>_0x124c88[_0x380c7a(0xac)]===_0x380c7a(0xc6));return{'valid':_0x4a0267[_0x380c7a(0xa6)]===0x0,'errors':_0x4a0267,'warnings':_0x101464};}function a156_0x35e3(){const _0x4720d1=['.conditions[','INVALID_ARRAY_MATCHING','conditions','.segment','aggregation','push','EMPTY_ATTRIBUTE','7zEPGSf','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','description','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','MISSING_NAME','source','.operator.value','endsWith','.filter','MISSING_BETWEEN_BOUNDS','data','Attribute\x20\x27','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','message','type','And','safeParse','3071667TLhfkl','.operator.type','4YkeGyi','SEGMENT_SCHEMA_ERROR','includes','MISSING_OPERATOR_VALUE','703002XyaOoX','invalid_value','MISSING_TIME_UNIT','document','INVALID_RULE_TYPE','success','issues','code','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','symbol','EMPTY_CONDITIONS','length','path','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','9XyEMZK','error','Value','level','\x27\x20with\x20attribute\x20\x27','custom','INVALID_OPERATOR_TYPE','.source','filter','MISSING_SEGMENT_REFERENCE','rule.type','Attribute\x20name\x20cannot\x20be\x20empty','.conditions','1846yFsPqv','113947OYVBoV','.attribute','MISSING_CONDITIONS','map','params','8989790xJnUZI','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','10807376XHvyMx','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','validationCode','2607905ZrMmkm','attribute','rule','warning'];a156_0x35e3=function(){return _0x4720d1;};return a156_0x35e3();}function checkRule(_0x3bca9d,_0x38c160,_0x301569){const _0x50c002=a156_0xe3dc,_0x5953c6=[];if(_0x3bca9d[_0x50c002(0xc9)]['length']===0x0)return _0x5953c6[_0x50c002(0xcc)]({'level':_0x50c002(0xaa),'path':_0x38c160+'.conditions','code':'EMPTY_CONDITIONS','message':'Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','location':getLocationFromPath(_0x301569[_0x50c002(0x9e)],_0x301569['source'],pathToArray(_0x38c160+'.conditions'))}),_0x5953c6;return _0x5953c6[_0x50c002(0xcc)](...checkConditions(_0x3bca9d[_0x50c002(0xc9)],_0x38c160,_0x301569)),_0x5953c6;}function checkConditions(_0x3dc3f7,_0x23f8d6,_0x57c9f5){const _0xc7b627=a156_0xe3dc,_0x2bd741=[];for(let _0x3d1dd3=0x0;_0x3d1dd3<_0x3dc3f7['length'];_0x3d1dd3++){const _0xc3c426=_0x3dc3f7[_0x3d1dd3],_0x40ad95=_0x23f8d6+_0xc7b627(0xc7)+_0x3d1dd3+']';_0x2bd741[_0xc7b627(0xcc)](...checkCondition(_0xc3c426,_0x40ad95,_0x57c9f5));}return _0x2bd741;}function checkCondition(_0x4ca379,_0x44c945,_0x11195d){const _0x55c5a8=a156_0xe3dc,_0x3e5323=[];if(_0x4ca379[_0x55c5a8(0x92)]===_0x55c5a8(0x93)||_0x4ca379[_0x55c5a8(0x92)]==='Or'){if(_0x4ca379[_0x55c5a8(0xc9)][_0x55c5a8(0xa6)]===0x0)_0x3e5323[_0x55c5a8(0xcc)]({'level':_0x55c5a8(0xaa),'path':_0x44c945+'.conditions','code':_0x55c5a8(0xa5),'message':_0x4ca379[_0x55c5a8(0x92)]+_0x55c5a8(0x90),'location':getLocationFromPath(_0x11195d[_0x55c5a8(0x9e)],_0x11195d[_0x55c5a8(0x89)],pathToArray(_0x44c945+_0x55c5a8(0xb5)))});else{const _0x5a53db=_0x4ca379[_0x55c5a8(0xd1)]!==undefined;!_0x5a53db&&_0x3e5323[_0x55c5a8(0xcc)]({'level':_0x55c5a8(0xc6),'path':_0x44c945,'code':'NESTED_CONDITION_GROUP','message':_0x4ca379[_0x55c5a8(0x92)]+_0x55c5a8(0xd2)+_0x55c5a8(0xbf)+_0x55c5a8(0xa8),'location':getLocationFromPath(_0x11195d['document'],_0x11195d['source'],pathToArray(_0x44c945))}),_0x3e5323[_0x55c5a8(0xcc)](...checkConditions(_0x4ca379[_0x55c5a8(0xc9)],_0x44c945,_0x11195d));}return _0x3e5323;}if(_0x4ca379[_0x55c5a8(0x92)]===_0x55c5a8(0xab)||_0x4ca379[_0x55c5a8(0x92)]==='Behavior'){const _0x89d196=_0x4ca379,_0x27ce47=_0x89d196['source'],_0x3fcfb9=_0x89d196[_0x55c5a8(0xcb)],_0x2120a6=_0x27ce47||_0x3fcfb9;(!_0x89d196[_0x55c5a8(0xc4)]||_0x89d196[_0x55c5a8(0xc4)]==='')&&(!_0x2120a6&&_0x3e5323[_0x55c5a8(0xcc)]({'level':_0x55c5a8(0xaa),'path':_0x44c945+_0x55c5a8(0xb8),'code':_0x55c5a8(0xcd),'message':_0x55c5a8(0xb4),'location':getLocationFromPath(_0x11195d['document'],_0x11195d[_0x55c5a8(0x89)],pathToArray(_0x44c945+'.attribute'))}));_0x89d196['filter']&&_0x3e5323[_0x55c5a8(0xcc)](...checkRule(_0x89d196['filter'],_0x44c945+_0x55c5a8(0x8c),_0x11195d));if(_0x89d196[_0x55c5a8(0x89)]){const _0x4c6bf3=_0x89d196[_0x55c5a8(0xc4)]&&_0x89d196['attribute']!=='';_0x4c6bf3&&!_0x89d196['filter']&&_0x3e5323[_0x55c5a8(0xcc)]({'level':_0x55c5a8(0xaa),'path':_0x44c945+_0x55c5a8(0xb0),'code':'BEHAVIOR_SOURCE_MISSING_FILTER','message':'Behavior\x20source\x20\x27'+_0x89d196[_0x55c5a8(0x89)]+_0x55c5a8(0xad)+_0x89d196['attribute']+'\x27\x20'+_0x55c5a8(0xc1)+_0x55c5a8(0xbd)+_0x55c5a8(0xc0),'location':getLocationFromPath(_0x11195d[_0x55c5a8(0x9e)],_0x11195d['source'],pathToArray(_0x44c945+_0x55c5a8(0xb0)))}),_0x4c6bf3&&_0x89d196[_0x55c5a8(0xb1)]&&_0x3e5323[_0x55c5a8(0xcc)]({'level':_0x55c5a8(0xc6),'path':_0x44c945+'.attribute','code':_0x55c5a8(0xa3),'message':_0x55c5a8(0x8f)+_0x89d196[_0x55c5a8(0xc4)]+_0x55c5a8(0xd0)+_0x55c5a8(0xcf),'location':getLocationFromPath(_0x11195d[_0x55c5a8(0x9e)],_0x11195d[_0x55c5a8(0x89)],pathToArray(_0x44c945+_0x55c5a8(0xb8)))});}}return _0x3e5323;}
@@ -1 +1 @@
1
- (function(_0x505684,_0x14a2dc){const _0x3063fa=a157_0x3589,_0x247f57=_0x505684();while(!![]){try{const _0x58bae8=-parseInt(_0x3063fa(0x210))/0x1+-parseInt(_0x3063fa(0x1f6))/0x2*(-parseInt(_0x3063fa(0x1fc))/0x3)+parseInt(_0x3063fa(0x1e9))/0x4+parseInt(_0x3063fa(0x1db))/0x5*(-parseInt(_0x3063fa(0x1fa))/0x6)+parseInt(_0x3063fa(0x1fe))/0x7*(-parseInt(_0x3063fa(0x1eb))/0x8)+-parseInt(_0x3063fa(0x1dd))/0x9+-parseInt(_0x3063fa(0x204))/0xa*(-parseInt(_0x3063fa(0x1e5))/0xb);if(_0x58bae8===_0x14a2dc)break;else _0x247f57['push'](_0x247f57['shift']());}catch(_0x1595c9){_0x247f57['push'](_0x247f57['shift']());}}}(a157_0x34c5,0x3c901));import a157_0x3bc18d from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';function a157_0x34c5(){const _0x494c96=['match','File\x20not\x20found:\x20','55fthKDz','isFile','segmentName','no_config','624456nQqtEL','trim','11816wjkFCC','No\x20tdx.json\x20found','resolve','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','string','invalid_yaml','stat','includes','basename','parent_segment','root','106ynmUWX','exists','Not\x20a\x20YAML\x20file:\x20','type','12orjINB','context','6081hdhPKu','journey','49CcVeBe','isDirectory','file','dirname','scopedFolderPath','configDir','1259980oIMnVl','tdx.json','relative','startsWith','folderPath','replace','extname','directory','resourceType','message','no_parent','isScoped','89806UGairu','parse','489785AaOCMO','cwd','3144699kUkKaV','error','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','file_not_found','parentSegment','readFile'];a157_0x34c5=function(){return _0x494c96;};return a157_0x34c5();}export function isSuccessfulResolution(_0x5d8e8d){const _0xdf4097=a157_0x3589;return _0x5d8e8d[_0xdf4097(0x1f9)]!==_0xdf4097(0x1de);}export function isScopedResolution(_0x49a292){const _0x112e46=a157_0x3589;return _0x49a292[_0x112e46(0x1f9)]==='directory'||_0x49a292[_0x112e46(0x1f9)]==='file'||_0x49a292[_0x112e46(0x1f9)]===_0x112e46(0x1fb);}export function getScopedDetails(_0x340c5a){const _0x1a7e8a=a157_0x3589;if(isScopedResolution(_0x340c5a))return{'isScoped':_0x340c5a[_0x1a7e8a(0x20f)],'scopedFolderPath':_0x340c5a[_0x1a7e8a(0x202)]};return undefined;}async function findTdxConfigAsync(_0x5a53a4,_0x5ba808){const _0x4c4564=a157_0x3589;let _0x517580=a157_0x3bc18d[_0x4c4564(0x1ed)](_0x5a53a4);const _0x20eae5=a157_0x3bc18d['parse'](_0x517580)[_0x4c4564(0x1f5)];while(_0x517580!==_0x20eae5){const _0x3dc990=a157_0x3bc18d['join'](_0x517580,_0x4c4564(0x205));if(await _0x5ba808[_0x4c4564(0x1f7)](_0x3dc990))try{const _0x171810=await _0x5ba808['readFile'](_0x3dc990),_0x30a178=JSON[_0x4c4564(0x1da)](_0x171810);if(_0x30a178[_0x4c4564(0x1f4)]&&typeof _0x30a178[_0x4c4564(0x1f4)]===_0x4c4564(0x1ef))return{'configPath':_0x3dc990,'configDir':_0x517580,'parentSegment':_0x30a178[_0x4c4564(0x1f4)]};}catch{}_0x517580=a157_0x3bc18d[_0x4c4564(0x201)](_0x517580);}return null;}function a157_0x3589(_0x191844,_0x16ca55){_0x191844=_0x191844-0x1da;const _0x34c522=a157_0x34c5();let _0x35895b=_0x34c522[_0x191844];return _0x35895b;}function calculateScopedPath(_0x88c957,_0x1563ca){const _0x242c16=a157_0x3589,_0x46a4bf=a157_0x3bc18d[_0x242c16(0x206)](_0x1563ca,_0x88c957),_0x3c0783=_0x46a4bf!==''&&_0x46a4bf!=='.'&&!_0x46a4bf[_0x242c16(0x207)]('..');return{'isScoped':_0x3c0783,'scopedFolderPath':_0x3c0783?_0x46a4bf[_0x242c16(0x209)](/\\/g,'/'):''};}export async function resolveTarget(_0x47747d){const _0x1f3fc6=a157_0x3589,{arg:_0x310005,contextParent:_0x1c4c95,cwd:cwd=process[_0x1f3fc6(0x1dc)](),fs:fs=nodeFileSystem}=_0x47747d;if(_0x310005&&isYamlFilePath(_0x310005))try{const _0xb8bf56=await resolveYamlFilePath(_0x310005,fs),_0x1bacdd=a157_0x3bc18d[_0x1f3fc6(0x1ed)](_0x310005),_0x355ac6=a157_0x3bc18d[_0x1f3fc6(0x201)](_0x1bacdd),_0x448a8e=await findTdxConfigAsync(_0x355ac6,fs);if(!_0x448a8e){if(_0x1c4c95){const _0x38933e=a157_0x3bc18d[_0x1f3fc6(0x201)](_0x1bacdd);return{'type':'file','parentName':_0x1c4c95,'targetDir':_0x38933e,'configRoot':_0x38933e,'filePath':_0x1bacdd,'resourceName':_0xb8bf56[_0x1f3fc6(0x1e7)],'folderPath':_0xb8bf56[_0x1f3fc6(0x208)],'resourceType':_0xb8bf56[_0x1f3fc6(0x20c)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1f3fc6(0x1de),'errorCode':_0x1f3fc6(0x1e8),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x310005,'arg':_0x310005,'helpText':_0x1f3fc6(0x1df)};}const _0x4a6c0b=calculateScopedPath(_0x355ac6,_0x448a8e['configDir']);return{'type':_0x1f3fc6(0x200),'parentName':_0x448a8e[_0x1f3fc6(0x1e1)],'targetDir':_0x448a8e[_0x1f3fc6(0x203)],'configRoot':_0x448a8e['configDir'],'filePath':_0x1bacdd,'resourceName':_0xb8bf56['segmentName'],'folderPath':_0xb8bf56['folderPath'],'resourceType':_0xb8bf56[_0x1f3fc6(0x20c)],'isScoped':_0x4a6c0b[_0x1f3fc6(0x20f)],'scopedFolderPath':_0x4a6c0b['scopedFolderPath']};}catch(_0x16d9f0){const _0x3be16b=_0x16d9f0 instanceof Error?_0x16d9f0[_0x1f3fc6(0x20d)]:String(_0x16d9f0);if(_0x3be16b[_0x1f3fc6(0x1f2)]('File\x20not\x20found'))return{'type':_0x1f3fc6(0x1de),'errorCode':_0x1f3fc6(0x1e0),'message':_0x1f3fc6(0x1e4)+_0x310005,'arg':_0x310005};if(_0x3be16b['includes'](_0x1f3fc6(0x1ec))){if(_0x1c4c95){const _0x23156a=a157_0x3bc18d['resolve'](_0x310005);if(await fs[_0x1f3fc6(0x1f7)](_0x23156a)){const _0x587af5=a157_0x3bc18d[_0x1f3fc6(0x201)](_0x23156a),_0x2a4b15=await fs[_0x1f3fc6(0x1e2)](_0x23156a),_0x5324a7=_0x2a4b15[_0x1f3fc6(0x1e3)](/^name:\s*["']?([^"'\n]+)["']?/m),_0xfb3c48=_0x2a4b15[_0x1f3fc6(0x1e3)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x350b71=_0x5324a7?_0x5324a7[0x1][_0x1f3fc6(0x1ea)]():a157_0x3bc18d[_0x1f3fc6(0x1f3)](_0x310005,a157_0x3bc18d[_0x1f3fc6(0x20a)](_0x310005)),_0x39d6a2=_0xfb3c48&&_0xfb3c48[0x1]['trim']()===_0x1f3fc6(0x1fd)?_0x1f3fc6(0x1fd):'segment';return{'type':_0x1f3fc6(0x200),'parentName':_0x1c4c95,'targetDir':_0x587af5,'configRoot':_0x587af5,'filePath':_0x23156a,'resourceName':_0x350b71,'folderPath':'','resourceType':_0x39d6a2,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x1f3fc6(0x1de),'errorCode':_0x1f3fc6(0x1e8),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x310005,'arg':_0x310005,'helpText':_0x1f3fc6(0x1df)};}return{'type':'error','errorCode':_0x1f3fc6(0x1f0),'message':_0x3be16b,'arg':_0x310005};}if(_0x310005){const _0x3d65d4=a157_0x3bc18d[_0x1f3fc6(0x1ed)](cwd,_0x310005);let _0x39b540=null;try{_0x39b540=await fs[_0x1f3fc6(0x1f1)](_0x3d65d4);}catch{}if(_0x39b540?.[_0x1f3fc6(0x1ff)]()){const _0x5bf53b=await findTdxConfigAsync(_0x3d65d4,fs);if(_0x5bf53b){const _0x1457b4=calculateScopedPath(_0x3d65d4,_0x5bf53b[_0x1f3fc6(0x203)]);return{'type':_0x1f3fc6(0x20b),'parentName':_0x5bf53b['parentSegment'],'targetDir':_0x3d65d4,'configRoot':_0x5bf53b[_0x1f3fc6(0x203)],'isScoped':_0x1457b4[_0x1f3fc6(0x20f)],'scopedFolderPath':_0x1457b4[_0x1f3fc6(0x202)]};}if(_0x1c4c95)return{'type':_0x1f3fc6(0x20b),'parentName':_0x1c4c95,'targetDir':_0x3d65d4,'configRoot':_0x3d65d4,'isScoped':![],'scopedFolderPath':''};return{'type':_0x1f3fc6(0x1de),'errorCode':'no_config','message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x310005,'arg':_0x310005,'helpText':_0x1f3fc6(0x1df)};}if(_0x39b540?.[_0x1f3fc6(0x1e6)]())return{'type':_0x1f3fc6(0x1de),'errorCode':_0x1f3fc6(0x1f0),'message':_0x1f3fc6(0x1f8)+_0x310005,'arg':_0x310005,'helpText':_0x1f3fc6(0x1ee)};const _0x3ea4b9=sanitizeFileName(_0x310005),_0x34dca1=getSegmentRootDir(_0x3ea4b9,cwd);return{'type':'parent_name','parentName':_0x310005,'targetDir':_0x34dca1,'configRoot':_0x34dca1};}const _0xa96d20=await findTdxConfigAsync(cwd,fs);if(_0xa96d20){const _0xee8d2e=calculateScopedPath(cwd,_0xa96d20[_0x1f3fc6(0x203)]);return{'type':'context','parentName':_0xa96d20[_0x1f3fc6(0x1e1)],'targetDir':cwd,'configRoot':_0xa96d20['configDir'],'isScoped':_0xee8d2e[_0x1f3fc6(0x20f)],'scopedFolderPath':_0xee8d2e['scopedFolderPath']};}if(_0x1c4c95){const _0x500e1b=sanitizeFileName(_0x1c4c95),_0x2959db=getSegmentRootDir(_0x500e1b,cwd);return{'type':_0x1f3fc6(0x1fb),'parentName':_0x1c4c95,'targetDir':_0x2959db,'configRoot':_0x2959db,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1f3fc6(0x1de),'errorCode':_0x1f3fc6(0x20e),'message':'Parent\x20segment\x20not\x20specified','helpText':'Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure'};}
1
+ (function(_0x197582,_0x456541){const _0x31650c=a157_0x3311,_0x15a1e2=_0x197582();while(!![]){try{const _0x155d54=parseInt(_0x31650c(0x15b))/0x1*(-parseInt(_0x31650c(0x148))/0x2)+-parseInt(_0x31650c(0x163))/0x3+parseInt(_0x31650c(0x139))/0x4*(-parseInt(_0x31650c(0x144))/0x5)+parseInt(_0x31650c(0x13c))/0x6+-parseInt(_0x31650c(0x146))/0x7*(-parseInt(_0x31650c(0x167))/0x8)+parseInt(_0x31650c(0x14d))/0x9*(-parseInt(_0x31650c(0x149))/0xa)+-parseInt(_0x31650c(0x153))/0xb*(-parseInt(_0x31650c(0x164))/0xc);if(_0x155d54===_0x456541)break;else _0x15a1e2['push'](_0x15a1e2['shift']());}catch(_0x18d360){_0x15a1e2['push'](_0x15a1e2['shift']());}}}(a157_0x45ca,0xa3816));import a157_0x5ef955 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x43b036){const _0x1bc68c=a157_0x3311;return _0x43b036['type']!==_0x1bc68c(0x156);}export function isScopedResolution(_0x21c150){const _0x3b06b1=a157_0x3311;return _0x21c150[_0x3b06b1(0x152)]===_0x3b06b1(0x157)||_0x21c150[_0x3b06b1(0x152)]==='file'||_0x21c150[_0x3b06b1(0x152)]===_0x3b06b1(0x14b);}export function getScopedDetails(_0x559a4a){const _0x164a19=a157_0x3311;if(isScopedResolution(_0x559a4a))return{'isScoped':_0x559a4a[_0x164a19(0x154)],'scopedFolderPath':_0x559a4a[_0x164a19(0x140)]};return undefined;}async function findTdxConfigAsync(_0x28da4d,_0xb3bbaf){const _0x3eccff=a157_0x3311;let _0x3b19b3=a157_0x5ef955['resolve'](_0x28da4d);const _0xab7431=a157_0x5ef955[_0x3eccff(0x15d)](_0x3b19b3)[_0x3eccff(0x158)];while(_0x3b19b3!==_0xab7431){const _0x2a2dfc=a157_0x5ef955['join'](_0x3b19b3,_0x3eccff(0x15a));if(await _0xb3bbaf[_0x3eccff(0x155)](_0x2a2dfc))try{const _0x29c2a3=await _0xb3bbaf['readFile'](_0x2a2dfc),_0x45b86a=JSON[_0x3eccff(0x15d)](_0x29c2a3);if(_0x45b86a[_0x3eccff(0x15f)]&&typeof _0x45b86a[_0x3eccff(0x15f)]==='string')return{'configPath':_0x2a2dfc,'configDir':_0x3b19b3,'parentSegment':_0x45b86a[_0x3eccff(0x15f)]};}catch{}_0x3b19b3=a157_0x5ef955[_0x3eccff(0x142)](_0x3b19b3);}return null;}function calculateScopedPath(_0x3f2c75,_0x172395){const _0xa727e6=a157_0x3311,_0x196e1b=a157_0x5ef955[_0xa727e6(0x170)](_0x172395,_0x3f2c75),_0x2fec34=_0x196e1b!==''&&_0x196e1b!=='.'&&!_0x196e1b[_0xa727e6(0x169)]('..');return{'isScoped':_0x2fec34,'scopedFolderPath':_0x2fec34?_0x196e1b[_0xa727e6(0x14a)](/\\/g,'/'):''};}function a157_0x45ca(){const _0x137c6d=['4ssVmNf','no_config','File\x20not\x20found:\x20','6655944buhNky','No\x20tdx.json\x20found\x20for\x20file:\x20','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','File\x20not\x20found','scopedFolderPath','cwd','dirname','resolve','1733285eCrrFJ','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','7UhZLth','parentSegment','221582dZnFYH','3259170NOxoZL','replace','context','Parent\x20segment\x20not\x20specified','27PNsfiK','includes','file','configDir','segmentName','type','16309777MuDrIv','isScoped','exists','error','directory','root','isFile','tdx.json','1ftHxKP','parent_name','parse','stat','parent_segment','journey','basename','isDirectory','3327813stnTXJ','12yzGoWz','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','no_parent','4977256fEFyLV','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','startsWith','resourceType','folderPath','invalid_yaml','segment','match','file_not_found','relative','No\x20tdx.json\x20found','Not\x20a\x20YAML\x20file:\x20','message'];a157_0x45ca=function(){return _0x137c6d;};return a157_0x45ca();}function a157_0x3311(_0x3af779,_0x335c67){_0x3af779=_0x3af779-0x139;const _0x45caea=a157_0x45ca();let _0x33119d=_0x45caea[_0x3af779];return _0x33119d;}export async function resolveTarget(_0x22bf79){const _0x598fde=a157_0x3311,{arg:_0x175f6c,contextParent:_0x3392cb,cwd:cwd=process[_0x598fde(0x141)](),fs:fs=nodeFileSystem}=_0x22bf79;if(_0x175f6c&&isYamlFilePath(_0x175f6c))try{const _0x2e59f5=await resolveYamlFilePath(_0x175f6c,fs),_0x258d2d=a157_0x5ef955[_0x598fde(0x143)](_0x175f6c),_0x59fd79=a157_0x5ef955['dirname'](_0x258d2d),_0x5f01f2=await findTdxConfigAsync(_0x59fd79,fs);if(!_0x5f01f2){if(_0x3392cb){const _0x429728=a157_0x5ef955[_0x598fde(0x142)](_0x258d2d);return{'type':_0x598fde(0x14f),'parentName':_0x3392cb,'targetDir':_0x429728,'configRoot':_0x429728,'filePath':_0x258d2d,'resourceName':_0x2e59f5[_0x598fde(0x151)],'folderPath':_0x2e59f5[_0x598fde(0x16b)],'resourceType':_0x2e59f5[_0x598fde(0x16a)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x598fde(0x156),'errorCode':_0x598fde(0x13a),'message':_0x598fde(0x13d)+_0x175f6c,'arg':_0x175f6c,'helpText':_0x598fde(0x168)};}const _0x17e1fc=calculateScopedPath(_0x59fd79,_0x5f01f2[_0x598fde(0x150)]);return{'type':_0x598fde(0x14f),'parentName':_0x5f01f2['parentSegment'],'targetDir':_0x5f01f2[_0x598fde(0x150)],'configRoot':_0x5f01f2['configDir'],'filePath':_0x258d2d,'resourceName':_0x2e59f5[_0x598fde(0x151)],'folderPath':_0x2e59f5[_0x598fde(0x16b)],'resourceType':_0x2e59f5[_0x598fde(0x16a)],'isScoped':_0x17e1fc[_0x598fde(0x154)],'scopedFolderPath':_0x17e1fc[_0x598fde(0x140)]};}catch(_0x5aa2e4){const _0x320563=_0x5aa2e4 instanceof Error?_0x5aa2e4[_0x598fde(0x173)]:String(_0x5aa2e4);if(_0x320563['includes'](_0x598fde(0x13f)))return{'type':_0x598fde(0x156),'errorCode':_0x598fde(0x16f),'message':_0x598fde(0x13b)+_0x175f6c,'arg':_0x175f6c};if(_0x320563[_0x598fde(0x14e)](_0x598fde(0x171))){if(_0x3392cb){const _0x5786aa=a157_0x5ef955[_0x598fde(0x143)](_0x175f6c);if(await fs[_0x598fde(0x155)](_0x5786aa)){const _0x2c15ce=a157_0x5ef955[_0x598fde(0x142)](_0x5786aa),_0x5852b8=await fs['readFile'](_0x5786aa),_0x1ce937=_0x5852b8[_0x598fde(0x16e)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x1fd0b4=_0x5852b8[_0x598fde(0x16e)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x485be0=_0x1ce937?_0x1ce937[0x1]['trim']():a157_0x5ef955[_0x598fde(0x161)](_0x175f6c,a157_0x5ef955['extname'](_0x175f6c)),_0x313f5c=_0x1fd0b4&&_0x1fd0b4[0x1]['trim']()===_0x598fde(0x160)?'journey':_0x598fde(0x16d);return{'type':_0x598fde(0x14f),'parentName':_0x3392cb,'targetDir':_0x2c15ce,'configRoot':_0x2c15ce,'filePath':_0x5786aa,'resourceName':_0x485be0,'folderPath':'','resourceType':_0x313f5c,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x598fde(0x156),'errorCode':_0x598fde(0x13a),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x175f6c,'arg':_0x175f6c,'helpText':_0x598fde(0x168)};}return{'type':'error','errorCode':'invalid_yaml','message':_0x320563,'arg':_0x175f6c};}if(_0x175f6c){const _0x3a2502=a157_0x5ef955[_0x598fde(0x143)](cwd,_0x175f6c);let _0x3c5395=null;try{_0x3c5395=await fs[_0x598fde(0x15e)](_0x3a2502);}catch{}if(_0x3c5395?.[_0x598fde(0x162)]()){const _0x15f898=await findTdxConfigAsync(_0x3a2502,fs);if(_0x15f898){const _0x46a605=calculateScopedPath(_0x3a2502,_0x15f898['configDir']);return{'type':'directory','parentName':_0x15f898[_0x598fde(0x147)],'targetDir':_0x3a2502,'configRoot':_0x15f898[_0x598fde(0x150)],'isScoped':_0x46a605[_0x598fde(0x154)],'scopedFolderPath':_0x46a605[_0x598fde(0x140)]};}if(_0x3392cb)return{'type':_0x598fde(0x157),'parentName':_0x3392cb,'targetDir':_0x3a2502,'configRoot':_0x3a2502,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x598fde(0x13a),'message':_0x598fde(0x13e)+_0x175f6c,'arg':_0x175f6c,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}if(_0x3c5395?.[_0x598fde(0x159)]())return{'type':_0x598fde(0x156),'errorCode':_0x598fde(0x16c),'message':_0x598fde(0x172)+_0x175f6c,'arg':_0x175f6c,'helpText':_0x598fde(0x165)};const _0x5e6d99=sanitizeFileName(_0x175f6c),_0xd1feb3=getSegmentRootDir(_0x5e6d99,cwd);return{'type':_0x598fde(0x15c),'parentName':_0x175f6c,'targetDir':_0xd1feb3,'configRoot':_0xd1feb3};}const _0xfaabef=await findTdxConfigAsync(cwd,fs);if(_0xfaabef){const _0x1cb5ec=calculateScopedPath(cwd,_0xfaabef[_0x598fde(0x150)]);return{'type':_0x598fde(0x14b),'parentName':_0xfaabef['parentSegment'],'targetDir':cwd,'configRoot':_0xfaabef[_0x598fde(0x150)],'isScoped':_0x1cb5ec[_0x598fde(0x154)],'scopedFolderPath':_0x1cb5ec[_0x598fde(0x140)]};}if(_0x3392cb){const _0x4c4e9e=sanitizeFileName(_0x3392cb),_0x420a7d=getSegmentRootDir(_0x4c4e9e,cwd);return{'type':_0x598fde(0x14b),'parentName':_0x3392cb,'targetDir':_0x420a7d,'configRoot':_0x420a7d,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x598fde(0x156),'errorCode':_0x598fde(0x166),'message':_0x598fde(0x14c),'helpText':_0x598fde(0x145)};}
@@ -1 +1 @@
1
- const a158_0x5e4251=a158_0x4a49;(function(_0xab051f,_0x58c12a){const _0x44c2e5=a158_0x4a49,_0x89c527=_0xab051f();while(!![]){try{const _0x4a7552=-parseInt(_0x44c2e5(0x76))/0x1+-parseInt(_0x44c2e5(0x72))/0x2*(parseInt(_0x44c2e5(0x82))/0x3)+parseInt(_0x44c2e5(0x80))/0x4+-parseInt(_0x44c2e5(0x87))/0x5*(parseInt(_0x44c2e5(0x6d))/0x6)+parseInt(_0x44c2e5(0x73))/0x7+-parseInt(_0x44c2e5(0x78))/0x8+-parseInt(_0x44c2e5(0x7b))/0x9*(-parseInt(_0x44c2e5(0x71))/0xa);if(_0x4a7552===_0x58c12a)break;else _0x89c527['push'](_0x89c527['shift']());}catch(_0x455e29){_0x89c527['push'](_0x89c527['shift']());}}}(a158_0x4672,0xc2bf1));import{existsSync,readFileSync}from'fs';import a158_0x1aa4ee from'path';const TDX_CONFIG_FILE=a158_0x5e4251(0x7c),SEGMENTS_DIR=a158_0x5e4251(0x7f);export function findTdxConfigPath(_0x5b4b54=process[a158_0x5e4251(0x79)]()){const _0x1cb82d=a158_0x5e4251;let _0x299adf=a158_0x1aa4ee['resolve'](_0x5b4b54);const _0x4a878b=a158_0x1aa4ee[_0x1cb82d(0x86)](_0x299adf)[_0x1cb82d(0x77)];while(_0x299adf!==_0x4a878b){const _0x47d18c=a158_0x1aa4ee['join'](_0x299adf,TDX_CONFIG_FILE);if(existsSync(_0x47d18c))return _0x47d18c;_0x299adf=a158_0x1aa4ee[_0x1cb82d(0x74)](_0x299adf);}return null;}export function loadTdxConfig(_0x40980f){const _0x1fa7b7=a158_0x5e4251,_0x2d837f=readFileSync(_0x40980f,_0x1fa7b7(0x7d));let _0x5425ab;try{_0x5425ab=JSON[_0x1fa7b7(0x86)](_0x2d837f);}catch{throw new Error(_0x1fa7b7(0x75)+_0x40980f);}if(!_0x5425ab||typeof _0x5425ab!=='object')throw new Error(_0x1fa7b7(0x85));const _0x2995eb=_0x5425ab,_0x1832e4=_0x2995eb['parent_segment']&&typeof _0x2995eb[_0x1fa7b7(0x7a)]===_0x1fa7b7(0x6e),_0x3287e2=_0x2995eb['engage_workspace']&&typeof _0x2995eb['engage_workspace']===_0x1fa7b7(0x6e);if(!_0x1832e4&&!_0x3287e2)throw new Error(_0x1fa7b7(0x84));const _0x330c28={};return _0x1832e4&&(_0x330c28['parent_segment']=_0x2995eb[_0x1fa7b7(0x7a)]),_0x3287e2&&(_0x330c28[_0x1fa7b7(0x81)]=_0x2995eb[_0x1fa7b7(0x81)]),_0x330c28;}export function findTdxConfig(_0x8b0548=process[a158_0x5e4251(0x79)]()){const _0x4a930e=findTdxConfigPath(_0x8b0548);if(!_0x4a930e)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x3d5761=loadTdxConfig(_0x4a930e),_0x4dd8a6=a158_0x1aa4ee['dirname'](_0x4a930e);return{'config':_0x3d5761,'configPath':_0x4a930e,'configDir':_0x4dd8a6};}export function tryFindTdxConfig(_0x4e053b){try{return findTdxConfig(_0x4e053b);}catch{return null;}}function a158_0x4672(){const _0x3020df=['161544TPdtLE','string','stringify','join','3320SJCSiN','2DZrinc','4285806ikENzT','dirname','Invalid\x20JSON\x20in\x20','1584503KVmJfS','root','9822576JRBLCr','cwd','parent_segment','117918IUTWtq','tdx.json','utf-8','replace','segments','308536JFGPhC','engage_workspace','2510766EVMjJE','startsWith','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','Invalid\x20tdx.json:\x20expected\x20object','parse','110oIrgfi'];a158_0x4672=function(){return _0x3020df;};return a158_0x4672();}export function getSegmentRootDir(_0x4dbbc8,_0x4b6257=process[a158_0x5e4251(0x79)]()){const _0x144ada=a158_0x5e4251;return a158_0x1aa4ee[_0x144ada(0x70)](_0x4b6257,SEGMENTS_DIR,_0x4dbbc8);}export function getTdxConfigPath(_0x34f6f8,_0x3fe21e=process[a158_0x5e4251(0x79)]()){const _0x46fd9c=a158_0x5e4251;return a158_0x1aa4ee[_0x46fd9c(0x70)](getSegmentRootDir(_0x34f6f8,_0x3fe21e),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x5124f3,_0xebb8a0){const _0x5e6a62=a158_0x5e4251,_0x5352e2=a158_0x1aa4ee['resolve'](_0x5124f3),_0x123eac=a158_0x1aa4ee['relative'](_0xebb8a0,_0x5352e2);if(_0x123eac[_0x5e6a62(0x83)]('..'))return'';return _0x123eac;}function a158_0x4a49(_0x2e7711,_0xe44253){_0x2e7711=_0x2e7711-0x6d;const _0x4672aa=a158_0x4672();let _0x4a4911=_0x4672aa[_0x2e7711];return _0x4a4911;}export function localPathToTdFolderPath(_0xdb2559){const _0x58fbe3=a158_0x5e4251,_0x300e0f=a158_0x1aa4ee[_0x58fbe3(0x74)](_0xdb2559);if(_0x300e0f==='.'||_0x300e0f==='')return'';return _0x300e0f[_0x58fbe3(0x7e)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x5eba82,_0x21cffd){const _0x47af17=a158_0x5e4251;if(!_0x5eba82)return _0x21cffd;return a158_0x1aa4ee[_0x47af17(0x70)](_0x21cffd,_0x5eba82);}export function createTdxConfigContent(_0x347f93){const _0x6eb8d6={'parent_segment':_0x347f93};return JSON['stringify'](_0x6eb8d6,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x73ba2b){const _0x246676=a158_0x5e4251,_0x5e92e1={'engage_workspace':_0x73ba2b};return JSON[_0x246676(0x6f)](_0x5e92e1,null,0x2)+'\x0a';}
1
+ const a158_0x12ee0f=a158_0x2154;(function(_0x59630d,_0x23e914){const _0x1711b9=a158_0x2154,_0x31e391=_0x59630d();while(!![]){try{const _0x597889=-parseInt(_0x1711b9(0xfe))/0x1+parseInt(_0x1711b9(0xf5))/0x2*(-parseInt(_0x1711b9(0xf1))/0x3)+parseInt(_0x1711b9(0xfc))/0x4*(-parseInt(_0x1711b9(0xe4))/0x5)+parseInt(_0x1711b9(0xec))/0x6+parseInt(_0x1711b9(0xfb))/0x7*(-parseInt(_0x1711b9(0xe9))/0x8)+parseInt(_0x1711b9(0xee))/0x9+-parseInt(_0x1711b9(0xe5))/0xa*(-parseInt(_0x1711b9(0xe6))/0xb);if(_0x597889===_0x23e914)break;else _0x31e391['push'](_0x31e391['shift']());}catch(_0x1f58db){_0x31e391['push'](_0x31e391['shift']());}}}(a158_0x1361,0x8c3f0));import{existsSync,readFileSync}from'fs';import a158_0x13c10a from'path';function a158_0x1361(){const _0x1166d8=['Invalid\x20JSON\x20in\x20','startsWith','9459NKoQop','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','utf-8','root','614doOQeq','replace','stringify','engage_workspace','parent_segment','tdx.json','830221PoSwFJ','128kWAMVs','dirname','1796hpOqTb','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','142465dQmYqd','10VYxHQI','19249065qzmYwq','parse','segments','56jeqrmV','join','resolve','4165128QmlCJI','string','7578981JNmvPi'];a158_0x1361=function(){return _0x1166d8;};return a158_0x1361();}function a158_0x2154(_0x126b04,_0x43cc3e){_0x126b04=_0x126b04-0xe3;const _0x1361f7=a158_0x1361();let _0x215447=_0x1361f7[_0x126b04];return _0x215447;}const TDX_CONFIG_FILE=a158_0x12ee0f(0xfa),SEGMENTS_DIR=a158_0x12ee0f(0xe8);export function findTdxConfigPath(_0x2c0676=process['cwd']()){const _0x2f20c6=a158_0x12ee0f;let _0x35b637=a158_0x13c10a[_0x2f20c6(0xeb)](_0x2c0676);const _0x3318bb=a158_0x13c10a[_0x2f20c6(0xe7)](_0x35b637)[_0x2f20c6(0xf4)];while(_0x35b637!==_0x3318bb){const _0x13b2c5=a158_0x13c10a[_0x2f20c6(0xea)](_0x35b637,TDX_CONFIG_FILE);if(existsSync(_0x13b2c5))return _0x13b2c5;_0x35b637=a158_0x13c10a[_0x2f20c6(0xfd)](_0x35b637);}return null;}export function loadTdxConfig(_0xe13d9d){const _0x3171b4=a158_0x12ee0f,_0x19799b=readFileSync(_0xe13d9d,_0x3171b4(0xf3));let _0x49b0c5;try{_0x49b0c5=JSON[_0x3171b4(0xe7)](_0x19799b);}catch{throw new Error(_0x3171b4(0xef)+_0xe13d9d);}if(!_0x49b0c5||typeof _0x49b0c5!=='object')throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x18ad57=_0x49b0c5,_0x462542=_0x18ad57[_0x3171b4(0xf9)]&&typeof _0x18ad57[_0x3171b4(0xf9)]===_0x3171b4(0xed),_0x3f09c2=_0x18ad57[_0x3171b4(0xf8)]&&typeof _0x18ad57[_0x3171b4(0xf8)]===_0x3171b4(0xed);if(!_0x462542&&!_0x3f09c2)throw new Error(_0x3171b4(0xf2));const _0x49590f={};return _0x462542&&(_0x49590f['parent_segment']=_0x18ad57[_0x3171b4(0xf9)]),_0x3f09c2&&(_0x49590f['engage_workspace']=_0x18ad57['engage_workspace']),_0x49590f;}export function findTdxConfig(_0x130082=process['cwd']()){const _0xa10b5e=a158_0x12ee0f,_0x1ff2b3=findTdxConfigPath(_0x130082);if(!_0x1ff2b3)throw new Error(_0xa10b5e(0xe3));const _0x502623=loadTdxConfig(_0x1ff2b3),_0x5e34a2=a158_0x13c10a[_0xa10b5e(0xfd)](_0x1ff2b3);return{'config':_0x502623,'configPath':_0x1ff2b3,'configDir':_0x5e34a2};}export function tryFindTdxConfig(_0x4f954d){try{return findTdxConfig(_0x4f954d);}catch{return null;}}export function getSegmentRootDir(_0x3a93dd,_0x2f30a9=process['cwd']()){return a158_0x13c10a['join'](_0x2f30a9,SEGMENTS_DIR,_0x3a93dd);}export function getTdxConfigPath(_0x57422d,_0x546556=process['cwd']()){const _0x1e61bc=a158_0x12ee0f;return a158_0x13c10a[_0x1e61bc(0xea)](getSegmentRootDir(_0x57422d,_0x546556),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x14b70a,_0x327b50){const _0x58e9b6=a158_0x12ee0f,_0x1678b7=a158_0x13c10a[_0x58e9b6(0xeb)](_0x14b70a),_0x4c9fbb=a158_0x13c10a['relative'](_0x327b50,_0x1678b7);if(_0x4c9fbb[_0x58e9b6(0xf0)]('..'))return'';return _0x4c9fbb;}export function localPathToTdFolderPath(_0x45a620){const _0x21142b=a158_0x12ee0f,_0x315988=a158_0x13c10a[_0x21142b(0xfd)](_0x45a620);if(_0x315988==='.'||_0x315988==='')return'';return _0x315988[_0x21142b(0xf6)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x34eb6f,_0x270ccc){const _0x148a16=a158_0x12ee0f;if(!_0x34eb6f)return _0x270ccc;return a158_0x13c10a[_0x148a16(0xea)](_0x270ccc,_0x34eb6f);}export function createTdxConfigContent(_0x10d711){const _0x569a8e={'parent_segment':_0x10d711};return JSON['stringify'](_0x569a8e,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x49b887){const _0x456543=a158_0x12ee0f,_0x3cf4fc={'engage_workspace':_0x49b887};return JSON[_0x456543(0xf7)](_0x3cf4fc,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a159_0x433006=a159_0x152a;(function(_0x13b80a,_0x5a85ce){const _0x1fe588=a159_0x152a,_0x3e53d7=_0x13b80a();while(!![]){try{const _0x358b23=parseInt(_0x1fe588(0x172))/0x1+-parseInt(_0x1fe588(0x178))/0x2*(parseInt(_0x1fe588(0x187))/0x3)+parseInt(_0x1fe588(0x180))/0x4*(parseInt(_0x1fe588(0x18d))/0x5)+parseInt(_0x1fe588(0x16a))/0x6+-parseInt(_0x1fe588(0x18a))/0x7*(-parseInt(_0x1fe588(0x185))/0x8)+-parseInt(_0x1fe588(0x18e))/0x9*(-parseInt(_0x1fe588(0x184))/0xa)+-parseInt(_0x1fe588(0x16f))/0xb;if(_0x358b23===_0x5a85ce)break;else _0x3e53d7['push'](_0x3e53d7['shift']());}catch(_0x5b7235){_0x3e53d7['push'](_0x3e53d7['shift']());}}}(a159_0x25ed,0x2feac));import{z}from'zod';export const ScheduleTypeSchema=z['enum']([a159_0x433006(0x181),a159_0x433006(0x175),'daily','weekly',a159_0x433006(0x17c),a159_0x433006(0x17d),'minutes_interval']);export const RepeatUnitSchema=z['enum']([a159_0x433006(0x179),'hour',a159_0x433006(0x16b),a159_0x433006(0x171),'month','once',a159_0x433006(0x181)]);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x433006(0x186)](),'repeat_unit':RepeatUnitSchema[a159_0x433006(0x186)](),'repeat_frequency':z['number']()[a159_0x433006(0x186)](),'repeat_sub_frequency':z[a159_0x433006(0x16e)](z[a159_0x433006(0x18c)]())[a159_0x433006(0x186)](),'start_at':z[a159_0x433006(0x188)]()[a159_0x433006(0x174)]()['optional'](),'end_on':z[a159_0x433006(0x188)]()[a159_0x433006(0x174)]()[a159_0x433006(0x186)](),'timezone':z['string']()[a159_0x433006(0x186)]()});export const NotificationDefSchema=z[a159_0x433006(0x18f)]({'notify_on':z['array'](z[a159_0x433006(0x173)]([a159_0x433006(0x17a),a159_0x433006(0x170)]))[a159_0x433006(0x186)](),'email_recipients':z[a159_0x433006(0x16e)](z[a159_0x433006(0x188)]())[a159_0x433006(0x186)]()});function a159_0x152a(_0x5bceb1,_0x2479d5){_0x5bceb1=_0x5bceb1-0x16a;const _0x25edb3=a159_0x25ed();let _0x152a59=_0x25edb3[_0x5bceb1];return _0x152a59;}export const ActivationColumnDefSchema=z['union']([z['string'](),z[a159_0x433006(0x18f)]({'name':z['string'](),'type':z[a159_0x433006(0x188)]()[a159_0x433006(0x186)](),'visibility':z[a159_0x433006(0x173)](['clear',a159_0x433006(0x183)])[a159_0x433006(0x186)]()})]);function a159_0x25ed(){const _0x9547c5=['day','Last','min','array','9374948tQZmwV','onFailure','week','290338DJyPJY','enum','nullable','hourly','unknown','All','390zkDdmB','minute','onSuccess','record','monthly','cron','First','asc','13292qxLjFu','none','boolean','masked','3490AHzbnN','764936BENnpa','optional','5913pMqyDe','string','rows','28eKNIFO','clear','number','525xsdDFW','2799FnNRNB','object','1815726jtFbrw'];a159_0x25ed=function(){return _0x9547c5;};return a159_0x25ed();}export const ActivationBehaviorDefSchema=z[a159_0x433006(0x18f)]({'columns':z[a159_0x433006(0x16e)](z[a159_0x433006(0x18f)]({'name':z[a159_0x433006(0x188)](),'type':z['string']()[a159_0x433006(0x186)](),'visibility':z[a159_0x433006(0x173)]([a159_0x433006(0x18b),a159_0x433006(0x183)])['optional']()}))['optional'](),'behavior_table':z[a159_0x433006(0x188)]()[a159_0x433006(0x186)](),'join_row':z[a159_0x433006(0x18c)]()[a159_0x433006(0x174)]()[a159_0x433006(0x186)](),'join_strategy':z[a159_0x433006(0x173)]([a159_0x433006(0x177),a159_0x433006(0x17e),a159_0x433006(0x16c),'Top-N'])[a159_0x433006(0x186)](),'formatting':z[a159_0x433006(0x173)]([a159_0x433006(0x189),'cols'])['optional'](),'order_by':z[a159_0x433006(0x16e)](z['object']({'key':z['string'](),'order':z[a159_0x433006(0x173)]([a159_0x433006(0x17f),'desc'])}))[a159_0x433006(0x186)]()});export const ActivationDefSchema=z['object']({'name':z[a159_0x433006(0x188)]()[a159_0x433006(0x16d)](0x1,'Activation\x20name\x20is\x20required'),'description':z[a159_0x433006(0x188)]()[a159_0x433006(0x186)](),'connection':z[a159_0x433006(0x188)]()[a159_0x433006(0x16d)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z[a159_0x433006(0x182)]()[a159_0x433006(0x186)](),'columns':z[a159_0x433006(0x16e)](ActivationColumnDefSchema)[a159_0x433006(0x186)](),'schedule':ScheduleDefSchema[a159_0x433006(0x186)](),'notification':NotificationDefSchema[a159_0x433006(0x186)](),'connector_config':z[a159_0x433006(0x17b)](z['string'](),z[a159_0x433006(0x176)]())[a159_0x433006(0x186)](),'activation_template_id':z[a159_0x433006(0x188)]()[a159_0x433006(0x174)]()[a159_0x433006(0x186)](),'behavior':ActivationBehaviorDefSchema[a159_0x433006(0x174)]()[a159_0x433006(0x186)](),'run_after_journey_refresh':z[a159_0x433006(0x182)]()[a159_0x433006(0x186)](),'nested_workflow_project_name':z[a159_0x433006(0x188)]()['optional'](),'nested_workflow_name':z[a159_0x433006(0x188)]()['optional'](),'lock_enabled':z[a159_0x433006(0x182)]()[a159_0x433006(0x186)]()});
1
+ const a159_0x597e46=a159_0x49a8;(function(_0x57922b,_0x4cc246){const _0x53ed18=a159_0x49a8,_0x1b5b91=_0x57922b();while(!![]){try{const _0xacfacb=parseInt(_0x53ed18(0x171))/0x1+parseInt(_0x53ed18(0x177))/0x2+-parseInt(_0x53ed18(0x183))/0x3*(-parseInt(_0x53ed18(0x163))/0x4)+-parseInt(_0x53ed18(0x178))/0x5+parseInt(_0x53ed18(0x16c))/0x6*(-parseInt(_0x53ed18(0x168))/0x7)+-parseInt(_0x53ed18(0x176))/0x8+parseInt(_0x53ed18(0x184))/0x9;if(_0xacfacb===_0x4cc246)break;else _0x1b5b91['push'](_0x1b5b91['shift']());}catch(_0x4f1e29){_0x1b5b91['push'](_0x1b5b91['shift']());}}}(a159_0x50c8,0xa53ee));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x597e46(0x17e)]([a159_0x597e46(0x188),a159_0x597e46(0x161),a159_0x597e46(0x162),'weekly',a159_0x597e46(0x174),'cron','minutes_interval']);function a159_0x49a8(_0x362f54,_0x51729f){_0x362f54=_0x362f54-0x161;const _0x50c858=a159_0x50c8();let _0x49a881=_0x50c858[_0x362f54];return _0x49a881;}export const RepeatUnitSchema=z[a159_0x597e46(0x17e)]([a159_0x597e46(0x16a),a159_0x597e46(0x17c),a159_0x597e46(0x173),a159_0x597e46(0x187),a159_0x597e46(0x172),a159_0x597e46(0x16b),a159_0x597e46(0x188)]);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x597e46(0x181)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a159_0x597e46(0x164)]()[a159_0x597e46(0x181)](),'repeat_sub_frequency':z['array'](z['number']())['optional'](),'start_at':z['string']()[a159_0x597e46(0x17f)]()[a159_0x597e46(0x181)](),'end_on':z['string']()[a159_0x597e46(0x17f)]()[a159_0x597e46(0x181)](),'timezone':z['string']()[a159_0x597e46(0x181)]()});export const NotificationDefSchema=z[a159_0x597e46(0x17d)]({'notify_on':z[a159_0x597e46(0x167)](z[a159_0x597e46(0x17e)]([a159_0x597e46(0x169),a159_0x597e46(0x180)]))[a159_0x597e46(0x181)](),'email_recipients':z['array'](z['string']())[a159_0x597e46(0x181)]()});export const ActivationColumnDefSchema=z['union']([z[a159_0x597e46(0x165)](),z[a159_0x597e46(0x17d)]({'name':z[a159_0x597e46(0x165)](),'type':z[a159_0x597e46(0x165)]()[a159_0x597e46(0x181)](),'visibility':z['enum'](['clear',a159_0x597e46(0x170)])[a159_0x597e46(0x181)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x597e46(0x17d)]({'columns':z[a159_0x597e46(0x167)](z['object']({'name':z[a159_0x597e46(0x165)](),'type':z['string']()['optional'](),'visibility':z[a159_0x597e46(0x17e)](['clear',a159_0x597e46(0x170)])[a159_0x597e46(0x181)]()}))[a159_0x597e46(0x181)](),'behavior_table':z[a159_0x597e46(0x165)]()[a159_0x597e46(0x181)](),'join_row':z[a159_0x597e46(0x164)]()[a159_0x597e46(0x17f)]()[a159_0x597e46(0x181)](),'join_strategy':z[a159_0x597e46(0x17e)](['All',a159_0x597e46(0x182),a159_0x597e46(0x186),a159_0x597e46(0x179)])[a159_0x597e46(0x181)](),'formatting':z[a159_0x597e46(0x17e)]([a159_0x597e46(0x17b),a159_0x597e46(0x185)])[a159_0x597e46(0x181)](),'order_by':z[a159_0x597e46(0x167)](z[a159_0x597e46(0x17d)]({'key':z[a159_0x597e46(0x165)](),'order':z[a159_0x597e46(0x17e)]([a159_0x597e46(0x17a),a159_0x597e46(0x166)])}))['optional']()});export const ActivationDefSchema=z[a159_0x597e46(0x17d)]({'name':z[a159_0x597e46(0x165)]()[a159_0x597e46(0x16d)](0x1,a159_0x597e46(0x175)),'description':z[a159_0x597e46(0x165)]()[a159_0x597e46(0x181)](),'connection':z[a159_0x597e46(0x165)]()[a159_0x597e46(0x16d)](0x1,a159_0x597e46(0x16e)),'all_columns':z['boolean']()['optional'](),'columns':z['array'](ActivationColumnDefSchema)[a159_0x597e46(0x181)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a159_0x597e46(0x181)](),'connector_config':z['record'](z[a159_0x597e46(0x165)](),z['unknown']())[a159_0x597e46(0x181)](),'activation_template_id':z[a159_0x597e46(0x165)]()['nullable']()['optional'](),'behavior':ActivationBehaviorDefSchema[a159_0x597e46(0x17f)]()[a159_0x597e46(0x181)](),'run_after_journey_refresh':z[a159_0x597e46(0x16f)]()[a159_0x597e46(0x181)](),'nested_workflow_project_name':z['string']()[a159_0x597e46(0x181)](),'nested_workflow_name':z[a159_0x597e46(0x165)]()['optional'](),'lock_enabled':z['boolean']()[a159_0x597e46(0x181)]()});function a159_0x50c8(){const _0x920df4=['119819axAifa','onSuccess','minute','once','414aLvTbn','min','Connection\x20name\x20is\x20required','boolean','masked','54820JHssCO','month','day','monthly','Activation\x20name\x20is\x20required','9828552SBejbC','2378648xyXwFY','6393210lYLjIi','Top-N','asc','rows','hour','object','enum','nullable','onFailure','optional','First','1911haJYPI','18405837iFyGZp','cols','Last','week','none','hourly','daily','6756SBCqtE','number','string','desc','array'];a159_0x50c8=function(){return _0x920df4;};return a159_0x50c8();}
@@ -1 +1 @@
1
- function a160_0x2fca(){var _0x32b763=['1657317QLLHtq','1150900GGVRRF','5QjciIc','2011625pLkeMh','379761cCVAKA','5140632LFJhof','818700rLVPRW','2503086fsbnIh'];a160_0x2fca=function(){return _0x32b763;};return a160_0x2fca();}function a160_0x2260(_0x1f29e3,_0x5345e6){_0x1f29e3=_0x1f29e3-0x1b6;var _0x2fca0b=a160_0x2fca();var _0x2260d9=_0x2fca0b[_0x1f29e3];return _0x2260d9;}(function(_0x31e363,_0x7033ad){var _0x33dcec=a160_0x2260,_0x471d3=_0x31e363();while(!![]){try{var _0x1d91bb=-parseInt(_0x33dcec(0x1bd))/0x1+-parseInt(_0x33dcec(0x1b7))/0x2+-parseInt(_0x33dcec(0x1b9))/0x3+parseInt(_0x33dcec(0x1ba))/0x4+parseInt(_0x33dcec(0x1bb))/0x5*(parseInt(_0x33dcec(0x1b8))/0x6)+parseInt(_0x33dcec(0x1bc))/0x7+parseInt(_0x33dcec(0x1b6))/0x8;if(_0x1d91bb===_0x7033ad)break;else _0x471d3['push'](_0x471d3['shift']());}catch(_0x468c84){_0x471d3['push'](_0x471d3['shift']());}}}(a160_0x2fca,0x479be));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ function a160_0x54bc(_0x35c858,_0x416677){_0x35c858=_0x35c858-0x15b;var _0x1162d0=a160_0x1162();var _0x54bc69=_0x1162d0[_0x35c858];return _0x54bc69;}(function(_0x5803d5,_0x2831fc){var _0x410443=a160_0x54bc,_0x3904fd=_0x5803d5();while(!![]){try{var _0x221d9c=-parseInt(_0x410443(0x160))/0x1+-parseInt(_0x410443(0x163))/0x2+-parseInt(_0x410443(0x161))/0x3*(parseInt(_0x410443(0x15d))/0x4)+parseInt(_0x410443(0x15c))/0x5+parseInt(_0x410443(0x162))/0x6*(-parseInt(_0x410443(0x15f))/0x7)+-parseInt(_0x410443(0x164))/0x8*(-parseInt(_0x410443(0x15e))/0x9)+parseInt(_0x410443(0x15b))/0xa;if(_0x221d9c===_0x2831fc)break;else _0x3904fd['push'](_0x3904fd['shift']());}catch(_0x4a5bfc){_0x3904fd['push'](_0x3904fd['shift']());}}}(a160_0x1162,0x2bd74));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a160_0x1162(){var _0x2c83a3=['1112BHWYgG','45JDCZcF','14zoWMfL','41969wtYjcN','699uikjWn','118554HKcLoF','322868KkBmdr','143248GAqsXX','2502400xBaTVy','737485gylzDY'];a160_0x1162=function(){return _0x2c83a3;};return a160_0x1162();}
@@ -1 +1 @@
1
- const a161_0x54f88b=a161_0x32c0;(function(_0x11bab7,_0x444315){const _0x342164=a161_0x32c0,_0x5976d1=_0x11bab7();while(!![]){try{const _0x56dad2=parseInt(_0x342164(0x1ca))/0x1*(parseInt(_0x342164(0x1c1))/0x2)+parseInt(_0x342164(0x1ac))/0x3*(parseInt(_0x342164(0x1ae))/0x4)+-parseInt(_0x342164(0x1b1))/0x5*(parseInt(_0x342164(0x1a9))/0x6)+-parseInt(_0x342164(0x1ad))/0x7*(parseInt(_0x342164(0x1c7))/0x8)+-parseInt(_0x342164(0x1a6))/0x9+parseInt(_0x342164(0x1a8))/0xa+parseInt(_0x342164(0x1ab))/0xb*(parseInt(_0x342164(0x1cc))/0xc);if(_0x56dad2===_0x444315)break;else _0x5976d1['push'](_0x5976d1['shift']());}catch(_0x1b07da){_0x5976d1['push'](_0x5976d1['shift']());}}}(a161_0x228a,0x4fd89));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x54f88b(0x1c0)](['draft',a161_0x54f88b(0x1ce),a161_0x54f88b(0x1b7)]);export const ReentryModeTypeSchema=z[a161_0x54f88b(0x1c0)]([a161_0x54f88b(0x1c4),'reentry_unless_goal_achieved','reentry_always']);export const WaitUnitTypeSchema=z[a161_0x54f88b(0x1c0)]([a161_0x54f88b(0x1b2),'week']);export const StepTypeValueSchema=z[a161_0x54f88b(0x1c0)]([a161_0x54f88b(0x1c5),a161_0x54f88b(0x1d1),a161_0x54f88b(0x1c2),a161_0x54f88b(0x1b4),'merge',a161_0x54f88b(0x1c6),'end']);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z['string'](),'stage':z[a161_0x54f88b(0x1be)](),'bundle_id':z['string']()[a161_0x54f88b(0x1d0)]()});export const CriteriaDefSchema=z[a161_0x54f88b(0x1c9)]({'name':z['string'](),'description':z[a161_0x54f88b(0x1be)]()['optional'](),'segment':z[a161_0x54f88b(0x1be)](),'target':JumpTargetDefSchema[a161_0x54f88b(0x1d0)]()});function a161_0x32c0(_0xdc564e,_0x2433f9){_0xdc564e=_0xdc564e-0x1a6;const _0x228a71=a161_0x228a();let _0x32c056=_0x228a71[_0xdc564e];return _0x32c056;}const WaitConditionTimeoutDefSchema=z[a161_0x54f88b(0x1c9)]({'duration':z[a161_0x54f88b(0x1c8)](),'unit':WaitUnitTypeSchema,'next':z['string']()['optional']()}),WaitConditionDefSchema=z['object']({'segment':z[a161_0x54f88b(0x1be)](),'next':z[a161_0x54f88b(0x1be)]()['optional'](),'timeout':WaitConditionTimeoutDefSchema[a161_0x54f88b(0x1d0)]()}),WaitStepParamsDefSchema=z['object']({'duration':z[a161_0x54f88b(0x1c8)]()['optional'](),'unit':WaitUnitTypeSchema[a161_0x54f88b(0x1d0)](),'wait_until':z[a161_0x54f88b(0x1be)]()['optional'](),'condition':WaitConditionDefSchema[a161_0x54f88b(0x1d0)](),'days_of_week':z['array'](z[a161_0x54f88b(0x1be)]())[a161_0x54f88b(0x1d0)]()}),StepBaseFields={'name':z[a161_0x54f88b(0x1be)](),'uuid':z[a161_0x54f88b(0x1be)]()['optional'](),'next':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)]()},WaitStepDefSchema=z[a161_0x54f88b(0x1c9)]({...StepBaseFields,'type':z['literal'](a161_0x54f88b(0x1c5)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x54f88b(0x1c9)]({'activation':z['string']()}),ActivationStepDefSchema=z[a161_0x54f88b(0x1c9)]({...StepBaseFields,'type':z[a161_0x54f88b(0x1b6)](a161_0x54f88b(0x1d1)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a161_0x54f88b(0x1be)](),'segment':z[a161_0x54f88b(0x1be)]()['optional'](),'segment_id':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'excluded':z[a161_0x54f88b(0x1cd)]()[a161_0x54f88b(0x1d0)](),'next':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)]()}),DecisionPointStepParamsDefSchema=z[a161_0x54f88b(0x1c9)]({'branches':z[a161_0x54f88b(0x1b0)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x54f88b(0x1c9)]({...StepBaseFields,'type':z[a161_0x54f88b(0x1b6)](a161_0x54f88b(0x1c2)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z['object']({'id':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'name':z[a161_0x54f88b(0x1be)](),'percentage':z['number'](),'next':z[a161_0x54f88b(0x1be)]()['optional']()}),AbTestStepParamsDefSchema=z[a161_0x54f88b(0x1c9)]({'variants':z[a161_0x54f88b(0x1b0)](AbTestVariantDefSchema),'unique_id':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'customized_split':z['boolean']()[a161_0x54f88b(0x1d0)]()}),AbTestStepDefSchema=z[a161_0x54f88b(0x1c9)]({...StepBaseFields,'type':z[a161_0x54f88b(0x1b6)](a161_0x54f88b(0x1b4)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x54f88b(0x1b6)](a161_0x54f88b(0x1bf))}),JumpStepParamsDefSchema=z[a161_0x54f88b(0x1c9)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x54f88b(0x1c9)]({...StepBaseFields,'type':z['literal'](a161_0x54f88b(0x1c6)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x54f88b(0x1c9)]({...StepBaseFields,'type':z[a161_0x54f88b(0x1b6)](a161_0x54f88b(0x1b9))})[a161_0x54f88b(0x1af)]();export const StepDefSchema=z['discriminatedUnion'](a161_0x54f88b(0x1ba),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x54f88b(0x1c9)]({'name':z[a161_0x54f88b(0x1be)](),'description':z['string']()[a161_0x54f88b(0x1d0)](),'id':z['string']()[a161_0x54f88b(0x1d0)](),'entry_criteria':CriteriaDefSchema[a161_0x54f88b(0x1d0)](),'exit_criteria':z[a161_0x54f88b(0x1b0)](CriteriaDefSchema)[a161_0x54f88b(0x1d0)](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'steps':z[a161_0x54f88b(0x1b0)](StepDefSchema)[a161_0x54f88b(0x1d0)]()});export const JourneyEntryDefSchema=z[a161_0x54f88b(0x1c9)]({'name':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'version':z['string']()[a161_0x54f88b(0x1d0)](),'state':JourneyStateTypeSchema['optional'](),'latest':z['boolean']()[a161_0x54f88b(0x1d0)](),'stages':z[a161_0x54f88b(0x1b0)](StageDefSchema),'id':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'version_number':z[a161_0x54f88b(0x1c8)]()['optional'](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema[a161_0x54f88b(0x1d0)]()});export const JourneyDefSchema=z[a161_0x54f88b(0x1aa)](()=>z['object']({'type':z[a161_0x54f88b(0x1b6)](a161_0x54f88b(0x1bb)),'name':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1cb)](0x1,a161_0x54f88b(0x1b5)),'description':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'bundle_id':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'bundle_name':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'folder_id':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'reentry':ReentryModeTypeSchema[a161_0x54f88b(0x1d0)](),'allow_reentry':z['boolean']()[a161_0x54f88b(0x1d0)](),'goal':CriteriaDefSchema[a161_0x54f88b(0x1d0)](),'id':z[a161_0x54f88b(0x1be)]()[a161_0x54f88b(0x1d0)](),'version':z[a161_0x54f88b(0x1be)]()['optional'](),'version_number':z[a161_0x54f88b(0x1c8)]()['optional'](),'stages':z[a161_0x54f88b(0x1b0)](StageDefSchema)[a161_0x54f88b(0x1d0)](),'versions':z[a161_0x54f88b(0x1b0)](JourneyEntryDefSchema)[a161_0x54f88b(0x1d0)](),'journeys':z[a161_0x54f88b(0x1b0)](JourneyEntryDefSchema)['optional'](),'segments':z[a161_0x54f88b(0x1cf)](z[a161_0x54f88b(0x1be)](),EmbeddedSegmentDefSchema)[a161_0x54f88b(0x1d0)](),'activations':z['record'](z[a161_0x54f88b(0x1be)](),ActivationDefSchema)[a161_0x54f88b(0x1d0)]()})[a161_0x54f88b(0x1d2)](_0x56fbd6=>{const _0x43fa08=a161_0x54f88b,_0x2c95fc=[_0x56fbd6[_0x43fa08(0x1bd)],_0x56fbd6[_0x43fa08(0x1c3)],_0x56fbd6['versions']][_0x43fa08(0x1b3)](_0xac9fe8=>Array[_0x43fa08(0x1a7)](_0xac9fe8)&&_0xac9fe8[_0x43fa08(0x1bc)]>0x0)['length'];return _0x2c95fc===0x1;},{'message':a161_0x54f88b(0x1b8)}));const _syncCheck1=!![],_syncCheck2=!![];function a161_0x228a(){const _0x3f3af1=['209538JVYjZo','lazy','462hbvEON','75LpxyIN','6041vMVluY','76132ebIdAb','passthrough','array','5tZSdYr','day','filter','ab_test','Journey\x20name\x20is\x20required','literal','launched','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','end','type','journey','length','journeys','string','merge','enum','34988VQgBIb','decision_point','stages','no_reentry','wait','jump','3944waPNtr','number','object','1MILJcc','min','80772wwLjcy','boolean','simulation','record','optional','activation','refine','2830941IxFJkr','isArray','3259590FDOJCg'];a161_0x228a=function(){return _0x3f3af1;};return a161_0x228a();}void _syncCheck1,void _syncCheck2;
1
+ const a161_0x40accb=a161_0x303e;(function(_0x4940d2,_0x20c7f7){const _0x219e91=a161_0x303e,_0x5d1e81=_0x4940d2();while(!![]){try{const _0x20c31b=-parseInt(_0x219e91(0x100))/0x1*(-parseInt(_0x219e91(0xff))/0x2)+parseInt(_0x219e91(0xf7))/0x3+parseInt(_0x219e91(0xfc))/0x4+-parseInt(_0x219e91(0xf2))/0x5*(parseInt(_0x219e91(0xda))/0x6)+parseInt(_0x219e91(0xde))/0x7*(parseInt(_0x219e91(0xf5))/0x8)+parseInt(_0x219e91(0xe4))/0x9*(-parseInt(_0x219e91(0xf9))/0xa)+-parseInt(_0x219e91(0xf1))/0xb;if(_0x20c31b===_0x20c7f7)break;else _0x5d1e81['push'](_0x5d1e81['shift']());}catch(_0x247d23){_0x5d1e81['push'](_0x5d1e81['shift']());}}}(a161_0x4596,0xcd469));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';function a161_0x303e(_0xc35b95,_0x53ab19){_0xc35b95=_0xc35b95-0xda;const _0x4596a3=a161_0x4596();let _0x303e28=_0x4596a3[_0xc35b95];return _0x303e28;}import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x40accb(0xf4)](['draft',a161_0x40accb(0xeb),a161_0x40accb(0xdf)]);export const ReentryModeTypeSchema=z[a161_0x40accb(0xf4)](['no_reentry',a161_0x40accb(0xfb),a161_0x40accb(0xf6)]);export const WaitUnitTypeSchema=z[a161_0x40accb(0xf4)]([a161_0x40accb(0x101),a161_0x40accb(0xfe)]);export const StepTypeValueSchema=z[a161_0x40accb(0xf4)]([a161_0x40accb(0xe1),a161_0x40accb(0xe6),a161_0x40accb(0xe8),a161_0x40accb(0xed),a161_0x40accb(0xec),a161_0x40accb(0xf8),a161_0x40accb(0xf0)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x40accb(0xf3)]({'journey':z['string'](),'stage':z['string'](),'bundle_id':z['string']()[a161_0x40accb(0xe2)]()});export const CriteriaDefSchema=z[a161_0x40accb(0xf3)]({'name':z['string'](),'description':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'segment':z['string'](),'target':JumpTargetDefSchema[a161_0x40accb(0xe2)]()});const WaitConditionTimeoutDefSchema=z[a161_0x40accb(0xf3)]({'duration':z[a161_0x40accb(0xea)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)]()}),WaitConditionDefSchema=z['object']({'segment':z['string'](),'next':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a161_0x40accb(0xf3)]({'duration':z['number']()['optional'](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a161_0x40accb(0xdc)]()['optional'](),'condition':WaitConditionDefSchema[a161_0x40accb(0xe2)](),'days_of_week':z[a161_0x40accb(0xe5)](z[a161_0x40accb(0xdc)]())[a161_0x40accb(0xe2)]()}),StepBaseFields={'name':z[a161_0x40accb(0xdc)](),'uuid':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'next':z[a161_0x40accb(0xdc)]()['optional']()},WaitStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z['literal'](a161_0x40accb(0xe1)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a161_0x40accb(0xdc)]()}),ActivationStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z[a161_0x40accb(0xe3)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x40accb(0xf3)]({'name':z['string'](),'segment':z['string']()[a161_0x40accb(0xe2)](),'segment_id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'excluded':z[a161_0x40accb(0xe0)]()['optional'](),'next':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)]()}),DecisionPointStepParamsDefSchema=z[a161_0x40accb(0xf3)]({'branches':z[a161_0x40accb(0xe5)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x40accb(0xe3)](a161_0x40accb(0xe8)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z['object']({'id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'name':z['string'](),'percentage':z[a161_0x40accb(0xea)](),'next':z['string']()[a161_0x40accb(0xe2)]()}),AbTestStepParamsDefSchema=z[a161_0x40accb(0xf3)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x40accb(0xe2)](),'customized_split':z[a161_0x40accb(0xe0)]()[a161_0x40accb(0xe2)]()}),AbTestStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z[a161_0x40accb(0xe3)](a161_0x40accb(0xed)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z['literal']('merge')}),JumpStepParamsDefSchema=z[a161_0x40accb(0xf3)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z[a161_0x40accb(0xe3)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z[a161_0x40accb(0xe3)](a161_0x40accb(0xf0))})[a161_0x40accb(0x103)]();export const StepDefSchema=z[a161_0x40accb(0xee)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);function a161_0x4596(){const _0x4db899=['record','Journey\x20name\x20is\x20required','6982230MBJomC','isArray','string','filter','269815PhDGOs','launched','boolean','wait','optional','literal','1693485gStRhX','array','activation','refine','decision_point','length','number','simulation','merge','ab_test','discriminatedUnion','lazy','end','4911951TKnVdT','5UETXTh','object','enum','104xvfxTn','reentry_always','4465347vnpZIH','jump','60XUWoJi','versions','reentry_unless_goal_achieved','697516CGVGkC','stages','week','8CfCULh','354033wZUpHD','day','journey','passthrough'];a161_0x4596=function(){return _0x4db899;};return a161_0x4596();}export const StageDefSchema=z['object']({'name':z['string'](),'description':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'entry_criteria':CriteriaDefSchema[a161_0x40accb(0xe2)](),'exit_criteria':z[a161_0x40accb(0xe5)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a161_0x40accb(0xe2)](),'root_step':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'steps':z[a161_0x40accb(0xe5)](StepDefSchema)[a161_0x40accb(0xe2)]()});export const JourneyEntryDefSchema=z[a161_0x40accb(0xf3)]({'name':z['string']()[a161_0x40accb(0xe2)](),'version':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'state':JourneyStateTypeSchema[a161_0x40accb(0xe2)](),'latest':z[a161_0x40accb(0xe0)]()[a161_0x40accb(0xe2)](),'stages':z[a161_0x40accb(0xe5)](StageDefSchema),'id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'version_number':z[a161_0x40accb(0xea)]()[a161_0x40accb(0xe2)](),'goal':CriteriaDefSchema[a161_0x40accb(0xe2)](),'reentry':ReentryModeTypeSchema[a161_0x40accb(0xe2)]()});export const JourneyDefSchema=z[a161_0x40accb(0xef)](()=>z[a161_0x40accb(0xf3)]({'type':z[a161_0x40accb(0xe3)](a161_0x40accb(0x102)),'name':z['string']()['min'](0x1,a161_0x40accb(0x105)),'description':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'bundle_id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'bundle_name':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'folder_id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a161_0x40accb(0xe0)]()['optional'](),'goal':CriteriaDefSchema[a161_0x40accb(0xe2)](),'id':z['string']()[a161_0x40accb(0xe2)](),'version':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'version_number':z[a161_0x40accb(0xea)]()[a161_0x40accb(0xe2)](),'stages':z[a161_0x40accb(0xe5)](StageDefSchema)[a161_0x40accb(0xe2)](),'versions':z['array'](JourneyEntryDefSchema)[a161_0x40accb(0xe2)](),'journeys':z[a161_0x40accb(0xe5)](JourneyEntryDefSchema)[a161_0x40accb(0xe2)](),'segments':z['record'](z[a161_0x40accb(0xdc)](),EmbeddedSegmentDefSchema)[a161_0x40accb(0xe2)](),'activations':z[a161_0x40accb(0x104)](z['string'](),ActivationDefSchema)[a161_0x40accb(0xe2)]()})[a161_0x40accb(0xe7)](_0x5aeb0a=>{const _0x49ebef=a161_0x40accb,_0x186470=[_0x5aeb0a['journeys'],_0x5aeb0a[_0x49ebef(0xfd)],_0x5aeb0a[_0x49ebef(0xfa)]][_0x49ebef(0xdd)](_0x541931=>Array[_0x49ebef(0xdb)](_0x541931)&&_0x541931[_0x49ebef(0xe9)]>0x0)[_0x49ebef(0xe9)];return _0x186470===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- function a163_0x9a37(_0xda7878,_0x2fe509){_0xda7878=_0xda7878-0xc0;var _0x400350=a163_0x4003();var _0x9a37da=_0x400350[_0xda7878];return _0x9a37da;}(function(_0x301cb9,_0x1a5dc6){var _0x3ba0db=a163_0x9a37,_0x529620=_0x301cb9();while(!![]){try{var _0x543779=-parseInt(_0x3ba0db(0xc1))/0x1+parseInt(_0x3ba0db(0xc4))/0x2+parseInt(_0x3ba0db(0xc7))/0x3+-parseInt(_0x3ba0db(0xc3))/0x4*(parseInt(_0x3ba0db(0xc5))/0x5)+-parseInt(_0x3ba0db(0xc2))/0x6*(-parseInt(_0x3ba0db(0xc8))/0x7)+parseInt(_0x3ba0db(0xc0))/0x8+-parseInt(_0x3ba0db(0xc6))/0x9;if(_0x543779===_0x1a5dc6)break;else _0x529620['push'](_0x529620['shift']());}catch(_0x2195bd){_0x529620['push'](_0x529620['shift']());}}}(a163_0x4003,0xcec5b));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a163_0x4003(){var _0x1e323a=['2288356uNpaRW','12505fuaiYw','1944306cpcbcx','1361388fWxBGQ','196qFIanf','11852776OQCNmL','1682899uknnFo','281670tTrVHX','2636HwQyEA'];a163_0x4003=function(){return _0x1e323a;};return a163_0x4003();}
1
+ function a163_0x167c(){var _0x3c3dd8=['11jiqufe','1828177OhSPcB','8wDfnBk','7120UTXSiK','22005pHoOJw','284605ObZFsU','459VpzLfe','1803nLKNdY','96LEpAiz','836586FUlseW','21FtFZmQ','348YNDgFK','3693470YkBehT'];a163_0x167c=function(){return _0x3c3dd8;};return a163_0x167c();}function a163_0x34d8(_0x14509d,_0x2b2ded){_0x14509d=_0x14509d-0x1f1;var _0x167c72=a163_0x167c();var _0x34d879=_0x167c72[_0x14509d];return _0x34d879;}(function(_0x309a57,_0x28da36){var _0x49cca5=a163_0x34d8,_0x54597e=_0x309a57();while(!![]){try{var _0x138f32=-parseInt(_0x49cca5(0x1fc))/0x1+parseInt(_0x49cca5(0x1f6))/0x2*(-parseInt(_0x49cca5(0x1f2))/0x3)+-parseInt(_0x49cca5(0x1fa))/0x4*(-parseInt(_0x49cca5(0x1fd))/0x5)+-parseInt(_0x49cca5(0x1f4))/0x6*(parseInt(_0x49cca5(0x1f5))/0x7)+-parseInt(_0x49cca5(0x1fb))/0x8*(parseInt(_0x49cca5(0x1f1))/0x9)+parseInt(_0x49cca5(0x1f7))/0xa*(-parseInt(_0x49cca5(0x1f8))/0xb)+parseInt(_0x49cca5(0x1f3))/0xc*(parseInt(_0x49cca5(0x1f9))/0xd);if(_0x138f32===_0x28da36)break;else _0x54597e['push'](_0x54597e['shift']());}catch(_0x277a66){_0x54597e['push'](_0x54597e['shift']());}}}(a163_0x167c,0x442e1));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a164_0x37ddba=a164_0x3a7d;(function(_0x21b80d,_0x4307a1){const _0x7c809b=a164_0x3a7d,_0x3f0059=_0x21b80d();while(!![]){try{const _0x2245a2=parseInt(_0x7c809b(0x111))/0x1*(parseInt(_0x7c809b(0xfc))/0x2)+parseInt(_0x7c809b(0x105))/0x3*(parseInt(_0x7c809b(0xe7))/0x4)+parseInt(_0x7c809b(0x12d))/0x5*(parseInt(_0x7c809b(0x127))/0x6)+-parseInt(_0x7c809b(0x123))/0x7+-parseInt(_0x7c809b(0xf4))/0x8*(parseInt(_0x7c809b(0x11c))/0x9)+-parseInt(_0x7c809b(0x132))/0xa*(-parseInt(_0x7c809b(0x125))/0xb)+-parseInt(_0x7c809b(0x128))/0xc*(parseInt(_0x7c809b(0x11f))/0xd);if(_0x2245a2===_0x4307a1)break;else _0x3f0059['push'](_0x3f0059['shift']());}catch(_0x4487b9){_0x3f0059['push'](_0x3f0059['shift']());}}}(a164_0x1e76,0x88765));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x37ddba(0x103)]([a164_0x37ddba(0x126),a164_0x37ddba(0xfb),'Less',a164_0x37ddba(0x10d),a164_0x37ddba(0xf0),'In',a164_0x37ddba(0x129),a164_0x37ddba(0x124),a164_0x37ddba(0x11d),a164_0x37ddba(0x133),a164_0x37ddba(0x136),a164_0x37ddba(0x107),a164_0x37ddba(0x12a),a164_0x37ddba(0x134),a164_0x37ddba(0xfd)]);export const TimeUnitSchema=z[a164_0x37ddba(0x103)]([a164_0x37ddba(0xf1),a164_0x37ddba(0x120),a164_0x37ddba(0x109),a164_0x37ddba(0x108),a164_0x37ddba(0x116),a164_0x37ddba(0x11b),'year']);export const AggregationTypeSchema=z['enum'](['Count',a164_0x37ddba(0x12f),a164_0x37ddba(0x102),a164_0x37ddba(0x13a),a164_0x37ddba(0x110),a164_0x37ddba(0xf3),a164_0x37ddba(0xee),'Last']);const TemporalValueSchema=z[a164_0x37ddba(0xf6)]([z[a164_0x37ddba(0xf9)]({'timestamp':z[a164_0x37ddba(0x10f)]()}),z[a164_0x37ddba(0xf9)]({'last':z[a164_0x37ddba(0xf6)]([z[a164_0x37ddba(0x115)](),z[a164_0x37ddba(0x100)](z[a164_0x37ddba(0x10f)](),z['number']())]),'unit':z[a164_0x37ddba(0x10f)]()})]),OperatorValueSchema=z[a164_0x37ddba(0xf6)]([z[a164_0x37ddba(0x10f)](),z['number'](),z['boolean'](),TemporalValueSchema,z[a164_0x37ddba(0xf7)](z[a164_0x37ddba(0xf6)]([z[a164_0x37ddba(0x10f)](),z[a164_0x37ddba(0x115)](),z[a164_0x37ddba(0xed)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x37ddba(0x126),a164_0x37ddba(0xfb),a164_0x37ddba(0x10d),a164_0x37ddba(0xf8),'LessEqual','In','Contain',a164_0x37ddba(0x12a),a164_0x37ddba(0x134),a164_0x37ddba(0x124),a164_0x37ddba(0x133),a164_0x37ddba(0x136)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x37ddba(0x133),'TimeWithinNext']);export const OperatorDefSchema=z[a164_0x37ddba(0xf9)]({'type':OperatorTypeSchema,'not':z[a164_0x37ddba(0xed)]()['optional'](),'value':OperatorValueSchema[a164_0x37ddba(0xfa)](),'min':z['union']([z['number'](),z[a164_0x37ddba(0x10f)](),TemporalValueSchema])[a164_0x37ddba(0xfa)](),'max':z[a164_0x37ddba(0xf6)]([z[a164_0x37ddba(0x115)](),z[a164_0x37ddba(0x10f)](),TemporalValueSchema])[a164_0x37ddba(0xfa)](),'unit':TimeUnitSchema[a164_0x37ddba(0xfa)](),'duration':z[a164_0x37ddba(0xf9)]({'day':z[a164_0x37ddba(0x115)]()[a164_0x37ddba(0xfa)](),'week':z['number']()['optional'](),'month':z['number']()[a164_0x37ddba(0xfa)](),'year':z[a164_0x37ddba(0x115)]()[a164_0x37ddba(0xfa)](),'hour':z[a164_0x37ddba(0x115)]()[a164_0x37ddba(0xfa)](),'minute':z['number']()['optional'](),'second':z[a164_0x37ddba(0x115)]()[a164_0x37ddba(0xfa)]()})[a164_0x37ddba(0xfa)](),'from':z[a164_0x37ddba(0xf9)]({'last':z['union']([z[a164_0x37ddba(0x115)](),z['string']()]),'unit':TimeUnitSchema})[a164_0x37ddba(0xfa)](),'reverse':z['boolean']()[a164_0x37ddba(0xfa)]()})[a164_0x37ddba(0xeb)]((_0x40eda8,_0x5030cd)=>{const _0x2d4673=a164_0x37ddba;OPERATORS_REQUIRING_VALUE[_0x2d4673(0xec)](_0x40eda8[_0x2d4673(0x118)])&&(_0x40eda8[_0x2d4673(0x11e)]===undefined||_0x40eda8[_0x2d4673(0x11e)]===null)&&_0x5030cd['addIssue']({'code':_0x2d4673(0xe9),'message':_0x2d4673(0xea)+_0x40eda8['type']+_0x2d4673(0x10e),'path':[_0x2d4673(0x11e)]}),_0x40eda8[_0x2d4673(0x118)]==='Between'&&_0x40eda8[_0x2d4673(0x121)]===undefined&&_0x40eda8[_0x2d4673(0x112)]===undefined&&_0x5030cd[_0x2d4673(0x130)]({'code':_0x2d4673(0xe9),'message':_0x2d4673(0x104),'params':{'validationCode':_0x2d4673(0x122)}}),OPERATORS_REQUIRING_UNIT[_0x2d4673(0xec)](_0x40eda8[_0x2d4673(0x118)])&&_0x40eda8[_0x2d4673(0x11e)]!==undefined&&!_0x40eda8[_0x2d4673(0x10c)]&&_0x5030cd[_0x2d4673(0x130)]({'code':_0x2d4673(0xe9),'message':_0x2d4673(0xea)+_0x40eda8[_0x2d4673(0x118)]+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x2d4673(0x10c)],'params':{'validationCode':_0x2d4673(0x137)}}),_0x40eda8['type']===_0x2d4673(0xfd)&&(!_0x40eda8[_0x2d4673(0x131)]&&_0x5030cd[_0x2d4673(0x130)]({'code':_0x2d4673(0xe9),'message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':['duration']}),!_0x40eda8[_0x2d4673(0x11a)]&&_0x5030cd[_0x2d4673(0x130)]({'code':'custom','message':_0x2d4673(0xef),'path':[_0x2d4673(0x11a)]}));});export const ArrayMatchingSchema=z[a164_0x37ddba(0xf6)]([z['literal']('any'),z[a164_0x37ddba(0x114)](a164_0x37ddba(0x10a)),z['object']({'atLeast':z[a164_0x37ddba(0x115)]()}),z['object']({'atMost':z[a164_0x37ddba(0x115)]()}),z['object']({'exactly':z[a164_0x37ddba(0x115)]()})]);export const AggregationDefSchema=z[a164_0x37ddba(0x101)]('type',[z['object']({'type':z[a164_0x37ddba(0x103)]([a164_0x37ddba(0x12f),a164_0x37ddba(0x13a),'Max',a164_0x37ddba(0x102)]),'column':z[a164_0x37ddba(0x10f)](),'groupingColumns':z[a164_0x37ddba(0xf7)](z['string']())[a164_0x37ddba(0xfa)]()}),z['object']({'type':z[a164_0x37ddba(0x114)]('Count'),'groupingColumns':z[a164_0x37ddba(0xf7)](z[a164_0x37ddba(0x10f)]())['optional']()}),z['object']({'type':z[a164_0x37ddba(0x114)](a164_0x37ddba(0xf3)),'columns':z[a164_0x37ddba(0xf7)](z[a164_0x37ddba(0x10f)]())}),z[a164_0x37ddba(0xf9)]({'type':z[a164_0x37ddba(0x103)](['First',a164_0x37ddba(0xf2)]),'column':z[a164_0x37ddba(0x10f)](),'orderColumn':z[a164_0x37ddba(0x10f)](),'groupingColumns':z[a164_0x37ddba(0xf7)](z[a164_0x37ddba(0x10f)]())[a164_0x37ddba(0xfa)]()})]);export const TimeWindowDefSchema=z[a164_0x37ddba(0xf9)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x37ddba(0x133),'TimeWithinNext','TimeRange']);export const FilterColumnConditionDefSchema=z[a164_0x37ddba(0xf9)]({'type':z[a164_0x37ddba(0x114)]('Column'),'column':z[a164_0x37ddba(0x10f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})[a164_0x37ddba(0xeb)]((_0x657c7c,_0x1bb324)=>{const _0x193f1f=a164_0x37ddba,_0x317461=_0x657c7c[_0x193f1f(0x117)][_0x193f1f(0x118)];_0x657c7c[_0x193f1f(0x12c)]===_0x193f1f(0xe8)?!TIMESTAMP_OPERATORS['has'](_0x317461)&&_0x1bb324['addIssue']({'code':_0x193f1f(0xe9),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x317461+'\x27)','path':['operator',_0x193f1f(0x118)]}):TIMESTAMP_OPERATORS[_0x193f1f(0xec)](_0x317461)&&_0x1bb324[_0x193f1f(0x130)]({'code':_0x193f1f(0xe9),'message':_0x193f1f(0xea)+_0x317461+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':['operator','type']});});export const FilterRuleDefSchema=z[a164_0x37ddba(0xf9)]({'type':z['literal'](a164_0x37ddba(0x119)),'conditions':z[a164_0x37ddba(0xf7)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x37ddba(0x12e)](()=>z[a164_0x37ddba(0xf9)]({'type':z[a164_0x37ddba(0x114)](a164_0x37ddba(0xff)),'attribute':z[a164_0x37ddba(0x10f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()[a164_0x37ddba(0xfa)](),'aggregation':AggregationDefSchema[a164_0x37ddba(0xfa)](),'source':z['string']()[a164_0x37ddba(0xfa)](),'filter':FilterRuleDefSchema[a164_0x37ddba(0xfa)](),'limit':z[a164_0x37ddba(0x115)]()[a164_0x37ddba(0xfa)]()}));export const BehaviorConditionDefSchema=z[a164_0x37ddba(0x12e)](()=>z[a164_0x37ddba(0xf9)]({'type':z[a164_0x37ddba(0x114)](a164_0x37ddba(0x10b)),'attribute':z[a164_0x37ddba(0x10f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x37ddba(0xfa)](),'exclude':z[a164_0x37ddba(0xed)]()['optional'](),'aggregation':AggregationDefSchema[a164_0x37ddba(0xfa)](),'source':z[a164_0x37ddba(0x10f)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a164_0x37ddba(0x115)]()[a164_0x37ddba(0xfa)]()}));export const ColumnConditionDefSchema=z[a164_0x37ddba(0xf9)]({'type':z[a164_0x37ddba(0x114)](a164_0x37ddba(0x12b)),'column':z['string'](),'operator':OperatorDefSchema});function a164_0x1e76(){const _0x2a7b2b=['optional','Greater','1766wFsYYP','TimeRange','realtime','Value','record','discriminatedUnion','Average','enum','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','52278BhTYXl','exclude','Contain','day','hour','all','Behavior','unit','GreaterEqual','\x27\x20requires\x20a\x20value','string','Max','1038nPyzIh','max','Segment\x20reference\x20must\x20not\x20be\x20empty','literal','number','week','operator','type','And','from','month','120114wcRoqo','IsNull','value','1040fKiBMZ','minute','min','MISSING_BETWEEN_BOUNDS','6885683YsrVra','Regexp','11BYHYYK','Equal','6lpvFxc','50340CxGAtl','Between','StartWith','Column','column','4115635VqfrHH','lazy','Sum','addIssue','duration','6438170jZQrKn','TimeWithinPast','EndWith','Segment\x20name\x20is\x20required','TimeWithinNext','MISSING_TIME_UNIT','batch','segment','Min','funnel_stage','28DLhAEf','timestamp','custom','Operator\x20\x27','superRefine','has','boolean','First','TimeRange\x20operator\x20requires\x20\x27from\x27','LessEqual','second','Last','CountDistinct','376WHxAQx','any','union','array','Less','object'];a164_0x1e76=function(){return _0x2a7b2b;};return a164_0x1e76();}function a164_0x3a7d(_0x2c43d9,_0x503ede){_0x2c43d9=_0x2c43d9-0xe7;const _0x1e7696=a164_0x1e76();let _0x3a7d45=_0x1e7696[_0x2c43d9];return _0x3a7d45;}export const CompositeConditionDefSchema=z[a164_0x37ddba(0x12e)](()=>z[a164_0x37ddba(0xf9)]({'type':z['enum']([a164_0x37ddba(0x119),'Or']),'conditions':z[a164_0x37ddba(0xf7)](ConditionDefSchema),'description':z['string']()[a164_0x37ddba(0xfa)]()}));export const SegmentRefConditionDefSchema=z[a164_0x37ddba(0xf9)]({'type':z[a164_0x37ddba(0x103)](['include',a164_0x37ddba(0x106)]),'segment':z[a164_0x37ddba(0x10f)]()[a164_0x37ddba(0x121)](0x1,a164_0x37ddba(0x113))});export const ConditionDefSchema=z[a164_0x37ddba(0x12e)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x37ddba(0x12e)](()=>z[a164_0x37ddba(0xf9)]({'type':z[a164_0x37ddba(0x103)]([a164_0x37ddba(0x119),'Or']),'conditions':z[a164_0x37ddba(0xf7)](ConditionDefSchema),'description':z[a164_0x37ddba(0x10f)]()['optional']()}));export const SegmentDefSchema=z[a164_0x37ddba(0xf9)]({'type':z['literal'](a164_0x37ddba(0x139))['optional'](),'name':z[a164_0x37ddba(0x10f)]()['min'](0x1,a164_0x37ddba(0x135)),'description':z['string']()[a164_0x37ddba(0xfa)](),'folder':z[a164_0x37ddba(0x10f)]()['optional'](),'rule':RuleDefSchema[a164_0x37ddba(0xfa)](),'kind':z[a164_0x37ddba(0x103)]([a164_0x37ddba(0x138),a164_0x37ddba(0xfe),a164_0x37ddba(0x13b)])['optional'](),'visible':z[a164_0x37ddba(0xed)]()[a164_0x37ddba(0xfa)](),'activations':z[a164_0x37ddba(0xf7)](z[a164_0x37ddba(0xf5)]())[a164_0x37ddba(0xfa)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a164_0x12d8ac=a164_0x16ed;(function(_0x1dd474,_0x5a64f7){const _0x2be308=a164_0x16ed,_0x47575f=_0x1dd474();while(!![]){try{const _0x345a5a=parseInt(_0x2be308(0x1d4))/0x1+-parseInt(_0x2be308(0x1dc))/0x2+parseInt(_0x2be308(0x1e0))/0x3*(-parseInt(_0x2be308(0x207))/0x4)+-parseInt(_0x2be308(0x209))/0x5+parseInt(_0x2be308(0x1e8))/0x6+-parseInt(_0x2be308(0x1fa))/0x7*(parseInt(_0x2be308(0x213))/0x8)+parseInt(_0x2be308(0x1e6))/0x9;if(_0x345a5a===_0x5a64f7)break;else _0x47575f['push'](_0x47575f['shift']());}catch(_0x419039){_0x47575f['push'](_0x47575f['shift']());}}}(a164_0x3ef0,0x7ee56));import{z}from'zod';function a164_0x16ed(_0x2493e0,_0x120bec){_0x2493e0=_0x2493e0-0x1d1;const _0x3ef014=a164_0x3ef0();let _0x16ed31=_0x3ef014[_0x2493e0];return _0x16ed31;}export const OperatorTypeSchema=z[a164_0x12d8ac(0x21c)](['Equal',a164_0x12d8ac(0x1df),a164_0x12d8ac(0x1f4),a164_0x12d8ac(0x1fc),a164_0x12d8ac(0x1e4),'In',a164_0x12d8ac(0x1ef),a164_0x12d8ac(0x1e9),'IsNull',a164_0x12d8ac(0x1da),'TimeWithinNext',a164_0x12d8ac(0x1f6),a164_0x12d8ac(0x204),'EndWith',a164_0x12d8ac(0x20d)]);export const TimeUnitSchema=z[a164_0x12d8ac(0x21c)](['second',a164_0x12d8ac(0x205),'hour','day',a164_0x12d8ac(0x1e5),a164_0x12d8ac(0x20f),a164_0x12d8ac(0x201)]);export const AggregationTypeSchema=z[a164_0x12d8ac(0x21c)](['Count',a164_0x12d8ac(0x202),'Average',a164_0x12d8ac(0x20b),a164_0x12d8ac(0x218),'CountDistinct','First',a164_0x12d8ac(0x1d8)]);const TemporalValueSchema=z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1fb)]({'timestamp':z[a164_0x12d8ac(0x1f8)]()}),z['object']({'last':z['union']([z['number'](),z[a164_0x12d8ac(0x1ec)](z['string'](),z['number']())]),'unit':z['string']()})]),OperatorValueSchema=z['union']([z[a164_0x12d8ac(0x1f8)](),z['number'](),z[a164_0x12d8ac(0x1d3)](),TemporalValueSchema,z[a164_0x12d8ac(0x1fd)](z[a164_0x12d8ac(0x1e3)]([z['string'](),z[a164_0x12d8ac(0x1db)](),z[a164_0x12d8ac(0x1d3)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x12d8ac(0x212),'Greater',a164_0x12d8ac(0x1fc),a164_0x12d8ac(0x1f4),a164_0x12d8ac(0x1e4),'In',a164_0x12d8ac(0x1f6),a164_0x12d8ac(0x204),a164_0x12d8ac(0x20a),'Regexp',a164_0x12d8ac(0x1da),a164_0x12d8ac(0x1f5)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x12d8ac(0x1da),a164_0x12d8ac(0x1f5)]);export const OperatorDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':OperatorTypeSchema,'not':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'value':OperatorValueSchema[a164_0x12d8ac(0x1f2)](),'min':z['union']([z[a164_0x12d8ac(0x1db)](),z[a164_0x12d8ac(0x1f8)](),TemporalValueSchema])[a164_0x12d8ac(0x1f2)](),'max':z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1db)](),z['string'](),TemporalValueSchema])[a164_0x12d8ac(0x1f2)](),'unit':TimeUnitSchema[a164_0x12d8ac(0x1f2)](),'duration':z[a164_0x12d8ac(0x1fb)]({'day':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'week':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'month':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'year':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'hour':z['number']()[a164_0x12d8ac(0x1f2)](),'minute':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'second':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)]()})[a164_0x12d8ac(0x1f2)](),'from':z[a164_0x12d8ac(0x1fb)]({'last':z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1db)](),z[a164_0x12d8ac(0x1f8)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)]()})[a164_0x12d8ac(0x20e)]((_0x18a1d0,_0x500a2e)=>{const _0x266feb=a164_0x12d8ac;OPERATORS_REQUIRING_VALUE['has'](_0x18a1d0[_0x266feb(0x1f9)])&&(_0x18a1d0[_0x266feb(0x1e2)]===undefined||_0x18a1d0[_0x266feb(0x1e2)]===null)&&_0x500a2e['addIssue']({'code':_0x266feb(0x206),'message':'Operator\x20\x27'+_0x18a1d0[_0x266feb(0x1f9)]+'\x27\x20requires\x20a\x20value','path':[_0x266feb(0x1e2)]}),_0x18a1d0[_0x266feb(0x1f9)]==='Between'&&_0x18a1d0['min']===undefined&&_0x18a1d0[_0x266feb(0x1d5)]===undefined&&_0x500a2e[_0x266feb(0x20c)]({'code':'custom','message':_0x266feb(0x1dd),'params':{'validationCode':_0x266feb(0x1fe)}}),OPERATORS_REQUIRING_UNIT['has'](_0x18a1d0['type'])&&_0x18a1d0[_0x266feb(0x1e2)]!==undefined&&!_0x18a1d0['unit']&&_0x500a2e[_0x266feb(0x20c)]({'code':_0x266feb(0x206),'message':'Operator\x20\x27'+_0x18a1d0[_0x266feb(0x1f9)]+_0x266feb(0x21b),'path':[_0x266feb(0x1d2)],'params':{'validationCode':_0x266feb(0x21e)}}),_0x18a1d0['type']===_0x266feb(0x20d)&&(!_0x18a1d0[_0x266feb(0x1f1)]&&_0x500a2e[_0x266feb(0x20c)]({'code':_0x266feb(0x206),'message':_0x266feb(0x211),'path':[_0x266feb(0x1f1)]}),!_0x18a1d0[_0x266feb(0x1e7)]&&_0x500a2e[_0x266feb(0x20c)]({'code':_0x266feb(0x206),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x266feb(0x1e7)]}));});export const ArrayMatchingSchema=z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x1f3)),z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x1eb)),z[a164_0x12d8ac(0x1fb)]({'atLeast':z[a164_0x12d8ac(0x1db)]()}),z['object']({'atMost':z['number']()}),z['object']({'exactly':z[a164_0x12d8ac(0x1db)]()})]);export const AggregationDefSchema=z['discriminatedUnion'](a164_0x12d8ac(0x1f9),[z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)](['Sum',a164_0x12d8ac(0x20b),a164_0x12d8ac(0x218),a164_0x12d8ac(0x1ff)]),'column':z[a164_0x12d8ac(0x1f8)](),'groupingColumns':z[a164_0x12d8ac(0x1fd)](z[a164_0x12d8ac(0x1f8)]())[a164_0x12d8ac(0x1f2)]()}),z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x214)),'groupingColumns':z[a164_0x12d8ac(0x1fd)](z['string']())[a164_0x12d8ac(0x1f2)]()}),z['object']({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x210)),'columns':z[a164_0x12d8ac(0x1fd)](z[a164_0x12d8ac(0x1f8)]())}),z[a164_0x12d8ac(0x1fb)]({'type':z['enum']([a164_0x12d8ac(0x1ed),a164_0x12d8ac(0x1d8)]),'column':z[a164_0x12d8ac(0x1f8)](),'orderColumn':z['string'](),'groupingColumns':z['array'](z[a164_0x12d8ac(0x1f8)]())[a164_0x12d8ac(0x1f2)]()})]);export const TimeWindowDefSchema=z[a164_0x12d8ac(0x1fb)]({'duration':z[a164_0x12d8ac(0x1db)](),'unit':TimeUnitSchema});function a164_0x3ef0(){const _0x370989=['addIssue','TimeRange','superRefine','month','CountDistinct','TimeRange\x20operator\x20requires\x20\x27duration\x27','Equal','5015432pXVYpZ','Count','Value','batch','exclude','Max','Behavior','column','\x27\x20requires\x20a\x20time\x20unit','enum','Column','MISSING_TIME_UNIT','min','unit','boolean','77198aRHZjH','max','And','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Last','literal','TimeWithinPast','number','1658200utcBeh','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Greater','1173261BxRmlu','Segment\x20reference\x20must\x20not\x20be\x20empty','value','union','LessEqual','week','25901127lJTgaa','from','1448592cPeYWJ','Regexp','has','all','record','First','operator','Between','timestamp','duration','optional','any','Less','TimeWithinNext','Contain','realtime','string','type','7ihACbo','object','GreaterEqual','array','MISSING_BETWEEN_BOUNDS','Average','segment','year','Sum','Segment\x20name\x20is\x20required','StartWith','minute','custom','4yZgZLt','lazy','4148255MqBAgM','EndWith','Min'];a164_0x3ef0=function(){return _0x370989;};return a164_0x3ef0();}const TIMESTAMP_OPERATORS=new Set([a164_0x12d8ac(0x1da),a164_0x12d8ac(0x1f5),'TimeRange']);export const FilterColumnConditionDefSchema=z['object']({'type':z[a164_0x12d8ac(0x1d9)]('Column'),'column':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x12d8ac(0x1f2)]()})[a164_0x12d8ac(0x20e)]((_0x13eae1,_0x58d670)=>{const _0x8a011=a164_0x12d8ac,_0x170d74=_0x13eae1[_0x8a011(0x1ee)][_0x8a011(0x1f9)];_0x13eae1[_0x8a011(0x21a)]===_0x8a011(0x1f0)?!TIMESTAMP_OPERATORS[_0x8a011(0x1ea)](_0x170d74)&&_0x58d670[_0x8a011(0x20c)]({'code':'custom','message':_0x8a011(0x1d7)+_0x170d74+'\x27)','path':['operator',_0x8a011(0x1f9)]}):TIMESTAMP_OPERATORS['has'](_0x170d74)&&_0x58d670[_0x8a011(0x20c)]({'code':_0x8a011(0x206),'message':'Operator\x20\x27'+_0x170d74+_0x8a011(0x1de),'path':[_0x8a011(0x1ee),_0x8a011(0x1f9)]});});export const FilterRuleDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x1d6)),'conditions':z[a164_0x12d8ac(0x1fd)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z['object']({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x215)),'attribute':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'aggregation':AggregationDefSchema[a164_0x12d8ac(0x1f2)](),'source':z['string']()[a164_0x12d8ac(0x1f2)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)]()}));export const BehaviorConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x219)),'attribute':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'aggregation':AggregationDefSchema[a164_0x12d8ac(0x1f2)](),'source':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1f2)](),'filter':FilterRuleDefSchema[a164_0x12d8ac(0x1f2)](),'timeWindow':TimeWindowDefSchema[a164_0x12d8ac(0x1f2)](),'limit':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)]()}));export const ColumnConditionDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z['literal'](a164_0x12d8ac(0x21d)),'column':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a164_0x12d8ac(0x1f2)]()}));export const SegmentRefConditionDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)](['include',a164_0x12d8ac(0x217)]),'segment':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1d1)](0x1,a164_0x12d8ac(0x1e1))});export const ConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1e3)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)]([a164_0x12d8ac(0x1d6),'Or']),'conditions':z[a164_0x12d8ac(0x1fd)](ConditionDefSchema),'description':z['string']()[a164_0x12d8ac(0x1f2)]()}));export const SegmentDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x200))[a164_0x12d8ac(0x1f2)](),'name':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1d1)](0x1,a164_0x12d8ac(0x203)),'description':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1f2)](),'folder':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1f2)](),'rule':RuleDefSchema['optional'](),'kind':z[a164_0x12d8ac(0x21c)]([a164_0x12d8ac(0x216),a164_0x12d8ac(0x1f7),'funnel_stage'])['optional'](),'visible':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'activations':z[a164_0x12d8ac(0x1fd)](z['any']())[a164_0x12d8ac(0x1f2)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a165_0x37fc64=a165_0xb53c;(function(_0x4d8cce,_0x19affa){const _0x12114d=a165_0xb53c,_0x5b078f=_0x4d8cce();while(!![]){try{const _0x509807=parseInt(_0x12114d(0x1ff))/0x1*(parseInt(_0x12114d(0x203))/0x2)+parseInt(_0x12114d(0x1f1))/0x3+parseInt(_0x12114d(0x207))/0x4+parseInt(_0x12114d(0x20b))/0x5*(parseInt(_0x12114d(0x204))/0x6)+-parseInt(_0x12114d(0x1f6))/0x7+-parseInt(_0x12114d(0x1f4))/0x8+-parseInt(_0x12114d(0x20d))/0x9;if(_0x509807===_0x19affa)break;else _0x5b078f['push'](_0x5b078f['shift']());}catch(_0x351f63){_0x5b078f['push'](_0x5b078f['shift']());}}}(a165_0x145d,0xa998d));import{readFileSync}from'fs';import*as a165_0x543636 from'path';import*as a165_0x1ba8b7 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';function a165_0xb53c(_0x5dc26d,_0x1a6a59){_0x5dc26d=_0x5dc26d-0x1ed;const _0x145d3a=a165_0x145d();let _0xb53cb4=_0x145d3a[_0x5dc26d];return _0xb53cb4;}const VALID_CAMPAIGN_TYPES=new Set([a165_0x37fc64(0x1fb),a165_0x37fc64(0x206)]);export function isJourneyDef(_0x3014be){const _0x520ece=a165_0x37fc64;return typeof _0x3014be===_0x520ece(0x1fc)&&_0x3014be!==null&&_0x520ece(0x209)in _0x3014be&&_0x3014be[_0x520ece(0x209)]===_0x520ece(0x20c);}export function isCampaignDef(_0x43f683){const _0xb1f5c3=a165_0x37fc64;if(typeof _0x43f683!==_0xb1f5c3(0x1fc)||_0x43f683===null)return![];const _0x45d907=_0x43f683,_0x355bc9=VALID_CAMPAIGN_TYPES[_0xb1f5c3(0x1fe)](_0x45d907[_0xb1f5c3(0x1ee)]);if(_0x45d907[_0xb1f5c3(0x209)]===_0xb1f5c3(0x1f3)&&_0x355bc9)return!![];if(_0x355bc9&&!_0x45d907[_0xb1f5c3(0x209)])return!![];return![];}export function isTemplateDef(_0x2709a8){const _0x2a6812=a165_0x37fc64;return typeof _0x2709a8===_0x2a6812(0x1fc)&&_0x2709a8!==null&&_0x2a6812(0x209)in _0x2709a8&&_0x2709a8['type']===_0x2a6812(0x202);}export function isValidationResult(_0x2bbb27){const _0x56984d=a165_0x37fc64;return!(_0x56984d(0x1ef)in _0x2bbb27);}function a165_0x145d(){const _0x436c45=['has','28pmEOJs','result','filterType','template','85272iLeZJA','6ADSRWa','YAML_PARSE_ERROR','push','1941560xCmwHa','basename','type','utf-8','1264615upzwJC','journey','6842187zGfFVj','error','campaign_type','skipped','message','288195jnWhGB','segment','campaign','1156936YjcSYk','valid','3000599jRjvCY','parseDocument','length','toJSON','map','email','object','not\x20a\x20'];a165_0x145d=function(){return _0x436c45;};return a165_0x145d();}export function createParseErrorResult(_0x32cb1b,_0x1b2074,_0x4c623c,_0x81fb01,_0x227260=a165_0x37fc64(0x1f2)){const _0x12ac83=a165_0x37fc64;return{'filePath':_0x32cb1b,'relativePath':_0x1b2074,'source':_0x4c623c,'result':{'valid':![],'errors':[{'level':_0x12ac83(0x1ed),'path':'','code':_0x12ac83(0x205),'message':_0x81fb01}],'warnings':[]},'fileType':_0x227260};}export function validateYamlFile(_0x49ecd3,_0x4f1eff,_0x2355f1={}){const _0x1f251a=a165_0x37fc64,_0x3bfe34=a165_0x543636['relative'](_0x4f1eff,_0x49ecd3)||a165_0x543636[_0x1f251a(0x208)](_0x49ecd3);try{const _0x163d10=readFileSync(_0x49ecd3,_0x1f251a(0x20a)),_0x1b445f=a165_0x1ba8b7[_0x1f251a(0x1f7)](_0x163d10),_0x25e1b1=_0x1b445f[_0x1f251a(0x1f9)]();if(!_0x25e1b1)return createParseErrorResult(_0x49ecd3,_0x3bfe34,_0x163d10,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x4954a6;if(isJourneyDef(_0x25e1b1))_0x4954a6=_0x1f251a(0x20c);else{if(isCampaignDef(_0x25e1b1))_0x4954a6='campaign';else isTemplateDef(_0x25e1b1)?_0x4954a6=_0x1f251a(0x202):_0x4954a6=_0x1f251a(0x1f2);}if(_0x2355f1[_0x1f251a(0x201)]&&_0x4954a6!==_0x2355f1[_0x1f251a(0x201)])return{'filePath':_0x49ecd3,'relativePath':_0x3bfe34,'skipped':!![],'reason':_0x1f251a(0x1fd)+_0x2355f1[_0x1f251a(0x201)]};const _0x22bc85={'source':_0x163d10,'document':_0x1b445f};let _0x47d423;if(_0x4954a6===_0x1f251a(0x20c))_0x47d423=validateJourneyDef(_0x25e1b1,_0x22bc85);else{if(_0x4954a6===_0x1f251a(0x1f3))_0x47d423=validateCampaignDef(_0x25e1b1,_0x22bc85);else _0x4954a6===_0x1f251a(0x202)?_0x47d423=validateTemplateDef(_0x25e1b1,_0x22bc85):_0x47d423=validateSegmentDef(_0x25e1b1,_0x22bc85);}return{'filePath':_0x49ecd3,'relativePath':_0x3bfe34,'source':_0x163d10,'result':_0x47d423,'fileType':_0x4954a6};}catch(_0xf7cf71){const _0x3f64e3=_0xf7cf71 instanceof Error?_0xf7cf71[_0x1f251a(0x1f0)]:String(_0xf7cf71);return createParseErrorResult(_0x49ecd3,_0x3bfe34,'','YAML\x20parse\x20error:\x20'+_0x3f64e3);}}export function validateYamlFiles(_0x35573b,_0x6170bc,_0x24e13d={}){const _0x7c35b8=a165_0x37fc64;return _0x35573b[_0x7c35b8(0x1fa)](_0x324fda=>validateYamlFile(_0x324fda,_0x6170bc,_0x24e13d));}export function calculateSummary(_0x3ddde7){const _0x11d9fb=a165_0x37fc64;let _0x24e9dd=0x0,_0x19031d=0x0,_0x5d12ab=0x0,_0x103d61=0x0;for(const _0x4927af of _0x3ddde7){if(!isValidationResult(_0x4927af)){_0x103d61++;continue;}_0x4927af[_0x11d9fb(0x200)][_0x11d9fb(0x1f5)]?_0x24e9dd++:_0x19031d++,_0x5d12ab+=_0x4927af[_0x11d9fb(0x200)]['warnings'][_0x11d9fb(0x1f8)];}return{'validCount':_0x24e9dd,'invalidCount':_0x19031d,'warningCount':_0x5d12ab,'skippedCount':_0x103d61,'hasErrors':_0x19031d>0x0};}
1
+ const a165_0x3a465d=a165_0x2515;(function(_0x2b9654,_0xf0bb29){const _0x596649=a165_0x2515,_0x429520=_0x2b9654();while(!![]){try{const _0x4d5457=parseInt(_0x596649(0x171))/0x1*(parseInt(_0x596649(0x174))/0x2)+parseInt(_0x596649(0x177))/0x3*(-parseInt(_0x596649(0x17c))/0x4)+parseInt(_0x596649(0x16c))/0x5+parseInt(_0x596649(0x17b))/0x6*(-parseInt(_0x596649(0x172))/0x7)+-parseInt(_0x596649(0x16f))/0x8*(parseInt(_0x596649(0x185))/0x9)+parseInt(_0x596649(0x181))/0xa+parseInt(_0x596649(0x170))/0xb*(parseInt(_0x596649(0x183))/0xc);if(_0x4d5457===_0xf0bb29)break;else _0x429520['push'](_0x429520['shift']());}catch(_0x165be9){_0x429520['push'](_0x429520['shift']());}}}(a165_0x54b1,0x8f856));import{readFileSync}from'fs';import*as a165_0x1ead2f from'path';import*as a165_0x4d1874 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';function a165_0x54b1(){const _0x4eb515=['basename','campaign_type','type','4826440LXUltl','journey','skipped','9728dYYFGV','7229310oABROO','12611knmHoV','10367XlgFvY','has','94BxrtEL','map','push','12HqyZOV','utf-8','message','email','4404imSHmo','451236vhctwh','template','length','parseDocument','YAML\x20parse\x20error:\x20','9846650QZjSsu','not\x20a\x20','12wYczIx','segment','7947jetiWr','toJSON','campaign','result','object','error','relative','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','filterType'];a165_0x54b1=function(){return _0x4eb515;};return a165_0x54b1();}import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0x3a465d(0x17a),a165_0x3a465d(0x176)]);export function isJourneyDef(_0x3dcbee){const _0xd5135=a165_0x3a465d;return typeof _0x3dcbee===_0xd5135(0x189)&&_0x3dcbee!==null&&'type'in _0x3dcbee&&_0x3dcbee[_0xd5135(0x190)]===_0xd5135(0x16d);}function a165_0x2515(_0x4ba380,_0x29e37f){_0x4ba380=_0x4ba380-0x16c;const _0x54b19a=a165_0x54b1();let _0x251572=_0x54b19a[_0x4ba380];return _0x251572;}export function isCampaignDef(_0x4886f4){const _0x5f7c96=a165_0x3a465d;if(typeof _0x4886f4!==_0x5f7c96(0x189)||_0x4886f4===null)return![];const _0x3f3a60=_0x4886f4,_0x3df6c8=VALID_CAMPAIGN_TYPES[_0x5f7c96(0x173)](_0x3f3a60[_0x5f7c96(0x18f)]);if(_0x3f3a60['type']===_0x5f7c96(0x187)&&_0x3df6c8)return!![];if(_0x3df6c8&&!_0x3f3a60[_0x5f7c96(0x190)])return!![];return![];}export function isTemplateDef(_0x47b2c0){const _0x1fb007=a165_0x3a465d;return typeof _0x47b2c0===_0x1fb007(0x189)&&_0x47b2c0!==null&&_0x1fb007(0x190)in _0x47b2c0&&_0x47b2c0[_0x1fb007(0x190)]==='template';}export function isValidationResult(_0x2bee8e){const _0x33e8f2=a165_0x3a465d;return!(_0x33e8f2(0x16e)in _0x2bee8e);}export function createParseErrorResult(_0x320183,_0xf3dce2,_0x31ceff,_0x1e2543,_0x5c7c0e=a165_0x3a465d(0x184)){const _0x44ab69=a165_0x3a465d;return{'filePath':_0x320183,'relativePath':_0xf3dce2,'source':_0x31ceff,'result':{'valid':![],'errors':[{'level':_0x44ab69(0x18a),'path':'','code':'YAML_PARSE_ERROR','message':_0x1e2543}],'warnings':[]},'fileType':_0x5c7c0e};}export function validateYamlFile(_0x46f7c9,_0x2fc251,_0x968ed2={}){const _0x201b6b=a165_0x3a465d,_0x107f7b=a165_0x1ead2f[_0x201b6b(0x18b)](_0x2fc251,_0x46f7c9)||a165_0x1ead2f[_0x201b6b(0x18e)](_0x46f7c9);try{const _0x2ac299=readFileSync(_0x46f7c9,_0x201b6b(0x178)),_0x57f38f=a165_0x4d1874[_0x201b6b(0x17f)](_0x2ac299),_0x4dbce5=_0x57f38f[_0x201b6b(0x186)]();if(!_0x4dbce5)return createParseErrorResult(_0x46f7c9,_0x107f7b,_0x2ac299,_0x201b6b(0x18c));let _0x2a985b;if(isJourneyDef(_0x4dbce5))_0x2a985b='journey';else{if(isCampaignDef(_0x4dbce5))_0x2a985b=_0x201b6b(0x187);else isTemplateDef(_0x4dbce5)?_0x2a985b=_0x201b6b(0x17d):_0x2a985b='segment';}if(_0x968ed2[_0x201b6b(0x18d)]&&_0x2a985b!==_0x968ed2['filterType'])return{'filePath':_0x46f7c9,'relativePath':_0x107f7b,'skipped':!![],'reason':_0x201b6b(0x182)+_0x968ed2[_0x201b6b(0x18d)]};const _0x4ede4f={'source':_0x2ac299,'document':_0x57f38f};let _0x10e585;if(_0x2a985b==='journey')_0x10e585=validateJourneyDef(_0x4dbce5,_0x4ede4f);else{if(_0x2a985b===_0x201b6b(0x187))_0x10e585=validateCampaignDef(_0x4dbce5,_0x4ede4f);else _0x2a985b==='template'?_0x10e585=validateTemplateDef(_0x4dbce5,_0x4ede4f):_0x10e585=validateSegmentDef(_0x4dbce5,_0x4ede4f);}return{'filePath':_0x46f7c9,'relativePath':_0x107f7b,'source':_0x2ac299,'result':_0x10e585,'fileType':_0x2a985b};}catch(_0x1bd0eb){const _0x498b2d=_0x1bd0eb instanceof Error?_0x1bd0eb[_0x201b6b(0x179)]:String(_0x1bd0eb);return createParseErrorResult(_0x46f7c9,_0x107f7b,'',_0x201b6b(0x180)+_0x498b2d);}}export function validateYamlFiles(_0x2fa3fd,_0x260cb8,_0x170bb2={}){const _0x204b59=a165_0x3a465d;return _0x2fa3fd[_0x204b59(0x175)](_0x507944=>validateYamlFile(_0x507944,_0x260cb8,_0x170bb2));}export function calculateSummary(_0x4113a6){const _0x404a20=a165_0x3a465d;let _0x501fb7=0x0,_0x59e831=0x0,_0x27600f=0x0,_0x20edba=0x0;for(const _0x1d3b66 of _0x4113a6){if(!isValidationResult(_0x1d3b66)){_0x20edba++;continue;}_0x1d3b66[_0x404a20(0x188)]['valid']?_0x501fb7++:_0x59e831++,_0x27600f+=_0x1d3b66[_0x404a20(0x188)]['warnings'][_0x404a20(0x17e)];}return{'validCount':_0x501fb7,'invalidCount':_0x59e831,'warningCount':_0x27600f,'skippedCount':_0x20edba,'hasErrors':_0x59e831>0x0};}
@@ -1 +1 @@
1
- (function(_0x4b8718,_0x27b6bb){const _0x56cc7f=a166_0x3bd8,_0x2e3f0e=_0x4b8718();while(!![]){try{const _0x2ce7b8=-parseInt(_0x56cc7f(0x1bb))/0x1*(parseInt(_0x56cc7f(0x193))/0x2)+-parseInt(_0x56cc7f(0x1af))/0x3+-parseInt(_0x56cc7f(0x1a7))/0x4*(-parseInt(_0x56cc7f(0x19f))/0x5)+parseInt(_0x56cc7f(0x1b4))/0x6+-parseInt(_0x56cc7f(0x199))/0x7+-parseInt(_0x56cc7f(0x192))/0x8+parseInt(_0x56cc7f(0x1b9))/0x9*(parseInt(_0x56cc7f(0x1a2))/0xa);if(_0x2ce7b8===_0x27b6bb)break;else _0x2e3f0e['push'](_0x2e3f0e['shift']());}catch(_0x112be1){_0x2e3f0e['push'](_0x2e3f0e['shift']());}}}(a166_0x12d0,0x76f8d));function a166_0x3bd8(_0x1f8817,_0xd1cd41){_0x1f8817=_0x1f8817-0x192;const _0x12d0f1=a166_0x12d0();let _0x3bd890=_0x12d0f1[_0x1f8817];return _0x3bd890;}import*as a166_0xef1368 from'yaml';import a166_0x2ebebe from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x356ba8,_0x10b14a,_0x36dd48){const _0x10b2a2=a166_0x3bd8;if(!_0x356ba8||!_0x10b14a)return undefined;try{let _0x243681=_0x356ba8['getIn'](_0x36dd48,!![]),_0x63040=[..._0x36dd48];while((!_0x243681||typeof _0x243681!=='object'||!('range'in _0x243681)||!_0x243681[_0x10b2a2(0x1a9)])&&_0x63040[_0x10b2a2(0x1b1)]>0x0){_0x63040['pop'](),_0x243681=_0x63040[_0x10b2a2(0x1b1)]>0x0?_0x356ba8[_0x10b2a2(0x194)](_0x63040,!![]):_0x356ba8[_0x10b2a2(0x1ae)];}if(!_0x243681||typeof _0x243681!==_0x10b2a2(0x19a)||!(_0x10b2a2(0x1a9)in _0x243681)||!_0x243681[_0x10b2a2(0x1a9)])return undefined;const [_0x457163]=_0x243681[_0x10b2a2(0x1a9)];return offsetToLocation(_0x10b14a,_0x457163);}catch{return undefined;}}export function offsetToLocation(_0x2e1f61,_0x224572){const _0x50230f=a166_0x3bd8;let _0x4b9cda=0x1,_0x45b479=0x1;for(let _0x20ab12=0x0;_0x20ab12<_0x224572&&_0x20ab12<_0x2e1f61[_0x50230f(0x1b1)];_0x20ab12++){_0x2e1f61[_0x20ab12]==='\x0a'?(_0x4b9cda++,_0x45b479=0x1):_0x45b479++;}return{'line':_0x4b9cda,'column':_0x45b479,'offset':_0x224572};}export function pathToArray(_0x20679d){const _0x20e868=a166_0x3bd8;if(!_0x20679d)return[];return _0x20679d[_0x20e868(0x1a3)]('.')[_0x20e868(0x1a0)](_0x16573b=>{const _0x3c4cef=_0x20e868,_0xf954e=_0x16573b[_0x3c4cef(0x1a8)](/^(\w+)\[(\d+)\]$/);if(_0xf954e)return[_0xf954e[0x1],parseInt(_0xf954e[0x2],0xa)];return[_0x16573b];});}export function formatZodPath(_0x2e177b){let _0x56c845='';for(const _0xa23933 of _0x2e177b){if(typeof _0xa23933==='number')_0x56c845+='['+_0xa23933+']';else{const _0x10f8af=String(_0xa23933);_0x56c845+=_0x56c845?'.'+_0x10f8af:_0x10f8af;}}return _0x56c845;}export function flattenZodIssues(_0x3c4145){const _0x4a290b=a166_0x3bd8,_0xbd5007=[];for(const _0x331cf7 of _0x3c4145){if(_0x331cf7['code']==='invalid_union'&&_0x4a290b(0x1a1)in _0x331cf7){const _0x4ed90d=_0x331cf7[_0x4a290b(0x1a1)];let _0x188f4c=_0x4ed90d[0x0]||[];for(const _0x334968 of _0x4ed90d){_0x334968['length']<_0x188f4c[_0x4a290b(0x1b1)]&&(_0x188f4c=_0x334968);}const _0x4e7110=_0x188f4c['map'](_0x467b26=>({..._0x467b26,'path':[..._0x331cf7['path'],..._0x467b26[_0x4a290b(0x198)]]}));_0xbd5007[_0x4a290b(0x196)](...flattenZodIssues(_0x4e7110));}else _0xbd5007[_0x4a290b(0x196)](_0x331cf7);}return _0xbd5007;}export function safeParseYaml(_0x1d7d20,_0xb29e5d){const _0x2c4f92=a166_0x3bd8,_0x528657=a166_0xef1368['parse'](_0x1d7d20);if(!_0x528657||typeof _0x528657!==_0x2c4f92(0x19a))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0x3e727d=_0xb29e5d['safeParse'](_0x528657);if(!_0x3e727d[_0x2c4f92(0x19c)]){const _0x5637cc=_0x3e727d['error'][_0x2c4f92(0x1ba)][0x0],_0x4fb426=formatZodPath(_0x5637cc[_0x2c4f92(0x198)]);throw new Error(_0x4fb426?'YAML\x20validation\x20error\x20at\x20\x27'+_0x4fb426+_0x2c4f92(0x1aa)+_0x5637cc[_0x2c4f92(0x19d)]:_0x2c4f92(0x1a4)+_0x5637cc['message']);}return _0x3e727d[_0x2c4f92(0x1b3)];}export function formatIssueWithContext(_0x173366,_0x13ba08,_0x3365c0){const _0x36e589=a166_0x3bd8,_0xb29faf=[],_0x441c4d=_0x173366[_0x36e589(0x195)]===_0x36e589(0x19b),_0x2f7378=_0x441c4d?a166_0x2ebebe[_0x36e589(0x1a6)]:a166_0x2ebebe[_0x36e589(0x1b8)],_0x4a2b2d=_0x441c4d?a166_0x2ebebe[_0x36e589(0x1a6)]:a166_0x2ebebe['yellow'],_0x3be4a1=_0x3365c0?a166_0x2ebebe[_0x36e589(0x1a5)](_0x3365c0+':'):'';if(_0x173366[_0x36e589(0x1ad)]){const _0x496b5d=a166_0x2ebebe['cyan'](_0x173366['location']['line']+':'+_0x173366['location'][_0x36e589(0x1b2)]);_0xb29faf['push'](''+_0x3be4a1+_0x496b5d+':\x20'+_0x2f7378(_0x173366[_0x36e589(0x195)])+'\x20'+_0x4a2b2d('['+_0x173366[_0x36e589(0x1b0)]+']'));}else _0xb29faf[_0x36e589(0x196)](''+_0x3be4a1+a166_0x2ebebe[_0x36e589(0x19e)](_0x173366[_0x36e589(0x198)])+':\x20'+_0x2f7378(_0x173366[_0x36e589(0x195)])+'\x20'+_0x4a2b2d('['+_0x173366[_0x36e589(0x1b0)]+']'));_0xb29faf[_0x36e589(0x196)](_0x173366['message']);if(_0x173366[_0x36e589(0x1ad)]&&_0x13ba08){const _0x3060b3=_0x13ba08[_0x36e589(0x1a3)]('\x0a'),{line:_0x2849af,column:_0x43e200}=_0x173366[_0x36e589(0x1ad)],_0x443c45=Math['max'](0x1,_0x2849af-0x1),_0x49a7e7=Math[_0x36e589(0x1ac)](_0x3060b3['length'],_0x2849af+0x1);_0xb29faf[_0x36e589(0x196)]('');for(let _0x5f3019=_0x443c45;_0x5f3019<=_0x49a7e7;_0x5f3019++){const _0x5a7fbc=_0x3060b3[_0x5f3019-0x1]||'',_0x1ac1a0=a166_0x2ebebe['dim'](_0x5f3019[_0x36e589(0x197)]()[_0x36e589(0x1b6)](0x4)),_0x18a495=a166_0x2ebebe[_0x36e589(0x19e)]('\x20|\x20');if(_0x5f3019===_0x2849af){_0xb29faf[_0x36e589(0x196)]('\x20\x20'+_0x1ac1a0+_0x18a495+_0x2f7378(_0x5a7fbc));const _0x41efd5='\x20'[_0x36e589(0x1b5)](0x4+0x3+_0x43e200-0x1);_0xb29faf['push']('\x20\x20'+_0x41efd5+_0x2f7378('^'));}else _0xb29faf[_0x36e589(0x196)]('\x20\x20'+_0x1ac1a0+_0x18a495+a166_0x2ebebe[_0x36e589(0x19e)](_0x5a7fbc));}}return _0xb29faf['join']('\x0a');}export function formatValidationResult(_0xb08906,_0x47b97c,_0x37a870){const _0x5ae9d2=a166_0x3bd8,_0x426732=[];for(const _0x3b824a of _0xb08906[_0x5ae9d2(0x1a1)]){_0x426732['push'](formatIssueWithContext(_0x3b824a,_0x47b97c,_0x37a870)),_0x426732[_0x5ae9d2(0x196)]('');}for(const _0x1c33aa of _0xb08906[_0x5ae9d2(0x1ab)]){_0x426732[_0x5ae9d2(0x196)](formatIssueWithContext(_0x1c33aa,_0x47b97c,_0x37a870)),_0x426732[_0x5ae9d2(0x196)]('');}return _0x426732[_0x5ae9d2(0x1b7)]('\x0a');}function a166_0x12d0(){const _0x35263e=['errors','10MYBkWO','split','YAML\x20validation\x20error:\x20','cyan','red','1002924SdTbas','match','range','\x27:\x20','warnings','min','location','contents','536595IGzkZd','code','length','column','data','983538yChLrd','repeat','padStart','join','yellow','16487973IOiPRm','issues','11DKQdOh','6643416OVqvQD','154558MQUjKL','getIn','level','push','toString','path','2810101EkHlDH','object','error','success','message','dim','15YALIBu','flatMap'];a166_0x12d0=function(){return _0x35263e;};return a166_0x12d0();}
1
+ (function(_0x34cf10,_0x3ef0d8){const _0x32491a=a166_0x2875,_0xced3f7=_0x34cf10();while(!![]){try{const _0x213eb9=parseInt(_0x32491a(0x128))/0x1+parseInt(_0x32491a(0x125))/0x2+parseInt(_0x32491a(0x137))/0x3*(parseInt(_0x32491a(0x10b))/0x4)+parseInt(_0x32491a(0x136))/0x5*(parseInt(_0x32491a(0x133))/0x6)+parseInt(_0x32491a(0x11e))/0x7*(-parseInt(_0x32491a(0x121))/0x8)+-parseInt(_0x32491a(0x11b))/0x9+parseInt(_0x32491a(0x135))/0xa*(-parseInt(_0x32491a(0x113))/0xb);if(_0x213eb9===_0x3ef0d8)break;else _0xced3f7['push'](_0xced3f7['shift']());}catch(_0x4e156e){_0xced3f7['push'](_0xced3f7['shift']());}}}(a166_0x538d,0x5692d));import*as a166_0x192a06 from'yaml';import a166_0x529479 from'chalk';function a166_0x538d(){const _0x1d3d2c=['data','YAML\x20validation\x20error:\x20','cyan','YAML\x20validation\x20error\x20at\x20\x27','toString','red','match','6220836HqGzvM','message','join','14aYVKnz','max','level','1797128XDOhsP','line','error','object','1350252MXqipS','push','invalid_union','317602fompPI','dim','map','errors','length','min','path','padStart','flatMap','range','pop','186JCaqYR','parse','10XQJjPv','68610AReFgR','12HKLGsO','success','repeat','175544VZtPzg','issues','yellow','warnings','getIn','split','location','code','1084193ngQtXv'];a166_0x538d=function(){return _0x1d3d2c;};return a166_0x538d();}export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x3498a9,_0x5812e9,_0x8583b1){const _0x3faf8a=a166_0x2875;if(!_0x3498a9||!_0x5812e9)return undefined;try{let _0x21c303=_0x3498a9[_0x3faf8a(0x10f)](_0x8583b1,!![]),_0x10619e=[..._0x8583b1];while((!_0x21c303||typeof _0x21c303!==_0x3faf8a(0x124)||!(_0x3faf8a(0x131)in _0x21c303)||!_0x21c303[_0x3faf8a(0x131)])&&_0x10619e[_0x3faf8a(0x12c)]>0x0){_0x10619e[_0x3faf8a(0x132)](),_0x21c303=_0x10619e[_0x3faf8a(0x12c)]>0x0?_0x3498a9['getIn'](_0x10619e,!![]):_0x3498a9['contents'];}if(!_0x21c303||typeof _0x21c303!==_0x3faf8a(0x124)||!(_0x3faf8a(0x131)in _0x21c303)||!_0x21c303['range'])return undefined;const [_0x24b641]=_0x21c303[_0x3faf8a(0x131)];return offsetToLocation(_0x5812e9,_0x24b641);}catch{return undefined;}}export function offsetToLocation(_0xd632d3,_0x4f0af4){const _0xef65d4=a166_0x2875;let _0x9c7694=0x1,_0x460e0e=0x1;for(let _0x510535=0x0;_0x510535<_0x4f0af4&&_0x510535<_0xd632d3[_0xef65d4(0x12c)];_0x510535++){_0xd632d3[_0x510535]==='\x0a'?(_0x9c7694++,_0x460e0e=0x1):_0x460e0e++;}return{'line':_0x9c7694,'column':_0x460e0e,'offset':_0x4f0af4};}export function pathToArray(_0x6ee64a){const _0x4cd881=a166_0x2875;if(!_0x6ee64a)return[];return _0x6ee64a[_0x4cd881(0x110)]('.')[_0x4cd881(0x130)](_0x1623fa=>{const _0x49d13a=_0x4cd881,_0x182ee6=_0x1623fa[_0x49d13a(0x11a)](/^(\w+)\[(\d+)\]$/);if(_0x182ee6)return[_0x182ee6[0x1],parseInt(_0x182ee6[0x2],0xa)];return[_0x1623fa];});}export function formatZodPath(_0x2fa52d){let _0x461df2='';for(const _0xa2c221 of _0x2fa52d){if(typeof _0xa2c221==='number')_0x461df2+='['+_0xa2c221+']';else{const _0x4db399=String(_0xa2c221);_0x461df2+=_0x461df2?'.'+_0x4db399:_0x4db399;}}return _0x461df2;}export function flattenZodIssues(_0x3d715c){const _0x5d81e0=a166_0x2875,_0x38fa21=[];for(const _0x538659 of _0x3d715c){if(_0x538659[_0x5d81e0(0x112)]===_0x5d81e0(0x127)&&_0x5d81e0(0x12b)in _0x538659){const _0x38bf8c=_0x538659[_0x5d81e0(0x12b)];let _0x5c30db=_0x38bf8c[0x0]||[];for(const _0x49562a of _0x38bf8c){_0x49562a[_0x5d81e0(0x12c)]<_0x5c30db[_0x5d81e0(0x12c)]&&(_0x5c30db=_0x49562a);}const _0x77c423=_0x5c30db[_0x5d81e0(0x12a)](_0x5d85ae=>({..._0x5d85ae,'path':[..._0x538659[_0x5d81e0(0x12e)],..._0x5d85ae['path']]}));_0x38fa21[_0x5d81e0(0x126)](...flattenZodIssues(_0x77c423));}else _0x38fa21[_0x5d81e0(0x126)](_0x538659);}return _0x38fa21;}export function safeParseYaml(_0x5983a8,_0x4bf683){const _0x43f84b=a166_0x2875,_0x3cbe87=a166_0x192a06[_0x43f84b(0x134)](_0x5983a8);if(!_0x3cbe87||typeof _0x3cbe87!=='object')throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0x154ebb=_0x4bf683['safeParse'](_0x3cbe87);if(!_0x154ebb[_0x43f84b(0x109)]){const _0x2de5f5=_0x154ebb[_0x43f84b(0x123)][_0x43f84b(0x10c)][0x0],_0x3e8122=formatZodPath(_0x2de5f5[_0x43f84b(0x12e)]);throw new Error(_0x3e8122?_0x43f84b(0x117)+_0x3e8122+'\x27:\x20'+_0x2de5f5[_0x43f84b(0x11c)]:_0x43f84b(0x115)+_0x2de5f5['message']);}return _0x154ebb[_0x43f84b(0x114)];}function a166_0x2875(_0x19d181,_0xb553dc){_0x19d181=_0x19d181-0x109;const _0x538d28=a166_0x538d();let _0x2875b7=_0x538d28[_0x19d181];return _0x2875b7;}export function formatIssueWithContext(_0x4478ed,_0x47751d,_0x31252b){const _0x658f06=a166_0x2875,_0xe36e21=[],_0x305836=_0x4478ed[_0x658f06(0x120)]===_0x658f06(0x123),_0x48d466=_0x305836?a166_0x529479['red']:a166_0x529479['yellow'],_0x3cb180=_0x305836?a166_0x529479[_0x658f06(0x119)]:a166_0x529479[_0x658f06(0x10d)],_0x232104=_0x31252b?a166_0x529479[_0x658f06(0x116)](_0x31252b+':'):'';if(_0x4478ed[_0x658f06(0x111)]){const _0x5350e9=a166_0x529479[_0x658f06(0x116)](_0x4478ed[_0x658f06(0x111)][_0x658f06(0x122)]+':'+_0x4478ed[_0x658f06(0x111)]['column']);_0xe36e21[_0x658f06(0x126)](''+_0x232104+_0x5350e9+':\x20'+_0x48d466(_0x4478ed[_0x658f06(0x120)])+'\x20'+_0x3cb180('['+_0x4478ed['code']+']'));}else _0xe36e21[_0x658f06(0x126)](''+_0x232104+a166_0x529479[_0x658f06(0x129)](_0x4478ed[_0x658f06(0x12e)])+':\x20'+_0x48d466(_0x4478ed[_0x658f06(0x120)])+'\x20'+_0x3cb180('['+_0x4478ed[_0x658f06(0x112)]+']'));_0xe36e21[_0x658f06(0x126)](_0x4478ed[_0x658f06(0x11c)]);if(_0x4478ed['location']&&_0x47751d){const _0x10b788=_0x47751d[_0x658f06(0x110)]('\x0a'),{line:_0x167e41,column:_0x4545c1}=_0x4478ed['location'],_0x207b68=Math[_0x658f06(0x11f)](0x1,_0x167e41-0x1),_0x1f9c54=Math[_0x658f06(0x12d)](_0x10b788[_0x658f06(0x12c)],_0x167e41+0x1);_0xe36e21[_0x658f06(0x126)]('');for(let _0x45d299=_0x207b68;_0x45d299<=_0x1f9c54;_0x45d299++){const _0x5e0656=_0x10b788[_0x45d299-0x1]||'',_0x90bb3f=a166_0x529479[_0x658f06(0x129)](_0x45d299[_0x658f06(0x118)]()[_0x658f06(0x12f)](0x4)),_0x24c470=a166_0x529479[_0x658f06(0x129)]('\x20|\x20');if(_0x45d299===_0x167e41){_0xe36e21['push']('\x20\x20'+_0x90bb3f+_0x24c470+_0x48d466(_0x5e0656));const _0x1aabdd='\x20'[_0x658f06(0x10a)](0x4+0x3+_0x4545c1-0x1);_0xe36e21[_0x658f06(0x126)]('\x20\x20'+_0x1aabdd+_0x48d466('^'));}else _0xe36e21[_0x658f06(0x126)]('\x20\x20'+_0x90bb3f+_0x24c470+a166_0x529479[_0x658f06(0x129)](_0x5e0656));}}return _0xe36e21[_0x658f06(0x11d)]('\x0a');}export function formatValidationResult(_0x46d2a4,_0x42b359,_0x4849d7){const _0xa9c818=a166_0x2875,_0x1c812f=[];for(const _0x7c1f4 of _0x46d2a4['errors']){_0x1c812f[_0xa9c818(0x126)](formatIssueWithContext(_0x7c1f4,_0x42b359,_0x4849d7)),_0x1c812f[_0xa9c818(0x126)]('');}for(const _0x3f53f1 of _0x46d2a4[_0xa9c818(0x10e)]){_0x1c812f[_0xa9c818(0x126)](formatIssueWithContext(_0x3f53f1,_0x42b359,_0x4849d7)),_0x1c812f['push']('');}return _0x1c812f[_0xa9c818(0x11d)]('\x0a');}