@treasuredata/tdx 2026.7.2 → 2026.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.d.ts.map +1 -1
  10. package/dist/commands/auth-command.js +1 -1
  11. package/dist/commands/auth-command.js.map +1 -1
  12. package/dist/commands/cas-command.js +1 -1
  13. package/dist/commands/cas-segment-command.js +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/claude-command.d.ts.map +1 -1
  16. package/dist/commands/claude-command.js +1 -1
  17. package/dist/commands/claude-command.js.map +1 -1
  18. package/dist/commands/claude-statusline-command.js +1 -1
  19. package/dist/commands/claude-usage-command.js +1 -1
  20. package/dist/commands/command.js +1 -1
  21. package/dist/commands/connection-command.js +1 -1
  22. package/dist/commands/databases.js +1 -1
  23. package/dist/commands/delivery-command.js +1 -1
  24. package/dist/commands/describe.js +1 -1
  25. package/dist/commands/engage-campaign-pull-command.js +1 -1
  26. package/dist/commands/engage-campaign-push-command.js +1 -1
  27. package/dist/commands/engage-campaign-validate-command.js +1 -1
  28. package/dist/commands/engage-command.js +1 -1
  29. package/dist/commands/engage-template-pull-command.js +1 -1
  30. package/dist/commands/engage-template-push-command.js +1 -1
  31. package/dist/commands/engage-template-validate-command.js +1 -1
  32. package/dist/commands/job-command.js +1 -1
  33. package/dist/commands/journey-command.js +1 -1
  34. package/dist/commands/journey-validate-command.js +1 -1
  35. package/dist/commands/llm-command.js +1 -1
  36. package/dist/commands/mcp-command.js +1 -1
  37. package/dist/commands/parent-segment-command.js +1 -1
  38. package/dist/commands/policy-command.js +1 -1
  39. package/dist/commands/profile-command.js +1 -1
  40. package/dist/commands/profiles-command.js +1 -1
  41. package/dist/commands/query-command.js +1 -1
  42. package/dist/commands/schedule-command.js +1 -1
  43. package/dist/commands/segment-command.js +1 -1
  44. package/dist/commands/segment-create-command.js +1 -1
  45. package/dist/commands/segment-fields-command.js +1 -1
  46. package/dist/commands/segment-move-command.js +1 -1
  47. package/dist/commands/segment-pull-command.js +1 -1
  48. package/dist/commands/segment-push-command.js +1 -1
  49. package/dist/commands/segment-update-command.js +1 -1
  50. package/dist/commands/segment-use-command.js +1 -1
  51. package/dist/commands/segment-validate-command.js +1 -1
  52. package/dist/commands/segments.js +1 -1
  53. package/dist/commands/show.js +1 -1
  54. package/dist/commands/status-command.js +1 -1
  55. package/dist/commands/table-deleted.js +1 -1
  56. package/dist/commands/tables.js +1 -1
  57. package/dist/commands/unset-command.js +1 -1
  58. package/dist/commands/upgrade-command.js +1 -1
  59. package/dist/commands/use-command.js +1 -1
  60. package/dist/commands/user-command.js +1 -1
  61. package/dist/commands/work-command.js +1 -1
  62. package/dist/commands/workflow-command.js +1 -1
  63. package/dist/core/auth.js +1 -1
  64. package/dist/core/command-output.js +1 -1
  65. package/dist/core/config.js +1 -1
  66. package/dist/core/connection-cache.js +1 -1
  67. package/dist/core/constants.js +1 -1
  68. package/dist/core/credential-cache.js +1 -1
  69. package/dist/core/global-context.js +1 -1
  70. package/dist/core/keychain.js +1 -1
  71. package/dist/core/oauth-keychain.js +1 -1
  72. package/dist/core/oauth.d.ts +11 -2
  73. package/dist/core/oauth.d.ts.map +1 -1
  74. package/dist/core/oauth.js +1 -1
  75. package/dist/core/oauth.js.map +1 -1
  76. package/dist/core/profile.js +1 -1
  77. package/dist/core/project-config.js +1 -1
  78. package/dist/core/session.js +1 -1
  79. package/dist/core/user-cache.js +1 -1
  80. package/dist/core/version.js +1 -1
  81. package/dist/index.js +1 -1
  82. package/dist/mcp/server.js +1 -1
  83. package/dist/mcp/tools/index.js +1 -1
  84. package/dist/mcp/tools/tdx-run.js +1 -1
  85. package/dist/mcp/tools/tdx-search.js +1 -1
  86. package/dist/mcp/tools/work-create-item.js +1 -1
  87. package/dist/mcp/utils.js +1 -1
  88. package/dist/proxy/claude-usage-tracker.js +1 -1
  89. package/dist/proxy/passthrough-server.d.ts +16 -0
  90. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  91. package/dist/proxy/passthrough-server.js +1 -1
  92. package/dist/proxy/passthrough-server.js.map +1 -1
  93. package/dist/proxy/sse-usage-parser.js +1 -1
  94. package/dist/sdk/agent/agent-config.js +1 -1
  95. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  96. package/dist/sdk/agent/agent-yaml.js +1 -1
  97. package/dist/sdk/agent/test/evaluator.js +1 -1
  98. package/dist/sdk/agent/test/executor.js +1 -1
  99. package/dist/sdk/agent/test/index.js +1 -1
  100. package/dist/sdk/agent/test/output.js +1 -1
  101. package/dist/sdk/agent/test/parser.js +1 -1
  102. package/dist/sdk/agent/tool-target-registry.js +1 -1
  103. package/dist/sdk/api.js +1 -1
  104. package/dist/sdk/cas/cas-api-client.js +1 -1
  105. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  106. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  107. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  108. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  109. package/dist/sdk/cas/index.js +1 -1
  110. package/dist/sdk/cas/pull-workflow.js +1 -1
  111. package/dist/sdk/cas/push-workflow.js +1 -1
  112. package/dist/sdk/cas/validate-files.js +1 -1
  113. package/dist/sdk/client/cdp-api-client.js +1 -1
  114. package/dist/sdk/client/delivery-api-client.js +1 -1
  115. package/dist/sdk/client/endpoints.js +1 -1
  116. package/dist/sdk/client/engage-api-client.js +1 -1
  117. package/dist/sdk/client/http-client.js +1 -1
  118. package/dist/sdk/client/llm-api-client.js +1 -1
  119. package/dist/sdk/client/oauth-refresh.d.ts +5 -1
  120. package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
  121. package/dist/sdk/client/oauth-refresh.js +1 -1
  122. package/dist/sdk/client/oauth-refresh.js.map +1 -1
  123. package/dist/sdk/client/rate-limiter.js +1 -1
  124. package/dist/sdk/client/td-api-client.js +1 -1
  125. package/dist/sdk/client/trino-api-client.js +1 -1
  126. package/dist/sdk/client/workflow-client.js +1 -1
  127. package/dist/sdk/connection-validator.js +1 -1
  128. package/dist/sdk/connection.js +1 -1
  129. package/dist/sdk/delivery.js +1 -1
  130. package/dist/sdk/engage/campaign-pull.js +1 -1
  131. package/dist/sdk/engage/campaign-push.js +1 -1
  132. package/dist/sdk/engage/campaign-validator.js +1 -1
  133. package/dist/sdk/engage/campaign-yaml.js +1 -1
  134. package/dist/sdk/engage/template-pull.js +1 -1
  135. package/dist/sdk/engage/template-push.js +1 -1
  136. package/dist/sdk/engage/template-validator.js +1 -1
  137. package/dist/sdk/engage/template-yaml.js +1 -1
  138. package/dist/sdk/engage/types/campaign-def.js +1 -1
  139. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  140. package/dist/sdk/engage/types/template-schema.js +1 -1
  141. package/dist/sdk/engage.js +1 -1
  142. package/dist/sdk/errors.js +1 -1
  143. package/dist/sdk/index.js +1 -1
  144. package/dist/sdk/io/index.js +1 -1
  145. package/dist/sdk/io/node-filesystem.js +1 -1
  146. package/dist/sdk/job.js +1 -1
  147. package/dist/sdk/journey.js +1 -1
  148. package/dist/sdk/llm/chat-cache.js +1 -1
  149. package/dist/sdk/llm/index.js +1 -1
  150. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  151. package/dist/sdk/llm/model-factors.js +1 -1
  152. package/dist/sdk/llm/user-settings.js +1 -1
  153. package/dist/sdk/personalization.js +1 -1
  154. package/dist/sdk/policy.js +1 -1
  155. package/dist/sdk/query/deleted-table-validation.js +1 -1
  156. package/dist/sdk/query/index.js +1 -1
  157. package/dist/sdk/query/sql-parser.js +1 -1
  158. package/dist/sdk/realtime.js +1 -1
  159. package/dist/sdk/schedule.js +1 -1
  160. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  161. package/dist/sdk/segment/fields-display.js +1 -1
  162. package/dist/sdk/segment/file-discovery.js +1 -1
  163. package/dist/sdk/segment/journey-utils.js +1 -1
  164. package/dist/sdk/segment/journey-validator.js +1 -1
  165. package/dist/sdk/segment/journey-yaml.js +1 -1
  166. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  167. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  168. package/dist/sdk/segment/pull-workflow.js +1 -1
  169. package/dist/sdk/segment/push-recovery.js +1 -1
  170. package/dist/sdk/segment/push-workflow.js +1 -1
  171. package/dist/sdk/segment/resolution-context.js +1 -1
  172. package/dist/sdk/segment/segment-path-parser.js +1 -1
  173. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  174. package/dist/sdk/segment/segment-validator.js +1 -1
  175. package/dist/sdk/segment/target-resolution.js +1 -1
  176. package/dist/sdk/segment/tdx-config.js +1 -1
  177. package/dist/sdk/segment/types/activation-schema.js +1 -1
  178. package/dist/sdk/segment/types/journey-def.js +1 -1
  179. package/dist/sdk/segment/types/journey-schema.js +1 -1
  180. package/dist/sdk/segment/types/segment-def.js +1 -1
  181. package/dist/sdk/segment/types/segment-schema.js +1 -1
  182. package/dist/sdk/segment/validate-files.js +1 -1
  183. package/dist/sdk/segment/yaml-validator.js +1 -1
  184. package/dist/sdk/segment.js +1 -1
  185. package/dist/sdk/types/index.js +1 -1
  186. package/dist/sdk/types/progress.js +1 -1
  187. package/dist/sdk/types/workspace.js +1 -1
  188. package/dist/sdk/user.js +1 -1
  189. package/dist/sdk/util/format-detector.js +1 -1
  190. package/dist/sdk/util/formatters.js +1 -1
  191. package/dist/sdk/util/index.js +1 -1
  192. package/dist/sdk/util/paginate.js +1 -1
  193. package/dist/sdk/util/tree-formatter.js +1 -1
  194. package/dist/sdk/util/tree-search.js +1 -1
  195. package/dist/sdk/workflow/archive-validation.js +1 -1
  196. package/dist/sdk/workflow/clone-workflow.js +1 -1
  197. package/dist/sdk/workflow/index.js +1 -1
  198. package/dist/sdk/workflow/pull-workflow.js +1 -1
  199. package/dist/sdk/workflow/push-workflow.js +1 -1
  200. package/dist/sdk/workflow/task-graph.js +1 -1
  201. package/dist/sdk/workflow/tdx-config.js +1 -1
  202. package/dist/sdk/workflow/workflow-utils.js +1 -1
  203. package/dist/sdk/workspace/access-tracker.js +1 -1
  204. package/dist/sdk/workspace/frontmatter.js +1 -1
  205. package/dist/sdk/workspace/git.js +1 -1
  206. package/dist/sdk/workspace/index.js +1 -1
  207. package/dist/sdk/workspace/templates.js +1 -1
  208. package/dist/sdk/workspace/weekly.js +1 -1
  209. package/dist/sdk/workspace/wikilinks.js +1 -1
  210. package/dist/test-utils/command-runner.js +1 -1
  211. package/dist/test-utils/factories.js +1 -1
  212. package/dist/test-utils/fixtures.js +1 -1
  213. package/dist/test-utils/http-mock.js +1 -1
  214. package/dist/test-utils/index.js +1 -1
  215. package/dist/utils/async.js +1 -1
  216. package/dist/utils/colors.js +1 -1
  217. package/dist/utils/diff.js +1 -1
  218. package/dist/utils/file-permissions.js +1 -1
  219. package/dist/utils/file-reader.js +1 -1
  220. package/dist/utils/github-releases.js +1 -1
  221. package/dist/utils/global-cache.js +1 -1
  222. package/dist/utils/json-loader.js +1 -1
  223. package/dist/utils/local-cache.js +1 -1
  224. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  225. package/dist/utils/logger/formatters/index.js +1 -1
  226. package/dist/utils/logger/handlers/console-handler.js +1 -1
  227. package/dist/utils/logger/handlers/file-handler.js +1 -1
  228. package/dist/utils/logger/handlers/index.js +1 -1
  229. package/dist/utils/logger/handlers/null-handler.js +1 -1
  230. package/dist/utils/logger/index.js +1 -1
  231. package/dist/utils/logger/logger.js +1 -1
  232. package/dist/utils/logger/types.js +1 -1
  233. package/dist/utils/option-validation.js +1 -1
  234. package/dist/utils/process.js +1 -1
  235. package/dist/utils/prompt.js +1 -1
  236. package/dist/utils/proxy-fetch.d.ts +29 -0
  237. package/dist/utils/proxy-fetch.d.ts.map +1 -0
  238. package/dist/utils/proxy-fetch.js +1 -0
  239. package/dist/utils/proxy-fetch.js.map +1 -0
  240. package/dist/utils/spinner.js +1 -1
  241. package/dist/utils/sse-parser.js +1 -1
  242. package/dist/utils/string-utils.js +1 -1
  243. package/dist/utils/table-ref-parser.js +1 -1
  244. package/dist/utils/tdx-logger.js +1 -1
  245. package/dist/utils/version-check.js +1 -1
  246. package/package.json +1 -1
