@treasuredata/tdx 2026.3.45 → 2026.3.47

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 (242) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/auth-login-command.js +1 -1
  11. package/dist/commands/cas-command.js +1 -1
  12. package/dist/commands/cas-segment-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-statusline-command.js +1 -1
  16. package/dist/commands/claude-usage-command.js +1 -1
  17. package/dist/commands/command.js +1 -1
  18. package/dist/commands/connection-command.js +1 -1
  19. package/dist/commands/databases.js +1 -1
  20. package/dist/commands/delivery-command.js +1 -1
  21. package/dist/commands/describe.js +1 -1
  22. package/dist/commands/engage-campaign-pull-command.js +1 -1
  23. package/dist/commands/engage-campaign-push-command.js +1 -1
  24. package/dist/commands/engage-campaign-validate-command.js +1 -1
  25. package/dist/commands/engage-command.js +1 -1
  26. package/dist/commands/engage-template-pull-command.js +1 -1
  27. package/dist/commands/engage-template-push-command.js +1 -1
  28. package/dist/commands/engage-template-validate-command.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/journey-command.js +1 -1
  31. package/dist/commands/journey-validate-command.js +1 -1
  32. package/dist/commands/llm-command.js +1 -1
  33. package/dist/commands/mcp-command.js +1 -1
  34. package/dist/commands/parent-segment-command.js +1 -1
  35. package/dist/commands/policy-command.js +1 -1
  36. package/dist/commands/profile-command.js +1 -1
  37. package/dist/commands/profiles-command.js +1 -1
  38. package/dist/commands/query-command.js +1 -1
  39. package/dist/commands/schedule-command.js +1 -1
  40. package/dist/commands/segment-command.js +1 -1
  41. package/dist/commands/segment-create-command.js +1 -1
  42. package/dist/commands/segment-fields-command.js +1 -1
  43. package/dist/commands/segment-pull-command.js +1 -1
  44. package/dist/commands/segment-push-command.js +1 -1
  45. package/dist/commands/segment-update-command.js +1 -1
  46. package/dist/commands/segment-use-command.js +1 -1
  47. package/dist/commands/segment-validate-command.js +1 -1
  48. package/dist/commands/segments.js +1 -1
  49. package/dist/commands/show.js +1 -1
  50. package/dist/commands/status-command.js +1 -1
  51. package/dist/commands/tables.js +1 -1
  52. package/dist/commands/unset-command.js +1 -1
  53. package/dist/commands/upgrade-command.js +1 -1
  54. package/dist/commands/use-command.js +1 -1
  55. package/dist/commands/user-command.js +1 -1
  56. package/dist/commands/work-command.js +1 -1
  57. package/dist/commands/workflow-command.js +1 -1
  58. package/dist/core/auth.js +1 -1
  59. package/dist/core/command-output.js +1 -1
  60. package/dist/core/config.js +1 -1
  61. package/dist/core/connection-cache.js +1 -1
  62. package/dist/core/constants.js +1 -1
  63. package/dist/core/credential-cache.js +1 -1
  64. package/dist/core/global-context.js +1 -1
  65. package/dist/core/keychain.js +1 -1
  66. package/dist/core/oauth-keychain.js +1 -1
  67. package/dist/core/oauth.js +1 -1
  68. package/dist/core/profile.js +1 -1
  69. package/dist/core/project-config.js +1 -1
  70. package/dist/core/session.js +1 -1
  71. package/dist/core/user-cache.js +1 -1
  72. package/dist/core/version.js +1 -1
  73. package/dist/index.js +1 -1
  74. package/dist/mcp/server.js +1 -1
  75. package/dist/mcp/tools/index.js +1 -1
  76. package/dist/mcp/tools/tdx-run.js +1 -1
  77. package/dist/mcp/tools/tdx-search.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/execute-items/TASK.md +62 -0
  182. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/execute-items/schedule.yaml +20 -0
  183. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/TASK.md +106 -0
  184. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/schedule.yaml +18 -0
  185. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
  186. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
  187. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
  188. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
  189. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/TASK.md +21 -0
  190. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/schedule.yaml +14 -0
  191. package/dist/sdk/workspace/builtin-schedules/execute-items/TASK.md +62 -0
  192. package/dist/sdk/workspace/builtin-schedules/execute-items/schedule.yaml +20 -0
  193. package/dist/sdk/workspace/builtin-schedules/item-triage/TASK.md +106 -0
  194. package/dist/sdk/workspace/builtin-schedules/item-triage/schedule.yaml +18 -0
  195. package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
  196. package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
  197. package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
  198. package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
  199. package/dist/sdk/workspace/builtin-schedules/weekly-review/TASK.md +21 -0
  200. package/dist/sdk/workspace/builtin-schedules/weekly-review/schedule.yaml +14 -0
  201. package/dist/sdk/workspace/frontmatter.js +1 -1
  202. package/dist/sdk/workspace/git.js +1 -1
  203. package/dist/sdk/workspace/index.d.ts +5 -1
  204. package/dist/sdk/workspace/index.d.ts.map +1 -1
  205. package/dist/sdk/workspace/index.js +1 -1
  206. package/dist/sdk/workspace/index.js.map +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/spinner.js +1 -1
  237. package/dist/utils/sse-parser.js +1 -1
  238. package/dist/utils/string-utils.js +1 -1
  239. package/dist/utils/table-ref-parser.js +1 -1
  240. package/dist/utils/tdx-logger.js +1 -1
  241. package/dist/utils/version-check.js +1 -1
  242. package/package.json +2 -2
