@treasuredata/tdx 2026.9.2 → 2026.10.0

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 (319) 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.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/ai-usage-command-base.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/auth-command.d.ts.map +1 -1
  13. package/dist/commands/auth-command.js +1 -1
  14. package/dist/commands/auth-command.js.map +1 -1
  15. package/dist/commands/cas-command.js +1 -1
  16. package/dist/commands/cas-journey-command.d.ts +34 -0
  17. package/dist/commands/cas-journey-command.d.ts.map +1 -0
  18. package/dist/commands/cas-journey-command.js +1 -0
  19. package/dist/commands/cas-journey-command.js.map +1 -0
  20. package/dist/commands/cas-segment-command.js +1 -1
  21. package/dist/commands/chat-command.js +1 -1
  22. package/dist/commands/claude-command.d.ts +11 -0
  23. package/dist/commands/claude-command.d.ts.map +1 -1
  24. package/dist/commands/claude-command.js +1 -1
  25. package/dist/commands/claude-command.js.map +1 -1
  26. package/dist/commands/claude-statusline-command.js +1 -1
  27. package/dist/commands/claude-usage-command.js +1 -1
  28. package/dist/commands/codex-command.d.ts.map +1 -1
  29. package/dist/commands/codex-command.js +1 -1
  30. package/dist/commands/codex-command.js.map +1 -1
  31. package/dist/commands/command.js +1 -1
  32. package/dist/commands/connection-command.js +1 -1
  33. package/dist/commands/databases.js +1 -1
  34. package/dist/commands/delivery-command.js +1 -1
  35. package/dist/commands/describe.js +1 -1
  36. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  37. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  38. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  39. package/dist/commands/engage-campaign-pull-command.js +1 -1
  40. package/dist/commands/engage-campaign-push-command.js +1 -1
  41. package/dist/commands/engage-campaign-readiness-command.js +1 -1
  42. package/dist/commands/engage-campaign-validate-command.js +1 -1
  43. package/dist/commands/engage-command.js +1 -1
  44. package/dist/commands/engage-in-browser-message-command.js +1 -1
  45. package/dist/commands/engage-landing-page-command.js +1 -1
  46. package/dist/commands/engage-template-pull-command.js +1 -1
  47. package/dist/commands/engage-template-push-command.js +1 -1
  48. package/dist/commands/engage-template-validate-command.js +1 -1
  49. package/dist/commands/engage-workspace-assignment-command.js +1 -1
  50. package/dist/commands/job-command.js +1 -1
  51. package/dist/commands/journey-command.d.ts +46 -0
  52. package/dist/commands/journey-command.d.ts.map +1 -1
  53. package/dist/commands/journey-command.js +1 -1
  54. package/dist/commands/journey-command.js.map +1 -1
  55. package/dist/commands/journey-validate-command.js +1 -1
  56. package/dist/commands/llm-command.js +1 -1
  57. package/dist/commands/mcp-command.js +1 -1
  58. package/dist/commands/opencode-command.d.ts +25 -0
  59. package/dist/commands/opencode-command.d.ts.map +1 -1
  60. package/dist/commands/opencode-command.js +1 -1
  61. package/dist/commands/opencode-command.js.map +1 -1
  62. package/dist/commands/opencode-usage-command.js +1 -1
  63. package/dist/commands/p13n-command.js +1 -1
  64. package/dist/commands/parent-segment-command.js +1 -1
  65. package/dist/commands/policy-command.js +1 -1
  66. package/dist/commands/profile-command.js +1 -1
  67. package/dist/commands/profiles-command.js +1 -1
  68. package/dist/commands/query-command.js +1 -1
  69. package/dist/commands/schedule-command.js +1 -1
  70. package/dist/commands/segment-command.js +1 -1
  71. package/dist/commands/segment-create-command.js +1 -1
  72. package/dist/commands/segment-fields-command.js +1 -1
  73. package/dist/commands/segment-move-command.js +1 -1
  74. package/dist/commands/segment-pull-command.js +1 -1
  75. package/dist/commands/segment-push-command.js +1 -1
  76. package/dist/commands/segment-update-command.js +1 -1
  77. package/dist/commands/segment-use-command.js +1 -1
  78. package/dist/commands/segment-validate-command.js +1 -1
  79. package/dist/commands/segments.js +1 -1
  80. package/dist/commands/show.js +1 -1
  81. package/dist/commands/status-command.js +1 -1
  82. package/dist/commands/table-deleted.js +1 -1
  83. package/dist/commands/tables.js +1 -1
  84. package/dist/commands/unset-command.js +1 -1
  85. package/dist/commands/upgrade-command.js +1 -1
  86. package/dist/commands/use-command.js +1 -1
  87. package/dist/commands/user-command.js +1 -1
  88. package/dist/commands/work-command.js +1 -1
  89. package/dist/commands/workflow-command.js +1 -1
  90. package/dist/core/auth.d.ts +10 -1
  91. package/dist/core/auth.d.ts.map +1 -1
  92. package/dist/core/auth.js +1 -1
  93. package/dist/core/auth.js.map +1 -1
  94. package/dist/core/command-output.js +1 -1
  95. package/dist/core/config.js +1 -1
  96. package/dist/core/connection-cache.js +1 -1
  97. package/dist/core/constants.js +1 -1
  98. package/dist/core/credential-cache.js +1 -1
  99. package/dist/core/global-context.js +1 -1
  100. package/dist/core/keychain.js +1 -1
  101. package/dist/core/oauth-keychain.js +1 -1
  102. package/dist/core/oauth.js +1 -1
  103. package/dist/core/profile.js +1 -1
  104. package/dist/core/project-config.js +1 -1
  105. package/dist/core/session.js +1 -1
  106. package/dist/core/site-mismatch.js +1 -1
  107. package/dist/core/user-cache.js +1 -1
  108. package/dist/core/version.js +1 -1
  109. package/dist/index.js +1 -1
  110. package/dist/mcp/server.js +1 -1
  111. package/dist/mcp/tools/index.js +1 -1
  112. package/dist/mcp/tools/tdx-run.js +1 -1
  113. package/dist/mcp/tools/tdx-search.js +1 -1
  114. package/dist/mcp/tools/work-create-item.js +1 -1
  115. package/dist/mcp/utils.js +1 -1
  116. package/dist/proxy/claude-usage-tracker.d.ts +1 -0
  117. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
  118. package/dist/proxy/claude-usage-tracker.js +1 -1
  119. package/dist/proxy/claude-usage-tracker.js.map +1 -1
  120. package/dist/proxy/passthrough-server.d.ts +2 -0
  121. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  122. package/dist/proxy/passthrough-server.js +1 -1
  123. package/dist/proxy/passthrough-server.js.map +1 -1
  124. package/dist/proxy/sse-usage-parser.d.ts +2 -0
  125. package/dist/proxy/sse-usage-parser.d.ts.map +1 -1
  126. package/dist/proxy/sse-usage-parser.js +1 -1
  127. package/dist/proxy/sse-usage-parser.js.map +1 -1
  128. package/dist/sdk/agent/agent-config.js +1 -1
  129. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  130. package/dist/sdk/agent/agent-yaml.js +1 -1
  131. package/dist/sdk/agent/test/evaluator.js +1 -1
  132. package/dist/sdk/agent/test/executor.js +1 -1
  133. package/dist/sdk/agent/test/index.js +1 -1
  134. package/dist/sdk/agent/test/output.js +1 -1
  135. package/dist/sdk/agent/test/parser.js +1 -1
  136. package/dist/sdk/agent/tool-target-registry.js +1 -1
  137. package/dist/sdk/api.js +1 -1
  138. package/dist/sdk/auth-token.js +1 -1
  139. package/dist/sdk/cas/audience-context.d.ts +33 -0
  140. package/dist/sdk/cas/audience-context.d.ts.map +1 -0
  141. package/dist/sdk/cas/audience-context.js +1 -0
  142. package/dist/sdk/cas/audience-context.js.map +1 -0
  143. package/dist/sdk/cas/cas-api-client.js +1 -1
  144. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  145. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  146. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  147. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  148. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  149. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  150. package/dist/sdk/cas/index.d.ts +8 -0
  151. package/dist/sdk/cas/index.d.ts.map +1 -1
  152. package/dist/sdk/cas/index.js +1 -1
  153. package/dist/sdk/cas/index.js.map +1 -1
  154. package/dist/sdk/cas/pull-workflow.js +1 -1
  155. package/dist/sdk/cas/push-workflow.js +1 -1
  156. package/dist/sdk/cas/validate-files.js +1 -1
  157. package/dist/sdk/client/cdp-api-client.js +1 -1
  158. package/dist/sdk/client/delivery-api-client.js +1 -1
  159. package/dist/sdk/client/endpoints.js +1 -1
  160. package/dist/sdk/client/engage-api-client.js +1 -1
  161. package/dist/sdk/client/http-client.js +1 -1
  162. package/dist/sdk/client/llm-api-client.js +1 -1
  163. package/dist/sdk/client/oauth-refresh.js +1 -1
  164. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  165. package/dist/sdk/client/rate-limiter.js +1 -1
  166. package/dist/sdk/client/td-api-client.js +1 -1
  167. package/dist/sdk/client/trino-api-client.js +1 -1
  168. package/dist/sdk/client/workflow-client.js +1 -1
  169. package/dist/sdk/connection-validator.js +1 -1
  170. package/dist/sdk/connection.js +1 -1
  171. package/dist/sdk/delivery.js +1 -1
  172. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  173. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  174. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  175. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  176. package/dist/sdk/engage/campaign-pull.js +1 -1
  177. package/dist/sdk/engage/campaign-push.js +1 -1
  178. package/dist/sdk/engage/campaign-readiness-workflow.js +1 -1
  179. package/dist/sdk/engage/campaign-readiness.js +1 -1
  180. package/dist/sdk/engage/campaign-validator.js +1 -1
  181. package/dist/sdk/engage/campaign-yaml.js +1 -1
  182. package/dist/sdk/engage/in-browser-message-pull.js +1 -1
  183. package/dist/sdk/engage/in-browser-message-push.js +1 -1
  184. package/dist/sdk/engage/in-browser-message-validator.js +1 -1
  185. package/dist/sdk/engage/in-browser-message-yaml.js +1 -1
  186. package/dist/sdk/engage/landing-page-init.js +1 -1
  187. package/dist/sdk/engage/landing-page-public-asset.js +1 -1
  188. package/dist/sdk/engage/landing-page-pull.js +1 -1
  189. package/dist/sdk/engage/landing-page-push.js +1 -1
  190. package/dist/sdk/engage/landing-page-static-site.js +1 -1
  191. package/dist/sdk/engage/landing-page-validator.js +1 -1
  192. package/dist/sdk/engage/landing-page-workspace.js +1 -1
  193. package/dist/sdk/engage/landing-page-yaml.js +1 -1
  194. package/dist/sdk/engage/list-campaign-schema.js +1 -1
  195. package/dist/sdk/engage/list-campaign-yaml.js +1 -1
  196. package/dist/sdk/engage/template-pull.js +1 -1
  197. package/dist/sdk/engage/template-push.js +1 -1
  198. package/dist/sdk/engage/template-validator.js +1 -1
  199. package/dist/sdk/engage/template-yaml.js +1 -1
  200. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  201. package/dist/sdk/engage/types/campaign-def.js +1 -1
  202. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  203. package/dist/sdk/engage/types/in-browser-message-schema.js +1 -1
  204. package/dist/sdk/engage/types/landing-page-schema.js +1 -1
  205. package/dist/sdk/engage/types/template-schema.js +1 -1
  206. package/dist/sdk/engage/workspace-assignments.js +1 -1
  207. package/dist/sdk/engage.js +1 -1
  208. package/dist/sdk/errors.js +1 -1
  209. package/dist/sdk/index.js +1 -1
  210. package/dist/sdk/io/index.js +1 -1
  211. package/dist/sdk/io/node-filesystem.js +1 -1
  212. package/dist/sdk/job.js +1 -1
  213. package/dist/sdk/journey.d.ts +4 -1
  214. package/dist/sdk/journey.d.ts.map +1 -1
  215. package/dist/sdk/journey.js +1 -1
  216. package/dist/sdk/journey.js.map +1 -1
  217. package/dist/sdk/llm/chat-cache.js +1 -1
  218. package/dist/sdk/llm/index.js +1 -1
  219. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  220. package/dist/sdk/llm/model-factors.d.ts +5 -3
  221. package/dist/sdk/llm/model-factors.d.ts.map +1 -1
  222. package/dist/sdk/llm/model-factors.js +1 -1
  223. package/dist/sdk/llm/model-factors.js.map +1 -1
  224. package/dist/sdk/llm/user-settings.js +1 -1
  225. package/dist/sdk/p13n-studio-errors.js +1 -1
  226. package/dist/sdk/p13n-studio.js +1 -1
  227. package/dist/sdk/personalization.js +1 -1
  228. package/dist/sdk/policy.js +1 -1
  229. package/dist/sdk/query/deleted-table-validation.js +1 -1
  230. package/dist/sdk/query/index.js +1 -1
  231. package/dist/sdk/query/sql-parser.js +1 -1
  232. package/dist/sdk/realtime.js +1 -1
  233. package/dist/sdk/schedule.js +1 -1
  234. package/dist/sdk/segment/audience-context.js +1 -1
  235. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  236. package/dist/sdk/segment/fields-display.js +1 -1
  237. package/dist/sdk/segment/file-discovery.js +1 -1
  238. package/dist/sdk/segment/journey-utils.js +1 -1
  239. package/dist/sdk/segment/journey-validator.js +1 -1
  240. package/dist/sdk/segment/journey-yaml.js +1 -1
  241. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  242. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  243. package/dist/sdk/segment/pull-workflow.js +1 -1
  244. package/dist/sdk/segment/push-recovery.js +1 -1
  245. package/dist/sdk/segment/push-workflow.js +1 -1
  246. package/dist/sdk/segment/resolution-context.js +1 -1
  247. package/dist/sdk/segment/segment-path-parser.js +1 -1
  248. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  249. package/dist/sdk/segment/segment-validator.js +1 -1
  250. package/dist/sdk/segment/target-resolution.js +1 -1
  251. package/dist/sdk/segment/tdx-config.js +1 -1
  252. package/dist/sdk/segment/types/activation-schema.js +1 -1
  253. package/dist/sdk/segment/types/journey-def.js +1 -1
  254. package/dist/sdk/segment/types/journey-schema.js +1 -1
  255. package/dist/sdk/segment/types/segment-def.js +1 -1
  256. package/dist/sdk/segment/types/segment-schema.js +1 -1
  257. package/dist/sdk/segment/validate-files.js +1 -1
  258. package/dist/sdk/segment/yaml-validator.js +1 -1
  259. package/dist/sdk/segment.js +1 -1
  260. package/dist/sdk/types/index.js +1 -1
  261. package/dist/sdk/types/progress.js +1 -1
  262. package/dist/sdk/types/workspace.js +1 -1
  263. package/dist/sdk/user.js +1 -1
  264. package/dist/sdk/util/format-detector.js +1 -1
  265. package/dist/sdk/util/formatters.js +1 -1
  266. package/dist/sdk/util/index.js +1 -1
  267. package/dist/sdk/util/paginate.js +1 -1
  268. package/dist/sdk/util/tree-formatter.js +1 -1
  269. package/dist/sdk/util/tree-search.js +1 -1
  270. package/dist/sdk/workflow/archive-validation.js +1 -1
  271. package/dist/sdk/workflow/clone-workflow.js +1 -1
  272. package/dist/sdk/workflow/index.js +1 -1
  273. package/dist/sdk/workflow/pull-workflow.js +1 -1
  274. package/dist/sdk/workflow/push-workflow.js +1 -1
  275. package/dist/sdk/workflow/task-graph.js +1 -1
  276. package/dist/sdk/workflow/tdx-config.js +1 -1
  277. package/dist/sdk/workflow/workflow-utils.js +1 -1
  278. package/dist/sdk/workspace/access-tracker.js +1 -1
  279. package/dist/sdk/workspace/frontmatter.js +1 -1
  280. package/dist/sdk/workspace/git.js +1 -1
  281. package/dist/sdk/workspace/index.js +1 -1
  282. package/dist/sdk/workspace/templates.js +1 -1
  283. package/dist/sdk/workspace/weekly.js +1 -1
  284. package/dist/sdk/workspace/wikilinks.js +1 -1
  285. package/dist/test-utils/command-runner.js +1 -1
  286. package/dist/test-utils/factories.js +1 -1
  287. package/dist/test-utils/fixtures.js +1 -1
  288. package/dist/test-utils/http-mock.js +1 -1
  289. package/dist/test-utils/index.js +1 -1
  290. package/dist/utils/async.js +1 -1
  291. package/dist/utils/claude-code-state.js +1 -1
  292. package/dist/utils/colors.js +1 -1
  293. package/dist/utils/diff.js +1 -1
  294. package/dist/utils/file-permissions.js +1 -1
  295. package/dist/utils/file-reader.js +1 -1
  296. package/dist/utils/github-releases.js +1 -1
  297. package/dist/utils/global-cache.js +1 -1
  298. package/dist/utils/json-loader.js +1 -1
  299. package/dist/utils/local-cache.js +1 -1
  300. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  301. package/dist/utils/logger/formatters/index.js +1 -1
  302. package/dist/utils/logger/handlers/console-handler.js +1 -1
  303. package/dist/utils/logger/handlers/file-handler.js +1 -1
  304. package/dist/utils/logger/handlers/index.js +1 -1
  305. package/dist/utils/logger/handlers/null-handler.js +1 -1
  306. package/dist/utils/logger/index.js +1 -1
  307. package/dist/utils/logger/logger.js +1 -1
  308. package/dist/utils/logger/types.js +1 -1
  309. package/dist/utils/option-validation.js +1 -1
  310. package/dist/utils/process.js +1 -1
  311. package/dist/utils/prompt.js +1 -1
  312. package/dist/utils/proxy-fetch.js +1 -1
  313. package/dist/utils/spinner.js +1 -1
  314. package/dist/utils/sse-parser.js +1 -1
  315. package/dist/utils/string-utils.js +1 -1
  316. package/dist/utils/table-ref-parser.js +1 -1
  317. package/dist/utils/tdx-logger.js +1 -1
  318. package/dist/utils/version-check.js +1 -1
  319. package/package.json +2 -1
