@treasuredata/tdx 2026.3.51 → 2026.3.52

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 (218) 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/utils.js +1 -1
  78. package/dist/proxy/claude-usage-tracker.js +1 -1
  79. package/dist/proxy/passthrough-server.js +1 -1
  80. package/dist/proxy/sse-usage-parser.js +1 -1
  81. package/dist/sdk/agent/agent-config.js +1 -1
  82. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  83. package/dist/sdk/agent/agent-yaml.js +1 -1
  84. package/dist/sdk/agent/test/evaluator.js +1 -1
  85. package/dist/sdk/agent/test/executor.js +1 -1
  86. package/dist/sdk/agent/test/index.js +1 -1
  87. package/dist/sdk/agent/test/output.js +1 -1
  88. package/dist/sdk/agent/test/parser.js +1 -1
  89. package/dist/sdk/agent/tool-target-registry.js +1 -1
  90. package/dist/sdk/api.js +1 -1
  91. package/dist/sdk/cas/cas-api-client.js +1 -1
  92. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  93. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  94. package/dist/sdk/cas/index.js +1 -1
  95. package/dist/sdk/cas/pull-workflow.js +1 -1
  96. package/dist/sdk/cas/push-workflow.js +1 -1
  97. package/dist/sdk/client/cdp-api-client.js +1 -1
  98. package/dist/sdk/client/delivery-api-client.js +1 -1
  99. package/dist/sdk/client/endpoints.js +1 -1
  100. package/dist/sdk/client/engage-api-client.js +1 -1
  101. package/dist/sdk/client/http-client.js +1 -1
  102. package/dist/sdk/client/llm-api-client.js +1 -1
  103. package/dist/sdk/client/oauth-refresh.js +1 -1
  104. package/dist/sdk/client/rate-limiter.js +1 -1
  105. package/dist/sdk/client/td-api-client.js +1 -1
  106. package/dist/sdk/client/trino-api-client.js +1 -1
  107. package/dist/sdk/client/workflow-client.js +1 -1
  108. package/dist/sdk/connection-validator.js +1 -1
  109. package/dist/sdk/connection.js +1 -1
  110. package/dist/sdk/delivery.js +1 -1
  111. package/dist/sdk/engage/campaign-pull.js +1 -1
  112. package/dist/sdk/engage/campaign-push.js +1 -1
  113. package/dist/sdk/engage/campaign-validator.js +1 -1
  114. package/dist/sdk/engage/campaign-yaml.js +1 -1
  115. package/dist/sdk/engage/template-pull.js +1 -1
  116. package/dist/sdk/engage/template-push.js +1 -1
  117. package/dist/sdk/engage/template-validator.js +1 -1
  118. package/dist/sdk/engage/template-yaml.js +1 -1
  119. package/dist/sdk/engage/types/campaign-def.js +1 -1
  120. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  121. package/dist/sdk/engage/types/template-schema.js +1 -1
  122. package/dist/sdk/engage.js +1 -1
  123. package/dist/sdk/errors.js +1 -1
  124. package/dist/sdk/index.js +1 -1
  125. package/dist/sdk/io/index.js +1 -1
  126. package/dist/sdk/io/node-filesystem.js +1 -1
  127. package/dist/sdk/job.js +1 -1
  128. package/dist/sdk/journey.js +1 -1
  129. package/dist/sdk/llm/chat-cache.js +1 -1
  130. package/dist/sdk/llm/index.js +1 -1
  131. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  132. package/dist/sdk/llm/model-factors.js +1 -1
  133. package/dist/sdk/personalization.js +1 -1
  134. package/dist/sdk/policy.js +1 -1
  135. package/dist/sdk/query/index.js +1 -1
  136. package/dist/sdk/query/sql-parser.js +1 -1
  137. package/dist/sdk/realtime.js +1 -1
  138. package/dist/sdk/schedule.js +1 -1
  139. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  140. package/dist/sdk/segment/fields-display.js +1 -1
  141. package/dist/sdk/segment/file-discovery.js +1 -1
  142. package/dist/sdk/segment/journey-utils.js +1 -1
  143. package/dist/sdk/segment/journey-validator.js +1 -1
  144. package/dist/sdk/segment/journey-yaml.js +1 -1
  145. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  146. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  147. package/dist/sdk/segment/pull-workflow.js +1 -1
  148. package/dist/sdk/segment/push-recovery.js +1 -1
  149. package/dist/sdk/segment/push-workflow.js +1 -1
  150. package/dist/sdk/segment/resolution-context.js +1 -1
  151. package/dist/sdk/segment/segment-path-parser.js +1 -1
  152. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  153. package/dist/sdk/segment/segment-validator.js +1 -1
  154. package/dist/sdk/segment/target-resolution.js +1 -1
  155. package/dist/sdk/segment/tdx-config.js +1 -1
  156. package/dist/sdk/segment/types/activation-schema.js +1 -1
  157. package/dist/sdk/segment/types/journey-def.js +1 -1
  158. package/dist/sdk/segment/types/journey-schema.js +1 -1
  159. package/dist/sdk/segment/types/segment-def.js +1 -1
  160. package/dist/sdk/segment/types/segment-schema.js +1 -1
  161. package/dist/sdk/segment/validate-files.js +1 -1
  162. package/dist/sdk/segment/yaml-validator.js +1 -1
  163. package/dist/sdk/segment.js +1 -1
  164. package/dist/sdk/types/index.js +1 -1
  165. package/dist/sdk/types/progress.js +1 -1
  166. package/dist/sdk/types/workspace.js +1 -1
  167. package/dist/sdk/user.js +1 -1
  168. package/dist/sdk/util/format-detector.js +1 -1
  169. package/dist/sdk/util/formatters.js +1 -1
  170. package/dist/sdk/util/index.js +1 -1
  171. package/dist/sdk/util/paginate.js +1 -1
  172. package/dist/sdk/util/tree-formatter.js +1 -1
  173. package/dist/sdk/workflow/archive-validation.js +1 -1
  174. package/dist/sdk/workflow/clone-workflow.js +1 -1
  175. package/dist/sdk/workflow/index.js +1 -1
  176. package/dist/sdk/workflow/pull-workflow.js +1 -1
  177. package/dist/sdk/workflow/push-workflow.js +1 -1
  178. package/dist/sdk/workflow/tdx-config.js +1 -1
  179. package/dist/sdk/workflow/workflow-utils.js +1 -1
  180. package/dist/sdk/workspace/frontmatter.js +1 -1
  181. package/dist/sdk/workspace/git.js +1 -1
  182. package/dist/sdk/workspace/index.js +1 -1
  183. package/dist/sdk/workspace/templates.js +1 -1
  184. package/dist/sdk/workspace/weekly.js +1 -1
  185. package/dist/sdk/workspace/wikilinks.js +1 -1
  186. package/dist/test-utils/command-runner.js +1 -1
  187. package/dist/test-utils/factories.js +1 -1
  188. package/dist/test-utils/fixtures.js +1 -1
  189. package/dist/test-utils/http-mock.js +1 -1
  190. package/dist/test-utils/index.js +1 -1
  191. package/dist/utils/async.js +1 -1
  192. package/dist/utils/colors.js +1 -1
  193. package/dist/utils/diff.js +1 -1
  194. package/dist/utils/file-permissions.js +1 -1
  195. package/dist/utils/file-reader.js +1 -1
  196. package/dist/utils/github-releases.js +1 -1
  197. package/dist/utils/global-cache.js +1 -1
  198. package/dist/utils/json-loader.js +1 -1
  199. package/dist/utils/local-cache.js +1 -1
  200. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  201. package/dist/utils/logger/formatters/index.js +1 -1
  202. package/dist/utils/logger/handlers/console-handler.js +1 -1
  203. package/dist/utils/logger/handlers/file-handler.js +1 -1
  204. package/dist/utils/logger/handlers/index.js +1 -1
  205. package/dist/utils/logger/handlers/null-handler.js +1 -1
  206. package/dist/utils/logger/index.js +1 -1
  207. package/dist/utils/logger/logger.js +1 -1
  208. package/dist/utils/logger/types.js +1 -1
  209. package/dist/utils/option-validation.js +1 -1
  210. package/dist/utils/process.js +1 -1
  211. package/dist/utils/prompt.js +1 -1
  212. package/dist/utils/spinner.js +1 -1
  213. package/dist/utils/sse-parser.js +1 -1
  214. package/dist/utils/string-utils.js +1 -1
  215. package/dist/utils/table-ref-parser.js +1 -1
  216. package/dist/utils/tdx-logger.js +1 -1
  217. package/dist/utils/version-check.js +1 -1
  218. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x549b47,_0x374a42){const _0x535df0=a155_0x4153,_0x15ddb2=_0x549b47();while(!![]){try{const _0xc32df3=-parseInt(_0x535df0(0x1d1))/0x1*(parseInt(_0x535df0(0x1cf))/0x2)+-parseInt(_0x535df0(0x1d5))/0x3+parseInt(_0x535df0(0x1ca))/0x4+-parseInt(_0x535df0(0x1c8))/0x5+parseInt(_0x535df0(0x1c3))/0x6+-parseInt(_0x535df0(0x1bd))/0x7+parseInt(_0x535df0(0x19b))/0x8;if(_0xc32df3===_0x374a42)break;else _0x15ddb2['push'](_0x15ddb2['shift']());}catch(_0x274a99){_0x15ddb2['push'](_0x15ddb2['shift']());}}}(a155_0x5bf2,0x6333e));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';function a155_0x5bf2(){const _0x1e0edd=['MISSING_OPERATOR_VALUE','length','3966175fgQVDL','custom','851628vIUrsC','.segment','code','endsWith','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','750266OeLTLg','MISSING_TIME_UNIT','1adASRV','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','map','safeParse','1882461ScqFej','Behavior','.type','document','data','message','.source','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','type','.conditions[','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','arrayMatching','issues','path','rule.type','14571264xvhwQz','validationCode','skipSchema','Behavior\x20source\x20\x27','INVALID_ARRAY_MATCHING','conditions','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','name','Attribute\x20\x27','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','INVALID_OPERATOR_TYPE','success','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','match','rule','BEHAVIOR_SOURCE_MISSING_FILTER','.filter','MISSING_BETWEEN_BOUNDS','push','Value','MISSING_SEGMENT_REFERENCE','symbol','filter','\x27\x20with\x20attribute\x20\x27','aggregation','warning','description','INVALID_RULE_TYPE','attribute','MISSING_CONDITIONS','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','.conditions','NESTED_CONDITION_GROUP','3348534baANjg','level','error','.operator.type','.attribute','params','3877416DIURwI','source','And'];a155_0x5bf2=function(){return _0x1e0edd;};return a155_0x5bf2();}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x19d7a8,_0x38f516={},_0x1db1cc={}){const _0x94e7bd=a155_0x4153;if(_0x1db1cc[_0x94e7bd(0x19d)])return runSemanticChecks(_0x19d7a8,_0x38f516);const _0x11a4c4=SegmentDefSchema[_0x94e7bd(0x1d4)](_0x19d7a8);if(_0x11a4c4[_0x94e7bd(0x1a6)])return runSemanticChecks(_0x11a4c4[_0x94e7bd(0x1d9)],_0x38f516);return zodErrorsToValidationResult(_0x11a4c4[_0x94e7bd(0x1bf)],_0x38f516);}export function validateRuleDef(_0x101ae5,_0x223dd6,_0x3b301a){const _0xc1a5f6=a155_0x4153;if(!_0x101ae5)return[];const _0x4da851=RuleDefSchema[_0xc1a5f6(0x1d4)](_0x101ae5);if(_0x4da851['success'])return checkRule(_0x4da851[_0xc1a5f6(0x1d9)],_0x223dd6,_0x3b301a);const _0x480356=flattenZodIssues(_0x4da851[_0xc1a5f6(0x1bf)][_0xc1a5f6(0x198)]);return _0x480356[_0xc1a5f6(0x1d3)](_0x30d3a5=>{const _0x4838cf=_0xc1a5f6,_0x553ab4=formatZodPath(_0x30d3a5[_0x4838cf(0x199)]),_0x2a086f=_0x553ab4?_0x223dd6+'.'+_0x553ab4:_0x223dd6,_0x4e49d5=mapZodIssueToCode(_0x30d3a5,_0x553ab4),_0x5161fb=getLocationFromPath(_0x3b301a[_0x4838cf(0x1d8)],_0x3b301a['source'],pathToArray(_0x2a086f));return{'level':_0x4838cf(0x1bf),'path':_0x2a086f,'code':_0x4e49d5,'message':_0x30d3a5[_0x4838cf(0x190)],..._0x5161fb&&{'location':_0x5161fb}};});}function zodErrorsToValidationResult(_0x261dfa,_0x27b7e9){const _0x2fe4b9=a155_0x4153,_0xa1262a=flattenZodIssues(_0x261dfa[_0x2fe4b9(0x198)]),_0x4259a5=_0xa1262a[_0x2fe4b9(0x1d3)](_0x560eb3=>{const _0x2e6a4b=_0x2fe4b9,_0xb3ee6e=formatZodPath(_0x560eb3[_0x2e6a4b(0x199)]),_0x216cbf=mapZodIssueToCode(_0x560eb3,_0xb3ee6e),_0xd6cc3d=getLocationFromPath(_0x27b7e9[_0x2e6a4b(0x1d8)],_0x27b7e9[_0x2e6a4b(0x1c4)],_0x560eb3[_0x2e6a4b(0x199)][_0x2e6a4b(0x1d3)](_0x277b2c=>typeof _0x277b2c===_0x2e6a4b(0x1b0)?String(_0x277b2c):_0x277b2c));return{'level':_0x2e6a4b(0x1bf),'path':_0xb3ee6e,'code':_0x216cbf,'message':_0x560eb3[_0x2e6a4b(0x190)],..._0xd6cc3d&&{'location':_0xd6cc3d}};});return{'valid':![],'errors':_0x4259a5,'warnings':[]};}function mapZodIssueToCode(_0x3faa7b,_0x292e04){const _0x59c1aa=a155_0x4153,_0x4558d8=_0x3faa7b[_0x59c1aa(0x1cc)]===_0x59c1aa(0x1c9)?_0x3faa7b[_0x59c1aa(0x1c2)]:undefined;if(_0x292e04===_0x59c1aa(0x1a2))return'MISSING_NAME';if(_0x292e04==='rule.type'||_0x292e04[_0x59c1aa(0x1cd)](_0x59c1aa(0x1d7))){if(_0x3faa7b[_0x59c1aa(0x1cc)]==='invalid_value'){if(_0x292e04===_0x59c1aa(0x19a)||_0x292e04[_0x59c1aa(0x1a8)](/\.conditions\[\d+\]\.type$/))return _0x59c1aa(0x1b6);}}if(_0x292e04[_0x59c1aa(0x1cd)](_0x59c1aa(0x1c0)))return _0x59c1aa(0x1a5);if(_0x292e04[_0x59c1aa(0x1cd)]('.operator.value'))return _0x59c1aa(0x1c6);if(_0x4558d8?.[_0x59c1aa(0x19c)]===_0x59c1aa(0x1ac))return'MISSING_BETWEEN_BOUNDS';if(_0x4558d8?.[_0x59c1aa(0x19c)]===_0x59c1aa(0x1d0))return _0x59c1aa(0x1d0);if(_0x292e04[_0x59c1aa(0x1cd)](_0x59c1aa(0x1bb))||_0x292e04===_0x59c1aa(0x1a0))return _0x59c1aa(0x1b8);if(_0x292e04['includes'](_0x59c1aa(0x197)))return _0x59c1aa(0x19f);if(_0x292e04[_0x59c1aa(0x1cd)](_0x59c1aa(0x1cb)))return _0x59c1aa(0x1af);return'SEGMENT_SCHEMA_ERROR';}function a155_0x4153(_0x108723,_0xe9aabf){_0x108723=_0x108723-0x190;const _0x5bf203=a155_0x5bf2();let _0x41536a=_0x5bf203[_0x108723];return _0x41536a;}function runSemanticChecks(_0x5c9474,_0x55cf7a){const _0x1d543c=a155_0x4153,_0x8dace7=[];_0x5c9474[_0x1d543c(0x1a9)]&&_0x8dace7[_0x1d543c(0x1ad)](...checkRule(_0x5c9474['rule'],_0x1d543c(0x1a9),_0x55cf7a));const _0x307621=_0x8dace7[_0x1d543c(0x1b1)](_0x3ddf44=>_0x3ddf44[_0x1d543c(0x1be)]==='error'),_0x4e5e29=_0x8dace7[_0x1d543c(0x1b1)](_0x333943=>_0x333943[_0x1d543c(0x1be)]===_0x1d543c(0x1b4));return{'valid':_0x307621[_0x1d543c(0x1c7)]===0x0,'errors':_0x307621,'warnings':_0x4e5e29};}function checkRule(_0x384cea,_0x457e98,_0x17c285){const _0x42a66e=a155_0x4153,_0x5a47a4=[];if(_0x384cea[_0x42a66e(0x1a0)][_0x42a66e(0x1c7)]===0x0)return _0x5a47a4[_0x42a66e(0x1ad)]({'level':_0x42a66e(0x1bf),'path':_0x457e98+'.conditions','code':'EMPTY_CONDITIONS','message':_0x42a66e(0x1a1),'location':getLocationFromPath(_0x17c285['document'],_0x17c285[_0x42a66e(0x1c4)],pathToArray(_0x457e98+_0x42a66e(0x1bb)))}),_0x5a47a4;return _0x5a47a4[_0x42a66e(0x1ad)](...checkConditions(_0x384cea[_0x42a66e(0x1a0)],_0x457e98,_0x17c285)),_0x5a47a4;}function checkConditions(_0xd17466,_0x39991d,_0x50a961){const _0x4ef198=a155_0x4153,_0x278ecb=[];for(let _0x5cd83f=0x0;_0x5cd83f<_0xd17466[_0x4ef198(0x1c7)];_0x5cd83f++){const _0x1c82c0=_0xd17466[_0x5cd83f],_0x42e889=_0x39991d+_0x4ef198(0x194)+_0x5cd83f+']';_0x278ecb[_0x4ef198(0x1ad)](...checkCondition(_0x1c82c0,_0x42e889,_0x50a961));}return _0x278ecb;}function checkCondition(_0x504671,_0x84238a,_0x48134d){const _0x2f8379=a155_0x4153,_0xcd0d4=[];if(_0x504671['type']===_0x2f8379(0x1c5)||_0x504671[_0x2f8379(0x193)]==='Or'){if(_0x504671['conditions'][_0x2f8379(0x1c7)]===0x0)_0xcd0d4['push']({'level':_0x2f8379(0x1bf),'path':_0x84238a+_0x2f8379(0x1bb),'code':'EMPTY_CONDITIONS','message':_0x504671[_0x2f8379(0x193)]+_0x2f8379(0x1a4),'location':getLocationFromPath(_0x48134d[_0x2f8379(0x1d8)],_0x48134d['source'],pathToArray(_0x84238a+_0x2f8379(0x1bb)))});else{const _0x2b9cce=_0x504671[_0x2f8379(0x1b5)]!==undefined;!_0x2b9cce&&_0xcd0d4[_0x2f8379(0x1ad)]({'level':_0x2f8379(0x1b4),'path':_0x84238a,'code':_0x2f8379(0x1bc),'message':_0x504671[_0x2f8379(0x193)]+_0x2f8379(0x1a7)+_0x2f8379(0x196)+_0x2f8379(0x1ba),'location':getLocationFromPath(_0x48134d[_0x2f8379(0x1d8)],_0x48134d[_0x2f8379(0x1c4)],pathToArray(_0x84238a))}),_0xcd0d4[_0x2f8379(0x1ad)](...checkConditions(_0x504671[_0x2f8379(0x1a0)],_0x84238a,_0x48134d));}return _0xcd0d4;}if(_0x504671['type']===_0x2f8379(0x1ae)||_0x504671['type']===_0x2f8379(0x1d6)){const _0x38af02=_0x504671,_0x39ab33=_0x38af02[_0x2f8379(0x1c4)],_0xf5c6c8=_0x38af02[_0x2f8379(0x1b3)],_0x5b2fa8=_0x39ab33||_0xf5c6c8;(!_0x38af02['attribute']||_0x38af02[_0x2f8379(0x1b7)]==='')&&(!_0x5b2fa8&&_0xcd0d4[_0x2f8379(0x1ad)]({'level':'error','path':_0x84238a+_0x2f8379(0x1c1),'code':'EMPTY_ATTRIBUTE','message':'Attribute\x20name\x20cannot\x20be\x20empty','location':getLocationFromPath(_0x48134d[_0x2f8379(0x1d8)],_0x48134d[_0x2f8379(0x1c4)],pathToArray(_0x84238a+_0x2f8379(0x1c1)))}));_0x38af02[_0x2f8379(0x1b1)]&&_0xcd0d4['push'](...checkRule(_0x38af02[_0x2f8379(0x1b1)],_0x84238a+_0x2f8379(0x1ab),_0x48134d));if(_0x38af02['source']){const _0x1431f0=_0x38af02['attribute']&&_0x38af02[_0x2f8379(0x1b7)]!=='';_0x1431f0&&!_0x38af02[_0x2f8379(0x1b1)]&&_0xcd0d4['push']({'level':_0x2f8379(0x1bf),'path':_0x84238a+_0x2f8379(0x191),'code':_0x2f8379(0x1aa),'message':_0x2f8379(0x19e)+_0x38af02[_0x2f8379(0x1c4)]+_0x2f8379(0x1b2)+_0x38af02['attribute']+'\x27\x20'+'requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20'+_0x2f8379(0x1b9)+_0x2f8379(0x195),'location':getLocationFromPath(_0x48134d[_0x2f8379(0x1d8)],_0x48134d[_0x2f8379(0x1c4)],pathToArray(_0x84238a+_0x2f8379(0x191)))}),_0x1431f0&&_0x38af02[_0x2f8379(0x1b1)]&&_0xcd0d4[_0x2f8379(0x1ad)]({'level':_0x2f8379(0x1b4),'path':_0x84238a+'.attribute','code':_0x2f8379(0x1ce),'message':_0x2f8379(0x1a3)+_0x38af02['attribute']+_0x2f8379(0x1d2)+_0x2f8379(0x192),'location':getLocationFromPath(_0x48134d[_0x2f8379(0x1d8)],_0x48134d[_0x2f8379(0x1c4)],pathToArray(_0x84238a+'.attribute'))});}}return _0xcd0d4;}
