@treasuredata/tdx 2026.6.2 → 2026.6.4

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 (235) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +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.js +1 -1
  16. package/dist/commands/claude-command.js.map +1 -1
  17. package/dist/commands/claude-statusline-command.js +1 -1
  18. package/dist/commands/claude-usage-command.js +1 -1
  19. package/dist/commands/command.js +1 -1
  20. package/dist/commands/connection-command.js +1 -1
  21. package/dist/commands/databases.js +1 -1
  22. package/dist/commands/delivery-command.js +1 -1
  23. package/dist/commands/describe.js +1 -1
  24. package/dist/commands/engage-campaign-pull-command.js +1 -1
  25. package/dist/commands/engage-campaign-push-command.js +1 -1
  26. package/dist/commands/engage-campaign-validate-command.js +1 -1
  27. package/dist/commands/engage-command.js +1 -1
  28. package/dist/commands/engage-template-pull-command.js +1 -1
  29. package/dist/commands/engage-template-push-command.js +1 -1
  30. package/dist/commands/engage-template-validate-command.js +1 -1
  31. package/dist/commands/job-command.js +1 -1
  32. package/dist/commands/journey-command.js +1 -1
  33. package/dist/commands/journey-validate-command.js +1 -1
  34. package/dist/commands/llm-command.js +1 -1
  35. package/dist/commands/mcp-command.js +1 -1
  36. package/dist/commands/parent-segment-command.js +1 -1
  37. package/dist/commands/policy-command.js +1 -1
  38. package/dist/commands/profile-command.js +1 -1
  39. package/dist/commands/profiles-command.js +1 -1
  40. package/dist/commands/query-command.js +1 -1
  41. package/dist/commands/schedule-command.js +1 -1
  42. package/dist/commands/segment-command.js +1 -1
  43. package/dist/commands/segment-create-command.js +1 -1
  44. package/dist/commands/segment-fields-command.js +1 -1
  45. package/dist/commands/segment-pull-command.js +1 -1
  46. package/dist/commands/segment-push-command.js +1 -1
  47. package/dist/commands/segment-update-command.js +1 -1
  48. package/dist/commands/segment-use-command.js +1 -1
  49. package/dist/commands/segment-validate-command.js +1 -1
  50. package/dist/commands/segments.js +1 -1
  51. package/dist/commands/show.js +1 -1
  52. package/dist/commands/status-command.js +1 -1
  53. package/dist/commands/table-deleted.js +1 -1
  54. package/dist/commands/tables.js +1 -1
  55. package/dist/commands/unset-command.js +1 -1
  56. package/dist/commands/upgrade-command.js +1 -1
  57. package/dist/commands/use-command.js +1 -1
  58. package/dist/commands/user-command.js +1 -1
  59. package/dist/commands/work-command.js +1 -1
  60. package/dist/commands/workflow-command.js +1 -1
  61. package/dist/core/auth.js +1 -1
  62. package/dist/core/command-output.js +1 -1
  63. package/dist/core/config.d.ts +14 -0
  64. package/dist/core/config.d.ts.map +1 -1
  65. package/dist/core/config.js +1 -1
  66. package/dist/core/config.js.map +1 -1
  67. package/dist/core/connection-cache.js +1 -1
  68. package/dist/core/constants.js +1 -1
  69. package/dist/core/credential-cache.js +1 -1
  70. package/dist/core/global-context.js +1 -1
  71. package/dist/core/keychain.js +1 -1
  72. package/dist/core/oauth-keychain.js +1 -1
  73. package/dist/core/oauth.js +1 -1
  74. package/dist/core/profile.js +1 -1
  75. package/dist/core/project-config.d.ts +1 -0
  76. package/dist/core/project-config.d.ts.map +1 -1
  77. package/dist/core/project-config.js +1 -1
  78. package/dist/core/project-config.js.map +1 -1
  79. package/dist/core/session.js +1 -1
  80. package/dist/core/user-cache.js +1 -1
  81. package/dist/core/version.js +1 -1
  82. package/dist/index.js +1 -1
  83. package/dist/mcp/server.js +1 -1
  84. package/dist/mcp/tools/index.js +1 -1
  85. package/dist/mcp/tools/tdx-run.js +1 -1
  86. package/dist/mcp/tools/tdx-search.d.ts.map +1 -1
  87. package/dist/mcp/tools/tdx-search.js +1 -1
  88. package/dist/mcp/tools/tdx-search.js.map +1 -1
  89. package/dist/mcp/tools/work-create-item.js +1 -1
  90. package/dist/mcp/utils.js +1 -1
  91. package/dist/proxy/claude-usage-tracker.js +1 -1
  92. package/dist/proxy/passthrough-server.js +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-yaml.js +1 -1
  106. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  107. package/dist/sdk/cas/index.js +1 -1
  108. package/dist/sdk/cas/pull-workflow.js +1 -1
  109. package/dist/sdk/cas/push-workflow.js +1 -1
  110. package/dist/sdk/client/cdp-api-client.js +1 -1
  111. package/dist/sdk/client/delivery-api-client.js +1 -1
  112. package/dist/sdk/client/endpoints.js +1 -1
  113. package/dist/sdk/client/engage-api-client.js +1 -1
  114. package/dist/sdk/client/http-client.js +1 -1
  115. package/dist/sdk/client/llm-api-client.js +1 -1
  116. package/dist/sdk/client/oauth-refresh.js +1 -1
  117. package/dist/sdk/client/rate-limiter.js +1 -1
  118. package/dist/sdk/client/td-api-client.js +1 -1
  119. package/dist/sdk/client/trino-api-client.js +1 -1
  120. package/dist/sdk/client/workflow-client.js +1 -1
  121. package/dist/sdk/connection-validator.js +1 -1
  122. package/dist/sdk/connection.js +1 -1
  123. package/dist/sdk/delivery.js +1 -1
  124. package/dist/sdk/engage/campaign-pull.js +1 -1
  125. package/dist/sdk/engage/campaign-push.js +1 -1
  126. package/dist/sdk/engage/campaign-validator.js +1 -1
  127. package/dist/sdk/engage/campaign-yaml.js +1 -1
  128. package/dist/sdk/engage/template-pull.js +1 -1
  129. package/dist/sdk/engage/template-push.js +1 -1
  130. package/dist/sdk/engage/template-validator.js +1 -1
  131. package/dist/sdk/engage/template-yaml.js +1 -1
  132. package/dist/sdk/engage/types/campaign-def.js +1 -1
  133. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  134. package/dist/sdk/engage/types/template-schema.js +1 -1
  135. package/dist/sdk/engage.js +1 -1
  136. package/dist/sdk/errors.js +1 -1
  137. package/dist/sdk/index.js +1 -1
  138. package/dist/sdk/io/index.js +1 -1
  139. package/dist/sdk/io/node-filesystem.js +1 -1
  140. package/dist/sdk/job.js +1 -1
  141. package/dist/sdk/journey.js +1 -1
  142. package/dist/sdk/llm/chat-cache.js +1 -1
  143. package/dist/sdk/llm/index.js +1 -1
  144. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  145. package/dist/sdk/llm/model-factors.js +1 -1
  146. package/dist/sdk/llm/user-settings.js +1 -1
  147. package/dist/sdk/personalization.js +1 -1
  148. package/dist/sdk/policy.js +1 -1
  149. package/dist/sdk/query/deleted-table-validation.js +1 -1
  150. package/dist/sdk/query/index.js +1 -1
  151. package/dist/sdk/query/sql-parser.js +1 -1
  152. package/dist/sdk/realtime.js +1 -1
  153. package/dist/sdk/schedule.js +1 -1
  154. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  155. package/dist/sdk/segment/fields-display.js +1 -1
  156. package/dist/sdk/segment/file-discovery.js +1 -1
  157. package/dist/sdk/segment/journey-utils.js +1 -1
  158. package/dist/sdk/segment/journey-validator.js +1 -1
  159. package/dist/sdk/segment/journey-yaml.js +1 -1
  160. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  161. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  162. package/dist/sdk/segment/pull-workflow.js +1 -1
  163. package/dist/sdk/segment/push-recovery.js +1 -1
  164. package/dist/sdk/segment/push-workflow.js +1 -1
  165. package/dist/sdk/segment/resolution-context.js +1 -1
  166. package/dist/sdk/segment/segment-path-parser.js +1 -1
  167. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  168. package/dist/sdk/segment/segment-validator.js +1 -1
  169. package/dist/sdk/segment/target-resolution.js +1 -1
  170. package/dist/sdk/segment/tdx-config.js +1 -1
  171. package/dist/sdk/segment/types/activation-schema.js +1 -1
  172. package/dist/sdk/segment/types/journey-def.js +1 -1
  173. package/dist/sdk/segment/types/journey-schema.js +1 -1
  174. package/dist/sdk/segment/types/segment-def.js +1 -1
  175. package/dist/sdk/segment/types/segment-schema.js +1 -1
  176. package/dist/sdk/segment/validate-files.js +1 -1
  177. package/dist/sdk/segment/yaml-validator.js +1 -1
  178. package/dist/sdk/segment.js +1 -1
  179. package/dist/sdk/types/index.js +1 -1
  180. package/dist/sdk/types/progress.js +1 -1
  181. package/dist/sdk/types/workspace.js +1 -1
  182. package/dist/sdk/user.js +1 -1
  183. package/dist/sdk/util/format-detector.js +1 -1
  184. package/dist/sdk/util/formatters.js +1 -1
  185. package/dist/sdk/util/index.js +1 -1
  186. package/dist/sdk/util/paginate.js +1 -1
  187. package/dist/sdk/util/tree-formatter.js +1 -1
  188. package/dist/sdk/workflow/archive-validation.js +1 -1
  189. package/dist/sdk/workflow/clone-workflow.js +1 -1
  190. package/dist/sdk/workflow/index.js +1 -1
  191. package/dist/sdk/workflow/pull-workflow.js +1 -1
  192. package/dist/sdk/workflow/push-workflow.js +1 -1
  193. package/dist/sdk/workflow/task-graph.js +1 -1
  194. package/dist/sdk/workflow/tdx-config.js +1 -1
  195. package/dist/sdk/workflow/workflow-utils.js +1 -1
  196. package/dist/sdk/workspace/access-tracker.js +1 -1
  197. package/dist/sdk/workspace/frontmatter.js +1 -1
  198. package/dist/sdk/workspace/git.js +1 -1
  199. package/dist/sdk/workspace/index.js +1 -1
  200. package/dist/sdk/workspace/templates.js +1 -1
  201. package/dist/sdk/workspace/weekly.js +1 -1
  202. package/dist/sdk/workspace/wikilinks.js +1 -1
  203. package/dist/test-utils/command-runner.js +1 -1
  204. package/dist/test-utils/factories.js +1 -1
  205. package/dist/test-utils/fixtures.js +1 -1
  206. package/dist/test-utils/http-mock.js +1 -1
  207. package/dist/test-utils/index.js +1 -1
  208. package/dist/utils/async.js +1 -1
  209. package/dist/utils/colors.js +1 -1
  210. package/dist/utils/diff.js +1 -1
  211. package/dist/utils/file-permissions.js +1 -1
  212. package/dist/utils/file-reader.js +1 -1
  213. package/dist/utils/github-releases.js +1 -1
  214. package/dist/utils/global-cache.js +1 -1
  215. package/dist/utils/json-loader.js +1 -1
  216. package/dist/utils/local-cache.js +1 -1
  217. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  218. package/dist/utils/logger/formatters/index.js +1 -1
  219. package/dist/utils/logger/handlers/console-handler.js +1 -1
  220. package/dist/utils/logger/handlers/file-handler.js +1 -1
  221. package/dist/utils/logger/handlers/index.js +1 -1
  222. package/dist/utils/logger/handlers/null-handler.js +1 -1
  223. package/dist/utils/logger/index.js +1 -1
  224. package/dist/utils/logger/logger.js +1 -1
  225. package/dist/utils/logger/types.js +1 -1
  226. package/dist/utils/option-validation.js +1 -1
  227. package/dist/utils/process.js +1 -1
  228. package/dist/utils/prompt.js +1 -1
  229. package/dist/utils/spinner.js +1 -1
  230. package/dist/utils/sse-parser.js +1 -1
  231. package/dist/utils/string-utils.js +1 -1
  232. package/dist/utils/table-ref-parser.js +1 -1
  233. package/dist/utils/tdx-logger.js +1 -1
  234. package/dist/utils/version-check.js +1 -1
  235. package/package.json +1 -1