@@ -1 +1 @@
1
- (function(_0x127233,_0x19238d){const _0x4a34c8=a208_0x1382,_0x375424=_0x127233();while(!![]){try{const _0x14d492=parseInt(_0x4a34c8(0x1a1))/0x1+-parseInt(_0x4a34c8(0x1b1))/0x2+-parseInt(_0x4a34c8(0x1ad))/0x3+-parseInt(_0x4a34c8(0x1bf))/0x4+-parseInt(_0x4a34c8(0x19b))/0x5+-parseInt(_0x4a34c8(0x1aa))/0x6*(parseInt(_0x4a34c8(0x18f))/0x7)+-parseInt(_0x4a34c8(0x19c))/0x8*(-parseInt(_0x4a34c8(0x1bb))/0x9);if(_0x14d492===_0x19238d)break;else _0x375424['push'](_0x375424['shift']());}catch(_0x2caac6){_0x375424['push'](_0x375424['shift']());}}}(a208_0x3e6a,0x4e79d));import a208_0x3cbb15 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(_0x58713e){const _0x27f7be=a208_0x1382;return _0x58713e[_0x27f7be(0x1ab)]!==_0x27f7be(0x190);}function a208_0x1382(_0x383a40,_0x42fbbf){_0x383a40=_0x383a40-0x187;const _0x3e6a08=a208_0x3e6a();let _0x13823=_0x3e6a08[_0x383a40];return _0x13823;}export function isScopedResolution(_0x10d4ca){const _0x3ed12c=a208_0x1382;return _0x10d4ca['type']===_0x3ed12c(0x187)||_0x10d4ca[_0x3ed12c(0x1ab)]===_0x3ed12c(0x1b8)||_0x10d4ca[_0x3ed12c(0x1ab)]===_0x3ed12c(0x1ae);}function a208_0x3e6a(){const _0x39ac2d=['file_not_found','string','match','segment','Not\x20a\x20YAML\x20file:\x20','File\x20not\x20found','join','6QjSfBO','type','isDirectory','1690680geexaI','context','root','No\x20tdx.json\x20found','620714AHWWnq','segmentName','parent_segment','File\x20not\x20found:\x20','journey','trim','parse','file','readFile','tdx.json','2885319IwSgCH','parentSegment','resolve','scopedFolderPath','1818848xLunWk','directory','resourceType','invalid_yaml','exists','replace','message','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','dirname','1770755xDidTE','error','startsWith','isScoped','configDir','isFile','Parent\x20segment\x20not\x20specified','no_parent','extname','folderPath','parent_name','stat','1212335SlPMYT','40HQhlqt','includes','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','no_config','No\x20tdx.json\x20found\x20for\x20file:\x20','542543huXVgf','basename'];a208_0x3e6a=function(){return _0x39ac2d;};return a208_0x3e6a();}export function getScopedDetails(_0x5066dc){const _0x43c1a7=a208_0x1382;if(isScopedResolution(_0x5066dc))return{'isScoped':_0x5066dc[_0x43c1a7(0x192)],'scopedFolderPath':_0x5066dc[_0x43c1a7(0x1be)]};return undefined;}async function findTdxConfigAsync(_0x167b83,_0x4541a1){const _0x37abba=a208_0x1382;let _0x595ca4=a208_0x3cbb15[_0x37abba(0x1bd)](_0x167b83);const _0x2c19da=a208_0x3cbb15[_0x37abba(0x1b7)](_0x595ca4)[_0x37abba(0x1af)];while(_0x595ca4!==_0x2c19da){const _0x50de2e=a208_0x3cbb15[_0x37abba(0x1a9)](_0x595ca4,_0x37abba(0x1ba));if(await _0x4541a1[_0x37abba(0x18a)](_0x50de2e))try{const _0x1dace1=await _0x4541a1[_0x37abba(0x1b9)](_0x50de2e),_0x322afc=JSON[_0x37abba(0x1b7)](_0x1dace1);if(_0x322afc[_0x37abba(0x1b3)]&&typeof _0x322afc['parent_segment']===_0x37abba(0x1a4))return{'configPath':_0x50de2e,'configDir':_0x595ca4,'parentSegment':_0x322afc[_0x37abba(0x1b3)]};}catch{}_0x595ca4=a208_0x3cbb15['dirname'](_0x595ca4);}return null;}function calculateScopedPath(_0x7ba3e9,_0x55edd4){const _0x415eb1=a208_0x1382,_0x2fa763=a208_0x3cbb15['relative'](_0x55edd4,_0x7ba3e9),_0x1eea39=_0x2fa763!==''&&_0x2fa763!=='.'&&!_0x2fa763[_0x415eb1(0x191)]('..');return{'isScoped':_0x1eea39,'scopedFolderPath':_0x1eea39?_0x2fa763[_0x415eb1(0x18b)](/\\/g,'/'):''};}export async function resolveTarget(_0x39cf73){const _0x2bbc90=a208_0x1382,{arg:_0xbdf751,contextParent:_0x461864,cwd:cwd=process['cwd'](),fs:fs=nodeFileSystem}=_0x39cf73;if(_0xbdf751&&isYamlFilePath(_0xbdf751))try{const _0xe84bc=await resolveYamlFilePath(_0xbdf751,fs),_0x209ed3=a208_0x3cbb15[_0x2bbc90(0x1bd)](_0xbdf751),_0x3611fd=a208_0x3cbb15[_0x2bbc90(0x18e)](_0x209ed3),_0x3c8110=await findTdxConfigAsync(_0x3611fd,fs);if(!_0x3c8110){if(_0x461864){const _0x5f0b9e=a208_0x3cbb15[_0x2bbc90(0x18e)](_0x209ed3);return{'type':_0x2bbc90(0x1b8),'parentName':_0x461864,'targetDir':_0x5f0b9e,'configRoot':_0x5f0b9e,'filePath':_0x209ed3,'resourceName':_0xe84bc[_0x2bbc90(0x1b2)],'folderPath':_0xe84bc[_0x2bbc90(0x198)],'resourceType':_0xe84bc[_0x2bbc90(0x188)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x2bbc90(0x19f),'message':_0x2bbc90(0x1a0)+_0xbdf751,'arg':_0xbdf751,'helpText':_0x2bbc90(0x19e)};}const _0x5f51d3=calculateScopedPath(_0x3611fd,_0x3c8110['configDir']);return{'type':_0x2bbc90(0x1b8),'parentName':_0x3c8110[_0x2bbc90(0x1bc)],'targetDir':_0x3c8110['configDir'],'configRoot':_0x3c8110['configDir'],'filePath':_0x209ed3,'resourceName':_0xe84bc[_0x2bbc90(0x1b2)],'folderPath':_0xe84bc[_0x2bbc90(0x198)],'resourceType':_0xe84bc[_0x2bbc90(0x188)],'isScoped':_0x5f51d3['isScoped'],'scopedFolderPath':_0x5f51d3[_0x2bbc90(0x1be)]};}catch(_0xd7047e){const _0x1c6cdf=_0xd7047e instanceof Error?_0xd7047e[_0x2bbc90(0x18c)]:String(_0xd7047e);if(_0x1c6cdf[_0x2bbc90(0x19d)](_0x2bbc90(0x1a8)))return{'type':_0x2bbc90(0x190),'errorCode':_0x2bbc90(0x1a3),'message':_0x2bbc90(0x1b4)+_0xbdf751,'arg':_0xbdf751};if(_0x1c6cdf['includes'](_0x2bbc90(0x1b0))){if(_0x461864){const _0x160637=a208_0x3cbb15['resolve'](_0xbdf751);if(await fs[_0x2bbc90(0x18a)](_0x160637)){const _0x2738b3=a208_0x3cbb15[_0x2bbc90(0x18e)](_0x160637),_0x561d15=await fs[_0x2bbc90(0x1b9)](_0x160637),_0x531865=_0x561d15[_0x2bbc90(0x1a5)](/^name:\s*["']?([^"'\n]+)["']?/m),_0xc0e818=_0x561d15['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x3255fd=_0x531865?_0x531865[0x1][_0x2bbc90(0x1b6)]():a208_0x3cbb15[_0x2bbc90(0x1a2)](_0xbdf751,a208_0x3cbb15[_0x2bbc90(0x197)](_0xbdf751)),_0x2ebfbe=_0xc0e818&&_0xc0e818[0x1]['trim']()===_0x2bbc90(0x1b5)?_0x2bbc90(0x1b5):_0x2bbc90(0x1a6);return{'type':_0x2bbc90(0x1b8),'parentName':_0x461864,'targetDir':_0x2738b3,'configRoot':_0x2738b3,'filePath':_0x160637,'resourceName':_0x3255fd,'folderPath':'','resourceType':_0x2ebfbe,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x2bbc90(0x19f),'message':_0x2bbc90(0x1a0)+_0xbdf751,'arg':_0xbdf751,'helpText':_0x2bbc90(0x19e)};}return{'type':'error','errorCode':'invalid_yaml','message':_0x1c6cdf,'arg':_0xbdf751};}if(_0xbdf751){const _0x534be0=a208_0x3cbb15[_0x2bbc90(0x1bd)](cwd,_0xbdf751);let _0x240931=null;try{_0x240931=await fs[_0x2bbc90(0x19a)](_0x534be0);}catch{}if(_0x240931?.[_0x2bbc90(0x1ac)]()){const _0x32cfe9=await findTdxConfigAsync(_0x534be0,fs);if(_0x32cfe9){const _0x1f2157=calculateScopedPath(_0x534be0,_0x32cfe9[_0x2bbc90(0x193)]);return{'type':_0x2bbc90(0x187),'parentName':_0x32cfe9[_0x2bbc90(0x1bc)],'targetDir':_0x534be0,'configRoot':_0x32cfe9[_0x2bbc90(0x193)],'isScoped':_0x1f2157[_0x2bbc90(0x192)],'scopedFolderPath':_0x1f2157[_0x2bbc90(0x1be)]};}if(_0x461864)return{'type':_0x2bbc90(0x187),'parentName':_0x461864,'targetDir':_0x534be0,'configRoot':_0x534be0,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x2bbc90(0x19f),'message':_0x2bbc90(0x18d)+_0xbdf751,'arg':_0xbdf751,'helpText':_0x2bbc90(0x19e)};}if(_0x240931?.[_0x2bbc90(0x194)]())return{'type':_0x2bbc90(0x190),'errorCode':_0x2bbc90(0x189),'message':_0x2bbc90(0x1a7)+_0xbdf751,'arg':_0xbdf751,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x4fbcfc=sanitizeFileName(_0xbdf751),_0x2fad45=getSegmentRootDir(_0x4fbcfc,cwd);return{'type':_0x2bbc90(0x199),'parentName':_0xbdf751,'targetDir':_0x2fad45,'configRoot':_0x2fad45};}const _0x4f6e79=await findTdxConfigAsync(cwd,fs);if(_0x4f6e79){const _0x4dac35=calculateScopedPath(cwd,_0x4f6e79[_0x2bbc90(0x193)]);return{'type':'context','parentName':_0x4f6e79[_0x2bbc90(0x1bc)],'targetDir':cwd,'configRoot':_0x4f6e79[_0x2bbc90(0x193)],'isScoped':_0x4dac35[_0x2bbc90(0x192)],'scopedFolderPath':_0x4dac35[_0x2bbc90(0x1be)]};}if(_0x461864){const _0x295292=sanitizeFileName(_0x461864),_0x2805bd=getSegmentRootDir(_0x295292,cwd);return{'type':_0x2bbc90(0x1ae),'parentName':_0x461864,'targetDir':_0x2805bd,'configRoot':_0x2805bd,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x2bbc90(0x190),'errorCode':_0x2bbc90(0x196),'message':_0x2bbc90(0x195),'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(_0x2baab5,_0x4613e2){const _0x381cd7=a210_0x27bc,_0xf18268=_0x2baab5();while(!![]){try{const _0x3eb478=parseInt(_0x381cd7(0x21e))/0x1*(-parseInt(_0x381cd7(0x21b))/0x2)+parseInt(_0x381cd7(0x1ef))/0x3*(-parseInt(_0x381cd7(0x201))/0x4)+parseInt(_0x381cd7(0x20b))/0x5+parseInt(_0x381cd7(0x1f5))/0x6*(parseInt(_0x381cd7(0x216))/0x7)+-parseInt(_0x381cd7(0x1fc))/0x8+-parseInt(_0x381cd7(0x225))/0x9*(-parseInt(_0x381cd7(0x1fb))/0xa)+-parseInt(_0x381cd7(0x1f3))/0xb*(-parseInt(_0x381cd7(0x1fd))/0xc);if(_0x3eb478===_0x4613e2)break;else _0xf18268['push'](_0xf18268['shift']());}catch(_0x47d69c){_0xf18268['push'](_0xf18268['shift']());}}}(a210_0x2059,0xdcf1f));import a210_0x396ee1 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 a210_0x2059(){const _0xe0256f=['10719440yLTtvR','6036kfpmYm','parent_name','trim','exists','24BYACPu','file','configDir','relative','context','string','parent_segment','directory','resourceType','segment','4452845FvScyL','isScoped','dirname','No\x20tdx.json\x20found','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','parentSegment','journey','folderPath','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','resolve','type','11173631WgkTTf','includes','replace','no_parent','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','764TMEQhc','isDirectory','isFile','2708nMwfxe','No\x20tdx.json\x20found\x20for\x20file:\x20','stat','message','root','no_config','Not\x20a\x20YAML\x20file:\x20','971469jzyZoN','708348GNRWxY','extname','join','error','43593FhGEqc','parse','6KwZjqg','cwd','file_not_found','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','scopedFolderPath','match','20CEymmg'];a210_0x2059=function(){return _0xe0256f;};return a210_0x2059();}export function isSuccessfulResolution(_0x12e6b5){const _0x1e95d9=a210_0x27bc;return _0x12e6b5['type']!==_0x1e95d9(0x1f2);}export function isScopedResolution(_0x3b2ee3){const _0x5aa718=a210_0x27bc;return _0x3b2ee3['type']===_0x5aa718(0x208)||_0x3b2ee3[_0x5aa718(0x215)]===_0x5aa718(0x202)||_0x3b2ee3[_0x5aa718(0x215)]===_0x5aa718(0x205);}function a210_0x27bc(_0x2c3bd4,_0xbf85c5){_0x2c3bd4=_0x2c3bd4-0x1ef;const _0x205913=a210_0x2059();let _0x27bc66=_0x205913[_0x2c3bd4];return _0x27bc66;}export function getScopedDetails(_0x15cfb4){const _0x5bab56=a210_0x27bc;if(isScopedResolution(_0x15cfb4))return{'isScoped':_0x15cfb4['isScoped'],'scopedFolderPath':_0x15cfb4[_0x5bab56(0x1f9)]};return undefined;}async function findTdxConfigAsync(_0x139659,_0xaed258){const _0xa478f3=a210_0x27bc;let _0x535a6d=a210_0x396ee1[_0xa478f3(0x214)](_0x139659);const _0x36c79=a210_0x396ee1[_0xa478f3(0x1f4)](_0x535a6d)[_0xa478f3(0x222)];while(_0x535a6d!==_0x36c79){const _0x3b200b=a210_0x396ee1[_0xa478f3(0x1f1)](_0x535a6d,'tdx.json');if(await _0xaed258[_0xa478f3(0x200)](_0x3b200b))try{const _0x1b0540=await _0xaed258['readFile'](_0x3b200b),_0x47f6e7=JSON[_0xa478f3(0x1f4)](_0x1b0540);if(_0x47f6e7[_0xa478f3(0x207)]&&typeof _0x47f6e7[_0xa478f3(0x207)]===_0xa478f3(0x206))return{'configPath':_0x3b200b,'configDir':_0x535a6d,'parentSegment':_0x47f6e7[_0xa478f3(0x207)]};}catch{}_0x535a6d=a210_0x396ee1[_0xa478f3(0x20d)](_0x535a6d);}return null;}function calculateScopedPath(_0x3ed0ed,_0x159004){const _0x4b8d5a=a210_0x27bc,_0x423413=a210_0x396ee1[_0x4b8d5a(0x204)](_0x159004,_0x3ed0ed),_0x3123ee=_0x423413!==''&&_0x423413!=='.'&&!_0x423413['startsWith']('..');return{'isScoped':_0x3123ee,'scopedFolderPath':_0x3123ee?_0x423413[_0x4b8d5a(0x218)](/\\/g,'/'):''};}export async function resolveTarget(_0x49af4c){const _0xc6c6fa=a210_0x27bc,{arg:_0x2457f9,contextParent:_0x5bc41d,cwd:cwd=process[_0xc6c6fa(0x1f6)](),fs:fs=nodeFileSystem}=_0x49af4c;if(_0x2457f9&&isYamlFilePath(_0x2457f9))try{const _0x121732=await resolveYamlFilePath(_0x2457f9,fs),_0xd559c2=a210_0x396ee1['resolve'](_0x2457f9),_0x1105db=a210_0x396ee1[_0xc6c6fa(0x20d)](_0xd559c2),_0x219da5=await findTdxConfigAsync(_0x1105db,fs);if(!_0x219da5){if(_0x5bc41d){const _0x4e8af6=a210_0x396ee1[_0xc6c6fa(0x20d)](_0xd559c2);return{'type':'file','parentName':_0x5bc41d,'targetDir':_0x4e8af6,'configRoot':_0x4e8af6,'filePath':_0xd559c2,'resourceName':_0x121732['segmentName'],'folderPath':_0x121732[_0xc6c6fa(0x212)],'resourceType':_0x121732[_0xc6c6fa(0x209)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0xc6c6fa(0x1f2),'errorCode':_0xc6c6fa(0x223),'message':_0xc6c6fa(0x21f)+_0x2457f9,'arg':_0x2457f9,'helpText':_0xc6c6fa(0x21a)};}const _0x1b58df=calculateScopedPath(_0x1105db,_0x219da5[_0xc6c6fa(0x203)]);return{'type':'file','parentName':_0x219da5[_0xc6c6fa(0x210)],'targetDir':_0x219da5[_0xc6c6fa(0x203)],'configRoot':_0x219da5[_0xc6c6fa(0x203)],'filePath':_0xd559c2,'resourceName':_0x121732['segmentName'],'folderPath':_0x121732[_0xc6c6fa(0x212)],'resourceType':_0x121732[_0xc6c6fa(0x209)],'isScoped':_0x1b58df[_0xc6c6fa(0x20c)],'scopedFolderPath':_0x1b58df[_0xc6c6fa(0x1f9)]};}catch(_0x147609){const _0x44eed4=_0x147609 instanceof Error?_0x147609[_0xc6c6fa(0x221)]:String(_0x147609);if(_0x44eed4[_0xc6c6fa(0x217)]('File\x20not\x20found'))return{'type':_0xc6c6fa(0x1f2),'errorCode':_0xc6c6fa(0x1f7),'message':'File\x20not\x20found:\x20'+_0x2457f9,'arg':_0x2457f9};if(_0x44eed4['includes'](_0xc6c6fa(0x20e))){if(_0x5bc41d){const _0x24d259=a210_0x396ee1[_0xc6c6fa(0x214)](_0x2457f9);if(await fs[_0xc6c6fa(0x200)](_0x24d259)){const _0xd20a1f=a210_0x396ee1[_0xc6c6fa(0x20d)](_0x24d259),_0x133e2a=await fs['readFile'](_0x24d259),_0x2599a9=_0x133e2a[_0xc6c6fa(0x1fa)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x43bf07=_0x133e2a[_0xc6c6fa(0x1fa)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x24cb90=_0x2599a9?_0x2599a9[0x1][_0xc6c6fa(0x1ff)]():a210_0x396ee1['basename'](_0x2457f9,a210_0x396ee1[_0xc6c6fa(0x1f0)](_0x2457f9)),_0x25381d=_0x43bf07&&_0x43bf07[0x1]['trim']()===_0xc6c6fa(0x211)?_0xc6c6fa(0x211):_0xc6c6fa(0x20a);return{'type':'file','parentName':_0x5bc41d,'targetDir':_0xd20a1f,'configRoot':_0xd20a1f,'filePath':_0x24d259,'resourceName':_0x24cb90,'folderPath':'','resourceType':_0x25381d,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0xc6c6fa(0x223),'message':_0xc6c6fa(0x21f)+_0x2457f9,'arg':_0x2457f9,'helpText':_0xc6c6fa(0x21a)};}return{'type':_0xc6c6fa(0x1f2),'errorCode':'invalid_yaml','message':_0x44eed4,'arg':_0x2457f9};}if(_0x2457f9){const _0x15e4ee=a210_0x396ee1[_0xc6c6fa(0x214)](cwd,_0x2457f9);let _0x24863e=null;try{_0x24863e=await fs[_0xc6c6fa(0x220)](_0x15e4ee);}catch{}if(_0x24863e?.[_0xc6c6fa(0x21c)]()){const _0x57b144=await findTdxConfigAsync(_0x15e4ee,fs);if(_0x57b144){const _0x3b76d5=calculateScopedPath(_0x15e4ee,_0x57b144['configDir']);return{'type':_0xc6c6fa(0x208),'parentName':_0x57b144[_0xc6c6fa(0x210)],'targetDir':_0x15e4ee,'configRoot':_0x57b144[_0xc6c6fa(0x203)],'isScoped':_0x3b76d5[_0xc6c6fa(0x20c)],'scopedFolderPath':_0x3b76d5[_0xc6c6fa(0x1f9)]};}if(_0x5bc41d)return{'type':_0xc6c6fa(0x208),'parentName':_0x5bc41d,'targetDir':_0x15e4ee,'configRoot':_0x15e4ee,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0xc6c6fa(0x223),'message':_0xc6c6fa(0x1f8)+_0x2457f9,'arg':_0x2457f9,'helpText':_0xc6c6fa(0x21a)};}if(_0x24863e?.[_0xc6c6fa(0x21d)]())return{'type':_0xc6c6fa(0x1f2),'errorCode':'invalid_yaml','message':_0xc6c6fa(0x224)+_0x2457f9,'arg':_0x2457f9,'helpText':_0xc6c6fa(0x213)};const _0x5a1131=sanitizeFileName(_0x2457f9),_0x1a20a8=getSegmentRootDir(_0x5a1131,cwd);return{'type':_0xc6c6fa(0x1fe),'parentName':_0x2457f9,'targetDir':_0x1a20a8,'configRoot':_0x1a20a8};}const _0x4fd1e1=await findTdxConfigAsync(cwd,fs);if(_0x4fd1e1){const _0x4482b5=calculateScopedPath(cwd,_0x4fd1e1[_0xc6c6fa(0x203)]);return{'type':'context','parentName':_0x4fd1e1[_0xc6c6fa(0x210)],'targetDir':cwd,'configRoot':_0x4fd1e1[_0xc6c6fa(0x203)],'isScoped':_0x4482b5[_0xc6c6fa(0x20c)],'scopedFolderPath':_0x4482b5[_0xc6c6fa(0x1f9)]};}if(_0x5bc41d){const _0x235244=sanitizeFileName(_0x5bc41d),_0x4fdb8e=getSegmentRootDir(_0x235244,cwd);return{'type':_0xc6c6fa(0x205),'parentName':_0x5bc41d,'targetDir':_0x4fdb8e,'configRoot':_0x4fdb8e,'isScoped':![],'scopedFolderPath':''};}return{'type':_0xc6c6fa(0x1f2),'errorCode':_0xc6c6fa(0x219),'message':'Parent\x20segment\x20not\x20specified','helpText':_0xc6c6fa(0x20f)};}
@@ -1 +1 @@
1
- function a209_0x3915(_0x49b732,_0x5c99fd){_0x49b732=_0x49b732-0x1e8;const _0x428490=a209_0x4284();let _0x3915ad=_0x428490[_0x49b732];return _0x3915ad;}const a209_0x321e0e=a209_0x3915;(function(_0x3a3b83,_0x2638dc){const _0x182fe9=a209_0x3915,_0xcc9cdb=_0x3a3b83();while(!![]){try{const _0x3afc3d=-parseInt(_0x182fe9(0x1fa))/0x1+-parseInt(_0x182fe9(0x1eb))/0x2+parseInt(_0x182fe9(0x1f8))/0x3*(parseInt(_0x182fe9(0x1fc))/0x4)+-parseInt(_0x182fe9(0x1fd))/0x5+-parseInt(_0x182fe9(0x1ec))/0x6+-parseInt(_0x182fe9(0x1ff))/0x7+parseInt(_0x182fe9(0x1e9))/0x8;if(_0x3afc3d===_0x2638dc)break;else _0xcc9cdb['push'](_0xcc9cdb['shift']());}catch(_0x6b8698){_0xcc9cdb['push'](_0xcc9cdb['shift']());}}}(a209_0x4284,0xe565a));function a209_0x4284(){const _0x4c40b2=['5953614gBcZrq','dirname','parent_segment','parse','cwd','root','join','Invalid\x20JSON\x20in\x20','stringify','object','tdx.json','replace','1299GhJozN','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','405846IMzyoC','utf-8','9260HoIOcx','4036860udhgFe','string','4591860QxAEMj','startsWith','engage_workspace','Invalid\x20tdx.json:\x20expected\x20object','resolve','28760792DCSWhl','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','1592834ZTEGtv'];a209_0x4284=function(){return _0x4c40b2;};return a209_0x4284();}import{existsSync,readFileSync}from'fs';import a209_0x48ace2 from'path';const TDX_CONFIG_FILE=a209_0x321e0e(0x1f6),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x4de2e4=process[a209_0x321e0e(0x1f0)]()){const _0x5c104c=a209_0x321e0e;let _0x3e53e3=a209_0x48ace2[_0x5c104c(0x1e8)](_0x4de2e4);const _0x2c7a74=a209_0x48ace2[_0x5c104c(0x1ef)](_0x3e53e3)[_0x5c104c(0x1f1)];while(_0x3e53e3!==_0x2c7a74){const _0x2319f7=a209_0x48ace2[_0x5c104c(0x1f2)](_0x3e53e3,TDX_CONFIG_FILE);if(existsSync(_0x2319f7))return _0x2319f7;_0x3e53e3=a209_0x48ace2[_0x5c104c(0x1ed)](_0x3e53e3);}return null;}export function loadTdxConfig(_0x2e1297){const _0x4ec1ca=a209_0x321e0e,_0xc013c6=readFileSync(_0x2e1297,_0x4ec1ca(0x1fb));let _0x54cbc4;try{_0x54cbc4=JSON['parse'](_0xc013c6);}catch{throw new Error(_0x4ec1ca(0x1f3)+_0x2e1297);}if(!_0x54cbc4||typeof _0x54cbc4!==_0x4ec1ca(0x1f5))throw new Error(_0x4ec1ca(0x202));const _0xf7d10e=_0x54cbc4,_0x422632=_0xf7d10e[_0x4ec1ca(0x1ee)]&&typeof _0xf7d10e[_0x4ec1ca(0x1ee)]===_0x4ec1ca(0x1fe),_0x380228=_0xf7d10e['engage_workspace']&&typeof _0xf7d10e['engage_workspace']===_0x4ec1ca(0x1fe);if(!_0x422632&&!_0x380228)throw new Error(_0x4ec1ca(0x1ea));const _0x259306={};return _0x422632&&(_0x259306[_0x4ec1ca(0x1ee)]=_0xf7d10e['parent_segment']),_0x380228&&(_0x259306[_0x4ec1ca(0x201)]=_0xf7d10e[_0x4ec1ca(0x201)]),_0x259306;}export function findTdxConfig(_0x3b42e0=process[a209_0x321e0e(0x1f0)]()){const _0x1e9f3f=a209_0x321e0e,_0x33f021=findTdxConfigPath(_0x3b42e0);if(!_0x33f021)throw new Error(_0x1e9f3f(0x1f9));const _0x231919=loadTdxConfig(_0x33f021),_0x2fdab0=a209_0x48ace2[_0x1e9f3f(0x1ed)](_0x33f021);return{'config':_0x231919,'configPath':_0x33f021,'configDir':_0x2fdab0};}export function tryFindTdxConfig(_0x2cfee4){try{return findTdxConfig(_0x2cfee4);}catch{return null;}}export function getSegmentRootDir(_0x2b5998,_0x18dcd5=process[a209_0x321e0e(0x1f0)]()){const _0x26dce2=a209_0x321e0e;return a209_0x48ace2[_0x26dce2(0x1f2)](_0x18dcd5,SEGMENTS_DIR,_0x2b5998);}export function getTdxConfigPath(_0x49a3b9,_0x70d6c7=process[a209_0x321e0e(0x1f0)]()){return a209_0x48ace2['join'](getSegmentRootDir(_0x49a3b9,_0x70d6c7),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x30ea45,_0x113ac3){const _0x523380=a209_0x321e0e,_0x5e6c1a=a209_0x48ace2[_0x523380(0x1e8)](_0x30ea45),_0x22f61d=a209_0x48ace2['relative'](_0x113ac3,_0x5e6c1a);if(_0x22f61d[_0x523380(0x200)]('..'))return'';return _0x22f61d;}export function localPathToTdFolderPath(_0x409f78){const _0xcebe3d=a209_0x321e0e,_0x43f5bd=a209_0x48ace2[_0xcebe3d(0x1ed)](_0x409f78);if(_0x43f5bd==='.'||_0x43f5bd==='')return'';return _0x43f5bd[_0xcebe3d(0x1f7)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x3c6c3a,_0x17e774){if(!_0x3c6c3a)return _0x17e774;return a209_0x48ace2['join'](_0x17e774,_0x3c6c3a);}export function createTdxConfigContent(_0x2aa211){const _0x2ccba4=a209_0x321e0e,_0x453bd9={'parent_segment':_0x2aa211};return JSON[_0x2ccba4(0x1f4)](_0x453bd9,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x4214b6){const _0x455943=a209_0x321e0e,_0x21024d={'engage_workspace':_0x4214b6};return JSON[_0x455943(0x1f4)](_0x21024d,null,0x2)+'\x0a';}
1
+ const a211_0x332cd9=a211_0x4d12;(function(_0x22ef55,_0x427634){const _0xffb91a=a211_0x4d12,_0x4d9a7a=_0x22ef55();while(!![]){try{const _0xff4f34=-parseInt(_0xffb91a(0x17a))/0x1+-parseInt(_0xffb91a(0x17c))/0x2*(parseInt(_0xffb91a(0x17e))/0x3)+-parseInt(_0xffb91a(0x186))/0x4+parseInt(_0xffb91a(0x18f))/0x5*(parseInt(_0xffb91a(0x17d))/0x6)+parseInt(_0xffb91a(0x185))/0x7+parseInt(_0xffb91a(0x178))/0x8+-parseInt(_0xffb91a(0x18d))/0x9*(-parseInt(_0xffb91a(0x184))/0xa);if(_0xff4f34===_0x427634)break;else _0x4d9a7a['push'](_0x4d9a7a['shift']());}catch(_0x361952){_0x4d9a7a['push'](_0x4d9a7a['shift']());}}}(a211_0xf0b1,0x83b0f));import{existsSync,readFileSync}from'fs';import a211_0x417270 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR='segments';function a211_0x4d12(_0xf13588,_0x465627){_0xf13588=_0xf13588-0x176;const _0xf0b19c=a211_0xf0b1();let _0x4d1223=_0xf0b19c[_0xf13588];return _0x4d1223;}export function findTdxConfigPath(_0x3a5071=process[a211_0x332cd9(0x177)]()){const _0x3d628f=a211_0x332cd9;let _0x45f301=a211_0x417270[_0x3d628f(0x188)](_0x3a5071);const _0x29bb61=a211_0x417270[_0x3d628f(0x17b)](_0x45f301)[_0x3d628f(0x17f)];while(_0x45f301!==_0x29bb61){const _0x621e6b=a211_0x417270['join'](_0x45f301,TDX_CONFIG_FILE);if(existsSync(_0x621e6b))return _0x621e6b;_0x45f301=a211_0x417270[_0x3d628f(0x18c)](_0x45f301);}return null;}export function loadTdxConfig(_0xc2b268){const _0x2b3097=a211_0x332cd9,_0x52ef8b=readFileSync(_0xc2b268,'utf-8');let _0x17f710;try{_0x17f710=JSON['parse'](_0x52ef8b);}catch{throw new Error(_0x2b3097(0x187)+_0xc2b268);}if(!_0x17f710||typeof _0x17f710!==_0x2b3097(0x179))throw new Error(_0x2b3097(0x180));const _0x572b38=_0x17f710,_0x526404=_0x572b38[_0x2b3097(0x189)]&&typeof _0x572b38[_0x2b3097(0x189)]===_0x2b3097(0x18e),_0x2a83ab=_0x572b38[_0x2b3097(0x176)]&&typeof _0x572b38[_0x2b3097(0x176)]===_0x2b3097(0x18e);if(!_0x526404&&!_0x2a83ab)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x57045f={};return _0x526404&&(_0x57045f[_0x2b3097(0x189)]=_0x572b38[_0x2b3097(0x189)]),_0x2a83ab&&(_0x57045f[_0x2b3097(0x176)]=_0x572b38[_0x2b3097(0x176)]),_0x57045f;}export function findTdxConfig(_0x53acad=process[a211_0x332cd9(0x177)]()){const _0x478757=a211_0x332cd9,_0x5aa976=findTdxConfigPath(_0x53acad);if(!_0x5aa976)throw new Error(_0x478757(0x18a));const _0x40a7d1=loadTdxConfig(_0x5aa976),_0x9d9eee=a211_0x417270[_0x478757(0x18c)](_0x5aa976);return{'config':_0x40a7d1,'configPath':_0x5aa976,'configDir':_0x9d9eee};}export function tryFindTdxConfig(_0x7f4c06){try{return findTdxConfig(_0x7f4c06);}catch{return null;}}export function getSegmentRootDir(_0x219004,_0x1141e6=process['cwd']()){const _0x2dd374=a211_0x332cd9;return a211_0x417270[_0x2dd374(0x18b)](_0x1141e6,SEGMENTS_DIR,_0x219004);}export function getTdxConfigPath(_0x1f1463,_0x39026e=process[a211_0x332cd9(0x177)]()){const _0x4051b8=a211_0x332cd9;return a211_0x417270[_0x4051b8(0x18b)](getSegmentRootDir(_0x1f1463,_0x39026e),TDX_CONFIG_FILE);}function a211_0xf0b1(){const _0x112192=['resolve','parent_segment','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','join','dirname','3324249lTNHGw','string','370XqUjvZ','engage_workspace','cwd','1271792CZHRet','object','192653HEmmCx','parse','534262TeBQlQ','72696ubsipD','9FqMWkG','root','Invalid\x20tdx.json:\x20expected\x20object','stringify','startsWith','relative','10jsDiYS','5330689JeusWZ','2611972BnlDbQ','Invalid\x20JSON\x20in\x20'];a211_0xf0b1=function(){return _0x112192;};return a211_0xf0b1();}export function getRelativePathFromConfig(_0x189e57,_0x48de48){const _0x2d13f5=a211_0x332cd9,_0xd30573=a211_0x417270[_0x2d13f5(0x188)](_0x189e57),_0x5d3b74=a211_0x417270[_0x2d13f5(0x183)](_0x48de48,_0xd30573);if(_0x5d3b74[_0x2d13f5(0x182)]('..'))return'';return _0x5d3b74;}export function localPathToTdFolderPath(_0x249c43){const _0x509693=a211_0x417270['dirname'](_0x249c43);if(_0x509693==='.'||_0x509693==='')return'';return _0x509693['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x3885e5,_0x1f8f7c){if(!_0x3885e5)return _0x1f8f7c;return a211_0x417270['join'](_0x1f8f7c,_0x3885e5);}export function createTdxConfigContent(_0x2d3eaa){const _0x8c053a=a211_0x332cd9,_0x3b1695={'parent_segment':_0x2d3eaa};return JSON[_0x8c053a(0x181)](_0x3b1695,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x38bb05){const _0x2b4dff=a211_0x332cd9,_0x2fe20e={'engage_workspace':_0x38bb05};return JSON[_0x2b4dff(0x181)](_0x2fe20e,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- function a210_0x2f87(){const _0x85598d=['350ugHrUT','13307670rGOITs','15nDXOhZ','clear','descending','14662TCrSSJ','minute','month','addIssue','1061256GmgWTG','string','behavior','183gyMJFL','none','once','min','onSuccess','252672pNpAIu','onFailure','25274880xKzLqm','masked','enum','Top-N','boolean','custom','Use\x20either\x20`behavior`\x20or\x20`behaviors`,\x20not\x20both\x20(prefer\x20`behaviors`).','Last','array','optional','Connection\x20name\x20is\x20required','9272826YBmmsp','weekly','object','number','unknown','All','cols','nullable','minutes_interval','monthly','1073356QFrcsK','hour','rows','hourly','First','record'];a210_0x2f87=function(){return _0x85598d;};return a210_0x2f87();}const a210_0x93afaa=a210_0x3be9;(function(_0x2e9356,_0x32a7d6){const _0x1d8949=a210_0x3be9,_0x337778=_0x2e9356();while(!![]){try{const _0x1cc5d8=-parseInt(_0x1d8949(0x11d))/0x1*(parseInt(_0x1d8949(0x116))/0x2)+parseInt(_0x1d8949(0x11a))/0x3+-parseInt(_0x1d8949(0x139))/0x4*(-parseInt(_0x1d8949(0x113))/0x5)+parseInt(_0x1d8949(0x12f))/0x6+-parseInt(_0x1d8949(0x111))/0x7*(parseInt(_0x1d8949(0x122))/0x8)+-parseInt(_0x1d8949(0x112))/0x9+parseInt(_0x1d8949(0x124))/0xa;if(_0x1cc5d8===_0x32a7d6)break;else _0x337778['push'](_0x337778['shift']());}catch(_0x20d591){_0x337778['push'](_0x337778['shift']());}}}(a210_0x2f87,0xcb345));function a210_0x3be9(_0x41ade8,_0x9d7201){_0x41ade8=_0x41ade8-0x10c;const _0x2f87f9=a210_0x2f87();let _0x3be9e3=_0x2f87f9[_0x41ade8];return _0x3be9e3;}import{z}from'zod';export const ScheduleTypeSchema=z[a210_0x93afaa(0x126)]([a210_0x93afaa(0x11e),a210_0x93afaa(0x10e),'daily',a210_0x93afaa(0x130),a210_0x93afaa(0x138),'cron',a210_0x93afaa(0x137)]);export const RepeatUnitSchema=z[a210_0x93afaa(0x126)]([a210_0x93afaa(0x117),a210_0x93afaa(0x10c),'day','week',a210_0x93afaa(0x118),a210_0x93afaa(0x11f),a210_0x93afaa(0x11e)]);export const ScheduleDefSchema=z[a210_0x93afaa(0x131)]({'type':ScheduleTypeSchema[a210_0x93afaa(0x12d)](),'repeat_unit':RepeatUnitSchema[a210_0x93afaa(0x12d)](),'repeat_frequency':z['number']()[a210_0x93afaa(0x12d)](),'repeat_sub_frequency':z[a210_0x93afaa(0x12c)](z[a210_0x93afaa(0x132)]())[a210_0x93afaa(0x12d)](),'start_at':z[a210_0x93afaa(0x11b)]()['nullable']()['optional'](),'end_on':z['string']()[a210_0x93afaa(0x136)]()[a210_0x93afaa(0x12d)](),'timezone':z[a210_0x93afaa(0x11b)]()['optional']()});export const NotificationDefSchema=z['object']({'notify_on':z['array'](z[a210_0x93afaa(0x126)]([a210_0x93afaa(0x121),a210_0x93afaa(0x123)]))[a210_0x93afaa(0x12d)](),'email_recipients':z[a210_0x93afaa(0x12c)](z[a210_0x93afaa(0x11b)]())[a210_0x93afaa(0x12d)]()});export const ActivationColumnDefSchema=z['union']([z['string'](),z[a210_0x93afaa(0x131)]({'name':z[a210_0x93afaa(0x11b)](),'type':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x12d)](),'visibility':z[a210_0x93afaa(0x126)]([a210_0x93afaa(0x114),a210_0x93afaa(0x125)])[a210_0x93afaa(0x12d)]()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z[a210_0x93afaa(0x12c)](ActivationColumnDefSchema)['optional'](),'behavior_table':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x12d)](),'join_row':z[a210_0x93afaa(0x132)]()[a210_0x93afaa(0x136)]()[a210_0x93afaa(0x12d)](),'join_strategy':z[a210_0x93afaa(0x126)]([a210_0x93afaa(0x134),a210_0x93afaa(0x10f),a210_0x93afaa(0x12b),a210_0x93afaa(0x127)])['optional'](),'formatting':z['enum']([a210_0x93afaa(0x10d),a210_0x93afaa(0x135)])[a210_0x93afaa(0x12d)](),'order_by':z[a210_0x93afaa(0x12c)](z[a210_0x93afaa(0x131)]({'key':z['string'](),'order':z[a210_0x93afaa(0x126)](['ascending',a210_0x93afaa(0x115)])}))[a210_0x93afaa(0x12d)]()});export const ActivationBehaviorsDefSchema=z[a210_0x93afaa(0x12c)](ActivationBehaviorDefSchema)['max'](0x4);export const ActivationDefSchema=z['object']({'name':z[a210_0x93afaa(0x11b)]()['min'](0x1,'Activation\x20name\x20is\x20required'),'description':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x12d)](),'connection':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x120)](0x1,a210_0x93afaa(0x12e)),'all_columns':z[a210_0x93afaa(0x128)]()[a210_0x93afaa(0x12d)](),'columns':z['array'](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a210_0x93afaa(0x110)](z[a210_0x93afaa(0x11b)](),z[a210_0x93afaa(0x133)]())[a210_0x93afaa(0x12d)](),'activation_template_id':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x136)]()['optional'](),'behavior':ActivationBehaviorDefSchema[a210_0x93afaa(0x136)]()['optional'](),'behaviors':ActivationBehaviorsDefSchema['optional'](),'run_after_journey_refresh':z['boolean']()[a210_0x93afaa(0x12d)](),'nested_workflow_project_name':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x12d)](),'nested_workflow_name':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x12d)](),'lock_enabled':z[a210_0x93afaa(0x128)]()[a210_0x93afaa(0x12d)]()})['superRefine']((_0x219a9b,_0x3d92e6)=>{const _0x394292=a210_0x93afaa;_0x219a9b['behavior']!=null&&_0x219a9b['behaviors']!=null&&_0x3d92e6[_0x394292(0x119)]({'code':_0x394292(0x129),'message':_0x394292(0x12a),'path':[_0x394292(0x11c)]});});
1
+ const a212_0x5d09d2=a212_0x3f05;(function(_0xbeb620,_0x437642){const _0x166b73=a212_0x3f05,_0x5a5601=_0xbeb620();while(!![]){try{const _0x35dcdf=-parseInt(_0x166b73(0x9b))/0x1*(-parseInt(_0x166b73(0xab))/0x2)+parseInt(_0x166b73(0xb3))/0x3+parseInt(_0x166b73(0xaf))/0x4*(-parseInt(_0x166b73(0xb4))/0x5)+parseInt(_0x166b73(0xae))/0x6+-parseInt(_0x166b73(0xaa))/0x7+parseInt(_0x166b73(0xa3))/0x8+parseInt(_0x166b73(0x89))/0x9;if(_0x35dcdf===_0x437642)break;else _0x5a5601['push'](_0x5a5601['shift']());}catch(_0x365b08){_0x5a5601['push'](_0x5a5601['shift']());}}}(a212_0x4418,0xc615e));import{z}from'zod';export const ScheduleTypeSchema=z[a212_0x5d09d2(0x8a)](['none',a212_0x5d09d2(0xb1),a212_0x5d09d2(0x92),a212_0x5d09d2(0x9a),a212_0x5d09d2(0xb5),a212_0x5d09d2(0xa8),a212_0x5d09d2(0xb6)]);export const RepeatUnitSchema=z['enum'](['minute',a212_0x5d09d2(0xa9),a212_0x5d09d2(0x91),a212_0x5d09d2(0x9c),a212_0x5d09d2(0xad),a212_0x5d09d2(0xa0),a212_0x5d09d2(0xb0)]);export const ScheduleDefSchema=z[a212_0x5d09d2(0x98)]({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a212_0x5d09d2(0x94)](),'repeat_frequency':z[a212_0x5d09d2(0xac)]()['optional'](),'repeat_sub_frequency':z[a212_0x5d09d2(0x88)](z[a212_0x5d09d2(0xac)]())['optional'](),'start_at':z[a212_0x5d09d2(0x99)]()[a212_0x5d09d2(0x8c)]()['optional'](),'end_on':z[a212_0x5d09d2(0x99)]()['nullable']()[a212_0x5d09d2(0x94)](),'timezone':z[a212_0x5d09d2(0x99)]()[a212_0x5d09d2(0x94)]()});export const NotificationDefSchema=z[a212_0x5d09d2(0x98)]({'notify_on':z[a212_0x5d09d2(0x88)](z[a212_0x5d09d2(0x8a)](['onSuccess',a212_0x5d09d2(0x8d)]))[a212_0x5d09d2(0x94)](),'email_recipients':z[a212_0x5d09d2(0x88)](z[a212_0x5d09d2(0x99)]())[a212_0x5d09d2(0x94)]()});export const ActivationColumnDefSchema=z[a212_0x5d09d2(0x95)]([z['string'](),z[a212_0x5d09d2(0x98)]({'name':z[a212_0x5d09d2(0x99)](),'type':z[a212_0x5d09d2(0x99)]()['optional'](),'visibility':z['enum'](['clear',a212_0x5d09d2(0xa4)])[a212_0x5d09d2(0x94)]()})]);export const ActivationBehaviorDefSchema=z[a212_0x5d09d2(0x98)]({'columns':z[a212_0x5d09d2(0x88)](ActivationColumnDefSchema)[a212_0x5d09d2(0x94)](),'behavior_table':z['string']()['optional'](),'join_row':z[a212_0x5d09d2(0xac)]()[a212_0x5d09d2(0x8c)]()['optional'](),'join_strategy':z[a212_0x5d09d2(0x8a)]([a212_0x5d09d2(0x96),'First',a212_0x5d09d2(0x8b),a212_0x5d09d2(0x9d)])['optional'](),'formatting':z[a212_0x5d09d2(0x8a)](['rows',a212_0x5d09d2(0xa7)])[a212_0x5d09d2(0x94)](),'order_by':z[a212_0x5d09d2(0x88)](z[a212_0x5d09d2(0x98)]({'key':z[a212_0x5d09d2(0x99)](),'order':z[a212_0x5d09d2(0x8a)]([a212_0x5d09d2(0x8e),a212_0x5d09d2(0xa2)])}))[a212_0x5d09d2(0x94)]()});function a212_0x4418(){const _0x2e0990=['union','All','behavior','object','string','weekly','344081ibETCB','week','Top-N','record','Connection\x20name\x20is\x20required','once','superRefine','descending','3071592mGsajT','masked','Activation\x20name\x20is\x20required','Use\x20either\x20`behavior`\x20or\x20`behaviors`,\x20not\x20both\x20(prefer\x20`behaviors`).','cols','cron','hour','3276777KOxohV','2SXzWxL','number','month','7228614tHMSZg','4zuvLIR','none','hourly','max','347574uLygvi','7846085nlocWy','monthly','minutes_interval','array','7200261Locuku','enum','Last','nullable','onFailure','ascending','boolean','addIssue','day','daily','unknown','optional'];a212_0x4418=function(){return _0x2e0990;};return a212_0x4418();}function a212_0x3f05(_0x45bca6,_0x2ee0fd){_0x45bca6=_0x45bca6-0x88;const _0x441869=a212_0x4418();let _0x3f051d=_0x441869[_0x45bca6];return _0x3f051d;}export const ActivationBehaviorsDefSchema=z['array'](ActivationBehaviorDefSchema)[a212_0x5d09d2(0xb2)](0x4);export const ActivationDefSchema=z[a212_0x5d09d2(0x98)]({'name':z[a212_0x5d09d2(0x99)]()['min'](0x1,a212_0x5d09d2(0xa5)),'description':z[a212_0x5d09d2(0x99)]()[a212_0x5d09d2(0x94)](),'connection':z['string']()['min'](0x1,a212_0x5d09d2(0x9f)),'all_columns':z[a212_0x5d09d2(0x8f)]()['optional'](),'columns':z[a212_0x5d09d2(0x88)](ActivationColumnDefSchema)[a212_0x5d09d2(0x94)](),'schedule':ScheduleDefSchema[a212_0x5d09d2(0x94)](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a212_0x5d09d2(0x9e)](z['string'](),z[a212_0x5d09d2(0x93)]())[a212_0x5d09d2(0x94)](),'activation_template_id':z[a212_0x5d09d2(0x99)]()[a212_0x5d09d2(0x8c)]()['optional'](),'behavior':ActivationBehaviorDefSchema['nullable']()[a212_0x5d09d2(0x94)](),'behaviors':ActivationBehaviorsDefSchema[a212_0x5d09d2(0x94)](),'run_after_journey_refresh':z[a212_0x5d09d2(0x8f)]()[a212_0x5d09d2(0x94)](),'nested_workflow_project_name':z['string']()[a212_0x5d09d2(0x94)](),'nested_workflow_name':z[a212_0x5d09d2(0x99)]()[a212_0x5d09d2(0x94)](),'lock_enabled':z[a212_0x5d09d2(0x8f)]()[a212_0x5d09d2(0x94)]()})[a212_0x5d09d2(0xa1)]((_0x2aab1b,_0x11d4cc)=>{const _0x4a4bed=a212_0x5d09d2;_0x2aab1b[_0x4a4bed(0x97)]!=null&&_0x2aab1b['behaviors']!=null&&_0x11d4cc[_0x4a4bed(0x90)]({'code':'custom','message':_0x4a4bed(0xa6),'path':[_0x4a4bed(0x97)]});});
@@ -1 +1 @@
1
- function a211_0x4cc1(){var _0x352c20=['14ipqPJq','1854984rwiAQJ','15182FpLGhN','1256284ParcvH','1495740NDZdBS','1639757FgNeES','7333840rZikBW','250248nqDMuq'];a211_0x4cc1=function(){return _0x352c20;};return a211_0x4cc1();}function a211_0x13f5(_0x37b031,_0x1e8fab){_0x37b031=_0x37b031-0x1a3;var _0x4cc1a6=a211_0x4cc1();var _0x13f59b=_0x4cc1a6[_0x37b031];return _0x13f59b;}(function(_0x44a99a,_0xf41a2e){var _0x280981=a211_0x13f5,_0x4d0416=_0x44a99a();while(!![]){try{var _0x29b46d=parseInt(_0x280981(0x1a4))/0x1*(-parseInt(_0x280981(0x1aa))/0x2)+-parseInt(_0x280981(0x1a9))/0x3+-parseInt(_0x280981(0x1a5))/0x4+parseInt(_0x280981(0x1a6))/0x5+-parseInt(_0x280981(0x1a3))/0x6+-parseInt(_0x280981(0x1a7))/0x7+parseInt(_0x280981(0x1a8))/0x8;if(_0x29b46d===_0xf41a2e)break;else _0x4d0416['push'](_0x4d0416['shift']());}catch(_0x1feea6){_0x4d0416['push'](_0x4d0416['shift']());}}}(a211_0x4cc1,0x292fe));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ function a213_0xf344(){var _0x713ff=['468858IVKTjl','2950839GomKuu','128005SFThIR','394665QLfUcL','8XJzOvM','4004567yVDafV','10SkYDQe','64EredKf','5136510XISPsq','10557170MRQVZP'];a213_0xf344=function(){return _0x713ff;};return a213_0xf344();}function a213_0x4e0d(_0x20ac19,_0x1091f2){_0x20ac19=_0x20ac19-0x191;var _0xf34428=a213_0xf344();var _0x4e0d77=_0xf34428[_0x20ac19];return _0x4e0d77;}(function(_0x1f17f5,_0x2894e9){var _0x4fc151=a213_0x4e0d,_0x292ce7=_0x1f17f5();while(!![]){try{var _0x1c1beb=parseInt(_0x4fc151(0x194))/0x1+parseInt(_0x4fc151(0x197))/0x2*(parseInt(_0x4fc151(0x191))/0x3)+parseInt(_0x4fc151(0x198))/0x4*(parseInt(_0x4fc151(0x193))/0x5)+parseInt(_0x4fc151(0x199))/0x6+-parseInt(_0x4fc151(0x196))/0x7+parseInt(_0x4fc151(0x195))/0x8*(-parseInt(_0x4fc151(0x192))/0x9)+-parseInt(_0x4fc151(0x19a))/0xa;if(_0x1c1beb===_0x2894e9)break;else _0x292ce7['push'](_0x292ce7['shift']());}catch(_0x28d1b7){_0x292ce7['push'](_0x292ce7['shift']());}}}(a213_0xf344,0x76aef));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a212_0x253f22=a212_0x4a86;(function(_0x807cdb,_0x5cb2c0){const _0x28cb90=a212_0x4a86,_0x216983=_0x807cdb();while(!![]){try{const _0x141618=parseInt(_0x28cb90(0x178))/0x1*(parseInt(_0x28cb90(0x16d))/0x2)+parseInt(_0x28cb90(0x164))/0x3+parseInt(_0x28cb90(0x17b))/0x4*(-parseInt(_0x28cb90(0x17f))/0x5)+-parseInt(_0x28cb90(0x16b))/0x6*(-parseInt(_0x28cb90(0x16f))/0x7)+parseInt(_0x28cb90(0x163))/0x8*(-parseInt(_0x28cb90(0x165))/0x9)+-parseInt(_0x28cb90(0x185))/0xa+-parseInt(_0x28cb90(0x183))/0xb;if(_0x141618===_0x5cb2c0)break;else _0x216983['push'](_0x216983['shift']());}catch(_0x5f01d6){_0x216983['push'](_0x216983['shift']());}}}(a212_0xc2d8,0x62435));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a212_0x253f22(0x16a)]([a212_0x253f22(0x188),a212_0x253f22(0x173),'launched']);export const ReentryModeTypeSchema=z[a212_0x253f22(0x16a)]([a212_0x253f22(0x15f),a212_0x253f22(0x184),a212_0x253f22(0x17c)]);export const WaitUnitTypeSchema=z['enum']([a212_0x253f22(0x187),'week']);export const StepTypeValueSchema=z['enum'](['wait',a212_0x253f22(0x160),'decision_point','ab_test','merge',a212_0x253f22(0x186),a212_0x253f22(0x16c)]);export const EmbeddedSegmentDefSchema=z[a212_0x253f22(0x179)]({'description':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a212_0x253f22(0x179)]({'journey':z[a212_0x253f22(0x17e)](),'stage':z[a212_0x253f22(0x17e)](),'bundle_id':z['string']()[a212_0x253f22(0x171)]()});export const CriteriaDefSchema=z[a212_0x253f22(0x179)]({'name':z[a212_0x253f22(0x17e)](),'description':z[a212_0x253f22(0x17e)]()['optional'](),'segment':z[a212_0x253f22(0x17e)](),'target':JumpTargetDefSchema[a212_0x253f22(0x171)]()});const WaitConditionTimeoutDefSchema=z[a212_0x253f22(0x179)]({'duration':z[a212_0x253f22(0x172)](),'unit':WaitUnitTypeSchema,'next':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)]()}),WaitConditionDefSchema=z[a212_0x253f22(0x179)]({'segment':z['string'](),'next':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'timeout':WaitConditionTimeoutDefSchema[a212_0x253f22(0x171)]()}),WaitStepParamsDefSchema=z[a212_0x253f22(0x179)]({'duration':z[a212_0x253f22(0x172)]()['optional'](),'unit':WaitUnitTypeSchema[a212_0x253f22(0x171)](),'wait_until':z['string']()['optional'](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z[a212_0x253f22(0x168)](z['string']())['optional']()}),StepBaseFields={'name':z['string'](),'uuid':z['string']()[a212_0x253f22(0x171)](),'next':z['string']()[a212_0x253f22(0x171)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a212_0x253f22(0x166)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a212_0x253f22(0x17e)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x160)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a212_0x253f22(0x179)]({'name':z[a212_0x253f22(0x17e)](),'segment':z['string']()[a212_0x253f22(0x171)](),'segment_id':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'excluded':z['boolean']()[a212_0x253f22(0x171)](),'next':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)]()}),DecisionPointStepParamsDefSchema=z[a212_0x253f22(0x179)]({'branches':z[a212_0x253f22(0x168)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x17d)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a212_0x253f22(0x179)]({'id':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'name':z[a212_0x253f22(0x17e)](),'percentage':z[a212_0x253f22(0x172)](),'next':z['string']()[a212_0x253f22(0x171)]()}),AbTestStepParamsDefSchema=z[a212_0x253f22(0x179)]({'variants':z[a212_0x253f22(0x168)](AbTestVariantDefSchema),'unique_id':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'customized_split':z['boolean']()[a212_0x253f22(0x171)]()}),AbTestStepDefSchema=z[a212_0x253f22(0x179)]({...StepBaseFields,'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x180)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a212_0x253f22(0x179)]({...StepBaseFields,'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x162))}),JumpStepParamsDefSchema=z[a212_0x253f22(0x179)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a212_0x253f22(0x179)]({...StepBaseFields,'type':z['literal'](a212_0x253f22(0x186)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a212_0x253f22(0x179)]({...StepBaseFields,'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x16c))})[a212_0x253f22(0x167)]();export const StepDefSchema=z['discriminatedUnion'](a212_0x253f22(0x174),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a212_0x253f22(0x179)]({'name':z[a212_0x253f22(0x17e)](),'description':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'id':z['string']()[a212_0x253f22(0x171)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a212_0x253f22(0x168)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a212_0x253f22(0x171)](),'root_step':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'steps':z[a212_0x253f22(0x168)](StepDefSchema)['optional']()});function a212_0xc2d8(){const _0x571930=['10oYRiHF','isArray','63mamtJF','lazy','optional','number','simulation','type','journeys','filter','boolean','136112JHsQGR','object','refine','18344XzTsHg','reentry_always','decision_point','string','580fimkoZ','ab_test','journey','stages','3579400NPVtzc','reentry_unless_goal_achieved','1982250kASDGG','jump','day','draft','no_reentry','activation','record','merge','117104AZVNMq','2301537JMlfWN','270dimHXK','literal','passthrough','array','versions','enum','299658hQCsFp','end'];a212_0xc2d8=function(){return _0x571930;};return a212_0xc2d8();}function a212_0x4a86(_0x3a1a6e,_0x44a458){_0x3a1a6e=_0x3a1a6e-0x15f;const _0xc2d80b=a212_0xc2d8();let _0x4a86e2=_0xc2d80b[_0x3a1a6e];return _0x4a86e2;}export const JourneyEntryDefSchema=z[a212_0x253f22(0x179)]({'name':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'version':z['string']()[a212_0x253f22(0x171)](),'state':JourneyStateTypeSchema['optional'](),'latest':z[a212_0x253f22(0x177)]()[a212_0x253f22(0x171)](),'stages':z[a212_0x253f22(0x168)](StageDefSchema),'id':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'version_number':z[a212_0x253f22(0x172)]()[a212_0x253f22(0x171)](),'goal':CriteriaDefSchema[a212_0x253f22(0x171)](),'reentry':ReentryModeTypeSchema[a212_0x253f22(0x171)]()});export const JourneyDefSchema=z[a212_0x253f22(0x170)](()=>z['object']({'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x181)),'name':z[a212_0x253f22(0x17e)]()['min'](0x1,'Journey\x20name\x20is\x20required'),'description':z[a212_0x253f22(0x17e)]()['optional'](),'bundle_id':z[a212_0x253f22(0x17e)]()['optional'](),'bundle_name':z['string']()[a212_0x253f22(0x171)](),'folder_id':z[a212_0x253f22(0x17e)]()['optional'](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a212_0x253f22(0x177)]()['optional'](),'goal':CriteriaDefSchema['optional'](),'id':z['string']()['optional'](),'version':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'version_number':z[a212_0x253f22(0x172)]()[a212_0x253f22(0x171)](),'stages':z[a212_0x253f22(0x168)](StageDefSchema)[a212_0x253f22(0x171)](),'versions':z[a212_0x253f22(0x168)](JourneyEntryDefSchema)[a212_0x253f22(0x171)](),'journeys':z[a212_0x253f22(0x168)](JourneyEntryDefSchema)[a212_0x253f22(0x171)](),'segments':z['record'](z['string'](),EmbeddedSegmentDefSchema)[a212_0x253f22(0x171)](),'activations':z[a212_0x253f22(0x161)](z['string'](),ActivationDefSchema)[a212_0x253f22(0x171)]()})[a212_0x253f22(0x17a)](_0x42e1c9=>{const _0x51fc8c=a212_0x253f22,_0x3d7cdb=[_0x42e1c9[_0x51fc8c(0x175)],_0x42e1c9[_0x51fc8c(0x182)],_0x42e1c9[_0x51fc8c(0x169)]][_0x51fc8c(0x176)](_0x26a7b5=>Array[_0x51fc8c(0x16e)](_0x26a7b5)&&_0x26a7b5['length']>0x0)['length'];return _0x3d7cdb===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a214_0x2594b1=a214_0xe60c;(function(_0x373d91,_0x24560b){const _0x54013b=a214_0xe60c,_0x3a8c55=_0x373d91();while(!![]){try{const _0x3c7d7a=parseInt(_0x54013b(0xe9))/0x1+-parseInt(_0x54013b(0xe3))/0x2*(-parseInt(_0x54013b(0xca))/0x3)+-parseInt(_0x54013b(0xce))/0x4*(parseInt(_0x54013b(0xd7))/0x5)+-parseInt(_0x54013b(0xc6))/0x6+parseInt(_0x54013b(0xef))/0x7*(parseInt(_0x54013b(0xe2))/0x8)+parseInt(_0x54013b(0xee))/0x9+-parseInt(_0x54013b(0xcd))/0xa*(parseInt(_0x54013b(0xe1))/0xb);if(_0x3c7d7a===_0x24560b)break;else _0x3a8c55['push'](_0x3a8c55['shift']());}catch(_0x54e88b){_0x3a8c55['push'](_0x3a8c55['shift']());}}}(a214_0x1de3,0x7fdba));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a214_0x2594b1(0xdd)]([a214_0x2594b1(0xd0),a214_0x2594b1(0xd1),a214_0x2594b1(0xd3)]);export const ReentryModeTypeSchema=z['enum'](['no_reentry',a214_0x2594b1(0xd5),a214_0x2594b1(0xe6)]);export const WaitUnitTypeSchema=z[a214_0x2594b1(0xdd)]([a214_0x2594b1(0xeb),a214_0x2594b1(0xd4)]);function a214_0x1de3(){const _0x181c69=['end','8914482kYlSvg','14eOSeoj','merge','3754026nCinKu','wait','number','jump','129FuJDCY','min','versions','250xSDnNL','244DjDDIz','journey','draft','simulation','array','launched','week','reentry_unless_goal_achieved','passthrough','13025nBjLTV','discriminatedUnion','string','optional','journeys','activation','enum','ab_test','refine','decision_point','370623Xxoliu','652584aFhneY','31894tnwDNv','record','boolean','reentry_always','length','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','311242EfDkWq','object','day','literal'];a214_0x1de3=function(){return _0x181c69;};return a214_0x1de3();}export const StepTypeValueSchema=z[a214_0x2594b1(0xdd)](['wait',a214_0x2594b1(0xdc),a214_0x2594b1(0xe0),a214_0x2594b1(0xde),a214_0x2594b1(0xc5),a214_0x2594b1(0xc9),a214_0x2594b1(0xed)]);export const EmbeddedSegmentDefSchema=z[a214_0x2594b1(0xea)]({'description':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a214_0x2594b1(0xea)]({'journey':z[a214_0x2594b1(0xd9)](),'stage':z[a214_0x2594b1(0xd9)](),'bundle_id':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)]()});export const CriteriaDefSchema=z[a214_0x2594b1(0xea)]({'name':z[a214_0x2594b1(0xd9)](),'description':z[a214_0x2594b1(0xd9)]()['optional'](),'segment':z['string'](),'target':JumpTargetDefSchema[a214_0x2594b1(0xda)]()});const WaitConditionTimeoutDefSchema=z[a214_0x2594b1(0xea)]({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)]()}),WaitConditionDefSchema=z['object']({'segment':z[a214_0x2594b1(0xd9)](),'next':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a214_0x2594b1(0xea)]({'duration':z[a214_0x2594b1(0xc8)]()[a214_0x2594b1(0xda)](),'unit':WaitUnitTypeSchema[a214_0x2594b1(0xda)](),'wait_until':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z['array'](z[a214_0x2594b1(0xd9)]())[a214_0x2594b1(0xda)]()}),StepBaseFields={'name':z[a214_0x2594b1(0xd9)](),'uuid':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)](),'next':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)]()},WaitStepDefSchema=z[a214_0x2594b1(0xea)]({...StepBaseFields,'type':z[a214_0x2594b1(0xec)](a214_0x2594b1(0xc7)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a214_0x2594b1(0xea)]({'activation':z[a214_0x2594b1(0xd9)]()}),ActivationStepDefSchema=z[a214_0x2594b1(0xea)]({...StepBaseFields,'type':z[a214_0x2594b1(0xec)](a214_0x2594b1(0xdc)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a214_0x2594b1(0xea)]({'name':z['string'](),'segment':z[a214_0x2594b1(0xd9)]()['optional'](),'segment_id':z[a214_0x2594b1(0xd9)]()['optional'](),'excluded':z[a214_0x2594b1(0xe5)]()['optional'](),'next':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)]()}),DecisionPointStepParamsDefSchema=z[a214_0x2594b1(0xea)]({'branches':z[a214_0x2594b1(0xd2)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a214_0x2594b1(0xea)]({...StepBaseFields,'type':z[a214_0x2594b1(0xec)](a214_0x2594b1(0xe0)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a214_0x2594b1(0xea)]({'id':z[a214_0x2594b1(0xd9)]()['optional'](),'name':z[a214_0x2594b1(0xd9)](),'percentage':z['number'](),'next':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)]()}),AbTestStepParamsDefSchema=z[a214_0x2594b1(0xea)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)](),'customized_split':z[a214_0x2594b1(0xe5)]()[a214_0x2594b1(0xda)]()}),AbTestStepDefSchema=z[a214_0x2594b1(0xea)]({...StepBaseFields,'type':z['literal'](a214_0x2594b1(0xde)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a214_0x2594b1(0xea)]({...StepBaseFields,'type':z[a214_0x2594b1(0xec)](a214_0x2594b1(0xc5))}),JumpStepParamsDefSchema=z[a214_0x2594b1(0xea)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a214_0x2594b1(0xea)]({...StepBaseFields,'type':z[a214_0x2594b1(0xec)](a214_0x2594b1(0xc9)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a214_0x2594b1(0xea)]({...StepBaseFields,'type':z['literal'](a214_0x2594b1(0xed))})[a214_0x2594b1(0xd6)]();export const StepDefSchema=z[a214_0x2594b1(0xd8)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);function a214_0xe60c(_0x4973d6,_0x5c23ae){_0x4973d6=_0x4973d6-0xc5;const _0x1de3b6=a214_0x1de3();let _0xe60cae=_0x1de3b6[_0x4973d6];return _0xe60cae;}export const StageDefSchema=z[a214_0x2594b1(0xea)]({'name':z[a214_0x2594b1(0xd9)](),'description':z['string']()[a214_0x2594b1(0xda)](),'id':z['string']()[a214_0x2594b1(0xda)](),'entry_criteria':CriteriaDefSchema[a214_0x2594b1(0xda)](),'exit_criteria':z['array'](CriteriaDefSchema)[a214_0x2594b1(0xda)](),'milestone':CriteriaDefSchema[a214_0x2594b1(0xda)](),'root_step':z['string']()[a214_0x2594b1(0xda)](),'steps':z[a214_0x2594b1(0xd2)](StepDefSchema)[a214_0x2594b1(0xda)]()});export const JourneyEntryDefSchema=z[a214_0x2594b1(0xea)]({'name':z['string']()[a214_0x2594b1(0xda)](),'version':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)](),'state':JourneyStateTypeSchema['optional'](),'latest':z['boolean']()[a214_0x2594b1(0xda)](),'stages':z[a214_0x2594b1(0xd2)](StageDefSchema),'id':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)](),'version_number':z[a214_0x2594b1(0xc8)]()['optional'](),'goal':CriteriaDefSchema[a214_0x2594b1(0xda)](),'reentry':ReentryModeTypeSchema[a214_0x2594b1(0xda)]()});export const JourneyDefSchema=z['lazy'](()=>z[a214_0x2594b1(0xea)]({'type':z[a214_0x2594b1(0xec)](a214_0x2594b1(0xcf)),'name':z['string']()[a214_0x2594b1(0xcb)](0x1,'Journey\x20name\x20is\x20required'),'description':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)](),'bundle_id':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)](),'bundle_name':z['string']()[a214_0x2594b1(0xda)](),'folder_id':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)](),'reentry':ReentryModeTypeSchema[a214_0x2594b1(0xda)](),'allow_reentry':z['boolean']()['optional'](),'goal':CriteriaDefSchema[a214_0x2594b1(0xda)](),'id':z[a214_0x2594b1(0xd9)]()[a214_0x2594b1(0xda)](),'version':z['string']()[a214_0x2594b1(0xda)](),'version_number':z[a214_0x2594b1(0xc8)]()[a214_0x2594b1(0xda)](),'stages':z['array'](StageDefSchema)[a214_0x2594b1(0xda)](),'versions':z[a214_0x2594b1(0xd2)](JourneyEntryDefSchema)[a214_0x2594b1(0xda)](),'journeys':z[a214_0x2594b1(0xd2)](JourneyEntryDefSchema)[a214_0x2594b1(0xda)](),'segments':z['record'](z[a214_0x2594b1(0xd9)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z[a214_0x2594b1(0xe4)](z['string'](),ActivationDefSchema)['optional']()})[a214_0x2594b1(0xdf)](_0x4f2729=>{const _0x130abc=a214_0x2594b1,_0xe116cf=[_0x4f2729[_0x130abc(0xdb)],_0x4f2729['stages'],_0x4f2729[_0x130abc(0xcc)]]['filter'](_0x32cbf6=>Array['isArray'](_0x32cbf6)&&_0x32cbf6[_0x130abc(0xe7)]>0x0)[_0x130abc(0xe7)];return _0xe116cf===0x1;},{'message':a214_0x2594b1(0xe8)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x3e2c07,_0x1ab5e6){var _0x11eeb8=a214_0x4534,_0x59b7d7=_0x3e2c07();while(!![]){try{var _0x2c6075=parseInt(_0x11eeb8(0x89))/0x1*(-parseInt(_0x11eeb8(0x90))/0x2)+-parseInt(_0x11eeb8(0x8d))/0x3*(-parseInt(_0x11eeb8(0x87))/0x4)+parseInt(_0x11eeb8(0x8b))/0x5+parseInt(_0x11eeb8(0x8a))/0x6+-parseInt(_0x11eeb8(0x8c))/0x7+-parseInt(_0x11eeb8(0x88))/0x8*(-parseInt(_0x11eeb8(0x8f))/0x9)+-parseInt(_0x11eeb8(0x8e))/0xa;if(_0x2c6075===_0x1ab5e6)break;else _0x59b7d7['push'](_0x59b7d7['shift']());}catch(_0x186dbf){_0x59b7d7['push'](_0x59b7d7['shift']());}}}(a214_0x5578,0xb037f));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 a214_0x4534(_0x44091a,_0x273410){_0x44091a=_0x44091a-0x87;var _0x55781d=a214_0x5578();var _0x4534e6=_0x55781d[_0x44091a];return _0x4534e6;}function a214_0x5578(){var _0x17dadf=['3kjeycg','15485630XpBkJG','9HYONZE','106TVkjGo','3918468jWPRgL','7872968uNBLGO','2466sVfRKK','702198GnHhgc','6692835sumIFR','7128002DFOmkk'];a214_0x5578=function(){return _0x17dadf;};return a214_0x5578();}
1
+ (function(_0x499a8d,_0x247876){var _0x2cee91=a216_0x2e83,_0x53d349=_0x499a8d();while(!![]){try{var _0x336856=parseInt(_0x2cee91(0x187))/0x1*(-parseInt(_0x2cee91(0x188))/0x2)+-parseInt(_0x2cee91(0x189))/0x3*(parseInt(_0x2cee91(0x18f))/0x4)+parseInt(_0x2cee91(0x186))/0x5+-parseInt(_0x2cee91(0x18a))/0x6*(parseInt(_0x2cee91(0x18d))/0x7)+-parseInt(_0x2cee91(0x18b))/0x8+parseInt(_0x2cee91(0x18c))/0x9+parseInt(_0x2cee91(0x18e))/0xa*(parseInt(_0x2cee91(0x185))/0xb);if(_0x336856===_0x247876)break;else _0x53d349['push'](_0x53d349['shift']());}catch(_0xf44925){_0x53d349['push'](_0x53d349['shift']());}}}(a216_0x2879,0x4d63f));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 a216_0x2e83(_0xc4ca78,_0x149076){_0xc4ca78=_0xc4ca78-0x185;var _0x287920=a216_0x2879();var _0x2e8307=_0x287920[_0xc4ca78];return _0x2e8307;}function a216_0x2879(){var _0xdb01c3=['70mPevCj','4EvNjYx','1381897FtfHaw','1907025QYMWnV','358PYeLMo','3296PJomnq','419067CutPsK','6Ilgcaq','2621808WcnqDt','3356145TwiQsD','1815163XeKodP'];a216_0x2879=function(){return _0xdb01c3;};return a216_0x2879();}
@@ -1 +1 @@
1
- const a215_0x3e9a99=a215_0x4cd4;(function(_0x271e6b,_0x13ac72){const _0x2f983e=a215_0x4cd4,_0x3973ba=_0x271e6b();while(!![]){try{const _0x51230d=parseInt(_0x2f983e(0x15e))/0x1*(-parseInt(_0x2f983e(0x14d))/0x2)+-parseInt(_0x2f983e(0x12c))/0x3+-parseInt(_0x2f983e(0x15a))/0x4*(-parseInt(_0x2f983e(0x16a))/0x5)+parseInt(_0x2f983e(0x14e))/0x6+-parseInt(_0x2f983e(0x161))/0x7*(parseInt(_0x2f983e(0x13b))/0x8)+parseInt(_0x2f983e(0x131))/0x9*(parseInt(_0x2f983e(0x123))/0xa)+parseInt(_0x2f983e(0x15d))/0xb*(-parseInt(_0x2f983e(0x166))/0xc);if(_0x51230d===_0x13ac72)break;else _0x3973ba['push'](_0x3973ba['shift']());}catch(_0x3e8a64){_0x3973ba['push'](_0x3973ba['shift']());}}}(a215_0x3dbb,0x472b3));import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';export const OperatorTypeSchema=z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x136),'Greater',a215_0x3e9a99(0x11b),'GreaterEqual','LessEqual','In',a215_0x3e9a99(0x141),a215_0x3e9a99(0x145),'IsNull',a215_0x3e9a99(0x150),a215_0x3e9a99(0x128),'Contain','StartWith',a215_0x3e9a99(0x121),a215_0x3e9a99(0x154)]);export const TimeUnitSchema=z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x159),a215_0x3e9a99(0x137),a215_0x3e9a99(0x11d),a215_0x3e9a99(0x158),'week','month',a215_0x3e9a99(0x163)]);export const AggregationTypeSchema=z['enum'](['Count',a215_0x3e9a99(0x148),a215_0x3e9a99(0x16c),a215_0x3e9a99(0x11c),'Max','CountDistinct','First','Last']);const TemporalValueSchema=z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x12f)]({'timestamp':z[a215_0x3e9a99(0x14f)]()}),z[a215_0x3e9a99(0x12f)]({'last':z[a215_0x3e9a99(0x160)]([z['number'](),z[a215_0x3e9a99(0x14a)](z[a215_0x3e9a99(0x14f)](),z[a215_0x3e9a99(0x16d)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x14f)](),z[a215_0x3e9a99(0x16d)](),z[a215_0x3e9a99(0x126)](),TemporalValueSchema,z['array'](z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x14f)](),z[a215_0x3e9a99(0x16d)](),z[a215_0x3e9a99(0x126)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a215_0x3e9a99(0x136),a215_0x3e9a99(0x13c),a215_0x3e9a99(0x122),a215_0x3e9a99(0x11b),a215_0x3e9a99(0x13f),'In',a215_0x3e9a99(0x140),a215_0x3e9a99(0x170),a215_0x3e9a99(0x121),'Regexp',a215_0x3e9a99(0x150),a215_0x3e9a99(0x128)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a215_0x3e9a99(0x128)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a215_0x3e9a99(0x126)]()[a215_0x3e9a99(0x142)](),'value':OperatorValueSchema[a215_0x3e9a99(0x142)](),'min':z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x16d)](),z[a215_0x3e9a99(0x14f)](),TemporalValueSchema])[a215_0x3e9a99(0x142)](),'max':z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x16d)](),z[a215_0x3e9a99(0x14f)](),TemporalValueSchema])[a215_0x3e9a99(0x142)](),'unit':TimeUnitSchema[a215_0x3e9a99(0x142)](),'duration':z[a215_0x3e9a99(0x12f)]({'day':z[a215_0x3e9a99(0x16d)]()['optional'](),'week':z['number']()['optional'](),'month':z['number']()[a215_0x3e9a99(0x142)](),'year':z['number']()[a215_0x3e9a99(0x142)](),'hour':z[a215_0x3e9a99(0x16d)]()[a215_0x3e9a99(0x142)](),'minute':z['number']()[a215_0x3e9a99(0x142)](),'second':z[a215_0x3e9a99(0x16d)]()['optional']()})[a215_0x3e9a99(0x142)](),'from':z[a215_0x3e9a99(0x12f)]({'last':z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x16d)](),z[a215_0x3e9a99(0x14f)]()]),'unit':TimeUnitSchema})[a215_0x3e9a99(0x142)](),'reverse':z[a215_0x3e9a99(0x126)]()[a215_0x3e9a99(0x142)]()})[a215_0x3e9a99(0x13d)]((_0x1dbc62,_0x55552a)=>{const _0x372094=a215_0x3e9a99;OPERATORS_REQUIRING_VALUE['has'](_0x1dbc62[_0x372094(0x15c)])&&(_0x1dbc62[_0x372094(0x167)]===undefined||_0x1dbc62[_0x372094(0x167)]===null)&&_0x55552a['addIssue']({'code':_0x372094(0x143),'message':_0x372094(0x125)+_0x1dbc62[_0x372094(0x15c)]+'\x27\x20requires\x20a\x20value','path':[_0x372094(0x167)]}),_0x1dbc62[_0x372094(0x15c)]==='Between'&&_0x1dbc62[_0x372094(0x134)]===undefined&&_0x1dbc62[_0x372094(0x16b)]===undefined&&_0x55552a[_0x372094(0x146)]({'code':_0x372094(0x143),'message':_0x372094(0x155),'params':{'validationCode':_0x372094(0x127)}}),OPERATORS_REQUIRING_UNIT[_0x372094(0x149)](_0x1dbc62[_0x372094(0x15c)])&&_0x1dbc62[_0x372094(0x167)]!==undefined&&!_0x1dbc62['unit']&&_0x55552a['addIssue']({'code':_0x372094(0x143),'message':_0x372094(0x125)+_0x1dbc62['type']+_0x372094(0x14b),'path':['unit'],'params':{'validationCode':_0x372094(0x15f)}}),_0x1dbc62[_0x372094(0x15c)]===_0x372094(0x154)&&(!_0x1dbc62[_0x372094(0x132)]&&_0x55552a[_0x372094(0x146)]({'code':_0x372094(0x143),'message':_0x372094(0x12d),'path':['duration']}),!_0x1dbc62[_0x372094(0x162)]&&_0x55552a['addIssue']({'code':_0x372094(0x143),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x372094(0x162)]}));});export const ArrayMatchingSchema=z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x135)](a215_0x3e9a99(0x169)),z[a215_0x3e9a99(0x135)]('all'),z[a215_0x3e9a99(0x12f)]({'atLeast':z[a215_0x3e9a99(0x16d)]()}),z['object']({'atMost':z[a215_0x3e9a99(0x16d)]()}),z[a215_0x3e9a99(0x12f)]({'exactly':z[a215_0x3e9a99(0x16d)]()})]);export const AggregationDefSchema=z[a215_0x3e9a99(0x165)]('type',[z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x153)](['Sum','Min',a215_0x3e9a99(0x164),a215_0x3e9a99(0x16c)]),'column':z['string'](),'groupingColumns':z[a215_0x3e9a99(0x157)](z[a215_0x3e9a99(0x14f)]())[a215_0x3e9a99(0x142)]()}),z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x135)](a215_0x3e9a99(0x151)),'groupingColumns':z['array'](z[a215_0x3e9a99(0x14f)]())[a215_0x3e9a99(0x142)]()}),z['object']({'type':z[a215_0x3e9a99(0x135)](a215_0x3e9a99(0x130)),'columns':z[a215_0x3e9a99(0x157)](z[a215_0x3e9a99(0x14f)]())}),z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x129),a215_0x3e9a99(0x15b)]),'column':z['string'](),'orderColumn':z[a215_0x3e9a99(0x14f)](),'groupingColumns':z[a215_0x3e9a99(0x157)](z[a215_0x3e9a99(0x14f)]())[a215_0x3e9a99(0x142)]()})]);export const TimeWindowDefSchema=z[a215_0x3e9a99(0x12f)]({'duration':z[a215_0x3e9a99(0x16d)](),'unit':TimeUnitSchema});function a215_0x3dbb(){const _0x3d7ff0=['Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Composite','array','day','second','181948jYutun','Last','type','11649ZZCouj','1ITxfqt','MISSING_TIME_UNIT','union','441658PeSqDY','from','year','Max','discriminatedUnion','3240MGYaVe','value','funnel_stage','any','5KGxrNy','max','Average','number','Segment\x20name\x20is\x20required','And','StartWith','Less','Min','hour','include','\x20operators\x20(got\x20\x27','realtime','EndWith','GreaterEqual','2924240nGmtKk','lazy','Operator\x20\x27','boolean','MISSING_BETWEEN_BOUNDS','TimeWithinNext','First','Column','batch','333264WzQqtO','TimeRange\x20operator\x20requires\x20\x27duration\x27','Segment\x20reference\x20must\x20not\x20be\x20empty','object','CountDistinct','9tKGXCB','duration','timestamp','min','literal','Equal','minute','every','Timestamp\x20column\x20only\x20supports\x20','Behavior','16DBNHnm','Greater','superRefine','segment','LessEqual','Contain','Between','optional','custom','operator','Regexp','addIssue','exclude','Sum','has','record','\x27\x20requires\x20a\x20time\x20unit','Value','76852jiLZWT','3091368vOdtnF','string','TimeWithinPast','Count','join','enum','TimeRange'];a215_0x3dbb=function(){return _0x3d7ff0;};return a215_0x3dbb();}const TIMEFRAME_OPERATORS=new Set(['TimeWithinPast','TimeWithinNext',a215_0x3e9a99(0x154)]),TIMESTAMP_COMPARISON_OPERATORS=new Set([a215_0x3e9a99(0x136),a215_0x3e9a99(0x13c),a215_0x3e9a99(0x122),a215_0x3e9a99(0x11b),a215_0x3e9a99(0x13f),'Between']),TIMESTAMP_OPERATORS=new Set([...TIMEFRAME_OPERATORS,...TIMESTAMP_COMPARISON_OPERATORS]);function isTemporalValueShape(_0x627a15){const _0x383e6=a215_0x3e9a99;return typeof _0x627a15===_0x383e6(0x12f)&&_0x627a15!==null&&!Array['isArray'](_0x627a15)&&(_0x383e6(0x133)in _0x627a15||'last'in _0x627a15);}export const FilterColumnConditionDefSchema=z[a215_0x3e9a99(0x12f)]({'type':z['literal']('Column'),'column':z[a215_0x3e9a99(0x14f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a215_0x3e9a99(0x142)]()})[a215_0x3e9a99(0x13d)]((_0x24faa0,_0x37320e)=>{const _0x417256=a215_0x3e9a99,_0x509574=_0x24faa0[_0x417256(0x144)][_0x417256(0x15c)];if(_0x24faa0['column']===_0x417256(0x133)){if(!TIMESTAMP_OPERATORS[_0x417256(0x149)](_0x509574)){_0x37320e[_0x417256(0x146)]({'code':_0x417256(0x143),'message':_0x417256(0x139)+[...TIMESTAMP_OPERATORS][_0x417256(0x152)](',\x20')+_0x417256(0x11f)+_0x509574+'\x27)','path':[_0x417256(0x144),_0x417256(0x15c)]});return;}if(TIMESTAMP_COMPARISON_OPERATORS[_0x417256(0x149)](_0x509574)){const _0x4b3d70=_0x509574===_0x417256(0x141)?[_0x24faa0['operator'][_0x417256(0x134)],_0x24faa0['operator'][_0x417256(0x16b)]][_0x417256(0x138)](_0x156b17=>_0x156b17===undefined||isTemporalValueShape(_0x156b17)):_0x24faa0['operator'][_0x417256(0x167)]===undefined||isTemporalValueShape(_0x24faa0[_0x417256(0x144)][_0x417256(0x167)]);!_0x4b3d70&&_0x37320e['addIssue']({'code':'custom','message':'Timestamp\x20column\x27s\x20\x27'+_0x509574+'\x27\x20operator\x20requires\x20a\x20relative-time\x20or\x20timestamp\x20value\x20({last,\x20unit}\x20or\x20{timestamp}),\x20not\x20a\x20plain\x20value','path':[_0x417256(0x144)]});}}});export const FilterRuleDefSchema=z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x135)](a215_0x3e9a99(0x16f)),'conditions':z[a215_0x3e9a99(0x157)](FilterColumnConditionDefSchema)});function a215_0x4cd4(_0x493b08,_0x54f5b3){_0x493b08=_0x493b08-0x11b;const _0x3dbb22=a215_0x3dbb();let _0x4cd45a=_0x3dbb22[_0x493b08];return _0x4cd45a;}export const ValueConditionDefSchema=z[a215_0x3e9a99(0x124)](()=>z['object']({'type':z['literal'](a215_0x3e9a99(0x14c)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a215_0x3e9a99(0x142)](),'exclude':z[a215_0x3e9a99(0x126)]()[a215_0x3e9a99(0x142)](),'aggregation':AggregationDefSchema[a215_0x3e9a99(0x142)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a215_0x3e9a99(0x16d)]()[a215_0x3e9a99(0x142)]()}));export const BehaviorConditionDefSchema=z[a215_0x3e9a99(0x124)](()=>z['object']({'type':z['literal'](a215_0x3e9a99(0x13a)),'attribute':z[a215_0x3e9a99(0x14f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a215_0x3e9a99(0x142)](),'exclude':z[a215_0x3e9a99(0x126)]()['optional'](),'aggregation':AggregationDefSchema[a215_0x3e9a99(0x142)](),'source':z[a215_0x3e9a99(0x14f)]()[a215_0x3e9a99(0x142)](),'filter':FilterRuleDefSchema[a215_0x3e9a99(0x142)](),'timeWindow':TimeWindowDefSchema[a215_0x3e9a99(0x142)](),'limit':z[a215_0x3e9a99(0x16d)]()['optional']()}));export const ColumnConditionDefSchema=z['object']({'type':z[a215_0x3e9a99(0x135)](a215_0x3e9a99(0x12a)),'column':z[a215_0x3e9a99(0x14f)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a215_0x3e9a99(0x124)](()=>z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x16f),'Or','Composite']),'conditions':z[a215_0x3e9a99(0x157)](ConditionDefSchema),'description':z['string']()[a215_0x3e9a99(0x142)](),'expr':z[a215_0x3e9a99(0x14f)]()[a215_0x3e9a99(0x142)]()}));export const SegmentRefConditionDefSchema=z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x11e),a215_0x3e9a99(0x147)]),'segment':z[a215_0x3e9a99(0x14f)]()[a215_0x3e9a99(0x134)](0x1,a215_0x3e9a99(0x12e))});export const ConditionDefSchema=z['lazy'](()=>z[a215_0x3e9a99(0x160)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x16f),'Or',a215_0x3e9a99(0x156)]),'conditions':z[a215_0x3e9a99(0x157)](ConditionDefSchema),'description':z[a215_0x3e9a99(0x14f)]()['optional'](),'expr':z[a215_0x3e9a99(0x14f)]()[a215_0x3e9a99(0x142)]()}));export const SegmentDefSchema=z[a215_0x3e9a99(0x12f)]({'type':z['literal'](a215_0x3e9a99(0x13e))[a215_0x3e9a99(0x142)](),'name':z[a215_0x3e9a99(0x14f)]()['min'](0x1,a215_0x3e9a99(0x16e)),'description':z['string']()['optional'](),'folder':z['string']()[a215_0x3e9a99(0x142)](),'rule':RuleDefSchema[a215_0x3e9a99(0x142)](),'kind':z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x12b),a215_0x3e9a99(0x120),a215_0x3e9a99(0x168)])[a215_0x3e9a99(0x142)](),'visible':z[a215_0x3e9a99(0x126)]()['optional'](),'activations':z['array'](ActivationDefSchema)[a215_0x3e9a99(0x142)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a217_0x295daf=a217_0x1655;(function(_0x31108a,_0x18ea9c){const _0x190af4=a217_0x1655,_0x302868=_0x31108a();while(!![]){try{const _0x20980a=-parseInt(_0x190af4(0x8b))/0x1+parseInt(_0x190af4(0x94))/0x2*(-parseInt(_0x190af4(0x89))/0x3)+-parseInt(_0x190af4(0x6c))/0x4*(parseInt(_0x190af4(0x7d))/0x5)+-parseInt(_0x190af4(0x7b))/0x6+-parseInt(_0x190af4(0x6e))/0x7*(parseInt(_0x190af4(0x85))/0x8)+parseInt(_0x190af4(0x99))/0x9*(parseInt(_0x190af4(0xa6))/0xa)+parseInt(_0x190af4(0xa0))/0xb;if(_0x20980a===_0x18ea9c)break;else _0x302868['push'](_0x302868['shift']());}catch(_0x2a9399){_0x302868['push'](_0x302868['shift']());}}}(a217_0x290a,0xa466c));import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';export const OperatorTypeSchema=z[a217_0x295daf(0xbe)](['Equal',a217_0x295daf(0x76),a217_0x295daf(0x6f),a217_0x295daf(0x79),a217_0x295daf(0x9a),'In',a217_0x295daf(0x81),a217_0x295daf(0xb0),'IsNull',a217_0x295daf(0xa9),a217_0x295daf(0x7e),a217_0x295daf(0x77),a217_0x295daf(0x7a),a217_0x295daf(0xbb),a217_0x295daf(0xb6)]);export const TimeUnitSchema=z[a217_0x295daf(0xbe)](['second','minute',a217_0x295daf(0xb3),a217_0x295daf(0x7c),a217_0x295daf(0x84),a217_0x295daf(0x72),a217_0x295daf(0x75)]);function a217_0x1655(_0x4d5171,_0x11a03c){_0x4d5171=_0x4d5171-0x6a;const _0x290a47=a217_0x290a();let _0x1655fe=_0x290a47[_0x4d5171];return _0x1655fe;}export const AggregationTypeSchema=z[a217_0x295daf(0xbe)]([a217_0x295daf(0x93),'Sum',a217_0x295daf(0x8f),a217_0x295daf(0x91),a217_0x295daf(0x73),'CountDistinct',a217_0x295daf(0xb8),a217_0x295daf(0x90)]);function a217_0x290a(){const _0x8f0f0c=['\x27\x20operator\x20requires\x20a\x20relative-time\x20or\x20timestamp\x20value\x20({last,\x20unit}\x20or\x20{timestamp}),\x20not\x20a\x20plain\x20value','867615kNiamn','Less','operator','Sum','month','Max','TimeRange\x20operator\x20requires\x20\x27from\x27','year','Greater','Contain','include','GreaterEqual','StartWith','2985540ESOUPi','day','4247135dsBjgB','TimeWithinNext','Equal','timestamp','Between','Column','Behavior','week','24CYKgYX','custom','CountDistinct','addIssue','3HXKxNY','lazy','1042318JmEtLE','optional','every','And','Average','Last','Min','object','Count','1747220VGRgPA','realtime','from','Timestamp\x20column\x20only\x20supports\x20','union','10166967PBqjJL','LessEqual','column','\x20operators\x20(got\x20\x27','boolean','literal','string','34963555ePjFyC','MISSING_BETWEEN_BOUNDS','Timestamp\x20column\x27s\x20\x27','discriminatedUnion','all','array','10AbOnyS','Composite','has','TimeWithinPast','value','\x27\x20requires\x20a\x20value','max','any','Value','min','Regexp','last','join','hour','unit','MISSING_TIME_UNIT','TimeRange','batch','First','TimeRange\x20operator\x20requires\x20\x27duration\x27','number','EndWith','segment','Operator\x20\x27','enum','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','type','4gwbBYR'];a217_0x290a=function(){return _0x8f0f0c;};return a217_0x290a();}const TemporalValueSchema=z[a217_0x295daf(0x98)]([z[a217_0x295daf(0x92)]({'timestamp':z[a217_0x295daf(0x9f)]()}),z[a217_0x295daf(0x92)]({'last':z[a217_0x295daf(0x98)]([z[a217_0x295daf(0xba)](),z['record'](z[a217_0x295daf(0x9f)](),z[a217_0x295daf(0xba)]())]),'unit':z[a217_0x295daf(0x9f)]()})]),OperatorValueSchema=z[a217_0x295daf(0x98)]([z['string'](),z[a217_0x295daf(0xba)](),z['boolean'](),TemporalValueSchema,z['array'](z['union']([z['string'](),z[a217_0x295daf(0xba)](),z[a217_0x295daf(0x9d)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a217_0x295daf(0x7f),'Greater',a217_0x295daf(0x79),a217_0x295daf(0x6f),a217_0x295daf(0x9a),'In',a217_0x295daf(0x77),a217_0x295daf(0x7a),a217_0x295daf(0xbb),a217_0x295daf(0xb0),a217_0x295daf(0xa9),a217_0x295daf(0x7e)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a217_0x295daf(0x7e)]);export const OperatorDefSchema=z[a217_0x295daf(0x92)]({'type':OperatorTypeSchema,'not':z[a217_0x295daf(0x9d)]()['optional'](),'value':OperatorValueSchema[a217_0x295daf(0x8c)](),'min':z[a217_0x295daf(0x98)]([z['number'](),z[a217_0x295daf(0x9f)](),TemporalValueSchema])['optional'](),'max':z['union']([z[a217_0x295daf(0xba)](),z[a217_0x295daf(0x9f)](),TemporalValueSchema])[a217_0x295daf(0x8c)](),'unit':TimeUnitSchema[a217_0x295daf(0x8c)](),'duration':z[a217_0x295daf(0x92)]({'day':z[a217_0x295daf(0xba)]()[a217_0x295daf(0x8c)](),'week':z[a217_0x295daf(0xba)]()[a217_0x295daf(0x8c)](),'month':z[a217_0x295daf(0xba)]()[a217_0x295daf(0x8c)](),'year':z['number']()['optional'](),'hour':z[a217_0x295daf(0xba)]()['optional'](),'minute':z[a217_0x295daf(0xba)]()[a217_0x295daf(0x8c)](),'second':z['number']()[a217_0x295daf(0x8c)]()})[a217_0x295daf(0x8c)](),'from':z['object']({'last':z['union']([z['number'](),z[a217_0x295daf(0x9f)]()]),'unit':TimeUnitSchema})[a217_0x295daf(0x8c)](),'reverse':z['boolean']()['optional']()})['superRefine']((_0x200ac9,_0x1389c5)=>{const _0x1ebbcb=a217_0x295daf;OPERATORS_REQUIRING_VALUE['has'](_0x200ac9[_0x1ebbcb(0x6b)])&&(_0x200ac9[_0x1ebbcb(0xaa)]===undefined||_0x200ac9[_0x1ebbcb(0xaa)]===null)&&_0x1389c5[_0x1ebbcb(0x88)]({'code':_0x1ebbcb(0x86),'message':_0x1ebbcb(0xbd)+_0x200ac9['type']+_0x1ebbcb(0xab),'path':[_0x1ebbcb(0xaa)]}),_0x200ac9['type']===_0x1ebbcb(0x81)&&_0x200ac9[_0x1ebbcb(0xaf)]===undefined&&_0x200ac9['max']===undefined&&_0x1389c5['addIssue']({'code':'custom','message':_0x1ebbcb(0x6a),'params':{'validationCode':_0x1ebbcb(0xa1)}}),OPERATORS_REQUIRING_UNIT[_0x1ebbcb(0xa8)](_0x200ac9[_0x1ebbcb(0x6b)])&&_0x200ac9['value']!==undefined&&!_0x200ac9[_0x1ebbcb(0xb4)]&&_0x1389c5[_0x1ebbcb(0x88)]({'code':_0x1ebbcb(0x86),'message':_0x1ebbcb(0xbd)+_0x200ac9[_0x1ebbcb(0x6b)]+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x1ebbcb(0xb4)],'params':{'validationCode':_0x1ebbcb(0xb5)}}),_0x200ac9[_0x1ebbcb(0x6b)]==='TimeRange'&&(!_0x200ac9['duration']&&_0x1389c5[_0x1ebbcb(0x88)]({'code':_0x1ebbcb(0x86),'message':_0x1ebbcb(0xb9),'path':['duration']}),!_0x200ac9[_0x1ebbcb(0x96)]&&_0x1389c5[_0x1ebbcb(0x88)]({'code':_0x1ebbcb(0x86),'message':_0x1ebbcb(0x74),'path':[_0x1ebbcb(0x96)]}));});export const ArrayMatchingSchema=z['union']([z[a217_0x295daf(0x9e)](a217_0x295daf(0xad)),z['literal'](a217_0x295daf(0xa4)),z['object']({'atLeast':z[a217_0x295daf(0xba)]()}),z[a217_0x295daf(0x92)]({'atMost':z[a217_0x295daf(0xba)]()}),z[a217_0x295daf(0x92)]({'exactly':z[a217_0x295daf(0xba)]()})]);export const AggregationDefSchema=z[a217_0x295daf(0xa3)]('type',[z[a217_0x295daf(0x92)]({'type':z['enum']([a217_0x295daf(0x71),a217_0x295daf(0x91),a217_0x295daf(0x73),a217_0x295daf(0x8f)]),'column':z[a217_0x295daf(0x9f)](),'groupingColumns':z['array'](z['string']())['optional']()}),z['object']({'type':z[a217_0x295daf(0x9e)](a217_0x295daf(0x93)),'groupingColumns':z[a217_0x295daf(0xa5)](z['string']())[a217_0x295daf(0x8c)]()}),z[a217_0x295daf(0x92)]({'type':z[a217_0x295daf(0x9e)](a217_0x295daf(0x87)),'columns':z[a217_0x295daf(0xa5)](z[a217_0x295daf(0x9f)]())}),z[a217_0x295daf(0x92)]({'type':z[a217_0x295daf(0xbe)]([a217_0x295daf(0xb8),'Last']),'column':z[a217_0x295daf(0x9f)](),'orderColumn':z[a217_0x295daf(0x9f)](),'groupingColumns':z[a217_0x295daf(0xa5)](z['string']())[a217_0x295daf(0x8c)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a217_0x295daf(0xba)](),'unit':TimeUnitSchema});const TIMEFRAME_OPERATORS=new Set(['TimeWithinPast',a217_0x295daf(0x7e),a217_0x295daf(0xb6)]),TIMESTAMP_COMPARISON_OPERATORS=new Set([a217_0x295daf(0x7f),a217_0x295daf(0x76),'GreaterEqual',a217_0x295daf(0x6f),a217_0x295daf(0x9a),a217_0x295daf(0x81)]),TIMESTAMP_OPERATORS=new Set([...TIMEFRAME_OPERATORS,...TIMESTAMP_COMPARISON_OPERATORS]);function isTemporalValueShape(_0x4c25bf){const _0x2d5634=a217_0x295daf;return typeof _0x4c25bf==='object'&&_0x4c25bf!==null&&!Array['isArray'](_0x4c25bf)&&('timestamp'in _0x4c25bf||_0x2d5634(0xb1)in _0x4c25bf);}export const FilterColumnConditionDefSchema=z['object']({'type':z[a217_0x295daf(0x9e)]('Column'),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})['superRefine']((_0x5c4a6c,_0x3c7624)=>{const _0x5253d5=a217_0x295daf,_0x1df34c=_0x5c4a6c[_0x5253d5(0x70)][_0x5253d5(0x6b)];if(_0x5c4a6c[_0x5253d5(0x9b)]===_0x5253d5(0x80)){if(!TIMESTAMP_OPERATORS['has'](_0x1df34c)){_0x3c7624[_0x5253d5(0x88)]({'code':_0x5253d5(0x86),'message':_0x5253d5(0x97)+[...TIMESTAMP_OPERATORS][_0x5253d5(0xb2)](',\x20')+_0x5253d5(0x9c)+_0x1df34c+'\x27)','path':[_0x5253d5(0x70),_0x5253d5(0x6b)]});return;}if(TIMESTAMP_COMPARISON_OPERATORS[_0x5253d5(0xa8)](_0x1df34c)){const _0x3d4592=_0x1df34c===_0x5253d5(0x81)?[_0x5c4a6c[_0x5253d5(0x70)][_0x5253d5(0xaf)],_0x5c4a6c[_0x5253d5(0x70)][_0x5253d5(0xac)]][_0x5253d5(0x8d)](_0x215be0=>_0x215be0===undefined||isTemporalValueShape(_0x215be0)):_0x5c4a6c['operator']['value']===undefined||isTemporalValueShape(_0x5c4a6c[_0x5253d5(0x70)][_0x5253d5(0xaa)]);!_0x3d4592&&_0x3c7624[_0x5253d5(0x88)]({'code':_0x5253d5(0x86),'message':_0x5253d5(0xa2)+_0x1df34c+_0x5253d5(0x6d),'path':[_0x5253d5(0x70)]});}}});export const FilterRuleDefSchema=z[a217_0x295daf(0x92)]({'type':z[a217_0x295daf(0x9e)](a217_0x295daf(0x8e)),'conditions':z[a217_0x295daf(0xa5)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a217_0x295daf(0x8a)](()=>z[a217_0x295daf(0x92)]({'type':z[a217_0x295daf(0x9e)](a217_0x295daf(0xae)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a217_0x295daf(0x8c)](),'exclude':z[a217_0x295daf(0x9d)]()['optional'](),'aggregation':AggregationDefSchema[a217_0x295daf(0x8c)](),'source':z[a217_0x295daf(0x9f)]()[a217_0x295daf(0x8c)](),'filter':FilterRuleDefSchema[a217_0x295daf(0x8c)](),'limit':z[a217_0x295daf(0xba)]()[a217_0x295daf(0x8c)]()}));export const BehaviorConditionDefSchema=z[a217_0x295daf(0x8a)](()=>z[a217_0x295daf(0x92)]({'type':z['literal'](a217_0x295daf(0x83)),'attribute':z[a217_0x295daf(0x9f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a217_0x295daf(0x8c)](),'exclude':z[a217_0x295daf(0x9d)]()[a217_0x295daf(0x8c)](),'aggregation':AggregationDefSchema[a217_0x295daf(0x8c)](),'source':z[a217_0x295daf(0x9f)]()[a217_0x295daf(0x8c)](),'filter':FilterRuleDefSchema[a217_0x295daf(0x8c)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z['number']()[a217_0x295daf(0x8c)]()}));export const ColumnConditionDefSchema=z[a217_0x295daf(0x92)]({'type':z['literal'](a217_0x295daf(0x82)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a217_0x295daf(0x92)]({'type':z['enum']([a217_0x295daf(0x8e),'Or',a217_0x295daf(0xa7)]),'conditions':z[a217_0x295daf(0xa5)](ConditionDefSchema),'description':z[a217_0x295daf(0x9f)]()[a217_0x295daf(0x8c)](),'expr':z[a217_0x295daf(0x9f)]()[a217_0x295daf(0x8c)]()}));export const SegmentRefConditionDefSchema=z[a217_0x295daf(0x92)]({'type':z['enum']([a217_0x295daf(0x78),'exclude']),'segment':z[a217_0x295daf(0x9f)]()[a217_0x295daf(0xaf)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a217_0x295daf(0x8a)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a217_0x295daf(0x8a)](()=>z[a217_0x295daf(0x92)]({'type':z[a217_0x295daf(0xbe)]([a217_0x295daf(0x8e),'Or',a217_0x295daf(0xa7)]),'conditions':z[a217_0x295daf(0xa5)](ConditionDefSchema),'description':z[a217_0x295daf(0x9f)]()[a217_0x295daf(0x8c)](),'expr':z[a217_0x295daf(0x9f)]()[a217_0x295daf(0x8c)]()}));export const SegmentDefSchema=z['object']({'type':z[a217_0x295daf(0x9e)](a217_0x295daf(0xbc))[a217_0x295daf(0x8c)](),'name':z[a217_0x295daf(0x9f)]()[a217_0x295daf(0xaf)](0x1,'Segment\x20name\x20is\x20required'),'description':z[a217_0x295daf(0x9f)]()[a217_0x295daf(0x8c)](),'folder':z['string']()[a217_0x295daf(0x8c)](),'rule':RuleDefSchema[a217_0x295daf(0x8c)](),'kind':z[a217_0x295daf(0xbe)]([a217_0x295daf(0xb7),a217_0x295daf(0x95),'funnel_stage'])[a217_0x295daf(0x8c)](),'visible':z[a217_0x295daf(0x9d)]()[a217_0x295daf(0x8c)](),'activations':z[a217_0x295daf(0xa5)](ActivationDefSchema)[a217_0x295daf(0x8c)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a216_0x4ad35e=a216_0x1093;(function(_0x5157d9,_0x4cf675){const _0x58ce49=a216_0x1093,_0x2c6419=_0x5157d9();while(!![]){try{const _0x2fb74e=parseInt(_0x58ce49(0x1a6))/0x1+parseInt(_0x58ce49(0x19d))/0x2*(parseInt(_0x58ce49(0x1b7))/0x3)+parseInt(_0x58ce49(0x1af))/0x4+-parseInt(_0x58ce49(0x1ac))/0x5+parseInt(_0x58ce49(0x1a1))/0x6*(-parseInt(_0x58ce49(0x19b))/0x7)+-parseInt(_0x58ce49(0x1ab))/0x8+parseInt(_0x58ce49(0x1aa))/0x9*(parseInt(_0x58ce49(0x1b6))/0xa);if(_0x2fb74e===_0x4cf675)break;else _0x2c6419['push'](_0x2c6419['shift']());}catch(_0x4ea772){_0x2c6419['push'](_0x2c6419['shift']());}}}(a216_0x52d1,0x98fab));import{readFileSync}from'fs';import*as a216_0x17ce33 from'path';import*as a216_0x2b9be1 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';function a216_0x52d1(){const _0x16bd3f=['length','621VreKKf','7725016kPBhKk','244320mEvvjq','template','has','3613636RpivkN','journey','push','skipped','filterType','object','basename','99960pGuIue','273864drLoyJ','in_browser_message','parseDocument','YAML_PARSE_ERROR','2667qLMgTG','map','6JWvTKw','error','type','not\x20a\x20','11868TZRpZp','campaign','always_on_campaign','line','YAML\x20parse\x20error:\x20','527715XHKUhM','result','email'];a216_0x52d1=function(){return _0x16bd3f;};return a216_0x52d1();}import{validateTemplateDef}from'../engage/template-validator.js';import{validateAlwaysOnCampaignDef}from'../engage/always-on-campaign-validator.js';import{validateInBrowserMessageDef}from'../engage/in-browser-message-validator.js';import{isJourneyDef}from'./journey-yaml.js';function a216_0x1093(_0x3ca6ae,_0x34dcf7){_0x3ca6ae=_0x3ca6ae-0x19a;const _0x52d183=a216_0x52d1();let _0x1093c3=_0x52d183[_0x3ca6ae];return _0x1093c3;}const VALID_CAMPAIGN_TYPES=new Set([a216_0x4ad35e(0x1a8),a216_0x4ad35e(0x1b1),a216_0x4ad35e(0x1a4)]);export{isJourneyDef};export function isCampaignDef(_0x41bf93){const _0x1ec796=a216_0x4ad35e;if(typeof _0x41bf93!=='object'||_0x41bf93===null)return![];const _0x4f9424=_0x41bf93,_0x4e041d=VALID_CAMPAIGN_TYPES[_0x1ec796(0x1ae)](_0x4f9424['campaign_type']);if(_0x4f9424['type']===_0x1ec796(0x1a2)&&_0x4e041d)return!![];if(_0x4e041d&&!_0x4f9424[_0x1ec796(0x19f)])return!![];return![];}export function isTemplateDef(_0x3aa655){const _0x3a2b1c=a216_0x4ad35e;return typeof _0x3aa655===_0x3a2b1c(0x1b4)&&_0x3aa655!==null&&_0x3a2b1c(0x19f)in _0x3aa655&&_0x3aa655[_0x3a2b1c(0x19f)]===_0x3a2b1c(0x1ad);}export function isAlwaysOnCampaignDef(_0x4cfb86){const _0x52cdee=a216_0x4ad35e;return typeof _0x4cfb86===_0x52cdee(0x1b4)&&_0x4cfb86!==null&&_0x52cdee(0x19f)in _0x4cfb86&&_0x4cfb86[_0x52cdee(0x19f)]===_0x52cdee(0x1a3);}export function isInBrowserMessageDef(_0x49b815){const _0x53d656=a216_0x4ad35e;return typeof _0x49b815===_0x53d656(0x1b4)&&_0x49b815!==null&&_0x53d656(0x19f)in _0x49b815&&_0x49b815[_0x53d656(0x19f)]===_0x53d656(0x1b8);}export function isValidationResult(_0x5b62b8){const _0x52b6cd=a216_0x4ad35e;return!(_0x52b6cd(0x1b2)in _0x5b62b8);}export function createParseErrorResult(_0x5fc452,_0x5e2e64,_0x3d4b33,_0x5d7e15,_0x4159c4='segment'){const _0x396096=a216_0x4ad35e;return{'filePath':_0x5fc452,'relativePath':_0x5e2e64,'source':_0x3d4b33,'result':{'valid':![],'errors':[{'level':_0x396096(0x19e),'path':'','code':_0x396096(0x19a),'message':_0x5d7e15}],'warnings':[]},'fileType':_0x4159c4};}export function validateYamlFile(_0xf2100c,_0x48995f,_0x27667b={}){const _0x395a1e=a216_0x4ad35e,_0x2c6891=a216_0x17ce33['relative'](_0x48995f,_0xf2100c)||a216_0x17ce33[_0x395a1e(0x1b5)](_0xf2100c);try{const _0x530cd7=readFileSync(_0xf2100c,'utf-8'),_0x32a2cb=a216_0x2b9be1[_0x395a1e(0x1b9)](_0x530cd7),_0x50e192=_0x32a2cb['toJSON']();if(!_0x50e192)return createParseErrorResult(_0xf2100c,_0x2c6891,_0x530cd7,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x11bb5f;if(isJourneyDef(_0x50e192,_0xf2100c))_0x11bb5f=_0x395a1e(0x1b0);else{if(isCampaignDef(_0x50e192))_0x11bb5f=_0x395a1e(0x1a2);else{if(isAlwaysOnCampaignDef(_0x50e192))_0x11bb5f=_0x395a1e(0x1a3);else{if(isTemplateDef(_0x50e192))_0x11bb5f=_0x395a1e(0x1ad);else isInBrowserMessageDef(_0x50e192)?_0x11bb5f=_0x395a1e(0x1b8):_0x11bb5f='segment';}}}if(_0x27667b[_0x395a1e(0x1b3)]&&_0x11bb5f!==_0x27667b[_0x395a1e(0x1b3)])return{'filePath':_0xf2100c,'relativePath':_0x2c6891,'skipped':!![],'reason':_0x395a1e(0x1a0)+_0x27667b[_0x395a1e(0x1b3)]};const _0x2c7eef={'source':_0x530cd7,'document':_0x32a2cb};let _0x2bde94;if(_0x11bb5f===_0x395a1e(0x1b0))_0x2bde94=validateJourneyDef(_0x50e192,_0x2c7eef);else{if(_0x11bb5f===_0x395a1e(0x1a2))_0x2bde94=validateCampaignDef(_0x50e192,_0x2c7eef);else{if(_0x11bb5f===_0x395a1e(0x1a3))_0x2bde94=validateAlwaysOnCampaignDef(_0x50e192,_0x2c7eef);else{if(_0x11bb5f===_0x395a1e(0x1ad))_0x2bde94=validateTemplateDef(_0x50e192,_0x2c7eef);else _0x11bb5f===_0x395a1e(0x1b8)?_0x2bde94=validateInBrowserMessageDef(_0x50e192,_0x2c7eef):_0x2bde94=validateSegmentDef(_0x50e192,_0x2c7eef);}}}return{'filePath':_0xf2100c,'relativePath':_0x2c6891,'source':_0x530cd7,'result':_0x2bde94,'fileType':_0x11bb5f};}catch(_0x234f32){const _0xa12ec9=_0x234f32 instanceof Error?_0x234f32['message']:String(_0x234f32);return createParseErrorResult(_0xf2100c,_0x2c6891,'',_0x395a1e(0x1a5)+_0xa12ec9);}}export function validateYamlFiles(_0x673974,_0x1eabd4,_0x2ed41e={}){const _0x29b864=a216_0x4ad35e;return _0x673974[_0x29b864(0x19c)](_0x586b24=>validateYamlFile(_0x586b24,_0x1eabd4,_0x2ed41e));}export function calculateSummary(_0x1ec312){const _0x919e97=a216_0x4ad35e;let _0x2ca5a4=0x0,_0x2fdc98=0x0,_0x5b8bf2=0x0,_0x46a3ec=0x0;for(const _0x3b752b of _0x1ec312){if(!isValidationResult(_0x3b752b)){_0x46a3ec++;continue;}_0x3b752b[_0x919e97(0x1a7)]['valid']?_0x2ca5a4++:_0x2fdc98++,_0x5b8bf2+=_0x3b752b[_0x919e97(0x1a7)]['warnings'][_0x919e97(0x1a9)];}return{'validCount':_0x2ca5a4,'invalidCount':_0x2fdc98,'warningCount':_0x5b8bf2,'skippedCount':_0x46a3ec,'hasErrors':_0x2fdc98>0x0};}
1
+ const a218_0x293ed4=a218_0x3ee2;(function(_0x1058b5,_0x307648){const _0x597898=a218_0x3ee2,_0x4082b6=_0x1058b5();while(!![]){try{const _0x686af9=parseInt(_0x597898(0x16e))/0x1*(parseInt(_0x597898(0x166))/0x2)+parseInt(_0x597898(0x15e))/0x3+parseInt(_0x597898(0x15d))/0x4*(-parseInt(_0x597898(0x16b))/0x5)+parseInt(_0x597898(0x172))/0x6+parseInt(_0x597898(0x157))/0x7+parseInt(_0x597898(0x164))/0x8*(-parseInt(_0x597898(0x173))/0x9)+parseInt(_0x597898(0x16d))/0xa;if(_0x686af9===_0x307648)break;else _0x4082b6['push'](_0x4082b6['shift']());}catch(_0x5d4deb){_0x4082b6['push'](_0x4082b6['shift']());}}}(a218_0x1cb0,0xccf23));import{readFileSync}from'fs';import*as a218_0x4e6480 from'path';import*as a218_0x11970d from'yaml';import{validateSegmentDef}from'./yaml-validator.js';function a218_0x1cb0(){const _0x1f1323=['result','line','message','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','campaign_type','length','9081478abJmba','template','filterType','always_on_campaign','type','in_browser_message','116bpWxKa','234144YzMQsw','utf-8','valid','push','YAML\x20parse\x20error:\x20','map','16864XWGGeL','campaign','118zcPSOD','segment','journey','basename','has','240610cAmZOg','parseDocument','2345480BLyPPJ','11404ZKCGej','object','YAML_PARSE_ERROR','email','9439578MFbnAv','6921pGZOSI'];a218_0x1cb0=function(){return _0x1f1323;};return a218_0x1cb0();}import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';import{validateAlwaysOnCampaignDef}from'../engage/always-on-campaign-validator.js';import{validateInBrowserMessageDef}from'../engage/in-browser-message-validator.js';import{isJourneyDef}from'./journey-yaml.js';const VALID_CAMPAIGN_TYPES=new Set([a218_0x293ed4(0x171),a218_0x293ed4(0x161),a218_0x293ed4(0x175)]);function a218_0x3ee2(_0x3ea634,_0x442020){_0x3ea634=_0x3ea634-0x153;const _0x1cb0aa=a218_0x1cb0();let _0x3ee267=_0x1cb0aa[_0x3ea634];return _0x3ee267;}export{isJourneyDef};export function isCampaignDef(_0x2d4244){const _0x5708d7=a218_0x293ed4;if(typeof _0x2d4244!==_0x5708d7(0x16f)||_0x2d4244===null)return![];const _0x397a6f=_0x2d4244,_0x5bfbd9=VALID_CAMPAIGN_TYPES[_0x5708d7(0x16a)](_0x397a6f[_0x5708d7(0x155)]);if(_0x397a6f[_0x5708d7(0x15b)]===_0x5708d7(0x165)&&_0x5bfbd9)return!![];if(_0x5bfbd9&&!_0x397a6f['type'])return!![];return![];}export function isTemplateDef(_0x51814d){const _0x569603=a218_0x293ed4;return typeof _0x51814d===_0x569603(0x16f)&&_0x51814d!==null&&_0x569603(0x15b)in _0x51814d&&_0x51814d[_0x569603(0x15b)]==='template';}export function isAlwaysOnCampaignDef(_0x2adda4){const _0x53aea9=a218_0x293ed4;return typeof _0x2adda4===_0x53aea9(0x16f)&&_0x2adda4!==null&&_0x53aea9(0x15b)in _0x2adda4&&_0x2adda4[_0x53aea9(0x15b)]===_0x53aea9(0x15a);}export function isInBrowserMessageDef(_0xe921cf){const _0x3eed0e=a218_0x293ed4;return typeof _0xe921cf==='object'&&_0xe921cf!==null&&'type'in _0xe921cf&&_0xe921cf[_0x3eed0e(0x15b)]===_0x3eed0e(0x15c);}export function isValidationResult(_0x2ae7bb){return!('skipped'in _0x2ae7bb);}export function createParseErrorResult(_0x82d134,_0x27fb32,_0x562e66,_0x1d5bce,_0x17786d=a218_0x293ed4(0x167)){const _0x67f91a=a218_0x293ed4;return{'filePath':_0x82d134,'relativePath':_0x27fb32,'source':_0x562e66,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x67f91a(0x170),'message':_0x1d5bce}],'warnings':[]},'fileType':_0x17786d};}export function validateYamlFile(_0xa52d9a,_0x210f86,_0x41136c={}){const _0x184e24=a218_0x293ed4,_0x5d8b9e=a218_0x4e6480['relative'](_0x210f86,_0xa52d9a)||a218_0x4e6480[_0x184e24(0x169)](_0xa52d9a);try{const _0x1a1d6c=readFileSync(_0xa52d9a,_0x184e24(0x15f)),_0x11a047=a218_0x11970d[_0x184e24(0x16c)](_0x1a1d6c),_0x358dc4=_0x11a047['toJSON']();if(!_0x358dc4)return createParseErrorResult(_0xa52d9a,_0x5d8b9e,_0x1a1d6c,_0x184e24(0x154));let _0x293d28;if(isJourneyDef(_0x358dc4,_0xa52d9a))_0x293d28=_0x184e24(0x168);else{if(isCampaignDef(_0x358dc4))_0x293d28=_0x184e24(0x165);else{if(isAlwaysOnCampaignDef(_0x358dc4))_0x293d28=_0x184e24(0x15a);else{if(isTemplateDef(_0x358dc4))_0x293d28=_0x184e24(0x158);else isInBrowserMessageDef(_0x358dc4)?_0x293d28='in_browser_message':_0x293d28=_0x184e24(0x167);}}}if(_0x41136c[_0x184e24(0x159)]&&_0x293d28!==_0x41136c[_0x184e24(0x159)])return{'filePath':_0xa52d9a,'relativePath':_0x5d8b9e,'skipped':!![],'reason':'not\x20a\x20'+_0x41136c[_0x184e24(0x159)]};const _0x52461b={'source':_0x1a1d6c,'document':_0x11a047};let _0x305d8e;if(_0x293d28==='journey')_0x305d8e=validateJourneyDef(_0x358dc4,_0x52461b);else{if(_0x293d28==='campaign')_0x305d8e=validateCampaignDef(_0x358dc4,_0x52461b);else{if(_0x293d28===_0x184e24(0x15a))_0x305d8e=validateAlwaysOnCampaignDef(_0x358dc4,_0x52461b);else{if(_0x293d28===_0x184e24(0x158))_0x305d8e=validateTemplateDef(_0x358dc4,_0x52461b);else _0x293d28===_0x184e24(0x15c)?_0x305d8e=validateInBrowserMessageDef(_0x358dc4,_0x52461b):_0x305d8e=validateSegmentDef(_0x358dc4,_0x52461b);}}}return{'filePath':_0xa52d9a,'relativePath':_0x5d8b9e,'source':_0x1a1d6c,'result':_0x305d8e,'fileType':_0x293d28};}catch(_0x5c61da){const _0xca1100=_0x5c61da instanceof Error?_0x5c61da[_0x184e24(0x153)]:String(_0x5c61da);return createParseErrorResult(_0xa52d9a,_0x5d8b9e,'',_0x184e24(0x162)+_0xca1100);}}export function validateYamlFiles(_0x524200,_0x2f05fe,_0x49e58e={}){const _0x3c4ec9=a218_0x293ed4;return _0x524200[_0x3c4ec9(0x163)](_0x235bfe=>validateYamlFile(_0x235bfe,_0x2f05fe,_0x49e58e));}export function calculateSummary(_0x1aed5c){const _0x3d17ef=a218_0x293ed4;let _0x5845e2=0x0,_0x35277f=0x0,_0x35e0da=0x0,_0xd5945c=0x0;for(const _0x73f99c of _0x1aed5c){if(!isValidationResult(_0x73f99c)){_0xd5945c++;continue;}_0x73f99c['result'][_0x3d17ef(0x160)]?_0x5845e2++:_0x35277f++,_0x35e0da+=_0x73f99c[_0x3d17ef(0x174)]['warnings'][_0x3d17ef(0x156)];}return{'validCount':_0x5845e2,'invalidCount':_0x35277f,'warningCount':_0x35e0da,'skippedCount':_0xd5945c,'hasErrors':_0x35277f>0x0};}
@@ -1 +1 @@
1
- (function(_0x2bcd5a,_0x53b5bb){const _0x3943ff=a217_0x3b4a,_0x3ea0ce=_0x2bcd5a();while(!![]){try{const _0x4e61c7=-parseInt(_0x3943ff(0xa7))/0x1*(-parseInt(_0x3943ff(0xba))/0x2)+-parseInt(_0x3943ff(0xad))/0x3+parseInt(_0x3943ff(0xca))/0x4+-parseInt(_0x3943ff(0xaa))/0x5*(parseInt(_0x3943ff(0xc9))/0x6)+parseInt(_0x3943ff(0xc6))/0x7*(parseInt(_0x3943ff(0xa3))/0x8)+-parseInt(_0x3943ff(0xc7))/0x9*(parseInt(_0x3943ff(0xae))/0xa)+parseInt(_0x3943ff(0xc1))/0xb;if(_0x4e61c7===_0x53b5bb)break;else _0x3ea0ce['push'](_0x3ea0ce['shift']());}catch(_0x30c470){_0x3ea0ce['push'](_0x3ea0ce['shift']());}}}(a217_0x1004,0xb62c6));import*as a217_0x44feb4 from'yaml';function a217_0x1004(){const _0x51c38c=['getIn','object','location','20FLFIse','\x27:\x20','warnings','range','yellow','column','cyan','12071191HGtEBQ','repeat','max','code','length','85001XGvkQe','567ALmLRm','issues','10026wLEOrF','106420aUufWw','success','toString','dim','path','760FRoJIp','number','errors','error','1262SyziEg','flatMap','pop','335cTBhQe','join','parse','280473jdNfUA','212470uMoVpM','split','push','level','red','padStart','contents','message','Invalid\x20YAML:\x20expected\x20an\x20object'];a217_0x1004=function(){return _0x51c38c;};return a217_0x1004();}import a217_0x1bcebb from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x210d3b,_0x1410e1,_0x2118df){const _0x76f894=a217_0x3b4a;if(!_0x210d3b||!_0x1410e1)return undefined;try{let _0x4568ff=_0x210d3b[_0x76f894(0xb7)](_0x2118df,!![]),_0x3cafd4=[..._0x2118df];while((!_0x4568ff||typeof _0x4568ff!=='object'||!(_0x76f894(0xbd)in _0x4568ff)||!_0x4568ff[_0x76f894(0xbd)])&&_0x3cafd4[_0x76f894(0xc5)]>0x0){_0x3cafd4[_0x76f894(0xa9)](),_0x4568ff=_0x3cafd4[_0x76f894(0xc5)]>0x0?_0x210d3b[_0x76f894(0xb7)](_0x3cafd4,!![]):_0x210d3b[_0x76f894(0xb4)];}if(!_0x4568ff||typeof _0x4568ff!==_0x76f894(0xb8)||!(_0x76f894(0xbd)in _0x4568ff)||!_0x4568ff['range'])return undefined;const [_0x39e299]=_0x4568ff[_0x76f894(0xbd)];return offsetToLocation(_0x1410e1,_0x39e299);}catch{return undefined;}}export function offsetToLocation(_0x18acda,_0x314632){const _0x37a5a2=a217_0x3b4a;let _0x2e965c=0x1,_0x54c36d=0x1;for(let _0x3f3ca6=0x0;_0x3f3ca6<_0x314632&&_0x3f3ca6<_0x18acda[_0x37a5a2(0xc5)];_0x3f3ca6++){_0x18acda[_0x3f3ca6]==='\x0a'?(_0x2e965c++,_0x54c36d=0x1):_0x54c36d++;}return{'line':_0x2e965c,'column':_0x54c36d,'offset':_0x314632};}export function pathToArray(_0x250f33){const _0x4b73ca=a217_0x3b4a;if(!_0x250f33)return[];return _0x250f33[_0x4b73ca(0xaf)]('.')[_0x4b73ca(0xa8)](_0x161bc3=>{const _0x6d05af=_0x161bc3['match'](/^(\w+)\[(\d+)\]$/);if(_0x6d05af)return[_0x6d05af[0x1],parseInt(_0x6d05af[0x2],0xa)];return[_0x161bc3];});}export function formatZodPath(_0x3c2d25){const _0x1dfab1=a217_0x3b4a;let _0x150a0c='';for(const _0x5f37a6 of _0x3c2d25){if(typeof _0x5f37a6===_0x1dfab1(0xa4))_0x150a0c+='['+_0x5f37a6+']';else{const _0x1e4c86=String(_0x5f37a6);_0x150a0c+=_0x150a0c?'.'+_0x1e4c86:_0x1e4c86;}}return _0x150a0c;}export function flattenZodIssues(_0x5cd092){const _0x5bf36f=a217_0x3b4a,_0x286e0c=[];for(const _0x2ceb64 of _0x5cd092){if(_0x2ceb64['code']==='invalid_union'&&_0x5bf36f(0xa5)in _0x2ceb64){const _0x5e5bce=_0x2ceb64[_0x5bf36f(0xa5)];let _0x290eed=_0x5e5bce[0x0]||[];for(const _0x1e5a4c of _0x5e5bce){_0x1e5a4c['length']<_0x290eed[_0x5bf36f(0xc5)]&&(_0x290eed=_0x1e5a4c);}const _0x46c8a6=_0x290eed['map'](_0x15a5d5=>({..._0x15a5d5,'path':[..._0x2ceb64[_0x5bf36f(0xa2)],..._0x15a5d5[_0x5bf36f(0xa2)]]}));_0x286e0c[_0x5bf36f(0xb0)](...flattenZodIssues(_0x46c8a6));}else _0x286e0c[_0x5bf36f(0xb0)](_0x2ceb64);}return _0x286e0c;}export function safeParseYaml(_0x201724,_0x4c5c0b){const _0x644503=a217_0x3b4a,_0x34eb86=a217_0x44feb4[_0x644503(0xac)](_0x201724);if(!_0x34eb86||typeof _0x34eb86!==_0x644503(0xb8))throw new Error(_0x644503(0xb6));const _0x120596=_0x4c5c0b['safeParse'](_0x34eb86);if(!_0x120596[_0x644503(0x9f)]){const _0x227c5d=_0x120596[_0x644503(0xa6)][_0x644503(0xc8)][0x0],_0x497818=formatZodPath(_0x227c5d[_0x644503(0xa2)]);throw new Error(_0x497818?'YAML\x20validation\x20error\x20at\x20\x27'+_0x497818+_0x644503(0xbb)+_0x227c5d[_0x644503(0xb5)]:'YAML\x20validation\x20error:\x20'+_0x227c5d[_0x644503(0xb5)]);}return _0x120596['data'];}export function formatIssueWithContext(_0x4d40aa,_0x1ca2ff,_0x28561e){const _0xda25ac=a217_0x3b4a,_0x6d2420=[],_0xb53271=_0x4d40aa[_0xda25ac(0xb1)]==='error',_0x1c39df=_0xb53271?a217_0x1bcebb[_0xda25ac(0xb2)]:a217_0x1bcebb[_0xda25ac(0xbe)],_0x2107a4=_0xb53271?a217_0x1bcebb['red']:a217_0x1bcebb[_0xda25ac(0xbe)],_0x2010b6=_0x28561e?a217_0x1bcebb[_0xda25ac(0xc0)](_0x28561e+':'):'';if(_0x4d40aa[_0xda25ac(0xb9)]){const _0x5d7ac7=a217_0x1bcebb[_0xda25ac(0xc0)](_0x4d40aa[_0xda25ac(0xb9)]['line']+':'+_0x4d40aa[_0xda25ac(0xb9)][_0xda25ac(0xbf)]);_0x6d2420['push'](''+_0x2010b6+_0x5d7ac7+':\x20'+_0x1c39df(_0x4d40aa[_0xda25ac(0xb1)])+'\x20'+_0x2107a4('['+_0x4d40aa[_0xda25ac(0xc4)]+']'));}else _0x6d2420['push'](''+_0x2010b6+a217_0x1bcebb[_0xda25ac(0xa1)](_0x4d40aa[_0xda25ac(0xa2)])+':\x20'+_0x1c39df(_0x4d40aa[_0xda25ac(0xb1)])+'\x20'+_0x2107a4('['+_0x4d40aa[_0xda25ac(0xc4)]+']'));_0x6d2420[_0xda25ac(0xb0)](_0x4d40aa[_0xda25ac(0xb5)]);if(_0x4d40aa['location']&&_0x1ca2ff){const _0x499ec8=_0x1ca2ff[_0xda25ac(0xaf)]('\x0a'),{line:_0x3e4687,column:_0xebbc6c}=_0x4d40aa['location'],_0x3bc962=Math[_0xda25ac(0xc3)](0x1,_0x3e4687-0x1),_0x2320f4=Math['min'](_0x499ec8['length'],_0x3e4687+0x1);_0x6d2420['push']('');for(let _0xd2ddf2=_0x3bc962;_0xd2ddf2<=_0x2320f4;_0xd2ddf2++){const _0x2081f3=_0x499ec8[_0xd2ddf2-0x1]||'',_0xf9879b=a217_0x1bcebb[_0xda25ac(0xa1)](_0xd2ddf2[_0xda25ac(0xa0)]()[_0xda25ac(0xb3)](0x4)),_0x4b1fa9=a217_0x1bcebb[_0xda25ac(0xa1)]('\x20|\x20');if(_0xd2ddf2===_0x3e4687){_0x6d2420[_0xda25ac(0xb0)]('\x20\x20'+_0xf9879b+_0x4b1fa9+_0x1c39df(_0x2081f3));const _0x3001cf='\x20'[_0xda25ac(0xc2)](0x4+0x3+_0xebbc6c-0x1);_0x6d2420[_0xda25ac(0xb0)]('\x20\x20'+_0x3001cf+_0x1c39df('^'));}else _0x6d2420['push']('\x20\x20'+_0xf9879b+_0x4b1fa9+a217_0x1bcebb[_0xda25ac(0xa1)](_0x2081f3));}}return _0x6d2420[_0xda25ac(0xab)]('\x0a');}function a217_0x3b4a(_0x1abf80,_0x7b6334){_0x1abf80=_0x1abf80-0x9f;const _0x1004f5=a217_0x1004();let _0x3b4a9f=_0x1004f5[_0x1abf80];return _0x3b4a9f;}export function formatValidationResult(_0x25b333,_0x29f1d6,_0x8232e2){const _0x40627=a217_0x3b4a,_0x30255a=[];for(const _0x1712d5 of _0x25b333['errors']){_0x30255a[_0x40627(0xb0)](formatIssueWithContext(_0x1712d5,_0x29f1d6,_0x8232e2)),_0x30255a[_0x40627(0xb0)]('');}for(const _0x1b16be of _0x25b333[_0x40627(0xbc)]){_0x30255a[_0x40627(0xb0)](formatIssueWithContext(_0x1b16be,_0x29f1d6,_0x8232e2)),_0x30255a[_0x40627(0xb0)]('');}return _0x30255a['join']('\x0a');}
1
+ (function(_0x404e49,_0x3d4568){const _0x1718e1=a219_0x3b6c,_0x380e46=_0x404e49();while(!![]){try{const _0x129ce9=parseInt(_0x1718e1(0x1cb))/0x1*(parseInt(_0x1718e1(0x1b4))/0x2)+-parseInt(_0x1718e1(0x1b6))/0x3+-parseInt(_0x1718e1(0x1ae))/0x4+parseInt(_0x1718e1(0x1bf))/0x5+-parseInt(_0x1718e1(0x1ca))/0x6+parseInt(_0x1718e1(0x1d5))/0x7*(parseInt(_0x1718e1(0x1c8))/0x8)+parseInt(_0x1718e1(0x1ac))/0x9;if(_0x129ce9===_0x3d4568)break;else _0x380e46['push'](_0x380e46['shift']());}catch(_0x5509b1){_0x380e46['push'](_0x380e46['shift']());}}}(a219_0x5dfe,0x429d8));import*as a219_0xdd5046 from'yaml';import a219_0x134170 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x64a6d4,_0x59dea6,_0x13164d){const _0x2386b5=a219_0x3b6c;if(!_0x64a6d4||!_0x59dea6)return undefined;try{let _0x58b97c=_0x64a6d4[_0x2386b5(0x1c6)](_0x13164d,!![]),_0x396516=[..._0x13164d];while((!_0x58b97c||typeof _0x58b97c!=='object'||!('range'in _0x58b97c)||!_0x58b97c[_0x2386b5(0x1c4)])&&_0x396516['length']>0x0){_0x396516[_0x2386b5(0x1d0)](),_0x58b97c=_0x396516[_0x2386b5(0x1d1)]>0x0?_0x64a6d4[_0x2386b5(0x1c6)](_0x396516,!![]):_0x64a6d4['contents'];}if(!_0x58b97c||typeof _0x58b97c!==_0x2386b5(0x1c5)||!(_0x2386b5(0x1c4)in _0x58b97c)||!_0x58b97c[_0x2386b5(0x1c4)])return undefined;const [_0x4872d5]=_0x58b97c[_0x2386b5(0x1c4)];return offsetToLocation(_0x59dea6,_0x4872d5);}catch{return undefined;}}export function offsetToLocation(_0x2e04a1,_0xf85314){const _0x408f5d=a219_0x3b6c;let _0x1fbf74=0x1,_0xd33d2b=0x1;for(let _0x54bdbd=0x0;_0x54bdbd<_0xf85314&&_0x54bdbd<_0x2e04a1[_0x408f5d(0x1d1)];_0x54bdbd++){_0x2e04a1[_0x54bdbd]==='\x0a'?(_0x1fbf74++,_0xd33d2b=0x1):_0xd33d2b++;}return{'line':_0x1fbf74,'column':_0xd33d2b,'offset':_0xf85314};}export function pathToArray(_0x54d6c8){const _0x47fc6d=a219_0x3b6c;if(!_0x54d6c8)return[];return _0x54d6c8[_0x47fc6d(0x1cd)]('.')[_0x47fc6d(0x1cc)](_0x5a1c15=>{const _0x450d27=_0x5a1c15['match'](/^(\w+)\[(\d+)\]$/);if(_0x450d27)return[_0x450d27[0x1],parseInt(_0x450d27[0x2],0xa)];return[_0x5a1c15];});}function a219_0x3b6c(_0x4e4c2d,_0x505a0b){_0x4e4c2d=_0x4e4c2d-0x1ac;const _0x5dfe13=a219_0x5dfe();let _0x3b6c3d=_0x5dfe13[_0x4e4c2d];return _0x3b6c3d;}export function formatZodPath(_0x5de011){const _0x3de30a=a219_0x3b6c;let _0x49f0a9='';for(const _0xa46f9a of _0x5de011){if(typeof _0xa46f9a===_0x3de30a(0x1c2))_0x49f0a9+='['+_0xa46f9a+']';else{const _0x3f73ed=String(_0xa46f9a);_0x49f0a9+=_0x49f0a9?'.'+_0x3f73ed:_0x3f73ed;}}return _0x49f0a9;}export function flattenZodIssues(_0x11e5ec){const _0x26fd3c=a219_0x3b6c,_0x5c25f4=[];for(const _0x112c1d of _0x11e5ec){if(_0x112c1d[_0x26fd3c(0x1b2)]===_0x26fd3c(0x1bc)&&_0x26fd3c(0x1ad)in _0x112c1d){const _0x43fc2d=_0x112c1d[_0x26fd3c(0x1ad)];let _0x43a757=_0x43fc2d[0x0]||[];for(const _0x509bb5 of _0x43fc2d){_0x509bb5[_0x26fd3c(0x1d1)]<_0x43a757[_0x26fd3c(0x1d1)]&&(_0x43a757=_0x509bb5);}const _0x49389c=_0x43a757[_0x26fd3c(0x1b1)](_0x59fa22=>({..._0x59fa22,'path':[..._0x112c1d[_0x26fd3c(0x1c9)],..._0x59fa22['path']]}));_0x5c25f4[_0x26fd3c(0x1d3)](...flattenZodIssues(_0x49389c));}else _0x5c25f4[_0x26fd3c(0x1d3)](_0x112c1d);}return _0x5c25f4;}export function safeParseYaml(_0x51e968,_0x4c279a){const _0x9fbd85=a219_0x3b6c,_0x2bac0d=a219_0xdd5046[_0x9fbd85(0x1c1)](_0x51e968);if(!_0x2bac0d||typeof _0x2bac0d!==_0x9fbd85(0x1c5))throw new Error(_0x9fbd85(0x1c0));const _0x499d35=_0x4c279a['safeParse'](_0x2bac0d);if(!_0x499d35[_0x9fbd85(0x1c3)]){const _0xf30beb=_0x499d35['error'][_0x9fbd85(0x1ba)][0x0],_0x2757e9=formatZodPath(_0xf30beb[_0x9fbd85(0x1c9)]);throw new Error(_0x2757e9?_0x9fbd85(0x1bb)+_0x2757e9+_0x9fbd85(0x1b9)+_0xf30beb[_0x9fbd85(0x1af)]:'YAML\x20validation\x20error:\x20'+_0xf30beb['message']);}return _0x499d35[_0x9fbd85(0x1b3)];}function a219_0x5dfe(){const _0x500f45=['location','1040400keAwWN','Invalid\x20YAML:\x20expected\x20an\x20object','parse','number','success','range','object','getIn','toString','3794816PDLDpI','path','3197232dwdBcR','2AKzjYR','flatMap','split','min','level','pop','length','max','push','padStart','7BjFiHA','line','639693EHOsBc','errors','60376LPWScU','message','cyan','map','code','data','223154codJJf','error','467523FyCfCb','dim','join','\x27:\x20','issues','YAML\x20validation\x20error\x20at\x20\x27','invalid_union','red'];a219_0x5dfe=function(){return _0x500f45;};return a219_0x5dfe();}export function formatIssueWithContext(_0x341fd9,_0x4b7a08,_0x359671){const _0x24305c=a219_0x3b6c,_0x3b2d84=[],_0x45f565=_0x341fd9[_0x24305c(0x1cf)]===_0x24305c(0x1b5),_0x3b8ab7=_0x45f565?a219_0x134170[_0x24305c(0x1bd)]:a219_0x134170['yellow'],_0x4b28e0=_0x45f565?a219_0x134170[_0x24305c(0x1bd)]:a219_0x134170['yellow'],_0x2fc4f7=_0x359671?a219_0x134170[_0x24305c(0x1b0)](_0x359671+':'):'';if(_0x341fd9[_0x24305c(0x1be)]){const _0x54bf77=a219_0x134170['cyan'](_0x341fd9['location'][_0x24305c(0x1d6)]+':'+_0x341fd9[_0x24305c(0x1be)]['column']);_0x3b2d84[_0x24305c(0x1d3)](''+_0x2fc4f7+_0x54bf77+':\x20'+_0x3b8ab7(_0x341fd9[_0x24305c(0x1cf)])+'\x20'+_0x4b28e0('['+_0x341fd9[_0x24305c(0x1b2)]+']'));}else _0x3b2d84[_0x24305c(0x1d3)](''+_0x2fc4f7+a219_0x134170[_0x24305c(0x1b7)](_0x341fd9[_0x24305c(0x1c9)])+':\x20'+_0x3b8ab7(_0x341fd9[_0x24305c(0x1cf)])+'\x20'+_0x4b28e0('['+_0x341fd9[_0x24305c(0x1b2)]+']'));_0x3b2d84[_0x24305c(0x1d3)](_0x341fd9[_0x24305c(0x1af)]);if(_0x341fd9['location']&&_0x4b7a08){const _0x3cdade=_0x4b7a08[_0x24305c(0x1cd)]('\x0a'),{line:_0x59eb04,column:_0x4bb5e0}=_0x341fd9[_0x24305c(0x1be)],_0x5769f2=Math[_0x24305c(0x1d2)](0x1,_0x59eb04-0x1),_0x5366da=Math[_0x24305c(0x1ce)](_0x3cdade['length'],_0x59eb04+0x1);_0x3b2d84[_0x24305c(0x1d3)]('');for(let _0x5769d8=_0x5769f2;_0x5769d8<=_0x5366da;_0x5769d8++){const _0x53391f=_0x3cdade[_0x5769d8-0x1]||'',_0x5ef178=a219_0x134170[_0x24305c(0x1b7)](_0x5769d8[_0x24305c(0x1c7)]()[_0x24305c(0x1d4)](0x4)),_0x50e6c9=a219_0x134170['dim']('\x20|\x20');if(_0x5769d8===_0x59eb04){_0x3b2d84[_0x24305c(0x1d3)]('\x20\x20'+_0x5ef178+_0x50e6c9+_0x3b8ab7(_0x53391f));const _0xd55fae='\x20'['repeat'](0x4+0x3+_0x4bb5e0-0x1);_0x3b2d84[_0x24305c(0x1d3)]('\x20\x20'+_0xd55fae+_0x3b8ab7('^'));}else _0x3b2d84[_0x24305c(0x1d3)]('\x20\x20'+_0x5ef178+_0x50e6c9+a219_0x134170[_0x24305c(0x1b7)](_0x53391f));}}return _0x3b2d84[_0x24305c(0x1b8)]('\x0a');}export function formatValidationResult(_0x590b36,_0xa31399,_0x1aa4a5){const _0x531f3f=a219_0x3b6c,_0x42b78a=[];for(const _0x5c2de9 of _0x590b36[_0x531f3f(0x1ad)]){_0x42b78a[_0x531f3f(0x1d3)](formatIssueWithContext(_0x5c2de9,_0xa31399,_0x1aa4a5)),_0x42b78a['push']('');}for(const _0x106968 of _0x590b36['warnings']){_0x42b78a['push'](formatIssueWithContext(_0x106968,_0xa31399,_0x1aa4a5)),_0x42b78a[_0x531f3f(0x1d3)]('');}return _0x42b78a[_0x531f3f(0x1b8)]('\x0a');}