@@ -1 +1 @@
1
- const a32_0x543316=a32_0x23b6;(function(_0x54d8a0,_0x178b7c){const _0x15413d=a32_0x23b6,_0x559664=_0x54d8a0();while(!![]){try{const _0x399193=parseInt(_0x15413d(0xa9))/0x1*(-parseInt(_0x15413d(0x191))/0x2)+-parseInt(_0x15413d(0x230))/0x3*(parseInt(_0x15413d(0xb6))/0x4)+parseInt(_0x15413d(0xdd))/0x5*(-parseInt(_0x15413d(0xd7))/0x6)+-parseInt(_0x15413d(0x22e))/0x7*(-parseInt(_0x15413d(0xa6))/0x8)+parseInt(_0x15413d(0x283))/0x9+parseInt(_0x15413d(0x1b3))/0xa*(-parseInt(_0x15413d(0x1f8))/0xb)+parseInt(_0x15413d(0x112))/0xc;if(_0x399193===_0x178b7c)break;else _0x559664['push'](_0x559664['shift']());}catch(_0x1b457d){_0x559664['push'](_0x559664['shift']());}}}(a32_0x5a41,0x2272e));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a32_0x30de80 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';function a32_0x23b6(_0x938060,_0x58b24f){_0x938060=_0x938060-0x86;const _0x5a410e=a32_0x5a41();let _0x23b6db=_0x5a410e[_0x938060];return _0x23b6db;}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 a32_0x5f3fce 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=a32_0x543316(0x269),LEGACY_PARENT_SEGMENT_DIR=a32_0x543316(0x146);function openBrowser(_0x2e3468){const _0x548255=a32_0x543316,_0x1104a3=process['platform'],_0x41c374=_0x1104a3==='darwin'?_0x548255(0xc4):_0x1104a3==='win32'?_0x548255(0x207):'xdg-open';spawn(_0x41c374,[_0x2e3468],{'detached':!![],'stdio':_0x548255(0x1f2)})[_0x548255(0x1c5)]();}function migrateLegacyDirectory(){const _0x8ce4cb=a32_0x543316;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x44ffe2=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x44ffe2[_0x8ce4cb(0x1ca)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x8ce4cb(0x29e)](a32_0x5f3fce[_0x8ce4cb(0x8b)]('\x0a⚠️\x20\x20Both\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x8ce4cb(0x289)+PARENT_SEGMENT_DIR+_0x8ce4cb(0x266))),console[_0x8ce4cb(0x29e)](a32_0x5f3fce[_0x8ce4cb(0x282)](_0x8ce4cb(0x1c3)+LEGACY_PARENT_SEGMENT_DIR+_0x8ce4cb(0x1f4))),![];console[_0x8ce4cb(0x29e)](a32_0x5f3fce['yellow'](_0x8ce4cb(0x222)+LEGACY_PARENT_SEGMENT_DIR+_0x8ce4cb(0x1a4)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x8ce4cb(0x29e)](a32_0x5f3fce[_0x8ce4cb(0x277)]('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x1439f3){const _0x58f9ce=_0x1439f3 instanceof Error?_0x1439f3[_0x8ce4cb(0xed)]:String(_0x1439f3);return console['error'](a32_0x5f3fce[_0x8ce4cb(0xbf)](_0x8ce4cb(0x185)+_0x58f9ce+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async['run'](_0x53b17c){const _0x26dda6=a32_0x543316;return migrateLegacyDirectory(),super[_0x26dda6(0x137)](_0x53b17c);}}function resolveYamlFile(_0x3613b8){const _0x63d0d2=a32_0x543316;if(_0x3613b8[_0x63d0d2(0x196)](_0x63d0d2(0x114))||_0x3613b8[_0x63d0d2(0x196)](_0x63d0d2(0xb7)))return _0x3613b8;return a32_0x30de80[_0x63d0d2(0x13e)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x3613b8)+'.yml');}function formatProgressMessage(_0x53673e){const _0x1a0ef0=a32_0x543316,_0x5c7b04=_0x53673e[_0x1a0ef0(0xef)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x5c7b04){const [,_0x1bd544,_0x304ef5,_0x14843e='']=_0x5c7b04;return a32_0x5f3fce[_0x1a0ef0(0x282)](_0x1bd544+':')+'\x20'+_0x304ef5+a32_0x5f3fce[_0x1a0ef0(0x282)](_0x14843e);}return a32_0x5f3fce[_0x1a0ef0(0x282)](_0x53673e);}function showFileNotFoundError(_0x8ac9e2,_0xb42503){const _0x499a48=a32_0x543316;console[_0x499a48(0x29e)](a32_0x5f3fce['red']('Error:\x20File\x20not\x20found:\x20'+_0x8ac9e2+'\x0a')),console[_0x499a48(0x29e)](a32_0x5f3fce['cyan'](_0x499a48(0x8e)+_0xb42503+_0x499a48(0x1ea)));}function displayRealtimeValidation(_0xc79517){const _0x4e8c70=a32_0x543316;if(!_0xc79517[_0x4e8c70(0x256)])return;const _0x1c294f=_0xc79517[_0x4e8c70(0x256)],_0xc9f260=_0x1c294f[_0x4e8c70(0x1d1)]?a32_0x5f3fce[_0x4e8c70(0x277)]('⚡\x20Enabled'):a32_0x5f3fce['yellow'](_0x4e8c70(0x1d3));console['error']('\x0a'+a32_0x5f3fce[_0x4e8c70(0x282)]('RT\x202.0:')+'\x20'+_0xc9f260);if(_0x1c294f[_0x4e8c70(0x1b9)]&&_0x1c294f['events'][_0x4e8c70(0x165)]>0x0){console['error']('\x20\x20'+a32_0x5f3fce[_0x4e8c70(0x282)]('Events:')+'\x20'+_0x1c294f[_0x4e8c70(0x1b9)]['length']+_0x4e8c70(0xab));for(const _0x56581e of _0x1c294f[_0x4e8c70(0x1b9)]){const _0x985041=_0x56581e[_0x4e8c70(0x1b8)]===![]?a32_0x5f3fce[_0x4e8c70(0xbf)]('✘'):a32_0x5f3fce[_0x4e8c70(0x277)]('✔');console[_0x4e8c70(0x29e)]('\x20\x20\x20\x20'+_0x985041+'\x20'+_0x56581e['name']),_0x56581e[_0x4e8c70(0x22f)]&&console[_0x4e8c70(0x29e)](_0x4e8c70(0x147)+a32_0x5f3fce['red'](_0x56581e[_0x4e8c70(0x22f)]));}}if(_0x1c294f[_0x4e8c70(0x236)]&&_0x1c294f['attributes']['length']>0x0){console[_0x4e8c70(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x4e8c70(0x282)](_0x4e8c70(0xf9))+'\x20'+_0x1c294f['attributes']['length']+'\x20configured');for(const _0xa2fe74 of _0x1c294f[_0x4e8c70(0x236)]){const _0x201a10=_0xa2fe74[_0x4e8c70(0x22c)]?a32_0x5f3fce[_0x4e8c70(0x277)]('✔'):a32_0x5f3fce[_0x4e8c70(0xbf)]('✘');console['error']('\x20\x20\x20\x20'+_0x201a10+'\x20'+_0xa2fe74[_0x4e8c70(0x243)]+'\x20'+a32_0x5f3fce['dim']('('+_0xa2fe74[_0x4e8c70(0x86)]+')'));}}if(_0x1c294f[_0x4e8c70(0x20f)]){const _0x299948=_0x1c294f[_0x4e8c70(0x20f)][_0x4e8c70(0xe1)]?.[_0x4e8c70(0x165)]?_0x4e8c70(0xd6)+_0x1c294f[_0x4e8c70(0x20f)][_0x4e8c70(0xe1)][_0x4e8c70(0x13e)](',\x20')+']':'';console[_0x4e8c70(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x4e8c70(0x282)]('ID\x20Stitching:')+'\x20'+_0x1c294f[_0x4e8c70(0x20f)][_0x4e8c70(0x16a)]+_0x299948);}if(_0x1c294f[_0x4e8c70(0x263)]&&_0x1c294f[_0x4e8c70(0x263)][_0x4e8c70(0x165)]>0x0){console[_0x4e8c70(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x4e8c70(0x282)](_0x4e8c70(0x1fb))+'\x20'+_0x1c294f[_0x4e8c70(0x263)]['length']+_0x4e8c70(0x128)+(_0x1c294f[_0x4e8c70(0x263)][_0x4e8c70(0x165)]!==0x1?'s':''));for(const _0x39ec1b of _0x1c294f[_0x4e8c70(0x263)]){console['error'](_0x4e8c70(0x1f9)+_0x39ec1b[_0x4e8c70(0x243)]);}}}function showParentSegmentNotSetError(_0x3ef82b){const _0x53f843=a32_0x543316;console['error'](a32_0x5f3fce[_0x53f843(0x8b)](_0x53f843(0x153))),console['error'](_0x3ef82b);}export class ParentSegmentListCommand extends BaseCommand{[a32_0x543316(0x243)]='segment:parent:list';[a32_0x543316(0xd1)]='List\x20parent\x20segments';async[a32_0x543316(0x130)](_0x35d1f1){const _0x4a3916=a32_0x543316,{options:_0x5166db,args:_0x20f654,tdx:_0x1c57f8}=_0x35d1f1,_0x5ed395=_0x20f654[0x0];_0x5166db['verbose']&&(console[_0x4a3916(0x29e)](_0x4a3916(0x261)+_0x5166db[_0x4a3916(0xc5)]),_0x5ed395&&console[_0x4a3916(0x29e)](_0x4a3916(0x227)+_0x5ed395));const _0x1c01c9=await withSpinner(_0x5ed395?_0x4a3916(0x211)+_0x5ed395+'\x27...':'Listing\x20parent\x20segments...',()=>_0x1c57f8[_0x4a3916(0x162)][_0x4a3916(0x1bd)](),{'verbose':_0x5166db[_0x4a3916(0x221)]});let _0x186218=_0x1c01c9[_0x4a3916(0x213)];if(_0x5ed395){const _0x5cf35a=_0x5ed395[_0x4a3916(0xa7)](/[.+^${}()|[\]\\]/g,_0x4a3916(0x20a))[_0x4a3916(0xa7)](/\*/g,'.*')[_0x4a3916(0xa7)](/\?/g,'.'),_0x2634e7=new RegExp('^'+_0x5cf35a+'$','i');_0x186218=_0x186218[_0x4a3916(0x27c)](_0x4c850b=>_0x2634e7[_0x4a3916(0x1f3)](_0x4c850b[_0x4a3916(0x236)][_0x4a3916(0x243)]));}_0x186218['sort']((_0x188d18,_0x34cdc4)=>_0x188d18[_0x4a3916(0x236)][_0x4a3916(0x243)][_0x4a3916(0x13b)](_0x34cdc4['attributes'][_0x4a3916(0x243)])),console[_0x4a3916(0x29e)](_0x4a3916(0x19b)+_0x186218[_0x4a3916(0x165)]+_0x4a3916(0xa3)+(_0x186218[_0x4a3916(0x165)]!==0x1?'s':''));const _0x39c28a=_0x10100f=>{const _0x163a1b=_0x4a3916;return getConsoleNextUrl(_0x5166db[_0x163a1b(0xc5)],_0x163a1b(0xf7)+_0x10100f);};if(_0x5166db['format']===_0x4a3916(0x251)||_0x5166db[_0x4a3916(0x117)]===_0x4a3916(0x19d)){const _0x58c406=_0x186218[_0x4a3916(0xf4)](_0x597a98=>({..._0x597a98,'url':_0x39c28a(_0x597a98['id'])}));await handleSDKOutput(_0x58c406,_0x5166db);}else{if(_0x186218[_0x4a3916(0x165)]===0x0)_0x5ed395?console[_0x4a3916(0x1e2)](_0x4a3916(0xd2)+_0x5ed395):console['log'](_0x4a3916(0x1cd));else for(const _0x227d11 of _0x186218){const _0x279946=_0x227d11['attributes'][_0x4a3916(0xe4)]?a32_0x5f3fce[_0x4a3916(0x282)]('\x20('+formatRows(_0x227d11[_0x4a3916(0x236)][_0x4a3916(0xe4)])+')'):'',_0x110b4f=hyperlink(_0x227d11['attributes'][_0x4a3916(0x243)],_0x39c28a(_0x227d11['id']));console[_0x4a3916(0x1e2)](_0x4a3916(0x159)+_0x110b4f+_0x279946);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a32_0x543316(0x243)]='segment:parent:create';['description']=a32_0x543316(0x188);async[a32_0x543316(0x130)](_0x4f23ba){const _0xe1ac1=a32_0x543316,{options:_0x42ee72,args:_0x5e1c09,tdx:_0x26177c}=_0x4f23ba;console[_0xe1ac1(0x29e)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a'+_0xe1ac1(0x15d)+_0xe1ac1(0x194));const _0x3fa589=_0x42ee72;if(_0x5e1c09[_0xe1ac1(0x165)]===0x0)return console['error'](a32_0x5f3fce[_0xe1ac1(0xbf)](_0xe1ac1(0x17b))),console['error']('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;const _0x36bd60=_0x5e1c09[0x0];if(!_0x3fa589['database']||!_0x3fa589[_0xe1ac1(0xba)])return console['error']('Error:\x20--database\x20and\x20--table\x20are\x20required'),console['error'](_0xe1ac1(0x24b)),0x1;_0x3fa589[_0xe1ac1(0x221)]&&(console[_0xe1ac1(0x29e)](_0xe1ac1(0x261)+_0x3fa589['site']),console[_0xe1ac1(0x29e)](_0xe1ac1(0x171)+_0x36bd60),console[_0xe1ac1(0x29e)](_0xe1ac1(0x1e7)+_0x3fa589['database']),console[_0xe1ac1(0x29e)]('Table:\x20'+_0x3fa589[_0xe1ac1(0xba)]));const _0x4592ae=await loadJSONFromOptions(_0x3fa589[_0xe1ac1(0x236)],_0x3fa589[_0xe1ac1(0x278)]),_0x431792=await loadJSONFromOptions(_0x3fa589[_0xe1ac1(0x127)],_0x3fa589[_0xe1ac1(0x1e1)]),_0x4a600c=await loadJSONFromOptions(_0x3fa589[_0xe1ac1(0x23a)],_0x3fa589[_0xe1ac1(0x12f)]),_0x248462={'name':_0x36bd60,'description':_0x3fa589[_0xe1ac1(0xd1)],'scheduleType':_0x3fa589[_0xe1ac1(0x1aa)],'scheduleOption':_0x3fa589[_0xe1ac1(0x204)],'timezone':_0x3fa589['timezone'],'master':{'parentDatabaseName':_0x3fa589[_0xe1ac1(0x240)],'parentTableName':_0x3fa589[_0xe1ac1(0xba)]},'attributes':_0x4592ae,'behaviors':_0x431792,'customerGroup':_0x4a600c},_0x194c65=await withSpinner(_0xe1ac1(0xd8)+_0x36bd60+_0xe1ac1(0x13f),()=>_0x26177c['segment'][_0xe1ac1(0x1d8)](_0x248462),{'verbose':_0x42ee72[_0xe1ac1(0x221)]}),_0x4ef836=_0x194c65[_0xe1ac1(0x213)];return console[_0xe1ac1(0x29e)](_0xe1ac1(0x12c)+_0x4ef836[_0xe1ac1(0x243)]+_0xe1ac1(0x184)+_0x4ef836['id']),await handleSDKOutput([_0x4ef836],_0x42ee72),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a32_0x543316(0x243)]=a32_0x543316(0x198);[a32_0x543316(0xd1)]=a32_0x543316(0x1de);async[a32_0x543316(0x130)](_0x47e04c){const _0x4e076c=a32_0x543316,{options:_0xcc6f73,args:_0x11fe8a,tdx:_0x5410de}=_0x47e04c;console[_0x4e076c(0x29e)](_0x4e076c(0x116)+_0x4e076c(0x15d)+_0x4e076c(0x194));const _0x5c63c0=_0xcc6f73;if(_0x11fe8a['length']===0x0)return console[_0x4e076c(0x29e)](a32_0x5f3fce[_0x4e076c(0xbf)](_0x4e076c(0x17b))),console[_0x4e076c(0x29e)]('Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]'),0x1;const _0x9524b4=_0x11fe8a[0x0];_0x5c63c0[_0x4e076c(0x221)]&&(console['error']('Site:\x20'+_0x5c63c0[_0x4e076c(0xc5)]),console[_0x4e076c(0x29e)](_0x4e076c(0x225)+_0x9524b4));const _0x41d40f=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x9524b4+_0x4e076c(0x13f),()=>_0x5410de[_0x4e076c(0x162)][_0x4e076c(0x1d9)](_0x9524b4),{'verbose':_0x5c63c0['verbose']}),_0x5da6b4=_0x41d40f[_0x4e076c(0x213)],_0xa6b06=await loadJSONFromOptions(_0x5c63c0[_0x4e076c(0x23f)],_0x5c63c0[_0x4e076c(0x25b)]),_0x4e3d43=await loadJSONFromOptions(_0x5c63c0[_0x4e076c(0x274)],_0x5c63c0[_0x4e076c(0xbc)]),_0x4d7a3a={'name':_0x5da6b4[_0x4e076c(0x243)],'description':_0x5c63c0[_0x4e076c(0xd1)]!==undefined?_0x5c63c0[_0x4e076c(0xd1)]:_0x5da6b4['description'],'scheduleType':_0x5c63c0[_0x4e076c(0x1aa)]!==undefined?_0x5c63c0[_0x4e076c(0x1aa)]:_0x5da6b4[_0x4e076c(0x1aa)],'scheduleOption':_0x5c63c0[_0x4e076c(0x204)]!==undefined?_0x5c63c0['scheduleOption']:_0x5da6b4[_0x4e076c(0x204)],'timezone':_0x5c63c0['timezone']!==undefined?_0x5c63c0[_0x4e076c(0xdc)]:_0x5da6b4[_0x4e076c(0xdc)],'master':_0x5da6b4[_0x4e076c(0x197)],'attributes':_0xa6b06?[..._0x5da6b4[_0x4e076c(0x236)]||[],..._0xa6b06]:_0x5da6b4[_0x4e076c(0x236)],'behaviors':_0x4e3d43?[..._0x5da6b4[_0x4e076c(0x127)]||[],..._0x4e3d43]:_0x5da6b4[_0x4e076c(0x127)],'customerGroup':_0x5da6b4[_0x4e076c(0x23a)]},_0x383591=await withSpinner(_0x4e076c(0x29a)+_0x9524b4+_0x4e076c(0x13f),()=>_0x5410de[_0x4e076c(0x162)][_0x4e076c(0xcc)](_0x9524b4,_0x4d7a3a),{'verbose':_0x5c63c0[_0x4e076c(0x221)]}),_0x450eca=_0x383591[_0x4e076c(0x213)];return console['error'](_0x4e076c(0x255)+_0x450eca[_0x4e076c(0x243)]+'\x27'),await handleSDKOutput([_0x450eca],_0x5c63c0),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']='segment:parent:pull';[a32_0x543316(0xd1)]=a32_0x543316(0x14f);async[a32_0x543316(0x130)](_0x2bca09){const _0x211908=a32_0x543316,{options:_0x958a2d,args:_0x570bd3,tdx:_0x4b81b6}=_0x2bca09,_0x2a0044=_0x958a2d,_0x23445=_0x570bd3[0x0]||_0x958a2d['parentSegment'];if(!_0x23445)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'+_0x211908(0x1e4)),0x1;if(_0x2a0044[_0x211908(0x25a)]&&_0x2a0044['output'])return console[_0x211908(0x29e)](a32_0x5f3fce[_0x211908(0xbf)](_0x211908(0xb5))),console['error'](a32_0x5f3fce[_0x211908(0x282)](_0x211908(0x1a6))),console[_0x211908(0x29e)](a32_0x5f3fce[_0x211908(0x282)](_0x211908(0x1a0)+PARENT_SEGMENT_DIR+_0x211908(0x1fd))),console[_0x211908(0x29e)](a32_0x5f3fce[_0x211908(0x238)](_0x211908(0x1b6))),0x1;const _0x48eba2=_0x2a0044[_0x211908(0x10e)]||a32_0x30de80[_0x211908(0x13e)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x23445)+_0x211908(0x114));_0x2a0044[_0x211908(0x221)]&&(console['error'](_0x211908(0x261)+_0x2a0044['site']),console[_0x211908(0x29e)](_0x211908(0x225)+_0x23445),console[_0x211908(0x29e)](_0x211908(0x217)+_0x48eba2));const _0x29ea36=await withSpinner(_0x211908(0x14c)+_0x23445+'\x27...',()=>_0x4b81b6['segment'][_0x211908(0xc6)](_0x23445),{'verbose':_0x2a0044[_0x211908(0x221)]}),_0x3d2ceb=_0x29ea36[_0x211908(0x213)];if(existsSync(_0x48eba2)){const _0x3a49d3=readFileSync(_0x48eba2,_0x211908(0x1cc)),_0x34671e=generateDiff(_0x3a49d3,_0x3d2ceb);if(!hasChanges(_0x34671e))console[_0x211908(0x29e)](a32_0x5f3fce[_0x211908(0x277)]('✔')+_0x211908(0x149)+a32_0x5f3fce[_0x211908(0x238)](_0x48eba2)+_0x211908(0x11f));else{console[_0x211908(0x29e)](_0x211908(0x1e3)+_0x48eba2+'\x27:'),console[_0x211908(0x29e)]('─'['repeat'](0x3c)),console[_0x211908(0x29e)](formatDiffWithColors(_0x34671e)),console[_0x211908(0x29e)]('─'[_0x211908(0x182)](0x3c));if(!_0x2a0044['yes']){if(!isInteractive())return console[_0x211908(0x29e)](a32_0x5f3fce[_0x211908(0xbf)](_0x211908(0x18d)),_0x211908(0x92)),console['error'](a32_0x5f3fce[_0x211908(0x282)](_0x211908(0x26d))),0x1;const _0x407410=await confirmKey(_0x211908(0x166)+_0x48eba2+'\x27?');if(!_0x407410)return console['error'](a32_0x5f3fce[_0x211908(0x8b)](_0x211908(0x154))),0x1;}writeFileSync(_0x48eba2,_0x3d2ceb,_0x211908(0x1cc)),console[_0x211908(0x29e)](a32_0x5f3fce['green']('✔')+_0x211908(0x1a5)+a32_0x5f3fce['cyan'](_0x48eba2));}}else{const _0x1c9c68=a32_0x30de80['dirname'](_0x48eba2);!existsSync(_0x1c9c68)&&mkdirSync(_0x1c9c68,{'recursive':!![]}),writeFileSync(_0x48eba2,_0x3d2ceb,'utf-8'),console[_0x211908(0x29e)](a32_0x5f3fce[_0x211908(0x277)]('✔')+_0x211908(0x1a5)+a32_0x5f3fce[_0x211908(0x238)](_0x48eba2));}return saveSessionContext({'parent_segment':_0x23445},_0x2a0044['session']),console[_0x211908(0x29e)](a32_0x5f3fce[_0x211908(0x277)]('✔')+'\x20Context\x20set:\x20'+a32_0x5f3fce[_0x211908(0x282)](_0x211908(0x146))+_0x211908(0x15b)+a32_0x5f3fce['cyan'](_0x23445)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{['name']=a32_0x543316(0x22d);[a32_0x543316(0xd1)]='Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file';async[a32_0x543316(0x130)](_0x252fec){const _0x227e11=a32_0x543316,{options:_0x15f741,args:_0x49eaf0,tdx:_0x30126d}=_0x252fec,_0x61da0d=_0x15f741,_0x174f92=_0x49eaf0[0x0]||_0x15f741[_0x227e11(0x1ac)];if(!_0x174f92)return showParentSegmentNotSetError(_0x227e11(0x24d)+_0x227e11(0x16d)),0x1;const _0x4d8be6=resolveYamlFile(_0x174f92);if(!existsSync(_0x4d8be6))return showFileNotFoundError(_0x4d8be6,_0x174f92),0x1;_0x61da0d[_0x227e11(0x221)]&&(console[_0x227e11(0x29e)]('Site:\x20'+_0x61da0d[_0x227e11(0xc5)]),console[_0x227e11(0x29e)](_0x227e11(0x158)+_0x4d8be6));let _0x25807e;try{_0x25807e=readFileSync(_0x4d8be6,_0x227e11(0x1cc));}catch(_0x31a097){const _0x29c3cf=_0x31a097 instanceof Error?_0x31a097[_0x227e11(0xed)]:String(_0x31a097);return console[_0x227e11(0x29e)](_0x227e11(0x1ba)+_0x29c3cf),0x1;}const _0x456157=await withSpinner(_0x227e11(0xe0),()=>_0x30126d[_0x227e11(0x162)][_0x227e11(0x28e)](_0x25807e),{'verbose':_0x61da0d[_0x227e11(0x221)]}),_0x2c6c45=_0x456157[_0x227e11(0x213)],{isNew:_0x9e7cbb,name:_0x2422d2,hasChanges:_0x51fb80,diffFormatted:_0x51f541}=_0x2c6c45;if(!_0x51fb80)return console[_0x227e11(0x29e)](_0x227e11(0x28a)+_0x2422d2+_0x227e11(0xeb)),0x0;_0x9e7cbb?console['error'](_0x227e11(0x9e)+_0x2422d2+'\x27:'):console[_0x227e11(0x29e)](_0x227e11(0x1a3)+_0x2422d2+'\x27:');console[_0x227e11(0x29e)]('─'[_0x227e11(0x182)](0x3c)),console[_0x227e11(0x29e)](_0x51f541),console[_0x227e11(0x29e)]('─'[_0x227e11(0x182)](0x3c));const _0x2e8037=_0x9e7cbb?_0x227e11(0x252)+_0x2422d2+'\x27?':_0x227e11(0x20b)+_0x2422d2+'\x27?';if(!_0x61da0d[_0x227e11(0x110)]){if(!isInteractive())return console[_0x227e11(0x29e)](a32_0x5f3fce[_0x227e11(0xbf)](_0x227e11(0x18d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a32_0x5f3fce[_0x227e11(0x282)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3e6a40=await confirmKey(_0x2e8037);if(!_0x3e6a40)return console[_0x227e11(0x29e)](a32_0x5f3fce[_0x227e11(0x8b)](_0x227e11(0x154))),0x1;}const _0x49f12d=_0x9e7cbb?_0x227e11(0x168):_0x227e11(0x20e),_0x176a95=await withSpinner(_0x49f12d+'\x20parent\x20segment\x20\x27'+_0x2422d2+_0x227e11(0x13f),()=>_0x2c6c45[_0x227e11(0x186)](),{'verbose':_0x61da0d[_0x227e11(0x221)]}),_0x4f2aca=_0x176a95[_0x227e11(0x213)],_0x28de81=getConsoleNextUrl(_0x61da0d['site'],_0x227e11(0xf7)+_0x4f2aca['id']),_0x5ece8e=_0x9e7cbb?_0x227e11(0x133):_0x227e11(0x15f);return console[_0x227e11(0x29e)]('✔\x20'+_0x5ece8e+_0x227e11(0x1cf)+_0x4f2aca[_0x227e11(0x243)]+'\x27'),console[_0x227e11(0x29e)]('\x20\x20'+_0x28de81),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a32_0x543316(0x243)]=a32_0x543316(0xee);[a32_0x543316(0xd1)]=a32_0x543316(0x250);async['execute'](_0x4b124c){const _0x49d470=a32_0x543316,{options:_0x36ddab,args:_0x18d28c,tdx:_0x4c906f}=_0x4b124c,_0x5e1eb4=_0x36ddab,_0x2d0418=_0x18d28c[0x0]||_0x36ddab[_0x49d470(0x1ac)];if(!_0x2d0418)return showParentSegmentNotSetError(_0x49d470(0x1ae)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a'+_0x49d470(0x1df)+_0x49d470(0x15e)+_0x49d470(0x136)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;const _0x696e7b=resolveYamlFile(_0x2d0418);if(!existsSync(_0x696e7b))return showFileNotFoundError(_0x696e7b,_0x2d0418),0x1;_0x5e1eb4['verbose']&&(console[_0x49d470(0x29e)](_0x49d470(0x261)+_0x5e1eb4[_0x49d470(0xc5)]),console[_0x49d470(0x29e)]('YAML\x20file:\x20'+_0x696e7b));let _0x8711a3;try{_0x8711a3=readFileSync(_0x696e7b,_0x49d470(0x1cc));}catch(_0x16e265){const _0xf60b27=_0x16e265 instanceof Error?_0x16e265[_0x49d470(0xed)]:String(_0x16e265);return console['error']('Error\x20reading\x20file:\x20'+_0xf60b27),0x1;}const _0x12de34=createCommandSpinner(a32_0x5f3fce[_0x49d470(0x282)](_0x49d470(0x174)),{'verbose':_0x5e1eb4[_0x49d470(0x221)]});_0x12de34[_0x49d470(0x207)]();const _0x37746e={'onProgress':_0x1d26d5=>{const _0x4ac69d=_0x49d470;_0x12de34[_0x4ac69d(0x233)]=formatProgressMessage(_0x1d26d5);}};if(_0x5e1eb4[_0x49d470(0x197)])_0x37746e[_0x49d470(0x197)]=!![];if(_0x5e1eb4[_0x49d470(0xb8)])_0x37746e[_0x49d470(0xb8)]=!![];_0x5e1eb4['attribute']&&(_0x37746e[_0x49d470(0x106)]=_0x5e1eb4[_0x49d470(0x106)]);_0x5e1eb4['behavior']&&(_0x37746e[_0x49d470(0x172)]=_0x5e1eb4[_0x49d470(0x172)]);if(_0x5e1eb4['interval'])_0x37746e['interval']=_0x5e1eb4['interval'];let _0x2991f7;try{_0x2991f7=await _0x4c906f[_0x49d470(0x162)][_0x49d470(0x26a)](_0x8711a3,_0x37746e),_0x12de34[_0x49d470(0x1c2)]();}catch(_0x5d8888){_0x12de34[_0x49d470(0x1c2)]();throw _0x5d8888;}const _0x17741a=_0x5e1eb4[_0x49d470(0x16b)]||'-1d';return this[_0x49d470(0x1f1)](_0x2991f7,_0x37746e,_0x696e7b,_0x17741a),_0x2991f7[_0x49d470(0x1f7)]?0x0:0x1;}[a32_0x543316(0x1f1)](_0x32ce93,_0x376dd7,_0x531b41,_0x4213c0){const _0x4d38bf=a32_0x543316;console[_0x4d38bf(0x29e)]('\x0a'+a32_0x5f3fce[_0x4d38bf(0x21e)]('Validate:')+'\x20'+_0x32ce93[_0x4d38bf(0x243)]),console['error']('═'[_0x4d38bf(0x182)](0x3c)),this[_0x4d38bf(0x16f)](_0x32ce93);if(typeof _0x376dd7[_0x4d38bf(0x106)]===_0x4d38bf(0xc8)){this['displayAttributesStats'](_0x32ce93),this['displaySummary'](_0x32ce93),this[_0x4d38bf(0x160)](_0x531b41,_0x4213c0,_0x4d38bf(0x106),_0x376dd7[_0x4d38bf(0x106)]);return;}if(_0x376dd7[_0x4d38bf(0x106)]===!![]){this['displayAttributesStats'](_0x32ce93),this[_0x4d38bf(0x1be)](_0x32ce93),this[_0x4d38bf(0x160)](_0x531b41,_0x4213c0,'attributes');return;}if(typeof _0x376dd7[_0x4d38bf(0x172)]===_0x4d38bf(0xc8)){this[_0x4d38bf(0x28b)](_0x32ce93,_0x4213c0),this[_0x4d38bf(0x1be)](_0x32ce93),this['displayPreviewHints'](_0x531b41,_0x4213c0,_0x4d38bf(0x172),_0x376dd7[_0x4d38bf(0x172)]);return;}if(_0x376dd7[_0x4d38bf(0x172)]===!![]){this[_0x4d38bf(0x28b)](_0x32ce93,_0x4213c0),this[_0x4d38bf(0x1be)](_0x32ce93),this[_0x4d38bf(0x160)](_0x531b41,_0x4213c0,_0x4d38bf(0x127));return;}this[_0x4d38bf(0x183)](_0x32ce93),this['displayBehaviorsStats'](_0x32ce93,_0x4213c0),this['displayRealtimeInfo'](_0x32ce93),this['displaySummary'](_0x32ce93),this[_0x4d38bf(0x160)](_0x531b41,_0x4213c0,'all');}[a32_0x543316(0x108)](_0x527e31){displayRealtimeValidation(_0x527e31);}[a32_0x543316(0x160)](_0x40fd5e,_0x2b6ce1,_0x375248,_0x4dd45e){const _0xb835d8=a32_0x543316;console['error']('\x0a'+a32_0x5f3fce[_0xb835d8(0x282)](_0xb835d8(0x152)));const _0x1d4a5f=_0x2b6ce1!==_0xb835d8(0x1e8)?'\x20--interval\x20'+_0x2b6ce1:'';if(_0x375248===_0xb835d8(0x106)&&_0x4dd45e)console[_0xb835d8(0x29e)]('\x20\x20'+a32_0x5f3fce[_0xb835d8(0x282)]('tdx\x20ps\x20preview\x20'+_0x40fd5e+_0xb835d8(0x19f)+_0x4dd45e+'\x22'+_0x1d4a5f));else{if(_0x375248===_0xb835d8(0x172)&&_0x4dd45e)console['error']('\x20\x20'+a32_0x5f3fce[_0xb835d8(0x282)](_0xb835d8(0x212)+_0x40fd5e+_0xb835d8(0x209)+_0x4dd45e+'\x22'+_0x1d4a5f));else(_0x375248==='attributes'||_0x375248===_0xb835d8(0x247))&&console['error']('\x20\x20'+a32_0x5f3fce[_0xb835d8(0x282)](_0xb835d8(0x212)+_0x40fd5e+_0xb835d8(0x1ad)+_0x1d4a5f));}(_0x375248===_0xb835d8(0x127)||_0x375248==='all')&&console['error']('\x20\x20'+a32_0x5f3fce[_0xb835d8(0x282)](_0xb835d8(0x212)+_0x40fd5e+_0xb835d8(0x17d)+_0x1d4a5f)),_0x375248===_0xb835d8(0x247)&&console['error']('\x20\x20'+a32_0x5f3fce[_0xb835d8(0x282)](_0xb835d8(0x212)+_0x40fd5e+_0xb835d8(0x281)+_0x1d4a5f));}[a32_0x543316(0x16f)](_0x561fad){const _0x52d65f=a32_0x543316,{master:_0x1f292b}=_0x561fad,_0x446985=_0x1f292b['schemaValid']?a32_0x5f3fce[_0x52d65f(0x277)]('✔'):a32_0x5f3fce[_0x52d65f(0xbf)]('✘');console[_0x52d65f(0x29e)]('\x0a'+a32_0x5f3fce['dim'](_0x52d65f(0xe7))),console[_0x52d65f(0x29e)](_0x446985+'\x20'+a32_0x5f3fce[_0x52d65f(0x21e)](_0x1f292b[_0x52d65f(0x240)]+'.'+_0x1f292b[_0x52d65f(0xba)])),_0x1f292b['schemaValid']?_0x1f292b[_0x52d65f(0xca)]!==undefined&&console[_0x52d65f(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x52d65f(0x282)](_0x52d65f(0x107))+'\x20'+a32_0x5f3fce[_0x52d65f(0x238)](formatRows(_0x1f292b['rowCount']))):console['error']('\x20\x20'+a32_0x5f3fce[_0x52d65f(0xbf)](_0x52d65f(0xe2))+'\x20'+_0x1f292b[_0x52d65f(0xad)]);}['displayAttributesStats'](_0x374eca){const _0x13dbe9=a32_0x543316;if(_0x374eca[_0x13dbe9(0x236)]['length']===0x0)return;console[_0x13dbe9(0x29e)]('\x0a'+a32_0x5f3fce[_0x13dbe9(0x282)]('Attributes'));for(const _0x1e134f of _0x374eca[_0x13dbe9(0x236)]){const _0x410c69=_0x1e134f['schemaValid']?a32_0x5f3fce[_0x13dbe9(0x277)]('✔'):a32_0x5f3fce[_0x13dbe9(0xbf)]('✘');let _0x15b111='';if(_0x1e134f[_0x13dbe9(0x1ab)]&&_0x1e134f['matchedCount']!==undefined&&_0x1e134f[_0x13dbe9(0x12b)]!==undefined){const _0x5079e8=_0x1e134f[_0x13dbe9(0x12b)][_0x13dbe9(0x1af)](0x1),_0x4c6438=_0x1e134f[_0x13dbe9(0x12b)]>=0x50?a32_0x5f3fce[_0x13dbe9(0x277)]:_0x1e134f[_0x13dbe9(0x12b)]>=0x32?a32_0x5f3fce['yellow']:a32_0x5f3fce['red'];_0x15b111='\x20'+a32_0x5f3fce['dim'](_0x13dbe9(0x89))+'\x20'+_0x4c6438(_0x5079e8+'%')+'\x20('+formatRows(_0x1e134f[_0x13dbe9(0x177)])+_0x13dbe9(0x1bc);}console[_0x13dbe9(0x29e)](_0x410c69+'\x20'+a32_0x5f3fce[_0x13dbe9(0x21e)](_0x1e134f[_0x13dbe9(0x243)])+_0x15b111),console[_0x13dbe9(0x29e)]('\x20\x20'+a32_0x5f3fce['dim'](_0x13dbe9(0x285))+'\x20'+a32_0x5f3fce['bold'](_0x1e134f[_0x13dbe9(0x240)]+'.'+_0x1e134f[_0x13dbe9(0xba)]));const _0x2a568f=_0x1e134f[_0x13dbe9(0x1d6)]===_0x1e134f[_0x13dbe9(0x17c)]?a32_0x5f3fce['dim'](_0x13dbe9(0x287))+'\x20'+_0x1e134f[_0x13dbe9(0x1d6)]:a32_0x5f3fce[_0x13dbe9(0x282)](_0x13dbe9(0x9a))+'\x20'+_0x1e134f[_0x13dbe9(0x1d6)]+_0x13dbe9(0x15b)+_0x1e134f[_0x13dbe9(0x17c)];console['error']('\x20\x20'+_0x2a568f),console[_0x13dbe9(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x13dbe9(0x282)](_0x13dbe9(0x1fc))),this[_0x13dbe9(0x1ef)](_0x1e134f[_0x13dbe9(0x17a)]),!_0x1e134f['schemaValid']&&console[_0x13dbe9(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x13dbe9(0xbf)]('Error:')+'\x20'+_0x1e134f[_0x13dbe9(0xad)]);}}['displayBehaviorsStats'](_0x5c4a75,_0x1fec07){const _0x58edf1=a32_0x543316;if(_0x5c4a75[_0x58edf1(0x127)][_0x58edf1(0x165)]===0x0)return;console[_0x58edf1(0x29e)]('\x0a'+a32_0x5f3fce[_0x58edf1(0x282)](_0x58edf1(0xd0))+'\x20'+a32_0x5f3fce[_0x58edf1(0x282)]('('+_0x1fec07+')'));for(const _0x5b270c of _0x5c4a75['behaviors']){const _0x294c70=_0x5b270c[_0x58edf1(0x1ab)]?a32_0x5f3fce[_0x58edf1(0x277)]('✔'):a32_0x5f3fce[_0x58edf1(0xbf)]('✘');let _0x1e5d39='';if(_0x5b270c[_0x58edf1(0x1ab)]&&_0x5b270c[_0x58edf1(0x291)]!==undefined&&_0x5b270c[_0x58edf1(0xb3)]!==undefined){const _0x55223d=_0x5b270c[_0x58edf1(0x288)]?.[_0x58edf1(0x1af)](0x1)||'?',_0x3afe8f=(_0x5b270c[_0x58edf1(0x288)]??0x0)>=0x32?a32_0x5f3fce[_0x58edf1(0x277)]:(_0x5b270c[_0x58edf1(0x288)]??0x0)>=0x14?a32_0x5f3fce[_0x58edf1(0x8b)]:a32_0x5f3fce[_0x58edf1(0xbf)];_0x1e5d39='\x20'+a32_0x5f3fce['dim'](_0x58edf1(0x276))+'\x20'+_0x3afe8f(formatRows(_0x5b270c[_0x58edf1(0x291)]))+'\x20('+_0x55223d+'%)\x20'+a32_0x5f3fce[_0x58edf1(0x282)]('Events:')+'\x20'+a32_0x5f3fce[_0x58edf1(0x238)](formatRows(_0x5b270c['totalEvents']));}console[_0x58edf1(0x29e)](_0x294c70+'\x20'+a32_0x5f3fce[_0x58edf1(0x21e)](_0x5b270c[_0x58edf1(0x243)])+_0x1e5d39),console[_0x58edf1(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x58edf1(0x282)](_0x58edf1(0x285))+'\x20'+a32_0x5f3fce[_0x58edf1(0x21e)](_0x5b270c[_0x58edf1(0x240)]+'.'+_0x5b270c[_0x58edf1(0xba)]));const _0x276c22=_0x5b270c[_0x58edf1(0x1d6)]===_0x5b270c[_0x58edf1(0x17c)]?a32_0x5f3fce[_0x58edf1(0x282)](_0x58edf1(0x287))+'\x20'+_0x5b270c['joinKey']:a32_0x5f3fce[_0x58edf1(0x282)](_0x58edf1(0x9a))+'\x20'+_0x5b270c[_0x58edf1(0x1d6)]+_0x58edf1(0x15b)+_0x5b270c[_0x58edf1(0x17c)];console[_0x58edf1(0x29e)]('\x20\x20'+_0x276c22),console[_0x58edf1(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x58edf1(0x282)](_0x58edf1(0x1fc))),this[_0x58edf1(0x1ef)](_0x5b270c['columns']),!_0x5b270c[_0x58edf1(0x1ab)]&&console[_0x58edf1(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x58edf1(0xbf)]('Error:')+'\x20'+_0x5b270c[_0x58edf1(0xad)]);}}[a32_0x543316(0x1ef)](_0x5d44ba){const _0x569f8c=a32_0x543316;for(const _0x1df982 of _0x5d44ba){_0x1df982[_0x569f8c(0x1ce)]===_0x1df982[_0x569f8c(0x241)]||_0x1df982['column']==='*'?console[_0x569f8c(0x29e)](_0x569f8c(0x1f9)+_0x1df982[_0x569f8c(0x1ce)]):console[_0x569f8c(0x29e)](_0x569f8c(0x1f9)+_0x1df982[_0x569f8c(0x1ce)]+'\x20'+a32_0x5f3fce[_0x569f8c(0x282)]('('+_0x1df982[_0x569f8c(0x241)]+')'));}}[a32_0x543316(0x1be)](_0x4bdb7b){const _0x343679=a32_0x543316;console[_0x343679(0x29e)]('─'[_0x343679(0x182)](0x3c));if(_0x4bdb7b[_0x343679(0x23d)][_0x343679(0x165)]>0x0){console['error']('\x0a'+a32_0x5f3fce[_0x343679(0xbf)](_0x343679(0x17f)));for(const _0x5e843f of _0x4bdb7b[_0x343679(0x23d)]){console[_0x343679(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x343679(0xbf)]('•')+'\x20'+_0x5e843f);}}_0x4bdb7b[_0x343679(0x1f7)]&&console['error']('\x0a'+a32_0x5f3fce['green']('✔')+_0x343679(0xc3));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a32_0x543316(0x243)]='segment:parent:preview';[a32_0x543316(0xd1)]=a32_0x543316(0x200);async[a32_0x543316(0x130)](_0x1b229c){const _0x5e7a19=a32_0x543316,{options:_0x353cda,args:_0x466275,tdx:_0x1d64f4}=_0x1b229c,_0x465c8b=_0x353cda,_0xe4405e=_0x466275[0x0]||_0x353cda[_0x5e7a19(0x1ac)];if(!_0xe4405e)return showParentSegmentNotSetError(_0x5e7a19(0x1fa)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a'+_0x5e7a19(0x132)+'\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a'+_0x5e7a19(0x206)+'\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a'+_0x5e7a19(0x275)+_0x5e7a19(0x1da)),0x1;if(!_0x465c8b[_0x5e7a19(0x197)]&&!_0x465c8b[_0x5e7a19(0x106)]&&!_0x465c8b[_0x5e7a19(0x172)]&&!_0x465c8b[_0x5e7a19(0xb8)])return console[_0x5e7a19(0x29e)](a32_0x5f3fce[_0x5e7a19(0xbf)](_0x5e7a19(0x19e))),console['error'](_0x5e7a19(0x173)),console[_0x5e7a19(0x29e)]('Options:'),console[_0x5e7a19(0x29e)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console[_0x5e7a19(0x29e)](_0x5e7a19(0x22b)),console[_0x5e7a19(0x29e)](_0x5e7a19(0xc7)),console[_0x5e7a19(0x29e)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x3a21f5=resolveYamlFile(_0xe4405e);if(!existsSync(_0x3a21f5))return showFileNotFoundError(_0x3a21f5,_0xe4405e),0x1;_0x465c8b['verbose']&&(console[_0x5e7a19(0x29e)](_0x5e7a19(0x261)+_0x465c8b['site']),console['error'](_0x5e7a19(0x158)+_0x3a21f5));let _0x45965e;try{_0x45965e=readFileSync(_0x3a21f5,_0x5e7a19(0x1cc));}catch(_0xeadb14){const _0x2455cc=_0xeadb14 instanceof Error?_0xeadb14['message']:String(_0xeadb14);return console['error'](_0x5e7a19(0x1ba)+_0x2455cc),0x1;}let _0x57bcaa;try{_0x57bcaa=parseDef(_0x45965e);}catch(_0x5dbc18){const _0x10f33d=_0x5dbc18 instanceof Error?_0x5dbc18['message']:String(_0x5dbc18);return console[_0x5e7a19(0x29e)](a32_0x5f3fce[_0x5e7a19(0xbf)](_0x5e7a19(0xa4)+_0x10f33d)),0x1;}if(_0x465c8b['attribute']===!![]||_0x465c8b[_0x5e7a19(0x106)]===''){const _0x5d32df=_0x57bcaa[_0x5e7a19(0x236)]?.[_0x5e7a19(0xf4)](_0xb8ad2c=>_0xb8ad2c[_0x5e7a19(0x243)])||[];if(_0x5d32df[_0x5e7a19(0x165)]===0x0)console['error'](a32_0x5f3fce[_0x5e7a19(0xbf)](_0x5e7a19(0xf0)));else{console[_0x5e7a19(0x29e)](a32_0x5f3fce[_0x5e7a19(0xbf)]('Error:\x20--attribute\x20requires\x20a\x20name\x0a')),console[_0x5e7a19(0x29e)]('Available\x20attributes:');for(const _0x22b9c3 of _0x5d32df){console[_0x5e7a19(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x5e7a19(0x238)](_0x22b9c3));}console[_0x5e7a19(0x29e)](_0x5e7a19(0x1c6)+_0xe4405e+_0x5e7a19(0x19f)+_0x5d32df[0x0]+'\x22');}return 0x1;}if(_0x465c8b[_0x5e7a19(0x172)]===!![]||_0x465c8b[_0x5e7a19(0x172)]===''){const _0x29e0d9=_0x57bcaa['behaviors']?.[_0x5e7a19(0xf4)](_0x295996=>_0x295996[_0x5e7a19(0x243)])||[];if(_0x29e0d9['length']===0x0)console['error'](a32_0x5f3fce['red'](_0x5e7a19(0x1cb)));else{console[_0x5e7a19(0x29e)](a32_0x5f3fce[_0x5e7a19(0xbf)](_0x5e7a19(0x120))),console[_0x5e7a19(0x29e)](_0x5e7a19(0xe3));for(const _0x549cde of _0x29e0d9){console[_0x5e7a19(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x5e7a19(0x238)](_0x549cde));}console[_0x5e7a19(0x29e)](_0x5e7a19(0x1c6)+_0xe4405e+_0x5e7a19(0x209)+_0x29e0d9[0x0]+'\x22');}return 0x1;}const _0x1b321b=createCommandSpinner(a32_0x5f3fce[_0x5e7a19(0x282)](_0x5e7a19(0x29d)),{'verbose':_0x465c8b['verbose']});_0x1b321b[_0x5e7a19(0x207)]();const _0xccf59b={'onProgress':_0x11bc68=>{_0x1b321b['text']=formatProgressMessage(_0x11bc68);}};if(_0x465c8b['master'])_0xccf59b['master']=!![];if(_0x465c8b[_0x5e7a19(0x106)]&&typeof _0x465c8b[_0x5e7a19(0x106)]===_0x5e7a19(0xc8))_0xccf59b[_0x5e7a19(0x106)]=_0x465c8b[_0x5e7a19(0x106)];if(_0x465c8b[_0x5e7a19(0x172)]&&typeof _0x465c8b[_0x5e7a19(0x172)]==='string')_0xccf59b[_0x5e7a19(0x172)]=_0x465c8b['behavior'];if(_0x465c8b[_0x5e7a19(0xb8)])_0xccf59b[_0x5e7a19(0xb8)]=!![];if(_0x465c8b['interval'])_0xccf59b[_0x5e7a19(0x16b)]=_0x465c8b['interval'];let _0x18656a;try{_0x18656a=await _0x1d64f4['segment'][_0x5e7a19(0x228)](_0x45965e,_0xccf59b),_0x1b321b[_0x5e7a19(0x1c2)]();}catch(_0x533397){_0x1b321b[_0x5e7a19(0x1c2)]();throw _0x533397;}return await this[_0x5e7a19(0xa5)](_0x18656a,{'master':_0x465c8b[_0x5e7a19(0x197)],'attribute':typeof _0x465c8b[_0x5e7a19(0x106)]===_0x5e7a19(0xc8)?_0x465c8b[_0x5e7a19(0x106)]:undefined,'behavior':typeof _0x465c8b['behavior']===_0x5e7a19(0xc8)?_0x465c8b[_0x5e7a19(0x172)]:undefined,'enriched':_0x465c8b['enriched']}),_0x18656a['allValid']?0x0:0x1;}async[a32_0x543316(0xa5)](_0x3fc474,_0x178715){const _0x1b95e6=a32_0x543316;console[_0x1b95e6(0x29e)]('\x0a'+a32_0x5f3fce['bold'](_0x1b95e6(0x11b))+'\x20'+_0x3fc474[_0x1b95e6(0x243)]),console['error']('═'[_0x1b95e6(0x182)](0x3c));if(_0x178715[_0x1b95e6(0x197)]&&_0x3fc474[_0x1b95e6(0xd5)]){const _0x1ee3ae=a32_0x5f3fce[_0x1b95e6(0x282)](_0x1b95e6(0x167))+'\x20'+a32_0x5f3fce[_0x1b95e6(0x21e)](_0x3fc474[_0x1b95e6(0x197)][_0x1b95e6(0x240)]+'.'+_0x3fc474[_0x1b95e6(0x197)][_0x1b95e6(0xba)]);await this[_0x1b95e6(0xb0)](_0x1ee3ae,_0x3fc474[_0x1b95e6(0xd5)]);}else{if(_0x178715[_0x1b95e6(0x106)]&&_0x3fc474[_0x1b95e6(0xd5)]){const _0x56ee65=a32_0x5f3fce[_0x1b95e6(0x282)](_0x1b95e6(0x23b))+'\x20'+a32_0x5f3fce['bold'](_0x178715['attribute']);await this[_0x1b95e6(0xb0)](_0x56ee65,_0x3fc474[_0x1b95e6(0xd5)]);}else{if(_0x178715[_0x1b95e6(0x172)]&&_0x3fc474[_0x1b95e6(0xd5)]){const _0x2e8b31=a32_0x5f3fce[_0x1b95e6(0x282)](_0x1b95e6(0xfb))+'\x20'+a32_0x5f3fce[_0x1b95e6(0x21e)](_0x178715['behavior']);await this[_0x1b95e6(0xb0)](_0x2e8b31,_0x3fc474[_0x1b95e6(0xd5)]);}else{if(_0x178715[_0x1b95e6(0xb8)]&&_0x3fc474[_0x1b95e6(0xd5)]){const _0x477eb9=a32_0x5f3fce['dim'](_0x1b95e6(0xaf))+'\x20'+a32_0x5f3fce[_0x1b95e6(0x21e)]('Master\x20+\x20Attributes');await this[_0x1b95e6(0xb0)](_0x477eb9,_0x3fc474['sampleData']);}else!_0x3fc474[_0x1b95e6(0xd5)]&&console[_0x1b95e6(0x29e)](_0x1b95e6(0xb2));}}}if(_0x3fc474[_0x1b95e6(0x23d)][_0x1b95e6(0x165)]>0x0){console[_0x1b95e6(0x29e)]('─'['repeat'](0x3c)),console[_0x1b95e6(0x29e)]('\x0a'+a32_0x5f3fce['red'](_0x1b95e6(0x17f)));for(const _0x542b09 of _0x3fc474[_0x1b95e6(0x23d)]){console['error']('\x20\x20'+a32_0x5f3fce['red']('•')+'\x20'+_0x542b09);}}}async['displaySampleData'](_0x28f22b,_0x42c283){const _0x55d2f0=a32_0x543316;if(_0x42c283[_0x55d2f0(0x165)]===0x0){console[_0x55d2f0(0x29e)]('\x0a'+_0x28f22b),console['error'](_0x55d2f0(0x219));return;}console[_0x55d2f0(0x29e)]('\x0a'+_0x28f22b);const _0x171def=Object[_0x55d2f0(0xda)](_0x42c283[0x0])[_0x55d2f0(0xf4)](_0x4c4aa7=>({'name':_0x4c4aa7,'type':typeof _0x42c283[0x0][_0x4c4aa7]===_0x55d2f0(0xb4)?_0x55d2f0(0x9f):_0x55d2f0(0x151)})),_0x46bd31={'queryId':'preview','columns':_0x171def,'data':_0x42c283,'stats':{'state':_0x55d2f0(0x20d),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x42c283['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x54b0d5=formatAsTable(_0x46bd31,_0x42c283[_0x55d2f0(0x165)],!![]);await writeOutput(_0x54b0d5,undefined,_0x55d2f0(0xba));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{['name']='segment:parent:run';[a32_0x543316(0xd1)]=a32_0x543316(0x1b2);async[a32_0x543316(0x130)](_0x1ef3b8){const _0x4d29ec=a32_0x543316,{options:_0x4deabe,args:_0x555057,tdx:_0x3fc42a}=_0x1ef3b8,_0x5262f1=_0x4deabe,_0x14a5ea=_0x555057[0x0]||_0x4deabe[_0x4d29ec(0x1ac)];if(!_0x14a5ea)return showParentSegmentNotSetError(_0x4d29ec(0x175)+_0x4d29ec(0xec)),0x1;const _0x591e7c=resolveYamlFile(_0x14a5ea);if(existsSync(_0x591e7c)){_0x5262f1['verbose']&&console[_0x4d29ec(0x29e)](_0x4d29ec(0xf6)+_0x591e7c);let _0xf13b21;try{_0xf13b21=readFileSync(_0x591e7c,_0x4d29ec(0x1cc));}catch(_0x5744d2){const _0x367dd8=_0x5744d2 instanceof Error?_0x5744d2[_0x4d29ec(0xed)]:String(_0x5744d2);return console['error']('Error\x20reading\x20file:\x20'+_0x367dd8),0x1;}const _0x439f1e=await withSpinner(_0x4d29ec(0xe0),()=>_0x3fc42a['segment'][_0x4d29ec(0x28e)](_0xf13b21),{'verbose':_0x5262f1['verbose']}),_0x877012=_0x439f1e[_0x4d29ec(0x213)],{isNew:_0x2dd799,name:_0x582cb8,hasChanges:_0x520581,diffFormatted:_0x19ae72}=_0x877012;if(_0x520581){_0x2dd799?console['error'](_0x4d29ec(0x9e)+_0x582cb8+'\x27:'):console['error'](_0x4d29ec(0x1a3)+_0x582cb8+'\x27:');console[_0x4d29ec(0x29e)]('─'[_0x4d29ec(0x182)](0x3c)),console['error'](_0x19ae72),console[_0x4d29ec(0x29e)]('─'['repeat'](0x3c));const _0x103b3e=_0x2dd799?_0x4d29ec(0x252)+_0x582cb8+'\x27\x20and\x20run\x20workflow?':'Apply\x20changes\x20to\x20\x27'+_0x582cb8+'\x27\x20and\x20run\x20workflow?';if(!_0x5262f1[_0x4d29ec(0x110)]){if(!isInteractive())return console[_0x4d29ec(0x29e)](a32_0x5f3fce[_0x4d29ec(0xbf)](_0x4d29ec(0x18d)),_0x4d29ec(0x92)),console[_0x4d29ec(0x29e)](a32_0x5f3fce[_0x4d29ec(0x282)](_0x4d29ec(0x26d))),0x1;const _0x1198bc=await confirmKey(_0x103b3e);if(!_0x1198bc)return console[_0x4d29ec(0x29e)](a32_0x5f3fce[_0x4d29ec(0x8b)](_0x4d29ec(0x154))),0x1;}const _0xab9048=_0x2dd799?'Creating':_0x4d29ec(0x20e);await withSpinner(_0xab9048+_0x4d29ec(0x1cf)+_0x582cb8+_0x4d29ec(0x13f),()=>_0x877012[_0x4d29ec(0x186)](),{'verbose':_0x5262f1[_0x4d29ec(0x221)]});const _0x3068c1=_0x2dd799?'Created':_0x4d29ec(0x15f);console[_0x4d29ec(0x29e)]('✔\x20'+_0x3068c1+'\x20parent\x20segment\x20\x27'+_0x582cb8+'\x27');}else console[_0x4d29ec(0x29e)](_0x4d29ec(0x28a)+_0x582cb8+_0x4d29ec(0x23c));}const _0x3a63fd=await withSpinner(_0x4d29ec(0x1e0)+_0x14a5ea+_0x4d29ec(0x13f),()=>_0x3fc42a[_0x4d29ec(0x162)][_0x4d29ec(0x26c)](_0x14a5ea),{'verbose':_0x5262f1[_0x4d29ec(0x221)]}),_0x52ebae=_0x3a63fd[_0x4d29ec(0x213)],_0x3c895d=getConsoleUrl(_0x5262f1[_0x4d29ec(0xc5)],_0x4d29ec(0x2a0)+_0x52ebae[_0x4d29ec(0xa1)]+'/sessions/'+_0x52ebae[_0x4d29ec(0x124)]+'/attempt/'+_0x52ebae[_0x4d29ec(0x259)]);return console[_0x4d29ec(0x29e)](_0x4d29ec(0x122)),console[_0x4d29ec(0x29e)]('\x20\x20'+a32_0x5f3fce['dim'](_0x4d29ec(0x253))+'\x20'+_0x52ebae['audienceId']),console[_0x4d29ec(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x4d29ec(0x282)](_0x4d29ec(0xf8))+'\x20'+_0x52ebae[_0x4d29ec(0xdf)]),console['error']('\x20\x20'+a32_0x5f3fce[_0x4d29ec(0x282)](_0x4d29ec(0x97))+'\x20'+_0x52ebae[_0x4d29ec(0x124)]),console[_0x4d29ec(0x29e)]('\x20\x20'+a32_0x5f3fce['dim'](_0x4d29ec(0x28f))+'\x20'+_0x52ebae[_0x4d29ec(0x259)]),console[_0x4d29ec(0x29e)]('\x20\x20'+_0x3c895d),console[_0x4d29ec(0x29e)]('\x0a'+a32_0x5f3fce[_0x4d29ec(0x282)]('To\x20cancel:')+'\x20tdx\x20wf\x20attempt\x20'+_0x52ebae[_0x4d29ec(0x259)]+_0x4d29ec(0x231)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a32_0x543316(0x243)]='segment:parent:fields';[a32_0x543316(0xd1)]=a32_0x543316(0x226);async[a32_0x543316(0x130)](_0x2c685c){const _0x55e43a=a32_0x543316,{options:_0x4384e8,args:_0x3c41f1,tdx:_0xa20199}=_0x2c685c,_0x85af8b=_0x3c41f1[0x0]||_0x4384e8[_0x55e43a(0x1ac)];if(!_0x85af8b)return showParentSegmentNotSetError(_0x55e43a(0x208)+_0x55e43a(0x15c)),0x1;_0x4384e8[_0x55e43a(0x221)]&&(console['error'](_0x55e43a(0x261)+_0x4384e8[_0x55e43a(0xc5)]),console[_0x55e43a(0x29e)](_0x55e43a(0x225)+_0x85af8b));const _0x2aaf99=await withSpinner(_0x55e43a(0x21f)+_0x85af8b+_0x55e43a(0x13f),()=>_0xa20199['segment'][_0x55e43a(0x109)](_0x85af8b),{'verbose':_0x4384e8['verbose']}),_0x136f2d=_0x2aaf99['data'];console[_0x55e43a(0x29e)](_0x55e43a(0x19b)+_0x136f2d['length']+_0x55e43a(0x1e9)+(_0x136f2d['length']!==0x1?'s':''));if(_0x4384e8['json']||_0x4384e8[_0x55e43a(0x19d)])return await handleSDKOutput(_0x136f2d,_0x4384e8),0x0;return displayFieldsHumanReadable(_0x136f2d,_0x85af8b),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a32_0x543316(0x243)]=a32_0x543316(0x94);[a32_0x543316(0xd1)]='Show\x20parent\x20segment\x20details';async['execute'](_0x35ea15){const _0xd513d4=a32_0x543316,{options:_0x4155e8,args:_0x559909,tdx:_0x57c413}=_0x35ea15,_0x4f6771=_0x4155e8,_0xde4f27=_0x559909[0x0]||_0x4155e8['parentSegment'];if(!_0xde4f27)return showParentSegmentNotSetError(_0xd513d4(0x8f)+_0xd513d4(0x181)+'Options:\x0a'+'\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser'),0x1;_0x4155e8[_0xd513d4(0x221)]&&(console[_0xd513d4(0x29e)]('Site:\x20'+_0x4155e8[_0xd513d4(0xc5)]),console['error'](_0xd513d4(0x225)+_0xde4f27));const _0x5ac3d1=await withSpinner(_0xd513d4(0x14c)+_0xde4f27+_0xd513d4(0x13f),()=>_0x57c413['segment'][_0xd513d4(0x1d9)](_0xde4f27),{'verbose':_0x4155e8[_0xd513d4(0x221)]}),_0x46ddfa=_0x5ac3d1['data'];if(_0x4f6771[_0xd513d4(0x25d)]){const _0x2aacde=getConsoleNextUrl(_0x4f6771[_0xd513d4(0xc5)],_0xd513d4(0xf7)+_0x46ddfa['id']);return console[_0xd513d4(0x29e)](a32_0x5f3fce[_0xd513d4(0x277)]('✔')+_0xd513d4(0x205)+a32_0x5f3fce[_0xd513d4(0x238)](_0x2aacde)),openBrowser(_0x2aacde),0x0;}return await handleSingleObjectOutput(_0x46ddfa,_0x4155e8),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a32_0x543316(0x243)]='segment:parent:desc';[a32_0x543316(0xd1)]=a32_0x543316(0x258);async[a32_0x543316(0x130)](_0x126c22){const _0x172b2c=a32_0x543316,{options:_0x4c1075,args:_0x4aa3ad,tdx:_0x1f500c}=_0x126c22,_0x46910e=_0x4c1075,_0x33bc13=_0x4aa3ad[0x0]||_0x4c1075[_0x172b2c(0x1ac)];if(!_0x33bc13)return showParentSegmentNotSetError(_0x172b2c(0x169)+_0x172b2c(0x232)+_0x172b2c(0x1df)+_0x172b2c(0x142)),0x1;_0x4c1075[_0x172b2c(0x221)]&&(console[_0x172b2c(0x29e)](_0x172b2c(0x261)+_0x4c1075[_0x172b2c(0xc5)]),console[_0x172b2c(0x29e)]('Parent\x20segment:\x20'+_0x33bc13));const _0x5dba60=await withSpinner(_0x172b2c(0x1dd)+_0x33bc13+_0x172b2c(0x13f),()=>_0x1f500c[_0x172b2c(0x162)][_0x172b2c(0x280)](_0x33bc13),{'verbose':_0x4c1075['verbose']}),_0x5a9f16=_0x5dba60['data'],_0x2d285c=_0x1f500c['segment'][_0x172b2c(0xcd)](_0x5a9f16);if(_0x46910e['output']){const _0xae4075=await this['collectSchema'](_0x126c22,_0x33bc13,_0x5a9f16,_0x2d285c),_0x2ccf2d=this[_0x172b2c(0x237)](_0xae4075);writeFileSync(_0x46910e['output'],_0x2ccf2d);const _0x1de5e1=_0xae4075['customers'][_0x172b2c(0x17a)][_0x172b2c(0x165)]+_0xae4075[_0x172b2c(0x127)][_0x172b2c(0x1a8)]((_0x222dca,_0x3f65aa)=>_0x222dca+_0x3f65aa[_0x172b2c(0x17a)][_0x172b2c(0x165)],0x0),_0x8ad508=_0xae4075[_0x172b2c(0x127)][_0x172b2c(0x27c)](_0x5caf66=>_0x5caf66['columns'][_0x172b2c(0x165)]===0x0)['length'];return console[_0x172b2c(0x1e2)](_0x172b2c(0x18e)+_0x46910e[_0x172b2c(0x10e)]),console['log'](_0x172b2c(0x161)+_0x2d285c),console[_0x172b2c(0x1e2)](_0x172b2c(0xcf)+_0xae4075['behaviors'][_0x172b2c(0x165)]+_0x172b2c(0xfd)),console[_0x172b2c(0x1e2)](_0x172b2c(0x210)+_0x1de5e1+'\x20total'),_0x8ad508>0x0&&console[_0x172b2c(0x1e2)](_0x172b2c(0x299)+_0x8ad508+_0x172b2c(0x12a)),0x0;}console['error']('\x0a'+a32_0x5f3fce[_0x172b2c(0x21e)](_0x172b2c(0xe5))+'\x20'+a32_0x5f3fce[_0x172b2c(0x238)](_0x2d285c));const _0x29cc7e=await withSpinner(_0x172b2c(0x1f0),()=>_0x1f500c[_0x172b2c(0x162)][_0x172b2c(0xd4)](_0x5a9f16),{'verbose':_0x4c1075[_0x172b2c(0x221)]});console[_0x172b2c(0x29e)]('\x0a'+a32_0x5f3fce[_0x172b2c(0x21e)](_0x172b2c(0xc1))+'\x20'+a32_0x5f3fce[_0x172b2c(0x282)]('('+_0x2d285c+_0x172b2c(0x21b)));const _0xce4708=await executeSchemaQuery(_0x29cc7e['data'],_0x1f500c,_0x4c1075);await handleQueryOutput(_0xce4708,_0x4c1075);const _0x2bc628=await withSpinner(_0x172b2c(0x129),()=>_0x1f500c['segment']['getBehaviorNames'](_0x5a9f16),{'verbose':_0x4c1075[_0x172b2c(0x221)]});for(const _0x2b1f21 of _0x2bc628['data']){const _0xe1f8e9='behavior_'+_0x2b1f21['toLowerCase']()['replace'](/\s+/g,'_'),_0x43705c=_0x172b2c(0x246)+_0x2d285c+'.'+_0xe1f8e9;console[_0x172b2c(0x29e)]('\x0a'+a32_0x5f3fce['bold'](_0x2b1f21)+'\x20'+a32_0x5f3fce[_0x172b2c(0x282)]('('+_0x2d285c+'.'+_0xe1f8e9+')'));try{const _0xaee5b2=await executeSchemaQuery(_0x43705c,_0x1f500c,_0x4c1075);await handleQueryOutput(_0xaee5b2,_0x4c1075);}catch{console[_0x172b2c(0x29e)](a32_0x5f3fce[_0x172b2c(0x8b)](_0x172b2c(0xdb)));}}return 0x0;}async['collectSchema'](_0x481795,_0x1986d2,_0x41e49d,_0x326112){const _0x2522fc=a32_0x543316,{options:_0x307efd,tdx:_0x535585}=_0x481795,_0x2ff6c6=await withSpinner(_0x2522fc(0x1f0),()=>_0x535585['segment'][_0x2522fc(0xd4)](_0x41e49d),{'verbose':_0x307efd[_0x2522fc(0x221)]}),_0x1de14d=await executeSchemaQuery(_0x2ff6c6['data'],_0x535585,_0x307efd),_0x10c1bd=_0x1de14d[_0x2522fc(0x213)][_0x2522fc(0xf4)](_0x108dc9=>({'name':_0x108dc9[_0x2522fc(0x18f)],'type':_0x108dc9[_0x2522fc(0x260)]})),_0x468726=await withSpinner(_0x2522fc(0x129),()=>_0x535585[_0x2522fc(0x162)][_0x2522fc(0x1bf)](_0x41e49d),{'verbose':_0x307efd['verbose']}),_0x2c5348=[];for(const _0x39214f of _0x468726['data']){const _0x5470aa=_0x2522fc(0x201)+_0x39214f[_0x2522fc(0x27e)]()[_0x2522fc(0xa7)](/\s+/g,'_'),_0x26f6d9=_0x2522fc(0x246)+_0x326112+'.'+_0x5470aa;let _0x26327e=[];try{const _0x15f4d6=await executeSchemaQuery(_0x26f6d9,_0x535585,_0x307efd);_0x26327e=_0x15f4d6[_0x2522fc(0x213)][_0x2522fc(0xf4)](_0x7738d=>({'name':_0x7738d['column_name'],'type':_0x7738d[_0x2522fc(0x260)]}));}catch{}_0x2c5348[_0x2522fc(0x249)]({'table':_0x5470aa,'columns':_0x26327e});}return{'database':_0x326112,'parent_segment':_0x1986d2,'parent_id':_0x41e49d,'customers':{'table':_0x2522fc(0xc1),'columns':_0x10c1bd},'behaviors':_0x2c5348};}[a32_0x543316(0x237)](_0x1b1455){const _0x3755fc=a32_0x543316,_0x19c46d=_0x3caa9f=>{const _0x93e4a6=a32_0x23b6;if(_0x3caa9f['length']===0x0)return'[]';const _0x3bcf41=_0x3caa9f[_0x93e4a6(0xf4)](_0x3a4219=>_0x93e4a6(0x145)+_0x3a4219[_0x93e4a6(0x243)]+_0x93e4a6(0x28d)+_0x3a4219[_0x93e4a6(0x86)]+_0x93e4a6(0x273));return'[\x0a'+_0x3bcf41[_0x93e4a6(0x13e)](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x56efaa=_0x1b1455[_0x3755fc(0x127)][_0x3755fc(0xf4)](_0x36ed03=>{const _0x1d75db=_0x3755fc;return _0x1d75db(0x9b)+_0x36ed03['table']+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20'+_0x19c46d(_0x36ed03[_0x1d75db(0x17a)])[_0x1d75db(0xa7)](/^/gm,'\x20\x20')[_0x1d75db(0x242)]()+'\x0a\x20\x20\x20\x20}';})[_0x3755fc(0x13e)](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x1b1455[_0x3755fc(0x240)]+_0x3755fc(0x26e)+_0x1b1455[_0x3755fc(0x146)]+_0x3755fc(0xa0)+_0x1b1455['parent_id']+_0x3755fc(0x220)+_0x1b1455[_0x3755fc(0xc1)][_0x3755fc(0xba)]+_0x3755fc(0x187)+_0x19c46d(_0x1b1455[_0x3755fc(0xc1)]['columns'])['replace'](/^/gm,'\x20\x20')['trim']()+'\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a'+_0x56efaa+_0x3755fc(0x294);}}export class ParentSegmentSQLCommand extends BaseCommand{[a32_0x543316(0x243)]=a32_0x543316(0x1a2);[a32_0x543316(0xd1)]=a32_0x543316(0x21a);async[a32_0x543316(0x130)](_0x37457e){const _0x303e96=a32_0x543316,{options:_0x22cde4,args:_0x45dada,tdx:_0x4242b6}=_0x37457e,_0x604fee=_0x45dada[0x0]||_0x22cde4[_0x303e96(0x1ac)];if(!_0x604fee)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a'+_0x303e96(0x123)),0x1;_0x22cde4[_0x303e96(0x221)]&&(console[_0x303e96(0x29e)](_0x303e96(0x261)+_0x22cde4['site']),console['error'](_0x303e96(0x225)+_0x604fee));const _0x23be42=await withSpinner(_0x303e96(0x1dd)+_0x604fee+'\x27...',()=>_0x4242b6[_0x303e96(0x162)][_0x303e96(0x280)](_0x604fee),{'verbose':_0x22cde4[_0x303e96(0x221)]}),_0x1aaf93=_0x23be42[_0x303e96(0x213)],_0x3f8276=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x604fee+'\x27...',()=>_0x4242b6[_0x303e96(0x162)][_0x303e96(0xd4)](_0x1aaf93),{'verbose':_0x22cde4['verbose']}),_0x2df84c=_0x3f8276[_0x303e96(0x213)];return _0x22cde4[_0x303e96(0x117)]===_0x303e96(0x251)||_0x22cde4['format']===_0x303e96(0x19d)?await handleSDKOutput([{'sql':_0x2df84c}],_0x22cde4):console[_0x303e96(0x1e2)](_0x2df84c),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a32_0x543316(0x243)]='segment:parent:show';[a32_0x543316(0xd1)]=a32_0x543316(0x118);async[a32_0x543316(0x130)](_0x5b9b27){const _0x82ad84=a32_0x543316,{options:_0x1d387b,args:_0x2be8bd,tdx:_0x19ec79}=_0x5b9b27,_0x52b68d=_0x2be8bd[0x0]||_0x1d387b[_0x82ad84(0x1ac)];if(!_0x52b68d)return showParentSegmentNotSetError(_0x82ad84(0x9d)+_0x82ad84(0x270)),0x1;_0x1d387b['verbose']&&(console[_0x82ad84(0x29e)]('Site:\x20'+_0x1d387b[_0x82ad84(0xc5)]),console['error'](_0x82ad84(0x225)+_0x52b68d));const _0xd019de=await withSpinner(_0x82ad84(0x1dd)+_0x52b68d+_0x82ad84(0x13f),()=>_0x19ec79[_0x82ad84(0x162)][_0x82ad84(0x280)](_0x52b68d),{'verbose':_0x1d387b[_0x82ad84(0x221)]}),_0x5aecb4=_0xd019de[_0x82ad84(0x213)],_0x340bf6=await withSpinner(_0x82ad84(0x27f)+_0x52b68d+_0x82ad84(0x13f),()=>_0x19ec79[_0x82ad84(0x162)]['getParentSQL'](_0x5aecb4),{'verbose':_0x1d387b[_0x82ad84(0x221)]});let _0x1ca159=_0x340bf6['data'];const _0x449e8e=resolveLimit(_0x1d387b[_0x82ad84(0x224)],DEFAULT_DISPLAY_LIMIT),_0x4a0b21=/\bLIMIT\s+\d+/i[_0x82ad84(0x1f3)](_0x1ca159);!_0x4a0b21&&(_0x1ca159=_0x1ca159[_0x82ad84(0x242)]()[_0x82ad84(0xa7)](/;+$/,''),_0x1ca159=_0x82ad84(0x1bb)+_0x1ca159+_0x82ad84(0x202)+_0x449e8e);_0x1d387b['verbose']&&console['error'](_0x82ad84(0x13c)+_0x1ca159);const _0x11c9b6=await withProgressSpinner(_0x82ad84(0x139),async _0x2f0348=>{const _0x245aa4=_0x82ad84,_0x31ef88=await _0x19ec79[_0x245aa4(0x190)]['execute'](_0x1ca159,{'catalog':'td','schema':_0x245aa4(0x245),'onJobId':_0x524e42=>{const _0x573055=_0x245aa4;_0x2f0348[_0x573055(0x19a)](_0x524e42);}});return _0x31ef88;},{'verbose':_0x1d387b[_0x82ad84(0x221)]}),_0x357dbb=_0x11c9b6[_0x82ad84(0x213)],_0x1fef1a=_0x357dbb['jobId']?_0x82ad84(0x14b)+_0x357dbb[_0x82ad84(0x134)]+']':'';return console['error'](_0x82ad84(0x18b)+_0x357dbb['stats'][_0x82ad84(0x157)]['toLocaleString']()+_0x82ad84(0x12d)+(_0x82ad84(0x16c)+formatElapsed(_0x357dbb['stats'][_0x82ad84(0x20c)])+_0x1fef1a)),await handleQueryOutput(_0x357dbb,_0x1d387b),0x0;}}export class PSRtListCommand extends BaseCommand{[a32_0x543316(0x243)]=a32_0x543316(0x24f);[a32_0x543316(0xd1)]=a32_0x543316(0x29b);async['execute'](_0x4fa6e0){const _0x4f1d98=a32_0x543316,{options:_0x2ad47c,args:_0x32e1df,tdx:_0x37fc0f}=_0x4fa6e0,_0x44c3b8=_0x32e1df[0x0],_0x4d7dce=await withSpinner(_0x44c3b8?_0x4f1d98(0xa2)+_0x44c3b8+'\x27...':_0x4f1d98(0x98),()=>_0x37fc0f['realtime'][_0x4f1d98(0x244)](),{'verbose':_0x2ad47c[_0x4f1d98(0x221)]});let _0x46f483=_0x4d7dce[_0x4f1d98(0x213)][_0x4f1d98(0x27c)](_0x3eeca4=>_0x3eeca4['realtime_enabled']);if(_0x44c3b8){const _0x1b5f49=_0x44c3b8[_0x4f1d98(0xa7)](/[.+^${}()|[\]\\]/g,_0x4f1d98(0x20a))[_0x4f1d98(0xa7)](/\*/g,'.*')[_0x4f1d98(0xa7)](/\?/g,'.'),_0x4c0eb1=new RegExp('^'+_0x1b5f49+'$','i');_0x46f483=_0x46f483[_0x4f1d98(0x27c)](_0x202807=>_0x4c0eb1[_0x4f1d98(0x1f3)](_0x202807[_0x4f1d98(0x243)]));}_0x46f483[_0x4f1d98(0x8a)]((_0x317f68,_0x2f16df)=>_0x317f68['name'][_0x4f1d98(0x13b)](_0x2f16df[_0x4f1d98(0x243)])),console[_0x4f1d98(0x29e)](_0x4f1d98(0x19b)+_0x46f483['length']+_0x4f1d98(0x267)+(_0x46f483[_0x4f1d98(0x165)]!==0x1?'s':''));const _0x11decb=_0x9632c8=>{const _0x1074ca=_0x4f1d98;return getConsoleNextUrl(_0x2ad47c[_0x1074ca(0xc5)],_0x1074ca(0xf7)+_0x9632c8);};if(_0x2ad47c['format']===_0x4f1d98(0x251)||_0x2ad47c[_0x4f1d98(0x117)]==='jsonl'){const _0xaf60c0=_0x46f483[_0x4f1d98(0xf4)](_0x4fad11=>({..._0x4fad11,'url':_0x11decb(_0x4fad11['id'])}));await handleSDKOutput(_0xaf60c0,_0x2ad47c);}else{if(_0x46f483[_0x4f1d98(0x165)]===0x0)console['log'](_0x4f1d98(0x2a1));else for(const _0xb2a500 of _0x46f483){const _0x27d9b7=_0xb2a500[_0x4f1d98(0xe4)]?a32_0x5f3fce[_0x4f1d98(0x282)]('\x20('+formatRows(_0xb2a500['population'])+')'):'',_0x27be0c=hyperlink(_0xb2a500[_0x4f1d98(0x243)],_0x11decb(_0xb2a500['id']));console['log']('⚡\x20'+_0x27be0c+_0x27d9b7);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a32_0x543316(0x243)]=a32_0x543316(0x216);[a32_0x543316(0xd1)]='Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML';async[a32_0x543316(0x130)](_0x438d62){const _0x46c3df=a32_0x543316,{options:_0x35589c,args:_0x3de046,tdx:_0x5702ba}=_0x438d62,_0x148b07=_0x3de046[0x0]||_0x35589c[_0x46c3df(0x1ac)];if(!_0x148b07)return showParentSegmentNotSetError(_0x46c3df(0x156)+_0x46c3df(0x199)),0x1;const _0x4dcd18=resolveYamlFile(_0x148b07);if(!existsSync(_0x4dcd18))return showFileNotFoundError(_0x4dcd18,_0x148b07),0x1;let _0x2f35f9;try{_0x2f35f9=readFileSync(_0x4dcd18,'utf-8');}catch(_0x58f900){const _0x3fbb70=_0x58f900 instanceof Error?_0x58f900[_0x46c3df(0xed)]:String(_0x58f900);return console[_0x46c3df(0x29e)](_0x46c3df(0x1ba)+_0x3fbb70),0x1;}const _0x3ede67=createCommandSpinner(a32_0x5f3fce[_0x46c3df(0x282)]('Validating\x20RT\x20configuration...'),{'verbose':_0x35589c[_0x46c3df(0x221)]});_0x3ede67[_0x46c3df(0x207)]();const _0x23ca18={'realtime':!![],'onProgress':_0x515f10=>{const _0x1cc3ea=_0x46c3df;_0x3ede67[_0x1cc3ea(0x233)]=formatProgressMessage(_0x515f10);}};let _0x494ac0;try{_0x494ac0=await _0x5702ba[_0x46c3df(0x162)]['validateParentYaml'](_0x2f35f9,_0x23ca18),_0x3ede67[_0x46c3df(0x1c2)]();}catch(_0x2debaa){_0x3ede67[_0x46c3df(0x1c2)]();throw _0x2debaa;}console[_0x46c3df(0x29e)]('\x0a'+a32_0x5f3fce[_0x46c3df(0x21e)](_0x46c3df(0x1b5))+'\x20'+_0x494ac0[_0x46c3df(0x243)]),console[_0x46c3df(0x29e)]('═'[_0x46c3df(0x182)](0x3c)),displayRealtimeValidation(_0x494ac0),console[_0x46c3df(0x29e)]('─'['repeat'](0x3c));if(_0x494ac0['errors'][_0x46c3df(0x165)]>0x0){console[_0x46c3df(0x29e)]('\x0a'+a32_0x5f3fce[_0x46c3df(0xbf)]('Errors:'));for(const _0x237423 of _0x494ac0[_0x46c3df(0x23d)]){console[_0x46c3df(0x29e)]('\x20\x20'+a32_0x5f3fce[_0x46c3df(0xbf)]('•')+'\x20'+_0x237423);}}return _0x494ac0[_0x46c3df(0x1f7)]&&console[_0x46c3df(0x29e)]('\x0a'+a32_0x5f3fce[_0x46c3df(0x277)]('✔')+_0x46c3df(0x150)),_0x494ac0[_0x46c3df(0x1f7)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a32_0x543316(0x243)]=a32_0x543316(0x12e);['description']=a32_0x543316(0x195);async['execute'](_0x19184b){const _0x510b53=a32_0x543316,{options:_0x302db3,args:_0x3bf7f5,tdx:_0x11925a}=_0x19184b,_0xd428f2=_0x3bf7f5[0x0]||_0x302db3['parentSegment'];if(!_0xd428f2)return showParentSegmentNotSetError(_0x510b53(0xcb)+_0x510b53(0x105)),0x1;_0x302db3[_0x510b53(0x221)]&&(console[_0x510b53(0x29e)](_0x510b53(0x261)+_0x302db3[_0x510b53(0xc5)]),console[_0x510b53(0x29e)]('Parent\x20segment:\x20'+_0xd428f2));const _0x112649=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xd428f2+_0x510b53(0x13f),()=>_0x11925a[_0x510b53(0x162)][_0x510b53(0x280)](_0xd428f2),{'verbose':_0x302db3[_0x510b53(0x221)]}),_0x170261=_0x112649[_0x510b53(0x213)],_0x54c38a=await withSpinner(_0x510b53(0xc9)+_0xd428f2+'\x27...',()=>_0x11925a[_0x510b53(0x256)]['listJourneys'](_0x170261),{'verbose':_0x302db3[_0x510b53(0x221)]}),_0x46cfaa=_0x54c38a[_0x510b53(0x213)];console[_0x510b53(0x29e)](_0x510b53(0x19b)+_0x46cfaa[_0x510b53(0x165)]+_0x510b53(0x131)+(_0x46cfaa[_0x510b53(0x165)]!==0x1?'s':''));if(_0x302db3['format']===_0x510b53(0x251)||_0x302db3['format']===_0x510b53(0x19d))await handleSDKOutput(_0x46cfaa,_0x302db3);else{if(_0x46cfaa['length']===0x0)console[_0x510b53(0x1e2)](_0x510b53(0x148));else for(const _0xcd5983 of _0x46cfaa){const _0x4fcf2d=_0xcd5983[_0x510b53(0xaa)]===_0x510b53(0x143)?'🚀':'📝',_0x102edf=_0xcd5983[_0x510b53(0x29c)]?a32_0x5f3fce[_0x510b53(0x8b)](_0x510b53(0x14d)):'',_0xab89b5=a32_0x5f3fce[_0x510b53(0x282)]('\x20('+_0xcd5983[_0x510b53(0xa8)]+'\x20stage'+(_0xcd5983['stageCount']!==0x1?'s':'')+')');console[_0x510b53(0x1e2)](_0x4fcf2d+'\x20'+_0xcd5983['name']+_0x102edf+_0xab89b5);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a32_0x543316(0x243)]='ps:rt:jn:pause';['description']='Pause\x20activations\x20in\x20an\x20RT\x20journey';async[a32_0x543316(0x130)](_0x477dcc){const _0x1f28ad=a32_0x543316,{options:_0x40614b,args:_0x268947,tdx:_0xa977a4}=_0x477dcc,_0x18cdab=_0x268947[0x0];if(!_0x18cdab)return console[_0x1f28ad(0x29e)](a32_0x5f3fce[_0x1f28ad(0xbf)](_0x1f28ad(0x193))),console[_0x1f28ad(0x29e)](_0x1f28ad(0xc2)),console[_0x1f28ad(0x29e)](a32_0x5f3fce[_0x1f28ad(0x282)](_0x1f28ad(0xac))),0x1;_0x40614b[_0x1f28ad(0x221)]&&(console[_0x1f28ad(0x29e)](_0x1f28ad(0x261)+_0x40614b[_0x1f28ad(0xc5)]),console[_0x1f28ad(0x29e)]('RT\x20Journey\x20ID:\x20'+_0x18cdab));const _0x25613d=await withSpinner('Pausing\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x18cdab+'\x27...',()=>_0xa977a4[_0x1f28ad(0x256)]['pauseJourney'](_0x18cdab),{'verbose':_0x40614b[_0x1f28ad(0x221)]}),_0x1f7745=_0x25613d[_0x1f28ad(0x213)];console['error']('✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x1f7745[_0x1f28ad(0x243)]+'\x27');if(_0x40614b[_0x1f28ad(0x117)]===_0x1f28ad(0x251)||_0x40614b[_0x1f28ad(0x117)]===_0x1f28ad(0x19d))await handleSDKOutput([_0x1f7745],_0x40614b);else{const _0x434f36=_0x1f7745[_0x1f28ad(0xaa)]==='launched'?'🚀':'📝',_0x452c35=_0x1f7745[_0x1f28ad(0x29c)]?a32_0x5f3fce[_0x1f28ad(0x8b)](_0x1f28ad(0x14d)):'';console[_0x1f28ad(0x1e2)](_0x434f36+'\x20'+_0x1f7745[_0x1f28ad(0x243)]+_0x452c35);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a32_0x543316(0x243)]=a32_0x543316(0x15a);['description']='Resume\x20activations\x20in\x20an\x20RT\x20journey';async[a32_0x543316(0x130)](_0x55b5b6){const _0x6cdaf4=a32_0x543316,{options:_0x3c5d64,args:_0x44100e,tdx:_0x393c03}=_0x55b5b6,_0x256620=_0x44100e[0x0];if(!_0x256620)return console[_0x6cdaf4(0x29e)](a32_0x5f3fce[_0x6cdaf4(0xbf)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0x6cdaf4(0x29e)](_0x6cdaf4(0x29f)),console['error'](a32_0x5f3fce['dim'](_0x6cdaf4(0xac))),0x1;_0x3c5d64[_0x6cdaf4(0x221)]&&(console[_0x6cdaf4(0x29e)](_0x6cdaf4(0x261)+_0x3c5d64[_0x6cdaf4(0xc5)]),console[_0x6cdaf4(0x29e)](_0x6cdaf4(0x271)+_0x256620));const _0x2ace06=await withSpinner(_0x6cdaf4(0x239)+_0x256620+_0x6cdaf4(0x13f),()=>_0x393c03[_0x6cdaf4(0x256)][_0x6cdaf4(0x126)](_0x256620),{'verbose':_0x3c5d64['verbose']}),_0x4fed26=_0x2ace06[_0x6cdaf4(0x213)];console[_0x6cdaf4(0x29e)](_0x6cdaf4(0x87)+_0x4fed26[_0x6cdaf4(0x243)]+'\x27');if(_0x3c5d64[_0x6cdaf4(0x117)]===_0x6cdaf4(0x251)||_0x3c5d64[_0x6cdaf4(0x117)]===_0x6cdaf4(0x19d))await handleSDKOutput([_0x4fed26],_0x3c5d64);else{const _0x23f7c9=_0x4fed26['state']===_0x6cdaf4(0x143)?'🚀':'📝',_0x5004d5=_0x4fed26[_0x6cdaf4(0x29c)]?a32_0x5f3fce['yellow'](_0x6cdaf4(0x14d)):'';console[_0x6cdaf4(0x1e2)](_0x23f7c9+'\x20'+_0x4fed26[_0x6cdaf4(0x243)]+_0x5004d5);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a32_0x543316(0x1d5);['description']=a32_0x543316(0xbd);async[a32_0x543316(0x130)](_0x4dc55f){const _0x3434f5=a32_0x543316,{options:_0x165ecb,args:_0x2c9f9b,tdx:_0x4bac41}=_0x4dc55f,_0x11c305=_0x2c9f9b[0x0]||_0x165ecb[_0x3434f5(0x1ac)];if(!_0x11c305)return showParentSegmentNotSetError(_0x3434f5(0x121)+_0x3434f5(0x21c)),0x1;_0x165ecb[_0x3434f5(0x221)]&&(console[_0x3434f5(0x29e)](_0x3434f5(0x261)+_0x165ecb['site']),console['error'](_0x3434f5(0x225)+_0x11c305));const _0x5138a8=await withSpinner(_0x3434f5(0x1dd)+_0x11c305+_0x3434f5(0x13f),()=>_0x4bac41[_0x3434f5(0x162)]['resolveParentId'](_0x11c305),{'verbose':_0x165ecb[_0x3434f5(0x221)]}),_0x1c054e=_0x5138a8[_0x3434f5(0x213)],_0x3c84c9=await withSpinner(_0x3434f5(0x179)+_0x11c305+_0x3434f5(0x13f),()=>_0x4bac41[_0x3434f5(0x256)][_0x3434f5(0x272)](_0x1c054e),{'verbose':_0x165ecb[_0x3434f5(0x221)]}),_0x1baa6b=_0x3c84c9[_0x3434f5(0x213)];return console[_0x3434f5(0x29e)](_0x3434f5(0x119)),_0x165ecb[_0x3434f5(0x117)]===_0x3434f5(0x251)||_0x165ecb[_0x3434f5(0x117)]===_0x3434f5(0x19d)?await handleSDKOutput([_0x1baa6b],_0x165ecb):(console['log'](_0x3434f5(0xfa)+_0x1baa6b['id']),console[_0x3434f5(0x1e2)](_0x3434f5(0xe9)+_0x1baa6b[_0x3434f5(0x1c1)]),console[_0x3434f5(0x1e2)](_0x3434f5(0x99)+_0x1baa6b[_0x3434f5(0xb1)]),console['log'](_0x3434f5(0x178)+_0x1baa6b[_0x3434f5(0xf2)]),console[_0x3434f5(0x1e2)](_0x3434f5(0x8d)+_0x1baa6b[_0x3434f5(0xdf)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{['name']=a32_0x543316(0x93);[a32_0x543316(0xd1)]=a32_0x543316(0x297);async[a32_0x543316(0x130)](_0x114d33){const _0x369fc1=a32_0x543316,{options:_0x1d3c1b,args:_0x453e22,tdx:_0x3dd377}=_0x114d33,_0x621b51=_0x453e22[0x0]||_0x1d3c1b['parentSegment'];if(!_0x621b51)return showParentSegmentNotSetError(_0x369fc1(0x104)+_0x369fc1(0x268)),0x1;const _0x5a8f52=await withSpinner(_0x369fc1(0x1dd)+_0x621b51+_0x369fc1(0x13f),()=>_0x3dd377['segment'][_0x369fc1(0x280)](_0x621b51),{'verbose':_0x1d3c1b[_0x369fc1(0x221)]}),_0x55c905=_0x5a8f52[_0x369fc1(0x213)],_0x3c9025=await withSpinner(_0x369fc1(0x103)+_0x621b51+'\x27...',()=>_0x3dd377[_0x369fc1(0x11d)]['list'](_0x55c905),{'verbose':_0x1d3c1b['verbose']}),_0x17469e=_0x3c9025[_0x369fc1(0x213)];console[_0x369fc1(0x29e)]('✔\x20Found\x20'+_0x17469e[_0x369fc1(0x165)]+_0x369fc1(0x27b)+(_0x17469e[_0x369fc1(0x165)]!==0x1?'s':''));if(_0x1d3c1b[_0x369fc1(0x117)]==='json'||_0x1d3c1b[_0x369fc1(0x117)]===_0x369fc1(0x19d))await handleSDKOutput(_0x17469e,_0x1d3c1b);else{if(_0x17469e[_0x369fc1(0x165)]===0x0)console[_0x369fc1(0x1e2)](_0x369fc1(0x140)),console[_0x369fc1(0x29e)](a32_0x5f3fce[_0x369fc1(0x238)](_0x369fc1(0x1b4)));else for(const _0x186e69 of _0x17469e){console[_0x369fc1(0x1e2)](a32_0x5f3fce[_0x369fc1(0x21e)](_0x186e69[_0x369fc1(0x243)])+'\x20'+a32_0x5f3fce[_0x369fc1(0x282)](_0x369fc1(0x296)+_0x186e69['id']+')'));_0x186e69[_0x369fc1(0xd1)]&&console[_0x369fc1(0x1e2)]('\x20\x20'+a32_0x5f3fce[_0x369fc1(0x282)](_0x186e69[_0x369fc1(0xd1)]));if(_0x186e69[_0x369fc1(0x292)]&&_0x186e69[_0x369fc1(0x292)]['length']>0x0)for(const _0x3438fd of _0x186e69[_0x369fc1(0x292)]){const _0x5bfa19=_0x3438fd[_0x369fc1(0xe8)]?.[_0x369fc1(0x165)]?_0x3438fd[_0x369fc1(0xe8)][_0x369fc1(0x13e)](',\x20'):_0x369fc1(0xe6);console[_0x369fc1(0x1e2)]('\x20\x20'+a32_0x5f3fce[_0x369fc1(0x238)]('token:')+'\x20'+_0x3438fd[_0x369fc1(0x243)]+'\x20'+a32_0x5f3fce[_0x369fc1(0x282)](_0x369fc1(0x296)+_0x3438fd['id']+')')),console[_0x369fc1(0x1e2)](_0x369fc1(0x1eb)+a32_0x5f3fce[_0x369fc1(0x282)](_0x369fc1(0x203))+'\x20'+_0x5bfa19);}else console[_0x369fc1(0x1e2)]('\x20\x20'+a32_0x5f3fce['dim'](_0x369fc1(0x180)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a32_0x543316(0x243)]='ps:pz:service:create';[a32_0x543316(0xd1)]='Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment';async['execute'](_0x246fd8){const _0x5b5f97=a32_0x543316,{options:_0x251c53,args:_0x2e3279,tdx:_0x19dbb1}=_0x246fd8,_0x271766=_0x251c53,_0x534ceb=_0x2e3279[0x0],_0x54aa5b=_0x2e3279[0x1]||_0x251c53[_0x5b5f97(0x1ac)];if(!_0x534ceb)return console[_0x5b5f97(0x29e)](_0x5b5f97(0x27a)),console[_0x5b5f97(0x29e)](_0x5b5f97(0x19c)),console[_0x5b5f97(0x29e)](_0x5b5f97(0x25c)),0x1;if(!_0x54aa5b)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a'+_0x5b5f97(0x25c)),0x1;const _0x3a3824=await withSpinner(_0x5b5f97(0x1dd)+_0x54aa5b+_0x5b5f97(0x13f),()=>_0x19dbb1[_0x5b5f97(0x162)][_0x5b5f97(0x280)](_0x54aa5b),{'verbose':_0x251c53['verbose']}),_0x17010d=_0x3a3824[_0x5b5f97(0x213)],_0x57e626={'name':_0x534ceb,'description':_0x271766['description'],'public':_0x271766[_0x5b5f97(0x293)]},_0x436037=await withSpinner(_0x5b5f97(0x10a)+_0x534ceb+_0x5b5f97(0x13f),()=>_0x19dbb1[_0x5b5f97(0x11d)][_0x5b5f97(0x91)](_0x17010d,_0x57e626),{'verbose':_0x251c53[_0x5b5f97(0x221)]}),_0x4c35bf=_0x436037[_0x5b5f97(0x213)];return console['error'](_0x5b5f97(0x223)+_0x4c35bf[_0x5b5f97(0x243)]+_0x5b5f97(0x184)+_0x4c35bf['id']),await handleSDKOutput([_0x4c35bf],_0x251c53),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a32_0x543316(0x243)]=a32_0x543316(0xea);[a32_0x543316(0xd1)]='Show\x20personalization\x20service\x20details';async[a32_0x543316(0x130)](_0x5c5715){const _0x42a902=a32_0x543316,{options:_0x4b9a95,args:_0x64b0a2,tdx:_0x13528f}=_0x5c5715,_0x2d3676=_0x64b0a2[0x0],_0x5285c5=_0x64b0a2[0x1]||_0x4b9a95[_0x42a902(0x1ac)];if(!_0x2d3676)return console[_0x42a902(0x29e)](_0x42a902(0x102)),console[_0x42a902(0x29e)](_0x42a902(0x1f6)),console['error'](_0x42a902(0x17e)),0x1;if(!_0x5285c5)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a'+_0x42a902(0x17e)),0x1;const _0x476217=await withSpinner(_0x42a902(0x1dd)+_0x5285c5+'\x27...',()=>_0x13528f['segment'][_0x42a902(0x280)](_0x5285c5),{'verbose':_0x4b9a95['verbose']}),_0x48c39a=_0x476217[_0x42a902(0x213)],_0x365c38=await withSpinner('Fetching\x20personalization\x20service\x20\x27'+_0x2d3676+_0x42a902(0x13f),()=>_0x13528f[_0x42a902(0x11d)][_0x42a902(0xce)](_0x48c39a,_0x2d3676),{'verbose':_0x4b9a95[_0x42a902(0x221)]}),_0x41bd34=_0x365c38[_0x42a902(0x213)];if(_0x4b9a95['json']||_0x4b9a95[_0x42a902(0x19d)])await handleSDKOutput([_0x41bd34],_0x4b9a95);else{console['log'](a32_0x5f3fce[_0x42a902(0x21e)](_0x41bd34[_0x42a902(0x243)])+'\x20'+a32_0x5f3fce[_0x42a902(0x282)]('(id:\x20'+_0x41bd34['id']+')'));_0x41bd34['description']&&console[_0x42a902(0x1e2)]('\x20\x20'+a32_0x5f3fce['dim'](_0x41bd34[_0x42a902(0xd1)]));console[_0x42a902(0x1e2)]('\x20\x20'+a32_0x5f3fce['cyan']('public:')+'\x20'+(_0x41bd34[_0x42a902(0x293)]?_0x42a902(0x110):'no'));if(_0x41bd34[_0x42a902(0x292)]&&_0x41bd34[_0x42a902(0x292)][_0x42a902(0x165)]>0x0)for(const _0x3e5b19 of _0x41bd34[_0x42a902(0x292)]){const _0x1a057a=_0x3e5b19[_0x42a902(0xe8)]?.['length']?_0x3e5b19[_0x42a902(0xe8)][_0x42a902(0x13e)](',\x20'):_0x42a902(0xe6);console[_0x42a902(0x1e2)]('\x20\x20'+a32_0x5f3fce[_0x42a902(0x238)](_0x42a902(0x1e5))+'\x20'+_0x3e5b19['name']+'\x20'+a32_0x5f3fce[_0x42a902(0x282)](_0x42a902(0x296)+_0x3e5b19['id']+')')),console[_0x42a902(0x1e2)](_0x42a902(0x1eb)+a32_0x5f3fce[_0x42a902(0x282)](_0x42a902(0x203))+'\x20'+_0x1a057a);}else console[_0x42a902(0x1e2)]('\x20\x20'+a32_0x5f3fce[_0x42a902(0x282)](_0x42a902(0x180)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a32_0x543316(0x243)]=a32_0x543316(0x1c8);[a32_0x543316(0xd1)]='Delete\x20a\x20personalization\x20service';async['execute'](_0x502abf){const _0x164db8=a32_0x543316,{options:_0x32e4c0,args:_0x16cc2b,tdx:_0x208dfb}=_0x502abf,_0x4b18ab=_0x16cc2b[0x0],_0x2a0bf1=_0x16cc2b[0x1]||_0x32e4c0[_0x164db8(0x1ac)];if(!_0x4b18ab)return console[_0x164db8(0x29e)](_0x164db8(0x102)),console[_0x164db8(0x29e)](_0x164db8(0xfc)),console['error'](_0x164db8(0x88)),0x1;if(!_0x2a0bf1)return showParentSegmentNotSetError(_0x164db8(0xff)+_0x164db8(0x88)),0x1;const _0x2376eb=await withSpinner(_0x164db8(0x1dd)+_0x2a0bf1+'\x27...',()=>_0x208dfb[_0x164db8(0x162)][_0x164db8(0x280)](_0x2a0bf1),{'verbose':_0x32e4c0['verbose']}),_0x22892f=_0x2376eb['data'];return await withSpinner(_0x164db8(0x279)+_0x4b18ab+_0x164db8(0x13f),()=>_0x208dfb[_0x164db8(0x11d)][_0x164db8(0x1ec)](_0x22892f,_0x4b18ab),{'verbose':_0x32e4c0['verbose']}),console[_0x164db8(0x29e)](_0x164db8(0x1a7)+_0x4b18ab+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a32_0x543316(0x243)]='ps:pz:service:update';[a32_0x543316(0xd1)]='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async[a32_0x543316(0x130)](_0x4f3594){const _0xe825bd=a32_0x543316,{options:_0x217c19,args:_0x2614af,tdx:_0x483f37}=_0x4f3594,_0x33b8f4=_0x217c19,_0x15a3f1=_0x2614af[0x0],_0x161028=_0x2614af[0x1]||_0x217c19[_0xe825bd(0x1ac)];if(!_0x15a3f1)return console['error'](_0xe825bd(0x102)),console[_0xe825bd(0x29e)](_0xe825bd(0x138)),console[_0xe825bd(0x29e)](_0xe825bd(0x24a)),0x1;if(!_0x33b8f4['name'])return console[_0xe825bd(0x29e)](_0xe825bd(0x100)),console[_0xe825bd(0x29e)](_0xe825bd(0x138)),0x1;if(!_0x161028)return showParentSegmentNotSetError(_0xe825bd(0x286)+_0xe825bd(0x24a)),0x1;const _0x5a0c02=await withSpinner(_0xe825bd(0x1dd)+_0x161028+_0xe825bd(0x13f),()=>_0x483f37[_0xe825bd(0x162)][_0xe825bd(0x280)](_0x161028),{'verbose':_0x217c19['verbose']}),_0x505b82=_0x5a0c02[_0xe825bd(0x213)],_0x92c933={'name':_0x33b8f4['name']};_0x33b8f4['description']!==undefined&&(_0x92c933['description']=_0x33b8f4[_0xe825bd(0xd1)]);const _0x1ac229=await withSpinner(_0xe825bd(0x9c)+_0x15a3f1+'\x27...',()=>_0x483f37[_0xe825bd(0x11d)][_0xe825bd(0x90)](_0x505b82,_0x15a3f1,_0x92c933),{'verbose':_0x217c19['verbose']}),_0x2ded0a=_0x1ac229[_0xe825bd(0x213)];return console[_0xe825bd(0x29e)](_0xe825bd(0x26b)+_0x2ded0a[_0xe825bd(0x243)]+'\x27'),await handleSDKOutput([_0x2ded0a],_0x217c19),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a32_0x543316(0x243)]='ps:pz:service:token:create';[a32_0x543316(0xd1)]=a32_0x543316(0xbe);async['execute'](_0x91dec6){const _0x1d3e84=a32_0x543316,{options:_0x2150a4,args:_0x4f3b36,tdx:_0x3f6496}=_0x91dec6,_0x1a666c=_0x2150a4,_0x45cfac=_0x4f3b36[0x0],_0x4a8d1e=_0x4f3b36[0x1],_0x3096da=_0x4f3b36[0x2]||_0x2150a4[_0x1d3e84(0x1ac)];if(!_0x45cfac)return console[_0x1d3e84(0x29e)]('Error:\x20Token\x20name\x20is\x20required'),console[_0x1d3e84(0x29e)](_0x1d3e84(0x295)),console[_0x1d3e84(0x29e)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x4a8d1e)return console['error'](_0x1d3e84(0x102)),console[_0x1d3e84(0x29e)](_0x1d3e84(0x295)),console[_0x1d3e84(0x29e)](_0x1d3e84(0x14a)),0x1;if(!_0x3096da)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a'+_0x1d3e84(0x14a)),0x1;const _0x54f1fe=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3096da+_0x1d3e84(0x13f),()=>_0x3f6496[_0x1d3e84(0x162)]['resolveParentId'](_0x3096da),{'verbose':_0x2150a4['verbose']}),_0x563b8a=_0x54f1fe[_0x1d3e84(0x213)],_0x4a033e={'name':_0x45cfac};_0x1a666c['allowedIps']&&(_0x4a033e['allowedIps']=_0x1a666c[_0x1d3e84(0xe8)][_0x1d3e84(0x141)](',')[_0x1d3e84(0xf4)](_0x2f25e4=>_0x2f25e4['trim']()));_0x1a666c['description']&&(_0x4a033e[_0x1d3e84(0xd1)]=_0x1a666c['description']);const _0x3eea7c=await withSpinner(_0x1d3e84(0x1fe)+_0x45cfac+'\x27\x20for\x20service\x20\x27'+_0x4a8d1e+_0x1d3e84(0x13f),()=>_0x3f6496[_0x1d3e84(0x11d)][_0x1d3e84(0x163)](_0x563b8a,_0x4a8d1e,_0x4a033e),{'verbose':_0x2150a4[_0x1d3e84(0x221)]}),_0x3789c4=_0x3eea7c[_0x1d3e84(0x213)];return console[_0x1d3e84(0x29e)]('✔\x20Created\x20token\x20\x27'+_0x3789c4[_0x1d3e84(0x243)]+_0x1d3e84(0x184)+_0x3789c4['id']),_0x3789c4[_0x1d3e84(0x22a)]&&(console[_0x1d3e84(0x29e)](a32_0x5f3fce[_0x1d3e84(0x8b)](_0x1d3e84(0x27d))),console['error'](a32_0x5f3fce[_0x1d3e84(0x238)](_0x3789c4[_0x1d3e84(0x22a)])),console[_0x1d3e84(0x29e)]('')),await handleSDKOutput([_0x3789c4],_0x2150a4),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a32_0x543316(0x243)]=a32_0x543316(0xf3);[a32_0x543316(0xd1)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async[a32_0x543316(0x130)](_0x56ed3a){const _0x2b8632=a32_0x543316,{options:_0x40356a,args:_0xba3276,tdx:_0x4aa52a}=_0x56ed3a,_0x405979=_0xba3276[0x0],_0x218c2f=_0xba3276[0x1]||_0x40356a[_0x2b8632(0x1ac)];if(!_0x405979)return console['error'](_0x2b8632(0xd3)),console[_0x2b8632(0x29e)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console[_0x2b8632(0x29e)](_0x2b8632(0x284)),0x1;if(!_0x218c2f)return showParentSegmentNotSetError(_0x2b8632(0x24c)+_0x2b8632(0x284)),0x1;const _0x5376a3=await withSpinner(_0x2b8632(0x1dd)+_0x218c2f+_0x2b8632(0x13f),()=>_0x4aa52a['segment'][_0x2b8632(0x280)](_0x218c2f),{'verbose':_0x40356a[_0x2b8632(0x221)]}),_0x16c30d=_0x5376a3[_0x2b8632(0x213)],_0x526bb4=await withSpinner(_0x2b8632(0xae),()=>_0x4aa52a['personalization'][_0x2b8632(0x244)](_0x16c30d),{'verbose':_0x40356a['verbose']}),_0x469d94=_0x526bb4[_0x2b8632(0x213)];let _0x181eef;for(const _0x23c97f of _0x469d94){if(_0x23c97f[_0x2b8632(0x292)]?.[_0x2b8632(0xb9)](_0x4cc38a=>_0x4cc38a['id']===_0x405979)){_0x181eef=_0x23c97f['id'];break;}}if(!_0x181eef)return console[_0x2b8632(0x29e)](_0x2b8632(0x170)+_0x405979+'\x27\x20not\x20found\x20in\x20any\x20personalization\x20service'),0x1;const _0x2414e6=await withSpinner('Deleting\x20token\x20\x27'+_0x405979+'\x27...',()=>_0x4aa52a['personalization'][_0x2b8632(0x229)](_0x16c30d,_0x181eef,_0x405979),{'verbose':_0x40356a[_0x2b8632(0x221)]}),_0x2a4209=_0x2414e6[_0x2b8632(0x213)];return console[_0x2b8632(0x29e)](_0x2b8632(0x13d)+(_0x2a4209['name']||_0x405979)+'\x27'),await handleSDKOutput([_0x2a4209],_0x40356a),0x0;}}export class PSPzListCommand extends BaseCommand{['name']=a32_0x543316(0x1d2);['description']=a32_0x543316(0xd9);async[a32_0x543316(0x130)](_0x576800){const _0x9d8c63=a32_0x543316,{options:_0x51ee5b,args:_0x284732,tdx:_0x1deca6}=_0x576800,_0x5dd518=_0x284732[0x0]||_0x51ee5b[_0x9d8c63(0x1ac)];if(!_0x5dd518)return showParentSegmentNotSetError('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'+'\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'),0x1;const _0x5ec1f6=await withSpinner(_0x9d8c63(0x1dd)+_0x5dd518+_0x9d8c63(0x13f),()=>_0x1deca6['segment'][_0x9d8c63(0x280)](_0x5dd518),{'verbose':_0x51ee5b[_0x9d8c63(0x221)]}),_0x44f726=_0x5ec1f6[_0x9d8c63(0x213)],_0x2ebb59=await withSpinner(_0x9d8c63(0xfe)+_0x5dd518+_0x9d8c63(0x13f),()=>_0x1deca6['personalization'][_0x9d8c63(0x25f)](_0x44f726),{'verbose':_0x51ee5b[_0x9d8c63(0x221)]}),_0x62bb85=_0x2ebb59['data'];console[_0x9d8c63(0x29e)](_0x9d8c63(0x19b)+_0x62bb85[_0x9d8c63(0x165)]+_0x9d8c63(0x26f)+(_0x62bb85[_0x9d8c63(0x165)]!==0x1?'s':''));if(_0x51ee5b['format']===_0x9d8c63(0x251)||_0x51ee5b[_0x9d8c63(0x117)]==='jsonl')await handleSDKOutput(_0x62bb85,_0x51ee5b);else{if(_0x62bb85[_0x9d8c63(0x165)]===0x0)console[_0x9d8c63(0x1e2)](_0x9d8c63(0x1c4));else for(const _0xee6189 of _0x62bb85){console[_0x9d8c63(0x1e2)](a32_0x5f3fce[_0x9d8c63(0x21e)](_0xee6189[_0x9d8c63(0x243)])+'\x20'+a32_0x5f3fce[_0x9d8c63(0x282)](_0x9d8c63(0x296)+_0xee6189['id']+')'));_0xee6189[_0x9d8c63(0xd1)]&&console[_0x9d8c63(0x1e2)]('\x20\x20'+a32_0x5f3fce['dim'](_0xee6189[_0x9d8c63(0xd1)]));const _0x180012=_0xee6189[_0x9d8c63(0x1e6)]?.[_0x9d8c63(0x165)]||0x0;console['log']('\x20\x20'+a32_0x5f3fce[_0x9d8c63(0x238)](_0x9d8c63(0x8c))+'\x20'+_0x180012);if(_0xee6189[_0x9d8c63(0x1e6)]&&_0xee6189[_0x9d8c63(0x1e6)]['length']>0x0)for(const _0x255c88 of _0xee6189[_0x9d8c63(0x1e6)]){console[_0x9d8c63(0x1e2)](_0x9d8c63(0x1f9)+_0x255c88[_0x9d8c63(0x243)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{['name']=a32_0x543316(0x10d);[a32_0x543316(0xd1)]=a32_0x543316(0x1b0);async[a32_0x543316(0x130)](_0x5b7a46){const _0x46ecf9=a32_0x543316,{options:_0x4eef30,args:_0xaadec2,tdx:_0x2675d2}=_0x5b7a46,_0x329c54=_0xaadec2[0x0];if(!_0x329c54)return console[_0x46ecf9(0x29e)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x46ecf9(0x29e)](_0x46ecf9(0x28c)),0x1;const _0x32c997=await withSpinner(_0x46ecf9(0x189)+_0x329c54+_0x46ecf9(0x13f),()=>_0x2675d2['personalization'][_0x46ecf9(0x155)](_0x329c54),{'verbose':_0x4eef30[_0x46ecf9(0x221)]}),_0x3c6b0a=_0x32c997['data'];console[_0x46ecf9(0x29e)](_0x46ecf9(0x1f5)+_0x3c6b0a['name']+'\x27');if(_0x4eef30[_0x46ecf9(0x117)]==='json'||_0x4eef30[_0x46ecf9(0x117)]===_0x46ecf9(0x19d))await handleSDKOutput([_0x3c6b0a],_0x4eef30);else{console[_0x46ecf9(0x1e2)](a32_0x5f3fce[_0x46ecf9(0x21e)](_0x3c6b0a['name'])+'\x20'+a32_0x5f3fce['dim'](_0x46ecf9(0x296)+_0x3c6b0a['id']+')'));_0x3c6b0a[_0x46ecf9(0xd1)]&&console[_0x46ecf9(0x1e2)]('\x20\x20'+a32_0x5f3fce[_0x46ecf9(0x282)](_0x3c6b0a[_0x46ecf9(0xd1)]));_0x3c6b0a[_0x46ecf9(0x1c1)]&&console['log']('\x20\x20'+a32_0x5f3fce['cyan'](_0x46ecf9(0x24e))+'\x20'+_0x3c6b0a[_0x46ecf9(0x1c1)]);console[_0x46ecf9(0x1e2)]('\x20\x20'+a32_0x5f3fce[_0x46ecf9(0x238)](_0x46ecf9(0x101))+'\x20'+_0x3c6b0a[_0x46ecf9(0x1b7)]),console['log']('\x20\x20'+a32_0x5f3fce['cyan'](_0x46ecf9(0x1d4))+'\x20'+_0x3c6b0a[_0x46ecf9(0x11c)]);const _0x3424e6=_0x3c6b0a[_0x46ecf9(0x1e6)]?.[_0x46ecf9(0x165)]||0x0;console[_0x46ecf9(0x1e2)]('\x20\x20'+a32_0x5f3fce[_0x46ecf9(0x238)](_0x46ecf9(0x8c))+'\x20'+_0x3424e6);if(_0x3c6b0a[_0x46ecf9(0x1e6)]&&_0x3c6b0a[_0x46ecf9(0x1e6)][_0x46ecf9(0x165)]>0x0)for(const _0x2af35a of _0x3c6b0a[_0x46ecf9(0x1e6)]){console[_0x46ecf9(0x1e2)]('\x20\x20\x20\x20'+a32_0x5f3fce[_0x46ecf9(0x21e)](_0x2af35a['name'])+'\x20'+a32_0x5f3fce[_0x46ecf9(0x282)](_0x46ecf9(0x296)+_0x2af35a['id']+')')),_0x2af35a[_0x46ecf9(0x18c)]&&(console[_0x46ecf9(0x1e2)](_0x46ecf9(0x147)+a32_0x5f3fce['cyan']('entryCriteria:')+'\x20'+_0x2af35a[_0x46ecf9(0x18c)]['name']),_0x2af35a[_0x46ecf9(0x18c)][_0x46ecf9(0x248)]?.[_0x46ecf9(0x164)]&&console['log']('\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x5f3fce['cyan'](_0x46ecf9(0x115))+'\x20'+_0x2af35a[_0x46ecf9(0x18c)][_0x46ecf9(0x248)][_0x46ecf9(0x164)])),_0x2af35a[_0x46ecf9(0x257)]&&console['log'](_0x46ecf9(0x147)+a32_0x5f3fce[_0x46ecf9(0x238)](_0x46ecf9(0x16e))+'\x20'+JSON[_0x46ecf9(0x135)](_0x2af35a[_0x46ecf9(0x257)])),_0x2af35a[_0x46ecf9(0x1ed)]&&console[_0x46ecf9(0x1e2)]('\x20\x20\x20\x20\x20\x20'+a32_0x5f3fce[_0x46ecf9(0x238)](_0x46ecf9(0x218))+_0x46ecf9(0x113));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a32_0x543316(0x243)]=a32_0x543316(0x10c);[a32_0x543316(0xd1)]='Delete\x20a\x20realtime\x20personalization';async[a32_0x543316(0x130)](_0x4187a2){const _0x13fe10=a32_0x543316,{options:_0x58f0e8,args:_0x2d8736,tdx:_0x35d165}=_0x4187a2,_0x2e6afc=_0x2d8736[0x0];if(!_0x2e6afc)return console[_0x13fe10(0x29e)]('Error:\x20Personalization\x20ID\x20is\x20required'),console['error'](_0x13fe10(0x290)),0x1;return await withSpinner(_0x13fe10(0x192)+_0x2e6afc+_0x13fe10(0x13f),()=>_0x35d165[_0x13fe10(0x11d)]['deletePersonalization'](_0x2e6afc),{'verbose':_0x58f0e8[_0x13fe10(0x221)]}),console[_0x13fe10(0x29e)](_0x13fe10(0x265)+_0x2e6afc+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a32_0x543316(0x243)]=a32_0x543316(0x1dc);['description']=a32_0x543316(0x1d0);async[a32_0x543316(0x130)](_0x35a59c){const _0x239549=a32_0x543316,{options:_0x39bffa,tdx:_0x224a33}=_0x35a59c,_0x3d04c6=_0x39bffa;let _0x61acd3;if(_0x3d04c6[_0x239549(0xf5)]){_0x61acd3=await loadJSON(_0x3d04c6[_0x239549(0xf5)],!![]);if(!_0x61acd3[_0x239549(0x95)]?.['parentFolder'])return console[_0x239549(0x29e)](_0x239549(0x235)),console[_0x239549(0x29e)](_0x239549(0xde)),console[_0x239549(0x29e)]('\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(!_0x3d04c6[_0x239549(0x243)])return console[_0x239549(0x29e)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x239549(0x29e)](_0x239549(0x176)),console['error'](_0x239549(0x11a)),0x1;if(_0x3d04c6[_0x239549(0xd1)]===undefined)return console[_0x239549(0x29e)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x239549(0x29e)](_0x239549(0x176)),console[_0x239549(0x29e)](_0x239549(0x11a)),0x1;if(_0x3d04c6[_0x239549(0xbb)]===undefined)return console['error'](_0x239549(0x1c7)),console[_0x239549(0x29e)](_0x239549(0x1b1)),0x1;let _0x5e38f7=_0x3d04c6[_0x239549(0x1c1)];if(!_0x5e38f7&&_0x39bffa[_0x239549(0x1ac)]){const _0x27d5da=await withSpinner(_0x239549(0x1dd)+_0x39bffa[_0x239549(0x1ac)]+_0x239549(0x13f),()=>_0x224a33[_0x239549(0x162)][_0x239549(0x280)](_0x39bffa['parentSegment']),{'verbose':_0x39bffa[_0x239549(0x221)]});_0x5e38f7=_0x27d5da[_0x239549(0x213)];}let _0x1dcaf4;_0x3d04c6[_0x239549(0x1e6)]&&(_0x1dcaf4=await loadJSON(_0x3d04c6[_0x239549(0x1e6)],![]));const _0x5b1deb=_0x3d04c6['folderId']===_0x239549(0x96)?null:{'id':_0x3d04c6['folderId'],'type':_0x239549(0x214)};_0x61acd3={'attributes':{'name':_0x3d04c6['name'],'description':_0x3d04c6[_0x239549(0xd1)]||null,..._0x5e38f7!==undefined&&{'audienceId':_0x5e38f7},..._0x1dcaf4!==undefined&&{'sections':_0x1dcaf4}},'relationships':{'parentFolder':{'data':_0x5b1deb}}};}const _0x58a4a9=await withSpinner(_0x239549(0x111)+(_0x61acd3['attributes']?.['name']??'')+_0x239549(0x13f),()=>_0x224a33['personalization']['createPersonalization'](_0x61acd3),{'verbose':_0x39bffa['verbose']}),_0x39bbf7=_0x58a4a9[_0x239549(0x213)];return console[_0x239549(0x29e)](_0x239549(0x125)+_0x39bbf7[_0x239549(0x243)]+_0x239549(0x184)+_0x39bbf7['id']),await handleSDKOutput([_0x39bbf7],_0x39bffa),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a32_0x543316(0x243)]='ps:pz:patch';['description']=a32_0x543316(0x1d7);async[a32_0x543316(0x130)](_0x645a6a){const _0x1dd2de=a32_0x543316,{options:_0x3b68a8,args:_0x587366}=_0x645a6a,_0x442877=_0x3b68a8,_0x3f4e55=_0x587366[0x0];if(!_0x3f4e55)return console[_0x1dd2de(0x29e)](_0x1dd2de(0x18a)),console[_0x1dd2de(0x29e)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console['error'](_0x1dd2de(0xc0)),0x1;let _0x5165b4;if(_0x442877[_0x1dd2de(0xf5)])_0x5165b4=await loadJSON(_0x442877['file'],!![]);else{if(!_0x442877[_0x1dd2de(0x243)])return console[_0x1dd2de(0x29e)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x1dd2de(0x29e)](_0x1dd2de(0x13a)),0x1;if(_0x442877[_0x1dd2de(0xd1)]===undefined)return console['error']('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x1dd2de(0x29e)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x3e4ffb;_0x442877['sections']&&(_0x3e4ffb=await loadJSON(_0x442877[_0x1dd2de(0x1e6)],![])),_0x5165b4={'attributes':{'name':_0x442877[_0x1dd2de(0x243)],'description':_0x442877[_0x1dd2de(0xd1)]||null,..._0x3e4ffb!==undefined&&{'sections':_0x3e4ffb}}};}const {tdx:_0x3a6601}=_0x645a6a,_0xb3a9fb=await withSpinner(_0x1dd2de(0x264)+_0x3f4e55+_0x1dd2de(0x13f),()=>_0x3a6601[_0x1dd2de(0x11d)]['patchPersonalization'](_0x3f4e55,_0x5165b4),{'verbose':_0x3b68a8['verbose']}),_0x45302b=_0xb3a9fb[_0x1dd2de(0x213)];return console[_0x1dd2de(0x29e)](_0x1dd2de(0x262)+_0x45302b[_0x1dd2de(0x243)]+'\x27\x20(id:\x20'+_0x45302b['id']+')'),await handleSDKOutput([_0x45302b],_0x3b68a8),0x0;}}function a32_0x5a41(){const _0x535055=['ps:rt:jn:list','customerGroupFile','execute','\x20RT\x20journey','Options\x20(one\x20required):\x0a','Created','jobId','stringify','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','run','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Executing\x20parent\x20segment\x20query...','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','localeCompare','SQL\x20query:\x0a','✔\x20Deleted\x20token\x20\x27','join','\x27...','No\x20personalization\x20services\x20configured','split','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','launched','\x20to\x20configure\x20your\x20personalization\x20service','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','parent_segment','\x20\x20\x20\x20\x20\x20','No\x20RT\x20journeys\x20found','\x20No\x20changes\x20-\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','\x20[Job\x20ID:\x20','Fetching\x20parent\x20segment\x20\x27','\x20(paused)','page_view','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','\x20RT\x20configuration\x20is\x20valid','varchar','To\x20view\x20sample\x20data:','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','Aborted.','getPersonalization','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','processedRows','YAML\x20file:\x20','👥\x20','ps:rt:jn:resume','\x20=\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','Updated','displayPreviewHints','\x20\x20Database:\x20','segment','createToken','keyEventId','length','Overwrite\x20\x27','Master:','Creating','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','primaryKey','interval','in\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','payload:','displayMasterInfo','Error:\x20Token\x20\x27','Name:\x20','behavior','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','Validating\x20configuration...','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','matchedCount','eventKind:\x20','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','columns','Error:\x20Parent\x20segment\x20name\x20is\x20required','foreignKey','\x20--behavior\x20\x22<name>\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Errors:','no\x20tokens\x20configured','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','repeat','displayAttributesStats','\x27\x20with\x20ID:\x20','✘\x20Failed\x20to\x20rename\x20directory:\x20','apply','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Getting\x20personalization\x20\x27','Error:\x20Personalization\x20ID\x20is\x20required','✔\x20Query\x20completed:\x20Processed\x20','entryCriteria','\x0aError:','Schema\x20saved\x20to\x20','column_name','query','165460ksqZta','Deleting\x20personalization\x20\x27','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','List\x20RT\x20journeys','endsWith','master','segment:parent:update','\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','setJobId','✔\x20Found\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','jsonl','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','\x20--attribute\x20\x22','using\x20the\x20default\x20path:\x20','realtime:','segment:parent:sql','\x0aChanges\x20to\x20apply\x20to\x20\x27','/\x20→\x20','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','✔\x20Deleted\x20personalization\x20service\x20\x27','reduce','\x20\x201.\x20Edit\x20','scheduleType','schemaValid','parentSegment','\x20--attribute\x20\x22<name>\x22','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','toFixed','Show\x20a\x20specific\x20realtime\x20personalization','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','10XhUiGM','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','RT\x202.0\x20Validate:','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','createdAt','sourceTableValid','events','Error\x20reading\x20file:\x20','SELECT\x20*\x20FROM\x20(\x0a','\x20rows)','listParents','displaySummary','getBehaviorNames','true','audienceId','stop','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','No\x20personalizations\x20configured','unref','\x0aUsage:\x20tdx\x20ps\x20preview\x20','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','ps:pz:service:delete','single','isDirectory','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','utf-8','No\x20parent\x20segments\x20found','label','\x20parent\x20segment\x20\x27','Create\x20a\x20realtime\x20personalization\x20entity','enabled','ps:pz:list','⚡\x20Not\x20enabled','updated:','ps:rt:configuration_versions','joinKey','Update\x20a\x20realtime\x20personalization\x20entity','createParent','getParentFull','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','ps:pz:init','ps:pz:create','Resolving\x20parent\x20segment\x20\x27','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Options:\x0a','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','behaviorsFile','log','\x0aChanges\x20to\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','token:','sections','Database:\x20','-1d','\x20field','`\x20to\x20download\x20the\x20configuration\x20first','\x20\x20\x20\x20','delete','includeSensitive','\x20\x20\x20','displayColumns','Fetching\x20customers\x20schema...','displayValidateResults','ignore','test','/\x20directory.\x0a','✔\x20Found\x20personalization\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','allValid','3068747RYgRkn','\x20\x20\x20\x20-\x20','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','Personalization:','Columns:','/{name}.yml\x0a','Creating\x20token\x20\x27','td_client_id','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','behavior_','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','allowed\x20IPs:','scheduleOption','\x20Opening\x20','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','start','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','\x20--behavior\x20\x22','\x5c$&','Apply\x20changes\x20to\x20\x27','elapsedTimeMillis','FINISHED','Updating','idStitching','\x20\x20Columns:\x20','Listing\x20parent\x20segments\x20matching\x20\x27','tdx\x20ps\x20preview\x20','data','folder-segment','My\x20Service','ps:rt:validate','Output\x20file:\x20','includeSensitive:','\x20\x20No\x20sample\x20data\x20available','Get\x20SQL\x20query\x20for\x20parent\x20segment','.customers)','\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','Next\x20steps:','bold','Listing\x20fields\x20for\x20\x27','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','verbose','\x0a⚠️\x20\x20Migrating:\x20','✔\x20Created\x20personalization\x20service\x20\x27','limit','Parent\x20segment:\x20','List\x20available\x20fields\x20for\x20segmentation','Pattern:\x20','previewParentYaml','deleteToken','value','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','valid','segment:parent:push','48391oZyuIS','sourceTableError','216093udYzQl','\x20kill','\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','text','tdx\x20ps\x20push\x20','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','attributes','formatSchemaJson','cyan','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','customerGroup','Attribute:','\x27\x20is\x20up\x20to\x20date','errors','last_page_viewed','addAttributes','database','column','trim','name','list','information_schema','SELECT\x20*\x20FROM\x20','all','keyEventCriteria','push','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','audienceId:','ps:rt:list','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','json','Create\x20parent\x20segment\x20\x27','Audience\x20ID:','\x20service(s)\x20configured','✔\x20Updated\x20parent\x20segment\x20\x27','realtime','payload','Show\x20parent\x20segment\x20schema\x20(column\x20types)','workflowAttemptId','use','addAttributesFile','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','web','personalization_services','listPersonalizations','column_type','Site:\x20','✔\x20Updated\x20personalization\x20\x27','personalizationServices','Patching\x20personalization\x20\x27','✔\x20Deleted\x20personalization\x20\x27','/\x20directories\x20exist.','\x20RT-enabled\x20parent\x20segment','\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','parent_segments','validateParentYaml','✔\x20Updated\x20personalization\x20service\x20\x27','runParent','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','\x20personalization','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','RT\x20Journey\x20ID:\x20','getCurrentConfigVersion','\x22\x20}','addBehaviors','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','Customers:','green','attributesFile','Deleting\x20personalization\x20service\x20\x27','Error:\x20Service\x20name\x20is\x20required','\x20personalization\x20service','filter','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','toLowerCase','Fetching\x20SQL\x20for\x20\x27','resolveParentId','\x20--enriched','dim','794781cZptcI','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','Source:','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','Join\x20on:','customerPercent','/\x20and\x20','✔\x20No\x20changes\x20-\x20\x27','displayBehaviorsStats','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','\x22,\x20\x22type\x22:\x20\x22','pushParentYaml','Attempt:','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','customersWithEvents','tokens','public','\x0a\x20\x20]\x0a}\x0a','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','(id:\x20','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','\x20to\x20push\x20the\x20configuration','\x20\x20Note:\x20','Updating\x20parent\x20segment\x20\x27','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','paused','Fetching\x20sample\x20data...','error','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','/app/workflows/','No\x20RT-enabled\x20parent\x20segments\x20found','type','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Coverage:','sort','yellow','sections:','status:\x20','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','patch','create','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','ps:pz:service:list','segment:parent:view','relationships','null','Session:','Listing\x20RT-enabled\x20parent\x20segments...','identifier:\x20','Join:','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','Updating\x20personalization\x20service\x20\x27','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','\x0aNew\x20parent\x20segment\x20\x27','double','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','workflowId','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','\x20parent\x20segment','Error\x20parsing\x20YAML:\x20','displayPreviewResults','248xNWzMr','replace','stageCount','1clvHLM','state','\x20configured','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','schemaError','Finding\x20service\x20for\x20token...','Enriched:','displaySampleData','identifier','\x0aNo\x20sample\x20data\x20available','totalEvents','number','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','8XHTZZR','.yaml','enriched','some','table','folderId','addBehaviorsFile','Get\x20current\x20RT\x20configuration\x20version\x20status','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','red','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','customers','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','\x20Configuration\x20is\x20valid','open','site','pullParentYaml','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','string','Listing\x20RT\x20journeys\x20for\x20\x27','rowCount','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','updateParent','getOutputDatabaseName','get','\x20\x20Tables:\x201\x20customers\x20+\x20','Behaviors','description','No\x20parent\x20segments\x20match\x20pattern:\x20','Error:\x20Token\x20ID\x20is\x20required','getParentSQL','sampleData','\x20+\x20[','48qRYlEc','Creating\x20parent\x20segment\x20\x27','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','keys','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','timezone','68660fvhepg','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','status','Analyzing\x20changes...','stitchingKeys','Error:','Available\x20behaviors:','population','Output\x20Database:','any','Master\x20Table','allowedIps','audienceId:\x20','ps:pz:service:show','\x27\x20is\x20already\x20up\x20to\x20date','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','message','segment:parent:validate','match','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','<database>.<table>','eventKind','ps:pz:service:token:delete','map','file','Found\x20YAML\x20file:\x20','/app/dw/parentSegments/','Status:','Attributes:','id:\x20','Behavior:','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','\x20behaviors','Listing\x20personalizations\x20for\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','Error:\x20--name\x20is\x20required','created:','Error:\x20Service\x20ID\x20is\x20required','Listing\x20personalization\x20services\x20for\x20\x27','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','\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','attribute','Rows:','displayRealtimeInfo','listFields','Creating\x20personalization\x20service\x20\x27','Default','ps:pz:delete','ps:pz:show','output','indexOf','yes','Creating\x20personalization\x20\x27','5449380WQBSsR','\x20true','.yml','keyEventId:','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','format','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','✔\x20Retrieved\x20RT\x20configuration\x20version','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','Preview:','updatedAt','personalization','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','\x20is\x20already\x20up\x20to\x20date','Error:\x20--behavior\x20requires\x20a\x20name\x0a','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','\x0a✔\x20Workflow\x20started','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','workflowSessionId','✔\x20Created\x20personalization\x20\x27','resumeJourney','behaviors','\x20service','Fetching\x20behavior\x20list...','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','coveragePercent','✔\x20Created\x20parent\x20segment\x20\x27','\x20rows\x20'];a32_0x5a41=function(){return _0x535055;};return a32_0x5a41();}export class PSPzInitCommand extends BaseParentSegmentCommand{[a32_0x543316(0x243)]=a32_0x543316(0x1db);[a32_0x543316(0xd1)]='Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML';async['execute'](_0x395c71){const _0x4e2e29=a32_0x543316,{options:_0x822c6f,args:_0x4b80f5}=_0x395c71,_0x392fed=_0x4b80f5[0x0]||_0x822c6f['parentSegment'];if(!_0x392fed)return showParentSegmentNotSetError(_0x4e2e29(0x11e)+'\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'),0x1;const _0x459e17=resolveYamlFile(_0x392fed);if(!existsSync(_0x459e17))return showFileNotFoundError(_0x459e17,_0x392fed),0x1;let _0x2dbbff;try{_0x2dbbff=readFileSync(_0x459e17,_0x4e2e29(0x1cc));}catch(_0x558253){const _0x38c40f=_0x558253 instanceof Error?_0x558253[_0x4e2e29(0xed)]:String(_0x558253);return console['error'](_0x4e2e29(0x1ba)+_0x38c40f),0x1;}let _0xe1b4c4;try{_0xe1b4c4=parseDef(_0x2dbbff);}catch(_0x2079b1){const _0x10d926=_0x2079b1 instanceof Error?_0x2079b1['message']:String(_0x2079b1);return console[_0x4e2e29(0x29e)](a32_0x5f3fce[_0x4e2e29(0xbf)](_0x4e2e29(0xa4)+_0x10d926)),0x1;}if(_0xe1b4c4[_0x4e2e29(0x25e)]&&_0xe1b4c4[_0x4e2e29(0x25e)]['length']>0x0)return console[_0x4e2e29(0x29e)](a32_0x5f3fce[_0x4e2e29(0x8b)]('⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20'+_0x459e17)),console[_0x4e2e29(0x29e)](a32_0x5f3fce[_0x4e2e29(0x282)](_0x4e2e29(0x1ee)+_0xe1b4c4[_0x4e2e29(0x25e)][_0x4e2e29(0x165)]+_0x4e2e29(0x254))),0x1;!_0xe1b4c4['realtime']&&(_0xe1b4c4['realtime']={'events':[{'name':_0x4e2e29(0x14e),'source_table':_0x4e2e29(0xf1)}],'attributes':[{'name':_0x4e2e29(0x23e),'type':_0x4e2e29(0x1c9)}],'id_stitching':{'primary_key':_0xe1b4c4[_0x4e2e29(0x197)][_0x4e2e29(0xba)]===_0x4e2e29(0xc1)?_0x4e2e29(0x1ff):'user_id'}});_0xe1b4c4[_0x4e2e29(0x25e)]=[{'name':_0x4e2e29(0x215),'description':'Personalization\x20service\x20description','trigger_event':_0x4e2e29(0x14e),'sections':[{'name':_0x4e2e29(0x10b),'criteria':_0x4e2e29(0x1c0),'attributes':[_0x4e2e29(0x23e)]}]}];const _0x339a15=serializeDef(_0xe1b4c4);return writeFileSync(_0x459e17,_0x339a15,'utf-8'),console[_0x4e2e29(0x29e)](a32_0x5f3fce['green']('✔')+'\x20Added\x20personalization\x20template\x20to\x20'+a32_0x5f3fce[_0x4e2e29(0x238)](_0x459e17)),(!_0xe1b4c4[_0x4e2e29(0x256)]||_0x2dbbff[_0x4e2e29(0x10f)](_0x4e2e29(0x1a1))===-0x1)&&console[_0x4e2e29(0x29e)](a32_0x5f3fce[_0x4e2e29(0x277)]('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console[_0x4e2e29(0x29e)]('\x0a'+a32_0x5f3fce[_0x4e2e29(0x282)](_0x4e2e29(0x21d))),console[_0x4e2e29(0x29e)](_0x4e2e29(0x1a9)+_0x459e17+_0x4e2e29(0x144)),console[_0x4e2e29(0x29e)]('\x20\x202.\x20Run\x20'+a32_0x5f3fce[_0x4e2e29(0x282)](_0x4e2e29(0x234)+_0x392fed)+_0x4e2e29(0x298)),0x0;}}
1
+ const a32_0x50f93c=a32_0x3e39;(function(_0x538168,_0x47be5c){const _0x144968=a32_0x3e39,_0xcb03af=_0x538168();while(!![]){try{const _0x2b7db7=-parseInt(_0x144968(0x1ac))/0x1+parseInt(_0x144968(0xca))/0x2*(-parseInt(_0x144968(0xf3))/0x3)+-parseInt(_0x144968(0x16b))/0x4*(parseInt(_0x144968(0x2a1))/0x5)+parseInt(_0x144968(0x1da))/0x6*(-parseInt(_0x144968(0x228))/0x7)+parseInt(_0x144968(0xa9))/0x8*(parseInt(_0x144968(0xd7))/0x9)+parseInt(_0x144968(0x1e3))/0xa+-parseInt(_0x144968(0x17e))/0xb*(-parseInt(_0x144968(0x206))/0xc);if(_0x2b7db7===_0x47be5c)break;else _0xcb03af['push'](_0xcb03af['shift']());}catch(_0x52b2cf){_0xcb03af['push'](_0xcb03af['shift']());}}}(a32_0x571d,0xbb6ce));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a32_0x1c65cf 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 a32_0x3a28f3 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=a32_0x50f93c(0x107),LEGACY_PARENT_SEGMENT_DIR=a32_0x50f93c(0x225);function openBrowser(_0x4a7882){const _0x51174f=a32_0x50f93c,_0x86b231=process[_0x51174f(0x102)],_0xaaad5e=_0x86b231==='darwin'?'open':_0x86b231===_0x51174f(0xb4)?_0x51174f(0x24a):_0x51174f(0x1ce);spawn(_0xaaad5e,[_0x4a7882],{'detached':!![],'stdio':_0x51174f(0x191)})[_0x51174f(0xe9)]();}function migrateLegacyDirectory(){const _0x1821bd=a32_0x50f93c;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x4777f6=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x4777f6[_0x1821bd(0x29c)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x1821bd(0x185)](a32_0x3a28f3[_0x1821bd(0x1c6)](_0x1821bd(0x9e)+LEGACY_PARENT_SEGMENT_DIR+_0x1821bd(0x233)+PARENT_SEGMENT_DIR+_0x1821bd(0x227))),console['error'](a32_0x3a28f3[_0x1821bd(0x20b)]('\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x1821bd(0x29d))),![];console[_0x1821bd(0x185)](a32_0x3a28f3[_0x1821bd(0x1c6)](_0x1821bd(0x11a)+LEGACY_PARENT_SEGMENT_DIR+_0x1821bd(0x146)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console['error'](a32_0x3a28f3['green'](_0x1821bd(0x144)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x1ddc13){const _0x36c920=_0x1ddc13 instanceof Error?_0x1ddc13[_0x1821bd(0x26c)]:String(_0x1ddc13);return console['error'](a32_0x3a28f3[_0x1821bd(0x1d7)](_0x1821bd(0x257)+_0x36c920+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a32_0x50f93c(0x22a)](_0x4004a8){const _0x31f7f=a32_0x50f93c;return migrateLegacyDirectory(),super[_0x31f7f(0x22a)](_0x4004a8);}}function resolveYamlFile(_0x17fc7d){const _0x1172b7=a32_0x50f93c;if(_0x17fc7d[_0x1172b7(0xd2)](_0x1172b7(0x28b))||_0x17fc7d[_0x1172b7(0xd2)](_0x1172b7(0x182)))return _0x17fc7d;return a32_0x1c65cf[_0x1172b7(0x25b)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x17fc7d)+_0x1172b7(0x28b));}function formatProgressMessage(_0x1c22a1){const _0x363c10=a32_0x50f93c,_0x3713b0=_0x1c22a1[_0x363c10(0x29b)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x3713b0){const [,_0xf4f99f,_0xd298b1,_0x28ed5c='']=_0x3713b0;return a32_0x3a28f3[_0x363c10(0x20b)](_0xf4f99f+':')+'\x20'+_0xd298b1+a32_0x3a28f3['dim'](_0x28ed5c);}return a32_0x3a28f3[_0x363c10(0x20b)](_0x1c22a1);}function showFileNotFoundError(_0x15f67f,_0x59facb){const _0x545c34=a32_0x50f93c;console[_0x545c34(0x185)](a32_0x3a28f3['red'](_0x545c34(0x104)+_0x15f67f+'\x0a')),console['error'](a32_0x3a28f3[_0x545c34(0x2a6)](_0x545c34(0x151)+_0x59facb+'`\x20to\x20download\x20the\x20configuration\x20first'));}function displayRealtimeValidation(_0x557368){const _0x98d5ab=a32_0x50f93c;if(!_0x557368[_0x98d5ab(0x1dc)])return;const _0xc3f2b0=_0x557368[_0x98d5ab(0x1dc)],_0x468567=_0xc3f2b0['enabled']?a32_0x3a28f3[_0x98d5ab(0x25e)](_0x98d5ab(0x249)):a32_0x3a28f3[_0x98d5ab(0x1c6)](_0x98d5ab(0x1e4));console[_0x98d5ab(0x185)]('\x0a'+a32_0x3a28f3[_0x98d5ab(0x20b)](_0x98d5ab(0xd6))+'\x20'+_0x468567);if(_0xc3f2b0[_0x98d5ab(0x135)]&&_0xc3f2b0[_0x98d5ab(0x135)][_0x98d5ab(0x256)]>0x0){console['error']('\x20\x20'+a32_0x3a28f3[_0x98d5ab(0x20b)](_0x98d5ab(0x1f2))+'\x20'+_0xc3f2b0[_0x98d5ab(0x135)][_0x98d5ab(0x256)]+_0x98d5ab(0x1bd));for(const _0x5772d5 of _0xc3f2b0[_0x98d5ab(0x135)]){const _0x3f981e=_0x5772d5['sourceTableValid']===![]?a32_0x3a28f3[_0x98d5ab(0x1d7)]('✘'):a32_0x3a28f3[_0x98d5ab(0x25e)]('✔');console[_0x98d5ab(0x185)](_0x98d5ab(0xd3)+_0x3f981e+'\x20'+_0x5772d5[_0x98d5ab(0xbd)]),_0x5772d5[_0x98d5ab(0x230)]&&console[_0x98d5ab(0x185)](_0x98d5ab(0x10e)+a32_0x3a28f3[_0x98d5ab(0x1d7)](_0x5772d5[_0x98d5ab(0x230)]));}}if(_0xc3f2b0[_0x98d5ab(0x21f)]&&_0xc3f2b0[_0x98d5ab(0x21f)][_0x98d5ab(0x256)]>0x0){console['error']('\x20\x20'+a32_0x3a28f3[_0x98d5ab(0x20b)](_0x98d5ab(0x1a0))+'\x20'+_0xc3f2b0[_0x98d5ab(0x21f)][_0x98d5ab(0x256)]+_0x98d5ab(0x1bd));for(const _0x375410 of _0xc3f2b0[_0x98d5ab(0x21f)]){const _0x517626=_0x375410[_0x98d5ab(0xe5)]?a32_0x3a28f3['green']('✔'):a32_0x3a28f3[_0x98d5ab(0x1d7)]('✘');console[_0x98d5ab(0x185)](_0x98d5ab(0xd3)+_0x517626+'\x20'+_0x375410[_0x98d5ab(0xbd)]+'\x20'+a32_0x3a28f3[_0x98d5ab(0x20b)]('('+_0x375410[_0x98d5ab(0x202)]+')'));}}if(_0xc3f2b0[_0x98d5ab(0x190)]){const _0x348225=_0xc3f2b0[_0x98d5ab(0x190)][_0x98d5ab(0x27b)]?.[_0x98d5ab(0x256)]?'\x20+\x20['+_0xc3f2b0[_0x98d5ab(0x190)]['stitchingKeys']['join'](',\x20')+']':'';console['error']('\x20\x20'+a32_0x3a28f3[_0x98d5ab(0x20b)]('ID\x20Stitching:')+'\x20'+_0xc3f2b0[_0x98d5ab(0x190)][_0x98d5ab(0x1fd)]+_0x348225);}if(_0xc3f2b0['personalizationServices']&&_0xc3f2b0[_0x98d5ab(0x221)][_0x98d5ab(0x256)]>0x0){console[_0x98d5ab(0x185)]('\x20\x20'+a32_0x3a28f3[_0x98d5ab(0x20b)](_0x98d5ab(0x16e))+'\x20'+_0xc3f2b0[_0x98d5ab(0x221)][_0x98d5ab(0x256)]+_0x98d5ab(0x21e)+(_0xc3f2b0[_0x98d5ab(0x221)][_0x98d5ab(0x256)]!==0x1?'s':''));for(const _0x3d6fcc of _0xc3f2b0['personalizationServices']){console[_0x98d5ab(0x185)](_0x98d5ab(0x211)+_0x3d6fcc[_0x98d5ab(0xbd)]);}}}function showParentSegmentNotSetError(_0x283858){const _0x49740b=a32_0x50f93c;console['error'](a32_0x3a28f3[_0x49740b(0x1c6)](_0x49740b(0x155))),console[_0x49740b(0x185)](_0x283858);}export class ParentSegmentListCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x268);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x279);async[a32_0x50f93c(0x29f)](_0x46f37d){const _0x4fed78=a32_0x50f93c,{options:_0x38ac82,args:_0x310531,tdx:_0x42cf20}=_0x46f37d,_0x6929a4=_0x310531[0x0];_0x38ac82[_0x4fed78(0x1f3)]&&(console[_0x4fed78(0x185)]('Site:\x20'+_0x38ac82['site']),_0x6929a4&&console[_0x4fed78(0x185)](_0x4fed78(0xb1)+_0x6929a4));const _0x3ef790=await withSpinner(_0x6929a4?_0x4fed78(0x21c)+_0x6929a4+_0x4fed78(0x1c9):_0x4fed78(0x122),()=>_0x42cf20[_0x4fed78(0xb0)]['listParents'](),{'verbose':_0x38ac82[_0x4fed78(0x1f3)]});let _0x5bbe38=_0x3ef790['data'];if(_0x6929a4){const _0x388676=_0x6929a4[_0x4fed78(0x147)](/[.+^${}()|[\]\\]/g,_0x4fed78(0x17b))['replace'](/\*/g,'.*')[_0x4fed78(0x147)](/\?/g,'.'),_0xb1599f=new RegExp('^'+_0x388676+'$','i');_0x5bbe38=_0x5bbe38[_0x4fed78(0x12f)](_0x33cdaa=>_0xb1599f[_0x4fed78(0x157)](_0x33cdaa[_0x4fed78(0x21f)][_0x4fed78(0xbd)]));}_0x5bbe38[_0x4fed78(0xe2)]((_0x1c3a3a,_0x4f9a60)=>_0x1c3a3a[_0x4fed78(0x21f)][_0x4fed78(0xbd)][_0x4fed78(0x181)](_0x4f9a60['attributes'][_0x4fed78(0xbd)])),console['error']('✔\x20Found\x20'+_0x5bbe38[_0x4fed78(0x256)]+_0x4fed78(0x12d)+(_0x5bbe38[_0x4fed78(0x256)]!==0x1?'s':''));const _0x254fd1=_0x3a3ffd=>{const _0x49e420=_0x4fed78;return getConsoleNextUrl(_0x38ac82[_0x49e420(0x1ed)],'/app/dw/parentSegments/'+_0x3a3ffd);};if(_0x38ac82[_0x4fed78(0x159)]===_0x4fed78(0x245)||_0x38ac82['format']===_0x4fed78(0x288)){const _0x4354fa=_0x5bbe38[_0x4fed78(0x226)](_0x1fa7d2=>({..._0x1fa7d2,'url':_0x254fd1(_0x1fa7d2['id'])}));await handleSDKOutput(_0x4354fa,_0x38ac82);}else{if(_0x5bbe38[_0x4fed78(0x256)]===0x0)_0x6929a4?console[_0x4fed78(0x10a)](_0x4fed78(0x23d)+_0x6929a4):console[_0x4fed78(0x10a)](_0x4fed78(0x26f));else for(const _0xc9cf1e of _0x5bbe38){const _0x3deebd=_0xc9cf1e[_0x4fed78(0x21f)][_0x4fed78(0x195)]?a32_0x3a28f3[_0x4fed78(0x20b)]('\x20('+formatRows(_0xc9cf1e[_0x4fed78(0x21f)][_0x4fed78(0x195)])+')'):'',_0x2a618a=hyperlink(_0xc9cf1e[_0x4fed78(0x21f)][_0x4fed78(0xbd)],_0x254fd1(_0xc9cf1e['id']));console[_0x4fed78(0x10a)](_0x4fed78(0x282)+_0x2a618a+_0x3deebd);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0xcd);[a32_0x50f93c(0x121)]='Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async['execute'](_0xfa39a8){const _0x22365c=a32_0x50f93c,{options:_0x4f0fb3,args:_0x37d2fe,tdx:_0x25d0be}=_0xfa39a8;console[_0x22365c(0x185)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a'+_0x22365c(0x1c5)+_0x22365c(0x188));const _0x507f00=_0x4f0fb3;if(_0x37d2fe['length']===0x0)return console[_0x22365c(0x185)](a32_0x3a28f3[_0x22365c(0x1d7)](_0x22365c(0x194))),console['error'](_0x22365c(0x24f)),0x1;const _0x3d2ef4=_0x37d2fe[0x0];if(!_0x507f00[_0x22365c(0x18b)]||!_0x507f00[_0x22365c(0x1f9)])return console[_0x22365c(0x185)](_0x22365c(0x251)),console['error'](_0x22365c(0x24f)),0x1;_0x507f00[_0x22365c(0x1f3)]&&(console[_0x22365c(0x185)](_0x22365c(0x22f)+_0x507f00['site']),console[_0x22365c(0x185)](_0x22365c(0xf2)+_0x3d2ef4),console[_0x22365c(0x185)](_0x22365c(0xd4)+_0x507f00[_0x22365c(0x18b)]),console[_0x22365c(0x185)](_0x22365c(0x11e)+_0x507f00[_0x22365c(0x1f9)]));const _0x3b4eca=await loadJSONFromOptions(_0x507f00['attributes'],_0x507f00['attributesFile']),_0x14cc66=await loadJSONFromOptions(_0x507f00['behaviors'],_0x507f00[_0x22365c(0x1ee)]),_0x501050=await loadJSONFromOptions(_0x507f00[_0x22365c(0x1ec)],_0x507f00['customerGroupFile']),_0x9a7930={'name':_0x3d2ef4,'description':_0x507f00[_0x22365c(0x121)],'scheduleType':_0x507f00[_0x22365c(0x263)],'scheduleOption':_0x507f00['scheduleOption'],'timezone':_0x507f00[_0x22365c(0xab)],'master':{'parentDatabaseName':_0x507f00[_0x22365c(0x18b)],'parentTableName':_0x507f00[_0x22365c(0x1f9)]},'attributes':_0x3b4eca,'behaviors':_0x14cc66,'customerGroup':_0x501050},_0x2171ef=await withSpinner(_0x22365c(0x2a0)+_0x3d2ef4+_0x22365c(0x1c9),()=>_0x25d0be[_0x22365c(0xb0)][_0x22365c(0x100)](_0x9a7930),{'verbose':_0x4f0fb3['verbose']}),_0xff5e98=_0x2171ef['data'];return console[_0x22365c(0x185)](_0x22365c(0x91)+_0xff5e98[_0x22365c(0xbd)]+_0x22365c(0x17d)+_0xff5e98['id']),await handleSDKOutput([_0xff5e98],_0x4f0fb3),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x11b);[a32_0x50f93c(0x121)]='Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async['execute'](_0x15f279){const _0x4a2ad1=a32_0x50f93c,{options:_0x530a80,args:_0x387c49,tdx:_0x39eb8a}=_0x15f279;console[_0x4a2ad1(0x185)](_0x4a2ad1(0x212)+_0x4a2ad1(0x1c5)+_0x4a2ad1(0x188));const _0x92ec20=_0x530a80;if(_0x387c49[_0x4a2ad1(0x256)]===0x0)return console[_0x4a2ad1(0x185)](a32_0x3a28f3['red'](_0x4a2ad1(0x194))),console[_0x4a2ad1(0x185)](_0x4a2ad1(0x139)),0x1;const _0x50a43c=_0x387c49[0x0];_0x92ec20[_0x4a2ad1(0x1f3)]&&(console[_0x4a2ad1(0x185)](_0x4a2ad1(0x22f)+_0x92ec20['site']),console['error'](_0x4a2ad1(0x145)+_0x50a43c));const _0x28ce76=await withSpinner(_0x4a2ad1(0x1b9)+_0x50a43c+_0x4a2ad1(0x1c9),()=>_0x39eb8a[_0x4a2ad1(0xb0)][_0x4a2ad1(0x26d)](_0x50a43c),{'verbose':_0x92ec20[_0x4a2ad1(0x1f3)]}),_0xf06dbc=_0x28ce76[_0x4a2ad1(0x189)],_0xe71895=await loadJSONFromOptions(_0x92ec20[_0x4a2ad1(0x128)],_0x92ec20[_0x4a2ad1(0x11d)]),_0x4ec3cc=await loadJSONFromOptions(_0x92ec20[_0x4a2ad1(0x93)],_0x92ec20[_0x4a2ad1(0xde)]),_0x17f722={'name':_0xf06dbc[_0x4a2ad1(0xbd)],'description':_0x92ec20['description']!==undefined?_0x92ec20[_0x4a2ad1(0x121)]:_0xf06dbc[_0x4a2ad1(0x121)],'scheduleType':_0x92ec20[_0x4a2ad1(0x263)]!==undefined?_0x92ec20[_0x4a2ad1(0x263)]:_0xf06dbc[_0x4a2ad1(0x263)],'scheduleOption':_0x92ec20['scheduleOption']!==undefined?_0x92ec20[_0x4a2ad1(0x1ba)]:_0xf06dbc[_0x4a2ad1(0x1ba)],'timezone':_0x92ec20[_0x4a2ad1(0xab)]!==undefined?_0x92ec20[_0x4a2ad1(0xab)]:_0xf06dbc[_0x4a2ad1(0xab)],'master':_0xf06dbc[_0x4a2ad1(0x27c)],'attributes':_0xe71895?[..._0xf06dbc[_0x4a2ad1(0x21f)]||[],..._0xe71895]:_0xf06dbc[_0x4a2ad1(0x21f)],'behaviors':_0x4ec3cc?[..._0xf06dbc[_0x4a2ad1(0x1bc)]||[],..._0x4ec3cc]:_0xf06dbc['behaviors'],'customerGroup':_0xf06dbc[_0x4a2ad1(0x1ec)]},_0x4ada7a=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x50a43c+_0x4a2ad1(0x1c9),()=>_0x39eb8a[_0x4a2ad1(0xb0)][_0x4a2ad1(0x2a2)](_0x50a43c,_0x17f722),{'verbose':_0x92ec20[_0x4a2ad1(0x1f3)]}),_0x237888=_0x4ada7a[_0x4a2ad1(0x189)];return console[_0x4a2ad1(0x185)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x237888[_0x4a2ad1(0xbd)]+'\x27'),await handleSDKOutput([_0x237888],_0x92ec20),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']='segment:parent:pull';[a32_0x50f93c(0x121)]=a32_0x50f93c(0x106);async[a32_0x50f93c(0x29f)](_0x54a6b7){const _0x4cde7a=a32_0x50f93c,{options:_0x461215,args:_0x24edd9,tdx:_0xb5004a}=_0x54a6b7,_0x40cc73=_0x461215,_0x4f07aa=_0x24edd9[0x0]||_0x461215['parentSegment'];if(!_0x4f07aa)return showParentSegmentNotSetError(_0x4cde7a(0x165)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment'),0x1;if(_0x40cc73[_0x4cde7a(0x13b)]&&_0x40cc73[_0x4cde7a(0x108)])return console[_0x4cde7a(0x185)](a32_0x3a28f3['red'](_0x4cde7a(0x1e2))),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x20b)](_0x4cde7a(0x18c))),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x20b)](_0x4cde7a(0x130)+PARENT_SEGMENT_DIR+_0x4cde7a(0x1c2))),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x2a6)]('Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u')),0x1;const _0x191dec=_0x40cc73[_0x4cde7a(0x108)]||a32_0x1c65cf[_0x4cde7a(0x25b)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x4f07aa)+_0x4cde7a(0x28b));_0x40cc73[_0x4cde7a(0x1f3)]&&(console[_0x4cde7a(0x185)](_0x4cde7a(0x22f)+_0x40cc73[_0x4cde7a(0x1ed)]),console['error'](_0x4cde7a(0x145)+_0x4f07aa),console[_0x4cde7a(0x185)](_0x4cde7a(0x163)+_0x191dec));const _0x5ae446=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x4f07aa+_0x4cde7a(0x1c9),()=>_0xb5004a[_0x4cde7a(0xb0)][_0x4cde7a(0x22d)](_0x4f07aa),{'verbose':_0x40cc73[_0x4cde7a(0x1f3)]}),_0x15534f=_0x5ae446['data'];if(existsSync(_0x191dec)){const _0x3cceb3=readFileSync(_0x191dec,_0x4cde7a(0x275)),_0x56d78a=generateDiff(_0x3cceb3,_0x15534f);if(!hasChanges(_0x56d78a))console['error'](a32_0x3a28f3[_0x4cde7a(0x25e)]('✔')+_0x4cde7a(0x219)+a32_0x3a28f3[_0x4cde7a(0x2a6)](_0x191dec)+_0x4cde7a(0x10d));else{console['error'](_0x4cde7a(0x13a)+_0x191dec+'\x27:'),console[_0x4cde7a(0x185)]('─'[_0x4cde7a(0x129)](0x3c)),console['error'](formatDiffWithColors(_0x56d78a)),console[_0x4cde7a(0x185)]('─'[_0x4cde7a(0x129)](0x3c));if(!_0x40cc73[_0x4cde7a(0x265)]){if(!isInteractive())return console['error'](a32_0x3a28f3[_0x4cde7a(0x1d7)](_0x4cde7a(0x237)),_0x4cde7a(0x15c)),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x20b)](_0x4cde7a(0x294))),0x1;const _0x21f32d=await confirmKey('Overwrite\x20\x27'+_0x191dec+'\x27?');if(!_0x21f32d)return console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x1c6)](_0x4cde7a(0x1e9))),0x1;}writeFileSync(_0x191dec,_0x15534f,_0x4cde7a(0x275)),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x25e)]('✔')+_0x4cde7a(0x164)+a32_0x3a28f3[_0x4cde7a(0x2a6)](_0x191dec));}}else{const _0x4c020f=a32_0x1c65cf['dirname'](_0x191dec);!existsSync(_0x4c020f)&&mkdirSync(_0x4c020f,{'recursive':!![]}),writeFileSync(_0x191dec,_0x15534f,_0x4cde7a(0x275)),console[_0x4cde7a(0x185)](a32_0x3a28f3[_0x4cde7a(0x25e)]('✔')+_0x4cde7a(0x164)+a32_0x3a28f3[_0x4cde7a(0x2a6)](_0x191dec));}return saveSessionContext({'parent_segment':_0x4f07aa},_0x40cc73[_0x4cde7a(0xa3)]),console[_0x4cde7a(0x185)](a32_0x3a28f3['green']('✔')+_0x4cde7a(0xa8)+a32_0x3a28f3[_0x4cde7a(0x20b)](_0x4cde7a(0x225))+_0x4cde7a(0x22b)+a32_0x3a28f3[_0x4cde7a(0x2a6)](_0x4f07aa)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{['name']=a32_0x50f93c(0x270);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x28d);async[a32_0x50f93c(0x29f)](_0x45de11){const _0x3e2f6d=a32_0x50f93c,{options:_0x2c409b,args:_0x9cbfca,tdx:_0x365d47}=_0x45de11,_0x59d98e=_0x2c409b,_0xff6d8e=_0x9cbfca[0x0]||_0x2c409b['parentSegment'];if(!_0xff6d8e)return showParentSegmentNotSetError(_0x3e2f6d(0x9f)+_0x3e2f6d(0x27a)),0x1;const _0x3149ce=resolveYamlFile(_0xff6d8e);if(!existsSync(_0x3149ce))return showFileNotFoundError(_0x3149ce,_0xff6d8e),0x1;_0x59d98e[_0x3e2f6d(0x1f3)]&&(console['error'](_0x3e2f6d(0x22f)+_0x59d98e[_0x3e2f6d(0x1ed)]),console[_0x3e2f6d(0x185)](_0x3e2f6d(0x1c8)+_0x3149ce));let _0x4798c4;try{_0x4798c4=readFileSync(_0x3149ce,_0x3e2f6d(0x275));}catch(_0x5a57dc){const _0x1b77fd=_0x5a57dc instanceof Error?_0x5a57dc[_0x3e2f6d(0x26c)]:String(_0x5a57dc);return console[_0x3e2f6d(0x185)]('Error\x20reading\x20file:\x20'+_0x1b77fd),0x1;}const _0x1a4c3b=await withSpinner('Analyzing\x20changes...',()=>_0x365d47[_0x3e2f6d(0xb0)]['pushParentYaml'](_0x4798c4),{'verbose':_0x59d98e[_0x3e2f6d(0x1f3)]}),_0x14f67e=_0x1a4c3b[_0x3e2f6d(0x189)],{isNew:_0x1016da,name:_0x327f14,hasChanges:_0x27d02c,diffFormatted:_0x27b93a}=_0x14f67e;if(!_0x27d02c)return console['error']('✔\x20No\x20changes\x20-\x20\x27'+_0x327f14+'\x27\x20is\x20already\x20up\x20to\x20date'),0x0;_0x1016da?console['error'](_0x3e2f6d(0xc3)+_0x327f14+'\x27:'):console['error'](_0x3e2f6d(0x25f)+_0x327f14+'\x27:');console['error']('─'[_0x3e2f6d(0x129)](0x3c)),console[_0x3e2f6d(0x185)](_0x27b93a),console[_0x3e2f6d(0x185)]('─'[_0x3e2f6d(0x129)](0x3c));const _0x1c1e09=_0x1016da?_0x3e2f6d(0x142)+_0x327f14+'\x27?':_0x3e2f6d(0x9b)+_0x327f14+'\x27?';if(!_0x59d98e[_0x3e2f6d(0x265)]){if(!isInteractive())return console[_0x3e2f6d(0x185)](a32_0x3a28f3['red'](_0x3e2f6d(0x237)),_0x3e2f6d(0x15c)),console['error'](a32_0x3a28f3[_0x3e2f6d(0x20b)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x605554=await confirmKey(_0x1c1e09);if(!_0x605554)return console['error'](a32_0x3a28f3[_0x3e2f6d(0x1c6)](_0x3e2f6d(0x1e9))),0x1;}const _0x33bfb3=_0x1016da?'Creating':_0x3e2f6d(0xdb),_0x417231=await withSpinner(_0x33bfb3+_0x3e2f6d(0xf0)+_0x327f14+'\x27...',()=>_0x14f67e['apply'](),{'verbose':_0x59d98e[_0x3e2f6d(0x1f3)]}),_0x2eb8f1=_0x417231[_0x3e2f6d(0x189)],_0x38d27d=getConsoleNextUrl(_0x59d98e['site'],_0x3e2f6d(0x192)+_0x2eb8f1['id']),_0x5f507b=_0x1016da?'Created':_0x3e2f6d(0x14a);return console[_0x3e2f6d(0x185)]('✔\x20'+_0x5f507b+_0x3e2f6d(0xf0)+_0x2eb8f1[_0x3e2f6d(0xbd)]+'\x27'),console['error']('\x20\x20'+_0x38d27d),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x209);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x21b);async[a32_0x50f93c(0x29f)](_0xde4aa3){const _0x4a546c=a32_0x50f93c,{options:_0x54393d,args:_0x14e66f,tdx:_0x5dd1b3}=_0xde4aa3,_0x1f033b=_0x54393d,_0x363f10=_0x14e66f[0x0]||_0x54393d[_0x4a546c(0x15a)];if(!_0x363f10)return showParentSegmentNotSetError(_0x4a546c(0x20c)+_0x4a546c(0xc1)+_0x4a546c(0x1cc)+'\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a'+_0x4a546c(0xaf)+_0x4a546c(0x117)),0x1;const _0x5ba7f9=resolveYamlFile(_0x363f10);if(!existsSync(_0x5ba7f9))return showFileNotFoundError(_0x5ba7f9,_0x363f10),0x1;_0x1f033b[_0x4a546c(0x1f3)]&&(console[_0x4a546c(0x185)](_0x4a546c(0x22f)+_0x1f033b[_0x4a546c(0x1ed)]),console['error']('YAML\x20file:\x20'+_0x5ba7f9));let _0x1e602d;try{_0x1e602d=readFileSync(_0x5ba7f9,_0x4a546c(0x275));}catch(_0x5e0964){const _0x4fbf43=_0x5e0964 instanceof Error?_0x5e0964['message']:String(_0x5e0964);return console[_0x4a546c(0x185)](_0x4a546c(0x17f)+_0x4fbf43),0x1;}const _0x899049=createCommandSpinner(a32_0x3a28f3[_0x4a546c(0x20b)]('Validating\x20configuration...'),{'verbose':_0x1f033b[_0x4a546c(0x1f3)]});_0x899049[_0x4a546c(0x24a)]();const _0x20cafe={'onProgress':_0x554b34=>{const _0x4625bc=_0x4a546c;_0x899049[_0x4625bc(0xef)]=formatProgressMessage(_0x554b34);}};if(_0x1f033b[_0x4a546c(0x27c)])_0x20cafe['master']=!![];if(_0x1f033b[_0x4a546c(0x1f7)])_0x20cafe[_0x4a546c(0x1f7)]=!![];_0x1f033b[_0x4a546c(0x103)]&&(_0x20cafe['attribute']=_0x1f033b[_0x4a546c(0x103)]);_0x1f033b[_0x4a546c(0x234)]&&(_0x20cafe[_0x4a546c(0x234)]=_0x1f033b[_0x4a546c(0x234)]);if(_0x1f033b['interval'])_0x20cafe[_0x4a546c(0x156)]=_0x1f033b[_0x4a546c(0x156)];let _0x170cd0;try{_0x170cd0=await _0x5dd1b3[_0x4a546c(0xb0)][_0x4a546c(0xbb)](_0x1e602d,_0x20cafe),_0x899049[_0x4a546c(0x27d)]();}catch(_0x310e85){_0x899049[_0x4a546c(0x27d)]();throw _0x310e85;}const _0x32b0e1=_0x1f033b[_0x4a546c(0x156)]||_0x4a546c(0xff);return this[_0x4a546c(0xfb)](_0x170cd0,_0x20cafe,_0x5ba7f9,_0x32b0e1),_0x170cd0[_0x4a546c(0x161)]?0x0:0x1;}[a32_0x50f93c(0xfb)](_0x41369c,_0x11f2b5,_0x480212,_0x5a009e){const _0x3cad59=a32_0x50f93c;console[_0x3cad59(0x185)]('\x0a'+a32_0x3a28f3[_0x3cad59(0x15d)](_0x3cad59(0x132))+'\x20'+_0x41369c[_0x3cad59(0xbd)]),console['error']('═'[_0x3cad59(0x129)](0x3c)),this[_0x3cad59(0x8f)](_0x41369c);if(typeof _0x11f2b5[_0x3cad59(0x103)]===_0x3cad59(0x187)){this['displayAttributesStats'](_0x41369c),this['displaySummary'](_0x41369c),this[_0x3cad59(0x1db)](_0x480212,_0x5a009e,_0x3cad59(0x103),_0x11f2b5[_0x3cad59(0x103)]);return;}if(_0x11f2b5[_0x3cad59(0x103)]===!![]){this[_0x3cad59(0xb2)](_0x41369c),this[_0x3cad59(0x183)](_0x41369c),this['displayPreviewHints'](_0x480212,_0x5a009e,'attributes');return;}if(typeof _0x11f2b5[_0x3cad59(0x234)]===_0x3cad59(0x187)){this[_0x3cad59(0x272)](_0x41369c,_0x5a009e),this[_0x3cad59(0x183)](_0x41369c),this['displayPreviewHints'](_0x480212,_0x5a009e,_0x3cad59(0x234),_0x11f2b5[_0x3cad59(0x234)]);return;}if(_0x11f2b5['behavior']===!![]){this[_0x3cad59(0x272)](_0x41369c,_0x5a009e),this[_0x3cad59(0x183)](_0x41369c),this['displayPreviewHints'](_0x480212,_0x5a009e,_0x3cad59(0x1bc));return;}this[_0x3cad59(0xb2)](_0x41369c),this[_0x3cad59(0x272)](_0x41369c,_0x5a009e),this[_0x3cad59(0x217)](_0x41369c),this[_0x3cad59(0x183)](_0x41369c),this[_0x3cad59(0x1db)](_0x480212,_0x5a009e,_0x3cad59(0x176));}[a32_0x50f93c(0x217)](_0x559061){displayRealtimeValidation(_0x559061);}[a32_0x50f93c(0x1db)](_0x17a351,_0x4a25bb,_0x1652ee,_0x209024){const _0x2662c3=a32_0x50f93c;console[_0x2662c3(0x185)]('\x0a'+a32_0x3a28f3[_0x2662c3(0x20b)](_0x2662c3(0xe6)));const _0x2dd866=_0x4a25bb!==_0x2662c3(0xff)?'\x20--interval\x20'+_0x4a25bb:'';if(_0x1652ee==='attribute'&&_0x209024)console[_0x2662c3(0x185)]('\x20\x20'+a32_0x3a28f3[_0x2662c3(0x20b)](_0x2662c3(0x1f6)+_0x17a351+_0x2662c3(0xda)+_0x209024+'\x22'+_0x2dd866));else{if(_0x1652ee==='behavior'&&_0x209024)console['error']('\x20\x20'+a32_0x3a28f3['dim'](_0x2662c3(0x1f6)+_0x17a351+'\x20--behavior\x20\x22'+_0x209024+'\x22'+_0x2dd866));else(_0x1652ee===_0x2662c3(0x21f)||_0x1652ee==='all')&&console['error']('\x20\x20'+a32_0x3a28f3[_0x2662c3(0x20b)](_0x2662c3(0x1f6)+_0x17a351+_0x2662c3(0xc2)+_0x2dd866));}(_0x1652ee===_0x2662c3(0x1bc)||_0x1652ee===_0x2662c3(0x176))&&console[_0x2662c3(0x185)]('\x20\x20'+a32_0x3a28f3[_0x2662c3(0x20b)](_0x2662c3(0x1f6)+_0x17a351+'\x20--behavior\x20\x22<name>\x22'+_0x2dd866)),_0x1652ee===_0x2662c3(0x176)&&console[_0x2662c3(0x185)]('\x20\x20'+a32_0x3a28f3['dim'](_0x2662c3(0x1f6)+_0x17a351+'\x20--enriched'+_0x2dd866));}[a32_0x50f93c(0x8f)](_0x285c76){const _0x548096=a32_0x50f93c,{master:_0x37945b}=_0x285c76,_0xb58c8f=_0x37945b[_0x548096(0x13c)]?a32_0x3a28f3[_0x548096(0x25e)]('✔'):a32_0x3a28f3[_0x548096(0x1d7)]('✘');console[_0x548096(0x185)]('\x0a'+a32_0x3a28f3[_0x548096(0x20b)](_0x548096(0x239))),console[_0x548096(0x185)](_0xb58c8f+'\x20'+a32_0x3a28f3[_0x548096(0x15d)](_0x37945b['database']+'.'+_0x37945b[_0x548096(0x1f9)])),_0x37945b[_0x548096(0x13c)]?_0x37945b[_0x548096(0x1dd)]!==undefined&&console[_0x548096(0x185)]('\x20\x20'+a32_0x3a28f3[_0x548096(0x20b)]('Rows:')+'\x20'+a32_0x3a28f3[_0x548096(0x2a6)](formatRows(_0x37945b[_0x548096(0x1dd)]))):console[_0x548096(0x185)]('\x20\x20'+a32_0x3a28f3[_0x548096(0x1d7)](_0x548096(0x97))+'\x20'+_0x37945b[_0x548096(0x25a)]);}[a32_0x50f93c(0xb2)](_0x47af38){const _0x48bbd0=a32_0x50f93c;if(_0x47af38[_0x48bbd0(0x21f)][_0x48bbd0(0x256)]===0x0)return;console[_0x48bbd0(0x185)]('\x0a'+a32_0x3a28f3['dim'](_0x48bbd0(0x19f)));for(const _0x13297e of _0x47af38[_0x48bbd0(0x21f)]){const _0x402f62=_0x13297e['schemaValid']?a32_0x3a28f3[_0x48bbd0(0x25e)]('✔'):a32_0x3a28f3[_0x48bbd0(0x1d7)]('✘');let _0x4470d7='';if(_0x13297e[_0x48bbd0(0x13c)]&&_0x13297e['matchedCount']!==undefined&&_0x13297e[_0x48bbd0(0x248)]!==undefined){const _0x16f35a=_0x13297e['coveragePercent']['toFixed'](0x1),_0x4de1fa=_0x13297e['coveragePercent']>=0x50?a32_0x3a28f3[_0x48bbd0(0x25e)]:_0x13297e[_0x48bbd0(0x248)]>=0x32?a32_0x3a28f3['yellow']:a32_0x3a28f3[_0x48bbd0(0x1d7)];_0x4470d7='\x20'+a32_0x3a28f3[_0x48bbd0(0x20b)](_0x48bbd0(0x1ea))+'\x20'+_0x4de1fa(_0x16f35a+'%')+'\x20('+formatRows(_0x13297e['matchedCount'])+_0x48bbd0(0x1d3);}console[_0x48bbd0(0x185)](_0x402f62+'\x20'+a32_0x3a28f3[_0x48bbd0(0x15d)](_0x13297e[_0x48bbd0(0xbd)])+_0x4470d7),console[_0x48bbd0(0x185)]('\x20\x20'+a32_0x3a28f3['dim'](_0x48bbd0(0xc8))+'\x20'+a32_0x3a28f3[_0x48bbd0(0x15d)](_0x13297e[_0x48bbd0(0x18b)]+'.'+_0x13297e[_0x48bbd0(0x1f9)]));const _0x33d378=_0x13297e[_0x48bbd0(0x252)]===_0x13297e[_0x48bbd0(0xaa)]?a32_0x3a28f3[_0x48bbd0(0x20b)]('Join\x20on:')+'\x20'+_0x13297e[_0x48bbd0(0x252)]:a32_0x3a28f3['dim']('Join:')+'\x20'+_0x13297e[_0x48bbd0(0x252)]+_0x48bbd0(0x22b)+_0x13297e[_0x48bbd0(0xaa)];console[_0x48bbd0(0x185)]('\x20\x20'+_0x33d378),console[_0x48bbd0(0x185)]('\x20\x20'+a32_0x3a28f3[_0x48bbd0(0x20b)](_0x48bbd0(0x26e))),this[_0x48bbd0(0x19c)](_0x13297e[_0x48bbd0(0xa5)]),!_0x13297e[_0x48bbd0(0x13c)]&&console[_0x48bbd0(0x185)]('\x20\x20'+a32_0x3a28f3['red'](_0x48bbd0(0x97))+'\x20'+_0x13297e['schemaError']);}}[a32_0x50f93c(0x272)](_0x3c0130,_0x3cefce){const _0x3aaa72=a32_0x50f93c;if(_0x3c0130[_0x3aaa72(0x1bc)][_0x3aaa72(0x256)]===0x0)return;console[_0x3aaa72(0x185)]('\x0a'+a32_0x3a28f3['dim'](_0x3aaa72(0x1f1))+'\x20'+a32_0x3a28f3[_0x3aaa72(0x20b)]('('+_0x3cefce+')'));for(const _0x5a5308 of _0x3c0130['behaviors']){const _0x1e0b0b=_0x5a5308[_0x3aaa72(0x13c)]?a32_0x3a28f3[_0x3aaa72(0x25e)]('✔'):a32_0x3a28f3[_0x3aaa72(0x1d7)]('✘');let _0x12f865='';if(_0x5a5308[_0x3aaa72(0x13c)]&&_0x5a5308[_0x3aaa72(0x16f)]!==undefined&&_0x5a5308['totalEvents']!==undefined){const _0x1c0b57=_0x5a5308['customerPercent']?.[_0x3aaa72(0x284)](0x1)||'?',_0x3d7fcb=(_0x5a5308[_0x3aaa72(0x1e5)]??0x0)>=0x32?a32_0x3a28f3[_0x3aaa72(0x25e)]:(_0x5a5308[_0x3aaa72(0x1e5)]??0x0)>=0x14?a32_0x3a28f3[_0x3aaa72(0x1c6)]:a32_0x3a28f3[_0x3aaa72(0x1d7)];_0x12f865='\x20'+a32_0x3a28f3['dim'](_0x3aaa72(0x1b8))+'\x20'+_0x3d7fcb(formatRows(_0x5a5308[_0x3aaa72(0x16f)]))+'\x20('+_0x1c0b57+'%)\x20'+a32_0x3a28f3[_0x3aaa72(0x20b)](_0x3aaa72(0x1f2))+'\x20'+a32_0x3a28f3[_0x3aaa72(0x2a6)](formatRows(_0x5a5308[_0x3aaa72(0x299)]));}console['error'](_0x1e0b0b+'\x20'+a32_0x3a28f3[_0x3aaa72(0x15d)](_0x5a5308['name'])+_0x12f865),console[_0x3aaa72(0x185)]('\x20\x20'+a32_0x3a28f3[_0x3aaa72(0x20b)]('Source:')+'\x20'+a32_0x3a28f3['bold'](_0x5a5308[_0x3aaa72(0x18b)]+'.'+_0x5a5308[_0x3aaa72(0x1f9)]));const _0x34da21=_0x5a5308['joinKey']===_0x5a5308['foreignKey']?a32_0x3a28f3[_0x3aaa72(0x20b)](_0x3aaa72(0x196))+'\x20'+_0x5a5308[_0x3aaa72(0x252)]:a32_0x3a28f3[_0x3aaa72(0x20b)](_0x3aaa72(0xfd))+'\x20'+_0x5a5308[_0x3aaa72(0x252)]+_0x3aaa72(0x22b)+_0x5a5308['foreignKey'];console['error']('\x20\x20'+_0x34da21),console[_0x3aaa72(0x185)]('\x20\x20'+a32_0x3a28f3[_0x3aaa72(0x20b)](_0x3aaa72(0x26e))),this[_0x3aaa72(0x19c)](_0x5a5308['columns']),!_0x5a5308['schemaValid']&&console[_0x3aaa72(0x185)]('\x20\x20'+a32_0x3a28f3[_0x3aaa72(0x1d7)](_0x3aaa72(0x97))+'\x20'+_0x5a5308[_0x3aaa72(0x25a)]);}}[a32_0x50f93c(0x19c)](_0x88f45b){const _0x1e7f09=a32_0x50f93c;for(const _0x2fb3e6 of _0x88f45b){_0x2fb3e6[_0x1e7f09(0x172)]===_0x2fb3e6[_0x1e7f09(0x96)]||_0x2fb3e6[_0x1e7f09(0x96)]==='*'?console[_0x1e7f09(0x185)](_0x1e7f09(0x211)+_0x2fb3e6[_0x1e7f09(0x172)]):console[_0x1e7f09(0x185)](_0x1e7f09(0x211)+_0x2fb3e6[_0x1e7f09(0x172)]+'\x20'+a32_0x3a28f3[_0x1e7f09(0x20b)]('('+_0x2fb3e6[_0x1e7f09(0x96)]+')'));}}[a32_0x50f93c(0x183)](_0x39e3ab){const _0x56f6f4=a32_0x50f93c;console[_0x56f6f4(0x185)]('─'['repeat'](0x3c));if(_0x39e3ab[_0x56f6f4(0x1c0)][_0x56f6f4(0x256)]>0x0){console[_0x56f6f4(0x185)]('\x0a'+a32_0x3a28f3[_0x56f6f4(0x1d7)](_0x56f6f4(0x19a)));for(const _0x35265f of _0x39e3ab[_0x56f6f4(0x1c0)]){console[_0x56f6f4(0x185)]('\x20\x20'+a32_0x3a28f3['red']('•')+'\x20'+_0x35265f);}}_0x39e3ab[_0x56f6f4(0x161)]&&console[_0x56f6f4(0x185)]('\x0a'+a32_0x3a28f3[_0x56f6f4(0x25e)]('✔')+'\x20Configuration\x20is\x20valid');}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x180);[a32_0x50f93c(0x121)]=a32_0x50f93c(0xa0);async[a32_0x50f93c(0x29f)](_0x4fae19){const _0x57523e=a32_0x50f93c,{options:_0x9e1f42,args:_0x4f0f4a,tdx:_0x4e98f0}=_0x4fae19,_0x2252b2=_0x9e1f42,_0x2bda75=_0x4f0f4a[0x0]||_0x9e1f42[_0x57523e(0x15a)];if(!_0x2bda75)return showParentSegmentNotSetError(_0x57523e(0x177)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a'+_0x57523e(0x1bb)+'\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a'+_0x57523e(0x2a5)+_0x57523e(0xdc)+_0x57523e(0xdf)+_0x57523e(0x117)),0x1;if(!_0x2252b2[_0x57523e(0x27c)]&&!_0x2252b2[_0x57523e(0x103)]&&!_0x2252b2[_0x57523e(0x234)]&&!_0x2252b2[_0x57523e(0x1f7)])return console[_0x57523e(0x185)](a32_0x3a28f3[_0x57523e(0x1d7)]('Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a')),console[_0x57523e(0x185)](_0x57523e(0x137)),console[_0x57523e(0x185)](_0x57523e(0x205)),console['error'](_0x57523e(0x266)),console[_0x57523e(0x185)](_0x57523e(0x186)),console['error']('\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior'),console[_0x57523e(0x185)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x124214=resolveYamlFile(_0x2bda75);if(!existsSync(_0x124214))return showFileNotFoundError(_0x124214,_0x2bda75),0x1;_0x2252b2[_0x57523e(0x1f3)]&&(console[_0x57523e(0x185)](_0x57523e(0x22f)+_0x2252b2[_0x57523e(0x1ed)]),console[_0x57523e(0x185)](_0x57523e(0x1c8)+_0x124214));let _0x1d069b;try{_0x1d069b=readFileSync(_0x124214,_0x57523e(0x275));}catch(_0x12fda9){const _0x2241f7=_0x12fda9 instanceof Error?_0x12fda9['message']:String(_0x12fda9);return console['error'](_0x57523e(0x17f)+_0x2241f7),0x1;}let _0x49e42f;try{_0x49e42f=parseDef(_0x1d069b);}catch(_0xf01e49){const _0x1e3299=_0xf01e49 instanceof Error?_0xf01e49[_0x57523e(0x26c)]:String(_0xf01e49);return console[_0x57523e(0x185)](a32_0x3a28f3[_0x57523e(0x1d7)](_0x57523e(0x23e)+_0x1e3299)),0x1;}if(_0x2252b2['attribute']===!![]||_0x2252b2[_0x57523e(0x103)]===''){const _0x1ed546=_0x49e42f['attributes']?.['map'](_0x52ecec=>_0x52ecec[_0x57523e(0xbd)])||[];if(_0x1ed546[_0x57523e(0x256)]===0x0)console['error'](a32_0x3a28f3[_0x57523e(0x1d7)](_0x57523e(0x1e0)));else{console[_0x57523e(0x185)](a32_0x3a28f3[_0x57523e(0x1d7)]('Error:\x20--attribute\x20requires\x20a\x20name\x0a')),console[_0x57523e(0x185)](_0x57523e(0x136));for(const _0x4dd812 of _0x1ed546){console[_0x57523e(0x185)]('\x20\x20'+a32_0x3a28f3['cyan'](_0x4dd812));}console[_0x57523e(0x185)](_0x57523e(0x120)+_0x2bda75+_0x57523e(0xda)+_0x1ed546[0x0]+'\x22');}return 0x1;}if(_0x2252b2['behavior']===!![]||_0x2252b2[_0x57523e(0x234)]===''){const _0x5ccf3b=_0x49e42f[_0x57523e(0x1bc)]?.[_0x57523e(0x226)](_0x119512=>_0x119512['name'])||[];if(_0x5ccf3b[_0x57523e(0x256)]===0x0)console[_0x57523e(0x185)](a32_0x3a28f3[_0x57523e(0x1d7)](_0x57523e(0x168)));else{console[_0x57523e(0x185)](a32_0x3a28f3['red'](_0x57523e(0x254))),console[_0x57523e(0x185)]('Available\x20behaviors:');for(const _0x100e61 of _0x5ccf3b){console[_0x57523e(0x185)]('\x20\x20'+a32_0x3a28f3[_0x57523e(0x2a6)](_0x100e61));}console[_0x57523e(0x185)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x2bda75+_0x57523e(0x1c1)+_0x5ccf3b[0x0]+'\x22');}return 0x1;}const _0x3d6abe=createCommandSpinner(a32_0x3a28f3['dim'](_0x57523e(0x13d)),{'verbose':_0x2252b2[_0x57523e(0x1f3)]});_0x3d6abe['start']();const _0x2074b8={'onProgress':_0x4bd68f=>{const _0x5bcaa8=_0x57523e;_0x3d6abe[_0x5bcaa8(0xef)]=formatProgressMessage(_0x4bd68f);}};if(_0x2252b2[_0x57523e(0x27c)])_0x2074b8[_0x57523e(0x27c)]=!![];if(_0x2252b2['attribute']&&typeof _0x2252b2[_0x57523e(0x103)]==='string')_0x2074b8['attribute']=_0x2252b2['attribute'];if(_0x2252b2[_0x57523e(0x234)]&&typeof _0x2252b2[_0x57523e(0x234)]===_0x57523e(0x187))_0x2074b8[_0x57523e(0x234)]=_0x2252b2[_0x57523e(0x234)];if(_0x2252b2[_0x57523e(0x1f7)])_0x2074b8[_0x57523e(0x1f7)]=!![];if(_0x2252b2[_0x57523e(0x156)])_0x2074b8[_0x57523e(0x156)]=_0x2252b2['interval'];let _0x20558b;try{_0x20558b=await _0x4e98f0[_0x57523e(0xb0)][_0x57523e(0x214)](_0x1d069b,_0x2074b8),_0x3d6abe['stop']();}catch(_0x4fdea6){_0x3d6abe[_0x57523e(0x27d)]();throw _0x4fdea6;}return await this['displayPreviewResults'](_0x20558b,{'master':_0x2252b2[_0x57523e(0x27c)],'attribute':typeof _0x2252b2[_0x57523e(0x103)]===_0x57523e(0x187)?_0x2252b2[_0x57523e(0x103)]:undefined,'behavior':typeof _0x2252b2[_0x57523e(0x234)]===_0x57523e(0x187)?_0x2252b2[_0x57523e(0x234)]:undefined,'enriched':_0x2252b2[_0x57523e(0x1f7)]}),_0x20558b[_0x57523e(0x161)]?0x0:0x1;}async[a32_0x50f93c(0xe8)](_0x2015a2,_0x4e76f1){const _0x368750=a32_0x50f93c;console[_0x368750(0x185)]('\x0a'+a32_0x3a28f3[_0x368750(0x15d)](_0x368750(0x197))+'\x20'+_0x2015a2[_0x368750(0xbd)]),console['error']('═'[_0x368750(0x129)](0x3c));if(_0x4e76f1[_0x368750(0x27c)]&&_0x2015a2['sampleData']){const _0x63cc0b=a32_0x3a28f3[_0x368750(0x20b)](_0x368750(0x200))+'\x20'+a32_0x3a28f3[_0x368750(0x15d)](_0x2015a2[_0x368750(0x27c)][_0x368750(0x18b)]+'.'+_0x2015a2['master'][_0x368750(0x1f9)]);await this[_0x368750(0x10c)](_0x63cc0b,_0x2015a2['sampleData']);}else{if(_0x4e76f1[_0x368750(0x103)]&&_0x2015a2['sampleData']){const _0x55c376=a32_0x3a28f3[_0x368750(0x20b)](_0x368750(0x1d4))+'\x20'+a32_0x3a28f3[_0x368750(0x15d)](_0x4e76f1[_0x368750(0x103)]);await this[_0x368750(0x10c)](_0x55c376,_0x2015a2[_0x368750(0x208)]);}else{if(_0x4e76f1[_0x368750(0x234)]&&_0x2015a2[_0x368750(0x208)]){const _0x55f5e6=a32_0x3a28f3[_0x368750(0x20b)](_0x368750(0x1fc))+'\x20'+a32_0x3a28f3[_0x368750(0x15d)](_0x4e76f1['behavior']);await this[_0x368750(0x10c)](_0x55f5e6,_0x2015a2[_0x368750(0x208)]);}else{if(_0x4e76f1[_0x368750(0x1f7)]&&_0x2015a2[_0x368750(0x208)]){const _0x3f87c0=a32_0x3a28f3[_0x368750(0x20b)]('Enriched:')+'\x20'+a32_0x3a28f3[_0x368750(0x15d)](_0x368750(0x223));await this[_0x368750(0x10c)](_0x3f87c0,_0x2015a2[_0x368750(0x208)]);}else!_0x2015a2['sampleData']&&console[_0x368750(0x185)](_0x368750(0x166));}}}if(_0x2015a2[_0x368750(0x1c0)]['length']>0x0){console[_0x368750(0x185)]('─'[_0x368750(0x129)](0x3c)),console['error']('\x0a'+a32_0x3a28f3[_0x368750(0x1d7)](_0x368750(0x19a)));for(const _0x13e53d of _0x2015a2[_0x368750(0x1c0)]){console['error']('\x20\x20'+a32_0x3a28f3[_0x368750(0x1d7)]('•')+'\x20'+_0x13e53d);}}}async[a32_0x50f93c(0x10c)](_0x349a1c,_0x2bde7f){const _0x394312=a32_0x50f93c;if(_0x2bde7f[_0x394312(0x256)]===0x0){console[_0x394312(0x185)]('\x0a'+_0x349a1c),console[_0x394312(0x185)](_0x394312(0x1ef));return;}console[_0x394312(0x185)]('\x0a'+_0x349a1c);const _0x9c095=Object[_0x394312(0xf7)](_0x2bde7f[0x0])[_0x394312(0x226)](_0x27b4e8=>({'name':_0x27b4e8,'type':typeof _0x2bde7f[0x0][_0x27b4e8]===_0x394312(0xea)?'double':'varchar'})),_0x386f4f={'queryId':_0x394312(0x112),'columns':_0x9c095,'data':_0x2bde7f,'stats':{'state':_0x394312(0xb7),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x2bde7f[_0x394312(0x256)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0xc5a927=formatAsTable(_0x386f4f,_0x2bde7f[_0x394312(0x256)],!![]);await writeOutput(_0xc5a927,undefined,_0x394312(0x1f9));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x123);['description']=a32_0x50f93c(0x9c);async['execute'](_0x13b8cc){const _0x31e53c=a32_0x50f93c,{options:_0x2a2dc2,args:_0x2775bc,tdx:_0x23028d}=_0x13b8cc,_0x384cd6=_0x2a2dc2,_0x2ce804=_0x2775bc[0x0]||_0x2a2dc2[_0x31e53c(0x15a)];if(!_0x2ce804)return showParentSegmentNotSetError(_0x31e53c(0x99)+_0x31e53c(0x17a)),0x1;const _0x2e908e=resolveYamlFile(_0x2ce804);if(existsSync(_0x2e908e)){_0x384cd6[_0x31e53c(0x1f3)]&&console[_0x31e53c(0x185)](_0x31e53c(0x1ff)+_0x2e908e);let _0x50fad0;try{_0x50fad0=readFileSync(_0x2e908e,_0x31e53c(0x275));}catch(_0x44f9f5){const _0x3093c1=_0x44f9f5 instanceof Error?_0x44f9f5[_0x31e53c(0x26c)]:String(_0x44f9f5);return console['error'](_0x31e53c(0x17f)+_0x3093c1),0x1;}const _0x4e54f2=await withSpinner(_0x31e53c(0x18d),()=>_0x23028d[_0x31e53c(0xb0)][_0x31e53c(0x229)](_0x50fad0),{'verbose':_0x384cd6['verbose']}),_0x3720b7=_0x4e54f2[_0x31e53c(0x189)],{isNew:_0x2e2e7c,name:_0x2ad9e5,hasChanges:_0x2b4c6e,diffFormatted:_0x136143}=_0x3720b7;if(_0x2b4c6e){_0x2e2e7c?console[_0x31e53c(0x185)](_0x31e53c(0xc3)+_0x2ad9e5+'\x27:'):console[_0x31e53c(0x185)](_0x31e53c(0x25f)+_0x2ad9e5+'\x27:');console[_0x31e53c(0x185)]('─'[_0x31e53c(0x129)](0x3c)),console[_0x31e53c(0x185)](_0x136143),console[_0x31e53c(0x185)]('─'[_0x31e53c(0x129)](0x3c));const _0x4a265b=_0x2e2e7c?_0x31e53c(0x142)+_0x2ad9e5+_0x31e53c(0x18a):_0x31e53c(0x9b)+_0x2ad9e5+_0x31e53c(0x18a);if(!_0x384cd6[_0x31e53c(0x265)]){if(!isInteractive())return console[_0x31e53c(0x185)](a32_0x3a28f3[_0x31e53c(0x1d7)](_0x31e53c(0x237)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x31e53c(0x185)](a32_0x3a28f3['dim'](_0x31e53c(0x294))),0x1;const _0x166d02=await confirmKey(_0x4a265b);if(!_0x166d02)return console[_0x31e53c(0x185)](a32_0x3a28f3['yellow'](_0x31e53c(0x1e9))),0x1;}const _0x2bd2eb=_0x2e2e7c?_0x31e53c(0x1c3):_0x31e53c(0xdb);await withSpinner(_0x2bd2eb+_0x31e53c(0xf0)+_0x2ad9e5+'\x27...',()=>_0x3720b7['apply'](),{'verbose':_0x384cd6[_0x31e53c(0x1f3)]});const _0x848650=_0x2e2e7c?'Created':'Updated';console['error']('✔\x20'+_0x848650+_0x31e53c(0xf0)+_0x2ad9e5+'\x27');}else console[_0x31e53c(0x185)](_0x31e53c(0x11f)+_0x2ad9e5+'\x27\x20is\x20up\x20to\x20date');}const _0x4d1b85=await withSpinner(_0x31e53c(0x94)+_0x2ce804+_0x31e53c(0x1c9),()=>_0x23028d[_0x31e53c(0xb0)]['runParent'](_0x2ce804),{'verbose':_0x384cd6['verbose']}),_0x33e5fe=_0x4d1b85['data'],_0x7331f2=getConsoleUrl(_0x384cd6['site'],_0x31e53c(0x116)+_0x33e5fe[_0x31e53c(0x215)]+_0x31e53c(0x178)+_0x33e5fe['workflowSessionId']+_0x31e53c(0x277)+_0x33e5fe[_0x31e53c(0x283)]);return console[_0x31e53c(0x185)]('\x0a✔\x20Workflow\x20started'),console['error']('\x20\x20'+a32_0x3a28f3['dim']('Audience\x20ID:')+'\x20'+_0x33e5fe[_0x31e53c(0x110)]),console[_0x31e53c(0x185)]('\x20\x20'+a32_0x3a28f3[_0x31e53c(0x20b)](_0x31e53c(0x247))+'\x20'+_0x33e5fe[_0x31e53c(0x1b5)]),console[_0x31e53c(0x185)]('\x20\x20'+a32_0x3a28f3[_0x31e53c(0x20b)]('Session:')+'\x20'+_0x33e5fe[_0x31e53c(0xae)]),console[_0x31e53c(0x185)]('\x20\x20'+a32_0x3a28f3[_0x31e53c(0x20b)]('Attempt:')+'\x20'+_0x33e5fe[_0x31e53c(0x283)]),console[_0x31e53c(0x185)]('\x20\x20'+_0x7331f2),console[_0x31e53c(0x185)]('\x0a'+a32_0x3a28f3[_0x31e53c(0x20b)](_0x31e53c(0x1e6))+_0x31e53c(0x250)+_0x33e5fe[_0x31e53c(0x283)]+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{['name']=a32_0x50f93c(0x260);['description']=a32_0x50f93c(0xd0);async[a32_0x50f93c(0x29f)](_0x339fff){const _0x1dd636=a32_0x50f93c,{options:_0x5bc9e5,args:_0x40218a,tdx:_0x3dd68b}=_0x339fff,_0x3f561a=_0x40218a[0x0]||_0x5bc9e5['parentSegment'];if(!_0x3f561a)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a'+_0x1dd636(0x1a4)),0x1;_0x5bc9e5['verbose']&&(console['error'](_0x1dd636(0x22f)+_0x5bc9e5[_0x1dd636(0x1ed)]),console[_0x1dd636(0x185)](_0x1dd636(0x145)+_0x3f561a));const _0x53f5e5=await withSpinner(_0x1dd636(0x267)+_0x3f561a+'\x27...',()=>_0x3dd68b[_0x1dd636(0xb0)][_0x1dd636(0xd1)](_0x3f561a),{'verbose':_0x5bc9e5['verbose']}),_0x54923f=_0x53f5e5[_0x1dd636(0x189)];console[_0x1dd636(0x185)](_0x1dd636(0x278)+_0x54923f['length']+'\x20field'+(_0x54923f[_0x1dd636(0x256)]!==0x1?'s':''));if(_0x5bc9e5[_0x1dd636(0x245)]||_0x5bc9e5['jsonl'])return await handleSDKOutput(_0x54923f,_0x5bc9e5),0x0;return displayFieldsHumanReadable(_0x54923f,_0x3f561a),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x298);[a32_0x50f93c(0x121)]='Show\x20parent\x20segment\x20details';async['execute'](_0x32dc36){const _0x26bfdc=a32_0x50f93c,{options:_0x5abf2a,args:_0x4413dd,tdx:_0x4d7cd5}=_0x32dc36,_0x43b649=_0x5abf2a,_0xdc13c5=_0x4413dd[0x0]||_0x5abf2a['parentSegment'];if(!_0xdc13c5)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a'+_0x26bfdc(0x18e)+_0x26bfdc(0x1cc)+_0x26bfdc(0x92)),0x1;_0x5abf2a[_0x26bfdc(0x1f3)]&&(console[_0x26bfdc(0x185)](_0x26bfdc(0x22f)+_0x5abf2a[_0x26bfdc(0x1ed)]),console['error']('Parent\x20segment:\x20'+_0xdc13c5));const _0xd83407=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0xdc13c5+_0x26bfdc(0x1c9),()=>_0x4d7cd5[_0x26bfdc(0xb0)][_0x26bfdc(0x26d)](_0xdc13c5),{'verbose':_0x5abf2a['verbose']}),_0x3ae658=_0xd83407[_0x26bfdc(0x189)];if(_0x43b649[_0x26bfdc(0x236)]){const _0x391f89=getConsoleNextUrl(_0x43b649[_0x26bfdc(0x1ed)],'/app/dw/parentSegments/'+_0x3ae658['id']);return console[_0x26bfdc(0x185)](a32_0x3a28f3[_0x26bfdc(0x25e)]('✔')+_0x26bfdc(0x158)+a32_0x3a28f3[_0x26bfdc(0x2a6)](_0x391f89)),openBrowser(_0x391f89),0x0;}return await handleSingleObjectOutput(_0x3ae658,_0x5abf2a),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{['name']=a32_0x50f93c(0x297);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x2a3);async[a32_0x50f93c(0x29f)](_0x264cb6){const _0x386478=a32_0x50f93c,{options:_0x5d1209,args:_0x31aa83,tdx:_0x3861a7}=_0x264cb6,_0x106337=_0x5d1209,_0x4aea99=_0x31aa83[0x0]||_0x5d1209[_0x386478(0x15a)];if(!_0x4aea99)return showParentSegmentNotSetError(_0x386478(0x25c)+_0x386478(0x259)+_0x386478(0x1cc)+_0x386478(0x238)),0x1;_0x5d1209[_0x386478(0x1f3)]&&(console[_0x386478(0x185)]('Site:\x20'+_0x5d1209[_0x386478(0x1ed)]),console[_0x386478(0x185)]('Parent\x20segment:\x20'+_0x4aea99));const _0x5dd952=await withSpinner(_0x386478(0xec)+_0x4aea99+_0x386478(0x1c9),()=>_0x3861a7[_0x386478(0xb0)][_0x386478(0x281)](_0x4aea99),{'verbose':_0x5d1209['verbose']}),_0x278738=_0x5dd952[_0x386478(0x189)],_0x202d85=_0x3861a7[_0x386478(0xb0)][_0x386478(0x273)](_0x278738);if(_0x106337[_0x386478(0x108)]){const _0x5f4c02=await this[_0x386478(0xb5)](_0x264cb6,_0x4aea99,_0x278738,_0x202d85),_0x1ed20e=this['formatSchemaJson'](_0x5f4c02);writeFileSync(_0x106337[_0x386478(0x108)],_0x1ed20e);const _0x155b59=_0x5f4c02[_0x386478(0x1c7)]['columns']['length']+_0x5f4c02[_0x386478(0x1bc)]['reduce']((_0x65178f,_0x44a22c)=>_0x65178f+_0x44a22c[_0x386478(0xa5)]['length'],0x0),_0x3c058b=_0x5f4c02[_0x386478(0x1bc)]['filter'](_0x5d1bb1=>_0x5d1bb1['columns'][_0x386478(0x256)]===0x0)[_0x386478(0x256)];return console[_0x386478(0x10a)](_0x386478(0x16a)+_0x106337['output']),console[_0x386478(0x10a)](_0x386478(0x111)+_0x202d85),console['log'](_0x386478(0xe1)+_0x5f4c02[_0x386478(0x1bc)]['length']+_0x386478(0xe0)),console['log'](_0x386478(0x26a)+_0x155b59+_0x386478(0x15f)),_0x3c058b>0x0&&console[_0x386478(0x10a)](_0x386478(0xa2)+_0x3c058b+_0x386478(0x1a8)),0x0;}console['error']('\x0a'+a32_0x3a28f3[_0x386478(0x15d)](_0x386478(0x9d))+'\x20'+a32_0x3a28f3[_0x386478(0x2a6)](_0x202d85));const _0x583cd3=await withSpinner(_0x386478(0x131),()=>_0x3861a7[_0x386478(0xb0)][_0x386478(0x1ae)](_0x278738),{'verbose':_0x5d1209[_0x386478(0x1f3)]});console[_0x386478(0x185)]('\x0a'+a32_0x3a28f3[_0x386478(0x15d)](_0x386478(0x1c7))+'\x20'+a32_0x3a28f3[_0x386478(0x20b)]('('+_0x202d85+_0x386478(0xfe)));const _0x188f85=await executeSchemaQuery(_0x583cd3[_0x386478(0x189)],_0x3861a7,_0x5d1209);await handleQueryOutput(_0x188f85,_0x5d1209);const _0x3e8306=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x3861a7[_0x386478(0xb0)][_0x386478(0xb3)](_0x278738),{'verbose':_0x5d1209[_0x386478(0x1f3)]});for(const _0x1174f6 of _0x3e8306[_0x386478(0x189)]){const _0x2b18af='behavior_'+_0x1174f6[_0x386478(0x175)]()[_0x386478(0x147)](/\s+/g,'_'),_0x45bd47=_0x386478(0x1ad)+_0x202d85+'.'+_0x2b18af;console[_0x386478(0x185)]('\x0a'+a32_0x3a28f3[_0x386478(0x15d)](_0x1174f6)+'\x20'+a32_0x3a28f3[_0x386478(0x20b)]('('+_0x202d85+'.'+_0x2b18af+')'));try{const _0x189eb1=await executeSchemaQuery(_0x45bd47,_0x3861a7,_0x5d1209);await handleQueryOutput(_0x189eb1,_0x5d1209);}catch{console['error'](a32_0x3a28f3['yellow']('\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)'));}}return 0x0;}async[a32_0x50f93c(0xb5)](_0x2a0d71,_0x7c6f74,_0x257679,_0x2d5643){const _0x507552=a32_0x50f93c,{options:_0x16baf5,tdx:_0x50dd5b}=_0x2a0d71,_0x5c79a7=await withSpinner(_0x507552(0x131),()=>_0x50dd5b[_0x507552(0xb0)][_0x507552(0x1ae)](_0x257679),{'verbose':_0x16baf5[_0x507552(0x1f3)]}),_0x24389f=await executeSchemaQuery(_0x5c79a7[_0x507552(0x189)],_0x50dd5b,_0x16baf5),_0x171ba5=_0x24389f[_0x507552(0x189)][_0x507552(0x226)](_0x41118b=>({'name':_0x41118b[_0x507552(0x1d2)],'type':_0x41118b[_0x507552(0x17c)]})),_0x28c90d=await withSpinner(_0x507552(0x1be),()=>_0x50dd5b[_0x507552(0xb0)][_0x507552(0xb3)](_0x257679),{'verbose':_0x16baf5[_0x507552(0x1f3)]}),_0x5d886c=[];for(const _0x365159 of _0x28c90d[_0x507552(0x189)]){const _0x4ff78d=_0x507552(0x261)+_0x365159[_0x507552(0x175)]()[_0x507552(0x147)](/\s+/g,'_'),_0x3d87d9=_0x507552(0x1ad)+_0x2d5643+'.'+_0x4ff78d;let _0x33f948=[];try{const _0x286306=await executeSchemaQuery(_0x3d87d9,_0x50dd5b,_0x16baf5);_0x33f948=_0x286306[_0x507552(0x189)][_0x507552(0x226)](_0x33a1d1=>({'name':_0x33a1d1[_0x507552(0x1d2)],'type':_0x33a1d1['column_type']}));}catch{}_0x5d886c[_0x507552(0x19b)]({'table':_0x4ff78d,'columns':_0x33f948});}return{'database':_0x2d5643,'parent_segment':_0x7c6f74,'parent_id':_0x257679,'customers':{'table':_0x507552(0x1c7),'columns':_0x171ba5},'behaviors':_0x5d886c};}[a32_0x50f93c(0x140)](_0x35bf32){const _0x23ca26=a32_0x50f93c,_0x5407ba=_0x376cdc=>{const _0xea32cf=a32_0x3e39;if(_0x376cdc[_0xea32cf(0x256)]===0x0)return'[]';const _0x324ae6=_0x376cdc[_0xea32cf(0x226)](_0x355e4b=>'\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22'+_0x355e4b[_0xea32cf(0xbd)]+'\x22,\x20\x22type\x22:\x20\x22'+_0x355e4b[_0xea32cf(0x202)]+'\x22\x20}');return'[\x0a'+_0x324ae6['join'](',\x0a')+_0xea32cf(0x1f0);},_0x31dd11=_0x35bf32['behaviors'][_0x23ca26(0x226)](_0x36474c=>{const _0x5b5965=_0x23ca26;return'\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x36474c['table']+_0x5b5965(0x114)+_0x5407ba(_0x36474c['columns'])[_0x5b5965(0x147)](/^/gm,'\x20\x20')[_0x5b5965(0x1eb)]()+'\x0a\x20\x20\x20\x20}';})[_0x23ca26(0x25b)](',\x0a');return _0x23ca26(0x21d)+_0x35bf32[_0x23ca26(0x18b)]+_0x23ca26(0x291)+_0x35bf32[_0x23ca26(0x225)]+_0x23ca26(0xb9)+_0x35bf32[_0x23ca26(0x118)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x35bf32[_0x23ca26(0x1c7)]['table']+_0x23ca26(0x292)+_0x5407ba(_0x35bf32[_0x23ca26(0x1c7)][_0x23ca26(0xa5)])[_0x23ca26(0x147)](/^/gm,'\x20\x20')['trim']()+_0x23ca26(0x1a6)+_0x31dd11+'\x0a\x20\x20]\x0a}\x0a';}}export class ParentSegmentSQLCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x1a1);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x148);async[a32_0x50f93c(0x29f)](_0x57395d){const _0x3666e5=a32_0x50f93c,{options:_0x3cdf1e,args:_0x1a4746,tdx:_0x8fb834}=_0x57395d,_0x5b2394=_0x1a4746[0x0]||_0x3cdf1e[_0x3666e5(0x15a)];if(!_0x5b2394)return showParentSegmentNotSetError(_0x3666e5(0xcc)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment'),0x1;_0x3cdf1e[_0x3666e5(0x1f3)]&&(console[_0x3666e5(0x185)]('Site:\x20'+_0x3cdf1e[_0x3666e5(0x1ed)]),console[_0x3666e5(0x185)](_0x3666e5(0x145)+_0x5b2394));const _0x5dfac2=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x5b2394+_0x3666e5(0x1c9),()=>_0x8fb834[_0x3666e5(0xb0)][_0x3666e5(0x281)](_0x5b2394),{'verbose':_0x3cdf1e[_0x3666e5(0x1f3)]}),_0x1550ee=_0x5dfac2[_0x3666e5(0x189)],_0x3ae154=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x5b2394+_0x3666e5(0x1c9),()=>_0x8fb834[_0x3666e5(0xb0)][_0x3666e5(0x1ae)](_0x1550ee),{'verbose':_0x3cdf1e[_0x3666e5(0x1f3)]}),_0x299eac=_0x3ae154[_0x3666e5(0x189)];return _0x3cdf1e['format']===_0x3666e5(0x245)||_0x3cdf1e[_0x3666e5(0x159)]===_0x3666e5(0x288)?await handleSDKOutput([{'sql':_0x299eac}],_0x3cdf1e):console[_0x3666e5(0x10a)](_0x299eac),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x15b);[a32_0x50f93c(0x121)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a32_0x50f93c(0x29f)](_0x341815){const _0x51923e=a32_0x50f93c,{options:_0x584e1a,args:_0x253cee,tdx:_0x5b160e}=_0x341815,_0x3a0d15=_0x253cee[0x0]||_0x584e1a['parentSegment'];if(!_0x3a0d15)return showParentSegmentNotSetError(_0x51923e(0x13f)+_0x51923e(0xa6)),0x1;_0x584e1a['verbose']&&(console[_0x51923e(0x185)]('Site:\x20'+_0x584e1a[_0x51923e(0x1ed)]),console[_0x51923e(0x185)](_0x51923e(0x145)+_0x3a0d15));const _0x3df953=await withSpinner(_0x51923e(0xec)+_0x3a0d15+_0x51923e(0x1c9),()=>_0x5b160e[_0x51923e(0xb0)][_0x51923e(0x281)](_0x3a0d15),{'verbose':_0x584e1a[_0x51923e(0x1f3)]}),_0x41a1d8=_0x3df953['data'],_0x1ece82=await withSpinner(_0x51923e(0x264)+_0x3a0d15+_0x51923e(0x1c9),()=>_0x5b160e[_0x51923e(0xb0)][_0x51923e(0x1ae)](_0x41a1d8),{'verbose':_0x584e1a[_0x51923e(0x1f3)]});let _0x5ada48=_0x1ece82[_0x51923e(0x189)];const _0x3fef0e=resolveLimit(_0x584e1a[_0x51923e(0x23f)],DEFAULT_DISPLAY_LIMIT),_0x2eb032=/\bLIMIT\s+\d+/i[_0x51923e(0x157)](_0x5ada48);!_0x2eb032&&(_0x5ada48=_0x5ada48[_0x51923e(0x1eb)]()['replace'](/;+$/,''),_0x5ada48=_0x51923e(0x16d)+_0x5ada48+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x3fef0e);_0x584e1a['verbose']&&console[_0x51923e(0x185)](_0x51923e(0xbe)+_0x5ada48);const _0x2305d8=await withProgressSpinner(_0x51923e(0x23c),async _0x2d859c=>{const _0x22cb41=_0x51923e,_0xc78b46=await _0x5b160e[_0x22cb41(0x28a)][_0x22cb41(0x29f)](_0x5ada48,{'catalog':'td','schema':_0x22cb41(0x243),'onJobId':_0x10f019=>{const _0x515d69=_0x22cb41;_0x2d859c[_0x515d69(0x115)](_0x10f019);}});return _0xc78b46;},{'verbose':_0x584e1a[_0x51923e(0x1f3)]}),_0xf9d58b=_0x2305d8['data'],_0x2f08ff=_0xf9d58b[_0x51923e(0x235)]?_0x51923e(0x20e)+_0xf9d58b[_0x51923e(0x235)]+']':'';return console[_0x51923e(0x185)](_0x51923e(0x24c)+_0xf9d58b['stats'][_0x51923e(0x15e)][_0x51923e(0x126)]()+_0x51923e(0x141)+(_0x51923e(0x207)+formatElapsed(_0xf9d58b['stats'][_0x51923e(0x199)])+_0x2f08ff)),await handleQueryOutput(_0xf9d58b,_0x584e1a),0x0;}}export class PSRtListCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x1a3);['description']='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a32_0x50f93c(0x29f)](_0x1574d9){const _0x5ba876=a32_0x50f93c,{options:_0x12cf59,args:_0xbf3009,tdx:_0x439182}=_0x1574d9,_0x1eebeb=_0xbf3009[0x0],_0x27ca24=await withSpinner(_0x1eebeb?'Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27'+_0x1eebeb+_0x5ba876(0x1c9):_0x5ba876(0x240),()=>_0x439182[_0x5ba876(0x1dc)][_0x5ba876(0x20d)](),{'verbose':_0x12cf59[_0x5ba876(0x1f3)]});let _0x32743d=_0x27ca24[_0x5ba876(0x189)]['filter'](_0x17d5ad=>_0x17d5ad[_0x5ba876(0x1d5)]);if(_0x1eebeb){const _0x1609b6=_0x1eebeb[_0x5ba876(0x147)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x5ba876(0x147)](/\?/g,'.'),_0xa2bf5a=new RegExp('^'+_0x1609b6+'$','i');_0x32743d=_0x32743d[_0x5ba876(0x12f)](_0x41fe43=>_0xa2bf5a['test'](_0x41fe43[_0x5ba876(0xbd)]));}_0x32743d[_0x5ba876(0xe2)]((_0x4cc1b3,_0x4bb822)=>_0x4cc1b3['name']['localeCompare'](_0x4bb822[_0x5ba876(0xbd)])),console[_0x5ba876(0x185)]('✔\x20Found\x20'+_0x32743d[_0x5ba876(0x256)]+_0x5ba876(0x232)+(_0x32743d[_0x5ba876(0x256)]!==0x1?'s':''));const _0xbbc949=_0x35db86=>{const _0x23c9b5=_0x5ba876;return getConsoleNextUrl(_0x12cf59[_0x23c9b5(0x1ed)],_0x23c9b5(0x192)+_0x35db86);};if(_0x12cf59['format']===_0x5ba876(0x245)||_0x12cf59[_0x5ba876(0x159)]==='jsonl'){const _0x204402=_0x32743d[_0x5ba876(0x226)](_0x26bdb3=>({..._0x26bdb3,'url':_0xbbc949(_0x26bdb3['id'])}));await handleSDKOutput(_0x204402,_0x12cf59);}else{if(_0x32743d[_0x5ba876(0x256)]===0x0)console[_0x5ba876(0x10a)](_0x5ba876(0x13e));else for(const _0x13c591 of _0x32743d){const _0x538af8=_0x13c591['population']?a32_0x3a28f3[_0x5ba876(0x20b)]('\x20('+formatRows(_0x13c591[_0x5ba876(0x195)])+')'):'',_0x17c5f1=hyperlink(_0x13c591[_0x5ba876(0xbd)],_0xbbc949(_0x13c591['id']));console['log']('⚡\x20'+_0x17c5f1+_0x538af8);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a32_0x50f93c(0xbd)]='ps:rt:validate';['description']=a32_0x50f93c(0x20a);async[a32_0x50f93c(0x29f)](_0x491f83){const _0x3e7c8e=a32_0x50f93c,{options:_0x39b7f6,args:_0x276a87,tdx:_0x21ea40}=_0x491f83,_0x3c9c77=_0x276a87[0x0]||_0x39b7f6[_0x3e7c8e(0x15a)];if(!_0x3c9c77)return showParentSegmentNotSetError(_0x3e7c8e(0xe4)+'\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'),0x1;const _0x15a7bd=resolveYamlFile(_0x3c9c77);if(!existsSync(_0x15a7bd))return showFileNotFoundError(_0x15a7bd,_0x3c9c77),0x1;let _0x4618b9;try{_0x4618b9=readFileSync(_0x15a7bd,_0x3e7c8e(0x275));}catch(_0x30b73b){const _0x21be7b=_0x30b73b instanceof Error?_0x30b73b['message']:String(_0x30b73b);return console[_0x3e7c8e(0x185)](_0x3e7c8e(0x17f)+_0x21be7b),0x1;}const _0x2ab08c=createCommandSpinner(a32_0x3a28f3['dim'](_0x3e7c8e(0xfc)),{'verbose':_0x39b7f6[_0x3e7c8e(0x1f3)]});_0x2ab08c[_0x3e7c8e(0x24a)]();const _0xc1daf5={'realtime':!![],'onProgress':_0x34a85c=>{_0x2ab08c['text']=formatProgressMessage(_0x34a85c);}};let _0x3d256f;try{_0x3d256f=await _0x21ea40['segment']['validateParentYaml'](_0x4618b9,_0xc1daf5),_0x2ab08c[_0x3e7c8e(0x27d)]();}catch(_0x21606e){_0x2ab08c[_0x3e7c8e(0x27d)]();throw _0x21606e;}console[_0x3e7c8e(0x185)]('\x0a'+a32_0x3a28f3[_0x3e7c8e(0x15d)]('RT\x202.0\x20Validate:')+'\x20'+_0x3d256f[_0x3e7c8e(0xbd)]),console['error']('═'['repeat'](0x3c)),displayRealtimeValidation(_0x3d256f),console[_0x3e7c8e(0x185)]('─'[_0x3e7c8e(0x129)](0x3c));if(_0x3d256f[_0x3e7c8e(0x1c0)][_0x3e7c8e(0x256)]>0x0){console[_0x3e7c8e(0x185)]('\x0a'+a32_0x3a28f3[_0x3e7c8e(0x1d7)](_0x3e7c8e(0x19a)));for(const _0x8c6f52 of _0x3d256f[_0x3e7c8e(0x1c0)]){console[_0x3e7c8e(0x185)]('\x20\x20'+a32_0x3a28f3[_0x3e7c8e(0x1d7)]('•')+'\x20'+_0x8c6f52);}}return _0x3d256f['allValid']&&console[_0x3e7c8e(0x185)]('\x0a'+a32_0x3a28f3[_0x3e7c8e(0x25e)]('✔')+_0x3e7c8e(0x1fb)),_0x3d256f[_0x3e7c8e(0x161)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a32_0x50f93c(0x90);['description']='List\x20RT\x20journeys';async[a32_0x50f93c(0x29f)](_0x4c0ed9){const _0x2445a8=a32_0x50f93c,{options:_0x2a7291,args:_0xf5176f,tdx:_0x10b981}=_0x4c0ed9,_0x4a2d85=_0xf5176f[0x0]||_0x2a7291[_0x2445a8(0x15a)];if(!_0x4a2d85)return showParentSegmentNotSetError(_0x2445a8(0x1f5)+'\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'),0x1;_0x2a7291[_0x2445a8(0x1f3)]&&(console[_0x2445a8(0x185)](_0x2445a8(0x22f)+_0x2a7291[_0x2445a8(0x1ed)]),console['error']('Parent\x20segment:\x20'+_0x4a2d85));const _0x45fb52=await withSpinner(_0x2445a8(0xec)+_0x4a2d85+_0x2445a8(0x1c9),()=>_0x10b981[_0x2445a8(0xb0)][_0x2445a8(0x281)](_0x4a2d85),{'verbose':_0x2a7291[_0x2445a8(0x1f3)]}),_0x5bbd54=_0x45fb52[_0x2445a8(0x189)],_0x667b6f=await withSpinner('Listing\x20RT\x20journeys\x20for\x20\x27'+_0x4a2d85+_0x2445a8(0x1c9),()=>_0x10b981[_0x2445a8(0x1dc)]['listJourneys'](_0x5bbd54),{'verbose':_0x2a7291[_0x2445a8(0x1f3)]}),_0x144ae2=_0x667b6f[_0x2445a8(0x189)];console[_0x2445a8(0x185)](_0x2445a8(0x278)+_0x144ae2[_0x2445a8(0x256)]+_0x2445a8(0x271)+(_0x144ae2['length']!==0x1?'s':''));if(_0x2a7291[_0x2445a8(0x159)]===_0x2445a8(0x245)||_0x2a7291[_0x2445a8(0x159)]===_0x2445a8(0x288))await handleSDKOutput(_0x144ae2,_0x2a7291);else{if(_0x144ae2[_0x2445a8(0x256)]===0x0)console[_0x2445a8(0x10a)](_0x2445a8(0xad));else for(const _0x341a11 of _0x144ae2){const _0x49cc1c=_0x341a11['state']===_0x2445a8(0x169)?'🚀':'📝',_0x187e29=_0x341a11['paused']?a32_0x3a28f3[_0x2445a8(0x1c6)]('\x20(paused)'):'',_0x2dffac=a32_0x3a28f3['dim']('\x20('+_0x341a11[_0x2445a8(0x149)]+_0x2445a8(0x1e7)+(_0x341a11['stageCount']!==0x1?'s':'')+')');console[_0x2445a8(0x10a)](_0x49cc1c+'\x20'+_0x341a11[_0x2445a8(0xbd)]+_0x187e29+_0x2dffac);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x296);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x1b2);async['execute'](_0x469576){const _0x1c6e83=a32_0x50f93c,{options:_0x31b927,args:_0x405c3e,tdx:_0x1a2ee1}=_0x469576,_0x5bada4=_0x405c3e[0x0];if(!_0x5bada4)return console['error'](a32_0x3a28f3[_0x1c6e83(0x1d7)](_0x1c6e83(0x1d9))),console[_0x1c6e83(0x185)](_0x1c6e83(0x167)),console[_0x1c6e83(0x185)](a32_0x3a28f3[_0x1c6e83(0x20b)](_0x1c6e83(0x150))),0x1;_0x31b927[_0x1c6e83(0x1f3)]&&(console['error'](_0x1c6e83(0x22f)+_0x31b927[_0x1c6e83(0x1ed)]),console[_0x1c6e83(0x185)](_0x1c6e83(0xd5)+_0x5bada4));const _0x5a8057=await withSpinner(_0x1c6e83(0x1a9)+_0x5bada4+_0x1c6e83(0x1c9),()=>_0x1a2ee1['realtime'][_0x1c6e83(0x1cd)](_0x5bada4),{'verbose':_0x31b927[_0x1c6e83(0x1f3)]}),_0x2860bf=_0x5a8057['data'];console[_0x1c6e83(0x185)](_0x1c6e83(0x23a)+_0x2860bf[_0x1c6e83(0xbd)]+'\x27');if(_0x31b927[_0x1c6e83(0x159)]==='json'||_0x31b927[_0x1c6e83(0x159)]===_0x1c6e83(0x288))await handleSDKOutput([_0x2860bf],_0x31b927);else{const _0x39ca42=_0x2860bf['state']===_0x1c6e83(0x169)?'🚀':'📝',_0xb776b2=_0x2860bf['paused']?a32_0x3a28f3[_0x1c6e83(0x1c6)](_0x1c6e83(0x204)):'';console['log'](_0x39ca42+'\x20'+_0x2860bf['name']+_0xb776b2);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:rt:jn:resume';[a32_0x50f93c(0x121)]=a32_0x50f93c(0x210);async[a32_0x50f93c(0x29f)](_0x39d53a){const _0x398dfe=a32_0x50f93c,{options:_0x169e1e,args:_0xfc9e77,tdx:_0x459c7e}=_0x39d53a,_0x246f8f=_0xfc9e77[0x0];if(!_0x246f8f)return console[_0x398dfe(0x185)](a32_0x3a28f3[_0x398dfe(0x1d7)](_0x398dfe(0x1d9))),console['error'](_0x398dfe(0x29e)),console[_0x398dfe(0x185)](a32_0x3a28f3[_0x398dfe(0x20b)](_0x398dfe(0x150))),0x1;_0x169e1e['verbose']&&(console[_0x398dfe(0x185)](_0x398dfe(0x22f)+_0x169e1e[_0x398dfe(0x1ed)]),console[_0x398dfe(0x185)](_0x398dfe(0xd5)+_0x246f8f));const _0x2b415=await withSpinner(_0x398dfe(0x198)+_0x246f8f+_0x398dfe(0x1c9),()=>_0x459c7e['realtime'][_0x398dfe(0x289)](_0x246f8f),{'verbose':_0x169e1e[_0x398dfe(0x1f3)]}),_0x3ccac9=_0x2b415['data'];console[_0x398dfe(0x185)](_0x398dfe(0x285)+_0x3ccac9[_0x398dfe(0xbd)]+'\x27');if(_0x169e1e['format']==='json'||_0x169e1e['format']===_0x398dfe(0x288))await handleSDKOutput([_0x3ccac9],_0x169e1e);else{const _0x507999=_0x3ccac9[_0x398dfe(0xd9)]===_0x398dfe(0x169)?'🚀':'📝',_0x1d069c=_0x3ccac9['paused']?a32_0x3a28f3['yellow'](_0x398dfe(0x204)):'';console[_0x398dfe(0x10a)](_0x507999+'\x20'+_0x3ccac9[_0x398dfe(0xbd)]+_0x1d069c);}return 0x0;}}function a32_0x571d(){const _0x38e3e0=['Error\x20reading\x20file:\x20','segment:parent:preview','localeCompare','.yaml','displaySummary','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','error','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','string','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','data','\x27\x20and\x20run\x20workflow?','database','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','Analyzing\x20changes...','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','listPersonalizations','idStitching','ignore','/app/dw/parentSegments/','✔\x20Updated\x20personalization\x20service\x20\x27','Error:\x20Parent\x20segment\x20name\x20is\x20required','population','Join\x20on:','Preview:','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','elapsedTimeMillis','Errors:','push','displayColumns','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','Next\x20steps:','Attributes','Attributes:','segment:parent:sql','deletePersonalization','ps:rt: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','✔\x20Created\x20personalization\x20service\x20\x27','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','Error:\x20Token\x20ID\x20is\x20required','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','any','\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','1046117OysARf','SELECT\x20*\x20FROM\x20','getParentSQL','\x20\x201.\x20Edit\x20','Error:\x20Service\x20name\x20is\x20required','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','Pause\x20activations\x20in\x20an\x20RT\x20journey','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Error:\x20Token\x20\x27','status','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','\x20\x202.\x20Run\x20','Customers:','Fetching\x20current\x20configuration\x20for\x20\x27','scheduleOption','Options\x20(one\x20required):\x0a','behaviors','\x20configured','Fetching\x20behavior\x20list...','✔\x20Deleted\x20token\x20\x27','errors','\x20--behavior\x20\x22','/{name}.yml\x0a','Creating','\x20service(s)\x20configured','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','yellow','customers','YAML\x20file:\x20','\x27...','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','personalization_services','Options:\x0a','pauseJourney','xdg-open','\x20Added\x20personalization\x20template\x20to\x20','relationships','getPersonalization','column_name','\x20rows)','Attribute:','realtime_enabled','Create\x20a\x20realtime\x20personalization\x20entity','red','\x20true','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','8853636FsyFvT','displayPreviewHints','realtime','rowCount','file','Listing\x20personalizations\x20for\x20\x27','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','4318370CeUIGV','⚡\x20Not\x20enabled','customerPercent','To\x20cancel:','\x20stage','null','Aborted.','Coverage:','trim','customerGroup','site','behaviorsFile','\x20\x20No\x20sample\x20data\x20available','\x0a\x20\x20\x20\x20]','Behaviors','Events:','verbose','\x20to\x20push\x20the\x20configuration','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','tdx\x20ps\x20preview\x20','enriched','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','table','ps:pz:service:delete','\x20RT\x20configuration\x20is\x20valid','Behavior:','primaryKey','createToken','Found\x20YAML\x20file:\x20','Master:','Delete\x20a\x20realtime\x20personalization','type','Error:\x20Personalization\x20ID\x20is\x20required','\x20(paused)','Options:','38844336dbvewy','in\x20','sampleData','segment:parent:validate','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','dim','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','list','\x20[Job\x20ID:\x20','\x20personalization\x20service','Resume\x20activations\x20in\x20an\x20RT\x20journey','\x20\x20\x20\x20-\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','entryCriteria:','previewParentYaml','workflowId','Patching\x20personalization\x20\x27','displayRealtimeInfo','\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','\x20No\x20changes\x20-\x20','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','Listing\x20parent\x20segments\x20matching\x20\x27','{\x0a\x20\x20\x22database\x22:\x20\x22','\x20service','attributes','last_page_viewed','personalizationServices','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Master\x20+\x20Attributes','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','parent_segment','map','/\x20directories\x20exist.','7oRnXey','pushParentYaml','run','\x20=\x20','ps:pz:delete','pullParentYaml','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','Site:\x20','sourceTableError','Getting\x20personalization\x20\x27','\x20RT-enabled\x20parent\x20segment','/\x20and\x20','behavior','jobId','web','\x0aError:','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','Master\x20Table','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','ps:pz:service:token:create','Executing\x20parent\x20segment\x20query...','No\x20parent\x20segments\x20match\x20pattern:\x20','Error\x20parsing\x20YAML:\x20','limit','Listing\x20RT-enabled\x20parent\x20segments...','\x27\x20(id:\x20','td_client_id','information_schema','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','json','value','Status:','coveragePercent','⚡\x20Enabled','start','Deleting\x20token\x20\x27','✔\x20Query\x20completed:\x20Processed\x20','\x20to\x20configure\x20your\x20personalization\x20service','folderId','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','\x20tdx\x20wf\x20attempt\x20','Error:\x20--database\x20and\x20--table\x20are\x20required','joinKey','public:','Error:\x20--behavior\x20requires\x20a\x20name\x0a','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','length','✘\x20Failed\x20to\x20rename\x20directory:\x20','keyEventId','\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','schemaError','join','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','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','green','\x0aChanges\x20to\x20apply\x20to\x20\x27','segment:parent:fields','behavior_','indexOf','scheduleType','Fetching\x20SQL\x20for\x20\x27','yes','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','Listing\x20fields\x20for\x20\x27','segment:parent:list','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','\x20\x20Columns:\x20','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','message','getParentFull','Columns:','No\x20parent\x20segments\x20found','segment:parent:push','\x20RT\x20journey','displayBehaviorsStats','getOutputDatabaseName','\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}','utf-8','✔\x20Found\x20personalization\x20\x27','/attempt/','✔\x20Found\x20','List\x20parent\x20segments','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','stitchingKeys','master','stop','No\x20personalization\x20services\x20configured','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','personalization','resolveParentId','👥\x20','workflowAttemptId','toFixed','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','eventKind','ps:pz:init','jsonl','resumeJourney','query','.yml','Listing\x20personalization\x20services\x20for\x20\x27','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','createPersonalization','Finding\x20service\x20for\x20token...','Updating\x20personalization\x20service\x20\x27','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Personalization\x20service\x20description','ps:rt:jn:pause','segment:parent:desc','segment:parent:view','totalEvents','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','match','isDirectory','/\x20directory.\x0a','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','execute','Creating\x20parent\x20segment\x20\x27','1970615NOTefk','updateParent','Show\x20parent\x20segment\x20schema\x20(column\x20types)','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','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','cyan','displayMasterInfo','ps:rt:jn:list','✔\x20Created\x20parent\x20segment\x20\x27','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','addBehaviors','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','\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','column','Error:','some','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','Apply\x20changes\x20to\x20\x27','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','Output\x20Database:','\x0a⚠️\x20\x20Both\x20','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','ps:pz:show','\x20\x20Note:\x20','session','public','columns','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','\x20Context\x20set:\x20','71608FUahwc','foreignKey','timezone','entryCriteria','No\x20RT\x20journeys\x20found','workflowSessionId','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','segment','Pattern:\x20','displayAttributesStats','getBehaviorNames','win32','collectSchema','no\x20tokens\x20configured','FINISHED','patch','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','delete','validateParentYaml','tdx\x20ps\x20push\x20','name','SQL\x20query:\x0a','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','<database>.<table>','\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--attribute\x20\x22<name>\x22','\x0aNew\x20parent\x20segment\x20\x27','ps:pz:service:show','Error:\x20--name\x20is\x20required','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','updatedAt','Source:','folder-segment','207994azdAud','createdAt','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','segment:parent:create','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','List\x20available\x20fields\x20for\x20segmentation','listFields','endsWith','\x20\x20\x20\x20','Database:\x20','RT\x20Journey\x20ID:\x20','RT\x202.0:','1143hibNge','identifier:\x20','state','\x20--attribute\x20\x22','Updating','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','true','addBehaviorsFile','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','\x20behaviors','\x20\x20Tables:\x201\x20customers\x20+\x20','sort','sections','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','valid','To\x20view\x20sample\x20data:','✔\x20Updated\x20personalization\x20\x27','displayPreviewResults','unref','number','payload','Resolving\x20parent\x20segment\x20\x27','✔\x20Deleted\x20personalization\x20service\x20\x27','Deleting\x20personalization\x20\x27','text','\x20parent\x20segment\x20\x27','Creating\x20personalization\x20service\x20\x27','Name:\x20','21GFDmiW','tokens','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','(id:\x20','keys','Update\x20a\x20realtime\x20personalization\x20entity','✔\x20Created\x20personalization\x20\x27','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','displayValidateResults','Validating\x20RT\x20configuration...','Join:','.customers)','-1d','createParent','ps:pz:service:token:delete','platform','attribute','Error:\x20File\x20not\x20found:\x20','get','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','parent_segments','output','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','log','allowed\x20IPs:','displaySampleData','\x20is\x20already\x20up\x20to\x20date','\x20\x20\x20\x20\x20\x20','getCurrentConfigVersion','audienceId','\x20\x20Database:\x20','preview','identifier','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','setJobId','/app/workflows/','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','parent_id','audienceId:','\x0a⚠️\x20\x20Migrating:\x20','segment:parent:update','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','addAttributesFile','Table:\x20','✔\x20No\x20changes\x20-\x20\x27','\x0aUsage:\x20tdx\x20ps\x20preview\x20','description','Listing\x20parent\x20segments...','segment:parent:run','\x27\x20for\x20service\x20\x27','ps:pz:service:create','toLocaleString','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','addAttributes','repeat','Creating\x20personalization\x20\x27','token:','ps:rt:configuration_versions','\x20parent\x20segment','✔\x20Created\x20token\x20\x27','filter','using\x20the\x20default\x20path:\x20','Fetching\x20customers\x20schema...','Validate:','No\x20personalizations\x20configured','allowedIps','events','Available\x20attributes:','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','includeSensitive','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','\x0aChanges\x20to\x20\x27','use','schemaValid','Fetching\x20sample\x20data...','No\x20RT-enabled\x20parent\x20segments\x20found','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','formatSchemaJson','\x20rows\x20','Create\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','✔\x20Renamed\x20directory\x20to\x20','Parent\x20segment:\x20','/\x20→\x20','replace','Get\x20SQL\x20query\x20for\x20parent\x20segment','stageCount','Updated','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','includeSensitive:','Deleting\x20personalization\x20service\x20\x27','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','\x20\x20\x20\x20\x20\x20\x20\x20','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','keyEventCriteria','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','sections:','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','interval','test','\x20Opening\x20','format','parentSegment','segment:parent:show','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','bold','processedRows','\x20total','id:\x20','allValid','deleteToken','Output\x20file:\x20','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','\x0aNo\x20sample\x20data\x20available','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','launched','Schema\x20saved\x20to\x20','8pLodrc','Error:\x20Service\x20ID\x20is\x20required','SELECT\x20*\x20FROM\x20(\x0a','Personalization:','customersWithEvents','page_view','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','label','audienceId:\x20','created:','toLowerCase','all','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','/sessions/','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','\x5c$&','column_type','\x27\x20with\x20ID:\x20','11sQtNAx'];a32_0x571d=function(){return _0x38e3e0;};return a32_0x571d();}export class PSRtConfigVersionCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x12c);[a32_0x50f93c(0x121)]='Get\x20current\x20RT\x20configuration\x20version\x20status';async[a32_0x50f93c(0x29f)](_0xd953aa){const _0x232974=a32_0x50f93c,{options:_0x167b4b,args:_0x5957a6,tdx:_0x42ad94}=_0xd953aa,_0x50851d=_0x5957a6[0x0]||_0x167b4b[_0x232974(0x15a)];if(!_0x50851d)return showParentSegmentNotSetError(_0x232974(0xfa)+_0x232974(0x218)),0x1;_0x167b4b[_0x232974(0x1f3)]&&(console[_0x232974(0x185)](_0x232974(0x22f)+_0x167b4b[_0x232974(0x1ed)]),console['error'](_0x232974(0x145)+_0x50851d));const _0x3534ea=await withSpinner(_0x232974(0xec)+_0x50851d+_0x232974(0x1c9),()=>_0x42ad94[_0x232974(0xb0)][_0x232974(0x281)](_0x50851d),{'verbose':_0x167b4b[_0x232974(0x1f3)]}),_0x15cfc6=_0x3534ea['data'],_0xd01c1d=await withSpinner('Getting\x20RT\x20configuration\x20version\x20for\x20\x27'+_0x50851d+_0x232974(0x1c9),()=>_0x42ad94[_0x232974(0x1dc)][_0x232974(0x10f)](_0x15cfc6),{'verbose':_0x167b4b[_0x232974(0x1f3)]}),_0x35634d=_0xd01c1d[_0x232974(0x189)];return console[_0x232974(0x185)]('✔\x20Retrieved\x20RT\x20configuration\x20version'),_0x167b4b[_0x232974(0x159)]==='json'||_0x167b4b[_0x232974(0x159)]===_0x232974(0x288)?await handleSDKOutput([_0x35634d],_0x167b4b):(console['log'](_0x232974(0x160)+_0x35634d['id']),console['log'](_0x232974(0x173)+_0x35634d[_0x232974(0x110)]),console['log'](_0x232974(0xd8)+_0x35634d[_0x232974(0x113)]),console[_0x232974(0x10a)]('eventKind:\x20'+_0x35634d[_0x232974(0x286)]),console[_0x232974(0x10a)]('status:\x20'+_0x35634d[_0x232974(0x1b5)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:pz:service:list';[a32_0x50f93c(0x121)]=a32_0x50f93c(0x255);async[a32_0x50f93c(0x29f)](_0x1a5728){const _0x4d093e=a32_0x50f93c,{options:_0xeabcb6,args:_0xbd1b9a,tdx:_0x54d5fd}=_0x1a5728,_0x1b9dc0=_0xbd1b9a[0x0]||_0xeabcb6['parentSegment'];if(!_0x1b9dc0)return showParentSegmentNotSetError(_0x4d093e(0x244)+'\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 _0x28ceb6=await withSpinner(_0x4d093e(0xec)+_0x1b9dc0+_0x4d093e(0x1c9),()=>_0x54d5fd[_0x4d093e(0xb0)][_0x4d093e(0x281)](_0x1b9dc0),{'verbose':_0xeabcb6[_0x4d093e(0x1f3)]}),_0x2b19cd=_0x28ceb6[_0x4d093e(0x189)],_0x443bcc=await withSpinner(_0x4d093e(0x28c)+_0x1b9dc0+'\x27...',()=>_0x54d5fd[_0x4d093e(0x280)][_0x4d093e(0x20d)](_0x2b19cd),{'verbose':_0xeabcb6[_0x4d093e(0x1f3)]}),_0x30f8f0=_0x443bcc[_0x4d093e(0x189)];console['error'](_0x4d093e(0x278)+_0x30f8f0[_0x4d093e(0x256)]+_0x4d093e(0x20f)+(_0x30f8f0['length']!==0x1?'s':''));if(_0xeabcb6['format']===_0x4d093e(0x245)||_0xeabcb6['format']===_0x4d093e(0x288))await handleSDKOutput(_0x30f8f0,_0xeabcb6);else{if(_0x30f8f0[_0x4d093e(0x256)]===0x0)console[_0x4d093e(0x10a)](_0x4d093e(0x27e)),console['error'](a32_0x3a28f3[_0x4d093e(0x2a6)](_0x4d093e(0x1b6)));else for(const _0x4e453a of _0x30f8f0){console[_0x4d093e(0x10a)](a32_0x3a28f3[_0x4d093e(0x15d)](_0x4e453a['name'])+'\x20'+a32_0x3a28f3[_0x4d093e(0x20b)](_0x4d093e(0xf6)+_0x4e453a['id']+')'));_0x4e453a['description']&&console[_0x4d093e(0x10a)]('\x20\x20'+a32_0x3a28f3['dim'](_0x4e453a['description']));if(_0x4e453a['tokens']&&_0x4e453a['tokens']['length']>0x0)for(const _0x433f06 of _0x4e453a[_0x4d093e(0xf4)]){const _0x4b0e08=_0x433f06[_0x4d093e(0x134)]?.[_0x4d093e(0x256)]?_0x433f06[_0x4d093e(0x134)]['join'](',\x20'):_0x4d093e(0x1aa);console[_0x4d093e(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x4d093e(0x2a6)](_0x4d093e(0x12b))+'\x20'+_0x433f06[_0x4d093e(0xbd)]+'\x20'+a32_0x3a28f3[_0x4d093e(0x20b)](_0x4d093e(0xf6)+_0x433f06['id']+')')),console[_0x4d093e(0x10a)](_0x4d093e(0xd3)+a32_0x3a28f3['dim']('allowed\x20IPs:')+'\x20'+_0x4b0e08);}else console[_0x4d093e(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x4d093e(0x20b)]('no\x20tokens\x20configured'));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x125);['description']=a32_0x50f93c(0x26b);async[a32_0x50f93c(0x29f)](_0x348167){const _0x4ad122=a32_0x50f93c,{options:_0x58d9c1,args:_0x70f890,tdx:_0x1b6189}=_0x348167,_0x212937=_0x58d9c1,_0x185b1f=_0x70f890[0x0],_0x153b6f=_0x70f890[0x1]||_0x58d9c1[_0x4ad122(0x15a)];if(!_0x185b1f)return console[_0x4ad122(0x185)](_0x4ad122(0x1b0)),console[_0x4ad122(0x185)](_0x4ad122(0x179)),console[_0x4ad122(0x185)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x153b6f)return showParentSegmentNotSetError(_0x4ad122(0x27f)+_0x4ad122(0x19d)),0x1;const _0x296cef=await withSpinner(_0x4ad122(0xec)+_0x153b6f+_0x4ad122(0x1c9),()=>_0x1b6189['segment'][_0x4ad122(0x281)](_0x153b6f),{'verbose':_0x58d9c1['verbose']}),_0x3d66ff=_0x296cef[_0x4ad122(0x189)],_0x3499ae={'name':_0x185b1f,'description':_0x212937[_0x4ad122(0x121)],'public':_0x212937[_0x4ad122(0xa4)]},_0x241b18=await withSpinner(_0x4ad122(0xf1)+_0x185b1f+'\x27...',()=>_0x1b6189['personalization']['create'](_0x3d66ff,_0x3499ae),{'verbose':_0x58d9c1[_0x4ad122(0x1f3)]}),_0xf0e196=_0x241b18[_0x4ad122(0x189)];return console['error'](_0x4ad122(0x1a5)+_0xf0e196[_0x4ad122(0xbd)]+_0x4ad122(0x17d)+_0xf0e196['id']),await handleSDKOutput([_0xf0e196],_0x58d9c1),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0xc4);[a32_0x50f93c(0x121)]='Show\x20personalization\x20service\x20details';async['execute'](_0x5b387c){const _0x3a2d66=a32_0x50f93c,{options:_0x371c6e,args:_0xd40a07,tdx:_0x55547c}=_0x5b387c,_0x2552e1=_0xd40a07[0x0],_0x3dff34=_0xd40a07[0x1]||_0x371c6e['parentSegment'];if(!_0x2552e1)return console[_0x3a2d66(0x185)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x3a2d66(0x185)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console[_0x3a2d66(0x185)](_0x3a2d66(0x171)),0x1;if(!_0x3dff34)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a'+_0x3a2d66(0x171)),0x1;const _0x3d6fb3=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3dff34+_0x3a2d66(0x1c9),()=>_0x55547c['segment']['resolveParentId'](_0x3dff34),{'verbose':_0x371c6e['verbose']}),_0x592b37=_0x3d6fb3[_0x3a2d66(0x189)],_0x258be9=await withSpinner('Fetching\x20personalization\x20service\x20\x27'+_0x2552e1+_0x3a2d66(0x1c9),()=>_0x55547c[_0x3a2d66(0x280)][_0x3a2d66(0x105)](_0x592b37,_0x2552e1),{'verbose':_0x371c6e[_0x3a2d66(0x1f3)]}),_0x12ee8e=_0x258be9['data'];if(_0x371c6e['json']||_0x371c6e[_0x3a2d66(0x288)])await handleSDKOutput([_0x12ee8e],_0x371c6e);else{console[_0x3a2d66(0x10a)](a32_0x3a28f3[_0x3a2d66(0x15d)](_0x12ee8e[_0x3a2d66(0xbd)])+'\x20'+a32_0x3a28f3[_0x3a2d66(0x20b)](_0x3a2d66(0xf6)+_0x12ee8e['id']+')'));_0x12ee8e[_0x3a2d66(0x121)]&&console[_0x3a2d66(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x3a2d66(0x20b)](_0x12ee8e[_0x3a2d66(0x121)]));console[_0x3a2d66(0x10a)]('\x20\x20'+a32_0x3a28f3['cyan'](_0x3a2d66(0x253))+'\x20'+(_0x12ee8e['public']?_0x3a2d66(0x265):'no'));if(_0x12ee8e[_0x3a2d66(0xf4)]&&_0x12ee8e[_0x3a2d66(0xf4)][_0x3a2d66(0x256)]>0x0)for(const _0x4bd61b of _0x12ee8e[_0x3a2d66(0xf4)]){const _0x55086e=_0x4bd61b[_0x3a2d66(0x134)]?.[_0x3a2d66(0x256)]?_0x4bd61b[_0x3a2d66(0x134)][_0x3a2d66(0x25b)](',\x20'):'any';console[_0x3a2d66(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x3a2d66(0x2a6)](_0x3a2d66(0x12b))+'\x20'+_0x4bd61b[_0x3a2d66(0xbd)]+'\x20'+a32_0x3a28f3[_0x3a2d66(0x20b)]('(id:\x20'+_0x4bd61b['id']+')')),console['log'](_0x3a2d66(0xd3)+a32_0x3a28f3[_0x3a2d66(0x20b)](_0x3a2d66(0x10b))+'\x20'+_0x55086e);}else console[_0x3a2d66(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x3a2d66(0x20b)](_0x3a2d66(0xb6)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x1fa);[a32_0x50f93c(0x121)]='Delete\x20a\x20personalization\x20service';async[a32_0x50f93c(0x29f)](_0x1765c1){const _0x138284=a32_0x50f93c,{options:_0x5d1fdc,args:_0x479fee,tdx:_0x46e144}=_0x1765c1,_0x1ccfc9=_0x479fee[0x0],_0x45d997=_0x479fee[0x1]||_0x5d1fdc[_0x138284(0x15a)];if(!_0x1ccfc9)return console[_0x138284(0x185)](_0x138284(0x16c)),console[_0x138284(0x185)](_0x138284(0x143)),console[_0x138284(0x185)](_0x138284(0x222)),0x1;if(!_0x45d997)return showParentSegmentNotSetError(_0x138284(0x224)+_0x138284(0x222)),0x1;const _0x576214=await withSpinner(_0x138284(0xec)+_0x45d997+'\x27...',()=>_0x46e144[_0x138284(0xb0)][_0x138284(0x281)](_0x45d997),{'verbose':_0x5d1fdc[_0x138284(0x1f3)]}),_0x1701df=_0x576214[_0x138284(0x189)];return await withSpinner(_0x138284(0x14d)+_0x1ccfc9+_0x138284(0x1c9),()=>_0x46e144[_0x138284(0x280)][_0x138284(0xba)](_0x1701df,_0x1ccfc9),{'verbose':_0x5d1fdc[_0x138284(0x1f3)]}),console[_0x138284(0x185)](_0x138284(0xed)+_0x1ccfc9+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:pz:service:update';[a32_0x50f93c(0x121)]=a32_0x50f93c(0x22e);async['execute'](_0x1bb67d){const _0x434fa2=a32_0x50f93c,{options:_0x168cb9,args:_0x31c577,tdx:_0x2bc96e}=_0x1bb67d,_0x2dc56f=_0x168cb9,_0xaf52dc=_0x31c577[0x0],_0xffe229=_0x31c577[0x1]||_0x168cb9[_0x434fa2(0x15a)];if(!_0xaf52dc)return console[_0x434fa2(0x185)](_0x434fa2(0x16c)),console[_0x434fa2(0x185)](_0x434fa2(0x1b3)),console['error'](_0x434fa2(0x29a)),0x1;if(!_0x2dc56f['name'])return console[_0x434fa2(0x185)](_0x434fa2(0xc5)),console[_0x434fa2(0x185)](_0x434fa2(0x1b3)),0x1;if(!_0xffe229)return showParentSegmentNotSetError(_0x434fa2(0x11c)+_0x434fa2(0x29a)),0x1;const _0x3aaa2=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xffe229+'\x27...',()=>_0x2bc96e['segment'][_0x434fa2(0x281)](_0xffe229),{'verbose':_0x168cb9['verbose']}),_0x4b08a7=_0x3aaa2[_0x434fa2(0x189)],_0x272f0e={'name':_0x2dc56f[_0x434fa2(0xbd)]};_0x2dc56f[_0x434fa2(0x121)]!==undefined&&(_0x272f0e[_0x434fa2(0x121)]=_0x2dc56f[_0x434fa2(0x121)]);const _0xd3097d=await withSpinner(_0x434fa2(0x290)+_0xaf52dc+_0x434fa2(0x1c9),()=>_0x2bc96e['personalization'][_0x434fa2(0xb8)](_0x4b08a7,_0xaf52dc,_0x272f0e),{'verbose':_0x168cb9['verbose']}),_0x40e0fb=_0xd3097d['data'];return console['error'](_0x434fa2(0x193)+_0x40e0fb[_0x434fa2(0xbd)]+'\x27'),await handleSDKOutput([_0x40e0fb],_0x168cb9),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x23b);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x127);async[a32_0x50f93c(0x29f)](_0x56f586){const _0x54764d=a32_0x50f93c,{options:_0x30628d,args:_0x5a6066,tdx:_0x34b4f1}=_0x56f586,_0x23c034=_0x30628d,_0x7b61e8=_0x5a6066[0x0],_0x5678db=_0x5a6066[0x1],_0xc8d6ad=_0x5a6066[0x2]||_0x30628d[_0x54764d(0x15a)];if(!_0x7b61e8)return console['error']('Error:\x20Token\x20name\x20is\x20required'),console[_0x54764d(0x185)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console['error'](_0x54764d(0xcf)),0x1;if(!_0x5678db)return console[_0x54764d(0x185)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x54764d(0x185)](_0x54764d(0x25d)),console[_0x54764d(0x185)](_0x54764d(0xcf)),0x1;if(!_0xc8d6ad)return showParentSegmentNotSetError(_0x54764d(0x1e1)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x1ff5fc=await withSpinner(_0x54764d(0xec)+_0xc8d6ad+_0x54764d(0x1c9),()=>_0x34b4f1[_0x54764d(0xb0)][_0x54764d(0x281)](_0xc8d6ad),{'verbose':_0x30628d[_0x54764d(0x1f3)]}),_0x42823d=_0x1ff5fc[_0x54764d(0x189)],_0x447abb={'name':_0x7b61e8};_0x23c034[_0x54764d(0x134)]&&(_0x447abb[_0x54764d(0x134)]=_0x23c034['allowedIps']['split'](',')[_0x54764d(0x226)](_0x27121b=>_0x27121b[_0x54764d(0x1eb)]()));_0x23c034['description']&&(_0x447abb[_0x54764d(0x121)]=_0x23c034[_0x54764d(0x121)]);const _0x4c0e38=await withSpinner('Creating\x20token\x20\x27'+_0x7b61e8+_0x54764d(0x124)+_0x5678db+'\x27...',()=>_0x34b4f1['personalization'][_0x54764d(0x1fe)](_0x42823d,_0x5678db,_0x447abb),{'verbose':_0x30628d[_0x54764d(0x1f3)]}),_0x2d6ee7=_0x4c0e38[_0x54764d(0x189)];return console[_0x54764d(0x185)](_0x54764d(0x12e)+_0x2d6ee7[_0x54764d(0xbd)]+_0x54764d(0x17d)+_0x2d6ee7['id']),_0x2d6ee7['value']&&(console[_0x54764d(0x185)](a32_0x3a28f3['yellow'](_0x54764d(0xc6))),console[_0x54764d(0x185)](a32_0x3a28f3[_0x54764d(0x2a6)](_0x2d6ee7[_0x54764d(0x246)])),console[_0x54764d(0x185)]('')),await handleSDKOutput([_0x2d6ee7],_0x30628d),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x101);['description']=a32_0x50f93c(0x1f8);async[a32_0x50f93c(0x29f)](_0x553ece){const _0x4b63b5=a32_0x50f93c,{options:_0x3b933c,args:_0x1cccca,tdx:_0x524817}=_0x553ece,_0x409aff=_0x1cccca[0x0],_0xefd715=_0x1cccca[0x1]||_0x3b933c[_0x4b63b5(0x15a)];if(!_0x409aff)return console[_0x4b63b5(0x185)](_0x4b63b5(0x1a7)),console[_0x4b63b5(0x185)](_0x4b63b5(0x269)),console[_0x4b63b5(0x185)](_0x4b63b5(0xf5)),0x1;if(!_0xefd715)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a'+_0x4b63b5(0xf5)),0x1;const _0xfa3bc5=await withSpinner(_0x4b63b5(0xec)+_0xefd715+_0x4b63b5(0x1c9),()=>_0x524817[_0x4b63b5(0xb0)][_0x4b63b5(0x281)](_0xefd715),{'verbose':_0x3b933c[_0x4b63b5(0x1f3)]}),_0x390d32=_0xfa3bc5[_0x4b63b5(0x189)],_0x8381f4=await withSpinner(_0x4b63b5(0x28f),()=>_0x524817['personalization'][_0x4b63b5(0x20d)](_0x390d32),{'verbose':_0x3b933c[_0x4b63b5(0x1f3)]}),_0x6b5d58=_0x8381f4[_0x4b63b5(0x189)];let _0xb78d66;for(const _0x2a8dff of _0x6b5d58){if(_0x2a8dff[_0x4b63b5(0xf4)]?.[_0x4b63b5(0x98)](_0xbac02=>_0xbac02['id']===_0x409aff)){_0xb78d66=_0x2a8dff['id'];break;}}if(!_0xb78d66)return console['error'](_0x4b63b5(0x1b4)+_0x409aff+_0x4b63b5(0x14e)),0x1;const _0x1e97fc=await withSpinner(_0x4b63b5(0x24b)+_0x409aff+_0x4b63b5(0x1c9),()=>_0x524817[_0x4b63b5(0x280)][_0x4b63b5(0x162)](_0x390d32,_0xb78d66,_0x409aff),{'verbose':_0x3b933c[_0x4b63b5(0x1f3)]}),_0x369665=_0x1e97fc['data'];return console[_0x4b63b5(0x185)](_0x4b63b5(0x1bf)+(_0x369665[_0x4b63b5(0xbd)]||_0x409aff)+'\x27'),await handleSDKOutput([_0x369665],_0x3b933c),0x0;}}export class PSPzListCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:pz:list';[a32_0x50f93c(0x121)]='List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment';async[a32_0x50f93c(0x29f)](_0x5193b0){const _0x467c91=a32_0x50f93c,{options:_0x1a2fd8,args:_0x40d69c,tdx:_0x43ee3a}=_0x5193b0,_0x4a607b=_0x40d69c[0x0]||_0x1a2fd8['parentSegment'];if(!_0x4a607b)return showParentSegmentNotSetError(_0x467c91(0x153)+_0x467c91(0x95)),0x1;const _0x429403=await withSpinner(_0x467c91(0xec)+_0x4a607b+_0x467c91(0x1c9),()=>_0x43ee3a[_0x467c91(0xb0)][_0x467c91(0x281)](_0x4a607b),{'verbose':_0x1a2fd8['verbose']}),_0xb10930=_0x429403[_0x467c91(0x189)],_0x2a35f5=await withSpinner(_0x467c91(0x1df)+_0x4a607b+_0x467c91(0x1c9),()=>_0x43ee3a[_0x467c91(0x280)][_0x467c91(0x18f)](_0xb10930),{'verbose':_0x1a2fd8['verbose']}),_0x2e7baf=_0x2a35f5['data'];console['error'](_0x467c91(0x278)+_0x2e7baf[_0x467c91(0x256)]+'\x20personalization'+(_0x2e7baf[_0x467c91(0x256)]!==0x1?'s':''));if(_0x1a2fd8[_0x467c91(0x159)]===_0x467c91(0x245)||_0x1a2fd8[_0x467c91(0x159)]==='jsonl')await handleSDKOutput(_0x2e7baf,_0x1a2fd8);else{if(_0x2e7baf[_0x467c91(0x256)]===0x0)console[_0x467c91(0x10a)](_0x467c91(0x133));else for(const _0x6fbf71 of _0x2e7baf){console['log'](a32_0x3a28f3[_0x467c91(0x15d)](_0x6fbf71[_0x467c91(0xbd)])+'\x20'+a32_0x3a28f3['dim']('(id:\x20'+_0x6fbf71['id']+')'));_0x6fbf71['description']&&console[_0x467c91(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x467c91(0x20b)](_0x6fbf71['description']));const _0x596ab6=_0x6fbf71['sections']?.['length']||0x0;console[_0x467c91(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x467c91(0x2a6)](_0x467c91(0x154))+'\x20'+_0x596ab6);if(_0x6fbf71[_0x467c91(0xe3)]&&_0x6fbf71[_0x467c91(0xe3)]['length']>0x0)for(const _0x49c88a of _0x6fbf71['sections']){console[_0x467c91(0x10a)]('\x20\x20\x20\x20-\x20'+_0x49c88a[_0x467c91(0xbd)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0xa1);[a32_0x50f93c(0x121)]='Show\x20a\x20specific\x20realtime\x20personalization';async[a32_0x50f93c(0x29f)](_0x8c76af){const _0x556785=a32_0x50f93c,{options:_0xb87a96,args:_0x5b98ba,tdx:_0x3db2e2}=_0x8c76af,_0x30ef87=_0x5b98ba[0x0];if(!_0x30ef87)return console[_0x556785(0x185)](_0x556785(0x203)),console[_0x556785(0x185)]('Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>'),0x1;const _0x346f93=await withSpinner(_0x556785(0x231)+_0x30ef87+_0x556785(0x1c9),()=>_0x3db2e2[_0x556785(0x280)][_0x556785(0x1d1)](_0x30ef87),{'verbose':_0xb87a96[_0x556785(0x1f3)]}),_0xf1762b=_0x346f93[_0x556785(0x189)];console[_0x556785(0x185)](_0x556785(0x276)+_0xf1762b['name']+'\x27');if(_0xb87a96[_0x556785(0x159)]===_0x556785(0x245)||_0xb87a96[_0x556785(0x159)]===_0x556785(0x288))await handleSDKOutput([_0xf1762b],_0xb87a96);else{console['log'](a32_0x3a28f3[_0x556785(0x15d)](_0xf1762b[_0x556785(0xbd)])+'\x20'+a32_0x3a28f3['dim'](_0x556785(0xf6)+_0xf1762b['id']+')'));_0xf1762b[_0x556785(0x121)]&&console['log']('\x20\x20'+a32_0x3a28f3[_0x556785(0x20b)](_0xf1762b['description']));_0xf1762b[_0x556785(0x110)]&&console['log']('\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)](_0x556785(0x119))+'\x20'+_0xf1762b['audienceId']);console[_0x556785(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)](_0x556785(0x174))+'\x20'+_0xf1762b[_0x556785(0xcb)]),console[_0x556785(0x10a)]('\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)]('updated:')+'\x20'+_0xf1762b[_0x556785(0xc7)]);const _0x23e3c7=_0xf1762b[_0x556785(0xe3)]?.[_0x556785(0x256)]||0x0;console['log']('\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)](_0x556785(0x154))+'\x20'+_0x23e3c7);if(_0xf1762b[_0x556785(0xe3)]&&_0xf1762b[_0x556785(0xe3)][_0x556785(0x256)]>0x0)for(const _0x1e2243 of _0xf1762b[_0x556785(0xe3)]){console[_0x556785(0x10a)]('\x20\x20\x20\x20'+a32_0x3a28f3[_0x556785(0x15d)](_0x1e2243[_0x556785(0xbd)])+'\x20'+a32_0x3a28f3[_0x556785(0x20b)](_0x556785(0xf6)+_0x1e2243['id']+')')),_0x1e2243['entryCriteria']&&(console[_0x556785(0x10a)]('\x20\x20\x20\x20\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)](_0x556785(0x213))+'\x20'+_0x1e2243[_0x556785(0xac)][_0x556785(0xbd)]),_0x1e2243[_0x556785(0xac)]['keyEventCriteria']?.[_0x556785(0x258)]&&console[_0x556785(0x10a)](_0x556785(0x14f)+a32_0x3a28f3[_0x556785(0x2a6)]('keyEventId:')+'\x20'+_0x1e2243[_0x556785(0xac)][_0x556785(0x152)][_0x556785(0x258)])),_0x1e2243['payload']&&console[_0x556785(0x10a)]('\x20\x20\x20\x20\x20\x20'+a32_0x3a28f3[_0x556785(0x2a6)]('payload:')+'\x20'+JSON['stringify'](_0x1e2243[_0x556785(0xeb)])),_0x1e2243[_0x556785(0x138)]&&console[_0x556785(0x10a)](_0x556785(0x10e)+a32_0x3a28f3[_0x556785(0x2a6)](_0x556785(0x14c))+_0x556785(0x1d8));}}return 0x0;}}function a32_0x3e39(_0x268be1,_0x4c9480){_0x268be1=_0x268be1-0x8f;const _0x571d9f=a32_0x571d();let _0x3e39a5=_0x571d9f[_0x268be1];return _0x3e39a5;}export class PSPzDeleteCommand extends BaseCommand{[a32_0x50f93c(0xbd)]=a32_0x50f93c(0x22c);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x201);async[a32_0x50f93c(0x29f)](_0x136c41){const _0x42cda1=a32_0x50f93c,{options:_0x260089,args:_0x7df6a8,tdx:_0x386b29}=_0x136c41,_0x1cf65e=_0x7df6a8[0x0];if(!_0x1cf65e)return console['error'](_0x42cda1(0x203)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>'),0x1;return await withSpinner(_0x42cda1(0xee)+_0x1cf65e+_0x42cda1(0x1c9),()=>_0x386b29[_0x42cda1(0x280)][_0x42cda1(0x1a2)](_0x1cf65e),{'verbose':_0x260089[_0x42cda1(0x1f3)]}),console[_0x42cda1(0x185)]('✔\x20Deleted\x20personalization\x20\x27'+_0x1cf65e+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:pz:create';['description']=a32_0x50f93c(0x1d6);async[a32_0x50f93c(0x29f)](_0x53eed5){const _0x4a8199=a32_0x50f93c,{options:_0x218f8d,tdx:_0x2052d8}=_0x53eed5,_0x373dd9=_0x218f8d;let _0x54c436;if(_0x373dd9['file']){_0x54c436=await loadJSON(_0x373dd9[_0x4a8199(0x1de)],!![]);if(!_0x54c436[_0x4a8199(0x1d0)]?.['parentFolder'])return console[_0x4a8199(0x185)](_0x4a8199(0x14b)),console[_0x4a8199(0x185)](_0x4a8199(0xa7)),console[_0x4a8199(0x185)](_0x4a8199(0x274)),0x1;}else{if(!_0x373dd9[_0x4a8199(0xbd)])return console['error'](_0x4a8199(0x293)),console[_0x4a8199(0x185)](_0x4a8199(0x21a)),console[_0x4a8199(0x185)](_0x4a8199(0xce)),0x1;if(_0x373dd9[_0x4a8199(0x121)]===undefined)return console[_0x4a8199(0x185)](_0x4a8199(0xbf)),console[_0x4a8199(0x185)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console['error'](_0x4a8199(0xce)),0x1;if(_0x373dd9[_0x4a8199(0x24e)]===undefined)return console['error']('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console['error'](_0x4a8199(0x1ca)),0x1;let _0x54c242=_0x373dd9[_0x4a8199(0x110)];if(!_0x54c242&&_0x218f8d[_0x4a8199(0x15a)]){const _0x4d9e20=await withSpinner(_0x4a8199(0xec)+_0x218f8d[_0x4a8199(0x15a)]+_0x4a8199(0x1c9),()=>_0x2052d8[_0x4a8199(0xb0)][_0x4a8199(0x281)](_0x218f8d['parentSegment']),{'verbose':_0x218f8d['verbose']});_0x54c242=_0x4d9e20['data'];}let _0x559f45;_0x373dd9[_0x4a8199(0xe3)]&&(_0x559f45=await loadJSON(_0x373dd9[_0x4a8199(0xe3)],![]));const _0x3f3748=_0x373dd9[_0x4a8199(0x24e)]===_0x4a8199(0x1e8)?null:{'id':_0x373dd9['folderId'],'type':_0x4a8199(0xc9)};_0x54c436={'attributes':{'name':_0x373dd9[_0x4a8199(0xbd)],'description':_0x373dd9[_0x4a8199(0x121)]||null,..._0x54c242!==undefined&&{'audienceId':_0x54c242},..._0x559f45!==undefined&&{'sections':_0x559f45}},'relationships':{'parentFolder':{'data':_0x3f3748}}};}const _0x3cca73=await withSpinner(_0x4a8199(0x12a)+(_0x54c436[_0x4a8199(0x21f)]?.['name']??'')+_0x4a8199(0x1c9),()=>_0x2052d8[_0x4a8199(0x280)][_0x4a8199(0x28e)](_0x54c436),{'verbose':_0x218f8d[_0x4a8199(0x1f3)]}),_0x31107e=_0x3cca73[_0x4a8199(0x189)];return console[_0x4a8199(0x185)](_0x4a8199(0xf9)+_0x31107e[_0x4a8199(0xbd)]+_0x4a8199(0x17d)+_0x31107e['id']),await handleSDKOutput([_0x31107e],_0x218f8d),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a32_0x50f93c(0xbd)]='ps:pz:patch';[a32_0x50f93c(0x121)]=a32_0x50f93c(0xf8);async[a32_0x50f93c(0x29f)](_0xff845b){const _0x650d6b=a32_0x50f93c,{options:_0x15efdf,args:_0x12d9c4}=_0xff845b,_0x155069=_0x15efdf,_0x33c370=_0x12d9c4[0x0];if(!_0x33c370)return console[_0x650d6b(0x185)](_0x650d6b(0x203)),console[_0x650d6b(0x185)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console['error'](_0x650d6b(0x184)),0x1;let _0x505d66;if(_0x155069[_0x650d6b(0x1de)])_0x505d66=await loadJSON(_0x155069['file'],!![]);else{if(!_0x155069['name'])return console['error'](_0x650d6b(0x293)),console[_0x650d6b(0x185)](_0x650d6b(0x1b1)),0x1;if(_0x155069[_0x650d6b(0x121)]===undefined)return console[_0x650d6b(0x185)](_0x650d6b(0xbf)),console[_0x650d6b(0x185)](_0x650d6b(0x1b1)),0x1;let _0x556f64;_0x155069[_0x650d6b(0xe3)]&&(_0x556f64=await loadJSON(_0x155069['sections'],![])),_0x505d66={'attributes':{'name':_0x155069[_0x650d6b(0xbd)],'description':_0x155069['description']||null,..._0x556f64!==undefined&&{'sections':_0x556f64}}};}const {tdx:_0x2b79b2}=_0xff845b,_0x4b7d3f=await withSpinner(_0x650d6b(0x216)+_0x33c370+_0x650d6b(0x1c9),()=>_0x2b79b2[_0x650d6b(0x280)]['patchPersonalization'](_0x33c370,_0x505d66),{'verbose':_0x15efdf[_0x650d6b(0x1f3)]}),_0x4c3ac4=_0x4b7d3f[_0x650d6b(0x189)];return console[_0x650d6b(0x185)](_0x650d6b(0xe7)+_0x4c3ac4['name']+_0x650d6b(0x241)+_0x4c3ac4['id']+')'),await handleSDKOutput([_0x4c3ac4],_0x15efdf),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']=a32_0x50f93c(0x287);[a32_0x50f93c(0x121)]=a32_0x50f93c(0x9a);async[a32_0x50f93c(0x29f)](_0x5be80d){const _0x57faa4=a32_0x50f93c,{options:_0x516c91,args:_0x2e777a}=_0x5be80d,_0x5cc33b=_0x2e777a[0x0]||_0x516c91[_0x57faa4(0x15a)];if(!_0x5cc33b)return showParentSegmentNotSetError(_0x57faa4(0x2a4)+_0x57faa4(0x1ab)),0x1;const _0x80618c=resolveYamlFile(_0x5cc33b);if(!existsSync(_0x80618c))return showFileNotFoundError(_0x80618c,_0x5cc33b),0x1;let _0x2ce859;try{_0x2ce859=readFileSync(_0x80618c,_0x57faa4(0x275));}catch(_0xebf554){const _0x26c9dd=_0xebf554 instanceof Error?_0xebf554[_0x57faa4(0x26c)]:String(_0xebf554);return console['error'](_0x57faa4(0x17f)+_0x26c9dd),0x1;}let _0xb10570;try{_0xb10570=parseDef(_0x2ce859);}catch(_0x5de09a){const _0x471ed1=_0x5de09a instanceof Error?_0x5de09a[_0x57faa4(0x26c)]:String(_0x5de09a);return console[_0x57faa4(0x185)](a32_0x3a28f3[_0x57faa4(0x1d7)](_0x57faa4(0x23e)+_0x471ed1)),0x1;}if(_0xb10570[_0x57faa4(0x1cb)]&&_0xb10570[_0x57faa4(0x1cb)]['length']>0x0)return console[_0x57faa4(0x185)](a32_0x3a28f3[_0x57faa4(0x1c6)](_0x57faa4(0x109)+_0x80618c)),console[_0x57faa4(0x185)](a32_0x3a28f3[_0x57faa4(0x20b)]('\x20\x20\x20'+_0xb10570['personalization_services']['length']+_0x57faa4(0x1c4))),0x1;!_0xb10570[_0x57faa4(0x1dc)]&&(_0xb10570[_0x57faa4(0x1dc)]={'events':[{'name':'page_view','source_table':_0x57faa4(0xc0)}],'attributes':[{'name':_0x57faa4(0x220),'type':'single'}],'id_stitching':{'primary_key':_0xb10570[_0x57faa4(0x27c)][_0x57faa4(0x1f9)]===_0x57faa4(0x1c7)?_0x57faa4(0x242):'user_id'}});_0xb10570[_0x57faa4(0x1cb)]=[{'name':'My\x20Service','description':_0x57faa4(0x295),'trigger_event':_0x57faa4(0x170),'sections':[{'name':'Default','criteria':_0x57faa4(0xdd),'attributes':[_0x57faa4(0x220)]}]}];const _0x581a38=serializeDef(_0xb10570);return writeFileSync(_0x80618c,_0x581a38,_0x57faa4(0x275)),console['error'](a32_0x3a28f3[_0x57faa4(0x25e)]('✔')+_0x57faa4(0x1cf)+a32_0x3a28f3[_0x57faa4(0x2a6)](_0x80618c)),(!_0xb10570[_0x57faa4(0x1dc)]||_0x2ce859[_0x57faa4(0x262)]('realtime:')===-0x1)&&console['error'](a32_0x3a28f3[_0x57faa4(0x25e)]('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console['error']('\x0a'+a32_0x3a28f3['dim'](_0x57faa4(0x19e))),console[_0x57faa4(0x185)](_0x57faa4(0x1af)+_0x80618c+_0x57faa4(0x24d)),console[_0x57faa4(0x185)](_0x57faa4(0x1b7)+a32_0x3a28f3[_0x57faa4(0x20b)](_0x57faa4(0xbc)+_0x5cc33b)+_0x57faa4(0x1f4)),0x0;}}