@@ -1 +1 @@
1
- const a31_0x231dbb=a31_0x211d;(function(_0x259c60,_0x57990d){const _0x30525c=a31_0x211d,_0x3b8838=_0x259c60();while(!![]){try{const _0x3dddf8=parseInt(_0x30525c(0x1a2))/0x1+parseInt(_0x30525c(0x173))/0x2+parseInt(_0x30525c(0xc6))/0x3+parseInt(_0x30525c(0x205))/0x4*(parseInt(_0x30525c(0x1b0))/0x5)+parseInt(_0x30525c(0x229))/0x6+parseInt(_0x30525c(0x123))/0x7*(-parseInt(_0x30525c(0x145))/0x8)+-parseInt(_0x30525c(0xd2))/0x9;if(_0x3dddf8===_0x57990d)break;else _0x3b8838['push'](_0x3b8838['shift']());}catch(_0x197c21){_0x3b8838['push'](_0x3b8838['shift']());}}}(a31_0x4a7f,0xb452c));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x4c5df6 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';function a31_0x211d(_0xb4f4ff,_0x5d9a28){_0xb4f4ff=_0xb4f4ff-0xaa;const _0x4a7fa7=a31_0x4a7f();let _0x211d69=_0x4a7fa7[_0xb4f4ff];return _0x211d69;}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a31_0x33dca6 from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a31_0x231dbb(0x1bf),LEGACY_PARENT_SEGMENT_DIR=a31_0x231dbb(0x1d7);function openBrowser(_0x37d496){const _0x39b642=a31_0x231dbb,_0x39b7ba=process['platform'],_0xbdc0af=_0x39b7ba===_0x39b642(0x10e)?_0x39b642(0x1ce):_0x39b7ba===_0x39b642(0x22b)?_0x39b642(0x1d4):_0x39b642(0x25a);spawn(_0xbdc0af,[_0x37d496],{'detached':!![],'stdio':_0x39b642(0x2a9)})['unref']();}function migrateLegacyDirectory(){const _0x2a251d=a31_0x231dbb;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x427178=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x427178[_0x2a251d(0x172)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a31_0x33dca6[_0x2a251d(0x224)](_0x2a251d(0x26a)+LEGACY_PARENT_SEGMENT_DIR+_0x2a251d(0xb7)+PARENT_SEGMENT_DIR+_0x2a251d(0x24c))),console['error'](a31_0x33dca6['dim'](_0x2a251d(0x28d)+LEGACY_PARENT_SEGMENT_DIR+_0x2a251d(0x299))),![];console[_0x2a251d(0xdc)](a31_0x33dca6['yellow']('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+'/\x20→\x20'+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console['error'](a31_0x33dca6['green'](_0x2a251d(0x1bc)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x13ec9d){const _0x250c8b=_0x13ec9d instanceof Error?_0x13ec9d[_0x2a251d(0x11e)]:String(_0x13ec9d);return console[_0x2a251d(0xdc)](a31_0x33dca6[_0x2a251d(0xc9)](_0x2a251d(0x20e)+_0x250c8b+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x231dbb(0x13a)](_0x2b934f){const _0x17c0be=a31_0x231dbb;return migrateLegacyDirectory(),super[_0x17c0be(0x13a)](_0x2b934f);}}function resolveYamlFile(_0x3caaa0){const _0x3a201a=a31_0x231dbb;if(_0x3caaa0['endsWith']('.yml')||_0x3caaa0[_0x3a201a(0x17d)]('.yaml'))return _0x3caaa0;return a31_0x4c5df6['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x3caaa0)+_0x3a201a(0x158));}function formatProgressMessage(_0x244984){const _0xa4cc17=a31_0x231dbb,_0x1572bc=_0x244984[_0xa4cc17(0x144)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x1572bc){const [,_0x221af2,_0x44039f,_0x9d0da6='']=_0x1572bc;return a31_0x33dca6['dim'](_0x221af2+':')+'\x20'+_0x44039f+a31_0x33dca6['dim'](_0x9d0da6);}return a31_0x33dca6[_0xa4cc17(0x293)](_0x244984);}function showFileNotFoundError(_0x127de5,_0x53041e){const _0x3fb1e8=a31_0x231dbb;console['error'](a31_0x33dca6[_0x3fb1e8(0xc9)](_0x3fb1e8(0x29f)+_0x127de5+'\x0a')),console[_0x3fb1e8(0xdc)](a31_0x33dca6[_0x3fb1e8(0x184)](_0x3fb1e8(0x219)+_0x53041e+_0x3fb1e8(0xac)));}function displayRealtimeValidation(_0x130df2){const _0x5d9d62=a31_0x231dbb;if(!_0x130df2[_0x5d9d62(0x2bc)])return;const _0x211682=_0x130df2['realtime'],_0x48bb62=_0x211682['enabled']?a31_0x33dca6[_0x5d9d62(0x17c)](_0x5d9d62(0x244)):a31_0x33dca6[_0x5d9d62(0x224)](_0x5d9d62(0x1cf));console[_0x5d9d62(0xdc)]('\x0a'+a31_0x33dca6['dim'](_0x5d9d62(0x10d))+'\x20'+_0x48bb62);if(_0x211682[_0x5d9d62(0x1e4)]&&_0x211682[_0x5d9d62(0x1e4)]['length']>0x0){console[_0x5d9d62(0xdc)]('\x20\x20'+a31_0x33dca6[_0x5d9d62(0x293)](_0x5d9d62(0x17b))+'\x20'+_0x211682[_0x5d9d62(0x1e4)][_0x5d9d62(0x17e)]+_0x5d9d62(0x220));for(const _0x345e41 of _0x211682[_0x5d9d62(0x1e4)]){const _0x2a205a=_0x345e41[_0x5d9d62(0x128)]===![]?a31_0x33dca6['red']('✘'):a31_0x33dca6['green']('✔');console[_0x5d9d62(0xdc)](_0x5d9d62(0xec)+_0x2a205a+'\x20'+_0x345e41[_0x5d9d62(0xaf)]),_0x345e41[_0x5d9d62(0xcd)]&&console[_0x5d9d62(0xdc)](_0x5d9d62(0x266)+a31_0x33dca6[_0x5d9d62(0xc9)](_0x345e41[_0x5d9d62(0xcd)]));}}if(_0x211682['attributes']&&_0x211682['attributes'][_0x5d9d62(0x17e)]>0x0){console[_0x5d9d62(0xdc)]('\x20\x20'+a31_0x33dca6['dim'](_0x5d9d62(0x295))+'\x20'+_0x211682['attributes'][_0x5d9d62(0x17e)]+_0x5d9d62(0x220));for(const _0x41788e of _0x211682[_0x5d9d62(0x14c)]){const _0x37536e=_0x41788e['valid']?a31_0x33dca6[_0x5d9d62(0x17c)]('✔'):a31_0x33dca6[_0x5d9d62(0xc9)]('✘');console[_0x5d9d62(0xdc)](_0x5d9d62(0xec)+_0x37536e+'\x20'+_0x41788e[_0x5d9d62(0xaf)]+'\x20'+a31_0x33dca6[_0x5d9d62(0x293)]('('+_0x41788e[_0x5d9d62(0x1df)]+')'));}}if(_0x211682[_0x5d9d62(0x2aa)]){const _0x45cdf2=_0x211682[_0x5d9d62(0x2aa)]['stitchingKeys']?.[_0x5d9d62(0x17e)]?'\x20+\x20['+_0x211682['idStitching'][_0x5d9d62(0x1b8)][_0x5d9d62(0x26d)](',\x20')+']':'';console[_0x5d9d62(0xdc)]('\x20\x20'+a31_0x33dca6[_0x5d9d62(0x293)](_0x5d9d62(0x136))+'\x20'+_0x211682[_0x5d9d62(0x2aa)]['primaryKey']+_0x45cdf2);}if(_0x211682[_0x5d9d62(0x18e)]&&_0x211682[_0x5d9d62(0x18e)]['length']>0x0){console[_0x5d9d62(0xdc)]('\x20\x20'+a31_0x33dca6['dim'](_0x5d9d62(0x18a))+'\x20'+_0x211682[_0x5d9d62(0x18e)][_0x5d9d62(0x17e)]+'\x20service'+(_0x211682[_0x5d9d62(0x18e)][_0x5d9d62(0x17e)]!==0x1?'s':''));for(const _0x1ccfff of _0x211682[_0x5d9d62(0x18e)]){console[_0x5d9d62(0xdc)](_0x5d9d62(0x1e7)+_0x1ccfff[_0x5d9d62(0xaf)]);}}}function showParentSegmentNotSetError(_0x9d84d4){const _0x2091a9=a31_0x231dbb;console[_0x2091a9(0xdc)](a31_0x33dca6[_0x2091a9(0x224)](_0x2091a9(0x107))),console[_0x2091a9(0xdc)](_0x9d84d4);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x253);[a31_0x231dbb(0x261)]='List\x20parent\x20segments';async[a31_0x231dbb(0x1a7)](_0x452aee){const _0x147c36=a31_0x231dbb,{options:_0x32b33f,args:_0x1cca72,tdx:_0x4dd07f}=_0x452aee,_0x39c84a=_0x1cca72[0x0];_0x32b33f['verbose']&&(console[_0x147c36(0xdc)](_0x147c36(0x273)+_0x32b33f[_0x147c36(0x296)]),_0x39c84a&&console[_0x147c36(0xdc)](_0x147c36(0x197)+_0x39c84a));const _0x5608e6=await withSpinner(_0x39c84a?_0x147c36(0x2ab)+_0x39c84a+'\x27...':_0x147c36(0xda),()=>_0x4dd07f[_0x147c36(0x12c)][_0x147c36(0x29b)](),{'verbose':_0x32b33f['verbose']});let _0x4c2afb=_0x5608e6[_0x147c36(0x233)];if(_0x39c84a){const _0x5a6d87=_0x39c84a[_0x147c36(0x1ff)](/[.+^${}()|[\]\\]/g,_0x147c36(0x284))[_0x147c36(0x1ff)](/\*/g,'.*')[_0x147c36(0x1ff)](/\?/g,'.'),_0x2f035f=new RegExp('^'+_0x5a6d87+'$','i');_0x4c2afb=_0x4c2afb[_0x147c36(0x12e)](_0x365eb9=>_0x2f035f[_0x147c36(0x2ac)](_0x365eb9[_0x147c36(0x14c)]['name']));}_0x4c2afb['sort']((_0x37139b,_0x55feaa)=>_0x37139b[_0x147c36(0x14c)][_0x147c36(0xaf)]['localeCompare'](_0x55feaa[_0x147c36(0x14c)]['name'])),console[_0x147c36(0xdc)](_0x147c36(0x1f6)+_0x4c2afb[_0x147c36(0x17e)]+_0x147c36(0x208)+(_0x4c2afb['length']!==0x1?'s':''));const _0x11dfec=_0x3a488a=>{const _0x1b61f0=_0x147c36;return getConsoleNextUrl(_0x32b33f[_0x1b61f0(0x296)],'/app/dw/parentSegments/'+_0x3a488a);};if(_0x32b33f[_0x147c36(0x2c0)]==='json'||_0x32b33f[_0x147c36(0x2c0)]===_0x147c36(0x2bb)){const _0x2c48b4=_0x4c2afb[_0x147c36(0x24d)](_0x115dba=>({..._0x115dba,'url':_0x11dfec(_0x115dba['id'])}));await handleSDKOutput(_0x2c48b4,_0x32b33f);}else{if(_0x4c2afb[_0x147c36(0x17e)]===0x0)_0x39c84a?console['log']('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x39c84a):console[_0x147c36(0x204)](_0x147c36(0x228));else for(const _0x5c6782 of _0x4c2afb){const _0x3a8636=_0x5c6782['attributes']['population']?a31_0x33dca6['dim']('\x20('+formatRows(_0x5c6782[_0x147c36(0x14c)][_0x147c36(0x13f)])+')'):'',_0x59e0fc=hyperlink(_0x5c6782[_0x147c36(0x14c)][_0x147c36(0xaf)],_0x11dfec(_0x5c6782['id']));console[_0x147c36(0x204)](_0x147c36(0xde)+_0x59e0fc+_0x3a8636);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x140);['description']=a31_0x231dbb(0x15a);async[a31_0x231dbb(0x1a7)](_0x2c5c25){const _0x3d1a4e=a31_0x231dbb,{options:_0x28724b,args:_0x9a3a92,tdx:_0xcb664f}=_0x2c5c25;console[_0x3d1a4e(0xdc)](_0x3d1a4e(0x259)+_0x3d1a4e(0x179)+_0x3d1a4e(0x203));const _0xaba244=_0x28724b;if(_0x9a3a92[_0x3d1a4e(0x17e)]===0x0)return console[_0x3d1a4e(0xdc)](a31_0x33dca6[_0x3d1a4e(0xc9)]('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console['error'](_0x3d1a4e(0x151)),0x1;const _0x428f44=_0x9a3a92[0x0];if(!_0xaba244[_0x3d1a4e(0x1a4)]||!_0xaba244[_0x3d1a4e(0x15f)])return console[_0x3d1a4e(0xdc)](_0x3d1a4e(0x2b6)),console[_0x3d1a4e(0xdc)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0xaba244[_0x3d1a4e(0x11d)]&&(console[_0x3d1a4e(0xdc)](_0x3d1a4e(0x273)+_0xaba244[_0x3d1a4e(0x296)]),console[_0x3d1a4e(0xdc)](_0x3d1a4e(0x154)+_0x428f44),console[_0x3d1a4e(0xdc)](_0x3d1a4e(0xd3)+_0xaba244[_0x3d1a4e(0x1a4)]),console[_0x3d1a4e(0xdc)](_0x3d1a4e(0x1ae)+_0xaba244[_0x3d1a4e(0x15f)]));const _0x24bbf6=await loadJSONFromOptions(_0xaba244[_0x3d1a4e(0x14c)],_0xaba244[_0x3d1a4e(0x223)]),_0x18ed7c=await loadJSONFromOptions(_0xaba244[_0x3d1a4e(0x18b)],_0xaba244[_0x3d1a4e(0x19a)]),_0x24dfb5=await loadJSONFromOptions(_0xaba244[_0x3d1a4e(0x1b5)],_0xaba244[_0x3d1a4e(0x17a)]),_0x5f2e4d={'name':_0x428f44,'description':_0xaba244[_0x3d1a4e(0x261)],'scheduleType':_0xaba244[_0x3d1a4e(0xe0)],'scheduleOption':_0xaba244[_0x3d1a4e(0xca)],'timezone':_0xaba244['timezone'],'master':{'parentDatabaseName':_0xaba244[_0x3d1a4e(0x1a4)],'parentTableName':_0xaba244['table']},'attributes':_0x24bbf6,'behaviors':_0x18ed7c,'customerGroup':_0x24dfb5},_0x45b997=await withSpinner(_0x3d1a4e(0xfe)+_0x428f44+'\x27...',()=>_0xcb664f[_0x3d1a4e(0x12c)][_0x3d1a4e(0x226)](_0x5f2e4d),{'verbose':_0x28724b[_0x3d1a4e(0x11d)]}),_0x286348=_0x45b997['data'];return console[_0x3d1a4e(0xdc)]('✔\x20Created\x20parent\x20segment\x20\x27'+_0x286348[_0x3d1a4e(0xaf)]+_0x3d1a4e(0x23c)+_0x286348['id']),await handleSDKOutput([_0x286348],_0x28724b),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0xd0);[a31_0x231dbb(0x261)]=a31_0x231dbb(0xfd);async['execute'](_0x41ce4b){const _0x1a38f9=a31_0x231dbb,{options:_0x135d29,args:_0x4fab72,tdx:_0x47a146}=_0x41ce4b;console['error'](_0x1a38f9(0x265)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x1a38f9(0x203));const _0x29ff8d=_0x135d29;if(_0x4fab72[_0x1a38f9(0x17e)]===0x0)return console[_0x1a38f9(0xdc)](a31_0x33dca6['red'](_0x1a38f9(0xbf))),console['error'](_0x1a38f9(0x162)),0x1;const _0x2373df=_0x4fab72[0x0];_0x29ff8d[_0x1a38f9(0x11d)]&&(console['error']('Site:\x20'+_0x29ff8d[_0x1a38f9(0x296)]),console[_0x1a38f9(0xdc)](_0x1a38f9(0x18d)+_0x2373df));const _0x34dba7=await withSpinner(_0x1a38f9(0x126)+_0x2373df+_0x1a38f9(0x239),()=>_0x47a146[_0x1a38f9(0x12c)][_0x1a38f9(0x27d)](_0x2373df),{'verbose':_0x29ff8d[_0x1a38f9(0x11d)]}),_0x1cc9a6=_0x34dba7[_0x1a38f9(0x233)],_0x165554=await loadJSONFromOptions(_0x29ff8d[_0x1a38f9(0x271)],_0x29ff8d['addAttributesFile']),_0x4b7820=await loadJSONFromOptions(_0x29ff8d['addBehaviors'],_0x29ff8d[_0x1a38f9(0x141)]),_0x89116c={'name':_0x1cc9a6[_0x1a38f9(0xaf)],'description':_0x29ff8d[_0x1a38f9(0x261)]!==undefined?_0x29ff8d['description']:_0x1cc9a6['description'],'scheduleType':_0x29ff8d[_0x1a38f9(0xe0)]!==undefined?_0x29ff8d[_0x1a38f9(0xe0)]:_0x1cc9a6[_0x1a38f9(0xe0)],'scheduleOption':_0x29ff8d[_0x1a38f9(0xca)]!==undefined?_0x29ff8d[_0x1a38f9(0xca)]:_0x1cc9a6[_0x1a38f9(0xca)],'timezone':_0x29ff8d[_0x1a38f9(0x28c)]!==undefined?_0x29ff8d['timezone']:_0x1cc9a6['timezone'],'master':_0x1cc9a6[_0x1a38f9(0x294)],'attributes':_0x165554?[..._0x1cc9a6[_0x1a38f9(0x14c)]||[],..._0x165554]:_0x1cc9a6['attributes'],'behaviors':_0x4b7820?[..._0x1cc9a6[_0x1a38f9(0x18b)]||[],..._0x4b7820]:_0x1cc9a6[_0x1a38f9(0x18b)],'customerGroup':_0x1cc9a6['customerGroup']},_0x5cb30b=await withSpinner(_0x1a38f9(0x29e)+_0x2373df+_0x1a38f9(0x239),()=>_0x47a146[_0x1a38f9(0x12c)][_0x1a38f9(0x16b)](_0x2373df,_0x89116c),{'verbose':_0x29ff8d[_0x1a38f9(0x11d)]}),_0x3c53ea=_0x5cb30b['data'];return console[_0x1a38f9(0xdc)](_0x1a38f9(0x27c)+_0x3c53ea[_0x1a38f9(0xaf)]+'\x27'),await handleSDKOutput([_0x3c53ea],_0x29ff8d),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']=a31_0x231dbb(0x109);[a31_0x231dbb(0x261)]=a31_0x231dbb(0x2b3);async[a31_0x231dbb(0x1a7)](_0x20104e){const _0x286997=a31_0x231dbb,{options:_0xb86bae,args:_0xb88aef,tdx:_0x464be7}=_0x20104e,_0x399744=_0xb86bae,_0x56af1c=_0xb88aef[0x0]||_0xb86bae[_0x286997(0x170)];if(!_0x56af1c)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a'+_0x286997(0x10f)),0x1;if(_0x399744[_0x286997(0x290)]&&_0x399744[_0x286997(0x289)])return console['error'](a31_0x33dca6['red'](_0x286997(0x241))),console[_0x286997(0xdc)](a31_0x33dca6[_0x286997(0x293)](_0x286997(0x1be))),console[_0x286997(0xdc)](a31_0x33dca6[_0x286997(0x293)](_0x286997(0x201)+PARENT_SEGMENT_DIR+_0x286997(0x112))),console[_0x286997(0xdc)](a31_0x33dca6['cyan'](_0x286997(0xc0))),0x1;const _0x3e854d=_0x399744['output']||a31_0x4c5df6[_0x286997(0x26d)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x56af1c)+'.yml');_0x399744[_0x286997(0x11d)]&&(console[_0x286997(0xdc)]('Site:\x20'+_0x399744[_0x286997(0x296)]),console[_0x286997(0xdc)](_0x286997(0x18d)+_0x56af1c),console[_0x286997(0xdc)](_0x286997(0x247)+_0x3e854d));const _0x5545b0=await withSpinner(_0x286997(0x1fe)+_0x56af1c+_0x286997(0x239),()=>_0x464be7[_0x286997(0x12c)][_0x286997(0x1f9)](_0x56af1c),{'verbose':_0x399744['verbose']}),_0x591103=_0x5545b0[_0x286997(0x233)];if(existsSync(_0x3e854d)){const _0x3c618c=readFileSync(_0x3e854d,_0x286997(0x287)),_0x30e90a=generateDiff(_0x3c618c,_0x591103);if(!hasChanges(_0x30e90a))console['error'](a31_0x33dca6[_0x286997(0x17c)]('✔')+_0x286997(0xe7)+a31_0x33dca6['cyan'](_0x3e854d)+_0x286997(0x1c4));else{console[_0x286997(0xdc)](_0x286997(0xce)+_0x3e854d+'\x27:'),console[_0x286997(0xdc)]('─'[_0x286997(0x124)](0x3c)),console[_0x286997(0xdc)](formatDiffWithColors(_0x30e90a)),console[_0x286997(0xdc)]('─'[_0x286997(0x124)](0x3c));if(!_0x399744[_0x286997(0x243)]){if(!isInteractive())return console['error'](a31_0x33dca6[_0x286997(0xc9)](_0x286997(0x22d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x286997(0xdc)](a31_0x33dca6[_0x286997(0x293)](_0x286997(0x19e))),0x1;const _0xf5571f=await confirmKey('Overwrite\x20\x27'+_0x3e854d+'\x27?');if(!_0xf5571f)return console[_0x286997(0xdc)](a31_0x33dca6[_0x286997(0x224)](_0x286997(0x298))),0x1;}writeFileSync(_0x3e854d,_0x591103,_0x286997(0x287)),console[_0x286997(0xdc)](a31_0x33dca6[_0x286997(0x17c)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x33dca6['cyan'](_0x3e854d));}}else{const _0xf359ce=a31_0x4c5df6[_0x286997(0xeb)](_0x3e854d);!existsSync(_0xf359ce)&&mkdirSync(_0xf359ce,{'recursive':!![]}),writeFileSync(_0x3e854d,_0x591103,'utf-8'),console['error'](a31_0x33dca6[_0x286997(0x17c)]('✔')+_0x286997(0x101)+a31_0x33dca6[_0x286997(0x184)](_0x3e854d));}return saveSessionContext({'parent_segment':_0x56af1c},_0x399744[_0x286997(0x104)]),console[_0x286997(0xdc)](a31_0x33dca6[_0x286997(0x17c)]('✔')+'\x20Context\x20set:\x20'+a31_0x33dca6['dim']('parent_segment')+_0x286997(0x129)+a31_0x33dca6[_0x286997(0x184)](_0x56af1c)),0x0;}}function a31_0x4a7f(){const _0x19fbbf=['displayAttributesStats','createdAt','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','1732073XHeztH','repeat','eventKind:\x20','Fetching\x20current\x20configuration\x20for\x20\x27','foreignKey','sourceTableValid','\x20=\x20','Options\x20(one\x20required):\x0a','ps:rt:list','segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','filter','Validating\x20configuration...','Error:\x20Token\x20name\x20is\x20required','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','%)\x20','Show\x20parent\x20segment\x20schema\x20(column\x20types)','\x20\x20Database:\x20','ID\x20Stitching:','No\x20personalizations\x20configured','some','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment','run','personalization','Master\x20Table','✔\x20Deleted\x20personalization\x20service\x20\x27','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','population','segment:parent:create','addBehaviorsFile','realtime_enabled','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','match','8dobUvD','To\x20cancel:','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','getOutputDatabaseName','value','✔\x20Updated\x20personalization\x20service\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','attributes','listJourneys','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','sections:','keyEventCriteria','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Audience\x20ID:','\x20Opening\x20','Name:\x20','tokens','\x0aNo\x20sample\x20data\x20available','realtime:','.yml','relationships','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','displayPreviewResults','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','Preview:','table','Error:\x20--behavior\x20requires\x20a\x20name\x0a','Deleting\x20token\x20\x27','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','ps:rt:jn:resume','ps:pz:service:token:delete','Show\x20personalization\x20service\x20details','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','SQL\x20query:\x0a','joinKey','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','updateParent','pauseJourney','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','<database>.<table>','eventKind','parentSegment','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','isDirectory','1601392cRWSAz','\x0aNew\x20parent\x20segment\x20\x27','audienceId:','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','customerGroupFile','Events:','green','endsWith','length','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','label','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a','cyan','Analyzing\x20changes...','payload','formatSchemaJson','id:\x20','Default','Personalization:','behaviors','\x20\x20\x20\x20\x20\x20\x20\x20','Parent\x20segment:\x20','personalizationServices','columns','displayBehaviorsStats','ps:pz:create','\x20true','page_view','Rows:','displayColumns','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','Pattern:\x20','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','\x20rows\x20','behaviorsFile','ps:rt:configuration_versions','tdx\x20ps\x20preview\x20','keys','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20\x201.\x20Edit\x20','processedRows','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','54649swOiin','Resolving\x20parent\x20segment\x20\x27','database','allowed\x20IPs:','getParentSQL','execute','Master:','\x20kill','\x20--attribute\x20\x22','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','Coverage:','workflowId','Table:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','1643410lETJdL','Executing\x20parent\x20segment\x20query...','Output\x20Database:','interval','Updating','customerGroup','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','/app/workflows/','stitchingKeys','apply','Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a','sort','✔\x20Renamed\x20directory\x20to\x20','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','parent_segments','keyEventId:','Attempt:','.customers)','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','\x20is\x20already\x20up\x20to\x20date','double','Error:\x20Personalization\x20ID\x20is\x20required','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20configuration_versions\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20for\x20specific\x20parent\x20segment','\x22,\x20\x22type\x22:\x20\x22','\x27\x20is\x20already\x20up\x20to\x20date','ps:pz:service:show','Creating','elapsedTimeMillis','\x20service(s)\x20configured','open','⚡\x20Not\x20enabled','Created','toLowerCase','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20for\x20specific\x20parent\x20segment','start','ps:pz:service:create','segment:parent:desc','parent_segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment','text','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','\x27\x20is\x20up\x20to\x20date','Delete\x20a\x20personalization\x20service','create','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','type','coveragePercent','\x20\x20Note:\x20','column','allValid','events','Listing\x20RT-enabled\x20parent\x20segments...','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','\x20\x20\x20\x20-\x20','✔\x20Created\x20personalization\x20service\x20\x27','displaySampleData','patchPersonalization','Found\x20YAML\x20file:\x20','List\x20RT\x20journeys','\x20[Job\x20ID:\x20','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','✔\x20Found\x20personalization\x20\x27','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','json','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','get','public','✔\x20Found\x20','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','pullParentYaml','payload:','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','\x0aChanges\x20to\x20apply\x20to\x20\x27','Fetching\x20parent\x20segment\x20\x27','replace','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','using\x20the\x20default\x20path:\x20','Patching\x20personalization\x20\x27','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','log','8vJtIyl','\x20total','all','\x20parent\x20segment','trim','FINISHED','Updated','Error\x20parsing\x20YAML:\x20','Fetching\x20behavior\x20list...','✘\x20Failed\x20to\x20rename\x20directory:\x20','pushParentYaml','limit','Listing\x20personalizations\x20for\x20\x27','listFields','attribute','\x22\x20}','Update\x20a\x20realtime\x20personalization\x20entity','deleteToken','localeCompare','folderId','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','\x20to\x20push\x20the\x20configuration','YAML\x20file:\x20','customerPercent','\x20--attribute\x20\x22<name>\x22','\x0a\x20\x20\x20\x20]','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','\x20configured','\x20field','ps:pz:patch','attributesFile','yellow','segment:parent:view','createParent','✔\x20Deleted\x20personalization\x20\x27','No\x20parent\x20segments\x20found','4271292YOgQzl','launched','win32','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','\x0aError:','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','ps:pz:init','sampleData','\x0aUsage:\x20tdx\x20ps\x20preview\x20','\x20rows)','data','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','behavior','Schema\x20saved\x20to\x20','getBehaviorNames','No\x20RT\x20journeys\x20found','\x27...','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','\x27\x20with\x20ID:\x20','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','\x20stage','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Source:','yes','⚡\x20Enabled','ps:rt:jn:list','number','Output\x20file:\x20','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Creating\x20token\x20\x27','ps:pz:delete','/\x20directories\x20exist.','map','Create\x20a\x20realtime\x20personalization\x20entity','\x20\x20Tables:\x201\x20customers\x20+\x20','Join:','No\x20RT-enabled\x20parent\x20segments\x20found','segment:parent:sql','segment:parent:list','/sessions/','workflowSessionId','Options:\x0a','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x27\x20and\x20run\x20workflow?','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','xdg-open','-1d','list','Error:','keyEventId','✔\x20Query\x20completed:\x20Processed\x20','\x20--behavior\x20\x22<name>\x22','description','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','null','Options:','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','\x20\x20\x20\x20\x20\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','RT\x20Journey\x20ID:\x20','entryCriteria:','\x0a⚠️\x20\x20Both\x20','Create\x20parent\x20segment\x20\x27','\x20--behavior\x20\x22','join','ps:pz:list','personalization_services','toLocaleString','addAttributes','td_client_id','Site:\x20','Get\x20current\x20RT\x20configuration\x20version\x20status','\x20RT-enabled\x20parent\x20segment','in\x20','folder-segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','Pause\x20activations\x20in\x20an\x20RT\x20journey','segment:parent:validate','Error\x20reading\x20file:\x20','✔\x20Updated\x20parent\x20segment\x20\x27','getParentFull','Fetching\x20SQL\x20for\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','\x20Added\x20RT\x202.0\x20template\x20section','/attempt/','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','file','\x5c$&','tdx\x20ps\x20push\x20','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','utf-8','resolveParentId','output','totalEvents','No\x20personalization\x20services\x20configured','timezone','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','stats','✔\x20Deleted\x20token\x20\x27','use','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','status','dim','master','Attributes:','site','createPersonalization','Aborted.','/\x20directory.\x0a','✔\x20Updated\x20personalization\x20\x27','listParents','includeSensitive','string','Updating\x20parent\x20segment\x20\x27','Error:\x20File\x20not\x20found:\x20','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','Next\x20steps:','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Join\x20on:','Error:\x20Service\x20ID\x20is\x20required','Fetching\x20personalization\x20service\x20\x27','ignore','idStitching','Listing\x20parent\x20segments\x20matching\x20\x27','test','push','delete','paused','/app/dw/parentSegments/','sections','Get\x20SQL\x20query\x20for\x20parent\x20segment','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','no\x20tokens\x20configured','status:\x20','Error:\x20--database\x20and\x20--table\x20are\x20required','Enriched:','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','schemaError','displayPreviewHints','jsonl','realtime','\x20parent\x20segment\x20\x27','RT\x202.0\x20Validate:','displayMasterInfo','format','✔\x20Created\x20token\x20\x27','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','Listing\x20RT\x20journeys\x20for\x20\x27','\x20(paused)','updated:','Error:\x20Token\x20ID\x20is\x20required','Error:\x20Service\x20name\x20is\x20required','`\x20to\x20download\x20the\x20configuration\x20first','customers','\x20behaviors','name','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','matchedCount','Fetching\x20customers\x20schema...','indexOf','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','column_type','Available\x20behaviors:','/\x20and\x20','rowCount','\x20RT\x20configuration\x20is\x20valid','ps:rt:jn:pause','updatedAt','runParent','collectSchema','schemaValid','Error:\x20Parent\x20segment\x20name\x20is\x20required','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','Usage:\x20tdx\x20ps\x20rt\x20configuration_versions\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20(requires\x20context)\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20for\x20specific\x20parent\x20segment','preview','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','732108Kotznb','\x20Configuration\x20is\x20valid','Personalization\x20service\x20description','red','scheduleOption','segment:parent:fields','(id:\x20','sourceTableError','\x0aChanges\x20to\x20\x27','{\x0a\x20\x20\x22database\x22:\x20\x22','segment:parent:update','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','13343256fdwrFa','Database:\x20','state','\x27\x20for\x20service\x20\x27','Attribute:','Apply\x20changes\x20to\x20\x27','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','column_name','Listing\x20parent\x20segments...','displaySummary','error','entryCriteria','👥\x20','stringify','scheduleType','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','bold','\x20tdx\x20wf\x20attempt\x20','Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','✔\x20Created\x20personalization\x20\x27','\x20No\x20changes\x20-\x20','\x0a\x20\x20]\x0a}\x0a','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','parentFolder','dirname','\x20\x20\x20\x20','ps:pz:service:update','segment:parent:preview','Errors:','\x20--interval\x20','Resume\x20activations\x20in\x20an\x20RT\x20journey','enriched','Creating\x20personalization\x20\x27','stageCount','audienceId','getCurrentConfigVersion','allowedIps','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','setJobId','jobId','resumeJourney','\x20to\x20configure\x20your\x20personalization\x20service','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Creating\x20parent\x20segment\x20\x27','Fetching\x20sample\x20data...','Usage:\x20tdx\x20ps\x20pz\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20(requires\x20context)\x0a','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','parent_id','stop','session','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Columns:','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','segment:parent:pull','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20init\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20for\x20specific\x20parent\x20segment','displayRealtimeInfo','information_schema','RT\x202.0:','darwin','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','behavior_','errors','/{name}.yml\x0a','Status:','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','segment:parent:run','Updating\x20personalization\x20service\x20\x27','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','createToken','\x20personalization','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','ps:pz:show','✔\x20No\x20changes\x20-\x20\x27','verbose','message','token:'];a31_0x4a7f=function(){return _0x19fbbf;};return a31_0x4a7f();}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x231dbb(0xaf)]='segment:parent:push';['description']='Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file';async[a31_0x231dbb(0x1a7)](_0x50b928){const _0x58843e=a31_0x231dbb,{options:_0x3339c7,args:_0x49faca,tdx:_0x2b41c4}=_0x50b928,_0xb4e1c6=_0x3339c7,_0x19e32f=_0x49faca[0x0]||_0x3339c7[_0x58843e(0x170)];if(!_0x19e32f)return showParentSegmentNotSetError(_0x58843e(0x122)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment'),0x1;const _0x42833e=resolveYamlFile(_0x19e32f);if(!existsSync(_0x42833e))return showFileNotFoundError(_0x42833e,_0x19e32f),0x1;_0xb4e1c6[_0x58843e(0x11d)]&&(console[_0x58843e(0xdc)](_0x58843e(0x273)+_0xb4e1c6[_0x58843e(0x296)]),console['error']('YAML\x20file:\x20'+_0x42833e));let _0x17e60e;try{_0x17e60e=readFileSync(_0x42833e,'utf-8');}catch(_0x1f10bd){const _0x3dff1e=_0x1f10bd instanceof Error?_0x1f10bd[_0x58843e(0x11e)]:String(_0x1f10bd);return console['error'](_0x58843e(0x27b)+_0x3dff1e),0x1;}const _0x5f4720=await withSpinner('Analyzing\x20changes...',()=>_0x2b41c4[_0x58843e(0x12c)]['pushParentYaml'](_0x17e60e),{'verbose':_0xb4e1c6[_0x58843e(0x11d)]}),_0x2b45d6=_0x5f4720[_0x58843e(0x233)],{isNew:_0x497c00,name:_0x25ecd4,hasChanges:_0x51d7f6,diffFormatted:_0x5c3cf1}=_0x2b45d6;if(!_0x51d7f6)return console[_0x58843e(0xdc)](_0x58843e(0x11c)+_0x25ecd4+_0x58843e(0x1c9)),0x0;_0x497c00?console['error'](_0x58843e(0x174)+_0x25ecd4+'\x27:'):console['error'](_0x58843e(0x1fd)+_0x25ecd4+'\x27:');console[_0x58843e(0xdc)]('─'['repeat'](0x3c)),console['error'](_0x5c3cf1),console[_0x58843e(0xdc)]('─'[_0x58843e(0x124)](0x3c));const _0x5ddc5f=_0x497c00?_0x58843e(0x26b)+_0x25ecd4+'\x27?':'Apply\x20changes\x20to\x20\x27'+_0x25ecd4+'\x27?';if(!_0xb4e1c6['yes']){if(!isInteractive())return console['error'](a31_0x33dca6[_0x58843e(0xc9)](_0x58843e(0x22d)),_0x58843e(0x267)),console[_0x58843e(0xdc)](a31_0x33dca6[_0x58843e(0x293)](_0x58843e(0x19e))),0x1;const _0x44124f=await confirmKey(_0x5ddc5f);if(!_0x44124f)return console[_0x58843e(0xdc)](a31_0x33dca6[_0x58843e(0x224)](_0x58843e(0x298))),0x1;}const _0x4215f0=_0x497c00?_0x58843e(0x1cb):_0x58843e(0x1b4),_0xb6808b=await withSpinner(_0x4215f0+_0x58843e(0x2bd)+_0x25ecd4+_0x58843e(0x239),()=>_0x2b45d6['apply'](),{'verbose':_0xb4e1c6[_0x58843e(0x11d)]}),_0x319578=_0xb6808b[_0x58843e(0x233)],_0x3aaffc=getConsoleNextUrl(_0xb4e1c6['site'],_0x58843e(0x2b0)+_0x319578['id']),_0x334045=_0x497c00?'Created':_0x58843e(0x20b);return console['error']('✔\x20'+_0x334045+_0x58843e(0x2bd)+_0x319578[_0x58843e(0xaf)]+'\x27'),console[_0x58843e(0xdc)]('\x20\x20'+_0x3aaffc),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x27a);['description']=a31_0x231dbb(0x1c3);async[a31_0x231dbb(0x1a7)](_0x6ab583){const _0x1fb8f2=a31_0x231dbb,{options:_0x4a3527,args:_0x2323c7,tdx:_0x4a2563}=_0x6ab583,_0x595232=_0x4a3527,_0xdaa6b2=_0x2323c7[0x0]||_0x4a3527[_0x1fb8f2(0x170)];if(!_0xdaa6b2)return showParentSegmentNotSetError(_0x1fb8f2(0x196)+_0x1fb8f2(0x2a4)+_0x1fb8f2(0x256)+_0x1fb8f2(0x282)+_0x1fb8f2(0x23b)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;const _0x2322ce=resolveYamlFile(_0xdaa6b2);if(!existsSync(_0x2322ce))return showFileNotFoundError(_0x2322ce,_0xdaa6b2),0x1;_0x595232[_0x1fb8f2(0x11d)]&&(console[_0x1fb8f2(0xdc)]('Site:\x20'+_0x595232[_0x1fb8f2(0x296)]),console[_0x1fb8f2(0xdc)](_0x1fb8f2(0x21b)+_0x2322ce));let _0x5e770b;try{_0x5e770b=readFileSync(_0x2322ce,_0x1fb8f2(0x287));}catch(_0x521bfa){const _0x19cc06=_0x521bfa instanceof Error?_0x521bfa[_0x1fb8f2(0x11e)]:String(_0x521bfa);return console[_0x1fb8f2(0xdc)](_0x1fb8f2(0x27b)+_0x19cc06),0x1;}const _0x5726bd=createCommandSpinner(a31_0x33dca6[_0x1fb8f2(0x293)](_0x1fb8f2(0x12f)),{'verbose':_0x595232['verbose']});_0x5726bd[_0x1fb8f2(0x1d4)]();const _0x43c980={'onProgress':_0x5e57fa=>{const _0x258822=_0x1fb8f2;_0x5726bd[_0x258822(0x1d9)]=formatProgressMessage(_0x5e57fa);}};if(_0x595232['master'])_0x43c980[_0x1fb8f2(0x294)]=!![];if(_0x595232[_0x1fb8f2(0xf2)])_0x43c980[_0x1fb8f2(0xf2)]=!![];_0x595232['attribute']&&(_0x43c980[_0x1fb8f2(0x213)]=_0x595232['attribute']);_0x595232[_0x1fb8f2(0x235)]&&(_0x43c980['behavior']=_0x595232['behavior']);if(_0x595232[_0x1fb8f2(0x1b3)])_0x43c980[_0x1fb8f2(0x1b3)]=_0x595232['interval'];let _0x50c929;try{_0x50c929=await _0x4a2563[_0x1fb8f2(0x12c)]['validateParentYaml'](_0x5e770b,_0x43c980),_0x5726bd['stop']();}catch(_0x52e315){_0x5726bd['stop']();throw _0x52e315;}const _0x290dd3=_0x595232[_0x1fb8f2(0x1b3)]||'-1d';return this['displayValidateResults'](_0x50c929,_0x43c980,_0x2322ce,_0x290dd3),_0x50c929['allValid']?0x0:0x1;}['displayValidateResults'](_0x1182dd,_0x306a44,_0x1547c9,_0x3e7a75){const _0xf31b16=a31_0x231dbb;console[_0xf31b16(0xdc)]('\x0a'+a31_0x33dca6[_0xf31b16(0xe2)]('Validate:')+'\x20'+_0x1182dd[_0xf31b16(0xaf)]),console['error']('═'['repeat'](0x3c)),this['displayMasterInfo'](_0x1182dd);if(typeof _0x306a44[_0xf31b16(0x213)]===_0xf31b16(0x29d)){this[_0xf31b16(0x120)](_0x1182dd),this[_0xf31b16(0xdb)](_0x1182dd),this[_0xf31b16(0x2ba)](_0x1547c9,_0x3e7a75,'attribute',_0x306a44[_0xf31b16(0x213)]);return;}if(_0x306a44[_0xf31b16(0x213)]===!![]){this[_0xf31b16(0x120)](_0x1182dd),this[_0xf31b16(0xdb)](_0x1182dd),this['displayPreviewHints'](_0x1547c9,_0x3e7a75,_0xf31b16(0x14c));return;}if(typeof _0x306a44['behavior']==='string'){this[_0xf31b16(0x190)](_0x1182dd,_0x3e7a75),this[_0xf31b16(0xdb)](_0x1182dd),this['displayPreviewHints'](_0x1547c9,_0x3e7a75,_0xf31b16(0x235),_0x306a44[_0xf31b16(0x235)]);return;}if(_0x306a44[_0xf31b16(0x235)]===!![]){this[_0xf31b16(0x190)](_0x1182dd,_0x3e7a75),this[_0xf31b16(0xdb)](_0x1182dd),this[_0xf31b16(0x2ba)](_0x1547c9,_0x3e7a75,_0xf31b16(0x18b));return;}this['displayAttributesStats'](_0x1182dd),this[_0xf31b16(0x190)](_0x1182dd,_0x3e7a75),this[_0xf31b16(0x10b)](_0x1182dd),this[_0xf31b16(0xdb)](_0x1182dd),this[_0xf31b16(0x2ba)](_0x1547c9,_0x3e7a75,_0xf31b16(0x207));}[a31_0x231dbb(0x10b)](_0x10c29a){displayRealtimeValidation(_0x10c29a);}[a31_0x231dbb(0x2ba)](_0x1f9d3f,_0x3130c8,_0x575374,_0x5bc3e5){const _0x593501=a31_0x231dbb;console[_0x593501(0xdc)]('\x0a'+a31_0x33dca6[_0x593501(0x293)]('To\x20view\x20sample\x20data:'));const _0x2a2e94=_0x3130c8!==_0x593501(0x25b)?_0x593501(0xf0)+_0x3130c8:'';if(_0x575374===_0x593501(0x213)&&_0x5bc3e5)console['error']('\x20\x20'+a31_0x33dca6[_0x593501(0x293)](_0x593501(0x19c)+_0x1f9d3f+_0x593501(0x1aa)+_0x5bc3e5+'\x22'+_0x2a2e94));else{if(_0x575374==='behavior'&&_0x5bc3e5)console['error']('\x20\x20'+a31_0x33dca6[_0x593501(0x293)](_0x593501(0x19c)+_0x1f9d3f+_0x593501(0x26c)+_0x5bc3e5+'\x22'+_0x2a2e94));else(_0x575374===_0x593501(0x14c)||_0x575374===_0x593501(0x207))&&console[_0x593501(0xdc)]('\x20\x20'+a31_0x33dca6[_0x593501(0x293)]('tdx\x20ps\x20preview\x20'+_0x1f9d3f+_0x593501(0x21d)+_0x2a2e94));}(_0x575374===_0x593501(0x18b)||_0x575374===_0x593501(0x207))&&console['error']('\x20\x20'+a31_0x33dca6[_0x593501(0x293)](_0x593501(0x19c)+_0x1f9d3f+_0x593501(0x260)+_0x2a2e94)),_0x575374==='all'&&console[_0x593501(0xdc)]('\x20\x20'+a31_0x33dca6[_0x593501(0x293)](_0x593501(0x19c)+_0x1f9d3f+'\x20--enriched'+_0x2a2e94));}[a31_0x231dbb(0x2bf)](_0x6ee2b4){const _0x5b88a9=a31_0x231dbb,{master:_0x2661ef}=_0x6ee2b4,_0x2743d9=_0x2661ef['schemaValid']?a31_0x33dca6[_0x5b88a9(0x17c)]('✔'):a31_0x33dca6[_0x5b88a9(0xc9)]('✘');console[_0x5b88a9(0xdc)]('\x0a'+a31_0x33dca6['dim'](_0x5b88a9(0x13c))),console[_0x5b88a9(0xdc)](_0x2743d9+'\x20'+a31_0x33dca6[_0x5b88a9(0xe2)](_0x2661ef[_0x5b88a9(0x1a4)]+'.'+_0x2661ef[_0x5b88a9(0x15f)])),_0x2661ef['schemaValid']?_0x2661ef[_0x5b88a9(0xb8)]!==undefined&&console[_0x5b88a9(0xdc)]('\x20\x20'+a31_0x33dca6[_0x5b88a9(0x293)](_0x5b88a9(0x194))+'\x20'+a31_0x33dca6[_0x5b88a9(0x184)](formatRows(_0x2661ef[_0x5b88a9(0xb8)]))):console['error']('\x20\x20'+a31_0x33dca6[_0x5b88a9(0xc9)](_0x5b88a9(0x25d))+'\x20'+_0x2661ef['schemaError']);}['displayAttributesStats'](_0xc350f0){const _0x1c468c=a31_0x231dbb;if(_0xc350f0['attributes'][_0x1c468c(0x17e)]===0x0)return;console[_0x1c468c(0xdc)]('\x0a'+a31_0x33dca6[_0x1c468c(0x293)]('Attributes'));for(const _0x1a6dec of _0xc350f0[_0x1c468c(0x14c)]){const _0x33000e=_0x1a6dec['schemaValid']?a31_0x33dca6[_0x1c468c(0x17c)]('✔'):a31_0x33dca6['red']('✘');let _0x45aae8='';if(_0x1a6dec['schemaValid']&&_0x1a6dec['matchedCount']!==undefined&&_0x1a6dec[_0x1c468c(0x1e0)]!==undefined){const _0x5ce101=_0x1a6dec['coveragePercent']['toFixed'](0x1),_0x4e356e=_0x1a6dec['coveragePercent']>=0x50?a31_0x33dca6[_0x1c468c(0x17c)]:_0x1a6dec[_0x1c468c(0x1e0)]>=0x32?a31_0x33dca6['yellow']:a31_0x33dca6[_0x1c468c(0xc9)];_0x45aae8='\x20'+a31_0x33dca6[_0x1c468c(0x293)](_0x1c468c(0x1ac))+'\x20'+_0x4e356e(_0x5ce101+'%')+'\x20('+formatRows(_0x1a6dec[_0x1c468c(0xb1)])+_0x1c468c(0x232);}console[_0x1c468c(0xdc)](_0x33000e+'\x20'+a31_0x33dca6[_0x1c468c(0xe2)](_0x1a6dec[_0x1c468c(0xaf)])+_0x45aae8),console['error']('\x20\x20'+a31_0x33dca6[_0x1c468c(0x293)](_0x1c468c(0x242))+'\x20'+a31_0x33dca6[_0x1c468c(0xe2)](_0x1a6dec[_0x1c468c(0x1a4)]+'.'+_0x1a6dec['table']));const _0x3a1cd4=_0x1a6dec[_0x1c468c(0x169)]===_0x1a6dec[_0x1c468c(0x127)]?a31_0x33dca6[_0x1c468c(0x293)]('Join\x20on:')+'\x20'+_0x1a6dec[_0x1c468c(0x169)]:a31_0x33dca6[_0x1c468c(0x293)]('Join:')+'\x20'+_0x1a6dec['joinKey']+_0x1c468c(0x129)+_0x1a6dec[_0x1c468c(0x127)];console[_0x1c468c(0xdc)]('\x20\x20'+_0x3a1cd4),console[_0x1c468c(0xdc)]('\x20\x20'+a31_0x33dca6['dim']('Columns:')),this['displayColumns'](_0x1a6dec[_0x1c468c(0x18f)]),!_0x1a6dec[_0x1c468c(0xbe)]&&console['error']('\x20\x20'+a31_0x33dca6[_0x1c468c(0xc9)](_0x1c468c(0x25d))+'\x20'+_0x1a6dec[_0x1c468c(0x2b9)]);}}[a31_0x231dbb(0x190)](_0x4639ea,_0x33b42a){const _0x14e8a4=a31_0x231dbb;if(_0x4639ea[_0x14e8a4(0x18b)][_0x14e8a4(0x17e)]===0x0)return;console['error']('\x0a'+a31_0x33dca6['dim']('Behaviors')+'\x20'+a31_0x33dca6['dim']('('+_0x33b42a+')'));for(const _0x173dd3 of _0x4639ea[_0x14e8a4(0x18b)]){const _0x251523=_0x173dd3[_0x14e8a4(0xbe)]?a31_0x33dca6[_0x14e8a4(0x17c)]('✔'):a31_0x33dca6[_0x14e8a4(0xc9)]('✘');let _0x4d419e='';if(_0x173dd3[_0x14e8a4(0xbe)]&&_0x173dd3['customersWithEvents']!==undefined&&_0x173dd3[_0x14e8a4(0x28a)]!==undefined){const _0x28f31c=_0x173dd3['customerPercent']?.['toFixed'](0x1)||'?',_0x1627f0=(_0x173dd3['customerPercent']??0x0)>=0x32?a31_0x33dca6['green']:(_0x173dd3[_0x14e8a4(0x21c)]??0x0)>=0x14?a31_0x33dca6['yellow']:a31_0x33dca6['red'];_0x4d419e='\x20'+a31_0x33dca6[_0x14e8a4(0x293)]('Customers:')+'\x20'+_0x1627f0(formatRows(_0x173dd3['customersWithEvents']))+'\x20('+_0x28f31c+_0x14e8a4(0x133)+a31_0x33dca6[_0x14e8a4(0x293)](_0x14e8a4(0x17b))+'\x20'+a31_0x33dca6[_0x14e8a4(0x184)](formatRows(_0x173dd3['totalEvents']));}console[_0x14e8a4(0xdc)](_0x251523+'\x20'+a31_0x33dca6[_0x14e8a4(0xe2)](_0x173dd3[_0x14e8a4(0xaf)])+_0x4d419e),console[_0x14e8a4(0xdc)]('\x20\x20'+a31_0x33dca6['dim'](_0x14e8a4(0x242))+'\x20'+a31_0x33dca6['bold'](_0x173dd3[_0x14e8a4(0x1a4)]+'.'+_0x173dd3[_0x14e8a4(0x15f)]));const _0x5e9d63=_0x173dd3[_0x14e8a4(0x169)]===_0x173dd3[_0x14e8a4(0x127)]?a31_0x33dca6[_0x14e8a4(0x293)](_0x14e8a4(0x2a6))+'\x20'+_0x173dd3['joinKey']:a31_0x33dca6[_0x14e8a4(0x293)](_0x14e8a4(0x250))+'\x20'+_0x173dd3[_0x14e8a4(0x169)]+_0x14e8a4(0x129)+_0x173dd3[_0x14e8a4(0x127)];console[_0x14e8a4(0xdc)]('\x20\x20'+_0x5e9d63),console['error']('\x20\x20'+a31_0x33dca6[_0x14e8a4(0x293)](_0x14e8a4(0x106))),this['displayColumns'](_0x173dd3[_0x14e8a4(0x18f)]),!_0x173dd3[_0x14e8a4(0xbe)]&&console[_0x14e8a4(0xdc)]('\x20\x20'+a31_0x33dca6[_0x14e8a4(0xc9)](_0x14e8a4(0x25d))+'\x20'+_0x173dd3['schemaError']);}}[a31_0x231dbb(0x195)](_0x5edb4e){const _0x5c94cf=a31_0x231dbb;for(const _0xe0b615 of _0x5edb4e){_0xe0b615[_0x5c94cf(0x181)]===_0xe0b615[_0x5c94cf(0x1e2)]||_0xe0b615[_0x5c94cf(0x1e2)]==='*'?console[_0x5c94cf(0xdc)](_0x5c94cf(0x1e7)+_0xe0b615['label']):console['error'](_0x5c94cf(0x1e7)+_0xe0b615['label']+'\x20'+a31_0x33dca6[_0x5c94cf(0x293)]('('+_0xe0b615['column']+')'));}}[a31_0x231dbb(0xdb)](_0x5a2fb9){const _0x38dec7=a31_0x231dbb;console['error']('─'[_0x38dec7(0x124)](0x3c));if(_0x5a2fb9['errors'][_0x38dec7(0x17e)]>0x0){console[_0x38dec7(0xdc)]('\x0a'+a31_0x33dca6[_0x38dec7(0xc9)](_0x38dec7(0xef)));for(const _0x10bb60 of _0x5a2fb9['errors']){console[_0x38dec7(0xdc)]('\x20\x20'+a31_0x33dca6[_0x38dec7(0xc9)]('•')+'\x20'+_0x10bb60);}}_0x5a2fb9['allValid']&&console[_0x38dec7(0xdc)]('\x0a'+a31_0x33dca6[_0x38dec7(0x17c)]('✔')+_0x38dec7(0xc7));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0xee);[a31_0x231dbb(0x261)]=a31_0x231dbb(0x23a);async[a31_0x231dbb(0x1a7)](_0x2b0aad){const _0x1f69c6=a31_0x231dbb,{options:_0x42ab4f,args:_0x2b5c78,tdx:_0x194e4c}=_0x2b0aad,_0x1e21ee=_0x42ab4f,_0x5ba8a5=_0x2b5c78[0x0]||_0x42ab4f[_0x1f69c6(0x170)];if(!_0x5ba8a5)return showParentSegmentNotSetError(_0x1f69c6(0xb0)+_0x1f69c6(0x11a)+_0x1f69c6(0x12a)+_0x1f69c6(0x176)+_0x1f69c6(0xd8)+_0x1f69c6(0x2a2)+_0x1f69c6(0x1fb)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x1e21ee[_0x1f69c6(0x294)]&&!_0x1e21ee[_0x1f69c6(0x213)]&&!_0x1e21ee['behavior']&&!_0x1e21ee[_0x1f69c6(0xf2)])return console['error'](a31_0x33dca6[_0x1f69c6(0xc9)](_0x1f69c6(0x143))),console[_0x1f69c6(0xdc)](_0x1f69c6(0x248)),console[_0x1f69c6(0xdc)](_0x1f69c6(0x264)),console['error'](_0x1f69c6(0x1f8)),console[_0x1f69c6(0xdc)](_0x1f69c6(0x198)),console['error'](_0x1f69c6(0x182)),console[_0x1f69c6(0xdc)](_0x1f69c6(0xe5)),0x1;const _0x2f1320=resolveYamlFile(_0x5ba8a5);if(!existsSync(_0x2f1320))return showFileNotFoundError(_0x2f1320,_0x5ba8a5),0x1;_0x1e21ee[_0x1f69c6(0x11d)]&&(console[_0x1f69c6(0xdc)]('Site:\x20'+_0x1e21ee[_0x1f69c6(0x296)]),console[_0x1f69c6(0xdc)]('YAML\x20file:\x20'+_0x2f1320));let _0x4c52b2;try{_0x4c52b2=readFileSync(_0x2f1320,_0x1f69c6(0x287));}catch(_0x2ef86f){const _0x53f34c=_0x2ef86f instanceof Error?_0x2ef86f['message']:String(_0x2ef86f);return console[_0x1f69c6(0xdc)](_0x1f69c6(0x27b)+_0x53f34c),0x1;}let _0x3dbd7a;try{_0x3dbd7a=parseDef(_0x4c52b2);}catch(_0xe93ae3){const _0x9ce1b8=_0xe93ae3 instanceof Error?_0xe93ae3[_0x1f69c6(0x11e)]:String(_0xe93ae3);return console['error'](a31_0x33dca6[_0x1f69c6(0xc9)]('Error\x20parsing\x20YAML:\x20'+_0x9ce1b8)),0x1;}if(_0x1e21ee[_0x1f69c6(0x213)]===!![]||_0x1e21ee[_0x1f69c6(0x213)]===''){const _0x31d250=_0x3dbd7a['attributes']?.['map'](_0x5cdea4=>_0x5cdea4['name'])||[];if(_0x31d250[_0x1f69c6(0x17e)]===0x0)console[_0x1f69c6(0xdc)](a31_0x33dca6[_0x1f69c6(0xc9)](_0x1f69c6(0x180)));else{console['error'](a31_0x33dca6[_0x1f69c6(0xc9)]('Error:\x20--attribute\x20requires\x20a\x20name\x0a')),console[_0x1f69c6(0xdc)]('Available\x20attributes:');for(const _0x33e687 of _0x31d250){console[_0x1f69c6(0xdc)]('\x20\x20'+a31_0x33dca6[_0x1f69c6(0x184)](_0x33e687));}console[_0x1f69c6(0xdc)](_0x1f69c6(0x231)+_0x5ba8a5+_0x1f69c6(0x1aa)+_0x31d250[0x0]+'\x22');}return 0x1;}if(_0x1e21ee[_0x1f69c6(0x235)]===!![]||_0x1e21ee[_0x1f69c6(0x235)]===''){const _0x4e89dd=_0x3dbd7a[_0x1f69c6(0x18b)]?.[_0x1f69c6(0x24d)](_0x527257=>_0x527257[_0x1f69c6(0xaf)])||[];if(_0x4e89dd[_0x1f69c6(0x17e)]===0x0)console[_0x1f69c6(0xdc)](a31_0x33dca6['red'](_0x1f69c6(0x1a1)));else{console[_0x1f69c6(0xdc)](a31_0x33dca6['red'](_0x1f69c6(0x160))),console[_0x1f69c6(0xdc)](_0x1f69c6(0xb6));for(const _0x3e26f7 of _0x4e89dd){console['error']('\x20\x20'+a31_0x33dca6[_0x1f69c6(0x184)](_0x3e26f7));}console[_0x1f69c6(0xdc)](_0x1f69c6(0x231)+_0x5ba8a5+'\x20--behavior\x20\x22'+_0x4e89dd[0x0]+'\x22');}return 0x1;}const _0x176601=createCommandSpinner(a31_0x33dca6['dim'](_0x1f69c6(0xff)),{'verbose':_0x1e21ee[_0x1f69c6(0x11d)]});_0x176601[_0x1f69c6(0x1d4)]();const _0x1c6d11={'onProgress':_0x41eb9a=>{_0x176601['text']=formatProgressMessage(_0x41eb9a);}};if(_0x1e21ee[_0x1f69c6(0x294)])_0x1c6d11[_0x1f69c6(0x294)]=!![];if(_0x1e21ee['attribute']&&typeof _0x1e21ee[_0x1f69c6(0x213)]==='string')_0x1c6d11[_0x1f69c6(0x213)]=_0x1e21ee[_0x1f69c6(0x213)];if(_0x1e21ee[_0x1f69c6(0x235)]&&typeof _0x1e21ee[_0x1f69c6(0x235)]===_0x1f69c6(0x29d))_0x1c6d11[_0x1f69c6(0x235)]=_0x1e21ee[_0x1f69c6(0x235)];if(_0x1e21ee['enriched'])_0x1c6d11[_0x1f69c6(0xf2)]=!![];if(_0x1e21ee[_0x1f69c6(0x1b3)])_0x1c6d11[_0x1f69c6(0x1b3)]=_0x1e21ee[_0x1f69c6(0x1b3)];let _0x2bc157;try{_0x2bc157=await _0x194e4c[_0x1f69c6(0x12c)]['previewParentYaml'](_0x4c52b2,_0x1c6d11),_0x176601[_0x1f69c6(0x103)]();}catch(_0x1677fd){_0x176601[_0x1f69c6(0x103)]();throw _0x1677fd;}return await this[_0x1f69c6(0x15b)](_0x2bc157,{'master':_0x1e21ee['master'],'attribute':typeof _0x1e21ee[_0x1f69c6(0x213)]===_0x1f69c6(0x29d)?_0x1e21ee['attribute']:undefined,'behavior':typeof _0x1e21ee[_0x1f69c6(0x235)]===_0x1f69c6(0x29d)?_0x1e21ee[_0x1f69c6(0x235)]:undefined,'enriched':_0x1e21ee[_0x1f69c6(0xf2)]}),_0x2bc157['allValid']?0x0:0x1;}async[a31_0x231dbb(0x15b)](_0x6ecff6,_0x4ef46a){const _0x245d99=a31_0x231dbb;console['error']('\x0a'+a31_0x33dca6['bold'](_0x245d99(0x15e))+'\x20'+_0x6ecff6[_0x245d99(0xaf)]),console['error']('═'[_0x245d99(0x124)](0x3c));if(_0x4ef46a['master']&&_0x6ecff6[_0x245d99(0x230)]){const _0x36b297=a31_0x33dca6['dim'](_0x245d99(0x1a8))+'\x20'+a31_0x33dca6[_0x245d99(0xe2)](_0x6ecff6[_0x245d99(0x294)]['database']+'.'+_0x6ecff6[_0x245d99(0x294)]['table']);await this[_0x245d99(0x1e9)](_0x36b297,_0x6ecff6['sampleData']);}else{if(_0x4ef46a[_0x245d99(0x213)]&&_0x6ecff6[_0x245d99(0x230)]){const _0x204330=a31_0x33dca6[_0x245d99(0x293)](_0x245d99(0xd6))+'\x20'+a31_0x33dca6['bold'](_0x4ef46a[_0x245d99(0x213)]);await this['displaySampleData'](_0x204330,_0x6ecff6[_0x245d99(0x230)]);}else{if(_0x4ef46a[_0x245d99(0x235)]&&_0x6ecff6[_0x245d99(0x230)]){const _0x2e5653=a31_0x33dca6['dim']('Behavior:')+'\x20'+a31_0x33dca6['bold'](_0x4ef46a[_0x245d99(0x235)]);await this[_0x245d99(0x1e9)](_0x2e5653,_0x6ecff6['sampleData']);}else{if(_0x4ef46a[_0x245d99(0xf2)]&&_0x6ecff6[_0x245d99(0x230)]){const _0x315f8e=a31_0x33dca6[_0x245d99(0x293)](_0x245d99(0x2b7))+'\x20'+a31_0x33dca6[_0x245d99(0xe2)]('Master\x20+\x20Attributes');await this[_0x245d99(0x1e9)](_0x315f8e,_0x6ecff6['sampleData']);}else!_0x6ecff6[_0x245d99(0x230)]&&console['error'](_0x245d99(0x156));}}}if(_0x6ecff6[_0x245d99(0x111)][_0x245d99(0x17e)]>0x0){console[_0x245d99(0xdc)]('─'['repeat'](0x3c)),console[_0x245d99(0xdc)]('\x0a'+a31_0x33dca6[_0x245d99(0xc9)]('Errors:'));for(const _0x34be04 of _0x6ecff6[_0x245d99(0x111)]){console[_0x245d99(0xdc)]('\x20\x20'+a31_0x33dca6[_0x245d99(0xc9)]('•')+'\x20'+_0x34be04);}}}async['displaySampleData'](_0x41201c,_0x294a8c){const _0x2027ec=a31_0x231dbb;if(_0x294a8c[_0x2027ec(0x17e)]===0x0){console['error']('\x0a'+_0x41201c),console[_0x2027ec(0xdc)]('\x20\x20No\x20sample\x20data\x20available');return;}console[_0x2027ec(0xdc)]('\x0a'+_0x41201c);const _0x4dfcc3=Object[_0x2027ec(0x19d)](_0x294a8c[0x0])[_0x2027ec(0x24d)](_0xb8f884=>({'name':_0xb8f884,'type':typeof _0x294a8c[0x0][_0xb8f884]===_0x2027ec(0x246)?_0x2027ec(0x1c5):'varchar'})),_0x22dc70={'queryId':_0x2027ec(0xc4),'columns':_0x4dfcc3,'data':_0x294a8c,'stats':{'state':_0x2027ec(0x20a),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x294a8c['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x3548f2=formatAsTable(_0x22dc70,_0x294a8c[_0x2027ec(0x17e)],!![]);await writeOutput(_0x3548f2,undefined,_0x2027ec(0x15f));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x115);['description']='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async[a31_0x231dbb(0x1a7)](_0x413e3b){const _0x37e664=a31_0x231dbb,{options:_0x5a5ddc,args:_0x585822,tdx:_0x5b8569}=_0x413e3b,_0x3dd7ba=_0x5a5ddc,_0x5ce47e=_0x585822[0x0]||_0x5a5ddc[_0x37e664(0x170)];if(!_0x5ce47e)return showParentSegmentNotSetError(_0x37e664(0x117)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x1e370d=resolveYamlFile(_0x5ce47e);if(existsSync(_0x1e370d)){_0x3dd7ba[_0x37e664(0x11d)]&&console[_0x37e664(0xdc)](_0x37e664(0x1eb)+_0x1e370d);let _0x551696;try{_0x551696=readFileSync(_0x1e370d,_0x37e664(0x287));}catch(_0x2497c4){const _0x3d4b95=_0x2497c4 instanceof Error?_0x2497c4['message']:String(_0x2497c4);return console[_0x37e664(0xdc)](_0x37e664(0x27b)+_0x3d4b95),0x1;}const _0x9c7948=await withSpinner(_0x37e664(0x185),()=>_0x5b8569['segment'][_0x37e664(0x20f)](_0x551696),{'verbose':_0x3dd7ba[_0x37e664(0x11d)]}),_0x2cd502=_0x9c7948['data'],{isNew:_0x2225e7,name:_0xa03409,hasChanges:_0x318441,diffFormatted:_0x526bb4}=_0x2cd502;if(_0x318441){_0x2225e7?console[_0x37e664(0xdc)](_0x37e664(0x174)+_0xa03409+'\x27:'):console[_0x37e664(0xdc)](_0x37e664(0x1fd)+_0xa03409+'\x27:');console[_0x37e664(0xdc)]('─'[_0x37e664(0x124)](0x3c)),console['error'](_0x526bb4),console[_0x37e664(0xdc)]('─'[_0x37e664(0x124)](0x3c));const _0x5bea7c=_0x2225e7?_0x37e664(0x26b)+_0xa03409+_0x37e664(0x258):_0x37e664(0xd7)+_0xa03409+_0x37e664(0x258);if(!_0x3dd7ba[_0x37e664(0x243)]){if(!isInteractive())return console['error'](a31_0x33dca6[_0x37e664(0xc9)](_0x37e664(0x22d)),_0x37e664(0x267)),console[_0x37e664(0xdc)](a31_0x33dca6['dim'](_0x37e664(0x19e))),0x1;const _0x5e6bbc=await confirmKey(_0x5bea7c);if(!_0x5e6bbc)return console['error'](a31_0x33dca6[_0x37e664(0x224)](_0x37e664(0x298))),0x1;}const _0x1e89f2=_0x2225e7?_0x37e664(0x1cb):'Updating';await withSpinner(_0x1e89f2+_0x37e664(0x2bd)+_0xa03409+_0x37e664(0x239),()=>_0x2cd502[_0x37e664(0x1b9)](),{'verbose':_0x3dd7ba[_0x37e664(0x11d)]});const _0x3f6c1d=_0x2225e7?_0x37e664(0x1d0):'Updated';console[_0x37e664(0xdc)]('✔\x20'+_0x3f6c1d+_0x37e664(0x2bd)+_0xa03409+'\x27');}else console[_0x37e664(0xdc)](_0x37e664(0x11c)+_0xa03409+_0x37e664(0x1db));}const _0x373438=await withSpinner(_0x37e664(0x178)+_0x5ce47e+_0x37e664(0x239),()=>_0x5b8569[_0x37e664(0x12c)][_0x37e664(0xbc)](_0x5ce47e),{'verbose':_0x3dd7ba[_0x37e664(0x11d)]}),_0x4550dd=_0x373438[_0x37e664(0x233)],_0x490f37=getConsoleUrl(_0x3dd7ba['site'],_0x37e664(0x1b7)+_0x4550dd[_0x37e664(0x1ad)]+_0x37e664(0x254)+_0x4550dd[_0x37e664(0x255)]+_0x37e664(0x281)+_0x4550dd['workflowAttemptId']);return console[_0x37e664(0xdc)]('\x0a✔\x20Workflow\x20started'),console['error']('\x20\x20'+a31_0x33dca6[_0x37e664(0x293)](_0x37e664(0x152))+'\x20'+_0x4550dd[_0x37e664(0xf5)]),console[_0x37e664(0xdc)]('\x20\x20'+a31_0x33dca6[_0x37e664(0x293)](_0x37e664(0x113))+'\x20'+_0x4550dd['status']),console['error']('\x20\x20'+a31_0x33dca6['dim']('Session:')+'\x20'+_0x4550dd[_0x37e664(0x255)]),console[_0x37e664(0xdc)]('\x20\x20'+a31_0x33dca6[_0x37e664(0x293)](_0x37e664(0x1c1))+'\x20'+_0x4550dd['workflowAttemptId']),console['error']('\x20\x20'+_0x490f37),console[_0x37e664(0xdc)]('\x0a'+a31_0x33dca6[_0x37e664(0x293)](_0x37e664(0x146))+_0x37e664(0xe3)+_0x4550dd['workflowAttemptId']+_0x37e664(0x1a9)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{['name']=a31_0x231dbb(0xcb);[a31_0x231dbb(0x261)]='List\x20available\x20fields\x20for\x20segmentation';async[a31_0x231dbb(0x1a7)](_0x40d991){const _0x89d894=a31_0x231dbb,{options:_0x452593,args:_0x317142,tdx:_0x24a4ce}=_0x40d991,_0x41bb3e=_0x317142[0x0]||_0x452593[_0x89d894(0x170)];if(!_0x41bb3e)return showParentSegmentNotSetError(_0x89d894(0x114)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment'),0x1;_0x452593[_0x89d894(0x11d)]&&(console[_0x89d894(0xdc)]('Site:\x20'+_0x452593[_0x89d894(0x296)]),console[_0x89d894(0xdc)](_0x89d894(0x18d)+_0x41bb3e));const _0x3eddd7=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x41bb3e+_0x89d894(0x239),()=>_0x24a4ce[_0x89d894(0x12c)][_0x89d894(0x212)](_0x41bb3e),{'verbose':_0x452593[_0x89d894(0x11d)]}),_0x17f2c1=_0x3eddd7[_0x89d894(0x233)];console[_0x89d894(0xdc)](_0x89d894(0x1f6)+_0x17f2c1[_0x89d894(0x17e)]+_0x89d894(0x221)+(_0x17f2c1[_0x89d894(0x17e)]!==0x1?'s':''));if(_0x452593[_0x89d894(0x1f2)]||_0x452593['jsonl'])return await handleSDKOutput(_0x17f2c1,_0x452593),0x0;return displayFieldsHumanReadable(_0x17f2c1,_0x41bb3e),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{['name']=a31_0x231dbb(0x225);['description']='Show\x20parent\x20segment\x20details';async[a31_0x231dbb(0x1a7)](_0x545e59){const _0x495d6b=a31_0x231dbb,{options:_0x582653,args:_0xf34bd5,tdx:_0x2655a2}=_0x545e59,_0x1df566=_0x582653,_0x1fed87=_0xf34bd5[0x0]||_0x582653['parentSegment'];if(!_0x1fed87)return showParentSegmentNotSetError(_0x495d6b(0x2a3)+_0x495d6b(0x14b)+_0x495d6b(0x256)+_0x495d6b(0xd1)),0x1;_0x582653[_0x495d6b(0x11d)]&&(console['error'](_0x495d6b(0x273)+_0x582653[_0x495d6b(0x296)]),console['error'](_0x495d6b(0x18d)+_0x1fed87));const _0x429889=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x1fed87+_0x495d6b(0x239),()=>_0x2655a2[_0x495d6b(0x12c)][_0x495d6b(0x27d)](_0x1fed87),{'verbose':_0x582653[_0x495d6b(0x11d)]}),_0x566394=_0x429889['data'];if(_0x1df566['web']){const _0x75604b=getConsoleNextUrl(_0x1df566[_0x495d6b(0x296)],_0x495d6b(0x2b0)+_0x566394['id']);return console[_0x495d6b(0xdc)](a31_0x33dca6[_0x495d6b(0x17c)]('✔')+_0x495d6b(0x153)+a31_0x33dca6[_0x495d6b(0x184)](_0x75604b)),openBrowser(_0x75604b),0x0;}return await handleSingleObjectOutput(_0x566394,_0x582653),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x1d6);['description']=a31_0x231dbb(0x134);async['execute'](_0x390cd7){const _0x345b84=a31_0x231dbb,{options:_0x268605,args:_0x42b10b,tdx:_0x354390}=_0x390cd7,_0x59cc5c=_0x268605,_0x77bcff=_0x42b10b[0x0]||_0x268605[_0x345b84(0x170)];if(!_0x77bcff)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a'+_0x345b84(0x256)+_0x345b84(0x1ab)),0x1;_0x268605[_0x345b84(0x11d)]&&(console[_0x345b84(0xdc)](_0x345b84(0x273)+_0x268605[_0x345b84(0x296)]),console[_0x345b84(0xdc)](_0x345b84(0x18d)+_0x77bcff));const _0x461914=await withSpinner(_0x345b84(0x1a3)+_0x77bcff+'\x27...',()=>_0x354390[_0x345b84(0x12c)][_0x345b84(0x288)](_0x77bcff),{'verbose':_0x268605[_0x345b84(0x11d)]}),_0x16b6f2=_0x461914[_0x345b84(0x233)],_0x330850=_0x354390[_0x345b84(0x12c)][_0x345b84(0x148)](_0x16b6f2);if(_0x59cc5c[_0x345b84(0x289)]){const _0x1dc4f7=await this[_0x345b84(0xbd)](_0x390cd7,_0x77bcff,_0x16b6f2,_0x330850),_0x261deb=this[_0x345b84(0x187)](_0x1dc4f7);writeFileSync(_0x59cc5c[_0x345b84(0x289)],_0x261deb);const _0xaf8b75=_0x1dc4f7[_0x345b84(0xad)][_0x345b84(0x18f)][_0x345b84(0x17e)]+_0x1dc4f7['behaviors']['reduce']((_0x549b83,_0x1f8f17)=>_0x549b83+_0x1f8f17[_0x345b84(0x18f)]['length'],0x0),_0x422948=_0x1dc4f7[_0x345b84(0x18b)][_0x345b84(0x12e)](_0x325a8d=>_0x325a8d[_0x345b84(0x18f)][_0x345b84(0x17e)]===0x0)['length'];return console['log'](_0x345b84(0x236)+_0x59cc5c[_0x345b84(0x289)]),console[_0x345b84(0x204)](_0x345b84(0x135)+_0x330850),console[_0x345b84(0x204)](_0x345b84(0x24f)+_0x1dc4f7[_0x345b84(0x18b)][_0x345b84(0x17e)]+_0x345b84(0xae)),console[_0x345b84(0x204)]('\x20\x20Columns:\x20'+_0xaf8b75+_0x345b84(0x206)),_0x422948>0x0&&console[_0x345b84(0x204)](_0x345b84(0x1e1)+_0x422948+_0x345b84(0x167)),0x0;}console['error']('\x0a'+a31_0x33dca6['bold'](_0x345b84(0x1b2))+'\x20'+a31_0x33dca6['cyan'](_0x330850));const _0x369597=await withSpinner(_0x345b84(0xb2),()=>_0x354390[_0x345b84(0x12c)][_0x345b84(0x1a6)](_0x16b6f2),{'verbose':_0x268605[_0x345b84(0x11d)]});console[_0x345b84(0xdc)]('\x0a'+a31_0x33dca6[_0x345b84(0xe2)](_0x345b84(0xad))+'\x20'+a31_0x33dca6[_0x345b84(0x293)]('('+_0x330850+_0x345b84(0x1c2)));const _0x30f956=await executeSchemaQuery(_0x369597[_0x345b84(0x233)],_0x354390,_0x268605);await handleQueryOutput(_0x30f956,_0x268605);const _0x2dd66f=await withSpinner(_0x345b84(0x20d),()=>_0x354390[_0x345b84(0x12c)][_0x345b84(0x237)](_0x16b6f2),{'verbose':_0x268605[_0x345b84(0x11d)]});for(const _0xa9b00c of _0x2dd66f[_0x345b84(0x233)]){const _0x861d3b=_0x345b84(0x110)+_0xa9b00c['toLowerCase']()[_0x345b84(0x1ff)](/\s+/g,'_'),_0x2ea3a5='SELECT\x20*\x20FROM\x20'+_0x330850+'.'+_0x861d3b;console[_0x345b84(0xdc)]('\x0a'+a31_0x33dca6[_0x345b84(0xe2)](_0xa9b00c)+'\x20'+a31_0x33dca6[_0x345b84(0x293)]('('+_0x330850+'.'+_0x861d3b+')'));try{const _0x5ab9da=await executeSchemaQuery(_0x2ea3a5,_0x354390,_0x268605);await handleQueryOutput(_0x5ab9da,_0x268605);}catch{console[_0x345b84(0xdc)](a31_0x33dca6['yellow'](_0x345b84(0x163)));}}return 0x0;}async[a31_0x231dbb(0xbd)](_0xef5b57,_0x2b385e,_0x56e924,_0x5546c1){const _0x30991a=a31_0x231dbb,{options:_0x50a760,tdx:_0x5a9f55}=_0xef5b57,_0x207beb=await withSpinner(_0x30991a(0xb2),()=>_0x5a9f55['segment'][_0x30991a(0x1a6)](_0x56e924),{'verbose':_0x50a760[_0x30991a(0x11d)]}),_0x511d87=await executeSchemaQuery(_0x207beb[_0x30991a(0x233)],_0x5a9f55,_0x50a760),_0x16fccb=_0x511d87[_0x30991a(0x233)]['map'](_0x2490a4=>({'name':_0x2490a4[_0x30991a(0xd9)],'type':_0x2490a4[_0x30991a(0xb5)]})),_0x386145=await withSpinner(_0x30991a(0x20d),()=>_0x5a9f55[_0x30991a(0x12c)][_0x30991a(0x237)](_0x56e924),{'verbose':_0x50a760[_0x30991a(0x11d)]}),_0x40e961=[];for(const _0x8be0f7 of _0x386145[_0x30991a(0x233)]){const _0x219d49='behavior_'+_0x8be0f7[_0x30991a(0x1d1)]()[_0x30991a(0x1ff)](/\s+/g,'_'),_0x3675a9='SELECT\x20*\x20FROM\x20'+_0x5546c1+'.'+_0x219d49;let _0x286cea=[];try{const _0x1d922c=await executeSchemaQuery(_0x3675a9,_0x5a9f55,_0x50a760);_0x286cea=_0x1d922c['data']['map'](_0x102edf=>({'name':_0x102edf[_0x30991a(0xd9)],'type':_0x102edf[_0x30991a(0xb5)]}));}catch{}_0x40e961[_0x30991a(0x2ad)]({'table':_0x219d49,'columns':_0x286cea});}return{'database':_0x5546c1,'parent_segment':_0x2b385e,'parent_id':_0x56e924,'customers':{'table':_0x30991a(0xad),'columns':_0x16fccb},'behaviors':_0x40e961};}[a31_0x231dbb(0x187)](_0x1de861){const _0x15067e=a31_0x231dbb,_0x284612=_0x6bcf23=>{const _0x3ff73b=a31_0x211d;if(_0x6bcf23[_0x3ff73b(0x17e)]===0x0)return'[]';const _0x3800d5=_0x6bcf23[_0x3ff73b(0x24d)](_0x257e9b=>_0x3ff73b(0x108)+_0x257e9b[_0x3ff73b(0xaf)]+_0x3ff73b(0x1c8)+_0x257e9b[_0x3ff73b(0x1df)]+_0x3ff73b(0x214));return'[\x0a'+_0x3800d5[_0x3ff73b(0x26d)](',\x0a')+_0x3ff73b(0x21e);},_0x5ed4b1=_0x1de861[_0x15067e(0x18b)]['map'](_0x2755bb=>{const _0x4302bf=_0x15067e;return _0x4302bf(0x15d)+_0x2755bb[_0x4302bf(0x15f)]+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20'+_0x284612(_0x2755bb[_0x4302bf(0x18f)])['replace'](/^/gm,'\x20\x20')['trim']()+'\x0a\x20\x20\x20\x20}';})[_0x15067e(0x26d)](',\x0a');return _0x15067e(0xcf)+_0x1de861[_0x15067e(0x1a4)]+_0x15067e(0x2c2)+_0x1de861[_0x15067e(0x1d7)]+'\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22'+_0x1de861[_0x15067e(0x102)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x1de861[_0x15067e(0xad)][_0x15067e(0x15f)]+_0x15067e(0x1b6)+_0x284612(_0x1de861['customers'][_0x15067e(0x18f)])['replace'](/^/gm,'\x20\x20')[_0x15067e(0x209)]()+_0x15067e(0x147)+_0x5ed4b1+_0x15067e(0xe8);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x252);['description']=a31_0x231dbb(0x2b2);async[a31_0x231dbb(0x1a7)](_0x2755e7){const _0x4d6980=a31_0x231dbb,{options:_0x118a49,args:_0x25752d,tdx:_0x2ddc85}=_0x2755e7,_0x266053=_0x25752d[0x0]||_0x118a49['parentSegment'];if(!_0x266053)return showParentSegmentNotSetError(_0x4d6980(0x1de)+_0x4d6980(0x105)),0x1;_0x118a49[_0x4d6980(0x11d)]&&(console[_0x4d6980(0xdc)](_0x4d6980(0x273)+_0x118a49['site']),console[_0x4d6980(0xdc)](_0x4d6980(0x18d)+_0x266053));const _0x58569a=await withSpinner(_0x4d6980(0x1a3)+_0x266053+_0x4d6980(0x239),()=>_0x2ddc85[_0x4d6980(0x12c)][_0x4d6980(0x288)](_0x266053),{'verbose':_0x118a49[_0x4d6980(0x11d)]}),_0x7a570f=_0x58569a[_0x4d6980(0x233)],_0xde8973=await withSpinner(_0x4d6980(0x27e)+_0x266053+_0x4d6980(0x239),()=>_0x2ddc85['segment'][_0x4d6980(0x1a6)](_0x7a570f),{'verbose':_0x118a49[_0x4d6980(0x11d)]}),_0x328448=_0xde8973[_0x4d6980(0x233)];return _0x118a49[_0x4d6980(0x2c0)]===_0x4d6980(0x1f2)||_0x118a49[_0x4d6980(0x2c0)]===_0x4d6980(0x2bb)?await handleSDKOutput([{'sql':_0x328448}],_0x118a49):console[_0x4d6980(0x204)](_0x328448),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a31_0x231dbb(0xaf)]='segment:parent:show';[a31_0x231dbb(0x261)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async['execute'](_0x1df6df){const _0x233b02=a31_0x231dbb,{options:_0x28bd3b,args:_0x35fc5b,tdx:_0x150fd9}=_0x1df6df,_0x21d792=_0x35fc5b[0x0]||_0x28bd3b['parentSegment'];if(!_0x21d792)return showParentSegmentNotSetError(_0x233b02(0x177)+_0x233b02(0xb4)),0x1;_0x28bd3b[_0x233b02(0x11d)]&&(console[_0x233b02(0xdc)](_0x233b02(0x273)+_0x28bd3b['site']),console[_0x233b02(0xdc)](_0x233b02(0x18d)+_0x21d792));const _0x32a901=await withSpinner(_0x233b02(0x1a3)+_0x21d792+_0x233b02(0x239),()=>_0x150fd9['segment'][_0x233b02(0x288)](_0x21d792),{'verbose':_0x28bd3b[_0x233b02(0x11d)]}),_0x784de2=_0x32a901[_0x233b02(0x233)],_0x5220af=await withSpinner(_0x233b02(0x27e)+_0x21d792+_0x233b02(0x239),()=>_0x150fd9[_0x233b02(0x12c)][_0x233b02(0x1a6)](_0x784de2),{'verbose':_0x28bd3b[_0x233b02(0x11d)]});let _0x54637e=_0x5220af[_0x233b02(0x233)];const _0x39bad3=resolveLimit(_0x28bd3b[_0x233b02(0x210)],DEFAULT_DISPLAY_LIMIT),_0x557667=/\bLIMIT\s+\d+/i[_0x233b02(0x2ac)](_0x54637e);!_0x557667&&(_0x54637e=_0x54637e['trim']()[_0x233b02(0x1ff)](/;+$/,''),_0x54637e='SELECT\x20*\x20FROM\x20(\x0a'+_0x54637e+_0x233b02(0x23e)+_0x39bad3);_0x28bd3b[_0x233b02(0x11d)]&&console[_0x233b02(0xdc)](_0x233b02(0x168)+_0x54637e);const _0x4b29b5=await withProgressSpinner(_0x233b02(0x1b1),async _0x918830=>{const _0xbb9d4f=_0x233b02,_0x15ce21=await _0x150fd9['query'][_0xbb9d4f(0x1a7)](_0x54637e,{'catalog':'td','schema':_0xbb9d4f(0x10c),'onJobId':_0x5037bb=>{const _0x3741b7=_0xbb9d4f;_0x918830[_0x3741b7(0xf9)](_0x5037bb);}});return _0x15ce21;},{'verbose':_0x28bd3b[_0x233b02(0x11d)]}),_0xd58710=_0x4b29b5[_0x233b02(0x233)],_0x43ac61=_0xd58710[_0x233b02(0xfa)]?_0x233b02(0x1ed)+_0xd58710[_0x233b02(0xfa)]+']':'';return console[_0x233b02(0xdc)](_0x233b02(0x25f)+_0xd58710['stats'][_0x233b02(0x1a0)][_0x233b02(0x270)]()+_0x233b02(0x199)+(_0x233b02(0x276)+formatElapsed(_0xd58710[_0x233b02(0x28e)][_0x233b02(0x1cc)])+_0x43ac61)),await handleQueryOutput(_0xd58710,_0x28bd3b),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x12b);['description']=a31_0x231dbb(0x1ee);async[a31_0x231dbb(0x1a7)](_0x509d0b){const _0x5ccec1=a31_0x231dbb,{options:_0x51f0a4,args:_0x5d1019,tdx:_0x2e543d}=_0x509d0b,_0x323c8f=_0x5d1019[0x0],_0x71125c=await withSpinner(_0x323c8f?_0x5ccec1(0x21f)+_0x323c8f+_0x5ccec1(0x239):_0x5ccec1(0x1e5),()=>_0x2e543d['realtime'][_0x5ccec1(0x25c)](),{'verbose':_0x51f0a4[_0x5ccec1(0x11d)]});let _0x5d65ba=_0x71125c[_0x5ccec1(0x233)][_0x5ccec1(0x12e)](_0x1534ba=>_0x1534ba[_0x5ccec1(0x142)]);if(_0x323c8f){const _0x34e146=_0x323c8f['replace'](/[.+^${}()|[\]\\]/g,_0x5ccec1(0x284))['replace'](/\*/g,'.*')[_0x5ccec1(0x1ff)](/\?/g,'.'),_0x3bb554=new RegExp('^'+_0x34e146+'$','i');_0x5d65ba=_0x5d65ba['filter'](_0x585ddb=>_0x3bb554[_0x5ccec1(0x2ac)](_0x585ddb[_0x5ccec1(0xaf)]));}_0x5d65ba[_0x5ccec1(0x1bb)]((_0x2d8f4f,_0x2501ff)=>_0x2d8f4f[_0x5ccec1(0xaf)][_0x5ccec1(0x217)](_0x2501ff[_0x5ccec1(0xaf)])),console[_0x5ccec1(0xdc)](_0x5ccec1(0x1f6)+_0x5d65ba[_0x5ccec1(0x17e)]+_0x5ccec1(0x275)+(_0x5d65ba[_0x5ccec1(0x17e)]!==0x1?'s':''));const _0x175430=_0x1b06af=>{const _0xdf55db=_0x5ccec1;return getConsoleNextUrl(_0x51f0a4['site'],_0xdf55db(0x2b0)+_0x1b06af);};if(_0x51f0a4['format']==='json'||_0x51f0a4[_0x5ccec1(0x2c0)]===_0x5ccec1(0x2bb)){const _0x3de98f=_0x5d65ba[_0x5ccec1(0x24d)](_0x5842c9=>({..._0x5842c9,'url':_0x175430(_0x5842c9['id'])}));await handleSDKOutput(_0x3de98f,_0x51f0a4);}else{if(_0x5d65ba[_0x5ccec1(0x17e)]===0x0)console[_0x5ccec1(0x204)](_0x5ccec1(0x251));else for(const _0x2ca200 of _0x5d65ba){const _0x2a42a0=_0x2ca200[_0x5ccec1(0x13f)]?a31_0x33dca6[_0x5ccec1(0x293)]('\x20('+formatRows(_0x2ca200['population'])+')'):'',_0x5999e1=hyperlink(_0x2ca200[_0x5ccec1(0xaf)],_0x175430(_0x2ca200['id']));console[_0x5ccec1(0x204)]('⚡\x20'+_0x5999e1+_0x2a42a0);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']='ps:rt:validate';['description']=a31_0x231dbb(0x131);async[a31_0x231dbb(0x1a7)](_0x3dbe34){const _0x1eb914=a31_0x231dbb,{options:_0x566bbf,args:_0x484d2b,tdx:_0x496e12}=_0x3dbe34,_0x56baaa=_0x484d2b[0x0]||_0x566bbf[_0x1eb914(0x170)];if(!_0x56baaa)return showParentSegmentNotSetError(_0x1eb914(0xe4)+_0x1eb914(0x139)),0x1;const _0x3c9a34=resolveYamlFile(_0x56baaa);if(!existsSync(_0x3c9a34))return showFileNotFoundError(_0x3c9a34,_0x56baaa),0x1;let _0x3758af;try{_0x3758af=readFileSync(_0x3c9a34,'utf-8');}catch(_0x581ded){const _0x1e2559=_0x581ded instanceof Error?_0x581ded[_0x1eb914(0x11e)]:String(_0x581ded);return console[_0x1eb914(0xdc)](_0x1eb914(0x27b)+_0x1e2559),0x1;}const _0xd6d1da=createCommandSpinner(a31_0x33dca6[_0x1eb914(0x293)]('Validating\x20RT\x20configuration...'),{'verbose':_0x566bbf[_0x1eb914(0x11d)]});_0xd6d1da['start']();const _0x26b79f={'realtime':!![],'onProgress':_0x4cfa5e=>{const _0x5ee486=_0x1eb914;_0xd6d1da[_0x5ee486(0x1d9)]=formatProgressMessage(_0x4cfa5e);}};let _0x33abd1;try{_0x33abd1=await _0x496e12['segment']['validateParentYaml'](_0x3758af,_0x26b79f),_0xd6d1da['stop']();}catch(_0x587f8b){_0xd6d1da[_0x1eb914(0x103)]();throw _0x587f8b;}console[_0x1eb914(0xdc)]('\x0a'+a31_0x33dca6[_0x1eb914(0xe2)](_0x1eb914(0x2be))+'\x20'+_0x33abd1[_0x1eb914(0xaf)]),console[_0x1eb914(0xdc)]('═'['repeat'](0x3c)),displayRealtimeValidation(_0x33abd1),console['error']('─'[_0x1eb914(0x124)](0x3c));if(_0x33abd1['errors']['length']>0x0){console[_0x1eb914(0xdc)]('\x0a'+a31_0x33dca6[_0x1eb914(0xc9)](_0x1eb914(0xef)));for(const _0x3fee95 of _0x33abd1[_0x1eb914(0x111)]){console[_0x1eb914(0xdc)]('\x20\x20'+a31_0x33dca6[_0x1eb914(0xc9)]('•')+'\x20'+_0x3fee95);}}return _0x33abd1[_0x1eb914(0x1e3)]&&console[_0x1eb914(0xdc)]('\x0a'+a31_0x33dca6[_0x1eb914(0x17c)]('✔')+_0x1eb914(0xb9)),_0x33abd1[_0x1eb914(0x1e3)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0x231dbb(0x245);[a31_0x231dbb(0x261)]=a31_0x231dbb(0x1ec);async['execute'](_0x59acb0){const _0x39b9bb=a31_0x231dbb,{options:_0x2ee581,args:_0x2e3b5b,tdx:_0x57bfc0}=_0x59acb0,_0x402cc2=_0x2e3b5b[0x0]||_0x2ee581[_0x39b9bb(0x170)];if(!_0x402cc2)return showParentSegmentNotSetError(_0x39b9bb(0x183)+_0x39b9bb(0x1d8)),0x1;_0x2ee581[_0x39b9bb(0x11d)]&&(console[_0x39b9bb(0xdc)](_0x39b9bb(0x273)+_0x2ee581[_0x39b9bb(0x296)]),console[_0x39b9bb(0xdc)](_0x39b9bb(0x18d)+_0x402cc2));const _0x19f3bd=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x402cc2+_0x39b9bb(0x239),()=>_0x57bfc0[_0x39b9bb(0x12c)][_0x39b9bb(0x288)](_0x402cc2),{'verbose':_0x2ee581['verbose']}),_0x183f41=_0x19f3bd[_0x39b9bb(0x233)],_0x3cd110=await withSpinner(_0x39b9bb(0x2c3)+_0x402cc2+_0x39b9bb(0x239),()=>_0x57bfc0[_0x39b9bb(0x2bc)][_0x39b9bb(0x14d)](_0x183f41),{'verbose':_0x2ee581[_0x39b9bb(0x11d)]}),_0x465dbd=_0x3cd110[_0x39b9bb(0x233)];console[_0x39b9bb(0xdc)](_0x39b9bb(0x1f6)+_0x465dbd[_0x39b9bb(0x17e)]+'\x20RT\x20journey'+(_0x465dbd['length']!==0x1?'s':''));if(_0x2ee581['format']===_0x39b9bb(0x1f2)||_0x2ee581[_0x39b9bb(0x2c0)]===_0x39b9bb(0x2bb))await handleSDKOutput(_0x465dbd,_0x2ee581);else{if(_0x465dbd[_0x39b9bb(0x17e)]===0x0)console[_0x39b9bb(0x204)](_0x39b9bb(0x238));else for(const _0xa0db43 of _0x465dbd){const _0x122db1=_0xa0db43[_0x39b9bb(0xd4)]==='launched'?'🚀':'📝',_0x4a3596=_0xa0db43['paused']?a31_0x33dca6[_0x39b9bb(0x224)](_0x39b9bb(0x2c4)):'',_0x4a0954=a31_0x33dca6[_0x39b9bb(0x293)]('\x20('+_0xa0db43[_0x39b9bb(0xf4)]+_0x39b9bb(0x23f)+(_0xa0db43[_0x39b9bb(0xf4)]!==0x1?'s':'')+')');console[_0x39b9bb(0x204)](_0x122db1+'\x20'+_0xa0db43[_0x39b9bb(0xaf)]+_0x4a3596+_0x4a0954);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0xba);['description']=a31_0x231dbb(0x279);async[a31_0x231dbb(0x1a7)](_0x5d8850){const _0x3226cf=a31_0x231dbb,{options:_0x5e298a,args:_0x392a55,tdx:_0x5e3af1}=_0x5d8850,_0x44d268=_0x392a55[0x0];if(!_0x44d268)return console[_0x3226cf(0xdc)](a31_0x33dca6[_0x3226cf(0xc9)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0x3226cf(0xdc)](_0x3226cf(0x13e)),console['error'](a31_0x33dca6[_0x3226cf(0x293)](_0x3226cf(0x14e))),0x1;_0x5e298a['verbose']&&(console['error'](_0x3226cf(0x273)+_0x5e298a['site']),console[_0x3226cf(0xdc)](_0x3226cf(0x268)+_0x44d268));const _0x2156d7=await withSpinner(_0x3226cf(0x2b8)+_0x44d268+_0x3226cf(0x239),()=>_0x5e3af1[_0x3226cf(0x2bc)][_0x3226cf(0x16c)](_0x44d268),{'verbose':_0x5e298a[_0x3226cf(0x11d)]}),_0x50709a=_0x2156d7[_0x3226cf(0x233)];console[_0x3226cf(0xdc)](_0x3226cf(0x1da)+_0x50709a['name']+'\x27');if(_0x5e298a['format']==='json'||_0x5e298a[_0x3226cf(0x2c0)]===_0x3226cf(0x2bb))await handleSDKOutput([_0x50709a],_0x5e298a);else{const _0x9e5034=_0x50709a[_0x3226cf(0xd4)]==='launched'?'🚀':'📝',_0x2a8b97=_0x50709a[_0x3226cf(0x2af)]?a31_0x33dca6[_0x3226cf(0x224)](_0x3226cf(0x2c4)):'';console[_0x3226cf(0x204)](_0x9e5034+'\x20'+_0x50709a[_0x3226cf(0xaf)]+_0x2a8b97);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x164);[a31_0x231dbb(0x261)]=a31_0x231dbb(0xf1);async['execute'](_0x47bec8){const _0x56896c=a31_0x231dbb,{options:_0x3aea21,args:_0x2d71a1,tdx:_0x8b05a3}=_0x47bec8,_0x2340e6=_0x2d71a1[0x0];if(!_0x2340e6)return console[_0x56896c(0xdc)](a31_0x33dca6[_0x56896c(0xc9)](_0x56896c(0x1d2))),console[_0x56896c(0xdc)](_0x56896c(0x23d)),console[_0x56896c(0xdc)](a31_0x33dca6[_0x56896c(0x293)](_0x56896c(0x14e))),0x1;_0x3aea21[_0x56896c(0x11d)]&&(console[_0x56896c(0xdc)](_0x56896c(0x273)+_0x3aea21['site']),console['error'](_0x56896c(0x268)+_0x2340e6));const _0x419782=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x2340e6+'\x27...',()=>_0x8b05a3[_0x56896c(0x2bc)][_0x56896c(0xfb)](_0x2340e6),{'verbose':_0x3aea21[_0x56896c(0x11d)]}),_0x16a7b6=_0x419782[_0x56896c(0x233)];console['error'](_0x56896c(0x234)+_0x16a7b6[_0x56896c(0xaf)]+'\x27');if(_0x3aea21['format']===_0x56896c(0x1f2)||_0x3aea21[_0x56896c(0x2c0)]==='jsonl')await handleSDKOutput([_0x16a7b6],_0x3aea21);else{const _0x105b8c=_0x16a7b6[_0x56896c(0xd4)]===_0x56896c(0x22a)?'🚀':'📝',_0x38ab53=_0x16a7b6[_0x56896c(0x2af)]?a31_0x33dca6['yellow'](_0x56896c(0x2c4)):'';console[_0x56896c(0x204)](_0x105b8c+'\x20'+_0x16a7b6[_0x56896c(0xaf)]+_0x38ab53);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x19b);[a31_0x231dbb(0x261)]=a31_0x231dbb(0x274);async[a31_0x231dbb(0x1a7)](_0x4a35b6){const _0x33ca05=a31_0x231dbb,{options:_0x530716,args:_0x378d61,tdx:_0x5cdad8}=_0x4a35b6,_0x4edcef=_0x378d61[0x0]||_0x530716[_0x33ca05(0x170)];if(!_0x4edcef)return showParentSegmentNotSetError(_0x33ca05(0xc2)+_0x33ca05(0x1c7)),0x1;_0x530716[_0x33ca05(0x11d)]&&(console['error']('Site:\x20'+_0x530716[_0x33ca05(0x296)]),console['error']('Parent\x20segment:\x20'+_0x4edcef));const _0x2e6f0e=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x4edcef+_0x33ca05(0x239),()=>_0x5cdad8['segment'][_0x33ca05(0x288)](_0x4edcef),{'verbose':_0x530716[_0x33ca05(0x11d)]}),_0x287baa=_0x2e6f0e[_0x33ca05(0x233)],_0x56ef4f=await withSpinner(_0x33ca05(0x200)+_0x4edcef+_0x33ca05(0x239),()=>_0x5cdad8['realtime'][_0x33ca05(0xf6)](_0x287baa),{'verbose':_0x530716[_0x33ca05(0x11d)]}),_0x169639=_0x56ef4f[_0x33ca05(0x233)];return console['error']('✔\x20Retrieved\x20RT\x20configuration\x20version'),_0x530716[_0x33ca05(0x2c0)]==='json'||_0x530716[_0x33ca05(0x2c0)]===_0x33ca05(0x2bb)?await handleSDKOutput([_0x169639],_0x530716):(console[_0x33ca05(0x204)](_0x33ca05(0x188)+_0x169639['id']),console['log']('audienceId:\x20'+_0x169639[_0x33ca05(0xf5)]),console[_0x33ca05(0x204)]('identifier:\x20'+_0x169639['identifier']),console['log'](_0x33ca05(0x125)+_0x169639[_0x33ca05(0x16f)]),console['log'](_0x33ca05(0x2b5)+_0x169639[_0x33ca05(0x292)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x231dbb(0xaf)]='ps:pz:service:list';[a31_0x231dbb(0x261)]=a31_0x231dbb(0x1bd);async['execute'](_0x454f0b){const _0xb52ca1=a31_0x231dbb,{options:_0x5acfea,args:_0x53bf17,tdx:_0x1495cd}=_0x454f0b,_0x4168fa=_0x53bf17[0x0]||_0x5acfea[_0xb52ca1(0x170)];if(!_0x4168fa)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20(requires\x20context)\x0a'+_0xb52ca1(0xc3)),0x1;const _0x7d6ea3=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x4168fa+_0xb52ca1(0x239),()=>_0x1495cd[_0xb52ca1(0x12c)][_0xb52ca1(0x288)](_0x4168fa),{'verbose':_0x5acfea[_0xb52ca1(0x11d)]}),_0x2a6ebe=_0x7d6ea3[_0xb52ca1(0x233)],_0x33044d=await withSpinner('Listing\x20personalization\x20services\x20for\x20\x27'+_0x4168fa+_0xb52ca1(0x239),()=>_0x1495cd[_0xb52ca1(0x13b)][_0xb52ca1(0x25c)](_0x2a6ebe),{'verbose':_0x5acfea[_0xb52ca1(0x11d)]}),_0x5516d4=_0x33044d[_0xb52ca1(0x233)];console['error'](_0xb52ca1(0x1f6)+_0x5516d4[_0xb52ca1(0x17e)]+'\x20personalization\x20service'+(_0x5516d4[_0xb52ca1(0x17e)]!==0x1?'s':''));if(_0x5acfea[_0xb52ca1(0x2c0)]===_0xb52ca1(0x1f2)||_0x5acfea['format']==='jsonl')await handleSDKOutput(_0x5516d4,_0x5acfea);else{if(_0x5516d4[_0xb52ca1(0x17e)]===0x0)console[_0xb52ca1(0x204)](_0xb52ca1(0x28b)),console['error'](a31_0x33dca6['cyan'](_0xb52ca1(0x171)));else for(const _0x15ff36 of _0x5516d4){console['log'](a31_0x33dca6[_0xb52ca1(0xe2)](_0x15ff36[_0xb52ca1(0xaf)])+'\x20'+a31_0x33dca6[_0xb52ca1(0x293)]('(id:\x20'+_0x15ff36['id']+')'));_0x15ff36[_0xb52ca1(0x261)]&&console[_0xb52ca1(0x204)]('\x20\x20'+a31_0x33dca6[_0xb52ca1(0x293)](_0x15ff36[_0xb52ca1(0x261)]));if(_0x15ff36[_0xb52ca1(0x155)]&&_0x15ff36['tokens'][_0xb52ca1(0x17e)]>0x0)for(const _0x5bae7b of _0x15ff36[_0xb52ca1(0x155)]){const _0x476df9=_0x5bae7b[_0xb52ca1(0xf7)]?.[_0xb52ca1(0x17e)]?_0x5bae7b[_0xb52ca1(0xf7)][_0xb52ca1(0x26d)](',\x20'):'any';console[_0xb52ca1(0x204)]('\x20\x20'+a31_0x33dca6['cyan'](_0xb52ca1(0x11f))+'\x20'+_0x5bae7b[_0xb52ca1(0xaf)]+'\x20'+a31_0x33dca6['dim'](_0xb52ca1(0xcc)+_0x5bae7b['id']+')')),console[_0xb52ca1(0x204)](_0xb52ca1(0xec)+a31_0x33dca6['dim'](_0xb52ca1(0x1a5))+'\x20'+_0x476df9);}else console[_0xb52ca1(0x204)]('\x20\x20'+a31_0x33dca6[_0xb52ca1(0x293)]('no\x20tokens\x20configured'));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']=a31_0x231dbb(0x1d5);[a31_0x231dbb(0x261)]=a31_0x231dbb(0x22c);async[a31_0x231dbb(0x1a7)](_0xbd4551){const _0x4bdb29=a31_0x231dbb,{options:_0x49148e,args:_0x2211f5,tdx:_0x348b76}=_0xbd4551,_0x16de3f=_0x49148e,_0x44d789=_0x2211f5[0x0],_0x357f06=_0x2211f5[0x1]||_0x49148e[_0x4bdb29(0x170)];if(!_0x44d789)return console['error'](_0x4bdb29(0xab)),console[_0x4bdb29(0xdc)](_0x4bdb29(0xe9)),console[_0x4bdb29(0xdc)](_0x4bdb29(0x240)),0x1;if(!_0x357f06)return showParentSegmentNotSetError(_0x4bdb29(0xf8)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x30db91=await withSpinner(_0x4bdb29(0x1a3)+_0x357f06+_0x4bdb29(0x239),()=>_0x348b76[_0x4bdb29(0x12c)][_0x4bdb29(0x288)](_0x357f06),{'verbose':_0x49148e[_0x4bdb29(0x11d)]}),_0xe02628=_0x30db91[_0x4bdb29(0x233)],_0x3eb99e={'name':_0x44d789,'description':_0x16de3f[_0x4bdb29(0x261)],'public':_0x16de3f[_0x4bdb29(0x1f5)]},_0x4fe269=await withSpinner('Creating\x20personalization\x20service\x20\x27'+_0x44d789+_0x4bdb29(0x239),()=>_0x348b76[_0x4bdb29(0x13b)][_0x4bdb29(0x1dd)](_0xe02628,_0x3eb99e),{'verbose':_0x49148e[_0x4bdb29(0x11d)]}),_0x1c181b=_0x4fe269[_0x4bdb29(0x233)];return console[_0x4bdb29(0xdc)](_0x4bdb29(0x1e8)+_0x1c181b[_0x4bdb29(0xaf)]+_0x4bdb29(0x23c)+_0x1c181b['id']),await handleSDKOutput([_0x1c181b],_0x49148e),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x1ca);[a31_0x231dbb(0x261)]=a31_0x231dbb(0x166);async[a31_0x231dbb(0x1a7)](_0x23d59b){const _0x42eacb=a31_0x231dbb,{options:_0x1d2d50,args:_0x212726,tdx:_0xb86282}=_0x23d59b,_0x31b217=_0x212726[0x0],_0x2a5522=_0x212726[0x1]||_0x1d2d50[_0x42eacb(0x170)];if(!_0x31b217)return console[_0x42eacb(0xdc)](_0x42eacb(0x2a7)),console['error'](_0x42eacb(0xc5)),console[_0x42eacb(0xdc)](_0x42eacb(0x2a5)),0x1;if(!_0x2a5522)return showParentSegmentNotSetError(_0x42eacb(0x278)+_0x42eacb(0x2a5)),0x1;const _0x357f80=await withSpinner(_0x42eacb(0x1a3)+_0x2a5522+_0x42eacb(0x239),()=>_0xb86282[_0x42eacb(0x12c)]['resolveParentId'](_0x2a5522),{'verbose':_0x1d2d50[_0x42eacb(0x11d)]}),_0x22bf14=_0x357f80[_0x42eacb(0x233)],_0x2b9cea=await withSpinner(_0x42eacb(0x2a8)+_0x31b217+'\x27...',()=>_0xb86282[_0x42eacb(0x13b)][_0x42eacb(0x1f4)](_0x22bf14,_0x31b217),{'verbose':_0x1d2d50['verbose']}),_0x1375ab=_0x2b9cea[_0x42eacb(0x233)];if(_0x1d2d50[_0x42eacb(0x1f2)]||_0x1d2d50['jsonl'])await handleSDKOutput([_0x1375ab],_0x1d2d50);else{console[_0x42eacb(0x204)](a31_0x33dca6[_0x42eacb(0xe2)](_0x1375ab[_0x42eacb(0xaf)])+'\x20'+a31_0x33dca6[_0x42eacb(0x293)](_0x42eacb(0xcc)+_0x1375ab['id']+')'));_0x1375ab[_0x42eacb(0x261)]&&console[_0x42eacb(0x204)]('\x20\x20'+a31_0x33dca6[_0x42eacb(0x293)](_0x1375ab[_0x42eacb(0x261)]));console[_0x42eacb(0x204)]('\x20\x20'+a31_0x33dca6[_0x42eacb(0x184)]('public:')+'\x20'+(_0x1375ab[_0x42eacb(0x1f5)]?_0x42eacb(0x243):'no'));if(_0x1375ab[_0x42eacb(0x155)]&&_0x1375ab[_0x42eacb(0x155)]['length']>0x0)for(const _0x438c79 of _0x1375ab[_0x42eacb(0x155)]){const _0x89bce2=_0x438c79[_0x42eacb(0xf7)]?.[_0x42eacb(0x17e)]?_0x438c79[_0x42eacb(0xf7)]['join'](',\x20'):'any';console[_0x42eacb(0x204)]('\x20\x20'+a31_0x33dca6[_0x42eacb(0x184)]('token:')+'\x20'+_0x438c79[_0x42eacb(0xaf)]+'\x20'+a31_0x33dca6['dim'](_0x42eacb(0xcc)+_0x438c79['id']+')')),console[_0x42eacb(0x204)](_0x42eacb(0xec)+a31_0x33dca6['dim'](_0x42eacb(0x1a5))+'\x20'+_0x89bce2);}else console[_0x42eacb(0x204)]('\x20\x20'+a31_0x33dca6[_0x42eacb(0x293)](_0x42eacb(0x2b4)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x231dbb(0xaf)]='ps:pz:service:delete';['description']=a31_0x231dbb(0x1dc);async[a31_0x231dbb(0x1a7)](_0x277dcd){const _0xd0f75=a31_0x231dbb,{options:_0x5c17bc,args:_0x48e8c0,tdx:_0x48e24d}=_0x277dcd,_0x194c52=_0x48e8c0[0x0],_0x3e6cdc=_0x48e8c0[0x1]||_0x5c17bc['parentSegment'];if(!_0x194c52)return console[_0xd0f75(0xdc)](_0xd0f75(0x2a7)),console[_0xd0f75(0xdc)](_0xd0f75(0x12d)),console['error'](_0xd0f75(0x249)),0x1;if(!_0x3e6cdc)return showParentSegmentNotSetError(_0xd0f75(0x1ef)+_0xd0f75(0x249)),0x1;const _0x4c9421=await withSpinner(_0xd0f75(0x1a3)+_0x3e6cdc+_0xd0f75(0x239),()=>_0x48e24d[_0xd0f75(0x12c)][_0xd0f75(0x288)](_0x3e6cdc),{'verbose':_0x5c17bc[_0xd0f75(0x11d)]}),_0x38642a=_0x4c9421[_0xd0f75(0x233)];return await withSpinner('Deleting\x20personalization\x20service\x20\x27'+_0x194c52+'\x27...',()=>_0x48e24d[_0xd0f75(0x13b)][_0xd0f75(0x2ae)](_0x38642a,_0x194c52),{'verbose':_0x5c17bc['verbose']}),console[_0xd0f75(0xdc)](_0xd0f75(0x13d)+_0x194c52+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{['name']=a31_0x231dbb(0xed);[a31_0x231dbb(0x261)]='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async[a31_0x231dbb(0x1a7)](_0xf9004e){const _0x1ebd9e=a31_0x231dbb,{options:_0x327b4b,args:_0x45418a,tdx:_0x546b32}=_0xf9004e,_0x45ee07=_0x327b4b,_0x1fd9d2=_0x45418a[0x0],_0x3bb50b=_0x45418a[0x1]||_0x327b4b['parentSegment'];if(!_0x1fd9d2)return console[_0x1ebd9e(0xdc)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x1ebd9e(0xdc)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),console[_0x1ebd9e(0xdc)](_0x1ebd9e(0x1af)),0x1;if(!_0x45ee07[_0x1ebd9e(0xaf)])return console[_0x1ebd9e(0xdc)]('Error:\x20--name\x20is\x20required'),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),0x1;if(!_0x3bb50b)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a'+_0x1ebd9e(0x1af)),0x1;const _0x413166=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3bb50b+_0x1ebd9e(0x239),()=>_0x546b32['segment'][_0x1ebd9e(0x288)](_0x3bb50b),{'verbose':_0x327b4b['verbose']}),_0x232f50=_0x413166[_0x1ebd9e(0x233)],_0x4a260d={'name':_0x45ee07[_0x1ebd9e(0xaf)]};_0x45ee07[_0x1ebd9e(0x261)]!==undefined&&(_0x4a260d[_0x1ebd9e(0x261)]=_0x45ee07[_0x1ebd9e(0x261)]);const _0x55d3e3=await withSpinner(_0x1ebd9e(0x116)+_0x1fd9d2+_0x1ebd9e(0x239),()=>_0x546b32['personalization']['patch'](_0x232f50,_0x1fd9d2,_0x4a260d),{'verbose':_0x327b4b[_0x1ebd9e(0x11d)]}),_0x572a72=_0x55d3e3['data'];return console[_0x1ebd9e(0xdc)](_0x1ebd9e(0x14a)+_0x572a72[_0x1ebd9e(0xaf)]+'\x27'),await handleSDKOutput([_0x572a72],_0x327b4b),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x231dbb(0xaf)]='ps:pz:service:token:create';[a31_0x231dbb(0x261)]='Create\x20a\x20token\x20for\x20a\x20personalization\x20service';async[a31_0x231dbb(0x1a7)](_0x3ca08a){const _0x774207=a31_0x231dbb,{options:_0x1b3841,args:_0x8c18b5,tdx:_0x1dc3a2}=_0x3ca08a,_0x27277e=_0x1b3841,_0x197868=_0x8c18b5[0x0],_0x2a7e5e=_0x8c18b5[0x1],_0x2c3c57=_0x8c18b5[0x2]||_0x1b3841[_0x774207(0x170)];if(!_0x197868)return console[_0x774207(0xdc)](_0x774207(0x130)),console[_0x774207(0xdc)](_0x774207(0xc1)),console[_0x774207(0xdc)](_0x774207(0x16a)),0x1;if(!_0x2a7e5e)return console['error'](_0x774207(0x2a7)),console[_0x774207(0xdc)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x774207(0xdc)](_0x774207(0x16a)),0x1;if(!_0x2c3c57)return showParentSegmentNotSetError(_0x774207(0x17f)+_0x774207(0x16a)),0x1;const _0x16105b=await withSpinner(_0x774207(0x1a3)+_0x2c3c57+_0x774207(0x239),()=>_0x1dc3a2[_0x774207(0x12c)][_0x774207(0x288)](_0x2c3c57),{'verbose':_0x1b3841[_0x774207(0x11d)]}),_0x1fc632=_0x16105b[_0x774207(0x233)],_0x4b748f={'name':_0x197868};_0x27277e[_0x774207(0xf7)]&&(_0x4b748f[_0x774207(0xf7)]=_0x27277e['allowedIps']['split'](',')[_0x774207(0x24d)](_0x42f40b=>_0x42f40b['trim']()));_0x27277e[_0x774207(0x261)]&&(_0x4b748f['description']=_0x27277e['description']);const _0xb56b90=await withSpinner(_0x774207(0x24a)+_0x197868+_0x774207(0xd5)+_0x2a7e5e+_0x774207(0x239),()=>_0x1dc3a2[_0x774207(0x13b)][_0x774207(0x118)](_0x1fc632,_0x2a7e5e,_0x4b748f),{'verbose':_0x1b3841[_0x774207(0x11d)]}),_0x5d2680=_0xb56b90['data'];return console['error'](_0x774207(0x2c1)+_0x5d2680['name']+_0x774207(0x23c)+_0x5d2680['id']),_0x5d2680[_0x774207(0x149)]&&(console[_0x774207(0xdc)](a31_0x33dca6['yellow'](_0x774207(0x1f7))),console[_0x774207(0xdc)](a31_0x33dca6[_0x774207(0x184)](_0x5d2680[_0x774207(0x149)])),console['error']('')),await handleSDKOutput([_0x5d2680],_0x1b3841),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x165);['description']='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async[a31_0x231dbb(0x1a7)](_0x578427){const _0x4d82e3=a31_0x231dbb,{options:_0x3ae051,args:_0x5d7639,tdx:_0x3530a8}=_0x578427,_0x2a04e6=_0x5d7639[0x0],_0x4b020d=_0x5d7639[0x1]||_0x3ae051['parentSegment'];if(!_0x2a04e6)return console[_0x4d82e3(0xdc)](_0x4d82e3(0xaa)),console[_0x4d82e3(0xdc)](_0x4d82e3(0x16d)),console[_0x4d82e3(0xdc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x4b020d)return showParentSegmentNotSetError(_0x4d82e3(0x262)+_0x4d82e3(0x15c)),0x1;const _0x4b5e52=await withSpinner(_0x4d82e3(0x1a3)+_0x4b020d+'\x27...',()=>_0x3530a8['segment'][_0x4d82e3(0x288)](_0x4b020d),{'verbose':_0x3ae051[_0x4d82e3(0x11d)]}),_0xdf8b9e=_0x4b5e52['data'],_0x48409b=await withSpinner('Finding\x20service\x20for\x20token...',()=>_0x3530a8[_0x4d82e3(0x13b)][_0x4d82e3(0x25c)](_0xdf8b9e),{'verbose':_0x3ae051[_0x4d82e3(0x11d)]}),_0x3baf5b=_0x48409b[_0x4d82e3(0x233)];let _0x4b5ef6;for(const _0x3b9e07 of _0x3baf5b){if(_0x3b9e07[_0x4d82e3(0x155)]?.[_0x4d82e3(0x138)](_0x2da05f=>_0x2da05f['id']===_0x2a04e6)){_0x4b5ef6=_0x3b9e07['id'];break;}}if(!_0x4b5ef6)return console[_0x4d82e3(0xdc)]('Error:\x20Token\x20\x27'+_0x2a04e6+'\x27\x20not\x20found\x20in\x20any\x20personalization\x20service'),0x1;const _0x5d6ce5=await withSpinner(_0x4d82e3(0x161)+_0x2a04e6+'\x27...',()=>_0x3530a8['personalization'][_0x4d82e3(0x216)](_0xdf8b9e,_0x4b5ef6,_0x2a04e6),{'verbose':_0x3ae051['verbose']}),_0x31fb93=_0x5d6ce5[_0x4d82e3(0x233)];return console[_0x4d82e3(0xdc)](_0x4d82e3(0x28f)+(_0x31fb93[_0x4d82e3(0xaf)]||_0x2a04e6)+'\x27'),await handleSDKOutput([_0x31fb93],_0x3ae051),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x26e);['description']=a31_0x231dbb(0x1f1);async[a31_0x231dbb(0x1a7)](_0x4f6fd4){const _0x26685a=a31_0x231dbb,{options:_0xdcebc,args:_0x40195b,tdx:_0x435cc1}=_0x4f6fd4,_0x391b88=_0x40195b[0x0]||_0xdcebc[_0x26685a(0x170)];if(!_0x391b88)return showParentSegmentNotSetError(_0x26685a(0x100)+_0x26685a(0x1d3)),0x1;const _0x30bcae=await withSpinner(_0x26685a(0x1a3)+_0x391b88+_0x26685a(0x239),()=>_0x435cc1[_0x26685a(0x12c)][_0x26685a(0x288)](_0x391b88),{'verbose':_0xdcebc[_0x26685a(0x11d)]}),_0x5d67f0=_0x30bcae[_0x26685a(0x233)],_0x4d02b4=await withSpinner(_0x26685a(0x211)+_0x391b88+_0x26685a(0x239),()=>_0x435cc1[_0x26685a(0x13b)]['listPersonalizations'](_0x5d67f0),{'verbose':_0xdcebc[_0x26685a(0x11d)]}),_0x11f71a=_0x4d02b4['data'];console['error'](_0x26685a(0x1f6)+_0x11f71a[_0x26685a(0x17e)]+_0x26685a(0x119)+(_0x11f71a[_0x26685a(0x17e)]!==0x1?'s':''));if(_0xdcebc[_0x26685a(0x2c0)]===_0x26685a(0x1f2)||_0xdcebc[_0x26685a(0x2c0)]==='jsonl')await handleSDKOutput(_0x11f71a,_0xdcebc);else{if(_0x11f71a[_0x26685a(0x17e)]===0x0)console[_0x26685a(0x204)](_0x26685a(0x137));else for(const _0x1324a4 of _0x11f71a){console[_0x26685a(0x204)](a31_0x33dca6[_0x26685a(0xe2)](_0x1324a4[_0x26685a(0xaf)])+'\x20'+a31_0x33dca6['dim'](_0x26685a(0xcc)+_0x1324a4['id']+')'));_0x1324a4[_0x26685a(0x261)]&&console[_0x26685a(0x204)]('\x20\x20'+a31_0x33dca6[_0x26685a(0x293)](_0x1324a4['description']));const _0xc0134=_0x1324a4[_0x26685a(0x2b1)]?.[_0x26685a(0x17e)]||0x0;console['log']('\x20\x20'+a31_0x33dca6[_0x26685a(0x184)](_0x26685a(0x14f))+'\x20'+_0xc0134);if(_0x1324a4[_0x26685a(0x2b1)]&&_0x1324a4[_0x26685a(0x2b1)][_0x26685a(0x17e)]>0x0)for(const _0x32ffaa of _0x1324a4[_0x26685a(0x2b1)]){console[_0x26685a(0x204)]('\x20\x20\x20\x20-\x20'+_0x32ffaa['name']);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x11b);[a31_0x231dbb(0x261)]='Show\x20a\x20specific\x20realtime\x20personalization';async[a31_0x231dbb(0x1a7)](_0x11ddc5){const _0x48920a=a31_0x231dbb,{options:_0xdaf241,args:_0x5e16fc,tdx:_0x128a0a}=_0x11ddc5,_0x53db33=_0x5e16fc[0x0];if(!_0x53db33)return console[_0x48920a(0xdc)](_0x48920a(0x1c6)),console[_0x48920a(0xdc)](_0x48920a(0x132)),0x1;const _0x3005c5=await withSpinner('Getting\x20personalization\x20\x27'+_0x53db33+_0x48920a(0x239),()=>_0x128a0a['personalization']['getPersonalization'](_0x53db33),{'verbose':_0xdaf241['verbose']}),_0x24bd47=_0x3005c5['data'];console['error'](_0x48920a(0x1f0)+_0x24bd47[_0x48920a(0xaf)]+'\x27');if(_0xdaf241[_0x48920a(0x2c0)]===_0x48920a(0x1f2)||_0xdaf241['format']===_0x48920a(0x2bb))await handleSDKOutput([_0x24bd47],_0xdaf241);else{console[_0x48920a(0x204)](a31_0x33dca6[_0x48920a(0xe2)](_0x24bd47[_0x48920a(0xaf)])+'\x20'+a31_0x33dca6['dim']('(id:\x20'+_0x24bd47['id']+')'));_0x24bd47['description']&&console['log']('\x20\x20'+a31_0x33dca6[_0x48920a(0x293)](_0x24bd47[_0x48920a(0x261)]));_0x24bd47[_0x48920a(0xf5)]&&console[_0x48920a(0x204)]('\x20\x20'+a31_0x33dca6[_0x48920a(0x184)](_0x48920a(0x175))+'\x20'+_0x24bd47[_0x48920a(0xf5)]);console[_0x48920a(0x204)]('\x20\x20'+a31_0x33dca6[_0x48920a(0x184)]('created:')+'\x20'+_0x24bd47[_0x48920a(0x121)]),console[_0x48920a(0x204)]('\x20\x20'+a31_0x33dca6['cyan'](_0x48920a(0x2c5))+'\x20'+_0x24bd47[_0x48920a(0xbb)]);const _0x3794cf=_0x24bd47['sections']?.[_0x48920a(0x17e)]||0x0;console[_0x48920a(0x204)]('\x20\x20'+a31_0x33dca6[_0x48920a(0x184)]('sections:')+'\x20'+_0x3794cf);if(_0x24bd47[_0x48920a(0x2b1)]&&_0x24bd47[_0x48920a(0x2b1)][_0x48920a(0x17e)]>0x0)for(const _0x4b4d45 of _0x24bd47[_0x48920a(0x2b1)]){console[_0x48920a(0x204)](_0x48920a(0xec)+a31_0x33dca6[_0x48920a(0xe2)](_0x4b4d45[_0x48920a(0xaf)])+'\x20'+a31_0x33dca6[_0x48920a(0x293)](_0x48920a(0xcc)+_0x4b4d45['id']+')')),_0x4b4d45[_0x48920a(0xdd)]&&(console[_0x48920a(0x204)]('\x20\x20\x20\x20\x20\x20'+a31_0x33dca6[_0x48920a(0x184)](_0x48920a(0x269))+'\x20'+_0x4b4d45['entryCriteria'][_0x48920a(0xaf)]),_0x4b4d45[_0x48920a(0xdd)][_0x48920a(0x150)]?.[_0x48920a(0x25e)]&&console['log'](_0x48920a(0x18c)+a31_0x33dca6['cyan'](_0x48920a(0x1c0))+'\x20'+_0x4b4d45['entryCriteria'][_0x48920a(0x150)][_0x48920a(0x25e)])),_0x4b4d45[_0x48920a(0x186)]&&console[_0x48920a(0x204)](_0x48920a(0x266)+a31_0x33dca6['cyan'](_0x48920a(0x1fa))+'\x20'+JSON[_0x48920a(0xdf)](_0x4b4d45[_0x48920a(0x186)])),_0x4b4d45[_0x48920a(0x29c)]&&console[_0x48920a(0x204)]('\x20\x20\x20\x20\x20\x20'+a31_0x33dca6[_0x48920a(0x184)]('includeSensitive:')+_0x48920a(0x192));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{['name']=a31_0x231dbb(0x24b);[a31_0x231dbb(0x261)]='Delete\x20a\x20realtime\x20personalization';async[a31_0x231dbb(0x1a7)](_0x3da121){const _0x21fdd1=a31_0x231dbb,{options:_0x5b2b98,args:_0x4348d0,tdx:_0x1699bf}=_0x3da121,_0x171868=_0x4348d0[0x0];if(!_0x171868)return console['error'](_0x21fdd1(0x1c6)),console[_0x21fdd1(0xdc)](_0x21fdd1(0x1f3)),0x1;return await withSpinner('Deleting\x20personalization\x20\x27'+_0x171868+_0x21fdd1(0x239),()=>_0x1699bf[_0x21fdd1(0x13b)]['deletePersonalization'](_0x171868),{'verbose':_0x5b2b98['verbose']}),console[_0x21fdd1(0xdc)](_0x21fdd1(0x227)+_0x171868+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x191);[a31_0x231dbb(0x261)]=a31_0x231dbb(0x24e);async[a31_0x231dbb(0x1a7)](_0xbd625b){const _0x383217=a31_0x231dbb,{options:_0xf321f4,tdx:_0x9ddc00}=_0xbd625b,_0xa8ed11=_0xf321f4;let _0x5877f2;if(_0xa8ed11[_0x383217(0x283)]){_0x5877f2=await loadJSON(_0xa8ed11[_0x383217(0x283)],!![]);if(!_0x5877f2[_0x383217(0x159)]?.[_0x383217(0xea)])return console['error'](_0x383217(0x1e6)),console[_0x383217(0xdc)](_0x383217(0x2a0)),console[_0x383217(0xdc)]('\x20\x20\x22relationships\x22:\x20{\x20\x22parentFolder\x22:\x20{\x20\x22data\x22:\x20{\x20\x22id\x22:\x20\x22<id>\x22,\x20\x22type\x22:\x20\x22folder-segment\x22\x20}\x20}\x20}'),0x1;}else{if(!_0xa8ed11[_0x383217(0xaf)])return console['error']('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x383217(0xdc)](_0x383217(0x27f)),console[_0x383217(0xdc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0xa8ed11['description']===undefined)return console[_0x383217(0xdc)](_0x383217(0x257)),console[_0x383217(0xdc)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0x383217(0xdc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0xa8ed11[_0x383217(0x218)]===undefined)return console[_0x383217(0xdc)](_0x383217(0x286)),console[_0x383217(0xdc)]('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x1fdae1=_0xa8ed11[_0x383217(0xf5)];if(!_0x1fdae1&&_0xf321f4['parentSegment']){const _0x182472=await withSpinner(_0x383217(0x1a3)+_0xf321f4['parentSegment']+_0x383217(0x239),()=>_0x9ddc00[_0x383217(0x12c)]['resolveParentId'](_0xf321f4[_0x383217(0x170)]),{'verbose':_0xf321f4['verbose']});_0x1fdae1=_0x182472[_0x383217(0x233)];}let _0x127573;_0xa8ed11['sections']&&(_0x127573=await loadJSON(_0xa8ed11[_0x383217(0x2b1)],![]));const _0xbc90fd=_0xa8ed11[_0x383217(0x218)]===_0x383217(0x263)?null:{'id':_0xa8ed11[_0x383217(0x218)],'type':_0x383217(0x277)};_0x5877f2={'attributes':{'name':_0xa8ed11[_0x383217(0xaf)],'description':_0xa8ed11[_0x383217(0x261)]||null,..._0x1fdae1!==undefined&&{'audienceId':_0x1fdae1},..._0x127573!==undefined&&{'sections':_0x127573}},'relationships':{'parentFolder':{'data':_0xbc90fd}}};}const _0x5e6892=await withSpinner(_0x383217(0xf3)+(_0x5877f2[_0x383217(0x14c)]?.[_0x383217(0xaf)]??'')+_0x383217(0x239),()=>_0x9ddc00[_0x383217(0x13b)][_0x383217(0x297)](_0x5877f2),{'verbose':_0xf321f4[_0x383217(0x11d)]}),_0x423a1b=_0x5e6892[_0x383217(0x233)];return console[_0x383217(0xdc)](_0x383217(0xe6)+_0x423a1b[_0x383217(0xaf)]+_0x383217(0x23c)+_0x423a1b['id']),await handleSDKOutput([_0x423a1b],_0xf321f4),0x0;}}export class PSPzPatchCommand extends BaseCommand{['name']=a31_0x231dbb(0x222);[a31_0x231dbb(0x261)]=a31_0x231dbb(0x215);async[a31_0x231dbb(0x1a7)](_0x50d121){const _0x2ced72=a31_0x231dbb,{options:_0x3228b9,args:_0x4303c1}=_0x50d121,_0x43a1bc=_0x3228b9,_0x1c60ff=_0x4303c1[0x0];if(!_0x1c60ff)return console[_0x2ced72(0xdc)](_0x2ced72(0x1c6)),console['error'](_0x2ced72(0x22e)),console[_0x2ced72(0xdc)](_0x2ced72(0xe1)),0x1;let _0x2412f7;if(_0x43a1bc['file'])_0x2412f7=await loadJSON(_0x43a1bc[_0x2ced72(0x283)],!![]);else{if(!_0x43a1bc[_0x2ced72(0xaf)])return console[_0x2ced72(0xdc)](_0x2ced72(0x291)),console['error'](_0x2ced72(0x22e)),0x1;if(_0x43a1bc[_0x2ced72(0x261)]===undefined)return console['error'](_0x2ced72(0x257)),console[_0x2ced72(0xdc)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x44a3c0;_0x43a1bc[_0x2ced72(0x2b1)]&&(_0x44a3c0=await loadJSON(_0x43a1bc[_0x2ced72(0x2b1)],![])),_0x2412f7={'attributes':{'name':_0x43a1bc[_0x2ced72(0xaf)],'description':_0x43a1bc['description']||null,..._0x44a3c0!==undefined&&{'sections':_0x44a3c0}}};}const {tdx:_0x27f9d1}=_0x50d121,_0x22281c=await withSpinner(_0x2ced72(0x202)+_0x1c60ff+'\x27...',()=>_0x27f9d1['personalization'][_0x2ced72(0x1ea)](_0x1c60ff,_0x2412f7),{'verbose':_0x3228b9[_0x2ced72(0x11d)]}),_0x37a3f3=_0x22281c[_0x2ced72(0x233)];return console[_0x2ced72(0xdc)](_0x2ced72(0x29a)+_0x37a3f3[_0x2ced72(0xaf)]+'\x27\x20(id:\x20'+_0x37a3f3['id']+')'),await handleSDKOutput([_0x37a3f3],_0x3228b9),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x231dbb(0xaf)]=a31_0x231dbb(0x22f);[a31_0x231dbb(0x261)]=a31_0x231dbb(0x1fc);async[a31_0x231dbb(0x1a7)](_0x5942f0){const _0x35c683=a31_0x231dbb,{options:_0x33cffa,args:_0x245c22}=_0x5942f0,_0x594605=_0x245c22[0x0]||_0x33cffa['parentSegment'];if(!_0x594605)return showParentSegmentNotSetError(_0x35c683(0x1ba)+_0x35c683(0x10a)),0x1;const _0x7a1184=resolveYamlFile(_0x594605);if(!existsSync(_0x7a1184))return showFileNotFoundError(_0x7a1184,_0x594605),0x1;let _0x3c47d1;try{_0x3c47d1=readFileSync(_0x7a1184,_0x35c683(0x287));}catch(_0x479d25){const _0x1579eb=_0x479d25 instanceof Error?_0x479d25[_0x35c683(0x11e)]:String(_0x479d25);return console[_0x35c683(0xdc)](_0x35c683(0x27b)+_0x1579eb),0x1;}let _0x2e0ab0;try{_0x2e0ab0=parseDef(_0x3c47d1);}catch(_0x384667){const _0x34bdf3=_0x384667 instanceof Error?_0x384667[_0x35c683(0x11e)]:String(_0x384667);return console[_0x35c683(0xdc)](a31_0x33dca6[_0x35c683(0xc9)](_0x35c683(0x20c)+_0x34bdf3)),0x1;}if(_0x2e0ab0['personalization_services']&&_0x2e0ab0[_0x35c683(0x26f)][_0x35c683(0x17e)]>0x0)return console[_0x35c683(0xdc)](a31_0x33dca6[_0x35c683(0x224)]('⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20'+_0x7a1184)),console[_0x35c683(0xdc)](a31_0x33dca6[_0x35c683(0x293)]('\x20\x20\x20'+_0x2e0ab0[_0x35c683(0x26f)][_0x35c683(0x17e)]+_0x35c683(0x1cd))),0x1;!_0x2e0ab0['realtime']&&(_0x2e0ab0[_0x35c683(0x2bc)]={'events':[{'name':_0x35c683(0x193),'source_table':_0x35c683(0x16e)}],'attributes':[{'name':'last_page_viewed','type':'single'}],'id_stitching':{'primary_key':_0x2e0ab0[_0x35c683(0x294)][_0x35c683(0x15f)]===_0x35c683(0xad)?_0x35c683(0x272):'user_id'}});_0x2e0ab0[_0x35c683(0x26f)]=[{'name':'My\x20Service','description':_0x35c683(0xc8),'trigger_event':'page_view','sections':[{'name':_0x35c683(0x189),'criteria':'true','attributes':['last_page_viewed']}]}];const _0x28fa58=serializeDef(_0x2e0ab0);return writeFileSync(_0x7a1184,_0x28fa58,_0x35c683(0x287)),console[_0x35c683(0xdc)](a31_0x33dca6['green']('✔')+'\x20Added\x20personalization\x20template\x20to\x20'+a31_0x33dca6['cyan'](_0x7a1184)),(!_0x2e0ab0[_0x35c683(0x2bc)]||_0x3c47d1[_0x35c683(0xb3)](_0x35c683(0x157))===-0x1)&&console[_0x35c683(0xdc)](a31_0x33dca6[_0x35c683(0x17c)]('✔')+_0x35c683(0x280)),console[_0x35c683(0xdc)]('\x0a'+a31_0x33dca6[_0x35c683(0x293)](_0x35c683(0x2a1))),console[_0x35c683(0xdc)](_0x35c683(0x19f)+_0x7a1184+_0x35c683(0xfc)),console[_0x35c683(0xdc)]('\x20\x202.\x20Run\x20'+a31_0x33dca6[_0x35c683(0x293)](_0x35c683(0x285)+_0x594605)+_0x35c683(0x21a)),0x0;}}
1
+ const a31_0x121f5f=a31_0x5c5b;(function(_0x3c8641,_0x89ea7c){const _0x39f21c=a31_0x5c5b,_0x511d54=_0x3c8641();while(!![]){try{const _0x87750d=parseInt(_0x39f21c(0x364))/0x1+-parseInt(_0x39f21c(0x2dc))/0x2+parseInt(_0x39f21c(0x1e9))/0x3+-parseInt(_0x39f21c(0x2d7))/0x4*(parseInt(_0x39f21c(0x264))/0x5)+parseInt(_0x39f21c(0x32c))/0x6*(parseInt(_0x39f21c(0x355))/0x7)+-parseInt(_0x39f21c(0x2b4))/0x8+parseInt(_0x39f21c(0x23c))/0x9;if(_0x87750d===_0x89ea7c)break;else _0x511d54['push'](_0x511d54['shift']());}catch(_0x39027e){_0x511d54['push'](_0x511d54['shift']());}}}(a31_0x1859,0xd9f5a));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0xe018d2 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a31_0x4e7eff from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR='parent_segments',LEGACY_PARENT_SEGMENT_DIR=a31_0x121f5f(0x2ab);function openBrowser(_0x2acba9){const _0x4afb42=a31_0x121f5f,_0x1a438d=process[_0x4afb42(0x1f9)],_0x40cb3c=_0x1a438d===_0x4afb42(0x256)?_0x4afb42(0x30c):_0x1a438d===_0x4afb42(0x31d)?_0x4afb42(0x245):_0x4afb42(0x1e6);spawn(_0x40cb3c,[_0x2acba9],{'detached':!![],'stdio':_0x4afb42(0x33d)})[_0x4afb42(0x318)]();}function migrateLegacyDirectory(){const _0x32ae57=a31_0x121f5f;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x50ed61=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x50ed61[_0x32ae57(0x1d5)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x32ae57(0x214)](a31_0x4e7eff['yellow'](_0x32ae57(0x1c7)+LEGACY_PARENT_SEGMENT_DIR+_0x32ae57(0x365)+PARENT_SEGMENT_DIR+_0x32ae57(0x249))),console[_0x32ae57(0x214)](a31_0x4e7eff[_0x32ae57(0x1b3)](_0x32ae57(0x1e8)+LEGACY_PARENT_SEGMENT_DIR+_0x32ae57(0x27a))),![];console['error'](a31_0x4e7eff['yellow'](_0x32ae57(0x1c6)+LEGACY_PARENT_SEGMENT_DIR+'/\x20→\x20'+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x32ae57(0x214)](a31_0x4e7eff[_0x32ae57(0x29e)](_0x32ae57(0x1ed)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x434b1d){const _0x1032b0=_0x434b1d instanceof Error?_0x434b1d[_0x32ae57(0x1c0)]:String(_0x434b1d);return console[_0x32ae57(0x214)](a31_0x4e7eff[_0x32ae57(0x277)](_0x32ae57(0x248)+_0x1032b0+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async['run'](_0x357922){return migrateLegacyDirectory(),super['run'](_0x357922);}}function resolveYamlFile(_0x110f71){const _0x5c981d=a31_0x121f5f;if(_0x110f71[_0x5c981d(0x31f)](_0x5c981d(0x2fd))||_0x110f71['endsWith']('.yaml'))return _0x110f71;return a31_0xe018d2['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x110f71)+_0x5c981d(0x2fd));}function a31_0x1859(){const _0x16663a=['ps:pz:show','👥\x20','ps:rt:jn:list','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','displayPreviewResults','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','dim','Join\x20on:','\x20RT\x20configuration\x20is\x20valid','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20for\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','pullParentYaml','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','dirname','Listing\x20personalization\x20services\x20for\x20\x27','validateParentYaml','Validating\x20RT\x20configuration...','Getting\x20personalization\x20\x27','message','reduce','cyan','Error:\x20Token\x20\x27','Fetching\x20parent\x20segment\x20\x27','Fetching\x20personalization\x20service\x20\x27','\x0a⚠️\x20\x20Migrating:\x20','\x0a⚠️\x20\x20Both\x20','\x0aNew\x20parent\x20segment\x20\x27','timezone','No\x20personalizations\x20configured','formatSchemaJson','Behavior:','idStitching','getParentSQL','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','customers','split','Attributes','listFields','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','isDirectory','utf-8','Available\x20behaviors:','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','Error:\x20--attribute\x20requires\x20a\x20name\x0a','displayAttributesStats','column_type','population','\x20personalization\x20service','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','Pattern:\x20','\x20\x20\x20\x20-\x20','stop','\x20personalization','xdg-open','value','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','2421306xgPaxL','listParents','name','Error:\x20Parent\x20segment\x20name\x20is\x20required','✔\x20Renamed\x20directory\x20to\x20','Error:','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','\x20Opening\x20','/attempt/','match','primaryKey','personalizationServices','file','Error:\x20--database\x20and\x20--table\x20are\x20required','\x20parent\x20segment','\x20\x201.\x20Edit\x20','platform','Error:\x20Token\x20name\x20is\x20required','some','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','get','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','SELECT\x20*\x20FROM\x20','\x20\x20Tables:\x201\x20customers\x20+\x20','Listing\x20parent\x20segments\x20matching\x20\x27','%)\x20','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','payload:','No\x20parent\x20segments\x20match\x20pattern:\x20','stageCount','ps:rt:validate','customerGroupFile','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','ps:pz:patch','realtime_enabled','\x0aChanges\x20to\x20\x27','ps:rt:configuration_versions','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','\x20service','Audience\x20ID:','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','paused','Database:\x20','error','⚡\x20Not\x20enabled','pushParentYaml','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','deleteToken','✔\x20Retrieved\x20RT\x20configuration\x20version','\x27\x20with\x20ID:\x20','master','enriched','Error\x20reading\x20file:\x20','listJourneys','columns','\x20(paused)','trim','join','\x20configured','Usage:\x20tdx\x20ps\x20pz\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20(requires\x20context)\x0a','getParentFull','stitchingKeys','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','Error:\x20File\x20not\x20found:\x20','tokens','resolveParentId','\x0a✔\x20Workflow\x20started','Coverage:','createParent','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','Creating\x20personalization\x20service\x20\x27','true','Personalization:','Show\x20parent\x20segment\x20schema\x20(column\x20types)','Get\x20current\x20RT\x20configuration\x20version\x20status','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','description','using\x20the\x20default\x20path:\x20','Rows:','Show\x20a\x20specific\x20realtime\x20personalization','\x27\x20is\x20up\x20to\x20date','personalization_services','14829291nknaCv','\x0aUsage:\x20tdx\x20ps\x20preview\x20','createPersonalization','/{name}.yml\x0a','\x22,\x20\x22type\x22:\x20\x22','Default','schemaValid','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','displayColumns','start','Attributes:','collectSchema','✘\x20Failed\x20to\x20rename\x20directory:\x20','/\x20directories\x20exist.','✔\x20Created\x20parent\x20segment\x20\x27','✔\x20Found\x20','valid','Apply\x20changes\x20to\x20\x27','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','Deleting\x20personalization\x20service\x20\x27','yellow','updatedAt','segment:parent:create','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','\x0a\x20\x20\x20\x20}','darwin','ps:pz:service:token:delete','\x20Added\x20personalization\x20template\x20to\x20','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','\x27...','Table:\x20','Site:\x20','⚡\x20Enabled','sourceTableValid','repeat','\x20[Job\x20ID:\x20','Error:\x20Service\x20ID\x20is\x20required','execute','customersWithEvents','874840kAUmSm','td_client_id','Error:\x20--behavior\x20requires\x20a\x20name\x0a','segment:parent:push','.customers)','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','elapsedTimeMillis','✔\x20Created\x20personalization\x20service\x20\x27','deletePersonalization','joinKey','database','identifier','\x20total','matchedCount','token:','scheduleOption','\x20\x20\x22relationships\x22:\x20{\x20\x22parentFolder\x22:\x20{\x20\x22data\x22:\x20{\x20\x22id\x22:\x20\x22<id>\x22,\x20\x22type\x22:\x20\x22folder-segment\x22\x20}\x20}\x20}','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','ps:pz:service:token:create','red','customerGroup','getCurrentConfigVersion','/\x20directory.\x0a','allowed\x20IPs:','Creating\x20parent\x20segment\x20\x27','sourceTableError','✔\x20Deleted\x20personalization\x20\x27','setJobId','Usage:\x20tdx\x20ps\x20pz\x20service\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20(requires\x20context)\x0a','\x20stage','`\x20to\x20download\x20the\x20configuration\x20first','segment','type','getBehaviorNames','ps:pz:service:delete','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','page_view','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','rowCount','Columns:','\x0aNo\x20sample\x20data\x20available','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','displaySampleData','stats','updated:','Session:','\x20Context\x20set:\x20','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','Aborted.','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','totalEvents','allValid','test','replace','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','behavior','Errors:','tdx\x20ps\x20preview\x20','green','runParent','\x20is\x20already\x20up\x20to\x20date','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','\x20rows\x20','\x20\x20\x20','audienceId:\x20','string','\x20\x20No\x20sample\x20data\x20available','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','\x27\x20is\x20already\x20up\x20to\x20date','\x20service(s)\x20configured','Deleting\x20personalization\x20\x27','parent_segment','indexOf','entryCriteria','\x20parent\x20segment\x20\x27','toFixed','behaviors','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','payload','yes','10017600OIGpHC','\x20Configuration\x20is\x20valid','Available\x20attributes:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','resumeJourney','RT\x202.0\x20Validate:','Error:\x20Token\x20ID\x20is\x20required','attribute','preview','Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','format','✔\x20Deleted\x20token\x20\x27','stringify','jsonl','length','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','folderId','ps:rt:jn:resume','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','Error:\x20--name\x20is\x20required','List\x20parent\x20segments','json','getOutputDatabaseName','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','attributes','Resume\x20activations\x20in\x20an\x20RT\x20journey','segment:parent:update','column','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','Validate:','eventKind','28wflGFD','\x20to\x20configure\x20your\x20personalization\x20service','create','keyEventCriteria','parent_id','3306396xaYrrH','\x5c$&','column_name','\x20RT\x20journey','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','List\x20RT\x20journeys','workflowSessionId','launched','Resolving\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','Options:\x0a','site','Listing\x20RT-enabled\x20parent\x20segments...','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a','Master:','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','✔\x20Created\x20personalization\x20\x27','sampleData','Updating\x20parent\x20segment\x20\x27','sections:','Schema\x20saved\x20to\x20','YAML\x20file:\x20','addBehaviorsFile','\x20RT-enabled\x20parent\x20segment','customerPercent','segment:parent:preview','Creating\x20token\x20\x27','✔\x20Deleted\x20personalization\x20service\x20\x27','.yml','last_page_viewed','entryCriteria:','Preview:','filter','\x0aError:','enabled','SQL\x20query:\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','/app/workflows/','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','previewParentYaml','limit','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','open','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','\x20--enriched','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20init\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20for\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','parentSegment','events','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','No\x20RT-enabled\x20parent\x20segments\x20found','verbose','no\x20tokens\x20configured','unref','text','Updating','Output\x20Database:','Join:','win32','scheduleType','endsWith','toLowerCase','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','\x20--attribute\x20\x22','segment:parent:pull','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','Fetching\x20SQL\x20for\x20\x27','foreignKey','\x20\x20Database:\x20','data','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','null','coveragePercent','6xwsZEU','Overwrite\x20\x27','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','{\x0a\x20\x20\x22database\x22:\x20\x22','\x20field','displayBehaviorsStats','use','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','ps:pz:service:update','created:','includeSensitive:','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','List\x20available\x20fields\x20for\x20segmentation','Create\x20parent\x20segment\x20\x27','\x20+\x20[','Fetching\x20behavior\x20list...','keyEventId:','ignore','segment:parent:show','Error:\x20Personalization\x20ID\x20is\x20required','workflowAttemptId','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','includeSensitive','updateParent','Fetching\x20customers\x20schema...','Updating\x20personalization\x20service\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','public:','parentFolder','in\x20','\x20=\x20','jobId','Pause\x20activations\x20in\x20an\x20RT\x20journey','allowedIps','\x20\x20\x20\x20\x20\x20','Events:','\x20--attribute\x20\x22<name>\x22','Error\x20parsing\x20YAML:\x20','Creating','list','single','8071091fkPkmu','createdAt','ps:pz:service:list','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','bold','sort','listPersonalizations','\x20rows)','user_id','any','(id:\x20','web','ps:rt:jn:pause','Analyzing\x20changes...','\x20kill','1415122GEOwav','/\x20and\x20','interval','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','displayPreviewHints','To\x20cancel:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','Listing\x20fields\x20for\x20\x27','errors','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','addAttributes','audienceId:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','Master\x20+\x20Attributes','-1d','localeCompare','information_schema','displayMasterInfo','✔\x20Updated\x20personalization\x20\x27','Status:','map','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','/app/dw/parentSegments/','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','✔\x20No\x20changes\x20-\x20\x27','label','No\x20RT\x20journeys\x20found','personalization','Behaviors','RT\x202.0:','Source:','behaviorsFile','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','\x20--behavior\x20\x22','output','✔\x20Created\x20token\x20\x27','Parent\x20segment:\x20','realtime','Fetching\x20current\x20configuration\x20for\x20\x27','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','workflowId','createToken','displayValidateResults','schemaError','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','\x0aChanges\x20to\x20apply\x20to\x20\x27','displaySummary','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','\x22\x20}','Usage:\x20tdx\x20ps\x20rt\x20configuration_versions\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20(requires\x20context)\x0a','segment:parent:validate','keyEventId','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','all','Updated','audienceId','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','table','\x20\x20\x20\x20','Validating\x20configuration...','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','Executing\x20parent\x20segment\x20query...','ps:pz:list','\x27\x20and\x20run\x20workflow?','log','Listing\x20personalizations\x20for\x20\x27','addAttributesFile','Next\x20steps:','folder-segment','sections','addBehaviors','To\x20view\x20sample\x20data:','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','varchar','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','SELECT\x20*\x20FROM\x20(\x0a','Deleting\x20token\x20\x27','\x20tdx\x20wf\x20attempt\x20','Found\x20YAML\x20file:\x20','Enriched:','Options:','Created','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','state','\x20\x202.\x20Run\x20','/sessions/','Attempt:','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'];a31_0x1859=function(){return _0x16663a;};return a31_0x1859();}function formatProgressMessage(_0x14506c){const _0x4da98a=a31_0x121f5f,_0xbca81b=_0x14506c[_0x4da98a(0x1f2)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0xbca81b){const [,_0x58b941,_0x5a2a3b,_0x9f3b46='']=_0xbca81b;return a31_0x4e7eff['dim'](_0x58b941+':')+'\x20'+_0x5a2a3b+a31_0x4e7eff[_0x4da98a(0x1b3)](_0x9f3b46);}return a31_0x4e7eff[_0x4da98a(0x1b3)](_0x14506c);}function showFileNotFoundError(_0x43c362,_0x5e66a5){const _0x1bdd17=a31_0x121f5f;console['error'](a31_0x4e7eff[_0x1bdd17(0x277)](_0x1bdd17(0x228)+_0x43c362+'\x0a')),console[_0x1bdd17(0x214)](a31_0x4e7eff[_0x1bdd17(0x1c2)](_0x1bdd17(0x373)+_0x5e66a5+_0x1bdd17(0x282)));}function displayRealtimeValidation(_0x532856){const _0x551f1a=a31_0x121f5f;if(!_0x532856['realtime'])return;const _0x3318fc=_0x532856[_0x551f1a(0x177)],_0x135f68=_0x3318fc[_0x551f1a(0x303)]?a31_0x4e7eff[_0x551f1a(0x29e)](_0x551f1a(0x25d)):a31_0x4e7eff[_0x551f1a(0x251)](_0x551f1a(0x215));console[_0x551f1a(0x214)]('\x0a'+a31_0x4e7eff[_0x551f1a(0x1b3)](_0x551f1a(0x16f))+'\x20'+_0x135f68);if(_0x3318fc['events']&&_0x3318fc[_0x551f1a(0x313)]['length']>0x0){console[_0x551f1a(0x214)]('\x20\x20'+a31_0x4e7eff['dim'](_0x551f1a(0x34f))+'\x20'+_0x3318fc[_0x551f1a(0x313)][_0x551f1a(0x2c4)]+_0x551f1a(0x223));for(const _0x1c49f2 of _0x3318fc['events']){const _0x11f1b5=_0x1c49f2[_0x551f1a(0x25e)]===![]?a31_0x4e7eff['red']('✘'):a31_0x4e7eff[_0x551f1a(0x29e)]('✔');console[_0x551f1a(0x214)](_0x551f1a(0x18d)+_0x11f1b5+'\x20'+_0x1c49f2['name']),_0x1c49f2[_0x551f1a(0x27d)]&&console[_0x551f1a(0x214)](_0x551f1a(0x34e)+a31_0x4e7eff[_0x551f1a(0x277)](_0x1c49f2['sourceTableError']));}}if(_0x3318fc[_0x551f1a(0x2d0)]&&_0x3318fc[_0x551f1a(0x2d0)]['length']>0x0){console[_0x551f1a(0x214)]('\x20\x20'+a31_0x4e7eff[_0x551f1a(0x1b3)](_0x551f1a(0x246))+'\x20'+_0x3318fc[_0x551f1a(0x2d0)][_0x551f1a(0x2c4)]+_0x551f1a(0x223));for(const _0x45113f of _0x3318fc[_0x551f1a(0x2d0)]){const _0xe91477=_0x45113f[_0x551f1a(0x24c)]?a31_0x4e7eff[_0x551f1a(0x29e)]('✔'):a31_0x4e7eff['red']('✘');console[_0x551f1a(0x214)](_0x551f1a(0x18d)+_0xe91477+'\x20'+_0x45113f['name']+'\x20'+a31_0x4e7eff[_0x551f1a(0x1b3)]('('+_0x45113f[_0x551f1a(0x284)]+')'));}}if(_0x3318fc[_0x551f1a(0x1cd)]){const _0x42a035=_0x3318fc['idStitching'][_0x551f1a(0x226)]?.[_0x551f1a(0x2c4)]?_0x551f1a(0x33a)+_0x3318fc[_0x551f1a(0x1cd)][_0x551f1a(0x226)][_0x551f1a(0x222)](',\x20')+']':'';console['error']('\x20\x20'+a31_0x4e7eff['dim']('ID\x20Stitching:')+'\x20'+_0x3318fc['idStitching'][_0x551f1a(0x1f3)]+_0x42a035);}if(_0x3318fc[_0x551f1a(0x1f4)]&&_0x3318fc['personalizationServices']['length']>0x0){console[_0x551f1a(0x214)]('\x20\x20'+a31_0x4e7eff['dim'](_0x551f1a(0x231))+'\x20'+_0x3318fc['personalizationServices'][_0x551f1a(0x2c4)]+_0x551f1a(0x20f)+(_0x3318fc[_0x551f1a(0x1f4)][_0x551f1a(0x2c4)]!==0x1?'s':''));for(const _0x36f2ad of _0x3318fc[_0x551f1a(0x1f4)]){console[_0x551f1a(0x214)](_0x551f1a(0x1e3)+_0x36f2ad['name']);}}}function showParentSegmentNotSetError(_0x4ca235){const _0x21dc20=a31_0x121f5f;console['error'](a31_0x4e7eff[_0x21dc20(0x251)](_0x21dc20(0x368))),console[_0x21dc20(0x214)](_0x4ca235);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]='segment:parent:list';['description']=a31_0x121f5f(0x2cb);async[a31_0x121f5f(0x262)](_0x196f55){const _0x2bc225=a31_0x121f5f,{options:_0x5a96cf,args:_0x5215d1,tdx:_0x5c7554}=_0x196f55,_0x1beefd=_0x5215d1[0x0];_0x5a96cf[_0x2bc225(0x316)]&&(console['error']('Site:\x20'+_0x5a96cf[_0x2bc225(0x2e8)]),_0x1beefd&&console[_0x2bc225(0x214)](_0x2bc225(0x1e2)+_0x1beefd));const _0x18e091=await withSpinner(_0x1beefd?_0x2bc225(0x201)+_0x1beefd+_0x2bc225(0x25a):'Listing\x20parent\x20segments...',()=>_0x5c7554['segment'][_0x2bc225(0x1ea)](),{'verbose':_0x5a96cf[_0x2bc225(0x316)]});let _0x4fba0c=_0x18e091[_0x2bc225(0x328)];if(_0x1beefd){const _0x316e6f=_0x1beefd['replace'](/[.+^${}()|[\]\\]/g,_0x2bc225(0x2dd))[_0x2bc225(0x299)](/\*/g,'.*')['replace'](/\?/g,'.'),_0xf3cfc9=new RegExp('^'+_0x316e6f+'$','i');_0x4fba0c=_0x4fba0c[_0x2bc225(0x301)](_0x28cef5=>_0xf3cfc9[_0x2bc225(0x298)](_0x28cef5[_0x2bc225(0x2d0)][_0x2bc225(0x1eb)]));}_0x4fba0c[_0x2bc225(0x35a)]((_0x2bb711,_0x5d1b97)=>_0x2bb711[_0x2bc225(0x2d0)]['name'][_0x2bc225(0x376)](_0x5d1b97[_0x2bc225(0x2d0)][_0x2bc225(0x1eb)])),console['error']('✔\x20Found\x20'+_0x4fba0c[_0x2bc225(0x2c4)]+_0x2bc225(0x1f7)+(_0x4fba0c['length']!==0x1?'s':''));const _0x2ebcf3=_0x4a7d71=>{const _0xb0de15=_0x2bc225;return getConsoleNextUrl(_0x5a96cf[_0xb0de15(0x2e8)],_0xb0de15(0x37d)+_0x4a7d71);};if(_0x5a96cf[_0x2bc225(0x2c0)]===_0x2bc225(0x2cc)||_0x5a96cf[_0x2bc225(0x2c0)]===_0x2bc225(0x2c3)){const _0x6ba463=_0x4fba0c['map'](_0x176ca3=>({..._0x176ca3,'url':_0x2ebcf3(_0x176ca3['id'])}));await handleSDKOutput(_0x6ba463,_0x5a96cf);}else{if(_0x4fba0c[_0x2bc225(0x2c4)]===0x0)_0x1beefd?console[_0x2bc225(0x193)](_0x2bc225(0x205)+_0x1beefd):console[_0x2bc225(0x193)]('No\x20parent\x20segments\x20found');else for(const _0x11df3a of _0x4fba0c){const _0x145516=_0x11df3a[_0x2bc225(0x2d0)][_0x2bc225(0x1dd)]?a31_0x4e7eff[_0x2bc225(0x1b3)]('\x20('+formatRows(_0x11df3a['attributes'][_0x2bc225(0x1dd)])+')'):'',_0x1ba617=hyperlink(_0x11df3a[_0x2bc225(0x2d0)][_0x2bc225(0x1eb)],_0x2ebcf3(_0x11df3a['id']));console[_0x2bc225(0x193)](_0x2bc225(0x1ae)+_0x1ba617+_0x145516);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]=a31_0x121f5f(0x253);[a31_0x121f5f(0x236)]='Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async[a31_0x121f5f(0x262)](_0x33fa0e){const _0x39538b=a31_0x121f5f,{options:_0x2f3113,args:_0x373c7c,tdx:_0x250e49}=_0x33fa0e;console['error']('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a'+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x39538b(0x2ea));const _0x456107=_0x2f3113;if(_0x373c7c[_0x39538b(0x2c4)]===0x0)return console[_0x39538b(0x214)](a31_0x4e7eff[_0x39538b(0x277)](_0x39538b(0x1ec))),console[_0x39538b(0x214)](_0x39538b(0x187)),0x1;const _0x1ef78b=_0x373c7c[0x0];if(!_0x456107[_0x39538b(0x26e)]||!_0x456107[_0x39538b(0x18c)])return console[_0x39538b(0x214)](_0x39538b(0x1f6)),console['error'](_0x39538b(0x187)),0x1;_0x456107['verbose']&&(console[_0x39538b(0x214)]('Site:\x20'+_0x456107['site']),console[_0x39538b(0x214)]('Name:\x20'+_0x1ef78b),console[_0x39538b(0x214)](_0x39538b(0x213)+_0x456107[_0x39538b(0x26e)]),console[_0x39538b(0x214)](_0x39538b(0x25b)+_0x456107[_0x39538b(0x18c)]));const _0x2d0443=await loadJSONFromOptions(_0x456107[_0x39538b(0x2d0)],_0x456107['attributesFile']),_0x35bf5e=await loadJSONFromOptions(_0x456107[_0x39538b(0x2b0)],_0x456107[_0x39538b(0x171)]),_0x35cb50=await loadJSONFromOptions(_0x456107[_0x39538b(0x278)],_0x456107[_0x39538b(0x208)]),_0x32e2cf={'name':_0x1ef78b,'description':_0x456107['description'],'scheduleType':_0x456107[_0x39538b(0x31e)],'scheduleOption':_0x456107[_0x39538b(0x273)],'timezone':_0x456107['timezone'],'master':{'parentDatabaseName':_0x456107['database'],'parentTableName':_0x456107[_0x39538b(0x18c)]},'attributes':_0x2d0443,'behaviors':_0x35bf5e,'customerGroup':_0x35cb50},_0x220962=await withSpinner(_0x39538b(0x27c)+_0x1ef78b+_0x39538b(0x25a),()=>_0x250e49[_0x39538b(0x283)][_0x39538b(0x22d)](_0x32e2cf),{'verbose':_0x2f3113[_0x39538b(0x316)]}),_0x5eb3b9=_0x220962[_0x39538b(0x328)];return console[_0x39538b(0x214)](_0x39538b(0x24a)+_0x5eb3b9[_0x39538b(0x1eb)]+_0x39538b(0x21a)+_0x5eb3b9['id']),await handleSDKOutput([_0x5eb3b9],_0x2f3113),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a31_0x121f5f(0x2d2);[a31_0x121f5f(0x236)]='Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async[a31_0x121f5f(0x262)](_0x43e1a6){const _0x52311f=a31_0x121f5f,{options:_0x619079,args:_0xdb5551,tdx:_0x5d3966}=_0x43e1a6;console[_0x52311f(0x214)](_0x52311f(0x20e)+_0x52311f(0x29a)+_0x52311f(0x2ea));const _0x4c234e=_0x619079;if(_0xdb5551[_0x52311f(0x2c4)]===0x0)return console['error'](a31_0x4e7eff[_0x52311f(0x277)]('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x52311f(0x214)]('Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]'),0x1;const _0x19f791=_0xdb5551[0x0];_0x4c234e[_0x52311f(0x316)]&&(console[_0x52311f(0x214)](_0x52311f(0x25c)+_0x4c234e[_0x52311f(0x2e8)]),console[_0x52311f(0x214)](_0x52311f(0x176)+_0x19f791));const _0x1b1cb9=await withSpinner(_0x52311f(0x178)+_0x19f791+'\x27...',()=>_0x5d3966[_0x52311f(0x283)]['getParentFull'](_0x19f791),{'verbose':_0x4c234e[_0x52311f(0x316)]}),_0x868ffa=_0x1b1cb9[_0x52311f(0x328)],_0x1653de=await loadJSONFromOptions(_0x4c234e[_0x52311f(0x36f)],_0x4c234e[_0x52311f(0x195)]),_0x2a872e=await loadJSONFromOptions(_0x4c234e[_0x52311f(0x199)],_0x4c234e[_0x52311f(0x2f7)]),_0x4e2ddf={'name':_0x868ffa[_0x52311f(0x1eb)],'description':_0x4c234e[_0x52311f(0x236)]!==undefined?_0x4c234e[_0x52311f(0x236)]:_0x868ffa[_0x52311f(0x236)],'scheduleType':_0x4c234e[_0x52311f(0x31e)]!==undefined?_0x4c234e[_0x52311f(0x31e)]:_0x868ffa[_0x52311f(0x31e)],'scheduleOption':_0x4c234e['scheduleOption']!==undefined?_0x4c234e['scheduleOption']:_0x868ffa[_0x52311f(0x273)],'timezone':_0x4c234e[_0x52311f(0x1c9)]!==undefined?_0x4c234e[_0x52311f(0x1c9)]:_0x868ffa[_0x52311f(0x1c9)],'master':_0x868ffa[_0x52311f(0x21b)],'attributes':_0x1653de?[..._0x868ffa[_0x52311f(0x2d0)]||[],..._0x1653de]:_0x868ffa['attributes'],'behaviors':_0x2a872e?[..._0x868ffa[_0x52311f(0x2b0)]||[],..._0x2a872e]:_0x868ffa[_0x52311f(0x2b0)],'customerGroup':_0x868ffa[_0x52311f(0x278)]},_0x2ff9f3=await withSpinner(_0x52311f(0x2f3)+_0x19f791+_0x52311f(0x25a),()=>_0x5d3966[_0x52311f(0x283)][_0x52311f(0x343)](_0x19f791,_0x4e2ddf),{'verbose':_0x4c234e['verbose']}),_0x1304e7=_0x2ff9f3[_0x52311f(0x328)];return console[_0x52311f(0x214)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x1304e7[_0x52311f(0x1eb)]+'\x27'),await handleSDKOutput([_0x1304e7],_0x4c234e),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']=a31_0x121f5f(0x323);[a31_0x121f5f(0x236)]='Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file';async[a31_0x121f5f(0x262)](_0x298d34){const _0x4c2af2=a31_0x121f5f,{options:_0x5459da,args:_0x2bdc87,tdx:_0x476d98}=_0x298d34,_0x503e0d=_0x5459da,_0x2193d6=_0x2bdc87[0x0]||_0x5459da[_0x4c2af2(0x312)];if(!_0x2193d6)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment'),0x1;if(_0x503e0d[_0x4c2af2(0x332)]&&_0x503e0d[_0x4c2af2(0x174)])return console[_0x4c2af2(0x214)](a31_0x4e7eff['red']('Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a')),console[_0x4c2af2(0x214)](a31_0x4e7eff[_0x4c2af2(0x1b3)](_0x4c2af2(0x37c))),console[_0x4c2af2(0x214)](a31_0x4e7eff[_0x4c2af2(0x1b3)](_0x4c2af2(0x237)+PARENT_SEGMENT_DIR+_0x4c2af2(0x23f))),console[_0x4c2af2(0x214)](a31_0x4e7eff[_0x4c2af2(0x1c2)](_0x4c2af2(0x1e1))),0x1;const _0x18e9eb=_0x503e0d[_0x4c2af2(0x174)]||a31_0xe018d2[_0x4c2af2(0x222)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x2193d6)+_0x4c2af2(0x2fd));_0x503e0d['verbose']&&(console[_0x4c2af2(0x214)]('Site:\x20'+_0x503e0d[_0x4c2af2(0x2e8)]),console[_0x4c2af2(0x214)](_0x4c2af2(0x176)+_0x2193d6),console[_0x4c2af2(0x214)]('Output\x20file:\x20'+_0x18e9eb));const _0x373f6e=await withSpinner(_0x4c2af2(0x1c4)+_0x2193d6+_0x4c2af2(0x25a),()=>_0x476d98['segment'][_0x4c2af2(0x1b9)](_0x2193d6),{'verbose':_0x503e0d[_0x4c2af2(0x316)]}),_0x123935=_0x373f6e['data'];if(existsSync(_0x18e9eb)){const _0x4c93dc=readFileSync(_0x18e9eb,_0x4c2af2(0x1d6)),_0x119f10=generateDiff(_0x4c93dc,_0x123935);if(!hasChanges(_0x119f10))console[_0x4c2af2(0x214)](a31_0x4e7eff['green']('✔')+'\x20No\x20changes\x20-\x20'+a31_0x4e7eff[_0x4c2af2(0x1c2)](_0x18e9eb)+_0x4c2af2(0x2a0));else{console[_0x4c2af2(0x214)](_0x4c2af2(0x20c)+_0x18e9eb+'\x27:'),console['error']('─'[_0x4c2af2(0x25f)](0x3c)),console['error'](formatDiffWithColors(_0x119f10)),console[_0x4c2af2(0x214)]('─'['repeat'](0x3c));if(!_0x503e0d[_0x4c2af2(0x2b3)]){if(!isInteractive())return console['error'](a31_0x4e7eff[_0x4c2af2(0x277)](_0x4c2af2(0x302)),_0x4c2af2(0x372)),console[_0x4c2af2(0x214)](a31_0x4e7eff[_0x4c2af2(0x1b3)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2e17b0=await confirmKey(_0x4c2af2(0x32d)+_0x18e9eb+'\x27?');if(!_0x2e17b0)return console[_0x4c2af2(0x214)](a31_0x4e7eff['yellow'](_0x4c2af2(0x294))),0x1;}writeFileSync(_0x18e9eb,_0x123935,_0x4c2af2(0x1d6)),console['error'](a31_0x4e7eff['green']('✔')+_0x4c2af2(0x1ac)+a31_0x4e7eff[_0x4c2af2(0x1c2)](_0x18e9eb));}}else{const _0x4b71d1=a31_0xe018d2[_0x4c2af2(0x1bb)](_0x18e9eb);!existsSync(_0x4b71d1)&&mkdirSync(_0x4b71d1,{'recursive':!![]}),writeFileSync(_0x18e9eb,_0x123935,'utf-8'),console[_0x4c2af2(0x214)](a31_0x4e7eff[_0x4c2af2(0x29e)]('✔')+_0x4c2af2(0x1ac)+a31_0x4e7eff['cyan'](_0x18e9eb));}return saveSessionContext({'parent_segment':_0x2193d6},_0x503e0d['session']),console['error'](a31_0x4e7eff[_0x4c2af2(0x29e)]('✔')+_0x4c2af2(0x292)+a31_0x4e7eff[_0x4c2af2(0x1b3)](_0x4c2af2(0x2ab))+_0x4c2af2(0x34a)+a31_0x4e7eff[_0x4c2af2(0x1c2)](_0x2193d6)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{['name']=a31_0x121f5f(0x267);[a31_0x121f5f(0x236)]='Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file';async['execute'](_0x3b3d5f){const _0x458890=a31_0x121f5f,{options:_0x31d00a,args:_0x326986,tdx:_0x259bd5}=_0x3b3d5f,_0x9297f1=_0x31d00a,_0x4bf139=_0x326986[0x0]||_0x31d00a[_0x458890(0x312)];if(!_0x4bf139)return showParentSegmentNotSetError(_0x458890(0x341)+_0x458890(0x2b7)),0x1;const _0x1cef94=resolveYamlFile(_0x4bf139);if(!existsSync(_0x1cef94))return showFileNotFoundError(_0x1cef94,_0x4bf139),0x1;_0x9297f1[_0x458890(0x316)]&&(console[_0x458890(0x214)](_0x458890(0x25c)+_0x9297f1[_0x458890(0x2e8)]),console[_0x458890(0x214)]('YAML\x20file:\x20'+_0x1cef94));let _0x222ef5;try{_0x222ef5=readFileSync(_0x1cef94,'utf-8');}catch(_0x3e154a){const _0x50de6b=_0x3e154a instanceof Error?_0x3e154a['message']:String(_0x3e154a);return console['error'](_0x458890(0x21d)+_0x50de6b),0x1;}const _0x5ba738=await withSpinner(_0x458890(0x362),()=>_0x259bd5[_0x458890(0x283)][_0x458890(0x216)](_0x222ef5),{'verbose':_0x9297f1[_0x458890(0x316)]}),_0x24fb7a=_0x5ba738[_0x458890(0x328)],{isNew:_0x13c2b4,name:_0x53c89d,hasChanges:_0x3d2599,diffFormatted:_0x1d9b65}=_0x24fb7a;if(!_0x3d2599)return console[_0x458890(0x214)]('✔\x20No\x20changes\x20-\x20\x27'+_0x53c89d+_0x458890(0x2a8)),0x0;_0x13c2b4?console[_0x458890(0x214)](_0x458890(0x1c8)+_0x53c89d+'\x27:'):console[_0x458890(0x214)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x53c89d+'\x27:');console[_0x458890(0x214)]('─'['repeat'](0x3c)),console['error'](_0x1d9b65),console[_0x458890(0x214)]('─'['repeat'](0x3c));const _0x3f5c58=_0x13c2b4?_0x458890(0x339)+_0x53c89d+'\x27?':_0x458890(0x24d)+_0x53c89d+'\x27?';if(!_0x9297f1[_0x458890(0x2b3)]){if(!isInteractive())return console[_0x458890(0x214)](a31_0x4e7eff['red'](_0x458890(0x302)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x458890(0x214)](a31_0x4e7eff['dim'](_0x458890(0x179))),0x1;const _0x549071=await confirmKey(_0x3f5c58);if(!_0x549071)return console[_0x458890(0x214)](a31_0x4e7eff['yellow'](_0x458890(0x294))),0x1;}const _0x1fd905=_0x13c2b4?_0x458890(0x352):'Updating',_0xe3dc75=await withSpinner(_0x1fd905+_0x458890(0x2ae)+_0x53c89d+'\x27...',()=>_0x24fb7a['apply'](),{'verbose':_0x9297f1[_0x458890(0x316)]}),_0x36ed89=_0xe3dc75[_0x458890(0x328)],_0x27344a=getConsoleNextUrl(_0x9297f1[_0x458890(0x2e8)],'/app/dw/parentSegments/'+_0x36ed89['id']),_0x12d935=_0x13c2b4?_0x458890(0x1a6):_0x458890(0x189);return console[_0x458890(0x214)]('✔\x20'+_0x12d935+'\x20parent\x20segment\x20\x27'+_0x36ed89['name']+'\x27'),console[_0x458890(0x214)]('\x20\x20'+_0x27344a),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{['name']=a31_0x121f5f(0x185);['description']=a31_0x121f5f(0x24f);async[a31_0x121f5f(0x262)](_0x5300a5){const _0x3185b6=a31_0x121f5f,{options:_0x345a44,args:_0x2d71f8,tdx:_0x2822ac}=_0x5300a5,_0x35cb4f=_0x345a44,_0x649faa=_0x2d71f8[0x0]||_0x345a44[_0x3185b6(0x312)];if(!_0x649faa)return showParentSegmentNotSetError(_0x3185b6(0x289)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a'+_0x3185b6(0x2e7)+_0x3185b6(0x30b)+_0x3185b6(0x172)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;const _0x4bf7c0=resolveYamlFile(_0x649faa);if(!existsSync(_0x4bf7c0))return showFileNotFoundError(_0x4bf7c0,_0x649faa),0x1;_0x35cb4f[_0x3185b6(0x316)]&&(console[_0x3185b6(0x214)](_0x3185b6(0x25c)+_0x35cb4f[_0x3185b6(0x2e8)]),console[_0x3185b6(0x214)]('YAML\x20file:\x20'+_0x4bf7c0));let _0x4056f2;try{_0x4056f2=readFileSync(_0x4bf7c0,_0x3185b6(0x1d6));}catch(_0x295112){const _0x293837=_0x295112 instanceof Error?_0x295112[_0x3185b6(0x1c0)]:String(_0x295112);return console[_0x3185b6(0x214)](_0x3185b6(0x21d)+_0x293837),0x1;}const _0x553ec1=createCommandSpinner(a31_0x4e7eff[_0x3185b6(0x1b3)](_0x3185b6(0x18e)),{'verbose':_0x35cb4f[_0x3185b6(0x316)]});_0x553ec1[_0x3185b6(0x245)]();const _0x18e7b8={'onProgress':_0x4c8706=>{const _0x77a269=_0x3185b6;_0x553ec1[_0x77a269(0x319)]=formatProgressMessage(_0x4c8706);}};if(_0x35cb4f[_0x3185b6(0x21b)])_0x18e7b8['master']=!![];if(_0x35cb4f['enriched'])_0x18e7b8[_0x3185b6(0x21c)]=!![];_0x35cb4f[_0x3185b6(0x2bb)]&&(_0x18e7b8[_0x3185b6(0x2bb)]=_0x35cb4f[_0x3185b6(0x2bb)]);_0x35cb4f[_0x3185b6(0x29b)]&&(_0x18e7b8[_0x3185b6(0x29b)]=_0x35cb4f[_0x3185b6(0x29b)]);if(_0x35cb4f[_0x3185b6(0x366)])_0x18e7b8[_0x3185b6(0x366)]=_0x35cb4f[_0x3185b6(0x366)];let _0x5cf8d5;try{_0x5cf8d5=await _0x2822ac[_0x3185b6(0x283)][_0x3185b6(0x1bd)](_0x4056f2,_0x18e7b8),_0x553ec1[_0x3185b6(0x1e4)]();}catch(_0x2e188c){_0x553ec1[_0x3185b6(0x1e4)]();throw _0x2e188c;}const _0x27774f=_0x35cb4f['interval']||_0x3185b6(0x375);return this[_0x3185b6(0x17c)](_0x5cf8d5,_0x18e7b8,_0x4bf7c0,_0x27774f),_0x5cf8d5['allValid']?0x0:0x1;}['displayValidateResults'](_0x2f4bc9,_0x4b28c7,_0x315fd9,_0x4f4145){const _0x2af6e0=a31_0x121f5f;console['error']('\x0a'+a31_0x4e7eff[_0x2af6e0(0x359)](_0x2af6e0(0x2d5))+'\x20'+_0x2f4bc9[_0x2af6e0(0x1eb)]),console[_0x2af6e0(0x214)]('═'[_0x2af6e0(0x25f)](0x3c)),this[_0x2af6e0(0x378)](_0x2f4bc9);if(typeof _0x4b28c7[_0x2af6e0(0x2bb)]===_0x2af6e0(0x2a5)){this[_0x2af6e0(0x1db)](_0x2f4bc9),this[_0x2af6e0(0x181)](_0x2f4bc9),this[_0x2af6e0(0x369)](_0x315fd9,_0x4f4145,_0x2af6e0(0x2bb),_0x4b28c7[_0x2af6e0(0x2bb)]);return;}if(_0x4b28c7[_0x2af6e0(0x2bb)]===!![]){this[_0x2af6e0(0x1db)](_0x2f4bc9),this['displaySummary'](_0x2f4bc9),this[_0x2af6e0(0x369)](_0x315fd9,_0x4f4145,_0x2af6e0(0x2d0));return;}if(typeof _0x4b28c7[_0x2af6e0(0x29b)]===_0x2af6e0(0x2a5)){this['displayBehaviorsStats'](_0x2f4bc9,_0x4f4145),this[_0x2af6e0(0x181)](_0x2f4bc9),this['displayPreviewHints'](_0x315fd9,_0x4f4145,_0x2af6e0(0x29b),_0x4b28c7[_0x2af6e0(0x29b)]);return;}if(_0x4b28c7['behavior']===!![]){this[_0x2af6e0(0x331)](_0x2f4bc9,_0x4f4145),this[_0x2af6e0(0x181)](_0x2f4bc9),this[_0x2af6e0(0x369)](_0x315fd9,_0x4f4145,'behaviors');return;}this[_0x2af6e0(0x1db)](_0x2f4bc9),this['displayBehaviorsStats'](_0x2f4bc9,_0x4f4145),this['displayRealtimeInfo'](_0x2f4bc9),this[_0x2af6e0(0x181)](_0x2f4bc9),this[_0x2af6e0(0x369)](_0x315fd9,_0x4f4145,_0x2af6e0(0x188));}['displayRealtimeInfo'](_0x14cd85){displayRealtimeValidation(_0x14cd85);}[a31_0x121f5f(0x369)](_0x2b6840,_0x1b2933,_0x3ba56d,_0x1487d0){const _0x24e680=a31_0x121f5f;console[_0x24e680(0x214)]('\x0a'+a31_0x4e7eff[_0x24e680(0x1b3)](_0x24e680(0x19a)));const _0x30fc3b=_0x1b2933!==_0x24e680(0x375)?'\x20--interval\x20'+_0x1b2933:'';if(_0x3ba56d===_0x24e680(0x2bb)&&_0x1487d0)console['error']('\x20\x20'+a31_0x4e7eff[_0x24e680(0x1b3)](_0x24e680(0x29d)+_0x2b6840+_0x24e680(0x322)+_0x1487d0+'\x22'+_0x30fc3b));else{if(_0x3ba56d===_0x24e680(0x29b)&&_0x1487d0)console[_0x24e680(0x214)]('\x20\x20'+a31_0x4e7eff[_0x24e680(0x1b3)](_0x24e680(0x29d)+_0x2b6840+_0x24e680(0x173)+_0x1487d0+'\x22'+_0x30fc3b));else(_0x3ba56d===_0x24e680(0x2d0)||_0x3ba56d===_0x24e680(0x188))&&console['error']('\x20\x20'+a31_0x4e7eff['dim']('tdx\x20ps\x20preview\x20'+_0x2b6840+_0x24e680(0x350)+_0x30fc3b));}(_0x3ba56d===_0x24e680(0x2b0)||_0x3ba56d===_0x24e680(0x188))&&console[_0x24e680(0x214)]('\x20\x20'+a31_0x4e7eff['dim'](_0x24e680(0x29d)+_0x2b6840+'\x20--behavior\x20\x22<name>\x22'+_0x30fc3b)),_0x3ba56d===_0x24e680(0x188)&&console[_0x24e680(0x214)]('\x20\x20'+a31_0x4e7eff['dim']('tdx\x20ps\x20preview\x20'+_0x2b6840+_0x24e680(0x30e)+_0x30fc3b));}[a31_0x121f5f(0x378)](_0xcdcce7){const _0x19fc01=a31_0x121f5f,{master:_0x3e3b1c}=_0xcdcce7,_0x423356=_0x3e3b1c[_0x19fc01(0x242)]?a31_0x4e7eff[_0x19fc01(0x29e)]('✔'):a31_0x4e7eff['red']('✘');console[_0x19fc01(0x214)]('\x0a'+a31_0x4e7eff[_0x19fc01(0x1b3)]('Master\x20Table')),console['error'](_0x423356+'\x20'+a31_0x4e7eff['bold'](_0x3e3b1c['database']+'.'+_0x3e3b1c['table'])),_0x3e3b1c[_0x19fc01(0x242)]?_0x3e3b1c[_0x19fc01(0x28a)]!==undefined&&console['error']('\x20\x20'+a31_0x4e7eff['dim'](_0x19fc01(0x238))+'\x20'+a31_0x4e7eff[_0x19fc01(0x1c2)](formatRows(_0x3e3b1c[_0x19fc01(0x28a)]))):console[_0x19fc01(0x214)]('\x20\x20'+a31_0x4e7eff[_0x19fc01(0x277)](_0x19fc01(0x1ee))+'\x20'+_0x3e3b1c['schemaError']);}[a31_0x121f5f(0x1db)](_0x202b53){const _0x2e094b=a31_0x121f5f;if(_0x202b53[_0x2e094b(0x2d0)]['length']===0x0)return;console[_0x2e094b(0x214)]('\x0a'+a31_0x4e7eff[_0x2e094b(0x1b3)](_0x2e094b(0x1d2)));for(const _0x49e767 of _0x202b53[_0x2e094b(0x2d0)]){const _0x4959ea=_0x49e767[_0x2e094b(0x242)]?a31_0x4e7eff[_0x2e094b(0x29e)]('✔'):a31_0x4e7eff[_0x2e094b(0x277)]('✘');let _0x18ebee='';if(_0x49e767[_0x2e094b(0x242)]&&_0x49e767[_0x2e094b(0x271)]!==undefined&&_0x49e767[_0x2e094b(0x32b)]!==undefined){const _0x1c2102=_0x49e767[_0x2e094b(0x32b)][_0x2e094b(0x2af)](0x1),_0x393021=_0x49e767[_0x2e094b(0x32b)]>=0x50?a31_0x4e7eff[_0x2e094b(0x29e)]:_0x49e767[_0x2e094b(0x32b)]>=0x32?a31_0x4e7eff[_0x2e094b(0x251)]:a31_0x4e7eff[_0x2e094b(0x277)];_0x18ebee='\x20'+a31_0x4e7eff[_0x2e094b(0x1b3)](_0x2e094b(0x22c))+'\x20'+_0x393021(_0x1c2102+'%')+'\x20('+formatRows(_0x49e767['matchedCount'])+_0x2e094b(0x35c);}console[_0x2e094b(0x214)](_0x4959ea+'\x20'+a31_0x4e7eff[_0x2e094b(0x359)](_0x49e767['name'])+_0x18ebee),console[_0x2e094b(0x214)]('\x20\x20'+a31_0x4e7eff[_0x2e094b(0x1b3)](_0x2e094b(0x170))+'\x20'+a31_0x4e7eff[_0x2e094b(0x359)](_0x49e767[_0x2e094b(0x26e)]+'.'+_0x49e767['table']));const _0x562fa1=_0x49e767[_0x2e094b(0x26d)]===_0x49e767[_0x2e094b(0x326)]?a31_0x4e7eff[_0x2e094b(0x1b3)](_0x2e094b(0x1b4))+'\x20'+_0x49e767[_0x2e094b(0x26d)]:a31_0x4e7eff[_0x2e094b(0x1b3)](_0x2e094b(0x31c))+'\x20'+_0x49e767[_0x2e094b(0x26d)]+_0x2e094b(0x34a)+_0x49e767[_0x2e094b(0x326)];console[_0x2e094b(0x214)]('\x20\x20'+_0x562fa1),console[_0x2e094b(0x214)]('\x20\x20'+a31_0x4e7eff[_0x2e094b(0x1b3)](_0x2e094b(0x28b))),this[_0x2e094b(0x244)](_0x49e767['columns']),!_0x49e767[_0x2e094b(0x242)]&&console[_0x2e094b(0x214)]('\x20\x20'+a31_0x4e7eff[_0x2e094b(0x277)](_0x2e094b(0x1ee))+'\x20'+_0x49e767[_0x2e094b(0x17d)]);}}[a31_0x121f5f(0x331)](_0x4a2deb,_0x4e0b9e){const _0x12c4ca=a31_0x121f5f;if(_0x4a2deb[_0x12c4ca(0x2b0)][_0x12c4ca(0x2c4)]===0x0)return;console[_0x12c4ca(0x214)]('\x0a'+a31_0x4e7eff['dim'](_0x12c4ca(0x16e))+'\x20'+a31_0x4e7eff[_0x12c4ca(0x1b3)]('('+_0x4e0b9e+')'));for(const _0x52b614 of _0x4a2deb[_0x12c4ca(0x2b0)]){const _0x127fe7=_0x52b614[_0x12c4ca(0x242)]?a31_0x4e7eff['green']('✔'):a31_0x4e7eff[_0x12c4ca(0x277)]('✘');let _0x2a0288='';if(_0x52b614['schemaValid']&&_0x52b614['customersWithEvents']!==undefined&&_0x52b614[_0x12c4ca(0x296)]!==undefined){const _0x49d25c=_0x52b614[_0x12c4ca(0x2f9)]?.[_0x12c4ca(0x2af)](0x1)||'?',_0x5565bc=(_0x52b614['customerPercent']??0x0)>=0x32?a31_0x4e7eff[_0x12c4ca(0x29e)]:(_0x52b614[_0x12c4ca(0x2f9)]??0x0)>=0x14?a31_0x4e7eff[_0x12c4ca(0x251)]:a31_0x4e7eff[_0x12c4ca(0x277)];_0x2a0288='\x20'+a31_0x4e7eff[_0x12c4ca(0x1b3)]('Customers:')+'\x20'+_0x5565bc(formatRows(_0x52b614[_0x12c4ca(0x263)]))+'\x20('+_0x49d25c+_0x12c4ca(0x202)+a31_0x4e7eff['dim'](_0x12c4ca(0x34f))+'\x20'+a31_0x4e7eff[_0x12c4ca(0x1c2)](formatRows(_0x52b614[_0x12c4ca(0x296)]));}console[_0x12c4ca(0x214)](_0x127fe7+'\x20'+a31_0x4e7eff[_0x12c4ca(0x359)](_0x52b614[_0x12c4ca(0x1eb)])+_0x2a0288),console['error']('\x20\x20'+a31_0x4e7eff[_0x12c4ca(0x1b3)]('Source:')+'\x20'+a31_0x4e7eff[_0x12c4ca(0x359)](_0x52b614[_0x12c4ca(0x26e)]+'.'+_0x52b614[_0x12c4ca(0x18c)]));const _0xd352ec=_0x52b614['joinKey']===_0x52b614['foreignKey']?a31_0x4e7eff[_0x12c4ca(0x1b3)](_0x12c4ca(0x1b4))+'\x20'+_0x52b614[_0x12c4ca(0x26d)]:a31_0x4e7eff[_0x12c4ca(0x1b3)](_0x12c4ca(0x31c))+'\x20'+_0x52b614[_0x12c4ca(0x26d)]+'\x20=\x20'+_0x52b614[_0x12c4ca(0x326)];console[_0x12c4ca(0x214)]('\x20\x20'+_0xd352ec),console[_0x12c4ca(0x214)]('\x20\x20'+a31_0x4e7eff['dim']('Columns:')),this[_0x12c4ca(0x244)](_0x52b614[_0x12c4ca(0x21f)]),!_0x52b614[_0x12c4ca(0x242)]&&console[_0x12c4ca(0x214)]('\x20\x20'+a31_0x4e7eff[_0x12c4ca(0x277)](_0x12c4ca(0x1ee))+'\x20'+_0x52b614[_0x12c4ca(0x17d)]);}}['displayColumns'](_0x4a2231){const _0x5a280e=a31_0x121f5f;for(const _0xace741 of _0x4a2231){_0xace741[_0x5a280e(0x380)]===_0xace741['column']||_0xace741[_0x5a280e(0x2d3)]==='*'?console[_0x5a280e(0x214)](_0x5a280e(0x1e3)+_0xace741['label']):console[_0x5a280e(0x214)](_0x5a280e(0x1e3)+_0xace741['label']+'\x20'+a31_0x4e7eff[_0x5a280e(0x1b3)]('('+_0xace741[_0x5a280e(0x2d3)]+')'));}}[a31_0x121f5f(0x181)](_0x44dcb7){const _0x8ec93a=a31_0x121f5f;console['error']('─'[_0x8ec93a(0x25f)](0x3c));if(_0x44dcb7[_0x8ec93a(0x36d)]['length']>0x0){console[_0x8ec93a(0x214)]('\x0a'+a31_0x4e7eff[_0x8ec93a(0x277)]('Errors:'));for(const _0x2fedcf of _0x44dcb7[_0x8ec93a(0x36d)]){console['error']('\x20\x20'+a31_0x4e7eff[_0x8ec93a(0x277)]('•')+'\x20'+_0x2fedcf);}}_0x44dcb7[_0x8ec93a(0x297)]&&console[_0x8ec93a(0x214)]('\x0a'+a31_0x4e7eff['green']('✔')+_0x8ec93a(0x2b5));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{['name']=a31_0x121f5f(0x2fa);[a31_0x121f5f(0x236)]=a31_0x121f5f(0x2e6);async[a31_0x121f5f(0x262)](_0x17dfff){const _0x4980ee=a31_0x121f5f,{options:_0x3e93c1,args:_0x505851,tdx:_0x5dad29}=_0x17dfff,_0x1e691b=_0x3e93c1,_0x22a618=_0x505851[0x0]||_0x3e93c1['parentSegment'];if(!_0x22a618)return showParentSegmentNotSetError(_0x4980ee(0x1b8)+_0x4980ee(0x305)+'Options\x20(one\x20required):\x0a'+_0x4980ee(0x19f)+_0x4980ee(0x30d)+_0x4980ee(0x293)+_0x4980ee(0x2f0)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x1e691b['master']&&!_0x1e691b[_0x4980ee(0x2bb)]&&!_0x1e691b['behavior']&&!_0x1e691b['enriched'])return console['error'](a31_0x4e7eff[_0x4980ee(0x277)](_0x4980ee(0x30f))),console[_0x4980ee(0x214)]('Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a'),console['error'](_0x4980ee(0x1a5)),console[_0x4980ee(0x214)](_0x4980ee(0x329)),console['error'](_0x4980ee(0x19d)),console['error'](_0x4980ee(0x217)),console[_0x4980ee(0x214)](_0x4980ee(0x182)),0x1;const _0x513e0a=resolveYamlFile(_0x22a618);if(!existsSync(_0x513e0a))return showFileNotFoundError(_0x513e0a,_0x22a618),0x1;_0x1e691b[_0x4980ee(0x316)]&&(console[_0x4980ee(0x214)](_0x4980ee(0x25c)+_0x1e691b[_0x4980ee(0x2e8)]),console['error'](_0x4980ee(0x2f6)+_0x513e0a));let _0x46f82a;try{_0x46f82a=readFileSync(_0x513e0a,_0x4980ee(0x1d6));}catch(_0x37ca7e){const _0x39d66d=_0x37ca7e instanceof Error?_0x37ca7e['message']:String(_0x37ca7e);return console[_0x4980ee(0x214)](_0x4980ee(0x21d)+_0x39d66d),0x1;}let _0x4c3fdb;try{_0x4c3fdb=parseDef(_0x46f82a);}catch(_0x3ec41f){const _0x5f28b1=_0x3ec41f instanceof Error?_0x3ec41f[_0x4980ee(0x1c0)]:String(_0x3ec41f);return console[_0x4980ee(0x214)](a31_0x4e7eff[_0x4980ee(0x277)]('Error\x20parsing\x20YAML:\x20'+_0x5f28b1)),0x1;}if(_0x1e691b[_0x4980ee(0x2bb)]===!![]||_0x1e691b[_0x4980ee(0x2bb)]===''){const _0x43c078=_0x4c3fdb[_0x4980ee(0x2d0)]?.[_0x4980ee(0x37b)](_0x11c50d=>_0x11c50d[_0x4980ee(0x1eb)])||[];if(_0x43c078[_0x4980ee(0x2c4)]===0x0)console[_0x4980ee(0x214)](a31_0x4e7eff['red'](_0x4980ee(0x2e0)));else{console[_0x4980ee(0x214)](a31_0x4e7eff[_0x4980ee(0x277)](_0x4980ee(0x1da))),console[_0x4980ee(0x214)](_0x4980ee(0x2b6));for(const _0xa6c7ff of _0x43c078){console[_0x4980ee(0x214)]('\x20\x20'+a31_0x4e7eff[_0x4980ee(0x1c2)](_0xa6c7ff));}console[_0x4980ee(0x214)](_0x4980ee(0x23d)+_0x22a618+'\x20--attribute\x20\x22'+_0x43c078[0x0]+'\x22');}return 0x1;}if(_0x1e691b[_0x4980ee(0x29b)]===!![]||_0x1e691b['behavior']===''){const _0x2d52fb=_0x4c3fdb[_0x4980ee(0x2b0)]?.[_0x4980ee(0x37b)](_0x5df617=>_0x5df617[_0x4980ee(0x1eb)])||[];if(_0x2d52fb[_0x4980ee(0x2c4)]===0x0)console[_0x4980ee(0x214)](a31_0x4e7eff[_0x4980ee(0x277)]('Error:\x20No\x20behaviors\x20defined\x20in\x20configuration'));else{console['error'](a31_0x4e7eff[_0x4980ee(0x277)](_0x4980ee(0x266))),console[_0x4980ee(0x214)](_0x4980ee(0x1d7));for(const _0x52a856 of _0x2d52fb){console[_0x4980ee(0x214)]('\x20\x20'+a31_0x4e7eff[_0x4980ee(0x1c2)](_0x52a856));}console['error'](_0x4980ee(0x23d)+_0x22a618+_0x4980ee(0x173)+_0x2d52fb[0x0]+'\x22');}return 0x1;}const _0xdfe15c=createCommandSpinner(a31_0x4e7eff[_0x4980ee(0x1b3)]('Fetching\x20sample\x20data...'),{'verbose':_0x1e691b[_0x4980ee(0x316)]});_0xdfe15c[_0x4980ee(0x245)]();const _0x2b4614={'onProgress':_0x514c1f=>{const _0x34c416=_0x4980ee;_0xdfe15c[_0x34c416(0x319)]=formatProgressMessage(_0x514c1f);}};if(_0x1e691b[_0x4980ee(0x21b)])_0x2b4614[_0x4980ee(0x21b)]=!![];if(_0x1e691b[_0x4980ee(0x2bb)]&&typeof _0x1e691b[_0x4980ee(0x2bb)]===_0x4980ee(0x2a5))_0x2b4614[_0x4980ee(0x2bb)]=_0x1e691b[_0x4980ee(0x2bb)];if(_0x1e691b[_0x4980ee(0x29b)]&&typeof _0x1e691b[_0x4980ee(0x29b)]==='string')_0x2b4614[_0x4980ee(0x29b)]=_0x1e691b[_0x4980ee(0x29b)];if(_0x1e691b[_0x4980ee(0x21c)])_0x2b4614[_0x4980ee(0x21c)]=!![];if(_0x1e691b[_0x4980ee(0x366)])_0x2b4614[_0x4980ee(0x366)]=_0x1e691b[_0x4980ee(0x366)];let _0x2a10a0;try{_0x2a10a0=await _0x5dad29['segment'][_0x4980ee(0x309)](_0x46f82a,_0x2b4614),_0xdfe15c['stop']();}catch(_0x910600){_0xdfe15c['stop']();throw _0x910600;}return await this[_0x4980ee(0x1b1)](_0x2a10a0,{'master':_0x1e691b[_0x4980ee(0x21b)],'attribute':typeof _0x1e691b[_0x4980ee(0x2bb)]===_0x4980ee(0x2a5)?_0x1e691b['attribute']:undefined,'behavior':typeof _0x1e691b[_0x4980ee(0x29b)]===_0x4980ee(0x2a5)?_0x1e691b[_0x4980ee(0x29b)]:undefined,'enriched':_0x1e691b[_0x4980ee(0x21c)]}),_0x2a10a0['allValid']?0x0:0x1;}async[a31_0x121f5f(0x1b1)](_0x545610,_0x148464){const _0x570054=a31_0x121f5f;console['error']('\x0a'+a31_0x4e7eff[_0x570054(0x359)](_0x570054(0x300))+'\x20'+_0x545610['name']),console[_0x570054(0x214)]('═'[_0x570054(0x25f)](0x3c));if(_0x148464[_0x570054(0x21b)]&&_0x545610[_0x570054(0x2f2)]){const _0x1ae287=a31_0x4e7eff[_0x570054(0x1b3)](_0x570054(0x2ee))+'\x20'+a31_0x4e7eff[_0x570054(0x359)](_0x545610['master'][_0x570054(0x26e)]+'.'+_0x545610['master'][_0x570054(0x18c)]);await this[_0x570054(0x28e)](_0x1ae287,_0x545610['sampleData']);}else{if(_0x148464[_0x570054(0x2bb)]&&_0x545610[_0x570054(0x2f2)]){const _0x4c20f1=a31_0x4e7eff[_0x570054(0x1b3)]('Attribute:')+'\x20'+a31_0x4e7eff[_0x570054(0x359)](_0x148464[_0x570054(0x2bb)]);await this['displaySampleData'](_0x4c20f1,_0x545610[_0x570054(0x2f2)]);}else{if(_0x148464[_0x570054(0x29b)]&&_0x545610[_0x570054(0x2f2)]){const _0x40394f=a31_0x4e7eff[_0x570054(0x1b3)](_0x570054(0x1cc))+'\x20'+a31_0x4e7eff[_0x570054(0x359)](_0x148464[_0x570054(0x29b)]);await this[_0x570054(0x28e)](_0x40394f,_0x545610[_0x570054(0x2f2)]);}else{if(_0x148464[_0x570054(0x21c)]&&_0x545610[_0x570054(0x2f2)]){const _0x1ea86d=a31_0x4e7eff[_0x570054(0x1b3)](_0x570054(0x1a4))+'\x20'+a31_0x4e7eff['bold'](_0x570054(0x374));await this[_0x570054(0x28e)](_0x1ea86d,_0x545610[_0x570054(0x2f2)]);}else!_0x545610[_0x570054(0x2f2)]&&console[_0x570054(0x214)](_0x570054(0x28c));}}}if(_0x545610[_0x570054(0x36d)][_0x570054(0x2c4)]>0x0){console[_0x570054(0x214)]('─'[_0x570054(0x25f)](0x3c)),console[_0x570054(0x214)]('\x0a'+a31_0x4e7eff['red'](_0x570054(0x29c)));for(const _0x2a0674 of _0x545610[_0x570054(0x36d)]){console['error']('\x20\x20'+a31_0x4e7eff[_0x570054(0x277)]('•')+'\x20'+_0x2a0674);}}}async[a31_0x121f5f(0x28e)](_0x103a9c,_0x404405){const _0x169f31=a31_0x121f5f;if(_0x404405[_0x169f31(0x2c4)]===0x0){console[_0x169f31(0x214)]('\x0a'+_0x103a9c),console[_0x169f31(0x214)](_0x169f31(0x2a6));return;}console[_0x169f31(0x214)]('\x0a'+_0x103a9c);const _0x4057fc=Object['keys'](_0x404405[0x0])[_0x169f31(0x37b)](_0x300d95=>({'name':_0x300d95,'type':typeof _0x404405[0x0][_0x300d95]==='number'?'double':_0x169f31(0x19e)})),_0x278930={'queryId':_0x169f31(0x2bc),'columns':_0x4057fc,'data':_0x404405,'stats':{'state':'FINISHED','queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x404405[_0x169f31(0x2c4)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0xb4859f=formatAsTable(_0x278930,_0x404405[_0x169f31(0x2c4)],!![]);await writeOutput(_0xb4859f,undefined,_0x169f31(0x18c));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x121f5f(0x1eb)]='segment:parent:run';[a31_0x121f5f(0x236)]=a31_0x121f5f(0x17f);async[a31_0x121f5f(0x262)](_0x361e31){const _0x8f1fb1=a31_0x121f5f,{options:_0xb07836,args:_0x289510,tdx:_0x55cc9b}=_0x361e31,_0x4ad3b3=_0xb07836,_0x4e844c=_0x289510[0x0]||_0xb07836[_0x8f1fb1(0x312)];if(!_0x4e844c)return showParentSegmentNotSetError(_0x8f1fb1(0x2eb)+_0x8f1fb1(0x308)),0x1;const _0x26c954=resolveYamlFile(_0x4e844c);if(existsSync(_0x26c954)){_0x4ad3b3['verbose']&&console[_0x8f1fb1(0x214)](_0x8f1fb1(0x1a3)+_0x26c954);let _0x382890;try{_0x382890=readFileSync(_0x26c954,_0x8f1fb1(0x1d6));}catch(_0x172e2e){const _0x6848ca=_0x172e2e instanceof Error?_0x172e2e[_0x8f1fb1(0x1c0)]:String(_0x172e2e);return console[_0x8f1fb1(0x214)](_0x8f1fb1(0x21d)+_0x6848ca),0x1;}const _0x52fdbe=await withSpinner('Analyzing\x20changes...',()=>_0x55cc9b[_0x8f1fb1(0x283)][_0x8f1fb1(0x216)](_0x382890),{'verbose':_0x4ad3b3[_0x8f1fb1(0x316)]}),_0x2fff7c=_0x52fdbe['data'],{isNew:_0x2358a4,name:_0x261a29,hasChanges:_0x598283,diffFormatted:_0x43e033}=_0x2fff7c;if(_0x598283){_0x2358a4?console[_0x8f1fb1(0x214)](_0x8f1fb1(0x1c8)+_0x261a29+'\x27:'):console['error'](_0x8f1fb1(0x180)+_0x261a29+'\x27:');console[_0x8f1fb1(0x214)]('─'['repeat'](0x3c)),console[_0x8f1fb1(0x214)](_0x43e033),console['error']('─'[_0x8f1fb1(0x25f)](0x3c));const _0x56efe9=_0x2358a4?_0x8f1fb1(0x339)+_0x261a29+_0x8f1fb1(0x192):_0x8f1fb1(0x24d)+_0x261a29+_0x8f1fb1(0x192);if(!_0x4ad3b3[_0x8f1fb1(0x2b3)]){if(!isInteractive())return console[_0x8f1fb1(0x214)](a31_0x4e7eff[_0x8f1fb1(0x277)](_0x8f1fb1(0x302)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a31_0x4e7eff['dim'](_0x8f1fb1(0x179))),0x1;const _0x327689=await confirmKey(_0x56efe9);if(!_0x327689)return console[_0x8f1fb1(0x214)](a31_0x4e7eff[_0x8f1fb1(0x251)](_0x8f1fb1(0x294))),0x1;}const _0x384852=_0x2358a4?'Creating':_0x8f1fb1(0x31a);await withSpinner(_0x384852+_0x8f1fb1(0x2ae)+_0x261a29+_0x8f1fb1(0x25a),()=>_0x2fff7c['apply'](),{'verbose':_0x4ad3b3[_0x8f1fb1(0x316)]});const _0x3dbaa8=_0x2358a4?_0x8f1fb1(0x1a6):_0x8f1fb1(0x189);console[_0x8f1fb1(0x214)]('✔\x20'+_0x3dbaa8+_0x8f1fb1(0x2ae)+_0x261a29+'\x27');}else console[_0x8f1fb1(0x214)](_0x8f1fb1(0x37f)+_0x261a29+_0x8f1fb1(0x23a));}const _0x58b706=await withSpinner(_0x8f1fb1(0x1fc)+_0x4e844c+_0x8f1fb1(0x25a),()=>_0x55cc9b[_0x8f1fb1(0x283)][_0x8f1fb1(0x29f)](_0x4e844c),{'verbose':_0x4ad3b3[_0x8f1fb1(0x316)]}),_0x181ea7=_0x58b706[_0x8f1fb1(0x328)],_0x47f76b=getConsoleUrl(_0x4ad3b3[_0x8f1fb1(0x2e8)],_0x8f1fb1(0x306)+_0x181ea7[_0x8f1fb1(0x17a)]+_0x8f1fb1(0x1aa)+_0x181ea7[_0x8f1fb1(0x2e2)]+_0x8f1fb1(0x1f1)+_0x181ea7['workflowAttemptId']);return console['error'](_0x8f1fb1(0x22b)),console['error']('\x20\x20'+a31_0x4e7eff['dim'](_0x8f1fb1(0x210))+'\x20'+_0x181ea7[_0x8f1fb1(0x18a)]),console[_0x8f1fb1(0x214)]('\x20\x20'+a31_0x4e7eff['dim'](_0x8f1fb1(0x37a))+'\x20'+_0x181ea7['status']),console[_0x8f1fb1(0x214)]('\x20\x20'+a31_0x4e7eff[_0x8f1fb1(0x1b3)](_0x8f1fb1(0x291))+'\x20'+_0x181ea7[_0x8f1fb1(0x2e2)]),console[_0x8f1fb1(0x214)]('\x20\x20'+a31_0x4e7eff[_0x8f1fb1(0x1b3)](_0x8f1fb1(0x1ab))+'\x20'+_0x181ea7[_0x8f1fb1(0x340)]),console[_0x8f1fb1(0x214)]('\x20\x20'+_0x47f76b),console[_0x8f1fb1(0x214)]('\x0a'+a31_0x4e7eff[_0x8f1fb1(0x1b3)](_0x8f1fb1(0x36a))+_0x8f1fb1(0x1a2)+_0x181ea7[_0x8f1fb1(0x340)]+_0x8f1fb1(0x363)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]='segment:parent:fields';[a31_0x121f5f(0x236)]=a31_0x121f5f(0x338);async['execute'](_0x56dc0a){const _0x22b303=a31_0x121f5f,{options:_0x4e7ff0,args:_0x38bb82,tdx:_0x2f02e0}=_0x56dc0a,_0x4917b0=_0x38bb82[0x0]||_0x4e7ff0[_0x22b303(0x312)];if(!_0x4917b0)return showParentSegmentNotSetError(_0x22b303(0x1b0)+_0x22b303(0x358)),0x1;_0x4e7ff0[_0x22b303(0x316)]&&(console['error'](_0x22b303(0x25c)+_0x4e7ff0['site']),console[_0x22b303(0x214)]('Parent\x20segment:\x20'+_0x4917b0));const _0x1d9524=await withSpinner(_0x22b303(0x36c)+_0x4917b0+'\x27...',()=>_0x2f02e0[_0x22b303(0x283)][_0x22b303(0x1d3)](_0x4917b0),{'verbose':_0x4e7ff0[_0x22b303(0x316)]}),_0x33584e=_0x1d9524['data'];console[_0x22b303(0x214)](_0x22b303(0x24b)+_0x33584e[_0x22b303(0x2c4)]+_0x22b303(0x330)+(_0x33584e['length']!==0x1?'s':''));if(_0x4e7ff0[_0x22b303(0x2cc)]||_0x4e7ff0[_0x22b303(0x2c3)])return await handleSDKOutput(_0x33584e,_0x4e7ff0),0x0;return displayFieldsHumanReadable(_0x33584e,_0x4917b0),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{['name']='segment:parent:view';[a31_0x121f5f(0x236)]='Show\x20parent\x20segment\x20details';async[a31_0x121f5f(0x262)](_0x3cd1cb){const _0x55d63c=a31_0x121f5f,{options:_0x374679,args:_0x49b7b0,tdx:_0x224011}=_0x3cd1cb,_0x28c26f=_0x374679,_0x192f3a=_0x49b7b0[0x0]||_0x374679[_0x55d63c(0x312)];if(!_0x192f3a)return showParentSegmentNotSetError(_0x55d63c(0x287)+_0x55d63c(0x2c5)+'Options:\x0a'+_0x55d63c(0x1b6)),0x1;_0x374679[_0x55d63c(0x316)]&&(console['error']('Site:\x20'+_0x374679[_0x55d63c(0x2e8)]),console[_0x55d63c(0x214)](_0x55d63c(0x176)+_0x192f3a));const _0x23a58=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x192f3a+_0x55d63c(0x25a),()=>_0x224011[_0x55d63c(0x283)][_0x55d63c(0x225)](_0x192f3a),{'verbose':_0x374679[_0x55d63c(0x316)]}),_0x3721fa=_0x23a58[_0x55d63c(0x328)];if(_0x28c26f[_0x55d63c(0x360)]){const _0x48f06d=getConsoleNextUrl(_0x28c26f[_0x55d63c(0x2e8)],_0x55d63c(0x37d)+_0x3721fa['id']);return console[_0x55d63c(0x214)](a31_0x4e7eff['green']('✔')+_0x55d63c(0x1f0)+a31_0x4e7eff[_0x55d63c(0x1c2)](_0x48f06d)),openBrowser(_0x48f06d),0x0;}return await handleSingleObjectOutput(_0x3721fa,_0x374679),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]='segment:parent:desc';[a31_0x121f5f(0x236)]=a31_0x121f5f(0x232);async['execute'](_0x40eea1){const _0x5e8275=a31_0x121f5f,{options:_0xd981f,args:_0x2cd036,tdx:_0x5768a0}=_0x40eea1,_0x2afb23=_0xd981f,_0xa2a58=_0x2cd036[0x0]||_0xd981f[_0x5e8275(0x312)];if(!_0xa2a58)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20(requires\x20context)\x0a'+_0x5e8275(0x2ed)+'Options:\x0a'+_0x5e8275(0x2cf)),0x1;_0xd981f[_0x5e8275(0x316)]&&(console[_0x5e8275(0x214)](_0x5e8275(0x25c)+_0xd981f[_0x5e8275(0x2e8)]),console['error'](_0x5e8275(0x176)+_0xa2a58));const _0x28de25=await withSpinner(_0x5e8275(0x2e4)+_0xa2a58+_0x5e8275(0x25a),()=>_0x5768a0[_0x5e8275(0x283)][_0x5e8275(0x22a)](_0xa2a58),{'verbose':_0xd981f[_0x5e8275(0x316)]}),_0x1c17bc=_0x28de25[_0x5e8275(0x328)],_0x3c38d1=_0x5768a0['segment'][_0x5e8275(0x2cd)](_0x1c17bc);if(_0x2afb23['output']){const _0x57d34f=await this[_0x5e8275(0x247)](_0x40eea1,_0xa2a58,_0x1c17bc,_0x3c38d1),_0x2defc7=this[_0x5e8275(0x1cb)](_0x57d34f);writeFileSync(_0x2afb23[_0x5e8275(0x174)],_0x2defc7);const _0x4d57d6=_0x57d34f[_0x5e8275(0x1d0)][_0x5e8275(0x21f)]['length']+_0x57d34f[_0x5e8275(0x2b0)][_0x5e8275(0x1c1)]((_0x449773,_0x202103)=>_0x449773+_0x202103['columns']['length'],0x0),_0x47f6c6=_0x57d34f[_0x5e8275(0x2b0)]['filter'](_0x1b5a0d=>_0x1b5a0d[_0x5e8275(0x21f)][_0x5e8275(0x2c4)]===0x0)[_0x5e8275(0x2c4)];return console[_0x5e8275(0x193)](_0x5e8275(0x2f5)+_0x2afb23[_0x5e8275(0x174)]),console[_0x5e8275(0x193)](_0x5e8275(0x327)+_0x3c38d1),console[_0x5e8275(0x193)](_0x5e8275(0x200)+_0x57d34f[_0x5e8275(0x2b0)]['length']+'\x20behaviors'),console[_0x5e8275(0x193)]('\x20\x20Columns:\x20'+_0x4d57d6+_0x5e8275(0x270)),_0x47f6c6>0x0&&console[_0x5e8275(0x193)]('\x20\x20Note:\x20'+_0x47f6c6+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console[_0x5e8275(0x214)]('\x0a'+a31_0x4e7eff[_0x5e8275(0x359)](_0x5e8275(0x31b))+'\x20'+a31_0x4e7eff[_0x5e8275(0x1c2)](_0x3c38d1));const _0x3a4b6f=await withSpinner(_0x5e8275(0x344),()=>_0x5768a0[_0x5e8275(0x283)][_0x5e8275(0x1ce)](_0x1c17bc),{'verbose':_0xd981f[_0x5e8275(0x316)]});console[_0x5e8275(0x214)]('\x0a'+a31_0x4e7eff[_0x5e8275(0x359)](_0x5e8275(0x1d0))+'\x20'+a31_0x4e7eff[_0x5e8275(0x1b3)]('('+_0x3c38d1+_0x5e8275(0x268)));const _0x5f0cf0=await executeSchemaQuery(_0x3a4b6f['data'],_0x5768a0,_0xd981f);await handleQueryOutput(_0x5f0cf0,_0xd981f);const _0x30db51=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x5768a0[_0x5e8275(0x283)][_0x5e8275(0x285)](_0x1c17bc),{'verbose':_0xd981f[_0x5e8275(0x316)]});for(const _0xd0ca08 of _0x30db51['data']){const _0x441925='behavior_'+_0xd0ca08[_0x5e8275(0x320)]()[_0x5e8275(0x299)](/\s+/g,'_'),_0x23c107=_0x5e8275(0x1ff)+_0x3c38d1+'.'+_0x441925;console[_0x5e8275(0x214)]('\x0a'+a31_0x4e7eff['bold'](_0xd0ca08)+'\x20'+a31_0x4e7eff[_0x5e8275(0x1b3)]('('+_0x3c38d1+'.'+_0x441925+')'));try{const _0x50bc3a=await executeSchemaQuery(_0x23c107,_0x5768a0,_0xd981f);await handleQueryOutput(_0x50bc3a,_0xd981f);}catch{console[_0x5e8275(0x214)](a31_0x4e7eff[_0x5e8275(0x251)]('\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)'));}}return 0x0;}async['collectSchema'](_0x3d520e,_0x5d6f90,_0xd01f71,_0x404a1b){const _0x21ddb2=a31_0x121f5f,{options:_0x8adfda,tdx:_0x5e1000}=_0x3d520e,_0x2448d9=await withSpinner(_0x21ddb2(0x344),()=>_0x5e1000['segment'][_0x21ddb2(0x1ce)](_0xd01f71),{'verbose':_0x8adfda[_0x21ddb2(0x316)]}),_0x3e5de4=await executeSchemaQuery(_0x2448d9[_0x21ddb2(0x328)],_0x5e1000,_0x8adfda),_0x1bf988=_0x3e5de4[_0x21ddb2(0x328)][_0x21ddb2(0x37b)](_0x10e00d=>({'name':_0x10e00d[_0x21ddb2(0x2de)],'type':_0x10e00d[_0x21ddb2(0x1dc)]})),_0x43d02b=await withSpinner(_0x21ddb2(0x33b),()=>_0x5e1000[_0x21ddb2(0x283)][_0x21ddb2(0x285)](_0xd01f71),{'verbose':_0x8adfda[_0x21ddb2(0x316)]}),_0x25ecf6=[];for(const _0x1d2a33 of _0x43d02b[_0x21ddb2(0x328)]){const _0x4b23fe='behavior_'+_0x1d2a33['toLowerCase']()[_0x21ddb2(0x299)](/\s+/g,'_'),_0x12d8b3='SELECT\x20*\x20FROM\x20'+_0x404a1b+'.'+_0x4b23fe;let _0x4735cd=[];try{const _0x276eaf=await executeSchemaQuery(_0x12d8b3,_0x5e1000,_0x8adfda);_0x4735cd=_0x276eaf[_0x21ddb2(0x328)][_0x21ddb2(0x37b)](_0x2d8d39=>({'name':_0x2d8d39['column_name'],'type':_0x2d8d39[_0x21ddb2(0x1dc)]}));}catch{}_0x25ecf6['push']({'table':_0x4b23fe,'columns':_0x4735cd});}return{'database':_0x404a1b,'parent_segment':_0x5d6f90,'parent_id':_0xd01f71,'customers':{'table':_0x21ddb2(0x1d0),'columns':_0x1bf988},'behaviors':_0x25ecf6};}['formatSchemaJson'](_0x32b3ab){const _0x86597d=a31_0x121f5f,_0x73969a=_0x59eace=>{const _0x49b6af=a31_0x5c5b;if(_0x59eace['length']===0x0)return'[]';const _0x1252e5=_0x59eace[_0x49b6af(0x37b)](_0xb18126=>_0x49b6af(0x1d8)+_0xb18126[_0x49b6af(0x1eb)]+_0x49b6af(0x240)+_0xb18126[_0x49b6af(0x284)]+_0x49b6af(0x183));return'[\x0a'+_0x1252e5['join'](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x34181d=_0x32b3ab[_0x86597d(0x2b0)][_0x86597d(0x37b)](_0x2e7f14=>{const _0x2855c2=_0x86597d;return _0x2855c2(0x28d)+_0x2e7f14[_0x2855c2(0x18c)]+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20'+_0x73969a(_0x2e7f14[_0x2855c2(0x21f)])[_0x2855c2(0x299)](/^/gm,'\x20\x20')['trim']()+_0x2855c2(0x255);})['join'](',\x0a');return _0x86597d(0x32f)+_0x32b3ab[_0x86597d(0x26e)]+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x32b3ab[_0x86597d(0x2ab)]+'\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22'+_0x32b3ab[_0x86597d(0x2db)]+_0x86597d(0x2d4)+_0x32b3ab[_0x86597d(0x1d0)]['table']+_0x86597d(0x314)+_0x73969a(_0x32b3ab[_0x86597d(0x1d0)][_0x86597d(0x21f)])[_0x86597d(0x299)](/^/gm,'\x20\x20')[_0x86597d(0x221)]()+_0x86597d(0x2a7)+_0x34181d+'\x0a\x20\x20]\x0a}\x0a';}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]='segment:parent:sql';[a31_0x121f5f(0x236)]='Get\x20SQL\x20query\x20for\x20parent\x20segment';async[a31_0x121f5f(0x262)](_0x33d896){const _0x573001=a31_0x121f5f,{options:_0x589975,args:_0x244c4e,tdx:_0x1268f4}=_0x33d896,_0x2dd6b3=_0x244c4e[0x0]||_0x589975['parentSegment'];if(!_0x2dd6b3)return showParentSegmentNotSetError(_0x573001(0x1ba)+_0x573001(0x346)),0x1;_0x589975[_0x573001(0x316)]&&(console['error'](_0x573001(0x25c)+_0x589975['site']),console['error'](_0x573001(0x176)+_0x2dd6b3));const _0x2923d0=await withSpinner(_0x573001(0x2e4)+_0x2dd6b3+_0x573001(0x25a),()=>_0x1268f4[_0x573001(0x283)]['resolveParentId'](_0x2dd6b3),{'verbose':_0x589975[_0x573001(0x316)]}),_0x5e612f=_0x2923d0['data'],_0x434105=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x2dd6b3+_0x573001(0x25a),()=>_0x1268f4[_0x573001(0x283)][_0x573001(0x1ce)](_0x5e612f),{'verbose':_0x589975['verbose']}),_0x5d5527=_0x434105[_0x573001(0x328)];return _0x589975[_0x573001(0x2c0)]===_0x573001(0x2cc)||_0x589975[_0x573001(0x2c0)]===_0x573001(0x2c3)?await handleSDKOutput([{'sql':_0x5d5527}],_0x589975):console[_0x573001(0x193)](_0x5d5527),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']=a31_0x121f5f(0x33e);['description']=a31_0x121f5f(0x32e);async[a31_0x121f5f(0x262)](_0x4ceb05){const _0x5c692c=a31_0x121f5f,{options:_0xb81d29,args:_0x3b5839,tdx:_0x1e55e9}=_0x4ceb05,_0x431033=_0x3b5839[0x0]||_0xb81d29['parentSegment'];if(!_0x431033)return showParentSegmentNotSetError(_0x5c692c(0x324)+_0x5c692c(0x18f)),0x1;_0xb81d29[_0x5c692c(0x316)]&&(console[_0x5c692c(0x214)](_0x5c692c(0x25c)+_0xb81d29[_0x5c692c(0x2e8)]),console[_0x5c692c(0x214)](_0x5c692c(0x176)+_0x431033));const _0x209f2d=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x431033+_0x5c692c(0x25a),()=>_0x1e55e9[_0x5c692c(0x283)]['resolveParentId'](_0x431033),{'verbose':_0xb81d29['verbose']}),_0x1e4884=_0x209f2d['data'],_0x25a85c=await withSpinner(_0x5c692c(0x325)+_0x431033+'\x27...',()=>_0x1e55e9['segment']['getParentSQL'](_0x1e4884),{'verbose':_0xb81d29[_0x5c692c(0x316)]});let _0x297219=_0x25a85c[_0x5c692c(0x328)];const _0x4948d5=resolveLimit(_0xb81d29[_0x5c692c(0x30a)],DEFAULT_DISPLAY_LIMIT),_0x3bd3ff=/\bLIMIT\s+\d+/i[_0x5c692c(0x298)](_0x297219);!_0x3bd3ff&&(_0x297219=_0x297219['trim']()[_0x5c692c(0x299)](/;+$/,''),_0x297219=_0x5c692c(0x1a0)+_0x297219+_0x5c692c(0x24e)+_0x4948d5);_0xb81d29['verbose']&&console[_0x5c692c(0x214)](_0x5c692c(0x304)+_0x297219);const _0x5e8afa=await withProgressSpinner(_0x5c692c(0x190),async _0x2a9194=>{const _0x487329=_0x5c692c,_0x710d35=await _0x1e55e9['query'][_0x487329(0x262)](_0x297219,{'catalog':'td','schema':_0x487329(0x377),'onJobId':_0x36b00c=>{const _0x48514f=_0x487329;_0x2a9194[_0x48514f(0x27f)](_0x36b00c);}});return _0x710d35;},{'verbose':_0xb81d29[_0x5c692c(0x316)]}),_0x4d3873=_0x5e8afa[_0x5c692c(0x328)],_0x293c06=_0x4d3873['jobId']?_0x5c692c(0x260)+_0x4d3873[_0x5c692c(0x34b)]+']':'';return console[_0x5c692c(0x214)]('✔\x20Query\x20completed:\x20Processed\x20'+_0x4d3873[_0x5c692c(0x28f)]['processedRows']['toLocaleString']()+_0x5c692c(0x2a2)+(_0x5c692c(0x349)+formatElapsed(_0x4d3873[_0x5c692c(0x28f)][_0x5c692c(0x26a)])+_0x293c06)),await handleQueryOutput(_0x4d3873,_0xb81d29),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]='ps:rt:list';[a31_0x121f5f(0x236)]=a31_0x121f5f(0x243);async[a31_0x121f5f(0x262)](_0x1bec5e){const _0x3a1e4f=a31_0x121f5f,{options:_0x3632e5,args:_0x44d395,tdx:_0x536ac7}=_0x1bec5e,_0x48bb8f=_0x44d395[0x0],_0x397083=await withSpinner(_0x48bb8f?_0x3a1e4f(0x2bf)+_0x48bb8f+_0x3a1e4f(0x25a):_0x3a1e4f(0x2e9),()=>_0x536ac7[_0x3a1e4f(0x177)][_0x3a1e4f(0x353)](),{'verbose':_0x3632e5[_0x3a1e4f(0x316)]});let _0x34c230=_0x397083[_0x3a1e4f(0x328)][_0x3a1e4f(0x301)](_0x15189f=>_0x15189f[_0x3a1e4f(0x20b)]);if(_0x48bb8f){const _0x462e69=_0x48bb8f[_0x3a1e4f(0x299)](/[.+^${}()|[\]\\]/g,_0x3a1e4f(0x2dd))['replace'](/\*/g,'.*')[_0x3a1e4f(0x299)](/\?/g,'.'),_0x124a46=new RegExp('^'+_0x462e69+'$','i');_0x34c230=_0x34c230[_0x3a1e4f(0x301)](_0x45f93b=>_0x124a46[_0x3a1e4f(0x298)](_0x45f93b['name']));}_0x34c230['sort']((_0x4a8604,_0x1db04e)=>_0x4a8604['name'][_0x3a1e4f(0x376)](_0x1db04e[_0x3a1e4f(0x1eb)])),console['error']('✔\x20Found\x20'+_0x34c230[_0x3a1e4f(0x2c4)]+_0x3a1e4f(0x2f8)+(_0x34c230[_0x3a1e4f(0x2c4)]!==0x1?'s':''));const _0x439aea=_0x4a4a11=>{const _0x29b8b2=_0x3a1e4f;return getConsoleNextUrl(_0x3632e5[_0x29b8b2(0x2e8)],_0x29b8b2(0x37d)+_0x4a4a11);};if(_0x3632e5['format']===_0x3a1e4f(0x2cc)||_0x3632e5[_0x3a1e4f(0x2c0)]==='jsonl'){const _0x584995=_0x34c230[_0x3a1e4f(0x37b)](_0x3de612=>({..._0x3de612,'url':_0x439aea(_0x3de612['id'])}));await handleSDKOutput(_0x584995,_0x3632e5);}else{if(_0x34c230[_0x3a1e4f(0x2c4)]===0x0)console[_0x3a1e4f(0x193)](_0x3a1e4f(0x315));else for(const _0x363ffe of _0x34c230){const _0x5004c6=_0x363ffe[_0x3a1e4f(0x1dd)]?a31_0x4e7eff['dim']('\x20('+formatRows(_0x363ffe[_0x3a1e4f(0x1dd)])+')'):'',_0x65e8d5=hyperlink(_0x363ffe[_0x3a1e4f(0x1eb)],_0x439aea(_0x363ffe['id']));console[_0x3a1e4f(0x193)]('⚡\x20'+_0x65e8d5+_0x5004c6);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']=a31_0x121f5f(0x207);[a31_0x121f5f(0x236)]=a31_0x121f5f(0x19b);async[a31_0x121f5f(0x262)](_0xb07acc){const _0x2889f7=a31_0x121f5f,{options:_0x3ac61b,args:_0x37c07c,tdx:_0x3cab5b}=_0xb07acc,_0x436b52=_0x37c07c[0x0]||_0x3ac61b[_0x2889f7(0x312)];if(!_0x436b52)return showParentSegmentNotSetError(_0x2889f7(0x1e0)+_0x2889f7(0x371)),0x1;const _0xd3087e=resolveYamlFile(_0x436b52);if(!existsSync(_0xd3087e))return showFileNotFoundError(_0xd3087e,_0x436b52),0x1;let _0x38df28;try{_0x38df28=readFileSync(_0xd3087e,_0x2889f7(0x1d6));}catch(_0x4fcb32){const _0x5e13d7=_0x4fcb32 instanceof Error?_0x4fcb32['message']:String(_0x4fcb32);return console['error']('Error\x20reading\x20file:\x20'+_0x5e13d7),0x1;}const _0x482c86=createCommandSpinner(a31_0x4e7eff[_0x2889f7(0x1b3)](_0x2889f7(0x1be)),{'verbose':_0x3ac61b['verbose']});_0x482c86['start']();const _0x33170b={'realtime':!![],'onProgress':_0x43bcd0=>{const _0x40ef8b=_0x2889f7;_0x482c86[_0x40ef8b(0x319)]=formatProgressMessage(_0x43bcd0);}};let _0x180d3c;try{_0x180d3c=await _0x3cab5b[_0x2889f7(0x283)][_0x2889f7(0x1bd)](_0x38df28,_0x33170b),_0x482c86[_0x2889f7(0x1e4)]();}catch(_0x2087aa){_0x482c86[_0x2889f7(0x1e4)]();throw _0x2087aa;}console[_0x2889f7(0x214)]('\x0a'+a31_0x4e7eff[_0x2889f7(0x359)](_0x2889f7(0x2b9))+'\x20'+_0x180d3c[_0x2889f7(0x1eb)]),console[_0x2889f7(0x214)]('═'['repeat'](0x3c)),displayRealtimeValidation(_0x180d3c),console[_0x2889f7(0x214)]('─'[_0x2889f7(0x25f)](0x3c));if(_0x180d3c['errors'][_0x2889f7(0x2c4)]>0x0){console[_0x2889f7(0x214)]('\x0a'+a31_0x4e7eff[_0x2889f7(0x277)](_0x2889f7(0x29c)));for(const _0x2012a4 of _0x180d3c[_0x2889f7(0x36d)]){console['error']('\x20\x20'+a31_0x4e7eff[_0x2889f7(0x277)]('•')+'\x20'+_0x2012a4);}}return _0x180d3c[_0x2889f7(0x297)]&&console['error']('\x0a'+a31_0x4e7eff[_0x2889f7(0x29e)]('✔')+_0x2889f7(0x1b5)),_0x180d3c[_0x2889f7(0x297)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0x121f5f(0x1af);[a31_0x121f5f(0x236)]=a31_0x121f5f(0x2e1);async[a31_0x121f5f(0x262)](_0x5e6c57){const _0xf4734b=a31_0x121f5f,{options:_0x2bf4b9,args:_0x28adcb,tdx:_0x282387}=_0x5e6c57,_0x582edf=_0x28adcb[0x0]||_0x2bf4b9['parentSegment'];if(!_0x582edf)return showParentSegmentNotSetError(_0xf4734b(0x2bd)+_0xf4734b(0x19c)),0x1;_0x2bf4b9['verbose']&&(console[_0xf4734b(0x214)]('Site:\x20'+_0x2bf4b9[_0xf4734b(0x2e8)]),console[_0xf4734b(0x214)](_0xf4734b(0x176)+_0x582edf));const _0x565575=await withSpinner(_0xf4734b(0x2e4)+_0x582edf+_0xf4734b(0x25a),()=>_0x282387[_0xf4734b(0x283)][_0xf4734b(0x22a)](_0x582edf),{'verbose':_0x2bf4b9[_0xf4734b(0x316)]}),_0xf46f12=_0x565575[_0xf4734b(0x328)],_0x3a7bc=await withSpinner('Listing\x20RT\x20journeys\x20for\x20\x27'+_0x582edf+'\x27...',()=>_0x282387[_0xf4734b(0x177)][_0xf4734b(0x21e)](_0xf46f12),{'verbose':_0x2bf4b9[_0xf4734b(0x316)]}),_0x553957=_0x3a7bc[_0xf4734b(0x328)];console[_0xf4734b(0x214)](_0xf4734b(0x24b)+_0x553957['length']+_0xf4734b(0x2df)+(_0x553957['length']!==0x1?'s':''));if(_0x2bf4b9['format']===_0xf4734b(0x2cc)||_0x2bf4b9[_0xf4734b(0x2c0)]===_0xf4734b(0x2c3))await handleSDKOutput(_0x553957,_0x2bf4b9);else{if(_0x553957[_0xf4734b(0x2c4)]===0x0)console[_0xf4734b(0x193)](_0xf4734b(0x16c));else for(const _0x2d94c4 of _0x553957){const _0x2a4716=_0x2d94c4[_0xf4734b(0x1a8)]===_0xf4734b(0x2e3)?'🚀':'📝',_0x2a5aeb=_0x2d94c4[_0xf4734b(0x212)]?a31_0x4e7eff['yellow'](_0xf4734b(0x220)):'',_0x2eae1e=a31_0x4e7eff[_0xf4734b(0x1b3)]('\x20('+_0x2d94c4['stageCount']+_0xf4734b(0x281)+(_0x2d94c4[_0xf4734b(0x206)]!==0x1?'s':'')+')');console[_0xf4734b(0x193)](_0x2a4716+'\x20'+_0x2d94c4[_0xf4734b(0x1eb)]+_0x2a5aeb+_0x2eae1e);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{['name']=a31_0x121f5f(0x361);[a31_0x121f5f(0x236)]=a31_0x121f5f(0x34c);async[a31_0x121f5f(0x262)](_0x346164){const _0x4c8a9f=a31_0x121f5f,{options:_0x5e242e,args:_0x52b9d3,tdx:_0x59a406}=_0x346164,_0xcd34a5=_0x52b9d3[0x0];if(!_0xcd34a5)return console[_0x4c8a9f(0x214)](a31_0x4e7eff[_0x4c8a9f(0x277)](_0x4c8a9f(0x2c8))),console[_0x4c8a9f(0x214)](_0x4c8a9f(0x1d4)),console[_0x4c8a9f(0x214)](a31_0x4e7eff[_0x4c8a9f(0x1b3)](_0x4c8a9f(0x1a7))),0x1;_0x5e242e[_0x4c8a9f(0x316)]&&(console[_0x4c8a9f(0x214)](_0x4c8a9f(0x25c)+_0x5e242e[_0x4c8a9f(0x2e8)]),console[_0x4c8a9f(0x214)]('RT\x20Journey\x20ID:\x20'+_0xcd34a5));const _0x4383fa=await withSpinner(_0x4c8a9f(0x1ef)+_0xcd34a5+'\x27...',()=>_0x59a406[_0x4c8a9f(0x177)]['pauseJourney'](_0xcd34a5),{'verbose':_0x5e242e[_0x4c8a9f(0x316)]}),_0x4bd705=_0x4383fa[_0x4c8a9f(0x328)];console['error'](_0x4c8a9f(0x2ce)+_0x4bd705[_0x4c8a9f(0x1eb)]+'\x27');if(_0x5e242e['format']===_0x4c8a9f(0x2cc)||_0x5e242e[_0x4c8a9f(0x2c0)]===_0x4c8a9f(0x2c3))await handleSDKOutput([_0x4bd705],_0x5e242e);else{const _0x8300b2=_0x4bd705[_0x4c8a9f(0x1a8)]===_0x4c8a9f(0x2e3)?'🚀':'📝',_0x2520c8=_0x4bd705['paused']?a31_0x4e7eff[_0x4c8a9f(0x251)]('\x20(paused)'):'';console[_0x4c8a9f(0x193)](_0x8300b2+'\x20'+_0x4bd705[_0x4c8a9f(0x1eb)]+_0x2520c8);}return 0x0;}}function a31_0x5c5b(_0x12d45c,_0x204e49){_0x12d45c=_0x12d45c-0x16c;const _0x1859b5=a31_0x1859();let _0x5c5b2e=_0x1859b5[_0x12d45c];return _0x5c5b2e;}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]=a31_0x121f5f(0x2c7);[a31_0x121f5f(0x236)]=a31_0x121f5f(0x2d1);async[a31_0x121f5f(0x262)](_0x40a7ab){const _0x475413=a31_0x121f5f,{options:_0x40040d,args:_0x2a4216,tdx:_0x3c6a85}=_0x40a7ab,_0x45fb0f=_0x2a4216[0x0];if(!_0x45fb0f)return console[_0x475413(0x214)](a31_0x4e7eff[_0x475413(0x277)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console['error'](_0x475413(0x311)),console[_0x475413(0x214)](a31_0x4e7eff['dim'](_0x475413(0x1a7))),0x1;_0x40040d[_0x475413(0x316)]&&(console[_0x475413(0x214)](_0x475413(0x25c)+_0x40040d['site']),console[_0x475413(0x214)]('RT\x20Journey\x20ID:\x20'+_0x45fb0f));const _0x1cde1d=await withSpinner(_0x475413(0x2ec)+_0x45fb0f+_0x475413(0x25a),()=>_0x3c6a85['realtime'][_0x475413(0x2b8)](_0x45fb0f),{'verbose':_0x40040d[_0x475413(0x316)]}),_0x344cfd=_0x1cde1d[_0x475413(0x328)];console[_0x475413(0x214)]('✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x344cfd[_0x475413(0x1eb)]+'\x27');if(_0x40040d[_0x475413(0x2c0)]===_0x475413(0x2cc)||_0x40040d[_0x475413(0x2c0)]==='jsonl')await handleSDKOutput([_0x344cfd],_0x40040d);else{const _0x1d6262=_0x344cfd['state']===_0x475413(0x2e3)?'🚀':'📝',_0x36a197=_0x344cfd['paused']?a31_0x4e7eff[_0x475413(0x251)](_0x475413(0x220)):'';console[_0x475413(0x193)](_0x1d6262+'\x20'+_0x344cfd[_0x475413(0x1eb)]+_0x36a197);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]=a31_0x121f5f(0x20d);[a31_0x121f5f(0x236)]=a31_0x121f5f(0x233);async[a31_0x121f5f(0x262)](_0x39fdb3){const _0x2f74a5=a31_0x121f5f,{options:_0x16caad,args:_0x1421b8,tdx:_0x23a5c3}=_0x39fdb3,_0x909c75=_0x1421b8[0x0]||_0x16caad[_0x2f74a5(0x312)];if(!_0x909c75)return showParentSegmentNotSetError(_0x2f74a5(0x184)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20configuration_versions\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20for\x20specific\x20parent\x20segment'),0x1;_0x16caad['verbose']&&(console[_0x2f74a5(0x214)](_0x2f74a5(0x25c)+_0x16caad['site']),console[_0x2f74a5(0x214)](_0x2f74a5(0x176)+_0x909c75));const _0x3da71a=await withSpinner(_0x2f74a5(0x2e4)+_0x909c75+_0x2f74a5(0x25a),()=>_0x23a5c3[_0x2f74a5(0x283)]['resolveParentId'](_0x909c75),{'verbose':_0x16caad['verbose']}),_0xeded5=_0x3da71a[_0x2f74a5(0x328)],_0x1031eb=await withSpinner('Getting\x20RT\x20configuration\x20version\x20for\x20\x27'+_0x909c75+_0x2f74a5(0x25a),()=>_0x23a5c3[_0x2f74a5(0x177)][_0x2f74a5(0x279)](_0xeded5),{'verbose':_0x16caad[_0x2f74a5(0x316)]}),_0x424cc0=_0x1031eb[_0x2f74a5(0x328)];return console[_0x2f74a5(0x214)](_0x2f74a5(0x219)),_0x16caad[_0x2f74a5(0x2c0)]===_0x2f74a5(0x2cc)||_0x16caad[_0x2f74a5(0x2c0)]===_0x2f74a5(0x2c3)?await handleSDKOutput([_0x424cc0],_0x16caad):(console['log']('id:\x20'+_0x424cc0['id']),console[_0x2f74a5(0x193)](_0x2f74a5(0x2a4)+_0x424cc0[_0x2f74a5(0x18a)]),console[_0x2f74a5(0x193)]('identifier:\x20'+_0x424cc0[_0x2f74a5(0x26f)]),console['log']('eventKind:\x20'+_0x424cc0[_0x2f74a5(0x2d6)]),console[_0x2f74a5(0x193)]('status:\x20'+_0x424cc0['status'])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{['name']=a31_0x121f5f(0x357);['description']=a31_0x121f5f(0x22e);async['execute'](_0x1bea4c){const _0x26adf4=a31_0x121f5f,{options:_0x2cc9a2,args:_0x5ad909,tdx:_0x4196bf}=_0x1bea4c,_0x3f35a5=_0x5ad909[0x0]||_0x2cc9a2['parentSegment'];if(!_0x3f35a5)return showParentSegmentNotSetError(_0x26adf4(0x280)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20for\x20specific\x20parent\x20segment'),0x1;const _0x12a62f=await withSpinner(_0x26adf4(0x2e4)+_0x3f35a5+_0x26adf4(0x25a),()=>_0x4196bf[_0x26adf4(0x283)][_0x26adf4(0x22a)](_0x3f35a5),{'verbose':_0x2cc9a2['verbose']}),_0x3c03ac=_0x12a62f[_0x26adf4(0x328)],_0x16f8ac=await withSpinner(_0x26adf4(0x1bc)+_0x3f35a5+_0x26adf4(0x25a),()=>_0x4196bf[_0x26adf4(0x16d)][_0x26adf4(0x353)](_0x3c03ac),{'verbose':_0x2cc9a2[_0x26adf4(0x316)]}),_0x5d7d27=_0x16f8ac['data'];console['error']('✔\x20Found\x20'+_0x5d7d27[_0x26adf4(0x2c4)]+_0x26adf4(0x1de)+(_0x5d7d27[_0x26adf4(0x2c4)]!==0x1?'s':''));if(_0x2cc9a2[_0x26adf4(0x2c0)]==='json'||_0x2cc9a2[_0x26adf4(0x2c0)]===_0x26adf4(0x2c3))await handleSDKOutput(_0x5d7d27,_0x2cc9a2);else{if(_0x5d7d27[_0x26adf4(0x2c4)]===0x0)console[_0x26adf4(0x193)]('No\x20personalization\x20services\x20configured'),console['error'](a31_0x4e7eff[_0x26adf4(0x1c2)](_0x26adf4(0x367)));else for(const _0x2a89cf of _0x5d7d27){console[_0x26adf4(0x193)](a31_0x4e7eff['bold'](_0x2a89cf[_0x26adf4(0x1eb)])+'\x20'+a31_0x4e7eff['dim'](_0x26adf4(0x35f)+_0x2a89cf['id']+')'));_0x2a89cf[_0x26adf4(0x236)]&&console[_0x26adf4(0x193)]('\x20\x20'+a31_0x4e7eff[_0x26adf4(0x1b3)](_0x2a89cf[_0x26adf4(0x236)]));if(_0x2a89cf[_0x26adf4(0x229)]&&_0x2a89cf['tokens'][_0x26adf4(0x2c4)]>0x0)for(const _0x98d650 of _0x2a89cf[_0x26adf4(0x229)]){const _0x1c1c2e=_0x98d650[_0x26adf4(0x34d)]?.['length']?_0x98d650[_0x26adf4(0x34d)][_0x26adf4(0x222)](',\x20'):_0x26adf4(0x35e);console[_0x26adf4(0x193)]('\x20\x20'+a31_0x4e7eff[_0x26adf4(0x1c2)](_0x26adf4(0x272))+'\x20'+_0x98d650[_0x26adf4(0x1eb)]+'\x20'+a31_0x4e7eff['dim'](_0x26adf4(0x35f)+_0x98d650['id']+')')),console[_0x26adf4(0x193)]('\x20\x20\x20\x20'+a31_0x4e7eff[_0x26adf4(0x1b3)](_0x26adf4(0x27b))+'\x20'+_0x1c1c2e);}else console['log']('\x20\x20'+a31_0x4e7eff[_0x26adf4(0x1b3)](_0x26adf4(0x317)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]='ps:pz:service:create';[a31_0x121f5f(0x236)]=a31_0x121f5f(0x227);async[a31_0x121f5f(0x262)](_0x506023){const _0x2f1d43=a31_0x121f5f,{options:_0x2d6507,args:_0x1b3ddb,tdx:_0x3ccccc}=_0x506023,_0xcff65f=_0x2d6507,_0x358e24=_0x1b3ddb[0x0],_0xf34694=_0x1b3ddb[0x1]||_0x2d6507[_0x2f1d43(0x312)];if(!_0x358e24)return console['error']('Error:\x20Service\x20name\x20is\x20required'),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]'),console[_0x2f1d43(0x214)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0xf34694)return showParentSegmentNotSetError(_0x2f1d43(0x17e)+_0x2f1d43(0x235)),0x1;const _0x2cc61b=await withSpinner(_0x2f1d43(0x2e4)+_0xf34694+'\x27...',()=>_0x3ccccc[_0x2f1d43(0x283)][_0x2f1d43(0x22a)](_0xf34694),{'verbose':_0x2d6507[_0x2f1d43(0x316)]}),_0x44e6f5=_0x2cc61b[_0x2f1d43(0x328)],_0x29e40a={'name':_0x358e24,'description':_0xcff65f['description'],'public':_0xcff65f['public']},_0x3f47e4=await withSpinner(_0x2f1d43(0x22f)+_0x358e24+_0x2f1d43(0x25a),()=>_0x3ccccc[_0x2f1d43(0x16d)][_0x2f1d43(0x2d9)](_0x44e6f5,_0x29e40a),{'verbose':_0x2d6507[_0x2f1d43(0x316)]}),_0x3c6f42=_0x3f47e4['data'];return console[_0x2f1d43(0x214)](_0x2f1d43(0x26b)+_0x3c6f42[_0x2f1d43(0x1eb)]+'\x27\x20with\x20ID:\x20'+_0x3c6f42['id']),await handleSDKOutput([_0x3c6f42],_0x2d6507),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]='ps:pz:service:show';[a31_0x121f5f(0x236)]='Show\x20personalization\x20service\x20details';async['execute'](_0xcdcbfa){const _0x5ba16f=a31_0x121f5f,{options:_0x590026,args:_0x3ec610,tdx:_0x4b39a6}=_0xcdcbfa,_0x25793a=_0x3ec610[0x0],_0x335704=_0x3ec610[0x1]||_0x590026[_0x5ba16f(0x312)];if(!_0x25793a)return console[_0x5ba16f(0x214)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x5ba16f(0x214)](_0x5ba16f(0x209)),console[_0x5ba16f(0x214)](_0x5ba16f(0x37e)),0x1;if(!_0x335704)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a'+_0x5ba16f(0x37e)),0x1;const _0x2b6571=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x335704+_0x5ba16f(0x25a),()=>_0x4b39a6[_0x5ba16f(0x283)][_0x5ba16f(0x22a)](_0x335704),{'verbose':_0x590026[_0x5ba16f(0x316)]}),_0x3897d4=_0x2b6571[_0x5ba16f(0x328)],_0x16487f=await withSpinner(_0x5ba16f(0x1c5)+_0x25793a+_0x5ba16f(0x25a),()=>_0x4b39a6['personalization'][_0x5ba16f(0x1fd)](_0x3897d4,_0x25793a),{'verbose':_0x590026[_0x5ba16f(0x316)]}),_0x6a8998=_0x16487f[_0x5ba16f(0x328)];if(_0x590026[_0x5ba16f(0x2cc)]||_0x590026['jsonl'])await handleSDKOutput([_0x6a8998],_0x590026);else{console[_0x5ba16f(0x193)](a31_0x4e7eff[_0x5ba16f(0x359)](_0x6a8998[_0x5ba16f(0x1eb)])+'\x20'+a31_0x4e7eff['dim'](_0x5ba16f(0x35f)+_0x6a8998['id']+')'));_0x6a8998[_0x5ba16f(0x236)]&&console[_0x5ba16f(0x193)]('\x20\x20'+a31_0x4e7eff[_0x5ba16f(0x1b3)](_0x6a8998[_0x5ba16f(0x236)]));console['log']('\x20\x20'+a31_0x4e7eff[_0x5ba16f(0x1c2)](_0x5ba16f(0x347))+'\x20'+(_0x6a8998['public']?_0x5ba16f(0x2b3):'no'));if(_0x6a8998[_0x5ba16f(0x229)]&&_0x6a8998[_0x5ba16f(0x229)]['length']>0x0)for(const _0x6e80 of _0x6a8998[_0x5ba16f(0x229)]){const _0x732d4e=_0x6e80[_0x5ba16f(0x34d)]?.[_0x5ba16f(0x2c4)]?_0x6e80[_0x5ba16f(0x34d)][_0x5ba16f(0x222)](',\x20'):_0x5ba16f(0x35e);console['log']('\x20\x20'+a31_0x4e7eff[_0x5ba16f(0x1c2)]('token:')+'\x20'+_0x6e80['name']+'\x20'+a31_0x4e7eff['dim']('(id:\x20'+_0x6e80['id']+')')),console['log']('\x20\x20\x20\x20'+a31_0x4e7eff[_0x5ba16f(0x1b3)](_0x5ba16f(0x27b))+'\x20'+_0x732d4e);}else console[_0x5ba16f(0x193)]('\x20\x20'+a31_0x4e7eff[_0x5ba16f(0x1b3)](_0x5ba16f(0x317)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]=a31_0x121f5f(0x286);[a31_0x121f5f(0x236)]='Delete\x20a\x20personalization\x20service';async[a31_0x121f5f(0x262)](_0x18fd12){const _0x2f34f5=a31_0x121f5f,{options:_0xd56204,args:_0xf5e115,tdx:_0xc4836e}=_0x18fd12,_0x30d9fe=_0xf5e115[0x0],_0xc16fb5=_0xf5e115[0x1]||_0xd56204[_0x2f34f5(0x312)];if(!_0x30d9fe)return console[_0x2f34f5(0x214)](_0x2f34f5(0x261)),console[_0x2f34f5(0x214)](_0x2f34f5(0x2c9)),console[_0x2f34f5(0x214)](_0x2f34f5(0x1fe)),0x1;if(!_0xc16fb5)return showParentSegmentNotSetError(_0x2f34f5(0x269)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x123fce=await withSpinner(_0x2f34f5(0x2e4)+_0xc16fb5+'\x27...',()=>_0xc4836e[_0x2f34f5(0x283)][_0x2f34f5(0x22a)](_0xc16fb5),{'verbose':_0xd56204[_0x2f34f5(0x316)]}),_0xdf535f=_0x123fce[_0x2f34f5(0x328)];return await withSpinner(_0x2f34f5(0x250)+_0x30d9fe+_0x2f34f5(0x25a),()=>_0xc4836e[_0x2f34f5(0x16d)]['delete'](_0xdf535f,_0x30d9fe),{'verbose':_0xd56204['verbose']}),console['error'](_0x2f34f5(0x2fc)+_0x30d9fe+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]=a31_0x121f5f(0x334);[a31_0x121f5f(0x236)]='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async[a31_0x121f5f(0x262)](_0x255539){const _0x708cb2=a31_0x121f5f,{options:_0x763a7a,args:_0x1d3144,tdx:_0x3cfe07}=_0x255539,_0x5b3bba=_0x763a7a,_0x3a686b=_0x1d3144[0x0],_0x1d6a22=_0x1d3144[0x1]||_0x763a7a[_0x708cb2(0x312)];if(!_0x3a686b)return console[_0x708cb2(0x214)](_0x708cb2(0x261)),console[_0x708cb2(0x214)](_0x708cb2(0x337)),console[_0x708cb2(0x214)](_0x708cb2(0x36b)),0x1;if(!_0x5b3bba['name'])return console[_0x708cb2(0x214)](_0x708cb2(0x2ca)),console['error'](_0x708cb2(0x337)),0x1;if(!_0x1d6a22)return showParentSegmentNotSetError(_0x708cb2(0x1b2)+_0x708cb2(0x36b)),0x1;const _0x301f3d=await withSpinner(_0x708cb2(0x2e4)+_0x1d6a22+'\x27...',()=>_0x3cfe07['segment']['resolveParentId'](_0x1d6a22),{'verbose':_0x763a7a['verbose']}),_0x5b0b84=_0x301f3d['data'],_0xe15e2={'name':_0x5b3bba[_0x708cb2(0x1eb)]};_0x5b3bba[_0x708cb2(0x236)]!==undefined&&(_0xe15e2[_0x708cb2(0x236)]=_0x5b3bba[_0x708cb2(0x236)]);const _0x3a78fe=await withSpinner(_0x708cb2(0x345)+_0x3a686b+_0x708cb2(0x25a),()=>_0x3cfe07['personalization']['patch'](_0x5b0b84,_0x3a686b,_0xe15e2),{'verbose':_0x763a7a['verbose']}),_0x2222cd=_0x3a78fe[_0x708cb2(0x328)];return console['error']('✔\x20Updated\x20personalization\x20service\x20\x27'+_0x2222cd[_0x708cb2(0x1eb)]+'\x27'),await handleSDKOutput([_0x2222cd],_0x763a7a),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]=a31_0x121f5f(0x276);[a31_0x121f5f(0x236)]='Create\x20a\x20token\x20for\x20a\x20personalization\x20service';async[a31_0x121f5f(0x262)](_0x2bab8f){const _0x4eda45=a31_0x121f5f,{options:_0x5acc89,args:_0x280861,tdx:_0x4a1f50}=_0x2bab8f,_0x596611=_0x5acc89,_0x4b9f0f=_0x280861[0x0],_0x49bce6=_0x280861[0x1],_0x2ffa5c=_0x280861[0x2]||_0x5acc89[_0x4eda45(0x312)];if(!_0x4b9f0f)return console[_0x4eda45(0x214)](_0x4eda45(0x1fa)),console['error'](_0x4eda45(0x333)),console[_0x4eda45(0x214)](_0x4eda45(0x321)),0x1;if(!_0x49bce6)return console[_0x4eda45(0x214)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x4eda45(0x214)](_0x4eda45(0x333)),console[_0x4eda45(0x214)](_0x4eda45(0x321)),0x1;if(!_0x2ffa5c)return showParentSegmentNotSetError(_0x4eda45(0x1cf)+_0x4eda45(0x321)),0x1;const _0x4973bf=await withSpinner(_0x4eda45(0x2e4)+_0x2ffa5c+'\x27...',()=>_0x4a1f50[_0x4eda45(0x283)][_0x4eda45(0x22a)](_0x2ffa5c),{'verbose':_0x5acc89[_0x4eda45(0x316)]}),_0x79bcb2=_0x4973bf[_0x4eda45(0x328)],_0x25cc28={'name':_0x4b9f0f};_0x596611[_0x4eda45(0x34d)]&&(_0x25cc28[_0x4eda45(0x34d)]=_0x596611['allowedIps'][_0x4eda45(0x1d1)](',')[_0x4eda45(0x37b)](_0x220ce7=>_0x220ce7[_0x4eda45(0x221)]()));_0x596611[_0x4eda45(0x236)]&&(_0x25cc28[_0x4eda45(0x236)]=_0x596611[_0x4eda45(0x236)]);const _0x447cc3=await withSpinner(_0x4eda45(0x2fb)+_0x4b9f0f+'\x27\x20for\x20service\x20\x27'+_0x49bce6+'\x27...',()=>_0x4a1f50['personalization'][_0x4eda45(0x17b)](_0x79bcb2,_0x49bce6,_0x25cc28),{'verbose':_0x5acc89[_0x4eda45(0x316)]}),_0x33ec8d=_0x447cc3[_0x4eda45(0x328)];return console['error'](_0x4eda45(0x175)+_0x33ec8d[_0x4eda45(0x1eb)]+'\x27\x20with\x20ID:\x20'+_0x33ec8d['id']),_0x33ec8d[_0x4eda45(0x1e7)]&&(console['error'](a31_0x4e7eff[_0x4eda45(0x251)](_0x4eda45(0x203))),console[_0x4eda45(0x214)](a31_0x4e7eff['cyan'](_0x33ec8d[_0x4eda45(0x1e7)])),console[_0x4eda45(0x214)]('')),await handleSDKOutput([_0x33ec8d],_0x5acc89),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]=a31_0x121f5f(0x257);[a31_0x121f5f(0x236)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async[a31_0x121f5f(0x262)](_0x5c618b){const _0x5a4afd=a31_0x121f5f,{options:_0x8eb121,args:_0x31ce1b,tdx:_0x3bfb40}=_0x5c618b,_0x252cd3=_0x31ce1b[0x0],_0x3468d1=_0x31ce1b[0x1]||_0x8eb121[_0x5a4afd(0x312)];if(!_0x252cd3)return console[_0x5a4afd(0x214)](_0x5a4afd(0x2ba)),console[_0x5a4afd(0x214)](_0x5a4afd(0x211)),console['error'](_0x5a4afd(0x2e5)),0x1;if(!_0x3468d1)return showParentSegmentNotSetError(_0x5a4afd(0x254)+_0x5a4afd(0x2e5)),0x1;const _0x466cc0=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3468d1+'\x27...',()=>_0x3bfb40[_0x5a4afd(0x283)][_0x5a4afd(0x22a)](_0x3468d1),{'verbose':_0x8eb121[_0x5a4afd(0x316)]}),_0x21dbfb=_0x466cc0[_0x5a4afd(0x328)],_0x33f8cd=await withSpinner('Finding\x20service\x20for\x20token...',()=>_0x3bfb40[_0x5a4afd(0x16d)]['list'](_0x21dbfb),{'verbose':_0x8eb121[_0x5a4afd(0x316)]}),_0x2e4af1=_0x33f8cd[_0x5a4afd(0x328)];let _0x2ddb46;for(const _0x580570 of _0x2e4af1){if(_0x580570[_0x5a4afd(0x229)]?.[_0x5a4afd(0x1fb)](_0x3d6550=>_0x3d6550['id']===_0x252cd3)){_0x2ddb46=_0x580570['id'];break;}}if(!_0x2ddb46)return console[_0x5a4afd(0x214)](_0x5a4afd(0x1c3)+_0x252cd3+_0x5a4afd(0x259)),0x1;const _0x3169e2=await withSpinner(_0x5a4afd(0x1a1)+_0x252cd3+_0x5a4afd(0x25a),()=>_0x3bfb40[_0x5a4afd(0x16d)][_0x5a4afd(0x218)](_0x21dbfb,_0x2ddb46,_0x252cd3),{'verbose':_0x8eb121[_0x5a4afd(0x316)]}),_0x49751a=_0x3169e2[_0x5a4afd(0x328)];return console[_0x5a4afd(0x214)](_0x5a4afd(0x2c1)+(_0x49751a[_0x5a4afd(0x1eb)]||_0x252cd3)+'\x27'),await handleSDKOutput([_0x49751a],_0x8eb121),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]=a31_0x121f5f(0x191);[a31_0x121f5f(0x236)]=a31_0x121f5f(0x234);async[a31_0x121f5f(0x262)](_0x1862b1){const _0x1c5eb7=a31_0x121f5f,{options:_0x507f65,args:_0x5e73b7,tdx:_0x39664a}=_0x1862b1,_0x4615bb=_0x5e73b7[0x0]||_0x507f65['parentSegment'];if(!_0x4615bb)return showParentSegmentNotSetError(_0x1c5eb7(0x224)+_0x1c5eb7(0x1b7)),0x1;const _0x4b88fb=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x4615bb+_0x1c5eb7(0x25a),()=>_0x39664a[_0x1c5eb7(0x283)][_0x1c5eb7(0x22a)](_0x4615bb),{'verbose':_0x507f65[_0x1c5eb7(0x316)]}),_0x363c0d=_0x4b88fb[_0x1c5eb7(0x328)],_0x517f65=await withSpinner(_0x1c5eb7(0x194)+_0x4615bb+_0x1c5eb7(0x25a),()=>_0x39664a[_0x1c5eb7(0x16d)][_0x1c5eb7(0x35b)](_0x363c0d),{'verbose':_0x507f65['verbose']}),_0x278862=_0x517f65['data'];console['error'](_0x1c5eb7(0x24b)+_0x278862[_0x1c5eb7(0x2c4)]+_0x1c5eb7(0x1e5)+(_0x278862[_0x1c5eb7(0x2c4)]!==0x1?'s':''));if(_0x507f65['format']===_0x1c5eb7(0x2cc)||_0x507f65['format']===_0x1c5eb7(0x2c3))await handleSDKOutput(_0x278862,_0x507f65);else{if(_0x278862['length']===0x0)console[_0x1c5eb7(0x193)](_0x1c5eb7(0x1ca));else for(const _0x229815 of _0x278862){console['log'](a31_0x4e7eff['bold'](_0x229815[_0x1c5eb7(0x1eb)])+'\x20'+a31_0x4e7eff[_0x1c5eb7(0x1b3)](_0x1c5eb7(0x35f)+_0x229815['id']+')'));_0x229815[_0x1c5eb7(0x236)]&&console[_0x1c5eb7(0x193)]('\x20\x20'+a31_0x4e7eff[_0x1c5eb7(0x1b3)](_0x229815[_0x1c5eb7(0x236)]));const _0x37a9cd=_0x229815['sections']?.[_0x1c5eb7(0x2c4)]||0x0;console['log']('\x20\x20'+a31_0x4e7eff['cyan'](_0x1c5eb7(0x2f4))+'\x20'+_0x37a9cd);if(_0x229815[_0x1c5eb7(0x198)]&&_0x229815[_0x1c5eb7(0x198)][_0x1c5eb7(0x2c4)]>0x0)for(const _0x54697d of _0x229815[_0x1c5eb7(0x198)]){console[_0x1c5eb7(0x193)](_0x1c5eb7(0x1e3)+_0x54697d[_0x1c5eb7(0x1eb)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]=a31_0x121f5f(0x1ad);[a31_0x121f5f(0x236)]=a31_0x121f5f(0x239);async[a31_0x121f5f(0x262)](_0x504529){const _0x1a8136=a31_0x121f5f,{options:_0x2fe7da,args:_0x5f184f,tdx:_0x339f02}=_0x504529,_0x1d2a03=_0x5f184f[0x0];if(!_0x1d2a03)return console[_0x1a8136(0x214)](_0x1a8136(0x33f)),console[_0x1a8136(0x214)](_0x1a8136(0x2ef)),0x1;const _0x2f0d47=await withSpinner(_0x1a8136(0x1bf)+_0x1d2a03+_0x1a8136(0x25a),()=>_0x339f02[_0x1a8136(0x16d)]['getPersonalization'](_0x1d2a03),{'verbose':_0x2fe7da[_0x1a8136(0x316)]}),_0x5968c5=_0x2f0d47['data'];console[_0x1a8136(0x214)]('✔\x20Found\x20personalization\x20\x27'+_0x5968c5[_0x1a8136(0x1eb)]+'\x27');if(_0x2fe7da['format']===_0x1a8136(0x2cc)||_0x2fe7da[_0x1a8136(0x2c0)]===_0x1a8136(0x2c3))await handleSDKOutput([_0x5968c5],_0x2fe7da);else{console[_0x1a8136(0x193)](a31_0x4e7eff[_0x1a8136(0x359)](_0x5968c5[_0x1a8136(0x1eb)])+'\x20'+a31_0x4e7eff[_0x1a8136(0x1b3)](_0x1a8136(0x35f)+_0x5968c5['id']+')'));_0x5968c5[_0x1a8136(0x236)]&&console[_0x1a8136(0x193)]('\x20\x20'+a31_0x4e7eff[_0x1a8136(0x1b3)](_0x5968c5[_0x1a8136(0x236)]));_0x5968c5['audienceId']&&console['log']('\x20\x20'+a31_0x4e7eff[_0x1a8136(0x1c2)](_0x1a8136(0x370))+'\x20'+_0x5968c5[_0x1a8136(0x18a)]);console[_0x1a8136(0x193)]('\x20\x20'+a31_0x4e7eff['cyan'](_0x1a8136(0x335))+'\x20'+_0x5968c5[_0x1a8136(0x356)]),console[_0x1a8136(0x193)]('\x20\x20'+a31_0x4e7eff[_0x1a8136(0x1c2)](_0x1a8136(0x290))+'\x20'+_0x5968c5[_0x1a8136(0x252)]);const _0x59ece7=_0x5968c5['sections']?.['length']||0x0;console[_0x1a8136(0x193)]('\x20\x20'+a31_0x4e7eff[_0x1a8136(0x1c2)]('sections:')+'\x20'+_0x59ece7);if(_0x5968c5[_0x1a8136(0x198)]&&_0x5968c5['sections'][_0x1a8136(0x2c4)]>0x0)for(const _0x57cd6b of _0x5968c5[_0x1a8136(0x198)]){console[_0x1a8136(0x193)](_0x1a8136(0x18d)+a31_0x4e7eff['bold'](_0x57cd6b[_0x1a8136(0x1eb)])+'\x20'+a31_0x4e7eff[_0x1a8136(0x1b3)](_0x1a8136(0x35f)+_0x57cd6b['id']+')')),_0x57cd6b[_0x1a8136(0x2ad)]&&(console[_0x1a8136(0x193)]('\x20\x20\x20\x20\x20\x20'+a31_0x4e7eff[_0x1a8136(0x1c2)](_0x1a8136(0x2ff))+'\x20'+_0x57cd6b[_0x1a8136(0x2ad)][_0x1a8136(0x1eb)]),_0x57cd6b['entryCriteria']['keyEventCriteria']?.[_0x1a8136(0x186)]&&console[_0x1a8136(0x193)]('\x20\x20\x20\x20\x20\x20\x20\x20'+a31_0x4e7eff[_0x1a8136(0x1c2)](_0x1a8136(0x33c))+'\x20'+_0x57cd6b[_0x1a8136(0x2ad)][_0x1a8136(0x2da)][_0x1a8136(0x186)])),_0x57cd6b[_0x1a8136(0x2b2)]&&console[_0x1a8136(0x193)]('\x20\x20\x20\x20\x20\x20'+a31_0x4e7eff['cyan'](_0x1a8136(0x204))+'\x20'+JSON[_0x1a8136(0x2c2)](_0x57cd6b[_0x1a8136(0x2b2)])),_0x57cd6b[_0x1a8136(0x342)]&&console['log'](_0x1a8136(0x34e)+a31_0x4e7eff['cyan'](_0x1a8136(0x336))+'\x20true');}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]='ps:pz:delete';[a31_0x121f5f(0x236)]='Delete\x20a\x20realtime\x20personalization';async['execute'](_0x56db22){const _0xff9e10=a31_0x121f5f,{options:_0x3224cf,args:_0x2493a7,tdx:_0x4321dc}=_0x56db22,_0x4697b9=_0x2493a7[0x0];if(!_0x4697b9)return console[_0xff9e10(0x214)](_0xff9e10(0x33f)),console[_0xff9e10(0x214)]('Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>'),0x1;return await withSpinner(_0xff9e10(0x2aa)+_0x4697b9+_0xff9e10(0x25a),()=>_0x4321dc[_0xff9e10(0x16d)][_0xff9e10(0x26c)](_0x4697b9),{'verbose':_0x3224cf[_0xff9e10(0x316)]}),console[_0xff9e10(0x214)](_0xff9e10(0x27e)+_0x4697b9+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]='ps:pz:create';[a31_0x121f5f(0x236)]='Create\x20a\x20realtime\x20personalization\x20entity';async[a31_0x121f5f(0x262)](_0x319b30){const _0x36391d=a31_0x121f5f,{options:_0x5df544,tdx:_0x4aa064}=_0x319b30,_0x1916fc=_0x5df544;let _0x2fe90f;if(_0x1916fc[_0x36391d(0x1f5)]){_0x2fe90f=await loadJSON(_0x1916fc['file'],!![]);if(!_0x2fe90f['relationships']?.[_0x36391d(0x348)])return console[_0x36391d(0x214)](_0x36391d(0x36e)),console[_0x36391d(0x214)]('Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:'),console[_0x36391d(0x214)](_0x36391d(0x274)),0x1;}else{if(!_0x1916fc[_0x36391d(0x1eb)])return console[_0x36391d(0x214)](_0x36391d(0x18b)),console['error'](_0x36391d(0x2b1)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x1916fc['description']===undefined)return console[_0x36391d(0x214)](_0x36391d(0x295)),console[_0x36391d(0x214)](_0x36391d(0x2b1)),console['error'](_0x36391d(0x307)),0x1;if(_0x1916fc[_0x36391d(0x2c6)]===undefined)return console[_0x36391d(0x214)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console['error'](_0x36391d(0x275)),0x1;let _0x2cf108=_0x1916fc[_0x36391d(0x18a)];if(!_0x2cf108&&_0x5df544[_0x36391d(0x312)]){const _0xfa632e=await withSpinner(_0x36391d(0x2e4)+_0x5df544[_0x36391d(0x312)]+_0x36391d(0x25a),()=>_0x4aa064[_0x36391d(0x283)][_0x36391d(0x22a)](_0x5df544['parentSegment']),{'verbose':_0x5df544[_0x36391d(0x316)]});_0x2cf108=_0xfa632e['data'];}let _0x46bbab;_0x1916fc[_0x36391d(0x198)]&&(_0x46bbab=await loadJSON(_0x1916fc[_0x36391d(0x198)],![]));const _0x29d585=_0x1916fc['folderId']===_0x36391d(0x32a)?null:{'id':_0x1916fc[_0x36391d(0x2c6)],'type':_0x36391d(0x197)};_0x2fe90f={'attributes':{'name':_0x1916fc[_0x36391d(0x1eb)],'description':_0x1916fc['description']||null,..._0x2cf108!==undefined&&{'audienceId':_0x2cf108},..._0x46bbab!==undefined&&{'sections':_0x46bbab}},'relationships':{'parentFolder':{'data':_0x29d585}}};}const _0x58e8f0=await withSpinner('Creating\x20personalization\x20\x27'+(_0x2fe90f[_0x36391d(0x2d0)]?.[_0x36391d(0x1eb)]??'')+_0x36391d(0x25a),()=>_0x4aa064[_0x36391d(0x16d)][_0x36391d(0x23e)](_0x2fe90f),{'verbose':_0x5df544['verbose']}),_0x4775ae=_0x58e8f0[_0x36391d(0x328)];return console[_0x36391d(0x214)](_0x36391d(0x2f1)+_0x4775ae[_0x36391d(0x1eb)]+_0x36391d(0x21a)+_0x4775ae['id']),await handleSDKOutput([_0x4775ae],_0x5df544),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x121f5f(0x1eb)]=a31_0x121f5f(0x20a);[a31_0x121f5f(0x236)]='Update\x20a\x20realtime\x20personalization\x20entity';async[a31_0x121f5f(0x262)](_0x1e50b5){const _0x1773b3=a31_0x121f5f,{options:_0x32ae31,args:_0x45df4b}=_0x1e50b5,_0x3d4df6=_0x32ae31,_0x2372c5=_0x45df4b[0x0];if(!_0x2372c5)return console[_0x1773b3(0x214)]('Error:\x20Personalization\x20ID\x20is\x20required'),console['error'](_0x1773b3(0x2a1)),console[_0x1773b3(0x214)](_0x1773b3(0x1df)),0x1;let _0x51bcf1;if(_0x3d4df6[_0x1773b3(0x1f5)])_0x51bcf1=await loadJSON(_0x3d4df6[_0x1773b3(0x1f5)],!![]);else{if(!_0x3d4df6[_0x1773b3(0x1eb)])return console['error'](_0x1773b3(0x18b)),console[_0x1773b3(0x214)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;if(_0x3d4df6[_0x1773b3(0x236)]===undefined)return console[_0x1773b3(0x214)](_0x1773b3(0x295)),console[_0x1773b3(0x214)](_0x1773b3(0x2a1)),0x1;let _0x5aad5b;_0x3d4df6[_0x1773b3(0x198)]&&(_0x5aad5b=await loadJSON(_0x3d4df6[_0x1773b3(0x198)],![])),_0x51bcf1={'attributes':{'name':_0x3d4df6[_0x1773b3(0x1eb)],'description':_0x3d4df6[_0x1773b3(0x236)]||null,..._0x5aad5b!==undefined&&{'sections':_0x5aad5b}}};}const {tdx:_0x54eefc}=_0x1e50b5,_0x41a2f5=await withSpinner('Patching\x20personalization\x20\x27'+_0x2372c5+_0x1773b3(0x25a),()=>_0x54eefc[_0x1773b3(0x16d)]['patchPersonalization'](_0x2372c5,_0x51bcf1),{'verbose':_0x32ae31[_0x1773b3(0x316)]}),_0x2cbcef=_0x41a2f5[_0x1773b3(0x328)];return console['error'](_0x1773b3(0x379)+_0x2cbcef[_0x1773b3(0x1eb)]+'\x27\x20(id:\x20'+_0x2cbcef['id']+')'),await handleSDKOutput([_0x2cbcef],_0x32ae31),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']='ps:pz:init';['description']=a31_0x121f5f(0x1d9);async[a31_0x121f5f(0x262)](_0x3d0759){const _0xe22107=a31_0x121f5f,{options:_0x66193f,args:_0x52a786}=_0x3d0759,_0x4119e3=_0x52a786[0x0]||_0x66193f['parentSegment'];if(!_0x4119e3)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a'+_0xe22107(0x310)),0x1;const _0x542d02=resolveYamlFile(_0x4119e3);if(!existsSync(_0x542d02))return showFileNotFoundError(_0x542d02,_0x4119e3),0x1;let _0x2128ae;try{_0x2128ae=readFileSync(_0x542d02,_0xe22107(0x1d6));}catch(_0x4e6afc){const _0x31020c=_0x4e6afc instanceof Error?_0x4e6afc[_0xe22107(0x1c0)]:String(_0x4e6afc);return console[_0xe22107(0x214)]('Error\x20reading\x20file:\x20'+_0x31020c),0x1;}let _0x183da0;try{_0x183da0=parseDef(_0x2128ae);}catch(_0x4b3a50){const _0x29c058=_0x4b3a50 instanceof Error?_0x4b3a50['message']:String(_0x4b3a50);return console[_0xe22107(0x214)](a31_0x4e7eff[_0xe22107(0x277)](_0xe22107(0x351)+_0x29c058)),0x1;}if(_0x183da0['personalization_services']&&_0x183da0[_0xe22107(0x23b)][_0xe22107(0x2c4)]>0x0)return console[_0xe22107(0x214)](a31_0x4e7eff['yellow'](_0xe22107(0x2be)+_0x542d02)),console['error'](a31_0x4e7eff[_0xe22107(0x1b3)](_0xe22107(0x2a3)+_0x183da0[_0xe22107(0x23b)][_0xe22107(0x2c4)]+_0xe22107(0x2a9))),0x1;!_0x183da0[_0xe22107(0x177)]&&(_0x183da0[_0xe22107(0x177)]={'events':[{'name':_0xe22107(0x288),'source_table':'<database>.<table>'}],'attributes':[{'name':_0xe22107(0x2fe),'type':_0xe22107(0x354)}],'id_stitching':{'primary_key':_0x183da0[_0xe22107(0x21b)][_0xe22107(0x18c)]===_0xe22107(0x1d0)?_0xe22107(0x265):_0xe22107(0x35d)}});_0x183da0[_0xe22107(0x23b)]=[{'name':'My\x20Service','description':'Personalization\x20service\x20description','trigger_event':'page_view','sections':[{'name':_0xe22107(0x241),'criteria':_0xe22107(0x230),'attributes':[_0xe22107(0x2fe)]}]}];const _0x392bbb=serializeDef(_0x183da0);return writeFileSync(_0x542d02,_0x392bbb,_0xe22107(0x1d6)),console[_0xe22107(0x214)](a31_0x4e7eff[_0xe22107(0x29e)]('✔')+_0xe22107(0x258)+a31_0x4e7eff[_0xe22107(0x1c2)](_0x542d02)),(!_0x183da0[_0xe22107(0x177)]||_0x2128ae[_0xe22107(0x2ac)]('realtime:')===-0x1)&&console[_0xe22107(0x214)](a31_0x4e7eff[_0xe22107(0x29e)]('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console[_0xe22107(0x214)]('\x0a'+a31_0x4e7eff[_0xe22107(0x1b3)](_0xe22107(0x196))),console[_0xe22107(0x214)](_0xe22107(0x1f8)+_0x542d02+_0xe22107(0x2d8)),console[_0xe22107(0x214)](_0xe22107(0x1a9)+a31_0x4e7eff['dim']('tdx\x20ps\x20push\x20'+_0x4119e3)+'\x20to\x20push\x20the\x20configuration'),0x0;}}