@treasuredata/tdx 2026.7.2 → 2026.7.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 (246) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.d.ts.map +1 -1
  10. package/dist/commands/auth-command.js +1 -1
  11. package/dist/commands/auth-command.js.map +1 -1
  12. package/dist/commands/cas-command.js +1 -1
  13. package/dist/commands/cas-segment-command.js +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/claude-command.d.ts.map +1 -1
  16. package/dist/commands/claude-command.js +1 -1
  17. package/dist/commands/claude-command.js.map +1 -1
  18. package/dist/commands/claude-statusline-command.js +1 -1
  19. package/dist/commands/claude-usage-command.js +1 -1
  20. package/dist/commands/command.js +1 -1
  21. package/dist/commands/connection-command.js +1 -1
  22. package/dist/commands/databases.js +1 -1
  23. package/dist/commands/delivery-command.js +1 -1
  24. package/dist/commands/describe.js +1 -1
  25. package/dist/commands/engage-campaign-pull-command.js +1 -1
  26. package/dist/commands/engage-campaign-push-command.js +1 -1
  27. package/dist/commands/engage-campaign-validate-command.js +1 -1
  28. package/dist/commands/engage-command.js +1 -1
  29. package/dist/commands/engage-template-pull-command.js +1 -1
  30. package/dist/commands/engage-template-push-command.js +1 -1
  31. package/dist/commands/engage-template-validate-command.js +1 -1
  32. package/dist/commands/job-command.js +1 -1
  33. package/dist/commands/journey-command.js +1 -1
  34. package/dist/commands/journey-validate-command.js +1 -1
  35. package/dist/commands/llm-command.js +1 -1
  36. package/dist/commands/mcp-command.js +1 -1
  37. package/dist/commands/parent-segment-command.js +1 -1
  38. package/dist/commands/policy-command.js +1 -1
  39. package/dist/commands/profile-command.js +1 -1
  40. package/dist/commands/profiles-command.js +1 -1
  41. package/dist/commands/query-command.js +1 -1
  42. package/dist/commands/schedule-command.js +1 -1
  43. package/dist/commands/segment-command.js +1 -1
  44. package/dist/commands/segment-create-command.js +1 -1
  45. package/dist/commands/segment-fields-command.js +1 -1
  46. package/dist/commands/segment-move-command.js +1 -1
  47. package/dist/commands/segment-pull-command.js +1 -1
  48. package/dist/commands/segment-push-command.js +1 -1
  49. package/dist/commands/segment-update-command.js +1 -1
  50. package/dist/commands/segment-use-command.js +1 -1
  51. package/dist/commands/segment-validate-command.js +1 -1
  52. package/dist/commands/segments.js +1 -1
  53. package/dist/commands/show.js +1 -1
  54. package/dist/commands/status-command.js +1 -1
  55. package/dist/commands/table-deleted.js +1 -1
  56. package/dist/commands/tables.js +1 -1
  57. package/dist/commands/unset-command.js +1 -1
  58. package/dist/commands/upgrade-command.js +1 -1
  59. package/dist/commands/use-command.js +1 -1
  60. package/dist/commands/user-command.js +1 -1
  61. package/dist/commands/work-command.js +1 -1
  62. package/dist/commands/workflow-command.js +1 -1
  63. package/dist/core/auth.js +1 -1
  64. package/dist/core/command-output.js +1 -1
  65. package/dist/core/config.js +1 -1
  66. package/dist/core/connection-cache.js +1 -1
  67. package/dist/core/constants.js +1 -1
  68. package/dist/core/credential-cache.js +1 -1
  69. package/dist/core/global-context.js +1 -1
  70. package/dist/core/keychain.js +1 -1
  71. package/dist/core/oauth-keychain.js +1 -1
  72. package/dist/core/oauth.d.ts +11 -2
  73. package/dist/core/oauth.d.ts.map +1 -1
  74. package/dist/core/oauth.js +1 -1
  75. package/dist/core/oauth.js.map +1 -1
  76. package/dist/core/profile.js +1 -1
  77. package/dist/core/project-config.js +1 -1
  78. package/dist/core/session.js +1 -1
  79. package/dist/core/user-cache.js +1 -1
  80. package/dist/core/version.js +1 -1
  81. package/dist/index.js +1 -1
  82. package/dist/mcp/server.js +1 -1
  83. package/dist/mcp/tools/index.js +1 -1
  84. package/dist/mcp/tools/tdx-run.js +1 -1
  85. package/dist/mcp/tools/tdx-search.js +1 -1
  86. package/dist/mcp/tools/work-create-item.js +1 -1
  87. package/dist/mcp/utils.js +1 -1
  88. package/dist/proxy/claude-usage-tracker.js +1 -1
  89. package/dist/proxy/passthrough-server.d.ts +16 -0
  90. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  91. package/dist/proxy/passthrough-server.js +1 -1
  92. package/dist/proxy/passthrough-server.js.map +1 -1
  93. package/dist/proxy/sse-usage-parser.js +1 -1
  94. package/dist/sdk/agent/agent-config.js +1 -1
  95. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  96. package/dist/sdk/agent/agent-yaml.js +1 -1
  97. package/dist/sdk/agent/test/evaluator.js +1 -1
  98. package/dist/sdk/agent/test/executor.js +1 -1
  99. package/dist/sdk/agent/test/index.js +1 -1
  100. package/dist/sdk/agent/test/output.js +1 -1
  101. package/dist/sdk/agent/test/parser.js +1 -1
  102. package/dist/sdk/agent/tool-target-registry.js +1 -1
  103. package/dist/sdk/api.js +1 -1
  104. package/dist/sdk/cas/cas-api-client.js +1 -1
  105. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  106. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  107. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  108. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  109. package/dist/sdk/cas/index.js +1 -1
  110. package/dist/sdk/cas/pull-workflow.js +1 -1
  111. package/dist/sdk/cas/push-workflow.js +1 -1
  112. package/dist/sdk/cas/validate-files.js +1 -1
  113. package/dist/sdk/client/cdp-api-client.js +1 -1
  114. package/dist/sdk/client/delivery-api-client.js +1 -1
  115. package/dist/sdk/client/endpoints.js +1 -1
  116. package/dist/sdk/client/engage-api-client.js +1 -1
  117. package/dist/sdk/client/http-client.js +1 -1
  118. package/dist/sdk/client/llm-api-client.js +1 -1
  119. package/dist/sdk/client/oauth-refresh.d.ts +5 -1
  120. package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
  121. package/dist/sdk/client/oauth-refresh.js +1 -1
  122. package/dist/sdk/client/oauth-refresh.js.map +1 -1
  123. package/dist/sdk/client/rate-limiter.js +1 -1
  124. package/dist/sdk/client/td-api-client.js +1 -1
  125. package/dist/sdk/client/trino-api-client.js +1 -1
  126. package/dist/sdk/client/workflow-client.js +1 -1
  127. package/dist/sdk/connection-validator.js +1 -1
  128. package/dist/sdk/connection.js +1 -1
  129. package/dist/sdk/delivery.js +1 -1
  130. package/dist/sdk/engage/campaign-pull.js +1 -1
  131. package/dist/sdk/engage/campaign-push.js +1 -1
  132. package/dist/sdk/engage/campaign-validator.js +1 -1
  133. package/dist/sdk/engage/campaign-yaml.js +1 -1
  134. package/dist/sdk/engage/template-pull.js +1 -1
  135. package/dist/sdk/engage/template-push.js +1 -1
  136. package/dist/sdk/engage/template-validator.js +1 -1
  137. package/dist/sdk/engage/template-yaml.js +1 -1
  138. package/dist/sdk/engage/types/campaign-def.js +1 -1
  139. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  140. package/dist/sdk/engage/types/template-schema.js +1 -1
  141. package/dist/sdk/engage.js +1 -1
  142. package/dist/sdk/errors.js +1 -1
  143. package/dist/sdk/index.js +1 -1
  144. package/dist/sdk/io/index.js +1 -1
  145. package/dist/sdk/io/node-filesystem.js +1 -1
  146. package/dist/sdk/job.js +1 -1
  147. package/dist/sdk/journey.js +1 -1
  148. package/dist/sdk/llm/chat-cache.js +1 -1
  149. package/dist/sdk/llm/index.js +1 -1
  150. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  151. package/dist/sdk/llm/model-factors.js +1 -1
  152. package/dist/sdk/llm/user-settings.js +1 -1
  153. package/dist/sdk/personalization.js +1 -1
  154. package/dist/sdk/policy.js +1 -1
  155. package/dist/sdk/query/deleted-table-validation.js +1 -1
  156. package/dist/sdk/query/index.js +1 -1
  157. package/dist/sdk/query/sql-parser.js +1 -1
  158. package/dist/sdk/realtime.js +1 -1
  159. package/dist/sdk/schedule.js +1 -1
  160. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  161. package/dist/sdk/segment/fields-display.js +1 -1
  162. package/dist/sdk/segment/file-discovery.js +1 -1
  163. package/dist/sdk/segment/journey-utils.js +1 -1
  164. package/dist/sdk/segment/journey-validator.js +1 -1
  165. package/dist/sdk/segment/journey-yaml.js +1 -1
  166. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  167. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  168. package/dist/sdk/segment/pull-workflow.js +1 -1
  169. package/dist/sdk/segment/push-recovery.js +1 -1
  170. package/dist/sdk/segment/push-workflow.js +1 -1
  171. package/dist/sdk/segment/resolution-context.js +1 -1
  172. package/dist/sdk/segment/segment-path-parser.js +1 -1
  173. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  174. package/dist/sdk/segment/segment-validator.js +1 -1
  175. package/dist/sdk/segment/target-resolution.js +1 -1
  176. package/dist/sdk/segment/tdx-config.js +1 -1
  177. package/dist/sdk/segment/types/activation-schema.js +1 -1
  178. package/dist/sdk/segment/types/journey-def.js +1 -1
  179. package/dist/sdk/segment/types/journey-schema.js +1 -1
  180. package/dist/sdk/segment/types/segment-def.js +1 -1
  181. package/dist/sdk/segment/types/segment-schema.js +1 -1
  182. package/dist/sdk/segment/validate-files.js +1 -1
  183. package/dist/sdk/segment/yaml-validator.js +1 -1
  184. package/dist/sdk/segment.js +1 -1
  185. package/dist/sdk/types/index.js +1 -1
  186. package/dist/sdk/types/progress.js +1 -1
  187. package/dist/sdk/types/workspace.js +1 -1
  188. package/dist/sdk/user.js +1 -1
  189. package/dist/sdk/util/format-detector.js +1 -1
  190. package/dist/sdk/util/formatters.js +1 -1
  191. package/dist/sdk/util/index.js +1 -1
  192. package/dist/sdk/util/paginate.js +1 -1
  193. package/dist/sdk/util/tree-formatter.js +1 -1
  194. package/dist/sdk/util/tree-search.js +1 -1
  195. package/dist/sdk/workflow/archive-validation.js +1 -1
  196. package/dist/sdk/workflow/clone-workflow.js +1 -1
  197. package/dist/sdk/workflow/index.js +1 -1
  198. package/dist/sdk/workflow/pull-workflow.js +1 -1
  199. package/dist/sdk/workflow/push-workflow.js +1 -1
  200. package/dist/sdk/workflow/task-graph.js +1 -1
  201. package/dist/sdk/workflow/tdx-config.js +1 -1
  202. package/dist/sdk/workflow/workflow-utils.js +1 -1
  203. package/dist/sdk/workspace/access-tracker.js +1 -1
  204. package/dist/sdk/workspace/frontmatter.js +1 -1
  205. package/dist/sdk/workspace/git.js +1 -1
  206. package/dist/sdk/workspace/index.js +1 -1
  207. package/dist/sdk/workspace/templates.js +1 -1
  208. package/dist/sdk/workspace/weekly.js +1 -1
  209. package/dist/sdk/workspace/wikilinks.js +1 -1
  210. package/dist/test-utils/command-runner.js +1 -1
  211. package/dist/test-utils/factories.js +1 -1
  212. package/dist/test-utils/fixtures.js +1 -1
  213. package/dist/test-utils/http-mock.js +1 -1
  214. package/dist/test-utils/index.js +1 -1
  215. package/dist/utils/async.js +1 -1
  216. package/dist/utils/colors.js +1 -1
  217. package/dist/utils/diff.js +1 -1
  218. package/dist/utils/file-permissions.js +1 -1
  219. package/dist/utils/file-reader.js +1 -1
  220. package/dist/utils/github-releases.js +1 -1
  221. package/dist/utils/global-cache.js +1 -1
  222. package/dist/utils/json-loader.js +1 -1
  223. package/dist/utils/local-cache.js +1 -1
  224. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  225. package/dist/utils/logger/formatters/index.js +1 -1
  226. package/dist/utils/logger/handlers/console-handler.js +1 -1
  227. package/dist/utils/logger/handlers/file-handler.js +1 -1
  228. package/dist/utils/logger/handlers/index.js +1 -1
  229. package/dist/utils/logger/handlers/null-handler.js +1 -1
  230. package/dist/utils/logger/index.js +1 -1
  231. package/dist/utils/logger/logger.js +1 -1
  232. package/dist/utils/logger/types.js +1 -1
  233. package/dist/utils/option-validation.js +1 -1
  234. package/dist/utils/process.js +1 -1
  235. package/dist/utils/prompt.js +1 -1
  236. package/dist/utils/proxy-fetch.d.ts +29 -0
  237. package/dist/utils/proxy-fetch.d.ts.map +1 -0
  238. package/dist/utils/proxy-fetch.js +1 -0
  239. package/dist/utils/proxy-fetch.js.map +1 -0
  240. package/dist/utils/spinner.js +1 -1
  241. package/dist/utils/sse-parser.js +1 -1
  242. package/dist/utils/string-utils.js +1 -1
  243. package/dist/utils/table-ref-parser.js +1 -1
  244. package/dist/utils/tdx-logger.js +1 -1
  245. package/dist/utils/version-check.js +1 -1
  246. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x319503,_0x54fc24){const _0x3a4dd3=a164_0x534c,_0xf94c51=_0x319503();while(!![]){try{const _0x43d168=parseInt(_0x3a4dd3(0x1b5))/0x1*(-parseInt(_0x3a4dd3(0x1c4))/0x2)+-parseInt(_0x3a4dd3(0x1a8))/0x3*(parseInt(_0x3a4dd3(0x1bc))/0x4)+parseInt(_0x3a4dd3(0x1be))/0x5+parseInt(_0x3a4dd3(0x1a9))/0x6*(parseInt(_0x3a4dd3(0x1a4))/0x7)+-parseInt(_0x3a4dd3(0x1c5))/0x8*(parseInt(_0x3a4dd3(0x1b8))/0x9)+-parseInt(_0x3a4dd3(0x19e))/0xa*(parseInt(_0x3a4dd3(0x1b1))/0xb)+parseInt(_0x3a4dd3(0x1a7))/0xc*(parseInt(_0x3a4dd3(0x18e))/0xd);if(_0x43d168===_0x54fc24)break;else _0xf94c51['push'](_0xf94c51['shift']());}catch(_0x5726ef){_0xf94c51['push'](_0xf94c51['shift']());}}}(a164_0x3164,0x74089));import a164_0x2491ac from'path';function a164_0x534c(_0x320d32,_0x4c8311){_0x320d32=_0x320d32-0x18c;const _0x3164f3=a164_0x3164();let _0x534ca6=_0x3164f3[_0x320d32];return _0x534ca6;}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(_0x2de348){const _0x1cbe15=a164_0x534c;return _0x2de348[_0x1cbe15(0x1af)]!==_0x1cbe15(0x19b);}function a164_0x3164(){const _0x5ee2dd=['join','segment','invalid_yaml','file_not_found','error','file','isScoped','20kwbzgw','stat','includes','scopedFolderPath','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','cwd','143563Drltsa','File\x20not\x20found','tdx.json','4817340jhsmAA','2657220LDuuLg','150VHTcCr','match','relative','folderPath','parse','exists','type','message','3925515VzMFFr','configDir','No\x20tdx.json\x20found','parent_segment','11827hhlfOR','no_config','isFile','9ceYgtT','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','replace','directory','4DNigQf','root','1857690GDmbCr','journey','Not\x20a\x20YAML\x20file:\x20','dirname','startsWith','resolve','86pRBkjE','2465472VlDeaV','segmentName','extname','context','basename','65QvGIio','no_parent','readFile','string','parentSegment','No\x20tdx.json\x20found\x20for\x20file:\x20','File\x20not\x20found:\x20','trim','isDirectory'];a164_0x3164=function(){return _0x5ee2dd;};return a164_0x3164();}export function isScopedResolution(_0x7fd4e7){const _0x20df83=a164_0x534c;return _0x7fd4e7[_0x20df83(0x1af)]===_0x20df83(0x1bb)||_0x7fd4e7[_0x20df83(0x1af)]===_0x20df83(0x19c)||_0x7fd4e7[_0x20df83(0x1af)]===_0x20df83(0x18c);}export function getScopedDetails(_0x39a6a9){if(isScopedResolution(_0x39a6a9))return{'isScoped':_0x39a6a9['isScoped'],'scopedFolderPath':_0x39a6a9['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x3726a0,_0x5db8d4){const _0x33ca59=a164_0x534c;let _0x553295=a164_0x2491ac[_0x33ca59(0x1c3)](_0x3726a0);const _0x1794b8=a164_0x2491ac[_0x33ca59(0x1ad)](_0x553295)[_0x33ca59(0x1bd)];while(_0x553295!==_0x1794b8){const _0x196a20=a164_0x2491ac[_0x33ca59(0x197)](_0x553295,_0x33ca59(0x1a6));if(await _0x5db8d4[_0x33ca59(0x1ae)](_0x196a20))try{const _0x3ea868=await _0x5db8d4[_0x33ca59(0x190)](_0x196a20),_0x12764d=JSON[_0x33ca59(0x1ad)](_0x3ea868);if(_0x12764d['parent_segment']&&typeof _0x12764d[_0x33ca59(0x1b4)]===_0x33ca59(0x191))return{'configPath':_0x196a20,'configDir':_0x553295,'parentSegment':_0x12764d['parent_segment']};}catch{}_0x553295=a164_0x2491ac[_0x33ca59(0x1c1)](_0x553295);}return null;}function calculateScopedPath(_0x4d6218,_0x6bb9af){const _0x3065a0=a164_0x534c,_0xbdd3e7=a164_0x2491ac[_0x3065a0(0x1ab)](_0x6bb9af,_0x4d6218),_0x2cae84=_0xbdd3e7!==''&&_0xbdd3e7!=='.'&&!_0xbdd3e7[_0x3065a0(0x1c2)]('..');return{'isScoped':_0x2cae84,'scopedFolderPath':_0x2cae84?_0xbdd3e7[_0x3065a0(0x1ba)](/\\/g,'/'):''};}export async function resolveTarget(_0x127982){const _0x30beea=a164_0x534c,{arg:_0x1bd9fb,contextParent:_0x42b38b,cwd:cwd=process[_0x30beea(0x1a3)](),fs:fs=nodeFileSystem}=_0x127982;if(_0x1bd9fb&&isYamlFilePath(_0x1bd9fb))try{const _0x3f4ed3=await resolveYamlFilePath(_0x1bd9fb,fs),_0x100f03=a164_0x2491ac['resolve'](_0x1bd9fb),_0x3e5ab5=a164_0x2491ac['dirname'](_0x100f03),_0x36be3f=await findTdxConfigAsync(_0x3e5ab5,fs);if(!_0x36be3f){if(_0x42b38b){const _0x415eab=a164_0x2491ac['dirname'](_0x100f03);return{'type':_0x30beea(0x19c),'parentName':_0x42b38b,'targetDir':_0x415eab,'configRoot':_0x415eab,'filePath':_0x100f03,'resourceName':_0x3f4ed3[_0x30beea(0x1c6)],'folderPath':_0x3f4ed3[_0x30beea(0x1ac)],'resourceType':_0x3f4ed3['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x30beea(0x19b),'errorCode':_0x30beea(0x1b6),'message':_0x30beea(0x193)+_0x1bd9fb,'arg':_0x1bd9fb,'helpText':_0x30beea(0x1b9)};}const _0x3bdd0c=calculateScopedPath(_0x3e5ab5,_0x36be3f[_0x30beea(0x1b2)]);return{'type':_0x30beea(0x19c),'parentName':_0x36be3f['parentSegment'],'targetDir':_0x36be3f[_0x30beea(0x1b2)],'configRoot':_0x36be3f['configDir'],'filePath':_0x100f03,'resourceName':_0x3f4ed3[_0x30beea(0x1c6)],'folderPath':_0x3f4ed3[_0x30beea(0x1ac)],'resourceType':_0x3f4ed3['resourceType'],'isScoped':_0x3bdd0c['isScoped'],'scopedFolderPath':_0x3bdd0c['scopedFolderPath']};}catch(_0x327d87){const _0x24078a=_0x327d87 instanceof Error?_0x327d87[_0x30beea(0x1b0)]:String(_0x327d87);if(_0x24078a[_0x30beea(0x1a0)](_0x30beea(0x1a5)))return{'type':_0x30beea(0x19b),'errorCode':_0x30beea(0x19a),'message':_0x30beea(0x194)+_0x1bd9fb,'arg':_0x1bd9fb};if(_0x24078a[_0x30beea(0x1a0)](_0x30beea(0x1b3))){if(_0x42b38b){const _0xc03f93=a164_0x2491ac['resolve'](_0x1bd9fb);if(await fs['exists'](_0xc03f93)){const _0xf8ebc0=a164_0x2491ac[_0x30beea(0x1c1)](_0xc03f93),_0x124f9c=await fs[_0x30beea(0x190)](_0xc03f93),_0x308d1c=_0x124f9c[_0x30beea(0x1aa)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x4c1607=_0x124f9c[_0x30beea(0x1aa)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x5bf6e5=_0x308d1c?_0x308d1c[0x1][_0x30beea(0x195)]():a164_0x2491ac[_0x30beea(0x18d)](_0x1bd9fb,a164_0x2491ac[_0x30beea(0x1c7)](_0x1bd9fb)),_0x15d672=_0x4c1607&&_0x4c1607[0x1][_0x30beea(0x195)]()===_0x30beea(0x1bf)?'journey':_0x30beea(0x198);return{'type':_0x30beea(0x19c),'parentName':_0x42b38b,'targetDir':_0xf8ebc0,'configRoot':_0xf8ebc0,'filePath':_0xc03f93,'resourceName':_0x5bf6e5,'folderPath':'','resourceType':_0x15d672,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x30beea(0x19b),'errorCode':'no_config','message':_0x30beea(0x193)+_0x1bd9fb,'arg':_0x1bd9fb,'helpText':_0x30beea(0x1b9)};}return{'type':_0x30beea(0x19b),'errorCode':_0x30beea(0x199),'message':_0x24078a,'arg':_0x1bd9fb};}if(_0x1bd9fb){const _0x3cdf53=a164_0x2491ac[_0x30beea(0x1c3)](cwd,_0x1bd9fb);let _0x125feb=null;try{_0x125feb=await fs[_0x30beea(0x19f)](_0x3cdf53);}catch{}if(_0x125feb?.[_0x30beea(0x196)]()){const _0x406f05=await findTdxConfigAsync(_0x3cdf53,fs);if(_0x406f05){const _0x530425=calculateScopedPath(_0x3cdf53,_0x406f05[_0x30beea(0x1b2)]);return{'type':_0x30beea(0x1bb),'parentName':_0x406f05[_0x30beea(0x192)],'targetDir':_0x3cdf53,'configRoot':_0x406f05[_0x30beea(0x1b2)],'isScoped':_0x530425[_0x30beea(0x19d)],'scopedFolderPath':_0x530425[_0x30beea(0x1a1)]};}if(_0x42b38b)return{'type':_0x30beea(0x1bb),'parentName':_0x42b38b,'targetDir':_0x3cdf53,'configRoot':_0x3cdf53,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x30beea(0x1b6),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x1bd9fb,'arg':_0x1bd9fb,'helpText':_0x30beea(0x1b9)};}if(_0x125feb?.[_0x30beea(0x1b7)]())return{'type':_0x30beea(0x19b),'errorCode':'invalid_yaml','message':_0x30beea(0x1c0)+_0x1bd9fb,'arg':_0x1bd9fb,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x17a4ba=sanitizeFileName(_0x1bd9fb),_0x594cf3=getSegmentRootDir(_0x17a4ba,cwd);return{'type':'parent_name','parentName':_0x1bd9fb,'targetDir':_0x594cf3,'configRoot':_0x594cf3};}const _0x44ad28=await findTdxConfigAsync(cwd,fs);if(_0x44ad28){const _0x4efe36=calculateScopedPath(cwd,_0x44ad28[_0x30beea(0x1b2)]);return{'type':'context','parentName':_0x44ad28[_0x30beea(0x192)],'targetDir':cwd,'configRoot':_0x44ad28[_0x30beea(0x1b2)],'isScoped':_0x4efe36['isScoped'],'scopedFolderPath':_0x4efe36['scopedFolderPath']};}if(_0x42b38b){const _0x4a1232=sanitizeFileName(_0x42b38b),_0x18c17b=getSegmentRootDir(_0x4a1232,cwd);return{'type':_0x30beea(0x18c),'parentName':_0x42b38b,'targetDir':_0x18c17b,'configRoot':_0x18c17b,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x30beea(0x18f),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x30beea(0x1a2)};}
1
+ (function(_0x58c56a,_0x32e368){const _0x1eef3e=a164_0x3d2d,_0x4fe670=_0x58c56a();while(!![]){try{const _0x10812d=parseInt(_0x1eef3e(0x179))/0x1*(-parseInt(_0x1eef3e(0x178))/0x2)+parseInt(_0x1eef3e(0x186))/0x3*(parseInt(_0x1eef3e(0x18f))/0x4)+parseInt(_0x1eef3e(0x18e))/0x5*(parseInt(_0x1eef3e(0x176))/0x6)+-parseInt(_0x1eef3e(0x18b))/0x7+-parseInt(_0x1eef3e(0x17f))/0x8*(-parseInt(_0x1eef3e(0x183))/0x9)+-parseInt(_0x1eef3e(0x174))/0xa+parseInt(_0x1eef3e(0x187))/0xb;if(_0x10812d===_0x32e368)break;else _0x4fe670['push'](_0x4fe670['shift']());}catch(_0x4a20e6){_0x4fe670['push'](_0x4fe670['shift']());}}}(a164_0x4259,0x2fa22));function a164_0x3d2d(_0x398e8d,_0x3734ef){_0x398e8d=_0x398e8d-0x170;const _0x42595f=a164_0x4259();let _0x3d2df3=_0x42595f[_0x398e8d];return _0x3d2df3;}import a164_0x5d9d0f 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(_0x536bb6){const _0x3f8796=a164_0x3d2d;return _0x536bb6[_0x3f8796(0x18d)]!==_0x3f8796(0x18c);}export function isScopedResolution(_0x26a6dc){const _0x9252c6=a164_0x3d2d;return _0x26a6dc[_0x9252c6(0x18d)]===_0x9252c6(0x1a4)||_0x26a6dc[_0x9252c6(0x18d)]===_0x9252c6(0x199)||_0x26a6dc[_0x9252c6(0x18d)]===_0x9252c6(0x18a);}export function getScopedDetails(_0xd8ad4a){const _0x309930=a164_0x3d2d;if(isScopedResolution(_0xd8ad4a))return{'isScoped':_0xd8ad4a[_0x309930(0x194)],'scopedFolderPath':_0xd8ad4a['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x334350,_0x7e2559){const _0x31bd83=a164_0x3d2d;let _0x4afd5a=a164_0x5d9d0f[_0x31bd83(0x182)](_0x334350);const _0xea7df8=a164_0x5d9d0f[_0x31bd83(0x198)](_0x4afd5a)[_0x31bd83(0x17d)];while(_0x4afd5a!==_0xea7df8){const _0x4494a6=a164_0x5d9d0f['join'](_0x4afd5a,_0x31bd83(0x171));if(await _0x7e2559[_0x31bd83(0x1a2)](_0x4494a6))try{const _0x3e49cb=await _0x7e2559[_0x31bd83(0x19f)](_0x4494a6),_0x3e3a1b=JSON['parse'](_0x3e49cb);if(_0x3e3a1b[_0x31bd83(0x189)]&&typeof _0x3e3a1b[_0x31bd83(0x189)]===_0x31bd83(0x19a))return{'configPath':_0x4494a6,'configDir':_0x4afd5a,'parentSegment':_0x3e3a1b['parent_segment']};}catch{}_0x4afd5a=a164_0x5d9d0f[_0x31bd83(0x195)](_0x4afd5a);}return null;}function calculateScopedPath(_0x14245a,_0x47723a){const _0x397a9f=a164_0x3d2d,_0xb1276a=a164_0x5d9d0f['relative'](_0x47723a,_0x14245a),_0x352b65=_0xb1276a!==''&&_0xb1276a!=='.'&&!_0xb1276a[_0x397a9f(0x19e)]('..');return{'isScoped':_0x352b65,'scopedFolderPath':_0x352b65?_0xb1276a[_0x397a9f(0x19d)](/\\/g,'/'):''};}function a164_0x4259(){const _0x287213=['1737351TpFsdE','error','type','415tDcgeC','456fryclu','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','File\x20not\x20found:\x20','file_not_found','parent_name','isScoped','dirname','trim','match','parse','file','string','isDirectory','extname','replace','startsWith','readFile','no_config','configDir','exists','Not\x20a\x20YAML\x20file:\x20','directory','cwd','No\x20tdx.json\x20found','tdx.json','invalid_yaml','scopedFolderPath','1374030iXhaAe','No\x20tdx.json\x20found\x20for\x20file:\x20','24816tcjCuP','Parent\x20segment\x20not\x20specified','162rnFNAi','4657VGXzYl','journey','parentSegment','resourceType','root','segment','80528qyoukQ','stat','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','resolve','135edqmBZ','includes','isFile','4764RVVJGA','3108699xYzgMD','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','parent_segment','context'];a164_0x4259=function(){return _0x287213;};return a164_0x4259();}export async function resolveTarget(_0x3b77fb){const _0x49ec91=a164_0x3d2d,{arg:_0x244142,contextParent:_0x123d4e,cwd:cwd=process[_0x49ec91(0x1a5)](),fs:fs=nodeFileSystem}=_0x3b77fb;if(_0x244142&&isYamlFilePath(_0x244142))try{const _0x2187ba=await resolveYamlFilePath(_0x244142,fs),_0x1901bb=a164_0x5d9d0f[_0x49ec91(0x182)](_0x244142),_0x2ce799=a164_0x5d9d0f['dirname'](_0x1901bb),_0x2b8b62=await findTdxConfigAsync(_0x2ce799,fs);if(!_0x2b8b62){if(_0x123d4e){const _0xf7e7e3=a164_0x5d9d0f[_0x49ec91(0x195)](_0x1901bb);return{'type':_0x49ec91(0x199),'parentName':_0x123d4e,'targetDir':_0xf7e7e3,'configRoot':_0xf7e7e3,'filePath':_0x1901bb,'resourceName':_0x2187ba['segmentName'],'folderPath':_0x2187ba['folderPath'],'resourceType':_0x2187ba[_0x49ec91(0x17c)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x49ec91(0x1a0),'message':_0x49ec91(0x175)+_0x244142,'arg':_0x244142,'helpText':_0x49ec91(0x188)};}const _0x13dda6=calculateScopedPath(_0x2ce799,_0x2b8b62[_0x49ec91(0x1a1)]);return{'type':_0x49ec91(0x199),'parentName':_0x2b8b62['parentSegment'],'targetDir':_0x2b8b62['configDir'],'configRoot':_0x2b8b62[_0x49ec91(0x1a1)],'filePath':_0x1901bb,'resourceName':_0x2187ba['segmentName'],'folderPath':_0x2187ba['folderPath'],'resourceType':_0x2187ba[_0x49ec91(0x17c)],'isScoped':_0x13dda6[_0x49ec91(0x194)],'scopedFolderPath':_0x13dda6[_0x49ec91(0x173)]};}catch(_0x4c2364){const _0xfc11d6=_0x4c2364 instanceof Error?_0x4c2364['message']:String(_0x4c2364);if(_0xfc11d6[_0x49ec91(0x184)]('File\x20not\x20found'))return{'type':_0x49ec91(0x18c),'errorCode':_0x49ec91(0x192),'message':_0x49ec91(0x191)+_0x244142,'arg':_0x244142};if(_0xfc11d6[_0x49ec91(0x184)](_0x49ec91(0x170))){if(_0x123d4e){const _0x5a2433=a164_0x5d9d0f[_0x49ec91(0x182)](_0x244142);if(await fs[_0x49ec91(0x1a2)](_0x5a2433)){const _0x499b61=a164_0x5d9d0f[_0x49ec91(0x195)](_0x5a2433),_0x51b28a=await fs[_0x49ec91(0x19f)](_0x5a2433),_0x1a807e=_0x51b28a[_0x49ec91(0x197)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x47baf6=_0x51b28a[_0x49ec91(0x197)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x78c642=_0x1a807e?_0x1a807e[0x1][_0x49ec91(0x196)]():a164_0x5d9d0f['basename'](_0x244142,a164_0x5d9d0f[_0x49ec91(0x19c)](_0x244142)),_0x491d6d=_0x47baf6&&_0x47baf6[0x1][_0x49ec91(0x196)]()===_0x49ec91(0x17a)?'journey':_0x49ec91(0x17e);return{'type':_0x49ec91(0x199),'parentName':_0x123d4e,'targetDir':_0x499b61,'configRoot':_0x499b61,'filePath':_0x5a2433,'resourceName':_0x78c642,'folderPath':'','resourceType':_0x491d6d,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x49ec91(0x18c),'errorCode':_0x49ec91(0x1a0),'message':_0x49ec91(0x175)+_0x244142,'arg':_0x244142,'helpText':_0x49ec91(0x188)};}return{'type':'error','errorCode':_0x49ec91(0x172),'message':_0xfc11d6,'arg':_0x244142};}if(_0x244142){const _0x11e986=a164_0x5d9d0f['resolve'](cwd,_0x244142);let _0x1df0f4=null;try{_0x1df0f4=await fs[_0x49ec91(0x180)](_0x11e986);}catch{}if(_0x1df0f4?.[_0x49ec91(0x19b)]()){const _0xf9f146=await findTdxConfigAsync(_0x11e986,fs);if(_0xf9f146){const _0x459b2e=calculateScopedPath(_0x11e986,_0xf9f146[_0x49ec91(0x1a1)]);return{'type':_0x49ec91(0x1a4),'parentName':_0xf9f146['parentSegment'],'targetDir':_0x11e986,'configRoot':_0xf9f146['configDir'],'isScoped':_0x459b2e[_0x49ec91(0x194)],'scopedFolderPath':_0x459b2e[_0x49ec91(0x173)]};}if(_0x123d4e)return{'type':_0x49ec91(0x1a4),'parentName':_0x123d4e,'targetDir':_0x11e986,'configRoot':_0x11e986,'isScoped':![],'scopedFolderPath':''};return{'type':_0x49ec91(0x18c),'errorCode':_0x49ec91(0x1a0),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x244142,'arg':_0x244142,'helpText':_0x49ec91(0x188)};}if(_0x1df0f4?.[_0x49ec91(0x185)]())return{'type':_0x49ec91(0x18c),'errorCode':_0x49ec91(0x172),'message':_0x49ec91(0x1a3)+_0x244142,'arg':_0x244142,'helpText':_0x49ec91(0x181)};const _0x257d87=sanitizeFileName(_0x244142),_0x1e0b9d=getSegmentRootDir(_0x257d87,cwd);return{'type':_0x49ec91(0x193),'parentName':_0x244142,'targetDir':_0x1e0b9d,'configRoot':_0x1e0b9d};}const _0x1a1e63=await findTdxConfigAsync(cwd,fs);if(_0x1a1e63){const _0x3a0da6=calculateScopedPath(cwd,_0x1a1e63[_0x49ec91(0x1a1)]);return{'type':_0x49ec91(0x18a),'parentName':_0x1a1e63[_0x49ec91(0x17b)],'targetDir':cwd,'configRoot':_0x1a1e63[_0x49ec91(0x1a1)],'isScoped':_0x3a0da6[_0x49ec91(0x194)],'scopedFolderPath':_0x3a0da6[_0x49ec91(0x173)]};}if(_0x123d4e){const _0x1d4773=sanitizeFileName(_0x123d4e),_0x292387=getSegmentRootDir(_0x1d4773,cwd);return{'type':_0x49ec91(0x18a),'parentName':_0x123d4e,'targetDir':_0x292387,'configRoot':_0x292387,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x49ec91(0x18c),'errorCode':'no_parent','message':_0x49ec91(0x177),'helpText':_0x49ec91(0x190)};}
@@ -1 +1 @@
1
- function a165_0x3d4d(){const _0x52fb73=['stringify','relative','string','Invalid\x20tdx.json:\x20expected\x20object','parse','1214760HmMfMm','engage_workspace','4953608iXwulZ','cwd','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','504DWiqEZ','replace','segments','tdx.json','6MlsFXs','195171NmUbNs','root','join','101955HDqOKO','parent_segment','utf-8','object','resolve','17752275FanxaK','7365192JNamuH','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','dirname','3265195MAxQiL'];a165_0x3d4d=function(){return _0x52fb73;};return a165_0x3d4d();}const a165_0xfef0c3=a165_0x2e40;(function(_0x3d94a5,_0x2eb740){const _0x4299c8=a165_0x2e40,_0x4ba8e8=_0x3d94a5();while(!![]){try{const _0x587c68=-parseInt(_0x4299c8(0x11d))/0x1+parseInt(_0x4299c8(0x126))/0x2*(-parseInt(_0x4299c8(0x127))/0x3)+parseInt(_0x4299c8(0x11f))/0x4+parseInt(_0x4299c8(0x117))/0x5+parseInt(_0x4299c8(0x130))/0x6+-parseInt(_0x4299c8(0x12a))/0x7*(-parseInt(_0x4299c8(0x122))/0x8)+-parseInt(_0x4299c8(0x12f))/0x9;if(_0x587c68===_0x2eb740)break;else _0x4ba8e8['push'](_0x4ba8e8['shift']());}catch(_0x369652){_0x4ba8e8['push'](_0x4ba8e8['shift']());}}}(a165_0x3d4d,0x9fb52));import{existsSync,readFileSync}from'fs';import a165_0x21a4c1 from'path';const TDX_CONFIG_FILE=a165_0xfef0c3(0x125),SEGMENTS_DIR=a165_0xfef0c3(0x124);function a165_0x2e40(_0x3da6b5,_0x1e88d7){_0x3da6b5=_0x3da6b5-0x115;const _0x3d4de6=a165_0x3d4d();let _0x2e40a8=_0x3d4de6[_0x3da6b5];return _0x2e40a8;}export function findTdxConfigPath(_0x5f358=process[a165_0xfef0c3(0x120)]()){const _0x454615=a165_0xfef0c3;let _0x34bf51=a165_0x21a4c1['resolve'](_0x5f358);const _0x3a2ebf=a165_0x21a4c1[_0x454615(0x11c)](_0x34bf51)[_0x454615(0x128)];while(_0x34bf51!==_0x3a2ebf){const _0x143ca1=a165_0x21a4c1[_0x454615(0x129)](_0x34bf51,TDX_CONFIG_FILE);if(existsSync(_0x143ca1))return _0x143ca1;_0x34bf51=a165_0x21a4c1[_0x454615(0x116)](_0x34bf51);}return null;}export function loadTdxConfig(_0x92c838){const _0x198b12=a165_0xfef0c3,_0x390ae0=readFileSync(_0x92c838,_0x198b12(0x12c));let _0x1600a7;try{_0x1600a7=JSON[_0x198b12(0x11c)](_0x390ae0);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x92c838);}if(!_0x1600a7||typeof _0x1600a7!==_0x198b12(0x12d))throw new Error(_0x198b12(0x11b));const _0x3f1939=_0x1600a7,_0x8f9c80=_0x3f1939[_0x198b12(0x12b)]&&typeof _0x3f1939['parent_segment']===_0x198b12(0x11a),_0xce1d37=_0x3f1939[_0x198b12(0x11e)]&&typeof _0x3f1939[_0x198b12(0x11e)]===_0x198b12(0x11a);if(!_0x8f9c80&&!_0xce1d37)throw new Error(_0x198b12(0x115));const _0x3b0cfa={};return _0x8f9c80&&(_0x3b0cfa[_0x198b12(0x12b)]=_0x3f1939[_0x198b12(0x12b)]),_0xce1d37&&(_0x3b0cfa[_0x198b12(0x11e)]=_0x3f1939['engage_workspace']),_0x3b0cfa;}export function findTdxConfig(_0x28ab4f=process['cwd']()){const _0x5b136c=a165_0xfef0c3,_0x14cdb9=findTdxConfigPath(_0x28ab4f);if(!_0x14cdb9)throw new Error(_0x5b136c(0x121));const _0x4c505c=loadTdxConfig(_0x14cdb9),_0x1a2484=a165_0x21a4c1[_0x5b136c(0x116)](_0x14cdb9);return{'config':_0x4c505c,'configPath':_0x14cdb9,'configDir':_0x1a2484};}export function tryFindTdxConfig(_0x397322){try{return findTdxConfig(_0x397322);}catch{return null;}}export function getSegmentRootDir(_0x3a2f51,_0x1056d7=process[a165_0xfef0c3(0x120)]()){return a165_0x21a4c1['join'](_0x1056d7,SEGMENTS_DIR,_0x3a2f51);}export function getTdxConfigPath(_0x3243d2,_0x695876=process[a165_0xfef0c3(0x120)]()){const _0x320f69=a165_0xfef0c3;return a165_0x21a4c1[_0x320f69(0x129)](getSegmentRootDir(_0x3243d2,_0x695876),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x1df991,_0x3533e4){const _0x28750c=a165_0xfef0c3,_0x1895b9=a165_0x21a4c1[_0x28750c(0x12e)](_0x1df991),_0x47ca3c=a165_0x21a4c1[_0x28750c(0x119)](_0x3533e4,_0x1895b9);if(_0x47ca3c['startsWith']('..'))return'';return _0x47ca3c;}export function localPathToTdFolderPath(_0x2377c5){const _0x17214c=a165_0xfef0c3,_0x498184=a165_0x21a4c1[_0x17214c(0x116)](_0x2377c5);if(_0x498184==='.'||_0x498184==='')return'';return _0x498184[_0x17214c(0x123)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x290e1b,_0x301eeb){const _0x1b251a=a165_0xfef0c3;if(!_0x290e1b)return _0x301eeb;return a165_0x21a4c1[_0x1b251a(0x129)](_0x301eeb,_0x290e1b);}export function createTdxConfigContent(_0x48d68b){const _0x3fac6a=a165_0xfef0c3,_0x158a5d={'parent_segment':_0x48d68b};return JSON[_0x3fac6a(0x118)](_0x158a5d,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x576202){const _0x149b2d=a165_0xfef0c3,_0x261cc2={'engage_workspace':_0x576202};return JSON[_0x149b2d(0x118)](_0x261cc2,null,0x2)+'\x0a';}
1
+ const a165_0xee5c02=a165_0x1500;(function(_0x46900b,_0x5d44a2){const _0x29fb67=a165_0x1500,_0xddb67d=_0x46900b();while(!![]){try{const _0x54ed76=parseInt(_0x29fb67(0x8a))/0x1+-parseInt(_0x29fb67(0x89))/0x2+parseInt(_0x29fb67(0x7a))/0x3+parseInt(_0x29fb67(0x81))/0x4*(-parseInt(_0x29fb67(0x8f))/0x5)+-parseInt(_0x29fb67(0x85))/0x6+-parseInt(_0x29fb67(0x7c))/0x7+parseInt(_0x29fb67(0x7f))/0x8*(parseInt(_0x29fb67(0x86))/0x9);if(_0x54ed76===_0x5d44a2)break;else _0xddb67d['push'](_0xddb67d['shift']());}catch(_0x154ab7){_0xddb67d['push'](_0xddb67d['shift']());}}}(a165_0x543c,0x63579));import{existsSync,readFileSync}from'fs';import a165_0x2c1981 from'path';const TDX_CONFIG_FILE=a165_0xee5c02(0x90),SEGMENTS_DIR=a165_0xee5c02(0x92);export function findTdxConfigPath(_0x199826=process[a165_0xee5c02(0x96)]()){const _0x28fc97=a165_0xee5c02;let _0x49f0a8=a165_0x2c1981[_0x28fc97(0x8d)](_0x199826);const _0x4316d8=a165_0x2c1981['parse'](_0x49f0a8)[_0x28fc97(0x7d)];while(_0x49f0a8!==_0x4316d8){const _0x53bd26=a165_0x2c1981[_0x28fc97(0x87)](_0x49f0a8,TDX_CONFIG_FILE);if(existsSync(_0x53bd26))return _0x53bd26;_0x49f0a8=a165_0x2c1981[_0x28fc97(0x7e)](_0x49f0a8);}return null;}export function loadTdxConfig(_0xe0213a){const _0x3ce022=a165_0xee5c02,_0x3e3047=readFileSync(_0xe0213a,'utf-8');let _0x553edc;try{_0x553edc=JSON[_0x3ce022(0x82)](_0x3e3047);}catch{throw new Error(_0x3ce022(0x80)+_0xe0213a);}if(!_0x553edc||typeof _0x553edc!==_0x3ce022(0x8e))throw new Error(_0x3ce022(0x88));const _0xb74637=_0x553edc,_0xba15e=_0xb74637[_0x3ce022(0x95)]&&typeof _0xb74637[_0x3ce022(0x95)]==='string',_0x337148=_0xb74637[_0x3ce022(0x94)]&&typeof _0xb74637['engage_workspace']===_0x3ce022(0x84);if(!_0xba15e&&!_0x337148)throw new Error(_0x3ce022(0x8c));const _0x4d3c02={};return _0xba15e&&(_0x4d3c02[_0x3ce022(0x95)]=_0xb74637[_0x3ce022(0x95)]),_0x337148&&(_0x4d3c02[_0x3ce022(0x94)]=_0xb74637['engage_workspace']),_0x4d3c02;}function a165_0x1500(_0xf729bb,_0x5e7a7a){_0xf729bb=_0xf729bb-0x7a;const _0x543c91=a165_0x543c();let _0x1500ce=_0x543c91[_0xf729bb];return _0x1500ce;}export function findTdxConfig(_0x171043=process[a165_0xee5c02(0x96)]()){const _0x47c098=a165_0xee5c02,_0x972424=findTdxConfigPath(_0x171043);if(!_0x972424)throw new Error(_0x47c098(0x8b));const _0x32bc82=loadTdxConfig(_0x972424),_0x10c223=a165_0x2c1981[_0x47c098(0x7e)](_0x972424);return{'config':_0x32bc82,'configPath':_0x972424,'configDir':_0x10c223};}export function tryFindTdxConfig(_0x23c047){try{return findTdxConfig(_0x23c047);}catch{return null;}}export function getSegmentRootDir(_0x2b23a5,_0x5aa72c=process[a165_0xee5c02(0x96)]()){const _0x35b608=a165_0xee5c02;return a165_0x2c1981[_0x35b608(0x87)](_0x5aa72c,SEGMENTS_DIR,_0x2b23a5);}function a165_0x543c(){const _0x96338d=['resolve','object','10bwNBar','tdx.json','relative','segments','startsWith','engage_workspace','parent_segment','cwd','1925046MMoJrI','replace','3925215JCZPZz','root','dirname','8GwgAfC','Invalid\x20JSON\x20in\x20','988956ZGHBqP','parse','stringify','string','3661560ODFqNr','10296756FEdZhc','join','Invalid\x20tdx.json:\x20expected\x20object','682178oERaqp','627711DdRWRl','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field'];a165_0x543c=function(){return _0x96338d;};return a165_0x543c();}export function getTdxConfigPath(_0x4b7ecd,_0x510187=process[a165_0xee5c02(0x96)]()){const _0x581ed5=a165_0xee5c02;return a165_0x2c1981[_0x581ed5(0x87)](getSegmentRootDir(_0x4b7ecd,_0x510187),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x17dd86,_0x9972fd){const _0x14f82e=a165_0xee5c02,_0x534316=a165_0x2c1981[_0x14f82e(0x8d)](_0x17dd86),_0x4aea15=a165_0x2c1981[_0x14f82e(0x91)](_0x9972fd,_0x534316);if(_0x4aea15[_0x14f82e(0x93)]('..'))return'';return _0x4aea15;}export function localPathToTdFolderPath(_0xb915b4){const _0x5226e4=a165_0xee5c02,_0xf25b30=a165_0x2c1981[_0x5226e4(0x7e)](_0xb915b4);if(_0xf25b30==='.'||_0xf25b30==='')return'';return _0xf25b30[_0x5226e4(0x7b)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x36dfef,_0x2f394f){const _0x45feab=a165_0xee5c02;if(!_0x36dfef)return _0x2f394f;return a165_0x2c1981[_0x45feab(0x87)](_0x2f394f,_0x36dfef);}export function createTdxConfigContent(_0x27785c){const _0x16323e=a165_0xee5c02,_0x34b523={'parent_segment':_0x27785c};return JSON[_0x16323e(0x83)](_0x34b523,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x528922){const _0x373902=a165_0xee5c02,_0x4dbb4c={'engage_workspace':_0x528922};return JSON[_0x373902(0x83)](_0x4dbb4c,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- function a166_0x53a5(_0xc2f055,_0x56c9c2){_0xc2f055=_0xc2f055-0x1b2;const _0x37fd4e=a166_0x37fd();let _0x53a5b1=_0x37fd4e[_0xc2f055];return _0x53a5b1;}const a166_0xd763ca=a166_0x53a5;(function(_0xd1b16c,_0x54f9b3){const _0x5ca28d=a166_0x53a5,_0x3f1667=_0xd1b16c();while(!![]){try{const _0x455ade=parseInt(_0x5ca28d(0x1c4))/0x1*(-parseInt(_0x5ca28d(0x1d2))/0x2)+-parseInt(_0x5ca28d(0x1c0))/0x3*(parseInt(_0x5ca28d(0x1bb))/0x4)+-parseInt(_0x5ca28d(0x1b5))/0x5+-parseInt(_0x5ca28d(0x1cc))/0x6+-parseInt(_0x5ca28d(0x1b2))/0x7*(parseInt(_0x5ca28d(0x1d1))/0x8)+parseInt(_0x5ca28d(0x1d8))/0x9+parseInt(_0x5ca28d(0x1c8))/0xa;if(_0x455ade===_0x54f9b3)break;else _0x3f1667['push'](_0x3f1667['shift']());}catch(_0x340b78){_0x3f1667['push'](_0x3f1667['shift']());}}}(a166_0x37fd,0x67281));function a166_0x37fd(){const _0x3822e8=['once','number','Top-N','914960JZpeUG','none','masked','min','Activation\x20name\x20is\x20required','6QreLHx','week','All','onSuccess','25HKkWod','desc','Connection\x20name\x20is\x20required','monthly','12369410VYjbeL','boolean','clear','string','118248jKaMjy','nullable','asc','hour','enum','360njCPoF','32666uMzhMT','record','union','minute','cron','array','6852186fspWZq','First','7560arxXwP','weekly','optional','3208265jnwhuH','onFailure','object'];a166_0x37fd=function(){return _0x3822e8;};return a166_0x37fd();}import{z}from'zod';export const ScheduleTypeSchema=z[a166_0xd763ca(0x1d0)]([a166_0xd763ca(0x1bc),'hourly','daily',a166_0xd763ca(0x1b3),a166_0xd763ca(0x1c7),a166_0xd763ca(0x1d6),'minutes_interval']);export const RepeatUnitSchema=z['enum']([a166_0xd763ca(0x1d5),a166_0xd763ca(0x1cf),'day',a166_0xd763ca(0x1c1),'month',a166_0xd763ca(0x1b8),a166_0xd763ca(0x1bc)]);export const ScheduleDefSchema=z[a166_0xd763ca(0x1b7)]({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a166_0xd763ca(0x1b4)](),'repeat_frequency':z[a166_0xd763ca(0x1b9)]()[a166_0xd763ca(0x1b4)](),'repeat_sub_frequency':z['array'](z[a166_0xd763ca(0x1b9)]())[a166_0xd763ca(0x1b4)](),'start_at':z[a166_0xd763ca(0x1cb)]()[a166_0xd763ca(0x1cd)]()[a166_0xd763ca(0x1b4)](),'end_on':z[a166_0xd763ca(0x1cb)]()[a166_0xd763ca(0x1cd)]()[a166_0xd763ca(0x1b4)](),'timezone':z[a166_0xd763ca(0x1cb)]()['optional']()});export const NotificationDefSchema=z['object']({'notify_on':z[a166_0xd763ca(0x1d7)](z[a166_0xd763ca(0x1d0)]([a166_0xd763ca(0x1c3),a166_0xd763ca(0x1b6)]))[a166_0xd763ca(0x1b4)](),'email_recipients':z[a166_0xd763ca(0x1d7)](z[a166_0xd763ca(0x1cb)]())['optional']()});export const ActivationColumnDefSchema=z[a166_0xd763ca(0x1d4)]([z[a166_0xd763ca(0x1cb)](),z[a166_0xd763ca(0x1b7)]({'name':z[a166_0xd763ca(0x1cb)](),'type':z[a166_0xd763ca(0x1cb)]()['optional'](),'visibility':z[a166_0xd763ca(0x1d0)]([a166_0xd763ca(0x1ca),a166_0xd763ca(0x1bd)])[a166_0xd763ca(0x1b4)]()})]);export const ActivationBehaviorDefSchema=z[a166_0xd763ca(0x1b7)]({'columns':z[a166_0xd763ca(0x1d7)](z[a166_0xd763ca(0x1b7)]({'name':z[a166_0xd763ca(0x1cb)](),'type':z['string']()['optional'](),'visibility':z['enum'](['clear',a166_0xd763ca(0x1bd)])[a166_0xd763ca(0x1b4)]()}))['optional'](),'behavior_table':z[a166_0xd763ca(0x1cb)]()[a166_0xd763ca(0x1b4)](),'join_row':z[a166_0xd763ca(0x1b9)]()[a166_0xd763ca(0x1cd)]()['optional'](),'join_strategy':z[a166_0xd763ca(0x1d0)]([a166_0xd763ca(0x1c2),a166_0xd763ca(0x1d9),'Last',a166_0xd763ca(0x1ba)])[a166_0xd763ca(0x1b4)](),'formatting':z['enum'](['rows','cols'])[a166_0xd763ca(0x1b4)](),'order_by':z['array'](z['object']({'key':z[a166_0xd763ca(0x1cb)](),'order':z['enum']([a166_0xd763ca(0x1ce),a166_0xd763ca(0x1c5)])}))[a166_0xd763ca(0x1b4)]()});export const ActivationDefSchema=z['object']({'name':z['string']()['min'](0x1,a166_0xd763ca(0x1bf)),'description':z[a166_0xd763ca(0x1cb)]()[a166_0xd763ca(0x1b4)](),'connection':z[a166_0xd763ca(0x1cb)]()[a166_0xd763ca(0x1be)](0x1,a166_0xd763ca(0x1c6)),'all_columns':z['boolean']()['optional'](),'columns':z[a166_0xd763ca(0x1d7)](ActivationColumnDefSchema)[a166_0xd763ca(0x1b4)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a166_0xd763ca(0x1b4)](),'connector_config':z[a166_0xd763ca(0x1d3)](z['string'](),z['unknown']())[a166_0xd763ca(0x1b4)](),'activation_template_id':z[a166_0xd763ca(0x1cb)]()[a166_0xd763ca(0x1cd)]()[a166_0xd763ca(0x1b4)](),'behavior':ActivationBehaviorDefSchema[a166_0xd763ca(0x1cd)]()[a166_0xd763ca(0x1b4)](),'run_after_journey_refresh':z[a166_0xd763ca(0x1c9)]()['optional'](),'nested_workflow_project_name':z['string']()[a166_0xd763ca(0x1b4)](),'nested_workflow_name':z['string']()[a166_0xd763ca(0x1b4)](),'lock_enabled':z['boolean']()[a166_0xd763ca(0x1b4)]()});
1
+ const a166_0x4e89e7=a166_0x4d6a;(function(_0x5a372b,_0x4bed8a){const _0x3eaf6b=a166_0x4d6a,_0x3aacaa=_0x5a372b();while(!![]){try{const _0x419e71=-parseInt(_0x3eaf6b(0x86))/0x1*(parseInt(_0x3eaf6b(0x82))/0x2)+parseInt(_0x3eaf6b(0x85))/0x3*(parseInt(_0x3eaf6b(0x72))/0x4)+parseInt(_0x3eaf6b(0x7d))/0x5+-parseInt(_0x3eaf6b(0x67))/0x6+parseInt(_0x3eaf6b(0x69))/0x7*(-parseInt(_0x3eaf6b(0x8b))/0x8)+-parseInt(_0x3eaf6b(0x7b))/0x9+-parseInt(_0x3eaf6b(0x77))/0xa*(-parseInt(_0x3eaf6b(0x6d))/0xb);if(_0x419e71===_0x4bed8a)break;else _0x3aacaa['push'](_0x3aacaa['shift']());}catch(_0x8dce27){_0x3aacaa['push'](_0x3aacaa['shift']());}}}(a166_0x3dc6,0x46918));function a166_0x4d6a(_0x2846df,_0x176631){_0x2846df=_0x2846df-0x67;const _0x3dc6f7=a166_0x3dc6();let _0x4d6ad2=_0x3dc6f7[_0x2846df];return _0x4d6ad2;}import{z}from'zod';export const ScheduleTypeSchema=z[a166_0x4e89e7(0x73)]([a166_0x4e89e7(0x70),a166_0x4e89e7(0x75),a166_0x4e89e7(0x8c),'weekly',a166_0x4e89e7(0x84),a166_0x4e89e7(0x8d),'minutes_interval']);export const RepeatUnitSchema=z['enum']([a166_0x4e89e7(0x8e),'hour','day',a166_0x4e89e7(0x74),'month',a166_0x4e89e7(0x78),a166_0x4e89e7(0x70)]);function a166_0x3dc6(){const _0x441181=['clear','217701SUOJrx','array','asc','none','string','4mZjPNQ','enum','week','hourly','object','470ZIIAiH','once','boolean','number','3962394yDMgDc','desc','2733200qgfnon','rows','Connection\x20name\x20is\x20required','nullable','onSuccess','16586pFPwkO','unknown','monthly','1295670ktdwHE','45dVCena','Top-N','min','Activation\x20name\x20is\x20required','optional','16192RRXoqX','daily','cron','minute','3100656pfgfdD','cols','1001nYRcXS','First','record'];a166_0x3dc6=function(){return _0x441181;};return a166_0x3dc6();}export const ScheduleDefSchema=z[a166_0x4e89e7(0x76)]({'type':ScheduleTypeSchema[a166_0x4e89e7(0x8a)](),'repeat_unit':RepeatUnitSchema[a166_0x4e89e7(0x8a)](),'repeat_frequency':z[a166_0x4e89e7(0x7a)]()['optional'](),'repeat_sub_frequency':z[a166_0x4e89e7(0x6e)](z[a166_0x4e89e7(0x7a)]())[a166_0x4e89e7(0x8a)](),'start_at':z[a166_0x4e89e7(0x71)]()['nullable']()['optional'](),'end_on':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x80)]()[a166_0x4e89e7(0x8a)](),'timezone':z[a166_0x4e89e7(0x71)]()['optional']()});export const NotificationDefSchema=z[a166_0x4e89e7(0x76)]({'notify_on':z[a166_0x4e89e7(0x6e)](z[a166_0x4e89e7(0x73)]([a166_0x4e89e7(0x81),'onFailure']))[a166_0x4e89e7(0x8a)](),'email_recipients':z[a166_0x4e89e7(0x6e)](z[a166_0x4e89e7(0x71)]())[a166_0x4e89e7(0x8a)]()});export const ActivationColumnDefSchema=z['union']([z[a166_0x4e89e7(0x71)](),z[a166_0x4e89e7(0x76)]({'name':z[a166_0x4e89e7(0x71)](),'type':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x8a)](),'visibility':z[a166_0x4e89e7(0x73)]([a166_0x4e89e7(0x6c),'masked'])[a166_0x4e89e7(0x8a)]()})]);export const ActivationBehaviorDefSchema=z[a166_0x4e89e7(0x76)]({'columns':z[a166_0x4e89e7(0x6e)](z[a166_0x4e89e7(0x76)]({'name':z['string'](),'type':z[a166_0x4e89e7(0x71)]()['optional'](),'visibility':z[a166_0x4e89e7(0x73)]([a166_0x4e89e7(0x6c),'masked'])[a166_0x4e89e7(0x8a)]()}))[a166_0x4e89e7(0x8a)](),'behavior_table':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x8a)](),'join_row':z[a166_0x4e89e7(0x7a)]()[a166_0x4e89e7(0x80)]()[a166_0x4e89e7(0x8a)](),'join_strategy':z[a166_0x4e89e7(0x73)](['All',a166_0x4e89e7(0x6a),'Last',a166_0x4e89e7(0x87)])[a166_0x4e89e7(0x8a)](),'formatting':z['enum']([a166_0x4e89e7(0x7e),a166_0x4e89e7(0x68)])[a166_0x4e89e7(0x8a)](),'order_by':z[a166_0x4e89e7(0x6e)](z[a166_0x4e89e7(0x76)]({'key':z[a166_0x4e89e7(0x71)](),'order':z[a166_0x4e89e7(0x73)]([a166_0x4e89e7(0x6f),a166_0x4e89e7(0x7c)])}))['optional']()});export const ActivationDefSchema=z[a166_0x4e89e7(0x76)]({'name':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x88)](0x1,a166_0x4e89e7(0x89)),'description':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x8a)](),'connection':z['string']()[a166_0x4e89e7(0x88)](0x1,a166_0x4e89e7(0x7f)),'all_columns':z[a166_0x4e89e7(0x79)]()[a166_0x4e89e7(0x8a)](),'columns':z[a166_0x4e89e7(0x6e)](ActivationColumnDefSchema)[a166_0x4e89e7(0x8a)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a166_0x4e89e7(0x6b)](z[a166_0x4e89e7(0x71)](),z[a166_0x4e89e7(0x83)]())[a166_0x4e89e7(0x8a)](),'activation_template_id':z[a166_0x4e89e7(0x71)]()['nullable']()['optional'](),'behavior':ActivationBehaviorDefSchema[a166_0x4e89e7(0x80)]()[a166_0x4e89e7(0x8a)](),'run_after_journey_refresh':z[a166_0x4e89e7(0x79)]()[a166_0x4e89e7(0x8a)](),'nested_workflow_project_name':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x8a)](),'nested_workflow_name':z[a166_0x4e89e7(0x71)]()['optional'](),'lock_enabled':z[a166_0x4e89e7(0x79)]()[a166_0x4e89e7(0x8a)]()});
@@ -1 +1 @@
1
- function a167_0x50d9(_0x43f16c,_0x56b269){_0x43f16c=_0x43f16c-0x1b8;var _0x13d68f=a167_0x13d6();var _0x50d977=_0x13d68f[_0x43f16c];return _0x50d977;}function a167_0x13d6(){var _0x5234a0=['64oPfUqT','87912JhKQBL','3783038yQSLBW','98545PaTMaz','26KVuuLO','10ZTFgBk','3398163WAVdPH','26460401tiqnJB','16GXpnsa','67571zptTDt','2795301BKCKvo'];a167_0x13d6=function(){return _0x5234a0;};return a167_0x13d6();}(function(_0x858178,_0x519eb5){var _0x39ce6d=a167_0x50d9,_0x3731a1=_0x858178();while(!![]){try{var _0x340583=parseInt(_0x39ce6d(0x1be))/0x1*(-parseInt(_0x39ce6d(0x1b9))/0x2)+parseInt(_0x39ce6d(0x1bb))/0x3+-parseInt(_0x39ce6d(0x1c0))/0x4*(parseInt(_0x39ce6d(0x1b8))/0x5)+parseInt(_0x39ce6d(0x1c1))/0x6+parseInt(_0x39ce6d(0x1c2))/0x7*(-parseInt(_0x39ce6d(0x1bd))/0x8)+-parseInt(_0x39ce6d(0x1bf))/0x9+-parseInt(_0x39ce6d(0x1ba))/0xa*(-parseInt(_0x39ce6d(0x1bc))/0xb);if(_0x340583===_0x519eb5)break;else _0x3731a1['push'](_0x3731a1['shift']());}catch(_0x5cad11){_0x3731a1['push'](_0x3731a1['shift']());}}}(a167_0x13d6,0xec3d8));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ (function(_0x445b7c,_0x1d795){var _0x24e19c=a167_0x14a6,_0x5c8d88=_0x445b7c();while(!![]){try{var _0x4ca46c=parseInt(_0x24e19c(0x180))/0x1*(parseInt(_0x24e19c(0x182))/0x2)+-parseInt(_0x24e19c(0x184))/0x3+-parseInt(_0x24e19c(0x17e))/0x4+parseInt(_0x24e19c(0x17c))/0x5*(-parseInt(_0x24e19c(0x181))/0x6)+parseInt(_0x24e19c(0x17f))/0x7+-parseInt(_0x24e19c(0x183))/0x8*(-parseInt(_0x24e19c(0x185))/0x9)+parseInt(_0x24e19c(0x17d))/0xa;if(_0x4ca46c===_0x1d795)break;else _0x5c8d88['push'](_0x5c8d88['shift']());}catch(_0x2cb8e1){_0x5c8d88['push'](_0x5c8d88['shift']());}}}(a167_0x347b,0x6a080));function a167_0x347b(){var _0xfb6dc5=['5132870qHsKIw','411128cONGMX','5522314ANdWuK','1yPeLLt','144JKRgLo','817538yMGMIq','20920rOPzzK','2560629eDnBLa','225TbtuqB','80355BmgeEg'];a167_0x347b=function(){return _0xfb6dc5;};return a167_0x347b();}function a167_0x14a6(_0x52e398,_0x367b9f){_0x52e398=_0x52e398-0x17c;var _0x347bb4=a167_0x347b();var _0x14a617=_0x347bb4[_0x52e398];return _0x14a617;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a168_0x5418ff=a168_0x5bb3;(function(_0x482241,_0x551ec8){const _0x3aade7=a168_0x5bb3,_0x3ccfe3=_0x482241();while(!![]){try{const _0x3b77d5=parseInt(_0x3aade7(0x18d))/0x1+-parseInt(_0x3aade7(0x191))/0x2+-parseInt(_0x3aade7(0x189))/0x3*(parseInt(_0x3aade7(0x19d))/0x4)+parseInt(_0x3aade7(0x18b))/0x5+parseInt(_0x3aade7(0x17f))/0x6+parseInt(_0x3aade7(0x180))/0x7*(parseInt(_0x3aade7(0x185))/0x8)+-parseInt(_0x3aade7(0x193))/0x9;if(_0x3b77d5===_0x551ec8)break;else _0x3ccfe3['push'](_0x3ccfe3['shift']());}catch(_0x5aaebe){_0x3ccfe3['push'](_0x3ccfe3['shift']());}}}(a168_0x1c77,0xe07e4));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z['enum'](['draft',a168_0x5418ff(0x17c),a168_0x5418ff(0x17a)]);function a168_0x5bb3(_0x596791,_0x2c5b34){_0x596791=_0x596791-0x175;const _0x1c777f=a168_0x1c77();let _0x5bb35f=_0x1c777f[_0x596791];return _0x5bb35f;}export const ReentryModeTypeSchema=z[a168_0x5418ff(0x17d)](['no_reentry',a168_0x5418ff(0x176),a168_0x5418ff(0x18f)]);export const WaitUnitTypeSchema=z['enum']([a168_0x5418ff(0x179),a168_0x5418ff(0x19e)]);export const StepTypeValueSchema=z[a168_0x5418ff(0x17d)]([a168_0x5418ff(0x17b),'activation',a168_0x5418ff(0x178),a168_0x5418ff(0x184),a168_0x5418ff(0x18a),a168_0x5418ff(0x199),'end']);export const EmbeddedSegmentDefSchema=z[a168_0x5418ff(0x19c)]({'description':z['string']()[a168_0x5418ff(0x19a)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a168_0x5418ff(0x19c)]({'journey':z['string'](),'stage':z['string'](),'bundle_id':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)]()});export const CriteriaDefSchema=z[a168_0x5418ff(0x19c)]({'name':z[a168_0x5418ff(0x192)](),'description':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'segment':z[a168_0x5418ff(0x192)](),'target':JumpTargetDefSchema[a168_0x5418ff(0x19a)]()});const WaitConditionTimeoutDefSchema=z[a168_0x5418ff(0x19c)]({'duration':z[a168_0x5418ff(0x17e)](),'unit':WaitUnitTypeSchema,'next':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)]()}),WaitConditionDefSchema=z[a168_0x5418ff(0x19c)]({'segment':z['string'](),'next':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z['object']({'duration':z[a168_0x5418ff(0x17e)]()[a168_0x5418ff(0x19a)](),'unit':WaitUnitTypeSchema[a168_0x5418ff(0x19a)](),'wait_until':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'condition':WaitConditionDefSchema[a168_0x5418ff(0x19a)](),'days_of_week':z['array'](z[a168_0x5418ff(0x192)]())[a168_0x5418ff(0x19a)]()}),StepBaseFields={'name':z[a168_0x5418ff(0x192)](),'uuid':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'next':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)]()},WaitStepDefSchema=z[a168_0x5418ff(0x19c)]({...StepBaseFields,'type':z['literal'](a168_0x5418ff(0x17b)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a168_0x5418ff(0x19c)]({'activation':z['string']()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a168_0x5418ff(0x195)](a168_0x5418ff(0x194)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z['string'](),'segment':z[a168_0x5418ff(0x192)]()['optional'](),'segment_id':z['string']()['optional'](),'excluded':z[a168_0x5418ff(0x175)]()[a168_0x5418ff(0x19a)](),'next':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)]()}),DecisionPointStepParamsDefSchema=z[a168_0x5418ff(0x19c)]({'branches':z[a168_0x5418ff(0x187)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z[a168_0x5418ff(0x195)]('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a168_0x5418ff(0x19c)]({'id':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'name':z['string'](),'percentage':z['number'](),'next':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)]()}),AbTestStepParamsDefSchema=z[a168_0x5418ff(0x19c)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'customized_split':z[a168_0x5418ff(0x175)]()[a168_0x5418ff(0x19a)]()}),AbTestStepDefSchema=z[a168_0x5418ff(0x19c)]({...StepBaseFields,'type':z[a168_0x5418ff(0x195)]('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a168_0x5418ff(0x195)](a168_0x5418ff(0x18a))}),JumpStepParamsDefSchema=z[a168_0x5418ff(0x19c)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a168_0x5418ff(0x19c)]({...StepBaseFields,'type':z[a168_0x5418ff(0x195)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a168_0x5418ff(0x19c)]({...StepBaseFields,'type':z[a168_0x5418ff(0x195)](a168_0x5418ff(0x188))})[a168_0x5418ff(0x183)]();export const StepDefSchema=z[a168_0x5418ff(0x190)](a168_0x5418ff(0x196),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z['object']({'name':z[a168_0x5418ff(0x192)](),'description':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'id':z['string']()[a168_0x5418ff(0x19a)](),'entry_criteria':CriteriaDefSchema[a168_0x5418ff(0x19a)](),'exit_criteria':z[a168_0x5418ff(0x187)](CriteriaDefSchema)[a168_0x5418ff(0x19a)](),'milestone':CriteriaDefSchema[a168_0x5418ff(0x19a)](),'root_step':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'steps':z[a168_0x5418ff(0x187)](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z[a168_0x5418ff(0x19c)]({'name':z[a168_0x5418ff(0x192)]()['optional'](),'version':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'state':JourneyStateTypeSchema[a168_0x5418ff(0x19a)](),'latest':z[a168_0x5418ff(0x175)]()[a168_0x5418ff(0x19a)](),'stages':z['array'](StageDefSchema),'id':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'version_number':z[a168_0x5418ff(0x17e)]()['optional'](),'goal':CriteriaDefSchema[a168_0x5418ff(0x19a)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z['lazy'](()=>z[a168_0x5418ff(0x19c)]({'type':z[a168_0x5418ff(0x195)]('journey'),'name':z['string']()[a168_0x5418ff(0x177)](0x1,a168_0x5418ff(0x18e)),'description':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'bundle_id':z['string']()[a168_0x5418ff(0x19a)](),'bundle_name':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'folder_id':z['string']()[a168_0x5418ff(0x19a)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a168_0x5418ff(0x175)]()[a168_0x5418ff(0x19a)](),'goal':CriteriaDefSchema['optional'](),'id':z[a168_0x5418ff(0x192)]()[a168_0x5418ff(0x19a)](),'version':z[a168_0x5418ff(0x192)]()['optional'](),'version_number':z['number']()[a168_0x5418ff(0x19a)](),'stages':z[a168_0x5418ff(0x187)](StageDefSchema)[a168_0x5418ff(0x19a)](),'versions':z[a168_0x5418ff(0x187)](JourneyEntryDefSchema)[a168_0x5418ff(0x19a)](),'journeys':z[a168_0x5418ff(0x187)](JourneyEntryDefSchema)['optional'](),'segments':z['record'](z[a168_0x5418ff(0x192)](),EmbeddedSegmentDefSchema)[a168_0x5418ff(0x19a)](),'activations':z['record'](z[a168_0x5418ff(0x192)](),ActivationDefSchema)[a168_0x5418ff(0x19a)]()})['refine'](_0x473a9e=>{const _0x1cb4fe=a168_0x5418ff,_0x5735c1=[_0x473a9e[_0x1cb4fe(0x186)],_0x473a9e[_0x1cb4fe(0x182)],_0x473a9e[_0x1cb4fe(0x19b)]][_0x1cb4fe(0x197)](_0x431b4a=>Array[_0x1cb4fe(0x198)](_0x431b4a)&&_0x431b4a[_0x1cb4fe(0x181)]>0x0)[_0x1cb4fe(0x181)];return _0x5735c1===0x1;},{'message':a168_0x5418ff(0x18c)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;function a168_0x1c77(){const _0x2c5097=['launched','wait','simulation','enum','number','8866260KWxmIC','13874BTqKFP','length','stages','passthrough','ab_test','6664weRrNa','journeys','array','end','276fwgwJc','merge','937800TeMMvt','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','1707804yHFHOB','Journey\x20name\x20is\x20required','reentry_always','discriminatedUnion','78278gOCXqI','string','30348117hgiIGV','activation','literal','type','filter','isArray','jump','optional','versions','object','30148cRGLtW','week','boolean','reentry_unless_goal_achieved','min','decision_point','day'];a168_0x1c77=function(){return _0x2c5097;};return a168_0x1c77();}
1
+ const a168_0x407b84=a168_0x50a0;(function(_0x2ed267,_0x466b1d){const _0x732529=a168_0x50a0,_0x288d69=_0x2ed267();while(!![]){try{const _0xba00ab=parseInt(_0x732529(0xf1))/0x1*(-parseInt(_0x732529(0xeb))/0x2)+parseInt(_0x732529(0xe0))/0x3+parseInt(_0x732529(0xf3))/0x4+-parseInt(_0x732529(0xe3))/0x5+parseInt(_0x732529(0x100))/0x6*(-parseInt(_0x732529(0xfc))/0x7)+-parseInt(_0x732529(0xde))/0x8*(-parseInt(_0x732529(0xe6))/0x9)+parseInt(_0x732529(0xdb))/0xa;if(_0xba00ab===_0x466b1d)break;else _0x288d69['push'](_0x288d69['shift']());}catch(_0x264a3f){_0x288d69['push'](_0x288d69['shift']());}}}(a168_0xf916,0xeba43));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';function a168_0xf916(){const _0x2736fd=['array','string','launched','literal','1752629WsaKUy','end','4852868OTyQep','journey','decision_point','object','optional','boolean','reentry_unless_goal_achieved','enum','refine','6086836fRtJxC','min','type','draft','12omMDIJ','merge','length','number','jump','isArray','25225100wddsDG','simulation','ab_test','2536VkjpOS','filter','764424oLVUHP','wait','reentry_always','15500BdIomq','activation','no_reentry','13329mJOZxg','lazy','journeys','passthrough','record','2tDbsuL','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'];a168_0xf916=function(){return _0x2736fd;};return a168_0xf916();}function a168_0x50a0(_0x295907,_0x13693e){_0x295907=_0x295907-0xd6;const _0xf916e7=a168_0xf916();let _0x50a020=_0xf916e7[_0x295907];return _0x50a020;}export const JourneyStateTypeSchema=z[a168_0x407b84(0xfa)]([a168_0x407b84(0xff),a168_0x407b84(0xdc),a168_0x407b84(0xef)]);export const ReentryModeTypeSchema=z['enum']([a168_0x407b84(0xe5),a168_0x407b84(0xf9),a168_0x407b84(0xe2)]);export const WaitUnitTypeSchema=z[a168_0x407b84(0xfa)](['day','week']);export const StepTypeValueSchema=z[a168_0x407b84(0xfa)]([a168_0x407b84(0xe1),a168_0x407b84(0xe4),'decision_point',a168_0x407b84(0xdd),a168_0x407b84(0xd6),a168_0x407b84(0xd9),a168_0x407b84(0xf2)]);export const EmbeddedSegmentDefSchema=z[a168_0x407b84(0xf6)]({'description':z[a168_0x407b84(0xee)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a168_0x407b84(0xf6)]({'journey':z[a168_0x407b84(0xee)](),'stage':z[a168_0x407b84(0xee)](),'bundle_id':z['string']()[a168_0x407b84(0xf7)]()});export const CriteriaDefSchema=z[a168_0x407b84(0xf6)]({'name':z[a168_0x407b84(0xee)](),'description':z['string']()[a168_0x407b84(0xf7)](),'segment':z[a168_0x407b84(0xee)](),'target':JumpTargetDefSchema[a168_0x407b84(0xf7)]()});const WaitConditionTimeoutDefSchema=z[a168_0x407b84(0xf6)]({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)]()}),WaitConditionDefSchema=z[a168_0x407b84(0xf6)]({'segment':z[a168_0x407b84(0xee)](),'next':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'timeout':WaitConditionTimeoutDefSchema[a168_0x407b84(0xf7)]()}),WaitStepParamsDefSchema=z[a168_0x407b84(0xf6)]({'duration':z['number']()[a168_0x407b84(0xf7)](),'unit':WaitUnitTypeSchema[a168_0x407b84(0xf7)](),'wait_until':z[a168_0x407b84(0xee)]()['optional'](),'condition':WaitConditionDefSchema[a168_0x407b84(0xf7)](),'days_of_week':z['array'](z[a168_0x407b84(0xee)]())[a168_0x407b84(0xf7)]()}),StepBaseFields={'name':z[a168_0x407b84(0xee)](),'uuid':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'next':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xe1)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a168_0x407b84(0xf6)]({'activation':z[a168_0x407b84(0xee)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z['literal']('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a168_0x407b84(0xf6)]({'name':z[a168_0x407b84(0xee)](),'segment':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'segment_id':z['string']()[a168_0x407b84(0xf7)](),'excluded':z[a168_0x407b84(0xf8)]()[a168_0x407b84(0xf7)](),'next':z['string']()[a168_0x407b84(0xf7)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z[a168_0x407b84(0xed)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a168_0x407b84(0xf6)]({...StepBaseFields,'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xf5)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a168_0x407b84(0xf6)]({'id':z[a168_0x407b84(0xee)]()['optional'](),'name':z[a168_0x407b84(0xee)](),'percentage':z[a168_0x407b84(0xd8)](),'next':z[a168_0x407b84(0xee)]()['optional']()}),AbTestStepParamsDefSchema=z[a168_0x407b84(0xf6)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'customized_split':z[a168_0x407b84(0xf8)]()[a168_0x407b84(0xf7)]()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xdd)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a168_0x407b84(0xf6)]({...StepBaseFields,'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xd6))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a168_0x407b84(0xf0)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xf2))})[a168_0x407b84(0xe9)]();export const StepDefSchema=z['discriminatedUnion'](a168_0x407b84(0xfe),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a168_0x407b84(0xf6)]({'name':z[a168_0x407b84(0xee)](),'description':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'id':z[a168_0x407b84(0xee)]()['optional'](),'entry_criteria':CriteriaDefSchema[a168_0x407b84(0xf7)](),'exit_criteria':z[a168_0x407b84(0xed)](CriteriaDefSchema)[a168_0x407b84(0xf7)](),'milestone':CriteriaDefSchema[a168_0x407b84(0xf7)](),'root_step':z['string']()[a168_0x407b84(0xf7)](),'steps':z[a168_0x407b84(0xed)](StepDefSchema)[a168_0x407b84(0xf7)]()});export const JourneyEntryDefSchema=z[a168_0x407b84(0xf6)]({'name':z[a168_0x407b84(0xee)]()['optional'](),'version':z['string']()[a168_0x407b84(0xf7)](),'state':JourneyStateTypeSchema[a168_0x407b84(0xf7)](),'latest':z[a168_0x407b84(0xf8)]()[a168_0x407b84(0xf7)](),'stages':z['array'](StageDefSchema),'id':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'version_number':z['number']()[a168_0x407b84(0xf7)](),'goal':CriteriaDefSchema[a168_0x407b84(0xf7)](),'reentry':ReentryModeTypeSchema[a168_0x407b84(0xf7)]()});export const JourneyDefSchema=z[a168_0x407b84(0xe7)](()=>z[a168_0x407b84(0xf6)]({'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xf4)),'name':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xfd)](0x1,'Journey\x20name\x20is\x20required'),'description':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'bundle_id':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'bundle_name':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'folder_id':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'reentry':ReentryModeTypeSchema[a168_0x407b84(0xf7)](),'allow_reentry':z[a168_0x407b84(0xf8)]()[a168_0x407b84(0xf7)](),'goal':CriteriaDefSchema['optional'](),'id':z['string']()[a168_0x407b84(0xf7)](),'version':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'version_number':z[a168_0x407b84(0xd8)]()['optional'](),'stages':z[a168_0x407b84(0xed)](StageDefSchema)[a168_0x407b84(0xf7)](),'versions':z[a168_0x407b84(0xed)](JourneyEntryDefSchema)[a168_0x407b84(0xf7)](),'journeys':z[a168_0x407b84(0xed)](JourneyEntryDefSchema)[a168_0x407b84(0xf7)](),'segments':z[a168_0x407b84(0xea)](z['string'](),EmbeddedSegmentDefSchema)[a168_0x407b84(0xf7)](),'activations':z[a168_0x407b84(0xea)](z['string'](),ActivationDefSchema)[a168_0x407b84(0xf7)]()})[a168_0x407b84(0xfb)](_0x33b116=>{const _0x1d1819=a168_0x407b84,_0x391d2f=[_0x33b116[_0x1d1819(0xe8)],_0x33b116['stages'],_0x33b116['versions']][_0x1d1819(0xdf)](_0x4ed114=>Array[_0x1d1819(0xda)](_0x4ed114)&&_0x4ed114[_0x1d1819(0xd7)]>0x0)[_0x1d1819(0xd7)];return _0x391d2f===0x1;},{'message':a168_0x407b84(0xec)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x56a41f,_0x4b8527){var _0x3a3481=a170_0x1f7c,_0x145cce=_0x56a41f();while(!![]){try{var _0x12a6e0=-parseInt(_0x3a3481(0x1ee))/0x1+parseInt(_0x3a3481(0x1ec))/0x2*(parseInt(_0x3a3481(0x1f2))/0x3)+parseInt(_0x3a3481(0x1ef))/0x4*(parseInt(_0x3a3481(0x1f1))/0x5)+-parseInt(_0x3a3481(0x1ed))/0x6+parseInt(_0x3a3481(0x1eb))/0x7+-parseInt(_0x3a3481(0x1f0))/0x8+parseInt(_0x3a3481(0x1f3))/0x9;if(_0x12a6e0===_0x4b8527)break;else _0x145cce['push'](_0x145cce['shift']());}catch(_0x42c282){_0x145cce['push'](_0x145cce['shift']());}}}(a170_0x3be1,0xe0dc0));function a170_0x1f7c(_0x15794d,_0x484dff){_0x15794d=_0x15794d-0x1eb;var _0x3be18d=a170_0x3be1();var _0x1f7c35=_0x3be18d[_0x15794d];return _0x1f7c35;}function a170_0x3be1(){var _0x1f2bbc=['3666866zTLfOy','27636JliCen','2313090RgqKqa','1757614AdRsjt','20wWNUNH','1660384VmKgCG','829875khNSZn','267fnWDpQ','6193674PuaFNv'];a170_0x3be1=function(){return _0x1f2bbc;};return a170_0x3be1();}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
1
+ (function(_0x2d8a20,_0x5c0d99){var _0x3f94e2=a170_0x1cd7,_0x1d837d=_0x2d8a20();while(!![]){try{var _0x36f713=-parseInt(_0x3f94e2(0xad))/0x1+parseInt(_0x3f94e2(0xae))/0x2+parseInt(_0x3f94e2(0xb1))/0x3+-parseInt(_0x3f94e2(0xb0))/0x4+-parseInt(_0x3f94e2(0xaf))/0x5+-parseInt(_0x3f94e2(0xb3))/0x6+parseInt(_0x3f94e2(0xb2))/0x7;if(_0x36f713===_0x5c0d99)break;else _0x1d837d['push'](_0x1d837d['shift']());}catch(_0x2262b0){_0x1d837d['push'](_0x1d837d['shift']());}}}(a170_0x2c2f,0xac931));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a170_0x1cd7(_0xfa751,_0x4f3228){_0xfa751=_0xfa751-0xad;var _0x2c2fc7=a170_0x2c2f();var _0x1cd753=_0x2c2fc7[_0xfa751];return _0x1cd753;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a170_0x2c2f(){var _0x1befaf=['541804DitbiI','6627160dAymYD','3825204foUNmW','2872542EetXCq','22443295ubFmpU','7376724RfjRlc','216549ldjSiR'];a170_0x2c2f=function(){return _0x1befaf;};return a170_0x2c2f();}
@@ -1 +1 @@
1
- const a171_0x3fe414=a171_0x51fd;(function(_0xb05b80,_0x53d043){const _0x478fb1=a171_0x51fd,_0x23b05e=_0xb05b80();while(!![]){try{const _0x4b62d8=-parseInt(_0x478fb1(0x171))/0x1*(parseInt(_0x478fb1(0x166))/0x2)+-parseInt(_0x478fb1(0x18b))/0x3*(-parseInt(_0x478fb1(0x168))/0x4)+-parseInt(_0x478fb1(0x186))/0x5*(parseInt(_0x478fb1(0x16a))/0x6)+parseInt(_0x478fb1(0x16b))/0x7*(-parseInt(_0x478fb1(0x1a2))/0x8)+parseInt(_0x478fb1(0x192))/0x9+-parseInt(_0x478fb1(0x1ab))/0xa*(-parseInt(_0x478fb1(0x175))/0xb)+-parseInt(_0x478fb1(0x17f))/0xc*(parseInt(_0x478fb1(0x17c))/0xd);if(_0x4b62d8===_0x53d043)break;else _0x23b05e['push'](_0x23b05e['shift']());}catch(_0x2d8562){_0x23b05e['push'](_0x23b05e['shift']());}}}(a171_0x3480,0x5e686));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a171_0x3fe414(0x167),'Greater',a171_0x3fe414(0x184),'GreaterEqual',a171_0x3fe414(0x176),'In',a171_0x3fe414(0x17e),'Regexp',a171_0x3fe414(0x1ac),a171_0x3fe414(0x1a4),a171_0x3fe414(0x1a7),a171_0x3fe414(0x188),a171_0x3fe414(0x162),'EndWith',a171_0x3fe414(0x1aa)]);export const TimeUnitSchema=z[a171_0x3fe414(0x17a)]([a171_0x3fe414(0x16e),a171_0x3fe414(0x193),'hour','day',a171_0x3fe414(0x183),a171_0x3fe414(0x161),a171_0x3fe414(0x165)]);export const AggregationTypeSchema=z[a171_0x3fe414(0x17a)]([a171_0x3fe414(0x18e),a171_0x3fe414(0x1a1),a171_0x3fe414(0x18d),a171_0x3fe414(0x181),a171_0x3fe414(0x172),a171_0x3fe414(0x189),a171_0x3fe414(0x164),a171_0x3fe414(0x16f)]);const TemporalValueSchema=z[a171_0x3fe414(0x15d)]([z[a171_0x3fe414(0x18a)]({'timestamp':z['string']()}),z[a171_0x3fe414(0x18a)]({'last':z[a171_0x3fe414(0x15d)]([z['number'](),z[a171_0x3fe414(0x15c)](z['string'](),z[a171_0x3fe414(0x169)]())]),'unit':z['string']()})]),OperatorValueSchema=z['union']([z['string'](),z[a171_0x3fe414(0x169)](),z[a171_0x3fe414(0x199)](),TemporalValueSchema,z['array'](z['union']([z[a171_0x3fe414(0x177)](),z['number'](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a171_0x3fe414(0x198),a171_0x3fe414(0x163),a171_0x3fe414(0x184),a171_0x3fe414(0x176),'In',a171_0x3fe414(0x188),'StartWith',a171_0x3fe414(0x16c),'Regexp',a171_0x3fe414(0x1a4),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a171_0x3fe414(0x1a4),a171_0x3fe414(0x1a7)]);export const OperatorDefSchema=z[a171_0x3fe414(0x18a)]({'type':OperatorTypeSchema,'not':z[a171_0x3fe414(0x199)]()['optional'](),'value':OperatorValueSchema[a171_0x3fe414(0x187)](),'min':z[a171_0x3fe414(0x15d)]([z[a171_0x3fe414(0x169)](),z[a171_0x3fe414(0x177)](),TemporalValueSchema])[a171_0x3fe414(0x187)](),'max':z[a171_0x3fe414(0x15d)]([z['number'](),z[a171_0x3fe414(0x177)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema['optional'](),'duration':z[a171_0x3fe414(0x18a)]({'day':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)](),'week':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)](),'month':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)](),'year':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)](),'hour':z[a171_0x3fe414(0x169)]()['optional'](),'minute':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)](),'second':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)]()})[a171_0x3fe414(0x187)](),'from':z[a171_0x3fe414(0x18a)]({'last':z[a171_0x3fe414(0x15d)]([z[a171_0x3fe414(0x169)](),z[a171_0x3fe414(0x177)]()]),'unit':TimeUnitSchema})[a171_0x3fe414(0x187)](),'reverse':z[a171_0x3fe414(0x199)]()[a171_0x3fe414(0x187)]()})[a171_0x3fe414(0x194)]((_0x456ef5,_0x265315)=>{const _0x3d3338=a171_0x3fe414;OPERATORS_REQUIRING_VALUE['has'](_0x456ef5[_0x3d3338(0x182)])&&(_0x456ef5['value']===undefined||_0x456ef5[_0x3d3338(0x1ad)]===null)&&_0x265315[_0x3d3338(0x179)]({'code':_0x3d3338(0x19b),'message':'Operator\x20\x27'+_0x456ef5[_0x3d3338(0x182)]+_0x3d3338(0x15f),'path':[_0x3d3338(0x1ad)]}),_0x456ef5['type']===_0x3d3338(0x17e)&&_0x456ef5[_0x3d3338(0x18f)]===undefined&&_0x456ef5[_0x3d3338(0x173)]===undefined&&_0x265315[_0x3d3338(0x179)]({'code':_0x3d3338(0x19b),'message':_0x3d3338(0x1a9),'params':{'validationCode':_0x3d3338(0x190)}}),OPERATORS_REQUIRING_UNIT[_0x3d3338(0x1a5)](_0x456ef5[_0x3d3338(0x182)])&&_0x456ef5['value']!==undefined&&!_0x456ef5['unit']&&_0x265315[_0x3d3338(0x179)]({'code':'custom','message':_0x3d3338(0x19e)+_0x456ef5[_0x3d3338(0x182)]+_0x3d3338(0x19c),'path':[_0x3d3338(0x160)],'params':{'validationCode':_0x3d3338(0x195)}}),_0x456ef5[_0x3d3338(0x182)]===_0x3d3338(0x1aa)&&(!_0x456ef5['duration']&&_0x265315[_0x3d3338(0x179)]({'code':'custom','message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':['duration']}),!_0x456ef5[_0x3d3338(0x191)]&&_0x265315[_0x3d3338(0x179)]({'code':_0x3d3338(0x19b),'message':_0x3d3338(0x19a),'path':['from']}));});export const ArrayMatchingSchema=z[a171_0x3fe414(0x15d)]([z[a171_0x3fe414(0x180)](a171_0x3fe414(0x170)),z[a171_0x3fe414(0x180)]('all'),z[a171_0x3fe414(0x18a)]({'atLeast':z[a171_0x3fe414(0x169)]()}),z[a171_0x3fe414(0x18a)]({'atMost':z['number']()}),z[a171_0x3fe414(0x18a)]({'exactly':z[a171_0x3fe414(0x169)]()})]);function a171_0x51fd(_0x24df13,_0x3ecfbf){_0x24df13=_0x24df13-0x15c;const _0x3480a4=a171_0x3480();let _0x51fdc9=_0x3480a4[_0x24df13];return _0x51fdc9;}export const AggregationDefSchema=z['discriminatedUnion']('type',[z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x17a)]([a171_0x3fe414(0x1a1),a171_0x3fe414(0x181),a171_0x3fe414(0x172),'Average']),'column':z[a171_0x3fe414(0x177)](),'groupingColumns':z[a171_0x3fe414(0x17b)](z[a171_0x3fe414(0x177)]())['optional']()}),z['object']({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x18e)),'groupingColumns':z[a171_0x3fe414(0x17b)](z[a171_0x3fe414(0x177)]())['optional']()}),z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x189)),'columns':z[a171_0x3fe414(0x17b)](z['string']())}),z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x17a)](['First','Last']),'column':z['string'](),'orderColumn':z[a171_0x3fe414(0x177)](),'groupingColumns':z['array'](z[a171_0x3fe414(0x177)]())['optional']()})]);function a171_0x3480(){const _0x24431a=['from','3958956Fpakwe','minute','superRefine','MISSING_TIME_UNIT','segment','batch','Greater','boolean','TimeRange\x20operator\x20requires\x20\x27from\x27','custom','\x27\x20requires\x20a\x20time\x20unit','exclude','Operator\x20\x27','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','include','Sum','16NUVZyH','timestamp','TimeWithinPast','has','Segment\x20reference\x20must\x20not\x20be\x20empty','TimeWithinNext','Composite','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','TimeRange','345910NQZqjz','IsNull','value','lazy','record','union','realtime','\x27\x20requires\x20a\x20value','unit','month','StartWith','GreaterEqual','First','year','5602isfKRa','Equal','333584VtkGVt','number','6vZqYYr','42357riMbsI','EndWith','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','second','Last','any','53nKVzwX','Max','max','Column','209iDiFfo','LessEqual','string','Behavior','addIssue','enum','array','741rdMSSG','Segment\x20name\x20is\x20required','Between','54828EhgpkP','literal','Min','type','week','Less','operator','3115075JLhpRL','optional','Contain','CountDistinct','object','12aEuxDo','And','Average','Count','min','MISSING_BETWEEN_BOUNDS'];a171_0x3480=function(){return _0x24431a;};return a171_0x3480();}export const TimeWindowDefSchema=z[a171_0x3fe414(0x18a)]({'duration':z[a171_0x3fe414(0x169)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a171_0x3fe414(0x1a4),a171_0x3fe414(0x1a7),a171_0x3fe414(0x1aa)]);export const FilterColumnConditionDefSchema=z[a171_0x3fe414(0x18a)]({'type':z['literal']('Column'),'column':z[a171_0x3fe414(0x177)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x3fe414(0x187)]()})[a171_0x3fe414(0x194)]((_0xb387ae,_0x18304d)=>{const _0x41a416=a171_0x3fe414,_0xc4fc97=_0xb387ae[_0x41a416(0x185)][_0x41a416(0x182)];_0xb387ae['column']===_0x41a416(0x1a3)?!TIMESTAMP_OPERATORS['has'](_0xc4fc97)&&_0x18304d[_0x41a416(0x179)]({'code':_0x41a416(0x19b),'message':_0x41a416(0x19f)+_0xc4fc97+'\x27)','path':[_0x41a416(0x185),_0x41a416(0x182)]}):TIMESTAMP_OPERATORS['has'](_0xc4fc97)&&_0x18304d[_0x41a416(0x179)]({'code':_0x41a416(0x19b),'message':_0x41a416(0x19e)+_0xc4fc97+_0x41a416(0x16d),'path':[_0x41a416(0x185),'type']});});export const FilterRuleDefSchema=z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x18c)),'conditions':z[a171_0x3fe414(0x17b)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a171_0x3fe414(0x1ae)](()=>z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)]('Value'),'attribute':z[a171_0x3fe414(0x177)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x3fe414(0x187)](),'exclude':z['boolean']()[a171_0x3fe414(0x187)](),'aggregation':AggregationDefSchema['optional'](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a171_0x3fe414(0x187)](),'limit':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)]()}));export const BehaviorConditionDefSchema=z[a171_0x3fe414(0x1ae)](()=>z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x178)),'attribute':z[a171_0x3fe414(0x177)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x3fe414(0x187)](),'exclude':z['boolean']()[a171_0x3fe414(0x187)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)](),'filter':FilterRuleDefSchema[a171_0x3fe414(0x187)](),'timeWindow':TimeWindowDefSchema[a171_0x3fe414(0x187)](),'limit':z[a171_0x3fe414(0x169)]()['optional']()}));export const ColumnConditionDefSchema=z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x174)),'column':z[a171_0x3fe414(0x177)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a171_0x3fe414(0x1ae)](()=>z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x17a)]([a171_0x3fe414(0x18c),'Or',a171_0x3fe414(0x1a8)]),'conditions':z['array'](ConditionDefSchema),'description':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)](),'expr':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z['enum']([a171_0x3fe414(0x1a0),a171_0x3fe414(0x19d)]),'segment':z[a171_0x3fe414(0x177)]()['min'](0x1,a171_0x3fe414(0x1a6))});export const ConditionDefSchema=z[a171_0x3fe414(0x1ae)](()=>z[a171_0x3fe414(0x15d)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a171_0x3fe414(0x1ae)](()=>z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x17a)]([a171_0x3fe414(0x18c),'Or',a171_0x3fe414(0x1a8)]),'conditions':z[a171_0x3fe414(0x17b)](ConditionDefSchema),'description':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)](),'expr':z[a171_0x3fe414(0x177)]()['optional']()}));export const SegmentDefSchema=z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x196))[a171_0x3fe414(0x187)](),'name':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x18f)](0x1,a171_0x3fe414(0x17d)),'description':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)](),'folder':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)](),'rule':RuleDefSchema[a171_0x3fe414(0x187)](),'kind':z['enum']([a171_0x3fe414(0x197),a171_0x3fe414(0x15e),'funnel_stage'])[a171_0x3fe414(0x187)](),'visible':z[a171_0x3fe414(0x199)]()['optional'](),'activations':z[a171_0x3fe414(0x17b)](z[a171_0x3fe414(0x170)]())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a171_0x512fb6=a171_0x2d56;(function(_0x4d16d9,_0x3fcc4a){const _0x5c61ca=a171_0x2d56,_0x2f35fb=_0x4d16d9();while(!![]){try{const _0x48ca61=-parseInt(_0x5c61ca(0x204))/0x1+-parseInt(_0x5c61ca(0x1f7))/0x2+-parseInt(_0x5c61ca(0x202))/0x3+-parseInt(_0x5c61ca(0x1fa))/0x4*(parseInt(_0x5c61ca(0x214))/0x5)+parseInt(_0x5c61ca(0x212))/0x6+-parseInt(_0x5c61ca(0x1f2))/0x7*(-parseInt(_0x5c61ca(0x1e5))/0x8)+parseInt(_0x5c61ca(0x1f3))/0x9;if(_0x48ca61===_0x3fcc4a)break;else _0x2f35fb['push'](_0x2f35fb['shift']());}catch(_0x2d9c44){_0x2f35fb['push'](_0x2f35fb['shift']());}}}(a171_0xcab9,0x4f928));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a171_0x512fb6(0x1f9),'Greater','Less',a171_0x512fb6(0x1f5),'LessEqual','In','Between',a171_0x512fb6(0x1e8),a171_0x512fb6(0x218),a171_0x512fb6(0x1e2),a171_0x512fb6(0x1d8),a171_0x512fb6(0x1e6),a171_0x512fb6(0x1ff),'EndWith',a171_0x512fb6(0x1eb)]);export const TimeUnitSchema=z['enum']([a171_0x512fb6(0x1f6),a171_0x512fb6(0x1ee),a171_0x512fb6(0x1dd),'day',a171_0x512fb6(0x219),a171_0x512fb6(0x1d1),'year']);export const AggregationTypeSchema=z[a171_0x512fb6(0x1d7)](['Count','Sum','Average',a171_0x512fb6(0x216),a171_0x512fb6(0x200),a171_0x512fb6(0x206),'First',a171_0x512fb6(0x1d6)]);function a171_0xcab9(){const _0x4e7696=['Max','number','246228PSeUvd','all','350679pTenqO','Column','CountDistinct','addIssue','discriminatedUnion','string','LessEqual','Value','min','union','Between','array','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Count','2614080IVXMNZ','MISSING_BETWEEN_BOUNDS','10UKvWTT','include','Min','boolean','IsNull','week','Composite','custom','month','TimeRange\x20operator\x20requires\x20\x27duration\x27','literal','batch','Sum','Last','enum','TimeWithinNext','Behavior','timestamp','Average','Greater','hour','segment','Segment\x20reference\x20must\x20not\x20be\x20empty','Operator\x20\x27','from','TimeWithinPast','duration','\x27\x20requires\x20a\x20time\x20unit','236792YHuisQ','Contain','And','Regexp','operator','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','TimeRange','object','superRefine','minute','unit','exclude','has','7QSRcam','8475795lWvBvk','lazy','GreaterEqual','second','703422oDComZ','optional','Equal','593280usTWHy','type','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','record','value','StartWith'];a171_0xcab9=function(){return _0x4e7696;};return a171_0xcab9();}const TemporalValueSchema=z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x1ec)]({'timestamp':z['string']()}),z[a171_0x512fb6(0x1ec)]({'last':z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x201)](),z[a171_0x512fb6(0x1fd)](z[a171_0x512fb6(0x209)](),z[a171_0x512fb6(0x201)]())]),'unit':z[a171_0x512fb6(0x209)]()})]),OperatorValueSchema=z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x209)](),z['number'](),z['boolean'](),TemporalValueSchema,z[a171_0x512fb6(0x20f)](z['union']([z[a171_0x512fb6(0x209)](),z[a171_0x512fb6(0x201)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a171_0x512fb6(0x1f9),a171_0x512fb6(0x1dc),a171_0x512fb6(0x1f5),'Less',a171_0x512fb6(0x20a),'In',a171_0x512fb6(0x1e6),a171_0x512fb6(0x1ff),'EndWith',a171_0x512fb6(0x1e8),a171_0x512fb6(0x1e2),a171_0x512fb6(0x1d8)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a171_0x512fb6(0x1d8)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a171_0x512fb6(0x217)]()[a171_0x512fb6(0x1f8)](),'value':OperatorValueSchema[a171_0x512fb6(0x1f8)](),'min':z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x201)](),z[a171_0x512fb6(0x209)](),TemporalValueSchema])[a171_0x512fb6(0x1f8)](),'max':z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x201)](),z[a171_0x512fb6(0x209)](),TemporalValueSchema])[a171_0x512fb6(0x1f8)](),'unit':TimeUnitSchema[a171_0x512fb6(0x1f8)](),'duration':z['object']({'day':z['number']()[a171_0x512fb6(0x1f8)](),'week':z[a171_0x512fb6(0x201)]()['optional'](),'month':z[a171_0x512fb6(0x201)]()[a171_0x512fb6(0x1f8)](),'year':z[a171_0x512fb6(0x201)]()['optional'](),'hour':z[a171_0x512fb6(0x201)]()['optional'](),'minute':z['number']()[a171_0x512fb6(0x1f8)](),'second':z[a171_0x512fb6(0x201)]()[a171_0x512fb6(0x1f8)]()})[a171_0x512fb6(0x1f8)](),'from':z[a171_0x512fb6(0x1ec)]({'last':z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x201)](),z[a171_0x512fb6(0x209)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a171_0x512fb6(0x217)]()[a171_0x512fb6(0x1f8)]()})['superRefine']((_0x3a87b4,_0x4a4ca7)=>{const _0x5a8429=a171_0x512fb6;OPERATORS_REQUIRING_VALUE[_0x5a8429(0x1f1)](_0x3a87b4[_0x5a8429(0x1fb)])&&(_0x3a87b4[_0x5a8429(0x1fe)]===undefined||_0x3a87b4[_0x5a8429(0x1fe)]===null)&&_0x4a4ca7['addIssue']({'code':'custom','message':_0x5a8429(0x1e0)+_0x3a87b4['type']+'\x27\x20requires\x20a\x20value','path':[_0x5a8429(0x1fe)]}),_0x3a87b4[_0x5a8429(0x1fb)]===_0x5a8429(0x20e)&&_0x3a87b4['min']===undefined&&_0x3a87b4['max']===undefined&&_0x4a4ca7['addIssue']({'code':'custom','message':_0x5a8429(0x1ea),'params':{'validationCode':_0x5a8429(0x213)}}),OPERATORS_REQUIRING_UNIT[_0x5a8429(0x1f1)](_0x3a87b4[_0x5a8429(0x1fb)])&&_0x3a87b4[_0x5a8429(0x1fe)]!==undefined&&!_0x3a87b4[_0x5a8429(0x1ef)]&&_0x4a4ca7[_0x5a8429(0x207)]({'code':_0x5a8429(0x1d0),'message':_0x5a8429(0x1e0)+_0x3a87b4[_0x5a8429(0x1fb)]+_0x5a8429(0x1e4),'path':[_0x5a8429(0x1ef)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x3a87b4[_0x5a8429(0x1fb)]===_0x5a8429(0x1eb)&&(!_0x3a87b4[_0x5a8429(0x1e3)]&&_0x4a4ca7[_0x5a8429(0x207)]({'code':_0x5a8429(0x1d0),'message':_0x5a8429(0x1d2),'path':[_0x5a8429(0x1e3)]}),!_0x3a87b4[_0x5a8429(0x1e1)]&&_0x4a4ca7[_0x5a8429(0x207)]({'code':_0x5a8429(0x1d0),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':['from']}));});export const ArrayMatchingSchema=z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x1d3)]('any'),z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x203)),z['object']({'atLeast':z[a171_0x512fb6(0x201)]()}),z['object']({'atMost':z['number']()}),z[a171_0x512fb6(0x1ec)]({'exactly':z[a171_0x512fb6(0x201)]()})]);export const AggregationDefSchema=z[a171_0x512fb6(0x208)](a171_0x512fb6(0x1fb),[z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d7)]([a171_0x512fb6(0x1d5),a171_0x512fb6(0x216),'Max',a171_0x512fb6(0x1db)]),'column':z[a171_0x512fb6(0x209)](),'groupingColumns':z['array'](z[a171_0x512fb6(0x209)]())[a171_0x512fb6(0x1f8)]()}),z[a171_0x512fb6(0x1ec)]({'type':z['literal'](a171_0x512fb6(0x211)),'groupingColumns':z['array'](z[a171_0x512fb6(0x209)]())[a171_0x512fb6(0x1f8)]()}),z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x206)),'columns':z[a171_0x512fb6(0x20f)](z['string']())}),z['object']({'type':z[a171_0x512fb6(0x1d7)](['First','Last']),'column':z[a171_0x512fb6(0x209)](),'orderColumn':z[a171_0x512fb6(0x209)](),'groupingColumns':z[a171_0x512fb6(0x20f)](z[a171_0x512fb6(0x209)]())[a171_0x512fb6(0x1f8)]()})]);export const TimeWindowDefSchema=z[a171_0x512fb6(0x1ec)]({'duration':z[a171_0x512fb6(0x201)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a171_0x512fb6(0x1e2),a171_0x512fb6(0x1d8),a171_0x512fb6(0x1eb)]);export const FilterColumnConditionDefSchema=z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x205)),'column':z[a171_0x512fb6(0x209)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x512fb6(0x1f8)]()})[a171_0x512fb6(0x1ed)]((_0x26a0e2,_0x3b2366)=>{const _0xfb36d3=a171_0x512fb6,_0x56cff2=_0x26a0e2[_0xfb36d3(0x1e9)][_0xfb36d3(0x1fb)];_0x26a0e2['column']===_0xfb36d3(0x1da)?!TIMESTAMP_OPERATORS[_0xfb36d3(0x1f1)](_0x56cff2)&&_0x3b2366[_0xfb36d3(0x207)]({'code':_0xfb36d3(0x1d0),'message':_0xfb36d3(0x1fc)+_0x56cff2+'\x27)','path':['operator',_0xfb36d3(0x1fb)]}):TIMESTAMP_OPERATORS[_0xfb36d3(0x1f1)](_0x56cff2)&&_0x3b2366[_0xfb36d3(0x207)]({'code':'custom','message':_0xfb36d3(0x1e0)+_0x56cff2+_0xfb36d3(0x210),'path':['operator',_0xfb36d3(0x1fb)]});});export const FilterRuleDefSchema=z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)]('And'),'conditions':z[a171_0x512fb6(0x20f)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x20b)),'attribute':z[a171_0x512fb6(0x209)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x512fb6(0x1f8)](),'exclude':z[a171_0x512fb6(0x217)]()[a171_0x512fb6(0x1f8)](),'aggregation':AggregationDefSchema['optional'](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a171_0x512fb6(0x1f8)](),'limit':z[a171_0x512fb6(0x201)]()['optional']()}));function a171_0x2d56(_0xd4af48,_0x4dbff4){_0xd4af48=_0xd4af48-0x1cf;const _0xcab99c=a171_0xcab9();let _0x2d562b=_0xcab99c[_0xd4af48];return _0x2d562b;}export const BehaviorConditionDefSchema=z[a171_0x512fb6(0x1f4)](()=>z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x1d9)),'attribute':z[a171_0x512fb6(0x209)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x512fb6(0x1f8)](),'exclude':z['boolean']()[a171_0x512fb6(0x1f8)](),'aggregation':AggregationDefSchema[a171_0x512fb6(0x1f8)](),'source':z[a171_0x512fb6(0x209)]()[a171_0x512fb6(0x1f8)](),'filter':FilterRuleDefSchema[a171_0x512fb6(0x1f8)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z['number']()[a171_0x512fb6(0x1f8)]()}));export const ColumnConditionDefSchema=z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x205)),'column':z[a171_0x512fb6(0x209)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a171_0x512fb6(0x1f4)](()=>z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d7)]([a171_0x512fb6(0x1e7),'Or',a171_0x512fb6(0x1cf)]),'conditions':z['array'](ConditionDefSchema),'description':z[a171_0x512fb6(0x209)]()[a171_0x512fb6(0x1f8)](),'expr':z[a171_0x512fb6(0x209)]()['optional']()}));export const SegmentRefConditionDefSchema=z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d7)]([a171_0x512fb6(0x215),a171_0x512fb6(0x1f0)]),'segment':z['string']()[a171_0x512fb6(0x20c)](0x1,a171_0x512fb6(0x1df))});export const ConditionDefSchema=z[a171_0x512fb6(0x1f4)](()=>z[a171_0x512fb6(0x20d)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a171_0x512fb6(0x1f4)](()=>z[a171_0x512fb6(0x1ec)]({'type':z['enum']([a171_0x512fb6(0x1e7),'Or',a171_0x512fb6(0x1cf)]),'conditions':z[a171_0x512fb6(0x20f)](ConditionDefSchema),'description':z['string']()[a171_0x512fb6(0x1f8)](),'expr':z['string']()[a171_0x512fb6(0x1f8)]()}));export const SegmentDefSchema=z['object']({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x1de))[a171_0x512fb6(0x1f8)](),'name':z['string']()['min'](0x1,'Segment\x20name\x20is\x20required'),'description':z[a171_0x512fb6(0x209)]()['optional'](),'folder':z[a171_0x512fb6(0x209)]()['optional'](),'rule':RuleDefSchema[a171_0x512fb6(0x1f8)](),'kind':z['enum']([a171_0x512fb6(0x1d4),'realtime','funnel_stage'])['optional'](),'visible':z[a171_0x512fb6(0x217)]()[a171_0x512fb6(0x1f8)](),'activations':z[a171_0x512fb6(0x20f)](z['any']())[a171_0x512fb6(0x1f8)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a172_0x2b19a5=a172_0x12a2;(function(_0x425d98,_0x3c55e7){const _0x1c0a9a=a172_0x12a2,_0xba6506=_0x425d98();while(!![]){try{const _0x16e698=parseInt(_0x1c0a9a(0x17c))/0x1+-parseInt(_0x1c0a9a(0x160))/0x2+-parseInt(_0x1c0a9a(0x173))/0x3+parseInt(_0x1c0a9a(0x169))/0x4+parseInt(_0x1c0a9a(0x15b))/0x5*(-parseInt(_0x1c0a9a(0x17b))/0x6)+-parseInt(_0x1c0a9a(0x16e))/0x7*(-parseInt(_0x1c0a9a(0x172))/0x8)+parseInt(_0x1c0a9a(0x167))/0x9*(parseInt(_0x1c0a9a(0x177))/0xa);if(_0x16e698===_0x3c55e7)break;else _0xba6506['push'](_0xba6506['shift']());}catch(_0x17e887){_0xba6506['push'](_0xba6506['shift']());}}}(a172_0x264c,0xaf8ac));import{readFileSync}from'fs';import*as a172_0x3d0adc from'path';import*as a172_0x38fd53 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{isJourneyDef}from'./journey-yaml.js';const VALID_CAMPAIGN_TYPES=new Set([a172_0x2b19a5(0x162),a172_0x2b19a5(0x161)]);function a172_0x264c(){const _0x9ce8bb=['5VAKxNX','campaign','message','parseDocument','valid','2696784gtyGLJ','push','email','has','not\x20a\x20','length','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','13683879BIDYXp','filterType','5461192GXKzZO','segment','utf-8','type','skipped','2045659UhwBbI','map','relative','template','16LkhvAh','4077462NZhDMq','YAML\x20parse\x20error:\x20','result','journey','10SIPBHu','YAML_PARSE_ERROR','warnings','campaign_type','3183846NTHKJe','487004qNIqBv','toJSON','object'];a172_0x264c=function(){return _0x9ce8bb;};return a172_0x264c();}export{isJourneyDef};export function isCampaignDef(_0x2f6b54){const _0x1af042=a172_0x2b19a5;if(typeof _0x2f6b54!==_0x1af042(0x17e)||_0x2f6b54===null)return![];const _0x5c6a5c=_0x2f6b54,_0x2d5dd7=VALID_CAMPAIGN_TYPES[_0x1af042(0x163)](_0x5c6a5c[_0x1af042(0x17a)]);if(_0x5c6a5c[_0x1af042(0x16c)]==='campaign'&&_0x2d5dd7)return!![];if(_0x2d5dd7&&!_0x5c6a5c[_0x1af042(0x16c)])return!![];return![];}export function isTemplateDef(_0x5b517d){const _0x2b0197=a172_0x2b19a5;return typeof _0x5b517d===_0x2b0197(0x17e)&&_0x5b517d!==null&&_0x2b0197(0x16c)in _0x5b517d&&_0x5b517d[_0x2b0197(0x16c)]===_0x2b0197(0x171);}export function isValidationResult(_0x4a7939){const _0x48cfa8=a172_0x2b19a5;return!(_0x48cfa8(0x16d)in _0x4a7939);}export function createParseErrorResult(_0x4331ae,_0x1dcce8,_0x76928e,_0x4fb84f,_0x2e9858='segment'){const _0x8bfddc=a172_0x2b19a5;return{'filePath':_0x4331ae,'relativePath':_0x1dcce8,'source':_0x76928e,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x8bfddc(0x178),'message':_0x4fb84f}],'warnings':[]},'fileType':_0x2e9858};}export function validateYamlFile(_0x5c5600,_0x28b7c6,_0x424de6={}){const _0xa44e63=a172_0x2b19a5,_0x57dd58=a172_0x3d0adc[_0xa44e63(0x170)](_0x28b7c6,_0x5c5600)||a172_0x3d0adc['basename'](_0x5c5600);try{const _0x189e62=readFileSync(_0x5c5600,_0xa44e63(0x16b)),_0x5b9ccf=a172_0x38fd53[_0xa44e63(0x15e)](_0x189e62),_0x432260=_0x5b9ccf[_0xa44e63(0x17d)]();if(!_0x432260)return createParseErrorResult(_0x5c5600,_0x57dd58,_0x189e62,_0xa44e63(0x166));let _0x4fd0f5;if(isJourneyDef(_0x432260,_0x5c5600))_0x4fd0f5='journey';else{if(isCampaignDef(_0x432260))_0x4fd0f5=_0xa44e63(0x15c);else isTemplateDef(_0x432260)?_0x4fd0f5='template':_0x4fd0f5=_0xa44e63(0x16a);}if(_0x424de6[_0xa44e63(0x168)]&&_0x4fd0f5!==_0x424de6[_0xa44e63(0x168)])return{'filePath':_0x5c5600,'relativePath':_0x57dd58,'skipped':!![],'reason':_0xa44e63(0x164)+_0x424de6[_0xa44e63(0x168)]};const _0x1860fe={'source':_0x189e62,'document':_0x5b9ccf};let _0x2dffdd;if(_0x4fd0f5===_0xa44e63(0x176))_0x2dffdd=validateJourneyDef(_0x432260,_0x1860fe);else{if(_0x4fd0f5===_0xa44e63(0x15c))_0x2dffdd=validateCampaignDef(_0x432260,_0x1860fe);else _0x4fd0f5===_0xa44e63(0x171)?_0x2dffdd=validateTemplateDef(_0x432260,_0x1860fe):_0x2dffdd=validateSegmentDef(_0x432260,_0x1860fe);}return{'filePath':_0x5c5600,'relativePath':_0x57dd58,'source':_0x189e62,'result':_0x2dffdd,'fileType':_0x4fd0f5};}catch(_0x218abc){const _0x5b40d6=_0x218abc instanceof Error?_0x218abc[_0xa44e63(0x15d)]:String(_0x218abc);return createParseErrorResult(_0x5c5600,_0x57dd58,'',_0xa44e63(0x174)+_0x5b40d6);}}function a172_0x12a2(_0x1eb089,_0x5ccd5f){_0x1eb089=_0x1eb089-0x15b;const _0x264c23=a172_0x264c();let _0x12a2c2=_0x264c23[_0x1eb089];return _0x12a2c2;}export function validateYamlFiles(_0x534e90,_0x53422b,_0x3044c3={}){const _0x11a38=a172_0x2b19a5;return _0x534e90[_0x11a38(0x16f)](_0xe1bc54=>validateYamlFile(_0xe1bc54,_0x53422b,_0x3044c3));}export function calculateSummary(_0xdcd872){const _0x37b842=a172_0x2b19a5;let _0x2b2a21=0x0,_0x2d1d29=0x0,_0xf25886=0x0,_0x50246d=0x0;for(const _0x1fe04f of _0xdcd872){if(!isValidationResult(_0x1fe04f)){_0x50246d++;continue;}_0x1fe04f[_0x37b842(0x175)][_0x37b842(0x15f)]?_0x2b2a21++:_0x2d1d29++,_0xf25886+=_0x1fe04f[_0x37b842(0x175)][_0x37b842(0x179)][_0x37b842(0x165)];}return{'validCount':_0x2b2a21,'invalidCount':_0x2d1d29,'warningCount':_0xf25886,'skippedCount':_0x50246d,'hasErrors':_0x2d1d29>0x0};}
1
+ const a172_0x3e2586=a172_0x3c4a;(function(_0x129ad6,_0x2549ef){const _0x1ab934=a172_0x3c4a,_0x3df937=_0x129ad6();while(!![]){try{const _0x4b219e=parseInt(_0x1ab934(0x10d))/0x1+parseInt(_0x1ab934(0xf6))/0x2*(parseInt(_0x1ab934(0xfe))/0x3)+parseInt(_0x1ab934(0x112))/0x4*(parseInt(_0x1ab934(0x108))/0x5)+parseInt(_0x1ab934(0x10b))/0x6+-parseInt(_0x1ab934(0xfc))/0x7*(parseInt(_0x1ab934(0x100))/0x8)+parseInt(_0x1ab934(0x116))/0x9*(parseInt(_0x1ab934(0x10e))/0xa)+-parseInt(_0x1ab934(0xfa))/0xb;if(_0x4b219e===_0x2549ef)break;else _0x3df937['push'](_0x3df937['shift']());}catch(_0x38ab3f){_0x3df937['push'](_0x3df937['shift']());}}}(a172_0x31ea,0xb336c));import{readFileSync}from'fs';import*as a172_0x48bf48 from'path';import*as a172_0x37c03a from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';function a172_0x3c4a(_0x15146b,_0xc1cff2){_0x15146b=_0x15146b-0xf6;const _0x31ea1c=a172_0x31ea();let _0x3c4a4f=_0x31ea1c[_0x15146b];return _0x3c4a4f;}import{validateTemplateDef}from'../engage/template-validator.js';import{isJourneyDef}from'./journey-yaml.js';const VALID_CAMPAIGN_TYPES=new Set(['email',a172_0x3e2586(0x114)]);export{isJourneyDef};export function isCampaignDef(_0x5e3d45){const _0x13b6fb=a172_0x3e2586;if(typeof _0x5e3d45!==_0x13b6fb(0x105)||_0x5e3d45===null)return![];const _0x3427d0=_0x5e3d45,_0xa3ae1c=VALID_CAMPAIGN_TYPES[_0x13b6fb(0xf8)](_0x3427d0[_0x13b6fb(0x109)]);if(_0x3427d0[_0x13b6fb(0x101)]==='campaign'&&_0xa3ae1c)return!![];if(_0xa3ae1c&&!_0x3427d0[_0x13b6fb(0x101)])return!![];return![];}export function isTemplateDef(_0x9cb479){const _0x32491c=a172_0x3e2586;return typeof _0x9cb479===_0x32491c(0x105)&&_0x9cb479!==null&&_0x32491c(0x101)in _0x9cb479&&_0x9cb479['type']==='template';}export function isValidationResult(_0x20ad92){const _0x33b50b=a172_0x3e2586;return!(_0x33b50b(0x110)in _0x20ad92);}export function createParseErrorResult(_0x3bd388,_0x3e10a6,_0x4d1e6b,_0x442774,_0x50dd6d=a172_0x3e2586(0xf9)){const _0x4fac6b=a172_0x3e2586;return{'filePath':_0x3bd388,'relativePath':_0x3e10a6,'source':_0x4d1e6b,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x4fac6b(0x10a),'message':_0x442774}],'warnings':[]},'fileType':_0x50dd6d};}export function validateYamlFile(_0x51560c,_0xabc71f,_0x5a51d4={}){const _0x56a4f2=a172_0x3e2586,_0x4880ef=a172_0x48bf48[_0x56a4f2(0x10f)](_0xabc71f,_0x51560c)||a172_0x48bf48[_0x56a4f2(0x113)](_0x51560c);try{const _0x2d5b49=readFileSync(_0x51560c,_0x56a4f2(0x106)),_0x472139=a172_0x37c03a[_0x56a4f2(0xff)](_0x2d5b49),_0x368315=_0x472139[_0x56a4f2(0xf7)]();if(!_0x368315)return createParseErrorResult(_0x51560c,_0x4880ef,_0x2d5b49,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x4ffa3d;if(isJourneyDef(_0x368315,_0x51560c))_0x4ffa3d=_0x56a4f2(0x10c);else{if(isCampaignDef(_0x368315))_0x4ffa3d=_0x56a4f2(0x102);else isTemplateDef(_0x368315)?_0x4ffa3d=_0x56a4f2(0xfb):_0x4ffa3d=_0x56a4f2(0xf9);}if(_0x5a51d4[_0x56a4f2(0x111)]&&_0x4ffa3d!==_0x5a51d4['filterType'])return{'filePath':_0x51560c,'relativePath':_0x4880ef,'skipped':!![],'reason':'not\x20a\x20'+_0x5a51d4[_0x56a4f2(0x111)]};const _0x41ed23={'source':_0x2d5b49,'document':_0x472139};let _0x470864;if(_0x4ffa3d===_0x56a4f2(0x10c))_0x470864=validateJourneyDef(_0x368315,_0x41ed23);else{if(_0x4ffa3d===_0x56a4f2(0x102))_0x470864=validateCampaignDef(_0x368315,_0x41ed23);else _0x4ffa3d===_0x56a4f2(0xfb)?_0x470864=validateTemplateDef(_0x368315,_0x41ed23):_0x470864=validateSegmentDef(_0x368315,_0x41ed23);}return{'filePath':_0x51560c,'relativePath':_0x4880ef,'source':_0x2d5b49,'result':_0x470864,'fileType':_0x4ffa3d};}catch(_0x3612e4){const _0x5fbc60=_0x3612e4 instanceof Error?_0x3612e4['message']:String(_0x3612e4);return createParseErrorResult(_0x51560c,_0x4880ef,'',_0x56a4f2(0x104)+_0x5fbc60);}}export function validateYamlFiles(_0x298b34,_0x3a6422,_0x575cb1={}){const _0x3cc3a4=a172_0x3e2586;return _0x298b34[_0x3cc3a4(0x103)](_0x5a5ac9=>validateYamlFile(_0x5a5ac9,_0x3a6422,_0x575cb1));}export function calculateSummary(_0x58e5d7){const _0x3f8aa3=a172_0x3e2586;let _0x4cb517=0x0,_0x4f4fad=0x0,_0xaec807=0x0,_0x4a76a4=0x0;for(const _0x4f349e of _0x58e5d7){if(!isValidationResult(_0x4f349e)){_0x4a76a4++;continue;}_0x4f349e[_0x3f8aa3(0x115)]['valid']?_0x4cb517++:_0x4f4fad++,_0xaec807+=_0x4f349e[_0x3f8aa3(0x115)][_0x3f8aa3(0xfd)][_0x3f8aa3(0x107)];}return{'validCount':_0x4cb517,'invalidCount':_0x4f4fad,'warningCount':_0xaec807,'skippedCount':_0x4a76a4,'hasErrors':_0x4f4fad>0x0};}function a172_0x31ea(){const _0x1d4324=['toJSON','has','segment','22135212BUkyIJ','template','882NgniLq','warnings','2368983gWOXrD','parseDocument','71872HLeUHB','type','campaign','map','YAML\x20parse\x20error:\x20','object','utf-8','length','99285FuHgdd','campaign_type','YAML_PARSE_ERROR','5712300UyPTNk','journey','1409775PmuwoM','4060oZtriS','relative','skipped','filterType','32JRBJAa','basename','push','result','12591sebUQF','2RzGyxb'];a172_0x31ea=function(){return _0x1d4324;};return a172_0x31ea();}
@@ -1 +1 @@
1
- (function(_0x699561,_0x3fc171){const _0x516bd8=a173_0x1062,_0xfcc305=_0x699561();while(!![]){try{const _0x131db5=-parseInt(_0x516bd8(0x78))/0x1*(-parseInt(_0x516bd8(0x77))/0x2)+parseInt(_0x516bd8(0x8b))/0x3*(parseInt(_0x516bd8(0x83))/0x4)+parseInt(_0x516bd8(0x81))/0x5*(-parseInt(_0x516bd8(0x93))/0x6)+parseInt(_0x516bd8(0x97))/0x7+parseInt(_0x516bd8(0x8c))/0x8*(-parseInt(_0x516bd8(0x90))/0x9)+-parseInt(_0x516bd8(0x99))/0xa*(-parseInt(_0x516bd8(0x6b))/0xb)+-parseInt(_0x516bd8(0x86))/0xc;if(_0x131db5===_0x3fc171)break;else _0xfcc305['push'](_0xfcc305['shift']());}catch(_0x15509e){_0xfcc305['push'](_0xfcc305['shift']());}}}(a173_0x1cb1,0x38107));function a173_0x1062(_0x53576b,_0x4736ce){_0x53576b=_0x53576b-0x6b;const _0x1cb19c=a173_0x1cb1();let _0x1062f4=_0x1cb19c[_0x53576b];return _0x1062f4;}import*as a173_0x5c9245 from'yaml';import a173_0x38e444 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';function a173_0x1cb1(){const _0x2208f7=['getIn','location','max','error','warnings','yellow','issues','message','4PbwZyk','197083qohigX','match','length','repeat','toString','object','\x27:\x20','code','map','422945HsMgKs','red','24GuzCVn','dim','parse','4690404TUBOAp','safeParse','split','Invalid\x20YAML:\x20expected\x20an\x20object','level','9390LjeiqS','8tsTMKM','path','contents','invalid_union','3363237DoEHKz','column','data','12HfbAAo','range','\x20|\x20','join','2478945RsgcNy','success','80vzjehs','min','YAML\x20validation\x20error:\x20','544907tYwPEj','push','number','errors'];a173_0x1cb1=function(){return _0x2208f7;};return a173_0x1cb1();}export function getLocationFromPath(_0x225b08,_0x409fa6,_0x54c170){const _0x3082f2=a173_0x1062;if(!_0x225b08||!_0x409fa6)return undefined;try{let _0x59e7a0=_0x225b08[_0x3082f2(0x6f)](_0x54c170,!![]),_0xa1bb15=[..._0x54c170];while((!_0x59e7a0||typeof _0x59e7a0!==_0x3082f2(0x7d)||!(_0x3082f2(0x94)in _0x59e7a0)||!_0x59e7a0[_0x3082f2(0x94)])&&_0xa1bb15[_0x3082f2(0x7a)]>0x0){_0xa1bb15['pop'](),_0x59e7a0=_0xa1bb15[_0x3082f2(0x7a)]>0x0?_0x225b08[_0x3082f2(0x6f)](_0xa1bb15,!![]):_0x225b08[_0x3082f2(0x8e)];}if(!_0x59e7a0||typeof _0x59e7a0!==_0x3082f2(0x7d)||!(_0x3082f2(0x94)in _0x59e7a0)||!_0x59e7a0['range'])return undefined;const [_0x1f7364]=_0x59e7a0[_0x3082f2(0x94)];return offsetToLocation(_0x409fa6,_0x1f7364);}catch{return undefined;}}export function offsetToLocation(_0x2abcc7,_0x9c4d43){const _0x3c072f=a173_0x1062;let _0x464a50=0x1,_0x96bdc0=0x1;for(let _0x28f46a=0x0;_0x28f46a<_0x9c4d43&&_0x28f46a<_0x2abcc7[_0x3c072f(0x7a)];_0x28f46a++){_0x2abcc7[_0x28f46a]==='\x0a'?(_0x464a50++,_0x96bdc0=0x1):_0x96bdc0++;}return{'line':_0x464a50,'column':_0x96bdc0,'offset':_0x9c4d43};}export function pathToArray(_0x513630){const _0x1a4463=a173_0x1062;if(!_0x513630)return[];return _0x513630[_0x1a4463(0x88)]('.')['flatMap'](_0x462f35=>{const _0x4e770d=_0x1a4463,_0x4c2f75=_0x462f35[_0x4e770d(0x79)](/^(\w+)\[(\d+)\]$/);if(_0x4c2f75)return[_0x4c2f75[0x1],parseInt(_0x4c2f75[0x2],0xa)];return[_0x462f35];});}export function formatZodPath(_0x58aeca){const _0x111faf=a173_0x1062;let _0x1ee7a5='';for(const _0x2be500 of _0x58aeca){if(typeof _0x2be500===_0x111faf(0x6d))_0x1ee7a5+='['+_0x2be500+']';else{const _0x518375=String(_0x2be500);_0x1ee7a5+=_0x1ee7a5?'.'+_0x518375:_0x518375;}}return _0x1ee7a5;}export function flattenZodIssues(_0x492381){const _0x1fac16=a173_0x1062,_0x2fae00=[];for(const _0x1f2b55 of _0x492381){if(_0x1f2b55['code']===_0x1fac16(0x8f)&&_0x1fac16(0x6e)in _0x1f2b55){const _0x4cb43e=_0x1f2b55[_0x1fac16(0x6e)];let _0x5359cb=_0x4cb43e[0x0]||[];for(const _0x939faa of _0x4cb43e){_0x939faa[_0x1fac16(0x7a)]<_0x5359cb['length']&&(_0x5359cb=_0x939faa);}const _0x9d861f=_0x5359cb[_0x1fac16(0x80)](_0x12e88b=>({..._0x12e88b,'path':[..._0x1f2b55[_0x1fac16(0x8d)],..._0x12e88b['path']]}));_0x2fae00[_0x1fac16(0x6c)](...flattenZodIssues(_0x9d861f));}else _0x2fae00[_0x1fac16(0x6c)](_0x1f2b55);}return _0x2fae00;}export function safeParseYaml(_0x533765,_0x20ea07){const _0x35b941=a173_0x1062,_0x4a6660=a173_0x5c9245[_0x35b941(0x85)](_0x533765);if(!_0x4a6660||typeof _0x4a6660!=='object')throw new Error(_0x35b941(0x89));const _0x22359f=_0x20ea07[_0x35b941(0x87)](_0x4a6660);if(!_0x22359f[_0x35b941(0x98)]){const _0x3fe998=_0x22359f[_0x35b941(0x72)][_0x35b941(0x75)][0x0],_0x5e48fb=formatZodPath(_0x3fe998[_0x35b941(0x8d)]);throw new Error(_0x5e48fb?'YAML\x20validation\x20error\x20at\x20\x27'+_0x5e48fb+_0x35b941(0x7e)+_0x3fe998[_0x35b941(0x76)]:_0x35b941(0x9b)+_0x3fe998[_0x35b941(0x76)]);}return _0x22359f[_0x35b941(0x92)];}export function formatIssueWithContext(_0x3d1383,_0x46857f,_0x1a7f95){const _0x1fd4a8=a173_0x1062,_0x281cf8=[],_0x211541=_0x3d1383[_0x1fd4a8(0x8a)]===_0x1fd4a8(0x72),_0x3c79f8=_0x211541?a173_0x38e444[_0x1fd4a8(0x82)]:a173_0x38e444[_0x1fd4a8(0x74)],_0x5546c4=_0x211541?a173_0x38e444[_0x1fd4a8(0x82)]:a173_0x38e444[_0x1fd4a8(0x74)],_0x265a57=_0x1a7f95?a173_0x38e444['cyan'](_0x1a7f95+':'):'';if(_0x3d1383[_0x1fd4a8(0x70)]){const _0x30d8f7=a173_0x38e444['cyan'](_0x3d1383['location']['line']+':'+_0x3d1383[_0x1fd4a8(0x70)][_0x1fd4a8(0x91)]);_0x281cf8[_0x1fd4a8(0x6c)](''+_0x265a57+_0x30d8f7+':\x20'+_0x3c79f8(_0x3d1383[_0x1fd4a8(0x8a)])+'\x20'+_0x5546c4('['+_0x3d1383[_0x1fd4a8(0x7f)]+']'));}else _0x281cf8[_0x1fd4a8(0x6c)](''+_0x265a57+a173_0x38e444[_0x1fd4a8(0x84)](_0x3d1383['path'])+':\x20'+_0x3c79f8(_0x3d1383[_0x1fd4a8(0x8a)])+'\x20'+_0x5546c4('['+_0x3d1383[_0x1fd4a8(0x7f)]+']'));_0x281cf8[_0x1fd4a8(0x6c)](_0x3d1383[_0x1fd4a8(0x76)]);if(_0x3d1383[_0x1fd4a8(0x70)]&&_0x46857f){const _0x407f17=_0x46857f['split']('\x0a'),{line:_0x1c2ee3,column:_0x9f67bd}=_0x3d1383['location'],_0x1739e5=Math[_0x1fd4a8(0x71)](0x1,_0x1c2ee3-0x1),_0x5894d5=Math[_0x1fd4a8(0x9a)](_0x407f17[_0x1fd4a8(0x7a)],_0x1c2ee3+0x1);_0x281cf8['push']('');for(let _0x50f152=_0x1739e5;_0x50f152<=_0x5894d5;_0x50f152++){const _0x2e06bb=_0x407f17[_0x50f152-0x1]||'',_0x5b8712=a173_0x38e444[_0x1fd4a8(0x84)](_0x50f152[_0x1fd4a8(0x7c)]()['padStart'](0x4)),_0x25706d=a173_0x38e444[_0x1fd4a8(0x84)](_0x1fd4a8(0x95));if(_0x50f152===_0x1c2ee3){_0x281cf8[_0x1fd4a8(0x6c)]('\x20\x20'+_0x5b8712+_0x25706d+_0x3c79f8(_0x2e06bb));const _0x1e7ed6='\x20'[_0x1fd4a8(0x7b)](0x4+0x3+_0x9f67bd-0x1);_0x281cf8[_0x1fd4a8(0x6c)]('\x20\x20'+_0x1e7ed6+_0x3c79f8('^'));}else _0x281cf8[_0x1fd4a8(0x6c)]('\x20\x20'+_0x5b8712+_0x25706d+a173_0x38e444[_0x1fd4a8(0x84)](_0x2e06bb));}}return _0x281cf8[_0x1fd4a8(0x96)]('\x0a');}export function formatValidationResult(_0x398984,_0x16c911,_0x19b48f){const _0x4b4295=a173_0x1062,_0x366f09=[];for(const _0x4d1024 of _0x398984[_0x4b4295(0x6e)]){_0x366f09['push'](formatIssueWithContext(_0x4d1024,_0x16c911,_0x19b48f)),_0x366f09[_0x4b4295(0x6c)]('');}for(const _0xf92ec2 of _0x398984[_0x4b4295(0x73)]){_0x366f09[_0x4b4295(0x6c)](formatIssueWithContext(_0xf92ec2,_0x16c911,_0x19b48f)),_0x366f09[_0x4b4295(0x6c)]('');}return _0x366f09[_0x4b4295(0x96)]('\x0a');}
1
+ (function(_0x509a41,_0x4d6f5a){const _0x3c92e7=a173_0x438b,_0x32297d=_0x509a41();while(!![]){try{const _0x5ef495=-parseInt(_0x3c92e7(0x78))/0x1+parseInt(_0x3c92e7(0x85))/0x2*(parseInt(_0x3c92e7(0x79))/0x3)+parseInt(_0x3c92e7(0xa0))/0x4*(-parseInt(_0x3c92e7(0x95))/0x5)+parseInt(_0x3c92e7(0x8a))/0x6*(parseInt(_0x3c92e7(0x88))/0x7)+-parseInt(_0x3c92e7(0x89))/0x8*(-parseInt(_0x3c92e7(0x7d))/0x9)+parseInt(_0x3c92e7(0x76))/0xa*(-parseInt(_0x3c92e7(0x8d))/0xb)+parseInt(_0x3c92e7(0x9c))/0xc;if(_0x5ef495===_0x4d6f5a)break;else _0x32297d['push'](_0x32297d['shift']());}catch(_0x331378){_0x32297d['push'](_0x32297d['shift']());}}}(a173_0x2edd,0x95bbb));import*as a173_0x1f6571 from'yaml';import a173_0x49db71 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x2d2418,_0x4f6b27,_0xc4a7dc){const _0x4a669b=a173_0x438b;if(!_0x2d2418||!_0x4f6b27)return undefined;try{let _0x31e3a6=_0x2d2418[_0x4a669b(0xa1)](_0xc4a7dc,!![]),_0x469318=[..._0xc4a7dc];while((!_0x31e3a6||typeof _0x31e3a6!==_0x4a669b(0x83)||!(_0x4a669b(0x82)in _0x31e3a6)||!_0x31e3a6[_0x4a669b(0x82)])&&_0x469318['length']>0x0){_0x469318['pop'](),_0x31e3a6=_0x469318[_0x4a669b(0xa3)]>0x0?_0x2d2418[_0x4a669b(0xa1)](_0x469318,!![]):_0x2d2418[_0x4a669b(0x80)];}if(!_0x31e3a6||typeof _0x31e3a6!==_0x4a669b(0x83)||!(_0x4a669b(0x82)in _0x31e3a6)||!_0x31e3a6[_0x4a669b(0x82)])return undefined;const [_0x51f416]=_0x31e3a6[_0x4a669b(0x82)];return offsetToLocation(_0x4f6b27,_0x51f416);}catch{return undefined;}}export function offsetToLocation(_0x44ada4,_0xf79b84){let _0x2ed87b=0x1,_0x520daa=0x1;for(let _0x389af4=0x0;_0x389af4<_0xf79b84&&_0x389af4<_0x44ada4['length'];_0x389af4++){_0x44ada4[_0x389af4]==='\x0a'?(_0x2ed87b++,_0x520daa=0x1):_0x520daa++;}return{'line':_0x2ed87b,'column':_0x520daa,'offset':_0xf79b84};}export function pathToArray(_0x4f04ba){const _0x292d81=a173_0x438b;if(!_0x4f04ba)return[];return _0x4f04ba[_0x292d81(0x97)]('.')[_0x292d81(0x93)](_0x209ebb=>{const _0x308b01=_0x292d81,_0x1da688=_0x209ebb[_0x308b01(0x9f)](/^(\w+)\[(\d+)\]$/);if(_0x1da688)return[_0x1da688[0x1],parseInt(_0x1da688[0x2],0xa)];return[_0x209ebb];});}export function formatZodPath(_0x198f6e){const _0x154c22=a173_0x438b;let _0x123278='';for(const _0x5153cd of _0x198f6e){if(typeof _0x5153cd===_0x154c22(0xa2))_0x123278+='['+_0x5153cd+']';else{const _0x1f7580=String(_0x5153cd);_0x123278+=_0x123278?'.'+_0x1f7580:_0x1f7580;}}return _0x123278;}function a173_0x2edd(){const _0xc39bb0=['contents','yellow','range','object','issues','6LRIzmJ','column','safeParse','876449ECTmcu','2670440KUnaLz','6Pfrsnc','level','min','31933WoYeXU','join','\x20|\x20','path','parse','cyan','flatMap','repeat','580rvAphu','toString','split','message','push','\x27:\x20','padStart','15607908sulWWI','red','data','match','26748kejedn','getIn','number','length','location','dim','4100sAdhjC','YAML\x20validation\x20error\x20at\x20\x27','79896eWESUU','899454RlejHq','map','errors','code','9Dvltoy','error','warnings'];a173_0x2edd=function(){return _0xc39bb0;};return a173_0x2edd();}export function flattenZodIssues(_0x368fd3){const _0x108a1f=a173_0x438b,_0x4c9f66=[];for(const _0x51126d of _0x368fd3){if(_0x51126d[_0x108a1f(0x7c)]==='invalid_union'&&_0x108a1f(0x7b)in _0x51126d){const _0x200f74=_0x51126d['errors'];let _0xcd228b=_0x200f74[0x0]||[];for(const _0x1f843f of _0x200f74){_0x1f843f[_0x108a1f(0xa3)]<_0xcd228b[_0x108a1f(0xa3)]&&(_0xcd228b=_0x1f843f);}const _0x46d3c8=_0xcd228b[_0x108a1f(0x7a)](_0x194b12=>({..._0x194b12,'path':[..._0x51126d['path'],..._0x194b12['path']]}));_0x4c9f66[_0x108a1f(0x99)](...flattenZodIssues(_0x46d3c8));}else _0x4c9f66['push'](_0x51126d);}return _0x4c9f66;}export function safeParseYaml(_0x2ca362,_0x5368d5){const _0x4a2c63=a173_0x438b,_0x13782e=a173_0x1f6571[_0x4a2c63(0x91)](_0x2ca362);if(!_0x13782e||typeof _0x13782e!==_0x4a2c63(0x83))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0x37d9bc=_0x5368d5[_0x4a2c63(0x87)](_0x13782e);if(!_0x37d9bc['success']){const _0xf2d210=_0x37d9bc['error'][_0x4a2c63(0x84)][0x0],_0x216a01=formatZodPath(_0xf2d210['path']);throw new Error(_0x216a01?_0x4a2c63(0x77)+_0x216a01+_0x4a2c63(0x9a)+_0xf2d210['message']:'YAML\x20validation\x20error:\x20'+_0xf2d210[_0x4a2c63(0x98)]);}return _0x37d9bc[_0x4a2c63(0x9e)];}export function formatIssueWithContext(_0x5e33dd,_0x4738b8,_0x33b2d6){const _0x47abd9=a173_0x438b,_0x55c1d9=[],_0x1c0be4=_0x5e33dd[_0x47abd9(0x8b)]===_0x47abd9(0x7e),_0x479b76=_0x1c0be4?a173_0x49db71[_0x47abd9(0x9d)]:a173_0x49db71[_0x47abd9(0x81)],_0x5a736f=_0x1c0be4?a173_0x49db71['red']:a173_0x49db71['yellow'],_0x763b5e=_0x33b2d6?a173_0x49db71[_0x47abd9(0x92)](_0x33b2d6+':'):'';if(_0x5e33dd[_0x47abd9(0xa4)]){const _0x221e89=a173_0x49db71[_0x47abd9(0x92)](_0x5e33dd[_0x47abd9(0xa4)]['line']+':'+_0x5e33dd[_0x47abd9(0xa4)][_0x47abd9(0x86)]);_0x55c1d9[_0x47abd9(0x99)](''+_0x763b5e+_0x221e89+':\x20'+_0x479b76(_0x5e33dd[_0x47abd9(0x8b)])+'\x20'+_0x5a736f('['+_0x5e33dd[_0x47abd9(0x7c)]+']'));}else _0x55c1d9[_0x47abd9(0x99)](''+_0x763b5e+a173_0x49db71[_0x47abd9(0x75)](_0x5e33dd[_0x47abd9(0x90)])+':\x20'+_0x479b76(_0x5e33dd[_0x47abd9(0x8b)])+'\x20'+_0x5a736f('['+_0x5e33dd[_0x47abd9(0x7c)]+']'));_0x55c1d9[_0x47abd9(0x99)](_0x5e33dd['message']);if(_0x5e33dd[_0x47abd9(0xa4)]&&_0x4738b8){const _0x6721c8=_0x4738b8[_0x47abd9(0x97)]('\x0a'),{line:_0xa90f49,column:_0x42faed}=_0x5e33dd[_0x47abd9(0xa4)],_0x5b9bb3=Math['max'](0x1,_0xa90f49-0x1),_0x2e868c=Math[_0x47abd9(0x8c)](_0x6721c8['length'],_0xa90f49+0x1);_0x55c1d9[_0x47abd9(0x99)]('');for(let _0x1dde1d=_0x5b9bb3;_0x1dde1d<=_0x2e868c;_0x1dde1d++){const _0xf6d249=_0x6721c8[_0x1dde1d-0x1]||'',_0xb5cf55=a173_0x49db71[_0x47abd9(0x75)](_0x1dde1d[_0x47abd9(0x96)]()[_0x47abd9(0x9b)](0x4)),_0x41d2a8=a173_0x49db71['dim'](_0x47abd9(0x8f));if(_0x1dde1d===_0xa90f49){_0x55c1d9[_0x47abd9(0x99)]('\x20\x20'+_0xb5cf55+_0x41d2a8+_0x479b76(_0xf6d249));const _0x42b0f3='\x20'[_0x47abd9(0x94)](0x4+0x3+_0x42faed-0x1);_0x55c1d9[_0x47abd9(0x99)]('\x20\x20'+_0x42b0f3+_0x479b76('^'));}else _0x55c1d9['push']('\x20\x20'+_0xb5cf55+_0x41d2a8+a173_0x49db71['dim'](_0xf6d249));}}return _0x55c1d9[_0x47abd9(0x8e)]('\x0a');}function a173_0x438b(_0x33fb6c,_0x4af736){_0x33fb6c=_0x33fb6c-0x75;const _0x2eddd2=a173_0x2edd();let _0x438b54=_0x2eddd2[_0x33fb6c];return _0x438b54;}export function formatValidationResult(_0xdb4711,_0x55b2c6,_0x5c9a21){const _0x4e354a=a173_0x438b,_0x248b0d=[];for(const _0x22bf48 of _0xdb4711[_0x4e354a(0x7b)]){_0x248b0d[_0x4e354a(0x99)](formatIssueWithContext(_0x22bf48,_0x55b2c6,_0x5c9a21)),_0x248b0d[_0x4e354a(0x99)]('');}for(const _0x48ce7f of _0xdb4711[_0x4e354a(0x7f)]){_0x248b0d[_0x4e354a(0x99)](formatIssueWithContext(_0x48ce7f,_0x55b2c6,_0x5c9a21)),_0x248b0d[_0x4e354a(0x99)]('');}return _0x248b0d['join']('\x0a');}