@treasuredata/tdx 2026.4.7 → 2026.4.8

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 (220) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-pull-command.js +1 -1
  43. package/dist/commands/segment-push-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segment-validate-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/status-command.js +1 -1
  50. package/dist/commands/tables.js +1 -1
  51. package/dist/commands/unset-command.js +1 -1
  52. package/dist/commands/upgrade-command.js +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/user-command.js +1 -1
  55. package/dist/commands/work-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/oauth-keychain.js +1 -1
  66. package/dist/core/oauth.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/core/version.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/mcp/server.js +1 -1
  74. package/dist/mcp/tools/index.js +1 -1
  75. package/dist/mcp/tools/tdx-run.js +1 -1
  76. package/dist/mcp/tools/tdx-search.js +1 -1
  77. package/dist/mcp/tools/work-create-item.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/access-tracker.js +1 -1
  182. package/dist/sdk/workspace/frontmatter.js +1 -1
  183. package/dist/sdk/workspace/git.js +1 -1
  184. package/dist/sdk/workspace/index.js +1 -1
  185. package/dist/sdk/workspace/templates.js +1 -1
  186. package/dist/sdk/workspace/weekly.js +1 -1
  187. package/dist/sdk/workspace/wikilinks.js +1 -1
  188. package/dist/test-utils/command-runner.js +1 -1
  189. package/dist/test-utils/factories.js +1 -1
  190. package/dist/test-utils/fixtures.js +1 -1
  191. package/dist/test-utils/http-mock.js +1 -1
  192. package/dist/test-utils/index.js +1 -1
  193. package/dist/utils/async.js +1 -1
  194. package/dist/utils/colors.js +1 -1
  195. package/dist/utils/diff.js +1 -1
  196. package/dist/utils/file-permissions.js +1 -1
  197. package/dist/utils/file-reader.js +1 -1
  198. package/dist/utils/github-releases.js +1 -1
  199. package/dist/utils/global-cache.js +1 -1
  200. package/dist/utils/json-loader.js +1 -1
  201. package/dist/utils/local-cache.js +1 -1
  202. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  203. package/dist/utils/logger/formatters/index.js +1 -1
  204. package/dist/utils/logger/handlers/console-handler.js +1 -1
  205. package/dist/utils/logger/handlers/file-handler.js +1 -1
  206. package/dist/utils/logger/handlers/index.js +1 -1
  207. package/dist/utils/logger/handlers/null-handler.js +1 -1
  208. package/dist/utils/logger/index.js +1 -1
  209. package/dist/utils/logger/logger.js +1 -1
  210. package/dist/utils/logger/types.js +1 -1
  211. package/dist/utils/option-validation.js +1 -1
  212. package/dist/utils/process.js +1 -1
  213. package/dist/utils/prompt.js +1 -1
  214. package/dist/utils/spinner.js +1 -1
  215. package/dist/utils/sse-parser.js +1 -1
  216. package/dist/utils/string-utils.js +1 -1
  217. package/dist/utils/table-ref-parser.js +1 -1
  218. package/dist/utils/tdx-logger.js +1 -1
  219. package/dist/utils/version-check.js +1 -1
  220. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x5159ea,_0x39d8d9){const _0xeb3562=a157_0x20fa,_0x124261=_0x5159ea();while(!![]){try{const _0xb2272e=-parseInt(_0xeb3562(0x206))/0x1+-parseInt(_0xeb3562(0x1df))/0x2+-parseInt(_0xeb3562(0x20c))/0x3*(-parseInt(_0xeb3562(0x1f9))/0x4)+parseInt(_0xeb3562(0x1de))/0x5+-parseInt(_0xeb3562(0x1f8))/0x6+parseInt(_0xeb3562(0x20b))/0x7+-parseInt(_0xeb3562(0x1e4))/0x8;if(_0xb2272e===_0x39d8d9)break;else _0x124261['push'](_0x124261['shift']());}catch(_0x3e2d62){_0x124261['push'](_0x124261['shift']());}}}(a157_0x18f2,0xca636));import a157_0x507e28 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';function a157_0x20fa(_0x5b3b99,_0x2e9803){_0x5b3b99=_0x5b3b99-0x1dc;const _0x18f264=a157_0x18f2();let _0x20faac=_0x18f264[_0x5b3b99];return _0x20faac;}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x1cc556){const _0x5d5446=a157_0x20fa;return _0x1cc556[_0x5d5446(0x1f0)]!==_0x5d5446(0x210);}export function isScopedResolution(_0xb34855){const _0x311565=a157_0x20fa;return _0xb34855[_0x311565(0x1f0)]===_0x311565(0x1e3)||_0xb34855[_0x311565(0x1f0)]===_0x311565(0x1dd)||_0xb34855[_0x311565(0x1f0)]==='context';}function a157_0x18f2(){const _0x1a09e9=['parse','startsWith','182250wtSOuo','segmentName','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','file_not_found','scopedFolderPath','3115000TVbQGm','894HeBbxl','extname','invalid_yaml','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','error','exists','file','6843475LVRUdp','343302uVbIyp','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','journey','folderPath','directory','6608000jzkUYO','replace','Not\x20a\x20YAML\x20file:\x20','segment','parent_segment','resolve','message','readFile','root','match','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','cwd','type','No\x20tdx.json\x20found\x20for\x20file:\x20','includes','relative','File\x20not\x20found','resourceType','configDir','no_config','8621748NSpLIW','21908gDqhYg','isScoped','stat','dirname','Parent\x20segment\x20not\x20specified','join','No\x20tdx.json\x20found','string','basename','isDirectory','parentSegment'];a157_0x18f2=function(){return _0x1a09e9;};return a157_0x18f2();}export function getScopedDetails(_0x320ed6){const _0x50e177=a157_0x20fa;if(isScopedResolution(_0x320ed6))return{'isScoped':_0x320ed6[_0x50e177(0x1fa)],'scopedFolderPath':_0x320ed6[_0x50e177(0x20a)]};return undefined;}async function findTdxConfigAsync(_0x211500,_0x25ed68){const _0x31bd19=a157_0x20fa;let _0x2009a7=a157_0x507e28[_0x31bd19(0x1e9)](_0x211500);const _0x58284a=a157_0x507e28[_0x31bd19(0x204)](_0x2009a7)[_0x31bd19(0x1ec)];while(_0x2009a7!==_0x58284a){const _0x432e25=a157_0x507e28[_0x31bd19(0x1fe)](_0x2009a7,'tdx.json');if(await _0x25ed68[_0x31bd19(0x1dc)](_0x432e25))try{const _0x2f34c1=await _0x25ed68[_0x31bd19(0x1eb)](_0x432e25),_0x33706d=JSON[_0x31bd19(0x204)](_0x2f34c1);if(_0x33706d[_0x31bd19(0x1e8)]&&typeof _0x33706d[_0x31bd19(0x1e8)]===_0x31bd19(0x200))return{'configPath':_0x432e25,'configDir':_0x2009a7,'parentSegment':_0x33706d[_0x31bd19(0x1e8)]};}catch{}_0x2009a7=a157_0x507e28[_0x31bd19(0x1fc)](_0x2009a7);}return null;}function calculateScopedPath(_0x33f696,_0x2babba){const _0x5136e8=a157_0x20fa,_0x212923=a157_0x507e28[_0x5136e8(0x1f3)](_0x2babba,_0x33f696),_0x96fd25=_0x212923!==''&&_0x212923!=='.'&&!_0x212923[_0x5136e8(0x205)]('..');return{'isScoped':_0x96fd25,'scopedFolderPath':_0x96fd25?_0x212923[_0x5136e8(0x1e5)](/\\/g,'/'):''};}export async function resolveTarget(_0x23e59c){const _0x1c1931=a157_0x20fa,{arg:_0x2abbe6,contextParent:_0x45b667,cwd:cwd=process[_0x1c1931(0x1ef)](),fs:fs=nodeFileSystem}=_0x23e59c;if(_0x2abbe6&&isYamlFilePath(_0x2abbe6))try{const _0x359ef7=await resolveYamlFilePath(_0x2abbe6,fs),_0x5760f8=a157_0x507e28[_0x1c1931(0x1e9)](_0x2abbe6),_0x4902a4=a157_0x507e28['dirname'](_0x5760f8),_0x53a64b=await findTdxConfigAsync(_0x4902a4,fs);if(!_0x53a64b){if(_0x45b667){const _0x4ad7b8=a157_0x507e28[_0x1c1931(0x1fc)](_0x5760f8);return{'type':_0x1c1931(0x1dd),'parentName':_0x45b667,'targetDir':_0x4ad7b8,'configRoot':_0x4ad7b8,'filePath':_0x5760f8,'resourceName':_0x359ef7[_0x1c1931(0x207)],'folderPath':_0x359ef7['folderPath'],'resourceType':_0x359ef7[_0x1c1931(0x1f5)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_config','message':_0x1c1931(0x1f1)+_0x2abbe6,'arg':_0x2abbe6,'helpText':_0x1c1931(0x1e0)};}const _0x102356=calculateScopedPath(_0x4902a4,_0x53a64b['configDir']);return{'type':_0x1c1931(0x1dd),'parentName':_0x53a64b[_0x1c1931(0x203)],'targetDir':_0x53a64b[_0x1c1931(0x1f6)],'configRoot':_0x53a64b[_0x1c1931(0x1f6)],'filePath':_0x5760f8,'resourceName':_0x359ef7[_0x1c1931(0x207)],'folderPath':_0x359ef7[_0x1c1931(0x1e2)],'resourceType':_0x359ef7[_0x1c1931(0x1f5)],'isScoped':_0x102356[_0x1c1931(0x1fa)],'scopedFolderPath':_0x102356[_0x1c1931(0x20a)]};}catch(_0xc2004e){const _0xab97f7=_0xc2004e instanceof Error?_0xc2004e[_0x1c1931(0x1ea)]:String(_0xc2004e);if(_0xab97f7[_0x1c1931(0x1f2)](_0x1c1931(0x1f4)))return{'type':_0x1c1931(0x210),'errorCode':_0x1c1931(0x209),'message':'File\x20not\x20found:\x20'+_0x2abbe6,'arg':_0x2abbe6};if(_0xab97f7[_0x1c1931(0x1f2)](_0x1c1931(0x1ff))){if(_0x45b667){const _0x5cf2f3=a157_0x507e28[_0x1c1931(0x1e9)](_0x2abbe6);if(await fs[_0x1c1931(0x1dc)](_0x5cf2f3)){const _0x31974b=a157_0x507e28['dirname'](_0x5cf2f3),_0x1b4e52=await fs['readFile'](_0x5cf2f3),_0x3b1af4=_0x1b4e52[_0x1c1931(0x1ed)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x5639fc=_0x1b4e52[_0x1c1931(0x1ed)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x9a615f=_0x3b1af4?_0x3b1af4[0x1]['trim']():a157_0x507e28[_0x1c1931(0x201)](_0x2abbe6,a157_0x507e28[_0x1c1931(0x20d)](_0x2abbe6)),_0xdcccbd=_0x5639fc&&_0x5639fc[0x1]['trim']()===_0x1c1931(0x1e1)?_0x1c1931(0x1e1):_0x1c1931(0x1e7);return{'type':_0x1c1931(0x1dd),'parentName':_0x45b667,'targetDir':_0x31974b,'configRoot':_0x31974b,'filePath':_0x5cf2f3,'resourceName':_0x9a615f,'folderPath':'','resourceType':_0xdcccbd,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x1c1931(0x1f7),'message':_0x1c1931(0x1f1)+_0x2abbe6,'arg':_0x2abbe6,'helpText':_0x1c1931(0x1e0)};}return{'type':'error','errorCode':_0x1c1931(0x20e),'message':_0xab97f7,'arg':_0x2abbe6};}if(_0x2abbe6){const _0x1fb721=a157_0x507e28[_0x1c1931(0x1e9)](cwd,_0x2abbe6);let _0x16415c=null;try{_0x16415c=await fs[_0x1c1931(0x1fb)](_0x1fb721);}catch{}if(_0x16415c?.[_0x1c1931(0x202)]()){const _0x15a467=await findTdxConfigAsync(_0x1fb721,fs);if(_0x15a467){const _0x3e8df1=calculateScopedPath(_0x1fb721,_0x15a467[_0x1c1931(0x1f6)]);return{'type':_0x1c1931(0x1e3),'parentName':_0x15a467[_0x1c1931(0x203)],'targetDir':_0x1fb721,'configRoot':_0x15a467[_0x1c1931(0x1f6)],'isScoped':_0x3e8df1[_0x1c1931(0x1fa)],'scopedFolderPath':_0x3e8df1['scopedFolderPath']};}if(_0x45b667)return{'type':'directory','parentName':_0x45b667,'targetDir':_0x1fb721,'configRoot':_0x1fb721,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':'no_config','message':_0x1c1931(0x208)+_0x2abbe6,'arg':_0x2abbe6,'helpText':_0x1c1931(0x1e0)};}if(_0x16415c?.['isFile']())return{'type':'error','errorCode':_0x1c1931(0x20e),'message':_0x1c1931(0x1e6)+_0x2abbe6,'arg':_0x2abbe6,'helpText':_0x1c1931(0x20f)};const _0x1e717b=sanitizeFileName(_0x2abbe6),_0x2c3b41=getSegmentRootDir(_0x1e717b,cwd);return{'type':'parent_name','parentName':_0x2abbe6,'targetDir':_0x2c3b41,'configRoot':_0x2c3b41};}const _0x5ccc76=await findTdxConfigAsync(cwd,fs);if(_0x5ccc76){const _0x27e3a6=calculateScopedPath(cwd,_0x5ccc76[_0x1c1931(0x1f6)]);return{'type':'context','parentName':_0x5ccc76[_0x1c1931(0x203)],'targetDir':cwd,'configRoot':_0x5ccc76[_0x1c1931(0x1f6)],'isScoped':_0x27e3a6['isScoped'],'scopedFolderPath':_0x27e3a6[_0x1c1931(0x20a)]};}if(_0x45b667){const _0x39dcb6=sanitizeFileName(_0x45b667),_0x49bb27=getSegmentRootDir(_0x39dcb6,cwd);return{'type':'context','parentName':_0x45b667,'targetDir':_0x49bb27,'configRoot':_0x49bb27,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1c1931(0x210),'errorCode':'no_parent','message':_0x1c1931(0x1fd),'helpText':_0x1c1931(0x1ee)};}
1
+ (function(_0x2d93c4,_0x333927){const _0x39a490=a157_0x1618,_0x1bd729=_0x2d93c4();while(!![]){try{const _0x5975a3=parseInt(_0x39a490(0x1f3))/0x1*(parseInt(_0x39a490(0x1cf))/0x2)+parseInt(_0x39a490(0x1e4))/0x3*(-parseInt(_0x39a490(0x1e5))/0x4)+-parseInt(_0x39a490(0x1c1))/0x5*(parseInt(_0x39a490(0x1e9))/0x6)+-parseInt(_0x39a490(0x1c7))/0x7+parseInt(_0x39a490(0x1d5))/0x8+-parseInt(_0x39a490(0x1d4))/0x9*(parseInt(_0x39a490(0x1cb))/0xa)+-parseInt(_0x39a490(0x1ed))/0xb*(-parseInt(_0x39a490(0x1c5))/0xc);if(_0x5975a3===_0x333927)break;else _0x1bd729['push'](_0x1bd729['shift']());}catch(_0x2a9021){_0x1bd729['push'](_0x1bd729['shift']());}}}(a157_0x8ef2,0x7ea0d));import a157_0x5aa686 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';function a157_0x8ef2(){const _0x1f44d3=['invalid_yaml','context','70JmXqud','error','directory','extname','2ARLsfh','folderPath','parentSegment','scopedFolderPath','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','605007WGcTyz','1275648MEffEg','no_parent','isDirectory','cwd','string','No\x20tdx.json\x20found\x20for\x20file:\x20','parent_segment','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','file','exists','readFile','parse','No\x20tdx.json\x20found','Not\x20a\x20YAML\x20file:\x20','segmentName','119001hgMisG','8oEVadX','trim','relative','isScoped','6sincka','resourceType','dirname','type','3828242EYmoEV','message','segment','configDir','replace','root','786004OTNvIw','includes','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','File\x20not\x20found:\x20','isFile','Parent\x20segment\x20not\x20specified','parent_name','1046585uRaDtM','File\x20not\x20found','no_config','resolve','36Khkiaw','journey','4981515DXnDKH','stat'];a157_0x8ef2=function(){return _0x1f44d3;};return a157_0x8ef2();}export function isSuccessfulResolution(_0xef4017){const _0x4da6e8=a157_0x1618;return _0xef4017[_0x4da6e8(0x1ec)]!==_0x4da6e8(0x1cc);}function a157_0x1618(_0x334f18,_0x33e195){_0x334f18=_0x334f18-0x1bd;const _0x8ef2bf=a157_0x8ef2();let _0x161857=_0x8ef2bf[_0x334f18];return _0x161857;}export function isScopedResolution(_0x1a98ba){const _0x392de8=a157_0x1618;return _0x1a98ba[_0x392de8(0x1ec)]===_0x392de8(0x1cd)||_0x1a98ba[_0x392de8(0x1ec)]===_0x392de8(0x1dd)||_0x1a98ba[_0x392de8(0x1ec)]===_0x392de8(0x1ca);}export function getScopedDetails(_0x24f488){const _0x3efe3f=a157_0x1618;if(isScopedResolution(_0x24f488))return{'isScoped':_0x24f488[_0x3efe3f(0x1e8)],'scopedFolderPath':_0x24f488['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x6450d9,_0x383972){const _0x445fce=a157_0x1618;let _0x206a37=a157_0x5aa686[_0x445fce(0x1c4)](_0x6450d9);const _0x3bf559=a157_0x5aa686['parse'](_0x206a37)[_0x445fce(0x1f2)];while(_0x206a37!==_0x3bf559){const _0x183fa3=a157_0x5aa686['join'](_0x206a37,'tdx.json');if(await _0x383972[_0x445fce(0x1de)](_0x183fa3))try{const _0x17aee9=await _0x383972[_0x445fce(0x1df)](_0x183fa3),_0x5dbdd0=JSON[_0x445fce(0x1e0)](_0x17aee9);if(_0x5dbdd0[_0x445fce(0x1db)]&&typeof _0x5dbdd0[_0x445fce(0x1db)]===_0x445fce(0x1d9))return{'configPath':_0x183fa3,'configDir':_0x206a37,'parentSegment':_0x5dbdd0['parent_segment']};}catch{}_0x206a37=a157_0x5aa686[_0x445fce(0x1eb)](_0x206a37);}return null;}function calculateScopedPath(_0x5f052f,_0x573ab7){const _0x256f82=a157_0x1618,_0x91addf=a157_0x5aa686[_0x256f82(0x1e7)](_0x573ab7,_0x5f052f),_0x332450=_0x91addf!==''&&_0x91addf!=='.'&&!_0x91addf['startsWith']('..');return{'isScoped':_0x332450,'scopedFolderPath':_0x332450?_0x91addf[_0x256f82(0x1f1)](/\\/g,'/'):''};}export async function resolveTarget(_0x8477e1){const _0x58dff6=a157_0x1618,{arg:_0x1e95b9,contextParent:_0x1dea5c,cwd:cwd=process[_0x58dff6(0x1d8)](),fs:fs=nodeFileSystem}=_0x8477e1;if(_0x1e95b9&&isYamlFilePath(_0x1e95b9))try{const _0x410818=await resolveYamlFilePath(_0x1e95b9,fs),_0x190f8b=a157_0x5aa686[_0x58dff6(0x1c4)](_0x1e95b9),_0x587372=a157_0x5aa686[_0x58dff6(0x1eb)](_0x190f8b),_0x366207=await findTdxConfigAsync(_0x587372,fs);if(!_0x366207){if(_0x1dea5c){const _0x5a3ea8=a157_0x5aa686[_0x58dff6(0x1eb)](_0x190f8b);return{'type':_0x58dff6(0x1dd),'parentName':_0x1dea5c,'targetDir':_0x5a3ea8,'configRoot':_0x5a3ea8,'filePath':_0x190f8b,'resourceName':_0x410818[_0x58dff6(0x1e3)],'folderPath':_0x410818[_0x58dff6(0x1d0)],'resourceType':_0x410818[_0x58dff6(0x1ea)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x58dff6(0x1cc),'errorCode':_0x58dff6(0x1c3),'message':_0x58dff6(0x1da)+_0x1e95b9,'arg':_0x1e95b9,'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 _0x4d90d9=calculateScopedPath(_0x587372,_0x366207[_0x58dff6(0x1f0)]);return{'type':'file','parentName':_0x366207['parentSegment'],'targetDir':_0x366207['configDir'],'configRoot':_0x366207[_0x58dff6(0x1f0)],'filePath':_0x190f8b,'resourceName':_0x410818[_0x58dff6(0x1e3)],'folderPath':_0x410818['folderPath'],'resourceType':_0x410818[_0x58dff6(0x1ea)],'isScoped':_0x4d90d9[_0x58dff6(0x1e8)],'scopedFolderPath':_0x4d90d9[_0x58dff6(0x1d2)]};}catch(_0x4e19ca){const _0x3ff40b=_0x4e19ca instanceof Error?_0x4e19ca[_0x58dff6(0x1ee)]:String(_0x4e19ca);if(_0x3ff40b[_0x58dff6(0x1f4)](_0x58dff6(0x1c2)))return{'type':_0x58dff6(0x1cc),'errorCode':'file_not_found','message':_0x58dff6(0x1bd)+_0x1e95b9,'arg':_0x1e95b9};if(_0x3ff40b['includes'](_0x58dff6(0x1e1))){if(_0x1dea5c){const _0x27ef5c=a157_0x5aa686['resolve'](_0x1e95b9);if(await fs[_0x58dff6(0x1de)](_0x27ef5c)){const _0x35b5cf=a157_0x5aa686[_0x58dff6(0x1eb)](_0x27ef5c),_0x723ca5=await fs[_0x58dff6(0x1df)](_0x27ef5c),_0x3ee046=_0x723ca5['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x28e263=_0x723ca5['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x10cbce=_0x3ee046?_0x3ee046[0x1][_0x58dff6(0x1e6)]():a157_0x5aa686['basename'](_0x1e95b9,a157_0x5aa686[_0x58dff6(0x1ce)](_0x1e95b9)),_0x3c61be=_0x28e263&&_0x28e263[0x1][_0x58dff6(0x1e6)]()===_0x58dff6(0x1c6)?'journey':_0x58dff6(0x1ef);return{'type':_0x58dff6(0x1dd),'parentName':_0x1dea5c,'targetDir':_0x35b5cf,'configRoot':_0x35b5cf,'filePath':_0x27ef5c,'resourceName':_0x10cbce,'folderPath':'','resourceType':_0x3c61be,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':'no_config','message':_0x58dff6(0x1da)+_0x1e95b9,'arg':_0x1e95b9,'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':_0x58dff6(0x1cc),'errorCode':_0x58dff6(0x1c9),'message':_0x3ff40b,'arg':_0x1e95b9};}if(_0x1e95b9){const _0x41ffab=a157_0x5aa686[_0x58dff6(0x1c4)](cwd,_0x1e95b9);let _0x2da76e=null;try{_0x2da76e=await fs[_0x58dff6(0x1c8)](_0x41ffab);}catch{}if(_0x2da76e?.[_0x58dff6(0x1d7)]()){const _0x3e2042=await findTdxConfigAsync(_0x41ffab,fs);if(_0x3e2042){const _0x4eb678=calculateScopedPath(_0x41ffab,_0x3e2042[_0x58dff6(0x1f0)]);return{'type':'directory','parentName':_0x3e2042[_0x58dff6(0x1d1)],'targetDir':_0x41ffab,'configRoot':_0x3e2042['configDir'],'isScoped':_0x4eb678['isScoped'],'scopedFolderPath':_0x4eb678['scopedFolderPath']};}if(_0x1dea5c)return{'type':_0x58dff6(0x1cd),'parentName':_0x1dea5c,'targetDir':_0x41ffab,'configRoot':_0x41ffab,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':'no_config','message':_0x58dff6(0x1f5)+_0x1e95b9,'arg':_0x1e95b9,'helpText':_0x58dff6(0x1dc)};}if(_0x2da76e?.[_0x58dff6(0x1be)]())return{'type':_0x58dff6(0x1cc),'errorCode':_0x58dff6(0x1c9),'message':_0x58dff6(0x1e2)+_0x1e95b9,'arg':_0x1e95b9,'helpText':_0x58dff6(0x1d3)};const _0x1dd59e=sanitizeFileName(_0x1e95b9),_0x5e24b7=getSegmentRootDir(_0x1dd59e,cwd);return{'type':_0x58dff6(0x1c0),'parentName':_0x1e95b9,'targetDir':_0x5e24b7,'configRoot':_0x5e24b7};}const _0x1a8a26=await findTdxConfigAsync(cwd,fs);if(_0x1a8a26){const _0x383035=calculateScopedPath(cwd,_0x1a8a26['configDir']);return{'type':_0x58dff6(0x1ca),'parentName':_0x1a8a26[_0x58dff6(0x1d1)],'targetDir':cwd,'configRoot':_0x1a8a26[_0x58dff6(0x1f0)],'isScoped':_0x383035[_0x58dff6(0x1e8)],'scopedFolderPath':_0x383035[_0x58dff6(0x1d2)]};}if(_0x1dea5c){const _0x3b1be2=sanitizeFileName(_0x1dea5c),_0x21c316=getSegmentRootDir(_0x3b1be2,cwd);return{'type':_0x58dff6(0x1ca),'parentName':_0x1dea5c,'targetDir':_0x21c316,'configRoot':_0x21c316,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x58dff6(0x1d6),'message':_0x58dff6(0x1bf),'helpText':'Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure'};}
@@ -1 +1 @@
1
- const a158_0x2ace9c=a158_0x3b11;(function(_0x29c3bf,_0x48a723){const _0x4593f8=a158_0x3b11,_0x1678c9=_0x29c3bf();while(!![]){try{const _0x53b931=parseInt(_0x4593f8(0x193))/0x1*(-parseInt(_0x4593f8(0x1a8))/0x2)+-parseInt(_0x4593f8(0x190))/0x3*(parseInt(_0x4593f8(0x1a1))/0x4)+parseInt(_0x4593f8(0x191))/0x5+-parseInt(_0x4593f8(0x199))/0x6+-parseInt(_0x4593f8(0x1a0))/0x7*(parseInt(_0x4593f8(0x19f))/0x8)+parseInt(_0x4593f8(0x19d))/0x9+parseInt(_0x4593f8(0x194))/0xa;if(_0x53b931===_0x48a723)break;else _0x1678c9['push'](_0x1678c9['shift']());}catch(_0x383bff){_0x1678c9['push'](_0x1678c9['shift']());}}}(a158_0xddee,0x6426c));import{existsSync,readFileSync}from'fs';import a158_0x1536fe from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR='segments';function a158_0xddee(){const _0x546ee0=['root','engage_workspace','stringify','relative','cwd','Invalid\x20JSON\x20in\x20','44VDCXdS','110757wSgaAs','3169820jjhLAx','replace','13996lEqvBZ','9352500ebfXys','join','startsWith','dirname','parent_segment','4110096MNUojs','string','object','utf-8','7225173CncVCw','resolve','8XWOdbq','3939278QHtNkX','44GXMyYq'];a158_0xddee=function(){return _0x546ee0;};return a158_0xddee();}export function findTdxConfigPath(_0x145377=process[a158_0x2ace9c(0x1a6)]()){const _0x1f2cfb=a158_0x2ace9c;let _0x254922=a158_0x1536fe[_0x1f2cfb(0x19e)](_0x145377);const _0x5ed294=a158_0x1536fe['parse'](_0x254922)[_0x1f2cfb(0x1a2)];while(_0x254922!==_0x5ed294){const _0x40ca03=a158_0x1536fe['join'](_0x254922,TDX_CONFIG_FILE);if(existsSync(_0x40ca03))return _0x40ca03;_0x254922=a158_0x1536fe[_0x1f2cfb(0x197)](_0x254922);}return null;}export function loadTdxConfig(_0x390e98){const _0xbde92d=a158_0x2ace9c,_0x227a6=readFileSync(_0x390e98,_0xbde92d(0x19c));let _0x5586c;try{_0x5586c=JSON['parse'](_0x227a6);}catch{throw new Error(_0xbde92d(0x1a7)+_0x390e98);}if(!_0x5586c||typeof _0x5586c!==_0xbde92d(0x19b))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x2936ac=_0x5586c,_0x3d6235=_0x2936ac['parent_segment']&&typeof _0x2936ac['parent_segment']===_0xbde92d(0x19a),_0x5e869f=_0x2936ac['engage_workspace']&&typeof _0x2936ac[_0xbde92d(0x1a3)]===_0xbde92d(0x19a);if(!_0x3d6235&&!_0x5e869f)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x340404={};return _0x3d6235&&(_0x340404['parent_segment']=_0x2936ac[_0xbde92d(0x198)]),_0x5e869f&&(_0x340404[_0xbde92d(0x1a3)]=_0x2936ac[_0xbde92d(0x1a3)]),_0x340404;}export function findTdxConfig(_0x428215=process[a158_0x2ace9c(0x1a6)]()){const _0x4efb50=a158_0x2ace9c,_0x7db071=findTdxConfigPath(_0x428215);if(!_0x7db071)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x7f0c76=loadTdxConfig(_0x7db071),_0x1db81b=a158_0x1536fe[_0x4efb50(0x197)](_0x7db071);return{'config':_0x7f0c76,'configPath':_0x7db071,'configDir':_0x1db81b};}export function tryFindTdxConfig(_0x12adb7){try{return findTdxConfig(_0x12adb7);}catch{return null;}}export function getSegmentRootDir(_0x380f50,_0x4cf464=process['cwd']()){const _0x498849=a158_0x2ace9c;return a158_0x1536fe[_0x498849(0x195)](_0x4cf464,SEGMENTS_DIR,_0x380f50);}export function getTdxConfigPath(_0x4980eb,_0x58ac27=process[a158_0x2ace9c(0x1a6)]()){return a158_0x1536fe['join'](getSegmentRootDir(_0x4980eb,_0x58ac27),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x496a59,_0x1014bf){const _0x11d9ce=a158_0x2ace9c,_0x3e3ec5=a158_0x1536fe[_0x11d9ce(0x19e)](_0x496a59),_0x4cb50d=a158_0x1536fe[_0x11d9ce(0x1a5)](_0x1014bf,_0x3e3ec5);if(_0x4cb50d[_0x11d9ce(0x196)]('..'))return'';return _0x4cb50d;}export function localPathToTdFolderPath(_0x352639){const _0x3c63b2=a158_0x2ace9c,_0x3609bb=a158_0x1536fe[_0x3c63b2(0x197)](_0x352639);if(_0x3609bb==='.'||_0x3609bb==='')return'';return _0x3609bb[_0x3c63b2(0x192)](/\\/g,'/');}function a158_0x3b11(_0x28f25f,_0x325e0a){_0x28f25f=_0x28f25f-0x190;const _0xddee82=a158_0xddee();let _0x3b11d2=_0xddee82[_0x28f25f];return _0x3b11d2;}export function tdFolderPathToLocalPath(_0xd2d6b6,_0x1887f8){const _0x217108=a158_0x2ace9c;if(!_0xd2d6b6)return _0x1887f8;return a158_0x1536fe[_0x217108(0x195)](_0x1887f8,_0xd2d6b6);}export function createTdxConfigContent(_0x131edb){const _0x68ef8f={'parent_segment':_0x131edb};return JSON['stringify'](_0x68ef8f,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x499c1b){const _0x2dee0e=a158_0x2ace9c,_0xdcaf84={'engage_workspace':_0x499c1b};return JSON[_0x2dee0e(0x1a4)](_0xdcaf84,null,0x2)+'\x0a';}
1
+ const a158_0x1d782e=a158_0xb231;(function(_0x3d2848,_0x57c54a){const _0x4188e9=a158_0xb231,_0x294cb3=_0x3d2848();while(!![]){try{const _0x4b5783=parseInt(_0x4188e9(0x9d))/0x1+parseInt(_0x4188e9(0x9c))/0x2*(parseInt(_0x4188e9(0xa2))/0x3)+-parseInt(_0x4188e9(0x9a))/0x4+-parseInt(_0x4188e9(0xa1))/0x5+parseInt(_0x4188e9(0x89))/0x6+-parseInt(_0x4188e9(0x94))/0x7*(parseInt(_0x4188e9(0x8d))/0x8)+parseInt(_0x4188e9(0x9b))/0x9*(-parseInt(_0x4188e9(0x8a))/0xa);if(_0x4b5783===_0x57c54a)break;else _0x294cb3['push'](_0x294cb3['shift']());}catch(_0x2972c8){_0x294cb3['push'](_0x294cb3['shift']());}}}(a158_0x1b2c,0xc3437));import{existsSync,readFileSync}from'fs';import a158_0x555e78 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR='segments';function a158_0x1b2c(){const _0x22218f=['engage_workspace','112Gyofxg','parent_segment','string','cwd','dirname','utf-8','object','52353yYDwER','stringify','resolve','Invalid\x20JSON\x20in\x20','root','replace','2490580LvIkhL','28035pECLQA','1229422CuEFQv','876339sRAUry','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','parse','join','4689485MXFyUH','3zxrRGM','7600842YaiDsy','940OwVTaX','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.'];a158_0x1b2c=function(){return _0x22218f;};return a158_0x1b2c();}function a158_0xb231(_0x5c964f,_0x401b65){_0x5c964f=_0x5c964f-0x89;const _0x1b2c1c=a158_0x1b2c();let _0xb2310e=_0x1b2c1c[_0x5c964f];return _0xb2310e;}export function findTdxConfigPath(_0x4961c3=process[a158_0x1d782e(0x90)]()){const _0x2288d2=a158_0x1d782e;let _0xc3f530=a158_0x555e78[_0x2288d2(0x96)](_0x4961c3);const _0x17bccb=a158_0x555e78[_0x2288d2(0x9f)](_0xc3f530)[_0x2288d2(0x98)];while(_0xc3f530!==_0x17bccb){const _0x1954cb=a158_0x555e78[_0x2288d2(0xa0)](_0xc3f530,TDX_CONFIG_FILE);if(existsSync(_0x1954cb))return _0x1954cb;_0xc3f530=a158_0x555e78['dirname'](_0xc3f530);}return null;}export function loadTdxConfig(_0x10196b){const _0x1a4087=a158_0x1d782e,_0xdb6cdc=readFileSync(_0x10196b,_0x1a4087(0x92));let _0x593666;try{_0x593666=JSON[_0x1a4087(0x9f)](_0xdb6cdc);}catch{throw new Error(_0x1a4087(0x97)+_0x10196b);}if(!_0x593666||typeof _0x593666!==_0x1a4087(0x93))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x59ce1f=_0x593666,_0x233ac4=_0x59ce1f[_0x1a4087(0x8e)]&&typeof _0x59ce1f[_0x1a4087(0x8e)]===_0x1a4087(0x8f),_0x344834=_0x59ce1f[_0x1a4087(0x8c)]&&typeof _0x59ce1f[_0x1a4087(0x8c)]==='string';if(!_0x233ac4&&!_0x344834)throw new Error(_0x1a4087(0x9e));const _0x1dee53={};return _0x233ac4&&(_0x1dee53[_0x1a4087(0x8e)]=_0x59ce1f[_0x1a4087(0x8e)]),_0x344834&&(_0x1dee53[_0x1a4087(0x8c)]=_0x59ce1f[_0x1a4087(0x8c)]),_0x1dee53;}export function findTdxConfig(_0x13ab78=process[a158_0x1d782e(0x90)]()){const _0x1ef65a=a158_0x1d782e,_0x5a97b1=findTdxConfigPath(_0x13ab78);if(!_0x5a97b1)throw new Error(_0x1ef65a(0x8b));const _0x3ee2c5=loadTdxConfig(_0x5a97b1),_0x70a9c8=a158_0x555e78['dirname'](_0x5a97b1);return{'config':_0x3ee2c5,'configPath':_0x5a97b1,'configDir':_0x70a9c8};}export function tryFindTdxConfig(_0x4caaf8){try{return findTdxConfig(_0x4caaf8);}catch{return null;}}export function getSegmentRootDir(_0x2cedb3,_0x3680fa=process[a158_0x1d782e(0x90)]()){return a158_0x555e78['join'](_0x3680fa,SEGMENTS_DIR,_0x2cedb3);}export function getTdxConfigPath(_0x5c9fe8,_0x5d8799=process['cwd']()){return a158_0x555e78['join'](getSegmentRootDir(_0x5c9fe8,_0x5d8799),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x181e3c,_0x2891da){const _0x19ae11=a158_0x1d782e,_0x3d0ba8=a158_0x555e78[_0x19ae11(0x96)](_0x181e3c),_0x508d67=a158_0x555e78['relative'](_0x2891da,_0x3d0ba8);if(_0x508d67['startsWith']('..'))return'';return _0x508d67;}export function localPathToTdFolderPath(_0x224cf5){const _0x396bcc=a158_0x1d782e,_0x49871f=a158_0x555e78[_0x396bcc(0x91)](_0x224cf5);if(_0x49871f==='.'||_0x49871f==='')return'';return _0x49871f[_0x396bcc(0x99)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x542f45,_0x234a25){if(!_0x542f45)return _0x234a25;return a158_0x555e78['join'](_0x234a25,_0x542f45);}export function createTdxConfigContent(_0x1d4e7b){const _0x56bf16=a158_0x1d782e,_0x2cc009={'parent_segment':_0x1d4e7b};return JSON[_0x56bf16(0x95)](_0x2cc009,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x56d409){const _0x18fc36={'engage_workspace':_0x56d409};return JSON['stringify'](_0x18fc36,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a159_0x5a8672=a159_0xf26f;(function(_0x29eb78,_0x9b317a){const _0x1c729f=a159_0xf26f,_0x1095c2=_0x29eb78();while(!![]){try{const _0x1ca862=-parseInt(_0x1c729f(0xc9))/0x1+parseInt(_0x1c729f(0xe1))/0x2+parseInt(_0x1c729f(0xde))/0x3+-parseInt(_0x1c729f(0xc3))/0x4+-parseInt(_0x1c729f(0xd8))/0x5+-parseInt(_0x1c729f(0xe6))/0x6+parseInt(_0x1c729f(0xcc))/0x7*(parseInt(_0x1c729f(0xe3))/0x8);if(_0x1ca862===_0x9b317a)break;else _0x1095c2['push'](_0x1095c2['shift']());}catch(_0x1e26d5){_0x1095c2['push'](_0x1095c2['shift']());}}}(a159_0x2511,0x39923));import{z}from'zod';function a159_0x2511(){const _0x934658=['enum','asc','314881AJJSNC','minutes_interval','Last','object','Connection\x20name\x20is\x20required','month','clear','desc','boolean','record','All','min','1521355rEWTjm','weekly','string','number','hourly','onFailure','786732wkdCeJ','week','Activation\x20name\x20is\x20required','509526rFZMsE','rows','128gbxTMF','daily','none','2268576BQwMfs','hour','optional','cron','cols','unknown','minute','749344xaiJeP','monthly','onSuccess','masked','array','nullable','131221BDyOjW'];a159_0x2511=function(){return _0x934658;};return a159_0x2511();}export const ScheduleTypeSchema=z[a159_0x5a8672(0xca)]([a159_0x5a8672(0xe5),a159_0x5a8672(0xdc),a159_0x5a8672(0xe4),a159_0x5a8672(0xd9),a159_0x5a8672(0xc4),a159_0x5a8672(0xbf),a159_0x5a8672(0xcd)]);export const RepeatUnitSchema=z[a159_0x5a8672(0xca)]([a159_0x5a8672(0xc2),a159_0x5a8672(0xe7),'day',a159_0x5a8672(0xdf),a159_0x5a8672(0xd1),'once','none']);function a159_0xf26f(_0x1ddc8d,_0x13ea0c){_0x1ddc8d=_0x1ddc8d-0xbf;const _0x2511d2=a159_0x2511();let _0xf26f8a=_0x2511d2[_0x1ddc8d];return _0xf26f8a;}export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x5a8672(0xe8)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a159_0x5a8672(0xdb)]()['optional'](),'repeat_sub_frequency':z[a159_0x5a8672(0xc7)](z['number']())[a159_0x5a8672(0xe8)](),'start_at':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xc8)]()['optional'](),'end_on':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xc8)]()[a159_0x5a8672(0xe8)](),'timezone':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xe8)]()});export const NotificationDefSchema=z[a159_0x5a8672(0xcf)]({'notify_on':z['array'](z[a159_0x5a8672(0xca)]([a159_0x5a8672(0xc5),a159_0x5a8672(0xdd)]))[a159_0x5a8672(0xe8)](),'email_recipients':z[a159_0x5a8672(0xc7)](z[a159_0x5a8672(0xda)]())[a159_0x5a8672(0xe8)]()});export const ActivationColumnDefSchema=z['union']([z['string'](),z[a159_0x5a8672(0xcf)]({'name':z[a159_0x5a8672(0xda)](),'type':z[a159_0x5a8672(0xda)]()['optional'](),'visibility':z['enum'](['clear','masked'])[a159_0x5a8672(0xe8)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x5a8672(0xcf)]({'columns':z[a159_0x5a8672(0xc7)](z['object']({'name':z[a159_0x5a8672(0xda)](),'type':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xe8)](),'visibility':z[a159_0x5a8672(0xca)]([a159_0x5a8672(0xd2),a159_0x5a8672(0xc6)])[a159_0x5a8672(0xe8)]()}))[a159_0x5a8672(0xe8)](),'behavior_table':z['string']()[a159_0x5a8672(0xe8)](),'join_row':z[a159_0x5a8672(0xdb)]()['nullable']()[a159_0x5a8672(0xe8)](),'join_strategy':z['enum']([a159_0x5a8672(0xd6),'First',a159_0x5a8672(0xce),'Top-N'])[a159_0x5a8672(0xe8)](),'formatting':z[a159_0x5a8672(0xca)]([a159_0x5a8672(0xe2),a159_0x5a8672(0xc0)])[a159_0x5a8672(0xe8)](),'order_by':z[a159_0x5a8672(0xc7)](z[a159_0x5a8672(0xcf)]({'key':z[a159_0x5a8672(0xda)](),'order':z['enum']([a159_0x5a8672(0xcb),a159_0x5a8672(0xd3)])}))[a159_0x5a8672(0xe8)]()});export const ActivationDefSchema=z['object']({'name':z[a159_0x5a8672(0xda)]()['min'](0x1,a159_0x5a8672(0xe0)),'description':z['string']()['optional'](),'connection':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xd7)](0x1,a159_0x5a8672(0xd0)),'all_columns':z['boolean']()[a159_0x5a8672(0xe8)](),'columns':z[a159_0x5a8672(0xc7)](ActivationColumnDefSchema)[a159_0x5a8672(0xe8)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a159_0x5a8672(0xd5)](z['string'](),z[a159_0x5a8672(0xc1)]())[a159_0x5a8672(0xe8)](),'activation_template_id':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xc8)]()[a159_0x5a8672(0xe8)](),'behavior':ActivationBehaviorDefSchema[a159_0x5a8672(0xc8)]()[a159_0x5a8672(0xe8)](),'run_after_journey_refresh':z[a159_0x5a8672(0xd4)]()['optional'](),'nested_workflow_project_name':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xe8)](),'nested_workflow_name':z['string']()['optional'](),'lock_enabled':z[a159_0x5a8672(0xd4)]()[a159_0x5a8672(0xe8)]()});
1
+ function a159_0x5525(_0x2c85c9,_0x4549e1){_0x2c85c9=_0x2c85c9-0x81;const _0x4fa4f1=a159_0x4fa4();let _0x55252d=_0x4fa4f1[_0x2c85c9];return _0x55252d;}const a159_0x2ef1af=a159_0x5525;(function(_0x4e0ac5,_0x1b8a5c){const _0x2c5487=a159_0x5525,_0x1ce556=_0x4e0ac5();while(!![]){try{const _0x1e5af7=parseInt(_0x2c5487(0x94))/0x1*(parseInt(_0x2c5487(0x81))/0x2)+parseInt(_0x2c5487(0xa8))/0x3*(-parseInt(_0x2c5487(0x87))/0x4)+-parseInt(_0x2c5487(0x9b))/0x5+-parseInt(_0x2c5487(0x9d))/0x6+parseInt(_0x2c5487(0x93))/0x7+-parseInt(_0x2c5487(0x85))/0x8+-parseInt(_0x2c5487(0x95))/0x9*(-parseInt(_0x2c5487(0x8e))/0xa);if(_0x1e5af7===_0x1b8a5c)break;else _0x1ce556['push'](_0x1ce556['shift']());}catch(_0x48f5ce){_0x1ce556['push'](_0x1ce556['shift']());}}}(a159_0x4fa4,0xbac0f));import{z}from'zod';function a159_0x4fa4(){const _0xc678d4=['468777AHQshZ','masked','Top-N','82PmmCRf','hourly','hour','min','8609688YTWicd','record','24eMCpyN','none','Connection\x20name\x20is\x20required','optional','enum','Activation\x20name\x20is\x20required','string','10SoDsly','nullable','minutes_interval','boolean','once','8808142VIFlKF','18013WsoTTz','20487186toJZnI','daily','Last','object','unknown','onFailure','3616475CNupmi','cron','4627140hmmSqQ','clear','asc','rows','number','day','desc','cols','array','All','week'];a159_0x4fa4=function(){return _0xc678d4;};return a159_0x4fa4();}export const ScheduleTypeSchema=z[a159_0x2ef1af(0x8b)]([a159_0x2ef1af(0x88),a159_0x2ef1af(0x82),a159_0x2ef1af(0x96),'weekly','monthly',a159_0x2ef1af(0x9c),a159_0x2ef1af(0x90)]);export const RepeatUnitSchema=z[a159_0x2ef1af(0x8b)](['minute',a159_0x2ef1af(0x83),a159_0x2ef1af(0xa2),a159_0x2ef1af(0xa7),'month',a159_0x2ef1af(0x92),'none']);export const ScheduleDefSchema=z[a159_0x2ef1af(0x98)]({'type':ScheduleTypeSchema[a159_0x2ef1af(0x8a)](),'repeat_unit':RepeatUnitSchema[a159_0x2ef1af(0x8a)](),'repeat_frequency':z['number']()[a159_0x2ef1af(0x8a)](),'repeat_sub_frequency':z['array'](z['number']())[a159_0x2ef1af(0x8a)](),'start_at':z['string']()['nullable']()[a159_0x2ef1af(0x8a)](),'end_on':z['string']()['nullable']()['optional'](),'timezone':z['string']()[a159_0x2ef1af(0x8a)]()});export const NotificationDefSchema=z[a159_0x2ef1af(0x98)]({'notify_on':z['array'](z[a159_0x2ef1af(0x8b)](['onSuccess',a159_0x2ef1af(0x9a)]))['optional'](),'email_recipients':z[a159_0x2ef1af(0xa5)](z['string']())[a159_0x2ef1af(0x8a)]()});export const ActivationColumnDefSchema=z['union']([z[a159_0x2ef1af(0x8d)](),z[a159_0x2ef1af(0x98)]({'name':z[a159_0x2ef1af(0x8d)](),'type':z[a159_0x2ef1af(0x8d)]()[a159_0x2ef1af(0x8a)](),'visibility':z[a159_0x2ef1af(0x8b)]([a159_0x2ef1af(0x9e),'masked'])[a159_0x2ef1af(0x8a)]()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z[a159_0x2ef1af(0xa5)](z['object']({'name':z[a159_0x2ef1af(0x8d)](),'type':z[a159_0x2ef1af(0x8d)]()[a159_0x2ef1af(0x8a)](),'visibility':z[a159_0x2ef1af(0x8b)]([a159_0x2ef1af(0x9e),a159_0x2ef1af(0xa9)])['optional']()}))[a159_0x2ef1af(0x8a)](),'behavior_table':z[a159_0x2ef1af(0x8d)]()[a159_0x2ef1af(0x8a)](),'join_row':z[a159_0x2ef1af(0xa1)]()[a159_0x2ef1af(0x8f)]()[a159_0x2ef1af(0x8a)](),'join_strategy':z[a159_0x2ef1af(0x8b)]([a159_0x2ef1af(0xa6),'First',a159_0x2ef1af(0x97),a159_0x2ef1af(0xaa)])[a159_0x2ef1af(0x8a)](),'formatting':z[a159_0x2ef1af(0x8b)]([a159_0x2ef1af(0xa0),a159_0x2ef1af(0xa4)])[a159_0x2ef1af(0x8a)](),'order_by':z[a159_0x2ef1af(0xa5)](z[a159_0x2ef1af(0x98)]({'key':z[a159_0x2ef1af(0x8d)](),'order':z[a159_0x2ef1af(0x8b)]([a159_0x2ef1af(0x9f),a159_0x2ef1af(0xa3)])}))['optional']()});export const ActivationDefSchema=z[a159_0x2ef1af(0x98)]({'name':z[a159_0x2ef1af(0x8d)]()[a159_0x2ef1af(0x84)](0x1,a159_0x2ef1af(0x8c)),'description':z['string']()[a159_0x2ef1af(0x8a)](),'connection':z[a159_0x2ef1af(0x8d)]()[a159_0x2ef1af(0x84)](0x1,a159_0x2ef1af(0x89)),'all_columns':z['boolean']()['optional'](),'columns':z[a159_0x2ef1af(0xa5)](ActivationColumnDefSchema)[a159_0x2ef1af(0x8a)](),'schedule':ScheduleDefSchema[a159_0x2ef1af(0x8a)](),'notification':NotificationDefSchema[a159_0x2ef1af(0x8a)](),'connector_config':z[a159_0x2ef1af(0x86)](z['string'](),z[a159_0x2ef1af(0x99)]())['optional'](),'activation_template_id':z['string']()[a159_0x2ef1af(0x8f)]()[a159_0x2ef1af(0x8a)](),'behavior':ActivationBehaviorDefSchema[a159_0x2ef1af(0x8f)]()[a159_0x2ef1af(0x8a)](),'run_after_journey_refresh':z[a159_0x2ef1af(0x91)]()[a159_0x2ef1af(0x8a)](),'nested_workflow_project_name':z[a159_0x2ef1af(0x8d)]()[a159_0x2ef1af(0x8a)](),'nested_workflow_name':z[a159_0x2ef1af(0x8d)]()[a159_0x2ef1af(0x8a)](),'lock_enabled':z[a159_0x2ef1af(0x91)]()[a159_0x2ef1af(0x8a)]()});
@@ -1 +1 @@
1
- function a160_0x1956(_0x34bbdc,_0x2ab6bb){_0x34bbdc=_0x34bbdc-0x1dd;var _0x4aba3b=a160_0x4aba();var _0x1956b4=_0x4aba3b[_0x34bbdc];return _0x1956b4;}(function(_0x3638c8,_0x5dd072){var _0xfa862=a160_0x1956,_0x4e1fd6=_0x3638c8();while(!![]){try{var _0x16988e=parseInt(_0xfa862(0x1de))/0x1+parseInt(_0xfa862(0x1e2))/0x2*(-parseInt(_0xfa862(0x1e4))/0x3)+-parseInt(_0xfa862(0x1e1))/0x4+parseInt(_0xfa862(0x1df))/0x5+parseInt(_0xfa862(0x1e0))/0x6+-parseInt(_0xfa862(0x1e3))/0x7+parseInt(_0xfa862(0x1dd))/0x8*(parseInt(_0xfa862(0x1e5))/0x9);if(_0x16988e===_0x5dd072)break;else _0x4e1fd6['push'](_0x4e1fd6['shift']());}catch(_0x10b881){_0x4e1fd6['push'](_0x4e1fd6['shift']());}}}(a160_0x4aba,0xc9586));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a160_0x4aba(){var _0x14d76c=['9754017qypmsF','4019673oPrknH','9TjGBWm','20460304TssCys','947209YaIWmA','1427855UsQYat','1876770UIQXHj','2180324dtrsxb','2qwTBuR'];a160_0x4aba=function(){return _0x14d76c;};return a160_0x4aba();}
1
+ (function(_0x213350,_0x29f1bb){var _0x53f669=a160_0x2a00,_0x3787bc=_0x213350();while(!![]){try{var _0x4c4e5a=-parseInt(_0x53f669(0x1ad))/0x1*(parseInt(_0x53f669(0x1aa))/0x2)+parseInt(_0x53f669(0x1ab))/0x3*(-parseInt(_0x53f669(0x1ac))/0x4)+parseInt(_0x53f669(0x1ae))/0x5*(-parseInt(_0x53f669(0x1a7))/0x6)+-parseInt(_0x53f669(0x1a8))/0x7+parseInt(_0x53f669(0x1a9))/0x8+parseInt(_0x53f669(0x1a5))/0x9+parseInt(_0x53f669(0x1a6))/0xa;if(_0x4c4e5a===_0x29f1bb)break;else _0x3787bc['push'](_0x3787bc['shift']());}catch(_0x28ae9f){_0x3787bc['push'](_0x3787bc['shift']());}}}(a160_0x51a7,0xa5c03));function a160_0x2a00(_0x5296a9,_0x1eb8e9){_0x5296a9=_0x5296a9-0x1a5;var _0x51a739=a160_0x51a7();var _0x2a00f5=_0x51a739[_0x5296a9];return _0x2a00f5;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a160_0x51a7(){var _0x378796=['7327104psbTdp','17078yiNpUi','1039395XtNLZm','12NUNMPP','43ERtlEO','3636515FCeYKF','1974519CEKXsK','27152920brvWdk','6wwhQeB','7264467FaESbu'];a160_0x51a7=function(){return _0x378796;};return a160_0x51a7();}
@@ -1 +1 @@
1
- const a161_0x764a85=a161_0x2113;(function(_0x49f798,_0x331634){const _0x5d053c=a161_0x2113,_0x3286d9=_0x49f798();while(!![]){try{const _0x53f07d=-parseInt(_0x5d053c(0x1c2))/0x1*(-parseInt(_0x5d053c(0x1bd))/0x2)+-parseInt(_0x5d053c(0x1b9))/0x3+-parseInt(_0x5d053c(0x1c1))/0x4+parseInt(_0x5d053c(0x1c5))/0x5+-parseInt(_0x5d053c(0x1c6))/0x6*(-parseInt(_0x5d053c(0x1c8))/0x7)+parseInt(_0x5d053c(0x1b8))/0x8+-parseInt(_0x5d053c(0x1cd))/0x9;if(_0x53f07d===_0x331634)break;else _0x3286d9['push'](_0x3286d9['shift']());}catch(_0x25e8f8){_0x3286d9['push'](_0x3286d9['shift']());}}}(a161_0x486f,0x9c473));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';function a161_0x2113(_0x2d9a58,_0xb7c4ed){_0x2d9a58=_0x2d9a58-0x1b4;const _0x486fae=a161_0x486f();let _0x2113dd=_0x486fae[_0x2d9a58];return _0x2113dd;}import{ActivationDefSchema}from'./activation-schema.js';function a161_0x486f(){const _0x567211=['ab_test','launched','literal','refine','string','simulation','Journey\x20name\x20is\x20required','min','wait','journeys','decision_point','end','lazy','3724616YDhKFz','2302473KeCaAu','record','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','merge','778932YoNian','optional','array','type','4795836PvoQob','1lbDMpa','jump','length','5776675qLZspl','4162914uVafad','journey','7qUpXUR','no_reentry','number','boolean','object','878688yJclpC','draft','week','activation','enum','filter'];a161_0x486f=function(){return _0x567211;};return a161_0x486f();}export const JourneyStateTypeSchema=z[a161_0x764a85(0x1d1)]([a161_0x764a85(0x1ce),a161_0x764a85(0x1d8),a161_0x764a85(0x1d4)]);export const ReentryModeTypeSchema=z['enum']([a161_0x764a85(0x1c9),'reentry_unless_goal_achieved','reentry_always']);export const WaitUnitTypeSchema=z[a161_0x764a85(0x1d1)](['day',a161_0x764a85(0x1cf)]);export const StepTypeValueSchema=z['enum']([a161_0x764a85(0x1db),a161_0x764a85(0x1d0),a161_0x764a85(0x1b5),a161_0x764a85(0x1d3),a161_0x764a85(0x1bc),a161_0x764a85(0x1c3),a161_0x764a85(0x1b6)]);export const EmbeddedSegmentDefSchema=z[a161_0x764a85(0x1cc)]({'description':z['string']()[a161_0x764a85(0x1be)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x764a85(0x1cc)]({'journey':z['string'](),'stage':z[a161_0x764a85(0x1d7)](),'bundle_id':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)]()});export const CriteriaDefSchema=z[a161_0x764a85(0x1cc)]({'name':z[a161_0x764a85(0x1d7)](),'description':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'segment':z[a161_0x764a85(0x1d7)](),'target':JumpTargetDefSchema[a161_0x764a85(0x1be)]()});const WaitConditionTimeoutDefSchema=z[a161_0x764a85(0x1cc)]({'duration':z[a161_0x764a85(0x1ca)](),'unit':WaitUnitTypeSchema,'next':z['string']()[a161_0x764a85(0x1be)]()}),WaitConditionDefSchema=z['object']({'segment':z[a161_0x764a85(0x1d7)](),'next':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x764a85(0x1be)]()}),WaitStepParamsDefSchema=z['object']({'duration':z[a161_0x764a85(0x1ca)]()[a161_0x764a85(0x1be)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a161_0x764a85(0x1d7)]()['optional'](),'condition':WaitConditionDefSchema[a161_0x764a85(0x1be)](),'days_of_week':z['array'](z[a161_0x764a85(0x1d7)]())[a161_0x764a85(0x1be)]()}),StepBaseFields={'name':z[a161_0x764a85(0x1d7)](),'uuid':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'next':z['string']()['optional']()},WaitStepDefSchema=z[a161_0x764a85(0x1cc)]({...StepBaseFields,'type':z[a161_0x764a85(0x1d5)](a161_0x764a85(0x1db)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x764a85(0x1cc)]({'activation':z[a161_0x764a85(0x1d7)]()}),ActivationStepDefSchema=z[a161_0x764a85(0x1cc)]({...StepBaseFields,'type':z[a161_0x764a85(0x1d5)](a161_0x764a85(0x1d0)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x764a85(0x1cc)]({'name':z[a161_0x764a85(0x1d7)](),'segment':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'segment_id':z[a161_0x764a85(0x1d7)]()['optional'](),'excluded':z[a161_0x764a85(0x1cb)]()[a161_0x764a85(0x1be)](),'next':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z[a161_0x764a85(0x1bf)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x764a85(0x1d5)](a161_0x764a85(0x1b5)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z['object']({'id':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'name':z[a161_0x764a85(0x1d7)](),'percentage':z[a161_0x764a85(0x1ca)](),'next':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)]()}),AbTestStepParamsDefSchema=z[a161_0x764a85(0x1cc)]({'variants':z[a161_0x764a85(0x1bf)](AbTestVariantDefSchema),'unique_id':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'customized_split':z[a161_0x764a85(0x1cb)]()[a161_0x764a85(0x1be)]()}),AbTestStepDefSchema=z[a161_0x764a85(0x1cc)]({...StepBaseFields,'type':z['literal']('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x764a85(0x1d5)](a161_0x764a85(0x1bc))}),JumpStepParamsDefSchema=z[a161_0x764a85(0x1cc)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x764a85(0x1d5)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x764a85(0x1cc)]({...StepBaseFields,'type':z['literal'](a161_0x764a85(0x1b6))})['passthrough']();export const StepDefSchema=z['discriminatedUnion'](a161_0x764a85(0x1c0),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x764a85(0x1cc)]({'name':z['string'](),'description':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'id':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'entry_criteria':CriteriaDefSchema[a161_0x764a85(0x1be)](),'exit_criteria':z['array'](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'steps':z[a161_0x764a85(0x1bf)](StepDefSchema)[a161_0x764a85(0x1be)]()});export const JourneyEntryDefSchema=z[a161_0x764a85(0x1cc)]({'name':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'version':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'state':JourneyStateTypeSchema[a161_0x764a85(0x1be)](),'latest':z[a161_0x764a85(0x1cb)]()[a161_0x764a85(0x1be)](),'stages':z[a161_0x764a85(0x1bf)](StageDefSchema),'id':z['string']()[a161_0x764a85(0x1be)](),'version_number':z[a161_0x764a85(0x1ca)]()[a161_0x764a85(0x1be)](),'goal':CriteriaDefSchema[a161_0x764a85(0x1be)](),'reentry':ReentryModeTypeSchema[a161_0x764a85(0x1be)]()});export const JourneyDefSchema=z[a161_0x764a85(0x1b7)](()=>z[a161_0x764a85(0x1cc)]({'type':z[a161_0x764a85(0x1d5)](a161_0x764a85(0x1c7)),'name':z['string']()[a161_0x764a85(0x1da)](0x1,a161_0x764a85(0x1d9)),'description':z['string']()[a161_0x764a85(0x1be)](),'bundle_id':z['string']()[a161_0x764a85(0x1be)](),'bundle_name':z[a161_0x764a85(0x1d7)]()['optional'](),'folder_id':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'reentry':ReentryModeTypeSchema[a161_0x764a85(0x1be)](),'allow_reentry':z[a161_0x764a85(0x1cb)]()['optional'](),'goal':CriteriaDefSchema[a161_0x764a85(0x1be)](),'id':z['string']()[a161_0x764a85(0x1be)](),'version':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'version_number':z['number']()[a161_0x764a85(0x1be)](),'stages':z[a161_0x764a85(0x1bf)](StageDefSchema)[a161_0x764a85(0x1be)](),'versions':z['array'](JourneyEntryDefSchema)[a161_0x764a85(0x1be)](),'journeys':z[a161_0x764a85(0x1bf)](JourneyEntryDefSchema)[a161_0x764a85(0x1be)](),'segments':z[a161_0x764a85(0x1ba)](z[a161_0x764a85(0x1d7)](),EmbeddedSegmentDefSchema)[a161_0x764a85(0x1be)](),'activations':z[a161_0x764a85(0x1ba)](z['string'](),ActivationDefSchema)['optional']()})[a161_0x764a85(0x1d6)](_0x38a0d8=>{const _0x35f5fb=a161_0x764a85,_0x88cf8d=[_0x38a0d8[_0x35f5fb(0x1b4)],_0x38a0d8['stages'],_0x38a0d8['versions']][_0x35f5fb(0x1d2)](_0x49c7c8=>Array['isArray'](_0x49c7c8)&&_0x49c7c8['length']>0x0)[_0x35f5fb(0x1c4)];return _0x88cf8d===0x1;},{'message':a161_0x764a85(0x1bb)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a161_0x36c977=a161_0x115d;(function(_0x578f06,_0xb016f2){const _0x5de6b6=a161_0x115d,_0x55c157=_0x578f06();while(!![]){try{const _0x5c7144=parseInt(_0x5de6b6(0x1e5))/0x1+-parseInt(_0x5de6b6(0x1dd))/0x2*(-parseInt(_0x5de6b6(0x1db))/0x3)+parseInt(_0x5de6b6(0x1e3))/0x4+-parseInt(_0x5de6b6(0x1e6))/0x5+-parseInt(_0x5de6b6(0x1cd))/0x6+-parseInt(_0x5de6b6(0x1e1))/0x7+parseInt(_0x5de6b6(0x1d0))/0x8;if(_0x5c7144===_0xb016f2)break;else _0x55c157['push'](_0x55c157['shift']());}catch(_0x1196ab){_0x55c157['push'](_0x55c157['shift']());}}}(a161_0x2e5e,0x5197f));import{z}from'zod';function a161_0x115d(_0x419ca5,_0x10c44a){_0x419ca5=_0x419ca5-0x1cb;const _0x2e5e7b=a161_0x2e5e();let _0x115d99=_0x2e5e7b[_0x419ca5];return _0x115d99;}import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x36c977(0x1ec)](['draft',a161_0x36c977(0x1cc),a161_0x36c977(0x1e4)]);export const ReentryModeTypeSchema=z[a161_0x36c977(0x1ec)]([a161_0x36c977(0x1e9),'reentry_unless_goal_achieved',a161_0x36c977(0x1e2)]);export const WaitUnitTypeSchema=z['enum']([a161_0x36c977(0x1d4),a161_0x36c977(0x1de)]);export const StepTypeValueSchema=z[a161_0x36c977(0x1ec)]([a161_0x36c977(0x1df),'activation',a161_0x36c977(0x1ed),'ab_test',a161_0x36c977(0x1d1),a161_0x36c977(0x1d6),a161_0x36c977(0x1e7)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z[a161_0x36c977(0x1d5)](),'stage':z[a161_0x36c977(0x1d5)](),'bundle_id':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)]()});export const CriteriaDefSchema=z[a161_0x36c977(0x1d2)]({'name':z['string'](),'description':z['string']()[a161_0x36c977(0x1ea)](),'segment':z['string'](),'target':JumpTargetDefSchema[a161_0x36c977(0x1ea)]()});const WaitConditionTimeoutDefSchema=z[a161_0x36c977(0x1d2)]({'duration':z[a161_0x36c977(0x1ef)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x36c977(0x1d5)]()['optional']()}),WaitConditionDefSchema=z[a161_0x36c977(0x1d2)]({'segment':z[a161_0x36c977(0x1d5)](),'next':z['string']()[a161_0x36c977(0x1ea)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a161_0x36c977(0x1d2)]({'duration':z['number']()['optional'](),'unit':WaitUnitTypeSchema[a161_0x36c977(0x1ea)](),'wait_until':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)](),'condition':WaitConditionDefSchema[a161_0x36c977(0x1ea)](),'days_of_week':z[a161_0x36c977(0x1d9)](z[a161_0x36c977(0x1d5)]())[a161_0x36c977(0x1ea)]()}),StepBaseFields={'name':z[a161_0x36c977(0x1d5)](),'uuid':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)](),'next':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)]()},WaitStepDefSchema=z[a161_0x36c977(0x1d2)]({...StepBaseFields,'type':z[a161_0x36c977(0x1d8)](a161_0x36c977(0x1df)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a161_0x36c977(0x1d5)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a161_0x36c977(0x1ee)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x36c977(0x1d2)]({'name':z[a161_0x36c977(0x1d5)](),'segment':z[a161_0x36c977(0x1d5)]()['optional'](),'segment_id':z[a161_0x36c977(0x1d5)]()['optional'](),'excluded':z[a161_0x36c977(0x1e0)]()[a161_0x36c977(0x1ea)](),'next':z[a161_0x36c977(0x1d5)]()['optional']()}),DecisionPointStepParamsDefSchema=z[a161_0x36c977(0x1d2)]({'branches':z[a161_0x36c977(0x1d9)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x36c977(0x1d2)]({...StepBaseFields,'type':z['literal'](a161_0x36c977(0x1ed)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x36c977(0x1d2)]({'id':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)](),'name':z[a161_0x36c977(0x1d5)](),'percentage':z['number'](),'next':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a161_0x36c977(0x1d9)](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x36c977(0x1ea)](),'customized_split':z[a161_0x36c977(0x1e0)]()[a161_0x36c977(0x1ea)]()}),AbTestStepDefSchema=z[a161_0x36c977(0x1d2)]({...StepBaseFields,'type':z['literal'](a161_0x36c977(0x1eb)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x36c977(0x1d2)]({...StepBaseFields,'type':z[a161_0x36c977(0x1d8)](a161_0x36c977(0x1d1))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x36c977(0x1d2)]({...StepBaseFields,'type':z[a161_0x36c977(0x1d8)](a161_0x36c977(0x1d6)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x36c977(0x1d2)]({...StepBaseFields,'type':z['literal'](a161_0x36c977(0x1e7))})[a161_0x36c977(0x1d7)]();export const StepDefSchema=z['discriminatedUnion']('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x36c977(0x1d2)]({'name':z[a161_0x36c977(0x1d5)](),'description':z['string']()['optional'](),'id':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)](),'entry_criteria':CriteriaDefSchema[a161_0x36c977(0x1ea)](),'exit_criteria':z[a161_0x36c977(0x1d9)](CriteriaDefSchema)[a161_0x36c977(0x1ea)](),'milestone':CriteriaDefSchema[a161_0x36c977(0x1ea)](),'root_step':z['string']()[a161_0x36c977(0x1ea)](),'steps':z['array'](StepDefSchema)[a161_0x36c977(0x1ea)]()});export const JourneyEntryDefSchema=z[a161_0x36c977(0x1d2)]({'name':z['string']()['optional'](),'version':z[a161_0x36c977(0x1d5)]()['optional'](),'state':JourneyStateTypeSchema[a161_0x36c977(0x1ea)](),'latest':z[a161_0x36c977(0x1e0)]()['optional'](),'stages':z[a161_0x36c977(0x1d9)](StageDefSchema),'id':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)](),'version_number':z[a161_0x36c977(0x1ef)]()[a161_0x36c977(0x1ea)](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema[a161_0x36c977(0x1ea)]()});export const JourneyDefSchema=z['lazy'](()=>z[a161_0x36c977(0x1d2)]({'type':z[a161_0x36c977(0x1d8)](a161_0x36c977(0x1da)),'name':z['string']()[a161_0x36c977(0x1ce)](0x1,'Journey\x20name\x20is\x20required'),'description':z['string']()['optional'](),'bundle_id':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)](),'bundle_name':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)](),'folder_id':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)](),'reentry':ReentryModeTypeSchema[a161_0x36c977(0x1ea)](),'allow_reentry':z[a161_0x36c977(0x1e0)]()['optional'](),'goal':CriteriaDefSchema[a161_0x36c977(0x1ea)](),'id':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)](),'version':z[a161_0x36c977(0x1d5)]()[a161_0x36c977(0x1ea)](),'version_number':z['number']()[a161_0x36c977(0x1ea)](),'stages':z[a161_0x36c977(0x1d9)](StageDefSchema)['optional'](),'versions':z[a161_0x36c977(0x1d9)](JourneyEntryDefSchema)[a161_0x36c977(0x1ea)](),'journeys':z['array'](JourneyEntryDefSchema)[a161_0x36c977(0x1ea)](),'segments':z[a161_0x36c977(0x1cb)](z[a161_0x36c977(0x1d5)](),EmbeddedSegmentDefSchema)[a161_0x36c977(0x1ea)](),'activations':z[a161_0x36c977(0x1cb)](z[a161_0x36c977(0x1d5)](),ActivationDefSchema)[a161_0x36c977(0x1ea)]()})[a161_0x36c977(0x1e8)](_0x593323=>{const _0x3594d8=a161_0x36c977,_0x2c21ed=[_0x593323[_0x3594d8(0x1cf)],_0x593323['stages'],_0x593323['versions']]['filter'](_0x4a8907=>Array['isArray'](_0x4a8907)&&_0x4a8907[_0x3594d8(0x1dc)]>0x0)[_0x3594d8(0x1dc)];return _0x2c21ed===0x1;},{'message':a161_0x36c977(0x1d3)}));function a161_0x2e5e(){const _0x18f18e=['jump','passthrough','literal','array','journey','6vGOeJu','length','303244mJdiin','week','wait','boolean','3750880uNpvgy','reentry_always','2396036FILjYO','launched','230175enJkWL','1948215XtwmHj','end','refine','no_reentry','optional','ab_test','enum','decision_point','activation','number','record','simulation','3586374zAKHoC','min','journeys','5799928zAIKvo','merge','object','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','day','string'];a161_0x2e5e=function(){return _0x18f18e;};return a161_0x2e5e();}const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x3d287f,_0x195250){var _0x3b63d4=a163_0x43d4,_0x463992=_0x3d287f();while(!![]){try{var _0xb236e=-parseInt(_0x3b63d4(0x6a))/0x1+parseInt(_0x3b63d4(0x70))/0x2*(parseInt(_0x3b63d4(0x72))/0x3)+parseInt(_0x3b63d4(0x6d))/0x4*(parseInt(_0x3b63d4(0x6e))/0x5)+parseInt(_0x3b63d4(0x6b))/0x6+parseInt(_0x3b63d4(0x6c))/0x7*(parseInt(_0x3b63d4(0x6f))/0x8)+parseInt(_0x3b63d4(0x71))/0x9+-parseInt(_0x3b63d4(0x69))/0xa;if(_0xb236e===_0x195250)break;else _0x463992['push'](_0x463992['shift']());}catch(_0x37e3e5){_0x463992['push'](_0x463992['shift']());}}}(a163_0x79c1,0xead91));function a163_0x43d4(_0x31ae9f,_0x27ae34){_0x31ae9f=_0x31ae9f-0x69;var _0x79c191=a163_0x79c1();var _0x43d4fc=_0x79c191[_0x31ae9f];return _0x43d4fc;}function a163_0x79c1(){var _0x46dd22=['424622IuLEQu','7307388gmLwNy','15vMubqv','30866830dqbnwO','288085EAaULI','1692492SQcmKJ','21qZDjgv','1589908AIdxJR','5xlnYFM','4756424gAHgZD'];a163_0x79c1=function(){return _0x46dd22;};return a163_0x79c1();}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
1
+ function a163_0x4bc8(_0x1d2465,_0x8f3edf){_0x1d2465=_0x1d2465-0x9a;var _0x212f72=a163_0x212f();var _0x4bc8ed=_0x212f72[_0x1d2465];return _0x4bc8ed;}function a163_0x212f(){var _0x2487ef=['18QYhvUv','2TWCDVM','1308583cnIefR','757398SJRoNu','7331180LxywXT','49yJDKWW','70700LmqAPt','4090184ACTcAT','3707gBjlgl','114468zpzeND','4401843ZpyoqP','88giBzPs'];a163_0x212f=function(){return _0x2487ef;};return a163_0x212f();}(function(_0x5b0c43,_0x5df996){var _0x11474a=a163_0x4bc8,_0x57abc0=_0x5b0c43();while(!![]){try{var _0x429ef2=parseInt(_0x11474a(0x9a))/0x1+-parseInt(_0x11474a(0xa5))/0x2*(parseInt(_0x11474a(0xa2))/0x3)+parseInt(_0x11474a(0xa3))/0x4*(-parseInt(_0x11474a(0x9e))/0x5)+parseInt(_0x11474a(0x9b))/0x6*(-parseInt(_0x11474a(0x9d))/0x7)+parseInt(_0x11474a(0x9f))/0x8+-parseInt(_0x11474a(0xa4))/0x9*(parseInt(_0x11474a(0x9c))/0xa)+-parseInt(_0x11474a(0xa0))/0xb*(-parseInt(_0x11474a(0xa1))/0xc);if(_0x429ef2===_0x5df996)break;else _0x57abc0['push'](_0x57abc0['shift']());}catch(_0x37ddfb){_0x57abc0['push'](_0x57abc0['shift']());}}}(a163_0x212f,0xdd41f));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a164_0x3334ff=a164_0x82b9;(function(_0x3a6691,_0x54d9b6){const _0x597ec8=a164_0x82b9,_0x155281=_0x3a6691();while(!![]){try{const _0x2074e2=-parseInt(_0x597ec8(0x1e5))/0x1+-parseInt(_0x597ec8(0x218))/0x2+parseInt(_0x597ec8(0x210))/0x3+parseInt(_0x597ec8(0x1e0))/0x4*(-parseInt(_0x597ec8(0x1e2))/0x5)+-parseInt(_0x597ec8(0x1df))/0x6*(parseInt(_0x597ec8(0x1fc))/0x7)+parseInt(_0x597ec8(0x211))/0x8*(-parseInt(_0x597ec8(0x1f4))/0x9)+parseInt(_0x597ec8(0x20e))/0xa*(parseInt(_0x597ec8(0x1f5))/0xb);if(_0x2074e2===_0x54d9b6)break;else _0x155281['push'](_0x155281['shift']());}catch(_0x47c3d3){_0x155281['push'](_0x155281['shift']());}}}(a164_0xfa31,0x9fa95));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x1db),a164_0x3334ff(0x209),a164_0x3334ff(0x1e8),a164_0x3334ff(0x1e1),'LessEqual','In','Between',a164_0x3334ff(0x20b),'IsNull',a164_0x3334ff(0x1ec),a164_0x3334ff(0x20d),a164_0x3334ff(0x1f9),a164_0x3334ff(0x200),'EndWith',a164_0x3334ff(0x1ed)]);function a164_0xfa31(){const _0x567e1c=['Between','number','addIssue','Min','string','2197124oPyZcG','include','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','And','column','Segment\x20name\x20is\x20required','Sum','second','lazy','union','array','month','unit','from','realtime','has','Equal','record','superRefine','Value','264ivfkQw','1494196lsjAYa','GreaterEqual','5CFQqJU','value','TimeRange\x20operator\x20requires\x20\x27from\x27','751594gbPPMk','Operator\x20\x27','MISSING_TIME_UNIT','Less','TimeRange\x20operator\x20requires\x20\x27duration\x27','any','discriminatedUnion','TimeWithinPast','TimeRange','LessEqual','custom','duration','Count','boolean','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','27FkFyTu','11vNkaDL','Max','MISSING_BETWEEN_BOUNDS','day','Contain','literal','enum','175847kdcbAG','optional','First','type','StartWith','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Average','year','object','minute','min','operator','exclude','Greater','\x27\x20requires\x20a\x20time\x20unit','Regexp','CountDistinct','TimeWithinNext','36351440huqqil','EndWith','1217652iwcKzb','154736JPmwGa','batch'];a164_0xfa31=function(){return _0x567e1c;};return a164_0xfa31();}export const TimeUnitSchema=z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x1d2),a164_0x3334ff(0x205),'hour',a164_0x3334ff(0x1f8),'week',a164_0x3334ff(0x1d6),a164_0x3334ff(0x203)]);export const AggregationTypeSchema=z['enum']([a164_0x3334ff(0x1f1),'Sum',a164_0x3334ff(0x202),a164_0x3334ff(0x216),'Max','CountDistinct',a164_0x3334ff(0x1fe),'Last']);const TemporalValueSchema=z[a164_0x3334ff(0x1d4)]([z['object']({'timestamp':z[a164_0x3334ff(0x217)]()}),z['object']({'last':z[a164_0x3334ff(0x1d4)]([z[a164_0x3334ff(0x214)](),z[a164_0x3334ff(0x1dc)](z['string'](),z[a164_0x3334ff(0x214)]())]),'unit':z[a164_0x3334ff(0x217)]()})]),OperatorValueSchema=z[a164_0x3334ff(0x1d4)]([z['string'](),z[a164_0x3334ff(0x214)](),z[a164_0x3334ff(0x1f2)](),TemporalValueSchema,z[a164_0x3334ff(0x1d5)](z['union']([z[a164_0x3334ff(0x217)](),z[a164_0x3334ff(0x214)](),z[a164_0x3334ff(0x1f2)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x3334ff(0x1db),a164_0x3334ff(0x209),a164_0x3334ff(0x1e1),a164_0x3334ff(0x1e8),a164_0x3334ff(0x1ee),'In',a164_0x3334ff(0x1f9),a164_0x3334ff(0x200),a164_0x3334ff(0x20f),'Regexp','TimeWithinPast','TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a164_0x3334ff(0x1ec),a164_0x3334ff(0x20d)]);export const OperatorDefSchema=z[a164_0x3334ff(0x204)]({'type':OperatorTypeSchema,'not':z[a164_0x3334ff(0x1f2)]()[a164_0x3334ff(0x1fd)](),'value':OperatorValueSchema[a164_0x3334ff(0x1fd)](),'min':z['union']([z[a164_0x3334ff(0x214)](),z[a164_0x3334ff(0x217)](),TemporalValueSchema])[a164_0x3334ff(0x1fd)](),'max':z[a164_0x3334ff(0x1d4)]([z[a164_0x3334ff(0x214)](),z[a164_0x3334ff(0x217)](),TemporalValueSchema])[a164_0x3334ff(0x1fd)](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z[a164_0x3334ff(0x214)]()['optional'](),'week':z[a164_0x3334ff(0x214)]()[a164_0x3334ff(0x1fd)](),'month':z[a164_0x3334ff(0x214)]()[a164_0x3334ff(0x1fd)](),'year':z[a164_0x3334ff(0x214)]()['optional'](),'hour':z[a164_0x3334ff(0x214)]()[a164_0x3334ff(0x1fd)](),'minute':z[a164_0x3334ff(0x214)]()[a164_0x3334ff(0x1fd)](),'second':z[a164_0x3334ff(0x214)]()[a164_0x3334ff(0x1fd)]()})[a164_0x3334ff(0x1fd)](),'from':z[a164_0x3334ff(0x204)]({'last':z[a164_0x3334ff(0x1d4)]([z['number'](),z['string']()]),'unit':TimeUnitSchema})[a164_0x3334ff(0x1fd)](),'reverse':z['boolean']()['optional']()})[a164_0x3334ff(0x1dd)]((_0x3fc337,_0x174f06)=>{const _0x57ced8=a164_0x3334ff;OPERATORS_REQUIRING_VALUE[_0x57ced8(0x1da)](_0x3fc337['type'])&&(_0x3fc337[_0x57ced8(0x1e3)]===undefined||_0x3fc337[_0x57ced8(0x1e3)]===null)&&_0x174f06[_0x57ced8(0x215)]({'code':'custom','message':_0x57ced8(0x1e6)+_0x3fc337['type']+'\x27\x20requires\x20a\x20value','path':[_0x57ced8(0x1e3)]}),_0x3fc337[_0x57ced8(0x1ff)]===_0x57ced8(0x213)&&_0x3fc337[_0x57ced8(0x206)]===undefined&&_0x3fc337['max']===undefined&&_0x174f06[_0x57ced8(0x215)]({'code':_0x57ced8(0x1ef),'message':_0x57ced8(0x201),'params':{'validationCode':_0x57ced8(0x1f7)}}),OPERATORS_REQUIRING_UNIT[_0x57ced8(0x1da)](_0x3fc337[_0x57ced8(0x1ff)])&&_0x3fc337[_0x57ced8(0x1e3)]!==undefined&&!_0x3fc337[_0x57ced8(0x1d7)]&&_0x174f06['addIssue']({'code':_0x57ced8(0x1ef),'message':_0x57ced8(0x1e6)+_0x3fc337[_0x57ced8(0x1ff)]+_0x57ced8(0x20a),'path':[_0x57ced8(0x1d7)],'params':{'validationCode':_0x57ced8(0x1e7)}}),_0x3fc337[_0x57ced8(0x1ff)]===_0x57ced8(0x1ed)&&(!_0x3fc337['duration']&&_0x174f06[_0x57ced8(0x215)]({'code':_0x57ced8(0x1ef),'message':_0x57ced8(0x1e9),'path':[_0x57ced8(0x1f0)]}),!_0x3fc337[_0x57ced8(0x1d8)]&&_0x174f06[_0x57ced8(0x215)]({'code':'custom','message':_0x57ced8(0x1e4),'path':[_0x57ced8(0x1d8)]}));});function a164_0x82b9(_0x5ec3b7,_0x3add01){_0x5ec3b7=_0x5ec3b7-0x1d0;const _0xfa31ae=a164_0xfa31();let _0x82b9c8=_0xfa31ae[_0x5ec3b7];return _0x82b9c8;}export const ArrayMatchingSchema=z[a164_0x3334ff(0x1d4)]([z[a164_0x3334ff(0x1fa)](a164_0x3334ff(0x1ea)),z[a164_0x3334ff(0x1fa)]('all'),z['object']({'atLeast':z[a164_0x3334ff(0x214)]()}),z[a164_0x3334ff(0x204)]({'atMost':z[a164_0x3334ff(0x214)]()}),z[a164_0x3334ff(0x204)]({'exactly':z[a164_0x3334ff(0x214)]()})]);export const AggregationDefSchema=z[a164_0x3334ff(0x1eb)](a164_0x3334ff(0x1ff),[z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x1d1),'Min',a164_0x3334ff(0x1f6),a164_0x3334ff(0x202)]),'column':z[a164_0x3334ff(0x217)](),'groupingColumns':z[a164_0x3334ff(0x1d5)](z['string']())[a164_0x3334ff(0x1fd)]()}),z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)]('Count'),'groupingColumns':z[a164_0x3334ff(0x1d5)](z[a164_0x3334ff(0x217)]())[a164_0x3334ff(0x1fd)]()}),z['object']({'type':z[a164_0x3334ff(0x1fa)](a164_0x3334ff(0x20c)),'columns':z['array'](z[a164_0x3334ff(0x217)]())}),z[a164_0x3334ff(0x204)]({'type':z['enum']([a164_0x3334ff(0x1fe),'Last']),'column':z['string'](),'orderColumn':z['string'](),'groupingColumns':z[a164_0x3334ff(0x1d5)](z[a164_0x3334ff(0x217)]())[a164_0x3334ff(0x1fd)]()})]);export const TimeWindowDefSchema=z[a164_0x3334ff(0x204)]({'duration':z[a164_0x3334ff(0x214)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x3334ff(0x1ec),a164_0x3334ff(0x20d),a164_0x3334ff(0x1ed)]);export const FilterColumnConditionDefSchema=z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)]('Column'),'column':z[a164_0x3334ff(0x217)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3334ff(0x1fd)]()})[a164_0x3334ff(0x1dd)]((_0x4a3431,_0x24ea5f)=>{const _0x23124a=a164_0x3334ff,_0x24dd1e=_0x4a3431[_0x23124a(0x207)][_0x23124a(0x1ff)];_0x4a3431[_0x23124a(0x21c)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x23124a(0x1da)](_0x24dd1e)&&_0x24ea5f[_0x23124a(0x215)]({'code':_0x23124a(0x1ef),'message':_0x23124a(0x21a)+_0x24dd1e+'\x27)','path':[_0x23124a(0x207),_0x23124a(0x1ff)]}):TIMESTAMP_OPERATORS[_0x23124a(0x1da)](_0x24dd1e)&&_0x24ea5f['addIssue']({'code':_0x23124a(0x1ef),'message':_0x23124a(0x1e6)+_0x24dd1e+_0x23124a(0x1f3),'path':[_0x23124a(0x207),'type']});});export const FilterRuleDefSchema=z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)](a164_0x3334ff(0x21b)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x3334ff(0x1d3)](()=>z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)](a164_0x3334ff(0x1de)),'attribute':z[a164_0x3334ff(0x217)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3334ff(0x1fd)](),'exclude':z[a164_0x3334ff(0x1f2)]()['optional'](),'aggregation':AggregationDefSchema[a164_0x3334ff(0x1fd)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a164_0x3334ff(0x1fd)](),'limit':z[a164_0x3334ff(0x214)]()['optional']()}));export const BehaviorConditionDefSchema=z[a164_0x3334ff(0x1d3)](()=>z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)]('Behavior'),'attribute':z[a164_0x3334ff(0x217)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3334ff(0x1fd)](),'exclude':z[a164_0x3334ff(0x1f2)]()[a164_0x3334ff(0x1fd)](),'aggregation':AggregationDefSchema[a164_0x3334ff(0x1fd)](),'source':z[a164_0x3334ff(0x217)]()[a164_0x3334ff(0x1fd)](),'filter':FilterRuleDefSchema[a164_0x3334ff(0x1fd)](),'timeWindow':TimeWindowDefSchema[a164_0x3334ff(0x1fd)](),'limit':z[a164_0x3334ff(0x214)]()['optional']()}));export const ColumnConditionDefSchema=z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)]('Column'),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x21b),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x3334ff(0x217)]()[a164_0x3334ff(0x1fd)]()}));export const SegmentRefConditionDefSchema=z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x219),a164_0x3334ff(0x208)]),'segment':z[a164_0x3334ff(0x217)]()['min'](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z['lazy'](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x3334ff(0x1d3)](()=>z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fb)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x3334ff(0x217)]()['optional']()}));export const SegmentDefSchema=z['object']({'type':z['literal']('segment')[a164_0x3334ff(0x1fd)](),'name':z[a164_0x3334ff(0x217)]()[a164_0x3334ff(0x206)](0x1,a164_0x3334ff(0x1d0)),'description':z['string']()[a164_0x3334ff(0x1fd)](),'folder':z[a164_0x3334ff(0x217)]()[a164_0x3334ff(0x1fd)](),'rule':RuleDefSchema[a164_0x3334ff(0x1fd)](),'kind':z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x212),a164_0x3334ff(0x1d9),'funnel_stage'])[a164_0x3334ff(0x1fd)](),'visible':z[a164_0x3334ff(0x1f2)]()['optional'](),'activations':z[a164_0x3334ff(0x1d5)](z[a164_0x3334ff(0x1ea)]())[a164_0x3334ff(0x1fd)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a164_0x563654=a164_0x4688;function a164_0x4688(_0x4477ca,_0x4876f2){_0x4477ca=_0x4477ca-0xa1;const _0x2523e9=a164_0x2523();let _0x468829=_0x2523e9[_0x4477ca];return _0x468829;}(function(_0x4d28ab,_0x5141f3){const _0x58ce2d=a164_0x4688,_0x82e09a=_0x4d28ab();while(!![]){try{const _0x580567=-parseInt(_0x58ce2d(0xe4))/0x1*(parseInt(_0x58ce2d(0xc6))/0x2)+parseInt(_0x58ce2d(0xad))/0x3+-parseInt(_0x58ce2d(0xe9))/0x4+-parseInt(_0x58ce2d(0xd9))/0x5*(-parseInt(_0x58ce2d(0xbc))/0x6)+parseInt(_0x58ce2d(0xe0))/0x7*(parseInt(_0x58ce2d(0xce))/0x8)+-parseInt(_0x58ce2d(0xe2))/0x9+-parseInt(_0x58ce2d(0xa7))/0xa*(-parseInt(_0x58ce2d(0xd5))/0xb);if(_0x580567===_0x5141f3)break;else _0x82e09a['push'](_0x82e09a['shift']());}catch(_0x1538f6){_0x82e09a['push'](_0x82e09a['shift']());}}}(a164_0x2523,0x6eb7a));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x563654(0xae)]([a164_0x563654(0xa8),a164_0x563654(0xc3),a164_0x563654(0xd2),'GreaterEqual','LessEqual','In','Between',a164_0x563654(0xea),a164_0x563654(0xb4),a164_0x563654(0xa5),a164_0x563654(0xec),'Contain','StartWith','EndWith',a164_0x563654(0xbb)]);export const TimeUnitSchema=z[a164_0x563654(0xae)](['second',a164_0x563654(0xe7),a164_0x563654(0xd1),a164_0x563654(0xcf),a164_0x563654(0xa9),'month','year']);export const AggregationTypeSchema=z[a164_0x563654(0xae)]([a164_0x563654(0xb3),'Sum',a164_0x563654(0xb1),a164_0x563654(0xc5),a164_0x563654(0xa3),'CountDistinct',a164_0x563654(0xd3),a164_0x563654(0xdd)]);const TemporalValueSchema=z[a164_0x563654(0xda)]([z[a164_0x563654(0xc4)]({'timestamp':z[a164_0x563654(0xb8)]()}),z[a164_0x563654(0xc4)]({'last':z[a164_0x563654(0xda)]([z[a164_0x563654(0xd0)](),z[a164_0x563654(0xc8)](z[a164_0x563654(0xb8)](),z[a164_0x563654(0xd0)]())]),'unit':z[a164_0x563654(0xb8)]()})]),OperatorValueSchema=z[a164_0x563654(0xda)]([z[a164_0x563654(0xb8)](),z[a164_0x563654(0xd0)](),z[a164_0x563654(0xdc)](),TemporalValueSchema,z['array'](z[a164_0x563654(0xda)]([z[a164_0x563654(0xb8)](),z['number'](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x563654(0xa8),a164_0x563654(0xc3),a164_0x563654(0xe6),'Less',a164_0x563654(0xc0),'In','Contain',a164_0x563654(0xc7),a164_0x563654(0xed),a164_0x563654(0xea),a164_0x563654(0xa5),a164_0x563654(0xec)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a164_0x563654(0xec)]);function a164_0x2523(){const _0x115336=['Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','unit','optional','4665bptWqj','union','all','boolean','Last','operator','segment','1470hQZlcc','MISSING_BETWEEN_BOUNDS','5584977QzosqO','funnel_stage','1HvRolX','column','GreaterEqual','minute','from','54968cihwtR','Regexp','any','TimeWithinNext','EndWith','lazy','array','Max','And','TimeWithinPast','literal','20tuPNsd','Equal','week','Operator\x20\x27','custom','addIssue','814743qplttV','enum','superRefine','Sum','Average','min','Count','IsNull','MISSING_TIME_UNIT','batch','exclude','string','has','value','TimeRange','5442irHkDR','CountDistinct','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','include','LessEqual','type','Behavior','Greater','object','Min','1752222umxzpD','StartWith','record','Segment\x20name\x20is\x20required','Column','realtime','duration','Between','26296ehqGVm','day','number','hour','Less','First','Value','857021zPDtXI'];a164_0x2523=function(){return _0x115336;};return a164_0x2523();}export const OperatorDefSchema=z[a164_0x563654(0xc4)]({'type':OperatorTypeSchema,'not':z[a164_0x563654(0xdc)]()[a164_0x563654(0xd8)](),'value':OperatorValueSchema['optional'](),'min':z[a164_0x563654(0xda)]([z[a164_0x563654(0xd0)](),z['string'](),TemporalValueSchema])[a164_0x563654(0xd8)](),'max':z['union']([z['number'](),z[a164_0x563654(0xb8)](),TemporalValueSchema])[a164_0x563654(0xd8)](),'unit':TimeUnitSchema[a164_0x563654(0xd8)](),'duration':z['object']({'day':z[a164_0x563654(0xd0)]()[a164_0x563654(0xd8)](),'week':z[a164_0x563654(0xd0)]()[a164_0x563654(0xd8)](),'month':z[a164_0x563654(0xd0)]()[a164_0x563654(0xd8)](),'year':z[a164_0x563654(0xd0)]()[a164_0x563654(0xd8)](),'hour':z[a164_0x563654(0xd0)]()[a164_0x563654(0xd8)](),'minute':z[a164_0x563654(0xd0)]()[a164_0x563654(0xd8)](),'second':z[a164_0x563654(0xd0)]()[a164_0x563654(0xd8)]()})[a164_0x563654(0xd8)](),'from':z[a164_0x563654(0xc4)]({'last':z[a164_0x563654(0xda)]([z[a164_0x563654(0xd0)](),z['string']()]),'unit':TimeUnitSchema})[a164_0x563654(0xd8)](),'reverse':z[a164_0x563654(0xdc)]()[a164_0x563654(0xd8)]()})['superRefine']((_0x295bf7,_0x325f2c)=>{const _0x30707d=a164_0x563654;OPERATORS_REQUIRING_VALUE[_0x30707d(0xb9)](_0x295bf7[_0x30707d(0xc1)])&&(_0x295bf7['value']===undefined||_0x295bf7[_0x30707d(0xba)]===null)&&_0x325f2c[_0x30707d(0xac)]({'code':_0x30707d(0xab),'message':_0x30707d(0xaa)+_0x295bf7['type']+'\x27\x20requires\x20a\x20value','path':[_0x30707d(0xba)]}),_0x295bf7['type']===_0x30707d(0xcd)&&_0x295bf7[_0x30707d(0xb2)]===undefined&&_0x295bf7['max']===undefined&&_0x325f2c['addIssue']({'code':'custom','message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x30707d(0xe1)}}),OPERATORS_REQUIRING_UNIT[_0x30707d(0xb9)](_0x295bf7[_0x30707d(0xc1)])&&_0x295bf7[_0x30707d(0xba)]!==undefined&&!_0x295bf7[_0x30707d(0xd7)]&&_0x325f2c['addIssue']({'code':'custom','message':'Operator\x20\x27'+_0x295bf7[_0x30707d(0xc1)]+'\x27\x20requires\x20a\x20time\x20unit','path':['unit'],'params':{'validationCode':_0x30707d(0xb5)}}),_0x295bf7['type']===_0x30707d(0xbb)&&(!_0x295bf7[_0x30707d(0xcc)]&&_0x325f2c[_0x30707d(0xac)]({'code':_0x30707d(0xab),'message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':[_0x30707d(0xcc)]}),!_0x295bf7[_0x30707d(0xe8)]&&_0x325f2c[_0x30707d(0xac)]({'code':'custom','message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x30707d(0xe8)]}));});export const ArrayMatchingSchema=z['union']([z[a164_0x563654(0xa6)](a164_0x563654(0xeb)),z[a164_0x563654(0xa6)](a164_0x563654(0xdb)),z[a164_0x563654(0xc4)]({'atLeast':z[a164_0x563654(0xd0)]()}),z['object']({'atMost':z[a164_0x563654(0xd0)]()}),z['object']({'exactly':z[a164_0x563654(0xd0)]()})]);export const AggregationDefSchema=z['discriminatedUnion']('type',[z[a164_0x563654(0xc4)]({'type':z[a164_0x563654(0xae)]([a164_0x563654(0xb0),a164_0x563654(0xc5),'Max',a164_0x563654(0xb1)]),'column':z['string'](),'groupingColumns':z[a164_0x563654(0xa2)](z['string']())[a164_0x563654(0xd8)]()}),z['object']({'type':z[a164_0x563654(0xa6)](a164_0x563654(0xb3)),'groupingColumns':z['array'](z[a164_0x563654(0xb8)]())[a164_0x563654(0xd8)]()}),z['object']({'type':z[a164_0x563654(0xa6)](a164_0x563654(0xbd)),'columns':z[a164_0x563654(0xa2)](z[a164_0x563654(0xb8)]())}),z[a164_0x563654(0xc4)]({'type':z['enum'](['First','Last']),'column':z['string'](),'orderColumn':z[a164_0x563654(0xb8)](),'groupingColumns':z['array'](z['string']())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x563654(0xa5),'TimeWithinNext',a164_0x563654(0xbb)]);export const FilterColumnConditionDefSchema=z[a164_0x563654(0xc4)]({'type':z[a164_0x563654(0xa6)](a164_0x563654(0xca)),'column':z[a164_0x563654(0xb8)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x563654(0xd8)]()})[a164_0x563654(0xaf)]((_0x36dd6d,_0x379911)=>{const _0x55d9dc=a164_0x563654,_0x391161=_0x36dd6d[_0x55d9dc(0xde)][_0x55d9dc(0xc1)];_0x36dd6d[_0x55d9dc(0xe5)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x55d9dc(0xb9)](_0x391161)&&_0x379911['addIssue']({'code':_0x55d9dc(0xab),'message':_0x55d9dc(0xd6)+_0x391161+'\x27)','path':[_0x55d9dc(0xde),_0x55d9dc(0xc1)]}):TIMESTAMP_OPERATORS[_0x55d9dc(0xb9)](_0x391161)&&_0x379911['addIssue']({'code':_0x55d9dc(0xab),'message':_0x55d9dc(0xaa)+_0x391161+_0x55d9dc(0xbe),'path':[_0x55d9dc(0xde),'type']});});export const FilterRuleDefSchema=z['object']({'type':z[a164_0x563654(0xa6)](a164_0x563654(0xa4)),'conditions':z[a164_0x563654(0xa2)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x563654(0xa1)](()=>z[a164_0x563654(0xc4)]({'type':z[a164_0x563654(0xa6)](a164_0x563654(0xd4)),'attribute':z[a164_0x563654(0xb8)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x563654(0xd8)](),'exclude':z[a164_0x563654(0xdc)]()[a164_0x563654(0xd8)](),'aggregation':AggregationDefSchema[a164_0x563654(0xd8)](),'source':z[a164_0x563654(0xb8)]()[a164_0x563654(0xd8)](),'filter':FilterRuleDefSchema[a164_0x563654(0xd8)](),'limit':z[a164_0x563654(0xd0)]()[a164_0x563654(0xd8)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a164_0x563654(0xc4)]({'type':z[a164_0x563654(0xa6)](a164_0x563654(0xc2)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x563654(0xd8)](),'exclude':z[a164_0x563654(0xdc)]()['optional'](),'aggregation':AggregationDefSchema[a164_0x563654(0xd8)](),'source':z[a164_0x563654(0xb8)]()[a164_0x563654(0xd8)](),'filter':FilterRuleDefSchema[a164_0x563654(0xd8)](),'timeWindow':TimeWindowDefSchema[a164_0x563654(0xd8)](),'limit':z['number']()[a164_0x563654(0xd8)]()}));export const ColumnConditionDefSchema=z[a164_0x563654(0xc4)]({'type':z[a164_0x563654(0xa6)](a164_0x563654(0xca)),'column':z[a164_0x563654(0xb8)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a164_0x563654(0xc4)]({'type':z[a164_0x563654(0xae)]([a164_0x563654(0xa4),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x563654(0xb8)]()[a164_0x563654(0xd8)]()}));export const SegmentRefConditionDefSchema=z[a164_0x563654(0xc4)]({'type':z[a164_0x563654(0xae)]([a164_0x563654(0xbf),a164_0x563654(0xb7)]),'segment':z[a164_0x563654(0xb8)]()[a164_0x563654(0xb2)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a164_0x563654(0xa1)](()=>z[a164_0x563654(0xda)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x563654(0xa1)](()=>z[a164_0x563654(0xc4)]({'type':z[a164_0x563654(0xae)]([a164_0x563654(0xa4),'Or']),'conditions':z[a164_0x563654(0xa2)](ConditionDefSchema),'description':z['string']()[a164_0x563654(0xd8)]()}));export const SegmentDefSchema=z[a164_0x563654(0xc4)]({'type':z[a164_0x563654(0xa6)](a164_0x563654(0xdf))['optional'](),'name':z[a164_0x563654(0xb8)]()[a164_0x563654(0xb2)](0x1,a164_0x563654(0xc9)),'description':z['string']()[a164_0x563654(0xd8)](),'folder':z[a164_0x563654(0xb8)]()[a164_0x563654(0xd8)](),'rule':RuleDefSchema[a164_0x563654(0xd8)](),'kind':z[a164_0x563654(0xae)]([a164_0x563654(0xb6),a164_0x563654(0xcb),a164_0x563654(0xe3)])[a164_0x563654(0xd8)](),'visible':z[a164_0x563654(0xdc)]()[a164_0x563654(0xd8)](),'activations':z[a164_0x563654(0xa2)](z['any']())[a164_0x563654(0xd8)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a165_0x4870a3=a165_0x5097;(function(_0x5ecea7,_0x49a2d3){const _0xbd1675=a165_0x5097,_0x3ccf12=_0x5ecea7();while(!![]){try{const _0x4867aa=parseInt(_0xbd1675(0x201))/0x1+parseInt(_0xbd1675(0x204))/0x2*(parseInt(_0xbd1675(0x20c))/0x3)+parseInt(_0xbd1675(0x20f))/0x4*(-parseInt(_0xbd1675(0x20e))/0x5)+parseInt(_0xbd1675(0x210))/0x6+-parseInt(_0xbd1675(0x1f9))/0x7*(-parseInt(_0xbd1675(0x209))/0x8)+-parseInt(_0xbd1675(0x207))/0x9*(-parseInt(_0xbd1675(0x208))/0xa)+-parseInt(_0xbd1675(0x1f7))/0xb;if(_0x4867aa===_0x49a2d3)break;else _0x3ccf12['push'](_0x3ccf12['shift']());}catch(_0x4bde5f){_0x3ccf12['push'](_0x3ccf12['shift']());}}}(a165_0x5401,0x45ee9));import{readFileSync}from'fs';import*as a165_0x323c24 from'path';import*as a165_0x13fb2f from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';function a165_0x5401(){const _0x1225de=['810400CzsnTg','1656lfoOOf','message','valid','3DzZvqv','push','14730GDrkZp','56QKaovT','2289564lmugwd','parseDocument','campaign','object','type','error','not\x20a\x20','YAML_PARSE_ERROR','campaign_type','toJSON','filterType','15571710iYuEfa','email','10493jurdFa','segment','has','template','basename','length','warnings','map','364979oEHQYw','journey','YAML\x20parse\x20error:\x20','562458dqzssv','relative','result','45KclBHV'];a165_0x5401=function(){return _0x1225de;};return a165_0x5401();}import{validateCampaignDef}from'../engage/campaign-validator.js';function a165_0x5097(_0x246e2a,_0x5cc5ee){_0x246e2a=_0x246e2a-0x1f3;const _0x540142=a165_0x5401();let _0x50972c=_0x540142[_0x246e2a];return _0x50972c;}import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0x4870a3(0x1f8),a165_0x4870a3(0x20d)]);export function isJourneyDef(_0xb34502){const _0x1ed1bf=a165_0x4870a3;return typeof _0xb34502===_0x1ed1bf(0x213)&&_0xb34502!==null&&_0x1ed1bf(0x214)in _0xb34502&&_0xb34502[_0x1ed1bf(0x214)]===_0x1ed1bf(0x202);}export function isCampaignDef(_0x3d97d5){const _0x4836d3=a165_0x4870a3;if(typeof _0x3d97d5!==_0x4836d3(0x213)||_0x3d97d5===null)return![];const _0x55413e=_0x3d97d5,_0x5000de=VALID_CAMPAIGN_TYPES[_0x4836d3(0x1fb)](_0x55413e[_0x4836d3(0x1f4)]);if(_0x55413e['type']==='campaign'&&_0x5000de)return!![];if(_0x5000de&&!_0x55413e['type'])return!![];return![];}export function isTemplateDef(_0x3a31f2){const _0x3dab41=a165_0x4870a3;return typeof _0x3a31f2==='object'&&_0x3a31f2!==null&&_0x3dab41(0x214)in _0x3a31f2&&_0x3a31f2['type']===_0x3dab41(0x1fc);}export function isValidationResult(_0x30833a){return!('skipped'in _0x30833a);}export function createParseErrorResult(_0x5f4377,_0x15bb0d,_0x1967f4,_0xc557ce,_0x48a8e5='segment'){const _0x4e34c4=a165_0x4870a3;return{'filePath':_0x5f4377,'relativePath':_0x15bb0d,'source':_0x1967f4,'result':{'valid':![],'errors':[{'level':_0x4e34c4(0x215),'path':'','code':_0x4e34c4(0x1f3),'message':_0xc557ce}],'warnings':[]},'fileType':_0x48a8e5};}export function validateYamlFile(_0x13bc71,_0x137176,_0x57a7b7={}){const _0x406343=a165_0x4870a3,_0x178685=a165_0x323c24[_0x406343(0x205)](_0x137176,_0x13bc71)||a165_0x323c24[_0x406343(0x1fd)](_0x13bc71);try{const _0x2b390a=readFileSync(_0x13bc71,'utf-8'),_0x37d1ba=a165_0x13fb2f[_0x406343(0x211)](_0x2b390a),_0x2acc87=_0x37d1ba[_0x406343(0x1f5)]();if(!_0x2acc87)return createParseErrorResult(_0x13bc71,_0x178685,_0x2b390a,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x4d1589;if(isJourneyDef(_0x2acc87))_0x4d1589=_0x406343(0x202);else{if(isCampaignDef(_0x2acc87))_0x4d1589=_0x406343(0x212);else isTemplateDef(_0x2acc87)?_0x4d1589=_0x406343(0x1fc):_0x4d1589=_0x406343(0x1fa);}if(_0x57a7b7[_0x406343(0x1f6)]&&_0x4d1589!==_0x57a7b7[_0x406343(0x1f6)])return{'filePath':_0x13bc71,'relativePath':_0x178685,'skipped':!![],'reason':_0x406343(0x216)+_0x57a7b7[_0x406343(0x1f6)]};const _0x208dab={'source':_0x2b390a,'document':_0x37d1ba};let _0x580ab0;if(_0x4d1589==='journey')_0x580ab0=validateJourneyDef(_0x2acc87,_0x208dab);else{if(_0x4d1589===_0x406343(0x212))_0x580ab0=validateCampaignDef(_0x2acc87,_0x208dab);else _0x4d1589===_0x406343(0x1fc)?_0x580ab0=validateTemplateDef(_0x2acc87,_0x208dab):_0x580ab0=validateSegmentDef(_0x2acc87,_0x208dab);}return{'filePath':_0x13bc71,'relativePath':_0x178685,'source':_0x2b390a,'result':_0x580ab0,'fileType':_0x4d1589};}catch(_0x29000d){const _0x1572d8=_0x29000d instanceof Error?_0x29000d[_0x406343(0x20a)]:String(_0x29000d);return createParseErrorResult(_0x13bc71,_0x178685,'',_0x406343(0x203)+_0x1572d8);}}export function validateYamlFiles(_0xf87bcc,_0x47ceb1,_0x3cdbb0={}){const _0x1742b7=a165_0x4870a3;return _0xf87bcc[_0x1742b7(0x200)](_0x4e5ba6=>validateYamlFile(_0x4e5ba6,_0x47ceb1,_0x3cdbb0));}export function calculateSummary(_0x1e41bc){const _0x293bf2=a165_0x4870a3;let _0x59a865=0x0,_0x389ec5=0x0,_0x8fdeaa=0x0,_0x39ddb3=0x0;for(const _0x31f9b8 of _0x1e41bc){if(!isValidationResult(_0x31f9b8)){_0x39ddb3++;continue;}_0x31f9b8[_0x293bf2(0x206)][_0x293bf2(0x20b)]?_0x59a865++:_0x389ec5++,_0x8fdeaa+=_0x31f9b8['result'][_0x293bf2(0x1ff)][_0x293bf2(0x1fe)];}return{'validCount':_0x59a865,'invalidCount':_0x389ec5,'warningCount':_0x8fdeaa,'skippedCount':_0x39ddb3,'hasErrors':_0x389ec5>0x0};}
1
+ const a165_0x4b832e=a165_0x4d0e;(function(_0x1ce71e,_0x127c7a){const _0x265000=a165_0x4d0e,_0x213bdd=_0x1ce71e();while(!![]){try{const _0x106f2f=parseInt(_0x265000(0xf3))/0x1*(-parseInt(_0x265000(0xfd))/0x2)+parseInt(_0x265000(0xf5))/0x3+parseInt(_0x265000(0x106))/0x4+-parseInt(_0x265000(0xf2))/0x5*(parseInt(_0x265000(0xee))/0x6)+-parseInt(_0x265000(0x102))/0x7+-parseInt(_0x265000(0xff))/0x8+parseInt(_0x265000(0xfe))/0x9;if(_0x106f2f===_0x127c7a)break;else _0x213bdd['push'](_0x213bdd['shift']());}catch(_0x130881){_0x213bdd['push'](_0x213bdd['shift']());}}}(a165_0x22d6,0x92851));import{readFileSync}from'fs';import*as a165_0x10f737 from'path';import*as a165_0x1b20dc 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 a165_0x4d0e(_0x43c491,_0x245a4b){_0x43c491=_0x43c491-0xe4;const _0x22d6ff=a165_0x22d6();let _0x4d0e9c=_0x22d6ff[_0x43c491];return _0x4d0e9c;}const VALID_CAMPAIGN_TYPES=new Set([a165_0x4b832e(0xeb),a165_0x4b832e(0xe9)]);export function isJourneyDef(_0x2561b7){const _0x1272da=a165_0x4b832e;return typeof _0x2561b7==='object'&&_0x2561b7!==null&&'type'in _0x2561b7&&_0x2561b7[_0x1272da(0xe6)]==='journey';}export function isCampaignDef(_0x3e4b0d){const _0xaa4bf=a165_0x4b832e;if(typeof _0x3e4b0d!==_0xaa4bf(0x104)||_0x3e4b0d===null)return![];const _0x4b2c48=_0x3e4b0d,_0xd28c87=VALID_CAMPAIGN_TYPES[_0xaa4bf(0xec)](_0x4b2c48[_0xaa4bf(0x101)]);if(_0x4b2c48[_0xaa4bf(0xe6)]===_0xaa4bf(0xf9)&&_0xd28c87)return!![];if(_0xd28c87&&!_0x4b2c48[_0xaa4bf(0xe6)])return!![];return![];}function a165_0x22d6(){const _0x3eee99=['warnings','email','has','filterType','20598CqmREK','toJSON','utf-8','YAML_PARSE_ERROR','945WhwKPJ','9078qmKCiy','message','472137mvxgIQ','parseDocument','journey','map','campaign','basename','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','segment','202lWOSVY','25275825vCcmwH','6190224aEYzyw','template','campaign_type','714819EBfdlC','length','object','relative','303804PKLszZ','not\x20a\x20','YAML\x20parse\x20error:\x20','result','type','skipped','valid','push'];a165_0x22d6=function(){return _0x3eee99;};return a165_0x22d6();}export function isTemplateDef(_0x6601ff){const _0x25c982=a165_0x4b832e;return typeof _0x6601ff===_0x25c982(0x104)&&_0x6601ff!==null&&'type'in _0x6601ff&&_0x6601ff[_0x25c982(0xe6)]===_0x25c982(0x100);}export function isValidationResult(_0x4906c7){const _0x4a8d7b=a165_0x4b832e;return!(_0x4a8d7b(0xe7)in _0x4906c7);}export function createParseErrorResult(_0x753096,_0x2c0ae3,_0x585481,_0x354478,_0x41c7eb=a165_0x4b832e(0xfc)){const _0x1f7e44=a165_0x4b832e;return{'filePath':_0x753096,'relativePath':_0x2c0ae3,'source':_0x585481,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x1f7e44(0xf1),'message':_0x354478}],'warnings':[]},'fileType':_0x41c7eb};}export function validateYamlFile(_0x417841,_0xada5bd,_0x15387b={}){const _0x5e156e=a165_0x4b832e,_0x10c6f7=a165_0x10f737[_0x5e156e(0x105)](_0xada5bd,_0x417841)||a165_0x10f737[_0x5e156e(0xfa)](_0x417841);try{const _0x410528=readFileSync(_0x417841,_0x5e156e(0xf0)),_0x1ca300=a165_0x1b20dc[_0x5e156e(0xf6)](_0x410528),_0x4e1c49=_0x1ca300[_0x5e156e(0xef)]();if(!_0x4e1c49)return createParseErrorResult(_0x417841,_0x10c6f7,_0x410528,_0x5e156e(0xfb));let _0x4306a5;if(isJourneyDef(_0x4e1c49))_0x4306a5=_0x5e156e(0xf7);else{if(isCampaignDef(_0x4e1c49))_0x4306a5=_0x5e156e(0xf9);else isTemplateDef(_0x4e1c49)?_0x4306a5=_0x5e156e(0x100):_0x4306a5=_0x5e156e(0xfc);}if(_0x15387b[_0x5e156e(0xed)]&&_0x4306a5!==_0x15387b[_0x5e156e(0xed)])return{'filePath':_0x417841,'relativePath':_0x10c6f7,'skipped':!![],'reason':_0x5e156e(0x107)+_0x15387b['filterType']};const _0x504a6a={'source':_0x410528,'document':_0x1ca300};let _0x35d261;if(_0x4306a5===_0x5e156e(0xf7))_0x35d261=validateJourneyDef(_0x4e1c49,_0x504a6a);else{if(_0x4306a5===_0x5e156e(0xf9))_0x35d261=validateCampaignDef(_0x4e1c49,_0x504a6a);else _0x4306a5===_0x5e156e(0x100)?_0x35d261=validateTemplateDef(_0x4e1c49,_0x504a6a):_0x35d261=validateSegmentDef(_0x4e1c49,_0x504a6a);}return{'filePath':_0x417841,'relativePath':_0x10c6f7,'source':_0x410528,'result':_0x35d261,'fileType':_0x4306a5};}catch(_0x4f1eb9){const _0x539ed1=_0x4f1eb9 instanceof Error?_0x4f1eb9[_0x5e156e(0xf4)]:String(_0x4f1eb9);return createParseErrorResult(_0x417841,_0x10c6f7,'',_0x5e156e(0xe4)+_0x539ed1);}}export function validateYamlFiles(_0x4a6358,_0xc56236,_0x58fa2d={}){const _0x312e36=a165_0x4b832e;return _0x4a6358[_0x312e36(0xf8)](_0x1e4d8e=>validateYamlFile(_0x1e4d8e,_0xc56236,_0x58fa2d));}export function calculateSummary(_0x37627f){const _0x314c29=a165_0x4b832e;let _0xe49864=0x0,_0x3c854d=0x0,_0x548e9d=0x0,_0xd0c8f1=0x0;for(const _0x38b006 of _0x37627f){if(!isValidationResult(_0x38b006)){_0xd0c8f1++;continue;}_0x38b006[_0x314c29(0xe5)][_0x314c29(0xe8)]?_0xe49864++:_0x3c854d++,_0x548e9d+=_0x38b006[_0x314c29(0xe5)][_0x314c29(0xea)][_0x314c29(0x103)];}return{'validCount':_0xe49864,'invalidCount':_0x3c854d,'warningCount':_0x548e9d,'skippedCount':_0xd0c8f1,'hasErrors':_0x3c854d>0x0};}
@@ -1 +1 @@
1
- (function(_0x6e8397,_0x190316){const _0x11bb49=a166_0x4667,_0x4fceb5=_0x6e8397();while(!![]){try{const _0x1e50b4=parseInt(_0x11bb49(0x1ac))/0x1+-parseInt(_0x11bb49(0x1a4))/0x2*(-parseInt(_0x11bb49(0x19f))/0x3)+-parseInt(_0x11bb49(0x199))/0x4*(-parseInt(_0x11bb49(0x18c))/0x5)+-parseInt(_0x11bb49(0x18e))/0x6*(parseInt(_0x11bb49(0x192))/0x7)+-parseInt(_0x11bb49(0x1af))/0x8+-parseInt(_0x11bb49(0x18b))/0x9*(-parseInt(_0x11bb49(0x18d))/0xa)+-parseInt(_0x11bb49(0x194))/0xb;if(_0x1e50b4===_0x190316)break;else _0x4fceb5['push'](_0x4fceb5['shift']());}catch(_0x287675){_0x4fceb5['push'](_0x4fceb5['shift']());}}}(a166_0x27e2,0xf337c));import*as a166_0x326097 from'yaml';import a166_0xc74893 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x448d00,_0x2d382c,_0x5d2278){const _0x6ce0ba=a166_0x4667;if(!_0x448d00||!_0x2d382c)return undefined;try{let _0x257cd7=_0x448d00[_0x6ce0ba(0x191)](_0x5d2278,!![]),_0x28808e=[..._0x5d2278];while((!_0x257cd7||typeof _0x257cd7!==_0x6ce0ba(0x1a0)||!('range'in _0x257cd7)||!_0x257cd7[_0x6ce0ba(0x19c)])&&_0x28808e[_0x6ce0ba(0x181)]>0x0){_0x28808e[_0x6ce0ba(0x185)](),_0x257cd7=_0x28808e[_0x6ce0ba(0x181)]>0x0?_0x448d00[_0x6ce0ba(0x191)](_0x28808e,!![]):_0x448d00[_0x6ce0ba(0x18a)];}if(!_0x257cd7||typeof _0x257cd7!==_0x6ce0ba(0x1a0)||!(_0x6ce0ba(0x19c)in _0x257cd7)||!_0x257cd7[_0x6ce0ba(0x19c)])return undefined;const [_0x4a405c]=_0x257cd7[_0x6ce0ba(0x19c)];return offsetToLocation(_0x2d382c,_0x4a405c);}catch{return undefined;}}function a166_0x27e2(){const _0x39377e=['cyan','length','column','level','\x27:\x20','pop','errors','YAML\x20validation\x20error\x20at\x20\x27','error','dim','contents','9AjlaaP','53585MTWZJV','17373730RJCmHJ','38790mjiMNZ','push','safeParse','getIn','665lFTxxj','code','47507702FhMVLb','max','repeat','Invalid\x20YAML:\x20expected\x20an\x20object','YAML\x20validation\x20error:\x20','412lWQlSk','line','number','range','yellow','invalid_union','677598ftBpNP','object','padStart','toString','success','14qmKdCo','message','split','map','issues','location','red','join','1780580BQDvvO','path','warnings','2188712JnIgLI'];a166_0x27e2=function(){return _0x39377e;};return a166_0x27e2();}export function offsetToLocation(_0x5600c4,_0x315093){const _0x538bba=a166_0x4667;let _0x4b67ea=0x1,_0xd9ed02=0x1;for(let _0x53c76e=0x0;_0x53c76e<_0x315093&&_0x53c76e<_0x5600c4[_0x538bba(0x181)];_0x53c76e++){_0x5600c4[_0x53c76e]==='\x0a'?(_0x4b67ea++,_0xd9ed02=0x1):_0xd9ed02++;}return{'line':_0x4b67ea,'column':_0xd9ed02,'offset':_0x315093};}export function pathToArray(_0x43ce35){const _0x6e7a66=a166_0x4667;if(!_0x43ce35)return[];return _0x43ce35[_0x6e7a66(0x1a6)]('.')['flatMap'](_0x4a1d43=>{const _0x2d101f=_0x4a1d43['match'](/^(\w+)\[(\d+)\]$/);if(_0x2d101f)return[_0x2d101f[0x1],parseInt(_0x2d101f[0x2],0xa)];return[_0x4a1d43];});}export function formatZodPath(_0x4a7a70){const _0x2af92d=a166_0x4667;let _0x450b79='';for(const _0x4110f0 of _0x4a7a70){if(typeof _0x4110f0===_0x2af92d(0x19b))_0x450b79+='['+_0x4110f0+']';else{const _0x4e3798=String(_0x4110f0);_0x450b79+=_0x450b79?'.'+_0x4e3798:_0x4e3798;}}return _0x450b79;}export function flattenZodIssues(_0x289dcb){const _0x2ba51b=a166_0x4667,_0x2c2c38=[];for(const _0x544191 of _0x289dcb){if(_0x544191[_0x2ba51b(0x193)]===_0x2ba51b(0x19e)&&_0x2ba51b(0x186)in _0x544191){const _0x232fa3=_0x544191[_0x2ba51b(0x186)];let _0x10c67b=_0x232fa3[0x0]||[];for(const _0x3e71ec of _0x232fa3){_0x3e71ec[_0x2ba51b(0x181)]<_0x10c67b[_0x2ba51b(0x181)]&&(_0x10c67b=_0x3e71ec);}const _0x2fc130=_0x10c67b[_0x2ba51b(0x1a7)](_0x20a1b4=>({..._0x20a1b4,'path':[..._0x544191[_0x2ba51b(0x1ad)],..._0x20a1b4[_0x2ba51b(0x1ad)]]}));_0x2c2c38[_0x2ba51b(0x18f)](...flattenZodIssues(_0x2fc130));}else _0x2c2c38['push'](_0x544191);}return _0x2c2c38;}export function safeParseYaml(_0x2452b8,_0x51576e){const _0x161dcb=a166_0x4667,_0x55e21e=a166_0x326097['parse'](_0x2452b8);if(!_0x55e21e||typeof _0x55e21e!==_0x161dcb(0x1a0))throw new Error(_0x161dcb(0x197));const _0x520c84=_0x51576e[_0x161dcb(0x190)](_0x55e21e);if(!_0x520c84[_0x161dcb(0x1a3)]){const _0x3fc239=_0x520c84[_0x161dcb(0x188)][_0x161dcb(0x1a8)][0x0],_0x586361=formatZodPath(_0x3fc239[_0x161dcb(0x1ad)]);throw new Error(_0x586361?_0x161dcb(0x187)+_0x586361+_0x161dcb(0x184)+_0x3fc239['message']:_0x161dcb(0x198)+_0x3fc239[_0x161dcb(0x1a5)]);}return _0x520c84['data'];}function a166_0x4667(_0x300acd,_0x2c6192){_0x300acd=_0x300acd-0x180;const _0x27e2a9=a166_0x27e2();let _0x466751=_0x27e2a9[_0x300acd];return _0x466751;}export function formatIssueWithContext(_0x129f41,_0x989170,_0xb326aa){const _0x22dd83=a166_0x4667,_0x344359=[],_0x22e013=_0x129f41['level']==='error',_0x23bf72=_0x22e013?a166_0xc74893[_0x22dd83(0x1aa)]:a166_0xc74893[_0x22dd83(0x19d)],_0x126794=_0x22e013?a166_0xc74893['red']:a166_0xc74893['yellow'],_0x5e0c5e=_0xb326aa?a166_0xc74893[_0x22dd83(0x180)](_0xb326aa+':'):'';if(_0x129f41[_0x22dd83(0x1a9)]){const _0x45e69f=a166_0xc74893[_0x22dd83(0x180)](_0x129f41[_0x22dd83(0x1a9)][_0x22dd83(0x19a)]+':'+_0x129f41[_0x22dd83(0x1a9)][_0x22dd83(0x182)]);_0x344359[_0x22dd83(0x18f)](''+_0x5e0c5e+_0x45e69f+':\x20'+_0x23bf72(_0x129f41['level'])+'\x20'+_0x126794('['+_0x129f41[_0x22dd83(0x193)]+']'));}else _0x344359['push'](''+_0x5e0c5e+a166_0xc74893[_0x22dd83(0x189)](_0x129f41['path'])+':\x20'+_0x23bf72(_0x129f41[_0x22dd83(0x183)])+'\x20'+_0x126794('['+_0x129f41[_0x22dd83(0x193)]+']'));_0x344359['push'](_0x129f41[_0x22dd83(0x1a5)]);if(_0x129f41[_0x22dd83(0x1a9)]&&_0x989170){const _0x801a42=_0x989170[_0x22dd83(0x1a6)]('\x0a'),{line:_0x89f511,column:_0x541ad1}=_0x129f41[_0x22dd83(0x1a9)],_0x2d1599=Math[_0x22dd83(0x195)](0x1,_0x89f511-0x1),_0x204996=Math['min'](_0x801a42['length'],_0x89f511+0x1);_0x344359[_0x22dd83(0x18f)]('');for(let _0x1c255c=_0x2d1599;_0x1c255c<=_0x204996;_0x1c255c++){const _0x4812cf=_0x801a42[_0x1c255c-0x1]||'',_0x5e0e36=a166_0xc74893[_0x22dd83(0x189)](_0x1c255c[_0x22dd83(0x1a2)]()[_0x22dd83(0x1a1)](0x4)),_0x29f008=a166_0xc74893[_0x22dd83(0x189)]('\x20|\x20');if(_0x1c255c===_0x89f511){_0x344359[_0x22dd83(0x18f)]('\x20\x20'+_0x5e0e36+_0x29f008+_0x23bf72(_0x4812cf));const _0x3daa04='\x20'[_0x22dd83(0x196)](0x4+0x3+_0x541ad1-0x1);_0x344359[_0x22dd83(0x18f)]('\x20\x20'+_0x3daa04+_0x23bf72('^'));}else _0x344359[_0x22dd83(0x18f)]('\x20\x20'+_0x5e0e36+_0x29f008+a166_0xc74893['dim'](_0x4812cf));}}return _0x344359[_0x22dd83(0x1ab)]('\x0a');}export function formatValidationResult(_0x3447fe,_0x3476e9,_0x1729b9){const _0x16f283=a166_0x4667,_0x1e07d1=[];for(const _0x2b810a of _0x3447fe[_0x16f283(0x186)]){_0x1e07d1['push'](formatIssueWithContext(_0x2b810a,_0x3476e9,_0x1729b9)),_0x1e07d1[_0x16f283(0x18f)]('');}for(const _0x4c7ef1 of _0x3447fe[_0x16f283(0x1ae)]){_0x1e07d1[_0x16f283(0x18f)](formatIssueWithContext(_0x4c7ef1,_0x3476e9,_0x1729b9)),_0x1e07d1[_0x16f283(0x18f)]('');}return _0x1e07d1[_0x16f283(0x1ab)]('\x0a');}
1
+ (function(_0x50daa0,_0x254c56){const _0x18c930=a166_0x6bd9,_0x474b24=_0x50daa0();while(!![]){try{const _0x5d132e=parseInt(_0x18c930(0x1c1))/0x1+parseInt(_0x18c930(0x1bf))/0x2*(parseInt(_0x18c930(0x1c6))/0x3)+-parseInt(_0x18c930(0x1b1))/0x4*(parseInt(_0x18c930(0x1ae))/0x5)+-parseInt(_0x18c930(0x1b7))/0x6*(-parseInt(_0x18c930(0x1bb))/0x7)+-parseInt(_0x18c930(0x1c5))/0x8*(parseInt(_0x18c930(0x1c8))/0x9)+-parseInt(_0x18c930(0x1cc))/0xa*(-parseInt(_0x18c930(0x1d2))/0xb)+-parseInt(_0x18c930(0x1aa))/0xc*(parseInt(_0x18c930(0x1cb))/0xd);if(_0x5d132e===_0x254c56)break;else _0x474b24['push'](_0x474b24['shift']());}catch(_0x59be37){_0x474b24['push'](_0x474b24['shift']());}}}(a166_0x20d2,0xa3b2b));import*as a166_0x5e360c from'yaml';function a166_0x6bd9(_0x38a1e0,_0x164cfd){_0x38a1e0=_0x38a1e0-0x1a8;const _0x20d20b=a166_0x20d2();let _0x6bd90f=_0x20d20b[_0x38a1e0];return _0x6bd90f;}import a166_0x3d1e36 from'chalk';function a166_0x20d2(){const _0x2d779f=['range','864228ZiflxE','push','\x27:\x20','dim','85xZNOlw','location','message','5228LFQRHw','max','repeat','length','min','Invalid\x20YAML:\x20expected\x20an\x20object','544182VxdDbD','split','getIn','line','14TIcaqW','invalid_union','error','cyan','294470gQcsSt','issues','1068788jjiUwy','yellow','map','object','3520688IeDrvV','24ltemlO','pop','9JuVolc','red','errors','429OfiiVb','110drMIZj','YAML\x20validation\x20error\x20at\x20\x27','match','warnings','number','code','1081377nqjErL','data','YAML\x20validation\x20error:\x20','success','join','path','level','flatMap'];a166_0x20d2=function(){return _0x2d779f;};return a166_0x20d2();}export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x53ca96,_0x307000,_0x3ec99b){const _0x496b38=a166_0x6bd9;if(!_0x53ca96||!_0x307000)return undefined;try{let _0x488ed4=_0x53ca96[_0x496b38(0x1b9)](_0x3ec99b,!![]),_0x191701=[..._0x3ec99b];while((!_0x488ed4||typeof _0x488ed4!==_0x496b38(0x1c4)||!(_0x496b38(0x1a9)in _0x488ed4)||!_0x488ed4[_0x496b38(0x1a9)])&&_0x191701[_0x496b38(0x1b4)]>0x0){_0x191701[_0x496b38(0x1c7)](),_0x488ed4=_0x191701[_0x496b38(0x1b4)]>0x0?_0x53ca96[_0x496b38(0x1b9)](_0x191701,!![]):_0x53ca96['contents'];}if(!_0x488ed4||typeof _0x488ed4!==_0x496b38(0x1c4)||!(_0x496b38(0x1a9)in _0x488ed4)||!_0x488ed4[_0x496b38(0x1a9)])return undefined;const [_0x2dbddb]=_0x488ed4['range'];return offsetToLocation(_0x307000,_0x2dbddb);}catch{return undefined;}}export function offsetToLocation(_0x8f5484,_0x313c09){const _0xf7f5be=a166_0x6bd9;let _0x3ece74=0x1,_0x49315c=0x1;for(let _0x46bfa9=0x0;_0x46bfa9<_0x313c09&&_0x46bfa9<_0x8f5484[_0xf7f5be(0x1b4)];_0x46bfa9++){_0x8f5484[_0x46bfa9]==='\x0a'?(_0x3ece74++,_0x49315c=0x1):_0x49315c++;}return{'line':_0x3ece74,'column':_0x49315c,'offset':_0x313c09};}export function pathToArray(_0x17da44){const _0x5f1d14=a166_0x6bd9;if(!_0x17da44)return[];return _0x17da44[_0x5f1d14(0x1b8)]('.')[_0x5f1d14(0x1a8)](_0x48c85c=>{const _0x23cd19=_0x5f1d14,_0x2cdea4=_0x48c85c[_0x23cd19(0x1ce)](/^(\w+)\[(\d+)\]$/);if(_0x2cdea4)return[_0x2cdea4[0x1],parseInt(_0x2cdea4[0x2],0xa)];return[_0x48c85c];});}export function formatZodPath(_0x230e04){const _0x40d72d=a166_0x6bd9;let _0x397daf='';for(const _0xa1211 of _0x230e04){if(typeof _0xa1211===_0x40d72d(0x1d0))_0x397daf+='['+_0xa1211+']';else{const _0x54def5=String(_0xa1211);_0x397daf+=_0x397daf?'.'+_0x54def5:_0x54def5;}}return _0x397daf;}export function flattenZodIssues(_0x29f270){const _0x21da48=a166_0x6bd9,_0x15a585=[];for(const _0x538f57 of _0x29f270){if(_0x538f57[_0x21da48(0x1d1)]===_0x21da48(0x1bc)&&'errors'in _0x538f57){const _0xb268e7=_0x538f57[_0x21da48(0x1ca)];let _0x1797a4=_0xb268e7[0x0]||[];for(const _0x532b09 of _0xb268e7){_0x532b09[_0x21da48(0x1b4)]<_0x1797a4[_0x21da48(0x1b4)]&&(_0x1797a4=_0x532b09);}const _0x140ff1=_0x1797a4[_0x21da48(0x1c3)](_0x5afa32=>({..._0x5afa32,'path':[..._0x538f57[_0x21da48(0x1d7)],..._0x5afa32['path']]}));_0x15a585[_0x21da48(0x1ab)](...flattenZodIssues(_0x140ff1));}else _0x15a585['push'](_0x538f57);}return _0x15a585;}export function safeParseYaml(_0xa26906,_0x81ec8f){const _0x435e3f=a166_0x6bd9,_0x413020=a166_0x5e360c['parse'](_0xa26906);if(!_0x413020||typeof _0x413020!==_0x435e3f(0x1c4))throw new Error(_0x435e3f(0x1b6));const _0x440ed6=_0x81ec8f['safeParse'](_0x413020);if(!_0x440ed6[_0x435e3f(0x1d5)]){const _0x4b26f3=_0x440ed6[_0x435e3f(0x1bd)][_0x435e3f(0x1c0)][0x0],_0x39a4e5=formatZodPath(_0x4b26f3[_0x435e3f(0x1d7)]);throw new Error(_0x39a4e5?_0x435e3f(0x1cd)+_0x39a4e5+_0x435e3f(0x1ac)+_0x4b26f3['message']:_0x435e3f(0x1d4)+_0x4b26f3[_0x435e3f(0x1b0)]);}return _0x440ed6[_0x435e3f(0x1d3)];}export function formatIssueWithContext(_0x4c6f4f,_0x265b71,_0x34ae61){const _0x2f212d=a166_0x6bd9,_0x5828d8=[],_0x3ed57e=_0x4c6f4f[_0x2f212d(0x1d8)]===_0x2f212d(0x1bd),_0x567f5d=_0x3ed57e?a166_0x3d1e36[_0x2f212d(0x1c9)]:a166_0x3d1e36['yellow'],_0x2cba0c=_0x3ed57e?a166_0x3d1e36[_0x2f212d(0x1c9)]:a166_0x3d1e36[_0x2f212d(0x1c2)],_0x448451=_0x34ae61?a166_0x3d1e36['cyan'](_0x34ae61+':'):'';if(_0x4c6f4f['location']){const _0x18aa50=a166_0x3d1e36[_0x2f212d(0x1be)](_0x4c6f4f[_0x2f212d(0x1af)][_0x2f212d(0x1ba)]+':'+_0x4c6f4f[_0x2f212d(0x1af)]['column']);_0x5828d8[_0x2f212d(0x1ab)](''+_0x448451+_0x18aa50+':\x20'+_0x567f5d(_0x4c6f4f[_0x2f212d(0x1d8)])+'\x20'+_0x2cba0c('['+_0x4c6f4f[_0x2f212d(0x1d1)]+']'));}else _0x5828d8[_0x2f212d(0x1ab)](''+_0x448451+a166_0x3d1e36[_0x2f212d(0x1ad)](_0x4c6f4f[_0x2f212d(0x1d7)])+':\x20'+_0x567f5d(_0x4c6f4f[_0x2f212d(0x1d8)])+'\x20'+_0x2cba0c('['+_0x4c6f4f[_0x2f212d(0x1d1)]+']'));_0x5828d8[_0x2f212d(0x1ab)](_0x4c6f4f[_0x2f212d(0x1b0)]);if(_0x4c6f4f[_0x2f212d(0x1af)]&&_0x265b71){const _0x3d1a49=_0x265b71[_0x2f212d(0x1b8)]('\x0a'),{line:_0x44d917,column:_0xb847e5}=_0x4c6f4f[_0x2f212d(0x1af)],_0x5006ba=Math[_0x2f212d(0x1b2)](0x1,_0x44d917-0x1),_0x31c64a=Math[_0x2f212d(0x1b5)](_0x3d1a49[_0x2f212d(0x1b4)],_0x44d917+0x1);_0x5828d8[_0x2f212d(0x1ab)]('');for(let _0x59c705=_0x5006ba;_0x59c705<=_0x31c64a;_0x59c705++){const _0x5c7051=_0x3d1a49[_0x59c705-0x1]||'',_0x218917=a166_0x3d1e36[_0x2f212d(0x1ad)](_0x59c705['toString']()['padStart'](0x4)),_0x2dcee3=a166_0x3d1e36[_0x2f212d(0x1ad)]('\x20|\x20');if(_0x59c705===_0x44d917){_0x5828d8[_0x2f212d(0x1ab)]('\x20\x20'+_0x218917+_0x2dcee3+_0x567f5d(_0x5c7051));const _0x242782='\x20'[_0x2f212d(0x1b3)](0x4+0x3+_0xb847e5-0x1);_0x5828d8[_0x2f212d(0x1ab)]('\x20\x20'+_0x242782+_0x567f5d('^'));}else _0x5828d8['push']('\x20\x20'+_0x218917+_0x2dcee3+a166_0x3d1e36[_0x2f212d(0x1ad)](_0x5c7051));}}return _0x5828d8[_0x2f212d(0x1d6)]('\x0a');}export function formatValidationResult(_0x4598e4,_0x22d15c,_0x2c4376){const _0xb2d95b=a166_0x6bd9,_0x17c0e4=[];for(const _0x317355 of _0x4598e4[_0xb2d95b(0x1ca)]){_0x17c0e4[_0xb2d95b(0x1ab)](formatIssueWithContext(_0x317355,_0x22d15c,_0x2c4376)),_0x17c0e4[_0xb2d95b(0x1ab)]('');}for(const _0x4b8ed0 of _0x4598e4[_0xb2d95b(0x1cf)]){_0x17c0e4[_0xb2d95b(0x1ab)](formatIssueWithContext(_0x4b8ed0,_0x22d15c,_0x2c4376)),_0x17c0e4[_0xb2d95b(0x1ab)]('');}return _0x17c0e4['join']('\x0a');}