@treasuredata/tdx 2026.4.6 → 2026.4.8
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.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x246d00=a31_0x28c0;(function(_0x54e162,_0x3447e2){const _0x3ec5bc=a31_0x28c0,_0x2ebfb1=_0x54e162();while(!![]){try{const _0x2b9d84=parseInt(_0x3ec5bc(0x146))/0x1+parseInt(_0x3ec5bc(0x313))/0x2*(parseInt(_0x3ec5bc(0x1cb))/0x3)+-parseInt(_0x3ec5bc(0x27c))/0x4*(-parseInt(_0x3ec5bc(0x227))/0x5)+parseInt(_0x3ec5bc(0x171))/0x6+-parseInt(_0x3ec5bc(0x1c3))/0x7+parseInt(_0x3ec5bc(0x1ce))/0x8*(-parseInt(_0x3ec5bc(0x2b7))/0x9)+-parseInt(_0x3ec5bc(0x17b))/0xa;if(_0x2b9d84===_0x3447e2)break;else _0x2ebfb1['push'](_0x2ebfb1['shift']());}catch(_0x20e978){_0x2ebfb1['push'](_0x2ebfb1['shift']());}}}(a31_0x8050,0xbe74c));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x4ef3d3 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a31_0x1c79fc from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR='parent_segments',LEGACY_PARENT_SEGMENT_DIR=a31_0x246d00(0x2e4);function openBrowser(_0x29c83d){const _0x3ffa5a=a31_0x246d00,_0x164e66=process[_0x3ffa5a(0x277)],_0x17d4a3=_0x164e66===_0x3ffa5a(0x13b)?_0x3ffa5a(0x296):_0x164e66===_0x3ffa5a(0x267)?_0x3ffa5a(0x2a0):'xdg-open';spawn(_0x17d4a3,[_0x29c83d],{'detached':!![],'stdio':_0x3ffa5a(0x30a)})[_0x3ffa5a(0x236)]();}function migrateLegacyDirectory(){const _0x2fb6a0=a31_0x246d00;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x187eb7=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x187eb7[_0x2fb6a0(0x24c)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x2fb6a0(0x2dd)](a31_0x1c79fc[_0x2fb6a0(0x288)](_0x2fb6a0(0x20f)+LEGACY_PARENT_SEGMENT_DIR+_0x2fb6a0(0x2ce)+PARENT_SEGMENT_DIR+_0x2fb6a0(0x2fe))),console[_0x2fb6a0(0x2dd)](a31_0x1c79fc['dim'](_0x2fb6a0(0x2e8)+LEGACY_PARENT_SEGMENT_DIR+_0x2fb6a0(0x140))),![];console[_0x2fb6a0(0x2dd)](a31_0x1c79fc['yellow']('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x2fb6a0(0x284)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x2fb6a0(0x2dd)](a31_0x1c79fc[_0x2fb6a0(0x221)]('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x59a375){const _0x38da42=_0x59a375 instanceof Error?_0x59a375[_0x2fb6a0(0x156)]:String(_0x59a375);return console[_0x2fb6a0(0x2dd)](a31_0x1c79fc[_0x2fb6a0(0x1b0)](_0x2fb6a0(0x339)+_0x38da42+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x246d00(0x136)](_0x3e4d90){const _0x4ad1b6=a31_0x246d00;return migrateLegacyDirectory(),super[_0x4ad1b6(0x136)](_0x3e4d90);}}function resolveYamlFile(_0x5701e2){const _0x1ac1d0=a31_0x246d00;if(_0x5701e2[_0x1ac1d0(0x1f7)]('.yml')||_0x5701e2['endsWith'](_0x1ac1d0(0x2db)))return _0x5701e2;return a31_0x4ef3d3[_0x1ac1d0(0x142)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x5701e2)+_0x1ac1d0(0x1a0));}function formatProgressMessage(_0x235e2f){const _0x1faf6d=a31_0x246d00,_0xcbf2de=_0x235e2f[_0x1faf6d(0x1ed)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0xcbf2de){const [,_0x17250a,_0x52ce19,_0x217066='']=_0xcbf2de;return a31_0x1c79fc[_0x1faf6d(0x1d9)](_0x17250a+':')+'\x20'+_0x52ce19+a31_0x1c79fc[_0x1faf6d(0x1d9)](_0x217066);}return a31_0x1c79fc[_0x1faf6d(0x1d9)](_0x235e2f);}function showFileNotFoundError(_0x50575e,_0x1b01af){const _0x2e53a3=a31_0x246d00;console[_0x2e53a3(0x2dd)](a31_0x1c79fc[_0x2e53a3(0x1b0)](_0x2e53a3(0x1ab)+_0x50575e+'\x0a')),console[_0x2e53a3(0x2dd)](a31_0x1c79fc[_0x2e53a3(0x28d)](_0x2e53a3(0x1fd)+_0x1b01af+'`\x20to\x20download\x20the\x20configuration\x20first'));}function displayRealtimeValidation(_0x371539){const _0x1e30c1=a31_0x246d00;if(!_0x371539[_0x1e30c1(0x28c)])return;const _0x24dc19=_0x371539[_0x1e30c1(0x28c)],_0x566dbd=_0x24dc19['enabled']?a31_0x1c79fc[_0x1e30c1(0x221)](_0x1e30c1(0x185)):a31_0x1c79fc['yellow']('⚡\x20Not\x20enabled');console[_0x1e30c1(0x2dd)]('\x0a'+a31_0x1c79fc[_0x1e30c1(0x1d9)](_0x1e30c1(0x2e6))+'\x20'+_0x566dbd);if(_0x24dc19[_0x1e30c1(0x200)]&&_0x24dc19[_0x1e30c1(0x200)][_0x1e30c1(0x291)]>0x0){console[_0x1e30c1(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x1e30c1(0x1d9)](_0x1e30c1(0x164))+'\x20'+_0x24dc19['events'][_0x1e30c1(0x291)]+_0x1e30c1(0x2c5));for(const _0x3e4eab of _0x24dc19[_0x1e30c1(0x200)]){const _0x21fa80=_0x3e4eab[_0x1e30c1(0x21c)]===![]?a31_0x1c79fc['red']('✘'):a31_0x1c79fc[_0x1e30c1(0x221)]('✔');console[_0x1e30c1(0x2dd)](_0x1e30c1(0x2af)+_0x21fa80+'\x20'+_0x3e4eab['name']),_0x3e4eab['sourceTableError']&&console[_0x1e30c1(0x2dd)]('\x20\x20\x20\x20\x20\x20'+a31_0x1c79fc[_0x1e30c1(0x1b0)](_0x3e4eab['sourceTableError']));}}if(_0x24dc19[_0x1e30c1(0x204)]&&_0x24dc19[_0x1e30c1(0x204)][_0x1e30c1(0x291)]>0x0){console[_0x1e30c1(0x2dd)]('\x20\x20'+a31_0x1c79fc['dim']('Attributes:')+'\x20'+_0x24dc19[_0x1e30c1(0x204)][_0x1e30c1(0x291)]+_0x1e30c1(0x2c5));for(const _0x558235 of _0x24dc19[_0x1e30c1(0x204)]){const _0xfce6d6=_0x558235['valid']?a31_0x1c79fc[_0x1e30c1(0x221)]('✔'):a31_0x1c79fc[_0x1e30c1(0x1b0)]('✘');console['error'](_0x1e30c1(0x2af)+_0xfce6d6+'\x20'+_0x558235[_0x1e30c1(0x138)]+'\x20'+a31_0x1c79fc[_0x1e30c1(0x1d9)]('('+_0x558235[_0x1e30c1(0x325)]+')'));}}if(_0x24dc19[_0x1e30c1(0x254)]){const _0x6655b7=_0x24dc19[_0x1e30c1(0x254)]['stitchingKeys']?.[_0x1e30c1(0x291)]?_0x1e30c1(0x1a8)+_0x24dc19[_0x1e30c1(0x254)][_0x1e30c1(0x1fb)][_0x1e30c1(0x142)](',\x20')+']':'';console[_0x1e30c1(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x1e30c1(0x1d9)](_0x1e30c1(0x1d2))+'\x20'+_0x24dc19[_0x1e30c1(0x254)][_0x1e30c1(0x1bb)]+_0x6655b7);}if(_0x24dc19[_0x1e30c1(0x2fc)]&&_0x24dc19[_0x1e30c1(0x2fc)][_0x1e30c1(0x291)]>0x0){console[_0x1e30c1(0x2dd)]('\x20\x20'+a31_0x1c79fc['dim'](_0x1e30c1(0x15c))+'\x20'+_0x24dc19['personalizationServices'][_0x1e30c1(0x291)]+_0x1e30c1(0x2de)+(_0x24dc19[_0x1e30c1(0x2fc)]['length']!==0x1?'s':''));for(const _0x18af34 of _0x24dc19[_0x1e30c1(0x2fc)]){console['error'](_0x1e30c1(0x1a7)+_0x18af34[_0x1e30c1(0x138)]);}}}function showParentSegmentNotSetError(_0x1e85ff){const _0x40a564=a31_0x246d00;console[_0x40a564(0x2dd)](a31_0x1c79fc[_0x40a564(0x288)](_0x40a564(0x1cd))),console[_0x40a564(0x2dd)](_0x1e85ff);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x2b2);[a31_0x246d00(0x1ee)]='List\x20parent\x20segments';async['execute'](_0x12aee3){const _0x35ad7c=a31_0x246d00,{options:_0x26f5e1,args:_0x16f728,tdx:_0x24d0cd}=_0x12aee3,_0x4f7a9b=_0x16f728[0x0];_0x26f5e1[_0x35ad7c(0x1db)]&&(console[_0x35ad7c(0x2dd)](_0x35ad7c(0x314)+_0x26f5e1[_0x35ad7c(0x184)]),_0x4f7a9b&&console[_0x35ad7c(0x2dd)](_0x35ad7c(0x17c)+_0x4f7a9b));const _0x85e925=await withSpinner(_0x4f7a9b?_0x35ad7c(0x32c)+_0x4f7a9b+_0x35ad7c(0x1ae):_0x35ad7c(0x28f),()=>_0x24d0cd[_0x35ad7c(0x338)][_0x35ad7c(0x32d)](),{'verbose':_0x26f5e1[_0x35ad7c(0x1db)]});let _0x8f0b9b=_0x85e925[_0x35ad7c(0x1ad)];if(_0x4f7a9b){const _0x5bb27f=_0x4f7a9b[_0x35ad7c(0x188)](/[.+^${}()|[\]\\]/g,_0x35ad7c(0x1b1))[_0x35ad7c(0x188)](/\*/g,'.*')[_0x35ad7c(0x188)](/\?/g,'.'),_0x3b5e22=new RegExp('^'+_0x5bb27f+'$','i');_0x8f0b9b=_0x8f0b9b['filter'](_0x4d0c6d=>_0x3b5e22[_0x35ad7c(0x170)](_0x4d0c6d[_0x35ad7c(0x204)]['name']));}_0x8f0b9b[_0x35ad7c(0x2e1)]((_0x4c9864,_0x2024cc)=>_0x4c9864[_0x35ad7c(0x204)][_0x35ad7c(0x138)][_0x35ad7c(0x2ea)](_0x2024cc['attributes'][_0x35ad7c(0x138)])),console[_0x35ad7c(0x2dd)](_0x35ad7c(0x281)+_0x8f0b9b[_0x35ad7c(0x291)]+_0x35ad7c(0x275)+(_0x8f0b9b[_0x35ad7c(0x291)]!==0x1?'s':''));const _0x3e66c7=_0x265d1d=>{const _0x14927f=_0x35ad7c;return getConsoleNextUrl(_0x26f5e1[_0x14927f(0x184)],_0x14927f(0x343)+_0x265d1d);};if(_0x26f5e1[_0x35ad7c(0x14d)]===_0x35ad7c(0x33e)||_0x26f5e1[_0x35ad7c(0x14d)]===_0x35ad7c(0x349)){const _0x14dd2a=_0x8f0b9b[_0x35ad7c(0x1c9)](_0x5c596f=>({..._0x5c596f,'url':_0x3e66c7(_0x5c596f['id'])}));await handleSDKOutput(_0x14dd2a,_0x26f5e1);}else{if(_0x8f0b9b[_0x35ad7c(0x291)]===0x0)_0x4f7a9b?console['log'](_0x35ad7c(0x17f)+_0x4f7a9b):console[_0x35ad7c(0x16d)](_0x35ad7c(0x1ac));else for(const _0xa6299 of _0x8f0b9b){const _0x39a2c4=_0xa6299['attributes']['population']?a31_0x1c79fc['dim']('\x20('+formatRows(_0xa6299[_0x35ad7c(0x204)][_0x35ad7c(0x1af)])+')'):'',_0x270a5a=hyperlink(_0xa6299[_0x35ad7c(0x204)][_0x35ad7c(0x138)],_0x3e66c7(_0xa6299['id']));console[_0x35ad7c(0x16d)](_0x35ad7c(0x2d9)+_0x270a5a+_0x39a2c4);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{['name']=a31_0x246d00(0x1a3);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x137);async[a31_0x246d00(0x2c8)](_0x322bc9){const _0x242def=a31_0x246d00,{options:_0x3010bc,args:_0x167365,tdx:_0x38d223}=_0x322bc9;console[_0x242def(0x2dd)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a'+_0x242def(0x2a1)+_0x242def(0x2c0));const _0x2d6628=_0x3010bc;if(_0x167365[_0x242def(0x291)]===0x0)return console[_0x242def(0x2dd)](a31_0x1c79fc[_0x242def(0x1b0)](_0x242def(0x29e))),console['error'](_0x242def(0x163)),0x1;const _0x51936a=_0x167365[0x0];if(!_0x2d6628[_0x242def(0x1d3)]||!_0x2d6628[_0x242def(0x331)])return console['error'](_0x242def(0x1b5)),console[_0x242def(0x2dd)](_0x242def(0x163)),0x1;_0x2d6628['verbose']&&(console['error'](_0x242def(0x314)+_0x2d6628[_0x242def(0x184)]),console[_0x242def(0x2dd)](_0x242def(0x199)+_0x51936a),console[_0x242def(0x2dd)](_0x242def(0x2be)+_0x2d6628[_0x242def(0x1d3)]),console[_0x242def(0x2dd)](_0x242def(0x329)+_0x2d6628[_0x242def(0x331)]));const _0x12b995=await loadJSONFromOptions(_0x2d6628[_0x242def(0x204)],_0x2d6628[_0x242def(0x206)]),_0x552564=await loadJSONFromOptions(_0x2d6628['behaviors'],_0x2d6628[_0x242def(0x1b8)]),_0x2dff8a=await loadJSONFromOptions(_0x2d6628[_0x242def(0x15f)],_0x2d6628['customerGroupFile']),_0x23d05c={'name':_0x51936a,'description':_0x2d6628['description'],'scheduleType':_0x2d6628[_0x242def(0x2ff)],'scheduleOption':_0x2d6628[_0x242def(0x19d)],'timezone':_0x2d6628[_0x242def(0x181)],'master':{'parentDatabaseName':_0x2d6628[_0x242def(0x1d3)],'parentTableName':_0x2d6628[_0x242def(0x331)]},'attributes':_0x12b995,'behaviors':_0x552564,'customerGroup':_0x2dff8a},_0x4901b3=await withSpinner(_0x242def(0x172)+_0x51936a+_0x242def(0x1ae),()=>_0x38d223[_0x242def(0x338)][_0x242def(0x272)](_0x23d05c),{'verbose':_0x3010bc['verbose']}),_0x51e3e3=_0x4901b3['data'];return console[_0x242def(0x2dd)]('✔\x20Created\x20parent\x20segment\x20\x27'+_0x51e3e3['name']+'\x27\x20with\x20ID:\x20'+_0x51e3e3['id']),await handleSDKOutput([_0x51e3e3],_0x3010bc),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x1e5);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x21d);async[a31_0x246d00(0x2c8)](_0x171b23){const _0x9053c=a31_0x246d00,{options:_0x4e2a28,args:_0x221af3,tdx:_0x2adebd}=_0x171b23;console['error'](_0x9053c(0x286)+_0x9053c(0x2a1)+_0x9053c(0x2c0));const _0x3bc04d=_0x4e2a28;if(_0x221af3['length']===0x0)return console['error'](a31_0x1c79fc[_0x9053c(0x1b0)](_0x9053c(0x29e))),console[_0x9053c(0x2dd)](_0x9053c(0x2b1)),0x1;const _0x5e7020=_0x221af3[0x0];_0x3bc04d[_0x9053c(0x1db)]&&(console[_0x9053c(0x2dd)](_0x9053c(0x314)+_0x3bc04d[_0x9053c(0x184)]),console['error'](_0x9053c(0x14c)+_0x5e7020));const _0x52d325=await withSpinner(_0x9053c(0x32a)+_0x5e7020+'\x27...',()=>_0x2adebd[_0x9053c(0x338)][_0x9053c(0x186)](_0x5e7020),{'verbose':_0x3bc04d[_0x9053c(0x1db)]}),_0x2cae17=_0x52d325[_0x9053c(0x1ad)],_0x3305d1=await loadJSONFromOptions(_0x3bc04d['addAttributes'],_0x3bc04d['addAttributesFile']),_0x926c94=await loadJSONFromOptions(_0x3bc04d[_0x9053c(0x2bc)],_0x3bc04d[_0x9053c(0x1e2)]),_0x9b100e={'name':_0x2cae17['name'],'description':_0x3bc04d[_0x9053c(0x1ee)]!==undefined?_0x3bc04d[_0x9053c(0x1ee)]:_0x2cae17[_0x9053c(0x1ee)],'scheduleType':_0x3bc04d['scheduleType']!==undefined?_0x3bc04d['scheduleType']:_0x2cae17[_0x9053c(0x2ff)],'scheduleOption':_0x3bc04d['scheduleOption']!==undefined?_0x3bc04d['scheduleOption']:_0x2cae17['scheduleOption'],'timezone':_0x3bc04d[_0x9053c(0x181)]!==undefined?_0x3bc04d[_0x9053c(0x181)]:_0x2cae17['timezone'],'master':_0x2cae17[_0x9053c(0x246)],'attributes':_0x3305d1?[..._0x2cae17['attributes']||[],..._0x3305d1]:_0x2cae17[_0x9053c(0x204)],'behaviors':_0x926c94?[..._0x2cae17[_0x9053c(0x1e8)]||[],..._0x926c94]:_0x2cae17[_0x9053c(0x1e8)],'customerGroup':_0x2cae17[_0x9053c(0x15f)]},_0x4c83e4=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x5e7020+_0x9053c(0x1ae),()=>_0x2adebd[_0x9053c(0x338)][_0x9053c(0x334)](_0x5e7020,_0x9b100e),{'verbose':_0x3bc04d[_0x9053c(0x1db)]}),_0x18824c=_0x4c83e4[_0x9053c(0x1ad)];return console[_0x9053c(0x2dd)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x18824c[_0x9053c(0x138)]+'\x27'),await handleSDKOutput([_0x18824c],_0x3bc04d),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']='segment:parent:pull';[a31_0x246d00(0x1ee)]='Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file';async['execute'](_0x8541f6){const _0x5af0a9=a31_0x246d00,{options:_0x37c87e,args:_0x1b8c7f,tdx:_0x2edaf2}=_0x8541f6,_0x55d227=_0x37c87e,_0x18004f=_0x1b8c7f[0x0]||_0x37c87e[_0x5af0a9(0x224)];if(!_0x18004f)return showParentSegmentNotSetError(_0x5af0a9(0x324)+_0x5af0a9(0x312)),0x1;if(_0x55d227['use']&&_0x55d227[_0x5af0a9(0x25a)])return console['error'](a31_0x1c79fc[_0x5af0a9(0x1b0)]('Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a')),console['error'](a31_0x1c79fc['dim'](_0x5af0a9(0x34a))),console['error'](a31_0x1c79fc[_0x5af0a9(0x1d9)](_0x5af0a9(0x174)+PARENT_SEGMENT_DIR+_0x5af0a9(0x21a))),console[_0x5af0a9(0x2dd)](a31_0x1c79fc[_0x5af0a9(0x28d)](_0x5af0a9(0x1c2))),0x1;const _0x3c70b9=_0x55d227['output']||a31_0x4ef3d3[_0x5af0a9(0x142)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x18004f)+_0x5af0a9(0x1a0));_0x55d227[_0x5af0a9(0x1db)]&&(console[_0x5af0a9(0x2dd)](_0x5af0a9(0x314)+_0x55d227[_0x5af0a9(0x184)]),console[_0x5af0a9(0x2dd)](_0x5af0a9(0x14c)+_0x18004f),console[_0x5af0a9(0x2dd)](_0x5af0a9(0x31a)+_0x3c70b9));const _0x1ff0da=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x18004f+_0x5af0a9(0x1ae),()=>_0x2edaf2[_0x5af0a9(0x338)][_0x5af0a9(0x1be)](_0x18004f),{'verbose':_0x55d227[_0x5af0a9(0x1db)]}),_0x240895=_0x1ff0da['data'];if(existsSync(_0x3c70b9)){const _0x127f02=readFileSync(_0x3c70b9,_0x5af0a9(0x344)),_0x69804=generateDiff(_0x127f02,_0x240895);if(!hasChanges(_0x69804))console[_0x5af0a9(0x2dd)](a31_0x1c79fc[_0x5af0a9(0x221)]('✔')+_0x5af0a9(0x244)+a31_0x1c79fc[_0x5af0a9(0x28d)](_0x3c70b9)+_0x5af0a9(0x192));else{console['error']('\x0aChanges\x20to\x20\x27'+_0x3c70b9+'\x27:'),console[_0x5af0a9(0x2dd)]('─'[_0x5af0a9(0x2c7)](0x3c)),console[_0x5af0a9(0x2dd)](formatDiffWithColors(_0x69804)),console[_0x5af0a9(0x2dd)]('─'[_0x5af0a9(0x2c7)](0x3c));if(!_0x55d227[_0x5af0a9(0x2f0)]){if(!isInteractive())return console[_0x5af0a9(0x2dd)](a31_0x1c79fc['red'](_0x5af0a9(0x25c)),_0x5af0a9(0x1b4)),console[_0x5af0a9(0x2dd)](a31_0x1c79fc[_0x5af0a9(0x1d9)](_0x5af0a9(0x30e))),0x1;const _0x1b441c=await confirmKey(_0x5af0a9(0x235)+_0x3c70b9+'\x27?');if(!_0x1b441c)return console[_0x5af0a9(0x2dd)](a31_0x1c79fc[_0x5af0a9(0x288)]('Aborted.')),0x1;}writeFileSync(_0x3c70b9,_0x240895,_0x5af0a9(0x344)),console[_0x5af0a9(0x2dd)](a31_0x1c79fc['green']('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x1c79fc[_0x5af0a9(0x28d)](_0x3c70b9));}}else{const _0x4d4a54=a31_0x4ef3d3[_0x5af0a9(0x250)](_0x3c70b9);!existsSync(_0x4d4a54)&&mkdirSync(_0x4d4a54,{'recursive':!![]}),writeFileSync(_0x3c70b9,_0x240895,_0x5af0a9(0x344)),console[_0x5af0a9(0x2dd)](a31_0x1c79fc['green']('✔')+_0x5af0a9(0x26f)+a31_0x1c79fc[_0x5af0a9(0x28d)](_0x3c70b9));}return saveSessionContext({'parent_segment':_0x18004f},_0x55d227[_0x5af0a9(0x18c)]),console[_0x5af0a9(0x2dd)](a31_0x1c79fc[_0x5af0a9(0x221)]('✔')+_0x5af0a9(0x33f)+a31_0x1c79fc['dim'](_0x5af0a9(0x2e4))+_0x5af0a9(0x157)+a31_0x1c79fc['cyan'](_0x18004f)),0x0;}}function a31_0x8050(){const _0x4b412c=['updated:','Error:\x20Personalization\x20ID\x20is\x20required','tokens','\x20--interval\x20','errors','\x20is\x20already\x20up\x20to\x20date','query','enriched','createdAt','limit','tdx\x20ps\x20preview\x20','\x22\x20}','Name:\x20','ps:rt:list','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','\x20kill','scheduleOption','pauseJourney','workflowAttemptId','.yml','Listing\x20personalizations\x20for\x20\x27','segment:parent:show','segment:parent:create','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','Next\x20steps:','List\x20available\x20fields\x20for\x20segmentation','\x20\x20\x20\x20-\x20','\x20+\x20[','schemaError','null','Error:\x20File\x20not\x20found:\x20','No\x20parent\x20segments\x20found','data','\x27...','population','red','\x5c$&','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','Preview:','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Error:\x20--database\x20and\x20--table\x20are\x20required','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','\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','behaviorsFile','Found\x20YAML\x20file:\x20','Analyzing\x20changes...','primaryKey','launched','Executing\x20parent\x20segment\x20query...','pullParentYaml','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Validate:','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','1798083ciBhuI','\x0a\x20\x20]\x0a}\x0a','%)\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','entryCriteria','map','displayColumns','3kDASlw','segment:parent:preview','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','24MdGILO','Creating\x20personalization\x20\x27','Update\x20a\x20realtime\x20personalization\x20entity','\x20rows\x20','ID\x20Stitching:','database','trim','Get\x20SQL\x20query\x20for\x20parent\x20segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','joinKey','string','dim','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','verbose','segment:parent:desc','\x20(paused)','\x20stage','Error\x20parsing\x20YAML:\x20','getParentSQL','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','addBehaviorsFile','ps:pz:service:token:delete','displaySampleData','segment:parent:update','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','behaviors','Master\x20+\x20Attributes','deleteToken','Apply\x20changes\x20to\x20\x27','\x27\x20and\x20run\x20workflow?','match','description','ps:rt:configuration_versions','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x20Added\x20RT\x202.0\x20template\x20section','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','\x20Added\x20personalization\x20template\x20to\x20','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','endsWith','Fetching\x20customers\x20schema...','Updated','Listing\x20RT\x20journeys\x20for\x20\x27','stitchingKeys','ps:rt:jn:pause','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','Error:\x20--behavior\x20requires\x20a\x20name\x0a','bold','events','Validating\x20RT\x20configuration...','Fetching\x20behavior\x20list...','\x27\x20is\x20already\x20up\x20to\x20date','attributes','sections','attributesFile','stringify','Rows:','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','any','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','getBehaviorNames','attribute','displayMasterInfo','\x0a⚠️\x20\x20Both\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','\x20\x20Note:\x20','Deleting\x20token\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20for\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','toFixed','td_client_id','getCurrentConfigVersion','ps:pz:service:create','information_schema','/{name}.yml\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','sourceTableValid','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Enriched:','ps:pz:service:delete','eventKind','green','Create\x20a\x20realtime\x20personalization\x20entity','public','parentSegment','single','apply','133435GOeaoN','YAML\x20file:\x20','Listing\x20RT-enabled\x20parent\x20segments...','\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','Options\x20(one\x20required):\x0a','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','last_page_viewed','\x20Opening\x20','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','Session:','toLocaleString','\x0a\x20\x20\x20\x20}','Listing\x20fields\x20for\x20\x27','Overwrite\x20\x27','unref','Behaviors','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','\x0aNo\x20sample\x20data\x20available','in\x20','get','Error:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','personalization','SELECT\x20*\x20FROM\x20','\x20--attribute\x20\x22','includeSensitive:','keyEventId','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','\x20No\x20changes\x20-\x20','Error:\x20Service\x20name\x20is\x20required','master','relationships','list','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','Getting\x20personalization\x20\x27','Deleting\x20personalization\x20\x27','isDirectory','number','column','-1d','dirname','payload:','includeSensitive','text','idStitching','status','Error:\x20Service\x20ID\x20is\x20required','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','workflowSessionId','output','elapsedTimeMillis','\x0aError:','Options:\x0a','\x0aUsage:\x20tdx\x20ps\x20preview\x20','No\x20personalization\x20services\x20configured','split','Error:\x20Token\x20ID\x20is\x20required','\x20service(s)\x20configured','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\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','✔\x20Updated\x20personalization\x20\x27','preview','win32','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','\x27\x20is\x20up\x20to\x20date','token:','/sessions/','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Error:\x20--name\x20is\x20required','✔\x20Created\x20token\x20\x27','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','/attempt/','createParent','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','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','\x20parent\x20segment','listPersonalizations','platform','ps:pz:patch','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','segment:parent:push','204knSumu','Show\x20personalization\x20service\x20details','Show\x20a\x20specific\x20realtime\x20personalization','Show\x20parent\x20segment\x20details','Source:','✔\x20Found\x20','filter','keys','/\x20→\x20','eventKind:\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','Master\x20Table','yellow','Create\x20parent\x20segment\x20\x27','Join\x20on:','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','realtime','cyan','\x20--enriched','Listing\x20parent\x20segments...','state','length','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x20field','validateParentYaml','varchar','open','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','customersWithEvents','\x20\x20Columns:\x20','user_id','foreignKey','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','Show\x20parent\x20segment\x20schema\x20(column\x20types)','Error:\x20Parent\x20segment\x20name\x20is\x20required','displaySummary','start','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','\x0aChanges\x20to\x20apply\x20to\x20\x27','customers','stats','\x20RT\x20configuration\x20is\x20valid','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','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','column_type','ps:pz:service:list','Schema\x20saved\x20to\x20','\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','✔\x20Found\x20personalization\x20\x27','\x0aNew\x20parent\x20segment\x20\x27','getOutputDatabaseName','\x20\x20\x20\x20','Join:','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','segment:parent:list','\x0a✔\x20Workflow\x20started','\x20behaviors','schemaValid','tdx\x20ps\x20push\x20','4525947vDbmvj','\x20\x20No\x20sample\x20data\x20available','segment:parent:validate','displayPreviewHints','status:\x20','addBehaviors','runParent','Database:\x20','✔\x20Created\x20personalization\x20\x27','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','resumeJourney','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','\x20configured','coveragePercent','repeat','execute','column_name','displayRealtimeInfo','ps:pz:list','\x20to\x20configure\x20your\x20personalization\x20service','SELECT\x20*\x20FROM\x20(\x0a','/\x20and\x20','Columns:','value','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','sampleData','processedRows','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','customerPercent','To\x20view\x20sample\x20data:','displayAttributesStats','👥\x20','\x27\x20with\x20ID:\x20','.yaml','file','error','\x20service','Fetching\x20sample\x20data...','✔\x20Deleted\x20token\x20\x27','sort','resolveParentId','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','parent_segment','jobId','RT\x202.0:','\x20\x202.\x20Run\x20','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','no\x20tokens\x20configured','localeCompare','stop','behavior_','/app/workflows/','ps:rt:validate','patchPersonalization','yes','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20configuration_versions\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20for\x20specific\x20parent\x20segment','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','interval','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','Creating','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','allValid','✔\x20Retrieved\x20RT\x20configuration\x20version','formatSchemaJson','\x20--behavior\x20\x22<name>\x22','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','personalizationServices','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','/\x20directories\x20exist.','scheduleType','page_view','web','\x20[Job\x20ID:\x20','keyEventId:','displayValidateResults','segment:parent:run','Creating\x20personalization\x20service\x20\x27','Fetching\x20SQL\x20for\x20\x27','Behavior:','getPersonalization','ignore','setJobId','\x20to\x20push\x20the\x20configuration','Created','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','allowed\x20IPs:','✔\x20Deleted\x20personalization\x20\x27','folderId','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','1063598Gjqhvo','Site:\x20','\x20personalization','✔\x20Updated\x20personalization\x20service\x20\x27','workflowId','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','Validating\x20configuration...','Output\x20file:\x20','some','behavior','patch','Error:\x20--attribute\x20requires\x20a\x20name\x0a','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','ps:pz:service:update','displayPreviewResults','\x20--attribute\x20\x22<name>\x22','Coverage:','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','type','columns','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','entryCriteria:','Table:\x20','Fetching\x20current\x20configuration\x20for\x20\x27','realtime_enabled','Listing\x20parent\x20segments\x20matching\x20\x27','listParents','previewParentYaml','rowCount','personalization_services','table','payload','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','updateParent','paused','.customers)','\x20RT\x20journey','segment','✘\x20Failed\x20to\x20rename\x20directory:\x20','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','\x20\x20\x20\x20\x20\x20','json','\x20Context\x20set:\x20','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','label','identifier:\x20','/app/dw/parentSegments/','utf-8','Errors:','(id:\x20','Attempt:','push','jsonl','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','parent_id','ps:pz:create','matchedCount','My\x20Service','run','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','name','realtime:','ps:pz:init','darwin','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','Options:','Deleting\x20personalization\x20service\x20\x27','Error\x20reading\x20file:\x20','/\x20directory.\x0a','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','join','parentFolder','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','audienceId:','1185394Wuitfw','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','allowedIps','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','toLowerCase','Updating\x20personalization\x20service\x20\x27','Parent\x20segment:\x20','format','all','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','ps:rt:jn:list','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','\x20parent\x20segment\x20\x27','Output\x20Database:','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','message','\x20=\x20','List\x20RT\x20journeys','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','Available\x20behaviors:','Default','Personalization:','Fetching\x20personalization\x20service\x20\x27','listFields','customerGroup','indexOf','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','Resolving\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Events:','SQL\x20query:\x0a','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','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','{\x0a\x20\x20\x22database\x22:\x20\x22','createToken','Error:\x20Token\x20name\x20is\x20required','id:\x20','log','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','pushParentYaml','test','6579042ELgyoE','Creating\x20parent\x20segment\x20\x27','No\x20personalizations\x20configured','using\x20the\x20default\x20path:\x20','displayBehaviorsStats','ps:pz:show','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','\x20true','\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','sections:','16291110vVSFCG','Pattern:\x20','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','No\x20parent\x20segments\x20match\x20pattern:\x20','stageCount','timezone','✔\x20Query\x20completed:\x20Processed\x20','No\x20RT-enabled\x20parent\x20segments\x20found','site','⚡\x20Enabled','getParentFull','totalEvents','replace','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','createPersonalization','audienceId','session'];a31_0x8050=function(){return _0x4b412c;};return a31_0x8050();}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x27b);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x340);async[a31_0x246d00(0x2c8)](_0x459c0a){const _0x5be57e=a31_0x246d00,{options:_0x12ce2d,args:_0x2b9fe2,tdx:_0xe5c900}=_0x459c0a,_0x15d28e=_0x12ce2d,_0x220958=_0x2b9fe2[0x0]||_0x12ce2d[_0x5be57e(0x224)];if(!_0x220958)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'+_0x5be57e(0x249)),0x1;const _0x112886=resolveYamlFile(_0x220958);if(!existsSync(_0x112886))return showFileNotFoundError(_0x112886,_0x220958),0x1;_0x15d28e[_0x5be57e(0x1db)]&&(console[_0x5be57e(0x2dd)](_0x5be57e(0x314)+_0x15d28e[_0x5be57e(0x184)]),console[_0x5be57e(0x2dd)]('YAML\x20file:\x20'+_0x112886));let _0x5014aa;try{_0x5014aa=readFileSync(_0x112886,_0x5be57e(0x344));}catch(_0x1af9c1){const _0x6b0dbc=_0x1af9c1 instanceof Error?_0x1af9c1[_0x5be57e(0x156)]:String(_0x1af9c1);return console[_0x5be57e(0x2dd)]('Error\x20reading\x20file:\x20'+_0x6b0dbc),0x1;}const _0x395b1f=await withSpinner(_0x5be57e(0x1ba),()=>_0xe5c900[_0x5be57e(0x338)]['pushParentYaml'](_0x5014aa),{'verbose':_0x15d28e[_0x5be57e(0x1db)]}),_0x483752=_0x395b1f[_0x5be57e(0x1ad)],{isNew:_0x1c9dc3,name:_0x15cd8c,hasChanges:_0xbf50d4,diffFormatted:_0x2be7e2}=_0x483752;if(!_0xbf50d4)return console[_0x5be57e(0x2dd)]('✔\x20No\x20changes\x20-\x20\x27'+_0x15cd8c+_0x5be57e(0x203)),0x0;_0x1c9dc3?console['error'](_0x5be57e(0x2ad)+_0x15cd8c+'\x27:'):console[_0x5be57e(0x2dd)](_0x5be57e(0x2a2)+_0x15cd8c+'\x27:');console[_0x5be57e(0x2dd)]('─'[_0x5be57e(0x2c7)](0x3c)),console[_0x5be57e(0x2dd)](_0x2be7e2),console[_0x5be57e(0x2dd)]('─'[_0x5be57e(0x2c7)](0x3c));const _0xf4a38f=_0x1c9dc3?_0x5be57e(0x289)+_0x15cd8c+'\x27?':_0x5be57e(0x1eb)+_0x15cd8c+'\x27?';if(!_0x15d28e[_0x5be57e(0x2f0)]){if(!isInteractive())return console[_0x5be57e(0x2dd)](a31_0x1c79fc[_0x5be57e(0x1b0)](_0x5be57e(0x25c)),_0x5be57e(0x1b4)),console[_0x5be57e(0x2dd)](a31_0x1c79fc['dim'](_0x5be57e(0x30e))),0x1;const _0x75acc6=await confirmKey(_0xf4a38f);if(!_0x75acc6)return console[_0x5be57e(0x2dd)](a31_0x1c79fc['yellow']('Aborted.')),0x1;}const _0x11fcc4=_0x1c9dc3?_0x5be57e(0x2f5):'Updating',_0x21d606=await withSpinner(_0x11fcc4+_0x5be57e(0x153)+_0x15cd8c+_0x5be57e(0x1ae),()=>_0x483752['apply'](),{'verbose':_0x15d28e['verbose']}),_0x3323f1=_0x21d606[_0x5be57e(0x1ad)],_0x5813ef=getConsoleNextUrl(_0x15d28e[_0x5be57e(0x184)],_0x5be57e(0x343)+_0x3323f1['id']),_0x4c4dca=_0x1c9dc3?_0x5be57e(0x30d):_0x5be57e(0x1f9);return console[_0x5be57e(0x2dd)]('✔\x20'+_0x4c4dca+'\x20parent\x20segment\x20\x27'+_0x3323f1[_0x5be57e(0x138)]+'\x27'),console[_0x5be57e(0x2dd)]('\x20\x20'+_0x5813ef),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x2b9);['description']='Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics';async[a31_0x246d00(0x2c8)](_0x16b6eb){const _0x4be00a=a31_0x246d00,{options:_0x3f451e,args:_0x414743,tdx:_0x78d96}=_0x16b6eb,_0x52ad23=_0x3f451e,_0x4a9ff9=_0x414743[0x0]||_0x3f451e[_0x4be00a(0x224)];if(!_0x4a9ff9)return showParentSegmentNotSetError(_0x4be00a(0x1a4)+_0x4be00a(0x2c2)+_0x4be00a(0x25d)+_0x4be00a(0x1f0)+_0x4be00a(0x17e)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;const _0x561f48=resolveYamlFile(_0x4a9ff9);if(!existsSync(_0x561f48))return showFileNotFoundError(_0x561f48,_0x4a9ff9),0x1;_0x52ad23[_0x4be00a(0x1db)]&&(console[_0x4be00a(0x2dd)](_0x4be00a(0x314)+_0x52ad23[_0x4be00a(0x184)]),console[_0x4be00a(0x2dd)](_0x4be00a(0x228)+_0x561f48));let _0x4ce832;try{_0x4ce832=readFileSync(_0x561f48,_0x4be00a(0x344));}catch(_0x1d2bc3){const _0x3e0ad7=_0x1d2bc3 instanceof Error?_0x1d2bc3[_0x4be00a(0x156)]:String(_0x1d2bc3);return console[_0x4be00a(0x2dd)]('Error\x20reading\x20file:\x20'+_0x3e0ad7),0x1;}const _0xca6b8b=createCommandSpinner(a31_0x1c79fc['dim'](_0x4be00a(0x319)),{'verbose':_0x52ad23[_0x4be00a(0x1db)]});_0xca6b8b['start']();const _0x198331={'onProgress':_0xf66779=>{_0xca6b8b['text']=formatProgressMessage(_0xf66779);}};if(_0x52ad23[_0x4be00a(0x246)])_0x198331[_0x4be00a(0x246)]=!![];if(_0x52ad23[_0x4be00a(0x194)])_0x198331[_0x4be00a(0x194)]=!![];_0x52ad23[_0x4be00a(0x20d)]&&(_0x198331[_0x4be00a(0x20d)]=_0x52ad23[_0x4be00a(0x20d)]);_0x52ad23[_0x4be00a(0x31c)]&&(_0x198331[_0x4be00a(0x31c)]=_0x52ad23[_0x4be00a(0x31c)]);if(_0x52ad23[_0x4be00a(0x2f3)])_0x198331[_0x4be00a(0x2f3)]=_0x52ad23[_0x4be00a(0x2f3)];let _0x594bf7;try{_0x594bf7=await _0x78d96['segment']['validateParentYaml'](_0x4ce832,_0x198331),_0xca6b8b[_0x4be00a(0x2eb)]();}catch(_0x192530){_0xca6b8b[_0x4be00a(0x2eb)]();throw _0x192530;}const _0x3e64c8=_0x52ad23['interval']||_0x4be00a(0x24f);return this[_0x4be00a(0x304)](_0x594bf7,_0x198331,_0x561f48,_0x3e64c8),_0x594bf7[_0x4be00a(0x2f7)]?0x0:0x1;}[a31_0x246d00(0x304)](_0x3c9639,_0x118020,_0x4a294b,_0x1bd513){const _0x118cc7=a31_0x246d00;console[_0x118cc7(0x2dd)]('\x0a'+a31_0x1c79fc[_0x118cc7(0x1ff)](_0x118cc7(0x1c0))+'\x20'+_0x3c9639['name']),console[_0x118cc7(0x2dd)]('═'[_0x118cc7(0x2c7)](0x3c)),this[_0x118cc7(0x20e)](_0x3c9639);if(typeof _0x118020[_0x118cc7(0x20d)]===_0x118cc7(0x1d8)){this[_0x118cc7(0x2d8)](_0x3c9639),this[_0x118cc7(0x29f)](_0x3c9639),this['displayPreviewHints'](_0x4a294b,_0x1bd513,'attribute',_0x118020[_0x118cc7(0x20d)]);return;}if(_0x118020[_0x118cc7(0x20d)]===!![]){this[_0x118cc7(0x2d8)](_0x3c9639),this['displaySummary'](_0x3c9639),this[_0x118cc7(0x2ba)](_0x4a294b,_0x1bd513,_0x118cc7(0x204));return;}if(typeof _0x118020[_0x118cc7(0x31c)]===_0x118cc7(0x1d8)){this[_0x118cc7(0x175)](_0x3c9639,_0x1bd513),this[_0x118cc7(0x29f)](_0x3c9639),this['displayPreviewHints'](_0x4a294b,_0x1bd513,_0x118cc7(0x31c),_0x118020[_0x118cc7(0x31c)]);return;}if(_0x118020[_0x118cc7(0x31c)]===!![]){this[_0x118cc7(0x175)](_0x3c9639,_0x1bd513),this[_0x118cc7(0x29f)](_0x3c9639),this[_0x118cc7(0x2ba)](_0x4a294b,_0x1bd513,_0x118cc7(0x1e8));return;}this[_0x118cc7(0x2d8)](_0x3c9639),this[_0x118cc7(0x175)](_0x3c9639,_0x1bd513),this[_0x118cc7(0x2ca)](_0x3c9639),this[_0x118cc7(0x29f)](_0x3c9639),this[_0x118cc7(0x2ba)](_0x4a294b,_0x1bd513,_0x118cc7(0x14e));}[a31_0x246d00(0x2ca)](_0x5ba859){displayRealtimeValidation(_0x5ba859);}[a31_0x246d00(0x2ba)](_0x1fef04,_0x23421f,_0x4247f1,_0x10245b){const _0x5b1eae=a31_0x246d00;console[_0x5b1eae(0x2dd)]('\x0a'+a31_0x1c79fc[_0x5b1eae(0x1d9)](_0x5b1eae(0x2d7)));const _0x52e361=_0x23421f!==_0x5b1eae(0x24f)?_0x5b1eae(0x190)+_0x23421f:'';if(_0x4247f1===_0x5b1eae(0x20d)&&_0x10245b)console[_0x5b1eae(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x5b1eae(0x1d9)]('tdx\x20ps\x20preview\x20'+_0x1fef04+_0x5b1eae(0x240)+_0x10245b+'\x22'+_0x52e361));else{if(_0x4247f1===_0x5b1eae(0x31c)&&_0x10245b)console[_0x5b1eae(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x5b1eae(0x1d9)](_0x5b1eae(0x197)+_0x1fef04+'\x20--behavior\x20\x22'+_0x10245b+'\x22'+_0x52e361));else(_0x4247f1===_0x5b1eae(0x204)||_0x4247f1===_0x5b1eae(0x14e))&&console[_0x5b1eae(0x2dd)]('\x20\x20'+a31_0x1c79fc['dim'](_0x5b1eae(0x197)+_0x1fef04+_0x5b1eae(0x322)+_0x52e361));}(_0x4247f1===_0x5b1eae(0x1e8)||_0x4247f1==='all')&&console[_0x5b1eae(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x5b1eae(0x1d9)](_0x5b1eae(0x197)+_0x1fef04+_0x5b1eae(0x2fa)+_0x52e361)),_0x4247f1===_0x5b1eae(0x14e)&&console[_0x5b1eae(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x5b1eae(0x1d9)](_0x5b1eae(0x197)+_0x1fef04+_0x5b1eae(0x28e)+_0x52e361));}['displayMasterInfo'](_0x1886cf){const _0x67214b=a31_0x246d00,{master:_0x41e72d}=_0x1886cf,_0x4946c4=_0x41e72d[_0x67214b(0x2b5)]?a31_0x1c79fc['green']('✔'):a31_0x1c79fc['red']('✘');console['error']('\x0a'+a31_0x1c79fc[_0x67214b(0x1d9)](_0x67214b(0x287))),console['error'](_0x4946c4+'\x20'+a31_0x1c79fc['bold'](_0x41e72d[_0x67214b(0x1d3)]+'.'+_0x41e72d[_0x67214b(0x331)])),_0x41e72d[_0x67214b(0x2b5)]?_0x41e72d['rowCount']!==undefined&&console[_0x67214b(0x2dd)]('\x20\x20'+a31_0x1c79fc['dim'](_0x67214b(0x208))+'\x20'+a31_0x1c79fc[_0x67214b(0x28d)](formatRows(_0x41e72d[_0x67214b(0x32f)]))):console[_0x67214b(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x67214b(0x1b0)](_0x67214b(0x23c))+'\x20'+_0x41e72d[_0x67214b(0x1a9)]);}[a31_0x246d00(0x2d8)](_0x1ebb15){const _0x59a3ea=a31_0x246d00;if(_0x1ebb15[_0x59a3ea(0x204)][_0x59a3ea(0x291)]===0x0)return;console[_0x59a3ea(0x2dd)]('\x0a'+a31_0x1c79fc['dim']('Attributes'));for(const _0x5e241c of _0x1ebb15['attributes']){const _0x1ae5c8=_0x5e241c[_0x59a3ea(0x2b5)]?a31_0x1c79fc[_0x59a3ea(0x221)]('✔'):a31_0x1c79fc[_0x59a3ea(0x1b0)]('✘');let _0x3b8e97='';if(_0x5e241c[_0x59a3ea(0x2b5)]&&_0x5e241c[_0x59a3ea(0x134)]!==undefined&&_0x5e241c[_0x59a3ea(0x2c6)]!==undefined){const _0x56ff97=_0x5e241c[_0x59a3ea(0x2c6)][_0x59a3ea(0x215)](0x1),_0x3ddd6e=_0x5e241c[_0x59a3ea(0x2c6)]>=0x50?a31_0x1c79fc[_0x59a3ea(0x221)]:_0x5e241c[_0x59a3ea(0x2c6)]>=0x32?a31_0x1c79fc['yellow']:a31_0x1c79fc[_0x59a3ea(0x1b0)];_0x3b8e97='\x20'+a31_0x1c79fc['dim'](_0x59a3ea(0x323))+'\x20'+_0x3ddd6e(_0x56ff97+'%')+'\x20('+formatRows(_0x5e241c[_0x59a3ea(0x134)])+'\x20rows)';}console[_0x59a3ea(0x2dd)](_0x1ae5c8+'\x20'+a31_0x1c79fc[_0x59a3ea(0x1ff)](_0x5e241c['name'])+_0x3b8e97),console['error']('\x20\x20'+a31_0x1c79fc[_0x59a3ea(0x1d9)](_0x59a3ea(0x280))+'\x20'+a31_0x1c79fc['bold'](_0x5e241c[_0x59a3ea(0x1d3)]+'.'+_0x5e241c[_0x59a3ea(0x331)]));const _0x140148=_0x5e241c['joinKey']===_0x5e241c['foreignKey']?a31_0x1c79fc['dim'](_0x59a3ea(0x28a))+'\x20'+_0x5e241c[_0x59a3ea(0x1d7)]:a31_0x1c79fc['dim'](_0x59a3ea(0x2b0))+'\x20'+_0x5e241c[_0x59a3ea(0x1d7)]+_0x59a3ea(0x157)+_0x5e241c[_0x59a3ea(0x29b)];console[_0x59a3ea(0x2dd)]('\x20\x20'+_0x140148),console['error']('\x20\x20'+a31_0x1c79fc[_0x59a3ea(0x1d9)]('Columns:')),this[_0x59a3ea(0x1ca)](_0x5e241c[_0x59a3ea(0x326)]),!_0x5e241c[_0x59a3ea(0x2b5)]&&console[_0x59a3ea(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x59a3ea(0x1b0)](_0x59a3ea(0x23c))+'\x20'+_0x5e241c[_0x59a3ea(0x1a9)]);}}[a31_0x246d00(0x175)](_0x1dfc53,_0x2b04af){const _0x4c0c69=a31_0x246d00;if(_0x1dfc53[_0x4c0c69(0x1e8)]['length']===0x0)return;console['error']('\x0a'+a31_0x1c79fc[_0x4c0c69(0x1d9)](_0x4c0c69(0x237))+'\x20'+a31_0x1c79fc[_0x4c0c69(0x1d9)]('('+_0x2b04af+')'));for(const _0x2dbb6c of _0x1dfc53[_0x4c0c69(0x1e8)]){const _0xe498c2=_0x2dbb6c[_0x4c0c69(0x2b5)]?a31_0x1c79fc['green']('✔'):a31_0x1c79fc[_0x4c0c69(0x1b0)]('✘');let _0x4f31ba='';if(_0x2dbb6c['schemaValid']&&_0x2dbb6c[_0x4c0c69(0x298)]!==undefined&&_0x2dbb6c[_0x4c0c69(0x187)]!==undefined){const _0x55c79c=_0x2dbb6c[_0x4c0c69(0x2d6)]?.[_0x4c0c69(0x215)](0x1)||'?',_0x3abf18=(_0x2dbb6c['customerPercent']??0x0)>=0x32?a31_0x1c79fc['green']:(_0x2dbb6c[_0x4c0c69(0x2d6)]??0x0)>=0x14?a31_0x1c79fc['yellow']:a31_0x1c79fc[_0x4c0c69(0x1b0)];_0x4f31ba='\x20'+a31_0x1c79fc['dim']('Customers:')+'\x20'+_0x3abf18(formatRows(_0x2dbb6c[_0x4c0c69(0x298)]))+'\x20('+_0x55c79c+_0x4c0c69(0x1c5)+a31_0x1c79fc[_0x4c0c69(0x1d9)](_0x4c0c69(0x164))+'\x20'+a31_0x1c79fc[_0x4c0c69(0x28d)](formatRows(_0x2dbb6c['totalEvents']));}console['error'](_0xe498c2+'\x20'+a31_0x1c79fc[_0x4c0c69(0x1ff)](_0x2dbb6c[_0x4c0c69(0x138)])+_0x4f31ba),console[_0x4c0c69(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x4c0c69(0x1d9)](_0x4c0c69(0x280))+'\x20'+a31_0x1c79fc[_0x4c0c69(0x1ff)](_0x2dbb6c['database']+'.'+_0x2dbb6c[_0x4c0c69(0x331)]));const _0x5eb46f=_0x2dbb6c[_0x4c0c69(0x1d7)]===_0x2dbb6c[_0x4c0c69(0x29b)]?a31_0x1c79fc[_0x4c0c69(0x1d9)](_0x4c0c69(0x28a))+'\x20'+_0x2dbb6c[_0x4c0c69(0x1d7)]:a31_0x1c79fc[_0x4c0c69(0x1d9)](_0x4c0c69(0x2b0))+'\x20'+_0x2dbb6c[_0x4c0c69(0x1d7)]+_0x4c0c69(0x157)+_0x2dbb6c[_0x4c0c69(0x29b)];console[_0x4c0c69(0x2dd)]('\x20\x20'+_0x5eb46f),console['error']('\x20\x20'+a31_0x1c79fc[_0x4c0c69(0x1d9)](_0x4c0c69(0x2cf))),this[_0x4c0c69(0x1ca)](_0x2dbb6c[_0x4c0c69(0x326)]),!_0x2dbb6c[_0x4c0c69(0x2b5)]&&console[_0x4c0c69(0x2dd)]('\x20\x20'+a31_0x1c79fc['red'](_0x4c0c69(0x23c))+'\x20'+_0x2dbb6c[_0x4c0c69(0x1a9)]);}}[a31_0x246d00(0x1ca)](_0x47ea77){const _0x1069f6=a31_0x246d00;for(const _0x337694 of _0x47ea77){_0x337694[_0x1069f6(0x341)]===_0x337694['column']||_0x337694['column']==='*'?console[_0x1069f6(0x2dd)](_0x1069f6(0x1a7)+_0x337694['label']):console[_0x1069f6(0x2dd)](_0x1069f6(0x1a7)+_0x337694[_0x1069f6(0x341)]+'\x20'+a31_0x1c79fc[_0x1069f6(0x1d9)]('('+_0x337694[_0x1069f6(0x24e)]+')'));}}[a31_0x246d00(0x29f)](_0x27b452){const _0x966857=a31_0x246d00;console['error']('─'[_0x966857(0x2c7)](0x3c));if(_0x27b452['errors'][_0x966857(0x291)]>0x0){console[_0x966857(0x2dd)]('\x0a'+a31_0x1c79fc[_0x966857(0x1b0)](_0x966857(0x345)));for(const _0x1d6fc5 of _0x27b452[_0x966857(0x191)]){console[_0x966857(0x2dd)]('\x20\x20'+a31_0x1c79fc['red']('•')+'\x20'+_0x1d6fc5);}}_0x27b452[_0x966857(0x2f7)]&&console[_0x966857(0x2dd)]('\x0a'+a31_0x1c79fc[_0x966857(0x221)]('✔')+'\x20Configuration\x20is\x20valid');}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{['name']=a31_0x246d00(0x1cc);[a31_0x246d00(0x1ee)]='Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration';async[a31_0x246d00(0x2c8)](_0x589293){const _0x21ef96=a31_0x246d00,{options:_0x23926f,args:_0xdbe9b0,tdx:_0x273385}=_0x589293,_0x16b732=_0x23926f,_0x23cf5a=_0xdbe9b0[0x0]||_0x23926f[_0x21ef96(0x224)];if(!_0x23cf5a)return showParentSegmentNotSetError(_0x21ef96(0x1f6)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a'+_0x21ef96(0x22b)+_0x21ef96(0x2c4)+_0x21ef96(0x1f5)+'\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a'+'\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a'+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x16b732[_0x21ef96(0x246)]&&!_0x16b732['attribute']&&!_0x16b732[_0x21ef96(0x31c)]&&!_0x16b732[_0x21ef96(0x194)])return console[_0x21ef96(0x2dd)](a31_0x1c79fc[_0x21ef96(0x1b0)](_0x21ef96(0x159))),console[_0x21ef96(0x2dd)](_0x21ef96(0x279)),console[_0x21ef96(0x2dd)](_0x21ef96(0x13d)),console[_0x21ef96(0x2dd)](_0x21ef96(0x33b)),console['error'](_0x21ef96(0x1b6)),console[_0x21ef96(0x2dd)](_0x21ef96(0x26c)),console[_0x21ef96(0x2dd)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x28d32c=resolveYamlFile(_0x23cf5a);if(!existsSync(_0x28d32c))return showFileNotFoundError(_0x28d32c,_0x23cf5a),0x1;_0x16b732[_0x21ef96(0x1db)]&&(console['error']('Site:\x20'+_0x16b732[_0x21ef96(0x184)]),console['error'](_0x21ef96(0x228)+_0x28d32c));let _0x11a03c;try{_0x11a03c=readFileSync(_0x28d32c,_0x21ef96(0x344));}catch(_0x46d1a0){const _0xdeb647=_0x46d1a0 instanceof Error?_0x46d1a0[_0x21ef96(0x156)]:String(_0x46d1a0);return console[_0x21ef96(0x2dd)](_0x21ef96(0x13f)+_0xdeb647),0x1;}let _0x5c9531;try{_0x5c9531=parseDef(_0x11a03c);}catch(_0x562584){const _0x21407e=_0x562584 instanceof Error?_0x562584['message']:String(_0x562584);return console[_0x21ef96(0x2dd)](a31_0x1c79fc[_0x21ef96(0x1b0)](_0x21ef96(0x1df)+_0x21407e)),0x1;}if(_0x16b732['attribute']===!![]||_0x16b732[_0x21ef96(0x20d)]===''){const _0x4b7674=_0x5c9531[_0x21ef96(0x204)]?.[_0x21ef96(0x1c9)](_0x288207=>_0x288207['name'])||[];if(_0x4b7674[_0x21ef96(0x291)]===0x0)console[_0x21ef96(0x2dd)](a31_0x1c79fc[_0x21ef96(0x1b0)](_0x21ef96(0x1bf)));else{console[_0x21ef96(0x2dd)](a31_0x1c79fc[_0x21ef96(0x1b0)](_0x21ef96(0x31e))),console[_0x21ef96(0x2dd)]('Available\x20attributes:');for(const _0x1f14db of _0x4b7674){console[_0x21ef96(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x21ef96(0x28d)](_0x1f14db));}console[_0x21ef96(0x2dd)](_0x21ef96(0x25e)+_0x23cf5a+'\x20--attribute\x20\x22'+_0x4b7674[0x0]+'\x22');}return 0x1;}if(_0x16b732[_0x21ef96(0x31c)]===!![]||_0x16b732[_0x21ef96(0x31c)]===''){const _0x4bc4fc=_0x5c9531[_0x21ef96(0x1e8)]?.['map'](_0x2966f1=>_0x2966f1['name'])||[];if(_0x4bc4fc[_0x21ef96(0x291)]===0x0)console[_0x21ef96(0x2dd)](a31_0x1c79fc[_0x21ef96(0x1b0)](_0x21ef96(0x230)));else{console[_0x21ef96(0x2dd)](a31_0x1c79fc[_0x21ef96(0x1b0)](_0x21ef96(0x1fe))),console[_0x21ef96(0x2dd)](_0x21ef96(0x15a));for(const _0x116d78 of _0x4bc4fc){console['error']('\x20\x20'+a31_0x1c79fc[_0x21ef96(0x28d)](_0x116d78));}console[_0x21ef96(0x2dd)](_0x21ef96(0x25e)+_0x23cf5a+'\x20--behavior\x20\x22'+_0x4bc4fc[0x0]+'\x22');}return 0x1;}const _0x5b0617=createCommandSpinner(a31_0x1c79fc[_0x21ef96(0x1d9)](_0x21ef96(0x2df)),{'verbose':_0x16b732[_0x21ef96(0x1db)]});_0x5b0617[_0x21ef96(0x2a0)]();const _0x61cce2={'onProgress':_0x1373cd=>{const _0x1cc940=_0x21ef96;_0x5b0617[_0x1cc940(0x253)]=formatProgressMessage(_0x1373cd);}};if(_0x16b732['master'])_0x61cce2[_0x21ef96(0x246)]=!![];if(_0x16b732[_0x21ef96(0x20d)]&&typeof _0x16b732[_0x21ef96(0x20d)]===_0x21ef96(0x1d8))_0x61cce2[_0x21ef96(0x20d)]=_0x16b732[_0x21ef96(0x20d)];if(_0x16b732[_0x21ef96(0x31c)]&&typeof _0x16b732[_0x21ef96(0x31c)]===_0x21ef96(0x1d8))_0x61cce2['behavior']=_0x16b732[_0x21ef96(0x31c)];if(_0x16b732[_0x21ef96(0x194)])_0x61cce2['enriched']=!![];if(_0x16b732[_0x21ef96(0x2f3)])_0x61cce2['interval']=_0x16b732[_0x21ef96(0x2f3)];let _0x17b322;try{_0x17b322=await _0x273385['segment'][_0x21ef96(0x32e)](_0x11a03c,_0x61cce2),_0x5b0617[_0x21ef96(0x2eb)]();}catch(_0x1f8722){_0x5b0617[_0x21ef96(0x2eb)]();throw _0x1f8722;}return await this[_0x21ef96(0x321)](_0x17b322,{'master':_0x16b732[_0x21ef96(0x246)],'attribute':typeof _0x16b732['attribute']==='string'?_0x16b732['attribute']:undefined,'behavior':typeof _0x16b732[_0x21ef96(0x31c)]===_0x21ef96(0x1d8)?_0x16b732[_0x21ef96(0x31c)]:undefined,'enriched':_0x16b732[_0x21ef96(0x194)]}),_0x17b322[_0x21ef96(0x2f7)]?0x0:0x1;}async[a31_0x246d00(0x321)](_0x2d967a,_0x1abb3e){const _0x1dd3f6=a31_0x246d00;console[_0x1dd3f6(0x2dd)]('\x0a'+a31_0x1c79fc[_0x1dd3f6(0x1ff)](_0x1dd3f6(0x1b3))+'\x20'+_0x2d967a[_0x1dd3f6(0x138)]),console[_0x1dd3f6(0x2dd)]('═'[_0x1dd3f6(0x2c7)](0x3c));if(_0x1abb3e[_0x1dd3f6(0x246)]&&_0x2d967a[_0x1dd3f6(0x2d3)]){const _0x783078=a31_0x1c79fc[_0x1dd3f6(0x1d9)]('Master:')+'\x20'+a31_0x1c79fc[_0x1dd3f6(0x1ff)](_0x2d967a[_0x1dd3f6(0x246)][_0x1dd3f6(0x1d3)]+'.'+_0x2d967a['master']['table']);await this[_0x1dd3f6(0x1e4)](_0x783078,_0x2d967a['sampleData']);}else{if(_0x1abb3e[_0x1dd3f6(0x20d)]&&_0x2d967a[_0x1dd3f6(0x2d3)]){const _0x2c4756=a31_0x1c79fc['dim']('Attribute:')+'\x20'+a31_0x1c79fc[_0x1dd3f6(0x1ff)](_0x1abb3e[_0x1dd3f6(0x20d)]);await this[_0x1dd3f6(0x1e4)](_0x2c4756,_0x2d967a[_0x1dd3f6(0x2d3)]);}else{if(_0x1abb3e[_0x1dd3f6(0x31c)]&&_0x2d967a[_0x1dd3f6(0x2d3)]){const _0x51a0ed=a31_0x1c79fc[_0x1dd3f6(0x1d9)](_0x1dd3f6(0x308))+'\x20'+a31_0x1c79fc['bold'](_0x1abb3e[_0x1dd3f6(0x31c)]);await this[_0x1dd3f6(0x1e4)](_0x51a0ed,_0x2d967a[_0x1dd3f6(0x2d3)]);}else{if(_0x1abb3e[_0x1dd3f6(0x194)]&&_0x2d967a[_0x1dd3f6(0x2d3)]){const _0x2f792a=a31_0x1c79fc[_0x1dd3f6(0x1d9)](_0x1dd3f6(0x21e))+'\x20'+a31_0x1c79fc['bold'](_0x1dd3f6(0x1e9));await this['displaySampleData'](_0x2f792a,_0x2d967a[_0x1dd3f6(0x2d3)]);}else!_0x2d967a[_0x1dd3f6(0x2d3)]&&console[_0x1dd3f6(0x2dd)](_0x1dd3f6(0x239));}}}if(_0x2d967a[_0x1dd3f6(0x191)][_0x1dd3f6(0x291)]>0x0){console[_0x1dd3f6(0x2dd)]('─'[_0x1dd3f6(0x2c7)](0x3c)),console[_0x1dd3f6(0x2dd)]('\x0a'+a31_0x1c79fc[_0x1dd3f6(0x1b0)](_0x1dd3f6(0x345)));for(const _0x24d37b of _0x2d967a[_0x1dd3f6(0x191)]){console['error']('\x20\x20'+a31_0x1c79fc[_0x1dd3f6(0x1b0)]('•')+'\x20'+_0x24d37b);}}}async[a31_0x246d00(0x1e4)](_0xce6c07,_0x11545f){const _0x17e795=a31_0x246d00;if(_0x11545f['length']===0x0){console[_0x17e795(0x2dd)]('\x0a'+_0xce6c07),console[_0x17e795(0x2dd)](_0x17e795(0x2b8));return;}console[_0x17e795(0x2dd)]('\x0a'+_0xce6c07);const _0x1b95a7=Object[_0x17e795(0x283)](_0x11545f[0x0])[_0x17e795(0x1c9)](_0x54f422=>({'name':_0x54f422,'type':typeof _0x11545f[0x0][_0x54f422]===_0x17e795(0x24d)?'double':_0x17e795(0x295)})),_0x4ea4d9={'queryId':_0x17e795(0x266),'columns':_0x1b95a7,'data':_0x11545f,'stats':{'state':'FINISHED','queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x11545f[_0x17e795(0x291)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x1cb4ec=formatAsTable(_0x4ea4d9,_0x11545f[_0x17e795(0x291)],!![]);await writeOutput(_0x1cb4ec,undefined,_0x17e795(0x331));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x305);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x147);async[a31_0x246d00(0x2c8)](_0x2f2d19){const _0x52a409=a31_0x246d00,{options:_0x1fb05d,args:_0x1dc3a0,tdx:_0x229f2b}=_0x2f2d19,_0x4441ca=_0x1fb05d,_0x2c0527=_0x1dc3a0[0x0]||_0x1fb05d[_0x52a409(0x224)];if(!_0x2c0527)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a'+_0x52a409(0x23d)),0x1;const _0x4d9cfe=resolveYamlFile(_0x2c0527);if(existsSync(_0x4d9cfe)){_0x4441ca['verbose']&&console[_0x52a409(0x2dd)](_0x52a409(0x1b9)+_0x4d9cfe);let _0x4dda2e;try{_0x4dda2e=readFileSync(_0x4d9cfe,_0x52a409(0x344));}catch(_0xf35053){const _0x321e98=_0xf35053 instanceof Error?_0xf35053[_0x52a409(0x156)]:String(_0xf35053);return console[_0x52a409(0x2dd)]('Error\x20reading\x20file:\x20'+_0x321e98),0x1;}const _0x247e2c=await withSpinner(_0x52a409(0x1ba),()=>_0x229f2b[_0x52a409(0x338)][_0x52a409(0x16f)](_0x4dda2e),{'verbose':_0x4441ca[_0x52a409(0x1db)]}),_0x2ff7b5=_0x247e2c[_0x52a409(0x1ad)],{isNew:_0x1d6e5f,name:_0x59d233,hasChanges:_0x474d1c,diffFormatted:_0x146a5e}=_0x2ff7b5;if(_0x474d1c){_0x1d6e5f?console[_0x52a409(0x2dd)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x59d233+'\x27:'):console[_0x52a409(0x2dd)](_0x52a409(0x2a2)+_0x59d233+'\x27:');console[_0x52a409(0x2dd)]('─'[_0x52a409(0x2c7)](0x3c)),console[_0x52a409(0x2dd)](_0x146a5e),console[_0x52a409(0x2dd)]('─'[_0x52a409(0x2c7)](0x3c));const _0x77e4fd=_0x1d6e5f?_0x52a409(0x289)+_0x59d233+_0x52a409(0x1ec):_0x52a409(0x1eb)+_0x59d233+_0x52a409(0x1ec);if(!_0x4441ca[_0x52a409(0x2f0)]){if(!isInteractive())return console[_0x52a409(0x2dd)](a31_0x1c79fc[_0x52a409(0x1b0)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x52a409(0x2dd)](a31_0x1c79fc[_0x52a409(0x1d9)](_0x52a409(0x30e))),0x1;const _0x7d009d=await confirmKey(_0x77e4fd);if(!_0x7d009d)return console[_0x52a409(0x2dd)](a31_0x1c79fc[_0x52a409(0x288)]('Aborted.')),0x1;}const _0x41f446=_0x1d6e5f?_0x52a409(0x2f5):'Updating';await withSpinner(_0x41f446+_0x52a409(0x153)+_0x59d233+_0x52a409(0x1ae),()=>_0x2ff7b5[_0x52a409(0x226)](),{'verbose':_0x4441ca[_0x52a409(0x1db)]});const _0x1ff249=_0x1d6e5f?'Created':'Updated';console[_0x52a409(0x2dd)]('✔\x20'+_0x1ff249+_0x52a409(0x153)+_0x59d233+'\x27');}else console[_0x52a409(0x2dd)]('✔\x20No\x20changes\x20-\x20\x27'+_0x59d233+_0x52a409(0x269));}const _0x40c886=await withSpinner('Running\x20parent\x20segment\x20workflow\x20for\x20\x27'+_0x2c0527+_0x52a409(0x1ae),()=>_0x229f2b[_0x52a409(0x338)][_0x52a409(0x2bd)](_0x2c0527),{'verbose':_0x4441ca[_0x52a409(0x1db)]}),_0x186f54=_0x40c886['data'],_0x46c2d0=getConsoleUrl(_0x4441ca[_0x52a409(0x184)],_0x52a409(0x2ed)+_0x186f54[_0x52a409(0x317)]+_0x52a409(0x26b)+_0x186f54[_0x52a409(0x259)]+_0x52a409(0x271)+_0x186f54[_0x52a409(0x19f)]);return console['error'](_0x52a409(0x2b3)),console[_0x52a409(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x52a409(0x1d9)]('Audience\x20ID:')+'\x20'+_0x186f54[_0x52a409(0x18b)]),console['error']('\x20\x20'+a31_0x1c79fc['dim']('Status:')+'\x20'+_0x186f54['status']),console[_0x52a409(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0x52a409(0x1d9)](_0x52a409(0x231))+'\x20'+_0x186f54[_0x52a409(0x259)]),console[_0x52a409(0x2dd)]('\x20\x20'+a31_0x1c79fc['dim'](_0x52a409(0x347))+'\x20'+_0x186f54[_0x52a409(0x19f)]),console[_0x52a409(0x2dd)]('\x20\x20'+_0x46c2d0),console[_0x52a409(0x2dd)]('\x0a'+a31_0x1c79fc[_0x52a409(0x1d9)]('To\x20cancel:')+'\x20tdx\x20wf\x20attempt\x20'+_0x186f54[_0x52a409(0x19f)]+_0x52a409(0x19c)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x246d00(0x138)]='segment:parent:fields';[a31_0x246d00(0x1ee)]=a31_0x246d00(0x1a6);async[a31_0x246d00(0x2c8)](_0x4e7962){const _0x10f9b1=a31_0x246d00,{options:_0x2a4be2,args:_0x399a2a,tdx:_0x4cd8ab}=_0x4e7962,_0x22040e=_0x399a2a[0x0]||_0x2a4be2[_0x10f9b1(0x224)];if(!_0x22040e)return showParentSegmentNotSetError(_0x10f9b1(0x29c)+'\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;_0x2a4be2[_0x10f9b1(0x1db)]&&(console[_0x10f9b1(0x2dd)](_0x10f9b1(0x314)+_0x2a4be2[_0x10f9b1(0x184)]),console['error']('Parent\x20segment:\x20'+_0x22040e));const _0x5a6e83=await withSpinner(_0x10f9b1(0x234)+_0x22040e+_0x10f9b1(0x1ae),()=>_0x4cd8ab['segment'][_0x10f9b1(0x15e)](_0x22040e),{'verbose':_0x2a4be2[_0x10f9b1(0x1db)]}),_0x37709d=_0x5a6e83[_0x10f9b1(0x1ad)];console['error'](_0x10f9b1(0x281)+_0x37709d['length']+_0x10f9b1(0x293)+(_0x37709d['length']!==0x1?'s':''));if(_0x2a4be2['json']||_0x2a4be2[_0x10f9b1(0x349)])return await handleSDKOutput(_0x37709d,_0x2a4be2),0x0;return displayFieldsHumanReadable(_0x37709d,_0x22040e),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x246d00(0x138)]='segment:parent:view';['description']=a31_0x246d00(0x27f);async['execute'](_0x580cf5){const _0x2af541=a31_0x246d00,{options:_0x12dde3,args:_0x4c06,tdx:_0xe8b63}=_0x580cf5,_0x4078f0=_0x12dde3,_0x34893c=_0x4c06[0x0]||_0x12dde3[_0x2af541(0x224)];if(!_0x34893c)return showParentSegmentNotSetError(_0x2af541(0x27a)+_0x2af541(0x21b)+_0x2af541(0x25d)+_0x2af541(0x297)),0x1;_0x12dde3[_0x2af541(0x1db)]&&(console[_0x2af541(0x2dd)](_0x2af541(0x314)+_0x12dde3['site']),console[_0x2af541(0x2dd)](_0x2af541(0x14c)+_0x34893c));const _0xe3d6f6=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x34893c+_0x2af541(0x1ae),()=>_0xe8b63[_0x2af541(0x338)][_0x2af541(0x186)](_0x34893c),{'verbose':_0x12dde3['verbose']}),_0x10e7ba=_0xe3d6f6['data'];if(_0x4078f0[_0x2af541(0x301)]){const _0x2f00ed=getConsoleNextUrl(_0x4078f0[_0x2af541(0x184)],_0x2af541(0x343)+_0x10e7ba['id']);return console['error'](a31_0x1c79fc[_0x2af541(0x221)]('✔')+_0x2af541(0x22e)+a31_0x1c79fc[_0x2af541(0x28d)](_0x2f00ed)),openBrowser(_0x2f00ed),0x0;}return await handleSingleObjectOutput(_0x10e7ba,_0x12dde3),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x1dc);['description']=a31_0x246d00(0x29d);async[a31_0x246d00(0x2c8)](_0x328324){const _0x5d79e6=a31_0x246d00,{options:_0x183b12,args:_0x3a0e94,tdx:_0x1f7900}=_0x328324,_0x2a1b96=_0x183b12,_0x5b5e11=_0x3a0e94[0x0]||_0x183b12[_0x5d79e6(0x224)];if(!_0x5b5e11)return showParentSegmentNotSetError(_0x5d79e6(0x168)+'\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:\x0a'+_0x5d79e6(0x1e1)),0x1;_0x183b12['verbose']&&(console['error'](_0x5d79e6(0x314)+_0x183b12[_0x5d79e6(0x184)]),console['error'](_0x5d79e6(0x14c)+_0x5b5e11));const _0x131a47=await withSpinner(_0x5d79e6(0x162)+_0x5b5e11+_0x5d79e6(0x1ae),()=>_0x1f7900[_0x5d79e6(0x338)][_0x5d79e6(0x2e2)](_0x5b5e11),{'verbose':_0x183b12['verbose']}),_0x566e66=_0x131a47[_0x5d79e6(0x1ad)],_0x4d1cc6=_0x1f7900['segment'][_0x5d79e6(0x2ae)](_0x566e66);if(_0x2a1b96[_0x5d79e6(0x25a)]){const _0x2d6501=await this['collectSchema'](_0x328324,_0x5b5e11,_0x566e66,_0x4d1cc6),_0x2a55a1=this[_0x5d79e6(0x2f9)](_0x2d6501);writeFileSync(_0x2a1b96['output'],_0x2a55a1);const _0x1f587b=_0x2d6501[_0x5d79e6(0x2a3)][_0x5d79e6(0x326)][_0x5d79e6(0x291)]+_0x2d6501[_0x5d79e6(0x1e8)]['reduce']((_0x4c9888,_0x157062)=>_0x4c9888+_0x157062[_0x5d79e6(0x326)][_0x5d79e6(0x291)],0x0),_0x13156a=_0x2d6501['behaviors'][_0x5d79e6(0x282)](_0x551e77=>_0x551e77[_0x5d79e6(0x326)][_0x5d79e6(0x291)]===0x0)['length'];return console[_0x5d79e6(0x16d)](_0x5d79e6(0x2aa)+_0x2a1b96[_0x5d79e6(0x25a)]),console[_0x5d79e6(0x16d)]('\x20\x20Database:\x20'+_0x4d1cc6),console[_0x5d79e6(0x16d)]('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0x2d6501[_0x5d79e6(0x1e8)][_0x5d79e6(0x291)]+_0x5d79e6(0x2b4)),console['log'](_0x5d79e6(0x299)+_0x1f587b+'\x20total'),_0x13156a>0x0&&console[_0x5d79e6(0x16d)](_0x5d79e6(0x211)+_0x13156a+_0x5d79e6(0x318)),0x0;}console[_0x5d79e6(0x2dd)]('\x0a'+a31_0x1c79fc[_0x5d79e6(0x1ff)](_0x5d79e6(0x154))+'\x20'+a31_0x1c79fc['cyan'](_0x4d1cc6));const _0x5c6a05=await withSpinner(_0x5d79e6(0x1f8),()=>_0x1f7900[_0x5d79e6(0x338)][_0x5d79e6(0x1e0)](_0x566e66),{'verbose':_0x183b12[_0x5d79e6(0x1db)]});console['error']('\x0a'+a31_0x1c79fc[_0x5d79e6(0x1ff)]('customers')+'\x20'+a31_0x1c79fc[_0x5d79e6(0x1d9)]('('+_0x4d1cc6+_0x5d79e6(0x336)));const _0x12c524=await executeSchemaQuery(_0x5c6a05['data'],_0x1f7900,_0x183b12);await handleQueryOutput(_0x12c524,_0x183b12);const _0x121ff1=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x1f7900['segment'][_0x5d79e6(0x20c)](_0x566e66),{'verbose':_0x183b12[_0x5d79e6(0x1db)]});for(const _0x324ce4 of _0x121ff1[_0x5d79e6(0x1ad)]){const _0x2240e4=_0x5d79e6(0x2ec)+_0x324ce4[_0x5d79e6(0x14a)]()['replace'](/\s+/g,'_'),_0x453e04=_0x5d79e6(0x23f)+_0x4d1cc6+'.'+_0x2240e4;console['error']('\x0a'+a31_0x1c79fc['bold'](_0x324ce4)+'\x20'+a31_0x1c79fc[_0x5d79e6(0x1d9)]('('+_0x4d1cc6+'.'+_0x2240e4+')'));try{const _0x76760a=await executeSchemaQuery(_0x453e04,_0x1f7900,_0x183b12);await handleQueryOutput(_0x76760a,_0x183b12);}catch{console[_0x5d79e6(0x2dd)](a31_0x1c79fc[_0x5d79e6(0x288)](_0x5d79e6(0x141)));}}return 0x0;}async['collectSchema'](_0x544f78,_0xe2e0cf,_0x854efb,_0x290e0b){const _0x36f46f=a31_0x246d00,{options:_0x538a89,tdx:_0x184a87}=_0x544f78,_0x197e27=await withSpinner(_0x36f46f(0x1f8),()=>_0x184a87[_0x36f46f(0x338)][_0x36f46f(0x1e0)](_0x854efb),{'verbose':_0x538a89['verbose']}),_0x32a2c9=await executeSchemaQuery(_0x197e27[_0x36f46f(0x1ad)],_0x184a87,_0x538a89),_0x3083ef=_0x32a2c9[_0x36f46f(0x1ad)][_0x36f46f(0x1c9)](_0x1eba6a=>({'name':_0x1eba6a['column_name'],'type':_0x1eba6a['column_type']})),_0x41f2fa=await withSpinner(_0x36f46f(0x202),()=>_0x184a87[_0x36f46f(0x338)][_0x36f46f(0x20c)](_0x854efb),{'verbose':_0x538a89[_0x36f46f(0x1db)]}),_0x242f1b=[];for(const _0x292a7b of _0x41f2fa['data']){const _0x1382fb='behavior_'+_0x292a7b['toLowerCase']()[_0x36f46f(0x188)](/\s+/g,'_'),_0x7777d='SELECT\x20*\x20FROM\x20'+_0x290e0b+'.'+_0x1382fb;let _0x56a6e9=[];try{const _0xad47da=await executeSchemaQuery(_0x7777d,_0x184a87,_0x538a89);_0x56a6e9=_0xad47da[_0x36f46f(0x1ad)]['map'](_0x41083d=>({'name':_0x41083d[_0x36f46f(0x2c9)],'type':_0x41083d[_0x36f46f(0x2a8)]}));}catch{}_0x242f1b[_0x36f46f(0x348)]({'table':_0x1382fb,'columns':_0x56a6e9});}return{'database':_0x290e0b,'parent_segment':_0xe2e0cf,'parent_id':_0x854efb,'customers':{'table':_0x36f46f(0x2a3),'columns':_0x3083ef},'behaviors':_0x242f1b};}[a31_0x246d00(0x2f9)](_0x280ccb){const _0x32404b=a31_0x246d00,_0x2586c1=_0x1be862=>{const _0x2ddebf=a31_0x28c0;if(_0x1be862[_0x2ddebf(0x291)]===0x0)return'[]';const _0x2d2d49=_0x1be862['map'](_0x1de5df=>_0x2ddebf(0x22f)+_0x1de5df[_0x2ddebf(0x138)]+'\x22,\x20\x22type\x22:\x20\x22'+_0x1de5df[_0x2ddebf(0x325)]+_0x2ddebf(0x198));return'[\x0a'+_0x2d2d49['join'](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x4910b1=_0x280ccb[_0x32404b(0x1e8)][_0x32404b(0x1c9)](_0x294dd5=>{const _0x4461af=_0x32404b;return _0x4461af(0x150)+_0x294dd5[_0x4461af(0x331)]+_0x4461af(0x149)+_0x2586c1(_0x294dd5[_0x4461af(0x326)])[_0x4461af(0x188)](/^/gm,'\x20\x20')[_0x4461af(0x1d4)]()+_0x4461af(0x233);})[_0x32404b(0x142)](',\x0a');return _0x32404b(0x169)+_0x280ccb[_0x32404b(0x1d3)]+_0x32404b(0x1b2)+_0x280ccb['parent_segment']+_0x32404b(0x19b)+_0x280ccb[_0x32404b(0x34b)]+_0x32404b(0x1da)+_0x280ccb[_0x32404b(0x2a3)][_0x32404b(0x331)]+'\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20'+_0x2586c1(_0x280ccb[_0x32404b(0x2a3)][_0x32404b(0x326)])[_0x32404b(0x188)](/^/gm,'\x20\x20')['trim']()+_0x32404b(0x13c)+_0x4910b1+_0x32404b(0x1c4);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x246d00(0x138)]='segment:parent:sql';[a31_0x246d00(0x1ee)]=a31_0x246d00(0x1d5);async['execute'](_0xd77c36){const _0x36e043=a31_0x246d00,{options:_0x23322b,args:_0x3ead62,tdx:_0x4b512a}=_0xd77c36,_0x3a4a7f=_0x3ead62[0x0]||_0x23322b[_0x36e043(0x224)];if(!_0x3a4a7f)return showParentSegmentNotSetError(_0x36e043(0x17d)+_0x36e043(0x2fd)),0x1;_0x23322b[_0x36e043(0x1db)]&&(console[_0x36e043(0x2dd)]('Site:\x20'+_0x23322b[_0x36e043(0x184)]),console['error'](_0x36e043(0x14c)+_0x3a4a7f));const _0x82c666=await withSpinner(_0x36e043(0x162)+_0x3a4a7f+_0x36e043(0x1ae),()=>_0x4b512a[_0x36e043(0x338)]['resolveParentId'](_0x3a4a7f),{'verbose':_0x23322b[_0x36e043(0x1db)]}),_0xa1766e=_0x82c666['data'],_0x3083b3=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x3a4a7f+_0x36e043(0x1ae),()=>_0x4b512a['segment'][_0x36e043(0x1e0)](_0xa1766e),{'verbose':_0x23322b[_0x36e043(0x1db)]}),_0x445306=_0x3083b3[_0x36e043(0x1ad)];return _0x23322b['format']===_0x36e043(0x33e)||_0x23322b[_0x36e043(0x14d)]===_0x36e043(0x349)?await handleSDKOutput([{'sql':_0x445306}],_0x23322b):console[_0x36e043(0x16d)](_0x445306),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x1a2);['description']=a31_0x246d00(0x258);async[a31_0x246d00(0x2c8)](_0xb25028){const _0x45cbc9=a31_0x246d00,{options:_0x3ba4a1,args:_0x574b69,tdx:_0x518971}=_0xb25028,_0x1ec26f=_0x574b69[0x0]||_0x3ba4a1[_0x45cbc9(0x224)];if(!_0x1ec26f)return showParentSegmentNotSetError(_0x45cbc9(0x257)+'\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;_0x3ba4a1[_0x45cbc9(0x1db)]&&(console[_0x45cbc9(0x2dd)]('Site:\x20'+_0x3ba4a1[_0x45cbc9(0x184)]),console[_0x45cbc9(0x2dd)]('Parent\x20segment:\x20'+_0x1ec26f));const _0x468e83=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1ec26f+_0x45cbc9(0x1ae),()=>_0x518971['segment'][_0x45cbc9(0x2e2)](_0x1ec26f),{'verbose':_0x3ba4a1[_0x45cbc9(0x1db)]}),_0x1957fa=_0x468e83[_0x45cbc9(0x1ad)],_0x3e5346=await withSpinner(_0x45cbc9(0x307)+_0x1ec26f+'\x27...',()=>_0x518971['segment'][_0x45cbc9(0x1e0)](_0x1957fa),{'verbose':_0x3ba4a1[_0x45cbc9(0x1db)]});let _0x1d3cda=_0x3e5346[_0x45cbc9(0x1ad)];const _0x2b7b8c=resolveLimit(_0x3ba4a1[_0x45cbc9(0x196)],DEFAULT_DISPLAY_LIMIT),_0x461c78=/\bLIMIT\s+\d+/i[_0x45cbc9(0x170)](_0x1d3cda);!_0x461c78&&(_0x1d3cda=_0x1d3cda[_0x45cbc9(0x1d4)]()[_0x45cbc9(0x188)](/;+$/,''),_0x1d3cda=_0x45cbc9(0x2cd)+_0x1d3cda+_0x45cbc9(0x2d1)+_0x2b7b8c);_0x3ba4a1[_0x45cbc9(0x1db)]&&console['error'](_0x45cbc9(0x165)+_0x1d3cda);const _0x3cd7c9=await withProgressSpinner(_0x45cbc9(0x1bd),async _0x1a1c87=>{const _0x4192ad=_0x45cbc9,_0xa1b2cd=await _0x518971[_0x4192ad(0x193)][_0x4192ad(0x2c8)](_0x1d3cda,{'catalog':'td','schema':_0x4192ad(0x219),'onJobId':_0x34d490=>{const _0xf54436=_0x4192ad;_0x1a1c87[_0xf54436(0x30b)](_0x34d490);}});return _0xa1b2cd;},{'verbose':_0x3ba4a1[_0x45cbc9(0x1db)]}),_0x5369b0=_0x3cd7c9[_0x45cbc9(0x1ad)],_0x47223d=_0x5369b0['jobId']?_0x45cbc9(0x302)+_0x5369b0[_0x45cbc9(0x2e5)]+']':'';return console[_0x45cbc9(0x2dd)](_0x45cbc9(0x182)+_0x5369b0[_0x45cbc9(0x2a4)][_0x45cbc9(0x2d4)][_0x45cbc9(0x232)]()+_0x45cbc9(0x1d1)+(_0x45cbc9(0x23a)+formatElapsed(_0x5369b0[_0x45cbc9(0x2a4)][_0x45cbc9(0x25b)])+_0x47223d)),await handleQueryOutput(_0x5369b0,_0x3ba4a1),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x19a);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x33a);async[a31_0x246d00(0x2c8)](_0x4152f4){const _0x5dbfa3=a31_0x246d00,{options:_0x500103,args:_0x38d9c6,tdx:_0x269f5}=_0x4152f4,_0x17f99f=_0x38d9c6[0x0],_0x32c2e1=await withSpinner(_0x17f99f?_0x5dbfa3(0x1e7)+_0x17f99f+_0x5dbfa3(0x1ae):_0x5dbfa3(0x229),()=>_0x269f5[_0x5dbfa3(0x28c)]['list'](),{'verbose':_0x500103['verbose']});let _0x40179e=_0x32c2e1['data'][_0x5dbfa3(0x282)](_0x3a25ac=>_0x3a25ac[_0x5dbfa3(0x32b)]);if(_0x17f99f){const _0x3cd78a=_0x17f99f[_0x5dbfa3(0x188)](/[.+^${}()|[\]\\]/g,_0x5dbfa3(0x1b1))['replace'](/\*/g,'.*')['replace'](/\?/g,'.'),_0x4f48db=new RegExp('^'+_0x3cd78a+'$','i');_0x40179e=_0x40179e[_0x5dbfa3(0x282)](_0x260ee1=>_0x4f48db[_0x5dbfa3(0x170)](_0x260ee1[_0x5dbfa3(0x138)]));}_0x40179e[_0x5dbfa3(0x2e1)]((_0x50b994,_0x2772ac)=>_0x50b994[_0x5dbfa3(0x138)][_0x5dbfa3(0x2ea)](_0x2772ac[_0x5dbfa3(0x138)])),console[_0x5dbfa3(0x2dd)](_0x5dbfa3(0x281)+_0x40179e['length']+'\x20RT-enabled\x20parent\x20segment'+(_0x40179e[_0x5dbfa3(0x291)]!==0x1?'s':''));const _0x260399=_0x1292d1=>{const _0x8afc8c=_0x5dbfa3;return getConsoleNextUrl(_0x500103['site'],_0x8afc8c(0x343)+_0x1292d1);};if(_0x500103['format']===_0x5dbfa3(0x33e)||_0x500103[_0x5dbfa3(0x14d)]===_0x5dbfa3(0x349)){const _0x49a63a=_0x40179e[_0x5dbfa3(0x1c9)](_0x270b29=>({..._0x270b29,'url':_0x260399(_0x270b29['id'])}));await handleSDKOutput(_0x49a63a,_0x500103);}else{if(_0x40179e[_0x5dbfa3(0x291)]===0x0)console[_0x5dbfa3(0x16d)](_0x5dbfa3(0x183));else for(const _0x32683a of _0x40179e){const _0x51b741=_0x32683a[_0x5dbfa3(0x1af)]?a31_0x1c79fc[_0x5dbfa3(0x1d9)]('\x20('+formatRows(_0x32683a['population'])+')'):'',_0x3e56fb=hyperlink(_0x32683a[_0x5dbfa3(0x138)],_0x260399(_0x32683a['id']));console[_0x5dbfa3(0x16d)]('⚡\x20'+_0x3e56fb+_0x51b741);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x2ee);[a31_0x246d00(0x1ee)]='Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML';async[a31_0x246d00(0x2c8)](_0x198d87){const _0xa2df5c=a31_0x246d00,{options:_0x1e9403,args:_0x56982b,tdx:_0x36fcb1}=_0x198d87,_0x3eb6b3=_0x56982b[0x0]||_0x1e9403[_0xa2df5c(0x224)];if(!_0x3eb6b3)return showParentSegmentNotSetError(_0xa2df5c(0x273)+_0xa2df5c(0x2ab)),0x1;const _0x382d9f=resolveYamlFile(_0x3eb6b3);if(!existsSync(_0x382d9f))return showFileNotFoundError(_0x382d9f,_0x3eb6b3),0x1;let _0x56fdfa;try{_0x56fdfa=readFileSync(_0x382d9f,_0xa2df5c(0x344));}catch(_0x55e1c7){const _0x323bbf=_0x55e1c7 instanceof Error?_0x55e1c7[_0xa2df5c(0x156)]:String(_0x55e1c7);return console[_0xa2df5c(0x2dd)](_0xa2df5c(0x13f)+_0x323bbf),0x1;}const _0x14a184=createCommandSpinner(a31_0x1c79fc[_0xa2df5c(0x1d9)](_0xa2df5c(0x201)),{'verbose':_0x1e9403[_0xa2df5c(0x1db)]});_0x14a184['start']();const _0x511361={'realtime':!![],'onProgress':_0x304e2b=>{const _0x5533bf=_0xa2df5c;_0x14a184[_0x5533bf(0x253)]=formatProgressMessage(_0x304e2b);}};let _0x18ecfe;try{_0x18ecfe=await _0x36fcb1[_0xa2df5c(0x338)][_0xa2df5c(0x294)](_0x56fdfa,_0x511361),_0x14a184[_0xa2df5c(0x2eb)]();}catch(_0x34a132){_0x14a184[_0xa2df5c(0x2eb)]();throw _0x34a132;}console[_0xa2df5c(0x2dd)]('\x0a'+a31_0x1c79fc[_0xa2df5c(0x1ff)]('RT\x202.0\x20Validate:')+'\x20'+_0x18ecfe['name']),console[_0xa2df5c(0x2dd)]('═'[_0xa2df5c(0x2c7)](0x3c)),displayRealtimeValidation(_0x18ecfe),console[_0xa2df5c(0x2dd)]('─'[_0xa2df5c(0x2c7)](0x3c));if(_0x18ecfe[_0xa2df5c(0x191)][_0xa2df5c(0x291)]>0x0){console[_0xa2df5c(0x2dd)]('\x0a'+a31_0x1c79fc['red'](_0xa2df5c(0x345)));for(const _0x43c83a of _0x18ecfe[_0xa2df5c(0x191)]){console[_0xa2df5c(0x2dd)]('\x20\x20'+a31_0x1c79fc[_0xa2df5c(0x1b0)]('•')+'\x20'+_0x43c83a);}}return _0x18ecfe[_0xa2df5c(0x2f7)]&&console[_0xa2df5c(0x2dd)]('\x0a'+a31_0x1c79fc[_0xa2df5c(0x221)]('✔')+_0xa2df5c(0x2a5)),_0x18ecfe[_0xa2df5c(0x2f7)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0x246d00(0x151);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x158);async[a31_0x246d00(0x2c8)](_0x474511){const _0x31d5ba=a31_0x246d00,{options:_0x20cab4,args:_0x2639b7,tdx:_0x3689f6}=_0x474511,_0x4948ec=_0x2639b7[0x0]||_0x20cab4['parentSegment'];if(!_0x4948ec)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'+_0x31d5ba(0x22a)),0x1;_0x20cab4['verbose']&&(console['error'](_0x31d5ba(0x314)+_0x20cab4[_0x31d5ba(0x184)]),console[_0x31d5ba(0x2dd)](_0x31d5ba(0x14c)+_0x4948ec));const _0xa0acf2=await withSpinner(_0x31d5ba(0x162)+_0x4948ec+'\x27...',()=>_0x3689f6[_0x31d5ba(0x338)]['resolveParentId'](_0x4948ec),{'verbose':_0x20cab4[_0x31d5ba(0x1db)]}),_0x53a286=_0xa0acf2['data'],_0x52ebd9=await withSpinner(_0x31d5ba(0x1fa)+_0x4948ec+_0x31d5ba(0x1ae),()=>_0x3689f6[_0x31d5ba(0x28c)]['listJourneys'](_0x53a286),{'verbose':_0x20cab4[_0x31d5ba(0x1db)]}),_0x262a84=_0x52ebd9[_0x31d5ba(0x1ad)];console['error']('✔\x20Found\x20'+_0x262a84[_0x31d5ba(0x291)]+_0x31d5ba(0x337)+(_0x262a84['length']!==0x1?'s':''));if(_0x20cab4[_0x31d5ba(0x14d)]===_0x31d5ba(0x33e)||_0x20cab4['format']===_0x31d5ba(0x349))await handleSDKOutput(_0x262a84,_0x20cab4);else{if(_0x262a84['length']===0x0)console[_0x31d5ba(0x16d)]('No\x20RT\x20journeys\x20found');else for(const _0xfb7031 of _0x262a84){const _0x5abab8=_0xfb7031[_0x31d5ba(0x290)]===_0x31d5ba(0x1bc)?'🚀':'📝',_0x92d7bb=_0xfb7031[_0x31d5ba(0x335)]?a31_0x1c79fc[_0x31d5ba(0x288)](_0x31d5ba(0x1dd)):'',_0x54295b=a31_0x1c79fc['dim']('\x20('+_0xfb7031['stageCount']+_0x31d5ba(0x1de)+(_0xfb7031[_0x31d5ba(0x180)]!==0x1?'s':'')+')');console[_0x31d5ba(0x16d)](_0x5abab8+'\x20'+_0xfb7031[_0x31d5ba(0x138)]+_0x92d7bb+_0x54295b);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x1fc);['description']='Pause\x20activations\x20in\x20an\x20RT\x20journey';async[a31_0x246d00(0x2c8)](_0x1b590c){const _0x160c29=a31_0x246d00,{options:_0x3a9ea9,args:_0x1a43a8,tdx:_0xfd5f5a}=_0x1b590c,_0x1a5a23=_0x1a43a8[0x0];if(!_0x1a5a23)return console[_0x160c29(0x2dd)](a31_0x1c79fc['red'](_0x160c29(0x31f))),console[_0x160c29(0x2dd)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console['error'](a31_0x1c79fc['dim'](_0x160c29(0x22c))),0x1;_0x3a9ea9['verbose']&&(console['error'](_0x160c29(0x314)+_0x3a9ea9[_0x160c29(0x184)]),console[_0x160c29(0x2dd)]('RT\x20Journey\x20ID:\x20'+_0x1a5a23));const _0x197ec0=await withSpinner(_0x160c29(0x16e)+_0x1a5a23+_0x160c29(0x1ae),()=>_0xfd5f5a[_0x160c29(0x28c)][_0x160c29(0x19e)](_0x1a5a23),{'verbose':_0x3a9ea9[_0x160c29(0x1db)]}),_0x33e5d5=_0x197ec0[_0x160c29(0x1ad)];console[_0x160c29(0x2dd)](_0x160c29(0x2f6)+_0x33e5d5[_0x160c29(0x138)]+'\x27');if(_0x3a9ea9[_0x160c29(0x14d)]===_0x160c29(0x33e)||_0x3a9ea9['format']===_0x160c29(0x349))await handleSDKOutput([_0x33e5d5],_0x3a9ea9);else{const _0x493ce0=_0x33e5d5[_0x160c29(0x290)]===_0x160c29(0x1bc)?'🚀':'📝',_0x4fa212=_0x33e5d5['paused']?a31_0x1c79fc['yellow'](_0x160c29(0x1dd)):'';console[_0x160c29(0x16d)](_0x493ce0+'\x20'+_0x33e5d5[_0x160c29(0x138)]+_0x4fa212);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x246d00(0x138)]='ps:rt:jn:resume';[a31_0x246d00(0x1ee)]='Resume\x20activations\x20in\x20an\x20RT\x20journey';async[a31_0x246d00(0x2c8)](_0xb0dcfd){const _0x3c80a6=a31_0x246d00,{options:_0x4d3bc8,args:_0x27173f,tdx:_0x205e9b}=_0xb0dcfd,_0x1f4ebe=_0x27173f[0x0];if(!_0x1f4ebe)return console[_0x3c80a6(0x2dd)](a31_0x1c79fc[_0x3c80a6(0x1b0)](_0x3c80a6(0x31f))),console[_0x3c80a6(0x2dd)](_0x3c80a6(0x28b)),console[_0x3c80a6(0x2dd)](a31_0x1c79fc[_0x3c80a6(0x1d9)]('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x4d3bc8[_0x3c80a6(0x1db)]&&(console[_0x3c80a6(0x2dd)]('Site:\x20'+_0x4d3bc8[_0x3c80a6(0x184)]),console[_0x3c80a6(0x2dd)]('RT\x20Journey\x20ID:\x20'+_0x1f4ebe));const _0x7ee723=await withSpinner(_0x3c80a6(0x268)+_0x1f4ebe+_0x3c80a6(0x1ae),()=>_0x205e9b[_0x3c80a6(0x28c)][_0x3c80a6(0x2c1)](_0x1f4ebe),{'verbose':_0x4d3bc8[_0x3c80a6(0x1db)]}),_0x3515b5=_0x7ee723[_0x3c80a6(0x1ad)];console[_0x3c80a6(0x2dd)]('✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x3515b5['name']+'\x27');if(_0x4d3bc8['format']===_0x3c80a6(0x33e)||_0x4d3bc8[_0x3c80a6(0x14d)]===_0x3c80a6(0x349))await handleSDKOutput([_0x3515b5],_0x4d3bc8);else{const _0x2eec44=_0x3515b5[_0x3c80a6(0x290)]===_0x3c80a6(0x1bc)?'🚀':'📝',_0x4e9f69=_0x3515b5[_0x3c80a6(0x335)]?a31_0x1c79fc[_0x3c80a6(0x288)]('\x20(paused)'):'';console[_0x3c80a6(0x16d)](_0x2eec44+'\x20'+_0x3515b5[_0x3c80a6(0x138)]+_0x4e9f69);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x1ef);[a31_0x246d00(0x1ee)]='Get\x20current\x20RT\x20configuration\x20version\x20status';async['execute'](_0x4b8a8e){const _0x1e34f6=a31_0x246d00,{options:_0xe044bb,args:_0x67990c,tdx:_0x3d16c6}=_0x4b8a8e,_0x37286f=_0x67990c[0x0]||_0xe044bb['parentSegment'];if(!_0x37286f)return showParentSegmentNotSetError(_0x1e34f6(0x327)+_0x1e34f6(0x2f1)),0x1;_0xe044bb['verbose']&&(console[_0x1e34f6(0x2dd)](_0x1e34f6(0x314)+_0xe044bb[_0x1e34f6(0x184)]),console[_0x1e34f6(0x2dd)](_0x1e34f6(0x14c)+_0x37286f));const _0x2e4388=await withSpinner(_0x1e34f6(0x162)+_0x37286f+_0x1e34f6(0x1ae),()=>_0x3d16c6[_0x1e34f6(0x338)][_0x1e34f6(0x2e2)](_0x37286f),{'verbose':_0xe044bb[_0x1e34f6(0x1db)]}),_0x59bc9a=_0x2e4388[_0x1e34f6(0x1ad)],_0x2ac6e3=await withSpinner(_0x1e34f6(0x166)+_0x37286f+'\x27...',()=>_0x3d16c6[_0x1e34f6(0x28c)][_0x1e34f6(0x217)](_0x59bc9a),{'verbose':_0xe044bb[_0x1e34f6(0x1db)]}),_0x5d0956=_0x2ac6e3[_0x1e34f6(0x1ad)];return console['error'](_0x1e34f6(0x2f8)),_0xe044bb[_0x1e34f6(0x14d)]===_0x1e34f6(0x33e)||_0xe044bb['format']===_0x1e34f6(0x349)?await handleSDKOutput([_0x5d0956],_0xe044bb):(console[_0x1e34f6(0x16d)](_0x1e34f6(0x16c)+_0x5d0956['id']),console[_0x1e34f6(0x16d)]('audienceId:\x20'+_0x5d0956['audienceId']),console[_0x1e34f6(0x16d)](_0x1e34f6(0x342)+_0x5d0956['identifier']),console['log'](_0x1e34f6(0x285)+_0x5d0956[_0x1e34f6(0x220)]),console[_0x1e34f6(0x16d)](_0x1e34f6(0x2bb)+_0x5d0956[_0x1e34f6(0x255)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{['name']=a31_0x246d00(0x2a9);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x2c3);async['execute'](_0x51a0a3){const _0x3f390a=a31_0x246d00,{options:_0xa35b21,args:_0x368e2a,tdx:_0x2592b9}=_0x51a0a3,_0x490720=_0x368e2a[0x0]||_0xa35b21['parentSegment'];if(!_0x490720)return showParentSegmentNotSetError(_0x3f390a(0x2a7)+_0x3f390a(0x1b7)),0x1;const _0xcc6c84=await withSpinner(_0x3f390a(0x162)+_0x490720+_0x3f390a(0x1ae),()=>_0x2592b9['segment']['resolveParentId'](_0x490720),{'verbose':_0xa35b21['verbose']}),_0x33b0a9=_0xcc6c84['data'],_0x46570f=await withSpinner('Listing\x20personalization\x20services\x20for\x20\x27'+_0x490720+_0x3f390a(0x1ae),()=>_0x2592b9[_0x3f390a(0x23e)][_0x3f390a(0x248)](_0x33b0a9),{'verbose':_0xa35b21[_0x3f390a(0x1db)]}),_0x4a9f8d=_0x46570f[_0x3f390a(0x1ad)];console[_0x3f390a(0x2dd)](_0x3f390a(0x281)+_0x4a9f8d[_0x3f390a(0x291)]+'\x20personalization\x20service'+(_0x4a9f8d[_0x3f390a(0x291)]!==0x1?'s':''));if(_0xa35b21[_0x3f390a(0x14d)]===_0x3f390a(0x33e)||_0xa35b21[_0x3f390a(0x14d)]===_0x3f390a(0x349))await handleSDKOutput(_0x4a9f8d,_0xa35b21);else{if(_0x4a9f8d[_0x3f390a(0x291)]===0x0)console[_0x3f390a(0x16d)](_0x3f390a(0x25f)),console['error'](a31_0x1c79fc[_0x3f390a(0x28d)]('\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML'));else for(const _0x4fe046 of _0x4a9f8d){console['log'](a31_0x1c79fc[_0x3f390a(0x1ff)](_0x4fe046[_0x3f390a(0x138)])+'\x20'+a31_0x1c79fc[_0x3f390a(0x1d9)](_0x3f390a(0x346)+_0x4fe046['id']+')'));_0x4fe046[_0x3f390a(0x1ee)]&&console[_0x3f390a(0x16d)]('\x20\x20'+a31_0x1c79fc['dim'](_0x4fe046['description']));if(_0x4fe046[_0x3f390a(0x18f)]&&_0x4fe046['tokens'][_0x3f390a(0x291)]>0x0)for(const _0x1986b6 of _0x4fe046[_0x3f390a(0x18f)]){const _0x387814=_0x1986b6[_0x3f390a(0x148)]?.[_0x3f390a(0x291)]?_0x1986b6[_0x3f390a(0x148)][_0x3f390a(0x142)](',\x20'):_0x3f390a(0x20a);console[_0x3f390a(0x16d)]('\x20\x20'+a31_0x1c79fc[_0x3f390a(0x28d)](_0x3f390a(0x26a))+'\x20'+_0x1986b6[_0x3f390a(0x138)]+'\x20'+a31_0x1c79fc['dim'](_0x3f390a(0x346)+_0x1986b6['id']+')')),console[_0x3f390a(0x16d)]('\x20\x20\x20\x20'+a31_0x1c79fc['dim'](_0x3f390a(0x30f))+'\x20'+_0x387814);}else console['log']('\x20\x20'+a31_0x1c79fc[_0x3f390a(0x1d9)](_0x3f390a(0x2e9)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x218);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x14f);async[a31_0x246d00(0x2c8)](_0x40ec9b){const _0x43efab=a31_0x246d00,{options:_0x389e88,args:_0x52a687,tdx:_0x195b8f}=_0x40ec9b,_0x410e42=_0x389e88,_0x58bfe0=_0x52a687[0x0],_0x4a8f43=_0x52a687[0x1]||_0x389e88['parentSegment'];if(!_0x58bfe0)return console[_0x43efab(0x2dd)](_0x43efab(0x245)),console[_0x43efab(0x2dd)](_0x43efab(0x2d5)),console[_0x43efab(0x2dd)](_0x43efab(0x238)),0x1;if(!_0x4a8f43)return showParentSegmentNotSetError(_0x43efab(0x214)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x510d67=await withSpinner(_0x43efab(0x162)+_0x4a8f43+_0x43efab(0x1ae),()=>_0x195b8f[_0x43efab(0x338)][_0x43efab(0x2e2)](_0x4a8f43),{'verbose':_0x389e88[_0x43efab(0x1db)]}),_0x7adca2=_0x510d67[_0x43efab(0x1ad)],_0xe7f754={'name':_0x58bfe0,'description':_0x410e42[_0x43efab(0x1ee)],'public':_0x410e42['public']},_0x207ee0=await withSpinner(_0x43efab(0x306)+_0x58bfe0+_0x43efab(0x1ae),()=>_0x195b8f[_0x43efab(0x23e)]['create'](_0x7adca2,_0xe7f754),{'verbose':_0x389e88[_0x43efab(0x1db)]}),_0x17691e=_0x207ee0[_0x43efab(0x1ad)];return console[_0x43efab(0x2dd)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0x17691e[_0x43efab(0x138)]+_0x43efab(0x2da)+_0x17691e['id']),await handleSDKOutput([_0x17691e],_0x389e88),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x246d00(0x138)]='ps:pz:service:show';['description']=a31_0x246d00(0x27d);async[a31_0x246d00(0x2c8)](_0x418274){const _0x1bda79=a31_0x246d00,{options:_0x5f3740,args:_0x2b0b62,tdx:_0x3e06ee}=_0x418274,_0x38837d=_0x2b0b62[0x0],_0x261d3e=_0x2b0b62[0x1]||_0x5f3740[_0x1bda79(0x224)];if(!_0x38837d)return console[_0x1bda79(0x2dd)](_0x1bda79(0x256)),console['error'](_0x1bda79(0x167)),console[_0x1bda79(0x2dd)](_0x1bda79(0x1c6)),0x1;if(!_0x261d3e)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a'+_0x1bda79(0x1c6)),0x1;const _0x3925ca=await withSpinner(_0x1bda79(0x162)+_0x261d3e+_0x1bda79(0x1ae),()=>_0x3e06ee[_0x1bda79(0x338)][_0x1bda79(0x2e2)](_0x261d3e),{'verbose':_0x5f3740['verbose']}),_0x26567e=_0x3925ca['data'],_0x4b4b25=await withSpinner(_0x1bda79(0x15d)+_0x38837d+_0x1bda79(0x1ae),()=>_0x3e06ee[_0x1bda79(0x23e)][_0x1bda79(0x23b)](_0x26567e,_0x38837d),{'verbose':_0x5f3740[_0x1bda79(0x1db)]}),_0x273879=_0x4b4b25[_0x1bda79(0x1ad)];if(_0x5f3740[_0x1bda79(0x33e)]||_0x5f3740['jsonl'])await handleSDKOutput([_0x273879],_0x5f3740);else{console[_0x1bda79(0x16d)](a31_0x1c79fc['bold'](_0x273879[_0x1bda79(0x138)])+'\x20'+a31_0x1c79fc['dim'](_0x1bda79(0x346)+_0x273879['id']+')'));_0x273879[_0x1bda79(0x1ee)]&&console['log']('\x20\x20'+a31_0x1c79fc['dim'](_0x273879[_0x1bda79(0x1ee)]));console[_0x1bda79(0x16d)]('\x20\x20'+a31_0x1c79fc[_0x1bda79(0x28d)]('public:')+'\x20'+(_0x273879[_0x1bda79(0x223)]?_0x1bda79(0x2f0):'no'));if(_0x273879['tokens']&&_0x273879[_0x1bda79(0x18f)][_0x1bda79(0x291)]>0x0)for(const _0x79f5d5 of _0x273879[_0x1bda79(0x18f)]){const _0x1ec26e=_0x79f5d5['allowedIps']?.[_0x1bda79(0x291)]?_0x79f5d5[_0x1bda79(0x148)]['join'](',\x20'):_0x1bda79(0x20a);console[_0x1bda79(0x16d)]('\x20\x20'+a31_0x1c79fc[_0x1bda79(0x28d)](_0x1bda79(0x26a))+'\x20'+_0x79f5d5[_0x1bda79(0x138)]+'\x20'+a31_0x1c79fc[_0x1bda79(0x1d9)](_0x1bda79(0x346)+_0x79f5d5['id']+')')),console[_0x1bda79(0x16d)](_0x1bda79(0x2af)+a31_0x1c79fc[_0x1bda79(0x1d9)](_0x1bda79(0x30f))+'\x20'+_0x1ec26e);}else console[_0x1bda79(0x16d)]('\x20\x20'+a31_0x1c79fc[_0x1bda79(0x1d9)](_0x1bda79(0x2e9)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x21f);[a31_0x246d00(0x1ee)]='Delete\x20a\x20personalization\x20service';async['execute'](_0x44ca82){const _0x589fde=a31_0x246d00,{options:_0x813c21,args:_0x20bbe7,tdx:_0x59c820}=_0x44ca82,_0x4d3c36=_0x20bbe7[0x0],_0x3d4427=_0x20bbe7[0x1]||_0x813c21[_0x589fde(0x224)];if(!_0x4d3c36)return console[_0x589fde(0x2dd)](_0x589fde(0x256)),console[_0x589fde(0x2dd)](_0x589fde(0x1d6)),console[_0x589fde(0x2dd)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x3d4427)return showParentSegmentNotSetError(_0x589fde(0x152)+_0x589fde(0x210)),0x1;const _0x468d6e=await withSpinner(_0x589fde(0x162)+_0x3d4427+_0x589fde(0x1ae),()=>_0x59c820[_0x589fde(0x338)][_0x589fde(0x2e2)](_0x3d4427),{'verbose':_0x813c21[_0x589fde(0x1db)]}),_0x5744cc=_0x468d6e[_0x589fde(0x1ad)];return await withSpinner(_0x589fde(0x13e)+_0x4d3c36+_0x589fde(0x1ae),()=>_0x59c820[_0x589fde(0x23e)]['delete'](_0x5744cc,_0x4d3c36),{'verbose':_0x813c21[_0x589fde(0x1db)]}),console['error']('✔\x20Deleted\x20personalization\x20service\x20\x27'+_0x4d3c36+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x320);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x2e3);async[a31_0x246d00(0x2c8)](_0x1e5427){const _0x58cd40=a31_0x246d00,{options:_0xc66f83,args:_0x2ac7c7,tdx:_0xe4a56c}=_0x1e5427,_0x3074fa=_0xc66f83,_0x507151=_0x2ac7c7[0x0],_0x3c0364=_0x2ac7c7[0x1]||_0xc66f83[_0x58cd40(0x224)];if(!_0x507151)return console[_0x58cd40(0x2dd)](_0x58cd40(0x256)),console[_0x58cd40(0x2dd)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),console[_0x58cd40(0x2dd)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x3074fa[_0x58cd40(0x138)])return console[_0x58cd40(0x2dd)](_0x58cd40(0x26d)),console[_0x58cd40(0x2dd)](_0x58cd40(0x243)),0x1;if(!_0x3c0364)return showParentSegmentNotSetError(_0x58cd40(0x263)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0xb0d514=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3c0364+_0x58cd40(0x1ae),()=>_0xe4a56c[_0x58cd40(0x338)][_0x58cd40(0x2e2)](_0x3c0364),{'verbose':_0xc66f83[_0x58cd40(0x1db)]}),_0x4c2b6a=_0xb0d514[_0x58cd40(0x1ad)],_0x5984a0={'name':_0x3074fa[_0x58cd40(0x138)]};_0x3074fa[_0x58cd40(0x1ee)]!==undefined&&(_0x5984a0[_0x58cd40(0x1ee)]=_0x3074fa[_0x58cd40(0x1ee)]);const _0x493096=await withSpinner(_0x58cd40(0x14b)+_0x507151+_0x58cd40(0x1ae),()=>_0xe4a56c[_0x58cd40(0x23e)][_0x58cd40(0x31d)](_0x4c2b6a,_0x507151,_0x5984a0),{'verbose':_0xc66f83[_0x58cd40(0x1db)]}),_0x2984c4=_0x493096[_0x58cd40(0x1ad)];return console[_0x58cd40(0x2dd)](_0x58cd40(0x316)+_0x2984c4['name']+'\x27'),await handleSDKOutput([_0x2984c4],_0xc66f83),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{['name']='ps:pz:service:token:create';[a31_0x246d00(0x1ee)]=a31_0x246d00(0x1c1);async[a31_0x246d00(0x2c8)](_0x21f319){const _0xb55ef=a31_0x246d00,{options:_0x1b5c83,args:_0x26d389,tdx:_0xf3117c}=_0x21f319,_0x4196f1=_0x1b5c83,_0x4f9b28=_0x26d389[0x0],_0x3732d5=_0x26d389[0x1],_0x4cfe3e=_0x26d389[0x2]||_0x1b5c83['parentSegment'];if(!_0x4f9b28)return console[_0xb55ef(0x2dd)](_0xb55ef(0x16b)),console[_0xb55ef(0x2dd)](_0xb55ef(0x2fb)),console[_0xb55ef(0x2dd)](_0xb55ef(0x20b)),0x1;if(!_0x3732d5)return console[_0xb55ef(0x2dd)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0xb55ef(0x2dd)](_0xb55ef(0x2fb)),console[_0xb55ef(0x2dd)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x4cfe3e)return showParentSegmentNotSetError(_0xb55ef(0x33c)+_0xb55ef(0x20b)),0x1;const _0x2b5b32=await withSpinner(_0xb55ef(0x162)+_0x4cfe3e+_0xb55ef(0x1ae),()=>_0xf3117c[_0xb55ef(0x338)][_0xb55ef(0x2e2)](_0x4cfe3e),{'verbose':_0x1b5c83[_0xb55ef(0x1db)]}),_0x80dc6e=_0x2b5b32[_0xb55ef(0x1ad)],_0x5c25de={'name':_0x4f9b28};_0x4196f1[_0xb55ef(0x148)]&&(_0x5c25de[_0xb55ef(0x148)]=_0x4196f1[_0xb55ef(0x148)][_0xb55ef(0x260)](',')[_0xb55ef(0x1c9)](_0x14ba05=>_0x14ba05['trim']()));_0x4196f1[_0xb55ef(0x1ee)]&&(_0x5c25de['description']=_0x4196f1[_0xb55ef(0x1ee)]);const _0x11c47e=await withSpinner('Creating\x20token\x20\x27'+_0x4f9b28+'\x27\x20for\x20service\x20\x27'+_0x3732d5+'\x27...',()=>_0xf3117c[_0xb55ef(0x23e)][_0xb55ef(0x16a)](_0x80dc6e,_0x3732d5,_0x5c25de),{'verbose':_0x1b5c83['verbose']}),_0x1dacfa=_0x11c47e[_0xb55ef(0x1ad)];return console[_0xb55ef(0x2dd)](_0xb55ef(0x26e)+_0x1dacfa[_0xb55ef(0x138)]+_0xb55ef(0x2da)+_0x1dacfa['id']),_0x1dacfa['value']&&(console[_0xb55ef(0x2dd)](a31_0x1c79fc[_0xb55ef(0x288)](_0xb55ef(0x2f2))),console[_0xb55ef(0x2dd)](a31_0x1c79fc['cyan'](_0x1dacfa[_0xb55ef(0x2d0)])),console[_0xb55ef(0x2dd)]('')),await handleSDKOutput([_0x1dacfa],_0x1b5c83),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x1e3);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x1c7);async[a31_0x246d00(0x2c8)](_0x3ca1e6){const _0x12c725=a31_0x246d00,{options:_0x2b04aa,args:_0x41ae80,tdx:_0x2f48a3}=_0x3ca1e6,_0x52797d=_0x41ae80[0x0],_0x2e5c51=_0x41ae80[0x1]||_0x2b04aa[_0x12c725(0x224)];if(!_0x52797d)return console['error'](_0x12c725(0x261)),console[_0x12c725(0x2dd)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console[_0x12c725(0x2dd)](_0x12c725(0x144)),0x1;if(!_0x2e5c51)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 _0x536802=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x2e5c51+'\x27...',()=>_0x2f48a3[_0x12c725(0x338)]['resolveParentId'](_0x2e5c51),{'verbose':_0x2b04aa['verbose']}),_0x523031=_0x536802[_0x12c725(0x1ad)],_0x3b4546=await withSpinner('Finding\x20service\x20for\x20token...',()=>_0x2f48a3[_0x12c725(0x23e)][_0x12c725(0x248)](_0x523031),{'verbose':_0x2b04aa[_0x12c725(0x1db)]}),_0x5a16dc=_0x3b4546[_0x12c725(0x1ad)];let _0x28e540;for(const _0x5e9796 of _0x5a16dc){if(_0x5e9796[_0x12c725(0x18f)]?.[_0x12c725(0x31b)](_0x23867d=>_0x23867d['id']===_0x52797d)){_0x28e540=_0x5e9796['id'];break;}}if(!_0x28e540)return console['error']('Error:\x20Token\x20\x27'+_0x52797d+_0x12c725(0x155)),0x1;const _0x45e608=await withSpinner(_0x12c725(0x212)+_0x52797d+'\x27...',()=>_0x2f48a3[_0x12c725(0x23e)][_0x12c725(0x1ea)](_0x523031,_0x28e540,_0x52797d),{'verbose':_0x2b04aa[_0x12c725(0x1db)]}),_0x10de95=_0x45e608['data'];return console[_0x12c725(0x2dd)](_0x12c725(0x2e0)+(_0x10de95['name']||_0x52797d)+'\x27'),await handleSDKOutput([_0x10de95],_0x2b04aa),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x2cb);['description']=a31_0x246d00(0x270);async[a31_0x246d00(0x2c8)](_0x5cbad2){const _0x3dcc0d=a31_0x246d00,{options:_0x265f68,args:_0x470d36,tdx:_0x511921}=_0x5cbad2,_0x2a5a50=_0x470d36[0x0]||_0x265f68[_0x3dcc0d(0x224)];if(!_0x2a5a50)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20(requires\x20context)\x0a'+_0x3dcc0d(0x213)),0x1;const _0xa8f7d8=await withSpinner(_0x3dcc0d(0x162)+_0x2a5a50+'\x27...',()=>_0x511921[_0x3dcc0d(0x338)][_0x3dcc0d(0x2e2)](_0x2a5a50),{'verbose':_0x265f68[_0x3dcc0d(0x1db)]}),_0x152c4c=_0xa8f7d8['data'],_0x30cb5e=await withSpinner(_0x3dcc0d(0x1a1)+_0x2a5a50+'\x27...',()=>_0x511921[_0x3dcc0d(0x23e)][_0x3dcc0d(0x276)](_0x152c4c),{'verbose':_0x265f68[_0x3dcc0d(0x1db)]}),_0xd5591e=_0x30cb5e[_0x3dcc0d(0x1ad)];console['error']('✔\x20Found\x20'+_0xd5591e[_0x3dcc0d(0x291)]+_0x3dcc0d(0x315)+(_0xd5591e[_0x3dcc0d(0x291)]!==0x1?'s':''));if(_0x265f68['format']===_0x3dcc0d(0x33e)||_0x265f68[_0x3dcc0d(0x14d)]==='jsonl')await handleSDKOutput(_0xd5591e,_0x265f68);else{if(_0xd5591e[_0x3dcc0d(0x291)]===0x0)console[_0x3dcc0d(0x16d)](_0x3dcc0d(0x173));else for(const _0x417aa2 of _0xd5591e){console[_0x3dcc0d(0x16d)](a31_0x1c79fc[_0x3dcc0d(0x1ff)](_0x417aa2['name'])+'\x20'+a31_0x1c79fc[_0x3dcc0d(0x1d9)](_0x3dcc0d(0x346)+_0x417aa2['id']+')'));_0x417aa2[_0x3dcc0d(0x1ee)]&&console[_0x3dcc0d(0x16d)]('\x20\x20'+a31_0x1c79fc[_0x3dcc0d(0x1d9)](_0x417aa2[_0x3dcc0d(0x1ee)]));const _0x370d38=_0x417aa2[_0x3dcc0d(0x205)]?.[_0x3dcc0d(0x291)]||0x0;console[_0x3dcc0d(0x16d)]('\x20\x20'+a31_0x1c79fc[_0x3dcc0d(0x28d)](_0x3dcc0d(0x17a))+'\x20'+_0x370d38);if(_0x417aa2['sections']&&_0x417aa2[_0x3dcc0d(0x205)][_0x3dcc0d(0x291)]>0x0)for(const _0x18cb21 of _0x417aa2[_0x3dcc0d(0x205)]){console[_0x3dcc0d(0x16d)](_0x3dcc0d(0x1a7)+_0x18cb21[_0x3dcc0d(0x138)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x176);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x27e);async[a31_0x246d00(0x2c8)](_0x1ab4dd){const _0x48f6ab=a31_0x246d00,{options:_0x406841,args:_0x431768,tdx:_0x24cce5}=_0x1ab4dd,_0x139630=_0x431768[0x0];if(!_0x139630)return console[_0x48f6ab(0x2dd)](_0x48f6ab(0x18e)),console[_0x48f6ab(0x2dd)](_0x48f6ab(0x161)),0x1;const _0x5a69bd=await withSpinner(_0x48f6ab(0x24a)+_0x139630+'\x27...',()=>_0x24cce5[_0x48f6ab(0x23e)][_0x48f6ab(0x309)](_0x139630),{'verbose':_0x406841[_0x48f6ab(0x1db)]}),_0x577c54=_0x5a69bd[_0x48f6ab(0x1ad)];console['error'](_0x48f6ab(0x2ac)+_0x577c54[_0x48f6ab(0x138)]+'\x27');if(_0x406841['format']===_0x48f6ab(0x33e)||_0x406841['format']===_0x48f6ab(0x349))await handleSDKOutput([_0x577c54],_0x406841);else{console[_0x48f6ab(0x16d)](a31_0x1c79fc[_0x48f6ab(0x1ff)](_0x577c54[_0x48f6ab(0x138)])+'\x20'+a31_0x1c79fc['dim'](_0x48f6ab(0x346)+_0x577c54['id']+')'));_0x577c54[_0x48f6ab(0x1ee)]&&console[_0x48f6ab(0x16d)]('\x20\x20'+a31_0x1c79fc[_0x48f6ab(0x1d9)](_0x577c54[_0x48f6ab(0x1ee)]));_0x577c54[_0x48f6ab(0x18b)]&&console[_0x48f6ab(0x16d)]('\x20\x20'+a31_0x1c79fc[_0x48f6ab(0x28d)](_0x48f6ab(0x145))+'\x20'+_0x577c54['audienceId']);console[_0x48f6ab(0x16d)]('\x20\x20'+a31_0x1c79fc[_0x48f6ab(0x28d)]('created:')+'\x20'+_0x577c54[_0x48f6ab(0x195)]),console[_0x48f6ab(0x16d)]('\x20\x20'+a31_0x1c79fc['cyan'](_0x48f6ab(0x18d))+'\x20'+_0x577c54['updatedAt']);const _0x8ff869=_0x577c54[_0x48f6ab(0x205)]?.['length']||0x0;console[_0x48f6ab(0x16d)]('\x20\x20'+a31_0x1c79fc[_0x48f6ab(0x28d)](_0x48f6ab(0x17a))+'\x20'+_0x8ff869);if(_0x577c54[_0x48f6ab(0x205)]&&_0x577c54['sections'][_0x48f6ab(0x291)]>0x0)for(const _0x55ff87 of _0x577c54[_0x48f6ab(0x205)]){console[_0x48f6ab(0x16d)]('\x20\x20\x20\x20'+a31_0x1c79fc[_0x48f6ab(0x1ff)](_0x55ff87[_0x48f6ab(0x138)])+'\x20'+a31_0x1c79fc[_0x48f6ab(0x1d9)](_0x48f6ab(0x346)+_0x55ff87['id']+')')),_0x55ff87['entryCriteria']&&(console[_0x48f6ab(0x16d)](_0x48f6ab(0x33d)+a31_0x1c79fc[_0x48f6ab(0x28d)](_0x48f6ab(0x328))+'\x20'+_0x55ff87['entryCriteria'][_0x48f6ab(0x138)]),_0x55ff87[_0x48f6ab(0x1c8)]['keyEventCriteria']?.[_0x48f6ab(0x242)]&&console[_0x48f6ab(0x16d)]('\x20\x20\x20\x20\x20\x20\x20\x20'+a31_0x1c79fc[_0x48f6ab(0x28d)](_0x48f6ab(0x303))+'\x20'+_0x55ff87[_0x48f6ab(0x1c8)]['keyEventCriteria'][_0x48f6ab(0x242)])),_0x55ff87[_0x48f6ab(0x332)]&&console[_0x48f6ab(0x16d)]('\x20\x20\x20\x20\x20\x20'+a31_0x1c79fc['cyan'](_0x48f6ab(0x251))+'\x20'+JSON[_0x48f6ab(0x207)](_0x55ff87['payload'])),_0x55ff87[_0x48f6ab(0x252)]&&console['log']('\x20\x20\x20\x20\x20\x20'+a31_0x1c79fc['cyan'](_0x48f6ab(0x241))+_0x48f6ab(0x178));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x246d00(0x138)]='ps:pz:delete';['description']='Delete\x20a\x20realtime\x20personalization';async['execute'](_0x19b847){const _0x2c0050=a31_0x246d00,{options:_0x3306f2,args:_0x50f5a7,tdx:_0x5371c2}=_0x19b847,_0xce37b9=_0x50f5a7[0x0];if(!_0xce37b9)return console[_0x2c0050(0x2dd)](_0x2c0050(0x18e)),console[_0x2c0050(0x2dd)](_0x2c0050(0x1f3)),0x1;return await withSpinner(_0x2c0050(0x24b)+_0xce37b9+_0x2c0050(0x1ae),()=>_0x5371c2['personalization']['deletePersonalization'](_0xce37b9),{'verbose':_0x3306f2[_0x2c0050(0x1db)]}),console['error'](_0x2c0050(0x310)+_0xce37b9+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{['name']=a31_0x246d00(0x34c);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x222);async[a31_0x246d00(0x2c8)](_0x5d568b){const _0x30f079=a31_0x246d00,{options:_0x36b4fc,tdx:_0x514399}=_0x5d568b,_0x54bff4=_0x36b4fc;let _0x436b78;if(_0x54bff4[_0x30f079(0x2dc)]){_0x436b78=await loadJSON(_0x54bff4[_0x30f079(0x2dc)],!![]);if(!_0x436b78[_0x30f079(0x247)]?.[_0x30f079(0x143)])return console['error'](_0x30f079(0x333)),console[_0x30f079(0x2dd)]('Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:'),console[_0x30f079(0x2dd)]('\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(!_0x54bff4[_0x30f079(0x138)])return console[_0x30f079(0x2dd)](_0x30f079(0x292)),console[_0x30f079(0x2dd)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0x30f079(0x2dd)](_0x30f079(0x1f1)),0x1;if(_0x54bff4[_0x30f079(0x1ee)]===undefined)return console[_0x30f079(0x2dd)](_0x30f079(0x209)),console[_0x30f079(0x2dd)](_0x30f079(0x2f4)),console[_0x30f079(0x2dd)](_0x30f079(0x1f1)),0x1;if(_0x54bff4[_0x30f079(0x311)]===undefined)return console[_0x30f079(0x2dd)](_0x30f079(0x2d2)),console[_0x30f079(0x2dd)](_0x30f079(0x189)),0x1;let _0x403320=_0x54bff4[_0x30f079(0x18b)];if(!_0x403320&&_0x36b4fc[_0x30f079(0x224)]){const _0x5ce129=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x36b4fc['parentSegment']+_0x30f079(0x1ae),()=>_0x514399['segment']['resolveParentId'](_0x36b4fc[_0x30f079(0x224)]),{'verbose':_0x36b4fc[_0x30f079(0x1db)]});_0x403320=_0x5ce129[_0x30f079(0x1ad)];}let _0x4e1ad3;_0x54bff4[_0x30f079(0x205)]&&(_0x4e1ad3=await loadJSON(_0x54bff4[_0x30f079(0x205)],![]));const _0x1b43cd=_0x54bff4[_0x30f079(0x311)]===_0x30f079(0x1aa)?null:{'id':_0x54bff4[_0x30f079(0x311)],'type':'folder-segment'};_0x436b78={'attributes':{'name':_0x54bff4['name'],'description':_0x54bff4[_0x30f079(0x1ee)]||null,..._0x403320!==undefined&&{'audienceId':_0x403320},..._0x4e1ad3!==undefined&&{'sections':_0x4e1ad3}},'relationships':{'parentFolder':{'data':_0x1b43cd}}};}const _0x2780b2=await withSpinner(_0x30f079(0x1cf)+(_0x436b78[_0x30f079(0x204)]?.[_0x30f079(0x138)]??'')+_0x30f079(0x1ae),()=>_0x514399[_0x30f079(0x23e)][_0x30f079(0x18a)](_0x436b78),{'verbose':_0x36b4fc[_0x30f079(0x1db)]}),_0x5ae22e=_0x2780b2[_0x30f079(0x1ad)];return console[_0x30f079(0x2dd)](_0x30f079(0x2bf)+_0x5ae22e[_0x30f079(0x138)]+_0x30f079(0x2da)+_0x5ae22e['id']),await handleSDKOutput([_0x5ae22e],_0x36b4fc),0x0;}}export class PSPzPatchCommand extends BaseCommand{['name']=a31_0x246d00(0x278);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x1d0);async['execute'](_0x39f6fc){const _0x3c453b=a31_0x246d00,{options:_0x47dbfc,args:_0x252c99}=_0x39f6fc,_0x21af78=_0x47dbfc,_0x1ee479=_0x252c99[0x0];if(!_0x1ee479)return console[_0x3c453b(0x2dd)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x3c453b(0x2dd)](_0x3c453b(0x274)),console[_0x3c453b(0x2dd)](_0x3c453b(0x1e6)),0x1;let _0x3e5153;if(_0x21af78[_0x3c453b(0x2dc)])_0x3e5153=await loadJSON(_0x21af78['file'],!![]);else{if(!_0x21af78[_0x3c453b(0x138)])return console[_0x3c453b(0x2dd)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x3c453b(0x2dd)](_0x3c453b(0x274)),0x1;if(_0x21af78[_0x3c453b(0x1ee)]===undefined)return console[_0x3c453b(0x2dd)](_0x3c453b(0x209)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x2421bc;_0x21af78['sections']&&(_0x2421bc=await loadJSON(_0x21af78['sections'],![])),_0x3e5153={'attributes':{'name':_0x21af78['name'],'description':_0x21af78[_0x3c453b(0x1ee)]||null,..._0x2421bc!==undefined&&{'sections':_0x2421bc}}};}const {tdx:_0xd9f78f}=_0x39f6fc,_0xf21662=await withSpinner('Patching\x20personalization\x20\x27'+_0x1ee479+_0x3c453b(0x1ae),()=>_0xd9f78f[_0x3c453b(0x23e)][_0x3c453b(0x2ef)](_0x1ee479,_0x3e5153),{'verbose':_0x47dbfc[_0x3c453b(0x1db)]}),_0xf2141e=_0xf21662[_0x3c453b(0x1ad)];return console[_0x3c453b(0x2dd)](_0x3c453b(0x265)+_0xf2141e['name']+'\x27\x20(id:\x20'+_0xf2141e['id']+')'),await handleSDKOutput([_0xf2141e],_0x47dbfc),0x0;}}function a31_0x28c0(_0xa287e2,_0x28bc00){_0xa287e2=_0xa287e2-0x134;const _0x8050de=a31_0x8050();let _0x28c016=_0x8050de[_0xa287e2];return _0x28c016;}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x246d00(0x138)]=a31_0x246d00(0x13a);[a31_0x246d00(0x1ee)]=a31_0x246d00(0x2a6);async[a31_0x246d00(0x2c8)](_0x4f02e2){const _0x1a3f26=a31_0x246d00,{options:_0x577f87,args:_0x121f9e}=_0x4f02e2,_0x3885ce=_0x121f9e[0x0]||_0x577f87[_0x1a3f26(0x224)];if(!_0x3885ce)return showParentSegmentNotSetError(_0x1a3f26(0x264)+_0x1a3f26(0x179)),0x1;const _0x4fb34d=resolveYamlFile(_0x3885ce);if(!existsSync(_0x4fb34d))return showFileNotFoundError(_0x4fb34d,_0x3885ce),0x1;let _0x419fca;try{_0x419fca=readFileSync(_0x4fb34d,_0x1a3f26(0x344));}catch(_0x50e2e4){const _0x581566=_0x50e2e4 instanceof Error?_0x50e2e4[_0x1a3f26(0x156)]:String(_0x50e2e4);return console['error'](_0x1a3f26(0x13f)+_0x581566),0x1;}let _0x537927;try{_0x537927=parseDef(_0x419fca);}catch(_0x4be661){const _0x5a1a9a=_0x4be661 instanceof Error?_0x4be661[_0x1a3f26(0x156)]:String(_0x4be661);return console[_0x1a3f26(0x2dd)](a31_0x1c79fc['red'](_0x1a3f26(0x1df)+_0x5a1a9a)),0x1;}if(_0x537927[_0x1a3f26(0x330)]&&_0x537927[_0x1a3f26(0x330)]['length']>0x0)return console[_0x1a3f26(0x2dd)](a31_0x1c79fc[_0x1a3f26(0x288)](_0x1a3f26(0x177)+_0x4fb34d)),console[_0x1a3f26(0x2dd)](a31_0x1c79fc[_0x1a3f26(0x1d9)]('\x20\x20\x20'+_0x537927[_0x1a3f26(0x330)]['length']+_0x1a3f26(0x262))),0x1;!_0x537927['realtime']&&(_0x537927[_0x1a3f26(0x28c)]={'events':[{'name':_0x1a3f26(0x300),'source_table':'<database>.<table>'}],'attributes':[{'name':_0x1a3f26(0x22d),'type':_0x1a3f26(0x225)}],'id_stitching':{'primary_key':_0x537927[_0x1a3f26(0x246)][_0x1a3f26(0x331)]===_0x1a3f26(0x2a3)?_0x1a3f26(0x216):_0x1a3f26(0x29a)}});_0x537927[_0x1a3f26(0x330)]=[{'name':_0x1a3f26(0x135),'description':'Personalization\x20service\x20description','trigger_event':'page_view','sections':[{'name':_0x1a3f26(0x15b),'criteria':'true','attributes':['last_page_viewed']}]}];const _0x488b9b=serializeDef(_0x537927);return writeFileSync(_0x4fb34d,_0x488b9b,_0x1a3f26(0x344)),console[_0x1a3f26(0x2dd)](a31_0x1c79fc['green']('✔')+_0x1a3f26(0x1f4)+a31_0x1c79fc[_0x1a3f26(0x28d)](_0x4fb34d)),(!_0x537927[_0x1a3f26(0x28c)]||_0x419fca[_0x1a3f26(0x160)](_0x1a3f26(0x139))===-0x1)&&console['error'](a31_0x1c79fc['green']('✔')+_0x1a3f26(0x1f2)),console[_0x1a3f26(0x2dd)]('\x0a'+a31_0x1c79fc[_0x1a3f26(0x1d9)](_0x1a3f26(0x1a5))),console[_0x1a3f26(0x2dd)]('\x20\x201.\x20Edit\x20'+_0x4fb34d+_0x1a3f26(0x2cc)),console[_0x1a3f26(0x2dd)](_0x1a3f26(0x2e7)+a31_0x1c79fc[_0x1a3f26(0x1d9)](_0x1a3f26(0x2b6)+_0x3885ce)+_0x1a3f26(0x30c)),0x0;}}
|
|
1
|
+
const a31_0x4a723d=a31_0x93c7;(function(_0x126cb3,_0x578ec0){const _0x11db39=a31_0x93c7,_0x5b4f33=_0x126cb3();while(!![]){try{const _0xe8bf3d=parseInt(_0x11db39(0xcd))/0x1+parseInt(_0x11db39(0x214))/0x2*(parseInt(_0x11db39(0x26b))/0x3)+parseInt(_0x11db39(0x1b4))/0x4*(parseInt(_0x11db39(0x105))/0x5)+-parseInt(_0x11db39(0x18f))/0x6+parseInt(_0x11db39(0x21c))/0x7+-parseInt(_0x11db39(0x265))/0x8+-parseInt(_0x11db39(0x178))/0x9;if(_0xe8bf3d===_0x578ec0)break;else _0x5b4f33['push'](_0x5b4f33['shift']());}catch(_0x3fa667){_0x5b4f33['push'](_0x5b4f33['shift']());}}}(a31_0x5774,0x95cb5));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x5d15cf 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';function a31_0x5774(){const _0x340acf=['displaySummary','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','previewParentYaml','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','Updating','getParentFull','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Fetching\x20current\x20configuration\x20for\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','push','addAttributes','filter','using\x20the\x20default\x20path:\x20','public','<database>.<table>','segment:parent:sql','Resolving\x20parent\x20segment\x20\x27','id:\x20','processedRows','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','allowed\x20IPs:','Attribute:','SELECT\x20*\x20FROM\x20(\x0a','red','\x27\x20is\x20up\x20to\x20date','Error\x20reading\x20file:\x20','5571666LmkKKM','enabled','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','column_type','split','tdx\x20ps\x20preview\x20','Get\x20current\x20RT\x20configuration\x20version\x20status','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','Error:\x20Token\x20name\x20is\x20required','pushParentYaml','\x20\x20\x20\x20\x20\x20','Created','Available\x20behaviors:','toFixed','Error:\x20Token\x20ID\x20is\x20required','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','Fetching\x20behavior\x20list...','verbose','stats','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','/\x20directories\x20exist.','rowCount','Error:\x20Service\x20ID\x20is\x20required','3244770DnMtzZ','Deleting\x20personalization\x20\x27','✔\x20Created\x20personalization\x20\x27','Fetching\x20personalization\x20service\x20\x27','Join:','entryCriteria:','/sessions/','✔\x20Deleted\x20personalization\x20service\x20\x27','Pattern:\x20','audienceId','listParents','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','darwin','No\x20personalization\x20services\x20configured','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','message','\x20RT-enabled\x20parent\x20segment','Creating\x20parent\x20segment\x20\x27','apply','preview','some','\x20personalization','dim','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','createToken','\x20\x20No\x20sample\x20data\x20available','\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','site','getPersonalization','includeSensitive:','reduce','Personalization:','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','\x0aError:','Customers:','113148RXTVEU','\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','Default','\x0a\x20\x20\x20\x20}','Audience\x20ID:','string','segment:parent:show','Behaviors','personalization','matchedCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','execute','Update\x20a\x20realtime\x20personalization\x20entity','\x27\x20and\x20run\x20workflow?','displayColumns','stop','web','Status:','green','use','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','value','Output\x20Database:','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','\x20stage','customerPercent','\x0a\x20\x20]\x0a}\x0a','✔\x20Deleted\x20personalization\x20\x27','stringify','Output\x20file:\x20','ignore','YAML\x20file:\x20','✔\x20Created\x20token\x20\x27','jsonl','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','SQL\x20query:\x0a','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','\x20--attribute\x20\x22<name>\x22','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','ps:pz:create','allValid','\x20--behavior\x20\x22','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','td_client_id','ps:pz:service:list','getParentSQL','List\x20available\x20fields\x20for\x20segmentation','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','\x20kill','Error:\x20Parent\x20segment\x20name\x20is\x20required','Master\x20+\x20Attributes','addBehaviors','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','payload','workflowId','Creating\x20personalization\x20service\x20\x27','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','delete','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','⚡\x20Enabled','formatSchemaJson','platform','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','schemaValid','Create\x20a\x20realtime\x20personalization\x20entity','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','✔\x20No\x20changes\x20-\x20\x27','Attributes:','Listing\x20personalization\x20services\x20for\x20\x27','population','Table:\x20','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','errors','Usage:\x20tdx\x20ps\x20pz\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20(requires\x20context)\x0a','\x20(paused)','parentFolder','localeCompare','\x20\x20\x20','Enriched:','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','scheduleOption','\x20service','\x20configured','\x20Configuration\x20is\x20valid','Delete\x20a\x20personalization\x20service','\x20\x202.\x20Run\x20','\x20\x20\x20\x20-\x20','all','Validating\x20RT\x20configuration...','Show\x20a\x20specific\x20realtime\x20personalization','output','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','4OhxGYb','parent_segment','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','stageCount','events','Finding\x20service\x20for\x20token...','get','Options:','6341160ermbRi','\x20field','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x20\x20Note:\x20','audienceId:\x20','Patching\x20personalization\x20\x27','\x20No\x20changes\x20-\x20','Creating\x20token\x20\x27','{\x0a\x20\x20\x22database\x22:\x20\x22','Attributes','in\x20','launched','No\x20parent\x20segments\x20match\x20pattern:\x20','\x0a⚠️\x20\x20Both\x20','segment:parent:fields','segment','Deleting\x20token\x20\x27','Updating\x20personalization\x20service\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','attributes','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','\x20Context\x20set:\x20','behavior_','customers','Events:','parent_segments','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','validateParentYaml','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','interval','sections:','\x0aNew\x20parent\x20segment\x20\x27','column','ps:pz:list','primaryKey','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','To\x20cancel:','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','displayMasterInfo','Error\x20parsing\x20YAML:\x20','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','bold','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Listing\x20parent\x20segments\x20matching\x20\x27','allowedIps','ps:rt:jn:list','\x20Added\x20RT\x202.0\x20template\x20section','Session:','enriched','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','Fetching\x20SQL\x20for\x20\x27','displayRealtimeInfo','-1d','null','stitchingKeys','\x20[Job\x20ID:\x20','ps:pz:delete','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','displayAttributesStats','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','unref','\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','Fetching\x20customers\x20schema...','Getting\x20personalization\x20\x27','utf-8','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','displayBehaviorsStats','yellow','6724080mbsEUh','trim','\x27\x20(id:\x20','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','ID\x20Stitching:','file','386502bOLTIB','updated:','customerGroup','createPersonalization','folderId','\x0aChanges\x20to\x20apply\x20to\x20\x27','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','getBehaviorNames','query','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','sourceTableValid','✘\x20Failed\x20to\x20rename\x20directory:\x20','\x20personalization\x20service','log','Name:\x20','format','\x27...','ps:pz:service:show','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Site:\x20','identifier','\x27\x20for\x20service\x20\x27','\x20--behavior\x20\x22<name>\x22','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','segment:parent:run','Listing\x20RT-enabled\x20parent\x20segments...','open','Preview:','✔\x20Found\x20personalization\x20\x27','Options:\x0a','addBehaviorsFile','Aborted.','workflowSessionId','sort','list','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','label','Errors:','Analyzing\x20changes...','ps:pz:service:create','customersWithEvents','Creating\x20personalization\x20\x27','Error:\x20Personalization\x20ID\x20is\x20required','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','segment:parent:push','behaviorsFile','identifier:\x20','varchar','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','\x22\x20}','Deleting\x20personalization\x20service\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','behaviors','table','replace','keyEventId:','Fetching\x20sample\x20data...','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','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','eventKind:\x20','attribute','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','displayValidateResults','ps:rt:jn:pause','keyEventCriteria','deletePersonalization','description','tdx\x20ps\x20push\x20','realtime_enabled','paused','✔\x20Updated\x20parent\x20segment\x20\x27','Resume\x20activations\x20in\x20an\x20RT\x20journey','Create\x20parent\x20segment\x20\x27','\x20=\x20','type','ps:pz:service:token:delete','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','displayPreviewResults','ps:pz:service:update','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','schemaError','updatedAt','Database:\x20','Usage:\x20tdx\x20ps\x20rt\x20configuration_versions\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20(requires\x20context)\x0a','Validate:','Schema\x20saved\x20to\x20','true','\x20service(s)\x20configured','personalization_services','%)\x20','scheduleType','Listing\x20fields\x20for\x20\x27','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','Show\x20personalization\x20service\x20details','ps:pz:show','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','foreignKey','\x0a\x20\x20\x20\x20]','\x20is\x20already\x20up\x20to\x20date','ps:rt:validate','\x20\x20Tables:\x201\x20customers\x20+\x20','\x0aNo\x20sample\x20data\x20available','✔\x20Renamed\x20directory\x20to\x20','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','✔\x20Found\x20','No\x20parent\x20segments\x20found','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','.yaml','parentSegment','status','idStitching','828074Puchur','\x20RT\x20journey','Rows:','Get\x20SQL\x20query\x20for\x20parent\x20segment','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','\x20rows\x20','name','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','database','listPersonalizations','map','Error:\x20Token\x20\x27','setJobId','patch','payload:','FINISHED','\x20--attribute\x20\x22','jobId','sections','(id:\x20','Creating','Master\x20Table','public:','updateParent','toLowerCase','\x27\x20with\x20ID:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','\x20total','segment:parent:update','json','✔\x20Updated\x20personalization\x20service\x20\x27','Parent\x20segment:\x20','joinKey','realtime','master','Listing\x20parent\x20segments...','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','\x20to\x20push\x20the\x20configuration','repeat','.yml','resumeJourney','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','totalEvents','entryCriteria','create','parent_id','addAttributesFile','RT\x202.0\x20Validate:','\x20parent\x20segment\x20\x27','Updated','segment:parent:pull','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','sampleData','Error:','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','\x20+\x20[','110CPlcpH','/app/workflows/','✔\x20Created\x20parent\x20segment\x20\x27','join','segment:parent:create','/app/dw/parentSegments/','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','start','Validating\x20configuration...','Error:\x20--database\x20and\x20--table\x20are\x20required','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Attempt:','error','displaySampleData','\x5c$&','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','Error:\x20File\x20not\x20found:\x20','resolveParentId','columns','List\x20RT\x20journeys','RT\x20Journey\x20ID:\x20','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','Apply\x20changes\x20to\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20(requires\x20context)\x0a','Fetching\x20parent\x20segment\x20\x27','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','\x20parent\x20segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','ps:pz:service:token:create','test','Available\x20attributes:','\x20\x20Database:\x20','✔\x20Created\x20personalization\x20service\x20\x27','xdg-open','Delete\x20a\x20realtime\x20personalization','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','`\x20to\x20download\x20the\x20configuration\x20first','single','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','information_schema','workflowAttemptId','behavior','No\x20personalizations\x20configured','displayPreviewHints','data','personalizationServices','Listing\x20RT\x20journeys\x20for\x20\x27','timezone','/{name}.yml\x0a','\x0a✔\x20Workflow\x20started','tokens','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','isDirectory','text','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','length','Columns:','token:','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','collectSchema','\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}','coveragePercent','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','\x20\x20\x20\x20','deleteToken','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','\x0aUsage:\x20tdx\x20ps\x20preview\x20','✔\x20Updated\x20personalization\x20\x27','Error:\x20--behavior\x20requires\x20a\x20name\x0a','includeSensitive','win32','valid','Show\x20parent\x20segment\x20details','keys','ps:pz:init','\x20RT\x20configuration\x20is\x20valid','\x20\x201.\x20Edit\x20','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','no\x20tokens\x20configured','No\x20RT\x20journeys\x20found','⚡\x20Not\x20enabled','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','cyan','/attempt/','yes'];a31_0x5774=function(){return _0x340acf;};return a31_0x5774();}import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a31_0x46354d from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a31_0x4a723d(0x238),LEGACY_PARENT_SEGMENT_DIR=a31_0x4a723d(0x215);function openBrowser(_0x232e7d){const _0x368544=a31_0x4a723d,_0x1b3cc3=process[_0x368544(0x1f3)],_0x388c8f=_0x1b3cc3===_0x368544(0x19b)?_0x368544(0x76):_0x1b3cc3===_0x368544(0x14e)?_0x368544(0x10d):_0x368544(0x127);spawn(_0x388c8f,[_0x232e7d],{'detached':!![],'stdio':_0x368544(0x1d2)})[_0x368544(0x25d)]();}function migrateLegacyDirectory(){const _0x54b0ac=a31_0x4a723d;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x31c23c=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x31c23c[_0x54b0ac(0x13c)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x54b0ac(0x112)](a31_0x46354d[_0x54b0ac(0x264)](_0x54b0ac(0x229)+LEGACY_PARENT_SEGMENT_DIR+'/\x20and\x20'+PARENT_SEGMENT_DIR+_0x54b0ac(0x18c))),console[_0x54b0ac(0x112)](a31_0x46354d[_0x54b0ac(0x1a5)](_0x54b0ac(0x1b1)+LEGACY_PARENT_SEGMENT_DIR+'/\x20directory.\x0a')),![];console[_0x54b0ac(0x112)](a31_0x46354d[_0x54b0ac(0x264)]('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+'/\x20→\x20'+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x54b0ac(0x112)](a31_0x46354d['green'](_0x54b0ac(0xc3)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x1e3ba3){const _0x2a6a0e=_0x1e3ba3 instanceof Error?_0x1e3ba3[_0x54b0ac(0x19e)]:String(_0x1e3ba3);return console['error'](a31_0x46354d[_0x54b0ac(0x175)](_0x54b0ac(0x67)+_0x2a6a0e+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async['run'](_0x2916fb){return migrateLegacyDirectory(),super['run'](_0x2916fb);}}function resolveYamlFile(_0x337b69){const _0x55fcb1=a31_0x4a723d;if(_0x337b69['endsWith']('.yml')||_0x337b69['endsWith'](_0x55fcb1(0xc9)))return _0x337b69;return a31_0x5d15cf[_0x55fcb1(0x108)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x337b69)+_0x55fcb1(0xf4));}function formatProgressMessage(_0x523d5c){const _0x22f35=a31_0x4a723d,_0x26c859=_0x523d5c['match'](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x26c859){const [,_0x532d8c,_0x37a51c,_0x474aef='']=_0x26c859;return a31_0x46354d[_0x22f35(0x1a5)](_0x532d8c+':')+'\x20'+_0x37a51c+a31_0x46354d[_0x22f35(0x1a5)](_0x474aef);}return a31_0x46354d[_0x22f35(0x1a5)](_0x523d5c);}function showFileNotFoundError(_0x1a22ce,_0x5cbb79){const _0x5bd794=a31_0x4a723d;console[_0x5bd794(0x112)](a31_0x46354d[_0x5bd794(0x175)](_0x5bd794(0x116)+_0x1a22ce+'\x0a')),console[_0x5bd794(0x112)](a31_0x46354d[_0x5bd794(0x15a)]('Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20'+_0x5cbb79+_0x5bd794(0x12a)));}function displayRealtimeValidation(_0x249baf){const _0x5cc83f=a31_0x4a723d;if(!_0x249baf[_0x5cc83f(0xee)])return;const _0x20147c=_0x249baf[_0x5cc83f(0xee)],_0x13e92b=_0x20147c[_0x5cc83f(0x179)]?a31_0x46354d['green'](_0x5cc83f(0x1f1)):a31_0x46354d['yellow'](_0x5cc83f(0x158));console[_0x5cc83f(0x112)]('\x0a'+a31_0x46354d[_0x5cc83f(0x1a5)]('RT\x202.0:')+'\x20'+_0x13e92b);if(_0x20147c['events']&&_0x20147c[_0x5cc83f(0x218)][_0x5cc83f(0x13f)]>0x0){console[_0x5cc83f(0x112)]('\x20\x20'+a31_0x46354d[_0x5cc83f(0x1a5)](_0x5cc83f(0x237))+'\x20'+_0x20147c['events']['length']+_0x5cc83f(0x20a));for(const _0x26fef4 of _0x20147c[_0x5cc83f(0x218)]){const _0x245a43=_0x26fef4[_0x5cc83f(0x66)]===![]?a31_0x46354d[_0x5cc83f(0x175)]('✘'):a31_0x46354d['green']('✔');console[_0x5cc83f(0x112)](_0x5cc83f(0x147)+_0x245a43+'\x20'+_0x26fef4['name']),_0x26fef4['sourceTableError']&&console[_0x5cc83f(0x112)](_0x5cc83f(0x182)+a31_0x46354d[_0x5cc83f(0x175)](_0x26fef4['sourceTableError']));}}if(_0x20147c[_0x5cc83f(0x22f)]&&_0x20147c[_0x5cc83f(0x22f)][_0x5cc83f(0x13f)]>0x0){console[_0x5cc83f(0x112)]('\x20\x20'+a31_0x46354d[_0x5cc83f(0x1a5)](_0x5cc83f(0x1f9))+'\x20'+_0x20147c[_0x5cc83f(0x22f)][_0x5cc83f(0x13f)]+_0x5cc83f(0x20a));for(const _0x56ce15 of _0x20147c[_0x5cc83f(0x22f)]){const _0x3eb245=_0x56ce15[_0x5cc83f(0x14f)]?a31_0x46354d[_0x5cc83f(0x1c6)]('✔'):a31_0x46354d[_0x5cc83f(0x175)]('✘');console[_0x5cc83f(0x112)](_0x5cc83f(0x147)+_0x3eb245+'\x20'+_0x56ce15[_0x5cc83f(0xd3)]+'\x20'+a31_0x46354d[_0x5cc83f(0x1a5)]('('+_0x56ce15['type']+')'));}}if(_0x20147c[_0x5cc83f(0xcc)]){const _0x4d2bca=_0x20147c[_0x5cc83f(0xcc)][_0x5cc83f(0x256)]?.[_0x5cc83f(0x13f)]?_0x5cc83f(0x104)+_0x20147c['idStitching'][_0x5cc83f(0x256)]['join'](',\x20')+']':'';console['error']('\x20\x20'+a31_0x46354d['dim'](_0x5cc83f(0x269))+'\x20'+_0x20147c[_0x5cc83f(0xcc)][_0x5cc83f(0x241)]+_0x4d2bca);}if(_0x20147c[_0x5cc83f(0x135)]&&_0x20147c[_0x5cc83f(0x135)][_0x5cc83f(0x13f)]>0x0){console[_0x5cc83f(0x112)]('\x20\x20'+a31_0x46354d[_0x5cc83f(0x1a5)](_0x5cc83f(0x1ae))+'\x20'+_0x20147c[_0x5cc83f(0x135)][_0x5cc83f(0x13f)]+_0x5cc83f(0x209)+(_0x20147c[_0x5cc83f(0x135)][_0x5cc83f(0x13f)]!==0x1?'s':''));for(const _0x543ff0 of _0x20147c[_0x5cc83f(0x135)]){console[_0x5cc83f(0x112)]('\x20\x20\x20\x20-\x20'+_0x543ff0[_0x5cc83f(0xd3)]);}}}function showParentSegmentNotSetError(_0x5e629){const _0x5bf7b4=a31_0x4a723d;console[_0x5bf7b4(0x112)](a31_0x46354d[_0x5bf7b4(0x264)](_0x5bf7b4(0x17a))),console['error'](_0x5e629);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x4a723d(0xd3)]='segment:parent:list';[a31_0x4a723d(0x9e)]='List\x20parent\x20segments';async[a31_0x4a723d(0x1bf)](_0x5aa039){const _0x4f04f4=a31_0x4a723d,{options:_0x259990,args:_0x1ff1de,tdx:_0x34b2a6}=_0x5aa039,_0x487b5b=_0x1ff1de[0x0];_0x259990[_0x4f04f4(0x189)]&&(console[_0x4f04f4(0x112)](_0x4f04f4(0x6f)+_0x259990[_0x4f04f4(0x1aa)]),_0x487b5b&&console[_0x4f04f4(0x112)](_0x4f04f4(0x197)+_0x487b5b));const _0x59425d=await withSpinner(_0x487b5b?_0x4f04f4(0x24b)+_0x487b5b+'\x27...':_0x4f04f4(0xf0),()=>_0x34b2a6['segment'][_0x4f04f4(0x199)](),{'verbose':_0x259990[_0x4f04f4(0x189)]});let _0x3d896a=_0x59425d[_0x4f04f4(0x134)];if(_0x487b5b){const _0x15a27f=_0x487b5b[_0x4f04f4(0x92)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x4f04f4(0x92)](/\?/g,'.'),_0x247554=new RegExp('^'+_0x15a27f+'$','i');_0x3d896a=_0x3d896a['filter'](_0x45f291=>_0x247554['test'](_0x45f291[_0x4f04f4(0x22f)]['name']));}_0x3d896a[_0x4f04f4(0x7d)]((_0x5b55fb,_0x20ecc3)=>_0x5b55fb[_0x4f04f4(0x22f)][_0x4f04f4(0xd3)][_0x4f04f4(0x204)](_0x20ecc3[_0x4f04f4(0x22f)][_0x4f04f4(0xd3)])),console[_0x4f04f4(0x112)](_0x4f04f4(0xc5)+_0x3d896a[_0x4f04f4(0x13f)]+_0x4f04f4(0x120)+(_0x3d896a['length']!==0x1?'s':''));const _0x8024d9=_0x347a96=>{const _0x8deb65=_0x4f04f4;return getConsoleNextUrl(_0x259990[_0x8deb65(0x1aa)],'/app/dw/parentSegments/'+_0x347a96);};if(_0x259990[_0x4f04f4(0x6b)]==='json'||_0x259990['format']==='jsonl'){const _0x201200=_0x3d896a[_0x4f04f4(0xd7)](_0x1f7f4c=>({..._0x1f7f4c,'url':_0x8024d9(_0x1f7f4c['id'])}));await handleSDKOutput(_0x201200,_0x259990);}else{if(_0x3d896a[_0x4f04f4(0x13f)]===0x0)_0x487b5b?console[_0x4f04f4(0x69)](_0x4f04f4(0x228)+_0x487b5b):console[_0x4f04f4(0x69)](_0x4f04f4(0xc6));else for(const _0x1b6dae of _0x3d896a){const _0x43bbd3=_0x1b6dae[_0x4f04f4(0x22f)][_0x4f04f4(0x1fb)]?a31_0x46354d[_0x4f04f4(0x1a5)]('\x20('+formatRows(_0x1b6dae[_0x4f04f4(0x22f)]['population'])+')'):'',_0x446d6a=hyperlink(_0x1b6dae[_0x4f04f4(0x22f)][_0x4f04f4(0xd3)],_0x8024d9(_0x1b6dae['id']));console[_0x4f04f4(0x69)]('👥\x20'+_0x446d6a+_0x43bbd3);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x109);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x1e4);async[a31_0x4a723d(0x1bf)](_0x4bcf5f){const _0x399afc=a31_0x4a723d,{options:_0x332ff6,args:_0x630912,tdx:_0x2062e5}=_0x4bcf5f;console[_0x399afc(0x112)](_0x399afc(0xc8)+_0x399afc(0x1df)+_0x399afc(0xf1));const _0x355596=_0x332ff6;if(_0x630912[_0x399afc(0x13f)]===0x0)return console[_0x399afc(0x112)](a31_0x46354d[_0x399afc(0x175)]('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console['error'](_0x399afc(0x19a)),0x1;const _0x52efd3=_0x630912[0x0];if(!_0x355596[_0x399afc(0xd5)]||!_0x355596['table'])return console['error'](_0x399afc(0x10f)),console[_0x399afc(0x112)](_0x399afc(0x19a)),0x1;_0x355596[_0x399afc(0x189)]&&(console[_0x399afc(0x112)]('Site:\x20'+_0x355596[_0x399afc(0x1aa)]),console[_0x399afc(0x112)](_0x399afc(0x6a)+_0x52efd3),console['error'](_0x399afc(0xaf)+_0x355596['database']),console[_0x399afc(0x112)](_0x399afc(0x1fc)+_0x355596[_0x399afc(0x91)]));const _0x169686=await loadJSONFromOptions(_0x355596[_0x399afc(0x22f)],_0x355596['attributesFile']),_0x21861a=await loadJSONFromOptions(_0x355596['behaviors'],_0x355596[_0x399afc(0x89)]),_0x71fab4=await loadJSONFromOptions(_0x355596[_0x399afc(0x26d)],_0x355596['customerGroupFile']),_0x4a5870={'name':_0x52efd3,'description':_0x355596[_0x399afc(0x9e)],'scheduleType':_0x355596[_0x399afc(0xb7)],'scheduleOption':_0x355596[_0x399afc(0x208)],'timezone':_0x355596[_0x399afc(0x137)],'master':{'parentDatabaseName':_0x355596[_0x399afc(0xd5)],'parentTableName':_0x355596['table']},'attributes':_0x169686,'behaviors':_0x21861a,'customerGroup':_0x71fab4},_0x3d4284=await withSpinner(_0x399afc(0x1a0)+_0x52efd3+_0x399afc(0x6c),()=>_0x2062e5[_0x399afc(0x22b)]['createParent'](_0x4a5870),{'verbose':_0x332ff6[_0x399afc(0x189)]}),_0x131a50=_0x3d4284['data'];return console[_0x399afc(0x112)](_0x399afc(0x107)+_0x131a50[_0x399afc(0xd3)]+_0x399afc(0xe6)+_0x131a50['id']),await handleSDKOutput([_0x131a50],_0x332ff6),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0xe9);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x25a);async[a31_0x4a723d(0x1bf)](_0x42d07f){const _0x47b1b6=a31_0x4a723d,{options:_0x218eca,args:_0x97f656,tdx:_0x5a4693}=_0x42d07f;console[_0x47b1b6(0x112)](_0x47b1b6(0x17f)+_0x47b1b6(0x1df)+_0x47b1b6(0xf1));const _0x2bf0dd=_0x218eca;if(_0x97f656['length']===0x0)return console[_0x47b1b6(0x112)](a31_0x46354d[_0x47b1b6(0x175)](_0x47b1b6(0x1e7))),console[_0x47b1b6(0x112)](_0x47b1b6(0x1e5)),0x1;const _0x2e4fce=_0x97f656[0x0];_0x2bf0dd[_0x47b1b6(0x189)]&&(console['error']('Site:\x20'+_0x2bf0dd[_0x47b1b6(0x1aa)]),console[_0x47b1b6(0x112)]('Parent\x20segment:\x20'+_0x2e4fce));const _0x51b92f=await withSpinner(_0x47b1b6(0x164)+_0x2e4fce+'\x27...',()=>_0x5a4693[_0x47b1b6(0x22b)][_0x47b1b6(0x162)](_0x2e4fce),{'verbose':_0x2bf0dd[_0x47b1b6(0x189)]}),_0x3e1e53=_0x51b92f[_0x47b1b6(0x134)],_0x100e70=await loadJSONFromOptions(_0x2bf0dd[_0x47b1b6(0x168)],_0x2bf0dd[_0x47b1b6(0xfb)]),_0x3850d4=await loadJSONFromOptions(_0x2bf0dd[_0x47b1b6(0x1e9)],_0x2bf0dd[_0x47b1b6(0x7a)]),_0x1e371b={'name':_0x3e1e53[_0x47b1b6(0xd3)],'description':_0x2bf0dd[_0x47b1b6(0x9e)]!==undefined?_0x2bf0dd[_0x47b1b6(0x9e)]:_0x3e1e53[_0x47b1b6(0x9e)],'scheduleType':_0x2bf0dd['scheduleType']!==undefined?_0x2bf0dd['scheduleType']:_0x3e1e53['scheduleType'],'scheduleOption':_0x2bf0dd['scheduleOption']!==undefined?_0x2bf0dd[_0x47b1b6(0x208)]:_0x3e1e53[_0x47b1b6(0x208)],'timezone':_0x2bf0dd[_0x47b1b6(0x137)]!==undefined?_0x2bf0dd[_0x47b1b6(0x137)]:_0x3e1e53[_0x47b1b6(0x137)],'master':_0x3e1e53[_0x47b1b6(0xef)],'attributes':_0x100e70?[..._0x3e1e53[_0x47b1b6(0x22f)]||[],..._0x100e70]:_0x3e1e53['attributes'],'behaviors':_0x3850d4?[..._0x3e1e53['behaviors']||[],..._0x3850d4]:_0x3e1e53['behaviors'],'customerGroup':_0x3e1e53[_0x47b1b6(0x26d)]},_0x37317b=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x2e4fce+_0x47b1b6(0x6c),()=>_0x5a4693[_0x47b1b6(0x22b)][_0x47b1b6(0xe4)](_0x2e4fce,_0x1e371b),{'verbose':_0x2bf0dd[_0x47b1b6(0x189)]}),_0x3e3e11=_0x37317b[_0x47b1b6(0x134)];return console['error'](_0x47b1b6(0xa2)+_0x3e3e11[_0x47b1b6(0xd3)]+'\x27'),await handleSDKOutput([_0x3e3e11],_0x2bf0dd),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0xff);['description']=a31_0x4a723d(0x271);async['execute'](_0x2ba4c9){const _0x45bc24=a31_0x4a723d,{options:_0x767cbc,args:_0x268257,tdx:_0x43c300}=_0x2ba4c9,_0x4ed44b=_0x767cbc,_0x3cb0ca=_0x268257[0x0]||_0x767cbc[_0x45bc24(0xca)];if(!_0x3cb0ca)return showParentSegmentNotSetError(_0x45bc24(0x268)+_0x45bc24(0x8c)),0x1;if(_0x4ed44b[_0x45bc24(0x1c7)]&&_0x4ed44b[_0x45bc24(0x212)])return console[_0x45bc24(0x112)](a31_0x46354d['red'](_0x45bc24(0x1d8))),console['error'](a31_0x46354d[_0x45bc24(0x1a5)](_0x45bc24(0x25c))),console[_0x45bc24(0x112)](a31_0x46354d[_0x45bc24(0x1a5)](_0x45bc24(0x16a)+PARENT_SEGMENT_DIR+_0x45bc24(0x138))),console[_0x45bc24(0x112)](a31_0x46354d['cyan'](_0x45bc24(0xac))),0x1;const _0x331289=_0x4ed44b['output']||a31_0x5d15cf['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x3cb0ca)+_0x45bc24(0xf4));_0x4ed44b[_0x45bc24(0x189)]&&(console[_0x45bc24(0x112)](_0x45bc24(0x6f)+_0x4ed44b[_0x45bc24(0x1aa)]),console[_0x45bc24(0x112)]('Parent\x20segment:\x20'+_0x3cb0ca),console[_0x45bc24(0x112)](_0x45bc24(0x1d1)+_0x331289));const _0x3ef199=await withSpinner(_0x45bc24(0x11e)+_0x3cb0ca+_0x45bc24(0x6c),()=>_0x43c300['segment']['pullParentYaml'](_0x3cb0ca),{'verbose':_0x4ed44b[_0x45bc24(0x189)]}),_0x189a44=_0x3ef199[_0x45bc24(0x134)];if(existsSync(_0x331289)){const _0x46cda7=readFileSync(_0x331289,_0x45bc24(0x261)),_0xa167fa=generateDiff(_0x46cda7,_0x189a44);if(!hasChanges(_0xa167fa))console[_0x45bc24(0x112)](a31_0x46354d[_0x45bc24(0x1c6)]('✔')+_0x45bc24(0x222)+a31_0x46354d['cyan'](_0x331289)+_0x45bc24(0xbf));else{console[_0x45bc24(0x112)]('\x0aChanges\x20to\x20\x27'+_0x331289+'\x27:'),console['error']('─'[_0x45bc24(0xf3)](0x3c)),console[_0x45bc24(0x112)](formatDiffWithColors(_0xa167fa)),console[_0x45bc24(0x112)]('─'['repeat'](0x3c));if(!_0x4ed44b[_0x45bc24(0x15c)]){if(!isInteractive())return console[_0x45bc24(0x112)](a31_0x46354d[_0x45bc24(0x175)](_0x45bc24(0x1b2)),_0x45bc24(0xa9)),console[_0x45bc24(0x112)](a31_0x46354d[_0x45bc24(0x1a5)](_0x45bc24(0x110))),0x1;const _0x3c8540=await confirmKey('Overwrite\x20\x27'+_0x331289+'\x27?');if(!_0x3c8540)return console[_0x45bc24(0x112)](a31_0x46354d[_0x45bc24(0x264)]('Aborted.')),0x1;}writeFileSync(_0x331289,_0x189a44,_0x45bc24(0x261)),console['error'](a31_0x46354d['green']('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x46354d['cyan'](_0x331289));}}else{const _0x197215=a31_0x5d15cf['dirname'](_0x331289);!existsSync(_0x197215)&&mkdirSync(_0x197215,{'recursive':!![]}),writeFileSync(_0x331289,_0x189a44,_0x45bc24(0x261)),console[_0x45bc24(0x112)](a31_0x46354d[_0x45bc24(0x1c6)]('✔')+_0x45bc24(0x1d6)+a31_0x46354d[_0x45bc24(0x15a)](_0x331289));}return saveSessionContext({'parent_segment':_0x3cb0ca},_0x4ed44b['session']),console[_0x45bc24(0x112)](a31_0x46354d[_0x45bc24(0x1c6)]('✔')+_0x45bc24(0x234)+a31_0x46354d['dim'](_0x45bc24(0x215))+_0x45bc24(0xa5)+a31_0x46354d[_0x45bc24(0x15a)](_0x3cb0ca)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x88);[a31_0x4a723d(0x9e)]='Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file';async[a31_0x4a723d(0x1bf)](_0x42e640){const _0x506a1e=a31_0x4a723d,{options:_0xd196d,args:_0xd7f253,tdx:_0x5793d9}=_0x42e640,_0x1e0c69=_0xd196d,_0x5de8ec=_0xd7f253[0x0]||_0xd196d['parentSegment'];if(!_0x5de8ec)return showParentSegmentNotSetError(_0x506a1e(0x166)+_0x506a1e(0x121)),0x1;const _0x13a4d7=resolveYamlFile(_0x5de8ec);if(!existsSync(_0x13a4d7))return showFileNotFoundError(_0x13a4d7,_0x5de8ec),0x1;_0x1e0c69[_0x506a1e(0x189)]&&(console[_0x506a1e(0x112)](_0x506a1e(0x6f)+_0x1e0c69['site']),console['error']('YAML\x20file:\x20'+_0x13a4d7));let _0x33e4c1;try{_0x33e4c1=readFileSync(_0x13a4d7,'utf-8');}catch(_0x4f2fd9){const _0x4a1159=_0x4f2fd9 instanceof Error?_0x4f2fd9[_0x506a1e(0x19e)]:String(_0x4f2fd9);return console[_0x506a1e(0x112)](_0x506a1e(0x177)+_0x4a1159),0x1;}const _0x499678=await withSpinner('Analyzing\x20changes...',()=>_0x5793d9[_0x506a1e(0x22b)][_0x506a1e(0x181)](_0x33e4c1),{'verbose':_0x1e0c69['verbose']}),_0x13356f=_0x499678[_0x506a1e(0x134)],{isNew:_0x3daa48,name:_0x6c6a65,hasChanges:_0x5ca07c,diffFormatted:_0x1fa1e2}=_0x13356f;if(!_0x5ca07c)return console[_0x506a1e(0x112)](_0x506a1e(0x1f8)+_0x6c6a65+'\x27\x20is\x20already\x20up\x20to\x20date'),0x0;_0x3daa48?console['error']('\x0aNew\x20parent\x20segment\x20\x27'+_0x6c6a65+'\x27:'):console['error'](_0x506a1e(0x270)+_0x6c6a65+'\x27:');console[_0x506a1e(0x112)]('─'[_0x506a1e(0xf3)](0x3c)),console[_0x506a1e(0x112)](_0x1fa1e2),console['error']('─'[_0x506a1e(0xf3)](0x3c));const _0x35ae00=_0x3daa48?_0x506a1e(0xa4)+_0x6c6a65+'\x27?':_0x506a1e(0x11c)+_0x6c6a65+'\x27?';if(!_0x1e0c69[_0x506a1e(0x15c)]){if(!isInteractive())return console['error'](a31_0x46354d[_0x506a1e(0x175)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x506a1e(0x112)](a31_0x46354d['dim'](_0x506a1e(0x110))),0x1;const _0x598e0c=await confirmKey(_0x35ae00);if(!_0x598e0c)return console['error'](a31_0x46354d[_0x506a1e(0x264)]('Aborted.')),0x1;}const _0x3f9735=_0x3daa48?_0x506a1e(0xe1):_0x506a1e(0x161),_0xbcbcf2=await withSpinner(_0x3f9735+_0x506a1e(0xfd)+_0x6c6a65+_0x506a1e(0x6c),()=>_0x13356f[_0x506a1e(0x1a1)](),{'verbose':_0x1e0c69[_0x506a1e(0x189)]}),_0x588f8d=_0xbcbcf2[_0x506a1e(0x134)],_0xd85860=getConsoleNextUrl(_0x1e0c69[_0x506a1e(0x1aa)],_0x506a1e(0x10a)+_0x588f8d['id']),_0x3ef58d=_0x3daa48?_0x506a1e(0x183):_0x506a1e(0xfe);return console[_0x506a1e(0x112)]('✔\x20'+_0x3ef58d+_0x506a1e(0xfd)+_0x588f8d['name']+'\x27'),console[_0x506a1e(0x112)]('\x20\x20'+_0xd85860),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{['name']='segment:parent:validate';['description']=a31_0x4a723d(0x13e);async[a31_0x4a723d(0x1bf)](_0x40993a){const _0x351808=a31_0x4a723d,{options:_0x1306f5,args:_0x70596d,tdx:_0x3317a3}=_0x40993a,_0x3937d6=_0x1306f5,_0x41f8c3=_0x70596d[0x0]||_0x1306f5[_0x351808(0xca)];if(!_0x41f8c3)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a'+'Options:\x0a'+_0x351808(0x103)+_0x351808(0x11f)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;const _0x25bdee=resolveYamlFile(_0x41f8c3);if(!existsSync(_0x25bdee))return showFileNotFoundError(_0x25bdee,_0x41f8c3),0x1;_0x3937d6['verbose']&&(console[_0x351808(0x112)]('Site:\x20'+_0x3937d6[_0x351808(0x1aa)]),console[_0x351808(0x112)](_0x351808(0x1d3)+_0x25bdee));let _0x58d8a3;try{_0x58d8a3=readFileSync(_0x25bdee,_0x351808(0x261));}catch(_0x1e1627){const _0x466e7a=_0x1e1627 instanceof Error?_0x1e1627[_0x351808(0x19e)]:String(_0x1e1627);return console[_0x351808(0x112)](_0x351808(0x177)+_0x466e7a),0x1;}const _0x4433f0=createCommandSpinner(a31_0x46354d['dim'](_0x351808(0x10e)),{'verbose':_0x3937d6[_0x351808(0x189)]});_0x4433f0[_0x351808(0x10d)]();const _0x5d2251={'onProgress':_0x350539=>{const _0x3e5489=_0x351808;_0x4433f0[_0x3e5489(0x13d)]=formatProgressMessage(_0x350539);}};if(_0x3937d6[_0x351808(0xef)])_0x5d2251[_0x351808(0xef)]=!![];if(_0x3937d6[_0x351808(0x250)])_0x5d2251[_0x351808(0x250)]=!![];_0x3937d6[_0x351808(0x98)]&&(_0x5d2251[_0x351808(0x98)]=_0x3937d6[_0x351808(0x98)]);_0x3937d6[_0x351808(0x131)]&&(_0x5d2251['behavior']=_0x3937d6['behavior']);if(_0x3937d6[_0x351808(0x23c)])_0x5d2251['interval']=_0x3937d6[_0x351808(0x23c)];let _0x1eb989;try{_0x1eb989=await _0x3317a3[_0x351808(0x22b)][_0x351808(0x23a)](_0x58d8a3,_0x5d2251),_0x4433f0[_0x351808(0x1c3)]();}catch(_0x3431bf){_0x4433f0[_0x351808(0x1c3)]();throw _0x3431bf;}const _0x4e8efb=_0x3937d6[_0x351808(0x23c)]||_0x351808(0x254);return this[_0x351808(0x9a)](_0x1eb989,_0x5d2251,_0x25bdee,_0x4e8efb),_0x1eb989[_0x351808(0x1dd)]?0x0:0x1;}[a31_0x4a723d(0x9a)](_0x5c768e,_0x50685a,_0x3c1e7f,_0x354973){const _0x4a3bd9=a31_0x4a723d;console[_0x4a3bd9(0x112)]('\x0a'+a31_0x46354d[_0x4a3bd9(0x249)](_0x4a3bd9(0xb1))+'\x20'+_0x5c768e[_0x4a3bd9(0xd3)]),console['error']('═'[_0x4a3bd9(0xf3)](0x3c)),this[_0x4a3bd9(0x246)](_0x5c768e);if(typeof _0x50685a[_0x4a3bd9(0x98)]===_0x4a3bd9(0x1b9)){this[_0x4a3bd9(0x25b)](_0x5c768e),this[_0x4a3bd9(0x15d)](_0x5c768e),this[_0x4a3bd9(0x133)](_0x3c1e7f,_0x354973,'attribute',_0x50685a[_0x4a3bd9(0x98)]);return;}if(_0x50685a[_0x4a3bd9(0x98)]===!![]){this['displayAttributesStats'](_0x5c768e),this[_0x4a3bd9(0x15d)](_0x5c768e),this[_0x4a3bd9(0x133)](_0x3c1e7f,_0x354973,_0x4a3bd9(0x22f));return;}if(typeof _0x50685a['behavior']===_0x4a3bd9(0x1b9)){this['displayBehaviorsStats'](_0x5c768e,_0x354973),this['displaySummary'](_0x5c768e),this['displayPreviewHints'](_0x3c1e7f,_0x354973,_0x4a3bd9(0x131),_0x50685a[_0x4a3bd9(0x131)]);return;}if(_0x50685a['behavior']===!![]){this[_0x4a3bd9(0x263)](_0x5c768e,_0x354973),this[_0x4a3bd9(0x15d)](_0x5c768e),this[_0x4a3bd9(0x133)](_0x3c1e7f,_0x354973,_0x4a3bd9(0x90));return;}this[_0x4a3bd9(0x25b)](_0x5c768e),this[_0x4a3bd9(0x263)](_0x5c768e,_0x354973),this[_0x4a3bd9(0x253)](_0x5c768e),this[_0x4a3bd9(0x15d)](_0x5c768e),this[_0x4a3bd9(0x133)](_0x3c1e7f,_0x354973,_0x4a3bd9(0x20f));}['displayRealtimeInfo'](_0x104a1c){displayRealtimeValidation(_0x104a1c);}[a31_0x4a723d(0x133)](_0x1871d2,_0x530081,_0x2bfa3b,_0x23219b){const _0x185f82=a31_0x4a723d;console[_0x185f82(0x112)]('\x0a'+a31_0x46354d['dim']('To\x20view\x20sample\x20data:'));const _0x4ede4a=_0x530081!==_0x185f82(0x254)?'\x20--interval\x20'+_0x530081:'';if(_0x2bfa3b==='attribute'&&_0x23219b)console['error']('\x20\x20'+a31_0x46354d['dim']('tdx\x20ps\x20preview\x20'+_0x1871d2+_0x185f82(0xdd)+_0x23219b+'\x22'+_0x4ede4a));else{if(_0x2bfa3b===_0x185f82(0x131)&&_0x23219b)console['error']('\x20\x20'+a31_0x46354d[_0x185f82(0x1a5)](_0x185f82(0x17d)+_0x1871d2+_0x185f82(0x1de)+_0x23219b+'\x22'+_0x4ede4a));else(_0x2bfa3b===_0x185f82(0x22f)||_0x2bfa3b==='all')&&console[_0x185f82(0x112)]('\x20\x20'+a31_0x46354d[_0x185f82(0x1a5)](_0x185f82(0x17d)+_0x1871d2+_0x185f82(0x1d9)+_0x4ede4a));}(_0x2bfa3b===_0x185f82(0x90)||_0x2bfa3b===_0x185f82(0x20f))&&console['error']('\x20\x20'+a31_0x46354d[_0x185f82(0x1a5)]('tdx\x20ps\x20preview\x20'+_0x1871d2+_0x185f82(0x72)+_0x4ede4a)),_0x2bfa3b===_0x185f82(0x20f)&&console[_0x185f82(0x112)]('\x20\x20'+a31_0x46354d['dim'](_0x185f82(0x17d)+_0x1871d2+'\x20--enriched'+_0x4ede4a));}[a31_0x4a723d(0x246)](_0x18faa6){const _0x54eafe=a31_0x4a723d,{master:_0x12169d}=_0x18faa6,_0x3eaa59=_0x12169d[_0x54eafe(0x1f5)]?a31_0x46354d[_0x54eafe(0x1c6)]('✔'):a31_0x46354d['red']('✘');console[_0x54eafe(0x112)]('\x0a'+a31_0x46354d[_0x54eafe(0x1a5)](_0x54eafe(0xe2))),console[_0x54eafe(0x112)](_0x3eaa59+'\x20'+a31_0x46354d[_0x54eafe(0x249)](_0x12169d[_0x54eafe(0xd5)]+'.'+_0x12169d['table'])),_0x12169d[_0x54eafe(0x1f5)]?_0x12169d[_0x54eafe(0x18d)]!==undefined&&console[_0x54eafe(0x112)]('\x20\x20'+a31_0x46354d[_0x54eafe(0x1a5)](_0x54eafe(0xcf))+'\x20'+a31_0x46354d[_0x54eafe(0x15a)](formatRows(_0x12169d[_0x54eafe(0x18d)]))):console[_0x54eafe(0x112)]('\x20\x20'+a31_0x46354d[_0x54eafe(0x175)](_0x54eafe(0x102))+'\x20'+_0x12169d[_0x54eafe(0xad)]);}[a31_0x4a723d(0x25b)](_0x5e8077){const _0x35f1b0=a31_0x4a723d;if(_0x5e8077[_0x35f1b0(0x22f)][_0x35f1b0(0x13f)]===0x0)return;console[_0x35f1b0(0x112)]('\x0a'+a31_0x46354d[_0x35f1b0(0x1a5)](_0x35f1b0(0x225)));for(const _0x12447f of _0x5e8077[_0x35f1b0(0x22f)]){const _0x1d5a23=_0x12447f['schemaValid']?a31_0x46354d[_0x35f1b0(0x1c6)]('✔'):a31_0x46354d['red']('✘');let _0x10d0fe='';if(_0x12447f[_0x35f1b0(0x1f5)]&&_0x12447f[_0x35f1b0(0x1bd)]!==undefined&&_0x12447f[_0x35f1b0(0x145)]!==undefined){const _0x2a3a91=_0x12447f[_0x35f1b0(0x145)][_0x35f1b0(0x185)](0x1),_0x320765=_0x12447f[_0x35f1b0(0x145)]>=0x50?a31_0x46354d['green']:_0x12447f[_0x35f1b0(0x145)]>=0x32?a31_0x46354d[_0x35f1b0(0x264)]:a31_0x46354d[_0x35f1b0(0x175)];_0x10d0fe='\x20'+a31_0x46354d[_0x35f1b0(0x1a5)]('Coverage:')+'\x20'+_0x320765(_0x2a3a91+'%')+'\x20('+formatRows(_0x12447f[_0x35f1b0(0x1bd)])+'\x20rows)';}console[_0x35f1b0(0x112)](_0x1d5a23+'\x20'+a31_0x46354d[_0x35f1b0(0x249)](_0x12447f['name'])+_0x10d0fe),console[_0x35f1b0(0x112)]('\x20\x20'+a31_0x46354d[_0x35f1b0(0x1a5)]('Source:')+'\x20'+a31_0x46354d[_0x35f1b0(0x249)](_0x12447f['database']+'.'+_0x12447f[_0x35f1b0(0x91)]));const _0x2cbb3a=_0x12447f[_0x35f1b0(0xed)]===_0x12447f[_0x35f1b0(0xbd)]?a31_0x46354d[_0x35f1b0(0x1a5)]('Join\x20on:')+'\x20'+_0x12447f[_0x35f1b0(0xed)]:a31_0x46354d['dim'](_0x35f1b0(0x193))+'\x20'+_0x12447f[_0x35f1b0(0xed)]+'\x20=\x20'+_0x12447f[_0x35f1b0(0xbd)];console['error']('\x20\x20'+_0x2cbb3a),console['error']('\x20\x20'+a31_0x46354d[_0x35f1b0(0x1a5)](_0x35f1b0(0x140))),this[_0x35f1b0(0x1c2)](_0x12447f[_0x35f1b0(0x118)]),!_0x12447f[_0x35f1b0(0x1f5)]&&console[_0x35f1b0(0x112)]('\x20\x20'+a31_0x46354d[_0x35f1b0(0x175)]('Error:')+'\x20'+_0x12447f['schemaError']);}}[a31_0x4a723d(0x263)](_0x38d462,_0x3e57fb){const _0x5a35b2=a31_0x4a723d;if(_0x38d462['behaviors'][_0x5a35b2(0x13f)]===0x0)return;console[_0x5a35b2(0x112)]('\x0a'+a31_0x46354d[_0x5a35b2(0x1a5)](_0x5a35b2(0x1bb))+'\x20'+a31_0x46354d['dim']('('+_0x3e57fb+')'));for(const _0x3131d8 of _0x38d462[_0x5a35b2(0x90)]){const _0x1de69d=_0x3131d8[_0x5a35b2(0x1f5)]?a31_0x46354d[_0x5a35b2(0x1c6)]('✔'):a31_0x46354d[_0x5a35b2(0x175)]('✘');let _0x59cd82='';if(_0x3131d8[_0x5a35b2(0x1f5)]&&_0x3131d8['customersWithEvents']!==undefined&&_0x3131d8[_0x5a35b2(0xf7)]!==undefined){const _0x14eae5=_0x3131d8[_0x5a35b2(0x1cd)]?.[_0x5a35b2(0x185)](0x1)||'?',_0x288268=(_0x3131d8['customerPercent']??0x0)>=0x32?a31_0x46354d[_0x5a35b2(0x1c6)]:(_0x3131d8[_0x5a35b2(0x1cd)]??0x0)>=0x14?a31_0x46354d[_0x5a35b2(0x264)]:a31_0x46354d[_0x5a35b2(0x175)];_0x59cd82='\x20'+a31_0x46354d[_0x5a35b2(0x1a5)](_0x5a35b2(0x1b3))+'\x20'+_0x288268(formatRows(_0x3131d8[_0x5a35b2(0x84)]))+'\x20('+_0x14eae5+_0x5a35b2(0xb6)+a31_0x46354d['dim'](_0x5a35b2(0x237))+'\x20'+a31_0x46354d[_0x5a35b2(0x15a)](formatRows(_0x3131d8[_0x5a35b2(0xf7)]));}console[_0x5a35b2(0x112)](_0x1de69d+'\x20'+a31_0x46354d[_0x5a35b2(0x249)](_0x3131d8[_0x5a35b2(0xd3)])+_0x59cd82),console[_0x5a35b2(0x112)]('\x20\x20'+a31_0x46354d['dim']('Source:')+'\x20'+a31_0x46354d[_0x5a35b2(0x249)](_0x3131d8['database']+'.'+_0x3131d8[_0x5a35b2(0x91)]));const _0x1bd400=_0x3131d8[_0x5a35b2(0xed)]===_0x3131d8[_0x5a35b2(0xbd)]?a31_0x46354d[_0x5a35b2(0x1a5)]('Join\x20on:')+'\x20'+_0x3131d8['joinKey']:a31_0x46354d[_0x5a35b2(0x1a5)](_0x5a35b2(0x193))+'\x20'+_0x3131d8[_0x5a35b2(0xed)]+_0x5a35b2(0xa5)+_0x3131d8['foreignKey'];console[_0x5a35b2(0x112)]('\x20\x20'+_0x1bd400),console[_0x5a35b2(0x112)]('\x20\x20'+a31_0x46354d[_0x5a35b2(0x1a5)]('Columns:')),this[_0x5a35b2(0x1c2)](_0x3131d8['columns']),!_0x3131d8[_0x5a35b2(0x1f5)]&&console[_0x5a35b2(0x112)]('\x20\x20'+a31_0x46354d[_0x5a35b2(0x175)](_0x5a35b2(0x102))+'\x20'+_0x3131d8[_0x5a35b2(0xad)]);}}[a31_0x4a723d(0x1c2)](_0x311798){const _0x498b8e=a31_0x4a723d;for(const _0x289568 of _0x311798){_0x289568[_0x498b8e(0x80)]===_0x289568[_0x498b8e(0x23f)]||_0x289568[_0x498b8e(0x23f)]==='*'?console[_0x498b8e(0x112)]('\x20\x20\x20\x20-\x20'+_0x289568[_0x498b8e(0x80)]):console[_0x498b8e(0x112)](_0x498b8e(0x20e)+_0x289568[_0x498b8e(0x80)]+'\x20'+a31_0x46354d[_0x498b8e(0x1a5)]('('+_0x289568['column']+')'));}}[a31_0x4a723d(0x15d)](_0x4b51fa){const _0x15542c=a31_0x4a723d;console[_0x15542c(0x112)]('─'[_0x15542c(0xf3)](0x3c));if(_0x4b51fa['errors'][_0x15542c(0x13f)]>0x0){console['error']('\x0a'+a31_0x46354d[_0x15542c(0x175)](_0x15542c(0x81)));for(const _0x57da3e of _0x4b51fa[_0x15542c(0x200)]){console[_0x15542c(0x112)]('\x20\x20'+a31_0x46354d[_0x15542c(0x175)]('•')+'\x20'+_0x57da3e);}}_0x4b51fa[_0x15542c(0x1dd)]&&console['error']('\x0a'+a31_0x46354d['green']('✔')+_0x15542c(0x20b));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x4a723d(0xd3)]='segment:parent:preview';[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x159);async[a31_0x4a723d(0x1bf)](_0x19b6e2){const _0x528943=a31_0x4a723d,{options:_0x5432bf,args:_0x4e07b2,tdx:_0x87147}=_0x19b6e2,_0x597936=_0x5432bf,_0xe9e6eb=_0x4e07b2[0x0]||_0x5432bf[_0x528943(0xca)];if(!_0xe9e6eb)return showParentSegmentNotSetError(_0x528943(0x1fe)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a'+'Options\x20(one\x20required):\x0a'+_0x528943(0x1db)+_0x528943(0x1b0)+'\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a'+'\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a'+_0x528943(0x1f0)),0x1;if(!_0x597936[_0x528943(0xef)]&&!_0x597936[_0x528943(0x98)]&&!_0x597936[_0x528943(0x131)]&&!_0x597936[_0x528943(0x250)])return console['error'](a31_0x46354d[_0x528943(0x175)](_0x528943(0x1ea))),console['error'](_0x528943(0x12e)),console[_0x528943(0x112)](_0x528943(0x21b)),console[_0x528943(0x112)](_0x528943(0x259)),console['error']('\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute'),console[_0x528943(0x112)](_0x528943(0x149)),console[_0x528943(0x112)](_0x528943(0x233)),0x1;const _0x5802fe=resolveYamlFile(_0xe9e6eb);if(!existsSync(_0x5802fe))return showFileNotFoundError(_0x5802fe,_0xe9e6eb),0x1;_0x597936['verbose']&&(console[_0x528943(0x112)](_0x528943(0x6f)+_0x597936[_0x528943(0x1aa)]),console[_0x528943(0x112)](_0x528943(0x1d3)+_0x5802fe));let _0x13a3c7;try{_0x13a3c7=readFileSync(_0x5802fe,'utf-8');}catch(_0xdb6d57){const _0x5585ea=_0xdb6d57 instanceof Error?_0xdb6d57[_0x528943(0x19e)]:String(_0xdb6d57);return console[_0x528943(0x112)]('Error\x20reading\x20file:\x20'+_0x5585ea),0x1;}let _0x37651a;try{_0x37651a=parseDef(_0x13a3c7);}catch(_0x3b46e9){const _0x3bdbee=_0x3b46e9 instanceof Error?_0x3b46e9['message']:String(_0x3b46e9);return console[_0x528943(0x112)](a31_0x46354d[_0x528943(0x175)](_0x528943(0x247)+_0x3bdbee)),0x1;}if(_0x597936[_0x528943(0x98)]===!![]||_0x597936[_0x528943(0x98)]===''){const _0x58b989=_0x37651a[_0x528943(0x22f)]?.[_0x528943(0xd7)](_0x325e24=>_0x325e24[_0x528943(0xd3)])||[];if(_0x58b989[_0x528943(0x13f)]===0x0)console['error'](a31_0x46354d[_0x528943(0x175)](_0x528943(0x12d)));else{console[_0x528943(0x112)](a31_0x46354d[_0x528943(0x175)]('Error:\x20--attribute\x20requires\x20a\x20name\x0a')),console[_0x528943(0x112)](_0x528943(0x124));for(const _0xf551a6 of _0x58b989){console[_0x528943(0x112)]('\x20\x20'+a31_0x46354d['cyan'](_0xf551a6));}console[_0x528943(0x112)](_0x528943(0x14a)+_0xe9e6eb+_0x528943(0xdd)+_0x58b989[0x0]+'\x22');}return 0x1;}if(_0x597936['behavior']===!![]||_0x597936[_0x528943(0x131)]===''){const _0x4d4e9e=_0x37651a[_0x528943(0x90)]?.['map'](_0x9f902a=>_0x9f902a[_0x528943(0xd3)])||[];if(_0x4d4e9e[_0x528943(0x13f)]===0x0)console[_0x528943(0x112)](a31_0x46354d[_0x528943(0x175)](_0x528943(0x15e)));else{console[_0x528943(0x112)](a31_0x46354d['red'](_0x528943(0x14c))),console[_0x528943(0x112)](_0x528943(0x184));for(const _0x5f6d1f of _0x4d4e9e){console[_0x528943(0x112)]('\x20\x20'+a31_0x46354d[_0x528943(0x15a)](_0x5f6d1f));}console[_0x528943(0x112)](_0x528943(0x14a)+_0xe9e6eb+_0x528943(0x1de)+_0x4d4e9e[0x0]+'\x22');}return 0x1;}const _0x586d19=createCommandSpinner(a31_0x46354d['dim'](_0x528943(0x94)),{'verbose':_0x597936[_0x528943(0x189)]});_0x586d19['start']();const _0x1e657d={'onProgress':_0xf1c176=>{const _0x402011=_0x528943;_0x586d19[_0x402011(0x13d)]=formatProgressMessage(_0xf1c176);}};if(_0x597936[_0x528943(0xef)])_0x1e657d[_0x528943(0xef)]=!![];if(_0x597936[_0x528943(0x98)]&&typeof _0x597936[_0x528943(0x98)]===_0x528943(0x1b9))_0x1e657d[_0x528943(0x98)]=_0x597936[_0x528943(0x98)];if(_0x597936[_0x528943(0x131)]&&typeof _0x597936[_0x528943(0x131)]===_0x528943(0x1b9))_0x1e657d[_0x528943(0x131)]=_0x597936[_0x528943(0x131)];if(_0x597936[_0x528943(0x250)])_0x1e657d[_0x528943(0x250)]=!![];if(_0x597936[_0x528943(0x23c)])_0x1e657d[_0x528943(0x23c)]=_0x597936['interval'];let _0x2af90f;try{_0x2af90f=await _0x87147['segment'][_0x528943(0x15f)](_0x13a3c7,_0x1e657d),_0x586d19['stop']();}catch(_0x430574){_0x586d19[_0x528943(0x1c3)]();throw _0x430574;}return await this['displayPreviewResults'](_0x2af90f,{'master':_0x597936[_0x528943(0xef)],'attribute':typeof _0x597936[_0x528943(0x98)]==='string'?_0x597936[_0x528943(0x98)]:undefined,'behavior':typeof _0x597936[_0x528943(0x131)]===_0x528943(0x1b9)?_0x597936['behavior']:undefined,'enriched':_0x597936[_0x528943(0x250)]}),_0x2af90f[_0x528943(0x1dd)]?0x0:0x1;}async[a31_0x4a723d(0xaa)](_0x10e653,_0x14f312){const _0x35e640=a31_0x4a723d;console['error']('\x0a'+a31_0x46354d[_0x35e640(0x249)](_0x35e640(0x77))+'\x20'+_0x10e653[_0x35e640(0xd3)]),console[_0x35e640(0x112)]('═'[_0x35e640(0xf3)](0x3c));if(_0x14f312['master']&&_0x10e653['sampleData']){const _0x4becf0=a31_0x46354d[_0x35e640(0x1a5)]('Master:')+'\x20'+a31_0x46354d[_0x35e640(0x249)](_0x10e653[_0x35e640(0xef)][_0x35e640(0xd5)]+'.'+_0x10e653['master'][_0x35e640(0x91)]);await this['displaySampleData'](_0x4becf0,_0x10e653[_0x35e640(0x101)]);}else{if(_0x14f312[_0x35e640(0x98)]&&_0x10e653[_0x35e640(0x101)]){const _0x475bff=a31_0x46354d[_0x35e640(0x1a5)](_0x35e640(0x173))+'\x20'+a31_0x46354d[_0x35e640(0x249)](_0x14f312[_0x35e640(0x98)]);await this[_0x35e640(0x113)](_0x475bff,_0x10e653[_0x35e640(0x101)]);}else{if(_0x14f312[_0x35e640(0x131)]&&_0x10e653['sampleData']){const _0x2e630c=a31_0x46354d[_0x35e640(0x1a5)]('Behavior:')+'\x20'+a31_0x46354d[_0x35e640(0x249)](_0x14f312[_0x35e640(0x131)]);await this[_0x35e640(0x113)](_0x2e630c,_0x10e653[_0x35e640(0x101)]);}else{if(_0x14f312['enriched']&&_0x10e653['sampleData']){const _0x40ea03=a31_0x46354d[_0x35e640(0x1a5)](_0x35e640(0x206))+'\x20'+a31_0x46354d[_0x35e640(0x249)](_0x35e640(0x1e8));await this[_0x35e640(0x113)](_0x40ea03,_0x10e653[_0x35e640(0x101)]);}else!_0x10e653[_0x35e640(0x101)]&&console[_0x35e640(0x112)](_0x35e640(0xc2));}}}if(_0x10e653[_0x35e640(0x200)][_0x35e640(0x13f)]>0x0){console[_0x35e640(0x112)]('─'[_0x35e640(0xf3)](0x3c)),console[_0x35e640(0x112)]('\x0a'+a31_0x46354d[_0x35e640(0x175)]('Errors:'));for(const _0x56dafb of _0x10e653[_0x35e640(0x200)]){console['error']('\x20\x20'+a31_0x46354d[_0x35e640(0x175)]('•')+'\x20'+_0x56dafb);}}}async[a31_0x4a723d(0x113)](_0x2065fe,_0x2aceed){const _0x506ce3=a31_0x4a723d;if(_0x2aceed[_0x506ce3(0x13f)]===0x0){console[_0x506ce3(0x112)]('\x0a'+_0x2065fe),console[_0x506ce3(0x112)](_0x506ce3(0x1a8));return;}console[_0x506ce3(0x112)]('\x0a'+_0x2065fe);const _0x5767e0=Object[_0x506ce3(0x151)](_0x2aceed[0x0])[_0x506ce3(0xd7)](_0x23e85a=>({'name':_0x23e85a,'type':typeof _0x2aceed[0x0][_0x23e85a]==='number'?'double':_0x506ce3(0x8b)})),_0x4de1be={'queryId':_0x506ce3(0x1a2),'columns':_0x5767e0,'data':_0x2aceed,'stats':{'state':_0x506ce3(0xdc),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x2aceed[_0x506ce3(0x13f)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x1191ee=formatAsTable(_0x4de1be,_0x2aceed[_0x506ce3(0x13f)],!![]);await writeOutput(_0x1191ee,undefined,_0x506ce3(0x91));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x74);['description']='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async[a31_0x4a723d(0x1bf)](_0x4ced03){const _0x55ce46=a31_0x4a723d,{options:_0x472c48,args:_0x5d8049,tdx:_0x9fa793}=_0x4ced03,_0x102aa4=_0x472c48,_0x4d2fde=_0x5d8049[0x0]||_0x472c48[_0x55ce46(0xca)];if(!_0x4d2fde)return showParentSegmentNotSetError(_0x55ce46(0x1af)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x33aaa8=resolveYamlFile(_0x4d2fde);if(existsSync(_0x33aaa8)){_0x102aa4[_0x55ce46(0x189)]&&console[_0x55ce46(0x112)]('Found\x20YAML\x20file:\x20'+_0x33aaa8);let _0x600bbb;try{_0x600bbb=readFileSync(_0x33aaa8,_0x55ce46(0x261));}catch(_0x45845e){const _0x3e295a=_0x45845e instanceof Error?_0x45845e[_0x55ce46(0x19e)]:String(_0x45845e);return console['error'](_0x55ce46(0x177)+_0x3e295a),0x1;}const _0x56fe0f=await withSpinner(_0x55ce46(0x82),()=>_0x9fa793[_0x55ce46(0x22b)][_0x55ce46(0x181)](_0x600bbb),{'verbose':_0x102aa4[_0x55ce46(0x189)]}),_0x26b348=_0x56fe0f[_0x55ce46(0x134)],{isNew:_0x3a12c5,name:_0xe90f2c,hasChanges:_0x3ca7ee,diffFormatted:_0x76a1cd}=_0x26b348;if(_0x3ca7ee){_0x3a12c5?console['error'](_0x55ce46(0x23e)+_0xe90f2c+'\x27:'):console[_0x55ce46(0x112)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0xe90f2c+'\x27:');console[_0x55ce46(0x112)]('─'[_0x55ce46(0xf3)](0x3c)),console['error'](_0x76a1cd),console[_0x55ce46(0x112)]('─'[_0x55ce46(0xf3)](0x3c));const _0x45096f=_0x3a12c5?_0x55ce46(0xa4)+_0xe90f2c+_0x55ce46(0x1c1):_0x55ce46(0x11c)+_0xe90f2c+_0x55ce46(0x1c1);if(!_0x102aa4['yes']){if(!isInteractive())return console[_0x55ce46(0x112)](a31_0x46354d[_0x55ce46(0x175)](_0x55ce46(0x1b2)),_0x55ce46(0xa9)),console['error'](a31_0x46354d['dim'](_0x55ce46(0x110))),0x1;const _0x3ba6ef=await confirmKey(_0x45096f);if(!_0x3ba6ef)return console[_0x55ce46(0x112)](a31_0x46354d[_0x55ce46(0x264)](_0x55ce46(0x7b))),0x1;}const _0x44d32a=_0x3a12c5?_0x55ce46(0xe1):_0x55ce46(0x161);await withSpinner(_0x44d32a+_0x55ce46(0xfd)+_0xe90f2c+_0x55ce46(0x6c),()=>_0x26b348[_0x55ce46(0x1a1)](),{'verbose':_0x102aa4[_0x55ce46(0x189)]});const _0x2359cc=_0x3a12c5?_0x55ce46(0x183):_0x55ce46(0xfe);console['error']('✔\x20'+_0x2359cc+'\x20parent\x20segment\x20\x27'+_0xe90f2c+'\x27');}else console['error']('✔\x20No\x20changes\x20-\x20\x27'+_0xe90f2c+_0x55ce46(0x176));}const _0x254bc2=await withSpinner(_0x55ce46(0x23b)+_0x4d2fde+'\x27...',()=>_0x9fa793[_0x55ce46(0x22b)]['runParent'](_0x4d2fde),{'verbose':_0x102aa4[_0x55ce46(0x189)]}),_0x3a9ce3=_0x254bc2['data'],_0x270e4f=getConsoleUrl(_0x102aa4[_0x55ce46(0x1aa)],_0x55ce46(0x106)+_0x3a9ce3[_0x55ce46(0x1ec)]+_0x55ce46(0x195)+_0x3a9ce3[_0x55ce46(0x7c)]+_0x55ce46(0x15b)+_0x3a9ce3[_0x55ce46(0x130)]);return console[_0x55ce46(0x112)](_0x55ce46(0x139)),console['error']('\x20\x20'+a31_0x46354d[_0x55ce46(0x1a5)](_0x55ce46(0x1b8))+'\x20'+_0x3a9ce3[_0x55ce46(0x198)]),console[_0x55ce46(0x112)]('\x20\x20'+a31_0x46354d[_0x55ce46(0x1a5)](_0x55ce46(0x1c5))+'\x20'+_0x3a9ce3[_0x55ce46(0xcb)]),console[_0x55ce46(0x112)]('\x20\x20'+a31_0x46354d[_0x55ce46(0x1a5)](_0x55ce46(0x24f))+'\x20'+_0x3a9ce3[_0x55ce46(0x7c)]),console[_0x55ce46(0x112)]('\x20\x20'+a31_0x46354d[_0x55ce46(0x1a5)](_0x55ce46(0x111))+'\x20'+_0x3a9ce3[_0x55ce46(0x130)]),console[_0x55ce46(0x112)]('\x20\x20'+_0x270e4f),console['error']('\x0a'+a31_0x46354d[_0x55ce46(0x1a5)](_0x55ce46(0x243))+'\x20tdx\x20wf\x20attempt\x20'+_0x3a9ce3['workflowAttemptId']+_0x55ce46(0x1e6)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x22a);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x1e3);async[a31_0x4a723d(0x1bf)](_0x1e846d){const _0x172bf6=a31_0x4a723d,{options:_0x32dc54,args:_0x2af1b6,tdx:_0x220ec3}=_0x1e846d,_0xbf0226=_0x2af1b6[0x0]||_0x32dc54[_0x172bf6(0xca)];if(!_0xbf0226)return showParentSegmentNotSetError(_0x172bf6(0x155)+_0x172bf6(0x13b)),0x1;_0x32dc54[_0x172bf6(0x189)]&&(console[_0x172bf6(0x112)](_0x172bf6(0x6f)+_0x32dc54[_0x172bf6(0x1aa)]),console['error'](_0x172bf6(0xec)+_0xbf0226));const _0x3f8089=await withSpinner(_0x172bf6(0xb8)+_0xbf0226+_0x172bf6(0x6c),()=>_0x220ec3['segment']['listFields'](_0xbf0226),{'verbose':_0x32dc54[_0x172bf6(0x189)]}),_0x2fa921=_0x3f8089[_0x172bf6(0x134)];console[_0x172bf6(0x112)]('✔\x20Found\x20'+_0x2fa921[_0x172bf6(0x13f)]+_0x172bf6(0x21d)+(_0x2fa921[_0x172bf6(0x13f)]!==0x1?'s':''));if(_0x32dc54[_0x172bf6(0xea)]||_0x32dc54[_0x172bf6(0x1d5)])return await handleSDKOutput(_0x2fa921,_0x32dc54),0x0;return displayFieldsHumanReadable(_0x2fa921,_0xbf0226),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x4a723d(0xd3)]='segment:parent:view';[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x150);async[a31_0x4a723d(0x1bf)](_0xe34012){const _0x1abda0=a31_0x4a723d,{options:_0x3ac3e8,args:_0x1531dd,tdx:_0x46a9c1}=_0xe34012,_0x461587=_0x3ac3e8,_0x38d4a6=_0x1531dd[0x0]||_0x3ac3e8[_0x1abda0(0xca)];if(!_0x38d4a6)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a'+_0x1abda0(0x1a6)+_0x1abda0(0x79)+_0x1abda0(0x171)),0x1;_0x3ac3e8['verbose']&&(console[_0x1abda0(0x112)](_0x1abda0(0x6f)+_0x3ac3e8[_0x1abda0(0x1aa)]),console[_0x1abda0(0x112)](_0x1abda0(0xec)+_0x38d4a6));const _0x4a63be=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x38d4a6+_0x1abda0(0x6c),()=>_0x46a9c1['segment'][_0x1abda0(0x162)](_0x38d4a6),{'verbose':_0x3ac3e8[_0x1abda0(0x189)]}),_0x311c12=_0x4a63be[_0x1abda0(0x134)];if(_0x461587[_0x1abda0(0x1c4)]){const _0x31d731=getConsoleNextUrl(_0x461587[_0x1abda0(0x1aa)],'/app/dw/parentSegments/'+_0x311c12['id']);return console[_0x1abda0(0x112)](a31_0x46354d[_0x1abda0(0x1c6)]('✔')+'\x20Opening\x20'+a31_0x46354d[_0x1abda0(0x15a)](_0x31d731)),openBrowser(_0x31d731),0x0;}return await handleSingleObjectOutput(_0x311c12,_0x3ac3e8),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x4a723d(0xd3)]='segment:parent:desc';[a31_0x4a723d(0x9e)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async['execute'](_0x5d368f){const _0x5b3bb1=a31_0x4a723d,{options:_0x4cba86,args:_0xe336b,tdx:_0x52dd01}=_0x5d368f,_0x589557=_0x4cba86,_0x42912a=_0xe336b[0x0]||_0x4cba86[_0x5b3bb1(0xca)];if(!_0x42912a)return showParentSegmentNotSetError(_0x5b3bb1(0x239)+'\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'+_0x5b3bb1(0x79)+_0x5b3bb1(0xc4)),0x1;_0x4cba86[_0x5b3bb1(0x189)]&&(console[_0x5b3bb1(0x112)](_0x5b3bb1(0x6f)+_0x4cba86['site']),console[_0x5b3bb1(0x112)](_0x5b3bb1(0xec)+_0x42912a));const _0x5cc5d1=await withSpinner(_0x5b3bb1(0x16e)+_0x42912a+_0x5b3bb1(0x6c),()=>_0x52dd01[_0x5b3bb1(0x22b)][_0x5b3bb1(0x117)](_0x42912a),{'verbose':_0x4cba86['verbose']}),_0x190d4d=_0x5cc5d1['data'],_0x462e0f=_0x52dd01[_0x5b3bb1(0x22b)]['getOutputDatabaseName'](_0x190d4d);if(_0x589557[_0x5b3bb1(0x212)]){const _0x30d52c=await this[_0x5b3bb1(0x143)](_0x5d368f,_0x42912a,_0x190d4d,_0x462e0f),_0x1b4933=this[_0x5b3bb1(0x1f2)](_0x30d52c);writeFileSync(_0x589557[_0x5b3bb1(0x212)],_0x1b4933);const _0x99bd10=_0x30d52c[_0x5b3bb1(0x236)][_0x5b3bb1(0x118)][_0x5b3bb1(0x13f)]+_0x30d52c[_0x5b3bb1(0x90)][_0x5b3bb1(0x1ad)]((_0x22d2f4,_0x1c0c60)=>_0x22d2f4+_0x1c0c60[_0x5b3bb1(0x118)][_0x5b3bb1(0x13f)],0x0),_0x580674=_0x30d52c[_0x5b3bb1(0x90)][_0x5b3bb1(0x169)](_0x2dbede=>_0x2dbede['columns'][_0x5b3bb1(0x13f)]===0x0)['length'];return console[_0x5b3bb1(0x69)](_0x5b3bb1(0xb2)+_0x589557[_0x5b3bb1(0x212)]),console[_0x5b3bb1(0x69)](_0x5b3bb1(0x125)+_0x462e0f),console[_0x5b3bb1(0x69)](_0x5b3bb1(0xc1)+_0x30d52c[_0x5b3bb1(0x90)]['length']+'\x20behaviors'),console['log']('\x20\x20Columns:\x20'+_0x99bd10+_0x5b3bb1(0xe8)),_0x580674>0x0&&console['log'](_0x5b3bb1(0x21f)+_0x580674+_0x5b3bb1(0x244)),0x0;}console['error']('\x0a'+a31_0x46354d[_0x5b3bb1(0x249)](_0x5b3bb1(0x1ca))+'\x20'+a31_0x46354d[_0x5b3bb1(0x15a)](_0x462e0f));const _0xc6f265=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x52dd01['segment']['getParentSQL'](_0x190d4d),{'verbose':_0x4cba86['verbose']});console[_0x5b3bb1(0x112)]('\x0a'+a31_0x46354d['bold'](_0x5b3bb1(0x236))+'\x20'+a31_0x46354d[_0x5b3bb1(0x1a5)]('('+_0x462e0f+'.customers)'));const _0xb8beef=await executeSchemaQuery(_0xc6f265[_0x5b3bb1(0x134)],_0x52dd01,_0x4cba86);await handleQueryOutput(_0xb8beef,_0x4cba86);const _0xe0edfd=await withSpinner(_0x5b3bb1(0x188),()=>_0x52dd01[_0x5b3bb1(0x22b)][_0x5b3bb1(0x272)](_0x190d4d),{'verbose':_0x4cba86['verbose']});for(const _0x5d8257 of _0xe0edfd['data']){const _0x478f48=_0x5b3bb1(0x235)+_0x5d8257['toLowerCase']()[_0x5b3bb1(0x92)](/\s+/g,'_'),_0x31f4ed='SELECT\x20*\x20FROM\x20'+_0x462e0f+'.'+_0x478f48;console[_0x5b3bb1(0x112)]('\x0a'+a31_0x46354d[_0x5b3bb1(0x249)](_0x5d8257)+'\x20'+a31_0x46354d[_0x5b3bb1(0x1a5)]('('+_0x462e0f+'.'+_0x478f48+')'));try{const _0x3ebce8=await executeSchemaQuery(_0x31f4ed,_0x52dd01,_0x4cba86);await handleQueryOutput(_0x3ebce8,_0x4cba86);}catch{console[_0x5b3bb1(0x112)](a31_0x46354d[_0x5b3bb1(0x264)](_0x5b3bb1(0x95)));}}return 0x0;}async[a31_0x4a723d(0x143)](_0x37a66a,_0x2cfc0e,_0x5987e2,_0x2c353d){const _0x251d9c=a31_0x4a723d,{options:_0x2cb3ab,tdx:_0x1e44ea}=_0x37a66a,_0x855268=await withSpinner(_0x251d9c(0x25f),()=>_0x1e44ea[_0x251d9c(0x22b)][_0x251d9c(0x1e2)](_0x5987e2),{'verbose':_0x2cb3ab[_0x251d9c(0x189)]}),_0x3fadb8=await executeSchemaQuery(_0x855268[_0x251d9c(0x134)],_0x1e44ea,_0x2cb3ab),_0x22893d=_0x3fadb8[_0x251d9c(0x134)][_0x251d9c(0xd7)](_0x20bb86=>({'name':_0x20bb86['column_name'],'type':_0x20bb86[_0x251d9c(0x17b)]})),_0x520261=await withSpinner(_0x251d9c(0x188),()=>_0x1e44ea['segment'][_0x251d9c(0x272)](_0x5987e2),{'verbose':_0x2cb3ab[_0x251d9c(0x189)]}),_0x3c4cfb=[];for(const _0x21d2e0 of _0x520261['data']){const _0x560ed6=_0x251d9c(0x235)+_0x21d2e0[_0x251d9c(0xe5)]()[_0x251d9c(0x92)](/\s+/g,'_'),_0x2bd173='SELECT\x20*\x20FROM\x20'+_0x2c353d+'.'+_0x560ed6;let _0x4b2afd=[];try{const _0x4cb9a0=await executeSchemaQuery(_0x2bd173,_0x1e44ea,_0x2cb3ab);_0x4b2afd=_0x4cb9a0['data']['map'](_0x4c0e7b=>({'name':_0x4c0e7b['column_name'],'type':_0x4c0e7b[_0x251d9c(0x17b)]}));}catch{}_0x3c4cfb[_0x251d9c(0x167)]({'table':_0x560ed6,'columns':_0x4b2afd});}return{'database':_0x2c353d,'parent_segment':_0x2cfc0e,'parent_id':_0x5987e2,'customers':{'table':'customers','columns':_0x22893d},'behaviors':_0x3c4cfb};}[a31_0x4a723d(0x1f2)](_0x55106a){const _0x7bf23e=a31_0x4a723d,_0x20c144=_0xdc5092=>{const _0x1e7fba=a31_0x93c7;if(_0xdc5092['length']===0x0)return'[]';const _0x503beb=_0xdc5092['map'](_0x2e362e=>_0x1e7fba(0x262)+_0x2e362e[_0x1e7fba(0xd3)]+'\x22,\x20\x22type\x22:\x20\x22'+_0x2e362e[_0x1e7fba(0xa6)]+_0x1e7fba(0x8d));return'[\x0a'+_0x503beb[_0x1e7fba(0x108)](',\x0a')+_0x1e7fba(0xbe);},_0x3a4967=_0x55106a[_0x7bf23e(0x90)][_0x7bf23e(0xd7)](_0x1bed65=>{const _0x5b7bcd=_0x7bf23e;return _0x5b7bcd(0x18b)+_0x1bed65[_0x5b7bcd(0x91)]+_0x5b7bcd(0xd1)+_0x20c144(_0x1bed65[_0x5b7bcd(0x118)])[_0x5b7bcd(0x92)](/^/gm,'\x20\x20')[_0x5b7bcd(0x266)]()+_0x5b7bcd(0x1b7);})[_0x7bf23e(0x108)](',\x0a');return _0x7bf23e(0x224)+_0x55106a[_0x7bf23e(0xd5)]+_0x7bf23e(0x19d)+_0x55106a['parent_segment']+_0x7bf23e(0xa8)+_0x55106a[_0x7bf23e(0xfa)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x55106a['customers'][_0x7bf23e(0x91)]+_0x7bf23e(0x207)+_0x20c144(_0x55106a['customers'][_0x7bf23e(0x118)])[_0x7bf23e(0x92)](/^/gm,'\x20\x20')[_0x7bf23e(0x266)]()+_0x7bf23e(0x230)+_0x3a4967+_0x7bf23e(0x1ce);}}export class ParentSegmentSQLCommand extends BaseCommand{['name']=a31_0x4a723d(0x16d);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0xd0);async[a31_0x4a723d(0x1bf)](_0x29d46d){const _0x5b26fa=a31_0x4a723d,{options:_0x2109b3,args:_0x16c19c,tdx:_0x4f61cd}=_0x29d46d,_0x1934ca=_0x16c19c[0x0]||_0x2109b3[_0x5b26fa(0xca)];if(!_0x1934ca)return showParentSegmentNotSetError(_0x5b26fa(0x160)+'\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;_0x2109b3[_0x5b26fa(0x189)]&&(console[_0x5b26fa(0x112)]('Site:\x20'+_0x2109b3[_0x5b26fa(0x1aa)]),console[_0x5b26fa(0x112)](_0x5b26fa(0xec)+_0x1934ca));const _0x1d012a=await withSpinner(_0x5b26fa(0x16e)+_0x1934ca+'\x27...',()=>_0x4f61cd[_0x5b26fa(0x22b)][_0x5b26fa(0x117)](_0x1934ca),{'verbose':_0x2109b3[_0x5b26fa(0x189)]}),_0x36934d=_0x1d012a[_0x5b26fa(0x134)],_0x1f23b1=await withSpinner(_0x5b26fa(0x252)+_0x1934ca+_0x5b26fa(0x6c),()=>_0x4f61cd[_0x5b26fa(0x22b)]['getParentSQL'](_0x36934d),{'verbose':_0x2109b3[_0x5b26fa(0x189)]}),_0x552838=_0x1f23b1[_0x5b26fa(0x134)];return _0x2109b3[_0x5b26fa(0x6b)]===_0x5b26fa(0xea)||_0x2109b3[_0x5b26fa(0x6b)]===_0x5b26fa(0x1d5)?await handleSDKOutput([{'sql':_0x552838}],_0x2109b3):console[_0x5b26fa(0x69)](_0x552838),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x1ba);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x232);async[a31_0x4a723d(0x1bf)](_0xf2570d){const _0x5020c9=a31_0x4a723d,{options:_0x1cfa89,args:_0x26a881,tdx:_0x59c3f0}=_0xf2570d,_0x500792=_0x26a881[0x0]||_0x1cfa89[_0x5020c9(0xca)];if(!_0x500792)return showParentSegmentNotSetError(_0x5020c9(0xb9)+_0x5020c9(0x1f4)),0x1;_0x1cfa89['verbose']&&(console['error'](_0x5020c9(0x6f)+_0x1cfa89[_0x5020c9(0x1aa)]),console[_0x5020c9(0x112)](_0x5020c9(0xec)+_0x500792));const _0x369ac5=await withSpinner(_0x5020c9(0x16e)+_0x500792+_0x5020c9(0x6c),()=>_0x59c3f0[_0x5020c9(0x22b)][_0x5020c9(0x117)](_0x500792),{'verbose':_0x1cfa89['verbose']}),_0x19712d=_0x369ac5[_0x5020c9(0x134)],_0x2921f9=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x500792+_0x5020c9(0x6c),()=>_0x59c3f0['segment'][_0x5020c9(0x1e2)](_0x19712d),{'verbose':_0x1cfa89[_0x5020c9(0x189)]});let _0x28010e=_0x2921f9['data'];const _0x449e46=resolveLimit(_0x1cfa89['limit'],DEFAULT_DISPLAY_LIMIT),_0x39a04d=/\bLIMIT\s+\d+/i['test'](_0x28010e);!_0x39a04d&&(_0x28010e=_0x28010e['trim']()['replace'](/;+$/,''),_0x28010e=_0x5020c9(0x174)+_0x28010e+_0x5020c9(0x7f)+_0x449e46);_0x1cfa89[_0x5020c9(0x189)]&&console[_0x5020c9(0x112)](_0x5020c9(0x1d7)+_0x28010e);const _0x59ddbf=await withProgressSpinner('Executing\x20parent\x20segment\x20query...',async _0x1efea7=>{const _0x6d8928=_0x5020c9,_0x47d399=await _0x59c3f0[_0x6d8928(0x273)][_0x6d8928(0x1bf)](_0x28010e,{'catalog':'td','schema':_0x6d8928(0x12f),'onJobId':_0x7b5b61=>{const _0x58703d=_0x6d8928;_0x1efea7[_0x58703d(0xd9)](_0x7b5b61);}});return _0x47d399;},{'verbose':_0x1cfa89[_0x5020c9(0x189)]}),_0x1e67e6=_0x59ddbf[_0x5020c9(0x134)],_0xeb1bbf=_0x1e67e6[_0x5020c9(0xde)]?_0x5020c9(0x257)+_0x1e67e6['jobId']+']':'';return console[_0x5020c9(0x112)]('✔\x20Query\x20completed:\x20Processed\x20'+_0x1e67e6[_0x5020c9(0x18a)][_0x5020c9(0x170)]['toLocaleString']()+_0x5020c9(0xd2)+(_0x5020c9(0x226)+formatElapsed(_0x1e67e6['stats']['elapsedTimeMillis'])+_0xeb1bbf)),await handleQueryOutput(_0x1e67e6,_0x1cfa89),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x4a723d(0xd3)]='ps:rt:list';['description']='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a31_0x4a723d(0x1bf)](_0x5e3844){const _0x220368=a31_0x4a723d,{options:_0x3380af,args:_0x2aa23f,tdx:_0x23d013}=_0x5e3844,_0x18bb43=_0x2aa23f[0x0],_0x123927=await withSpinner(_0x18bb43?_0x220368(0x1ee)+_0x18bb43+'\x27...':_0x220368(0x75),()=>_0x23d013[_0x220368(0xee)][_0x220368(0x7e)](),{'verbose':_0x3380af[_0x220368(0x189)]});let _0x955838=_0x123927[_0x220368(0x134)][_0x220368(0x169)](_0x5cfbae=>_0x5cfbae[_0x220368(0xa0)]);if(_0x18bb43){const _0x4e7927=_0x18bb43['replace'](/[.+^${}()|[\]\\]/g,_0x220368(0x114))['replace'](/\*/g,'.*')['replace'](/\?/g,'.'),_0xb3a0bb=new RegExp('^'+_0x4e7927+'$','i');_0x955838=_0x955838['filter'](_0x27ebaf=>_0xb3a0bb[_0x220368(0x123)](_0x27ebaf['name']));}_0x955838[_0x220368(0x7d)]((_0x1a0789,_0x502495)=>_0x1a0789[_0x220368(0xd3)][_0x220368(0x204)](_0x502495[_0x220368(0xd3)])),console[_0x220368(0x112)]('✔\x20Found\x20'+_0x955838[_0x220368(0x13f)]+_0x220368(0x19f)+(_0x955838[_0x220368(0x13f)]!==0x1?'s':''));const _0x53ed8b=_0x51ec99=>{return getConsoleNextUrl(_0x3380af['site'],'/app/dw/parentSegments/'+_0x51ec99);};if(_0x3380af[_0x220368(0x6b)]==='json'||_0x3380af[_0x220368(0x6b)]===_0x220368(0x1d5)){const _0x28393e=_0x955838['map'](_0x24a1ef=>({..._0x24a1ef,'url':_0x53ed8b(_0x24a1ef['id'])}));await handleSDKOutput(_0x28393e,_0x3380af);}else{if(_0x955838[_0x220368(0x13f)]===0x0)console[_0x220368(0x69)]('No\x20RT-enabled\x20parent\x20segments\x20found');else for(const _0x26cffb of _0x955838){const _0xda68b6=_0x26cffb[_0x220368(0x1fb)]?a31_0x46354d['dim']('\x20('+formatRows(_0x26cffb[_0x220368(0x1fb)])+')'):'',_0x1f355a=hyperlink(_0x26cffb[_0x220368(0xd3)],_0x53ed8b(_0x26cffb['id']));console[_0x220368(0x69)]('⚡\x20'+_0x1f355a+_0xda68b6);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']=a31_0x4a723d(0xc0);[a31_0x4a723d(0x9e)]='Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML';async['execute'](_0x5eadca){const _0x4b49e0=a31_0x4a723d,{options:_0x1463e8,args:_0x41bf7f,tdx:_0x1e63ba}=_0x5eadca,_0x25d727=_0x41bf7f[0x0]||_0x1463e8[_0x4b49e0(0xca)];if(!_0x25d727)return showParentSegmentNotSetError(_0x4b49e0(0x96)+_0x4b49e0(0x25e)),0x1;const _0x502ad7=resolveYamlFile(_0x25d727);if(!existsSync(_0x502ad7))return showFileNotFoundError(_0x502ad7,_0x25d727),0x1;let _0x5f4951;try{_0x5f4951=readFileSync(_0x502ad7,_0x4b49e0(0x261));}catch(_0x5d254b){const _0x55af00=_0x5d254b instanceof Error?_0x5d254b[_0x4b49e0(0x19e)]:String(_0x5d254b);return console[_0x4b49e0(0x112)]('Error\x20reading\x20file:\x20'+_0x55af00),0x1;}const _0x33d67e=createCommandSpinner(a31_0x46354d[_0x4b49e0(0x1a5)](_0x4b49e0(0x210)),{'verbose':_0x1463e8[_0x4b49e0(0x189)]});_0x33d67e['start']();const _0x4ad36d={'realtime':!![],'onProgress':_0x4ca15b=>{const _0x3fd6af=_0x4b49e0;_0x33d67e[_0x3fd6af(0x13d)]=formatProgressMessage(_0x4ca15b);}};let _0x375b0b;try{_0x375b0b=await _0x1e63ba[_0x4b49e0(0x22b)][_0x4b49e0(0x23a)](_0x5f4951,_0x4ad36d),_0x33d67e[_0x4b49e0(0x1c3)]();}catch(_0x14ccd1){_0x33d67e[_0x4b49e0(0x1c3)]();throw _0x14ccd1;}console[_0x4b49e0(0x112)]('\x0a'+a31_0x46354d[_0x4b49e0(0x249)](_0x4b49e0(0xfc))+'\x20'+_0x375b0b[_0x4b49e0(0xd3)]),console[_0x4b49e0(0x112)]('═'[_0x4b49e0(0xf3)](0x3c)),displayRealtimeValidation(_0x375b0b),console[_0x4b49e0(0x112)]('─'[_0x4b49e0(0xf3)](0x3c));if(_0x375b0b[_0x4b49e0(0x200)][_0x4b49e0(0x13f)]>0x0){console[_0x4b49e0(0x112)]('\x0a'+a31_0x46354d[_0x4b49e0(0x175)](_0x4b49e0(0x81)));for(const _0x27a25d of _0x375b0b['errors']){console[_0x4b49e0(0x112)]('\x20\x20'+a31_0x46354d[_0x4b49e0(0x175)]('•')+'\x20'+_0x27a25d);}}return _0x375b0b[_0x4b49e0(0x1dd)]&&console[_0x4b49e0(0x112)]('\x0a'+a31_0x46354d['green']('✔')+_0x4b49e0(0x153)),_0x375b0b['allValid']?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0x4a723d(0x24d);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x119);async[a31_0x4a723d(0x1bf)](_0x5934e0){const _0x9a0b1b=a31_0x4a723d,{options:_0x3bc577,args:_0xf77a94,tdx:_0x31dd0d}=_0x5934e0,_0x4d8167=_0xf77a94[0x0]||_0x3bc577[_0x9a0b1b(0xca)];if(!_0x4d8167)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'+'\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;_0x3bc577[_0x9a0b1b(0x189)]&&(console[_0x9a0b1b(0x112)]('Site:\x20'+_0x3bc577[_0x9a0b1b(0x1aa)]),console['error']('Parent\x20segment:\x20'+_0x4d8167));const _0x56db08=await withSpinner(_0x9a0b1b(0x16e)+_0x4d8167+_0x9a0b1b(0x6c),()=>_0x31dd0d[_0x9a0b1b(0x22b)]['resolveParentId'](_0x4d8167),{'verbose':_0x3bc577[_0x9a0b1b(0x189)]}),_0x1314a2=_0x56db08[_0x9a0b1b(0x134)],_0x5747d7=await withSpinner(_0x9a0b1b(0x136)+_0x4d8167+_0x9a0b1b(0x6c),()=>_0x31dd0d[_0x9a0b1b(0xee)]['listJourneys'](_0x1314a2),{'verbose':_0x3bc577[_0x9a0b1b(0x189)]}),_0xff340c=_0x5747d7[_0x9a0b1b(0x134)];console['error'](_0x9a0b1b(0xc5)+_0xff340c['length']+_0x9a0b1b(0xce)+(_0xff340c[_0x9a0b1b(0x13f)]!==0x1?'s':''));if(_0x3bc577[_0x9a0b1b(0x6b)]===_0x9a0b1b(0xea)||_0x3bc577[_0x9a0b1b(0x6b)]===_0x9a0b1b(0x1d5))await handleSDKOutput(_0xff340c,_0x3bc577);else{if(_0xff340c[_0x9a0b1b(0x13f)]===0x0)console[_0x9a0b1b(0x69)](_0x9a0b1b(0x157));else for(const _0x39c7f5 of _0xff340c){const _0x4e69e0=_0x39c7f5['state']===_0x9a0b1b(0x227)?'🚀':'📝',_0x260955=_0x39c7f5[_0x9a0b1b(0xa1)]?a31_0x46354d[_0x9a0b1b(0x264)](_0x9a0b1b(0x202)):'',_0x3dc7af=a31_0x46354d['dim']('\x20('+_0x39c7f5[_0x9a0b1b(0x217)]+_0x9a0b1b(0x1cc)+(_0x39c7f5[_0x9a0b1b(0x217)]!==0x1?'s':'')+')');console[_0x9a0b1b(0x69)](_0x4e69e0+'\x20'+_0x39c7f5['name']+_0x260955+_0x3dc7af);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x9b);['description']='Pause\x20activations\x20in\x20an\x20RT\x20journey';async[a31_0x4a723d(0x1bf)](_0xfd49ef){const _0x52d068=a31_0x4a723d,{options:_0x4885b3,args:_0x1477b2,tdx:_0x4c2583}=_0xfd49ef,_0x214dd6=_0x1477b2[0x0];if(!_0x214dd6)return console['error'](a31_0x46354d[_0x52d068(0x175)](_0x52d068(0x274))),console[_0x52d068(0x112)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console['error'](a31_0x46354d[_0x52d068(0x1a5)](_0x52d068(0x248))),0x1;_0x4885b3['verbose']&&(console[_0x52d068(0x112)]('Site:\x20'+_0x4885b3[_0x52d068(0x1aa)]),console[_0x52d068(0x112)](_0x52d068(0x11a)+_0x214dd6));const _0x24ee48=await withSpinner('Pausing\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x214dd6+'\x27...',()=>_0x4c2583['realtime']['pauseJourney'](_0x214dd6),{'verbose':_0x4885b3['verbose']}),_0x4039f9=_0x24ee48['data'];console[_0x52d068(0x112)](_0x52d068(0x11b)+_0x4039f9[_0x52d068(0xd3)]+'\x27');if(_0x4885b3['format']===_0x52d068(0xea)||_0x4885b3['format']===_0x52d068(0x1d5))await handleSDKOutput([_0x4039f9],_0x4885b3);else{const _0x3460ff=_0x4039f9['state']===_0x52d068(0x227)?'🚀':'📝',_0x342ade=_0x4039f9[_0x52d068(0xa1)]?a31_0x46354d['yellow'](_0x52d068(0x202)):'';console[_0x52d068(0x69)](_0x3460ff+'\x20'+_0x4039f9['name']+_0x342ade);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{['name']='ps:rt:jn:resume';[a31_0x4a723d(0x9e)]=a31_0x4a723d(0xa3);async[a31_0x4a723d(0x1bf)](_0x3f7fe5){const _0xa5caea=a31_0x4a723d,{options:_0x37a65b,args:_0x23b064,tdx:_0x4b0190}=_0x3f7fe5,_0x1a8c21=_0x23b064[0x0];if(!_0x1a8c21)return console['error'](a31_0x46354d[_0xa5caea(0x175)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0xa5caea(0x112)](_0xa5caea(0x1fd)),console[_0xa5caea(0x112)](a31_0x46354d[_0xa5caea(0x1a5)](_0xa5caea(0x248))),0x1;_0x37a65b[_0xa5caea(0x189)]&&(console['error'](_0xa5caea(0x6f)+_0x37a65b[_0xa5caea(0x1aa)]),console['error'](_0xa5caea(0x11a)+_0x1a8c21));const _0x159012=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x1a8c21+_0xa5caea(0x6c),()=>_0x4b0190[_0xa5caea(0xee)][_0xa5caea(0xf5)](_0x1a8c21),{'verbose':_0x37a65b[_0xa5caea(0x189)]}),_0x299a7b=_0x159012[_0xa5caea(0x134)];console[_0xa5caea(0x112)](_0xa5caea(0x12c)+_0x299a7b[_0xa5caea(0xd3)]+'\x27');if(_0x37a65b['format']===_0xa5caea(0xea)||_0x37a65b[_0xa5caea(0x6b)]===_0xa5caea(0x1d5))await handleSDKOutput([_0x299a7b],_0x37a65b);else{const _0x1abaa0=_0x299a7b['state']===_0xa5caea(0x227)?'🚀':'📝',_0x2704c5=_0x299a7b['paused']?a31_0x46354d[_0xa5caea(0x264)](_0xa5caea(0x202)):'';console[_0xa5caea(0x69)](_0x1abaa0+'\x20'+_0x299a7b[_0xa5caea(0xd3)]+_0x2704c5);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x4a723d(0xd3)]='ps:rt:configuration_versions';['description']=a31_0x4a723d(0x17e);async[a31_0x4a723d(0x1bf)](_0xb0b344){const _0xcef5e2=a31_0x4a723d,{options:_0x5e99d4,args:_0x1988e5,tdx:_0x11f4b3}=_0xb0b344,_0x51949b=_0x1988e5[0x0]||_0x5e99d4[_0xcef5e2(0xca)];if(!_0x51949b)return showParentSegmentNotSetError(_0xcef5e2(0xb0)+'\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;_0x5e99d4[_0xcef5e2(0x189)]&&(console[_0xcef5e2(0x112)](_0xcef5e2(0x6f)+_0x5e99d4['site']),console[_0xcef5e2(0x112)](_0xcef5e2(0xec)+_0x51949b));const _0x344ef1=await withSpinner(_0xcef5e2(0x16e)+_0x51949b+_0xcef5e2(0x6c),()=>_0x11f4b3['segment']['resolveParentId'](_0x51949b),{'verbose':_0x5e99d4[_0xcef5e2(0x189)]}),_0x467fea=_0x344ef1[_0xcef5e2(0x134)],_0x273ece=await withSpinner(_0xcef5e2(0x1c8)+_0x51949b+_0xcef5e2(0x6c),()=>_0x11f4b3[_0xcef5e2(0xee)]['getCurrentConfigVersion'](_0x467fea),{'verbose':_0x5e99d4[_0xcef5e2(0x189)]}),_0x4b39a9=_0x273ece['data'];return console['error']('✔\x20Retrieved\x20RT\x20configuration\x20version'),_0x5e99d4[_0xcef5e2(0x6b)]==='json'||_0x5e99d4[_0xcef5e2(0x6b)]===_0xcef5e2(0x1d5)?await handleSDKOutput([_0x4b39a9],_0x5e99d4):(console[_0xcef5e2(0x69)](_0xcef5e2(0x16f)+_0x4b39a9['id']),console[_0xcef5e2(0x69)](_0xcef5e2(0x220)+_0x4b39a9['audienceId']),console[_0xcef5e2(0x69)](_0xcef5e2(0x8a)+_0x4b39a9[_0xcef5e2(0x70)]),console[_0xcef5e2(0x69)](_0xcef5e2(0x97)+_0x4b39a9['eventKind']),console[_0xcef5e2(0x69)]('status:\x20'+_0x4b39a9[_0xcef5e2(0xcb)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x1e1);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x251);async[a31_0x4a723d(0x1bf)](_0x227c5f){const _0x1c426e=a31_0x4a723d,{options:_0x2ffeb4,args:_0x1d9fc7,tdx:_0x12e281}=_0x227c5f,_0x5bb048=_0x1d9fc7[0x0]||_0x2ffeb4[_0x1c426e(0xca)];if(!_0x5bb048)return showParentSegmentNotSetError(_0x1c426e(0x11d)+_0x1c426e(0x1b5)),0x1;const _0x23a503=await withSpinner(_0x1c426e(0x16e)+_0x5bb048+_0x1c426e(0x6c),()=>_0x12e281[_0x1c426e(0x22b)]['resolveParentId'](_0x5bb048),{'verbose':_0x2ffeb4[_0x1c426e(0x189)]}),_0x49c54a=_0x23a503[_0x1c426e(0x134)],_0x24b780=await withSpinner(_0x1c426e(0x1fa)+_0x5bb048+_0x1c426e(0x6c),()=>_0x12e281[_0x1c426e(0x1bc)][_0x1c426e(0x7e)](_0x49c54a),{'verbose':_0x2ffeb4[_0x1c426e(0x189)]}),_0x503e9c=_0x24b780[_0x1c426e(0x134)];console[_0x1c426e(0x112)](_0x1c426e(0xc5)+_0x503e9c[_0x1c426e(0x13f)]+_0x1c426e(0x68)+(_0x503e9c[_0x1c426e(0x13f)]!==0x1?'s':''));if(_0x2ffeb4[_0x1c426e(0x6b)]===_0x1c426e(0xea)||_0x2ffeb4[_0x1c426e(0x6b)]===_0x1c426e(0x1d5))await handleSDKOutput(_0x503e9c,_0x2ffeb4);else{if(_0x503e9c['length']===0x0)console[_0x1c426e(0x69)](_0x1c426e(0x19c)),console[_0x1c426e(0x112)](a31_0x46354d[_0x1c426e(0x15a)](_0x1c426e(0x115)));else for(const _0x3a23f3 of _0x503e9c){console[_0x1c426e(0x69)](a31_0x46354d[_0x1c426e(0x249)](_0x3a23f3[_0x1c426e(0xd3)])+'\x20'+a31_0x46354d[_0x1c426e(0x1a5)](_0x1c426e(0xe0)+_0x3a23f3['id']+')'));_0x3a23f3[_0x1c426e(0x9e)]&&console[_0x1c426e(0x69)]('\x20\x20'+a31_0x46354d[_0x1c426e(0x1a5)](_0x3a23f3['description']));if(_0x3a23f3[_0x1c426e(0x13a)]&&_0x3a23f3[_0x1c426e(0x13a)][_0x1c426e(0x13f)]>0x0)for(const _0x21d828 of _0x3a23f3[_0x1c426e(0x13a)]){const _0x4d3d85=_0x21d828[_0x1c426e(0x24c)]?.[_0x1c426e(0x13f)]?_0x21d828[_0x1c426e(0x24c)][_0x1c426e(0x108)](',\x20'):'any';console[_0x1c426e(0x69)]('\x20\x20'+a31_0x46354d[_0x1c426e(0x15a)](_0x1c426e(0x141))+'\x20'+_0x21d828[_0x1c426e(0xd3)]+'\x20'+a31_0x46354d[_0x1c426e(0x1a5)](_0x1c426e(0xe0)+_0x21d828['id']+')')),console['log'](_0x1c426e(0x147)+a31_0x46354d[_0x1c426e(0x1a5)]('allowed\x20IPs:')+'\x20'+_0x4d3d85);}else console[_0x1c426e(0x69)]('\x20\x20'+a31_0x46354d[_0x1c426e(0x1a5)](_0x1c426e(0x156)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']=a31_0x4a723d(0x83);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x242);async[a31_0x4a723d(0x1bf)](_0xd8b347){const _0x239b1f=a31_0x4a723d,{options:_0x1136e1,args:_0x2fed28,tdx:_0x1a9d3e}=_0xd8b347,_0x1bdd29=_0x1136e1,_0x154bea=_0x2fed28[0x0],_0xa8a8bf=_0x2fed28[0x1]||_0x1136e1[_0x239b1f(0xca)];if(!_0x154bea)return console[_0x239b1f(0x112)]('Error:\x20Service\x20name\x20is\x20required'),console[_0x239b1f(0x112)](_0x239b1f(0x1da)),console[_0x239b1f(0x112)](_0x239b1f(0x1ff)),0x1;if(!_0xa8a8bf)return showParentSegmentNotSetError(_0x239b1f(0xe7)+_0x239b1f(0x1ff)),0x1;const _0x5a0d6e=await withSpinner(_0x239b1f(0x16e)+_0xa8a8bf+_0x239b1f(0x6c),()=>_0x1a9d3e[_0x239b1f(0x22b)][_0x239b1f(0x117)](_0xa8a8bf),{'verbose':_0x1136e1['verbose']}),_0x439f7a=_0x5a0d6e['data'],_0x2b6b7e={'name':_0x154bea,'description':_0x1bdd29[_0x239b1f(0x9e)],'public':_0x1bdd29[_0x239b1f(0x16b)]},_0x4f6057=await withSpinner(_0x239b1f(0x1ed)+_0x154bea+_0x239b1f(0x6c),()=>_0x1a9d3e[_0x239b1f(0x1bc)][_0x239b1f(0xf9)](_0x439f7a,_0x2b6b7e),{'verbose':_0x1136e1['verbose']}),_0x2e68cf=_0x4f6057[_0x239b1f(0x134)];return console[_0x239b1f(0x112)](_0x239b1f(0x126)+_0x2e68cf[_0x239b1f(0xd3)]+'\x27\x20with\x20ID:\x20'+_0x2e68cf['id']),await handleSDKOutput([_0x2e68cf],_0x1136e1),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x6d);['description']=a31_0x4a723d(0xba);async[a31_0x4a723d(0x1bf)](_0x65663e){const _0x509b41=a31_0x4a723d,{options:_0x5bcc80,args:_0x23d2c4,tdx:_0x39cd28}=_0x65663e,_0x59a82a=_0x23d2c4[0x0],_0x49a1dd=_0x23d2c4[0x1]||_0x5bcc80[_0x509b41(0xca)];if(!_0x59a82a)return console['error'](_0x509b41(0x18e)),console[_0x509b41(0x112)](_0x509b41(0xc7)),console[_0x509b41(0x112)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x49a1dd)return showParentSegmentNotSetError(_0x509b41(0x129)+_0x509b41(0x24a)),0x1;const _0x5effce=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x49a1dd+_0x509b41(0x6c),()=>_0x39cd28[_0x509b41(0x22b)]['resolveParentId'](_0x49a1dd),{'verbose':_0x5bcc80[_0x509b41(0x189)]}),_0x203d3d=_0x5effce[_0x509b41(0x134)],_0xb952be=await withSpinner(_0x509b41(0x192)+_0x59a82a+_0x509b41(0x6c),()=>_0x39cd28[_0x509b41(0x1bc)][_0x509b41(0x21a)](_0x203d3d,_0x59a82a),{'verbose':_0x5bcc80[_0x509b41(0x189)]}),_0x41fc8f=_0xb952be[_0x509b41(0x134)];if(_0x5bcc80[_0x509b41(0xea)]||_0x5bcc80[_0x509b41(0x1d5)])await handleSDKOutput([_0x41fc8f],_0x5bcc80);else{console[_0x509b41(0x69)](a31_0x46354d[_0x509b41(0x249)](_0x41fc8f[_0x509b41(0xd3)])+'\x20'+a31_0x46354d[_0x509b41(0x1a5)]('(id:\x20'+_0x41fc8f['id']+')'));_0x41fc8f[_0x509b41(0x9e)]&&console[_0x509b41(0x69)]('\x20\x20'+a31_0x46354d[_0x509b41(0x1a5)](_0x41fc8f[_0x509b41(0x9e)]));console['log']('\x20\x20'+a31_0x46354d[_0x509b41(0x15a)](_0x509b41(0xe3))+'\x20'+(_0x41fc8f['public']?_0x509b41(0x15c):'no'));if(_0x41fc8f[_0x509b41(0x13a)]&&_0x41fc8f[_0x509b41(0x13a)]['length']>0x0)for(const _0x53fef7 of _0x41fc8f['tokens']){const _0x576229=_0x53fef7[_0x509b41(0x24c)]?.[_0x509b41(0x13f)]?_0x53fef7[_0x509b41(0x24c)][_0x509b41(0x108)](',\x20'):'any';console[_0x509b41(0x69)]('\x20\x20'+a31_0x46354d[_0x509b41(0x15a)](_0x509b41(0x141))+'\x20'+_0x53fef7[_0x509b41(0xd3)]+'\x20'+a31_0x46354d[_0x509b41(0x1a5)](_0x509b41(0xe0)+_0x53fef7['id']+')')),console[_0x509b41(0x69)](_0x509b41(0x147)+a31_0x46354d[_0x509b41(0x1a5)](_0x509b41(0x172))+'\x20'+_0x576229);}else console[_0x509b41(0x69)]('\x20\x20'+a31_0x46354d[_0x509b41(0x1a5)](_0x509b41(0x156)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x4a723d(0xd3)]='ps:pz:service:delete';['description']=a31_0x4a723d(0x20c);async['execute'](_0x36cc66){const _0x2856a4=a31_0x4a723d,{options:_0xcf1fb8,args:_0x5a6668,tdx:_0xab2bb5}=_0x36cc66,_0x4c02c2=_0x5a6668[0x0],_0x349cb0=_0x5a6668[0x1]||_0xcf1fb8['parentSegment'];if(!_0x4c02c2)return console['error'](_0x2856a4(0x18e)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]'),console[_0x2856a4(0x112)](_0x2856a4(0x163)),0x1;if(!_0x349cb0)return showParentSegmentNotSetError(_0x2856a4(0xf6)+_0x2856a4(0x163)),0x1;const _0x58218f=await withSpinner(_0x2856a4(0x16e)+_0x349cb0+_0x2856a4(0x6c),()=>_0xab2bb5[_0x2856a4(0x22b)][_0x2856a4(0x117)](_0x349cb0),{'verbose':_0xcf1fb8[_0x2856a4(0x189)]}),_0x2d55d9=_0x58218f[_0x2856a4(0x134)];return await withSpinner(_0x2856a4(0x8e)+_0x4c02c2+_0x2856a4(0x6c),()=>_0xab2bb5[_0x2856a4(0x1bc)][_0x2856a4(0x1ef)](_0x2d55d9,_0x4c02c2),{'verbose':_0xcf1fb8['verbose']}),console['error'](_0x2856a4(0x196)+_0x4c02c2+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0xab);['description']='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async['execute'](_0xf30e8){const _0x29e473=a31_0x4a723d,{options:_0xa3ac4b,args:_0x352a6a,tdx:_0x14a5f5}=_0xf30e8,_0x14eef3=_0xa3ac4b,_0x1b0a6c=_0x352a6a[0x0],_0x1178a5=_0x352a6a[0x1]||_0xa3ac4b[_0x29e473(0xca)];if(!_0x1b0a6c)return console[_0x29e473(0x112)](_0x29e473(0x18e)),console[_0x29e473(0x112)](_0x29e473(0x6e)),console[_0x29e473(0x112)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x14eef3['name'])return console[_0x29e473(0x112)]('Error:\x20--name\x20is\x20required'),console['error'](_0x29e473(0x6e)),0x1;if(!_0x1178a5)return showParentSegmentNotSetError(_0x29e473(0x87)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x3d5541=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1178a5+'\x27...',()=>_0x14a5f5[_0x29e473(0x22b)][_0x29e473(0x117)](_0x1178a5),{'verbose':_0xa3ac4b['verbose']}),_0xc17ea1=_0x3d5541[_0x29e473(0x134)],_0x55ffc2={'name':_0x14eef3['name']};_0x14eef3[_0x29e473(0x9e)]!==undefined&&(_0x55ffc2[_0x29e473(0x9e)]=_0x14eef3[_0x29e473(0x9e)]);const _0x2c9745=await withSpinner(_0x29e473(0x22d)+_0x1b0a6c+'\x27...',()=>_0x14a5f5['personalization'][_0x29e473(0xda)](_0xc17ea1,_0x1b0a6c,_0x55ffc2),{'verbose':_0xa3ac4b[_0x29e473(0x189)]}),_0x5c8eec=_0x2c9745['data'];return console[_0x29e473(0x112)](_0x29e473(0xeb)+_0x5c8eec[_0x29e473(0xd3)]+'\x27'),await handleSDKOutput([_0x5c8eec],_0xa3ac4b),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x122);['description']=a31_0x4a723d(0x73);async[a31_0x4a723d(0x1bf)](_0x1e8133){const _0x3090cc=a31_0x4a723d,{options:_0x56de2c,args:_0x2abbff,tdx:_0x11de8e}=_0x1e8133,_0x3d8f13=_0x56de2c,_0xb69f1c=_0x2abbff[0x0],_0x5ea6b9=_0x2abbff[0x1],_0x541054=_0x2abbff[0x2]||_0x56de2c[_0x3090cc(0xca)];if(!_0xb69f1c)return console['error'](_0x3090cc(0x180)),console[_0x3090cc(0x112)](_0x3090cc(0x231)),console[_0x3090cc(0x112)](_0x3090cc(0x10b)),0x1;if(!_0x5ea6b9)return console['error']('Error:\x20Service\x20ID\x20is\x20required'),console['error'](_0x3090cc(0x231)),console['error'](_0x3090cc(0x10b)),0x1;if(!_0x541054)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a'+_0x3090cc(0x10b)),0x1;const _0x5a9990=await withSpinner(_0x3090cc(0x16e)+_0x541054+_0x3090cc(0x6c),()=>_0x11de8e[_0x3090cc(0x22b)][_0x3090cc(0x117)](_0x541054),{'verbose':_0x56de2c[_0x3090cc(0x189)]}),_0x43015a=_0x5a9990['data'],_0x48cbfc={'name':_0xb69f1c};_0x3d8f13[_0x3090cc(0x24c)]&&(_0x48cbfc[_0x3090cc(0x24c)]=_0x3d8f13['allowedIps'][_0x3090cc(0x17c)](',')[_0x3090cc(0xd7)](_0x1fa94b=>_0x1fa94b[_0x3090cc(0x266)]()));_0x3d8f13['description']&&(_0x48cbfc[_0x3090cc(0x9e)]=_0x3d8f13[_0x3090cc(0x9e)]);const _0x2ddfe4=await withSpinner(_0x3090cc(0x223)+_0xb69f1c+_0x3090cc(0x71)+_0x5ea6b9+_0x3090cc(0x6c),()=>_0x11de8e[_0x3090cc(0x1bc)][_0x3090cc(0x1a7)](_0x43015a,_0x5ea6b9,_0x48cbfc),{'verbose':_0x56de2c[_0x3090cc(0x189)]}),_0x3bf5be=_0x2ddfe4[_0x3090cc(0x134)];return console['error'](_0x3090cc(0x1d4)+_0x3bf5be[_0x3090cc(0xd3)]+'\x27\x20with\x20ID:\x20'+_0x3bf5be['id']),_0x3bf5be[_0x3090cc(0x1c9)]&&(console[_0x3090cc(0x112)](a31_0x46354d[_0x3090cc(0x264)](_0x3090cc(0x1f7))),console['error'](a31_0x46354d[_0x3090cc(0x15a)](_0x3bf5be[_0x3090cc(0x1c9)])),console['error']('')),await handleSDKOutput([_0x3bf5be],_0x56de2c),0x0;}}function a31_0x93c7(_0x33b8ab,_0x4b9fd5){_0x33b8ab=_0x33b8ab-0x66;const _0x57740f=a31_0x5774();let _0x93c71f=_0x57740f[_0x33b8ab];return _0x93c71f;}export class PSPzServiceTokenDeleteCommand extends BaseCommand{['name']=a31_0x4a723d(0xa7);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x245);async['execute'](_0x52aef9){const _0x4077aa=a31_0x4a723d,{options:_0xe78221,args:_0x487c2d,tdx:_0x3b02d9}=_0x52aef9,_0x49ce43=_0x487c2d[0x0],_0x148ecc=_0x487c2d[0x1]||_0xe78221['parentSegment'];if(!_0x49ce43)return console[_0x4077aa(0x112)](_0x4077aa(0x186)),console[_0x4077aa(0x112)](_0x4077aa(0x8f)),console[_0x4077aa(0x112)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x148ecc)return showParentSegmentNotSetError(_0x4077aa(0x213)+_0x4077aa(0x1be)),0x1;const _0x5c3795=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x148ecc+_0x4077aa(0x6c),()=>_0x3b02d9[_0x4077aa(0x22b)][_0x4077aa(0x117)](_0x148ecc),{'verbose':_0xe78221[_0x4077aa(0x189)]}),_0x1eaead=_0x5c3795[_0x4077aa(0x134)],_0x238c8a=await withSpinner(_0x4077aa(0x219),()=>_0x3b02d9['personalization']['list'](_0x1eaead),{'verbose':_0xe78221[_0x4077aa(0x189)]}),_0x48bf9b=_0x238c8a[_0x4077aa(0x134)];let _0x3c1964;for(const _0xe98845 of _0x48bf9b){if(_0xe98845[_0x4077aa(0x13a)]?.[_0x4077aa(0x1a3)](_0x63590e=>_0x63590e['id']===_0x49ce43)){_0x3c1964=_0xe98845['id'];break;}}if(!_0x3c1964)return console[_0x4077aa(0x112)](_0x4077aa(0xd8)+_0x49ce43+_0x4077aa(0x146)),0x1;const _0x1c750b=await withSpinner(_0x4077aa(0x22c)+_0x49ce43+_0x4077aa(0x6c),()=>_0x3b02d9[_0x4077aa(0x1bc)][_0x4077aa(0x148)](_0x1eaead,_0x3c1964,_0x49ce43),{'verbose':_0xe78221[_0x4077aa(0x189)]}),_0x4e0392=_0x1c750b['data'];return console[_0x4077aa(0x112)]('✔\x20Deleted\x20token\x20\x27'+(_0x4e0392[_0x4077aa(0xd3)]||_0x49ce43)+'\x27'),await handleSDKOutput([_0x4e0392],_0xe78221),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x240);[a31_0x4a723d(0x9e)]='List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment';async[a31_0x4a723d(0x1bf)](_0xda73ea){const _0x47e12f=a31_0x4a723d,{options:_0x30a875,args:_0x392911,tdx:_0x1fbd28}=_0xda73ea,_0x51c899=_0x392911[0x0]||_0x30a875[_0x47e12f(0xca)];if(!_0x51c899)return showParentSegmentNotSetError(_0x47e12f(0x201)+_0x47e12f(0x1a9)),0x1;const _0x1e7cb1=await withSpinner(_0x47e12f(0x16e)+_0x51c899+'\x27...',()=>_0x1fbd28['segment']['resolveParentId'](_0x51c899),{'verbose':_0x30a875[_0x47e12f(0x189)]}),_0x2ecd0f=_0x1e7cb1[_0x47e12f(0x134)],_0x5d16ec=await withSpinner('Listing\x20personalizations\x20for\x20\x27'+_0x51c899+_0x47e12f(0x6c),()=>_0x1fbd28['personalization'][_0x47e12f(0xd6)](_0x2ecd0f),{'verbose':_0x30a875[_0x47e12f(0x189)]}),_0x46d205=_0x5d16ec[_0x47e12f(0x134)];console[_0x47e12f(0x112)](_0x47e12f(0xc5)+_0x46d205[_0x47e12f(0x13f)]+_0x47e12f(0x1a4)+(_0x46d205[_0x47e12f(0x13f)]!==0x1?'s':''));if(_0x30a875[_0x47e12f(0x6b)]===_0x47e12f(0xea)||_0x30a875[_0x47e12f(0x6b)]===_0x47e12f(0x1d5))await handleSDKOutput(_0x46d205,_0x30a875);else{if(_0x46d205[_0x47e12f(0x13f)]===0x0)console['log'](_0x47e12f(0x132));else for(const _0x27b851 of _0x46d205){console[_0x47e12f(0x69)](a31_0x46354d[_0x47e12f(0x249)](_0x27b851['name'])+'\x20'+a31_0x46354d[_0x47e12f(0x1a5)](_0x47e12f(0xe0)+_0x27b851['id']+')'));_0x27b851['description']&&console[_0x47e12f(0x69)]('\x20\x20'+a31_0x46354d[_0x47e12f(0x1a5)](_0x27b851[_0x47e12f(0x9e)]));const _0x279891=_0x27b851[_0x47e12f(0xdf)]?.['length']||0x0;console[_0x47e12f(0x69)]('\x20\x20'+a31_0x46354d['cyan'](_0x47e12f(0x23d))+'\x20'+_0x279891);if(_0x27b851[_0x47e12f(0xdf)]&&_0x27b851['sections']['length']>0x0)for(const _0x249f7d of _0x27b851['sections']){console[_0x47e12f(0x69)]('\x20\x20\x20\x20-\x20'+_0x249f7d['name']);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{['name']=a31_0x4a723d(0xbb);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x211);async[a31_0x4a723d(0x1bf)](_0x13a276){const _0x59a7ed=a31_0x4a723d,{options:_0x499b7b,args:_0x13b294,tdx:_0x2263c4}=_0x13a276,_0x343f2d=_0x13b294[0x0];if(!_0x343f2d)return console[_0x59a7ed(0x112)](_0x59a7ed(0x86)),console[_0x59a7ed(0x112)](_0x59a7ed(0x10c)),0x1;const _0x1695d9=await withSpinner(_0x59a7ed(0x260)+_0x343f2d+_0x59a7ed(0x6c),()=>_0x2263c4[_0x59a7ed(0x1bc)][_0x59a7ed(0x1ab)](_0x343f2d),{'verbose':_0x499b7b['verbose']}),_0x2e7e89=_0x1695d9[_0x59a7ed(0x134)];console[_0x59a7ed(0x112)](_0x59a7ed(0x78)+_0x2e7e89['name']+'\x27');if(_0x499b7b[_0x59a7ed(0x6b)]==='json'||_0x499b7b[_0x59a7ed(0x6b)]==='jsonl')await handleSDKOutput([_0x2e7e89],_0x499b7b);else{console[_0x59a7ed(0x69)](a31_0x46354d[_0x59a7ed(0x249)](_0x2e7e89[_0x59a7ed(0xd3)])+'\x20'+a31_0x46354d[_0x59a7ed(0x1a5)](_0x59a7ed(0xe0)+_0x2e7e89['id']+')'));_0x2e7e89[_0x59a7ed(0x9e)]&&console[_0x59a7ed(0x69)]('\x20\x20'+a31_0x46354d[_0x59a7ed(0x1a5)](_0x2e7e89[_0x59a7ed(0x9e)]));_0x2e7e89['audienceId']&&console[_0x59a7ed(0x69)]('\x20\x20'+a31_0x46354d[_0x59a7ed(0x15a)]('audienceId:')+'\x20'+_0x2e7e89[_0x59a7ed(0x198)]);console['log']('\x20\x20'+a31_0x46354d[_0x59a7ed(0x15a)]('created:')+'\x20'+_0x2e7e89['createdAt']),console['log']('\x20\x20'+a31_0x46354d['cyan'](_0x59a7ed(0x26c))+'\x20'+_0x2e7e89[_0x59a7ed(0xae)]);const _0x3546ff=_0x2e7e89[_0x59a7ed(0xdf)]?.[_0x59a7ed(0x13f)]||0x0;console[_0x59a7ed(0x69)]('\x20\x20'+a31_0x46354d[_0x59a7ed(0x15a)](_0x59a7ed(0x23d))+'\x20'+_0x3546ff);if(_0x2e7e89[_0x59a7ed(0xdf)]&&_0x2e7e89[_0x59a7ed(0xdf)][_0x59a7ed(0x13f)]>0x0)for(const _0x3b83e3 of _0x2e7e89[_0x59a7ed(0xdf)]){console[_0x59a7ed(0x69)]('\x20\x20\x20\x20'+a31_0x46354d[_0x59a7ed(0x249)](_0x3b83e3[_0x59a7ed(0xd3)])+'\x20'+a31_0x46354d[_0x59a7ed(0x1a5)](_0x59a7ed(0xe0)+_0x3b83e3['id']+')')),_0x3b83e3[_0x59a7ed(0xf8)]&&(console[_0x59a7ed(0x69)](_0x59a7ed(0x182)+a31_0x46354d[_0x59a7ed(0x15a)](_0x59a7ed(0x194))+'\x20'+_0x3b83e3[_0x59a7ed(0xf8)]['name']),_0x3b83e3[_0x59a7ed(0xf8)][_0x59a7ed(0x9c)]?.['keyEventId']&&console['log']('\x20\x20\x20\x20\x20\x20\x20\x20'+a31_0x46354d[_0x59a7ed(0x15a)](_0x59a7ed(0x93))+'\x20'+_0x3b83e3[_0x59a7ed(0xf8)]['keyEventCriteria']['keyEventId'])),_0x3b83e3[_0x59a7ed(0x1eb)]&&console['log'](_0x59a7ed(0x182)+a31_0x46354d[_0x59a7ed(0x15a)](_0x59a7ed(0xdb))+'\x20'+JSON[_0x59a7ed(0x1d0)](_0x3b83e3[_0x59a7ed(0x1eb)])),_0x3b83e3[_0x59a7ed(0x14d)]&&console[_0x59a7ed(0x69)](_0x59a7ed(0x182)+a31_0x46354d[_0x59a7ed(0x15a)](_0x59a7ed(0x1ac))+'\x20true');}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x258);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x128);async[a31_0x4a723d(0x1bf)](_0x1db56b){const _0x54d29b=a31_0x4a723d,{options:_0x51aa82,args:_0x333e54,tdx:_0x29d821}=_0x1db56b,_0x6314f2=_0x333e54[0x0];if(!_0x6314f2)return console[_0x54d29b(0x112)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x54d29b(0x112)](_0x54d29b(0xbc)),0x1;return await withSpinner(_0x54d29b(0x190)+_0x6314f2+'\x27...',()=>_0x29d821[_0x54d29b(0x1bc)][_0x54d29b(0x9d)](_0x6314f2),{'verbose':_0x51aa82['verbose']}),console['error'](_0x54d29b(0x1cf)+_0x6314f2+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x4a723d(0xd3)]=a31_0x4a723d(0x1dc);['description']=a31_0x4a723d(0x1f6);async[a31_0x4a723d(0x1bf)](_0x2babd0){const _0x199727=a31_0x4a723d,{options:_0x1f4552,tdx:_0x1b764f}=_0x2babd0,_0x117e1c=_0x1f4552;let _0x51dbd9;if(_0x117e1c[_0x199727(0x26a)]){_0x51dbd9=await loadJSON(_0x117e1c[_0x199727(0x26a)],!![]);if(!_0x51dbd9['relationships']?.[_0x199727(0x203)])return console[_0x199727(0x112)](_0x199727(0x1cb)),console[_0x199727(0x112)](_0x199727(0x187)),console[_0x199727(0x112)](_0x199727(0x144)),0x1;}else{if(!_0x117e1c[_0x199727(0xd3)])return console[_0x199727(0x112)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console['error'](_0x199727(0x165)),console['error'](_0x199727(0x21e)),0x1;if(_0x117e1c['description']===undefined)return console[_0x199727(0x112)](_0x199727(0x100)),console[_0x199727(0x112)](_0x199727(0x165)),console[_0x199727(0x112)](_0x199727(0x21e)),0x1;if(_0x117e1c[_0x199727(0x26f)]===undefined)return console[_0x199727(0x112)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console[_0x199727(0x112)]('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x5af3d3=_0x117e1c[_0x199727(0x198)];if(!_0x5af3d3&&_0x1f4552['parentSegment']){const _0x437526=await withSpinner(_0x199727(0x16e)+_0x1f4552['parentSegment']+'\x27...',()=>_0x1b764f[_0x199727(0x22b)][_0x199727(0x117)](_0x1f4552[_0x199727(0xca)]),{'verbose':_0x1f4552[_0x199727(0x189)]});_0x5af3d3=_0x437526['data'];}let _0xffffe6;_0x117e1c['sections']&&(_0xffffe6=await loadJSON(_0x117e1c[_0x199727(0xdf)],![]));const _0x2650ad=_0x117e1c[_0x199727(0x26f)]===_0x199727(0x255)?null:{'id':_0x117e1c['folderId'],'type':'folder-segment'};_0x51dbd9={'attributes':{'name':_0x117e1c[_0x199727(0xd3)],'description':_0x117e1c['description']||null,..._0x5af3d3!==undefined&&{'audienceId':_0x5af3d3},..._0xffffe6!==undefined&&{'sections':_0xffffe6}},'relationships':{'parentFolder':{'data':_0x2650ad}}};}const _0x47c50d=await withSpinner(_0x199727(0x85)+(_0x51dbd9[_0x199727(0x22f)]?.[_0x199727(0xd3)]??'')+_0x199727(0x6c),()=>_0x1b764f[_0x199727(0x1bc)][_0x199727(0x26e)](_0x51dbd9),{'verbose':_0x1f4552[_0x199727(0x189)]}),_0x5e1d2d=_0x47c50d[_0x199727(0x134)];return console[_0x199727(0x112)](_0x199727(0x191)+_0x5e1d2d[_0x199727(0xd3)]+_0x199727(0xe6)+_0x5e1d2d['id']),await handleSDKOutput([_0x5e1d2d],_0x1f4552),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x4a723d(0xd3)]='ps:pz:patch';[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x1c0);async[a31_0x4a723d(0x1bf)](_0x581fa9){const _0x1da993=a31_0x4a723d,{options:_0xebafd4,args:_0x43b497}=_0x581fa9,_0x321ffc=_0xebafd4,_0x824e6b=_0x43b497[0x0];if(!_0x824e6b)return console['error']('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x1da993(0x112)](_0x1da993(0x99)),console[_0x1da993(0x112)](_0x1da993(0x22e)),0x1;let _0x22e87d;if(_0x321ffc[_0x1da993(0x26a)])_0x22e87d=await loadJSON(_0x321ffc[_0x1da993(0x26a)],!![]);else{if(!_0x321ffc[_0x1da993(0xd3)])return console['error'](_0x1da993(0xd4)),console['error'](_0x1da993(0x99)),0x1;if(_0x321ffc['description']===undefined)return console[_0x1da993(0x112)](_0x1da993(0x100)),console['error'](_0x1da993(0x99)),0x1;let _0x3f2155;_0x321ffc[_0x1da993(0xdf)]&&(_0x3f2155=await loadJSON(_0x321ffc[_0x1da993(0xdf)],![])),_0x22e87d={'attributes':{'name':_0x321ffc[_0x1da993(0xd3)],'description':_0x321ffc[_0x1da993(0x9e)]||null,..._0x3f2155!==undefined&&{'sections':_0x3f2155}}};}const {tdx:_0x26a24a}=_0x581fa9,_0x8dcd74=await withSpinner(_0x1da993(0x221)+_0x824e6b+_0x1da993(0x6c),()=>_0x26a24a[_0x1da993(0x1bc)]['patchPersonalization'](_0x824e6b,_0x22e87d),{'verbose':_0xebafd4[_0x1da993(0x189)]}),_0x4cb1e9=_0x8dcd74[_0x1da993(0x134)];return console[_0x1da993(0x112)](_0x1da993(0x14b)+_0x4cb1e9['name']+_0x1da993(0x267)+_0x4cb1e9['id']+')'),await handleSDKOutput([_0x4cb1e9],_0xebafd4),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']=a31_0x4a723d(0x152);[a31_0x4a723d(0x9e)]=a31_0x4a723d(0x142);async[a31_0x4a723d(0x1bf)](_0x3e6b3c){const _0x45e80a=a31_0x4a723d,{options:_0x4363c7,args:_0x4654d3}=_0x3e6b3c,_0xf27cac=_0x4654d3[0x0]||_0x4363c7['parentSegment'];if(!_0xf27cac)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'+'\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 _0x25fafc=resolveYamlFile(_0xf27cac);if(!existsSync(_0x25fafc))return showFileNotFoundError(_0x25fafc,_0xf27cac),0x1;let _0x494b44;try{_0x494b44=readFileSync(_0x25fafc,_0x45e80a(0x261));}catch(_0x3eed6c){const _0x248d37=_0x3eed6c instanceof Error?_0x3eed6c[_0x45e80a(0x19e)]:String(_0x3eed6c);return console[_0x45e80a(0x112)](_0x45e80a(0x177)+_0x248d37),0x1;}let _0x53d307;try{_0x53d307=parseDef(_0x494b44);}catch(_0x56f459){const _0x576f6a=_0x56f459 instanceof Error?_0x56f459[_0x45e80a(0x19e)]:String(_0x56f459);return console[_0x45e80a(0x112)](a31_0x46354d['red']('Error\x20parsing\x20YAML:\x20'+_0x576f6a)),0x1;}if(_0x53d307[_0x45e80a(0xb5)]&&_0x53d307[_0x45e80a(0xb5)][_0x45e80a(0x13f)]>0x0)return console['error'](a31_0x46354d['yellow'](_0x45e80a(0x216)+_0x25fafc)),console[_0x45e80a(0x112)](a31_0x46354d[_0x45e80a(0x1a5)](_0x45e80a(0x205)+_0x53d307['personalization_services'][_0x45e80a(0x13f)]+_0x45e80a(0xb4))),0x1;!_0x53d307[_0x45e80a(0xee)]&&(_0x53d307['realtime']={'events':[{'name':'page_view','source_table':_0x45e80a(0x16c)}],'attributes':[{'name':'last_page_viewed','type':_0x45e80a(0x12b)}],'id_stitching':{'primary_key':_0x53d307[_0x45e80a(0xef)][_0x45e80a(0x91)]==='customers'?_0x45e80a(0x1e0):'user_id'}});_0x53d307['personalization_services']=[{'name':'My\x20Service','description':'Personalization\x20service\x20description','trigger_event':'page_view','sections':[{'name':_0x45e80a(0x1b6),'criteria':_0x45e80a(0xb3),'attributes':['last_page_viewed']}]}];const _0x3af0dd=serializeDef(_0x53d307);return writeFileSync(_0x25fafc,_0x3af0dd,_0x45e80a(0x261)),console['error'](a31_0x46354d['green']('✔')+'\x20Added\x20personalization\x20template\x20to\x20'+a31_0x46354d['cyan'](_0x25fafc)),(!_0x53d307['realtime']||_0x494b44['indexOf']('realtime:')===-0x1)&&console[_0x45e80a(0x112)](a31_0x46354d['green']('✔')+_0x45e80a(0x24e)),console['error']('\x0a'+a31_0x46354d[_0x45e80a(0x1a5)]('Next\x20steps:')),console[_0x45e80a(0x112)](_0x45e80a(0x154)+_0x25fafc+'\x20to\x20configure\x20your\x20personalization\x20service'),console[_0x45e80a(0x112)](_0x45e80a(0x20d)+a31_0x46354d[_0x45e80a(0x1a5)](_0x45e80a(0x9f)+_0xf27cac)+_0x45e80a(0xf2)),0x0;}}
|