1
+ function a155_0x3a9c(){const _0x55afe0=['custom','MISSING_NAME','data','11534544iXMzfk','type','Value','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','rule.type','description','55zFXLFF','success','EMPTY_CONDITIONS','31485EbApFU','includes','.conditions','symbol','Attribute\x20\x27','MISSING_BETWEEN_BOUNDS','match','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','INVALID_RULE_TYPE','conditions','NESTED_CONDITION_GROUP','45gnbKPY','MISSING_TIME_UNIT','error','MISSING_CONDITIONS','safeParse','endsWith','11167472EVjAbj','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','MISSING_SEGMENT_REFERENCE','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','warning','.segment','issues','map','.attribute','7KGkanF','source','\x27\x20with\x20attribute\x20\x27','And','attribute','4097082eKKTWQ','Behavior\x20source\x20\x27','level','document','.source','22bJTExK','invalid_value','3331278RtJvVq','push','skipSchema','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','message','2136490qiUdvh','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','Behavior','length','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','params','name','186748MXUcpW','filter','rule','path','validationCode','.filter','INVALID_ARRAY_MATCHING'];a155_0x3a9c=function(){return _0x55afe0;};return a155_0x3a9c();}function a155_0x467d(_0x1f54d1,_0x5829ca){_0x1f54d1=_0x1f54d1-0x1e2;const _0x3a9cc3=a155_0x3a9c();let _0x467d17=_0x3a9cc3[_0x1f54d1];return _0x467d17;}(function(_0x2c7b8e,_0x416320){const _0x11b24d=a155_0x467d,_0x2be17d=_0x2c7b8e();while(!![]){try{const _0x4cad77=parseInt(_0x11b24d(0x20a))/0x1*(-parseInt(_0x11b24d(0x1e9))/0x2)+-parseInt(_0x11b24d(0x1e4))/0x3+-parseInt(_0x11b24d(0x1f7))/0x4*(-parseInt(_0x11b24d(0x215))/0x5)+-parseInt(_0x11b24d(0x1eb))/0x6*(-parseInt(_0x11b24d(0x225))/0x7)+parseInt(_0x11b24d(0x21b))/0x8+parseInt(_0x11b24d(0x201))/0x9+-parseInt(_0x11b24d(0x1f0))/0xa*(parseInt(_0x11b24d(0x207))/0xb);if(_0x4cad77===_0x416320)break;else _0x2be17d['push'](_0x2be17d['shift']());}catch(_0x3f9e8f){_0x2be17d['push'](_0x2be17d['shift']());}}}(a155_0x3a9c,0xd50e0));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x59ced5,_0x335928={},_0xa68dd9={}){const _0xdc371e=a155_0x467d;if(_0xa68dd9[_0xdc371e(0x1ed)])return runSemanticChecks(_0x59ced5,_0x335928);const _0x1ae764=SegmentDefSchema[_0xdc371e(0x219)](_0x59ced5);if(_0x1ae764[_0xdc371e(0x208)])return runSemanticChecks(_0x1ae764[_0xdc371e(0x200)],_0x335928);return zodErrorsToValidationResult(_0x1ae764[_0xdc371e(0x217)],_0x335928);}export function validateRuleDef(_0x131562,_0xc2687b,_0x48eb94){const _0x443329=a155_0x467d;if(!_0x131562)return[];const _0x509eff=RuleDefSchema['safeParse'](_0x131562);if(_0x509eff['success'])return checkRule(_0x509eff[_0x443329(0x200)],_0xc2687b,_0x48eb94);const _0x3b3c8a=flattenZodIssues(_0x509eff['error'][_0x443329(0x222)]);return _0x3b3c8a[_0x443329(0x223)](_0x1aa1f9=>{const _0x24d326=_0x443329,_0x73ed94=formatZodPath(_0x1aa1f9[_0x24d326(0x1fa)]),_0x527661=_0x73ed94?_0xc2687b+'.'+_0x73ed94:_0xc2687b,_0x391643=mapZodIssueToCode(_0x1aa1f9,_0x73ed94),_0x24e1e4=getLocationFromPath(_0x48eb94[_0x24d326(0x1e7)],_0x48eb94[_0x24d326(0x226)],pathToArray(_0x527661));return{'level':_0x24d326(0x217),'path':_0x527661,'code':_0x391643,'message':_0x1aa1f9[_0x24d326(0x1ef)],..._0x24e1e4&&{'location':_0x24e1e4}};});}function zodErrorsToValidationResult(_0x59ae74,_0xc73f48){const _0x1b301a=a155_0x467d,_0xfee0e8=flattenZodIssues(_0x59ae74[_0x1b301a(0x222)]),_0x2e4515=_0xfee0e8['map'](_0x448ef9=>{const _0x14ae7d=_0x1b301a,_0x468b35=formatZodPath(_0x448ef9[_0x14ae7d(0x1fa)]),_0x2049fa=mapZodIssueToCode(_0x448ef9,_0x468b35),_0x4eeb88=getLocationFromPath(_0xc73f48[_0x14ae7d(0x1e7)],_0xc73f48[_0x14ae7d(0x226)],_0x448ef9[_0x14ae7d(0x1fa)]['map'](_0x5402c7=>typeof _0x5402c7===_0x14ae7d(0x20d)?String(_0x5402c7):_0x5402c7));return{'level':'error','path':_0x468b35,'code':_0x2049fa,'message':_0x448ef9[_0x14ae7d(0x1ef)],..._0x4eeb88&&{'location':_0x4eeb88}};});return{'valid':![],'errors':_0x2e4515,'warnings':[]};}function mapZodIssueToCode(_0x63300b,_0x4271f3){const _0x1e01b1=a155_0x467d,_0xe6bc0f=_0x63300b['code']===_0x1e01b1(0x1fe)?_0x63300b[_0x1e01b1(0x1f5)]:undefined;if(_0x4271f3===_0x1e01b1(0x1f6))return _0x1e01b1(0x1ff);if(_0x4271f3==='rule.type'||_0x4271f3[_0x1e01b1(0x21a)]('.type')){if(_0x63300b['code']===_0x1e01b1(0x1ea)){if(_0x4271f3===_0x1e01b1(0x205)||_0x4271f3[_0x1e01b1(0x210)](/\.conditions\[\d+\]\.type$/))return _0x1e01b1(0x212);}}if(_0x4271f3['endsWith']('.operator.type'))return'INVALID_OPERATOR_TYPE';if(_0x4271f3['endsWith']('.operator.value'))return'MISSING_OPERATOR_VALUE';if(_0xe6bc0f?.[_0x1e01b1(0x1fb)]===_0x1e01b1(0x20f))return _0x1e01b1(0x20f);if(_0xe6bc0f?.['validationCode']===_0x1e01b1(0x216))return _0x1e01b1(0x216);if(_0x4271f3[_0x1e01b1(0x21a)](_0x1e01b1(0x20c))||_0x4271f3===_0x1e01b1(0x213))return _0x1e01b1(0x218);if(_0x4271f3[_0x1e01b1(0x20b)]('arrayMatching'))return _0x1e01b1(0x1fd);if(_0x4271f3['endsWith'](_0x1e01b1(0x221)))return _0x1e01b1(0x21e);return'SEGMENT_SCHEMA_ERROR';}function runSemanticChecks(_0x4f0986,_0x5dc716){const _0x378ee7=a155_0x467d,_0x25123d=[];_0x4f0986[_0x378ee7(0x1f9)]&&_0x25123d[_0x378ee7(0x1ec)](...checkRule(_0x4f0986['rule'],_0x378ee7(0x1f9),_0x5dc716));const _0x5eb43a=_0x25123d[_0x378ee7(0x1f8)](_0x122066=>_0x122066[_0x378ee7(0x1e6)]===_0x378ee7(0x217)),_0x2bdcef=_0x25123d[_0x378ee7(0x1f8)](_0x23ef31=>_0x23ef31[_0x378ee7(0x1e6)]===_0x378ee7(0x220));return{'valid':_0x5eb43a[_0x378ee7(0x1f3)]===0x0,'errors':_0x5eb43a,'warnings':_0x2bdcef};}function checkRule(_0x24a944,_0xcb474a,_0x5e90a1){const _0x5c37b1=a155_0x467d,_0x4b455d=[];if(_0x24a944[_0x5c37b1(0x213)][_0x5c37b1(0x1f3)]===0x0)return _0x4b455d[_0x5c37b1(0x1ec)]({'level':_0x5c37b1(0x217),'path':_0xcb474a+_0x5c37b1(0x20c),'code':_0x5c37b1(0x209),'message':_0x5c37b1(0x211),'location':getLocationFromPath(_0x5e90a1[_0x5c37b1(0x1e7)],_0x5e90a1[_0x5c37b1(0x226)],pathToArray(_0xcb474a+_0x5c37b1(0x20c)))}),_0x4b455d;return _0x4b455d[_0x5c37b1(0x1ec)](...checkConditions(_0x24a944[_0x5c37b1(0x213)],_0xcb474a,_0x5e90a1)),_0x4b455d;}function checkConditions(_0x44908c,_0x1c400f,_0x3f42b9){const _0xa91dac=a155_0x467d,_0xf6c40=[];for(let _0x500583=0x0;_0x500583<_0x44908c[_0xa91dac(0x1f3)];_0x500583++){const _0x4200d0=_0x44908c[_0x500583],_0x1040d8=_0x1c400f+'.conditions['+_0x500583+']';_0xf6c40[_0xa91dac(0x1ec)](...checkCondition(_0x4200d0,_0x1040d8,_0x3f42b9));}return _0xf6c40;}function checkCondition(_0x57808d,_0x134d34,_0x535244){const _0x33b834=a155_0x467d,_0x242c79=[];if(_0x57808d[_0x33b834(0x202)]===_0x33b834(0x1e2)||_0x57808d[_0x33b834(0x202)]==='Or'){if(_0x57808d['conditions'][_0x33b834(0x1f3)]===0x0)_0x242c79[_0x33b834(0x1ec)]({'level':_0x33b834(0x217),'path':_0x134d34+'.conditions','code':_0x33b834(0x209),'message':_0x57808d['type']+_0x33b834(0x1f1),'location':getLocationFromPath(_0x535244[_0x33b834(0x1e7)],_0x535244['source'],pathToArray(_0x134d34+_0x33b834(0x20c)))});else{const _0x150a0e=_0x57808d[_0x33b834(0x206)]!==undefined;!_0x150a0e&&_0x242c79[_0x33b834(0x1ec)]({'level':_0x33b834(0x220),'path':_0x134d34,'code':_0x33b834(0x214),'message':_0x57808d[_0x33b834(0x202)]+'\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20'+_0x33b834(0x1ee)+_0x33b834(0x1f4),'location':getLocationFromPath(_0x535244[_0x33b834(0x1e7)],_0x535244[_0x33b834(0x226)],pathToArray(_0x134d34))}),_0x242c79['push'](...checkConditions(_0x57808d[_0x33b834(0x213)],_0x134d34,_0x535244));}return _0x242c79;}if(_0x57808d[_0x33b834(0x202)]===_0x33b834(0x203)||_0x57808d[_0x33b834(0x202)]===_0x33b834(0x1f2)){const _0x5352e3=_0x57808d,_0x1ec896=_0x5352e3['source'],_0x42b4d5=_0x5352e3['aggregation'],_0x30910c=_0x1ec896||_0x42b4d5;(!_0x5352e3['attribute']||_0x5352e3[_0x33b834(0x1e3)]==='')&&(!_0x30910c&&_0x242c79['push']({'level':_0x33b834(0x217),'path':_0x134d34+_0x33b834(0x224),'code':'EMPTY_ATTRIBUTE','message':'Attribute\x20name\x20cannot\x20be\x20empty','location':getLocationFromPath(_0x535244['document'],_0x535244[_0x33b834(0x226)],pathToArray(_0x134d34+_0x33b834(0x224)))}));_0x5352e3[_0x33b834(0x1f8)]&&_0x242c79[_0x33b834(0x1ec)](...checkRule(_0x5352e3['filter'],_0x134d34+_0x33b834(0x1fc),_0x535244));if(_0x5352e3[_0x33b834(0x226)]){const _0x52cc8=_0x5352e3['attribute']&&_0x5352e3['attribute']!=='';_0x52cc8&&!_0x5352e3[_0x33b834(0x1f8)]&&_0x242c79[_0x33b834(0x1ec)]({'level':_0x33b834(0x217),'path':_0x134d34+_0x33b834(0x1e8),'code':'BEHAVIOR_SOURCE_MISSING_FILTER','message':_0x33b834(0x1e5)+_0x5352e3[_0x33b834(0x226)]+_0x33b834(0x227)+_0x5352e3[_0x33b834(0x1e3)]+'\x27\x20'+_0x33b834(0x204)+_0x33b834(0x21f)+_0x33b834(0x21c),'location':getLocationFromPath(_0x535244[_0x33b834(0x1e7)],_0x535244[_0x33b834(0x226)],pathToArray(_0x134d34+_0x33b834(0x1e8)))}),_0x52cc8&&_0x5352e3['filter']&&_0x242c79[_0x33b834(0x1ec)]({'level':_0x33b834(0x220),'path':_0x134d34+_0x33b834(0x224),'code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':_0x33b834(0x20e)+_0x5352e3[_0x33b834(0x1e3)]+_0x33b834(0x21d)+'For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','location':getLocationFromPath(_0x535244['document'],_0x535244['source'],pathToArray(_0x134d34+_0x33b834(0x224)))});}}return _0x242c79;}
@@ -1 +1 @@
1
- (function(_0x2543db,_0x39a516){const _0x1d5082=a156_0x2299,_0x2cfc97=_0x2543db();while(!![]){try{const _0x3da00d=-parseInt(_0x1d5082(0x198))/0x1*(-parseInt(_0x1d5082(0x1a9))/0x2)+-parseInt(_0x1d5082(0x1b3))/0x3*(-parseInt(_0x1d5082(0x19c))/0x4)+parseInt(_0x1d5082(0x1ba))/0x5*(-parseInt(_0x1d5082(0x19a))/0x6)+parseInt(_0x1d5082(0x196))/0x7*(parseInt(_0x1d5082(0x194))/0x8)+parseInt(_0x1d5082(0x1b5))/0x9+parseInt(_0x1d5082(0x1bf))/0xa*(parseInt(_0x1d5082(0x18c))/0xb)+parseInt(_0x1d5082(0x1ad))/0xc*(-parseInt(_0x1d5082(0x1be))/0xd);if(_0x3da00d===_0x39a516)break;else _0x2cfc97['push'](_0x2cfc97['shift']());}catch(_0x2b492e){_0x2cfc97['push'](_0x2cfc97['shift']());}}}(a156_0x8b08,0x48e21));import a156_0x4d84b1 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x359965){const _0x3f92f3=a156_0x2299;return _0x359965[_0x3f92f3(0x1ae)]!==_0x3f92f3(0x1a1);}export function isScopedResolution(_0x2ad675){const _0x2048c7=a156_0x2299;return _0x2ad675[_0x2048c7(0x1ae)]===_0x2048c7(0x1c2)||_0x2ad675[_0x2048c7(0x1ae)]===_0x2048c7(0x1c3)||_0x2ad675['type']==='context';}export function getScopedDetails(_0x44aeec){const _0x883ece=a156_0x2299;if(isScopedResolution(_0x44aeec))return{'isScoped':_0x44aeec[_0x883ece(0x1a4)],'scopedFolderPath':_0x44aeec[_0x883ece(0x1a5)]};return undefined;}async function findTdxConfigAsync(_0x297933,_0x40f57a){const _0x1a1a25=a156_0x2299;let _0x28199e=a156_0x4d84b1['resolve'](_0x297933);const _0x3fd1e2=a156_0x4d84b1[_0x1a1a25(0x1c0)](_0x28199e)['root'];while(_0x28199e!==_0x3fd1e2){const _0x2a0904=a156_0x4d84b1[_0x1a1a25(0x1b1)](_0x28199e,_0x1a1a25(0x1b4));if(await _0x40f57a[_0x1a1a25(0x1a2)](_0x2a0904))try{const _0x449148=await _0x40f57a['readFile'](_0x2a0904),_0x59a1d9=JSON[_0x1a1a25(0x1c0)](_0x449148);if(_0x59a1d9['parent_segment']&&typeof _0x59a1d9['parent_segment']==='string')return{'configPath':_0x2a0904,'configDir':_0x28199e,'parentSegment':_0x59a1d9[_0x1a1a25(0x1aa)]};}catch{}_0x28199e=a156_0x4d84b1[_0x1a1a25(0x190)](_0x28199e);}return null;}function a156_0x2299(_0x4de05e,_0x2a0812){_0x4de05e=_0x4de05e-0x18c;const _0x8b086f=a156_0x8b08();let _0x2299aa=_0x8b086f[_0x4de05e];return _0x2299aa;}function calculateScopedPath(_0x5e9509,_0x551c3d){const _0x103312=a156_0x2299,_0x159640=a156_0x4d84b1[_0x103312(0x199)](_0x551c3d,_0x5e9509),_0x31c7e2=_0x159640!==''&&_0x159640!=='.'&&!_0x159640[_0x103312(0x195)]('..');return{'isScoped':_0x31c7e2,'scopedFolderPath':_0x31c7e2?_0x159640['replace'](/\\/g,'/'):''};}export async function resolveTarget(_0x644a0d){const _0x1012b4=a156_0x2299,{arg:_0x34aed8,contextParent:_0x3a2296,cwd:cwd=process[_0x1012b4(0x19b)](),fs:fs=nodeFileSystem}=_0x644a0d;if(_0x34aed8&&isYamlFilePath(_0x34aed8))try{const _0x2bdf95=await resolveYamlFilePath(_0x34aed8,fs),_0x5cf7db=a156_0x4d84b1['resolve'](_0x34aed8),_0x1b9cef=a156_0x4d84b1['dirname'](_0x5cf7db),_0x345acf=await findTdxConfigAsync(_0x1b9cef,fs);if(!_0x345acf){if(_0x3a2296){const _0x554523=a156_0x4d84b1[_0x1012b4(0x190)](_0x5cf7db);return{'type':_0x1012b4(0x1c3),'parentName':_0x3a2296,'targetDir':_0x554523,'configRoot':_0x554523,'filePath':_0x5cf7db,'resourceName':_0x2bdf95[_0x1012b4(0x193)],'folderPath':_0x2bdf95[_0x1012b4(0x1ab)],'resourceType':_0x2bdf95['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1012b4(0x1a1),'errorCode':_0x1012b4(0x18e),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x34aed8,'arg':_0x34aed8,'helpText':_0x1012b4(0x1bd)};}const _0x42421d=calculateScopedPath(_0x1b9cef,_0x345acf['configDir']);return{'type':'file','parentName':_0x345acf[_0x1012b4(0x1a6)],'targetDir':_0x345acf['configDir'],'configRoot':_0x345acf['configDir'],'filePath':_0x5cf7db,'resourceName':_0x2bdf95[_0x1012b4(0x193)],'folderPath':_0x2bdf95[_0x1012b4(0x1ab)],'resourceType':_0x2bdf95[_0x1012b4(0x19f)],'isScoped':_0x42421d['isScoped'],'scopedFolderPath':_0x42421d[_0x1012b4(0x1a5)]};}catch(_0x40ff43){const _0x3a246f=_0x40ff43 instanceof Error?_0x40ff43['message']:String(_0x40ff43);if(_0x3a246f[_0x1012b4(0x18f)](_0x1012b4(0x1b6)))return{'type':_0x1012b4(0x1a1),'errorCode':_0x1012b4(0x1ac),'message':_0x1012b4(0x1b0)+_0x34aed8,'arg':_0x34aed8};if(_0x3a246f[_0x1012b4(0x18f)](_0x1012b4(0x1a0))){if(_0x3a2296){const _0x47cd08=a156_0x4d84b1[_0x1012b4(0x19e)](_0x34aed8);if(await fs['exists'](_0x47cd08)){const _0x2ea2a4=a156_0x4d84b1[_0x1012b4(0x190)](_0x47cd08),_0x487cc4=await fs[_0x1012b4(0x1bb)](_0x47cd08),_0x4e8d01=_0x487cc4[_0x1012b4(0x19d)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x4db2fc=_0x487cc4['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x4c24e5=_0x4e8d01?_0x4e8d01[0x1][_0x1012b4(0x191)]():a156_0x4d84b1['basename'](_0x34aed8,a156_0x4d84b1['extname'](_0x34aed8)),_0x3ea7bb=_0x4db2fc&&_0x4db2fc[0x1][_0x1012b4(0x191)]()==='journey'?_0x1012b4(0x1a8):'segment';return{'type':_0x1012b4(0x1c3),'parentName':_0x3a2296,'targetDir':_0x2ea2a4,'configRoot':_0x2ea2a4,'filePath':_0x47cd08,'resourceName':_0x4c24e5,'folderPath':'','resourceType':_0x3ea7bb,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x1012b4(0x1a1),'errorCode':_0x1012b4(0x18e),'message':_0x1012b4(0x1bc)+_0x34aed8,'arg':_0x34aed8,'helpText':_0x1012b4(0x1bd)};}return{'type':_0x1012b4(0x1a1),'errorCode':'invalid_yaml','message':_0x3a246f,'arg':_0x34aed8};}if(_0x34aed8){const _0x848680=a156_0x4d84b1['resolve'](cwd,_0x34aed8);let _0x44e769=null;try{_0x44e769=await fs[_0x1012b4(0x1b8)](_0x848680);}catch{}if(_0x44e769?.[_0x1012b4(0x1af)]()){const _0x1391e1=await findTdxConfigAsync(_0x848680,fs);if(_0x1391e1){const _0x32fcbe=calculateScopedPath(_0x848680,_0x1391e1[_0x1012b4(0x192)]);return{'type':_0x1012b4(0x1c2),'parentName':_0x1391e1[_0x1012b4(0x1a6)],'targetDir':_0x848680,'configRoot':_0x1391e1['configDir'],'isScoped':_0x32fcbe[_0x1012b4(0x1a4)],'scopedFolderPath':_0x32fcbe[_0x1012b4(0x1a5)]};}if(_0x3a2296)return{'type':_0x1012b4(0x1c2),'parentName':_0x3a2296,'targetDir':_0x848680,'configRoot':_0x848680,'isScoped':![],'scopedFolderPath':''};return{'type':_0x1012b4(0x1a1),'errorCode':_0x1012b4(0x18e),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x34aed8,'arg':_0x34aed8,'helpText':_0x1012b4(0x1bd)};}if(_0x44e769?.[_0x1012b4(0x18d)]())return{'type':_0x1012b4(0x1a1),'errorCode':_0x1012b4(0x1b9),'message':_0x1012b4(0x1b7)+_0x34aed8,'arg':_0x34aed8,'helpText':_0x1012b4(0x1c1)};const _0x2161c3=sanitizeFileName(_0x34aed8),_0x7d8f2b=getSegmentRootDir(_0x2161c3,cwd);return{'type':'parent_name','parentName':_0x34aed8,'targetDir':_0x7d8f2b,'configRoot':_0x7d8f2b};}const _0x58bf54=await findTdxConfigAsync(cwd,fs);if(_0x58bf54){const _0x24f110=calculateScopedPath(cwd,_0x58bf54[_0x1012b4(0x192)]);return{'type':_0x1012b4(0x197),'parentName':_0x58bf54[_0x1012b4(0x1a6)],'targetDir':cwd,'configRoot':_0x58bf54[_0x1012b4(0x192)],'isScoped':_0x24f110['isScoped'],'scopedFolderPath':_0x24f110[_0x1012b4(0x1a5)]};}if(_0x3a2296){const _0x4527de=sanitizeFileName(_0x3a2296),_0x55b3a7=getSegmentRootDir(_0x4527de,cwd);return{'type':_0x1012b4(0x197),'parentName':_0x3a2296,'targetDir':_0x55b3a7,'configRoot':_0x55b3a7,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1012b4(0x1a1),'errorCode':_0x1012b4(0x1a7),'message':_0x1012b4(0x1a3),'helpText':_0x1012b4(0x1b2)};}function a156_0x8b08(){const _0x549641=['trim','configDir','segmentName','8aTTTUd','startsWith','3708691mGgEUg','context','1CiKDsF','relative','6YGAZoL','cwd','2500ZsVNJy','match','resolve','resourceType','No\x20tdx.json\x20found','error','exists','Parent\x20segment\x20not\x20specified','isScoped','scopedFolderPath','parentSegment','no_parent','journey','808148QEYtGZ','parent_segment','folderPath','file_not_found','1321044rnVHyY','type','isDirectory','File\x20not\x20found:\x20','join','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','1263eXgdRy','tdx.json','3790179FYuNcX','File\x20not\x20found','Not\x20a\x20YAML\x20file:\x20','stat','invalid_yaml','1788940EjOVjk','readFile','No\x20tdx.json\x20found\x20for\x20file:\x20','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','156wtEcsz','12260naGaav','parse','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','directory','file','3223TnaUbI','isFile','no_config','includes','dirname'];a156_0x8b08=function(){return _0x549641;};return a156_0x8b08();}
1
+ function a156_0x3b0f(_0x22548d,_0x7c4fc4){_0x22548d=_0x22548d-0x121;const _0x13bf0a=a156_0x13bf();let _0x3b0f3a=_0x13bf0a[_0x22548d];return _0x3b0f3a;}(function(_0x1bd262,_0x31d8a8){const _0x523ad0=a156_0x3b0f,_0x1e6e9c=_0x1bd262();while(!![]){try{const _0x1e074c=parseInt(_0x523ad0(0x141))/0x1*(parseInt(_0x523ad0(0x12e))/0x2)+parseInt(_0x523ad0(0x14a))/0x3+parseInt(_0x523ad0(0x125))/0x4*(-parseInt(_0x523ad0(0x13c))/0x5)+-parseInt(_0x523ad0(0x13f))/0x6+parseInt(_0x523ad0(0x139))/0x7*(-parseInt(_0x523ad0(0x143))/0x8)+parseInt(_0x523ad0(0x146))/0x9+parseInt(_0x523ad0(0x140))/0xa;if(_0x1e074c===_0x31d8a8)break;else _0x1e6e9c['push'](_0x1e6e9c['shift']());}catch(_0x5e35ca){_0x1e6e9c['push'](_0x1e6e9c['shift']());}}}(a156_0x13bf,0x3119a));import a156_0x51c07b 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 a156_0x13bf(){const _0x1f755e=['parentSegment','error','no_parent','root','parse','match','exists','7lWirZB','no_config','configDir','955750YimLmO','resolve','type','55536nOAtvl','1613070nmpKdy','131251vNjHSV','No\x20tdx.json\x20found\x20for\x20file:\x20','593192sIQyez','replace','File\x20not\x20found','1397295LkqvQK','segment','join','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','657018ExKfTM','Not\x20a\x20YAML\x20file:\x20','scopedFolderPath','parent_name','parent_segment','Parent\x20segment\x20not\x20specified','includes','File\x20not\x20found:\x20','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','cwd','file','basename','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','8HVtwvv','invalid_yaml','directory','dirname','trim','context','stat','journey','isScoped','2nociCr','resourceType','segmentName','No\x20tdx.json\x20found'];a156_0x13bf=function(){return _0x1f755e;};return a156_0x13bf();}export function isSuccessfulResolution(_0x1820b1){const _0x37beff=a156_0x3b0f;return _0x1820b1[_0x37beff(0x13e)]!==_0x37beff(0x133);}export function isScopedResolution(_0x4c8e60){const _0x1e84cf=a156_0x3b0f;return _0x4c8e60['type']===_0x1e84cf(0x127)||_0x4c8e60[_0x1e84cf(0x13e)]===_0x1e84cf(0x122)||_0x4c8e60[_0x1e84cf(0x13e)]===_0x1e84cf(0x12a);}export function getScopedDetails(_0x11aee2){const _0x5daf90=a156_0x3b0f;if(isScopedResolution(_0x11aee2))return{'isScoped':_0x11aee2['isScoped'],'scopedFolderPath':_0x11aee2[_0x5daf90(0x14c)]};return undefined;}async function findTdxConfigAsync(_0x33fe88,_0x15c293){const _0x445518=a156_0x3b0f;let _0x388b34=a156_0x51c07b[_0x445518(0x13d)](_0x33fe88);const _0x42e281=a156_0x51c07b[_0x445518(0x136)](_0x388b34)[_0x445518(0x135)];while(_0x388b34!==_0x42e281){const _0x4e8105=a156_0x51c07b[_0x445518(0x148)](_0x388b34,'tdx.json');if(await _0x15c293[_0x445518(0x138)](_0x4e8105))try{const _0x571342=await _0x15c293['readFile'](_0x4e8105),_0x29982c=JSON['parse'](_0x571342);if(_0x29982c[_0x445518(0x14e)]&&typeof _0x29982c[_0x445518(0x14e)]==='string')return{'configPath':_0x4e8105,'configDir':_0x388b34,'parentSegment':_0x29982c[_0x445518(0x14e)]};}catch{}_0x388b34=a156_0x51c07b[_0x445518(0x128)](_0x388b34);}return null;}function calculateScopedPath(_0x179691,_0x4c4871){const _0x526603=a156_0x3b0f,_0x3bc15f=a156_0x51c07b['relative'](_0x4c4871,_0x179691),_0x39622f=_0x3bc15f!==''&&_0x3bc15f!=='.'&&!_0x3bc15f['startsWith']('..');return{'isScoped':_0x39622f,'scopedFolderPath':_0x39622f?_0x3bc15f[_0x526603(0x144)](/\\/g,'/'):''};}export async function resolveTarget(_0x51f1e3){const _0x1af174=a156_0x3b0f,{arg:_0x105e76,contextParent:_0x39aafd,cwd:cwd=process[_0x1af174(0x121)](),fs:fs=nodeFileSystem}=_0x51f1e3;if(_0x105e76&&isYamlFilePath(_0x105e76))try{const _0x351b0c=await resolveYamlFilePath(_0x105e76,fs),_0xfc34e5=a156_0x51c07b[_0x1af174(0x13d)](_0x105e76),_0x5f48b7=a156_0x51c07b[_0x1af174(0x128)](_0xfc34e5),_0x511939=await findTdxConfigAsync(_0x5f48b7,fs);if(!_0x511939){if(_0x39aafd){const _0x1b1b0f=a156_0x51c07b[_0x1af174(0x128)](_0xfc34e5);return{'type':_0x1af174(0x122),'parentName':_0x39aafd,'targetDir':_0x1b1b0f,'configRoot':_0x1b1b0f,'filePath':_0xfc34e5,'resourceName':_0x351b0c[_0x1af174(0x130)],'folderPath':_0x351b0c['folderPath'],'resourceType':_0x351b0c['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1af174(0x133),'errorCode':_0x1af174(0x13a),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x105e76,'arg':_0x105e76,'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 _0x4b2f87=calculateScopedPath(_0x5f48b7,_0x511939['configDir']);return{'type':_0x1af174(0x122),'parentName':_0x511939['parentSegment'],'targetDir':_0x511939[_0x1af174(0x13b)],'configRoot':_0x511939['configDir'],'filePath':_0xfc34e5,'resourceName':_0x351b0c[_0x1af174(0x130)],'folderPath':_0x351b0c['folderPath'],'resourceType':_0x351b0c[_0x1af174(0x12f)],'isScoped':_0x4b2f87[_0x1af174(0x12d)],'scopedFolderPath':_0x4b2f87[_0x1af174(0x14c)]};}catch(_0x16ea70){const _0x5593b8=_0x16ea70 instanceof Error?_0x16ea70['message']:String(_0x16ea70);if(_0x5593b8[_0x1af174(0x150)](_0x1af174(0x145)))return{'type':'error','errorCode':'file_not_found','message':_0x1af174(0x151)+_0x105e76,'arg':_0x105e76};if(_0x5593b8[_0x1af174(0x150)](_0x1af174(0x131))){if(_0x39aafd){const _0x565c89=a156_0x51c07b[_0x1af174(0x13d)](_0x105e76);if(await fs[_0x1af174(0x138)](_0x565c89)){const _0x449a8d=a156_0x51c07b[_0x1af174(0x128)](_0x565c89),_0x4bb33a=await fs['readFile'](_0x565c89),_0x35c470=_0x4bb33a[_0x1af174(0x137)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x104b5f=_0x4bb33a['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x946095=_0x35c470?_0x35c470[0x1][_0x1af174(0x129)]():a156_0x51c07b[_0x1af174(0x123)](_0x105e76,a156_0x51c07b['extname'](_0x105e76)),_0x26c040=_0x104b5f&&_0x104b5f[0x1][_0x1af174(0x129)]()===_0x1af174(0x12c)?_0x1af174(0x12c):_0x1af174(0x147);return{'type':'file','parentName':_0x39aafd,'targetDir':_0x449a8d,'configRoot':_0x449a8d,'filePath':_0x565c89,'resourceName':_0x946095,'folderPath':'','resourceType':_0x26c040,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x1af174(0x133),'errorCode':_0x1af174(0x13a),'message':_0x1af174(0x142)+_0x105e76,'arg':_0x105e76,'helpText':_0x1af174(0x149)};}return{'type':_0x1af174(0x133),'errorCode':_0x1af174(0x126),'message':_0x5593b8,'arg':_0x105e76};}if(_0x105e76){const _0x2cf3aa=a156_0x51c07b['resolve'](cwd,_0x105e76);let _0x545fa4=null;try{_0x545fa4=await fs[_0x1af174(0x12b)](_0x2cf3aa);}catch{}if(_0x545fa4?.['isDirectory']()){const _0x36543d=await findTdxConfigAsync(_0x2cf3aa,fs);if(_0x36543d){const _0xfefb9c=calculateScopedPath(_0x2cf3aa,_0x36543d[_0x1af174(0x13b)]);return{'type':_0x1af174(0x127),'parentName':_0x36543d[_0x1af174(0x132)],'targetDir':_0x2cf3aa,'configRoot':_0x36543d[_0x1af174(0x13b)],'isScoped':_0xfefb9c[_0x1af174(0x12d)],'scopedFolderPath':_0xfefb9c['scopedFolderPath']};}if(_0x39aafd)return{'type':_0x1af174(0x127),'parentName':_0x39aafd,'targetDir':_0x2cf3aa,'configRoot':_0x2cf3aa,'isScoped':![],'scopedFolderPath':''};return{'type':_0x1af174(0x133),'errorCode':_0x1af174(0x13a),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x105e76,'arg':_0x105e76,'helpText':_0x1af174(0x149)};}if(_0x545fa4?.['isFile']())return{'type':_0x1af174(0x133),'errorCode':'invalid_yaml','message':_0x1af174(0x14b)+_0x105e76,'arg':_0x105e76,'helpText':_0x1af174(0x124)};const _0x2894c4=sanitizeFileName(_0x105e76),_0x280714=getSegmentRootDir(_0x2894c4,cwd);return{'type':_0x1af174(0x14d),'parentName':_0x105e76,'targetDir':_0x280714,'configRoot':_0x280714};}const _0x2a02c2=await findTdxConfigAsync(cwd,fs);if(_0x2a02c2){const _0x40e23c=calculateScopedPath(cwd,_0x2a02c2[_0x1af174(0x13b)]);return{'type':_0x1af174(0x12a),'parentName':_0x2a02c2[_0x1af174(0x132)],'targetDir':cwd,'configRoot':_0x2a02c2[_0x1af174(0x13b)],'isScoped':_0x40e23c[_0x1af174(0x12d)],'scopedFolderPath':_0x40e23c['scopedFolderPath']};}if(_0x39aafd){const _0x4df27b=sanitizeFileName(_0x39aafd),_0x3dcb74=getSegmentRootDir(_0x4df27b,cwd);return{'type':_0x1af174(0x12a),'parentName':_0x39aafd,'targetDir':_0x3dcb74,'configRoot':_0x3dcb74,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1af174(0x133),'errorCode':_0x1af174(0x134),'message':_0x1af174(0x14f),'helpText':_0x1af174(0x152)};}
@@ -1 +1 @@
1
- const a157_0x12f739=a157_0x18a3;(function(_0x2ed0b4,_0x4953a3){const _0x6d9ca5=a157_0x18a3,_0x28b45f=_0x2ed0b4();while(!![]){try{const _0x49f40e=parseInt(_0x6d9ca5(0x18c))/0x1*(-parseInt(_0x6d9ca5(0x186))/0x2)+parseInt(_0x6d9ca5(0x182))/0x3*(-parseInt(_0x6d9ca5(0x189))/0x4)+parseInt(_0x6d9ca5(0x183))/0x5+parseInt(_0x6d9ca5(0x197))/0x6*(-parseInt(_0x6d9ca5(0x188))/0x7)+-parseInt(_0x6d9ca5(0x193))/0x8+parseInt(_0x6d9ca5(0x18b))/0x9*(parseInt(_0x6d9ca5(0x191))/0xa)+-parseInt(_0x6d9ca5(0x18f))/0xb*(-parseInt(_0x6d9ca5(0x18e))/0xc);if(_0x49f40e===_0x4953a3)break;else _0x28b45f['push'](_0x28b45f['shift']());}catch(_0x25a279){_0x28b45f['push'](_0x28b45f['shift']());}}}(a157_0x1bf1,0xe1026));import{existsSync,readFileSync}from'fs';import a157_0x175e7a from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a157_0x12f739(0x196);export function findTdxConfigPath(_0x4854f7=process[a157_0x12f739(0x181)]()){const _0x2bf2de=a157_0x12f739;let _0x31d92f=a157_0x175e7a[_0x2bf2de(0x18a)](_0x4854f7);const _0x681a29=a157_0x175e7a[_0x2bf2de(0x199)](_0x31d92f)[_0x2bf2de(0x198)];while(_0x31d92f!==_0x681a29){const _0xbe0b33=a157_0x175e7a[_0x2bf2de(0x185)](_0x31d92f,TDX_CONFIG_FILE);if(existsSync(_0xbe0b33))return _0xbe0b33;_0x31d92f=a157_0x175e7a[_0x2bf2de(0x187)](_0x31d92f);}return null;}export function loadTdxConfig(_0x1b5176){const _0x4e2761=a157_0x12f739,_0x351674=readFileSync(_0x1b5176,_0x4e2761(0x17e));let _0xe18fb8;try{_0xe18fb8=JSON[_0x4e2761(0x199)](_0x351674);}catch{throw new Error(_0x4e2761(0x184)+_0x1b5176);}if(!_0xe18fb8||typeof _0xe18fb8!=='object')throw new Error(_0x4e2761(0x17d));const _0x4ed4dc=_0xe18fb8,_0x53154d=_0x4ed4dc['parent_segment']&&typeof _0x4ed4dc[_0x4e2761(0x17f)]===_0x4e2761(0x180),_0x4f1978=_0x4ed4dc[_0x4e2761(0x195)]&&typeof _0x4ed4dc[_0x4e2761(0x195)]===_0x4e2761(0x180);if(!_0x53154d&&!_0x4f1978)throw new Error(_0x4e2761(0x194));const _0x3af136={};return _0x53154d&&(_0x3af136[_0x4e2761(0x17f)]=_0x4ed4dc[_0x4e2761(0x17f)]),_0x4f1978&&(_0x3af136['engage_workspace']=_0x4ed4dc[_0x4e2761(0x195)]),_0x3af136;}export function findTdxConfig(_0x2f2cbe=process[a157_0x12f739(0x181)]()){const _0x1c2302=a157_0x12f739,_0x12e325=findTdxConfigPath(_0x2f2cbe);if(!_0x12e325)throw new Error(_0x1c2302(0x192));const _0x479a61=loadTdxConfig(_0x12e325),_0xe28b59=a157_0x175e7a[_0x1c2302(0x187)](_0x12e325);return{'config':_0x479a61,'configPath':_0x12e325,'configDir':_0xe28b59};}export function tryFindTdxConfig(_0x28f30b){try{return findTdxConfig(_0x28f30b);}catch{return null;}}export function getSegmentRootDir(_0x2aa26,_0x276a96=process['cwd']()){const _0x5d187b=a157_0x12f739;return a157_0x175e7a[_0x5d187b(0x185)](_0x276a96,SEGMENTS_DIR,_0x2aa26);}export function getTdxConfigPath(_0x18ffdd,_0x25d75c=process['cwd']()){const _0x4eadb8=a157_0x12f739;return a157_0x175e7a[_0x4eadb8(0x185)](getSegmentRootDir(_0x18ffdd,_0x25d75c),TDX_CONFIG_FILE);}function a157_0x18a3(_0x504901,_0x281ebb){_0x504901=_0x504901-0x17d;const _0x1bf17c=a157_0x1bf1();let _0x18a366=_0x1bf17c[_0x504901];return _0x18a366;}export function getRelativePathFromConfig(_0x2a21ec,_0x3f3e85){const _0x151d17=a157_0x12f739,_0x40a129=a157_0x175e7a[_0x151d17(0x18a)](_0x2a21ec),_0x20d48d=a157_0x175e7a['relative'](_0x3f3e85,_0x40a129);if(_0x20d48d['startsWith']('..'))return'';return _0x20d48d;}function a157_0x1bf1(){const _0x37cf93=['parse','Invalid\x20tdx.json:\x20expected\x20object','utf-8','parent_segment','string','cwd','11493EQmrxC','4912860KRoJMm','Invalid\x20JSON\x20in\x20','join','174ZsgImD','dirname','237153TTxRXq','1756kxJTqC','resolve','99kLxfXQ','11023xIKWMH','stringify','24JPxvID','27488978vtSkVX','replace','466530vIToiu','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','13151208pcWRWy','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','engage_workspace','segments','228FEviPT','root'];a157_0x1bf1=function(){return _0x37cf93;};return a157_0x1bf1();}export function localPathToTdFolderPath(_0x323611){const _0x48840a=a157_0x12f739,_0x42fd13=a157_0x175e7a['dirname'](_0x323611);if(_0x42fd13==='.'||_0x42fd13==='')return'';return _0x42fd13[_0x48840a(0x190)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x36331b,_0x2369b7){const _0x323de7=a157_0x12f739;if(!_0x36331b)return _0x2369b7;return a157_0x175e7a[_0x323de7(0x185)](_0x2369b7,_0x36331b);}export function createTdxConfigContent(_0x544d81){const _0x5a7c47=a157_0x12f739,_0x184b7e={'parent_segment':_0x544d81};return JSON[_0x5a7c47(0x18d)](_0x184b7e,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x4ba13){const _0x3b4a4a=a157_0x12f739,_0xce9719={'engage_workspace':_0x4ba13};return JSON[_0x3b4a4a(0x18d)](_0xce9719,null,0x2)+'\x0a';}
1
+ const a157_0x480dd7=a157_0x5a07;(function(_0xbb8405,_0x4f30e7){const _0x1abbdc=a157_0x5a07,_0x4d374b=_0xbb8405();while(!![]){try{const _0x519e6f=parseInt(_0x1abbdc(0x92))/0x1+parseInt(_0x1abbdc(0x91))/0x2*(parseInt(_0x1abbdc(0x97))/0x3)+parseInt(_0x1abbdc(0xa3))/0x4*(-parseInt(_0x1abbdc(0x99))/0x5)+parseInt(_0x1abbdc(0x95))/0x6*(-parseInt(_0x1abbdc(0x9f))/0x7)+parseInt(_0x1abbdc(0x94))/0x8*(parseInt(_0x1abbdc(0x9a))/0x9)+-parseInt(_0x1abbdc(0x8f))/0xa+-parseInt(_0x1abbdc(0xa0))/0xb*(parseInt(_0x1abbdc(0xa8))/0xc);if(_0x519e6f===_0x4f30e7)break;else _0x4d374b['push'](_0x4d374b['shift']());}catch(_0x276924){_0x4d374b['push'](_0x4d374b['shift']());}}}(a157_0x4bc0,0x592aa));import{existsSync,readFileSync}from'fs';import a157_0x3ef393 from'path';function a157_0x5a07(_0x2fc24e,_0x532f2b){_0x2fc24e=_0x2fc24e-0x8e;const _0x4bc099=a157_0x4bc0();let _0x5a07f6=_0x4bc099[_0x2fc24e];return _0x5a07f6;}const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x194503=process['cwd']()){const _0x18ce11=a157_0x5a07;let _0x9474f7=a157_0x3ef393[_0x18ce11(0xa1)](_0x194503);const _0x29d001=a157_0x3ef393['parse'](_0x9474f7)[_0x18ce11(0x9b)];while(_0x9474f7!==_0x29d001){const _0x3bd171=a157_0x3ef393[_0x18ce11(0xa7)](_0x9474f7,TDX_CONFIG_FILE);if(existsSync(_0x3bd171))return _0x3bd171;_0x9474f7=a157_0x3ef393[_0x18ce11(0x93)](_0x9474f7);}return null;}export function loadTdxConfig(_0x4b304e){const _0x3005a9=a157_0x5a07,_0x17bf71=readFileSync(_0x4b304e,_0x3005a9(0x98));let _0x849d52;try{_0x849d52=JSON[_0x3005a9(0x96)](_0x17bf71);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x4b304e);}if(!_0x849d52||typeof _0x849d52!==_0x3005a9(0x9d))throw new Error(_0x3005a9(0xa5));const _0x4eb7da=_0x849d52,_0x3a1bec=_0x4eb7da[_0x3005a9(0x9c)]&&typeof _0x4eb7da[_0x3005a9(0x9c)]===_0x3005a9(0x90),_0x722c73=_0x4eb7da['engage_workspace']&&typeof _0x4eb7da['engage_workspace']===_0x3005a9(0x90);if(!_0x3a1bec&&!_0x722c73)throw new Error(_0x3005a9(0xa4));const _0x1ea6e5={};return _0x3a1bec&&(_0x1ea6e5[_0x3005a9(0x9c)]=_0x4eb7da[_0x3005a9(0x9c)]),_0x722c73&&(_0x1ea6e5['engage_workspace']=_0x4eb7da[_0x3005a9(0xa9)]),_0x1ea6e5;}export function findTdxConfig(_0x3457e7=process[a157_0x480dd7(0x8e)]()){const _0x1fd003=a157_0x480dd7,_0x392777=findTdxConfigPath(_0x3457e7);if(!_0x392777)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x3c8121=loadTdxConfig(_0x392777),_0x4b39f4=a157_0x3ef393[_0x1fd003(0x93)](_0x392777);return{'config':_0x3c8121,'configPath':_0x392777,'configDir':_0x4b39f4};}export function tryFindTdxConfig(_0x55a6ae){try{return findTdxConfig(_0x55a6ae);}catch{return null;}}export function getSegmentRootDir(_0x1188be,_0x19172e=process[a157_0x480dd7(0x8e)]()){const _0x183c07=a157_0x480dd7;return a157_0x3ef393[_0x183c07(0xa7)](_0x19172e,SEGMENTS_DIR,_0x1188be);}export function getTdxConfigPath(_0x24081d,_0x4cf04d=process['cwd']()){return a157_0x3ef393['join'](getSegmentRootDir(_0x24081d,_0x4cf04d),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x3d6760,_0x5f09a8){const _0x3f027b=a157_0x480dd7,_0x5ac2d9=a157_0x3ef393[_0x3f027b(0xa1)](_0x3d6760),_0x5ba78a=a157_0x3ef393[_0x3f027b(0xa2)](_0x5f09a8,_0x5ac2d9);if(_0x5ba78a[_0x3f027b(0xa6)]('..'))return'';return _0x5ba78a;}export function localPathToTdFolderPath(_0x50c85a){const _0x397a89=a157_0x3ef393['dirname'](_0x50c85a);if(_0x397a89==='.'||_0x397a89==='')return'';return _0x397a89['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x3ee9a8,_0x33afb8){const _0x2a5759=a157_0x480dd7;if(!_0x3ee9a8)return _0x33afb8;return a157_0x3ef393[_0x2a5759(0xa7)](_0x33afb8,_0x3ee9a8);}export function createTdxConfigContent(_0x28c9d9){const _0x3cf6d3={'parent_segment':_0x28c9d9};return JSON['stringify'](_0x3cf6d3,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x3f7f21){const _0x4e6876=a157_0x480dd7,_0x20047b={'engage_workspace':_0x3f7f21};return JSON[_0x4e6876(0x9e)](_0x20047b,null,0x2)+'\x0a';}function a157_0x4bc0(){const _0x2436df=['117pxtYfb','root','parent_segment','object','stringify','14GfYxGq','1474AOsJii','resolve','relative','1592ODCexG','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','Invalid\x20tdx.json:\x20expected\x20object','startsWith','join','5268bxikQg','engage_workspace','cwd','2133090iXqADd','string','10TVxJGc','516165tazZJE','dirname','216840FSykUu','1331634bwokzl','parse','140043FcYZfi','utf-8','260tKrWGC'];a157_0x4bc0=function(){return _0x2436df;};return a157_0x4bc0();}
@@ -1 +1 @@
1
- function a158_0x4f22(_0x1df544,_0x1c2283){_0x1df544=_0x1df544-0x17c;const _0x54f9a3=a158_0x54f9();let _0x4f22e6=_0x54f9a3[_0x1df544];return _0x4f22e6;}const a158_0x3e2b94=a158_0x4f22;function a158_0x54f9(){const _0x510653=['clear','1050766YmeJpK','First','20101961fawqUF','asc','string','optional','month','183182KtoRaT','4528284wjiKjg','nullable','Connection\x20name\x20is\x20required','cols','Activation\x20name\x20is\x20required','cron','176155RdxkXo','Last','1002318RxFcfv','object','768940SmwmSP','desc','number','none','rows','onFailure','array','masked','once','unknown','monthly','51QyBENE','hourly','hour','minute','boolean','enum','onSuccess','Top-N','104pVoRIM','day','weekly','min','207WUiPdS','5jGwtDp'];a158_0x54f9=function(){return _0x510653;};return a158_0x54f9();}(function(_0x3a4e93,_0x4cc21f){const _0x35ed79=a158_0x4f22,_0x251800=_0x3a4e93();while(!![]){try{const _0x23d963=parseInt(_0x35ed79(0x1a5))/0x1+-parseInt(_0x35ed79(0x180))/0x2*(-parseInt(_0x35ed79(0x196))/0x3)+-parseInt(_0x35ed79(0x181))/0x4+parseInt(_0x35ed79(0x1a3))/0x5*(-parseInt(_0x35ed79(0x189))/0x6)+-parseInt(_0x35ed79(0x187))/0x7*(parseInt(_0x35ed79(0x19e))/0x8)+parseInt(_0x35ed79(0x1a2))/0x9*(parseInt(_0x35ed79(0x18b))/0xa)+-parseInt(_0x35ed79(0x1a7))/0xb;if(_0x23d963===_0x4cc21f)break;else _0x251800['push'](_0x251800['shift']());}catch(_0xef8eb){_0x251800['push'](_0x251800['shift']());}}}(a158_0x54f9,0xe141f));import{z}from'zod';export const ScheduleTypeSchema=z[a158_0x3e2b94(0x19b)]([a158_0x3e2b94(0x18e),a158_0x3e2b94(0x197),'daily',a158_0x3e2b94(0x1a0),a158_0x3e2b94(0x195),a158_0x3e2b94(0x186),'minutes_interval']);export const RepeatUnitSchema=z[a158_0x3e2b94(0x19b)]([a158_0x3e2b94(0x199),a158_0x3e2b94(0x198),a158_0x3e2b94(0x19f),'week',a158_0x3e2b94(0x17f),a158_0x3e2b94(0x193),a158_0x3e2b94(0x18e)]);export const ScheduleDefSchema=z[a158_0x3e2b94(0x18a)]({'type':ScheduleTypeSchema[a158_0x3e2b94(0x17e)](),'repeat_unit':RepeatUnitSchema[a158_0x3e2b94(0x17e)](),'repeat_frequency':z['number']()[a158_0x3e2b94(0x17e)](),'repeat_sub_frequency':z['array'](z[a158_0x3e2b94(0x18d)]())[a158_0x3e2b94(0x17e)](),'start_at':z[a158_0x3e2b94(0x17d)]()['nullable']()[a158_0x3e2b94(0x17e)](),'end_on':z[a158_0x3e2b94(0x17d)]()['nullable']()[a158_0x3e2b94(0x17e)](),'timezone':z['string']()[a158_0x3e2b94(0x17e)]()});export const NotificationDefSchema=z[a158_0x3e2b94(0x18a)]({'notify_on':z['array'](z['enum']([a158_0x3e2b94(0x19c),a158_0x3e2b94(0x190)]))[a158_0x3e2b94(0x17e)](),'email_recipients':z['array'](z['string']())[a158_0x3e2b94(0x17e)]()});export const ActivationColumnDefSchema=z['union']([z[a158_0x3e2b94(0x17d)](),z['object']({'name':z[a158_0x3e2b94(0x17d)](),'type':z['string']()['optional'](),'visibility':z['enum'](['clear','masked'])[a158_0x3e2b94(0x17e)]()})]);export const ActivationBehaviorDefSchema=z[a158_0x3e2b94(0x18a)]({'columns':z['array'](z[a158_0x3e2b94(0x18a)]({'name':z['string'](),'type':z[a158_0x3e2b94(0x17d)]()[a158_0x3e2b94(0x17e)](),'visibility':z[a158_0x3e2b94(0x19b)]([a158_0x3e2b94(0x1a4),a158_0x3e2b94(0x192)])[a158_0x3e2b94(0x17e)]()}))[a158_0x3e2b94(0x17e)](),'behavior_table':z['string']()[a158_0x3e2b94(0x17e)](),'join_row':z[a158_0x3e2b94(0x18d)]()[a158_0x3e2b94(0x182)]()[a158_0x3e2b94(0x17e)](),'join_strategy':z[a158_0x3e2b94(0x19b)](['All',a158_0x3e2b94(0x1a6),a158_0x3e2b94(0x188),a158_0x3e2b94(0x19d)])[a158_0x3e2b94(0x17e)](),'formatting':z[a158_0x3e2b94(0x19b)]([a158_0x3e2b94(0x18f),a158_0x3e2b94(0x184)])['optional'](),'order_by':z[a158_0x3e2b94(0x191)](z[a158_0x3e2b94(0x18a)]({'key':z[a158_0x3e2b94(0x17d)](),'order':z[a158_0x3e2b94(0x19b)]([a158_0x3e2b94(0x17c),a158_0x3e2b94(0x18c)])}))[a158_0x3e2b94(0x17e)]()});export const ActivationDefSchema=z['object']({'name':z[a158_0x3e2b94(0x17d)]()['min'](0x1,a158_0x3e2b94(0x185)),'description':z['string']()['optional'](),'connection':z[a158_0x3e2b94(0x17d)]()[a158_0x3e2b94(0x1a1)](0x1,a158_0x3e2b94(0x183)),'all_columns':z[a158_0x3e2b94(0x19a)]()[a158_0x3e2b94(0x17e)](),'columns':z[a158_0x3e2b94(0x191)](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a158_0x3e2b94(0x17e)](),'connector_config':z['record'](z['string'](),z[a158_0x3e2b94(0x194)]())['optional'](),'activation_template_id':z['string']()[a158_0x3e2b94(0x182)]()[a158_0x3e2b94(0x17e)](),'behavior':ActivationBehaviorDefSchema[a158_0x3e2b94(0x182)]()[a158_0x3e2b94(0x17e)](),'run_after_journey_refresh':z[a158_0x3e2b94(0x19a)]()['optional'](),'nested_workflow_project_name':z[a158_0x3e2b94(0x17d)]()[a158_0x3e2b94(0x17e)](),'nested_workflow_name':z[a158_0x3e2b94(0x17d)]()[a158_0x3e2b94(0x17e)](),'lock_enabled':z[a158_0x3e2b94(0x19a)]()[a158_0x3e2b94(0x17e)]()});
1
+ const a158_0x1309ee=a158_0x508a;(function(_0x4c258b,_0x504656){const _0x2fd295=a158_0x508a,_0x21f517=_0x4c258b();while(!![]){try{const _0x4728bf=parseInt(_0x2fd295(0xaf))/0x1*(-parseInt(_0x2fd295(0xa1))/0x2)+parseInt(_0x2fd295(0xa6))/0x3+parseInt(_0x2fd295(0xbe))/0x4*(-parseInt(_0x2fd295(0x9c))/0x5)+parseInt(_0x2fd295(0x9f))/0x6+-parseInt(_0x2fd295(0xb7))/0x7*(parseInt(_0x2fd295(0xa3))/0x8)+parseInt(_0x2fd295(0xbb))/0x9*(-parseInt(_0x2fd295(0xa5))/0xa)+parseInt(_0x2fd295(0xa8))/0xb;if(_0x4728bf===_0x504656)break;else _0x21f517['push'](_0x21f517['shift']());}catch(_0x9ac17c){_0x21f517['push'](_0x21f517['shift']());}}}(a158_0x15bf,0x69c0d));import{z}from'zod';export const ScheduleTypeSchema=z['enum']([a158_0x1309ee(0xa0),a158_0x1309ee(0xad),'daily',a158_0x1309ee(0xb2),'monthly',a158_0x1309ee(0xb8),a158_0x1309ee(0xaa)]);export const RepeatUnitSchema=z['enum']([a158_0x1309ee(0x9e),a158_0x1309ee(0xb3),'day',a158_0x1309ee(0xba),'month',a158_0x1309ee(0xb4),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a158_0x1309ee(0x99)](),'repeat_unit':RepeatUnitSchema[a158_0x1309ee(0x99)](),'repeat_frequency':z[a158_0x1309ee(0xac)]()[a158_0x1309ee(0x99)](),'repeat_sub_frequency':z[a158_0x1309ee(0xa7)](z[a158_0x1309ee(0xac)]())['optional'](),'start_at':z[a158_0x1309ee(0xb5)]()[a158_0x1309ee(0xa2)]()[a158_0x1309ee(0x99)](),'end_on':z['string']()[a158_0x1309ee(0xa2)]()[a158_0x1309ee(0x99)](),'timezone':z[a158_0x1309ee(0xb5)]()[a158_0x1309ee(0x99)]()});function a158_0x15bf(){const _0xf8b187=['9ftoJxg','onFailure','Last','704948BUVOXx','desc','object','optional','Activation\x20name\x20is\x20required','asc','15NDvvjQ','enum','minute','4787772fHGyvV','none','156wVJbSK','nullable','16iMqoYA','boolean','6944330fwHeih','2028189EtYfAM','array','15174016wkdScR','min','minutes_interval','clear','number','hourly','masked','4643ojUfoC','union','rows','weekly','hour','once','string','cols','2922563VRmkco','cron','Top-N','week'];a158_0x15bf=function(){return _0xf8b187;};return a158_0x15bf();}export const NotificationDefSchema=z['object']({'notify_on':z[a158_0x1309ee(0xa7)](z['enum'](['onSuccess',a158_0x1309ee(0xbc)]))['optional'](),'email_recipients':z[a158_0x1309ee(0xa7)](z[a158_0x1309ee(0xb5)]())[a158_0x1309ee(0x99)]()});export const ActivationColumnDefSchema=z[a158_0x1309ee(0xb0)]([z[a158_0x1309ee(0xb5)](),z[a158_0x1309ee(0xc0)]({'name':z['string'](),'type':z[a158_0x1309ee(0xb5)]()[a158_0x1309ee(0x99)](),'visibility':z['enum']([a158_0x1309ee(0xab),a158_0x1309ee(0xae)])[a158_0x1309ee(0x99)]()})]);function a158_0x508a(_0x4daa2b,_0x964985){_0x4daa2b=_0x4daa2b-0x99;const _0x15bfa5=a158_0x15bf();let _0x508a58=_0x15bfa5[_0x4daa2b];return _0x508a58;}export const ActivationBehaviorDefSchema=z[a158_0x1309ee(0xc0)]({'columns':z[a158_0x1309ee(0xa7)](z[a158_0x1309ee(0xc0)]({'name':z[a158_0x1309ee(0xb5)](),'type':z[a158_0x1309ee(0xb5)]()[a158_0x1309ee(0x99)](),'visibility':z['enum']([a158_0x1309ee(0xab),a158_0x1309ee(0xae)])[a158_0x1309ee(0x99)]()}))[a158_0x1309ee(0x99)](),'behavior_table':z['string']()[a158_0x1309ee(0x99)](),'join_row':z['number']()[a158_0x1309ee(0xa2)]()['optional'](),'join_strategy':z[a158_0x1309ee(0x9d)](['All','First',a158_0x1309ee(0xbd),a158_0x1309ee(0xb9)])['optional'](),'formatting':z[a158_0x1309ee(0x9d)]([a158_0x1309ee(0xb1),a158_0x1309ee(0xb6)])['optional'](),'order_by':z['array'](z[a158_0x1309ee(0xc0)]({'key':z[a158_0x1309ee(0xb5)](),'order':z[a158_0x1309ee(0x9d)]([a158_0x1309ee(0x9b),a158_0x1309ee(0xbf)])}))[a158_0x1309ee(0x99)]()});export const ActivationDefSchema=z[a158_0x1309ee(0xc0)]({'name':z[a158_0x1309ee(0xb5)]()['min'](0x1,a158_0x1309ee(0x9a)),'description':z[a158_0x1309ee(0xb5)]()[a158_0x1309ee(0x99)](),'connection':z['string']()[a158_0x1309ee(0xa9)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z['boolean']()[a158_0x1309ee(0x99)](),'columns':z[a158_0x1309ee(0xa7)](ActivationColumnDefSchema)[a158_0x1309ee(0x99)](),'schedule':ScheduleDefSchema[a158_0x1309ee(0x99)](),'notification':NotificationDefSchema[a158_0x1309ee(0x99)](),'connector_config':z['record'](z[a158_0x1309ee(0xb5)](),z['unknown']())[a158_0x1309ee(0x99)](),'activation_template_id':z[a158_0x1309ee(0xb5)]()[a158_0x1309ee(0xa2)]()[a158_0x1309ee(0x99)](),'behavior':ActivationBehaviorDefSchema[a158_0x1309ee(0xa2)]()[a158_0x1309ee(0x99)](),'run_after_journey_refresh':z['boolean']()[a158_0x1309ee(0x99)](),'nested_workflow_project_name':z[a158_0x1309ee(0xb5)]()[a158_0x1309ee(0x99)](),'nested_workflow_name':z['string']()[a158_0x1309ee(0x99)](),'lock_enabled':z[a158_0x1309ee(0xa4)]()[a158_0x1309ee(0x99)]()});
@@ -1 +1 @@
1
- function a159_0x16b6(){var _0x140926=['1XnoFiE','1001260KfTPzl','8fMxQTG','3950721JLhfFf','6425937KbbuTT','2508fuNbOy','6ZnhthK','128mSdwqc','1128ZujXUq','13416WBNmBX','47160eTFEOt','2444626vPbkrd','29094oxANGx'];a159_0x16b6=function(){return _0x140926;};return a159_0x16b6();}function a159_0x3fcf(_0x469350,_0x3a0b1e){_0x469350=_0x469350-0x172;var _0x16b636=a159_0x16b6();var _0x3fcfe8=_0x16b636[_0x469350];return _0x3fcfe8;}(function(_0xcd0328,_0xeedba7){var _0x2a3911=a159_0x3fcf,_0x5b8606=_0xcd0328();while(!![]){try{var _0x5f2df6=parseInt(_0x2a3911(0x172))/0x1*(parseInt(_0x2a3911(0x17d))/0x2)+-parseInt(_0x2a3911(0x17b))/0x3*(-parseInt(_0x2a3911(0x179))/0x4)+-parseInt(_0x2a3911(0x173))/0x5+-parseInt(_0x2a3911(0x178))/0x6*(parseInt(_0x2a3911(0x176))/0x7)+parseInt(_0x2a3911(0x174))/0x8*(-parseInt(_0x2a3911(0x175))/0x9)+parseInt(_0x2a3911(0x17c))/0xa*(parseInt(_0x2a3911(0x177))/0xb)+parseInt(_0x2a3911(0x17a))/0xc*(-parseInt(_0x2a3911(0x17e))/0xd);if(_0x5f2df6===_0xeedba7)break;else _0x5b8606['push'](_0x5b8606['shift']());}catch(_0x4efcb0){_0x5b8606['push'](_0x5b8606['shift']());}}}(a159_0x16b6,0xa4539));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ function a159_0x5dec(){var _0x10547f=['13892310EVtFnA','312CGOdUZ','491168gfpAhO','38412pNmrHG','153YRYWYQ','94955pukIBf','4691058ZrtTJd','1011899sxTiUR','260vmLiJi','2726548sXYudf'];a159_0x5dec=function(){return _0x10547f;};return a159_0x5dec();}function a159_0x4488(_0x51bbb9,_0xe46a6e){_0x51bbb9=_0x51bbb9-0x9c;var _0x5dec96=a159_0x5dec();var _0x4488f4=_0x5dec96[_0x51bbb9];return _0x4488f4;}(function(_0x5118b7,_0x622ad8){var _0x202fe9=a159_0x4488,_0x5f2f19=_0x5118b7();while(!![]){try{var _0xf630a2=parseInt(_0x202fe9(0x9d))/0x1+parseInt(_0x202fe9(0x9f))/0x2+-parseInt(_0x202fe9(0x9c))/0x3+parseInt(_0x202fe9(0xa3))/0x4*(parseInt(_0x202fe9(0x9e))/0x5)+-parseInt(_0x202fe9(0xa1))/0x6*(parseInt(_0x202fe9(0xa5))/0x7)+-parseInt(_0x202fe9(0xa2))/0x8*(parseInt(_0x202fe9(0xa4))/0x9)+parseInt(_0x202fe9(0xa0))/0xa;if(_0xf630a2===_0x622ad8)break;else _0x5f2f19['push'](_0x5f2f19['shift']());}catch(_0x44daa5){_0x5f2f19['push'](_0x5f2f19['shift']());}}}(a159_0x5dec,0xe82b2));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a160_0x2bc121=a160_0x4876;(function(_0x21fef3,_0x48e27f){const _0x251e25=a160_0x4876,_0x27c07a=_0x21fef3();while(!![]){try{const _0x32e8e6=-parseInt(_0x251e25(0x9d))/0x1*(-parseInt(_0x251e25(0x9e))/0x2)+parseInt(_0x251e25(0xbc))/0x3*(-parseInt(_0x251e25(0xbe))/0x4)+-parseInt(_0x251e25(0xba))/0x5+parseInt(_0x251e25(0xb7))/0x6*(-parseInt(_0x251e25(0xc1))/0x7)+parseInt(_0x251e25(0xb6))/0x8*(parseInt(_0x251e25(0xb0))/0x9)+-parseInt(_0x251e25(0xa5))/0xa+-parseInt(_0x251e25(0xb5))/0xb*(-parseInt(_0x251e25(0xa0))/0xc);if(_0x32e8e6===_0x48e27f)break;else _0x27c07a['push'](_0x27c07a['shift']());}catch(_0x4f4987){_0x27c07a['push'](_0x27c07a['shift']());}}}(a160_0x41ff,0x90b04));import{z}from'zod';function a160_0x4876(_0x2bc70e,_0x5452ef){_0x2bc70e=_0x2bc70e-0x94;const _0x41ffa5=a160_0x41ff();let _0x48760d=_0x41ffa5[_0x2bc70e];return _0x48760d;}import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z['enum']([a160_0x2bc121(0xae),a160_0x2bc121(0xb9),a160_0x2bc121(0x96)]);export const ReentryModeTypeSchema=z['enum'](['no_reentry',a160_0x2bc121(0x9c),a160_0x2bc121(0x9b)]);export const WaitUnitTypeSchema=z[a160_0x2bc121(0xc2)]([a160_0x2bc121(0xbd),a160_0x2bc121(0xb3)]);export const StepTypeValueSchema=z[a160_0x2bc121(0xc2)]([a160_0x2bc121(0xa9),a160_0x2bc121(0xb2),'decision_point',a160_0x2bc121(0x9f),'merge','jump',a160_0x2bc121(0xab)]);export const EmbeddedSegmentDefSchema=z[a160_0x2bc121(0xb8)]({'description':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0xaf)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a160_0x2bc121(0xb8)]({'journey':z['string'](),'stage':z[a160_0x2bc121(0xad)](),'bundle_id':z[a160_0x2bc121(0xad)]()['optional']()});export const CriteriaDefSchema=z[a160_0x2bc121(0xb8)]({'name':z['string'](),'description':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0xaf)](),'segment':z['string'](),'target':JumpTargetDefSchema[a160_0x2bc121(0xaf)]()});const WaitConditionTimeoutDefSchema=z[a160_0x2bc121(0xb8)]({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a160_0x2bc121(0xad)]()['optional']()}),WaitConditionDefSchema=z['object']({'segment':z[a160_0x2bc121(0xad)](),'next':z['string']()['optional'](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a160_0x2bc121(0xb8)]({'duration':z[a160_0x2bc121(0xaa)]()[a160_0x2bc121(0xaf)](),'unit':WaitUnitTypeSchema[a160_0x2bc121(0xaf)](),'wait_until':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0xaf)](),'condition':WaitConditionDefSchema[a160_0x2bc121(0xaf)](),'days_of_week':z[a160_0x2bc121(0xc0)](z[a160_0x2bc121(0xad)]())[a160_0x2bc121(0xaf)]()}),StepBaseFields={'name':z['string'](),'uuid':z['string']()['optional'](),'next':z['string']()[a160_0x2bc121(0xaf)]()},WaitStepDefSchema=z[a160_0x2bc121(0xb8)]({...StepBaseFields,'type':z[a160_0x2bc121(0x95)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a160_0x2bc121(0xb8)]({'activation':z[a160_0x2bc121(0xad)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a160_0x2bc121(0xb2)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z['string'](),'segment':z[a160_0x2bc121(0xad)]()['optional'](),'segment_id':z['string']()[a160_0x2bc121(0xaf)](),'excluded':z[a160_0x2bc121(0xb1)]()[a160_0x2bc121(0xaf)](),'next':z['string']()[a160_0x2bc121(0xaf)]()}),DecisionPointStepParamsDefSchema=z[a160_0x2bc121(0xb8)]({'branches':z[a160_0x2bc121(0xc0)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a160_0x2bc121(0xb8)]({...StepBaseFields,'type':z['literal'](a160_0x2bc121(0xa1)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a160_0x2bc121(0xb8)]({'id':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0xaf)](),'name':z[a160_0x2bc121(0xad)](),'percentage':z['number'](),'next':z[a160_0x2bc121(0xad)]()['optional']()}),AbTestStepParamsDefSchema=z[a160_0x2bc121(0xb8)]({'variants':z[a160_0x2bc121(0xc0)](AbTestVariantDefSchema),'unique_id':z['string']()['optional'](),'customized_split':z[a160_0x2bc121(0xb1)]()[a160_0x2bc121(0xaf)]()}),AbTestStepDefSchema=z[a160_0x2bc121(0xb8)]({...StepBaseFields,'type':z[a160_0x2bc121(0x95)](a160_0x2bc121(0x9f)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a160_0x2bc121(0x95)](a160_0x2bc121(0xb4))}),JumpStepParamsDefSchema=z[a160_0x2bc121(0xb8)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a160_0x2bc121(0xb8)]({...StepBaseFields,'type':z['literal'](a160_0x2bc121(0xa8)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a160_0x2bc121(0xb8)]({...StepBaseFields,'type':z[a160_0x2bc121(0x95)](a160_0x2bc121(0xab))})[a160_0x2bc121(0xac)]();function a160_0x41ff(){const _0x258e64=['167pJyFce','5842HlzawG','ab_test','21930540ARVpjj','decision_point','type','journeys','versions','5162490xRSqfY','length','lazy','jump','wait','number','end','passthrough','string','draft','optional','9KjNwSs','boolean','activation','week','merge','11gshBGP','6244104FmjIBb','27666EtDjbC','object','simulation','2002665DPcCvJ','stages','851112gQyWdC','day','8UwUIfo','Journey\x20name\x20is\x20required','array','1547djzdJD','enum','min','literal','launched','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','journey','record','refine','reentry_always','reentry_unless_goal_achieved'];a160_0x41ff=function(){return _0x258e64;};return a160_0x41ff();}export const StepDefSchema=z['discriminatedUnion'](a160_0x2bc121(0xa2),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a160_0x2bc121(0xb8)]({'name':z[a160_0x2bc121(0xad)](),'description':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0xaf)](),'id':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0xaf)](),'entry_criteria':CriteriaDefSchema[a160_0x2bc121(0xaf)](),'exit_criteria':z[a160_0x2bc121(0xc0)](CriteriaDefSchema)[a160_0x2bc121(0xaf)](),'milestone':CriteriaDefSchema[a160_0x2bc121(0xaf)](),'root_step':z['string']()[a160_0x2bc121(0xaf)](),'steps':z[a160_0x2bc121(0xc0)](StepDefSchema)[a160_0x2bc121(0xaf)]()});export const JourneyEntryDefSchema=z[a160_0x2bc121(0xb8)]({'name':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0xaf)](),'version':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0xaf)](),'state':JourneyStateTypeSchema[a160_0x2bc121(0xaf)](),'latest':z[a160_0x2bc121(0xb1)]()[a160_0x2bc121(0xaf)](),'stages':z[a160_0x2bc121(0xc0)](StageDefSchema),'id':z[a160_0x2bc121(0xad)]()['optional'](),'version_number':z[a160_0x2bc121(0xaa)]()[a160_0x2bc121(0xaf)](),'goal':CriteriaDefSchema[a160_0x2bc121(0xaf)](),'reentry':ReentryModeTypeSchema[a160_0x2bc121(0xaf)]()});export const JourneyDefSchema=z[a160_0x2bc121(0xa7)](()=>z[a160_0x2bc121(0xb8)]({'type':z['literal'](a160_0x2bc121(0x98)),'name':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0x94)](0x1,a160_0x2bc121(0xbf)),'description':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0xaf)](),'bundle_id':z['string']()[a160_0x2bc121(0xaf)](),'bundle_name':z[a160_0x2bc121(0xad)]()['optional'](),'folder_id':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0xaf)](),'reentry':ReentryModeTypeSchema[a160_0x2bc121(0xaf)](),'allow_reentry':z[a160_0x2bc121(0xb1)]()['optional'](),'goal':CriteriaDefSchema[a160_0x2bc121(0xaf)](),'id':z['string']()[a160_0x2bc121(0xaf)](),'version':z[a160_0x2bc121(0xad)]()[a160_0x2bc121(0xaf)](),'version_number':z['number']()[a160_0x2bc121(0xaf)](),'stages':z['array'](StageDefSchema)[a160_0x2bc121(0xaf)](),'versions':z[a160_0x2bc121(0xc0)](JourneyEntryDefSchema)['optional'](),'journeys':z['array'](JourneyEntryDefSchema)[a160_0x2bc121(0xaf)](),'segments':z[a160_0x2bc121(0x99)](z[a160_0x2bc121(0xad)](),EmbeddedSegmentDefSchema)[a160_0x2bc121(0xaf)](),'activations':z[a160_0x2bc121(0x99)](z['string'](),ActivationDefSchema)['optional']()})[a160_0x2bc121(0x9a)](_0x577733=>{const _0x31fede=a160_0x2bc121,_0x3bc7ae=[_0x577733[_0x31fede(0xa3)],_0x577733[_0x31fede(0xbb)],_0x577733[_0x31fede(0xa4)]]['filter'](_0x25525e=>Array['isArray'](_0x25525e)&&_0x25525e[_0x31fede(0xa6)]>0x0)[_0x31fede(0xa6)];return _0x3bc7ae===0x1;},{'message':a160_0x2bc121(0x97)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a160_0x8279fd=a160_0x4ac6;(function(_0x282363,_0x2bec3d){const _0x3027f0=a160_0x4ac6,_0x22725d=_0x282363();while(!![]){try{const _0x45bf21=-parseInt(_0x3027f0(0xc7))/0x1+parseInt(_0x3027f0(0xc3))/0x2+parseInt(_0x3027f0(0xc1))/0x3+-parseInt(_0x3027f0(0xb9))/0x4*(parseInt(_0x3027f0(0xc5))/0x5)+-parseInt(_0x3027f0(0xab))/0x6+parseInt(_0x3027f0(0xc2))/0x7+parseInt(_0x3027f0(0xb3))/0x8;if(_0x45bf21===_0x2bec3d)break;else _0x22725d['push'](_0x22725d['shift']());}catch(_0x1e6e0a){_0x22725d['push'](_0x22725d['shift']());}}}(a160_0x5920,0xd7c18));function a160_0x5920(){const _0xbfad12=['reentry_always','refine','number','ab_test','array','wait','4808100PMatpn','boolean','string','reentry_unless_goal_achieved','object','discriminatedUnion','decision_point','passthrough','7279912Wfbzka','journeys','activation','Journey\x20name\x20is\x20required','merge','record','4hGQOal','launched','literal','stages','enum','optional','day','length','2012169jqjLPc','11839597iSJmxP','1180434AwAYDW','versions','5163490uCLVcK','isArray','1144516bTKnqR','jump','end','week'];a160_0x5920=function(){return _0xbfad12;};return a160_0x5920();}import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a160_0x8279fd(0xbd)](['draft','simulation',a160_0x8279fd(0xba)]);function a160_0x4ac6(_0x593c60,_0x223038){_0x593c60=_0x593c60-0xa2;const _0x592097=a160_0x5920();let _0x4ac6d1=_0x592097[_0x593c60];return _0x4ac6d1;}export const ReentryModeTypeSchema=z[a160_0x8279fd(0xbd)](['no_reentry',a160_0x8279fd(0xae),a160_0x8279fd(0xa5)]);export const WaitUnitTypeSchema=z[a160_0x8279fd(0xbd)]([a160_0x8279fd(0xbf),a160_0x8279fd(0xa4)]);export const StepTypeValueSchema=z[a160_0x8279fd(0xbd)]([a160_0x8279fd(0xaa),'activation',a160_0x8279fd(0xb1),a160_0x8279fd(0xa8),a160_0x8279fd(0xb7),a160_0x8279fd(0xa2),a160_0x8279fd(0xa3)]);export const EmbeddedSegmentDefSchema=z[a160_0x8279fd(0xaf)]({'description':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a160_0x8279fd(0xaf)]({'journey':z[a160_0x8279fd(0xad)](),'stage':z['string'](),'bundle_id':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)]()});export const CriteriaDefSchema=z['object']({'name':z[a160_0x8279fd(0xad)](),'description':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'segment':z[a160_0x8279fd(0xad)](),'target':JumpTargetDefSchema[a160_0x8279fd(0xbe)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)]()}),WaitConditionDefSchema=z[a160_0x8279fd(0xaf)]({'segment':z['string'](),'next':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'timeout':WaitConditionTimeoutDefSchema[a160_0x8279fd(0xbe)]()}),WaitStepParamsDefSchema=z[a160_0x8279fd(0xaf)]({'duration':z[a160_0x8279fd(0xa7)]()[a160_0x8279fd(0xbe)](),'unit':WaitUnitTypeSchema[a160_0x8279fd(0xbe)](),'wait_until':z[a160_0x8279fd(0xad)]()['optional'](),'condition':WaitConditionDefSchema[a160_0x8279fd(0xbe)](),'days_of_week':z['array'](z[a160_0x8279fd(0xad)]())[a160_0x8279fd(0xbe)]()}),StepBaseFields={'name':z[a160_0x8279fd(0xad)](),'uuid':z[a160_0x8279fd(0xad)]()['optional'](),'next':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a160_0x8279fd(0xbb)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a160_0x8279fd(0xaf)]({'activation':z[a160_0x8279fd(0xad)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a160_0x8279fd(0xbb)](a160_0x8279fd(0xb5)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a160_0x8279fd(0xaf)]({'name':z[a160_0x8279fd(0xad)](),'segment':z['string']()[a160_0x8279fd(0xbe)](),'segment_id':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'excluded':z[a160_0x8279fd(0xac)]()[a160_0x8279fd(0xbe)](),'next':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)]()}),DecisionPointStepParamsDefSchema=z[a160_0x8279fd(0xaf)]({'branches':z[a160_0x8279fd(0xa9)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a160_0x8279fd(0xaf)]({...StepBaseFields,'type':z[a160_0x8279fd(0xbb)](a160_0x8279fd(0xb1)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z['object']({'id':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'name':z['string'](),'percentage':z['number'](),'next':z['string']()[a160_0x8279fd(0xbe)]()}),AbTestStepParamsDefSchema=z[a160_0x8279fd(0xaf)]({'variants':z[a160_0x8279fd(0xa9)](AbTestVariantDefSchema),'unique_id':z['string']()['optional'](),'customized_split':z['boolean']()['optional']()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a160_0x8279fd(0xbb)](a160_0x8279fd(0xa8)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a160_0x8279fd(0xb7))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a160_0x8279fd(0xbb)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a160_0x8279fd(0xa3))})[a160_0x8279fd(0xb2)]();export const StepDefSchema=z[a160_0x8279fd(0xb0)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a160_0x8279fd(0xaf)]({'name':z[a160_0x8279fd(0xad)](),'description':z[a160_0x8279fd(0xad)]()['optional'](),'id':z[a160_0x8279fd(0xad)]()['optional'](),'entry_criteria':CriteriaDefSchema[a160_0x8279fd(0xbe)](),'exit_criteria':z['array'](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a160_0x8279fd(0xbe)](),'root_step':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'steps':z[a160_0x8279fd(0xa9)](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z[a160_0x8279fd(0xaf)]({'name':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'version':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'state':JourneyStateTypeSchema[a160_0x8279fd(0xbe)](),'latest':z['boolean']()[a160_0x8279fd(0xbe)](),'stages':z[a160_0x8279fd(0xa9)](StageDefSchema),'id':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'version_number':z[a160_0x8279fd(0xa7)]()[a160_0x8279fd(0xbe)](),'goal':CriteriaDefSchema[a160_0x8279fd(0xbe)](),'reentry':ReentryModeTypeSchema[a160_0x8279fd(0xbe)]()});export const JourneyDefSchema=z['lazy'](()=>z[a160_0x8279fd(0xaf)]({'type':z[a160_0x8279fd(0xbb)]('journey'),'name':z[a160_0x8279fd(0xad)]()['min'](0x1,a160_0x8279fd(0xb6)),'description':z[a160_0x8279fd(0xad)]()['optional'](),'bundle_id':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'bundle_name':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'folder_id':z[a160_0x8279fd(0xad)]()[a160_0x8279fd(0xbe)](),'reentry':ReentryModeTypeSchema[a160_0x8279fd(0xbe)](),'allow_reentry':z[a160_0x8279fd(0xac)]()[a160_0x8279fd(0xbe)](),'goal':CriteriaDefSchema[a160_0x8279fd(0xbe)](),'id':z['string']()[a160_0x8279fd(0xbe)](),'version':z[a160_0x8279fd(0xad)]()['optional'](),'version_number':z[a160_0x8279fd(0xa7)]()['optional'](),'stages':z[a160_0x8279fd(0xa9)](StageDefSchema)['optional'](),'versions':z[a160_0x8279fd(0xa9)](JourneyEntryDefSchema)[a160_0x8279fd(0xbe)](),'journeys':z[a160_0x8279fd(0xa9)](JourneyEntryDefSchema)[a160_0x8279fd(0xbe)](),'segments':z[a160_0x8279fd(0xb8)](z[a160_0x8279fd(0xad)](),EmbeddedSegmentDefSchema)[a160_0x8279fd(0xbe)](),'activations':z['record'](z['string'](),ActivationDefSchema)[a160_0x8279fd(0xbe)]()})[a160_0x8279fd(0xa6)](_0x4df6f7=>{const _0x36a02a=a160_0x8279fd,_0x2d22ce=[_0x4df6f7[_0x36a02a(0xb4)],_0x4df6f7[_0x36a02a(0xbc)],_0x4df6f7[_0x36a02a(0xc4)]]['filter'](_0xc818fa=>Array[_0x36a02a(0xc6)](_0xc818fa)&&_0xc818fa[_0x36a02a(0xc0)]>0x0)[_0x36a02a(0xc0)];return _0x2d22ce===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x2233aa,_0x3c2c04){var _0x5cbd53=a162_0x27c6,_0x595d65=_0x2233aa();while(!![]){try{var _0xb1bdc=-parseInt(_0x5cbd53(0x11c))/0x1*(parseInt(_0x5cbd53(0x11a))/0x2)+-parseInt(_0x5cbd53(0x118))/0x3*(-parseInt(_0x5cbd53(0x119))/0x4)+-parseInt(_0x5cbd53(0x115))/0x5+parseInt(_0x5cbd53(0x11d))/0x6+parseInt(_0x5cbd53(0x116))/0x7*(parseInt(_0x5cbd53(0x11b))/0x8)+parseInt(_0x5cbd53(0x114))/0x9+parseInt(_0x5cbd53(0x117))/0xa*(parseInt(_0x5cbd53(0x113))/0xb);if(_0xb1bdc===_0x3c2c04)break;else _0x595d65['push'](_0x595d65['shift']());}catch(_0xc642dd){_0x595d65['push'](_0x595d65['shift']());}}}(a162_0x3930,0x2e1ae));function a162_0x27c6(_0x3a31e2,_0x29896c){_0x3a31e2=_0x3a31e2-0x113;var _0x393027=a162_0x3930();var _0x27c645=_0x393027[_0x3a31e2];return _0x27c645;}function a162_0x3930(){var _0x4b81e9=['175eheCwE','10EINdDV','461781eCuvsD','8DAytyM','706886JExHqW','24536bEuwrf','1tgFdhl','481656GKQsbw','370436TTFCWM','3306501FeZcfP','1617905bWmyRx'];a162_0x3930=function(){return _0x4b81e9;};return a162_0x3930();}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 a162_0x4413(){var _0x30d643=['8113846UtiPUt','236378wPXAdG','1jLOkpS','1060911nFkGEZ','2110UWhKBs','3006GIpMcp','82808LvAowy','334089fAENLU','71524EmQePD','40FwxVbq','12JNubZD','20MkxyqH','27kNnvkT'];a162_0x4413=function(){return _0x30d643;};return a162_0x4413();}function a162_0x5567(_0x4a774a,_0x579a0b){_0x4a774a=_0x4a774a-0x77;var _0x441395=a162_0x4413();var _0x556735=_0x441395[_0x4a774a];return _0x556735;}(function(_0x299219,_0x4cc0e0){var _0x1d5e1c=a162_0x5567,_0x47bb66=_0x299219();while(!![]){try{var _0x5ae6c5=parseInt(_0x1d5e1c(0x7c))/0x1*(-parseInt(_0x1d5e1c(0x7b))/0x2)+parseInt(_0x1d5e1c(0x79))/0x3*(-parseInt(_0x1d5e1c(0x82))/0x4)+-parseInt(_0x1d5e1c(0x7e))/0x5*(parseInt(_0x1d5e1c(0x7f))/0x6)+parseInt(_0x1d5e1c(0x81))/0x7*(parseInt(_0x1d5e1c(0x83))/0x8)+parseInt(_0x1d5e1c(0x7d))/0x9*(-parseInt(_0x1d5e1c(0x78))/0xa)+-parseInt(_0x1d5e1c(0x80))/0xb+-parseInt(_0x1d5e1c(0x77))/0xc*(-parseInt(_0x1d5e1c(0x7a))/0xd);if(_0x5ae6c5===_0x4cc0e0)break;else _0x47bb66['push'](_0x47bb66['shift']());}catch(_0x497964){_0x47bb66['push'](_0x47bb66['shift']());}}}(a162_0x4413,0x1f7b7));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 a163_0x2595d8=a163_0x4693;(function(_0xfbf6b1,_0x1edaa0){const _0x23b03b=a163_0x4693,_0x3703dd=_0xfbf6b1();while(!![]){try{const _0x3989e5=-parseInt(_0x23b03b(0x1df))/0x1*(parseInt(_0x23b03b(0x1a5))/0x2)+-parseInt(_0x23b03b(0x1cd))/0x3+parseInt(_0x23b03b(0x1c1))/0x4+parseInt(_0x23b03b(0x1da))/0x5+-parseInt(_0x23b03b(0x1c6))/0x6*(parseInt(_0x23b03b(0x1d3))/0x7)+-parseInt(_0x23b03b(0x1de))/0x8+parseInt(_0x23b03b(0x1d8))/0x9*(parseInt(_0x23b03b(0x19c))/0xa);if(_0x3989e5===_0x1edaa0)break;else _0x3703dd['push'](_0x3703dd['shift']());}catch(_0x53e4b1){_0x3703dd['push'](_0x3703dd['shift']());}}}(a163_0x2b50,0xc07e1));import{z}from'zod';export const OperatorTypeSchema=z[a163_0x2595d8(0x1a3)](['Equal',a163_0x2595d8(0x1a0),a163_0x2595d8(0x1a2),a163_0x2595d8(0x1e4),'LessEqual','In',a163_0x2595d8(0x1d2),a163_0x2595d8(0x1c4),'IsNull',a163_0x2595d8(0x199),'TimeWithinNext',a163_0x2595d8(0x1ba),a163_0x2595d8(0x1dc),a163_0x2595d8(0x1d5),a163_0x2595d8(0x1ca)]);export const TimeUnitSchema=z['enum']([a163_0x2595d8(0x1d0),a163_0x2595d8(0x1a8),a163_0x2595d8(0x1bb),a163_0x2595d8(0x1ce),a163_0x2595d8(0x19a),a163_0x2595d8(0x1ac),a163_0x2595d8(0x1d9)]);function a163_0x2b50(){const _0x4a66bc=['month','Operator\x20\x27','type','unit','operator','Sum','And','Count','include','Segment\x20name\x20is\x20required','CountDistinct','duration','literal','TimeWithinNext','Contain','hour','column','Behavior','timestamp','batch','\x27\x20requires\x20a\x20value','2651668SvzQRp','Last','record','Regexp','MISSING_BETWEEN_BOUNDS','12lFrDYw','superRefine','Min','First','TimeRange','union','value','2605551cAEonn','day','LessEqual','second','realtime','Between','4700402cjYdwB','object','EndWith','addIssue','funnel_stage','1796301wGVnAp','year','2564030DeshYu','Value','StartWith','from','10573984AIwmcZ','3092eysaST','array','Equal','boolean','Average','GreaterEqual','string','TimeRange\x20operator\x20requires\x20\x27duration\x27','TimeRange\x20operator\x20requires\x20\x27from\x27','number','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','has','TimeWithinPast','week','custom','190dITiPA','Max','segment','min','Greater','all','Less','enum','optional','418otDYft','lazy','\x27\x20requires\x20a\x20time\x20unit','minute','Column','any','discriminatedUnion'];a163_0x2b50=function(){return _0x4a66bc;};return a163_0x2b50();}export const AggregationTypeSchema=z[a163_0x2595d8(0x1a3)](['Count',a163_0x2595d8(0x1b1),a163_0x2595d8(0x1e3),'Min',a163_0x2595d8(0x19d),a163_0x2595d8(0x1b6),'First',a163_0x2595d8(0x1c2)]);const TemporalValueSchema=z[a163_0x2595d8(0x1cb)]([z['object']({'timestamp':z[a163_0x2595d8(0x1e5)]()}),z[a163_0x2595d8(0x1d4)]({'last':z[a163_0x2595d8(0x1cb)]([z[a163_0x2595d8(0x1e8)](),z[a163_0x2595d8(0x1c3)](z[a163_0x2595d8(0x1e5)](),z['number']())]),'unit':z['string']()})]),OperatorValueSchema=z['union']([z['string'](),z[a163_0x2595d8(0x1e8)](),z[a163_0x2595d8(0x1e2)](),TemporalValueSchema,z[a163_0x2595d8(0x1e0)](z['union']([z[a163_0x2595d8(0x1e5)](),z['number'](),z[a163_0x2595d8(0x1e2)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a163_0x2595d8(0x1e1),'Greater','GreaterEqual',a163_0x2595d8(0x1a2),a163_0x2595d8(0x1cf),'In',a163_0x2595d8(0x1ba),a163_0x2595d8(0x1dc),'EndWith',a163_0x2595d8(0x1c4),a163_0x2595d8(0x199),a163_0x2595d8(0x1b9)]),OPERATORS_REQUIRING_UNIT=new Set([a163_0x2595d8(0x199),a163_0x2595d8(0x1b9)]);export const OperatorDefSchema=z[a163_0x2595d8(0x1d4)]({'type':OperatorTypeSchema,'not':z[a163_0x2595d8(0x1e2)]()['optional'](),'value':OperatorValueSchema['optional'](),'min':z[a163_0x2595d8(0x1cb)]([z[a163_0x2595d8(0x1e8)](),z[a163_0x2595d8(0x1e5)](),TemporalValueSchema])[a163_0x2595d8(0x1a4)](),'max':z['union']([z[a163_0x2595d8(0x1e8)](),z['string'](),TemporalValueSchema])[a163_0x2595d8(0x1a4)](),'unit':TimeUnitSchema['optional'](),'duration':z[a163_0x2595d8(0x1d4)]({'day':z[a163_0x2595d8(0x1e8)]()[a163_0x2595d8(0x1a4)](),'week':z[a163_0x2595d8(0x1e8)]()[a163_0x2595d8(0x1a4)](),'month':z[a163_0x2595d8(0x1e8)]()[a163_0x2595d8(0x1a4)](),'year':z['number']()['optional'](),'hour':z[a163_0x2595d8(0x1e8)]()[a163_0x2595d8(0x1a4)](),'minute':z[a163_0x2595d8(0x1e8)]()['optional'](),'second':z[a163_0x2595d8(0x1e8)]()[a163_0x2595d8(0x1a4)]()})['optional'](),'from':z[a163_0x2595d8(0x1d4)]({'last':z[a163_0x2595d8(0x1cb)]([z[a163_0x2595d8(0x1e8)](),z[a163_0x2595d8(0x1e5)]()]),'unit':TimeUnitSchema})[a163_0x2595d8(0x1a4)](),'reverse':z[a163_0x2595d8(0x1e2)]()['optional']()})['superRefine']((_0x4b9666,_0x5a831f)=>{const _0xa6f9f1=a163_0x2595d8;OPERATORS_REQUIRING_VALUE[_0xa6f9f1(0x198)](_0x4b9666[_0xa6f9f1(0x1ae)])&&(_0x4b9666[_0xa6f9f1(0x1cc)]===undefined||_0x4b9666['value']===null)&&_0x5a831f[_0xa6f9f1(0x1d6)]({'code':_0xa6f9f1(0x19b),'message':_0xa6f9f1(0x1ad)+_0x4b9666[_0xa6f9f1(0x1ae)]+_0xa6f9f1(0x1c0),'path':[_0xa6f9f1(0x1cc)]}),_0x4b9666['type']===_0xa6f9f1(0x1d2)&&_0x4b9666['min']===undefined&&_0x4b9666['max']===undefined&&_0x5a831f['addIssue']({'code':_0xa6f9f1(0x19b),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0xa6f9f1(0x1c5)}}),OPERATORS_REQUIRING_UNIT[_0xa6f9f1(0x198)](_0x4b9666[_0xa6f9f1(0x1ae)])&&_0x4b9666['value']!==undefined&&!_0x4b9666[_0xa6f9f1(0x1af)]&&_0x5a831f[_0xa6f9f1(0x1d6)]({'code':_0xa6f9f1(0x19b),'message':_0xa6f9f1(0x1ad)+_0x4b9666['type']+_0xa6f9f1(0x1a7),'path':[_0xa6f9f1(0x1af)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x4b9666['type']===_0xa6f9f1(0x1ca)&&(!_0x4b9666[_0xa6f9f1(0x1b7)]&&_0x5a831f['addIssue']({'code':_0xa6f9f1(0x19b),'message':_0xa6f9f1(0x1e6),'path':[_0xa6f9f1(0x1b7)]}),!_0x4b9666[_0xa6f9f1(0x1dd)]&&_0x5a831f[_0xa6f9f1(0x1d6)]({'code':_0xa6f9f1(0x19b),'message':_0xa6f9f1(0x1e7),'path':[_0xa6f9f1(0x1dd)]}));});export const ArrayMatchingSchema=z[a163_0x2595d8(0x1cb)]([z[a163_0x2595d8(0x1b8)](a163_0x2595d8(0x1aa)),z[a163_0x2595d8(0x1b8)](a163_0x2595d8(0x1a1)),z[a163_0x2595d8(0x1d4)]({'atLeast':z['number']()}),z['object']({'atMost':z[a163_0x2595d8(0x1e8)]()}),z['object']({'exactly':z['number']()})]);export const AggregationDefSchema=z[a163_0x2595d8(0x1ab)]('type',[z[a163_0x2595d8(0x1d4)]({'type':z[a163_0x2595d8(0x1a3)](['Sum',a163_0x2595d8(0x1c8),a163_0x2595d8(0x19d),a163_0x2595d8(0x1e3)]),'column':z[a163_0x2595d8(0x1e5)](),'groupingColumns':z[a163_0x2595d8(0x1e0)](z[a163_0x2595d8(0x1e5)]())[a163_0x2595d8(0x1a4)]()}),z[a163_0x2595d8(0x1d4)]({'type':z[a163_0x2595d8(0x1b8)](a163_0x2595d8(0x1b3)),'groupingColumns':z[a163_0x2595d8(0x1e0)](z['string']())['optional']()}),z[a163_0x2595d8(0x1d4)]({'type':z[a163_0x2595d8(0x1b8)](a163_0x2595d8(0x1b6)),'columns':z['array'](z[a163_0x2595d8(0x1e5)]())}),z[a163_0x2595d8(0x1d4)]({'type':z['enum']([a163_0x2595d8(0x1c9),a163_0x2595d8(0x1c2)]),'column':z[a163_0x2595d8(0x1e5)](),'orderColumn':z[a163_0x2595d8(0x1e5)](),'groupingColumns':z['array'](z[a163_0x2595d8(0x1e5)]())['optional']()})]);function a163_0x4693(_0x1d4e63,_0x1d4da0){_0x1d4e63=_0x1d4e63-0x197;const _0x2b5080=a163_0x2b50();let _0x4693d5=_0x2b5080[_0x1d4e63];return _0x4693d5;}export const TimeWindowDefSchema=z[a163_0x2595d8(0x1d4)]({'duration':z[a163_0x2595d8(0x1e8)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a163_0x2595d8(0x199),'TimeWithinNext','TimeRange']);export const FilterColumnConditionDefSchema=z['object']({'type':z['literal'](a163_0x2595d8(0x1a9)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})[a163_0x2595d8(0x1c7)]((_0x481ee3,_0x2f5790)=>{const _0x118bcd=a163_0x2595d8,_0x14ea6b=_0x481ee3[_0x118bcd(0x1b0)][_0x118bcd(0x1ae)];_0x481ee3[_0x118bcd(0x1bc)]===_0x118bcd(0x1be)?!TIMESTAMP_OPERATORS['has'](_0x14ea6b)&&_0x2f5790['addIssue']({'code':_0x118bcd(0x19b),'message':_0x118bcd(0x197)+_0x14ea6b+'\x27)','path':[_0x118bcd(0x1b0),_0x118bcd(0x1ae)]}):TIMESTAMP_OPERATORS['has'](_0x14ea6b)&&_0x2f5790[_0x118bcd(0x1d6)]({'code':'custom','message':_0x118bcd(0x1ad)+_0x14ea6b+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x118bcd(0x1b0),_0x118bcd(0x1ae)]});});export const FilterRuleDefSchema=z['object']({'type':z['literal'](a163_0x2595d8(0x1b2)),'conditions':z[a163_0x2595d8(0x1e0)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z['object']({'type':z['literal'](a163_0x2595d8(0x1db)),'attribute':z[a163_0x2595d8(0x1e5)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x2595d8(0x1a4)](),'exclude':z[a163_0x2595d8(0x1e2)]()[a163_0x2595d8(0x1a4)](),'aggregation':AggregationDefSchema[a163_0x2595d8(0x1a4)](),'source':z['string']()[a163_0x2595d8(0x1a4)](),'filter':FilterRuleDefSchema[a163_0x2595d8(0x1a4)](),'limit':z[a163_0x2595d8(0x1e8)]()[a163_0x2595d8(0x1a4)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a163_0x2595d8(0x1d4)]({'type':z['literal'](a163_0x2595d8(0x1bd)),'attribute':z[a163_0x2595d8(0x1e5)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x2595d8(0x1a4)](),'exclude':z[a163_0x2595d8(0x1e2)]()[a163_0x2595d8(0x1a4)](),'aggregation':AggregationDefSchema[a163_0x2595d8(0x1a4)](),'source':z['string']()[a163_0x2595d8(0x1a4)](),'filter':FilterRuleDefSchema[a163_0x2595d8(0x1a4)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a163_0x2595d8(0x1e8)]()[a163_0x2595d8(0x1a4)]()}));export const ColumnConditionDefSchema=z['object']({'type':z['literal'](a163_0x2595d8(0x1a9)),'column':z[a163_0x2595d8(0x1e5)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a163_0x2595d8(0x1a6)](()=>z[a163_0x2595d8(0x1d4)]({'type':z[a163_0x2595d8(0x1a3)]([a163_0x2595d8(0x1b2),'Or']),'conditions':z[a163_0x2595d8(0x1e0)](ConditionDefSchema),'description':z[a163_0x2595d8(0x1e5)]()[a163_0x2595d8(0x1a4)]()}));export const SegmentRefConditionDefSchema=z[a163_0x2595d8(0x1d4)]({'type':z['enum']([a163_0x2595d8(0x1b4),'exclude']),'segment':z[a163_0x2595d8(0x1e5)]()[a163_0x2595d8(0x19f)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a163_0x2595d8(0x1a6)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a163_0x2595d8(0x1a6)](()=>z['object']({'type':z['enum']([a163_0x2595d8(0x1b2),'Or']),'conditions':z[a163_0x2595d8(0x1e0)](ConditionDefSchema),'description':z[a163_0x2595d8(0x1e5)]()[a163_0x2595d8(0x1a4)]()}));export const SegmentDefSchema=z[a163_0x2595d8(0x1d4)]({'type':z[a163_0x2595d8(0x1b8)](a163_0x2595d8(0x19e))[a163_0x2595d8(0x1a4)](),'name':z[a163_0x2595d8(0x1e5)]()[a163_0x2595d8(0x19f)](0x1,a163_0x2595d8(0x1b5)),'description':z[a163_0x2595d8(0x1e5)]()['optional'](),'folder':z[a163_0x2595d8(0x1e5)]()[a163_0x2595d8(0x1a4)](),'rule':RuleDefSchema[a163_0x2595d8(0x1a4)](),'kind':z[a163_0x2595d8(0x1a3)]([a163_0x2595d8(0x1bf),a163_0x2595d8(0x1d1),a163_0x2595d8(0x1d7)])[a163_0x2595d8(0x1a4)](),'visible':z[a163_0x2595d8(0x1e2)]()[a163_0x2595d8(0x1a4)](),'activations':z[a163_0x2595d8(0x1e0)](z['any']())[a163_0x2595d8(0x1a4)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a163_0x2d12a4=a163_0x5684;(function(_0xf2a105,_0x5975d2){const _0x23eba0=a163_0x5684,_0x49bbee=_0xf2a105();while(!![]){try{const _0x54fa4e=-parseInt(_0x23eba0(0x10c))/0x1+parseInt(_0x23eba0(0x10b))/0x2+-parseInt(_0x23eba0(0x10d))/0x3+-parseInt(_0x23eba0(0x129))/0x4+-parseInt(_0x23eba0(0x119))/0x5+parseInt(_0x23eba0(0xfd))/0x6+parseInt(_0x23eba0(0xf4))/0x7;if(_0x54fa4e===_0x5975d2)break;else _0x49bbee['push'](_0x49bbee['shift']());}catch(_0x5a30bc){_0x49bbee['push'](_0x49bbee['shift']());}}}(a163_0x358b,0xbbd30));import{z}from'zod';export const OperatorTypeSchema=z[a163_0x2d12a4(0x109)]([a163_0x2d12a4(0x11a),'Greater','Less','GreaterEqual',a163_0x2d12a4(0xeb),'In','Between',a163_0x2d12a4(0x112),a163_0x2d12a4(0x11e),a163_0x2d12a4(0x132),'TimeWithinNext',a163_0x2d12a4(0x12a),a163_0x2d12a4(0xfe),a163_0x2d12a4(0xf7),a163_0x2d12a4(0x12f)]);export const TimeUnitSchema=z[a163_0x2d12a4(0x109)]([a163_0x2d12a4(0xfb),a163_0x2d12a4(0x11b),'hour',a163_0x2d12a4(0x107),a163_0x2d12a4(0x113),'month',a163_0x2d12a4(0x130)]);export const AggregationTypeSchema=z['enum']([a163_0x2d12a4(0xea),'Sum','Average',a163_0x2d12a4(0xf1),'Max','CountDistinct',a163_0x2d12a4(0x12b),a163_0x2d12a4(0x101)]);const TemporalValueSchema=z[a163_0x2d12a4(0x100)]([z['object']({'timestamp':z[a163_0x2d12a4(0x115)]()}),z[a163_0x2d12a4(0xe9)]({'last':z['union']([z[a163_0x2d12a4(0x11f)](),z[a163_0x2d12a4(0xff)](z[a163_0x2d12a4(0x115)](),z[a163_0x2d12a4(0x11f)]())]),'unit':z[a163_0x2d12a4(0x115)]()})]),OperatorValueSchema=z[a163_0x2d12a4(0x100)]([z[a163_0x2d12a4(0x115)](),z['number'](),z['boolean'](),TemporalValueSchema,z[a163_0x2d12a4(0x128)](z[a163_0x2d12a4(0x100)]([z[a163_0x2d12a4(0x115)](),z[a163_0x2d12a4(0x11f)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a163_0x2d12a4(0x11a),'Greater','GreaterEqual',a163_0x2d12a4(0x10a),a163_0x2d12a4(0xeb),'In',a163_0x2d12a4(0x12a),a163_0x2d12a4(0xfe),'EndWith',a163_0x2d12a4(0x112),'TimeWithinPast',a163_0x2d12a4(0x106)]),OPERATORS_REQUIRING_UNIT=new Set([a163_0x2d12a4(0x132),a163_0x2d12a4(0x106)]);function a163_0x358b(){const _0x217c05=['segment','batch','Min','type','optional','12759208liICgN','duration','addIssue','EndWith','unit','Segment\x20name\x20is\x20required','boolean','second','And','6241158YlScVv','StartWith','record','union','Last','exclude','Column','timestamp','Segment\x20reference\x20must\x20not\x20be\x20empty','TimeWithinNext','day','has','enum','Less','2292608ofAWdm','544017aarUZI','1105713GPUqtf','CountDistinct','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','max','operator','Regexp','week','column','string','discriminatedUnion','min','literal','4388965BlPeNJ','Equal','minute','Sum','Max','IsNull','number','lazy','from','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','custom','any','value','Value','\x27\x20requires\x20a\x20value','array','5798128TGPafn','Contain','First','TimeRange\x20operator\x20requires\x20\x27duration\x27','Behavior','all','TimeRange','year','MISSING_TIME_UNIT','TimeWithinPast','include','object','Count','LessEqual','Operator\x20\x27','superRefine','funnel_stage'];a163_0x358b=function(){return _0x217c05;};return a163_0x358b();}export const OperatorDefSchema=z[a163_0x2d12a4(0xe9)]({'type':OperatorTypeSchema,'not':z[a163_0x2d12a4(0xfa)]()[a163_0x2d12a4(0xf3)](),'value':OperatorValueSchema['optional'](),'min':z[a163_0x2d12a4(0x100)]([z[a163_0x2d12a4(0x11f)](),z['string'](),TemporalValueSchema])[a163_0x2d12a4(0xf3)](),'max':z[a163_0x2d12a4(0x100)]([z[a163_0x2d12a4(0x11f)](),z[a163_0x2d12a4(0x115)](),TemporalValueSchema])[a163_0x2d12a4(0xf3)](),'unit':TimeUnitSchema['optional'](),'duration':z[a163_0x2d12a4(0xe9)]({'day':z[a163_0x2d12a4(0x11f)]()[a163_0x2d12a4(0xf3)](),'week':z[a163_0x2d12a4(0x11f)]()[a163_0x2d12a4(0xf3)](),'month':z[a163_0x2d12a4(0x11f)]()[a163_0x2d12a4(0xf3)](),'year':z['number']()[a163_0x2d12a4(0xf3)](),'hour':z['number']()['optional'](),'minute':z[a163_0x2d12a4(0x11f)]()['optional'](),'second':z['number']()[a163_0x2d12a4(0xf3)]()})['optional'](),'from':z[a163_0x2d12a4(0xe9)]({'last':z['union']([z['number'](),z['string']()]),'unit':TimeUnitSchema})[a163_0x2d12a4(0xf3)](),'reverse':z[a163_0x2d12a4(0xfa)]()[a163_0x2d12a4(0xf3)]()})[a163_0x2d12a4(0xed)]((_0x41c6b3,_0x1ffeff)=>{const _0x3d2db4=a163_0x2d12a4;OPERATORS_REQUIRING_VALUE[_0x3d2db4(0x108)](_0x41c6b3['type'])&&(_0x41c6b3[_0x3d2db4(0x125)]===undefined||_0x41c6b3[_0x3d2db4(0x125)]===null)&&_0x1ffeff[_0x3d2db4(0xf6)]({'code':'custom','message':_0x3d2db4(0xec)+_0x41c6b3[_0x3d2db4(0xf2)]+_0x3d2db4(0x127),'path':[_0x3d2db4(0x125)]}),_0x41c6b3['type']==='Between'&&_0x41c6b3['min']===undefined&&_0x41c6b3[_0x3d2db4(0x110)]===undefined&&_0x1ffeff['addIssue']({'code':'custom','message':_0x3d2db4(0x122),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0x3d2db4(0x108)](_0x41c6b3[_0x3d2db4(0xf2)])&&_0x41c6b3[_0x3d2db4(0x125)]!==undefined&&!_0x41c6b3[_0x3d2db4(0xf8)]&&_0x1ffeff[_0x3d2db4(0xf6)]({'code':_0x3d2db4(0x123),'message':_0x3d2db4(0xec)+_0x41c6b3[_0x3d2db4(0xf2)]+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x3d2db4(0xf8)],'params':{'validationCode':_0x3d2db4(0x131)}}),_0x41c6b3[_0x3d2db4(0xf2)]===_0x3d2db4(0x12f)&&(!_0x41c6b3[_0x3d2db4(0xf5)]&&_0x1ffeff[_0x3d2db4(0xf6)]({'code':'custom','message':_0x3d2db4(0x12c),'path':[_0x3d2db4(0xf5)]}),!_0x41c6b3[_0x3d2db4(0x121)]&&_0x1ffeff['addIssue']({'code':_0x3d2db4(0x123),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':['from']}));});export const ArrayMatchingSchema=z[a163_0x2d12a4(0x100)]([z['literal'](a163_0x2d12a4(0x124)),z[a163_0x2d12a4(0x118)](a163_0x2d12a4(0x12e)),z[a163_0x2d12a4(0xe9)]({'atLeast':z[a163_0x2d12a4(0x11f)]()}),z[a163_0x2d12a4(0xe9)]({'atMost':z[a163_0x2d12a4(0x11f)]()}),z[a163_0x2d12a4(0xe9)]({'exactly':z[a163_0x2d12a4(0x11f)]()})]);export const AggregationDefSchema=z[a163_0x2d12a4(0x116)](a163_0x2d12a4(0xf2),[z[a163_0x2d12a4(0xe9)]({'type':z[a163_0x2d12a4(0x109)]([a163_0x2d12a4(0x11c),a163_0x2d12a4(0xf1),a163_0x2d12a4(0x11d),'Average']),'column':z[a163_0x2d12a4(0x115)](),'groupingColumns':z[a163_0x2d12a4(0x128)](z[a163_0x2d12a4(0x115)]())[a163_0x2d12a4(0xf3)]()}),z[a163_0x2d12a4(0xe9)]({'type':z[a163_0x2d12a4(0x118)](a163_0x2d12a4(0xea)),'groupingColumns':z['array'](z[a163_0x2d12a4(0x115)]())['optional']()}),z[a163_0x2d12a4(0xe9)]({'type':z[a163_0x2d12a4(0x118)](a163_0x2d12a4(0x10e)),'columns':z[a163_0x2d12a4(0x128)](z[a163_0x2d12a4(0x115)]())}),z[a163_0x2d12a4(0xe9)]({'type':z[a163_0x2d12a4(0x109)]([a163_0x2d12a4(0x12b),a163_0x2d12a4(0x101)]),'column':z['string'](),'orderColumn':z['string'](),'groupingColumns':z[a163_0x2d12a4(0x128)](z[a163_0x2d12a4(0x115)]())[a163_0x2d12a4(0xf3)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a163_0x2d12a4(0x11f)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a163_0x2d12a4(0x132),'TimeWithinNext',a163_0x2d12a4(0x12f)]);export const FilterColumnConditionDefSchema=z[a163_0x2d12a4(0xe9)]({'type':z[a163_0x2d12a4(0x118)](a163_0x2d12a4(0x103)),'column':z[a163_0x2d12a4(0x115)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x2d12a4(0xf3)]()})[a163_0x2d12a4(0xed)]((_0x25b431,_0x3c4230)=>{const _0x394dae=a163_0x2d12a4,_0x59f886=_0x25b431['operator'][_0x394dae(0xf2)];_0x25b431[_0x394dae(0x114)]===_0x394dae(0x104)?!TIMESTAMP_OPERATORS[_0x394dae(0x108)](_0x59f886)&&_0x3c4230[_0x394dae(0xf6)]({'code':_0x394dae(0x123),'message':_0x394dae(0x10f)+_0x59f886+'\x27)','path':[_0x394dae(0x111),_0x394dae(0xf2)]}):TIMESTAMP_OPERATORS[_0x394dae(0x108)](_0x59f886)&&_0x3c4230[_0x394dae(0xf6)]({'code':'custom','message':_0x394dae(0xec)+_0x59f886+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x394dae(0x111),'type']});});export const FilterRuleDefSchema=z[a163_0x2d12a4(0xe9)]({'type':z[a163_0x2d12a4(0x118)](a163_0x2d12a4(0xfc)),'conditions':z[a163_0x2d12a4(0x128)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a163_0x2d12a4(0x120)](()=>z[a163_0x2d12a4(0xe9)]({'type':z[a163_0x2d12a4(0x118)](a163_0x2d12a4(0x126)),'attribute':z[a163_0x2d12a4(0x115)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x2d12a4(0xf3)](),'exclude':z[a163_0x2d12a4(0xfa)]()[a163_0x2d12a4(0xf3)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a163_0x2d12a4(0x115)]()[a163_0x2d12a4(0xf3)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a163_0x2d12a4(0x11f)]()[a163_0x2d12a4(0xf3)]()}));export const BehaviorConditionDefSchema=z[a163_0x2d12a4(0x120)](()=>z[a163_0x2d12a4(0xe9)]({'type':z[a163_0x2d12a4(0x118)](a163_0x2d12a4(0x12d)),'attribute':z[a163_0x2d12a4(0x115)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a163_0x2d12a4(0xfa)]()['optional'](),'aggregation':AggregationDefSchema[a163_0x2d12a4(0xf3)](),'source':z[a163_0x2d12a4(0x115)]()[a163_0x2d12a4(0xf3)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a163_0x2d12a4(0x11f)]()[a163_0x2d12a4(0xf3)]()}));export const ColumnConditionDefSchema=z[a163_0x2d12a4(0xe9)]({'type':z[a163_0x2d12a4(0x118)](a163_0x2d12a4(0x103)),'column':z[a163_0x2d12a4(0x115)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a163_0x2d12a4(0x120)](()=>z['object']({'type':z['enum']([a163_0x2d12a4(0xfc),'Or']),'conditions':z[a163_0x2d12a4(0x128)](ConditionDefSchema),'description':z[a163_0x2d12a4(0x115)]()[a163_0x2d12a4(0xf3)]()}));export const SegmentRefConditionDefSchema=z[a163_0x2d12a4(0xe9)]({'type':z[a163_0x2d12a4(0x109)]([a163_0x2d12a4(0xe8),a163_0x2d12a4(0x102)]),'segment':z[a163_0x2d12a4(0x115)]()[a163_0x2d12a4(0x117)](0x1,a163_0x2d12a4(0x105))});export const ConditionDefSchema=z[a163_0x2d12a4(0x120)](()=>z[a163_0x2d12a4(0x100)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z['object']({'type':z[a163_0x2d12a4(0x109)](['And','Or']),'conditions':z[a163_0x2d12a4(0x128)](ConditionDefSchema),'description':z[a163_0x2d12a4(0x115)]()['optional']()}));export const SegmentDefSchema=z[a163_0x2d12a4(0xe9)]({'type':z[a163_0x2d12a4(0x118)](a163_0x2d12a4(0xef))[a163_0x2d12a4(0xf3)](),'name':z[a163_0x2d12a4(0x115)]()[a163_0x2d12a4(0x117)](0x1,a163_0x2d12a4(0xf9)),'description':z['string']()[a163_0x2d12a4(0xf3)](),'folder':z[a163_0x2d12a4(0x115)]()[a163_0x2d12a4(0xf3)](),'rule':RuleDefSchema[a163_0x2d12a4(0xf3)](),'kind':z[a163_0x2d12a4(0x109)]([a163_0x2d12a4(0xf0),'realtime',a163_0x2d12a4(0xee)])['optional'](),'visible':z[a163_0x2d12a4(0xfa)]()[a163_0x2d12a4(0xf3)](),'activations':z['array'](z[a163_0x2d12a4(0x124)]())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];function a163_0x5684(_0x54787f,_0x4a9715){_0x54787f=_0x54787f-0xe8;const _0x358ba1=a163_0x358b();let _0x56844d=_0x358ba1[_0x54787f];return _0x56844d;}void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a164_0x23a918=a164_0x49d4;(function(_0x48e0da,_0x2bd472){const _0x49b59d=a164_0x49d4,_0x3d3115=_0x48e0da();while(!![]){try{const _0x516fc5=parseInt(_0x49b59d(0x165))/0x1+parseInt(_0x49b59d(0x156))/0x2*(-parseInt(_0x49b59d(0x155))/0x3)+-parseInt(_0x49b59d(0x151))/0x4*(-parseInt(_0x49b59d(0x170))/0x5)+-parseInt(_0x49b59d(0x154))/0x6+-parseInt(_0x49b59d(0x164))/0x7*(parseInt(_0x49b59d(0x16e))/0x8)+-parseInt(_0x49b59d(0x169))/0x9*(parseInt(_0x49b59d(0x15a))/0xa)+parseInt(_0x49b59d(0x162))/0xb;if(_0x516fc5===_0x2bd472)break;else _0x3d3115['push'](_0x3d3115['shift']());}catch(_0x283592){_0x3d3115['push'](_0x3d3115['shift']());}}}(a164_0x30ac,0x4c8e3));function a164_0x49d4(_0x419a36,_0x2e1d76){_0x419a36=_0x419a36-0x151;const _0x30ace6=a164_0x30ac();let _0x49d444=_0x30ace6[_0x419a36];return _0x49d444;}import{readFileSync}from'fs';import*as a164_0x53c981 from'path';import*as a164_0x44de89 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';const VALID_CAMPAIGN_TYPES=new Set(['email',a164_0x23a918(0x15d)]);export function isJourneyDef(_0x5458fd){const _0x19f1de=a164_0x23a918;return typeof _0x5458fd===_0x19f1de(0x152)&&_0x5458fd!==null&&'type'in _0x5458fd&&_0x5458fd['type']===_0x19f1de(0x16b);}export function isCampaignDef(_0x257e9e){const _0x124391=a164_0x23a918;if(typeof _0x257e9e!=='object'||_0x257e9e===null)return![];const _0x44fdda=_0x257e9e,_0x3161ce=VALID_CAMPAIGN_TYPES['has'](_0x44fdda[_0x124391(0x153)]);if(_0x44fdda[_0x124391(0x168)]==='campaign'&&_0x3161ce)return!![];if(_0x3161ce&&!_0x44fdda['type'])return!![];return![];}export function isTemplateDef(_0x384ff4){const _0x18e4bd=a164_0x23a918;return typeof _0x384ff4==='object'&&_0x384ff4!==null&&'type'in _0x384ff4&&_0x384ff4[_0x18e4bd(0x168)]===_0x18e4bd(0x15c);}export function isValidationResult(_0x2881ca){const _0x17f5a2=a164_0x23a918;return!(_0x17f5a2(0x157)in _0x2881ca);}export function createParseErrorResult(_0x3ad290,_0xbd8d0,_0x5f293b,_0xd7d4ef,_0x2aec70='segment'){const _0x113a3c=a164_0x23a918;return{'filePath':_0x3ad290,'relativePath':_0xbd8d0,'source':_0x5f293b,'result':{'valid':![],'errors':[{'level':_0x113a3c(0x16d),'path':'','code':'YAML_PARSE_ERROR','message':_0xd7d4ef}],'warnings':[]},'fileType':_0x2aec70};}export function validateYamlFile(_0x2b802f,_0x4b0447,_0x16e73b={}){const _0x39059d=a164_0x23a918,_0x1f1569=a164_0x53c981['relative'](_0x4b0447,_0x2b802f)||a164_0x53c981[_0x39059d(0x15b)](_0x2b802f);try{const _0x42aa6e=readFileSync(_0x2b802f,_0x39059d(0x15f)),_0x878379=a164_0x44de89[_0x39059d(0x158)](_0x42aa6e),_0x4ddc73=_0x878379[_0x39059d(0x15e)]();if(!_0x4ddc73)return createParseErrorResult(_0x2b802f,_0x1f1569,_0x42aa6e,_0x39059d(0x16f));let _0x1693ec;if(isJourneyDef(_0x4ddc73))_0x1693ec='journey';else{if(isCampaignDef(_0x4ddc73))_0x1693ec=_0x39059d(0x167);else isTemplateDef(_0x4ddc73)?_0x1693ec='template':_0x1693ec=_0x39059d(0x16c);}if(_0x16e73b[_0x39059d(0x166)]&&_0x1693ec!==_0x16e73b[_0x39059d(0x166)])return{'filePath':_0x2b802f,'relativePath':_0x1f1569,'skipped':!![],'reason':_0x39059d(0x161)+_0x16e73b['filterType']};const _0x10d383={'source':_0x42aa6e,'document':_0x878379};let _0x545c1e;if(_0x1693ec===_0x39059d(0x16b))_0x545c1e=validateJourneyDef(_0x4ddc73,_0x10d383);else{if(_0x1693ec===_0x39059d(0x167))_0x545c1e=validateCampaignDef(_0x4ddc73,_0x10d383);else _0x1693ec==='template'?_0x545c1e=validateTemplateDef(_0x4ddc73,_0x10d383):_0x545c1e=validateSegmentDef(_0x4ddc73,_0x10d383);}return{'filePath':_0x2b802f,'relativePath':_0x1f1569,'source':_0x42aa6e,'result':_0x545c1e,'fileType':_0x1693ec};}catch(_0x39221b){const _0x46bf9c=_0x39221b instanceof Error?_0x39221b[_0x39059d(0x163)]:String(_0x39221b);return createParseErrorResult(_0x2b802f,_0x1f1569,'','YAML\x20parse\x20error:\x20'+_0x46bf9c);}}export function validateYamlFiles(_0xadf079,_0xe6039b,_0x228c22={}){return _0xadf079['map'](_0x39f974=>validateYamlFile(_0x39f974,_0xe6039b,_0x228c22));}function a164_0x30ac(){const _0x23bd74=['Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','643575SzwjHs','8uoUZwi','object','campaign_type','711444NMgvFj','753nGVTKi','3702Akhcrn','skipped','parseDocument','warnings','3960oEfLJa','basename','template','push','toJSON','utf-8','length','not\x20a\x20','9622085jIOmAa','message','878136FShsGd','287361JCcGbr','filterType','campaign','type','477OmmkBu','result','journey','segment','error','32kGEwpb'];a164_0x30ac=function(){return _0x23bd74;};return a164_0x30ac();}export function calculateSummary(_0x2f140f){const _0x45de4d=a164_0x23a918;let _0x4094f6=0x0,_0x1632f7=0x0,_0x58f1a0=0x0,_0x2fdb6c=0x0;for(const _0x5a4620 of _0x2f140f){if(!isValidationResult(_0x5a4620)){_0x2fdb6c++;continue;}_0x5a4620[_0x45de4d(0x16a)]['valid']?_0x4094f6++:_0x1632f7++,_0x58f1a0+=_0x5a4620['result'][_0x45de4d(0x159)][_0x45de4d(0x160)];}return{'validCount':_0x4094f6,'invalidCount':_0x1632f7,'warningCount':_0x58f1a0,'skippedCount':_0x2fdb6c,'hasErrors':_0x1632f7>0x0};}
1
+ const a164_0xc5a97=a164_0x522b;function a164_0x329f(){const _0x198669=['YAML\x20parse\x20error:\x20','journey','3002984ItITPr','parseDocument','6mpkfxA','segment','push','50070kKdfaS','campaign_type','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','basename','toJSON','has','3143567cRTBQP','YAML_PARSE_ERROR','filterType','1580oEuppg','error','30773ALKvlt','skipped','result','map','template','object','warnings','52987BeDlZX','3KLsRKO','type','17384uEALKB','utf-8','campaign','18cjJFRe','1882118nLscWa'];a164_0x329f=function(){return _0x198669;};return a164_0x329f();}(function(_0x460b71,_0x39a2f6){const _0x3aea78=a164_0x522b,_0x4f9fb9=_0x460b71();while(!![]){try{const _0x512129=parseInt(_0x3aea78(0x99))/0x1+-parseInt(_0x3aea78(0x86))/0x2*(-parseInt(_0x3aea78(0x80))/0x3)+parseInt(_0x3aea78(0x89))/0x4+-parseInt(_0x3aea78(0x8e))/0x5+-parseInt(_0x3aea78(0x8b))/0x6*(parseInt(_0x3aea78(0x94))/0x7)+parseInt(_0x3aea78(0x82))/0x8*(-parseInt(_0x3aea78(0x85))/0x9)+parseInt(_0x3aea78(0x97))/0xa*(-parseInt(_0x3aea78(0x7f))/0xb);if(_0x512129===_0x39a2f6)break;else _0x4f9fb9['push'](_0x4f9fb9['shift']());}catch(_0x1f0e5f){_0x4f9fb9['push'](_0x4f9fb9['shift']());}}}(a164_0x329f,0x79983));import{readFileSync}from'fs';import*as a164_0x478b27 from'path';import*as a164_0x3953cc 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';const VALID_CAMPAIGN_TYPES=new Set(['email',a164_0xc5a97(0x8d)]);export function isJourneyDef(_0x310697){const _0x1fa46b=a164_0xc5a97;return typeof _0x310697==='object'&&_0x310697!==null&&_0x1fa46b(0x81)in _0x310697&&_0x310697[_0x1fa46b(0x81)]===_0x1fa46b(0x88);}function a164_0x522b(_0x48deca,_0x62c7c0){_0x48deca=_0x48deca-0x7f;const _0x329f68=a164_0x329f();let _0x522b57=_0x329f68[_0x48deca];return _0x522b57;}export function isCampaignDef(_0x3f9bd3){const _0x5cd8a5=a164_0xc5a97;if(typeof _0x3f9bd3!=='object'||_0x3f9bd3===null)return![];const _0x2df3b1=_0x3f9bd3,_0x5ecb6d=VALID_CAMPAIGN_TYPES[_0x5cd8a5(0x93)](_0x2df3b1[_0x5cd8a5(0x8f)]);if(_0x2df3b1['type']===_0x5cd8a5(0x84)&&_0x5ecb6d)return!![];if(_0x5ecb6d&&!_0x2df3b1[_0x5cd8a5(0x81)])return!![];return![];}export function isTemplateDef(_0x2529e1){const _0x5c0780=a164_0xc5a97;return typeof _0x2529e1===_0x5c0780(0x9e)&&_0x2529e1!==null&&_0x5c0780(0x81)in _0x2529e1&&_0x2529e1['type']===_0x5c0780(0x9d);}export function isValidationResult(_0x243d3f){const _0x4eac35=a164_0xc5a97;return!(_0x4eac35(0x9a)in _0x243d3f);}export function createParseErrorResult(_0x480fad,_0x10e064,_0x6e5a6c,_0x3165f3,_0x62e300=a164_0xc5a97(0x8c)){const _0x410f38=a164_0xc5a97;return{'filePath':_0x480fad,'relativePath':_0x10e064,'source':_0x6e5a6c,'result':{'valid':![],'errors':[{'level':_0x410f38(0x98),'path':'','code':_0x410f38(0x95),'message':_0x3165f3}],'warnings':[]},'fileType':_0x62e300};}export function validateYamlFile(_0x5eb6a9,_0x11ebe7,_0x3e2b2e={}){const _0x93fe9c=a164_0xc5a97,_0x227261=a164_0x478b27['relative'](_0x11ebe7,_0x5eb6a9)||a164_0x478b27[_0x93fe9c(0x91)](_0x5eb6a9);try{const _0x54d951=readFileSync(_0x5eb6a9,_0x93fe9c(0x83)),_0x719fe=a164_0x3953cc[_0x93fe9c(0x8a)](_0x54d951),_0x460788=_0x719fe[_0x93fe9c(0x92)]();if(!_0x460788)return createParseErrorResult(_0x5eb6a9,_0x227261,_0x54d951,_0x93fe9c(0x90));let _0x163dde;if(isJourneyDef(_0x460788))_0x163dde='journey';else{if(isCampaignDef(_0x460788))_0x163dde=_0x93fe9c(0x84);else isTemplateDef(_0x460788)?_0x163dde=_0x93fe9c(0x9d):_0x163dde='segment';}if(_0x3e2b2e[_0x93fe9c(0x96)]&&_0x163dde!==_0x3e2b2e[_0x93fe9c(0x96)])return{'filePath':_0x5eb6a9,'relativePath':_0x227261,'skipped':!![],'reason':'not\x20a\x20'+_0x3e2b2e['filterType']};const _0x258a3b={'source':_0x54d951,'document':_0x719fe};let _0x2c11f0;if(_0x163dde==='journey')_0x2c11f0=validateJourneyDef(_0x460788,_0x258a3b);else{if(_0x163dde==='campaign')_0x2c11f0=validateCampaignDef(_0x460788,_0x258a3b);else _0x163dde===_0x93fe9c(0x9d)?_0x2c11f0=validateTemplateDef(_0x460788,_0x258a3b):_0x2c11f0=validateSegmentDef(_0x460788,_0x258a3b);}return{'filePath':_0x5eb6a9,'relativePath':_0x227261,'source':_0x54d951,'result':_0x2c11f0,'fileType':_0x163dde};}catch(_0x264061){const _0x547f94=_0x264061 instanceof Error?_0x264061['message']:String(_0x264061);return createParseErrorResult(_0x5eb6a9,_0x227261,'',_0x93fe9c(0x87)+_0x547f94);}}export function validateYamlFiles(_0x3c33db,_0x8bc226,_0x56d436={}){const _0xa2be25=a164_0xc5a97;return _0x3c33db[_0xa2be25(0x9c)](_0x25be79=>validateYamlFile(_0x25be79,_0x8bc226,_0x56d436));}export function calculateSummary(_0x4d3372){const _0x2f300e=a164_0xc5a97;let _0x3fed5b=0x0,_0x1f2a66=0x0,_0x5e0efe=0x0,_0x53df12=0x0;for(const _0x2047df of _0x4d3372){if(!isValidationResult(_0x2047df)){_0x53df12++;continue;}_0x2047df[_0x2f300e(0x9b)]['valid']?_0x3fed5b++:_0x1f2a66++,_0x5e0efe+=_0x2047df[_0x2f300e(0x9b)][_0x2f300e(0x9f)]['length'];}return{'validCount':_0x3fed5b,'invalidCount':_0x1f2a66,'warningCount':_0x5e0efe,'skippedCount':_0x53df12,'hasErrors':_0x1f2a66>0x0};}
@@ -1 +1 @@
1
- (function(_0x82f3ad,_0x5b2bde){const _0xae4295=a165_0x11bb,_0x20e200=_0x82f3ad();while(!![]){try{const _0x47a8bd=-parseInt(_0xae4295(0x190))/0x1+-parseInt(_0xae4295(0x19e))/0x2*(parseInt(_0xae4295(0x198))/0x3)+-parseInt(_0xae4295(0x189))/0x4*(-parseInt(_0xae4295(0x18a))/0x5)+-parseInt(_0xae4295(0x184))/0x6+parseInt(_0xae4295(0x1a7))/0x7+-parseInt(_0xae4295(0x17d))/0x8+parseInt(_0xae4295(0x18c))/0x9;if(_0x47a8bd===_0x5b2bde)break;else _0x20e200['push'](_0x20e200['shift']());}catch(_0x37d6bf){_0x20e200['push'](_0x20e200['shift']());}}}(a165_0x5509,0xe531f));import*as a165_0x18b61e from'yaml';import a165_0x1adab1 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x319fdb,_0x43faf8,_0x352019){const _0x222e73=a165_0x11bb;if(!_0x319fdb||!_0x43faf8)return undefined;try{let _0x302c5d=_0x319fdb['getIn'](_0x352019,!![]),_0x41689e=[..._0x352019];while((!_0x302c5d||typeof _0x302c5d!=='object'||!(_0x222e73(0x18b)in _0x302c5d)||!_0x302c5d[_0x222e73(0x18b)])&&_0x41689e[_0x222e73(0x18f)]>0x0){_0x41689e[_0x222e73(0x1a3)](),_0x302c5d=_0x41689e[_0x222e73(0x18f)]>0x0?_0x319fdb[_0x222e73(0x1a4)](_0x41689e,!![]):_0x319fdb[_0x222e73(0x18e)];}if(!_0x302c5d||typeof _0x302c5d!=='object'||!(_0x222e73(0x18b)in _0x302c5d)||!_0x302c5d['range'])return undefined;const [_0x49965a]=_0x302c5d[_0x222e73(0x18b)];return offsetToLocation(_0x43faf8,_0x49965a);}catch{return undefined;}}export function offsetToLocation(_0x4ef9ff,_0x4aa386){const _0x4a5c01=a165_0x11bb;let _0x539eef=0x1,_0x241b40=0x1;for(let _0x2ecce9=0x0;_0x2ecce9<_0x4aa386&&_0x2ecce9<_0x4ef9ff[_0x4a5c01(0x18f)];_0x2ecce9++){_0x4ef9ff[_0x2ecce9]==='\x0a'?(_0x539eef++,_0x241b40=0x1):_0x241b40++;}return{'line':_0x539eef,'column':_0x241b40,'offset':_0x4aa386};}export function pathToArray(_0x45cb26){const _0x49ac38=a165_0x11bb;if(!_0x45cb26)return[];return _0x45cb26[_0x49ac38(0x1a8)]('.')['flatMap'](_0x442ff3=>{const _0x4b5ab8=_0x49ac38,_0x1a591d=_0x442ff3[_0x4b5ab8(0x195)](/^(\w+)\[(\d+)\]$/);if(_0x1a591d)return[_0x1a591d[0x1],parseInt(_0x1a591d[0x2],0xa)];return[_0x442ff3];});}export function formatZodPath(_0x25cd43){const _0x3f0626=a165_0x11bb;let _0x59cceb='';for(const _0x25a89d of _0x25cd43){if(typeof _0x25a89d===_0x3f0626(0x194))_0x59cceb+='['+_0x25a89d+']';else{const _0x4cd690=String(_0x25a89d);_0x59cceb+=_0x59cceb?'.'+_0x4cd690:_0x4cd690;}}return _0x59cceb;}export function flattenZodIssues(_0x4e447c){const _0x1c8aa6=a165_0x11bb,_0x2bfd58=[];for(const _0x625670 of _0x4e447c){if(_0x625670[_0x1c8aa6(0x199)]===_0x1c8aa6(0x17f)&&_0x1c8aa6(0x191)in _0x625670){const _0x16a551=_0x625670['errors'];let _0x4fcbfc=_0x16a551[0x0]||[];for(const _0x579ec6 of _0x16a551){_0x579ec6['length']<_0x4fcbfc['length']&&(_0x4fcbfc=_0x579ec6);}const _0x476cde=_0x4fcbfc['map'](_0x19676c=>({..._0x19676c,'path':[..._0x625670['path'],..._0x19676c[_0x1c8aa6(0x185)]]}));_0x2bfd58[_0x1c8aa6(0x181)](...flattenZodIssues(_0x476cde));}else _0x2bfd58[_0x1c8aa6(0x181)](_0x625670);}return _0x2bfd58;}export function safeParseYaml(_0x4750f6,_0x3d15a8){const _0x1246c8=a165_0x11bb,_0x5686b2=a165_0x18b61e[_0x1246c8(0x19d)](_0x4750f6);if(!_0x5686b2||typeof _0x5686b2!==_0x1246c8(0x1a1))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0xcae073=_0x3d15a8[_0x1246c8(0x19f)](_0x5686b2);if(!_0xcae073[_0x1246c8(0x197)]){const _0xa01df=_0xcae073[_0x1246c8(0x196)]['issues'][0x0],_0x5ab169=formatZodPath(_0xa01df['path']);throw new Error(_0x5ab169?_0x1246c8(0x182)+_0x5ab169+'\x27:\x20'+_0xa01df[_0x1246c8(0x1a0)]:_0x1246c8(0x180)+_0xa01df[_0x1246c8(0x1a0)]);}return _0xcae073[_0x1246c8(0x1a6)];}export function formatIssueWithContext(_0x2f9373,_0x574367,_0x2e4138){const _0x45c45b=a165_0x11bb,_0x14f47c=[],_0x1f5256=_0x2f9373[_0x45c45b(0x1a2)]===_0x45c45b(0x196),_0xcb826d=_0x1f5256?a165_0x1adab1[_0x45c45b(0x18d)]:a165_0x1adab1[_0x45c45b(0x1a5)],_0x30a566=_0x1f5256?a165_0x1adab1[_0x45c45b(0x18d)]:a165_0x1adab1[_0x45c45b(0x1a5)],_0x5a46a7=_0x2e4138?a165_0x1adab1[_0x45c45b(0x17e)](_0x2e4138+':'):'';if(_0x2f9373[_0x45c45b(0x19b)]){const _0x876991=a165_0x1adab1[_0x45c45b(0x17e)](_0x2f9373[_0x45c45b(0x19b)][_0x45c45b(0x19a)]+':'+_0x2f9373['location'][_0x45c45b(0x188)]);_0x14f47c['push'](''+_0x5a46a7+_0x876991+':\x20'+_0xcb826d(_0x2f9373[_0x45c45b(0x1a2)])+'\x20'+_0x30a566('['+_0x2f9373[_0x45c45b(0x199)]+']'));}else _0x14f47c[_0x45c45b(0x181)](''+_0x5a46a7+a165_0x1adab1['dim'](_0x2f9373[_0x45c45b(0x185)])+':\x20'+_0xcb826d(_0x2f9373[_0x45c45b(0x1a2)])+'\x20'+_0x30a566('['+_0x2f9373['code']+']'));_0x14f47c[_0x45c45b(0x181)](_0x2f9373[_0x45c45b(0x1a0)]);if(_0x2f9373[_0x45c45b(0x19b)]&&_0x574367){const _0x4d1418=_0x574367['split']('\x0a'),{line:_0xf52787,column:_0x16a00d}=_0x2f9373['location'],_0x48d7cd=Math[_0x45c45b(0x183)](0x1,_0xf52787-0x1),_0x10c429=Math[_0x45c45b(0x187)](_0x4d1418[_0x45c45b(0x18f)],_0xf52787+0x1);_0x14f47c[_0x45c45b(0x181)]('');for(let _0x1e0e6d=_0x48d7cd;_0x1e0e6d<=_0x10c429;_0x1e0e6d++){const _0x327047=_0x4d1418[_0x1e0e6d-0x1]||'',_0x1fc0dc=a165_0x1adab1[_0x45c45b(0x19c)](_0x1e0e6d['toString']()[_0x45c45b(0x192)](0x4)),_0x20ed6a=a165_0x1adab1[_0x45c45b(0x19c)]('\x20|\x20');if(_0x1e0e6d===_0xf52787){_0x14f47c['push']('\x20\x20'+_0x1fc0dc+_0x20ed6a+_0xcb826d(_0x327047));const _0x56e88e='\x20'[_0x45c45b(0x186)](0x4+0x3+_0x16a00d-0x1);_0x14f47c[_0x45c45b(0x181)]('\x20\x20'+_0x56e88e+_0xcb826d('^'));}else _0x14f47c[_0x45c45b(0x181)]('\x20\x20'+_0x1fc0dc+_0x20ed6a+a165_0x1adab1[_0x45c45b(0x19c)](_0x327047));}}return _0x14f47c[_0x45c45b(0x193)]('\x0a');}function a165_0x11bb(_0x49541a,_0x483d6c){_0x49541a=_0x49541a-0x17d;const _0x550943=a165_0x5509();let _0x11bb31=_0x550943[_0x49541a];return _0x11bb31;}function a165_0x5509(){const _0x66f459=['error','success','21OCpfdW','code','line','location','dim','parse','416838RRoKgV','safeParse','message','object','level','pop','getIn','yellow','data','4609010vbtmcD','split','1350336WBSxOw','cyan','invalid_union','YAML\x20validation\x20error:\x20','push','YAML\x20validation\x20error\x20at\x20\x27','max','1072950jmtJMR','path','repeat','min','column','8896SiOcfe','2615GYvHjN','range','16380090DntifG','red','contents','length','896259JbuZPB','errors','padStart','join','number','match'];a165_0x5509=function(){return _0x66f459;};return a165_0x5509();}export function formatValidationResult(_0xbdc959,_0xda48e8,_0x3e2ba8){const _0x4cfd16=a165_0x11bb,_0x305a04=[];for(const _0x3e8ec2 of _0xbdc959[_0x4cfd16(0x191)]){_0x305a04[_0x4cfd16(0x181)](formatIssueWithContext(_0x3e8ec2,_0xda48e8,_0x3e2ba8)),_0x305a04[_0x4cfd16(0x181)]('');}for(const _0x250585 of _0xbdc959['warnings']){_0x305a04[_0x4cfd16(0x181)](formatIssueWithContext(_0x250585,_0xda48e8,_0x3e2ba8)),_0x305a04['push']('');}return _0x305a04[_0x4cfd16(0x193)]('\x0a');}
1
+ (function(_0x420949,_0x18b04f){const _0x47170f=a165_0x52b6,_0x3900c7=_0x420949();while(!![]){try{const _0x159c93=parseInt(_0x47170f(0xa3))/0x1+parseInt(_0x47170f(0xa5))/0x2+parseInt(_0x47170f(0x88))/0x3*(parseInt(_0x47170f(0x87))/0x4)+parseInt(_0x47170f(0xa6))/0x5+parseInt(_0x47170f(0x81))/0x6+-parseInt(_0x47170f(0xa1))/0x7+-parseInt(_0x47170f(0x8c))/0x8*(parseInt(_0x47170f(0x90))/0x9);if(_0x159c93===_0x18b04f)break;else _0x3900c7['push'](_0x3900c7['shift']());}catch(_0x22e38b){_0x3900c7['push'](_0x3900c7['shift']());}}}(a165_0x30f0,0xa21f6));import*as a165_0x5e2098 from'yaml';import a165_0x1ca5f4 from'chalk';function a165_0x30f0(){const _0x281692=['join','max','length','red','error','4RhfXUr','3593721EKvfCO','errors','pop','flatMap','11987624BboRFA','YAML\x20validation\x20error:\x20','level','min','9cggdxh','invalid_union','path','dim','safeParse','warnings','repeat','range','match','contents','object','\x27:\x20','split','push','code','\x20|\x20','message','9004422wDPSGw','Invalid\x20YAML:\x20expected\x20an\x20object','900890fGSPnB','getIn','1331802fYSGlJ','2409405ziYtue','data','location','cyan','yellow','1213644YzvvDQ'];a165_0x30f0=function(){return _0x281692;};return a165_0x30f0();}export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x571b7c,_0x1f7ab5,_0x1a6916){const _0x55de54=a165_0x52b6;if(!_0x571b7c||!_0x1f7ab5)return undefined;try{let _0x2637b5=_0x571b7c[_0x55de54(0xa4)](_0x1a6916,!![]),_0x43b3b7=[..._0x1a6916];while((!_0x2637b5||typeof _0x2637b5!=='object'||!('range'in _0x2637b5)||!_0x2637b5[_0x55de54(0x97)])&&_0x43b3b7['length']>0x0){_0x43b3b7[_0x55de54(0x8a)](),_0x2637b5=_0x43b3b7[_0x55de54(0x84)]>0x0?_0x571b7c[_0x55de54(0xa4)](_0x43b3b7,!![]):_0x571b7c[_0x55de54(0x99)];}if(!_0x2637b5||typeof _0x2637b5!=='object'||!(_0x55de54(0x97)in _0x2637b5)||!_0x2637b5[_0x55de54(0x97)])return undefined;const [_0x2f802c]=_0x2637b5[_0x55de54(0x97)];return offsetToLocation(_0x1f7ab5,_0x2f802c);}catch{return undefined;}}function a165_0x52b6(_0x4041af,_0xb5baa1){_0x4041af=_0x4041af-0x81;const _0x30f0aa=a165_0x30f0();let _0x52b6af=_0x30f0aa[_0x4041af];return _0x52b6af;}export function offsetToLocation(_0x41924b,_0x318657){const _0xdf40e=a165_0x52b6;let _0x3bdff4=0x1,_0x475ebe=0x1;for(let _0x14ce89=0x0;_0x14ce89<_0x318657&&_0x14ce89<_0x41924b[_0xdf40e(0x84)];_0x14ce89++){_0x41924b[_0x14ce89]==='\x0a'?(_0x3bdff4++,_0x475ebe=0x1):_0x475ebe++;}return{'line':_0x3bdff4,'column':_0x475ebe,'offset':_0x318657};}export function pathToArray(_0x298613){const _0x9228e5=a165_0x52b6;if(!_0x298613)return[];return _0x298613['split']('.')[_0x9228e5(0x8b)](_0x5cf020=>{const _0x382c71=_0x9228e5,_0x40f6d2=_0x5cf020[_0x382c71(0x98)](/^(\w+)\[(\d+)\]$/);if(_0x40f6d2)return[_0x40f6d2[0x1],parseInt(_0x40f6d2[0x2],0xa)];return[_0x5cf020];});}export function formatZodPath(_0x514a7d){let _0x5578e8='';for(const _0x49360e of _0x514a7d){if(typeof _0x49360e==='number')_0x5578e8+='['+_0x49360e+']';else{const _0x3c6be5=String(_0x49360e);_0x5578e8+=_0x5578e8?'.'+_0x3c6be5:_0x3c6be5;}}return _0x5578e8;}export function flattenZodIssues(_0x54470d){const _0x279f6a=a165_0x52b6,_0x40810d=[];for(const _0x330994 of _0x54470d){if(_0x330994[_0x279f6a(0x9e)]===_0x279f6a(0x91)&&_0x279f6a(0x89)in _0x330994){const _0x5ac69b=_0x330994['errors'];let _0x30e2dd=_0x5ac69b[0x0]||[];for(const _0x376052 of _0x5ac69b){_0x376052[_0x279f6a(0x84)]<_0x30e2dd[_0x279f6a(0x84)]&&(_0x30e2dd=_0x376052);}const _0x1688f0=_0x30e2dd['map'](_0x562a70=>({..._0x562a70,'path':[..._0x330994[_0x279f6a(0x92)],..._0x562a70[_0x279f6a(0x92)]]}));_0x40810d[_0x279f6a(0x9d)](...flattenZodIssues(_0x1688f0));}else _0x40810d['push'](_0x330994);}return _0x40810d;}export function safeParseYaml(_0x5c1c16,_0x2d5ba2){const _0x3a4aa2=a165_0x52b6,_0x57c160=a165_0x5e2098['parse'](_0x5c1c16);if(!_0x57c160||typeof _0x57c160!==_0x3a4aa2(0x9a))throw new Error(_0x3a4aa2(0xa2));const _0x2b48be=_0x2d5ba2[_0x3a4aa2(0x94)](_0x57c160);if(!_0x2b48be['success']){const _0x4f3f8c=_0x2b48be[_0x3a4aa2(0x86)]['issues'][0x0],_0x3dc848=formatZodPath(_0x4f3f8c[_0x3a4aa2(0x92)]);throw new Error(_0x3dc848?'YAML\x20validation\x20error\x20at\x20\x27'+_0x3dc848+_0x3a4aa2(0x9b)+_0x4f3f8c['message']:_0x3a4aa2(0x8d)+_0x4f3f8c['message']);}return _0x2b48be[_0x3a4aa2(0xa7)];}export function formatIssueWithContext(_0x1a2fa7,_0x5e8459,_0x5f42fb){const _0x195344=a165_0x52b6,_0x12a44c=[],_0x2106f2=_0x1a2fa7[_0x195344(0x8e)]===_0x195344(0x86),_0x345b82=_0x2106f2?a165_0x1ca5f4[_0x195344(0x85)]:a165_0x1ca5f4['yellow'],_0x2afedc=_0x2106f2?a165_0x1ca5f4['red']:a165_0x1ca5f4[_0x195344(0xaa)],_0x8b131c=_0x5f42fb?a165_0x1ca5f4[_0x195344(0xa9)](_0x5f42fb+':'):'';if(_0x1a2fa7['location']){const _0x5a5142=a165_0x1ca5f4[_0x195344(0xa9)](_0x1a2fa7['location']['line']+':'+_0x1a2fa7[_0x195344(0xa8)]['column']);_0x12a44c[_0x195344(0x9d)](''+_0x8b131c+_0x5a5142+':\x20'+_0x345b82(_0x1a2fa7[_0x195344(0x8e)])+'\x20'+_0x2afedc('['+_0x1a2fa7[_0x195344(0x9e)]+']'));}else _0x12a44c[_0x195344(0x9d)](''+_0x8b131c+a165_0x1ca5f4[_0x195344(0x93)](_0x1a2fa7[_0x195344(0x92)])+':\x20'+_0x345b82(_0x1a2fa7['level'])+'\x20'+_0x2afedc('['+_0x1a2fa7['code']+']'));_0x12a44c[_0x195344(0x9d)](_0x1a2fa7[_0x195344(0xa0)]);if(_0x1a2fa7[_0x195344(0xa8)]&&_0x5e8459){const _0x756af2=_0x5e8459[_0x195344(0x9c)]('\x0a'),{line:_0xea308,column:_0x5d9f87}=_0x1a2fa7['location'],_0xc0a936=Math[_0x195344(0x83)](0x1,_0xea308-0x1),_0x201d7d=Math[_0x195344(0x8f)](_0x756af2['length'],_0xea308+0x1);_0x12a44c[_0x195344(0x9d)]('');for(let _0x5762e0=_0xc0a936;_0x5762e0<=_0x201d7d;_0x5762e0++){const _0x5bd5bc=_0x756af2[_0x5762e0-0x1]||'',_0x36c0ec=a165_0x1ca5f4[_0x195344(0x93)](_0x5762e0['toString']()['padStart'](0x4)),_0x119709=a165_0x1ca5f4[_0x195344(0x93)](_0x195344(0x9f));if(_0x5762e0===_0xea308){_0x12a44c[_0x195344(0x9d)]('\x20\x20'+_0x36c0ec+_0x119709+_0x345b82(_0x5bd5bc));const _0x4fc26a='\x20'[_0x195344(0x96)](0x4+0x3+_0x5d9f87-0x1);_0x12a44c[_0x195344(0x9d)]('\x20\x20'+_0x4fc26a+_0x345b82('^'));}else _0x12a44c[_0x195344(0x9d)]('\x20\x20'+_0x36c0ec+_0x119709+a165_0x1ca5f4[_0x195344(0x93)](_0x5bd5bc));}}return _0x12a44c['join']('\x0a');}export function formatValidationResult(_0x3302ba,_0x4e9d36,_0x4a3cf2){const _0x542ba5=a165_0x52b6,_0x5d3fb9=[];for(const _0x46e188 of _0x3302ba['errors']){_0x5d3fb9[_0x542ba5(0x9d)](formatIssueWithContext(_0x46e188,_0x4e9d36,_0x4a3cf2)),_0x5d3fb9[_0x542ba5(0x9d)]('');}for(const _0x3a47f3 of _0x3302ba[_0x542ba5(0x95)]){_0x5d3fb9['push'](formatIssueWithContext(_0x3a47f3,_0x4e9d36,_0x4a3cf2)),_0x5d3fb9[_0x542ba5(0x9d)]('');}return _0x5d3fb9[_0x542ba5(0x82)]('\x0a');}