@treasuredata/tdx 2026.4.17 → 2026.4.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-pull-command.js +1 -1
  43. package/dist/commands/segment-push-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segment-validate-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/status-command.js +1 -1
  50. package/dist/commands/tables.js +1 -1
  51. package/dist/commands/unset-command.js +1 -1
  52. package/dist/commands/upgrade-command.js +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/user-command.js +1 -1
  55. package/dist/commands/work-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/oauth-keychain.js +1 -1
  66. package/dist/core/oauth.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/core/version.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/mcp/server.js +1 -1
  74. package/dist/mcp/tools/index.js +1 -1
  75. package/dist/mcp/tools/tdx-run.js +1 -1
  76. package/dist/mcp/tools/tdx-search.js +1 -1
  77. package/dist/mcp/tools/work-create-item.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/access-tracker.js +1 -1
  182. package/dist/sdk/workspace/frontmatter.js +1 -1
  183. package/dist/sdk/workspace/git.js +1 -1
  184. package/dist/sdk/workspace/index.js +1 -1
  185. package/dist/sdk/workspace/templates.js +1 -1
  186. package/dist/sdk/workspace/weekly.js +1 -1
  187. package/dist/sdk/workspace/wikilinks.js +1 -1
  188. package/dist/test-utils/command-runner.js +1 -1
  189. package/dist/test-utils/factories.js +1 -1
  190. package/dist/test-utils/fixtures.js +1 -1
  191. package/dist/test-utils/http-mock.js +1 -1
  192. package/dist/test-utils/index.js +1 -1
  193. package/dist/utils/async.js +1 -1
  194. package/dist/utils/colors.js +1 -1
  195. package/dist/utils/diff.js +1 -1
  196. package/dist/utils/file-permissions.js +1 -1
  197. package/dist/utils/file-reader.js +1 -1
  198. package/dist/utils/github-releases.js +1 -1
  199. package/dist/utils/global-cache.js +1 -1
  200. package/dist/utils/json-loader.js +1 -1
  201. package/dist/utils/local-cache.js +1 -1
  202. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  203. package/dist/utils/logger/formatters/index.js +1 -1
  204. package/dist/utils/logger/handlers/console-handler.js +1 -1
  205. package/dist/utils/logger/handlers/file-handler.js +1 -1
  206. package/dist/utils/logger/handlers/index.js +1 -1
  207. package/dist/utils/logger/handlers/null-handler.js +1 -1
  208. package/dist/utils/logger/index.js +1 -1
  209. package/dist/utils/logger/logger.js +1 -1
  210. package/dist/utils/logger/types.js +1 -1
  211. package/dist/utils/option-validation.js +1 -1
  212. package/dist/utils/process.js +1 -1
  213. package/dist/utils/prompt.js +1 -1
  214. package/dist/utils/spinner.js +1 -1
  215. package/dist/utils/sse-parser.js +1 -1
  216. package/dist/utils/string-utils.js +1 -1
  217. package/dist/utils/table-ref-parser.js +1 -1
  218. package/dist/utils/tdx-logger.js +1 -1
  219. package/dist/utils/version-check.js +1 -1
  220. package/package.json +17 -2
