@treasuredata/tdx 2026.3.35 → 2026.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/auth-login-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/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/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
|
-
(function(
|
|
1
|
+
(function(_0x1b8024,_0x2db6b2){const _0x3a0c03=a157_0x5434,_0x3338b0=_0x1b8024();while(!![]){try{const _0x3b7535=-parseInt(_0x3a0c03(0x128))/0x1*(-parseInt(_0x3a0c03(0x11a))/0x2)+parseInt(_0x3a0c03(0x12b))/0x3+parseInt(_0x3a0c03(0x117))/0x4*(parseInt(_0x3a0c03(0x12e))/0x5)+-parseInt(_0x3a0c03(0x131))/0x6+parseInt(_0x3a0c03(0x141))/0x7*(-parseInt(_0x3a0c03(0x144))/0x8)+-parseInt(_0x3a0c03(0x123))/0x9*(-parseInt(_0x3a0c03(0x13e))/0xa)+parseInt(_0x3a0c03(0x13a))/0xb*(-parseInt(_0x3a0c03(0x139))/0xc);if(_0x3b7535===_0x2db6b2)break;else _0x3338b0['push'](_0x3338b0['shift']());}catch(_0x27ac5f){_0x3338b0['push'](_0x3338b0['shift']());}}}(a157_0x3246,0x306c5));import a157_0x578657 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x167e37){const _0x2d0b81=a157_0x5434;return _0x167e37[_0x2d0b81(0x11d)]!=='error';}export function isScopedResolution(_0xf6f81f){const _0x5475cb=a157_0x5434;return _0xf6f81f[_0x5475cb(0x11d)]===_0x5475cb(0x137)||_0xf6f81f[_0x5475cb(0x11d)]===_0x5475cb(0x129)||_0xf6f81f[_0x5475cb(0x11d)]===_0x5475cb(0x146);}function a157_0x5434(_0x5699e6,_0x4c3e7f){_0x5699e6=_0x5699e6-0x116;const _0x324654=a157_0x3246();let _0x54347c=_0x324654[_0x5699e6];return _0x54347c;}function a157_0x3246(){const _0x319d86=['2443GetLeZ','includes','trim','344whPYGD','resolve','context','scopedFolderPath','File\x20not\x20found:\x20','parent_segment','string','File\x20not\x20found','No\x20tdx.json\x20found\x20for\x20file:\x20','No\x20tdx.json\x20found','readFile','configDir','632HQCgHr','resourceType','tdx.json','104400NRkPUW','journey','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','type','stat','match','no_parent','isScoped','extname','664515lzlijP','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','invalid_yaml','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','Not\x20a\x20YAML\x20file:\x20','5PnrlPo','file','replace','244509XzPPpU','folderPath','exists','11735dejLhs','isDirectory','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','1172016hfOtMG','root','relative','basename','parse','error','directory','no_config','21492aVgCch','3685DpnAJr','segmentName','startsWith','parentSegment','40ymNPSf','message','dirname'];a157_0x3246=function(){return _0x319d86;};return a157_0x3246();}export function getScopedDetails(_0x342f80){if(isScopedResolution(_0x342f80))return{'isScoped':_0x342f80['isScoped'],'scopedFolderPath':_0x342f80['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x2cac80,_0x1a6e8c){const _0x45d072=a157_0x5434;let _0x2c08a0=a157_0x578657[_0x45d072(0x145)](_0x2cac80);const _0x341233=a157_0x578657[_0x45d072(0x135)](_0x2c08a0)[_0x45d072(0x132)];while(_0x2c08a0!==_0x341233){const _0x89953b=a157_0x578657['join'](_0x2c08a0,_0x45d072(0x119));if(await _0x1a6e8c[_0x45d072(0x12d)](_0x89953b))try{const _0x297726=await _0x1a6e8c[_0x45d072(0x14e)](_0x89953b),_0x47df3a=JSON[_0x45d072(0x135)](_0x297726);if(_0x47df3a[_0x45d072(0x149)]&&typeof _0x47df3a[_0x45d072(0x149)]===_0x45d072(0x14a))return{'configPath':_0x89953b,'configDir':_0x2c08a0,'parentSegment':_0x47df3a[_0x45d072(0x149)]};}catch{}_0x2c08a0=a157_0x578657[_0x45d072(0x140)](_0x2c08a0);}return null;}function calculateScopedPath(_0x35efad,_0x3d6e30){const _0x501b83=a157_0x5434,_0x2342e0=a157_0x578657[_0x501b83(0x133)](_0x3d6e30,_0x35efad),_0x23873a=_0x2342e0!==''&&_0x2342e0!=='.'&&!_0x2342e0[_0x501b83(0x13c)]('..');return{'isScoped':_0x23873a,'scopedFolderPath':_0x23873a?_0x2342e0[_0x501b83(0x12a)](/\\/g,'/'):''};}export async function resolveTarget(_0x1fedf5){const _0x49999c=a157_0x5434,{arg:_0x2c8ca0,contextParent:_0x5052e5,cwd:cwd=process['cwd'](),fs:fs=nodeFileSystem}=_0x1fedf5;if(_0x2c8ca0&&isYamlFilePath(_0x2c8ca0))try{const _0x57c3b1=await resolveYamlFilePath(_0x2c8ca0,fs),_0x6e608d=a157_0x578657['resolve'](_0x2c8ca0),_0x17e543=a157_0x578657[_0x49999c(0x140)](_0x6e608d),_0x16cf8d=await findTdxConfigAsync(_0x17e543,fs);if(!_0x16cf8d){if(_0x5052e5){const _0x480bf0=a157_0x578657[_0x49999c(0x140)](_0x6e608d);return{'type':_0x49999c(0x129),'parentName':_0x5052e5,'targetDir':_0x480bf0,'configRoot':_0x480bf0,'filePath':_0x6e608d,'resourceName':_0x57c3b1['segmentName'],'folderPath':_0x57c3b1[_0x49999c(0x12c)],'resourceType':_0x57c3b1[_0x49999c(0x118)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x49999c(0x138),'message':_0x49999c(0x14c)+_0x2c8ca0,'arg':_0x2c8ca0,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x1d6674=calculateScopedPath(_0x17e543,_0x16cf8d['configDir']);return{'type':_0x49999c(0x129),'parentName':_0x16cf8d[_0x49999c(0x13d)],'targetDir':_0x16cf8d['configDir'],'configRoot':_0x16cf8d[_0x49999c(0x116)],'filePath':_0x6e608d,'resourceName':_0x57c3b1[_0x49999c(0x13b)],'folderPath':_0x57c3b1['folderPath'],'resourceType':_0x57c3b1[_0x49999c(0x118)],'isScoped':_0x1d6674[_0x49999c(0x121)],'scopedFolderPath':_0x1d6674[_0x49999c(0x147)]};}catch(_0x2de20c){const _0x11d07f=_0x2de20c instanceof Error?_0x2de20c[_0x49999c(0x13f)]:String(_0x2de20c);if(_0x11d07f[_0x49999c(0x142)](_0x49999c(0x14b)))return{'type':_0x49999c(0x136),'errorCode':'file_not_found','message':_0x49999c(0x148)+_0x2c8ca0,'arg':_0x2c8ca0};if(_0x11d07f[_0x49999c(0x142)](_0x49999c(0x14d))){if(_0x5052e5){const _0x3ae72b=a157_0x578657[_0x49999c(0x145)](_0x2c8ca0);if(await fs[_0x49999c(0x12d)](_0x3ae72b)){const _0x41e29d=a157_0x578657[_0x49999c(0x140)](_0x3ae72b),_0x504640=await fs[_0x49999c(0x14e)](_0x3ae72b),_0x377652=_0x504640[_0x49999c(0x11f)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x2172f6=_0x504640[_0x49999c(0x11f)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x1696af=_0x377652?_0x377652[0x1]['trim']():a157_0x578657[_0x49999c(0x134)](_0x2c8ca0,a157_0x578657[_0x49999c(0x122)](_0x2c8ca0)),_0xed1687=_0x2172f6&&_0x2172f6[0x1][_0x49999c(0x143)]()===_0x49999c(0x11b)?'journey':'segment';return{'type':_0x49999c(0x129),'parentName':_0x5052e5,'targetDir':_0x41e29d,'configRoot':_0x41e29d,'filePath':_0x3ae72b,'resourceName':_0x1696af,'folderPath':'','resourceType':_0xed1687,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x49999c(0x136),'errorCode':_0x49999c(0x138),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x2c8ca0,'arg':_0x2c8ca0,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}return{'type':'error','errorCode':_0x49999c(0x125),'message':_0x11d07f,'arg':_0x2c8ca0};}if(_0x2c8ca0){const _0x444e0f=a157_0x578657[_0x49999c(0x145)](cwd,_0x2c8ca0);let _0x5bab07=null;try{_0x5bab07=await fs[_0x49999c(0x11e)](_0x444e0f);}catch{}if(_0x5bab07?.[_0x49999c(0x12f)]()){const _0x3c4b16=await findTdxConfigAsync(_0x444e0f,fs);if(_0x3c4b16){const _0x4c1813=calculateScopedPath(_0x444e0f,_0x3c4b16['configDir']);return{'type':'directory','parentName':_0x3c4b16[_0x49999c(0x13d)],'targetDir':_0x444e0f,'configRoot':_0x3c4b16[_0x49999c(0x116)],'isScoped':_0x4c1813[_0x49999c(0x121)],'scopedFolderPath':_0x4c1813[_0x49999c(0x147)]};}if(_0x5052e5)return{'type':_0x49999c(0x137),'parentName':_0x5052e5,'targetDir':_0x444e0f,'configRoot':_0x444e0f,'isScoped':![],'scopedFolderPath':''};return{'type':_0x49999c(0x136),'errorCode':_0x49999c(0x138),'message':_0x49999c(0x124)+_0x2c8ca0,'arg':_0x2c8ca0,'helpText':_0x49999c(0x126)};}if(_0x5bab07?.['isFile']())return{'type':_0x49999c(0x136),'errorCode':'invalid_yaml','message':_0x49999c(0x127)+_0x2c8ca0,'arg':_0x2c8ca0,'helpText':_0x49999c(0x130)};const _0x998b17=sanitizeFileName(_0x2c8ca0),_0x56186b=getSegmentRootDir(_0x998b17,cwd);return{'type':'parent_name','parentName':_0x2c8ca0,'targetDir':_0x56186b,'configRoot':_0x56186b};}const _0x334df2=await findTdxConfigAsync(cwd,fs);if(_0x334df2){const _0x3693cf=calculateScopedPath(cwd,_0x334df2['configDir']);return{'type':_0x49999c(0x146),'parentName':_0x334df2[_0x49999c(0x13d)],'targetDir':cwd,'configRoot':_0x334df2[_0x49999c(0x116)],'isScoped':_0x3693cf[_0x49999c(0x121)],'scopedFolderPath':_0x3693cf[_0x49999c(0x147)]};}if(_0x5052e5){const _0xfbf7e0=sanitizeFileName(_0x5052e5),_0x488942=getSegmentRootDir(_0xfbf7e0,cwd);return{'type':_0x49999c(0x146),'parentName':_0x5052e5,'targetDir':_0x488942,'configRoot':_0x488942,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x49999c(0x120),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x49999c(0x11c)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x46aa0d=a158_0x3378;(function(_0xddd1a7,_0x3505e2){const _0x1d6332=a158_0x3378,_0x42fd1c=_0xddd1a7();while(!![]){try{const _0x822b9e=-parseInt(_0x1d6332(0xf4))/0x1+-parseInt(_0x1d6332(0x100))/0x2+-parseInt(_0x1d6332(0xff))/0x3+parseInt(_0x1d6332(0xfc))/0x4+-parseInt(_0x1d6332(0x107))/0x5*(-parseInt(_0x1d6332(0x105))/0x6)+parseInt(_0x1d6332(0x102))/0x7*(parseInt(_0x1d6332(0x108))/0x8)+parseInt(_0x1d6332(0x101))/0x9;if(_0x822b9e===_0x3505e2)break;else _0x42fd1c['push'](_0x42fd1c['shift']());}catch(_0x30498e){_0x42fd1c['push'](_0x42fd1c['shift']());}}}(a158_0x1970,0x5ac1d));import{existsSync,readFileSync}from'fs';import a158_0x43cbd0 from'path';const TDX_CONFIG_FILE=a158_0x46aa0d(0x104),SEGMENTS_DIR=a158_0x46aa0d(0xf5);function a158_0x1970(){const _0x5a13b6=['1509411BuPWrk','1245796EnUXjB','7552053fyCHfo','7WoWJqm','utf-8','tdx.json','6gXaYEQ','engage_workspace','81935rAODdx','2140744IHoGMI','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','parent_segment','parse','startsWith','Invalid\x20tdx.json:\x20expected\x20object','249773vNotjz','segments','resolve','string','stringify','dirname','Invalid\x20JSON\x20in\x20','relative','2497808jaFbzy','cwd','join'];a158_0x1970=function(){return _0x5a13b6;};return a158_0x1970();}export function findTdxConfigPath(_0x17bf2d=process[a158_0x46aa0d(0xfd)]()){const _0x1e9098=a158_0x46aa0d;let _0x550e73=a158_0x43cbd0[_0x1e9098(0xf6)](_0x17bf2d);const _0x2d817c=a158_0x43cbd0[_0x1e9098(0x10b)](_0x550e73)['root'];while(_0x550e73!==_0x2d817c){const _0x2c3ec0=a158_0x43cbd0[_0x1e9098(0xfe)](_0x550e73,TDX_CONFIG_FILE);if(existsSync(_0x2c3ec0))return _0x2c3ec0;_0x550e73=a158_0x43cbd0['dirname'](_0x550e73);}return null;}function a158_0x3378(_0x52c117,_0x3eff67){_0x52c117=_0x52c117-0xf3;const _0x197079=a158_0x1970();let _0x3378bd=_0x197079[_0x52c117];return _0x3378bd;}export function loadTdxConfig(_0x115770){const _0x5d4216=a158_0x46aa0d,_0xb4e360=readFileSync(_0x115770,_0x5d4216(0x103));let _0x33589a;try{_0x33589a=JSON[_0x5d4216(0x10b)](_0xb4e360);}catch{throw new Error(_0x5d4216(0xfa)+_0x115770);}if(!_0x33589a||typeof _0x33589a!=='object')throw new Error(_0x5d4216(0xf3));const _0x200a94=_0x33589a,_0x335553=_0x200a94[_0x5d4216(0x10a)]&&typeof _0x200a94[_0x5d4216(0x10a)]===_0x5d4216(0xf7),_0x106461=_0x200a94['engage_workspace']&&typeof _0x200a94['engage_workspace']===_0x5d4216(0xf7);if(!_0x335553&&!_0x106461)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x4ed81a={};return _0x335553&&(_0x4ed81a[_0x5d4216(0x10a)]=_0x200a94['parent_segment']),_0x106461&&(_0x4ed81a[_0x5d4216(0x106)]=_0x200a94[_0x5d4216(0x106)]),_0x4ed81a;}export function findTdxConfig(_0x4bd8c3=process[a158_0x46aa0d(0xfd)]()){const _0x224655=a158_0x46aa0d,_0x4b4de0=findTdxConfigPath(_0x4bd8c3);if(!_0x4b4de0)throw new Error(_0x224655(0x109));const _0x3cb4f1=loadTdxConfig(_0x4b4de0),_0x3d8300=a158_0x43cbd0[_0x224655(0xf9)](_0x4b4de0);return{'config':_0x3cb4f1,'configPath':_0x4b4de0,'configDir':_0x3d8300};}export function tryFindTdxConfig(_0x31613e){try{return findTdxConfig(_0x31613e);}catch{return null;}}export function getSegmentRootDir(_0x305cc6,_0x565662=process[a158_0x46aa0d(0xfd)]()){const _0x1e85ed=a158_0x46aa0d;return a158_0x43cbd0[_0x1e85ed(0xfe)](_0x565662,SEGMENTS_DIR,_0x305cc6);}export function getTdxConfigPath(_0x28bf37,_0x1bd499=process[a158_0x46aa0d(0xfd)]()){const _0x529c47=a158_0x46aa0d;return a158_0x43cbd0[_0x529c47(0xfe)](getSegmentRootDir(_0x28bf37,_0x1bd499),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x387afb,_0x59a903){const _0x5e5877=a158_0x46aa0d,_0xd4dbd3=a158_0x43cbd0[_0x5e5877(0xf6)](_0x387afb),_0x383005=a158_0x43cbd0[_0x5e5877(0xfb)](_0x59a903,_0xd4dbd3);if(_0x383005[_0x5e5877(0x10c)]('..'))return'';return _0x383005;}export function localPathToTdFolderPath(_0x35cfc1){const _0x3634b7=a158_0x46aa0d,_0x900638=a158_0x43cbd0[_0x3634b7(0xf9)](_0x35cfc1);if(_0x900638==='.'||_0x900638==='')return'';return _0x900638['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x290f00,_0x5a2832){const _0x3a182e=a158_0x46aa0d;if(!_0x290f00)return _0x5a2832;return a158_0x43cbd0[_0x3a182e(0xfe)](_0x5a2832,_0x290f00);}export function createTdxConfigContent(_0xa7d8bc){const _0x474c29=a158_0x46aa0d,_0x4da61a={'parent_segment':_0xa7d8bc};return JSON[_0x474c29(0xf8)](_0x4da61a,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x58992f){const _0x2a8646=a158_0x46aa0d,_0x57ca99={'engage_workspace':_0x58992f};return JSON[_0x2a8646(0xf8)](_0x57ca99,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a159_0x199fd4=a159_0x2882;(function(_0x556b88,_0x487885){const _0x2ee9f7=a159_0x2882,_0xf05db8=_0x556b88();while(!![]){try{const _0x144a33=-parseInt(_0x2ee9f7(0x7d))/0x1+-parseInt(_0x2ee9f7(0x85))/0x2+-parseInt(_0x2ee9f7(0x9d))/0x3*(-parseInt(_0x2ee9f7(0x79))/0x4)+-parseInt(_0x2ee9f7(0x86))/0x5*(parseInt(_0x2ee9f7(0x8f))/0x6)+parseInt(_0x2ee9f7(0x90))/0x7+parseInt(_0x2ee9f7(0x7e))/0x8*(parseInt(_0x2ee9f7(0x88))/0x9)+parseInt(_0x2ee9f7(0xa1))/0xa*(parseInt(_0x2ee9f7(0x99))/0xb);if(_0x144a33===_0x487885)break;else _0xf05db8['push'](_0xf05db8['shift']());}catch(_0x1f2f83){_0xf05db8['push'](_0xf05db8['shift']());}}}(a159_0x35f8,0x9e5b6));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x199fd4(0x9a)]([a159_0x199fd4(0x8e),a159_0x199fd4(0x9c),'daily',a159_0x199fd4(0x87),a159_0x199fd4(0x91),'cron',a159_0x199fd4(0x92)]);function a159_0x35f8(){const _0xe48c70=['weekly','9wAlYMO','day','min','Activation\x20name\x20is\x20required','masked','string','none','2903412DjQcSB','6536551lMlskE','monthly','minutes_interval','record','rows','week','cols','All','number','13158079kogfjS','enum','minute','hourly','14850kGaNHu','optional','asc','once','10romjTC','208ScCBjn','boolean','Last','onSuccess','1173533sAgbtJ','5677664fvkvnI','object','union','desc','nullable','onFailure','array','614246IBwaua','10rRaEdW'];a159_0x35f8=function(){return _0xe48c70;};return a159_0x35f8();}export const RepeatUnitSchema=z[a159_0x199fd4(0x9a)]([a159_0x199fd4(0x9b),'hour',a159_0x199fd4(0x89),a159_0x199fd4(0x95),'month',a159_0x199fd4(0xa0),a159_0x199fd4(0x8e)]);export const ScheduleDefSchema=z[a159_0x199fd4(0x7f)]({'type':ScheduleTypeSchema[a159_0x199fd4(0x9e)](),'repeat_unit':RepeatUnitSchema[a159_0x199fd4(0x9e)](),'repeat_frequency':z[a159_0x199fd4(0x98)]()[a159_0x199fd4(0x9e)](),'repeat_sub_frequency':z['array'](z['number']())[a159_0x199fd4(0x9e)](),'start_at':z[a159_0x199fd4(0x8d)]()[a159_0x199fd4(0x82)]()[a159_0x199fd4(0x9e)](),'end_on':z[a159_0x199fd4(0x8d)]()[a159_0x199fd4(0x82)]()['optional'](),'timezone':z[a159_0x199fd4(0x8d)]()[a159_0x199fd4(0x9e)]()});function a159_0x2882(_0x33f185,_0x58a60f){_0x33f185=_0x33f185-0x79;const _0x35f843=a159_0x35f8();let _0x28821c=_0x35f843[_0x33f185];return _0x28821c;}export const NotificationDefSchema=z['object']({'notify_on':z[a159_0x199fd4(0x84)](z['enum']([a159_0x199fd4(0x7c),a159_0x199fd4(0x83)]))[a159_0x199fd4(0x9e)](),'email_recipients':z[a159_0x199fd4(0x84)](z[a159_0x199fd4(0x8d)]())[a159_0x199fd4(0x9e)]()});export const ActivationColumnDefSchema=z[a159_0x199fd4(0x80)]([z[a159_0x199fd4(0x8d)](),z['object']({'name':z[a159_0x199fd4(0x8d)](),'type':z[a159_0x199fd4(0x8d)]()['optional'](),'visibility':z['enum'](['clear',a159_0x199fd4(0x8c)])[a159_0x199fd4(0x9e)]()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z['array'](z[a159_0x199fd4(0x7f)]({'name':z['string'](),'type':z['string']()[a159_0x199fd4(0x9e)](),'visibility':z[a159_0x199fd4(0x9a)](['clear',a159_0x199fd4(0x8c)])[a159_0x199fd4(0x9e)]()}))[a159_0x199fd4(0x9e)](),'behavior_table':z[a159_0x199fd4(0x8d)]()[a159_0x199fd4(0x9e)](),'join_row':z[a159_0x199fd4(0x98)]()[a159_0x199fd4(0x82)]()['optional'](),'join_strategy':z[a159_0x199fd4(0x9a)]([a159_0x199fd4(0x97),'First',a159_0x199fd4(0x7b),'Top-N'])['optional'](),'formatting':z[a159_0x199fd4(0x9a)]([a159_0x199fd4(0x94),a159_0x199fd4(0x96)])[a159_0x199fd4(0x9e)](),'order_by':z[a159_0x199fd4(0x84)](z[a159_0x199fd4(0x7f)]({'key':z[a159_0x199fd4(0x8d)](),'order':z['enum']([a159_0x199fd4(0x9f),a159_0x199fd4(0x81)])}))[a159_0x199fd4(0x9e)]()});export const ActivationDefSchema=z[a159_0x199fd4(0x7f)]({'name':z[a159_0x199fd4(0x8d)]()[a159_0x199fd4(0x8a)](0x1,a159_0x199fd4(0x8b)),'description':z['string']()[a159_0x199fd4(0x9e)](),'connection':z[a159_0x199fd4(0x8d)]()[a159_0x199fd4(0x8a)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z[a159_0x199fd4(0x7a)]()[a159_0x199fd4(0x9e)](),'columns':z['array'](ActivationColumnDefSchema)[a159_0x199fd4(0x9e)](),'schedule':ScheduleDefSchema[a159_0x199fd4(0x9e)](),'notification':NotificationDefSchema[a159_0x199fd4(0x9e)](),'connector_config':z[a159_0x199fd4(0x93)](z[a159_0x199fd4(0x8d)](),z['unknown']())[a159_0x199fd4(0x9e)](),'activation_template_id':z[a159_0x199fd4(0x8d)]()[a159_0x199fd4(0x82)]()['optional'](),'behavior':ActivationBehaviorDefSchema[a159_0x199fd4(0x82)]()['optional'](),'run_after_journey_refresh':z[a159_0x199fd4(0x7a)]()[a159_0x199fd4(0x9e)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a160_0x23ac(_0x509eca,_0x56d808){_0x509eca=_0x509eca-0xe2;var _0x5cc40c=a160_0x5cc4();var _0x23ace0=_0x5cc40c[_0x509eca];return _0x23ace0;}(function(_0x3a6ff2,_0x2da5ad){var _0x3290a7=a160_0x23ac,_0x3697fb=_0x3a6ff2();while(!![]){try{var _0x447029=-parseInt(_0x3290a7(0xe9))/0x1+-parseInt(_0x3290a7(0xe8))/0x2+-parseInt(_0x3290a7(0xe2))/0x3+-parseInt(_0x3290a7(0xe7))/0x4+parseInt(_0x3290a7(0xe6))/0x5+-parseInt(_0x3290a7(0xe4))/0x6+-parseInt(_0x3290a7(0xe5))/0x7*(-parseInt(_0x3290a7(0xe3))/0x8);if(_0x447029===_0x2da5ad)break;else _0x3697fb['push'](_0x3697fb['shift']());}catch(_0x509c59){_0x3697fb['push'](_0x3697fb['shift']());}}}(a160_0x5cc4,0xd1453));function a160_0x5cc4(){var _0x5e8b13=['25304MGEeXg','4915602lUufeD','11123aGFlxN','5142365FqQKcl','6756044ODFDwJ','858840xjgtKz','1288037bSxbJF','2914722ZmQfWv'];a160_0x5cc4=function(){return _0x5e8b13;};return a160_0x5cc4();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x443ff3=a161_0x18d6;(function(_0x295aa6,_0x550fc8){const _0x4143b9=a161_0x18d6,_0x58c0f8=_0x295aa6();while(!![]){try{const _0x45715d=parseInt(_0x4143b9(0xee))/0x1*(-parseInt(_0x4143b9(0xeb))/0x2)+parseInt(_0x4143b9(0xfa))/0x3+-parseInt(_0x4143b9(0xd7))/0x4*(-parseInt(_0x4143b9(0xe5))/0x5)+parseInt(_0x4143b9(0xf4))/0x6+-parseInt(_0x4143b9(0xef))/0x7*(-parseInt(_0x4143b9(0xe0))/0x8)+-parseInt(_0x4143b9(0xf3))/0x9*(parseInt(_0x4143b9(0xe4))/0xa)+parseInt(_0x4143b9(0xf1))/0xb*(-parseInt(_0x4143b9(0xd6))/0xc);if(_0x45715d===_0x550fc8)break;else _0x58c0f8['push'](_0x58c0f8['shift']());}catch(_0x4556e4){_0x58c0f8['push'](_0x58c0f8['shift']());}}}(a161_0xed09,0x75f53));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x443ff3(0xf5)]([a161_0x443ff3(0xd9),a161_0x443ff3(0xde),a161_0x443ff3(0xea)]);function a161_0xed09(){const _0x509627=['object','2110gyTQQE','1345645filoIO','decision_point','ab_test','reentry_always','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','launched','727828fBjGxS','journeys','jump','1XTVjpe','2230291rTfjGB','string','11NeNPve','end','21339lAJfMR','5166354JSLdZL','enum','min','stages','Journey\x20name\x20is\x20required','optional','505443wGSvFU','length','activation','versions','type','week','boolean','literal','refine','number','array','6468732jeYazP','8mnFhJm','wait','draft','record','merge','lazy','no_reentry','simulation','passthrough','8EkNeLB','reentry_unless_goal_achieved','journey'];a161_0xed09=function(){return _0x509627;};return a161_0xed09();}export const ReentryModeTypeSchema=z[a161_0x443ff3(0xf5)]([a161_0x443ff3(0xdd),a161_0x443ff3(0xe1),a161_0x443ff3(0xe8)]);export const WaitUnitTypeSchema=z[a161_0x443ff3(0xf5)](['day',a161_0x443ff3(0xd0)]);export const StepTypeValueSchema=z[a161_0x443ff3(0xf5)]([a161_0x443ff3(0xd8),a161_0x443ff3(0xfc),'decision_point',a161_0x443ff3(0xe7),a161_0x443ff3(0xdb),a161_0x443ff3(0xed),a161_0x443ff3(0xf2)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x443ff3(0xe3)]({'journey':z['string'](),'stage':z[a161_0x443ff3(0xf0)](),'bundle_id':z['string']()[a161_0x443ff3(0xf9)]()});export const CriteriaDefSchema=z[a161_0x443ff3(0xe3)]({'name':z['string'](),'description':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)](),'segment':z[a161_0x443ff3(0xf0)](),'target':JumpTargetDefSchema[a161_0x443ff3(0xf9)]()});const WaitConditionTimeoutDefSchema=z[a161_0x443ff3(0xe3)]({'duration':z[a161_0x443ff3(0xd4)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)]()}),WaitConditionDefSchema=z[a161_0x443ff3(0xe3)]({'segment':z[a161_0x443ff3(0xf0)](),'next':z[a161_0x443ff3(0xf0)]()['optional'](),'timeout':WaitConditionTimeoutDefSchema[a161_0x443ff3(0xf9)]()}),WaitStepParamsDefSchema=z[a161_0x443ff3(0xe3)]({'duration':z[a161_0x443ff3(0xd4)]()[a161_0x443ff3(0xf9)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z[a161_0x443ff3(0xd5)](z[a161_0x443ff3(0xf0)]())['optional']()}),StepBaseFields={'name':z[a161_0x443ff3(0xf0)](),'uuid':z['string']()[a161_0x443ff3(0xf9)](),'next':z[a161_0x443ff3(0xf0)]()['optional']()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z['literal']('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x443ff3(0xe3)]({'activation':z[a161_0x443ff3(0xf0)]()}),ActivationStepDefSchema=z[a161_0x443ff3(0xe3)]({...StepBaseFields,'type':z[a161_0x443ff3(0xd2)](a161_0x443ff3(0xfc)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x443ff3(0xe3)]({'name':z['string'](),'segment':z['string']()[a161_0x443ff3(0xf9)](),'segment_id':z[a161_0x443ff3(0xf0)]()['optional'](),'excluded':z[a161_0x443ff3(0xd1)]()[a161_0x443ff3(0xf9)](),'next':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)]()}),DecisionPointStepParamsDefSchema=z[a161_0x443ff3(0xe3)]({'branches':z[a161_0x443ff3(0xd5)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a161_0x443ff3(0xe6)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x443ff3(0xe3)]({'id':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)](),'name':z['string'](),'percentage':z[a161_0x443ff3(0xd4)](),'next':z[a161_0x443ff3(0xf0)]()['optional']()}),AbTestStepParamsDefSchema=z[a161_0x443ff3(0xe3)]({'variants':z[a161_0x443ff3(0xd5)](AbTestVariantDefSchema),'unique_id':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)](),'customized_split':z[a161_0x443ff3(0xd1)]()[a161_0x443ff3(0xf9)]()}),AbTestStepDefSchema=z[a161_0x443ff3(0xe3)]({...StepBaseFields,'type':z[a161_0x443ff3(0xd2)](a161_0x443ff3(0xe7)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x443ff3(0xe3)]({...StepBaseFields,'type':z[a161_0x443ff3(0xd2)](a161_0x443ff3(0xdb))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x443ff3(0xe3)]({...StepBaseFields,'type':z['literal'](a161_0x443ff3(0xed)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x443ff3(0xe3)]({...StepBaseFields,'type':z[a161_0x443ff3(0xd2)]('end')})[a161_0x443ff3(0xdf)]();function a161_0x18d6(_0x43f76f,_0x23ad9c){_0x43f76f=_0x43f76f-0xd0;const _0xed09a6=a161_0xed09();let _0x18d663=_0xed09a6[_0x43f76f];return _0x18d663;}export const StepDefSchema=z['discriminatedUnion'](a161_0x443ff3(0xfe),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x443ff3(0xe3)]({'name':z[a161_0x443ff3(0xf0)](),'description':z['string']()[a161_0x443ff3(0xf9)](),'id':z[a161_0x443ff3(0xf0)]()['optional'](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a161_0x443ff3(0xd5)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a161_0x443ff3(0xf0)]()['optional'](),'steps':z['array'](StepDefSchema)[a161_0x443ff3(0xf9)]()});export const JourneyEntryDefSchema=z[a161_0x443ff3(0xe3)]({'name':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)](),'version':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)](),'state':JourneyStateTypeSchema[a161_0x443ff3(0xf9)](),'latest':z[a161_0x443ff3(0xd1)]()['optional'](),'stages':z[a161_0x443ff3(0xd5)](StageDefSchema),'id':z['string']()[a161_0x443ff3(0xf9)](),'version_number':z['number']()[a161_0x443ff3(0xf9)](),'goal':CriteriaDefSchema[a161_0x443ff3(0xf9)](),'reentry':ReentryModeTypeSchema[a161_0x443ff3(0xf9)]()});export const JourneyDefSchema=z[a161_0x443ff3(0xdc)](()=>z[a161_0x443ff3(0xe3)]({'type':z['literal'](a161_0x443ff3(0xe2)),'name':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf6)](0x1,a161_0x443ff3(0xf8)),'description':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)](),'bundle_id':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)](),'bundle_name':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)](),'folder_id':z['string']()[a161_0x443ff3(0xf9)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a161_0x443ff3(0xd1)]()['optional'](),'goal':CriteriaDefSchema[a161_0x443ff3(0xf9)](),'id':z[a161_0x443ff3(0xf0)]()['optional'](),'version':z[a161_0x443ff3(0xf0)]()[a161_0x443ff3(0xf9)](),'version_number':z[a161_0x443ff3(0xd4)]()[a161_0x443ff3(0xf9)](),'stages':z[a161_0x443ff3(0xd5)](StageDefSchema)[a161_0x443ff3(0xf9)](),'versions':z[a161_0x443ff3(0xd5)](JourneyEntryDefSchema)[a161_0x443ff3(0xf9)](),'journeys':z[a161_0x443ff3(0xd5)](JourneyEntryDefSchema)[a161_0x443ff3(0xf9)](),'segments':z[a161_0x443ff3(0xda)](z[a161_0x443ff3(0xf0)](),EmbeddedSegmentDefSchema)[a161_0x443ff3(0xf9)](),'activations':z[a161_0x443ff3(0xda)](z[a161_0x443ff3(0xf0)](),ActivationDefSchema)[a161_0x443ff3(0xf9)]()})[a161_0x443ff3(0xd3)](_0x162a43=>{const _0x4848a6=a161_0x443ff3,_0x24345a=[_0x162a43[_0x4848a6(0xec)],_0x162a43[_0x4848a6(0xf7)],_0x162a43[_0x4848a6(0xfd)]]['filter'](_0x142535=>Array['isArray'](_0x142535)&&_0x142535[_0x4848a6(0xfb)]>0x0)[_0x4848a6(0xfb)];return _0x24345a===0x1;},{'message':a161_0x443ff3(0xe9)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a163_0x5826(){var _0x5ef89a=['4104198oHFbiQ','36435HXrxsV','1208ectJzO','144057UPoXSj','6nAfOBg','3207280rvbFhq','2279100VkFyDw','728NxtGRT','9754190yiGaQj','12186kqTwoo'];a163_0x5826=function(){return _0x5ef89a;};return a163_0x5826();}(function(_0x397ad7,_0x5e8591){var _0xd7f746=a163_0x24e6,_0x1fc3d1=_0x397ad7();while(!![]){try{var _0x2caa47=parseInt(_0xd7f746(0xb7))/0x1*(parseInt(_0xd7f746(0xb8))/0x2)+-parseInt(_0xd7f746(0xbd))/0x3*(-parseInt(_0xd7f746(0xb6))/0x4)+parseInt(_0xd7f746(0xb9))/0x5+parseInt(_0xd7f746(0xba))/0x6+parseInt(_0xd7f746(0xbf))/0x7*(-parseInt(_0xd7f746(0xbb))/0x8)+-parseInt(_0xd7f746(0xbe))/0x9+-parseInt(_0xd7f746(0xbc))/0xa;if(_0x2caa47===_0x5e8591)break;else _0x1fc3d1['push'](_0x1fc3d1['shift']());}catch(_0x3961f9){_0x1fc3d1['push'](_0x1fc3d1['shift']());}}}(a163_0x5826,0xbd3c1));function a163_0x24e6(_0x4ddfc5,_0x4be9c2){_0x4ddfc5=_0x4ddfc5-0xb6;var _0x582651=a163_0x5826();var _0x24e698=_0x582651[_0x4ddfc5];return _0x24e698;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a164_0x2505bf=a164_0x3186;(function(_0x101f2f,_0x27d823){const _0x30bf9e=a164_0x3186,_0xdde309=_0x101f2f();while(!![]){try{const _0x2cc775=parseInt(_0x30bf9e(0x141))/0x1+parseInt(_0x30bf9e(0x14d))/0x2+-parseInt(_0x30bf9e(0x145))/0x3+-parseInt(_0x30bf9e(0x133))/0x4+-parseInt(_0x30bf9e(0x12b))/0x5+-parseInt(_0x30bf9e(0x157))/0x6+-parseInt(_0x30bf9e(0x178))/0x7*(-parseInt(_0x30bf9e(0x16c))/0x8);if(_0x2cc775===_0x27d823)break;else _0xdde309['push'](_0xdde309['shift']());}catch(_0x385a9e){_0xdde309['push'](_0xdde309['shift']());}}}(a164_0x5747,0x2916f));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x2505bf(0x163)]([a164_0x2505bf(0x160),a164_0x2505bf(0x175),a164_0x2505bf(0x13a),'GreaterEqual',a164_0x2505bf(0x15c),'In',a164_0x2505bf(0x161),'Regexp',a164_0x2505bf(0x142),a164_0x2505bf(0x143),a164_0x2505bf(0x14b),a164_0x2505bf(0x16f),a164_0x2505bf(0x137),a164_0x2505bf(0x15b),a164_0x2505bf(0x12c)]);export const TimeUnitSchema=z['enum'](['second',a164_0x2505bf(0x15f),a164_0x2505bf(0x15e),a164_0x2505bf(0x136),a164_0x2505bf(0x152),'month',a164_0x2505bf(0x172)]);export const AggregationTypeSchema=z['enum']([a164_0x2505bf(0x14a),a164_0x2505bf(0x153),a164_0x2505bf(0x162),a164_0x2505bf(0x177),a164_0x2505bf(0x164),a164_0x2505bf(0x134),'First',a164_0x2505bf(0x147)]);const TemporalValueSchema=z[a164_0x2505bf(0x12e)]([z[a164_0x2505bf(0x14c)]({'timestamp':z[a164_0x2505bf(0x14e)]()}),z[a164_0x2505bf(0x14c)]({'last':z[a164_0x2505bf(0x12e)]([z['number'](),z[a164_0x2505bf(0x174)](z[a164_0x2505bf(0x14e)](),z[a164_0x2505bf(0x170)]())]),'unit':z[a164_0x2505bf(0x14e)]()})]),OperatorValueSchema=z[a164_0x2505bf(0x12e)]([z['string'](),z[a164_0x2505bf(0x170)](),z[a164_0x2505bf(0x158)](),TemporalValueSchema,z[a164_0x2505bf(0x156)](z[a164_0x2505bf(0x12e)]([z[a164_0x2505bf(0x14e)](),z[a164_0x2505bf(0x170)](),z[a164_0x2505bf(0x158)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x2505bf(0x160),a164_0x2505bf(0x175),a164_0x2505bf(0x135),'Less',a164_0x2505bf(0x15c),'In',a164_0x2505bf(0x16f),a164_0x2505bf(0x137),a164_0x2505bf(0x15b),a164_0x2505bf(0x13c),'TimeWithinPast',a164_0x2505bf(0x14b)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x2505bf(0x143),a164_0x2505bf(0x14b)]);export const OperatorDefSchema=z[a164_0x2505bf(0x14c)]({'type':OperatorTypeSchema,'not':z[a164_0x2505bf(0x158)]()['optional'](),'value':OperatorValueSchema[a164_0x2505bf(0x131)](),'min':z['union']([z[a164_0x2505bf(0x170)](),z[a164_0x2505bf(0x14e)](),TemporalValueSchema])[a164_0x2505bf(0x131)](),'max':z['union']([z['number'](),z[a164_0x2505bf(0x14e)](),TemporalValueSchema])[a164_0x2505bf(0x131)](),'unit':TimeUnitSchema[a164_0x2505bf(0x131)](),'duration':z[a164_0x2505bf(0x14c)]({'day':z[a164_0x2505bf(0x170)]()[a164_0x2505bf(0x131)](),'week':z[a164_0x2505bf(0x170)]()['optional'](),'month':z[a164_0x2505bf(0x170)]()[a164_0x2505bf(0x131)](),'year':z[a164_0x2505bf(0x170)]()[a164_0x2505bf(0x131)](),'hour':z[a164_0x2505bf(0x170)]()[a164_0x2505bf(0x131)](),'minute':z[a164_0x2505bf(0x170)]()[a164_0x2505bf(0x131)](),'second':z[a164_0x2505bf(0x170)]()[a164_0x2505bf(0x131)]()})[a164_0x2505bf(0x131)](),'from':z[a164_0x2505bf(0x14c)]({'last':z[a164_0x2505bf(0x12e)]([z[a164_0x2505bf(0x170)](),z[a164_0x2505bf(0x14e)]()]),'unit':TimeUnitSchema})[a164_0x2505bf(0x131)](),'reverse':z[a164_0x2505bf(0x158)]()[a164_0x2505bf(0x131)]()})[a164_0x2505bf(0x12f)]((_0x5b83ce,_0x17d51f)=>{const _0x5ba2e9=a164_0x2505bf;OPERATORS_REQUIRING_VALUE[_0x5ba2e9(0x13d)](_0x5b83ce['type'])&&(_0x5b83ce[_0x5ba2e9(0x15d)]===undefined||_0x5b83ce[_0x5ba2e9(0x15d)]===null)&&_0x17d51f['addIssue']({'code':'custom','message':_0x5ba2e9(0x14f)+_0x5b83ce[_0x5ba2e9(0x150)]+_0x5ba2e9(0x155),'path':[_0x5ba2e9(0x15d)]}),_0x5b83ce[_0x5ba2e9(0x150)]===_0x5ba2e9(0x161)&&_0x5b83ce['min']===undefined&&_0x5b83ce[_0x5ba2e9(0x165)]===undefined&&_0x17d51f[_0x5ba2e9(0x16d)]({'code':'custom','message':_0x5ba2e9(0x16b),'params':{'validationCode':_0x5ba2e9(0x16e)}}),OPERATORS_REQUIRING_UNIT[_0x5ba2e9(0x13d)](_0x5b83ce['type'])&&_0x5b83ce[_0x5ba2e9(0x15d)]!==undefined&&!_0x5b83ce['unit']&&_0x17d51f[_0x5ba2e9(0x16d)]({'code':'custom','message':_0x5ba2e9(0x14f)+_0x5b83ce[_0x5ba2e9(0x150)]+_0x5ba2e9(0x166),'path':[_0x5ba2e9(0x159)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x5b83ce[_0x5ba2e9(0x150)]===_0x5ba2e9(0x12c)&&(!_0x5b83ce['duration']&&_0x17d51f[_0x5ba2e9(0x16d)]({'code':_0x5ba2e9(0x151),'message':_0x5ba2e9(0x13e),'path':['duration']}),!_0x5b83ce[_0x5ba2e9(0x132)]&&_0x17d51f['addIssue']({'code':_0x5ba2e9(0x151),'message':_0x5ba2e9(0x12d),'path':[_0x5ba2e9(0x132)]}));});export const ArrayMatchingSchema=z[a164_0x2505bf(0x12e)]([z[a164_0x2505bf(0x13f)](a164_0x2505bf(0x144)),z[a164_0x2505bf(0x13f)]('all'),z[a164_0x2505bf(0x14c)]({'atLeast':z['number']()}),z[a164_0x2505bf(0x14c)]({'atMost':z['number']()}),z['object']({'exactly':z['number']()})]);export const AggregationDefSchema=z[a164_0x2505bf(0x168)]('type',[z['object']({'type':z[a164_0x2505bf(0x163)]([a164_0x2505bf(0x153),a164_0x2505bf(0x177),a164_0x2505bf(0x164),a164_0x2505bf(0x162)]),'column':z[a164_0x2505bf(0x14e)](),'groupingColumns':z[a164_0x2505bf(0x156)](z[a164_0x2505bf(0x14e)]())[a164_0x2505bf(0x131)]()}),z[a164_0x2505bf(0x14c)]({'type':z[a164_0x2505bf(0x13f)](a164_0x2505bf(0x14a)),'groupingColumns':z[a164_0x2505bf(0x156)](z[a164_0x2505bf(0x14e)]())[a164_0x2505bf(0x131)]()}),z['object']({'type':z['literal'](a164_0x2505bf(0x134)),'columns':z[a164_0x2505bf(0x156)](z[a164_0x2505bf(0x14e)]())}),z[a164_0x2505bf(0x14c)]({'type':z['enum']([a164_0x2505bf(0x130),a164_0x2505bf(0x147)]),'column':z[a164_0x2505bf(0x14e)](),'orderColumn':z[a164_0x2505bf(0x14e)](),'groupingColumns':z['array'](z[a164_0x2505bf(0x14e)]())[a164_0x2505bf(0x131)]()})]);export const TimeWindowDefSchema=z[a164_0x2505bf(0x14c)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x2505bf(0x143),a164_0x2505bf(0x14b),a164_0x2505bf(0x12c)]);export const FilterColumnConditionDefSchema=z[a164_0x2505bf(0x14c)]({'type':z[a164_0x2505bf(0x13f)](a164_0x2505bf(0x12a)),'column':z[a164_0x2505bf(0x14e)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})['superRefine']((_0x4e1bf9,_0x31a452)=>{const _0x401a28=a164_0x2505bf,_0x7aa338=_0x4e1bf9[_0x401a28(0x171)][_0x401a28(0x150)];_0x4e1bf9['column']==='timestamp'?!TIMESTAMP_OPERATORS['has'](_0x7aa338)&&_0x31a452[_0x401a28(0x16d)]({'code':_0x401a28(0x151),'message':_0x401a28(0x176)+_0x7aa338+'\x27)','path':[_0x401a28(0x171),_0x401a28(0x150)]}):TIMESTAMP_OPERATORS[_0x401a28(0x13d)](_0x7aa338)&&_0x31a452[_0x401a28(0x16d)]({'code':_0x401a28(0x151),'message':_0x401a28(0x14f)+_0x7aa338+_0x401a28(0x169),'path':[_0x401a28(0x171),_0x401a28(0x150)]});});export const FilterRuleDefSchema=z['object']({'type':z[a164_0x2505bf(0x13f)](a164_0x2505bf(0x13b)),'conditions':z['array'](FilterColumnConditionDefSchema)});function a164_0x3186(_0x498110,_0x548456){_0x498110=_0x498110-0x12a;const _0x57477a=a164_0x5747();let _0x31861b=_0x57477a[_0x498110];return _0x31861b;}export const ValueConditionDefSchema=z[a164_0x2505bf(0x173)](()=>z[a164_0x2505bf(0x14c)]({'type':z['literal'](a164_0x2505bf(0x148)),'attribute':z[a164_0x2505bf(0x14e)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x2505bf(0x131)](),'exclude':z[a164_0x2505bf(0x158)]()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z[a164_0x2505bf(0x14e)]()[a164_0x2505bf(0x131)](),'filter':FilterRuleDefSchema[a164_0x2505bf(0x131)](),'limit':z[a164_0x2505bf(0x170)]()[a164_0x2505bf(0x131)]()}));export const BehaviorConditionDefSchema=z[a164_0x2505bf(0x173)](()=>z[a164_0x2505bf(0x14c)]({'type':z[a164_0x2505bf(0x13f)](a164_0x2505bf(0x146)),'attribute':z[a164_0x2505bf(0x14e)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x2505bf(0x131)](),'exclude':z['boolean']()[a164_0x2505bf(0x131)](),'aggregation':AggregationDefSchema[a164_0x2505bf(0x131)](),'source':z[a164_0x2505bf(0x14e)]()[a164_0x2505bf(0x131)](),'filter':FilterRuleDefSchema[a164_0x2505bf(0x131)](),'timeWindow':TimeWindowDefSchema[a164_0x2505bf(0x131)](),'limit':z['number']()[a164_0x2505bf(0x131)]()}));export const ColumnConditionDefSchema=z[a164_0x2505bf(0x14c)]({'type':z[a164_0x2505bf(0x13f)](a164_0x2505bf(0x12a)),'column':z[a164_0x2505bf(0x14e)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z['object']({'type':z['enum']([a164_0x2505bf(0x13b),'Or']),'conditions':z[a164_0x2505bf(0x156)](ConditionDefSchema),'description':z[a164_0x2505bf(0x14e)]()[a164_0x2505bf(0x131)]()}));export const SegmentRefConditionDefSchema=z[a164_0x2505bf(0x14c)]({'type':z[a164_0x2505bf(0x163)]([a164_0x2505bf(0x15a),a164_0x2505bf(0x167)]),'segment':z['string']()[a164_0x2505bf(0x154)](0x1,a164_0x2505bf(0x179))});export const ConditionDefSchema=z[a164_0x2505bf(0x173)](()=>z[a164_0x2505bf(0x12e)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a164_0x2505bf(0x14c)]({'type':z[a164_0x2505bf(0x163)](['And','Or']),'conditions':z[a164_0x2505bf(0x156)](ConditionDefSchema),'description':z['string']()['optional']()}));export const SegmentDefSchema=z['object']({'type':z[a164_0x2505bf(0x13f)](a164_0x2505bf(0x138))[a164_0x2505bf(0x131)](),'name':z[a164_0x2505bf(0x14e)]()[a164_0x2505bf(0x154)](0x1,a164_0x2505bf(0x140)),'description':z[a164_0x2505bf(0x14e)]()['optional'](),'folder':z[a164_0x2505bf(0x14e)]()[a164_0x2505bf(0x131)](),'rule':RuleDefSchema[a164_0x2505bf(0x131)](),'kind':z[a164_0x2505bf(0x163)]([a164_0x2505bf(0x149),a164_0x2505bf(0x16a),a164_0x2505bf(0x139)])[a164_0x2505bf(0x131)](),'visible':z['boolean']()[a164_0x2505bf(0x131)](),'activations':z['array'](z['any']())[a164_0x2505bf(0x131)]()});function a164_0x5747(){const _0x2488dd=['Segment\x20name\x20is\x20required','132715DYiaUv','IsNull','TimeWithinPast','any','327426MQYiTy','Behavior','Last','Value','batch','Count','TimeWithinNext','object','410100gwReyT','string','Operator\x20\x27','type','custom','week','Sum','min','\x27\x20requires\x20a\x20value','array','967098mPPnGj','boolean','unit','include','EndWith','LessEqual','value','hour','minute','Equal','Between','Average','enum','Max','max','\x27\x20requires\x20a\x20time\x20unit','exclude','discriminatedUnion','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','realtime','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','916600SAXHnP','addIssue','MISSING_BETWEEN_BOUNDS','Contain','number','operator','year','lazy','record','Greater','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Min','21OdrhfK','Segment\x20reference\x20must\x20not\x20be\x20empty','Column','1121210EswUUH','TimeRange','TimeRange\x20operator\x20requires\x20\x27from\x27','union','superRefine','First','optional','from','74480VRKezD','CountDistinct','GreaterEqual','day','StartWith','segment','funnel_stage','Less','And','Regexp','has','TimeRange\x20operator\x20requires\x20\x27duration\x27','literal'];a164_0x5747=function(){return _0x2488dd;};return a164_0x5747();}const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a164_0x373ae2=a164_0x3add;function a164_0x3647(){const _0x2428ff=['TimeRange\x20operator\x20requires\x20\x27duration\x27','6652WaHySv','Regexp','from','minute','Max','Segment\x20name\x20is\x20required','include','MISSING_BETWEEN_BOUNDS','operator','has','LessEqual','value','Min','EndWith','number','duration','lazy','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Last','TimeRange','addIssue','realtime','Column','TimeWithinPast','second','CountDistinct','Count','union','2991816KcAEIQ','record','250NGvUbU','literal','StartWith','unit','2611oMhtiM','max','TimeWithinNext','batch','string','min','1828719XcvuUN','5694500ZXbhzQ','object','Greater','enum','GreaterEqual','hour','superRefine','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Behavior','First','column','Less','4AtYKwZ','optional','week','And','Between','Equal','313401nUUNqt','all','7385180JFIoVo','Contain','exclude','timestamp','\x27\x20requires\x20a\x20value','boolean','7206KaSDlT','TimeRange\x20operator\x20requires\x20\x27from\x27','9rLzPHc','Average','Operator\x20\x27','Sum','custom','type','array','discriminatedUnion','Value','funnel_stage'];a164_0x3647=function(){return _0x2428ff;};return a164_0x3647();}(function(_0x46c50e,_0x2c6645){const _0x973909=a164_0x3add,_0x3deb4d=_0x46c50e();while(!![]){try{const _0x1907b0=parseInt(_0x973909(0xdb))/0x1*(parseInt(_0x973909(0xd5))/0x2)+-parseInt(_0x973909(0xc8))/0x3+parseInt(_0x973909(0xf0))/0x4*(-parseInt(_0x973909(0x10e))/0x5)+-parseInt(_0x973909(0xe3))/0x6*(parseInt(_0x973909(0x112))/0x7)+-parseInt(_0x973909(0x10c))/0x8*(parseInt(_0x973909(0xe5))/0x9)+parseInt(_0x973909(0xc9))/0xa+parseInt(_0x973909(0xdd))/0xb;if(_0x1907b0===_0x2c6645)break;else _0x3deb4d['push'](_0x3deb4d['shift']());}catch(_0x383416){_0x3deb4d['push'](_0x3deb4d['shift']());}}}(a164_0x3647,0x562bf));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x373ae2(0xcc)](['Equal',a164_0x373ae2(0xcb),'Less',a164_0x373ae2(0xcd),a164_0x373ae2(0xfa),'In',a164_0x373ae2(0xd9),a164_0x373ae2(0xf1),'IsNull',a164_0x373ae2(0x107),'TimeWithinNext',a164_0x373ae2(0xde),a164_0x373ae2(0x110),a164_0x373ae2(0xfd),a164_0x373ae2(0x103)]);export const TimeUnitSchema=z[a164_0x373ae2(0xcc)]([a164_0x373ae2(0x108),a164_0x373ae2(0xf3),a164_0x373ae2(0xce),'day',a164_0x373ae2(0xd7),'month','year']);export const AggregationTypeSchema=z[a164_0x373ae2(0xcc)]([a164_0x373ae2(0x10a),'Sum',a164_0x373ae2(0xe6),a164_0x373ae2(0xfc),a164_0x373ae2(0xf4),a164_0x373ae2(0x109),a164_0x373ae2(0xd2),'Last']);const TemporalValueSchema=z[a164_0x373ae2(0x10b)]([z[a164_0x373ae2(0xca)]({'timestamp':z['string']()}),z[a164_0x373ae2(0xca)]({'last':z[a164_0x373ae2(0x10b)]([z[a164_0x373ae2(0xfe)](),z[a164_0x373ae2(0x10d)](z['string'](),z[a164_0x373ae2(0xfe)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a164_0x373ae2(0x10b)]([z[a164_0x373ae2(0x116)](),z[a164_0x373ae2(0xfe)](),z[a164_0x373ae2(0xe2)](),TemporalValueSchema,z[a164_0x373ae2(0xeb)](z['union']([z[a164_0x373ae2(0x116)](),z[a164_0x373ae2(0xfe)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x373ae2(0xda),'Greater',a164_0x373ae2(0xcd),a164_0x373ae2(0xd4),'LessEqual','In',a164_0x373ae2(0xde),a164_0x373ae2(0x110),'EndWith',a164_0x373ae2(0xf1),a164_0x373ae2(0x107),a164_0x373ae2(0x114)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast','TimeWithinNext']);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z['boolean']()[a164_0x373ae2(0xd6)](),'value':OperatorValueSchema[a164_0x373ae2(0xd6)](),'min':z[a164_0x373ae2(0x10b)]([z[a164_0x373ae2(0xfe)](),z['string'](),TemporalValueSchema])[a164_0x373ae2(0xd6)](),'max':z[a164_0x373ae2(0x10b)]([z[a164_0x373ae2(0xfe)](),z['string'](),TemporalValueSchema])[a164_0x373ae2(0xd6)](),'unit':TimeUnitSchema[a164_0x373ae2(0xd6)](),'duration':z['object']({'day':z[a164_0x373ae2(0xfe)]()['optional'](),'week':z['number']()['optional'](),'month':z['number']()[a164_0x373ae2(0xd6)](),'year':z['number']()[a164_0x373ae2(0xd6)](),'hour':z[a164_0x373ae2(0xfe)]()[a164_0x373ae2(0xd6)](),'minute':z['number']()['optional'](),'second':z[a164_0x373ae2(0xfe)]()[a164_0x373ae2(0xd6)]()})['optional'](),'from':z[a164_0x373ae2(0xca)]({'last':z[a164_0x373ae2(0x10b)]([z[a164_0x373ae2(0xfe)](),z[a164_0x373ae2(0x116)]()]),'unit':TimeUnitSchema})[a164_0x373ae2(0xd6)](),'reverse':z['boolean']()[a164_0x373ae2(0xd6)]()})[a164_0x373ae2(0xcf)]((_0x18e5b5,_0xb16dbe)=>{const _0x1ae304=a164_0x373ae2;OPERATORS_REQUIRING_VALUE[_0x1ae304(0xf9)](_0x18e5b5['type'])&&(_0x18e5b5[_0x1ae304(0xfb)]===undefined||_0x18e5b5['value']===null)&&_0xb16dbe[_0x1ae304(0x104)]({'code':'custom','message':'Operator\x20\x27'+_0x18e5b5[_0x1ae304(0xea)]+_0x1ae304(0xe1),'path':['value']}),_0x18e5b5['type']===_0x1ae304(0xd9)&&_0x18e5b5[_0x1ae304(0xc7)]===undefined&&_0x18e5b5[_0x1ae304(0x113)]===undefined&&_0xb16dbe['addIssue']({'code':_0x1ae304(0xe9),'message':_0x1ae304(0xd0),'params':{'validationCode':_0x1ae304(0xf7)}}),OPERATORS_REQUIRING_UNIT['has'](_0x18e5b5[_0x1ae304(0xea)])&&_0x18e5b5[_0x1ae304(0xfb)]!==undefined&&!_0x18e5b5[_0x1ae304(0x111)]&&_0xb16dbe[_0x1ae304(0x104)]({'code':_0x1ae304(0xe9),'message':'Operator\x20\x27'+_0x18e5b5[_0x1ae304(0xea)]+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x1ae304(0x111)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x18e5b5[_0x1ae304(0xea)]===_0x1ae304(0x103)&&(!_0x18e5b5['duration']&&_0xb16dbe['addIssue']({'code':_0x1ae304(0xe9),'message':_0x1ae304(0xef),'path':[_0x1ae304(0xff)]}),!_0x18e5b5[_0x1ae304(0xf2)]&&_0xb16dbe[_0x1ae304(0x104)]({'code':_0x1ae304(0xe9),'message':_0x1ae304(0xe4),'path':[_0x1ae304(0xf2)]}));});export const ArrayMatchingSchema=z[a164_0x373ae2(0x10b)]([z['literal']('any'),z[a164_0x373ae2(0x10f)](a164_0x373ae2(0xdc)),z[a164_0x373ae2(0xca)]({'atLeast':z['number']()}),z[a164_0x373ae2(0xca)]({'atMost':z['number']()}),z[a164_0x373ae2(0xca)]({'exactly':z[a164_0x373ae2(0xfe)]()})]);export const AggregationDefSchema=z[a164_0x373ae2(0xec)]('type',[z[a164_0x373ae2(0xca)]({'type':z[a164_0x373ae2(0xcc)]([a164_0x373ae2(0xe8),'Min',a164_0x373ae2(0xf4),a164_0x373ae2(0xe6)]),'column':z['string'](),'groupingColumns':z[a164_0x373ae2(0xeb)](z[a164_0x373ae2(0x116)]())[a164_0x373ae2(0xd6)]()}),z[a164_0x373ae2(0xca)]({'type':z[a164_0x373ae2(0x10f)]('Count'),'groupingColumns':z[a164_0x373ae2(0xeb)](z[a164_0x373ae2(0x116)]())[a164_0x373ae2(0xd6)]()}),z['object']({'type':z[a164_0x373ae2(0x10f)](a164_0x373ae2(0x109)),'columns':z['array'](z[a164_0x373ae2(0x116)]())}),z[a164_0x373ae2(0xca)]({'type':z[a164_0x373ae2(0xcc)]([a164_0x373ae2(0xd2),a164_0x373ae2(0x102)]),'column':z[a164_0x373ae2(0x116)](),'orderColumn':z[a164_0x373ae2(0x116)](),'groupingColumns':z['array'](z[a164_0x373ae2(0x116)]())[a164_0x373ae2(0xd6)]()})]);export const TimeWindowDefSchema=z[a164_0x373ae2(0xca)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast',a164_0x373ae2(0x114),a164_0x373ae2(0x103)]);export const FilterColumnConditionDefSchema=z['object']({'type':z[a164_0x373ae2(0x10f)](a164_0x373ae2(0x106)),'column':z[a164_0x373ae2(0x116)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x373ae2(0xd6)]()})['superRefine']((_0x606967,_0xb96e35)=>{const _0x2bbc90=a164_0x373ae2,_0x48f0f0=_0x606967['operator'][_0x2bbc90(0xea)];_0x606967[_0x2bbc90(0xd3)]===_0x2bbc90(0xe0)?!TIMESTAMP_OPERATORS[_0x2bbc90(0xf9)](_0x48f0f0)&&_0xb96e35[_0x2bbc90(0x104)]({'code':_0x2bbc90(0xe9),'message':_0x2bbc90(0x101)+_0x48f0f0+'\x27)','path':[_0x2bbc90(0xf8),'type']}):TIMESTAMP_OPERATORS[_0x2bbc90(0xf9)](_0x48f0f0)&&_0xb96e35[_0x2bbc90(0x104)]({'code':_0x2bbc90(0xe9),'message':_0x2bbc90(0xe7)+_0x48f0f0+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x2bbc90(0xf8),_0x2bbc90(0xea)]});});export const FilterRuleDefSchema=z['object']({'type':z[a164_0x373ae2(0x10f)]('And'),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x373ae2(0x100)](()=>z[a164_0x373ae2(0xca)]({'type':z[a164_0x373ae2(0x10f)](a164_0x373ae2(0xed)),'attribute':z[a164_0x373ae2(0x116)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x373ae2(0xd6)](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema[a164_0x373ae2(0xd6)](),'source':z['string']()[a164_0x373ae2(0xd6)](),'filter':FilterRuleDefSchema[a164_0x373ae2(0xd6)](),'limit':z[a164_0x373ae2(0xfe)]()[a164_0x373ae2(0xd6)]()}));export const BehaviorConditionDefSchema=z[a164_0x373ae2(0x100)](()=>z[a164_0x373ae2(0xca)]({'type':z[a164_0x373ae2(0x10f)](a164_0x373ae2(0xd1)),'attribute':z[a164_0x373ae2(0x116)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x373ae2(0xd6)](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema[a164_0x373ae2(0xd6)](),'source':z[a164_0x373ae2(0x116)]()[a164_0x373ae2(0xd6)](),'filter':FilterRuleDefSchema[a164_0x373ae2(0xd6)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a164_0x373ae2(0xfe)]()[a164_0x373ae2(0xd6)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x373ae2(0x10f)]('Column'),'column':z[a164_0x373ae2(0x116)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x373ae2(0x100)](()=>z[a164_0x373ae2(0xca)]({'type':z['enum']([a164_0x373ae2(0xd8),'Or']),'conditions':z[a164_0x373ae2(0xeb)](ConditionDefSchema),'description':z[a164_0x373ae2(0x116)]()[a164_0x373ae2(0xd6)]()}));function a164_0x3add(_0x46cf7b,_0x15b43b){_0x46cf7b=_0x46cf7b-0xc7;const _0x364734=a164_0x3647();let _0x3add3b=_0x364734[_0x46cf7b];return _0x3add3b;}export const SegmentRefConditionDefSchema=z[a164_0x373ae2(0xca)]({'type':z[a164_0x373ae2(0xcc)]([a164_0x373ae2(0xf6),a164_0x373ae2(0xdf)]),'segment':z[a164_0x373ae2(0x116)]()['min'](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a164_0x373ae2(0x100)](()=>z[a164_0x373ae2(0x10b)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x373ae2(0x100)](()=>z[a164_0x373ae2(0xca)]({'type':z[a164_0x373ae2(0xcc)](['And','Or']),'conditions':z[a164_0x373ae2(0xeb)](ConditionDefSchema),'description':z['string']()['optional']()}));export const SegmentDefSchema=z[a164_0x373ae2(0xca)]({'type':z['literal']('segment')['optional'](),'name':z['string']()['min'](0x1,a164_0x373ae2(0xf5)),'description':z[a164_0x373ae2(0x116)]()[a164_0x373ae2(0xd6)](),'folder':z[a164_0x373ae2(0x116)]()[a164_0x373ae2(0xd6)](),'rule':RuleDefSchema[a164_0x373ae2(0xd6)](),'kind':z[a164_0x373ae2(0xcc)]([a164_0x373ae2(0x115),a164_0x373ae2(0x105),a164_0x373ae2(0xee)])[a164_0x373ae2(0xd6)](),'visible':z[a164_0x373ae2(0xe2)]()['optional'](),'activations':z['array'](z['any']())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x25f2eb=a165_0x5e66;(function(_0x43789f,_0x5550f6){const _0x227d04=a165_0x5e66,_0x3caa70=_0x43789f();while(!![]){try{const _0x480c6c=-parseInt(_0x227d04(0x1bf))/0x1*(-parseInt(_0x227d04(0x1cf))/0x2)+parseInt(_0x227d04(0x1cd))/0x3+-parseInt(_0x227d04(0x1c3))/0x4*(parseInt(_0x227d04(0x1c0))/0x5)+-parseInt(_0x227d04(0x1d2))/0x6+-parseInt(_0x227d04(0x1c8))/0x7+parseInt(_0x227d04(0x1ca))/0x8*(parseInt(_0x227d04(0x1c5))/0x9)+parseInt(_0x227d04(0x1cb))/0xa;if(_0x480c6c===_0x5550f6)break;else _0x3caa70['push'](_0x3caa70['shift']());}catch(_0x3575da){_0x3caa70['push'](_0x3caa70['shift']());}}}(a165_0x57b2,0x41506));import{readFileSync}from'fs';import*as a165_0x16db5a from'path';function a165_0x5e66(_0x3c6191,_0x229cdb){_0x3c6191=_0x3c6191-0x1b8;const _0x57b20a=a165_0x57b2();let _0x5e6601=_0x57b20a[_0x3c6191];return _0x5e6601;}import*as a165_0x542335 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set(['email',a165_0x25f2eb(0x1bc)]);export function isJourneyDef(_0x1e3958){const _0xc55fdc=a165_0x25f2eb;return typeof _0x1e3958===_0xc55fdc(0x1b8)&&_0x1e3958!==null&&_0xc55fdc(0x1c1)in _0x1e3958&&_0x1e3958[_0xc55fdc(0x1c1)]===_0xc55fdc(0x1cc);}export function isCampaignDef(_0x1b5a71){const _0x3e7c05=a165_0x25f2eb;if(typeof _0x1b5a71!=='object'||_0x1b5a71===null)return![];const _0x58937f=_0x1b5a71,_0x590aa7=VALID_CAMPAIGN_TYPES['has'](_0x58937f[_0x3e7c05(0x1be)]);if(_0x58937f['type']===_0x3e7c05(0x1d1)&&_0x590aa7)return!![];if(_0x590aa7&&!_0x58937f[_0x3e7c05(0x1c1)])return!![];return![];}export function isTemplateDef(_0x317fc1){const _0x3295bc=a165_0x25f2eb;return typeof _0x317fc1==='object'&&_0x317fc1!==null&&'type'in _0x317fc1&&_0x317fc1[_0x3295bc(0x1c1)]==='template';}export function isValidationResult(_0x52c87e){const _0xe7bc09=a165_0x25f2eb;return!(_0xe7bc09(0x1c2)in _0x52c87e);}export function createParseErrorResult(_0x3f8670,_0x1ae370,_0x53dc45,_0x4e83b5,_0x519b9d=a165_0x25f2eb(0x1bd)){const _0x9b0d1a=a165_0x25f2eb;return{'filePath':_0x3f8670,'relativePath':_0x1ae370,'source':_0x53dc45,'result':{'valid':![],'errors':[{'level':_0x9b0d1a(0x1c9),'path':'','code':_0x9b0d1a(0x1c4),'message':_0x4e83b5}],'warnings':[]},'fileType':_0x519b9d};}export function validateYamlFile(_0x2ba55d,_0x2bf7e1,_0x517f76={}){const _0x46dc72=a165_0x25f2eb,_0x624bc4=a165_0x16db5a[_0x46dc72(0x1d0)](_0x2bf7e1,_0x2ba55d)||a165_0x16db5a[_0x46dc72(0x1d7)](_0x2ba55d);try{const _0x17de06=readFileSync(_0x2ba55d,_0x46dc72(0x1d4)),_0x42bbe8=a165_0x542335[_0x46dc72(0x1d6)](_0x17de06),_0x12f34d=_0x42bbe8[_0x46dc72(0x1c7)]();if(!_0x12f34d)return createParseErrorResult(_0x2ba55d,_0x624bc4,_0x17de06,_0x46dc72(0x1c6));let _0x23786c;if(isJourneyDef(_0x12f34d))_0x23786c=_0x46dc72(0x1cc);else{if(isCampaignDef(_0x12f34d))_0x23786c=_0x46dc72(0x1d1);else isTemplateDef(_0x12f34d)?_0x23786c=_0x46dc72(0x1d5):_0x23786c=_0x46dc72(0x1bd);}if(_0x517f76['filterType']&&_0x23786c!==_0x517f76[_0x46dc72(0x1ba)])return{'filePath':_0x2ba55d,'relativePath':_0x624bc4,'skipped':!![],'reason':'not\x20a\x20'+_0x517f76['filterType']};const _0x115ce8={'source':_0x17de06,'document':_0x42bbe8};let _0x3336f0;if(_0x23786c===_0x46dc72(0x1cc))_0x3336f0=validateJourneyDef(_0x12f34d,_0x115ce8);else{if(_0x23786c===_0x46dc72(0x1d1))_0x3336f0=validateCampaignDef(_0x12f34d,_0x115ce8);else _0x23786c===_0x46dc72(0x1d5)?_0x3336f0=validateTemplateDef(_0x12f34d,_0x115ce8):_0x3336f0=validateSegmentDef(_0x12f34d,_0x115ce8);}return{'filePath':_0x2ba55d,'relativePath':_0x624bc4,'source':_0x17de06,'result':_0x3336f0,'fileType':_0x23786c};}catch(_0x5fe46){const _0x1a19c1=_0x5fe46 instanceof Error?_0x5fe46['message']:String(_0x5fe46);return createParseErrorResult(_0x2ba55d,_0x624bc4,'',_0x46dc72(0x1ce)+_0x1a19c1);}}export function validateYamlFiles(_0x46566f,_0x1e52f3,_0x4207b4={}){return _0x46566f['map'](_0x44ba76=>validateYamlFile(_0x44ba76,_0x1e52f3,_0x4207b4));}export function calculateSummary(_0x112670){const _0x56ac16=a165_0x25f2eb;let _0x592d27=0x0,_0xbd1b91=0x0,_0x417eb0=0x0,_0x262e24=0x0;for(const _0x495111 of _0x112670){if(!isValidationResult(_0x495111)){_0x262e24++;continue;}_0x495111[_0x56ac16(0x1d3)][_0x56ac16(0x1bb)]?_0x592d27++:_0xbd1b91++,_0x417eb0+=_0x495111[_0x56ac16(0x1d3)][_0x56ac16(0x1d8)][_0x56ac16(0x1b9)];}return{'validCount':_0x592d27,'invalidCount':_0xbd1b91,'warningCount':_0x417eb0,'skippedCount':_0x262e24,'hasErrors':_0xbd1b91>0x0};}function a165_0x57b2(){const _0x7ddb19=['1137087sTixlU','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','toJSON','958643kqdzVY','error','8gLxrVc','7197650aEfapY','journey','334950DtiLPU','YAML\x20parse\x20error:\x20','994UgDICt','relative','campaign','1791690VfJUae','result','utf-8','template','parseDocument','basename','warnings','object','length','filterType','valid','push','segment','campaign_type','266rCGbux','17585vGvFPz','type','skipped','440vyptgP','YAML_PARSE_ERROR'];a165_0x57b2=function(){return _0x7ddb19;};return a165_0x57b2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x487ed6,_0x567e01){const _0x507a1f=a166_0x3afe,_0x4627c2=_0x487ed6();while(!![]){try{const _0x1e4281=parseInt(_0x507a1f(0x183))/0x1*(-parseInt(_0x507a1f(0x17a))/0x2)+parseInt(_0x507a1f(0x16e))/0x3*(parseInt(_0x507a1f(0x17b))/0x4)+parseInt(_0x507a1f(0x15f))/0x5*(parseInt(_0x507a1f(0x164))/0x6)+parseInt(_0x507a1f(0x165))/0x7+-parseInt(_0x507a1f(0x185))/0x8*(-parseInt(_0x507a1f(0x189))/0x9)+parseInt(_0x507a1f(0x167))/0xa+-parseInt(_0x507a1f(0x172))/0xb;if(_0x1e4281===_0x567e01)break;else _0x4627c2['push'](_0x4627c2['shift']());}catch(_0x48401b){_0x4627c2['push'](_0x4627c2['shift']());}}}(a166_0x3281,0xd7aaa));import*as a166_0x2c1a7a from'yaml';import a166_0x221e2e from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x117f6e,_0x4caf6b,_0x47e8ba){const _0x39eab4=a166_0x3afe;if(!_0x117f6e||!_0x4caf6b)return undefined;try{let _0x5d6f5d=_0x117f6e[_0x39eab4(0x168)](_0x47e8ba,!![]),_0x4ff550=[..._0x47e8ba];while((!_0x5d6f5d||typeof _0x5d6f5d!=='object'||!(_0x39eab4(0x186)in _0x5d6f5d)||!_0x5d6f5d[_0x39eab4(0x186)])&&_0x4ff550[_0x39eab4(0x16a)]>0x0){_0x4ff550['pop'](),_0x5d6f5d=_0x4ff550[_0x39eab4(0x16a)]>0x0?_0x117f6e[_0x39eab4(0x168)](_0x4ff550,!![]):_0x117f6e[_0x39eab4(0x187)];}if(!_0x5d6f5d||typeof _0x5d6f5d!=='object'||!(_0x39eab4(0x186)in _0x5d6f5d)||!_0x5d6f5d[_0x39eab4(0x186)])return undefined;const [_0x483197]=_0x5d6f5d['range'];return offsetToLocation(_0x4caf6b,_0x483197);}catch{return undefined;}}export function offsetToLocation(_0xfbb3c8,_0x2a819d){let _0x5dd117=0x1,_0x503e4e=0x1;for(let _0x42b7de=0x0;_0x42b7de<_0x2a819d&&_0x42b7de<_0xfbb3c8['length'];_0x42b7de++){_0xfbb3c8[_0x42b7de]==='\x0a'?(_0x5dd117++,_0x503e4e=0x1):_0x503e4e++;}return{'line':_0x5dd117,'column':_0x503e4e,'offset':_0x2a819d};}export function pathToArray(_0x5951f7){const _0x15d9bf=a166_0x3afe;if(!_0x5951f7)return[];return _0x5951f7['split']('.')[_0x15d9bf(0x176)](_0x1a6a77=>{const _0x2d6d29=_0x1a6a77['match'](/^(\w+)\[(\d+)\]$/);if(_0x2d6d29)return[_0x2d6d29[0x1],parseInt(_0x2d6d29[0x2],0xa)];return[_0x1a6a77];});}export function formatZodPath(_0x553d75){const _0x4a1d5d=a166_0x3afe;let _0x46e651='';for(const _0x390a50 of _0x553d75){if(typeof _0x390a50===_0x4a1d5d(0x17c))_0x46e651+='['+_0x390a50+']';else{const _0x29f89c=String(_0x390a50);_0x46e651+=_0x46e651?'.'+_0x29f89c:_0x29f89c;}}return _0x46e651;}export function flattenZodIssues(_0x457d73){const _0xdbbe6f=a166_0x3afe,_0x457bd7=[];for(const _0x4b9290 of _0x457d73){if(_0x4b9290[_0xdbbe6f(0x171)]==='invalid_union'&&_0xdbbe6f(0x170)in _0x4b9290){const _0x2e5919=_0x4b9290[_0xdbbe6f(0x170)];let _0x149a7a=_0x2e5919[0x0]||[];for(const _0x3056e0 of _0x2e5919){_0x3056e0[_0xdbbe6f(0x16a)]<_0x149a7a[_0xdbbe6f(0x16a)]&&(_0x149a7a=_0x3056e0);}const _0x3a0a7f=_0x149a7a[_0xdbbe6f(0x15d)](_0x5eff35=>({..._0x5eff35,'path':[..._0x4b9290[_0xdbbe6f(0x16f)],..._0x5eff35[_0xdbbe6f(0x16f)]]}));_0x457bd7[_0xdbbe6f(0x180)](...flattenZodIssues(_0x3a0a7f));}else _0x457bd7[_0xdbbe6f(0x180)](_0x4b9290);}return _0x457bd7;}export function safeParseYaml(_0xcb6f5,_0x53e6fe){const _0x1546be=a166_0x3afe,_0x1e315f=a166_0x2c1a7a[_0x1546be(0x169)](_0xcb6f5);if(!_0x1e315f||typeof _0x1e315f!==_0x1546be(0x179))throw new Error(_0x1546be(0x175));const _0x6042e1=_0x53e6fe['safeParse'](_0x1e315f);if(!_0x6042e1[_0x1546be(0x161)]){const _0x5c6aca=_0x6042e1[_0x1546be(0x16c)][_0x1546be(0x16b)][0x0],_0x48595b=formatZodPath(_0x5c6aca[_0x1546be(0x16f)]);throw new Error(_0x48595b?_0x1546be(0x174)+_0x48595b+_0x1546be(0x173)+_0x5c6aca[_0x1546be(0x182)]:'YAML\x20validation\x20error:\x20'+_0x5c6aca[_0x1546be(0x182)]);}return _0x6042e1[_0x1546be(0x160)];}export function formatIssueWithContext(_0x56fae0,_0x2fb327,_0x9710c5){const _0x3bffec=a166_0x3afe,_0x4ee797=[],_0x5b7533=_0x56fae0[_0x3bffec(0x16d)]===_0x3bffec(0x16c),_0x3ac503=_0x5b7533?a166_0x221e2e['red']:a166_0x221e2e['yellow'],_0x2ba81a=_0x5b7533?a166_0x221e2e[_0x3bffec(0x17d)]:a166_0x221e2e[_0x3bffec(0x15c)],_0x28f8dd=_0x9710c5?a166_0x221e2e['cyan'](_0x9710c5+':'):'';if(_0x56fae0['location']){const _0x19240d=a166_0x221e2e[_0x3bffec(0x163)](_0x56fae0['location']['line']+':'+_0x56fae0[_0x3bffec(0x15e)][_0x3bffec(0x178)]);_0x4ee797[_0x3bffec(0x180)](''+_0x28f8dd+_0x19240d+':\x20'+_0x3ac503(_0x56fae0[_0x3bffec(0x16d)])+'\x20'+_0x2ba81a('['+_0x56fae0[_0x3bffec(0x171)]+']'));}else _0x4ee797[_0x3bffec(0x180)](''+_0x28f8dd+a166_0x221e2e[_0x3bffec(0x17e)](_0x56fae0[_0x3bffec(0x16f)])+':\x20'+_0x3ac503(_0x56fae0['level'])+'\x20'+_0x2ba81a('['+_0x56fae0['code']+']'));_0x4ee797[_0x3bffec(0x180)](_0x56fae0[_0x3bffec(0x182)]);if(_0x56fae0[_0x3bffec(0x15e)]&&_0x2fb327){const _0x387171=_0x2fb327[_0x3bffec(0x181)]('\x0a'),{line:_0xafd412,column:_0x16284d}=_0x56fae0[_0x3bffec(0x15e)],_0x3cf109=Math['max'](0x1,_0xafd412-0x1),_0xf10894=Math[_0x3bffec(0x166)](_0x387171['length'],_0xafd412+0x1);_0x4ee797[_0x3bffec(0x180)]('');for(let _0x57b57c=_0x3cf109;_0x57b57c<=_0xf10894;_0x57b57c++){const _0x5a9e70=_0x387171[_0x57b57c-0x1]||'',_0x4da60b=a166_0x221e2e[_0x3bffec(0x17e)](_0x57b57c[_0x3bffec(0x17f)]()[_0x3bffec(0x184)](0x4)),_0x1fa347=a166_0x221e2e['dim'](_0x3bffec(0x177));if(_0x57b57c===_0xafd412){_0x4ee797['push']('\x20\x20'+_0x4da60b+_0x1fa347+_0x3ac503(_0x5a9e70));const _0x4d0953='\x20'['repeat'](0x4+0x3+_0x16284d-0x1);_0x4ee797['push']('\x20\x20'+_0x4d0953+_0x3ac503('^'));}else _0x4ee797[_0x3bffec(0x180)]('\x20\x20'+_0x4da60b+_0x1fa347+a166_0x221e2e[_0x3bffec(0x17e)](_0x5a9e70));}}return _0x4ee797[_0x3bffec(0x162)]('\x0a');}function a166_0x3281(){const _0x414aeb=['errors','code','29757662qwWzDZ','\x27:\x20','YAML\x20validation\x20error\x20at\x20\x27','Invalid\x20YAML:\x20expected\x20an\x20object','flatMap','\x20|\x20','column','object','526iKDSOo','40ckaReu','number','red','dim','toString','push','split','message','3147PibJLu','padStart','16pGKMIy','range','contents','warnings','3294585BJZYme','yellow','map','location','18845gnqkSw','data','success','join','cyan','438oYfNDE','2712640jULyEo','min','14450260Yajsds','getIn','parse','length','issues','error','level','472938MyIKgW','path'];a166_0x3281=function(){return _0x414aeb;};return a166_0x3281();}function a166_0x3afe(_0x37c32c,_0x383095){_0x37c32c=_0x37c32c-0x15c;const _0x3281db=a166_0x3281();let _0x3afe1d=_0x3281db[_0x37c32c];return _0x3afe1d;}export function formatValidationResult(_0x54ee8e,_0x62f03a,_0x2f6cfe){const _0x3b3c32=a166_0x3afe,_0x2e1e13=[];for(const _0x565881 of _0x54ee8e[_0x3b3c32(0x170)]){_0x2e1e13['push'](formatIssueWithContext(_0x565881,_0x62f03a,_0x2f6cfe)),_0x2e1e13[_0x3b3c32(0x180)]('');}for(const _0x498bff of _0x54ee8e[_0x3b3c32(0x188)]){_0x2e1e13[_0x3b3c32(0x180)](formatIssueWithContext(_0x498bff,_0x62f03a,_0x2f6cfe)),_0x2e1e13[_0x3b3c32(0x180)]('');}return _0x2e1e13['join']('\x0a');}
|