@treasuredata/tdx 2026.10.0 → 2026.10.1

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 (326) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.d.ts +1 -1
  4. package/dist/cli-categories.js +1 -1
  5. package/dist/cli-categories.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +1 -1
  8. package/dist/cli.js.map +1 -1
  9. package/dist/commands/activations.js +1 -1
  10. package/dist/commands/agent-command.js +1 -1
  11. package/dist/commands/agent-test-command.js +1 -1
  12. package/dist/commands/api-command.js +1 -1
  13. package/dist/commands/auth-command.js +1 -1
  14. package/dist/commands/cas-command.js +1 -1
  15. package/dist/commands/cas-journey-command.js +1 -1
  16. package/dist/commands/cas-segment-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/claude-command.d.ts.map +1 -1
  19. package/dist/commands/claude-command.js +1 -1
  20. package/dist/commands/claude-command.js.map +1 -1
  21. package/dist/commands/claude-statusline-command.d.ts.map +1 -1
  22. package/dist/commands/claude-statusline-command.js +1 -1
  23. package/dist/commands/claude-statusline-command.js.map +1 -1
  24. package/dist/commands/codex-command.d.ts.map +1 -1
  25. package/dist/commands/codex-command.js +1 -1
  26. package/dist/commands/codex-command.js.map +1 -1
  27. package/dist/commands/command.js +1 -1
  28. package/dist/commands/connection-command.js +1 -1
  29. package/dist/commands/databases.js +1 -1
  30. package/dist/commands/delivery-command.js +1 -1
  31. package/dist/commands/describe.js +1 -1
  32. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  33. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  34. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  35. package/dist/commands/engage-campaign-pull-command.js +1 -1
  36. package/dist/commands/engage-campaign-push-command.js +1 -1
  37. package/dist/commands/engage-campaign-readiness-command.js +1 -1
  38. package/dist/commands/engage-campaign-validate-command.js +1 -1
  39. package/dist/commands/engage-command.js +1 -1
  40. package/dist/commands/engage-in-browser-message-command.js +1 -1
  41. package/dist/commands/engage-landing-page-command.js +1 -1
  42. package/dist/commands/engage-template-pull-command.js +1 -1
  43. package/dist/commands/engage-template-push-command.js +1 -1
  44. package/dist/commands/engage-template-validate-command.js +1 -1
  45. package/dist/commands/engage-workspace-assignment-command.js +1 -1
  46. package/dist/commands/job-command.js +1 -1
  47. package/dist/commands/journey-command.js +1 -1
  48. package/dist/commands/journey-validate-command.js +1 -1
  49. package/dist/commands/llm-command.js +1 -1
  50. package/dist/commands/mcp-command.js +1 -1
  51. package/dist/commands/opencode-command.d.ts +10 -3
  52. package/dist/commands/opencode-command.d.ts.map +1 -1
  53. package/dist/commands/opencode-command.js +1 -1
  54. package/dist/commands/opencode-command.js.map +1 -1
  55. package/dist/commands/p13n-command.js +1 -1
  56. package/dist/commands/parent-segment-command.js +1 -1
  57. package/dist/commands/policy-command.js +1 -1
  58. package/dist/commands/profile-command.js +1 -1
  59. package/dist/commands/profiles-command.d.ts.map +1 -1
  60. package/dist/commands/profiles-command.js +1 -1
  61. package/dist/commands/profiles-command.js.map +1 -1
  62. package/dist/commands/query-command.js +1 -1
  63. package/dist/commands/schedule-command.js +1 -1
  64. package/dist/commands/segment-command.js +1 -1
  65. package/dist/commands/segment-create-command.js +1 -1
  66. package/dist/commands/segment-fields-command.js +1 -1
  67. package/dist/commands/segment-move-command.js +1 -1
  68. package/dist/commands/segment-pull-command.js +1 -1
  69. package/dist/commands/segment-push-command.js +1 -1
  70. package/dist/commands/segment-update-command.js +1 -1
  71. package/dist/commands/segment-use-command.js +1 -1
  72. package/dist/commands/segment-validate-command.js +1 -1
  73. package/dist/commands/segments.js +1 -1
  74. package/dist/commands/show.js +1 -1
  75. package/dist/commands/status-command.js +1 -1
  76. package/dist/commands/table-deleted.js +1 -1
  77. package/dist/commands/tables.js +1 -1
  78. package/dist/commands/unset-command.js +1 -1
  79. package/dist/commands/upgrade-command.js +1 -1
  80. package/dist/commands/usage-command.d.ts +10 -0
  81. package/dist/commands/usage-command.d.ts.map +1 -0
  82. package/dist/commands/usage-command.js +1 -0
  83. package/dist/commands/usage-command.js.map +1 -0
  84. package/dist/commands/use-command.js +1 -1
  85. package/dist/commands/user-command.js +1 -1
  86. package/dist/commands/work-command.js +1 -1
  87. package/dist/commands/workflow-command.js +1 -1
  88. package/dist/core/auth.js +1 -1
  89. package/dist/core/command-output.js +1 -1
  90. package/dist/core/config.d.ts +2 -1
  91. package/dist/core/config.d.ts.map +1 -1
  92. package/dist/core/config.js +1 -1
  93. package/dist/core/config.js.map +1 -1
  94. package/dist/core/connection-cache.js +1 -1
  95. package/dist/core/constants.js +1 -1
  96. package/dist/core/credential-cache.js +1 -1
  97. package/dist/core/global-context.js +1 -1
  98. package/dist/core/keychain.js +1 -1
  99. package/dist/core/oauth-keychain.js +1 -1
  100. package/dist/core/oauth.js +1 -1
  101. package/dist/core/profile.d.ts +1 -0
  102. package/dist/core/profile.d.ts.map +1 -1
  103. package/dist/core/profile.js +1 -1
  104. package/dist/core/profile.js.map +1 -1
  105. package/dist/core/project-config.js +1 -1
  106. package/dist/core/session.js +1 -1
  107. package/dist/core/site-mismatch.js +1 -1
  108. package/dist/core/user-cache.js +1 -1
  109. package/dist/core/version.js +1 -1
  110. package/dist/index.js +1 -1
  111. package/dist/mcp/server.js +1 -1
  112. package/dist/mcp/tools/index.js +1 -1
  113. package/dist/mcp/tools/tdx-run.js +1 -1
  114. package/dist/mcp/tools/tdx-search.js +1 -1
  115. package/dist/mcp/tools/work-create-item.js +1 -1
  116. package/dist/mcp/utils.js +1 -1
  117. package/dist/proxy/claude-usage-tracker.d.ts +5 -4
  118. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
  119. package/dist/proxy/claude-usage-tracker.js +1 -1
  120. package/dist/proxy/claude-usage-tracker.js.map +1 -1
  121. package/dist/proxy/passthrough-server.js +1 -1
  122. package/dist/proxy/sse-usage-parser.js +1 -1
  123. package/dist/sdk/agent/agent-config.js +1 -1
  124. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  125. package/dist/sdk/agent/agent-yaml.js +1 -1
  126. package/dist/sdk/agent/test/evaluator.js +1 -1
  127. package/dist/sdk/agent/test/executor.js +1 -1
  128. package/dist/sdk/agent/test/index.js +1 -1
  129. package/dist/sdk/agent/test/output.js +1 -1
  130. package/dist/sdk/agent/test/parser.js +1 -1
  131. package/dist/sdk/agent/tool-target-registry.js +1 -1
  132. package/dist/sdk/api.js +1 -1
  133. package/dist/sdk/auth-token.js +1 -1
  134. package/dist/sdk/cas/audience-context.js +1 -1
  135. package/dist/sdk/cas/cas-api-client.js +1 -1
  136. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  137. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  138. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  139. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  140. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  141. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  142. package/dist/sdk/cas/index.js +1 -1
  143. package/dist/sdk/cas/pull-workflow.js +1 -1
  144. package/dist/sdk/cas/push-workflow.js +1 -1
  145. package/dist/sdk/cas/validate-files.js +1 -1
  146. package/dist/sdk/client/cdp-api-client.js +1 -1
  147. package/dist/sdk/client/delivery-api-client.js +1 -1
  148. package/dist/sdk/client/endpoints.js +1 -1
  149. package/dist/sdk/client/engage-api-client.js +1 -1
  150. package/dist/sdk/client/http-client.js +1 -1
  151. package/dist/sdk/client/llm-api-client.js +1 -1
  152. package/dist/sdk/client/oauth-refresh.js +1 -1
  153. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  154. package/dist/sdk/client/rate-limiter.js +1 -1
  155. package/dist/sdk/client/td-api-client.js +1 -1
  156. package/dist/sdk/client/trino-api-client.js +1 -1
  157. package/dist/sdk/client/workflow-client.js +1 -1
  158. package/dist/sdk/connection-validator.js +1 -1
  159. package/dist/sdk/connection.js +1 -1
  160. package/dist/sdk/delivery.js +1 -1
  161. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  162. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  163. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  164. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  165. package/dist/sdk/engage/campaign-pull.js +1 -1
  166. package/dist/sdk/engage/campaign-push.js +1 -1
  167. package/dist/sdk/engage/campaign-readiness-workflow.js +1 -1
  168. package/dist/sdk/engage/campaign-readiness.js +1 -1
  169. package/dist/sdk/engage/campaign-validator.js +1 -1
  170. package/dist/sdk/engage/campaign-yaml.js +1 -1
  171. package/dist/sdk/engage/in-browser-message-pull.js +1 -1
  172. package/dist/sdk/engage/in-browser-message-push.js +1 -1
  173. package/dist/sdk/engage/in-browser-message-validator.js +1 -1
  174. package/dist/sdk/engage/in-browser-message-yaml.js +1 -1
  175. package/dist/sdk/engage/landing-page-init.js +1 -1
  176. package/dist/sdk/engage/landing-page-public-asset.js +1 -1
  177. package/dist/sdk/engage/landing-page-pull.js +1 -1
  178. package/dist/sdk/engage/landing-page-push.js +1 -1
  179. package/dist/sdk/engage/landing-page-static-site.js +1 -1
  180. package/dist/sdk/engage/landing-page-validator.js +1 -1
  181. package/dist/sdk/engage/landing-page-workspace.js +1 -1
  182. package/dist/sdk/engage/landing-page-yaml.js +1 -1
  183. package/dist/sdk/engage/list-campaign-schema.js +1 -1
  184. package/dist/sdk/engage/list-campaign-yaml.js +1 -1
  185. package/dist/sdk/engage/template-pull.js +1 -1
  186. package/dist/sdk/engage/template-push.js +1 -1
  187. package/dist/sdk/engage/template-validator.js +1 -1
  188. package/dist/sdk/engage/template-yaml.js +1 -1
  189. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  190. package/dist/sdk/engage/types/campaign-def.js +1 -1
  191. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  192. package/dist/sdk/engage/types/in-browser-message-schema.js +1 -1
  193. package/dist/sdk/engage/types/landing-page-schema.js +1 -1
  194. package/dist/sdk/engage/types/template-schema.js +1 -1
  195. package/dist/sdk/engage/workspace-assignments.js +1 -1
  196. package/dist/sdk/engage.js +1 -1
  197. package/dist/sdk/errors.js +1 -1
  198. package/dist/sdk/index.js +1 -1
  199. package/dist/sdk/io/index.js +1 -1
  200. package/dist/sdk/io/node-filesystem.js +1 -1
  201. package/dist/sdk/job.js +1 -1
  202. package/dist/sdk/journey.js +1 -1
  203. package/dist/sdk/llm/chat-cache.js +1 -1
  204. package/dist/sdk/llm/codex-usage.d.ts +13 -0
  205. package/dist/sdk/llm/codex-usage.d.ts.map +1 -0
  206. package/dist/sdk/llm/codex-usage.js +1 -0
  207. package/dist/sdk/llm/codex-usage.js.map +1 -0
  208. package/dist/sdk/llm/index.js +1 -1
  209. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  210. package/dist/sdk/llm/model-factors.js +1 -1
  211. package/dist/sdk/llm/user-settings.js +1 -1
  212. package/dist/sdk/llm/work-models.d.ts +52 -0
  213. package/dist/sdk/llm/work-models.d.ts.map +1 -0
  214. package/dist/sdk/llm/work-models.js +1 -0
  215. package/dist/sdk/llm/work-models.js.map +1 -0
  216. package/dist/sdk/p13n-studio-errors.js +1 -1
  217. package/dist/sdk/p13n-studio.js +1 -1
  218. package/dist/sdk/personalization.js +1 -1
  219. package/dist/sdk/policy.js +1 -1
  220. package/dist/sdk/query/deleted-table-validation.js +1 -1
  221. package/dist/sdk/query/index.js +1 -1
  222. package/dist/sdk/query/sql-parser.js +1 -1
  223. package/dist/sdk/realtime.js +1 -1
  224. package/dist/sdk/schedule.js +1 -1
  225. package/dist/sdk/segment/audience-context.js +1 -1
  226. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  227. package/dist/sdk/segment/fields-display.js +1 -1
  228. package/dist/sdk/segment/file-discovery.js +1 -1
  229. package/dist/sdk/segment/journey-utils.js +1 -1
  230. package/dist/sdk/segment/journey-validator.js +1 -1
  231. package/dist/sdk/segment/journey-yaml.js +1 -1
  232. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  233. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  234. package/dist/sdk/segment/pull-workflow.js +1 -1
  235. package/dist/sdk/segment/push-recovery.js +1 -1
  236. package/dist/sdk/segment/push-workflow.js +1 -1
  237. package/dist/sdk/segment/resolution-context.js +1 -1
  238. package/dist/sdk/segment/segment-path-parser.js +1 -1
  239. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  240. package/dist/sdk/segment/segment-validator.js +1 -1
  241. package/dist/sdk/segment/target-resolution.js +1 -1
  242. package/dist/sdk/segment/tdx-config.js +1 -1
  243. package/dist/sdk/segment/types/activation-schema.js +1 -1
  244. package/dist/sdk/segment/types/journey-def.js +1 -1
  245. package/dist/sdk/segment/types/journey-schema.js +1 -1
  246. package/dist/sdk/segment/types/segment-def.js +1 -1
  247. package/dist/sdk/segment/types/segment-schema.js +1 -1
  248. package/dist/sdk/segment/validate-files.js +1 -1
  249. package/dist/sdk/segment/yaml-validator.js +1 -1
  250. package/dist/sdk/segment.js +1 -1
  251. package/dist/sdk/types/index.js +1 -1
  252. package/dist/sdk/types/progress.js +1 -1
  253. package/dist/sdk/types/workspace.js +1 -1
  254. package/dist/sdk/user.js +1 -1
  255. package/dist/sdk/util/format-detector.js +1 -1
  256. package/dist/sdk/util/formatters.js +1 -1
  257. package/dist/sdk/util/index.js +1 -1
  258. package/dist/sdk/util/paginate.js +1 -1
  259. package/dist/sdk/util/tree-formatter.js +1 -1
  260. package/dist/sdk/util/tree-search.js +1 -1
  261. package/dist/sdk/workflow/archive-validation.js +1 -1
  262. package/dist/sdk/workflow/clone-workflow.js +1 -1
  263. package/dist/sdk/workflow/index.js +1 -1
  264. package/dist/sdk/workflow/pull-workflow.js +1 -1
  265. package/dist/sdk/workflow/push-workflow.js +1 -1
  266. package/dist/sdk/workflow/task-graph.js +1 -1
  267. package/dist/sdk/workflow/tdx-config.js +1 -1
  268. package/dist/sdk/workflow/workflow-utils.js +1 -1
  269. package/dist/sdk/workspace/access-tracker.js +1 -1
  270. package/dist/sdk/workspace/frontmatter.js +1 -1
  271. package/dist/sdk/workspace/git.js +1 -1
  272. package/dist/sdk/workspace/index.js +1 -1
  273. package/dist/sdk/workspace/templates.js +1 -1
  274. package/dist/sdk/workspace/weekly.js +1 -1
  275. package/dist/sdk/workspace/wikilinks.js +1 -1
  276. package/dist/test-utils/command-runner.js +1 -1
  277. package/dist/test-utils/factories.js +1 -1
  278. package/dist/test-utils/fixtures.js +1 -1
  279. package/dist/test-utils/http-mock.js +1 -1
  280. package/dist/test-utils/index.js +1 -1
  281. package/dist/utils/async.js +1 -1
  282. package/dist/utils/claude-code-state.js +1 -1
  283. package/dist/utils/colors.js +1 -1
  284. package/dist/utils/diff.js +1 -1
  285. package/dist/utils/file-permissions.js +1 -1
  286. package/dist/utils/file-reader.js +1 -1
  287. package/dist/utils/github-releases.js +1 -1
  288. package/dist/utils/global-cache.js +1 -1
  289. package/dist/utils/json-loader.js +1 -1
  290. package/dist/utils/local-cache.js +1 -1
  291. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  292. package/dist/utils/logger/formatters/index.js +1 -1
  293. package/dist/utils/logger/handlers/console-handler.js +1 -1
  294. package/dist/utils/logger/handlers/file-handler.js +1 -1
  295. package/dist/utils/logger/handlers/index.js +1 -1
  296. package/dist/utils/logger/handlers/null-handler.js +1 -1
  297. package/dist/utils/logger/index.js +1 -1
  298. package/dist/utils/logger/logger.js +1 -1
  299. package/dist/utils/logger/types.js +1 -1
  300. package/dist/utils/option-validation.js +1 -1
  301. package/dist/utils/process.js +1 -1
  302. package/dist/utils/prompt.js +1 -1
  303. package/dist/utils/proxy-fetch.js +1 -1
  304. package/dist/utils/spinner.js +1 -1
  305. package/dist/utils/sse-parser.js +1 -1
  306. package/dist/utils/string-utils.js +1 -1
  307. package/dist/utils/table-ref-parser.js +1 -1
  308. package/dist/utils/td-user.d.ts +3 -0
  309. package/dist/utils/td-user.d.ts.map +1 -0
  310. package/dist/utils/td-user.js +1 -0
  311. package/dist/utils/td-user.js.map +1 -0
  312. package/dist/utils/tdx-logger.js +1 -1
  313. package/dist/utils/version-check.js +1 -1
  314. package/package.json +1 -1
  315. package/dist/commands/ai-usage-command-base.d.ts +0 -26
  316. package/dist/commands/ai-usage-command-base.d.ts.map +0 -1
  317. package/dist/commands/ai-usage-command-base.js +0 -1
  318. package/dist/commands/ai-usage-command-base.js.map +0 -1
  319. package/dist/commands/claude-usage-command.d.ts +0 -19
  320. package/dist/commands/claude-usage-command.d.ts.map +0 -1
  321. package/dist/commands/claude-usage-command.js +0 -1
  322. package/dist/commands/claude-usage-command.js.map +0 -1
  323. package/dist/commands/opencode-usage-command.d.ts +0 -19
  324. package/dist/commands/opencode-usage-command.d.ts.map +0 -1
  325. package/dist/commands/opencode-usage-command.js +0 -1
  326. package/dist/commands/opencode-usage-command.js.map +0 -1
