@treasuredata/tdx 2026.4.2 → 2026.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-pull-command.js +1 -1
  43. package/dist/commands/segment-push-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segment-validate-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/status-command.js +1 -1
  50. package/dist/commands/tables.js +1 -1
  51. package/dist/commands/unset-command.js +1 -1
  52. package/dist/commands/upgrade-command.js +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/user-command.js +1 -1
  55. package/dist/commands/work-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/oauth-keychain.js +1 -1
  66. package/dist/core/oauth.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/core/version.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/mcp/server.js +1 -1
  74. package/dist/mcp/tools/index.js +1 -1
  75. package/dist/mcp/tools/tdx-run.js +1 -1
  76. package/dist/mcp/tools/tdx-search.js +1 -1
  77. package/dist/mcp/tools/work-create-item.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/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 a31_0xfeae4b=a31_0x5927;(function(_0x46c1f0,_0x5daf62){const _0x8e7c4=a31_0x5927,_0x1e628f=_0x46c1f0();while(!![]){try{const _0x3278c4=parseInt(_0x8e7c4(0x270))/0x1*(parseInt(_0x8e7c4(0x329))/0x2)+-parseInt(_0x8e7c4(0x1d8))/0x3+parseInt(_0x8e7c4(0x228))/0x4*(-parseInt(_0x8e7c4(0x28e))/0x5)+parseInt(_0x8e7c4(0x1fa))/0x6*(-parseInt(_0x8e7c4(0x293))/0x7)+parseInt(_0x8e7c4(0x281))/0x8*(-parseInt(_0x8e7c4(0x308))/0x9)+parseInt(_0x8e7c4(0x1c1))/0xa*(parseInt(_0x8e7c4(0x24d))/0xb)+-parseInt(_0x8e7c4(0x1ec))/0xc*(parseInt(_0x8e7c4(0x353))/0xd);if(_0x3278c4===_0x5daf62)break;else _0x1e628f['push'](_0x1e628f['shift']());}catch(_0x2e5cec){_0x1e628f['push'](_0x1e628f['shift']());}}}(a31_0x498e,0xb5a1f));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x31223a from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a31_0x2e332c from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a31_0xfeae4b(0x257),LEGACY_PARENT_SEGMENT_DIR=a31_0xfeae4b(0x2bf);function openBrowser(_0xab0ff5){const _0x91a028=a31_0xfeae4b,_0x5b552e=process[_0x91a028(0x19b)],_0x261828=_0x5b552e===_0x91a028(0x303)?_0x91a028(0x24c):_0x5b552e===_0x91a028(0x1af)?_0x91a028(0x32d):_0x91a028(0x181);spawn(_0x261828,[_0xab0ff5],{'detached':!![],'stdio':'ignore'})['unref']();}function a31_0x498e(){const _0x4277a0=['Rows:','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','sourceTableValid','eventKind','Deleting\x20personalization\x20\x27','Updated','status','true','Coverage:','Validating\x20RT\x20configuration...','\x20total','resolveParentId','segment:parent:run','Schema\x20saved\x20to\x20','stop','\x0a\x20\x20]\x0a}\x0a','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','replace','228QSrjGX','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','\x20behaviors','description','behaviors','dim','No\x20personalizations\x20configured','createParent','\x20kill','RT\x20Journey\x20ID:\x20','Creating','Error:\x20File\x20not\x20found:\x20','SQL\x20query:\x0a','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','Preview:','Error:\x20Token\x20\x27','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','⚡\x20Enabled','tdx\x20ps\x20preview\x20','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Name:\x20','localeCompare','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','listJourneys','Parent\x20segment:\x20','execute','segment:parent:list','Update\x20a\x20realtime\x20personalization\x20entity','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\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','file','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','open','1169465idSytW','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','number','Options:\x0a','join','Listing\x20parent\x20segments...','coveragePercent','👥\x20','\x0aUsage:\x20tdx\x20ps\x20preview\x20','customersWithEvents','parent_segments','.yml','\x20No\x20changes\x20-\x20','red','\x22,\x20\x22type\x22:\x20\x22','name','\x27\x20is\x20up\x20to\x20date','sampleData','all','✔\x20No\x20changes\x20-\x20\x27','audienceId','\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','bold','ps:pz:service:update','Delete\x20a\x20personalization\x20service','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','events','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','includeSensitive:','Errors:','trim','behavior','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','stats','idStitching','4021XVOMxF','\x20\x20Note:\x20','\x0a✔\x20Workflow\x20started','rowCount','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','updateParent','scheduleType','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Source:','deletePersonalization','\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','No\x20RT\x20journeys\x20found','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','folder-segment','run','Get\x20current\x20RT\x20configuration\x20version\x20status','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','4191424BReiYJ','entryCriteria','state','✔\x20Updated\x20personalization\x20service\x20\x27','Error\x20parsing\x20YAML:\x20','\x20--attribute\x20\x22','Updating\x20parent\x20segment\x20\x27','Behavior:','Join\x20on:','Create\x20parent\x20segment\x20\x27','\x20--enriched','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','displayColumns','10250vyjLoK','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','To\x20view\x20sample\x20data:','\x27...','\x20\x202.\x20Run\x20','14aJNXKu','joinKey','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','Creating\x20parent\x20segment\x20\x27','limit','Apply\x20changes\x20to\x20\x27','YAML\x20file:\x20','behavior_','\x0aNew\x20parent\x20segment\x20\x27','green','ps:rt:jn:resume','schemaValid','Show\x20parent\x20segment\x20details','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\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','\x20\x20Database:\x20','workflowAttemptId','\x20service','sort','interval','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','getBehaviorNames','utf-8','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','ps:rt:validate','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','timezone','\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','Executing\x20parent\x20segment\x20query...','(id:\x20','getOutputDatabaseName','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','page_view','\x0a\x20\x20\x20\x20]','sections','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','\x20=\x20','identifier:\x20','Deleting\x20personalization\x20service\x20\x27','createdAt','Error:\x20Personalization\x20ID\x20is\x20required','No\x20parent\x20segments\x20match\x20pattern:\x20','personalization_services','parent_segment','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','format','\x20--attribute\x20\x22<name>\x22','value','primaryKey','\x20--interval\x20','updated:','no\x20tokens\x20configured','displaySampleData','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','Output\x20Database:','setJobId','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','type','json','tokens','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','getParentSQL','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Personalization:','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\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','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','segment:parent:create','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','\x20parent\x20segment\x20\x27','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','/sessions/','Creating\x20personalization\x20\x27','apply','stageCount','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','sections:','\x0a\x20\x20\x20\x20}','listPersonalizations','✔\x20Found\x20','column','ps:pz:delete','/\x20directory.\x0a','Fetching\x20customers\x20schema...','parent_id','Found\x20YAML\x20file:\x20','length','population','\x20rows\x20','createToken','enriched','\x20to\x20push\x20the\x20configuration','displayAttributesStats','filter','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','allowed\x20IPs:','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','Error:\x20--attribute\x20requires\x20a\x20name\x0a','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','\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','customerGroup','parentSegment','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','payload','\x20is\x20already\x20up\x20to\x20date','ps:pz:list','ps:rt:configuration_versions','database','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','darwin','jobId','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','\x27\x20with\x20ID:\x20','18WiKALN','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Behaviors','Attempt:','\x20RT\x20configuration\x20is\x20valid','text','query','Events:','SELECT\x20*\x20FROM\x20(\x0a','pauseJourney','customers','workflowId','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','\x27\x20(id:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','delete','getParentFull','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','\x20RT\x20journey','✔\x20Updated\x20personalization\x20\x27','✔\x20Found\x20personalization\x20\x27','\x0aError:','Fetching\x20SQL\x20for\x20\x27','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','\x20\x20Tables:\x201\x20customers\x20+\x20','customerPercent','Error:\x20Token\x20name\x20is\x20required','Enriched:','table','590XZGfoc','ps:pz:init','toFixed','\x20(paused)','start','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','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','segment','Aborted.','/\x20directories\x20exist.','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','last_page_viewed','push','displayBehaviorsStats','yes','segment:parent:push','\x20Context\x20set:\x20','/{name}.yml\x0a','data','List\x20parent\x20segments','preview','ps:pz:service:token:create','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','Fetching\x20parent\x20segment\x20\x27','List\x20RT\x20journeys','%)\x20','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','behaviorsFile','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','public:','\x20tdx\x20wf\x20attempt\x20','addAttributesFile','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','Updating','segment:parent:desc','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Finding\x20service\x20for\x20token...','Error:\x20--database\x20and\x20--table\x20are\x20required','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','verbose','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','-1d','39dazBuY','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','previewParentYaml','getPersonalization','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','schemaError','dirname','Site:\x20','✔\x20Deleted\x20personalization\x20service\x20\x27','label','repeat','Creating\x20personalization\x20service\x20\x27','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\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','\x22\x20}','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','use','relationships','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','Updating\x20personalization\x20service\x20\x27','stitchingKeys','\x20true','Getting\x20personalization\x20\x27','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','ps:rt:jn:pause','ps:pz:patch','resumeJourney','No\x20parent\x20segments\x20found','realtime:','launched','RT\x202.0:','Error:\x20--name\x20is\x20required','\x20to\x20configure\x20your\x20personalization\x20service','\x20configured','Error\x20reading\x20file:\x20','toLocaleString','allowedIps','workflowSessionId','folderId','attribute','\x27\x20for\x20service\x20\x27','realtime_enabled','displayPreviewHints','Available\x20behaviors:','Personalization\x20service\x20description','Analyzing\x20changes...','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','string','columns','<database>.<table>','column_name','session','Master:','Deleting\x20token\x20\x27','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','foreignKey','\x20personalization\x20service','/\x20→\x20','Join:','\x20\x201.\x20Edit\x20','matchedCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','collectSchema','single','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','Created','column_type','Validating\x20configuration...','personalization','test','\x0a⚠️\x20\x20Migrating:\x20','indexOf','personalizationServices','ps:pz:service:show','✘\x20Failed\x20to\x20rename\x20directory:\x20','audienceId:','ps:rt:list','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','ps:pz:service:delete','Available\x20attributes:','Resume\x20activations\x20in\x20an\x20RT\x20journey','some','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','No\x20personalization\x20services\x20configured','\x20Added\x20RT\x202.0\x20template\x20section','using\x20the\x20default\x20path:\x20','\x0aChanges\x20to\x20\x27','\x0aNo\x20sample\x20data\x20available','displaySummary','\x20\x20Columns:\x20','varchar','\x20[Job\x20ID:\x20','xdg-open','\x20\x20\x20\x20','web','enabled','Create\x20a\x20realtime\x20personalization\x20entity','`\x20to\x20download\x20the\x20configuration\x20first','segment:parent:view','.yaml','td_client_id','displayValidateResults','parentFolder','sourceTableError','\x27\x20and\x20run\x20workflow?','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','scheduleOption','Error:\x20Parent\x20segment\x20name\x20is\x20required','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Get\x20SQL\x20query\x20for\x20parent\x20segment','site','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','displayPreviewResults','yellow','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','totalEvents','\x20\x20\x20','segment:parent:validate','platform','Resolving\x20parent\x20segment\x20\x27','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x20rows)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','ps:rt:jn:list','log','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','Error:\x20Service\x20name\x20is\x20required','Listing\x20parent\x20segments\x20matching\x20\x27','\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','toLowerCase','deleteToken','identifier','id:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','\x20Configuration\x20is\x20valid','keyEventId:','updatedAt','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','win32','Listing\x20fields\x20for\x20\x27','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','endsWith','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','list','Options:','Columns:','ps:pz:service:token:delete','listParents','cyan','✔\x20Query\x20completed:\x20Processed\x20','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','List\x20available\x20fields\x20for\x20segmentation','patch','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','130lHLmha','Pause\x20activations\x20in\x20an\x20RT\x20journey','patchPersonalization','No\x20RT-enabled\x20parent\x20segments\x20found','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','ps:pz:create','Fetching\x20behavior\x20list...','Customers:','Delete\x20a\x20realtime\x20personalization','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','\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','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','Overwrite\x20\x27','runParent','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Options\x20(one\x20required):\x0a','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','Error:\x20Token\x20ID\x20is\x20required','null','✔\x20Updated\x20parent\x20segment\x20\x27','⚡\x20Not\x20enabled','925884iBGQhn','information_schema','Patching\x20personalization\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','output','SELECT\x20*\x20FROM\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','any','/app/dw/parentSegments/','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','includeSensitive','validateParentYaml','formatSchemaJson','\x20--behavior\x20\x22','pullParentYaml','Attributes:','\x20field','message','displayMasterInfo','isDirectory','466836xujQWh','\x5c$&','Error:\x20Service\x20ID\x20is\x20required','addAttributes','paused','\x20Added\x20personalization\x20template\x20to\x20','errors','master','keyEventId','eventKind:\x20','realtime','.customers)','public','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','702840uDOyCh','\x20\x20\x20\x20-\x20','error','Master\x20Table','token:','Listing\x20RT\x20journeys\x20for\x20\x27','attributes','stringify','Error:','To\x20cancel:','Listing\x20personalizations\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','allValid','\x20personalization','✔\x20Retrieved\x20RT\x20configuration\x20version','\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','\x0a⚠️\x20\x20Both\x20','Audience\x20ID:','map','Show\x20a\x20specific\x20realtime\x20personalization','match','segment:parent:preview','keyEventCriteria','Attribute:','jsonl','in\x20','getCurrentConfigVersion'];a31_0x498e=function(){return _0x4277a0;};return a31_0x498e();}function migrateLegacyDirectory(){const _0x3459ad=a31_0xfeae4b;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x2fcbe1=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x2fcbe1[_0x3459ad(0x1eb)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x3459ad(0x1fc)](a31_0x2e332c[_0x3459ad(0x196)](_0x3459ad(0x20b)+LEGACY_PARENT_SEGMENT_DIR+'/\x20and\x20'+PARENT_SEGMENT_DIR+_0x3459ad(0x332))),console[_0x3459ad(0x1fc)](a31_0x2e332c[_0x3459ad(0x231)](_0x3459ad(0x1a2)+LEGACY_PARENT_SEGMENT_DIR+_0x3459ad(0x2e6))),![];console[_0x3459ad(0x1fc)](a31_0x2e332c[_0x3459ad(0x196)](_0x3459ad(0x16b)+LEGACY_PARENT_SEGMENT_DIR+_0x3459ad(0x15e)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x3459ad(0x1fc)](a31_0x2e332c['green']('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x52f16a){const _0x29c00e=_0x52f16a instanceof Error?_0x52f16a[_0x3459ad(0x1e9)]:String(_0x52f16a);return console[_0x3459ad(0x1fc)](a31_0x2e332c[_0x3459ad(0x25a)](_0x3459ad(0x16f)+_0x29c00e+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0xfeae4b(0x27e)](_0x2117d3){const _0x233a15=a31_0xfeae4b;return migrateLegacyDirectory(),super[_0x233a15(0x27e)](_0x2117d3);}}function resolveYamlFile(_0x881696){const _0x1dba64=a31_0xfeae4b;if(_0x881696[_0x1dba64(0x1b2)](_0x1dba64(0x258))||_0x881696[_0x1dba64(0x1b2)](_0x1dba64(0x188)))return _0x881696;return a31_0x31223a['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x881696)+_0x1dba64(0x258));}function formatProgressMessage(_0x3fc4de){const _0x8f6ebe=a31_0xfeae4b,_0x44a919=_0x3fc4de[_0x8f6ebe(0x20f)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x44a919){const [,_0x265cd0,_0x43da10,_0x2385b1='']=_0x44a919;return a31_0x2e332c[_0x8f6ebe(0x231)](_0x265cd0+':')+'\x20'+_0x43da10+a31_0x2e332c[_0x8f6ebe(0x231)](_0x2385b1);}return a31_0x2e332c[_0x8f6ebe(0x231)](_0x3fc4de);}function showFileNotFoundError(_0x480f78,_0x563f47){const _0x2789dd=a31_0xfeae4b;console[_0x2789dd(0x1fc)](a31_0x2e332c[_0x2789dd(0x25a)](_0x2789dd(0x237)+_0x480f78+'\x0a')),console[_0x2789dd(0x1fc)](a31_0x2e332c[_0x2789dd(0x1b9)]('Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20'+_0x563f47+_0x2789dd(0x186)));}function displayRealtimeValidation(_0x4871d3){const _0x4e1d20=a31_0xfeae4b;if(!_0x4871d3[_0x4e1d20(0x1f6)])return;const _0x2b9ad2=_0x4871d3[_0x4e1d20(0x1f6)],_0x350ad1=_0x2b9ad2[_0x4e1d20(0x184)]?a31_0x2e332c['green'](_0x4e1d20(0x23d)):a31_0x2e332c[_0x4e1d20(0x196)](_0x4e1d20(0x1d7));console[_0x4e1d20(0x1fc)]('\x0a'+a31_0x2e332c[_0x4e1d20(0x231)](_0x4e1d20(0x371))+'\x20'+_0x350ad1);if(_0x2b9ad2[_0x4e1d20(0x267)]&&_0x2b9ad2[_0x4e1d20(0x267)][_0x4e1d20(0x2ea)]>0x0){console[_0x4e1d20(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x4e1d20(0x311))+'\x20'+_0x2b9ad2[_0x4e1d20(0x267)][_0x4e1d20(0x2ea)]+_0x4e1d20(0x374));for(const _0x42fe12 of _0x2b9ad2[_0x4e1d20(0x267)]){const _0x57289e=_0x42fe12[_0x4e1d20(0x218)]===![]?a31_0x2e332c[_0x4e1d20(0x25a)]('✘'):a31_0x2e332c['green']('✔');console[_0x4e1d20(0x1fc)](_0x4e1d20(0x182)+_0x57289e+'\x20'+_0x42fe12[_0x4e1d20(0x25c)]),_0x42fe12['sourceTableError']&&console['error'](_0x4e1d20(0x209)+a31_0x2e332c['red'](_0x42fe12[_0x4e1d20(0x18c)]));}}if(_0x2b9ad2[_0x4e1d20(0x200)]&&_0x2b9ad2[_0x4e1d20(0x200)][_0x4e1d20(0x2ea)]>0x0){console[_0x4e1d20(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x4e1d20(0x1e7))+'\x20'+_0x2b9ad2[_0x4e1d20(0x200)]['length']+_0x4e1d20(0x374));for(const _0x211f74 of _0x2b9ad2[_0x4e1d20(0x200)]){const _0x42ada9=_0x211f74['valid']?a31_0x2e332c[_0x4e1d20(0x29c)]('✔'):a31_0x2e332c[_0x4e1d20(0x25a)]('✘');console['error']('\x20\x20\x20\x20'+_0x42ada9+'\x20'+_0x211f74['name']+'\x20'+a31_0x2e332c[_0x4e1d20(0x231)]('('+_0x211f74[_0x4e1d20(0x2cd)]+')'));}}if(_0x2b9ad2[_0x4e1d20(0x26f)]){const _0xf52337=_0x2b9ad2[_0x4e1d20(0x26f)][_0x4e1d20(0x367)]?.[_0x4e1d20(0x2ea)]?'\x20+\x20['+_0x2b9ad2['idStitching'][_0x4e1d20(0x367)][_0x4e1d20(0x251)](',\x20')+']':'';console[_0x4e1d20(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x4e1d20(0x231)]('ID\x20Stitching:')+'\x20'+_0x2b9ad2['idStitching'][_0x4e1d20(0x2c4)]+_0xf52337);}if(_0x2b9ad2[_0x4e1d20(0x16d)]&&_0x2b9ad2[_0x4e1d20(0x16d)][_0x4e1d20(0x2ea)]>0x0){console['error']('\x20\x20'+a31_0x2e332c[_0x4e1d20(0x231)](_0x4e1d20(0x2d3))+'\x20'+_0x2b9ad2['personalizationServices']['length']+_0x4e1d20(0x2a4)+(_0x2b9ad2['personalizationServices'][_0x4e1d20(0x2ea)]!==0x1?'s':''));for(const _0x4989a8 of _0x2b9ad2[_0x4e1d20(0x16d)]){console[_0x4e1d20(0x1fc)](_0x4e1d20(0x1fb)+_0x4989a8[_0x4e1d20(0x25c)]);}}}function showParentSegmentNotSetError(_0xcbe2e){const _0x17b9de=a31_0xfeae4b;console[_0x17b9de(0x1fc)](a31_0x2e332c[_0x17b9de(0x196)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a')),console['error'](_0xcbe2e);}export class ParentSegmentListCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x246);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x33c);async['execute'](_0x9108ea){const _0x278b77=a31_0xfeae4b,{options:_0x28d38b,args:_0x2bed11,tdx:_0x2a8476}=_0x9108ea,_0x136135=_0x2bed11[0x0];_0x28d38b['verbose']&&(console['error']('Site:\x20'+_0x28d38b[_0x278b77(0x193)]),_0x136135&&console[_0x278b77(0x1fc)]('Pattern:\x20'+_0x136135));const _0x23a131=await withSpinner(_0x136135?_0x278b77(0x1a4)+_0x136135+_0x278b77(0x291):_0x278b77(0x252),()=>_0x2a8476[_0x278b77(0x330)][_0x278b77(0x1b8)](),{'verbose':_0x28d38b[_0x278b77(0x350)]});let _0x289750=_0x23a131[_0x278b77(0x33b)];if(_0x136135){const _0x1b6101=_0x136135[_0x278b77(0x227)](/[.+^${}()|[\]\\]/g,_0x278b77(0x1ed))[_0x278b77(0x227)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x4796ad=new RegExp('^'+_0x1b6101+'$','i');_0x289750=_0x289750[_0x278b77(0x2f1)](_0xe95690=>_0x4796ad['test'](_0xe95690['attributes'][_0x278b77(0x25c)]));}_0x289750[_0x278b77(0x2a5)]((_0xc3c480,_0x3b1756)=>_0xc3c480[_0x278b77(0x200)][_0x278b77(0x25c)][_0x278b77(0x241)](_0x3b1756['attributes']['name'])),console[_0x278b77(0x1fc)](_0x278b77(0x2e3)+_0x289750['length']+'\x20parent\x20segment'+(_0x289750[_0x278b77(0x2ea)]!==0x1?'s':''));const _0x36e76f=_0x563a27=>{const _0x44f71d=_0x278b77;return getConsoleNextUrl(_0x28d38b[_0x44f71d(0x193)],'/app/dw/parentSegments/'+_0x563a27);};if(_0x28d38b[_0x278b77(0x2c1)]===_0x278b77(0x2ce)||_0x28d38b['format']===_0x278b77(0x213)){const _0x9bec79=_0x289750['map'](_0x517638=>({..._0x517638,'url':_0x36e76f(_0x517638['id'])}));await handleSDKOutput(_0x9bec79,_0x28d38b);}else{if(_0x289750[_0x278b77(0x2ea)]===0x0)_0x136135?console['log'](_0x278b77(0x2bd)+_0x136135):console[_0x278b77(0x1a1)](_0x278b77(0x36e));else for(const _0x46c06d of _0x289750){const _0x5897ac=_0x46c06d[_0x278b77(0x200)][_0x278b77(0x2eb)]?a31_0x2e332c[_0x278b77(0x231)]('\x20('+formatRows(_0x46c06d['attributes'][_0x278b77(0x2eb)])+')'):'',_0x53f0bf=hyperlink(_0x46c06d[_0x278b77(0x200)][_0x278b77(0x25c)],_0x36e76f(_0x46c06d['id']));console['log'](_0x278b77(0x254)+_0x53f0bf+_0x5897ac);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x2d7);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x266);async[a31_0xfeae4b(0x245)](_0x422c03){const _0x3b1234=a31_0xfeae4b,{options:_0x237ef1,args:_0x403dac,tdx:_0x1f09ac}=_0x422c03;console[_0x3b1234(0x1fc)](_0x3b1234(0x1cc)+_0x3b1234(0x2d0)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x4343ba=_0x237ef1;if(_0x403dac[_0x3b1234(0x2ea)]===0x0)return console[_0x3b1234(0x1fc)](a31_0x2e332c[_0x3b1234(0x25a)](_0x3b1234(0x190))),console[_0x3b1234(0x1fc)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;const _0x257099=_0x403dac[0x0];if(!_0x4343ba[_0x3b1234(0x301)]||!_0x4343ba[_0x3b1234(0x328)])return console['error'](_0x3b1234(0x34e)),console[_0x3b1234(0x1fc)](_0x3b1234(0x172)),0x1;_0x4343ba['verbose']&&(console[_0x3b1234(0x1fc)](_0x3b1234(0x35a)+_0x4343ba[_0x3b1234(0x193)]),console[_0x3b1234(0x1fc)](_0x3b1234(0x240)+_0x257099),console[_0x3b1234(0x1fc)]('Database:\x20'+_0x4343ba[_0x3b1234(0x301)]),console[_0x3b1234(0x1fc)]('Table:\x20'+_0x4343ba[_0x3b1234(0x328)]));const _0x3d8000=await loadJSONFromOptions(_0x4343ba['attributes'],_0x4343ba['attributesFile']),_0x5e5a3c=await loadJSONFromOptions(_0x4343ba[_0x3b1234(0x230)],_0x4343ba[_0x3b1234(0x344)]),_0x270fd0=await loadJSONFromOptions(_0x4343ba['customerGroup'],_0x4343ba['customerGroupFile']),_0x46dfa5={'name':_0x257099,'description':_0x4343ba[_0x3b1234(0x22f)],'scheduleType':_0x4343ba[_0x3b1234(0x276)],'scheduleOption':_0x4343ba[_0x3b1234(0x18f)],'timezone':_0x4343ba[_0x3b1234(0x2ae)],'master':{'parentDatabaseName':_0x4343ba[_0x3b1234(0x301)],'parentTableName':_0x4343ba['table']},'attributes':_0x3d8000,'behaviors':_0x5e5a3c,'customerGroup':_0x270fd0},_0x4d6993=await withSpinner(_0x3b1234(0x296)+_0x257099+_0x3b1234(0x291),()=>_0x1f09ac['segment'][_0x3b1234(0x233)](_0x46dfa5),{'verbose':_0x237ef1['verbose']}),_0x5769be=_0x4d6993[_0x3b1234(0x33b)];return console[_0x3b1234(0x1fc)]('✔\x20Created\x20parent\x20segment\x20\x27'+_0x5769be[_0x3b1234(0x25c)]+_0x3b1234(0x307)+_0x5769be['id']),await handleSDKOutput([_0x5769be],_0x237ef1),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']='segment:parent:update';['description']=a31_0xfeae4b(0x30b);async[a31_0xfeae4b(0x245)](_0x56dee0){const _0x570444=a31_0xfeae4b,{options:_0x5c5539,args:_0x2468a0,tdx:_0x429316}=_0x56dee0;console[_0x570444(0x1fc)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a'+_0x570444(0x2d0)+_0x570444(0x2ad));const _0x46cca1=_0x5c5539;if(_0x2468a0[_0x570444(0x2ea)]===0x0)return console['error'](a31_0x2e332c[_0x570444(0x25a)](_0x570444(0x190))),console[_0x570444(0x1fc)](_0x570444(0x1c5)),0x1;const _0x83b1a5=_0x2468a0[0x0];_0x46cca1[_0x570444(0x350)]&&(console[_0x570444(0x1fc)](_0x570444(0x35a)+_0x46cca1[_0x570444(0x193)]),console['error'](_0x570444(0x244)+_0x83b1a5));const _0x283037=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x83b1a5+_0x570444(0x291),()=>_0x429316['segment'][_0x570444(0x31c)](_0x83b1a5),{'verbose':_0x46cca1[_0x570444(0x350)]}),_0x3f3eb4=_0x283037[_0x570444(0x33b)],_0x2c2552=await loadJSONFromOptions(_0x46cca1[_0x570444(0x1ef)],_0x46cca1[_0x570444(0x348)]),_0x582e31=await loadJSONFromOptions(_0x46cca1['addBehaviors'],_0x46cca1['addBehaviorsFile']),_0x43656f={'name':_0x3f3eb4[_0x570444(0x25c)],'description':_0x46cca1['description']!==undefined?_0x46cca1[_0x570444(0x22f)]:_0x3f3eb4[_0x570444(0x22f)],'scheduleType':_0x46cca1[_0x570444(0x276)]!==undefined?_0x46cca1['scheduleType']:_0x3f3eb4[_0x570444(0x276)],'scheduleOption':_0x46cca1['scheduleOption']!==undefined?_0x46cca1[_0x570444(0x18f)]:_0x3f3eb4[_0x570444(0x18f)],'timezone':_0x46cca1['timezone']!==undefined?_0x46cca1[_0x570444(0x2ae)]:_0x3f3eb4['timezone'],'master':_0x3f3eb4[_0x570444(0x1f3)],'attributes':_0x2c2552?[..._0x3f3eb4[_0x570444(0x200)]||[],..._0x2c2552]:_0x3f3eb4[_0x570444(0x200)],'behaviors':_0x582e31?[..._0x3f3eb4['behaviors']||[],..._0x582e31]:_0x3f3eb4[_0x570444(0x230)],'customerGroup':_0x3f3eb4[_0x570444(0x2f9)]},_0x1db379=await withSpinner(_0x570444(0x287)+_0x83b1a5+_0x570444(0x291),()=>_0x429316[_0x570444(0x330)][_0x570444(0x275)](_0x83b1a5,_0x43656f),{'verbose':_0x46cca1[_0x570444(0x350)]}),_0xc5caab=_0x1db379[_0x570444(0x33b)];return console[_0x570444(0x1fc)](_0x570444(0x1d6)+_0xc5caab['name']+'\x27'),await handleSDKOutput([_0xc5caab],_0x46cca1),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']='segment:parent:pull';[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x28f);async['execute'](_0xfed413){const _0x13847f=a31_0xfeae4b,{options:_0x3dacce,args:_0x5d6bea,tdx:_0x4f28f2}=_0xfed413,_0x5635c1=_0x3dacce,_0x4e221c=_0x5d6bea[0x0]||_0x3dacce[_0x13847f(0x2fa)];if(!_0x4e221c)return showParentSegmentNotSetError(_0x13847f(0x349)+_0x13847f(0x345)),0x1;if(_0x5635c1[_0x13847f(0x363)]&&_0x5635c1[_0x13847f(0x1dc)])return console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x25a)](_0x13847f(0x1d2))),console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x231)](_0x13847f(0x239))),console['error'](a31_0x2e332c[_0x13847f(0x231)](_0x13847f(0x17a)+PARENT_SEGMENT_DIR+_0x13847f(0x33a))),console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x1b9)](_0x13847f(0x317))),0x1;const _0x2ee65e=_0x5635c1[_0x13847f(0x1dc)]||a31_0x31223a[_0x13847f(0x251)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x4e221c)+_0x13847f(0x258));_0x5635c1[_0x13847f(0x350)]&&(console[_0x13847f(0x1fc)](_0x13847f(0x35a)+_0x5635c1['site']),console[_0x13847f(0x1fc)]('Parent\x20segment:\x20'+_0x4e221c),console[_0x13847f(0x1fc)]('Output\x20file:\x20'+_0x2ee65e));const _0x5a3474=await withSpinner(_0x13847f(0x340)+_0x4e221c+'\x27...',()=>_0x4f28f2[_0x13847f(0x330)][_0x13847f(0x1e6)](_0x4e221c),{'verbose':_0x5635c1[_0x13847f(0x350)]}),_0x26e7d0=_0x5a3474[_0x13847f(0x33b)];if(existsSync(_0x2ee65e)){const _0x58164e=readFileSync(_0x2ee65e,_0x13847f(0x2aa)),_0x4790a8=generateDiff(_0x58164e,_0x26e7d0);if(!hasChanges(_0x4790a8))console[_0x13847f(0x1fc)](a31_0x2e332c['green']('✔')+_0x13847f(0x259)+a31_0x2e332c[_0x13847f(0x1b9)](_0x2ee65e)+_0x13847f(0x2fe));else{console[_0x13847f(0x1fc)](_0x13847f(0x17b)+_0x2ee65e+'\x27:'),console['error']('─'[_0x13847f(0x35d)](0x3c)),console[_0x13847f(0x1fc)](formatDiffWithColors(_0x4790a8)),console[_0x13847f(0x1fc)]('─'[_0x13847f(0x35d)](0x3c));if(!_0x5635c1[_0x13847f(0x337)]){if(!isInteractive())return console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x25a)](_0x13847f(0x321)),_0x13847f(0x1f9)),console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x231)](_0x13847f(0x1cf))),0x1;const _0x245acf=await confirmKey(_0x13847f(0x1cd)+_0x2ee65e+'\x27?');if(!_0x245acf)return console[_0x13847f(0x1fc)](a31_0x2e332c['yellow']('Aborted.')),0x1;}writeFileSync(_0x2ee65e,_0x26e7d0,_0x13847f(0x2aa)),console[_0x13847f(0x1fc)](a31_0x2e332c[_0x13847f(0x29c)]('✔')+_0x13847f(0x24e)+a31_0x2e332c['cyan'](_0x2ee65e));}}else{const _0x363960=a31_0x31223a[_0x13847f(0x359)](_0x2ee65e);!existsSync(_0x363960)&&mkdirSync(_0x363960,{'recursive':!![]}),writeFileSync(_0x2ee65e,_0x26e7d0,_0x13847f(0x2aa)),console[_0x13847f(0x1fc)](a31_0x2e332c['green']('✔')+_0x13847f(0x24e)+a31_0x2e332c[_0x13847f(0x1b9)](_0x2ee65e));}return saveSessionContext({'parent_segment':_0x4e221c},_0x5635c1[_0x13847f(0x386)]),console['error'](a31_0x2e332c['green']('✔')+_0x13847f(0x339)+a31_0x2e332c[_0x13847f(0x231)](_0x13847f(0x2bf))+_0x13847f(0x2b8)+a31_0x2e332c[_0x13847f(0x1b9)](_0x4e221c)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{['name']=a31_0xfeae4b(0x338);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x177);async['execute'](_0x5af55f){const _0xc2b6cd=a31_0xfeae4b,{options:_0x15069d,args:_0x5179cc,tdx:_0x3e2434}=_0x5af55f,_0x1f08d8=_0x15069d,_0x4b2f3e=_0x5179cc[0x0]||_0x15069d[_0xc2b6cd(0x2fa)];if(!_0x4b2f3e)return showParentSegmentNotSetError(_0xc2b6cd(0x323)+_0xc2b6cd(0x19f)),0x1;const _0x730bf6=resolveYamlFile(_0x4b2f3e);if(!existsSync(_0x730bf6))return showFileNotFoundError(_0x730bf6,_0x4b2f3e),0x1;_0x1f08d8[_0xc2b6cd(0x350)]&&(console['error'](_0xc2b6cd(0x35a)+_0x1f08d8[_0xc2b6cd(0x193)]),console[_0xc2b6cd(0x1fc)](_0xc2b6cd(0x299)+_0x730bf6));let _0x793c2;try{_0x793c2=readFileSync(_0x730bf6,_0xc2b6cd(0x2aa));}catch(_0x49862c){const _0x3f9b3d=_0x49862c instanceof Error?_0x49862c['message']:String(_0x49862c);return console[_0xc2b6cd(0x1fc)](_0xc2b6cd(0x375)+_0x3f9b3d),0x1;}const _0x7e8363=await withSpinner(_0xc2b6cd(0x380),()=>_0x3e2434[_0xc2b6cd(0x330)]['pushParentYaml'](_0x793c2),{'verbose':_0x1f08d8['verbose']}),_0x2fc62b=_0x7e8363[_0xc2b6cd(0x33b)],{isNew:_0x239044,name:_0x59348b,hasChanges:_0x12edc5,diffFormatted:_0x51cb83}=_0x2fc62b;if(!_0x12edc5)return console[_0xc2b6cd(0x1fc)](_0xc2b6cd(0x260)+_0x59348b+'\x27\x20is\x20already\x20up\x20to\x20date'),0x0;_0x239044?console[_0xc2b6cd(0x1fc)](_0xc2b6cd(0x29b)+_0x59348b+'\x27:'):console[_0xc2b6cd(0x1fc)](_0xc2b6cd(0x19d)+_0x59348b+'\x27:');console['error']('─'['repeat'](0x3c)),console[_0xc2b6cd(0x1fc)](_0x51cb83),console['error']('─'[_0xc2b6cd(0x35d)](0x3c));const _0x34f2dc=_0x239044?_0xc2b6cd(0x28a)+_0x59348b+'\x27?':_0xc2b6cd(0x298)+_0x59348b+'\x27?';if(!_0x1f08d8[_0xc2b6cd(0x337)]){if(!isInteractive())return console[_0xc2b6cd(0x1fc)](a31_0x2e332c[_0xc2b6cd(0x25a)](_0xc2b6cd(0x321)),_0xc2b6cd(0x1f9)),console[_0xc2b6cd(0x1fc)](a31_0x2e332c[_0xc2b6cd(0x231)](_0xc2b6cd(0x1cf))),0x1;const _0x23e0fc=await confirmKey(_0x34f2dc);if(!_0x23e0fc)return console[_0xc2b6cd(0x1fc)](a31_0x2e332c['yellow'](_0xc2b6cd(0x331))),0x1;}const _0x1d99c2=_0x239044?_0xc2b6cd(0x236):'Updating',_0xa3bf4d=await withSpinner(_0x1d99c2+_0xc2b6cd(0x2d9)+_0x59348b+_0xc2b6cd(0x291),()=>_0x2fc62b[_0xc2b6cd(0x2dd)](),{'verbose':_0x1f08d8[_0xc2b6cd(0x350)]}),_0x391c2c=_0xa3bf4d[_0xc2b6cd(0x33b)],_0x298a16=getConsoleNextUrl(_0x1f08d8[_0xc2b6cd(0x193)],_0xc2b6cd(0x1e0)+_0x391c2c['id']),_0x5db4f9=_0x239044?_0xc2b6cd(0x166):_0xc2b6cd(0x21b);return console['error']('✔\x20'+_0x5db4f9+_0xc2b6cd(0x2d9)+_0x391c2c[_0xc2b6cd(0x25c)]+'\x27'),console[_0xc2b6cd(0x1fc)]('\x20\x20'+_0x298a16),0x0;}}function a31_0x5927(_0x52ef1b,_0x15f996){_0x52ef1b=_0x52ef1b-0x15c;const _0x498efd=a31_0x498e();let _0x592781=_0x498efd[_0x52ef1b];return _0x592781;}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{['name']=a31_0xfeae4b(0x19a);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x197);async['execute'](_0x5a4b9c){const _0x5ca568=a31_0xfeae4b,{options:_0x5ea12b,args:_0x157302,tdx:_0x2859c8}=_0x5a4b9c,_0x33f3d2=_0x5ea12b,_0x3f6f7b=_0x157302[0x0]||_0x5ea12b[_0x5ca568(0x2fa)];if(!_0x3f6f7b)return showParentSegmentNotSetError(_0x5ca568(0x2d6)+_0x5ca568(0x33f)+'Options:\x0a'+_0x5ca568(0x333)+_0x5ca568(0x2a0)+_0x5ca568(0x277)),0x1;const _0x347a81=resolveYamlFile(_0x3f6f7b);if(!existsSync(_0x347a81))return showFileNotFoundError(_0x347a81,_0x3f6f7b),0x1;_0x33f3d2[_0x5ca568(0x350)]&&(console[_0x5ca568(0x1fc)](_0x5ca568(0x35a)+_0x33f3d2[_0x5ca568(0x193)]),console['error'](_0x5ca568(0x299)+_0x347a81));let _0x45457c;try{_0x45457c=readFileSync(_0x347a81,_0x5ca568(0x2aa));}catch(_0x266fc7){const _0xa96c91=_0x266fc7 instanceof Error?_0x266fc7['message']:String(_0x266fc7);return console[_0x5ca568(0x1fc)]('Error\x20reading\x20file:\x20'+_0xa96c91),0x1;}const _0x152f1d=createCommandSpinner(a31_0x2e332c[_0x5ca568(0x231)](_0x5ca568(0x168)),{'verbose':_0x33f3d2[_0x5ca568(0x350)]});_0x152f1d[_0x5ca568(0x32d)]();const _0x676eea={'onProgress':_0x100f70=>{_0x152f1d['text']=formatProgressMessage(_0x100f70);}};if(_0x33f3d2[_0x5ca568(0x1f3)])_0x676eea['master']=!![];if(_0x33f3d2['enriched'])_0x676eea['enriched']=!![];_0x33f3d2[_0x5ca568(0x37a)]&&(_0x676eea[_0x5ca568(0x37a)]=_0x33f3d2[_0x5ca568(0x37a)]);_0x33f3d2[_0x5ca568(0x26c)]&&(_0x676eea['behavior']=_0x33f3d2[_0x5ca568(0x26c)]);if(_0x33f3d2['interval'])_0x676eea[_0x5ca568(0x2a6)]=_0x33f3d2['interval'];let _0xf3ccb0;try{_0xf3ccb0=await _0x2859c8[_0x5ca568(0x330)][_0x5ca568(0x1e3)](_0x45457c,_0x676eea),_0x152f1d['stop']();}catch(_0x899d42){_0x152f1d[_0x5ca568(0x224)]();throw _0x899d42;}const _0x3010a2=_0x33f3d2['interval']||_0x5ca568(0x352);return this['displayValidateResults'](_0xf3ccb0,_0x676eea,_0x347a81,_0x3010a2),_0xf3ccb0[_0x5ca568(0x206)]?0x0:0x1;}[a31_0xfeae4b(0x18a)](_0x47a4c5,_0x40ee29,_0x2ea91f,_0x16914b){const _0x3eea76=a31_0xfeae4b;console[_0x3eea76(0x1fc)]('\x0a'+a31_0x2e332c[_0x3eea76(0x263)](_0x3eea76(0x2f4))+'\x20'+_0x47a4c5['name']),console[_0x3eea76(0x1fc)]('═'[_0x3eea76(0x35d)](0x3c)),this[_0x3eea76(0x1ea)](_0x47a4c5);if(typeof _0x40ee29[_0x3eea76(0x37a)]===_0x3eea76(0x382)){this[_0x3eea76(0x2f0)](_0x47a4c5),this[_0x3eea76(0x17d)](_0x47a4c5),this[_0x3eea76(0x37d)](_0x2ea91f,_0x16914b,_0x3eea76(0x37a),_0x40ee29[_0x3eea76(0x37a)]);return;}if(_0x40ee29[_0x3eea76(0x37a)]===!![]){this[_0x3eea76(0x2f0)](_0x47a4c5),this['displaySummary'](_0x47a4c5),this['displayPreviewHints'](_0x2ea91f,_0x16914b,_0x3eea76(0x200));return;}if(typeof _0x40ee29[_0x3eea76(0x26c)]==='string'){this[_0x3eea76(0x336)](_0x47a4c5,_0x16914b),this[_0x3eea76(0x17d)](_0x47a4c5),this[_0x3eea76(0x37d)](_0x2ea91f,_0x16914b,'behavior',_0x40ee29[_0x3eea76(0x26c)]);return;}if(_0x40ee29['behavior']===!![]){this['displayBehaviorsStats'](_0x47a4c5,_0x16914b),this['displaySummary'](_0x47a4c5),this['displayPreviewHints'](_0x2ea91f,_0x16914b,_0x3eea76(0x230));return;}this['displayAttributesStats'](_0x47a4c5),this['displayBehaviorsStats'](_0x47a4c5,_0x16914b),this['displayRealtimeInfo'](_0x47a4c5),this[_0x3eea76(0x17d)](_0x47a4c5),this[_0x3eea76(0x37d)](_0x2ea91f,_0x16914b,_0x3eea76(0x25f));}['displayRealtimeInfo'](_0x1fe81f){displayRealtimeValidation(_0x1fe81f);}[a31_0xfeae4b(0x37d)](_0x32fcd0,_0x4bda56,_0x4d6136,_0x1aacff){const _0x234b21=a31_0xfeae4b;console['error']('\x0a'+a31_0x2e332c['dim'](_0x234b21(0x290)));const _0x553755=_0x4bda56!==_0x234b21(0x352)?_0x234b21(0x2c5)+_0x4bda56:'';if(_0x4d6136==='attribute'&&_0x1aacff)console['error']('\x20\x20'+a31_0x2e332c[_0x234b21(0x231)](_0x234b21(0x23e)+_0x32fcd0+_0x234b21(0x286)+_0x1aacff+'\x22'+_0x553755));else{if(_0x4d6136===_0x234b21(0x26c)&&_0x1aacff)console[_0x234b21(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x234b21(0x23e)+_0x32fcd0+'\x20--behavior\x20\x22'+_0x1aacff+'\x22'+_0x553755));else(_0x4d6136===_0x234b21(0x200)||_0x4d6136===_0x234b21(0x25f))&&console[_0x234b21(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x234b21(0x231)](_0x234b21(0x23e)+_0x32fcd0+_0x234b21(0x2c2)+_0x553755));}(_0x4d6136===_0x234b21(0x230)||_0x4d6136===_0x234b21(0x25f))&&console[_0x234b21(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x234b21(0x23e)+_0x32fcd0+'\x20--behavior\x20\x22<name>\x22'+_0x553755)),_0x4d6136===_0x234b21(0x25f)&&console[_0x234b21(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x234b21(0x231)]('tdx\x20ps\x20preview\x20'+_0x32fcd0+_0x234b21(0x28b)+_0x553755));}[a31_0xfeae4b(0x1ea)](_0x148b10){const _0x628d21=a31_0xfeae4b,{master:_0x464c25}=_0x148b10,_0x374a4d=_0x464c25['schemaValid']?a31_0x2e332c[_0x628d21(0x29c)]('✔'):a31_0x2e332c[_0x628d21(0x25a)]('✘');console[_0x628d21(0x1fc)]('\x0a'+a31_0x2e332c[_0x628d21(0x231)](_0x628d21(0x1fd))),console[_0x628d21(0x1fc)](_0x374a4d+'\x20'+a31_0x2e332c[_0x628d21(0x263)](_0x464c25[_0x628d21(0x301)]+'.'+_0x464c25[_0x628d21(0x328)])),_0x464c25[_0x628d21(0x29e)]?_0x464c25[_0x628d21(0x273)]!==undefined&&console[_0x628d21(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x628d21(0x216))+'\x20'+a31_0x2e332c[_0x628d21(0x1b9)](formatRows(_0x464c25[_0x628d21(0x273)]))):console[_0x628d21(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x628d21(0x25a)](_0x628d21(0x202))+'\x20'+_0x464c25['schemaError']);}['displayAttributesStats'](_0x4552e0){const _0x10e734=a31_0xfeae4b;if(_0x4552e0[_0x10e734(0x200)][_0x10e734(0x2ea)]===0x0)return;console['error']('\x0a'+a31_0x2e332c[_0x10e734(0x231)]('Attributes'));for(const _0x1b5f48 of _0x4552e0[_0x10e734(0x200)]){const _0x4382a4=_0x1b5f48[_0x10e734(0x29e)]?a31_0x2e332c['green']('✔'):a31_0x2e332c[_0x10e734(0x25a)]('✘');let _0x46b21f='';if(_0x1b5f48[_0x10e734(0x29e)]&&_0x1b5f48[_0x10e734(0x161)]!==undefined&&_0x1b5f48[_0x10e734(0x253)]!==undefined){const _0x52ad0a=_0x1b5f48[_0x10e734(0x253)][_0x10e734(0x32b)](0x1),_0x20f202=_0x1b5f48[_0x10e734(0x253)]>=0x50?a31_0x2e332c[_0x10e734(0x29c)]:_0x1b5f48[_0x10e734(0x253)]>=0x32?a31_0x2e332c[_0x10e734(0x196)]:a31_0x2e332c['red'];_0x46b21f='\x20'+a31_0x2e332c['dim'](_0x10e734(0x21e))+'\x20'+_0x20f202(_0x52ad0a+'%')+'\x20('+formatRows(_0x1b5f48[_0x10e734(0x161)])+_0x10e734(0x19e);}console[_0x10e734(0x1fc)](_0x4382a4+'\x20'+a31_0x2e332c[_0x10e734(0x263)](_0x1b5f48[_0x10e734(0x25c)])+_0x46b21f),console[_0x10e734(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x10e734(0x231)](_0x10e734(0x278))+'\x20'+a31_0x2e332c[_0x10e734(0x263)](_0x1b5f48[_0x10e734(0x301)]+'.'+_0x1b5f48[_0x10e734(0x328)]));const _0x227f37=_0x1b5f48[_0x10e734(0x294)]===_0x1b5f48[_0x10e734(0x15c)]?a31_0x2e332c[_0x10e734(0x231)](_0x10e734(0x289))+'\x20'+_0x1b5f48[_0x10e734(0x294)]:a31_0x2e332c['dim'](_0x10e734(0x15f))+'\x20'+_0x1b5f48[_0x10e734(0x294)]+_0x10e734(0x2b8)+_0x1b5f48[_0x10e734(0x15c)];console['error']('\x20\x20'+_0x227f37),console[_0x10e734(0x1fc)]('\x20\x20'+a31_0x2e332c['dim'](_0x10e734(0x1b6))),this[_0x10e734(0x28d)](_0x1b5f48[_0x10e734(0x383)]),!_0x1b5f48[_0x10e734(0x29e)]&&console[_0x10e734(0x1fc)]('\x20\x20'+a31_0x2e332c['red'](_0x10e734(0x202))+'\x20'+_0x1b5f48[_0x10e734(0x358)]);}}[a31_0xfeae4b(0x336)](_0xa85995,_0x2b1830){const _0x5dda30=a31_0xfeae4b;if(_0xa85995[_0x5dda30(0x230)][_0x5dda30(0x2ea)]===0x0)return;console[_0x5dda30(0x1fc)]('\x0a'+a31_0x2e332c[_0x5dda30(0x231)](_0x5dda30(0x30c))+'\x20'+a31_0x2e332c[_0x5dda30(0x231)]('('+_0x2b1830+')'));for(const _0x60a0f2 of _0xa85995[_0x5dda30(0x230)]){const _0x49eacd=_0x60a0f2[_0x5dda30(0x29e)]?a31_0x2e332c[_0x5dda30(0x29c)]('✔'):a31_0x2e332c[_0x5dda30(0x25a)]('✘');let _0x5100b3='';if(_0x60a0f2[_0x5dda30(0x29e)]&&_0x60a0f2[_0x5dda30(0x256)]!==undefined&&_0x60a0f2['totalEvents']!==undefined){const _0xa83f7d=_0x60a0f2[_0x5dda30(0x325)]?.[_0x5dda30(0x32b)](0x1)||'?',_0x5939c0=(_0x60a0f2[_0x5dda30(0x325)]??0x0)>=0x32?a31_0x2e332c[_0x5dda30(0x29c)]:(_0x60a0f2[_0x5dda30(0x325)]??0x0)>=0x14?a31_0x2e332c[_0x5dda30(0x196)]:a31_0x2e332c['red'];_0x5100b3='\x20'+a31_0x2e332c[_0x5dda30(0x231)](_0x5dda30(0x1c8))+'\x20'+_0x5939c0(formatRows(_0x60a0f2['customersWithEvents']))+'\x20('+_0xa83f7d+_0x5dda30(0x342)+a31_0x2e332c[_0x5dda30(0x231)](_0x5dda30(0x311))+'\x20'+a31_0x2e332c[_0x5dda30(0x1b9)](formatRows(_0x60a0f2[_0x5dda30(0x198)]));}console['error'](_0x49eacd+'\x20'+a31_0x2e332c[_0x5dda30(0x263)](_0x60a0f2[_0x5dda30(0x25c)])+_0x5100b3),console[_0x5dda30(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x5dda30(0x231)](_0x5dda30(0x278))+'\x20'+a31_0x2e332c[_0x5dda30(0x263)](_0x60a0f2[_0x5dda30(0x301)]+'.'+_0x60a0f2[_0x5dda30(0x328)]));const _0x271c73=_0x60a0f2[_0x5dda30(0x294)]===_0x60a0f2[_0x5dda30(0x15c)]?a31_0x2e332c['dim'](_0x5dda30(0x289))+'\x20'+_0x60a0f2[_0x5dda30(0x294)]:a31_0x2e332c[_0x5dda30(0x231)]('Join:')+'\x20'+_0x60a0f2[_0x5dda30(0x294)]+_0x5dda30(0x2b8)+_0x60a0f2[_0x5dda30(0x15c)];console[_0x5dda30(0x1fc)]('\x20\x20'+_0x271c73),console[_0x5dda30(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x5dda30(0x231)](_0x5dda30(0x1b6))),this[_0x5dda30(0x28d)](_0x60a0f2[_0x5dda30(0x383)]),!_0x60a0f2[_0x5dda30(0x29e)]&&console[_0x5dda30(0x1fc)]('\x20\x20'+a31_0x2e332c['red'](_0x5dda30(0x202))+'\x20'+_0x60a0f2[_0x5dda30(0x358)]);}}[a31_0xfeae4b(0x28d)](_0x5a0117){const _0x4c5186=a31_0xfeae4b;for(const _0x4ddf of _0x5a0117){_0x4ddf['label']===_0x4ddf[_0x4c5186(0x2e4)]||_0x4ddf[_0x4c5186(0x2e4)]==='*'?console['error']('\x20\x20\x20\x20-\x20'+_0x4ddf['label']):console[_0x4c5186(0x1fc)]('\x20\x20\x20\x20-\x20'+_0x4ddf[_0x4c5186(0x35c)]+'\x20'+a31_0x2e332c[_0x4c5186(0x231)]('('+_0x4ddf[_0x4c5186(0x2e4)]+')'));}}[a31_0xfeae4b(0x17d)](_0x4a8891){const _0x36bb92=a31_0xfeae4b;console[_0x36bb92(0x1fc)]('─'[_0x36bb92(0x35d)](0x3c));if(_0x4a8891[_0x36bb92(0x1f2)][_0x36bb92(0x2ea)]>0x0){console[_0x36bb92(0x1fc)]('\x0a'+a31_0x2e332c[_0x36bb92(0x25a)](_0x36bb92(0x26a)));for(const _0x4f2f24 of _0x4a8891[_0x36bb92(0x1f2)]){console['error']('\x20\x20'+a31_0x2e332c[_0x36bb92(0x25a)]('•')+'\x20'+_0x4f2f24);}}_0x4a8891[_0x36bb92(0x206)]&&console[_0x36bb92(0x1fc)]('\x0a'+a31_0x2e332c[_0x36bb92(0x29c)]('✔')+_0x36bb92(0x1ab));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x210);['description']=a31_0xfeae4b(0x1d3);async[a31_0xfeae4b(0x245)](_0x5308ca){const _0xca3d09=a31_0xfeae4b,{options:_0x596ecb,args:_0x37d03e,tdx:_0x128843}=_0x5308ca,_0x5a44aa=_0x596ecb,_0x2d6c96=_0x37d03e[0x0]||_0x596ecb['parentSegment'];if(!_0x2d6c96)return showParentSegmentNotSetError(_0xca3d09(0x205)+_0xca3d09(0x1aa)+_0xca3d09(0x1d0)+_0xca3d09(0x18e)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+_0xca3d09(0x194)+_0xca3d09(0x23c)+_0xca3d09(0x277)),0x1;if(!_0x5a44aa[_0xca3d09(0x1f3)]&&!_0x5a44aa[_0xca3d09(0x37a)]&&!_0x5a44aa[_0xca3d09(0x26c)]&&!_0x5a44aa['enriched'])return console[_0xca3d09(0x1fc)](a31_0x2e332c['red'](_0xca3d09(0x1b3))),console[_0xca3d09(0x1fc)](_0xca3d09(0x2b7)),console['error'](_0xca3d09(0x1b5)),console[_0xca3d09(0x1fc)](_0xca3d09(0x22c)),console[_0xca3d09(0x1fc)](_0xca3d09(0x354)),console[_0xca3d09(0x1fc)](_0xca3d09(0x2d2)),console[_0xca3d09(0x1fc)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0xe45143=resolveYamlFile(_0x2d6c96);if(!existsSync(_0xe45143))return showFileNotFoundError(_0xe45143,_0x2d6c96),0x1;_0x5a44aa[_0xca3d09(0x350)]&&(console['error'](_0xca3d09(0x35a)+_0x5a44aa['site']),console[_0xca3d09(0x1fc)]('YAML\x20file:\x20'+_0xe45143));let _0x5d10ff;try{_0x5d10ff=readFileSync(_0xe45143,'utf-8');}catch(_0x5c0b42){const _0x1c508a=_0x5c0b42 instanceof Error?_0x5c0b42[_0xca3d09(0x1e9)]:String(_0x5c0b42);return console['error']('Error\x20reading\x20file:\x20'+_0x1c508a),0x1;}let _0xafcbfc;try{_0xafcbfc=parseDef(_0x5d10ff);}catch(_0x158048){const _0x5f2377=_0x158048 instanceof Error?_0x158048['message']:String(_0x158048);return console['error'](a31_0x2e332c[_0xca3d09(0x25a)](_0xca3d09(0x285)+_0x5f2377)),0x1;}if(_0x5a44aa['attribute']===!![]||_0x5a44aa[_0xca3d09(0x37a)]===''){const _0x1a0e16=_0xafcbfc[_0xca3d09(0x200)]?.[_0xca3d09(0x20d)](_0x2c37ed=>_0x2c37ed[_0xca3d09(0x25c)])||[];if(_0x1a0e16['length']===0x0)console['error'](a31_0x2e332c[_0xca3d09(0x25a)](_0xca3d09(0x34c)));else{console[_0xca3d09(0x1fc)](a31_0x2e332c[_0xca3d09(0x25a)](_0xca3d09(0x2f6))),console['error'](_0xca3d09(0x174));for(const _0x115826 of _0x1a0e16){console[_0xca3d09(0x1fc)]('\x20\x20'+a31_0x2e332c[_0xca3d09(0x1b9)](_0x115826));}console[_0xca3d09(0x1fc)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x2d6c96+'\x20--attribute\x20\x22'+_0x1a0e16[0x0]+'\x22');}return 0x1;}if(_0x5a44aa[_0xca3d09(0x26c)]===!![]||_0x5a44aa[_0xca3d09(0x26c)]===''){const _0x36d955=_0xafcbfc['behaviors']?.[_0xca3d09(0x20d)](_0x2a3f9c=>_0x2a3f9c[_0xca3d09(0x25c)])||[];if(_0x36d955[_0xca3d09(0x2ea)]===0x0)console['error'](a31_0x2e332c[_0xca3d09(0x25a)](_0xca3d09(0x2fb)));else{console[_0xca3d09(0x1fc)](a31_0x2e332c['red']('Error:\x20--behavior\x20requires\x20a\x20name\x0a')),console[_0xca3d09(0x1fc)](_0xca3d09(0x37e));for(const _0x38e30f of _0x36d955){console[_0xca3d09(0x1fc)]('\x20\x20'+a31_0x2e332c['cyan'](_0x38e30f));}console['error'](_0xca3d09(0x255)+_0x2d6c96+_0xca3d09(0x1e5)+_0x36d955[0x0]+'\x22');}return 0x1;}const _0x4efcef=createCommandSpinner(a31_0x2e332c[_0xca3d09(0x231)]('Fetching\x20sample\x20data...'),{'verbose':_0x5a44aa[_0xca3d09(0x350)]});_0x4efcef[_0xca3d09(0x32d)]();const _0x345e6a={'onProgress':_0x1fc7c8=>{const _0x145c41=_0xca3d09;_0x4efcef[_0x145c41(0x30f)]=formatProgressMessage(_0x1fc7c8);}};if(_0x5a44aa[_0xca3d09(0x1f3)])_0x345e6a[_0xca3d09(0x1f3)]=!![];if(_0x5a44aa['attribute']&&typeof _0x5a44aa[_0xca3d09(0x37a)]===_0xca3d09(0x382))_0x345e6a[_0xca3d09(0x37a)]=_0x5a44aa['attribute'];if(_0x5a44aa[_0xca3d09(0x26c)]&&typeof _0x5a44aa[_0xca3d09(0x26c)]==='string')_0x345e6a['behavior']=_0x5a44aa['behavior'];if(_0x5a44aa[_0xca3d09(0x2ee)])_0x345e6a[_0xca3d09(0x2ee)]=!![];if(_0x5a44aa[_0xca3d09(0x2a6)])_0x345e6a['interval']=_0x5a44aa[_0xca3d09(0x2a6)];let _0x3491a7;try{_0x3491a7=await _0x128843[_0xca3d09(0x330)][_0xca3d09(0x355)](_0x5d10ff,_0x345e6a),_0x4efcef[_0xca3d09(0x224)]();}catch(_0x375cb2){_0x4efcef[_0xca3d09(0x224)]();throw _0x375cb2;}return await this['displayPreviewResults'](_0x3491a7,{'master':_0x5a44aa['master'],'attribute':typeof _0x5a44aa[_0xca3d09(0x37a)]===_0xca3d09(0x382)?_0x5a44aa[_0xca3d09(0x37a)]:undefined,'behavior':typeof _0x5a44aa[_0xca3d09(0x26c)]===_0xca3d09(0x382)?_0x5a44aa[_0xca3d09(0x26c)]:undefined,'enriched':_0x5a44aa[_0xca3d09(0x2ee)]}),_0x3491a7[_0xca3d09(0x206)]?0x0:0x1;}async[a31_0xfeae4b(0x195)](_0x12719f,_0xcec58a){const _0xa1b181=a31_0xfeae4b;console[_0xa1b181(0x1fc)]('\x0a'+a31_0x2e332c['bold'](_0xa1b181(0x23a))+'\x20'+_0x12719f[_0xa1b181(0x25c)]),console[_0xa1b181(0x1fc)]('═'[_0xa1b181(0x35d)](0x3c));if(_0xcec58a[_0xa1b181(0x1f3)]&&_0x12719f[_0xa1b181(0x25e)]){const _0x374d15=a31_0x2e332c[_0xa1b181(0x231)](_0xa1b181(0x387))+'\x20'+a31_0x2e332c[_0xa1b181(0x263)](_0x12719f[_0xa1b181(0x1f3)]['database']+'.'+_0x12719f[_0xa1b181(0x1f3)][_0xa1b181(0x328)]);await this[_0xa1b181(0x2c8)](_0x374d15,_0x12719f[_0xa1b181(0x25e)]);}else{if(_0xcec58a[_0xa1b181(0x37a)]&&_0x12719f['sampleData']){const _0x14f289=a31_0x2e332c[_0xa1b181(0x231)](_0xa1b181(0x212))+'\x20'+a31_0x2e332c[_0xa1b181(0x263)](_0xcec58a[_0xa1b181(0x37a)]);await this[_0xa1b181(0x2c8)](_0x14f289,_0x12719f[_0xa1b181(0x25e)]);}else{if(_0xcec58a[_0xa1b181(0x26c)]&&_0x12719f[_0xa1b181(0x25e)]){const _0x34b651=a31_0x2e332c[_0xa1b181(0x231)](_0xa1b181(0x288))+'\x20'+a31_0x2e332c['bold'](_0xcec58a[_0xa1b181(0x26c)]);await this[_0xa1b181(0x2c8)](_0x34b651,_0x12719f['sampleData']);}else{if(_0xcec58a[_0xa1b181(0x2ee)]&&_0x12719f[_0xa1b181(0x25e)]){const _0xe719a7=a31_0x2e332c[_0xa1b181(0x231)](_0xa1b181(0x327))+'\x20'+a31_0x2e332c[_0xa1b181(0x263)]('Master\x20+\x20Attributes');await this[_0xa1b181(0x2c8)](_0xe719a7,_0x12719f[_0xa1b181(0x25e)]);}else!_0x12719f['sampleData']&&console[_0xa1b181(0x1fc)](_0xa1b181(0x17c));}}}if(_0x12719f['errors']['length']>0x0){console['error']('─'['repeat'](0x3c)),console[_0xa1b181(0x1fc)]('\x0a'+a31_0x2e332c[_0xa1b181(0x25a)]('Errors:'));for(const _0x39caf9 of _0x12719f[_0xa1b181(0x1f2)]){console[_0xa1b181(0x1fc)]('\x20\x20'+a31_0x2e332c[_0xa1b181(0x25a)]('•')+'\x20'+_0x39caf9);}}}async[a31_0xfeae4b(0x2c8)](_0x39c50c,_0x257cd2){const _0x27d39e=a31_0xfeae4b;if(_0x257cd2[_0x27d39e(0x2ea)]===0x0){console[_0x27d39e(0x1fc)]('\x0a'+_0x39c50c),console[_0x27d39e(0x1fc)]('\x20\x20No\x20sample\x20data\x20available');return;}console[_0x27d39e(0x1fc)]('\x0a'+_0x39c50c);const _0x1b8499=Object['keys'](_0x257cd2[0x0])[_0x27d39e(0x20d)](_0x23520a=>({'name':_0x23520a,'type':typeof _0x257cd2[0x0][_0x23520a]===_0x27d39e(0x24f)?'double':_0x27d39e(0x17f)})),_0x1a5ce8={'queryId':_0x27d39e(0x33d),'columns':_0x1b8499,'data':_0x257cd2,'stats':{'state':'FINISHED','queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x257cd2['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x5fde19=formatAsTable(_0x1a5ce8,_0x257cd2[_0x27d39e(0x2ea)],!![]);await writeOutput(_0x5fde19,undefined,'table');}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x222);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x2c9);async[a31_0xfeae4b(0x245)](_0x5670f8){const _0x2699d6=a31_0xfeae4b,{options:_0x418048,args:_0x2e5d80,tdx:_0x22d398}=_0x5670f8,_0x2f4e4c=_0x418048,_0x1e3c3d=_0x2e5d80[0x0]||_0x418048[_0x2699d6(0x2fa)];if(!_0x1e3c3d)return showParentSegmentNotSetError(_0x2699d6(0x249)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x59f4e3=resolveYamlFile(_0x1e3c3d);if(existsSync(_0x59f4e3)){_0x2f4e4c['verbose']&&console[_0x2699d6(0x1fc)](_0x2699d6(0x2e9)+_0x59f4e3);let _0x4d88d5;try{_0x4d88d5=readFileSync(_0x59f4e3,_0x2699d6(0x2aa));}catch(_0xf3fa0c){const _0xf16dd=_0xf3fa0c instanceof Error?_0xf3fa0c['message']:String(_0xf3fa0c);return console[_0x2699d6(0x1fc)](_0x2699d6(0x375)+_0xf16dd),0x1;}const _0x3425df=await withSpinner(_0x2699d6(0x380),()=>_0x22d398[_0x2699d6(0x330)]['pushParentYaml'](_0x4d88d5),{'verbose':_0x2f4e4c[_0x2699d6(0x350)]}),_0x521ed8=_0x3425df[_0x2699d6(0x33b)],{isNew:_0xdfefb,name:_0x9f33cb,hasChanges:_0x2acdca,diffFormatted:_0x5eb08f}=_0x521ed8;if(_0x2acdca){_0xdfefb?console['error'](_0x2699d6(0x29b)+_0x9f33cb+'\x27:'):console[_0x2699d6(0x1fc)](_0x2699d6(0x19d)+_0x9f33cb+'\x27:');console[_0x2699d6(0x1fc)]('─'[_0x2699d6(0x35d)](0x3c)),console['error'](_0x5eb08f),console['error']('─'['repeat'](0x3c));const _0x2a273a=_0xdfefb?_0x2699d6(0x28a)+_0x9f33cb+_0x2699d6(0x18d):_0x2699d6(0x298)+_0x9f33cb+'\x27\x20and\x20run\x20workflow?';if(!_0x2f4e4c[_0x2699d6(0x337)]){if(!isInteractive())return console[_0x2699d6(0x1fc)](a31_0x2e332c[_0x2699d6(0x25a)](_0x2699d6(0x321)),_0x2699d6(0x1f9)),console['error'](a31_0x2e332c['dim'](_0x2699d6(0x1cf))),0x1;const _0x3f3cba=await confirmKey(_0x2a273a);if(!_0x3f3cba)return console[_0x2699d6(0x1fc)](a31_0x2e332c[_0x2699d6(0x196)](_0x2699d6(0x331))),0x1;}const _0x3fb81f=_0xdfefb?_0x2699d6(0x236):_0x2699d6(0x34a);await withSpinner(_0x3fb81f+_0x2699d6(0x2d9)+_0x9f33cb+_0x2699d6(0x291),()=>_0x521ed8[_0x2699d6(0x2dd)](),{'verbose':_0x2f4e4c[_0x2699d6(0x350)]});const _0x5e7cdc=_0xdfefb?'Created':_0x2699d6(0x21b);console['error']('✔\x20'+_0x5e7cdc+_0x2699d6(0x2d9)+_0x9f33cb+'\x27');}else console[_0x2699d6(0x1fc)]('✔\x20No\x20changes\x20-\x20\x27'+_0x9f33cb+_0x2699d6(0x25d));}const _0x22b1da=await withSpinner(_0x2699d6(0x1b1)+_0x1e3c3d+'\x27...',()=>_0x22d398[_0x2699d6(0x330)][_0x2699d6(0x1ce)](_0x1e3c3d),{'verbose':_0x2f4e4c[_0x2699d6(0x350)]}),_0x2749b1=_0x22b1da[_0x2699d6(0x33b)],_0x18dc4c=getConsoleUrl(_0x2f4e4c[_0x2699d6(0x193)],'/app/workflows/'+_0x2749b1[_0x2699d6(0x315)]+_0x2699d6(0x2db)+_0x2749b1[_0x2699d6(0x378)]+'/attempt/'+_0x2749b1['workflowAttemptId']);return console[_0x2699d6(0x1fc)](_0x2699d6(0x272)),console[_0x2699d6(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x2699d6(0x231)](_0x2699d6(0x20c))+'\x20'+_0x2749b1[_0x2699d6(0x261)]),console[_0x2699d6(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x2699d6(0x231)]('Status:')+'\x20'+_0x2749b1[_0x2699d6(0x21c)]),console[_0x2699d6(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x2699d6(0x231)]('Session:')+'\x20'+_0x2749b1[_0x2699d6(0x378)]),console[_0x2699d6(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x2699d6(0x231)](_0x2699d6(0x30d))+'\x20'+_0x2749b1[_0x2699d6(0x2a3)]),console['error']('\x20\x20'+_0x18dc4c),console[_0x2699d6(0x1fc)]('\x0a'+a31_0x2e332c[_0x2699d6(0x231)](_0x2699d6(0x203))+_0x2699d6(0x347)+_0x2749b1[_0x2699d6(0x2a3)]+_0x2699d6(0x234)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{['name']='segment:parent:fields';['description']=a31_0xfeae4b(0x1bd);async[a31_0xfeae4b(0x245)](_0x46d866){const _0x1675f5=a31_0xfeae4b,{options:_0xa12a97,args:_0x16f6d6,tdx:_0x3a096d}=_0x46d866,_0x592f13=_0x16f6d6[0x0]||_0xa12a97[_0x1675f5(0x2fa)];if(!_0x592f13)return showParentSegmentNotSetError(_0x1675f5(0x295)+_0x1675f5(0x357)),0x1;_0xa12a97[_0x1675f5(0x350)]&&(console[_0x1675f5(0x1fc)](_0x1675f5(0x35a)+_0xa12a97['site']),console[_0x1675f5(0x1fc)](_0x1675f5(0x244)+_0x592f13));const _0x1569ba=await withSpinner(_0x1675f5(0x1b0)+_0x592f13+'\x27...',()=>_0x3a096d[_0x1675f5(0x330)]['listFields'](_0x592f13),{'verbose':_0xa12a97['verbose']}),_0xc77f17=_0x1569ba[_0x1675f5(0x33b)];console[_0x1675f5(0x1fc)](_0x1675f5(0x2e3)+_0xc77f17[_0x1675f5(0x2ea)]+_0x1675f5(0x1e8)+(_0xc77f17[_0x1675f5(0x2ea)]!==0x1?'s':''));if(_0xa12a97[_0x1675f5(0x2ce)]||_0xa12a97[_0x1675f5(0x213)])return await handleSDKOutput(_0xc77f17,_0xa12a97),0x0;return displayFieldsHumanReadable(_0xc77f17,_0x592f13),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x187);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x29f);async[a31_0xfeae4b(0x245)](_0x1f893c){const _0x343b69=a31_0xfeae4b,{options:_0x31b73a,args:_0x302aa7,tdx:_0x9e2bfd}=_0x1f893c,_0x218823=_0x31b73a,_0x4c0232=_0x302aa7[0x0]||_0x31b73a[_0x343b69(0x2fa)];if(!_0x4c0232)return showParentSegmentNotSetError(_0x343b69(0x389)+_0x343b69(0x2d8)+_0x343b69(0x250)+_0x343b69(0x305)),0x1;_0x31b73a[_0x343b69(0x350)]&&(console[_0x343b69(0x1fc)](_0x343b69(0x35a)+_0x31b73a['site']),console[_0x343b69(0x1fc)]('Parent\x20segment:\x20'+_0x4c0232));const _0x3701ed=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x4c0232+_0x343b69(0x291),()=>_0x9e2bfd[_0x343b69(0x330)][_0x343b69(0x31c)](_0x4c0232),{'verbose':_0x31b73a[_0x343b69(0x350)]}),_0x528655=_0x3701ed['data'];if(_0x218823[_0x343b69(0x183)]){const _0x976103=getConsoleNextUrl(_0x218823[_0x343b69(0x193)],_0x343b69(0x1e0)+_0x528655['id']);return console[_0x343b69(0x1fc)](a31_0x2e332c[_0x343b69(0x29c)]('✔')+'\x20Opening\x20'+a31_0x2e332c[_0x343b69(0x1b9)](_0x976103)),openBrowser(_0x976103),0x0;}return await handleSingleObjectOutput(_0x528655,_0x31b73a),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x34b);[a31_0xfeae4b(0x22f)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async['execute'](_0x62ef8c){const _0x1470f4=a31_0xfeae4b,{options:_0x3bb006,args:_0x20cb6,tdx:_0x1be10c}=_0x62ef8c,_0x2f9216=_0x3bb006,_0xde3f42=_0x20cb6[0x0]||_0x3bb006[_0x1470f4(0x2fa)];if(!_0xde3f42)return showParentSegmentNotSetError(_0x1470f4(0x2b3)+_0x1470f4(0x2f8)+_0x1470f4(0x250)+_0x1470f4(0x2f7)),0x1;_0x3bb006[_0x1470f4(0x350)]&&(console[_0x1470f4(0x1fc)](_0x1470f4(0x35a)+_0x3bb006[_0x1470f4(0x193)]),console['error'](_0x1470f4(0x244)+_0xde3f42));const _0x5c91e0=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xde3f42+_0x1470f4(0x291),()=>_0x1be10c[_0x1470f4(0x330)][_0x1470f4(0x221)](_0xde3f42),{'verbose':_0x3bb006[_0x1470f4(0x350)]}),_0x4fb378=_0x5c91e0['data'],_0x3266e6=_0x1be10c['segment'][_0x1470f4(0x2b2)](_0x4fb378);if(_0x2f9216['output']){const _0x1b9879=await this[_0x1470f4(0x163)](_0x62ef8c,_0xde3f42,_0x4fb378,_0x3266e6),_0x22ac64=this[_0x1470f4(0x1e4)](_0x1b9879);writeFileSync(_0x2f9216[_0x1470f4(0x1dc)],_0x22ac64);const _0x51a0b8=_0x1b9879['customers'][_0x1470f4(0x383)][_0x1470f4(0x2ea)]+_0x1b9879[_0x1470f4(0x230)]['reduce']((_0xb4ae7b,_0x1693f2)=>_0xb4ae7b+_0x1693f2[_0x1470f4(0x383)][_0x1470f4(0x2ea)],0x0),_0x4638d7=_0x1b9879[_0x1470f4(0x230)][_0x1470f4(0x2f1)](_0x4c9a7a=>_0x4c9a7a[_0x1470f4(0x383)][_0x1470f4(0x2ea)]===0x0)[_0x1470f4(0x2ea)];return console[_0x1470f4(0x1a1)](_0x1470f4(0x223)+_0x2f9216['output']),console[_0x1470f4(0x1a1)](_0x1470f4(0x2a2)+_0x3266e6),console[_0x1470f4(0x1a1)](_0x1470f4(0x324)+_0x1b9879[_0x1470f4(0x230)][_0x1470f4(0x2ea)]+_0x1470f4(0x22e)),console[_0x1470f4(0x1a1)](_0x1470f4(0x17e)+_0x51a0b8+_0x1470f4(0x220)),_0x4638d7>0x0&&console[_0x1470f4(0x1a1)](_0x1470f4(0x271)+_0x4638d7+_0x1470f4(0x1bf)),0x0;}console['error']('\x0a'+a31_0x2e332c[_0x1470f4(0x263)](_0x1470f4(0x2ca))+'\x20'+a31_0x2e332c['cyan'](_0x3266e6));const _0x44b14e=await withSpinner(_0x1470f4(0x2e7),()=>_0x1be10c[_0x1470f4(0x330)][_0x1470f4(0x2d1)](_0x4fb378),{'verbose':_0x3bb006[_0x1470f4(0x350)]});console['error']('\x0a'+a31_0x2e332c[_0x1470f4(0x263)](_0x1470f4(0x314))+'\x20'+a31_0x2e332c[_0x1470f4(0x231)]('('+_0x3266e6+_0x1470f4(0x1f7)));const _0x45c7d0=await executeSchemaQuery(_0x44b14e[_0x1470f4(0x33b)],_0x1be10c,_0x3bb006);await handleQueryOutput(_0x45c7d0,_0x3bb006);const _0x22fab4=await withSpinner(_0x1470f4(0x1c7),()=>_0x1be10c[_0x1470f4(0x330)]['getBehaviorNames'](_0x4fb378),{'verbose':_0x3bb006['verbose']});for(const _0x596e7d of _0x22fab4[_0x1470f4(0x33b)]){const _0x3e7a3e=_0x1470f4(0x29a)+_0x596e7d['toLowerCase']()[_0x1470f4(0x227)](/\s+/g,'_'),_0x555248=_0x1470f4(0x1dd)+_0x3266e6+'.'+_0x3e7a3e;console[_0x1470f4(0x1fc)]('\x0a'+a31_0x2e332c[_0x1470f4(0x263)](_0x596e7d)+'\x20'+a31_0x2e332c[_0x1470f4(0x231)]('('+_0x3266e6+'.'+_0x3e7a3e+')'));try{const _0x42df93=await executeSchemaQuery(_0x555248,_0x1be10c,_0x3bb006);await handleQueryOutput(_0x42df93,_0x3bb006);}catch{console['error'](a31_0x2e332c['yellow'](_0x1470f4(0x2ab)));}}return 0x0;}async[a31_0xfeae4b(0x163)](_0x5da11e,_0x3d21db,_0x1862db,_0x2da7b8){const _0x41c031=a31_0xfeae4b,{options:_0x236bee,tdx:_0x1a9659}=_0x5da11e,_0x5da05f=await withSpinner(_0x41c031(0x2e7),()=>_0x1a9659[_0x41c031(0x330)]['getParentSQL'](_0x1862db),{'verbose':_0x236bee['verbose']}),_0x59ed16=await executeSchemaQuery(_0x5da05f[_0x41c031(0x33b)],_0x1a9659,_0x236bee),_0x1aeecb=_0x59ed16['data'][_0x41c031(0x20d)](_0x2f840f=>({'name':_0x2f840f[_0x41c031(0x385)],'type':_0x2f840f[_0x41c031(0x167)]})),_0x2a1dc5=await withSpinner(_0x41c031(0x1c7),()=>_0x1a9659['segment'][_0x41c031(0x2a9)](_0x1862db),{'verbose':_0x236bee[_0x41c031(0x350)]}),_0x487685=[];for(const _0x1014ce of _0x2a1dc5['data']){const _0x90b00e=_0x41c031(0x29a)+_0x1014ce[_0x41c031(0x1a6)]()['replace'](/\s+/g,'_'),_0x5ba498='SELECT\x20*\x20FROM\x20'+_0x2da7b8+'.'+_0x90b00e;let _0x316381=[];try{const _0x5b8add=await executeSchemaQuery(_0x5ba498,_0x1a9659,_0x236bee);_0x316381=_0x5b8add['data'][_0x41c031(0x20d)](_0xca9aee=>({'name':_0xca9aee[_0x41c031(0x385)],'type':_0xca9aee['column_type']}));}catch{}_0x487685[_0x41c031(0x335)]({'table':_0x90b00e,'columns':_0x316381});}return{'database':_0x2da7b8,'parent_segment':_0x3d21db,'parent_id':_0x1862db,'customers':{'table':_0x41c031(0x314),'columns':_0x1aeecb},'behaviors':_0x487685};}['formatSchemaJson'](_0x43aba9){const _0xb76142=a31_0xfeae4b,_0x1843a1=_0x269c2e=>{const _0x111518=a31_0x5927;if(_0x269c2e[_0x111518(0x2ea)]===0x0)return'[]';const _0x324740=_0x269c2e[_0x111518(0x20d)](_0x4fcd6e=>_0x111518(0x31d)+_0x4fcd6e[_0x111518(0x25c)]+_0x111518(0x25b)+_0x4fcd6e[_0x111518(0x2cd)]+_0x111518(0x361));return'[\x0a'+_0x324740[_0x111518(0x251)](',\x0a')+_0x111518(0x2b5);},_0x94fb55=_0x43aba9[_0xb76142(0x230)]['map'](_0x36ebde=>{const _0x3eb89b=_0xb76142;return'\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x36ebde['table']+_0x3eb89b(0x2fc)+_0x1843a1(_0x36ebde[_0x3eb89b(0x383)])['replace'](/^/gm,'\x20\x20')[_0x3eb89b(0x26b)]()+_0x3eb89b(0x2e1);})['join'](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x43aba9['database']+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x43aba9[_0xb76142(0x2bf)]+_0xb76142(0x2a8)+_0x43aba9[_0xb76142(0x2e8)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x43aba9[_0xb76142(0x314)][_0xb76142(0x328)]+_0xb76142(0x2a7)+_0x1843a1(_0x43aba9[_0xb76142(0x314)]['columns'])[_0xb76142(0x227)](/^/gm,'\x20\x20')['trim']()+_0xb76142(0x274)+_0x94fb55+_0xb76142(0x225);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]='segment:parent:sql';[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x192);async[a31_0xfeae4b(0x245)](_0x4ca832){const _0x2025e9=a31_0xfeae4b,{options:_0x16548d,args:_0x24a655,tdx:_0x509e8d}=_0x4ca832,_0x392da1=_0x24a655[0x0]||_0x16548d[_0x2025e9(0x2fa)];if(!_0x392da1)return showParentSegmentNotSetError(_0x2025e9(0x280)+_0x2025e9(0x22a)),0x1;_0x16548d[_0x2025e9(0x350)]&&(console['error'](_0x2025e9(0x35a)+_0x16548d[_0x2025e9(0x193)]),console[_0x2025e9(0x1fc)]('Parent\x20segment:\x20'+_0x392da1));const _0x16b309=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x392da1+_0x2025e9(0x291),()=>_0x509e8d[_0x2025e9(0x330)]['resolveParentId'](_0x392da1),{'verbose':_0x16548d['verbose']}),_0x334745=_0x16b309[_0x2025e9(0x33b)],_0x18584d=await withSpinner(_0x2025e9(0x322)+_0x392da1+_0x2025e9(0x291),()=>_0x509e8d[_0x2025e9(0x330)]['getParentSQL'](_0x334745),{'verbose':_0x16548d[_0x2025e9(0x350)]}),_0x3df4ff=_0x18584d['data'];return _0x16548d[_0x2025e9(0x2c1)]===_0x2025e9(0x2ce)||_0x16548d['format']===_0x2025e9(0x213)?await handleSDKOutput([{'sql':_0x3df4ff}],_0x16548d):console[_0x2025e9(0x1a1)](_0x3df4ff),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']='segment:parent:show';['description']='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0xfeae4b(0x245)](_0x4bf7c3){const _0x4ab9ba=a31_0xfeae4b,{options:_0x575803,args:_0x324739,tdx:_0x40e2f4}=_0x4bf7c3,_0x2afc1e=_0x324739[0x0]||_0x575803['parentSegment'];if(!_0x2afc1e)return showParentSegmentNotSetError(_0x4ab9ba(0x36a)+_0x4ab9ba(0x318)),0x1;_0x575803[_0x4ab9ba(0x350)]&&(console[_0x4ab9ba(0x1fc)](_0x4ab9ba(0x35a)+_0x575803[_0x4ab9ba(0x193)]),console[_0x4ab9ba(0x1fc)]('Parent\x20segment:\x20'+_0x2afc1e));const _0x458ce8=await withSpinner(_0x4ab9ba(0x19c)+_0x2afc1e+_0x4ab9ba(0x291),()=>_0x40e2f4[_0x4ab9ba(0x330)][_0x4ab9ba(0x221)](_0x2afc1e),{'verbose':_0x575803[_0x4ab9ba(0x350)]}),_0x1873d1=_0x458ce8[_0x4ab9ba(0x33b)],_0x5884bf=await withSpinner(_0x4ab9ba(0x322)+_0x2afc1e+_0x4ab9ba(0x291),()=>_0x40e2f4['segment']['getParentSQL'](_0x1873d1),{'verbose':_0x575803[_0x4ab9ba(0x350)]});let _0x443950=_0x5884bf[_0x4ab9ba(0x33b)];const _0x10b1a1=resolveLimit(_0x575803[_0x4ab9ba(0x297)],DEFAULT_DISPLAY_LIMIT),_0x2a4f17=/\bLIMIT\s+\d+/i['test'](_0x443950);!_0x2a4f17&&(_0x443950=_0x443950['trim']()[_0x4ab9ba(0x227)](/;+$/,''),_0x443950=_0x4ab9ba(0x312)+_0x443950+_0x4ab9ba(0x1e1)+_0x10b1a1);_0x575803[_0x4ab9ba(0x350)]&&console['error'](_0x4ab9ba(0x238)+_0x443950);const _0x3084d2=await withProgressSpinner(_0x4ab9ba(0x2b0),async _0xd7fcd2=>{const _0x27680b=_0x4ab9ba,_0x1342fe=await _0x40e2f4[_0x27680b(0x310)]['execute'](_0x443950,{'catalog':'td','schema':_0x27680b(0x1d9),'onJobId':_0x346722=>{const _0x4d4632=_0x27680b;_0xd7fcd2[_0x4d4632(0x2cb)](_0x346722);}});return _0x1342fe;},{'verbose':_0x575803[_0x4ab9ba(0x350)]}),_0xcae4f8=_0x3084d2[_0x4ab9ba(0x33b)],_0x12e89c=_0xcae4f8['jobId']?_0x4ab9ba(0x180)+_0xcae4f8[_0x4ab9ba(0x304)]+']':'';return console[_0x4ab9ba(0x1fc)](_0x4ab9ba(0x1ba)+_0xcae4f8[_0x4ab9ba(0x26e)]['processedRows'][_0x4ab9ba(0x376)]()+_0x4ab9ba(0x2ec)+(_0x4ab9ba(0x214)+formatElapsed(_0xcae4f8['stats']['elapsedTimeMillis'])+_0x12e89c)),await handleQueryOutput(_0xcae4f8,_0x575803),0x0;}}export class PSRtListCommand extends BaseCommand{['name']=a31_0xfeae4b(0x171);[a31_0xfeae4b(0x22f)]='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async['execute'](_0x1728a9){const _0x344f68=a31_0xfeae4b,{options:_0x49dbcc,args:_0x30a1dd,tdx:_0x155ce6}=_0x1728a9,_0x3d46a4=_0x30a1dd[0x0],_0x153d3e=await withSpinner(_0x3d46a4?_0x344f68(0x306)+_0x3d46a4+_0x344f68(0x291):'Listing\x20RT-enabled\x20parent\x20segments...',()=>_0x155ce6[_0x344f68(0x1f6)]['list'](),{'verbose':_0x49dbcc['verbose']});let _0x353dda=_0x153d3e[_0x344f68(0x33b)][_0x344f68(0x2f1)](_0x133da6=>_0x133da6[_0x344f68(0x37c)]);if(_0x3d46a4){const _0x20f7cd=_0x3d46a4['replace'](/[.+^${}()|[\]\\]/g,_0x344f68(0x1ed))[_0x344f68(0x227)](/\*/g,'.*')[_0x344f68(0x227)](/\?/g,'.'),_0xe92f81=new RegExp('^'+_0x20f7cd+'$','i');_0x353dda=_0x353dda[_0x344f68(0x2f1)](_0x3a6427=>_0xe92f81[_0x344f68(0x16a)](_0x3a6427[_0x344f68(0x25c)]));}_0x353dda['sort']((_0x5d2451,_0xf4af5b)=>_0x5d2451['name']['localeCompare'](_0xf4af5b[_0x344f68(0x25c)])),console[_0x344f68(0x1fc)](_0x344f68(0x2e3)+_0x353dda[_0x344f68(0x2ea)]+'\x20RT-enabled\x20parent\x20segment'+(_0x353dda['length']!==0x1?'s':''));const _0x4eedc3=_0x2d082f=>{const _0x207d8d=_0x344f68;return getConsoleNextUrl(_0x49dbcc[_0x207d8d(0x193)],_0x207d8d(0x1e0)+_0x2d082f);};if(_0x49dbcc[_0x344f68(0x2c1)]===_0x344f68(0x2ce)||_0x49dbcc[_0x344f68(0x2c1)]===_0x344f68(0x213)){const _0x32015c=_0x353dda[_0x344f68(0x20d)](_0xec26df=>({..._0xec26df,'url':_0x4eedc3(_0xec26df['id'])}));await handleSDKOutput(_0x32015c,_0x49dbcc);}else{if(_0x353dda[_0x344f68(0x2ea)]===0x0)console['log'](_0x344f68(0x1c4));else for(const _0x320538 of _0x353dda){const _0x71d92a=_0x320538[_0x344f68(0x2eb)]?a31_0x2e332c['dim']('\x20('+formatRows(_0x320538[_0x344f68(0x2eb)])+')'):'',_0x785839=hyperlink(_0x320538[_0x344f68(0x25c)],_0x4eedc3(_0x320538['id']));console[_0x344f68(0x1a1)]('⚡\x20'+_0x785839+_0x71d92a);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x2ac);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x191);async[a31_0xfeae4b(0x245)](_0x500d46){const _0x378c6f=a31_0xfeae4b,{options:_0x5d9dfc,args:_0x4ec104,tdx:_0x1ff857}=_0x500d46,_0x3e62bc=_0x4ec104[0x0]||_0x5d9dfc[_0x378c6f(0x2fa)];if(!_0x3e62bc)return showParentSegmentNotSetError(_0x378c6f(0x32e)+_0x378c6f(0x27a)),0x1;const _0x4683ce=resolveYamlFile(_0x3e62bc);if(!existsSync(_0x4683ce))return showFileNotFoundError(_0x4683ce,_0x3e62bc),0x1;let _0x457e75;try{_0x457e75=readFileSync(_0x4683ce,_0x378c6f(0x2aa));}catch(_0x39fde6){const _0x3e6048=_0x39fde6 instanceof Error?_0x39fde6[_0x378c6f(0x1e9)]:String(_0x39fde6);return console[_0x378c6f(0x1fc)](_0x378c6f(0x375)+_0x3e6048),0x1;}const _0xbfcf88=createCommandSpinner(a31_0x2e332c[_0x378c6f(0x231)](_0x378c6f(0x21f)),{'verbose':_0x5d9dfc[_0x378c6f(0x350)]});_0xbfcf88[_0x378c6f(0x32d)]();const _0x229d22={'realtime':!![],'onProgress':_0x55f8fa=>{_0xbfcf88['text']=formatProgressMessage(_0x55f8fa);}};let _0x383e12;try{_0x383e12=await _0x1ff857[_0x378c6f(0x330)][_0x378c6f(0x1e3)](_0x457e75,_0x229d22),_0xbfcf88[_0x378c6f(0x224)]();}catch(_0x343fdd){_0xbfcf88['stop']();throw _0x343fdd;}console[_0x378c6f(0x1fc)]('\x0a'+a31_0x2e332c[_0x378c6f(0x263)]('RT\x202.0\x20Validate:')+'\x20'+_0x383e12[_0x378c6f(0x25c)]),console[_0x378c6f(0x1fc)]('═'[_0x378c6f(0x35d)](0x3c)),displayRealtimeValidation(_0x383e12),console[_0x378c6f(0x1fc)]('─'[_0x378c6f(0x35d)](0x3c));if(_0x383e12[_0x378c6f(0x1f2)][_0x378c6f(0x2ea)]>0x0){console['error']('\x0a'+a31_0x2e332c['red'](_0x378c6f(0x26a)));for(const _0x46ce39 of _0x383e12[_0x378c6f(0x1f2)]){console[_0x378c6f(0x1fc)]('\x20\x20'+a31_0x2e332c[_0x378c6f(0x25a)]('•')+'\x20'+_0x46ce39);}}return _0x383e12['allValid']&&console['error']('\x0a'+a31_0x2e332c['green']('✔')+_0x378c6f(0x30e)),_0x383e12[_0x378c6f(0x206)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0xfeae4b(0x1a0);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x341);async[a31_0xfeae4b(0x245)](_0xcea9cc){const _0x583f13=a31_0xfeae4b,{options:_0x24bb74,args:_0x5c63e3,tdx:_0x3444d0}=_0xcea9cc,_0x9ea9c4=_0x5c63e3[0x0]||_0x24bb74[_0x583f13(0x2fa)];if(!_0x9ea9c4)return showParentSegmentNotSetError(_0x583f13(0x268)+_0x583f13(0x2f5)),0x1;_0x24bb74[_0x583f13(0x350)]&&(console['error'](_0x583f13(0x35a)+_0x24bb74[_0x583f13(0x193)]),console[_0x583f13(0x1fc)]('Parent\x20segment:\x20'+_0x9ea9c4));const _0x5a1155=await withSpinner(_0x583f13(0x19c)+_0x9ea9c4+_0x583f13(0x291),()=>_0x3444d0[_0x583f13(0x330)]['resolveParentId'](_0x9ea9c4),{'verbose':_0x24bb74[_0x583f13(0x350)]}),_0x105668=_0x5a1155[_0x583f13(0x33b)],_0x30e45a=await withSpinner(_0x583f13(0x1ff)+_0x9ea9c4+_0x583f13(0x291),()=>_0x3444d0[_0x583f13(0x1f6)][_0x583f13(0x243)](_0x105668),{'verbose':_0x24bb74['verbose']}),_0x230875=_0x30e45a[_0x583f13(0x33b)];console[_0x583f13(0x1fc)](_0x583f13(0x2e3)+_0x230875[_0x583f13(0x2ea)]+_0x583f13(0x31e)+(_0x230875['length']!==0x1?'s':''));if(_0x24bb74['format']===_0x583f13(0x2ce)||_0x24bb74['format']===_0x583f13(0x213))await handleSDKOutput(_0x230875,_0x24bb74);else{if(_0x230875['length']===0x0)console[_0x583f13(0x1a1)](_0x583f13(0x27b));else for(const _0x4ec743 of _0x230875){const _0x49f0e3=_0x4ec743[_0x583f13(0x283)]===_0x583f13(0x370)?'🚀':'📝',_0x5cb7d0=_0x4ec743[_0x583f13(0x1f0)]?a31_0x2e332c[_0x583f13(0x196)](_0x583f13(0x32c)):'',_0x38ef1e=a31_0x2e332c[_0x583f13(0x231)]('\x20('+_0x4ec743[_0x583f13(0x2de)]+'\x20stage'+(_0x4ec743[_0x583f13(0x2de)]!==0x1?'s':'')+')');console[_0x583f13(0x1a1)](_0x49f0e3+'\x20'+_0x4ec743[_0x583f13(0x25c)]+_0x5cb7d0+_0x38ef1e);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{['name']=a31_0xfeae4b(0x36b);['description']=a31_0xfeae4b(0x1c2);async[a31_0xfeae4b(0x245)](_0x4ec08e){const _0x19d95c=a31_0xfeae4b,{options:_0x2172ce,args:_0x3646ba,tdx:_0x4b9e73}=_0x4ec08e,_0x3e3725=_0x3646ba[0x0];if(!_0x3e3725)return console[_0x19d95c(0x1fc)](a31_0x2e332c[_0x19d95c(0x25a)](_0x19d95c(0x26d))),console[_0x19d95c(0x1fc)](_0x19d95c(0x1bb)),console[_0x19d95c(0x1fc)](a31_0x2e332c['dim'](_0x19d95c(0x343))),0x1;_0x2172ce[_0x19d95c(0x350)]&&(console[_0x19d95c(0x1fc)]('Site:\x20'+_0x2172ce[_0x19d95c(0x193)]),console['error'](_0x19d95c(0x235)+_0x3e3725));const _0x494568=await withSpinner('Pausing\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x3e3725+_0x19d95c(0x291),()=>_0x4b9e73['realtime'][_0x19d95c(0x313)](_0x3e3725),{'verbose':_0x2172ce['verbose']}),_0x142125=_0x494568[_0x19d95c(0x33b)];console[_0x19d95c(0x1fc)]('✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x142125[_0x19d95c(0x25c)]+'\x27');if(_0x2172ce[_0x19d95c(0x2c1)]==='json'||_0x2172ce['format']===_0x19d95c(0x213))await handleSDKOutput([_0x142125],_0x2172ce);else{const _0x1f4b3b=_0x142125[_0x19d95c(0x283)]==='launched'?'🚀':'📝',_0x264625=_0x142125[_0x19d95c(0x1f0)]?a31_0x2e332c[_0x19d95c(0x196)](_0x19d95c(0x32c)):'';console[_0x19d95c(0x1a1)](_0x1f4b3b+'\x20'+_0x142125[_0x19d95c(0x25c)]+_0x264625);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x29d);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x175);async[a31_0xfeae4b(0x245)](_0x4d7981){const _0x5a4c4c=a31_0xfeae4b,{options:_0x40fcd9,args:_0x249112,tdx:_0x436bac}=_0x4d7981,_0x4fce5b=_0x249112[0x0];if(!_0x4fce5b)return console[_0x5a4c4c(0x1fc)](a31_0x2e332c[_0x5a4c4c(0x25a)](_0x5a4c4c(0x26d))),console['error'](_0x5a4c4c(0x1d1)),console[_0x5a4c4c(0x1fc)](a31_0x2e332c[_0x5a4c4c(0x231)](_0x5a4c4c(0x343))),0x1;_0x40fcd9[_0x5a4c4c(0x350)]&&(console[_0x5a4c4c(0x1fc)](_0x5a4c4c(0x35a)+_0x40fcd9[_0x5a4c4c(0x193)]),console['error'](_0x5a4c4c(0x235)+_0x4fce5b));const _0x2d4c03=await withSpinner(_0x5a4c4c(0x2df)+_0x4fce5b+'\x27...',()=>_0x436bac['realtime'][_0x5a4c4c(0x36d)](_0x4fce5b),{'verbose':_0x40fcd9[_0x5a4c4c(0x350)]}),_0x1d61e2=_0x2d4c03[_0x5a4c4c(0x33b)];console[_0x5a4c4c(0x1fc)](_0x5a4c4c(0x2d4)+_0x1d61e2['name']+'\x27');if(_0x40fcd9[_0x5a4c4c(0x2c1)]===_0x5a4c4c(0x2ce)||_0x40fcd9[_0x5a4c4c(0x2c1)]===_0x5a4c4c(0x213))await handleSDKOutput([_0x1d61e2],_0x40fcd9);else{const _0x43f5f3=_0x1d61e2[_0x5a4c4c(0x283)]===_0x5a4c4c(0x370)?'🚀':'📝',_0x568fb4=_0x1d61e2['paused']?a31_0x2e332c[_0x5a4c4c(0x196)](_0x5a4c4c(0x32c)):'';console[_0x5a4c4c(0x1a1)](_0x43f5f3+'\x20'+_0x1d61e2[_0x5a4c4c(0x25c)]+_0x568fb4);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a31_0xfeae4b(0x300);['description']=a31_0xfeae4b(0x27f);async[a31_0xfeae4b(0x245)](_0x4e8100){const _0x16a49f=a31_0xfeae4b,{options:_0x11b93a,args:_0xdbfd3c,tdx:_0x322fbd}=_0x4e8100,_0x1e8bed=_0xdbfd3c[0x0]||_0x11b93a[_0x16a49f(0x2fa)];if(!_0x1e8bed)return showParentSegmentNotSetError(_0x16a49f(0x248)+_0x16a49f(0x1cb)),0x1;_0x11b93a[_0x16a49f(0x350)]&&(console['error'](_0x16a49f(0x35a)+_0x11b93a[_0x16a49f(0x193)]),console['error'](_0x16a49f(0x244)+_0x1e8bed));const _0x10cffb=await withSpinner(_0x16a49f(0x19c)+_0x1e8bed+_0x16a49f(0x291),()=>_0x322fbd[_0x16a49f(0x330)][_0x16a49f(0x221)](_0x1e8bed),{'verbose':_0x11b93a['verbose']}),_0x25bad4=_0x10cffb[_0x16a49f(0x33b)],_0x38bfdd=await withSpinner(_0x16a49f(0x30a)+_0x1e8bed+'\x27...',()=>_0x322fbd['realtime'][_0x16a49f(0x215)](_0x25bad4),{'verbose':_0x11b93a[_0x16a49f(0x350)]}),_0x15921d=_0x38bfdd[_0x16a49f(0x33b)];return console[_0x16a49f(0x1fc)](_0x16a49f(0x208)),_0x11b93a[_0x16a49f(0x2c1)]===_0x16a49f(0x2ce)||_0x11b93a[_0x16a49f(0x2c1)]===_0x16a49f(0x213)?await handleSDKOutput([_0x15921d],_0x11b93a):(console['log'](_0x16a49f(0x1a9)+_0x15921d['id']),console[_0x16a49f(0x1a1)]('audienceId:\x20'+_0x15921d[_0x16a49f(0x261)]),console[_0x16a49f(0x1a1)](_0x16a49f(0x2b9)+_0x15921d[_0x16a49f(0x1a8)]),console['log'](_0x16a49f(0x1f5)+_0x15921d[_0x16a49f(0x219)]),console['log']('status:\x20'+_0x15921d[_0x16a49f(0x21c)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{['name']='ps:pz:service:list';['description']=a31_0xfeae4b(0x2da);async['execute'](_0x19b17a){const _0x33f450=a31_0xfeae4b,{options:_0x2bda90,args:_0x13ef8a,tdx:_0x11eed3}=_0x19b17a,_0x225e30=_0x13ef8a[0x0]||_0x2bda90[_0x33f450(0x2fa)];if(!_0x225e30)return showParentSegmentNotSetError(_0x33f450(0x2a1)+_0x33f450(0x262)),0x1;const _0x5711c4=await withSpinner(_0x33f450(0x19c)+_0x225e30+_0x33f450(0x291),()=>_0x11eed3[_0x33f450(0x330)][_0x33f450(0x221)](_0x225e30),{'verbose':_0x2bda90['verbose']}),_0x38c0c7=_0x5711c4[_0x33f450(0x33b)],_0x2b2d01=await withSpinner('Listing\x20personalization\x20services\x20for\x20\x27'+_0x225e30+_0x33f450(0x291),()=>_0x11eed3[_0x33f450(0x169)][_0x33f450(0x1b4)](_0x38c0c7),{'verbose':_0x2bda90[_0x33f450(0x350)]}),_0x1fb425=_0x2b2d01['data'];console[_0x33f450(0x1fc)](_0x33f450(0x2e3)+_0x1fb425[_0x33f450(0x2ea)]+_0x33f450(0x15d)+(_0x1fb425[_0x33f450(0x2ea)]!==0x1?'s':''));if(_0x2bda90[_0x33f450(0x2c1)]==='json'||_0x2bda90['format']==='jsonl')await handleSDKOutput(_0x1fb425,_0x2bda90);else{if(_0x1fb425[_0x33f450(0x2ea)]===0x0)console['log'](_0x33f450(0x178)),console[_0x33f450(0x1fc)](a31_0x2e332c[_0x33f450(0x1b9)](_0x33f450(0x2c0)));else for(const _0xaabc60 of _0x1fb425){console[_0x33f450(0x1a1)](a31_0x2e332c[_0x33f450(0x263)](_0xaabc60['name'])+'\x20'+a31_0x2e332c[_0x33f450(0x231)](_0x33f450(0x2b1)+_0xaabc60['id']+')'));_0xaabc60['description']&&console[_0x33f450(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x33f450(0x231)](_0xaabc60[_0x33f450(0x22f)]));if(_0xaabc60[_0x33f450(0x2cf)]&&_0xaabc60[_0x33f450(0x2cf)]['length']>0x0)for(const _0x179aa6 of _0xaabc60[_0x33f450(0x2cf)]){const _0x3b00bd=_0x179aa6[_0x33f450(0x377)]?.[_0x33f450(0x2ea)]?_0x179aa6['allowedIps'][_0x33f450(0x251)](',\x20'):'any';console['log']('\x20\x20'+a31_0x2e332c[_0x33f450(0x1b9)](_0x33f450(0x1fe))+'\x20'+_0x179aa6[_0x33f450(0x25c)]+'\x20'+a31_0x2e332c[_0x33f450(0x231)]('(id:\x20'+_0x179aa6['id']+')')),console['log'](_0x33f450(0x182)+a31_0x2e332c[_0x33f450(0x231)]('allowed\x20IPs:')+'\x20'+_0x3b00bd);}else console[_0x33f450(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x33f450(0x231)](_0x33f450(0x2c7)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]='ps:pz:service:create';[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x1ca);async[a31_0xfeae4b(0x245)](_0x52148a){const _0xe40540=a31_0xfeae4b,{options:_0x5073af,args:_0x1fde3b,tdx:_0x20b2bb}=_0x52148a,_0x30888b=_0x5073af,_0x411f45=_0x1fde3b[0x0],_0x824446=_0x1fde3b[0x1]||_0x5073af[_0xe40540(0x2fa)];if(!_0x411f45)return console[_0xe40540(0x1fc)](_0xe40540(0x1a3)),console[_0xe40540(0x1fc)](_0xe40540(0x381)),console['error'](_0xe40540(0x242)),0x1;if(!_0x824446)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a'+_0xe40540(0x242)),0x1;const _0x328111=await withSpinner(_0xe40540(0x19c)+_0x824446+_0xe40540(0x291),()=>_0x20b2bb[_0xe40540(0x330)][_0xe40540(0x221)](_0x824446),{'verbose':_0x5073af[_0xe40540(0x350)]}),_0x1fa4ad=_0x328111[_0xe40540(0x33b)],_0x4cf377={'name':_0x411f45,'description':_0x30888b['description'],'public':_0x30888b[_0xe40540(0x1f8)]},_0x2fb49d=await withSpinner(_0xe40540(0x35e)+_0x411f45+_0xe40540(0x291),()=>_0x20b2bb[_0xe40540(0x169)]['create'](_0x1fa4ad,_0x4cf377),{'verbose':_0x5073af['verbose']}),_0x11582b=_0x2fb49d[_0xe40540(0x33b)];return console[_0xe40540(0x1fc)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0x11582b['name']+'\x27\x20with\x20ID:\x20'+_0x11582b['id']),await handleSDKOutput([_0x11582b],_0x5073af),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x16e);['description']='Show\x20personalization\x20service\x20details';async[a31_0xfeae4b(0x245)](_0x380444){const _0x1fc0f7=a31_0xfeae4b,{options:_0x3c320c,args:_0x515b2d,tdx:_0x7be29a}=_0x380444,_0x146820=_0x515b2d[0x0],_0x48ca94=_0x515b2d[0x1]||_0x3c320c[_0x1fc0f7(0x2fa)];if(!_0x146820)return console['error'](_0x1fc0f7(0x1ee)),console['error'](_0x1fc0f7(0x229)),console[_0x1fc0f7(0x1fc)](_0x1fc0f7(0x1de)),0x1;if(!_0x48ca94)return showParentSegmentNotSetError(_0x1fc0f7(0x31a)+_0x1fc0f7(0x1de)),0x1;const _0x56d5df=await withSpinner(_0x1fc0f7(0x19c)+_0x48ca94+_0x1fc0f7(0x291),()=>_0x7be29a['segment'][_0x1fc0f7(0x221)](_0x48ca94),{'verbose':_0x3c320c[_0x1fc0f7(0x350)]}),_0x3657bb=_0x56d5df[_0x1fc0f7(0x33b)],_0x44aebd=await withSpinner('Fetching\x20personalization\x20service\x20\x27'+_0x146820+_0x1fc0f7(0x291),()=>_0x7be29a['personalization']['get'](_0x3657bb,_0x146820),{'verbose':_0x3c320c['verbose']}),_0x1955cd=_0x44aebd[_0x1fc0f7(0x33b)];if(_0x3c320c['json']||_0x3c320c[_0x1fc0f7(0x213)])await handleSDKOutput([_0x1955cd],_0x3c320c);else{console[_0x1fc0f7(0x1a1)](a31_0x2e332c[_0x1fc0f7(0x263)](_0x1955cd[_0x1fc0f7(0x25c)])+'\x20'+a31_0x2e332c[_0x1fc0f7(0x231)](_0x1fc0f7(0x2b1)+_0x1955cd['id']+')'));_0x1955cd[_0x1fc0f7(0x22f)]&&console['log']('\x20\x20'+a31_0x2e332c[_0x1fc0f7(0x231)](_0x1955cd['description']));console[_0x1fc0f7(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x1fc0f7(0x1b9)](_0x1fc0f7(0x346))+'\x20'+(_0x1955cd['public']?'yes':'no'));if(_0x1955cd['tokens']&&_0x1955cd[_0x1fc0f7(0x2cf)][_0x1fc0f7(0x2ea)]>0x0)for(const _0x56fa86 of _0x1955cd[_0x1fc0f7(0x2cf)]){const _0x8b7d25=_0x56fa86['allowedIps']?.[_0x1fc0f7(0x2ea)]?_0x56fa86[_0x1fc0f7(0x377)][_0x1fc0f7(0x251)](',\x20'):_0x1fc0f7(0x1df);console[_0x1fc0f7(0x1a1)]('\x20\x20'+a31_0x2e332c['cyan'](_0x1fc0f7(0x1fe))+'\x20'+_0x56fa86[_0x1fc0f7(0x25c)]+'\x20'+a31_0x2e332c[_0x1fc0f7(0x231)](_0x1fc0f7(0x2b1)+_0x56fa86['id']+')')),console[_0x1fc0f7(0x1a1)](_0x1fc0f7(0x182)+a31_0x2e332c['dim'](_0x1fc0f7(0x2f3))+'\x20'+_0x8b7d25);}else console[_0x1fc0f7(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x1fc0f7(0x231)](_0x1fc0f7(0x2c7)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x173);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x265);async[a31_0xfeae4b(0x245)](_0x4f502b){const _0x549fe4=a31_0xfeae4b,{options:_0x2b32aa,args:_0x786f40,tdx:_0x34ab5c}=_0x4f502b,_0x315fdc=_0x786f40[0x0],_0x2bd4ea=_0x786f40[0x1]||_0x2b32aa['parentSegment'];if(!_0x315fdc)return console[_0x549fe4(0x1fc)](_0x549fe4(0x1ee)),console[_0x549fe4(0x1fc)](_0x549fe4(0x165)),console[_0x549fe4(0x1fc)](_0x549fe4(0x1db)),0x1;if(!_0x2bd4ea)return showParentSegmentNotSetError(_0x549fe4(0x362)+_0x549fe4(0x1db)),0x1;const _0x30a70e=await withSpinner(_0x549fe4(0x19c)+_0x2bd4ea+_0x549fe4(0x291),()=>_0x34ab5c[_0x549fe4(0x330)]['resolveParentId'](_0x2bd4ea),{'verbose':_0x2b32aa[_0x549fe4(0x350)]}),_0x322c23=_0x30a70e['data'];return await withSpinner(_0x549fe4(0x2ba)+_0x315fdc+_0x549fe4(0x291),()=>_0x34ab5c[_0x549fe4(0x169)][_0x549fe4(0x31b)](_0x322c23,_0x315fdc),{'verbose':_0x2b32aa['verbose']}),console['error'](_0x549fe4(0x35b)+_0x315fdc+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{['name']=a31_0xfeae4b(0x264);[a31_0xfeae4b(0x22f)]='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async['execute'](_0xf0a49f){const _0x14ed32=a31_0xfeae4b,{options:_0x422c47,args:_0x1962cd,tdx:_0x539b6d}=_0xf0a49f,_0x5a66d8=_0x422c47,_0x181a69=_0x1962cd[0x0],_0x4da632=_0x1962cd[0x1]||_0x422c47[_0x14ed32(0x2fa)];if(!_0x181a69)return console[_0x14ed32(0x1fc)](_0x14ed32(0x1ee)),console[_0x14ed32(0x1fc)](_0x14ed32(0x2cc)),console[_0x14ed32(0x1fc)](_0x14ed32(0x360)),0x1;if(!_0x5a66d8[_0x14ed32(0x25c)])return console[_0x14ed32(0x1fc)](_0x14ed32(0x372)),console[_0x14ed32(0x1fc)](_0x14ed32(0x2cc)),0x1;if(!_0x4da632)return showParentSegmentNotSetError(_0x14ed32(0x24b)+_0x14ed32(0x360)),0x1;const _0x1b1d71=await withSpinner(_0x14ed32(0x19c)+_0x4da632+_0x14ed32(0x291),()=>_0x539b6d[_0x14ed32(0x330)]['resolveParentId'](_0x4da632),{'verbose':_0x422c47[_0x14ed32(0x350)]}),_0x1ccb2e=_0x1b1d71['data'],_0x295fdd={'name':_0x5a66d8[_0x14ed32(0x25c)]};_0x5a66d8[_0x14ed32(0x22f)]!==undefined&&(_0x295fdd['description']=_0x5a66d8[_0x14ed32(0x22f)]);const _0x3dc7b4=await withSpinner(_0x14ed32(0x366)+_0x181a69+_0x14ed32(0x291),()=>_0x539b6d['personalization'][_0x14ed32(0x1be)](_0x1ccb2e,_0x181a69,_0x295fdd),{'verbose':_0x422c47[_0x14ed32(0x350)]}),_0x3b6342=_0x3dc7b4[_0x14ed32(0x33b)];return console[_0x14ed32(0x1fc)](_0x14ed32(0x284)+_0x3b6342[_0x14ed32(0x25c)]+'\x27'),await handleSDKOutput([_0x3b6342],_0x422c47),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{['name']=a31_0xfeae4b(0x33e);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x23f);async['execute'](_0x19a20a){const _0xbd2ea=a31_0xfeae4b,{options:_0x4d380b,args:_0x1b52ce,tdx:_0x54b750}=_0x19a20a,_0x33a874=_0x4d380b,_0xb84c53=_0x1b52ce[0x0],_0x222c40=_0x1b52ce[0x1],_0x36cc66=_0x1b52ce[0x2]||_0x4d380b[_0xbd2ea(0x2fa)];if(!_0xb84c53)return console[_0xbd2ea(0x1fc)](_0xbd2ea(0x326)),console[_0xbd2ea(0x1fc)](_0xbd2ea(0x27c)),console[_0xbd2ea(0x1fc)](_0xbd2ea(0x1bc)),0x1;if(!_0x222c40)return console['error'](_0xbd2ea(0x1ee)),console[_0xbd2ea(0x1fc)](_0xbd2ea(0x27c)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x36cc66)return showParentSegmentNotSetError(_0xbd2ea(0x22b)+_0xbd2ea(0x1bc)),0x1;const _0x22a680=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x36cc66+'\x27...',()=>_0x54b750['segment'][_0xbd2ea(0x221)](_0x36cc66),{'verbose':_0x4d380b[_0xbd2ea(0x350)]}),_0x2e59d9=_0x22a680[_0xbd2ea(0x33b)],_0x13f98e={'name':_0xb84c53};_0x33a874[_0xbd2ea(0x377)]&&(_0x13f98e[_0xbd2ea(0x377)]=_0x33a874['allowedIps']['split'](',')[_0xbd2ea(0x20d)](_0x253fc0=>_0x253fc0[_0xbd2ea(0x26b)]()));_0x33a874[_0xbd2ea(0x22f)]&&(_0x13f98e[_0xbd2ea(0x22f)]=_0x33a874['description']);const _0x2ad8e5=await withSpinner('Creating\x20token\x20\x27'+_0xb84c53+_0xbd2ea(0x37b)+_0x222c40+_0xbd2ea(0x291),()=>_0x54b750[_0xbd2ea(0x169)][_0xbd2ea(0x2ed)](_0x2e59d9,_0x222c40,_0x13f98e),{'verbose':_0x4d380b[_0xbd2ea(0x350)]}),_0x31d38e=_0x2ad8e5[_0xbd2ea(0x33b)];return console[_0xbd2ea(0x1fc)]('✔\x20Created\x20token\x20\x27'+_0x31d38e[_0xbd2ea(0x25c)]+'\x27\x20with\x20ID:\x20'+_0x31d38e['id']),_0x31d38e[_0xbd2ea(0x2c3)]&&(console['error'](a31_0x2e332c[_0xbd2ea(0x196)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0xbd2ea(0x1fc)](a31_0x2e332c[_0xbd2ea(0x1b9)](_0x31d38e[_0xbd2ea(0x2c3)])),console['error']('')),await handleSDKOutput([_0x31d38e],_0x4d380b),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x1b7);[a31_0xfeae4b(0x22f)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async[a31_0xfeae4b(0x245)](_0x5719e6){const _0x2aa356=a31_0xfeae4b,{options:_0x33f8c5,args:_0x3e7f21,tdx:_0x5d9b6f}=_0x5719e6,_0x2395c3=_0x3e7f21[0x0],_0x4ef3ef=_0x3e7f21[0x1]||_0x33f8c5[_0x2aa356(0x2fa)];if(!_0x2395c3)return console[_0x2aa356(0x1fc)](_0x2aa356(0x1d4)),console[_0x2aa356(0x1fc)](_0x2aa356(0x22d)),console[_0x2aa356(0x1fc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x4ef3ef)return showParentSegmentNotSetError(_0x2aa356(0x351)+_0x2aa356(0x20a)),0x1;const _0x3a00ab=await withSpinner(_0x2aa356(0x19c)+_0x4ef3ef+_0x2aa356(0x291),()=>_0x5d9b6f[_0x2aa356(0x330)]['resolveParentId'](_0x4ef3ef),{'verbose':_0x33f8c5[_0x2aa356(0x350)]}),_0x32dccd=_0x3a00ab[_0x2aa356(0x33b)],_0x9f4072=await withSpinner(_0x2aa356(0x34d),()=>_0x5d9b6f[_0x2aa356(0x169)][_0x2aa356(0x1b4)](_0x32dccd),{'verbose':_0x33f8c5[_0x2aa356(0x350)]}),_0xbb0484=_0x9f4072['data'];let _0x52ff08;for(const _0x367304 of _0xbb0484){if(_0x367304[_0x2aa356(0x2cf)]?.[_0x2aa356(0x176)](_0x1d5041=>_0x1d5041['id']===_0x2395c3)){_0x52ff08=_0x367304['id'];break;}}if(!_0x52ff08)return console['error'](_0x2aa356(0x23b)+_0x2395c3+_0x2aa356(0x316)),0x1;const _0x5b8e6e=await withSpinner(_0x2aa356(0x388)+_0x2395c3+'\x27...',()=>_0x5d9b6f[_0x2aa356(0x169)][_0x2aa356(0x1a7)](_0x32dccd,_0x52ff08,_0x2395c3),{'verbose':_0x33f8c5[_0x2aa356(0x350)]}),_0x5c05c9=_0x5b8e6e['data'];return console['error']('✔\x20Deleted\x20token\x20\x27'+(_0x5c05c9[_0x2aa356(0x25c)]||_0x2395c3)+'\x27'),await handleSDKOutput([_0x5c05c9],_0x33f8c5),0x0;}}export class PSPzListCommand extends BaseCommand{['name']=a31_0xfeae4b(0x2ff);[a31_0xfeae4b(0x22f)]='List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment';async[a31_0xfeae4b(0x245)](_0x35446b){const _0x2c93bb=a31_0xfeae4b,{options:_0xaca5b0,args:_0x1286b7,tdx:_0x49af61}=_0x35446b,_0x1e4eb0=_0x1286b7[0x0]||_0xaca5b0['parentSegment'];if(!_0x1e4eb0)return showParentSegmentNotSetError(_0x2c93bb(0x2d5)+_0x2c93bb(0x2af)),0x1;const _0x3f214b=await withSpinner(_0x2c93bb(0x19c)+_0x1e4eb0+'\x27...',()=>_0x49af61['segment'][_0x2c93bb(0x221)](_0x1e4eb0),{'verbose':_0xaca5b0['verbose']}),_0x7ccecf=_0x3f214b[_0x2c93bb(0x33b)],_0x5505b8=await withSpinner(_0x2c93bb(0x204)+_0x1e4eb0+'\x27...',()=>_0x49af61['personalization'][_0x2c93bb(0x2e2)](_0x7ccecf),{'verbose':_0xaca5b0[_0x2c93bb(0x350)]}),_0x1bdf72=_0x5505b8[_0x2c93bb(0x33b)];console[_0x2c93bb(0x1fc)](_0x2c93bb(0x2e3)+_0x1bdf72['length']+_0x2c93bb(0x207)+(_0x1bdf72['length']!==0x1?'s':''));if(_0xaca5b0[_0x2c93bb(0x2c1)]===_0x2c93bb(0x2ce)||_0xaca5b0[_0x2c93bb(0x2c1)]===_0x2c93bb(0x213))await handleSDKOutput(_0x1bdf72,_0xaca5b0);else{if(_0x1bdf72['length']===0x0)console[_0x2c93bb(0x1a1)](_0x2c93bb(0x232));else for(const _0x1e0d6d of _0x1bdf72){console[_0x2c93bb(0x1a1)](a31_0x2e332c['bold'](_0x1e0d6d['name'])+'\x20'+a31_0x2e332c[_0x2c93bb(0x231)](_0x2c93bb(0x2b1)+_0x1e0d6d['id']+')'));_0x1e0d6d[_0x2c93bb(0x22f)]&&console[_0x2c93bb(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x2c93bb(0x231)](_0x1e0d6d[_0x2c93bb(0x22f)]));const _0x58cf74=_0x1e0d6d[_0x2c93bb(0x2b6)]?.[_0x2c93bb(0x2ea)]||0x0;console[_0x2c93bb(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x2c93bb(0x1b9)](_0x2c93bb(0x2e0))+'\x20'+_0x58cf74);if(_0x1e0d6d[_0x2c93bb(0x2b6)]&&_0x1e0d6d[_0x2c93bb(0x2b6)][_0x2c93bb(0x2ea)]>0x0)for(const _0x3e562c of _0x1e0d6d[_0x2c93bb(0x2b6)]){console[_0x2c93bb(0x1a1)](_0x2c93bb(0x1fb)+_0x3e562c['name']);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]='ps:pz:show';[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x20e);async[a31_0xfeae4b(0x245)](_0x1a2534){const _0x372792=a31_0xfeae4b,{options:_0x3142e6,args:_0x4d19aa,tdx:_0xa96082}=_0x1a2534,_0x1dbec6=_0x4d19aa[0x0];if(!_0x1dbec6)return console[_0x372792(0x1fc)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x372792(0x1fc)]('Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>'),0x1;const _0x400e9d=await withSpinner(_0x372792(0x369)+_0x1dbec6+_0x372792(0x291),()=>_0xa96082['personalization'][_0x372792(0x356)](_0x1dbec6),{'verbose':_0x3142e6['verbose']}),_0x59d6b7=_0x400e9d[_0x372792(0x33b)];console['error'](_0x372792(0x320)+_0x59d6b7[_0x372792(0x25c)]+'\x27');if(_0x3142e6[_0x372792(0x2c1)]==='json'||_0x3142e6[_0x372792(0x2c1)]===_0x372792(0x213))await handleSDKOutput([_0x59d6b7],_0x3142e6);else{console[_0x372792(0x1a1)](a31_0x2e332c[_0x372792(0x263)](_0x59d6b7[_0x372792(0x25c)])+'\x20'+a31_0x2e332c[_0x372792(0x231)]('(id:\x20'+_0x59d6b7['id']+')'));_0x59d6b7['description']&&console[_0x372792(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x372792(0x231)](_0x59d6b7['description']));_0x59d6b7[_0x372792(0x261)]&&console['log']('\x20\x20'+a31_0x2e332c[_0x372792(0x1b9)](_0x372792(0x170))+'\x20'+_0x59d6b7['audienceId']);console[_0x372792(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x372792(0x1b9)]('created:')+'\x20'+_0x59d6b7[_0x372792(0x2bb)]),console[_0x372792(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x372792(0x1b9)](_0x372792(0x2c6))+'\x20'+_0x59d6b7[_0x372792(0x1ad)]);const _0x2e96c8=_0x59d6b7['sections']?.[_0x372792(0x2ea)]||0x0;console[_0x372792(0x1a1)]('\x20\x20'+a31_0x2e332c[_0x372792(0x1b9)](_0x372792(0x2e0))+'\x20'+_0x2e96c8);if(_0x59d6b7[_0x372792(0x2b6)]&&_0x59d6b7[_0x372792(0x2b6)][_0x372792(0x2ea)]>0x0)for(const _0x13a983 of _0x59d6b7['sections']){console[_0x372792(0x1a1)](_0x372792(0x182)+a31_0x2e332c[_0x372792(0x263)](_0x13a983[_0x372792(0x25c)])+'\x20'+a31_0x2e332c[_0x372792(0x231)](_0x372792(0x2b1)+_0x13a983['id']+')')),_0x13a983[_0x372792(0x282)]&&(console['log'](_0x372792(0x209)+a31_0x2e332c[_0x372792(0x1b9)]('entryCriteria:')+'\x20'+_0x13a983[_0x372792(0x282)][_0x372792(0x25c)]),_0x13a983[_0x372792(0x282)][_0x372792(0x211)]?.[_0x372792(0x1f4)]&&console[_0x372792(0x1a1)]('\x20\x20\x20\x20\x20\x20\x20\x20'+a31_0x2e332c[_0x372792(0x1b9)](_0x372792(0x1ac))+'\x20'+_0x13a983[_0x372792(0x282)][_0x372792(0x211)][_0x372792(0x1f4)])),_0x13a983[_0x372792(0x2fd)]&&console[_0x372792(0x1a1)](_0x372792(0x209)+a31_0x2e332c[_0x372792(0x1b9)]('payload:')+'\x20'+JSON[_0x372792(0x201)](_0x13a983[_0x372792(0x2fd)])),_0x13a983[_0x372792(0x1e2)]&&console[_0x372792(0x1a1)](_0x372792(0x209)+a31_0x2e332c[_0x372792(0x1b9)](_0x372792(0x269))+_0x372792(0x368));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{['name']=a31_0xfeae4b(0x2e5);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x1c9);async[a31_0xfeae4b(0x245)](_0x2fbc93){const _0x1d5f14=a31_0xfeae4b,{options:_0x53d030,args:_0x136a46,tdx:_0x36a4b6}=_0x2fbc93,_0x5db3b4=_0x136a46[0x0];if(!_0x5db3b4)return console[_0x1d5f14(0x1fc)](_0x1d5f14(0x2bc)),console[_0x1d5f14(0x1fc)]('Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>'),0x1;return await withSpinner(_0x1d5f14(0x21a)+_0x5db3b4+'\x27...',()=>_0x36a4b6[_0x1d5f14(0x169)][_0x1d5f14(0x279)](_0x5db3b4),{'verbose':_0x53d030[_0x1d5f14(0x350)]}),console[_0x1d5f14(0x1fc)]('✔\x20Deleted\x20personalization\x20\x27'+_0x5db3b4+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x1c6);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x185);async[a31_0xfeae4b(0x245)](_0x4026ec){const _0x6f4893=a31_0xfeae4b,{options:_0x572d7c,tdx:_0x578c1f}=_0x4026ec,_0x20d5ef=_0x572d7c;let _0x2475e7;if(_0x20d5ef[_0x6f4893(0x24a)]){_0x2475e7=await loadJSON(_0x20d5ef[_0x6f4893(0x24a)],!![]);if(!_0x2475e7[_0x6f4893(0x364)]?.[_0x6f4893(0x18b)])return console[_0x6f4893(0x1fc)](_0x6f4893(0x2f2)),console[_0x6f4893(0x1fc)](_0x6f4893(0x1ae)),console[_0x6f4893(0x1fc)]('\x20\x20\x22relationships\x22:\x20{\x20\x22parentFolder\x22:\x20{\x20\x22data\x22:\x20{\x20\x22id\x22:\x20\x22<id>\x22,\x20\x22type\x22:\x20\x22folder-segment\x22\x20}\x20}\x20}'),0x1;}else{if(!_0x20d5ef['name'])return console[_0x6f4893(0x1fc)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x6f4893(0x1fc)](_0x6f4893(0x35f)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x20d5ef[_0x6f4893(0x22f)]===undefined)return console['error'](_0x6f4893(0x226)),console[_0x6f4893(0x1fc)](_0x6f4893(0x35f)),console[_0x6f4893(0x1fc)](_0x6f4893(0x365)),0x1;if(_0x20d5ef[_0x6f4893(0x379)]===undefined)return console[_0x6f4893(0x1fc)](_0x6f4893(0x217)),console['error'](_0x6f4893(0x309)),0x1;let _0x437235=_0x20d5ef[_0x6f4893(0x261)];if(!_0x437235&&_0x572d7c[_0x6f4893(0x2fa)]){const _0x215841=await withSpinner(_0x6f4893(0x19c)+_0x572d7c[_0x6f4893(0x2fa)]+_0x6f4893(0x291),()=>_0x578c1f[_0x6f4893(0x330)][_0x6f4893(0x221)](_0x572d7c[_0x6f4893(0x2fa)]),{'verbose':_0x572d7c[_0x6f4893(0x350)]});_0x437235=_0x215841[_0x6f4893(0x33b)];}let _0x2cb0e3;_0x20d5ef[_0x6f4893(0x2b6)]&&(_0x2cb0e3=await loadJSON(_0x20d5ef['sections'],![]));const _0xf000fa=_0x20d5ef[_0x6f4893(0x379)]===_0x6f4893(0x1d5)?null:{'id':_0x20d5ef[_0x6f4893(0x379)],'type':_0x6f4893(0x27d)};_0x2475e7={'attributes':{'name':_0x20d5ef[_0x6f4893(0x25c)],'description':_0x20d5ef['description']||null,..._0x437235!==undefined&&{'audienceId':_0x437235},..._0x2cb0e3!==undefined&&{'sections':_0x2cb0e3}},'relationships':{'parentFolder':{'data':_0xf000fa}}};}const _0x13f107=await withSpinner(_0x6f4893(0x2dc)+(_0x2475e7[_0x6f4893(0x200)]?.[_0x6f4893(0x25c)]??'')+_0x6f4893(0x291),()=>_0x578c1f['personalization']['createPersonalization'](_0x2475e7),{'verbose':_0x572d7c['verbose']}),_0x4c5eb4=_0x13f107['data'];return console[_0x6f4893(0x1fc)]('✔\x20Created\x20personalization\x20\x27'+_0x4c5eb4['name']+_0x6f4893(0x307)+_0x4c5eb4['id']),await handleSDKOutput([_0x4c5eb4],_0x572d7c),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x36c);[a31_0xfeae4b(0x22f)]=a31_0xfeae4b(0x247);async['execute'](_0x5a0e0){const _0x24f241=a31_0xfeae4b,{options:_0x48a918,args:_0x4d038f}=_0x5a0e0,_0x226165=_0x48a918,_0x1ac502=_0x4d038f[0x0];if(!_0x1ac502)return console[_0x24f241(0x1fc)](_0x24f241(0x2bc)),console[_0x24f241(0x1fc)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0x24f241(0x1fc)](_0x24f241(0x162)),0x1;let _0x1c9235;if(_0x226165[_0x24f241(0x24a)])_0x1c9235=await loadJSON(_0x226165['file'],!![]);else{if(!_0x226165[_0x24f241(0x25c)])return console['error'](_0x24f241(0x302)),console[_0x24f241(0x1fc)](_0x24f241(0x28c)),0x1;if(_0x226165[_0x24f241(0x22f)]===undefined)return console[_0x24f241(0x1fc)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x24f241(0x1fc)](_0x24f241(0x28c)),0x1;let _0x20ed41;_0x226165[_0x24f241(0x2b6)]&&(_0x20ed41=await loadJSON(_0x226165['sections'],![])),_0x1c9235={'attributes':{'name':_0x226165[_0x24f241(0x25c)],'description':_0x226165[_0x24f241(0x22f)]||null,..._0x20ed41!==undefined&&{'sections':_0x20ed41}}};}const {tdx:_0x57d335}=_0x5a0e0,_0x31c5b3=await withSpinner(_0x24f241(0x1da)+_0x1ac502+_0x24f241(0x291),()=>_0x57d335[_0x24f241(0x169)][_0x24f241(0x1c3)](_0x1ac502,_0x1c9235),{'verbose':_0x48a918['verbose']}),_0x87394=_0x31c5b3[_0x24f241(0x33b)];return console[_0x24f241(0x1fc)](_0x24f241(0x31f)+_0x87394[_0x24f241(0x25c)]+_0x24f241(0x319)+_0x87394['id']+')'),await handleSDKOutput([_0x87394],_0x48a918),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0xfeae4b(0x25c)]=a31_0xfeae4b(0x32a);['description']=a31_0xfeae4b(0x32f);async[a31_0xfeae4b(0x245)](_0x101847){const _0x4cc576=a31_0xfeae4b,{options:_0x8a0136,args:_0x3020e1}=_0x101847,_0x1774f6=_0x3020e1[0x0]||_0x8a0136[_0x4cc576(0x2fa)];if(!_0x1774f6)return showParentSegmentNotSetError(_0x4cc576(0x34f)+_0x4cc576(0x1a5)),0x1;const _0x58b8c3=resolveYamlFile(_0x1774f6);if(!existsSync(_0x58b8c3))return showFileNotFoundError(_0x58b8c3,_0x1774f6),0x1;let _0x389ff5;try{_0x389ff5=readFileSync(_0x58b8c3,'utf-8');}catch(_0x3ce68e){const _0x492f33=_0x3ce68e instanceof Error?_0x3ce68e[_0x4cc576(0x1e9)]:String(_0x3ce68e);return console[_0x4cc576(0x1fc)](_0x4cc576(0x375)+_0x492f33),0x1;}let _0x32bd4c;try{_0x32bd4c=parseDef(_0x389ff5);}catch(_0x1568f9){const _0x4cd57b=_0x1568f9 instanceof Error?_0x1568f9['message']:String(_0x1568f9);return console[_0x4cc576(0x1fc)](a31_0x2e332c[_0x4cc576(0x25a)]('Error\x20parsing\x20YAML:\x20'+_0x4cd57b)),0x1;}if(_0x32bd4c['personalization_services']&&_0x32bd4c[_0x4cc576(0x2be)][_0x4cc576(0x2ea)]>0x0)return console['error'](a31_0x2e332c['yellow'](_0x4cc576(0x1c0)+_0x58b8c3)),console[_0x4cc576(0x1fc)](a31_0x2e332c[_0x4cc576(0x231)](_0x4cc576(0x199)+_0x32bd4c[_0x4cc576(0x2be)]['length']+'\x20service(s)\x20configured')),0x1;!_0x32bd4c['realtime']&&(_0x32bd4c[_0x4cc576(0x1f6)]={'events':[{'name':_0x4cc576(0x2b4),'source_table':_0x4cc576(0x384)}],'attributes':[{'name':_0x4cc576(0x334),'type':_0x4cc576(0x164)}],'id_stitching':{'primary_key':_0x32bd4c[_0x4cc576(0x1f3)][_0x4cc576(0x328)]===_0x4cc576(0x314)?_0x4cc576(0x189):'user_id'}});_0x32bd4c[_0x4cc576(0x2be)]=[{'name':'My\x20Service','description':_0x4cc576(0x37f),'trigger_event':_0x4cc576(0x2b4),'sections':[{'name':'Default','criteria':_0x4cc576(0x21d),'attributes':[_0x4cc576(0x334)]}]}];const _0x1b7a51=serializeDef(_0x32bd4c);return writeFileSync(_0x58b8c3,_0x1b7a51,_0x4cc576(0x2aa)),console[_0x4cc576(0x1fc)](a31_0x2e332c[_0x4cc576(0x29c)]('✔')+_0x4cc576(0x1f1)+a31_0x2e332c['cyan'](_0x58b8c3)),(!_0x32bd4c[_0x4cc576(0x1f6)]||_0x389ff5[_0x4cc576(0x16c)](_0x4cc576(0x36f))===-0x1)&&console[_0x4cc576(0x1fc)](a31_0x2e332c['green']('✔')+_0x4cc576(0x179)),console[_0x4cc576(0x1fc)]('\x0a'+a31_0x2e332c[_0x4cc576(0x231)]('Next\x20steps:')),console[_0x4cc576(0x1fc)](_0x4cc576(0x160)+_0x58b8c3+_0x4cc576(0x373)),console[_0x4cc576(0x1fc)](_0x4cc576(0x292)+a31_0x2e332c[_0x4cc576(0x231)]('tdx\x20ps\x20push\x20'+_0x1774f6)+_0x4cc576(0x2ef)),0x0;}}
1
+ const a31_0x3a88a7=a31_0x2b70;(function(_0x4ffd49,_0x57b42d){const _0x45f8bb=a31_0x2b70,_0x484ded=_0x4ffd49();while(!![]){try{const _0x263b24=parseInt(_0x45f8bb(0x162))/0x1*(-parseInt(_0x45f8bb(0x237))/0x2)+-parseInt(_0x45f8bb(0x28d))/0x3+-parseInt(_0x45f8bb(0x22a))/0x4+-parseInt(_0x45f8bb(0x16e))/0x5+-parseInt(_0x45f8bb(0xd7))/0x6*(parseInt(_0x45f8bb(0x194))/0x7)+parseInt(_0x45f8bb(0x1b3))/0x8+-parseInt(_0x45f8bb(0x1fa))/0x9*(-parseInt(_0x45f8bb(0x1d3))/0xa);if(_0x263b24===_0x57b42d)break;else _0x484ded['push'](_0x484ded['shift']());}catch(_0x584e41){_0x484ded['push'](_0x484ded['shift']());}}}(a31_0x547b,0x5eb0d));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x323afe from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a31_0x3024fb from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a31_0x3a88a7(0x22b),LEGACY_PARENT_SEGMENT_DIR=a31_0x3a88a7(0x13c);function openBrowser(_0x286f6a){const _0x171d8d=a31_0x3a88a7,_0x4d29a0=process[_0x171d8d(0x281)],_0x190bc8=_0x4d29a0===_0x171d8d(0x2d8)?_0x171d8d(0xd2):_0x4d29a0===_0x171d8d(0x20e)?_0x171d8d(0x2e8):_0x171d8d(0x19e);spawn(_0x190bc8,[_0x286f6a],{'detached':!![],'stdio':_0x171d8d(0x24b)})['unref']();}function migrateLegacyDirectory(){const _0x6eb2f4=a31_0x3a88a7;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x1e0c56=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x1e0c56[_0x6eb2f4(0x135)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a31_0x3024fb['yellow'](_0x6eb2f4(0x2da)+LEGACY_PARENT_SEGMENT_DIR+_0x6eb2f4(0x150)+PARENT_SEGMENT_DIR+_0x6eb2f4(0x167))),console[_0x6eb2f4(0xfc)](a31_0x3024fb[_0x6eb2f4(0x179)](_0x6eb2f4(0x12f)+LEGACY_PARENT_SEGMENT_DIR+_0x6eb2f4(0x19d))),![];console[_0x6eb2f4(0xfc)](a31_0x3024fb[_0x6eb2f4(0x16b)]('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x6eb2f4(0x244)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x6eb2f4(0xfc)](a31_0x3024fb['green'](_0x6eb2f4(0x251)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x470e13){const _0x14da1d=_0x470e13 instanceof Error?_0x470e13[_0x6eb2f4(0x120)]:String(_0x470e13);return console[_0x6eb2f4(0xfc)](a31_0x3024fb[_0x6eb2f4(0xe9)]('✘\x20Failed\x20to\x20rename\x20directory:\x20'+_0x14da1d+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x3a88a7(0x1bf)](_0x19f5b7){const _0x2fbbd8=a31_0x3a88a7;return migrateLegacyDirectory(),super[_0x2fbbd8(0x1bf)](_0x19f5b7);}}function resolveYamlFile(_0x122153){const _0x35a2f2=a31_0x3a88a7;if(_0x122153[_0x35a2f2(0x161)](_0x35a2f2(0x11c))||_0x122153[_0x35a2f2(0x161)](_0x35a2f2(0x1d1)))return _0x122153;return a31_0x323afe[_0x35a2f2(0x1ee)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x122153)+_0x35a2f2(0x11c));}function formatProgressMessage(_0x15bf23){const _0x22ee68=a31_0x3a88a7,_0x36525c=_0x15bf23[_0x22ee68(0x182)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x36525c){const [,_0x557110,_0x508ac3,_0x4e1b72='']=_0x36525c;return a31_0x3024fb[_0x22ee68(0x179)](_0x557110+':')+'\x20'+_0x508ac3+a31_0x3024fb['dim'](_0x4e1b72);}return a31_0x3024fb['dim'](_0x15bf23);}function showFileNotFoundError(_0x7282db,_0x5d3528){const _0x15ece1=a31_0x3a88a7;console[_0x15ece1(0xfc)](a31_0x3024fb[_0x15ece1(0xe9)](_0x15ece1(0x212)+_0x7282db+'\x0a')),console[_0x15ece1(0xfc)](a31_0x3024fb[_0x15ece1(0x2d6)](_0x15ece1(0x27a)+_0x5d3528+_0x15ece1(0x252)));}function displayRealtimeValidation(_0x16315e){const _0x254196=a31_0x3a88a7;if(!_0x16315e[_0x254196(0x229)])return;const _0x2a616f=_0x16315e['realtime'],_0x34bb31=_0x2a616f['enabled']?a31_0x3024fb[_0x254196(0x20f)]('⚡\x20Enabled'):a31_0x3024fb['yellow']('⚡\x20Not\x20enabled');console['error']('\x0a'+a31_0x3024fb[_0x254196(0x179)](_0x254196(0x232))+'\x20'+_0x34bb31);if(_0x2a616f[_0x254196(0x1a4)]&&_0x2a616f[_0x254196(0x1a4)][_0x254196(0x2d7)]>0x0){console[_0x254196(0xfc)]('\x20\x20'+a31_0x3024fb['dim'](_0x254196(0x199))+'\x20'+_0x2a616f[_0x254196(0x1a4)][_0x254196(0x2d7)]+_0x254196(0x28f));for(const _0x58dec8 of _0x2a616f[_0x254196(0x1a4)]){const _0x5cc7e0=_0x58dec8[_0x254196(0x1d6)]===![]?a31_0x3024fb[_0x254196(0xe9)]('✘'):a31_0x3024fb[_0x254196(0x20f)]('✔');console[_0x254196(0xfc)](_0x254196(0xfa)+_0x5cc7e0+'\x20'+_0x58dec8[_0x254196(0x12c)]),_0x58dec8[_0x254196(0x1f1)]&&console[_0x254196(0xfc)]('\x20\x20\x20\x20\x20\x20'+a31_0x3024fb[_0x254196(0xe9)](_0x58dec8[_0x254196(0x1f1)]));}}if(_0x2a616f[_0x254196(0x1cd)]&&_0x2a616f[_0x254196(0x1cd)][_0x254196(0x2d7)]>0x0){console[_0x254196(0xfc)]('\x20\x20'+a31_0x3024fb['dim'](_0x254196(0x1a7))+'\x20'+_0x2a616f['attributes'][_0x254196(0x2d7)]+_0x254196(0x28f));for(const _0xf715d8 of _0x2a616f[_0x254196(0x1cd)]){const _0x57d895=_0xf715d8[_0x254196(0x275)]?a31_0x3024fb[_0x254196(0x20f)]('✔'):a31_0x3024fb[_0x254196(0xe9)]('✘');console[_0x254196(0xfc)](_0x254196(0xfa)+_0x57d895+'\x20'+_0xf715d8['name']+'\x20'+a31_0x3024fb['dim']('('+_0xf715d8['type']+')'));}}if(_0x2a616f[_0x254196(0x26b)]){const _0x1f3cc0=_0x2a616f['idStitching'][_0x254196(0x245)]?.[_0x254196(0x2d7)]?_0x254196(0x12b)+_0x2a616f[_0x254196(0x26b)][_0x254196(0x245)][_0x254196(0x1ee)](',\x20')+']':'';console[_0x254196(0xfc)]('\x20\x20'+a31_0x3024fb['dim'](_0x254196(0x280))+'\x20'+_0x2a616f[_0x254196(0x26b)][_0x254196(0x2df)]+_0x1f3cc0);}if(_0x2a616f['personalizationServices']&&_0x2a616f['personalizationServices'][_0x254196(0x2d7)]>0x0){console[_0x254196(0xfc)]('\x20\x20'+a31_0x3024fb['dim'](_0x254196(0x2e7))+'\x20'+_0x2a616f[_0x254196(0x1b1)][_0x254196(0x2d7)]+_0x254196(0x22d)+(_0x2a616f[_0x254196(0x1b1)][_0x254196(0x2d7)]!==0x1?'s':''));for(const _0x343501 of _0x2a616f[_0x254196(0x1b1)]){console[_0x254196(0xfc)](_0x254196(0x25b)+_0x343501[_0x254196(0x12c)]);}}}function showParentSegmentNotSetError(_0x343100){const _0x1acff4=a31_0x3a88a7;console[_0x1acff4(0xfc)](a31_0x3024fb['yellow'](_0x1acff4(0x2e9))),console[_0x1acff4(0xfc)](_0x343100);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0xe4);['description']=a31_0x3a88a7(0x1b0);async[a31_0x3a88a7(0xcf)](_0x4293df){const _0x4284b9=a31_0x3a88a7,{options:_0x517980,args:_0x51d531,tdx:_0x5f16a8}=_0x4293df,_0x4a2b92=_0x51d531[0x0];_0x517980[_0x4284b9(0x26a)]&&(console[_0x4284b9(0xfc)]('Site:\x20'+_0x517980['site']),_0x4a2b92&&console['error'](_0x4284b9(0x174)+_0x4a2b92));const _0x293511=await withSpinner(_0x4a2b92?_0x4284b9(0x210)+_0x4a2b92+_0x4284b9(0x108):_0x4284b9(0x138),()=>_0x5f16a8[_0x4284b9(0x1e5)][_0x4284b9(0x1f4)](),{'verbose':_0x517980[_0x4284b9(0x26a)]});let _0x25218c=_0x293511['data'];if(_0x4a2b92){const _0x4f6a51=_0x4a2b92['replace'](/[.+^${}()|[\]\\]/g,_0x4284b9(0x29c))[_0x4284b9(0x111)](/\*/g,'.*')[_0x4284b9(0x111)](/\?/g,'.'),_0x348ae4=new RegExp('^'+_0x4f6a51+'$','i');_0x25218c=_0x25218c[_0x4284b9(0x19c)](_0x9125b2=>_0x348ae4[_0x4284b9(0x128)](_0x9125b2[_0x4284b9(0x1cd)][_0x4284b9(0x12c)]));}_0x25218c[_0x4284b9(0x1e8)]((_0x45217c,_0x15fdc1)=>_0x45217c[_0x4284b9(0x1cd)][_0x4284b9(0x12c)][_0x4284b9(0x163)](_0x15fdc1[_0x4284b9(0x1cd)]['name'])),console[_0x4284b9(0xfc)](_0x4284b9(0x1d7)+_0x25218c[_0x4284b9(0x2d7)]+'\x20parent\x20segment'+(_0x25218c['length']!==0x1?'s':''));const _0x49928=_0x1c741f=>{const _0x181a31=_0x4284b9;return getConsoleNextUrl(_0x517980[_0x181a31(0x16a)],'/app/dw/parentSegments/'+_0x1c741f);};if(_0x517980[_0x4284b9(0x1b2)]==='json'||_0x517980['format']===_0x4284b9(0x213)){const _0x34daf5=_0x25218c['map'](_0x483852=>({..._0x483852,'url':_0x49928(_0x483852['id'])}));await handleSDKOutput(_0x34daf5,_0x517980);}else{if(_0x25218c[_0x4284b9(0x2d7)]===0x0)_0x4a2b92?console['log'](_0x4284b9(0x2a1)+_0x4a2b92):console[_0x4284b9(0x21c)]('No\x20parent\x20segments\x20found');else for(const _0x4b29fb of _0x25218c){const _0x15b5c1=_0x4b29fb[_0x4284b9(0x1cd)][_0x4284b9(0x15d)]?a31_0x3024fb[_0x4284b9(0x179)]('\x20('+formatRows(_0x4b29fb[_0x4284b9(0x1cd)]['population'])+')'):'',_0x14badf=hyperlink(_0x4b29fb[_0x4284b9(0x1cd)][_0x4284b9(0x12c)],_0x49928(_0x4b29fb['id']));console[_0x4284b9(0x21c)](_0x4284b9(0x206)+_0x14badf+_0x15b5c1);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x177);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x196);async[a31_0x3a88a7(0xcf)](_0x116d97){const _0x43c6a6=a31_0x3a88a7,{options:_0x3c50be,args:_0x351056,tdx:_0x4bb615}=_0x116d97;console['error'](_0x43c6a6(0x1a8)+_0x43c6a6(0x20d)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x3c59e0=_0x3c50be;if(_0x351056[_0x43c6a6(0x2d7)]===0x0)return console[_0x43c6a6(0xfc)](a31_0x3024fb[_0x43c6a6(0xe9)]('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x43c6a6(0xfc)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;const _0x1a80e3=_0x351056[0x0];if(!_0x3c59e0['database']||!_0x3c59e0['table'])return console['error'](_0x43c6a6(0x1e3)),console[_0x43c6a6(0xfc)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x3c59e0[_0x43c6a6(0x26a)]&&(console[_0x43c6a6(0xfc)]('Site:\x20'+_0x3c59e0[_0x43c6a6(0x16a)]),console['error'](_0x43c6a6(0x154)+_0x1a80e3),console[_0x43c6a6(0xfc)]('Database:\x20'+_0x3c59e0[_0x43c6a6(0x239)]),console[_0x43c6a6(0xfc)]('Table:\x20'+_0x3c59e0[_0x43c6a6(0x1e2)]));const _0x49d64a=await loadJSONFromOptions(_0x3c59e0[_0x43c6a6(0x1cd)],_0x3c59e0[_0x43c6a6(0x14f)]),_0x1e7360=await loadJSONFromOptions(_0x3c59e0[_0x43c6a6(0xe3)],_0x3c59e0[_0x43c6a6(0x2bd)]),_0x8978dd=await loadJSONFromOptions(_0x3c59e0[_0x43c6a6(0x116)],_0x3c59e0[_0x43c6a6(0x265)]),_0x12ace0={'name':_0x1a80e3,'description':_0x3c59e0[_0x43c6a6(0x110)],'scheduleType':_0x3c59e0[_0x43c6a6(0x295)],'scheduleOption':_0x3c59e0[_0x43c6a6(0x253)],'timezone':_0x3c59e0[_0x43c6a6(0x1eb)],'master':{'parentDatabaseName':_0x3c59e0[_0x43c6a6(0x239)],'parentTableName':_0x3c59e0[_0x43c6a6(0x1e2)]},'attributes':_0x49d64a,'behaviors':_0x1e7360,'customerGroup':_0x8978dd},_0x5eb3c8=await withSpinner(_0x43c6a6(0x2cb)+_0x1a80e3+_0x43c6a6(0x108),()=>_0x4bb615[_0x43c6a6(0x1e5)]['createParent'](_0x12ace0),{'verbose':_0x3c50be[_0x43c6a6(0x26a)]}),_0x1c10d6=_0x5eb3c8[_0x43c6a6(0x1c3)];return console[_0x43c6a6(0xfc)]('✔\x20Created\x20parent\x20segment\x20\x27'+_0x1c10d6[_0x43c6a6(0x12c)]+_0x43c6a6(0x25a)+_0x1c10d6['id']),await handleSDKOutput([_0x1c10d6],_0x3c50be),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x21a);['description']=a31_0x3a88a7(0x119);async[a31_0x3a88a7(0xcf)](_0xd34d17){const _0x17f65e=a31_0x3a88a7,{options:_0x169220,args:_0x41fcdb,tdx:_0x16a129}=_0xd34d17;console[_0x17f65e(0xfc)](_0x17f65e(0xcd)+_0x17f65e(0x20d)+_0x17f65e(0x2e2));const _0x7689aa=_0x169220;if(_0x41fcdb['length']===0x0)return console[_0x17f65e(0xfc)](a31_0x3024fb['red'](_0x17f65e(0x264))),console[_0x17f65e(0xfc)](_0x17f65e(0x2d4)),0x1;const _0x3c4494=_0x41fcdb[0x0];_0x7689aa[_0x17f65e(0x26a)]&&(console[_0x17f65e(0xfc)]('Site:\x20'+_0x7689aa['site']),console[_0x17f65e(0xfc)](_0x17f65e(0x1f3)+_0x3c4494));const _0x4e56f0=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x3c4494+_0x17f65e(0x108),()=>_0x16a129[_0x17f65e(0x1e5)][_0x17f65e(0x18b)](_0x3c4494),{'verbose':_0x7689aa[_0x17f65e(0x26a)]}),_0x409e55=_0x4e56f0[_0x17f65e(0x1c3)],_0x43ff0d=await loadJSONFromOptions(_0x7689aa[_0x17f65e(0x2d3)],_0x7689aa['addAttributesFile']),_0x2fc279=await loadJSONFromOptions(_0x7689aa[_0x17f65e(0x137)],_0x7689aa[_0x17f65e(0x139)]),_0x5f0087={'name':_0x409e55[_0x17f65e(0x12c)],'description':_0x7689aa[_0x17f65e(0x110)]!==undefined?_0x7689aa['description']:_0x409e55['description'],'scheduleType':_0x7689aa[_0x17f65e(0x295)]!==undefined?_0x7689aa[_0x17f65e(0x295)]:_0x409e55[_0x17f65e(0x295)],'scheduleOption':_0x7689aa[_0x17f65e(0x253)]!==undefined?_0x7689aa[_0x17f65e(0x253)]:_0x409e55[_0x17f65e(0x253)],'timezone':_0x7689aa[_0x17f65e(0x1eb)]!==undefined?_0x7689aa[_0x17f65e(0x1eb)]:_0x409e55[_0x17f65e(0x1eb)],'master':_0x409e55[_0x17f65e(0xee)],'attributes':_0x43ff0d?[..._0x409e55[_0x17f65e(0x1cd)]||[],..._0x43ff0d]:_0x409e55[_0x17f65e(0x1cd)],'behaviors':_0x2fc279?[..._0x409e55[_0x17f65e(0xe3)]||[],..._0x2fc279]:_0x409e55[_0x17f65e(0xe3)],'customerGroup':_0x409e55[_0x17f65e(0x116)]},_0xc43b86=await withSpinner(_0x17f65e(0x24e)+_0x3c4494+_0x17f65e(0x108),()=>_0x16a129['segment'][_0x17f65e(0x2a9)](_0x3c4494,_0x5f0087),{'verbose':_0x7689aa['verbose']}),_0x1ac568=_0xc43b86['data'];return console['error'](_0x17f65e(0x10c)+_0x1ac568[_0x17f65e(0x12c)]+'\x27'),await handleSDKOutput([_0x1ac568],_0x7689aa),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x1db);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x28c);async[a31_0x3a88a7(0xcf)](_0xeebb36){const _0x145032=a31_0x3a88a7,{options:_0x27a745,args:_0x9d176c,tdx:_0x5000f5}=_0xeebb36,_0x3c9dcd=_0x27a745,_0x5f1ee0=_0x9d176c[0x0]||_0x27a745[_0x145032(0x226)];if(!_0x5f1ee0)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a'+_0x145032(0x233)),0x1;if(_0x3c9dcd[_0x145032(0x2a2)]&&_0x3c9dcd['output'])return console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0xe9)](_0x145032(0x164))),console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x179)](_0x145032(0x20a))),console[_0x145032(0xfc)](a31_0x3024fb['dim'](_0x145032(0x127)+PARENT_SEGMENT_DIR+'/{name}.yml\x0a')),console[_0x145032(0xfc)](a31_0x3024fb['cyan'](_0x145032(0x1d8))),0x1;const _0x4da07e=_0x3c9dcd[_0x145032(0x14b)]||a31_0x323afe['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x5f1ee0)+'.yml');_0x3c9dcd['verbose']&&(console[_0x145032(0xfc)](_0x145032(0x14d)+_0x3c9dcd['site']),console['error']('Parent\x20segment:\x20'+_0x5f1ee0),console[_0x145032(0xfc)](_0x145032(0x145)+_0x4da07e));const _0x480733=await withSpinner(_0x145032(0x2c8)+_0x5f1ee0+_0x145032(0x108),()=>_0x5000f5[_0x145032(0x1e5)][_0x145032(0x103)](_0x5f1ee0),{'verbose':_0x3c9dcd[_0x145032(0x26a)]}),_0x43ff64=_0x480733[_0x145032(0x1c3)];if(existsSync(_0x4da07e)){const _0x2ea57a=readFileSync(_0x4da07e,_0x145032(0xf1)),_0x4893e2=generateDiff(_0x2ea57a,_0x43ff64);if(!hasChanges(_0x4893e2))console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x20f)]('✔')+_0x145032(0x1f2)+a31_0x3024fb[_0x145032(0x2d6)](_0x4da07e)+_0x145032(0xfd));else{console[_0x145032(0xfc)]('\x0aChanges\x20to\x20\x27'+_0x4da07e+'\x27:'),console[_0x145032(0xfc)]('─'[_0x145032(0xec)](0x3c)),console[_0x145032(0xfc)](formatDiffWithColors(_0x4893e2)),console[_0x145032(0xfc)]('─'[_0x145032(0xec)](0x3c));if(!_0x3c9dcd[_0x145032(0x10e)]){if(!isInteractive())return console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0xe9)](_0x145032(0x175)),_0x145032(0x26f)),console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x179)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3e254a=await confirmKey(_0x145032(0x222)+_0x4da07e+'\x27?');if(!_0x3e254a)return console[_0x145032(0xfc)](a31_0x3024fb['yellow'](_0x145032(0x21e))),0x1;}writeFileSync(_0x4da07e,_0x43ff64,'utf-8'),console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x20f)]('✔')+_0x145032(0x1c1)+a31_0x3024fb[_0x145032(0x2d6)](_0x4da07e));}}else{const _0x1c7e64=a31_0x323afe[_0x145032(0xd4)](_0x4da07e);!existsSync(_0x1c7e64)&&mkdirSync(_0x1c7e64,{'recursive':!![]}),writeFileSync(_0x4da07e,_0x43ff64,_0x145032(0xf1)),console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x20f)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x3024fb[_0x145032(0x2d6)](_0x4da07e));}return saveSessionContext({'parent_segment':_0x5f1ee0},_0x3c9dcd[_0x145032(0x267)]),console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x20f)]('✔')+'\x20Context\x20set:\x20'+a31_0x3024fb[_0x145032(0x179)]('parent_segment')+_0x145032(0x292)+a31_0x3024fb['cyan'](_0x5f1ee0)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0xd8);['description']=a31_0x3a88a7(0x205);async[a31_0x3a88a7(0xcf)](_0x2ebccc){const _0x4028b4=a31_0x3a88a7,{options:_0x2776f7,args:_0x841edf,tdx:_0x22f064}=_0x2ebccc,_0x4fe887=_0x2776f7,_0x4fa8c0=_0x841edf[0x0]||_0x2776f7['parentSegment'];if(!_0x4fa8c0)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a'+_0x4028b4(0x243)),0x1;const _0x596285=resolveYamlFile(_0x4fa8c0);if(!existsSync(_0x596285))return showFileNotFoundError(_0x596285,_0x4fa8c0),0x1;_0x4fe887['verbose']&&(console[_0x4028b4(0xfc)](_0x4028b4(0x14d)+_0x4fe887[_0x4028b4(0x16a)]),console['error'](_0x4028b4(0x2e3)+_0x596285));let _0x53b98e;try{_0x53b98e=readFileSync(_0x596285,_0x4028b4(0xf1));}catch(_0x5213c0){const _0x414389=_0x5213c0 instanceof Error?_0x5213c0[_0x4028b4(0x120)]:String(_0x5213c0);return console[_0x4028b4(0xfc)]('Error\x20reading\x20file:\x20'+_0x414389),0x1;}const _0x2a13f5=await withSpinner(_0x4028b4(0x269),()=>_0x22f064[_0x4028b4(0x1e5)]['pushParentYaml'](_0x53b98e),{'verbose':_0x4fe887[_0x4028b4(0x26a)]}),_0x4e8f7b=_0x2a13f5[_0x4028b4(0x1c3)],{isNew:_0x15280d,name:_0xb56466,hasChanges:_0x2efd32,diffFormatted:_0x4a94fc}=_0x4e8f7b;if(!_0x2efd32)return console[_0x4028b4(0xfc)](_0x4028b4(0x123)+_0xb56466+_0x4028b4(0x290)),0x0;_0x15280d?console['error'](_0x4028b4(0x109)+_0xb56466+'\x27:'):console[_0x4028b4(0xfc)](_0x4028b4(0x11a)+_0xb56466+'\x27:');console['error']('─'[_0x4028b4(0xec)](0x3c)),console[_0x4028b4(0xfc)](_0x4a94fc),console[_0x4028b4(0xfc)]('─'[_0x4028b4(0xec)](0x3c));const _0x3cccda=_0x15280d?'Create\x20parent\x20segment\x20\x27'+_0xb56466+'\x27?':_0x4028b4(0x1c4)+_0xb56466+'\x27?';if(!_0x4fe887[_0x4028b4(0x10e)]){if(!isInteractive())return console['error'](a31_0x3024fb[_0x4028b4(0xe9)](_0x4028b4(0x175)),_0x4028b4(0x26f)),console['error'](a31_0x3024fb[_0x4028b4(0x179)](_0x4028b4(0x132))),0x1;const _0x1a31fd=await confirmKey(_0x3cccda);if(!_0x1a31fd)return console[_0x4028b4(0xfc)](a31_0x3024fb[_0x4028b4(0x16b)](_0x4028b4(0x21e))),0x1;}const _0x7778c7=_0x15280d?_0x4028b4(0x2c6):_0x4028b4(0x296),_0xb30f4=await withSpinner(_0x7778c7+_0x4028b4(0x1bb)+_0xb56466+'\x27...',()=>_0x4e8f7b['apply'](),{'verbose':_0x4fe887[_0x4028b4(0x26a)]}),_0x4aaf77=_0xb30f4[_0x4028b4(0x1c3)],_0x24213d=getConsoleNextUrl(_0x4fe887[_0x4028b4(0x16a)],'/app/dw/parentSegments/'+_0x4aaf77['id']),_0x54ecb9=_0x15280d?_0x4028b4(0x24f):_0x4028b4(0x122);return console[_0x4028b4(0xfc)]('✔\x20'+_0x54ecb9+'\x20parent\x20segment\x20\x27'+_0x4aaf77['name']+'\x27'),console[_0x4028b4(0xfc)]('\x20\x20'+_0x24213d),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x225);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x2b2);async[a31_0x3a88a7(0xcf)](_0x50d0a0){const _0x175de4=a31_0x3a88a7,{options:_0x26da82,args:_0x314364,tdx:_0x119f2d}=_0x50d0a0,_0x3c5e8d=_0x26da82,_0x3c017f=_0x314364[0x0]||_0x26da82['parentSegment'];if(!_0x3c017f)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'+_0x175de4(0x273)+_0x175de4(0x1c7)+_0x175de4(0x17d)+_0x175de4(0x29d)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;const _0x476a86=resolveYamlFile(_0x3c017f);if(!existsSync(_0x476a86))return showFileNotFoundError(_0x476a86,_0x3c017f),0x1;_0x3c5e8d[_0x175de4(0x26a)]&&(console['error'](_0x175de4(0x14d)+_0x3c5e8d['site']),console[_0x175de4(0xfc)](_0x175de4(0x2e3)+_0x476a86));let _0x1b9164;try{_0x1b9164=readFileSync(_0x476a86,'utf-8');}catch(_0x9c2c36){const _0x59c19f=_0x9c2c36 instanceof Error?_0x9c2c36[_0x175de4(0x120)]:String(_0x9c2c36);return console[_0x175de4(0xfc)](_0x175de4(0x2c3)+_0x59c19f),0x1;}const _0x48b79a=createCommandSpinner(a31_0x3024fb[_0x175de4(0x179)]('Validating\x20configuration...'),{'verbose':_0x3c5e8d['verbose']});_0x48b79a['start']();const _0x22bb0b={'onProgress':_0x42c530=>{const _0x2623c9=_0x175de4;_0x48b79a[_0x2623c9(0x19b)]=formatProgressMessage(_0x42c530);}};if(_0x3c5e8d[_0x175de4(0xee)])_0x22bb0b[_0x175de4(0xee)]=!![];if(_0x3c5e8d['enriched'])_0x22bb0b[_0x175de4(0x1f0)]=!![];_0x3c5e8d[_0x175de4(0x1ca)]&&(_0x22bb0b[_0x175de4(0x1ca)]=_0x3c5e8d['attribute']);_0x3c5e8d[_0x175de4(0x2b5)]&&(_0x22bb0b[_0x175de4(0x2b5)]=_0x3c5e8d[_0x175de4(0x2b5)]);if(_0x3c5e8d[_0x175de4(0x125)])_0x22bb0b[_0x175de4(0x125)]=_0x3c5e8d[_0x175de4(0x125)];let _0x2ff5e7;try{_0x2ff5e7=await _0x119f2d[_0x175de4(0x1e5)]['validateParentYaml'](_0x1b9164,_0x22bb0b),_0x48b79a['stop']();}catch(_0x8f4350){_0x48b79a['stop']();throw _0x8f4350;}const _0x174834=_0x3c5e8d[_0x175de4(0x125)]||'-1d';return this[_0x175de4(0x15c)](_0x2ff5e7,_0x22bb0b,_0x476a86,_0x174834),_0x2ff5e7[_0x175de4(0x160)]?0x0:0x1;}['displayValidateResults'](_0x21b827,_0x2457c1,_0x46dd33,_0x57e0e8){const _0x14a21e=a31_0x3a88a7;console[_0x14a21e(0xfc)]('\x0a'+a31_0x3024fb['bold'](_0x14a21e(0x136))+'\x20'+_0x21b827[_0x14a21e(0x12c)]),console[_0x14a21e(0xfc)]('═'[_0x14a21e(0xec)](0x3c)),this[_0x14a21e(0x286)](_0x21b827);if(typeof _0x2457c1[_0x14a21e(0x1ca)]===_0x14a21e(0x189)){this['displayAttributesStats'](_0x21b827),this[_0x14a21e(0xfb)](_0x21b827),this[_0x14a21e(0x246)](_0x46dd33,_0x57e0e8,'attribute',_0x2457c1[_0x14a21e(0x1ca)]);return;}if(_0x2457c1['attribute']===!![]){this['displayAttributesStats'](_0x21b827),this['displaySummary'](_0x21b827),this[_0x14a21e(0x246)](_0x46dd33,_0x57e0e8,_0x14a21e(0x1cd));return;}if(typeof _0x2457c1[_0x14a21e(0x2b5)]===_0x14a21e(0x189)){this[_0x14a21e(0x256)](_0x21b827,_0x57e0e8),this[_0x14a21e(0xfb)](_0x21b827),this[_0x14a21e(0x246)](_0x46dd33,_0x57e0e8,_0x14a21e(0x2b5),_0x2457c1[_0x14a21e(0x2b5)]);return;}if(_0x2457c1[_0x14a21e(0x2b5)]===!![]){this['displayBehaviorsStats'](_0x21b827,_0x57e0e8),this[_0x14a21e(0xfb)](_0x21b827),this['displayPreviewHints'](_0x46dd33,_0x57e0e8,_0x14a21e(0xe3));return;}this['displayAttributesStats'](_0x21b827),this[_0x14a21e(0x256)](_0x21b827,_0x57e0e8),this[_0x14a21e(0x1c2)](_0x21b827),this[_0x14a21e(0xfb)](_0x21b827),this[_0x14a21e(0x246)](_0x46dd33,_0x57e0e8,'all');}[a31_0x3a88a7(0x1c2)](_0x2f05e5){displayRealtimeValidation(_0x2f05e5);}[a31_0x3a88a7(0x246)](_0x4102d3,_0x3e72ce,_0x17b9d1,_0x39adcb){const _0x122b36=a31_0x3a88a7;console[_0x122b36(0xfc)]('\x0a'+a31_0x3024fb[_0x122b36(0x179)](_0x122b36(0x228)));const _0x4359ba=_0x3e72ce!==_0x122b36(0x2ca)?_0x122b36(0x106)+_0x3e72ce:'';if(_0x17b9d1==='attribute'&&_0x39adcb)console[_0x122b36(0xfc)]('\x20\x20'+a31_0x3024fb[_0x122b36(0x179)](_0x122b36(0x16f)+_0x4102d3+_0x122b36(0x1be)+_0x39adcb+'\x22'+_0x4359ba));else{if(_0x17b9d1===_0x122b36(0x2b5)&&_0x39adcb)console[_0x122b36(0xfc)]('\x20\x20'+a31_0x3024fb[_0x122b36(0x179)]('tdx\x20ps\x20preview\x20'+_0x4102d3+_0x122b36(0x18c)+_0x39adcb+'\x22'+_0x4359ba));else(_0x17b9d1===_0x122b36(0x1cd)||_0x17b9d1===_0x122b36(0x1a6))&&console[_0x122b36(0xfc)]('\x20\x20'+a31_0x3024fb[_0x122b36(0x179)](_0x122b36(0x16f)+_0x4102d3+_0x122b36(0x2ec)+_0x4359ba));}(_0x17b9d1===_0x122b36(0xe3)||_0x17b9d1===_0x122b36(0x1a6))&&console[_0x122b36(0xfc)]('\x20\x20'+a31_0x3024fb[_0x122b36(0x179)]('tdx\x20ps\x20preview\x20'+_0x4102d3+_0x122b36(0x1bc)+_0x4359ba)),_0x17b9d1==='all'&&console['error']('\x20\x20'+a31_0x3024fb[_0x122b36(0x179)](_0x122b36(0x16f)+_0x4102d3+_0x122b36(0x18a)+_0x4359ba));}[a31_0x3a88a7(0x286)](_0x2ef62a){const _0x4edfc4=a31_0x3a88a7,{master:_0x35bd86}=_0x2ef62a,_0x3a9fb7=_0x35bd86['schemaValid']?a31_0x3024fb[_0x4edfc4(0x20f)]('✔'):a31_0x3024fb[_0x4edfc4(0xe9)]('✘');console['error']('\x0a'+a31_0x3024fb['dim'](_0x4edfc4(0x2e6))),console[_0x4edfc4(0xfc)](_0x3a9fb7+'\x20'+a31_0x3024fb['bold'](_0x35bd86[_0x4edfc4(0x239)]+'.'+_0x35bd86[_0x4edfc4(0x1e2)])),_0x35bd86[_0x4edfc4(0x101)]?_0x35bd86[_0x4edfc4(0x1fe)]!==undefined&&console[_0x4edfc4(0xfc)]('\x20\x20'+a31_0x3024fb[_0x4edfc4(0x179)](_0x4edfc4(0x172))+'\x20'+a31_0x3024fb[_0x4edfc4(0x2d6)](formatRows(_0x35bd86[_0x4edfc4(0x1fe)]))):console[_0x4edfc4(0xfc)]('\x20\x20'+a31_0x3024fb[_0x4edfc4(0xe9)](_0x4edfc4(0x23b))+'\x20'+_0x35bd86[_0x4edfc4(0x2ab)]);}[a31_0x3a88a7(0x259)](_0xf2b72){const _0x34862c=a31_0x3a88a7;if(_0xf2b72[_0x34862c(0x1cd)][_0x34862c(0x2d7)]===0x0)return;console['error']('\x0a'+a31_0x3024fb['dim']('Attributes'));for(const _0x31e621 of _0xf2b72[_0x34862c(0x1cd)]){const _0x458bc6=_0x31e621['schemaValid']?a31_0x3024fb[_0x34862c(0x20f)]('✔'):a31_0x3024fb[_0x34862c(0xe9)]('✘');let _0x1afb24='';if(_0x31e621[_0x34862c(0x101)]&&_0x31e621[_0x34862c(0x2b3)]!==undefined&&_0x31e621[_0x34862c(0xce)]!==undefined){const _0x13cb22=_0x31e621['coveragePercent'][_0x34862c(0x2e1)](0x1),_0x5b6ff7=_0x31e621[_0x34862c(0xce)]>=0x50?a31_0x3024fb[_0x34862c(0x20f)]:_0x31e621[_0x34862c(0xce)]>=0x32?a31_0x3024fb['yellow']:a31_0x3024fb['red'];_0x1afb24='\x20'+a31_0x3024fb[_0x34862c(0x179)]('Coverage:')+'\x20'+_0x5b6ff7(_0x13cb22+'%')+'\x20('+formatRows(_0x31e621['matchedCount'])+_0x34862c(0x118);}console[_0x34862c(0xfc)](_0x458bc6+'\x20'+a31_0x3024fb[_0x34862c(0x223)](_0x31e621[_0x34862c(0x12c)])+_0x1afb24),console[_0x34862c(0xfc)]('\x20\x20'+a31_0x3024fb[_0x34862c(0x179)](_0x34862c(0x2a6))+'\x20'+a31_0x3024fb[_0x34862c(0x223)](_0x31e621[_0x34862c(0x239)]+'.'+_0x31e621[_0x34862c(0x1e2)]));const _0x3cdd30=_0x31e621[_0x34862c(0xf6)]===_0x31e621['foreignKey']?a31_0x3024fb['dim']('Join\x20on:')+'\x20'+_0x31e621[_0x34862c(0xf6)]:a31_0x3024fb['dim'](_0x34862c(0x13a))+'\x20'+_0x31e621[_0x34862c(0xf6)]+_0x34862c(0x292)+_0x31e621['foreignKey'];console['error']('\x20\x20'+_0x3cdd30),console[_0x34862c(0xfc)]('\x20\x20'+a31_0x3024fb['dim']('Columns:')),this[_0x34862c(0x1ff)](_0x31e621[_0x34862c(0x121)]),!_0x31e621[_0x34862c(0x101)]&&console[_0x34862c(0xfc)]('\x20\x20'+a31_0x3024fb[_0x34862c(0xe9)](_0x34862c(0x23b))+'\x20'+_0x31e621[_0x34862c(0x2ab)]);}}[a31_0x3a88a7(0x256)](_0x23ad92,_0x2b3fc1){const _0x1c7f74=a31_0x3a88a7;if(_0x23ad92[_0x1c7f74(0xe3)][_0x1c7f74(0x2d7)]===0x0)return;console['error']('\x0a'+a31_0x3024fb[_0x1c7f74(0x179)](_0x1c7f74(0x151))+'\x20'+a31_0x3024fb[_0x1c7f74(0x179)]('('+_0x2b3fc1+')'));for(const _0x3e8b0e of _0x23ad92[_0x1c7f74(0xe3)]){const _0x49c719=_0x3e8b0e[_0x1c7f74(0x101)]?a31_0x3024fb[_0x1c7f74(0x20f)]('✔'):a31_0x3024fb[_0x1c7f74(0xe9)]('✘');let _0x3ec6c1='';if(_0x3e8b0e[_0x1c7f74(0x101)]&&_0x3e8b0e[_0x1c7f74(0x170)]!==undefined&&_0x3e8b0e['totalEvents']!==undefined){const _0x29191a=_0x3e8b0e[_0x1c7f74(0xfe)]?.[_0x1c7f74(0x2e1)](0x1)||'?',_0x5cc102=(_0x3e8b0e[_0x1c7f74(0xfe)]??0x0)>=0x32?a31_0x3024fb[_0x1c7f74(0x20f)]:(_0x3e8b0e[_0x1c7f74(0xfe)]??0x0)>=0x14?a31_0x3024fb['yellow']:a31_0x3024fb[_0x1c7f74(0xe9)];_0x3ec6c1='\x20'+a31_0x3024fb['dim'](_0x1c7f74(0x2e0))+'\x20'+_0x5cc102(formatRows(_0x3e8b0e['customersWithEvents']))+'\x20('+_0x29191a+'%)\x20'+a31_0x3024fb[_0x1c7f74(0x179)]('Events:')+'\x20'+a31_0x3024fb[_0x1c7f74(0x2d6)](formatRows(_0x3e8b0e[_0x1c7f74(0x258)]));}console['error'](_0x49c719+'\x20'+a31_0x3024fb[_0x1c7f74(0x223)](_0x3e8b0e['name'])+_0x3ec6c1),console[_0x1c7f74(0xfc)]('\x20\x20'+a31_0x3024fb[_0x1c7f74(0x179)](_0x1c7f74(0x2a6))+'\x20'+a31_0x3024fb[_0x1c7f74(0x223)](_0x3e8b0e['database']+'.'+_0x3e8b0e[_0x1c7f74(0x1e2)]));const _0x1afa4b=_0x3e8b0e[_0x1c7f74(0xf6)]===_0x3e8b0e[_0x1c7f74(0x14e)]?a31_0x3024fb['dim'](_0x1c7f74(0x2d2))+'\x20'+_0x3e8b0e[_0x1c7f74(0xf6)]:a31_0x3024fb[_0x1c7f74(0x179)]('Join:')+'\x20'+_0x3e8b0e['joinKey']+_0x1c7f74(0x292)+_0x3e8b0e['foreignKey'];console['error']('\x20\x20'+_0x1afa4b),console[_0x1c7f74(0xfc)]('\x20\x20'+a31_0x3024fb[_0x1c7f74(0x179)](_0x1c7f74(0x1ae))),this[_0x1c7f74(0x1ff)](_0x3e8b0e[_0x1c7f74(0x121)]),!_0x3e8b0e[_0x1c7f74(0x101)]&&console[_0x1c7f74(0xfc)]('\x20\x20'+a31_0x3024fb['red'](_0x1c7f74(0x23b))+'\x20'+_0x3e8b0e['schemaError']);}}[a31_0x3a88a7(0x1ff)](_0x43a38e){const _0xe2176b=a31_0x3a88a7;for(const _0x2ce46e of _0x43a38e){_0x2ce46e[_0xe2176b(0x13d)]===_0x2ce46e[_0xe2176b(0x2af)]||_0x2ce46e[_0xe2176b(0x2af)]==='*'?console[_0xe2176b(0xfc)](_0xe2176b(0x25b)+_0x2ce46e[_0xe2176b(0x13d)]):console[_0xe2176b(0xfc)]('\x20\x20\x20\x20-\x20'+_0x2ce46e[_0xe2176b(0x13d)]+'\x20'+a31_0x3024fb[_0xe2176b(0x179)]('('+_0x2ce46e[_0xe2176b(0x2af)]+')'));}}[a31_0x3a88a7(0xfb)](_0x36645a){const _0x5e1985=a31_0x3a88a7;console[_0x5e1985(0xfc)]('─'['repeat'](0x3c));if(_0x36645a[_0x5e1985(0x1a1)][_0x5e1985(0x2d7)]>0x0){console[_0x5e1985(0xfc)]('\x0a'+a31_0x3024fb['red']('Errors:'));for(const _0x25ff9b of _0x36645a[_0x5e1985(0x1a1)]){console['error']('\x20\x20'+a31_0x3024fb[_0x5e1985(0xe9)]('•')+'\x20'+_0x25ff9b);}}_0x36645a[_0x5e1985(0x160)]&&console[_0x5e1985(0xfc)]('\x0a'+a31_0x3024fb[_0x5e1985(0x20f)]('✔')+_0x5e1985(0x14a));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x11d);[a31_0x3a88a7(0x110)]='Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration';async[a31_0x3a88a7(0xcf)](_0x402c18){const _0x3e0df7=a31_0x3a88a7,{options:_0x54e851,args:_0x60ea39,tdx:_0x57bafc}=_0x402c18,_0x3d1b84=_0x54e851,_0x41df70=_0x60ea39[0x0]||_0x54e851[_0x3e0df7(0x226)];if(!_0x41df70)return showParentSegmentNotSetError(_0x3e0df7(0x169)+_0x3e0df7(0x1ce)+_0x3e0df7(0x133)+_0x3e0df7(0x1d5)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+'\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a'+'\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a'+_0x3e0df7(0x26d)),0x1;if(!_0x3d1b84['master']&&!_0x3d1b84[_0x3e0df7(0x1ca)]&&!_0x3d1b84['behavior']&&!_0x3d1b84[_0x3e0df7(0x1f0)])return console['error'](a31_0x3024fb[_0x3e0df7(0xe9)]('Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a')),console['error'](_0x3e0df7(0x23f)),console[_0x3e0df7(0xfc)](_0x3e0df7(0x1df)),console[_0x3e0df7(0xfc)](_0x3e0df7(0x17e)),console[_0x3e0df7(0xfc)](_0x3e0df7(0x24a)),console[_0x3e0df7(0xfc)](_0x3e0df7(0x1ab)),console['error'](_0x3e0df7(0x23e)),0x1;const _0x59b175=resolveYamlFile(_0x41df70);if(!existsSync(_0x59b175))return showFileNotFoundError(_0x59b175,_0x41df70),0x1;_0x3d1b84[_0x3e0df7(0x26a)]&&(console[_0x3e0df7(0xfc)](_0x3e0df7(0x14d)+_0x3d1b84[_0x3e0df7(0x16a)]),console['error'](_0x3e0df7(0x2e3)+_0x59b175));let _0x2e07ae;try{_0x2e07ae=readFileSync(_0x59b175,_0x3e0df7(0xf1));}catch(_0x5d37f5){const _0x3e8f9e=_0x5d37f5 instanceof Error?_0x5d37f5[_0x3e0df7(0x120)]:String(_0x5d37f5);return console['error'](_0x3e0df7(0x2c3)+_0x3e8f9e),0x1;}let _0x52b0da;try{_0x52b0da=parseDef(_0x2e07ae);}catch(_0x16a2c0){const _0x378ae9=_0x16a2c0 instanceof Error?_0x16a2c0[_0x3e0df7(0x120)]:String(_0x16a2c0);return console[_0x3e0df7(0xfc)](a31_0x3024fb[_0x3e0df7(0xe9)]('Error\x20parsing\x20YAML:\x20'+_0x378ae9)),0x1;}if(_0x3d1b84[_0x3e0df7(0x1ca)]===!![]||_0x3d1b84[_0x3e0df7(0x1ca)]===''){const _0x34f673=_0x52b0da['attributes']?.[_0x3e0df7(0x20b)](_0x503848=>_0x503848[_0x3e0df7(0x12c)])||[];if(_0x34f673[_0x3e0df7(0x2d7)]===0x0)console[_0x3e0df7(0xfc)](a31_0x3024fb[_0x3e0df7(0xe9)](_0x3e0df7(0x209)));else{console[_0x3e0df7(0xfc)](a31_0x3024fb[_0x3e0df7(0xe9)](_0x3e0df7(0x117))),console[_0x3e0df7(0xfc)](_0x3e0df7(0x28e));for(const _0x3c922f of _0x34f673){console[_0x3e0df7(0xfc)]('\x20\x20'+a31_0x3024fb[_0x3e0df7(0x2d6)](_0x3c922f));}console[_0x3e0df7(0xfc)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x41df70+_0x3e0df7(0x1be)+_0x34f673[0x0]+'\x22');}return 0x1;}if(_0x3d1b84['behavior']===!![]||_0x3d1b84[_0x3e0df7(0x2b5)]===''){const _0x1ee61b=_0x52b0da[_0x3e0df7(0xe3)]?.[_0x3e0df7(0x20b)](_0x1f8f1c=>_0x1f8f1c[_0x3e0df7(0x12c)])||[];if(_0x1ee61b[_0x3e0df7(0x2d7)]===0x0)console[_0x3e0df7(0xfc)](a31_0x3024fb[_0x3e0df7(0xe9)]('Error:\x20No\x20behaviors\x20defined\x20in\x20configuration'));else{console[_0x3e0df7(0xfc)](a31_0x3024fb['red'](_0x3e0df7(0x29b))),console[_0x3e0df7(0xfc)](_0x3e0df7(0x1f6));for(const _0x508f86 of _0x1ee61b){console[_0x3e0df7(0xfc)]('\x20\x20'+a31_0x3024fb[_0x3e0df7(0x2d6)](_0x508f86));}console[_0x3e0df7(0xfc)](_0x3e0df7(0x204)+_0x41df70+_0x3e0df7(0x18c)+_0x1ee61b[0x0]+'\x22');}return 0x1;}const _0x4e9f36=createCommandSpinner(a31_0x3024fb[_0x3e0df7(0x179)](_0x3e0df7(0x1e4)),{'verbose':_0x3d1b84['verbose']});_0x4e9f36[_0x3e0df7(0x2e8)]();const _0x494f62={'onProgress':_0x3844a4=>{const _0x110750=_0x3e0df7;_0x4e9f36[_0x110750(0x19b)]=formatProgressMessage(_0x3844a4);}};if(_0x3d1b84[_0x3e0df7(0xee)])_0x494f62[_0x3e0df7(0xee)]=!![];if(_0x3d1b84['attribute']&&typeof _0x3d1b84['attribute']===_0x3e0df7(0x189))_0x494f62['attribute']=_0x3d1b84['attribute'];if(_0x3d1b84['behavior']&&typeof _0x3d1b84[_0x3e0df7(0x2b5)]===_0x3e0df7(0x189))_0x494f62['behavior']=_0x3d1b84[_0x3e0df7(0x2b5)];if(_0x3d1b84[_0x3e0df7(0x1f0)])_0x494f62[_0x3e0df7(0x1f0)]=!![];if(_0x3d1b84[_0x3e0df7(0x125)])_0x494f62[_0x3e0df7(0x125)]=_0x3d1b84[_0x3e0df7(0x125)];let _0x5801ce;try{_0x5801ce=await _0x57bafc[_0x3e0df7(0x1e5)]['previewParentYaml'](_0x2e07ae,_0x494f62),_0x4e9f36[_0x3e0df7(0xd0)]();}catch(_0x47bccd){_0x4e9f36['stop']();throw _0x47bccd;}return await this[_0x3e0df7(0x218)](_0x5801ce,{'master':_0x3d1b84[_0x3e0df7(0xee)],'attribute':typeof _0x3d1b84[_0x3e0df7(0x1ca)]===_0x3e0df7(0x189)?_0x3d1b84[_0x3e0df7(0x1ca)]:undefined,'behavior':typeof _0x3d1b84['behavior']===_0x3e0df7(0x189)?_0x3d1b84['behavior']:undefined,'enriched':_0x3d1b84[_0x3e0df7(0x1f0)]}),_0x5801ce[_0x3e0df7(0x160)]?0x0:0x1;}async[a31_0x3a88a7(0x218)](_0x1bcab7,_0x35d89c){const _0x3cec78=a31_0x3a88a7;console['error']('\x0a'+a31_0x3024fb[_0x3cec78(0x223)]('Preview:')+'\x20'+_0x1bcab7[_0x3cec78(0x12c)]),console[_0x3cec78(0xfc)]('═'[_0x3cec78(0xec)](0x3c));if(_0x35d89c[_0x3cec78(0xee)]&&_0x1bcab7[_0x3cec78(0x2a0)]){const _0x4cd43e=a31_0x3024fb['dim'](_0x3cec78(0x15b))+'\x20'+a31_0x3024fb[_0x3cec78(0x223)](_0x1bcab7['master']['database']+'.'+_0x1bcab7[_0x3cec78(0xee)][_0x3cec78(0x1e2)]);await this[_0x3cec78(0xdd)](_0x4cd43e,_0x1bcab7[_0x3cec78(0x2a0)]);}else{if(_0x35d89c[_0x3cec78(0x1ca)]&&_0x1bcab7[_0x3cec78(0x2a0)]){const _0x54b393=a31_0x3024fb['dim']('Attribute:')+'\x20'+a31_0x3024fb[_0x3cec78(0x223)](_0x35d89c['attribute']);await this['displaySampleData'](_0x54b393,_0x1bcab7[_0x3cec78(0x2a0)]);}else{if(_0x35d89c[_0x3cec78(0x2b5)]&&_0x1bcab7[_0x3cec78(0x2a0)]){const _0x4e56c0=a31_0x3024fb[_0x3cec78(0x179)](_0x3cec78(0x1ea))+'\x20'+a31_0x3024fb[_0x3cec78(0x223)](_0x35d89c[_0x3cec78(0x2b5)]);await this[_0x3cec78(0xdd)](_0x4e56c0,_0x1bcab7['sampleData']);}else{if(_0x35d89c['enriched']&&_0x1bcab7[_0x3cec78(0x2a0)]){const _0x166ce4=a31_0x3024fb[_0x3cec78(0x179)]('Enriched:')+'\x20'+a31_0x3024fb['bold'](_0x3cec78(0x289));await this[_0x3cec78(0xdd)](_0x166ce4,_0x1bcab7['sampleData']);}else!_0x1bcab7[_0x3cec78(0x2a0)]&&console['error'](_0x3cec78(0x173));}}}if(_0x1bcab7[_0x3cec78(0x1a1)][_0x3cec78(0x2d7)]>0x0){console['error']('─'[_0x3cec78(0xec)](0x3c)),console[_0x3cec78(0xfc)]('\x0a'+a31_0x3024fb['red'](_0x3cec78(0x23a)));for(const _0x5e09cc of _0x1bcab7[_0x3cec78(0x1a1)]){console[_0x3cec78(0xfc)]('\x20\x20'+a31_0x3024fb['red']('•')+'\x20'+_0x5e09cc);}}}async['displaySampleData'](_0x2b3679,_0x1b97d){const _0x507227=a31_0x3a88a7;if(_0x1b97d[_0x507227(0x2d7)]===0x0){console[_0x507227(0xfc)]('\x0a'+_0x2b3679),console[_0x507227(0xfc)]('\x20\x20No\x20sample\x20data\x20available');return;}console['error']('\x0a'+_0x2b3679);const _0x3d2bf5=Object['keys'](_0x1b97d[0x0])[_0x507227(0x20b)](_0x33370b=>({'name':_0x33370b,'type':typeof _0x1b97d[0x0][_0x33370b]===_0x507227(0x227)?_0x507227(0x207):'varchar'})),_0x17f015={'queryId':_0x507227(0x2f0),'columns':_0x3d2bf5,'data':_0x1b97d,'stats':{'state':_0x507227(0x17c),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1b97d[_0x507227(0x2d7)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x3adada=formatAsTable(_0x17f015,_0x1b97d[_0x507227(0x2d7)],!![]);await writeOutput(_0x3adada,undefined,_0x507227(0x1e2));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x166);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x217);async[a31_0x3a88a7(0xcf)](_0x2ad7a1){const _0x2c06d6=a31_0x3a88a7,{options:_0x2676aa,args:_0x366bcc,tdx:_0x1864f0}=_0x2ad7a1,_0x4ac9d3=_0x2676aa,_0x25e3cb=_0x366bcc[0x0]||_0x2676aa[_0x2c06d6(0x226)];if(!_0x25e3cb)return showParentSegmentNotSetError(_0x2c06d6(0xd9)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x5357e7=resolveYamlFile(_0x25e3cb);if(existsSync(_0x5357e7)){_0x4ac9d3['verbose']&&console[_0x2c06d6(0xfc)]('Found\x20YAML\x20file:\x20'+_0x5357e7);let _0x1c4ffa;try{_0x1c4ffa=readFileSync(_0x5357e7,'utf-8');}catch(_0x4091d5){const _0x261026=_0x4091d5 instanceof Error?_0x4091d5[_0x2c06d6(0x120)]:String(_0x4091d5);return console['error']('Error\x20reading\x20file:\x20'+_0x261026),0x1;}const _0x3d5a06=await withSpinner(_0x2c06d6(0x269),()=>_0x1864f0['segment'][_0x2c06d6(0xe5)](_0x1c4ffa),{'verbose':_0x4ac9d3[_0x2c06d6(0x26a)]}),_0x44fb4a=_0x3d5a06[_0x2c06d6(0x1c3)],{isNew:_0x36a83b,name:_0x5b5609,hasChanges:_0x4c179e,diffFormatted:_0x2cc4ab}=_0x44fb4a;if(_0x4c179e){_0x36a83b?console[_0x2c06d6(0xfc)](_0x2c06d6(0x109)+_0x5b5609+'\x27:'):console[_0x2c06d6(0xfc)](_0x2c06d6(0x11a)+_0x5b5609+'\x27:');console['error']('─'[_0x2c06d6(0xec)](0x3c)),console[_0x2c06d6(0xfc)](_0x2cc4ab),console[_0x2c06d6(0xfc)]('─'[_0x2c06d6(0xec)](0x3c));const _0x169bdd=_0x36a83b?_0x2c06d6(0x268)+_0x5b5609+_0x2c06d6(0x149):_0x2c06d6(0x1c4)+_0x5b5609+'\x27\x20and\x20run\x20workflow?';if(!_0x4ac9d3[_0x2c06d6(0x10e)]){if(!isInteractive())return console[_0x2c06d6(0xfc)](a31_0x3024fb[_0x2c06d6(0xe9)]('\x0aError:'),_0x2c06d6(0x26f)),console[_0x2c06d6(0xfc)](a31_0x3024fb[_0x2c06d6(0x179)](_0x2c06d6(0x132))),0x1;const _0x3a9f16=await confirmKey(_0x169bdd);if(!_0x3a9f16)return console[_0x2c06d6(0xfc)](a31_0x3024fb[_0x2c06d6(0x16b)](_0x2c06d6(0x21e))),0x1;}const _0x2a3657=_0x36a83b?_0x2c06d6(0x2c6):_0x2c06d6(0x296);await withSpinner(_0x2a3657+_0x2c06d6(0x1bb)+_0x5b5609+_0x2c06d6(0x108),()=>_0x44fb4a['apply'](),{'verbose':_0x4ac9d3['verbose']});const _0x25c86b=_0x36a83b?_0x2c06d6(0x24f):_0x2c06d6(0x122);console[_0x2c06d6(0xfc)]('✔\x20'+_0x25c86b+'\x20parent\x20segment\x20\x27'+_0x5b5609+'\x27');}else console[_0x2c06d6(0xfc)]('✔\x20No\x20changes\x20-\x20\x27'+_0x5b5609+_0x2c06d6(0x240));}const _0x5ccd6a=await withSpinner(_0x2c06d6(0x257)+_0x25e3cb+_0x2c06d6(0x108),()=>_0x1864f0[_0x2c06d6(0x1e5)][_0x2c06d6(0xd3)](_0x25e3cb),{'verbose':_0x4ac9d3['verbose']}),_0x5570ac=_0x5ccd6a[_0x2c06d6(0x1c3)],_0x104351=getConsoleUrl(_0x4ac9d3['site'],_0x2c06d6(0x193)+_0x5570ac[_0x2c06d6(0x13b)]+_0x2c06d6(0x1ac)+_0x5570ac[_0x2c06d6(0x18f)]+_0x2c06d6(0x107)+_0x5570ac['workflowAttemptId']);return console['error'](_0x2c06d6(0x14c)),console[_0x2c06d6(0xfc)]('\x20\x20'+a31_0x3024fb[_0x2c06d6(0x179)]('Audience\x20ID:')+'\x20'+_0x5570ac[_0x2c06d6(0x1fd)]),console[_0x2c06d6(0xfc)]('\x20\x20'+a31_0x3024fb[_0x2c06d6(0x179)](_0x2c06d6(0x2ed))+'\x20'+_0x5570ac['status']),console[_0x2c06d6(0xfc)]('\x20\x20'+a31_0x3024fb[_0x2c06d6(0x179)](_0x2c06d6(0x208))+'\x20'+_0x5570ac[_0x2c06d6(0x18f)]),console[_0x2c06d6(0xfc)]('\x20\x20'+a31_0x3024fb['dim'](_0x2c06d6(0x16d))+'\x20'+_0x5570ac[_0x2c06d6(0x2b6)]),console['error']('\x20\x20'+_0x104351),console[_0x2c06d6(0xfc)]('\x0a'+a31_0x3024fb[_0x2c06d6(0x179)](_0x2c06d6(0xe2))+_0x2c06d6(0x180)+_0x5570ac['workflowAttemptId']+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x1f7);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x241);async[a31_0x3a88a7(0xcf)](_0x49a925){const _0x3fac89=a31_0x3a88a7,{options:_0x5c3567,args:_0x44ce5a,tdx:_0xafaf6d}=_0x49a925,_0x30ad75=_0x44ce5a[0x0]||_0x5c3567[_0x3fac89(0x226)];if(!_0x30ad75)return showParentSegmentNotSetError(_0x3fac89(0x197)+_0x3fac89(0xed)),0x1;_0x5c3567[_0x3fac89(0x26a)]&&(console[_0x3fac89(0xfc)](_0x3fac89(0x14d)+_0x5c3567[_0x3fac89(0x16a)]),console[_0x3fac89(0xfc)]('Parent\x20segment:\x20'+_0x30ad75));const _0x327476=await withSpinner(_0x3fac89(0x1e9)+_0x30ad75+'\x27...',()=>_0xafaf6d[_0x3fac89(0x1e5)][_0x3fac89(0x293)](_0x30ad75),{'verbose':_0x5c3567[_0x3fac89(0x26a)]}),_0x2e620c=_0x327476[_0x3fac89(0x1c3)];console[_0x3fac89(0xfc)](_0x3fac89(0x1d7)+_0x2e620c[_0x3fac89(0x2d7)]+'\x20field'+(_0x2e620c['length']!==0x1?'s':''));if(_0x5c3567[_0x3fac89(0x1d9)]||_0x5c3567[_0x3fac89(0x213)])return await handleSDKOutput(_0x2e620c,_0x5c3567),0x0;return displayFieldsHumanReadable(_0x2e620c,_0x30ad75),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]='segment:parent:view';['description']='Show\x20parent\x20segment\x20details';async[a31_0x3a88a7(0xcf)](_0x1ddd6e){const _0xd876d8=a31_0x3a88a7,{options:_0x52e204,args:_0x49e49f,tdx:_0x2f77d4}=_0x1ddd6e,_0x1f178c=_0x52e204,_0x8a52d1=_0x49e49f[0x0]||_0x52e204['parentSegment'];if(!_0x8a52d1)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'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a'+'Options:\x0a'+_0xd876d8(0x271)),0x1;_0x52e204[_0xd876d8(0x26a)]&&(console[_0xd876d8(0xfc)](_0xd876d8(0x14d)+_0x52e204['site']),console[_0xd876d8(0xfc)]('Parent\x20segment:\x20'+_0x8a52d1));const _0x548901=await withSpinner(_0xd876d8(0x2c8)+_0x8a52d1+_0xd876d8(0x108),()=>_0x2f77d4[_0xd876d8(0x1e5)][_0xd876d8(0x18b)](_0x8a52d1),{'verbose':_0x52e204[_0xd876d8(0x26a)]}),_0x2da3c5=_0x548901[_0xd876d8(0x1c3)];if(_0x1f178c[_0xd876d8(0x158)]){const _0x4b3f17=getConsoleNextUrl(_0x1f178c['site'],_0xd876d8(0x283)+_0x2da3c5['id']);return console[_0xd876d8(0xfc)](a31_0x3024fb[_0xd876d8(0x20f)]('✔')+_0xd876d8(0x18e)+a31_0x3024fb[_0xd876d8(0x2d6)](_0x4b3f17)),openBrowser(_0x4b3f17),0x0;}return await handleSingleObjectOutput(_0x2da3c5,_0x52e204),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{['name']=a31_0x3a88a7(0xdc);[a31_0x3a88a7(0x110)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async['execute'](_0x4166d1){const _0xd9d819=a31_0x3a88a7,{options:_0x14db7c,args:_0x190f66,tdx:_0x17a64b}=_0x4166d1,_0x20c9a3=_0x14db7c,_0x25196e=_0x190f66[0x0]||_0x14db7c[_0xd9d819(0x226)];if(!_0x25196e)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20(requires\x20context)\x0a'+_0xd9d819(0x1b7)+_0xd9d819(0x1c7)+_0xd9d819(0x231)),0x1;_0x14db7c[_0xd9d819(0x26a)]&&(console[_0xd9d819(0xfc)]('Site:\x20'+_0x14db7c['site']),console['error'](_0xd9d819(0x1f3)+_0x25196e));const _0x45daec=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x25196e+_0xd9d819(0x108),()=>_0x17a64b['segment'][_0xd9d819(0x2c9)](_0x25196e),{'verbose':_0x14db7c[_0xd9d819(0x26a)]}),_0x4cc2fd=_0x45daec['data'],_0x41e36a=_0x17a64b['segment'][_0xd9d819(0x279)](_0x4cc2fd);if(_0x20c9a3[_0xd9d819(0x14b)]){const _0x3cadd3=await this['collectSchema'](_0x4166d1,_0x25196e,_0x4cc2fd,_0x41e36a),_0x1df894=this[_0xd9d819(0x152)](_0x3cadd3);writeFileSync(_0x20c9a3[_0xd9d819(0x14b)],_0x1df894);const _0x139dce=_0x3cadd3[_0xd9d819(0x1e1)][_0xd9d819(0x121)][_0xd9d819(0x2d7)]+_0x3cadd3[_0xd9d819(0xe3)][_0xd9d819(0x2ae)]((_0x21fcc7,_0x1c69f6)=>_0x21fcc7+_0x1c69f6[_0xd9d819(0x121)][_0xd9d819(0x2d7)],0x0),_0x3966b9=_0x3cadd3[_0xd9d819(0xe3)][_0xd9d819(0x19c)](_0x4a31dc=>_0x4a31dc[_0xd9d819(0x121)][_0xd9d819(0x2d7)]===0x0)[_0xd9d819(0x2d7)];return console[_0xd9d819(0x21c)]('Schema\x20saved\x20to\x20'+_0x20c9a3[_0xd9d819(0x14b)]),console['log'](_0xd9d819(0x1ef)+_0x41e36a),console[_0xd9d819(0x21c)]('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0x3cadd3[_0xd9d819(0xe3)][_0xd9d819(0x2d7)]+_0xd9d819(0x15e)),console['log']('\x20\x20Columns:\x20'+_0x139dce+_0xd9d819(0x294)),_0x3966b9>0x0&&console[_0xd9d819(0x21c)](_0xd9d819(0x2c7)+_0x3966b9+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console[_0xd9d819(0xfc)]('\x0a'+a31_0x3024fb[_0xd9d819(0x223)](_0xd9d819(0x21f))+'\x20'+a31_0x3024fb[_0xd9d819(0x2d6)](_0x41e36a));const _0x1ac776=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x17a64b[_0xd9d819(0x1e5)][_0xd9d819(0x276)](_0x4cc2fd),{'verbose':_0x14db7c[_0xd9d819(0x26a)]});console['error']('\x0a'+a31_0x3024fb['bold'](_0xd9d819(0x1e1))+'\x20'+a31_0x3024fb[_0xd9d819(0x179)]('('+_0x41e36a+_0xd9d819(0x2c0)));const _0x501ebe=await executeSchemaQuery(_0x1ac776[_0xd9d819(0x1c3)],_0x17a64b,_0x14db7c);await handleQueryOutput(_0x501ebe,_0x14db7c);const _0x359973=await withSpinner(_0xd9d819(0x2a5),()=>_0x17a64b['segment']['getBehaviorNames'](_0x4cc2fd),{'verbose':_0x14db7c[_0xd9d819(0x26a)]});for(const _0x2b2836 of _0x359973[_0xd9d819(0x1c3)]){const _0x436102=_0xd9d819(0x112)+_0x2b2836[_0xd9d819(0x168)]()[_0xd9d819(0x111)](/\s+/g,'_'),_0x1ddfa8=_0xd9d819(0xd5)+_0x41e36a+'.'+_0x436102;console[_0xd9d819(0xfc)]('\x0a'+a31_0x3024fb[_0xd9d819(0x223)](_0x2b2836)+'\x20'+a31_0x3024fb['dim']('('+_0x41e36a+'.'+_0x436102+')'));try{const _0x686f88=await executeSchemaQuery(_0x1ddfa8,_0x17a64b,_0x14db7c);await handleQueryOutput(_0x686f88,_0x14db7c);}catch{console[_0xd9d819(0xfc)](a31_0x3024fb[_0xd9d819(0x16b)](_0xd9d819(0xf7)));}}return 0x0;}async['collectSchema'](_0x2f7a5a,_0x5b5ec9,_0x27ce59,_0x427f50){const _0xf3b163=a31_0x3a88a7,{options:_0x39e27b,tdx:_0x58072e}=_0x2f7a5a,_0x279189=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x58072e['segment'][_0xf3b163(0x276)](_0x27ce59),{'verbose':_0x39e27b[_0xf3b163(0x26a)]}),_0x2dfd1f=await executeSchemaQuery(_0x279189['data'],_0x58072e,_0x39e27b),_0x11e9b9=_0x2dfd1f[_0xf3b163(0x1c3)][_0xf3b163(0x20b)](_0x4602d2=>({'name':_0x4602d2['column_name'],'type':_0x4602d2[_0xf3b163(0x250)]})),_0x46e588=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x58072e[_0xf3b163(0x1e5)][_0xf3b163(0x2de)](_0x27ce59),{'verbose':_0x39e27b[_0xf3b163(0x26a)]}),_0xc97144=[];for(const _0x4b8496 of _0x46e588['data']){const _0x504b63=_0xf3b163(0x112)+_0x4b8496[_0xf3b163(0x168)]()[_0xf3b163(0x111)](/\s+/g,'_'),_0x8209fd='SELECT\x20*\x20FROM\x20'+_0x427f50+'.'+_0x504b63;let _0x7d73c2=[];try{const _0x336955=await executeSchemaQuery(_0x8209fd,_0x58072e,_0x39e27b);_0x7d73c2=_0x336955[_0xf3b163(0x1c3)][_0xf3b163(0x20b)](_0x19941b=>({'name':_0x19941b[_0xf3b163(0x2ba)],'type':_0x19941b[_0xf3b163(0x250)]}));}catch{}_0xc97144[_0xf3b163(0x11b)]({'table':_0x504b63,'columns':_0x7d73c2});}return{'database':_0x427f50,'parent_segment':_0x5b5ec9,'parent_id':_0x27ce59,'customers':{'table':'customers','columns':_0x11e9b9},'behaviors':_0xc97144};}['formatSchemaJson'](_0x32fdeb){const _0x3ae812=a31_0x3a88a7,_0x16ba75=_0x964f43=>{const _0x161ada=a31_0x2b70;if(_0x964f43[_0x161ada(0x2d7)]===0x0)return'[]';const _0x524646=_0x964f43['map'](_0x35b167=>_0x161ada(0x28b)+_0x35b167[_0x161ada(0x12c)]+'\x22,\x20\x22type\x22:\x20\x22'+_0x35b167[_0x161ada(0x2b1)]+_0x161ada(0x143));return'[\x0a'+_0x524646[_0x161ada(0x1ee)](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x48a5ec=_0x32fdeb[_0x3ae812(0xe3)][_0x3ae812(0x20b)](_0xab1445=>{const _0x46a94c=_0x3ae812;return _0x46a94c(0x1a9)+_0xab1445[_0x46a94c(0x1e2)]+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20'+_0x16ba75(_0xab1445[_0x46a94c(0x121)])[_0x46a94c(0x111)](/^/gm,'\x20\x20')['trim']()+_0x46a94c(0x190);})[_0x3ae812(0x1ee)](',\x0a');return _0x3ae812(0xf3)+_0x32fdeb[_0x3ae812(0x239)]+_0x3ae812(0x254)+_0x32fdeb['parent_segment']+_0x3ae812(0x23d)+_0x32fdeb[_0x3ae812(0x23c)]+_0x3ae812(0x1e6)+_0x32fdeb['customers']['table']+_0x3ae812(0x22f)+_0x16ba75(_0x32fdeb[_0x3ae812(0x1e1)][_0x3ae812(0x121)])[_0x3ae812(0x111)](/^/gm,'\x20\x20')['trim']()+'\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a'+_0x48a5ec+'\x0a\x20\x20]\x0a}\x0a';}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x203);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x1b9);async[a31_0x3a88a7(0xcf)](_0x38332e){const _0x37fbbe=a31_0x3a88a7,{options:_0x435efb,args:_0x211135,tdx:_0xb7619}=_0x38332e,_0x12fc36=_0x211135[0x0]||_0x435efb[_0x37fbbe(0x226)];if(!_0x12fc36)return showParentSegmentNotSetError(_0x37fbbe(0xdf)+_0x37fbbe(0x216)),0x1;_0x435efb[_0x37fbbe(0x26a)]&&(console[_0x37fbbe(0xfc)](_0x37fbbe(0x14d)+_0x435efb[_0x37fbbe(0x16a)]),console[_0x37fbbe(0xfc)](_0x37fbbe(0x1f3)+_0x12fc36));const _0x58c778=await withSpinner(_0x37fbbe(0xf4)+_0x12fc36+_0x37fbbe(0x108),()=>_0xb7619[_0x37fbbe(0x1e5)][_0x37fbbe(0x2c9)](_0x12fc36),{'verbose':_0x435efb[_0x37fbbe(0x26a)]}),_0x5c05f9=_0x58c778['data'],_0x369296=await withSpinner(_0x37fbbe(0x171)+_0x12fc36+_0x37fbbe(0x108),()=>_0xb7619[_0x37fbbe(0x1e5)]['getParentSQL'](_0x5c05f9),{'verbose':_0x435efb[_0x37fbbe(0x26a)]}),_0x2181ec=_0x369296[_0x37fbbe(0x1c3)];return _0x435efb['format']==='json'||_0x435efb[_0x37fbbe(0x1b2)]===_0x37fbbe(0x213)?await handleSDKOutput([{'sql':_0x2181ec}],_0x435efb):console[_0x37fbbe(0x21c)](_0x2181ec),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']=a31_0x3a88a7(0xe7);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x1ad);async[a31_0x3a88a7(0xcf)](_0x3ee9b5){const _0x181b21=a31_0x3a88a7,{options:_0xd68e43,args:_0x2a4685,tdx:_0x467c5d}=_0x3ee9b5,_0xacb366=_0x2a4685[0x0]||_0xd68e43[_0x181b21(0x226)];if(!_0xacb366)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;_0xd68e43['verbose']&&(console['error'](_0x181b21(0x14d)+_0xd68e43[_0x181b21(0x16a)]),console[_0x181b21(0xfc)](_0x181b21(0x1f3)+_0xacb366));const _0xab2258=await withSpinner(_0x181b21(0xf4)+_0xacb366+'\x27...',()=>_0x467c5d[_0x181b21(0x1e5)][_0x181b21(0x2c9)](_0xacb366),{'verbose':_0xd68e43['verbose']}),_0x2d6585=_0xab2258[_0x181b21(0x1c3)],_0xaf70be=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0xacb366+_0x181b21(0x108),()=>_0x467c5d['segment'][_0x181b21(0x276)](_0x2d6585),{'verbose':_0xd68e43[_0x181b21(0x26a)]});let _0x43af47=_0xaf70be[_0x181b21(0x1c3)];const _0x4f1d82=resolveLimit(_0xd68e43[_0x181b21(0x28a)],DEFAULT_DISPLAY_LIMIT),_0x5d98ca=/\bLIMIT\s+\d+/i['test'](_0x43af47);!_0x5d98ca&&(_0x43af47=_0x43af47['trim']()['replace'](/;+$/,''),_0x43af47='SELECT\x20*\x20FROM\x20(\x0a'+_0x43af47+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x4f1d82);_0xd68e43[_0x181b21(0x26a)]&&console['error'](_0x181b21(0x2be)+_0x43af47);const _0x2a843d=await withProgressSpinner(_0x181b21(0x2a8),async _0x4af888=>{const _0x32575d=_0x181b21,_0x2c7049=await _0x467c5d[_0x32575d(0xdb)]['execute'](_0x43af47,{'catalog':'td','schema':_0x32575d(0x25e),'onJobId':_0x48a6b2=>{const _0x1a8b70=_0x32575d;_0x4af888[_0x1a8b70(0x11e)](_0x48a6b2);}});return _0x2c7049;},{'verbose':_0xd68e43[_0x181b21(0x26a)]}),_0x321800=_0x2a843d[_0x181b21(0x1c3)],_0xa2ff3=_0x321800[_0x181b21(0x211)]?_0x181b21(0x105)+_0x321800[_0x181b21(0x211)]+']':'';return console['error']('✔\x20Query\x20completed:\x20Processed\x20'+_0x321800[_0x181b21(0xe6)][_0x181b21(0x16c)]['toLocaleString']()+_0x181b21(0x255)+(_0x181b21(0x27d)+formatElapsed(_0x321800['stats'][_0x181b21(0x2cd)])+_0xa2ff3)),await handleQueryOutput(_0x321800,_0xd68e43),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x2a4);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x2b4);async[a31_0x3a88a7(0xcf)](_0x1a72b2){const _0x340a23=a31_0x3a88a7,{options:_0x5929c9,args:_0x1936c5,tdx:_0x31f7b}=_0x1a72b2,_0x40607e=_0x1936c5[0x0],_0x245ce6=await withSpinner(_0x40607e?_0x340a23(0x2ad)+_0x40607e+_0x340a23(0x108):_0x340a23(0x15a),()=>_0x31f7b[_0x340a23(0x229)][_0x340a23(0x2dd)](),{'verbose':_0x5929c9[_0x340a23(0x26a)]});let _0x299977=_0x245ce6['data'][_0x340a23(0x19c)](_0x2f8cb1=>_0x2f8cb1[_0x340a23(0xff)]);if(_0x40607e){const _0x5b7ed1=_0x40607e[_0x340a23(0x111)](/[.+^${}()|[\]\\]/g,_0x340a23(0x29c))[_0x340a23(0x111)](/\*/g,'.*')[_0x340a23(0x111)](/\?/g,'.'),_0x236b5b=new RegExp('^'+_0x5b7ed1+'$','i');_0x299977=_0x299977[_0x340a23(0x19c)](_0x272412=>_0x236b5b['test'](_0x272412['name']));}_0x299977[_0x340a23(0x1e8)]((_0x410d8d,_0x4d596b)=>_0x410d8d['name'][_0x340a23(0x163)](_0x4d596b[_0x340a23(0x12c)])),console[_0x340a23(0xfc)]('✔\x20Found\x20'+_0x299977['length']+_0x340a23(0x270)+(_0x299977['length']!==0x1?'s':''));const _0x4293d9=_0x48bc95=>{const _0x3a9018=_0x340a23;return getConsoleNextUrl(_0x5929c9[_0x3a9018(0x16a)],'/app/dw/parentSegments/'+_0x48bc95);};if(_0x5929c9[_0x340a23(0x1b2)]==='json'||_0x5929c9['format']==='jsonl'){const _0x5cf196=_0x299977[_0x340a23(0x20b)](_0x1b155f=>({..._0x1b155f,'url':_0x4293d9(_0x1b155f['id'])}));await handleSDKOutput(_0x5cf196,_0x5929c9);}else{if(_0x299977['length']===0x0)console['log'](_0x340a23(0x1a2));else for(const _0x162b36 of _0x299977){const _0x4c5e67=_0x162b36[_0x340a23(0x15d)]?a31_0x3024fb[_0x340a23(0x179)]('\x20('+formatRows(_0x162b36['population'])+')'):'',_0x51d565=hyperlink(_0x162b36[_0x340a23(0x12c)],_0x4293d9(_0x162b36['id']));console[_0x340a23(0x21c)]('⚡\x20'+_0x51d565+_0x4c5e67);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x2bf);['description']=a31_0x3a88a7(0x2aa);async['execute'](_0x101bfe){const _0x34888d=a31_0x3a88a7,{options:_0x3bc522,args:_0x49b9bd,tdx:_0x1cc1bf}=_0x101bfe,_0x1ac0e4=_0x49b9bd[0x0]||_0x3bc522['parentSegment'];if(!_0x1ac0e4)return showParentSegmentNotSetError(_0x34888d(0x17a)+_0x34888d(0x13f)),0x1;const _0x30fb5a=resolveYamlFile(_0x1ac0e4);if(!existsSync(_0x30fb5a))return showFileNotFoundError(_0x30fb5a,_0x1ac0e4),0x1;let _0x22afa3;try{_0x22afa3=readFileSync(_0x30fb5a,_0x34888d(0xf1));}catch(_0x2e32c9){const _0x46e542=_0x2e32c9 instanceof Error?_0x2e32c9['message']:String(_0x2e32c9);return console[_0x34888d(0xfc)](_0x34888d(0x2c3)+_0x46e542),0x1;}const _0xe03eab=createCommandSpinner(a31_0x3024fb[_0x34888d(0x179)](_0x34888d(0x11f)),{'verbose':_0x3bc522[_0x34888d(0x26a)]});_0xe03eab[_0x34888d(0x2e8)]();const _0x207d46={'realtime':!![],'onProgress':_0x1bd508=>{_0xe03eab['text']=formatProgressMessage(_0x1bd508);}};let _0x4fe05d;try{_0x4fe05d=await _0x1cc1bf['segment'][_0x34888d(0x29f)](_0x22afa3,_0x207d46),_0xe03eab[_0x34888d(0xd0)]();}catch(_0x227b7c){_0xe03eab[_0x34888d(0xd0)]();throw _0x227b7c;}console[_0x34888d(0xfc)]('\x0a'+a31_0x3024fb[_0x34888d(0x223)](_0x34888d(0x10d))+'\x20'+_0x4fe05d['name']),console[_0x34888d(0xfc)]('═'[_0x34888d(0xec)](0x3c)),displayRealtimeValidation(_0x4fe05d),console['error']('─'[_0x34888d(0xec)](0x3c));if(_0x4fe05d[_0x34888d(0x1a1)][_0x34888d(0x2d7)]>0x0){console['error']('\x0a'+a31_0x3024fb['red']('Errors:'));for(const _0x5a94fc of _0x4fe05d[_0x34888d(0x1a1)]){console[_0x34888d(0xfc)]('\x20\x20'+a31_0x3024fb[_0x34888d(0xe9)]('•')+'\x20'+_0x5a94fc);}}return _0x4fe05d['allValid']&&console['error']('\x0a'+a31_0x3024fb['green']('✔')+_0x34888d(0x234)),_0x4fe05d['allValid']?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0x3a88a7(0x192);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x1c9);async['execute'](_0x2111d7){const _0x12bbad=a31_0x3a88a7,{options:_0x3d5451,args:_0x566d7e,tdx:_0x295ee4}=_0x2111d7,_0x13a495=_0x566d7e[0x0]||_0x3d5451[_0x12bbad(0x226)];if(!_0x13a495)return showParentSegmentNotSetError(_0x12bbad(0x113)+_0x12bbad(0x178)),0x1;_0x3d5451[_0x12bbad(0x26a)]&&(console[_0x12bbad(0xfc)]('Site:\x20'+_0x3d5451[_0x12bbad(0x16a)]),console[_0x12bbad(0xfc)](_0x12bbad(0x1f3)+_0x13a495));const _0x862868=await withSpinner(_0x12bbad(0xf4)+_0x13a495+_0x12bbad(0x108),()=>_0x295ee4[_0x12bbad(0x1e5)][_0x12bbad(0x2c9)](_0x13a495),{'verbose':_0x3d5451['verbose']}),_0x754c18=_0x862868[_0x12bbad(0x1c3)],_0x5453ab=await withSpinner('Listing\x20RT\x20journeys\x20for\x20\x27'+_0x13a495+_0x12bbad(0x108),()=>_0x295ee4[_0x12bbad(0x229)][_0x12bbad(0x266)](_0x754c18),{'verbose':_0x3d5451['verbose']}),_0x1f414f=_0x5453ab[_0x12bbad(0x1c3)];console[_0x12bbad(0xfc)]('✔\x20Found\x20'+_0x1f414f[_0x12bbad(0x2d7)]+_0x12bbad(0x22c)+(_0x1f414f[_0x12bbad(0x2d7)]!==0x1?'s':''));if(_0x3d5451['format']===_0x12bbad(0x1d9)||_0x3d5451[_0x12bbad(0x1b2)]==='jsonl')await handleSDKOutput(_0x1f414f,_0x3d5451);else{if(_0x1f414f['length']===0x0)console['log'](_0x12bbad(0x12d));else for(const _0x1ac3ac of _0x1f414f){const _0x34ed80=_0x1ac3ac[_0x12bbad(0x27b)]===_0x12bbad(0x1fc)?'🚀':'📝',_0x579a78=_0x1ac3ac[_0x12bbad(0xf9)]?a31_0x3024fb['yellow'](_0x12bbad(0x2bb)):'',_0x37a27b=a31_0x3024fb[_0x12bbad(0x179)]('\x20('+_0x1ac3ac[_0x12bbad(0x2db)]+'\x20stage'+(_0x1ac3ac[_0x12bbad(0x2db)]!==0x1?'s':'')+')');console['log'](_0x34ed80+'\x20'+_0x1ac3ac['name']+_0x579a78+_0x37a27b);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{['name']='ps:rt:jn:pause';[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x1b5);async[a31_0x3a88a7(0xcf)](_0xe8a69a){const _0x2f6d0b=a31_0x3a88a7,{options:_0x2a7923,args:_0x3c0c16,tdx:_0x54bf78}=_0xe8a69a,_0x4457c8=_0x3c0c16[0x0];if(!_0x4457c8)return console['error'](a31_0x3024fb['red'](_0x2f6d0b(0x1e0))),console[_0x2f6d0b(0xfc)](_0x2f6d0b(0xe0)),console[_0x2f6d0b(0xfc)](a31_0x3024fb[_0x2f6d0b(0x179)](_0x2f6d0b(0x1ec))),0x1;_0x2a7923[_0x2f6d0b(0x26a)]&&(console['error'](_0x2f6d0b(0x14d)+_0x2a7923[_0x2f6d0b(0x16a)]),console[_0x2f6d0b(0xfc)](_0x2f6d0b(0x184)+_0x4457c8));const _0x26681f=await withSpinner(_0x2f6d0b(0x1f9)+_0x4457c8+_0x2f6d0b(0x108),()=>_0x54bf78[_0x2f6d0b(0x229)][_0x2f6d0b(0x2c5)](_0x4457c8),{'verbose':_0x2a7923[_0x2f6d0b(0x26a)]}),_0x24859a=_0x26681f['data'];console['error'](_0x2f6d0b(0xda)+_0x24859a[_0x2f6d0b(0x12c)]+'\x27');if(_0x2a7923[_0x2f6d0b(0x1b2)]===_0x2f6d0b(0x1d9)||_0x2a7923[_0x2f6d0b(0x1b2)]===_0x2f6d0b(0x213))await handleSDKOutput([_0x24859a],_0x2a7923);else{const _0x48086d=_0x24859a[_0x2f6d0b(0x27b)]==='launched'?'🚀':'📝',_0x220518=_0x24859a[_0x2f6d0b(0xf9)]?a31_0x3024fb[_0x2f6d0b(0x16b)]('\x20(paused)'):'';console[_0x2f6d0b(0x21c)](_0x48086d+'\x20'+_0x24859a[_0x2f6d0b(0x12c)]+_0x220518);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{['name']=a31_0x3a88a7(0x1f8);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x102);async['execute'](_0x4c910a){const _0x68ed5e=a31_0x3a88a7,{options:_0x524fee,args:_0x4bcca6,tdx:_0x5cabc6}=_0x4c910a,_0x193a7a=_0x4bcca6[0x0];if(!_0x193a7a)return console[_0x68ed5e(0xfc)](a31_0x3024fb['red'](_0x68ed5e(0x1e0))),console[_0x68ed5e(0xfc)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a'),console['error'](a31_0x3024fb[_0x68ed5e(0x179)]('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x524fee[_0x68ed5e(0x26a)]&&(console[_0x68ed5e(0xfc)](_0x68ed5e(0x14d)+_0x524fee[_0x68ed5e(0x16a)]),console['error'](_0x68ed5e(0x184)+_0x193a7a));const _0x3d2ed8=await withSpinner(_0x68ed5e(0x219)+_0x193a7a+_0x68ed5e(0x108),()=>_0x5cabc6['realtime'][_0x68ed5e(0x235)](_0x193a7a),{'verbose':_0x524fee[_0x68ed5e(0x26a)]}),_0x1dd6b6=_0x3d2ed8[_0x68ed5e(0x1c3)];console[_0x68ed5e(0xfc)](_0x68ed5e(0x144)+_0x1dd6b6[_0x68ed5e(0x12c)]+'\x27');if(_0x524fee[_0x68ed5e(0x1b2)]==='json'||_0x524fee['format']===_0x68ed5e(0x213))await handleSDKOutput([_0x1dd6b6],_0x524fee);else{const _0x2b87ac=_0x1dd6b6[_0x68ed5e(0x27b)]==='launched'?'🚀':'📝',_0x179f40=_0x1dd6b6[_0x68ed5e(0xf9)]?a31_0x3024fb[_0x68ed5e(0x16b)](_0x68ed5e(0x2bb)):'';console[_0x68ed5e(0x21c)](_0x2b87ac+'\x20'+_0x1dd6b6['name']+_0x179f40);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0xe8);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x27c);async[a31_0x3a88a7(0xcf)](_0x26808c){const _0x1e5ff1=a31_0x3a88a7,{options:_0x179e0d,args:_0x548de1,tdx:_0x518d4e}=_0x26808c,_0x2d3bde=_0x548de1[0x0]||_0x179e0d[_0x1e5ff1(0x226)];if(!_0x2d3bde)return showParentSegmentNotSetError(_0x1e5ff1(0x2b9)+_0x1e5ff1(0x25d)),0x1;_0x179e0d[_0x1e5ff1(0x26a)]&&(console[_0x1e5ff1(0xfc)](_0x1e5ff1(0x14d)+_0x179e0d[_0x1e5ff1(0x16a)]),console['error'](_0x1e5ff1(0x1f3)+_0x2d3bde));const _0x3b1572=await withSpinner(_0x1e5ff1(0xf4)+_0x2d3bde+_0x1e5ff1(0x108),()=>_0x518d4e[_0x1e5ff1(0x1e5)]['resolveParentId'](_0x2d3bde),{'verbose':_0x179e0d[_0x1e5ff1(0x26a)]}),_0x41c079=_0x3b1572[_0x1e5ff1(0x1c3)],_0x1a2f24=await withSpinner(_0x1e5ff1(0x141)+_0x2d3bde+_0x1e5ff1(0x108),()=>_0x518d4e[_0x1e5ff1(0x229)][_0x1e5ff1(0x1c5)](_0x41c079),{'verbose':_0x179e0d[_0x1e5ff1(0x26a)]}),_0x5aaf53=_0x1a2f24[_0x1e5ff1(0x1c3)];return console['error'](_0x1e5ff1(0x24c)),_0x179e0d[_0x1e5ff1(0x1b2)]===_0x1e5ff1(0x1d9)||_0x179e0d[_0x1e5ff1(0x1b2)]==='jsonl'?await handleSDKOutput([_0x5aaf53],_0x179e0d):(console['log']('id:\x20'+_0x5aaf53['id']),console[_0x1e5ff1(0x21c)](_0x1e5ff1(0x1cb)+_0x5aaf53['audienceId']),console[_0x1e5ff1(0x21c)](_0x1e5ff1(0x12a)+_0x5aaf53[_0x1e5ff1(0x2bc)]),console[_0x1e5ff1(0x21c)]('eventKind:\x20'+_0x5aaf53[_0x1e5ff1(0x277)]),console['log'](_0x1e5ff1(0x2d9)+_0x5aaf53[_0x1e5ff1(0x2d0)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x24d);[a31_0x3a88a7(0x110)]='List\x20personalization\x20services\x20for\x20a\x20parent\x20segment';async[a31_0x3a88a7(0xcf)](_0x5eae75){const _0x3b0f69=a31_0x3a88a7,{options:_0x3e17dd,args:_0x5722ec,tdx:_0x5ddd99}=_0x5eae75,_0x22695d=_0x5722ec[0x0]||_0x3e17dd['parentSegment'];if(!_0x22695d)return showParentSegmentNotSetError(_0x3b0f69(0xf0)+_0x3b0f69(0x104)),0x1;const _0x2afaa9=await withSpinner(_0x3b0f69(0xf4)+_0x22695d+'\x27...',()=>_0x5ddd99[_0x3b0f69(0x1e5)][_0x3b0f69(0x2c9)](_0x22695d),{'verbose':_0x3e17dd[_0x3b0f69(0x26a)]}),_0x4fa967=_0x2afaa9[_0x3b0f69(0x1c3)],_0x25827e=await withSpinner(_0x3b0f69(0x26e)+_0x22695d+'\x27...',()=>_0x5ddd99['personalization']['list'](_0x4fa967),{'verbose':_0x3e17dd['verbose']}),_0x6967af=_0x25827e[_0x3b0f69(0x1c3)];console[_0x3b0f69(0xfc)](_0x3b0f69(0x1d7)+_0x6967af['length']+_0x3b0f69(0x1dd)+(_0x6967af[_0x3b0f69(0x2d7)]!==0x1?'s':''));if(_0x3e17dd[_0x3b0f69(0x1b2)]==='json'||_0x3e17dd[_0x3b0f69(0x1b2)]===_0x3b0f69(0x213))await handleSDKOutput(_0x6967af,_0x3e17dd);else{if(_0x6967af['length']===0x0)console[_0x3b0f69(0x21c)]('No\x20personalization\x20services\x20configured'),console[_0x3b0f69(0xfc)](a31_0x3024fb[_0x3b0f69(0x2d6)](_0x3b0f69(0x176)));else for(const _0x21f6ab of _0x6967af){console[_0x3b0f69(0x21c)](a31_0x3024fb[_0x3b0f69(0x223)](_0x21f6ab[_0x3b0f69(0x12c)])+'\x20'+a31_0x3024fb[_0x3b0f69(0x179)](_0x3b0f69(0x242)+_0x21f6ab['id']+')'));_0x21f6ab['description']&&console[_0x3b0f69(0x21c)]('\x20\x20'+a31_0x3024fb[_0x3b0f69(0x179)](_0x21f6ab[_0x3b0f69(0x110)]));if(_0x21f6ab[_0x3b0f69(0x201)]&&_0x21f6ab[_0x3b0f69(0x201)][_0x3b0f69(0x2d7)]>0x0)for(const _0x4572b8 of _0x21f6ab[_0x3b0f69(0x201)]){const _0x232d72=_0x4572b8[_0x3b0f69(0x1c0)]?.[_0x3b0f69(0x2d7)]?_0x4572b8[_0x3b0f69(0x1c0)][_0x3b0f69(0x1ee)](',\x20'):'any';console[_0x3b0f69(0x21c)]('\x20\x20'+a31_0x3024fb[_0x3b0f69(0x2d6)](_0x3b0f69(0x1c8))+'\x20'+_0x4572b8[_0x3b0f69(0x12c)]+'\x20'+a31_0x3024fb[_0x3b0f69(0x179)]('(id:\x20'+_0x4572b8['id']+')')),console[_0x3b0f69(0x21c)](_0x3b0f69(0xfa)+a31_0x3024fb['dim'](_0x3b0f69(0x1de))+'\x20'+_0x232d72);}else console[_0x3b0f69(0x21c)]('\x20\x20'+a31_0x3024fb[_0x3b0f69(0x179)](_0x3b0f69(0x2c1)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x298);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x134);async[a31_0x3a88a7(0xcf)](_0x332137){const _0x262deb=a31_0x3a88a7,{options:_0x514ac1,args:_0x303564,tdx:_0x1ebaaf}=_0x332137,_0x48ccfd=_0x514ac1,_0x470b7b=_0x303564[0x0],_0x47db95=_0x303564[0x1]||_0x514ac1[_0x262deb(0x226)];if(!_0x470b7b)return console['error']('Error:\x20Service\x20name\x20is\x20required'),console['error'](_0x262deb(0x15f)),console['error'](_0x262deb(0x1bd)),0x1;if(!_0x47db95)return showParentSegmentNotSetError(_0x262deb(0x2d5)+_0x262deb(0x1bd)),0x1;const _0x51bac4=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x47db95+'\x27...',()=>_0x1ebaaf['segment'][_0x262deb(0x2c9)](_0x47db95),{'verbose':_0x514ac1[_0x262deb(0x26a)]}),_0x10a6e2=_0x51bac4[_0x262deb(0x1c3)],_0x506f39={'name':_0x470b7b,'description':_0x48ccfd['description'],'public':_0x48ccfd[_0x262deb(0x100)]},_0x3d045c=await withSpinner(_0x262deb(0xf2)+_0x470b7b+_0x262deb(0x108),()=>_0x1ebaaf[_0x262deb(0x165)]['create'](_0x10a6e2,_0x506f39),{'verbose':_0x514ac1['verbose']}),_0xc84855=_0x3d045c[_0x262deb(0x1c3)];return console[_0x262deb(0xfc)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0xc84855[_0x262deb(0x12c)]+_0x262deb(0x25a)+_0xc84855['id']),await handleSDKOutput([_0xc84855],_0x514ac1),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x299);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0xde);async['execute'](_0x5dcab1){const _0x5353e0=a31_0x3a88a7,{options:_0x555f21,args:_0x5b7242,tdx:_0x33b87b}=_0x5dcab1,_0x4dcb08=_0x5b7242[0x0],_0xbfd1ad=_0x5b7242[0x1]||_0x555f21[_0x5353e0(0x226)];if(!_0x4dcb08)return console['error'](_0x5353e0(0x13e)),console[_0x5353e0(0xfc)](_0x5353e0(0x282)),console[_0x5353e0(0xfc)](_0x5353e0(0x27f)),0x1;if(!_0xbfd1ad)return showParentSegmentNotSetError(_0x5353e0(0x183)+_0x5353e0(0x27f)),0x1;const _0x1bb4b9=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xbfd1ad+_0x5353e0(0x108),()=>_0x33b87b['segment'][_0x5353e0(0x2c9)](_0xbfd1ad),{'verbose':_0x555f21[_0x5353e0(0x26a)]}),_0x4e5bcd=_0x1bb4b9[_0x5353e0(0x1c3)],_0x10fb45=await withSpinner(_0x5353e0(0x27e)+_0x4dcb08+'\x27...',()=>_0x33b87b[_0x5353e0(0x165)][_0x5353e0(0x1d4)](_0x4e5bcd,_0x4dcb08),{'verbose':_0x555f21['verbose']}),_0x199896=_0x10fb45[_0x5353e0(0x1c3)];if(_0x555f21['json']||_0x555f21[_0x5353e0(0x213)])await handleSDKOutput([_0x199896],_0x555f21);else{console['log'](a31_0x3024fb[_0x5353e0(0x223)](_0x199896['name'])+'\x20'+a31_0x3024fb['dim'](_0x5353e0(0x242)+_0x199896['id']+')'));_0x199896['description']&&console[_0x5353e0(0x21c)]('\x20\x20'+a31_0x3024fb['dim'](_0x199896[_0x5353e0(0x110)]));console[_0x5353e0(0x21c)]('\x20\x20'+a31_0x3024fb[_0x5353e0(0x2d6)](_0x5353e0(0x187))+'\x20'+(_0x199896[_0x5353e0(0x100)]?'yes':'no'));if(_0x199896[_0x5353e0(0x201)]&&_0x199896['tokens'][_0x5353e0(0x2d7)]>0x0)for(const _0x51a66a of _0x199896[_0x5353e0(0x201)]){const _0x5289c1=_0x51a66a[_0x5353e0(0x1c0)]?.[_0x5353e0(0x2d7)]?_0x51a66a[_0x5353e0(0x1c0)][_0x5353e0(0x1ee)](',\x20'):_0x5353e0(0x274);console[_0x5353e0(0x21c)]('\x20\x20'+a31_0x3024fb[_0x5353e0(0x2d6)](_0x5353e0(0x1c8))+'\x20'+_0x51a66a[_0x5353e0(0x12c)]+'\x20'+a31_0x3024fb[_0x5353e0(0x179)]('(id:\x20'+_0x51a66a['id']+')')),console[_0x5353e0(0x21c)](_0x5353e0(0xfa)+a31_0x3024fb[_0x5353e0(0x179)]('allowed\x20IPs:')+'\x20'+_0x5289c1);}else console['log']('\x20\x20'+a31_0x3024fb[_0x5353e0(0x179)](_0x5353e0(0x2c1)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x1d0);['description']='Delete\x20a\x20personalization\x20service';async[a31_0x3a88a7(0xcf)](_0x654d92){const _0x3bb778=a31_0x3a88a7,{options:_0x2b268f,args:_0x1b5803,tdx:_0x3373cb}=_0x654d92,_0x148fd0=_0x1b5803[0x0],_0x231172=_0x1b5803[0x1]||_0x2b268f[_0x3bb778(0x226)];if(!_0x148fd0)return console[_0x3bb778(0xfc)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x3bb778(0xfc)](_0x3bb778(0x1aa)),console[_0x3bb778(0xfc)](_0x3bb778(0x2a7)),0x1;if(!_0x231172)return showParentSegmentNotSetError(_0x3bb778(0x18d)+_0x3bb778(0x2a7)),0x1;const _0x57f2c9=await withSpinner(_0x3bb778(0xf4)+_0x231172+'\x27...',()=>_0x3373cb[_0x3bb778(0x1e5)][_0x3bb778(0x2c9)](_0x231172),{'verbose':_0x2b268f['verbose']}),_0x2c7126=_0x57f2c9[_0x3bb778(0x1c3)];return await withSpinner('Deleting\x20personalization\x20service\x20\x27'+_0x148fd0+'\x27...',()=>_0x3373cb[_0x3bb778(0x165)][_0x3bb778(0x142)](_0x2c7126,_0x148fd0),{'verbose':_0x2b268f['verbose']}),console[_0x3bb778(0xfc)](_0x3bb778(0x22e)+_0x148fd0+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x2ef);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x10a);async['execute'](_0x39a88f){const _0x292715=a31_0x3a88a7,{options:_0x126fae,args:_0x1934b4,tdx:_0x4848c6}=_0x39a88f,_0x16afc0=_0x126fae,_0x4c1bd8=_0x1934b4[0x0],_0x74749=_0x1934b4[0x1]||_0x126fae[_0x292715(0x226)];if(!_0x4c1bd8)return console[_0x292715(0xfc)](_0x292715(0x13e)),console[_0x292715(0xfc)](_0x292715(0x1f5)),console[_0x292715(0xfc)](_0x292715(0x1a5)),0x1;if(!_0x16afc0[_0x292715(0x12c)])return console[_0x292715(0xfc)](_0x292715(0x2d1)),console[_0x292715(0xfc)](_0x292715(0x1f5)),0x1;if(!_0x74749)return showParentSegmentNotSetError(_0x292715(0x215)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x5f32a8=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x74749+_0x292715(0x108),()=>_0x4848c6[_0x292715(0x1e5)][_0x292715(0x2c9)](_0x74749),{'verbose':_0x126fae[_0x292715(0x26a)]}),_0x20cd88=_0x5f32a8[_0x292715(0x1c3)],_0x184245={'name':_0x16afc0['name']};_0x16afc0[_0x292715(0x110)]!==undefined&&(_0x184245[_0x292715(0x110)]=_0x16afc0[_0x292715(0x110)]);const _0x1e94ac=await withSpinner(_0x292715(0x221)+_0x4c1bd8+_0x292715(0x108),()=>_0x4848c6[_0x292715(0x165)][_0x292715(0x230)](_0x20cd88,_0x4c1bd8,_0x184245),{'verbose':_0x126fae[_0x292715(0x26a)]}),_0x5ede85=_0x1e94ac[_0x292715(0x1c3)];return console[_0x292715(0xfc)](_0x292715(0x198)+_0x5ede85[_0x292715(0x12c)]+'\x27'),await handleSDKOutput([_0x5ede85],_0x126fae),0x0;}}function a31_0x547b(){const _0x2edc9e=['Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','join','\x20\x20Database:\x20','enriched','sourceTableError','\x20No\x20changes\x20-\x20','Parent\x20segment:\x20','listParents','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Available\x20behaviors:','segment:parent:fields','ps:rt:jn:resume','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','45jBkqfo','ps:pz:show','launched','audienceId','rowCount','displayColumns','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','tokens','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','segment:parent:sql','\x0aUsage:\x20tdx\x20ps\x20preview\x20','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','👥\x20','double','Session:','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','map','payload:','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','win32','green','Listing\x20parent\x20segments\x20matching\x20\x27','jobId','Error:\x20File\x20not\x20found:\x20','jsonl','ps:pz:patch','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','displayPreviewResults','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','segment:parent:update','updated:','log','\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','Aborted.','Output\x20Database:','entryCriteria:','Updating\x20personalization\x20service\x20\x27','Overwrite\x20\x27','bold','parentFolder','segment:parent:validate','parentSegment','number','To\x20view\x20sample\x20data:','realtime','2717812AmftUl','parent_segments','\x20RT\x20journey','\x20service','✔\x20Deleted\x20personalization\x20service\x20\x27','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','patch','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','RT\x202.0:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','\x20RT\x20configuration\x20is\x20valid','resumeJourney','user_id','391670VkaLtb','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','database','Errors:','Error:','parent_id','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','\x27\x20is\x20up\x20to\x20date','List\x20available\x20fields\x20for\x20segmentation','(id:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','/\x20→\x20','stitchingKeys','displayPreviewHints','page_view','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','ps:pz:init','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','ignore','✔\x20Retrieved\x20RT\x20configuration\x20version','ps:pz:service:list','Updating\x20parent\x20segment\x20\x27','Created','column_type','✔\x20Renamed\x20directory\x20to\x20','`\x20to\x20download\x20the\x20configuration\x20first','scheduleOption','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','\x20rows\x20','displayBehaviorsStats','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','totalEvents','displayAttributesStats','\x27\x20with\x20ID:\x20','\x20\x20\x20\x20-\x20','getPersonalization','\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','information_schema','\x20personalization','realtime:','✔\x20Found\x20personalization\x20\x27','patchPersonalization','\x27\x20(id:\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','customerGroupFile','listJourneys','session','Create\x20parent\x20segment\x20\x27','Analyzing\x20changes...','verbose','idStitching','audienceId:','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Listing\x20personalization\x20services\x20for\x20\x27','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20RT-enabled\x20parent\x20segment','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\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','any','valid','getParentSQL','eventKind','ps:pz:service:token:delete','getOutputDatabaseName','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','state','Get\x20current\x20RT\x20configuration\x20version\x20status','in\x20','Fetching\x20personalization\x20service\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','ID\x20Stitching:','platform','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','/app/dw/parentSegments/','deletePersonalization','folder-segment','displayMasterInfo','Update\x20a\x20realtime\x20personalization\x20entity','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','Master\x20+\x20Attributes','limit','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','1083804ongiJL','Available\x20attributes:','\x20configured','\x27\x20is\x20already\x20up\x20to\x20date','\x20to\x20configure\x20your\x20personalization\x20service','\x20=\x20','listFields','\x20total','scheduleType','Updating','Error:\x20Token\x20\x27','ps:pz:service:create','ps:pz:service:show','Personalization\x20service\x20description','Error:\x20--behavior\x20requires\x20a\x20name\x0a','\x5c$&','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','listPersonalizations','validateParentYaml','sampleData','No\x20parent\x20segments\x20match\x20pattern:\x20','use','\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','ps:rt:list','Fetching\x20behavior\x20list...','Source:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Executing\x20parent\x20segment\x20query...','updateParent','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','schemaError','true','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','reduce','column','deleteToken','type','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','matchedCount','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','behavior','workflowAttemptId','\x20true','✔\x20Deleted\x20personalization\x20\x27','Usage:\x20tdx\x20ps\x20rt\x20configuration_versions\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20(requires\x20context)\x0a','column_name','\x20(paused)','identifier','behaviorsFile','SQL\x20query:\x0a','ps:rt:validate','.customers)','no\x20tokens\x20configured','last_page_viewed','Error\x20reading\x20file:\x20','\x20\x202.\x20Run\x20','pauseJourney','Creating','\x20\x20Note:\x20','Fetching\x20parent\x20segment\x20\x27','resolveParentId','-1d','Creating\x20parent\x20segment\x20\x27','No\x20personalizations\x20configured','elapsedTimeMillis','tdx\x20ps\x20push\x20','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','status','Error:\x20--name\x20is\x20required','Join\x20on:','addAttributes','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','cyan','length','darwin','status:\x20','\x0a⚠️\x20\x20Both\x20','stageCount','includeSensitive:','list','getBehaviorNames','primaryKey','Customers:','toFixed','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','YAML\x20file:\x20','folderId','indexOf','Master\x20Table','Personalization:','start','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','relationships','personalization_services','\x20--attribute\x20\x22<name>\x22','Status:','ps:pz:create','ps:pz:service:update','preview','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','coveragePercent','execute','stop','createdAt','open','runParent','dirname','SELECT\x20*\x20FROM\x20','Default','523434DbLaya','segment:parent:push','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','query','segment:parent:desc','displaySampleData','Show\x20personalization\x20service\x20details','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','null','To\x20cancel:','behaviors','segment:parent:list','pushParentYaml','stats','segment:parent:show','ps:rt:configuration_versions','red','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','file','repeat','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','master','includeSensitive','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','utf-8','Creating\x20personalization\x20service\x20\x27','{\x0a\x20\x20\x22database\x22:\x20\x22','Resolving\x20parent\x20segment\x20\x27','Show\x20a\x20specific\x20realtime\x20personalization','joinKey','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','Delete\x20a\x20realtime\x20personalization','paused','\x20\x20\x20\x20','displaySummary','error','\x20is\x20already\x20up\x20to\x20date','customerPercent','realtime_enabled','public','schemaValid','Resume\x20activations\x20in\x20an\x20RT\x20journey','pullParentYaml','\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','\x20[Job\x20ID:\x20','\x20--interval\x20','/attempt/','\x27...','\x0aNew\x20parent\x20segment\x20\x27','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','split','✔\x20Updated\x20parent\x20segment\x20\x27','RT\x202.0\x20Validate:','yes','createToken','description','replace','behavior_','Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a','\x20\x20\x20\x20\x20\x20','td_client_id','customerGroup','Error:\x20--attribute\x20requires\x20a\x20name\x0a','\x20rows)','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x0aChanges\x20to\x20apply\x20to\x20\x27','push','.yml','segment:parent:preview','setJobId','Validating\x20RT\x20configuration...','message','columns','Updated','✔\x20No\x20changes\x20-\x20\x27','✔\x20Created\x20token\x20\x27','interval','keyEventCriteria','using\x20the\x20default\x20path:\x20','test','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','identifier:\x20','\x20+\x20[','name','No\x20RT\x20journeys\x20found','Create\x20a\x20realtime\x20personalization\x20entity','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','Listing\x20personalizations\x20for\x20\x27','payload','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Options\x20(one\x20required):\x0a','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','isDirectory','Validate:','addBehaviors','Listing\x20parent\x20segments...','addBehaviorsFile','Join:','workflowId','parent_segment','label','Error:\x20Service\x20ID\x20is\x20required','\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','Error:\x20Personalization\x20ID\x20is\x20required','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','delete','\x22\x20}','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','Output\x20file:\x20','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','keyEventId:','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x27\x20and\x20run\x20workflow?','\x20Configuration\x20is\x20valid','output','\x0a✔\x20Workflow\x20started','Site:\x20','foreignKey','attributesFile','/\x20and\x20','Behaviors','formatSchemaJson','trim','Name:\x20','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','My\x20Service','single','web','keyEventId','Listing\x20RT-enabled\x20parent\x20segments...','Master:','displayValidateResults','population','\x20behaviors','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','allValid','endsWith','3tovwBl','localeCompare','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','personalization','segment:parent:run','/\x20directories\x20exist.','toLowerCase','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','site','yellow','processedRows','Attempt:','1691085jtVVxx','tdx\x20ps\x20preview\x20','customersWithEvents','Fetching\x20SQL\x20for\x20\x27','Rows:','\x0aNo\x20sample\x20data\x20available','Pattern:\x20','\x0aError:','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','segment:parent:create','\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','dim','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','Finding\x20service\x20for\x20token...','FINISHED','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','\x20tdx\x20wf\x20attempt\x20','updatedAt','match','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','RT\x20Journey\x20ID:\x20','✔\x20Updated\x20personalization\x20\x27','Deleting\x20personalization\x20\x27','public:','\x20\x20\x20\x20\x20\x20\x20\x20','string','\x20--enriched','getParentFull','\x20--behavior\x20\x22','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','\x20Opening\x20','workflowSessionId','\x0a\x20\x20\x20\x20}','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','ps:rt:jn:list','/app/workflows/','7FCnXGT','Next\x20steps:','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','✔\x20Updated\x20personalization\x20service\x20\x27','Events:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','text','filter','/\x20directory.\x0a','xdg-open','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','ps:pz:list','errors','No\x20RT-enabled\x20parent\x20segments\x20found','Creating\x20token\x20\x27','events','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','all','Attributes:','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','/sessions/','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','Columns:','entryCriteria','List\x20parent\x20segments','personalizationServices','format','5490800BaWwoL','sections','Pause\x20activations\x20in\x20an\x20RT\x20journey','value','\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','\x20Added\x20personalization\x20template\x20to\x20','Get\x20SQL\x20query\x20for\x20parent\x20segment','✔\x20Created\x20personalization\x20\x27','\x20parent\x20segment\x20\x27','\x20--behavior\x20\x22<name>\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','\x20--attribute\x20\x22','run','allowedIps','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','displayRealtimeInfo','data','Apply\x20changes\x20to\x20\x27','getCurrentConfigVersion','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','Options:\x0a','token:','List\x20RT\x20journeys','attribute','audienceId:\x20','\x20to\x20push\x20the\x20configuration','attributes','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','\x20\x20\x20','ps:pz:service:delete','.yaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','3510370qGrTkh','get','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','sourceTableValid','✔\x20Found\x20','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','json','Deleting\x20token\x20\x27','segment:parent:pull','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','\x20personalization\x20service','allowed\x20IPs:','Options:','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','customers','table','Error:\x20--database\x20and\x20--table\x20are\x20required','Fetching\x20sample\x20data...','segment','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','\x20Added\x20RT\x202.0\x20template\x20section','sort','Listing\x20fields\x20for\x20\x27','Behavior:','timezone'];a31_0x547b=function(){return _0x2edc9e;};return a31_0x547b();}export class PSPzServiceTokenCreateCommand extends BaseCommand{['name']='ps:pz:service:token:create';[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x2cf);async[a31_0x3a88a7(0xcf)](_0x1cf28b){const _0x4521cc=a31_0x3a88a7,{options:_0x730d85,args:_0xc612bc,tdx:_0x308239}=_0x1cf28b,_0x5eab58=_0x730d85,_0x2036ca=_0xc612bc[0x0],_0x55ce00=_0xc612bc[0x1],_0x14804f=_0xc612bc[0x2]||_0x730d85[_0x4521cc(0x226)];if(!_0x2036ca)return console['error']('Error:\x20Token\x20name\x20is\x20required'),console[_0x4521cc(0xfc)](_0x4521cc(0x200)),console[_0x4521cc(0xfc)](_0x4521cc(0x191)),0x1;if(!_0x55ce00)return console['error'](_0x4521cc(0x13e)),console[_0x4521cc(0xfc)](_0x4521cc(0x200)),console['error'](_0x4521cc(0x191)),0x1;if(!_0x14804f)return showParentSegmentNotSetError(_0x4521cc(0x129)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x2abba4=await withSpinner(_0x4521cc(0xf4)+_0x14804f+'\x27...',()=>_0x308239[_0x4521cc(0x1e5)][_0x4521cc(0x2c9)](_0x14804f),{'verbose':_0x730d85[_0x4521cc(0x26a)]}),_0xbfc085=_0x2abba4[_0x4521cc(0x1c3)],_0x4c5f85={'name':_0x2036ca};_0x5eab58[_0x4521cc(0x1c0)]&&(_0x4c5f85[_0x4521cc(0x1c0)]=_0x5eab58['allowedIps'][_0x4521cc(0x10b)](',')['map'](_0x453c57=>_0x453c57[_0x4521cc(0x153)]()));_0x5eab58[_0x4521cc(0x110)]&&(_0x4c5f85['description']=_0x5eab58[_0x4521cc(0x110)]);const _0x23b675=await withSpinner(_0x4521cc(0x1a3)+_0x2036ca+'\x27\x20for\x20service\x20\x27'+_0x55ce00+_0x4521cc(0x108),()=>_0x308239['personalization'][_0x4521cc(0x10f)](_0xbfc085,_0x55ce00,_0x4c5f85),{'verbose':_0x730d85[_0x4521cc(0x26a)]}),_0x5dd42c=_0x23b675[_0x4521cc(0x1c3)];return console['error'](_0x4521cc(0x124)+_0x5dd42c[_0x4521cc(0x12c)]+_0x4521cc(0x25a)+_0x5dd42c['id']),_0x5dd42c['value']&&(console['error'](a31_0x3024fb[_0x4521cc(0x16b)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0x4521cc(0xfc)](a31_0x3024fb[_0x4521cc(0x2d6)](_0x5dd42c[_0x4521cc(0x1b6)])),console[_0x4521cc(0xfc)]('')),await handleSDKOutput([_0x5dd42c],_0x730d85),0x0;}}function a31_0x2b70(_0x486c04,_0x2f1687){_0x486c04=_0x486c04-0xcd;const _0x547b24=a31_0x547b();let _0x2b70ba=_0x547b24[_0x486c04];return _0x2b70ba;}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x278);[a31_0x3a88a7(0x110)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async['execute'](_0x2b846b){const _0x29d590=a31_0x3a88a7,{options:_0xc8a166,args:_0x449310,tdx:_0x1bbe41}=_0x2b846b,_0x1e87dc=_0x449310[0x0],_0x1bd492=_0x449310[0x1]||_0xc8a166[_0x29d590(0x226)];if(!_0x1e87dc)return console[_0x29d590(0xfc)]('Error:\x20Token\x20ID\x20is\x20required'),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console[_0x29d590(0xfc)](_0x29d590(0x1d2)),0x1;if(!_0x1bd492)return showParentSegmentNotSetError(_0x29d590(0x272)+_0x29d590(0x1d2)),0x1;const _0x565811=await withSpinner(_0x29d590(0xf4)+_0x1bd492+_0x29d590(0x108),()=>_0x1bbe41[_0x29d590(0x1e5)]['resolveParentId'](_0x1bd492),{'verbose':_0xc8a166[_0x29d590(0x26a)]}),_0x285dae=_0x565811[_0x29d590(0x1c3)],_0x326907=await withSpinner(_0x29d590(0x17b),()=>_0x1bbe41['personalization']['list'](_0x285dae),{'verbose':_0xc8a166[_0x29d590(0x26a)]}),_0x5b4ee2=_0x326907[_0x29d590(0x1c3)];let _0x3d712d;for(const _0x521c3e of _0x5b4ee2){if(_0x521c3e[_0x29d590(0x201)]?.['some'](_0x18c40a=>_0x18c40a['id']===_0x1e87dc)){_0x3d712d=_0x521c3e['id'];break;}}if(!_0x3d712d)return console[_0x29d590(0xfc)](_0x29d590(0x297)+_0x1e87dc+_0x29d590(0x1dc)),0x1;const _0x81de87=await withSpinner(_0x29d590(0x1da)+_0x1e87dc+_0x29d590(0x108),()=>_0x1bbe41[_0x29d590(0x165)][_0x29d590(0x2b0)](_0x285dae,_0x3d712d,_0x1e87dc),{'verbose':_0xc8a166[_0x29d590(0x26a)]}),_0x40b3e9=_0x81de87['data'];return console[_0x29d590(0xfc)]('✔\x20Deleted\x20token\x20\x27'+(_0x40b3e9[_0x29d590(0x12c)]||_0x1e87dc)+'\x27'),await handleSDKOutput([_0x40b3e9],_0xc8a166),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x1a0);['description']=a31_0x3a88a7(0x148);async[a31_0x3a88a7(0xcf)](_0x2bae6e){const _0x19d821=a31_0x3a88a7,{options:_0x386cfc,args:_0x39f357,tdx:_0x4e9fe9}=_0x2bae6e,_0x19ed43=_0x39f357[0x0]||_0x386cfc[_0x19d821(0x226)];if(!_0x19ed43)return showParentSegmentNotSetError(_0x19d821(0x238)+_0x19d821(0x2a3)),0x1;const _0x3978a5=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x19ed43+_0x19d821(0x108),()=>_0x4e9fe9[_0x19d821(0x1e5)]['resolveParentId'](_0x19ed43),{'verbose':_0x386cfc['verbose']}),_0x56f9da=_0x3978a5[_0x19d821(0x1c3)],_0x1d33cf=await withSpinner(_0x19d821(0x130)+_0x19ed43+'\x27...',()=>_0x4e9fe9[_0x19d821(0x165)][_0x19d821(0x29e)](_0x56f9da),{'verbose':_0x386cfc[_0x19d821(0x26a)]}),_0x770569=_0x1d33cf[_0x19d821(0x1c3)];console['error'](_0x19d821(0x1d7)+_0x770569[_0x19d821(0x2d7)]+_0x19d821(0x25f)+(_0x770569[_0x19d821(0x2d7)]!==0x1?'s':''));if(_0x386cfc[_0x19d821(0x1b2)]===_0x19d821(0x1d9)||_0x386cfc[_0x19d821(0x1b2)]===_0x19d821(0x213))await handleSDKOutput(_0x770569,_0x386cfc);else{if(_0x770569['length']===0x0)console[_0x19d821(0x21c)](_0x19d821(0x2cc));else for(const _0x365495 of _0x770569){console[_0x19d821(0x21c)](a31_0x3024fb['bold'](_0x365495[_0x19d821(0x12c)])+'\x20'+a31_0x3024fb[_0x19d821(0x179)]('(id:\x20'+_0x365495['id']+')'));_0x365495[_0x19d821(0x110)]&&console['log']('\x20\x20'+a31_0x3024fb[_0x19d821(0x179)](_0x365495[_0x19d821(0x110)]));const _0x505785=_0x365495[_0x19d821(0x1b4)]?.[_0x19d821(0x2d7)]||0x0;console[_0x19d821(0x21c)]('\x20\x20'+a31_0x3024fb['cyan']('sections:')+'\x20'+_0x505785);if(_0x365495[_0x19d821(0x1b4)]&&_0x365495[_0x19d821(0x1b4)][_0x19d821(0x2d7)]>0x0)for(const _0x2e328b of _0x365495['sections']){console['log'](_0x19d821(0x25b)+_0x2e328b[_0x19d821(0x12c)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x1fb);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0xf5);async[a31_0x3a88a7(0xcf)](_0x1d2f37){const _0x59ac4b=a31_0x3a88a7,{options:_0x3a459,args:_0x5e4474,tdx:_0x42a518}=_0x1d2f37,_0x3e65d4=_0x5e4474[0x0];if(!_0x3e65d4)return console[_0x59ac4b(0xfc)](_0x59ac4b(0x140)),console[_0x59ac4b(0xfc)](_0x59ac4b(0xea)),0x1;const _0x34e0d1=await withSpinner('Getting\x20personalization\x20\x27'+_0x3e65d4+_0x59ac4b(0x108),()=>_0x42a518[_0x59ac4b(0x165)][_0x59ac4b(0x25c)](_0x3e65d4),{'verbose':_0x3a459[_0x59ac4b(0x26a)]}),_0x3c5b91=_0x34e0d1['data'];console[_0x59ac4b(0xfc)](_0x59ac4b(0x261)+_0x3c5b91[_0x59ac4b(0x12c)]+'\x27');if(_0x3a459[_0x59ac4b(0x1b2)]===_0x59ac4b(0x1d9)||_0x3a459[_0x59ac4b(0x1b2)]===_0x59ac4b(0x213))await handleSDKOutput([_0x3c5b91],_0x3a459);else{console[_0x59ac4b(0x21c)](a31_0x3024fb[_0x59ac4b(0x223)](_0x3c5b91[_0x59ac4b(0x12c)])+'\x20'+a31_0x3024fb[_0x59ac4b(0x179)](_0x59ac4b(0x242)+_0x3c5b91['id']+')'));_0x3c5b91[_0x59ac4b(0x110)]&&console[_0x59ac4b(0x21c)]('\x20\x20'+a31_0x3024fb['dim'](_0x3c5b91[_0x59ac4b(0x110)]));_0x3c5b91['audienceId']&&console[_0x59ac4b(0x21c)]('\x20\x20'+a31_0x3024fb[_0x59ac4b(0x2d6)](_0x59ac4b(0x26c))+'\x20'+_0x3c5b91[_0x59ac4b(0x1fd)]);console[_0x59ac4b(0x21c)]('\x20\x20'+a31_0x3024fb[_0x59ac4b(0x2d6)]('created:')+'\x20'+_0x3c5b91[_0x59ac4b(0xd1)]),console['log']('\x20\x20'+a31_0x3024fb[_0x59ac4b(0x2d6)](_0x59ac4b(0x21b))+'\x20'+_0x3c5b91[_0x59ac4b(0x181)]);const _0x436bed=_0x3c5b91[_0x59ac4b(0x1b4)]?.['length']||0x0;console[_0x59ac4b(0x21c)]('\x20\x20'+a31_0x3024fb[_0x59ac4b(0x2d6)]('sections:')+'\x20'+_0x436bed);if(_0x3c5b91[_0x59ac4b(0x1b4)]&&_0x3c5b91[_0x59ac4b(0x1b4)][_0x59ac4b(0x2d7)]>0x0)for(const _0x1ec6fb of _0x3c5b91['sections']){console[_0x59ac4b(0x21c)](_0x59ac4b(0xfa)+a31_0x3024fb[_0x59ac4b(0x223)](_0x1ec6fb[_0x59ac4b(0x12c)])+'\x20'+a31_0x3024fb['dim']('(id:\x20'+_0x1ec6fb['id']+')')),_0x1ec6fb[_0x59ac4b(0x1af)]&&(console['log'](_0x59ac4b(0x114)+a31_0x3024fb[_0x59ac4b(0x2d6)](_0x59ac4b(0x220))+'\x20'+_0x1ec6fb[_0x59ac4b(0x1af)][_0x59ac4b(0x12c)]),_0x1ec6fb['entryCriteria'][_0x59ac4b(0x126)]?.[_0x59ac4b(0x159)]&&console['log'](_0x59ac4b(0x188)+a31_0x3024fb['cyan'](_0x59ac4b(0x147))+'\x20'+_0x1ec6fb[_0x59ac4b(0x1af)]['keyEventCriteria'][_0x59ac4b(0x159)])),_0x1ec6fb[_0x59ac4b(0x131)]&&console['log']('\x20\x20\x20\x20\x20\x20'+a31_0x3024fb['cyan'](_0x59ac4b(0x20c))+'\x20'+JSON['stringify'](_0x1ec6fb['payload'])),_0x1ec6fb[_0x59ac4b(0xef)]&&console['log'](_0x59ac4b(0x114)+a31_0x3024fb[_0x59ac4b(0x2d6)](_0x59ac4b(0x2dc))+_0x59ac4b(0x2b7));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{['name']='ps:pz:delete';['description']=a31_0x3a88a7(0xf8);async['execute'](_0xa8a39){const _0x15df8d=a31_0x3a88a7,{options:_0x216c98,args:_0xeb1021,tdx:_0x489758}=_0xa8a39,_0x46d780=_0xeb1021[0x0];if(!_0x46d780)return console[_0x15df8d(0xfc)](_0x15df8d(0x140)),console['error'](_0x15df8d(0x288)),0x1;return await withSpinner(_0x15df8d(0x186)+_0x46d780+'\x27...',()=>_0x489758[_0x15df8d(0x165)][_0x15df8d(0x284)](_0x46d780),{'verbose':_0x216c98[_0x15df8d(0x26a)]}),console[_0x15df8d(0xfc)](_0x15df8d(0x2b8)+_0x46d780+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x2ee);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x12e);async[a31_0x3a88a7(0xcf)](_0x49487b){const _0xb93b11=a31_0x3a88a7,{options:_0x169917,tdx:_0x5b6692}=_0x49487b,_0x2aa5d9=_0x169917;let _0x2d2b7d;if(_0x2aa5d9[_0xb93b11(0xeb)]){_0x2d2b7d=await loadJSON(_0x2aa5d9[_0xb93b11(0xeb)],!![]);if(!_0x2d2b7d[_0xb93b11(0x2ea)]?.[_0xb93b11(0x224)])return console[_0xb93b11(0xfc)](_0xb93b11(0x1ed)),console[_0xb93b11(0xfc)]('Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:'),console[_0xb93b11(0xfc)]('\x20\x20\x22relationships\x22:\x20{\x20\x22parentFolder\x22:\x20{\x20\x22data\x22:\x20{\x20\x22id\x22:\x20\x22<id>\x22,\x20\x22type\x22:\x20\x22folder-segment\x22\x20}\x20}\x20}'),0x1;}else{if(!_0x2aa5d9[_0xb93b11(0x12c)])return console[_0xb93b11(0xfc)](_0xb93b11(0x155)),console['error'](_0xb93b11(0x202)),console['error'](_0xb93b11(0x19a)),0x1;if(_0x2aa5d9['description']===undefined)return console[_0xb93b11(0xfc)](_0xb93b11(0x146)),console[_0xb93b11(0xfc)](_0xb93b11(0x202)),console[_0xb93b11(0xfc)](_0xb93b11(0x19a)),0x1;if(_0x2aa5d9[_0xb93b11(0x2e4)]===undefined)return console[_0xb93b11(0xfc)](_0xb93b11(0x1c6)),console['error']('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x3b0c2e=_0x2aa5d9[_0xb93b11(0x1fd)];if(!_0x3b0c2e&&_0x169917['parentSegment']){const _0xab2f97=await withSpinner(_0xb93b11(0xf4)+_0x169917[_0xb93b11(0x226)]+'\x27...',()=>_0x5b6692[_0xb93b11(0x1e5)][_0xb93b11(0x2c9)](_0x169917['parentSegment']),{'verbose':_0x169917['verbose']});_0x3b0c2e=_0xab2f97['data'];}let _0x30ba95;_0x2aa5d9[_0xb93b11(0x1b4)]&&(_0x30ba95=await loadJSON(_0x2aa5d9[_0xb93b11(0x1b4)],![]));const _0x3e2fd5=_0x2aa5d9[_0xb93b11(0x2e4)]===_0xb93b11(0xe1)?null:{'id':_0x2aa5d9[_0xb93b11(0x2e4)],'type':_0xb93b11(0x285)};_0x2d2b7d={'attributes':{'name':_0x2aa5d9['name'],'description':_0x2aa5d9[_0xb93b11(0x110)]||null,..._0x3b0c2e!==undefined&&{'audienceId':_0x3b0c2e},..._0x30ba95!==undefined&&{'sections':_0x30ba95}},'relationships':{'parentFolder':{'data':_0x3e2fd5}}};}const _0x4e62e3=await withSpinner('Creating\x20personalization\x20\x27'+(_0x2d2b7d[_0xb93b11(0x1cd)]?.[_0xb93b11(0x12c)]??'')+'\x27...',()=>_0x5b6692[_0xb93b11(0x165)]['createPersonalization'](_0x2d2b7d),{'verbose':_0x169917['verbose']}),_0x19ef20=_0x4e62e3['data'];return console[_0xb93b11(0xfc)](_0xb93b11(0x1ba)+_0x19ef20['name']+_0xb93b11(0x25a)+_0x19ef20['id']),await handleSDKOutput([_0x19ef20],_0x169917),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x214);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x287);async[a31_0x3a88a7(0xcf)](_0x1aff53){const _0x36c6f1=a31_0x3a88a7,{options:_0x3baf4e,args:_0x600ee3}=_0x1aff53,_0x3ff0b2=_0x3baf4e,_0xc424af=_0x600ee3[0x0];if(!_0xc424af)return console[_0x36c6f1(0xfc)](_0x36c6f1(0x140)),console[_0x36c6f1(0xfc)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console['error'](_0x36c6f1(0x19f)),0x1;let _0x5a0b48;if(_0x3ff0b2['file'])_0x5a0b48=await loadJSON(_0x3ff0b2[_0x36c6f1(0xeb)],!![]);else{if(!_0x3ff0b2['name'])return console['error'](_0x36c6f1(0x155)),console[_0x36c6f1(0xfc)](_0x36c6f1(0x17f)),0x1;if(_0x3ff0b2['description']===undefined)return console[_0x36c6f1(0xfc)](_0x36c6f1(0x146)),console[_0x36c6f1(0xfc)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x44fcf3;_0x3ff0b2[_0x36c6f1(0x1b4)]&&(_0x44fcf3=await loadJSON(_0x3ff0b2[_0x36c6f1(0x1b4)],![])),_0x5a0b48={'attributes':{'name':_0x3ff0b2[_0x36c6f1(0x12c)],'description':_0x3ff0b2[_0x36c6f1(0x110)]||null,..._0x44fcf3!==undefined&&{'sections':_0x44fcf3}}};}const {tdx:_0x3377aa}=_0x1aff53,_0x3feac8=await withSpinner('Patching\x20personalization\x20\x27'+_0xc424af+'\x27...',()=>_0x3377aa[_0x36c6f1(0x165)][_0x36c6f1(0x262)](_0xc424af,_0x5a0b48),{'verbose':_0x3baf4e[_0x36c6f1(0x26a)]}),_0x8f2403=_0x3feac8[_0x36c6f1(0x1c3)];return console[_0x36c6f1(0xfc)](_0x36c6f1(0x185)+_0x8f2403['name']+_0x36c6f1(0x263)+_0x8f2403['id']+')'),await handleSDKOutput([_0x8f2403],_0x3baf4e),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x249);[a31_0x3a88a7(0x110)]='Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML';async[a31_0x3a88a7(0xcf)](_0x14b1ab){const _0x2beead=a31_0x3a88a7,{options:_0x3362ce,args:_0x2451da}=_0x14b1ab,_0x404c31=_0x2451da[0x0]||_0x3362ce[_0x2beead(0x226)];if(!_0x404c31)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'+_0x2beead(0x21d)),0x1;const _0x19838e=resolveYamlFile(_0x404c31);if(!existsSync(_0x19838e))return showFileNotFoundError(_0x19838e,_0x404c31),0x1;let _0x1814b2;try{_0x1814b2=readFileSync(_0x19838e,'utf-8');}catch(_0x1195ba){const _0x1dbe1a=_0x1195ba instanceof Error?_0x1195ba[_0x2beead(0x120)]:String(_0x1195ba);return console[_0x2beead(0xfc)](_0x2beead(0x2c3)+_0x1dbe1a),0x1;}let _0x852ff9;try{_0x852ff9=parseDef(_0x1814b2);}catch(_0x50e26c){const _0x2e34f7=_0x50e26c instanceof Error?_0x50e26c[_0x2beead(0x120)]:String(_0x50e26c);return console[_0x2beead(0xfc)](a31_0x3024fb[_0x2beead(0xe9)]('Error\x20parsing\x20YAML:\x20'+_0x2e34f7)),0x1;}if(_0x852ff9[_0x2beead(0x2eb)]&&_0x852ff9[_0x2beead(0x2eb)][_0x2beead(0x2d7)]>0x0)return console['error'](a31_0x3024fb[_0x2beead(0x16b)](_0x2beead(0x248)+_0x19838e)),console[_0x2beead(0xfc)](a31_0x3024fb['dim'](_0x2beead(0x1cf)+_0x852ff9['personalization_services'][_0x2beead(0x2d7)]+'\x20service(s)\x20configured')),0x1;!_0x852ff9[_0x2beead(0x229)]&&(_0x852ff9[_0x2beead(0x229)]={'events':[{'name':_0x2beead(0x247),'source_table':'<database>.<table>'}],'attributes':[{'name':_0x2beead(0x2c2),'type':_0x2beead(0x157)}],'id_stitching':{'primary_key':_0x852ff9[_0x2beead(0xee)][_0x2beead(0x1e2)]===_0x2beead(0x1e1)?_0x2beead(0x115):_0x2beead(0x236)}});_0x852ff9['personalization_services']=[{'name':_0x2beead(0x156),'description':_0x2beead(0x29a),'trigger_event':'page_view','sections':[{'name':_0x2beead(0xd6),'criteria':_0x2beead(0x2ac),'attributes':['last_page_viewed']}]}];const _0x5609dd=serializeDef(_0x852ff9);return writeFileSync(_0x19838e,_0x5609dd,'utf-8'),console[_0x2beead(0xfc)](a31_0x3024fb[_0x2beead(0x20f)]('✔')+_0x2beead(0x1b8)+a31_0x3024fb[_0x2beead(0x2d6)](_0x19838e)),(!_0x852ff9[_0x2beead(0x229)]||_0x1814b2[_0x2beead(0x2e5)](_0x2beead(0x260))===-0x1)&&console[_0x2beead(0xfc)](a31_0x3024fb[_0x2beead(0x20f)]('✔')+_0x2beead(0x1e7)),console[_0x2beead(0xfc)]('\x0a'+a31_0x3024fb[_0x2beead(0x179)](_0x2beead(0x195))),console['error']('\x20\x201.\x20Edit\x20'+_0x19838e+_0x2beead(0x291)),console['error'](_0x2beead(0x2c4)+a31_0x3024fb[_0x2beead(0x179)](_0x2beead(0x2ce)+_0x404c31)+_0x2beead(0x1cc)),0x0;}}