@treasuredata/tdx 2026.3.41 → 2026.3.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/auth-login-command.js +1 -1
  11. package/dist/commands/cas-command.js +1 -1
  12. package/dist/commands/cas-segment-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-statusline-command.js +1 -1
  16. package/dist/commands/claude-usage-command.js +1 -1
  17. package/dist/commands/command.js +1 -1
  18. package/dist/commands/connection-command.js +1 -1
  19. package/dist/commands/databases.js +1 -1
  20. package/dist/commands/delivery-command.js +1 -1
  21. package/dist/commands/describe.js +1 -1
  22. package/dist/commands/engage-campaign-pull-command.js +1 -1
  23. package/dist/commands/engage-campaign-push-command.js +1 -1
  24. package/dist/commands/engage-campaign-validate-command.js +1 -1
  25. package/dist/commands/engage-command.js +1 -1
  26. package/dist/commands/engage-template-pull-command.js +1 -1
  27. package/dist/commands/engage-template-push-command.js +1 -1
  28. package/dist/commands/engage-template-validate-command.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/journey-command.js +1 -1
  31. package/dist/commands/journey-validate-command.js +1 -1
  32. package/dist/commands/llm-command.js +1 -1
  33. package/dist/commands/mcp-command.js +1 -1
  34. package/dist/commands/parent-segment-command.js +1 -1
  35. package/dist/commands/policy-command.js +1 -1
  36. package/dist/commands/profile-command.js +1 -1
  37. package/dist/commands/profiles-command.js +1 -1
  38. package/dist/commands/query-command.js +1 -1
  39. package/dist/commands/schedule-command.js +1 -1
  40. package/dist/commands/segment-command.js +1 -1
  41. package/dist/commands/segment-create-command.js +1 -1
  42. package/dist/commands/segment-fields-command.js +1 -1
  43. package/dist/commands/segment-pull-command.js +1 -1
  44. package/dist/commands/segment-push-command.js +1 -1
  45. package/dist/commands/segment-update-command.js +1 -1
  46. package/dist/commands/segment-use-command.js +1 -1
  47. package/dist/commands/segment-validate-command.js +1 -1
  48. package/dist/commands/segments.js +1 -1
  49. package/dist/commands/show.js +1 -1
  50. package/dist/commands/status-command.js +1 -1
  51. package/dist/commands/tables.js +1 -1
  52. package/dist/commands/unset-command.js +1 -1
  53. package/dist/commands/upgrade-command.js +1 -1
  54. package/dist/commands/use-command.js +1 -1
  55. package/dist/commands/user-command.js +1 -1
  56. package/dist/commands/work-command.js +1 -1
  57. package/dist/commands/workflow-command.js +1 -1
  58. package/dist/core/auth.js +1 -1
  59. package/dist/core/command-output.js +1 -1
  60. package/dist/core/config.js +1 -1
  61. package/dist/core/connection-cache.js +1 -1
  62. package/dist/core/constants.js +1 -1
  63. package/dist/core/credential-cache.js +1 -1
  64. package/dist/core/global-context.js +1 -1
  65. package/dist/core/keychain.js +1 -1
  66. package/dist/core/oauth-keychain.js +1 -1
  67. package/dist/core/oauth.js +1 -1
  68. package/dist/core/profile.js +1 -1
  69. package/dist/core/project-config.js +1 -1
  70. package/dist/core/session.js +1 -1
  71. package/dist/core/user-cache.js +1 -1
  72. package/dist/core/version.js +1 -1
  73. package/dist/index.js +1 -1
  74. package/dist/mcp/server.js +1 -1
  75. package/dist/mcp/tools/index.js +1 -1
  76. package/dist/mcp/tools/tdx-run.js +1 -1
  77. package/dist/mcp/tools/tdx-search.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/frontmatter.js +1 -1
  182. package/dist/sdk/workspace/git.js +1 -1
  183. package/dist/sdk/workspace/index.js +1 -1
  184. package/dist/sdk/workspace/templates.js +1 -1
  185. package/dist/sdk/workspace/weekly.js +1 -1
  186. package/dist/sdk/workspace/wikilinks.js +1 -1
  187. package/dist/test-utils/command-runner.js +1 -1
  188. package/dist/test-utils/factories.js +1 -1
  189. package/dist/test-utils/fixtures.js +1 -1
  190. package/dist/test-utils/http-mock.js +1 -1
  191. package/dist/test-utils/index.js +1 -1
  192. package/dist/utils/async.js +1 -1
  193. package/dist/utils/colors.js +1 -1
  194. package/dist/utils/diff.js +1 -1
  195. package/dist/utils/file-permissions.js +1 -1
  196. package/dist/utils/file-reader.js +1 -1
  197. package/dist/utils/github-releases.js +1 -1
  198. package/dist/utils/global-cache.js +1 -1
  199. package/dist/utils/json-loader.js +1 -1
  200. package/dist/utils/local-cache.js +1 -1
  201. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  202. package/dist/utils/logger/formatters/index.js +1 -1
  203. package/dist/utils/logger/handlers/console-handler.js +1 -1
  204. package/dist/utils/logger/handlers/file-handler.js +1 -1
  205. package/dist/utils/logger/handlers/index.js +1 -1
  206. package/dist/utils/logger/handlers/null-handler.js +1 -1
  207. package/dist/utils/logger/index.js +1 -1
  208. package/dist/utils/logger/logger.js +1 -1
  209. package/dist/utils/logger/types.js +1 -1
  210. package/dist/utils/option-validation.js +1 -1
  211. package/dist/utils/process.js +1 -1
  212. package/dist/utils/prompt.js +1 -1
  213. package/dist/utils/spinner.js +1 -1
  214. package/dist/utils/sse-parser.js +1 -1
  215. package/dist/utils/string-utils.js +1 -1
  216. package/dist/utils/table-ref-parser.js +1 -1
  217. package/dist/utils/tdx-logger.js +1 -1
  218. package/dist/utils/version-check.js +1 -1
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- const a32_0x15c085=a32_0x3e24;(function(_0x4753b4,_0x2c185c){const _0x5b10e0=a32_0x3e24,_0x5ab143=_0x4753b4();while(!![]){try{const _0x442f66=parseInt(_0x5b10e0(0x389))/0x1*(-parseInt(_0x5b10e0(0x3aa))/0x2)+parseInt(_0x5b10e0(0x221))/0x3+-parseInt(_0x5b10e0(0x21c))/0x4*(parseInt(_0x5b10e0(0x364))/0x5)+parseInt(_0x5b10e0(0x273))/0x6+-parseInt(_0x5b10e0(0x2c9))/0x7+parseInt(_0x5b10e0(0x36a))/0x8*(-parseInt(_0x5b10e0(0x1e3))/0x9)+parseInt(_0x5b10e0(0x359))/0xa*(parseInt(_0x5b10e0(0x2ff))/0xb);if(_0x442f66===_0x2c185c)break;else _0x5ab143['push'](_0x5ab143['shift']());}catch(_0x5adfa){_0x5ab143['push'](_0x5ab143['shift']());}}}(a32_0xa0d2,0x2d406));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a32_0x2a2036 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a32_0x108e3e from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a32_0x15c085(0x3dc),LEGACY_PARENT_SEGMENT_DIR='parent_segment';function openBrowser(_0x13cc52){const _0x298ca1=a32_0x15c085,_0x37aefc=process[_0x298ca1(0x331)],_0x218ba9=_0x37aefc===_0x298ca1(0x3d5)?_0x298ca1(0x383):_0x37aefc===_0x298ca1(0x2f3)?_0x298ca1(0x203):_0x298ca1(0x249);spawn(_0x218ba9,[_0x13cc52],{'detached':!![],'stdio':'ignore'})['unref']();}function migrateLegacyDirectory(){const _0x57e875=a32_0x15c085;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x2cf2ad=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x2cf2ad['isDirectory']())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x57e875(0x2b9)](a32_0x108e3e[_0x57e875(0x1e6)](_0x57e875(0x2f1)+LEGACY_PARENT_SEGMENT_DIR+'/\x20and\x20'+PARENT_SEGMENT_DIR+_0x57e875(0x1f7))),console[_0x57e875(0x2b9)](a32_0x108e3e[_0x57e875(0x232)](_0x57e875(0x382)+LEGACY_PARENT_SEGMENT_DIR+_0x57e875(0x256))),![];console[_0x57e875(0x2b9)](a32_0x108e3e['yellow'](_0x57e875(0x21d)+LEGACY_PARENT_SEGMENT_DIR+'/\x20→\x20'+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x57e875(0x2b9)](a32_0x108e3e[_0x57e875(0x3a8)](_0x57e875(0x22d)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x4a1603){const _0x531fcf=_0x4a1603 instanceof Error?_0x4a1603['message']:String(_0x4a1603);return console[_0x57e875(0x2b9)](a32_0x108e3e['red'](_0x57e875(0x32e)+_0x531fcf+'\x0a')),![];}}function a32_0xa0d2(){const _0x388858=['Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','\x20No\x20changes\x20-\x20','displayRealtimeInfo','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','resolveParentId','Default','\x20kill','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','schemaValid','resumeJourney','attributes','column','Error:\x20--behavior\x20requires\x20a\x20name\x0a','Enriched:','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','customerPercent','Error\x20parsing\x20YAML:\x20','RT\x202.0\x20Validate:','\x20true','sort','state','Session:','allowedIps','validateParentYaml','cyan','\x20\x20Database:\x20','\x20tdx\x20wf\x20attempt\x20','-1d','keyEventCriteria','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','Show\x20a\x20specific\x20realtime\x20personalization','number','single','segment:parent:pull','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','sections:','map','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','Resolving\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','No\x20personalization\x20services\x20configured','Error:\x20Token\x20ID\x20is\x20required','ps:pz:service:token:create','Creating','\x0aError:','any','Created','\x20\x20Note:\x20','error','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','Personalization:','message','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','Error:\x20Token\x20\x27','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','displayBehaviorsStats','Fetching\x20SQL\x20for\x20\x27','ps:pz:init','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','Source:','idStitching','\x20rows)','\x20service(s)\x20configured','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','1715609fiozXw','segment:parent:show','ps:pz:service:delete','ps:rt:jn:list','✔\x20Updated\x20personalization\x20\x27','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','enriched','parentSegment','public:','\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','token:','\x20(paused)','column_name','\x20stage','split','\x20Configuration\x20is\x20valid','Finding\x20service\x20for\x20token...','\x20parent\x20segment','Options\x20(one\x20required):\x0a','\x20parent\x20segment\x20\x27','\x20=\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','workflowAttemptId','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','Overwrite\x20\x27','/attempt/','Show\x20parent\x20segment\x20schema\x20(column\x20types)','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','Output\x20Database:','Error:\x20--database\x20and\x20--table\x20are\x20required','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','\x20\x20\x20\x20-\x20','👥\x20','collectSchema','ps:rt:list','createPersonalization','trim','displaySummary','\x0a⚠️\x20\x20Both\x20','preview','win32','List\x20parent\x20segments','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','behavior_','length','Get\x20current\x20RT\x20configuration\x20version\x20status','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','getParentFull','behaviorsFile','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','✔\x20Updated\x20parent\x20segment\x20\x27','10978BvUWKr','string','createdAt','`\x20to\x20download\x20the\x20configuration\x20first','yes','customerGroupFile','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','apply','\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','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','Name:\x20','Status:','Updating','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','✔\x20Found\x20personalization\x20\x27','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Apply\x20changes\x20to\x20\x27','Creating\x20token\x20\x27','description','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','\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','Fetching\x20personalization\x20service\x20\x27','database','getPersonalization','Show\x20parent\x20segment\x20details','Creating\x20personalization\x20service\x20\x27','Updating\x20personalization\x20service\x20\x27','Delete\x20a\x20realtime\x20personalization','\x20[Job\x20ID:\x20','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','allValid','sourceTableError','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','Error:','✔\x20Deleted\x20personalization\x20service\x20\x27','Available\x20attributes:','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','ps:pz:show','\x27\x20for\x20service\x20\x27','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','getCurrentConfigVersion','Fetching\x20sample\x20data...','\x27\x20is\x20already\x20up\x20to\x20date','\x20is\x20already\x20up\x20to\x20date','toLowerCase','✘\x20Failed\x20to\x20rename\x20directory:\x20','\x0aNew\x20parent\x20segment\x20\x27','No\x20RT\x20journeys\x20found','platform','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','Next\x20steps:','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','Error\x20reading\x20file:\x20','displayPreviewHints','<database>.<table>','interval','displayMasterInfo','keys','parentFolder','Errors:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','keyEventId:','segment:parent:desc','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','workflowSessionId','last_page_viewed','relationships','tdx\x20ps\x20push\x20','addAttributes','segment:parent:view','.yaml','rowCount','audienceId','Listing\x20fields\x20for\x20\x27','To\x20view\x20sample\x20data:','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','Deleting\x20token\x20\x27','scheduleType','segment:parent:push','FINISHED','table','\x20\x20Tables:\x201\x20customers\x20+\x20','null','sampleData','\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','value','no\x20tokens\x20configured','4330sFxcEv','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','created:','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','\x20--behavior\x20\x22','includeSensitive','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x20to\x20configure\x20your\x20personalization\x20service','\x5c$&','\x20\x20\x20\x20','page_view','631175xfdoLi','\x20\x20\x20\x20\x20\x20\x20\x20','✔\x20Deleted\x20personalization\x20\x27','Fetching\x20customers\x20schema...','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','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','573368Tfoojr','\x20--attribute\x20\x22<name>\x22','Attributes:','getOutputDatabaseName','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','formatSchemaJson','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','\x20rows\x20','Columns:','\x20RT\x20configuration\x20is\x20valid','Update\x20a\x20realtime\x20personalization\x20entity','\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','\x20total','pauseJourney','personalization_services','listPersonalizations','Attribute:','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','Creating\x20parent\x20segment\x20\x27','identifier:\x20','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','deletePersonalization','segment:parent:run','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','open','Updated','\x27\x20with\x20ID:\x20','Error:\x20File\x20not\x20found:\x20','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','patch','15vYiDjp','audienceId:\x20','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','displayPreviewResults','segment:parent:fields','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','personalizationServices','ps:rt:validate','Attempt:','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','events','Show\x20personalization\x20service\x20details','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','YAML\x20file:\x20','population','\x20to\x20push\x20the\x20configuration','verbose','List\x20available\x20fields\x20for\x20segmentation','\x20personalization','✔\x20Created\x20parent\x20segment\x20\x27','file','Updating\x20parent\x20segment\x20\x27','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','ps:pz:service:list','customerGroup','/sessions/','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','customersWithEvents','Error:\x20Personalization\x20ID\x20is\x20required','✔\x20No\x20changes\x20-\x20\x27','green','previewParentYaml','1186DBKOXG','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','listFields','text','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','ps:rt:configuration_versions','addBehaviorsFile','payload','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','SELECT\x20*\x20FROM\x20','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','\x27...','site','\x20Added\x20RT\x202.0\x20template\x20section','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','\x0a✔\x20Workflow\x20started','jobId','join','\x20\x20\x20\x20\x20\x20','No\x20personalizations\x20configured','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','Listing\x20personalization\x20services\x20for\x20\x27','segment:parent:list','ID\x20Stitching:','output','use','No\x20RT-enabled\x20parent\x20segments\x20found','\x27\x20(id:\x20','\x20\x20\x20','repeat','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','realtime:','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','indexOf','type','Fetching\x20behavior\x20list...','.customers)','list','Delete\x20a\x20personalization\x20service','\x20--enriched','run','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','darwin','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','Validate:','.yml','Create\x20a\x20realtime\x20personalization\x20entity','keyEventId','column_type','parent_segments','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Preview:','all','delete','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','Getting\x20personalization\x20\x27','\x20\x202.\x20Run\x20','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','\x20personalization\x20service','Master:','ps:pz:delete','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','Error:\x20Service\x20name\x20is\x20required','\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','Get\x20SQL\x20query\x20for\x20parent\x20segment','dirname','List\x20RT\x20journeys','Aborted.','behavior','elapsedTimeMillis','/app/dw/parentSegments/','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','Customers:','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','information_schema','master','displayAttributesStats','Executing\x20parent\x20segment\x20query...','addAttributesFile','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','format','✔\x20Retrieved\x20RT\x20configuration\x20version','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','\x20--behavior\x20\x22<name>\x22','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','Validating\x20RT\x20configuration...','jsonl','✔\x20Updated\x20personalization\x20service\x20\x27','\x0aUsage:\x20tdx\x20ps\x20preview\x20','bold','segment:parent:validate','td_client_id','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','Analyzing\x20changes...','\x20\x201.\x20Edit\x20','9JzYBYv','\x20--attribute\x20\x22','Events:','yellow','Join:','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','scheduleOption','RT\x20Journey\x20ID:\x20','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','joinKey','replace','Master\x20Table','To\x20cancel:','Options:\x0a','\x22\x20}','tdx\x20ps\x20preview\x20','Parent\x20segment:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','Create\x20parent\x20segment\x20\x27','/\x20directories\x20exist.','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','Site:\x20','label','filter','double','No\x20parent\x20segments\x20match\x20pattern:\x20','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','sections','toLocaleString','coveragePercent','stop','start','Attributes','stringify','allowed\x20IPs:','data','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\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','customers','pushParentYaml','✔\x20Query\x20completed:\x20Processed\x20','log','valid','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Join\x20on:','behaviors','✔\x20Created\x20token\x20\x27','segment','segment:parent:update','\x20Context\x20set:\x20','tokens','schemaError','runParent','Listing\x20parent\x20segments...','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','realtime','4fhAkso','\x0a⚠️\x20\x20Migrating:\x20','ps:pz:service:create','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','\x20service','487941SeAtOo','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','\x20Opening\x20','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','displaySampleData','timezone','errors','test','stitchingKeys','setJobId','My\x20Service','✔\x20Renamed\x20directory\x20to\x20','folderId','getParentSQL','\x0aNo\x20sample\x20data\x20available','Listing\x20RT\x20journeys\x20for\x20\x27','dim','status:\x20','SELECT\x20*\x20FROM\x20(\x0a','stats','Pause\x20activations\x20in\x20an\x20RT\x20journey','personalization','name','localeCompare','launched','\x20Added\x20personalization\x20template\x20to\x20','createParent','folder-segment','realtime_enabled','addBehaviors','Creating\x20personalization\x20\x27','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','✔\x20Created\x20personalization\x20\x27','totalEvents','segment:parent:preview','red','getBehaviorNames','RT\x202.0:','xdg-open','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','\x27\x20is\x20up\x20to\x20date','Output\x20file:\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','\x0aChanges\x20to\x20apply\x20to\x20\x27','Patching\x20personalization\x20\x27','json','displayColumns','columns','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','status','Error:\x20Service\x20ID\x20is\x20required','/\x20directory.\x0a','utf-8','Error:\x20--attribute\x20requires\x20a\x20name\x0a','stageCount','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','in\x20','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','Behavior:','session','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','ps:pz:service:token:delete','match','(id:\x20','Found\x20YAML\x20file:\x20','identifier','attribute','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','\x20configured','Options:','execute','displayValidateResults','\x0a\x20\x20\x20\x20}','eventKind','true','updateParent','Table:\x20','Deleting\x20personalization\x20service\x20\x27','entryCriteria:','254742vJnEvY','✔\x20Created\x20personalization\x20service\x20\x27','\x0a\x20\x20]\x0a}\x0a','foreignKey','Getting\x20RT\x20configuration\x20version\x20for\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','Deleting\x20personalization\x20\x27','limit','✔\x20Found\x20','Error:\x20--name\x20is\x20required','ps:pz:list','ps:pz:service:update','includeSensitive:','Fetching\x20parent\x20segment\x20\x27','Resume\x20activations\x20in\x20an\x20RT\x20journey','\x20RT\x20journey','Coverage:','paused','public','workflowId','updatedAt','\x27\x20and\x20run\x20workflow?'];a32_0xa0d2=function(){return _0x388858;};return a32_0xa0d2();}class BaseParentSegmentCommand extends BaseCommand{async[a32_0x15c085(0x3d3)](_0x4f61c6){const _0x267489=a32_0x15c085;return migrateLegacyDirectory(),super[_0x267489(0x3d3)](_0x4f61c6);}}function resolveYamlFile(_0x14df2f){const _0x33ed82=a32_0x15c085;if(_0x14df2f['endsWith'](_0x33ed82(0x3d8))||_0x14df2f['endsWith'](_0x33ed82(0x347)))return _0x14df2f;return a32_0x2a2036['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x14df2f)+_0x33ed82(0x3d8));}function a32_0x3e24(_0x3d9600,_0x176f0a){_0x3d9600=_0x3d9600-0x1d5;const _0xa0d28c=a32_0xa0d2();let _0x3e24ce=_0xa0d28c[_0x3d9600];return _0x3e24ce;}function formatProgressMessage(_0x1ccb82){const _0x2f983a=a32_0x15c085,_0xb2357c=_0x1ccb82[_0x2f983a(0x261)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0xb2357c){const [,_0x245822,_0x3562c0,_0x102546='']=_0xb2357c;return a32_0x108e3e[_0x2f983a(0x232)](_0x245822+':')+'\x20'+_0x3562c0+a32_0x108e3e[_0x2f983a(0x232)](_0x102546);}return a32_0x108e3e[_0x2f983a(0x232)](_0x1ccb82);}function showFileNotFoundError(_0xe8fde7,_0x1b6da3){const _0x223d0e=a32_0x15c085;console['error'](a32_0x108e3e[_0x223d0e(0x246)](_0x223d0e(0x386)+_0xe8fde7+'\x0a')),console[_0x223d0e(0x2b9)](a32_0x108e3e['cyan'](_0x223d0e(0x328)+_0x1b6da3+_0x223d0e(0x302)));}function displayRealtimeValidation(_0x57a43c){const _0x58c1c6=a32_0x15c085;if(!_0x57a43c[_0x58c1c6(0x21b)])return;const _0x74c99e=_0x57a43c[_0x58c1c6(0x21b)],_0x3e52b9=_0x74c99e['enabled']?a32_0x108e3e[_0x58c1c6(0x3a8)]('⚡\x20Enabled'):a32_0x108e3e['yellow']('⚡\x20Not\x20enabled');console[_0x58c1c6(0x2b9)]('\x0a'+a32_0x108e3e[_0x58c1c6(0x232)](_0x58c1c6(0x248))+'\x20'+_0x3e52b9);if(_0x74c99e[_0x58c1c6(0x393)]&&_0x74c99e['events']['length']>0x0){console['error']('\x20\x20'+a32_0x108e3e[_0x58c1c6(0x232)](_0x58c1c6(0x1e5))+'\x20'+_0x74c99e['events'][_0x58c1c6(0x2f7)]+_0x58c1c6(0x268));for(const _0x2ce55a of _0x74c99e['events']){const _0x1aa4b7=_0x2ce55a['sourceTableValid']===![]?a32_0x108e3e['red']('✘'):a32_0x108e3e[_0x58c1c6(0x3a8)]('✔');console[_0x58c1c6(0x2b9)](_0x58c1c6(0x362)+_0x1aa4b7+'\x20'+_0x2ce55a[_0x58c1c6(0x238)]),_0x2ce55a[_0x58c1c6(0x31f)]&&console['error'](_0x58c1c6(0x3bd)+a32_0x108e3e[_0x58c1c6(0x246)](_0x2ce55a[_0x58c1c6(0x31f)]));}}if(_0x74c99e[_0x58c1c6(0x293)]&&_0x74c99e[_0x58c1c6(0x293)][_0x58c1c6(0x2f7)]>0x0){console[_0x58c1c6(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x58c1c6(0x232)](_0x58c1c6(0x36c))+'\x20'+_0x74c99e[_0x58c1c6(0x293)]['length']+'\x20configured');for(const _0x1aacae of _0x74c99e[_0x58c1c6(0x293)]){const _0x53d386=_0x1aacae[_0x58c1c6(0x20e)]?a32_0x108e3e['green']('✔'):a32_0x108e3e['red']('✘');console[_0x58c1c6(0x2b9)](_0x58c1c6(0x362)+_0x53d386+'\x20'+_0x1aacae[_0x58c1c6(0x238)]+'\x20'+a32_0x108e3e[_0x58c1c6(0x232)]('('+_0x1aacae[_0x58c1c6(0x3cd)]+')'));}}if(_0x74c99e[_0x58c1c6(0x2c5)]){const _0x4f0131=_0x74c99e[_0x58c1c6(0x2c5)][_0x58c1c6(0x22a)]?.[_0x58c1c6(0x2f7)]?'\x20+\x20['+_0x74c99e['idStitching'][_0x58c1c6(0x22a)][_0x58c1c6(0x3bc)](',\x20')+']':'';console['error']('\x20\x20'+a32_0x108e3e['dim'](_0x58c1c6(0x3c2))+'\x20'+_0x74c99e[_0x58c1c6(0x2c5)]['primaryKey']+_0x4f0131);}if(_0x74c99e[_0x58c1c6(0x38f)]&&_0x74c99e[_0x58c1c6(0x38f)][_0x58c1c6(0x2f7)]>0x0){console[_0x58c1c6(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x58c1c6(0x232)](_0x58c1c6(0x2bb))+'\x20'+_0x74c99e[_0x58c1c6(0x38f)][_0x58c1c6(0x2f7)]+_0x58c1c6(0x220)+(_0x74c99e[_0x58c1c6(0x38f)][_0x58c1c6(0x2f7)]!==0x1?'s':''));for(const _0x3fba41 of _0x74c99e[_0x58c1c6(0x38f)]){console[_0x58c1c6(0x2b9)](_0x58c1c6(0x2ea)+_0x3fba41[_0x58c1c6(0x238)]);}}}function showParentSegmentNotSetError(_0x2bb29a){const _0x22e881=a32_0x15c085;console[_0x22e881(0x2b9)](a32_0x108e3e['yellow'](_0x22e881(0x21f))),console[_0x22e881(0x2b9)](_0x2bb29a);}export class ParentSegmentListCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x3c1);['description']=a32_0x15c085(0x2f4);async['execute'](_0x8b928a){const _0xfb5790=a32_0x15c085,{options:_0x5ef748,args:_0x5079f6,tdx:_0x28e3ab}=_0x8b928a,_0xf4f2e7=_0x5079f6[0x0];_0x5ef748[_0xfb5790(0x399)]&&(console[_0xfb5790(0x2b9)]('Site:\x20'+_0x5ef748[_0xfb5790(0x3b7)]),_0xf4f2e7&&console['error']('Pattern:\x20'+_0xf4f2e7));const _0x399bd5=await withSpinner(_0xf4f2e7?'Listing\x20parent\x20segments\x20matching\x20\x27'+_0xf4f2e7+_0xfb5790(0x3b6):_0xfb5790(0x219),()=>_0x28e3ab[_0xfb5790(0x213)]['listParents'](),{'verbose':_0x5ef748['verbose']});let _0x9489d7=_0x399bd5[_0xfb5790(0x207)];if(_0xf4f2e7){const _0x23d255=_0xf4f2e7[_0xfb5790(0x1ee)](/[.+^${}()|[\]\\]/g,_0xfb5790(0x361))[_0xfb5790(0x1ee)](/\*/g,'.*')[_0xfb5790(0x1ee)](/\?/g,'.'),_0x55be9c=new RegExp('^'+_0x23d255+'$','i');_0x9489d7=_0x9489d7['filter'](_0x44b847=>_0x55be9c[_0xfb5790(0x229)](_0x44b847[_0xfb5790(0x293)][_0xfb5790(0x238)]));}_0x9489d7[_0xfb5790(0x29c)]((_0x26afd5,_0x29233b)=>_0x26afd5[_0xfb5790(0x293)]['name'][_0xfb5790(0x239)](_0x29233b[_0xfb5790(0x293)]['name'])),console[_0xfb5790(0x2b9)](_0xfb5790(0x27b)+_0x9489d7['length']+_0xfb5790(0x2da)+(_0x9489d7[_0xfb5790(0x2f7)]!==0x1?'s':''));const _0x156572=_0x2971fc=>{const _0x2c964a=_0xfb5790;return getConsoleNextUrl(_0x5ef748[_0x2c964a(0x3b7)],'/app/dw/parentSegments/'+_0x2971fc);};if(_0x5ef748[_0xfb5790(0x3fc)]==='json'||_0x5ef748[_0xfb5790(0x3fc)]===_0xfb5790(0x1da)){const _0x87021a=_0x9489d7[_0xfb5790(0x2ad)](_0x38591e=>({..._0x38591e,'url':_0x156572(_0x38591e['id'])}));await handleSDKOutput(_0x87021a,_0x5ef748);}else{if(_0x9489d7[_0xfb5790(0x2f7)]===0x0)_0xf4f2e7?console[_0xfb5790(0x20d)](_0xfb5790(0x1fd)+_0xf4f2e7):console[_0xfb5790(0x20d)]('No\x20parent\x20segments\x20found');else for(const _0x4718fc of _0x9489d7){const _0x542e0e=_0x4718fc[_0xfb5790(0x293)][_0xfb5790(0x397)]?a32_0x108e3e['dim']('\x20('+formatRows(_0x4718fc['attributes'][_0xfb5790(0x397)])+')'):'',_0x3f123a=hyperlink(_0x4718fc[_0xfb5790(0x293)]['name'],_0x156572(_0x4718fc['id']));console['log'](_0xfb5790(0x2eb)+_0x3f123a+_0x542e0e);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a32_0x15c085(0x238)]='segment:parent:create';[a32_0x15c085(0x312)]=a32_0x15c085(0x35f);async[a32_0x15c085(0x26a)](_0x860df){const _0xb9d10d=a32_0x15c085,{options:_0xf45149,args:_0x5bbc1e,tdx:_0x2fa430}=_0x860df;console[_0xb9d10d(0x2b9)](_0xb9d10d(0x267)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0xb9d10d(0x37e));const _0x29fea2=_0xf45149;if(_0x5bbc1e[_0xb9d10d(0x2f7)]===0x0)return console[_0xb9d10d(0x2b9)](a32_0x108e3e[_0xb9d10d(0x246)](_0xb9d10d(0x2de))),console[_0xb9d10d(0x2b9)](_0xb9d10d(0x3a4)),0x1;const _0x5e4924=_0x5bbc1e[0x0];if(!_0x29fea2[_0xb9d10d(0x316)]||!_0x29fea2['table'])return console[_0xb9d10d(0x2b9)](_0xb9d10d(0x2e7)),console['error'](_0xb9d10d(0x3a4)),0x1;_0x29fea2[_0xb9d10d(0x399)]&&(console[_0xb9d10d(0x2b9)](_0xb9d10d(0x1f9)+_0x29fea2[_0xb9d10d(0x3b7)]),console['error'](_0xb9d10d(0x30a)+_0x5e4924),console[_0xb9d10d(0x2b9)]('Database:\x20'+_0x29fea2[_0xb9d10d(0x316)]),console[_0xb9d10d(0x2b9)](_0xb9d10d(0x270)+_0x29fea2['table']));const _0x15bca7=await loadJSONFromOptions(_0x29fea2[_0xb9d10d(0x293)],_0x29fea2['attributesFile']),_0x21a180=await loadJSONFromOptions(_0x29fea2[_0xb9d10d(0x211)],_0x29fea2[_0xb9d10d(0x2fc)]),_0x316753=await loadJSONFromOptions(_0x29fea2['customerGroup'],_0x29fea2[_0xb9d10d(0x304)]),_0x4b29ea={'name':_0x5e4924,'description':_0x29fea2['description'],'scheduleType':_0x29fea2[_0xb9d10d(0x34f)],'scheduleOption':_0x29fea2[_0xb9d10d(0x1e9)],'timezone':_0x29fea2[_0xb9d10d(0x227)],'master':{'parentDatabaseName':_0x29fea2[_0xb9d10d(0x316)],'parentTableName':_0x29fea2[_0xb9d10d(0x352)]},'attributes':_0x15bca7,'behaviors':_0x21a180,'customerGroup':_0x316753},_0x11bc76=await withSpinner(_0xb9d10d(0x37c)+_0x5e4924+_0xb9d10d(0x3b6),()=>_0x2fa430[_0xb9d10d(0x213)][_0xb9d10d(0x23c)](_0x4b29ea),{'verbose':_0xf45149[_0xb9d10d(0x399)]}),_0x2a0d97=_0x11bc76[_0xb9d10d(0x207)];return console[_0xb9d10d(0x2b9)](_0xb9d10d(0x39c)+_0x2a0d97[_0xb9d10d(0x238)]+_0xb9d10d(0x385)+_0x2a0d97['id']),await handleSDKOutput([_0x2a0d97],_0xf45149),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a32_0x15c085(0x214);['description']=a32_0x15c085(0x241);async[a32_0x15c085(0x26a)](_0x42d11c){const _0x51c9cb=a32_0x15c085,{options:_0x59f42b,args:_0x5b069b,tdx:_0x4c3bdd}=_0x42d11c;console['error'](_0x51c9cb(0x24d)+_0x51c9cb(0x1fe)+_0x51c9cb(0x37e));const _0x5f04a5=_0x59f42b;if(_0x5b069b[_0x51c9cb(0x2f7)]===0x0)return console['error'](a32_0x108e3e['red'](_0x51c9cb(0x2de))),console[_0x51c9cb(0x2b9)](_0x51c9cb(0x25a)),0x1;const _0x595a1c=_0x5b069b[0x0];_0x5f04a5['verbose']&&(console[_0x51c9cb(0x2b9)](_0x51c9cb(0x1f9)+_0x5f04a5[_0x51c9cb(0x3b7)]),console[_0x51c9cb(0x2b9)](_0x51c9cb(0x1f4)+_0x595a1c));const _0x26af5b=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x595a1c+_0x51c9cb(0x3b6),()=>_0x4c3bdd[_0x51c9cb(0x213)][_0x51c9cb(0x2fb)](_0x595a1c),{'verbose':_0x5f04a5[_0x51c9cb(0x399)]}),_0x622d28=_0x26af5b[_0x51c9cb(0x207)],_0x3dc113=await loadJSONFromOptions(_0x5f04a5[_0x51c9cb(0x345)],_0x5f04a5[_0x51c9cb(0x3fa)]),_0xdf9fcc=await loadJSONFromOptions(_0x5f04a5[_0x51c9cb(0x23f)],_0x5f04a5[_0x51c9cb(0x3b1)]),_0x616906={'name':_0x622d28[_0x51c9cb(0x238)],'description':_0x5f04a5[_0x51c9cb(0x312)]!==undefined?_0x5f04a5['description']:_0x622d28['description'],'scheduleType':_0x5f04a5[_0x51c9cb(0x34f)]!==undefined?_0x5f04a5[_0x51c9cb(0x34f)]:_0x622d28[_0x51c9cb(0x34f)],'scheduleOption':_0x5f04a5[_0x51c9cb(0x1e9)]!==undefined?_0x5f04a5['scheduleOption']:_0x622d28[_0x51c9cb(0x1e9)],'timezone':_0x5f04a5[_0x51c9cb(0x227)]!==undefined?_0x5f04a5[_0x51c9cb(0x227)]:_0x622d28['timezone'],'master':_0x622d28[_0x51c9cb(0x3f7)],'attributes':_0x3dc113?[..._0x622d28[_0x51c9cb(0x293)]||[],..._0x3dc113]:_0x622d28[_0x51c9cb(0x293)],'behaviors':_0xdf9fcc?[..._0x622d28['behaviors']||[],..._0xdf9fcc]:_0x622d28['behaviors'],'customerGroup':_0x622d28[_0x51c9cb(0x3a2)]},_0x310c92=await withSpinner(_0x51c9cb(0x39e)+_0x595a1c+_0x51c9cb(0x3b6),()=>_0x4c3bdd[_0x51c9cb(0x213)][_0x51c9cb(0x26f)](_0x595a1c,_0x616906),{'verbose':_0x5f04a5[_0x51c9cb(0x399)]}),_0x48686b=_0x310c92[_0x51c9cb(0x207)];return console[_0x51c9cb(0x2b9)](_0x51c9cb(0x2fe)+_0x48686b[_0x51c9cb(0x238)]+'\x27'),await handleSDKOutput([_0x48686b],_0x5f04a5),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x2aa);['description']=a32_0x15c085(0x297);async[a32_0x15c085(0x26a)](_0x540bd6){const _0x194c2f=a32_0x15c085,{options:_0x4d318a,args:_0x3d59cf,tdx:_0x50ee0e}=_0x540bd6,_0x1f6420=_0x4d318a,_0x228f6c=_0x3d59cf[0x0]||_0x4d318a[_0x194c2f(0x2d0)];if(!_0x228f6c)return showParentSegmentNotSetError(_0x194c2f(0x3b3)+_0x194c2f(0x266)),0x1;if(_0x1f6420[_0x194c2f(0x3c4)]&&_0x1f6420[_0x194c2f(0x3c3)])return console[_0x194c2f(0x2b9)](a32_0x108e3e[_0x194c2f(0x246)](_0x194c2f(0x3c9))),console[_0x194c2f(0x2b9)](a32_0x108e3e[_0x194c2f(0x232)](_0x194c2f(0x340))),console[_0x194c2f(0x2b9)](a32_0x108e3e['dim']('using\x20the\x20default\x20path:\x20'+PARENT_SEGMENT_DIR+'/{name}.yml\x0a')),console[_0x194c2f(0x2b9)](a32_0x108e3e[_0x194c2f(0x2a1)](_0x194c2f(0x3f4))),0x1;const _0x41c2f2=_0x1f6420[_0x194c2f(0x3c3)]||a32_0x2a2036[_0x194c2f(0x3bc)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x228f6c)+'.yml');_0x1f6420['verbose']&&(console['error'](_0x194c2f(0x1f9)+_0x1f6420[_0x194c2f(0x3b7)]),console[_0x194c2f(0x2b9)](_0x194c2f(0x1f4)+_0x228f6c),console[_0x194c2f(0x2b9)](_0x194c2f(0x24c)+_0x41c2f2));const _0x38cf54=await withSpinner(_0x194c2f(0x280)+_0x228f6c+_0x194c2f(0x3b6),()=>_0x50ee0e[_0x194c2f(0x213)]['pullParentYaml'](_0x228f6c),{'verbose':_0x1f6420[_0x194c2f(0x399)]}),_0x455723=_0x38cf54[_0x194c2f(0x207)];if(existsSync(_0x41c2f2)){const _0xdd8e92=readFileSync(_0x41c2f2,_0x194c2f(0x257)),_0x444d92=generateDiff(_0xdd8e92,_0x455723);if(!hasChanges(_0x444d92))console[_0x194c2f(0x2b9)](a32_0x108e3e[_0x194c2f(0x3a8)]('✔')+_0x194c2f(0x28a)+a32_0x108e3e[_0x194c2f(0x2a1)](_0x41c2f2)+_0x194c2f(0x32c));else{console[_0x194c2f(0x2b9)]('\x0aChanges\x20to\x20\x27'+_0x41c2f2+'\x27:'),console[_0x194c2f(0x2b9)]('─'['repeat'](0x3c)),console[_0x194c2f(0x2b9)](formatDiffWithColors(_0x444d92)),console[_0x194c2f(0x2b9)]('─'[_0x194c2f(0x3c8)](0x3c));if(!_0x1f6420['yes']){if(!isInteractive())return console[_0x194c2f(0x2b9)](a32_0x108e3e[_0x194c2f(0x246)](_0x194c2f(0x2b5)),_0x194c2f(0x3d4)),console[_0x194c2f(0x2b9)](a32_0x108e3e[_0x194c2f(0x232)](_0x194c2f(0x2e0))),0x1;const _0x124337=await confirmKey(_0x194c2f(0x2e2)+_0x41c2f2+'\x27?');if(!_0x124337)return console[_0x194c2f(0x2b9)](a32_0x108e3e['yellow'](_0x194c2f(0x3ee))),0x1;}writeFileSync(_0x41c2f2,_0x455723,'utf-8'),console[_0x194c2f(0x2b9)](a32_0x108e3e[_0x194c2f(0x3a8)]('✔')+_0x194c2f(0x2c8)+a32_0x108e3e[_0x194c2f(0x2a1)](_0x41c2f2));}}else{const _0x4bc48f=a32_0x2a2036[_0x194c2f(0x3ec)](_0x41c2f2);!existsSync(_0x4bc48f)&&mkdirSync(_0x4bc48f,{'recursive':!![]}),writeFileSync(_0x41c2f2,_0x455723,_0x194c2f(0x257)),console[_0x194c2f(0x2b9)](a32_0x108e3e['green']('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a32_0x108e3e[_0x194c2f(0x2a1)](_0x41c2f2));}return saveSessionContext({'parent_segment':_0x228f6c},_0x1f6420[_0x194c2f(0x25e)]),console['error'](a32_0x108e3e[_0x194c2f(0x3a8)]('✔')+_0x194c2f(0x215)+a32_0x108e3e[_0x194c2f(0x232)]('parent_segment')+'\x20=\x20'+a32_0x108e3e[_0x194c2f(0x2a1)](_0x228f6c)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x350);[a32_0x15c085(0x312)]=a32_0x15c085(0x3fb);async[a32_0x15c085(0x26a)](_0xfee252){const _0x1208e6=a32_0x15c085,{options:_0x496d8f,args:_0x22264d,tdx:_0x5f23e7}=_0xfee252,_0x49dfe5=_0x496d8f,_0x51a950=_0x22264d[0x0]||_0x496d8f[_0x1208e6(0x2d0)];if(!_0x51a950)return showParentSegmentNotSetError(_0x1208e6(0x3b9)+_0x1208e6(0x242)),0x1;const _0x5f54d3=resolveYamlFile(_0x51a950);if(!existsSync(_0x5f54d3))return showFileNotFoundError(_0x5f54d3,_0x51a950),0x1;_0x49dfe5[_0x1208e6(0x399)]&&(console['error']('Site:\x20'+_0x49dfe5[_0x1208e6(0x3b7)]),console[_0x1208e6(0x2b9)]('YAML\x20file:\x20'+_0x5f54d3));let _0x558ff9;try{_0x558ff9=readFileSync(_0x5f54d3,_0x1208e6(0x257));}catch(_0x4ece15){const _0x31e3d1=_0x4ece15 instanceof Error?_0x4ece15[_0x1208e6(0x2bc)]:String(_0x4ece15);return console['error'](_0x1208e6(0x335)+_0x31e3d1),0x1;}const _0x3df462=await withSpinner(_0x1208e6(0x1e1),()=>_0x5f23e7['segment'][_0x1208e6(0x20b)](_0x558ff9),{'verbose':_0x49dfe5[_0x1208e6(0x399)]}),_0x3ffc55=_0x3df462[_0x1208e6(0x207)],{isNew:_0x4703c5,name:_0x294eaf,hasChanges:_0xb116f6,diffFormatted:_0x55e2ff}=_0x3ffc55;if(!_0xb116f6)return console['error'](_0x1208e6(0x3a7)+_0x294eaf+_0x1208e6(0x32b)),0x0;_0x4703c5?console['error'](_0x1208e6(0x32f)+_0x294eaf+'\x27:'):console[_0x1208e6(0x2b9)](_0x1208e6(0x24e)+_0x294eaf+'\x27:');console['error']('─'[_0x1208e6(0x3c8)](0x3c)),console['error'](_0x55e2ff),console[_0x1208e6(0x2b9)]('─'[_0x1208e6(0x3c8)](0x3c));const _0x23e280=_0x4703c5?_0x1208e6(0x1f6)+_0x294eaf+'\x27?':_0x1208e6(0x310)+_0x294eaf+'\x27?';if(!_0x49dfe5[_0x1208e6(0x303)]){if(!isInteractive())return console[_0x1208e6(0x2b9)](a32_0x108e3e[_0x1208e6(0x246)](_0x1208e6(0x2b5)),_0x1208e6(0x3d4)),console[_0x1208e6(0x2b9)](a32_0x108e3e[_0x1208e6(0x232)](_0x1208e6(0x2e0))),0x1;const _0x357ac1=await confirmKey(_0x23e280);if(!_0x357ac1)return console[_0x1208e6(0x2b9)](a32_0x108e3e[_0x1208e6(0x1e6)](_0x1208e6(0x3ee))),0x1;}const _0x95ce21=_0x4703c5?_0x1208e6(0x2b4):_0x1208e6(0x30c),_0x26d21f=await withSpinner(_0x95ce21+'\x20parent\x20segment\x20\x27'+_0x294eaf+_0x1208e6(0x3b6),()=>_0x3ffc55['apply'](),{'verbose':_0x49dfe5['verbose']}),_0x5d3467=_0x26d21f[_0x1208e6(0x207)],_0xfb882c=getConsoleNextUrl(_0x49dfe5[_0x1208e6(0x3b7)],_0x1208e6(0x3f1)+_0x5d3467['id']),_0x330eeb=_0x4703c5?_0x1208e6(0x2b7):_0x1208e6(0x384);return console[_0x1208e6(0x2b9)]('✔\x20'+_0x330eeb+_0x1208e6(0x2dc)+_0x5d3467[_0x1208e6(0x238)]+'\x27'),console[_0x1208e6(0x2b9)]('\x20\x20'+_0xfb882c),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x1de);[a32_0x15c085(0x312)]='Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics';async[a32_0x15c085(0x26a)](_0x4a6ac5){const _0x48b78f=a32_0x15c085,{options:_0x383584,args:_0x98894c,tdx:_0x48c78e}=_0x4a6ac5,_0x1c6cdd=_0x383584,_0x241824=_0x98894c[0x0]||_0x383584['parentSegment'];if(!_0x241824)return showParentSegmentNotSetError(_0x48b78f(0x327)+_0x48b78f(0x1f5)+_0x48b78f(0x1f1)+_0x48b78f(0x2c3)+_0x48b78f(0x2e5)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;const _0x1fddef=resolveYamlFile(_0x241824);if(!existsSync(_0x1fddef))return showFileNotFoundError(_0x1fddef,_0x241824),0x1;_0x1c6cdd[_0x48b78f(0x399)]&&(console[_0x48b78f(0x2b9)](_0x48b78f(0x1f9)+_0x1c6cdd[_0x48b78f(0x3b7)]),console[_0x48b78f(0x2b9)](_0x48b78f(0x396)+_0x1fddef));let _0x238f1f;try{_0x238f1f=readFileSync(_0x1fddef,_0x48b78f(0x257));}catch(_0x251def){const _0x58acd3=_0x251def instanceof Error?_0x251def[_0x48b78f(0x2bc)]:String(_0x251def);return console[_0x48b78f(0x2b9)](_0x48b78f(0x335)+_0x58acd3),0x1;}const _0x148361=createCommandSpinner(a32_0x108e3e[_0x48b78f(0x232)]('Validating\x20configuration...'),{'verbose':_0x1c6cdd[_0x48b78f(0x399)]});_0x148361[_0x48b78f(0x203)]();const _0x123e0c={'onProgress':_0x5537e4=>{const _0x2d7b0a=_0x48b78f;_0x148361[_0x2d7b0a(0x3ae)]=formatProgressMessage(_0x5537e4);}};if(_0x1c6cdd['master'])_0x123e0c['master']=!![];if(_0x1c6cdd[_0x48b78f(0x2cf)])_0x123e0c['enriched']=!![];_0x1c6cdd[_0x48b78f(0x265)]&&(_0x123e0c[_0x48b78f(0x265)]=_0x1c6cdd[_0x48b78f(0x265)]);_0x1c6cdd[_0x48b78f(0x3ef)]&&(_0x123e0c[_0x48b78f(0x3ef)]=_0x1c6cdd[_0x48b78f(0x3ef)]);if(_0x1c6cdd[_0x48b78f(0x338)])_0x123e0c[_0x48b78f(0x338)]=_0x1c6cdd[_0x48b78f(0x338)];let _0x9eebf;try{_0x9eebf=await _0x48c78e[_0x48b78f(0x213)][_0x48b78f(0x2a0)](_0x238f1f,_0x123e0c),_0x148361[_0x48b78f(0x202)]();}catch(_0x4b5a5c){_0x148361[_0x48b78f(0x202)]();throw _0x4b5a5c;}const _0x56fc9c=_0x1c6cdd['interval']||_0x48b78f(0x2a4);return this[_0x48b78f(0x26b)](_0x9eebf,_0x123e0c,_0x1fddef,_0x56fc9c),_0x9eebf[_0x48b78f(0x31e)]?0x0:0x1;}[a32_0x15c085(0x26b)](_0x25d3ea,_0x30a1a8,_0x5bf71f,_0x54bc34){const _0x1bfcbb=a32_0x15c085;console[_0x1bfcbb(0x2b9)]('\x0a'+a32_0x108e3e[_0x1bfcbb(0x1dd)](_0x1bfcbb(0x3d7))+'\x20'+_0x25d3ea[_0x1bfcbb(0x238)]),console['error']('═'[_0x1bfcbb(0x3c8)](0x3c)),this[_0x1bfcbb(0x339)](_0x25d3ea);if(typeof _0x30a1a8[_0x1bfcbb(0x265)]===_0x1bfcbb(0x300)){this[_0x1bfcbb(0x3f8)](_0x25d3ea),this[_0x1bfcbb(0x2f0)](_0x25d3ea),this[_0x1bfcbb(0x336)](_0x5bf71f,_0x54bc34,'attribute',_0x30a1a8[_0x1bfcbb(0x265)]);return;}if(_0x30a1a8[_0x1bfcbb(0x265)]===!![]){this[_0x1bfcbb(0x3f8)](_0x25d3ea),this['displaySummary'](_0x25d3ea),this[_0x1bfcbb(0x336)](_0x5bf71f,_0x54bc34,_0x1bfcbb(0x293));return;}if(typeof _0x30a1a8[_0x1bfcbb(0x3ef)]==='string'){this[_0x1bfcbb(0x2c0)](_0x25d3ea,_0x54bc34),this['displaySummary'](_0x25d3ea),this['displayPreviewHints'](_0x5bf71f,_0x54bc34,_0x1bfcbb(0x3ef),_0x30a1a8['behavior']);return;}if(_0x30a1a8[_0x1bfcbb(0x3ef)]===!![]){this[_0x1bfcbb(0x2c0)](_0x25d3ea,_0x54bc34),this['displaySummary'](_0x25d3ea),this['displayPreviewHints'](_0x5bf71f,_0x54bc34,'behaviors');return;}this[_0x1bfcbb(0x3f8)](_0x25d3ea),this[_0x1bfcbb(0x2c0)](_0x25d3ea,_0x54bc34),this[_0x1bfcbb(0x28b)](_0x25d3ea),this[_0x1bfcbb(0x2f0)](_0x25d3ea),this[_0x1bfcbb(0x336)](_0x5bf71f,_0x54bc34,_0x1bfcbb(0x3df));}[a32_0x15c085(0x28b)](_0x38d3d5){displayRealtimeValidation(_0x38d3d5);}[a32_0x15c085(0x336)](_0x55beed,_0x147ff9,_0x10d3f1,_0x291445){const _0x4c79e6=a32_0x15c085;console['error']('\x0a'+a32_0x108e3e[_0x4c79e6(0x232)](_0x4c79e6(0x34b)));const _0x541141=_0x147ff9!==_0x4c79e6(0x2a4)?'\x20--interval\x20'+_0x147ff9:'';if(_0x10d3f1===_0x4c79e6(0x265)&&_0x291445)console[_0x4c79e6(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x4c79e6(0x232)](_0x4c79e6(0x1f3)+_0x55beed+_0x4c79e6(0x1e4)+_0x291445+'\x22'+_0x541141));else{if(_0x10d3f1===_0x4c79e6(0x3ef)&&_0x291445)console[_0x4c79e6(0x2b9)]('\x20\x20'+a32_0x108e3e['dim'](_0x4c79e6(0x1f3)+_0x55beed+_0x4c79e6(0x35d)+_0x291445+'\x22'+_0x541141));else(_0x10d3f1===_0x4c79e6(0x293)||_0x10d3f1===_0x4c79e6(0x3df))&&console['error']('\x20\x20'+a32_0x108e3e[_0x4c79e6(0x232)](_0x4c79e6(0x1f3)+_0x55beed+_0x4c79e6(0x36b)+_0x541141));}(_0x10d3f1===_0x4c79e6(0x211)||_0x10d3f1===_0x4c79e6(0x3df))&&console[_0x4c79e6(0x2b9)]('\x20\x20'+a32_0x108e3e['dim'](_0x4c79e6(0x1f3)+_0x55beed+_0x4c79e6(0x3ff)+_0x541141)),_0x10d3f1===_0x4c79e6(0x3df)&&console[_0x4c79e6(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x4c79e6(0x232)]('tdx\x20ps\x20preview\x20'+_0x55beed+_0x4c79e6(0x3d2)+_0x541141));}['displayMasterInfo'](_0x37cd4e){const _0x19cecd=a32_0x15c085,{master:_0x50dfcc}=_0x37cd4e,_0xb58424=_0x50dfcc[_0x19cecd(0x291)]?a32_0x108e3e[_0x19cecd(0x3a8)]('✔'):a32_0x108e3e[_0x19cecd(0x246)]('✘');console[_0x19cecd(0x2b9)]('\x0a'+a32_0x108e3e[_0x19cecd(0x232)](_0x19cecd(0x1ef))),console[_0x19cecd(0x2b9)](_0xb58424+'\x20'+a32_0x108e3e[_0x19cecd(0x1dd)](_0x50dfcc[_0x19cecd(0x316)]+'.'+_0x50dfcc[_0x19cecd(0x352)])),_0x50dfcc[_0x19cecd(0x291)]?_0x50dfcc[_0x19cecd(0x348)]!==undefined&&console[_0x19cecd(0x2b9)]('\x20\x20'+a32_0x108e3e['dim']('Rows:')+'\x20'+a32_0x108e3e[_0x19cecd(0x2a1)](formatRows(_0x50dfcc[_0x19cecd(0x348)]))):console[_0x19cecd(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x19cecd(0x246)]('Error:')+'\x20'+_0x50dfcc['schemaError']);}['displayAttributesStats'](_0x2328db){const _0x24e537=a32_0x15c085;if(_0x2328db[_0x24e537(0x293)][_0x24e537(0x2f7)]===0x0)return;console[_0x24e537(0x2b9)]('\x0a'+a32_0x108e3e[_0x24e537(0x232)](_0x24e537(0x204)));for(const _0x37c7dc of _0x2328db[_0x24e537(0x293)]){const _0x3efb13=_0x37c7dc['schemaValid']?a32_0x108e3e['green']('✔'):a32_0x108e3e['red']('✘');let _0xa062c2='';if(_0x37c7dc[_0x24e537(0x291)]&&_0x37c7dc['matchedCount']!==undefined&&_0x37c7dc[_0x24e537(0x201)]!==undefined){const _0x4d3e78=_0x37c7dc['coveragePercent']['toFixed'](0x1),_0x3fce11=_0x37c7dc[_0x24e537(0x201)]>=0x50?a32_0x108e3e[_0x24e537(0x3a8)]:_0x37c7dc[_0x24e537(0x201)]>=0x32?a32_0x108e3e[_0x24e537(0x1e6)]:a32_0x108e3e[_0x24e537(0x246)];_0xa062c2='\x20'+a32_0x108e3e['dim'](_0x24e537(0x283))+'\x20'+_0x3fce11(_0x4d3e78+'%')+'\x20('+formatRows(_0x37c7dc['matchedCount'])+_0x24e537(0x2c6);}console[_0x24e537(0x2b9)](_0x3efb13+'\x20'+a32_0x108e3e[_0x24e537(0x1dd)](_0x37c7dc['name'])+_0xa062c2),console[_0x24e537(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x24e537(0x232)](_0x24e537(0x2c4))+'\x20'+a32_0x108e3e[_0x24e537(0x1dd)](_0x37c7dc[_0x24e537(0x316)]+'.'+_0x37c7dc[_0x24e537(0x352)]));const _0x5d9c3a=_0x37c7dc[_0x24e537(0x1ed)]===_0x37c7dc[_0x24e537(0x276)]?a32_0x108e3e[_0x24e537(0x232)]('Join\x20on:')+'\x20'+_0x37c7dc['joinKey']:a32_0x108e3e[_0x24e537(0x232)](_0x24e537(0x1e7))+'\x20'+_0x37c7dc[_0x24e537(0x1ed)]+'\x20=\x20'+_0x37c7dc[_0x24e537(0x276)];console[_0x24e537(0x2b9)]('\x20\x20'+_0x5d9c3a),console['error']('\x20\x20'+a32_0x108e3e['dim'](_0x24e537(0x372))),this[_0x24e537(0x251)](_0x37c7dc[_0x24e537(0x252)]),!_0x37c7dc[_0x24e537(0x291)]&&console[_0x24e537(0x2b9)]('\x20\x20'+a32_0x108e3e['red']('Error:')+'\x20'+_0x37c7dc[_0x24e537(0x217)]);}}[a32_0x15c085(0x2c0)](_0x27f604,_0xc929a6){const _0x29cc24=a32_0x15c085;if(_0x27f604[_0x29cc24(0x211)][_0x29cc24(0x2f7)]===0x0)return;console['error']('\x0a'+a32_0x108e3e[_0x29cc24(0x232)]('Behaviors')+'\x20'+a32_0x108e3e[_0x29cc24(0x232)]('('+_0xc929a6+')'));for(const _0x2e750f of _0x27f604[_0x29cc24(0x211)]){const _0x3e3152=_0x2e750f[_0x29cc24(0x291)]?a32_0x108e3e[_0x29cc24(0x3a8)]('✔'):a32_0x108e3e[_0x29cc24(0x246)]('✘');let _0x2b0ec3='';if(_0x2e750f['schemaValid']&&_0x2e750f[_0x29cc24(0x3a5)]!==undefined&&_0x2e750f['totalEvents']!==undefined){const _0x48e6df=_0x2e750f[_0x29cc24(0x298)]?.['toFixed'](0x1)||'?',_0x4ba15a=(_0x2e750f['customerPercent']??0x0)>=0x32?a32_0x108e3e[_0x29cc24(0x3a8)]:(_0x2e750f[_0x29cc24(0x298)]??0x0)>=0x14?a32_0x108e3e[_0x29cc24(0x1e6)]:a32_0x108e3e[_0x29cc24(0x246)];_0x2b0ec3='\x20'+a32_0x108e3e[_0x29cc24(0x232)](_0x29cc24(0x3f3))+'\x20'+_0x4ba15a(formatRows(_0x2e750f['customersWithEvents']))+'\x20('+_0x48e6df+'%)\x20'+a32_0x108e3e['dim'](_0x29cc24(0x1e5))+'\x20'+a32_0x108e3e[_0x29cc24(0x2a1)](formatRows(_0x2e750f[_0x29cc24(0x244)]));}console[_0x29cc24(0x2b9)](_0x3e3152+'\x20'+a32_0x108e3e[_0x29cc24(0x1dd)](_0x2e750f['name'])+_0x2b0ec3),console[_0x29cc24(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x29cc24(0x232)](_0x29cc24(0x2c4))+'\x20'+a32_0x108e3e[_0x29cc24(0x1dd)](_0x2e750f[_0x29cc24(0x316)]+'.'+_0x2e750f[_0x29cc24(0x352)]));const _0x5513b0=_0x2e750f[_0x29cc24(0x1ed)]===_0x2e750f[_0x29cc24(0x276)]?a32_0x108e3e[_0x29cc24(0x232)](_0x29cc24(0x210))+'\x20'+_0x2e750f[_0x29cc24(0x1ed)]:a32_0x108e3e[_0x29cc24(0x232)](_0x29cc24(0x1e7))+'\x20'+_0x2e750f['joinKey']+_0x29cc24(0x2dd)+_0x2e750f[_0x29cc24(0x276)];console[_0x29cc24(0x2b9)]('\x20\x20'+_0x5513b0),console[_0x29cc24(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x29cc24(0x232)](_0x29cc24(0x372))),this['displayColumns'](_0x2e750f[_0x29cc24(0x252)]),!_0x2e750f[_0x29cc24(0x291)]&&console[_0x29cc24(0x2b9)]('\x20\x20'+a32_0x108e3e['red'](_0x29cc24(0x321))+'\x20'+_0x2e750f[_0x29cc24(0x217)]);}}[a32_0x15c085(0x251)](_0x5c732f){const _0x300a82=a32_0x15c085;for(const _0x3a051c of _0x5c732f){_0x3a051c[_0x300a82(0x1fa)]===_0x3a051c[_0x300a82(0x294)]||_0x3a051c[_0x300a82(0x294)]==='*'?console['error'](_0x300a82(0x2ea)+_0x3a051c[_0x300a82(0x1fa)]):console[_0x300a82(0x2b9)](_0x300a82(0x2ea)+_0x3a051c['label']+'\x20'+a32_0x108e3e[_0x300a82(0x232)]('('+_0x3a051c[_0x300a82(0x294)]+')'));}}['displaySummary'](_0xfbd124){const _0x4795b1=a32_0x15c085;console[_0x4795b1(0x2b9)]('─'['repeat'](0x3c));if(_0xfbd124[_0x4795b1(0x228)]['length']>0x0){console['error']('\x0a'+a32_0x108e3e[_0x4795b1(0x246)](_0x4795b1(0x33c)));for(const _0x35769e of _0xfbd124[_0x4795b1(0x228)]){console[_0x4795b1(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x4795b1(0x246)]('•')+'\x20'+_0x35769e);}}_0xfbd124['allValid']&&console[_0x4795b1(0x2b9)]('\x0a'+a32_0x108e3e['green']('✔')+_0x4795b1(0x2d8));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x245);[a32_0x15c085(0x312)]=a32_0x15c085(0x39f);async[a32_0x15c085(0x26a)](_0x41a4ed){const _0x1d6a4=a32_0x15c085,{options:_0x513199,args:_0x5ac210,tdx:_0x2f2adc}=_0x41a4ed,_0x1b2a99=_0x513199,_0x37e8e4=_0x5ac210[0x0]||_0x513199['parentSegment'];if(!_0x37e8e4)return showParentSegmentNotSetError(_0x1d6a4(0x253)+_0x1d6a4(0x21a)+_0x1d6a4(0x2db)+_0x1d6a4(0x370)+_0x1d6a4(0x36e)+_0x1d6a4(0x2f9)+_0x1d6a4(0x25c)+_0x1d6a4(0x35c)),0x1;if(!_0x1b2a99['master']&&!_0x1b2a99[_0x1d6a4(0x265)]&&!_0x1b2a99[_0x1d6a4(0x3ef)]&&!_0x1b2a99[_0x1d6a4(0x2cf)])return console[_0x1d6a4(0x2b9)](a32_0x108e3e[_0x1d6a4(0x246)](_0x1d6a4(0x1ec))),console['error'](_0x1d6a4(0x332)),console[_0x1d6a4(0x2b9)](_0x1d6a4(0x269)),console[_0x1d6a4(0x2b9)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console[_0x1d6a4(0x2b9)]('\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute'),console[_0x1d6a4(0x2b9)](_0x1d6a4(0x30f)),console[_0x1d6a4(0x2b9)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x24b464=resolveYamlFile(_0x37e8e4);if(!existsSync(_0x24b464))return showFileNotFoundError(_0x24b464,_0x37e8e4),0x1;_0x1b2a99[_0x1d6a4(0x399)]&&(console['error'](_0x1d6a4(0x1f9)+_0x1b2a99[_0x1d6a4(0x3b7)]),console[_0x1d6a4(0x2b9)](_0x1d6a4(0x396)+_0x24b464));let _0x23619e;try{_0x23619e=readFileSync(_0x24b464,_0x1d6a4(0x257));}catch(_0x1f9c5a){const _0x251d01=_0x1f9c5a instanceof Error?_0x1f9c5a['message']:String(_0x1f9c5a);return console[_0x1d6a4(0x2b9)](_0x1d6a4(0x335)+_0x251d01),0x1;}let _0x37cc2e;try{_0x37cc2e=parseDef(_0x23619e);}catch(_0x589a35){const _0x1ac432=_0x589a35 instanceof Error?_0x589a35[_0x1d6a4(0x2bc)]:String(_0x589a35);return console[_0x1d6a4(0x2b9)](a32_0x108e3e[_0x1d6a4(0x246)](_0x1d6a4(0x299)+_0x1ac432)),0x1;}if(_0x1b2a99[_0x1d6a4(0x265)]===!![]||_0x1b2a99[_0x1d6a4(0x265)]===''){const _0x20cdb7=_0x37cc2e[_0x1d6a4(0x293)]?.['map'](_0x58ab78=>_0x58ab78[_0x1d6a4(0x238)])||[];if(_0x20cdb7[_0x1d6a4(0x2f7)]===0x0)console[_0x1d6a4(0x2b9)](a32_0x108e3e['red'](_0x1d6a4(0x3cb)));else{console[_0x1d6a4(0x2b9)](a32_0x108e3e[_0x1d6a4(0x246)](_0x1d6a4(0x258))),console[_0x1d6a4(0x2b9)](_0x1d6a4(0x323));for(const _0x516fc1 of _0x20cdb7){console[_0x1d6a4(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x1d6a4(0x2a1)](_0x516fc1));}console[_0x1d6a4(0x2b9)](_0x1d6a4(0x1dc)+_0x37e8e4+_0x1d6a4(0x1e4)+_0x20cdb7[0x0]+'\x22');}return 0x1;}if(_0x1b2a99[_0x1d6a4(0x3ef)]===!![]||_0x1b2a99[_0x1d6a4(0x3ef)]===''){const _0x5ef32a=_0x37cc2e['behaviors']?.[_0x1d6a4(0x2ad)](_0x3eaf73=>_0x3eaf73[_0x1d6a4(0x238)])||[];if(_0x5ef32a[_0x1d6a4(0x2f7)]===0x0)console['error'](a32_0x108e3e[_0x1d6a4(0x246)]('Error:\x20No\x20behaviors\x20defined\x20in\x20configuration'));else{console[_0x1d6a4(0x2b9)](a32_0x108e3e['red'](_0x1d6a4(0x295))),console[_0x1d6a4(0x2b9)]('Available\x20behaviors:');for(const _0x58673c of _0x5ef32a){console[_0x1d6a4(0x2b9)]('\x20\x20'+a32_0x108e3e['cyan'](_0x58673c));}console[_0x1d6a4(0x2b9)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x37e8e4+_0x1d6a4(0x35d)+_0x5ef32a[0x0]+'\x22');}return 0x1;}const _0x621876=createCommandSpinner(a32_0x108e3e[_0x1d6a4(0x232)](_0x1d6a4(0x32a)),{'verbose':_0x1b2a99[_0x1d6a4(0x399)]});_0x621876[_0x1d6a4(0x203)]();const _0x4acb1f={'onProgress':_0x5559b1=>{_0x621876['text']=formatProgressMessage(_0x5559b1);}};if(_0x1b2a99[_0x1d6a4(0x3f7)])_0x4acb1f[_0x1d6a4(0x3f7)]=!![];if(_0x1b2a99[_0x1d6a4(0x265)]&&typeof _0x1b2a99[_0x1d6a4(0x265)]===_0x1d6a4(0x300))_0x4acb1f[_0x1d6a4(0x265)]=_0x1b2a99[_0x1d6a4(0x265)];if(_0x1b2a99[_0x1d6a4(0x3ef)]&&typeof _0x1b2a99[_0x1d6a4(0x3ef)]===_0x1d6a4(0x300))_0x4acb1f['behavior']=_0x1b2a99['behavior'];if(_0x1b2a99['enriched'])_0x4acb1f[_0x1d6a4(0x2cf)]=!![];if(_0x1b2a99[_0x1d6a4(0x338)])_0x4acb1f[_0x1d6a4(0x338)]=_0x1b2a99[_0x1d6a4(0x338)];let _0x150ea1;try{_0x150ea1=await _0x2f2adc[_0x1d6a4(0x213)][_0x1d6a4(0x3a9)](_0x23619e,_0x4acb1f),_0x621876[_0x1d6a4(0x202)]();}catch(_0x5ac83f){_0x621876[_0x1d6a4(0x202)]();throw _0x5ac83f;}return await this[_0x1d6a4(0x38c)](_0x150ea1,{'master':_0x1b2a99[_0x1d6a4(0x3f7)],'attribute':typeof _0x1b2a99[_0x1d6a4(0x265)]===_0x1d6a4(0x300)?_0x1b2a99[_0x1d6a4(0x265)]:undefined,'behavior':typeof _0x1b2a99[_0x1d6a4(0x3ef)]===_0x1d6a4(0x300)?_0x1b2a99[_0x1d6a4(0x3ef)]:undefined,'enriched':_0x1b2a99[_0x1d6a4(0x2cf)]}),_0x150ea1['allValid']?0x0:0x1;}async['displayPreviewResults'](_0x460989,_0x26264b){const _0x1d9fb4=a32_0x15c085;console[_0x1d9fb4(0x2b9)]('\x0a'+a32_0x108e3e['bold'](_0x1d9fb4(0x3de))+'\x20'+_0x460989['name']),console[_0x1d9fb4(0x2b9)]('═'[_0x1d9fb4(0x3c8)](0x3c));if(_0x26264b[_0x1d9fb4(0x3f7)]&&_0x460989['sampleData']){const _0xf67e43=a32_0x108e3e[_0x1d9fb4(0x232)](_0x1d9fb4(0x3e6))+'\x20'+a32_0x108e3e[_0x1d9fb4(0x1dd)](_0x460989['master'][_0x1d9fb4(0x316)]+'.'+_0x460989[_0x1d9fb4(0x3f7)]['table']);await this[_0x1d9fb4(0x226)](_0xf67e43,_0x460989[_0x1d9fb4(0x355)]);}else{if(_0x26264b['attribute']&&_0x460989[_0x1d9fb4(0x355)]){const _0x1d707a=a32_0x108e3e[_0x1d9fb4(0x232)](_0x1d9fb4(0x37a))+'\x20'+a32_0x108e3e[_0x1d9fb4(0x1dd)](_0x26264b['attribute']);await this[_0x1d9fb4(0x226)](_0x1d707a,_0x460989[_0x1d9fb4(0x355)]);}else{if(_0x26264b[_0x1d9fb4(0x3ef)]&&_0x460989[_0x1d9fb4(0x355)]){const _0x3ab2ae=a32_0x108e3e['dim'](_0x1d9fb4(0x25d))+'\x20'+a32_0x108e3e[_0x1d9fb4(0x1dd)](_0x26264b[_0x1d9fb4(0x3ef)]);await this[_0x1d9fb4(0x226)](_0x3ab2ae,_0x460989['sampleData']);}else{if(_0x26264b['enriched']&&_0x460989[_0x1d9fb4(0x355)]){const _0x41ecd9=a32_0x108e3e[_0x1d9fb4(0x232)](_0x1d9fb4(0x296))+'\x20'+a32_0x108e3e[_0x1d9fb4(0x1dd)]('Master\x20+\x20Attributes');await this[_0x1d9fb4(0x226)](_0x41ecd9,_0x460989[_0x1d9fb4(0x355)]);}else!_0x460989['sampleData']&&console['error'](_0x1d9fb4(0x230));}}}if(_0x460989[_0x1d9fb4(0x228)]['length']>0x0){console[_0x1d9fb4(0x2b9)]('─'[_0x1d9fb4(0x3c8)](0x3c)),console[_0x1d9fb4(0x2b9)]('\x0a'+a32_0x108e3e['red']('Errors:'));for(const _0xd684fa of _0x460989[_0x1d9fb4(0x228)]){console['error']('\x20\x20'+a32_0x108e3e[_0x1d9fb4(0x246)]('•')+'\x20'+_0xd684fa);}}}async[a32_0x15c085(0x226)](_0xd72789,_0x1f91e5){const _0x26cd93=a32_0x15c085;if(_0x1f91e5[_0x26cd93(0x2f7)]===0x0){console[_0x26cd93(0x2b9)]('\x0a'+_0xd72789),console[_0x26cd93(0x2b9)]('\x20\x20No\x20sample\x20data\x20available');return;}console[_0x26cd93(0x2b9)]('\x0a'+_0xd72789);const _0x4317e8=Object[_0x26cd93(0x33a)](_0x1f91e5[0x0])['map'](_0x4cf659=>({'name':_0x4cf659,'type':typeof _0x1f91e5[0x0][_0x4cf659]===_0x26cd93(0x2a8)?_0x26cd93(0x1fc):'varchar'})),_0x18fbc4={'queryId':_0x26cd93(0x2f2),'columns':_0x4317e8,'data':_0x1f91e5,'stats':{'state':_0x26cd93(0x351),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1f91e5[_0x26cd93(0x2f7)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x428fb4=formatAsTable(_0x18fbc4,_0x1f91e5[_0x26cd93(0x2f7)],!![]);await writeOutput(_0x428fb4,undefined,_0x26cd93(0x352));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x381);[a32_0x15c085(0x312)]=a32_0x15c085(0x3f5);async[a32_0x15c085(0x26a)](_0x4d56cd){const _0x11e626=a32_0x15c085,{options:_0x525c90,args:_0x30618a,tdx:_0xee0da0}=_0x4d56cd,_0xd8dec7=_0x525c90,_0x5c7564=_0x30618a[0x0]||_0x525c90['parentSegment'];if(!_0x5c7564)return showParentSegmentNotSetError(_0x11e626(0x309)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x371785=resolveYamlFile(_0x5c7564);if(existsSync(_0x371785)){_0xd8dec7[_0x11e626(0x399)]&&console['error'](_0x11e626(0x263)+_0x371785);let _0x657b20;try{_0x657b20=readFileSync(_0x371785,'utf-8');}catch(_0x1af552){const _0x2ec419=_0x1af552 instanceof Error?_0x1af552['message']:String(_0x1af552);return console[_0x11e626(0x2b9)](_0x11e626(0x335)+_0x2ec419),0x1;}const _0x23b9ce=await withSpinner('Analyzing\x20changes...',()=>_0xee0da0['segment'][_0x11e626(0x20b)](_0x657b20),{'verbose':_0xd8dec7[_0x11e626(0x399)]}),_0x9ed141=_0x23b9ce['data'],{isNew:_0x416f65,name:_0x2093a6,hasChanges:_0x2ab1ec,diffFormatted:_0x28617a}=_0x9ed141;if(_0x2ab1ec){_0x416f65?console[_0x11e626(0x2b9)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x2093a6+'\x27:'):console[_0x11e626(0x2b9)](_0x11e626(0x24e)+_0x2093a6+'\x27:');console[_0x11e626(0x2b9)]('─'[_0x11e626(0x3c8)](0x3c)),console[_0x11e626(0x2b9)](_0x28617a),console[_0x11e626(0x2b9)]('─'[_0x11e626(0x3c8)](0x3c));const _0x3b3f69=_0x416f65?_0x11e626(0x1f6)+_0x2093a6+_0x11e626(0x288):'Apply\x20changes\x20to\x20\x27'+_0x2093a6+_0x11e626(0x288);if(!_0xd8dec7['yes']){if(!isInteractive())return console[_0x11e626(0x2b9)](a32_0x108e3e[_0x11e626(0x246)](_0x11e626(0x2b5)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x11e626(0x2b9)](a32_0x108e3e[_0x11e626(0x232)](_0x11e626(0x2e0))),0x1;const _0x30f9eb=await confirmKey(_0x3b3f69);if(!_0x30f9eb)return console['error'](a32_0x108e3e[_0x11e626(0x1e6)](_0x11e626(0x3ee))),0x1;}const _0x4194d0=_0x416f65?_0x11e626(0x2b4):'Updating';await withSpinner(_0x4194d0+'\x20parent\x20segment\x20\x27'+_0x2093a6+_0x11e626(0x3b6),()=>_0x9ed141[_0x11e626(0x307)](),{'verbose':_0xd8dec7[_0x11e626(0x399)]});const _0x548a3e=_0x416f65?_0x11e626(0x2b7):'Updated';console[_0x11e626(0x2b9)]('✔\x20'+_0x548a3e+_0x11e626(0x2dc)+_0x2093a6+'\x27');}else console['error'](_0x11e626(0x3a7)+_0x2093a6+_0x11e626(0x24b));}const _0x297738=await withSpinner(_0x11e626(0x30d)+_0x5c7564+_0x11e626(0x3b6),()=>_0xee0da0[_0x11e626(0x213)][_0x11e626(0x218)](_0x5c7564),{'verbose':_0xd8dec7[_0x11e626(0x399)]}),_0x58e194=_0x297738[_0x11e626(0x207)],_0x4a1990=getConsoleUrl(_0xd8dec7['site'],'/app/workflows/'+_0x58e194[_0x11e626(0x286)]+_0x11e626(0x3a3)+_0x58e194[_0x11e626(0x341)]+_0x11e626(0x2e3)+_0x58e194[_0x11e626(0x2df)]);return console[_0x11e626(0x2b9)](_0x11e626(0x3ba)),console['error']('\x20\x20'+a32_0x108e3e[_0x11e626(0x232)]('Audience\x20ID:')+'\x20'+_0x58e194[_0x11e626(0x349)]),console[_0x11e626(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x11e626(0x232)](_0x11e626(0x30b))+'\x20'+_0x58e194[_0x11e626(0x254)]),console[_0x11e626(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x11e626(0x232)](_0x11e626(0x29e))+'\x20'+_0x58e194['workflowSessionId']),console['error']('\x20\x20'+a32_0x108e3e['dim'](_0x11e626(0x391))+'\x20'+_0x58e194[_0x11e626(0x2df)]),console[_0x11e626(0x2b9)]('\x20\x20'+_0x4a1990),console[_0x11e626(0x2b9)]('\x0a'+a32_0x108e3e[_0x11e626(0x232)](_0x11e626(0x1f0))+_0x11e626(0x2a3)+_0x58e194['workflowAttemptId']+_0x11e626(0x28f)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x38d);[a32_0x15c085(0x312)]=a32_0x15c085(0x39a);async[a32_0x15c085(0x26a)](_0x23dbcd){const _0x39a620=a32_0x15c085,{options:_0x443358,args:_0x23ad48,tdx:_0x48779d}=_0x23dbcd,_0x2d46af=_0x23ad48[0x0]||_0x443358[_0x39a620(0x2d0)];if(!_0x2d46af)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a'+_0x39a620(0x222)),0x1;_0x443358[_0x39a620(0x399)]&&(console[_0x39a620(0x2b9)](_0x39a620(0x1f9)+_0x443358[_0x39a620(0x3b7)]),console[_0x39a620(0x2b9)](_0x39a620(0x1f4)+_0x2d46af));const _0x4f1018=await withSpinner(_0x39a620(0x34a)+_0x2d46af+_0x39a620(0x3b6),()=>_0x48779d[_0x39a620(0x213)][_0x39a620(0x3ad)](_0x2d46af),{'verbose':_0x443358[_0x39a620(0x399)]}),_0x27dbdd=_0x4f1018[_0x39a620(0x207)];console['error'](_0x39a620(0x27b)+_0x27dbdd[_0x39a620(0x2f7)]+'\x20field'+(_0x27dbdd[_0x39a620(0x2f7)]!==0x1?'s':''));if(_0x443358[_0x39a620(0x250)]||_0x443358[_0x39a620(0x1da)])return await handleSDKOutput(_0x27dbdd,_0x443358),0x0;return displayFieldsHumanReadable(_0x27dbdd,_0x2d46af),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x346);[a32_0x15c085(0x312)]=a32_0x15c085(0x318);async[a32_0x15c085(0x26a)](_0x592005){const _0x1744da=a32_0x15c085,{options:_0x3cf31b,args:_0x1fda08,tdx:_0x4311fe}=_0x592005,_0x488e7e=_0x3cf31b,_0xbaecbc=_0x1fda08[0x0]||_0x3cf31b[_0x1744da(0x2d0)];if(!_0xbaecbc)return showParentSegmentNotSetError(_0x1744da(0x208)+_0x1744da(0x3af)+_0x1744da(0x1f1)+'\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser'),0x1;_0x3cf31b['verbose']&&(console[_0x1744da(0x2b9)](_0x1744da(0x1f9)+_0x3cf31b[_0x1744da(0x3b7)]),console[_0x1744da(0x2b9)](_0x1744da(0x1f4)+_0xbaecbc));const _0x29340a=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0xbaecbc+'\x27...',()=>_0x4311fe[_0x1744da(0x213)][_0x1744da(0x2fb)](_0xbaecbc),{'verbose':_0x3cf31b['verbose']}),_0x244b4f=_0x29340a['data'];if(_0x488e7e['web']){const _0x29d559=getConsoleNextUrl(_0x488e7e['site'],_0x1744da(0x3f1)+_0x244b4f['id']);return console[_0x1744da(0x2b9)](a32_0x108e3e[_0x1744da(0x3a8)]('✔')+_0x1744da(0x224)+a32_0x108e3e[_0x1744da(0x2a1)](_0x29d559)),openBrowser(_0x29d559),0x0;}return await handleSingleObjectOutput(_0x244b4f,_0x3cf31b),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x33f);[a32_0x15c085(0x312)]=a32_0x15c085(0x2e4);async[a32_0x15c085(0x26a)](_0x5de21c){const _0x60b1b7=a32_0x15c085,{options:_0x52a077,args:_0x5deb19,tdx:_0x315e97}=_0x5de21c,_0x1abe5a=_0x52a077,_0x544bdb=_0x5deb19[0x0]||_0x52a077[_0x60b1b7(0x2d0)];if(!_0x544bdb)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'+_0x60b1b7(0x356)+'Options:\x0a'+_0x60b1b7(0x38b)),0x1;_0x52a077[_0x60b1b7(0x399)]&&(console[_0x60b1b7(0x2b9)](_0x60b1b7(0x1f9)+_0x52a077[_0x60b1b7(0x3b7)]),console[_0x60b1b7(0x2b9)](_0x60b1b7(0x1f4)+_0x544bdb));const _0x1d3766=await withSpinner(_0x60b1b7(0x2af)+_0x544bdb+_0x60b1b7(0x3b6),()=>_0x315e97[_0x60b1b7(0x213)][_0x60b1b7(0x28d)](_0x544bdb),{'verbose':_0x52a077[_0x60b1b7(0x399)]}),_0x393db4=_0x1d3766['data'],_0xed67e2=_0x315e97[_0x60b1b7(0x213)][_0x60b1b7(0x36d)](_0x393db4);if(_0x1abe5a[_0x60b1b7(0x3c3)]){const _0x1be873=await this[_0x60b1b7(0x2ec)](_0x5de21c,_0x544bdb,_0x393db4,_0xed67e2),_0x4d7a09=this[_0x60b1b7(0x36f)](_0x1be873);writeFileSync(_0x1abe5a['output'],_0x4d7a09);const _0x13abd1=_0x1be873['customers']['columns']['length']+_0x1be873[_0x60b1b7(0x211)]['reduce']((_0x302d80,_0x2159c1)=>_0x302d80+_0x2159c1[_0x60b1b7(0x252)][_0x60b1b7(0x2f7)],0x0),_0x16e896=_0x1be873['behaviors'][_0x60b1b7(0x1fb)](_0x12dd6c=>_0x12dd6c['columns']['length']===0x0)[_0x60b1b7(0x2f7)];return console['log']('Schema\x20saved\x20to\x20'+_0x1abe5a['output']),console[_0x60b1b7(0x20d)](_0x60b1b7(0x2a2)+_0xed67e2),console[_0x60b1b7(0x20d)](_0x60b1b7(0x353)+_0x1be873['behaviors'][_0x60b1b7(0x2f7)]+'\x20behaviors'),console[_0x60b1b7(0x20d)]('\x20\x20Columns:\x20'+_0x13abd1+_0x60b1b7(0x376)),_0x16e896>0x0&&console[_0x60b1b7(0x20d)](_0x60b1b7(0x2b8)+_0x16e896+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console[_0x60b1b7(0x2b9)]('\x0a'+a32_0x108e3e[_0x60b1b7(0x1dd)](_0x60b1b7(0x2e6))+'\x20'+a32_0x108e3e[_0x60b1b7(0x2a1)](_0xed67e2));const _0x239892=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x315e97[_0x60b1b7(0x213)][_0x60b1b7(0x22f)](_0x393db4),{'verbose':_0x52a077[_0x60b1b7(0x399)]});console[_0x60b1b7(0x2b9)]('\x0a'+a32_0x108e3e[_0x60b1b7(0x1dd)](_0x60b1b7(0x20a))+'\x20'+a32_0x108e3e[_0x60b1b7(0x232)]('('+_0xed67e2+_0x60b1b7(0x3cf)));const _0x32a478=await executeSchemaQuery(_0x239892['data'],_0x315e97,_0x52a077);await handleQueryOutput(_0x32a478,_0x52a077);const _0x15735e=await withSpinner(_0x60b1b7(0x3ce),()=>_0x315e97['segment']['getBehaviorNames'](_0x393db4),{'verbose':_0x52a077[_0x60b1b7(0x399)]});for(const _0x2077fa of _0x15735e['data']){const _0x352ee4=_0x60b1b7(0x2f6)+_0x2077fa[_0x60b1b7(0x32d)]()[_0x60b1b7(0x1ee)](/\s+/g,'_'),_0x4de790=_0x60b1b7(0x3b4)+_0xed67e2+'.'+_0x352ee4;console['error']('\x0a'+a32_0x108e3e['bold'](_0x2077fa)+'\x20'+a32_0x108e3e[_0x60b1b7(0x232)]('('+_0xed67e2+'.'+_0x352ee4+')'));try{const _0xd2ad4d=await executeSchemaQuery(_0x4de790,_0x315e97,_0x52a077);await handleQueryOutput(_0xd2ad4d,_0x52a077);}catch{console[_0x60b1b7(0x2b9)](a32_0x108e3e[_0x60b1b7(0x1e6)](_0x60b1b7(0x2fd)));}}return 0x0;}async[a32_0x15c085(0x2ec)](_0x540f40,_0x386b0b,_0x305a26,_0xc74a10){const _0xb9f9a0=a32_0x15c085,{options:_0x194ef5,tdx:_0x2fb422}=_0x540f40,_0x2bcbff=await withSpinner(_0xb9f9a0(0x367),()=>_0x2fb422[_0xb9f9a0(0x213)]['getParentSQL'](_0x305a26),{'verbose':_0x194ef5[_0xb9f9a0(0x399)]}),_0x50275d=await executeSchemaQuery(_0x2bcbff[_0xb9f9a0(0x207)],_0x2fb422,_0x194ef5),_0x51f725=_0x50275d[_0xb9f9a0(0x207)][_0xb9f9a0(0x2ad)](_0x24d1ef=>({'name':_0x24d1ef[_0xb9f9a0(0x2d5)],'type':_0x24d1ef[_0xb9f9a0(0x3db)]})),_0x30c850=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x2fb422[_0xb9f9a0(0x213)][_0xb9f9a0(0x247)](_0x305a26),{'verbose':_0x194ef5[_0xb9f9a0(0x399)]}),_0x12e5e4=[];for(const _0x251c0b of _0x30c850[_0xb9f9a0(0x207)]){const _0x4c7023=_0xb9f9a0(0x2f6)+_0x251c0b[_0xb9f9a0(0x32d)]()['replace'](/\s+/g,'_'),_0x5adf48=_0xb9f9a0(0x3b4)+_0xc74a10+'.'+_0x4c7023;let _0x564027=[];try{const _0x2df6b9=await executeSchemaQuery(_0x5adf48,_0x2fb422,_0x194ef5);_0x564027=_0x2df6b9['data'][_0xb9f9a0(0x2ad)](_0x5ddff2=>({'name':_0x5ddff2[_0xb9f9a0(0x2d5)],'type':_0x5ddff2[_0xb9f9a0(0x3db)]}));}catch{}_0x12e5e4['push']({'table':_0x4c7023,'columns':_0x564027});}return{'database':_0xc74a10,'parent_segment':_0x386b0b,'parent_id':_0x305a26,'customers':{'table':_0xb9f9a0(0x20a),'columns':_0x51f725},'behaviors':_0x12e5e4};}[a32_0x15c085(0x36f)](_0x22c238){const _0x8efa07=a32_0x15c085,_0x24088f=_0x5b08a6=>{const _0x5677a2=a32_0x3e24;if(_0x5b08a6[_0x5677a2(0x2f7)]===0x0)return'[]';const _0x552570=_0x5b08a6[_0x5677a2(0x2ad)](_0x6abf70=>_0x5677a2(0x313)+_0x6abf70[_0x5677a2(0x238)]+'\x22,\x20\x22type\x22:\x20\x22'+_0x6abf70[_0x5677a2(0x3cd)]+_0x5677a2(0x1f2));return'[\x0a'+_0x552570[_0x5677a2(0x3bc)](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x2f4855=_0x22c238['behaviors'][_0x8efa07(0x2ad)](_0x225f83=>{const _0x276168=_0x8efa07;return _0x276168(0x3e1)+_0x225f83[_0x276168(0x352)]+_0x276168(0x2ce)+_0x24088f(_0x225f83[_0x276168(0x252)])[_0x276168(0x1ee)](/^/gm,'\x20\x20')[_0x276168(0x2ef)]()+_0x276168(0x26c);})[_0x8efa07(0x3bc)](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x22c238[_0x8efa07(0x316)]+_0x8efa07(0x2ae)+_0x22c238['parent_segment']+_0x8efa07(0x2e9)+_0x22c238['parent_id']+_0x8efa07(0x37b)+_0x22c238['customers'][_0x8efa07(0x352)]+'\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20'+_0x24088f(_0x22c238[_0x8efa07(0x20a)][_0x8efa07(0x252)])['replace'](/^/gm,'\x20\x20')[_0x8efa07(0x2ef)]()+_0x8efa07(0x34c)+_0x2f4855+_0x8efa07(0x275);}}export class ParentSegmentSQLCommand extends BaseCommand{[a32_0x15c085(0x238)]='segment:parent:sql';['description']=a32_0x15c085(0x3eb);async[a32_0x15c085(0x26a)](_0x1c4638){const _0x44aca2=a32_0x15c085,{options:_0x174776,args:_0x260628,tdx:_0x253b9f}=_0x1c4638,_0x171e96=_0x260628[0x0]||_0x174776[_0x44aca2(0x2d0)];if(!_0x171e96)return showParentSegmentNotSetError(_0x44aca2(0x2e1)+_0x44aca2(0x20f)),0x1;_0x174776[_0x44aca2(0x399)]&&(console[_0x44aca2(0x2b9)](_0x44aca2(0x1f9)+_0x174776['site']),console['error'](_0x44aca2(0x1f4)+_0x171e96));const _0x269dd9=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x171e96+_0x44aca2(0x3b6),()=>_0x253b9f[_0x44aca2(0x213)][_0x44aca2(0x28d)](_0x171e96),{'verbose':_0x174776[_0x44aca2(0x399)]}),_0x516e5a=_0x269dd9[_0x44aca2(0x207)],_0x597014=await withSpinner(_0x44aca2(0x2c1)+_0x171e96+_0x44aca2(0x3b6),()=>_0x253b9f[_0x44aca2(0x213)][_0x44aca2(0x22f)](_0x516e5a),{'verbose':_0x174776[_0x44aca2(0x399)]}),_0x7ee09=_0x597014[_0x44aca2(0x207)];return _0x174776[_0x44aca2(0x3fc)]==='json'||_0x174776[_0x44aca2(0x3fc)]==='jsonl'?await handleSDKOutput([{'sql':_0x7ee09}],_0x174776):console[_0x44aca2(0x20d)](_0x7ee09),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x2ca);['description']=a32_0x15c085(0x320);async[a32_0x15c085(0x26a)](_0x4b1326){const _0x1a17a8=a32_0x15c085,{options:_0x2151da,args:_0x14e135,tdx:_0x35bcef}=_0x4b1326,_0x2d7727=_0x14e135[0x0]||_0x2151da[_0x1a17a8(0x2d0)];if(!_0x2d7727)return showParentSegmentNotSetError(_0x1a17a8(0x37f)+_0x1a17a8(0x2b0)),0x1;_0x2151da['verbose']&&(console[_0x1a17a8(0x2b9)]('Site:\x20'+_0x2151da[_0x1a17a8(0x3b7)]),console[_0x1a17a8(0x2b9)](_0x1a17a8(0x1f4)+_0x2d7727));const _0x470441=await withSpinner(_0x1a17a8(0x2af)+_0x2d7727+'\x27...',()=>_0x35bcef[_0x1a17a8(0x213)]['resolveParentId'](_0x2d7727),{'verbose':_0x2151da['verbose']}),_0x25b85c=_0x470441[_0x1a17a8(0x207)],_0x2e36ef=await withSpinner(_0x1a17a8(0x2c1)+_0x2d7727+_0x1a17a8(0x3b6),()=>_0x35bcef['segment'][_0x1a17a8(0x22f)](_0x25b85c),{'verbose':_0x2151da[_0x1a17a8(0x399)]});let _0x4dd066=_0x2e36ef[_0x1a17a8(0x207)];const _0x3fca40=resolveLimit(_0x2151da[_0x1a17a8(0x27a)],DEFAULT_DISPLAY_LIMIT),_0x1cbe38=/\bLIMIT\s+\d+/i[_0x1a17a8(0x229)](_0x4dd066);!_0x1cbe38&&(_0x4dd066=_0x4dd066[_0x1a17a8(0x2ef)]()[_0x1a17a8(0x1ee)](/;+$/,''),_0x4dd066=_0x1a17a8(0x234)+_0x4dd066+_0x1a17a8(0x28c)+_0x3fca40);_0x2151da[_0x1a17a8(0x399)]&&console[_0x1a17a8(0x2b9)]('SQL\x20query:\x0a'+_0x4dd066);const _0x37739e=await withProgressSpinner(_0x1a17a8(0x3f9),async _0x450673=>{const _0x309ce9=_0x1a17a8,_0x2f70f7=await _0x35bcef['query'][_0x309ce9(0x26a)](_0x4dd066,{'catalog':'td','schema':_0x309ce9(0x3f6),'onJobId':_0x1f5d51=>{const _0x5968ea=_0x309ce9;_0x450673[_0x5968ea(0x22b)](_0x1f5d51);}});return _0x2f70f7;},{'verbose':_0x2151da[_0x1a17a8(0x399)]}),_0x18632d=_0x37739e['data'],_0x80d827=_0x18632d['jobId']?_0x1a17a8(0x31c)+_0x18632d[_0x1a17a8(0x3bb)]+']':'';return console[_0x1a17a8(0x2b9)](_0x1a17a8(0x20c)+_0x18632d[_0x1a17a8(0x235)]['processedRows'][_0x1a17a8(0x200)]()+_0x1a17a8(0x371)+(_0x1a17a8(0x25b)+formatElapsed(_0x18632d['stats'][_0x1a17a8(0x3f0)])+_0x80d827)),await handleQueryOutput(_0x18632d,_0x2151da),0x0;}}export class PSRtListCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x2ed);[a32_0x15c085(0x312)]='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a32_0x15c085(0x26a)](_0x5a1b19){const _0x8573d=a32_0x15c085,{options:_0x109475,args:_0x4d9b01,tdx:_0x35d78b}=_0x5a1b19,_0x3fdf6c=_0x4d9b01[0x0],_0xc294f1=await withSpinner(_0x3fdf6c?_0x8573d(0x369)+_0x3fdf6c+'\x27...':'Listing\x20RT-enabled\x20parent\x20segments...',()=>_0x35d78b[_0x8573d(0x21b)][_0x8573d(0x3d0)](),{'verbose':_0x109475[_0x8573d(0x399)]});let _0x3dcb9d=_0xc294f1['data'][_0x8573d(0x1fb)](_0x24c3af=>_0x24c3af[_0x8573d(0x23e)]);if(_0x3fdf6c){const _0x2ab5d6=_0x3fdf6c[_0x8573d(0x1ee)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x8573d(0x1ee)](/\*/g,'.*')[_0x8573d(0x1ee)](/\?/g,'.'),_0x5c3a7b=new RegExp('^'+_0x2ab5d6+'$','i');_0x3dcb9d=_0x3dcb9d[_0x8573d(0x1fb)](_0x5bffbc=>_0x5c3a7b[_0x8573d(0x229)](_0x5bffbc['name']));}_0x3dcb9d[_0x8573d(0x29c)]((_0x599065,_0x4b6e1d)=>_0x599065[_0x8573d(0x238)][_0x8573d(0x239)](_0x4b6e1d[_0x8573d(0x238)])),console['error'](_0x8573d(0x27b)+_0x3dcb9d[_0x8573d(0x2f7)]+'\x20RT-enabled\x20parent\x20segment'+(_0x3dcb9d[_0x8573d(0x2f7)]!==0x1?'s':''));const _0x3ff052=_0x1161e6=>{const _0x45fd61=_0x8573d;return getConsoleNextUrl(_0x109475[_0x45fd61(0x3b7)],'/app/dw/parentSegments/'+_0x1161e6);};if(_0x109475[_0x8573d(0x3fc)]===_0x8573d(0x250)||_0x109475[_0x8573d(0x3fc)]===_0x8573d(0x1da)){const _0x5a60a7=_0x3dcb9d['map'](_0x4b6aac=>({..._0x4b6aac,'url':_0x3ff052(_0x4b6aac['id'])}));await handleSDKOutput(_0x5a60a7,_0x109475);}else{if(_0x3dcb9d[_0x8573d(0x2f7)]===0x0)console[_0x8573d(0x20d)](_0x8573d(0x3c5));else for(const _0x4f4c19 of _0x3dcb9d){const _0x8e9913=_0x4f4c19[_0x8573d(0x397)]?a32_0x108e3e[_0x8573d(0x232)]('\x20('+formatRows(_0x4f4c19[_0x8573d(0x397)])+')'):'',_0x52b9f5=hyperlink(_0x4f4c19['name'],_0x3ff052(_0x4f4c19['id']));console[_0x8573d(0x20d)]('⚡\x20'+_0x52b9f5+_0x8e9913);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x390);[a32_0x15c085(0x312)]=a32_0x15c085(0x1eb);async[a32_0x15c085(0x26a)](_0x376604){const _0x521a5e=a32_0x15c085,{options:_0xd4f1d4,args:_0x451ade,tdx:_0x4076b9}=_0x376604,_0x47ead7=_0x451ade[0x0]||_0xd4f1d4['parentSegment'];if(!_0x47ead7)return showParentSegmentNotSetError(_0x521a5e(0x1d6)+_0x521a5e(0x375)),0x1;const _0xfdf7c4=resolveYamlFile(_0x47ead7);if(!existsSync(_0xfdf7c4))return showFileNotFoundError(_0xfdf7c4,_0x47ead7),0x1;let _0x21891a;try{_0x21891a=readFileSync(_0xfdf7c4,_0x521a5e(0x257));}catch(_0x289173){const _0x46b074=_0x289173 instanceof Error?_0x289173[_0x521a5e(0x2bc)]:String(_0x289173);return console[_0x521a5e(0x2b9)](_0x521a5e(0x335)+_0x46b074),0x1;}const _0x4f7318=createCommandSpinner(a32_0x108e3e[_0x521a5e(0x232)](_0x521a5e(0x1d9)),{'verbose':_0xd4f1d4[_0x521a5e(0x399)]});_0x4f7318[_0x521a5e(0x203)]();const _0x1275b9={'realtime':!![],'onProgress':_0x460e3e=>{_0x4f7318['text']=formatProgressMessage(_0x460e3e);}};let _0x181464;try{_0x181464=await _0x4076b9['segment'][_0x521a5e(0x2a0)](_0x21891a,_0x1275b9),_0x4f7318[_0x521a5e(0x202)]();}catch(_0xa7d039){_0x4f7318[_0x521a5e(0x202)]();throw _0xa7d039;}console[_0x521a5e(0x2b9)]('\x0a'+a32_0x108e3e[_0x521a5e(0x1dd)](_0x521a5e(0x29a))+'\x20'+_0x181464['name']),console['error']('═'[_0x521a5e(0x3c8)](0x3c)),displayRealtimeValidation(_0x181464),console[_0x521a5e(0x2b9)]('─'[_0x521a5e(0x3c8)](0x3c));if(_0x181464[_0x521a5e(0x228)][_0x521a5e(0x2f7)]>0x0){console[_0x521a5e(0x2b9)]('\x0a'+a32_0x108e3e[_0x521a5e(0x246)]('Errors:'));for(const _0xd64288 of _0x181464[_0x521a5e(0x228)]){console[_0x521a5e(0x2b9)]('\x20\x20'+a32_0x108e3e[_0x521a5e(0x246)]('•')+'\x20'+_0xd64288);}}return _0x181464[_0x521a5e(0x31e)]&&console[_0x521a5e(0x2b9)]('\x0a'+a32_0x108e3e[_0x521a5e(0x3a8)]('✔')+_0x521a5e(0x373)),_0x181464[_0x521a5e(0x31e)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x2cc);[a32_0x15c085(0x312)]=a32_0x15c085(0x3ed);async[a32_0x15c085(0x26a)](_0x4e8123){const _0x213fac=a32_0x15c085,{options:_0x689e41,args:_0x1b11df,tdx:_0x112256}=_0x4e8123,_0x1fa9f1=_0x1b11df[0x0]||_0x689e41[_0x213fac(0x2d0)];if(!_0x1fa9f1)return showParentSegmentNotSetError(_0x213fac(0x3bf)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment'),0x1;_0x689e41[_0x213fac(0x399)]&&(console['error'](_0x213fac(0x1f9)+_0x689e41[_0x213fac(0x3b7)]),console[_0x213fac(0x2b9)](_0x213fac(0x1f4)+_0x1fa9f1));const _0x207550=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1fa9f1+_0x213fac(0x3b6),()=>_0x112256[_0x213fac(0x213)]['resolveParentId'](_0x1fa9f1),{'verbose':_0x689e41['verbose']}),_0x42fd7d=_0x207550[_0x213fac(0x207)],_0x36818c=await withSpinner(_0x213fac(0x231)+_0x1fa9f1+_0x213fac(0x3b6),()=>_0x112256[_0x213fac(0x21b)]['listJourneys'](_0x42fd7d),{'verbose':_0x689e41['verbose']}),_0x5ab3f2=_0x36818c[_0x213fac(0x207)];console[_0x213fac(0x2b9)]('✔\x20Found\x20'+_0x5ab3f2['length']+_0x213fac(0x282)+(_0x5ab3f2[_0x213fac(0x2f7)]!==0x1?'s':''));if(_0x689e41['format']===_0x213fac(0x250)||_0x689e41[_0x213fac(0x3fc)]===_0x213fac(0x1da))await handleSDKOutput(_0x5ab3f2,_0x689e41);else{if(_0x5ab3f2[_0x213fac(0x2f7)]===0x0)console[_0x213fac(0x20d)](_0x213fac(0x330));else for(const _0x1af7e6 of _0x5ab3f2){const _0x358b1c=_0x1af7e6[_0x213fac(0x29d)]===_0x213fac(0x23a)?'🚀':'📝',_0x206106=_0x1af7e6[_0x213fac(0x284)]?a32_0x108e3e[_0x213fac(0x1e6)](_0x213fac(0x2d4)):'',_0x1c9a30=a32_0x108e3e['dim']('\x20('+_0x1af7e6[_0x213fac(0x259)]+_0x213fac(0x2d6)+(_0x1af7e6[_0x213fac(0x259)]!==0x1?'s':'')+')');console[_0x213fac(0x20d)](_0x358b1c+'\x20'+_0x1af7e6[_0x213fac(0x238)]+_0x206106+_0x1c9a30);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{['name']='ps:rt:jn:pause';['description']=a32_0x15c085(0x236);async[a32_0x15c085(0x26a)](_0x2a7f39){const _0x2a54f7=a32_0x15c085,{options:_0x58cf39,args:_0x38b0d7,tdx:_0x24abe0}=_0x2a7f39,_0x2225c0=_0x38b0d7[0x0];if(!_0x2225c0)return console['error'](a32_0x108e3e[_0x2a54f7(0x246)](_0x2a54f7(0x223))),console['error'](_0x2a54f7(0x3e4)),console['error'](a32_0x108e3e[_0x2a54f7(0x232)](_0x2a54f7(0x3b5))),0x1;_0x58cf39[_0x2a54f7(0x399)]&&(console['error'](_0x2a54f7(0x1f9)+_0x58cf39['site']),console[_0x2a54f7(0x2b9)](_0x2a54f7(0x1ea)+_0x2225c0));const _0x5eca90=await withSpinner(_0x2a54f7(0x392)+_0x2225c0+_0x2a54f7(0x3b6),()=>_0x24abe0[_0x2a54f7(0x21b)][_0x2a54f7(0x377)](_0x2225c0),{'verbose':_0x58cf39[_0x2a54f7(0x399)]}),_0x215abb=_0x5eca90[_0x2a54f7(0x207)];console[_0x2a54f7(0x2b9)](_0x2a54f7(0x31d)+_0x215abb[_0x2a54f7(0x238)]+'\x27');if(_0x58cf39[_0x2a54f7(0x3fc)]===_0x2a54f7(0x250)||_0x58cf39[_0x2a54f7(0x3fc)]===_0x2a54f7(0x1da))await handleSDKOutput([_0x215abb],_0x58cf39);else{const _0xe5e6fe=_0x215abb['state']===_0x2a54f7(0x23a)?'🚀':'📝',_0x17b49a=_0x215abb['paused']?a32_0x108e3e[_0x2a54f7(0x1e6)]('\x20(paused)'):'';console[_0x2a54f7(0x20d)](_0xe5e6fe+'\x20'+_0x215abb[_0x2a54f7(0x238)]+_0x17b49a);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{['name']='ps:rt:jn:resume';[a32_0x15c085(0x312)]=a32_0x15c085(0x281);async[a32_0x15c085(0x26a)](_0x18ffd8){const _0x4e7ce6=a32_0x15c085,{options:_0x1a5814,args:_0xbdaad6,tdx:_0xc2f191}=_0x18ffd8,_0x14df18=_0xbdaad6[0x0];if(!_0x14df18)return console['error'](a32_0x108e3e[_0x4e7ce6(0x246)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0x4e7ce6(0x2b9)](_0x4e7ce6(0x225)),console[_0x4e7ce6(0x2b9)](a32_0x108e3e[_0x4e7ce6(0x232)](_0x4e7ce6(0x3b5))),0x1;_0x1a5814[_0x4e7ce6(0x399)]&&(console['error'](_0x4e7ce6(0x1f9)+_0x1a5814['site']),console['error'](_0x4e7ce6(0x1ea)+_0x14df18));const _0x1738cf=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x14df18+_0x4e7ce6(0x3b6),()=>_0xc2f191[_0x4e7ce6(0x21b)][_0x4e7ce6(0x292)](_0x14df18),{'verbose':_0x1a5814[_0x4e7ce6(0x399)]}),_0x4a948e=_0x1738cf[_0x4e7ce6(0x207)];console[_0x4e7ce6(0x2b9)](_0x4e7ce6(0x324)+_0x4a948e[_0x4e7ce6(0x238)]+'\x27');if(_0x1a5814[_0x4e7ce6(0x3fc)]===_0x4e7ce6(0x250)||_0x1a5814[_0x4e7ce6(0x3fc)]===_0x4e7ce6(0x1da))await handleSDKOutput([_0x4a948e],_0x1a5814);else{const _0x436f8c=_0x4a948e[_0x4e7ce6(0x29d)]===_0x4e7ce6(0x23a)?'🚀':'📝',_0x562c3f=_0x4a948e['paused']?a32_0x108e3e[_0x4e7ce6(0x1e6)](_0x4e7ce6(0x2d4)):'';console[_0x4e7ce6(0x20d)](_0x436f8c+'\x20'+_0x4a948e['name']+_0x562c3f);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a32_0x15c085(0x3b0);[a32_0x15c085(0x312)]=a32_0x15c085(0x2f8);async[a32_0x15c085(0x26a)](_0x5d5f04){const _0x33172f=a32_0x15c085,{options:_0x2c9d69,args:_0x3f3cec,tdx:_0x485c72}=_0x5d5f04,_0x2349d6=_0x3f3cec[0x0]||_0x2c9d69[_0x33172f(0x2d0)];if(!_0x2349d6)return showParentSegmentNotSetError('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'+_0x33172f(0x308)),0x1;_0x2c9d69[_0x33172f(0x399)]&&(console[_0x33172f(0x2b9)]('Site:\x20'+_0x2c9d69['site']),console[_0x33172f(0x2b9)](_0x33172f(0x1f4)+_0x2349d6));const _0x11da5d=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x2349d6+_0x33172f(0x3b6),()=>_0x485c72[_0x33172f(0x213)]['resolveParentId'](_0x2349d6),{'verbose':_0x2c9d69[_0x33172f(0x399)]}),_0x169a91=_0x11da5d['data'],_0x194d7d=await withSpinner(_0x33172f(0x277)+_0x2349d6+'\x27...',()=>_0x485c72['realtime'][_0x33172f(0x329)](_0x169a91),{'verbose':_0x2c9d69[_0x33172f(0x399)]}),_0x44226d=_0x194d7d[_0x33172f(0x207)];return console['error'](_0x33172f(0x3fd)),_0x2c9d69['format']===_0x33172f(0x250)||_0x2c9d69['format']===_0x33172f(0x1da)?await handleSDKOutput([_0x44226d],_0x2c9d69):(console[_0x33172f(0x20d)]('id:\x20'+_0x44226d['id']),console[_0x33172f(0x20d)](_0x33172f(0x38a)+_0x44226d['audienceId']),console['log'](_0x33172f(0x37d)+_0x44226d[_0x33172f(0x264)]),console[_0x33172f(0x20d)]('eventKind:\x20'+_0x44226d[_0x33172f(0x26d)]),console[_0x33172f(0x20d)](_0x33172f(0x233)+_0x44226d['status'])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x3a1);[a32_0x15c085(0x312)]=a32_0x15c085(0x306);async[a32_0x15c085(0x26a)](_0xf21455){const _0x25db14=a32_0x15c085,{options:_0xa05e66,args:_0x24f6a1,tdx:_0x341f79}=_0xf21455,_0x155b42=_0x24f6a1[0x0]||_0xa05e66[_0x25db14(0x2d0)];if(!_0x155b42)return showParentSegmentNotSetError(_0x25db14(0x368)+_0x25db14(0x3ea)),0x1;const _0x14423d=await withSpinner(_0x25db14(0x2af)+_0x155b42+_0x25db14(0x3b6),()=>_0x341f79[_0x25db14(0x213)][_0x25db14(0x28d)](_0x155b42),{'verbose':_0xa05e66[_0x25db14(0x399)]}),_0xb3767a=_0x14423d[_0x25db14(0x207)],_0x23bb6b=await withSpinner(_0x25db14(0x3c0)+_0x155b42+_0x25db14(0x3b6),()=>_0x341f79[_0x25db14(0x237)]['list'](_0xb3767a),{'verbose':_0xa05e66[_0x25db14(0x399)]}),_0x56137b=_0x23bb6b[_0x25db14(0x207)];console[_0x25db14(0x2b9)]('✔\x20Found\x20'+_0x56137b['length']+_0x25db14(0x3e5)+(_0x56137b[_0x25db14(0x2f7)]!==0x1?'s':''));if(_0xa05e66[_0x25db14(0x3fc)]===_0x25db14(0x250)||_0xa05e66[_0x25db14(0x3fc)]===_0x25db14(0x1da))await handleSDKOutput(_0x56137b,_0xa05e66);else{if(_0x56137b[_0x25db14(0x2f7)]===0x0)console['log'](_0x25db14(0x2b1)),console[_0x25db14(0x2b9)](a32_0x108e3e[_0x25db14(0x2a1)](_0x25db14(0x1f8)));else for(const _0x3e6125 of _0x56137b){console[_0x25db14(0x20d)](a32_0x108e3e['bold'](_0x3e6125[_0x25db14(0x238)])+'\x20'+a32_0x108e3e[_0x25db14(0x232)](_0x25db14(0x262)+_0x3e6125['id']+')'));_0x3e6125['description']&&console[_0x25db14(0x20d)]('\x20\x20'+a32_0x108e3e['dim'](_0x3e6125[_0x25db14(0x312)]));if(_0x3e6125[_0x25db14(0x216)]&&_0x3e6125[_0x25db14(0x216)][_0x25db14(0x2f7)]>0x0)for(const _0x4c9d96 of _0x3e6125[_0x25db14(0x216)]){const _0x4af24c=_0x4c9d96[_0x25db14(0x29f)]?.[_0x25db14(0x2f7)]?_0x4c9d96[_0x25db14(0x29f)][_0x25db14(0x3bc)](',\x20'):_0x25db14(0x2b6);console[_0x25db14(0x20d)]('\x20\x20'+a32_0x108e3e['cyan'](_0x25db14(0x2d3))+'\x20'+_0x4c9d96[_0x25db14(0x238)]+'\x20'+a32_0x108e3e['dim'](_0x25db14(0x262)+_0x4c9d96['id']+')')),console['log'](_0x25db14(0x362)+a32_0x108e3e['dim'](_0x25db14(0x206))+'\x20'+_0x4af24c);}else console[_0x25db14(0x20d)]('\x20\x20'+a32_0x108e3e[_0x25db14(0x232)](_0x25db14(0x358)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x21e);[a32_0x15c085(0x312)]=a32_0x15c085(0x334);async['execute'](_0x562fb9){const _0x8e2f46=a32_0x15c085,{options:_0x21c433,args:_0x43dc7d,tdx:_0x386b1f}=_0x562fb9,_0x1c1f84=_0x21c433,_0x4bc7c2=_0x43dc7d[0x0],_0x4bddfc=_0x43dc7d[0x1]||_0x21c433[_0x8e2f46(0x2d0)];if(!_0x4bc7c2)return console[_0x8e2f46(0x2b9)](_0x8e2f46(0x3e9)),console[_0x8e2f46(0x2b9)](_0x8e2f46(0x2e8)),console[_0x8e2f46(0x2b9)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x4bddfc)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a'+_0x8e2f46(0x2ab)),0x1;const _0x411413=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x4bddfc+_0x8e2f46(0x3b6),()=>_0x386b1f[_0x8e2f46(0x213)][_0x8e2f46(0x28d)](_0x4bddfc),{'verbose':_0x21c433[_0x8e2f46(0x399)]}),_0x162813=_0x411413[_0x8e2f46(0x207)],_0xe48e1b={'name':_0x4bc7c2,'description':_0x1c1f84['description'],'public':_0x1c1f84[_0x8e2f46(0x285)]},_0x127180=await withSpinner(_0x8e2f46(0x319)+_0x4bc7c2+'\x27...',()=>_0x386b1f['personalization']['create'](_0x162813,_0xe48e1b),{'verbose':_0x21c433['verbose']}),_0x4caaeb=_0x127180['data'];return console['error'](_0x8e2f46(0x274)+_0x4caaeb[_0x8e2f46(0x238)]+_0x8e2f46(0x385)+_0x4caaeb['id']),await handleSDKOutput([_0x4caaeb],_0x21c433),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a32_0x15c085(0x238)]='ps:pz:service:show';['description']=a32_0x15c085(0x394);async[a32_0x15c085(0x26a)](_0x157ee9){const _0x5c5629=a32_0x15c085,{options:_0x3de01f,args:_0x5c6656,tdx:_0x3b8314}=_0x157ee9,_0x12be77=_0x5c6656[0x0],_0xd91de3=_0x5c6656[0x1]||_0x3de01f['parentSegment'];if(!_0x12be77)return console[_0x5c5629(0x2b9)](_0x5c5629(0x255)),console['error'](_0x5c5629(0x1e0)),console[_0x5c5629(0x2b9)](_0x5c5629(0x209)),0x1;if(!_0xd91de3)return showParentSegmentNotSetError(_0x5c5629(0x25f)+_0x5c5629(0x209)),0x1;const _0x4d472b=await withSpinner(_0x5c5629(0x2af)+_0xd91de3+'\x27...',()=>_0x3b8314[_0x5c5629(0x213)][_0x5c5629(0x28d)](_0xd91de3),{'verbose':_0x3de01f['verbose']}),_0x2d9db5=_0x4d472b[_0x5c5629(0x207)],_0x1bb1b6=await withSpinner(_0x5c5629(0x315)+_0x12be77+'\x27...',()=>_0x3b8314[_0x5c5629(0x237)]['get'](_0x2d9db5,_0x12be77),{'verbose':_0x3de01f[_0x5c5629(0x399)]}),_0x3e5ea5=_0x1bb1b6[_0x5c5629(0x207)];if(_0x3de01f[_0x5c5629(0x250)]||_0x3de01f[_0x5c5629(0x1da)])await handleSDKOutput([_0x3e5ea5],_0x3de01f);else{console['log'](a32_0x108e3e[_0x5c5629(0x1dd)](_0x3e5ea5[_0x5c5629(0x238)])+'\x20'+a32_0x108e3e['dim']('(id:\x20'+_0x3e5ea5['id']+')'));_0x3e5ea5[_0x5c5629(0x312)]&&console[_0x5c5629(0x20d)]('\x20\x20'+a32_0x108e3e['dim'](_0x3e5ea5['description']));console[_0x5c5629(0x20d)]('\x20\x20'+a32_0x108e3e['cyan'](_0x5c5629(0x2d1))+'\x20'+(_0x3e5ea5[_0x5c5629(0x285)]?_0x5c5629(0x303):'no'));if(_0x3e5ea5[_0x5c5629(0x216)]&&_0x3e5ea5['tokens'][_0x5c5629(0x2f7)]>0x0)for(const _0x4b4feb of _0x3e5ea5['tokens']){const _0x483be8=_0x4b4feb['allowedIps']?.[_0x5c5629(0x2f7)]?_0x4b4feb[_0x5c5629(0x29f)][_0x5c5629(0x3bc)](',\x20'):_0x5c5629(0x2b6);console['log']('\x20\x20'+a32_0x108e3e[_0x5c5629(0x2a1)](_0x5c5629(0x2d3))+'\x20'+_0x4b4feb[_0x5c5629(0x238)]+'\x20'+a32_0x108e3e[_0x5c5629(0x232)](_0x5c5629(0x262)+_0x4b4feb['id']+')')),console['log'](_0x5c5629(0x362)+a32_0x108e3e[_0x5c5629(0x232)](_0x5c5629(0x206))+'\x20'+_0x483be8);}else console[_0x5c5629(0x20d)]('\x20\x20'+a32_0x108e3e['dim']('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x2cb);['description']=a32_0x15c085(0x3d1);async[a32_0x15c085(0x26a)](_0x13eab3){const _0x1f0ada=a32_0x15c085,{options:_0x48712e,args:_0x4b3d34,tdx:_0x17d7a4}=_0x13eab3,_0x1bd5af=_0x4b3d34[0x0],_0x2a936a=_0x4b3d34[0x1]||_0x48712e[_0x1f0ada(0x2d0)];if(!_0x1bd5af)return console[_0x1f0ada(0x2b9)](_0x1f0ada(0x255)),console[_0x1f0ada(0x2b9)](_0x1f0ada(0x2a6)),console[_0x1f0ada(0x2b9)](_0x1f0ada(0x3ab)),0x1;if(!_0x2a936a)return showParentSegmentNotSetError(_0x1f0ada(0x3d6)+_0x1f0ada(0x3ab)),0x1;const _0x5e3009=await withSpinner(_0x1f0ada(0x2af)+_0x2a936a+'\x27...',()=>_0x17d7a4[_0x1f0ada(0x213)][_0x1f0ada(0x28d)](_0x2a936a),{'verbose':_0x48712e[_0x1f0ada(0x399)]}),_0x1551b5=_0x5e3009['data'];return await withSpinner(_0x1f0ada(0x271)+_0x1bd5af+_0x1f0ada(0x3b6),()=>_0x17d7a4['personalization'][_0x1f0ada(0x3e0)](_0x1551b5,_0x1bd5af),{'verbose':_0x48712e['verbose']}),console[_0x1f0ada(0x2b9)](_0x1f0ada(0x322)+_0x1bd5af+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{['name']=a32_0x15c085(0x27e);[a32_0x15c085(0x312)]=a32_0x15c085(0x3fe);async['execute'](_0x48c329){const _0x5307aa=a32_0x15c085,{options:_0x86f7fa,args:_0x452bbe,tdx:_0xb09b39}=_0x48c329,_0x2d1fea=_0x86f7fa,_0x3f8713=_0x452bbe[0x0],_0x21d61f=_0x452bbe[0x1]||_0x86f7fa['parentSegment'];if(!_0x3f8713)return console[_0x5307aa(0x2b9)](_0x5307aa(0x255)),console[_0x5307aa(0x2b9)](_0x5307aa(0x395)),console['error'](_0x5307aa(0x33d)),0x1;if(!_0x2d1fea[_0x5307aa(0x238)])return console['error'](_0x5307aa(0x27c)),console[_0x5307aa(0x2b9)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),0x1;if(!_0x21d61f)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a'+_0x5307aa(0x33d)),0x1;const _0x3492a0=await withSpinner(_0x5307aa(0x2af)+_0x21d61f+'\x27...',()=>_0xb09b39['segment'][_0x5307aa(0x28d)](_0x21d61f),{'verbose':_0x86f7fa[_0x5307aa(0x399)]}),_0x3958a7=_0x3492a0[_0x5307aa(0x207)],_0x5371b5={'name':_0x2d1fea[_0x5307aa(0x238)]};_0x2d1fea[_0x5307aa(0x312)]!==undefined&&(_0x5371b5[_0x5307aa(0x312)]=_0x2d1fea[_0x5307aa(0x312)]);const _0xa4f3bf=await withSpinner(_0x5307aa(0x31a)+_0x3f8713+_0x5307aa(0x3b6),()=>_0xb09b39[_0x5307aa(0x237)][_0x5307aa(0x388)](_0x3958a7,_0x3f8713,_0x5371b5),{'verbose':_0x86f7fa[_0x5307aa(0x399)]}),_0x4018af=_0xa4f3bf['data'];return console[_0x5307aa(0x2b9)](_0x5307aa(0x1db)+_0x4018af[_0x5307aa(0x238)]+'\x27'),await handleSDKOutput([_0x4018af],_0x86f7fa),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{['name']=a32_0x15c085(0x2b3);[a32_0x15c085(0x312)]=a32_0x15c085(0x1d5);async[a32_0x15c085(0x26a)](_0x1a5cbb){const _0xfb5c72=a32_0x15c085,{options:_0xfd78bd,args:_0x95e288,tdx:_0x48c5af}=_0x1a5cbb,_0x4a5a3d=_0xfd78bd,_0x2ebab0=_0x95e288[0x0],_0x3e8729=_0x95e288[0x1],_0x5a8aff=_0x95e288[0x2]||_0xfd78bd[_0xfb5c72(0x2d0)];if(!_0x2ebab0)return console[_0xfb5c72(0x2b9)]('Error:\x20Token\x20name\x20is\x20required'),console[_0xfb5c72(0x2b9)](_0xfb5c72(0x3a0)),console['error'](_0xfb5c72(0x24a)),0x1;if(!_0x3e8729)return console[_0xfb5c72(0x2b9)]('Error:\x20Service\x20ID\x20is\x20required'),console['error'](_0xfb5c72(0x3a0)),console[_0xfb5c72(0x2b9)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x5a8aff)return showParentSegmentNotSetError(_0xfb5c72(0x290)+_0xfb5c72(0x24a)),0x1;const _0x355513=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x5a8aff+_0xfb5c72(0x3b6),()=>_0x48c5af[_0xfb5c72(0x213)][_0xfb5c72(0x28d)](_0x5a8aff),{'verbose':_0xfd78bd['verbose']}),_0x3a442b=_0x355513[_0xfb5c72(0x207)],_0x71871a={'name':_0x2ebab0};_0x4a5a3d[_0xfb5c72(0x29f)]&&(_0x71871a[_0xfb5c72(0x29f)]=_0x4a5a3d[_0xfb5c72(0x29f)][_0xfb5c72(0x2d7)](',')[_0xfb5c72(0x2ad)](_0x54238e=>_0x54238e[_0xfb5c72(0x2ef)]()));_0x4a5a3d[_0xfb5c72(0x312)]&&(_0x71871a['description']=_0x4a5a3d[_0xfb5c72(0x312)]);const _0x2e5784=await withSpinner(_0xfb5c72(0x311)+_0x2ebab0+_0xfb5c72(0x326)+_0x3e8729+_0xfb5c72(0x3b6),()=>_0x48c5af['personalization']['createToken'](_0x3a442b,_0x3e8729,_0x71871a),{'verbose':_0xfd78bd['verbose']}),_0x460625=_0x2e5784[_0xfb5c72(0x207)];return console[_0xfb5c72(0x2b9)](_0xfb5c72(0x212)+_0x460625['name']+_0xfb5c72(0x385)+_0x460625['id']),_0x460625[_0xfb5c72(0x357)]&&(console[_0xfb5c72(0x2b9)](a32_0x108e3e[_0xfb5c72(0x1e6)](_0xfb5c72(0x305))),console[_0xfb5c72(0x2b9)](a32_0x108e3e[_0xfb5c72(0x2a1)](_0x460625[_0xfb5c72(0x357)])),console[_0xfb5c72(0x2b9)]('')),await handleSDKOutput([_0x460625],_0xfd78bd),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x260);[a32_0x15c085(0x312)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async['execute'](_0x267be2){const _0x3c25f5=a32_0x15c085,{options:_0x1052df,args:_0x1ea78a,tdx:_0x8208a1}=_0x267be2,_0x2f3a29=_0x1ea78a[0x0],_0x32b9ff=_0x1ea78a[0x1]||_0x1052df[_0x3c25f5(0x2d0)];if(!_0x2f3a29)return console[_0x3c25f5(0x2b9)](_0x3c25f5(0x2b2)),console[_0x3c25f5(0x2b9)](_0x3c25f5(0x289)),console['error'](_0x3c25f5(0x34d)),0x1;if(!_0x32b9ff)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a'+_0x3c25f5(0x34d)),0x1;const _0x3f8196=await withSpinner(_0x3c25f5(0x2af)+_0x32b9ff+'\x27...',()=>_0x8208a1[_0x3c25f5(0x213)]['resolveParentId'](_0x32b9ff),{'verbose':_0x1052df[_0x3c25f5(0x399)]}),_0xcb4a7c=_0x3f8196[_0x3c25f5(0x207)],_0x2487ee=await withSpinner(_0x3c25f5(0x2d9),()=>_0x8208a1[_0x3c25f5(0x237)][_0x3c25f5(0x3d0)](_0xcb4a7c),{'verbose':_0x1052df[_0x3c25f5(0x399)]}),_0x28503f=_0x2487ee[_0x3c25f5(0x207)];let _0x24a7d5;for(const _0x22cf29 of _0x28503f){if(_0x22cf29[_0x3c25f5(0x216)]?.['some'](_0x18f8d9=>_0x18f8d9['id']===_0x2f3a29)){_0x24a7d5=_0x22cf29['id'];break;}}if(!_0x24a7d5)return console[_0x3c25f5(0x2b9)](_0x3c25f5(0x2be)+_0x2f3a29+_0x3c25f5(0x38e)),0x1;const _0x3b6701=await withSpinner(_0x3c25f5(0x34e)+_0x2f3a29+'\x27...',()=>_0x8208a1['personalization']['deleteToken'](_0xcb4a7c,_0x24a7d5,_0x2f3a29),{'verbose':_0x1052df[_0x3c25f5(0x399)]}),_0x31795c=_0x3b6701[_0x3c25f5(0x207)];return console[_0x3c25f5(0x2b9)]('✔\x20Deleted\x20token\x20\x27'+(_0x31795c[_0x3c25f5(0x238)]||_0x2f3a29)+'\x27'),await handleSDKOutput([_0x31795c],_0x1052df),0x0;}}export class PSPzListCommand extends BaseCommand{['name']=a32_0x15c085(0x27d);[a32_0x15c085(0x312)]=a32_0x15c085(0x2fa);async['execute'](_0x551886){const _0xf678db=a32_0x15c085,{options:_0x3f5722,args:_0x5983d8,tdx:_0x2366fe}=_0x551886,_0x28cf7b=_0x5983d8[0x0]||_0x3f5722['parentSegment'];if(!_0x28cf7b)return showParentSegmentNotSetError(_0xf678db(0x278)+_0xf678db(0x314)),0x1;const _0x19c45a=await withSpinner(_0xf678db(0x2af)+_0x28cf7b+'\x27...',()=>_0x2366fe[_0xf678db(0x213)][_0xf678db(0x28d)](_0x28cf7b),{'verbose':_0x3f5722[_0xf678db(0x399)]}),_0x1b5972=_0x19c45a[_0xf678db(0x207)],_0x3e69ef=await withSpinner('Listing\x20personalizations\x20for\x20\x27'+_0x28cf7b+'\x27...',()=>_0x2366fe[_0xf678db(0x237)][_0xf678db(0x379)](_0x1b5972),{'verbose':_0x3f5722[_0xf678db(0x399)]}),_0x5baa4b=_0x3e69ef[_0xf678db(0x207)];console[_0xf678db(0x2b9)](_0xf678db(0x27b)+_0x5baa4b[_0xf678db(0x2f7)]+_0xf678db(0x39b)+(_0x5baa4b['length']!==0x1?'s':''));if(_0x3f5722[_0xf678db(0x3fc)]===_0xf678db(0x250)||_0x3f5722[_0xf678db(0x3fc)]===_0xf678db(0x1da))await handleSDKOutput(_0x5baa4b,_0x3f5722);else{if(_0x5baa4b[_0xf678db(0x2f7)]===0x0)console[_0xf678db(0x20d)](_0xf678db(0x3be));else for(const _0x3e3a9f of _0x5baa4b){console[_0xf678db(0x20d)](a32_0x108e3e['bold'](_0x3e3a9f[_0xf678db(0x238)])+'\x20'+a32_0x108e3e['dim'](_0xf678db(0x262)+_0x3e3a9f['id']+')'));_0x3e3a9f[_0xf678db(0x312)]&&console[_0xf678db(0x20d)]('\x20\x20'+a32_0x108e3e[_0xf678db(0x232)](_0x3e3a9f[_0xf678db(0x312)]));const _0x22c415=_0x3e3a9f[_0xf678db(0x1ff)]?.['length']||0x0;console['log']('\x20\x20'+a32_0x108e3e[_0xf678db(0x2a1)](_0xf678db(0x2ac))+'\x20'+_0x22c415);if(_0x3e3a9f[_0xf678db(0x1ff)]&&_0x3e3a9f['sections'][_0xf678db(0x2f7)]>0x0)for(const _0x16d889 of _0x3e3a9f[_0xf678db(0x1ff)]){console['log'](_0xf678db(0x2ea)+_0x16d889[_0xf678db(0x238)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x325);[a32_0x15c085(0x312)]=a32_0x15c085(0x2a7);async[a32_0x15c085(0x26a)](_0x52196d){const _0xeecb27=a32_0x15c085,{options:_0x524a56,args:_0x3ea88d,tdx:_0xe4be41}=_0x52196d,_0x5c50dd=_0x3ea88d[0x0];if(!_0x5c50dd)return console[_0xeecb27(0x2b9)](_0xeecb27(0x3a6)),console['error'](_0xeecb27(0x387)),0x1;const _0x47fc1d=await withSpinner(_0xeecb27(0x3e2)+_0x5c50dd+_0xeecb27(0x3b6),()=>_0xe4be41['personalization'][_0xeecb27(0x317)](_0x5c50dd),{'verbose':_0x524a56[_0xeecb27(0x399)]}),_0x512eb6=_0x47fc1d['data'];console['error'](_0xeecb27(0x30e)+_0x512eb6['name']+'\x27');if(_0x524a56['format']===_0xeecb27(0x250)||_0x524a56[_0xeecb27(0x3fc)]==='jsonl')await handleSDKOutput([_0x512eb6],_0x524a56);else{console[_0xeecb27(0x20d)](a32_0x108e3e[_0xeecb27(0x1dd)](_0x512eb6['name'])+'\x20'+a32_0x108e3e[_0xeecb27(0x232)](_0xeecb27(0x262)+_0x512eb6['id']+')'));_0x512eb6[_0xeecb27(0x312)]&&console['log']('\x20\x20'+a32_0x108e3e[_0xeecb27(0x232)](_0x512eb6[_0xeecb27(0x312)]));_0x512eb6[_0xeecb27(0x349)]&&console[_0xeecb27(0x20d)]('\x20\x20'+a32_0x108e3e[_0xeecb27(0x2a1)]('audienceId:')+'\x20'+_0x512eb6['audienceId']);console[_0xeecb27(0x20d)]('\x20\x20'+a32_0x108e3e[_0xeecb27(0x2a1)](_0xeecb27(0x35b))+'\x20'+_0x512eb6[_0xeecb27(0x301)]),console[_0xeecb27(0x20d)]('\x20\x20'+a32_0x108e3e['cyan']('updated:')+'\x20'+_0x512eb6[_0xeecb27(0x287)]);const _0x2d5e31=_0x512eb6['sections']?.[_0xeecb27(0x2f7)]||0x0;console['log']('\x20\x20'+a32_0x108e3e[_0xeecb27(0x2a1)]('sections:')+'\x20'+_0x2d5e31);if(_0x512eb6[_0xeecb27(0x1ff)]&&_0x512eb6['sections'][_0xeecb27(0x2f7)]>0x0)for(const _0x226482 of _0x512eb6['sections']){console['log']('\x20\x20\x20\x20'+a32_0x108e3e[_0xeecb27(0x1dd)](_0x226482[_0xeecb27(0x238)])+'\x20'+a32_0x108e3e['dim'](_0xeecb27(0x262)+_0x226482['id']+')')),_0x226482['entryCriteria']&&(console[_0xeecb27(0x20d)]('\x20\x20\x20\x20\x20\x20'+a32_0x108e3e[_0xeecb27(0x2a1)](_0xeecb27(0x272))+'\x20'+_0x226482['entryCriteria'][_0xeecb27(0x238)]),_0x226482['entryCriteria']['keyEventCriteria']?.[_0xeecb27(0x3da)]&&console[_0xeecb27(0x20d)](_0xeecb27(0x365)+a32_0x108e3e[_0xeecb27(0x2a1)](_0xeecb27(0x33e))+'\x20'+_0x226482['entryCriteria'][_0xeecb27(0x2a5)][_0xeecb27(0x3da)])),_0x226482[_0xeecb27(0x3b2)]&&console[_0xeecb27(0x20d)]('\x20\x20\x20\x20\x20\x20'+a32_0x108e3e['cyan']('payload:')+'\x20'+JSON[_0xeecb27(0x205)](_0x226482[_0xeecb27(0x3b2)])),_0x226482[_0xeecb27(0x35e)]&&console['log'](_0xeecb27(0x3bd)+a32_0x108e3e[_0xeecb27(0x2a1)](_0xeecb27(0x27f))+_0xeecb27(0x29b));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a32_0x15c085(0x238)]=a32_0x15c085(0x3e7);[a32_0x15c085(0x312)]=a32_0x15c085(0x31b);async[a32_0x15c085(0x26a)](_0x241579){const _0x28b5bb=a32_0x15c085,{options:_0x52784d,args:_0x29b0ed,tdx:_0xf68afb}=_0x241579,_0x512150=_0x29b0ed[0x0];if(!_0x512150)return console[_0x28b5bb(0x2b9)](_0x28b5bb(0x3a6)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>'),0x1;return await withSpinner(_0x28b5bb(0x279)+_0x512150+_0x28b5bb(0x3b6),()=>_0xf68afb[_0x28b5bb(0x237)][_0x28b5bb(0x380)](_0x512150),{'verbose':_0x52784d[_0x28b5bb(0x399)]}),console[_0x28b5bb(0x2b9)](_0x28b5bb(0x366)+_0x512150+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{['name']='ps:pz:create';[a32_0x15c085(0x312)]=a32_0x15c085(0x3d9);async[a32_0x15c085(0x26a)](_0x40f2ea){const _0x4c3960=a32_0x15c085,{options:_0x580824,tdx:_0x4c9ada}=_0x40f2ea,_0x46bd9b=_0x580824;let _0x4083f7;if(_0x46bd9b['file']){_0x4083f7=await loadJSON(_0x46bd9b[_0x4c3960(0x39d)],!![]);if(!_0x4083f7[_0x4c3960(0x343)]?.[_0x4c3960(0x33b)])return console[_0x4c3960(0x2b9)](_0x4c3960(0x3f2)),console[_0x4c3960(0x2b9)](_0x4c3960(0x2ba)),console[_0x4c3960(0x2b9)]('\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(!_0x46bd9b['name'])return console[_0x4c3960(0x2b9)](_0x4c3960(0x3dd)),console['error'](_0x4c3960(0x2bd)),console['error'](_0x4c3960(0x1d8)),0x1;if(_0x46bd9b[_0x4c3960(0x312)]===undefined)return console[_0x4c3960(0x2b9)](_0x4c3960(0x35a)),console[_0x4c3960(0x2b9)](_0x4c3960(0x2bd)),console[_0x4c3960(0x2b9)](_0x4c3960(0x1d8)),0x1;if(_0x46bd9b[_0x4c3960(0x22e)]===undefined)return console[_0x4c3960(0x2b9)](_0x4c3960(0x2f5)),console[_0x4c3960(0x2b9)](_0x4c3960(0x1e8)),0x1;let _0x3ca92a=_0x46bd9b[_0x4c3960(0x349)];if(!_0x3ca92a&&_0x580824['parentSegment']){const _0x100881=await withSpinner(_0x4c3960(0x2af)+_0x580824[_0x4c3960(0x2d0)]+_0x4c3960(0x3b6),()=>_0x4c9ada[_0x4c3960(0x213)][_0x4c3960(0x28d)](_0x580824[_0x4c3960(0x2d0)]),{'verbose':_0x580824[_0x4c3960(0x399)]});_0x3ca92a=_0x100881[_0x4c3960(0x207)];}let _0x698842;_0x46bd9b[_0x4c3960(0x1ff)]&&(_0x698842=await loadJSON(_0x46bd9b['sections'],![]));const _0x2df516=_0x46bd9b['folderId']===_0x4c3960(0x354)?null:{'id':_0x46bd9b[_0x4c3960(0x22e)],'type':_0x4c3960(0x23d)};_0x4083f7={'attributes':{'name':_0x46bd9b['name'],'description':_0x46bd9b[_0x4c3960(0x312)]||null,..._0x3ca92a!==undefined&&{'audienceId':_0x3ca92a},..._0x698842!==undefined&&{'sections':_0x698842}},'relationships':{'parentFolder':{'data':_0x2df516}}};}const _0x339cfd=await withSpinner(_0x4c3960(0x240)+(_0x4083f7['attributes']?.[_0x4c3960(0x238)]??'')+_0x4c3960(0x3b6),()=>_0x4c9ada['personalization'][_0x4c3960(0x2ee)](_0x4083f7),{'verbose':_0x580824[_0x4c3960(0x399)]}),_0x62916e=_0x339cfd[_0x4c3960(0x207)];return console[_0x4c3960(0x2b9)](_0x4c3960(0x243)+_0x62916e[_0x4c3960(0x238)]+'\x27\x20with\x20ID:\x20'+_0x62916e['id']),await handleSDKOutput([_0x62916e],_0x580824),0x0;}}export class PSPzPatchCommand extends BaseCommand{['name']='ps:pz:patch';['description']=a32_0x15c085(0x374);async['execute'](_0x3a17c8){const _0x3690f7=a32_0x15c085,{options:_0x59107e,args:_0x32d7b5}=_0x3a17c8,_0x55b5b6=_0x59107e,_0x235e30=_0x32d7b5[0x0];if(!_0x235e30)return console['error'](_0x3690f7(0x3a6)),console[_0x3690f7(0x2b9)](_0x3690f7(0x3e8)),console[_0x3690f7(0x2b9)](_0x3690f7(0x3ac)),0x1;let _0x3e9250;if(_0x55b5b6[_0x3690f7(0x39d)])_0x3e9250=await loadJSON(_0x55b5b6[_0x3690f7(0x39d)],!![]);else{if(!_0x55b5b6[_0x3690f7(0x238)])return console[_0x3690f7(0x2b9)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x3690f7(0x2b9)](_0x3690f7(0x3e8)),0x1;if(_0x55b5b6[_0x3690f7(0x312)]===undefined)return console[_0x3690f7(0x2b9)](_0x3690f7(0x35a)),console[_0x3690f7(0x2b9)](_0x3690f7(0x3e8)),0x1;let _0x7419e8;_0x55b5b6[_0x3690f7(0x1ff)]&&(_0x7419e8=await loadJSON(_0x55b5b6[_0x3690f7(0x1ff)],![])),_0x3e9250={'attributes':{'name':_0x55b5b6['name'],'description':_0x55b5b6[_0x3690f7(0x312)]||null,..._0x7419e8!==undefined&&{'sections':_0x7419e8}}};}const {tdx:_0xe75fc2}=_0x3a17c8,_0x315ce8=await withSpinner(_0x3690f7(0x24f)+_0x235e30+_0x3690f7(0x3b6),()=>_0xe75fc2['personalization']['patchPersonalization'](_0x235e30,_0x3e9250),{'verbose':_0x59107e[_0x3690f7(0x399)]}),_0x499ecc=_0x315ce8[_0x3690f7(0x207)];return console[_0x3690f7(0x2b9)](_0x3690f7(0x2cd)+_0x499ecc[_0x3690f7(0x238)]+_0x3690f7(0x3c6)+_0x499ecc['id']+')'),await handleSDKOutput([_0x499ecc],_0x59107e),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']=a32_0x15c085(0x2c2);[a32_0x15c085(0x312)]=a32_0x15c085(0x2bf);async[a32_0x15c085(0x26a)](_0x468bbc){const _0x452498=a32_0x15c085,{options:_0xdfed51,args:_0x4d0767}=_0x468bbc,_0xd67837=_0x4d0767[0x0]||_0xdfed51[_0x452498(0x2d0)];if(!_0xd67837)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'+_0x452498(0x2d2)),0x1;const _0x199208=resolveYamlFile(_0xd67837);if(!existsSync(_0x199208))return showFileNotFoundError(_0x199208,_0xd67837),0x1;let _0x3d7d6d;try{_0x3d7d6d=readFileSync(_0x199208,_0x452498(0x257));}catch(_0x40464a){const _0x557042=_0x40464a instanceof Error?_0x40464a['message']:String(_0x40464a);return console['error'](_0x452498(0x335)+_0x557042),0x1;}let _0x512338;try{_0x512338=parseDef(_0x3d7d6d);}catch(_0x289593){const _0x31408d=_0x289593 instanceof Error?_0x289593[_0x452498(0x2bc)]:String(_0x289593);return console[_0x452498(0x2b9)](a32_0x108e3e[_0x452498(0x246)](_0x452498(0x299)+_0x31408d)),0x1;}if(_0x512338[_0x452498(0x378)]&&_0x512338[_0x452498(0x378)][_0x452498(0x2f7)]>0x0)return console[_0x452498(0x2b9)](a32_0x108e3e[_0x452498(0x1e6)](_0x452498(0x1d7)+_0x199208)),console[_0x452498(0x2b9)](a32_0x108e3e[_0x452498(0x232)](_0x452498(0x3c7)+_0x512338[_0x452498(0x378)]['length']+_0x452498(0x2c7))),0x1;!_0x512338[_0x452498(0x21b)]&&(_0x512338[_0x452498(0x21b)]={'events':[{'name':_0x452498(0x363),'source_table':_0x452498(0x337)}],'attributes':[{'name':_0x452498(0x342),'type':_0x452498(0x2a9)}],'id_stitching':{'primary_key':_0x512338['master'][_0x452498(0x352)]==='customers'?_0x452498(0x1df):'user_id'}});_0x512338[_0x452498(0x378)]=[{'name':_0x452498(0x22c),'description':'Personalization\x20service\x20description','trigger_event':_0x452498(0x363),'sections':[{'name':_0x452498(0x28e),'criteria':_0x452498(0x26e),'attributes':['last_page_viewed']}]}];const _0x3cccb3=serializeDef(_0x512338);return writeFileSync(_0x199208,_0x3cccb3,_0x452498(0x257)),console[_0x452498(0x2b9)](a32_0x108e3e[_0x452498(0x3a8)]('✔')+_0x452498(0x23b)+a32_0x108e3e['cyan'](_0x199208)),(!_0x512338[_0x452498(0x21b)]||_0x3d7d6d[_0x452498(0x3cc)](_0x452498(0x3ca))===-0x1)&&console['error'](a32_0x108e3e[_0x452498(0x3a8)]('✔')+_0x452498(0x3b8)),console[_0x452498(0x2b9)]('\x0a'+a32_0x108e3e[_0x452498(0x232)](_0x452498(0x333))),console['error'](_0x452498(0x1e2)+_0x199208+_0x452498(0x360)),console['error'](_0x452498(0x3e3)+a32_0x108e3e[_0x452498(0x232)](_0x452498(0x344)+_0xd67837)+_0x452498(0x398)),0x0;}}
1
+ const a32_0x5ce8d0=a32_0x517d;(function(_0x2a3698,_0x435f32){const _0x530d55=a32_0x517d,_0x5ecfb3=_0x2a3698();while(!![]){try{const _0x299ce3=parseInt(_0x530d55(0x315))/0x1*(-parseInt(_0x530d55(0x2e2))/0x2)+parseInt(_0x530d55(0x2f1))/0x3*(-parseInt(_0x530d55(0x2f7))/0x4)+parseInt(_0x530d55(0x2cd))/0x5+-parseInt(_0x530d55(0x1c1))/0x6*(parseInt(_0x530d55(0x277))/0x7)+parseInt(_0x530d55(0x2fc))/0x8*(parseInt(_0x530d55(0x232))/0x9)+-parseInt(_0x530d55(0x28a))/0xa+-parseInt(_0x530d55(0x19f))/0xb*(-parseInt(_0x530d55(0x2ba))/0xc);if(_0x299ce3===_0x435f32)break;else _0x5ecfb3['push'](_0x5ecfb3['shift']());}catch(_0x379979){_0x5ecfb3['push'](_0x5ecfb3['shift']());}}}(a32_0x5877,0x60cd9));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a32_0x5725f6 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a32_0x2ce214 from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';function a32_0x517d(_0x4df0e6,_0x31f58b){_0x4df0e6=_0x4df0e6-0x182;const _0x58777c=a32_0x5877();let _0x517d57=_0x58777c[_0x4df0e6];return _0x517d57;}const PARENT_SEGMENT_DIR=a32_0x5ce8d0(0x259),LEGACY_PARENT_SEGMENT_DIR='parent_segment';function openBrowser(_0x36c2b3){const _0x3153f1=a32_0x5ce8d0,_0x54d872=process[_0x3153f1(0x286)],_0x4b4a07=_0x54d872===_0x3153f1(0x317)?_0x3153f1(0x1d7):_0x54d872==='win32'?_0x3153f1(0x23e):_0x3153f1(0x1dd);spawn(_0x4b4a07,[_0x36c2b3],{'detached':!![],'stdio':_0x3153f1(0x24b)})[_0x3153f1(0x314)]();}function migrateLegacyDirectory(){const _0x210208=a32_0x5ce8d0;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x41d28f=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x41d28f['isDirectory']())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a32_0x2ce214['yellow']('\x0a⚠️\x20\x20Both\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x210208(0x331)+PARENT_SEGMENT_DIR+_0x210208(0x309))),console[_0x210208(0x310)](a32_0x2ce214['dim'](_0x210208(0x238)+LEGACY_PARENT_SEGMENT_DIR+_0x210208(0x1a3))),![];console[_0x210208(0x310)](a32_0x2ce214['yellow'](_0x210208(0x336)+LEGACY_PARENT_SEGMENT_DIR+'/\x20→\x20'+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console['error'](a32_0x2ce214[_0x210208(0x257)]('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x498795){const _0x13bd1f=_0x498795 instanceof Error?_0x498795['message']:String(_0x498795);return console[_0x210208(0x310)](a32_0x2ce214['red'](_0x210208(0x339)+_0x13bd1f+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a32_0x5ce8d0(0x2e6)](_0xd5633f){const _0x42a3b0=a32_0x5ce8d0;return migrateLegacyDirectory(),super[_0x42a3b0(0x2e6)](_0xd5633f);}}function resolveYamlFile(_0x5ea47){const _0x3a4b07=a32_0x5ce8d0;if(_0x5ea47[_0x3a4b07(0x215)](_0x3a4b07(0x39f))||_0x5ea47['endsWith'](_0x3a4b07(0x1f1)))return _0x5ea47;return a32_0x5725f6['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x5ea47)+_0x3a4b07(0x39f));}function formatProgressMessage(_0x33de1f){const _0x34b1e4=a32_0x5ce8d0,_0x5895b9=_0x33de1f[_0x34b1e4(0x1dc)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x5895b9){const [,_0x314a0f,_0x3acc4f,_0xbf82e4='']=_0x5895b9;return a32_0x2ce214[_0x34b1e4(0x1b3)](_0x314a0f+':')+'\x20'+_0x3acc4f+a32_0x2ce214[_0x34b1e4(0x1b3)](_0xbf82e4);}return a32_0x2ce214[_0x34b1e4(0x1b3)](_0x33de1f);}function showFileNotFoundError(_0x48494f,_0x2ff0b0){const _0x581a76=a32_0x5ce8d0;console['error'](a32_0x2ce214[_0x581a76(0x28b)]('Error:\x20File\x20not\x20found:\x20'+_0x48494f+'\x0a')),console['error'](a32_0x2ce214['cyan'](_0x581a76(0x2ed)+_0x2ff0b0+_0x581a76(0x34c)));}function displayRealtimeValidation(_0x17dab8){const _0xfeb560=a32_0x5ce8d0;if(!_0x17dab8[_0xfeb560(0x187)])return;const _0x112e14=_0x17dab8[_0xfeb560(0x187)],_0x3a88cc=_0x112e14[_0xfeb560(0x300)]?a32_0x2ce214[_0xfeb560(0x257)](_0xfeb560(0x32e)):a32_0x2ce214[_0xfeb560(0x1a7)](_0xfeb560(0x25b));console[_0xfeb560(0x310)]('\x0a'+a32_0x2ce214[_0xfeb560(0x1b3)](_0xfeb560(0x23f))+'\x20'+_0x3a88cc);if(_0x112e14['events']&&_0x112e14[_0xfeb560(0x283)][_0xfeb560(0x18f)]>0x0){console[_0xfeb560(0x310)]('\x20\x20'+a32_0x2ce214['dim']('Events:')+'\x20'+_0x112e14[_0xfeb560(0x283)]['length']+_0xfeb560(0x34e));for(const _0x56679e of _0x112e14[_0xfeb560(0x283)]){const _0x1da03c=_0x56679e[_0xfeb560(0x25f)]===![]?a32_0x2ce214[_0xfeb560(0x28b)]('✘'):a32_0x2ce214[_0xfeb560(0x257)]('✔');console[_0xfeb560(0x310)]('\x20\x20\x20\x20'+_0x1da03c+'\x20'+_0x56679e['name']),_0x56679e[_0xfeb560(0x395)]&&console['error']('\x20\x20\x20\x20\x20\x20'+a32_0x2ce214['red'](_0x56679e[_0xfeb560(0x395)]));}}if(_0x112e14['attributes']&&_0x112e14[_0xfeb560(0x320)][_0xfeb560(0x18f)]>0x0){console[_0xfeb560(0x310)]('\x20\x20'+a32_0x2ce214[_0xfeb560(0x1b3)](_0xfeb560(0x189))+'\x20'+_0x112e14[_0xfeb560(0x320)][_0xfeb560(0x18f)]+_0xfeb560(0x34e));for(const _0x130ac9 of _0x112e14[_0xfeb560(0x320)]){const _0x4c14ca=_0x130ac9[_0xfeb560(0x33f)]?a32_0x2ce214[_0xfeb560(0x257)]('✔'):a32_0x2ce214['red']('✘');console[_0xfeb560(0x310)]('\x20\x20\x20\x20'+_0x4c14ca+'\x20'+_0x130ac9[_0xfeb560(0x387)]+'\x20'+a32_0x2ce214[_0xfeb560(0x1b3)]('('+_0x130ac9[_0xfeb560(0x2ad)]+')'));}}if(_0x112e14[_0xfeb560(0x1c8)]){const _0x1a81ca=_0x112e14['idStitching'][_0xfeb560(0x1c9)]?.['length']?_0xfeb560(0x29f)+_0x112e14[_0xfeb560(0x1c8)]['stitchingKeys']['join'](',\x20')+']':'';console[_0xfeb560(0x310)]('\x20\x20'+a32_0x2ce214['dim'](_0xfeb560(0x2c4))+'\x20'+_0x112e14[_0xfeb560(0x1c8)]['primaryKey']+_0x1a81ca);}if(_0x112e14[_0xfeb560(0x318)]&&_0x112e14[_0xfeb560(0x318)]['length']>0x0){console[_0xfeb560(0x310)]('\x20\x20'+a32_0x2ce214[_0xfeb560(0x1b3)](_0xfeb560(0x2d1))+'\x20'+_0x112e14[_0xfeb560(0x318)][_0xfeb560(0x18f)]+_0xfeb560(0x301)+(_0x112e14[_0xfeb560(0x318)][_0xfeb560(0x18f)]!==0x1?'s':''));for(const _0x574204 of _0x112e14['personalizationServices']){console[_0xfeb560(0x310)](_0xfeb560(0x1b8)+_0x574204[_0xfeb560(0x387)]);}}}function a32_0x5877(){const _0x385b16=['ps:rt:validate','Events:','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','No\x20personalizations\x20configured','Preview:','type','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','deletePersonalization','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','Finding\x20service\x20for\x20token...','segment:parent:create','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','audienceId','\x22,\x20\x22type\x22:\x20\x22','output','addAttributesFile','payload','✔\x20No\x20changes\x20-\x20\x27','11582280fGPeoa','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','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','segment:parent:run','\x20\x20No\x20sample\x20data\x20available','\x0aChanges\x20to\x20\x27','Creating','/sessions/','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','ID\x20Stitching:','reduce','My\x20Service','✔\x20Updated\x20personalization\x20\x27','✔\x20Found\x20personalization\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Join:','\x20--attribute\x20\x22<name>\x22','\x0aChanges\x20to\x20apply\x20to\x20\x27','1296980qHbxJu','👥\x20','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','replace','Personalization:','/attempt/','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','behavior','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','Created','scheduleOption','listFields','✔\x20Created\x20parent\x20segment\x20\x27','Validating\x20configuration...','-1d','Session:','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','keyEventId:','Deleting\x20personalization\x20\x27','\x20--behavior\x20\x22<name>\x22','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','1360174anrlbz','folderId','column_type','displayBehaviorsStats','run','\x27\x20is\x20already\x20up\x20to\x20date','ps:pz:show','YAML\x20file:\x20','\x20to\x20push\x20the\x20configuration','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','\x20=\x20','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','parent_id','To\x20cancel:','pushParentYaml','3fKXwMP','payload:','\x22\x20}','elapsedTimeMillis','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','Fetching\x20sample\x20data...','2607844CiAvOq','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','Fetching\x20personalization\x20service\x20\x27','double','addBehaviorsFile','176iEFXTs','limit','enriched','totalEvents','enabled','\x20service','customersWithEvents','\x0a\x20\x20]\x0a}\x0a','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','sampleData','ps:rt:jn:list','entryCriteria:','relationships','/\x20directories\x20exist.','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','listPersonalizations','token:','\x20rows\x20','text','error','No\x20parent\x20segments\x20found','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','RT\x20Journey\x20ID:\x20','unref','1ChQsVQ','interval','darwin','personalizationServices','\x27\x20and\x20run\x20workflow?','Fetching\x20customers\x20schema...','\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','segment','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','Overwrite\x20\x27','processedRows','attributes','Error:','Name:\x20','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','personalization','updatedAt','Validate:','segment:parent:pull','tokens','\x0a\x20\x20\x20\x20]','displayColumns','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','List\x20available\x20fields\x20for\x20segmentation','\x20parent\x20segment','⚡\x20Enabled','Error:\x20--attribute\x20requires\x20a\x20name\x0a','data','/\x20and\x20','td_client_id','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','/{name}.yml\x0a','ps:pz:service:update','\x0a⚠️\x20\x20Migrating:\x20','dirname','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','✘\x20Failed\x20to\x20rename\x20directory:\x20','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','Updating','Database:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','valid','site','bold','Pattern:\x20','using\x20the\x20default\x20path:\x20','entryCriteria','\x20rows)','Error:\x20Service\x20name\x20is\x20required','Status:','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','label','schemaValid','Executing\x20parent\x20segment\x20query...','`\x20to\x20download\x20the\x20configuration\x20first','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','\x20configured','launched','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','FINISHED','\x20true','string','\x5c$&','public:','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','folder-segment','ps:pz:service:token:create','\x20\x20Note:\x20','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','Error:\x20--database\x20and\x20--table\x20are\x20required','displayMasterInfo','getCurrentConfigVersion','joinKey','Attempt:','\x20RT\x20configuration\x20is\x20valid','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','toLocaleString','\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','all','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','customers','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','Behavior:','<database>.<table>','customerPercent','null','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','localeCompare','get','map','Error:\x20Parent\x20segment\x20name\x20is\x20required','matchedCount','RT\x202.0\x20Validate:','validateParentYaml','\x0a\x20\x20\x20\x20}','apply','keyEventId','SELECT\x20*\x20FROM\x20(\x0a','Errors:','\x0aNo\x20sample\x20data\x20available','segment:parent:show','eventKind','\x20parent\x20segment\x20\x27','patch','collectSchema','\x20(paused)','\x0aError:','Listing\x20parent\x20segments\x20matching\x20\x27','\x20--enriched','state','name','Update\x20a\x20realtime\x20personalization\x20entity','✔\x20Deleted\x20personalization\x20\x27','addBehaviors','Audience\x20ID:','includeSensitive:','Behaviors','\x20service(s)\x20configured','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x20Configuration\x20is\x20valid','pullParentYaml','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','errors','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','sourceTableError','single','workflowAttemptId','ps:rt:configuration_versions','Attributes','Creating\x20personalization\x20\x27','No\x20RT-enabled\x20parent\x20segments\x20found','create','Aborted.','segment:parent:view','.yml','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','Rows:','Listing\x20parent\x20segments...','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','\x20[Job\x20ID:\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','stats','createPersonalization','Resolving\x20parent\x20segment\x20\x27','keyEventCriteria','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','verbose','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','push','\x0aNew\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','\x20\x202.\x20Run\x20','✔\x20Created\x20personalization\x20\x27','realtime','timezone','Attributes:','Deleting\x20token\x20\x27','Analyzing\x20changes...','displaySummary','Site:\x20','tdx\x20ps\x20push\x20','length','ps:rt:jn:resume','ps:pz:service:show','(id:\x20','population','To\x20view\x20sample\x20data:','\x27\x20with\x20ID:\x20','any','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','displayPreviewHints','join','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','Apply\x20changes\x20to\x20\x27','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','Error:\x20Service\x20ID\x20is\x20required','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','22xESExg','Listing\x20RT-enabled\x20parent\x20segments...','\x20behaviors','allowedIps','/\x20directory.\x0a','.customers)','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','tdx\x20ps\x20preview\x20','yellow','✔\x20Created\x20token\x20\x27','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','\x27\x20(id:\x20','scheduleType','cyan','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','\x20Added\x20personalization\x20template\x20to\x20','segment:parent:fields','\x20--behavior\x20\x22','behaviors','json','dim','Join\x20on:','status:\x20','Found\x20YAML\x20file:\x20','displayPreviewResults','\x20\x20\x20\x20-\x20','file','audienceId:','Create\x20a\x20realtime\x20personalization\x20entity','filter','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','id:\x20','execute','workflowSessionId','176790mPiqOQ','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','in\x20','getPersonalization','table','Options:\x0a','Schema\x20saved\x20to\x20','idStitching','stitchingKeys','sections','pauseJourney','\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}','schemaError','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','\x20--attribute\x20\x22','true','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','Customers:','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','allValid','column','\x20\x20\x20\x20','open','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','Table:\x20','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','match','xdg-open','Resume\x20activations\x20in\x20an\x20RT\x20journey','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','user_id','workflowId','foreignKey','segment:parent:validate','Fetching\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','Columns:','Available\x20behaviors:','Error\x20reading\x20file:\x20','previewParentYaml','last_page_viewed','%)\x20','SELECT\x20*\x20FROM\x20','/app/dw/parentSegments/','\x0a✔\x20Workflow\x20started','.yaml','No\x20RT\x20journeys\x20found','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','resolveParentId','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','Parent\x20segment:\x20','Show\x20personalization\x20service\x20details','runParent','Master\x20Table','sort','Delete\x20a\x20personalization\x20service','parentFolder','displaySampleData','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','Coverage:','ps:pz:init','message','\x20field','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','ps:pz:list','rowCount','Fetching\x20current\x20configuration\x20for\x20\x27','segment:parent:preview','segment:parent:sql','Creating\x20token\x20\x27','displayAttributesStats','✔\x20Created\x20personalization\x20service\x20\x27','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','allowed\x20IPs:','{\x0a\x20\x20\x22database\x22:\x20\x22','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','value','ps:pz:service:list','public','audienceId:\x20','endsWith','Show\x20parent\x20segment\x20schema\x20(column\x20types)','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','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','Get\x20current\x20RT\x20configuration\x20version\x20status','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','parentSegment','log','resumeJourney','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','Fetching\x20behavior\x20list...','✔\x20Updated\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20\x20','eventKind:\x20','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','customerGroupFile','✔\x20Found\x20','some','session','updated:','list','jsonl','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','ps:pz:create','listJourneys','createToken','\x27...','150084LHsVPi','\x20RT\x20journey','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','getBehaviorNames','attribute','Listing\x20personalization\x20services\x20for\x20\x27','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','\x20\x201.\x20Edit\x20','toFixed','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','format','getParentSQL','start','RT\x202.0:','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','test','realtime_enabled','\x20\x20Tables:\x201\x20customers\x20+\x20','sections:','stageCount','\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','No\x20parent\x20segments\x20match\x20pattern:\x20','identifier:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','Patching\x20personalization\x20\x27','ignore','Delete\x20a\x20realtime\x20personalization','displayRealtimeInfo','indexOf','updateParent','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','Get\x20SQL\x20query\x20for\x20parent\x20segment','created:','Next\x20steps:','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','Error:\x20Token\x20name\x20is\x20required','ps:pz:patch','green','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','parent_segments','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','⚡\x20Not\x20enabled','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','yes','List\x20parent\x20segments','sourceTableValid','status','identifier','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Listing\x20RT\x20journeys\x20for\x20\x27','Create\x20parent\x20segment\x20\x27','\x20No\x20changes\x20-\x20','ps:pz:delete','paused','Creating\x20parent\x20segment\x20\x27','displayValidateResults','getOutputDatabaseName','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','deleteToken','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','delete','behavior_','utf-8','Validating\x20RT\x20configuration...','ps:pz:service:token:delete','\x0aUsage:\x20tdx\x20ps\x20preview\x20','master','Updating\x20personalization\x20service\x20\x27','Error:\x20--name\x20is\x20required','154BotZdl','createdAt','Updated','description','Listing\x20personalizations\x20for\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a','Options\x20(one\x20required):\x0a','\x20stage','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','trim','getParentFull','Source:','events','repeat','personalization_services','platform','stop','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','\x20Context\x20set:\x20','1798650msCucO','red','Master:','Fetching\x20SQL\x20for\x20\x27','\x20\x20\x20\x20\x20\x20','coveragePercent','ps:pz:service:create','toLowerCase','Error:\x20--behavior\x20requires\x20a\x20name\x0a','SQL\x20query:\x0a','parent_segment','\x20total','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','formatSchemaJson','Error:\x20Personalization\x20ID\x20is\x20required','No\x20personalization\x20services\x20configured','includeSensitive','no\x20tokens\x20configured','✔\x20Query\x20completed:\x20Processed\x20','\x20\x20Database:\x20','database','\x20+\x20[','Creating\x20personalization\x20service\x20\x27','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','\x20Opening\x20','Error:\x20Token\x20ID\x20is\x20required','segment:parent:desc','attributesFile','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','columns'];a32_0x5877=function(){return _0x385b16;};return a32_0x5877();}function showParentSegmentNotSetError(_0x53bbff){const _0x2cc535=a32_0x5ce8d0;console[_0x2cc535(0x310)](a32_0x2ce214[_0x2cc535(0x1a7)](_0x2cc535(0x240))),console[_0x2cc535(0x310)](_0x53bbff);}export class ParentSegmentListCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]='segment:parent:list';[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x25e);async['execute'](_0xe5b2f){const _0xee2ad5=a32_0x5ce8d0,{options:_0x2a0171,args:_0x20c8eb,tdx:_0x17123d}=_0xe5b2f,_0x11199c=_0x20c8eb[0x0];_0x2a0171[_0xee2ad5(0x3ae)]&&(console['error']('Site:\x20'+_0x2a0171['site']),_0x11199c&&console[_0xee2ad5(0x310)](_0xee2ad5(0x342)+_0x11199c));const _0x289b93=await withSpinner(_0x11199c?_0xee2ad5(0x384)+_0x11199c+_0xee2ad5(0x231):_0xee2ad5(0x3a2),()=>_0x17123d['segment']['listParents'](),{'verbose':_0x2a0171['verbose']});let _0x1908f6=_0x289b93[_0xee2ad5(0x330)];if(_0x11199c){const _0x5cfe1e=_0x11199c[_0xee2ad5(0x2d0)](/[.+^${}()|[\]\\]/g,_0xee2ad5(0x354))[_0xee2ad5(0x2d0)](/\*/g,'.*')[_0xee2ad5(0x2d0)](/\?/g,'.'),_0x15cc63=new RegExp('^'+_0x5cfe1e+'$','i');_0x1908f6=_0x1908f6[_0xee2ad5(0x1bc)](_0x485f2a=>_0x15cc63[_0xee2ad5(0x241)](_0x485f2a[_0xee2ad5(0x320)][_0xee2ad5(0x387)]));}_0x1908f6[_0xee2ad5(0x1fa)]((_0x5e5421,_0xa6c2a9)=>_0x5e5421[_0xee2ad5(0x320)][_0xee2ad5(0x387)]['localeCompare'](_0xa6c2a9[_0xee2ad5(0x320)][_0xee2ad5(0x387)])),console[_0xee2ad5(0x310)](_0xee2ad5(0x226)+_0x1908f6[_0xee2ad5(0x18f)]+_0xee2ad5(0x32d)+(_0x1908f6[_0xee2ad5(0x18f)]!==0x1?'s':''));const _0x35335a=_0x28d3e9=>{const _0x277af4=_0xee2ad5;return getConsoleNextUrl(_0x2a0171[_0x277af4(0x340)],_0x277af4(0x1ef)+_0x28d3e9);};if(_0x2a0171[_0xee2ad5(0x23c)]===_0xee2ad5(0x1b2)||_0x2a0171[_0xee2ad5(0x23c)]==='jsonl'){const _0x5e7bf0=_0x1908f6[_0xee2ad5(0x372)](_0x59ca78=>({..._0x59ca78,'url':_0x35335a(_0x59ca78['id'])}));await handleSDKOutput(_0x5e7bf0,_0x2a0171);}else{if(_0x1908f6[_0xee2ad5(0x18f)]===0x0)_0x11199c?console[_0xee2ad5(0x21d)](_0xee2ad5(0x247)+_0x11199c):console[_0xee2ad5(0x21d)](_0xee2ad5(0x311));else for(const _0x53f048 of _0x1908f6){const _0x151a66=_0x53f048['attributes']['population']?a32_0x2ce214[_0xee2ad5(0x1b3)]('\x20('+formatRows(_0x53f048[_0xee2ad5(0x320)][_0xee2ad5(0x193)])+')'):'',_0x5704f6=hyperlink(_0x53f048[_0xee2ad5(0x320)][_0xee2ad5(0x387)],_0x35335a(_0x53f048['id']));console['log'](_0xee2ad5(0x2ce)+_0x5704f6+_0x151a66);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{['name']=a32_0x5ce8d0(0x2b2);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x3a3);async['execute'](_0x39d578){const _0x36b772=a32_0x5ce8d0,{options:_0x32e4aa,args:_0xcd43f1,tdx:_0x575297}=_0x39d578;console[_0x36b772(0x310)](_0x36b772(0x1df)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x36b772(0x1a9));const _0x35dbb4=_0x32e4aa;if(_0xcd43f1[_0x36b772(0x18f)]===0x0)return console[_0x36b772(0x310)](a32_0x2ce214[_0x36b772(0x28b)]('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x36b772(0x310)](_0x36b772(0x217)),0x1;const _0x47a504=_0xcd43f1[0x0];if(!_0x35dbb4[_0x36b772(0x29e)]||!_0x35dbb4['table'])return console[_0x36b772(0x310)](_0x36b772(0x35b)),console[_0x36b772(0x310)](_0x36b772(0x217)),0x1;_0x35dbb4[_0x36b772(0x3ae)]&&(console[_0x36b772(0x310)](_0x36b772(0x18d)+_0x35dbb4[_0x36b772(0x340)]),console[_0x36b772(0x310)](_0x36b772(0x322)+_0x47a504),console[_0x36b772(0x310)](_0x36b772(0x33c)+_0x35dbb4[_0x36b772(0x29e)]),console[_0x36b772(0x310)](_0x36b772(0x1da)+_0x35dbb4[_0x36b772(0x1c5)]));const _0x4aed48=await loadJSONFromOptions(_0x35dbb4[_0x36b772(0x320)],_0x35dbb4[_0x36b772(0x2a5)]),_0x38a73b=await loadJSONFromOptions(_0x35dbb4[_0x36b772(0x1b1)],_0x35dbb4['behaviorsFile']),_0x4de06c=await loadJSONFromOptions(_0x35dbb4['customerGroup'],_0x35dbb4[_0x36b772(0x225)]),_0x6dbbeb={'name':_0x47a504,'description':_0x35dbb4[_0x36b772(0x27a)],'scheduleType':_0x35dbb4[_0x36b772(0x1ab)],'scheduleOption':_0x35dbb4[_0x36b772(0x2d7)],'timezone':_0x35dbb4[_0x36b772(0x188)],'master':{'parentDatabaseName':_0x35dbb4[_0x36b772(0x29e)],'parentTableName':_0x35dbb4[_0x36b772(0x1c5)]},'attributes':_0x4aed48,'behaviors':_0x38a73b,'customerGroup':_0x4de06c},_0x4e86b0=await withSpinner(_0x36b772(0x268)+_0x47a504+'\x27...',()=>_0x575297[_0x36b772(0x31c)]['createParent'](_0x6dbbeb),{'verbose':_0x32e4aa[_0x36b772(0x3ae)]}),_0xe962ed=_0x4e86b0[_0x36b772(0x330)];return console[_0x36b772(0x310)](_0x36b772(0x2d9)+_0xe962ed[_0x36b772(0x387)]+_0x36b772(0x195)+_0xe962ed['id']),await handleSDKOutput([_0xe962ed],_0x32e4aa),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']='segment:parent:update';[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x32b);async['execute'](_0x215987){const _0xef059c=a32_0x5ce8d0,{options:_0x179556,args:_0x3ab803,tdx:_0x2e2063}=_0x215987;console[_0xef059c(0x310)](_0xef059c(0x3a7)+_0xef059c(0x1fe)+_0xef059c(0x1a9));const _0x555a6c=_0x179556;if(_0x3ab803[_0xef059c(0x18f)]===0x0)return console[_0xef059c(0x310)](a32_0x2ce214[_0xef059c(0x28b)](_0xef059c(0x373))),console['error'](_0xef059c(0x356)),0x1;const _0x33572c=_0x3ab803[0x0];_0x555a6c[_0xef059c(0x3ae)]&&(console[_0xef059c(0x310)]('Site:\x20'+_0x555a6c[_0xef059c(0x340)]),console['error'](_0xef059c(0x1f6)+_0x33572c));const _0x4c45b3=await withSpinner(_0xef059c(0x207)+_0x33572c+_0xef059c(0x231),()=>_0x2e2063[_0xef059c(0x31c)][_0xef059c(0x281)](_0x33572c),{'verbose':_0x555a6c['verbose']}),_0xd5a068=_0x4c45b3[_0xef059c(0x330)],_0x4f16ff=await loadJSONFromOptions(_0x555a6c['addAttributes'],_0x555a6c[_0xef059c(0x2b7)]),_0x57e92d=await loadJSONFromOptions(_0x555a6c[_0xef059c(0x38a)],_0x555a6c[_0xef059c(0x2fb)]),_0x41fe99={'name':_0xd5a068['name'],'description':_0x555a6c[_0xef059c(0x27a)]!==undefined?_0x555a6c[_0xef059c(0x27a)]:_0xd5a068[_0xef059c(0x27a)],'scheduleType':_0x555a6c[_0xef059c(0x1ab)]!==undefined?_0x555a6c[_0xef059c(0x1ab)]:_0xd5a068['scheduleType'],'scheduleOption':_0x555a6c['scheduleOption']!==undefined?_0x555a6c[_0xef059c(0x2d7)]:_0xd5a068['scheduleOption'],'timezone':_0x555a6c[_0xef059c(0x188)]!==undefined?_0x555a6c['timezone']:_0xd5a068['timezone'],'master':_0xd5a068[_0xef059c(0x274)],'attributes':_0x4f16ff?[..._0xd5a068[_0xef059c(0x320)]||[],..._0x4f16ff]:_0xd5a068[_0xef059c(0x320)],'behaviors':_0x57e92d?[..._0xd5a068[_0xef059c(0x1b1)]||[],..._0x57e92d]:_0xd5a068[_0xef059c(0x1b1)],'customerGroup':_0xd5a068['customerGroup']},_0x27ee1a=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x33572c+'\x27...',()=>_0x2e2063['segment'][_0xef059c(0x24f)](_0x33572c,_0x41fe99),{'verbose':_0x555a6c[_0xef059c(0x3ae)]}),_0x5a4d7d=_0x27ee1a['data'];return console[_0xef059c(0x310)](_0xef059c(0x221)+_0x5a4d7d['name']+'\x27'),await handleSDKOutput([_0x5a4d7d],_0x555a6c),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x327);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x2c3);async['execute'](_0x1a7b7f){const _0x2c02af=a32_0x5ce8d0,{options:_0x580cc1,args:_0x18fbc2,tdx:_0x391afe}=_0x1a7b7f,_0x564659=_0x580cc1,_0x513caa=_0x18fbc2[0x0]||_0x580cc1[_0x2c02af(0x21c)];if(!_0x513caa)return showParentSegmentNotSetError(_0x2c02af(0x21f)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment'),0x1;if(_0x564659['use']&&_0x564659['output'])return console[_0x2c02af(0x310)](a32_0x2ce214[_0x2c02af(0x28b)](_0x2c02af(0x350))),console[_0x2c02af(0x310)](a32_0x2ce214[_0x2c02af(0x1b3)](_0x2c02af(0x3a4))),console[_0x2c02af(0x310)](a32_0x2ce214['dim'](_0x2c02af(0x343)+PARENT_SEGMENT_DIR+_0x2c02af(0x334))),console[_0x2c02af(0x310)](a32_0x2ce214['cyan'](_0x2c02af(0x1ce))),0x1;const _0x50a472=_0x564659[_0x2c02af(0x2b6)]||a32_0x5725f6['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x513caa)+_0x2c02af(0x39f));_0x564659[_0x2c02af(0x3ae)]&&(console[_0x2c02af(0x310)](_0x2c02af(0x18d)+_0x564659[_0x2c02af(0x340)]),console[_0x2c02af(0x310)]('Parent\x20segment:\x20'+_0x513caa),console['error']('Output\x20file:\x20'+_0x50a472));const _0x2393e9=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x513caa+_0x2c02af(0x231),()=>_0x391afe['segment'][_0x2c02af(0x391)](_0x513caa),{'verbose':_0x564659[_0x2c02af(0x3ae)]}),_0x36f7be=_0x2393e9['data'];if(existsSync(_0x50a472)){const _0x38f934=readFileSync(_0x50a472,_0x2c02af(0x270)),_0x5e5725=generateDiff(_0x38f934,_0x36f7be);if(!hasChanges(_0x5e5725))console[_0x2c02af(0x310)](a32_0x2ce214['green']('✔')+_0x2c02af(0x265)+a32_0x2ce214[_0x2c02af(0x1ac)](_0x50a472)+'\x20is\x20already\x20up\x20to\x20date');else{console[_0x2c02af(0x310)](_0x2c02af(0x2c0)+_0x50a472+'\x27:'),console[_0x2c02af(0x310)]('─'[_0x2c02af(0x284)](0x3c)),console[_0x2c02af(0x310)](formatDiffWithColors(_0x5e5725)),console[_0x2c02af(0x310)]('─'[_0x2c02af(0x284)](0x3c));if(!_0x564659[_0x2c02af(0x25d)]){if(!isInteractive())return console[_0x2c02af(0x310)](a32_0x2ce214[_0x2c02af(0x28b)](_0x2c02af(0x383)),_0x2c02af(0x348)),console[_0x2c02af(0x310)](a32_0x2ce214[_0x2c02af(0x1b3)](_0x2c02af(0x23b))),0x1;const _0x24f60=await confirmKey(_0x2c02af(0x31e)+_0x50a472+'\x27?');if(!_0x24f60)return console[_0x2c02af(0x310)](a32_0x2ce214[_0x2c02af(0x1a7)](_0x2c02af(0x39d))),0x1;}writeFileSync(_0x50a472,_0x36f7be,'utf-8'),console[_0x2c02af(0x310)](a32_0x2ce214[_0x2c02af(0x257)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a32_0x2ce214['cyan'](_0x50a472));}}else{const _0x44ddc9=a32_0x5725f6[_0x2c02af(0x337)](_0x50a472);!existsSync(_0x44ddc9)&&mkdirSync(_0x44ddc9,{'recursive':!![]}),writeFileSync(_0x50a472,_0x36f7be,'utf-8'),console[_0x2c02af(0x310)](a32_0x2ce214[_0x2c02af(0x257)]('✔')+_0x2c02af(0x30a)+a32_0x2ce214['cyan'](_0x50a472));}return saveSessionContext({'parent_segment':_0x513caa},_0x564659[_0x2c02af(0x228)]),console[_0x2c02af(0x310)](a32_0x2ce214[_0x2c02af(0x257)]('✔')+_0x2c02af(0x289)+a32_0x2ce214[_0x2c02af(0x1b3)]('parent_segment')+_0x2c02af(0x2ec)+a32_0x2ce214[_0x2c02af(0x1ac)](_0x513caa)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a32_0x5ce8d0(0x387)]='segment:parent:push';[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x2ae);async[a32_0x5ce8d0(0x1bf)](_0x435881){const _0x15113f=a32_0x5ce8d0,{options:_0xbb5fd9,args:_0x13c03b,tdx:_0x141660}=_0x435881,_0x5b2152=_0xbb5fd9,_0x76ab26=_0x13c03b[0x0]||_0xbb5fd9[_0x15113f(0x21c)];if(!_0x76ab26)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'+_0x15113f(0x1d1)),0x1;const _0x347580=resolveYamlFile(_0x76ab26);if(!existsSync(_0x347580))return showFileNotFoundError(_0x347580,_0x76ab26),0x1;_0x5b2152[_0x15113f(0x3ae)]&&(console['error']('Site:\x20'+_0x5b2152[_0x15113f(0x340)]),console['error'](_0x15113f(0x2e9)+_0x347580));let _0x1e6986;try{_0x1e6986=readFileSync(_0x347580,_0x15113f(0x270));}catch(_0x158742){const _0xdb8e0f=_0x158742 instanceof Error?_0x158742['message']:String(_0x158742);return console[_0x15113f(0x310)]('Error\x20reading\x20file:\x20'+_0xdb8e0f),0x1;}const _0x4604af=await withSpinner(_0x15113f(0x18b),()=>_0x141660[_0x15113f(0x31c)]['pushParentYaml'](_0x1e6986),{'verbose':_0x5b2152[_0x15113f(0x3ae)]}),_0x2cd8f7=_0x4604af[_0x15113f(0x330)],{isNew:_0x33f42e,name:_0x484811,hasChanges:_0x462196,diffFormatted:_0x52bf2d}=_0x2cd8f7;if(!_0x462196)return console[_0x15113f(0x310)](_0x15113f(0x2b9)+_0x484811+_0x15113f(0x2e7)),0x0;_0x33f42e?console[_0x15113f(0x310)](_0x15113f(0x183)+_0x484811+'\x27:'):console[_0x15113f(0x310)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x484811+'\x27:');console[_0x15113f(0x310)]('─'[_0x15113f(0x284)](0x3c)),console[_0x15113f(0x310)](_0x52bf2d),console[_0x15113f(0x310)]('─'[_0x15113f(0x284)](0x3c));const _0x22abd4=_0x33f42e?_0x15113f(0x264)+_0x484811+'\x27?':'Apply\x20changes\x20to\x20\x27'+_0x484811+'\x27?';if(!_0x5b2152[_0x15113f(0x25d)]){if(!isInteractive())return console[_0x15113f(0x310)](a32_0x2ce214['red'](_0x15113f(0x383)),_0x15113f(0x348)),console[_0x15113f(0x310)](a32_0x2ce214[_0x15113f(0x1b3)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2b82c2=await confirmKey(_0x22abd4);if(!_0x2b82c2)return console[_0x15113f(0x310)](a32_0x2ce214[_0x15113f(0x1a7)]('Aborted.')),0x1;}const _0x2362df=_0x33f42e?_0x15113f(0x2c1):'Updating',_0xb8f728=await withSpinner(_0x2362df+'\x20parent\x20segment\x20\x27'+_0x484811+_0x15113f(0x231),()=>_0x2cd8f7[_0x15113f(0x378)](),{'verbose':_0x5b2152[_0x15113f(0x3ae)]}),_0x4b5967=_0xb8f728[_0x15113f(0x330)],_0x2916a4=getConsoleNextUrl(_0x5b2152[_0x15113f(0x340)],_0x15113f(0x1ef)+_0x4b5967['id']),_0x40ad0b=_0x33f42e?_0x15113f(0x2d6):'Updated';return console[_0x15113f(0x310)]('✔\x20'+_0x40ad0b+_0x15113f(0x37f)+_0x4b5967[_0x15113f(0x387)]+'\x27'),console['error']('\x20\x20'+_0x2916a4),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x1e5);['description']='Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics';async[a32_0x5ce8d0(0x1bf)](_0x47e1bc){const _0x2c7983=a32_0x5ce8d0,{options:_0x35430e,args:_0x5f3973,tdx:_0x1b887c}=_0x47e1bc,_0x4a8ede=_0x35430e,_0x132cf2=_0x5f3973[0x0]||_0x35430e[_0x2c7983(0x21c)];if(!_0x132cf2)return showParentSegmentNotSetError(_0x2c7983(0x19c)+_0x2c7983(0x249)+_0x2c7983(0x1c6)+_0x2c7983(0x25a)+_0x2c7983(0x2bc)+_0x2c7983(0x19e)),0x1;const _0x3f7737=resolveYamlFile(_0x132cf2);if(!existsSync(_0x3f7737))return showFileNotFoundError(_0x3f7737,_0x132cf2),0x1;_0x4a8ede[_0x2c7983(0x3ae)]&&(console[_0x2c7983(0x310)](_0x2c7983(0x18d)+_0x4a8ede[_0x2c7983(0x340)]),console[_0x2c7983(0x310)](_0x2c7983(0x2e9)+_0x3f7737));let _0x4c5ad5;try{_0x4c5ad5=readFileSync(_0x3f7737,_0x2c7983(0x270));}catch(_0x22ba27){const _0x49bdcd=_0x22ba27 instanceof Error?_0x22ba27[_0x2c7983(0x202)]:String(_0x22ba27);return console['error'](_0x2c7983(0x1ea)+_0x49bdcd),0x1;}const _0x69fb4c=createCommandSpinner(a32_0x2ce214[_0x2c7983(0x1b3)](_0x2c7983(0x2da)),{'verbose':_0x4a8ede[_0x2c7983(0x3ae)]});_0x69fb4c[_0x2c7983(0x23e)]();const _0x1cae9d={'onProgress':_0x198a27=>{const _0x2fb924=_0x2c7983;_0x69fb4c[_0x2fb924(0x30f)]=formatProgressMessage(_0x198a27);}};if(_0x4a8ede[_0x2c7983(0x274)])_0x1cae9d[_0x2c7983(0x274)]=!![];if(_0x4a8ede[_0x2c7983(0x2fe)])_0x1cae9d[_0x2c7983(0x2fe)]=!![];_0x4a8ede[_0x2c7983(0x236)]&&(_0x1cae9d['attribute']=_0x4a8ede[_0x2c7983(0x236)]);_0x4a8ede['behavior']&&(_0x1cae9d[_0x2c7983(0x2d4)]=_0x4a8ede[_0x2c7983(0x2d4)]);if(_0x4a8ede[_0x2c7983(0x316)])_0x1cae9d[_0x2c7983(0x316)]=_0x4a8ede[_0x2c7983(0x316)];let _0x322cb8;try{_0x322cb8=await _0x1b887c['segment'][_0x2c7983(0x376)](_0x4c5ad5,_0x1cae9d),_0x69fb4c['stop']();}catch(_0x9b8027){_0x69fb4c[_0x2c7983(0x287)]();throw _0x9b8027;}const _0x4db099=_0x4a8ede['interval']||_0x2c7983(0x2db);return this[_0x2c7983(0x269)](_0x322cb8,_0x1cae9d,_0x3f7737,_0x4db099),_0x322cb8['allValid']?0x0:0x1;}[a32_0x5ce8d0(0x269)](_0x1bcf2a,_0x2cf403,_0x2a607d,_0x8e05c8){const _0x30af5c=a32_0x5ce8d0;console[_0x30af5c(0x310)]('\x0a'+a32_0x2ce214[_0x30af5c(0x341)](_0x30af5c(0x326))+'\x20'+_0x1bcf2a[_0x30af5c(0x387)]),console[_0x30af5c(0x310)]('═'[_0x30af5c(0x284)](0x3c)),this[_0x30af5c(0x35c)](_0x1bcf2a);if(typeof _0x2cf403[_0x30af5c(0x236)]==='string'){this[_0x30af5c(0x20b)](_0x1bcf2a),this['displaySummary'](_0x1bcf2a),this['displayPreviewHints'](_0x2a607d,_0x8e05c8,_0x30af5c(0x236),_0x2cf403[_0x30af5c(0x236)]);return;}if(_0x2cf403[_0x30af5c(0x236)]===!![]){this[_0x30af5c(0x20b)](_0x1bcf2a),this[_0x30af5c(0x18c)](_0x1bcf2a),this['displayPreviewHints'](_0x2a607d,_0x8e05c8,_0x30af5c(0x320));return;}if(typeof _0x2cf403['behavior']==='string'){this[_0x30af5c(0x2e5)](_0x1bcf2a,_0x8e05c8),this[_0x30af5c(0x18c)](_0x1bcf2a),this['displayPreviewHints'](_0x2a607d,_0x8e05c8,'behavior',_0x2cf403[_0x30af5c(0x2d4)]);return;}if(_0x2cf403[_0x30af5c(0x2d4)]===!![]){this[_0x30af5c(0x2e5)](_0x1bcf2a,_0x8e05c8),this[_0x30af5c(0x18c)](_0x1bcf2a),this[_0x30af5c(0x198)](_0x2a607d,_0x8e05c8,'behaviors');return;}this[_0x30af5c(0x20b)](_0x1bcf2a),this[_0x30af5c(0x2e5)](_0x1bcf2a,_0x8e05c8),this[_0x30af5c(0x24d)](_0x1bcf2a),this[_0x30af5c(0x18c)](_0x1bcf2a),this[_0x30af5c(0x198)](_0x2a607d,_0x8e05c8,_0x30af5c(0x364));}['displayRealtimeInfo'](_0x5da16a){displayRealtimeValidation(_0x5da16a);}[a32_0x5ce8d0(0x198)](_0x2917fb,_0x32e2b6,_0x252505,_0x2ab383){const _0x2d0fea=a32_0x5ce8d0;console[_0x2d0fea(0x310)]('\x0a'+a32_0x2ce214[_0x2d0fea(0x1b3)](_0x2d0fea(0x194)));const _0x28366d=_0x32e2b6!==_0x2d0fea(0x2db)?'\x20--interval\x20'+_0x32e2b6:'';if(_0x252505===_0x2d0fea(0x236)&&_0x2ab383)console[_0x2d0fea(0x310)]('\x20\x20'+a32_0x2ce214['dim'](_0x2d0fea(0x1a6)+_0x2917fb+_0x2d0fea(0x1cf)+_0x2ab383+'\x22'+_0x28366d));else{if(_0x252505===_0x2d0fea(0x2d4)&&_0x2ab383)console[_0x2d0fea(0x310)]('\x20\x20'+a32_0x2ce214['dim'](_0x2d0fea(0x1a6)+_0x2917fb+'\x20--behavior\x20\x22'+_0x2ab383+'\x22'+_0x28366d));else(_0x252505===_0x2d0fea(0x320)||_0x252505===_0x2d0fea(0x364))&&console[_0x2d0fea(0x310)]('\x20\x20'+a32_0x2ce214[_0x2d0fea(0x1b3)](_0x2d0fea(0x1a6)+_0x2917fb+_0x2d0fea(0x2cb)+_0x28366d));}(_0x252505===_0x2d0fea(0x1b1)||_0x252505===_0x2d0fea(0x364))&&console[_0x2d0fea(0x310)]('\x20\x20'+a32_0x2ce214[_0x2d0fea(0x1b3)](_0x2d0fea(0x1a6)+_0x2917fb+_0x2d0fea(0x2e0)+_0x28366d)),_0x252505===_0x2d0fea(0x364)&&console[_0x2d0fea(0x310)]('\x20\x20'+a32_0x2ce214[_0x2d0fea(0x1b3)](_0x2d0fea(0x1a6)+_0x2917fb+_0x2d0fea(0x385)+_0x28366d));}[a32_0x5ce8d0(0x35c)](_0x49901d){const _0x19609b=a32_0x5ce8d0,{master:_0x1c61bd}=_0x49901d,_0x4c2e29=_0x1c61bd[_0x19609b(0x34a)]?a32_0x2ce214['green']('✔'):a32_0x2ce214[_0x19609b(0x28b)]('✘');console['error']('\x0a'+a32_0x2ce214[_0x19609b(0x1b3)](_0x19609b(0x1f9))),console[_0x19609b(0x310)](_0x4c2e29+'\x20'+a32_0x2ce214[_0x19609b(0x341)](_0x1c61bd[_0x19609b(0x29e)]+'.'+_0x1c61bd[_0x19609b(0x1c5)])),_0x1c61bd[_0x19609b(0x34a)]?_0x1c61bd[_0x19609b(0x206)]!==undefined&&console[_0x19609b(0x310)]('\x20\x20'+a32_0x2ce214[_0x19609b(0x1b3)](_0x19609b(0x3a1))+'\x20'+a32_0x2ce214[_0x19609b(0x1ac)](formatRows(_0x1c61bd[_0x19609b(0x206)]))):console['error']('\x20\x20'+a32_0x2ce214[_0x19609b(0x28b)]('Error:')+'\x20'+_0x1c61bd[_0x19609b(0x1cd)]);}[a32_0x5ce8d0(0x20b)](_0x1c8613){const _0x1c2d04=a32_0x5ce8d0;if(_0x1c8613[_0x1c2d04(0x320)][_0x1c2d04(0x18f)]===0x0)return;console[_0x1c2d04(0x310)]('\x0a'+a32_0x2ce214[_0x1c2d04(0x1b3)](_0x1c2d04(0x399)));for(const _0x45138e of _0x1c8613[_0x1c2d04(0x320)]){const _0x1c3e44=_0x45138e[_0x1c2d04(0x34a)]?a32_0x2ce214[_0x1c2d04(0x257)]('✔'):a32_0x2ce214['red']('✘');let _0x24e494='';if(_0x45138e[_0x1c2d04(0x34a)]&&_0x45138e[_0x1c2d04(0x374)]!==undefined&&_0x45138e[_0x1c2d04(0x28f)]!==undefined){const _0x59bfe0=_0x45138e[_0x1c2d04(0x28f)][_0x1c2d04(0x23a)](0x1),_0x295ade=_0x45138e[_0x1c2d04(0x28f)]>=0x50?a32_0x2ce214[_0x1c2d04(0x257)]:_0x45138e['coveragePercent']>=0x32?a32_0x2ce214['yellow']:a32_0x2ce214[_0x1c2d04(0x28b)];_0x24e494='\x20'+a32_0x2ce214[_0x1c2d04(0x1b3)](_0x1c2d04(0x200))+'\x20'+_0x295ade(_0x59bfe0+'%')+'\x20('+formatRows(_0x45138e[_0x1c2d04(0x374)])+_0x1c2d04(0x345);}console[_0x1c2d04(0x310)](_0x1c3e44+'\x20'+a32_0x2ce214[_0x1c2d04(0x341)](_0x45138e[_0x1c2d04(0x387)])+_0x24e494),console['error']('\x20\x20'+a32_0x2ce214[_0x1c2d04(0x1b3)]('Source:')+'\x20'+a32_0x2ce214[_0x1c2d04(0x341)](_0x45138e[_0x1c2d04(0x29e)]+'.'+_0x45138e[_0x1c2d04(0x1c5)]));const _0x39ecaf=_0x45138e['joinKey']===_0x45138e[_0x1c2d04(0x1e4)]?a32_0x2ce214[_0x1c2d04(0x1b3)]('Join\x20on:')+'\x20'+_0x45138e['joinKey']:a32_0x2ce214[_0x1c2d04(0x1b3)](_0x1c2d04(0x2ca))+'\x20'+_0x45138e[_0x1c2d04(0x35e)]+'\x20=\x20'+_0x45138e['foreignKey'];console[_0x1c2d04(0x310)]('\x20\x20'+_0x39ecaf),console[_0x1c2d04(0x310)]('\x20\x20'+a32_0x2ce214['dim'](_0x1c2d04(0x1e8))),this[_0x1c2d04(0x32a)](_0x45138e[_0x1c2d04(0x2a7)]),!_0x45138e[_0x1c2d04(0x34a)]&&console[_0x1c2d04(0x310)]('\x20\x20'+a32_0x2ce214['red']('Error:')+'\x20'+_0x45138e[_0x1c2d04(0x1cd)]);}}[a32_0x5ce8d0(0x2e5)](_0x2e4077,_0x31a64b){const _0xc17045=a32_0x5ce8d0;if(_0x2e4077['behaviors'][_0xc17045(0x18f)]===0x0)return;console['error']('\x0a'+a32_0x2ce214[_0xc17045(0x1b3)](_0xc17045(0x38d))+'\x20'+a32_0x2ce214[_0xc17045(0x1b3)]('('+_0x31a64b+')'));for(const _0x3b5103 of _0x2e4077['behaviors']){const _0x314076=_0x3b5103[_0xc17045(0x34a)]?a32_0x2ce214[_0xc17045(0x257)]('✔'):a32_0x2ce214[_0xc17045(0x28b)]('✘');let _0x17ffc3='';if(_0x3b5103[_0xc17045(0x34a)]&&_0x3b5103[_0xc17045(0x302)]!==undefined&&_0x3b5103[_0xc17045(0x2ff)]!==undefined){const _0x236e88=_0x3b5103[_0xc17045(0x36c)]?.[_0xc17045(0x23a)](0x1)||'?',_0x3cbcb8=(_0x3b5103['customerPercent']??0x0)>=0x32?a32_0x2ce214[_0xc17045(0x257)]:(_0x3b5103[_0xc17045(0x36c)]??0x0)>=0x14?a32_0x2ce214['yellow']:a32_0x2ce214[_0xc17045(0x28b)];_0x17ffc3='\x20'+a32_0x2ce214[_0xc17045(0x1b3)](_0xc17045(0x1d2))+'\x20'+_0x3cbcb8(formatRows(_0x3b5103[_0xc17045(0x302)]))+'\x20('+_0x236e88+_0xc17045(0x1ed)+a32_0x2ce214[_0xc17045(0x1b3)](_0xc17045(0x2a9))+'\x20'+a32_0x2ce214[_0xc17045(0x1ac)](formatRows(_0x3b5103[_0xc17045(0x2ff)]));}console[_0xc17045(0x310)](_0x314076+'\x20'+a32_0x2ce214['bold'](_0x3b5103['name'])+_0x17ffc3),console['error']('\x20\x20'+a32_0x2ce214[_0xc17045(0x1b3)](_0xc17045(0x282))+'\x20'+a32_0x2ce214[_0xc17045(0x341)](_0x3b5103[_0xc17045(0x29e)]+'.'+_0x3b5103['table']));const _0xffa4eb=_0x3b5103[_0xc17045(0x35e)]===_0x3b5103[_0xc17045(0x1e4)]?a32_0x2ce214['dim'](_0xc17045(0x1b4))+'\x20'+_0x3b5103[_0xc17045(0x35e)]:a32_0x2ce214[_0xc17045(0x1b3)]('Join:')+'\x20'+_0x3b5103[_0xc17045(0x35e)]+'\x20=\x20'+_0x3b5103['foreignKey'];console['error']('\x20\x20'+_0xffa4eb),console['error']('\x20\x20'+a32_0x2ce214[_0xc17045(0x1b3)]('Columns:')),this[_0xc17045(0x32a)](_0x3b5103[_0xc17045(0x2a7)]),!_0x3b5103[_0xc17045(0x34a)]&&console['error']('\x20\x20'+a32_0x2ce214[_0xc17045(0x28b)](_0xc17045(0x321))+'\x20'+_0x3b5103[_0xc17045(0x1cd)]);}}[a32_0x5ce8d0(0x32a)](_0x5869c8){const _0x642cc4=a32_0x5ce8d0;for(const _0x2d0207 of _0x5869c8){_0x2d0207[_0x642cc4(0x349)]===_0x2d0207[_0x642cc4(0x1d5)]||_0x2d0207['column']==='*'?console[_0x642cc4(0x310)](_0x642cc4(0x1b8)+_0x2d0207[_0x642cc4(0x349)]):console[_0x642cc4(0x310)]('\x20\x20\x20\x20-\x20'+_0x2d0207[_0x642cc4(0x349)]+'\x20'+a32_0x2ce214[_0x642cc4(0x1b3)]('('+_0x2d0207[_0x642cc4(0x1d5)]+')'));}}['displaySummary'](_0x880b29){const _0x5402b4=a32_0x5ce8d0;console[_0x5402b4(0x310)]('─'[_0x5402b4(0x284)](0x3c));if(_0x880b29[_0x5402b4(0x393)]['length']>0x0){console['error']('\x0a'+a32_0x2ce214[_0x5402b4(0x28b)](_0x5402b4(0x37b)));for(const _0x22b332 of _0x880b29[_0x5402b4(0x393)]){console[_0x5402b4(0x310)]('\x20\x20'+a32_0x2ce214[_0x5402b4(0x28b)]('•')+'\x20'+_0x22b332);}}_0x880b29[_0x5402b4(0x1d4)]&&console[_0x5402b4(0x310)]('\x0a'+a32_0x2ce214[_0x5402b4(0x257)]('✔')+_0x5402b4(0x390));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{['name']=a32_0x5ce8d0(0x208);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x1e0);async[a32_0x5ce8d0(0x1bf)](_0x1bf564){const _0xbaabe0=a32_0x5ce8d0,{options:_0x481cc8,args:_0x327917,tdx:_0x1b385b}=_0x1bf564,_0x3f7c93=_0x481cc8,_0x35b1b8=_0x327917[0x0]||_0x481cc8[_0xbaabe0(0x21c)];if(!_0x35b1b8)return showParentSegmentNotSetError(_0xbaabe0(0x3af)+_0xbaabe0(0x296)+_0xbaabe0(0x27d)+_0xbaabe0(0x1a5)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+_0xbaabe0(0x27f)+_0xbaabe0(0x2d5)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x3f7c93[_0xbaabe0(0x274)]&&!_0x3f7c93[_0xbaabe0(0x236)]&&!_0x3f7c93['behavior']&&!_0x3f7c93[_0xbaabe0(0x2fe)])return console[_0xbaabe0(0x310)](a32_0x2ce214[_0xbaabe0(0x28b)](_0xbaabe0(0x3a5))),console[_0xbaabe0(0x310)](_0xbaabe0(0x258)),console[_0xbaabe0(0x310)]('Options:'),console[_0xbaabe0(0x310)](_0xbaabe0(0x333)),console[_0xbaabe0(0x310)](_0xbaabe0(0x1d8)),console[_0xbaabe0(0x310)](_0xbaabe0(0x34d)),console['error'](_0xbaabe0(0x204)),0x1;const _0x8ea671=resolveYamlFile(_0x35b1b8);if(!existsSync(_0x8ea671))return showFileNotFoundError(_0x8ea671,_0x35b1b8),0x1;_0x3f7c93[_0xbaabe0(0x3ae)]&&(console['error']('Site:\x20'+_0x3f7c93[_0xbaabe0(0x340)]),console['error'](_0xbaabe0(0x2e9)+_0x8ea671));let _0x43afff;try{_0x43afff=readFileSync(_0x8ea671,_0xbaabe0(0x270));}catch(_0x54c49a){const _0x458d86=_0x54c49a instanceof Error?_0x54c49a[_0xbaabe0(0x202)]:String(_0x54c49a);return console[_0xbaabe0(0x310)]('Error\x20reading\x20file:\x20'+_0x458d86),0x1;}let _0xe2c780;try{_0xe2c780=parseDef(_0x43afff);}catch(_0x15226c){const _0x131875=_0x15226c instanceof Error?_0x15226c['message']:String(_0x15226c);return console['error'](a32_0x2ce214['red']('Error\x20parsing\x20YAML:\x20'+_0x131875)),0x1;}if(_0x3f7c93['attribute']===!![]||_0x3f7c93[_0xbaabe0(0x236)]===''){const _0x4fdb41=_0xe2c780[_0xbaabe0(0x320)]?.[_0xbaabe0(0x372)](_0x3882ed=>_0x3882ed[_0xbaabe0(0x387)])||[];if(_0x4fdb41[_0xbaabe0(0x18f)]===0x0)console[_0xbaabe0(0x310)](a32_0x2ce214[_0xbaabe0(0x28b)](_0xbaabe0(0x26d)));else{console[_0xbaabe0(0x310)](a32_0x2ce214[_0xbaabe0(0x28b)](_0xbaabe0(0x32f))),console[_0xbaabe0(0x310)]('Available\x20attributes:');for(const _0x5a998c of _0x4fdb41){console[_0xbaabe0(0x310)]('\x20\x20'+a32_0x2ce214['cyan'](_0x5a998c));}console['error'](_0xbaabe0(0x273)+_0x35b1b8+'\x20--attribute\x20\x22'+_0x4fdb41[0x0]+'\x22');}return 0x1;}if(_0x3f7c93[_0xbaabe0(0x2d4)]===!![]||_0x3f7c93[_0xbaabe0(0x2d4)]===''){const _0x3f9f1c=_0xe2c780['behaviors']?.['map'](_0x347376=>_0x347376['name'])||[];if(_0x3f9f1c[_0xbaabe0(0x18f)]===0x0)console['error'](a32_0x2ce214[_0xbaabe0(0x28b)]('Error:\x20No\x20behaviors\x20defined\x20in\x20configuration'));else{console[_0xbaabe0(0x310)](a32_0x2ce214[_0xbaabe0(0x28b)](_0xbaabe0(0x292))),console[_0xbaabe0(0x310)](_0xbaabe0(0x1e9));for(const _0x17592d of _0x3f9f1c){console[_0xbaabe0(0x310)]('\x20\x20'+a32_0x2ce214[_0xbaabe0(0x1ac)](_0x17592d));}console[_0xbaabe0(0x310)](_0xbaabe0(0x273)+_0x35b1b8+_0xbaabe0(0x1b0)+_0x3f9f1c[0x0]+'\x22');}return 0x1;}const _0x193cb=createCommandSpinner(a32_0x2ce214[_0xbaabe0(0x1b3)](_0xbaabe0(0x2f6)),{'verbose':_0x3f7c93['verbose']});_0x193cb[_0xbaabe0(0x23e)]();const _0x1ba236={'onProgress':_0x5ec846=>{const _0xbf252d=_0xbaabe0;_0x193cb[_0xbf252d(0x30f)]=formatProgressMessage(_0x5ec846);}};if(_0x3f7c93[_0xbaabe0(0x274)])_0x1ba236[_0xbaabe0(0x274)]=!![];if(_0x3f7c93['attribute']&&typeof _0x3f7c93[_0xbaabe0(0x236)]===_0xbaabe0(0x353))_0x1ba236[_0xbaabe0(0x236)]=_0x3f7c93[_0xbaabe0(0x236)];if(_0x3f7c93['behavior']&&typeof _0x3f7c93['behavior']===_0xbaabe0(0x353))_0x1ba236[_0xbaabe0(0x2d4)]=_0x3f7c93[_0xbaabe0(0x2d4)];if(_0x3f7c93[_0xbaabe0(0x2fe)])_0x1ba236['enriched']=!![];if(_0x3f7c93[_0xbaabe0(0x316)])_0x1ba236['interval']=_0x3f7c93[_0xbaabe0(0x316)];let _0x4e0189;try{_0x4e0189=await _0x1b385b['segment'][_0xbaabe0(0x1eb)](_0x43afff,_0x1ba236),_0x193cb[_0xbaabe0(0x287)]();}catch(_0x5efc67){_0x193cb[_0xbaabe0(0x287)]();throw _0x5efc67;}return await this[_0xbaabe0(0x1b7)](_0x4e0189,{'master':_0x3f7c93['master'],'attribute':typeof _0x3f7c93[_0xbaabe0(0x236)]===_0xbaabe0(0x353)?_0x3f7c93[_0xbaabe0(0x236)]:undefined,'behavior':typeof _0x3f7c93[_0xbaabe0(0x2d4)]===_0xbaabe0(0x353)?_0x3f7c93['behavior']:undefined,'enriched':_0x3f7c93[_0xbaabe0(0x2fe)]}),_0x4e0189[_0xbaabe0(0x1d4)]?0x0:0x1;}async[a32_0x5ce8d0(0x1b7)](_0x491fda,_0x3e2b0a){const _0x478367=a32_0x5ce8d0;console['error']('\x0a'+a32_0x2ce214[_0x478367(0x341)](_0x478367(0x2ac))+'\x20'+_0x491fda['name']),console['error']('═'[_0x478367(0x284)](0x3c));if(_0x3e2b0a[_0x478367(0x274)]&&_0x491fda[_0x478367(0x305)]){const _0x1ad26b=a32_0x2ce214[_0x478367(0x1b3)](_0x478367(0x28c))+'\x20'+a32_0x2ce214[_0x478367(0x341)](_0x491fda[_0x478367(0x274)]['database']+'.'+_0x491fda[_0x478367(0x274)][_0x478367(0x1c5)]);await this[_0x478367(0x1fd)](_0x1ad26b,_0x491fda[_0x478367(0x305)]);}else{if(_0x3e2b0a[_0x478367(0x236)]&&_0x491fda[_0x478367(0x305)]){const _0x34d316=a32_0x2ce214[_0x478367(0x1b3)]('Attribute:')+'\x20'+a32_0x2ce214[_0x478367(0x341)](_0x3e2b0a[_0x478367(0x236)]);await this[_0x478367(0x1fd)](_0x34d316,_0x491fda[_0x478367(0x305)]);}else{if(_0x3e2b0a[_0x478367(0x2d4)]&&_0x491fda[_0x478367(0x305)]){const _0x4749d8=a32_0x2ce214[_0x478367(0x1b3)](_0x478367(0x36a))+'\x20'+a32_0x2ce214['bold'](_0x3e2b0a[_0x478367(0x2d4)]);await this[_0x478367(0x1fd)](_0x4749d8,_0x491fda[_0x478367(0x305)]);}else{if(_0x3e2b0a[_0x478367(0x2fe)]&&_0x491fda[_0x478367(0x305)]){const _0x3b1d42=a32_0x2ce214['dim']('Enriched:')+'\x20'+a32_0x2ce214[_0x478367(0x341)]('Master\x20+\x20Attributes');await this[_0x478367(0x1fd)](_0x3b1d42,_0x491fda[_0x478367(0x305)]);}else!_0x491fda[_0x478367(0x305)]&&console[_0x478367(0x310)](_0x478367(0x37c));}}}if(_0x491fda[_0x478367(0x393)][_0x478367(0x18f)]>0x0){console['error']('─'[_0x478367(0x284)](0x3c)),console[_0x478367(0x310)]('\x0a'+a32_0x2ce214[_0x478367(0x28b)]('Errors:'));for(const _0x45a7a8 of _0x491fda['errors']){console[_0x478367(0x310)]('\x20\x20'+a32_0x2ce214[_0x478367(0x28b)]('•')+'\x20'+_0x45a7a8);}}}async[a32_0x5ce8d0(0x1fd)](_0x2d4112,_0x5840ff){const _0x5fa156=a32_0x5ce8d0;if(_0x5840ff[_0x5fa156(0x18f)]===0x0){console[_0x5fa156(0x310)]('\x0a'+_0x2d4112),console[_0x5fa156(0x310)](_0x5fa156(0x2bf));return;}console[_0x5fa156(0x310)]('\x0a'+_0x2d4112);const _0x36324e=Object['keys'](_0x5840ff[0x0])[_0x5fa156(0x372)](_0x3bee56=>({'name':_0x3bee56,'type':typeof _0x5840ff[0x0][_0x3bee56]==='number'?_0x5fa156(0x2fa):'varchar'})),_0x26e364={'queryId':'preview','columns':_0x36324e,'data':_0x5840ff,'stats':{'state':_0x5fa156(0x351),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x5840ff['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0xf7483=formatAsTable(_0x26e364,_0x5840ff[_0x5fa156(0x18f)],!![]);await writeOutput(_0xf7483,undefined,'table');}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{['name']=a32_0x5ce8d0(0x2be);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x2b0);async[a32_0x5ce8d0(0x1bf)](_0x198707){const _0x1409d8=a32_0x5ce8d0,{options:_0x5d52e0,args:_0x49a986,tdx:_0x4fe35f}=_0x198707,_0xe93a31=_0x5d52e0,_0x45c562=_0x49a986[0x0]||_0x5d52e0[_0x1409d8(0x21c)];if(!_0x45c562)return showParentSegmentNotSetError(_0x1409d8(0x2dd)+_0x1409d8(0x19a)),0x1;const _0x53036a=resolveYamlFile(_0x45c562);if(existsSync(_0x53036a)){_0xe93a31[_0x1409d8(0x3ae)]&&console[_0x1409d8(0x310)](_0x1409d8(0x1b6)+_0x53036a);let _0x26feff;try{_0x26feff=readFileSync(_0x53036a,'utf-8');}catch(_0x321392){const _0x54ee53=_0x321392 instanceof Error?_0x321392['message']:String(_0x321392);return console[_0x1409d8(0x310)](_0x1409d8(0x1ea)+_0x54ee53),0x1;}const _0x3ef727=await withSpinner(_0x1409d8(0x18b),()=>_0x4fe35f[_0x1409d8(0x31c)][_0x1409d8(0x2f0)](_0x26feff),{'verbose':_0xe93a31[_0x1409d8(0x3ae)]}),_0x5ad417=_0x3ef727[_0x1409d8(0x330)],{isNew:_0x345adb,name:_0xb78d38,hasChanges:_0x1d8008,diffFormatted:_0x51692e}=_0x5ad417;if(_0x1d8008){_0x345adb?console[_0x1409d8(0x310)](_0x1409d8(0x183)+_0xb78d38+'\x27:'):console[_0x1409d8(0x310)](_0x1409d8(0x2cc)+_0xb78d38+'\x27:');console[_0x1409d8(0x310)]('─'[_0x1409d8(0x284)](0x3c)),console[_0x1409d8(0x310)](_0x51692e),console[_0x1409d8(0x310)]('─'['repeat'](0x3c));const _0x3a992f=_0x345adb?_0x1409d8(0x264)+_0xb78d38+_0x1409d8(0x319):_0x1409d8(0x19b)+_0xb78d38+_0x1409d8(0x319);if(!_0xe93a31[_0x1409d8(0x25d)]){if(!isInteractive())return console[_0x1409d8(0x310)](a32_0x2ce214[_0x1409d8(0x28b)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x1409d8(0x310)](a32_0x2ce214[_0x1409d8(0x1b3)](_0x1409d8(0x23b))),0x1;const _0x53d866=await confirmKey(_0x3a992f);if(!_0x53d866)return console[_0x1409d8(0x310)](a32_0x2ce214['yellow'](_0x1409d8(0x39d))),0x1;}const _0x501b71=_0x345adb?_0x1409d8(0x2c1):_0x1409d8(0x33b);await withSpinner(_0x501b71+'\x20parent\x20segment\x20\x27'+_0xb78d38+_0x1409d8(0x231),()=>_0x5ad417[_0x1409d8(0x378)](),{'verbose':_0xe93a31[_0x1409d8(0x3ae)]});const _0x451cc9=_0x345adb?_0x1409d8(0x2d6):_0x1409d8(0x279);console[_0x1409d8(0x310)]('✔\x20'+_0x451cc9+_0x1409d8(0x37f)+_0xb78d38+'\x27');}else console[_0x1409d8(0x310)]('✔\x20No\x20changes\x20-\x20\x27'+_0xb78d38+'\x27\x20is\x20up\x20to\x20date');}const _0x376e52=await withSpinner(_0x1409d8(0x1db)+_0x45c562+_0x1409d8(0x231),()=>_0x4fe35f[_0x1409d8(0x31c)][_0x1409d8(0x1f8)](_0x45c562),{'verbose':_0xe93a31[_0x1409d8(0x3ae)]}),_0x4194b9=_0x376e52[_0x1409d8(0x330)],_0xf90650=getConsoleUrl(_0xe93a31[_0x1409d8(0x340)],'/app/workflows/'+_0x4194b9[_0x1409d8(0x1e3)]+_0x1409d8(0x2c2)+_0x4194b9[_0x1409d8(0x1c0)]+_0x1409d8(0x2d2)+_0x4194b9[_0x1409d8(0x397)]);return console[_0x1409d8(0x310)](_0x1409d8(0x1f0)),console[_0x1409d8(0x310)]('\x20\x20'+a32_0x2ce214[_0x1409d8(0x1b3)](_0x1409d8(0x38b))+'\x20'+_0x4194b9[_0x1409d8(0x2b4)]),console[_0x1409d8(0x310)]('\x20\x20'+a32_0x2ce214[_0x1409d8(0x1b3)](_0x1409d8(0x347))+'\x20'+_0x4194b9[_0x1409d8(0x260)]),console[_0x1409d8(0x310)]('\x20\x20'+a32_0x2ce214[_0x1409d8(0x1b3)](_0x1409d8(0x2dc))+'\x20'+_0x4194b9[_0x1409d8(0x1c0)]),console['error']('\x20\x20'+a32_0x2ce214[_0x1409d8(0x1b3)](_0x1409d8(0x35f))+'\x20'+_0x4194b9[_0x1409d8(0x397)]),console['error']('\x20\x20'+_0xf90650),console[_0x1409d8(0x310)]('\x0a'+a32_0x2ce214[_0x1409d8(0x1b3)](_0x1409d8(0x2ef))+'\x20tdx\x20wf\x20attempt\x20'+_0x4194b9[_0x1409d8(0x397)]+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x1af);['description']=a32_0x5ce8d0(0x32c);async[a32_0x5ce8d0(0x1bf)](_0x355c70){const _0x2fb42e=a32_0x5ce8d0,{options:_0x39bd31,args:_0x973af5,tdx:_0x4ad3f0}=_0x355c70,_0x18930c=_0x973af5[0x0]||_0x39bd31['parentSegment'];if(!_0x18930c)return showParentSegmentNotSetError(_0x2fb42e(0x20d)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment'),0x1;_0x39bd31['verbose']&&(console[_0x2fb42e(0x310)](_0x2fb42e(0x18d)+_0x39bd31[_0x2fb42e(0x340)]),console[_0x2fb42e(0x310)](_0x2fb42e(0x1f6)+_0x18930c));const _0x359d1d=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x18930c+'\x27...',()=>_0x4ad3f0[_0x2fb42e(0x31c)][_0x2fb42e(0x2d8)](_0x18930c),{'verbose':_0x39bd31[_0x2fb42e(0x3ae)]}),_0x33b99b=_0x359d1d['data'];console[_0x2fb42e(0x310)](_0x2fb42e(0x226)+_0x33b99b['length']+_0x2fb42e(0x203)+(_0x33b99b['length']!==0x1?'s':''));if(_0x39bd31[_0x2fb42e(0x1b2)]||_0x39bd31[_0x2fb42e(0x22b)])return await handleSDKOutput(_0x33b99b,_0x39bd31),0x0;return displayFieldsHumanReadable(_0x33b99b,_0x18930c),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x39e);[a32_0x5ce8d0(0x27a)]='Show\x20parent\x20segment\x20details';async['execute'](_0x46bf18){const _0x348733=a32_0x5ce8d0,{options:_0x5efe17,args:_0x1168d6,tdx:_0x5b4c51}=_0x46bf18,_0x426309=_0x5efe17,_0x4fc455=_0x1168d6[0x0]||_0x5efe17[_0x348733(0x21c)];if(!_0x4fc455)return showParentSegmentNotSetError(_0x348733(0x33a)+_0x348733(0x184)+_0x348733(0x1c6)+_0x348733(0x2a6)),0x1;_0x5efe17[_0x348733(0x3ae)]&&(console[_0x348733(0x310)]('Site:\x20'+_0x5efe17[_0x348733(0x340)]),console[_0x348733(0x310)](_0x348733(0x1f6)+_0x4fc455));const _0x258fe6=await withSpinner(_0x348733(0x1e6)+_0x4fc455+_0x348733(0x231),()=>_0x5b4c51[_0x348733(0x31c)][_0x348733(0x281)](_0x4fc455),{'verbose':_0x5efe17[_0x348733(0x3ae)]}),_0x204fa8=_0x258fe6[_0x348733(0x330)];if(_0x426309['web']){const _0x6f0deb=getConsoleNextUrl(_0x426309[_0x348733(0x340)],_0x348733(0x1ef)+_0x204fa8['id']);return console[_0x348733(0x310)](a32_0x2ce214['green']('✔')+_0x348733(0x2a2)+a32_0x2ce214[_0x348733(0x1ac)](_0x6f0deb)),openBrowser(_0x6f0deb),0x0;}return await handleSingleObjectOutput(_0x204fa8,_0x5efe17),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x2a4);['description']=a32_0x5ce8d0(0x216);async['execute'](_0x43a5a1){const _0x51b326=a32_0x5ce8d0,{options:_0x492f74,args:_0x16b7bd,tdx:_0x2e7f16}=_0x43a5a1,_0x4085d2=_0x492f74,_0x32c6cb=_0x16b7bd[0x0]||_0x492f74[_0x51b326(0x21c)];if(!_0x32c6cb)return showParentSegmentNotSetError(_0x51b326(0x1f5)+_0x51b326(0x27c)+_0x51b326(0x1c6)+_0x51b326(0x224)),0x1;_0x492f74[_0x51b326(0x3ae)]&&(console[_0x51b326(0x310)](_0x51b326(0x18d)+_0x492f74[_0x51b326(0x340)]),console[_0x51b326(0x310)](_0x51b326(0x1f6)+_0x32c6cb));const _0x46b0ae=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x32c6cb+_0x51b326(0x231),()=>_0x2e7f16[_0x51b326(0x31c)][_0x51b326(0x1f4)](_0x32c6cb),{'verbose':_0x492f74[_0x51b326(0x3ae)]}),_0x30e984=_0x46b0ae['data'],_0x398333=_0x2e7f16[_0x51b326(0x31c)][_0x51b326(0x26a)](_0x30e984);if(_0x4085d2[_0x51b326(0x2b6)]){const _0x185064=await this[_0x51b326(0x381)](_0x43a5a1,_0x32c6cb,_0x30e984,_0x398333),_0x5af349=this[_0x51b326(0x297)](_0x185064);writeFileSync(_0x4085d2['output'],_0x5af349);const _0x96cff7=_0x185064['customers'][_0x51b326(0x2a7)][_0x51b326(0x18f)]+_0x185064[_0x51b326(0x1b1)][_0x51b326(0x2c5)]((_0x3f50f7,_0x3aa9b9)=>_0x3f50f7+_0x3aa9b9[_0x51b326(0x2a7)][_0x51b326(0x18f)],0x0),_0x5afd80=_0x185064[_0x51b326(0x1b1)][_0x51b326(0x1bc)](_0xcd3ae5=>_0xcd3ae5[_0x51b326(0x2a7)][_0x51b326(0x18f)]===0x0)[_0x51b326(0x18f)];return console[_0x51b326(0x21d)](_0x51b326(0x1c7)+_0x4085d2['output']),console[_0x51b326(0x21d)](_0x51b326(0x29d)+_0x398333),console['log'](_0x51b326(0x243)+_0x185064[_0x51b326(0x1b1)][_0x51b326(0x18f)]+_0x51b326(0x1a1)),console[_0x51b326(0x21d)]('\x20\x20Columns:\x20'+_0x96cff7+_0x51b326(0x295)),_0x5afd80>0x0&&console[_0x51b326(0x21d)](_0x51b326(0x359)+_0x5afd80+_0x51b326(0x1f3)),0x0;}console[_0x51b326(0x310)]('\x0a'+a32_0x2ce214[_0x51b326(0x341)]('Output\x20Database:')+'\x20'+a32_0x2ce214['cyan'](_0x398333));const _0xf0d5bc=await withSpinner(_0x51b326(0x31a),()=>_0x2e7f16['segment']['getParentSQL'](_0x30e984),{'verbose':_0x492f74[_0x51b326(0x3ae)]});console[_0x51b326(0x310)]('\x0a'+a32_0x2ce214[_0x51b326(0x341)](_0x51b326(0x367))+'\x20'+a32_0x2ce214[_0x51b326(0x1b3)]('('+_0x398333+_0x51b326(0x1a4)));const _0x27bcd5=await executeSchemaQuery(_0xf0d5bc[_0x51b326(0x330)],_0x2e7f16,_0x492f74);await handleQueryOutput(_0x27bcd5,_0x492f74);const _0x5c0969=await withSpinner(_0x51b326(0x220),()=>_0x2e7f16[_0x51b326(0x31c)][_0x51b326(0x235)](_0x30e984),{'verbose':_0x492f74[_0x51b326(0x3ae)]});for(const _0x447557 of _0x5c0969[_0x51b326(0x330)]){const _0x242b26='behavior_'+_0x447557[_0x51b326(0x291)]()[_0x51b326(0x2d0)](/\s+/g,'_'),_0x55d5ea=_0x51b326(0x1ee)+_0x398333+'.'+_0x242b26;console[_0x51b326(0x310)]('\x0a'+a32_0x2ce214[_0x51b326(0x341)](_0x447557)+'\x20'+a32_0x2ce214[_0x51b326(0x1b3)]('('+_0x398333+'.'+_0x242b26+')'));try{const _0x8720fe=await executeSchemaQuery(_0x55d5ea,_0x2e7f16,_0x492f74);await handleQueryOutput(_0x8720fe,_0x492f74);}catch{console['error'](a32_0x2ce214['yellow'](_0x51b326(0x210)));}}return 0x0;}async[a32_0x5ce8d0(0x381)](_0x42722a,_0x42fee0,_0x3c1f9a,_0x195195){const _0x54df7f=a32_0x5ce8d0,{options:_0xccb170,tdx:_0x2c700a}=_0x42722a,_0x518346=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x2c700a[_0x54df7f(0x31c)][_0x54df7f(0x23d)](_0x3c1f9a),{'verbose':_0xccb170['verbose']}),_0x3b262a=await executeSchemaQuery(_0x518346[_0x54df7f(0x330)],_0x2c700a,_0xccb170),_0x10496c=_0x3b262a['data'][_0x54df7f(0x372)](_0xeac8e3=>({'name':_0xeac8e3['column_name'],'type':_0xeac8e3[_0x54df7f(0x2e4)]})),_0x3e4d9c=await withSpinner(_0x54df7f(0x220),()=>_0x2c700a[_0x54df7f(0x31c)][_0x54df7f(0x235)](_0x3c1f9a),{'verbose':_0xccb170[_0x54df7f(0x3ae)]}),_0x4fd4ea=[];for(const _0x4daea4 of _0x3e4d9c['data']){const _0x26bb43=_0x54df7f(0x26f)+_0x4daea4[_0x54df7f(0x291)]()[_0x54df7f(0x2d0)](/\s+/g,'_'),_0x48556b='SELECT\x20*\x20FROM\x20'+_0x195195+'.'+_0x26bb43;let _0x4f907e=[];try{const _0x1affa8=await executeSchemaQuery(_0x48556b,_0x2c700a,_0xccb170);_0x4f907e=_0x1affa8[_0x54df7f(0x330)][_0x54df7f(0x372)](_0x575940=>({'name':_0x575940['column_name'],'type':_0x575940['column_type']}));}catch{}_0x4fd4ea[_0x54df7f(0x182)]({'table':_0x26bb43,'columns':_0x4f907e});}return{'database':_0x195195,'parent_segment':_0x42fee0,'parent_id':_0x3c1f9a,'customers':{'table':'customers','columns':_0x10496c},'behaviors':_0x4fd4ea};}[a32_0x5ce8d0(0x297)](_0xb05d03){const _0x3febd1=a32_0x5ce8d0,_0x49d10f=_0x67c64f=>{const _0x2932bd=a32_0x517d;if(_0x67c64f[_0x2932bd(0x18f)]===0x0)return'[]';const _0x698695=_0x67c64f[_0x2932bd(0x372)](_0x2137ea=>_0x2932bd(0x304)+_0x2137ea['name']+_0x2932bd(0x2b5)+_0x2137ea[_0x2932bd(0x2ad)]+_0x2932bd(0x2f3));return'[\x0a'+_0x698695[_0x2932bd(0x199)](',\x0a')+_0x2932bd(0x329);},_0xf38b06=_0xb05d03[_0x3febd1(0x1b1)][_0x3febd1(0x372)](_0x349b2f=>{const _0x19b5be=_0x3febd1;return _0x19b5be(0x22c)+_0x349b2f[_0x19b5be(0x1c5)]+_0x19b5be(0x2a1)+_0x49d10f(_0x349b2f[_0x19b5be(0x2a7)])[_0x19b5be(0x2d0)](/^/gm,'\x20\x20')['trim']()+_0x19b5be(0x377);})[_0x3febd1(0x199)](',\x0a');return _0x3febd1(0x20f)+_0xb05d03[_0x3febd1(0x29e)]+_0x3febd1(0x21b)+_0xb05d03[_0x3febd1(0x294)]+_0x3febd1(0x323)+_0xb05d03[_0x3febd1(0x2ee)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0xb05d03[_0x3febd1(0x367)][_0x3febd1(0x1c5)]+'\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20'+_0x49d10f(_0xb05d03[_0x3febd1(0x367)][_0x3febd1(0x2a7)])['replace'](/^/gm,'\x20\x20')['trim']()+_0x3febd1(0x361)+_0xf38b06+_0x3febd1(0x303);}}export class ParentSegmentSQLCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x209);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x251);async[a32_0x5ce8d0(0x1bf)](_0x3624e4){const _0x244d5c=a32_0x5ce8d0,{options:_0x205a33,args:_0x56bcdc,tdx:_0x395c30}=_0x3624e4,_0x4bb807=_0x56bcdc[0x0]||_0x205a33[_0x244d5c(0x21c)];if(!_0x4bb807)return showParentSegmentNotSetError(_0x244d5c(0x392)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment'),0x1;_0x205a33[_0x244d5c(0x3ae)]&&(console[_0x244d5c(0x310)](_0x244d5c(0x18d)+_0x205a33['site']),console[_0x244d5c(0x310)](_0x244d5c(0x1f6)+_0x4bb807));const _0x1d7134=await withSpinner(_0x244d5c(0x3aa)+_0x4bb807+'\x27...',()=>_0x395c30['segment']['resolveParentId'](_0x4bb807),{'verbose':_0x205a33[_0x244d5c(0x3ae)]}),_0x4b5af2=_0x1d7134[_0x244d5c(0x330)],_0x6d9e18=await withSpinner(_0x244d5c(0x28d)+_0x4bb807+'\x27...',()=>_0x395c30[_0x244d5c(0x31c)][_0x244d5c(0x23d)](_0x4b5af2),{'verbose':_0x205a33[_0x244d5c(0x3ae)]}),_0xbd95b=_0x6d9e18[_0x244d5c(0x330)];return _0x205a33['format']===_0x244d5c(0x1b2)||_0x205a33[_0x244d5c(0x23c)]===_0x244d5c(0x22b)?await handleSDKOutput([{'sql':_0xbd95b}],_0x205a33):console[_0x244d5c(0x21d)](_0xbd95b),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x37d);[a32_0x5ce8d0(0x27a)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a32_0x5ce8d0(0x1bf)](_0x229cf0){const _0xbf3cf3=a32_0x5ce8d0,{options:_0x551c3c,args:_0xd1d8f7,tdx:_0x18d89b}=_0x229cf0,_0x5d1907=_0xd1d8f7[0x0]||_0x551c3c['parentSegment'];if(!_0x5d1907)return showParentSegmentNotSetError(_0xbf3cf3(0x3ac)+'\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;_0x551c3c[_0xbf3cf3(0x3ae)]&&(console['error']('Site:\x20'+_0x551c3c['site']),console[_0xbf3cf3(0x310)](_0xbf3cf3(0x1f6)+_0x5d1907));const _0x222a23=await withSpinner(_0xbf3cf3(0x3aa)+_0x5d1907+_0xbf3cf3(0x231),()=>_0x18d89b[_0xbf3cf3(0x31c)][_0xbf3cf3(0x1f4)](_0x5d1907),{'verbose':_0x551c3c[_0xbf3cf3(0x3ae)]}),_0x417c57=_0x222a23[_0xbf3cf3(0x330)],_0x107f18=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x5d1907+'\x27...',()=>_0x18d89b[_0xbf3cf3(0x31c)][_0xbf3cf3(0x23d)](_0x417c57),{'verbose':_0x551c3c['verbose']});let _0xa3ab59=_0x107f18[_0xbf3cf3(0x330)];const _0x3bcb2b=resolveLimit(_0x551c3c[_0xbf3cf3(0x2fd)],DEFAULT_DISPLAY_LIMIT),_0x49f6ba=/\bLIMIT\s+\d+/i['test'](_0xa3ab59);!_0x49f6ba&&(_0xa3ab59=_0xa3ab59[_0xbf3cf3(0x280)]()[_0xbf3cf3(0x2d0)](/;+$/,''),_0xa3ab59=_0xbf3cf3(0x37a)+_0xa3ab59+_0xbf3cf3(0x250)+_0x3bcb2b);_0x551c3c[_0xbf3cf3(0x3ae)]&&console['error'](_0xbf3cf3(0x293)+_0xa3ab59);const _0x2ed562=await withProgressSpinner(_0xbf3cf3(0x34b),async _0x4b3fa7=>{const _0x52e15e=_0xbf3cf3,_0x23a0fb=await _0x18d89b['query'][_0x52e15e(0x1bf)](_0xa3ab59,{'catalog':'td','schema':'information_schema','onJobId':_0x443071=>{_0x4b3fa7['setJobId'](_0x443071);}});return _0x23a0fb;},{'verbose':_0x551c3c[_0xbf3cf3(0x3ae)]}),_0x3cfd1f=_0x2ed562['data'],_0x40f7e4=_0x3cfd1f['jobId']?_0xbf3cf3(0x3a6)+_0x3cfd1f['jobId']+']':'';return console[_0xbf3cf3(0x310)](_0xbf3cf3(0x29c)+_0x3cfd1f[_0xbf3cf3(0x3a8)][_0xbf3cf3(0x31f)][_0xbf3cf3(0x362)]()+_0xbf3cf3(0x30e)+(_0xbf3cf3(0x1c3)+formatElapsed(_0x3cfd1f[_0xbf3cf3(0x3a8)][_0xbf3cf3(0x2f4)])+_0x40f7e4)),await handleQueryOutput(_0x3cfd1f,_0x551c3c),0x0;}}export class PSRtListCommand extends BaseCommand{['name']='ps:rt:list';[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x35a);async[a32_0x5ce8d0(0x1bf)](_0x3ef22d){const _0x16dc28=a32_0x5ce8d0,{options:_0x9f0b0,args:_0x161300,tdx:_0x2128e4}=_0x3ef22d,_0x582e9d=_0x161300[0x0],_0x2f212f=await withSpinner(_0x582e9d?_0x16dc28(0x3ad)+_0x582e9d+_0x16dc28(0x231):_0x16dc28(0x1a0),()=>_0x2128e4[_0x16dc28(0x187)][_0x16dc28(0x22a)](),{'verbose':_0x9f0b0[_0x16dc28(0x3ae)]});let _0x25d648=_0x2f212f['data'][_0x16dc28(0x1bc)](_0x4c27c5=>_0x4c27c5[_0x16dc28(0x242)]);if(_0x582e9d){const _0x270ccf=_0x582e9d[_0x16dc28(0x2d0)](/[.+^${}()|[\]\\]/g,_0x16dc28(0x354))['replace'](/\*/g,'.*')[_0x16dc28(0x2d0)](/\?/g,'.'),_0x28753d=new RegExp('^'+_0x270ccf+'$','i');_0x25d648=_0x25d648[_0x16dc28(0x1bc)](_0xa66134=>_0x28753d[_0x16dc28(0x241)](_0xa66134[_0x16dc28(0x387)]));}_0x25d648['sort']((_0x43b41e,_0x13837e)=>_0x43b41e[_0x16dc28(0x387)][_0x16dc28(0x370)](_0x13837e[_0x16dc28(0x387)])),console[_0x16dc28(0x310)]('✔\x20Found\x20'+_0x25d648[_0x16dc28(0x18f)]+'\x20RT-enabled\x20parent\x20segment'+(_0x25d648['length']!==0x1?'s':''));const _0x57ba07=_0x5e3c9d=>{return getConsoleNextUrl(_0x9f0b0['site'],'/app/dw/parentSegments/'+_0x5e3c9d);};if(_0x9f0b0[_0x16dc28(0x23c)]===_0x16dc28(0x1b2)||_0x9f0b0[_0x16dc28(0x23c)]===_0x16dc28(0x22b)){const _0x5c3c82=_0x25d648[_0x16dc28(0x372)](_0x5be2e4=>({..._0x5be2e4,'url':_0x57ba07(_0x5be2e4['id'])}));await handleSDKOutput(_0x5c3c82,_0x9f0b0);}else{if(_0x25d648['length']===0x0)console[_0x16dc28(0x21d)](_0x16dc28(0x39b));else for(const _0x42490f of _0x25d648){const _0x309ee8=_0x42490f[_0x16dc28(0x193)]?a32_0x2ce214[_0x16dc28(0x1b3)]('\x20('+formatRows(_0x42490f[_0x16dc28(0x193)])+')'):'',_0x2f2673=hyperlink(_0x42490f[_0x16dc28(0x387)],_0x57ba07(_0x42490f['id']));console['log']('⚡\x20'+_0x2f2673+_0x309ee8);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']=a32_0x5ce8d0(0x2a8);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x262);async[a32_0x5ce8d0(0x1bf)](_0x26b237){const _0x23a9c8=a32_0x5ce8d0,{options:_0xaaae2a,args:_0x2e1363,tdx:_0x4ae414}=_0x26b237,_0x4684cd=_0x2e1363[0x0]||_0xaaae2a[_0x23a9c8(0x21c)];if(!_0x4684cd)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment'),0x1;const _0xaf61d6=resolveYamlFile(_0x4684cd);if(!existsSync(_0xaf61d6))return showFileNotFoundError(_0xaf61d6,_0x4684cd),0x1;let _0x1c18a1;try{_0x1c18a1=readFileSync(_0xaf61d6,_0x23a9c8(0x270));}catch(_0x9ef1bd){const _0x44c1d0=_0x9ef1bd instanceof Error?_0x9ef1bd[_0x23a9c8(0x202)]:String(_0x9ef1bd);return console[_0x23a9c8(0x310)](_0x23a9c8(0x1ea)+_0x44c1d0),0x1;}const _0x4ab2d6=createCommandSpinner(a32_0x2ce214[_0x23a9c8(0x1b3)](_0x23a9c8(0x271)),{'verbose':_0xaaae2a[_0x23a9c8(0x3ae)]});_0x4ab2d6[_0x23a9c8(0x23e)]();const _0x1a913c={'realtime':!![],'onProgress':_0x1d8d50=>{_0x4ab2d6['text']=formatProgressMessage(_0x1d8d50);}};let _0x167bb8;try{_0x167bb8=await _0x4ae414[_0x23a9c8(0x31c)][_0x23a9c8(0x376)](_0x1c18a1,_0x1a913c),_0x4ab2d6[_0x23a9c8(0x287)]();}catch(_0x2b5adb){_0x4ab2d6[_0x23a9c8(0x287)]();throw _0x2b5adb;}console['error']('\x0a'+a32_0x2ce214[_0x23a9c8(0x341)](_0x23a9c8(0x375))+'\x20'+_0x167bb8[_0x23a9c8(0x387)]),console[_0x23a9c8(0x310)]('═'[_0x23a9c8(0x284)](0x3c)),displayRealtimeValidation(_0x167bb8),console[_0x23a9c8(0x310)]('─'['repeat'](0x3c));if(_0x167bb8[_0x23a9c8(0x393)][_0x23a9c8(0x18f)]>0x0){console[_0x23a9c8(0x310)]('\x0a'+a32_0x2ce214[_0x23a9c8(0x28b)](_0x23a9c8(0x37b)));for(const _0x1e05f5 of _0x167bb8[_0x23a9c8(0x393)]){console[_0x23a9c8(0x310)]('\x20\x20'+a32_0x2ce214[_0x23a9c8(0x28b)]('•')+'\x20'+_0x1e05f5);}}return _0x167bb8[_0x23a9c8(0x1d4)]&&console[_0x23a9c8(0x310)]('\x0a'+a32_0x2ce214[_0x23a9c8(0x257)]('✔')+_0x23a9c8(0x360)),_0x167bb8[_0x23a9c8(0x1d4)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x306);['description']='List\x20RT\x20journeys';async['execute'](_0x111413){const _0x44e491=a32_0x5ce8d0,{options:_0xdb1600,args:_0xd2acbb,tdx:_0x53613b}=_0x111413,_0x16855c=_0xd2acbb[0x0]||_0xdb1600['parentSegment'];if(!_0x16855c)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a'+_0x44e491(0x246)),0x1;_0xdb1600[_0x44e491(0x3ae)]&&(console[_0x44e491(0x310)](_0x44e491(0x18d)+_0xdb1600[_0x44e491(0x340)]),console['error']('Parent\x20segment:\x20'+_0x16855c));const _0x4a4753=await withSpinner(_0x44e491(0x3aa)+_0x16855c+_0x44e491(0x231),()=>_0x53613b['segment']['resolveParentId'](_0x16855c),{'verbose':_0xdb1600[_0x44e491(0x3ae)]}),_0x37e3cb=_0x4a4753['data'],_0x4c5716=await withSpinner(_0x44e491(0x263)+_0x16855c+'\x27...',()=>_0x53613b['realtime'][_0x44e491(0x22f)](_0x37e3cb),{'verbose':_0xdb1600[_0x44e491(0x3ae)]}),_0x346d3b=_0x4c5716[_0x44e491(0x330)];console['error']('✔\x20Found\x20'+_0x346d3b[_0x44e491(0x18f)]+_0x44e491(0x233)+(_0x346d3b[_0x44e491(0x18f)]!==0x1?'s':''));if(_0xdb1600['format']===_0x44e491(0x1b2)||_0xdb1600[_0x44e491(0x23c)]===_0x44e491(0x22b))await handleSDKOutput(_0x346d3b,_0xdb1600);else{if(_0x346d3b['length']===0x0)console[_0x44e491(0x21d)](_0x44e491(0x1f2));else for(const _0x110a6b of _0x346d3b){const _0x3ace42=_0x110a6b['state']===_0x44e491(0x34f)?'🚀':'📝',_0x31ad31=_0x110a6b['paused']?a32_0x2ce214[_0x44e491(0x1a7)](_0x44e491(0x382)):'',_0x4dfa72=a32_0x2ce214['dim']('\x20('+_0x110a6b[_0x44e491(0x245)]+_0x44e491(0x27e)+(_0x110a6b[_0x44e491(0x245)]!==0x1?'s':'')+')');console[_0x44e491(0x21d)](_0x3ace42+'\x20'+_0x110a6b[_0x44e491(0x387)]+_0x31ad31+_0x4dfa72);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{['name']='ps:rt:jn:pause';['description']='Pause\x20activations\x20in\x20an\x20RT\x20journey';async[a32_0x5ce8d0(0x1bf)](_0x4ef6b6){const _0x801288=a32_0x5ce8d0,{options:_0xdf953c,args:_0x16bd69,tdx:_0x27a399}=_0x4ef6b6,_0x323b55=_0x16bd69[0x0];if(!_0x323b55)return console['error'](a32_0x2ce214[_0x801288(0x28b)](_0x801288(0x369))),console[_0x801288(0x310)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console[_0x801288(0x310)](a32_0x2ce214['dim'](_0x801288(0x22d))),0x1;_0xdf953c[_0x801288(0x3ae)]&&(console[_0x801288(0x310)](_0x801288(0x18d)+_0xdf953c[_0x801288(0x340)]),console['error'](_0x801288(0x313)+_0x323b55));const _0x103b41=await withSpinner('Pausing\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x323b55+_0x801288(0x231),()=>_0x27a399[_0x801288(0x187)][_0x801288(0x1cb)](_0x323b55),{'verbose':_0xdf953c[_0x801288(0x3ae)]}),_0x2a3fc1=_0x103b41[_0x801288(0x330)];console['error']('✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x2a3fc1[_0x801288(0x387)]+'\x27');if(_0xdf953c[_0x801288(0x23c)]==='json'||_0xdf953c[_0x801288(0x23c)]===_0x801288(0x22b))await handleSDKOutput([_0x2a3fc1],_0xdf953c);else{const _0x406990=_0x2a3fc1[_0x801288(0x386)]===_0x801288(0x34f)?'🚀':'📝',_0x4a5a81=_0x2a3fc1[_0x801288(0x267)]?a32_0x2ce214[_0x801288(0x1a7)](_0x801288(0x382)):'';console[_0x801288(0x21d)](_0x406990+'\x20'+_0x2a3fc1[_0x801288(0x387)]+_0x4a5a81);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x190);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x1de);async[a32_0x5ce8d0(0x1bf)](_0x5c1719){const _0x15e68d=a32_0x5ce8d0,{options:_0x224b57,args:_0x1453f6,tdx:_0x2e481e}=_0x5c1719,_0x2019be=_0x1453f6[0x0];if(!_0x2019be)return console[_0x15e68d(0x310)](a32_0x2ce214['red'](_0x15e68d(0x369))),console[_0x15e68d(0x310)](_0x15e68d(0x1d3)),console[_0x15e68d(0x310)](a32_0x2ce214['dim']('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x224b57[_0x15e68d(0x3ae)]&&(console[_0x15e68d(0x310)](_0x15e68d(0x18d)+_0x224b57[_0x15e68d(0x340)]),console[_0x15e68d(0x310)](_0x15e68d(0x313)+_0x2019be));const _0x3be259=await withSpinner(_0x15e68d(0x368)+_0x2019be+_0x15e68d(0x231),()=>_0x2e481e['realtime'][_0x15e68d(0x21e)](_0x2019be),{'verbose':_0x224b57[_0x15e68d(0x3ae)]}),_0x444b22=_0x3be259[_0x15e68d(0x330)];console[_0x15e68d(0x310)](_0x15e68d(0x1c2)+_0x444b22[_0x15e68d(0x387)]+'\x27');if(_0x224b57[_0x15e68d(0x23c)]==='json'||_0x224b57[_0x15e68d(0x23c)]===_0x15e68d(0x22b))await handleSDKOutput([_0x444b22],_0x224b57);else{const _0x58c86a=_0x444b22[_0x15e68d(0x386)]===_0x15e68d(0x34f)?'🚀':'📝',_0x4aeffc=_0x444b22[_0x15e68d(0x267)]?a32_0x2ce214['yellow']('\x20(paused)'):'';console['log'](_0x58c86a+'\x20'+_0x444b22['name']+_0x4aeffc);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x398);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x219);async[a32_0x5ce8d0(0x1bf)](_0x1bd126){const _0x163e4e=a32_0x5ce8d0,{options:_0x471e44,args:_0x272956,tdx:_0x58db12}=_0x1bd126,_0x260119=_0x272956[0x0]||_0x471e44['parentSegment'];if(!_0x260119)return showParentSegmentNotSetError(_0x163e4e(0x2f8)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20configuration_versions\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20for\x20specific\x20parent\x20segment'),0x1;_0x471e44['verbose']&&(console[_0x163e4e(0x310)](_0x163e4e(0x18d)+_0x471e44[_0x163e4e(0x340)]),console['error']('Parent\x20segment:\x20'+_0x260119));const _0x354629=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x260119+_0x163e4e(0x231),()=>_0x58db12[_0x163e4e(0x31c)][_0x163e4e(0x1f4)](_0x260119),{'verbose':_0x471e44[_0x163e4e(0x3ae)]}),_0x3f760c=_0x354629['data'],_0x41d890=await withSpinner(_0x163e4e(0x1d9)+_0x260119+_0x163e4e(0x231),()=>_0x58db12[_0x163e4e(0x187)][_0x163e4e(0x35d)](_0x3f760c),{'verbose':_0x471e44[_0x163e4e(0x3ae)]}),_0x28966c=_0x41d890[_0x163e4e(0x330)];return console['error']('✔\x20Retrieved\x20RT\x20configuration\x20version'),_0x471e44[_0x163e4e(0x23c)]===_0x163e4e(0x1b2)||_0x471e44[_0x163e4e(0x23c)]===_0x163e4e(0x22b)?await handleSDKOutput([_0x28966c],_0x471e44):(console[_0x163e4e(0x21d)](_0x163e4e(0x1be)+_0x28966c['id']),console[_0x163e4e(0x21d)](_0x163e4e(0x214)+_0x28966c['audienceId']),console[_0x163e4e(0x21d)](_0x163e4e(0x248)+_0x28966c[_0x163e4e(0x261)]),console['log'](_0x163e4e(0x223)+_0x28966c[_0x163e4e(0x37e)]),console[_0x163e4e(0x21d)](_0x163e4e(0x1b5)+_0x28966c[_0x163e4e(0x260)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x212);['description']=a32_0x5ce8d0(0x31d);async[a32_0x5ce8d0(0x1bf)](_0x1b1b36){const _0x53e257=a32_0x5ce8d0,{options:_0x14f23c,args:_0x4d9d8a,tdx:_0x4f88c6}=_0x1b1b36,_0x43aa06=_0x4d9d8a[0x0]||_0x14f23c[_0x53e257(0x21c)];if(!_0x43aa06)return showParentSegmentNotSetError(_0x53e257(0x218)+_0x53e257(0x31b)),0x1;const _0x112ec5=await withSpinner(_0x53e257(0x3aa)+_0x43aa06+'\x27...',()=>_0x4f88c6[_0x53e257(0x31c)][_0x53e257(0x1f4)](_0x43aa06),{'verbose':_0x14f23c[_0x53e257(0x3ae)]}),_0xbfb12f=_0x112ec5['data'],_0x8e389e=await withSpinner(_0x53e257(0x237)+_0x43aa06+'\x27...',()=>_0x4f88c6[_0x53e257(0x324)][_0x53e257(0x22a)](_0xbfb12f),{'verbose':_0x14f23c['verbose']}),_0x3976b1=_0x8e389e[_0x53e257(0x330)];console[_0x53e257(0x310)](_0x53e257(0x226)+_0x3976b1[_0x53e257(0x18f)]+'\x20personalization\x20service'+(_0x3976b1[_0x53e257(0x18f)]!==0x1?'s':''));if(_0x14f23c[_0x53e257(0x23c)]==='json'||_0x14f23c[_0x53e257(0x23c)]==='jsonl')await handleSDKOutput(_0x3976b1,_0x14f23c);else{if(_0x3976b1[_0x53e257(0x18f)]===0x0)console[_0x53e257(0x21d)](_0x53e257(0x299)),console[_0x53e257(0x310)](a32_0x2ce214[_0x53e257(0x1ac)](_0x53e257(0x394)));else for(const _0x443a57 of _0x3976b1){console[_0x53e257(0x21d)](a32_0x2ce214['bold'](_0x443a57[_0x53e257(0x387)])+'\x20'+a32_0x2ce214[_0x53e257(0x1b3)](_0x53e257(0x192)+_0x443a57['id']+')'));_0x443a57[_0x53e257(0x27a)]&&console[_0x53e257(0x21d)]('\x20\x20'+a32_0x2ce214[_0x53e257(0x1b3)](_0x443a57['description']));if(_0x443a57[_0x53e257(0x328)]&&_0x443a57[_0x53e257(0x328)][_0x53e257(0x18f)]>0x0)for(const _0x226b13 of _0x443a57[_0x53e257(0x328)]){const _0x2c6f39=_0x226b13[_0x53e257(0x1a2)]?.[_0x53e257(0x18f)]?_0x226b13['allowedIps']['join'](',\x20'):_0x53e257(0x196);console[_0x53e257(0x21d)]('\x20\x20'+a32_0x2ce214[_0x53e257(0x1ac)](_0x53e257(0x30d))+'\x20'+_0x226b13[_0x53e257(0x387)]+'\x20'+a32_0x2ce214[_0x53e257(0x1b3)](_0x53e257(0x192)+_0x226b13['id']+')')),console[_0x53e257(0x21d)](_0x53e257(0x1d6)+a32_0x2ce214[_0x53e257(0x1b3)]('allowed\x20IPs:')+'\x20'+_0x2c6f39);}else console[_0x53e257(0x21d)]('\x20\x20'+a32_0x2ce214[_0x53e257(0x1b3)](_0x53e257(0x29b)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']=a32_0x5ce8d0(0x290);['description']=a32_0x5ce8d0(0x1ff);async[a32_0x5ce8d0(0x1bf)](_0xe8bfb5){const _0x402ee1=a32_0x5ce8d0,{options:_0x1a2ee7,args:_0x5da161,tdx:_0x633659}=_0xe8bfb5,_0x26d193=_0x1a2ee7,_0x77c25c=_0x5da161[0x0],_0x16a904=_0x5da161[0x1]||_0x1a2ee7[_0x402ee1(0x21c)];if(!_0x77c25c)return console[_0x402ee1(0x310)](_0x402ee1(0x346)),console[_0x402ee1(0x310)](_0x402ee1(0x1e1)),console[_0x402ee1(0x310)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x16a904)return showParentSegmentNotSetError(_0x402ee1(0x21a)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x9eb5ea=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x16a904+_0x402ee1(0x231),()=>_0x633659[_0x402ee1(0x31c)]['resolveParentId'](_0x16a904),{'verbose':_0x1a2ee7[_0x402ee1(0x3ae)]}),_0x315485=_0x9eb5ea[_0x402ee1(0x330)],_0x243899={'name':_0x77c25c,'description':_0x26d193[_0x402ee1(0x27a)],'public':_0x26d193['public']},_0xc8afe9=await withSpinner(_0x402ee1(0x2a0)+_0x77c25c+'\x27...',()=>_0x633659[_0x402ee1(0x324)][_0x402ee1(0x39c)](_0x315485,_0x243899),{'verbose':_0x1a2ee7['verbose']}),_0x2968ce=_0xc8afe9['data'];return console[_0x402ee1(0x310)](_0x402ee1(0x20c)+_0x2968ce[_0x402ee1(0x387)]+_0x402ee1(0x195)+_0x2968ce['id']),await handleSDKOutput([_0x2968ce],_0x1a2ee7),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{['name']=a32_0x5ce8d0(0x191);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x1f7);async[a32_0x5ce8d0(0x1bf)](_0x259208){const _0x13d41e=a32_0x5ce8d0,{options:_0x54d302,args:_0x5eef0c,tdx:_0x14957e}=_0x259208,_0x40fd56=_0x5eef0c[0x0],_0x429bd4=_0x5eef0c[0x1]||_0x54d302[_0x13d41e(0x21c)];if(!_0x40fd56)return console[_0x13d41e(0x310)](_0x13d41e(0x19d)),console[_0x13d41e(0x310)](_0x13d41e(0x2bb)),console[_0x13d41e(0x310)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x429bd4)return showParentSegmentNotSetError(_0x13d41e(0x1e7)+_0x13d41e(0x288)),0x1;const _0x719027=await withSpinner(_0x13d41e(0x3aa)+_0x429bd4+_0x13d41e(0x231),()=>_0x14957e['segment'][_0x13d41e(0x1f4)](_0x429bd4),{'verbose':_0x54d302[_0x13d41e(0x3ae)]}),_0x5209e1=_0x719027[_0x13d41e(0x330)],_0x8763cc=await withSpinner(_0x13d41e(0x2f9)+_0x40fd56+_0x13d41e(0x231),()=>_0x14957e['personalization'][_0x13d41e(0x371)](_0x5209e1,_0x40fd56),{'verbose':_0x54d302[_0x13d41e(0x3ae)]}),_0x4a92a6=_0x8763cc[_0x13d41e(0x330)];if(_0x54d302[_0x13d41e(0x1b2)]||_0x54d302['jsonl'])await handleSDKOutput([_0x4a92a6],_0x54d302);else{console[_0x13d41e(0x21d)](a32_0x2ce214[_0x13d41e(0x341)](_0x4a92a6[_0x13d41e(0x387)])+'\x20'+a32_0x2ce214[_0x13d41e(0x1b3)](_0x13d41e(0x192)+_0x4a92a6['id']+')'));_0x4a92a6['description']&&console['log']('\x20\x20'+a32_0x2ce214['dim'](_0x4a92a6[_0x13d41e(0x27a)]));console[_0x13d41e(0x21d)]('\x20\x20'+a32_0x2ce214['cyan'](_0x13d41e(0x355))+'\x20'+(_0x4a92a6[_0x13d41e(0x213)]?_0x13d41e(0x25d):'no'));if(_0x4a92a6['tokens']&&_0x4a92a6['tokens'][_0x13d41e(0x18f)]>0x0)for(const _0x3436f6 of _0x4a92a6[_0x13d41e(0x328)]){const _0x2b0b2e=_0x3436f6[_0x13d41e(0x1a2)]?.[_0x13d41e(0x18f)]?_0x3436f6[_0x13d41e(0x1a2)]['join'](',\x20'):'any';console['log']('\x20\x20'+a32_0x2ce214[_0x13d41e(0x1ac)](_0x13d41e(0x30d))+'\x20'+_0x3436f6[_0x13d41e(0x387)]+'\x20'+a32_0x2ce214['dim'](_0x13d41e(0x192)+_0x3436f6['id']+')')),console[_0x13d41e(0x21d)]('\x20\x20\x20\x20'+a32_0x2ce214[_0x13d41e(0x1b3)](_0x13d41e(0x20e))+'\x20'+_0x2b0b2e);}else console[_0x13d41e(0x21d)]('\x20\x20'+a32_0x2ce214[_0x13d41e(0x1b3)](_0x13d41e(0x29b)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{['name']='ps:pz:service:delete';[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x1fb);async['execute'](_0x1bc535){const _0x342447=a32_0x5ce8d0,{options:_0xf944a,args:_0x591419,tdx:_0x530ac5}=_0x1bc535,_0xd38708=_0x591419[0x0],_0x8fecbd=_0x591419[0x1]||_0xf944a['parentSegment'];if(!_0xd38708)return console[_0x342447(0x310)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x342447(0x310)](_0x342447(0x312)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x8fecbd)return showParentSegmentNotSetError(_0x342447(0x33d)+_0x342447(0x2c9)),0x1;const _0x50ce67=await withSpinner(_0x342447(0x3aa)+_0x8fecbd+_0x342447(0x231),()=>_0x530ac5[_0x342447(0x31c)][_0x342447(0x1f4)](_0x8fecbd),{'verbose':_0xf944a['verbose']}),_0x4662ff=_0x50ce67['data'];return await withSpinner('Deleting\x20personalization\x20service\x20\x27'+_0xd38708+'\x27...',()=>_0x530ac5[_0x342447(0x324)][_0x342447(0x26e)](_0x4662ff,_0xd38708),{'verbose':_0xf944a[_0x342447(0x3ae)]}),console[_0x342447(0x310)]('✔\x20Deleted\x20personalization\x20service\x20\x27'+_0xd38708+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{['name']=a32_0x5ce8d0(0x335);['description']=a32_0x5ce8d0(0x2cf);async[a32_0x5ce8d0(0x1bf)](_0x2f3884){const _0x50bca2=a32_0x5ce8d0,{options:_0x17caf5,args:_0x2eaced,tdx:_0x448c2c}=_0x2f3884,_0x525b9f=_0x17caf5,_0x3d4332=_0x2eaced[0x0],_0x16311d=_0x2eaced[0x1]||_0x17caf5[_0x50bca2(0x21c)];if(!_0x3d4332)return console[_0x50bca2(0x310)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x50bca2(0x310)](_0x50bca2(0x2e1)),console[_0x50bca2(0x310)](_0x50bca2(0x36e)),0x1;if(!_0x525b9f[_0x50bca2(0x387)])return console['error'](_0x50bca2(0x276)),console['error'](_0x50bca2(0x2e1)),0x1;if(!_0x16311d)return showParentSegmentNotSetError(_0x50bca2(0x1bd)+_0x50bca2(0x36e)),0x1;const _0x53599b=await withSpinner(_0x50bca2(0x3aa)+_0x16311d+_0x50bca2(0x231),()=>_0x448c2c[_0x50bca2(0x31c)][_0x50bca2(0x1f4)](_0x16311d),{'verbose':_0x17caf5[_0x50bca2(0x3ae)]}),_0x16679d=_0x53599b[_0x50bca2(0x330)],_0x5c9424={'name':_0x525b9f['name']};_0x525b9f[_0x50bca2(0x27a)]!==undefined&&(_0x5c9424[_0x50bca2(0x27a)]=_0x525b9f[_0x50bca2(0x27a)]);const _0x41e207=await withSpinner(_0x50bca2(0x275)+_0x3d4332+_0x50bca2(0x231),()=>_0x448c2c[_0x50bca2(0x324)][_0x50bca2(0x380)](_0x16679d,_0x3d4332,_0x5c9424),{'verbose':_0x17caf5[_0x50bca2(0x3ae)]}),_0x366ed1=_0x41e207[_0x50bca2(0x330)];return console[_0x50bca2(0x310)]('✔\x20Updated\x20personalization\x20service\x20\x27'+_0x366ed1[_0x50bca2(0x387)]+'\x27'),await handleSDKOutput([_0x366ed1],_0x17caf5),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x358);[a32_0x5ce8d0(0x27a)]='Create\x20a\x20token\x20for\x20a\x20personalization\x20service';async['execute'](_0x26513d){const _0x1046e3=a32_0x5ce8d0,{options:_0x1eea9a,args:_0x4ba184,tdx:_0x15ac52}=_0x26513d,_0x567cb6=_0x1eea9a,_0x200cb3=_0x4ba184[0x0],_0x3b2143=_0x4ba184[0x1],_0x5690f9=_0x4ba184[0x2]||_0x1eea9a[_0x1046e3(0x21c)];if(!_0x200cb3)return console['error'](_0x1046e3(0x255)),console[_0x1046e3(0x310)](_0x1046e3(0x197)),console['error'](_0x1046e3(0x234)),0x1;if(!_0x3b2143)return console[_0x1046e3(0x310)](_0x1046e3(0x19d)),console[_0x1046e3(0x310)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x1046e3(0x310)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x5690f9)return showParentSegmentNotSetError(_0x1046e3(0x338)+_0x1046e3(0x234)),0x1;const _0x41893e=await withSpinner(_0x1046e3(0x3aa)+_0x5690f9+_0x1046e3(0x231),()=>_0x15ac52[_0x1046e3(0x31c)]['resolveParentId'](_0x5690f9),{'verbose':_0x1eea9a[_0x1046e3(0x3ae)]}),_0x916475=_0x41893e['data'],_0x2af3de={'name':_0x200cb3};_0x567cb6[_0x1046e3(0x1a2)]&&(_0x2af3de['allowedIps']=_0x567cb6['allowedIps']['split'](',')[_0x1046e3(0x372)](_0x44fa29=>_0x44fa29['trim']()));_0x567cb6[_0x1046e3(0x27a)]&&(_0x2af3de[_0x1046e3(0x27a)]=_0x567cb6['description']);const _0x101f70=await withSpinner(_0x1046e3(0x20a)+_0x200cb3+'\x27\x20for\x20service\x20\x27'+_0x3b2143+'\x27...',()=>_0x15ac52[_0x1046e3(0x324)][_0x1046e3(0x230)](_0x916475,_0x3b2143,_0x2af3de),{'verbose':_0x1eea9a['verbose']}),_0x560745=_0x101f70[_0x1046e3(0x330)];return console[_0x1046e3(0x310)](_0x1046e3(0x1a8)+_0x560745[_0x1046e3(0x387)]+'\x27\x20with\x20ID:\x20'+_0x560745['id']),_0x560745[_0x1046e3(0x211)]&&(console['error'](a32_0x2ce214[_0x1046e3(0x1a7)](_0x1046e3(0x3a0))),console[_0x1046e3(0x310)](a32_0x2ce214['cyan'](_0x560745['value'])),console[_0x1046e3(0x310)]('')),await handleSDKOutput([_0x560745],_0x1eea9a),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x272);[a32_0x5ce8d0(0x27a)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async['execute'](_0x2104c2){const _0xbd9e5b=a32_0x5ce8d0,{options:_0x372f69,args:_0x1bb256,tdx:_0x5c4e2f}=_0x2104c2,_0x5d6f38=_0x1bb256[0x0],_0x584dd7=_0x1bb256[0x1]||_0x372f69[_0xbd9e5b(0x21c)];if(!_0x5d6f38)return console['error'](_0xbd9e5b(0x2a3)),console[_0xbd9e5b(0x310)](_0xbd9e5b(0x30b)),console[_0xbd9e5b(0x310)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x584dd7)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x34bb95=await withSpinner(_0xbd9e5b(0x3aa)+_0x584dd7+_0xbd9e5b(0x231),()=>_0x5c4e2f['segment']['resolveParentId'](_0x584dd7),{'verbose':_0x372f69['verbose']}),_0x3c9f82=_0x34bb95[_0xbd9e5b(0x330)],_0x4ee9a9=await withSpinner(_0xbd9e5b(0x2b1),()=>_0x5c4e2f[_0xbd9e5b(0x324)][_0xbd9e5b(0x22a)](_0x3c9f82),{'verbose':_0x372f69['verbose']}),_0x2c43af=_0x4ee9a9[_0xbd9e5b(0x330)];let _0x147382;for(const _0xc82355 of _0x2c43af){if(_0xc82355[_0xbd9e5b(0x328)]?.[_0xbd9e5b(0x227)](_0x2e3722=>_0x2e3722['id']===_0x5d6f38)){_0x147382=_0xc82355['id'];break;}}if(!_0x147382)return console[_0xbd9e5b(0x310)]('Error:\x20Token\x20\x27'+_0x5d6f38+_0xbd9e5b(0x26b)),0x1;const _0x8617da=await withSpinner(_0xbd9e5b(0x18a)+_0x5d6f38+'\x27...',()=>_0x5c4e2f[_0xbd9e5b(0x324)][_0xbd9e5b(0x26c)](_0x3c9f82,_0x147382,_0x5d6f38),{'verbose':_0x372f69[_0xbd9e5b(0x3ae)]}),_0x4f32c0=_0x8617da[_0xbd9e5b(0x330)];return console[_0xbd9e5b(0x310)]('✔\x20Deleted\x20token\x20\x27'+(_0x4f32c0[_0xbd9e5b(0x387)]||_0x5d6f38)+'\x27'),await handleSDKOutput([_0x4f32c0],_0x372f69),0x0;}}export class PSPzListCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x205);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x366);async[a32_0x5ce8d0(0x1bf)](_0x178f95){const _0x10daf8=a32_0x5ce8d0,{options:_0x18dc41,args:_0x48405e,tdx:_0x1bc56a}=_0x178f95,_0x167313=_0x48405e[0x0]||_0x18dc41[_0x10daf8(0x21c)];if(!_0x167313)return showParentSegmentNotSetError(_0x10daf8(0x2aa)+_0x10daf8(0x363)),0x1;const _0x2b30fa=await withSpinner(_0x10daf8(0x3aa)+_0x167313+'\x27...',()=>_0x1bc56a['segment'][_0x10daf8(0x1f4)](_0x167313),{'verbose':_0x18dc41[_0x10daf8(0x3ae)]}),_0xf79dbc=_0x2b30fa[_0x10daf8(0x330)],_0x143a02=await withSpinner(_0x10daf8(0x27b)+_0x167313+_0x10daf8(0x231),()=>_0x1bc56a[_0x10daf8(0x324)][_0x10daf8(0x30c)](_0xf79dbc),{'verbose':_0x18dc41[_0x10daf8(0x3ae)]}),_0x366778=_0x143a02[_0x10daf8(0x330)];console[_0x10daf8(0x310)](_0x10daf8(0x226)+_0x366778[_0x10daf8(0x18f)]+'\x20personalization'+(_0x366778[_0x10daf8(0x18f)]!==0x1?'s':''));if(_0x18dc41['format']==='json'||_0x18dc41[_0x10daf8(0x23c)]===_0x10daf8(0x22b))await handleSDKOutput(_0x366778,_0x18dc41);else{if(_0x366778[_0x10daf8(0x18f)]===0x0)console[_0x10daf8(0x21d)](_0x10daf8(0x2ab));else for(const _0xed75f0 of _0x366778){console['log'](a32_0x2ce214[_0x10daf8(0x341)](_0xed75f0[_0x10daf8(0x387)])+'\x20'+a32_0x2ce214[_0x10daf8(0x1b3)](_0x10daf8(0x192)+_0xed75f0['id']+')'));_0xed75f0['description']&&console[_0x10daf8(0x21d)]('\x20\x20'+a32_0x2ce214[_0x10daf8(0x1b3)](_0xed75f0['description']));const _0x295d6a=_0xed75f0[_0x10daf8(0x1ca)]?.['length']||0x0;console[_0x10daf8(0x21d)]('\x20\x20'+a32_0x2ce214['cyan'](_0x10daf8(0x244))+'\x20'+_0x295d6a);if(_0xed75f0[_0x10daf8(0x1ca)]&&_0xed75f0[_0x10daf8(0x1ca)]['length']>0x0)for(const _0x227c8d of _0xed75f0['sections']){console[_0x10daf8(0x21d)]('\x20\x20\x20\x20-\x20'+_0x227c8d['name']);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x2e8);[a32_0x5ce8d0(0x27a)]='Show\x20a\x20specific\x20realtime\x20personalization';async[a32_0x5ce8d0(0x1bf)](_0x15e412){const _0x2bb1f1=a32_0x5ce8d0,{options:_0x49cd63,args:_0x5cd0b6,tdx:_0x33a750}=_0x15e412,_0x4ac7d7=_0x5cd0b6[0x0];if(!_0x4ac7d7)return console['error']('Error:\x20Personalization\x20ID\x20is\x20required'),console['error'](_0x2bb1f1(0x2b3)),0x1;const _0x855e0a=await withSpinner('Getting\x20personalization\x20\x27'+_0x4ac7d7+_0x2bb1f1(0x231),()=>_0x33a750[_0x2bb1f1(0x324)][_0x2bb1f1(0x1c4)](_0x4ac7d7),{'verbose':_0x49cd63['verbose']}),_0x49c576=_0x855e0a['data'];console[_0x2bb1f1(0x310)](_0x2bb1f1(0x2c8)+_0x49c576[_0x2bb1f1(0x387)]+'\x27');if(_0x49cd63[_0x2bb1f1(0x23c)]===_0x2bb1f1(0x1b2)||_0x49cd63['format']===_0x2bb1f1(0x22b))await handleSDKOutput([_0x49c576],_0x49cd63);else{console['log'](a32_0x2ce214[_0x2bb1f1(0x341)](_0x49c576[_0x2bb1f1(0x387)])+'\x20'+a32_0x2ce214['dim'](_0x2bb1f1(0x192)+_0x49c576['id']+')'));_0x49c576[_0x2bb1f1(0x27a)]&&console['log']('\x20\x20'+a32_0x2ce214[_0x2bb1f1(0x1b3)](_0x49c576['description']));_0x49c576['audienceId']&&console[_0x2bb1f1(0x21d)]('\x20\x20'+a32_0x2ce214[_0x2bb1f1(0x1ac)](_0x2bb1f1(0x1ba))+'\x20'+_0x49c576[_0x2bb1f1(0x2b4)]);console[_0x2bb1f1(0x21d)]('\x20\x20'+a32_0x2ce214[_0x2bb1f1(0x1ac)](_0x2bb1f1(0x252))+'\x20'+_0x49c576[_0x2bb1f1(0x278)]),console['log']('\x20\x20'+a32_0x2ce214[_0x2bb1f1(0x1ac)](_0x2bb1f1(0x229))+'\x20'+_0x49c576[_0x2bb1f1(0x325)]);const _0x2d8985=_0x49c576[_0x2bb1f1(0x1ca)]?.[_0x2bb1f1(0x18f)]||0x0;console[_0x2bb1f1(0x21d)]('\x20\x20'+a32_0x2ce214[_0x2bb1f1(0x1ac)](_0x2bb1f1(0x244))+'\x20'+_0x2d8985);if(_0x49c576[_0x2bb1f1(0x1ca)]&&_0x49c576[_0x2bb1f1(0x1ca)][_0x2bb1f1(0x18f)]>0x0)for(const _0xf34718 of _0x49c576[_0x2bb1f1(0x1ca)]){console['log'](_0x2bb1f1(0x1d6)+a32_0x2ce214[_0x2bb1f1(0x341)](_0xf34718[_0x2bb1f1(0x387)])+'\x20'+a32_0x2ce214[_0x2bb1f1(0x1b3)]('(id:\x20'+_0xf34718['id']+')')),_0xf34718[_0x2bb1f1(0x344)]&&(console['log'](_0x2bb1f1(0x28e)+a32_0x2ce214[_0x2bb1f1(0x1ac)](_0x2bb1f1(0x307))+'\x20'+_0xf34718[_0x2bb1f1(0x344)][_0x2bb1f1(0x387)]),_0xf34718[_0x2bb1f1(0x344)][_0x2bb1f1(0x3ab)]?.[_0x2bb1f1(0x379)]&&console[_0x2bb1f1(0x21d)](_0x2bb1f1(0x222)+a32_0x2ce214[_0x2bb1f1(0x1ac)](_0x2bb1f1(0x2de))+'\x20'+_0xf34718[_0x2bb1f1(0x344)][_0x2bb1f1(0x3ab)][_0x2bb1f1(0x379)])),_0xf34718[_0x2bb1f1(0x2b8)]&&console['log'](_0x2bb1f1(0x28e)+a32_0x2ce214[_0x2bb1f1(0x1ac)](_0x2bb1f1(0x2f2))+'\x20'+JSON['stringify'](_0xf34718[_0x2bb1f1(0x2b8)])),_0xf34718[_0x2bb1f1(0x29a)]&&console[_0x2bb1f1(0x21d)]('\x20\x20\x20\x20\x20\x20'+a32_0x2ce214[_0x2bb1f1(0x1ac)](_0x2bb1f1(0x38c))+_0x2bb1f1(0x352));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x266);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x24c);async['execute'](_0xbc75b4){const _0xc64ff9=a32_0x5ce8d0,{options:_0x21017b,args:_0x354638,tdx:_0x13458b}=_0xbc75b4,_0x48e886=_0x354638[0x0];if(!_0x48e886)return console['error'](_0xc64ff9(0x298)),console[_0xc64ff9(0x310)](_0xc64ff9(0x1ad)),0x1;return await withSpinner(_0xc64ff9(0x2df)+_0x48e886+'\x27...',()=>_0x13458b[_0xc64ff9(0x324)][_0xc64ff9(0x2af)](_0x48e886),{'verbose':_0x21017b['verbose']}),console['error'](_0xc64ff9(0x389)+_0x48e886+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x22e);[a32_0x5ce8d0(0x27a)]=a32_0x5ce8d0(0x1bb);async[a32_0x5ce8d0(0x1bf)](_0xd5684e){const _0x4ea19e=a32_0x5ce8d0,{options:_0x5091d0,tdx:_0x1d2a21}=_0xd5684e,_0x26f825=_0x5091d0;let _0x5dd6ff;if(_0x26f825[_0x4ea19e(0x1b9)]){_0x5dd6ff=await loadJSON(_0x26f825['file'],!![]);if(!_0x5dd6ff[_0x4ea19e(0x308)]?.[_0x4ea19e(0x1fc)])return console[_0x4ea19e(0x310)](_0x4ea19e(0x2f5)),console[_0x4ea19e(0x310)](_0x4ea19e(0x25c)),console[_0x4ea19e(0x310)](_0x4ea19e(0x1cc)),0x1;}else{if(!_0x26f825[_0x4ea19e(0x387)])return console[_0x4ea19e(0x310)](_0x4ea19e(0x36f)),console[_0x4ea19e(0x310)](_0x4ea19e(0x33e)),console['error'](_0x4ea19e(0x38f)),0x1;if(_0x26f825[_0x4ea19e(0x27a)]===undefined)return console[_0x4ea19e(0x310)](_0x4ea19e(0x365)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0x4ea19e(0x310)](_0x4ea19e(0x38f)),0x1;if(_0x26f825[_0x4ea19e(0x2e3)]===undefined)return console[_0x4ea19e(0x310)](_0x4ea19e(0x2d3)),console[_0x4ea19e(0x310)](_0x4ea19e(0x254)),0x1;let _0x3cc175=_0x26f825[_0x4ea19e(0x2b4)];if(!_0x3cc175&&_0x5091d0['parentSegment']){const _0x8f2d56=await withSpinner(_0x4ea19e(0x3aa)+_0x5091d0[_0x4ea19e(0x21c)]+_0x4ea19e(0x231),()=>_0x1d2a21[_0x4ea19e(0x31c)][_0x4ea19e(0x1f4)](_0x5091d0[_0x4ea19e(0x21c)]),{'verbose':_0x5091d0[_0x4ea19e(0x3ae)]});_0x3cc175=_0x8f2d56[_0x4ea19e(0x330)];}let _0x864e6c;_0x26f825[_0x4ea19e(0x1ca)]&&(_0x864e6c=await loadJSON(_0x26f825[_0x4ea19e(0x1ca)],![]));const _0x5f1c41=_0x26f825[_0x4ea19e(0x2e3)]===_0x4ea19e(0x36d)?null:{'id':_0x26f825['folderId'],'type':_0x4ea19e(0x357)};_0x5dd6ff={'attributes':{'name':_0x26f825[_0x4ea19e(0x387)],'description':_0x26f825[_0x4ea19e(0x27a)]||null,..._0x3cc175!==undefined&&{'audienceId':_0x3cc175},..._0x864e6c!==undefined&&{'sections':_0x864e6c}},'relationships':{'parentFolder':{'data':_0x5f1c41}}};}const _0x8a0f4b=await withSpinner(_0x4ea19e(0x39a)+(_0x5dd6ff['attributes']?.['name']??'')+_0x4ea19e(0x231),()=>_0x1d2a21['personalization'][_0x4ea19e(0x3a9)](_0x5dd6ff),{'verbose':_0x5091d0[_0x4ea19e(0x3ae)]}),_0x3d74ab=_0x8a0f4b[_0x4ea19e(0x330)];return console[_0x4ea19e(0x310)](_0x4ea19e(0x186)+_0x3d74ab[_0x4ea19e(0x387)]+_0x4ea19e(0x195)+_0x3d74ab['id']),await handleSDKOutput([_0x3d74ab],_0x5091d0),0x0;}}export class PSPzPatchCommand extends BaseCommand{['name']=a32_0x5ce8d0(0x256);['description']=a32_0x5ce8d0(0x388);async[a32_0x5ce8d0(0x1bf)](_0x30144b){const _0x2d0f65=a32_0x5ce8d0,{options:_0x794fa4,args:_0x469d09}=_0x30144b,_0x13ee15=_0x794fa4,_0x5e3dca=_0x469d09[0x0];if(!_0x5e3dca)return console['error'](_0x2d0f65(0x298)),console[_0x2d0f65(0x310)](_0x2d0f65(0x2eb)),console[_0x2d0f65(0x310)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>'),0x1;let _0x43a735;if(_0x13ee15[_0x2d0f65(0x1b9)])_0x43a735=await loadJSON(_0x13ee15['file'],!![]);else{if(!_0x13ee15['name'])return console['error'](_0x2d0f65(0x36f)),console[_0x2d0f65(0x310)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;if(_0x13ee15[_0x2d0f65(0x27a)]===undefined)return console[_0x2d0f65(0x310)](_0x2d0f65(0x365)),console[_0x2d0f65(0x310)](_0x2d0f65(0x2eb)),0x1;let _0xbd3647;_0x13ee15[_0x2d0f65(0x1ca)]&&(_0xbd3647=await loadJSON(_0x13ee15[_0x2d0f65(0x1ca)],![])),_0x43a735={'attributes':{'name':_0x13ee15[_0x2d0f65(0x387)],'description':_0x13ee15[_0x2d0f65(0x27a)]||null,..._0xbd3647!==undefined&&{'sections':_0xbd3647}}};}const {tdx:_0x285f8b}=_0x30144b,_0x2d01b5=await withSpinner(_0x2d0f65(0x24a)+_0x5e3dca+_0x2d0f65(0x231),()=>_0x285f8b[_0x2d0f65(0x324)]['patchPersonalization'](_0x5e3dca,_0x43a735),{'verbose':_0x794fa4[_0x2d0f65(0x3ae)]}),_0x5e67d9=_0x2d01b5[_0x2d0f65(0x330)];return console[_0x2d0f65(0x310)](_0x2d0f65(0x2c7)+_0x5e67d9[_0x2d0f65(0x387)]+_0x2d0f65(0x1aa)+_0x5e67d9['id']+')'),await handleSDKOutput([_0x5e67d9],_0x794fa4),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a32_0x5ce8d0(0x387)]=a32_0x5ce8d0(0x201);[a32_0x5ce8d0(0x27a)]='Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML';async['execute'](_0x128483){const _0x4ec777=a32_0x5ce8d0,{options:_0xf1b6e1,args:_0x6f48ec}=_0x128483,_0x4bd612=_0x6f48ec[0x0]||_0xf1b6e1[_0x4ec777(0x21c)];if(!_0x4bd612)return showParentSegmentNotSetError(_0x4ec777(0x2bd)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20init\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20for\x20specific\x20parent\x20segment'),0x1;const _0x50f594=resolveYamlFile(_0x4bd612);if(!existsSync(_0x50f594))return showFileNotFoundError(_0x50f594,_0x4bd612),0x1;let _0x227eea;try{_0x227eea=readFileSync(_0x50f594,_0x4ec777(0x270));}catch(_0x3fc7bb){const _0x555414=_0x3fc7bb instanceof Error?_0x3fc7bb[_0x4ec777(0x202)]:String(_0x3fc7bb);return console[_0x4ec777(0x310)](_0x4ec777(0x1ea)+_0x555414),0x1;}let _0x38cab7;try{_0x38cab7=parseDef(_0x227eea);}catch(_0x5c953c){const _0xece474=_0x5c953c instanceof Error?_0x5c953c[_0x4ec777(0x202)]:String(_0x5c953c);return console['error'](a32_0x2ce214['red']('Error\x20parsing\x20YAML:\x20'+_0xece474)),0x1;}if(_0x38cab7[_0x4ec777(0x285)]&&_0x38cab7[_0x4ec777(0x285)][_0x4ec777(0x18f)]>0x0)return console[_0x4ec777(0x310)](a32_0x2ce214['yellow']('⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20'+_0x50f594)),console[_0x4ec777(0x310)](a32_0x2ce214[_0x4ec777(0x1b3)]('\x20\x20\x20'+_0x38cab7['personalization_services'][_0x4ec777(0x18f)]+_0x4ec777(0x38e))),0x1;!_0x38cab7[_0x4ec777(0x187)]&&(_0x38cab7[_0x4ec777(0x187)]={'events':[{'name':'page_view','source_table':_0x4ec777(0x36b)}],'attributes':[{'name':_0x4ec777(0x1ec),'type':_0x4ec777(0x396)}],'id_stitching':{'primary_key':_0x38cab7[_0x4ec777(0x274)][_0x4ec777(0x1c5)]==='customers'?_0x4ec777(0x332):_0x4ec777(0x1e2)}});_0x38cab7[_0x4ec777(0x285)]=[{'name':_0x4ec777(0x2c6),'description':'Personalization\x20service\x20description','trigger_event':'page_view','sections':[{'name':'Default','criteria':_0x4ec777(0x1d0),'attributes':['last_page_viewed']}]}];const _0x4272fb=serializeDef(_0x38cab7);return writeFileSync(_0x50f594,_0x4272fb,_0x4ec777(0x270)),console[_0x4ec777(0x310)](a32_0x2ce214[_0x4ec777(0x257)]('✔')+_0x4ec777(0x1ae)+a32_0x2ce214['cyan'](_0x50f594)),(!_0x38cab7['realtime']||_0x227eea[_0x4ec777(0x24e)]('realtime:')===-0x1)&&console[_0x4ec777(0x310)](a32_0x2ce214[_0x4ec777(0x257)]('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console[_0x4ec777(0x310)]('\x0a'+a32_0x2ce214[_0x4ec777(0x1b3)](_0x4ec777(0x253))),console['error'](_0x4ec777(0x239)+_0x50f594+'\x20to\x20configure\x20your\x20personalization\x20service'),console[_0x4ec777(0x310)](_0x4ec777(0x185)+a32_0x2ce214[_0x4ec777(0x1b3)](_0x4ec777(0x18e)+_0x4bd612)+_0x4ec777(0x2ea)),0x0;}}