@treasuredata/tdx 2026.3.34 → 2026.3.36

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 (219) 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/frontmatter.js +1 -1
  182. package/dist/sdk/workspace/git.js +1 -1
  183. package/dist/sdk/workspace/index.js +1 -1
  184. package/dist/sdk/workspace/templates.js +1 -1
  185. package/dist/sdk/workspace/weekly.js +1 -1
  186. package/dist/sdk/workspace/wikilinks.js +1 -1
  187. package/dist/test-utils/command-runner.js +1 -1
  188. package/dist/test-utils/factories.js +1 -1
  189. package/dist/test-utils/fixtures.js +1 -1
  190. package/dist/test-utils/http-mock.js +1 -1
  191. package/dist/test-utils/index.js +1 -1
  192. package/dist/utils/async.js +1 -1
  193. package/dist/utils/colors.js +1 -1
  194. package/dist/utils/diff.js +1 -1
  195. package/dist/utils/file-permissions.js +1 -1
  196. package/dist/utils/file-reader.js +1 -1
  197. package/dist/utils/github-releases.js +1 -1
  198. package/dist/utils/global-cache.js +1 -1
  199. package/dist/utils/json-loader.js +1 -1
  200. package/dist/utils/local-cache.js +1 -1
  201. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  202. package/dist/utils/logger/formatters/index.js +1 -1
  203. package/dist/utils/logger/handlers/console-handler.js +1 -1
  204. package/dist/utils/logger/handlers/file-handler.js +1 -1
  205. package/dist/utils/logger/handlers/index.js +1 -1
  206. package/dist/utils/logger/handlers/null-handler.js +1 -1
  207. package/dist/utils/logger/index.js +1 -1
  208. package/dist/utils/logger/logger.js +1 -1
  209. package/dist/utils/logger/types.js +1 -1
  210. package/dist/utils/option-validation.js +1 -1
  211. package/dist/utils/process.js +1 -1
  212. package/dist/utils/prompt.js +1 -1
  213. package/dist/utils/spinner.js +1 -1
  214. package/dist/utils/sse-parser.js +1 -1
  215. package/dist/utils/string-utils.js +1 -1
  216. package/dist/utils/table-ref-parser.js +1 -1
  217. package/dist/utils/tdx-logger.js +1 -1
  218. package/dist/utils/version-check.js +1 -1
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- const a32_0x36fa47=a32_0x3b1d;(function(_0x5172e1,_0x1fbe01){const _0x329232=a32_0x3b1d,_0x2f5e08=_0x5172e1();while(!![]){try{const _0x39565d=-parseInt(_0x329232(0x31d))/0x1*(parseInt(_0x329232(0x284))/0x2)+parseInt(_0x329232(0x272))/0x3*(-parseInt(_0x329232(0x15f))/0x4)+parseInt(_0x329232(0x2bc))/0x5+parseInt(_0x329232(0x252))/0x6+parseInt(_0x329232(0x33f))/0x7*(parseInt(_0x329232(0x1a1))/0x8)+-parseInt(_0x329232(0x153))/0x9+-parseInt(_0x329232(0x27b))/0xa;if(_0x39565d===_0x1fbe01)break;else _0x2f5e08['push'](_0x2f5e08['shift']());}catch(_0x1b40b7){_0x2f5e08['push'](_0x2f5e08['shift']());}}}(a32_0x2879,0xdc76a));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';function a32_0x2879(){const _0x2a12da=['\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','Listing\x20personalization\x20services\x20for\x20\x27','Aborted.','displaySummary','\x0aChanges\x20to\x20\x27','parent_id','\x27\x20and\x20run\x20workflow?','✔\x20Updated\x20parent\x20segment\x20\x27','sourceTableValid','realtime_enabled','Fetching\x20behavior\x20list...','5696344oZhBjC','\x27\x20is\x20already\x20up\x20to\x20date','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','✔\x20Deleted\x20personalization\x20\x27','segment:parent:view','\x20total','Events:','foreignKey','schemaValid','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','\x20kill','\x27\x20is\x20up\x20to\x20date','Status:','column_name','message','segment:parent:update','Name:\x20','state','No\x20parent\x20segments\x20match\x20pattern:\x20','value','text','attribute','Creating\x20personalization\x20service\x20\x27','RT\x20Journey\x20ID:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','audienceId:\x20','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','-1d','eventKind:\x20','filter','Available\x20behaviors:','Table:\x20','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','tokens','getOutputDatabaseName','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','ps:pz:service:create','verbose','\x20stage','ps:pz:service:token:delete','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Getting\x20personalization\x20\x27','parentSegment','ps:pz:service:update','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','Get\x20current\x20RT\x20configuration\x20version\x20status','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','segment:parent:create','displayPreviewResults','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','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','✔\x20No\x20changes\x20-\x20\x27','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','addBehaviorsFile','collectSchema','\x20parent\x20segment\x20\x27','using\x20the\x20default\x20path:\x20','platform','createPersonalization','create','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','no\x20tokens\x20configured','\x20(paused)','replace','<database>.<table>','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','database','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','population','Create\x20a\x20realtime\x20personalization\x20entity','split','ps:rt:validate','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','\x20tdx\x20wf\x20attempt\x20','trim','Output\x20Database:','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','/\x20and\x20','\x27\x20(id:\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','\x20rows\x20','entryCriteria','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','enriched','\x20Added\x20personalization\x20template\x20to\x20','error','folder-segment','Attributes:','darwin','toFixed','\x0a\x20\x20\x20\x20}','start','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','Update\x20a\x20realtime\x20personalization\x20entity','\x20\x20No\x20sample\x20data\x20available','\x0a⚠️\x20\x20Both\x20','\x20Configuration\x20is\x20valid','joinKey','\x20behaviors','Created','getPersonalization','allowed\x20IPs:','execute','stageCount','Site:\x20','validateParentYaml','✔\x20Updated\x20personalization\x20\x27','allValid','page_view','json','\x20\x20\x20\x20-\x20','workflowAttemptId','Error:\x20--attribute\x20requires\x20a\x20name\x0a','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','List\x20parent\x20segments','(id:\x20','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','true','segment:parent:validate','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','includeSensitive','\x20\x20Columns:\x20','displaySampleData','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','\x20\x20\x20\x20\x20\x20\x20\x20','utf-8','Validating\x20configuration...','Next\x20steps:','Deleting\x20token\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','Error:\x20Personalization\x20ID\x20is\x20required','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','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','resolveParentId','createToken','SELECT\x20*\x20FROM\x20(\x0a','addAttributesFile','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','column','\x0aChanges\x20to\x20apply\x20to\x20\x27','personalizationServices','⚡\x20Enabled','valid','Show\x20parent\x20segment\x20schema\x20(column\x20types)','listJourneys','/attempt/','ignore','all','formatSchemaJson','Join:','List\x20available\x20fields\x20for\x20segmentation','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','Pattern:\x20','displayPreviewHints','Attribute:','status','identifier','Deleting\x20personalization\x20\x27','public','toLocaleString','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','✔\x20Found\x20personalization\x20\x27','/{name}.yml\x0a','customersWithEvents','open','.yaml','single','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','Database:\x20','5220048LLnhEn','any','pullParentYaml','No\x20personalization\x20services\x20configured','Error\x20parsing\x20YAML:\x20','\x0a✔\x20Workflow\x20started','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','sections:','addBehaviors','✔\x20Found\x20','\x20\x20\x20\x20','Available\x20attributes:','\x20RT-enabled\x20parent\x20segment','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','\x20+\x20[','\x20service(s)\x20configured','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','displayValidateResults','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','Fetching\x20SQL\x20for\x20\x27','events','attributesFile','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','Fetching\x20personalization\x20service\x20\x27','\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','Join\x20on:','Master\x20Table','personalization','last_page_viewed','push','929337hTPQEj','👥\x20','Show\x20parent\x20segment\x20details','log','\x20Added\x20RT\x202.0\x20template\x20section','bold','ps:pz:service:list','win32','site','8904070UupuZB','Found\x20YAML\x20file:\x20','\x20\x20\x20','Default','Parent\x20segment:\x20','addAttributes','Personalization\x20service\x20description','No\x20RT\x20journeys\x20found','Updating\x20personalization\x20service\x20\x27','8YhyNUI','Show\x20personalization\x20service\x20details','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','\x20[Job\x20ID:\x20','/\x20directories\x20exist.','\x5c$&','RT\x202.0:','YAML\x20file:\x20','Get\x20SQL\x20query\x20for\x20parent\x20segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','\x20true','Error\x20reading\x20file:\x20','delete','segment:parent:fields','getParentFull','Finding\x20service\x20for\x20token...','payload','stringify','Listing\x20personalizations\x20for\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a','✔\x20Updated\x20personalization\x20service\x20\x27','displayColumns','List\x20RT\x20journeys','Behaviors','Fetching\x20parent\x20segment\x20\x27','/\x20→\x20','personalization_services','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','columns','run','description','string','label','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','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','displayAttributesStats','format','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','\x20--interval\x20','Error:','unref','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\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','sort','\x20to\x20push\x20the\x20configuration','createParent','td_client_id','Master\x20+\x20Attributes','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','idStitching','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','Master:','Listing\x20RT-enabled\x20parent\x20segments...','Attributes','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','stats','7250405lPsRrZ','\x22,\x20\x22type\x22:\x20\x22','Analyzing\x20changes...','No\x20parent\x20segments\x20found','includeSensitive:','Overwrite\x20\x27','Personalization:','interval','Error:\x20File\x20not\x20found:\x20','updatedAt','list','session','dim','patchPersonalization','keyEventCriteria','Schema\x20saved\x20to\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Source:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','test','Fetching\x20customers\x20schema...','number','\x20--attribute\x20\x22<name>\x22','behaviorsFile','Listing\x20parent\x20segments...','patch','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','ps:rt:jn:pause','scheduleType','Error:\x20Service\x20ID\x20is\x20required','id:\x20','yellow','sourceTableError','workflowSessionId','\x20personalization\x20service','\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}','Session:','Updating','FINISHED','rowCount','deletePersonalization','ps:rt:jn:resume','public:','\x20Opening\x20','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','✔\x20Created\x20parent\x20segment\x20\x27','realtime:','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','master','type','data','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','\x20No\x20changes\x20-\x20','\x0aError:','sampleData','\x20--attribute\x20\x22','\x0a\x20\x20\x20\x20]','\x20\x20Tables:\x201\x20customers\x20+\x20','\x20--enriched','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','Errors:','cyan','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','displayBehaviorsStats','\x20is\x20already\x20up\x20to\x20date','attributes','relationships','Fetching\x20current\x20configuration\x20for\x20\x27','\x27\x20for\x20service\x20\x27','Fetching\x20sample\x20data...','red','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','length','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x20field','matchedCount','in\x20','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Deleting\x20personalization\x20service\x20\x27','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','displayMasterInfo','\x20\x201.\x20Edit\x20','paused','\x27...','\x20Context\x20set:\x20','Apply\x20changes\x20to\x20\x27','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','ps:rt:configuration_versions','Creating\x20personalization\x20\x27','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','null','workflowId','Options:','223615miHWlV','get','allowedIps','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','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','Options\x20(one\x20required):\x0a','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','\x27\x20with\x20ID:\x20','double','ps:rt:list','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','audienceId','Pause\x20activations\x20in\x20an\x20RT\x20journey','stitchingKeys','\x20=\x20','customerGroup','Error:\x20Service\x20name\x20is\x20required','green','behavior','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','parent_segments','previewParentYaml','stop','behaviors','apply','/app/dw/parentSegments/','\x20--behavior\x20\x22','Updated','ps:pz:list','repeat','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','Audience\x20ID:','To\x20view\x20sample\x20data:','7zzGvkv','ps:pz:delete','coveragePercent','resumeJourney','totalEvents','customerGroupFile','✘\x20Failed\x20to\x20rename\x20directory:\x20','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','Behavior:','\x20\x20\x20\x20\x20\x20','information_schema','yes','segment:parent:sql','Error:\x20Token\x20ID\x20is\x20required','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20configuration_versions\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20for\x20specific\x20parent\x20segment','No\x20RT-enabled\x20parent\x20segments\x20found','/app/workflows/','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','primaryKey','keys','`\x20to\x20download\x20the\x20configuration\x20first','status:\x20','ps:pz:patch','Updating\x20parent\x20segment\x20\x27','parent_segment','.yml','toLowerCase','limit','SELECT\x20*\x20FROM\x20','schemaError','getBehaviorNames','launched','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Delete\x20a\x20personalization\x20service','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','\x20RT\x20journey','Create\x20parent\x20segment\x20\x27','Validating\x20RT\x20configuration...','name','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','\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','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','deleteToken','getParentSQL','jsonl','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','Error:\x20--behavior\x20requires\x20a\x20name\x0a','pauseJourney','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','310212GUkzrV','segment:parent:preview','enabled','\x0aUsage:\x20tdx\x20ps\x20preview\x20','sections','\x20service','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Rows:','✔\x20Created\x20token\x20\x27','✔\x20Created\x20personalization\x20service\x20\x27','segment:parent:push','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','4uCPQSr','timezone','%)\x20','match','segment:parent:pull','column_type','indexOf','Options:\x0a','\x20to\x20configure\x20your\x20personalization\x20service','\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','updated:','jobId','Listing\x20fields\x20for\x20\x27','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','ps:pz:service:delete','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Listing\x20RT\x20journeys\x20for\x20\x27','behavior_','Resolving\x20parent\x20segment\x20\x27','Validate:','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','eventKind','map','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','localeCompare','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','tdx\x20ps\x20preview\x20','Columns:','✔\x20Retrieved\x20RT\x20configuration\x20version','output','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','token:','file','SQL\x20query:\x0a','join','tdx\x20ps\x20push\x20','xdg-open','elapsedTimeMillis','endsWith','✔\x20Deleted\x20token\x20\x27','\x20\x20Note:\x20','createdAt','errors','scheduleOption','customerPercent','table','segment','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','identifier:\x20','pushParentYaml','Error:\x20Token\x20\x27','customers','entryCriteria:','realtime','\x0aNo\x20sample\x20data\x20available'];a32_0x2879=function(){return _0x2a12da;};return a32_0x2879();}import a32_0x21c492 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_0x46a51c 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_0x36fa47(0x332),LEGACY_PARENT_SEGMENT_DIR=a32_0x36fa47(0x357);function openBrowser(_0xb70dc4){const _0x48de1a=a32_0x36fa47,_0x31b899=process[_0x48de1a(0x1da)],_0x32caba=_0x31b899===_0x48de1a(0x1fd)?_0x48de1a(0x24d):_0x31b899===_0x48de1a(0x279)?_0x48de1a(0x200):_0x48de1a(0x183);spawn(_0x32caba,[_0xb70dc4],{'detached':!![],'stdio':_0x48de1a(0x23b)})[_0x48de1a(0x2ac)]();}function migrateLegacyDirectory(){const _0x40e042=a32_0x36fa47;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x3231bb=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x3231bb['isDirectory']())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x40e042(0x1fa)](a32_0x46a51c[_0x40e042(0x2dd)](_0x40e042(0x204)+LEGACY_PARENT_SEGMENT_DIR+_0x40e042(0x1f1)+PARENT_SEGMENT_DIR+_0x40e042(0x288))),console[_0x40e042(0x1fa)](a32_0x46a51c[_0x40e042(0x2c8)](_0x40e042(0x1c1)+LEGACY_PARENT_SEGMENT_DIR+'/\x20directory.\x0a')),![];console['error'](a32_0x46a51c[_0x40e042(0x2dd)]('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x40e042(0x29d)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x40e042(0x1fa)](a32_0x46a51c[_0x40e042(0x32f)]('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x23c103){const _0x338812=_0x23c103 instanceof Error?_0x23c103['message']:String(_0x23c103);return console[_0x40e042(0x1fa)](a32_0x46a51c[_0x40e042(0x306)](_0x40e042(0x345)+_0x338812+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a32_0x36fa47(0x2a1)](_0x160c23){const _0x399a13=a32_0x36fa47;return migrateLegacyDirectory(),super[_0x399a13(0x2a1)](_0x160c23);}}function resolveYamlFile(_0x55d216){const _0x4dfea7=a32_0x36fa47;if(_0x55d216[_0x4dfea7(0x185)](_0x4dfea7(0x358))||_0x55d216[_0x4dfea7(0x185)](_0x4dfea7(0x24e)))return _0x55d216;return a32_0x21c492[_0x4dfea7(0x181)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x55d216)+_0x4dfea7(0x358));}function formatProgressMessage(_0x5aac4d){const _0x24cf59=a32_0x36fa47,_0x2a650a=_0x5aac4d[_0x24cf59(0x162)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x2a650a){const [,_0x5b1a09,_0x38b864,_0x355c68='']=_0x2a650a;return a32_0x46a51c['dim'](_0x5b1a09+':')+'\x20'+_0x38b864+a32_0x46a51c[_0x24cf59(0x2c8)](_0x355c68);}return a32_0x46a51c['dim'](_0x5aac4d);}function showFileNotFoundError(_0x147f07,_0x4aa5cf){const _0x4f6ba2=a32_0x36fa47;console[_0x4f6ba2(0x1fa)](a32_0x46a51c[_0x4f6ba2(0x306)](_0x4f6ba2(0x2c4)+_0x147f07+'\x0a')),console['error'](a32_0x46a51c[_0x4f6ba2(0x2fd)](_0x4f6ba2(0x2fa)+_0x4aa5cf+_0x4f6ba2(0x353)));}function displayRealtimeValidation(_0x2d27c3){const _0x3bf2be=a32_0x36fa47;if(!_0x2d27c3['realtime'])return;const _0x3fa821=_0x2d27c3[_0x3bf2be(0x194)],_0x5ba8ed=_0x3fa821[_0x3bf2be(0x155)]?a32_0x46a51c[_0x3bf2be(0x32f)](_0x3bf2be(0x236)):a32_0x46a51c[_0x3bf2be(0x2dd)]('⚡\x20Not\x20enabled');console['error']('\x0a'+a32_0x46a51c[_0x3bf2be(0x2c8)](_0x3bf2be(0x28a))+'\x20'+_0x5ba8ed);if(_0x3fa821['events']&&_0x3fa821[_0x3bf2be(0x268)][_0x3bf2be(0x308)]>0x0){console[_0x3bf2be(0x1fa)]('\x20\x20'+a32_0x46a51c['dim']('Events:')+'\x20'+_0x3fa821[_0x3bf2be(0x268)][_0x3bf2be(0x308)]+'\x20configured');for(const _0x566c5a of _0x3fa821['events']){const _0x57ea37=_0x566c5a[_0x3bf2be(0x19e)]===![]?a32_0x46a51c[_0x3bf2be(0x306)]('✘'):a32_0x46a51c[_0x3bf2be(0x32f)]('✔');console['error']('\x20\x20\x20\x20'+_0x57ea37+'\x20'+_0x566c5a['name']),_0x566c5a[_0x3bf2be(0x2de)]&&console['error'](_0x3bf2be(0x348)+a32_0x46a51c[_0x3bf2be(0x306)](_0x566c5a['sourceTableError']));}}if(_0x3fa821[_0x3bf2be(0x301)]&&_0x3fa821['attributes'][_0x3bf2be(0x308)]>0x0){console[_0x3bf2be(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x3bf2be(0x2c8)](_0x3bf2be(0x1fc))+'\x20'+_0x3fa821[_0x3bf2be(0x301)][_0x3bf2be(0x308)]+'\x20configured');for(const _0x1088a0 of _0x3fa821[_0x3bf2be(0x301)]){const _0x3e274c=_0x1088a0[_0x3bf2be(0x237)]?a32_0x46a51c['green']('✔'):a32_0x46a51c[_0x3bf2be(0x306)]('✘');console[_0x3bf2be(0x1fa)]('\x20\x20\x20\x20'+_0x3e274c+'\x20'+_0x1088a0[_0x3bf2be(0x365)]+'\x20'+a32_0x46a51c[_0x3bf2be(0x2c8)]('('+_0x1088a0[_0x3bf2be(0x2ef)]+')'));}}if(_0x3fa821[_0x3bf2be(0x2b5)]){const _0x130fdb=_0x3fa821[_0x3bf2be(0x2b5)][_0x3bf2be(0x32b)]?.[_0x3bf2be(0x308)]?_0x3bf2be(0x261)+_0x3fa821[_0x3bf2be(0x2b5)][_0x3bf2be(0x32b)][_0x3bf2be(0x181)](',\x20')+']':'';console['error']('\x20\x20'+a32_0x46a51c[_0x3bf2be(0x2c8)]('ID\x20Stitching:')+'\x20'+_0x3fa821[_0x3bf2be(0x2b5)][_0x3bf2be(0x351)]+_0x130fdb);}if(_0x3fa821[_0x3bf2be(0x235)]&&_0x3fa821[_0x3bf2be(0x235)][_0x3bf2be(0x308)]>0x0){console[_0x3bf2be(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x3bf2be(0x2c8)](_0x3bf2be(0x2c2))+'\x20'+_0x3fa821[_0x3bf2be(0x235)][_0x3bf2be(0x308)]+_0x3bf2be(0x158)+(_0x3fa821[_0x3bf2be(0x235)]['length']!==0x1?'s':''));for(const _0x37cfa1 of _0x3fa821['personalizationServices']){console[_0x3bf2be(0x1fa)](_0x3bf2be(0x213)+_0x37cfa1[_0x3bf2be(0x365)]);}}}function showParentSegmentNotSetError(_0x2767cd){const _0x2d9516=a32_0x36fa47;console[_0x2d9516(0x1fa)](a32_0x46a51c[_0x2d9516(0x2dd)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a')),console[_0x2d9516(0x1fa)](_0x2767cd);}export class ParentSegmentListCommand extends BaseCommand{['name']='segment:parent:list';[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x218);async[a32_0x36fa47(0x20b)](_0x391d80){const _0x51d3a0=a32_0x36fa47,{options:_0x5dea4c,args:_0x13260c,tdx:_0x59e508}=_0x391d80,_0x46ab42=_0x13260c[0x0];_0x5dea4c[_0x51d3a0(0x1c6)]&&(console['error'](_0x51d3a0(0x20d)+_0x5dea4c[_0x51d3a0(0x27a)]),_0x46ab42&&console['error'](_0x51d3a0(0x241)+_0x46ab42));const _0x4b106a=await withSpinner(_0x46ab42?'Listing\x20parent\x20segments\x20matching\x20\x27'+_0x46ab42+_0x51d3a0(0x313):_0x51d3a0(0x2d4),()=>_0x59e508[_0x51d3a0(0x18d)]['listParents'](),{'verbose':_0x5dea4c[_0x51d3a0(0x1c6)]});let _0x4f3ad1=_0x4b106a['data'];if(_0x46ab42){const _0xb7a4d3=_0x46ab42[_0x51d3a0(0x1e1)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x51d3a0(0x1e1)](/\*/g,'.*')[_0x51d3a0(0x1e1)](/\?/g,'.'),_0x2be892=new RegExp('^'+_0xb7a4d3+'$','i');_0x4f3ad1=_0x4f3ad1[_0x51d3a0(0x1be)](_0x147843=>_0x2be892[_0x51d3a0(0x2cf)](_0x147843[_0x51d3a0(0x301)][_0x51d3a0(0x365)]));}_0x4f3ad1[_0x51d3a0(0x2af)]((_0x7a96d8,_0x186b7c)=>_0x7a96d8[_0x51d3a0(0x301)][_0x51d3a0(0x365)]['localeCompare'](_0x186b7c[_0x51d3a0(0x301)][_0x51d3a0(0x365)])),console[_0x51d3a0(0x1fa)]('✔\x20Found\x20'+_0x4f3ad1[_0x51d3a0(0x308)]+'\x20parent\x20segment'+(_0x4f3ad1['length']!==0x1?'s':''));const _0x31cf13=_0x5a05f4=>{const _0x13bf16=_0x51d3a0;return getConsoleNextUrl(_0x5dea4c['site'],_0x13bf16(0x337)+_0x5a05f4);};if(_0x5dea4c[_0x51d3a0(0x2a8)]==='json'||_0x5dea4c[_0x51d3a0(0x2a8)]===_0x51d3a0(0x36b)){const _0x5d3aa2=_0x4f3ad1[_0x51d3a0(0x175)](_0x5becf8=>({..._0x5becf8,'url':_0x31cf13(_0x5becf8['id'])}));await handleSDKOutput(_0x5d3aa2,_0x5dea4c);}else{if(_0x4f3ad1[_0x51d3a0(0x308)]===0x0)_0x46ab42?console[_0x51d3a0(0x275)](_0x51d3a0(0x1b3)+_0x46ab42):console['log'](_0x51d3a0(0x2bf));else for(const _0x274fde of _0x4f3ad1){const _0x45f09c=_0x274fde[_0x51d3a0(0x301)][_0x51d3a0(0x1e6)]?a32_0x46a51c[_0x51d3a0(0x2c8)]('\x20('+formatRows(_0x274fde['attributes'][_0x51d3a0(0x1e6)])+')'):'',_0x5b80e5=hyperlink(_0x274fde['attributes'][_0x51d3a0(0x365)],_0x31cf13(_0x274fde['id']));console[_0x51d3a0(0x275)](_0x51d3a0(0x273)+_0x5b80e5+_0x45f09c);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x1d0);['description']=a32_0x36fa47(0x309);async[a32_0x36fa47(0x20b)](_0x310a99){const _0x32056a=a32_0x36fa47,{options:_0x1c980f,args:_0x348357,tdx:_0x264df3}=_0x310a99;console[_0x32056a(0x1fa)](_0x32056a(0x201)+_0x32056a(0x316)+_0x32056a(0x260));const _0x1b7ae4=_0x1c980f;if(_0x348357[_0x32056a(0x308)]===0x0)return console[_0x32056a(0x1fa)](a32_0x46a51c[_0x32056a(0x306)](_0x32056a(0x1f3))),console[_0x32056a(0x1fa)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;const _0x509fff=_0x348357[0x0];if(!_0x1b7ae4[_0x32056a(0x1e4)]||!_0x1b7ae4[_0x32056a(0x18c)])return console[_0x32056a(0x1fa)]('Error:\x20--database\x20and\x20--table\x20are\x20required'),console[_0x32056a(0x1fa)](_0x32056a(0x22c)),0x1;_0x1b7ae4[_0x32056a(0x1c6)]&&(console[_0x32056a(0x1fa)](_0x32056a(0x20d)+_0x1b7ae4[_0x32056a(0x27a)]),console['error'](_0x32056a(0x1b1)+_0x509fff),console[_0x32056a(0x1fa)](_0x32056a(0x251)+_0x1b7ae4[_0x32056a(0x1e4)]),console[_0x32056a(0x1fa)](_0x32056a(0x1c0)+_0x1b7ae4[_0x32056a(0x18c)]));const _0x33ea28=await loadJSONFromOptions(_0x1b7ae4[_0x32056a(0x301)],_0x1b7ae4[_0x32056a(0x269)]),_0x338e3f=await loadJSONFromOptions(_0x1b7ae4[_0x32056a(0x335)],_0x1b7ae4[_0x32056a(0x2d3)]),_0x1b14cb=await loadJSONFromOptions(_0x1b7ae4[_0x32056a(0x32d)],_0x1b7ae4[_0x32056a(0x344)]),_0x46dc3d={'name':_0x509fff,'description':_0x1b7ae4[_0x32056a(0x2a2)],'scheduleType':_0x1b7ae4[_0x32056a(0x2da)],'scheduleOption':_0x1b7ae4[_0x32056a(0x18a)],'timezone':_0x1b7ae4[_0x32056a(0x160)],'master':{'parentDatabaseName':_0x1b7ae4[_0x32056a(0x1e4)],'parentTableName':_0x1b7ae4[_0x32056a(0x18c)]},'attributes':_0x33ea28,'behaviors':_0x338e3f,'customerGroup':_0x1b14cb},_0x58cd74=await withSpinner('Creating\x20parent\x20segment\x20\x27'+_0x509fff+_0x32056a(0x313),()=>_0x264df3['segment'][_0x32056a(0x2b1)](_0x46dc3d),{'verbose':_0x1c980f[_0x32056a(0x1c6)]}),_0x31776f=_0x58cd74[_0x32056a(0x2f0)];return console[_0x32056a(0x1fa)](_0x32056a(0x2eb)+_0x31776f['name']+_0x32056a(0x325)+_0x31776f['id']),await handleSDKOutput([_0x31776f],_0x1c980f),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x1b0);['description']='Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async[a32_0x36fa47(0x20b)](_0x2c9123){const _0x45ccd2=a32_0x36fa47,{options:_0x26502f,args:_0x2bfece,tdx:_0x5179d4}=_0x2c9123;console[_0x45ccd2(0x1fa)](_0x45ccd2(0x1d3)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0xfa0527=_0x26502f;if(_0x2bfece[_0x45ccd2(0x308)]===0x0)return console[_0x45ccd2(0x1fa)](a32_0x46a51c[_0x45ccd2(0x306)](_0x45ccd2(0x1f3))),console[_0x45ccd2(0x1fa)](_0x45ccd2(0x1ec)),0x1;const _0x268c14=_0x2bfece[0x0];_0xfa0527[_0x45ccd2(0x1c6)]&&(console[_0x45ccd2(0x1fa)](_0x45ccd2(0x20d)+_0xfa0527[_0x45ccd2(0x27a)]),console[_0x45ccd2(0x1fa)]('Parent\x20segment:\x20'+_0x268c14));const _0xb640e=await withSpinner(_0x45ccd2(0x303)+_0x268c14+_0x45ccd2(0x313),()=>_0x5179d4[_0x45ccd2(0x18d)][_0x45ccd2(0x292)](_0x268c14),{'verbose':_0xfa0527[_0x45ccd2(0x1c6)]}),_0x44e34b=_0xb640e[_0x45ccd2(0x2f0)],_0x2d181a=await loadJSONFromOptions(_0xfa0527[_0x45ccd2(0x280)],_0xfa0527[_0x45ccd2(0x231)]),_0x2ed6ed=await loadJSONFromOptions(_0xfa0527[_0x45ccd2(0x25a)],_0xfa0527[_0x45ccd2(0x1d6)]),_0x49a1ac={'name':_0x44e34b['name'],'description':_0xfa0527[_0x45ccd2(0x2a2)]!==undefined?_0xfa0527[_0x45ccd2(0x2a2)]:_0x44e34b[_0x45ccd2(0x2a2)],'scheduleType':_0xfa0527[_0x45ccd2(0x2da)]!==undefined?_0xfa0527[_0x45ccd2(0x2da)]:_0x44e34b[_0x45ccd2(0x2da)],'scheduleOption':_0xfa0527[_0x45ccd2(0x18a)]!==undefined?_0xfa0527[_0x45ccd2(0x18a)]:_0x44e34b['scheduleOption'],'timezone':_0xfa0527[_0x45ccd2(0x160)]!==undefined?_0xfa0527['timezone']:_0x44e34b[_0x45ccd2(0x160)],'master':_0x44e34b['master'],'attributes':_0x2d181a?[..._0x44e34b[_0x45ccd2(0x301)]||[],..._0x2d181a]:_0x44e34b[_0x45ccd2(0x301)],'behaviors':_0x2ed6ed?[..._0x44e34b[_0x45ccd2(0x335)]||[],..._0x2ed6ed]:_0x44e34b['behaviors'],'customerGroup':_0x44e34b[_0x45ccd2(0x32d)]},_0x2174e6=await withSpinner(_0x45ccd2(0x356)+_0x268c14+_0x45ccd2(0x313),()=>_0x5179d4['segment']['updateParent'](_0x268c14,_0x49a1ac),{'verbose':_0xfa0527['verbose']}),_0x47cbd1=_0x2174e6[_0x45ccd2(0x2f0)];return console['error'](_0x45ccd2(0x19d)+_0x47cbd1[_0x45ccd2(0x365)]+'\x27'),await handleSDKOutput([_0x47cbd1],_0xfa0527),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x163);[a32_0x36fa47(0x2a2)]='Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file';async[a32_0x36fa47(0x20b)](_0x45e984){const _0x12a271=a32_0x36fa47,{options:_0x5db136,args:_0x7da70b,tdx:_0x427e09}=_0x45e984,_0x2eb79b=_0x5db136,_0xff11ec=_0x7da70b[0x0]||_0x5db136['parentSegment'];if(!_0xff11ec)return showParentSegmentNotSetError(_0x12a271(0x26a)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment'),0x1;if(_0x2eb79b['use']&&_0x2eb79b[_0x12a271(0x17c)])return console[_0x12a271(0x1fa)](a32_0x46a51c[_0x12a271(0x306)](_0x12a271(0x35f))),console[_0x12a271(0x1fa)](a32_0x46a51c[_0x12a271(0x2c8)]('The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires')),console['error'](a32_0x46a51c[_0x12a271(0x2c8)](_0x12a271(0x1d9)+PARENT_SEGMENT_DIR+_0x12a271(0x24b))),console[_0x12a271(0x1fa)](a32_0x46a51c['cyan'](_0x12a271(0x25f))),0x1;const _0x41e685=_0x2eb79b[_0x12a271(0x17c)]||a32_0x21c492[_0x12a271(0x181)](PARENT_SEGMENT_DIR,sanitizeFileName(_0xff11ec)+_0x12a271(0x358));_0x2eb79b[_0x12a271(0x1c6)]&&(console[_0x12a271(0x1fa)](_0x12a271(0x20d)+_0x2eb79b[_0x12a271(0x27a)]),console[_0x12a271(0x1fa)]('Parent\x20segment:\x20'+_0xff11ec),console[_0x12a271(0x1fa)]('Output\x20file:\x20'+_0x41e685));const _0xd4254f=await withSpinner(_0x12a271(0x29c)+_0xff11ec+'\x27...',()=>_0x427e09[_0x12a271(0x18d)][_0x12a271(0x254)](_0xff11ec),{'verbose':_0x2eb79b[_0x12a271(0x1c6)]}),_0x414e68=_0xd4254f[_0x12a271(0x2f0)];if(existsSync(_0x41e685)){const _0x26b619=readFileSync(_0x41e685,_0x12a271(0x225)),_0x51dec3=generateDiff(_0x26b619,_0x414e68);if(!hasChanges(_0x51dec3))console['error'](a32_0x46a51c['green']('✔')+_0x12a271(0x2f2)+a32_0x46a51c[_0x12a271(0x2fd)](_0x41e685)+_0x12a271(0x300));else{console[_0x12a271(0x1fa)](_0x12a271(0x19a)+_0x41e685+'\x27:'),console['error']('─'['repeat'](0x3c)),console[_0x12a271(0x1fa)](formatDiffWithColors(_0x51dec3)),console[_0x12a271(0x1fa)]('─'[_0x12a271(0x33b)](0x3c));if(!_0x2eb79b[_0x12a271(0x34a)]){if(!isInteractive())return console[_0x12a271(0x1fa)](a32_0x46a51c[_0x12a271(0x306)](_0x12a271(0x2f3)),_0x12a271(0x2cc)),console['error'](a32_0x46a51c[_0x12a271(0x2c8)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1a8ca5=await confirmKey(_0x12a271(0x2c1)+_0x41e685+'\x27?');if(!_0x1a8ca5)return console[_0x12a271(0x1fa)](a32_0x46a51c[_0x12a271(0x2dd)]('Aborted.')),0x1;}writeFileSync(_0x41e685,_0x414e68,_0x12a271(0x225)),console[_0x12a271(0x1fa)](a32_0x46a51c[_0x12a271(0x32f)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a32_0x46a51c['cyan'](_0x41e685));}}else{const _0x3cf475=a32_0x21c492['dirname'](_0x41e685);!existsSync(_0x3cf475)&&mkdirSync(_0x3cf475,{'recursive':!![]}),writeFileSync(_0x41e685,_0x414e68,_0x12a271(0x225)),console[_0x12a271(0x1fa)](a32_0x46a51c[_0x12a271(0x32f)]('✔')+_0x12a271(0x15e)+a32_0x46a51c['cyan'](_0x41e685));}return saveSessionContext({'parent_segment':_0xff11ec},_0x2eb79b[_0x12a271(0x2c7)]),console[_0x12a271(0x1fa)](a32_0x46a51c[_0x12a271(0x32f)]('✔')+_0x12a271(0x314)+a32_0x46a51c['dim'](_0x12a271(0x357))+_0x12a271(0x32c)+a32_0x46a51c[_0x12a271(0x2fd)](_0xff11ec)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x15d);[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x2fe);async[a32_0x36fa47(0x20b)](_0x5a90a7){const _0x2d0354=a32_0x36fa47,{options:_0x5acd24,args:_0x270eab,tdx:_0x11a4f2}=_0x5a90a7,_0x2f08e7=_0x5acd24,_0x43fe40=_0x270eab[0x0]||_0x5acd24[_0x2d0354(0x1cb)];if(!_0x43fe40)return showParentSegmentNotSetError(_0x2d0354(0x2ea)+_0x2d0354(0x1de)),0x1;const _0x553b27=resolveYamlFile(_0x43fe40);if(!existsSync(_0x553b27))return showFileNotFoundError(_0x553b27,_0x43fe40),0x1;_0x2f08e7[_0x2d0354(0x1c6)]&&(console[_0x2d0354(0x1fa)](_0x2d0354(0x20d)+_0x2f08e7[_0x2d0354(0x27a)]),console[_0x2d0354(0x1fa)](_0x2d0354(0x28b)+_0x553b27));let _0x4ca6f6;try{_0x4ca6f6=readFileSync(_0x553b27,_0x2d0354(0x225));}catch(_0x2c5bc0){const _0x38491d=_0x2c5bc0 instanceof Error?_0x2c5bc0[_0x2d0354(0x1af)]:String(_0x2c5bc0);return console[_0x2d0354(0x1fa)](_0x2d0354(0x28f)+_0x38491d),0x1;}const _0x5068db=await withSpinner(_0x2d0354(0x2be),()=>_0x11a4f2[_0x2d0354(0x18d)][_0x2d0354(0x190)](_0x4ca6f6),{'verbose':_0x2f08e7[_0x2d0354(0x1c6)]}),_0x494a5b=_0x5068db[_0x2d0354(0x2f0)],{isNew:_0x47cd85,name:_0x11184f,hasChanges:_0x55f02b,diffFormatted:_0x5483b2}=_0x494a5b;if(!_0x55f02b)return console[_0x2d0354(0x1fa)](_0x2d0354(0x1d4)+_0x11184f+_0x2d0354(0x1a2)),0x0;_0x47cd85?console[_0x2d0354(0x1fa)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x11184f+'\x27:'):console[_0x2d0354(0x1fa)](_0x2d0354(0x234)+_0x11184f+'\x27:');console['error']('─'[_0x2d0354(0x33b)](0x3c)),console[_0x2d0354(0x1fa)](_0x5483b2),console['error']('─'[_0x2d0354(0x33b)](0x3c));const _0x28b98d=_0x47cd85?_0x2d0354(0x363)+_0x11184f+'\x27?':_0x2d0354(0x315)+_0x11184f+'\x27?';if(!_0x2f08e7[_0x2d0354(0x34a)]){if(!isInteractive())return console[_0x2d0354(0x1fa)](a32_0x46a51c['red'](_0x2d0354(0x2f3)),_0x2d0354(0x2cc)),console[_0x2d0354(0x1fa)](a32_0x46a51c[_0x2d0354(0x2c8)](_0x2d0354(0x1c9))),0x1;const _0x2592ce=await confirmKey(_0x28b98d);if(!_0x2592ce)return console[_0x2d0354(0x1fa)](a32_0x46a51c['yellow']('Aborted.')),0x1;}const _0x5df365=_0x47cd85?'Creating':_0x2d0354(0x2e3),_0x1dc1f7=await withSpinner(_0x5df365+'\x20parent\x20segment\x20\x27'+_0x11184f+_0x2d0354(0x313),()=>_0x494a5b[_0x2d0354(0x336)](),{'verbose':_0x2f08e7[_0x2d0354(0x1c6)]}),_0x48e700=_0x1dc1f7[_0x2d0354(0x2f0)],_0x59bdae=getConsoleNextUrl(_0x2f08e7[_0x2d0354(0x27a)],_0x2d0354(0x337)+_0x48e700['id']),_0x2d0910=_0x47cd85?'Created':_0x2d0354(0x339);return console[_0x2d0354(0x1fa)]('✔\x20'+_0x2d0910+_0x2d0354(0x1d8)+_0x48e700[_0x2d0354(0x365)]+'\x27'),console[_0x2d0354(0x1fa)]('\x20\x20'+_0x59bdae),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x21c);[a32_0x36fa47(0x2a2)]='Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics';async[a32_0x36fa47(0x20b)](_0x2a6def){const _0x249af0=a32_0x36fa47,{options:_0x2b8774,args:_0x288569,tdx:_0x46e597}=_0x2a6def,_0x4e42eb=_0x2b8774,_0x3d7955=_0x288569[0x0]||_0x2b8774[_0x249af0(0x1cb)];if(!_0x3d7955)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a'+_0x249af0(0x36c)+'Options:\x0a'+_0x249af0(0x2fb)+_0x249af0(0x30f)+_0x249af0(0x21d)),0x1;const _0x1f10e5=resolveYamlFile(_0x3d7955);if(!existsSync(_0x1f10e5))return showFileNotFoundError(_0x1f10e5,_0x3d7955),0x1;_0x4e42eb[_0x249af0(0x1c6)]&&(console['error'](_0x249af0(0x20d)+_0x4e42eb['site']),console[_0x249af0(0x1fa)]('YAML\x20file:\x20'+_0x1f10e5));let _0x4d4ebd;try{_0x4d4ebd=readFileSync(_0x1f10e5,_0x249af0(0x225));}catch(_0x292681){const _0x5975ea=_0x292681 instanceof Error?_0x292681[_0x249af0(0x1af)]:String(_0x292681);return console['error']('Error\x20reading\x20file:\x20'+_0x5975ea),0x1;}const _0x437c2f=createCommandSpinner(a32_0x46a51c[_0x249af0(0x2c8)](_0x249af0(0x226)),{'verbose':_0x4e42eb[_0x249af0(0x1c6)]});_0x437c2f['start']();const _0x10860f={'onProgress':_0x4bd76b=>{_0x437c2f['text']=formatProgressMessage(_0x4bd76b);}};if(_0x4e42eb[_0x249af0(0x2ee)])_0x10860f[_0x249af0(0x2ee)]=!![];if(_0x4e42eb[_0x249af0(0x1f8)])_0x10860f['enriched']=!![];_0x4e42eb['attribute']&&(_0x10860f[_0x249af0(0x1b6)]=_0x4e42eb[_0x249af0(0x1b6)]);_0x4e42eb[_0x249af0(0x330)]&&(_0x10860f['behavior']=_0x4e42eb[_0x249af0(0x330)]);if(_0x4e42eb['interval'])_0x10860f[_0x249af0(0x2c3)]=_0x4e42eb[_0x249af0(0x2c3)];let _0x2c3682;try{_0x2c3682=await _0x46e597['segment']['validateParentYaml'](_0x4d4ebd,_0x10860f),_0x437c2f[_0x249af0(0x334)]();}catch(_0x17b614){_0x437c2f[_0x249af0(0x334)]();throw _0x17b614;}const _0x1c8781=_0x4e42eb[_0x249af0(0x2c3)]||'-1d';return this[_0x249af0(0x264)](_0x2c3682,_0x10860f,_0x1f10e5,_0x1c8781),_0x2c3682[_0x249af0(0x210)]?0x0:0x1;}['displayValidateResults'](_0x4331c0,_0x2b1d01,_0x4cce3e,_0x88543e){const _0x1c6545=a32_0x36fa47;console[_0x1c6545(0x1fa)]('\x0a'+a32_0x46a51c[_0x1c6545(0x277)](_0x1c6545(0x172))+'\x20'+_0x4331c0[_0x1c6545(0x365)]),console['error']('═'['repeat'](0x3c)),this['displayMasterInfo'](_0x4331c0);if(typeof _0x2b1d01['attribute']===_0x1c6545(0x2a3)){this[_0x1c6545(0x2a7)](_0x4331c0),this[_0x1c6545(0x199)](_0x4331c0),this[_0x1c6545(0x242)](_0x4cce3e,_0x88543e,_0x1c6545(0x1b6),_0x2b1d01[_0x1c6545(0x1b6)]);return;}if(_0x2b1d01['attribute']===!![]){this[_0x1c6545(0x2a7)](_0x4331c0),this[_0x1c6545(0x199)](_0x4331c0),this[_0x1c6545(0x242)](_0x4cce3e,_0x88543e,_0x1c6545(0x301));return;}if(typeof _0x2b1d01['behavior']===_0x1c6545(0x2a3)){this[_0x1c6545(0x2ff)](_0x4331c0,_0x88543e),this[_0x1c6545(0x199)](_0x4331c0),this['displayPreviewHints'](_0x4cce3e,_0x88543e,_0x1c6545(0x330),_0x2b1d01['behavior']);return;}if(_0x2b1d01[_0x1c6545(0x330)]===!![]){this[_0x1c6545(0x2ff)](_0x4331c0,_0x88543e),this['displaySummary'](_0x4331c0),this[_0x1c6545(0x242)](_0x4cce3e,_0x88543e,_0x1c6545(0x335));return;}this[_0x1c6545(0x2a7)](_0x4331c0),this[_0x1c6545(0x2ff)](_0x4331c0,_0x88543e),this['displayRealtimeInfo'](_0x4331c0),this[_0x1c6545(0x199)](_0x4331c0),this[_0x1c6545(0x242)](_0x4cce3e,_0x88543e,_0x1c6545(0x23c));}['displayRealtimeInfo'](_0x48366c){displayRealtimeValidation(_0x48366c);}['displayPreviewHints'](_0x27566a,_0x5b6afd,_0x4bdf5c,_0x45d905){const _0x42c1eb=a32_0x36fa47;console['error']('\x0a'+a32_0x46a51c[_0x42c1eb(0x2c8)](_0x42c1eb(0x33e)));const _0x4fd763=_0x5b6afd!==_0x42c1eb(0x1bc)?_0x42c1eb(0x2aa)+_0x5b6afd:'';if(_0x4bdf5c===_0x42c1eb(0x1b6)&&_0x45d905)console[_0x42c1eb(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x42c1eb(0x2c8)]('tdx\x20ps\x20preview\x20'+_0x27566a+_0x42c1eb(0x2f5)+_0x45d905+'\x22'+_0x4fd763));else{if(_0x4bdf5c==='behavior'&&_0x45d905)console['error']('\x20\x20'+a32_0x46a51c[_0x42c1eb(0x2c8)]('tdx\x20ps\x20preview\x20'+_0x27566a+_0x42c1eb(0x338)+_0x45d905+'\x22'+_0x4fd763));else(_0x4bdf5c===_0x42c1eb(0x301)||_0x4bdf5c==='all')&&console[_0x42c1eb(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x42c1eb(0x2c8)](_0x42c1eb(0x179)+_0x27566a+_0x42c1eb(0x2d2)+_0x4fd763));}(_0x4bdf5c===_0x42c1eb(0x335)||_0x4bdf5c===_0x42c1eb(0x23c))&&console['error']('\x20\x20'+a32_0x46a51c[_0x42c1eb(0x2c8)](_0x42c1eb(0x179)+_0x27566a+'\x20--behavior\x20\x22<name>\x22'+_0x4fd763)),_0x4bdf5c==='all'&&console[_0x42c1eb(0x1fa)]('\x20\x20'+a32_0x46a51c['dim'](_0x42c1eb(0x179)+_0x27566a+_0x42c1eb(0x2f8)+_0x4fd763));}[a32_0x36fa47(0x310)](_0xe6e47d){const _0x779a86=a32_0x36fa47,{master:_0x3ce597}=_0xe6e47d,_0x242b8f=_0x3ce597['schemaValid']?a32_0x46a51c[_0x779a86(0x32f)]('✔'):a32_0x46a51c[_0x779a86(0x306)]('✘');console[_0x779a86(0x1fa)]('\x0a'+a32_0x46a51c[_0x779a86(0x2c8)](_0x779a86(0x26e))),console['error'](_0x242b8f+'\x20'+a32_0x46a51c[_0x779a86(0x277)](_0x3ce597[_0x779a86(0x1e4)]+'.'+_0x3ce597['table'])),_0x3ce597[_0x779a86(0x1a9)]?_0x3ce597['rowCount']!==undefined&&console[_0x779a86(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x779a86(0x2c8)](_0x779a86(0x15a))+'\x20'+a32_0x46a51c[_0x779a86(0x2fd)](formatRows(_0x3ce597[_0x779a86(0x2e5)]))):console['error']('\x20\x20'+a32_0x46a51c[_0x779a86(0x306)](_0x779a86(0x2ab))+'\x20'+_0x3ce597[_0x779a86(0x35c)]);}[a32_0x36fa47(0x2a7)](_0x81d079){const _0x220479=a32_0x36fa47;if(_0x81d079[_0x220479(0x301)]['length']===0x0)return;console[_0x220479(0x1fa)]('\x0a'+a32_0x46a51c[_0x220479(0x2c8)](_0x220479(0x2b9)));for(const _0x5538e9 of _0x81d079[_0x220479(0x301)]){const _0x4a2973=_0x5538e9['schemaValid']?a32_0x46a51c[_0x220479(0x32f)]('✔'):a32_0x46a51c[_0x220479(0x306)]('✘');let _0x109ce4='';if(_0x5538e9[_0x220479(0x1a9)]&&_0x5538e9['matchedCount']!==undefined&&_0x5538e9[_0x220479(0x341)]!==undefined){const _0x2a42d1=_0x5538e9['coveragePercent'][_0x220479(0x1fe)](0x1),_0x149cbd=_0x5538e9[_0x220479(0x341)]>=0x50?a32_0x46a51c['green']:_0x5538e9['coveragePercent']>=0x32?a32_0x46a51c['yellow']:a32_0x46a51c[_0x220479(0x306)];_0x109ce4='\x20'+a32_0x46a51c[_0x220479(0x2c8)]('Coverage:')+'\x20'+_0x149cbd(_0x2a42d1+'%')+'\x20('+formatRows(_0x5538e9[_0x220479(0x30b)])+'\x20rows)';}console[_0x220479(0x1fa)](_0x4a2973+'\x20'+a32_0x46a51c[_0x220479(0x277)](_0x5538e9['name'])+_0x109ce4),console[_0x220479(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x220479(0x2c8)]('Source:')+'\x20'+a32_0x46a51c['bold'](_0x5538e9['database']+'.'+_0x5538e9[_0x220479(0x18c)]));const _0xb2592e=_0x5538e9[_0x220479(0x206)]===_0x5538e9[_0x220479(0x1a8)]?a32_0x46a51c[_0x220479(0x2c8)]('Join\x20on:')+'\x20'+_0x5538e9['joinKey']:a32_0x46a51c['dim'](_0x220479(0x23e))+'\x20'+_0x5538e9[_0x220479(0x206)]+_0x220479(0x32c)+_0x5538e9[_0x220479(0x1a8)];console['error']('\x20\x20'+_0xb2592e),console['error']('\x20\x20'+a32_0x46a51c[_0x220479(0x2c8)]('Columns:')),this[_0x220479(0x299)](_0x5538e9['columns']),!_0x5538e9[_0x220479(0x1a9)]&&console[_0x220479(0x1fa)]('\x20\x20'+a32_0x46a51c['red'](_0x220479(0x2ab))+'\x20'+_0x5538e9['schemaError']);}}[a32_0x36fa47(0x2ff)](_0x573b3b,_0x54a367){const _0x4c2c2a=a32_0x36fa47;if(_0x573b3b[_0x4c2c2a(0x335)]['length']===0x0)return;console[_0x4c2c2a(0x1fa)]('\x0a'+a32_0x46a51c['dim'](_0x4c2c2a(0x29b))+'\x20'+a32_0x46a51c[_0x4c2c2a(0x2c8)]('('+_0x54a367+')'));for(const _0x50dcea of _0x573b3b[_0x4c2c2a(0x335)]){const _0x377028=_0x50dcea[_0x4c2c2a(0x1a9)]?a32_0x46a51c[_0x4c2c2a(0x32f)]('✔'):a32_0x46a51c[_0x4c2c2a(0x306)]('✘');let _0x7fae80='';if(_0x50dcea['schemaValid']&&_0x50dcea[_0x4c2c2a(0x24c)]!==undefined&&_0x50dcea[_0x4c2c2a(0x343)]!==undefined){const _0x3d910c=_0x50dcea[_0x4c2c2a(0x18b)]?.[_0x4c2c2a(0x1fe)](0x1)||'?',_0x4453b6=(_0x50dcea[_0x4c2c2a(0x18b)]??0x0)>=0x32?a32_0x46a51c[_0x4c2c2a(0x32f)]:(_0x50dcea[_0x4c2c2a(0x18b)]??0x0)>=0x14?a32_0x46a51c[_0x4c2c2a(0x2dd)]:a32_0x46a51c[_0x4c2c2a(0x306)];_0x7fae80='\x20'+a32_0x46a51c['dim']('Customers:')+'\x20'+_0x4453b6(formatRows(_0x50dcea[_0x4c2c2a(0x24c)]))+'\x20('+_0x3d910c+_0x4c2c2a(0x161)+a32_0x46a51c[_0x4c2c2a(0x2c8)](_0x4c2c2a(0x1a7))+'\x20'+a32_0x46a51c[_0x4c2c2a(0x2fd)](formatRows(_0x50dcea[_0x4c2c2a(0x343)]));}console[_0x4c2c2a(0x1fa)](_0x377028+'\x20'+a32_0x46a51c[_0x4c2c2a(0x277)](_0x50dcea[_0x4c2c2a(0x365)])+_0x7fae80),console[_0x4c2c2a(0x1fa)]('\x20\x20'+a32_0x46a51c['dim'](_0x4c2c2a(0x2cd))+'\x20'+a32_0x46a51c['bold'](_0x50dcea['database']+'.'+_0x50dcea[_0x4c2c2a(0x18c)]));const _0x7a1bc9=_0x50dcea[_0x4c2c2a(0x206)]===_0x50dcea[_0x4c2c2a(0x1a8)]?a32_0x46a51c[_0x4c2c2a(0x2c8)](_0x4c2c2a(0x26d))+'\x20'+_0x50dcea['joinKey']:a32_0x46a51c[_0x4c2c2a(0x2c8)](_0x4c2c2a(0x23e))+'\x20'+_0x50dcea[_0x4c2c2a(0x206)]+_0x4c2c2a(0x32c)+_0x50dcea['foreignKey'];console['error']('\x20\x20'+_0x7a1bc9),console[_0x4c2c2a(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x4c2c2a(0x2c8)](_0x4c2c2a(0x17a))),this[_0x4c2c2a(0x299)](_0x50dcea[_0x4c2c2a(0x2a0)]),!_0x50dcea[_0x4c2c2a(0x1a9)]&&console[_0x4c2c2a(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x4c2c2a(0x306)]('Error:')+'\x20'+_0x50dcea[_0x4c2c2a(0x35c)]);}}[a32_0x36fa47(0x299)](_0xcc9b73){const _0x37268e=a32_0x36fa47;for(const _0x381866 of _0xcc9b73){_0x381866['label']===_0x381866[_0x37268e(0x233)]||_0x381866[_0x37268e(0x233)]==='*'?console[_0x37268e(0x1fa)](_0x37268e(0x213)+_0x381866[_0x37268e(0x2a4)]):console[_0x37268e(0x1fa)](_0x37268e(0x213)+_0x381866[_0x37268e(0x2a4)]+'\x20'+a32_0x46a51c['dim']('('+_0x381866[_0x37268e(0x233)]+')'));}}[a32_0x36fa47(0x199)](_0x38912b){const _0x1dddb6=a32_0x36fa47;console['error']('─'['repeat'](0x3c));if(_0x38912b['errors'][_0x1dddb6(0x308)]>0x0){console[_0x1dddb6(0x1fa)]('\x0a'+a32_0x46a51c[_0x1dddb6(0x306)]('Errors:'));for(const _0x5160ce of _0x38912b['errors']){console[_0x1dddb6(0x1fa)]('\x20\x20'+a32_0x46a51c['red']('•')+'\x20'+_0x5160ce);}}_0x38912b[_0x1dddb6(0x210)]&&console[_0x1dddb6(0x1fa)]('\x0a'+a32_0x46a51c[_0x1dddb6(0x32f)]('✔')+_0x1dddb6(0x205));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x154);[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x216);async[a32_0x36fa47(0x20b)](_0x1c08db){const _0x25ccfe=a32_0x36fa47,{options:_0x390256,args:_0x1196ce,tdx:_0x57a7a1}=_0x1c08db,_0x58f463=_0x390256,_0x2eedbc=_0x1196ce[0x0]||_0x390256[_0x25ccfe(0x1cb)];if(!_0x2eedbc)return showParentSegmentNotSetError(_0x25ccfe(0x2a5)+_0x25ccfe(0x28d)+_0x25ccfe(0x322)+'\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a'+_0x25ccfe(0x36f)+_0x25ccfe(0x1cf)+_0x25ccfe(0x368)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x58f463['master']&&!_0x58f463['attribute']&&!_0x58f463[_0x25ccfe(0x330)]&&!_0x58f463[_0x25ccfe(0x1f8)])return console[_0x25ccfe(0x1fa)](a32_0x46a51c['red'](_0x25ccfe(0x263))),console[_0x25ccfe(0x1fa)](_0x25ccfe(0x331)),console['error'](_0x25ccfe(0x31c)),console[_0x25ccfe(0x1fa)](_0x25ccfe(0x346)),console[_0x25ccfe(0x1fa)](_0x25ccfe(0x1eb)),console[_0x25ccfe(0x1fa)](_0x25ccfe(0x350)),console[_0x25ccfe(0x1fa)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x1acac6=resolveYamlFile(_0x2eedbc);if(!existsSync(_0x1acac6))return showFileNotFoundError(_0x1acac6,_0x2eedbc),0x1;_0x58f463[_0x25ccfe(0x1c6)]&&(console[_0x25ccfe(0x1fa)](_0x25ccfe(0x20d)+_0x58f463[_0x25ccfe(0x27a)]),console[_0x25ccfe(0x1fa)](_0x25ccfe(0x28b)+_0x1acac6));let _0x537119;try{_0x537119=readFileSync(_0x1acac6,'utf-8');}catch(_0x534182){const _0x2d0c6b=_0x534182 instanceof Error?_0x534182['message']:String(_0x534182);return console['error'](_0x25ccfe(0x28f)+_0x2d0c6b),0x1;}let _0x615877;try{_0x615877=parseDef(_0x537119);}catch(_0x1f66ca){const _0x3ac3b0=_0x1f66ca instanceof Error?_0x1f66ca[_0x25ccfe(0x1af)]:String(_0x1f66ca);return console[_0x25ccfe(0x1fa)](a32_0x46a51c[_0x25ccfe(0x306)](_0x25ccfe(0x256)+_0x3ac3b0)),0x1;}if(_0x58f463['attribute']===!![]||_0x58f463['attribute']===''){const _0x345296=_0x615877[_0x25ccfe(0x301)]?.[_0x25ccfe(0x175)](_0xb8527d=>_0xb8527d[_0x25ccfe(0x365)])||[];if(_0x345296[_0x25ccfe(0x308)]===0x0)console[_0x25ccfe(0x1fa)](a32_0x46a51c[_0x25ccfe(0x306)](_0x25ccfe(0x30d)));else{console[_0x25ccfe(0x1fa)](a32_0x46a51c[_0x25ccfe(0x306)](_0x25ccfe(0x215))),console['error'](_0x25ccfe(0x25d));for(const _0x4b302d of _0x345296){console[_0x25ccfe(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x25ccfe(0x2fd)](_0x4b302d));}console[_0x25ccfe(0x1fa)](_0x25ccfe(0x156)+_0x2eedbc+_0x25ccfe(0x2f5)+_0x345296[0x0]+'\x22');}return 0x1;}if(_0x58f463[_0x25ccfe(0x330)]===!![]||_0x58f463[_0x25ccfe(0x330)]===''){const _0x27b0e5=_0x615877['behaviors']?.[_0x25ccfe(0x175)](_0xe6f7af=>_0xe6f7af[_0x25ccfe(0x365)])||[];if(_0x27b0e5['length']===0x0)console[_0x25ccfe(0x1fa)](a32_0x46a51c[_0x25ccfe(0x306)](_0x25ccfe(0x266)));else{console['error'](a32_0x46a51c[_0x25ccfe(0x306)](_0x25ccfe(0x36d))),console[_0x25ccfe(0x1fa)](_0x25ccfe(0x1bf));for(const _0x393728 of _0x27b0e5){console[_0x25ccfe(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x25ccfe(0x2fd)](_0x393728));}console[_0x25ccfe(0x1fa)](_0x25ccfe(0x156)+_0x2eedbc+'\x20--behavior\x20\x22'+_0x27b0e5[0x0]+'\x22');}return 0x1;}const _0x36fb26=createCommandSpinner(a32_0x46a51c[_0x25ccfe(0x2c8)](_0x25ccfe(0x305)),{'verbose':_0x58f463[_0x25ccfe(0x1c6)]});_0x36fb26['start']();const _0x4bb445={'onProgress':_0x55f0fd=>{const _0x103aac=_0x25ccfe;_0x36fb26[_0x103aac(0x1b5)]=formatProgressMessage(_0x55f0fd);}};if(_0x58f463['master'])_0x4bb445[_0x25ccfe(0x2ee)]=!![];if(_0x58f463[_0x25ccfe(0x1b6)]&&typeof _0x58f463[_0x25ccfe(0x1b6)]===_0x25ccfe(0x2a3))_0x4bb445['attribute']=_0x58f463[_0x25ccfe(0x1b6)];if(_0x58f463['behavior']&&typeof _0x58f463[_0x25ccfe(0x330)]===_0x25ccfe(0x2a3))_0x4bb445[_0x25ccfe(0x330)]=_0x58f463['behavior'];if(_0x58f463[_0x25ccfe(0x1f8)])_0x4bb445[_0x25ccfe(0x1f8)]=!![];if(_0x58f463['interval'])_0x4bb445[_0x25ccfe(0x2c3)]=_0x58f463[_0x25ccfe(0x2c3)];let _0x4b58c7;try{_0x4b58c7=await _0x57a7a1[_0x25ccfe(0x18d)][_0x25ccfe(0x333)](_0x537119,_0x4bb445),_0x36fb26[_0x25ccfe(0x334)]();}catch(_0x198b55){_0x36fb26[_0x25ccfe(0x334)]();throw _0x198b55;}return await this[_0x25ccfe(0x1d1)](_0x4b58c7,{'master':_0x58f463[_0x25ccfe(0x2ee)],'attribute':typeof _0x58f463[_0x25ccfe(0x1b6)]===_0x25ccfe(0x2a3)?_0x58f463[_0x25ccfe(0x1b6)]:undefined,'behavior':typeof _0x58f463['behavior']===_0x25ccfe(0x2a3)?_0x58f463[_0x25ccfe(0x330)]:undefined,'enriched':_0x58f463['enriched']}),_0x4b58c7[_0x25ccfe(0x210)]?0x0:0x1;}async['displayPreviewResults'](_0x250868,_0x3e69f4){const _0x4269c3=a32_0x36fa47;console['error']('\x0a'+a32_0x46a51c[_0x4269c3(0x277)]('Preview:')+'\x20'+_0x250868['name']),console[_0x4269c3(0x1fa)]('═'['repeat'](0x3c));if(_0x3e69f4['master']&&_0x250868[_0x4269c3(0x2f4)]){const _0x565215=a32_0x46a51c[_0x4269c3(0x2c8)](_0x4269c3(0x2b7))+'\x20'+a32_0x46a51c[_0x4269c3(0x277)](_0x250868['master'][_0x4269c3(0x1e4)]+'.'+_0x250868[_0x4269c3(0x2ee)][_0x4269c3(0x18c)]);await this[_0x4269c3(0x220)](_0x565215,_0x250868[_0x4269c3(0x2f4)]);}else{if(_0x3e69f4[_0x4269c3(0x1b6)]&&_0x250868['sampleData']){const _0x26d61b=a32_0x46a51c[_0x4269c3(0x2c8)](_0x4269c3(0x243))+'\x20'+a32_0x46a51c[_0x4269c3(0x277)](_0x3e69f4[_0x4269c3(0x1b6)]);await this['displaySampleData'](_0x26d61b,_0x250868[_0x4269c3(0x2f4)]);}else{if(_0x3e69f4['behavior']&&_0x250868[_0x4269c3(0x2f4)]){const _0x23fa81=a32_0x46a51c[_0x4269c3(0x2c8)](_0x4269c3(0x347))+'\x20'+a32_0x46a51c['bold'](_0x3e69f4[_0x4269c3(0x330)]);await this[_0x4269c3(0x220)](_0x23fa81,_0x250868[_0x4269c3(0x2f4)]);}else{if(_0x3e69f4['enriched']&&_0x250868[_0x4269c3(0x2f4)]){const _0x5ba63f=a32_0x46a51c[_0x4269c3(0x2c8)]('Enriched:')+'\x20'+a32_0x46a51c[_0x4269c3(0x277)](_0x4269c3(0x2b3));await this['displaySampleData'](_0x5ba63f,_0x250868[_0x4269c3(0x2f4)]);}else!_0x250868[_0x4269c3(0x2f4)]&&console[_0x4269c3(0x1fa)](_0x4269c3(0x195));}}}if(_0x250868[_0x4269c3(0x189)]['length']>0x0){console[_0x4269c3(0x1fa)]('─'[_0x4269c3(0x33b)](0x3c)),console[_0x4269c3(0x1fa)]('\x0a'+a32_0x46a51c[_0x4269c3(0x306)](_0x4269c3(0x2fc)));for(const _0x1e1438 of _0x250868[_0x4269c3(0x189)]){console[_0x4269c3(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x4269c3(0x306)]('•')+'\x20'+_0x1e1438);}}}async['displaySampleData'](_0x3f4591,_0x4efab5){const _0x5803f9=a32_0x36fa47;if(_0x4efab5[_0x5803f9(0x308)]===0x0){console['error']('\x0a'+_0x3f4591),console[_0x5803f9(0x1fa)](_0x5803f9(0x203));return;}console[_0x5803f9(0x1fa)]('\x0a'+_0x3f4591);const _0x4ee13b=Object[_0x5803f9(0x352)](_0x4efab5[0x0])[_0x5803f9(0x175)](_0x5a6304=>({'name':_0x5a6304,'type':typeof _0x4efab5[0x0][_0x5a6304]===_0x5803f9(0x2d1)?_0x5803f9(0x326):'varchar'})),_0x238cb9={'queryId':'preview','columns':_0x4ee13b,'data':_0x4efab5,'stats':{'state':_0x5803f9(0x2e4),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x4efab5['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x41bc42=formatAsTable(_0x238cb9,_0x4efab5[_0x5803f9(0x308)],!![]);await writeOutput(_0x41bc42,undefined,'table');}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a32_0x36fa47(0x365)]='segment:parent:run';[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x366);async['execute'](_0x28da4e){const _0x24e1cc=a32_0x36fa47,{options:_0x14ee15,args:_0x3d26ef,tdx:_0x117602}=_0x28da4e,_0x431e02=_0x14ee15,_0x3b6ad7=_0x3d26ef[0x0]||_0x14ee15[_0x24e1cc(0x1cb)];if(!_0x3b6ad7)return showParentSegmentNotSetError(_0x24e1cc(0x2ad)+_0x24e1cc(0x324)),0x1;const _0x5cfd0b=resolveYamlFile(_0x3b6ad7);if(existsSync(_0x5cfd0b)){_0x431e02['verbose']&&console[_0x24e1cc(0x1fa)](_0x24e1cc(0x27c)+_0x5cfd0b);let _0x2249d9;try{_0x2249d9=readFileSync(_0x5cfd0b,'utf-8');}catch(_0x402fa5){const _0x1fae73=_0x402fa5 instanceof Error?_0x402fa5[_0x24e1cc(0x1af)]:String(_0x402fa5);return console[_0x24e1cc(0x1fa)]('Error\x20reading\x20file:\x20'+_0x1fae73),0x1;}const _0x4a4163=await withSpinner('Analyzing\x20changes...',()=>_0x117602[_0x24e1cc(0x18d)][_0x24e1cc(0x190)](_0x2249d9),{'verbose':_0x431e02['verbose']}),_0x4330cd=_0x4a4163[_0x24e1cc(0x2f0)],{isNew:_0x4679fa,name:_0x2366a5,hasChanges:_0x2814d7,diffFormatted:_0x130bdc}=_0x4330cd;if(_0x2814d7){_0x4679fa?console[_0x24e1cc(0x1fa)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x2366a5+'\x27:'):console['error'](_0x24e1cc(0x234)+_0x2366a5+'\x27:');console[_0x24e1cc(0x1fa)]('─'[_0x24e1cc(0x33b)](0x3c)),console[_0x24e1cc(0x1fa)](_0x130bdc),console[_0x24e1cc(0x1fa)]('─'[_0x24e1cc(0x33b)](0x3c));const _0x5db768=_0x4679fa?'Create\x20parent\x20segment\x20\x27'+_0x2366a5+_0x24e1cc(0x19c):'Apply\x20changes\x20to\x20\x27'+_0x2366a5+'\x27\x20and\x20run\x20workflow?';if(!_0x431e02[_0x24e1cc(0x34a)]){if(!isInteractive())return console[_0x24e1cc(0x1fa)](a32_0x46a51c['red'](_0x24e1cc(0x2f3)),_0x24e1cc(0x2cc)),console[_0x24e1cc(0x1fa)](a32_0x46a51c[_0x24e1cc(0x2c8)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x44d315=await confirmKey(_0x5db768);if(!_0x44d315)return console[_0x24e1cc(0x1fa)](a32_0x46a51c[_0x24e1cc(0x2dd)](_0x24e1cc(0x198))),0x1;}const _0x5e9874=_0x4679fa?'Creating':_0x24e1cc(0x2e3);await withSpinner(_0x5e9874+_0x24e1cc(0x1d8)+_0x2366a5+_0x24e1cc(0x313),()=>_0x4330cd[_0x24e1cc(0x336)](),{'verbose':_0x431e02[_0x24e1cc(0x1c6)]});const _0x4ec11c=_0x4679fa?_0x24e1cc(0x208):_0x24e1cc(0x339);console[_0x24e1cc(0x1fa)]('✔\x20'+_0x4ec11c+_0x24e1cc(0x1d8)+_0x2366a5+'\x27');}else console[_0x24e1cc(0x1fa)](_0x24e1cc(0x1d4)+_0x2366a5+_0x24e1cc(0x1ac));}const _0xfaf1f4=await withSpinner(_0x24e1cc(0x33c)+_0x3b6ad7+_0x24e1cc(0x313),()=>_0x117602[_0x24e1cc(0x18d)]['runParent'](_0x3b6ad7),{'verbose':_0x431e02['verbose']}),_0x2263ae=_0xfaf1f4[_0x24e1cc(0x2f0)],_0x3c4819=getConsoleUrl(_0x431e02['site'],_0x24e1cc(0x34f)+_0x2263ae[_0x24e1cc(0x31b)]+'/sessions/'+_0x2263ae['workflowSessionId']+_0x24e1cc(0x23a)+_0x2263ae[_0x24e1cc(0x214)]);return console[_0x24e1cc(0x1fa)](_0x24e1cc(0x257)),console['error']('\x20\x20'+a32_0x46a51c[_0x24e1cc(0x2c8)](_0x24e1cc(0x33d))+'\x20'+_0x2263ae[_0x24e1cc(0x329)]),console[_0x24e1cc(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x24e1cc(0x2c8)](_0x24e1cc(0x1ad))+'\x20'+_0x2263ae['status']),console[_0x24e1cc(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x24e1cc(0x2c8)](_0x24e1cc(0x2e2))+'\x20'+_0x2263ae[_0x24e1cc(0x2df)]),console[_0x24e1cc(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x24e1cc(0x2c8)]('Attempt:')+'\x20'+_0x2263ae[_0x24e1cc(0x214)]),console[_0x24e1cc(0x1fa)]('\x20\x20'+_0x3c4819),console[_0x24e1cc(0x1fa)]('\x0a'+a32_0x46a51c[_0x24e1cc(0x2c8)]('To\x20cancel:')+_0x24e1cc(0x1ed)+_0x2263ae['workflowAttemptId']+_0x24e1cc(0x1ab)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x291);[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x23f);async[a32_0x36fa47(0x20b)](_0x7ecf36){const _0x521836=a32_0x36fa47,{options:_0x29a4aa,args:_0x4aafd7,tdx:_0x283f92}=_0x7ecf36,_0x59c0f7=_0x4aafd7[0x0]||_0x29a4aa[_0x521836(0x1cb)];if(!_0x59c0f7)return showParentSegmentNotSetError(_0x521836(0x307)+_0x521836(0x232)),0x1;_0x29a4aa[_0x521836(0x1c6)]&&(console[_0x521836(0x1fa)]('Site:\x20'+_0x29a4aa[_0x521836(0x27a)]),console[_0x521836(0x1fa)](_0x521836(0x27f)+_0x59c0f7));const _0x58ad02=await withSpinner(_0x521836(0x16b)+_0x59c0f7+'\x27...',()=>_0x283f92['segment']['listFields'](_0x59c0f7),{'verbose':_0x29a4aa[_0x521836(0x1c6)]}),_0x2172ca=_0x58ad02[_0x521836(0x2f0)];console[_0x521836(0x1fa)]('✔\x20Found\x20'+_0x2172ca['length']+_0x521836(0x30a)+(_0x2172ca[_0x521836(0x308)]!==0x1?'s':''));if(_0x29a4aa['json']||_0x29a4aa[_0x521836(0x36b)])return await handleSDKOutput(_0x2172ca,_0x29a4aa),0x0;return displayFieldsHumanReadable(_0x2172ca,_0x59c0f7),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x1a5);['description']=a32_0x36fa47(0x274);async[a32_0x36fa47(0x20b)](_0x398b30){const _0x4f7238=a32_0x36fa47,{options:_0x31b834,args:_0x560c58,tdx:_0x7e3579}=_0x398b30,_0x30e683=_0x31b834,_0x2c5601=_0x560c58[0x0]||_0x31b834[_0x4f7238(0x1cb)];if(!_0x2c5601)return showParentSegmentNotSetError(_0x4f7238(0x323)+_0x4f7238(0x2d8)+_0x4f7238(0x166)+_0x4f7238(0x2f9)),0x1;_0x31b834[_0x4f7238(0x1c6)]&&(console[_0x4f7238(0x1fa)](_0x4f7238(0x20d)+_0x31b834[_0x4f7238(0x27a)]),console[_0x4f7238(0x1fa)](_0x4f7238(0x27f)+_0x2c5601));const _0x384d28=await withSpinner(_0x4f7238(0x29c)+_0x2c5601+_0x4f7238(0x313),()=>_0x7e3579[_0x4f7238(0x18d)][_0x4f7238(0x292)](_0x2c5601),{'verbose':_0x31b834[_0x4f7238(0x1c6)]}),_0x4b53f2=_0x384d28[_0x4f7238(0x2f0)];if(_0x30e683['web']){const _0x16999c=getConsoleNextUrl(_0x30e683[_0x4f7238(0x27a)],_0x4f7238(0x337)+_0x4b53f2['id']);return console['error'](a32_0x46a51c[_0x4f7238(0x32f)]('✔')+_0x4f7238(0x2e9)+a32_0x46a51c[_0x4f7238(0x2fd)](_0x16999c)),openBrowser(_0x16999c),0x0;}return await handleSingleObjectOutput(_0x4b53f2,_0x31b834),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a32_0x36fa47(0x365)]='segment:parent:desc';[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x238);async[a32_0x36fa47(0x20b)](_0x4bb68b){const _0x456539=a32_0x36fa47,{options:_0x3ceb02,args:_0xfe6b78,tdx:_0x242d01}=_0x4bb68b,_0x265ee3=_0x3ceb02,_0x1367a5=_0xfe6b78[0x0]||_0x3ceb02[_0x456539(0x1cb)];if(!_0x1367a5)return showParentSegmentNotSetError(_0x456539(0x319)+_0x456539(0x297)+_0x456539(0x166)+_0x456539(0x1a3)),0x1;_0x3ceb02[_0x456539(0x1c6)]&&(console['error'](_0x456539(0x20d)+_0x3ceb02[_0x456539(0x27a)]),console['error'](_0x456539(0x27f)+_0x1367a5));const _0x4b3881=await withSpinner(_0x456539(0x171)+_0x1367a5+'\x27...',()=>_0x242d01[_0x456539(0x18d)][_0x456539(0x22e)](_0x1367a5),{'verbose':_0x3ceb02[_0x456539(0x1c6)]}),_0x284d49=_0x4b3881['data'],_0x4c1e70=_0x242d01['segment'][_0x456539(0x1c3)](_0x284d49);if(_0x265ee3['output']){const _0x179059=await this[_0x456539(0x1d7)](_0x4bb68b,_0x1367a5,_0x284d49,_0x4c1e70),_0x11b86f=this[_0x456539(0x23d)](_0x179059);writeFileSync(_0x265ee3[_0x456539(0x17c)],_0x11b86f);const _0xb6be56=_0x179059[_0x456539(0x192)][_0x456539(0x2a0)]['length']+_0x179059[_0x456539(0x335)]['reduce']((_0x15889b,_0x589f64)=>_0x15889b+_0x589f64[_0x456539(0x2a0)]['length'],0x0),_0x131b54=_0x179059[_0x456539(0x335)][_0x456539(0x1be)](_0x459a38=>_0x459a38['columns'][_0x456539(0x308)]===0x0)['length'];return console[_0x456539(0x275)](_0x456539(0x2cb)+_0x265ee3[_0x456539(0x17c)]),console[_0x456539(0x275)]('\x20\x20Database:\x20'+_0x4c1e70),console[_0x456539(0x275)](_0x456539(0x2f7)+_0x179059[_0x456539(0x335)][_0x456539(0x308)]+_0x456539(0x207)),console['log'](_0x456539(0x21f)+_0xb6be56+_0x456539(0x1a6)),_0x131b54>0x0&&console['log'](_0x456539(0x187)+_0x131b54+_0x456539(0x222)),0x0;}console[_0x456539(0x1fa)]('\x0a'+a32_0x46a51c['bold'](_0x456539(0x1ef))+'\x20'+a32_0x46a51c[_0x456539(0x2fd)](_0x4c1e70));const _0x39acad=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x242d01[_0x456539(0x18d)][_0x456539(0x36a)](_0x284d49),{'verbose':_0x3ceb02['verbose']});console[_0x456539(0x1fa)]('\x0a'+a32_0x46a51c[_0x456539(0x277)](_0x456539(0x192))+'\x20'+a32_0x46a51c[_0x456539(0x2c8)]('('+_0x4c1e70+'.customers)'));const _0x274ffc=await executeSchemaQuery(_0x39acad['data'],_0x242d01,_0x3ceb02);await handleQueryOutput(_0x274ffc,_0x3ceb02);const _0x3781d9=await withSpinner(_0x456539(0x1a0),()=>_0x242d01[_0x456539(0x18d)]['getBehaviorNames'](_0x284d49),{'verbose':_0x3ceb02['verbose']});for(const _0x39df of _0x3781d9[_0x456539(0x2f0)]){const _0x54949e=_0x456539(0x170)+_0x39df[_0x456539(0x359)]()[_0x456539(0x1e1)](/\s+/g,'_'),_0x292520='SELECT\x20*\x20FROM\x20'+_0x4c1e70+'.'+_0x54949e;console[_0x456539(0x1fa)]('\x0a'+a32_0x46a51c[_0x456539(0x277)](_0x39df)+'\x20'+a32_0x46a51c[_0x456539(0x2c8)]('('+_0x4c1e70+'.'+_0x54949e+')'));try{const _0x2b3e95=await executeSchemaQuery(_0x292520,_0x242d01,_0x3ceb02);await handleQueryOutput(_0x2b3e95,_0x3ceb02);}catch{console['error'](a32_0x46a51c['yellow'](_0x456539(0x2d6)));}}return 0x0;}async['collectSchema'](_0x5aa0ae,_0x4d15d1,_0x349f4a,_0x3e1d51){const _0x45e8ce=a32_0x36fa47,{options:_0x43e48b,tdx:_0x6d56fa}=_0x5aa0ae,_0x3df43a=await withSpinner(_0x45e8ce(0x2d0),()=>_0x6d56fa['segment'][_0x45e8ce(0x36a)](_0x349f4a),{'verbose':_0x43e48b[_0x45e8ce(0x1c6)]}),_0x256d03=await executeSchemaQuery(_0x3df43a[_0x45e8ce(0x2f0)],_0x6d56fa,_0x43e48b),_0x22e9b9=_0x256d03[_0x45e8ce(0x2f0)][_0x45e8ce(0x175)](_0x37603d=>({'name':_0x37603d[_0x45e8ce(0x1ae)],'type':_0x37603d[_0x45e8ce(0x164)]})),_0x3d5805=await withSpinner(_0x45e8ce(0x1a0),()=>_0x6d56fa[_0x45e8ce(0x18d)][_0x45e8ce(0x35d)](_0x349f4a),{'verbose':_0x43e48b[_0x45e8ce(0x1c6)]}),_0x54503a=[];for(const _0x3f72e9 of _0x3d5805[_0x45e8ce(0x2f0)]){const _0xa84dbd=_0x45e8ce(0x170)+_0x3f72e9[_0x45e8ce(0x359)]()[_0x45e8ce(0x1e1)](/\s+/g,'_'),_0x20e03b=_0x45e8ce(0x35b)+_0x3e1d51+'.'+_0xa84dbd;let _0x531a2c=[];try{const _0x1c10b3=await executeSchemaQuery(_0x20e03b,_0x6d56fa,_0x43e48b);_0x531a2c=_0x1c10b3[_0x45e8ce(0x2f0)][_0x45e8ce(0x175)](_0x444990=>({'name':_0x444990['column_name'],'type':_0x444990[_0x45e8ce(0x164)]}));}catch{}_0x54503a[_0x45e8ce(0x271)]({'table':_0xa84dbd,'columns':_0x531a2c});}return{'database':_0x3e1d51,'parent_segment':_0x4d15d1,'parent_id':_0x349f4a,'customers':{'table':'customers','columns':_0x22e9b9},'behaviors':_0x54503a};}[a32_0x36fa47(0x23d)](_0x11bf31){const _0x7ad52b=a32_0x36fa47,_0x226784=_0x5cafc4=>{const _0x250f17=a32_0x3b1d;if(_0x5cafc4[_0x250f17(0x308)]===0x0)return'[]';const _0x168b87=_0x5cafc4['map'](_0x479437=>_0x250f17(0x1d5)+_0x479437[_0x250f17(0x365)]+_0x250f17(0x2bd)+_0x479437[_0x250f17(0x2ef)]+'\x22\x20}');return'[\x0a'+_0x168b87[_0x250f17(0x181)](',\x0a')+_0x250f17(0x2f6);},_0x1b21bf=_0x11bf31[_0x7ad52b(0x335)][_0x7ad52b(0x175)](_0x5b6abb=>{const _0x17b4d0=_0x7ad52b;return'\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x5b6abb[_0x17b4d0(0x18c)]+_0x17b4d0(0x1f6)+_0x226784(_0x5b6abb[_0x17b4d0(0x2a0)])[_0x17b4d0(0x1e1)](/^/gm,'\x20\x20')[_0x17b4d0(0x1ee)]()+_0x17b4d0(0x1ff);})['join'](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x11bf31[_0x7ad52b(0x1e4)]+_0x7ad52b(0x21a)+_0x11bf31[_0x7ad52b(0x357)]+_0x7ad52b(0x250)+_0x11bf31[_0x7ad52b(0x19b)]+_0x7ad52b(0x2ed)+_0x11bf31[_0x7ad52b(0x192)][_0x7ad52b(0x18c)]+'\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20'+_0x226784(_0x11bf31[_0x7ad52b(0x192)][_0x7ad52b(0x2a0)])[_0x7ad52b(0x1e1)](/^/gm,'\x20\x20')[_0x7ad52b(0x1ee)]()+_0x7ad52b(0x1cd)+_0x1b21bf+'\x0a\x20\x20]\x0a}\x0a';}}function a32_0x3b1d(_0x931862,_0x494671){_0x931862=_0x931862-0x153;const _0x2879b4=a32_0x2879();let _0x3b1d49=_0x2879b4[_0x931862];return _0x3b1d49;}export class ParentSegmentSQLCommand extends BaseCommand{['name']=a32_0x36fa47(0x34b);[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x28c);async[a32_0x36fa47(0x20b)](_0xd8bfd0){const _0x2ca74d=a32_0x36fa47,{options:_0x2ecb78,args:_0x844bd9,tdx:_0x387a7d}=_0xd8bfd0,_0x79ad7e=_0x844bd9[0x0]||_0x2ecb78['parentSegment'];if(!_0x79ad7e)return showParentSegmentNotSetError(_0x2ca74d(0x249)+'\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;_0x2ecb78['verbose']&&(console['error'](_0x2ca74d(0x20d)+_0x2ecb78[_0x2ca74d(0x27a)]),console['error'](_0x2ca74d(0x27f)+_0x79ad7e));const _0x42a33c=await withSpinner(_0x2ca74d(0x171)+_0x79ad7e+_0x2ca74d(0x313),()=>_0x387a7d[_0x2ca74d(0x18d)][_0x2ca74d(0x22e)](_0x79ad7e),{'verbose':_0x2ecb78[_0x2ca74d(0x1c6)]}),_0x13b5a4=_0x42a33c[_0x2ca74d(0x2f0)],_0x3255bd=await withSpinner(_0x2ca74d(0x267)+_0x79ad7e+'\x27...',()=>_0x387a7d[_0x2ca74d(0x18d)]['getParentSQL'](_0x13b5a4),{'verbose':_0x2ecb78[_0x2ca74d(0x1c6)]}),_0x480bc6=_0x3255bd['data'];return _0x2ecb78[_0x2ca74d(0x2a8)]===_0x2ca74d(0x212)||_0x2ecb78['format']==='jsonl'?await handleSDKOutput([{'sql':_0x480bc6}],_0x2ecb78):console[_0x2ca74d(0x275)](_0x480bc6),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']='segment:parent:show';['description']=a32_0x36fa47(0x1c4);async[a32_0x36fa47(0x20b)](_0x4a92e0){const _0x4f1180=a32_0x36fa47,{options:_0x154fcf,args:_0x2ed930,tdx:_0x3fa2f1}=_0x4a92e0,_0x36837d=_0x2ed930[0x0]||_0x154fcf[_0x4f1180(0x1cb)];if(!_0x36837d)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment'),0x1;_0x154fcf[_0x4f1180(0x1c6)]&&(console[_0x4f1180(0x1fa)](_0x4f1180(0x20d)+_0x154fcf['site']),console[_0x4f1180(0x1fa)]('Parent\x20segment:\x20'+_0x36837d));const _0x2ffa7f=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x36837d+_0x4f1180(0x313),()=>_0x3fa2f1[_0x4f1180(0x18d)]['resolveParentId'](_0x36837d),{'verbose':_0x154fcf[_0x4f1180(0x1c6)]}),_0x4036ea=_0x2ffa7f[_0x4f1180(0x2f0)],_0x51df2c=await withSpinner(_0x4f1180(0x267)+_0x36837d+'\x27...',()=>_0x3fa2f1['segment'][_0x4f1180(0x36a)](_0x4036ea),{'verbose':_0x154fcf[_0x4f1180(0x1c6)]});let _0x4861ff=_0x51df2c[_0x4f1180(0x2f0)];const _0x1c1464=resolveLimit(_0x154fcf[_0x4f1180(0x35a)],DEFAULT_DISPLAY_LIMIT),_0x353028=/\bLIMIT\s+\d+/i['test'](_0x4861ff);!_0x353028&&(_0x4861ff=_0x4861ff[_0x4f1180(0x1ee)]()[_0x4f1180(0x1e1)](/;+$/,''),_0x4861ff=_0x4f1180(0x230)+_0x4861ff+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x1c1464);_0x154fcf[_0x4f1180(0x1c6)]&&console[_0x4f1180(0x1fa)](_0x4f1180(0x180)+_0x4861ff);const _0x5f28b2=await withProgressSpinner('Executing\x20parent\x20segment\x20query...',async _0xf9710e=>{const _0x220568=_0x4f1180,_0x54509c=await _0x3fa2f1['query']['execute'](_0x4861ff,{'catalog':'td','schema':_0x220568(0x349),'onJobId':_0x3ce634=>{_0xf9710e['setJobId'](_0x3ce634);}});return _0x54509c;},{'verbose':_0x154fcf['verbose']}),_0x3adde1=_0x5f28b2[_0x4f1180(0x2f0)],_0x56ecd1=_0x3adde1[_0x4f1180(0x16a)]?_0x4f1180(0x287)+_0x3adde1[_0x4f1180(0x16a)]+']':'';return console['error']('✔\x20Query\x20completed:\x20Processed\x20'+_0x3adde1[_0x4f1180(0x2bb)]['processedRows'][_0x4f1180(0x248)]()+_0x4f1180(0x1f4)+(_0x4f1180(0x30c)+formatElapsed(_0x3adde1['stats'][_0x4f1180(0x184)])+_0x56ecd1)),await handleQueryOutput(_0x3adde1,_0x154fcf),0x0;}}export class PSRtListCommand extends BaseCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x327);['description']='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a32_0x36fa47(0x20b)](_0x4f904a){const _0x4e3bbf=a32_0x36fa47,{options:_0x1812ed,args:_0x19b3e7,tdx:_0xdeb011}=_0x4f904a,_0x2915e4=_0x19b3e7[0x0],_0x177769=await withSpinner(_0x2915e4?_0x4e3bbf(0x16c)+_0x2915e4+'\x27...':_0x4e3bbf(0x2b8),()=>_0xdeb011[_0x4e3bbf(0x194)]['list'](),{'verbose':_0x1812ed['verbose']});let _0x5eb093=_0x177769[_0x4e3bbf(0x2f0)][_0x4e3bbf(0x1be)](_0x30b99a=>_0x30b99a[_0x4e3bbf(0x19f)]);if(_0x2915e4){const _0x5a3d01=_0x2915e4[_0x4e3bbf(0x1e1)](/[.+^${}()|[\]\\]/g,_0x4e3bbf(0x289))['replace'](/\*/g,'.*')[_0x4e3bbf(0x1e1)](/\?/g,'.'),_0x2b4df7=new RegExp('^'+_0x5a3d01+'$','i');_0x5eb093=_0x5eb093[_0x4e3bbf(0x1be)](_0x59482a=>_0x2b4df7[_0x4e3bbf(0x2cf)](_0x59482a[_0x4e3bbf(0x365)]));}_0x5eb093[_0x4e3bbf(0x2af)]((_0x5f5a18,_0x30bbb9)=>_0x5f5a18[_0x4e3bbf(0x365)][_0x4e3bbf(0x177)](_0x30bbb9[_0x4e3bbf(0x365)])),console['error']('✔\x20Found\x20'+_0x5eb093[_0x4e3bbf(0x308)]+_0x4e3bbf(0x25e)+(_0x5eb093[_0x4e3bbf(0x308)]!==0x1?'s':''));const _0x314384=_0x12865e=>{const _0x23f011=_0x4e3bbf;return getConsoleNextUrl(_0x1812ed[_0x23f011(0x27a)],_0x23f011(0x337)+_0x12865e);};if(_0x1812ed[_0x4e3bbf(0x2a8)]===_0x4e3bbf(0x212)||_0x1812ed[_0x4e3bbf(0x2a8)]===_0x4e3bbf(0x36b)){const _0x8e8831=_0x5eb093['map'](_0xd8b33f=>({..._0xd8b33f,'url':_0x314384(_0xd8b33f['id'])}));await handleSDKOutput(_0x8e8831,_0x1812ed);}else{if(_0x5eb093[_0x4e3bbf(0x308)]===0x0)console[_0x4e3bbf(0x275)](_0x4e3bbf(0x34e));else for(const _0x235bd9 of _0x5eb093){const _0x448ea5=_0x235bd9[_0x4e3bbf(0x1e6)]?a32_0x46a51c[_0x4e3bbf(0x2c8)]('\x20('+formatRows(_0x235bd9['population'])+')'):'',_0x321655=hyperlink(_0x235bd9[_0x4e3bbf(0x365)],_0x314384(_0x235bd9['id']));console['log']('⚡\x20'+_0x321655+_0x448ea5);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']=a32_0x36fa47(0x1e9);[a32_0x36fa47(0x2a2)]='Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML';async[a32_0x36fa47(0x20b)](_0x3af6b5){const _0x2c60c0=a32_0x36fa47,{options:_0x1f8c7b,args:_0x103516,tdx:_0x9e446}=_0x3af6b5,_0x5b05d5=_0x103516[0x0]||_0x1f8c7b[_0x2c60c0(0x1cb)];if(!_0x5b05d5)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a'+'\x20\x20\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 _0x2cd505=resolveYamlFile(_0x5b05d5);if(!existsSync(_0x2cd505))return showFileNotFoundError(_0x2cd505,_0x5b05d5),0x1;let _0x1e1fb5;try{_0x1e1fb5=readFileSync(_0x2cd505,_0x2c60c0(0x225));}catch(_0x1ab2c8){const _0x3b7416=_0x1ab2c8 instanceof Error?_0x1ab2c8[_0x2c60c0(0x1af)]:String(_0x1ab2c8);return console[_0x2c60c0(0x1fa)](_0x2c60c0(0x28f)+_0x3b7416),0x1;}const _0x5c41ad=createCommandSpinner(a32_0x46a51c[_0x2c60c0(0x2c8)](_0x2c60c0(0x364)),{'verbose':_0x1f8c7b[_0x2c60c0(0x1c6)]});_0x5c41ad[_0x2c60c0(0x200)]();const _0x3335ca={'realtime':!![],'onProgress':_0x5879a2=>{_0x5c41ad['text']=formatProgressMessage(_0x5879a2);}};let _0x5876b5;try{_0x5876b5=await _0x9e446['segment'][_0x2c60c0(0x20e)](_0x1e1fb5,_0x3335ca),_0x5c41ad['stop']();}catch(_0x2093d6){_0x5c41ad['stop']();throw _0x2093d6;}console['error']('\x0a'+a32_0x46a51c[_0x2c60c0(0x277)]('RT\x202.0\x20Validate:')+'\x20'+_0x5876b5[_0x2c60c0(0x365)]),console[_0x2c60c0(0x1fa)]('═'[_0x2c60c0(0x33b)](0x3c)),displayRealtimeValidation(_0x5876b5),console[_0x2c60c0(0x1fa)]('─'[_0x2c60c0(0x33b)](0x3c));if(_0x5876b5['errors'][_0x2c60c0(0x308)]>0x0){console[_0x2c60c0(0x1fa)]('\x0a'+a32_0x46a51c[_0x2c60c0(0x306)](_0x2c60c0(0x2fc)));for(const _0x2f38d0 of _0x5876b5[_0x2c60c0(0x189)]){console[_0x2c60c0(0x1fa)]('\x20\x20'+a32_0x46a51c[_0x2c60c0(0x306)]('•')+'\x20'+_0x2f38d0);}}return _0x5876b5[_0x2c60c0(0x210)]&&console[_0x2c60c0(0x1fa)]('\x0a'+a32_0x46a51c[_0x2c60c0(0x32f)]('✔')+'\x20RT\x20configuration\x20is\x20valid'),_0x5876b5[_0x2c60c0(0x210)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a32_0x36fa47(0x365)]='ps:rt:jn:list';['description']=a32_0x36fa47(0x29a);async[a32_0x36fa47(0x20b)](_0x108f75){const _0x295a98=a32_0x36fa47,{options:_0x2dff21,args:_0x52d8cb,tdx:_0x4fb28a}=_0x108f75,_0x47f51b=_0x52d8cb[0x0]||_0x2dff21['parentSegment'];if(!_0x47f51b)return showParentSegmentNotSetError(_0x295a98(0x1d2)+_0x295a98(0x1ea)),0x1;_0x2dff21['verbose']&&(console[_0x295a98(0x1fa)](_0x295a98(0x20d)+_0x2dff21[_0x295a98(0x27a)]),console[_0x295a98(0x1fa)](_0x295a98(0x27f)+_0x47f51b));const _0x55ec29=await withSpinner(_0x295a98(0x171)+_0x47f51b+_0x295a98(0x313),()=>_0x4fb28a[_0x295a98(0x18d)][_0x295a98(0x22e)](_0x47f51b),{'verbose':_0x2dff21[_0x295a98(0x1c6)]}),_0x3282f1=_0x55ec29[_0x295a98(0x2f0)],_0x27c0fe=await withSpinner(_0x295a98(0x16f)+_0x47f51b+_0x295a98(0x313),()=>_0x4fb28a[_0x295a98(0x194)][_0x295a98(0x239)](_0x3282f1),{'verbose':_0x2dff21[_0x295a98(0x1c6)]}),_0x4520da=_0x27c0fe['data'];console[_0x295a98(0x1fa)](_0x295a98(0x25b)+_0x4520da[_0x295a98(0x308)]+_0x295a98(0x362)+(_0x4520da[_0x295a98(0x308)]!==0x1?'s':''));if(_0x2dff21[_0x295a98(0x2a8)]===_0x295a98(0x212)||_0x2dff21['format']===_0x295a98(0x36b))await handleSDKOutput(_0x4520da,_0x2dff21);else{if(_0x4520da['length']===0x0)console['log'](_0x295a98(0x282));else for(const _0x4d5568 of _0x4520da){const _0x5de96c=_0x4d5568['state']===_0x295a98(0x35e)?'🚀':'📝',_0x851be6=_0x4d5568['paused']?a32_0x46a51c[_0x295a98(0x2dd)](_0x295a98(0x1e0)):'',_0x101449=a32_0x46a51c[_0x295a98(0x2c8)]('\x20('+_0x4d5568[_0x295a98(0x20c)]+_0x295a98(0x1c7)+(_0x4d5568[_0x295a98(0x20c)]!==0x1?'s':'')+')');console['log'](_0x5de96c+'\x20'+_0x4d5568[_0x295a98(0x365)]+_0x851be6+_0x101449);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x2d9);['description']=a32_0x36fa47(0x32a);async['execute'](_0x416c92){const _0x4471dd=a32_0x36fa47,{options:_0x48fce3,args:_0x2c906c,tdx:_0x4c395e}=_0x416c92,_0x1ad0fd=_0x2c906c[0x0];if(!_0x1ad0fd)return console[_0x4471dd(0x1fa)](a32_0x46a51c[_0x4471dd(0x306)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0x4471dd(0x1fa)](_0x4471dd(0x1f0)),console[_0x4471dd(0x1fa)](a32_0x46a51c[_0x4471dd(0x2c8)](_0x4471dd(0x217))),0x1;_0x48fce3['verbose']&&(console[_0x4471dd(0x1fa)](_0x4471dd(0x20d)+_0x48fce3['site']),console[_0x4471dd(0x1fa)](_0x4471dd(0x1b8)+_0x1ad0fd));const _0xdc530f=await withSpinner(_0x4471dd(0x2ba)+_0x1ad0fd+_0x4471dd(0x313),()=>_0x4c395e['realtime'][_0x4471dd(0x36e)](_0x1ad0fd),{'verbose':_0x48fce3[_0x4471dd(0x1c6)]}),_0x4a0834=_0xdc530f[_0x4471dd(0x2f0)];console[_0x4471dd(0x1fa)](_0x4471dd(0x18e)+_0x4a0834[_0x4471dd(0x365)]+'\x27');if(_0x48fce3[_0x4471dd(0x2a8)]===_0x4471dd(0x212)||_0x48fce3[_0x4471dd(0x2a8)]===_0x4471dd(0x36b))await handleSDKOutput([_0x4a0834],_0x48fce3);else{const _0xffec50=_0x4a0834[_0x4471dd(0x1b2)]===_0x4471dd(0x35e)?'🚀':'📝',_0x2432de=_0x4a0834[_0x4471dd(0x312)]?a32_0x46a51c[_0x4471dd(0x2dd)](_0x4471dd(0x1e0)):'';console['log'](_0xffec50+'\x20'+_0x4a0834['name']+_0x2432de);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{['name']=a32_0x36fa47(0x2e7);[a32_0x36fa47(0x2a2)]='Resume\x20activations\x20in\x20an\x20RT\x20journey';async[a32_0x36fa47(0x20b)](_0x220022){const _0x91d06f=a32_0x36fa47,{options:_0x2b7505,args:_0x141d32,tdx:_0x536fd8}=_0x220022,_0xf7dc86=_0x141d32[0x0];if(!_0xf7dc86)return console['error'](a32_0x46a51c[_0x91d06f(0x306)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console['error']('Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a'),console[_0x91d06f(0x1fa)](a32_0x46a51c[_0x91d06f(0x2c8)](_0x91d06f(0x217))),0x1;_0x2b7505[_0x91d06f(0x1c6)]&&(console['error'](_0x91d06f(0x20d)+_0x2b7505[_0x91d06f(0x27a)]),console[_0x91d06f(0x1fa)](_0x91d06f(0x1b8)+_0xf7dc86));const _0x4dd72f=await withSpinner(_0x91d06f(0x1aa)+_0xf7dc86+_0x91d06f(0x313),()=>_0x536fd8[_0x91d06f(0x194)][_0x91d06f(0x342)](_0xf7dc86),{'verbose':_0x2b7505[_0x91d06f(0x1c6)]}),_0x3e7fee=_0x4dd72f[_0x91d06f(0x2f0)];console[_0x91d06f(0x1fa)](_0x91d06f(0x2b4)+_0x3e7fee['name']+'\x27');if(_0x2b7505[_0x91d06f(0x2a8)]===_0x91d06f(0x212)||_0x2b7505[_0x91d06f(0x2a8)]===_0x91d06f(0x36b))await handleSDKOutput([_0x3e7fee],_0x2b7505);else{const _0x451539=_0x3e7fee[_0x91d06f(0x1b2)]==='launched'?'🚀':'📝',_0x176b9c=_0x3e7fee['paused']?a32_0x46a51c['yellow'](_0x91d06f(0x1e0)):'';console['log'](_0x451539+'\x20'+_0x3e7fee[_0x91d06f(0x365)]+_0x176b9c);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x317);[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x1ce);async['execute'](_0x3ac737){const _0x110730=a32_0x36fa47,{options:_0x811d85,args:_0x3df92a,tdx:_0x36d2c0}=_0x3ac737,_0x47711d=_0x3df92a[0x0]||_0x811d85[_0x110730(0x1cb)];if(!_0x47711d)return showParentSegmentNotSetError(_0x110730(0x22d)+_0x110730(0x34d)),0x1;_0x811d85[_0x110730(0x1c6)]&&(console[_0x110730(0x1fa)](_0x110730(0x20d)+_0x811d85['site']),console[_0x110730(0x1fa)]('Parent\x20segment:\x20'+_0x47711d));const _0x2bf984=await withSpinner(_0x110730(0x171)+_0x47711d+_0x110730(0x313),()=>_0x36d2c0[_0x110730(0x18d)][_0x110730(0x22e)](_0x47711d),{'verbose':_0x811d85[_0x110730(0x1c6)]}),_0xa6bf57=_0x2bf984[_0x110730(0x2f0)],_0x582087=await withSpinner('Getting\x20RT\x20configuration\x20version\x20for\x20\x27'+_0x47711d+_0x110730(0x313),()=>_0x36d2c0[_0x110730(0x194)]['getCurrentConfigVersion'](_0xa6bf57),{'verbose':_0x811d85[_0x110730(0x1c6)]}),_0x53b1a2=_0x582087[_0x110730(0x2f0)];return console[_0x110730(0x1fa)](_0x110730(0x17b)),_0x811d85[_0x110730(0x2a8)]===_0x110730(0x212)||_0x811d85[_0x110730(0x2a8)]===_0x110730(0x36b)?await handleSDKOutput([_0x53b1a2],_0x811d85):(console[_0x110730(0x275)](_0x110730(0x2dc)+_0x53b1a2['id']),console['log'](_0x110730(0x1ba)+_0x53b1a2[_0x110730(0x329)]),console[_0x110730(0x275)](_0x110730(0x18f)+_0x53b1a2[_0x110730(0x245)]),console[_0x110730(0x275)](_0x110730(0x1bd)+_0x53b1a2[_0x110730(0x174)]),console[_0x110730(0x275)](_0x110730(0x354)+_0x53b1a2[_0x110730(0x244)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{['name']=a32_0x36fa47(0x278);[a32_0x36fa47(0x2a2)]='List\x20personalization\x20services\x20for\x20a\x20parent\x20segment';async['execute'](_0x2e2efa){const _0x3b0383=a32_0x36fa47,{options:_0x348f52,args:_0xc3f45d,tdx:_0x52fcbe}=_0x2e2efa,_0x21dc0d=_0xc3f45d[0x0]||_0x348f52[_0x3b0383(0x1cb)];if(!_0x21dc0d)return showParentSegmentNotSetError(_0x3b0383(0x2a6)+_0x3b0383(0x26c)),0x1;const _0x3ccaf8=await withSpinner(_0x3b0383(0x171)+_0x21dc0d+'\x27...',()=>_0x52fcbe[_0x3b0383(0x18d)]['resolveParentId'](_0x21dc0d),{'verbose':_0x348f52[_0x3b0383(0x1c6)]}),_0x2e84ac=_0x3ccaf8['data'],_0x3ee3bf=await withSpinner(_0x3b0383(0x197)+_0x21dc0d+_0x3b0383(0x313),()=>_0x52fcbe[_0x3b0383(0x26f)][_0x3b0383(0x2c6)](_0x2e84ac),{'verbose':_0x348f52[_0x3b0383(0x1c6)]}),_0x5348f6=_0x3ee3bf[_0x3b0383(0x2f0)];console[_0x3b0383(0x1fa)](_0x3b0383(0x25b)+_0x5348f6[_0x3b0383(0x308)]+_0x3b0383(0x2e0)+(_0x5348f6[_0x3b0383(0x308)]!==0x1?'s':''));if(_0x348f52['format']===_0x3b0383(0x212)||_0x348f52[_0x3b0383(0x2a8)]===_0x3b0383(0x36b))await handleSDKOutput(_0x5348f6,_0x348f52);else{if(_0x5348f6[_0x3b0383(0x308)]===0x0)console[_0x3b0383(0x275)](_0x3b0383(0x255)),console[_0x3b0383(0x1fa)](a32_0x46a51c['cyan']('\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML'));else for(const _0x1201ed of _0x5348f6){console[_0x3b0383(0x275)](a32_0x46a51c[_0x3b0383(0x277)](_0x1201ed['name'])+'\x20'+a32_0x46a51c['dim'](_0x3b0383(0x219)+_0x1201ed['id']+')'));_0x1201ed[_0x3b0383(0x2a2)]&&console[_0x3b0383(0x275)]('\x20\x20'+a32_0x46a51c['dim'](_0x1201ed[_0x3b0383(0x2a2)]));if(_0x1201ed['tokens']&&_0x1201ed[_0x3b0383(0x1c2)][_0x3b0383(0x308)]>0x0)for(const _0x4ee9cf of _0x1201ed[_0x3b0383(0x1c2)]){const _0x112089=_0x4ee9cf[_0x3b0383(0x31f)]?.[_0x3b0383(0x308)]?_0x4ee9cf[_0x3b0383(0x31f)][_0x3b0383(0x181)](',\x20'):_0x3b0383(0x253);console[_0x3b0383(0x275)]('\x20\x20'+a32_0x46a51c[_0x3b0383(0x2fd)]('token:')+'\x20'+_0x4ee9cf[_0x3b0383(0x365)]+'\x20'+a32_0x46a51c[_0x3b0383(0x2c8)]('(id:\x20'+_0x4ee9cf['id']+')')),console['log'](_0x3b0383(0x25c)+a32_0x46a51c[_0x3b0383(0x2c8)](_0x3b0383(0x20a))+'\x20'+_0x112089);}else console[_0x3b0383(0x275)]('\x20\x20'+a32_0x46a51c[_0x3b0383(0x2c8)](_0x3b0383(0x1df)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']=a32_0x36fa47(0x1c5);['description']=a32_0x36fa47(0x29f);async[a32_0x36fa47(0x20b)](_0x3f2332){const _0x556879=a32_0x36fa47,{options:_0x412d4b,args:_0x54b448,tdx:_0x4c685e}=_0x3f2332,_0x377e26=_0x412d4b,_0x357c04=_0x54b448[0x0],_0xdaf639=_0x54b448[0x1]||_0x412d4b[_0x556879(0x1cb)];if(!_0x357c04)return console[_0x556879(0x1fa)](_0x556879(0x32e)),console[_0x556879(0x1fa)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]'),console[_0x556879(0x1fa)](_0x556879(0x196)),0x1;if(!_0xdaf639)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a'+_0x556879(0x196)),0x1;const _0x1090c9=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xdaf639+_0x556879(0x313),()=>_0x4c685e['segment'][_0x556879(0x22e)](_0xdaf639),{'verbose':_0x412d4b[_0x556879(0x1c6)]}),_0x8f288=_0x1090c9['data'],_0x96e67d={'name':_0x357c04,'description':_0x377e26[_0x556879(0x2a2)],'public':_0x377e26[_0x556879(0x247)]},_0x25746f=await withSpinner(_0x556879(0x1b7)+_0x357c04+_0x556879(0x313),()=>_0x4c685e['personalization'][_0x556879(0x1dc)](_0x8f288,_0x96e67d),{'verbose':_0x412d4b['verbose']}),_0x1dc6cd=_0x25746f['data'];return console[_0x556879(0x1fa)](_0x556879(0x15c)+_0x1dc6cd[_0x556879(0x365)]+_0x556879(0x325)+_0x1dc6cd['id']),await handleSDKOutput([_0x1dc6cd],_0x412d4b),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a32_0x36fa47(0x365)]='ps:pz:service:show';[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x285);async[a32_0x36fa47(0x20b)](_0x53aa98){const _0x517273=a32_0x36fa47,{options:_0x4a7e25,args:_0x1a13ec,tdx:_0x2b7bf4}=_0x53aa98,_0x49e40d=_0x1a13ec[0x0],_0xf405fb=_0x1a13ec[0x1]||_0x4a7e25[_0x517273(0x1cb)];if(!_0x49e40d)return console[_0x517273(0x1fa)](_0x517273(0x2db)),console[_0x517273(0x1fa)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console[_0x517273(0x1fa)](_0x517273(0x229)),0x1;if(!_0xf405fb)return showParentSegmentNotSetError(_0x517273(0x2f1)+_0x517273(0x229)),0x1;const _0xfd1329=await withSpinner(_0x517273(0x171)+_0xf405fb+'\x27...',()=>_0x2b7bf4[_0x517273(0x18d)][_0x517273(0x22e)](_0xf405fb),{'verbose':_0x4a7e25[_0x517273(0x1c6)]}),_0x586cc0=_0xfd1329[_0x517273(0x2f0)],_0x132283=await withSpinner(_0x517273(0x26b)+_0x49e40d+'\x27...',()=>_0x2b7bf4[_0x517273(0x26f)][_0x517273(0x31e)](_0x586cc0,_0x49e40d),{'verbose':_0x4a7e25[_0x517273(0x1c6)]}),_0x39a142=_0x132283[_0x517273(0x2f0)];if(_0x4a7e25[_0x517273(0x212)]||_0x4a7e25[_0x517273(0x36b)])await handleSDKOutput([_0x39a142],_0x4a7e25);else{console[_0x517273(0x275)](a32_0x46a51c[_0x517273(0x277)](_0x39a142[_0x517273(0x365)])+'\x20'+a32_0x46a51c['dim'](_0x517273(0x219)+_0x39a142['id']+')'));_0x39a142[_0x517273(0x2a2)]&&console[_0x517273(0x275)]('\x20\x20'+a32_0x46a51c[_0x517273(0x2c8)](_0x39a142[_0x517273(0x2a2)]));console[_0x517273(0x275)]('\x20\x20'+a32_0x46a51c[_0x517273(0x2fd)](_0x517273(0x2e8))+'\x20'+(_0x39a142[_0x517273(0x247)]?_0x517273(0x34a):'no'));if(_0x39a142[_0x517273(0x1c2)]&&_0x39a142[_0x517273(0x1c2)]['length']>0x0)for(const _0x52e479 of _0x39a142[_0x517273(0x1c2)]){const _0x131805=_0x52e479[_0x517273(0x31f)]?.[_0x517273(0x308)]?_0x52e479[_0x517273(0x31f)][_0x517273(0x181)](',\x20'):'any';console['log']('\x20\x20'+a32_0x46a51c['cyan'](_0x517273(0x17e))+'\x20'+_0x52e479[_0x517273(0x365)]+'\x20'+a32_0x46a51c[_0x517273(0x2c8)]('(id:\x20'+_0x52e479['id']+')')),console[_0x517273(0x275)](_0x517273(0x25c)+a32_0x46a51c[_0x517273(0x2c8)](_0x517273(0x20a))+'\x20'+_0x131805);}else console[_0x517273(0x275)]('\x20\x20'+a32_0x46a51c[_0x517273(0x2c8)](_0x517273(0x1df)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x16d);[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x360);async[a32_0x36fa47(0x20b)](_0x168701){const _0x136666=a32_0x36fa47,{options:_0x4ff065,args:_0x16a289,tdx:_0x4ec403}=_0x168701,_0x4e52b5=_0x16a289[0x0],_0x220e38=_0x16a289[0x1]||_0x4ff065[_0x136666(0x1cb)];if(!_0x4e52b5)return console[_0x136666(0x1fa)](_0x136666(0x2db)),console['error'](_0x136666(0x2a9)),console[_0x136666(0x1fa)](_0x136666(0x159)),0x1;if(!_0x220e38)return showParentSegmentNotSetError(_0x136666(0x1b9)+_0x136666(0x159)),0x1;const _0x1f6f30=await withSpinner(_0x136666(0x171)+_0x220e38+'\x27...',()=>_0x4ec403[_0x136666(0x18d)][_0x136666(0x22e)](_0x220e38),{'verbose':_0x4ff065[_0x136666(0x1c6)]}),_0x1378c4=_0x1f6f30[_0x136666(0x2f0)];return await withSpinner(_0x136666(0x30e)+_0x4e52b5+'\x27...',()=>_0x4ec403[_0x136666(0x26f)][_0x136666(0x290)](_0x1378c4,_0x4e52b5),{'verbose':_0x4ff065['verbose']}),console[_0x136666(0x1fa)]('✔\x20Deleted\x20personalization\x20service\x20\x27'+_0x4e52b5+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{['name']=a32_0x36fa47(0x1cc);[a32_0x36fa47(0x2a2)]='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async[a32_0x36fa47(0x20b)](_0x46b8aa){const _0x348a8a=a32_0x36fa47,{options:_0x342c78,args:_0x2704b2,tdx:_0x4e438b}=_0x46b8aa,_0x484017=_0x342c78,_0x4be3f8=_0x2704b2[0x0],_0x2236af=_0x2704b2[0x1]||_0x342c78[_0x348a8a(0x1cb)];if(!_0x4be3f8)return console[_0x348a8a(0x1fa)](_0x348a8a(0x2db)),console[_0x348a8a(0x1fa)](_0x348a8a(0x16e)),console['error'](_0x348a8a(0x361)),0x1;if(!_0x484017[_0x348a8a(0x365)])return console['error']('Error:\x20--name\x20is\x20required'),console[_0x348a8a(0x1fa)](_0x348a8a(0x16e)),0x1;if(!_0x2236af)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a'+_0x348a8a(0x361)),0x1;const _0x119fa3=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x2236af+'\x27...',()=>_0x4e438b[_0x348a8a(0x18d)][_0x348a8a(0x22e)](_0x2236af),{'verbose':_0x342c78[_0x348a8a(0x1c6)]}),_0x116a32=_0x119fa3['data'],_0x42e361={'name':_0x484017['name']};_0x484017[_0x348a8a(0x2a2)]!==undefined&&(_0x42e361['description']=_0x484017[_0x348a8a(0x2a2)]);const _0x1cf86e=await withSpinner(_0x348a8a(0x283)+_0x4be3f8+_0x348a8a(0x313),()=>_0x4e438b['personalization'][_0x348a8a(0x2d5)](_0x116a32,_0x4be3f8,_0x42e361),{'verbose':_0x342c78['verbose']}),_0x1de19b=_0x1cf86e[_0x348a8a(0x2f0)];return console[_0x348a8a(0x1fa)](_0x348a8a(0x298)+_0x1de19b[_0x348a8a(0x365)]+'\x27'),await handleSDKOutput([_0x1de19b],_0x342c78),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a32_0x36fa47(0x365)]='ps:pz:service:token:create';['description']=a32_0x36fa47(0x265);async[a32_0x36fa47(0x20b)](_0x501fe1){const _0x30fba2=a32_0x36fa47,{options:_0x203398,args:_0x3302ec,tdx:_0x122c3e}=_0x501fe1,_0x56e192=_0x203398,_0x27e82e=_0x3302ec[0x0],_0x4264f1=_0x3302ec[0x1],_0xd62e68=_0x3302ec[0x2]||_0x203398[_0x30fba2(0x1cb)];if(!_0x27e82e)return console[_0x30fba2(0x1fa)]('Error:\x20Token\x20name\x20is\x20required'),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x30fba2(0x1fa)](_0x30fba2(0x1e3)),0x1;if(!_0x4264f1)return console[_0x30fba2(0x1fa)](_0x30fba2(0x2db)),console[_0x30fba2(0x1fa)](_0x30fba2(0x2ae)),console[_0x30fba2(0x1fa)](_0x30fba2(0x1e3)),0x1;if(!_0xd62e68)return showParentSegmentNotSetError(_0x30fba2(0x240)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x298ca5=await withSpinner(_0x30fba2(0x171)+_0xd62e68+'\x27...',()=>_0x122c3e['segment']['resolveParentId'](_0xd62e68),{'verbose':_0x203398[_0x30fba2(0x1c6)]}),_0x17b05d=_0x298ca5[_0x30fba2(0x2f0)],_0x33a944={'name':_0x27e82e};_0x56e192[_0x30fba2(0x31f)]&&(_0x33a944[_0x30fba2(0x31f)]=_0x56e192[_0x30fba2(0x31f)][_0x30fba2(0x1e8)](',')[_0x30fba2(0x175)](_0x1f8be7=>_0x1f8be7['trim']()));_0x56e192[_0x30fba2(0x2a2)]&&(_0x33a944['description']=_0x56e192['description']);const _0x540137=await withSpinner('Creating\x20token\x20\x27'+_0x27e82e+_0x30fba2(0x304)+_0x4264f1+_0x30fba2(0x313),()=>_0x122c3e[_0x30fba2(0x26f)][_0x30fba2(0x22f)](_0x17b05d,_0x4264f1,_0x33a944),{'verbose':_0x203398[_0x30fba2(0x1c6)]}),_0x4ceb48=_0x540137[_0x30fba2(0x2f0)];return console['error'](_0x30fba2(0x15b)+_0x4ceb48['name']+_0x30fba2(0x325)+_0x4ceb48['id']),_0x4ceb48[_0x30fba2(0x1b4)]&&(console[_0x30fba2(0x1fa)](a32_0x46a51c['yellow'](_0x30fba2(0x258))),console[_0x30fba2(0x1fa)](a32_0x46a51c[_0x30fba2(0x2fd)](_0x4ceb48[_0x30fba2(0x1b4)])),console[_0x30fba2(0x1fa)]('')),await handleSDKOutput([_0x4ceb48],_0x203398),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x1c8);[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x178);async[a32_0x36fa47(0x20b)](_0x5adc74){const _0x3d47d9=a32_0x36fa47,{options:_0x4ed2bf,args:_0x27a05d,tdx:_0xfe539f}=_0x5adc74,_0x5c5453=_0x27a05d[0x0],_0xc83883=_0x27a05d[0x1]||_0x4ed2bf[_0x3d47d9(0x1cb)];if(!_0x5c5453)return console[_0x3d47d9(0x1fa)](_0x3d47d9(0x34c)),console[_0x3d47d9(0x1fa)](_0x3d47d9(0x1f7)),console[_0x3d47d9(0x1fa)](_0x3d47d9(0x221)),0x1;if(!_0xc83883)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a'+_0x3d47d9(0x221)),0x1;const _0x2167f1=await withSpinner(_0x3d47d9(0x171)+_0xc83883+_0x3d47d9(0x313),()=>_0xfe539f[_0x3d47d9(0x18d)][_0x3d47d9(0x22e)](_0xc83883),{'verbose':_0x4ed2bf[_0x3d47d9(0x1c6)]}),_0x178b3f=_0x2167f1[_0x3d47d9(0x2f0)],_0x49b89d=await withSpinner(_0x3d47d9(0x293),()=>_0xfe539f[_0x3d47d9(0x26f)][_0x3d47d9(0x2c6)](_0x178b3f),{'verbose':_0x4ed2bf[_0x3d47d9(0x1c6)]}),_0x2fd270=_0x49b89d[_0x3d47d9(0x2f0)];let _0x20e5de;for(const _0x56ea97 of _0x2fd270){if(_0x56ea97[_0x3d47d9(0x1c2)]?.['some'](_0x5cb79f=>_0x5cb79f['id']===_0x5c5453)){_0x20e5de=_0x56ea97['id'];break;}}if(!_0x20e5de)return console['error'](_0x3d47d9(0x191)+_0x5c5453+_0x3d47d9(0x286)),0x1;const _0x31201f=await withSpinner(_0x3d47d9(0x228)+_0x5c5453+_0x3d47d9(0x313),()=>_0xfe539f['personalization'][_0x3d47d9(0x369)](_0x178b3f,_0x20e5de,_0x5c5453),{'verbose':_0x4ed2bf[_0x3d47d9(0x1c6)]}),_0xb6a27d=_0x31201f[_0x3d47d9(0x2f0)];return console[_0x3d47d9(0x1fa)](_0x3d47d9(0x186)+(_0xb6a27d[_0x3d47d9(0x365)]||_0x5c5453)+'\x27'),await handleSDKOutput([_0xb6a27d],_0x4ed2bf),0x0;}}export class PSPzListCommand extends BaseCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x33a);[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x1bb);async[a32_0x36fa47(0x20b)](_0x37bcf1){const _0x4668be=a32_0x36fa47,{options:_0x19239c,args:_0x544c72,tdx:_0x2b3a86}=_0x37bcf1,_0x5446f5=_0x544c72[0x0]||_0x19239c[_0x4668be(0x1cb)];if(!_0x5446f5)return showParentSegmentNotSetError(_0x4668be(0x321)+_0x4668be(0x168)),0x1;const _0x11c100=await withSpinner(_0x4668be(0x171)+_0x5446f5+_0x4668be(0x313),()=>_0x2b3a86[_0x4668be(0x18d)][_0x4668be(0x22e)](_0x5446f5),{'verbose':_0x19239c[_0x4668be(0x1c6)]}),_0x2697bb=_0x11c100[_0x4668be(0x2f0)],_0x11a9cc=await withSpinner(_0x4668be(0x296)+_0x5446f5+'\x27...',()=>_0x2b3a86[_0x4668be(0x26f)]['listPersonalizations'](_0x2697bb),{'verbose':_0x19239c[_0x4668be(0x1c6)]}),_0xed6842=_0x11a9cc[_0x4668be(0x2f0)];console[_0x4668be(0x1fa)](_0x4668be(0x25b)+_0xed6842[_0x4668be(0x308)]+'\x20personalization'+(_0xed6842[_0x4668be(0x308)]!==0x1?'s':''));if(_0x19239c[_0x4668be(0x2a8)]===_0x4668be(0x212)||_0x19239c[_0x4668be(0x2a8)]===_0x4668be(0x36b))await handleSDKOutput(_0xed6842,_0x19239c);else{if(_0xed6842[_0x4668be(0x308)]===0x0)console[_0x4668be(0x275)]('No\x20personalizations\x20configured');else for(const _0x1329a9 of _0xed6842){console[_0x4668be(0x275)](a32_0x46a51c[_0x4668be(0x277)](_0x1329a9[_0x4668be(0x365)])+'\x20'+a32_0x46a51c['dim']('(id:\x20'+_0x1329a9['id']+')'));_0x1329a9[_0x4668be(0x2a2)]&&console[_0x4668be(0x275)]('\x20\x20'+a32_0x46a51c['dim'](_0x1329a9[_0x4668be(0x2a2)]));const _0x509ad9=_0x1329a9['sections']?.[_0x4668be(0x308)]||0x0;console[_0x4668be(0x275)]('\x20\x20'+a32_0x46a51c[_0x4668be(0x2fd)](_0x4668be(0x259))+'\x20'+_0x509ad9);if(_0x1329a9['sections']&&_0x1329a9[_0x4668be(0x157)]['length']>0x0)for(const _0x52faf2 of _0x1329a9['sections']){console[_0x4668be(0x275)](_0x4668be(0x213)+_0x52faf2['name']);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{['name']='ps:pz:show';[a32_0x36fa47(0x2a2)]='Show\x20a\x20specific\x20realtime\x20personalization';async['execute'](_0x382e68){const _0x54bc9e=a32_0x36fa47,{options:_0x239b72,args:_0x3d4dfb,tdx:_0x100ac8}=_0x382e68,_0x166ec9=_0x3d4dfb[0x0];if(!_0x166ec9)return console[_0x54bc9e(0x1fa)](_0x54bc9e(0x22b)),console[_0x54bc9e(0x1fa)](_0x54bc9e(0x2d7)),0x1;const _0x2f48dd=await withSpinner(_0x54bc9e(0x1ca)+_0x166ec9+'\x27...',()=>_0x100ac8[_0x54bc9e(0x26f)][_0x54bc9e(0x209)](_0x166ec9),{'verbose':_0x239b72[_0x54bc9e(0x1c6)]}),_0x5e0f67=_0x2f48dd['data'];console['error'](_0x54bc9e(0x24a)+_0x5e0f67[_0x54bc9e(0x365)]+'\x27');if(_0x239b72['format']===_0x54bc9e(0x212)||_0x239b72[_0x54bc9e(0x2a8)]===_0x54bc9e(0x36b))await handleSDKOutput([_0x5e0f67],_0x239b72);else{console[_0x54bc9e(0x275)](a32_0x46a51c[_0x54bc9e(0x277)](_0x5e0f67['name'])+'\x20'+a32_0x46a51c['dim'](_0x54bc9e(0x219)+_0x5e0f67['id']+')'));_0x5e0f67[_0x54bc9e(0x2a2)]&&console[_0x54bc9e(0x275)]('\x20\x20'+a32_0x46a51c[_0x54bc9e(0x2c8)](_0x5e0f67['description']));_0x5e0f67[_0x54bc9e(0x329)]&&console['log']('\x20\x20'+a32_0x46a51c[_0x54bc9e(0x2fd)]('audienceId:')+'\x20'+_0x5e0f67[_0x54bc9e(0x329)]);console['log']('\x20\x20'+a32_0x46a51c[_0x54bc9e(0x2fd)]('created:')+'\x20'+_0x5e0f67[_0x54bc9e(0x188)]),console[_0x54bc9e(0x275)]('\x20\x20'+a32_0x46a51c[_0x54bc9e(0x2fd)](_0x54bc9e(0x169))+'\x20'+_0x5e0f67[_0x54bc9e(0x2c5)]);const _0x37f6e3=_0x5e0f67[_0x54bc9e(0x157)]?.[_0x54bc9e(0x308)]||0x0;console[_0x54bc9e(0x275)]('\x20\x20'+a32_0x46a51c[_0x54bc9e(0x2fd)](_0x54bc9e(0x259))+'\x20'+_0x37f6e3);if(_0x5e0f67[_0x54bc9e(0x157)]&&_0x5e0f67[_0x54bc9e(0x157)][_0x54bc9e(0x308)]>0x0)for(const _0x32a8e6 of _0x5e0f67[_0x54bc9e(0x157)]){console[_0x54bc9e(0x275)]('\x20\x20\x20\x20'+a32_0x46a51c[_0x54bc9e(0x277)](_0x32a8e6[_0x54bc9e(0x365)])+'\x20'+a32_0x46a51c[_0x54bc9e(0x2c8)](_0x54bc9e(0x219)+_0x32a8e6['id']+')')),_0x32a8e6[_0x54bc9e(0x1f5)]&&(console['log'](_0x54bc9e(0x348)+a32_0x46a51c[_0x54bc9e(0x2fd)](_0x54bc9e(0x193))+'\x20'+_0x32a8e6[_0x54bc9e(0x1f5)]['name']),_0x32a8e6[_0x54bc9e(0x1f5)][_0x54bc9e(0x2ca)]?.['keyEventId']&&console['log'](_0x54bc9e(0x224)+a32_0x46a51c[_0x54bc9e(0x2fd)]('keyEventId:')+'\x20'+_0x32a8e6['entryCriteria'][_0x54bc9e(0x2ca)]['keyEventId'])),_0x32a8e6[_0x54bc9e(0x294)]&&console[_0x54bc9e(0x275)](_0x54bc9e(0x348)+a32_0x46a51c[_0x54bc9e(0x2fd)]('payload:')+'\x20'+JSON[_0x54bc9e(0x295)](_0x32a8e6[_0x54bc9e(0x294)])),_0x32a8e6[_0x54bc9e(0x21e)]&&console[_0x54bc9e(0x275)]('\x20\x20\x20\x20\x20\x20'+a32_0x46a51c[_0x54bc9e(0x2fd)](_0x54bc9e(0x2c0))+_0x54bc9e(0x28e));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{['name']=a32_0x36fa47(0x340);['description']='Delete\x20a\x20realtime\x20personalization';async[a32_0x36fa47(0x20b)](_0xdab2c7){const _0x4c9d9d=a32_0x36fa47,{options:_0x293f44,args:_0x2f15a4,tdx:_0x5c2efe}=_0xdab2c7,_0x29d664=_0x2f15a4[0x0];if(!_0x29d664)return console[_0x4c9d9d(0x1fa)](_0x4c9d9d(0x22b)),console['error'](_0x4c9d9d(0x22a)),0x1;return await withSpinner(_0x4c9d9d(0x246)+_0x29d664+_0x4c9d9d(0x313),()=>_0x5c2efe[_0x4c9d9d(0x26f)][_0x4c9d9d(0x2e6)](_0x29d664),{'verbose':_0x293f44[_0x4c9d9d(0x1c6)]}),console[_0x4c9d9d(0x1fa)](_0x4c9d9d(0x1a4)+_0x29d664+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a32_0x36fa47(0x365)]='ps:pz:create';[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x1e7);async[a32_0x36fa47(0x20b)](_0x5abc70){const _0x5bf359=a32_0x36fa47,{options:_0x3b9f7d,tdx:_0x3a9236}=_0x5abc70,_0x2273a3=_0x3b9f7d;let _0x2e47c0;if(_0x2273a3[_0x5bf359(0x17f)]){_0x2e47c0=await loadJSON(_0x2273a3[_0x5bf359(0x17f)],!![]);if(!_0x2e47c0[_0x5bf359(0x302)]?.['parentFolder'])return console[_0x5bf359(0x1fa)](_0x5bf359(0x320)),console[_0x5bf359(0x1fa)]('Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:'),console[_0x5bf359(0x1fa)](_0x5bf359(0x2e1)),0x1;}else{if(!_0x2273a3[_0x5bf359(0x365)])return console[_0x5bf359(0x1fa)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x5bf359(0x1fa)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console['error'](_0x5bf359(0x17d)),0x1;if(_0x2273a3['description']===undefined)return console[_0x5bf359(0x1fa)](_0x5bf359(0x176)),console['error'](_0x5bf359(0x223)),console[_0x5bf359(0x1fa)](_0x5bf359(0x17d)),0x1;if(_0x2273a3['folderId']===undefined)return console[_0x5bf359(0x1fa)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console[_0x5bf359(0x1fa)](_0x5bf359(0x328)),0x1;let _0x121cc1=_0x2273a3[_0x5bf359(0x329)];if(!_0x121cc1&&_0x3b9f7d[_0x5bf359(0x1cb)]){const _0x17f950=await withSpinner(_0x5bf359(0x171)+_0x3b9f7d[_0x5bf359(0x1cb)]+_0x5bf359(0x313),()=>_0x3a9236[_0x5bf359(0x18d)]['resolveParentId'](_0x3b9f7d['parentSegment']),{'verbose':_0x3b9f7d[_0x5bf359(0x1c6)]});_0x121cc1=_0x17f950[_0x5bf359(0x2f0)];}let _0x3ed440;_0x2273a3[_0x5bf359(0x157)]&&(_0x3ed440=await loadJSON(_0x2273a3[_0x5bf359(0x157)],![]));const _0x22de43=_0x2273a3['folderId']===_0x5bf359(0x31a)?null:{'id':_0x2273a3['folderId'],'type':_0x5bf359(0x1fb)};_0x2e47c0={'attributes':{'name':_0x2273a3[_0x5bf359(0x365)],'description':_0x2273a3['description']||null,..._0x121cc1!==undefined&&{'audienceId':_0x121cc1},..._0x3ed440!==undefined&&{'sections':_0x3ed440}},'relationships':{'parentFolder':{'data':_0x22de43}}};}const _0x2ea263=await withSpinner(_0x5bf359(0x318)+(_0x2e47c0[_0x5bf359(0x301)]?.[_0x5bf359(0x365)]??'')+_0x5bf359(0x313),()=>_0x3a9236[_0x5bf359(0x26f)][_0x5bf359(0x1db)](_0x2e47c0),{'verbose':_0x3b9f7d[_0x5bf359(0x1c6)]}),_0x226cca=_0x2ea263[_0x5bf359(0x2f0)];return console[_0x5bf359(0x1fa)]('✔\x20Created\x20personalization\x20\x27'+_0x226cca[_0x5bf359(0x365)]+'\x27\x20with\x20ID:\x20'+_0x226cca['id']),await handleSDKOutput([_0x226cca],_0x3b9f7d),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a32_0x36fa47(0x365)]=a32_0x36fa47(0x355);[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x202);async[a32_0x36fa47(0x20b)](_0x248c34){const _0x3cfacb=a32_0x36fa47,{options:_0x41f9f0,args:_0x3d9218}=_0x248c34,_0x311d45=_0x41f9f0,_0x549d9d=_0x3d9218[0x0];if(!_0x549d9d)return console[_0x3cfacb(0x1fa)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x3cfacb(0x1fa)](_0x3cfacb(0x1dd)),console[_0x3cfacb(0x1fa)](_0x3cfacb(0x2ce)),0x1;let _0x254ab9;if(_0x311d45[_0x3cfacb(0x17f)])_0x254ab9=await loadJSON(_0x311d45[_0x3cfacb(0x17f)],!![]);else{if(!_0x311d45[_0x3cfacb(0x365)])return console[_0x3cfacb(0x1fa)](_0x3cfacb(0x173)),console[_0x3cfacb(0x1fa)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;if(_0x311d45[_0x3cfacb(0x2a2)]===undefined)return console[_0x3cfacb(0x1fa)](_0x3cfacb(0x176)),console['error'](_0x3cfacb(0x1dd)),0x1;let _0xfa90c;_0x311d45['sections']&&(_0xfa90c=await loadJSON(_0x311d45[_0x3cfacb(0x157)],![])),_0x254ab9={'attributes':{'name':_0x311d45[_0x3cfacb(0x365)],'description':_0x311d45[_0x3cfacb(0x2a2)]||null,..._0xfa90c!==undefined&&{'sections':_0xfa90c}}};}const {tdx:_0x39e3a8}=_0x248c34,_0x3b3ded=await withSpinner('Patching\x20personalization\x20\x27'+_0x549d9d+_0x3cfacb(0x313),()=>_0x39e3a8['personalization'][_0x3cfacb(0x2c9)](_0x549d9d,_0x254ab9),{'verbose':_0x41f9f0[_0x3cfacb(0x1c6)]}),_0x508099=_0x3b3ded['data'];return console['error'](_0x3cfacb(0x20f)+_0x508099['name']+_0x3cfacb(0x1f2)+_0x508099['id']+')'),await handleSDKOutput([_0x508099],_0x41f9f0),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a32_0x36fa47(0x365)]='ps:pz:init';[a32_0x36fa47(0x2a2)]=a32_0x36fa47(0x1e5);async['execute'](_0x41236b){const _0x589b17=a32_0x36fa47,{options:_0x1f3d48,args:_0x4817f3}=_0x41236b,_0x51b9bd=_0x4817f3[0x0]||_0x1f3d48['parentSegment'];if(!_0x51b9bd)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a'+_0x589b17(0x367)),0x1;const _0x51e8e8=resolveYamlFile(_0x51b9bd);if(!existsSync(_0x51e8e8))return showFileNotFoundError(_0x51e8e8,_0x51b9bd),0x1;let _0x3e2171;try{_0x3e2171=readFileSync(_0x51e8e8,_0x589b17(0x225));}catch(_0x25194e){const _0x534b7b=_0x25194e instanceof Error?_0x25194e[_0x589b17(0x1af)]:String(_0x25194e);return console['error'](_0x589b17(0x28f)+_0x534b7b),0x1;}let _0x1ba4c5;try{_0x1ba4c5=parseDef(_0x3e2171);}catch(_0x1d005b){const _0x5b1eec=_0x1d005b instanceof Error?_0x1d005b['message']:String(_0x1d005b);return console[_0x589b17(0x1fa)](a32_0x46a51c[_0x589b17(0x306)](_0x589b17(0x256)+_0x5b1eec)),0x1;}if(_0x1ba4c5[_0x589b17(0x29e)]&&_0x1ba4c5['personalization_services'][_0x589b17(0x308)]>0x0)return console[_0x589b17(0x1fa)](a32_0x46a51c['yellow'](_0x589b17(0x2b6)+_0x51e8e8)),console[_0x589b17(0x1fa)](a32_0x46a51c[_0x589b17(0x2c8)](_0x589b17(0x27d)+_0x1ba4c5[_0x589b17(0x29e)][_0x589b17(0x308)]+_0x589b17(0x262))),0x1;!_0x1ba4c5[_0x589b17(0x194)]&&(_0x1ba4c5[_0x589b17(0x194)]={'events':[{'name':_0x589b17(0x211),'source_table':_0x589b17(0x1e2)}],'attributes':[{'name':_0x589b17(0x270),'type':_0x589b17(0x24f)}],'id_stitching':{'primary_key':_0x1ba4c5[_0x589b17(0x2ee)]['table']===_0x589b17(0x192)?_0x589b17(0x2b2):'user_id'}});_0x1ba4c5[_0x589b17(0x29e)]=[{'name':'My\x20Service','description':_0x589b17(0x281),'trigger_event':_0x589b17(0x211),'sections':[{'name':_0x589b17(0x27e),'criteria':_0x589b17(0x21b),'attributes':[_0x589b17(0x270)]}]}];const _0x8d2e92=serializeDef(_0x1ba4c5);return writeFileSync(_0x51e8e8,_0x8d2e92,_0x589b17(0x225)),console[_0x589b17(0x1fa)](a32_0x46a51c['green']('✔')+_0x589b17(0x1f9)+a32_0x46a51c['cyan'](_0x51e8e8)),(!_0x1ba4c5[_0x589b17(0x194)]||_0x3e2171[_0x589b17(0x165)](_0x589b17(0x2ec))===-0x1)&&console[_0x589b17(0x1fa)](a32_0x46a51c[_0x589b17(0x32f)]('✔')+_0x589b17(0x276)),console[_0x589b17(0x1fa)]('\x0a'+a32_0x46a51c[_0x589b17(0x2c8)](_0x589b17(0x227))),console['error'](_0x589b17(0x311)+_0x51e8e8+_0x589b17(0x167)),console[_0x589b17(0x1fa)]('\x20\x202.\x20Run\x20'+a32_0x46a51c['dim'](_0x589b17(0x182)+_0x51b9bd)+_0x589b17(0x2b0)),0x0;}}
1
+ const a32_0x29f8cc=a32_0x3fb2;(function(_0x294183,_0x427826){const _0x3142b5=a32_0x3fb2,_0x39c2cf=_0x294183();while(!![]){try{const _0x4b5e3a=parseInt(_0x3142b5(0x31d))/0x1+parseInt(_0x3142b5(0x393))/0x2+parseInt(_0x3142b5(0x2fd))/0x3+parseInt(_0x3142b5(0x365))/0x4+-parseInt(_0x3142b5(0x34e))/0x5*(parseInt(_0x3142b5(0x216))/0x6)+parseInt(_0x3142b5(0x326))/0x7*(parseInt(_0x3142b5(0x3b7))/0x8)+parseInt(_0x3142b5(0x3bb))/0x9*(-parseInt(_0x3142b5(0x1fa))/0xa);if(_0x4b5e3a===_0x427826)break;else _0x39c2cf['push'](_0x39c2cf['shift']());}catch(_0x204cb5){_0x39c2cf['push'](_0x39c2cf['shift']());}}}(a32_0x6598,0x3eb54));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a32_0x5b8601 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_0x1854cc from'chalk';function a32_0x6598(){const _0x41af18=['parent_segment','addAttributesFile','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','segment:parent:validate','tokens','List\x20RT\x20journeys','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Columns:\x20','information_schema','reduce','\x0a\x20\x20\x20\x20}','coveragePercent','/\x20directories\x20exist.','keys','Creating\x20personalization\x20\x27','\x22\x20}','Table:\x20','/app/dw/parentSegments/','entryCriteria','setJobId','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','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','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','Coverage:','Create\x20parent\x20segment\x20\x27','in\x20','Error:\x20Service\x20ID\x20is\x20required','status:\x20','any','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','stitchingKeys','\x20to\x20push\x20the\x20configuration','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','segment:parent:sql','Options:\x0a','\x20\x20No\x20sample\x20data\x20available','jobId','Listing\x20personalization\x20services\x20for\x20\x27','`\x20to\x20download\x20the\x20configuration\x20first','updated:','apply','text','folderId','personalization_services','No\x20personalizations\x20configured','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','unref','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','\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','\x20parent\x20segment','ps:pz:service:show','file','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','To\x20view\x20sample\x20data:','\x20service(s)\x20configured','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','behavior','Listing\x20fields\x20for\x20\x27','RT\x20Journey\x20ID:\x20','\x0aChanges\x20to\x20apply\x20to\x20\x27','customerGroupFile','Analyzing\x20changes...','No\x20parent\x20segments\x20found','null','joinKey','web','Show\x20a\x20specific\x20realtime\x20personalization','\x20\x20\x20\x20\x20\x20','Personalization:','Delete\x20a\x20realtime\x20personalization','test','Listing\x20parent\x20segments\x20matching\x20\x27','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','stop','Fetching\x20customers\x20schema...','\x0a⚠️\x20\x20Both\x20','Create\x20a\x20realtime\x20personalization\x20entity','some','Creating','Listing\x20RT-enabled\x20parent\x20segments...','segment:parent:show','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','\x20personalization\x20service','displayBehaviorsStats','addBehaviors','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','YAML\x20file:\x20','\x20rows\x20','displayRealtimeInfo','\x20Added\x20personalization\x20template\x20to\x20','column','ps:pz:service:update','\x20RT\x20journey','dirname','310215yUpogY','scheduleType','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','\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','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','/app/workflows/','\x20parent\x20segment\x20\x27','red','Validating\x20RT\x20configuration...','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','\x20kill','\x20+\x20[','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','\x27\x20is\x20already\x20up\x20to\x20date','Database:\x20','eventKind','Pause\x20activations\x20in\x20an\x20RT\x20journey','Behavior:','entryCriteria:','trim','tdx\x20ps\x20preview\x20','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','ps:rt:list','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','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','segment:parent:preview','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','\x20\x201.\x20Edit\x20','\x0a✔\x20Workflow\x20started','getCurrentConfigVersion','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','Master\x20+\x20Attributes','325303guappD','matchedCount','personalizationServices','Pattern:\x20','-1d','segment','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','state','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','37429OZTLvm','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','\x20configured','\x22,\x20\x22type\x22:\x20\x22','\x0aNew\x20parent\x20segment\x20\x27','scheduleOption','✘\x20Failed\x20to\x20rename\x20directory:\x20','allValid','\x20to\x20configure\x20your\x20personalization\x20service','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','Schema\x20saved\x20to\x20','ps:pz:service:list','\x27\x20is\x20up\x20to\x20date','Error\x20reading\x20file:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','parent_id','Error:\x20Token\x20name\x20is\x20required','bold','Error:\x20--behavior\x20requires\x20a\x20name\x0a','audienceId:','Validate:','Enriched:','/\x20and\x20','ps:pz:show','Errors:','\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','Error:\x20Token\x20\x27','session','tdx\x20ps\x20push\x20','listPersonalizations','eventKind:\x20','%)\x20','Output\x20Database:','\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','SELECT\x20*\x20FROM\x20','double','RT\x202.0:','endsWith','✔\x20Updated\x20personalization\x20\x27','launched','448665DFRwvE','workflowAttemptId','match','\x27\x20for\x20service\x20\x27','execute','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','/\x20directory.\x0a','Listing\x20parent\x20segments...','✔\x20Created\x20personalization\x20\x27','Output\x20file:\x20','\x20RT\x20configuration\x20is\x20valid','folder-segment','value','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','realtime','\x20--enriched','toLowerCase','\x0a\x20\x20]\x0a}\x0a','displaySummary','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','\x27\x20with\x20ID:\x20','Join:','1035832cGLTRO','updateParent','workflowId','\x20--behavior\x20\x22','parentSegment','\x20stage','win32','error','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','events','Fetching\x20behavior\x20list...','Updating\x20personalization\x20service\x20\x27','workflowSessionId','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','join','green','map','preview','\x0aNo\x20sample\x20data\x20available','displayPreviewResults','ps:rt:jn:pause','type','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','page_view','\x0aUsage:\x20tdx\x20ps\x20preview\x20','timezone','customersWithEvents','\x20\x20\x22relationships\x22:\x20{\x20\x22parentFolder\x22:\x20{\x20\x22data\x22:\x20{\x20\x22id\x22:\x20\x22<id>\x22,\x20\x22type\x22:\x20\x22folder-segment\x22\x20}\x20}\x20}','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','verbose','List\x20parent\x20segments','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','getOutputDatabaseName','interval','Columns:','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','\x20\x202.\x20Run\x20','column_type','\x20=\x20','Fetching\x20parent\x20segment\x20\x27','stringify','addBehaviorsFile','pullParentYaml','Updated','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','status','602012hTljlP','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Deleting\x20personalization\x20service\x20\x27','Update\x20a\x20realtime\x20personalization\x20entity','ignore','Validating\x20configuration...','resumeJourney','start','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','To\x20cancel:','Default','\x20\x20Note:\x20','database','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','public','\x20--attribute\x20\x22<name>\x22','errors','\x0aError:','displayValidateResults','Parent\x20segment:\x20','Join\x20on:','localeCompare','addAttributes','list','Options\x20(one\x20required):\x0a','schemaValid','totalEvents','elapsedTimeMillis','<database>.<table>','\x0aChanges\x20to\x20\x27','sections','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','open','712emYJUv','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','using\x20the\x20default\x20path:\x20','\x20true','6831342afiSjY','Updating','jsonl','patch','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','\x20rows)','updatedAt','/attempt/','segment:parent:desc','segment:parent:list','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','behaviors','\x27\x20and\x20run\x20workflow?','Source:','ps:pz:patch','getParentSQL','sourceTableError','identifier:\x20','delete','cyan','Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20(requires\x20context)\x0a','\x20--attribute\x20\x22','Error:\x20Parent\x20segment\x20name\x20is\x20required','Name:\x20','👥\x20','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','sampleData','customerGroup','Attributes:','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','\x20field','createdAt','Master:','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','utf-8','stats','ps:pz:service:token:delete','Error:','\x20behaviors','sections:','Fetching\x20SQL\x20for\x20\x27','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','ps:pz:list','Show\x20parent\x20segment\x20details','\x20--interval\x20','user_id','enriched','pushParentYaml','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','columns','allowedIps','Error:\x20Personalization\x20ID\x20is\x20required','population','listJourneys','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','message','Attribute:','sourceTableValid','Found\x20YAML\x20file:\x20','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','site','Fetching\x20personalization\x20service\x20\x27','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','\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','Fetching\x20current\x20configuration\x20for\x20\x27','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','foreignKey','Preview:','td_client_id','Next\x20steps:','Resolving\x20parent\x20segment\x20\x27','log','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','filter','token:','\x5c$&','includeSensitive:','\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','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','formatSchemaJson','Error:\x20--database\x20and\x20--table\x20are\x20required','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','yellow','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','10mISvQz','✔\x20Updated\x20personalization\x20service\x20\x27','No\x20RT-enabled\x20parent\x20segments\x20found','limit','\x27...','sort','ps:pz:create','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','includeSensitive','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','toFixed','label','length','last_page_viewed','repeat','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','getBehaviorNames','Updating\x20parent\x20segment\x20\x27','Aborted.','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','behavior_','\x20personalization','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','enabled','Deleting\x20personalization\x20\x27','Error:\x20--attribute\x20requires\x20a\x20name\x0a','30eUNuiA','Deleting\x20token\x20\x27','string','\x20(paused)','dim','ps:rt:configuration_versions','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','✔\x20Found\x20','push','Show\x20personalization\x20service\x20details','realtime_enabled','/{name}.yml\x0a','behaviorsFile','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','output','allowed\x20IPs:','deleteToken','paused','rowCount','no\x20tokens\x20configured','number','✔\x20No\x20changes\x20-\x20\x27','ps:pz:service:delete','master','Get\x20SQL\x20query\x20for\x20parent\x20segment','Executing\x20parent\x20segment\x20query...','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Delete\x20a\x20personalization\x20service','attributes','validateParentYaml','\x20\x20\x20\x20-\x20','\x20\x20\x20\x20','FINISHED','✔\x20Deleted\x20personalization\x20service\x20\x27','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','data','varchar','yes','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Rows:','\x20No\x20changes\x20-\x20','parentFolder','run','ps:pz:delete','idStitching','Listing\x20RT\x20journeys\x20for\x20\x27','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','customers','Created','attributesFile','all','name','realtime:','\x20service','Get\x20current\x20RT\x20configuration\x20version\x20status','format','platform','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','Patching\x20personalization\x20\x27','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','.yml','No\x20personalization\x20services\x20configured','✔\x20Created\x20personalization\x20service\x20\x27','segment:parent:update','true','keyEventId:','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','displayMasterInfo','segment:parent:pull','Error\x20parsing\x20YAML:\x20','Customers:','attribute','displayAttributesStats','payload','schemaError','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','getParentFull','(id:\x20','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','Creating\x20parent\x20segment\x20\x27','previewParentYaml','\x0a⚠️\x20\x20Migrating:\x20','split','get','segment:parent:create','.yaml','resolveParentId','✔\x20Created\x20parent\x20segment\x20\x27','audienceId','displayPreviewHints','Site:\x20','keyEventId','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','\x20total','collectSchema','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','ps:pz:service:token:create','createParent','Apply\x20changes\x20to\x20\x27','xdg-open','Options:','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','\x20tdx\x20wf\x20attempt\x20','replace','description','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','segment:parent:run','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Master\x20Table','patchPersonalization','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','displayColumns','personalization','keyEventCriteria','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','displaySampleData','column_name','json','Status:','table','\x20Context\x20set:\x20','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','runParent','Fetching\x20sample\x20data...','SQL\x20query:\x0a','identifier','My\x20Service'];a32_0x6598=function(){return _0x41af18;};return a32_0x6598();}import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR='parent_segments',LEGACY_PARENT_SEGMENT_DIR=a32_0x29f8cc(0x29e);function openBrowser(_0x37042d){const _0x375c23=a32_0x29f8cc,_0x1c3b75=process[_0x375c23(0x253)],_0x4f4bbf=_0x1c3b75==='darwin'?_0x375c23(0x3b6):_0x1c3b75===_0x375c23(0x36b)?'start':_0x375c23(0x281);spawn(_0x4f4bbf,[_0x37042d],{'detached':!![],'stdio':_0x375c23(0x398)})[_0x375c23(0x2cd)]();}function migrateLegacyDirectory(){const _0x3ffbc1=a32_0x29f8cc;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x2f90d5=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x2f90d5['isDirectory']())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x3ffbc1(0x36c)](a32_0x1854cc['yellow'](_0x3ffbc1(0x2ea)+LEGACY_PARENT_SEGMENT_DIR+_0x3ffbc1(0x33c)+PARENT_SEGMENT_DIR+_0x3ffbc1(0x2ab))),console[_0x3ffbc1(0x36c)](a32_0x1854cc[_0x3ffbc1(0x21a)](_0x3ffbc1(0x394)+LEGACY_PARENT_SEGMENT_DIR+_0x3ffbc1(0x354))),![];console[_0x3ffbc1(0x36c)](a32_0x1854cc['yellow'](_0x3ffbc1(0x26f)+LEGACY_PARENT_SEGMENT_DIR+'/\x20→\x20'+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x3ffbc1(0x36c)](a32_0x1854cc[_0x3ffbc1(0x374)]('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x692dcc){const _0x1a3748=_0x692dcc instanceof Error?_0x692dcc[_0x3ffbc1(0x1da)]:String(_0x692dcc);return console['error'](a32_0x1854cc[_0x3ffbc1(0x304)](_0x3ffbc1(0x32c)+_0x1a3748+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async['run'](_0x42540c){const _0x420b35=a32_0x29f8cc;return migrateLegacyDirectory(),super[_0x420b35(0x244)](_0x42540c);}}function resolveYamlFile(_0x2d3574){const _0x5f09f4=a32_0x29f8cc;if(_0x2d3574[_0x5f09f4(0x34b)](_0x5f09f4(0x257))||_0x2d3574[_0x5f09f4(0x34b)](_0x5f09f4(0x273)))return _0x2d3574;return a32_0x5b8601[_0x5f09f4(0x373)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x2d3574)+_0x5f09f4(0x257));}function formatProgressMessage(_0x83a29b){const _0x469b4a=a32_0x29f8cc,_0x121e92=_0x83a29b[_0x469b4a(0x350)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x121e92){const [,_0x41b692,_0x4aadd2,_0x16fb53='']=_0x121e92;return a32_0x1854cc[_0x469b4a(0x21a)](_0x41b692+':')+'\x20'+_0x4aadd2+a32_0x1854cc[_0x469b4a(0x21a)](_0x16fb53);}return a32_0x1854cc[_0x469b4a(0x21a)](_0x83a29b);}function showFileNotFoundError(_0x251020,_0x3d816c){const _0x4dd61e=a32_0x29f8cc;console[_0x4dd61e(0x36c)](a32_0x1854cc[_0x4dd61e(0x304)]('Error:\x20File\x20not\x20found:\x20'+_0x251020+'\x0a')),console[_0x4dd61e(0x36c)](a32_0x1854cc[_0x4dd61e(0x3ce)](_0x4dd61e(0x2ff)+_0x3d816c+_0x4dd61e(0x2c5)));}function displayRealtimeValidation(_0xacb2e3){const _0x38c699=a32_0x29f8cc;if(!_0xacb2e3[_0x38c699(0x35d)])return;const _0x227e7a=_0xacb2e3[_0x38c699(0x35d)],_0x4f22b9=_0x227e7a[_0x38c699(0x213)]?a32_0x1854cc[_0x38c699(0x374)]('⚡\x20Enabled'):a32_0x1854cc[_0x38c699(0x1f8)]('⚡\x20Not\x20enabled');console['error']('\x0a'+a32_0x1854cc['dim'](_0x38c699(0x34a))+'\x20'+_0x4f22b9);if(_0x227e7a['events']&&_0x227e7a['events'][_0x38c699(0x207)]>0x0){console[_0x38c699(0x36c)]('\x20\x20'+a32_0x1854cc['dim']('Events:')+'\x20'+_0x227e7a[_0x38c699(0x36e)][_0x38c699(0x207)]+_0x38c699(0x328));for(const _0x493e47 of _0x227e7a[_0x38c699(0x36e)]){const _0x3f248d=_0x493e47[_0x38c699(0x1dc)]===![]?a32_0x1854cc[_0x38c699(0x304)]('✘'):a32_0x1854cc[_0x38c699(0x374)]('✔');console[_0x38c699(0x36c)](_0x38c699(0x237)+_0x3f248d+'\x20'+_0x493e47['name']),_0x493e47[_0x38c699(0x3cb)]&&console[_0x38c699(0x36c)]('\x20\x20\x20\x20\x20\x20'+a32_0x1854cc[_0x38c699(0x304)](_0x493e47[_0x38c699(0x3cb)]));}}if(_0x227e7a[_0x38c699(0x234)]&&_0x227e7a[_0x38c699(0x234)][_0x38c699(0x207)]>0x0){console[_0x38c699(0x36c)]('\x20\x20'+a32_0x1854cc[_0x38c699(0x21a)](_0x38c699(0x3d7))+'\x20'+_0x227e7a['attributes']['length']+'\x20configured');for(const _0x142197 of _0x227e7a[_0x38c699(0x234)]){const _0x36f41=_0x142197['valid']?a32_0x1854cc[_0x38c699(0x374)]('✔'):a32_0x1854cc[_0x38c699(0x304)]('✘');console[_0x38c699(0x36c)](_0x38c699(0x237)+_0x36f41+'\x20'+_0x142197[_0x38c699(0x24e)]+'\x20'+a32_0x1854cc[_0x38c699(0x21a)]('('+_0x142197['type']+')'));}}if(_0x227e7a[_0x38c699(0x246)]){const _0x3365aa=_0x227e7a[_0x38c699(0x246)][_0x38c699(0x2bd)]?.[_0x38c699(0x207)]?_0x38c699(0x308)+_0x227e7a[_0x38c699(0x246)]['stitchingKeys']['join'](',\x20')+']':'';console[_0x38c699(0x36c)]('\x20\x20'+a32_0x1854cc['dim']('ID\x20Stitching:')+'\x20'+_0x227e7a[_0x38c699(0x246)]['primaryKey']+_0x3365aa);}if(_0x227e7a[_0x38c699(0x31f)]&&_0x227e7a[_0x38c699(0x31f)][_0x38c699(0x207)]>0x0){console[_0x38c699(0x36c)]('\x20\x20'+a32_0x1854cc[_0x38c699(0x21a)](_0x38c699(0x2e3))+'\x20'+_0x227e7a[_0x38c699(0x31f)]['length']+_0x38c699(0x250)+(_0x227e7a[_0x38c699(0x31f)]['length']!==0x1?'s':''));for(const _0x5db52c of _0x227e7a[_0x38c699(0x31f)]){console[_0x38c699(0x36c)](_0x38c699(0x236)+_0x5db52c[_0x38c699(0x24e)]);}}}function showParentSegmentNotSetError(_0x5e94cf){const _0x20ffaf=a32_0x29f8cc;console[_0x20ffaf(0x36c)](a32_0x1854cc[_0x20ffaf(0x1f8)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a')),console['error'](_0x5e94cf);}export class ParentSegmentListCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x3c4);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x383);async[a32_0x29f8cc(0x352)](_0x527864){const _0x451c71=a32_0x29f8cc,{options:_0x16c649,args:_0x191c24,tdx:_0x3f065e}=_0x527864,_0x593d0a=_0x191c24[0x0];_0x16c649[_0x451c71(0x382)]&&(console[_0x451c71(0x36c)](_0x451c71(0x278)+_0x16c649[_0x451c71(0x1e0)]),_0x593d0a&&console['error'](_0x451c71(0x320)+_0x593d0a));const _0x21ba96=await withSpinner(_0x593d0a?_0x451c71(0x2e6)+_0x593d0a+_0x451c71(0x1fe):_0x451c71(0x355),()=>_0x3f065e[_0x451c71(0x322)]['listParents'](),{'verbose':_0x16c649[_0x451c71(0x382)]});let _0x39b18d=_0x21ba96['data'];if(_0x593d0a){const _0x4565a8=_0x593d0a[_0x451c71(0x285)](/[.+^${}()|[\]\\]/g,_0x451c71(0x1f0))[_0x451c71(0x285)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x16fa29=new RegExp('^'+_0x4565a8+'$','i');_0x39b18d=_0x39b18d[_0x451c71(0x1ee)](_0x54cd17=>_0x16fa29['test'](_0x54cd17['attributes'][_0x451c71(0x24e)]));}_0x39b18d['sort']((_0x41f90e,_0xbe5bf0)=>_0x41f90e[_0x451c71(0x234)][_0x451c71(0x24e)]['localeCompare'](_0xbe5bf0[_0x451c71(0x234)]['name'])),console[_0x451c71(0x36c)](_0x451c71(0x21f)+_0x39b18d[_0x451c71(0x207)]+_0x451c71(0x2d0)+(_0x39b18d[_0x451c71(0x207)]!==0x1?'s':''));const _0x3b9934=_0x3cdadd=>{const _0x1a52b=_0x451c71;return getConsoleNextUrl(_0x16c649['site'],_0x1a52b(0x2b0)+_0x3cdadd);};if(_0x16c649[_0x451c71(0x252)]==='json'||_0x16c649[_0x451c71(0x252)]===_0x451c71(0x3bd)){const _0x8504cf=_0x39b18d[_0x451c71(0x375)](_0x38ff9d=>({..._0x38ff9d,'url':_0x3b9934(_0x38ff9d['id'])}));await handleSDKOutput(_0x8504cf,_0x16c649);}else{if(_0x39b18d[_0x451c71(0x207)]===0x0)_0x593d0a?console[_0x451c71(0x1ec)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x593d0a):console[_0x451c71(0x1ec)](_0x451c71(0x2dd));else for(const _0x5ebb95 of _0x39b18d){const _0x7b034c=_0x5ebb95[_0x451c71(0x234)][_0x451c71(0x1d7)]?a32_0x1854cc['dim']('\x20('+formatRows(_0x5ebb95[_0x451c71(0x234)][_0x451c71(0x1d7)])+')'):'',_0x170f70=hyperlink(_0x5ebb95['attributes'][_0x451c71(0x24e)],_0x3b9934(_0x5ebb95['id']));console[_0x451c71(0x1ec)](_0x451c71(0x3d3)+_0x170f70+_0x7b034c);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{['name']=a32_0x29f8cc(0x272);['description']=a32_0x29f8cc(0x1df);async[a32_0x29f8cc(0x352)](_0x586f33){const _0x190058=a32_0x29f8cc,{options:_0x490ccc,args:_0x2e1b75,tdx:_0x2c3206}=_0x586f33;console['error'](_0x190058(0x1e2)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x236436=_0x490ccc;if(_0x2e1b75['length']===0x0)return console[_0x190058(0x36c)](a32_0x1854cc['red'](_0x190058(0x3d1))),console['error'](_0x190058(0x2a0)),0x1;const _0x344f61=_0x2e1b75[0x0];if(!_0x236436['database']||!_0x236436['table'])return console['error'](_0x190058(0x1f5)),console[_0x190058(0x36c)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x236436[_0x190058(0x382)]&&(console[_0x190058(0x36c)](_0x190058(0x278)+_0x236436[_0x190058(0x1e0)]),console[_0x190058(0x36c)](_0x190058(0x3d2)+_0x344f61),console[_0x190058(0x36c)](_0x190058(0x30b)+_0x236436[_0x190058(0x3a0)]),console[_0x190058(0x36c)](_0x190058(0x2af)+_0x236436[_0x190058(0x295)]));const _0x2ea96e=await loadJSONFromOptions(_0x236436[_0x190058(0x234)],_0x236436[_0x190058(0x24c)]),_0x43b0b2=await loadJSONFromOptions(_0x236436[_0x190058(0x3c6)],_0x236436[_0x190058(0x224)]),_0xaf9878=await loadJSONFromOptions(_0x236436[_0x190058(0x3d6)],_0x236436[_0x190058(0x2db)]),_0x4484fe={'name':_0x344f61,'description':_0x236436['description'],'scheduleType':_0x236436[_0x190058(0x2fe)],'scheduleOption':_0x236436[_0x190058(0x32b)],'timezone':_0x236436[_0x190058(0x37e)],'master':{'parentDatabaseName':_0x236436[_0x190058(0x3a0)],'parentTableName':_0x236436[_0x190058(0x295)]},'attributes':_0x2ea96e,'behaviors':_0x43b0b2,'customerGroup':_0xaf9878},_0x292944=await withSpinner(_0x190058(0x26d)+_0x344f61+'\x27...',()=>_0x2c3206[_0x190058(0x322)][_0x190058(0x27f)](_0x4484fe),{'verbose':_0x490ccc['verbose']}),_0x3ed4d8=_0x292944[_0x190058(0x23b)];return console[_0x190058(0x36c)](_0x190058(0x275)+_0x3ed4d8[_0x190058(0x24e)]+_0x190058(0x363)+_0x3ed4d8['id']),await handleSDKOutput([_0x3ed4d8],_0x490ccc),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a32_0x29f8cc(0x25a);[a32_0x29f8cc(0x286)]='Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async[a32_0x29f8cc(0x352)](_0x35d543){const _0x2bd1f0=a32_0x29f8cc,{options:_0x1c8988,args:_0x22e57b,tdx:_0x285a53}=_0x35d543;console[_0x2bd1f0(0x36c)](_0x2bd1f0(0x31b)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x2bd1f0(0x2cc));const _0x14d86f=_0x1c8988;if(_0x22e57b[_0x2bd1f0(0x207)]===0x0)return console[_0x2bd1f0(0x36c)](a32_0x1854cc[_0x2bd1f0(0x304)](_0x2bd1f0(0x3d1))),console[_0x2bd1f0(0x36c)](_0x2bd1f0(0x39c)),0x1;const _0x35f06c=_0x22e57b[0x0];_0x14d86f[_0x2bd1f0(0x382)]&&(console['error'](_0x2bd1f0(0x278)+_0x14d86f[_0x2bd1f0(0x1e0)]),console[_0x2bd1f0(0x36c)](_0x2bd1f0(0x3a9)+_0x35f06c));const _0x12c1cf=await withSpinner(_0x2bd1f0(0x1e5)+_0x35f06c+_0x2bd1f0(0x1fe),()=>_0x285a53['segment'][_0x2bd1f0(0x268)](_0x35f06c),{'verbose':_0x14d86f[_0x2bd1f0(0x382)]}),_0x649357=_0x12c1cf[_0x2bd1f0(0x23b)],_0x325c7d=await loadJSONFromOptions(_0x14d86f[_0x2bd1f0(0x3ac)],_0x14d86f[_0x2bd1f0(0x29f)]),_0x9c9386=await loadJSONFromOptions(_0x14d86f[_0x2bd1f0(0x2f3)],_0x14d86f[_0x2bd1f0(0x38e)]),_0xe24d={'name':_0x649357['name'],'description':_0x14d86f[_0x2bd1f0(0x286)]!==undefined?_0x14d86f['description']:_0x649357[_0x2bd1f0(0x286)],'scheduleType':_0x14d86f['scheduleType']!==undefined?_0x14d86f['scheduleType']:_0x649357[_0x2bd1f0(0x2fe)],'scheduleOption':_0x14d86f[_0x2bd1f0(0x32b)]!==undefined?_0x14d86f[_0x2bd1f0(0x32b)]:_0x649357['scheduleOption'],'timezone':_0x14d86f[_0x2bd1f0(0x37e)]!==undefined?_0x14d86f[_0x2bd1f0(0x37e)]:_0x649357[_0x2bd1f0(0x37e)],'master':_0x649357[_0x2bd1f0(0x22f)],'attributes':_0x325c7d?[..._0x649357[_0x2bd1f0(0x234)]||[],..._0x325c7d]:_0x649357[_0x2bd1f0(0x234)],'behaviors':_0x9c9386?[..._0x649357[_0x2bd1f0(0x3c6)]||[],..._0x9c9386]:_0x649357[_0x2bd1f0(0x3c6)],'customerGroup':_0x649357[_0x2bd1f0(0x3d6)]},_0x449e87=await withSpinner(_0x2bd1f0(0x20c)+_0x35f06c+_0x2bd1f0(0x1fe),()=>_0x285a53[_0x2bd1f0(0x322)][_0x2bd1f0(0x366)](_0x35f06c,_0xe24d),{'verbose':_0x14d86f[_0x2bd1f0(0x382)]}),_0x1f1c9d=_0x449e87[_0x2bd1f0(0x23b)];return console[_0x2bd1f0(0x36c)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x1f1c9d[_0x2bd1f0(0x24e)]+'\x27'),await handleSDKOutput([_0x1f1c9d],_0x14d86f),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']=a32_0x29f8cc(0x260);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x2b3);async['execute'](_0xe8f00f){const _0x5d0be3=a32_0x29f8cc,{options:_0x18af49,args:_0x32ad9a,tdx:_0x47b6b9}=_0xe8f00f,_0x32a5f2=_0x18af49,_0x428448=_0x32ad9a[0x0]||_0x18af49[_0x5d0be3(0x369)];if(!_0x428448)return showParentSegmentNotSetError(_0x5d0be3(0x27a)+_0x5d0be3(0x3a2)),0x1;if(_0x32a5f2['use']&&_0x32a5f2['output'])return console[_0x5d0be3(0x36c)](a32_0x1854cc[_0x5d0be3(0x304)]('Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a')),console[_0x5d0be3(0x36c)](a32_0x1854cc[_0x5d0be3(0x21a)](_0x5d0be3(0x3b5))),console[_0x5d0be3(0x36c)](a32_0x1854cc[_0x5d0be3(0x21a)](_0x5d0be3(0x3b9)+PARENT_SEGMENT_DIR+_0x5d0be3(0x223))),console[_0x5d0be3(0x36c)](a32_0x1854cc[_0x5d0be3(0x3ce)]('Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u')),0x1;const _0x5e3436=_0x32a5f2[_0x5d0be3(0x226)]||a32_0x5b8601[_0x5d0be3(0x373)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x428448)+_0x5d0be3(0x257));_0x32a5f2[_0x5d0be3(0x382)]&&(console[_0x5d0be3(0x36c)]('Site:\x20'+_0x32a5f2[_0x5d0be3(0x1e0)]),console[_0x5d0be3(0x36c)](_0x5d0be3(0x3a9)+_0x428448),console[_0x5d0be3(0x36c)](_0x5d0be3(0x357)+_0x5e3436));const _0x135d49=await withSpinner(_0x5d0be3(0x38c)+_0x428448+_0x5d0be3(0x1fe),()=>_0x47b6b9[_0x5d0be3(0x322)][_0x5d0be3(0x38f)](_0x428448),{'verbose':_0x32a5f2[_0x5d0be3(0x382)]}),_0x54b2c3=_0x135d49[_0x5d0be3(0x23b)];if(existsSync(_0x5e3436)){const _0x110444=readFileSync(_0x5e3436,_0x5d0be3(0x3dd)),_0x8c3543=generateDiff(_0x110444,_0x54b2c3);if(!hasChanges(_0x8c3543))console[_0x5d0be3(0x36c)](a32_0x1854cc[_0x5d0be3(0x374)]('✔')+_0x5d0be3(0x242)+a32_0x1854cc['cyan'](_0x5e3436)+'\x20is\x20already\x20up\x20to\x20date');else{console['error'](_0x5d0be3(0x3b3)+_0x5e3436+'\x27:'),console[_0x5d0be3(0x36c)]('─'['repeat'](0x3c)),console[_0x5d0be3(0x36c)](formatDiffWithColors(_0x8c3543)),console[_0x5d0be3(0x36c)]('─'['repeat'](0x3c));if(!_0x32a5f2['yes']){if(!isInteractive())return console[_0x5d0be3(0x36c)](a32_0x1854cc[_0x5d0be3(0x304)]('\x0aError:'),_0x5d0be3(0x2d6)),console[_0x5d0be3(0x36c)](a32_0x1854cc[_0x5d0be3(0x21a)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x821844=await confirmKey('Overwrite\x20\x27'+_0x5e3436+'\x27?');if(!_0x821844)return console[_0x5d0be3(0x36c)](a32_0x1854cc['yellow'](_0x5d0be3(0x20d))),0x1;}writeFileSync(_0x5e3436,_0x54b2c3,_0x5d0be3(0x3dd)),console[_0x5d0be3(0x36c)](a32_0x1854cc[_0x5d0be3(0x374)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a32_0x1854cc['cyan'](_0x5e3436));}}else{const _0x5c32be=a32_0x5b8601[_0x5d0be3(0x2fc)](_0x5e3436);!existsSync(_0x5c32be)&&mkdirSync(_0x5c32be,{'recursive':!![]}),writeFileSync(_0x5e3436,_0x54b2c3,_0x5d0be3(0x3dd)),console[_0x5d0be3(0x36c)](a32_0x1854cc[_0x5d0be3(0x374)]('✔')+_0x5d0be3(0x28c)+a32_0x1854cc[_0x5d0be3(0x3ce)](_0x5e3436));}return saveSessionContext({'parent_segment':_0x428448},_0x32a5f2[_0x5d0be3(0x341)]),console['error'](a32_0x1854cc['green']('✔')+_0x5d0be3(0x296)+a32_0x1854cc['dim'](_0x5d0be3(0x29e))+'\x20=\x20'+a32_0x1854cc[_0x5d0be3(0x3ce)](_0x428448)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a32_0x29f8cc(0x24e)]='segment:parent:push';[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x2ce);async[a32_0x29f8cc(0x352)](_0x6950d9){const _0x3fb36e=a32_0x29f8cc,{options:_0x541d6d,args:_0x520afa,tdx:_0x38c074}=_0x6950d9,_0x4fe681=_0x541d6d,_0x45046b=_0x520afa[0x0]||_0x541d6d['parentSegment'];if(!_0x45046b)return showParentSegmentNotSetError(_0x3fb36e(0x26b)+_0x3fb36e(0x2f4)),0x1;const _0x1235f3=resolveYamlFile(_0x45046b);if(!existsSync(_0x1235f3))return showFileNotFoundError(_0x1235f3,_0x45046b),0x1;_0x4fe681[_0x3fb36e(0x382)]&&(console[_0x3fb36e(0x36c)]('Site:\x20'+_0x4fe681[_0x3fb36e(0x1e0)]),console[_0x3fb36e(0x36c)](_0x3fb36e(0x2f5)+_0x1235f3));let _0x293836;try{_0x293836=readFileSync(_0x1235f3,_0x3fb36e(0x3dd));}catch(_0x2cfe28){const _0x4c8493=_0x2cfe28 instanceof Error?_0x2cfe28[_0x3fb36e(0x1da)]:String(_0x2cfe28);return console[_0x3fb36e(0x36c)](_0x3fb36e(0x333)+_0x4c8493),0x1;}const _0x44c10c=await withSpinner(_0x3fb36e(0x2dc),()=>_0x38c074['segment'][_0x3fb36e(0x1d2)](_0x293836),{'verbose':_0x4fe681[_0x3fb36e(0x382)]}),_0x5c03ce=_0x44c10c['data'],{isNew:_0x3cc926,name:_0x7d0463,hasChanges:_0xfdb6b,diffFormatted:_0x2b3ebc}=_0x5c03ce;if(!_0xfdb6b)return console['error']('✔\x20No\x20changes\x20-\x20\x27'+_0x7d0463+_0x3fb36e(0x30a)),0x0;_0x3cc926?console[_0x3fb36e(0x36c)](_0x3fb36e(0x32a)+_0x7d0463+'\x27:'):console[_0x3fb36e(0x36c)](_0x3fb36e(0x2da)+_0x7d0463+'\x27:');console['error']('─'[_0x3fb36e(0x209)](0x3c)),console[_0x3fb36e(0x36c)](_0x2b3ebc),console[_0x3fb36e(0x36c)]('─'['repeat'](0x3c));const _0x15f281=_0x3cc926?_0x3fb36e(0x2b7)+_0x7d0463+'\x27?':'Apply\x20changes\x20to\x20\x27'+_0x7d0463+'\x27?';if(!_0x4fe681['yes']){if(!isInteractive())return console['error'](a32_0x1854cc[_0x3fb36e(0x304)](_0x3fb36e(0x3a7)),_0x3fb36e(0x2d6)),console[_0x3fb36e(0x36c)](a32_0x1854cc[_0x3fb36e(0x21a)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x15ae16=await confirmKey(_0x15f281);if(!_0x15ae16)return console[_0x3fb36e(0x36c)](a32_0x1854cc[_0x3fb36e(0x1f8)]('Aborted.')),0x1;}const _0x139645=_0x3cc926?'Creating':_0x3fb36e(0x3bc),_0x417205=await withSpinner(_0x139645+_0x3fb36e(0x303)+_0x7d0463+'\x27...',()=>_0x5c03ce[_0x3fb36e(0x2c7)](),{'verbose':_0x4fe681[_0x3fb36e(0x382)]}),_0x2e33c7=_0x417205[_0x3fb36e(0x23b)],_0x2befe1=getConsoleNextUrl(_0x4fe681['site'],_0x3fb36e(0x2b0)+_0x2e33c7['id']),_0x127a3c=_0x3cc926?_0x3fb36e(0x24b):_0x3fb36e(0x390);return console[_0x3fb36e(0x36c)]('✔\x20'+_0x127a3c+_0x3fb36e(0x303)+_0x2e33c7[_0x3fb36e(0x24e)]+'\x27'),console[_0x3fb36e(0x36c)]('\x20\x20'+_0x2befe1),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x2a1);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x306);async[a32_0x29f8cc(0x352)](_0x3f807c){const _0x261083=a32_0x29f8cc,{options:_0x41983d,args:_0xbefa60,tdx:_0x3f5445}=_0x3f807c,_0x64b09f=_0x41983d,_0x2a202d=_0xbefa60[0x0]||_0x41983d[_0x261083(0x369)];if(!_0x2a202d)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a'+_0x261083(0x2c1)+'\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a'+_0x261083(0x3d4)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;const _0x4669b8=resolveYamlFile(_0x2a202d);if(!existsSync(_0x4669b8))return showFileNotFoundError(_0x4669b8,_0x2a202d),0x1;_0x64b09f[_0x261083(0x382)]&&(console[_0x261083(0x36c)]('Site:\x20'+_0x64b09f['site']),console[_0x261083(0x36c)](_0x261083(0x2f5)+_0x4669b8));let _0x3ec6e3;try{_0x3ec6e3=readFileSync(_0x4669b8,_0x261083(0x3dd));}catch(_0x4dbc95){const _0x47cfaf=_0x4dbc95 instanceof Error?_0x4dbc95['message']:String(_0x4dbc95);return console[_0x261083(0x36c)](_0x261083(0x333)+_0x47cfaf),0x1;}const _0x150a5f=createCommandSpinner(a32_0x1854cc[_0x261083(0x21a)](_0x261083(0x399)),{'verbose':_0x64b09f[_0x261083(0x382)]});_0x150a5f[_0x261083(0x39b)]();const _0x4b7728={'onProgress':_0x493306=>{const _0x6a1c65=_0x261083;_0x150a5f[_0x6a1c65(0x2c8)]=formatProgressMessage(_0x493306);}};if(_0x64b09f['master'])_0x4b7728['master']=!![];if(_0x64b09f[_0x261083(0x1d1)])_0x4b7728['enriched']=!![];_0x64b09f['attribute']&&(_0x4b7728[_0x261083(0x263)]=_0x64b09f[_0x261083(0x263)]);_0x64b09f[_0x261083(0x2d7)]&&(_0x4b7728[_0x261083(0x2d7)]=_0x64b09f['behavior']);if(_0x64b09f[_0x261083(0x386)])_0x4b7728['interval']=_0x64b09f[_0x261083(0x386)];let _0x2c3f51;try{_0x2c3f51=await _0x3f5445['segment']['validateParentYaml'](_0x3ec6e3,_0x4b7728),_0x150a5f[_0x261083(0x2e8)]();}catch(_0x236303){_0x150a5f[_0x261083(0x2e8)]();throw _0x236303;}const _0x57dfb9=_0x64b09f[_0x261083(0x386)]||_0x261083(0x321);return this['displayValidateResults'](_0x2c3f51,_0x4b7728,_0x4669b8,_0x57dfb9),_0x2c3f51[_0x261083(0x32d)]?0x0:0x1;}[a32_0x29f8cc(0x3a8)](_0x258940,_0x5693e6,_0x356cf1,_0x532f8c){const _0x5bbb8a=a32_0x29f8cc;console[_0x5bbb8a(0x36c)]('\x0a'+a32_0x1854cc[_0x5bbb8a(0x337)](_0x5bbb8a(0x33a))+'\x20'+_0x258940[_0x5bbb8a(0x24e)]),console[_0x5bbb8a(0x36c)]('═'[_0x5bbb8a(0x209)](0x3c)),this[_0x5bbb8a(0x25f)](_0x258940);if(typeof _0x5693e6[_0x5bbb8a(0x263)]===_0x5bbb8a(0x218)){this[_0x5bbb8a(0x264)](_0x258940),this[_0x5bbb8a(0x361)](_0x258940),this['displayPreviewHints'](_0x356cf1,_0x532f8c,_0x5bbb8a(0x263),_0x5693e6[_0x5bbb8a(0x263)]);return;}if(_0x5693e6[_0x5bbb8a(0x263)]===!![]){this[_0x5bbb8a(0x264)](_0x258940),this[_0x5bbb8a(0x361)](_0x258940),this['displayPreviewHints'](_0x356cf1,_0x532f8c,'attributes');return;}if(typeof _0x5693e6[_0x5bbb8a(0x2d7)]===_0x5bbb8a(0x218)){this['displayBehaviorsStats'](_0x258940,_0x532f8c),this[_0x5bbb8a(0x361)](_0x258940),this[_0x5bbb8a(0x277)](_0x356cf1,_0x532f8c,'behavior',_0x5693e6[_0x5bbb8a(0x2d7)]);return;}if(_0x5693e6['behavior']===!![]){this[_0x5bbb8a(0x2f2)](_0x258940,_0x532f8c),this[_0x5bbb8a(0x361)](_0x258940),this['displayPreviewHints'](_0x356cf1,_0x532f8c,_0x5bbb8a(0x3c6));return;}this[_0x5bbb8a(0x264)](_0x258940),this[_0x5bbb8a(0x2f2)](_0x258940,_0x532f8c),this[_0x5bbb8a(0x2f7)](_0x258940),this[_0x5bbb8a(0x361)](_0x258940),this[_0x5bbb8a(0x277)](_0x356cf1,_0x532f8c,_0x5bbb8a(0x24d));}[a32_0x29f8cc(0x2f7)](_0x1048be){displayRealtimeValidation(_0x1048be);}[a32_0x29f8cc(0x277)](_0x32ae14,_0x3aabaa,_0x58a37a,_0x12cd5f){const _0x4a53a2=a32_0x29f8cc;console[_0x4a53a2(0x36c)]('\x0a'+a32_0x1854cc[_0x4a53a2(0x21a)](_0x4a53a2(0x2d4)));const _0x219bc7=_0x3aabaa!==_0x4a53a2(0x321)?_0x4a53a2(0x1cf)+_0x3aabaa:'';if(_0x58a37a==='attribute'&&_0x12cd5f)console[_0x4a53a2(0x36c)]('\x20\x20'+a32_0x1854cc[_0x4a53a2(0x21a)]('tdx\x20ps\x20preview\x20'+_0x32ae14+_0x4a53a2(0x3d0)+_0x12cd5f+'\x22'+_0x219bc7));else{if(_0x58a37a===_0x4a53a2(0x2d7)&&_0x12cd5f)console[_0x4a53a2(0x36c)]('\x20\x20'+a32_0x1854cc[_0x4a53a2(0x21a)](_0x4a53a2(0x311)+_0x32ae14+_0x4a53a2(0x368)+_0x12cd5f+'\x22'+_0x219bc7));else(_0x58a37a==='attributes'||_0x58a37a==='all')&&console['error']('\x20\x20'+a32_0x1854cc['dim'](_0x4a53a2(0x311)+_0x32ae14+_0x4a53a2(0x3a5)+_0x219bc7));}(_0x58a37a===_0x4a53a2(0x3c6)||_0x58a37a===_0x4a53a2(0x24d))&&console[_0x4a53a2(0x36c)]('\x20\x20'+a32_0x1854cc[_0x4a53a2(0x21a)](_0x4a53a2(0x311)+_0x32ae14+'\x20--behavior\x20\x22<name>\x22'+_0x219bc7)),_0x58a37a===_0x4a53a2(0x24d)&&console['error']('\x20\x20'+a32_0x1854cc[_0x4a53a2(0x21a)](_0x4a53a2(0x311)+_0x32ae14+_0x4a53a2(0x35e)+_0x219bc7));}[a32_0x29f8cc(0x25f)](_0x550362){const _0x14150c=a32_0x29f8cc,{master:_0x5c7fbe}=_0x550362,_0xde4dd=_0x5c7fbe[_0x14150c(0x3af)]?a32_0x1854cc['green']('✔'):a32_0x1854cc[_0x14150c(0x304)]('✘');console[_0x14150c(0x36c)]('\x0a'+a32_0x1854cc['dim'](_0x14150c(0x28a))),console[_0x14150c(0x36c)](_0xde4dd+'\x20'+a32_0x1854cc[_0x14150c(0x337)](_0x5c7fbe[_0x14150c(0x3a0)]+'.'+_0x5c7fbe['table'])),_0x5c7fbe[_0x14150c(0x3af)]?_0x5c7fbe['rowCount']!==undefined&&console[_0x14150c(0x36c)]('\x20\x20'+a32_0x1854cc[_0x14150c(0x21a)](_0x14150c(0x241))+'\x20'+a32_0x1854cc[_0x14150c(0x3ce)](formatRows(_0x5c7fbe[_0x14150c(0x22a)]))):console[_0x14150c(0x36c)]('\x20\x20'+a32_0x1854cc[_0x14150c(0x304)](_0x14150c(0x3e0))+'\x20'+_0x5c7fbe[_0x14150c(0x266)]);}[a32_0x29f8cc(0x264)](_0x14c403){const _0x3d0469=a32_0x29f8cc;if(_0x14c403[_0x3d0469(0x234)][_0x3d0469(0x207)]===0x0)return;console['error']('\x0a'+a32_0x1854cc['dim']('Attributes'));for(const _0x2f1acb of _0x14c403[_0x3d0469(0x234)]){const _0xb9c2f6=_0x2f1acb[_0x3d0469(0x3af)]?a32_0x1854cc[_0x3d0469(0x374)]('✔'):a32_0x1854cc[_0x3d0469(0x304)]('✘');let _0x3ea2b4='';if(_0x2f1acb[_0x3d0469(0x3af)]&&_0x2f1acb[_0x3d0469(0x31e)]!==undefined&&_0x2f1acb[_0x3d0469(0x2aa)]!==undefined){const _0x346af9=_0x2f1acb['coveragePercent'][_0x3d0469(0x205)](0x1),_0x138014=_0x2f1acb[_0x3d0469(0x2aa)]>=0x50?a32_0x1854cc['green']:_0x2f1acb[_0x3d0469(0x2aa)]>=0x32?a32_0x1854cc[_0x3d0469(0x1f8)]:a32_0x1854cc['red'];_0x3ea2b4='\x20'+a32_0x1854cc[_0x3d0469(0x21a)](_0x3d0469(0x2b6))+'\x20'+_0x138014(_0x346af9+'%')+'\x20('+formatRows(_0x2f1acb[_0x3d0469(0x31e)])+_0x3d0469(0x3c0);}console['error'](_0xb9c2f6+'\x20'+a32_0x1854cc[_0x3d0469(0x337)](_0x2f1acb[_0x3d0469(0x24e)])+_0x3ea2b4),console[_0x3d0469(0x36c)]('\x20\x20'+a32_0x1854cc[_0x3d0469(0x21a)](_0x3d0469(0x3c8))+'\x20'+a32_0x1854cc[_0x3d0469(0x337)](_0x2f1acb[_0x3d0469(0x3a0)]+'.'+_0x2f1acb[_0x3d0469(0x295)]));const _0x4e5a30=_0x2f1acb[_0x3d0469(0x2df)]===_0x2f1acb['foreignKey']?a32_0x1854cc[_0x3d0469(0x21a)](_0x3d0469(0x3aa))+'\x20'+_0x2f1acb[_0x3d0469(0x2df)]:a32_0x1854cc[_0x3d0469(0x21a)](_0x3d0469(0x364))+'\x20'+_0x2f1acb[_0x3d0469(0x2df)]+'\x20=\x20'+_0x2f1acb[_0x3d0469(0x1e7)];console[_0x3d0469(0x36c)]('\x20\x20'+_0x4e5a30),console[_0x3d0469(0x36c)]('\x20\x20'+a32_0x1854cc[_0x3d0469(0x21a)](_0x3d0469(0x387))),this[_0x3d0469(0x28d)](_0x2f1acb[_0x3d0469(0x1d4)]),!_0x2f1acb[_0x3d0469(0x3af)]&&console['error']('\x20\x20'+a32_0x1854cc[_0x3d0469(0x304)]('Error:')+'\x20'+_0x2f1acb[_0x3d0469(0x266)]);}}[a32_0x29f8cc(0x2f2)](_0x475844,_0x14359e){const _0x2957eb=a32_0x29f8cc;if(_0x475844['behaviors'][_0x2957eb(0x207)]===0x0)return;console[_0x2957eb(0x36c)]('\x0a'+a32_0x1854cc[_0x2957eb(0x21a)]('Behaviors')+'\x20'+a32_0x1854cc[_0x2957eb(0x21a)]('('+_0x14359e+')'));for(const _0x52d984 of _0x475844[_0x2957eb(0x3c6)]){const _0x5a0710=_0x52d984['schemaValid']?a32_0x1854cc['green']('✔'):a32_0x1854cc['red']('✘');let _0x11711d='';if(_0x52d984['schemaValid']&&_0x52d984['customersWithEvents']!==undefined&&_0x52d984[_0x2957eb(0x3b0)]!==undefined){const _0x7903b8=_0x52d984['customerPercent']?.[_0x2957eb(0x205)](0x1)||'?',_0x1d1da5=(_0x52d984['customerPercent']??0x0)>=0x32?a32_0x1854cc['green']:(_0x52d984['customerPercent']??0x0)>=0x14?a32_0x1854cc['yellow']:a32_0x1854cc[_0x2957eb(0x304)];_0x11711d='\x20'+a32_0x1854cc[_0x2957eb(0x21a)](_0x2957eb(0x262))+'\x20'+_0x1d1da5(formatRows(_0x52d984[_0x2957eb(0x37f)]))+'\x20('+_0x7903b8+_0x2957eb(0x345)+a32_0x1854cc[_0x2957eb(0x21a)]('Events:')+'\x20'+a32_0x1854cc[_0x2957eb(0x3ce)](formatRows(_0x52d984[_0x2957eb(0x3b0)]));}console[_0x2957eb(0x36c)](_0x5a0710+'\x20'+a32_0x1854cc[_0x2957eb(0x337)](_0x52d984[_0x2957eb(0x24e)])+_0x11711d),console[_0x2957eb(0x36c)]('\x20\x20'+a32_0x1854cc[_0x2957eb(0x21a)](_0x2957eb(0x3c8))+'\x20'+a32_0x1854cc['bold'](_0x52d984['database']+'.'+_0x52d984['table']));const _0x490a50=_0x52d984['joinKey']===_0x52d984[_0x2957eb(0x1e7)]?a32_0x1854cc['dim'](_0x2957eb(0x3aa))+'\x20'+_0x52d984[_0x2957eb(0x2df)]:a32_0x1854cc[_0x2957eb(0x21a)](_0x2957eb(0x364))+'\x20'+_0x52d984[_0x2957eb(0x2df)]+_0x2957eb(0x38b)+_0x52d984[_0x2957eb(0x1e7)];console[_0x2957eb(0x36c)]('\x20\x20'+_0x490a50),console['error']('\x20\x20'+a32_0x1854cc[_0x2957eb(0x21a)](_0x2957eb(0x387))),this[_0x2957eb(0x28d)](_0x52d984['columns']),!_0x52d984[_0x2957eb(0x3af)]&&console['error']('\x20\x20'+a32_0x1854cc['red']('Error:')+'\x20'+_0x52d984['schemaError']);}}[a32_0x29f8cc(0x28d)](_0x51cae3){const _0x1b5e72=a32_0x29f8cc;for(const _0x2eaba1 of _0x51cae3){_0x2eaba1[_0x1b5e72(0x206)]===_0x2eaba1[_0x1b5e72(0x2f9)]||_0x2eaba1['column']==='*'?console[_0x1b5e72(0x36c)](_0x1b5e72(0x236)+_0x2eaba1[_0x1b5e72(0x206)]):console['error']('\x20\x20\x20\x20-\x20'+_0x2eaba1['label']+'\x20'+a32_0x1854cc[_0x1b5e72(0x21a)]('('+_0x2eaba1[_0x1b5e72(0x2f9)]+')'));}}[a32_0x29f8cc(0x361)](_0x3f0aaa){const _0x50f99f=a32_0x29f8cc;console[_0x50f99f(0x36c)]('─'[_0x50f99f(0x209)](0x3c));if(_0x3f0aaa['errors']['length']>0x0){console['error']('\x0a'+a32_0x1854cc[_0x50f99f(0x304)]('Errors:'));for(const _0xa30bbd of _0x3f0aaa[_0x50f99f(0x3a6)]){console[_0x50f99f(0x36c)]('\x20\x20'+a32_0x1854cc['red']('•')+'\x20'+_0xa30bbd);}}_0x3f0aaa[_0x50f99f(0x32d)]&&console[_0x50f99f(0x36c)]('\x0a'+a32_0x1854cc[_0x50f99f(0x374)]('✔')+'\x20Configuration\x20is\x20valid');}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x316);[a32_0x29f8cc(0x286)]='Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration';async[a32_0x29f8cc(0x352)](_0x21712c){const _0x1adb40=a32_0x29f8cc,{options:_0x5929f1,args:_0xd37356,tdx:_0xf5ee2a}=_0x21712c,_0x38bccf=_0x5929f1,_0x1fa14b=_0xd37356[0x0]||_0x5929f1[_0x1adb40(0x369)];if(!_0x1fa14b)return showParentSegmentNotSetError(_0x1adb40(0x3e4)+_0x1adb40(0x3b8)+_0x1adb40(0x3ae)+_0x1adb40(0x381)+_0x1adb40(0x1d9)+'\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a'+_0x1adb40(0x3dc)+_0x1adb40(0x240)),0x1;if(!_0x38bccf[_0x1adb40(0x22f)]&&!_0x38bccf['attribute']&&!_0x38bccf[_0x1adb40(0x2d7)]&&!_0x38bccf[_0x1adb40(0x1d1)])return console[_0x1adb40(0x36c)](a32_0x1854cc[_0x1adb40(0x304)](_0x1adb40(0x20a))),console['error']('Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a'),console['error'](_0x1adb40(0x282)),console['error'](_0x1adb40(0x2bc)),console[_0x1adb40(0x36c)](_0x1adb40(0x26a)),console[_0x1adb40(0x36c)](_0x1adb40(0x249)),console['error'](_0x1adb40(0x1ed)),0x1;const _0x209fee=resolveYamlFile(_0x1fa14b);if(!existsSync(_0x209fee))return showFileNotFoundError(_0x209fee,_0x1fa14b),0x1;_0x38bccf['verbose']&&(console[_0x1adb40(0x36c)]('Site:\x20'+_0x38bccf[_0x1adb40(0x1e0)]),console['error'](_0x1adb40(0x2f5)+_0x209fee));let _0x1d8d7c;try{_0x1d8d7c=readFileSync(_0x209fee,'utf-8');}catch(_0x5341f5){const _0x21f345=_0x5341f5 instanceof Error?_0x5341f5[_0x1adb40(0x1da)]:String(_0x5341f5);return console[_0x1adb40(0x36c)]('Error\x20reading\x20file:\x20'+_0x21f345),0x1;}let _0xd9dd45;try{_0xd9dd45=parseDef(_0x1d8d7c);}catch(_0x13b9b5){const _0xadc129=_0x13b9b5 instanceof Error?_0x13b9b5[_0x1adb40(0x1da)]:String(_0x13b9b5);return console[_0x1adb40(0x36c)](a32_0x1854cc['red']('Error\x20parsing\x20YAML:\x20'+_0xadc129)),0x1;}if(_0x38bccf[_0x1adb40(0x263)]===!![]||_0x38bccf['attribute']===''){const _0x42622d=_0xd9dd45[_0x1adb40(0x234)]?.[_0x1adb40(0x375)](_0x3d3023=>_0x3d3023[_0x1adb40(0x24e)])||[];if(_0x42622d[_0x1adb40(0x207)]===0x0)console[_0x1adb40(0x36c)](a32_0x1854cc[_0x1adb40(0x304)](_0x1adb40(0x232)));else{console[_0x1adb40(0x36c)](a32_0x1854cc[_0x1adb40(0x304)](_0x1adb40(0x215))),console[_0x1adb40(0x36c)]('Available\x20attributes:');for(const _0xa07599 of _0x42622d){console['error']('\x20\x20'+a32_0x1854cc['cyan'](_0xa07599));}console[_0x1adb40(0x36c)](_0x1adb40(0x37d)+_0x1fa14b+'\x20--attribute\x20\x22'+_0x42622d[0x0]+'\x22');}return 0x1;}if(_0x38bccf[_0x1adb40(0x2d7)]===!![]||_0x38bccf[_0x1adb40(0x2d7)]===''){const _0x5e0e92=_0xd9dd45[_0x1adb40(0x3c6)]?.[_0x1adb40(0x375)](_0x1c78c8=>_0x1c78c8[_0x1adb40(0x24e)])||[];if(_0x5e0e92['length']===0x0)console[_0x1adb40(0x36c)](a32_0x1854cc[_0x1adb40(0x304)](_0x1adb40(0x3d8)));else{console[_0x1adb40(0x36c)](a32_0x1854cc[_0x1adb40(0x304)](_0x1adb40(0x338))),console[_0x1adb40(0x36c)]('Available\x20behaviors:');for(const _0x5b0fd2 of _0x5e0e92){console[_0x1adb40(0x36c)]('\x20\x20'+a32_0x1854cc['cyan'](_0x5b0fd2));}console[_0x1adb40(0x36c)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x1fa14b+_0x1adb40(0x368)+_0x5e0e92[0x0]+'\x22');}return 0x1;}const _0x45399c=createCommandSpinner(a32_0x1854cc['dim'](_0x1adb40(0x29a)),{'verbose':_0x38bccf[_0x1adb40(0x382)]});_0x45399c[_0x1adb40(0x39b)]();const _0x17e893={'onProgress':_0x5c3db0=>{const _0xf2ce96=_0x1adb40;_0x45399c[_0xf2ce96(0x2c8)]=formatProgressMessage(_0x5c3db0);}};if(_0x38bccf[_0x1adb40(0x22f)])_0x17e893[_0x1adb40(0x22f)]=!![];if(_0x38bccf[_0x1adb40(0x263)]&&typeof _0x38bccf[_0x1adb40(0x263)]===_0x1adb40(0x218))_0x17e893[_0x1adb40(0x263)]=_0x38bccf[_0x1adb40(0x263)];if(_0x38bccf[_0x1adb40(0x2d7)]&&typeof _0x38bccf[_0x1adb40(0x2d7)]===_0x1adb40(0x218))_0x17e893[_0x1adb40(0x2d7)]=_0x38bccf[_0x1adb40(0x2d7)];if(_0x38bccf['enriched'])_0x17e893[_0x1adb40(0x1d1)]=!![];if(_0x38bccf[_0x1adb40(0x386)])_0x17e893[_0x1adb40(0x386)]=_0x38bccf[_0x1adb40(0x386)];let _0x38ed88;try{_0x38ed88=await _0xf5ee2a[_0x1adb40(0x322)][_0x1adb40(0x26e)](_0x1d8d7c,_0x17e893),_0x45399c[_0x1adb40(0x2e8)]();}catch(_0x1f3a03){_0x45399c[_0x1adb40(0x2e8)]();throw _0x1f3a03;}return await this[_0x1adb40(0x378)](_0x38ed88,{'master':_0x38bccf[_0x1adb40(0x22f)],'attribute':typeof _0x38bccf[_0x1adb40(0x263)]===_0x1adb40(0x218)?_0x38bccf[_0x1adb40(0x263)]:undefined,'behavior':typeof _0x38bccf[_0x1adb40(0x2d7)]===_0x1adb40(0x218)?_0x38bccf[_0x1adb40(0x2d7)]:undefined,'enriched':_0x38bccf[_0x1adb40(0x1d1)]}),_0x38ed88[_0x1adb40(0x32d)]?0x0:0x1;}async[a32_0x29f8cc(0x378)](_0x5eeb41,_0x5ad56d){const _0x76f8e3=a32_0x29f8cc;console['error']('\x0a'+a32_0x1854cc['bold'](_0x76f8e3(0x1e8))+'\x20'+_0x5eeb41['name']),console[_0x76f8e3(0x36c)]('═'[_0x76f8e3(0x209)](0x3c));if(_0x5ad56d[_0x76f8e3(0x22f)]&&_0x5eeb41[_0x76f8e3(0x3d5)]){const _0x53391c=a32_0x1854cc['dim'](_0x76f8e3(0x3db))+'\x20'+a32_0x1854cc[_0x76f8e3(0x337)](_0x5eeb41[_0x76f8e3(0x22f)]['database']+'.'+_0x5eeb41[_0x76f8e3(0x22f)][_0x76f8e3(0x295)]);await this['displaySampleData'](_0x53391c,_0x5eeb41[_0x76f8e3(0x3d5)]);}else{if(_0x5ad56d['attribute']&&_0x5eeb41[_0x76f8e3(0x3d5)]){const _0x3d87ba=a32_0x1854cc[_0x76f8e3(0x21a)](_0x76f8e3(0x1db))+'\x20'+a32_0x1854cc[_0x76f8e3(0x337)](_0x5ad56d[_0x76f8e3(0x263)]);await this[_0x76f8e3(0x291)](_0x3d87ba,_0x5eeb41['sampleData']);}else{if(_0x5ad56d['behavior']&&_0x5eeb41[_0x76f8e3(0x3d5)]){const _0x1645b9=a32_0x1854cc[_0x76f8e3(0x21a)](_0x76f8e3(0x30e))+'\x20'+a32_0x1854cc[_0x76f8e3(0x337)](_0x5ad56d[_0x76f8e3(0x2d7)]);await this['displaySampleData'](_0x1645b9,_0x5eeb41[_0x76f8e3(0x3d5)]);}else{if(_0x5ad56d[_0x76f8e3(0x1d1)]&&_0x5eeb41[_0x76f8e3(0x3d5)]){const _0x1e9d2c=a32_0x1854cc[_0x76f8e3(0x21a)](_0x76f8e3(0x33b))+'\x20'+a32_0x1854cc[_0x76f8e3(0x337)](_0x76f8e3(0x31c));await this[_0x76f8e3(0x291)](_0x1e9d2c,_0x5eeb41[_0x76f8e3(0x3d5)]);}else!_0x5eeb41[_0x76f8e3(0x3d5)]&&console[_0x76f8e3(0x36c)](_0x76f8e3(0x377));}}}if(_0x5eeb41[_0x76f8e3(0x3a6)][_0x76f8e3(0x207)]>0x0){console[_0x76f8e3(0x36c)]('─'[_0x76f8e3(0x209)](0x3c)),console['error']('\x0a'+a32_0x1854cc[_0x76f8e3(0x304)](_0x76f8e3(0x33e)));for(const _0x4331fe of _0x5eeb41['errors']){console[_0x76f8e3(0x36c)]('\x20\x20'+a32_0x1854cc['red']('•')+'\x20'+_0x4331fe);}}}async[a32_0x29f8cc(0x291)](_0x44901c,_0x324e23){const _0xe775d8=a32_0x29f8cc;if(_0x324e23['length']===0x0){console['error']('\x0a'+_0x44901c),console[_0xe775d8(0x36c)](_0xe775d8(0x2c2));return;}console[_0xe775d8(0x36c)]('\x0a'+_0x44901c);const _0x22a3a3=Object[_0xe775d8(0x2ac)](_0x324e23[0x0])['map'](_0x5849c0=>({'name':_0x5849c0,'type':typeof _0x324e23[0x0][_0x5849c0]===_0xe775d8(0x22c)?_0xe775d8(0x349):_0xe775d8(0x23c)})),_0x8edf37={'queryId':_0xe775d8(0x376),'columns':_0x22a3a3,'data':_0x324e23,'stats':{'state':_0xe775d8(0x238),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x324e23[_0xe775d8(0x207)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x3ce174=formatAsTable(_0x8edf37,_0x324e23['length'],!![]);await writeOutput(_0x3ce174,undefined,_0xe775d8(0x295));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x288);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x267);async[a32_0x29f8cc(0x352)](_0x5216a7){const _0x4a5031=a32_0x29f8cc,{options:_0x5279be,args:_0x1ce5de,tdx:_0x4180be}=_0x5216a7,_0x506022=_0x5279be,_0x1ca198=_0x1ce5de[0x0]||_0x5279be[_0x4a5031(0x369)];if(!_0x1ca198)return showParentSegmentNotSetError(_0x4a5031(0x35b)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0xc6610d=resolveYamlFile(_0x1ca198);if(existsSync(_0xc6610d)){_0x506022[_0x4a5031(0x382)]&&console[_0x4a5031(0x36c)](_0x4a5031(0x1dd)+_0xc6610d);let _0x5b3c96;try{_0x5b3c96=readFileSync(_0xc6610d,_0x4a5031(0x3dd));}catch(_0x2cd3c2){const _0x566af4=_0x2cd3c2 instanceof Error?_0x2cd3c2[_0x4a5031(0x1da)]:String(_0x2cd3c2);return console['error'](_0x4a5031(0x333)+_0x566af4),0x1;}const _0x406709=await withSpinner(_0x4a5031(0x2dc),()=>_0x4180be[_0x4a5031(0x322)][_0x4a5031(0x1d2)](_0x5b3c96),{'verbose':_0x506022['verbose']}),_0x1a9d71=_0x406709[_0x4a5031(0x23b)],{isNew:_0x1b8cfd,name:_0xb0e81a,hasChanges:_0x30c226,diffFormatted:_0xf7e1c6}=_0x1a9d71;if(_0x30c226){_0x1b8cfd?console[_0x4a5031(0x36c)](_0x4a5031(0x32a)+_0xb0e81a+'\x27:'):console[_0x4a5031(0x36c)](_0x4a5031(0x2da)+_0xb0e81a+'\x27:');console[_0x4a5031(0x36c)]('─'['repeat'](0x3c)),console[_0x4a5031(0x36c)](_0xf7e1c6),console[_0x4a5031(0x36c)]('─'[_0x4a5031(0x209)](0x3c));const _0x246516=_0x1b8cfd?_0x4a5031(0x2b7)+_0xb0e81a+_0x4a5031(0x3c7):_0x4a5031(0x280)+_0xb0e81a+_0x4a5031(0x3c7);if(!_0x506022[_0x4a5031(0x23d)]){if(!isInteractive())return console['error'](a32_0x1854cc[_0x4a5031(0x304)](_0x4a5031(0x3a7)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a32_0x1854cc[_0x4a5031(0x21a)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x22461e=await confirmKey(_0x246516);if(!_0x22461e)return console[_0x4a5031(0x36c)](a32_0x1854cc[_0x4a5031(0x1f8)](_0x4a5031(0x20d))),0x1;}const _0x3d8512=_0x1b8cfd?_0x4a5031(0x2ed):_0x4a5031(0x3bc);await withSpinner(_0x3d8512+_0x4a5031(0x303)+_0xb0e81a+_0x4a5031(0x1fe),()=>_0x1a9d71[_0x4a5031(0x2c7)](),{'verbose':_0x506022[_0x4a5031(0x382)]});const _0x471050=_0x1b8cfd?_0x4a5031(0x24b):_0x4a5031(0x390);console[_0x4a5031(0x36c)]('✔\x20'+_0x471050+_0x4a5031(0x303)+_0xb0e81a+'\x27');}else console[_0x4a5031(0x36c)](_0x4a5031(0x22d)+_0xb0e81a+_0x4a5031(0x332));}const _0x2f51f1=await withSpinner(_0x4a5031(0x3c5)+_0x1ca198+'\x27...',()=>_0x4180be[_0x4a5031(0x322)][_0x4a5031(0x299)](_0x1ca198),{'verbose':_0x506022[_0x4a5031(0x382)]}),_0x339645=_0x2f51f1['data'],_0x57eff7=getConsoleUrl(_0x506022[_0x4a5031(0x1e0)],_0x4a5031(0x302)+_0x339645[_0x4a5031(0x367)]+'/sessions/'+_0x339645[_0x4a5031(0x371)]+_0x4a5031(0x3c2)+_0x339645[_0x4a5031(0x34f)]);return console[_0x4a5031(0x36c)](_0x4a5031(0x319)),console[_0x4a5031(0x36c)]('\x20\x20'+a32_0x1854cc[_0x4a5031(0x21a)]('Audience\x20ID:')+'\x20'+_0x339645[_0x4a5031(0x276)]),console[_0x4a5031(0x36c)]('\x20\x20'+a32_0x1854cc[_0x4a5031(0x21a)](_0x4a5031(0x294))+'\x20'+_0x339645['status']),console[_0x4a5031(0x36c)]('\x20\x20'+a32_0x1854cc[_0x4a5031(0x21a)]('Session:')+'\x20'+_0x339645[_0x4a5031(0x371)]),console[_0x4a5031(0x36c)]('\x20\x20'+a32_0x1854cc[_0x4a5031(0x21a)]('Attempt:')+'\x20'+_0x339645[_0x4a5031(0x34f)]),console[_0x4a5031(0x36c)]('\x20\x20'+_0x57eff7),console['error']('\x0a'+a32_0x1854cc['dim'](_0x4a5031(0x39d))+_0x4a5031(0x284)+_0x339645[_0x4a5031(0x34f)]+_0x4a5031(0x307)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{['name']='segment:parent:fields';['description']='List\x20available\x20fields\x20for\x20segmentation';async['execute'](_0x236248){const _0x2d656d=a32_0x29f8cc,{options:_0x33f8ab,args:_0x55f5a8,tdx:_0x13452c}=_0x236248,_0x584752=_0x55f5a8[0x0]||_0x33f8ab[_0x2d656d(0x369)];if(!_0x584752)return showParentSegmentNotSetError(_0x2d656d(0x327)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment'),0x1;_0x33f8ab[_0x2d656d(0x382)]&&(console['error'](_0x2d656d(0x278)+_0x33f8ab['site']),console[_0x2d656d(0x36c)](_0x2d656d(0x3a9)+_0x584752));const _0x1f668f=await withSpinner(_0x2d656d(0x2d8)+_0x584752+_0x2d656d(0x1fe),()=>_0x13452c[_0x2d656d(0x322)]['listFields'](_0x584752),{'verbose':_0x33f8ab[_0x2d656d(0x382)]}),_0x3c294c=_0x1f668f[_0x2d656d(0x23b)];console['error'](_0x2d656d(0x21f)+_0x3c294c['length']+_0x2d656d(0x3d9)+(_0x3c294c[_0x2d656d(0x207)]!==0x1?'s':''));if(_0x33f8ab[_0x2d656d(0x293)]||_0x33f8ab['jsonl'])return await handleSDKOutput(_0x3c294c,_0x33f8ab),0x0;return displayFieldsHumanReadable(_0x3c294c,_0x584752),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{['name']='segment:parent:view';['description']=a32_0x29f8cc(0x3e6);async[a32_0x29f8cc(0x352)](_0x137217){const _0x191e1c=a32_0x29f8cc,{options:_0x5bf4d6,args:_0x25ddc9,tdx:_0x14fe4e}=_0x137217,_0x28b7c8=_0x5bf4d6,_0x2967c7=_0x25ddc9[0x0]||_0x5bf4d6[_0x191e1c(0x369)];if(!_0x2967c7)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'+_0x191e1c(0x37b)+'Options:\x0a'+'\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser'),0x1;_0x5bf4d6[_0x191e1c(0x382)]&&(console[_0x191e1c(0x36c)]('Site:\x20'+_0x5bf4d6[_0x191e1c(0x1e0)]),console[_0x191e1c(0x36c)]('Parent\x20segment:\x20'+_0x2967c7));const _0xe94c5a=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x2967c7+_0x191e1c(0x1fe),()=>_0x14fe4e[_0x191e1c(0x322)][_0x191e1c(0x268)](_0x2967c7),{'verbose':_0x5bf4d6[_0x191e1c(0x382)]}),_0x4e3f0e=_0xe94c5a['data'];if(_0x28b7c8[_0x191e1c(0x2e0)]){const _0x320a25=getConsoleNextUrl(_0x28b7c8[_0x191e1c(0x1e0)],'/app/dw/parentSegments/'+_0x4e3f0e['id']);return console['error'](a32_0x1854cc[_0x191e1c(0x374)]('✔')+'\x20Opening\x20'+a32_0x1854cc[_0x191e1c(0x3ce)](_0x320a25)),openBrowser(_0x320a25),0x0;}return await handleSingleObjectOutput(_0x4e3f0e,_0x5bf4d6),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x3c3);[a32_0x29f8cc(0x286)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async[a32_0x29f8cc(0x352)](_0x5ebf6d){const _0x50eeda=a32_0x29f8cc,{options:_0x45fe2c,args:_0x13259c,tdx:_0x5dd928}=_0x5ebf6d,_0x362dd0=_0x45fe2c,_0xe6e959=_0x13259c[0x0]||_0x45fe2c[_0x50eeda(0x369)];if(!_0xe6e959)return showParentSegmentNotSetError(_0x50eeda(0x3cf)+_0x50eeda(0x300)+_0x50eeda(0x2c1)+_0x50eeda(0x211)),0x1;_0x45fe2c['verbose']&&(console[_0x50eeda(0x36c)](_0x50eeda(0x278)+_0x45fe2c['site']),console[_0x50eeda(0x36c)](_0x50eeda(0x3a9)+_0xe6e959));const _0x3ce523=await withSpinner(_0x50eeda(0x1eb)+_0xe6e959+_0x50eeda(0x1fe),()=>_0x5dd928['segment'][_0x50eeda(0x274)](_0xe6e959),{'verbose':_0x45fe2c['verbose']}),_0x41acbd=_0x3ce523['data'],_0x2af3cb=_0x5dd928[_0x50eeda(0x322)][_0x50eeda(0x385)](_0x41acbd);if(_0x362dd0['output']){const _0x5ae63c=await this['collectSchema'](_0x5ebf6d,_0xe6e959,_0x41acbd,_0x2af3cb),_0x31dafe=this['formatSchemaJson'](_0x5ae63c);writeFileSync(_0x362dd0[_0x50eeda(0x226)],_0x31dafe);const _0xa2e90a=_0x5ae63c[_0x50eeda(0x24a)][_0x50eeda(0x1d4)][_0x50eeda(0x207)]+_0x5ae63c['behaviors'][_0x50eeda(0x2a8)]((_0x41f1ab,_0x29e895)=>_0x41f1ab+_0x29e895[_0x50eeda(0x1d4)][_0x50eeda(0x207)],0x0),_0x1176a6=_0x5ae63c[_0x50eeda(0x3c6)][_0x50eeda(0x1ee)](_0x2b0bfb=>_0x2b0bfb[_0x50eeda(0x1d4)][_0x50eeda(0x207)]===0x0)[_0x50eeda(0x207)];return console[_0x50eeda(0x1ec)](_0x50eeda(0x330)+_0x362dd0[_0x50eeda(0x226)]),console[_0x50eeda(0x1ec)]('\x20\x20Database:\x20'+_0x2af3cb),console['log']('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0x5ae63c[_0x50eeda(0x3c6)][_0x50eeda(0x207)]+_0x50eeda(0x3e1)),console[_0x50eeda(0x1ec)](_0x50eeda(0x2a6)+_0xa2e90a+_0x50eeda(0x27b)),_0x1176a6>0x0&&console[_0x50eeda(0x1ec)](_0x50eeda(0x39f)+_0x1176a6+_0x50eeda(0x21c)),0x0;}console['error']('\x0a'+a32_0x1854cc[_0x50eeda(0x337)](_0x50eeda(0x346))+'\x20'+a32_0x1854cc['cyan'](_0x2af3cb));const _0x11c215=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x5dd928[_0x50eeda(0x322)][_0x50eeda(0x3ca)](_0x41acbd),{'verbose':_0x45fe2c['verbose']});console['error']('\x0a'+a32_0x1854cc[_0x50eeda(0x337)](_0x50eeda(0x24a))+'\x20'+a32_0x1854cc['dim']('('+_0x2af3cb+'.customers)'));const _0x5668f6=await executeSchemaQuery(_0x11c215[_0x50eeda(0x23b)],_0x5dd928,_0x45fe2c);await handleQueryOutput(_0x5668f6,_0x45fe2c);const _0x19ade6=await withSpinner(_0x50eeda(0x36f),()=>_0x5dd928['segment']['getBehaviorNames'](_0x41acbd),{'verbose':_0x45fe2c['verbose']});for(const _0x5b02f9 of _0x19ade6[_0x50eeda(0x23b)]){const _0x11882b=_0x50eeda(0x20f)+_0x5b02f9[_0x50eeda(0x35f)]()[_0x50eeda(0x285)](/\s+/g,'_'),_0x8c9c97='SELECT\x20*\x20FROM\x20'+_0x2af3cb+'.'+_0x11882b;console[_0x50eeda(0x36c)]('\x0a'+a32_0x1854cc['bold'](_0x5b02f9)+'\x20'+a32_0x1854cc['dim']('('+_0x2af3cb+'.'+_0x11882b+')'));try{const _0x2ba44b=await executeSchemaQuery(_0x8c9c97,_0x5dd928,_0x45fe2c);await handleQueryOutput(_0x2ba44b,_0x45fe2c);}catch{console[_0x50eeda(0x36c)](a32_0x1854cc[_0x50eeda(0x1f8)](_0x50eeda(0x1e3)));}}return 0x0;}async[a32_0x29f8cc(0x27c)](_0x2903ca,_0x229dbe,_0x29ed64,_0x463e8a){const _0x3a5ff0=a32_0x29f8cc,{options:_0x3cdc71,tdx:_0x3e6e52}=_0x2903ca,_0x468ab5=await withSpinner(_0x3a5ff0(0x2e9),()=>_0x3e6e52[_0x3a5ff0(0x322)]['getParentSQL'](_0x29ed64),{'verbose':_0x3cdc71[_0x3a5ff0(0x382)]}),_0xdb569=await executeSchemaQuery(_0x468ab5['data'],_0x3e6e52,_0x3cdc71),_0x505bbd=_0xdb569['data']['map'](_0x43a64a=>({'name':_0x43a64a[_0x3a5ff0(0x292)],'type':_0x43a64a['column_type']})),_0x109041=await withSpinner(_0x3a5ff0(0x36f),()=>_0x3e6e52[_0x3a5ff0(0x322)][_0x3a5ff0(0x20b)](_0x29ed64),{'verbose':_0x3cdc71[_0x3a5ff0(0x382)]}),_0x4e2a26=[];for(const _0x41ff9c of _0x109041[_0x3a5ff0(0x23b)]){const _0x69d901=_0x3a5ff0(0x20f)+_0x41ff9c[_0x3a5ff0(0x35f)]()['replace'](/\s+/g,'_'),_0x160658=_0x3a5ff0(0x348)+_0x463e8a+'.'+_0x69d901;let _0x4130dc=[];try{const _0x4ada1a=await executeSchemaQuery(_0x160658,_0x3e6e52,_0x3cdc71);_0x4130dc=_0x4ada1a[_0x3a5ff0(0x23b)][_0x3a5ff0(0x375)](_0xf3fc47=>({'name':_0xf3fc47[_0x3a5ff0(0x292)],'type':_0xf3fc47[_0x3a5ff0(0x38a)]}));}catch{}_0x4e2a26[_0x3a5ff0(0x220)]({'table':_0x69d901,'columns':_0x4130dc});}return{'database':_0x463e8a,'parent_segment':_0x229dbe,'parent_id':_0x29ed64,'customers':{'table':_0x3a5ff0(0x24a),'columns':_0x505bbd},'behaviors':_0x4e2a26};}[a32_0x29f8cc(0x1f4)](_0x27b543){const _0x20e43f=a32_0x29f8cc,_0x510172=_0x5830de=>{const _0x17ea2a=a32_0x3fb2;if(_0x5830de[_0x17ea2a(0x207)]===0x0)return'[]';const _0x3fb1dd=_0x5830de[_0x17ea2a(0x375)](_0xb388e6=>_0x17ea2a(0x323)+_0xb388e6[_0x17ea2a(0x24e)]+_0x17ea2a(0x329)+_0xb388e6[_0x17ea2a(0x37a)]+_0x17ea2a(0x2ae));return'[\x0a'+_0x3fb1dd[_0x17ea2a(0x373)](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0xa1195a=_0x27b543['behaviors'][_0x20e43f(0x375)](_0x58d748=>{const _0x53be18=_0x20e43f;return _0x53be18(0x36d)+_0x58d748[_0x53be18(0x295)]+_0x53be18(0x301)+_0x510172(_0x58d748[_0x53be18(0x1d4)])[_0x53be18(0x285)](/^/gm,'\x20\x20')[_0x53be18(0x310)]()+_0x53be18(0x2a9);})[_0x20e43f(0x373)](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x27b543[_0x20e43f(0x3a0)]+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x27b543[_0x20e43f(0x29e)]+_0x20e43f(0x2e7)+_0x27b543[_0x20e43f(0x335)]+_0x20e43f(0x388)+_0x27b543['customers'][_0x20e43f(0x295)]+_0x20e43f(0x35c)+_0x510172(_0x27b543[_0x20e43f(0x24a)]['columns'])[_0x20e43f(0x285)](/^/gm,'\x20\x20')['trim']()+'\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a'+_0xa1195a+_0x20e43f(0x360);}}export class ParentSegmentSQLCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x2c0);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x230);async[a32_0x29f8cc(0x352)](_0x5d3650){const _0x3275dd=a32_0x29f8cc,{options:_0x23be9f,args:_0xaf154e,tdx:_0xb12210}=_0x5d3650,_0x12301f=_0xaf154e[0x0]||_0x23be9f[_0x3275dd(0x369)];if(!_0x12301f)return showParentSegmentNotSetError(_0x3275dd(0x2f0)+_0x3275dd(0x334)),0x1;_0x23be9f['verbose']&&(console[_0x3275dd(0x36c)](_0x3275dd(0x278)+_0x23be9f[_0x3275dd(0x1e0)]),console[_0x3275dd(0x36c)](_0x3275dd(0x3a9)+_0x12301f));const _0x204ec6=await withSpinner(_0x3275dd(0x1eb)+_0x12301f+_0x3275dd(0x1fe),()=>_0xb12210['segment'][_0x3275dd(0x274)](_0x12301f),{'verbose':_0x23be9f[_0x3275dd(0x382)]}),_0x470b6c=_0x204ec6[_0x3275dd(0x23b)],_0x34ed7f=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x12301f+_0x3275dd(0x1fe),()=>_0xb12210[_0x3275dd(0x322)][_0x3275dd(0x3ca)](_0x470b6c),{'verbose':_0x23be9f[_0x3275dd(0x382)]}),_0xc33b60=_0x34ed7f[_0x3275dd(0x23b)];return _0x23be9f[_0x3275dd(0x252)]===_0x3275dd(0x293)||_0x23be9f[_0x3275dd(0x252)]==='jsonl'?await handleSDKOutput([{'sql':_0xc33b60}],_0x23be9f):console[_0x3275dd(0x1ec)](_0xc33b60),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x2ef);[a32_0x29f8cc(0x286)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a32_0x29f8cc(0x352)](_0x4b2d9e){const _0x15733a=a32_0x29f8cc,{options:_0x1de119,args:_0x3946f6,tdx:_0x3608c5}=_0x4b2d9e,_0x2a655e=_0x3946f6[0x0]||_0x1de119['parentSegment'];if(!_0x2a655e)return showParentSegmentNotSetError(_0x15733a(0x283)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment'),0x1;_0x1de119[_0x15733a(0x382)]&&(console[_0x15733a(0x36c)](_0x15733a(0x278)+_0x1de119[_0x15733a(0x1e0)]),console[_0x15733a(0x36c)](_0x15733a(0x3a9)+_0x2a655e));const _0x2801a3=await withSpinner(_0x15733a(0x1eb)+_0x2a655e+_0x15733a(0x1fe),()=>_0x3608c5[_0x15733a(0x322)][_0x15733a(0x274)](_0x2a655e),{'verbose':_0x1de119[_0x15733a(0x382)]}),_0x3d8f35=_0x2801a3[_0x15733a(0x23b)],_0x15d0e3=await withSpinner(_0x15733a(0x3e3)+_0x2a655e+_0x15733a(0x1fe),()=>_0x3608c5['segment'][_0x15733a(0x3ca)](_0x3d8f35),{'verbose':_0x1de119[_0x15733a(0x382)]});let _0x3bc970=_0x15d0e3['data'];const _0x22f8a8=resolveLimit(_0x1de119[_0x15733a(0x1fd)],DEFAULT_DISPLAY_LIMIT),_0x82bcb8=/\bLIMIT\s+\d+/i[_0x15733a(0x2e5)](_0x3bc970);!_0x82bcb8&&(_0x3bc970=_0x3bc970[_0x15733a(0x310)]()['replace'](/;+$/,''),_0x3bc970='SELECT\x20*\x20FROM\x20(\x0a'+_0x3bc970+_0x15733a(0x2bf)+_0x22f8a8);_0x1de119['verbose']&&console[_0x15733a(0x36c)](_0x15733a(0x29b)+_0x3bc970);const _0x11ab1a=await withProgressSpinner(_0x15733a(0x231),async _0x3190aa=>{const _0x2d11af=_0x15733a,_0x4fd606=await _0x3608c5['query'][_0x2d11af(0x352)](_0x3bc970,{'catalog':'td','schema':_0x2d11af(0x2a7),'onJobId':_0xa2c033=>{const _0x53200f=_0x2d11af;_0x3190aa[_0x53200f(0x2b2)](_0xa2c033);}});return _0x4fd606;},{'verbose':_0x1de119[_0x15733a(0x382)]}),_0x492015=_0x11ab1a[_0x15733a(0x23b)],_0x24fedc=_0x492015['jobId']?'\x20[Job\x20ID:\x20'+_0x492015[_0x15733a(0x2c3)]+']':'';return console[_0x15733a(0x36c)]('✔\x20Query\x20completed:\x20Processed\x20'+_0x492015[_0x15733a(0x3de)]['processedRows']['toLocaleString']()+_0x15733a(0x2f6)+(_0x15733a(0x2b8)+formatElapsed(_0x492015[_0x15733a(0x3de)][_0x15733a(0x3b1)])+_0x24fedc)),await handleQueryOutput(_0x492015,_0x1de119),0x0;}}export class PSRtListCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x313);['description']=a32_0x29f8cc(0x290);async['execute'](_0x501a6d){const _0x355712=a32_0x29f8cc,{options:_0x171e45,args:_0xe4b532,tdx:_0x1ca460}=_0x501a6d,_0x1f3dce=_0xe4b532[0x0],_0x285e53=await withSpinner(_0x1f3dce?_0x355712(0x309)+_0x1f3dce+_0x355712(0x1fe):_0x355712(0x2ee),()=>_0x1ca460[_0x355712(0x35d)][_0x355712(0x3ad)](),{'verbose':_0x171e45[_0x355712(0x382)]});let _0x32ccce=_0x285e53[_0x355712(0x23b)][_0x355712(0x1ee)](_0x4a9f0c=>_0x4a9f0c[_0x355712(0x222)]);if(_0x1f3dce){const _0x2f857d=_0x1f3dce['replace'](/[.+^${}()|[\]\\]/g,_0x355712(0x1f0))['replace'](/\*/g,'.*')['replace'](/\?/g,'.'),_0x1f763d=new RegExp('^'+_0x2f857d+'$','i');_0x32ccce=_0x32ccce[_0x355712(0x1ee)](_0x2f96b4=>_0x1f763d[_0x355712(0x2e5)](_0x2f96b4['name']));}_0x32ccce[_0x355712(0x1ff)]((_0x3df8da,_0x4dedb5)=>_0x3df8da[_0x355712(0x24e)][_0x355712(0x3ab)](_0x4dedb5['name'])),console[_0x355712(0x36c)](_0x355712(0x21f)+_0x32ccce[_0x355712(0x207)]+'\x20RT-enabled\x20parent\x20segment'+(_0x32ccce[_0x355712(0x207)]!==0x1?'s':''));const _0x49e410=_0x5cb6a0=>{const _0xedc3d1=_0x355712;return getConsoleNextUrl(_0x171e45[_0xedc3d1(0x1e0)],_0xedc3d1(0x2b0)+_0x5cb6a0);};if(_0x171e45[_0x355712(0x252)]===_0x355712(0x293)||_0x171e45[_0x355712(0x252)]==='jsonl'){const _0x3d7aa8=_0x32ccce['map'](_0x19ef1d=>({..._0x19ef1d,'url':_0x49e410(_0x19ef1d['id'])}));await handleSDKOutput(_0x3d7aa8,_0x171e45);}else{if(_0x32ccce[_0x355712(0x207)]===0x0)console['log'](_0x355712(0x1fc));else for(const _0x333daa of _0x32ccce){const _0x1319d8=_0x333daa['population']?a32_0x1854cc[_0x355712(0x21a)]('\x20('+formatRows(_0x333daa['population'])+')'):'',_0x508a39=hyperlink(_0x333daa[_0x355712(0x24e)],_0x49e410(_0x333daa['id']));console[_0x355712(0x1ec)]('⚡\x20'+_0x508a39+_0x1319d8);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a32_0x29f8cc(0x24e)]='ps:rt:validate';[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x201);async[a32_0x29f8cc(0x352)](_0x556077){const _0x4ba29c=a32_0x29f8cc,{options:_0x3cf62c,args:_0x368980,tdx:_0x3f276f}=_0x556077,_0x2cc40b=_0x368980[0x0]||_0x3cf62c[_0x4ba29c(0x369)];if(!_0x2cc40b)return showParentSegmentNotSetError(_0x4ba29c(0x23f)+_0x4ba29c(0x1f2)),0x1;const _0x3afd73=resolveYamlFile(_0x2cc40b);if(!existsSync(_0x3afd73))return showFileNotFoundError(_0x3afd73,_0x2cc40b),0x1;let _0x1265b9;try{_0x1265b9=readFileSync(_0x3afd73,'utf-8');}catch(_0x33342b){const _0x3ee174=_0x33342b instanceof Error?_0x33342b['message']:String(_0x33342b);return console[_0x4ba29c(0x36c)](_0x4ba29c(0x333)+_0x3ee174),0x1;}const _0x33c93a=createCommandSpinner(a32_0x1854cc[_0x4ba29c(0x21a)](_0x4ba29c(0x305)),{'verbose':_0x3cf62c['verbose']});_0x33c93a['start']();const _0x209d3e={'realtime':!![],'onProgress':_0x26ce29=>{const _0x531988=_0x4ba29c;_0x33c93a[_0x531988(0x2c8)]=formatProgressMessage(_0x26ce29);}};let _0x52d804;try{_0x52d804=await _0x3f276f[_0x4ba29c(0x322)][_0x4ba29c(0x235)](_0x1265b9,_0x209d3e),_0x33c93a[_0x4ba29c(0x2e8)]();}catch(_0x4d01da){_0x33c93a[_0x4ba29c(0x2e8)]();throw _0x4d01da;}console['error']('\x0a'+a32_0x1854cc[_0x4ba29c(0x337)]('RT\x202.0\x20Validate:')+'\x20'+_0x52d804['name']),console['error']('═'[_0x4ba29c(0x209)](0x3c)),displayRealtimeValidation(_0x52d804),console['error']('─'['repeat'](0x3c));if(_0x52d804['errors'][_0x4ba29c(0x207)]>0x0){console['error']('\x0a'+a32_0x1854cc[_0x4ba29c(0x304)](_0x4ba29c(0x33e)));for(const _0x45cbfd of _0x52d804[_0x4ba29c(0x3a6)]){console[_0x4ba29c(0x36c)]('\x20\x20'+a32_0x1854cc[_0x4ba29c(0x304)]('•')+'\x20'+_0x45cbfd);}}return _0x52d804['allValid']&&console[_0x4ba29c(0x36c)]('\x0a'+a32_0x1854cc[_0x4ba29c(0x374)]('✔')+_0x4ba29c(0x358)),_0x52d804['allValid']?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]='ps:rt:jn:list';['description']=a32_0x29f8cc(0x2a3);async['execute'](_0x4ae7ff){const _0x208fd1=a32_0x29f8cc,{options:_0x172c3e,args:_0x59545e,tdx:_0x5ebdf0}=_0x4ae7ff,_0x1e9d16=_0x59545e[0x0]||_0x172c3e['parentSegment'];if(!_0x1e9d16)return showParentSegmentNotSetError('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'+_0x208fd1(0x33f)),0x1;_0x172c3e[_0x208fd1(0x382)]&&(console[_0x208fd1(0x36c)](_0x208fd1(0x278)+_0x172c3e[_0x208fd1(0x1e0)]),console[_0x208fd1(0x36c)]('Parent\x20segment:\x20'+_0x1e9d16));const _0x86a9b9=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1e9d16+_0x208fd1(0x1fe),()=>_0x5ebdf0[_0x208fd1(0x322)][_0x208fd1(0x274)](_0x1e9d16),{'verbose':_0x172c3e[_0x208fd1(0x382)]}),_0x474502=_0x86a9b9[_0x208fd1(0x23b)],_0x127d8e=await withSpinner(_0x208fd1(0x247)+_0x1e9d16+_0x208fd1(0x1fe),()=>_0x5ebdf0[_0x208fd1(0x35d)][_0x208fd1(0x1d8)](_0x474502),{'verbose':_0x172c3e['verbose']}),_0x5c1e03=_0x127d8e[_0x208fd1(0x23b)];console['error'](_0x208fd1(0x21f)+_0x5c1e03[_0x208fd1(0x207)]+_0x208fd1(0x2fb)+(_0x5c1e03[_0x208fd1(0x207)]!==0x1?'s':''));if(_0x172c3e[_0x208fd1(0x252)]===_0x208fd1(0x293)||_0x172c3e[_0x208fd1(0x252)]===_0x208fd1(0x3bd))await handleSDKOutput(_0x5c1e03,_0x172c3e);else{if(_0x5c1e03[_0x208fd1(0x207)]===0x0)console[_0x208fd1(0x1ec)]('No\x20RT\x20journeys\x20found');else for(const _0x163b39 of _0x5c1e03){const _0x6507e4=_0x163b39['state']===_0x208fd1(0x34d)?'🚀':'📝',_0x44e964=_0x163b39[_0x208fd1(0x229)]?a32_0x1854cc[_0x208fd1(0x1f8)](_0x208fd1(0x219)):'',_0x503618=a32_0x1854cc['dim']('\x20('+_0x163b39['stageCount']+_0x208fd1(0x36a)+(_0x163b39['stageCount']!==0x1?'s':'')+')');console[_0x208fd1(0x1ec)](_0x6507e4+'\x20'+_0x163b39[_0x208fd1(0x24e)]+_0x44e964+_0x503618);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x379);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x30d);async[a32_0x29f8cc(0x352)](_0xa4edb1){const _0x5e9c09=a32_0x29f8cc,{options:_0x287af6,args:_0x5cc9b1,tdx:_0x336f33}=_0xa4edb1,_0x2f1312=_0x5cc9b1[0x0];if(!_0x2f1312)return console[_0x5e9c09(0x36c)](a32_0x1854cc[_0x5e9c09(0x304)](_0x5e9c09(0x25d))),console[_0x5e9c09(0x36c)](_0x5e9c09(0x1d3)),console[_0x5e9c09(0x36c)](a32_0x1854cc[_0x5e9c09(0x21a)](_0x5e9c09(0x23a))),0x1;_0x287af6[_0x5e9c09(0x382)]&&(console['error']('Site:\x20'+_0x287af6['site']),console['error']('RT\x20Journey\x20ID:\x20'+_0x2f1312));const _0x31b88c=await withSpinner('Pausing\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x2f1312+'\x27...',()=>_0x336f33[_0x5e9c09(0x35d)]['pauseJourney'](_0x2f1312),{'verbose':_0x287af6[_0x5e9c09(0x382)]}),_0x437e3e=_0x31b88c['data'];console[_0x5e9c09(0x36c)](_0x5e9c09(0x212)+_0x437e3e['name']+'\x27');if(_0x287af6['format']===_0x5e9c09(0x293)||_0x287af6['format']===_0x5e9c09(0x3bd))await handleSDKOutput([_0x437e3e],_0x287af6);else{const _0x51ec47=_0x437e3e[_0x5e9c09(0x324)]==='launched'?'🚀':'📝',_0x2d3be8=_0x437e3e[_0x5e9c09(0x229)]?a32_0x1854cc['yellow']('\x20(paused)'):'';console['log'](_0x51ec47+'\x20'+_0x437e3e[_0x5e9c09(0x24e)]+_0x2d3be8);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]='ps:rt:jn:resume';[a32_0x29f8cc(0x286)]='Resume\x20activations\x20in\x20an\x20RT\x20journey';async[a32_0x29f8cc(0x352)](_0x13cf54){const _0x2f8c73=a32_0x29f8cc,{options:_0x2c4cfb,args:_0x290a69,tdx:_0x1b40ff}=_0x13cf54,_0x3318d3=_0x290a69[0x0];if(!_0x3318d3)return console['error'](a32_0x1854cc['red'](_0x2f8c73(0x25d))),console[_0x2f8c73(0x36c)](_0x2f8c73(0x384)),console[_0x2f8c73(0x36c)](a32_0x1854cc[_0x2f8c73(0x21a)](_0x2f8c73(0x23a))),0x1;_0x2c4cfb['verbose']&&(console[_0x2f8c73(0x36c)]('Site:\x20'+_0x2c4cfb[_0x2f8c73(0x1e0)]),console[_0x2f8c73(0x36c)](_0x2f8c73(0x2d9)+_0x3318d3));const _0x1fca16=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x3318d3+_0x2f8c73(0x1fe),()=>_0x1b40ff[_0x2f8c73(0x35d)][_0x2f8c73(0x39a)](_0x3318d3),{'verbose':_0x2c4cfb[_0x2f8c73(0x382)]}),_0x1aef4e=_0x1fca16['data'];console['error'](_0x2f8c73(0x21e)+_0x1aef4e[_0x2f8c73(0x24e)]+'\x27');if(_0x2c4cfb[_0x2f8c73(0x252)]==='json'||_0x2c4cfb[_0x2f8c73(0x252)]==='jsonl')await handleSDKOutput([_0x1aef4e],_0x2c4cfb);else{const _0x3331ae=_0x1aef4e[_0x2f8c73(0x324)]===_0x2f8c73(0x34d)?'🚀':'📝',_0x5a9b6c=_0x1aef4e[_0x2f8c73(0x229)]?a32_0x1854cc[_0x2f8c73(0x1f8)](_0x2f8c73(0x219)):'';console[_0x2f8c73(0x1ec)](_0x3331ae+'\x20'+_0x1aef4e[_0x2f8c73(0x24e)]+_0x5a9b6c);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x21b);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x251);async['execute'](_0x3b04a2){const _0x12571f=a32_0x29f8cc,{options:_0x48ac3b,args:_0x1907f7,tdx:_0x47ec86}=_0x3b04a2,_0x4304d3=_0x1907f7[0x0]||_0x48ac3b[_0x12571f(0x369)];if(!_0x4304d3)return showParentSegmentNotSetError(_0x12571f(0x2b4)+_0x12571f(0x2cf)),0x1;_0x48ac3b[_0x12571f(0x382)]&&(console[_0x12571f(0x36c)](_0x12571f(0x278)+_0x48ac3b[_0x12571f(0x1e0)]),console[_0x12571f(0x36c)](_0x12571f(0x3a9)+_0x4304d3));const _0x2b510a=await withSpinner(_0x12571f(0x1eb)+_0x4304d3+'\x27...',()=>_0x47ec86[_0x12571f(0x322)][_0x12571f(0x274)](_0x4304d3),{'verbose':_0x48ac3b['verbose']}),_0x16a5e1=_0x2b510a[_0x12571f(0x23b)],_0x560c07=await withSpinner('Getting\x20RT\x20configuration\x20version\x20for\x20\x27'+_0x4304d3+_0x12571f(0x1fe),()=>_0x47ec86[_0x12571f(0x35d)][_0x12571f(0x31a)](_0x16a5e1),{'verbose':_0x48ac3b[_0x12571f(0x382)]}),_0x3be0ee=_0x560c07[_0x12571f(0x23b)];return console['error']('✔\x20Retrieved\x20RT\x20configuration\x20version'),_0x48ac3b['format']===_0x12571f(0x293)||_0x48ac3b['format']==='jsonl'?await handleSDKOutput([_0x3be0ee],_0x48ac3b):(console[_0x12571f(0x1ec)]('id:\x20'+_0x3be0ee['id']),console[_0x12571f(0x1ec)]('audienceId:\x20'+_0x3be0ee[_0x12571f(0x276)]),console[_0x12571f(0x1ec)](_0x12571f(0x3cc)+_0x3be0ee[_0x12571f(0x29c)]),console[_0x12571f(0x1ec)](_0x12571f(0x344)+_0x3be0ee[_0x12571f(0x30c)]),console[_0x12571f(0x1ec)](_0x12571f(0x2ba)+_0x3be0ee[_0x12571f(0x392)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x331);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x391);async['execute'](_0x4076e6){const _0x2c9801=a32_0x29f8cc,{options:_0x2a368b,args:_0xbfd7dd,tdx:_0x2747ba}=_0x4076e6,_0x1fc6c2=_0xbfd7dd[0x0]||_0x2a368b[_0x2c9801(0x369)];if(!_0x1fc6c2)return showParentSegmentNotSetError(_0x2c9801(0x315)+_0x2c9801(0x347)),0x1;const _0x5ee633=await withSpinner(_0x2c9801(0x1eb)+_0x1fc6c2+'\x27...',()=>_0x2747ba['segment'][_0x2c9801(0x274)](_0x1fc6c2),{'verbose':_0x2a368b[_0x2c9801(0x382)]}),_0x521f1c=_0x5ee633['data'],_0x5c8677=await withSpinner(_0x2c9801(0x2c4)+_0x1fc6c2+_0x2c9801(0x1fe),()=>_0x2747ba[_0x2c9801(0x28e)][_0x2c9801(0x3ad)](_0x521f1c),{'verbose':_0x2a368b[_0x2c9801(0x382)]}),_0x3e60af=_0x5c8677[_0x2c9801(0x23b)];console[_0x2c9801(0x36c)](_0x2c9801(0x21f)+_0x3e60af[_0x2c9801(0x207)]+_0x2c9801(0x2f1)+(_0x3e60af[_0x2c9801(0x207)]!==0x1?'s':''));if(_0x2a368b[_0x2c9801(0x252)]===_0x2c9801(0x293)||_0x2a368b[_0x2c9801(0x252)]===_0x2c9801(0x3bd))await handleSDKOutput(_0x3e60af,_0x2a368b);else{if(_0x3e60af[_0x2c9801(0x207)]===0x0)console[_0x2c9801(0x1ec)](_0x2c9801(0x258)),console[_0x2c9801(0x36c)](a32_0x1854cc['cyan'](_0x2c9801(0x325)));else for(const _0x3d7ece of _0x3e60af){console[_0x2c9801(0x1ec)](a32_0x1854cc[_0x2c9801(0x337)](_0x3d7ece[_0x2c9801(0x24e)])+'\x20'+a32_0x1854cc[_0x2c9801(0x21a)](_0x2c9801(0x269)+_0x3d7ece['id']+')'));_0x3d7ece['description']&&console[_0x2c9801(0x1ec)]('\x20\x20'+a32_0x1854cc[_0x2c9801(0x21a)](_0x3d7ece[_0x2c9801(0x286)]));if(_0x3d7ece[_0x2c9801(0x2a2)]&&_0x3d7ece[_0x2c9801(0x2a2)][_0x2c9801(0x207)]>0x0)for(const _0x32a497 of _0x3d7ece[_0x2c9801(0x2a2)]){const _0x32b0be=_0x32a497[_0x2c9801(0x1d5)]?.[_0x2c9801(0x207)]?_0x32a497[_0x2c9801(0x1d5)]['join'](',\x20'):_0x2c9801(0x2bb);console[_0x2c9801(0x1ec)]('\x20\x20'+a32_0x1854cc[_0x2c9801(0x3ce)](_0x2c9801(0x1ef))+'\x20'+_0x32a497[_0x2c9801(0x24e)]+'\x20'+a32_0x1854cc['dim']('(id:\x20'+_0x32a497['id']+')')),console[_0x2c9801(0x1ec)]('\x20\x20\x20\x20'+a32_0x1854cc[_0x2c9801(0x21a)](_0x2c9801(0x227))+'\x20'+_0x32b0be);}else console['log']('\x20\x20'+a32_0x1854cc[_0x2c9801(0x21a)](_0x2c9801(0x22b)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]='ps:pz:service:create';['description']=a32_0x29f8cc(0x1de);async[a32_0x29f8cc(0x352)](_0x51df3e){const _0x5e2255=a32_0x29f8cc,{options:_0x10d6cf,args:_0x883c67,tdx:_0x15836a}=_0x51df3e,_0x26a97=_0x10d6cf,_0x589cec=_0x883c67[0x0],_0x49f8fe=_0x883c67[0x1]||_0x10d6cf[_0x5e2255(0x369)];if(!_0x589cec)return console[_0x5e2255(0x36c)]('Error:\x20Service\x20name\x20is\x20required'),console[_0x5e2255(0x36c)](_0x5e2255(0x314)),console[_0x5e2255(0x36c)](_0x5e2255(0x2d3)),0x1;if(!_0x49f8fe)return showParentSegmentNotSetError(_0x5e2255(0x225)+_0x5e2255(0x2d3)),0x1;const _0x127c29=await withSpinner(_0x5e2255(0x1eb)+_0x49f8fe+'\x27...',()=>_0x15836a['segment']['resolveParentId'](_0x49f8fe),{'verbose':_0x10d6cf[_0x5e2255(0x382)]}),_0x4b37f1=_0x127c29['data'],_0x3908cd={'name':_0x589cec,'description':_0x26a97[_0x5e2255(0x286)],'public':_0x26a97['public']},_0x43050e=await withSpinner('Creating\x20personalization\x20service\x20\x27'+_0x589cec+_0x5e2255(0x1fe),()=>_0x15836a[_0x5e2255(0x28e)]['create'](_0x4b37f1,_0x3908cd),{'verbose':_0x10d6cf[_0x5e2255(0x382)]}),_0x3de902=_0x43050e[_0x5e2255(0x23b)];return console['error'](_0x5e2255(0x259)+_0x3de902[_0x5e2255(0x24e)]+'\x27\x20with\x20ID:\x20'+_0x3de902['id']),await handleSDKOutput([_0x3de902],_0x10d6cf),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x2d1);['description']=a32_0x29f8cc(0x221);async[a32_0x29f8cc(0x352)](_0x1d3b73){const _0x257191=a32_0x29f8cc,{options:_0x43c996,args:_0xd98e8f,tdx:_0x35dbbe}=_0x1d3b73,_0xddc0f3=_0xd98e8f[0x0],_0x1d6008=_0xd98e8f[0x1]||_0x43c996[_0x257191(0x369)];if(!_0xddc0f3)return console[_0x257191(0x36c)](_0x257191(0x2b9)),console[_0x257191(0x36c)](_0x257191(0x2b5)),console[_0x257191(0x36c)](_0x257191(0x289)),0x1;if(!_0x1d6008)return showParentSegmentNotSetError(_0x257191(0x23e)+_0x257191(0x289)),0x1;const _0x187665=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1d6008+_0x257191(0x1fe),()=>_0x35dbbe['segment'][_0x257191(0x274)](_0x1d6008),{'verbose':_0x43c996[_0x257191(0x382)]}),_0x201d59=_0x187665['data'],_0x88647f=await withSpinner(_0x257191(0x1e1)+_0xddc0f3+_0x257191(0x1fe),()=>_0x35dbbe[_0x257191(0x28e)][_0x257191(0x271)](_0x201d59,_0xddc0f3),{'verbose':_0x43c996[_0x257191(0x382)]}),_0x145bee=_0x88647f[_0x257191(0x23b)];if(_0x43c996[_0x257191(0x293)]||_0x43c996[_0x257191(0x3bd)])await handleSDKOutput([_0x145bee],_0x43c996);else{console[_0x257191(0x1ec)](a32_0x1854cc[_0x257191(0x337)](_0x145bee[_0x257191(0x24e)])+'\x20'+a32_0x1854cc[_0x257191(0x21a)](_0x257191(0x269)+_0x145bee['id']+')'));_0x145bee[_0x257191(0x286)]&&console[_0x257191(0x1ec)]('\x20\x20'+a32_0x1854cc[_0x257191(0x21a)](_0x145bee[_0x257191(0x286)]));console['log']('\x20\x20'+a32_0x1854cc[_0x257191(0x3ce)]('public:')+'\x20'+(_0x145bee[_0x257191(0x3a4)]?'yes':'no'));if(_0x145bee[_0x257191(0x2a2)]&&_0x145bee[_0x257191(0x2a2)][_0x257191(0x207)]>0x0)for(const _0x15c6c3 of _0x145bee['tokens']){const _0x42624b=_0x15c6c3[_0x257191(0x1d5)]?.[_0x257191(0x207)]?_0x15c6c3[_0x257191(0x1d5)]['join'](',\x20'):'any';console[_0x257191(0x1ec)]('\x20\x20'+a32_0x1854cc[_0x257191(0x3ce)](_0x257191(0x1ef))+'\x20'+_0x15c6c3[_0x257191(0x24e)]+'\x20'+a32_0x1854cc[_0x257191(0x21a)]('(id:\x20'+_0x15c6c3['id']+')')),console['log']('\x20\x20\x20\x20'+a32_0x1854cc['dim'](_0x257191(0x227))+'\x20'+_0x42624b);}else console[_0x257191(0x1ec)]('\x20\x20'+a32_0x1854cc[_0x257191(0x21a)]('no\x20tokens\x20configured'));}return 0x0;}}function a32_0x3fb2(_0x375bd0,_0x2a19ad){_0x375bd0=_0x375bd0-0x1cf;const _0x65980e=a32_0x6598();let _0x3fb2ff=_0x65980e[_0x375bd0];return _0x3fb2ff;}export class PSPzServiceDeleteCommand extends BaseCommand{['name']=a32_0x29f8cc(0x22e);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x233);async['execute'](_0x13f830){const _0x2448e3=a32_0x29f8cc,{options:_0x3cb4bb,args:_0x37f65f,tdx:_0x4f3729}=_0x13f830,_0x3d3180=_0x37f65f[0x0],_0xdc86b6=_0x37f65f[0x1]||_0x3cb4bb[_0x2448e3(0x369)];if(!_0x3d3180)return console[_0x2448e3(0x36c)](_0x2448e3(0x2b9)),console[_0x2448e3(0x36c)](_0x2448e3(0x203)),console[_0x2448e3(0x36c)](_0x2448e3(0x395)),0x1;if(!_0xdc86b6)return showParentSegmentNotSetError(_0x2448e3(0x20e)+_0x2448e3(0x395)),0x1;const _0x49f279=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xdc86b6+_0x2448e3(0x1fe),()=>_0x4f3729[_0x2448e3(0x322)][_0x2448e3(0x274)](_0xdc86b6),{'verbose':_0x3cb4bb[_0x2448e3(0x382)]}),_0x43d668=_0x49f279['data'];return await withSpinner(_0x2448e3(0x396)+_0x3d3180+_0x2448e3(0x1fe),()=>_0x4f3729[_0x2448e3(0x28e)][_0x2448e3(0x3cd)](_0x43d668,_0x3d3180),{'verbose':_0x3cb4bb['verbose']}),console[_0x2448e3(0x36c)](_0x2448e3(0x239)+_0x3d3180+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x2fa);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x312);async[a32_0x29f8cc(0x352)](_0x3eff86){const _0x24bb5a=a32_0x29f8cc,{options:_0x28740d,args:_0x52953f,tdx:_0x31d6af}=_0x3eff86,_0x419e4e=_0x28740d,_0xc5c602=_0x52953f[0x0],_0x447866=_0x52953f[0x1]||_0x28740d[_0x24bb5a(0x369)];if(!_0xc5c602)return console[_0x24bb5a(0x36c)](_0x24bb5a(0x2b9)),console['error'](_0x24bb5a(0x3bf)),console[_0x24bb5a(0x36c)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x419e4e['name'])return console[_0x24bb5a(0x36c)]('Error:\x20--name\x20is\x20required'),console[_0x24bb5a(0x36c)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),0x1;if(!_0x447866)return showParentSegmentNotSetError(_0x24bb5a(0x317)+_0x24bb5a(0x287)),0x1;const _0x1b9efb=await withSpinner(_0x24bb5a(0x1eb)+_0x447866+'\x27...',()=>_0x31d6af['segment'][_0x24bb5a(0x274)](_0x447866),{'verbose':_0x28740d['verbose']}),_0x44d452=_0x1b9efb[_0x24bb5a(0x23b)],_0x10f129={'name':_0x419e4e[_0x24bb5a(0x24e)]};_0x419e4e[_0x24bb5a(0x286)]!==undefined&&(_0x10f129[_0x24bb5a(0x286)]=_0x419e4e[_0x24bb5a(0x286)]);const _0x1ce30e=await withSpinner(_0x24bb5a(0x370)+_0xc5c602+_0x24bb5a(0x1fe),()=>_0x31d6af['personalization'][_0x24bb5a(0x3be)](_0x44d452,_0xc5c602,_0x10f129),{'verbose':_0x28740d[_0x24bb5a(0x382)]}),_0x2a73a0=_0x1ce30e[_0x24bb5a(0x23b)];return console[_0x24bb5a(0x36c)](_0x24bb5a(0x1fb)+_0x2a73a0[_0x24bb5a(0x24e)]+'\x27'),await handleSDKOutput([_0x2a73a0],_0x28740d),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x27e);[a32_0x29f8cc(0x286)]='Create\x20a\x20token\x20for\x20a\x20personalization\x20service';async['execute'](_0x1a201c){const _0x10c68f=a32_0x29f8cc,{options:_0x5f35dc,args:_0x19ef0e,tdx:_0x3f2519}=_0x1a201c,_0x1a545b=_0x5f35dc,_0x1bc536=_0x19ef0e[0x0],_0x54a31c=_0x19ef0e[0x1],_0x4eedac=_0x19ef0e[0x2]||_0x5f35dc['parentSegment'];if(!_0x1bc536)return console['error'](_0x10c68f(0x336)),console[_0x10c68f(0x36c)](_0x10c68f(0x3a3)),console[_0x10c68f(0x36c)](_0x10c68f(0x32f)),0x1;if(!_0x54a31c)return console[_0x10c68f(0x36c)](_0x10c68f(0x2b9)),console['error'](_0x10c68f(0x3a3)),console[_0x10c68f(0x36c)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x4eedac)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x30a362=await withSpinner(_0x10c68f(0x1eb)+_0x4eedac+_0x10c68f(0x1fe),()=>_0x3f2519['segment'][_0x10c68f(0x274)](_0x4eedac),{'verbose':_0x5f35dc[_0x10c68f(0x382)]}),_0x432a06=_0x30a362[_0x10c68f(0x23b)],_0x49c145={'name':_0x1bc536};_0x1a545b['allowedIps']&&(_0x49c145[_0x10c68f(0x1d5)]=_0x1a545b[_0x10c68f(0x1d5)][_0x10c68f(0x270)](',')[_0x10c68f(0x375)](_0x187c92=>_0x187c92[_0x10c68f(0x310)]()));_0x1a545b['description']&&(_0x49c145['description']=_0x1a545b[_0x10c68f(0x286)]);const _0x5178bd=await withSpinner('Creating\x20token\x20\x27'+_0x1bc536+_0x10c68f(0x351)+_0x54a31c+_0x10c68f(0x1fe),()=>_0x3f2519[_0x10c68f(0x28e)]['createToken'](_0x432a06,_0x54a31c,_0x49c145),{'verbose':_0x5f35dc[_0x10c68f(0x382)]}),_0x2e1ce9=_0x5178bd[_0x10c68f(0x23b)];return console[_0x10c68f(0x36c)]('✔\x20Created\x20token\x20\x27'+_0x2e1ce9['name']+'\x27\x20with\x20ID:\x20'+_0x2e1ce9['id']),_0x2e1ce9[_0x10c68f(0x35a)]&&(console['error'](a32_0x1854cc[_0x10c68f(0x1f8)](_0x10c68f(0x254))),console[_0x10c68f(0x36c)](a32_0x1854cc[_0x10c68f(0x3ce)](_0x2e1ce9['value'])),console[_0x10c68f(0x36c)]('')),await handleSDKOutput([_0x2e1ce9],_0x5f35dc),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x3df);['description']=a32_0x29f8cc(0x248);async['execute'](_0x3852fc){const _0x177883=a32_0x29f8cc,{options:_0x3a156d,args:_0x3c68fb,tdx:_0x3c4067}=_0x3852fc,_0x5621e8=_0x3c68fb[0x0],_0x51dd7d=_0x3c68fb[0x1]||_0x3a156d[_0x177883(0x369)];if(!_0x5621e8)return console[_0x177883(0x36c)]('Error:\x20Token\x20ID\x20is\x20required'),console[_0x177883(0x36c)](_0x177883(0x362)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x51dd7d)return showParentSegmentNotSetError(_0x177883(0x353)+_0x177883(0x21d)),0x1;const _0x4af51c=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x51dd7d+_0x177883(0x1fe),()=>_0x3c4067[_0x177883(0x322)][_0x177883(0x274)](_0x51dd7d),{'verbose':_0x3a156d['verbose']}),_0x2b522c=_0x4af51c['data'],_0x45e2ab=await withSpinner('Finding\x20service\x20for\x20token...',()=>_0x3c4067[_0x177883(0x28e)][_0x177883(0x3ad)](_0x2b522c),{'verbose':_0x3a156d[_0x177883(0x382)]}),_0x58d96f=_0x45e2ab[_0x177883(0x23b)];let _0x1af484;for(const _0x134e70 of _0x58d96f){if(_0x134e70[_0x177883(0x2a2)]?.[_0x177883(0x2ec)](_0x1e0cf0=>_0x1e0cf0['id']===_0x5621e8)){_0x1af484=_0x134e70['id'];break;}}if(!_0x1af484)return console[_0x177883(0x36c)](_0x177883(0x340)+_0x5621e8+_0x177883(0x1f6)),0x1;const _0x25c77e=await withSpinner(_0x177883(0x217)+_0x5621e8+_0x177883(0x1fe),()=>_0x3c4067[_0x177883(0x28e)][_0x177883(0x228)](_0x2b522c,_0x1af484,_0x5621e8),{'verbose':_0x3a156d[_0x177883(0x382)]}),_0x2708bc=_0x25c77e[_0x177883(0x23b)];return console['error']('✔\x20Deleted\x20token\x20\x27'+(_0x2708bc[_0x177883(0x24e)]||_0x5621e8)+'\x27'),await handleSDKOutput([_0x2708bc],_0x3a156d),0x0;}}export class PSPzListCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x3e5);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x3a1);async[a32_0x29f8cc(0x352)](_0xe06379){const _0x489cb0=a32_0x29f8cc,{options:_0x14c61e,args:_0x4715ec,tdx:_0x26cd90}=_0xe06379,_0x4a4ff7=_0x4715ec[0x0]||_0x14c61e[_0x489cb0(0x369)];if(!_0x4a4ff7)return showParentSegmentNotSetError(_0x489cb0(0x256)+'\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 _0x13655f=await withSpinner(_0x489cb0(0x1eb)+_0x4a4ff7+_0x489cb0(0x1fe),()=>_0x26cd90[_0x489cb0(0x322)][_0x489cb0(0x274)](_0x4a4ff7),{'verbose':_0x14c61e[_0x489cb0(0x382)]}),_0x39c7ab=_0x13655f[_0x489cb0(0x23b)],_0x4cd0b4=await withSpinner('Listing\x20personalizations\x20for\x20\x27'+_0x4a4ff7+_0x489cb0(0x1fe),()=>_0x26cd90[_0x489cb0(0x28e)][_0x489cb0(0x343)](_0x39c7ab),{'verbose':_0x14c61e['verbose']}),_0x2c2e84=_0x4cd0b4[_0x489cb0(0x23b)];console[_0x489cb0(0x36c)](_0x489cb0(0x21f)+_0x2c2e84['length']+_0x489cb0(0x210)+(_0x2c2e84[_0x489cb0(0x207)]!==0x1?'s':''));if(_0x14c61e[_0x489cb0(0x252)]===_0x489cb0(0x293)||_0x14c61e['format']===_0x489cb0(0x3bd))await handleSDKOutput(_0x2c2e84,_0x14c61e);else{if(_0x2c2e84[_0x489cb0(0x207)]===0x0)console[_0x489cb0(0x1ec)](_0x489cb0(0x2cb));else for(const _0x18d7e9 of _0x2c2e84){console[_0x489cb0(0x1ec)](a32_0x1854cc[_0x489cb0(0x337)](_0x18d7e9['name'])+'\x20'+a32_0x1854cc[_0x489cb0(0x21a)](_0x489cb0(0x269)+_0x18d7e9['id']+')'));_0x18d7e9[_0x489cb0(0x286)]&&console['log']('\x20\x20'+a32_0x1854cc['dim'](_0x18d7e9[_0x489cb0(0x286)]));const _0x417b9c=_0x18d7e9['sections']?.['length']||0x0;console['log']('\x20\x20'+a32_0x1854cc['cyan'](_0x489cb0(0x3e2))+'\x20'+_0x417b9c);if(_0x18d7e9[_0x489cb0(0x3b4)]&&_0x18d7e9[_0x489cb0(0x3b4)][_0x489cb0(0x207)]>0x0)for(const _0xc5cf06 of _0x18d7e9[_0x489cb0(0x3b4)]){console[_0x489cb0(0x1ec)](_0x489cb0(0x236)+_0xc5cf06['name']);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x33d);[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x2e1);async[a32_0x29f8cc(0x352)](_0x34b7ed){const _0x480167=a32_0x29f8cc,{options:_0x37a3e2,args:_0x537a4,tdx:_0x1913c9}=_0x34b7ed,_0x3357ba=_0x537a4[0x0];if(!_0x3357ba)return console['error'](_0x480167(0x1d6)),console[_0x480167(0x36c)](_0x480167(0x25e)),0x1;const _0x153603=await withSpinner('Getting\x20personalization\x20\x27'+_0x3357ba+_0x480167(0x1fe),()=>_0x1913c9[_0x480167(0x28e)]['getPersonalization'](_0x3357ba),{'verbose':_0x37a3e2[_0x480167(0x382)]}),_0x1f2dfe=_0x153603[_0x480167(0x23b)];console[_0x480167(0x36c)]('✔\x20Found\x20personalization\x20\x27'+_0x1f2dfe[_0x480167(0x24e)]+'\x27');if(_0x37a3e2[_0x480167(0x252)]===_0x480167(0x293)||_0x37a3e2['format']===_0x480167(0x3bd))await handleSDKOutput([_0x1f2dfe],_0x37a3e2);else{console['log'](a32_0x1854cc[_0x480167(0x337)](_0x1f2dfe['name'])+'\x20'+a32_0x1854cc['dim'](_0x480167(0x269)+_0x1f2dfe['id']+')'));_0x1f2dfe['description']&&console[_0x480167(0x1ec)]('\x20\x20'+a32_0x1854cc[_0x480167(0x21a)](_0x1f2dfe[_0x480167(0x286)]));_0x1f2dfe[_0x480167(0x276)]&&console[_0x480167(0x1ec)]('\x20\x20'+a32_0x1854cc[_0x480167(0x3ce)](_0x480167(0x339))+'\x20'+_0x1f2dfe[_0x480167(0x276)]);console[_0x480167(0x1ec)]('\x20\x20'+a32_0x1854cc[_0x480167(0x3ce)]('created:')+'\x20'+_0x1f2dfe[_0x480167(0x3da)]),console[_0x480167(0x1ec)]('\x20\x20'+a32_0x1854cc[_0x480167(0x3ce)](_0x480167(0x2c6))+'\x20'+_0x1f2dfe[_0x480167(0x3c1)]);const _0x3be6cf=_0x1f2dfe[_0x480167(0x3b4)]?.['length']||0x0;console['log']('\x20\x20'+a32_0x1854cc[_0x480167(0x3ce)]('sections:')+'\x20'+_0x3be6cf);if(_0x1f2dfe['sections']&&_0x1f2dfe[_0x480167(0x3b4)][_0x480167(0x207)]>0x0)for(const _0x4b86c0 of _0x1f2dfe['sections']){console[_0x480167(0x1ec)](_0x480167(0x237)+a32_0x1854cc[_0x480167(0x337)](_0x4b86c0[_0x480167(0x24e)])+'\x20'+a32_0x1854cc[_0x480167(0x21a)](_0x480167(0x269)+_0x4b86c0['id']+')')),_0x4b86c0[_0x480167(0x2b1)]&&(console[_0x480167(0x1ec)](_0x480167(0x2e2)+a32_0x1854cc[_0x480167(0x3ce)](_0x480167(0x30f))+'\x20'+_0x4b86c0[_0x480167(0x2b1)][_0x480167(0x24e)]),_0x4b86c0[_0x480167(0x2b1)]['keyEventCriteria']?.[_0x480167(0x279)]&&console['log'](_0x480167(0x2a5)+a32_0x1854cc[_0x480167(0x3ce)](_0x480167(0x25c))+'\x20'+_0x4b86c0[_0x480167(0x2b1)][_0x480167(0x28f)][_0x480167(0x279)])),_0x4b86c0['payload']&&console[_0x480167(0x1ec)](_0x480167(0x2e2)+a32_0x1854cc['cyan']('payload:')+'\x20'+JSON[_0x480167(0x38d)](_0x4b86c0[_0x480167(0x265)])),_0x4b86c0[_0x480167(0x202)]&&console[_0x480167(0x1ec)](_0x480167(0x2e2)+a32_0x1854cc[_0x480167(0x3ce)](_0x480167(0x1f1))+_0x480167(0x3ba));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x245);['description']=a32_0x29f8cc(0x2e4);async[a32_0x29f8cc(0x352)](_0x381991){const _0x522614=a32_0x29f8cc,{options:_0x421790,args:_0x3550e4,tdx:_0x20f845}=_0x381991,_0x1615c0=_0x3550e4[0x0];if(!_0x1615c0)return console['error'](_0x522614(0x1d6)),console[_0x522614(0x36c)](_0x522614(0x1f9)),0x1;return await withSpinner(_0x522614(0x214)+_0x1615c0+_0x522614(0x1fe),()=>_0x20f845[_0x522614(0x28e)]['deletePersonalization'](_0x1615c0),{'verbose':_0x421790['verbose']}),console[_0x522614(0x36c)]('✔\x20Deleted\x20personalization\x20\x27'+_0x1615c0+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x200);['description']=a32_0x29f8cc(0x2eb);async[a32_0x29f8cc(0x352)](_0x51cd40){const _0x1a29f0=a32_0x29f8cc,{options:_0x246308,tdx:_0x4a3dca}=_0x51cd40,_0x2ff151=_0x246308;let _0x82a03;if(_0x2ff151[_0x1a29f0(0x2d2)]){_0x82a03=await loadJSON(_0x2ff151[_0x1a29f0(0x2d2)],!![]);if(!_0x82a03['relationships']?.[_0x1a29f0(0x243)])return console[_0x1a29f0(0x36c)]('Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.'),console[_0x1a29f0(0x36c)](_0x1a29f0(0x1f7)),console[_0x1a29f0(0x36c)](_0x1a29f0(0x380)),0x1;}else{if(!_0x2ff151['name'])return console[_0x1a29f0(0x36c)](_0x1a29f0(0x27d)),console[_0x1a29f0(0x36c)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0x1a29f0(0x36c)](_0x1a29f0(0x372)),0x1;if(_0x2ff151[_0x1a29f0(0x286)]===undefined)return console['error'](_0x1a29f0(0x297)),console[_0x1a29f0(0x36c)](_0x1a29f0(0x2a4)),console[_0x1a29f0(0x36c)](_0x1a29f0(0x372)),0x1;if(_0x2ff151[_0x1a29f0(0x2c9)]===undefined)return console[_0x1a29f0(0x36c)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console['error']('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x4905e3=_0x2ff151['audienceId'];if(!_0x4905e3&&_0x246308[_0x1a29f0(0x369)]){const _0x5433b0=await withSpinner(_0x1a29f0(0x1eb)+_0x246308[_0x1a29f0(0x369)]+_0x1a29f0(0x1fe),()=>_0x4a3dca[_0x1a29f0(0x322)][_0x1a29f0(0x274)](_0x246308[_0x1a29f0(0x369)]),{'verbose':_0x246308[_0x1a29f0(0x382)]});_0x4905e3=_0x5433b0[_0x1a29f0(0x23b)];}let _0x14afd5;_0x2ff151[_0x1a29f0(0x3b4)]&&(_0x14afd5=await loadJSON(_0x2ff151[_0x1a29f0(0x3b4)],![]));const _0x35da60=_0x2ff151[_0x1a29f0(0x2c9)]===_0x1a29f0(0x2de)?null:{'id':_0x2ff151['folderId'],'type':_0x1a29f0(0x359)};_0x82a03={'attributes':{'name':_0x2ff151[_0x1a29f0(0x24e)],'description':_0x2ff151[_0x1a29f0(0x286)]||null,..._0x4905e3!==undefined&&{'audienceId':_0x4905e3},..._0x14afd5!==undefined&&{'sections':_0x14afd5}},'relationships':{'parentFolder':{'data':_0x35da60}}};}const _0x45639b=await withSpinner(_0x1a29f0(0x2ad)+(_0x82a03[_0x1a29f0(0x234)]?.['name']??'')+_0x1a29f0(0x1fe),()=>_0x4a3dca[_0x1a29f0(0x28e)]['createPersonalization'](_0x82a03),{'verbose':_0x246308[_0x1a29f0(0x382)]}),_0x285f6f=_0x45639b[_0x1a29f0(0x23b)];return console[_0x1a29f0(0x36c)](_0x1a29f0(0x356)+_0x285f6f[_0x1a29f0(0x24e)]+'\x27\x20with\x20ID:\x20'+_0x285f6f['id']),await handleSDKOutput([_0x285f6f],_0x246308),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a32_0x29f8cc(0x24e)]=a32_0x29f8cc(0x3c9);['description']=a32_0x29f8cc(0x397);async[a32_0x29f8cc(0x352)](_0x401b1e){const _0x117b81=a32_0x29f8cc,{options:_0x5876e7,args:_0x579bbb}=_0x401b1e,_0x31993e=_0x5876e7,_0x156a88=_0x579bbb[0x0];if(!_0x156a88)return console[_0x117b81(0x36c)](_0x117b81(0x1d6)),console[_0x117b81(0x36c)](_0x117b81(0x204)),console[_0x117b81(0x36c)](_0x117b81(0x298)),0x1;let _0x31da7d;if(_0x31993e[_0x117b81(0x2d2)])_0x31da7d=await loadJSON(_0x31993e['file'],!![]);else{if(!_0x31993e[_0x117b81(0x24e)])return console[_0x117b81(0x36c)](_0x117b81(0x27d)),console['error'](_0x117b81(0x204)),0x1;if(_0x31993e[_0x117b81(0x286)]===undefined)return console[_0x117b81(0x36c)](_0x117b81(0x297)),console[_0x117b81(0x36c)](_0x117b81(0x204)),0x1;let _0x549791;_0x31993e[_0x117b81(0x3b4)]&&(_0x549791=await loadJSON(_0x31993e[_0x117b81(0x3b4)],![])),_0x31da7d={'attributes':{'name':_0x31993e[_0x117b81(0x24e)],'description':_0x31993e[_0x117b81(0x286)]||null,..._0x549791!==undefined&&{'sections':_0x549791}}};}const {tdx:_0x279856}=_0x401b1e,_0x1d2c80=await withSpinner(_0x117b81(0x255)+_0x156a88+'\x27...',()=>_0x279856['personalization'][_0x117b81(0x28b)](_0x156a88,_0x31da7d),{'verbose':_0x5876e7[_0x117b81(0x382)]}),_0x2af094=_0x1d2c80[_0x117b81(0x23b)];return console['error'](_0x117b81(0x34c)+_0x2af094[_0x117b81(0x24e)]+'\x27\x20(id:\x20'+_0x2af094['id']+')'),await handleSDKOutput([_0x2af094],_0x5876e7),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']='ps:pz:init';[a32_0x29f8cc(0x286)]=a32_0x29f8cc(0x1e6);async[a32_0x29f8cc(0x352)](_0x4819e8){const _0x246a15=a32_0x29f8cc,{options:_0x49e47c,args:_0x2f0d6b}=_0x4819e8,_0x571579=_0x2f0d6b[0x0]||_0x49e47c['parentSegment'];if(!_0x571579)return showParentSegmentNotSetError(_0x246a15(0x1f3)+_0x246a15(0x1e4)),0x1;const _0x253bf5=resolveYamlFile(_0x571579);if(!existsSync(_0x253bf5))return showFileNotFoundError(_0x253bf5,_0x571579),0x1;let _0x11750d;try{_0x11750d=readFileSync(_0x253bf5,_0x246a15(0x3dd));}catch(_0x1a5509){const _0xbe6beb=_0x1a5509 instanceof Error?_0x1a5509[_0x246a15(0x1da)]:String(_0x1a5509);return console[_0x246a15(0x36c)](_0x246a15(0x333)+_0xbe6beb),0x1;}let _0x335824;try{_0x335824=parseDef(_0x11750d);}catch(_0x372858){const _0x5f3369=_0x372858 instanceof Error?_0x372858[_0x246a15(0x1da)]:String(_0x372858);return console[_0x246a15(0x36c)](a32_0x1854cc[_0x246a15(0x304)](_0x246a15(0x261)+_0x5f3369)),0x1;}if(_0x335824[_0x246a15(0x2ca)]&&_0x335824[_0x246a15(0x2ca)]['length']>0x0)return console['error'](a32_0x1854cc[_0x246a15(0x1f8)](_0x246a15(0x26c)+_0x253bf5)),console[_0x246a15(0x36c)](a32_0x1854cc['dim']('\x20\x20\x20'+_0x335824['personalization_services']['length']+_0x246a15(0x2d5))),0x1;!_0x335824[_0x246a15(0x35d)]&&(_0x335824[_0x246a15(0x35d)]={'events':[{'name':'page_view','source_table':_0x246a15(0x3b2)}],'attributes':[{'name':_0x246a15(0x208),'type':'single'}],'id_stitching':{'primary_key':_0x335824[_0x246a15(0x22f)][_0x246a15(0x295)]==='customers'?_0x246a15(0x1e9):_0x246a15(0x1d0)}});_0x335824[_0x246a15(0x2ca)]=[{'name':_0x246a15(0x29d),'description':'Personalization\x20service\x20description','trigger_event':_0x246a15(0x37c),'sections':[{'name':_0x246a15(0x39e),'criteria':_0x246a15(0x25b),'attributes':['last_page_viewed']}]}];const _0x156d62=serializeDef(_0x335824);return writeFileSync(_0x253bf5,_0x156d62,_0x246a15(0x3dd)),console['error'](a32_0x1854cc[_0x246a15(0x374)]('✔')+_0x246a15(0x2f8)+a32_0x1854cc[_0x246a15(0x3ce)](_0x253bf5)),(!_0x335824[_0x246a15(0x35d)]||_0x11750d['indexOf'](_0x246a15(0x24f))===-0x1)&&console[_0x246a15(0x36c)](a32_0x1854cc[_0x246a15(0x374)]('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console[_0x246a15(0x36c)]('\x0a'+a32_0x1854cc[_0x246a15(0x21a)](_0x246a15(0x1ea))),console[_0x246a15(0x36c)](_0x246a15(0x318)+_0x253bf5+_0x246a15(0x32e)),console[_0x246a15(0x36c)](_0x246a15(0x389)+a32_0x1854cc['dim'](_0x246a15(0x342)+_0x571579)+_0x246a15(0x2be)),0x0;}}