@@ -1 +1 @@
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
+ (function(_0x40456b,_0x455bb6){const _0x3242e6=a210_0xefed,_0x31f3ef=_0x40456b();while(!![]){try{const _0x318c6b=parseInt(_0x3242e6(0x157))/0x1*(-parseInt(_0x3242e6(0x147))/0x2)+parseInt(_0x3242e6(0x13f))/0x3*(parseInt(_0x3242e6(0x15b))/0x4)+-parseInt(_0x3242e6(0x13b))/0x5*(parseInt(_0x3242e6(0x136))/0x6)+-parseInt(_0x3242e6(0x12c))/0x7+-parseInt(_0x3242e6(0x151))/0x8*(parseInt(_0x3242e6(0x162))/0x9)+-parseInt(_0x3242e6(0x148))/0xa+parseInt(_0x3242e6(0x154))/0xb;if(_0x318c6b===_0x455bb6)break;else _0x31f3ef['push'](_0x31f3ef['shift']());}catch(_0x31b352){_0x31f3ef['push'](_0x31f3ef['shift']());}}}(a210_0x5a00,0x5c59a));import a210_0x1c9b49 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(_0x3d0065){const _0x4c6a6a=a210_0xefed;return _0x3d0065['type']!==_0x4c6a6a(0x133);}function a210_0xefed(_0x4a6dc9,_0x504be6){_0x4a6dc9=_0x4a6dc9-0x12c;const _0x5a0083=a210_0x5a00();let _0xefed5e=_0x5a0083[_0x4a6dc9];return _0xefed5e;}export function isScopedResolution(_0x38d8b2){const _0xf8127c=a210_0xefed;return _0x38d8b2[_0xf8127c(0x13d)]===_0xf8127c(0x14c)||_0x38d8b2[_0xf8127c(0x13d)]===_0xf8127c(0x134)||_0x38d8b2[_0xf8127c(0x13d)]===_0xf8127c(0x13e);}export function getScopedDetails(_0x2d5ab3){const _0x2abf14=a210_0xefed;if(isScopedResolution(_0x2d5ab3))return{'isScoped':_0x2d5ab3[_0x2abf14(0x140)],'scopedFolderPath':_0x2d5ab3[_0x2abf14(0x15c)]};return undefined;}async function findTdxConfigAsync(_0x3ec947,_0x381d19){const _0x4de026=a210_0xefed;let _0x47af26=a210_0x1c9b49[_0x4de026(0x139)](_0x3ec947);const _0x2ad88b=a210_0x1c9b49[_0x4de026(0x12d)](_0x47af26)[_0x4de026(0x14b)];while(_0x47af26!==_0x2ad88b){const _0x1681a9=a210_0x1c9b49[_0x4de026(0x161)](_0x47af26,_0x4de026(0x153));if(await _0x381d19[_0x4de026(0x158)](_0x1681a9))try{const _0x3635bc=await _0x381d19['readFile'](_0x1681a9),_0x49eab5=JSON['parse'](_0x3635bc);if(_0x49eab5[_0x4de026(0x152)]&&typeof _0x49eab5[_0x4de026(0x152)]===_0x4de026(0x138))return{'configPath':_0x1681a9,'configDir':_0x47af26,'parentSegment':_0x49eab5[_0x4de026(0x152)]};}catch{}_0x47af26=a210_0x1c9b49[_0x4de026(0x150)](_0x47af26);}return null;}function calculateScopedPath(_0x581f56,_0x5c2d5){const _0x4b9b3b=a210_0xefed,_0xdff513=a210_0x1c9b49[_0x4b9b3b(0x155)](_0x5c2d5,_0x581f56),_0x1bd723=_0xdff513!==''&&_0xdff513!=='.'&&!_0xdff513[_0x4b9b3b(0x142)]('..');return{'isScoped':_0x1bd723,'scopedFolderPath':_0x1bd723?_0xdff513['replace'](/\\/g,'/'):''};}function a210_0x5a00(){const _0x5e1137=['1mbepgV','exists','No\x20tdx.json\x20found\x20for\x20file:\x20','cwd','292nGGtgf','scopedFolderPath','folderPath','includes','Not\x20a\x20YAML\x20file:\x20','isFile','join','9jfSwkK','parent_name','segmentName','4897452CARBQj','parse','file_not_found','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','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','readFile','journey','error','file','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','6QidSZW','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','string','resolve','trim','3567490kxBDQL','File\x20not\x20found','type','context','2964WAyphD','isScoped','configDir','startsWith','segment','no_config','match','resourceType','101162jVrfcS','6948670YbTWJc','invalid_yaml','stat','root','directory','message','No\x20tdx.json\x20found','no_parent','dirname','1041688nsHPaK','parent_segment','tdx.json','28544285BNJpte','relative','parentSegment'];a210_0x5a00=function(){return _0x5e1137;};return a210_0x5a00();}export async function resolveTarget(_0x2600b1){const _0x2322be=a210_0xefed,{arg:_0x23d796,contextParent:_0x45e8bd,cwd:cwd=process[_0x2322be(0x15a)](),fs:fs=nodeFileSystem}=_0x2600b1;if(_0x23d796&&isYamlFilePath(_0x23d796))try{const _0x3878e1=await resolveYamlFilePath(_0x23d796,fs),_0x47a745=a210_0x1c9b49[_0x2322be(0x139)](_0x23d796),_0x5989a1=a210_0x1c9b49[_0x2322be(0x150)](_0x47a745),_0x9022d7=await findTdxConfigAsync(_0x5989a1,fs);if(!_0x9022d7){if(_0x45e8bd){const _0x5b957a=a210_0x1c9b49[_0x2322be(0x150)](_0x47a745);return{'type':_0x2322be(0x134),'parentName':_0x45e8bd,'targetDir':_0x5b957a,'configRoot':_0x5b957a,'filePath':_0x47a745,'resourceName':_0x3878e1[_0x2322be(0x164)],'folderPath':_0x3878e1['folderPath'],'resourceType':_0x3878e1[_0x2322be(0x146)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x144),'message':_0x2322be(0x159)+_0x23d796,'arg':_0x23d796,'helpText':_0x2322be(0x135)};}const _0x4c5880=calculateScopedPath(_0x5989a1,_0x9022d7[_0x2322be(0x141)]);return{'type':'file','parentName':_0x9022d7['parentSegment'],'targetDir':_0x9022d7[_0x2322be(0x141)],'configRoot':_0x9022d7[_0x2322be(0x141)],'filePath':_0x47a745,'resourceName':_0x3878e1[_0x2322be(0x164)],'folderPath':_0x3878e1[_0x2322be(0x15d)],'resourceType':_0x3878e1[_0x2322be(0x146)],'isScoped':_0x4c5880['isScoped'],'scopedFolderPath':_0x4c5880[_0x2322be(0x15c)]};}catch(_0x10466f){const _0x4b6045=_0x10466f instanceof Error?_0x10466f[_0x2322be(0x14d)]:String(_0x10466f);if(_0x4b6045[_0x2322be(0x15e)](_0x2322be(0x13c)))return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x12e),'message':'File\x20not\x20found:\x20'+_0x23d796,'arg':_0x23d796};if(_0x4b6045[_0x2322be(0x15e)](_0x2322be(0x14e))){if(_0x45e8bd){const _0x4994e0=a210_0x1c9b49[_0x2322be(0x139)](_0x23d796);if(await fs[_0x2322be(0x158)](_0x4994e0)){const _0x1ffff7=a210_0x1c9b49[_0x2322be(0x150)](_0x4994e0),_0xb1e67a=await fs[_0x2322be(0x131)](_0x4994e0),_0x49ac05=_0xb1e67a[_0x2322be(0x145)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x3d230c=_0xb1e67a[_0x2322be(0x145)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x3073a6=_0x49ac05?_0x49ac05[0x1]['trim']():a210_0x1c9b49['basename'](_0x23d796,a210_0x1c9b49['extname'](_0x23d796)),_0x23f1e5=_0x3d230c&&_0x3d230c[0x1][_0x2322be(0x13a)]()==='journey'?_0x2322be(0x132):_0x2322be(0x143);return{'type':'file','parentName':_0x45e8bd,'targetDir':_0x1ffff7,'configRoot':_0x1ffff7,'filePath':_0x4994e0,'resourceName':_0x3073a6,'folderPath':'','resourceType':_0x23f1e5,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x144),'message':_0x2322be(0x159)+_0x23d796,'arg':_0x23d796,'helpText':_0x2322be(0x135)};}return{'type':_0x2322be(0x133),'errorCode':'invalid_yaml','message':_0x4b6045,'arg':_0x23d796};}if(_0x23d796){const _0x4c9d07=a210_0x1c9b49['resolve'](cwd,_0x23d796);let _0x3ff186=null;try{_0x3ff186=await fs[_0x2322be(0x14a)](_0x4c9d07);}catch{}if(_0x3ff186?.['isDirectory']()){const _0x4f375d=await findTdxConfigAsync(_0x4c9d07,fs);if(_0x4f375d){const _0x356b59=calculateScopedPath(_0x4c9d07,_0x4f375d[_0x2322be(0x141)]);return{'type':_0x2322be(0x14c),'parentName':_0x4f375d['parentSegment'],'targetDir':_0x4c9d07,'configRoot':_0x4f375d[_0x2322be(0x141)],'isScoped':_0x356b59['isScoped'],'scopedFolderPath':_0x356b59[_0x2322be(0x15c)]};}if(_0x45e8bd)return{'type':_0x2322be(0x14c),'parentName':_0x45e8bd,'targetDir':_0x4c9d07,'configRoot':_0x4c9d07,'isScoped':![],'scopedFolderPath':''};return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x144),'message':_0x2322be(0x130)+_0x23d796,'arg':_0x23d796,'helpText':_0x2322be(0x135)};}if(_0x3ff186?.[_0x2322be(0x160)]())return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x149),'message':_0x2322be(0x15f)+_0x23d796,'arg':_0x23d796,'helpText':_0x2322be(0x137)};const _0x4e2ce3=sanitizeFileName(_0x23d796),_0x9599f=getSegmentRootDir(_0x4e2ce3,cwd);return{'type':_0x2322be(0x163),'parentName':_0x23d796,'targetDir':_0x9599f,'configRoot':_0x9599f};}const _0x2bd451=await findTdxConfigAsync(cwd,fs);if(_0x2bd451){const _0x2e34e8=calculateScopedPath(cwd,_0x2bd451[_0x2322be(0x141)]);return{'type':_0x2322be(0x13e),'parentName':_0x2bd451[_0x2322be(0x156)],'targetDir':cwd,'configRoot':_0x2bd451['configDir'],'isScoped':_0x2e34e8['isScoped'],'scopedFolderPath':_0x2e34e8[_0x2322be(0x15c)]};}if(_0x45e8bd){const _0x22a8ed=sanitizeFileName(_0x45e8bd),_0x4d4adb=getSegmentRootDir(_0x22a8ed,cwd);return{'type':_0x2322be(0x13e),'parentName':_0x45e8bd,'targetDir':_0x4d4adb,'configRoot':_0x4d4adb,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x14f),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x2322be(0x12f)};}
@@ -1 +1 @@
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
+ const a211_0x4048fa=a211_0x4ee1;(function(_0x5366fc,_0x4e901d){const _0x3c3830=a211_0x4ee1,_0x5a237d=_0x5366fc();while(!![]){try{const _0x56139b=parseInt(_0x3c3830(0x95))/0x1*(-parseInt(_0x3c3830(0xa6))/0x2)+-parseInt(_0x3c3830(0x9e))/0x3+-parseInt(_0x3c3830(0x96))/0x4*(-parseInt(_0x3c3830(0x9c))/0x5)+-parseInt(_0x3c3830(0x93))/0x6*(parseInt(_0x3c3830(0xa0))/0x7)+parseInt(_0x3c3830(0x99))/0x8+-parseInt(_0x3c3830(0xa7))/0x9+parseInt(_0x3c3830(0xa1))/0xa;if(_0x56139b===_0x4e901d)break;else _0x5a237d['push'](_0x5a237d['shift']());}catch(_0x5bd2db){_0x5a237d['push'](_0x5a237d['shift']());}}}(a211_0x2dee,0x7ce84));import{existsSync,readFileSync}from'fs';import a211_0x2bf0cd from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a211_0x4048fa(0xa8);export function findTdxConfigPath(_0x359e9e=process[a211_0x4048fa(0xa3)]()){const _0x38659d=a211_0x4048fa;let _0x61535f=a211_0x2bf0cd[_0x38659d(0xa9)](_0x359e9e);const _0x930f5a=a211_0x2bf0cd['parse'](_0x61535f)[_0x38659d(0x97)];while(_0x61535f!==_0x930f5a){const _0x14bacc=a211_0x2bf0cd[_0x38659d(0x9a)](_0x61535f,TDX_CONFIG_FILE);if(existsSync(_0x14bacc))return _0x14bacc;_0x61535f=a211_0x2bf0cd['dirname'](_0x61535f);}return null;}export function loadTdxConfig(_0x4cda4e){const _0x28a7f5=a211_0x4048fa,_0x2b60ce=readFileSync(_0x4cda4e,_0x28a7f5(0x9d));let _0x491259;try{_0x491259=JSON[_0x28a7f5(0x9f)](_0x2b60ce);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x4cda4e);}if(!_0x491259||typeof _0x491259!==_0x28a7f5(0x91))throw new Error(_0x28a7f5(0xa2));const _0x48ea08=_0x491259,_0x16e94f=_0x48ea08[_0x28a7f5(0x98)]&&typeof _0x48ea08[_0x28a7f5(0x98)]===_0x28a7f5(0x9b),_0x55432a=_0x48ea08[_0x28a7f5(0xa4)]&&typeof _0x48ea08[_0x28a7f5(0xa4)]==='string';if(!_0x16e94f&&!_0x55432a)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x4cdd46={};return _0x16e94f&&(_0x4cdd46[_0x28a7f5(0x98)]=_0x48ea08['parent_segment']),_0x55432a&&(_0x4cdd46[_0x28a7f5(0xa4)]=_0x48ea08[_0x28a7f5(0xa4)]),_0x4cdd46;}export function findTdxConfig(_0x2445b8=process[a211_0x4048fa(0xa3)]()){const _0xce29f0=a211_0x4048fa,_0x15ddaa=findTdxConfigPath(_0x2445b8);if(!_0x15ddaa)throw new Error(_0xce29f0(0x92));const _0x1f9ed9=loadTdxConfig(_0x15ddaa),_0x506b96=a211_0x2bf0cd[_0xce29f0(0xa5)](_0x15ddaa);return{'config':_0x1f9ed9,'configPath':_0x15ddaa,'configDir':_0x506b96};}function a211_0x2dee(){const _0x54a738=['utf-8','968973pQuTbB','parse','77CVZvrp','26907440cwBqpX','Invalid\x20tdx.json:\x20expected\x20object','cwd','engage_workspace','dirname','1450CznLri','5987493BSpYyF','segments','resolve','stringify','object','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','448044LPdkiS','relative','871CfbivI','2276DslHqU','root','parent_segment','1217728BgtrHi','join','string','965JqHLpa'];a211_0x2dee=function(){return _0x54a738;};return a211_0x2dee();}export function tryFindTdxConfig(_0x546e41){try{return findTdxConfig(_0x546e41);}catch{return null;}}export function getSegmentRootDir(_0x4a9866,_0x446cae=process[a211_0x4048fa(0xa3)]()){const _0x473bdf=a211_0x4048fa;return a211_0x2bf0cd[_0x473bdf(0x9a)](_0x446cae,SEGMENTS_DIR,_0x4a9866);}export function getTdxConfigPath(_0xdb0862,_0x11e9ba=process[a211_0x4048fa(0xa3)]()){const _0x131a68=a211_0x4048fa;return a211_0x2bf0cd[_0x131a68(0x9a)](getSegmentRootDir(_0xdb0862,_0x11e9ba),TDX_CONFIG_FILE);}function a211_0x4ee1(_0x2d6fc0,_0x4dc3ba){_0x2d6fc0=_0x2d6fc0-0x91;const _0x2dee9d=a211_0x2dee();let _0x4ee1e9=_0x2dee9d[_0x2d6fc0];return _0x4ee1e9;}export function getRelativePathFromConfig(_0x15d514,_0x1b2c41){const _0x5a6f24=a211_0x4048fa,_0x430464=a211_0x2bf0cd[_0x5a6f24(0xa9)](_0x15d514),_0x3200de=a211_0x2bf0cd[_0x5a6f24(0x94)](_0x1b2c41,_0x430464);if(_0x3200de['startsWith']('..'))return'';return _0x3200de;}export function localPathToTdFolderPath(_0x432cac){const _0x37f9ec=a211_0x4048fa,_0x2359d7=a211_0x2bf0cd[_0x37f9ec(0xa5)](_0x432cac);if(_0x2359d7==='.'||_0x2359d7==='')return'';return _0x2359d7['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x392e18,_0xbac485){if(!_0x392e18)return _0xbac485;return a211_0x2bf0cd['join'](_0xbac485,_0x392e18);}export function createTdxConfigContent(_0x560165){const _0x5d4cf6=a211_0x4048fa,_0x587d48={'parent_segment':_0x560165};return JSON[_0x5d4cf6(0xaa)](_0x587d48,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x2f9de9){const _0x1f0854=a211_0x4048fa,_0x505aa9={'engage_workspace':_0x2f9de9};return JSON[_0x1f0854(0xaa)](_0x505aa9,null,0x2)+'\x0a';}
@@ -1 +1 @@
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
+ function a212_0x196a(_0x33c881,_0x4d4cd5){_0x33c881=_0x33c881-0x131;const _0x44f264=a212_0x44f2();let _0x196a28=_0x44f264[_0x33c881];return _0x196a28;}const a212_0x21a1b5=a212_0x196a;(function(_0x38b01c,_0x52a061){const _0x133336=a212_0x196a,_0x1572c9=_0x38b01c();while(!![]){try{const _0x1d6d1f=parseInt(_0x133336(0x15b))/0x1*(-parseInt(_0x133336(0x156))/0x2)+-parseInt(_0x133336(0x149))/0x3*(parseInt(_0x133336(0x157))/0x4)+-parseInt(_0x133336(0x13f))/0x5+-parseInt(_0x133336(0x14a))/0x6*(parseInt(_0x133336(0x15d))/0x7)+parseInt(_0x133336(0x131))/0x8+-parseInt(_0x133336(0x13b))/0x9+parseInt(_0x133336(0x134))/0xa*(parseInt(_0x133336(0x158))/0xb);if(_0x1d6d1f===_0x52a061)break;else _0x1572c9['push'](_0x1572c9['shift']());}catch(_0x5bd602){_0x1572c9['push'](_0x1572c9['shift']());}}}(a212_0x44f2,0x535c6));import{z}from'zod';export const ScheduleTypeSchema=z[a212_0x21a1b5(0x136)]([a212_0x21a1b5(0x146),a212_0x21a1b5(0x155),a212_0x21a1b5(0x151),a212_0x21a1b5(0x15e),a212_0x21a1b5(0x144),a212_0x21a1b5(0x138),a212_0x21a1b5(0x137)]);function a212_0x44f2(){const _0x3996d6=['max','superRefine','Use\x20either\x20`behavior`\x20or\x20`behaviors`,\x20not\x20both\x20(prefer\x20`behaviors`).','optional','daily','First','rows','object','hourly','11492nfhSIK','506172Nnuyfk','298969wGygKO','clear','week','108kzcNQv','number','7ysxTZg','weekly','addIssue','onFailure','day','string','4681600FQdoAC','month','array','520vnzGco','onSuccess','enum','minutes_interval','cron','boolean','once','3835170UCTjrE','unknown','min','nullable','1785590rwLdPt','record','ascending','union','masked','monthly','behaviors','none','behavior','Last','3vFOpQC','760218PHFkZE','hour','Activation\x20name\x20is\x20required'];a212_0x44f2=function(){return _0x3996d6;};return a212_0x44f2();}export const RepeatUnitSchema=z[a212_0x21a1b5(0x136)](['minute',a212_0x21a1b5(0x14b),a212_0x21a1b5(0x161),a212_0x21a1b5(0x15a),a212_0x21a1b5(0x132),a212_0x21a1b5(0x13a),'none']);export const ScheduleDefSchema=z[a212_0x21a1b5(0x154)]({'type':ScheduleTypeSchema[a212_0x21a1b5(0x150)](),'repeat_unit':RepeatUnitSchema[a212_0x21a1b5(0x150)](),'repeat_frequency':z[a212_0x21a1b5(0x15c)]()['optional'](),'repeat_sub_frequency':z[a212_0x21a1b5(0x133)](z[a212_0x21a1b5(0x15c)]())[a212_0x21a1b5(0x150)](),'start_at':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x13e)]()[a212_0x21a1b5(0x150)](),'end_on':z['string']()[a212_0x21a1b5(0x13e)]()['optional'](),'timezone':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x150)]()});export const NotificationDefSchema=z[a212_0x21a1b5(0x154)]({'notify_on':z[a212_0x21a1b5(0x133)](z[a212_0x21a1b5(0x136)]([a212_0x21a1b5(0x135),a212_0x21a1b5(0x160)]))[a212_0x21a1b5(0x150)](),'email_recipients':z[a212_0x21a1b5(0x133)](z['string']())['optional']()});export const ActivationColumnDefSchema=z[a212_0x21a1b5(0x142)]([z[a212_0x21a1b5(0x162)](),z[a212_0x21a1b5(0x154)]({'name':z[a212_0x21a1b5(0x162)](),'type':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x150)](),'visibility':z[a212_0x21a1b5(0x136)]([a212_0x21a1b5(0x159),a212_0x21a1b5(0x143)])[a212_0x21a1b5(0x150)]()})]);export const ActivationBehaviorDefSchema=z[a212_0x21a1b5(0x154)]({'columns':z[a212_0x21a1b5(0x133)](ActivationColumnDefSchema)[a212_0x21a1b5(0x150)](),'behavior_table':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x150)](),'join_row':z[a212_0x21a1b5(0x15c)]()['nullable']()[a212_0x21a1b5(0x150)](),'join_strategy':z[a212_0x21a1b5(0x136)](['All',a212_0x21a1b5(0x152),a212_0x21a1b5(0x148),'Top-N'])[a212_0x21a1b5(0x150)](),'formatting':z[a212_0x21a1b5(0x136)]([a212_0x21a1b5(0x153),'cols'])[a212_0x21a1b5(0x150)](),'order_by':z[a212_0x21a1b5(0x133)](z['object']({'key':z['string'](),'order':z[a212_0x21a1b5(0x136)]([a212_0x21a1b5(0x141),'descending'])}))[a212_0x21a1b5(0x150)]()});export const ActivationBehaviorsDefSchema=z[a212_0x21a1b5(0x133)](ActivationBehaviorDefSchema)[a212_0x21a1b5(0x14d)](0x4);export const ActivationDefSchema=z[a212_0x21a1b5(0x154)]({'name':z['string']()['min'](0x1,a212_0x21a1b5(0x14c)),'description':z[a212_0x21a1b5(0x162)]()['optional'](),'connection':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x13d)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z['boolean']()[a212_0x21a1b5(0x150)](),'columns':z[a212_0x21a1b5(0x133)](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a212_0x21a1b5(0x150)](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a212_0x21a1b5(0x140)](z['string'](),z[a212_0x21a1b5(0x13c)]())[a212_0x21a1b5(0x150)](),'activation_template_id':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x13e)]()[a212_0x21a1b5(0x150)](),'behavior':ActivationBehaviorDefSchema[a212_0x21a1b5(0x13e)]()[a212_0x21a1b5(0x150)](),'behaviors':ActivationBehaviorsDefSchema[a212_0x21a1b5(0x150)](),'run_after_journey_refresh':z[a212_0x21a1b5(0x139)]()[a212_0x21a1b5(0x150)](),'nested_workflow_project_name':z[a212_0x21a1b5(0x162)]()['optional'](),'nested_workflow_name':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x150)](),'lock_enabled':z['boolean']()['optional']()})[a212_0x21a1b5(0x14e)]((_0x8043fb,_0x78cbb0)=>{const _0x8c657c=a212_0x21a1b5;_0x8043fb[_0x8c657c(0x147)]!=null&&_0x8043fb[_0x8c657c(0x145)]!=null&&_0x78cbb0[_0x8c657c(0x15f)]({'code':'custom','message':_0x8c657c(0x14f),'path':[_0x8c657c(0x147)]});});
@@ -1 +1 @@
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
+ (function(_0x282969,_0x58acd7){var _0x386635=a213_0x5a1b,_0x4fd4b2=_0x282969();while(!![]){try{var _0x652db5=-parseInt(_0x386635(0x10b))/0x1*(-parseInt(_0x386635(0x111))/0x2)+parseInt(_0x386635(0x10a))/0x3+parseInt(_0x386635(0x10c))/0x4+-parseInt(_0x386635(0x10e))/0x5*(parseInt(_0x386635(0x108))/0x6)+-parseInt(_0x386635(0x10d))/0x7*(parseInt(_0x386635(0x109))/0x8)+parseInt(_0x386635(0x10f))/0x9+-parseInt(_0x386635(0x107))/0xa*(-parseInt(_0x386635(0x110))/0xb);if(_0x652db5===_0x58acd7)break;else _0x4fd4b2['push'](_0x4fd4b2['shift']());}catch(_0x1276bc){_0x4fd4b2['push'](_0x4fd4b2['shift']());}}}(a213_0xd0a0,0x9582e));function a213_0x5a1b(_0x5ac76d,_0x5c147b){_0x5ac76d=_0x5ac76d-0x107;var _0xd0a059=a213_0xd0a0();var _0x5a1b47=_0xd0a059[_0x5ac76d];return _0x5a1b47;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a213_0xd0a0(){var _0x3dba8e=['2966FFJbzC','1231292dbAnVN','6335jrMnwj','71375HEhXyV','5676183RcLgFX','133177hmLrfC','424fSXtan','540UjCPFm','480ufpQIa','8968YBSDsl','1643469dHiYoS'];a213_0xd0a0=function(){return _0x3dba8e;};return a213_0xd0a0();}
@@ -1 +1 @@
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
+ const a214_0x3d4313=a214_0x374c;(function(_0x109a04,_0x5a93ad){const _0x2ecb54=a214_0x374c,_0x11ff28=_0x109a04();while(!![]){try{const _0x2ba4c4=parseInt(_0x2ecb54(0x111))/0x1*(parseInt(_0x2ecb54(0xf1))/0x2)+parseInt(_0x2ecb54(0x116))/0x3*(parseInt(_0x2ecb54(0x103))/0x4)+-parseInt(_0x2ecb54(0x109))/0x5+parseInt(_0x2ecb54(0x106))/0x6+parseInt(_0x2ecb54(0x107))/0x7*(parseInt(_0x2ecb54(0x113))/0x8)+-parseInt(_0x2ecb54(0x102))/0x9+parseInt(_0x2ecb54(0x10c))/0xa*(-parseInt(_0x2ecb54(0x114))/0xb);if(_0x2ba4c4===_0x5a93ad)break;else _0x11ff28['push'](_0x11ff28['shift']());}catch(_0x36c38e){_0x11ff28['push'](_0x11ff28['shift']());}}}(a214_0x48bf,0x9effb));function a214_0x48bf(){const _0x1b81a3=['4790514DpXstu','7RPphTt','reentry_always','1592710DdSNUR','object','filter','310GaZdGK','literal','array','no_reentry','min','23UHfmdT','decision_point','7473560bFDAgk','555258defkcA','length','3565308naudWy','end','launched','boolean','61084zpjuaL','ab_test','number','Journey\x20name\x20is\x20required','reentry_unless_goal_achieved','journeys','merge','enum','week','optional','refine','journey','lazy','day','wait','jump','record','9800073iTuTjg','4YJTDzO','activation','string'];a214_0x48bf=function(){return _0x1b81a3;};return a214_0x48bf();}import{z}from'zod';function a214_0x374c(_0x27b4f6,_0x31193f){_0x27b4f6=_0x27b4f6-0xf0;const _0x48bffa=a214_0x48bf();let _0x374cad=_0x48bffa[_0x27b4f6];return _0x374cad;}import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a214_0x3d4313(0xf8)](['draft','simulation',a214_0x3d4313(0x118)]);export const ReentryModeTypeSchema=z[a214_0x3d4313(0xf8)]([a214_0x3d4313(0x10f),a214_0x3d4313(0xf5),a214_0x3d4313(0x108)]);export const WaitUnitTypeSchema=z['enum']([a214_0x3d4313(0xfe),a214_0x3d4313(0xf9)]);export const StepTypeValueSchema=z[a214_0x3d4313(0xf8)]([a214_0x3d4313(0xff),a214_0x3d4313(0x104),a214_0x3d4313(0x112),a214_0x3d4313(0xf2),a214_0x3d4313(0xf7),a214_0x3d4313(0x100),a214_0x3d4313(0x117)]);export const EmbeddedSegmentDefSchema=z[a214_0x3d4313(0x10a)]({'description':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a214_0x3d4313(0x10a)]({'journey':z[a214_0x3d4313(0x105)](),'stage':z[a214_0x3d4313(0x105)](),'bundle_id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)]()});export const CriteriaDefSchema=z[a214_0x3d4313(0x10a)]({'name':z[a214_0x3d4313(0x105)](),'description':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'segment':z[a214_0x3d4313(0x105)](),'target':JumpTargetDefSchema[a214_0x3d4313(0xfa)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a214_0x3d4313(0xf3)](),'unit':WaitUnitTypeSchema,'next':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)]()}),WaitConditionDefSchema=z[a214_0x3d4313(0x10a)]({'segment':z[a214_0x3d4313(0x105)](),'next':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a214_0x3d4313(0x10a)]({'duration':z[a214_0x3d4313(0xf3)]()[a214_0x3d4313(0xfa)](),'unit':WaitUnitTypeSchema[a214_0x3d4313(0xfa)](),'wait_until':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'condition':WaitConditionDefSchema[a214_0x3d4313(0xfa)](),'days_of_week':z[a214_0x3d4313(0x10e)](z[a214_0x3d4313(0x105)]())[a214_0x3d4313(0xfa)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'next':z['string']()[a214_0x3d4313(0xfa)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a214_0x3d4313(0xff)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a214_0x3d4313(0x105)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a214_0x3d4313(0x10d)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a214_0x3d4313(0x10a)]({'name':z[a214_0x3d4313(0x105)](),'segment':z['string']()['optional'](),'segment_id':z['string']()['optional'](),'excluded':z[a214_0x3d4313(0xf0)]()[a214_0x3d4313(0xfa)](),'next':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)]()}),DecisionPointStepParamsDefSchema=z[a214_0x3d4313(0x10a)]({'branches':z[a214_0x3d4313(0x10e)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a214_0x3d4313(0x10a)]({...StepBaseFields,'type':z[a214_0x3d4313(0x10d)](a214_0x3d4313(0x112)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a214_0x3d4313(0x10a)]({'id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'name':z['string'](),'percentage':z[a214_0x3d4313(0xf3)](),'next':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a214_0x3d4313(0x10e)](AbTestVariantDefSchema),'unique_id':z['string']()[a214_0x3d4313(0xfa)](),'customized_split':z[a214_0x3d4313(0xf0)]()['optional']()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a214_0x3d4313(0x10d)](a214_0x3d4313(0xf2)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a214_0x3d4313(0x10d)]('merge')}),JumpStepParamsDefSchema=z[a214_0x3d4313(0x10a)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a214_0x3d4313(0x10a)]({...StepBaseFields,'type':z['literal'](a214_0x3d4313(0x100)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a214_0x3d4313(0x10d)](a214_0x3d4313(0x117))})['passthrough']();export const StepDefSchema=z['discriminatedUnion']('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z['object']({'name':z[a214_0x3d4313(0x105)](),'description':z[a214_0x3d4313(0x105)]()['optional'](),'id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'entry_criteria':CriteriaDefSchema[a214_0x3d4313(0xfa)](),'exit_criteria':z[a214_0x3d4313(0x10e)](CriteriaDefSchema)[a214_0x3d4313(0xfa)](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'steps':z[a214_0x3d4313(0x10e)](StepDefSchema)[a214_0x3d4313(0xfa)]()});export const JourneyEntryDefSchema=z['object']({'name':z['string']()['optional'](),'version':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'state':JourneyStateTypeSchema[a214_0x3d4313(0xfa)](),'latest':z[a214_0x3d4313(0xf0)]()[a214_0x3d4313(0xfa)](),'stages':z['array'](StageDefSchema),'id':z[a214_0x3d4313(0x105)]()['optional'](),'version_number':z[a214_0x3d4313(0xf3)]()[a214_0x3d4313(0xfa)](),'goal':CriteriaDefSchema[a214_0x3d4313(0xfa)](),'reentry':ReentryModeTypeSchema[a214_0x3d4313(0xfa)]()});export const JourneyDefSchema=z[a214_0x3d4313(0xfd)](()=>z[a214_0x3d4313(0x10a)]({'type':z['literal'](a214_0x3d4313(0xfc)),'name':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0x110)](0x1,a214_0x3d4313(0xf4)),'description':z['string']()[a214_0x3d4313(0xfa)](),'bundle_id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'bundle_name':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'folder_id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'reentry':ReentryModeTypeSchema[a214_0x3d4313(0xfa)](),'allow_reentry':z['boolean']()[a214_0x3d4313(0xfa)](),'goal':CriteriaDefSchema[a214_0x3d4313(0xfa)](),'id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'version':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'version_number':z['number']()[a214_0x3d4313(0xfa)](),'stages':z[a214_0x3d4313(0x10e)](StageDefSchema)['optional'](),'versions':z[a214_0x3d4313(0x10e)](JourneyEntryDefSchema)[a214_0x3d4313(0xfa)](),'journeys':z[a214_0x3d4313(0x10e)](JourneyEntryDefSchema)[a214_0x3d4313(0xfa)](),'segments':z['record'](z[a214_0x3d4313(0x105)](),EmbeddedSegmentDefSchema)[a214_0x3d4313(0xfa)](),'activations':z[a214_0x3d4313(0x101)](z[a214_0x3d4313(0x105)](),ActivationDefSchema)[a214_0x3d4313(0xfa)]()})[a214_0x3d4313(0xfb)](_0x1e7bfd=>{const _0x33c1bb=a214_0x3d4313,_0x3d9af6=[_0x1e7bfd[_0x33c1bb(0xf6)],_0x1e7bfd['stages'],_0x1e7bfd['versions']][_0x33c1bb(0x10b)](_0x158357=>Array['isArray'](_0x158357)&&_0x158357['length']>0x0)[_0x33c1bb(0x115)];return _0x3d9af6===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
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
+ (function(_0x1672b0,_0x2ae6b4){var _0x399f56=a216_0x1483,_0xef0f29=_0x1672b0();while(!![]){try{var _0x59e733=parseInt(_0x399f56(0x1c0))/0x1+parseInt(_0x399f56(0x1c6))/0x2+parseInt(_0x399f56(0x1c1))/0x3*(parseInt(_0x399f56(0x1c7))/0x4)+parseInt(_0x399f56(0x1c4))/0x5+parseInt(_0x399f56(0x1c2))/0x6+-parseInt(_0x399f56(0x1c5))/0x7*(-parseInt(_0x399f56(0x1be))/0x8)+parseInt(_0x399f56(0x1c3))/0x9*(-parseInt(_0x399f56(0x1bf))/0xa);if(_0x59e733===_0x2ae6b4)break;else _0xef0f29['push'](_0xef0f29['shift']());}catch(_0x35ed31){_0xef0f29['push'](_0xef0f29['shift']());}}}(a216_0x5882,0x6defa));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_0x1483(_0x493a96,_0x1fa47e){_0x493a96=_0x493a96-0x1be;var _0x5882ad=a216_0x5882();var _0x14838e=_0x5882ad[_0x493a96];return _0x14838e;}function a216_0x5882(){var _0x102bfe=['18SxhnXv','694134QhgNhv','9081333LVUkio','2397425JWZmcn','307993SZyRng','5572gxezsH','291436wnvDOE','8tCNrzW','10rrHqxV','380222aZPoOT'];a216_0x5882=function(){return _0x102bfe;};return a216_0x5882();}
@@ -1 +1 @@
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
+ const a217_0x928108=a217_0x5404;(function(_0x56f975,_0x473e45){const _0x5e19f9=a217_0x5404,_0x39a7e9=_0x56f975();while(!![]){try{const _0x49cb7a=-parseInt(_0x5e19f9(0x146))/0x1*(parseInt(_0x5e19f9(0x153))/0x2)+parseInt(_0x5e19f9(0x165))/0x3+-parseInt(_0x5e19f9(0x156))/0x4+parseInt(_0x5e19f9(0x12d))/0x5*(parseInt(_0x5e19f9(0x173))/0x6)+parseInt(_0x5e19f9(0x14c))/0x7+-parseInt(_0x5e19f9(0x12a))/0x8*(parseInt(_0x5e19f9(0x162))/0x9)+-parseInt(_0x5e19f9(0x16a))/0xa;if(_0x49cb7a===_0x473e45)break;else _0x39a7e9['push'](_0x39a7e9['shift']());}catch(_0x50d7be){_0x39a7e9['push'](_0x39a7e9['shift']());}}}(a217_0x7b72,0x58433));import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';export const OperatorTypeSchema=z['enum']([a217_0x928108(0x169),a217_0x928108(0x130),a217_0x928108(0x13e),a217_0x928108(0x141),a217_0x928108(0x135),'In',a217_0x928108(0x166),'Regexp','IsNull',a217_0x928108(0x124),'TimeWithinNext',a217_0x928108(0x15d),a217_0x928108(0x143),a217_0x928108(0x131),a217_0x928108(0x154)]);export const TimeUnitSchema=z[a217_0x928108(0x144)]([a217_0x928108(0x136),a217_0x928108(0x139),a217_0x928108(0x158),'day',a217_0x928108(0x16b),a217_0x928108(0x170),a217_0x928108(0x168)]);export const AggregationTypeSchema=z[a217_0x928108(0x144)]([a217_0x928108(0x14e),'Sum','Average',a217_0x928108(0x16c),'Max','CountDistinct','First','Last']);const TemporalValueSchema=z['union']([z[a217_0x928108(0x133)]({'timestamp':z[a217_0x928108(0x13f)]()}),z[a217_0x928108(0x133)]({'last':z[a217_0x928108(0x127)]([z[a217_0x928108(0x14b)](),z[a217_0x928108(0x149)](z[a217_0x928108(0x13f)](),z[a217_0x928108(0x14b)]())]),'unit':z[a217_0x928108(0x13f)]()})]),OperatorValueSchema=z[a217_0x928108(0x127)]([z[a217_0x928108(0x13f)](),z[a217_0x928108(0x14b)](),z[a217_0x928108(0x128)](),TemporalValueSchema,z['array'](z[a217_0x928108(0x127)]([z[a217_0x928108(0x13f)](),z['number'](),z[a217_0x928108(0x128)]()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a217_0x928108(0x130),a217_0x928108(0x141),a217_0x928108(0x13e),a217_0x928108(0x135),'In',a217_0x928108(0x15d),a217_0x928108(0x143),a217_0x928108(0x131),a217_0x928108(0x138),'TimeWithinPast',a217_0x928108(0x142)]),OPERATORS_REQUIRING_UNIT=new Set([a217_0x928108(0x124),a217_0x928108(0x142)]);export const OperatorDefSchema=z[a217_0x928108(0x133)]({'type':OperatorTypeSchema,'not':z['boolean']()['optional'](),'value':OperatorValueSchema[a217_0x928108(0x14d)](),'min':z[a217_0x928108(0x127)]([z[a217_0x928108(0x14b)](),z['string'](),TemporalValueSchema])['optional'](),'max':z[a217_0x928108(0x127)]([z[a217_0x928108(0x14b)](),z[a217_0x928108(0x13f)](),TemporalValueSchema])[a217_0x928108(0x14d)](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)](),'week':z[a217_0x928108(0x14b)]()['optional'](),'month':z['number']()[a217_0x928108(0x14d)](),'year':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)](),'hour':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)](),'minute':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)](),'second':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)]()})[a217_0x928108(0x14d)](),'from':z[a217_0x928108(0x133)]({'last':z[a217_0x928108(0x127)]([z[a217_0x928108(0x14b)](),z[a217_0x928108(0x13f)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a217_0x928108(0x128)]()[a217_0x928108(0x14d)]()})[a217_0x928108(0x137)]((_0x45205f,_0x2c4824)=>{const _0x1dd15b=a217_0x928108;OPERATORS_REQUIRING_VALUE[_0x1dd15b(0x12b)](_0x45205f[_0x1dd15b(0x15e)])&&(_0x45205f[_0x1dd15b(0x122)]===undefined||_0x45205f['value']===null)&&_0x2c4824['addIssue']({'code':_0x1dd15b(0x134),'message':_0x1dd15b(0x15a)+_0x45205f['type']+_0x1dd15b(0x12e),'path':['value']}),_0x45205f[_0x1dd15b(0x15e)]==='Between'&&_0x45205f[_0x1dd15b(0x14a)]===undefined&&_0x45205f['max']===undefined&&_0x2c4824[_0x1dd15b(0x151)]({'code':_0x1dd15b(0x134),'message':_0x1dd15b(0x12c),'params':{'validationCode':_0x1dd15b(0x140)}}),OPERATORS_REQUIRING_UNIT[_0x1dd15b(0x12b)](_0x45205f['type'])&&_0x45205f[_0x1dd15b(0x122)]!==undefined&&!_0x45205f[_0x1dd15b(0x13a)]&&_0x2c4824[_0x1dd15b(0x151)]({'code':'custom','message':_0x1dd15b(0x15a)+_0x45205f[_0x1dd15b(0x15e)]+_0x1dd15b(0x13c),'path':[_0x1dd15b(0x13a)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x45205f[_0x1dd15b(0x15e)]==='TimeRange'&&(!_0x45205f[_0x1dd15b(0x13b)]&&_0x2c4824[_0x1dd15b(0x151)]({'code':_0x1dd15b(0x134),'message':_0x1dd15b(0x150),'path':['duration']}),!_0x45205f[_0x1dd15b(0x160)]&&_0x2c4824[_0x1dd15b(0x151)]({'code':_0x1dd15b(0x134),'message':_0x1dd15b(0x12f),'path':[_0x1dd15b(0x160)]}));});export const ArrayMatchingSchema=z[a217_0x928108(0x127)]([z['literal'](a217_0x928108(0x16d)),z[a217_0x928108(0x126)](a217_0x928108(0x155)),z[a217_0x928108(0x133)]({'atLeast':z[a217_0x928108(0x14b)]()}),z[a217_0x928108(0x133)]({'atMost':z[a217_0x928108(0x14b)]()}),z['object']({'exactly':z[a217_0x928108(0x14b)]()})]);export const AggregationDefSchema=z['discriminatedUnion'](a217_0x928108(0x15e),[z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x144)]([a217_0x928108(0x172),a217_0x928108(0x16c),'Max',a217_0x928108(0x16e)]),'column':z[a217_0x928108(0x13f)](),'groupingColumns':z[a217_0x928108(0x123)](z[a217_0x928108(0x13f)]())[a217_0x928108(0x14d)]()}),z[a217_0x928108(0x133)]({'type':z['literal'](a217_0x928108(0x14e)),'groupingColumns':z[a217_0x928108(0x123)](z[a217_0x928108(0x13f)]())[a217_0x928108(0x14d)]()}),z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)](a217_0x928108(0x145)),'columns':z['array'](z[a217_0x928108(0x13f)]())}),z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x144)]([a217_0x928108(0x157),'Last']),'column':z[a217_0x928108(0x13f)](),'orderColumn':z['string'](),'groupingColumns':z[a217_0x928108(0x123)](z[a217_0x928108(0x13f)]())['optional']()})]);export const TimeWindowDefSchema=z[a217_0x928108(0x133)]({'duration':z[a217_0x928108(0x14b)](),'unit':TimeUnitSchema});const TIMEFRAME_OPERATORS=new Set(['TimeWithinPast',a217_0x928108(0x142),'TimeRange']),TIMESTAMP_COMPARISON_OPERATORS=new Set([a217_0x928108(0x169),a217_0x928108(0x130),a217_0x928108(0x141),a217_0x928108(0x13e),a217_0x928108(0x135),'Between']),TIMESTAMP_OPERATORS=new Set([...TIMEFRAME_OPERATORS,...TIMESTAMP_COMPARISON_OPERATORS]);function a217_0x5404(_0x3f63c6,_0x3c356d){_0x3f63c6=_0x3f63c6-0x122;const _0x7b727f=a217_0x7b72();let _0x540453=_0x7b727f[_0x3f63c6];return _0x540453;}function isTemporalValueShape(_0x1a222c){const _0x36050b=a217_0x928108;return typeof _0x1a222c==='object'&&_0x1a222c!==null&&!Array['isArray'](_0x1a222c)&&(_0x36050b(0x132)in _0x1a222c||_0x36050b(0x148)in _0x1a222c);}export const FilterColumnConditionDefSchema=z['object']({'type':z[a217_0x928108(0x126)](a217_0x928108(0x152)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a217_0x928108(0x14d)]()})['superRefine']((_0x2a9d48,_0x11cef2)=>{const _0x308d60=a217_0x928108,_0x9aee33=_0x2a9d48['operator'][_0x308d60(0x15e)];if(_0x2a9d48[_0x308d60(0x167)]===_0x308d60(0x132)){if(!TIMESTAMP_OPERATORS[_0x308d60(0x12b)](_0x9aee33)){_0x11cef2[_0x308d60(0x151)]({'code':'custom','message':'Timestamp\x20column\x20only\x20supports\x20'+[...TIMESTAMP_OPERATORS]['join'](',\x20')+'\x20operators\x20(got\x20\x27'+_0x9aee33+'\x27)','path':[_0x308d60(0x15c),_0x308d60(0x15e)]});return;}if(TIMESTAMP_COMPARISON_OPERATORS['has'](_0x9aee33)){const _0xee314d=_0x9aee33===_0x308d60(0x166)?[_0x2a9d48[_0x308d60(0x15c)][_0x308d60(0x14a)],_0x2a9d48['operator'][_0x308d60(0x129)]]['every'](_0x519b05=>_0x519b05===undefined||isTemporalValueShape(_0x519b05)):_0x2a9d48[_0x308d60(0x15c)][_0x308d60(0x122)]===undefined||isTemporalValueShape(_0x2a9d48['operator'][_0x308d60(0x122)]);!_0xee314d&&_0x11cef2['addIssue']({'code':_0x308d60(0x134),'message':_0x308d60(0x15f)+_0x9aee33+_0x308d60(0x16f),'path':[_0x308d60(0x15c)]});}}});export const FilterRuleDefSchema=z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)](a217_0x928108(0x163)),'conditions':z[a217_0x928108(0x123)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a217_0x928108(0x147)](()=>z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)](a217_0x928108(0x161)),'attribute':z[a217_0x928108(0x13f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a217_0x928108(0x14d)](),'exclude':z[a217_0x928108(0x128)]()[a217_0x928108(0x14d)](),'aggregation':AggregationDefSchema[a217_0x928108(0x14d)](),'source':z[a217_0x928108(0x13f)]()[a217_0x928108(0x14d)](),'filter':FilterRuleDefSchema[a217_0x928108(0x14d)](),'limit':z['number']()[a217_0x928108(0x14d)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)](a217_0x928108(0x14f)),'attribute':z[a217_0x928108(0x13f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a217_0x928108(0x128)]()[a217_0x928108(0x14d)](),'aggregation':AggregationDefSchema[a217_0x928108(0x14d)](),'source':z['string']()[a217_0x928108(0x14d)](),'filter':FilterRuleDefSchema[a217_0x928108(0x14d)](),'timeWindow':TimeWindowDefSchema[a217_0x928108(0x14d)](),'limit':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)]()}));export const ColumnConditionDefSchema=z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)]('Column'),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a217_0x928108(0x147)](()=>z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x144)]([a217_0x928108(0x163),'Or',a217_0x928108(0x159)]),'conditions':z['array'](ConditionDefSchema),'description':z[a217_0x928108(0x13f)]()[a217_0x928108(0x14d)](),'expr':z['string']()[a217_0x928108(0x14d)]()}));export const SegmentRefConditionDefSchema=z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x144)](['include',a217_0x928108(0x13d)]),'segment':z['string']()[a217_0x928108(0x14a)](0x1,a217_0x928108(0x125))});export const ConditionDefSchema=z['lazy'](()=>z[a217_0x928108(0x127)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));function a217_0x7b72(){const _0x591aee=['array','TimeWithinPast','Segment\x20reference\x20must\x20not\x20be\x20empty','literal','union','boolean','max','24MzboUT','has','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','5NvHwzg','\x27\x20requires\x20a\x20value','TimeRange\x20operator\x20requires\x20\x27from\x27','Greater','EndWith','timestamp','object','custom','LessEqual','second','superRefine','Regexp','minute','unit','duration','\x27\x20requires\x20a\x20time\x20unit','exclude','Less','string','MISSING_BETWEEN_BOUNDS','GreaterEqual','TimeWithinNext','StartWith','enum','CountDistinct','2yZaDch','lazy','last','record','min','number','4980577vzmWgG','optional','Count','Behavior','TimeRange\x20operator\x20requires\x20\x27duration\x27','addIssue','Column','125338sgPjNq','TimeRange','all','38984wpqehk','First','hour','Composite','Operator\x20\x27','realtime','operator','Contain','type','Timestamp\x20column\x27s\x20\x27','from','Value','1515627oXrygQ','And','segment','1826322ICdYLK','Between','column','year','Equal','5123970TZuFIX','week','Min','any','Average','\x27\x20operator\x20requires\x20a\x20relative-time\x20or\x20timestamp\x20value\x20({last,\x20unit}\x20or\x20{timestamp}),\x20not\x20a\x20plain\x20value','month','batch','Sum','1163568pcHzQL','value'];a217_0x7b72=function(){return _0x591aee;};return a217_0x7b72();}export const RuleDefSchema=z[a217_0x928108(0x147)](()=>z[a217_0x928108(0x133)]({'type':z['enum'](['And','Or',a217_0x928108(0x159)]),'conditions':z[a217_0x928108(0x123)](ConditionDefSchema),'description':z[a217_0x928108(0x13f)]()[a217_0x928108(0x14d)](),'expr':z[a217_0x928108(0x13f)]()['optional']()}));export const SegmentDefSchema=z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)](a217_0x928108(0x164))[a217_0x928108(0x14d)](),'name':z[a217_0x928108(0x13f)]()['min'](0x1,'Segment\x20name\x20is\x20required'),'description':z[a217_0x928108(0x13f)]()[a217_0x928108(0x14d)](),'folder':z[a217_0x928108(0x13f)]()[a217_0x928108(0x14d)](),'rule':RuleDefSchema[a217_0x928108(0x14d)](),'kind':z[a217_0x928108(0x144)]([a217_0x928108(0x171),a217_0x928108(0x15b),'funnel_stage'])[a217_0x928108(0x14d)](),'visible':z[a217_0x928108(0x128)]()[a217_0x928108(0x14d)](),'activations':z[a217_0x928108(0x123)](ActivationDefSchema)['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
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
+ function a218_0x3644(_0x1d41a4,_0x1c6153){_0x1d41a4=_0x1d41a4-0x1e0;const _0x9f2de4=a218_0x9f2d();let _0x364426=_0x9f2de4[_0x1d41a4];return _0x364426;}const a218_0x5c8fbf=a218_0x3644;(function(_0x5c7995,_0x3e10e3){const _0x19ee89=a218_0x3644,_0x1d71eb=_0x5c7995();while(!![]){try{const _0x5e094c=parseInt(_0x19ee89(0x1e1))/0x1*(-parseInt(_0x19ee89(0x1f0))/0x2)+-parseInt(_0x19ee89(0x1f6))/0x3*(parseInt(_0x19ee89(0x1f4))/0x4)+parseInt(_0x19ee89(0x1e5))/0x5*(parseInt(_0x19ee89(0x1ef))/0x6)+parseInt(_0x19ee89(0x201))/0x7*(parseInt(_0x19ee89(0x202))/0x8)+-parseInt(_0x19ee89(0x1ff))/0x9+parseInt(_0x19ee89(0x1eb))/0xa+parseInt(_0x19ee89(0x1f7))/0xb*(parseInt(_0x19ee89(0x1ea))/0xc);if(_0x5e094c===_0x3e10e3)break;else _0x1d71eb['push'](_0x1d71eb['shift']());}catch(_0x14bf72){_0x1d71eb['push'](_0x1d71eb['shift']());}}}(a218_0x9f2d,0xa1754));import{readFileSync}from'fs';import*as a218_0x480c6c from'path';import*as a218_0x1b73e7 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';function a218_0x9f2d(){const _0x1cb8d3=['in_browser_message','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','valid','relative','always_on_campaign','3vpMuLb','template','map','utf-8','3577670BvEWqN','toJSON','result','filterType','parseDocument','3833364FHDbDe','6781290eCFhbk','campaign_type','campaign','journey','6DPTuUa','560706FvmSRm','error','has','YAML_PARSE_ERROR','39096RvGDVX','segment','318jSFGjv','33ELrSVw','skipped','not\x20a\x20','type','YAML\x20parse\x20error:\x20','line','message','warnings','815922gwgrmV','length','646541MNFwrm','24NusFFZ','object'];a218_0x9f2d=function(){return _0x1cb8d3;};return a218_0x9f2d();}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(['email','push',a218_0x5c8fbf(0x1fc)]);export{isJourneyDef};export function isCampaignDef(_0x5178b2){const _0x8f8400=a218_0x5c8fbf;if(typeof _0x5178b2!==_0x8f8400(0x203)||_0x5178b2===null)return![];const _0x3cc0cd=_0x5178b2,_0x1b693b=VALID_CAMPAIGN_TYPES[_0x8f8400(0x1f2)](_0x3cc0cd[_0x8f8400(0x1ec)]);if(_0x3cc0cd[_0x8f8400(0x1fa)]===_0x8f8400(0x1ed)&&_0x1b693b)return!![];if(_0x1b693b&&!_0x3cc0cd[_0x8f8400(0x1fa)])return!![];return![];}export function isTemplateDef(_0x442fdf){const _0x132c50=a218_0x5c8fbf;return typeof _0x442fdf===_0x132c50(0x203)&&_0x442fdf!==null&&_0x132c50(0x1fa)in _0x442fdf&&_0x442fdf['type']===_0x132c50(0x1e2);}export function isAlwaysOnCampaignDef(_0x3c0767){const _0x452519=a218_0x5c8fbf;return typeof _0x3c0767==='object'&&_0x3c0767!==null&&'type'in _0x3c0767&&_0x3c0767['type']===_0x452519(0x1e0);}export function isInBrowserMessageDef(_0x45b202){const _0x29a00c=a218_0x5c8fbf;return typeof _0x45b202===_0x29a00c(0x203)&&_0x45b202!==null&&_0x29a00c(0x1fa)in _0x45b202&&_0x45b202[_0x29a00c(0x1fa)]===_0x29a00c(0x204);}export function isValidationResult(_0x2a5778){const _0x107b16=a218_0x5c8fbf;return!(_0x107b16(0x1f8)in _0x2a5778);}export function createParseErrorResult(_0x43bd68,_0x5d0e9b,_0x31c55b,_0x1830d1,_0x22667b=a218_0x5c8fbf(0x1f5)){const _0x19a7a0=a218_0x5c8fbf;return{'filePath':_0x43bd68,'relativePath':_0x5d0e9b,'source':_0x31c55b,'result':{'valid':![],'errors':[{'level':_0x19a7a0(0x1f1),'path':'','code':_0x19a7a0(0x1f3),'message':_0x1830d1}],'warnings':[]},'fileType':_0x22667b};}export function validateYamlFile(_0x2cd35d,_0x376152,_0x33a8ea={}){const _0x54d6e9=a218_0x5c8fbf,_0x1a6a25=a218_0x480c6c[_0x54d6e9(0x207)](_0x376152,_0x2cd35d)||a218_0x480c6c['basename'](_0x2cd35d);try{const _0x34b0da=readFileSync(_0x2cd35d,_0x54d6e9(0x1e4)),_0x2df3c2=a218_0x1b73e7[_0x54d6e9(0x1e9)](_0x34b0da),_0x490a45=_0x2df3c2[_0x54d6e9(0x1e6)]();if(!_0x490a45)return createParseErrorResult(_0x2cd35d,_0x1a6a25,_0x34b0da,_0x54d6e9(0x205));let _0x58fa5b;if(isJourneyDef(_0x490a45,_0x2cd35d))_0x58fa5b=_0x54d6e9(0x1ee);else{if(isCampaignDef(_0x490a45))_0x58fa5b=_0x54d6e9(0x1ed);else{if(isAlwaysOnCampaignDef(_0x490a45))_0x58fa5b='always_on_campaign';else{if(isTemplateDef(_0x490a45))_0x58fa5b=_0x54d6e9(0x1e2);else isInBrowserMessageDef(_0x490a45)?_0x58fa5b=_0x54d6e9(0x204):_0x58fa5b=_0x54d6e9(0x1f5);}}}if(_0x33a8ea[_0x54d6e9(0x1e8)]&&_0x58fa5b!==_0x33a8ea[_0x54d6e9(0x1e8)])return{'filePath':_0x2cd35d,'relativePath':_0x1a6a25,'skipped':!![],'reason':_0x54d6e9(0x1f9)+_0x33a8ea[_0x54d6e9(0x1e8)]};const _0x2c8289={'source':_0x34b0da,'document':_0x2df3c2};let _0x2cc0d4;if(_0x58fa5b===_0x54d6e9(0x1ee))_0x2cc0d4=validateJourneyDef(_0x490a45,_0x2c8289);else{if(_0x58fa5b===_0x54d6e9(0x1ed))_0x2cc0d4=validateCampaignDef(_0x490a45,_0x2c8289);else{if(_0x58fa5b==='always_on_campaign')_0x2cc0d4=validateAlwaysOnCampaignDef(_0x490a45,_0x2c8289);else{if(_0x58fa5b===_0x54d6e9(0x1e2))_0x2cc0d4=validateTemplateDef(_0x490a45,_0x2c8289);else _0x58fa5b===_0x54d6e9(0x204)?_0x2cc0d4=validateInBrowserMessageDef(_0x490a45,_0x2c8289):_0x2cc0d4=validateSegmentDef(_0x490a45,_0x2c8289);}}}return{'filePath':_0x2cd35d,'relativePath':_0x1a6a25,'source':_0x34b0da,'result':_0x2cc0d4,'fileType':_0x58fa5b};}catch(_0x33381a){const _0x371194=_0x33381a instanceof Error?_0x33381a[_0x54d6e9(0x1fd)]:String(_0x33381a);return createParseErrorResult(_0x2cd35d,_0x1a6a25,'',_0x54d6e9(0x1fb)+_0x371194);}}export function validateYamlFiles(_0x1d53a4,_0x255296,_0x2c11ea={}){const _0x1eb28b=a218_0x5c8fbf;return _0x1d53a4[_0x1eb28b(0x1e3)](_0x4fa428=>validateYamlFile(_0x4fa428,_0x255296,_0x2c11ea));}export function calculateSummary(_0x12364e){const _0x211a9c=a218_0x5c8fbf;let _0x317557=0x0,_0x1a0071=0x0,_0x2f2a3b=0x0,_0x2325fd=0x0;for(const _0x19c0b9 of _0x12364e){if(!isValidationResult(_0x19c0b9)){_0x2325fd++;continue;}_0x19c0b9[_0x211a9c(0x1e7)][_0x211a9c(0x206)]?_0x317557++:_0x1a0071++,_0x2f2a3b+=_0x19c0b9[_0x211a9c(0x1e7)][_0x211a9c(0x1fe)][_0x211a9c(0x200)];}return{'validCount':_0x317557,'invalidCount':_0x1a0071,'warningCount':_0x2f2a3b,'skippedCount':_0x2325fd,'hasErrors':_0x1a0071>0x0};}
@@ -1 +1 @@
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');}
1
+ (function(_0x591593,_0x58ad2a){const _0x6bc0e7=a219_0x3f59,_0x38d121=_0x591593();while(!![]){try{const _0xb83475=parseInt(_0x6bc0e7(0xa8))/0x1*(parseInt(_0x6bc0e7(0x98))/0x2)+-parseInt(_0x6bc0e7(0x9c))/0x3+parseInt(_0x6bc0e7(0x9a))/0x4+parseInt(_0x6bc0e7(0xad))/0x5+-parseInt(_0x6bc0e7(0x9f))/0x6+-parseInt(_0x6bc0e7(0xbe))/0x7+parseInt(_0x6bc0e7(0xb4))/0x8*(-parseInt(_0x6bc0e7(0xaf))/0x9);if(_0xb83475===_0x58ad2a)break;else _0x38d121['push'](_0x38d121['shift']());}catch(_0x5921ff){_0x38d121['push'](_0x38d121['shift']());}}}(a219_0x4429,0x901f9));import*as a219_0x221c6a from'yaml';import a219_0x415ee1 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x22f994,_0x5bc45b,_0x420161){const _0x4b83db=a219_0x3f59;if(!_0x22f994||!_0x5bc45b)return undefined;try{let _0x3e4028=_0x22f994[_0x4b83db(0x99)](_0x420161,!![]),_0x926812=[..._0x420161];while((!_0x3e4028||typeof _0x3e4028!==_0x4b83db(0xae)||!(_0x4b83db(0xb8)in _0x3e4028)||!_0x3e4028[_0x4b83db(0xb8)])&&_0x926812[_0x4b83db(0xa5)]>0x0){_0x926812[_0x4b83db(0x96)](),_0x3e4028=_0x926812[_0x4b83db(0xa5)]>0x0?_0x22f994[_0x4b83db(0x99)](_0x926812,!![]):_0x22f994[_0x4b83db(0xb1)];}if(!_0x3e4028||typeof _0x3e4028!==_0x4b83db(0xae)||!(_0x4b83db(0xb8)in _0x3e4028)||!_0x3e4028[_0x4b83db(0xb8)])return undefined;const [_0xa643ff]=_0x3e4028[_0x4b83db(0xb8)];return offsetToLocation(_0x5bc45b,_0xa643ff);}catch{return undefined;}}function a219_0x4429(){const _0x59d417=['8GftXeE','dim','error','path','range','code','toString','errors','map','level','3638873lxylOk','Invalid\x20YAML:\x20expected\x20an\x20object','cyan','repeat','yellow','pop','YAML\x20validation\x20error\x20at\x20\x27','2wqgEuJ','getIn','526420JQbQBS','parse','1495833VdLGKU','min','data','2041728qWdEhH','join','match','column','location','red','length','message','\x20|\x20','1099619iOtYHn','padStart','line','push','safeParse','4397600QuDvwe','object','1455093QIovTT','split','contents','invalid_union','flatMap'];a219_0x4429=function(){return _0x59d417;};return a219_0x4429();}export function offsetToLocation(_0x2876ef,_0x1d6f54){let _0x4a709f=0x1,_0x3d4850=0x1;for(let _0x265e19=0x0;_0x265e19<_0x1d6f54&&_0x265e19<_0x2876ef['length'];_0x265e19++){_0x2876ef[_0x265e19]==='\x0a'?(_0x4a709f++,_0x3d4850=0x1):_0x3d4850++;}return{'line':_0x4a709f,'column':_0x3d4850,'offset':_0x1d6f54};}function a219_0x3f59(_0x489bb7,_0x5ec2f5){_0x489bb7=_0x489bb7-0x92;const _0x44293b=a219_0x4429();let _0x3f5982=_0x44293b[_0x489bb7];return _0x3f5982;}export function pathToArray(_0x25e475){const _0x53e3ce=a219_0x3f59;if(!_0x25e475)return[];return _0x25e475['split']('.')[_0x53e3ce(0xb3)](_0x57a96f=>{const _0x42f0ad=_0x53e3ce,_0xf1e7e8=_0x57a96f[_0x42f0ad(0xa1)](/^(\w+)\[(\d+)\]$/);if(_0xf1e7e8)return[_0xf1e7e8[0x1],parseInt(_0xf1e7e8[0x2],0xa)];return[_0x57a96f];});}export function formatZodPath(_0x11e644){let _0x161de3='';for(const _0x2765b7 of _0x11e644){if(typeof _0x2765b7==='number')_0x161de3+='['+_0x2765b7+']';else{const _0x445b20=String(_0x2765b7);_0x161de3+=_0x161de3?'.'+_0x445b20:_0x445b20;}}return _0x161de3;}export function flattenZodIssues(_0x5dabe1){const _0x129bf7=a219_0x3f59,_0x4c0eb4=[];for(const _0x28d656 of _0x5dabe1){if(_0x28d656[_0x129bf7(0xb9)]===_0x129bf7(0xb2)&&_0x129bf7(0xbb)in _0x28d656){const _0x5df2c7=_0x28d656['errors'];let _0x350621=_0x5df2c7[0x0]||[];for(const _0x4c1d5f of _0x5df2c7){_0x4c1d5f[_0x129bf7(0xa5)]<_0x350621[_0x129bf7(0xa5)]&&(_0x350621=_0x4c1d5f);}const _0x4c3a21=_0x350621[_0x129bf7(0xbc)](_0x325082=>({..._0x325082,'path':[..._0x28d656[_0x129bf7(0xb7)],..._0x325082[_0x129bf7(0xb7)]]}));_0x4c0eb4['push'](...flattenZodIssues(_0x4c3a21));}else _0x4c0eb4[_0x129bf7(0xab)](_0x28d656);}return _0x4c0eb4;}export function safeParseYaml(_0x575975,_0x2a6fb6){const _0x1dffd6=a219_0x3f59,_0x1e1c32=a219_0x221c6a[_0x1dffd6(0x9b)](_0x575975);if(!_0x1e1c32||typeof _0x1e1c32!=='object')throw new Error(_0x1dffd6(0x92));const _0x143cf8=_0x2a6fb6[_0x1dffd6(0xac)](_0x1e1c32);if(!_0x143cf8['success']){const _0x3969db=_0x143cf8['error']['issues'][0x0],_0x34221f=formatZodPath(_0x3969db[_0x1dffd6(0xb7)]);throw new Error(_0x34221f?_0x1dffd6(0x97)+_0x34221f+'\x27:\x20'+_0x3969db[_0x1dffd6(0xa6)]:'YAML\x20validation\x20error:\x20'+_0x3969db[_0x1dffd6(0xa6)]);}return _0x143cf8[_0x1dffd6(0x9e)];}export function formatIssueWithContext(_0xf5f52d,_0x4ca3bc,_0x4e293f){const _0xf3e28a=a219_0x3f59,_0x146506=[],_0x1a0bcb=_0xf5f52d[_0xf3e28a(0xbd)]===_0xf3e28a(0xb6),_0x4b3bf8=_0x1a0bcb?a219_0x415ee1[_0xf3e28a(0xa4)]:a219_0x415ee1['yellow'],_0x2dcdad=_0x1a0bcb?a219_0x415ee1[_0xf3e28a(0xa4)]:a219_0x415ee1[_0xf3e28a(0x95)],_0x7cc535=_0x4e293f?a219_0x415ee1[_0xf3e28a(0x93)](_0x4e293f+':'):'';if(_0xf5f52d[_0xf3e28a(0xa3)]){const _0x35fc7c=a219_0x415ee1[_0xf3e28a(0x93)](_0xf5f52d[_0xf3e28a(0xa3)][_0xf3e28a(0xaa)]+':'+_0xf5f52d[_0xf3e28a(0xa3)][_0xf3e28a(0xa2)]);_0x146506[_0xf3e28a(0xab)](''+_0x7cc535+_0x35fc7c+':\x20'+_0x4b3bf8(_0xf5f52d[_0xf3e28a(0xbd)])+'\x20'+_0x2dcdad('['+_0xf5f52d[_0xf3e28a(0xb9)]+']'));}else _0x146506['push'](''+_0x7cc535+a219_0x415ee1['dim'](_0xf5f52d[_0xf3e28a(0xb7)])+':\x20'+_0x4b3bf8(_0xf5f52d[_0xf3e28a(0xbd)])+'\x20'+_0x2dcdad('['+_0xf5f52d[_0xf3e28a(0xb9)]+']'));_0x146506['push'](_0xf5f52d[_0xf3e28a(0xa6)]);if(_0xf5f52d[_0xf3e28a(0xa3)]&&_0x4ca3bc){const _0x5b106c=_0x4ca3bc[_0xf3e28a(0xb0)]('\x0a'),{line:_0x9de5f2,column:_0x3245fb}=_0xf5f52d[_0xf3e28a(0xa3)],_0x54ff5a=Math['max'](0x1,_0x9de5f2-0x1),_0x26e4ba=Math[_0xf3e28a(0x9d)](_0x5b106c[_0xf3e28a(0xa5)],_0x9de5f2+0x1);_0x146506[_0xf3e28a(0xab)]('');for(let _0x4122dc=_0x54ff5a;_0x4122dc<=_0x26e4ba;_0x4122dc++){const _0x33b1d8=_0x5b106c[_0x4122dc-0x1]||'',_0x4d1b27=a219_0x415ee1[_0xf3e28a(0xb5)](_0x4122dc[_0xf3e28a(0xba)]()[_0xf3e28a(0xa9)](0x4)),_0x52b791=a219_0x415ee1['dim'](_0xf3e28a(0xa7));if(_0x4122dc===_0x9de5f2){_0x146506[_0xf3e28a(0xab)]('\x20\x20'+_0x4d1b27+_0x52b791+_0x4b3bf8(_0x33b1d8));const _0x3b14a8='\x20'[_0xf3e28a(0x94)](0x4+0x3+_0x3245fb-0x1);_0x146506[_0xf3e28a(0xab)]('\x20\x20'+_0x3b14a8+_0x4b3bf8('^'));}else _0x146506[_0xf3e28a(0xab)]('\x20\x20'+_0x4d1b27+_0x52b791+a219_0x415ee1[_0xf3e28a(0xb5)](_0x33b1d8));}}return _0x146506[_0xf3e28a(0xa0)]('\x0a');}export function formatValidationResult(_0x274223,_0x20c28d,_0x559ec0){const _0x3d1c7c=a219_0x3f59,_0x1f513b=[];for(const _0x509ae3 of _0x274223['errors']){_0x1f513b[_0x3d1c7c(0xab)](formatIssueWithContext(_0x509ae3,_0x20c28d,_0x559ec0)),_0x1f513b[_0x3d1c7c(0xab)]('');}for(const _0x5761be of _0x274223['warnings']){_0x1f513b[_0x3d1c7c(0xab)](formatIssueWithContext(_0x5761be,_0x20c28d,_0x559ec0)),_0x1f513b['push']('');}return _0x1f513b[_0x3d1c7c(0xa0)]('\x0a');}