@@ -1 +1 @@
1
- (function(_0x37cec8,_0x4f7b76){const _0x50551a=a153_0x5119,_0x1f5fbe=_0x37cec8();while(!![]){try{const _0x1807b7=-parseInt(_0x50551a(0xa7))/0x1+parseInt(_0x50551a(0xad))/0x2*(parseInt(_0x50551a(0xa4))/0x3)+parseInt(_0x50551a(0xa0))/0x4+-parseInt(_0x50551a(0xa6))/0x5+parseInt(_0x50551a(0xaa))/0x6+-parseInt(_0x50551a(0xae))/0x7*(parseInt(_0x50551a(0xac))/0x8)+-parseInt(_0x50551a(0xa2))/0x9;if(_0x1807b7===_0x4f7b76)break;else _0x1f5fbe['push'](_0x1f5fbe['shift']());}catch(_0x21461d){_0x1f5fbe['push'](_0x1f5fbe['shift']());}}}(a153_0x67bd,0xbb720));export function buildFolderIdToPathMap(_0x361281){const _0x1d8f51=a153_0x5119,_0x46123d=new Map(),_0x2e5217=new Map();for(const _0x4868de of _0x361281){_0x2e5217[_0x1d8f51(0xab)](_0x4868de['id'],_0x4868de);}const _0x2d6fb0=new Set();for(const _0x10b870 of _0x361281){!_0x10b870['parentFolderId']&&_0x2d6fb0[_0x1d8f51(0xa5)](_0x10b870['id']);}function _0x5e9cd9(_0x4eda99){const _0x43e881=_0x1d8f51;if(_0x46123d[_0x43e881(0xa9)](_0x4eda99['id']))return _0x46123d['get'](_0x4eda99['id']);if(_0x2d6fb0[_0x43e881(0xa9)](_0x4eda99['id']))return _0x46123d[_0x43e881(0xab)](_0x4eda99['id'],''),'';if(_0x4eda99[_0x43e881(0xa3)]){const _0x1d23f9=_0x2e5217[_0x43e881(0xa1)](_0x4eda99[_0x43e881(0xa3)]);if(_0x1d23f9){const _0x59237e=_0x5e9cd9(_0x1d23f9),_0x1117d5=_0x59237e?_0x59237e+'/'+_0x4eda99[_0x43e881(0xa8)]:_0x4eda99[_0x43e881(0xa8)];return _0x46123d[_0x43e881(0xab)](_0x4eda99['id'],_0x1117d5),_0x1117d5;}}const _0x2f10a4=_0x4eda99[_0x43e881(0xa8)];return _0x46123d[_0x43e881(0xab)](_0x4eda99['id'],_0x2f10a4),_0x2f10a4;}for(const _0x3864dc of _0x361281){_0x5e9cd9(_0x3864dc);}return _0x46123d;}export function buildFolderPathToIdMap(_0x3242b2){const _0x50df0c=a153_0x5119,_0x45409f=new Map(),_0x2f4398=new Map();for(const _0x1c5a84 of _0x3242b2){_0x2f4398['set'](_0x1c5a84['id'],_0x1c5a84);}const _0x15f7d6=new Set();for(const _0x2132f5 of _0x3242b2){!_0x2132f5[_0x50df0c(0xa3)]&&_0x15f7d6[_0x50df0c(0xa5)](_0x2132f5['id']);}function _0x1f0252(_0x6c9965){const _0x416a2a=_0x50df0c;if(_0x15f7d6[_0x416a2a(0xa9)](_0x6c9965['id']))return'';if(_0x6c9965[_0x416a2a(0xa3)]){const _0x291021=_0x2f4398['get'](_0x6c9965['parentFolderId']);if(_0x291021){const _0x221416=_0x1f0252(_0x291021);return _0x221416?_0x221416+'/'+_0x6c9965[_0x416a2a(0xa8)]:_0x6c9965[_0x416a2a(0xa8)];}}return _0x6c9965['name'];}for(const _0x43541f of _0x3242b2){const _0x23c5be=_0x1f0252(_0x43541f);_0x45409f['set'](_0x23c5be,_0x43541f['id']);}return _0x45409f;}export function buildFolderMaps(_0x1b3048){const _0x167592=buildFolderIdToPathMap(_0x1b3048),_0x385c67=new Map();for(const [_0x287857,_0x4a3c72]of _0x167592){_0x385c67['set'](_0x4a3c72,_0x287857);}return{'idToPath':_0x167592,'pathToId':_0x385c67};}function a153_0x67bd(){const _0x3e3b9d=['2289uuKyPp','5121772hzYXri','get','2642085idBBKK','parentFolderId','573OmuXpU','add','5031440SazHLC','1224342IlcXrX','name','has','6726360iqDYkU','set','3032uWLTEx','10622GaCNUV'];a153_0x67bd=function(){return _0x3e3b9d;};return a153_0x67bd();}function a153_0x5119(_0x194399,_0x5ed358){_0x194399=_0x194399-0xa0;const _0x67bd8b=a153_0x67bd();let _0x511904=_0x67bd8b[_0x194399];return _0x511904;}export function getFolderPath(_0x4cf02e,_0x5ae92d){if(!_0x4cf02e)return'';return _0x5ae92d['get'](_0x4cf02e)??'';}
1
+ function a153_0x4b01(_0x352cbd,_0x24c70b){_0x352cbd=_0x352cbd-0x151;const _0x4aa0e8=a153_0x4aa0();let _0x4b0139=_0x4aa0e8[_0x352cbd];return _0x4b0139;}(function(_0x41132,_0x69a0e1){const _0x3ebf6a=a153_0x4b01,_0x339488=_0x41132();while(!![]){try{const _0xaf74e1=parseInt(_0x3ebf6a(0x160))/0x1*(parseInt(_0x3ebf6a(0x153))/0x2)+-parseInt(_0x3ebf6a(0x15a))/0x3*(-parseInt(_0x3ebf6a(0x15e))/0x4)+-parseInt(_0x3ebf6a(0x15f))/0x5*(parseInt(_0x3ebf6a(0x161))/0x6)+-parseInt(_0x3ebf6a(0x154))/0x7*(-parseInt(_0x3ebf6a(0x156))/0x8)+-parseInt(_0x3ebf6a(0x15c))/0x9+parseInt(_0x3ebf6a(0x15d))/0xa*(parseInt(_0x3ebf6a(0x15b))/0xb)+-parseInt(_0x3ebf6a(0x155))/0xc*(parseInt(_0x3ebf6a(0x162))/0xd);if(_0xaf74e1===_0x69a0e1)break;else _0x339488['push'](_0x339488['shift']());}catch(_0x30f756){_0x339488['push'](_0x339488['shift']());}}}(a153_0x4aa0,0xf0cd6));export function buildFolderIdToPathMap(_0x348ee8){const _0x32e558=a153_0x4b01,_0x434eff=new Map(),_0x58baba=new Map();for(const _0x4a75ba of _0x348ee8){_0x58baba[_0x32e558(0x157)](_0x4a75ba['id'],_0x4a75ba);}const _0x2ef00b=new Set();for(const _0x32053d of _0x348ee8){!_0x32053d[_0x32e558(0x163)]&&_0x2ef00b[_0x32e558(0x159)](_0x32053d['id']);}function _0x2cb6c0(_0x666463){const _0x363b3b=_0x32e558;if(_0x434eff[_0x363b3b(0x158)](_0x666463['id']))return _0x434eff['get'](_0x666463['id']);if(_0x2ef00b[_0x363b3b(0x158)](_0x666463['id']))return _0x434eff[_0x363b3b(0x157)](_0x666463['id'],''),'';if(_0x666463[_0x363b3b(0x163)]){const _0x244411=_0x58baba[_0x363b3b(0x152)](_0x666463['parentFolderId']);if(_0x244411){const _0x3954ee=_0x2cb6c0(_0x244411),_0x360d6f=_0x3954ee?_0x3954ee+'/'+_0x666463[_0x363b3b(0x151)]:_0x666463[_0x363b3b(0x151)];return _0x434eff[_0x363b3b(0x157)](_0x666463['id'],_0x360d6f),_0x360d6f;}}const _0x17efe0=_0x666463[_0x363b3b(0x151)];return _0x434eff[_0x363b3b(0x157)](_0x666463['id'],_0x17efe0),_0x17efe0;}for(const _0x498402 of _0x348ee8){_0x2cb6c0(_0x498402);}return _0x434eff;}function a153_0x4aa0(){const _0xa6b7fc=['2814gpOsYG','161004WADCUM','32512MmKvuv','set','has','add','3qsTUvk','11XuiVve','4778370BbtswF','4263920WANqPg','4751392EDzEFu','9494330OPSsTb','697FBIPXP','6tbblmp','143hPgVYo','parentFolderId','name','get','906mfGIoH'];a153_0x4aa0=function(){return _0xa6b7fc;};return a153_0x4aa0();}export function buildFolderPathToIdMap(_0x2ffdb6){const _0x139865=a153_0x4b01,_0x44fffc=new Map(),_0x1583a5=new Map();for(const _0x55a21e of _0x2ffdb6){_0x1583a5['set'](_0x55a21e['id'],_0x55a21e);}const _0x5b2ce7=new Set();for(const _0x41ac3d of _0x2ffdb6){!_0x41ac3d[_0x139865(0x163)]&&_0x5b2ce7[_0x139865(0x159)](_0x41ac3d['id']);}function _0x4823b8(_0x3450fd){const _0x2a87c2=_0x139865;if(_0x5b2ce7[_0x2a87c2(0x158)](_0x3450fd['id']))return'';if(_0x3450fd[_0x2a87c2(0x163)]){const _0x4eaf7a=_0x1583a5[_0x2a87c2(0x152)](_0x3450fd[_0x2a87c2(0x163)]);if(_0x4eaf7a){const _0x2949a5=_0x4823b8(_0x4eaf7a);return _0x2949a5?_0x2949a5+'/'+_0x3450fd[_0x2a87c2(0x151)]:_0x3450fd[_0x2a87c2(0x151)];}}return _0x3450fd['name'];}for(const _0x349d2d of _0x2ffdb6){const _0x1aecdd=_0x4823b8(_0x349d2d);_0x44fffc[_0x139865(0x157)](_0x1aecdd,_0x349d2d['id']);}return _0x44fffc;}export function buildFolderMaps(_0x274869){const _0x3efb7f=a153_0x4b01,_0x2cf99b=buildFolderIdToPathMap(_0x274869),_0xf760eb=new Map();for(const [_0xe5db2,_0x5ce2a8]of _0x2cf99b){_0xf760eb[_0x3efb7f(0x157)](_0x5ce2a8,_0xe5db2);}return{'idToPath':_0x2cf99b,'pathToId':_0xf760eb};}export function getFolderPath(_0xe8cf0b,_0x267424){const _0x3731ea=a153_0x4b01;if(!_0xe8cf0b)return'';return _0x267424[_0x3731ea(0x152)](_0xe8cf0b)??'';}
@@ -1 +1 @@
1
- (function(_0x1d83d7,_0x30b736){const _0x23fedc=a154_0x9b52,_0x41e407=_0x1d83d7();while(!![]){try{const _0x3ac8ca=-parseInt(_0x23fedc(0x15b))/0x1*(-parseInt(_0x23fedc(0x166))/0x2)+-parseInt(_0x23fedc(0x157))/0x3*(parseInt(_0x23fedc(0x14f))/0x4)+parseInt(_0x23fedc(0x159))/0x5*(parseInt(_0x23fedc(0x151))/0x6)+parseInt(_0x23fedc(0x16a))/0x7+parseInt(_0x23fedc(0x156))/0x8*(-parseInt(_0x23fedc(0x169))/0x9)+-parseInt(_0x23fedc(0x15e))/0xa+-parseInt(_0x23fedc(0x178))/0xb;if(_0x3ac8ca===_0x30b736)break;else _0x41e407['push'](_0x41e407['shift']());}catch(_0x567a53){_0x41e407['push'](_0x41e407['shift']());}}}(a154_0x3201,0x6b463));import a154_0x2ba3c3 from'path';import{parse as a154_0x205c1b}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0x4f7e88){const _0x437485=a154_0x9b52;if(!_0x4f7e88||_0x4f7e88['trim']()==='')throw new Error(_0x437485(0x172));const _0x3a3df3=_0x4f7e88[_0x437485(0x16f)]();if(_0x3a3df3==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x4f7e88};const _0x674a4c=_0x3a3df3[_0x437485(0x14c)]('/')?_0x3a3df3['substring'](0x1):_0x3a3df3,_0x5ceeeb=_0x674a4c[_0x437485(0x167)]('/')[_0x437485(0x154)](_0x4e4670=>_0x4e4670!=='');if(_0x5ceeeb[_0x437485(0x164)]===0x0)throw new Error('Path\x20must\x20contain\x20at\x20least\x20one\x20segment');const _0x577876=_0x3a3df3[_0x437485(0x14c)]('/')||!isRelativePathSegment(_0x5ceeeb[0x0]);for(const _0x1c05a2 of _0x5ceeeb){validatePathSegment(_0x1c05a2);}return{'segments':_0x5ceeeb,'isAbsolute':_0x577876,'raw':_0x4f7e88};}function isRelativePathSegment(_0x49c5d3){return _0x49c5d3==='.'||_0x49c5d3==='..';}function validatePathSegment(_0xd0b4fc){const _0x3100a9=a154_0x9b52;if(_0xd0b4fc==='')throw new Error('Path\x20segment\x20cannot\x20be\x20empty');if(_0xd0b4fc==='.'||_0xd0b4fc==='..')return;if(/[\x00-\x1F\x7F]/[_0x3100a9(0x168)](_0xd0b4fc))throw new Error(_0x3100a9(0x174)+_0xd0b4fc);if(_0xd0b4fc!==_0xd0b4fc[_0x3100a9(0x16f)]()){}}export function validatePath(_0x4cfc57){const _0x5ec7bb=a154_0x9b52;if(_0x4cfc57[_0x5ec7bb(0x175)]['length']===0x0&&!_0x4cfc57[_0x5ec7bb(0x153)])throw new Error(_0x5ec7bb(0x177));if(_0x4cfc57[_0x5ec7bb(0x153)]){if(_0x4cfc57[_0x5ec7bb(0x175)][0x0]==='..')throw new Error(_0x5ec7bb(0x179));let _0x9fd2a9=0x0;for(const _0x1bd11b of _0x4cfc57[_0x5ec7bb(0x175)]){if(_0x1bd11b==='..'){if(_0x9fd2a9===0x0)throw new Error('Path\x20attempts\x20to\x20navigate\x20above\x20root');_0x9fd2a9--;}else _0x1bd11b!=='.'&&_0x9fd2a9++;}}}export function joinPaths(_0x124706,_0x20b1bf){const _0x4b61a4=a154_0x9b52;if(!_0x124706||_0x124706==='/')return _0x20b1bf;if(!_0x20b1bf||_0x20b1bf==='.')return _0x124706;if(_0x20b1bf['startsWith']('/'))return _0x20b1bf;const _0xd2b73f=parsePath(_0x124706),_0xbc8dfa=parsePath(_0x20b1bf),_0x823be9=[..._0xd2b73f[_0x4b61a4(0x175)]];for(const _0x3ef57 of _0xbc8dfa[_0x4b61a4(0x175)]){if(_0x3ef57==='.')continue;else{if(_0x3ef57==='..'){if(_0x823be9[_0x4b61a4(0x164)]===0x0)throw new Error(_0x4b61a4(0x155));_0x823be9[_0x4b61a4(0x15c)]();}else _0x823be9[_0x4b61a4(0x176)](_0x3ef57);}}const _0x115c68=_0x823be9[_0x4b61a4(0x16b)]('/');return _0xd2b73f[_0x4b61a4(0x171)]['startsWith']('/')?'/'+_0x115c68:_0x115c68;}export function normalizePath(_0x4e18d3){const _0x3c11d7=a154_0x9b52,_0x3c8bd9=parsePath(_0x4e18d3),_0x1dd760=[];for(const _0x459dfa of _0x3c8bd9[_0x3c11d7(0x175)]){if(_0x459dfa==='.')continue;else{if(_0x459dfa==='..'){if(_0x1dd760['length']===0x0){if(_0x3c8bd9[_0x3c11d7(0x153)])throw new Error(_0x3c11d7(0x155));_0x1dd760[_0x3c11d7(0x176)]('..');}else _0x1dd760[_0x1dd760[_0x3c11d7(0x164)]-0x1]==='..'?_0x1dd760[_0x3c11d7(0x176)]('..'):_0x1dd760[_0x3c11d7(0x15c)]();}else _0x1dd760[_0x3c11d7(0x176)](_0x459dfa);}}if(_0x1dd760[_0x3c11d7(0x164)]===0x0)return _0x3c8bd9[_0x3c11d7(0x153)]?'/':'.';const _0x37c4b4=_0x1dd760[_0x3c11d7(0x16b)]('/');return _0x3c8bd9[_0x3c11d7(0x171)][_0x3c11d7(0x14c)]('/')?'/'+_0x37c4b4:_0x37c4b4;}export function getParentPath(_0x3793c7){const _0x1856c6=a154_0x9b52,_0x7e8453=parsePath(_0x3793c7);if(_0x7e8453[_0x1856c6(0x175)]['length']<=0x1)return'/';const _0x520351=_0x7e8453[_0x1856c6(0x175)][_0x1856c6(0x163)](0x0,-0x1)['join']('/');return _0x7e8453[_0x1856c6(0x171)]['startsWith']('/')?'/'+_0x520351:_0x520351;}export function getBaseName(_0x217d55){const _0x54a9a0=a154_0x9b52,_0x38d53e=parsePath(_0x217d55);return _0x38d53e[_0x54a9a0(0x175)][_0x38d53e[_0x54a9a0(0x175)][_0x54a9a0(0x164)]-0x1]||'';}export function isChildPath(_0x1c0f32,_0x2c8bb1){const _0x547be7=a154_0x9b52,_0x1227cd=parsePath(_0x1c0f32),_0xa2aff6=parsePath(_0x2c8bb1);if(_0x1227cd[_0x547be7(0x175)][_0x547be7(0x164)]<=_0xa2aff6[_0x547be7(0x175)][_0x547be7(0x164)])return![];for(let _0x4fc108=0x0;_0x4fc108<_0xa2aff6[_0x547be7(0x175)][_0x547be7(0x164)];_0x4fc108++){if(_0x1227cd[_0x547be7(0x175)][_0x4fc108]!==_0xa2aff6[_0x547be7(0x175)][_0x4fc108])return![];}return!![];}function a154_0x9b52(_0x187d94,_0x53d0b1){_0x187d94=_0x187d94-0x14c;const _0x320174=a154_0x3201();let _0x9b526=_0x320174[_0x187d94];return _0x9b526;}export function splitPath(_0x4d6301){const _0x5240ea=a154_0x9b52,_0x2f4b6b=parsePath(_0x4d6301);if(_0x2f4b6b[_0x5240ea(0x175)]['length']===0x0)throw new Error(_0x5240ea(0x16e));if(_0x2f4b6b[_0x5240ea(0x175)][_0x5240ea(0x164)]===0x1)return{'parent':_0x2f4b6b[_0x5240ea(0x175)][0x0]};return{'parent':_0x2f4b6b[_0x5240ea(0x175)][0x0],'child':_0x2f4b6b['segments'][_0x5240ea(0x163)](0x1)[_0x5240ea(0x16b)]('/')};}export function isYamlFilePath(_0x4fdf73){const _0x43ec75=a154_0x9b52;return _0x4fdf73[_0x43ec75(0x158)](_0x43ec75(0x170))||_0x4fdf73[_0x43ec75(0x158)](_0x43ec75(0x17a));}function a154_0x3201(){const _0x5003db=['6wnPoIC','split','test','199962XTyFMV','4479559gQGRIn','join','journey','Hint:\x20Run\x20`tdx\x20sg\x20pull\x20\x22Parent\x20Segment\x20Name\x22`\x20first\x20to\x20create\x20a\x20project\x20directory,\x20then\x20work\x20within\x20that\x20directory.','Cannot\x20split\x20empty\x20path','trim','.yml','raw','Path\x20cannot\x20be\x20empty','segment','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','segments','push','Relative\x20path\x20cannot\x20be\x20empty','7459452jyWAyd','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','.yaml','type','startsWith','exists','relative','16opMZNL','readFile','4837062OqyhGE','File\x20not\x20found:\x20','isAbsolute','filter','Cannot\x20navigate\x20above\x20root','24EfznUl','292761VcoGzy','endsWith','5xxEEMo','resolve','282875dZUvxS','pop','No\x20tdx.json\x20found\x20for\x20file:\x20','7202100LmYybX','parent_segment','name','parse','root','slice','length','dirname'];a154_0x3201=function(){return _0x5003db;};return a154_0x3201();}export async function resolveYamlFilePath(_0x3f07b3,_0x11b167=nodeFileSystem){const _0x16e312=a154_0x9b52,_0x2840f6=a154_0x2ba3c3[_0x16e312(0x15a)](_0x3f07b3);if(!await _0x11b167[_0x16e312(0x14d)](_0x2840f6))throw new Error(_0x16e312(0x152)+_0x3f07b3);let _0x12c2b7=a154_0x2ba3c3['dirname'](_0x2840f6),_0x4645f8=null,_0x4f1e4a=null;const _0x2d8e5c=a154_0x2ba3c3[_0x16e312(0x161)](_0x12c2b7)[_0x16e312(0x162)];while(_0x12c2b7!==_0x2d8e5c){const _0x2fdad6=a154_0x2ba3c3[_0x16e312(0x16b)](_0x12c2b7,'tdx.json');if(await _0x11b167[_0x16e312(0x14d)](_0x2fdad6)){_0x4645f8=_0x2fdad6,_0x4f1e4a=_0x12c2b7;break;}_0x12c2b7=a154_0x2ba3c3['dirname'](_0x12c2b7);}if(!_0x4645f8||!_0x4f1e4a)throw new Error(_0x16e312(0x15d)+_0x3f07b3+'\x0a'+_0x16e312(0x16d));const _0x2cb178=await _0x11b167[_0x16e312(0x150)](_0x4645f8),_0x3f49d8=JSON['parse'](_0x2cb178),_0x99ef95=_0x3f49d8[_0x16e312(0x15f)];if(!_0x99ef95)throw new Error('Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field');const _0x4bf02a=await _0x11b167[_0x16e312(0x150)](_0x2840f6),_0x4d7bed=a154_0x205c1b(_0x4bf02a),_0x4de7de=_0x4d7bed[_0x16e312(0x160)];if(!_0x4de7de)throw new Error('Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20'+_0x3f07b3);const _0x1bd320=_0x4d7bed[_0x16e312(0x17b)]===_0x16e312(0x16c)?_0x16e312(0x16c):_0x16e312(0x173),_0x1aeeed=a154_0x2ba3c3[_0x16e312(0x14e)](_0x4f1e4a,_0x2840f6),_0x21016b=a154_0x2ba3c3[_0x16e312(0x165)](_0x1aeeed),_0x238d57=_0x21016b==='.'?'':_0x21016b['replace'](/\\/g,'/'),_0x45e796=_0x238d57?_0x99ef95+'/'+_0x238d57+'/'+_0x4de7de:_0x99ef95+'/'+_0x4de7de;return{'parentSegment':_0x99ef95,'segmentName':_0x4de7de,'folderPath':_0x238d57,'fullPath':_0x45e796,'resourceType':_0x1bd320,'content':_0x4bf02a};}
1
+ (function(_0x25fd7e,_0x18ed25){const _0x3eb242=a154_0x5b6b,_0xba7662=_0x25fd7e();while(!![]){try{const _0x4d340c=-parseInt(_0x3eb242(0x1bf))/0x1*(-parseInt(_0x3eb242(0x1c6))/0x2)+parseInt(_0x3eb242(0x1d9))/0x3*(parseInt(_0x3eb242(0x1cb))/0x4)+parseInt(_0x3eb242(0x1d3))/0x5*(parseInt(_0x3eb242(0x1b6))/0x6)+-parseInt(_0x3eb242(0x1c9))/0x7*(-parseInt(_0x3eb242(0x1bc))/0x8)+-parseInt(_0x3eb242(0x1d6))/0x9+parseInt(_0x3eb242(0x1bb))/0xa+parseInt(_0x3eb242(0x1cc))/0xb*(-parseInt(_0x3eb242(0x1d4))/0xc);if(_0x4d340c===_0x18ed25)break;else _0xba7662['push'](_0xba7662['shift']());}catch(_0x43fdcf){_0xba7662['push'](_0xba7662['shift']());}}}(a154_0x4b55,0x2d062));import a154_0x500fad from'path';import{parse as a154_0x5b9147}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0xd532a1){const _0x514808=a154_0x5b6b;if(!_0xd532a1||_0xd532a1['trim']()==='')throw new Error('Path\x20cannot\x20be\x20empty');const _0x11180c=_0xd532a1[_0x514808(0x1ca)]();if(_0x11180c==='/')return{'segments':[],'isAbsolute':!![],'raw':_0xd532a1};const _0x4069af=_0x11180c[_0x514808(0x1db)]('/')?_0x11180c[_0x514808(0x1be)](0x1):_0x11180c,_0x23870b=_0x4069af[_0x514808(0x1b0)]('/')['filter'](_0x30f192=>_0x30f192!=='');if(_0x23870b[_0x514808(0x1d7)]===0x0)throw new Error('Path\x20must\x20contain\x20at\x20least\x20one\x20segment');const _0x10e853=_0x11180c[_0x514808(0x1db)]('/')||!isRelativePathSegment(_0x23870b[0x0]);for(const _0xd23168 of _0x23870b){validatePathSegment(_0xd23168);}return{'segments':_0x23870b,'isAbsolute':_0x10e853,'raw':_0xd532a1};}function isRelativePathSegment(_0x215fb2){return _0x215fb2==='.'||_0x215fb2==='..';}function validatePathSegment(_0x87a927){const _0x4ef627=a154_0x5b6b;if(_0x87a927==='')throw new Error(_0x4ef627(0x1cd));if(_0x87a927==='.'||_0x87a927==='..')return;if(/[\x00-\x1F\x7F]/[_0x4ef627(0x1ae)](_0x87a927))throw new Error(_0x4ef627(0x1c0)+_0x87a927);if(_0x87a927!==_0x87a927[_0x4ef627(0x1ca)]()){}}export function validatePath(_0x455bb9){const _0x51e644=a154_0x5b6b;if(_0x455bb9['segments']['length']===0x0&&!_0x455bb9[_0x51e644(0x1c7)])throw new Error(_0x51e644(0x1ba));if(_0x455bb9[_0x51e644(0x1c7)]){if(_0x455bb9[_0x51e644(0x1ce)][0x0]==='..')throw new Error(_0x51e644(0x1bd));let _0x565a79=0x0;for(const _0x100b86 of _0x455bb9[_0x51e644(0x1ce)]){if(_0x100b86==='..'){if(_0x565a79===0x0)throw new Error(_0x51e644(0x1c4));_0x565a79--;}else _0x100b86!=='.'&&_0x565a79++;}}}export function joinPaths(_0x39524b,_0x41d38c){const _0x4f40db=a154_0x5b6b;if(!_0x39524b||_0x39524b==='/')return _0x41d38c;if(!_0x41d38c||_0x41d38c==='.')return _0x39524b;if(_0x41d38c[_0x4f40db(0x1db)]('/'))return _0x41d38c;const _0x164f65=parsePath(_0x39524b),_0xcef18d=parsePath(_0x41d38c),_0xd2c2e9=[..._0x164f65['segments']];for(const _0x4b353c of _0xcef18d['segments']){if(_0x4b353c==='.')continue;else{if(_0x4b353c==='..'){if(_0xd2c2e9[_0x4f40db(0x1d7)]===0x0)throw new Error(_0x4f40db(0x1d5));_0xd2c2e9[_0x4f40db(0x1da)]();}else _0xd2c2e9[_0x4f40db(0x1c3)](_0x4b353c);}}const _0x2ecb2a=_0xd2c2e9[_0x4f40db(0x1b8)]('/');return _0x164f65[_0x4f40db(0x1cf)][_0x4f40db(0x1db)]('/')?'/'+_0x2ecb2a:_0x2ecb2a;}export function normalizePath(_0x1aee34){const _0x4246b3=a154_0x5b6b,_0x3b3e17=parsePath(_0x1aee34),_0x49469c=[];for(const _0x5c1684 of _0x3b3e17['segments']){if(_0x5c1684==='.')continue;else{if(_0x5c1684==='..'){if(_0x49469c['length']===0x0){if(_0x3b3e17[_0x4246b3(0x1c7)])throw new Error(_0x4246b3(0x1d5));_0x49469c['push']('..');}else _0x49469c[_0x49469c[_0x4246b3(0x1d7)]-0x1]==='..'?_0x49469c[_0x4246b3(0x1c3)]('..'):_0x49469c[_0x4246b3(0x1da)]();}else _0x49469c[_0x4246b3(0x1c3)](_0x5c1684);}}if(_0x49469c[_0x4246b3(0x1d7)]===0x0)return _0x3b3e17['isAbsolute']?'/':'.';const _0x26b5d4=_0x49469c[_0x4246b3(0x1b8)]('/');return _0x3b3e17[_0x4246b3(0x1cf)][_0x4246b3(0x1db)]('/')?'/'+_0x26b5d4:_0x26b5d4;}export function getParentPath(_0x3680ed){const _0x3c5029=a154_0x5b6b,_0x27e50c=parsePath(_0x3680ed);if(_0x27e50c['segments']['length']<=0x1)return'/';const _0xa968b3=_0x27e50c[_0x3c5029(0x1ce)][_0x3c5029(0x1b1)](0x0,-0x1)['join']('/');return _0x27e50c[_0x3c5029(0x1cf)][_0x3c5029(0x1db)]('/')?'/'+_0xa968b3:_0xa968b3;}function a154_0x4b55(){const _0x3038bc=['name','Relative\x20path\x20cannot\x20be\x20empty','781870wnXBun','1744kEYEmD','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','substring','9SoKHlG','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','tdx.json','parse','push','Path\x20attempts\x20to\x20navigate\x20above\x20root','endsWith','8522rSSFQz','isAbsolute','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','4221cAZBEs','trim','1247012OXbnZE','11KJdgCF','Path\x20segment\x20cannot\x20be\x20empty','segments','raw','replace','journey','exists','15mSRWKh','5448372fpdUgZ','Cannot\x20navigate\x20above\x20root','37359qYaPZZ','length','readFile','3lqDGmd','pop','startsWith','relative','test','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','split','slice','No\x20tdx.json\x20found\x20for\x20file:\x20','dirname','.yml','.yaml','165714bqlCnB','parent_segment','join'];a154_0x4b55=function(){return _0x3038bc;};return a154_0x4b55();}export function getBaseName(_0xffed53){const _0x11a99c=a154_0x5b6b,_0x3e23d1=parsePath(_0xffed53);return _0x3e23d1[_0x11a99c(0x1ce)][_0x3e23d1[_0x11a99c(0x1ce)]['length']-0x1]||'';}function a154_0x5b6b(_0x547a6e,_0x16317e){_0x547a6e=_0x547a6e-0x1ae;const _0x4b5577=a154_0x4b55();let _0x5b6b79=_0x4b5577[_0x547a6e];return _0x5b6b79;}export function isChildPath(_0x3c0834,_0x1c9fca){const _0x259d23=a154_0x5b6b,_0x5383cc=parsePath(_0x3c0834),_0x2abd69=parsePath(_0x1c9fca);if(_0x5383cc['segments'][_0x259d23(0x1d7)]<=_0x2abd69[_0x259d23(0x1ce)][_0x259d23(0x1d7)])return![];for(let _0xa732d5=0x0;_0xa732d5<_0x2abd69[_0x259d23(0x1ce)][_0x259d23(0x1d7)];_0xa732d5++){if(_0x5383cc[_0x259d23(0x1ce)][_0xa732d5]!==_0x2abd69['segments'][_0xa732d5])return![];}return!![];}export function splitPath(_0x1d3ebe){const _0xd4b8bf=a154_0x5b6b,_0x2ca187=parsePath(_0x1d3ebe);if(_0x2ca187['segments'][_0xd4b8bf(0x1d7)]===0x0)throw new Error('Cannot\x20split\x20empty\x20path');if(_0x2ca187[_0xd4b8bf(0x1ce)][_0xd4b8bf(0x1d7)]===0x1)return{'parent':_0x2ca187[_0xd4b8bf(0x1ce)][0x0]};return{'parent':_0x2ca187['segments'][0x0],'child':_0x2ca187[_0xd4b8bf(0x1ce)][_0xd4b8bf(0x1b1)](0x1)[_0xd4b8bf(0x1b8)]('/')};}export function isYamlFilePath(_0x39ac39){const _0xa59700=a154_0x5b6b;return _0x39ac39[_0xa59700(0x1c5)](_0xa59700(0x1b4))||_0x39ac39[_0xa59700(0x1c5)](_0xa59700(0x1b5));}export async function resolveYamlFilePath(_0x5ea606,_0x1f829c=nodeFileSystem){const _0x330dda=a154_0x5b6b,_0x48c01b=a154_0x500fad['resolve'](_0x5ea606);if(!await _0x1f829c[_0x330dda(0x1d2)](_0x48c01b))throw new Error('File\x20not\x20found:\x20'+_0x5ea606);let _0x3c2751=a154_0x500fad[_0x330dda(0x1b3)](_0x48c01b),_0x452937=null,_0x2a4a2c=null;const _0x29f0ba=a154_0x500fad[_0x330dda(0x1c2)](_0x3c2751)['root'];while(_0x3c2751!==_0x29f0ba){const _0x208894=a154_0x500fad['join'](_0x3c2751,_0x330dda(0x1c1));if(await _0x1f829c[_0x330dda(0x1d2)](_0x208894)){_0x452937=_0x208894,_0x2a4a2c=_0x3c2751;break;}_0x3c2751=a154_0x500fad[_0x330dda(0x1b3)](_0x3c2751);}if(!_0x452937||!_0x2a4a2c)throw new Error(_0x330dda(0x1b2)+_0x5ea606+'\x0a'+'Hint:\x20Run\x20`tdx\x20sg\x20pull\x20\x22Parent\x20Segment\x20Name\x22`\x20first\x20to\x20create\x20a\x20project\x20directory,\x20then\x20work\x20within\x20that\x20directory.');const _0x2b5153=await _0x1f829c[_0x330dda(0x1d8)](_0x452937),_0x467032=JSON[_0x330dda(0x1c2)](_0x2b5153),_0x53c824=_0x467032[_0x330dda(0x1b7)];if(!_0x53c824)throw new Error(_0x330dda(0x1af));const _0x56ad54=await _0x1f829c[_0x330dda(0x1d8)](_0x48c01b),_0x439cfb=a154_0x5b9147(_0x56ad54),_0x38ac33=_0x439cfb[_0x330dda(0x1b9)];if(!_0x38ac33)throw new Error(_0x330dda(0x1c8)+_0x5ea606);const _0x14fcb7=_0x439cfb['type']===_0x330dda(0x1d1)?_0x330dda(0x1d1):'segment',_0x8607d1=a154_0x500fad[_0x330dda(0x1dc)](_0x2a4a2c,_0x48c01b),_0x114241=a154_0x500fad[_0x330dda(0x1b3)](_0x8607d1),_0x469072=_0x114241==='.'?'':_0x114241[_0x330dda(0x1d0)](/\\/g,'/'),_0x4335da=_0x469072?_0x53c824+'/'+_0x469072+'/'+_0x38ac33:_0x53c824+'/'+_0x38ac33;return{'parentSegment':_0x53c824,'segmentName':_0x38ac33,'folderPath':_0x469072,'fullPath':_0x4335da,'resourceType':_0x14fcb7,'content':_0x56ad54};}
@@ -1 +1 @@
1
- (function(_0x55286e,_0x456df5){const _0x47094f=a155_0x46f2,_0x580afb=_0x55286e();while(!![]){try{const _0x227103=parseInt(_0x47094f(0x1e3))/0x1+parseInt(_0x47094f(0x1e6))/0x2+-parseInt(_0x47094f(0x1ea))/0x3+parseInt(_0x47094f(0x1e7))/0x4+parseInt(_0x47094f(0x1ed))/0x5+parseInt(_0x47094f(0x1e9))/0x6+parseInt(_0x47094f(0x1eb))/0x7*(-parseInt(_0x47094f(0x1ec))/0x8);if(_0x227103===_0x456df5)break;else _0x580afb['push'](_0x580afb['shift']());}catch(_0x4ae422){_0x580afb['push'](_0x580afb['shift']());}}}(a155_0x26eb,0x892e4));export function parseSegmentRef(_0x4b37cd){const _0x304a54=a155_0x46f2,_0x5644f4=_0x4b37cd[_0x304a54(0x1e8)]('/');if(_0x5644f4===-0x1)return{'parentId':_0x4b37cd};if(_0x5644f4===0x0)throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x4b37cd+'.\x20Parent\x20name\x20cannot\x20be\x20empty');const _0xec35df=_0x4b37cd['substring'](0x0,_0x5644f4),_0x5c6b50=_0x4b37cd[_0x304a54(0x1ee)](_0x5644f4+0x1);if(_0x5c6b50==='')throw new Error(_0x304a54(0x1e4)+_0x4b37cd+_0x304a54(0x1e5));return{'parentId':_0xec35df,'childId':_0x5c6b50};}function a155_0x46f2(_0xac936e,_0x2f1b8c){_0xac936e=_0xac936e-0x1e3;const _0x26eb01=a155_0x26eb();let _0x46f233=_0x26eb01[_0xac936e];return _0x46f233;}function a155_0x26eb(){const _0x1c0e59=['2855934sEEPpb','1488435yeYrmg','3314052HuJAUR','40nlSKBV','3726685kHXFtI','substring','1119631HSjwKh','Invalid\x20segment\x20reference\x20format:\x20','.\x20Child\x20name\x20cannot\x20be\x20empty','1442530uTQLdS','1451980bXKjbW','indexOf'];a155_0x26eb=function(){return _0x1c0e59;};return a155_0x26eb();}
1
+ function a155_0x7cd6(){const _0x4475cd=['136jcxsZG','146859MsTjme','indexOf','Invalid\x20segment\x20reference\x20format:\x20','109730vFsrjb','.\x20Child\x20name\x20cannot\x20be\x20empty','869832vCmIjd','9170056qLZCBv','36qhZqAD','.\x20Parent\x20name\x20cannot\x20be\x20empty','294480aZJVOs','70lqzULL','substring','26597461gKhWdt','459184NaUhUZ','10MsDgmO'];a155_0x7cd6=function(){return _0x4475cd;};return a155_0x7cd6();}function a155_0x5ace(_0x99c1fe,_0x2e92f1){_0x99c1fe=_0x99c1fe-0x168;const _0x7cd64d=a155_0x7cd6();let _0x5ace81=_0x7cd64d[_0x99c1fe];return _0x5ace81;}(function(_0x1e0c29,_0x33384f){const _0x5ecc84=a155_0x5ace,_0x328f48=_0x1e0c29();while(!![]){try{const _0x3d7f1e=parseInt(_0x5ecc84(0x177))/0x1+-parseInt(_0x5ecc84(0x171))/0x2*(-parseInt(_0x5ecc84(0x16a))/0x3)+-parseInt(_0x5ecc84(0x169))/0x4*(parseInt(_0x5ecc84(0x16d))/0x5)+-parseInt(_0x5ecc84(0x16f))/0x6*(-parseInt(_0x5ecc84(0x174))/0x7)+parseInt(_0x5ecc84(0x170))/0x8+-parseInt(_0x5ecc84(0x173))/0x9+parseInt(_0x5ecc84(0x168))/0xa*(-parseInt(_0x5ecc84(0x176))/0xb);if(_0x3d7f1e===_0x33384f)break;else _0x328f48['push'](_0x328f48['shift']());}catch(_0x1166cd){_0x328f48['push'](_0x328f48['shift']());}}}(a155_0x7cd6,0xb4898));export function parseSegmentRef(_0x3855ae){const _0x1b1c77=a155_0x5ace,_0x25483c=_0x3855ae[_0x1b1c77(0x16b)]('/');if(_0x25483c===-0x1)return{'parentId':_0x3855ae};if(_0x25483c===0x0)throw new Error(_0x1b1c77(0x16c)+_0x3855ae+_0x1b1c77(0x172));const _0x8dc2e7=_0x3855ae[_0x1b1c77(0x175)](0x0,_0x25483c),_0x1a5d77=_0x3855ae[_0x1b1c77(0x175)](_0x25483c+0x1);if(_0x1a5d77==='')throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x3855ae+_0x1b1c77(0x16e));return{'parentId':_0x8dc2e7,'childId':_0x1a5d77};}
@@ -1 +1 @@
1
- (function(_0x14e050,_0x177419){const _0x5f2a46=a156_0x287a,_0x21fa1f=_0x14e050();while(!![]){try{const _0xf469a9=parseInt(_0x5f2a46(0x152))/0x1*(-parseInt(_0x5f2a46(0x116))/0x2)+parseInt(_0x5f2a46(0x11c))/0x3*(parseInt(_0x5f2a46(0x141))/0x4)+-parseInt(_0x5f2a46(0x136))/0x5*(parseInt(_0x5f2a46(0x11d))/0x6)+parseInt(_0x5f2a46(0x151))/0x7*(-parseInt(_0x5f2a46(0x112))/0x8)+parseInt(_0x5f2a46(0x111))/0x9*(-parseInt(_0x5f2a46(0x139))/0xa)+parseInt(_0x5f2a46(0x15b))/0xb+parseInt(_0x5f2a46(0x114))/0xc*(parseInt(_0x5f2a46(0x145))/0xd);if(_0xf469a9===_0x177419)break;else _0x21fa1f['push'](_0x21fa1f['shift']());}catch(_0x1ee353){_0x21fa1f['push'](_0x21fa1f['shift']());}}}(a156_0x3aeb,0x466a3));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';function a156_0x287a(_0x1ff60c,_0x3168ac){_0x1ff60c=_0x1ff60c-0x110;const _0x3aebce=a156_0x3aeb();let _0x287aeb=_0x3aebce[_0x1ff60c];return _0x287aeb;}export function validateSegmentDef(_0x5bca80,_0x12a083={},_0x2615bf={}){const _0x31836f=a156_0x287a;if(_0x2615bf[_0x31836f(0x14e)])return runSemanticChecks(_0x5bca80,_0x12a083);const _0x1a3879=SegmentDefSchema[_0x31836f(0x13c)](_0x5bca80);if(_0x1a3879[_0x31836f(0x150)])return runSemanticChecks(_0x1a3879['data'],_0x12a083);return zodErrorsToValidationResult(_0x1a3879['error'],_0x12a083);}export function validateRuleDef(_0x202999,_0x523813,_0x49be3e){const _0x73d37f=a156_0x287a;if(!_0x202999)return[];const _0x23e24e=RuleDefSchema[_0x73d37f(0x13c)](_0x202999);if(_0x23e24e[_0x73d37f(0x150)])return checkRule(_0x23e24e['data'],_0x523813,_0x49be3e);const _0x52533=flattenZodIssues(_0x23e24e[_0x73d37f(0x143)][_0x73d37f(0x158)]);return _0x52533[_0x73d37f(0x120)](_0x4016cf=>{const _0x1bbac8=_0x73d37f,_0x19f394=formatZodPath(_0x4016cf['path']),_0x5251cf=_0x19f394?_0x523813+'.'+_0x19f394:_0x523813,_0x21ec7e=mapZodIssueToCode(_0x4016cf,_0x19f394),_0x35bf8d=getLocationFromPath(_0x49be3e[_0x1bbac8(0x119)],_0x49be3e[_0x1bbac8(0x11a)],pathToArray(_0x5251cf));return{'level':_0x1bbac8(0x143),'path':_0x5251cf,'code':_0x21ec7e,'message':_0x4016cf['message'],..._0x35bf8d&&{'location':_0x35bf8d}};});}function zodErrorsToValidationResult(_0x1a1981,_0x7f4e41){const _0x4572d0=a156_0x287a,_0x27ab5f=flattenZodIssues(_0x1a1981[_0x4572d0(0x158)]),_0xbfde2e=_0x27ab5f[_0x4572d0(0x120)](_0x27102b=>{const _0x15fc9f=_0x4572d0,_0xd63b2e=formatZodPath(_0x27102b[_0x15fc9f(0x125)]),_0x40618d=mapZodIssueToCode(_0x27102b,_0xd63b2e),_0x517a6f=getLocationFromPath(_0x7f4e41['document'],_0x7f4e41['source'],_0x27102b[_0x15fc9f(0x125)][_0x15fc9f(0x120)](_0x32d315=>typeof _0x32d315===_0x15fc9f(0x12e)?String(_0x32d315):_0x32d315));return{'level':_0x15fc9f(0x143),'path':_0xd63b2e,'code':_0x40618d,'message':_0x27102b[_0x15fc9f(0x126)],..._0x517a6f&&{'location':_0x517a6f}};});return{'valid':![],'errors':_0xbfde2e,'warnings':[]};}function mapZodIssueToCode(_0x58d004,_0x4d0fd2){const _0x23c382=a156_0x287a,_0x5d425b=_0x58d004['code']===_0x23c382(0x127)?_0x58d004[_0x23c382(0x110)]:undefined;if(_0x4d0fd2===_0x23c382(0x157))return _0x23c382(0x147);if(_0x4d0fd2==='rule.type'||_0x4d0fd2['endsWith']('.type')){if(_0x58d004['code']===_0x23c382(0x142)){if(_0x4d0fd2===_0x23c382(0x149)||_0x4d0fd2[_0x23c382(0x129)](/\.conditions\[\d+\]\.type$/))return _0x23c382(0x133);}}if(_0x4d0fd2[_0x23c382(0x14a)]('.operator.type'))return _0x23c382(0x137);if(_0x4d0fd2[_0x23c382(0x14a)](_0x23c382(0x124)))return _0x23c382(0x140);if(_0x5d425b?.[_0x23c382(0x128)]===_0x23c382(0x148))return _0x23c382(0x148);if(_0x5d425b?.['validationCode']===_0x23c382(0x12f))return _0x23c382(0x12f);if(_0x4d0fd2[_0x23c382(0x14a)](_0x23c382(0x146))||_0x4d0fd2==='conditions')return _0x23c382(0x135);if(_0x4d0fd2['includes'](_0x23c382(0x154)))return _0x23c382(0x117);if(_0x4d0fd2[_0x23c382(0x14a)](_0x23c382(0x11f)))return _0x23c382(0x134);return _0x23c382(0x12b);}function runSemanticChecks(_0x230df1,_0x3b1134){const _0x499dab=a156_0x287a,_0x1a3fe6=[];_0x230df1[_0x499dab(0x115)]&&_0x1a3fe6[_0x499dab(0x122)](...checkRule(_0x230df1[_0x499dab(0x115)],_0x499dab(0x115),_0x3b1134));const _0x8c49b5=_0x1a3fe6[_0x499dab(0x13e)](_0x2fb44b=>_0x2fb44b[_0x499dab(0x12d)]===_0x499dab(0x143)),_0x52731e=_0x1a3fe6['filter'](_0x7b4655=>_0x7b4655[_0x499dab(0x12d)]===_0x499dab(0x153));return{'valid':_0x8c49b5[_0x499dab(0x131)]===0x0,'errors':_0x8c49b5,'warnings':_0x52731e};}function checkRule(_0x1c7571,_0x55f08c,_0x46020d){const _0x4a08a4=a156_0x287a,_0x58a8f0=[];if(_0x1c7571[_0x4a08a4(0x11b)][_0x4a08a4(0x131)]===0x0)return _0x58a8f0[_0x4a08a4(0x122)]({'level':_0x4a08a4(0x143),'path':_0x55f08c+'.conditions','code':_0x4a08a4(0x13f),'message':'Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','location':getLocationFromPath(_0x46020d[_0x4a08a4(0x119)],_0x46020d[_0x4a08a4(0x11a)],pathToArray(_0x55f08c+_0x4a08a4(0x146)))}),_0x58a8f0;return _0x58a8f0[_0x4a08a4(0x122)](...checkConditions(_0x1c7571[_0x4a08a4(0x11b)],_0x55f08c,_0x46020d)),_0x58a8f0;}function checkConditions(_0x7bee02,_0x33aad1,_0x1c60df){const _0x52fcfb=a156_0x287a,_0x123847=[];for(let _0x55c381=0x0;_0x55c381<_0x7bee02[_0x52fcfb(0x131)];_0x55c381++){const _0x8a140b=_0x7bee02[_0x55c381],_0x3355e0=_0x33aad1+_0x52fcfb(0x15c)+_0x55c381+']';_0x123847[_0x52fcfb(0x122)](...checkCondition(_0x8a140b,_0x3355e0,_0x1c60df));}return _0x123847;}function checkCondition(_0xea20ca,_0x1c9ef4,_0x1d99bc){const _0x46d5cd=a156_0x287a,_0xc9efb3=[];if(_0xea20ca[_0x46d5cd(0x13b)]===_0x46d5cd(0x14b)||_0xea20ca[_0x46d5cd(0x13b)]==='Or'){if(_0xea20ca['conditions'][_0x46d5cd(0x131)]===0x0)_0xc9efb3[_0x46d5cd(0x122)]({'level':'error','path':_0x1c9ef4+'.conditions','code':_0x46d5cd(0x13f),'message':_0xea20ca[_0x46d5cd(0x13b)]+_0x46d5cd(0x156),'location':getLocationFromPath(_0x1d99bc['document'],_0x1d99bc[_0x46d5cd(0x11a)],pathToArray(_0x1c9ef4+_0x46d5cd(0x146)))});else{const _0x4cf3b2=_0xea20ca[_0x46d5cd(0x113)]!==undefined;!_0x4cf3b2&&_0xc9efb3['push']({'level':_0x46d5cd(0x153),'path':_0x1c9ef4,'code':'NESTED_CONDITION_GROUP','message':_0xea20ca[_0x46d5cd(0x13b)]+_0x46d5cd(0x130)+_0x46d5cd(0x138)+_0x46d5cd(0x12c),'location':getLocationFromPath(_0x1d99bc[_0x46d5cd(0x119)],_0x1d99bc[_0x46d5cd(0x11a)],pathToArray(_0x1c9ef4))}),_0xc9efb3[_0x46d5cd(0x122)](...checkConditions(_0xea20ca[_0x46d5cd(0x11b)],_0x1c9ef4,_0x1d99bc));}return _0xc9efb3;}if(_0xea20ca[_0x46d5cd(0x13b)]===_0x46d5cd(0x159)||_0xea20ca[_0x46d5cd(0x13b)]===_0x46d5cd(0x118)){const _0x48d862=_0xea20ca,_0x8c7176=_0x48d862[_0x46d5cd(0x11a)],_0x3462a0=_0x48d862['aggregation'],_0x4638a8=_0x8c7176||_0x3462a0;(!_0x48d862[_0x46d5cd(0x144)]||_0x48d862[_0x46d5cd(0x144)]==='')&&(!_0x4638a8&&_0xc9efb3['push']({'level':'error','path':_0x1c9ef4+'.attribute','code':_0x46d5cd(0x14d),'message':_0x46d5cd(0x14c),'location':getLocationFromPath(_0x1d99bc[_0x46d5cd(0x119)],_0x1d99bc[_0x46d5cd(0x11a)],pathToArray(_0x1c9ef4+_0x46d5cd(0x11e)))}));_0x48d862[_0x46d5cd(0x13e)]&&_0xc9efb3[_0x46d5cd(0x122)](...checkRule(_0x48d862[_0x46d5cd(0x13e)],_0x1c9ef4+_0x46d5cd(0x13a),_0x1d99bc));if(_0x48d862['source']){const _0x398506=_0x48d862['attribute']&&_0x48d862[_0x46d5cd(0x144)]!=='';_0x398506&&!_0x48d862[_0x46d5cd(0x13e)]&&_0xc9efb3[_0x46d5cd(0x122)]({'level':'error','path':_0x1c9ef4+_0x46d5cd(0x155),'code':_0x46d5cd(0x123),'message':'Behavior\x20source\x20\x27'+_0x48d862[_0x46d5cd(0x11a)]+_0x46d5cd(0x132)+_0x48d862[_0x46d5cd(0x144)]+'\x27\x20'+_0x46d5cd(0x121)+_0x46d5cd(0x15a)+'Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','location':getLocationFromPath(_0x1d99bc['document'],_0x1d99bc['source'],pathToArray(_0x1c9ef4+'.source'))}),_0x398506&&_0x48d862[_0x46d5cd(0x13e)]&&_0xc9efb3[_0x46d5cd(0x122)]({'level':'warning','path':_0x1c9ef4+_0x46d5cd(0x11e),'code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':_0x46d5cd(0x12a)+_0x48d862['attribute']+_0x46d5cd(0x14f)+_0x46d5cd(0x13d),'location':getLocationFromPath(_0x1d99bc[_0x46d5cd(0x119)],_0x1d99bc['source'],pathToArray(_0x1c9ef4+_0x46d5cd(0x11e)))});}}return _0xc9efb3;}function a156_0x3aeb(){const _0x356b50=['12ZNyFHX','415956tbsJeB','.attribute','.segment','map','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','push','BEHAVIOR_SOURCE_MISSING_FILTER','.operator.value','path','message','custom','validationCode','match','Attribute\x20\x27','SEGMENT_SCHEMA_ERROR','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','level','symbol','MISSING_TIME_UNIT','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','length','\x27\x20with\x20attribute\x20\x27','INVALID_RULE_TYPE','MISSING_SEGMENT_REFERENCE','MISSING_CONDITIONS','35urAwzo','INVALID_OPERATOR_TYPE','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','1030BvGMKH','.filter','type','safeParse','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','filter','EMPTY_CONDITIONS','MISSING_OPERATOR_VALUE','218232NbJvEL','invalid_value','error','attribute','39wTYUWl','.conditions','MISSING_NAME','MISSING_BETWEEN_BOUNDS','rule.type','endsWith','And','Attribute\x20name\x20cannot\x20be\x20empty','EMPTY_ATTRIBUTE','skipSchema','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','success','77742avlxic','98cpyGUE','warning','arrayMatching','.source','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','name','issues','Value','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','6254237DlAEai','.conditions[','params','5787qlPCrk','24BZrpYk','description','710748lJrjXY','rule','1862tgVrDy','INVALID_ARRAY_MATCHING','Behavior','document','source','conditions'];a156_0x3aeb=function(){return _0x356b50;};return a156_0x3aeb();}
1
+ function a156_0x29db(_0x138af9,_0x5b8f7c){_0x138af9=_0x138af9-0x170;const _0x212b92=a156_0x212b();let _0x29db0d=_0x212b92[_0x138af9];return _0x29db0d;}(function(_0x5d4644,_0x585820){const _0x3af9f1=a156_0x29db,_0x5183ec=_0x5d4644();while(!![]){try{const _0x5043c5=parseInt(_0x3af9f1(0x18c))/0x1*(parseInt(_0x3af9f1(0x1a9))/0x2)+parseInt(_0x3af9f1(0x198))/0x3*(parseInt(_0x3af9f1(0x1ad))/0x4)+-parseInt(_0x3af9f1(0x18e))/0x5+-parseInt(_0x3af9f1(0x19d))/0x6*(parseInt(_0x3af9f1(0x1b6))/0x7)+-parseInt(_0x3af9f1(0x179))/0x8+-parseInt(_0x3af9f1(0x190))/0x9+-parseInt(_0x3af9f1(0x1a6))/0xa*(-parseInt(_0x3af9f1(0x1b9))/0xb);if(_0x5043c5===_0x585820)break;else _0x5183ec['push'](_0x5183ec['shift']());}catch(_0xa422a4){_0x5183ec['push'](_0x5183ec['shift']());}}}(a156_0x212b,0x5754b));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x3b14a8,_0x4ca3b8={},_0x5246bc={}){const _0x472d37=a156_0x29db;if(_0x5246bc[_0x472d37(0x1ac)])return runSemanticChecks(_0x3b14a8,_0x4ca3b8);const _0x42e46c=SegmentDefSchema['safeParse'](_0x3b14a8);if(_0x42e46c[_0x472d37(0x1a1)])return runSemanticChecks(_0x42e46c[_0x472d37(0x1b3)],_0x4ca3b8);return zodErrorsToValidationResult(_0x42e46c[_0x472d37(0x184)],_0x4ca3b8);}export function validateRuleDef(_0x7a188,_0x3e39bb,_0x1b84df){const _0x1430fd=a156_0x29db;if(!_0x7a188)return[];const _0x5f48a7=RuleDefSchema['safeParse'](_0x7a188);if(_0x5f48a7[_0x1430fd(0x1a1)])return checkRule(_0x5f48a7['data'],_0x3e39bb,_0x1b84df);const _0x33f55d=flattenZodIssues(_0x5f48a7['error'][_0x1430fd(0x1a3)]);return _0x33f55d[_0x1430fd(0x19a)](_0x4759a8=>{const _0x21f4ec=_0x1430fd,_0x5df5f1=formatZodPath(_0x4759a8[_0x21f4ec(0x18d)]),_0x4c0203=_0x5df5f1?_0x3e39bb+'.'+_0x5df5f1:_0x3e39bb,_0x41149e=mapZodIssueToCode(_0x4759a8,_0x5df5f1),_0x44abb9=getLocationFromPath(_0x1b84df[_0x21f4ec(0x170)],_0x1b84df[_0x21f4ec(0x174)],pathToArray(_0x4c0203));return{'level':_0x21f4ec(0x184),'path':_0x4c0203,'code':_0x41149e,'message':_0x4759a8[_0x21f4ec(0x189)],..._0x44abb9&&{'location':_0x44abb9}};});}function zodErrorsToValidationResult(_0x1068c6,_0x175b40){const _0xa370d7=a156_0x29db,_0x2344a6=flattenZodIssues(_0x1068c6[_0xa370d7(0x1a3)]),_0x481888=_0x2344a6[_0xa370d7(0x19a)](_0x1c0699=>{const _0x16e582=_0xa370d7,_0x24a276=formatZodPath(_0x1c0699[_0x16e582(0x18d)]),_0x234812=mapZodIssueToCode(_0x1c0699,_0x24a276),_0x4dac72=getLocationFromPath(_0x175b40['document'],_0x175b40[_0x16e582(0x174)],_0x1c0699['path'][_0x16e582(0x19a)](_0x5ae4db=>typeof _0x5ae4db==='symbol'?String(_0x5ae4db):_0x5ae4db));return{'level':_0x16e582(0x184),'path':_0x24a276,'code':_0x234812,'message':_0x1c0699[_0x16e582(0x189)],..._0x4dac72&&{'location':_0x4dac72}};});return{'valid':![],'errors':_0x481888,'warnings':[]};}function a156_0x212b(){const _0x2d0582=['Attribute\x20name\x20cannot\x20be\x20empty','Value','warning','data','push','invalid_value','701477MagFeM','EMPTY_ATTRIBUTE','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','89749CgcmBh','document','.conditions[','type','code','source','.segment','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','Behavior\x20source\x20\x27','4348184KbXUvw','.conditions','.operator.value','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','MISSING_SEGMENT_REFERENCE','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','match','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','.filter','custom','BEHAVIOR_SOURCE_MISSING_FILTER','error','And','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','INVALID_RULE_TYPE','message','conditions','validationCode','3aXkUyK','path','1847370yjVzEO','filter','4231512xTFAzD','includes','level','Behavior','attribute','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','MISSING_TIME_UNIT','arrayMatching','401889eIbBpy','.source','map','params','.type','42xCIxgN','MISSING_CONDITIONS','EMPTY_CONDITIONS','.operator.type','success','length','issues','INVALID_ARRAY_MATCHING','.attribute','1390fQotIo','rule','endsWith','425622sytFkq','description','aggregation','skipSchema','20EeNfmC','MISSING_BETWEEN_BOUNDS','SEGMENT_SCHEMA_ERROR'];a156_0x212b=function(){return _0x2d0582;};return a156_0x212b();}function mapZodIssueToCode(_0x3d7335,_0x1e1642){const _0x4bb00d=a156_0x29db,_0x3fcd25=_0x3d7335[_0x4bb00d(0x173)]===_0x4bb00d(0x182)?_0x3d7335[_0x4bb00d(0x19b)]:undefined;if(_0x1e1642==='name')return'MISSING_NAME';if(_0x1e1642==='rule.type'||_0x1e1642[_0x4bb00d(0x1a8)](_0x4bb00d(0x19c))){if(_0x3d7335[_0x4bb00d(0x173)]===_0x4bb00d(0x1b5)){if(_0x1e1642==='rule.type'||_0x1e1642[_0x4bb00d(0x17f)](/\.conditions\[\d+\]\.type$/))return _0x4bb00d(0x188);}}if(_0x1e1642[_0x4bb00d(0x1a8)](_0x4bb00d(0x1a0)))return'INVALID_OPERATOR_TYPE';if(_0x1e1642['endsWith'](_0x4bb00d(0x17b)))return'MISSING_OPERATOR_VALUE';if(_0x3fcd25?.['validationCode']===_0x4bb00d(0x1ae))return _0x4bb00d(0x1ae);if(_0x3fcd25?.[_0x4bb00d(0x18b)]===_0x4bb00d(0x196))return _0x4bb00d(0x196);if(_0x1e1642[_0x4bb00d(0x1a8)]('.conditions')||_0x1e1642===_0x4bb00d(0x18a))return _0x4bb00d(0x19e);if(_0x1e1642[_0x4bb00d(0x191)](_0x4bb00d(0x197)))return _0x4bb00d(0x1a4);if(_0x1e1642[_0x4bb00d(0x1a8)](_0x4bb00d(0x175)))return _0x4bb00d(0x17d);return _0x4bb00d(0x1af);}function runSemanticChecks(_0x1f880e,_0x5f196a){const _0x514bb8=a156_0x29db,_0x379e6f=[];_0x1f880e['rule']&&_0x379e6f[_0x514bb8(0x1b4)](...checkRule(_0x1f880e[_0x514bb8(0x1a7)],_0x514bb8(0x1a7),_0x5f196a));const _0x4adc=_0x379e6f['filter'](_0x5b5c7c=>_0x5b5c7c[_0x514bb8(0x192)]===_0x514bb8(0x184)),_0x48ae87=_0x379e6f['filter'](_0x4adc10=>_0x4adc10['level']===_0x514bb8(0x1b2));return{'valid':_0x4adc['length']===0x0,'errors':_0x4adc,'warnings':_0x48ae87};}function checkRule(_0x148393,_0x3b2060,_0x5c7b88){const _0x14b8b0=a156_0x29db,_0x50a562=[];if(_0x148393['conditions'][_0x14b8b0(0x1a2)]===0x0)return _0x50a562['push']({'level':_0x14b8b0(0x184),'path':_0x3b2060+'.conditions','code':'EMPTY_CONDITIONS','message':'Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','location':getLocationFromPath(_0x5c7b88[_0x14b8b0(0x170)],_0x5c7b88['source'],pathToArray(_0x3b2060+_0x14b8b0(0x17a)))}),_0x50a562;return _0x50a562[_0x14b8b0(0x1b4)](...checkConditions(_0x148393[_0x14b8b0(0x18a)],_0x3b2060,_0x5c7b88)),_0x50a562;}function checkConditions(_0x1dbd4f,_0x5b86d6,_0x472936){const _0x1e8a21=a156_0x29db,_0xcab594=[];for(let _0x212130=0x0;_0x212130<_0x1dbd4f['length'];_0x212130++){const _0x538823=_0x1dbd4f[_0x212130],_0x411909=_0x5b86d6+_0x1e8a21(0x171)+_0x212130+']';_0xcab594[_0x1e8a21(0x1b4)](...checkCondition(_0x538823,_0x411909,_0x472936));}return _0xcab594;}function checkCondition(_0x517482,_0x17ace6,_0x30d955){const _0x21062c=a156_0x29db,_0x35d41e=[];if(_0x517482[_0x21062c(0x172)]===_0x21062c(0x185)||_0x517482[_0x21062c(0x172)]==='Or'){if(_0x517482[_0x21062c(0x18a)][_0x21062c(0x1a2)]===0x0)_0x35d41e['push']({'level':_0x21062c(0x184),'path':_0x17ace6+_0x21062c(0x17a),'code':_0x21062c(0x19f),'message':_0x517482['type']+_0x21062c(0x17e),'location':getLocationFromPath(_0x30d955[_0x21062c(0x170)],_0x30d955['source'],pathToArray(_0x17ace6+_0x21062c(0x17a)))});else{const _0x4efd42=_0x517482[_0x21062c(0x1aa)]!==undefined;!_0x4efd42&&_0x35d41e[_0x21062c(0x1b4)]({'level':'warning','path':_0x17ace6,'code':'NESTED_CONDITION_GROUP','message':_0x517482[_0x21062c(0x172)]+_0x21062c(0x195)+_0x21062c(0x1b8)+_0x21062c(0x17c),'location':getLocationFromPath(_0x30d955[_0x21062c(0x170)],_0x30d955[_0x21062c(0x174)],pathToArray(_0x17ace6))}),_0x35d41e['push'](...checkConditions(_0x517482['conditions'],_0x17ace6,_0x30d955));}return _0x35d41e;}if(_0x517482[_0x21062c(0x172)]===_0x21062c(0x1b1)||_0x517482[_0x21062c(0x172)]===_0x21062c(0x193)){const _0x970f9d=_0x517482,_0x4a6031=_0x970f9d['source'],_0x343381=_0x970f9d[_0x21062c(0x1ab)],_0x5038c0=_0x4a6031||_0x343381;(!_0x970f9d[_0x21062c(0x194)]||_0x970f9d['attribute']==='')&&(!_0x5038c0&&_0x35d41e[_0x21062c(0x1b4)]({'level':_0x21062c(0x184),'path':_0x17ace6+'.attribute','code':_0x21062c(0x1b7),'message':_0x21062c(0x1b0),'location':getLocationFromPath(_0x30d955[_0x21062c(0x170)],_0x30d955[_0x21062c(0x174)],pathToArray(_0x17ace6+_0x21062c(0x1a5)))}));_0x970f9d[_0x21062c(0x18f)]&&_0x35d41e[_0x21062c(0x1b4)](...checkRule(_0x970f9d['filter'],_0x17ace6+_0x21062c(0x181),_0x30d955));if(_0x970f9d[_0x21062c(0x174)]){const _0x4009b9=_0x970f9d[_0x21062c(0x194)]&&_0x970f9d['attribute']!=='';_0x4009b9&&!_0x970f9d[_0x21062c(0x18f)]&&_0x35d41e['push']({'level':_0x21062c(0x184),'path':_0x17ace6+_0x21062c(0x199),'code':_0x21062c(0x183),'message':_0x21062c(0x178)+_0x970f9d[_0x21062c(0x174)]+'\x27\x20with\x20attribute\x20\x27'+_0x970f9d[_0x21062c(0x194)]+'\x27\x20'+_0x21062c(0x186)+_0x21062c(0x187)+_0x21062c(0x177),'location':getLocationFromPath(_0x30d955[_0x21062c(0x170)],_0x30d955[_0x21062c(0x174)],pathToArray(_0x17ace6+'.source'))}),_0x4009b9&&_0x970f9d[_0x21062c(0x18f)]&&_0x35d41e[_0x21062c(0x1b4)]({'level':'warning','path':_0x17ace6+'.attribute','code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':'Attribute\x20\x27'+_0x970f9d[_0x21062c(0x194)]+_0x21062c(0x180)+_0x21062c(0x176),'location':getLocationFromPath(_0x30d955[_0x21062c(0x170)],_0x30d955[_0x21062c(0x174)],pathToArray(_0x17ace6+_0x21062c(0x1a5)))});}}return _0x35d41e;}
@@ -1 +1 @@
1
- function a157_0x14b8(){const _0x50445d=['relative','segmentName','resolve','45118kGhook','no_config','file','Parent\x20segment\x20not\x20specified','directory','basename','File\x20not\x20found','startsWith','287dAvsKO','parse','No\x20tdx.json\x20found\x20for\x20file:\x20','join','File\x20not\x20found:\x20','isFile','resourceType','journey','readFile','dirname','type','configDir','message','includes','parent_name','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','extname','invalid_yaml','Not\x20a\x20YAML\x20file:\x20','segment','cwd','No\x20tdx.json\x20found','stat','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','1133008mSvnQA','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','parentSegment','error','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','isDirectory','root','844533kFcoEz','17tzFiRk','parent_segment','exists','2290095SDWAST','isScoped','replace','folderPath','scopedFolderPath','context','trim','1889514nXqyzF','67816CPPtmv','match','file_not_found','6028434ApAgDQ'];a157_0x14b8=function(){return _0x50445d;};return a157_0x14b8();}(function(_0x535479,_0x3adae6){const _0x5d457f=a157_0x8d85,_0x50ced3=_0x535479();while(!![]){try{const _0x2187f8=parseInt(_0x5d457f(0x11f))/0x1*(parseInt(_0x5d457f(0xf7))/0x2)+-parseInt(_0x5d457f(0x11e))/0x3+-parseInt(_0x5d457f(0x117))/0x4+parseInt(_0x5d457f(0x122))/0x5+parseInt(_0x5d457f(0x129))/0x6+parseInt(_0x5d457f(0xff))/0x7*(parseInt(_0x5d457f(0x12a))/0x8)+-parseInt(_0x5d457f(0x12d))/0x9;if(_0x2187f8===_0x3adae6)break;else _0x50ced3['push'](_0x50ced3['shift']());}catch(_0x441ec9){_0x50ced3['push'](_0x50ced3['shift']());}}}(a157_0x14b8,0x41c61));import a157_0x19cdd2 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(_0x18e265){const _0x2c2851=a157_0x8d85;return _0x18e265[_0x2c2851(0x109)]!==_0x2c2851(0x11a);}export function isScopedResolution(_0xb79763){const _0x6873b7=a157_0x8d85;return _0xb79763[_0x6873b7(0x109)]===_0x6873b7(0xfb)||_0xb79763[_0x6873b7(0x109)]===_0x6873b7(0xf9)||_0xb79763[_0x6873b7(0x109)]===_0x6873b7(0x127);}export function getScopedDetails(_0xd93d9a){if(isScopedResolution(_0xd93d9a))return{'isScoped':_0xd93d9a['isScoped'],'scopedFolderPath':_0xd93d9a['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x57b9bb,_0x1b1aef){const _0x5c89d7=a157_0x8d85;let _0x163348=a157_0x19cdd2[_0x5c89d7(0xf6)](_0x57b9bb);const _0x290d40=a157_0x19cdd2[_0x5c89d7(0x100)](_0x163348)[_0x5c89d7(0x11d)];while(_0x163348!==_0x290d40){const _0x1fbc69=a157_0x19cdd2[_0x5c89d7(0x102)](_0x163348,'tdx.json');if(await _0x1b1aef[_0x5c89d7(0x121)](_0x1fbc69))try{const _0x4485c9=await _0x1b1aef[_0x5c89d7(0x107)](_0x1fbc69),_0x59c3ad=JSON['parse'](_0x4485c9);if(_0x59c3ad[_0x5c89d7(0x120)]&&typeof _0x59c3ad[_0x5c89d7(0x120)]==='string')return{'configPath':_0x1fbc69,'configDir':_0x163348,'parentSegment':_0x59c3ad[_0x5c89d7(0x120)]};}catch{}_0x163348=a157_0x19cdd2[_0x5c89d7(0x108)](_0x163348);}return null;}function a157_0x8d85(_0x47d6e2,_0x12750e){_0x47d6e2=_0x47d6e2-0xf6;const _0x14b8b5=a157_0x14b8();let _0x8d8522=_0x14b8b5[_0x47d6e2];return _0x8d8522;}function calculateScopedPath(_0x5bbcf1,_0x525334){const _0x22f0f6=a157_0x8d85,_0x4ce35a=a157_0x19cdd2[_0x22f0f6(0x12e)](_0x525334,_0x5bbcf1),_0x2b202c=_0x4ce35a!==''&&_0x4ce35a!=='.'&&!_0x4ce35a[_0x22f0f6(0xfe)]('..');return{'isScoped':_0x2b202c,'scopedFolderPath':_0x2b202c?_0x4ce35a[_0x22f0f6(0x124)](/\\/g,'/'):''};}export async function resolveTarget(_0x572207){const _0x20efe5=a157_0x8d85,{arg:_0x1fe112,contextParent:_0x457b7f,cwd:cwd=process[_0x20efe5(0x113)](),fs:fs=nodeFileSystem}=_0x572207;if(_0x1fe112&&isYamlFilePath(_0x1fe112))try{const _0x440dd1=await resolveYamlFilePath(_0x1fe112,fs),_0x1420f2=a157_0x19cdd2[_0x20efe5(0xf6)](_0x1fe112),_0x13a848=a157_0x19cdd2['dirname'](_0x1420f2),_0x1cd492=await findTdxConfigAsync(_0x13a848,fs);if(!_0x1cd492){if(_0x457b7f){const _0x474d6a=a157_0x19cdd2[_0x20efe5(0x108)](_0x1420f2);return{'type':_0x20efe5(0xf9),'parentName':_0x457b7f,'targetDir':_0x474d6a,'configRoot':_0x474d6a,'filePath':_0x1420f2,'resourceName':_0x440dd1[_0x20efe5(0x12f)],'folderPath':_0x440dd1[_0x20efe5(0x125)],'resourceType':_0x440dd1[_0x20efe5(0x105)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_config','message':_0x20efe5(0x101)+_0x1fe112,'arg':_0x1fe112,'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 _0x1ae1dc=calculateScopedPath(_0x13a848,_0x1cd492['configDir']);return{'type':_0x20efe5(0xf9),'parentName':_0x1cd492[_0x20efe5(0x119)],'targetDir':_0x1cd492[_0x20efe5(0x10a)],'configRoot':_0x1cd492[_0x20efe5(0x10a)],'filePath':_0x1420f2,'resourceName':_0x440dd1[_0x20efe5(0x12f)],'folderPath':_0x440dd1[_0x20efe5(0x125)],'resourceType':_0x440dd1[_0x20efe5(0x105)],'isScoped':_0x1ae1dc['isScoped'],'scopedFolderPath':_0x1ae1dc[_0x20efe5(0x126)]};}catch(_0x57ee25){const _0x424d5d=_0x57ee25 instanceof Error?_0x57ee25[_0x20efe5(0x10b)]:String(_0x57ee25);if(_0x424d5d['includes'](_0x20efe5(0xfd)))return{'type':_0x20efe5(0x11a),'errorCode':_0x20efe5(0x12c),'message':_0x20efe5(0x103)+_0x1fe112,'arg':_0x1fe112};if(_0x424d5d[_0x20efe5(0x10c)](_0x20efe5(0x114))){if(_0x457b7f){const _0x55d9ab=a157_0x19cdd2[_0x20efe5(0xf6)](_0x1fe112);if(await fs[_0x20efe5(0x121)](_0x55d9ab)){const _0x668234=a157_0x19cdd2['dirname'](_0x55d9ab),_0xf29f60=await fs['readFile'](_0x55d9ab),_0x1b7365=_0xf29f60['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x1f3cdb=_0xf29f60[_0x20efe5(0x12b)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x491791=_0x1b7365?_0x1b7365[0x1][_0x20efe5(0x128)]():a157_0x19cdd2[_0x20efe5(0xfc)](_0x1fe112,a157_0x19cdd2[_0x20efe5(0x10f)](_0x1fe112)),_0x2a8093=_0x1f3cdb&&_0x1f3cdb[0x1][_0x20efe5(0x128)]()===_0x20efe5(0x106)?_0x20efe5(0x106):_0x20efe5(0x112);return{'type':_0x20efe5(0xf9),'parentName':_0x457b7f,'targetDir':_0x668234,'configRoot':_0x668234,'filePath':_0x55d9ab,'resourceName':_0x491791,'folderPath':'','resourceType':_0x2a8093,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x20efe5(0x11a),'errorCode':_0x20efe5(0xf8),'message':_0x20efe5(0x101)+_0x1fe112,'arg':_0x1fe112,'helpText':_0x20efe5(0x10e)};}return{'type':_0x20efe5(0x11a),'errorCode':_0x20efe5(0x110),'message':_0x424d5d,'arg':_0x1fe112};}if(_0x1fe112){const _0x23e17f=a157_0x19cdd2[_0x20efe5(0xf6)](cwd,_0x1fe112);let _0x17b1a2=null;try{_0x17b1a2=await fs[_0x20efe5(0x115)](_0x23e17f);}catch{}if(_0x17b1a2?.[_0x20efe5(0x11c)]()){const _0x11ce77=await findTdxConfigAsync(_0x23e17f,fs);if(_0x11ce77){const _0xabcb58=calculateScopedPath(_0x23e17f,_0x11ce77['configDir']);return{'type':_0x20efe5(0xfb),'parentName':_0x11ce77[_0x20efe5(0x119)],'targetDir':_0x23e17f,'configRoot':_0x11ce77['configDir'],'isScoped':_0xabcb58[_0x20efe5(0x123)],'scopedFolderPath':_0xabcb58[_0x20efe5(0x126)]};}if(_0x457b7f)return{'type':_0x20efe5(0xfb),'parentName':_0x457b7f,'targetDir':_0x23e17f,'configRoot':_0x23e17f,'isScoped':![],'scopedFolderPath':''};return{'type':_0x20efe5(0x11a),'errorCode':_0x20efe5(0xf8),'message':_0x20efe5(0x11b)+_0x1fe112,'arg':_0x1fe112,'helpText':_0x20efe5(0x10e)};}if(_0x17b1a2?.[_0x20efe5(0x104)]())return{'type':_0x20efe5(0x11a),'errorCode':'invalid_yaml','message':_0x20efe5(0x111)+_0x1fe112,'arg':_0x1fe112,'helpText':_0x20efe5(0x116)};const _0x4f2781=sanitizeFileName(_0x1fe112),_0x453562=getSegmentRootDir(_0x4f2781,cwd);return{'type':_0x20efe5(0x10d),'parentName':_0x1fe112,'targetDir':_0x453562,'configRoot':_0x453562};}const _0xaeff97=await findTdxConfigAsync(cwd,fs);if(_0xaeff97){const _0xe93682=calculateScopedPath(cwd,_0xaeff97[_0x20efe5(0x10a)]);return{'type':_0x20efe5(0x127),'parentName':_0xaeff97['parentSegment'],'targetDir':cwd,'configRoot':_0xaeff97['configDir'],'isScoped':_0xe93682[_0x20efe5(0x123)],'scopedFolderPath':_0xe93682[_0x20efe5(0x126)]};}if(_0x457b7f){const _0x29ffc4=sanitizeFileName(_0x457b7f),_0x434915=getSegmentRootDir(_0x29ffc4,cwd);return{'type':_0x20efe5(0x127),'parentName':_0x457b7f,'targetDir':_0x434915,'configRoot':_0x434915,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x20efe5(0x11a),'errorCode':'no_parent','message':_0x20efe5(0xfa),'helpText':_0x20efe5(0x118)};}
1
+ (function(_0x502214,_0x129f79){const _0x17e235=a157_0x32d7,_0x29dcb9=_0x502214();while(!![]){try{const _0xc98a4a=-parseInt(_0x17e235(0x104))/0x1+-parseInt(_0x17e235(0xee))/0x2*(parseInt(_0x17e235(0x103))/0x3)+parseInt(_0x17e235(0xdb))/0x4*(-parseInt(_0x17e235(0xe8))/0x5)+parseInt(_0x17e235(0xfe))/0x6*(parseInt(_0x17e235(0xdd))/0x7)+-parseInt(_0x17e235(0xe5))/0x8+parseInt(_0x17e235(0x109))/0x9+parseInt(_0x17e235(0xe9))/0xa;if(_0xc98a4a===_0x129f79)break;else _0x29dcb9['push'](_0x29dcb9['shift']());}catch(_0x4cd612){_0x29dcb9['push'](_0x29dcb9['shift']());}}}(a157_0x3633,0xf391d));import a157_0x3b98fa from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a157_0x32d7(_0x57ec7a,_0x36c748){_0x57ec7a=_0x57ec7a-0xd9;const _0x3633cf=a157_0x3633();let _0x32d79f=_0x3633cf[_0x57ec7a];return _0x32d79f;}import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x2cda8f){const _0x18df60=a157_0x32d7;return _0x2cda8f[_0x18df60(0xd9)]!==_0x18df60(0xeb);}function a157_0x3633(){const _0x21ee71=['parentSegment','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','cwd','string','root','invalid_yaml','144rwDTlU','resolve','No\x20tdx.json\x20found','parent_name','no_parent','544422MlZfat','12759uMyHrp','isDirectory','replace','resourceType','no_config','10667169koSSQv','segmentName','type','File\x20not\x20found:\x20','14044UqPqIo','stat','456729UTEdyG','parent_segment','directory','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','join','exists','file','Parent\x20segment\x20not\x20specified','12066912EoIhlG','dirname','readFile','2410TbactN','18228650FVoIOW','context','error','journey','trim','4TPvkEV','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','scopedFolderPath','isScoped','basename','file_not_found','parse','No\x20tdx.json\x20found\x20for\x20file:\x20','match','configDir'];a157_0x3633=function(){return _0x21ee71;};return a157_0x3633();}export function isScopedResolution(_0x42f0ae){const _0x186f96=a157_0x32d7;return _0x42f0ae['type']===_0x186f96(0xdf)||_0x42f0ae[_0x186f96(0xd9)]===_0x186f96(0xe3)||_0x42f0ae['type']==='context';}export function getScopedDetails(_0x22a775){const _0x2ecb22=a157_0x32d7;if(isScopedResolution(_0x22a775))return{'isScoped':_0x22a775[_0x2ecb22(0xf1)],'scopedFolderPath':_0x22a775['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x17caa6,_0x2e03c7){const _0x21f55c=a157_0x32d7;let _0x4dc87b=a157_0x3b98fa[_0x21f55c(0xff)](_0x17caa6);const _0x5947d1=a157_0x3b98fa[_0x21f55c(0xf4)](_0x4dc87b)[_0x21f55c(0xfc)];while(_0x4dc87b!==_0x5947d1){const _0x5c8d16=a157_0x3b98fa[_0x21f55c(0xe1)](_0x4dc87b,'tdx.json');if(await _0x2e03c7[_0x21f55c(0xe2)](_0x5c8d16))try{const _0x37bf12=await _0x2e03c7[_0x21f55c(0xe7)](_0x5c8d16),_0x423ac0=JSON['parse'](_0x37bf12);if(_0x423ac0['parent_segment']&&typeof _0x423ac0[_0x21f55c(0xde)]===_0x21f55c(0xfb))return{'configPath':_0x5c8d16,'configDir':_0x4dc87b,'parentSegment':_0x423ac0[_0x21f55c(0xde)]};}catch{}_0x4dc87b=a157_0x3b98fa[_0x21f55c(0xe6)](_0x4dc87b);}return null;}function calculateScopedPath(_0x458160,_0x25c2a6){const _0x10e683=a157_0x32d7,_0x906662=a157_0x3b98fa['relative'](_0x25c2a6,_0x458160),_0x5b89f6=_0x906662!==''&&_0x906662!=='.'&&!_0x906662['startsWith']('..');return{'isScoped':_0x5b89f6,'scopedFolderPath':_0x5b89f6?_0x906662[_0x10e683(0x106)](/\\/g,'/'):''};}export async function resolveTarget(_0x2d9ecb){const _0x5e3b2c=a157_0x32d7,{arg:_0x5cf9c0,contextParent:_0x4a0356,cwd:cwd=process[_0x5e3b2c(0xfa)](),fs:fs=nodeFileSystem}=_0x2d9ecb;if(_0x5cf9c0&&isYamlFilePath(_0x5cf9c0))try{const _0xee3a76=await resolveYamlFilePath(_0x5cf9c0,fs),_0x96c26d=a157_0x3b98fa[_0x5e3b2c(0xff)](_0x5cf9c0),_0x28809c=a157_0x3b98fa[_0x5e3b2c(0xe6)](_0x96c26d),_0x28d000=await findTdxConfigAsync(_0x28809c,fs);if(!_0x28d000){if(_0x4a0356){const _0x53693d=a157_0x3b98fa['dirname'](_0x96c26d);return{'type':'file','parentName':_0x4a0356,'targetDir':_0x53693d,'configRoot':_0x53693d,'filePath':_0x96c26d,'resourceName':_0xee3a76[_0x5e3b2c(0x10a)],'folderPath':_0xee3a76['folderPath'],'resourceType':_0xee3a76[_0x5e3b2c(0x107)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5e3b2c(0xeb),'errorCode':'no_config','message':_0x5e3b2c(0xf5)+_0x5cf9c0,'arg':_0x5cf9c0,'helpText':_0x5e3b2c(0xef)};}const _0x4e982a=calculateScopedPath(_0x28809c,_0x28d000[_0x5e3b2c(0xf7)]);return{'type':_0x5e3b2c(0xe3),'parentName':_0x28d000[_0x5e3b2c(0xf8)],'targetDir':_0x28d000[_0x5e3b2c(0xf7)],'configRoot':_0x28d000[_0x5e3b2c(0xf7)],'filePath':_0x96c26d,'resourceName':_0xee3a76[_0x5e3b2c(0x10a)],'folderPath':_0xee3a76['folderPath'],'resourceType':_0xee3a76[_0x5e3b2c(0x107)],'isScoped':_0x4e982a[_0x5e3b2c(0xf1)],'scopedFolderPath':_0x4e982a['scopedFolderPath']};}catch(_0x13a4b5){const _0x5af03c=_0x13a4b5 instanceof Error?_0x13a4b5['message']:String(_0x13a4b5);if(_0x5af03c['includes']('File\x20not\x20found'))return{'type':_0x5e3b2c(0xeb),'errorCode':_0x5e3b2c(0xf3),'message':_0x5e3b2c(0xda)+_0x5cf9c0,'arg':_0x5cf9c0};if(_0x5af03c['includes'](_0x5e3b2c(0x100))){if(_0x4a0356){const _0xff2742=a157_0x3b98fa[_0x5e3b2c(0xff)](_0x5cf9c0);if(await fs['exists'](_0xff2742)){const _0x3e0d92=a157_0x3b98fa[_0x5e3b2c(0xe6)](_0xff2742),_0x28548d=await fs['readFile'](_0xff2742),_0x43cd8a=_0x28548d[_0x5e3b2c(0xf6)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x5b64bf=_0x28548d[_0x5e3b2c(0xf6)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x1cc772=_0x43cd8a?_0x43cd8a[0x1][_0x5e3b2c(0xed)]():a157_0x3b98fa[_0x5e3b2c(0xf2)](_0x5cf9c0,a157_0x3b98fa['extname'](_0x5cf9c0)),_0x35a643=_0x5b64bf&&_0x5b64bf[0x1]['trim']()===_0x5e3b2c(0xec)?_0x5e3b2c(0xec):'segment';return{'type':_0x5e3b2c(0xe3),'parentName':_0x4a0356,'targetDir':_0x3e0d92,'configRoot':_0x3e0d92,'filePath':_0xff2742,'resourceName':_0x1cc772,'folderPath':'','resourceType':_0x35a643,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x5e3b2c(0xeb),'errorCode':'no_config','message':_0x5e3b2c(0xf5)+_0x5cf9c0,'arg':_0x5cf9c0,'helpText':_0x5e3b2c(0xef)};}return{'type':_0x5e3b2c(0xeb),'errorCode':_0x5e3b2c(0xfd),'message':_0x5af03c,'arg':_0x5cf9c0};}if(_0x5cf9c0){const _0x4b6ab9=a157_0x3b98fa[_0x5e3b2c(0xff)](cwd,_0x5cf9c0);let _0x22767b=null;try{_0x22767b=await fs[_0x5e3b2c(0xdc)](_0x4b6ab9);}catch{}if(_0x22767b?.[_0x5e3b2c(0x105)]()){const _0x1e3318=await findTdxConfigAsync(_0x4b6ab9,fs);if(_0x1e3318){const _0xcfe9d9=calculateScopedPath(_0x4b6ab9,_0x1e3318[_0x5e3b2c(0xf7)]);return{'type':_0x5e3b2c(0xdf),'parentName':_0x1e3318[_0x5e3b2c(0xf8)],'targetDir':_0x4b6ab9,'configRoot':_0x1e3318[_0x5e3b2c(0xf7)],'isScoped':_0xcfe9d9[_0x5e3b2c(0xf1)],'scopedFolderPath':_0xcfe9d9['scopedFolderPath']};}if(_0x4a0356)return{'type':'directory','parentName':_0x4a0356,'targetDir':_0x4b6ab9,'configRoot':_0x4b6ab9,'isScoped':![],'scopedFolderPath':''};return{'type':_0x5e3b2c(0xeb),'errorCode':_0x5e3b2c(0x108),'message':_0x5e3b2c(0xf9)+_0x5cf9c0,'arg':_0x5cf9c0,'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'};}if(_0x22767b?.['isFile']())return{'type':_0x5e3b2c(0xeb),'errorCode':'invalid_yaml','message':'Not\x20a\x20YAML\x20file:\x20'+_0x5cf9c0,'arg':_0x5cf9c0,'helpText':_0x5e3b2c(0xe0)};const _0x1d8a7f=sanitizeFileName(_0x5cf9c0),_0x2b67f7=getSegmentRootDir(_0x1d8a7f,cwd);return{'type':_0x5e3b2c(0x101),'parentName':_0x5cf9c0,'targetDir':_0x2b67f7,'configRoot':_0x2b67f7};}const _0xefafef=await findTdxConfigAsync(cwd,fs);if(_0xefafef){const _0x711db=calculateScopedPath(cwd,_0xefafef['configDir']);return{'type':'context','parentName':_0xefafef[_0x5e3b2c(0xf8)],'targetDir':cwd,'configRoot':_0xefafef[_0x5e3b2c(0xf7)],'isScoped':_0x711db[_0x5e3b2c(0xf1)],'scopedFolderPath':_0x711db[_0x5e3b2c(0xf0)]};}if(_0x4a0356){const _0x3ae5e8=sanitizeFileName(_0x4a0356),_0x3513c2=getSegmentRootDir(_0x3ae5e8,cwd);return{'type':_0x5e3b2c(0xea),'parentName':_0x4a0356,'targetDir':_0x3513c2,'configRoot':_0x3513c2,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5e3b2c(0xeb),'errorCode':_0x5e3b2c(0x102),'message':_0x5e3b2c(0xe4),'helpText':'Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure'};}
@@ -1 +1 @@
1
- const a158_0x28bed9=a158_0x3a1a;(function(_0x3150d2,_0x5a5dbb){const _0x4b3f7d=a158_0x3a1a,_0x137eed=_0x3150d2();while(!![]){try{const _0x3171d8=parseInt(_0x4b3f7d(0x1cd))/0x1+-parseInt(_0x4b3f7d(0x1d9))/0x2+-parseInt(_0x4b3f7d(0x1d5))/0x3*(-parseInt(_0x4b3f7d(0x1c6))/0x4)+parseInt(_0x4b3f7d(0x1d1))/0x5*(parseInt(_0x4b3f7d(0x1c4))/0x6)+-parseInt(_0x4b3f7d(0x1ce))/0x7*(-parseInt(_0x4b3f7d(0x1c7))/0x8)+-parseInt(_0x4b3f7d(0x1c8))/0x9*(parseInt(_0x4b3f7d(0x1c5))/0xa)+-parseInt(_0x4b3f7d(0x1d3))/0xb;if(_0x3171d8===_0x5a5dbb)break;else _0x137eed['push'](_0x137eed['shift']());}catch(_0x1aa73e){_0x137eed['push'](_0x137eed['shift']());}}}(a158_0x5d5e,0xa47f7));import{existsSync,readFileSync}from'fs';function a158_0x5d5e(){const _0x5d414c=['10OfOSqf','4uPVqSS','784ffRkFr','4120677zMCXhS','Invalid\x20tdx.json:\x20expected\x20object','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','utf-8','Invalid\x20JSON\x20in\x20','491461NJnCca','57162JbUCDs','cwd','tdx.json','485gyuRFY','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','16886001sptysY','engage_workspace','3871653wjnoug','join','root','stringify','34612NUKnbA','parse','replace','object','relative','parent_segment','dirname','6294KLVCYx'];a158_0x5d5e=function(){return _0x5d414c;};return a158_0x5d5e();}import a158_0x15b5cf from'path';const TDX_CONFIG_FILE=a158_0x28bed9(0x1d0),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x2524b9=process['cwd']()){const _0x494dc2=a158_0x28bed9;let _0x7d369=a158_0x15b5cf['resolve'](_0x2524b9);const _0x493f01=a158_0x15b5cf[_0x494dc2(0x1da)](_0x7d369)[_0x494dc2(0x1d7)];while(_0x7d369!==_0x493f01){const _0x920d37=a158_0x15b5cf[_0x494dc2(0x1d6)](_0x7d369,TDX_CONFIG_FILE);if(existsSync(_0x920d37))return _0x920d37;_0x7d369=a158_0x15b5cf['dirname'](_0x7d369);}return null;}export function loadTdxConfig(_0x576c69){const _0x15f546=a158_0x28bed9,_0x717ca9=readFileSync(_0x576c69,_0x15f546(0x1cb));let _0x392947;try{_0x392947=JSON[_0x15f546(0x1da)](_0x717ca9);}catch{throw new Error(_0x15f546(0x1cc)+_0x576c69);}if(!_0x392947||typeof _0x392947!==_0x15f546(0x1c0))throw new Error(_0x15f546(0x1c9));const _0x4e170e=_0x392947,_0xf6c0c7=_0x4e170e['parent_segment']&&typeof _0x4e170e['parent_segment']==='string',_0x132395=_0x4e170e[_0x15f546(0x1d4)]&&typeof _0x4e170e['engage_workspace']==='string';if(!_0xf6c0c7&&!_0x132395)throw new Error(_0x15f546(0x1d2));const _0x116071={};return _0xf6c0c7&&(_0x116071[_0x15f546(0x1c2)]=_0x4e170e[_0x15f546(0x1c2)]),_0x132395&&(_0x116071[_0x15f546(0x1d4)]=_0x4e170e[_0x15f546(0x1d4)]),_0x116071;}export function findTdxConfig(_0x5bccf7=process[a158_0x28bed9(0x1cf)]()){const _0x3e90fa=a158_0x28bed9,_0x223be0=findTdxConfigPath(_0x5bccf7);if(!_0x223be0)throw new Error(_0x3e90fa(0x1ca));const _0x5bf864=loadTdxConfig(_0x223be0),_0xfeef1c=a158_0x15b5cf[_0x3e90fa(0x1c3)](_0x223be0);return{'config':_0x5bf864,'configPath':_0x223be0,'configDir':_0xfeef1c};}function a158_0x3a1a(_0x2bc70d,_0x1c3be6){_0x2bc70d=_0x2bc70d-0x1c0;const _0x5d5e61=a158_0x5d5e();let _0x3a1a6c=_0x5d5e61[_0x2bc70d];return _0x3a1a6c;}export function tryFindTdxConfig(_0x38350f){try{return findTdxConfig(_0x38350f);}catch{return null;}}export function getSegmentRootDir(_0x434e57,_0x115655=process[a158_0x28bed9(0x1cf)]()){const _0x23dd2e=a158_0x28bed9;return a158_0x15b5cf[_0x23dd2e(0x1d6)](_0x115655,SEGMENTS_DIR,_0x434e57);}export function getTdxConfigPath(_0x31779b,_0xa9aea9=process[a158_0x28bed9(0x1cf)]()){const _0x38746a=a158_0x28bed9;return a158_0x15b5cf[_0x38746a(0x1d6)](getSegmentRootDir(_0x31779b,_0xa9aea9),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x2c1cdd,_0x4d04c7){const _0x2e4b68=a158_0x28bed9,_0x5c6bb0=a158_0x15b5cf['resolve'](_0x2c1cdd),_0x190f8a=a158_0x15b5cf[_0x2e4b68(0x1c1)](_0x4d04c7,_0x5c6bb0);if(_0x190f8a['startsWith']('..'))return'';return _0x190f8a;}export function localPathToTdFolderPath(_0x42a79c){const _0x574b90=a158_0x28bed9,_0x1feb6e=a158_0x15b5cf[_0x574b90(0x1c3)](_0x42a79c);if(_0x1feb6e==='.'||_0x1feb6e==='')return'';return _0x1feb6e[_0x574b90(0x1db)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x478fff,_0x2cfd5d){if(!_0x478fff)return _0x2cfd5d;return a158_0x15b5cf['join'](_0x2cfd5d,_0x478fff);}export function createTdxConfigContent(_0x3a7824){const _0x4ec39b=a158_0x28bed9,_0x2a6dbd={'parent_segment':_0x3a7824};return JSON[_0x4ec39b(0x1d8)](_0x2a6dbd,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x462890){const _0xb23586={'engage_workspace':_0x462890};return JSON['stringify'](_0xb23586,null,0x2)+'\x0a';}
1
+ const a158_0x5a6659=a158_0x22ef;(function(_0x4f9cf0,_0x4a6272){const _0x5d61d5=a158_0x22ef,_0x399ff2=_0x4f9cf0();while(!![]){try{const _0x29252d=parseInt(_0x5d61d5(0x115))/0x1+parseInt(_0x5d61d5(0x111))/0x2+-parseInt(_0x5d61d5(0xfb))/0x3*(-parseInt(_0x5d61d5(0x10d))/0x4)+parseInt(_0x5d61d5(0x114))/0x5*(parseInt(_0x5d61d5(0x10e))/0x6)+parseInt(_0x5d61d5(0x109))/0x7*(parseInt(_0x5d61d5(0x105))/0x8)+parseInt(_0x5d61d5(0x108))/0x9+-parseInt(_0x5d61d5(0x101))/0xa*(parseInt(_0x5d61d5(0x106))/0xb);if(_0x29252d===_0x4a6272)break;else _0x399ff2['push'](_0x399ff2['shift']());}catch(_0x2fe6a4){_0x399ff2['push'](_0x399ff2['shift']());}}}(a158_0xfb07,0xb468c));import{existsSync,readFileSync}from'fs';import a158_0x5f3278 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a158_0x5a6659(0x10a);export function findTdxConfigPath(_0x3b2d3a=process[a158_0x5a6659(0x107)]()){const _0x13cbb5=a158_0x5a6659;let _0x34e6a6=a158_0x5f3278[_0x13cbb5(0x10f)](_0x3b2d3a);const _0x4e9427=a158_0x5f3278[_0x13cbb5(0xfc)](_0x34e6a6)[_0x13cbb5(0xfd)];while(_0x34e6a6!==_0x4e9427){const _0x491ad3=a158_0x5f3278['join'](_0x34e6a6,TDX_CONFIG_FILE);if(existsSync(_0x491ad3))return _0x491ad3;_0x34e6a6=a158_0x5f3278['dirname'](_0x34e6a6);}return null;}export function loadTdxConfig(_0x58f57d){const _0xb6def3=a158_0x5a6659,_0x5e3c8d=readFileSync(_0x58f57d,_0xb6def3(0x112));let _0x360dbd;try{_0x360dbd=JSON[_0xb6def3(0xfc)](_0x5e3c8d);}catch{throw new Error(_0xb6def3(0x10b)+_0x58f57d);}if(!_0x360dbd||typeof _0x360dbd!==_0xb6def3(0x103))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x1eed40=_0x360dbd,_0x4b6fae=_0x1eed40[_0xb6def3(0x113)]&&typeof _0x1eed40[_0xb6def3(0x113)]===_0xb6def3(0x104),_0x4b7bc2=_0x1eed40[_0xb6def3(0x10c)]&&typeof _0x1eed40[_0xb6def3(0x10c)]==='string';if(!_0x4b6fae&&!_0x4b7bc2)throw new Error(_0xb6def3(0x102));const _0x3133ae={};return _0x4b6fae&&(_0x3133ae[_0xb6def3(0x113)]=_0x1eed40[_0xb6def3(0x113)]),_0x4b7bc2&&(_0x3133ae[_0xb6def3(0x10c)]=_0x1eed40[_0xb6def3(0x10c)]),_0x3133ae;}export function findTdxConfig(_0x520a1e=process[a158_0x5a6659(0x107)]()){const _0x5d5d3b=a158_0x5a6659,_0x4bfabb=findTdxConfigPath(_0x520a1e);if(!_0x4bfabb)throw new Error(_0x5d5d3b(0xfe));const _0x15ee2d=loadTdxConfig(_0x4bfabb),_0x2d5ed9=a158_0x5f3278[_0x5d5d3b(0x100)](_0x4bfabb);return{'config':_0x15ee2d,'configPath':_0x4bfabb,'configDir':_0x2d5ed9};}export function tryFindTdxConfig(_0x256efe){try{return findTdxConfig(_0x256efe);}catch{return null;}}function a158_0x22ef(_0xd39da2,_0x23827e){_0xd39da2=_0xd39da2-0xfb;const _0xfb0756=a158_0xfb07();let _0x22efe1=_0xfb0756[_0xd39da2];return _0x22efe1;}export function getSegmentRootDir(_0x166a20,_0x352921=process[a158_0x5a6659(0x107)]()){const _0x555725=a158_0x5a6659;return a158_0x5f3278[_0x555725(0xff)](_0x352921,SEGMENTS_DIR,_0x166a20);}export function getTdxConfigPath(_0x46267e,_0x279e7d=process[a158_0x5a6659(0x107)]()){const _0x41bfe1=a158_0x5a6659;return a158_0x5f3278[_0x41bfe1(0xff)](getSegmentRootDir(_0x46267e,_0x279e7d),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x5e4459,_0x25a842){const _0x59b646=a158_0x5a6659,_0x3a349c=a158_0x5f3278[_0x59b646(0x10f)](_0x5e4459),_0x51c6ca=a158_0x5f3278['relative'](_0x25a842,_0x3a349c);if(_0x51c6ca['startsWith']('..'))return'';return _0x51c6ca;}export function localPathToTdFolderPath(_0xd912fa){const _0x2af0e4=a158_0x5a6659,_0x4e15e6=a158_0x5f3278[_0x2af0e4(0x100)](_0xd912fa);if(_0x4e15e6==='.'||_0x4e15e6==='')return'';return _0x4e15e6['replace'](/\\/g,'/');}function a158_0xfb07(){const _0x480b96=['cwd','9202437SNcmxw','49FhAwPp','segments','Invalid\x20JSON\x20in\x20','engage_workspace','4tjdhwf','20928YcprZt','resolve','stringify','968496wMbxNE','utf-8','parent_segment','955trmDPx','835695MQwFGt','2442846ZsUGjs','parse','root','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','join','dirname','40375870rIbPGA','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','object','string','1089848hwNZpG','11HvATeT'];a158_0xfb07=function(){return _0x480b96;};return a158_0xfb07();}export function tdFolderPathToLocalPath(_0x211c9a,_0x416ee9){if(!_0x211c9a)return _0x416ee9;return a158_0x5f3278['join'](_0x416ee9,_0x211c9a);}export function createTdxConfigContent(_0x54ba74){const _0x4cc878=a158_0x5a6659,_0xaca896={'parent_segment':_0x54ba74};return JSON[_0x4cc878(0x110)](_0xaca896,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x12940d){const _0x47956e=a158_0x5a6659,_0x48901c={'engage_workspace':_0x12940d};return JSON[_0x47956e(0x110)](_0x48901c,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a159_0x24ddef=a159_0x3ac2;(function(_0x28d4e1,_0x32ff0c){const _0x4417f3=a159_0x3ac2,_0x352ca8=_0x28d4e1();while(!![]){try{const _0x4dc055=parseInt(_0x4417f3(0x207))/0x1+-parseInt(_0x4417f3(0x208))/0x2+-parseInt(_0x4417f3(0x1fc))/0x3*(-parseInt(_0x4417f3(0x1ff))/0x4)+-parseInt(_0x4417f3(0x209))/0x5+parseInt(_0x4417f3(0x20c))/0x6+-parseInt(_0x4417f3(0x1f1))/0x7+parseInt(_0x4417f3(0x204))/0x8;if(_0x4dc055===_0x32ff0c)break;else _0x352ca8['push'](_0x352ca8['shift']());}catch(_0x579104){_0x352ca8['push'](_0x352ca8['shift']());}}}(a159_0x517b,0x4cfb4));import{z}from'zod';export const ScheduleTypeSchema=z['enum'](['none',a159_0x24ddef(0x1f5),'daily',a159_0x24ddef(0x213),a159_0x24ddef(0x1fa),'cron','minutes_interval']);function a159_0x517b(){const _0x25ff2a=['584296ncLOqT','2897420DrkMtO','onSuccess','First','1730952LbxRKp','enum','object','hour','onFailure','All','Top-N','weekly','min','boolean','day','2859031WSkGKr','masked','number','rows','hourly','asc','nullable','union','desc','monthly','optional','821019rDMiFv','string','cols','4NJcJwA','unknown','array','minute','Connection\x20name\x20is\x20required','7623928YhEWic','week','clear','80225IaJVAX'];a159_0x517b=function(){return _0x25ff2a;};return a159_0x517b();}export const RepeatUnitSchema=z[a159_0x24ddef(0x20d)]([a159_0x24ddef(0x202),a159_0x24ddef(0x20f),a159_0x24ddef(0x1f0),a159_0x24ddef(0x205),'month','once','none']);function a159_0x3ac2(_0x1b8567,_0x2bb3d0){_0x1b8567=_0x1b8567-0x1ee;const _0x517b2f=a159_0x517b();let _0x3ac280=_0x517b2f[_0x1b8567];return _0x3ac280;}export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x24ddef(0x1fb)](),'repeat_unit':RepeatUnitSchema[a159_0x24ddef(0x1fb)](),'repeat_frequency':z[a159_0x24ddef(0x1f3)]()[a159_0x24ddef(0x1fb)](),'repeat_sub_frequency':z['array'](z[a159_0x24ddef(0x1f3)]())[a159_0x24ddef(0x1fb)](),'start_at':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1f7)]()['optional'](),'end_on':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1f7)]()['optional'](),'timezone':z['string']()['optional']()});export const NotificationDefSchema=z[a159_0x24ddef(0x20e)]({'notify_on':z[a159_0x24ddef(0x201)](z['enum']([a159_0x24ddef(0x20a),a159_0x24ddef(0x210)]))[a159_0x24ddef(0x1fb)](),'email_recipients':z['array'](z[a159_0x24ddef(0x1fd)]())[a159_0x24ddef(0x1fb)]()});export const ActivationColumnDefSchema=z[a159_0x24ddef(0x1f8)]([z[a159_0x24ddef(0x1fd)](),z[a159_0x24ddef(0x20e)]({'name':z[a159_0x24ddef(0x1fd)](),'type':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1fb)](),'visibility':z[a159_0x24ddef(0x20d)]([a159_0x24ddef(0x206),a159_0x24ddef(0x1f2)])[a159_0x24ddef(0x1fb)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x24ddef(0x20e)]({'columns':z[a159_0x24ddef(0x201)](z[a159_0x24ddef(0x20e)]({'name':z['string'](),'type':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1fb)](),'visibility':z[a159_0x24ddef(0x20d)]([a159_0x24ddef(0x206),'masked'])[a159_0x24ddef(0x1fb)]()}))['optional'](),'behavior_table':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1fb)](),'join_row':z[a159_0x24ddef(0x1f3)]()[a159_0x24ddef(0x1f7)]()['optional'](),'join_strategy':z[a159_0x24ddef(0x20d)]([a159_0x24ddef(0x211),a159_0x24ddef(0x20b),'Last',a159_0x24ddef(0x212)])[a159_0x24ddef(0x1fb)](),'formatting':z['enum']([a159_0x24ddef(0x1f4),a159_0x24ddef(0x1fe)])[a159_0x24ddef(0x1fb)](),'order_by':z[a159_0x24ddef(0x201)](z[a159_0x24ddef(0x20e)]({'key':z[a159_0x24ddef(0x1fd)](),'order':z[a159_0x24ddef(0x20d)]([a159_0x24ddef(0x1f6),a159_0x24ddef(0x1f9)])}))[a159_0x24ddef(0x1fb)]()});export const ActivationDefSchema=z['object']({'name':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1ee)](0x1,'Activation\x20name\x20is\x20required'),'description':z[a159_0x24ddef(0x1fd)]()['optional'](),'connection':z['string']()[a159_0x24ddef(0x1ee)](0x1,a159_0x24ddef(0x203)),'all_columns':z[a159_0x24ddef(0x1ef)]()[a159_0x24ddef(0x1fb)](),'columns':z['array'](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a159_0x24ddef(0x1fb)](),'connector_config':z['record'](z['string'](),z[a159_0x24ddef(0x200)]())[a159_0x24ddef(0x1fb)](),'activation_template_id':z['string']()[a159_0x24ddef(0x1f7)]()[a159_0x24ddef(0x1fb)](),'behavior':ActivationBehaviorDefSchema['nullable']()['optional'](),'run_after_journey_refresh':z[a159_0x24ddef(0x1ef)]()[a159_0x24ddef(0x1fb)](),'nested_workflow_project_name':z['string']()[a159_0x24ddef(0x1fb)](),'nested_workflow_name':z['string']()[a159_0x24ddef(0x1fb)](),'lock_enabled':z[a159_0x24ddef(0x1ef)]()[a159_0x24ddef(0x1fb)]()});
1
+ function a159_0x5071(_0x2c9ad1,_0x4b0142){_0x2c9ad1=_0x2c9ad1-0xcf;const _0xc34458=a159_0xc344();let _0x507120=_0xc34458[_0x2c9ad1];return _0x507120;}const a159_0x56916f=a159_0x5071;(function(_0x5cab40,_0x40916b){const _0x50ec16=a159_0x5071,_0x4c5d85=_0x5cab40();while(!![]){try{const _0x7ea1b3=-parseInt(_0x50ec16(0xd4))/0x1*(parseInt(_0x50ec16(0xe8))/0x2)+-parseInt(_0x50ec16(0xd5))/0x3+-parseInt(_0x50ec16(0xe3))/0x4+parseInt(_0x50ec16(0xef))/0x5*(-parseInt(_0x50ec16(0xd6))/0x6)+parseInt(_0x50ec16(0xf3))/0x7+parseInt(_0x50ec16(0xf9))/0x8*(-parseInt(_0x50ec16(0xf8))/0x9)+parseInt(_0x50ec16(0xdf))/0xa;if(_0x7ea1b3===_0x40916b)break;else _0x4c5d85['push'](_0x4c5d85['shift']());}catch(_0xd30cf3){_0x4c5d85['push'](_0x4c5d85['shift']());}}}(a159_0xc344,0x26ade));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x56916f(0xe9)]([a159_0x56916f(0xd7),a159_0x56916f(0xd2),a159_0x56916f(0xf4),a159_0x56916f(0xea),a159_0x56916f(0xf1),a159_0x56916f(0xf0),'minutes_interval']);export const RepeatUnitSchema=z['enum']([a159_0x56916f(0xf6),a159_0x56916f(0xcf),a159_0x56916f(0xed),'week',a159_0x56916f(0xd1),a159_0x56916f(0xe2),'none']);export const ScheduleDefSchema=z[a159_0x56916f(0xdd)]({'type':ScheduleTypeSchema[a159_0x56916f(0xec)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a159_0x56916f(0xe4)]()[a159_0x56916f(0xec)](),'repeat_sub_frequency':z[a159_0x56916f(0xf5)](z[a159_0x56916f(0xe4)]())['optional'](),'start_at':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xdb)]()[a159_0x56916f(0xec)](),'end_on':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xdb)]()[a159_0x56916f(0xec)](),'timezone':z[a159_0x56916f(0xd0)]()['optional']()});function a159_0xc344(){const _0x7750e9=['optional','day','All','10SEVrGi','cron','monthly','Top-N','1313256ilnoXY','daily','array','minute','asc','918495WAflFH','8tHzGAz','hour','string','month','hourly','masked','3535YYlNqE','795834ElpHdy','9012xqJrcC','none','boolean','desc','rows','nullable','unknown','object','Last','8542380QSnbmC','First','Connection\x20name\x20is\x20required','once','836276ejCAcz','number','Activation\x20name\x20is\x20required','clear','min','172xzaHmY','enum','weekly','cols'];a159_0xc344=function(){return _0x7750e9;};return a159_0xc344();}export const NotificationDefSchema=z[a159_0x56916f(0xdd)]({'notify_on':z[a159_0x56916f(0xf5)](z[a159_0x56916f(0xe9)](['onSuccess','onFailure']))[a159_0x56916f(0xec)](),'email_recipients':z['array'](z[a159_0x56916f(0xd0)]())[a159_0x56916f(0xec)]()});export const ActivationColumnDefSchema=z['union']([z[a159_0x56916f(0xd0)](),z[a159_0x56916f(0xdd)]({'name':z['string'](),'type':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xec)](),'visibility':z[a159_0x56916f(0xe9)]([a159_0x56916f(0xe6),a159_0x56916f(0xd3)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a159_0x56916f(0xdd)]({'columns':z['array'](z[a159_0x56916f(0xdd)]({'name':z[a159_0x56916f(0xd0)](),'type':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xec)](),'visibility':z[a159_0x56916f(0xe9)]([a159_0x56916f(0xe6),'masked'])[a159_0x56916f(0xec)]()}))[a159_0x56916f(0xec)](),'behavior_table':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xec)](),'join_row':z[a159_0x56916f(0xe4)]()[a159_0x56916f(0xdb)]()[a159_0x56916f(0xec)](),'join_strategy':z[a159_0x56916f(0xe9)]([a159_0x56916f(0xee),a159_0x56916f(0xe0),a159_0x56916f(0xde),a159_0x56916f(0xf2)])[a159_0x56916f(0xec)](),'formatting':z[a159_0x56916f(0xe9)]([a159_0x56916f(0xda),a159_0x56916f(0xeb)])['optional'](),'order_by':z[a159_0x56916f(0xf5)](z[a159_0x56916f(0xdd)]({'key':z['string'](),'order':z[a159_0x56916f(0xe9)]([a159_0x56916f(0xf7),a159_0x56916f(0xd9)])}))[a159_0x56916f(0xec)]()});export const ActivationDefSchema=z[a159_0x56916f(0xdd)]({'name':z['string']()['min'](0x1,a159_0x56916f(0xe5)),'description':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xec)](),'connection':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xe7)](0x1,a159_0x56916f(0xe1)),'all_columns':z[a159_0x56916f(0xd8)]()[a159_0x56916f(0xec)](),'columns':z[a159_0x56916f(0xf5)](ActivationColumnDefSchema)[a159_0x56916f(0xec)](),'schedule':ScheduleDefSchema[a159_0x56916f(0xec)](),'notification':NotificationDefSchema[a159_0x56916f(0xec)](),'connector_config':z['record'](z[a159_0x56916f(0xd0)](),z[a159_0x56916f(0xdc)]())[a159_0x56916f(0xec)](),'activation_template_id':z['string']()[a159_0x56916f(0xdb)]()[a159_0x56916f(0xec)](),'behavior':ActivationBehaviorDefSchema['nullable']()['optional'](),'run_after_journey_refresh':z[a159_0x56916f(0xd8)]()[a159_0x56916f(0xec)](),'nested_workflow_project_name':z[a159_0x56916f(0xd0)]()['optional'](),'nested_workflow_name':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xec)](),'lock_enabled':z['boolean']()[a159_0x56916f(0xec)]()});
@@ -1 +1 @@
1
- (function(_0x265a2a,_0x171be6){var _0x5c5297=a160_0x4f52,_0x4018a3=_0x265a2a();while(!![]){try{var _0x13de23=parseInt(_0x5c5297(0x143))/0x1*(-parseInt(_0x5c5297(0x140))/0x2)+-parseInt(_0x5c5297(0x147))/0x3*(-parseInt(_0x5c5297(0x148))/0x4)+-parseInt(_0x5c5297(0x14a))/0x5*(parseInt(_0x5c5297(0x145))/0x6)+-parseInt(_0x5c5297(0x144))/0x7*(-parseInt(_0x5c5297(0x149))/0x8)+-parseInt(_0x5c5297(0x142))/0x9+parseInt(_0x5c5297(0x146))/0xa*(parseInt(_0x5c5297(0x13f))/0xb)+parseInt(_0x5c5297(0x141))/0xc;if(_0x13de23===_0x171be6)break;else _0x4018a3['push'](_0x4018a3['shift']());}catch(_0x4ea875){_0x4018a3['push'](_0x4018a3['shift']());}}}(a160_0x1da6,0x3122c));function a160_0x4f52(_0x3edd88,_0x16f47e){_0x3edd88=_0x3edd88-0x13f;var _0x1da6d3=a160_0x1da6();var _0x4f52e0=_0x1da6d3[_0x3edd88];return _0x4f52e0;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a160_0x1da6(){var _0x291337=['945960RHayPb','1192815hPUHfJ','20742fCcWiV','343xZcAVp','6mzFdjd','20gOHupX','15063kWravJ','204QCmxWg','28568piLgZy','1778285bewNaa','1101727jEkDCa','2dyjyGY'];a160_0x1da6=function(){return _0x291337;};return a160_0x1da6();}
1
+ function a160_0x18cc(){var _0x161331=['229984ozardE','420203JPceEL','2838118oltEME','11536368zRKNkq','2845071BhSUeC','44hxqJwi','36QygPIH','60zTHaLt','284805zlkxfL','3622890ZerJsS'];a160_0x18cc=function(){return _0x161331;};return a160_0x18cc();}(function(_0x32a5da,_0x1314ca){var _0x22a9ff=a160_0x5881,_0x2ac406=_0x32a5da();while(!![]){try{var _0x1800d7=parseInt(_0x22a9ff(0x17e))/0x1+-parseInt(_0x22a9ff(0x180))/0x2+parseInt(_0x22a9ff(0x17d))/0x3+parseInt(_0x22a9ff(0x179))/0x4*(parseInt(_0x22a9ff(0x17c))/0x5)+-parseInt(_0x22a9ff(0x17a))/0x6*(parseInt(_0x22a9ff(0x17f))/0x7)+-parseInt(_0x22a9ff(0x181))/0x8+-parseInt(_0x22a9ff(0x182))/0x9*(-parseInt(_0x22a9ff(0x17b))/0xa);if(_0x1800d7===_0x1314ca)break;else _0x2ac406['push'](_0x2ac406['shift']());}catch(_0x2eea1f){_0x2ac406['push'](_0x2ac406['shift']());}}}(a160_0x18cc,0xb4924));function a160_0x5881(_0x451db1,_0x52e897){_0x451db1=_0x451db1-0x179;var _0x18ccc3=a160_0x18cc();var _0x5881e7=_0x18ccc3[_0x451db1];return _0x5881e7;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a161_0x1ecc05=a161_0x48e2;(function(_0x2d6ddb,_0x40c532){const _0x2c7c7a=a161_0x48e2,_0x3c8846=_0x2d6ddb();while(!![]){try{const _0x44d4cf=-parseInt(_0x2c7c7a(0x12a))/0x1+parseInt(_0x2c7c7a(0x126))/0x2*(-parseInt(_0x2c7c7a(0x112))/0x3)+parseInt(_0x2c7c7a(0x133))/0x4*(-parseInt(_0x2c7c7a(0x10c))/0x5)+-parseInt(_0x2c7c7a(0x132))/0x6*(-parseInt(_0x2c7c7a(0x114))/0x7)+-parseInt(_0x2c7c7a(0x12f))/0x8+parseInt(_0x2c7c7a(0x116))/0x9+-parseInt(_0x2c7c7a(0x128))/0xa*(-parseInt(_0x2c7c7a(0x11e))/0xb);if(_0x44d4cf===_0x40c532)break;else _0x3c8846['push'](_0x3c8846['shift']());}catch(_0x446c40){_0x3c8846['push'](_0x3c8846['shift']());}}}(a161_0x421b,0x73174));function a161_0x421b(){const _0x534b58=['5460656ZqjAtn','passthrough','activation','5559018SRyWMz','35432taSukB','enum','record','day','235khJQJZ','literal','number','journeys','journey','reentry_always','38679PbpcFZ','merge','7qlhRYK','launched','643815mczPDw','ab_test','refine','jump','object','draft','wait','type','121tmiXwN','isArray','end','simulation','string','stages','optional','min','50gfncrR','array','835630jhjNXX','reentry_unless_goal_achieved','24586ZkgeWk','lazy','decision_point','filter','boolean'];a161_0x421b=function(){return _0x534b58;};return a161_0x421b();}import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x1ecc05(0x134)]([a161_0x1ecc05(0x11b),a161_0x1ecc05(0x121),a161_0x1ecc05(0x115)]);export const ReentryModeTypeSchema=z[a161_0x1ecc05(0x134)](['no_reentry',a161_0x1ecc05(0x129),a161_0x1ecc05(0x111)]);export const WaitUnitTypeSchema=z['enum']([a161_0x1ecc05(0x10b),'week']);export const StepTypeValueSchema=z[a161_0x1ecc05(0x134)]([a161_0x1ecc05(0x11c),a161_0x1ecc05(0x131),a161_0x1ecc05(0x12c),a161_0x1ecc05(0x117),'merge',a161_0x1ecc05(0x119),a161_0x1ecc05(0x120)]);export const EmbeddedSegmentDefSchema=z[a161_0x1ecc05(0x11a)]({'description':z['string']()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x1ecc05(0x11a)]({'journey':z[a161_0x1ecc05(0x122)](),'stage':z['string'](),'bundle_id':z[a161_0x1ecc05(0x122)]()['optional']()});export const CriteriaDefSchema=z['object']({'name':z[a161_0x1ecc05(0x122)](),'description':z['string']()[a161_0x1ecc05(0x124)](),'segment':z[a161_0x1ecc05(0x122)](),'target':JumpTargetDefSchema[a161_0x1ecc05(0x124)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a161_0x1ecc05(0x10e)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)]()}),WaitConditionDefSchema=z[a161_0x1ecc05(0x11a)]({'segment':z[a161_0x1ecc05(0x122)](),'next':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x1ecc05(0x124)]()}),WaitStepParamsDefSchema=z[a161_0x1ecc05(0x11a)]({'duration':z[a161_0x1ecc05(0x10e)]()['optional'](),'unit':WaitUnitTypeSchema[a161_0x1ecc05(0x124)](),'wait_until':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'condition':WaitConditionDefSchema[a161_0x1ecc05(0x124)](),'days_of_week':z[a161_0x1ecc05(0x127)](z['string']())[a161_0x1ecc05(0x124)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'next':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)]()},WaitStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z[a161_0x1ecc05(0x10d)](a161_0x1ecc05(0x11c)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x1ecc05(0x11a)]({'activation':z[a161_0x1ecc05(0x122)]()}),ActivationStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z['literal']('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a161_0x1ecc05(0x122)](),'segment':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'segment_id':z['string']()[a161_0x1ecc05(0x124)](),'excluded':z[a161_0x1ecc05(0x12e)]()[a161_0x1ecc05(0x124)](),'next':z['string']()[a161_0x1ecc05(0x124)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z[a161_0x1ecc05(0x127)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z[a161_0x1ecc05(0x10d)](a161_0x1ecc05(0x12c)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x1ecc05(0x11a)]({'id':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'name':z[a161_0x1ecc05(0x122)](),'percentage':z[a161_0x1ecc05(0x10e)](),'next':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)]()}),AbTestStepParamsDefSchema=z[a161_0x1ecc05(0x11a)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'customized_split':z[a161_0x1ecc05(0x12e)]()[a161_0x1ecc05(0x124)]()}),AbTestStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z[a161_0x1ecc05(0x10d)]('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a161_0x1ecc05(0x113))}),JumpStepParamsDefSchema=z[a161_0x1ecc05(0x11a)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z[a161_0x1ecc05(0x10d)](a161_0x1ecc05(0x119)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z[a161_0x1ecc05(0x10d)](a161_0x1ecc05(0x120))})[a161_0x1ecc05(0x130)]();export const StepDefSchema=z['discriminatedUnion'](a161_0x1ecc05(0x11d),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x1ecc05(0x11a)]({'name':z[a161_0x1ecc05(0x122)](),'description':z['string']()[a161_0x1ecc05(0x124)](),'id':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'entry_criteria':CriteriaDefSchema[a161_0x1ecc05(0x124)](),'exit_criteria':z['array'](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a161_0x1ecc05(0x124)](),'root_step':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'steps':z[a161_0x1ecc05(0x127)](StepDefSchema)[a161_0x1ecc05(0x124)]()});function a161_0x48e2(_0x225ba7,_0x2111bc){_0x225ba7=_0x225ba7-0x10a;const _0x421bc2=a161_0x421b();let _0x48e26e=_0x421bc2[_0x225ba7];return _0x48e26e;}export const JourneyEntryDefSchema=z[a161_0x1ecc05(0x11a)]({'name':z[a161_0x1ecc05(0x122)]()['optional'](),'version':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'state':JourneyStateTypeSchema[a161_0x1ecc05(0x124)](),'latest':z[a161_0x1ecc05(0x12e)]()[a161_0x1ecc05(0x124)](),'stages':z['array'](StageDefSchema),'id':z[a161_0x1ecc05(0x122)]()['optional'](),'version_number':z[a161_0x1ecc05(0x10e)]()['optional'](),'goal':CriteriaDefSchema[a161_0x1ecc05(0x124)](),'reentry':ReentryModeTypeSchema[a161_0x1ecc05(0x124)]()});export const JourneyDefSchema=z[a161_0x1ecc05(0x12b)](()=>z[a161_0x1ecc05(0x11a)]({'type':z[a161_0x1ecc05(0x10d)](a161_0x1ecc05(0x110)),'name':z['string']()[a161_0x1ecc05(0x125)](0x1,'Journey\x20name\x20is\x20required'),'description':z[a161_0x1ecc05(0x122)]()['optional'](),'bundle_id':z['string']()[a161_0x1ecc05(0x124)](),'bundle_name':z[a161_0x1ecc05(0x122)]()['optional'](),'folder_id':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'reentry':ReentryModeTypeSchema[a161_0x1ecc05(0x124)](),'allow_reentry':z['boolean']()[a161_0x1ecc05(0x124)](),'goal':CriteriaDefSchema[a161_0x1ecc05(0x124)](),'id':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'version':z[a161_0x1ecc05(0x122)]()['optional'](),'version_number':z[a161_0x1ecc05(0x10e)]()[a161_0x1ecc05(0x124)](),'stages':z[a161_0x1ecc05(0x127)](StageDefSchema)['optional'](),'versions':z[a161_0x1ecc05(0x127)](JourneyEntryDefSchema)[a161_0x1ecc05(0x124)](),'journeys':z['array'](JourneyEntryDefSchema)[a161_0x1ecc05(0x124)](),'segments':z[a161_0x1ecc05(0x10a)](z[a161_0x1ecc05(0x122)](),EmbeddedSegmentDefSchema)[a161_0x1ecc05(0x124)](),'activations':z[a161_0x1ecc05(0x10a)](z[a161_0x1ecc05(0x122)](),ActivationDefSchema)[a161_0x1ecc05(0x124)]()})[a161_0x1ecc05(0x118)](_0x24e87a=>{const _0x56d685=a161_0x1ecc05,_0x44ed01=[_0x24e87a[_0x56d685(0x10f)],_0x24e87a[_0x56d685(0x123)],_0x24e87a['versions']][_0x56d685(0x12d)](_0x1667f6=>Array[_0x56d685(0x11f)](_0x1667f6)&&_0x1667f6['length']>0x0)['length'];return _0x44ed01===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a161_0x4790f3=a161_0x1f63;(function(_0x3a260f,_0x13ca06){const _0x344757=a161_0x1f63,_0x3b678f=_0x3a260f();while(!![]){try{const _0x3dd856=-parseInt(_0x344757(0x100))/0x1*(parseInt(_0x344757(0x10b))/0x2)+-parseInt(_0x344757(0xe6))/0x3+-parseInt(_0x344757(0xf1))/0x4+-parseInt(_0x344757(0x10c))/0x5+-parseInt(_0x344757(0xf0))/0x6*(parseInt(_0x344757(0x108))/0x7)+parseInt(_0x344757(0x103))/0x8+-parseInt(_0x344757(0xf8))/0x9*(-parseInt(_0x344757(0xe8))/0xa);if(_0x3dd856===_0x13ca06)break;else _0x3b678f['push'](_0x3b678f['shift']());}catch(_0x4ff096){_0x3b678f['push'](_0x3b678f['shift']());}}}(a161_0x34cf,0xde819));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x4790f3(0xf3)](['draft',a161_0x4790f3(0x105),'launched']);export const ReentryModeTypeSchema=z[a161_0x4790f3(0xf3)](['no_reentry',a161_0x4790f3(0x106),a161_0x4790f3(0xef)]);export const WaitUnitTypeSchema=z[a161_0x4790f3(0xf3)]([a161_0x4790f3(0xee),a161_0x4790f3(0xe7)]);export const StepTypeValueSchema=z[a161_0x4790f3(0xf3)]([a161_0x4790f3(0xf5),'activation','decision_point',a161_0x4790f3(0xf9),a161_0x4790f3(0xed),a161_0x4790f3(0xf7),a161_0x4790f3(0xfd)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x4790f3(0xf6)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x4790f3(0x107)]({'journey':z[a161_0x4790f3(0xf6)](),'stage':z[a161_0x4790f3(0xf6)](),'bundle_id':z['string']()[a161_0x4790f3(0xec)]()});export const CriteriaDefSchema=z[a161_0x4790f3(0x107)]({'name':z['string'](),'description':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'segment':z['string'](),'target':JumpTargetDefSchema[a161_0x4790f3(0xec)]()});const WaitConditionTimeoutDefSchema=z[a161_0x4790f3(0x107)]({'duration':z[a161_0x4790f3(0xeb)](),'unit':WaitUnitTypeSchema,'next':z['string']()[a161_0x4790f3(0xec)]()}),WaitConditionDefSchema=z[a161_0x4790f3(0x107)]({'segment':z[a161_0x4790f3(0xf6)](),'next':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x4790f3(0xec)]()}),WaitStepParamsDefSchema=z[a161_0x4790f3(0x107)]({'duration':z[a161_0x4790f3(0xeb)]()['optional'](),'unit':WaitUnitTypeSchema[a161_0x4790f3(0xec)](),'wait_until':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z[a161_0x4790f3(0xfb)](z['string']())[a161_0x4790f3(0xec)]()}),StepBaseFields={'name':z[a161_0x4790f3(0xf6)](),'uuid':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'next':z['string']()[a161_0x4790f3(0xec)]()},WaitStepDefSchema=z[a161_0x4790f3(0x107)]({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x4790f3(0x107)]({'activation':z[a161_0x4790f3(0xf6)]()}),ActivationStepDefSchema=z[a161_0x4790f3(0x107)]({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)](a161_0x4790f3(0x102)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x4790f3(0x107)]({'name':z[a161_0x4790f3(0xf6)](),'segment':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'segment_id':z[a161_0x4790f3(0xf6)]()['optional'](),'excluded':z['boolean']()[a161_0x4790f3(0xec)](),'next':z['string']()[a161_0x4790f3(0xec)]()}),DecisionPointStepParamsDefSchema=z[a161_0x4790f3(0x107)]({'branches':z[a161_0x4790f3(0xfb)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x4790f3(0x107)]({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)]('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x4790f3(0x107)]({'id':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'name':z[a161_0x4790f3(0xf6)](),'percentage':z[a161_0x4790f3(0xeb)](),'next':z[a161_0x4790f3(0xf6)]()['optional']()}),AbTestStepParamsDefSchema=z[a161_0x4790f3(0x107)]({'variants':z[a161_0x4790f3(0xfb)](AbTestVariantDefSchema),'unique_id':z['string']()['optional'](),'customized_split':z['boolean']()['optional']()}),AbTestStepDefSchema=z[a161_0x4790f3(0x107)]({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)](a161_0x4790f3(0xf9)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x4790f3(0x107)]({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)](a161_0x4790f3(0xed))}),JumpStepParamsDefSchema=z[a161_0x4790f3(0x107)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a161_0x4790f3(0xf7)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)](a161_0x4790f3(0xfd))})[a161_0x4790f3(0xf2)]();export const StepDefSchema=z['discriminatedUnion'](a161_0x4790f3(0x101),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);function a161_0x34cf(){const _0x4f1d74=['Journey\x20name\x20is\x20required','number','optional','merge','day','reentry_always','6704688JnTHkl','1561192bxyVjs','passthrough','enum','stages','wait','string','jump','1197aQtHkf','ab_test','journeys','array','boolean','end','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','length','11090Chppcy','type','activation','4846296XZxvQG','journey','simulation','reentry_unless_goal_achieved','object','7nuoDWD','record','literal','140gclOix','1411465nBbsEV','2044272BDzMoS','week','267170QYnbJX','isArray'];a161_0x34cf=function(){return _0x4f1d74;};return a161_0x34cf();}export const StageDefSchema=z[a161_0x4790f3(0x107)]({'name':z[a161_0x4790f3(0xf6)](),'description':z['string']()['optional'](),'id':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'entry_criteria':CriteriaDefSchema[a161_0x4790f3(0xec)](),'exit_criteria':z[a161_0x4790f3(0xfb)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a161_0x4790f3(0xec)](),'root_step':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'steps':z['array'](StepDefSchema)[a161_0x4790f3(0xec)]()});function a161_0x1f63(_0x3e9de0,_0x4d9dab){_0x3e9de0=_0x3e9de0-0xe6;const _0x34cfd9=a161_0x34cf();let _0x1f6386=_0x34cfd9[_0x3e9de0];return _0x1f6386;}export const JourneyEntryDefSchema=z[a161_0x4790f3(0x107)]({'name':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'version':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'state':JourneyStateTypeSchema[a161_0x4790f3(0xec)](),'latest':z[a161_0x4790f3(0xfc)]()[a161_0x4790f3(0xec)](),'stages':z[a161_0x4790f3(0xfb)](StageDefSchema),'id':z['string']()[a161_0x4790f3(0xec)](),'version_number':z[a161_0x4790f3(0xeb)]()[a161_0x4790f3(0xec)](),'goal':CriteriaDefSchema[a161_0x4790f3(0xec)](),'reentry':ReentryModeTypeSchema[a161_0x4790f3(0xec)]()});export const JourneyDefSchema=z['lazy'](()=>z['object']({'type':z['literal'](a161_0x4790f3(0x104)),'name':z['string']()['min'](0x1,a161_0x4790f3(0xea)),'description':z[a161_0x4790f3(0xf6)]()['optional'](),'bundle_id':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'bundle_name':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'folder_id':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a161_0x4790f3(0xfc)]()[a161_0x4790f3(0xec)](),'goal':CriteriaDefSchema[a161_0x4790f3(0xec)](),'id':z['string']()[a161_0x4790f3(0xec)](),'version':z[a161_0x4790f3(0xf6)]()['optional'](),'version_number':z[a161_0x4790f3(0xeb)]()[a161_0x4790f3(0xec)](),'stages':z['array'](StageDefSchema)[a161_0x4790f3(0xec)](),'versions':z[a161_0x4790f3(0xfb)](JourneyEntryDefSchema)['optional'](),'journeys':z[a161_0x4790f3(0xfb)](JourneyEntryDefSchema)[a161_0x4790f3(0xec)](),'segments':z['record'](z[a161_0x4790f3(0xf6)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z[a161_0x4790f3(0x109)](z[a161_0x4790f3(0xf6)](),ActivationDefSchema)[a161_0x4790f3(0xec)]()})['refine'](_0x330c34=>{const _0x1d896a=a161_0x4790f3,_0x1719e0=[_0x330c34[_0x1d896a(0xfa)],_0x330c34[_0x1d896a(0xf4)],_0x330c34['versions']]['filter'](_0x2650f1=>Array[_0x1d896a(0xe9)](_0x2650f1)&&_0x2650f1[_0x1d896a(0xff)]>0x0)['length'];return _0x1719e0===0x1;},{'message':a161_0x4790f3(0xfe)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x1857cd,_0x544fcb){var _0x11e0e8=a163_0xc330,_0x133f45=_0x1857cd();while(!![]){try{var _0x1f74aa=-parseInt(_0x11e0e8(0xe3))/0x1*(-parseInt(_0x11e0e8(0xea))/0x2)+-parseInt(_0x11e0e8(0xe2))/0x3*(-parseInt(_0x11e0e8(0xe9))/0x4)+-parseInt(_0x11e0e8(0xe8))/0x5*(-parseInt(_0x11e0e8(0xe4))/0x6)+parseInt(_0x11e0e8(0xec))/0x7+parseInt(_0x11e0e8(0xe7))/0x8*(-parseInt(_0x11e0e8(0xe5))/0x9)+-parseInt(_0x11e0e8(0xe6))/0xa+-parseInt(_0x11e0e8(0xeb))/0xb;if(_0x1f74aa===_0x544fcb)break;else _0x133f45['push'](_0x133f45['shift']());}catch(_0x20bed2){_0x133f45['push'](_0x133f45['shift']());}}}(a163_0x43b0,0x2f1e7));function a163_0xc330(_0x58b985,_0x503228){_0x58b985=_0x58b985-0xe2;var _0x43b048=a163_0x43b0();var _0xc33072=_0x43b048[_0x58b985];return _0xc33072;}function a163_0x43b0(){var _0x38ca26=['84124WxQiaS','18BSOGTy','990902vDSMEF','267519KyQvWc','51XdmKRG','41649CvEFjC','49404ltbVFx','1379313GYEwCt','3589490NzOmOY','8jqhVbw','15izcjWr'];a163_0x43b0=function(){return _0x38ca26;};return a163_0x43b0();}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(_0x1a8f84,_0x19bd51){var _0x25c112=a163_0x9793,_0x5661c6=_0x1a8f84();while(!![]){try{var _0x13eafd=-parseInt(_0x25c112(0xaa))/0x1+-parseInt(_0x25c112(0xb0))/0x2+parseInt(_0x25c112(0xab))/0x3*(-parseInt(_0x25c112(0xae))/0x4)+-parseInt(_0x25c112(0xa9))/0x5+parseInt(_0x25c112(0xaf))/0x6*(-parseInt(_0x25c112(0xb1))/0x7)+-parseInt(_0x25c112(0xad))/0x8+parseInt(_0x25c112(0xac))/0x9;if(_0x13eafd===_0x19bd51)break;else _0x5661c6['push'](_0x5661c6['shift']());}catch(_0x3fb606){_0x5661c6['push'](_0x5661c6['shift']());}}}(a163_0x1c7c,0x94e18));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a163_0x9793(_0x16974b,_0x132e85){_0x16974b=_0x16974b-0xa9;var _0x1c7c2d=a163_0x1c7c();var _0x97937b=_0x1c7c2d[_0x16974b];return _0x97937b;}function a163_0x1c7c(){var _0x4ca0e7=['922359JbDXnk','6XzKcde','40344309hvuOGd','1503096rLRrvs','1617596iHFJLk','2281134iGqprb','1684000VQqFeI','14CbQAHj','1757315cbqbiZ'];a163_0x1c7c=function(){return _0x4ca0e7;};return a163_0x1c7c();}
@@ -1 +1 @@
1
- const a164_0x56efb6=a164_0x2b11;(function(_0x2bf565,_0x5e9df9){const _0x3a0fa1=a164_0x2b11,_0x382871=_0x2bf565();while(!![]){try{const _0x50ff57=parseInt(_0x3a0fa1(0x14e))/0x1*(-parseInt(_0x3a0fa1(0x17e))/0x2)+parseInt(_0x3a0fa1(0x13b))/0x3+parseInt(_0x3a0fa1(0x160))/0x4+parseInt(_0x3a0fa1(0x170))/0x5*(-parseInt(_0x3a0fa1(0x137))/0x6)+-parseInt(_0x3a0fa1(0x15d))/0x7+-parseInt(_0x3a0fa1(0x143))/0x8*(-parseInt(_0x3a0fa1(0x163))/0x9)+parseInt(_0x3a0fa1(0x167))/0xa;if(_0x50ff57===_0x5e9df9)break;else _0x382871['push'](_0x382871['shift']());}catch(_0x84c7a2){_0x382871['push'](_0x382871['shift']());}}}(a164_0x5d6f,0x1e15f));import{z}from'zod';function a164_0x5d6f(){const _0x15dfe8=['column','TimeRange\x20operator\x20requires\x20\x27from\x27','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Between','Value','min','Less','147603RsRBTR','Last','TimeRange\x20operator\x20requires\x20\x27duration\x27','MISSING_BETWEEN_BOUNDS','enum','realtime','timestamp','boolean','LessEqual','Count','TimeWithinPast','day','Greater','include','custom','579271BrKhqC','has','GreaterEqual','605432rnUIjT','Operator\x20\x27','Sum','117dlReFn','array','Column','exclude','1138620VFLvdH','union','week','Equal','\x27\x20requires\x20a\x20value','string','MISSING_TIME_UNIT','max','TimeWithinNext','24890TMEkUd','First','And','all','optional','operator','literal','record','CountDistinct','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','StartWith','EndWith','batch','funnel_stage','2tpueZf','value','discriminatedUnion','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','addIssue','Min','Max','hour','year','258AcdbRC','Contain','Average','second','402954FLMxyN','minute','number','Segment\x20reference\x20must\x20not\x20be\x20empty','duration','object','from','TimeRange','103448TPEwZN','type','lazy','\x27\x20requires\x20a\x20time\x20unit'];a164_0x5d6f=function(){return _0x15dfe8;};return a164_0x5d6f();}export const OperatorTypeSchema=z[a164_0x56efb6(0x152)](['Equal','Greater',a164_0x56efb6(0x14d),a164_0x56efb6(0x15f),a164_0x56efb6(0x156),'In',a164_0x56efb6(0x14a),'Regexp','IsNull',a164_0x56efb6(0x158),'TimeWithinNext',a164_0x56efb6(0x138),a164_0x56efb6(0x17a),a164_0x56efb6(0x17b),a164_0x56efb6(0x142)]);export const TimeUnitSchema=z['enum']([a164_0x56efb6(0x13a),a164_0x56efb6(0x13c),a164_0x56efb6(0x135),a164_0x56efb6(0x159),a164_0x56efb6(0x169),'month',a164_0x56efb6(0x136)]);export const AggregationTypeSchema=z['enum'](['Count',a164_0x56efb6(0x162),'Average','Min',a164_0x56efb6(0x184),'CountDistinct',a164_0x56efb6(0x171),a164_0x56efb6(0x14f)]);const TemporalValueSchema=z[a164_0x56efb6(0x168)]([z[a164_0x56efb6(0x140)]({'timestamp':z[a164_0x56efb6(0x16c)]()}),z[a164_0x56efb6(0x140)]({'last':z[a164_0x56efb6(0x168)]([z['number'](),z[a164_0x56efb6(0x177)](z[a164_0x56efb6(0x16c)](),z[a164_0x56efb6(0x13d)]())]),'unit':z[a164_0x56efb6(0x16c)]()})]),OperatorValueSchema=z[a164_0x56efb6(0x168)]([z[a164_0x56efb6(0x16c)](),z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x155)](),TemporalValueSchema,z['array'](z['union']([z[a164_0x56efb6(0x16c)](),z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x155)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x56efb6(0x16a),a164_0x56efb6(0x15a),a164_0x56efb6(0x15f),'Less',a164_0x56efb6(0x156),'In','Contain',a164_0x56efb6(0x17a),'EndWith','Regexp',a164_0x56efb6(0x158),a164_0x56efb6(0x16f)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a164_0x56efb6(0x16f)]);export const OperatorDefSchema=z[a164_0x56efb6(0x140)]({'type':OperatorTypeSchema,'not':z['boolean']()[a164_0x56efb6(0x174)](),'value':OperatorValueSchema[a164_0x56efb6(0x174)](),'min':z[a164_0x56efb6(0x168)]([z['number'](),z[a164_0x56efb6(0x16c)](),TemporalValueSchema])[a164_0x56efb6(0x174)](),'max':z[a164_0x56efb6(0x168)]([z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x16c)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z[a164_0x56efb6(0x13d)]()['optional'](),'week':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)](),'month':z[a164_0x56efb6(0x13d)]()['optional'](),'year':z['number']()['optional'](),'hour':z['number']()[a164_0x56efb6(0x174)](),'minute':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)](),'second':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)]()})[a164_0x56efb6(0x174)](),'from':z['object']({'last':z['union']([z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x16c)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x56efb6(0x155)]()['optional']()})['superRefine']((_0x583cde,_0x450ce7)=>{const _0xbf8adb=a164_0x56efb6;OPERATORS_REQUIRING_VALUE['has'](_0x583cde[_0xbf8adb(0x144)])&&(_0x583cde[_0xbf8adb(0x17f)]===undefined||_0x583cde['value']===null)&&_0x450ce7['addIssue']({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x161)+_0x583cde['type']+_0xbf8adb(0x16b),'path':[_0xbf8adb(0x17f)]}),_0x583cde[_0xbf8adb(0x144)]==='Between'&&_0x583cde[_0xbf8adb(0x14c)]===undefined&&_0x583cde[_0xbf8adb(0x16e)]===undefined&&_0x450ce7[_0xbf8adb(0x182)]({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x181),'params':{'validationCode':_0xbf8adb(0x151)}}),OPERATORS_REQUIRING_UNIT[_0xbf8adb(0x15e)](_0x583cde[_0xbf8adb(0x144)])&&_0x583cde['value']!==undefined&&!_0x583cde['unit']&&_0x450ce7[_0xbf8adb(0x182)]({'code':'custom','message':_0xbf8adb(0x161)+_0x583cde[_0xbf8adb(0x144)]+_0xbf8adb(0x146),'path':['unit'],'params':{'validationCode':_0xbf8adb(0x16d)}}),_0x583cde[_0xbf8adb(0x144)]===_0xbf8adb(0x142)&&(!_0x583cde[_0xbf8adb(0x13f)]&&_0x450ce7[_0xbf8adb(0x182)]({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x150),'path':[_0xbf8adb(0x13f)]}),!_0x583cde[_0xbf8adb(0x141)]&&_0x450ce7[_0xbf8adb(0x182)]({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x148),'path':[_0xbf8adb(0x141)]}));});export const ArrayMatchingSchema=z[a164_0x56efb6(0x168)]([z['literal']('any'),z[a164_0x56efb6(0x176)](a164_0x56efb6(0x173)),z[a164_0x56efb6(0x140)]({'atLeast':z['number']()}),z[a164_0x56efb6(0x140)]({'atMost':z[a164_0x56efb6(0x13d)]()}),z[a164_0x56efb6(0x140)]({'exactly':z['number']()})]);export const AggregationDefSchema=z[a164_0x56efb6(0x180)](a164_0x56efb6(0x144),[z['object']({'type':z['enum']([a164_0x56efb6(0x162),a164_0x56efb6(0x183),'Max',a164_0x56efb6(0x139)]),'column':z['string'](),'groupingColumns':z[a164_0x56efb6(0x164)](z[a164_0x56efb6(0x16c)]())[a164_0x56efb6(0x174)]()}),z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x157)),'groupingColumns':z[a164_0x56efb6(0x164)](z[a164_0x56efb6(0x16c)]())['optional']()}),z['object']({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x178)),'columns':z[a164_0x56efb6(0x164)](z[a164_0x56efb6(0x16c)]())}),z['object']({'type':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x171),a164_0x56efb6(0x14f)]),'column':z['string'](),'orderColumn':z[a164_0x56efb6(0x16c)](),'groupingColumns':z['array'](z[a164_0x56efb6(0x16c)]())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x56efb6(0x158),'TimeWithinNext',a164_0x56efb6(0x142)]);export const FilterColumnConditionDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x165)),'column':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x56efb6(0x174)]()})['superRefine']((_0x8d7d8,_0x1fc318)=>{const _0xf57221=a164_0x56efb6,_0x26e1ce=_0x8d7d8['operator']['type'];_0x8d7d8[_0xf57221(0x147)]===_0xf57221(0x154)?!TIMESTAMP_OPERATORS['has'](_0x26e1ce)&&_0x1fc318[_0xf57221(0x182)]({'code':_0xf57221(0x15c),'message':_0xf57221(0x149)+_0x26e1ce+'\x27)','path':[_0xf57221(0x175),_0xf57221(0x144)]}):TIMESTAMP_OPERATORS['has'](_0x26e1ce)&&_0x1fc318[_0xf57221(0x182)]({'code':_0xf57221(0x15c),'message':_0xf57221(0x161)+_0x26e1ce+_0xf57221(0x179),'path':[_0xf57221(0x175),_0xf57221(0x144)]});});export const FilterRuleDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x172)),'conditions':z[a164_0x56efb6(0x164)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z[a164_0x56efb6(0x140)]({'type':z['literal'](a164_0x56efb6(0x14b)),'attribute':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x56efb6(0x174)](),'exclude':z[a164_0x56efb6(0x155)]()[a164_0x56efb6(0x174)](),'aggregation':AggregationDefSchema[a164_0x56efb6(0x174)](),'source':z[a164_0x56efb6(0x16c)]()['optional'](),'filter':FilterRuleDefSchema[a164_0x56efb6(0x174)](),'limit':z[a164_0x56efb6(0x13d)]()['optional']()}));export const BehaviorConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z[a164_0x56efb6(0x140)]({'type':z['literal']('Behavior'),'attribute':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema[a164_0x56efb6(0x174)](),'source':z['string']()[a164_0x56efb6(0x174)](),'filter':FilterRuleDefSchema[a164_0x56efb6(0x174)](),'timeWindow':TimeWindowDefSchema[a164_0x56efb6(0x174)](),'limit':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)]()}));export const ColumnConditionDefSchema=z[a164_0x56efb6(0x140)]({'type':z['literal'](a164_0x56efb6(0x165)),'column':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z['object']({'type':z['enum']([a164_0x56efb6(0x172),'Or']),'conditions':z[a164_0x56efb6(0x164)](ConditionDefSchema),'description':z['string']()['optional']()}));function a164_0x2b11(_0x29342,_0x2fde75){_0x29342=_0x29342-0x135;const _0x5d6f5a=a164_0x5d6f();let _0x2b1151=_0x5d6f5a[_0x29342];return _0x2b1151;}export const SegmentRefConditionDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x15b),a164_0x56efb6(0x166)]),'segment':z[a164_0x56efb6(0x16c)]()[a164_0x56efb6(0x14c)](0x1,a164_0x56efb6(0x13e))});export const ConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x56efb6(0x145)](()=>z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x172),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x56efb6(0x16c)]()['optional']()}));export const SegmentDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)]('segment')[a164_0x56efb6(0x174)](),'name':z[a164_0x56efb6(0x16c)]()[a164_0x56efb6(0x14c)](0x1,'Segment\x20name\x20is\x20required'),'description':z[a164_0x56efb6(0x16c)]()[a164_0x56efb6(0x174)](),'folder':z[a164_0x56efb6(0x16c)]()['optional'](),'rule':RuleDefSchema['optional'](),'kind':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x17c),a164_0x56efb6(0x153),a164_0x56efb6(0x17d)])['optional'](),'visible':z['boolean']()[a164_0x56efb6(0x174)](),'activations':z[a164_0x56efb6(0x164)](z['any']())[a164_0x56efb6(0x174)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a164_0x25a17e=a164_0x30a8;(function(_0x2aa1fd,_0x39613d){const _0x46a9f3=a164_0x30a8,_0xc8e9c=_0x2aa1fd();while(!![]){try{const _0x19793e=-parseInt(_0x46a9f3(0x89))/0x1+-parseInt(_0x46a9f3(0x7f))/0x2*(parseInt(_0x46a9f3(0xb3))/0x3)+-parseInt(_0x46a9f3(0x74))/0x4+-parseInt(_0x46a9f3(0xad))/0x5+parseInt(_0x46a9f3(0xb0))/0x6+parseInt(_0x46a9f3(0x9b))/0x7+-parseInt(_0x46a9f3(0xb9))/0x8*(-parseInt(_0x46a9f3(0x83))/0x9);if(_0x19793e===_0x39613d)break;else _0xc8e9c['push'](_0xc8e9c['shift']());}catch(_0xc1833d){_0xc8e9c['push'](_0xc8e9c['shift']());}}}(a164_0x3eff,0x858ad));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xb2),a164_0x25a17e(0x91),a164_0x25a17e(0x98),a164_0x25a17e(0x90),a164_0x25a17e(0xa1),'In','Between','Regexp',a164_0x25a17e(0x85),a164_0x25a17e(0x6f),'TimeWithinNext',a164_0x25a17e(0x99),'StartWith',a164_0x25a17e(0x96),a164_0x25a17e(0x7d)]);export const TimeUnitSchema=z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0x9c),a164_0x25a17e(0x6d),a164_0x25a17e(0x94),a164_0x25a17e(0xb6),a164_0x25a17e(0x78),a164_0x25a17e(0x8f),a164_0x25a17e(0x77)]);export const AggregationTypeSchema=z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0x80),a164_0x25a17e(0x7b),'Average','Min',a164_0x25a17e(0x8a),a164_0x25a17e(0xa8),a164_0x25a17e(0xac),a164_0x25a17e(0x7e)]);const TemporalValueSchema=z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x76)]({'timestamp':z[a164_0x25a17e(0x73)]()}),z[a164_0x25a17e(0x76)]({'last':z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x82)](z[a164_0x25a17e(0x73)](),z['number']())]),'unit':z[a164_0x25a17e(0x73)]()})]),OperatorValueSchema=z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x73)](),z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x81)](),TemporalValueSchema,z[a164_0x25a17e(0x9a)](z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x73)](),z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x81)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x25a17e(0xb2),a164_0x25a17e(0x91),a164_0x25a17e(0x90),a164_0x25a17e(0x98),a164_0x25a17e(0xa1),'In','Contain','StartWith','EndWith',a164_0x25a17e(0xb7),a164_0x25a17e(0x6f),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a164_0x25a17e(0x6f),a164_0x25a17e(0xb4)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a164_0x25a17e(0x81)]()['optional'](),'value':OperatorValueSchema[a164_0x25a17e(0x92)](),'min':z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x73)](),TemporalValueSchema])[a164_0x25a17e(0x92)](),'max':z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0xa7)](),z['string'](),TemporalValueSchema])[a164_0x25a17e(0x92)](),'unit':TimeUnitSchema[a164_0x25a17e(0x92)](),'duration':z[a164_0x25a17e(0x76)]({'day':z[a164_0x25a17e(0xa7)]()['optional'](),'week':z[a164_0x25a17e(0xa7)]()['optional'](),'month':z[a164_0x25a17e(0xa7)]()['optional'](),'year':z[a164_0x25a17e(0xa7)]()[a164_0x25a17e(0x92)](),'hour':z[a164_0x25a17e(0xa7)]()['optional'](),'minute':z[a164_0x25a17e(0xa7)]()['optional'](),'second':z[a164_0x25a17e(0xa7)]()[a164_0x25a17e(0x92)]()})['optional'](),'from':z[a164_0x25a17e(0x76)]({'last':z['union']([z[a164_0x25a17e(0xa7)](),z['string']()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x25a17e(0x81)]()['optional']()})[a164_0x25a17e(0xa9)]((_0x5cce6d,_0x1bbe9e)=>{const _0x1f75ff=a164_0x25a17e;OPERATORS_REQUIRING_VALUE['has'](_0x5cce6d[_0x1f75ff(0xa6)])&&(_0x5cce6d[_0x1f75ff(0x95)]===undefined||_0x5cce6d[_0x1f75ff(0x95)]===null)&&_0x1bbe9e['addIssue']({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0x6e)+_0x5cce6d[_0x1f75ff(0xa6)]+_0x1f75ff(0xae),'path':[_0x1f75ff(0x95)]}),_0x5cce6d[_0x1f75ff(0xa6)]==='Between'&&_0x5cce6d['min']===undefined&&_0x5cce6d[_0x1f75ff(0x8c)]===undefined&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':'custom','message':_0x1f75ff(0xaf),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0x1f75ff(0x75)](_0x5cce6d[_0x1f75ff(0xa6)])&&_0x5cce6d[_0x1f75ff(0x95)]!==undefined&&!_0x5cce6d[_0x1f75ff(0x8b)]&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0x6e)+_0x5cce6d['type']+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x1f75ff(0x8b)],'params':{'validationCode':_0x1f75ff(0x9d)}}),_0x5cce6d[_0x1f75ff(0xa6)]===_0x1f75ff(0x7d)&&(!_0x5cce6d[_0x1f75ff(0x70)]&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0xb8),'path':[_0x1f75ff(0x70)]}),!_0x5cce6d[_0x1f75ff(0x8e)]&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0x84),'path':['from']}));});function a164_0x30a8(_0x131158,_0x1433b8){_0x131158=_0x131158-0x6d;const _0x3effa5=a164_0x3eff();let _0x30a84b=_0x3effa5[_0x131158];return _0x30a84b;}export const ArrayMatchingSchema=z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x87)](a164_0x25a17e(0x71)),z['literal'](a164_0x25a17e(0x9e)),z['object']({'atLeast':z[a164_0x25a17e(0xa7)]()}),z[a164_0x25a17e(0x76)]({'atMost':z[a164_0x25a17e(0xa7)]()}),z[a164_0x25a17e(0x76)]({'exactly':z['number']()})]);export const AggregationDefSchema=z['discriminatedUnion']('type',[z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0x7b),a164_0x25a17e(0xa5),a164_0x25a17e(0x8a),a164_0x25a17e(0x72)]),'column':z[a164_0x25a17e(0x73)](),'groupingColumns':z['array'](z['string']())[a164_0x25a17e(0x92)]()}),z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0x80)),'groupingColumns':z[a164_0x25a17e(0x9a)](z['string']())['optional']()}),z['object']({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0xa8)),'columns':z[a164_0x25a17e(0x9a)](z[a164_0x25a17e(0x73)]())}),z[a164_0x25a17e(0x76)]({'type':z['enum']([a164_0x25a17e(0xac),'Last']),'column':z[a164_0x25a17e(0x73)](),'orderColumn':z[a164_0x25a17e(0x73)](),'groupingColumns':z['array'](z[a164_0x25a17e(0x73)]())[a164_0x25a17e(0x92)]()})]);export const TimeWindowDefSchema=z[a164_0x25a17e(0x76)]({'duration':z[a164_0x25a17e(0xa7)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x25a17e(0x6f),a164_0x25a17e(0xb4),'TimeRange']);export const FilterColumnConditionDefSchema=z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)]('Column'),'column':z[a164_0x25a17e(0x73)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})[a164_0x25a17e(0xa9)]((_0x4aa514,_0x5e0774)=>{const _0x518dd6=a164_0x25a17e,_0x144bb6=_0x4aa514[_0x518dd6(0x9f)][_0x518dd6(0xa6)];_0x4aa514[_0x518dd6(0xa4)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x518dd6(0x75)](_0x144bb6)&&_0x5e0774[_0x518dd6(0x86)]({'code':_0x518dd6(0x79),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x144bb6+'\x27)','path':['operator',_0x518dd6(0xa6)]}):TIMESTAMP_OPERATORS[_0x518dd6(0x75)](_0x144bb6)&&_0x5e0774[_0x518dd6(0x86)]({'code':_0x518dd6(0x79),'message':'Operator\x20\x27'+_0x144bb6+_0x518dd6(0x97),'path':[_0x518dd6(0x9f),_0x518dd6(0xa6)]});});function a164_0x3eff(){const _0x3c752f=['First','3504720bbGxFl','\x27\x20requires\x20a\x20value','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','3642906RvocYu','realtime','Equal','24RAkzNS','TimeWithinNext','Value','day','Regexp','TimeRange\x20operator\x20requires\x20\x27duration\x27','12968XFtXrj','minute','Operator\x20\x27','TimeWithinPast','duration','any','Average','string','4192840fHtjod','has','object','year','week','custom','funnel_stage','Sum','enum','TimeRange','Last','124024YHmfKI','Count','boolean','record','11241RbjqDy','TimeRange\x20operator\x20requires\x20\x27from\x27','IsNull','addIssue','literal','include','2277CaTRGu','Max','unit','max','exclude','from','month','GreaterEqual','Greater','optional','union','hour','value','EndWith','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Less','Contain','array','1139152aejPUx','second','MISSING_TIME_UNIT','all','operator','batch','LessEqual','lazy','Segment\x20reference\x20must\x20not\x20be\x20empty','column','Min','type','number','CountDistinct','superRefine','Segment\x20name\x20is\x20required','And'];a164_0x3eff=function(){return _0x3c752f;};return a164_0x3eff();}export const FilterRuleDefSchema=z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0xab)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x25a17e(0xa2)](()=>z['object']({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0xb5)),'attribute':z[a164_0x25a17e(0x73)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x25a17e(0x81)]()['optional'](),'aggregation':AggregationDefSchema[a164_0x25a17e(0x92)](),'source':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)](),'filter':FilterRuleDefSchema[a164_0x25a17e(0x92)](),'limit':z['number']()[a164_0x25a17e(0x92)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)]('Behavior'),'attribute':z[a164_0x25a17e(0x73)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x25a17e(0x81)]()[a164_0x25a17e(0x92)](),'aggregation':AggregationDefSchema[a164_0x25a17e(0x92)](),'source':z[a164_0x25a17e(0x73)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a164_0x25a17e(0x92)](),'limit':z[a164_0x25a17e(0xa7)]()[a164_0x25a17e(0x92)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x25a17e(0x87)]('Column'),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xab),'Or']),'conditions':z[a164_0x25a17e(0x9a)](ConditionDefSchema),'description':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z['enum']([a164_0x25a17e(0x88),a164_0x25a17e(0x8d)]),'segment':z[a164_0x25a17e(0x73)]()['min'](0x1,a164_0x25a17e(0xa3))});export const ConditionDefSchema=z['lazy'](()=>z[a164_0x25a17e(0x93)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x25a17e(0xa2)](()=>z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xab),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a164_0x25a17e(0x92)]()}));export const SegmentDefSchema=z[a164_0x25a17e(0x76)]({'type':z['literal']('segment')[a164_0x25a17e(0x92)](),'name':z[a164_0x25a17e(0x73)]()['min'](0x1,a164_0x25a17e(0xaa)),'description':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)](),'folder':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)](),'rule':RuleDefSchema[a164_0x25a17e(0x92)](),'kind':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xa0),a164_0x25a17e(0xb1),a164_0x25a17e(0x7a)])[a164_0x25a17e(0x92)](),'visible':z[a164_0x25a17e(0x81)]()[a164_0x25a17e(0x92)](),'activations':z['array'](z['any']())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a165_0x32704c=a165_0x49ae;(function(_0x59a00f,_0x573620){const _0x289b5b=a165_0x49ae,_0x2dc3f5=_0x59a00f();while(!![]){try{const _0x49df69=-parseInt(_0x289b5b(0x146))/0x1+parseInt(_0x289b5b(0x12f))/0x2*(-parseInt(_0x289b5b(0x134))/0x3)+parseInt(_0x289b5b(0x149))/0x4+-parseInt(_0x289b5b(0x132))/0x5+parseInt(_0x289b5b(0x12a))/0x6+-parseInt(_0x289b5b(0x143))/0x7*(parseInt(_0x289b5b(0x13e))/0x8)+parseInt(_0x289b5b(0x12e))/0x9*(parseInt(_0x289b5b(0x129))/0xa);if(_0x49df69===_0x573620)break;else _0x2dc3f5['push'](_0x2dc3f5['shift']());}catch(_0x53f0c9){_0x2dc3f5['push'](_0x2dc3f5['shift']());}}}(a165_0x1ad1,0xde800));import{readFileSync}from'fs';import*as a165_0x57cc13 from'path';import*as a165_0x2dfc04 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([a165_0x32704c(0x148),a165_0x32704c(0x13b)]);function a165_0x1ad1(){const _0x59c930=['type','7241800VdLMHK','basename','948nUStzM','map','campaign_type','segment','skipped','relative','has','push','parseDocument','not\x20a\x20','5239384rDMIEB','length','warnings','template','valid','7Egitso','filterType','object','282245bmOXjr','campaign','email','3175968zHNicB','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','YAML_PARSE_ERROR','YAML\x20parse\x20error:\x20','10TWNadM','1530426TcmBAz','toJSON','journey','utf-8','35778573CEtiZH','10934HcwYHh','message'];a165_0x1ad1=function(){return _0x59c930;};return a165_0x1ad1();}export function isJourneyDef(_0x221b63){const _0x29b31a=a165_0x32704c;return typeof _0x221b63===_0x29b31a(0x145)&&_0x221b63!==null&&_0x29b31a(0x131)in _0x221b63&&_0x221b63[_0x29b31a(0x131)]===_0x29b31a(0x12c);}export function isCampaignDef(_0x56bbf5){const _0x33a6d7=a165_0x32704c;if(typeof _0x56bbf5!==_0x33a6d7(0x145)||_0x56bbf5===null)return![];const _0x543a2a=_0x56bbf5,_0x4a38e5=VALID_CAMPAIGN_TYPES[_0x33a6d7(0x13a)](_0x543a2a[_0x33a6d7(0x136)]);if(_0x543a2a[_0x33a6d7(0x131)]===_0x33a6d7(0x147)&&_0x4a38e5)return!![];if(_0x4a38e5&&!_0x543a2a[_0x33a6d7(0x131)])return!![];return![];}function a165_0x49ae(_0x286d2a,_0x512450){_0x286d2a=_0x286d2a-0x127;const _0x1ad1b8=a165_0x1ad1();let _0x49ae50=_0x1ad1b8[_0x286d2a];return _0x49ae50;}export function isTemplateDef(_0x5bf48f){const _0x280625=a165_0x32704c;return typeof _0x5bf48f===_0x280625(0x145)&&_0x5bf48f!==null&&_0x280625(0x131)in _0x5bf48f&&_0x5bf48f[_0x280625(0x131)]===_0x280625(0x141);}export function isValidationResult(_0xc413f0){const _0x432006=a165_0x32704c;return!(_0x432006(0x138)in _0xc413f0);}export function createParseErrorResult(_0x513a33,_0x436b02,_0x114d57,_0x24cbba,_0x2c3e0b=a165_0x32704c(0x137)){const _0x2090a0=a165_0x32704c;return{'filePath':_0x513a33,'relativePath':_0x436b02,'source':_0x114d57,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x2090a0(0x127),'message':_0x24cbba}],'warnings':[]},'fileType':_0x2c3e0b};}export function validateYamlFile(_0x4867ae,_0x3a1943,_0x3b6117={}){const _0x2d5a49=a165_0x32704c,_0x2d50fe=a165_0x57cc13[_0x2d5a49(0x139)](_0x3a1943,_0x4867ae)||a165_0x57cc13[_0x2d5a49(0x133)](_0x4867ae);try{const _0x54f8bd=readFileSync(_0x4867ae,_0x2d5a49(0x12d)),_0x184f11=a165_0x2dfc04[_0x2d5a49(0x13c)](_0x54f8bd),_0x3c7b7c=_0x184f11[_0x2d5a49(0x12b)]();if(!_0x3c7b7c)return createParseErrorResult(_0x4867ae,_0x2d50fe,_0x54f8bd,_0x2d5a49(0x14a));let _0x50eaf0;if(isJourneyDef(_0x3c7b7c))_0x50eaf0=_0x2d5a49(0x12c);else{if(isCampaignDef(_0x3c7b7c))_0x50eaf0=_0x2d5a49(0x147);else isTemplateDef(_0x3c7b7c)?_0x50eaf0='template':_0x50eaf0=_0x2d5a49(0x137);}if(_0x3b6117[_0x2d5a49(0x144)]&&_0x50eaf0!==_0x3b6117[_0x2d5a49(0x144)])return{'filePath':_0x4867ae,'relativePath':_0x2d50fe,'skipped':!![],'reason':_0x2d5a49(0x13d)+_0x3b6117[_0x2d5a49(0x144)]};const _0x4cb360={'source':_0x54f8bd,'document':_0x184f11};let _0x1d018f;if(_0x50eaf0===_0x2d5a49(0x12c))_0x1d018f=validateJourneyDef(_0x3c7b7c,_0x4cb360);else{if(_0x50eaf0===_0x2d5a49(0x147))_0x1d018f=validateCampaignDef(_0x3c7b7c,_0x4cb360);else _0x50eaf0===_0x2d5a49(0x141)?_0x1d018f=validateTemplateDef(_0x3c7b7c,_0x4cb360):_0x1d018f=validateSegmentDef(_0x3c7b7c,_0x4cb360);}return{'filePath':_0x4867ae,'relativePath':_0x2d50fe,'source':_0x54f8bd,'result':_0x1d018f,'fileType':_0x50eaf0};}catch(_0x2874fc){const _0x22a633=_0x2874fc instanceof Error?_0x2874fc[_0x2d5a49(0x130)]:String(_0x2874fc);return createParseErrorResult(_0x4867ae,_0x2d50fe,'',_0x2d5a49(0x128)+_0x22a633);}}export function validateYamlFiles(_0x2d689d,_0x266d0e,_0x52a6d9={}){const _0x1ae604=a165_0x32704c;return _0x2d689d[_0x1ae604(0x135)](_0x59c6d9=>validateYamlFile(_0x59c6d9,_0x266d0e,_0x52a6d9));}export function calculateSummary(_0x438e17){const _0x22f125=a165_0x32704c;let _0x3b9f71=0x0,_0x236f99=0x0,_0x34bf49=0x0,_0x4a0523=0x0;for(const _0x5e54d1 of _0x438e17){if(!isValidationResult(_0x5e54d1)){_0x4a0523++;continue;}_0x5e54d1['result'][_0x22f125(0x142)]?_0x3b9f71++:_0x236f99++,_0x34bf49+=_0x5e54d1['result'][_0x22f125(0x140)][_0x22f125(0x13f)];}return{'validCount':_0x3b9f71,'invalidCount':_0x236f99,'warningCount':_0x34bf49,'skippedCount':_0x4a0523,'hasErrors':_0x236f99>0x0};}
1
+ const a165_0x375ec0=a165_0x1bb1;(function(_0x82e433,_0x456317){const _0x54c09a=a165_0x1bb1,_0x202e9a=_0x82e433();while(!![]){try{const _0x1fc260=parseInt(_0x54c09a(0xd2))/0x1+-parseInt(_0x54c09a(0xca))/0x2*(-parseInt(_0x54c09a(0xbc))/0x3)+-parseInt(_0x54c09a(0xba))/0x4*(-parseInt(_0x54c09a(0xc7))/0x5)+-parseInt(_0x54c09a(0xc5))/0x6+parseInt(_0x54c09a(0xd1))/0x7+parseInt(_0x54c09a(0xbe))/0x8*(parseInt(_0x54c09a(0xd6))/0x9)+-parseInt(_0x54c09a(0xd3))/0xa;if(_0x1fc260===_0x456317)break;else _0x202e9a['push'](_0x202e9a['shift']());}catch(_0x5d501d){_0x202e9a['push'](_0x202e9a['shift']());}}}(a165_0x2077,0x72268));import{readFileSync}from'fs';import*as a165_0x136169 from'path';import*as a165_0x25210a 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','push']);export function isJourneyDef(_0x1413ed){const _0x32be89=a165_0x1bb1;return typeof _0x1413ed==='object'&&_0x1413ed!==null&&_0x32be89(0xce)in _0x1413ed&&_0x1413ed[_0x32be89(0xce)]===_0x32be89(0xc6);}function a165_0x2077(){const _0x5c6c64=['result','template','object','has','relative','YAML_PARSE_ERROR','4900206bBtVaP','journey','5fjBbvv','not\x20a\x20','valid','4NADBoY','utf-8','skipped','filterType','type','campaign','toJSON','3132325qFeiAd','53322vAjwqB','16958660SzLTGK','map','error','9FTnfNM','segment','message','parseDocument','3299980KEKxuz','campaign_type','1169292curael','length','6998456ezzpUh'];a165_0x2077=function(){return _0x5c6c64;};return a165_0x2077();}export function isCampaignDef(_0x2276d6){const _0x1c55e1=a165_0x1bb1;if(typeof _0x2276d6!=='object'||_0x2276d6===null)return![];const _0x4b093d=_0x2276d6,_0xba2bce=VALID_CAMPAIGN_TYPES[_0x1c55e1(0xc2)](_0x4b093d[_0x1c55e1(0xbb)]);if(_0x4b093d['type']==='campaign'&&_0xba2bce)return!![];if(_0xba2bce&&!_0x4b093d[_0x1c55e1(0xce)])return!![];return![];}export function isTemplateDef(_0x5b4687){const _0x3c0cfd=a165_0x1bb1;return typeof _0x5b4687===_0x3c0cfd(0xc1)&&_0x5b4687!==null&&_0x3c0cfd(0xce)in _0x5b4687&&_0x5b4687[_0x3c0cfd(0xce)]===_0x3c0cfd(0xc0);}export function isValidationResult(_0x2a62d8){const _0x3077a7=a165_0x1bb1;return!(_0x3077a7(0xcc)in _0x2a62d8);}export function createParseErrorResult(_0x2b7e1a,_0x4fe61e,_0x23dd84,_0x5a4bb9,_0x482b75=a165_0x375ec0(0xd7)){const _0x5650dd=a165_0x375ec0;return{'filePath':_0x2b7e1a,'relativePath':_0x4fe61e,'source':_0x23dd84,'result':{'valid':![],'errors':[{'level':_0x5650dd(0xd5),'path':'','code':_0x5650dd(0xc4),'message':_0x5a4bb9}],'warnings':[]},'fileType':_0x482b75};}function a165_0x1bb1(_0x57e4e7,_0x22612f){_0x57e4e7=_0x57e4e7-0xb9;const _0x2077bd=a165_0x2077();let _0x1bb1f6=_0x2077bd[_0x57e4e7];return _0x1bb1f6;}export function validateYamlFile(_0x58379b,_0x40f579,_0xd98f4b={}){const _0x120642=a165_0x375ec0,_0x572483=a165_0x136169[_0x120642(0xc3)](_0x40f579,_0x58379b)||a165_0x136169['basename'](_0x58379b);try{const _0x28128c=readFileSync(_0x58379b,_0x120642(0xcb)),_0x5d8aaf=a165_0x25210a[_0x120642(0xb9)](_0x28128c),_0x212ddd=_0x5d8aaf[_0x120642(0xd0)]();if(!_0x212ddd)return createParseErrorResult(_0x58379b,_0x572483,_0x28128c,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x45502d;if(isJourneyDef(_0x212ddd))_0x45502d=_0x120642(0xc6);else{if(isCampaignDef(_0x212ddd))_0x45502d='campaign';else isTemplateDef(_0x212ddd)?_0x45502d=_0x120642(0xc0):_0x45502d=_0x120642(0xd7);}if(_0xd98f4b[_0x120642(0xcd)]&&_0x45502d!==_0xd98f4b[_0x120642(0xcd)])return{'filePath':_0x58379b,'relativePath':_0x572483,'skipped':!![],'reason':_0x120642(0xc8)+_0xd98f4b[_0x120642(0xcd)]};const _0x2afa9a={'source':_0x28128c,'document':_0x5d8aaf};let _0x900906;if(_0x45502d==='journey')_0x900906=validateJourneyDef(_0x212ddd,_0x2afa9a);else{if(_0x45502d===_0x120642(0xcf))_0x900906=validateCampaignDef(_0x212ddd,_0x2afa9a);else _0x45502d===_0x120642(0xc0)?_0x900906=validateTemplateDef(_0x212ddd,_0x2afa9a):_0x900906=validateSegmentDef(_0x212ddd,_0x2afa9a);}return{'filePath':_0x58379b,'relativePath':_0x572483,'source':_0x28128c,'result':_0x900906,'fileType':_0x45502d};}catch(_0x3df204){const _0x11602d=_0x3df204 instanceof Error?_0x3df204[_0x120642(0xd8)]:String(_0x3df204);return createParseErrorResult(_0x58379b,_0x572483,'','YAML\x20parse\x20error:\x20'+_0x11602d);}}export function validateYamlFiles(_0x269633,_0x522a5d,_0x2c5c96={}){const _0x2577bc=a165_0x375ec0;return _0x269633[_0x2577bc(0xd4)](_0x514242=>validateYamlFile(_0x514242,_0x522a5d,_0x2c5c96));}export function calculateSummary(_0x4eac54){const _0x5f18f1=a165_0x375ec0;let _0x3e2b39=0x0,_0x32e00b=0x0,_0x1b506a=0x0,_0x96f044=0x0;for(const _0x300842 of _0x4eac54){if(!isValidationResult(_0x300842)){_0x96f044++;continue;}_0x300842[_0x5f18f1(0xbf)][_0x5f18f1(0xc9)]?_0x3e2b39++:_0x32e00b++,_0x1b506a+=_0x300842[_0x5f18f1(0xbf)]['warnings'][_0x5f18f1(0xbd)];}return{'validCount':_0x3e2b39,'invalidCount':_0x32e00b,'warningCount':_0x1b506a,'skippedCount':_0x96f044,'hasErrors':_0x32e00b>0x0};}