@treasuredata/tdx 2026.9.2 → 2026.9.3

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 (291) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/ai-usage-command-base.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/auth-command.js +1 -1
  13. package/dist/commands/cas-command.js +1 -1
  14. package/dist/commands/cas-segment-command.js +1 -1
  15. package/dist/commands/chat-command.js +1 -1
  16. package/dist/commands/claude-command.d.ts +11 -0
  17. package/dist/commands/claude-command.d.ts.map +1 -1
  18. package/dist/commands/claude-command.js +1 -1
  19. package/dist/commands/claude-command.js.map +1 -1
  20. package/dist/commands/claude-statusline-command.js +1 -1
  21. package/dist/commands/claude-usage-command.js +1 -1
  22. package/dist/commands/codex-command.js +1 -1
  23. package/dist/commands/command.js +1 -1
  24. package/dist/commands/connection-command.js +1 -1
  25. package/dist/commands/databases.js +1 -1
  26. package/dist/commands/delivery-command.js +1 -1
  27. package/dist/commands/describe.js +1 -1
  28. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  29. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  30. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  31. package/dist/commands/engage-campaign-pull-command.js +1 -1
  32. package/dist/commands/engage-campaign-push-command.js +1 -1
  33. package/dist/commands/engage-campaign-readiness-command.js +1 -1
  34. package/dist/commands/engage-campaign-validate-command.js +1 -1
  35. package/dist/commands/engage-command.js +1 -1
  36. package/dist/commands/engage-in-browser-message-command.js +1 -1
  37. package/dist/commands/engage-landing-page-command.js +1 -1
  38. package/dist/commands/engage-template-pull-command.js +1 -1
  39. package/dist/commands/engage-template-push-command.js +1 -1
  40. package/dist/commands/engage-template-validate-command.js +1 -1
  41. package/dist/commands/engage-workspace-assignment-command.js +1 -1
  42. package/dist/commands/job-command.js +1 -1
  43. package/dist/commands/journey-command.js +1 -1
  44. package/dist/commands/journey-validate-command.js +1 -1
  45. package/dist/commands/llm-command.js +1 -1
  46. package/dist/commands/mcp-command.js +1 -1
  47. package/dist/commands/opencode-command.js +1 -1
  48. package/dist/commands/opencode-usage-command.js +1 -1
  49. package/dist/commands/p13n-command.js +1 -1
  50. package/dist/commands/parent-segment-command.js +1 -1
  51. package/dist/commands/policy-command.js +1 -1
  52. package/dist/commands/profile-command.js +1 -1
  53. package/dist/commands/profiles-command.js +1 -1
  54. package/dist/commands/query-command.js +1 -1
  55. package/dist/commands/schedule-command.js +1 -1
  56. package/dist/commands/segment-command.js +1 -1
  57. package/dist/commands/segment-create-command.js +1 -1
  58. package/dist/commands/segment-fields-command.js +1 -1
  59. package/dist/commands/segment-move-command.js +1 -1
  60. package/dist/commands/segment-pull-command.js +1 -1
  61. package/dist/commands/segment-push-command.js +1 -1
  62. package/dist/commands/segment-update-command.js +1 -1
  63. package/dist/commands/segment-use-command.js +1 -1
  64. package/dist/commands/segment-validate-command.js +1 -1
  65. package/dist/commands/segments.js +1 -1
  66. package/dist/commands/show.js +1 -1
  67. package/dist/commands/status-command.js +1 -1
  68. package/dist/commands/table-deleted.js +1 -1
  69. package/dist/commands/tables.js +1 -1
  70. package/dist/commands/unset-command.js +1 -1
  71. package/dist/commands/upgrade-command.js +1 -1
  72. package/dist/commands/use-command.js +1 -1
  73. package/dist/commands/user-command.js +1 -1
  74. package/dist/commands/work-command.js +1 -1
  75. package/dist/commands/workflow-command.js +1 -1
  76. package/dist/core/auth.js +1 -1
  77. package/dist/core/command-output.js +1 -1
  78. package/dist/core/config.js +1 -1
  79. package/dist/core/connection-cache.js +1 -1
  80. package/dist/core/constants.js +1 -1
  81. package/dist/core/credential-cache.js +1 -1
  82. package/dist/core/global-context.js +1 -1
  83. package/dist/core/keychain.js +1 -1
  84. package/dist/core/oauth-keychain.js +1 -1
  85. package/dist/core/oauth.js +1 -1
  86. package/dist/core/profile.js +1 -1
  87. package/dist/core/project-config.js +1 -1
  88. package/dist/core/session.js +1 -1
  89. package/dist/core/site-mismatch.js +1 -1
  90. package/dist/core/user-cache.js +1 -1
  91. package/dist/core/version.js +1 -1
  92. package/dist/index.js +1 -1
  93. package/dist/mcp/server.js +1 -1
  94. package/dist/mcp/tools/index.js +1 -1
  95. package/dist/mcp/tools/tdx-run.js +1 -1
  96. package/dist/mcp/tools/tdx-search.js +1 -1
  97. package/dist/mcp/tools/work-create-item.js +1 -1
  98. package/dist/mcp/utils.js +1 -1
  99. package/dist/proxy/claude-usage-tracker.d.ts +1 -0
  100. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
  101. package/dist/proxy/claude-usage-tracker.js +1 -1
  102. package/dist/proxy/claude-usage-tracker.js.map +1 -1
  103. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  104. package/dist/proxy/passthrough-server.js +1 -1
  105. package/dist/proxy/passthrough-server.js.map +1 -1
  106. package/dist/proxy/sse-usage-parser.d.ts +2 -0
  107. package/dist/proxy/sse-usage-parser.d.ts.map +1 -1
  108. package/dist/proxy/sse-usage-parser.js +1 -1
  109. package/dist/proxy/sse-usage-parser.js.map +1 -1
  110. package/dist/sdk/agent/agent-config.js +1 -1
  111. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  112. package/dist/sdk/agent/agent-yaml.js +1 -1
  113. package/dist/sdk/agent/test/evaluator.js +1 -1
  114. package/dist/sdk/agent/test/executor.js +1 -1
  115. package/dist/sdk/agent/test/index.js +1 -1
  116. package/dist/sdk/agent/test/output.js +1 -1
  117. package/dist/sdk/agent/test/parser.js +1 -1
  118. package/dist/sdk/agent/tool-target-registry.js +1 -1
  119. package/dist/sdk/api.js +1 -1
  120. package/dist/sdk/auth-token.js +1 -1
  121. package/dist/sdk/cas/cas-api-client.js +1 -1
  122. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  123. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  124. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  125. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  126. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  127. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  128. package/dist/sdk/cas/index.js +1 -1
  129. package/dist/sdk/cas/pull-workflow.js +1 -1
  130. package/dist/sdk/cas/push-workflow.js +1 -1
  131. package/dist/sdk/cas/validate-files.js +1 -1
  132. package/dist/sdk/client/cdp-api-client.js +1 -1
  133. package/dist/sdk/client/delivery-api-client.js +1 -1
  134. package/dist/sdk/client/endpoints.js +1 -1
  135. package/dist/sdk/client/engage-api-client.js +1 -1
  136. package/dist/sdk/client/http-client.js +1 -1
  137. package/dist/sdk/client/llm-api-client.js +1 -1
  138. package/dist/sdk/client/oauth-refresh.js +1 -1
  139. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  140. package/dist/sdk/client/rate-limiter.js +1 -1
  141. package/dist/sdk/client/td-api-client.js +1 -1
  142. package/dist/sdk/client/trino-api-client.js +1 -1
  143. package/dist/sdk/client/workflow-client.js +1 -1
  144. package/dist/sdk/connection-validator.js +1 -1
  145. package/dist/sdk/connection.js +1 -1
  146. package/dist/sdk/delivery.js +1 -1
  147. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  148. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  149. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  150. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  151. package/dist/sdk/engage/campaign-pull.js +1 -1
  152. package/dist/sdk/engage/campaign-push.js +1 -1
  153. package/dist/sdk/engage/campaign-readiness-workflow.js +1 -1
  154. package/dist/sdk/engage/campaign-readiness.js +1 -1
  155. package/dist/sdk/engage/campaign-validator.js +1 -1
  156. package/dist/sdk/engage/campaign-yaml.js +1 -1
  157. package/dist/sdk/engage/in-browser-message-pull.js +1 -1
  158. package/dist/sdk/engage/in-browser-message-push.js +1 -1
  159. package/dist/sdk/engage/in-browser-message-validator.js +1 -1
  160. package/dist/sdk/engage/in-browser-message-yaml.js +1 -1
  161. package/dist/sdk/engage/landing-page-init.js +1 -1
  162. package/dist/sdk/engage/landing-page-public-asset.js +1 -1
  163. package/dist/sdk/engage/landing-page-pull.js +1 -1
  164. package/dist/sdk/engage/landing-page-push.js +1 -1
  165. package/dist/sdk/engage/landing-page-static-site.js +1 -1
  166. package/dist/sdk/engage/landing-page-validator.js +1 -1
  167. package/dist/sdk/engage/landing-page-workspace.js +1 -1
  168. package/dist/sdk/engage/landing-page-yaml.js +1 -1
  169. package/dist/sdk/engage/list-campaign-schema.js +1 -1
  170. package/dist/sdk/engage/list-campaign-yaml.js +1 -1
  171. package/dist/sdk/engage/template-pull.js +1 -1
  172. package/dist/sdk/engage/template-push.js +1 -1
  173. package/dist/sdk/engage/template-validator.js +1 -1
  174. package/dist/sdk/engage/template-yaml.js +1 -1
  175. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  176. package/dist/sdk/engage/types/campaign-def.js +1 -1
  177. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  178. package/dist/sdk/engage/types/in-browser-message-schema.js +1 -1
  179. package/dist/sdk/engage/types/landing-page-schema.js +1 -1
  180. package/dist/sdk/engage/types/template-schema.js +1 -1
  181. package/dist/sdk/engage/workspace-assignments.js +1 -1
  182. package/dist/sdk/engage.js +1 -1
  183. package/dist/sdk/errors.js +1 -1
  184. package/dist/sdk/index.js +1 -1
  185. package/dist/sdk/io/index.js +1 -1
  186. package/dist/sdk/io/node-filesystem.js +1 -1
  187. package/dist/sdk/job.js +1 -1
  188. package/dist/sdk/journey.js +1 -1
  189. package/dist/sdk/llm/chat-cache.js +1 -1
  190. package/dist/sdk/llm/index.js +1 -1
  191. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  192. package/dist/sdk/llm/model-factors.d.ts +5 -3
  193. package/dist/sdk/llm/model-factors.d.ts.map +1 -1
  194. package/dist/sdk/llm/model-factors.js +1 -1
  195. package/dist/sdk/llm/model-factors.js.map +1 -1
  196. package/dist/sdk/llm/user-settings.js +1 -1
  197. package/dist/sdk/p13n-studio-errors.js +1 -1
  198. package/dist/sdk/p13n-studio.js +1 -1
  199. package/dist/sdk/personalization.js +1 -1
  200. package/dist/sdk/policy.js +1 -1
  201. package/dist/sdk/query/deleted-table-validation.js +1 -1
  202. package/dist/sdk/query/index.js +1 -1
  203. package/dist/sdk/query/sql-parser.js +1 -1
  204. package/dist/sdk/realtime.js +1 -1
  205. package/dist/sdk/schedule.js +1 -1
  206. package/dist/sdk/segment/audience-context.js +1 -1
  207. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  208. package/dist/sdk/segment/fields-display.js +1 -1
  209. package/dist/sdk/segment/file-discovery.js +1 -1
  210. package/dist/sdk/segment/journey-utils.js +1 -1
  211. package/dist/sdk/segment/journey-validator.js +1 -1
  212. package/dist/sdk/segment/journey-yaml.js +1 -1
  213. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  214. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  215. package/dist/sdk/segment/pull-workflow.js +1 -1
  216. package/dist/sdk/segment/push-recovery.js +1 -1
  217. package/dist/sdk/segment/push-workflow.js +1 -1
  218. package/dist/sdk/segment/resolution-context.js +1 -1
  219. package/dist/sdk/segment/segment-path-parser.js +1 -1
  220. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  221. package/dist/sdk/segment/segment-validator.js +1 -1
  222. package/dist/sdk/segment/target-resolution.js +1 -1
  223. package/dist/sdk/segment/tdx-config.js +1 -1
  224. package/dist/sdk/segment/types/activation-schema.js +1 -1
  225. package/dist/sdk/segment/types/journey-def.js +1 -1
  226. package/dist/sdk/segment/types/journey-schema.js +1 -1
  227. package/dist/sdk/segment/types/segment-def.js +1 -1
  228. package/dist/sdk/segment/types/segment-schema.js +1 -1
  229. package/dist/sdk/segment/validate-files.js +1 -1
  230. package/dist/sdk/segment/yaml-validator.js +1 -1
  231. package/dist/sdk/segment.js +1 -1
  232. package/dist/sdk/types/index.js +1 -1
  233. package/dist/sdk/types/progress.js +1 -1
  234. package/dist/sdk/types/workspace.js +1 -1
  235. package/dist/sdk/user.js +1 -1
  236. package/dist/sdk/util/format-detector.js +1 -1
  237. package/dist/sdk/util/formatters.js +1 -1
  238. package/dist/sdk/util/index.js +1 -1
  239. package/dist/sdk/util/paginate.js +1 -1
  240. package/dist/sdk/util/tree-formatter.js +1 -1
  241. package/dist/sdk/util/tree-search.js +1 -1
  242. package/dist/sdk/workflow/archive-validation.js +1 -1
  243. package/dist/sdk/workflow/clone-workflow.js +1 -1
  244. package/dist/sdk/workflow/index.js +1 -1
  245. package/dist/sdk/workflow/pull-workflow.js +1 -1
  246. package/dist/sdk/workflow/push-workflow.js +1 -1
  247. package/dist/sdk/workflow/task-graph.js +1 -1
  248. package/dist/sdk/workflow/tdx-config.js +1 -1
  249. package/dist/sdk/workflow/workflow-utils.js +1 -1
  250. package/dist/sdk/workspace/access-tracker.js +1 -1
  251. package/dist/sdk/workspace/frontmatter.js +1 -1
  252. package/dist/sdk/workspace/git.js +1 -1
  253. package/dist/sdk/workspace/index.js +1 -1
  254. package/dist/sdk/workspace/templates.js +1 -1
  255. package/dist/sdk/workspace/weekly.js +1 -1
  256. package/dist/sdk/workspace/wikilinks.js +1 -1
  257. package/dist/test-utils/command-runner.js +1 -1
  258. package/dist/test-utils/factories.js +1 -1
  259. package/dist/test-utils/fixtures.js +1 -1
  260. package/dist/test-utils/http-mock.js +1 -1
  261. package/dist/test-utils/index.js +1 -1
  262. package/dist/utils/async.js +1 -1
  263. package/dist/utils/claude-code-state.js +1 -1
  264. package/dist/utils/colors.js +1 -1
  265. package/dist/utils/diff.js +1 -1
  266. package/dist/utils/file-permissions.js +1 -1
  267. package/dist/utils/file-reader.js +1 -1
  268. package/dist/utils/github-releases.js +1 -1
  269. package/dist/utils/global-cache.js +1 -1
  270. package/dist/utils/json-loader.js +1 -1
  271. package/dist/utils/local-cache.js +1 -1
  272. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  273. package/dist/utils/logger/formatters/index.js +1 -1
  274. package/dist/utils/logger/handlers/console-handler.js +1 -1
  275. package/dist/utils/logger/handlers/file-handler.js +1 -1
  276. package/dist/utils/logger/handlers/index.js +1 -1
  277. package/dist/utils/logger/handlers/null-handler.js +1 -1
  278. package/dist/utils/logger/index.js +1 -1
  279. package/dist/utils/logger/logger.js +1 -1
  280. package/dist/utils/logger/types.js +1 -1
  281. package/dist/utils/option-validation.js +1 -1
  282. package/dist/utils/process.js +1 -1
  283. package/dist/utils/prompt.js +1 -1
  284. package/dist/utils/proxy-fetch.js +1 -1
  285. package/dist/utils/spinner.js +1 -1
  286. package/dist/utils/sse-parser.js +1 -1
  287. package/dist/utils/string-utils.js +1 -1
  288. package/dist/utils/table-ref-parser.js +1 -1
  289. package/dist/utils/tdx-logger.js +1 -1
  290. package/dist/utils/version-check.js +1 -1
  291. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x127233,_0x19238d){const _0x4a34c8=a208_0x1382,_0x375424=_0x127233();while(!![]){try{const _0x14d492=parseInt(_0x4a34c8(0x1a1))/0x1+-parseInt(_0x4a34c8(0x1b1))/0x2+-parseInt(_0x4a34c8(0x1ad))/0x3+-parseInt(_0x4a34c8(0x1bf))/0x4+-parseInt(_0x4a34c8(0x19b))/0x5+-parseInt(_0x4a34c8(0x1aa))/0x6*(parseInt(_0x4a34c8(0x18f))/0x7)+-parseInt(_0x4a34c8(0x19c))/0x8*(-parseInt(_0x4a34c8(0x1bb))/0x9);if(_0x14d492===_0x19238d)break;else _0x375424['push'](_0x375424['shift']());}catch(_0x2caac6){_0x375424['push'](_0x375424['shift']());}}}(a208_0x3e6a,0x4e79d));import a208_0x3cbb15 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x58713e){const _0x27f7be=a208_0x1382;return _0x58713e[_0x27f7be(0x1ab)]!==_0x27f7be(0x190);}function a208_0x1382(_0x383a40,_0x42fbbf){_0x383a40=_0x383a40-0x187;const _0x3e6a08=a208_0x3e6a();let _0x13823=_0x3e6a08[_0x383a40];return _0x13823;}export function isScopedResolution(_0x10d4ca){const _0x3ed12c=a208_0x1382;return _0x10d4ca['type']===_0x3ed12c(0x187)||_0x10d4ca[_0x3ed12c(0x1ab)]===_0x3ed12c(0x1b8)||_0x10d4ca[_0x3ed12c(0x1ab)]===_0x3ed12c(0x1ae);}function a208_0x3e6a(){const _0x39ac2d=['file_not_found','string','match','segment','Not\x20a\x20YAML\x20file:\x20','File\x20not\x20found','join','6QjSfBO','type','isDirectory','1690680geexaI','context','root','No\x20tdx.json\x20found','620714AHWWnq','segmentName','parent_segment','File\x20not\x20found:\x20','journey','trim','parse','file','readFile','tdx.json','2885319IwSgCH','parentSegment','resolve','scopedFolderPath','1818848xLunWk','directory','resourceType','invalid_yaml','exists','replace','message','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','dirname','1770755xDidTE','error','startsWith','isScoped','configDir','isFile','Parent\x20segment\x20not\x20specified','no_parent','extname','folderPath','parent_name','stat','1212335SlPMYT','40HQhlqt','includes','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','no_config','No\x20tdx.json\x20found\x20for\x20file:\x20','542543huXVgf','basename'];a208_0x3e6a=function(){return _0x39ac2d;};return a208_0x3e6a();}export function getScopedDetails(_0x5066dc){const _0x43c1a7=a208_0x1382;if(isScopedResolution(_0x5066dc))return{'isScoped':_0x5066dc[_0x43c1a7(0x192)],'scopedFolderPath':_0x5066dc[_0x43c1a7(0x1be)]};return undefined;}async function findTdxConfigAsync(_0x167b83,_0x4541a1){const _0x37abba=a208_0x1382;let _0x595ca4=a208_0x3cbb15[_0x37abba(0x1bd)](_0x167b83);const _0x2c19da=a208_0x3cbb15[_0x37abba(0x1b7)](_0x595ca4)[_0x37abba(0x1af)];while(_0x595ca4!==_0x2c19da){const _0x50de2e=a208_0x3cbb15[_0x37abba(0x1a9)](_0x595ca4,_0x37abba(0x1ba));if(await _0x4541a1[_0x37abba(0x18a)](_0x50de2e))try{const _0x1dace1=await _0x4541a1[_0x37abba(0x1b9)](_0x50de2e),_0x322afc=JSON[_0x37abba(0x1b7)](_0x1dace1);if(_0x322afc[_0x37abba(0x1b3)]&&typeof _0x322afc['parent_segment']===_0x37abba(0x1a4))return{'configPath':_0x50de2e,'configDir':_0x595ca4,'parentSegment':_0x322afc[_0x37abba(0x1b3)]};}catch{}_0x595ca4=a208_0x3cbb15['dirname'](_0x595ca4);}return null;}function calculateScopedPath(_0x7ba3e9,_0x55edd4){const _0x415eb1=a208_0x1382,_0x2fa763=a208_0x3cbb15['relative'](_0x55edd4,_0x7ba3e9),_0x1eea39=_0x2fa763!==''&&_0x2fa763!=='.'&&!_0x2fa763[_0x415eb1(0x191)]('..');return{'isScoped':_0x1eea39,'scopedFolderPath':_0x1eea39?_0x2fa763[_0x415eb1(0x18b)](/\\/g,'/'):''};}export async function resolveTarget(_0x39cf73){const _0x2bbc90=a208_0x1382,{arg:_0xbdf751,contextParent:_0x461864,cwd:cwd=process['cwd'](),fs:fs=nodeFileSystem}=_0x39cf73;if(_0xbdf751&&isYamlFilePath(_0xbdf751))try{const _0xe84bc=await resolveYamlFilePath(_0xbdf751,fs),_0x209ed3=a208_0x3cbb15[_0x2bbc90(0x1bd)](_0xbdf751),_0x3611fd=a208_0x3cbb15[_0x2bbc90(0x18e)](_0x209ed3),_0x3c8110=await findTdxConfigAsync(_0x3611fd,fs);if(!_0x3c8110){if(_0x461864){const _0x5f0b9e=a208_0x3cbb15[_0x2bbc90(0x18e)](_0x209ed3);return{'type':_0x2bbc90(0x1b8),'parentName':_0x461864,'targetDir':_0x5f0b9e,'configRoot':_0x5f0b9e,'filePath':_0x209ed3,'resourceName':_0xe84bc[_0x2bbc90(0x1b2)],'folderPath':_0xe84bc[_0x2bbc90(0x198)],'resourceType':_0xe84bc[_0x2bbc90(0x188)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x2bbc90(0x19f),'message':_0x2bbc90(0x1a0)+_0xbdf751,'arg':_0xbdf751,'helpText':_0x2bbc90(0x19e)};}const _0x5f51d3=calculateScopedPath(_0x3611fd,_0x3c8110['configDir']);return{'type':_0x2bbc90(0x1b8),'parentName':_0x3c8110[_0x2bbc90(0x1bc)],'targetDir':_0x3c8110['configDir'],'configRoot':_0x3c8110['configDir'],'filePath':_0x209ed3,'resourceName':_0xe84bc[_0x2bbc90(0x1b2)],'folderPath':_0xe84bc[_0x2bbc90(0x198)],'resourceType':_0xe84bc[_0x2bbc90(0x188)],'isScoped':_0x5f51d3['isScoped'],'scopedFolderPath':_0x5f51d3[_0x2bbc90(0x1be)]};}catch(_0xd7047e){const _0x1c6cdf=_0xd7047e instanceof Error?_0xd7047e[_0x2bbc90(0x18c)]:String(_0xd7047e);if(_0x1c6cdf[_0x2bbc90(0x19d)](_0x2bbc90(0x1a8)))return{'type':_0x2bbc90(0x190),'errorCode':_0x2bbc90(0x1a3),'message':_0x2bbc90(0x1b4)+_0xbdf751,'arg':_0xbdf751};if(_0x1c6cdf['includes'](_0x2bbc90(0x1b0))){if(_0x461864){const _0x160637=a208_0x3cbb15['resolve'](_0xbdf751);if(await fs[_0x2bbc90(0x18a)](_0x160637)){const _0x2738b3=a208_0x3cbb15[_0x2bbc90(0x18e)](_0x160637),_0x561d15=await fs[_0x2bbc90(0x1b9)](_0x160637),_0x531865=_0x561d15[_0x2bbc90(0x1a5)](/^name:\s*["']?([^"'\n]+)["']?/m),_0xc0e818=_0x561d15['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x3255fd=_0x531865?_0x531865[0x1][_0x2bbc90(0x1b6)]():a208_0x3cbb15[_0x2bbc90(0x1a2)](_0xbdf751,a208_0x3cbb15[_0x2bbc90(0x197)](_0xbdf751)),_0x2ebfbe=_0xc0e818&&_0xc0e818[0x1]['trim']()===_0x2bbc90(0x1b5)?_0x2bbc90(0x1b5):_0x2bbc90(0x1a6);return{'type':_0x2bbc90(0x1b8),'parentName':_0x461864,'targetDir':_0x2738b3,'configRoot':_0x2738b3,'filePath':_0x160637,'resourceName':_0x3255fd,'folderPath':'','resourceType':_0x2ebfbe,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x2bbc90(0x19f),'message':_0x2bbc90(0x1a0)+_0xbdf751,'arg':_0xbdf751,'helpText':_0x2bbc90(0x19e)};}return{'type':'error','errorCode':'invalid_yaml','message':_0x1c6cdf,'arg':_0xbdf751};}if(_0xbdf751){const _0x534be0=a208_0x3cbb15[_0x2bbc90(0x1bd)](cwd,_0xbdf751);let _0x240931=null;try{_0x240931=await fs[_0x2bbc90(0x19a)](_0x534be0);}catch{}if(_0x240931?.[_0x2bbc90(0x1ac)]()){const _0x32cfe9=await findTdxConfigAsync(_0x534be0,fs);if(_0x32cfe9){const _0x1f2157=calculateScopedPath(_0x534be0,_0x32cfe9[_0x2bbc90(0x193)]);return{'type':_0x2bbc90(0x187),'parentName':_0x32cfe9[_0x2bbc90(0x1bc)],'targetDir':_0x534be0,'configRoot':_0x32cfe9[_0x2bbc90(0x193)],'isScoped':_0x1f2157[_0x2bbc90(0x192)],'scopedFolderPath':_0x1f2157[_0x2bbc90(0x1be)]};}if(_0x461864)return{'type':_0x2bbc90(0x187),'parentName':_0x461864,'targetDir':_0x534be0,'configRoot':_0x534be0,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x2bbc90(0x19f),'message':_0x2bbc90(0x18d)+_0xbdf751,'arg':_0xbdf751,'helpText':_0x2bbc90(0x19e)};}if(_0x240931?.[_0x2bbc90(0x194)]())return{'type':_0x2bbc90(0x190),'errorCode':_0x2bbc90(0x189),'message':_0x2bbc90(0x1a7)+_0xbdf751,'arg':_0xbdf751,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x4fbcfc=sanitizeFileName(_0xbdf751),_0x2fad45=getSegmentRootDir(_0x4fbcfc,cwd);return{'type':_0x2bbc90(0x199),'parentName':_0xbdf751,'targetDir':_0x2fad45,'configRoot':_0x2fad45};}const _0x4f6e79=await findTdxConfigAsync(cwd,fs);if(_0x4f6e79){const _0x4dac35=calculateScopedPath(cwd,_0x4f6e79[_0x2bbc90(0x193)]);return{'type':'context','parentName':_0x4f6e79[_0x2bbc90(0x1bc)],'targetDir':cwd,'configRoot':_0x4f6e79[_0x2bbc90(0x193)],'isScoped':_0x4dac35[_0x2bbc90(0x192)],'scopedFolderPath':_0x4dac35[_0x2bbc90(0x1be)]};}if(_0x461864){const _0x295292=sanitizeFileName(_0x461864),_0x2805bd=getSegmentRootDir(_0x295292,cwd);return{'type':_0x2bbc90(0x1ae),'parentName':_0x461864,'targetDir':_0x2805bd,'configRoot':_0x2805bd,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x2bbc90(0x190),'errorCode':_0x2bbc90(0x196),'message':_0x2bbc90(0x195),'helpText':'Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure'};}
1
+ (function(_0x153103,_0x5f372c){const _0x3ffbd6=a208_0x5839,_0x1dc150=_0x153103();while(!![]){try{const _0x135354=-parseInt(_0x3ffbd6(0xac))/0x1+-parseInt(_0x3ffbd6(0xa7))/0x2+-parseInt(_0x3ffbd6(0x9c))/0x3+-parseInt(_0x3ffbd6(0x92))/0x4+-parseInt(_0x3ffbd6(0xa1))/0x5*(parseInt(_0x3ffbd6(0x85))/0x6)+parseInt(_0x3ffbd6(0x9d))/0x7*(parseInt(_0x3ffbd6(0xa5))/0x8)+parseInt(_0x3ffbd6(0x8e))/0x9;if(_0x135354===_0x5f372c)break;else _0x1dc150['push'](_0x1dc150['shift']());}catch(_0x436c5d){_0x1dc150['push'](_0x1dc150['shift']());}}}(a208_0x6bd1,0x6fe98));import a208_0x342d8a from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a208_0x5839(_0x3d21b7,_0x5c9c28){_0x3d21b7=_0x3d21b7-0x7b;const _0x6bd133=a208_0x6bd1();let _0x58393e=_0x6bd133[_0x3d21b7];return _0x58393e;}import{nodeFileSystem}from'../io/node-filesystem.js';function a208_0x6bd1(){const _0x5086c0=['segment','type','resourceType','208934oGhWSN','No\x20tdx.json\x20found\x20for\x20file:\x20','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','includes','exists','string','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','isFile','extname','File\x20not\x20found:\x20','journey','folderPath','scopedFolderPath','resolve','Not\x20a\x20YAML\x20file:\x20','no_parent','isScoped','6jdWNJr','stat','error','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','dirname','replace','basename','match','Parent\x20segment\x20not\x20specified','14695677kQkeQj','isDirectory','parent_segment','file','2557952gYxpjP','invalid_yaml','cwd','parse','parent_name','readFile','message','no_config','trim','relative','1652520huNvXM','3096422CjmKiN','startsWith','join','context','2204465UdgeDn','directory','No\x20tdx.json\x20found','configDir','16lkJJsd','root','437996AltXjx','File\x20not\x20found'];a208_0x6bd1=function(){return _0x5086c0;};return a208_0x6bd1();}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x51c18e){const _0x42b1f3=a208_0x5839;return _0x51c18e[_0x42b1f3(0xaa)]!==_0x42b1f3(0x87);}export function isScopedResolution(_0x477eaf){const _0x558175=a208_0x5839;return _0x477eaf[_0x558175(0xaa)]===_0x558175(0xa2)||_0x477eaf[_0x558175(0xaa)]==='file'||_0x477eaf[_0x558175(0xaa)]==='context';}export function getScopedDetails(_0x51e466){const _0x308b80=a208_0x5839;if(isScopedResolution(_0x51e466))return{'isScoped':_0x51e466[_0x308b80(0x84)],'scopedFolderPath':_0x51e466['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x374429,_0x5e470c){const _0x4b2239=a208_0x5839;let _0x3730ac=a208_0x342d8a[_0x4b2239(0x81)](_0x374429);const _0x1daa65=a208_0x342d8a['parse'](_0x3730ac)[_0x4b2239(0xa6)];while(_0x3730ac!==_0x1daa65){const _0x4441cf=a208_0x342d8a[_0x4b2239(0x9f)](_0x3730ac,'tdx.json');if(await _0x5e470c[_0x4b2239(0xb0)](_0x4441cf))try{const _0x5f0891=await _0x5e470c[_0x4b2239(0x97)](_0x4441cf),_0x2ef353=JSON[_0x4b2239(0x95)](_0x5f0891);if(_0x2ef353[_0x4b2239(0x90)]&&typeof _0x2ef353[_0x4b2239(0x90)]===_0x4b2239(0xb1))return{'configPath':_0x4441cf,'configDir':_0x3730ac,'parentSegment':_0x2ef353[_0x4b2239(0x90)]};}catch{}_0x3730ac=a208_0x342d8a[_0x4b2239(0x89)](_0x3730ac);}return null;}function calculateScopedPath(_0x5dee80,_0x103cc9){const _0x356f1d=a208_0x5839,_0xfe1259=a208_0x342d8a[_0x356f1d(0x9b)](_0x103cc9,_0x5dee80),_0x2b987f=_0xfe1259!==''&&_0xfe1259!=='.'&&!_0xfe1259[_0x356f1d(0x9e)]('..');return{'isScoped':_0x2b987f,'scopedFolderPath':_0x2b987f?_0xfe1259[_0x356f1d(0x8a)](/\\/g,'/'):''};}export async function resolveTarget(_0x42ecac){const _0x5973bf=a208_0x5839,{arg:_0x373dd8,contextParent:_0x4a2dfb,cwd:cwd=process[_0x5973bf(0x94)](),fs:fs=nodeFileSystem}=_0x42ecac;if(_0x373dd8&&isYamlFilePath(_0x373dd8))try{const _0x2b9f9a=await resolveYamlFilePath(_0x373dd8,fs),_0x508b09=a208_0x342d8a[_0x5973bf(0x81)](_0x373dd8),_0x28d750=a208_0x342d8a[_0x5973bf(0x89)](_0x508b09),_0x549c07=await findTdxConfigAsync(_0x28d750,fs);if(!_0x549c07){if(_0x4a2dfb){const _0xa81f7f=a208_0x342d8a['dirname'](_0x508b09);return{'type':'file','parentName':_0x4a2dfb,'targetDir':_0xa81f7f,'configRoot':_0xa81f7f,'filePath':_0x508b09,'resourceName':_0x2b9f9a['segmentName'],'folderPath':_0x2b9f9a[_0x5973bf(0x7f)],'resourceType':_0x2b9f9a['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5973bf(0x87),'errorCode':_0x5973bf(0x99),'message':_0x5973bf(0xad)+_0x373dd8,'arg':_0x373dd8,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x2cdeec=calculateScopedPath(_0x28d750,_0x549c07['configDir']);return{'type':_0x5973bf(0x91),'parentName':_0x549c07['parentSegment'],'targetDir':_0x549c07[_0x5973bf(0xa4)],'configRoot':_0x549c07[_0x5973bf(0xa4)],'filePath':_0x508b09,'resourceName':_0x2b9f9a['segmentName'],'folderPath':_0x2b9f9a[_0x5973bf(0x7f)],'resourceType':_0x2b9f9a[_0x5973bf(0xab)],'isScoped':_0x2cdeec[_0x5973bf(0x84)],'scopedFolderPath':_0x2cdeec[_0x5973bf(0x80)]};}catch(_0x5c1938){const _0x43c11f=_0x5c1938 instanceof Error?_0x5c1938[_0x5973bf(0x98)]:String(_0x5c1938);if(_0x43c11f['includes'](_0x5973bf(0xa8)))return{'type':_0x5973bf(0x87),'errorCode':'file_not_found','message':_0x5973bf(0x7d)+_0x373dd8,'arg':_0x373dd8};if(_0x43c11f[_0x5973bf(0xaf)](_0x5973bf(0xa3))){if(_0x4a2dfb){const _0x319a53=a208_0x342d8a['resolve'](_0x373dd8);if(await fs[_0x5973bf(0xb0)](_0x319a53)){const _0xc67737=a208_0x342d8a[_0x5973bf(0x89)](_0x319a53),_0x471cac=await fs['readFile'](_0x319a53),_0x1875b2=_0x471cac['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x1eb14f=_0x471cac[_0x5973bf(0x8c)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x4299dd=_0x1875b2?_0x1875b2[0x1][_0x5973bf(0x9a)]():a208_0x342d8a[_0x5973bf(0x8b)](_0x373dd8,a208_0x342d8a[_0x5973bf(0x7c)](_0x373dd8)),_0x56ee3a=_0x1eb14f&&_0x1eb14f[0x1][_0x5973bf(0x9a)]()==='journey'?_0x5973bf(0x7e):_0x5973bf(0xa9);return{'type':_0x5973bf(0x91),'parentName':_0x4a2dfb,'targetDir':_0xc67737,'configRoot':_0xc67737,'filePath':_0x319a53,'resourceName':_0x4299dd,'folderPath':'','resourceType':_0x56ee3a,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x5973bf(0x87),'errorCode':_0x5973bf(0x99),'message':_0x5973bf(0xad)+_0x373dd8,'arg':_0x373dd8,'helpText':_0x5973bf(0x88)};}return{'type':_0x5973bf(0x87),'errorCode':'invalid_yaml','message':_0x43c11f,'arg':_0x373dd8};}if(_0x373dd8){const _0x334df0=a208_0x342d8a[_0x5973bf(0x81)](cwd,_0x373dd8);let _0x18480d=null;try{_0x18480d=await fs[_0x5973bf(0x86)](_0x334df0);}catch{}if(_0x18480d?.[_0x5973bf(0x8f)]()){const _0xb510e5=await findTdxConfigAsync(_0x334df0,fs);if(_0xb510e5){const _0x135342=calculateScopedPath(_0x334df0,_0xb510e5[_0x5973bf(0xa4)]);return{'type':'directory','parentName':_0xb510e5['parentSegment'],'targetDir':_0x334df0,'configRoot':_0xb510e5[_0x5973bf(0xa4)],'isScoped':_0x135342[_0x5973bf(0x84)],'scopedFolderPath':_0x135342[_0x5973bf(0x80)]};}if(_0x4a2dfb)return{'type':_0x5973bf(0xa2),'parentName':_0x4a2dfb,'targetDir':_0x334df0,'configRoot':_0x334df0,'isScoped':![],'scopedFolderPath':''};return{'type':_0x5973bf(0x87),'errorCode':_0x5973bf(0x99),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x373dd8,'arg':_0x373dd8,'helpText':_0x5973bf(0x88)};}if(_0x18480d?.[_0x5973bf(0x7b)]())return{'type':_0x5973bf(0x87),'errorCode':_0x5973bf(0x93),'message':_0x5973bf(0x82)+_0x373dd8,'arg':_0x373dd8,'helpText':_0x5973bf(0xb2)};const _0x3744b6=sanitizeFileName(_0x373dd8),_0x3f21a4=getSegmentRootDir(_0x3744b6,cwd);return{'type':_0x5973bf(0x96),'parentName':_0x373dd8,'targetDir':_0x3f21a4,'configRoot':_0x3f21a4};}const _0x1dac44=await findTdxConfigAsync(cwd,fs);if(_0x1dac44){const _0xdff620=calculateScopedPath(cwd,_0x1dac44[_0x5973bf(0xa4)]);return{'type':_0x5973bf(0xa0),'parentName':_0x1dac44['parentSegment'],'targetDir':cwd,'configRoot':_0x1dac44[_0x5973bf(0xa4)],'isScoped':_0xdff620[_0x5973bf(0x84)],'scopedFolderPath':_0xdff620['scopedFolderPath']};}if(_0x4a2dfb){const _0x1449fe=sanitizeFileName(_0x4a2dfb),_0x3faf1b=getSegmentRootDir(_0x1449fe,cwd);return{'type':_0x5973bf(0xa0),'parentName':_0x4a2dfb,'targetDir':_0x3faf1b,'configRoot':_0x3faf1b,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5973bf(0x87),'errorCode':_0x5973bf(0x83),'message':_0x5973bf(0x8d),'helpText':_0x5973bf(0xae)};}
@@ -1 +1 @@
1
- function a209_0x3915(_0x49b732,_0x5c99fd){_0x49b732=_0x49b732-0x1e8;const _0x428490=a209_0x4284();let _0x3915ad=_0x428490[_0x49b732];return _0x3915ad;}const a209_0x321e0e=a209_0x3915;(function(_0x3a3b83,_0x2638dc){const _0x182fe9=a209_0x3915,_0xcc9cdb=_0x3a3b83();while(!![]){try{const _0x3afc3d=-parseInt(_0x182fe9(0x1fa))/0x1+-parseInt(_0x182fe9(0x1eb))/0x2+parseInt(_0x182fe9(0x1f8))/0x3*(parseInt(_0x182fe9(0x1fc))/0x4)+-parseInt(_0x182fe9(0x1fd))/0x5+-parseInt(_0x182fe9(0x1ec))/0x6+-parseInt(_0x182fe9(0x1ff))/0x7+parseInt(_0x182fe9(0x1e9))/0x8;if(_0x3afc3d===_0x2638dc)break;else _0xcc9cdb['push'](_0xcc9cdb['shift']());}catch(_0x6b8698){_0xcc9cdb['push'](_0xcc9cdb['shift']());}}}(a209_0x4284,0xe565a));function a209_0x4284(){const _0x4c40b2=['5953614gBcZrq','dirname','parent_segment','parse','cwd','root','join','Invalid\x20JSON\x20in\x20','stringify','object','tdx.json','replace','1299GhJozN','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','405846IMzyoC','utf-8','9260HoIOcx','4036860udhgFe','string','4591860QxAEMj','startsWith','engage_workspace','Invalid\x20tdx.json:\x20expected\x20object','resolve','28760792DCSWhl','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','1592834ZTEGtv'];a209_0x4284=function(){return _0x4c40b2;};return a209_0x4284();}import{existsSync,readFileSync}from'fs';import a209_0x48ace2 from'path';const TDX_CONFIG_FILE=a209_0x321e0e(0x1f6),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x4de2e4=process[a209_0x321e0e(0x1f0)]()){const _0x5c104c=a209_0x321e0e;let _0x3e53e3=a209_0x48ace2[_0x5c104c(0x1e8)](_0x4de2e4);const _0x2c7a74=a209_0x48ace2[_0x5c104c(0x1ef)](_0x3e53e3)[_0x5c104c(0x1f1)];while(_0x3e53e3!==_0x2c7a74){const _0x2319f7=a209_0x48ace2[_0x5c104c(0x1f2)](_0x3e53e3,TDX_CONFIG_FILE);if(existsSync(_0x2319f7))return _0x2319f7;_0x3e53e3=a209_0x48ace2[_0x5c104c(0x1ed)](_0x3e53e3);}return null;}export function loadTdxConfig(_0x2e1297){const _0x4ec1ca=a209_0x321e0e,_0xc013c6=readFileSync(_0x2e1297,_0x4ec1ca(0x1fb));let _0x54cbc4;try{_0x54cbc4=JSON['parse'](_0xc013c6);}catch{throw new Error(_0x4ec1ca(0x1f3)+_0x2e1297);}if(!_0x54cbc4||typeof _0x54cbc4!==_0x4ec1ca(0x1f5))throw new Error(_0x4ec1ca(0x202));const _0xf7d10e=_0x54cbc4,_0x422632=_0xf7d10e[_0x4ec1ca(0x1ee)]&&typeof _0xf7d10e[_0x4ec1ca(0x1ee)]===_0x4ec1ca(0x1fe),_0x380228=_0xf7d10e['engage_workspace']&&typeof _0xf7d10e['engage_workspace']===_0x4ec1ca(0x1fe);if(!_0x422632&&!_0x380228)throw new Error(_0x4ec1ca(0x1ea));const _0x259306={};return _0x422632&&(_0x259306[_0x4ec1ca(0x1ee)]=_0xf7d10e['parent_segment']),_0x380228&&(_0x259306[_0x4ec1ca(0x201)]=_0xf7d10e[_0x4ec1ca(0x201)]),_0x259306;}export function findTdxConfig(_0x3b42e0=process[a209_0x321e0e(0x1f0)]()){const _0x1e9f3f=a209_0x321e0e,_0x33f021=findTdxConfigPath(_0x3b42e0);if(!_0x33f021)throw new Error(_0x1e9f3f(0x1f9));const _0x231919=loadTdxConfig(_0x33f021),_0x2fdab0=a209_0x48ace2[_0x1e9f3f(0x1ed)](_0x33f021);return{'config':_0x231919,'configPath':_0x33f021,'configDir':_0x2fdab0};}export function tryFindTdxConfig(_0x2cfee4){try{return findTdxConfig(_0x2cfee4);}catch{return null;}}export function getSegmentRootDir(_0x2b5998,_0x18dcd5=process[a209_0x321e0e(0x1f0)]()){const _0x26dce2=a209_0x321e0e;return a209_0x48ace2[_0x26dce2(0x1f2)](_0x18dcd5,SEGMENTS_DIR,_0x2b5998);}export function getTdxConfigPath(_0x49a3b9,_0x70d6c7=process[a209_0x321e0e(0x1f0)]()){return a209_0x48ace2['join'](getSegmentRootDir(_0x49a3b9,_0x70d6c7),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x30ea45,_0x113ac3){const _0x523380=a209_0x321e0e,_0x5e6c1a=a209_0x48ace2[_0x523380(0x1e8)](_0x30ea45),_0x22f61d=a209_0x48ace2['relative'](_0x113ac3,_0x5e6c1a);if(_0x22f61d[_0x523380(0x200)]('..'))return'';return _0x22f61d;}export function localPathToTdFolderPath(_0x409f78){const _0xcebe3d=a209_0x321e0e,_0x43f5bd=a209_0x48ace2[_0xcebe3d(0x1ed)](_0x409f78);if(_0x43f5bd==='.'||_0x43f5bd==='')return'';return _0x43f5bd[_0xcebe3d(0x1f7)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x3c6c3a,_0x17e774){if(!_0x3c6c3a)return _0x17e774;return a209_0x48ace2['join'](_0x17e774,_0x3c6c3a);}export function createTdxConfigContent(_0x2aa211){const _0x2ccba4=a209_0x321e0e,_0x453bd9={'parent_segment':_0x2aa211};return JSON[_0x2ccba4(0x1f4)](_0x453bd9,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x4214b6){const _0x455943=a209_0x321e0e,_0x21024d={'engage_workspace':_0x4214b6};return JSON[_0x455943(0x1f4)](_0x21024d,null,0x2)+'\x0a';}
1
+ function a209_0x59a8(){const _0x460fac=['object','62438UhhnkI','stringify','3713432tKyoKt','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','utf-8','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','6MyHDYP','parent_segment','785960AAYlym','relative','root','replace','string','resolve','3395259Vswnku','Invalid\x20JSON\x20in\x20','join','33ZWtjWP','1077655CZochU','231914PbhDlL','parse','tdx.json','dirname','1243BQGyXl','cwd','28340toxkqU','8kKnQgS','engage_workspace','segments'];a209_0x59a8=function(){return _0x460fac;};return a209_0x59a8();}function a209_0x19d4(_0x454af4,_0x570821){_0x454af4=_0x454af4-0x1e4;const _0x59a89d=a209_0x59a8();let _0x19d461=_0x59a89d[_0x454af4];return _0x19d461;}const a209_0x29dbc7=a209_0x19d4;(function(_0x5b650f,_0x363717){const _0xc58f9d=a209_0x19d4,_0xf4e712=_0x5b650f();while(!![]){try{const _0x8f4356=-parseInt(_0xc58f9d(0x1f2))/0x1+parseInt(_0xc58f9d(0x1fd))/0x2*(-parseInt(_0xc58f9d(0x1f0))/0x3)+-parseInt(_0xc58f9d(0x1f9))/0x4*(parseInt(_0xc58f9d(0x1f1))/0x5)+parseInt(_0xc58f9d(0x1e5))/0x6*(parseInt(_0xc58f9d(0x1e7))/0x7)+parseInt(_0xc58f9d(0x1ff))/0x8+parseInt(_0xc58f9d(0x1ed))/0x9+parseInt(_0xc58f9d(0x1f8))/0xa*(parseInt(_0xc58f9d(0x1f6))/0xb);if(_0x8f4356===_0x363717)break;else _0xf4e712['push'](_0xf4e712['shift']());}catch(_0x36c5f5){_0xf4e712['push'](_0xf4e712['shift']());}}}(a209_0x59a8,0x4152f));import{existsSync,readFileSync}from'fs';import a209_0x586b73 from'path';const TDX_CONFIG_FILE=a209_0x29dbc7(0x1f4),SEGMENTS_DIR=a209_0x29dbc7(0x1fb);export function findTdxConfigPath(_0x4118b5=process['cwd']()){const _0x16a2b5=a209_0x29dbc7;let _0x10dbda=a209_0x586b73[_0x16a2b5(0x1ec)](_0x4118b5);const _0x5438aa=a209_0x586b73[_0x16a2b5(0x1f3)](_0x10dbda)[_0x16a2b5(0x1e9)];while(_0x10dbda!==_0x5438aa){const _0x370f65=a209_0x586b73[_0x16a2b5(0x1ef)](_0x10dbda,TDX_CONFIG_FILE);if(existsSync(_0x370f65))return _0x370f65;_0x10dbda=a209_0x586b73[_0x16a2b5(0x1f5)](_0x10dbda);}return null;}export function loadTdxConfig(_0x2b0241){const _0x2b0a53=a209_0x29dbc7,_0x4ac775=readFileSync(_0x2b0241,_0x2b0a53(0x201));let _0x40cb77;try{_0x40cb77=JSON[_0x2b0a53(0x1f3)](_0x4ac775);}catch{throw new Error(_0x2b0a53(0x1ee)+_0x2b0241);}if(!_0x40cb77||typeof _0x40cb77!==_0x2b0a53(0x1fc))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x3864f8=_0x40cb77,_0x1acd95=_0x3864f8['parent_segment']&&typeof _0x3864f8['parent_segment']===_0x2b0a53(0x1eb),_0x289e73=_0x3864f8[_0x2b0a53(0x1fa)]&&typeof _0x3864f8[_0x2b0a53(0x1fa)]===_0x2b0a53(0x1eb);if(!_0x1acd95&&!_0x289e73)throw new Error(_0x2b0a53(0x200));const _0x1ece29={};return _0x1acd95&&(_0x1ece29[_0x2b0a53(0x1e6)]=_0x3864f8[_0x2b0a53(0x1e6)]),_0x289e73&&(_0x1ece29['engage_workspace']=_0x3864f8[_0x2b0a53(0x1fa)]),_0x1ece29;}export function findTdxConfig(_0x425a1c=process[a209_0x29dbc7(0x1f7)]()){const _0x47bb70=a209_0x29dbc7,_0x44dd87=findTdxConfigPath(_0x425a1c);if(!_0x44dd87)throw new Error(_0x47bb70(0x1e4));const _0x44e8cf=loadTdxConfig(_0x44dd87),_0x204ba1=a209_0x586b73[_0x47bb70(0x1f5)](_0x44dd87);return{'config':_0x44e8cf,'configPath':_0x44dd87,'configDir':_0x204ba1};}export function tryFindTdxConfig(_0x427cf3){try{return findTdxConfig(_0x427cf3);}catch{return null;}}export function getSegmentRootDir(_0x28124b,_0x552c0a=process[a209_0x29dbc7(0x1f7)]()){const _0x3ea51d=a209_0x29dbc7;return a209_0x586b73[_0x3ea51d(0x1ef)](_0x552c0a,SEGMENTS_DIR,_0x28124b);}export function getTdxConfigPath(_0x50b1ff,_0x4168d4=process[a209_0x29dbc7(0x1f7)]()){const _0x605fdc=a209_0x29dbc7;return a209_0x586b73[_0x605fdc(0x1ef)](getSegmentRootDir(_0x50b1ff,_0x4168d4),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x396295,_0xdf5148){const _0x4f8300=a209_0x29dbc7,_0x5ec125=a209_0x586b73[_0x4f8300(0x1ec)](_0x396295),_0xb60d63=a209_0x586b73[_0x4f8300(0x1e8)](_0xdf5148,_0x5ec125);if(_0xb60d63['startsWith']('..'))return'';return _0xb60d63;}export function localPathToTdFolderPath(_0xead5bb){const _0xb6697f=a209_0x29dbc7,_0xab57a0=a209_0x586b73[_0xb6697f(0x1f5)](_0xead5bb);if(_0xab57a0==='.'||_0xab57a0==='')return'';return _0xab57a0[_0xb6697f(0x1ea)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x4dfb58,_0x1e715a){const _0x537ba4=a209_0x29dbc7;if(!_0x4dfb58)return _0x1e715a;return a209_0x586b73[_0x537ba4(0x1ef)](_0x1e715a,_0x4dfb58);}export function createTdxConfigContent(_0x576412){const _0x3883d7=a209_0x29dbc7,_0x3b6f6b={'parent_segment':_0x576412};return JSON[_0x3883d7(0x1fe)](_0x3b6f6b,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x2b591e){const _0xada9bd={'engage_workspace':_0x2b591e};return JSON['stringify'](_0xada9bd,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- function a210_0x2f87(){const _0x85598d=['350ugHrUT','13307670rGOITs','15nDXOhZ','clear','descending','14662TCrSSJ','minute','month','addIssue','1061256GmgWTG','string','behavior','183gyMJFL','none','once','min','onSuccess','252672pNpAIu','onFailure','25274880xKzLqm','masked','enum','Top-N','boolean','custom','Use\x20either\x20`behavior`\x20or\x20`behaviors`,\x20not\x20both\x20(prefer\x20`behaviors`).','Last','array','optional','Connection\x20name\x20is\x20required','9272826YBmmsp','weekly','object','number','unknown','All','cols','nullable','minutes_interval','monthly','1073356QFrcsK','hour','rows','hourly','First','record'];a210_0x2f87=function(){return _0x85598d;};return a210_0x2f87();}const a210_0x93afaa=a210_0x3be9;(function(_0x2e9356,_0x32a7d6){const _0x1d8949=a210_0x3be9,_0x337778=_0x2e9356();while(!![]){try{const _0x1cc5d8=-parseInt(_0x1d8949(0x11d))/0x1*(parseInt(_0x1d8949(0x116))/0x2)+parseInt(_0x1d8949(0x11a))/0x3+-parseInt(_0x1d8949(0x139))/0x4*(-parseInt(_0x1d8949(0x113))/0x5)+parseInt(_0x1d8949(0x12f))/0x6+-parseInt(_0x1d8949(0x111))/0x7*(parseInt(_0x1d8949(0x122))/0x8)+-parseInt(_0x1d8949(0x112))/0x9+parseInt(_0x1d8949(0x124))/0xa;if(_0x1cc5d8===_0x32a7d6)break;else _0x337778['push'](_0x337778['shift']());}catch(_0x20d591){_0x337778['push'](_0x337778['shift']());}}}(a210_0x2f87,0xcb345));function a210_0x3be9(_0x41ade8,_0x9d7201){_0x41ade8=_0x41ade8-0x10c;const _0x2f87f9=a210_0x2f87();let _0x3be9e3=_0x2f87f9[_0x41ade8];return _0x3be9e3;}import{z}from'zod';export const ScheduleTypeSchema=z[a210_0x93afaa(0x126)]([a210_0x93afaa(0x11e),a210_0x93afaa(0x10e),'daily',a210_0x93afaa(0x130),a210_0x93afaa(0x138),'cron',a210_0x93afaa(0x137)]);export const RepeatUnitSchema=z[a210_0x93afaa(0x126)]([a210_0x93afaa(0x117),a210_0x93afaa(0x10c),'day','week',a210_0x93afaa(0x118),a210_0x93afaa(0x11f),a210_0x93afaa(0x11e)]);export const ScheduleDefSchema=z[a210_0x93afaa(0x131)]({'type':ScheduleTypeSchema[a210_0x93afaa(0x12d)](),'repeat_unit':RepeatUnitSchema[a210_0x93afaa(0x12d)](),'repeat_frequency':z['number']()[a210_0x93afaa(0x12d)](),'repeat_sub_frequency':z[a210_0x93afaa(0x12c)](z[a210_0x93afaa(0x132)]())[a210_0x93afaa(0x12d)](),'start_at':z[a210_0x93afaa(0x11b)]()['nullable']()['optional'](),'end_on':z['string']()[a210_0x93afaa(0x136)]()[a210_0x93afaa(0x12d)](),'timezone':z[a210_0x93afaa(0x11b)]()['optional']()});export const NotificationDefSchema=z['object']({'notify_on':z['array'](z[a210_0x93afaa(0x126)]([a210_0x93afaa(0x121),a210_0x93afaa(0x123)]))[a210_0x93afaa(0x12d)](),'email_recipients':z[a210_0x93afaa(0x12c)](z[a210_0x93afaa(0x11b)]())[a210_0x93afaa(0x12d)]()});export const ActivationColumnDefSchema=z['union']([z['string'](),z[a210_0x93afaa(0x131)]({'name':z[a210_0x93afaa(0x11b)](),'type':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x12d)](),'visibility':z[a210_0x93afaa(0x126)]([a210_0x93afaa(0x114),a210_0x93afaa(0x125)])[a210_0x93afaa(0x12d)]()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z[a210_0x93afaa(0x12c)](ActivationColumnDefSchema)['optional'](),'behavior_table':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x12d)](),'join_row':z[a210_0x93afaa(0x132)]()[a210_0x93afaa(0x136)]()[a210_0x93afaa(0x12d)](),'join_strategy':z[a210_0x93afaa(0x126)]([a210_0x93afaa(0x134),a210_0x93afaa(0x10f),a210_0x93afaa(0x12b),a210_0x93afaa(0x127)])['optional'](),'formatting':z['enum']([a210_0x93afaa(0x10d),a210_0x93afaa(0x135)])[a210_0x93afaa(0x12d)](),'order_by':z[a210_0x93afaa(0x12c)](z[a210_0x93afaa(0x131)]({'key':z['string'](),'order':z[a210_0x93afaa(0x126)](['ascending',a210_0x93afaa(0x115)])}))[a210_0x93afaa(0x12d)]()});export const ActivationBehaviorsDefSchema=z[a210_0x93afaa(0x12c)](ActivationBehaviorDefSchema)['max'](0x4);export const ActivationDefSchema=z['object']({'name':z[a210_0x93afaa(0x11b)]()['min'](0x1,'Activation\x20name\x20is\x20required'),'description':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x12d)](),'connection':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x120)](0x1,a210_0x93afaa(0x12e)),'all_columns':z[a210_0x93afaa(0x128)]()[a210_0x93afaa(0x12d)](),'columns':z['array'](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a210_0x93afaa(0x110)](z[a210_0x93afaa(0x11b)](),z[a210_0x93afaa(0x133)]())[a210_0x93afaa(0x12d)](),'activation_template_id':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x136)]()['optional'](),'behavior':ActivationBehaviorDefSchema[a210_0x93afaa(0x136)]()['optional'](),'behaviors':ActivationBehaviorsDefSchema['optional'](),'run_after_journey_refresh':z['boolean']()[a210_0x93afaa(0x12d)](),'nested_workflow_project_name':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x12d)](),'nested_workflow_name':z[a210_0x93afaa(0x11b)]()[a210_0x93afaa(0x12d)](),'lock_enabled':z[a210_0x93afaa(0x128)]()[a210_0x93afaa(0x12d)]()})['superRefine']((_0x219a9b,_0x3d92e6)=>{const _0x394292=a210_0x93afaa;_0x219a9b['behavior']!=null&&_0x219a9b['behaviors']!=null&&_0x3d92e6[_0x394292(0x119)]({'code':_0x394292(0x129),'message':_0x394292(0x12a),'path':[_0x394292(0x11c)]});});
1
+ const a210_0x56df5b=a210_0x73d7;function a210_0x73d7(_0x4fefb0,_0x3be3a4){_0x4fefb0=_0x4fefb0-0xc9;const _0x564c5f=a210_0x564c();let _0x73d793=_0x564c5f[_0x4fefb0];return _0x73d793;}(function(_0xaa0dfa,_0x3c534f){const _0x37305d=a210_0x73d7,_0x3e4838=_0xaa0dfa();while(!![]){try{const _0x474276=parseInt(_0x37305d(0xce))/0x1+-parseInt(_0x37305d(0xd0))/0x2*(parseInt(_0x37305d(0xe9))/0x3)+parseInt(_0x37305d(0xca))/0x4*(-parseInt(_0x37305d(0xd8))/0x5)+-parseInt(_0x37305d(0xef))/0x6+-parseInt(_0x37305d(0xdb))/0x7*(parseInt(_0x37305d(0xe3))/0x8)+parseInt(_0x37305d(0xdd))/0x9*(parseInt(_0x37305d(0xe5))/0xa)+parseInt(_0x37305d(0xf3))/0xb;if(_0x474276===_0x3c534f)break;else _0x3e4838['push'](_0x3e4838['shift']());}catch(_0x462080){_0x3e4838['push'](_0x3e4838['shift']());}}}(a210_0x564c,0x74e27));import{z}from'zod';export const ScheduleTypeSchema=z['enum']([a210_0x56df5b(0xed),a210_0x56df5b(0xd7),'daily',a210_0x56df5b(0xdf),a210_0x56df5b(0xe4),a210_0x56df5b(0xe2),a210_0x56df5b(0xd4)]);export const RepeatUnitSchema=z['enum']([a210_0x56df5b(0xcf),a210_0x56df5b(0xde),'day','week',a210_0x56df5b(0xe0),'once',a210_0x56df5b(0xed)]);export const ScheduleDefSchema=z[a210_0x56df5b(0xe7)]({'type':ScheduleTypeSchema[a210_0x56df5b(0xcd)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a210_0x56df5b(0xee)]()[a210_0x56df5b(0xcd)](),'repeat_sub_frequency':z['array'](z[a210_0x56df5b(0xee)]())['optional'](),'start_at':z['string']()[a210_0x56df5b(0xf2)]()['optional'](),'end_on':z[a210_0x56df5b(0xe6)]()['nullable']()[a210_0x56df5b(0xcd)](),'timezone':z['string']()[a210_0x56df5b(0xcd)]()});export const NotificationDefSchema=z[a210_0x56df5b(0xe7)]({'notify_on':z['array'](z[a210_0x56df5b(0xd9)](['onSuccess','onFailure']))['optional'](),'email_recipients':z[a210_0x56df5b(0xeb)](z[a210_0x56df5b(0xe6)]())[a210_0x56df5b(0xcd)]()});export const ActivationColumnDefSchema=z[a210_0x56df5b(0xd3)]([z[a210_0x56df5b(0xe6)](),z[a210_0x56df5b(0xe7)]({'name':z[a210_0x56df5b(0xe6)](),'type':z['string']()[a210_0x56df5b(0xcd)](),'visibility':z[a210_0x56df5b(0xd9)](['clear','masked'])[a210_0x56df5b(0xcd)]()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z[a210_0x56df5b(0xeb)](ActivationColumnDefSchema)['optional'](),'behavior_table':z['string']()[a210_0x56df5b(0xcd)](),'join_row':z[a210_0x56df5b(0xee)]()[a210_0x56df5b(0xf2)]()[a210_0x56df5b(0xcd)](),'join_strategy':z[a210_0x56df5b(0xd9)]([a210_0x56df5b(0xcc),'First',a210_0x56df5b(0xcb),a210_0x56df5b(0xd1)])[a210_0x56df5b(0xcd)](),'formatting':z[a210_0x56df5b(0xd9)]([a210_0x56df5b(0xd5),a210_0x56df5b(0xf1)])[a210_0x56df5b(0xcd)](),'order_by':z[a210_0x56df5b(0xeb)](z['object']({'key':z[a210_0x56df5b(0xe6)](),'order':z['enum']([a210_0x56df5b(0xd2),'descending'])}))[a210_0x56df5b(0xcd)]()});export const ActivationBehaviorsDefSchema=z[a210_0x56df5b(0xeb)](ActivationBehaviorDefSchema)[a210_0x56df5b(0xe1)](0x4);function a210_0x564c(){const _0x5ec507=['All','optional','40180rzLEbw','minute','206pAcitr','Top-N','ascending','union','minutes_interval','rows','boolean','hourly','85XhWjZD','enum','unknown','497XrgyhL','record','1111023TFRFAW','hour','weekly','month','max','cron','70696SJabcp','monthly','10ZXpZVv','string','object','min','11394wyPNVv','superRefine','array','behavior','none','number','2969790IuBrsg','addIssue','cols','nullable','27728294KQzMto','Use\x20either\x20`behavior`\x20or\x20`behaviors`,\x20not\x20both\x20(prefer\x20`behaviors`).','162832lThfjI','Last'];a210_0x564c=function(){return _0x5ec507;};return a210_0x564c();}export const ActivationDefSchema=z['object']({'name':z[a210_0x56df5b(0xe6)]()['min'](0x1,'Activation\x20name\x20is\x20required'),'description':z[a210_0x56df5b(0xe6)]()[a210_0x56df5b(0xcd)](),'connection':z[a210_0x56df5b(0xe6)]()[a210_0x56df5b(0xe8)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z[a210_0x56df5b(0xd6)]()[a210_0x56df5b(0xcd)](),'columns':z[a210_0x56df5b(0xeb)](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a210_0x56df5b(0xcd)](),'notification':NotificationDefSchema[a210_0x56df5b(0xcd)](),'connector_config':z[a210_0x56df5b(0xdc)](z[a210_0x56df5b(0xe6)](),z[a210_0x56df5b(0xda)]())[a210_0x56df5b(0xcd)](),'activation_template_id':z['string']()[a210_0x56df5b(0xf2)]()['optional'](),'behavior':ActivationBehaviorDefSchema[a210_0x56df5b(0xf2)]()[a210_0x56df5b(0xcd)](),'behaviors':ActivationBehaviorsDefSchema[a210_0x56df5b(0xcd)](),'run_after_journey_refresh':z[a210_0x56df5b(0xd6)]()[a210_0x56df5b(0xcd)](),'nested_workflow_project_name':z[a210_0x56df5b(0xe6)]()[a210_0x56df5b(0xcd)](),'nested_workflow_name':z[a210_0x56df5b(0xe6)]()[a210_0x56df5b(0xcd)](),'lock_enabled':z[a210_0x56df5b(0xd6)]()[a210_0x56df5b(0xcd)]()})[a210_0x56df5b(0xea)]((_0x32fac8,_0x5da37c)=>{const _0x26ce7b=a210_0x56df5b;_0x32fac8[_0x26ce7b(0xec)]!=null&&_0x32fac8['behaviors']!=null&&_0x5da37c[_0x26ce7b(0xf0)]({'code':'custom','message':_0x26ce7b(0xc9),'path':['behavior']});});
@@ -1 +1 @@
1
- function a211_0x4cc1(){var _0x352c20=['14ipqPJq','1854984rwiAQJ','15182FpLGhN','1256284ParcvH','1495740NDZdBS','1639757FgNeES','7333840rZikBW','250248nqDMuq'];a211_0x4cc1=function(){return _0x352c20;};return a211_0x4cc1();}function a211_0x13f5(_0x37b031,_0x1e8fab){_0x37b031=_0x37b031-0x1a3;var _0x4cc1a6=a211_0x4cc1();var _0x13f59b=_0x4cc1a6[_0x37b031];return _0x13f59b;}(function(_0x44a99a,_0xf41a2e){var _0x280981=a211_0x13f5,_0x4d0416=_0x44a99a();while(!![]){try{var _0x29b46d=parseInt(_0x280981(0x1a4))/0x1*(-parseInt(_0x280981(0x1aa))/0x2)+-parseInt(_0x280981(0x1a9))/0x3+-parseInt(_0x280981(0x1a5))/0x4+parseInt(_0x280981(0x1a6))/0x5+-parseInt(_0x280981(0x1a3))/0x6+-parseInt(_0x280981(0x1a7))/0x7+parseInt(_0x280981(0x1a8))/0x8;if(_0x29b46d===_0xf41a2e)break;else _0x4d0416['push'](_0x4d0416['shift']());}catch(_0x1feea6){_0x4d0416['push'](_0x4d0416['shift']());}}}(a211_0x4cc1,0x292fe));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ (function(_0x1de566,_0x29086a){var _0x3139ae=a211_0x2c4d,_0x15fef2=_0x1de566();while(!![]){try{var _0x498497=-parseInt(_0x3139ae(0x12a))/0x1+parseInt(_0x3139ae(0x12f))/0x2*(parseInt(_0x3139ae(0x12b))/0x3)+parseInt(_0x3139ae(0x129))/0x4+-parseInt(_0x3139ae(0x12c))/0x5*(-parseInt(_0x3139ae(0x131))/0x6)+parseInt(_0x3139ae(0x12d))/0x7+parseInt(_0x3139ae(0x130))/0x8+-parseInt(_0x3139ae(0x12e))/0x9*(parseInt(_0x3139ae(0x128))/0xa);if(_0x498497===_0x29086a)break;else _0x15fef2['push'](_0x15fef2['shift']());}catch(_0x46e5dd){_0x15fef2['push'](_0x15fef2['shift']());}}}(a211_0x57b7,0x1b93f));function a211_0x57b7(){var _0x5a3066=['16ZdCqzl','993312pKQNXV','6eLTSpX','10XqSXoI','463996RnxLnf','43087Choyva','79341GGQvrj','1059655iAbQhY','777770mbMbha','5568606PThWKh'];a211_0x57b7=function(){return _0x5a3066;};return a211_0x57b7();}function a211_0x2c4d(_0x36e0e6,_0x5904cf){_0x36e0e6=_0x36e0e6-0x128;var _0x57b757=a211_0x57b7();var _0x2c4dda=_0x57b757[_0x36e0e6];return _0x2c4dda;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a212_0x253f22=a212_0x4a86;(function(_0x807cdb,_0x5cb2c0){const _0x28cb90=a212_0x4a86,_0x216983=_0x807cdb();while(!![]){try{const _0x141618=parseInt(_0x28cb90(0x178))/0x1*(parseInt(_0x28cb90(0x16d))/0x2)+parseInt(_0x28cb90(0x164))/0x3+parseInt(_0x28cb90(0x17b))/0x4*(-parseInt(_0x28cb90(0x17f))/0x5)+-parseInt(_0x28cb90(0x16b))/0x6*(-parseInt(_0x28cb90(0x16f))/0x7)+parseInt(_0x28cb90(0x163))/0x8*(-parseInt(_0x28cb90(0x165))/0x9)+-parseInt(_0x28cb90(0x185))/0xa+-parseInt(_0x28cb90(0x183))/0xb;if(_0x141618===_0x5cb2c0)break;else _0x216983['push'](_0x216983['shift']());}catch(_0x5f01d6){_0x216983['push'](_0x216983['shift']());}}}(a212_0xc2d8,0x62435));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a212_0x253f22(0x16a)]([a212_0x253f22(0x188),a212_0x253f22(0x173),'launched']);export const ReentryModeTypeSchema=z[a212_0x253f22(0x16a)]([a212_0x253f22(0x15f),a212_0x253f22(0x184),a212_0x253f22(0x17c)]);export const WaitUnitTypeSchema=z['enum']([a212_0x253f22(0x187),'week']);export const StepTypeValueSchema=z['enum'](['wait',a212_0x253f22(0x160),'decision_point','ab_test','merge',a212_0x253f22(0x186),a212_0x253f22(0x16c)]);export const EmbeddedSegmentDefSchema=z[a212_0x253f22(0x179)]({'description':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a212_0x253f22(0x179)]({'journey':z[a212_0x253f22(0x17e)](),'stage':z[a212_0x253f22(0x17e)](),'bundle_id':z['string']()[a212_0x253f22(0x171)]()});export const CriteriaDefSchema=z[a212_0x253f22(0x179)]({'name':z[a212_0x253f22(0x17e)](),'description':z[a212_0x253f22(0x17e)]()['optional'](),'segment':z[a212_0x253f22(0x17e)](),'target':JumpTargetDefSchema[a212_0x253f22(0x171)]()});const WaitConditionTimeoutDefSchema=z[a212_0x253f22(0x179)]({'duration':z[a212_0x253f22(0x172)](),'unit':WaitUnitTypeSchema,'next':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)]()}),WaitConditionDefSchema=z[a212_0x253f22(0x179)]({'segment':z['string'](),'next':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'timeout':WaitConditionTimeoutDefSchema[a212_0x253f22(0x171)]()}),WaitStepParamsDefSchema=z[a212_0x253f22(0x179)]({'duration':z[a212_0x253f22(0x172)]()['optional'](),'unit':WaitUnitTypeSchema[a212_0x253f22(0x171)](),'wait_until':z['string']()['optional'](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z[a212_0x253f22(0x168)](z['string']())['optional']()}),StepBaseFields={'name':z['string'](),'uuid':z['string']()[a212_0x253f22(0x171)](),'next':z['string']()[a212_0x253f22(0x171)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a212_0x253f22(0x166)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a212_0x253f22(0x17e)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x160)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a212_0x253f22(0x179)]({'name':z[a212_0x253f22(0x17e)](),'segment':z['string']()[a212_0x253f22(0x171)](),'segment_id':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'excluded':z['boolean']()[a212_0x253f22(0x171)](),'next':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)]()}),DecisionPointStepParamsDefSchema=z[a212_0x253f22(0x179)]({'branches':z[a212_0x253f22(0x168)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x17d)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a212_0x253f22(0x179)]({'id':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'name':z[a212_0x253f22(0x17e)](),'percentage':z[a212_0x253f22(0x172)](),'next':z['string']()[a212_0x253f22(0x171)]()}),AbTestStepParamsDefSchema=z[a212_0x253f22(0x179)]({'variants':z[a212_0x253f22(0x168)](AbTestVariantDefSchema),'unique_id':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'customized_split':z['boolean']()[a212_0x253f22(0x171)]()}),AbTestStepDefSchema=z[a212_0x253f22(0x179)]({...StepBaseFields,'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x180)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a212_0x253f22(0x179)]({...StepBaseFields,'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x162))}),JumpStepParamsDefSchema=z[a212_0x253f22(0x179)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a212_0x253f22(0x179)]({...StepBaseFields,'type':z['literal'](a212_0x253f22(0x186)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a212_0x253f22(0x179)]({...StepBaseFields,'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x16c))})[a212_0x253f22(0x167)]();export const StepDefSchema=z['discriminatedUnion'](a212_0x253f22(0x174),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a212_0x253f22(0x179)]({'name':z[a212_0x253f22(0x17e)](),'description':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'id':z['string']()[a212_0x253f22(0x171)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a212_0x253f22(0x168)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a212_0x253f22(0x171)](),'root_step':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'steps':z[a212_0x253f22(0x168)](StepDefSchema)['optional']()});function a212_0xc2d8(){const _0x571930=['10oYRiHF','isArray','63mamtJF','lazy','optional','number','simulation','type','journeys','filter','boolean','136112JHsQGR','object','refine','18344XzTsHg','reentry_always','decision_point','string','580fimkoZ','ab_test','journey','stages','3579400NPVtzc','reentry_unless_goal_achieved','1982250kASDGG','jump','day','draft','no_reentry','activation','record','merge','117104AZVNMq','2301537JMlfWN','270dimHXK','literal','passthrough','array','versions','enum','299658hQCsFp','end'];a212_0xc2d8=function(){return _0x571930;};return a212_0xc2d8();}function a212_0x4a86(_0x3a1a6e,_0x44a458){_0x3a1a6e=_0x3a1a6e-0x15f;const _0xc2d80b=a212_0xc2d8();let _0x4a86e2=_0xc2d80b[_0x3a1a6e];return _0x4a86e2;}export const JourneyEntryDefSchema=z[a212_0x253f22(0x179)]({'name':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'version':z['string']()[a212_0x253f22(0x171)](),'state':JourneyStateTypeSchema['optional'](),'latest':z[a212_0x253f22(0x177)]()[a212_0x253f22(0x171)](),'stages':z[a212_0x253f22(0x168)](StageDefSchema),'id':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'version_number':z[a212_0x253f22(0x172)]()[a212_0x253f22(0x171)](),'goal':CriteriaDefSchema[a212_0x253f22(0x171)](),'reentry':ReentryModeTypeSchema[a212_0x253f22(0x171)]()});export const JourneyDefSchema=z[a212_0x253f22(0x170)](()=>z['object']({'type':z[a212_0x253f22(0x166)](a212_0x253f22(0x181)),'name':z[a212_0x253f22(0x17e)]()['min'](0x1,'Journey\x20name\x20is\x20required'),'description':z[a212_0x253f22(0x17e)]()['optional'](),'bundle_id':z[a212_0x253f22(0x17e)]()['optional'](),'bundle_name':z['string']()[a212_0x253f22(0x171)](),'folder_id':z[a212_0x253f22(0x17e)]()['optional'](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a212_0x253f22(0x177)]()['optional'](),'goal':CriteriaDefSchema['optional'](),'id':z['string']()['optional'](),'version':z[a212_0x253f22(0x17e)]()[a212_0x253f22(0x171)](),'version_number':z[a212_0x253f22(0x172)]()[a212_0x253f22(0x171)](),'stages':z[a212_0x253f22(0x168)](StageDefSchema)[a212_0x253f22(0x171)](),'versions':z[a212_0x253f22(0x168)](JourneyEntryDefSchema)[a212_0x253f22(0x171)](),'journeys':z[a212_0x253f22(0x168)](JourneyEntryDefSchema)[a212_0x253f22(0x171)](),'segments':z['record'](z['string'](),EmbeddedSegmentDefSchema)[a212_0x253f22(0x171)](),'activations':z[a212_0x253f22(0x161)](z['string'](),ActivationDefSchema)[a212_0x253f22(0x171)]()})[a212_0x253f22(0x17a)](_0x42e1c9=>{const _0x51fc8c=a212_0x253f22,_0x3d7cdb=[_0x42e1c9[_0x51fc8c(0x175)],_0x42e1c9[_0x51fc8c(0x182)],_0x42e1c9[_0x51fc8c(0x169)]][_0x51fc8c(0x176)](_0x26a7b5=>Array[_0x51fc8c(0x16e)](_0x26a7b5)&&_0x26a7b5['length']>0x0)['length'];return _0x3d7cdb===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a212_0x17cb71=a212_0xd678;(function(_0x21877f,_0x305982){const _0x19036c=a212_0xd678,_0x28e3cd=_0x21877f();while(!![]){try{const _0x4dd801=-parseInt(_0x19036c(0x168))/0x1*(-parseInt(_0x19036c(0x15f))/0x2)+-parseInt(_0x19036c(0x153))/0x3+parseInt(_0x19036c(0x172))/0x4+parseInt(_0x19036c(0x178))/0x5*(-parseInt(_0x19036c(0x167))/0x6)+parseInt(_0x19036c(0x158))/0x7*(parseInt(_0x19036c(0x176))/0x8)+parseInt(_0x19036c(0x160))/0x9*(-parseInt(_0x19036c(0x156))/0xa)+-parseInt(_0x19036c(0x163))/0xb;if(_0x4dd801===_0x305982)break;else _0x28e3cd['push'](_0x28e3cd['shift']());}catch(_0x51a49c){_0x28e3cd['push'](_0x28e3cd['shift']());}}}(a212_0x4598,0xa6408));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a212_0x17cb71(0x174)]([a212_0x17cb71(0x16d),a212_0x17cb71(0x166),a212_0x17cb71(0x16e)]);export const ReentryModeTypeSchema=z[a212_0x17cb71(0x174)](['no_reentry',a212_0x17cb71(0x15a),a212_0x17cb71(0x15d)]);export const WaitUnitTypeSchema=z[a212_0x17cb71(0x174)](['day',a212_0x17cb71(0x161)]);function a212_0xd678(_0x17a17b,_0xe53d06){_0x17a17b=_0x17a17b-0x153;const _0x45985f=a212_0x4598();let _0xd67843=_0x45985f[_0x17a17b];return _0xd67843;}export const StepTypeValueSchema=z[a212_0x17cb71(0x174)]([a212_0x17cb71(0x155),'activation','decision_point','ab_test','merge','jump',a212_0x17cb71(0x15b)]);export const EmbeddedSegmentDefSchema=z[a212_0x17cb71(0x179)]({'description':z[a212_0x17cb71(0x16c)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z[a212_0x17cb71(0x16c)](),'stage':z['string'](),'bundle_id':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)]()});export const CriteriaDefSchema=z['object']({'name':z[a212_0x17cb71(0x16c)](),'description':z['string']()[a212_0x17cb71(0x17a)](),'segment':z[a212_0x17cb71(0x16c)](),'target':JumpTargetDefSchema['optional']()});const WaitConditionTimeoutDefSchema=z[a212_0x17cb71(0x179)]({'duration':z[a212_0x17cb71(0x16f)](),'unit':WaitUnitTypeSchema,'next':z['string']()[a212_0x17cb71(0x17a)]()}),WaitConditionDefSchema=z[a212_0x17cb71(0x179)]({'segment':z['string'](),'next':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'timeout':WaitConditionTimeoutDefSchema[a212_0x17cb71(0x17a)]()}),WaitStepParamsDefSchema=z[a212_0x17cb71(0x179)]({'duration':z[a212_0x17cb71(0x16f)]()[a212_0x17cb71(0x17a)](),'unit':WaitUnitTypeSchema[a212_0x17cb71(0x17a)](),'wait_until':z[a212_0x17cb71(0x16c)]()['optional'](),'condition':WaitConditionDefSchema[a212_0x17cb71(0x17a)](),'days_of_week':z[a212_0x17cb71(0x170)](z[a212_0x17cb71(0x16c)]())[a212_0x17cb71(0x17a)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'next':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)]()},WaitStepDefSchema=z[a212_0x17cb71(0x179)]({...StepBaseFields,'type':z[a212_0x17cb71(0x164)](a212_0x17cb71(0x155)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a212_0x17cb71(0x179)]({'activation':z['string']()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a212_0x17cb71(0x164)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a212_0x17cb71(0x16c)](),'segment':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'segment_id':z[a212_0x17cb71(0x16c)]()['optional'](),'excluded':z[a212_0x17cb71(0x173)]()[a212_0x17cb71(0x17a)](),'next':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z[a212_0x17cb71(0x170)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a212_0x17cb71(0x179)]({...StepBaseFields,'type':z[a212_0x17cb71(0x164)]('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a212_0x17cb71(0x179)]({'id':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'name':z[a212_0x17cb71(0x16c)](),'percentage':z[a212_0x17cb71(0x16f)](),'next':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)]()}),AbTestStepParamsDefSchema=z[a212_0x17cb71(0x179)]({'variants':z[a212_0x17cb71(0x170)](AbTestVariantDefSchema),'unique_id':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'customized_split':z['boolean']()[a212_0x17cb71(0x17a)]()}),AbTestStepDefSchema=z[a212_0x17cb71(0x179)]({...StepBaseFields,'type':z['literal']('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a212_0x17cb71(0x179)]({...StepBaseFields,'type':z[a212_0x17cb71(0x164)](a212_0x17cb71(0x15e))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a212_0x17cb71(0x164)](a212_0x17cb71(0x177)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a212_0x17cb71(0x179)]({...StepBaseFields,'type':z[a212_0x17cb71(0x164)](a212_0x17cb71(0x15b))})['passthrough']();function a212_0x4598(){const _0x47d005=['233050AfxKWF','lazy','7448049ATmEMc','length','reentry_unless_goal_achieved','end','discriminatedUnion','reentry_always','merge','206662CBHVBu','18JFgyKv','week','type','5552767yawzTN','literal','refine','simulation','12bhJVXM','3CPsziU','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','journey','record','string','draft','launched','number','array','versions','5189040NBfGvA','boolean','enum','journeys','8IJwYIH','jump','3203135lDerBp','object','optional','472893hluPKJ','filter','wait'];a212_0x4598=function(){return _0x47d005;};return a212_0x4598();}export const StepDefSchema=z[a212_0x17cb71(0x15c)](a212_0x17cb71(0x162),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a212_0x17cb71(0x179)]({'name':z[a212_0x17cb71(0x16c)](),'description':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'id':z['string']()[a212_0x17cb71(0x17a)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a212_0x17cb71(0x170)](CriteriaDefSchema)[a212_0x17cb71(0x17a)](),'milestone':CriteriaDefSchema[a212_0x17cb71(0x17a)](),'root_step':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'steps':z[a212_0x17cb71(0x170)](StepDefSchema)[a212_0x17cb71(0x17a)]()});export const JourneyEntryDefSchema=z[a212_0x17cb71(0x179)]({'name':z['string']()[a212_0x17cb71(0x17a)](),'version':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'state':JourneyStateTypeSchema[a212_0x17cb71(0x17a)](),'latest':z[a212_0x17cb71(0x173)]()[a212_0x17cb71(0x17a)](),'stages':z[a212_0x17cb71(0x170)](StageDefSchema),'id':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'version_number':z[a212_0x17cb71(0x16f)]()[a212_0x17cb71(0x17a)](),'goal':CriteriaDefSchema[a212_0x17cb71(0x17a)](),'reentry':ReentryModeTypeSchema[a212_0x17cb71(0x17a)]()});export const JourneyDefSchema=z[a212_0x17cb71(0x157)](()=>z[a212_0x17cb71(0x179)]({'type':z[a212_0x17cb71(0x164)](a212_0x17cb71(0x16a)),'name':z[a212_0x17cb71(0x16c)]()['min'](0x1,'Journey\x20name\x20is\x20required'),'description':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'bundle_id':z[a212_0x17cb71(0x16c)]()['optional'](),'bundle_name':z['string']()[a212_0x17cb71(0x17a)](),'folder_id':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a212_0x17cb71(0x173)]()[a212_0x17cb71(0x17a)](),'goal':CriteriaDefSchema[a212_0x17cb71(0x17a)](),'id':z[a212_0x17cb71(0x16c)]()[a212_0x17cb71(0x17a)](),'version':z['string']()[a212_0x17cb71(0x17a)](),'version_number':z[a212_0x17cb71(0x16f)]()[a212_0x17cb71(0x17a)](),'stages':z[a212_0x17cb71(0x170)](StageDefSchema)[a212_0x17cb71(0x17a)](),'versions':z[a212_0x17cb71(0x170)](JourneyEntryDefSchema)[a212_0x17cb71(0x17a)](),'journeys':z[a212_0x17cb71(0x170)](JourneyEntryDefSchema)[a212_0x17cb71(0x17a)](),'segments':z[a212_0x17cb71(0x16b)](z['string'](),EmbeddedSegmentDefSchema)[a212_0x17cb71(0x17a)](),'activations':z[a212_0x17cb71(0x16b)](z[a212_0x17cb71(0x16c)](),ActivationDefSchema)[a212_0x17cb71(0x17a)]()})[a212_0x17cb71(0x165)](_0x100334=>{const _0x3f9236=a212_0x17cb71,_0x230806=[_0x100334[_0x3f9236(0x175)],_0x100334['stages'],_0x100334[_0x3f9236(0x171)]][_0x3f9236(0x154)](_0xf9cd55=>Array['isArray'](_0xf9cd55)&&_0xf9cd55[_0x3f9236(0x159)]>0x0)['length'];return _0x230806===0x1;},{'message':a212_0x17cb71(0x169)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x3e2c07,_0x1ab5e6){var _0x11eeb8=a214_0x4534,_0x59b7d7=_0x3e2c07();while(!![]){try{var _0x2c6075=parseInt(_0x11eeb8(0x89))/0x1*(-parseInt(_0x11eeb8(0x90))/0x2)+-parseInt(_0x11eeb8(0x8d))/0x3*(-parseInt(_0x11eeb8(0x87))/0x4)+parseInt(_0x11eeb8(0x8b))/0x5+parseInt(_0x11eeb8(0x8a))/0x6+-parseInt(_0x11eeb8(0x8c))/0x7+-parseInt(_0x11eeb8(0x88))/0x8*(-parseInt(_0x11eeb8(0x8f))/0x9)+-parseInt(_0x11eeb8(0x8e))/0xa;if(_0x2c6075===_0x1ab5e6)break;else _0x59b7d7['push'](_0x59b7d7['shift']());}catch(_0x186dbf){_0x59b7d7['push'](_0x59b7d7['shift']());}}}(a214_0x5578,0xb037f));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a214_0x4534(_0x44091a,_0x273410){_0x44091a=_0x44091a-0x87;var _0x55781d=a214_0x5578();var _0x4534e6=_0x55781d[_0x44091a];return _0x4534e6;}function a214_0x5578(){var _0x17dadf=['3kjeycg','15485630XpBkJG','9HYONZE','106TVkjGo','3918468jWPRgL','7872968uNBLGO','2466sVfRKK','702198GnHhgc','6692835sumIFR','7128002DFOmkk'];a214_0x5578=function(){return _0x17dadf;};return a214_0x5578();}
1
+ (function(_0x1a4398,_0x11982d){var _0x1613e2=a214_0x3a23,_0x1b6b15=_0x1a4398();while(!![]){try{var _0x5ad8c6=-parseInt(_0x1613e2(0x148))/0x1+parseInt(_0x1613e2(0x142))/0x2+parseInt(_0x1613e2(0x13f))/0x3*(-parseInt(_0x1613e2(0x146))/0x4)+parseInt(_0x1613e2(0x144))/0x5*(parseInt(_0x1613e2(0x147))/0x6)+-parseInt(_0x1613e2(0x149))/0x7*(parseInt(_0x1613e2(0x140))/0x8)+parseInt(_0x1613e2(0x143))/0x9*(parseInt(_0x1613e2(0x141))/0xa)+-parseInt(_0x1613e2(0x145))/0xb*(-parseInt(_0x1613e2(0x13e))/0xc);if(_0x5ad8c6===_0x11982d)break;else _0x1b6b15['push'](_0x1b6b15['shift']());}catch(_0x535d08){_0x1b6b15['push'](_0x1b6b15['shift']());}}}(a214_0x1b17,0x8ea10));function a214_0x3a23(_0x4eae9f,_0x5966be){_0x4eae9f=_0x4eae9f-0x13e;var _0x1b17ec=a214_0x1b17();var _0x3a232d=_0x1b17ec[_0x4eae9f];return _0x3a232d;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a214_0x1b17(){var _0x233edf=['1469684LENKVX','10818veBQEW','652309bzZdaP','2723Dctwxi','627204hNKbeT','3laffhn','10712CYZRQN','20rMboDf','9936RKSOTe','4809564vJglRB','2190Svzkcb','55NyycEx'];a214_0x1b17=function(){return _0x233edf;};return a214_0x1b17();}
@@ -1 +1 @@
1
- const a215_0x3e9a99=a215_0x4cd4;(function(_0x271e6b,_0x13ac72){const _0x2f983e=a215_0x4cd4,_0x3973ba=_0x271e6b();while(!![]){try{const _0x51230d=parseInt(_0x2f983e(0x15e))/0x1*(-parseInt(_0x2f983e(0x14d))/0x2)+-parseInt(_0x2f983e(0x12c))/0x3+-parseInt(_0x2f983e(0x15a))/0x4*(-parseInt(_0x2f983e(0x16a))/0x5)+parseInt(_0x2f983e(0x14e))/0x6+-parseInt(_0x2f983e(0x161))/0x7*(parseInt(_0x2f983e(0x13b))/0x8)+parseInt(_0x2f983e(0x131))/0x9*(parseInt(_0x2f983e(0x123))/0xa)+parseInt(_0x2f983e(0x15d))/0xb*(-parseInt(_0x2f983e(0x166))/0xc);if(_0x51230d===_0x13ac72)break;else _0x3973ba['push'](_0x3973ba['shift']());}catch(_0x3e8a64){_0x3973ba['push'](_0x3973ba['shift']());}}}(a215_0x3dbb,0x472b3));import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';export const OperatorTypeSchema=z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x136),'Greater',a215_0x3e9a99(0x11b),'GreaterEqual','LessEqual','In',a215_0x3e9a99(0x141),a215_0x3e9a99(0x145),'IsNull',a215_0x3e9a99(0x150),a215_0x3e9a99(0x128),'Contain','StartWith',a215_0x3e9a99(0x121),a215_0x3e9a99(0x154)]);export const TimeUnitSchema=z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x159),a215_0x3e9a99(0x137),a215_0x3e9a99(0x11d),a215_0x3e9a99(0x158),'week','month',a215_0x3e9a99(0x163)]);export const AggregationTypeSchema=z['enum'](['Count',a215_0x3e9a99(0x148),a215_0x3e9a99(0x16c),a215_0x3e9a99(0x11c),'Max','CountDistinct','First','Last']);const TemporalValueSchema=z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x12f)]({'timestamp':z[a215_0x3e9a99(0x14f)]()}),z[a215_0x3e9a99(0x12f)]({'last':z[a215_0x3e9a99(0x160)]([z['number'](),z[a215_0x3e9a99(0x14a)](z[a215_0x3e9a99(0x14f)](),z[a215_0x3e9a99(0x16d)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x14f)](),z[a215_0x3e9a99(0x16d)](),z[a215_0x3e9a99(0x126)](),TemporalValueSchema,z['array'](z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x14f)](),z[a215_0x3e9a99(0x16d)](),z[a215_0x3e9a99(0x126)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a215_0x3e9a99(0x136),a215_0x3e9a99(0x13c),a215_0x3e9a99(0x122),a215_0x3e9a99(0x11b),a215_0x3e9a99(0x13f),'In',a215_0x3e9a99(0x140),a215_0x3e9a99(0x170),a215_0x3e9a99(0x121),'Regexp',a215_0x3e9a99(0x150),a215_0x3e9a99(0x128)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a215_0x3e9a99(0x128)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a215_0x3e9a99(0x126)]()[a215_0x3e9a99(0x142)](),'value':OperatorValueSchema[a215_0x3e9a99(0x142)](),'min':z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x16d)](),z[a215_0x3e9a99(0x14f)](),TemporalValueSchema])[a215_0x3e9a99(0x142)](),'max':z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x16d)](),z[a215_0x3e9a99(0x14f)](),TemporalValueSchema])[a215_0x3e9a99(0x142)](),'unit':TimeUnitSchema[a215_0x3e9a99(0x142)](),'duration':z[a215_0x3e9a99(0x12f)]({'day':z[a215_0x3e9a99(0x16d)]()['optional'](),'week':z['number']()['optional'](),'month':z['number']()[a215_0x3e9a99(0x142)](),'year':z['number']()[a215_0x3e9a99(0x142)](),'hour':z[a215_0x3e9a99(0x16d)]()[a215_0x3e9a99(0x142)](),'minute':z['number']()[a215_0x3e9a99(0x142)](),'second':z[a215_0x3e9a99(0x16d)]()['optional']()})[a215_0x3e9a99(0x142)](),'from':z[a215_0x3e9a99(0x12f)]({'last':z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x16d)](),z[a215_0x3e9a99(0x14f)]()]),'unit':TimeUnitSchema})[a215_0x3e9a99(0x142)](),'reverse':z[a215_0x3e9a99(0x126)]()[a215_0x3e9a99(0x142)]()})[a215_0x3e9a99(0x13d)]((_0x1dbc62,_0x55552a)=>{const _0x372094=a215_0x3e9a99;OPERATORS_REQUIRING_VALUE['has'](_0x1dbc62[_0x372094(0x15c)])&&(_0x1dbc62[_0x372094(0x167)]===undefined||_0x1dbc62[_0x372094(0x167)]===null)&&_0x55552a['addIssue']({'code':_0x372094(0x143),'message':_0x372094(0x125)+_0x1dbc62[_0x372094(0x15c)]+'\x27\x20requires\x20a\x20value','path':[_0x372094(0x167)]}),_0x1dbc62[_0x372094(0x15c)]==='Between'&&_0x1dbc62[_0x372094(0x134)]===undefined&&_0x1dbc62[_0x372094(0x16b)]===undefined&&_0x55552a[_0x372094(0x146)]({'code':_0x372094(0x143),'message':_0x372094(0x155),'params':{'validationCode':_0x372094(0x127)}}),OPERATORS_REQUIRING_UNIT[_0x372094(0x149)](_0x1dbc62[_0x372094(0x15c)])&&_0x1dbc62[_0x372094(0x167)]!==undefined&&!_0x1dbc62['unit']&&_0x55552a['addIssue']({'code':_0x372094(0x143),'message':_0x372094(0x125)+_0x1dbc62['type']+_0x372094(0x14b),'path':['unit'],'params':{'validationCode':_0x372094(0x15f)}}),_0x1dbc62[_0x372094(0x15c)]===_0x372094(0x154)&&(!_0x1dbc62[_0x372094(0x132)]&&_0x55552a[_0x372094(0x146)]({'code':_0x372094(0x143),'message':_0x372094(0x12d),'path':['duration']}),!_0x1dbc62[_0x372094(0x162)]&&_0x55552a['addIssue']({'code':_0x372094(0x143),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x372094(0x162)]}));});export const ArrayMatchingSchema=z[a215_0x3e9a99(0x160)]([z[a215_0x3e9a99(0x135)](a215_0x3e9a99(0x169)),z[a215_0x3e9a99(0x135)]('all'),z[a215_0x3e9a99(0x12f)]({'atLeast':z[a215_0x3e9a99(0x16d)]()}),z['object']({'atMost':z[a215_0x3e9a99(0x16d)]()}),z[a215_0x3e9a99(0x12f)]({'exactly':z[a215_0x3e9a99(0x16d)]()})]);export const AggregationDefSchema=z[a215_0x3e9a99(0x165)]('type',[z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x153)](['Sum','Min',a215_0x3e9a99(0x164),a215_0x3e9a99(0x16c)]),'column':z['string'](),'groupingColumns':z[a215_0x3e9a99(0x157)](z[a215_0x3e9a99(0x14f)]())[a215_0x3e9a99(0x142)]()}),z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x135)](a215_0x3e9a99(0x151)),'groupingColumns':z['array'](z[a215_0x3e9a99(0x14f)]())[a215_0x3e9a99(0x142)]()}),z['object']({'type':z[a215_0x3e9a99(0x135)](a215_0x3e9a99(0x130)),'columns':z[a215_0x3e9a99(0x157)](z[a215_0x3e9a99(0x14f)]())}),z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x129),a215_0x3e9a99(0x15b)]),'column':z['string'](),'orderColumn':z[a215_0x3e9a99(0x14f)](),'groupingColumns':z[a215_0x3e9a99(0x157)](z[a215_0x3e9a99(0x14f)]())[a215_0x3e9a99(0x142)]()})]);export const TimeWindowDefSchema=z[a215_0x3e9a99(0x12f)]({'duration':z[a215_0x3e9a99(0x16d)](),'unit':TimeUnitSchema});function a215_0x3dbb(){const _0x3d7ff0=['Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Composite','array','day','second','181948jYutun','Last','type','11649ZZCouj','1ITxfqt','MISSING_TIME_UNIT','union','441658PeSqDY','from','year','Max','discriminatedUnion','3240MGYaVe','value','funnel_stage','any','5KGxrNy','max','Average','number','Segment\x20name\x20is\x20required','And','StartWith','Less','Min','hour','include','\x20operators\x20(got\x20\x27','realtime','EndWith','GreaterEqual','2924240nGmtKk','lazy','Operator\x20\x27','boolean','MISSING_BETWEEN_BOUNDS','TimeWithinNext','First','Column','batch','333264WzQqtO','TimeRange\x20operator\x20requires\x20\x27duration\x27','Segment\x20reference\x20must\x20not\x20be\x20empty','object','CountDistinct','9tKGXCB','duration','timestamp','min','literal','Equal','minute','every','Timestamp\x20column\x20only\x20supports\x20','Behavior','16DBNHnm','Greater','superRefine','segment','LessEqual','Contain','Between','optional','custom','operator','Regexp','addIssue','exclude','Sum','has','record','\x27\x20requires\x20a\x20time\x20unit','Value','76852jiLZWT','3091368vOdtnF','string','TimeWithinPast','Count','join','enum','TimeRange'];a215_0x3dbb=function(){return _0x3d7ff0;};return a215_0x3dbb();}const TIMEFRAME_OPERATORS=new Set(['TimeWithinPast','TimeWithinNext',a215_0x3e9a99(0x154)]),TIMESTAMP_COMPARISON_OPERATORS=new Set([a215_0x3e9a99(0x136),a215_0x3e9a99(0x13c),a215_0x3e9a99(0x122),a215_0x3e9a99(0x11b),a215_0x3e9a99(0x13f),'Between']),TIMESTAMP_OPERATORS=new Set([...TIMEFRAME_OPERATORS,...TIMESTAMP_COMPARISON_OPERATORS]);function isTemporalValueShape(_0x627a15){const _0x383e6=a215_0x3e9a99;return typeof _0x627a15===_0x383e6(0x12f)&&_0x627a15!==null&&!Array['isArray'](_0x627a15)&&(_0x383e6(0x133)in _0x627a15||'last'in _0x627a15);}export const FilterColumnConditionDefSchema=z[a215_0x3e9a99(0x12f)]({'type':z['literal']('Column'),'column':z[a215_0x3e9a99(0x14f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a215_0x3e9a99(0x142)]()})[a215_0x3e9a99(0x13d)]((_0x24faa0,_0x37320e)=>{const _0x417256=a215_0x3e9a99,_0x509574=_0x24faa0[_0x417256(0x144)][_0x417256(0x15c)];if(_0x24faa0['column']===_0x417256(0x133)){if(!TIMESTAMP_OPERATORS[_0x417256(0x149)](_0x509574)){_0x37320e[_0x417256(0x146)]({'code':_0x417256(0x143),'message':_0x417256(0x139)+[...TIMESTAMP_OPERATORS][_0x417256(0x152)](',\x20')+_0x417256(0x11f)+_0x509574+'\x27)','path':[_0x417256(0x144),_0x417256(0x15c)]});return;}if(TIMESTAMP_COMPARISON_OPERATORS[_0x417256(0x149)](_0x509574)){const _0x4b3d70=_0x509574===_0x417256(0x141)?[_0x24faa0['operator'][_0x417256(0x134)],_0x24faa0['operator'][_0x417256(0x16b)]][_0x417256(0x138)](_0x156b17=>_0x156b17===undefined||isTemporalValueShape(_0x156b17)):_0x24faa0['operator'][_0x417256(0x167)]===undefined||isTemporalValueShape(_0x24faa0[_0x417256(0x144)][_0x417256(0x167)]);!_0x4b3d70&&_0x37320e['addIssue']({'code':'custom','message':'Timestamp\x20column\x27s\x20\x27'+_0x509574+'\x27\x20operator\x20requires\x20a\x20relative-time\x20or\x20timestamp\x20value\x20({last,\x20unit}\x20or\x20{timestamp}),\x20not\x20a\x20plain\x20value','path':[_0x417256(0x144)]});}}});export const FilterRuleDefSchema=z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x135)](a215_0x3e9a99(0x16f)),'conditions':z[a215_0x3e9a99(0x157)](FilterColumnConditionDefSchema)});function a215_0x4cd4(_0x493b08,_0x54f5b3){_0x493b08=_0x493b08-0x11b;const _0x3dbb22=a215_0x3dbb();let _0x4cd45a=_0x3dbb22[_0x493b08];return _0x4cd45a;}export const ValueConditionDefSchema=z[a215_0x3e9a99(0x124)](()=>z['object']({'type':z['literal'](a215_0x3e9a99(0x14c)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a215_0x3e9a99(0x142)](),'exclude':z[a215_0x3e9a99(0x126)]()[a215_0x3e9a99(0x142)](),'aggregation':AggregationDefSchema[a215_0x3e9a99(0x142)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a215_0x3e9a99(0x16d)]()[a215_0x3e9a99(0x142)]()}));export const BehaviorConditionDefSchema=z[a215_0x3e9a99(0x124)](()=>z['object']({'type':z['literal'](a215_0x3e9a99(0x13a)),'attribute':z[a215_0x3e9a99(0x14f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a215_0x3e9a99(0x142)](),'exclude':z[a215_0x3e9a99(0x126)]()['optional'](),'aggregation':AggregationDefSchema[a215_0x3e9a99(0x142)](),'source':z[a215_0x3e9a99(0x14f)]()[a215_0x3e9a99(0x142)](),'filter':FilterRuleDefSchema[a215_0x3e9a99(0x142)](),'timeWindow':TimeWindowDefSchema[a215_0x3e9a99(0x142)](),'limit':z[a215_0x3e9a99(0x16d)]()['optional']()}));export const ColumnConditionDefSchema=z['object']({'type':z[a215_0x3e9a99(0x135)](a215_0x3e9a99(0x12a)),'column':z[a215_0x3e9a99(0x14f)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a215_0x3e9a99(0x124)](()=>z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x16f),'Or','Composite']),'conditions':z[a215_0x3e9a99(0x157)](ConditionDefSchema),'description':z['string']()[a215_0x3e9a99(0x142)](),'expr':z[a215_0x3e9a99(0x14f)]()[a215_0x3e9a99(0x142)]()}));export const SegmentRefConditionDefSchema=z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x11e),a215_0x3e9a99(0x147)]),'segment':z[a215_0x3e9a99(0x14f)]()[a215_0x3e9a99(0x134)](0x1,a215_0x3e9a99(0x12e))});export const ConditionDefSchema=z['lazy'](()=>z[a215_0x3e9a99(0x160)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a215_0x3e9a99(0x12f)]({'type':z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x16f),'Or',a215_0x3e9a99(0x156)]),'conditions':z[a215_0x3e9a99(0x157)](ConditionDefSchema),'description':z[a215_0x3e9a99(0x14f)]()['optional'](),'expr':z[a215_0x3e9a99(0x14f)]()[a215_0x3e9a99(0x142)]()}));export const SegmentDefSchema=z[a215_0x3e9a99(0x12f)]({'type':z['literal'](a215_0x3e9a99(0x13e))[a215_0x3e9a99(0x142)](),'name':z[a215_0x3e9a99(0x14f)]()['min'](0x1,a215_0x3e9a99(0x16e)),'description':z['string']()['optional'](),'folder':z['string']()[a215_0x3e9a99(0x142)](),'rule':RuleDefSchema[a215_0x3e9a99(0x142)](),'kind':z[a215_0x3e9a99(0x153)]([a215_0x3e9a99(0x12b),a215_0x3e9a99(0x120),a215_0x3e9a99(0x168)])[a215_0x3e9a99(0x142)](),'visible':z[a215_0x3e9a99(0x126)]()['optional'](),'activations':z['array'](ActivationDefSchema)[a215_0x3e9a99(0x142)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a215_0x27dc83=a215_0x59c3;(function(_0x5eceb3,_0x34608f){const _0x42131c=a215_0x59c3,_0x593b89=_0x5eceb3();while(!![]){try{const _0x3b9f9d=parseInt(_0x42131c(0x1a8))/0x1*(-parseInt(_0x42131c(0x1dd))/0x2)+parseInt(_0x42131c(0x1a5))/0x3+-parseInt(_0x42131c(0x18d))/0x4*(-parseInt(_0x42131c(0x1a7))/0x5)+parseInt(_0x42131c(0x1b1))/0x6*(parseInt(_0x42131c(0x1b3))/0x7)+-parseInt(_0x42131c(0x1c4))/0x8*(parseInt(_0x42131c(0x18f))/0x9)+-parseInt(_0x42131c(0x1db))/0xa*(parseInt(_0x42131c(0x1d5))/0xb)+parseInt(_0x42131c(0x1c1))/0xc*(parseInt(_0x42131c(0x1cd))/0xd);if(_0x3b9f9d===_0x34608f)break;else _0x593b89['push'](_0x593b89['shift']());}catch(_0x5a9a60){_0x593b89['push'](_0x593b89['shift']());}}}(a215_0x3f5d,0x8246c));import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';export const OperatorTypeSchema=z['enum']([a215_0x27dc83(0x194),a215_0x27dc83(0x1bf),a215_0x27dc83(0x18c),a215_0x27dc83(0x19a),a215_0x27dc83(0x1c0),'In',a215_0x27dc83(0x1be),'Regexp',a215_0x27dc83(0x1ce),a215_0x27dc83(0x1de),'TimeWithinNext',a215_0x27dc83(0x1c9),'StartWith',a215_0x27dc83(0x1c8),a215_0x27dc83(0x1ac)]);export const TimeUnitSchema=z[a215_0x27dc83(0x197)]([a215_0x27dc83(0x18b),a215_0x27dc83(0x1b2),a215_0x27dc83(0x1b9),a215_0x27dc83(0x19f),a215_0x27dc83(0x1a0),a215_0x27dc83(0x1b7),a215_0x27dc83(0x196)]);export const AggregationTypeSchema=z[a215_0x27dc83(0x197)]([a215_0x27dc83(0x1b6),a215_0x27dc83(0x1c3),'Average','Min',a215_0x27dc83(0x1ae),'CountDistinct',a215_0x27dc83(0x1cf),a215_0x27dc83(0x1b4)]);const TemporalValueSchema=z['union']([z[a215_0x27dc83(0x1a6)]({'timestamp':z[a215_0x27dc83(0x191)]()}),z[a215_0x27dc83(0x1a6)]({'last':z[a215_0x27dc83(0x199)]([z[a215_0x27dc83(0x1ca)](),z['record'](z[a215_0x27dc83(0x191)](),z['number']())]),'unit':z[a215_0x27dc83(0x191)]()})]),OperatorValueSchema=z[a215_0x27dc83(0x199)]([z[a215_0x27dc83(0x191)](),z[a215_0x27dc83(0x1ca)](),z[a215_0x27dc83(0x1b5)](),TemporalValueSchema,z[a215_0x27dc83(0x19e)](z[a215_0x27dc83(0x199)]([z[a215_0x27dc83(0x191)](),z[a215_0x27dc83(0x1ca)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a215_0x27dc83(0x194),a215_0x27dc83(0x1bf),a215_0x27dc83(0x19a),a215_0x27dc83(0x18c),a215_0x27dc83(0x1c0),'In',a215_0x27dc83(0x1c9),a215_0x27dc83(0x1aa),a215_0x27dc83(0x1c8),a215_0x27dc83(0x1da),a215_0x27dc83(0x1de),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a215_0x27dc83(0x1d7)]);export const OperatorDefSchema=z[a215_0x27dc83(0x1a6)]({'type':OperatorTypeSchema,'not':z['boolean']()['optional'](),'value':OperatorValueSchema[a215_0x27dc83(0x1d1)](),'min':z[a215_0x27dc83(0x199)]([z['number'](),z[a215_0x27dc83(0x191)](),TemporalValueSchema])[a215_0x27dc83(0x1d1)](),'max':z[a215_0x27dc83(0x199)]([z[a215_0x27dc83(0x1ca)](),z[a215_0x27dc83(0x191)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema[a215_0x27dc83(0x1d1)](),'duration':z['object']({'day':z[a215_0x27dc83(0x1ca)]()[a215_0x27dc83(0x1d1)](),'week':z[a215_0x27dc83(0x1ca)]()[a215_0x27dc83(0x1d1)](),'month':z[a215_0x27dc83(0x1ca)]()[a215_0x27dc83(0x1d1)](),'year':z[a215_0x27dc83(0x1ca)]()[a215_0x27dc83(0x1d1)](),'hour':z[a215_0x27dc83(0x1ca)]()[a215_0x27dc83(0x1d1)](),'minute':z[a215_0x27dc83(0x1ca)]()[a215_0x27dc83(0x1d1)](),'second':z[a215_0x27dc83(0x1ca)]()[a215_0x27dc83(0x1d1)]()})[a215_0x27dc83(0x1d1)](),'from':z['object']({'last':z[a215_0x27dc83(0x199)]([z['number'](),z[a215_0x27dc83(0x191)]()]),'unit':TimeUnitSchema})[a215_0x27dc83(0x1d1)](),'reverse':z[a215_0x27dc83(0x1b5)]()[a215_0x27dc83(0x1d1)]()})[a215_0x27dc83(0x1d6)]((_0x388ef2,_0xf3428e)=>{const _0x51b111=a215_0x27dc83;OPERATORS_REQUIRING_VALUE[_0x51b111(0x1cb)](_0x388ef2[_0x51b111(0x1d4)])&&(_0x388ef2[_0x51b111(0x1ad)]===undefined||_0x388ef2[_0x51b111(0x1ad)]===null)&&_0xf3428e[_0x51b111(0x1d9)]({'code':_0x51b111(0x1ab),'message':'Operator\x20\x27'+_0x388ef2[_0x51b111(0x1d4)]+_0x51b111(0x195),'path':[_0x51b111(0x1ad)]}),_0x388ef2[_0x51b111(0x1d4)]===_0x51b111(0x1be)&&_0x388ef2['min']===undefined&&_0x388ef2[_0x51b111(0x1a9)]===undefined&&_0xf3428e[_0x51b111(0x1d9)]({'code':'custom','message':_0x51b111(0x1df),'params':{'validationCode':_0x51b111(0x1b8)}}),OPERATORS_REQUIRING_UNIT[_0x51b111(0x1cb)](_0x388ef2[_0x51b111(0x1d4)])&&_0x388ef2['value']!==undefined&&!_0x388ef2['unit']&&_0xf3428e[_0x51b111(0x1d9)]({'code':_0x51b111(0x1ab),'message':_0x51b111(0x1d2)+_0x388ef2[_0x51b111(0x1d4)]+_0x51b111(0x1cc),'path':[_0x51b111(0x1af)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x388ef2[_0x51b111(0x1d4)]===_0x51b111(0x1ac)&&(!_0x388ef2[_0x51b111(0x1a4)]&&_0xf3428e[_0x51b111(0x1d9)]({'code':_0x51b111(0x1ab),'message':_0x51b111(0x1c6),'path':[_0x51b111(0x1a4)]}),!_0x388ef2['from']&&_0xf3428e[_0x51b111(0x1d9)]({'code':_0x51b111(0x1ab),'message':_0x51b111(0x19d),'path':[_0x51b111(0x19b)]}));});export const ArrayMatchingSchema=z[a215_0x27dc83(0x199)]([z[a215_0x27dc83(0x192)](a215_0x27dc83(0x1a1)),z['literal'](a215_0x27dc83(0x18a)),z['object']({'atLeast':z['number']()}),z[a215_0x27dc83(0x1a6)]({'atMost':z[a215_0x27dc83(0x1ca)]()}),z[a215_0x27dc83(0x1a6)]({'exactly':z[a215_0x27dc83(0x1ca)]()})]);export const AggregationDefSchema=z['discriminatedUnion']('type',[z[a215_0x27dc83(0x1a6)]({'type':z[a215_0x27dc83(0x197)]([a215_0x27dc83(0x1c3),'Min',a215_0x27dc83(0x1ae),'Average']),'column':z['string'](),'groupingColumns':z['array'](z[a215_0x27dc83(0x191)]())['optional']()}),z[a215_0x27dc83(0x1a6)]({'type':z[a215_0x27dc83(0x192)]('Count'),'groupingColumns':z[a215_0x27dc83(0x19e)](z[a215_0x27dc83(0x191)]())[a215_0x27dc83(0x1d1)]()}),z['object']({'type':z[a215_0x27dc83(0x192)](a215_0x27dc83(0x1c7)),'columns':z[a215_0x27dc83(0x19e)](z[a215_0x27dc83(0x191)]())}),z[a215_0x27dc83(0x1a6)]({'type':z[a215_0x27dc83(0x197)](['First',a215_0x27dc83(0x1b4)]),'column':z[a215_0x27dc83(0x191)](),'orderColumn':z['string'](),'groupingColumns':z[a215_0x27dc83(0x19e)](z['string']())[a215_0x27dc83(0x1d1)]()})]);export const TimeWindowDefSchema=z[a215_0x27dc83(0x1a6)]({'duration':z[a215_0x27dc83(0x1ca)](),'unit':TimeUnitSchema});const TIMEFRAME_OPERATORS=new Set([a215_0x27dc83(0x1de),a215_0x27dc83(0x1d7),a215_0x27dc83(0x1ac)]),TIMESTAMP_COMPARISON_OPERATORS=new Set(['Equal',a215_0x27dc83(0x1bf),a215_0x27dc83(0x19a),a215_0x27dc83(0x18c),a215_0x27dc83(0x1c0),a215_0x27dc83(0x1be)]),TIMESTAMP_OPERATORS=new Set([...TIMEFRAME_OPERATORS,...TIMESTAMP_COMPARISON_OPERATORS]);function isTemporalValueShape(_0x2d594b){const _0x3ddacf=a215_0x27dc83;return typeof _0x2d594b===_0x3ddacf(0x1a6)&&_0x2d594b!==null&&!Array[_0x3ddacf(0x1a3)](_0x2d594b)&&('timestamp'in _0x2d594b||_0x3ddacf(0x189)in _0x2d594b);}export const FilterColumnConditionDefSchema=z[a215_0x27dc83(0x1a6)]({'type':z[a215_0x27dc83(0x192)](a215_0x27dc83(0x1bb)),'column':z[a215_0x27dc83(0x191)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})[a215_0x27dc83(0x1d6)]((_0x2b3327,_0x5d73dd)=>{const _0x507fc8=a215_0x27dc83,_0x58266b=_0x2b3327['operator'][_0x507fc8(0x1d4)];if(_0x2b3327['column']===_0x507fc8(0x1dc)){if(!TIMESTAMP_OPERATORS['has'](_0x58266b)){_0x5d73dd[_0x507fc8(0x1d9)]({'code':_0x507fc8(0x1ab),'message':'Timestamp\x20column\x20only\x20supports\x20'+[...TIMESTAMP_OPERATORS][_0x507fc8(0x18e)](',\x20')+'\x20operators\x20(got\x20\x27'+_0x58266b+'\x27)','path':[_0x507fc8(0x1ba),'type']});return;}if(TIMESTAMP_COMPARISON_OPERATORS['has'](_0x58266b)){const _0xdfbfe1=_0x58266b==='Between'?[_0x2b3327[_0x507fc8(0x1ba)][_0x507fc8(0x1bd)],_0x2b3327['operator']['max']]['every'](_0x44571a=>_0x44571a===undefined||isTemporalValueShape(_0x44571a)):_0x2b3327[_0x507fc8(0x1ba)][_0x507fc8(0x1ad)]===undefined||isTemporalValueShape(_0x2b3327[_0x507fc8(0x1ba)][_0x507fc8(0x1ad)]);!_0xdfbfe1&&_0x5d73dd[_0x507fc8(0x1d9)]({'code':'custom','message':_0x507fc8(0x1bc)+_0x58266b+_0x507fc8(0x1d3),'path':['operator']});}}});export const FilterRuleDefSchema=z[a215_0x27dc83(0x1a6)]({'type':z[a215_0x27dc83(0x192)](a215_0x27dc83(0x198)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z['object']({'type':z[a215_0x27dc83(0x192)](a215_0x27dc83(0x1d0)),'attribute':z[a215_0x27dc83(0x191)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a215_0x27dc83(0x1d1)](),'exclude':z[a215_0x27dc83(0x1b5)]()[a215_0x27dc83(0x1d1)](),'aggregation':AggregationDefSchema[a215_0x27dc83(0x1d1)](),'source':z[a215_0x27dc83(0x191)]()[a215_0x27dc83(0x1d1)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a215_0x27dc83(0x1ca)]()[a215_0x27dc83(0x1d1)]()}));function a215_0x59c3(_0x58b5b2,_0x29787d){_0x58b5b2=_0x58b5b2-0x189;const _0x3f5dbb=a215_0x3f5d();let _0x59c3b5=_0x3f5dbb[_0x58b5b2];return _0x59c3b5;}export const BehaviorConditionDefSchema=z[a215_0x27dc83(0x1c5)](()=>z[a215_0x27dc83(0x1a6)]({'type':z['literal'](a215_0x27dc83(0x19c)),'attribute':z[a215_0x27dc83(0x191)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()[a215_0x27dc83(0x1d1)](),'aggregation':AggregationDefSchema[a215_0x27dc83(0x1d1)](),'source':z[a215_0x27dc83(0x191)]()[a215_0x27dc83(0x1d1)](),'filter':FilterRuleDefSchema[a215_0x27dc83(0x1d1)](),'timeWindow':TimeWindowDefSchema[a215_0x27dc83(0x1d1)](),'limit':z['number']()[a215_0x27dc83(0x1d1)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a215_0x27dc83(0x192)](a215_0x27dc83(0x1bb)),'column':z[a215_0x27dc83(0x191)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a215_0x27dc83(0x1c5)](()=>z[a215_0x27dc83(0x1a6)]({'type':z[a215_0x27dc83(0x197)]([a215_0x27dc83(0x198),'Or',a215_0x27dc83(0x1b0)]),'conditions':z[a215_0x27dc83(0x19e)](ConditionDefSchema),'description':z[a215_0x27dc83(0x191)]()[a215_0x27dc83(0x1d1)](),'expr':z[a215_0x27dc83(0x191)]()['optional']()}));export const SegmentRefConditionDefSchema=z[a215_0x27dc83(0x1a6)]({'type':z[a215_0x27dc83(0x197)]([a215_0x27dc83(0x193),a215_0x27dc83(0x190)]),'segment':z[a215_0x27dc83(0x191)]()['min'](0x1,a215_0x27dc83(0x1d8))});export const ConditionDefSchema=z['lazy'](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));function a215_0x3f5d(){const _0x5f2671=['Count','month','MISSING_BETWEEN_BOUNDS','hour','operator','Column','Timestamp\x20column\x27s\x20\x27','min','Between','Greater','LessEqual','115932zWBTYe','realtime','Sum','7960488pSqgNj','lazy','TimeRange\x20operator\x20requires\x20\x27duration\x27','CountDistinct','EndWith','Contain','number','has','\x27\x20requires\x20a\x20time\x20unit','793NXNyCf','IsNull','First','Value','optional','Operator\x20\x27','\x27\x20operator\x20requires\x20a\x20relative-time\x20or\x20timestamp\x20value\x20({last,\x20unit}\x20or\x20{timestamp}),\x20not\x20a\x20plain\x20value','type','11bxNFyc','superRefine','TimeWithinNext','Segment\x20reference\x20must\x20not\x20be\x20empty','addIssue','Regexp','2243450FzGkBS','timestamp','4ATyAaF','TimeWithinPast','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','segment','last','all','second','Less','662032xDVNjB','join','9lfrWIC','exclude','string','literal','include','Equal','\x27\x20requires\x20a\x20value','year','enum','And','union','GreaterEqual','from','Behavior','TimeRange\x20operator\x20requires\x20\x27from\x27','array','day','week','any','funnel_stage','isArray','duration','1427910GldowL','object','10OdlTiZ','316627JXTvkW','max','StartWith','custom','TimeRange','value','Max','unit','Composite','46770SHCtEw','minute','889rYenes','Last','boolean'];a215_0x3f5d=function(){return _0x5f2671;};return a215_0x3f5d();}export const RuleDefSchema=z[a215_0x27dc83(0x1c5)](()=>z[a215_0x27dc83(0x1a6)]({'type':z[a215_0x27dc83(0x197)]([a215_0x27dc83(0x198),'Or','Composite']),'conditions':z[a215_0x27dc83(0x19e)](ConditionDefSchema),'description':z[a215_0x27dc83(0x191)]()[a215_0x27dc83(0x1d1)](),'expr':z[a215_0x27dc83(0x191)]()[a215_0x27dc83(0x1d1)]()}));export const SegmentDefSchema=z[a215_0x27dc83(0x1a6)]({'type':z[a215_0x27dc83(0x192)](a215_0x27dc83(0x1e0))[a215_0x27dc83(0x1d1)](),'name':z['string']()[a215_0x27dc83(0x1bd)](0x1,'Segment\x20name\x20is\x20required'),'description':z['string']()[a215_0x27dc83(0x1d1)](),'folder':z[a215_0x27dc83(0x191)]()['optional'](),'rule':RuleDefSchema['optional'](),'kind':z[a215_0x27dc83(0x197)](['batch',a215_0x27dc83(0x1c2),a215_0x27dc83(0x1a2)])[a215_0x27dc83(0x1d1)](),'visible':z['boolean']()['optional'](),'activations':z[a215_0x27dc83(0x19e)](ActivationDefSchema)[a215_0x27dc83(0x1d1)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a216_0x4ad35e=a216_0x1093;(function(_0x5157d9,_0x4cf675){const _0x58ce49=a216_0x1093,_0x2c6419=_0x5157d9();while(!![]){try{const _0x2fb74e=parseInt(_0x58ce49(0x1a6))/0x1+parseInt(_0x58ce49(0x19d))/0x2*(parseInt(_0x58ce49(0x1b7))/0x3)+parseInt(_0x58ce49(0x1af))/0x4+-parseInt(_0x58ce49(0x1ac))/0x5+parseInt(_0x58ce49(0x1a1))/0x6*(-parseInt(_0x58ce49(0x19b))/0x7)+-parseInt(_0x58ce49(0x1ab))/0x8+parseInt(_0x58ce49(0x1aa))/0x9*(parseInt(_0x58ce49(0x1b6))/0xa);if(_0x2fb74e===_0x4cf675)break;else _0x2c6419['push'](_0x2c6419['shift']());}catch(_0x4ea772){_0x2c6419['push'](_0x2c6419['shift']());}}}(a216_0x52d1,0x98fab));import{readFileSync}from'fs';import*as a216_0x17ce33 from'path';import*as a216_0x2b9be1 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';function a216_0x52d1(){const _0x16bd3f=['length','621VreKKf','7725016kPBhKk','244320mEvvjq','template','has','3613636RpivkN','journey','push','skipped','filterType','object','basename','99960pGuIue','273864drLoyJ','in_browser_message','parseDocument','YAML_PARSE_ERROR','2667qLMgTG','map','6JWvTKw','error','type','not\x20a\x20','11868TZRpZp','campaign','always_on_campaign','line','YAML\x20parse\x20error:\x20','527715XHKUhM','result','email'];a216_0x52d1=function(){return _0x16bd3f;};return a216_0x52d1();}import{validateTemplateDef}from'../engage/template-validator.js';import{validateAlwaysOnCampaignDef}from'../engage/always-on-campaign-validator.js';import{validateInBrowserMessageDef}from'../engage/in-browser-message-validator.js';import{isJourneyDef}from'./journey-yaml.js';function a216_0x1093(_0x3ca6ae,_0x34dcf7){_0x3ca6ae=_0x3ca6ae-0x19a;const _0x52d183=a216_0x52d1();let _0x1093c3=_0x52d183[_0x3ca6ae];return _0x1093c3;}const VALID_CAMPAIGN_TYPES=new Set([a216_0x4ad35e(0x1a8),a216_0x4ad35e(0x1b1),a216_0x4ad35e(0x1a4)]);export{isJourneyDef};export function isCampaignDef(_0x41bf93){const _0x1ec796=a216_0x4ad35e;if(typeof _0x41bf93!=='object'||_0x41bf93===null)return![];const _0x4f9424=_0x41bf93,_0x4e041d=VALID_CAMPAIGN_TYPES[_0x1ec796(0x1ae)](_0x4f9424['campaign_type']);if(_0x4f9424['type']===_0x1ec796(0x1a2)&&_0x4e041d)return!![];if(_0x4e041d&&!_0x4f9424[_0x1ec796(0x19f)])return!![];return![];}export function isTemplateDef(_0x3aa655){const _0x3a2b1c=a216_0x4ad35e;return typeof _0x3aa655===_0x3a2b1c(0x1b4)&&_0x3aa655!==null&&_0x3a2b1c(0x19f)in _0x3aa655&&_0x3aa655[_0x3a2b1c(0x19f)]===_0x3a2b1c(0x1ad);}export function isAlwaysOnCampaignDef(_0x4cfb86){const _0x52cdee=a216_0x4ad35e;return typeof _0x4cfb86===_0x52cdee(0x1b4)&&_0x4cfb86!==null&&_0x52cdee(0x19f)in _0x4cfb86&&_0x4cfb86[_0x52cdee(0x19f)]===_0x52cdee(0x1a3);}export function isInBrowserMessageDef(_0x49b815){const _0x53d656=a216_0x4ad35e;return typeof _0x49b815===_0x53d656(0x1b4)&&_0x49b815!==null&&_0x53d656(0x19f)in _0x49b815&&_0x49b815[_0x53d656(0x19f)]===_0x53d656(0x1b8);}export function isValidationResult(_0x5b62b8){const _0x52b6cd=a216_0x4ad35e;return!(_0x52b6cd(0x1b2)in _0x5b62b8);}export function createParseErrorResult(_0x5fc452,_0x5e2e64,_0x3d4b33,_0x5d7e15,_0x4159c4='segment'){const _0x396096=a216_0x4ad35e;return{'filePath':_0x5fc452,'relativePath':_0x5e2e64,'source':_0x3d4b33,'result':{'valid':![],'errors':[{'level':_0x396096(0x19e),'path':'','code':_0x396096(0x19a),'message':_0x5d7e15}],'warnings':[]},'fileType':_0x4159c4};}export function validateYamlFile(_0xf2100c,_0x48995f,_0x27667b={}){const _0x395a1e=a216_0x4ad35e,_0x2c6891=a216_0x17ce33['relative'](_0x48995f,_0xf2100c)||a216_0x17ce33[_0x395a1e(0x1b5)](_0xf2100c);try{const _0x530cd7=readFileSync(_0xf2100c,'utf-8'),_0x32a2cb=a216_0x2b9be1[_0x395a1e(0x1b9)](_0x530cd7),_0x50e192=_0x32a2cb['toJSON']();if(!_0x50e192)return createParseErrorResult(_0xf2100c,_0x2c6891,_0x530cd7,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x11bb5f;if(isJourneyDef(_0x50e192,_0xf2100c))_0x11bb5f=_0x395a1e(0x1b0);else{if(isCampaignDef(_0x50e192))_0x11bb5f=_0x395a1e(0x1a2);else{if(isAlwaysOnCampaignDef(_0x50e192))_0x11bb5f=_0x395a1e(0x1a3);else{if(isTemplateDef(_0x50e192))_0x11bb5f=_0x395a1e(0x1ad);else isInBrowserMessageDef(_0x50e192)?_0x11bb5f=_0x395a1e(0x1b8):_0x11bb5f='segment';}}}if(_0x27667b[_0x395a1e(0x1b3)]&&_0x11bb5f!==_0x27667b[_0x395a1e(0x1b3)])return{'filePath':_0xf2100c,'relativePath':_0x2c6891,'skipped':!![],'reason':_0x395a1e(0x1a0)+_0x27667b[_0x395a1e(0x1b3)]};const _0x2c7eef={'source':_0x530cd7,'document':_0x32a2cb};let _0x2bde94;if(_0x11bb5f===_0x395a1e(0x1b0))_0x2bde94=validateJourneyDef(_0x50e192,_0x2c7eef);else{if(_0x11bb5f===_0x395a1e(0x1a2))_0x2bde94=validateCampaignDef(_0x50e192,_0x2c7eef);else{if(_0x11bb5f===_0x395a1e(0x1a3))_0x2bde94=validateAlwaysOnCampaignDef(_0x50e192,_0x2c7eef);else{if(_0x11bb5f===_0x395a1e(0x1ad))_0x2bde94=validateTemplateDef(_0x50e192,_0x2c7eef);else _0x11bb5f===_0x395a1e(0x1b8)?_0x2bde94=validateInBrowserMessageDef(_0x50e192,_0x2c7eef):_0x2bde94=validateSegmentDef(_0x50e192,_0x2c7eef);}}}return{'filePath':_0xf2100c,'relativePath':_0x2c6891,'source':_0x530cd7,'result':_0x2bde94,'fileType':_0x11bb5f};}catch(_0x234f32){const _0xa12ec9=_0x234f32 instanceof Error?_0x234f32['message']:String(_0x234f32);return createParseErrorResult(_0xf2100c,_0x2c6891,'',_0x395a1e(0x1a5)+_0xa12ec9);}}export function validateYamlFiles(_0x673974,_0x1eabd4,_0x2ed41e={}){const _0x29b864=a216_0x4ad35e;return _0x673974[_0x29b864(0x19c)](_0x586b24=>validateYamlFile(_0x586b24,_0x1eabd4,_0x2ed41e));}export function calculateSummary(_0x1ec312){const _0x919e97=a216_0x4ad35e;let _0x2ca5a4=0x0,_0x2fdc98=0x0,_0x5b8bf2=0x0,_0x46a3ec=0x0;for(const _0x3b752b of _0x1ec312){if(!isValidationResult(_0x3b752b)){_0x46a3ec++;continue;}_0x3b752b[_0x919e97(0x1a7)]['valid']?_0x2ca5a4++:_0x2fdc98++,_0x5b8bf2+=_0x3b752b[_0x919e97(0x1a7)]['warnings'][_0x919e97(0x1a9)];}return{'validCount':_0x2ca5a4,'invalidCount':_0x2fdc98,'warningCount':_0x5b8bf2,'skippedCount':_0x46a3ec,'hasErrors':_0x2fdc98>0x0};}
1
+ const a216_0x54f628=a216_0x3406;(function(_0x3d6180,_0x3fb136){const _0x13e693=a216_0x3406,_0xbfae37=_0x3d6180();while(!![]){try{const _0x3b3936=parseInt(_0x13e693(0xd2))/0x1*(-parseInt(_0x13e693(0xe8))/0x2)+parseInt(_0x13e693(0xf3))/0x3*(-parseInt(_0x13e693(0xe4))/0x4)+-parseInt(_0x13e693(0xe2))/0x5+-parseInt(_0x13e693(0xd4))/0x6+-parseInt(_0x13e693(0xe1))/0x7*(-parseInt(_0x13e693(0xd9))/0x8)+parseInt(_0x13e693(0xd8))/0x9*(-parseInt(_0x13e693(0xe3))/0xa)+parseInt(_0x13e693(0xdf))/0xb;if(_0x3b3936===_0x3fb136)break;else _0xbfae37['push'](_0xbfae37['shift']());}catch(_0x3951f3){_0xbfae37['push'](_0xbfae37['shift']());}}}(a216_0x4241,0xd4013));import{readFileSync}from'fs';import*as a216_0x558441 from'path';import*as a216_0x202d0d from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';import{validateAlwaysOnCampaignDef}from'../engage/always-on-campaign-validator.js';import{validateInBrowserMessageDef}from'../engage/in-browser-message-validator.js';import{isJourneyDef}from'./journey-yaml.js';function a216_0x3406(_0x2b062e,_0x5e68a0){_0x2b062e=_0x2b062e-0xd2;const _0x424174=a216_0x4241();let _0x3406c2=_0x424174[_0x2b062e];return _0x3406c2;}const VALID_CAMPAIGN_TYPES=new Set([a216_0x54f628(0xdc),a216_0x54f628(0xe9),a216_0x54f628(0xe5)]);function a216_0x4241(){const _0x665c25=['template','campaign_type','9IBfFsS','16YMJZXe','error','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','email','object','has','63962646SAYgjX','filterType','2681931bHaJIs','2982645OnpGUQ','16260290KfMTAa','1892QvJFww','line','relative','length','47246KaqEih','push','in_browser_message','result','campaign','valid','parseDocument','YAML_PARSE_ERROR','always_on_campaign','toJSON','not\x20a\x20','3909gCxpSY','utf-8','segment','map','58VMehRH','type','9022020wCJAAL','journey'];a216_0x4241=function(){return _0x665c25;};return a216_0x4241();}export{isJourneyDef};export function isCampaignDef(_0x1d6369){const _0x2010d2=a216_0x54f628;if(typeof _0x1d6369!==_0x2010d2(0xdd)||_0x1d6369===null)return![];const _0x55ba57=_0x1d6369,_0x4108a3=VALID_CAMPAIGN_TYPES[_0x2010d2(0xde)](_0x55ba57[_0x2010d2(0xd7)]);if(_0x55ba57[_0x2010d2(0xd3)]==='campaign'&&_0x4108a3)return!![];if(_0x4108a3&&!_0x55ba57[_0x2010d2(0xd3)])return!![];return![];}export function isTemplateDef(_0x370cda){const _0x56526c=a216_0x54f628;return typeof _0x370cda==='object'&&_0x370cda!==null&&_0x56526c(0xd3)in _0x370cda&&_0x370cda['type']===_0x56526c(0xd6);}export function isAlwaysOnCampaignDef(_0x297a53){const _0x6643cb=a216_0x54f628;return typeof _0x297a53===_0x6643cb(0xdd)&&_0x297a53!==null&&_0x6643cb(0xd3)in _0x297a53&&_0x297a53[_0x6643cb(0xd3)]===_0x6643cb(0xf0);}export function isInBrowserMessageDef(_0x22ee15){const _0x43d0b1=a216_0x54f628;return typeof _0x22ee15===_0x43d0b1(0xdd)&&_0x22ee15!==null&&_0x43d0b1(0xd3)in _0x22ee15&&_0x22ee15[_0x43d0b1(0xd3)]===_0x43d0b1(0xea);}export function isValidationResult(_0x10cbcf){return!('skipped'in _0x10cbcf);}export function createParseErrorResult(_0x28579b,_0x57eef5,_0x23999b,_0x15a317,_0x5b27b8=a216_0x54f628(0xf5)){const _0xe52633=a216_0x54f628;return{'filePath':_0x28579b,'relativePath':_0x57eef5,'source':_0x23999b,'result':{'valid':![],'errors':[{'level':_0xe52633(0xda),'path':'','code':_0xe52633(0xef),'message':_0x15a317}],'warnings':[]},'fileType':_0x5b27b8};}export function validateYamlFile(_0x43b436,_0x237b83,_0x122bf3={}){const _0x41e130=a216_0x54f628,_0x519dd4=a216_0x558441[_0x41e130(0xe6)](_0x237b83,_0x43b436)||a216_0x558441['basename'](_0x43b436);try{const _0x36f2e0=readFileSync(_0x43b436,_0x41e130(0xf4)),_0xeacbce=a216_0x202d0d[_0x41e130(0xee)](_0x36f2e0),_0x3ab53f=_0xeacbce[_0x41e130(0xf1)]();if(!_0x3ab53f)return createParseErrorResult(_0x43b436,_0x519dd4,_0x36f2e0,_0x41e130(0xdb));let _0x4c0e62;if(isJourneyDef(_0x3ab53f,_0x43b436))_0x4c0e62='journey';else{if(isCampaignDef(_0x3ab53f))_0x4c0e62=_0x41e130(0xec);else{if(isAlwaysOnCampaignDef(_0x3ab53f))_0x4c0e62=_0x41e130(0xf0);else{if(isTemplateDef(_0x3ab53f))_0x4c0e62=_0x41e130(0xd6);else isInBrowserMessageDef(_0x3ab53f)?_0x4c0e62=_0x41e130(0xea):_0x4c0e62=_0x41e130(0xf5);}}}if(_0x122bf3[_0x41e130(0xe0)]&&_0x4c0e62!==_0x122bf3[_0x41e130(0xe0)])return{'filePath':_0x43b436,'relativePath':_0x519dd4,'skipped':!![],'reason':_0x41e130(0xf2)+_0x122bf3[_0x41e130(0xe0)]};const _0x58109d={'source':_0x36f2e0,'document':_0xeacbce};let _0x24516f;if(_0x4c0e62===_0x41e130(0xd5))_0x24516f=validateJourneyDef(_0x3ab53f,_0x58109d);else{if(_0x4c0e62==='campaign')_0x24516f=validateCampaignDef(_0x3ab53f,_0x58109d);else{if(_0x4c0e62===_0x41e130(0xf0))_0x24516f=validateAlwaysOnCampaignDef(_0x3ab53f,_0x58109d);else{if(_0x4c0e62===_0x41e130(0xd6))_0x24516f=validateTemplateDef(_0x3ab53f,_0x58109d);else _0x4c0e62===_0x41e130(0xea)?_0x24516f=validateInBrowserMessageDef(_0x3ab53f,_0x58109d):_0x24516f=validateSegmentDef(_0x3ab53f,_0x58109d);}}}return{'filePath':_0x43b436,'relativePath':_0x519dd4,'source':_0x36f2e0,'result':_0x24516f,'fileType':_0x4c0e62};}catch(_0x263e68){const _0x129322=_0x263e68 instanceof Error?_0x263e68['message']:String(_0x263e68);return createParseErrorResult(_0x43b436,_0x519dd4,'','YAML\x20parse\x20error:\x20'+_0x129322);}}export function validateYamlFiles(_0x197d69,_0x32e5e2,_0x5ac34c={}){const _0x2a86df=a216_0x54f628;return _0x197d69[_0x2a86df(0xf6)](_0xb355f6=>validateYamlFile(_0xb355f6,_0x32e5e2,_0x5ac34c));}export function calculateSummary(_0xd0bb04){const _0x1341eb=a216_0x54f628;let _0x1f4db4=0x0,_0x86f69a=0x0,_0x39baea=0x0,_0x131671=0x0;for(const _0x684d85 of _0xd0bb04){if(!isValidationResult(_0x684d85)){_0x131671++;continue;}_0x684d85[_0x1341eb(0xeb)][_0x1341eb(0xed)]?_0x1f4db4++:_0x86f69a++,_0x39baea+=_0x684d85[_0x1341eb(0xeb)]['warnings'][_0x1341eb(0xe7)];}return{'validCount':_0x1f4db4,'invalidCount':_0x86f69a,'warningCount':_0x39baea,'skippedCount':_0x131671,'hasErrors':_0x86f69a>0x0};}
@@ -1 +1 @@
1
- (function(_0x2bcd5a,_0x53b5bb){const _0x3943ff=a217_0x3b4a,_0x3ea0ce=_0x2bcd5a();while(!![]){try{const _0x4e61c7=-parseInt(_0x3943ff(0xa7))/0x1*(-parseInt(_0x3943ff(0xba))/0x2)+-parseInt(_0x3943ff(0xad))/0x3+parseInt(_0x3943ff(0xca))/0x4+-parseInt(_0x3943ff(0xaa))/0x5*(parseInt(_0x3943ff(0xc9))/0x6)+parseInt(_0x3943ff(0xc6))/0x7*(parseInt(_0x3943ff(0xa3))/0x8)+-parseInt(_0x3943ff(0xc7))/0x9*(parseInt(_0x3943ff(0xae))/0xa)+parseInt(_0x3943ff(0xc1))/0xb;if(_0x4e61c7===_0x53b5bb)break;else _0x3ea0ce['push'](_0x3ea0ce['shift']());}catch(_0x30c470){_0x3ea0ce['push'](_0x3ea0ce['shift']());}}}(a217_0x1004,0xb62c6));import*as a217_0x44feb4 from'yaml';function a217_0x1004(){const _0x51c38c=['getIn','object','location','20FLFIse','\x27:\x20','warnings','range','yellow','column','cyan','12071191HGtEBQ','repeat','max','code','length','85001XGvkQe','567ALmLRm','issues','10026wLEOrF','106420aUufWw','success','toString','dim','path','760FRoJIp','number','errors','error','1262SyziEg','flatMap','pop','335cTBhQe','join','parse','280473jdNfUA','212470uMoVpM','split','push','level','red','padStart','contents','message','Invalid\x20YAML:\x20expected\x20an\x20object'];a217_0x1004=function(){return _0x51c38c;};return a217_0x1004();}import a217_0x1bcebb from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x210d3b,_0x1410e1,_0x2118df){const _0x76f894=a217_0x3b4a;if(!_0x210d3b||!_0x1410e1)return undefined;try{let _0x4568ff=_0x210d3b[_0x76f894(0xb7)](_0x2118df,!![]),_0x3cafd4=[..._0x2118df];while((!_0x4568ff||typeof _0x4568ff!=='object'||!(_0x76f894(0xbd)in _0x4568ff)||!_0x4568ff[_0x76f894(0xbd)])&&_0x3cafd4[_0x76f894(0xc5)]>0x0){_0x3cafd4[_0x76f894(0xa9)](),_0x4568ff=_0x3cafd4[_0x76f894(0xc5)]>0x0?_0x210d3b[_0x76f894(0xb7)](_0x3cafd4,!![]):_0x210d3b[_0x76f894(0xb4)];}if(!_0x4568ff||typeof _0x4568ff!==_0x76f894(0xb8)||!(_0x76f894(0xbd)in _0x4568ff)||!_0x4568ff['range'])return undefined;const [_0x39e299]=_0x4568ff[_0x76f894(0xbd)];return offsetToLocation(_0x1410e1,_0x39e299);}catch{return undefined;}}export function offsetToLocation(_0x18acda,_0x314632){const _0x37a5a2=a217_0x3b4a;let _0x2e965c=0x1,_0x54c36d=0x1;for(let _0x3f3ca6=0x0;_0x3f3ca6<_0x314632&&_0x3f3ca6<_0x18acda[_0x37a5a2(0xc5)];_0x3f3ca6++){_0x18acda[_0x3f3ca6]==='\x0a'?(_0x2e965c++,_0x54c36d=0x1):_0x54c36d++;}return{'line':_0x2e965c,'column':_0x54c36d,'offset':_0x314632};}export function pathToArray(_0x250f33){const _0x4b73ca=a217_0x3b4a;if(!_0x250f33)return[];return _0x250f33[_0x4b73ca(0xaf)]('.')[_0x4b73ca(0xa8)](_0x161bc3=>{const _0x6d05af=_0x161bc3['match'](/^(\w+)\[(\d+)\]$/);if(_0x6d05af)return[_0x6d05af[0x1],parseInt(_0x6d05af[0x2],0xa)];return[_0x161bc3];});}export function formatZodPath(_0x3c2d25){const _0x1dfab1=a217_0x3b4a;let _0x150a0c='';for(const _0x5f37a6 of _0x3c2d25){if(typeof _0x5f37a6===_0x1dfab1(0xa4))_0x150a0c+='['+_0x5f37a6+']';else{const _0x1e4c86=String(_0x5f37a6);_0x150a0c+=_0x150a0c?'.'+_0x1e4c86:_0x1e4c86;}}return _0x150a0c;}export function flattenZodIssues(_0x5cd092){const _0x5bf36f=a217_0x3b4a,_0x286e0c=[];for(const _0x2ceb64 of _0x5cd092){if(_0x2ceb64['code']==='invalid_union'&&_0x5bf36f(0xa5)in _0x2ceb64){const _0x5e5bce=_0x2ceb64[_0x5bf36f(0xa5)];let _0x290eed=_0x5e5bce[0x0]||[];for(const _0x1e5a4c of _0x5e5bce){_0x1e5a4c['length']<_0x290eed[_0x5bf36f(0xc5)]&&(_0x290eed=_0x1e5a4c);}const _0x46c8a6=_0x290eed['map'](_0x15a5d5=>({..._0x15a5d5,'path':[..._0x2ceb64[_0x5bf36f(0xa2)],..._0x15a5d5[_0x5bf36f(0xa2)]]}));_0x286e0c[_0x5bf36f(0xb0)](...flattenZodIssues(_0x46c8a6));}else _0x286e0c[_0x5bf36f(0xb0)](_0x2ceb64);}return _0x286e0c;}export function safeParseYaml(_0x201724,_0x4c5c0b){const _0x644503=a217_0x3b4a,_0x34eb86=a217_0x44feb4[_0x644503(0xac)](_0x201724);if(!_0x34eb86||typeof _0x34eb86!==_0x644503(0xb8))throw new Error(_0x644503(0xb6));const _0x120596=_0x4c5c0b['safeParse'](_0x34eb86);if(!_0x120596[_0x644503(0x9f)]){const _0x227c5d=_0x120596[_0x644503(0xa6)][_0x644503(0xc8)][0x0],_0x497818=formatZodPath(_0x227c5d[_0x644503(0xa2)]);throw new Error(_0x497818?'YAML\x20validation\x20error\x20at\x20\x27'+_0x497818+_0x644503(0xbb)+_0x227c5d[_0x644503(0xb5)]:'YAML\x20validation\x20error:\x20'+_0x227c5d[_0x644503(0xb5)]);}return _0x120596['data'];}export function formatIssueWithContext(_0x4d40aa,_0x1ca2ff,_0x28561e){const _0xda25ac=a217_0x3b4a,_0x6d2420=[],_0xb53271=_0x4d40aa[_0xda25ac(0xb1)]==='error',_0x1c39df=_0xb53271?a217_0x1bcebb[_0xda25ac(0xb2)]:a217_0x1bcebb[_0xda25ac(0xbe)],_0x2107a4=_0xb53271?a217_0x1bcebb['red']:a217_0x1bcebb[_0xda25ac(0xbe)],_0x2010b6=_0x28561e?a217_0x1bcebb[_0xda25ac(0xc0)](_0x28561e+':'):'';if(_0x4d40aa[_0xda25ac(0xb9)]){const _0x5d7ac7=a217_0x1bcebb[_0xda25ac(0xc0)](_0x4d40aa[_0xda25ac(0xb9)]['line']+':'+_0x4d40aa[_0xda25ac(0xb9)][_0xda25ac(0xbf)]);_0x6d2420['push'](''+_0x2010b6+_0x5d7ac7+':\x20'+_0x1c39df(_0x4d40aa[_0xda25ac(0xb1)])+'\x20'+_0x2107a4('['+_0x4d40aa[_0xda25ac(0xc4)]+']'));}else _0x6d2420['push'](''+_0x2010b6+a217_0x1bcebb[_0xda25ac(0xa1)](_0x4d40aa[_0xda25ac(0xa2)])+':\x20'+_0x1c39df(_0x4d40aa[_0xda25ac(0xb1)])+'\x20'+_0x2107a4('['+_0x4d40aa[_0xda25ac(0xc4)]+']'));_0x6d2420[_0xda25ac(0xb0)](_0x4d40aa[_0xda25ac(0xb5)]);if(_0x4d40aa['location']&&_0x1ca2ff){const _0x499ec8=_0x1ca2ff[_0xda25ac(0xaf)]('\x0a'),{line:_0x3e4687,column:_0xebbc6c}=_0x4d40aa['location'],_0x3bc962=Math[_0xda25ac(0xc3)](0x1,_0x3e4687-0x1),_0x2320f4=Math['min'](_0x499ec8['length'],_0x3e4687+0x1);_0x6d2420['push']('');for(let _0xd2ddf2=_0x3bc962;_0xd2ddf2<=_0x2320f4;_0xd2ddf2++){const _0x2081f3=_0x499ec8[_0xd2ddf2-0x1]||'',_0xf9879b=a217_0x1bcebb[_0xda25ac(0xa1)](_0xd2ddf2[_0xda25ac(0xa0)]()[_0xda25ac(0xb3)](0x4)),_0x4b1fa9=a217_0x1bcebb[_0xda25ac(0xa1)]('\x20|\x20');if(_0xd2ddf2===_0x3e4687){_0x6d2420[_0xda25ac(0xb0)]('\x20\x20'+_0xf9879b+_0x4b1fa9+_0x1c39df(_0x2081f3));const _0x3001cf='\x20'[_0xda25ac(0xc2)](0x4+0x3+_0xebbc6c-0x1);_0x6d2420[_0xda25ac(0xb0)]('\x20\x20'+_0x3001cf+_0x1c39df('^'));}else _0x6d2420['push']('\x20\x20'+_0xf9879b+_0x4b1fa9+a217_0x1bcebb[_0xda25ac(0xa1)](_0x2081f3));}}return _0x6d2420[_0xda25ac(0xab)]('\x0a');}function a217_0x3b4a(_0x1abf80,_0x7b6334){_0x1abf80=_0x1abf80-0x9f;const _0x1004f5=a217_0x1004();let _0x3b4a9f=_0x1004f5[_0x1abf80];return _0x3b4a9f;}export function formatValidationResult(_0x25b333,_0x29f1d6,_0x8232e2){const _0x40627=a217_0x3b4a,_0x30255a=[];for(const _0x1712d5 of _0x25b333['errors']){_0x30255a[_0x40627(0xb0)](formatIssueWithContext(_0x1712d5,_0x29f1d6,_0x8232e2)),_0x30255a[_0x40627(0xb0)]('');}for(const _0x1b16be of _0x25b333[_0x40627(0xbc)]){_0x30255a[_0x40627(0xb0)](formatIssueWithContext(_0x1b16be,_0x29f1d6,_0x8232e2)),_0x30255a[_0x40627(0xb0)]('');}return _0x30255a['join']('\x0a');}
1
+ (function(_0x61eada,_0x1d9205){const _0x336b81=a217_0x2553,_0x1d44b7=_0x61eada();while(!![]){try{const _0x447fea=parseInt(_0x336b81(0xb6))/0x1*(parseInt(_0x336b81(0xca))/0x2)+parseInt(_0x336b81(0xa2))/0x3+-parseInt(_0x336b81(0xbc))/0x4*(parseInt(_0x336b81(0xb5))/0x5)+parseInt(_0x336b81(0xc5))/0x6+-parseInt(_0x336b81(0xa1))/0x7*(-parseInt(_0x336b81(0xc3))/0x8)+parseInt(_0x336b81(0x9e))/0x9+-parseInt(_0x336b81(0xac))/0xa;if(_0x447fea===_0x1d9205)break;else _0x1d44b7['push'](_0x1d44b7['shift']());}catch(_0x1a4e9d){_0x1d44b7['push'](_0x1d44b7['shift']());}}}(a217_0x1e70,0x48bfe));import*as a217_0x42e79d from'yaml';import a217_0xa45ccf from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x3008bd,_0x327d43,_0x14b32b){const _0x5b79e1=a217_0x2553;if(!_0x3008bd||!_0x327d43)return undefined;try{let _0x3143e1=_0x3008bd[_0x5b79e1(0xb1)](_0x14b32b,!![]),_0x5befb1=[..._0x14b32b];while((!_0x3143e1||typeof _0x3143e1!=='object'||!(_0x5b79e1(0xc6)in _0x3143e1)||!_0x3143e1[_0x5b79e1(0xc6)])&&_0x5befb1[_0x5b79e1(0xc4)]>0x0){_0x5befb1[_0x5b79e1(0xad)](),_0x3143e1=_0x5befb1[_0x5b79e1(0xc4)]>0x0?_0x3008bd['getIn'](_0x5befb1,!![]):_0x3008bd[_0x5b79e1(0xc0)];}if(!_0x3143e1||typeof _0x3143e1!==_0x5b79e1(0xc1)||!(_0x5b79e1(0xc6)in _0x3143e1)||!_0x3143e1[_0x5b79e1(0xc6)])return undefined;const [_0x9b2231]=_0x3143e1[_0x5b79e1(0xc6)];return offsetToLocation(_0x327d43,_0x9b2231);}catch{return undefined;}}export function offsetToLocation(_0x50eaeb,_0x3a518a){let _0x5a02f5=0x1,_0x4f9c46=0x1;for(let _0x2c250d=0x0;_0x2c250d<_0x3a518a&&_0x2c250d<_0x50eaeb['length'];_0x2c250d++){_0x50eaeb[_0x2c250d]==='\x0a'?(_0x5a02f5++,_0x4f9c46=0x1):_0x4f9c46++;}return{'line':_0x5a02f5,'column':_0x4f9c46,'offset':_0x3a518a};}export function pathToArray(_0x2dedcd){const _0xecdf5e=a217_0x2553;if(!_0x2dedcd)return[];return _0x2dedcd[_0xecdf5e(0x9f)]('.')[_0xecdf5e(0xc7)](_0x2317d7=>{const _0x4de01f=_0xecdf5e,_0x42ef56=_0x2317d7[_0x4de01f(0xc9)](/^(\w+)\[(\d+)\]$/);if(_0x42ef56)return[_0x42ef56[0x1],parseInt(_0x42ef56[0x2],0xa)];return[_0x2317d7];});}export function formatZodPath(_0x1f3b3b){let _0x5862bc='';for(const _0x4b93d5 of _0x1f3b3b){if(typeof _0x4b93d5==='number')_0x5862bc+='['+_0x4b93d5+']';else{const _0x2e54d3=String(_0x4b93d5);_0x5862bc+=_0x5862bc?'.'+_0x2e54d3:_0x2e54d3;}}return _0x5862bc;}export function flattenZodIssues(_0x4266c4){const _0x555e1a=a217_0x2553,_0x5e1808=[];for(const _0x24bb1f of _0x4266c4){if(_0x24bb1f[_0x555e1a(0xa6)]===_0x555e1a(0xbd)&&_0x555e1a(0xc2)in _0x24bb1f){const _0x2e5df0=_0x24bb1f['errors'];let _0x3b43a4=_0x2e5df0[0x0]||[];for(const _0x37af9c of _0x2e5df0){_0x37af9c[_0x555e1a(0xc4)]<_0x3b43a4[_0x555e1a(0xc4)]&&(_0x3b43a4=_0x37af9c);}const _0x1358a2=_0x3b43a4[_0x555e1a(0xa0)](_0x489736=>({..._0x489736,'path':[..._0x24bb1f[_0x555e1a(0xaa)],..._0x489736[_0x555e1a(0xaa)]]}));_0x5e1808[_0x555e1a(0xab)](...flattenZodIssues(_0x1358a2));}else _0x5e1808[_0x555e1a(0xab)](_0x24bb1f);}return _0x5e1808;}function a217_0x1e70(){const _0x34e125=['min','dim','path','push','12075300IvJQSB','pop','padStart','\x27:\x20','Invalid\x20YAML:\x20expected\x20an\x20object','getIn','column','repeat','safeParse','48610FcxoJP','185979acOqCa','message','issues','location','join','cyan','212hYjvzS','invalid_union','red','line','contents','object','errors','69544rwwEtf','length','3317916SOfSen','range','flatMap','error','match','2aovbNW','4481226lVdXdt','split','map','315iwdwKD','1178142EjvMPd','level','data','\x20|\x20','code','toString'];a217_0x1e70=function(){return _0x34e125;};return a217_0x1e70();}export function safeParseYaml(_0x3fc18d,_0x50dc43){const _0xa2f23d=a217_0x2553,_0x2e8b8f=a217_0x42e79d['parse'](_0x3fc18d);if(!_0x2e8b8f||typeof _0x2e8b8f!==_0xa2f23d(0xc1))throw new Error(_0xa2f23d(0xb0));const _0x3ca5aa=_0x50dc43[_0xa2f23d(0xb4)](_0x2e8b8f);if(!_0x3ca5aa['success']){const _0x49148d=_0x3ca5aa['error'][_0xa2f23d(0xb8)][0x0],_0x943322=formatZodPath(_0x49148d[_0xa2f23d(0xaa)]);throw new Error(_0x943322?'YAML\x20validation\x20error\x20at\x20\x27'+_0x943322+_0xa2f23d(0xaf)+_0x49148d[_0xa2f23d(0xb7)]:'YAML\x20validation\x20error:\x20'+_0x49148d[_0xa2f23d(0xb7)]);}return _0x3ca5aa[_0xa2f23d(0xa4)];}export function formatIssueWithContext(_0x5a1fa5,_0x22fcb4,_0x19f4bc){const _0x46d061=a217_0x2553,_0xbeb5=[],_0xfe14a7=_0x5a1fa5[_0x46d061(0xa3)]===_0x46d061(0xc8),_0x574d1b=_0xfe14a7?a217_0xa45ccf[_0x46d061(0xbe)]:a217_0xa45ccf['yellow'],_0x225c05=_0xfe14a7?a217_0xa45ccf['red']:a217_0xa45ccf['yellow'],_0x6b1abc=_0x19f4bc?a217_0xa45ccf['cyan'](_0x19f4bc+':'):'';if(_0x5a1fa5[_0x46d061(0xb9)]){const _0x42c7bd=a217_0xa45ccf[_0x46d061(0xbb)](_0x5a1fa5[_0x46d061(0xb9)][_0x46d061(0xbf)]+':'+_0x5a1fa5[_0x46d061(0xb9)][_0x46d061(0xb2)]);_0xbeb5[_0x46d061(0xab)](''+_0x6b1abc+_0x42c7bd+':\x20'+_0x574d1b(_0x5a1fa5['level'])+'\x20'+_0x225c05('['+_0x5a1fa5[_0x46d061(0xa6)]+']'));}else _0xbeb5[_0x46d061(0xab)](''+_0x6b1abc+a217_0xa45ccf['dim'](_0x5a1fa5[_0x46d061(0xaa)])+':\x20'+_0x574d1b(_0x5a1fa5[_0x46d061(0xa3)])+'\x20'+_0x225c05('['+_0x5a1fa5[_0x46d061(0xa6)]+']'));_0xbeb5['push'](_0x5a1fa5[_0x46d061(0xb7)]);if(_0x5a1fa5['location']&&_0x22fcb4){const _0x5c9af7=_0x22fcb4[_0x46d061(0x9f)]('\x0a'),{line:_0x341481,column:_0x1fd30e}=_0x5a1fa5[_0x46d061(0xb9)],_0x2702e4=Math['max'](0x1,_0x341481-0x1),_0x4f7de7=Math[_0x46d061(0xa8)](_0x5c9af7[_0x46d061(0xc4)],_0x341481+0x1);_0xbeb5[_0x46d061(0xab)]('');for(let _0x40c24a=_0x2702e4;_0x40c24a<=_0x4f7de7;_0x40c24a++){const _0x2ee024=_0x5c9af7[_0x40c24a-0x1]||'',_0x4b465d=a217_0xa45ccf['dim'](_0x40c24a[_0x46d061(0xa7)]()[_0x46d061(0xae)](0x4)),_0x253c57=a217_0xa45ccf[_0x46d061(0xa9)](_0x46d061(0xa5));if(_0x40c24a===_0x341481){_0xbeb5[_0x46d061(0xab)]('\x20\x20'+_0x4b465d+_0x253c57+_0x574d1b(_0x2ee024));const _0x551c91='\x20'[_0x46d061(0xb3)](0x4+0x3+_0x1fd30e-0x1);_0xbeb5[_0x46d061(0xab)]('\x20\x20'+_0x551c91+_0x574d1b('^'));}else _0xbeb5[_0x46d061(0xab)]('\x20\x20'+_0x4b465d+_0x253c57+a217_0xa45ccf[_0x46d061(0xa9)](_0x2ee024));}}return _0xbeb5[_0x46d061(0xba)]('\x0a');}function a217_0x2553(_0x379a51,_0x4f482e){_0x379a51=_0x379a51-0x9e;const _0x1e7080=a217_0x1e70();let _0x2553a8=_0x1e7080[_0x379a51];return _0x2553a8;}export function formatValidationResult(_0x44bc9b,_0x5e686e,_0x44f678){const _0x2b8044=a217_0x2553,_0x4fb3e9=[];for(const _0x51f3ae of _0x44bc9b['errors']){_0x4fb3e9[_0x2b8044(0xab)](formatIssueWithContext(_0x51f3ae,_0x5e686e,_0x44f678)),_0x4fb3e9['push']('');}for(const _0x34b11d of _0x44bc9b['warnings']){_0x4fb3e9['push'](formatIssueWithContext(_0x34b11d,_0x5e686e,_0x44f678)),_0x4fb3e9[_0x2b8044(0xab)]('');}return _0x4fb3e9['join']('\x0a');}