@@ -1 +1 @@
1
- function a160_0x51c3(){const _0x16cb4d=['stat','No\x20tdx.json\x20found','1836TrgdeI','directory','exists','parse','File\x20not\x20found:\x20','no_config','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','message','72GupMRq','resolve','type','parent_name','invalid_yaml','tdx.json','3274124oFBxlD','Parent\x20segment\x20not\x20specified','899248oKBhJC','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','2034EvYMzR','resourceType','segmentName','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','replace','startsWith','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','Not\x20a\x20YAML\x20file:\x20','segment','1049625kfzTdn','3131838yqnQFb','isDirectory','journey','trim','includes','116630RagZPh','96378lEHnDa','no_parent','No\x20tdx.json\x20found\x20for\x20file:\x20','configDir','error','file_not_found','match','basename','file','parent_segment','scopedFolderPath','readFile','isScoped','parentSegment','5TGSBXb','cwd','root','relative','File\x20not\x20found','context','dirname'];a160_0x51c3=function(){return _0x16cb4d;};return a160_0x51c3();}(function(_0x32e5ff,_0x5ef078){const _0x5cd0d5=a160_0xd3c7,_0x49cb6b=_0x32e5ff();while(!![]){try{const _0x216c6f=-parseInt(_0x5cd0d5(0x123))/0x1*(parseInt(_0x5cd0d5(0x115))/0x2)+-parseInt(_0x5cd0d5(0x105))/0x3*(-parseInt(_0x5cd0d5(0xf3))/0x4)+parseInt(_0x5cd0d5(0x10e))/0x5+parseInt(_0x5cd0d5(0x10f))/0x6+-parseInt(_0x5cd0d5(0x101))/0x7+-parseInt(_0x5cd0d5(0x103))/0x8+parseInt(_0x5cd0d5(0xfb))/0x9*(parseInt(_0x5cd0d5(0x114))/0xa);if(_0x216c6f===_0x5ef078)break;else _0x49cb6b['push'](_0x49cb6b['shift']());}catch(_0x468632){_0x49cb6b['push'](_0x49cb6b['shift']());}}}(a160_0x51c3,0x4cfb9));import a160_0x5c7016 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(_0xa3cec6){const _0x5200f7=a160_0xd3c7;return _0xa3cec6[_0x5200f7(0xfd)]!=='error';}export function isScopedResolution(_0x826997){const _0xc3548f=a160_0xd3c7;return _0x826997[_0xc3548f(0xfd)]==='directory'||_0x826997[_0xc3548f(0xfd)]===_0xc3548f(0x11d)||_0x826997[_0xc3548f(0xfd)]===_0xc3548f(0x128);}export function getScopedDetails(_0x3414d4){const _0x59f280=a160_0xd3c7;if(isScopedResolution(_0x3414d4))return{'isScoped':_0x3414d4[_0x59f280(0x121)],'scopedFolderPath':_0x3414d4[_0x59f280(0x11f)]};return undefined;}async function findTdxConfigAsync(_0xf425d3,_0x199064){const _0x2efa18=a160_0xd3c7;let _0x4af820=a160_0x5c7016[_0x2efa18(0xfc)](_0xf425d3);const _0x592846=a160_0x5c7016[_0x2efa18(0xf6)](_0x4af820)[_0x2efa18(0x125)];while(_0x4af820!==_0x592846){const _0x520491=a160_0x5c7016['join'](_0x4af820,_0x2efa18(0x100));if(await _0x199064['exists'](_0x520491))try{const _0x700882=await _0x199064[_0x2efa18(0x120)](_0x520491),_0x5dbfcf=JSON[_0x2efa18(0xf6)](_0x700882);if(_0x5dbfcf[_0x2efa18(0x11e)]&&typeof _0x5dbfcf[_0x2efa18(0x11e)]==='string')return{'configPath':_0x520491,'configDir':_0x4af820,'parentSegment':_0x5dbfcf[_0x2efa18(0x11e)]};}catch{}_0x4af820=a160_0x5c7016[_0x2efa18(0x129)](_0x4af820);}return null;}function a160_0xd3c7(_0x12b855,_0xc98357){_0x12b855=_0x12b855-0xf1;const _0x51c3ac=a160_0x51c3();let _0xd3c7b6=_0x51c3ac[_0x12b855];return _0xd3c7b6;}function calculateScopedPath(_0x154ce2,_0x27530c){const _0x45722b=a160_0xd3c7,_0x21fa90=a160_0x5c7016[_0x45722b(0x126)](_0x27530c,_0x154ce2),_0x12cc3b=_0x21fa90!==''&&_0x21fa90!=='.'&&!_0x21fa90[_0x45722b(0x10a)]('..');return{'isScoped':_0x12cc3b,'scopedFolderPath':_0x12cc3b?_0x21fa90[_0x45722b(0x109)](/\\/g,'/'):''};}export async function resolveTarget(_0x338839){const _0x9fb4c6=a160_0xd3c7,{arg:_0x539650,contextParent:_0x32565b,cwd:cwd=process[_0x9fb4c6(0x124)](),fs:fs=nodeFileSystem}=_0x338839;if(_0x539650&&isYamlFilePath(_0x539650))try{const _0x4dd5fc=await resolveYamlFilePath(_0x539650,fs),_0x15a4fc=a160_0x5c7016['resolve'](_0x539650),_0x21bf1b=a160_0x5c7016['dirname'](_0x15a4fc),_0x5e5468=await findTdxConfigAsync(_0x21bf1b,fs);if(!_0x5e5468){if(_0x32565b){const _0x5a86ab=a160_0x5c7016[_0x9fb4c6(0x129)](_0x15a4fc);return{'type':_0x9fb4c6(0x11d),'parentName':_0x32565b,'targetDir':_0x5a86ab,'configRoot':_0x5a86ab,'filePath':_0x15a4fc,'resourceName':_0x4dd5fc[_0x9fb4c6(0x107)],'folderPath':_0x4dd5fc['folderPath'],'resourceType':_0x4dd5fc[_0x9fb4c6(0x106)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0xf8),'message':_0x9fb4c6(0x117)+_0x539650,'arg':_0x539650,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x1da87d=calculateScopedPath(_0x21bf1b,_0x5e5468['configDir']);return{'type':_0x9fb4c6(0x11d),'parentName':_0x5e5468[_0x9fb4c6(0x122)],'targetDir':_0x5e5468[_0x9fb4c6(0x118)],'configRoot':_0x5e5468[_0x9fb4c6(0x118)],'filePath':_0x15a4fc,'resourceName':_0x4dd5fc[_0x9fb4c6(0x107)],'folderPath':_0x4dd5fc['folderPath'],'resourceType':_0x4dd5fc[_0x9fb4c6(0x106)],'isScoped':_0x1da87d[_0x9fb4c6(0x121)],'scopedFolderPath':_0x1da87d[_0x9fb4c6(0x11f)]};}catch(_0x2a8e5a){const _0x1fba2d=_0x2a8e5a instanceof Error?_0x2a8e5a[_0x9fb4c6(0xfa)]:String(_0x2a8e5a);if(_0x1fba2d[_0x9fb4c6(0x113)](_0x9fb4c6(0x127)))return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0x11a),'message':_0x9fb4c6(0xf7)+_0x539650,'arg':_0x539650};if(_0x1fba2d[_0x9fb4c6(0x113)](_0x9fb4c6(0xf2))){if(_0x32565b){const _0x2a8748=a160_0x5c7016['resolve'](_0x539650);if(await fs[_0x9fb4c6(0xf5)](_0x2a8748)){const _0x1d0b8d=a160_0x5c7016['dirname'](_0x2a8748),_0x5c8f22=await fs['readFile'](_0x2a8748),_0x65ea79=_0x5c8f22[_0x9fb4c6(0x11b)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x3dd13d=_0x5c8f22[_0x9fb4c6(0x11b)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x539266=_0x65ea79?_0x65ea79[0x1][_0x9fb4c6(0x112)]():a160_0x5c7016[_0x9fb4c6(0x11c)](_0x539650,a160_0x5c7016['extname'](_0x539650)),_0xa3ce74=_0x3dd13d&&_0x3dd13d[0x1][_0x9fb4c6(0x112)]()===_0x9fb4c6(0x111)?_0x9fb4c6(0x111):_0x9fb4c6(0x10d);return{'type':_0x9fb4c6(0x11d),'parentName':_0x32565b,'targetDir':_0x1d0b8d,'configRoot':_0x1d0b8d,'filePath':_0x2a8748,'resourceName':_0x539266,'folderPath':'','resourceType':_0xa3ce74,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0xf8),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x539650,'arg':_0x539650,'helpText':_0x9fb4c6(0x104)};}return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0xff),'message':_0x1fba2d,'arg':_0x539650};}if(_0x539650){const _0xe601c9=a160_0x5c7016[_0x9fb4c6(0xfc)](cwd,_0x539650);let _0x7730e4=null;try{_0x7730e4=await fs[_0x9fb4c6(0xf1)](_0xe601c9);}catch{}if(_0x7730e4?.[_0x9fb4c6(0x110)]()){const _0x259538=await findTdxConfigAsync(_0xe601c9,fs);if(_0x259538){const _0x55c621=calculateScopedPath(_0xe601c9,_0x259538[_0x9fb4c6(0x118)]);return{'type':_0x9fb4c6(0xf4),'parentName':_0x259538['parentSegment'],'targetDir':_0xe601c9,'configRoot':_0x259538['configDir'],'isScoped':_0x55c621[_0x9fb4c6(0x121)],'scopedFolderPath':_0x55c621[_0x9fb4c6(0x11f)]};}if(_0x32565b)return{'type':_0x9fb4c6(0xf4),'parentName':_0x32565b,'targetDir':_0xe601c9,'configRoot':_0xe601c9,'isScoped':![],'scopedFolderPath':''};return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0xf8),'message':_0x9fb4c6(0x108)+_0x539650,'arg':_0x539650,'helpText':_0x9fb4c6(0x104)};}if(_0x7730e4?.['isFile']())return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0xff),'message':_0x9fb4c6(0x10c)+_0x539650,'arg':_0x539650,'helpText':_0x9fb4c6(0x10b)};const _0x506146=sanitizeFileName(_0x539650),_0xeed5e3=getSegmentRootDir(_0x506146,cwd);return{'type':_0x9fb4c6(0xfe),'parentName':_0x539650,'targetDir':_0xeed5e3,'configRoot':_0xeed5e3};}const _0x1d9728=await findTdxConfigAsync(cwd,fs);if(_0x1d9728){const _0x486146=calculateScopedPath(cwd,_0x1d9728[_0x9fb4c6(0x118)]);return{'type':_0x9fb4c6(0x128),'parentName':_0x1d9728[_0x9fb4c6(0x122)],'targetDir':cwd,'configRoot':_0x1d9728[_0x9fb4c6(0x118)],'isScoped':_0x486146[_0x9fb4c6(0x121)],'scopedFolderPath':_0x486146[_0x9fb4c6(0x11f)]};}if(_0x32565b){const _0x4a089f=sanitizeFileName(_0x32565b),_0x4e96d1=getSegmentRootDir(_0x4a089f,cwd);return{'type':_0x9fb4c6(0x128),'parentName':_0x32565b,'targetDir':_0x4e96d1,'configRoot':_0x4e96d1,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x9fb4c6(0x116),'message':_0x9fb4c6(0x102),'helpText':_0x9fb4c6(0xf9)};}
1
+ (function(_0x2da354,_0x483513){const _0x5b3d87=a160_0x4f02,_0x16888f=_0x2da354();while(!![]){try{const _0x274710=parseInt(_0x5b3d87(0x17e))/0x1+-parseInt(_0x5b3d87(0x17a))/0x2+-parseInt(_0x5b3d87(0x195))/0x3*(-parseInt(_0x5b3d87(0x173))/0x4)+parseInt(_0x5b3d87(0x185))/0x5*(-parseInt(_0x5b3d87(0x171))/0x6)+parseInt(_0x5b3d87(0x19e))/0x7*(parseInt(_0x5b3d87(0x19b))/0x8)+-parseInt(_0x5b3d87(0x177))/0x9*(parseInt(_0x5b3d87(0x18f))/0xa)+parseInt(_0x5b3d87(0x187))/0xb;if(_0x274710===_0x483513)break;else _0x16888f['push'](_0x16888f['shift']());}catch(_0x5872ff){_0x16888f['push'](_0x16888f['shift']());}}}(a160_0x5099,0xacdf6));import a160_0x504ed4 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(_0x2ccddc){const _0x5de824=a160_0x4f02;return _0x2ccddc[_0x5de824(0x188)]!==_0x5de824(0x178);}function a160_0x4f02(_0x3834cf,_0x11ebcb){_0x3834cf=_0x3834cf-0x16b;const _0x509912=a160_0x5099();let _0x4f02dc=_0x509912[_0x3834cf];return _0x4f02dc;}export function isScopedResolution(_0x5f3d9e){const _0x2e1099=a160_0x4f02;return _0x5f3d9e[_0x2e1099(0x188)]===_0x2e1099(0x198)||_0x5f3d9e[_0x2e1099(0x188)]===_0x2e1099(0x19f)||_0x5f3d9e['type']===_0x2e1099(0x184);}function a160_0x5099(){const _0x3529cf=['isDirectory','17073650rcuRTQ','type','trim','readFile','No\x20tdx.json\x20found','parentSegment','journey','match','30UclkeY','cwd','dirname','isScoped','isFile','no_config','28911JabBLU','startsWith','No\x20tdx.json\x20found\x20for\x20file:\x20','directory','File\x20not\x20found','parent_segment','8UyFVIS','resourceType','configDir','7839209xLIEXw','file','relative','basename','exists','string','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','folderPath','segmentName','segment','8982jhXgRU','stat','188ZJIHXj','invalid_yaml','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','includes','2931975PuLhFk','error','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','2355652jEMwZj','scopedFolderPath','File\x20not\x20found:\x20','extname','664904aKOGtZ','resolve','root','parse','join','Parent\x20segment\x20not\x20specified','context','3095TQFbUv'];a160_0x5099=function(){return _0x3529cf;};return a160_0x5099();}export function getScopedDetails(_0x57cff3){const _0x4c86fb=a160_0x4f02;if(isScopedResolution(_0x57cff3))return{'isScoped':_0x57cff3[_0x4c86fb(0x192)],'scopedFolderPath':_0x57cff3['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x11f7cb,_0x115c7e){const _0xe3e512=a160_0x4f02;let _0x4e2a7a=a160_0x504ed4[_0xe3e512(0x17f)](_0x11f7cb);const _0x520a13=a160_0x504ed4[_0xe3e512(0x181)](_0x4e2a7a)[_0xe3e512(0x180)];while(_0x4e2a7a!==_0x520a13){const _0x2f4520=a160_0x504ed4[_0xe3e512(0x182)](_0x4e2a7a,'tdx.json');if(await _0x115c7e[_0xe3e512(0x16b)](_0x2f4520))try{const _0x1bbbbe=await _0x115c7e[_0xe3e512(0x18a)](_0x2f4520),_0x13b943=JSON[_0xe3e512(0x181)](_0x1bbbbe);if(_0x13b943[_0xe3e512(0x19a)]&&typeof _0x13b943[_0xe3e512(0x19a)]===_0xe3e512(0x16c))return{'configPath':_0x2f4520,'configDir':_0x4e2a7a,'parentSegment':_0x13b943[_0xe3e512(0x19a)]};}catch{}_0x4e2a7a=a160_0x504ed4[_0xe3e512(0x191)](_0x4e2a7a);}return null;}function calculateScopedPath(_0x4d68fb,_0x377e2f){const _0x40d638=a160_0x4f02,_0x5421df=a160_0x504ed4[_0x40d638(0x1a0)](_0x377e2f,_0x4d68fb),_0x415fe8=_0x5421df!==''&&_0x5421df!=='.'&&!_0x5421df[_0x40d638(0x196)]('..');return{'isScoped':_0x415fe8,'scopedFolderPath':_0x415fe8?_0x5421df['replace'](/\\/g,'/'):''};}export async function resolveTarget(_0x4d18a8){const _0x583e57=a160_0x4f02,{arg:_0x1a9f34,contextParent:_0x14bf8e,cwd:cwd=process[_0x583e57(0x190)](),fs:fs=nodeFileSystem}=_0x4d18a8;if(_0x1a9f34&&isYamlFilePath(_0x1a9f34))try{const _0x2b7bb3=await resolveYamlFilePath(_0x1a9f34,fs),_0x36d778=a160_0x504ed4['resolve'](_0x1a9f34),_0x2934fd=a160_0x504ed4[_0x583e57(0x191)](_0x36d778),_0x56f32b=await findTdxConfigAsync(_0x2934fd,fs);if(!_0x56f32b){if(_0x14bf8e){const _0x57f454=a160_0x504ed4['dirname'](_0x36d778);return{'type':_0x583e57(0x19f),'parentName':_0x14bf8e,'targetDir':_0x57f454,'configRoot':_0x57f454,'filePath':_0x36d778,'resourceName':_0x2b7bb3['segmentName'],'folderPath':_0x2b7bb3[_0x583e57(0x16e)],'resourceType':_0x2b7bb3['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x583e57(0x194),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x1a9f34,'arg':_0x1a9f34,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x32b1dc=calculateScopedPath(_0x2934fd,_0x56f32b['configDir']);return{'type':'file','parentName':_0x56f32b['parentSegment'],'targetDir':_0x56f32b[_0x583e57(0x19d)],'configRoot':_0x56f32b[_0x583e57(0x19d)],'filePath':_0x36d778,'resourceName':_0x2b7bb3[_0x583e57(0x16f)],'folderPath':_0x2b7bb3[_0x583e57(0x16e)],'resourceType':_0x2b7bb3[_0x583e57(0x19c)],'isScoped':_0x32b1dc['isScoped'],'scopedFolderPath':_0x32b1dc[_0x583e57(0x17b)]};}catch(_0x124cdd){const _0x3c05be=_0x124cdd instanceof Error?_0x124cdd['message']:String(_0x124cdd);if(_0x3c05be[_0x583e57(0x176)](_0x583e57(0x199)))return{'type':_0x583e57(0x178),'errorCode':'file_not_found','message':_0x583e57(0x17c)+_0x1a9f34,'arg':_0x1a9f34};if(_0x3c05be[_0x583e57(0x176)](_0x583e57(0x18b))){if(_0x14bf8e){const _0x4569fa=a160_0x504ed4['resolve'](_0x1a9f34);if(await fs['exists'](_0x4569fa)){const _0x4ef151=a160_0x504ed4[_0x583e57(0x191)](_0x4569fa),_0x2a621d=await fs[_0x583e57(0x18a)](_0x4569fa),_0x364586=_0x2a621d[_0x583e57(0x18e)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x4cde0e=_0x2a621d[_0x583e57(0x18e)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x420f73=_0x364586?_0x364586[0x1][_0x583e57(0x189)]():a160_0x504ed4[_0x583e57(0x1a1)](_0x1a9f34,a160_0x504ed4[_0x583e57(0x17d)](_0x1a9f34)),_0x5a0cad=_0x4cde0e&&_0x4cde0e[0x1][_0x583e57(0x189)]()===_0x583e57(0x18d)?_0x583e57(0x18d):_0x583e57(0x170);return{'type':_0x583e57(0x19f),'parentName':_0x14bf8e,'targetDir':_0x4ef151,'configRoot':_0x4ef151,'filePath':_0x4569fa,'resourceName':_0x420f73,'folderPath':'','resourceType':_0x5a0cad,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x583e57(0x194),'message':_0x583e57(0x197)+_0x1a9f34,'arg':_0x1a9f34,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}return{'type':_0x583e57(0x178),'errorCode':_0x583e57(0x174),'message':_0x3c05be,'arg':_0x1a9f34};}if(_0x1a9f34){const _0x5a3cfa=a160_0x504ed4['resolve'](cwd,_0x1a9f34);let _0x220547=null;try{_0x220547=await fs[_0x583e57(0x172)](_0x5a3cfa);}catch{}if(_0x220547?.[_0x583e57(0x186)]()){const _0x47c391=await findTdxConfigAsync(_0x5a3cfa,fs);if(_0x47c391){const _0x3ca668=calculateScopedPath(_0x5a3cfa,_0x47c391[_0x583e57(0x19d)]);return{'type':_0x583e57(0x198),'parentName':_0x47c391['parentSegment'],'targetDir':_0x5a3cfa,'configRoot':_0x47c391[_0x583e57(0x19d)],'isScoped':_0x3ca668[_0x583e57(0x192)],'scopedFolderPath':_0x3ca668[_0x583e57(0x17b)]};}if(_0x14bf8e)return{'type':_0x583e57(0x198),'parentName':_0x14bf8e,'targetDir':_0x5a3cfa,'configRoot':_0x5a3cfa,'isScoped':![],'scopedFolderPath':''};return{'type':_0x583e57(0x178),'errorCode':_0x583e57(0x194),'message':_0x583e57(0x175)+_0x1a9f34,'arg':_0x1a9f34,'helpText':_0x583e57(0x16d)};}if(_0x220547?.[_0x583e57(0x193)]())return{'type':_0x583e57(0x178),'errorCode':_0x583e57(0x174),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x1a9f34,'arg':_0x1a9f34,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x1201c0=sanitizeFileName(_0x1a9f34),_0x38d884=getSegmentRootDir(_0x1201c0,cwd);return{'type':'parent_name','parentName':_0x1a9f34,'targetDir':_0x38d884,'configRoot':_0x38d884};}const _0x2d2574=await findTdxConfigAsync(cwd,fs);if(_0x2d2574){const _0x39534b=calculateScopedPath(cwd,_0x2d2574[_0x583e57(0x19d)]);return{'type':_0x583e57(0x184),'parentName':_0x2d2574[_0x583e57(0x18c)],'targetDir':cwd,'configRoot':_0x2d2574[_0x583e57(0x19d)],'isScoped':_0x39534b[_0x583e57(0x192)],'scopedFolderPath':_0x39534b[_0x583e57(0x17b)]};}if(_0x14bf8e){const _0x535e76=sanitizeFileName(_0x14bf8e),_0x493ce8=getSegmentRootDir(_0x535e76,cwd);return{'type':_0x583e57(0x184),'parentName':_0x14bf8e,'targetDir':_0x493ce8,'configRoot':_0x493ce8,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x583e57(0x178),'errorCode':'no_parent','message':_0x583e57(0x183),'helpText':_0x583e57(0x179)};}
@@ -1 +1 @@
1
- const a161_0x13f52f=a161_0x2461;(function(_0x5837a8,_0x19bbfd){const _0x254b26=a161_0x2461,_0xbe257d=_0x5837a8();while(!![]){try{const _0x576713=-parseInt(_0x254b26(0xd7))/0x1*(-parseInt(_0x254b26(0xca))/0x2)+-parseInt(_0x254b26(0xce))/0x3*(-parseInt(_0x254b26(0xdd))/0x4)+parseInt(_0x254b26(0xcb))/0x5*(-parseInt(_0x254b26(0xdc))/0x6)+-parseInt(_0x254b26(0xe2))/0x7*(-parseInt(_0x254b26(0xd6))/0x8)+parseInt(_0x254b26(0xc3))/0x9*(-parseInt(_0x254b26(0xc8))/0xa)+parseInt(_0x254b26(0xe0))/0xb+-parseInt(_0x254b26(0xd0))/0xc*(-parseInt(_0x254b26(0xc6))/0xd);if(_0x576713===_0x19bbfd)break;else _0xbe257d['push'](_0xbe257d['shift']());}catch(_0x57de99){_0xbe257d['push'](_0xbe257d['shift']());}}}(a161_0x4771,0x734c0));import{existsSync,readFileSync}from'fs';import a161_0x43002a from'path';const TDX_CONFIG_FILE=a161_0x13f52f(0xd4),SEGMENTS_DIR=a161_0x13f52f(0xd3);function a161_0x4771(){const _0x18aa03=['segments','tdx.json','replace','8zVQCtk','3ZDmmnl','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','resolve','engage_workspace','dirname','59352ngFPXN','124AWJWgu','join','parent_segment','4565165GmSTLu','cwd','1948261jABnvo','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','122544olIaHM','startsWith','parse','1050933MsWbJW','relative','640pDMvpK','Invalid\x20JSON\x20in\x20','416762jEVQie','190IPhgaF','object','root','23169BJekld','stringify','24HOxAFL','string','utf-8'];a161_0x4771=function(){return _0x18aa03;};return a161_0x4771();}export function findTdxConfigPath(_0x1c8935=process[a161_0x13f52f(0xe1)]()){const _0x2e05db=a161_0x13f52f;let _0x4d8e02=a161_0x43002a[_0x2e05db(0xd9)](_0x1c8935);const _0xfcfde3=a161_0x43002a[_0x2e05db(0xc5)](_0x4d8e02)[_0x2e05db(0xcd)];while(_0x4d8e02!==_0xfcfde3){const _0x211baf=a161_0x43002a[_0x2e05db(0xde)](_0x4d8e02,TDX_CONFIG_FILE);if(existsSync(_0x211baf))return _0x211baf;_0x4d8e02=a161_0x43002a['dirname'](_0x4d8e02);}return null;}export function loadTdxConfig(_0x355d55){const _0x3e1c56=a161_0x13f52f,_0x55ce88=readFileSync(_0x355d55,_0x3e1c56(0xd2));let _0x22cea0;try{_0x22cea0=JSON[_0x3e1c56(0xc5)](_0x55ce88);}catch{throw new Error(_0x3e1c56(0xc9)+_0x355d55);}if(!_0x22cea0||typeof _0x22cea0!==_0x3e1c56(0xcc))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x523b70=_0x22cea0,_0x3690ca=_0x523b70[_0x3e1c56(0xdf)]&&typeof _0x523b70[_0x3e1c56(0xdf)]==='string',_0xa9ce74=_0x523b70[_0x3e1c56(0xda)]&&typeof _0x523b70[_0x3e1c56(0xda)]===_0x3e1c56(0xd1);if(!_0x3690ca&&!_0xa9ce74)throw new Error(_0x3e1c56(0xd8));const _0x5b9138={};return _0x3690ca&&(_0x5b9138['parent_segment']=_0x523b70[_0x3e1c56(0xdf)]),_0xa9ce74&&(_0x5b9138[_0x3e1c56(0xda)]=_0x523b70[_0x3e1c56(0xda)]),_0x5b9138;}export function findTdxConfig(_0x542390=process['cwd']()){const _0x58240d=a161_0x13f52f,_0x314107=findTdxConfigPath(_0x542390);if(!_0x314107)throw new Error(_0x58240d(0xc2));const _0x2f1ffe=loadTdxConfig(_0x314107),_0x142068=a161_0x43002a[_0x58240d(0xdb)](_0x314107);return{'config':_0x2f1ffe,'configPath':_0x314107,'configDir':_0x142068};}function a161_0x2461(_0x20a074,_0x438dad){_0x20a074=_0x20a074-0xc2;const _0x47717c=a161_0x4771();let _0x246170=_0x47717c[_0x20a074];return _0x246170;}export function tryFindTdxConfig(_0x4349ad){try{return findTdxConfig(_0x4349ad);}catch{return null;}}export function getSegmentRootDir(_0x4a17d8,_0x431332=process[a161_0x13f52f(0xe1)]()){const _0x909bdb=a161_0x13f52f;return a161_0x43002a[_0x909bdb(0xde)](_0x431332,SEGMENTS_DIR,_0x4a17d8);}export function getTdxConfigPath(_0x188b0d,_0x1dc520=process[a161_0x13f52f(0xe1)]()){const _0x57693c=a161_0x13f52f;return a161_0x43002a[_0x57693c(0xde)](getSegmentRootDir(_0x188b0d,_0x1dc520),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x526f8e,_0x169ec2){const _0x20baa4=a161_0x13f52f,_0xc53ff1=a161_0x43002a[_0x20baa4(0xd9)](_0x526f8e),_0x1b822e=a161_0x43002a[_0x20baa4(0xc7)](_0x169ec2,_0xc53ff1);if(_0x1b822e[_0x20baa4(0xc4)]('..'))return'';return _0x1b822e;}export function localPathToTdFolderPath(_0xff9659){const _0x32a715=a161_0x13f52f,_0x252d5a=a161_0x43002a[_0x32a715(0xdb)](_0xff9659);if(_0x252d5a==='.'||_0x252d5a==='')return'';return _0x252d5a[_0x32a715(0xd5)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x1cc35f,_0xe69e9){const _0x3e9eaa=a161_0x13f52f;if(!_0x1cc35f)return _0xe69e9;return a161_0x43002a[_0x3e9eaa(0xde)](_0xe69e9,_0x1cc35f);}export function createTdxConfigContent(_0x40becc){const _0x5530bd=a161_0x13f52f,_0x3f3d6b={'parent_segment':_0x40becc};return JSON[_0x5530bd(0xcf)](_0x3f3d6b,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x19a1f2){const _0x19c30c=a161_0x13f52f,_0x508008={'engage_workspace':_0x19a1f2};return JSON[_0x19c30c(0xcf)](_0x508008,null,0x2)+'\x0a';}
1
+ const a161_0x48119e=a161_0xe1f7;(function(_0xc3ab13,_0x9b28cb){const _0x4a2443=a161_0xe1f7,_0x59c8c1=_0xc3ab13();while(!![]){try{const _0x2d9bd6=-parseInt(_0x4a2443(0x176))/0x1*(-parseInt(_0x4a2443(0x172))/0x2)+parseInt(_0x4a2443(0x17c))/0x3+parseInt(_0x4a2443(0x170))/0x4*(parseInt(_0x4a2443(0x174))/0x5)+-parseInt(_0x4a2443(0x188))/0x6*(parseInt(_0x4a2443(0x177))/0x7)+-parseInt(_0x4a2443(0x18a))/0x8*(-parseInt(_0x4a2443(0x185))/0x9)+parseInt(_0x4a2443(0x186))/0xa*(parseInt(_0x4a2443(0x17a))/0xb)+-parseInt(_0x4a2443(0x173))/0xc*(parseInt(_0x4a2443(0x17b))/0xd);if(_0x2d9bd6===_0x9b28cb)break;else _0x59c8c1['push'](_0x59c8c1['shift']());}catch(_0x249b8d){_0x59c8c1['push'](_0x59c8c1['shift']());}}}(a161_0x3528,0x3b91b));import{existsSync,readFileSync}from'fs';import a161_0x5e8641 from'path';const TDX_CONFIG_FILE=a161_0x48119e(0x183),SEGMENTS_DIR=a161_0x48119e(0x189);export function findTdxConfigPath(_0x2ca41e=process[a161_0x48119e(0x178)]()){const _0x59240e=a161_0x48119e;let _0x2f51a9=a161_0x5e8641[_0x59240e(0x180)](_0x2ca41e);const _0x1f4522=a161_0x5e8641[_0x59240e(0x182)](_0x2f51a9)[_0x59240e(0x187)];while(_0x2f51a9!==_0x1f4522){const _0x302f4d=a161_0x5e8641[_0x59240e(0x17e)](_0x2f51a9,TDX_CONFIG_FILE);if(existsSync(_0x302f4d))return _0x302f4d;_0x2f51a9=a161_0x5e8641[_0x59240e(0x181)](_0x2f51a9);}return null;}export function loadTdxConfig(_0xfe5f16){const _0xa680a1=a161_0x48119e,_0x2f0ea2=readFileSync(_0xfe5f16,_0xa680a1(0x184));let _0x5807f0;try{_0x5807f0=JSON[_0xa680a1(0x182)](_0x2f0ea2);}catch{throw new Error(_0xa680a1(0x16e)+_0xfe5f16);}if(!_0x5807f0||typeof _0x5807f0!==_0xa680a1(0x17d))throw new Error(_0xa680a1(0x16f));const _0x38c73a=_0x5807f0,_0x3e8158=_0x38c73a[_0xa680a1(0x18b)]&&typeof _0x38c73a['parent_segment']===_0xa680a1(0x17f),_0x386853=_0x38c73a[_0xa680a1(0x175)]&&typeof _0x38c73a[_0xa680a1(0x175)]===_0xa680a1(0x17f);if(!_0x3e8158&&!_0x386853)throw new Error(_0xa680a1(0x16d));const _0x13acb0={};return _0x3e8158&&(_0x13acb0[_0xa680a1(0x18b)]=_0x38c73a[_0xa680a1(0x18b)]),_0x386853&&(_0x13acb0[_0xa680a1(0x175)]=_0x38c73a[_0xa680a1(0x175)]),_0x13acb0;}export function findTdxConfig(_0x5f1ded=process[a161_0x48119e(0x178)]()){const _0xddf222=findTdxConfigPath(_0x5f1ded);if(!_0xddf222)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x39aeee=loadTdxConfig(_0xddf222),_0x3a05d2=a161_0x5e8641['dirname'](_0xddf222);return{'config':_0x39aeee,'configPath':_0xddf222,'configDir':_0x3a05d2};}export function tryFindTdxConfig(_0x13bd66){try{return findTdxConfig(_0x13bd66);}catch{return null;}}function a161_0x3528(){const _0x21bbb7=['12PCmNmo','replace','82oUTAzs','432WBadsX','66890rezxCj','engage_workspace','7827FXsJbL','239197tgHjmE','cwd','stringify','5093aaInyi','232895PldEJo','1304805QwvpXU','object','join','string','resolve','dirname','parse','tdx.json','utf-8','27nDxuAp','650ALxvEw','root','6YowyGX','segments','258760aAuGKV','parent_segment','startsWith','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','Invalid\x20JSON\x20in\x20','Invalid\x20tdx.json:\x20expected\x20object'];a161_0x3528=function(){return _0x21bbb7;};return a161_0x3528();}export function getSegmentRootDir(_0x15a708,_0x73913d=process[a161_0x48119e(0x178)]()){return a161_0x5e8641['join'](_0x73913d,SEGMENTS_DIR,_0x15a708);}function a161_0xe1f7(_0x453df4,_0x231594){_0x453df4=_0x453df4-0x16c;const _0x352864=a161_0x3528();let _0xe1f717=_0x352864[_0x453df4];return _0xe1f717;}export function getTdxConfigPath(_0x35771e,_0x2e5621=process[a161_0x48119e(0x178)]()){const _0x519c67=a161_0x48119e;return a161_0x5e8641[_0x519c67(0x17e)](getSegmentRootDir(_0x35771e,_0x2e5621),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x4a7ec0,_0x4eb5d5){const _0x5479b5=a161_0x48119e,_0x310ac7=a161_0x5e8641['resolve'](_0x4a7ec0),_0x262638=a161_0x5e8641['relative'](_0x4eb5d5,_0x310ac7);if(_0x262638[_0x5479b5(0x16c)]('..'))return'';return _0x262638;}export function localPathToTdFolderPath(_0x479f83){const _0x2b3127=a161_0x48119e,_0x100240=a161_0x5e8641['dirname'](_0x479f83);if(_0x100240==='.'||_0x100240==='')return'';return _0x100240[_0x2b3127(0x171)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x2375ea,_0x4203aa){const _0x2996e7=a161_0x48119e;if(!_0x2375ea)return _0x4203aa;return a161_0x5e8641[_0x2996e7(0x17e)](_0x4203aa,_0x2375ea);}export function createTdxConfigContent(_0x57fd48){const _0x29885e=a161_0x48119e,_0x11baa1={'parent_segment':_0x57fd48};return JSON[_0x29885e(0x179)](_0x11baa1,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x4b01fd){const _0x442f7c=a161_0x48119e,_0x5f1dcc={'engage_workspace':_0x4b01fd};return JSON[_0x442f7c(0x179)](_0x5f1dcc,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a162_0x358d7f=a162_0xb7e2;(function(_0xb4c6c,_0x551158){const _0x30b486=a162_0xb7e2,_0x27faae=_0xb4c6c();while(!![]){try{const _0x399873=-parseInt(_0x30b486(0x1db))/0x1+parseInt(_0x30b486(0x1d4))/0x2+-parseInt(_0x30b486(0x1bc))/0x3+-parseInt(_0x30b486(0x1cb))/0x4*(-parseInt(_0x30b486(0x1b9))/0x5)+parseInt(_0x30b486(0x1b7))/0x6+parseInt(_0x30b486(0x1b3))/0x7+-parseInt(_0x30b486(0x1d9))/0x8;if(_0x399873===_0x551158)break;else _0x27faae['push'](_0x27faae['shift']());}catch(_0x2e2d29){_0x27faae['push'](_0x27faae['shift']());}}}(a162_0x4297,0xc332c));function a162_0x4297(){const _0x46caf5=['record','First','desc','min','rows','enum','minutes_interval','80pRTwKx','All','union','week','onFailure','month','minute','hourly','once','270084tMDSsB','hour','Activation\x20name\x20is\x20required','array','unknown','5716576GJQzMe','optional','1318427mcjeWw','object','Last','9684234bWZEWU','number','daily','Top-N','3811524NkBZiX','clear','323690ZvPixI','string','nullable','1847961Uvmqvo','asc','none','Connection\x20name\x20is\x20required','monthly','boolean','masked','cron'];a162_0x4297=function(){return _0x46caf5;};return a162_0x4297();}function a162_0xb7e2(_0x498062,_0xad935d){_0x498062=_0x498062-0x1b2;const _0x429727=a162_0x4297();let _0xb7e285=_0x429727[_0x498062];return _0xb7e285;}import{z}from'zod';export const ScheduleTypeSchema=z['enum']([a162_0x358d7f(0x1be),a162_0x358d7f(0x1d2),a162_0x358d7f(0x1b5),'weekly',a162_0x358d7f(0x1c0),a162_0x358d7f(0x1c3),a162_0x358d7f(0x1ca)]);export const RepeatUnitSchema=z[a162_0x358d7f(0x1c9)]([a162_0x358d7f(0x1d1),a162_0x358d7f(0x1d5),'day',a162_0x358d7f(0x1ce),a162_0x358d7f(0x1d0),a162_0x358d7f(0x1d3),a162_0x358d7f(0x1be)]);export const ScheduleDefSchema=z[a162_0x358d7f(0x1dc)]({'type':ScheduleTypeSchema[a162_0x358d7f(0x1da)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a162_0x358d7f(0x1b4)]()[a162_0x358d7f(0x1da)](),'repeat_sub_frequency':z[a162_0x358d7f(0x1d7)](z[a162_0x358d7f(0x1b4)]())[a162_0x358d7f(0x1da)](),'start_at':z['string']()[a162_0x358d7f(0x1bb)]()['optional'](),'end_on':z[a162_0x358d7f(0x1ba)]()[a162_0x358d7f(0x1bb)]()['optional'](),'timezone':z['string']()[a162_0x358d7f(0x1da)]()});export const NotificationDefSchema=z[a162_0x358d7f(0x1dc)]({'notify_on':z[a162_0x358d7f(0x1d7)](z['enum'](['onSuccess',a162_0x358d7f(0x1cf)]))[a162_0x358d7f(0x1da)](),'email_recipients':z['array'](z[a162_0x358d7f(0x1ba)]())[a162_0x358d7f(0x1da)]()});export const ActivationColumnDefSchema=z[a162_0x358d7f(0x1cd)]([z[a162_0x358d7f(0x1ba)](),z['object']({'name':z[a162_0x358d7f(0x1ba)](),'type':z[a162_0x358d7f(0x1ba)]()[a162_0x358d7f(0x1da)](),'visibility':z[a162_0x358d7f(0x1c9)]([a162_0x358d7f(0x1b8),a162_0x358d7f(0x1c2)])[a162_0x358d7f(0x1da)]()})]);export const ActivationBehaviorDefSchema=z[a162_0x358d7f(0x1dc)]({'columns':z[a162_0x358d7f(0x1d7)](z['object']({'name':z[a162_0x358d7f(0x1ba)](),'type':z[a162_0x358d7f(0x1ba)]()[a162_0x358d7f(0x1da)](),'visibility':z[a162_0x358d7f(0x1c9)]([a162_0x358d7f(0x1b8),a162_0x358d7f(0x1c2)])[a162_0x358d7f(0x1da)]()}))[a162_0x358d7f(0x1da)](),'behavior_table':z[a162_0x358d7f(0x1ba)]()['optional'](),'join_row':z[a162_0x358d7f(0x1b4)]()['nullable']()[a162_0x358d7f(0x1da)](),'join_strategy':z['enum']([a162_0x358d7f(0x1cc),a162_0x358d7f(0x1c5),a162_0x358d7f(0x1b2),a162_0x358d7f(0x1b6)])[a162_0x358d7f(0x1da)](),'formatting':z['enum']([a162_0x358d7f(0x1c8),'cols'])[a162_0x358d7f(0x1da)](),'order_by':z[a162_0x358d7f(0x1d7)](z[a162_0x358d7f(0x1dc)]({'key':z[a162_0x358d7f(0x1ba)](),'order':z[a162_0x358d7f(0x1c9)]([a162_0x358d7f(0x1bd),a162_0x358d7f(0x1c6)])}))['optional']()});export const ActivationDefSchema=z[a162_0x358d7f(0x1dc)]({'name':z[a162_0x358d7f(0x1ba)]()[a162_0x358d7f(0x1c7)](0x1,a162_0x358d7f(0x1d6)),'description':z['string']()[a162_0x358d7f(0x1da)](),'connection':z[a162_0x358d7f(0x1ba)]()['min'](0x1,a162_0x358d7f(0x1bf)),'all_columns':z[a162_0x358d7f(0x1c1)]()[a162_0x358d7f(0x1da)](),'columns':z[a162_0x358d7f(0x1d7)](ActivationColumnDefSchema)[a162_0x358d7f(0x1da)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a162_0x358d7f(0x1c4)](z[a162_0x358d7f(0x1ba)](),z[a162_0x358d7f(0x1d8)]())[a162_0x358d7f(0x1da)](),'activation_template_id':z['string']()[a162_0x358d7f(0x1bb)]()['optional'](),'behavior':ActivationBehaviorDefSchema[a162_0x358d7f(0x1bb)]()[a162_0x358d7f(0x1da)](),'run_after_journey_refresh':z['boolean']()[a162_0x358d7f(0x1da)](),'nested_workflow_project_name':z[a162_0x358d7f(0x1ba)]()['optional'](),'nested_workflow_name':z['string']()[a162_0x358d7f(0x1da)](),'lock_enabled':z[a162_0x358d7f(0x1c1)]()[a162_0x358d7f(0x1da)]()});
1
+ function a162_0x26c2(_0x3f9a1b,_0x836482){_0x3f9a1b=_0x3f9a1b-0xc4;const _0x236f12=a162_0x236f();let _0x26c296=_0x236f12[_0x3f9a1b];return _0x26c296;}const a162_0x48d427=a162_0x26c2;(function(_0x205db3,_0x92d6df){const _0x58cbb6=a162_0x26c2,_0x5f2f1f=_0x205db3();while(!![]){try{const _0x19db2c=parseInt(_0x58cbb6(0xd0))/0x1+parseInt(_0x58cbb6(0xe2))/0x2+-parseInt(_0x58cbb6(0xe9))/0x3+parseInt(_0x58cbb6(0xc5))/0x4+parseInt(_0x58cbb6(0xd3))/0x5+parseInt(_0x58cbb6(0xd2))/0x6*(-parseInt(_0x58cbb6(0xea))/0x7)+-parseInt(_0x58cbb6(0xc8))/0x8;if(_0x19db2c===_0x92d6df)break;else _0x5f2f1f['push'](_0x5f2f1f['shift']());}catch(_0x190788){_0x5f2f1f['push'](_0x5f2f1f['shift']());}}}(a162_0x236f,0x74d28));import{z}from'zod';export const ScheduleTypeSchema=z[a162_0x48d427(0xd7)](['none','hourly',a162_0x48d427(0xe6),a162_0x48d427(0xde),a162_0x48d427(0xc6),a162_0x48d427(0xd5),a162_0x48d427(0xe8)]);export const RepeatUnitSchema=z[a162_0x48d427(0xd7)]([a162_0x48d427(0xe7),a162_0x48d427(0xda),a162_0x48d427(0xdf),a162_0x48d427(0xcd),'month',a162_0x48d427(0xe3),a162_0x48d427(0xd9)]);export const ScheduleDefSchema=z[a162_0x48d427(0xc7)]({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a162_0x48d427(0xdd)](),'repeat_frequency':z['number']()['optional'](),'repeat_sub_frequency':z[a162_0x48d427(0xd6)](z['number']())['optional'](),'start_at':z[a162_0x48d427(0xcb)]()['nullable']()[a162_0x48d427(0xdd)](),'end_on':z[a162_0x48d427(0xcb)]()['nullable']()[a162_0x48d427(0xdd)](),'timezone':z[a162_0x48d427(0xcb)]()['optional']()});export const NotificationDefSchema=z[a162_0x48d427(0xc7)]({'notify_on':z[a162_0x48d427(0xd6)](z[a162_0x48d427(0xd7)]([a162_0x48d427(0xdc),a162_0x48d427(0xd8)]))[a162_0x48d427(0xdd)](),'email_recipients':z[a162_0x48d427(0xd6)](z[a162_0x48d427(0xcb)]())['optional']()});function a162_0x236f(){const _0x2ba66a=['weekly','day','Connection\x20name\x20is\x20required','rows','1877706hatqja','once','min','Top-N','daily','minute','minutes_interval','559749GFBfEo','2471hybTSO','nullable','1745840IHRXzn','monthly','object','11069656OSTjys','boolean','desc','string','clear','week','Last','All','76938uRGZNE','unknown','3666fLEvhk','4061130wplMPK','record','cron','array','enum','onFailure','none','hour','First','onSuccess','optional'];a162_0x236f=function(){return _0x2ba66a;};return a162_0x236f();}export const ActivationColumnDefSchema=z['union']([z[a162_0x48d427(0xcb)](),z[a162_0x48d427(0xc7)]({'name':z[a162_0x48d427(0xcb)](),'type':z['string']()['optional'](),'visibility':z[a162_0x48d427(0xd7)]([a162_0x48d427(0xcc),'masked'])[a162_0x48d427(0xdd)]()})]);export const ActivationBehaviorDefSchema=z[a162_0x48d427(0xc7)]({'columns':z['array'](z[a162_0x48d427(0xc7)]({'name':z['string'](),'type':z[a162_0x48d427(0xcb)]()[a162_0x48d427(0xdd)](),'visibility':z[a162_0x48d427(0xd7)]([a162_0x48d427(0xcc),'masked'])['optional']()}))[a162_0x48d427(0xdd)](),'behavior_table':z[a162_0x48d427(0xcb)]()[a162_0x48d427(0xdd)](),'join_row':z['number']()[a162_0x48d427(0xc4)]()[a162_0x48d427(0xdd)](),'join_strategy':z['enum']([a162_0x48d427(0xcf),a162_0x48d427(0xdb),a162_0x48d427(0xce),a162_0x48d427(0xe5)])['optional'](),'formatting':z[a162_0x48d427(0xd7)]([a162_0x48d427(0xe1),'cols'])[a162_0x48d427(0xdd)](),'order_by':z[a162_0x48d427(0xd6)](z['object']({'key':z[a162_0x48d427(0xcb)](),'order':z['enum'](['asc',a162_0x48d427(0xca)])}))[a162_0x48d427(0xdd)]()});export const ActivationDefSchema=z[a162_0x48d427(0xc7)]({'name':z[a162_0x48d427(0xcb)]()[a162_0x48d427(0xe4)](0x1,'Activation\x20name\x20is\x20required'),'description':z[a162_0x48d427(0xcb)]()[a162_0x48d427(0xdd)](),'connection':z[a162_0x48d427(0xcb)]()[a162_0x48d427(0xe4)](0x1,a162_0x48d427(0xe0)),'all_columns':z[a162_0x48d427(0xc9)]()[a162_0x48d427(0xdd)](),'columns':z[a162_0x48d427(0xd6)](ActivationColumnDefSchema)[a162_0x48d427(0xdd)](),'schedule':ScheduleDefSchema[a162_0x48d427(0xdd)](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a162_0x48d427(0xd4)](z[a162_0x48d427(0xcb)](),z[a162_0x48d427(0xd1)]())[a162_0x48d427(0xdd)](),'activation_template_id':z[a162_0x48d427(0xcb)]()['nullable']()[a162_0x48d427(0xdd)](),'behavior':ActivationBehaviorDefSchema['nullable']()[a162_0x48d427(0xdd)](),'run_after_journey_refresh':z[a162_0x48d427(0xc9)]()[a162_0x48d427(0xdd)](),'nested_workflow_project_name':z['string']()['optional'](),'nested_workflow_name':z[a162_0x48d427(0xcb)]()[a162_0x48d427(0xdd)](),'lock_enabled':z[a162_0x48d427(0xc9)]()[a162_0x48d427(0xdd)]()});
@@ -1 +1 @@
1
- function a163_0x5d46(_0x360fd2,_0x1236db){_0x360fd2=_0x360fd2-0xd5;var _0x47b0f2=a163_0x47b0();var _0x5d46ea=_0x47b0f2[_0x360fd2];return _0x5d46ea;}(function(_0x1c9237,_0x344ed7){var _0x440d5f=a163_0x5d46,_0x5c6e80=_0x1c9237();while(!![]){try{var _0xe5355d=-parseInt(_0x440d5f(0xd9))/0x1*(-parseInt(_0x440d5f(0xd7))/0x2)+parseInt(_0x440d5f(0xdc))/0x3+parseInt(_0x440d5f(0xd5))/0x4+parseInt(_0x440d5f(0xde))/0x5+-parseInt(_0x440d5f(0xdb))/0x6*(parseInt(_0x440d5f(0xd8))/0x7)+-parseInt(_0x440d5f(0xd6))/0x8*(-parseInt(_0x440d5f(0xda))/0x9)+-parseInt(_0x440d5f(0xdd))/0xa;if(_0xe5355d===_0x344ed7)break;else _0x5c6e80['push'](_0x5c6e80['shift']());}catch(_0x71070){_0x5c6e80['push'](_0x5c6e80['shift']());}}}(a163_0x47b0,0x5f0a4));function a163_0x47b0(){var _0x36aff2=['293659LDvMLH','4256685QMDRAq','36ZImHhE','892629zpkpjs','17638160XjHEHm','2684805sxKJfa','2216264ltUpqG','8UeFpdW','2DmjQso','2443fSwVBL'];a163_0x47b0=function(){return _0x36aff2;};return a163_0x47b0();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ function a163_0x2428(){var _0x2c5d6b=['1403625IKUFNa','5881825vclDVI','2435846ZasymP','1791bzBSMG','139748KkfVcz','18CmCzQq','39957530mnjaGc','31336dDGXTj','4woSwjk','623820ECvcqy'];a163_0x2428=function(){return _0x2c5d6b;};return a163_0x2428();}function a163_0x17a1(_0x3d957b,_0x52067b){_0x3d957b=_0x3d957b-0x1e9;var _0x242833=a163_0x2428();var _0x17a12c=_0x242833[_0x3d957b];return _0x17a12c;}(function(_0x117d18,_0x2587ff){var _0x5a0654=a163_0x17a1,_0x4ebfbf=_0x117d18();while(!![]){try{var _0x5af083=-parseInt(_0x5a0654(0x1f0))/0x1+-parseInt(_0x5a0654(0x1ea))/0x2+-parseInt(_0x5a0654(0x1ef))/0x3+parseInt(_0x5a0654(0x1ee))/0x4*(-parseInt(_0x5a0654(0x1f1))/0x5)+parseInt(_0x5a0654(0x1eb))/0x6*(-parseInt(_0x5a0654(0x1f2))/0x7)+parseInt(_0x5a0654(0x1ed))/0x8*(parseInt(_0x5a0654(0x1e9))/0x9)+parseInt(_0x5a0654(0x1ec))/0xa;if(_0x5af083===_0x2587ff)break;else _0x4ebfbf['push'](_0x4ebfbf['shift']());}catch(_0x12da7e){_0x4ebfbf['push'](_0x4ebfbf['shift']());}}}(a163_0x2428,0xd541a));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a164_0x124f05=a164_0x1db9;(function(_0x2ce634,_0x5cfb09){const _0x5ea00e=a164_0x1db9,_0x26bcbd=_0x2ce634();while(!![]){try{const _0xe90c8a=-parseInt(_0x5ea00e(0x125))/0x1*(parseInt(_0x5ea00e(0x11e))/0x2)+-parseInt(_0x5ea00e(0x111))/0x3+-parseInt(_0x5ea00e(0x127))/0x4*(-parseInt(_0x5ea00e(0x11f))/0x5)+parseInt(_0x5ea00e(0x114))/0x6*(-parseInt(_0x5ea00e(0x112))/0x7)+-parseInt(_0x5ea00e(0x120))/0x8*(parseInt(_0x5ea00e(0x124))/0x9)+-parseInt(_0x5ea00e(0x110))/0xa+parseInt(_0x5ea00e(0x10b))/0xb*(parseInt(_0x5ea00e(0x128))/0xc);if(_0xe90c8a===_0x5cfb09)break;else _0x26bcbd['push'](_0x26bcbd['shift']());}catch(_0x3e9b8b){_0x26bcbd['push'](_0x26bcbd['shift']());}}}(a164_0x171e,0xd34bc));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a164_0x124f05(0x116)](['draft',a164_0x124f05(0x106),a164_0x124f05(0x122)]);export const ReentryModeTypeSchema=z['enum']([a164_0x124f05(0x102),a164_0x124f05(0x11b),a164_0x124f05(0x10c)]);export const WaitUnitTypeSchema=z['enum']([a164_0x124f05(0x107),a164_0x124f05(0x10a)]);export const StepTypeValueSchema=z[a164_0x124f05(0x116)]([a164_0x124f05(0xfb),a164_0x124f05(0x115),a164_0x124f05(0x11d),a164_0x124f05(0x108),a164_0x124f05(0x104),a164_0x124f05(0x109),a164_0x124f05(0x126)]);function a164_0x171e(){const _0x8f2258=['275187wEdBxT','14brdYmW','record','1548138eXEFzv','activation','enum','lazy','min','literal','versions','reentry_unless_goal_achieved','journeys','decision_point','228JiJbTN','862525PzQaDK','16TxyYYj','boolean','launched','string','5304519caaxdb','10813IXcOVe','end','28hltTad','660WVnKMU','Journey\x20name\x20is\x20required','wait','discriminatedUnion','array','object','type','filter','length','no_reentry','number','merge','passthrough','simulation','day','ab_test','jump','week','686169TOwMht','reentry_always','stages','optional','journey','7536730dynwWY'];a164_0x171e=function(){return _0x8f2258;};return a164_0x171e();}export const EmbeddedSegmentDefSchema=z['object']({'description':z['string']()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a164_0x124f05(0xfe)]({'journey':z[a164_0x124f05(0x123)](),'stage':z[a164_0x124f05(0x123)](),'bundle_id':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)]()});export const CriteriaDefSchema=z[a164_0x124f05(0xfe)]({'name':z[a164_0x124f05(0x123)](),'description':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'segment':z['string'](),'target':JumpTargetDefSchema[a164_0x124f05(0x10e)]()});const WaitConditionTimeoutDefSchema=z[a164_0x124f05(0xfe)]({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)]()}),WaitConditionDefSchema=z[a164_0x124f05(0xfe)]({'segment':z['string'](),'next':z['string']()[a164_0x124f05(0x10e)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z['object']({'duration':z[a164_0x124f05(0x103)]()['optional'](),'unit':WaitUnitTypeSchema[a164_0x124f05(0x10e)](),'wait_until':z['string']()[a164_0x124f05(0x10e)](),'condition':WaitConditionDefSchema[a164_0x124f05(0x10e)](),'days_of_week':z['array'](z['string']())[a164_0x124f05(0x10e)]()}),StepBaseFields={'name':z[a164_0x124f05(0x123)](),'uuid':z['string']()['optional'](),'next':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)]()},WaitStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z['string']()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a164_0x124f05(0x115)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a164_0x124f05(0xfe)]({'name':z['string'](),'segment':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'segment_id':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'excluded':z[a164_0x124f05(0x121)]()[a164_0x124f05(0x10e)](),'next':z['string']()[a164_0x124f05(0x10e)]()}),DecisionPointStepParamsDefSchema=z[a164_0x124f05(0xfe)]({'branches':z[a164_0x124f05(0xfd)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)](a164_0x124f05(0x11d)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a164_0x124f05(0xfe)]({'id':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'name':z[a164_0x124f05(0x123)](),'percentage':z[a164_0x124f05(0x103)](),'next':z['string']()[a164_0x124f05(0x10e)]()}),AbTestStepParamsDefSchema=z[a164_0x124f05(0xfe)]({'variants':z[a164_0x124f05(0xfd)](AbTestVariantDefSchema),'unique_id':z[a164_0x124f05(0x123)]()['optional'](),'customized_split':z['boolean']()[a164_0x124f05(0x10e)]()}),AbTestStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)](a164_0x124f05(0x108)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)]('merge')}),JumpStepParamsDefSchema=z[a164_0x124f05(0xfe)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)](a164_0x124f05(0x126))})[a164_0x124f05(0x105)]();export const StepDefSchema=z[a164_0x124f05(0xfc)](a164_0x124f05(0xff),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a164_0x124f05(0xfe)]({'name':z[a164_0x124f05(0x123)](),'description':z[a164_0x124f05(0x123)]()['optional'](),'id':z['string']()[a164_0x124f05(0x10e)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a164_0x124f05(0xfd)](CriteriaDefSchema)[a164_0x124f05(0x10e)](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'steps':z['array'](StepDefSchema)[a164_0x124f05(0x10e)]()});export const JourneyEntryDefSchema=z[a164_0x124f05(0xfe)]({'name':z['string']()['optional'](),'version':z[a164_0x124f05(0x123)]()['optional'](),'state':JourneyStateTypeSchema['optional'](),'latest':z[a164_0x124f05(0x121)]()[a164_0x124f05(0x10e)](),'stages':z[a164_0x124f05(0xfd)](StageDefSchema),'id':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'version_number':z[a164_0x124f05(0x103)]()['optional'](),'goal':CriteriaDefSchema[a164_0x124f05(0x10e)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z[a164_0x124f05(0x117)](()=>z[a164_0x124f05(0xfe)]({'type':z[a164_0x124f05(0x119)](a164_0x124f05(0x10f)),'name':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x118)](0x1,a164_0x124f05(0x129)),'description':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'bundle_id':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'bundle_name':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'folder_id':z['string']()[a164_0x124f05(0x10e)](),'reentry':ReentryModeTypeSchema[a164_0x124f05(0x10e)](),'allow_reentry':z[a164_0x124f05(0x121)]()['optional'](),'goal':CriteriaDefSchema[a164_0x124f05(0x10e)](),'id':z[a164_0x124f05(0x123)]()['optional'](),'version':z[a164_0x124f05(0x123)]()['optional'](),'version_number':z[a164_0x124f05(0x103)]()[a164_0x124f05(0x10e)](),'stages':z[a164_0x124f05(0xfd)](StageDefSchema)[a164_0x124f05(0x10e)](),'versions':z[a164_0x124f05(0xfd)](JourneyEntryDefSchema)['optional'](),'journeys':z[a164_0x124f05(0xfd)](JourneyEntryDefSchema)[a164_0x124f05(0x10e)](),'segments':z[a164_0x124f05(0x113)](z[a164_0x124f05(0x123)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z[a164_0x124f05(0x113)](z['string'](),ActivationDefSchema)[a164_0x124f05(0x10e)]()})['refine'](_0x140336=>{const _0x5d5c35=a164_0x124f05,_0x45168c=[_0x140336[_0x5d5c35(0x11c)],_0x140336[_0x5d5c35(0x10d)],_0x140336[_0x5d5c35(0x11a)]][_0x5d5c35(0x100)](_0x41d3f7=>Array['isArray'](_0x41d3f7)&&_0x41d3f7[_0x5d5c35(0x101)]>0x0)['length'];return _0x45168c===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];function a164_0x1db9(_0x4b4c13,_0x5225c6){_0x4b4c13=_0x4b4c13-0xfb;const _0x171ee2=a164_0x171e();let _0x1db990=_0x171ee2[_0x4b4c13];return _0x1db990;}void _syncCheck1,void _syncCheck2;
1
+ const a164_0x489273=a164_0x3e2b;(function(_0x30a82e,_0x1ba4f4){const _0x440361=a164_0x3e2b,_0xbf2396=_0x30a82e();while(!![]){try{const _0x478c17=parseInt(_0x440361(0x13c))/0x1+-parseInt(_0x440361(0x120))/0x2+parseInt(_0x440361(0x137))/0x3+-parseInt(_0x440361(0x134))/0x4+parseInt(_0x440361(0x122))/0x5*(parseInt(_0x440361(0x124))/0x6)+-parseInt(_0x440361(0x12d))/0x7*(parseInt(_0x440361(0x11a))/0x8)+-parseInt(_0x440361(0x123))/0x9;if(_0x478c17===_0x1ba4f4)break;else _0xbf2396['push'](_0xbf2396['shift']());}catch(_0x31c424){_0xbf2396['push'](_0xbf2396['shift']());}}}(a164_0x50cb,0xac168));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a164_0x489273(0x135)]([a164_0x489273(0x12f),'simulation',a164_0x489273(0x138)]);export const ReentryModeTypeSchema=z[a164_0x489273(0x135)](['no_reentry','reentry_unless_goal_achieved',a164_0x489273(0x12b)]);function a164_0x50cb(){const _0x345f51=['756782AraWZt','ab_test','2040ODZxKp','1182969yIpKIy','3912AMMumI','type','array','number','filter','isArray','week','reentry_always','object','3240986GGQVqT','decision_point','draft','discriminatedUnion','record','journeys','end','395400BxAPXR','enum','jump','2172405qcIgAU','launched','optional','wait','lazy','1249399lNVvdS','activation','length','min','boolean','stages','day','16qUDTyK','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','Journey\x20name\x20is\x20required','string','merge','literal'];a164_0x50cb=function(){return _0x345f51;};return a164_0x50cb();}export const WaitUnitTypeSchema=z[a164_0x489273(0x135)]([a164_0x489273(0x119),a164_0x489273(0x12a)]);function a164_0x3e2b(_0x3e0a0f,_0x3d786f){_0x3e0a0f=_0x3e0a0f-0x116;const _0x50cb75=a164_0x50cb();let _0x3e2b27=_0x50cb75[_0x3e0a0f];return _0x3e2b27;}export const StepTypeValueSchema=z[a164_0x489273(0x135)]([a164_0x489273(0x13a),a164_0x489273(0x13d),a164_0x489273(0x12e),a164_0x489273(0x121),a164_0x489273(0x11e),a164_0x489273(0x136),a164_0x489273(0x133)]);export const EmbeddedSegmentDefSchema=z[a164_0x489273(0x12c)]({'description':z[a164_0x489273(0x11d)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z[a164_0x489273(0x11d)](),'stage':z[a164_0x489273(0x11d)](),'bundle_id':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)]()});export const CriteriaDefSchema=z[a164_0x489273(0x12c)]({'name':z['string'](),'description':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'segment':z[a164_0x489273(0x11d)](),'target':JumpTargetDefSchema[a164_0x489273(0x139)]()});const WaitConditionTimeoutDefSchema=z[a164_0x489273(0x12c)]({'duration':z[a164_0x489273(0x127)](),'unit':WaitUnitTypeSchema,'next':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)]()}),WaitConditionDefSchema=z[a164_0x489273(0x12c)]({'segment':z[a164_0x489273(0x11d)](),'next':z[a164_0x489273(0x11d)]()['optional'](),'timeout':WaitConditionTimeoutDefSchema[a164_0x489273(0x139)]()}),WaitStepParamsDefSchema=z[a164_0x489273(0x12c)]({'duration':z[a164_0x489273(0x127)]()[a164_0x489273(0x139)](),'unit':WaitUnitTypeSchema[a164_0x489273(0x139)](),'wait_until':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'condition':WaitConditionDefSchema[a164_0x489273(0x139)](),'days_of_week':z[a164_0x489273(0x126)](z[a164_0x489273(0x11d)]())[a164_0x489273(0x139)]()}),StepBaseFields={'name':z[a164_0x489273(0x11d)](),'uuid':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'next':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)]()},WaitStepDefSchema=z[a164_0x489273(0x12c)]({...StepBaseFields,'type':z[a164_0x489273(0x11f)](a164_0x489273(0x13a)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a164_0x489273(0x12c)]({'activation':z[a164_0x489273(0x11d)]()}),ActivationStepDefSchema=z[a164_0x489273(0x12c)]({...StepBaseFields,'type':z['literal']('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a164_0x489273(0x12c)]({'name':z[a164_0x489273(0x11d)](),'segment':z['string']()['optional'](),'segment_id':z[a164_0x489273(0x11d)]()['optional'](),'excluded':z[a164_0x489273(0x117)]()[a164_0x489273(0x139)](),'next':z['string']()[a164_0x489273(0x139)]()}),DecisionPointStepParamsDefSchema=z[a164_0x489273(0x12c)]({'branches':z[a164_0x489273(0x126)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a164_0x489273(0x12c)]({...StepBaseFields,'type':z['literal']('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a164_0x489273(0x12c)]({'id':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'name':z['string'](),'percentage':z['number'](),'next':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)]()}),AbTestStepParamsDefSchema=z[a164_0x489273(0x12c)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'customized_split':z[a164_0x489273(0x117)]()[a164_0x489273(0x139)]()}),AbTestStepDefSchema=z[a164_0x489273(0x12c)]({...StepBaseFields,'type':z['literal'](a164_0x489273(0x121)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a164_0x489273(0x11e))}),JumpStepParamsDefSchema=z[a164_0x489273(0x12c)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a164_0x489273(0x12c)]({...StepBaseFields,'type':z[a164_0x489273(0x11f)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a164_0x489273(0x12c)]({...StepBaseFields,'type':z[a164_0x489273(0x11f)](a164_0x489273(0x133))})['passthrough']();export const StepDefSchema=z[a164_0x489273(0x130)](a164_0x489273(0x125),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a164_0x489273(0x12c)]({'name':z[a164_0x489273(0x11d)](),'description':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'id':z[a164_0x489273(0x11d)]()['optional'](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a164_0x489273(0x126)](CriteriaDefSchema)[a164_0x489273(0x139)](),'milestone':CriteriaDefSchema[a164_0x489273(0x139)](),'root_step':z['string']()[a164_0x489273(0x139)](),'steps':z[a164_0x489273(0x126)](StepDefSchema)[a164_0x489273(0x139)]()});export const JourneyEntryDefSchema=z['object']({'name':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'version':z[a164_0x489273(0x11d)]()['optional'](),'state':JourneyStateTypeSchema['optional'](),'latest':z[a164_0x489273(0x117)]()[a164_0x489273(0x139)](),'stages':z[a164_0x489273(0x126)](StageDefSchema),'id':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'version_number':z[a164_0x489273(0x127)]()[a164_0x489273(0x139)](),'goal':CriteriaDefSchema[a164_0x489273(0x139)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z[a164_0x489273(0x13b)](()=>z[a164_0x489273(0x12c)]({'type':z['literal']('journey'),'name':z[a164_0x489273(0x11d)]()[a164_0x489273(0x116)](0x1,a164_0x489273(0x11c)),'description':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'bundle_id':z[a164_0x489273(0x11d)]()['optional'](),'bundle_name':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'folder_id':z['string']()['optional'](),'reentry':ReentryModeTypeSchema[a164_0x489273(0x139)](),'allow_reentry':z['boolean']()[a164_0x489273(0x139)](),'goal':CriteriaDefSchema[a164_0x489273(0x139)](),'id':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'version':z[a164_0x489273(0x11d)]()[a164_0x489273(0x139)](),'version_number':z[a164_0x489273(0x127)]()[a164_0x489273(0x139)](),'stages':z[a164_0x489273(0x126)](StageDefSchema)['optional'](),'versions':z[a164_0x489273(0x126)](JourneyEntryDefSchema)[a164_0x489273(0x139)](),'journeys':z[a164_0x489273(0x126)](JourneyEntryDefSchema)[a164_0x489273(0x139)](),'segments':z[a164_0x489273(0x131)](z[a164_0x489273(0x11d)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z[a164_0x489273(0x131)](z[a164_0x489273(0x11d)](),ActivationDefSchema)['optional']()})['refine'](_0x36ce87=>{const _0x250ad8=a164_0x489273,_0x46b0f0=[_0x36ce87[_0x250ad8(0x132)],_0x36ce87[_0x250ad8(0x118)],_0x36ce87['versions']][_0x250ad8(0x128)](_0x45489c=>Array[_0x250ad8(0x129)](_0x45489c)&&_0x45489c[_0x250ad8(0x13e)]>0x0)['length'];return _0x46b0f0===0x1;},{'message':a164_0x489273(0x11b)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x510a5f,_0x37a3b3){var _0x3b4db3=a166_0x4366,_0x3d1f9c=_0x510a5f();while(!![]){try{var _0x458b10=parseInt(_0x3b4db3(0xb9))/0x1*(parseInt(_0x3b4db3(0xbc))/0x2)+parseInt(_0x3b4db3(0xbb))/0x3+-parseInt(_0x3b4db3(0xc0))/0x4+parseInt(_0x3b4db3(0xb8))/0x5*(parseInt(_0x3b4db3(0xc1))/0x6)+-parseInt(_0x3b4db3(0xbd))/0x7+parseInt(_0x3b4db3(0xba))/0x8*(-parseInt(_0x3b4db3(0xbe))/0x9)+parseInt(_0x3b4db3(0xbf))/0xa;if(_0x458b10===_0x37a3b3)break;else _0x3d1f9c['push'](_0x3d1f9c['shift']());}catch(_0x9ad14e){_0x3d1f9c['push'](_0x3d1f9c['shift']());}}}(a166_0x1a74,0xaac20));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a166_0x4366(_0x462e69,_0x7d8e5){_0x462e69=_0x462e69-0xb8;var _0x1a7483=a166_0x1a74();var _0x43661d=_0x1a7483[_0x462e69];return _0x43661d;}function a166_0x1a74(){var _0x5e5924=['9CqVqlX','11560420boTwEZ','1786416bgjvoU','271638EEueqe','140xoYazy','2QTNyVu','9619544NJdxaS','507633oGZcgX','360298xNTJdv','4233068eKGFPl'];a166_0x1a74=function(){return _0x5e5924;};return a166_0x1a74();}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
1
+ (function(_0xe4c1b7,_0x361392){var _0x3aed49=a166_0x4d0d,_0x4ec14b=_0xe4c1b7();while(!![]){try{var _0x254409=-parseInt(_0x3aed49(0xae))/0x1+-parseInt(_0x3aed49(0xa9))/0x2+parseInt(_0x3aed49(0xab))/0x3*(parseInt(_0x3aed49(0xb0))/0x4)+-parseInt(_0x3aed49(0xaa))/0x5*(-parseInt(_0x3aed49(0xb2))/0x6)+-parseInt(_0x3aed49(0xb1))/0x7+parseInt(_0x3aed49(0xaf))/0x8*(parseInt(_0x3aed49(0xac))/0x9)+parseInt(_0x3aed49(0xad))/0xa;if(_0x254409===_0x361392)break;else _0x4ec14b['push'](_0x4ec14b['shift']());}catch(_0x156132){_0x4ec14b['push'](_0x4ec14b['shift']());}}}(a166_0xbaa8,0x89297));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a166_0x4d0d(_0x47a13e,_0x3e13af){_0x47a13e=_0x47a13e-0xa9;var _0xbaa8ca=a166_0xbaa8();var _0x4d0df6=_0xbaa8ca[_0x47a13e];return _0x4d0df6;}function a166_0xbaa8(){var _0x3488f5=['1248ADiQtg','1457208gHLKkB','1055LRzNpY','6XCxnmN','31140FiYBbp','8749480ldCgPy','549798uXNQDl','1096eDKJkj','1306724MALpBg','1442007DrUhWg'];a166_0xbaa8=function(){return _0x3488f5;};return a166_0xbaa8();}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a167_0x5e449e=a167_0xfd33;(function(_0x407dd2,_0x99727e){const _0x59ea48=a167_0xfd33,_0x51f6d3=_0x407dd2();while(!![]){try{const _0x60acae=parseInt(_0x59ea48(0xf4))/0x1+-parseInt(_0x59ea48(0x119))/0x2*(parseInt(_0x59ea48(0xec))/0x3)+-parseInt(_0x59ea48(0xda))/0x4*(parseInt(_0x59ea48(0xd9))/0x5)+-parseInt(_0x59ea48(0xcf))/0x6*(-parseInt(_0x59ea48(0xd1))/0x7)+parseInt(_0x59ea48(0xdd))/0x8+parseInt(_0x59ea48(0xce))/0x9*(-parseInt(_0x59ea48(0x109))/0xa)+-parseInt(_0x59ea48(0xfb))/0xb*(-parseInt(_0x59ea48(0xdb))/0xc);if(_0x60acae===_0x99727e)break;else _0x51f6d3['push'](_0x51f6d3['shift']());}catch(_0x311bd7){_0x51f6d3['push'](_0x51f6d3['shift']());}}}(a167_0x1d72,0x9a6a2));import{z}from'zod';export const OperatorTypeSchema=z[a167_0x5e449e(0xe2)](['Equal',a167_0x5e449e(0xd4),a167_0x5e449e(0xfe),a167_0x5e449e(0xe8),'LessEqual','In',a167_0x5e449e(0xd2),a167_0x5e449e(0xf9),a167_0x5e449e(0xe1),a167_0x5e449e(0x11f),a167_0x5e449e(0xd6),a167_0x5e449e(0x11d),'StartWith',a167_0x5e449e(0xed),a167_0x5e449e(0x120)]);export const TimeUnitSchema=z[a167_0x5e449e(0xe2)]([a167_0x5e449e(0xe0),a167_0x5e449e(0xe4),a167_0x5e449e(0xcc),a167_0x5e449e(0xff),a167_0x5e449e(0xf0),a167_0x5e449e(0xe5),a167_0x5e449e(0x10d)]);export const AggregationTypeSchema=z[a167_0x5e449e(0xe2)](['Count',a167_0x5e449e(0xe7),a167_0x5e449e(0xde),a167_0x5e449e(0x110),'Max',a167_0x5e449e(0x105),a167_0x5e449e(0x10a),a167_0x5e449e(0xd5)]);const TemporalValueSchema=z[a167_0x5e449e(0xd0)]([z[a167_0x5e449e(0xf1)]({'timestamp':z['string']()}),z[a167_0x5e449e(0xf1)]({'last':z[a167_0x5e449e(0xd0)]([z[a167_0x5e449e(0x122)](),z[a167_0x5e449e(0xe9)](z[a167_0x5e449e(0xfc)](),z[a167_0x5e449e(0x122)]())]),'unit':z[a167_0x5e449e(0xfc)]()})]),OperatorValueSchema=z[a167_0x5e449e(0xd0)]([z['string'](),z[a167_0x5e449e(0x122)](),z[a167_0x5e449e(0xeb)](),TemporalValueSchema,z[a167_0x5e449e(0xf2)](z[a167_0x5e449e(0xd0)]([z[a167_0x5e449e(0xfc)](),z['number'](),z[a167_0x5e449e(0xeb)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a167_0x5e449e(0xf6),'Greater','GreaterEqual','Less',a167_0x5e449e(0x121),'In',a167_0x5e449e(0x11d),a167_0x5e449e(0x116),a167_0x5e449e(0xed),a167_0x5e449e(0xf9),a167_0x5e449e(0x11f),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a167_0x5e449e(0xd6)]);export const OperatorDefSchema=z[a167_0x5e449e(0xf1)]({'type':OperatorTypeSchema,'not':z[a167_0x5e449e(0xeb)]()[a167_0x5e449e(0xd7)](),'value':OperatorValueSchema[a167_0x5e449e(0xd7)](),'min':z['union']([z[a167_0x5e449e(0x122)](),z[a167_0x5e449e(0xfc)](),TemporalValueSchema])[a167_0x5e449e(0xd7)](),'max':z['union']([z[a167_0x5e449e(0x122)](),z[a167_0x5e449e(0xfc)](),TemporalValueSchema])[a167_0x5e449e(0xd7)](),'unit':TimeUnitSchema['optional'](),'duration':z[a167_0x5e449e(0xf1)]({'day':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)](),'week':z[a167_0x5e449e(0x122)]()['optional'](),'month':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)](),'year':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)](),'hour':z[a167_0x5e449e(0x122)]()['optional'](),'minute':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)](),'second':z['number']()[a167_0x5e449e(0xd7)]()})['optional'](),'from':z[a167_0x5e449e(0xf1)]({'last':z[a167_0x5e449e(0xd0)]([z[a167_0x5e449e(0x122)](),z['string']()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a167_0x5e449e(0xeb)]()[a167_0x5e449e(0xd7)]()})[a167_0x5e449e(0x111)]((_0x28b738,_0x4fbff1)=>{const _0x30ceb6=a167_0x5e449e;OPERATORS_REQUIRING_VALUE['has'](_0x28b738['type'])&&(_0x28b738[_0x30ceb6(0xdf)]===undefined||_0x28b738[_0x30ceb6(0xdf)]===null)&&_0x4fbff1[_0x30ceb6(0xfd)]({'code':_0x30ceb6(0xe6),'message':'Operator\x20\x27'+_0x28b738[_0x30ceb6(0xdc)]+_0x30ceb6(0xfa),'path':[_0x30ceb6(0xdf)]}),_0x28b738[_0x30ceb6(0xdc)]===_0x30ceb6(0xd2)&&_0x28b738[_0x30ceb6(0xea)]===undefined&&_0x28b738[_0x30ceb6(0xee)]===undefined&&_0x4fbff1[_0x30ceb6(0xfd)]({'code':_0x30ceb6(0xe6),'message':_0x30ceb6(0x102),'params':{'validationCode':_0x30ceb6(0x11c)}}),OPERATORS_REQUIRING_UNIT['has'](_0x28b738[_0x30ceb6(0xdc)])&&_0x28b738['value']!==undefined&&!_0x28b738[_0x30ceb6(0x104)]&&_0x4fbff1[_0x30ceb6(0xfd)]({'code':_0x30ceb6(0xe6),'message':_0x30ceb6(0x100)+_0x28b738['type']+_0x30ceb6(0x10e),'path':[_0x30ceb6(0x104)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x28b738[_0x30ceb6(0xdc)]===_0x30ceb6(0x120)&&(!_0x28b738['duration']&&_0x4fbff1[_0x30ceb6(0xfd)]({'code':_0x30ceb6(0xe6),'message':_0x30ceb6(0xcb),'path':[_0x30ceb6(0x117)]}),!_0x28b738[_0x30ceb6(0x10b)]&&_0x4fbff1[_0x30ceb6(0xfd)]({'code':_0x30ceb6(0xe6),'message':_0x30ceb6(0xf7),'path':[_0x30ceb6(0x10b)]}));});export const ArrayMatchingSchema=z['union']([z['literal'](a167_0x5e449e(0x10f)),z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x108)),z['object']({'atLeast':z[a167_0x5e449e(0x122)]()}),z[a167_0x5e449e(0xf1)]({'atMost':z['number']()}),z['object']({'exactly':z['number']()})]);export const AggregationDefSchema=z[a167_0x5e449e(0xf5)](a167_0x5e449e(0xdc),[z[a167_0x5e449e(0xf1)]({'type':z['enum']([a167_0x5e449e(0xe7),'Min',a167_0x5e449e(0xca),a167_0x5e449e(0xde)]),'column':z['string'](),'groupingColumns':z[a167_0x5e449e(0xf2)](z['string']())[a167_0x5e449e(0xd7)]()}),z[a167_0x5e449e(0xf1)]({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0xf8)),'groupingColumns':z[a167_0x5e449e(0xf2)](z['string']())[a167_0x5e449e(0xd7)]()}),z['object']({'type':z['literal']('CountDistinct'),'columns':z['array'](z[a167_0x5e449e(0xfc)]())}),z[a167_0x5e449e(0xf1)]({'type':z[a167_0x5e449e(0xe2)](['First',a167_0x5e449e(0xd5)]),'column':z[a167_0x5e449e(0xfc)](),'orderColumn':z[a167_0x5e449e(0xfc)](),'groupingColumns':z[a167_0x5e449e(0xf2)](z[a167_0x5e449e(0xfc)]())[a167_0x5e449e(0xd7)]()})]);export const TimeWindowDefSchema=z[a167_0x5e449e(0xf1)]({'duration':z[a167_0x5e449e(0x122)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a167_0x5e449e(0x11f),'TimeWithinNext','TimeRange']);export const FilterColumnConditionDefSchema=z['object']({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x112)),'column':z[a167_0x5e449e(0xfc)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a167_0x5e449e(0xd7)]()})['superRefine']((_0xd41000,_0x3cfb13)=>{const _0x4c9864=a167_0x5e449e,_0x5c287b=_0xd41000[_0x4c9864(0x11e)][_0x4c9864(0xdc)];_0xd41000[_0x4c9864(0x11a)]===_0x4c9864(0x118)?!TIMESTAMP_OPERATORS[_0x4c9864(0xef)](_0x5c287b)&&_0x3cfb13[_0x4c9864(0xfd)]({'code':_0x4c9864(0xe6),'message':_0x4c9864(0xe3)+_0x5c287b+'\x27)','path':['operator',_0x4c9864(0xdc)]}):TIMESTAMP_OPERATORS[_0x4c9864(0xef)](_0x5c287b)&&_0x3cfb13[_0x4c9864(0xfd)]({'code':_0x4c9864(0xe6),'message':'Operator\x20\x27'+_0x5c287b+_0x4c9864(0x106),'path':[_0x4c9864(0x11e),_0x4c9864(0xdc)]});});export const FilterRuleDefSchema=z['object']({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x101)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a167_0x5e449e(0x114)](()=>z['object']({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x10c)),'attribute':z[a167_0x5e449e(0xfc)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a167_0x5e449e(0xd7)](),'exclude':z[a167_0x5e449e(0xeb)]()['optional'](),'aggregation':AggregationDefSchema[a167_0x5e449e(0xd7)](),'source':z[a167_0x5e449e(0xfc)]()[a167_0x5e449e(0xd7)](),'filter':FilterRuleDefSchema[a167_0x5e449e(0xd7)](),'limit':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a167_0x5e449e(0xf1)]({'type':z[a167_0x5e449e(0xcd)]('Behavior'),'attribute':z[a167_0x5e449e(0xfc)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a167_0x5e449e(0xd7)](),'exclude':z[a167_0x5e449e(0xeb)]()[a167_0x5e449e(0xd7)](),'aggregation':AggregationDefSchema[a167_0x5e449e(0xd7)](),'source':z['string']()[a167_0x5e449e(0xd7)](),'filter':FilterRuleDefSchema[a167_0x5e449e(0xd7)](),'timeWindow':TimeWindowDefSchema[a167_0x5e449e(0xd7)](),'limit':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)]()}));function a167_0x1d72(){const _0x38da27=['discriminatedUnion','Equal','TimeRange\x20operator\x20requires\x20\x27from\x27','Count','Regexp','\x27\x20requires\x20a\x20value','33BWCTmH','string','addIssue','Less','day','Operator\x20\x27','And','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','funnel_stage','unit','CountDistinct','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','segment','all','2176430fQfvSj','First','from','Value','year','\x27\x20requires\x20a\x20time\x20unit','any','Min','superRefine','Column','Segment\x20reference\x20must\x20not\x20be\x20empty','lazy','exclude','StartWith','duration','timestamp','269222qdZtSI','column','Composite','MISSING_BETWEEN_BOUNDS','Contain','operator','TimeWithinPast','TimeRange','LessEqual','number','Max','TimeRange\x20operator\x20requires\x20\x27duration\x27','hour','literal','18iLfMYq','228yFxwxR','union','81753Yeaytz','Between','batch','Greater','Last','TimeWithinNext','optional','include','2436910dIOrBy','4mXJKYD','1497252iSjjWo','type','9750376uIxCaH','Average','value','second','IsNull','enum','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','minute','month','custom','Sum','GreaterEqual','record','min','boolean','27HBnTEq','EndWith','max','has','week','object','array','realtime','729737OwLQTH'];a167_0x1d72=function(){return _0x38da27;};return a167_0x1d72();}export const ColumnConditionDefSchema=z[a167_0x5e449e(0xf1)]({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x112)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z['object']({'type':z['enum']([a167_0x5e449e(0x101),'Or',a167_0x5e449e(0x11b)]),'conditions':z[a167_0x5e449e(0xf2)](ConditionDefSchema),'description':z['string']()['optional'](),'expr':z['string']()['optional']()}));function a167_0xfd33(_0x55e042,_0x244d41){_0x55e042=_0x55e042-0xca;const _0x1d72db=a167_0x1d72();let _0xfd3343=_0x1d72db[_0x55e042];return _0xfd3343;}export const SegmentRefConditionDefSchema=z[a167_0x5e449e(0xf1)]({'type':z[a167_0x5e449e(0xe2)]([a167_0x5e449e(0xd8),a167_0x5e449e(0x115)]),'segment':z['string']()[a167_0x5e449e(0xea)](0x1,a167_0x5e449e(0x113))});export const ConditionDefSchema=z[a167_0x5e449e(0x114)](()=>z[a167_0x5e449e(0xd0)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a167_0x5e449e(0x114)](()=>z['object']({'type':z[a167_0x5e449e(0xe2)]([a167_0x5e449e(0x101),'Or',a167_0x5e449e(0x11b)]),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a167_0x5e449e(0xd7)](),'expr':z[a167_0x5e449e(0xfc)]()[a167_0x5e449e(0xd7)]()}));export const SegmentDefSchema=z['object']({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x107))['optional'](),'name':z[a167_0x5e449e(0xfc)]()[a167_0x5e449e(0xea)](0x1,'Segment\x20name\x20is\x20required'),'description':z['string']()['optional'](),'folder':z[a167_0x5e449e(0xfc)]()[a167_0x5e449e(0xd7)](),'rule':RuleDefSchema[a167_0x5e449e(0xd7)](),'kind':z[a167_0x5e449e(0xe2)]([a167_0x5e449e(0xd3),a167_0x5e449e(0xf3),a167_0x5e449e(0x103)])[a167_0x5e449e(0xd7)](),'visible':z[a167_0x5e449e(0xeb)]()[a167_0x5e449e(0xd7)](),'activations':z[a167_0x5e449e(0xf2)](z[a167_0x5e449e(0x10f)]())[a167_0x5e449e(0xd7)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a167_0x123457=a167_0x4330;(function(_0x54ccf4,_0x319c9a){const _0x438eb5=a167_0x4330,_0x2e7a32=_0x54ccf4();while(!![]){try{const _0x38e5e2=-parseInt(_0x438eb5(0x218))/0x1+parseInt(_0x438eb5(0x221))/0x2+-parseInt(_0x438eb5(0x22c))/0x3+parseInt(_0x438eb5(0x1f3))/0x4*(-parseInt(_0x438eb5(0x210))/0x5)+-parseInt(_0x438eb5(0x1f7))/0x6+-parseInt(_0x438eb5(0x20e))/0x7*(parseInt(_0x438eb5(0x22b))/0x8)+parseInt(_0x438eb5(0x1ef))/0x9*(parseInt(_0x438eb5(0x214))/0xa);if(_0x38e5e2===_0x319c9a)break;else _0x2e7a32['push'](_0x2e7a32['shift']());}catch(_0x127569){_0x2e7a32['push'](_0x2e7a32['shift']());}}}(a167_0xb07c,0x88173));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a167_0x123457(0x20a),a167_0x123457(0x21d),'Less',a167_0x123457(0x1ee),a167_0x123457(0x224),'In',a167_0x123457(0x1ff),a167_0x123457(0x220),'IsNull','TimeWithinPast',a167_0x123457(0x1f5),a167_0x123457(0x20c),'StartWith','EndWith',a167_0x123457(0x200)]);export const TimeUnitSchema=z['enum'](['second',a167_0x123457(0x22a),a167_0x123457(0x206),a167_0x123457(0x234),a167_0x123457(0x1ed),a167_0x123457(0x225),a167_0x123457(0x1ea)]);function a167_0xb07c(){const _0x593e47=['Max','realtime','Segment\x20name\x20is\x20required','Greater','custom','timestamp','Regexp','2093252bgeLQc','discriminatedUnion','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','LessEqual','month','MISSING_TIME_UNIT','superRefine','Count','And','minute','704232ltpSiB','902715yoUlDg','max','batch','Average','array','union','exclude','Behavior','day','any','min','CountDistinct','MISSING_BETWEEN_BOUNDS','lazy','segment','optional','from','year','number','StartWith','week','GreaterEqual','27750582PTfKpm','boolean','Last','TimeRange\x20operator\x20requires\x20\x27duration\x27','12dAeLfO','record','TimeWithinNext','addIssue','5791038eBJKlE','unit','literal','Less','funnel_stage','TimeWithinPast','value','EndWith','Between','TimeRange','Sum','type','Value','Operator\x20\x27','string','hour','\x27\x20requires\x20a\x20value','object','has','Equal','Segment\x20reference\x20must\x20not\x20be\x20empty','Contain','Min','63plVovQ','enum','1387495VBYrKX','First','\x27\x20requires\x20a\x20time\x20unit','Composite','10tLVDSQ','duration','Column','operator','681761stDCyG','include'];a167_0xb07c=function(){return _0x593e47;};return a167_0xb07c();}export const AggregationTypeSchema=z[a167_0x123457(0x20f)]([a167_0x123457(0x228),a167_0x123457(0x201),a167_0x123457(0x22f),'Min','Max','CountDistinct',a167_0x123457(0x211),a167_0x123457(0x1f1)]);const TemporalValueSchema=z[a167_0x123457(0x231)]([z[a167_0x123457(0x208)]({'timestamp':z[a167_0x123457(0x205)]()}),z['object']({'last':z[a167_0x123457(0x231)]([z[a167_0x123457(0x1eb)](),z[a167_0x123457(0x1f4)](z['string'](),z[a167_0x123457(0x1eb)]())]),'unit':z[a167_0x123457(0x205)]()})]),OperatorValueSchema=z[a167_0x123457(0x231)]([z[a167_0x123457(0x205)](),z[a167_0x123457(0x1eb)](),z[a167_0x123457(0x1f0)](),TemporalValueSchema,z['array'](z['union']([z[a167_0x123457(0x205)](),z[a167_0x123457(0x1eb)](),z[a167_0x123457(0x1f0)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a167_0x123457(0x20a),'Greater','GreaterEqual',a167_0x123457(0x1fa),a167_0x123457(0x224),'In',a167_0x123457(0x20c),a167_0x123457(0x1ec),a167_0x123457(0x1fe),'Regexp',a167_0x123457(0x1fc),a167_0x123457(0x1f5)]),OPERATORS_REQUIRING_UNIT=new Set([a167_0x123457(0x1fc),a167_0x123457(0x1f5)]);export const OperatorDefSchema=z[a167_0x123457(0x208)]({'type':OperatorTypeSchema,'not':z[a167_0x123457(0x1f0)]()[a167_0x123457(0x1e8)](),'value':OperatorValueSchema['optional'](),'min':z[a167_0x123457(0x231)]([z[a167_0x123457(0x1eb)](),z['string'](),TemporalValueSchema])[a167_0x123457(0x1e8)](),'max':z[a167_0x123457(0x231)]([z['number'](),z['string'](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema[a167_0x123457(0x1e8)](),'duration':z[a167_0x123457(0x208)]({'day':z['number']()[a167_0x123457(0x1e8)](),'week':z[a167_0x123457(0x1eb)]()[a167_0x123457(0x1e8)](),'month':z[a167_0x123457(0x1eb)]()[a167_0x123457(0x1e8)](),'year':z[a167_0x123457(0x1eb)]()['optional'](),'hour':z[a167_0x123457(0x1eb)]()[a167_0x123457(0x1e8)](),'minute':z[a167_0x123457(0x1eb)]()[a167_0x123457(0x1e8)](),'second':z[a167_0x123457(0x1eb)]()[a167_0x123457(0x1e8)]()})[a167_0x123457(0x1e8)](),'from':z[a167_0x123457(0x208)]({'last':z[a167_0x123457(0x231)]([z['number'](),z[a167_0x123457(0x205)]()]),'unit':TimeUnitSchema})[a167_0x123457(0x1e8)](),'reverse':z[a167_0x123457(0x1f0)]()[a167_0x123457(0x1e8)]()})['superRefine']((_0x25aa80,_0x206c9b)=>{const _0x2d478c=a167_0x123457;OPERATORS_REQUIRING_VALUE['has'](_0x25aa80[_0x2d478c(0x202)])&&(_0x25aa80[_0x2d478c(0x1fd)]===undefined||_0x25aa80[_0x2d478c(0x1fd)]===null)&&_0x206c9b[_0x2d478c(0x1f6)]({'code':'custom','message':_0x2d478c(0x204)+_0x25aa80[_0x2d478c(0x202)]+_0x2d478c(0x207),'path':[_0x2d478c(0x1fd)]}),_0x25aa80['type']===_0x2d478c(0x1ff)&&_0x25aa80[_0x2d478c(0x236)]===undefined&&_0x25aa80[_0x2d478c(0x22d)]===undefined&&_0x206c9b['addIssue']({'code':_0x2d478c(0x21e),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x2d478c(0x1e5)}}),OPERATORS_REQUIRING_UNIT['has'](_0x25aa80[_0x2d478c(0x202)])&&_0x25aa80[_0x2d478c(0x1fd)]!==undefined&&!_0x25aa80[_0x2d478c(0x1f8)]&&_0x206c9b[_0x2d478c(0x1f6)]({'code':'custom','message':_0x2d478c(0x204)+_0x25aa80[_0x2d478c(0x202)]+_0x2d478c(0x212),'path':[_0x2d478c(0x1f8)],'params':{'validationCode':_0x2d478c(0x226)}}),_0x25aa80[_0x2d478c(0x202)]===_0x2d478c(0x200)&&(!_0x25aa80[_0x2d478c(0x215)]&&_0x206c9b[_0x2d478c(0x1f6)]({'code':_0x2d478c(0x21e),'message':_0x2d478c(0x1f2),'path':[_0x2d478c(0x215)]}),!_0x25aa80[_0x2d478c(0x1e9)]&&_0x206c9b[_0x2d478c(0x1f6)]({'code':'custom','message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x2d478c(0x1e9)]}));});export const ArrayMatchingSchema=z[a167_0x123457(0x231)]([z[a167_0x123457(0x1f9)](a167_0x123457(0x235)),z[a167_0x123457(0x1f9)]('all'),z[a167_0x123457(0x208)]({'atLeast':z[a167_0x123457(0x1eb)]()}),z[a167_0x123457(0x208)]({'atMost':z[a167_0x123457(0x1eb)]()}),z['object']({'exactly':z[a167_0x123457(0x1eb)]()})]);export const AggregationDefSchema=z[a167_0x123457(0x222)](a167_0x123457(0x202),[z[a167_0x123457(0x208)]({'type':z[a167_0x123457(0x20f)]([a167_0x123457(0x201),a167_0x123457(0x20d),a167_0x123457(0x21a),a167_0x123457(0x22f)]),'column':z['string'](),'groupingColumns':z[a167_0x123457(0x230)](z['string']())[a167_0x123457(0x1e8)]()}),z[a167_0x123457(0x208)]({'type':z[a167_0x123457(0x1f9)](a167_0x123457(0x228)),'groupingColumns':z[a167_0x123457(0x230)](z[a167_0x123457(0x205)]())[a167_0x123457(0x1e8)]()}),z[a167_0x123457(0x208)]({'type':z[a167_0x123457(0x1f9)](a167_0x123457(0x1e4)),'columns':z[a167_0x123457(0x230)](z[a167_0x123457(0x205)]())}),z[a167_0x123457(0x208)]({'type':z[a167_0x123457(0x20f)]([a167_0x123457(0x211),'Last']),'column':z['string'](),'orderColumn':z[a167_0x123457(0x205)](),'groupingColumns':z[a167_0x123457(0x230)](z['string']())[a167_0x123457(0x1e8)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a167_0x123457(0x1eb)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a167_0x123457(0x1fc),'TimeWithinNext',a167_0x123457(0x200)]);export const FilterColumnConditionDefSchema=z[a167_0x123457(0x208)]({'type':z[a167_0x123457(0x1f9)](a167_0x123457(0x216)),'column':z[a167_0x123457(0x205)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a167_0x123457(0x1e8)]()})[a167_0x123457(0x227)]((_0x4c1523,_0x391666)=>{const _0x5a5eb5=a167_0x123457,_0x9004fe=_0x4c1523[_0x5a5eb5(0x217)][_0x5a5eb5(0x202)];_0x4c1523['column']===_0x5a5eb5(0x21f)?!TIMESTAMP_OPERATORS[_0x5a5eb5(0x209)](_0x9004fe)&&_0x391666[_0x5a5eb5(0x1f6)]({'code':'custom','message':_0x5a5eb5(0x223)+_0x9004fe+'\x27)','path':['operator',_0x5a5eb5(0x202)]}):TIMESTAMP_OPERATORS[_0x5a5eb5(0x209)](_0x9004fe)&&_0x391666['addIssue']({'code':_0x5a5eb5(0x21e),'message':_0x5a5eb5(0x204)+_0x9004fe+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x5a5eb5(0x217),'type']});});export const FilterRuleDefSchema=z['object']({'type':z['literal'](a167_0x123457(0x229)),'conditions':z[a167_0x123457(0x230)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a167_0x123457(0x1e6)](()=>z['object']({'type':z['literal'](a167_0x123457(0x203)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a167_0x123457(0x1e8)](),'exclude':z['boolean']()[a167_0x123457(0x1e8)](),'aggregation':AggregationDefSchema[a167_0x123457(0x1e8)](),'source':z[a167_0x123457(0x205)]()[a167_0x123457(0x1e8)](),'filter':FilterRuleDefSchema[a167_0x123457(0x1e8)](),'limit':z['number']()[a167_0x123457(0x1e8)]()}));export const BehaviorConditionDefSchema=z[a167_0x123457(0x1e6)](()=>z[a167_0x123457(0x208)]({'type':z[a167_0x123457(0x1f9)](a167_0x123457(0x233)),'attribute':z[a167_0x123457(0x205)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a167_0x123457(0x1f0)]()[a167_0x123457(0x1e8)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a167_0x123457(0x205)]()[a167_0x123457(0x1e8)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a167_0x123457(0x1e8)](),'limit':z[a167_0x123457(0x1eb)]()[a167_0x123457(0x1e8)]()}));export const ColumnConditionDefSchema=z[a167_0x123457(0x208)]({'type':z['literal'](a167_0x123457(0x216)),'column':z[a167_0x123457(0x205)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a167_0x123457(0x1e6)](()=>z[a167_0x123457(0x208)]({'type':z[a167_0x123457(0x20f)]([a167_0x123457(0x229),'Or',a167_0x123457(0x213)]),'conditions':z[a167_0x123457(0x230)](ConditionDefSchema),'description':z[a167_0x123457(0x205)]()['optional'](),'expr':z[a167_0x123457(0x205)]()['optional']()}));function a167_0x4330(_0x2814d3,_0x121274){_0x2814d3=_0x2814d3-0x1e4;const _0xb07c44=a167_0xb07c();let _0x433068=_0xb07c44[_0x2814d3];return _0x433068;}export const SegmentRefConditionDefSchema=z['object']({'type':z[a167_0x123457(0x20f)]([a167_0x123457(0x219),a167_0x123457(0x232)]),'segment':z['string']()[a167_0x123457(0x236)](0x1,a167_0x123457(0x20b))});export const ConditionDefSchema=z[a167_0x123457(0x1e6)](()=>z[a167_0x123457(0x231)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a167_0x123457(0x1e6)](()=>z[a167_0x123457(0x208)]({'type':z[a167_0x123457(0x20f)]([a167_0x123457(0x229),'Or',a167_0x123457(0x213)]),'conditions':z['array'](ConditionDefSchema),'description':z[a167_0x123457(0x205)]()[a167_0x123457(0x1e8)](),'expr':z[a167_0x123457(0x205)]()['optional']()}));export const SegmentDefSchema=z[a167_0x123457(0x208)]({'type':z[a167_0x123457(0x1f9)](a167_0x123457(0x1e7))[a167_0x123457(0x1e8)](),'name':z[a167_0x123457(0x205)]()['min'](0x1,a167_0x123457(0x21c)),'description':z[a167_0x123457(0x205)]()[a167_0x123457(0x1e8)](),'folder':z[a167_0x123457(0x205)]()[a167_0x123457(0x1e8)](),'rule':RuleDefSchema[a167_0x123457(0x1e8)](),'kind':z[a167_0x123457(0x20f)]([a167_0x123457(0x22e),a167_0x123457(0x21b),a167_0x123457(0x1fb)])[a167_0x123457(0x1e8)](),'visible':z['boolean']()[a167_0x123457(0x1e8)](),'activations':z[a167_0x123457(0x230)](z['any']())[a167_0x123457(0x1e8)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a168_0x4f5ac6=a168_0x3ac1;(function(_0x3e6ae3,_0x1f2004){const _0x399f8c=a168_0x3ac1,_0x28a523=_0x3e6ae3();while(!![]){try{const _0x262d5b=-parseInt(_0x399f8c(0x138))/0x1*(parseInt(_0x399f8c(0x14c))/0x2)+-parseInt(_0x399f8c(0x13d))/0x3+parseInt(_0x399f8c(0x134))/0x4+-parseInt(_0x399f8c(0x136))/0x5*(-parseInt(_0x399f8c(0x144))/0x6)+-parseInt(_0x399f8c(0x139))/0x7*(parseInt(_0x399f8c(0x14e))/0x8)+-parseInt(_0x399f8c(0x137))/0x9+-parseInt(_0x399f8c(0x147))/0xa*(parseInt(_0x399f8c(0x14f))/0xb);if(_0x262d5b===_0x1f2004)break;else _0x28a523['push'](_0x28a523['shift']());}catch(_0x764673){_0x28a523['push'](_0x28a523['shift']());}}}(a168_0x30c7,0x57aab));import{readFileSync}from'fs';import*as a168_0x2617d9 from'path';import*as a168_0x1bb857 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';function a168_0x30c7(){const _0x3f409d=['result','segment','10EBUjdz','push','basename','journey','campaign','2ELSjWU','error','498872kEDbtL','3704437uUwKfw','message','object','not\x20a\x20','warnings','filterType','relative','2067996cBEYgB','has','3464115SMccHh','464994lYJWSV','122777vdeYog','21xYmIiu','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','email','template','457356lAWYco','utf-8','type','skipped','toJSON','YAML_PARSE_ERROR','map','6hMBZGE'];a168_0x30c7=function(){return _0x3f409d;};return a168_0x30c7();}const VALID_CAMPAIGN_TYPES=new Set([a168_0x4f5ac6(0x13b),a168_0x4f5ac6(0x148)]);export function isJourneyDef(_0x1a478d){const _0x3f5ec5=a168_0x4f5ac6;return typeof _0x1a478d===_0x3f5ec5(0x151)&&_0x1a478d!==null&&_0x3f5ec5(0x13f)in _0x1a478d&&_0x1a478d['type']==='journey';}export function isCampaignDef(_0x30fd3a){const _0x1f1dc5=a168_0x4f5ac6;if(typeof _0x30fd3a!==_0x1f1dc5(0x151)||_0x30fd3a===null)return![];const _0x2fc623=_0x30fd3a,_0x11c010=VALID_CAMPAIGN_TYPES[_0x1f1dc5(0x135)](_0x2fc623['campaign_type']);if(_0x2fc623['type']===_0x1f1dc5(0x14b)&&_0x11c010)return!![];if(_0x11c010&&!_0x2fc623[_0x1f1dc5(0x13f)])return!![];return![];}function a168_0x3ac1(_0x4cbdc0,_0x7770b2){_0x4cbdc0=_0x4cbdc0-0x134;const _0x30c73f=a168_0x30c7();let _0x3ac1b2=_0x30c73f[_0x4cbdc0];return _0x3ac1b2;}export function isTemplateDef(_0x1f220d){const _0x3f297a=a168_0x4f5ac6;return typeof _0x1f220d==='object'&&_0x1f220d!==null&&_0x3f297a(0x13f)in _0x1f220d&&_0x1f220d[_0x3f297a(0x13f)]===_0x3f297a(0x13c);}export function isValidationResult(_0x4721a4){const _0x3d1b42=a168_0x4f5ac6;return!(_0x3d1b42(0x140)in _0x4721a4);}export function createParseErrorResult(_0x47d868,_0x2f3c3a,_0xbc86a1,_0xa615f5,_0xcd03dd=a168_0x4f5ac6(0x146)){const _0x10ac3e=a168_0x4f5ac6;return{'filePath':_0x47d868,'relativePath':_0x2f3c3a,'source':_0xbc86a1,'result':{'valid':![],'errors':[{'level':_0x10ac3e(0x14d),'path':'','code':_0x10ac3e(0x142),'message':_0xa615f5}],'warnings':[]},'fileType':_0xcd03dd};}export function validateYamlFile(_0x2b11b5,_0x443c20,_0x371334={}){const _0x384519=a168_0x4f5ac6,_0x39a073=a168_0x2617d9[_0x384519(0x155)](_0x443c20,_0x2b11b5)||a168_0x2617d9[_0x384519(0x149)](_0x2b11b5);try{const _0x126504=readFileSync(_0x2b11b5,_0x384519(0x13e)),_0x52400b=a168_0x1bb857['parseDocument'](_0x126504),_0x14f62a=_0x52400b[_0x384519(0x141)]();if(!_0x14f62a)return createParseErrorResult(_0x2b11b5,_0x39a073,_0x126504,_0x384519(0x13a));let _0x4ba1b4;if(isJourneyDef(_0x14f62a))_0x4ba1b4=_0x384519(0x14a);else{if(isCampaignDef(_0x14f62a))_0x4ba1b4='campaign';else isTemplateDef(_0x14f62a)?_0x4ba1b4='template':_0x4ba1b4=_0x384519(0x146);}if(_0x371334[_0x384519(0x154)]&&_0x4ba1b4!==_0x371334[_0x384519(0x154)])return{'filePath':_0x2b11b5,'relativePath':_0x39a073,'skipped':!![],'reason':_0x384519(0x152)+_0x371334[_0x384519(0x154)]};const _0x2b793b={'source':_0x126504,'document':_0x52400b};let _0xa5a9e4;if(_0x4ba1b4===_0x384519(0x14a))_0xa5a9e4=validateJourneyDef(_0x14f62a,_0x2b793b);else{if(_0x4ba1b4===_0x384519(0x14b))_0xa5a9e4=validateCampaignDef(_0x14f62a,_0x2b793b);else _0x4ba1b4===_0x384519(0x13c)?_0xa5a9e4=validateTemplateDef(_0x14f62a,_0x2b793b):_0xa5a9e4=validateSegmentDef(_0x14f62a,_0x2b793b);}return{'filePath':_0x2b11b5,'relativePath':_0x39a073,'source':_0x126504,'result':_0xa5a9e4,'fileType':_0x4ba1b4};}catch(_0x31e70d){const _0x4d607a=_0x31e70d instanceof Error?_0x31e70d[_0x384519(0x150)]:String(_0x31e70d);return createParseErrorResult(_0x2b11b5,_0x39a073,'','YAML\x20parse\x20error:\x20'+_0x4d607a);}}export function validateYamlFiles(_0x4d7858,_0x3d19f8,_0x159397={}){const _0x32fba9=a168_0x4f5ac6;return _0x4d7858[_0x32fba9(0x143)](_0x28c51b=>validateYamlFile(_0x28c51b,_0x3d19f8,_0x159397));}export function calculateSummary(_0x3952cb){const _0x315fc6=a168_0x4f5ac6;let _0x3fb830=0x0,_0x52a879=0x0,_0x4f2129=0x0,_0x4e4959=0x0;for(const _0x5d3524 of _0x3952cb){if(!isValidationResult(_0x5d3524)){_0x4e4959++;continue;}_0x5d3524[_0x315fc6(0x145)]['valid']?_0x3fb830++:_0x52a879++,_0x4f2129+=_0x5d3524[_0x315fc6(0x145)][_0x315fc6(0x153)]['length'];}return{'validCount':_0x3fb830,'invalidCount':_0x52a879,'warningCount':_0x4f2129,'skippedCount':_0x4e4959,'hasErrors':_0x52a879>0x0};}
1
+ const a168_0x30dd6b=a168_0x26c5;(function(_0x3e944a,_0x208962){const _0x37dc39=a168_0x26c5,_0x5ddf1d=_0x3e944a();while(!![]){try{const _0x3a78d4=parseInt(_0x37dc39(0x1a6))/0x1+-parseInt(_0x37dc39(0x19a))/0x2+-parseInt(_0x37dc39(0x198))/0x3+parseInt(_0x37dc39(0x1b1))/0x4*(-parseInt(_0x37dc39(0x19f))/0x5)+-parseInt(_0x37dc39(0x1b0))/0x6*(-parseInt(_0x37dc39(0x1af))/0x7)+parseInt(_0x37dc39(0x194))/0x8*(-parseInt(_0x37dc39(0x19e))/0x9)+parseInt(_0x37dc39(0x1a1))/0xa*(parseInt(_0x37dc39(0x1b4))/0xb);if(_0x3a78d4===_0x208962)break;else _0x5ddf1d['push'](_0x5ddf1d['shift']());}catch(_0x5e1686){_0x5ddf1d['push'](_0x5ddf1d['shift']());}}}(a168_0x2e7a,0xe3eb8));import{readFileSync}from'fs';import*as a168_0x2f760a from'path';import*as a168_0x254cfb from'yaml';function a168_0x26c5(_0x3dce41,_0x56bac0){_0x3dce41=_0x3dce41-0x194;const _0x2e7a0f=a168_0x2e7a();let _0x26c55e=_0x2e7a0f[_0x3dce41];return _0x26c55e;}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';const VALID_CAMPAIGN_TYPES=new Set([a168_0x30dd6b(0x1a0),a168_0x30dd6b(0x1a4)]);export function isJourneyDef(_0x5d5fa9){const _0x53dbb1=a168_0x30dd6b;return typeof _0x5d5fa9===_0x53dbb1(0x1ae)&&_0x5d5fa9!==null&&_0x53dbb1(0x19b)in _0x5d5fa9&&_0x5d5fa9['type']===_0x53dbb1(0x196);}export function isCampaignDef(_0x2a57bb){const _0x2596de=a168_0x30dd6b;if(typeof _0x2a57bb!==_0x2596de(0x1ae)||_0x2a57bb===null)return![];const _0x50ef5b=_0x2a57bb,_0xb2f9a1=VALID_CAMPAIGN_TYPES[_0x2596de(0x197)](_0x50ef5b[_0x2596de(0x1ac)]);if(_0x50ef5b[_0x2596de(0x19b)]==='campaign'&&_0xb2f9a1)return!![];if(_0xb2f9a1&&!_0x50ef5b[_0x2596de(0x19b)])return!![];return![];}export function isTemplateDef(_0x40d426){const _0x20e8fa=a168_0x30dd6b;return typeof _0x40d426===_0x20e8fa(0x1ae)&&_0x40d426!==null&&_0x20e8fa(0x19b)in _0x40d426&&_0x40d426[_0x20e8fa(0x19b)]===_0x20e8fa(0x1a7);}export function isValidationResult(_0x365a6e){const _0x337ffb=a168_0x30dd6b;return!(_0x337ffb(0x1b3)in _0x365a6e);}export function createParseErrorResult(_0x5237e1,_0x2d1a22,_0x5194a3,_0x217079,_0x8f2fcc=a168_0x30dd6b(0x1b7)){const _0x4b519d=a168_0x30dd6b;return{'filePath':_0x5237e1,'relativePath':_0x2d1a22,'source':_0x5194a3,'result':{'valid':![],'errors':[{'level':_0x4b519d(0x1ab),'path':'','code':_0x4b519d(0x199),'message':_0x217079}],'warnings':[]},'fileType':_0x8f2fcc};}function a168_0x2e7a(){const _0x400878=['1179GTgaGM','984265RBCnBq','email','5020TxBcOJ','length','map','push','not\x20a\x20','1424237uWvnqC','template','relative','result','toJSON','error','campaign_type','filterType','object','2086kOqEbv','31308GKmxUI','4xwIFMk','YAML\x20parse\x20error:\x20','skipped','21186qoocgO','campaign','basename','segment','51056WmtWJP','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','journey','has','1565871bZpEwi','YAML_PARSE_ERROR','2915282gsYmGA','type','message','utf-8'];a168_0x2e7a=function(){return _0x400878;};return a168_0x2e7a();}export function validateYamlFile(_0x24fe14,_0x159a0c,_0x4a5101={}){const _0x360056=a168_0x30dd6b,_0x2ce4f4=a168_0x2f760a[_0x360056(0x1a8)](_0x159a0c,_0x24fe14)||a168_0x2f760a[_0x360056(0x1b6)](_0x24fe14);try{const _0x570782=readFileSync(_0x24fe14,_0x360056(0x19d)),_0x4b4834=a168_0x254cfb['parseDocument'](_0x570782),_0x51dd16=_0x4b4834[_0x360056(0x1aa)]();if(!_0x51dd16)return createParseErrorResult(_0x24fe14,_0x2ce4f4,_0x570782,_0x360056(0x195));let _0x138134;if(isJourneyDef(_0x51dd16))_0x138134=_0x360056(0x196);else{if(isCampaignDef(_0x51dd16))_0x138134=_0x360056(0x1b5);else isTemplateDef(_0x51dd16)?_0x138134='template':_0x138134='segment';}if(_0x4a5101[_0x360056(0x1ad)]&&_0x138134!==_0x4a5101[_0x360056(0x1ad)])return{'filePath':_0x24fe14,'relativePath':_0x2ce4f4,'skipped':!![],'reason':_0x360056(0x1a5)+_0x4a5101[_0x360056(0x1ad)]};const _0x37dba9={'source':_0x570782,'document':_0x4b4834};let _0x418832;if(_0x138134==='journey')_0x418832=validateJourneyDef(_0x51dd16,_0x37dba9);else{if(_0x138134==='campaign')_0x418832=validateCampaignDef(_0x51dd16,_0x37dba9);else _0x138134===_0x360056(0x1a7)?_0x418832=validateTemplateDef(_0x51dd16,_0x37dba9):_0x418832=validateSegmentDef(_0x51dd16,_0x37dba9);}return{'filePath':_0x24fe14,'relativePath':_0x2ce4f4,'source':_0x570782,'result':_0x418832,'fileType':_0x138134};}catch(_0x51057a){const _0x1bcd96=_0x51057a instanceof Error?_0x51057a[_0x360056(0x19c)]:String(_0x51057a);return createParseErrorResult(_0x24fe14,_0x2ce4f4,'',_0x360056(0x1b2)+_0x1bcd96);}}export function validateYamlFiles(_0x388d02,_0x24cfcf,_0x1d4208={}){const _0x2ee7be=a168_0x30dd6b;return _0x388d02[_0x2ee7be(0x1a3)](_0x50f79b=>validateYamlFile(_0x50f79b,_0x24cfcf,_0x1d4208));}export function calculateSummary(_0x44e45a){const _0x1bc6c5=a168_0x30dd6b;let _0x18da25=0x0,_0x190f9d=0x0,_0x3f44f8=0x0,_0x1c2e76=0x0;for(const _0x5de27f of _0x44e45a){if(!isValidationResult(_0x5de27f)){_0x1c2e76++;continue;}_0x5de27f[_0x1bc6c5(0x1a9)]['valid']?_0x18da25++:_0x190f9d++,_0x3f44f8+=_0x5de27f['result']['warnings'][_0x1bc6c5(0x1a2)];}return{'validCount':_0x18da25,'invalidCount':_0x190f9d,'warningCount':_0x3f44f8,'skippedCount':_0x1c2e76,'hasErrors':_0x190f9d>0x0};}
@@ -1 +1 @@
1
- (function(_0xb9b5d3,_0x4c4c20){const _0xcd20e2=a169_0x822b,_0x4df1ea=_0xb9b5d3();while(!![]){try{const _0x3d20c8=-parseInt(_0xcd20e2(0x9b))/0x1*(parseInt(_0xcd20e2(0x8b))/0x2)+-parseInt(_0xcd20e2(0x88))/0x3+-parseInt(_0xcd20e2(0x7d))/0x4+parseInt(_0xcd20e2(0x82))/0x5+-parseInt(_0xcd20e2(0x84))/0x6*(-parseInt(_0xcd20e2(0x79))/0x7)+-parseInt(_0xcd20e2(0x98))/0x8+parseInt(_0xcd20e2(0x8a))/0x9;if(_0x3d20c8===_0x4c4c20)break;else _0x4df1ea['push'](_0x4df1ea['shift']());}catch(_0x4ae412){_0x4df1ea['push'](_0x4df1ea['shift']());}}}(a169_0x39ee,0x52378));import*as a169_0x23231e from'yaml';import a169_0x3a0a35 from'chalk';function a169_0x39ee(){const _0x53da25=['yellow','YAML\x20validation\x20error\x20at\x20\x27','data','code','2219765SHIaey','issues','449724ptNNCs','error','toString','errors','1516305zHAbaQ','push','9557793MJIxWY','2McNGef','parse','pop','safeParse','\x20|\x20','map','cyan','padStart','level','getIn','join','dim','contents','196168ufxyQy','warnings','max','587173wzXwYn','invalid_union','repeat','split','success','object','range','flatMap','length','location','path','YAML\x20validation\x20error:\x20','message','42uHfHfc','Invalid\x20YAML:\x20expected\x20an\x20object','number','column','2007060SITIBs'];a169_0x39ee=function(){return _0x53da25;};return a169_0x39ee();}export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0xd274f0,_0x40d1b4,_0xf3501c){const _0x5450d3=a169_0x822b;if(!_0xd274f0||!_0x40d1b4)return undefined;try{let _0x3fb65f=_0xd274f0[_0x5450d3(0x94)](_0xf3501c,!![]),_0x3fc909=[..._0xf3501c];while((!_0x3fb65f||typeof _0x3fb65f!==_0x5450d3(0x71)||!(_0x5450d3(0x72)in _0x3fb65f)||!_0x3fb65f[_0x5450d3(0x72)])&&_0x3fc909[_0x5450d3(0x74)]>0x0){_0x3fc909[_0x5450d3(0x8d)](),_0x3fb65f=_0x3fc909[_0x5450d3(0x74)]>0x0?_0xd274f0[_0x5450d3(0x94)](_0x3fc909,!![]):_0xd274f0[_0x5450d3(0x97)];}if(!_0x3fb65f||typeof _0x3fb65f!==_0x5450d3(0x71)||!('range'in _0x3fb65f)||!_0x3fb65f[_0x5450d3(0x72)])return undefined;const [_0x5ea31b]=_0x3fb65f[_0x5450d3(0x72)];return offsetToLocation(_0x40d1b4,_0x5ea31b);}catch{return undefined;}}export function offsetToLocation(_0x1ae636,_0x25c981){let _0x2faeb1=0x1,_0x1eebda=0x1;for(let _0x250a51=0x0;_0x250a51<_0x25c981&&_0x250a51<_0x1ae636['length'];_0x250a51++){_0x1ae636[_0x250a51]==='\x0a'?(_0x2faeb1++,_0x1eebda=0x1):_0x1eebda++;}return{'line':_0x2faeb1,'column':_0x1eebda,'offset':_0x25c981};}function a169_0x822b(_0xfca53f,_0x270fe8){_0xfca53f=_0xfca53f-0x6e;const _0x39eea4=a169_0x39ee();let _0x822b8=_0x39eea4[_0xfca53f];return _0x822b8;}export function pathToArray(_0x156682){const _0x750ef6=a169_0x822b;if(!_0x156682)return[];return _0x156682['split']('.')[_0x750ef6(0x73)](_0xd1286f=>{const _0x43fe58=_0xd1286f['match'](/^(\w+)\[(\d+)\]$/);if(_0x43fe58)return[_0x43fe58[0x1],parseInt(_0x43fe58[0x2],0xa)];return[_0xd1286f];});}export function formatZodPath(_0x2c6bf5){const _0x4097e2=a169_0x822b;let _0x1f9305='';for(const _0x4a22a5 of _0x2c6bf5){if(typeof _0x4a22a5===_0x4097e2(0x7b))_0x1f9305+='['+_0x4a22a5+']';else{const _0x3ba5bd=String(_0x4a22a5);_0x1f9305+=_0x1f9305?'.'+_0x3ba5bd:_0x3ba5bd;}}return _0x1f9305;}export function flattenZodIssues(_0x2c1a2c){const _0x5e3335=a169_0x822b,_0x4fd86a=[];for(const _0x377f09 of _0x2c1a2c){if(_0x377f09[_0x5e3335(0x81)]===_0x5e3335(0x9c)&&_0x5e3335(0x87)in _0x377f09){const _0x1c4cee=_0x377f09[_0x5e3335(0x87)];let _0x50c82f=_0x1c4cee[0x0]||[];for(const _0x23b6ea of _0x1c4cee){_0x23b6ea[_0x5e3335(0x74)]<_0x50c82f['length']&&(_0x50c82f=_0x23b6ea);}const _0x419f7c=_0x50c82f[_0x5e3335(0x90)](_0x25c799=>({..._0x25c799,'path':[..._0x377f09['path'],..._0x25c799[_0x5e3335(0x76)]]}));_0x4fd86a['push'](...flattenZodIssues(_0x419f7c));}else _0x4fd86a['push'](_0x377f09);}return _0x4fd86a;}export function safeParseYaml(_0x3bd434,_0x398062){const _0x1d4736=a169_0x822b,_0x138641=a169_0x23231e[_0x1d4736(0x8c)](_0x3bd434);if(!_0x138641||typeof _0x138641!==_0x1d4736(0x71))throw new Error(_0x1d4736(0x7a));const _0x4fac08=_0x398062[_0x1d4736(0x8e)](_0x138641);if(!_0x4fac08[_0x1d4736(0x70)]){const _0x1964f7=_0x4fac08[_0x1d4736(0x85)][_0x1d4736(0x83)][0x0],_0x3a5216=formatZodPath(_0x1964f7[_0x1d4736(0x76)]);throw new Error(_0x3a5216?_0x1d4736(0x7f)+_0x3a5216+'\x27:\x20'+_0x1964f7[_0x1d4736(0x78)]:_0x1d4736(0x77)+_0x1964f7[_0x1d4736(0x78)]);}return _0x4fac08[_0x1d4736(0x80)];}export function formatIssueWithContext(_0x28d882,_0x523af6,_0x5bd254){const _0x238324=a169_0x822b,_0x268571=[],_0x30a665=_0x28d882[_0x238324(0x93)]===_0x238324(0x85),_0x46528e=_0x30a665?a169_0x3a0a35['red']:a169_0x3a0a35['yellow'],_0x527f91=_0x30a665?a169_0x3a0a35['red']:a169_0x3a0a35[_0x238324(0x7e)],_0x23b557=_0x5bd254?a169_0x3a0a35[_0x238324(0x91)](_0x5bd254+':'):'';if(_0x28d882[_0x238324(0x75)]){const _0x333e8a=a169_0x3a0a35[_0x238324(0x91)](_0x28d882['location']['line']+':'+_0x28d882[_0x238324(0x75)][_0x238324(0x7c)]);_0x268571['push'](''+_0x23b557+_0x333e8a+':\x20'+_0x46528e(_0x28d882[_0x238324(0x93)])+'\x20'+_0x527f91('['+_0x28d882['code']+']'));}else _0x268571['push'](''+_0x23b557+a169_0x3a0a35['dim'](_0x28d882['path'])+':\x20'+_0x46528e(_0x28d882[_0x238324(0x93)])+'\x20'+_0x527f91('['+_0x28d882[_0x238324(0x81)]+']'));_0x268571[_0x238324(0x89)](_0x28d882[_0x238324(0x78)]);if(_0x28d882[_0x238324(0x75)]&&_0x523af6){const _0x1002ad=_0x523af6[_0x238324(0x6f)]('\x0a'),{line:_0x476111,column:_0x52acfd}=_0x28d882[_0x238324(0x75)],_0x154082=Math[_0x238324(0x9a)](0x1,_0x476111-0x1),_0x2e8b8d=Math['min'](_0x1002ad[_0x238324(0x74)],_0x476111+0x1);_0x268571[_0x238324(0x89)]('');for(let _0x1e2fa2=_0x154082;_0x1e2fa2<=_0x2e8b8d;_0x1e2fa2++){const _0x16f3b1=_0x1002ad[_0x1e2fa2-0x1]||'',_0x2b8740=a169_0x3a0a35[_0x238324(0x96)](_0x1e2fa2[_0x238324(0x86)]()[_0x238324(0x92)](0x4)),_0x1bb66b=a169_0x3a0a35[_0x238324(0x96)](_0x238324(0x8f));if(_0x1e2fa2===_0x476111){_0x268571[_0x238324(0x89)]('\x20\x20'+_0x2b8740+_0x1bb66b+_0x46528e(_0x16f3b1));const _0x2c2284='\x20'[_0x238324(0x6e)](0x4+0x3+_0x52acfd-0x1);_0x268571[_0x238324(0x89)]('\x20\x20'+_0x2c2284+_0x46528e('^'));}else _0x268571['push']('\x20\x20'+_0x2b8740+_0x1bb66b+a169_0x3a0a35['dim'](_0x16f3b1));}}return _0x268571[_0x238324(0x95)]('\x0a');}export function formatValidationResult(_0x4eda8d,_0x140126,_0x12d2b4){const _0x463dd4=a169_0x822b,_0x2fea0d=[];for(const _0x125d32 of _0x4eda8d[_0x463dd4(0x87)]){_0x2fea0d[_0x463dd4(0x89)](formatIssueWithContext(_0x125d32,_0x140126,_0x12d2b4)),_0x2fea0d[_0x463dd4(0x89)]('');}for(const _0x10749a of _0x4eda8d[_0x463dd4(0x99)]){_0x2fea0d[_0x463dd4(0x89)](formatIssueWithContext(_0x10749a,_0x140126,_0x12d2b4)),_0x2fea0d['push']('');}return _0x2fea0d[_0x463dd4(0x95)]('\x0a');}
1
+ function a169_0x5ddb(){const _0x318fde=['length','12zxjbwE','push','2728148sphPmw','range','3403420oFTFar','red','3136456kkqjkB','safeParse','level','data','column','map','parse','5KqMcfC','error','907558psnWsj','flatMap','join','code','\x20|\x20','pop','37482bzUWMa','getIn','issues','number','\x27:\x20','object','YAML\x20validation\x20error\x20at\x20\x27','toString','repeat','1670622iyctao','location','1057ChKJuO','yellow','14281927cpWNPM','36FJGIRF','min','path','dim','contents','warnings','split','cyan','success','3RtHGku','message'];a169_0x5ddb=function(){return _0x318fde;};return a169_0x5ddb();}(function(_0x3324f1,_0x4baa8a){const _0x2b9b5e=a169_0x2b46,_0x122c7b=_0x3324f1();while(!![]){try{const _0x1f6bc6=parseInt(_0x2b9b5e(0x1ed))/0x1*(parseInt(_0x2b9b5e(0x1ff))/0x2)+-parseInt(_0x2b9b5e(0x1df))/0x3+-parseInt(_0x2b9b5e(0x1f2))/0x4*(parseInt(_0x2b9b5e(0x1fd))/0x5)+parseInt(_0x2b9b5e(0x205))/0x6*(parseInt(_0x2b9b5e(0x1e1))/0x7)+-parseInt(_0x2b9b5e(0x1f6))/0x8+-parseInt(_0x2b9b5e(0x1e4))/0x9*(-parseInt(_0x2b9b5e(0x1f4))/0xa)+-parseInt(_0x2b9b5e(0x1e3))/0xb*(parseInt(_0x2b9b5e(0x1f0))/0xc);if(_0x1f6bc6===_0x4baa8a)break;else _0x122c7b['push'](_0x122c7b['shift']());}catch(_0x2ead16){_0x122c7b['push'](_0x122c7b['shift']());}}}(a169_0x5ddb,0xb3da5));import*as a169_0x403c67 from'yaml';import a169_0x330c85 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x221918,_0x1cf1e8,_0x26027e){const _0x149d3e=a169_0x2b46;if(!_0x221918||!_0x1cf1e8)return undefined;try{let _0x29b936=_0x221918[_0x149d3e(0x206)](_0x26027e,!![]),_0x320ef6=[..._0x26027e];while((!_0x29b936||typeof _0x29b936!==_0x149d3e(0x1db)||!(_0x149d3e(0x1f3)in _0x29b936)||!_0x29b936['range'])&&_0x320ef6[_0x149d3e(0x1ef)]>0x0){_0x320ef6[_0x149d3e(0x204)](),_0x29b936=_0x320ef6['length']>0x0?_0x221918[_0x149d3e(0x206)](_0x320ef6,!![]):_0x221918[_0x149d3e(0x1e8)];}if(!_0x29b936||typeof _0x29b936!==_0x149d3e(0x1db)||!(_0x149d3e(0x1f3)in _0x29b936)||!_0x29b936[_0x149d3e(0x1f3)])return undefined;const [_0x2c88ec]=_0x29b936[_0x149d3e(0x1f3)];return offsetToLocation(_0x1cf1e8,_0x2c88ec);}catch{return undefined;}}export function offsetToLocation(_0x5882c6,_0x69e42){const _0x563145=a169_0x2b46;let _0x45ca1a=0x1,_0x320871=0x1;for(let _0x5a3911=0x0;_0x5a3911<_0x69e42&&_0x5a3911<_0x5882c6[_0x563145(0x1ef)];_0x5a3911++){_0x5882c6[_0x5a3911]==='\x0a'?(_0x45ca1a++,_0x320871=0x1):_0x320871++;}return{'line':_0x45ca1a,'column':_0x320871,'offset':_0x69e42};}function a169_0x2b46(_0x151dda,_0x25a10f){_0x151dda=_0x151dda-0x1db;const _0x5ddbc5=a169_0x5ddb();let _0x2b4694=_0x5ddbc5[_0x151dda];return _0x2b4694;}export function pathToArray(_0x4052d8){const _0x5727aa=a169_0x2b46;if(!_0x4052d8)return[];return _0x4052d8[_0x5727aa(0x1ea)]('.')[_0x5727aa(0x200)](_0x3fe9ff=>{const _0x3a8eb8=_0x3fe9ff['match'](/^(\w+)\[(\d+)\]$/);if(_0x3a8eb8)return[_0x3a8eb8[0x1],parseInt(_0x3a8eb8[0x2],0xa)];return[_0x3fe9ff];});}export function formatZodPath(_0x11c5e3){const _0x3bf474=a169_0x2b46;let _0x357faf='';for(const _0x3ecad3 of _0x11c5e3){if(typeof _0x3ecad3===_0x3bf474(0x208))_0x357faf+='['+_0x3ecad3+']';else{const _0x3b82b5=String(_0x3ecad3);_0x357faf+=_0x357faf?'.'+_0x3b82b5:_0x3b82b5;}}return _0x357faf;}export function flattenZodIssues(_0x312946){const _0x434b0c=a169_0x2b46,_0x366eb9=[];for(const _0x34e6d1 of _0x312946){if(_0x34e6d1['code']==='invalid_union'&&'errors'in _0x34e6d1){const _0x4708da=_0x34e6d1['errors'];let _0x260eb8=_0x4708da[0x0]||[];for(const _0x452b08 of _0x4708da){_0x452b08['length']<_0x260eb8[_0x434b0c(0x1ef)]&&(_0x260eb8=_0x452b08);}const _0x1fa21e=_0x260eb8[_0x434b0c(0x1fb)](_0x237ffa=>({..._0x237ffa,'path':[..._0x34e6d1[_0x434b0c(0x1e6)],..._0x237ffa[_0x434b0c(0x1e6)]]}));_0x366eb9[_0x434b0c(0x1f1)](...flattenZodIssues(_0x1fa21e));}else _0x366eb9[_0x434b0c(0x1f1)](_0x34e6d1);}return _0x366eb9;}export function safeParseYaml(_0x1eef12,_0xd58f06){const _0x25cd8f=a169_0x2b46,_0x36423b=a169_0x403c67[_0x25cd8f(0x1fc)](_0x1eef12);if(!_0x36423b||typeof _0x36423b!=='object')throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0xf76516=_0xd58f06[_0x25cd8f(0x1f7)](_0x36423b);if(!_0xf76516[_0x25cd8f(0x1ec)]){const _0xb792e1=_0xf76516[_0x25cd8f(0x1fe)][_0x25cd8f(0x207)][0x0],_0x24341e=formatZodPath(_0xb792e1['path']);throw new Error(_0x24341e?_0x25cd8f(0x1dc)+_0x24341e+_0x25cd8f(0x209)+_0xb792e1[_0x25cd8f(0x1ee)]:'YAML\x20validation\x20error:\x20'+_0xb792e1[_0x25cd8f(0x1ee)]);}return _0xf76516[_0x25cd8f(0x1f9)];}export function formatIssueWithContext(_0x44657c,_0x2533d1,_0x430603){const _0x36bf6b=a169_0x2b46,_0x4874e0=[],_0x21b67c=_0x44657c['level']===_0x36bf6b(0x1fe),_0x58c23c=_0x21b67c?a169_0x330c85[_0x36bf6b(0x1f5)]:a169_0x330c85[_0x36bf6b(0x1e2)],_0x5f2471=_0x21b67c?a169_0x330c85['red']:a169_0x330c85[_0x36bf6b(0x1e2)],_0x1f7cd2=_0x430603?a169_0x330c85['cyan'](_0x430603+':'):'';if(_0x44657c[_0x36bf6b(0x1e0)]){const _0x49fe5a=a169_0x330c85[_0x36bf6b(0x1eb)](_0x44657c[_0x36bf6b(0x1e0)]['line']+':'+_0x44657c[_0x36bf6b(0x1e0)][_0x36bf6b(0x1fa)]);_0x4874e0[_0x36bf6b(0x1f1)](''+_0x1f7cd2+_0x49fe5a+':\x20'+_0x58c23c(_0x44657c[_0x36bf6b(0x1f8)])+'\x20'+_0x5f2471('['+_0x44657c[_0x36bf6b(0x202)]+']'));}else _0x4874e0[_0x36bf6b(0x1f1)](''+_0x1f7cd2+a169_0x330c85[_0x36bf6b(0x1e7)](_0x44657c[_0x36bf6b(0x1e6)])+':\x20'+_0x58c23c(_0x44657c[_0x36bf6b(0x1f8)])+'\x20'+_0x5f2471('['+_0x44657c[_0x36bf6b(0x202)]+']'));_0x4874e0['push'](_0x44657c[_0x36bf6b(0x1ee)]);if(_0x44657c['location']&&_0x2533d1){const _0x2b7bd7=_0x2533d1[_0x36bf6b(0x1ea)]('\x0a'),{line:_0x185329,column:_0x3a1320}=_0x44657c[_0x36bf6b(0x1e0)],_0xf6d654=Math['max'](0x1,_0x185329-0x1),_0x563620=Math[_0x36bf6b(0x1e5)](_0x2b7bd7[_0x36bf6b(0x1ef)],_0x185329+0x1);_0x4874e0[_0x36bf6b(0x1f1)]('');for(let _0x12f275=_0xf6d654;_0x12f275<=_0x563620;_0x12f275++){const _0x43ea79=_0x2b7bd7[_0x12f275-0x1]||'',_0x35aaba=a169_0x330c85['dim'](_0x12f275[_0x36bf6b(0x1dd)]()['padStart'](0x4)),_0x1d6623=a169_0x330c85[_0x36bf6b(0x1e7)](_0x36bf6b(0x203));if(_0x12f275===_0x185329){_0x4874e0[_0x36bf6b(0x1f1)]('\x20\x20'+_0x35aaba+_0x1d6623+_0x58c23c(_0x43ea79));const _0x4f8938='\x20'[_0x36bf6b(0x1de)](0x4+0x3+_0x3a1320-0x1);_0x4874e0['push']('\x20\x20'+_0x4f8938+_0x58c23c('^'));}else _0x4874e0[_0x36bf6b(0x1f1)]('\x20\x20'+_0x35aaba+_0x1d6623+a169_0x330c85['dim'](_0x43ea79));}}return _0x4874e0['join']('\x0a');}export function formatValidationResult(_0x1fa4ff,_0x5e0648,_0x37cf5c){const _0x52eb4e=a169_0x2b46,_0x4a12a5=[];for(const _0x421a2f of _0x1fa4ff['errors']){_0x4a12a5['push'](formatIssueWithContext(_0x421a2f,_0x5e0648,_0x37cf5c)),_0x4a12a5[_0x52eb4e(0x1f1)]('');}for(const _0x26f646 of _0x1fa4ff[_0x52eb4e(0x1e9)]){_0x4a12a5[_0x52eb4e(0x1f1)](formatIssueWithContext(_0x26f646,_0x5e0648,_0x37cf5c)),_0x4a12a5[_0x52eb4e(0x1f1)]('');}return _0x4a12a5[_0x52eb4e(0x201)]('\x0a');}