@treasuredata/tdx 0.25.2 → 0.25.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/engage-command.js +1 -1
  21. package/dist/commands/job-command.js +1 -1
  22. package/dist/commands/journey-command.js +1 -1
  23. package/dist/commands/journey-validate-command.js +1 -1
  24. package/dist/commands/llm-command.js +1 -1
  25. package/dist/commands/mcp-command.js +1 -1
  26. package/dist/commands/parent-segment-command.js +1 -1
  27. package/dist/commands/profile-command.js +1 -1
  28. package/dist/commands/profiles-command.js +1 -1
  29. package/dist/commands/query-command.js +1 -1
  30. package/dist/commands/schedule-command.js +1 -1
  31. package/dist/commands/segment-command.js +1 -1
  32. package/dist/commands/segment-create-command.js +1 -1
  33. package/dist/commands/segment-fields-command.js +1 -1
  34. package/dist/commands/segment-pull-command.js +1 -1
  35. package/dist/commands/segment-push-command.js +1 -1
  36. package/dist/commands/segment-update-command.js +1 -1
  37. package/dist/commands/segment-use-command.js +1 -1
  38. package/dist/commands/segment-validate-command.js +1 -1
  39. package/dist/commands/segments.js +1 -1
  40. package/dist/commands/show.js +1 -1
  41. package/dist/commands/status-command.js +1 -1
  42. package/dist/commands/tables.js +1 -1
  43. package/dist/commands/unset-command.js +1 -1
  44. package/dist/commands/use-command.d.ts.map +1 -1
  45. package/dist/commands/use-command.js +1 -1
  46. package/dist/commands/use-command.js.map +1 -1
  47. package/dist/commands/user-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/command-output.js +1 -1
  51. package/dist/core/config.d.ts +16 -0
  52. package/dist/core/config.d.ts.map +1 -1
  53. package/dist/core/config.js +1 -1
  54. package/dist/core/config.js.map +1 -1
  55. package/dist/core/connection-cache.js +1 -1
  56. package/dist/core/constants.js +1 -1
  57. package/dist/core/credential-cache.js +1 -1
  58. package/dist/core/global-context.js +1 -1
  59. package/dist/core/keychain.js +1 -1
  60. package/dist/core/profile.js +1 -1
  61. package/dist/core/project-config.js +1 -1
  62. package/dist/core/session.js +1 -1
  63. package/dist/core/user-cache.js +1 -1
  64. package/dist/core/version.js +1 -1
  65. package/dist/index.js +1 -1
  66. package/dist/mcp/server.js +1 -1
  67. package/dist/mcp/tools/index.js +1 -1
  68. package/dist/mcp/tools/tdx-run.js +1 -1
  69. package/dist/mcp/tools/tdx-search.js +1 -1
  70. package/dist/mcp/utils.js +1 -1
  71. package/dist/proxy/claude-usage-tracker.js +1 -1
  72. package/dist/proxy/passthrough-server.js +1 -1
  73. package/dist/proxy/sse-usage-parser.js +1 -1
  74. package/dist/sdk/agent/agent-config.js +1 -1
  75. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  76. package/dist/sdk/agent/agent-yaml.js +1 -1
  77. package/dist/sdk/agent/test/evaluator.js +1 -1
  78. package/dist/sdk/agent/test/executor.js +1 -1
  79. package/dist/sdk/agent/test/index.js +1 -1
  80. package/dist/sdk/agent/test/output.js +1 -1
  81. package/dist/sdk/agent/test/parser.js +1 -1
  82. package/dist/sdk/api.js +1 -1
  83. package/dist/sdk/client/cdp-api-client.js +1 -1
  84. package/dist/sdk/client/endpoints.js +1 -1
  85. package/dist/sdk/client/engage-api-client.js +1 -1
  86. package/dist/sdk/client/http-client.js +1 -1
  87. package/dist/sdk/client/llm-api-client.js +1 -1
  88. package/dist/sdk/client/rate-limiter.js +1 -1
  89. package/dist/sdk/client/td-api-client.js +1 -1
  90. package/dist/sdk/client/trino-api-client.js +1 -1
  91. package/dist/sdk/client/workflow-client.js +1 -1
  92. package/dist/sdk/connection-validator.js +1 -1
  93. package/dist/sdk/connection.js +1 -1
  94. package/dist/sdk/engage.js +1 -1
  95. package/dist/sdk/errors.js +1 -1
  96. package/dist/sdk/index.js +1 -1
  97. package/dist/sdk/io/index.js +1 -1
  98. package/dist/sdk/io/node-filesystem.js +1 -1
  99. package/dist/sdk/job.js +1 -1
  100. package/dist/sdk/journey.js +1 -1
  101. package/dist/sdk/llm/chat-cache.js +1 -1
  102. package/dist/sdk/llm/index.js +1 -1
  103. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  104. package/dist/sdk/llm/model-factors.js +1 -1
  105. package/dist/sdk/query/index.js +1 -1
  106. package/dist/sdk/query/sql-parser.js +1 -1
  107. package/dist/sdk/schedule.js +1 -1
  108. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  109. package/dist/sdk/segment/fields-display.js +1 -1
  110. package/dist/sdk/segment/file-discovery.js +1 -1
  111. package/dist/sdk/segment/journey-utils.js +1 -1
  112. package/dist/sdk/segment/journey-yaml.js +1 -1
  113. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  114. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  115. package/dist/sdk/segment/pull-workflow.js +1 -1
  116. package/dist/sdk/segment/push-workflow.js +1 -1
  117. package/dist/sdk/segment/resolution-context.js +1 -1
  118. package/dist/sdk/segment/segment-path-parser.js +1 -1
  119. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  120. package/dist/sdk/segment/target-resolution.js +1 -1
  121. package/dist/sdk/segment/tdx-config.js +1 -1
  122. package/dist/sdk/segment/validate-files.js +1 -1
  123. package/dist/sdk/segment/yaml-validator.js +1 -1
  124. package/dist/sdk/segment.js +1 -1
  125. package/dist/sdk/types/index.js +1 -1
  126. package/dist/sdk/types/progress.js +1 -1
  127. package/dist/sdk/user.js +1 -1
  128. package/dist/sdk/util/format-detector.js +1 -1
  129. package/dist/sdk/util/formatters.js +1 -1
  130. package/dist/sdk/util/index.js +1 -1
  131. package/dist/sdk/util/tree-formatter.js +1 -1
  132. package/dist/sdk/workflow/archive-validation.js +1 -1
  133. package/dist/sdk/workflow/clone-workflow.js +1 -1
  134. package/dist/sdk/workflow/index.js +1 -1
  135. package/dist/sdk/workflow/pull-workflow.js +1 -1
  136. package/dist/sdk/workflow/push-workflow.js +1 -1
  137. package/dist/sdk/workflow/tdx-config.js +1 -1
  138. package/dist/sdk/workflow/workflow-utils.js +1 -1
  139. package/dist/test-utils/command-runner.js +1 -1
  140. package/dist/test-utils/factories.js +1 -1
  141. package/dist/test-utils/fixtures.js +1 -1
  142. package/dist/test-utils/http-mock.js +1 -1
  143. package/dist/test-utils/index.js +1 -1
  144. package/dist/utils/async.js +1 -1
  145. package/dist/utils/colors.js +1 -1
  146. package/dist/utils/diff.js +1 -1
  147. package/dist/utils/file-permissions.js +1 -1
  148. package/dist/utils/global-cache.js +1 -1
  149. package/dist/utils/json-loader.js +1 -1
  150. package/dist/utils/local-cache.js +1 -1
  151. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  152. package/dist/utils/logger/formatters/index.js +1 -1
  153. package/dist/utils/logger/handlers/console-handler.js +1 -1
  154. package/dist/utils/logger/handlers/file-handler.js +1 -1
  155. package/dist/utils/logger/handlers/index.js +1 -1
  156. package/dist/utils/logger/handlers/null-handler.js +1 -1
  157. package/dist/utils/logger/index.js +1 -1
  158. package/dist/utils/logger/logger.js +1 -1
  159. package/dist/utils/logger/types.js +1 -1
  160. package/dist/utils/option-validation.js +1 -1
  161. package/dist/utils/port.js +1 -1
  162. package/dist/utils/process.js +1 -1
  163. package/dist/utils/prompt.js +1 -1
  164. package/dist/utils/spinner.js +1 -1
  165. package/dist/utils/sse-parser.js +1 -1
  166. package/dist/utils/string-utils.js +1 -1
  167. package/dist/utils/table-ref-parser.js +1 -1
  168. package/dist/utils/tdx-logger.js +1 -1
  169. package/dist/utils/version-check.d.ts +4 -1
  170. package/dist/utils/version-check.d.ts.map +1 -1
  171. package/dist/utils/version-check.js +1 -1
  172. package/dist/utils/version-check.js.map +1 -1
  173. package/package.json +2 -1
@@ -1 +1 @@
1
- (function(_0x5a4e20,_0x2c0490){const _0x10376b=a100_0x2505,_0x4a8773=_0x5a4e20();while(!![]){try{const _0x560e47=parseInt(_0x10376b(0x124))/0x1*(parseInt(_0x10376b(0x12f))/0x2)+-parseInt(_0x10376b(0x142))/0x3*(-parseInt(_0x10376b(0x130))/0x4)+-parseInt(_0x10376b(0x125))/0x5+parseInt(_0x10376b(0x12d))/0x6*(parseInt(_0x10376b(0x129))/0x7)+parseInt(_0x10376b(0x136))/0x8*(parseInt(_0x10376b(0x12e))/0x9)+parseInt(_0x10376b(0x137))/0xa+-parseInt(_0x10376b(0x121))/0xb*(parseInt(_0x10376b(0x138))/0xc);if(_0x560e47===_0x2c0490)break;else _0x4a8773['push'](_0x4a8773['shift']());}catch(_0x5f3211){_0x4a8773['push'](_0x4a8773['shift']());}}}(a100_0x4d51,0xb126a));import{readFileSync}from'fs';import{createInterface}from'readline';export function stripSqlComments(_0x367459){const _0x54f3ea=a100_0x2505;let _0x30ce6a=_0x367459[_0x54f3ea(0x127)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x30ce6a=_0x30ce6a[_0x54f3ea(0x127)](/--.*$/gm,''),_0x30ce6a[_0x54f3ea(0x13d)]();}function isEscaped(_0x5badf5,_0x48ad54){let _0x457aad=0x0;for(let _0x257d9f=_0x48ad54-0x1;_0x257d9f>=0x0&&_0x5badf5[_0x257d9f]==='\x5c';_0x257d9f--){_0x457aad++;}return _0x457aad%0x2===0x1;}export function splitSqlStatements(_0x583045){const _0x24163b=a100_0x2505,_0x169ba6=stripSqlComments(_0x583045);if(!_0x169ba6)throw new Error(_0x24163b(0x132));const _0x42a114=[];let _0x203d41='',_0x4e3338=![],_0x52eceb=![],_0x4be53a=![];for(let _0x4696a1=0x0;_0x4696a1<_0x583045[_0x24163b(0x12a)];_0x4696a1++){const _0x45ba9b=_0x583045[_0x4696a1];if(_0x45ba9b==='\x27'&&!isEscaped(_0x583045,_0x4696a1)&&!_0x52eceb&&!_0x4be53a)_0x4e3338=!_0x4e3338;else{if(_0x45ba9b==='\x22'&&!isEscaped(_0x583045,_0x4696a1)&&!_0x4e3338&&!_0x4be53a)_0x52eceb=!_0x52eceb;else _0x45ba9b==='`'&&!isEscaped(_0x583045,_0x4696a1)&&!_0x4e3338&&!_0x52eceb&&(_0x4be53a=!_0x4be53a);}if(_0x45ba9b===';'&&!_0x4e3338&&!_0x52eceb&&!_0x4be53a){const _0x15a925=_0x203d41[_0x24163b(0x13d)]();_0x15a925&&_0x42a114[_0x24163b(0x133)](_0x15a925),_0x203d41='';}else _0x203d41+=_0x45ba9b;}const _0x44a100=_0x203d41[_0x24163b(0x13d)]();_0x44a100&&_0x42a114[_0x24163b(0x133)](_0x44a100);const _0x483f51=_0x42a114['map'](_0x3a9b3b=>_0x3a9b3b[_0x24163b(0x13d)]())[_0x24163b(0x126)](_0x5a7892=>{const _0xa2ab75=stripSqlComments(_0x5a7892);return _0xa2ab75['length']>0x0;});if(_0x483f51[_0x24163b(0x12a)]===0x0)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');return _0x483f51;}export function readFileContent(_0x53f574){const _0x574e41=a100_0x2505;try{return readFileSync(_0x53f574,_0x574e41(0x141));}catch(_0x567032){const _0x3f5973=_0x567032[_0x574e41(0x12b)];if(_0x3f5973===_0x574e41(0x13b))throw new Error(_0x574e41(0x131)+_0x53f574+_0x574e41(0x139));else{if(_0x3f5973==='EACCES')throw new Error(_0x574e41(0x13c)+_0x53f574+'\x27');else throw new Error('Error\x20reading\x20file\x20\x27'+_0x53f574+_0x574e41(0x12c)+_0x567032[_0x574e41(0x122)]);}}}export function readSqlStatementsFromFile(_0x3942c1){const _0x527024=a100_0x2505,_0x50d210=readFileContent(_0x3942c1);try{return splitSqlStatements(_0x50d210);}catch(_0x2a0145){throw new Error(_0x527024(0x131)+_0x3942c1+'\x27\x20'+_0x2a0145[_0x527024(0x122)][_0x527024(0x123)]());}}function a100_0x4d51(){const _0x5dd2dd=['length','code','\x27:\x20','100602ZQEUBM','8939358YhgwhO','866958YyYjqX','4njFTub','File\x20\x27','Content\x20contains\x20no\x20SQL\x20statements','push','error','Error\x20reading\x20from\x20stdin:\x20','8djazFH','5202840zNIcWj','17855688kjQbuZ','\x27\x20not\x20found','test','ENOENT','Permission\x20denied\x20reading\x20file\x20\x27','trim','stdin\x20','line','close','utf-8','3150033rAFgii','11dxtwii','message','toLowerCase','1vLGzkM','5342455HheyuA','filter','replace','stdin','119oFLtSk'];a100_0x4d51=function(){return _0x5dd2dd;};return a100_0x4d51();}export async function readStdinContent(){const _0x219c5b=a100_0x2505;if(process[_0x219c5b(0x128)]['isTTY'])throw new Error('No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-');return new Promise((_0x4d615e,_0x277bad)=>{const _0x1fab30=_0x219c5b,_0x213ece=[],_0x21a508=createInterface({'input':process[_0x1fab30(0x128)],'terminal':![]});_0x21a508['on'](_0x1fab30(0x13f),_0x17abd8=>{const _0x22f7f6=_0x1fab30;_0x213ece[_0x22f7f6(0x133)](_0x17abd8);}),_0x21a508['on']('close',()=>{_0x4d615e(_0x213ece['join']('\x0a'));}),_0x21a508['on'](_0x1fab30(0x134),_0x3b0f17=>{const _0xe2737c=_0x1fab30;_0x21a508[_0xe2737c(0x140)](),_0x277bad(new Error(_0xe2737c(0x135)+_0x3b0f17[_0xe2737c(0x122)]));});});}function a100_0x2505(_0x56e402,_0x29a960){_0x56e402=_0x56e402-0x121;const _0x4d51f6=a100_0x4d51();let _0x25050c=_0x4d51f6[_0x56e402];return _0x25050c;}export async function readSqlStatementsFromStdin(){const _0xbcc0d2=a100_0x2505,_0xeccb5b=await readStdinContent();try{return splitSqlStatements(_0xeccb5b);}catch(_0x276c25){throw new Error(_0xbcc0d2(0x13e)+_0x276c25[_0xbcc0d2(0x122)][_0xbcc0d2(0x123)]());}}export function isSqlFilePath(_0x3c34b1){const _0x3467a1=a100_0x2505;return/\w\.sql$/[_0x3467a1(0x13a)](_0x3c34b1);}
1
+ (function(_0x57ffee,_0x299875){const _0x5f0761=a100_0x568e,_0x14981b=_0x57ffee();while(!![]){try{const _0x4d6e85=-parseInt(_0x5f0761(0xf2))/0x1*(-parseInt(_0x5f0761(0xe2))/0x2)+-parseInt(_0x5f0761(0xfe))/0x3+parseInt(_0x5f0761(0xf4))/0x4+parseInt(_0x5f0761(0xe3))/0x5*(-parseInt(_0x5f0761(0xef))/0x6)+-parseInt(_0x5f0761(0xe8))/0x7*(parseInt(_0x5f0761(0xed))/0x8)+parseInt(_0x5f0761(0xf6))/0x9+parseInt(_0x5f0761(0xf1))/0xa;if(_0x4d6e85===_0x299875)break;else _0x14981b['push'](_0x14981b['shift']());}catch(_0xdcdc89){_0x14981b['push'](_0x14981b['shift']());}}}(a100_0x1949,0x5ca48));import{readFileSync}from'fs';import{createInterface}from'readline';export function stripSqlComments(_0x27ed62){const _0x5f45bc=a100_0x568e;let _0x3120f2=_0x27ed62[_0x5f45bc(0xff)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x3120f2=_0x3120f2[_0x5f45bc(0xff)](/--.*$/gm,''),_0x3120f2[_0x5f45bc(0xf9)]();}function a100_0x1949(){const _0x2303a7=['1280555hLfLNC','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','isTTY','message','length','7zinhOh','EACCES','File\x20\x27','Error\x20reading\x20file\x20\x27','utf-8','5832360JZyRdl','ENOENT','6alpHEv','close','3653230sFqMal','1vRrius','map','267060AoQDnZ','code','6269238KSIgEF','error','stdin\x20','trim','line','join','\x27:\x20','stdin','392163KBRkjO','replace','Permission\x20denied\x20reading\x20file\x20\x27','toLowerCase','Content\x20contains\x20no\x20SQL\x20statements','push','Error\x20reading\x20from\x20stdin:\x20','filter','733342cvXNwf'];a100_0x1949=function(){return _0x2303a7;};return a100_0x1949();}function isEscaped(_0x50df37,_0x5844b0){let _0x525245=0x0;for(let _0x1eda49=_0x5844b0-0x1;_0x1eda49>=0x0&&_0x50df37[_0x1eda49]==='\x5c';_0x1eda49--){_0x525245++;}return _0x525245%0x2===0x1;}export function splitSqlStatements(_0x4a7c14){const _0x339fcb=a100_0x568e,_0x24580a=stripSqlComments(_0x4a7c14);if(!_0x24580a)throw new Error(_0x339fcb(0x102));const _0x3e65ba=[];let _0x2f155c='',_0x468923=![],_0x7d9e33=![],_0x5382d9=![];for(let _0x20db2f=0x0;_0x20db2f<_0x4a7c14[_0x339fcb(0xe7)];_0x20db2f++){const _0x333246=_0x4a7c14[_0x20db2f];if(_0x333246==='\x27'&&!isEscaped(_0x4a7c14,_0x20db2f)&&!_0x7d9e33&&!_0x5382d9)_0x468923=!_0x468923;else{if(_0x333246==='\x22'&&!isEscaped(_0x4a7c14,_0x20db2f)&&!_0x468923&&!_0x5382d9)_0x7d9e33=!_0x7d9e33;else _0x333246==='`'&&!isEscaped(_0x4a7c14,_0x20db2f)&&!_0x468923&&!_0x7d9e33&&(_0x5382d9=!_0x5382d9);}if(_0x333246===';'&&!_0x468923&&!_0x7d9e33&&!_0x5382d9){const _0x327f6a=_0x2f155c[_0x339fcb(0xf9)]();_0x327f6a&&_0x3e65ba[_0x339fcb(0xdf)](_0x327f6a),_0x2f155c='';}else _0x2f155c+=_0x333246;}const _0x32e7f4=_0x2f155c[_0x339fcb(0xf9)]();_0x32e7f4&&_0x3e65ba['push'](_0x32e7f4);const _0x41c978=_0x3e65ba[_0x339fcb(0xf3)](_0x4c2b0c=>_0x4c2b0c[_0x339fcb(0xf9)]())[_0x339fcb(0xe1)](_0x49c002=>{const _0x7116de=_0x339fcb,_0x2cc424=stripSqlComments(_0x49c002);return _0x2cc424[_0x7116de(0xe7)]>0x0;});if(_0x41c978[_0x339fcb(0xe7)]===0x0)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');return _0x41c978;}export function readFileContent(_0x2558dd){const _0x401577=a100_0x568e;try{return readFileSync(_0x2558dd,_0x401577(0xec));}catch(_0xb9ed8c){const _0x3250d8=_0xb9ed8c[_0x401577(0xf5)];if(_0x3250d8===_0x401577(0xee))throw new Error(_0x401577(0xea)+_0x2558dd+'\x27\x20not\x20found');else{if(_0x3250d8===_0x401577(0xe9))throw new Error(_0x401577(0x100)+_0x2558dd+'\x27');else throw new Error(_0x401577(0xeb)+_0x2558dd+_0x401577(0xfc)+_0xb9ed8c[_0x401577(0xe6)]);}}}export function readSqlStatementsFromFile(_0x3f2e32){const _0x4e6170=a100_0x568e,_0x5bbdc3=readFileContent(_0x3f2e32);try{return splitSqlStatements(_0x5bbdc3);}catch(_0x32e131){throw new Error(_0x4e6170(0xea)+_0x3f2e32+'\x27\x20'+_0x32e131[_0x4e6170(0xe6)]['toLowerCase']());}}export async function readStdinContent(){const _0x3935cf=a100_0x568e;if(process[_0x3935cf(0xfd)][_0x3935cf(0xe5)])throw new Error(_0x3935cf(0xe4));return new Promise((_0x47c06a,_0x4ec3fa)=>{const _0x4974d2=_0x3935cf,_0x26314b=[],_0xdbe92a=createInterface({'input':process['stdin'],'terminal':![]});_0xdbe92a['on'](_0x4974d2(0xfa),_0x1a1314=>{_0x26314b['push'](_0x1a1314);}),_0xdbe92a['on'](_0x4974d2(0xf0),()=>{const _0x192c76=_0x4974d2;_0x47c06a(_0x26314b[_0x192c76(0xfb)]('\x0a'));}),_0xdbe92a['on'](_0x4974d2(0xf7),_0x3f563b=>{const _0x211c3a=_0x4974d2;_0xdbe92a[_0x211c3a(0xf0)](),_0x4ec3fa(new Error(_0x211c3a(0xe0)+_0x3f563b[_0x211c3a(0xe6)]));});});}function a100_0x568e(_0x555337,_0x2f3ceb){_0x555337=_0x555337-0xdf;const _0x19492e=a100_0x1949();let _0x568ef9=_0x19492e[_0x555337];return _0x568ef9;}export async function readSqlStatementsFromStdin(){const _0x477a8b=a100_0x568e,_0x1f93b8=await readStdinContent();try{return splitSqlStatements(_0x1f93b8);}catch(_0x54b688){throw new Error(_0x477a8b(0xf8)+_0x54b688[_0x477a8b(0xe6)][_0x477a8b(0x101)]());}}export function isSqlFilePath(_0x1fbab2){return/\w\.sql$/['test'](_0x1fbab2);}
@@ -1 +1 @@
1
- const a101_0x39f250=a101_0x500e;(function(_0x265c2c,_0x10dd63){const _0x35d025=a101_0x500e,_0x43c978=_0x265c2c();while(!![]){try{const _0x47c5f2=-parseInt(_0x35d025(0x89))/0x1+-parseInt(_0x35d025(0x94))/0x2+parseInt(_0x35d025(0x96))/0x3+parseInt(_0x35d025(0xaa))/0x4+-parseInt(_0x35d025(0x95))/0x5+parseInt(_0x35d025(0x84))/0x6+parseInt(_0x35d025(0x99))/0x7;if(_0x47c5f2===_0x10dd63)break;else _0x43c978['push'](_0x43c978['shift']());}catch(_0x21e906){_0x43c978['push'](_0x43c978['shift']());}}}(a101_0x1440,0xadeba));function a101_0x500e(_0xa8d8ae,_0x3f2726){_0xa8d8ae=_0xa8d8ae-0x84;const _0x144083=a101_0x1440();let _0x500e9e=_0x144083[_0xa8d8ae];return _0x500e9e;}import{TDApiClient}from'./client/td-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function a101_0x1440(){const _0x27af09=['map','scheduled','type','database','run','getScheduleHistory','2360142WqQCLc','594105KmrurW','2328657RQELhk','test','Invalid\x20time\x20format:\x20','3449117MBTRaz','push','filter','createSchedule','\x5c$&','INVALID_ARGUMENT','string','create','getTime','replace','limit','pagination','time','updateSchedule','num','name','runSchedule','3121364TKLBpZ','desc','client','history','listQueries','queries','Schedule\x20not\x20found:\x20','end_at','updated_at','query','now','update','Type\x20is\x20required','floor','length','pattern','delete','643296lzSpKa','created_at','num\x20must\x20be\x20between\x201\x20and\x2010','cron','Query\x20is\x20required','145237AqaPwy','NOT_FOUND','slice','Schedule\x20name\x20is\x20required','listSchedules'];a101_0x1440=function(){return _0x27af09;};return a101_0x1440();}function normalizeTimestamp(_0x2b0605){const _0x55a12a=a101_0x500e;if(!_0x2b0605)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/['test'](_0x2b0605))return _0x2b0605;return _0x2b0605[_0x55a12a(0xa2)]('\x20UTC','Z')[_0x55a12a(0xa2)]('\x20','T');}export class ScheduleSDK{[a101_0x39f250(0xac)];constructor(_0x2a8ebc){const _0xc76828=a101_0x39f250;this[_0xc76828(0xac)]=new TDApiClient(_0x2a8ebc);}async['list'](_0x449d78){const _0x5ab88b=a101_0x39f250,_0x24e7ae=await this[_0x5ab88b(0xac)]['listSchedules'](),_0x20a36d=_0x24e7ae[_0x5ab88b(0x8e)](_0xb0716=>({..._0xb0716,'created_at':normalizeTimestamp(_0xb0716[_0x5ab88b(0x85)])??_0xb0716[_0x5ab88b(0x85)]}));if(_0x449d78?.[_0x5ab88b(0xa3)]&&_0x449d78[_0x5ab88b(0xa3)]>0x0)return _0x20a36d[_0x5ab88b(0x8b)](0x0,_0x449d78[_0x5ab88b(0xa3)]);return _0x20a36d;}async[a101_0x39f250(0xae)](_0x3a9580){const _0x36a5b8=a101_0x39f250,_0x3fb5f8=0x64,_0x59bc9c=_0x3a9580?.[_0x36a5b8(0xa3)],_0x1e6b05=[];let _0x246cec=!![],_0x327d8f,_0x4e96f2,_0x1bf4a7;if(_0x3a9580?.['pattern']){const _0x1bd4a0=_0x3a9580[_0x36a5b8(0xb9)]['replace'](/[.+^${}()|[\]\\]/g,_0x36a5b8(0x9d)),_0x50732c=_0x1bd4a0[_0x36a5b8(0xa2)](/\*/g,'.*')['replace'](/\?/g,'.');_0x1bf4a7=new RegExp('^'+_0x50732c+'$','i');}while(_0x246cec&&(!_0x59bc9c||_0x1e6b05[_0x36a5b8(0xb8)]<_0x59bc9c)){const _0x17cf3f=await this[_0x36a5b8(0xac)][_0x36a5b8(0xae)]({'anchor_column':_0x36a5b8(0xb2),'sort_direction':_0x36a5b8(0xab),'page_size':_0x3fb5f8,'anchor_id':_0x327d8f,'anchor_value':_0x4e96f2});let _0x36b0fb=_0x17cf3f[_0x36a5b8(0xaf)];_0x3a9580?.[_0x36a5b8(0x8f)]&&(_0x36b0fb=_0x36b0fb[_0x36a5b8(0x9b)](_0x430c77=>_0x430c77[_0x36a5b8(0x87)]!==null));_0x1bf4a7&&(_0x36b0fb=_0x36b0fb[_0x36a5b8(0x9b)](_0x366e64=>_0x366e64[_0x36a5b8(0xa8)]&&_0x1bf4a7[_0x36a5b8(0x97)](_0x366e64[_0x36a5b8(0xa8)])));_0x1e6b05[_0x36a5b8(0x9a)](..._0x36b0fb),_0x246cec=_0x17cf3f[_0x36a5b8(0xa4)]['has_next_page'];if(_0x246cec&&_0x17cf3f['queries'][_0x36a5b8(0xb8)]>0x0){const _0x126b4a=_0x17cf3f[_0x36a5b8(0xaf)][_0x17cf3f[_0x36a5b8(0xaf)][_0x36a5b8(0xb8)]-0x1];_0x327d8f=_0x126b4a['id'],_0x4e96f2=_0x126b4a[_0x36a5b8(0xb2)];}}const _0xba4f7c=_0x59bc9c?_0x1e6b05[_0x36a5b8(0x8b)](0x0,_0x59bc9c):_0x1e6b05;return{'queries':_0xba4f7c,'pagination':{'has_next_page':_0x246cec||(_0x59bc9c?_0x1e6b05['length']>_0x59bc9c:![])}};}async['show'](_0x23ef50){const _0x429a2c=a101_0x39f250,_0x46c6f6=await this[_0x429a2c(0xac)][_0x429a2c(0x8d)](),_0x3748e6=_0x46c6f6['find'](_0x51551e=>_0x51551e[_0x429a2c(0xa8)]===_0x23ef50);if(!_0x3748e6)throw new SDKError(ErrorCode[_0x429a2c(0x8a)],_0x429a2c(0xb0)+_0x23ef50);return{..._0x3748e6,'created_at':normalizeTimestamp(_0x3748e6[_0x429a2c(0x85)])??_0x3748e6[_0x429a2c(0x85)]};}async[a101_0x39f250(0xa0)](_0x3eb49c,_0x27c2ce){const _0x1c6291=a101_0x39f250;if(!_0x3eb49c)throw new SDKError(ErrorCode[_0x1c6291(0x9e)],'Schedule\x20name\x20is\x20required');if(!_0x27c2ce[_0x1c6291(0x91)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Database\x20is\x20required');if(!_0x27c2ce[_0x1c6291(0xb3)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1c6291(0x88));if(!_0x27c2ce[_0x1c6291(0x90)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1c6291(0xb6));return await this[_0x1c6291(0xac)][_0x1c6291(0x9c)](_0x3eb49c,_0x27c2ce);}async[a101_0x39f250(0xb5)](_0x4eed28,_0xaa6f9){const _0x191c4c=a101_0x39f250;if(!_0x4eed28)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Schedule\x20name\x20is\x20required');return await this['client'][_0x191c4c(0xa6)](_0x4eed28,_0xaa6f9);}async[a101_0x39f250(0xba)](_0x24edbd){const _0x44f271=a101_0x39f250;if(!_0x24edbd)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x44f271(0x8c));return await this['client']['deleteSchedule'](_0x24edbd);}async[a101_0x39f250(0x92)](_0x408f5e,_0x3653ce){const _0x19213f=a101_0x39f250;if(!_0x408f5e)throw new SDKError(ErrorCode[_0x19213f(0x9e)],'Schedule\x20name\x20is\x20required');let _0x182f4c;if(_0x3653ce?.['time']){const _0x24b03d=typeof _0x3653ce[_0x19213f(0xa5)]===_0x19213f(0x9f)?new Date(_0x3653ce['time']):_0x3653ce[_0x19213f(0xa5)];if(isNaN(_0x24b03d[_0x19213f(0xa1)]()))throw new SDKError(ErrorCode[_0x19213f(0x9e)],_0x19213f(0x98)+_0x3653ce['time']);_0x182f4c=Math[_0x19213f(0xb7)](_0x24b03d[_0x19213f(0xa1)]()/0x3e8);}else _0x182f4c=Math[_0x19213f(0xb7)](Date[_0x19213f(0xb4)]()/0x3e8);if(_0x3653ce?.['num']!==undefined){if(_0x3653ce[_0x19213f(0xa7)]<0x1||_0x3653ce['num']>0xa)throw new SDKError(ErrorCode[_0x19213f(0x9e)],_0x19213f(0x86));}return await this[_0x19213f(0xac)][_0x19213f(0xa9)](_0x408f5e,_0x182f4c,_0x3653ce?.[_0x19213f(0xa7)]);}async[a101_0x39f250(0xad)](_0x3624ab,_0x494034){const _0x5e05eb=a101_0x39f250;if(!_0x3624ab)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5e05eb(0x8c));const _0x4057f2=await this[_0x5e05eb(0xac)][_0x5e05eb(0x93)](_0x3624ab,_0x494034);return{..._0x4057f2,'history':_0x4057f2['history'][_0x5e05eb(0x8e)](_0x587409=>({..._0x587409,'created_at':normalizeTimestamp(_0x587409[_0x5e05eb(0x85)]),'start_at':normalizeTimestamp(_0x587409['start_at']),'end_at':normalizeTimestamp(_0x587409[_0x5e05eb(0xb1)])}))};}}
1
+ const a101_0x3d3b99=a101_0x4a74;function a101_0x4a74(_0x42e24a,_0x1a1bed){_0x42e24a=_0x42e24a-0xa1;const _0x1daf21=a101_0x1daf();let _0x4a74e6=_0x1daf21[_0x42e24a];return _0x4a74e6;}function a101_0x1daf(){const _0x47d86f=['Schedule\x20name\x20is\x20required','update','queries','pattern','start_at','Schedule\x20not\x20found:\x20','1075JLfANY','Invalid\x20time\x20format:\x20','8ckZkeN','length','55SgkvIF','listSchedules','2409805ZJsHDV','486560bmiFYC','3053658qzOLOW','getScheduleHistory','3546740zZNHSO','test','getTime','limit','created_at','desc','string','name','6767883nOlIis','find','INVALID_ARGUMENT','replace','num','time','Type\x20is\x20required','client','Database\x20is\x20required','end_at','slice','now','updated_at','num\x20must\x20be\x20between\x201\x20and\x2010','has_next_page','\x20UTC','914985aIBYnc','push','14anhwMn','Query\x20is\x20required','history','createSchedule','filter','map','show','type','listQueries','scheduled','floor','database','118hYTymb','run'];a101_0x1daf=function(){return _0x47d86f;};return a101_0x1daf();}(function(_0x1ea864,_0x11f13e){const _0x59a689=a101_0x4a74,_0x60cd3a=_0x1ea864();while(!![]){try{const _0x4abe31=-parseInt(_0x59a689(0xcb))/0x1*(parseInt(_0x59a689(0xc3))/0x2)+-parseInt(_0x59a689(0xb5))/0x3+parseInt(_0x59a689(0xd5))/0x4+-parseInt(_0x59a689(0xd1))/0x5+parseInt(_0x59a689(0xd3))/0x6*(parseInt(_0x59a689(0xb7))/0x7)+parseInt(_0x59a689(0xcd))/0x8*(-parseInt(_0x59a689(0xa5))/0x9)+parseInt(_0x59a689(0xd2))/0xa*(parseInt(_0x59a689(0xcf))/0xb);if(_0x4abe31===_0x11f13e)break;else _0x60cd3a['push'](_0x60cd3a['shift']());}catch(_0x52a99d){_0x60cd3a['push'](_0x60cd3a['shift']());}}}(a101_0x1daf,0x852cb));import{TDApiClient}from'./client/td-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function normalizeTimestamp(_0x5cd15f){const _0x51f4c5=a101_0x4a74;if(!_0x5cd15f)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x51f4c5(0xd6)](_0x5cd15f))return _0x5cd15f;return _0x5cd15f['replace'](_0x51f4c5(0xb4),'Z')[_0x51f4c5(0xa8)]('\x20','T');}export class ScheduleSDK{[a101_0x3d3b99(0xac)];constructor(_0x3939ad){const _0x241ee1=a101_0x3d3b99;this[_0x241ee1(0xac)]=new TDApiClient(_0x3939ad);}async['list'](_0x4e0e9c){const _0x50c2d4=a101_0x3d3b99,_0x5b58e7=await this[_0x50c2d4(0xac)][_0x50c2d4(0xd0)](),_0x4f0e29=_0x5b58e7[_0x50c2d4(0xbc)](_0x335355=>({..._0x335355,'created_at':normalizeTimestamp(_0x335355[_0x50c2d4(0xa1)])??_0x335355[_0x50c2d4(0xa1)]}));if(_0x4e0e9c?.['limit']&&_0x4e0e9c[_0x50c2d4(0xd8)]>0x0)return _0x4f0e29[_0x50c2d4(0xaf)](0x0,_0x4e0e9c['limit']);return _0x4f0e29;}async[a101_0x3d3b99(0xbf)](_0x12a839){const _0x17bd25=a101_0x3d3b99,_0x580d55=0x64,_0x43995c=_0x12a839?.[_0x17bd25(0xd8)],_0x44ba8e=[];let _0x53af8a=!![],_0x4ea8d1,_0x17cc1d,_0x5ba4ea;if(_0x12a839?.[_0x17bd25(0xc8)]){const _0x10b77=_0x12a839[_0x17bd25(0xc8)][_0x17bd25(0xa8)](/[.+^${}()|[\]\\]/g,'\x5c$&'),_0x1c9881=_0x10b77[_0x17bd25(0xa8)](/\*/g,'.*')[_0x17bd25(0xa8)](/\?/g,'.');_0x5ba4ea=new RegExp('^'+_0x1c9881+'$','i');}while(_0x53af8a&&(!_0x43995c||_0x44ba8e['length']<_0x43995c)){const _0xd170f9=await this[_0x17bd25(0xac)]['listQueries']({'anchor_column':_0x17bd25(0xb1),'sort_direction':_0x17bd25(0xa2),'page_size':_0x580d55,'anchor_id':_0x4ea8d1,'anchor_value':_0x17cc1d});let _0x330927=_0xd170f9[_0x17bd25(0xc7)];_0x12a839?.[_0x17bd25(0xc0)]&&(_0x330927=_0x330927[_0x17bd25(0xbb)](_0x5f5c95=>_0x5f5c95['cron']!==null));_0x5ba4ea&&(_0x330927=_0x330927[_0x17bd25(0xbb)](_0x2e5c46=>_0x2e5c46['name']&&_0x5ba4ea['test'](_0x2e5c46['name'])));_0x44ba8e[_0x17bd25(0xb6)](..._0x330927),_0x53af8a=_0xd170f9['pagination'][_0x17bd25(0xb3)];if(_0x53af8a&&_0xd170f9['queries'][_0x17bd25(0xce)]>0x0){const _0x5b1ba9=_0xd170f9[_0x17bd25(0xc7)][_0xd170f9[_0x17bd25(0xc7)][_0x17bd25(0xce)]-0x1];_0x4ea8d1=_0x5b1ba9['id'],_0x17cc1d=_0x5b1ba9[_0x17bd25(0xb1)];}}const _0xefb034=_0x43995c?_0x44ba8e[_0x17bd25(0xaf)](0x0,_0x43995c):_0x44ba8e;return{'queries':_0xefb034,'pagination':{'has_next_page':_0x53af8a||(_0x43995c?_0x44ba8e['length']>_0x43995c:![])}};}async[a101_0x3d3b99(0xbd)](_0xd9b92e){const _0x339118=a101_0x3d3b99,_0x553148=await this['client'][_0x339118(0xd0)](),_0x3d5c87=_0x553148[_0x339118(0xa6)](_0x2c14e4=>_0x2c14e4[_0x339118(0xa4)]===_0xd9b92e);if(!_0x3d5c87)throw new SDKError(ErrorCode['NOT_FOUND'],_0x339118(0xca)+_0xd9b92e);return{..._0x3d5c87,'created_at':normalizeTimestamp(_0x3d5c87[_0x339118(0xa1)])??_0x3d5c87[_0x339118(0xa1)]};}async['create'](_0x1c51e0,_0x2f866b){const _0x40c166=a101_0x3d3b99;if(!_0x1c51e0)throw new SDKError(ErrorCode[_0x40c166(0xa7)],_0x40c166(0xc5));if(!_0x2f866b[_0x40c166(0xc2)])throw new SDKError(ErrorCode[_0x40c166(0xa7)],_0x40c166(0xad));if(!_0x2f866b['query'])throw new SDKError(ErrorCode[_0x40c166(0xa7)],_0x40c166(0xb8));if(!_0x2f866b[_0x40c166(0xbe)])throw new SDKError(ErrorCode[_0x40c166(0xa7)],_0x40c166(0xab));return await this['client'][_0x40c166(0xba)](_0x1c51e0,_0x2f866b);}async[a101_0x3d3b99(0xc6)](_0x34d8d9,_0x399c76){const _0x1125da=a101_0x3d3b99;if(!_0x34d8d9)throw new SDKError(ErrorCode[_0x1125da(0xa7)],_0x1125da(0xc5));return await this[_0x1125da(0xac)]['updateSchedule'](_0x34d8d9,_0x399c76);}async['delete'](_0x26c0fc){const _0x11ae3f=a101_0x3d3b99;if(!_0x26c0fc)throw new SDKError(ErrorCode[_0x11ae3f(0xa7)],_0x11ae3f(0xc5));return await this[_0x11ae3f(0xac)]['deleteSchedule'](_0x26c0fc);}async[a101_0x3d3b99(0xc4)](_0x32bc08,_0x1f81d2){const _0x202bdf=a101_0x3d3b99;if(!_0x32bc08)throw new SDKError(ErrorCode[_0x202bdf(0xa7)],_0x202bdf(0xc5));let _0x52c56a;if(_0x1f81d2?.[_0x202bdf(0xaa)]){const _0x1f4a51=typeof _0x1f81d2[_0x202bdf(0xaa)]===_0x202bdf(0xa3)?new Date(_0x1f81d2['time']):_0x1f81d2['time'];if(isNaN(_0x1f4a51[_0x202bdf(0xd7)]()))throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x202bdf(0xcc)+_0x1f81d2[_0x202bdf(0xaa)]);_0x52c56a=Math[_0x202bdf(0xc1)](_0x1f4a51[_0x202bdf(0xd7)]()/0x3e8);}else _0x52c56a=Math[_0x202bdf(0xc1)](Date[_0x202bdf(0xb0)]()/0x3e8);if(_0x1f81d2?.[_0x202bdf(0xa9)]!==undefined){if(_0x1f81d2[_0x202bdf(0xa9)]<0x1||_0x1f81d2['num']>0xa)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x202bdf(0xb2));}return await this['client']['runSchedule'](_0x32bc08,_0x52c56a,_0x1f81d2?.['num']);}async['history'](_0x12e65f,_0x4f5d9c){const _0x39fd76=a101_0x3d3b99;if(!_0x12e65f)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x39fd76(0xc5));const _0x4061cf=await this['client'][_0x39fd76(0xd4)](_0x12e65f,_0x4f5d9c);return{..._0x4061cf,'history':_0x4061cf[_0x39fd76(0xb9)]['map'](_0x1b9cc9=>({..._0x1b9cc9,'created_at':normalizeTimestamp(_0x1b9cc9[_0x39fd76(0xa1)]),'start_at':normalizeTimestamp(_0x1b9cc9[_0x39fd76(0xc9)]),'end_at':normalizeTimestamp(_0x1b9cc9[_0x39fd76(0xae)])}))};}}
@@ -1 +1 @@
1
- (function(_0x596aa8,_0x4a7ce1){const _0x1d8c0b=a102_0x2f61,_0x4d5503=_0x596aa8();while(!![]){try{const _0x1a4068=parseInt(_0x1d8c0b(0x253))/0x1+-parseInt(_0x1d8c0b(0x239))/0x2+-parseInt(_0x1d8c0b(0x210))/0x3+parseInt(_0x1d8c0b(0x23a))/0x4*(-parseInt(_0x1d8c0b(0x265))/0x5)+parseInt(_0x1d8c0b(0x266))/0x6+parseInt(_0x1d8c0b(0x1ec))/0x7*(parseInt(_0x1d8c0b(0x24b))/0x8)+parseInt(_0x1d8c0b(0x230))/0x9*(parseInt(_0x1d8c0b(0x261))/0xa);if(_0x1a4068===_0x4a7ce1)break;else _0x4d5503['push'](_0x4d5503['shift']());}catch(_0x141232){_0x4d5503['push'](_0x4d5503['shift']());}}}(a102_0x3587,0xd58af));import*as a102_0x48e21f from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x4ec200,_0x1ec739){const _0x2db4e4=a102_0x2f61,_0x3b6547=_0x4ec200[_0x2db4e4(0x247)]&&'type'in _0x4ec200[_0x2db4e4(0x247)]&&_0x4ec200[_0x2db4e4(0x247)]['type'];return{'type':'segment','name':_0x4ec200['name'],..._0x4ec200['description']&&{'description':_0x4ec200[_0x2db4e4(0x207)]},..._0x1ec739&&{'folder':_0x1ec739},..._0x3b6547&&{'rule':apiRuleToYaml(_0x4ec200[_0x2db4e4(0x247)])},..._0x4ec200['kind']!==undefined&&{'kind':_0x4ec200[_0x2db4e4(0x208)]===0x0?_0x2db4e4(0x211):_0x4ec200[_0x2db4e4(0x208)]===0x1?_0x2db4e4(0x220):_0x2db4e4(0x22e)},..._0x4ec200[_0x2db4e4(0x243)]!==undefined&&{'visible':_0x4ec200['isVisible']}};}export async function segmentResponseToDef(_0xef1561,_0x244118,_0x4c7dcf){const _0x52180b=a102_0x2f61,_0x51df8f=segmentResponseToDefSync(_0xef1561,_0x4c7dcf);if(!_0x244118||!_0x244118['resolveSegmentName'])return _0x51df8f;return _0x51df8f['rule']&&(_0x51df8f[_0x52180b(0x247)]=await resolveRuleSegmentRefs(_0x51df8f[_0x52180b(0x247)],_0x244118[_0x52180b(0x267)])),_0x51df8f;}export function apiRuleToYaml(_0x5583bd){const _0x488cae=a102_0x2f61,_0x170894=(_0x5583bd['conditions']||[])['map'](apiConditionToYaml);if(_0x170894[_0x488cae(0x202)]===0x1&&!_0x5583bd[_0x488cae(0x207)]&&_0x488cae(0x1f5)in _0x170894[0x0]&&(_0x170894[0x0]['type']===_0x488cae(0x22d)||_0x170894[0x0][_0x488cae(0x1f5)]==='Or')){const _0x548b89=_0x170894[0x0];if(_0x548b89[_0x488cae(0x1f5)]===_0x5583bd[_0x488cae(0x1f5)]&&_0x548b89[_0x488cae(0x1f2)])return{'type':_0x5583bd[_0x488cae(0x1f5)],'conditions':_0x548b89[_0x488cae(0x1f2)],..._0x548b89[_0x488cae(0x207)]&&{'description':_0x548b89[_0x488cae(0x207)]}};}return{'type':_0x5583bd[_0x488cae(0x1f5)],'conditions':_0x170894,..._0x5583bd[_0x488cae(0x207)]&&{'description':_0x5583bd[_0x488cae(0x207)]}};}export async function resolveRuleSegmentRefs(_0x27c586,_0x34ca5e){const _0x1078fc=a102_0x2f61,_0x15e1e8=await Promise[_0x1078fc(0x20e)](_0x27c586['conditions'][_0x1078fc(0x1f7)](_0x155fd7=>resolveConditionSegmentRefs(_0x155fd7,_0x34ca5e)));return{..._0x27c586,'conditions':_0x15e1e8};}async function resolveConditionSegmentRefs(_0x475dc6,_0x3ada49){const _0x48e9cb=a102_0x2f61;if('segment'in _0x475dc6&&(_0x475dc6[_0x48e9cb(0x1f5)]==='include'||_0x475dc6['type']===_0x48e9cb(0x1f9))){const _0x1ea479=_0x475dc6;if(/^\d+$/[_0x48e9cb(0x21b)](_0x1ea479[_0x48e9cb(0x1f3)])){const _0x3819ba=await _0x3ada49(_0x1ea479[_0x48e9cb(0x1f3)]);return{..._0x1ea479,'segment':_0x3819ba};}return _0x475dc6;}if(_0x48e9cb(0x1f2)in _0x475dc6&&_0x475dc6[_0x48e9cb(0x1f2)]){const _0x4a97cb=_0x475dc6,_0x52f9ef=await Promise['all'](_0x4a97cb[_0x48e9cb(0x1f2)]['map'](_0x21babc=>resolveConditionSegmentRefs(_0x21babc,_0x3ada49)));return{..._0x4a97cb,'conditions':_0x52f9ef};}if(_0x48e9cb(0x218)in _0x475dc6&&_0x475dc6[_0x48e9cb(0x218)]){const _0x53fcaf=_0x475dc6,_0x446923=await resolveRuleSegmentRefs(_0x53fcaf[_0x48e9cb(0x218)],_0x3ada49);return{..._0x53fcaf,'filter':_0x446923};}return _0x475dc6;}export async function resolveRuleSegmentIds(_0xc071e8,_0x1214df){const _0x38e9cf=a102_0x2f61,_0x1db9ab=await Promise[_0x38e9cf(0x20e)](_0xc071e8[_0x38e9cf(0x1f2)]['map'](_0x2d44f4=>resolveConditionSegmentIds(_0x2d44f4,_0x1214df)));return{..._0xc071e8,'conditions':_0x1db9ab};}async function resolveConditionSegmentIds(_0x3c0cf3,_0x4af942){const _0x5e4666=a102_0x2f61;if(_0x5e4666(0x1f3)in _0x3c0cf3&&(_0x3c0cf3[_0x5e4666(0x1f5)]===_0x5e4666(0x249)||_0x3c0cf3['type']===_0x5e4666(0x1f9))){const _0x1857b8=_0x3c0cf3;if(!/^\d+$/[_0x5e4666(0x21b)](_0x1857b8[_0x5e4666(0x1f3)])){const _0x1d533a=await _0x4af942(_0x1857b8[_0x5e4666(0x1f3)]);return{..._0x1857b8,'segment':_0x1d533a};}return _0x3c0cf3;}if(_0x5e4666(0x1f2)in _0x3c0cf3&&_0x3c0cf3[_0x5e4666(0x1f2)]){const _0x462958=_0x3c0cf3,_0x44f466=await Promise['all'](_0x462958[_0x5e4666(0x1f2)]['map'](_0x6a22ec=>resolveConditionSegmentIds(_0x6a22ec,_0x4af942)));return{..._0x462958,'conditions':_0x44f466};}if(_0x5e4666(0x218)in _0x3c0cf3&&_0x3c0cf3[_0x5e4666(0x218)]){const _0x59205c=_0x3c0cf3,_0x2c261e=await resolveRuleSegmentIds(_0x59205c['filter'],_0x4af942);return{..._0x59205c,'filter':_0x2c261e};}return _0x3c0cf3;}function apiConditionToYaml(_0x14ba7f){const _0x2fc85b=a102_0x2f61;if(_0x14ba7f[_0x2fc85b(0x1f5)]===_0x2fc85b(0x22d)||_0x14ba7f[_0x2fc85b(0x1f5)]==='Or'){if(_0x14ba7f[_0x2fc85b(0x1f2)]){const _0x3aa54d=_0x14ba7f['conditions']['map'](apiConditionToYaml);if(_0x3aa54d[_0x2fc85b(0x202)]===0x1&&!_0x14ba7f[_0x2fc85b(0x207)])return _0x3aa54d[0x0];return{'type':_0x14ba7f[_0x2fc85b(0x1f5)],'conditions':_0x3aa54d,..._0x14ba7f[_0x2fc85b(0x207)]&&{'description':_0x14ba7f[_0x2fc85b(0x207)]}};}}if(_0x14ba7f[_0x2fc85b(0x1f5)]==='Value'&&_0x14ba7f[_0x2fc85b(0x24d)]&&_0x14ba7f[_0x2fc85b(0x26f)]){const _0x1f382a=_0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x219)]?{'type':_0x14ba7f[_0x2fc85b(0x24d)]['aggregation']['type'],..._0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x219)]['groupingColumns']&&{'groupingColumns':_0x14ba7f[_0x2fc85b(0x24d)]['aggregation']['groupingColumns']}}:undefined;return{'type':'Value','attribute':_0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x1fb)]||'','operator':apiOperatorToYaml(_0x14ba7f[_0x2fc85b(0x26f)]),..._0x14ba7f['arrayMatching']&&_0x14ba7f[_0x2fc85b(0x222)]!==_0x2fc85b(0x235)?{'arrayMatching':_0x14ba7f[_0x2fc85b(0x222)]}:{},..._0x14ba7f['exclude']?{'exclude':_0x14ba7f['exclude']}:{},..._0x1f382a?{'aggregation':_0x1f382a}:{},..._0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x1e5)]?{'source':_0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x1e5)][_0x2fc85b(0x1fb)]}:{},..._0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x218)]?{'filter':apiRuleToYaml(_0x14ba7f['leftValue'][_0x2fc85b(0x218)])}:{},..._0x14ba7f[_0x2fc85b(0x264)]!==undefined&&_0x14ba7f[_0x2fc85b(0x264)]!==null?{'limit':_0x14ba7f[_0x2fc85b(0x264)]}:{}};}if(_0x14ba7f[_0x2fc85b(0x1f5)]===_0x2fc85b(0x23d)&&_0x14ba7f['id'])return{'type':_0x14ba7f['exclude']?_0x2fc85b(0x1f9):_0x2fc85b(0x249),'segment':_0x14ba7f['id']};return{'type':_0x2fc85b(0x22d),'conditions':[]};}function isTemporalOperator(_0x1852a4){const _0x255799=a102_0x2f61;return _0x1852a4===_0x255799(0x237)||_0x1852a4===_0x255799(0x200);}function getEffectiveValue(_0x4fa5be){const _0x4196f4=a102_0x2f61,_0x27fc90=_0x4fa5be[_0x4196f4(0x20a)];return _0x4fa5be[_0x4196f4(0x256)]??_0x27fc90;}function apiOperatorToYaml(_0x5598b0){const _0x388a51=a102_0x2f61;let _0x3b6776;if(_0x5598b0['rightValues']&&_0x5598b0[_0x388a51(0x20f)][_0x388a51(0x202)]>0x0)_0x3b6776=_0x5598b0['rightValues'];else{if(_0x5598b0[_0x388a51(0x22f)]!==undefined)_0x3b6776=_0x5598b0[_0x388a51(0x22f)];else isTemporalOperator(_0x5598b0[_0x388a51(0x1f5)])&&_0x5598b0[_0x388a51(0x256)]!==undefined&&(_0x3b6776=_0x5598b0['value']);}return{'type':mapApiOperatorType(_0x5598b0[_0x388a51(0x1f5)]),..._0x5598b0[_0x388a51(0x227)]&&{'not':_0x5598b0[_0x388a51(0x227)]},..._0x3b6776!==undefined&&{'value':_0x3b6776},..._0x5598b0[_0x388a51(0x259)]&&{'unit':_0x5598b0[_0x388a51(0x259)]}};}function mapApiOperatorType(_0x43c718){return _0x43c718;}export function segmentDefToCreateRequest(_0x310f6e,_0xb7084a){const _0x4838fc=a102_0x2f61,_0x5e7249={'name':_0x310f6e[_0x4838fc(0x1fb)]};return _0x310f6e['description']&&(_0x5e7249[_0x4838fc(0x207)]=_0x310f6e[_0x4838fc(0x207)]),_0x310f6e['rule']&&(_0x5e7249[_0x4838fc(0x247)]=yamlRuleToApi(_0x310f6e[_0x4838fc(0x247)])),_0x310f6e[_0x4838fc(0x208)]&&(_0x5e7249[_0x4838fc(0x208)]=_0x310f6e[_0x4838fc(0x208)]==='batch'?0x0:_0x310f6e[_0x4838fc(0x208)]==='realtime'?0x1:0x2),_0x310f6e[_0x4838fc(0x22b)]!==undefined&&(_0x5e7249['isVisible']=_0x310f6e[_0x4838fc(0x22b)]),_0xb7084a&&(_0x5e7249['segmentFolderId']=_0xb7084a),_0x5e7249;}export function segmentDefToUpdateRequest(_0x493ad2){const _0x202037=a102_0x2f61,_0x2a39d6={'name':_0x493ad2[_0x202037(0x1fb)]};return _0x493ad2[_0x202037(0x207)]!==undefined&&(_0x2a39d6[_0x202037(0x207)]=_0x493ad2[_0x202037(0x207)]),_0x493ad2[_0x202037(0x247)]&&(_0x2a39d6['rule']=yamlRuleToApi(_0x493ad2[_0x202037(0x247)])),_0x493ad2[_0x202037(0x208)]&&(_0x2a39d6[_0x202037(0x208)]=_0x493ad2[_0x202037(0x208)]===_0x202037(0x211)?0x0:_0x493ad2['kind']===_0x202037(0x220)?0x1:0x2),_0x2a39d6;}export function yamlRuleToApi(_0x4bf145,_0x4205cf=![]){const _0x35d332=a102_0x2f61,_0x4871cb=_0x4bf145[_0x35d332(0x1f2)]['map'](yamlConditionToApi);if(_0x4205cf){const _0x2d947b=_0x4871cb['every'](_0x351e82=>_0x351e82['type']===_0x35d332(0x22d)||_0x351e82['type']==='Or');if(!_0x2d947b&&_0x4871cb[_0x35d332(0x202)]>0x0)return{'type':_0x4bf145[_0x35d332(0x1f5)],'conditions':[{'type':_0x35d332(0x22d),'description':_0x4bf145[_0x35d332(0x207)]||'','conditions':_0x4871cb}]};}return{'type':_0x4bf145[_0x35d332(0x1f5)],'conditions':_0x4871cb,..._0x4bf145[_0x35d332(0x207)]&&{'description':_0x4bf145['description']}};}function yamlConditionToApi(_0x505e70){const _0x8bf428=a102_0x2f61;if(_0x8bf428(0x1f3)in _0x505e70&&(_0x505e70[_0x8bf428(0x1f5)]===_0x8bf428(0x249)||_0x505e70[_0x8bf428(0x1f5)]==='exclude')){const _0x57352f=_0x505e70;return{'type':_0x8bf428(0x23d),'id':_0x57352f[_0x8bf428(0x1f3)],'exclude':_0x57352f['type']==='exclude'};}if('type'in _0x505e70&&(_0x505e70[_0x8bf428(0x1f5)]==='And'||_0x505e70[_0x8bf428(0x1f5)]==='Or')){const _0x567505=_0x505e70;return{'type':_0x567505[_0x8bf428(0x1f5)],'conditions':_0x567505[_0x8bf428(0x1f2)][_0x8bf428(0x1f7)](yamlConditionToApi),..._0x567505[_0x8bf428(0x207)]&&{'description':_0x567505[_0x8bf428(0x207)]}};}const _0x4cb793=_0x505e70,_0x3d85f8={'type':_0x8bf428(0x26c),'leftValue':buildLeftValue(_0x4cb793),'operator':yamlOperatorToApi(_0x4cb793[_0x8bf428(0x26f)]),'exclude':_0x4cb793[_0x8bf428(0x1f9)]??![],'arrayMatching':_0x4cb793[_0x8bf428(0x222)]??'any'};return _0x4cb793['limit']!==undefined&&(_0x3d85f8[_0x8bf428(0x264)]=_0x4cb793[_0x8bf428(0x264)]),_0x3d85f8;}function buildLeftValue(_0xf3d239){const _0x3a06d8=a102_0x2f61,_0x36511e={'name':_0xf3d239[_0x3a06d8(0x238)]};return _0xf3d239['aggregation']&&(_0x36511e[_0x3a06d8(0x219)]={'type':_0xf3d239[_0x3a06d8(0x219)][_0x3a06d8(0x1f5)],..._0xf3d239[_0x3a06d8(0x219)][_0x3a06d8(0x255)]&&{'groupingColumns':_0xf3d239[_0x3a06d8(0x219)]['groupingColumns']}}),_0xf3d239[_0x3a06d8(0x1e5)]&&(_0x36511e['source']={'name':_0xf3d239[_0x3a06d8(0x1e5)]}),_0xf3d239[_0x3a06d8(0x218)]&&(_0x36511e['filter']=yamlRuleToApi(_0xf3d239[_0x3a06d8(0x218)])),_0x36511e;}function yamlOperatorToApi(_0x5a392f){const _0x41edc6=a102_0x2f61,_0x4864a5={'type':mapYamlOperatorType(_0x5a392f[_0x41edc6(0x1f5)]),'not':_0x5a392f['not']??![]},_0x13f102=getEffectiveValue(_0x5a392f);if(_0x13f102!==undefined){if(Array[_0x41edc6(0x1e9)](_0x13f102))_0x4864a5[_0x41edc6(0x20f)]=_0x13f102;else isTemporalOperator(_0x5a392f[_0x41edc6(0x1f5)])?_0x4864a5[_0x41edc6(0x256)]=_0x13f102:_0x4864a5['rightValue']=_0x13f102;}return _0x5a392f[_0x41edc6(0x259)]&&(_0x4864a5[_0x41edc6(0x259)]=_0x5a392f[_0x41edc6(0x259)]),_0x4864a5;}function mapYamlOperatorType(_0x2d4f49){return _0x2d4f49;}export function toYamlString(_0x3ba3e0){const _0x500fce=a102_0x2f61,_0x45b735=JSON['parse'](JSON[_0x500fce(0x214)](_0x3ba3e0)),_0x27e5aa=a102_0x48e21f[_0x500fce(0x214)](_0x45b735,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x500fce(0x1eb)}),_0x3a52ae=[_0x500fce(0x25e)];let _0x481d78=_0x27e5aa;for(const _0x4ea191 of _0x3a52ae){_0x481d78=_0x481d78[_0x500fce(0x233)](new RegExp('^('+_0x4ea191+')','m'),(_0x5a380d,_0x47a0c3,_0x31b330)=>{if(_0x31b330===0x0||_0x481d78[_0x31b330-0x1]==='\x0a'&&_0x481d78[_0x31b330-0x2]==='\x0a')return _0x47a0c3;return'\x0a'+_0x47a0c3;});}return _0x481d78;}export function parseYamlString(_0x4417b2){const _0x5a3e01=a102_0x2f61,_0x5625cc=a102_0x48e21f[_0x5a3e01(0x23b)](_0x4417b2);if(!_0x5625cc[_0x5a3e01(0x1fb)])throw new Error(_0x5a3e01(0x24a));if(_0x5625cc[_0x5a3e01(0x1f5)]&&_0x5625cc[_0x5a3e01(0x1f5)]!==_0x5a3e01(0x1f3))throw new Error(_0x5a3e01(0x251)+_0x5625cc[_0x5a3e01(0x1f5)]);return _0x5625cc;}export function isSegmentYaml(_0x4c077f){const _0x1ac11a=a102_0x2f61;if(typeof _0x4c077f!=='object'||_0x4c077f===null)return![];const _0x4e6051=_0x4c077f;return _0x4e6051[_0x1ac11a(0x1f5)]===_0x1ac11a(0x1f3)||_0x4e6051[_0x1ac11a(0x1f5)]===undefined;}export function generateTemplate(_0x55db3a='New\x20Segment'){const _0x4c1f3c=a102_0x2f61,_0x5cbc4b={'type':_0x4c1f3c(0x1f3),'name':_0x55db3a,'description':_0x4c1f3c(0x1f8),'rule':{'type':_0x4c1f3c(0x22d),'conditions':[{'type':_0x4c1f3c(0x26c),'attribute':_0x4c1f3c(0x26e),'operator':{'type':_0x4c1f3c(0x258),'value':'value'}}]}};return toYamlString(_0x5cbc4b);}function a102_0x3587(){const _0x5505f9=['max','Equal','unit','entries','duration','getSchema','columns','rule:','usedNames','string','9630XnMkZK','\x0a\x0aAvailable\x20fields:\x0a','schedule','limit','3295HWFvno','3223818wFuaBc','resolveSegmentName','notifyOn','repeatSubFrequency','behavior','connection','Value','joinStrategy','attribute_name','operator','attributes','get','behavior_table','all_columns','activationTemplateId','source','connectionId','connectionNameToIdMap','INVALID_ARGUMENT','isArray','Invalid\x20connector_config\x20for\x20activation\x20\x22','null','165599AgsUaL','CONNECTION_NOT_FOUND','from','formatting','joinRow','repeatFrequency','conditions','segment','has','type','notification','map','Segment\x20description','exclude','min','name','allColumns','activations','join_row','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','TimeWithinNext','__SEGMENT_REF__','length','JOURNEY_SYNTAX_ERROR','repeatUnit','syndicationBehavior','start_at','description','kind','notify_on','values','repeat_sub_frequency','startAt','keys','all','rightValues','2329398NwDqLp','batch','repeat_frequency','Please\x20specify\x20a\x20valid\x20attribute\x20name.','stringify','activation_template_id','timezone','warn','filter','aggregation','code','test','].attribute\x20cannot\x20be\x20empty.\x0a','end_on','localeCompare','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','realtime','Unknown\x20email\x20recipient:\x20','arrayMatching','forEach','object','CONNECTOR_SCHEMA_NOT_FOUND','connector_config','not','connector_config\x20for\x20activation\x20\x22','ruleHashToName','activations:','visible','activationParams','And','funnel_stage','rightValue','4716KamcIo','order_by','scheduleType','replace','push','any','repeat_unit','TimeWithinPast','attribute','1198466iUSBzm','684trnPRK','parse','join_strategy','Reference','connectionNameToTypeMap','behaviorTableName','valid','\x27:\x20','connectorConfig','isVisible','folder','emailRecipients','orderBy','rule','endOn','include','YAML\x20config\x20missing\x20required\x20field:\x20name','32lbKmqb','set','leftValue','localRuleToName','email_recipients','visibility','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','conditions[','1226516PLVfFb','CONNECTOR_INVALID_CONFIG','groupingColumns','value'];a102_0x3587=function(){return _0x5505f9;};return a102_0x3587();}export function segmentToYamlString(_0x1aae30){const _0x12e3da=a102_0x2f61,_0x2078f8=JSON[_0x12e3da(0x23b)](JSON['stringify'](_0x1aae30)),_0x36b0a8=a102_0x48e21f[_0x12e3da(0x214)](_0x2078f8,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x39dac1=[_0x12e3da(0x25e),_0x12e3da(0x22a)];let _0x2e290f=_0x36b0a8;for(const _0x3058f6 of _0x39dac1){_0x2e290f=_0x2e290f['replace'](new RegExp('^('+_0x3058f6+')','m'),(_0x4d5deb,_0x4b28d7,_0x34ef46)=>{if(_0x34ef46===0x0||_0x2e290f[_0x34ef46-0x1]==='\x0a'&&_0x2e290f[_0x34ef46-0x2]==='\x0a')return _0x4b28d7;return'\x0a'+_0x4b28d7;});}return _0x2e290f;}function a102_0x2f61(_0x35d1a3,_0x4b949b){_0x35d1a3=_0x35d1a3-0x1e3;const _0x35876a=a102_0x3587();let _0x2f61df=_0x35876a[_0x35d1a3];return _0x2f61df;}export function parseSegmentYamlFile(_0x4c0f66){const _0x368e45=a102_0x2f61,_0x32c2a0=a102_0x48e21f['parse'](_0x4c0f66);if(!_0x32c2a0[_0x368e45(0x1fb)])throw new Error(_0x368e45(0x24a));return _0x32c2a0;}export function normalizeChildSegmentYaml(_0x52c289){const _0x145ab3=a102_0x2f61;return{'type':_0x145ab3(0x1f3),'name':_0x52c289[_0x145ab3(0x1fb)],..._0x52c289[_0x145ab3(0x207)]!==undefined&&{'description':_0x52c289[_0x145ab3(0x207)]},..._0x52c289['folder']!==undefined&&{'folder':_0x52c289[_0x145ab3(0x244)]},..._0x52c289[_0x145ab3(0x247)]&&{'rule':normalizeRule(_0x52c289['rule'])},..._0x52c289[_0x145ab3(0x208)]!==undefined&&{'kind':_0x52c289[_0x145ab3(0x208)]},..._0x52c289[_0x145ab3(0x22b)]!==undefined&&{'visible':_0x52c289['visible']},..._0x52c289[_0x145ab3(0x1fd)]&&{'activations':_0x52c289[_0x145ab3(0x1fd)][_0x145ab3(0x1f7)](normalizeActivation)}};}export function normalizeRule(_0x3114da){const _0xf808af=a102_0x2f61;return{'type':_0x3114da[_0xf808af(0x1f5)],'conditions':_0x3114da['conditions']['map'](normalizeCondition),..._0x3114da[_0xf808af(0x207)]!==undefined&&{'description':_0x3114da[_0xf808af(0x207)]}};}function normalizeCondition(_0x301138){const _0x5dd1a3=a102_0x2f61;if(_0x5dd1a3(0x1f3)in _0x301138&&(_0x301138[_0x5dd1a3(0x1f5)]==='include'||_0x301138['type']==='exclude')){const _0x3a630c=_0x301138;return{'type':_0x3a630c[_0x5dd1a3(0x1f5)],'segment':_0x3a630c[_0x5dd1a3(0x1f3)]};}if(_0x5dd1a3(0x1f5)in _0x301138&&(_0x301138[_0x5dd1a3(0x1f5)]===_0x5dd1a3(0x22d)||_0x301138[_0x5dd1a3(0x1f5)]==='Or')){const _0x3bab60=_0x301138;return{'type':_0x3bab60[_0x5dd1a3(0x1f5)],'conditions':_0x3bab60[_0x5dd1a3(0x1f2)][_0x5dd1a3(0x1f7)](normalizeCondition),..._0x3bab60[_0x5dd1a3(0x207)]!==undefined&&{'description':_0x3bab60[_0x5dd1a3(0x207)]}};}const _0x53df93=_0x301138;return{'type':_0x5dd1a3(0x26c),'attribute':_0x53df93[_0x5dd1a3(0x238)],'operator':normalizeOperator(_0x53df93[_0x5dd1a3(0x26f)]),..._0x53df93['arrayMatching']!==undefined&&{'arrayMatching':_0x53df93[_0x5dd1a3(0x222)]},..._0x53df93[_0x5dd1a3(0x1f9)]!==undefined&&{'exclude':_0x53df93['exclude']},..._0x53df93[_0x5dd1a3(0x219)]!==undefined&&{'aggregation':_0x53df93[_0x5dd1a3(0x219)]},..._0x53df93[_0x5dd1a3(0x1e5)]!==undefined&&{'source':_0x53df93[_0x5dd1a3(0x1e5)]},..._0x53df93[_0x5dd1a3(0x218)]!==undefined&&{'filter':normalizeRule(_0x53df93[_0x5dd1a3(0x218)])},..._0x53df93[_0x5dd1a3(0x264)]!==undefined&&{'limit':_0x53df93['limit']}};}function normalizeOperator(_0x1c318d){const _0x3dda3f=a102_0x2f61,_0x5d5cb7=getEffectiveValue(_0x1c318d);return{'type':_0x1c318d['type'],..._0x1c318d[_0x3dda3f(0x227)]!==undefined&&{'not':_0x1c318d[_0x3dda3f(0x227)]},..._0x5d5cb7!==undefined&&{'value':_0x5d5cb7},..._0x1c318d[_0x3dda3f(0x1fa)]!==undefined&&{'min':_0x1c318d['min']},..._0x1c318d[_0x3dda3f(0x257)]!==undefined&&{'max':_0x1c318d[_0x3dda3f(0x257)]},..._0x1c318d[_0x3dda3f(0x259)]!==undefined&&{'unit':_0x1c318d['unit']},..._0x1c318d[_0x3dda3f(0x25b)]!==undefined&&{'duration':_0x1c318d[_0x3dda3f(0x25b)]},..._0x1c318d[_0x3dda3f(0x1ee)]!==undefined&&{'from':_0x1c318d['from']}};}function normalizeActivation(_0x284240){const _0x336466=a102_0x2f61;return{'name':_0x284240[_0x336466(0x1fb)],'connection':_0x284240[_0x336466(0x26b)],..._0x284240[_0x336466(0x207)]!==undefined&&{'description':_0x284240[_0x336466(0x207)]},..._0x284240[_0x336466(0x1e3)]!==undefined&&{'all_columns':_0x284240[_0x336466(0x1e3)]},..._0x284240[_0x336466(0x25d)]!==undefined&&{'columns':_0x284240[_0x336466(0x25d)]},..._0x284240[_0x336466(0x26a)]!==undefined&&{'behavior':_0x284240[_0x336466(0x26a)]},..._0x284240[_0x336466(0x263)]!==undefined&&{'schedule':_0x284240['schedule']},..._0x284240['notification']!==undefined&&{'notification':_0x284240[_0x336466(0x1f6)]},..._0x284240['connector_config']!==undefined&&{'connector_config':_0x284240[_0x336466(0x226)]},..._0x284240[_0x336466(0x215)]!==undefined&&{'activation_template_id':_0x284240[_0x336466(0x215)]}};}export function activationResponseToDef(_0x46d156,_0x221086,_0x2389d2){const _0x57aeb6=a102_0x2f61,_0xc15ef9=_0x46d156[_0x57aeb6(0x1e6)]||'',_0x24c51a=_0x2389d2?.[_0x57aeb6(0x271)](_0xc15ef9)??_0xc15ef9,_0x2efd02={'name':_0x46d156['name'],'connection':_0x24c51a};_0x46d156[_0x57aeb6(0x207)]&&(_0x2efd02[_0x57aeb6(0x207)]=_0x46d156[_0x57aeb6(0x207)]);let _0x10cd46=[];_0x46d156['columns']&&_0x46d156[_0x57aeb6(0x25d)][_0x57aeb6(0x202)]>0x0&&(_0x10cd46=_0x46d156[_0x57aeb6(0x25d)][_0x57aeb6(0x218)](_0x4a3911=>_0x4a3911&&_0x4a3911[_0x57aeb6(0x1fb)])['map'](_0x19995d=>{const _0x5967b9=_0x57aeb6;if(_0x19995d[_0x5967b9(0x1f5)]||_0x19995d[_0x5967b9(0x250)])return{'name':_0x19995d['name'],..._0x19995d['type']&&{'type':_0x19995d['type']},..._0x19995d['visibility']&&{'visibility':_0x19995d[_0x5967b9(0x250)]}};return _0x19995d[_0x5967b9(0x1fb)];}));_0x10cd46[_0x57aeb6(0x202)]>0x0&&(_0x2efd02[_0x57aeb6(0x25d)]=_0x10cd46);_0x46d156[_0x57aeb6(0x1fc)]!==undefined&&(_0x46d156[_0x57aeb6(0x1fc)]===![]&&_0x10cd46[_0x57aeb6(0x202)]===0x0?_0x2efd02['all_columns']=!![]:_0x2efd02['all_columns']=_0x46d156['allColumns']);const _0x2536e5={};let _0x147834=![];_0x46d156[_0x57aeb6(0x232)]&&(_0x2536e5['type']=_0x46d156[_0x57aeb6(0x232)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x204)]&&(_0x2536e5[_0x57aeb6(0x236)]=_0x46d156[_0x57aeb6(0x204)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x1f1)]!==undefined&&_0x46d156[_0x57aeb6(0x1f1)]!==null&&(_0x2536e5['repeat_frequency']=_0x46d156[_0x57aeb6(0x1f1)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x269)]&&_0x46d156[_0x57aeb6(0x269)]['length']>0x0&&(_0x2536e5[_0x57aeb6(0x20b)]=_0x46d156[_0x57aeb6(0x269)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x20c)]!==undefined&&(_0x2536e5[_0x57aeb6(0x206)]=_0x46d156[_0x57aeb6(0x20c)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x248)]!==undefined&&(_0x2536e5[_0x57aeb6(0x21d)]=_0x46d156[_0x57aeb6(0x248)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x216)]&&(_0x2536e5[_0x57aeb6(0x216)]=_0x46d156[_0x57aeb6(0x216)],_0x147834=!![]);_0x147834&&(_0x2efd02[_0x57aeb6(0x263)]=_0x2536e5);(_0x46d156[_0x57aeb6(0x268)]&&_0x46d156[_0x57aeb6(0x268)][_0x57aeb6(0x202)]>0x0||_0x46d156[_0x57aeb6(0x245)]&&_0x46d156[_0x57aeb6(0x245)][_0x57aeb6(0x202)]>0x0)&&(_0x2efd02['notification']={},_0x46d156[_0x57aeb6(0x268)]&&_0x46d156[_0x57aeb6(0x268)][_0x57aeb6(0x202)]>0x0&&(_0x2efd02[_0x57aeb6(0x1f6)][_0x57aeb6(0x209)]=_0x46d156['notifyOn']),_0x46d156[_0x57aeb6(0x245)]&&_0x46d156['emailRecipients']['length']>0x0&&(_0x2efd02[_0x57aeb6(0x1f6)][_0x57aeb6(0x24f)]=_0x46d156[_0x57aeb6(0x245)][_0x57aeb6(0x1f7)](_0x1db8d5=>{const _0x50a319=_0x221086?.['get'](_0x1db8d5);return _0x50a319??String(_0x1db8d5);})));_0x46d156[_0x57aeb6(0x242)]&&Object[_0x57aeb6(0x20d)](_0x46d156[_0x57aeb6(0x242)])[_0x57aeb6(0x202)]>0x0&&(_0x2efd02[_0x57aeb6(0x226)]=normalizeConnectorConfigForYaml(_0x46d156['connectorConfig']));_0x46d156[_0x57aeb6(0x1e4)]&&(_0x2efd02['activation_template_id']=_0x46d156['activationTemplateId']);if(_0x46d156[_0x57aeb6(0x205)]){const _0x47a934={},_0x15d9ed=_0x46d156[_0x57aeb6(0x205)];_0x15d9ed[_0x57aeb6(0x25d)]&&_0x15d9ed[_0x57aeb6(0x25d)][_0x57aeb6(0x202)]>0x0&&(_0x47a934[_0x57aeb6(0x25d)]=_0x15d9ed[_0x57aeb6(0x25d)]['filter'](_0x4d15d0=>_0x4d15d0&&_0x4d15d0['name'])[_0x57aeb6(0x1f7)](_0x1cef34=>({'name':_0x1cef34[_0x57aeb6(0x1fb)],..._0x1cef34[_0x57aeb6(0x1f5)]&&{'type':_0x1cef34[_0x57aeb6(0x1f5)]},..._0x1cef34['visibility']&&{'visibility':_0x1cef34['visibility']}}))),_0x15d9ed[_0x57aeb6(0x23f)]&&(_0x47a934[_0x57aeb6(0x272)]=_0x15d9ed[_0x57aeb6(0x23f)]),_0x15d9ed[_0x57aeb6(0x1f0)]!==undefined&&(_0x47a934[_0x57aeb6(0x1fe)]=_0x15d9ed['joinRow']),_0x15d9ed[_0x57aeb6(0x26d)]&&(_0x47a934[_0x57aeb6(0x23c)]=_0x15d9ed[_0x57aeb6(0x26d)]),_0x15d9ed['formatting']&&(_0x47a934[_0x57aeb6(0x1ef)]=_0x15d9ed[_0x57aeb6(0x1ef)]),_0x15d9ed['orderBy']&&_0x15d9ed[_0x57aeb6(0x246)][_0x57aeb6(0x202)]>0x0&&(_0x47a934[_0x57aeb6(0x231)]=_0x15d9ed['orderBy']),Object[_0x57aeb6(0x20d)](_0x47a934)[_0x57aeb6(0x202)]>0x0&&(_0x2efd02[_0x57aeb6(0x26a)]=_0x47a934);}return _0x2efd02;}export function journeyActivationStepToYaml(_0x323e21,_0x3a5eca,_0x3bd88a){const _0x376ffa=a102_0x2f61,_0x4d4aa5=_0x323e21[_0x376ffa(0x270)][_0x376ffa(0x22c)],_0x5e60f7=_0x4d4aa5[_0x376ffa(0x1e6)]||'',_0x1dfa7c=_0x3bd88a?.[_0x376ffa(0x271)](_0x5e60f7)??_0x5e60f7,_0x1f3eb4={'name':_0x4d4aa5[_0x376ffa(0x1fb)]||'','connection':_0x1dfa7c};_0x4d4aa5[_0x376ffa(0x207)]&&(_0x1f3eb4['description']=_0x4d4aa5[_0x376ffa(0x207)]);let _0x1e0903=[];_0x4d4aa5['columns']&&_0x4d4aa5[_0x376ffa(0x25d)]['length']>0x0&&(_0x1e0903=_0x4d4aa5[_0x376ffa(0x25d)][_0x376ffa(0x218)](_0x550fb6=>_0x550fb6&&_0x550fb6[_0x376ffa(0x1fb)])[_0x376ffa(0x1f7)](_0x1bb14c=>{const _0x181b0d=_0x376ffa;if(_0x1bb14c[_0x181b0d(0x1f5)]||_0x1bb14c[_0x181b0d(0x250)])return{'name':_0x1bb14c[_0x181b0d(0x1fb)],..._0x1bb14c[_0x181b0d(0x1f5)]&&{'type':_0x1bb14c[_0x181b0d(0x1f5)]},..._0x1bb14c[_0x181b0d(0x250)]&&{'visibility':_0x1bb14c['visibility']}};return _0x1bb14c[_0x181b0d(0x1fb)];}));_0x1e0903[_0x376ffa(0x202)]>0x0&&(_0x1f3eb4[_0x376ffa(0x25d)]=_0x1e0903);_0x4d4aa5[_0x376ffa(0x1fc)]!==undefined&&(_0x4d4aa5['allColumns']===![]&&_0x1e0903[_0x376ffa(0x202)]===0x0?_0x1f3eb4['all_columns']=!![]:_0x1f3eb4['all_columns']=_0x4d4aa5[_0x376ffa(0x1fc)]);const _0x355787={};let _0x47f9e6=![];_0x4d4aa5['scheduleType']&&(_0x355787[_0x376ffa(0x1f5)]=_0x4d4aa5[_0x376ffa(0x232)],_0x47f9e6=!![]);_0x4d4aa5[_0x376ffa(0x204)]&&(_0x355787[_0x376ffa(0x236)]=_0x4d4aa5[_0x376ffa(0x204)],_0x47f9e6=!![]);_0x4d4aa5[_0x376ffa(0x1f1)]!==undefined&&_0x4d4aa5[_0x376ffa(0x1f1)]!==null&&(_0x355787['repeat_frequency']=_0x4d4aa5[_0x376ffa(0x1f1)],_0x47f9e6=!![]);_0x4d4aa5[_0x376ffa(0x20c)]!==undefined&&(_0x355787['start_at']=_0x4d4aa5['startAt'],_0x47f9e6=!![]);_0x4d4aa5[_0x376ffa(0x248)]!==undefined&&(_0x355787[_0x376ffa(0x21d)]=_0x4d4aa5[_0x376ffa(0x248)],_0x47f9e6=!![]);_0x4d4aa5[_0x376ffa(0x216)]&&(_0x355787['timezone']=_0x4d4aa5[_0x376ffa(0x216)],_0x47f9e6=!![]);_0x47f9e6&&(_0x1f3eb4[_0x376ffa(0x263)]=_0x355787);(_0x4d4aa5[_0x376ffa(0x268)]&&_0x4d4aa5[_0x376ffa(0x268)][_0x376ffa(0x202)]>0x0||_0x4d4aa5['emailRecipients']&&_0x4d4aa5['emailRecipients'][_0x376ffa(0x202)]>0x0)&&(_0x1f3eb4[_0x376ffa(0x1f6)]={},_0x4d4aa5[_0x376ffa(0x268)]&&_0x4d4aa5[_0x376ffa(0x268)][_0x376ffa(0x202)]>0x0&&(_0x1f3eb4[_0x376ffa(0x1f6)][_0x376ffa(0x209)]=_0x4d4aa5[_0x376ffa(0x268)]),_0x4d4aa5[_0x376ffa(0x245)]&&_0x4d4aa5[_0x376ffa(0x245)][_0x376ffa(0x202)]>0x0&&(_0x1f3eb4[_0x376ffa(0x1f6)][_0x376ffa(0x24f)]=_0x4d4aa5[_0x376ffa(0x245)][_0x376ffa(0x1f7)](_0x5d1eb7=>{const _0x51014a=_0x376ffa,_0x3020d5=_0x3a5eca?.[_0x51014a(0x271)](_0x5d1eb7);return _0x3020d5??String(_0x5d1eb7);})));_0x4d4aa5[_0x376ffa(0x242)]&&Object[_0x376ffa(0x20d)](_0x4d4aa5[_0x376ffa(0x242)])['length']>0x0&&(_0x1f3eb4['connector_config']=normalizeConnectorConfigForYaml(_0x4d4aa5[_0x376ffa(0x242)]));_0x4d4aa5[_0x376ffa(0x1e4)]&&(_0x1f3eb4[_0x376ffa(0x215)]=_0x4d4aa5[_0x376ffa(0x1e4)]);if(_0x4d4aa5[_0x376ffa(0x205)]){const _0x440813={},_0x26e2e1=_0x4d4aa5[_0x376ffa(0x205)];_0x26e2e1[_0x376ffa(0x25d)]&&_0x26e2e1[_0x376ffa(0x25d)]['length']>0x0&&(_0x440813[_0x376ffa(0x25d)]=_0x26e2e1[_0x376ffa(0x25d)][_0x376ffa(0x218)](_0xf6e9f5=>_0xf6e9f5&&_0xf6e9f5[_0x376ffa(0x1fb)])[_0x376ffa(0x1f7)](_0x3b5121=>({'name':_0x3b5121[_0x376ffa(0x1fb)],..._0x3b5121[_0x376ffa(0x1f5)]&&{'type':_0x3b5121[_0x376ffa(0x1f5)]},..._0x3b5121['visibility']&&{'visibility':_0x3b5121[_0x376ffa(0x250)]}}))),_0x26e2e1[_0x376ffa(0x23f)]&&(_0x440813['behavior_table']=_0x26e2e1[_0x376ffa(0x23f)]),_0x26e2e1[_0x376ffa(0x1f0)]!==undefined&&(_0x440813['join_row']=_0x26e2e1[_0x376ffa(0x1f0)]),_0x26e2e1['joinStrategy']&&(_0x440813[_0x376ffa(0x23c)]=_0x26e2e1[_0x376ffa(0x26d)]),_0x26e2e1[_0x376ffa(0x1ef)]&&(_0x440813[_0x376ffa(0x1ef)]=_0x26e2e1[_0x376ffa(0x1ef)]),_0x26e2e1['orderBy']&&_0x26e2e1['orderBy'][_0x376ffa(0x202)]>0x0&&(_0x440813[_0x376ffa(0x231)]=_0x26e2e1['orderBy']),Object[_0x376ffa(0x20d)](_0x440813)[_0x376ffa(0x202)]>0x0&&(_0x1f3eb4[_0x376ffa(0x26a)]=_0x440813);}return _0x1f3eb4;}export function segmentWithActivationsToYaml(_0x4bf7d8,_0x97d42e,_0x11c82b,_0xb35f58,_0x160f94){const _0x5c30d4=a102_0x2f61,_0x21fdb1=segmentResponseToDefSync(_0x4bf7d8,_0x11c82b);return _0x97d42e[_0x5c30d4(0x202)]>0x0&&(_0x21fdb1['activations']=_0x97d42e[_0x5c30d4(0x1f7)](_0x3f1fa3=>activationResponseToDef(_0x3f1fa3,_0xb35f58,_0x160f94))),_0x21fdb1;}function normalizeColumn(_0x59f5eb){const _0x46f603=a102_0x2f61;if(typeof _0x59f5eb===_0x46f603(0x260))return{'name':_0x59f5eb};return{'name':_0x59f5eb[_0x46f603(0x1fb)],..._0x59f5eb[_0x46f603(0x1f5)]&&{'type':_0x59f5eb[_0x46f603(0x1f5)]},..._0x59f5eb[_0x46f603(0x250)]&&{'visibility':_0x59f5eb['visibility']}};}export async function activationDefToCreateRequest(_0x2d9aea,_0x388ff7){const _0x2e6bfb=a102_0x2f61,_0x5a5eec=_0x388ff7?.['emailToIdMap'],_0x23c7d6=_0x388ff7?.[_0x2e6bfb(0x1e7)],_0x21c70f=_0x2d9aea[_0x2e6bfb(0x26b)];let _0x29af79;const _0x5cfca8=parseInt(_0x21c70f,0xa);if(!isNaN(_0x5cfca8)&&String(_0x5cfca8)===_0x21c70f)_0x29af79=_0x5cfca8;else{const _0x35c006=_0x23c7d6?.[_0x2e6bfb(0x271)](_0x21c70f);if(_0x35c006===undefined)throw new SDKError(ErrorCode[_0x2e6bfb(0x1ed)],'Unknown\x20connection:\x20'+_0x21c70f,undefined,{'helpText':_0x2e6bfb(0x21f)});_0x29af79=_0x35c006;}const _0x23a5c7={'name':_0x2d9aea[_0x2e6bfb(0x1fb)],'connectionId':_0x29af79};_0x2d9aea[_0x2e6bfb(0x207)]&&(_0x23a5c7[_0x2e6bfb(0x207)]=_0x2d9aea[_0x2e6bfb(0x207)]);let _0x3fc67b=[];_0x2d9aea['columns']&&_0x2d9aea['columns'][_0x2e6bfb(0x202)]>0x0&&(_0x3fc67b=_0x2d9aea[_0x2e6bfb(0x25d)]['filter'](_0x32c4c4=>_0x32c4c4!=null)[_0x2e6bfb(0x1f7)](normalizeColumn));_0x3fc67b[_0x2e6bfb(0x202)]>0x0&&(_0x23a5c7[_0x2e6bfb(0x25d)]=_0x3fc67b);_0x2d9aea[_0x2e6bfb(0x1e3)]!==undefined&&(_0x2d9aea['all_columns']===![]&&_0x3fc67b[_0x2e6bfb(0x202)]===0x0?_0x23a5c7[_0x2e6bfb(0x1fc)]=!![]:_0x23a5c7[_0x2e6bfb(0x1fc)]=_0x2d9aea['all_columns']);if(_0x2d9aea[_0x2e6bfb(0x263)]){const _0x410956=_0x2d9aea[_0x2e6bfb(0x263)];_0x410956[_0x2e6bfb(0x1f5)]&&(_0x23a5c7[_0x2e6bfb(0x232)]=_0x410956[_0x2e6bfb(0x1f5)]),_0x410956[_0x2e6bfb(0x236)]&&(_0x23a5c7[_0x2e6bfb(0x204)]=_0x410956['repeat_unit']),_0x410956[_0x2e6bfb(0x212)]!==undefined&&(_0x23a5c7[_0x2e6bfb(0x1f1)]=_0x410956[_0x2e6bfb(0x212)]),_0x410956[_0x2e6bfb(0x20b)]&&(_0x23a5c7[_0x2e6bfb(0x269)]=_0x410956[_0x2e6bfb(0x20b)]),_0x410956[_0x2e6bfb(0x206)]!==undefined&&(_0x23a5c7[_0x2e6bfb(0x20c)]=_0x410956['start_at']),_0x410956[_0x2e6bfb(0x21d)]!==undefined&&(_0x23a5c7[_0x2e6bfb(0x248)]=_0x410956['end_on']),_0x410956[_0x2e6bfb(0x216)]&&(_0x23a5c7[_0x2e6bfb(0x216)]=_0x410956[_0x2e6bfb(0x216)]);}_0x2d9aea[_0x2e6bfb(0x1f6)]&&(_0x2d9aea[_0x2e6bfb(0x1f6)][_0x2e6bfb(0x209)]&&(_0x23a5c7[_0x2e6bfb(0x268)]=_0x2d9aea[_0x2e6bfb(0x1f6)][_0x2e6bfb(0x209)]),_0x2d9aea['notification'][_0x2e6bfb(0x24f)]&&(_0x23a5c7[_0x2e6bfb(0x245)]=_0x2d9aea[_0x2e6bfb(0x1f6)][_0x2e6bfb(0x24f)]['map'](_0x54ce74=>{const _0x25963c=_0x2e6bfb,_0x501e97=Number(_0x54ce74);if(!isNaN(_0x501e97)&&String(_0x501e97)===_0x54ce74)return _0x501e97;const _0x549c3f=_0x5a5eec?.['get'](_0x54ce74['toLowerCase']());if(_0x549c3f===undefined)throw new SDKError(ErrorCode[_0x25963c(0x1e8)],_0x25963c(0x221)+_0x54ce74+'.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.');return _0x549c3f;})));if(_0x2d9aea[_0x2e6bfb(0x226)]){const _0xc5461c=_0x388ff7?.[_0x2e6bfb(0x23e)]?.[_0x2e6bfb(0x271)](_0x21c70f);if(_0xc5461c&&_0x388ff7?.['getSchema'])try{const _0x46b8f=await _0x388ff7[_0x2e6bfb(0x25c)](_0xc5461c),_0x4296c2=validateConnectorConfig(_0x2d9aea[_0x2e6bfb(0x226)],_0x46b8f);if(!_0x4296c2[_0x2e6bfb(0x240)])throw new SDKError(ErrorCode[_0x2e6bfb(0x254)],_0x2e6bfb(0x1ea)+_0x2d9aea[_0x2e6bfb(0x1fb)]+'\x22:\x0a'+formatValidationErrors(_0x4296c2['errors']),undefined,{'helpText':'Connector:\x20'+_0xc5461c+_0x2e6bfb(0x262)+formatSchemaAsHelp(_0x46b8f)});if(_0x4296c2['warnings'][_0x2e6bfb(0x202)]>0x0){const _0x53d1eb=formatValidationWarnings(_0x4296c2['warnings']);console[_0x2e6bfb(0x217)](_0x2e6bfb(0x228)+_0x2d9aea[_0x2e6bfb(0x1fb)]+'\x22:\x0a'+_0x53d1eb);}_0x23a5c7[_0x2e6bfb(0x242)]=transformConfigToLegacy(_0x2d9aea['connector_config'],_0x46b8f);}catch(_0x251a81){if(_0x251a81 instanceof SDKError&&_0x251a81[_0x2e6bfb(0x21a)]===ErrorCode[_0x2e6bfb(0x225)])_0x23a5c7[_0x2e6bfb(0x242)]=_0x2d9aea[_0x2e6bfb(0x226)];else throw _0x251a81;}else _0x23a5c7[_0x2e6bfb(0x242)]=_0x2d9aea[_0x2e6bfb(0x226)];}_0x2d9aea[_0x2e6bfb(0x215)]!==undefined&&(_0x23a5c7['activationTemplateId']=_0x2d9aea[_0x2e6bfb(0x215)]);if(_0x2d9aea['behavior']){const _0x1bfa52=_0x2d9aea['behavior'],_0x7f9e1e={};if(_0x1bfa52[_0x2e6bfb(0x25d)]&&_0x1bfa52[_0x2e6bfb(0x25d)][_0x2e6bfb(0x202)]>0x0){const _0x44e69b=_0x1bfa52['columns']['filter'](_0x246d59=>_0x246d59&&_0x246d59['name']);_0x44e69b[_0x2e6bfb(0x202)]>0x0&&(_0x7f9e1e[_0x2e6bfb(0x25d)]=_0x44e69b);}_0x1bfa52[_0x2e6bfb(0x272)]&&(_0x7f9e1e[_0x2e6bfb(0x23f)]=_0x1bfa52[_0x2e6bfb(0x272)]),_0x1bfa52[_0x2e6bfb(0x1fe)]!==undefined&&(_0x7f9e1e[_0x2e6bfb(0x1f0)]=_0x1bfa52[_0x2e6bfb(0x1fe)]),_0x1bfa52[_0x2e6bfb(0x23c)]&&(_0x7f9e1e[_0x2e6bfb(0x26d)]=_0x1bfa52[_0x2e6bfb(0x23c)]),_0x1bfa52['formatting']&&(_0x7f9e1e[_0x2e6bfb(0x1ef)]=_0x1bfa52[_0x2e6bfb(0x1ef)]),_0x1bfa52[_0x2e6bfb(0x231)]&&(_0x7f9e1e[_0x2e6bfb(0x246)]=_0x1bfa52['order_by']),_0x23a5c7[_0x2e6bfb(0x205)]=_0x7f9e1e;}return _0x23a5c7;}export async function activationDefToUpdateRequest(_0x1ddf10,_0x31ebfa){return activationDefToCreateRequest(_0x1ddf10,_0x31ebfa);}export function deepSortObject(_0x34a215){const _0x8c366d=a102_0x2f61;if(_0x34a215===null||typeof _0x34a215!==_0x8c366d(0x224))return _0x34a215;if(Array[_0x8c366d(0x1e9)](_0x34a215))return _0x34a215[_0x8c366d(0x1f7)](deepSortObject)['sort']((_0x24101a,_0x5a6772)=>JSON['stringify'](_0x24101a)[_0x8c366d(0x21e)](JSON[_0x8c366d(0x214)](_0x5a6772)));const _0x1d3631={};for(const _0xfe1f3f of Object[_0x8c366d(0x20d)](_0x34a215)['sort']()){_0x1d3631[_0xfe1f3f]=deepSortObject(_0x34a215[_0xfe1f3f]);}return _0x1d3631;}export function serializeRule(_0x1675cc){const _0x44d62b=a102_0x2f61;return JSON[_0x44d62b(0x214)](deepSortObject(_0x1675cc));}export function normalizeRuleForMatching(_0x431e82){return normalizeConditionsForMatching(_0x431e82);}function normalizeConditionsForMatching(_0x10593a){const _0x4efa56=a102_0x2f61;if(_0x10593a===null||typeof _0x10593a!==_0x4efa56(0x224))return _0x10593a;if(Array[_0x4efa56(0x1e9)](_0x10593a))return _0x10593a[_0x4efa56(0x1f7)](normalizeConditionsForMatching);const _0x4f4da5=_0x10593a;if((_0x4f4da5[_0x4efa56(0x1f5)]===_0x4efa56(0x249)||_0x4f4da5[_0x4efa56(0x1f5)]===_0x4efa56(0x1f9))&&typeof _0x4f4da5[_0x4efa56(0x1f3)]===_0x4efa56(0x260))return{..._0x4f4da5,'segment':_0x4efa56(0x201)};const _0x3cc912={};for(const _0x18ae71 of Object['keys'](_0x4f4da5)){_0x3cc912[_0x18ae71]=normalizeConditionsForMatching(_0x4f4da5[_0x18ae71]);}return _0x3cc912;}export function serializeRuleForMatching(_0xb52424){const _0x4e132a=a102_0x2f61;return JSON[_0x4e132a(0x214)](deepSortObject(normalizeRuleForMatching(_0xb52424)));}export function expandSegmentReferences(_0x16a2c4,_0x55a220,_0x1f50e0=new Set()){return expandConditions(_0x16a2c4,_0x55a220,_0x1f50e0);}function expandConditions(_0xed2149,_0x21add7,_0x33e04e){const _0x39ef00=a102_0x2f61;if(_0xed2149===null||typeof _0xed2149!=='object')return _0xed2149;if(Array[_0x39ef00(0x1e9)](_0xed2149))return _0xed2149[_0x39ef00(0x1f7)](_0x1f90e4=>expandConditions(_0x1f90e4,_0x21add7,_0x33e04e));const _0x2a7a8d=_0xed2149;if((_0x2a7a8d['type']===_0x39ef00(0x249)||_0x2a7a8d[_0x39ef00(0x1f5)]===_0x39ef00(0x1f9))&&typeof _0x2a7a8d[_0x39ef00(0x1f3)]===_0x39ef00(0x260)){const _0x17e207=_0x2a7a8d['segment'],_0x1168a2=_0x21add7[_0x39ef00(0x271)](_0x17e207);if(_0x1168a2&&!_0x33e04e['has'](_0x17e207)){const _0x249951=new Set(_0x33e04e);_0x249951['add'](_0x17e207);const _0x53afb6=expandConditions(_0x1168a2,_0x21add7,_0x249951);return{'type':_0x2a7a8d[_0x39ef00(0x1f5)],'expanded_rule':_0x53afb6};}return{'type':_0x2a7a8d['type'],'expanded_rule':'__UNRESOLVED__'};}const _0x3dcfb4={};for(const _0x496306 of Object[_0x39ef00(0x20d)](_0x2a7a8d)){_0x3dcfb4[_0x496306]=expandConditions(_0x2a7a8d[_0x496306],_0x21add7,_0x33e04e);}return _0x3dcfb4;}export function serializeExpandedRule(_0x554d67,_0x2c6809){const _0x4f13e9=a102_0x2f61,_0x1ff399=expandSegmentReferences(_0x554d67,_0x2c6809);return JSON[_0x4f13e9(0x214)](deepSortObject(_0x1ff399));}export function createSegmentNameContext(_0x4cd761){const _0x4297b6=a102_0x2f61,_0x61d907=new Set(),_0xaa2e94=new Map(),_0x18b1e6=new Map();if(_0x4cd761)for(const [_0x295a18,_0x38bb15]of Object[_0x4297b6(0x25a)](_0x4cd761)){if(_0x38bb15[_0x4297b6(0x247)]){const _0x4c96d7=serializeRule(_0x38bb15[_0x4297b6(0x247)]);_0x18b1e6[_0x4297b6(0x24c)](_0x4c96d7,_0x295a18),_0x61d907['add'](_0x295a18);}}return{'usedNames':_0x61d907,'ruleHashToName':_0xaa2e94,'localRuleToName':_0x4cd761?_0x18b1e6:undefined};}export function resolveSegmentName(_0x526c83,_0x299b1d,_0x49bf35,_0x57fdbc){const _0x6e6b08=a102_0x2f61,_0x5224e5=serializeRule(_0x299b1d);if(_0x49bf35[_0x6e6b08(0x24e)]){const _0x34f4c6=_0x49bf35[_0x6e6b08(0x24e)]['get'](_0x5224e5);if(_0x34f4c6)return{'name':_0x34f4c6,'isDuplicate':![],'isLocalMatch':!![]};}const _0x56c739=_0x49bf35[_0x6e6b08(0x229)][_0x6e6b08(0x271)](_0x5224e5);if(_0x56c739)return{'name':_0x56c739,'isDuplicate':!![],'isLocalMatch':![]};const _0x23b1ff=_0x57fdbc(_0x526c83);let _0x5f248c=_0x23b1ff||_0x526c83,_0x202c19=_0x5f248c,_0x4ebab2=0x2;while(_0x49bf35[_0x6e6b08(0x25f)][_0x6e6b08(0x1f4)](_0x202c19)){_0x202c19=_0x5f248c+'_'+_0x4ebab2,_0x4ebab2++;}return _0x49bf35[_0x6e6b08(0x25f)]['add'](_0x202c19),_0x49bf35['ruleHashToName'][_0x6e6b08(0x24c)](_0x5224e5,_0x202c19),{'name':_0x202c19,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x18de1a){const _0x2200ef=[],_0x5a35cb=_0x44d0f0=>{const _0x3a073d=a102_0x2f61;if(!_0x44d0f0||typeof _0x44d0f0!==_0x3a073d(0x224))return;if(Array[_0x3a073d(0x1e9)](_0x44d0f0)){_0x44d0f0[_0x3a073d(0x223)](_0x5a35cb);return;}const _0x8b952a=_0x44d0f0;(_0x8b952a[_0x3a073d(0x1f5)]===_0x3a073d(0x249)||_0x8b952a['type']===_0x3a073d(0x1f9))&&typeof _0x8b952a[_0x3a073d(0x1f3)]===_0x3a073d(0x260)&&_0x2200ef[_0x3a073d(0x234)](_0x8b952a[_0x3a073d(0x1f3)]);for(const _0x58a420 of Object[_0x3a073d(0x20a)](_0x8b952a)){_0x5a35cb(_0x58a420);}};return _0x5a35cb(_0x18de1a),_0x2200ef;}export function validateSegmentRule(_0x27b69e,_0x29f10e){const _0x139db0=a102_0x2f61;if(!_0x29f10e||!_0x29f10e[_0x139db0(0x1f2)])return;for(let _0x22b8b2=0x0;_0x22b8b2<_0x29f10e[_0x139db0(0x1f2)][_0x139db0(0x202)];_0x22b8b2++){const _0xfc283c=_0x29f10e[_0x139db0(0x1f2)][_0x22b8b2];if(_0x139db0(0x1f5)in _0xfc283c&&_0xfc283c['type']===_0x139db0(0x26c)){const _0x4afcc1=_0xfc283c;if(!_0x4afcc1[_0x139db0(0x238)]||_0x4afcc1[_0x139db0(0x238)]==='')throw new SDKError(ErrorCode[_0x139db0(0x203)],_0x139db0(0x1ff)+_0x27b69e+_0x139db0(0x241)+(_0x139db0(0x252)+_0x22b8b2+_0x139db0(0x21c))+_0x139db0(0x213));}}}
1
+ const a102_0x45780e=a102_0xee4e;(function(_0x1cce0c,_0x1a7728){const _0x5dba9d=a102_0xee4e,_0x3c574d=_0x1cce0c();while(!![]){try{const _0x3eba84=parseInt(_0x5dba9d(0x1c7))/0x1*(-parseInt(_0x5dba9d(0x212))/0x2)+-parseInt(_0x5dba9d(0x249))/0x3+-parseInt(_0x5dba9d(0x1e4))/0x4+-parseInt(_0x5dba9d(0x1fe))/0x5+parseInt(_0x5dba9d(0x22b))/0x6+-parseInt(_0x5dba9d(0x24e))/0x7+-parseInt(_0x5dba9d(0x236))/0x8*(-parseInt(_0x5dba9d(0x24d))/0x9);if(_0x3eba84===_0x1a7728)break;else _0x3c574d['push'](_0x3c574d['shift']());}catch(_0x219df1){_0x3c574d['push'](_0x3c574d['shift']());}}}(a102_0x20f2,0xb9ac3));import*as a102_0x44f7d5 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x513809,_0x15cd07){const _0x43e9f0=a102_0xee4e,_0x271ba4=_0x513809[_0x43e9f0(0x1cb)]&&_0x43e9f0(0x218)in _0x513809[_0x43e9f0(0x1cb)]&&_0x513809['rule'][_0x43e9f0(0x218)];return{'type':_0x43e9f0(0x1c5),'name':_0x513809[_0x43e9f0(0x1e8)],..._0x513809[_0x43e9f0(0x21b)]&&{'description':_0x513809[_0x43e9f0(0x21b)]},..._0x15cd07&&{'folder':_0x15cd07},..._0x271ba4&&{'rule':apiRuleToYaml(_0x513809[_0x43e9f0(0x1cb)])},..._0x513809[_0x43e9f0(0x23f)]!==undefined&&{'kind':_0x513809[_0x43e9f0(0x23f)]===0x0?_0x43e9f0(0x237):_0x513809[_0x43e9f0(0x23f)]===0x1?_0x43e9f0(0x246):_0x43e9f0(0x20a)},..._0x513809['isVisible']!==undefined&&{'visible':_0x513809['isVisible']}};}export async function segmentResponseToDef(_0x45dd92,_0x2b166b,_0x505f26){const _0x276e3b=a102_0xee4e,_0x43c036=segmentResponseToDefSync(_0x45dd92,_0x505f26);if(!_0x2b166b||!_0x2b166b[_0x276e3b(0x220)])return _0x43c036;return _0x43c036[_0x276e3b(0x1cb)]&&(_0x43c036[_0x276e3b(0x1cb)]=await resolveRuleSegmentRefs(_0x43c036[_0x276e3b(0x1cb)],_0x2b166b[_0x276e3b(0x220)])),_0x43c036;}export function apiRuleToYaml(_0x1c168e){const _0x222e22=a102_0xee4e,_0x5eb449=(_0x1c168e['conditions']||[])['map'](apiConditionToYaml);if(_0x5eb449[_0x222e22(0x23d)]===0x1&&!_0x1c168e[_0x222e22(0x21b)]&&_0x222e22(0x218)in _0x5eb449[0x0]&&(_0x5eb449[0x0][_0x222e22(0x218)]==='And'||_0x5eb449[0x0][_0x222e22(0x218)]==='Or')){const _0x1ff9f3=_0x5eb449[0x0];if(_0x1ff9f3[_0x222e22(0x218)]===_0x1c168e[_0x222e22(0x218)]&&_0x1ff9f3[_0x222e22(0x20c)])return{'type':_0x1c168e[_0x222e22(0x218)],'conditions':_0x1ff9f3[_0x222e22(0x20c)],..._0x1ff9f3[_0x222e22(0x21b)]&&{'description':_0x1ff9f3[_0x222e22(0x21b)]}};}return{'type':_0x1c168e[_0x222e22(0x218)],'conditions':_0x5eb449,..._0x1c168e['description']&&{'description':_0x1c168e['description']}};}export async function resolveRuleSegmentRefs(_0x36312d,_0x169c16){const _0x1ba5da=a102_0xee4e,_0x52ebd2=await Promise['all'](_0x36312d[_0x1ba5da(0x20c)]['map'](_0x360b38=>resolveConditionSegmentRefs(_0x360b38,_0x169c16)));return{..._0x36312d,'conditions':_0x52ebd2};}async function resolveConditionSegmentRefs(_0x297d6f,_0x1f8be7){const _0x4839ba=a102_0xee4e;if('segment'in _0x297d6f&&(_0x297d6f['type']===_0x4839ba(0x1f3)||_0x297d6f[_0x4839ba(0x218)]===_0x4839ba(0x219))){const _0x5017ae=_0x297d6f;if(/^\d+$/[_0x4839ba(0x1ec)](_0x5017ae[_0x4839ba(0x1c5)])){const _0x407b95=await _0x1f8be7(_0x5017ae[_0x4839ba(0x1c5)]);return{..._0x5017ae,'segment':_0x407b95};}return _0x297d6f;}if('conditions'in _0x297d6f&&_0x297d6f[_0x4839ba(0x20c)]){const _0x276e6d=_0x297d6f,_0x24d6f5=await Promise['all'](_0x276e6d['conditions'][_0x4839ba(0x21e)](_0xa504df=>resolveConditionSegmentRefs(_0xa504df,_0x1f8be7)));return{..._0x276e6d,'conditions':_0x24d6f5};}if(_0x4839ba(0x24f)in _0x297d6f&&_0x297d6f['filter']){const _0x47b3af=_0x297d6f,_0x263e10=await resolveRuleSegmentRefs(_0x47b3af[_0x4839ba(0x24f)],_0x1f8be7);return{..._0x47b3af,'filter':_0x263e10};}return _0x297d6f;}export async function resolveRuleSegmentIds(_0x2a0b32,_0x40060e){const _0x1c65a5=a102_0xee4e,_0xa92176=await Promise['all'](_0x2a0b32[_0x1c65a5(0x20c)]['map'](_0x137b05=>resolveConditionSegmentIds(_0x137b05,_0x40060e)));return{..._0x2a0b32,'conditions':_0xa92176};}async function resolveConditionSegmentIds(_0x3b6adc,_0x43803c){const _0x82c603=a102_0xee4e;if(_0x82c603(0x1c5)in _0x3b6adc&&(_0x3b6adc[_0x82c603(0x218)]===_0x82c603(0x1f3)||_0x3b6adc[_0x82c603(0x218)]===_0x82c603(0x219))){const _0x570194=_0x3b6adc;if(!/^\d+$/[_0x82c603(0x1ec)](_0x570194['segment'])){const _0x58dc3f=await _0x43803c(_0x570194[_0x82c603(0x1c5)]);return{..._0x570194,'segment':_0x58dc3f};}return _0x3b6adc;}if(_0x82c603(0x20c)in _0x3b6adc&&_0x3b6adc['conditions']){const _0x407038=_0x3b6adc,_0xb5d2b4=await Promise['all'](_0x407038[_0x82c603(0x20c)][_0x82c603(0x21e)](_0x6e905c=>resolveConditionSegmentIds(_0x6e905c,_0x43803c)));return{..._0x407038,'conditions':_0xb5d2b4};}if(_0x82c603(0x24f)in _0x3b6adc&&_0x3b6adc['filter']){const _0x3f9ec6=_0x3b6adc,_0x3499b0=await resolveRuleSegmentIds(_0x3f9ec6[_0x82c603(0x24f)],_0x43803c);return{..._0x3f9ec6,'filter':_0x3499b0};}return _0x3b6adc;}function apiConditionToYaml(_0xc69552){const _0x4c20de=a102_0xee4e;if(_0xc69552[_0x4c20de(0x218)]===_0x4c20de(0x200)||_0xc69552['type']==='Or'){if(_0xc69552[_0x4c20de(0x20c)]){const _0x400870=_0xc69552[_0x4c20de(0x20c)]['map'](apiConditionToYaml);if(_0x400870[_0x4c20de(0x23d)]===0x1&&!_0xc69552[_0x4c20de(0x21b)])return _0x400870[0x0];return{'type':_0xc69552[_0x4c20de(0x218)],'conditions':_0x400870,..._0xc69552['description']&&{'description':_0xc69552[_0x4c20de(0x21b)]}};}}if(_0xc69552[_0x4c20de(0x218)]===_0x4c20de(0x1da)&&_0xc69552['leftValue']&&_0xc69552[_0x4c20de(0x1e6)]){const _0x2a5a06=_0xc69552['leftValue']['aggregation']?{'type':_0xc69552[_0x4c20de(0x242)][_0x4c20de(0x1e7)][_0x4c20de(0x218)],..._0xc69552[_0x4c20de(0x242)][_0x4c20de(0x1e7)]['groupingColumns']&&{'groupingColumns':_0xc69552['leftValue'][_0x4c20de(0x1e7)][_0x4c20de(0x207)]}}:undefined;return{'type':'Value','attribute':_0xc69552[_0x4c20de(0x242)][_0x4c20de(0x1e8)]||'','operator':apiOperatorToYaml(_0xc69552['operator']),..._0xc69552[_0x4c20de(0x1ef)]&&_0xc69552[_0x4c20de(0x1ef)]!=='any'?{'arrayMatching':_0xc69552['arrayMatching']}:{},..._0xc69552['exclude']?{'exclude':_0xc69552['exclude']}:{},..._0x2a5a06?{'aggregation':_0x2a5a06}:{},..._0xc69552['leftValue'][_0x4c20de(0x206)]?{'source':_0xc69552[_0x4c20de(0x242)]['source']['name']}:{},..._0xc69552['leftValue']['filter']?{'filter':apiRuleToYaml(_0xc69552[_0x4c20de(0x242)]['filter'])}:{},..._0xc69552[_0x4c20de(0x21c)]!==undefined&&_0xc69552[_0x4c20de(0x21c)]!==null?{'limit':_0xc69552[_0x4c20de(0x21c)]}:{}};}if(_0xc69552[_0x4c20de(0x218)]===_0x4c20de(0x227)&&_0xc69552['id'])return{'type':_0xc69552[_0x4c20de(0x219)]?_0x4c20de(0x219):'include','segment':_0xc69552['id']};return{'type':_0x4c20de(0x200),'conditions':[]};}function isTemporalOperator(_0x5f1a49){const _0x26f21c=a102_0xee4e;return _0x5f1a49==='TimeWithinPast'||_0x5f1a49===_0x26f21c(0x1ce);}function getEffectiveValue(_0x43a5bf){const _0xd4a94f=a102_0xee4e,_0x43123c=_0x43a5bf['values'];return _0x43a5bf[_0xd4a94f(0x1ed)]??_0x43123c;}function apiOperatorToYaml(_0x273f1a){const _0x2aee47=a102_0xee4e;let _0x102fb0;if(_0x273f1a['rightValues']&&_0x273f1a[_0x2aee47(0x244)][_0x2aee47(0x23d)]>0x0)_0x102fb0=_0x273f1a[_0x2aee47(0x244)];else{if(_0x273f1a[_0x2aee47(0x231)]!==undefined)_0x102fb0=_0x273f1a['rightValue'];else isTemporalOperator(_0x273f1a[_0x2aee47(0x218)])&&_0x273f1a[_0x2aee47(0x1ed)]!==undefined&&(_0x102fb0=_0x273f1a['value']);}return{'type':mapApiOperatorType(_0x273f1a[_0x2aee47(0x218)]),..._0x273f1a['not']&&{'not':_0x273f1a[_0x2aee47(0x21f)]},..._0x102fb0!==undefined&&{'value':_0x102fb0},..._0x273f1a[_0x2aee47(0x1e1)]&&{'unit':_0x273f1a['unit']}};}function a102_0x20f2(){const _0xa5728b=['push','join_row','1890016CVpucy','parse','operator','aggregation','name','connectionNameToIdMap','activationTemplateId','activations','test','value','add','arrayMatching','Invalid\x20connector_config\x20for\x20activation\x20\x22','activationParams','scheduleType','include','notify_on','max','email_recipients','code','localeCompare','behavior','duration','timezone','Connector:\x20','repeatSubFrequency','3477175kVUyGo','connectorConfig','And','connectionId','isArray','CONNECTOR_SCHEMA_NOT_FOUND','\x27:\x20','from','source','groupingColumns','values','attribute','funnel_stage','Unknown\x20email\x20recipient:\x20','conditions','CONNECTION_NOT_FOUND','].attribute\x20cannot\x20be\x20empty.\x0a','activation_template_id','stringify','getSchema','30118yIEqzM','errors','columns','visible','null','replace','type','exclude','valid','description','limit','joinRow','map','not','resolveSegmentName','notifyOn','min','Unknown\x20connection:\x20','repeatFrequency','start_at','behavior_table','Reference','string','keys','__UNRESOLVED__','2448030rHAYMV','attributes','startAt','repeat_frequency','Segment\x20description','repeat_unit','rightValue','emailRecipients','set','\x22:\x0a','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','53256Vhdvgv','batch','\x0a\x0aAvailable\x20fields:\x0a','orderBy','behaviorTableName','object','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','length','has','kind','join_strategy','connectionNameToTypeMap','leftValue','warnings','rightValues','segmentFolderId','realtime','JOURNEY_SYNTAX_ERROR','rule:','4138749LnWRxA','toLowerCase','entries','notification','4959YpEXeB','2845913vTnYGA','filter','any','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','endOn','activations:','formatting','ruleHashToName','sort','usedNames','attribute_name','segment','end_on','24BHNEQB','visibility','order_by','repeatUnit','rule','all_columns','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','TimeWithinNext','connector_config','Equal','localRuleToName','folder','allColumns','joinStrategy','isVisible','every','connection','syndicationBehavior','INVALID_ARGUMENT','Value','repeat_sub_frequency','connector_config\x20for\x20activation\x20\x22','New\x20Segment','get','schedule','forEach','unit'];a102_0x20f2=function(){return _0xa5728b;};return a102_0x20f2();}function mapApiOperatorType(_0x355ea7){return _0x355ea7;}export function segmentDefToCreateRequest(_0x394af2,_0x1372d9){const _0x2cc2f3=a102_0xee4e,_0x261c6c={'name':_0x394af2[_0x2cc2f3(0x1e8)]};return _0x394af2[_0x2cc2f3(0x21b)]&&(_0x261c6c['description']=_0x394af2[_0x2cc2f3(0x21b)]),_0x394af2[_0x2cc2f3(0x1cb)]&&(_0x261c6c[_0x2cc2f3(0x1cb)]=yamlRuleToApi(_0x394af2[_0x2cc2f3(0x1cb)])),_0x394af2[_0x2cc2f3(0x23f)]&&(_0x261c6c[_0x2cc2f3(0x23f)]=_0x394af2[_0x2cc2f3(0x23f)]===_0x2cc2f3(0x237)?0x0:_0x394af2[_0x2cc2f3(0x23f)]===_0x2cc2f3(0x246)?0x1:0x2),_0x394af2['visible']!==undefined&&(_0x261c6c[_0x2cc2f3(0x1d5)]=_0x394af2[_0x2cc2f3(0x215)]),_0x1372d9&&(_0x261c6c[_0x2cc2f3(0x245)]=_0x1372d9),_0x261c6c;}export function segmentDefToUpdateRequest(_0x470a31){const _0xe03e64=a102_0xee4e,_0x4917c5={'name':_0x470a31['name']};return _0x470a31[_0xe03e64(0x21b)]!==undefined&&(_0x4917c5[_0xe03e64(0x21b)]=_0x470a31['description']),_0x470a31['rule']&&(_0x4917c5[_0xe03e64(0x1cb)]=yamlRuleToApi(_0x470a31[_0xe03e64(0x1cb)])),_0x470a31[_0xe03e64(0x23f)]&&(_0x4917c5[_0xe03e64(0x23f)]=_0x470a31[_0xe03e64(0x23f)]===_0xe03e64(0x237)?0x0:_0x470a31['kind']===_0xe03e64(0x246)?0x1:0x2),_0x4917c5;}export function yamlRuleToApi(_0x31c324,_0x242b04=![]){const _0xc4354e=a102_0xee4e,_0xf5b818=_0x31c324['conditions'][_0xc4354e(0x21e)](yamlConditionToApi);if(_0x242b04){const _0x108a58=_0xf5b818[_0xc4354e(0x1d6)](_0x500aa2=>_0x500aa2[_0xc4354e(0x218)]==='And'||_0x500aa2[_0xc4354e(0x218)]==='Or');if(!_0x108a58&&_0xf5b818[_0xc4354e(0x23d)]>0x0)return{'type':_0x31c324[_0xc4354e(0x218)],'conditions':[{'type':_0xc4354e(0x200),'description':_0x31c324['description']||'','conditions':_0xf5b818}]};}return{'type':_0x31c324['type'],'conditions':_0xf5b818,..._0x31c324[_0xc4354e(0x21b)]&&{'description':_0x31c324['description']}};}function yamlConditionToApi(_0x23ec84){const _0x44110c=a102_0xee4e;if(_0x44110c(0x1c5)in _0x23ec84&&(_0x23ec84['type']===_0x44110c(0x1f3)||_0x23ec84['type']===_0x44110c(0x219))){const _0x5cb149=_0x23ec84;return{'type':_0x44110c(0x227),'id':_0x5cb149['segment'],'exclude':_0x5cb149['type']===_0x44110c(0x219)};}if(_0x44110c(0x218)in _0x23ec84&&(_0x23ec84[_0x44110c(0x218)]===_0x44110c(0x200)||_0x23ec84['type']==='Or')){const _0x2f3d82=_0x23ec84;return{'type':_0x2f3d82['type'],'conditions':_0x2f3d82[_0x44110c(0x20c)]['map'](yamlConditionToApi),..._0x2f3d82['description']&&{'description':_0x2f3d82['description']}};}const _0xdb0822=_0x23ec84,_0x52f511={'type':'Value','leftValue':buildLeftValue(_0xdb0822),'operator':yamlOperatorToApi(_0xdb0822[_0x44110c(0x1e6)]),'exclude':_0xdb0822['exclude']??![],'arrayMatching':_0xdb0822[_0x44110c(0x1ef)]??_0x44110c(0x250)};return _0xdb0822['limit']!==undefined&&(_0x52f511[_0x44110c(0x21c)]=_0xdb0822[_0x44110c(0x21c)]),_0x52f511;}function buildLeftValue(_0x4ba0b1){const _0x50ff4a=a102_0xee4e,_0x23f325={'name':_0x4ba0b1[_0x50ff4a(0x209)]};return _0x4ba0b1['aggregation']&&(_0x23f325[_0x50ff4a(0x1e7)]={'type':_0x4ba0b1[_0x50ff4a(0x1e7)][_0x50ff4a(0x218)],..._0x4ba0b1[_0x50ff4a(0x1e7)]['groupingColumns']&&{'groupingColumns':_0x4ba0b1['aggregation']['groupingColumns']}}),_0x4ba0b1[_0x50ff4a(0x206)]&&(_0x23f325[_0x50ff4a(0x206)]={'name':_0x4ba0b1[_0x50ff4a(0x206)]}),_0x4ba0b1[_0x50ff4a(0x24f)]&&(_0x23f325[_0x50ff4a(0x24f)]=yamlRuleToApi(_0x4ba0b1[_0x50ff4a(0x24f)])),_0x23f325;}function yamlOperatorToApi(_0x298db3){const _0xd8a507=a102_0xee4e,_0x23d0b9={'type':mapYamlOperatorType(_0x298db3[_0xd8a507(0x218)]),'not':_0x298db3[_0xd8a507(0x21f)]??![]},_0x363184=getEffectiveValue(_0x298db3);if(_0x363184!==undefined){if(Array[_0xd8a507(0x202)](_0x363184))_0x23d0b9['rightValues']=_0x363184;else isTemporalOperator(_0x298db3[_0xd8a507(0x218)])?_0x23d0b9[_0xd8a507(0x1ed)]=_0x363184:_0x23d0b9['rightValue']=_0x363184;}return _0x298db3[_0xd8a507(0x1e1)]&&(_0x23d0b9['unit']=_0x298db3[_0xd8a507(0x1e1)]),_0x23d0b9;}function mapYamlOperatorType(_0x3b0bb0){return _0x3b0bb0;}export function toYamlString(_0xdef579){const _0x3a576c=a102_0xee4e,_0x51e076=JSON[_0x3a576c(0x1e5)](JSON[_0x3a576c(0x210)](_0xdef579)),_0x55ec57=a102_0x44f7d5[_0x3a576c(0x210)](_0x51e076,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x3a576c(0x216)}),_0x3caff2=[_0x3a576c(0x248)];let _0x3b480d=_0x55ec57;for(const _0x1b74c6 of _0x3caff2){_0x3b480d=_0x3b480d[_0x3a576c(0x217)](new RegExp('^('+_0x1b74c6+')','m'),(_0x1296df,_0x397066,_0x276957)=>{if(_0x276957===0x0||_0x3b480d[_0x276957-0x1]==='\x0a'&&_0x3b480d[_0x276957-0x2]==='\x0a')return _0x397066;return'\x0a'+_0x397066;});}return _0x3b480d;}export function parseYamlString(_0x2c187c){const _0x26f6bf=a102_0xee4e,_0x4de2b3=a102_0x44f7d5['parse'](_0x2c187c);if(!_0x4de2b3['name'])throw new Error('YAML\x20config\x20missing\x20required\x20field:\x20name');if(_0x4de2b3['type']&&_0x4de2b3['type']!==_0x26f6bf(0x1c5))throw new Error(_0x26f6bf(0x23c)+_0x4de2b3[_0x26f6bf(0x218)]);return _0x4de2b3;}export function isSegmentYaml(_0x2969fd){const _0xcbd12=a102_0xee4e;if(typeof _0x2969fd!==_0xcbd12(0x23b)||_0x2969fd===null)return![];const _0x230877=_0x2969fd;return _0x230877[_0xcbd12(0x218)]==='segment'||_0x230877[_0xcbd12(0x218)]===undefined;}export function generateTemplate(_0x27619d=a102_0x45780e(0x1dd)){const _0x158d5b=a102_0x45780e,_0x334501={'type':_0x158d5b(0x1c5),'name':_0x27619d,'description':_0x158d5b(0x22f),'rule':{'type':_0x158d5b(0x200),'conditions':[{'type':_0x158d5b(0x1da),'attribute':_0x158d5b(0x1c4),'operator':{'type':_0x158d5b(0x1d0),'value':_0x158d5b(0x1ed)}}]}};return toYamlString(_0x334501);}export function segmentToYamlString(_0x2a4cc0){const _0x486a0a=a102_0x45780e,_0x583bba=JSON[_0x486a0a(0x1e5)](JSON[_0x486a0a(0x210)](_0x2a4cc0)),_0x3e0f7d=a102_0x44f7d5[_0x486a0a(0x210)](_0x583bba,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x486a0a(0x216)}),_0x4172b6=[_0x486a0a(0x248),_0x486a0a(0x253)];let _0x40ce84=_0x3e0f7d;for(const _0x56c7c5 of _0x4172b6){_0x40ce84=_0x40ce84[_0x486a0a(0x217)](new RegExp('^('+_0x56c7c5+')','m'),(_0x506253,_0x565062,_0x4a3490)=>{if(_0x4a3490===0x0||_0x40ce84[_0x4a3490-0x1]==='\x0a'&&_0x40ce84[_0x4a3490-0x2]==='\x0a')return _0x565062;return'\x0a'+_0x565062;});}return _0x40ce84;}export function parseSegmentYamlFile(_0x3a0d17){const _0xd9db53=a102_0x45780e,_0x1a71b2=a102_0x44f7d5['parse'](_0x3a0d17);if(!_0x1a71b2[_0xd9db53(0x1e8)])throw new Error('YAML\x20config\x20missing\x20required\x20field:\x20name');return _0x1a71b2;}export function normalizeChildSegmentYaml(_0x181f82){const _0x468468=a102_0x45780e;return{'type':_0x468468(0x1c5),'name':_0x181f82['name'],..._0x181f82[_0x468468(0x21b)]!==undefined&&{'description':_0x181f82[_0x468468(0x21b)]},..._0x181f82[_0x468468(0x1d2)]!==undefined&&{'folder':_0x181f82[_0x468468(0x1d2)]},..._0x181f82[_0x468468(0x1cb)]&&{'rule':normalizeRule(_0x181f82[_0x468468(0x1cb)])},..._0x181f82[_0x468468(0x23f)]!==undefined&&{'kind':_0x181f82[_0x468468(0x23f)]},..._0x181f82[_0x468468(0x215)]!==undefined&&{'visible':_0x181f82['visible']},..._0x181f82[_0x468468(0x1eb)]&&{'activations':_0x181f82[_0x468468(0x1eb)][_0x468468(0x21e)](normalizeActivation)}};}export function normalizeRule(_0x198391){const _0x16f51e=a102_0x45780e;return{'type':_0x198391[_0x16f51e(0x218)],'conditions':_0x198391[_0x16f51e(0x20c)][_0x16f51e(0x21e)](normalizeCondition),..._0x198391['description']!==undefined&&{'description':_0x198391[_0x16f51e(0x21b)]}};}function normalizeCondition(_0x2a2c5d){const _0x15b3e2=a102_0x45780e;if(_0x15b3e2(0x1c5)in _0x2a2c5d&&(_0x2a2c5d[_0x15b3e2(0x218)]===_0x15b3e2(0x1f3)||_0x2a2c5d[_0x15b3e2(0x218)]===_0x15b3e2(0x219))){const _0x4e8d73=_0x2a2c5d;return{'type':_0x4e8d73[_0x15b3e2(0x218)],'segment':_0x4e8d73[_0x15b3e2(0x1c5)]};}if(_0x15b3e2(0x218)in _0x2a2c5d&&(_0x2a2c5d[_0x15b3e2(0x218)]===_0x15b3e2(0x200)||_0x2a2c5d[_0x15b3e2(0x218)]==='Or')){const _0x48da3e=_0x2a2c5d;return{'type':_0x48da3e[_0x15b3e2(0x218)],'conditions':_0x48da3e[_0x15b3e2(0x20c)][_0x15b3e2(0x21e)](normalizeCondition),..._0x48da3e['description']!==undefined&&{'description':_0x48da3e[_0x15b3e2(0x21b)]}};}const _0x71700d=_0x2a2c5d;return{'type':_0x15b3e2(0x1da),'attribute':_0x71700d[_0x15b3e2(0x209)],'operator':normalizeOperator(_0x71700d[_0x15b3e2(0x1e6)]),..._0x71700d[_0x15b3e2(0x1ef)]!==undefined&&{'arrayMatching':_0x71700d[_0x15b3e2(0x1ef)]},..._0x71700d[_0x15b3e2(0x219)]!==undefined&&{'exclude':_0x71700d[_0x15b3e2(0x219)]},..._0x71700d['aggregation']!==undefined&&{'aggregation':_0x71700d['aggregation']},..._0x71700d[_0x15b3e2(0x206)]!==undefined&&{'source':_0x71700d[_0x15b3e2(0x206)]},..._0x71700d[_0x15b3e2(0x24f)]!==undefined&&{'filter':normalizeRule(_0x71700d[_0x15b3e2(0x24f)])},..._0x71700d[_0x15b3e2(0x21c)]!==undefined&&{'limit':_0x71700d[_0x15b3e2(0x21c)]}};}function normalizeOperator(_0x1246cb){const _0x3eec8b=a102_0x45780e,_0xf595fe=getEffectiveValue(_0x1246cb);return{'type':_0x1246cb[_0x3eec8b(0x218)],..._0x1246cb[_0x3eec8b(0x21f)]!==undefined&&{'not':_0x1246cb[_0x3eec8b(0x21f)]},..._0xf595fe!==undefined&&{'value':_0xf595fe},..._0x1246cb[_0x3eec8b(0x222)]!==undefined&&{'min':_0x1246cb[_0x3eec8b(0x222)]},..._0x1246cb[_0x3eec8b(0x1f5)]!==undefined&&{'max':_0x1246cb[_0x3eec8b(0x1f5)]},..._0x1246cb['unit']!==undefined&&{'unit':_0x1246cb[_0x3eec8b(0x1e1)]},..._0x1246cb[_0x3eec8b(0x1fa)]!==undefined&&{'duration':_0x1246cb[_0x3eec8b(0x1fa)]},..._0x1246cb[_0x3eec8b(0x205)]!==undefined&&{'from':_0x1246cb['from']}};}function normalizeActivation(_0x19ebbd){const _0x32f555=a102_0x45780e;return{'name':_0x19ebbd[_0x32f555(0x1e8)],'connection':_0x19ebbd['connection'],..._0x19ebbd[_0x32f555(0x21b)]!==undefined&&{'description':_0x19ebbd[_0x32f555(0x21b)]},..._0x19ebbd[_0x32f555(0x1cc)]!==undefined&&{'all_columns':_0x19ebbd[_0x32f555(0x1cc)]},..._0x19ebbd[_0x32f555(0x214)]!==undefined&&{'columns':_0x19ebbd[_0x32f555(0x214)]},..._0x19ebbd[_0x32f555(0x1f9)]!==undefined&&{'behavior':_0x19ebbd['behavior']},..._0x19ebbd[_0x32f555(0x1df)]!==undefined&&{'schedule':_0x19ebbd[_0x32f555(0x1df)]},..._0x19ebbd['notification']!==undefined&&{'notification':_0x19ebbd[_0x32f555(0x24c)]},..._0x19ebbd[_0x32f555(0x1cf)]!==undefined&&{'connector_config':_0x19ebbd[_0x32f555(0x1cf)]},..._0x19ebbd[_0x32f555(0x20f)]!==undefined&&{'activation_template_id':_0x19ebbd['activation_template_id']}};}export function activationResponseToDef(_0x410544,_0x3191,_0x3db384){const _0x50285b=a102_0x45780e,_0x1a00a4=_0x410544[_0x50285b(0x201)]||'',_0x4fdf02=_0x3db384?.[_0x50285b(0x1de)](_0x1a00a4)??_0x1a00a4,_0x1a4466={'name':_0x410544[_0x50285b(0x1e8)],'connection':_0x4fdf02};_0x410544[_0x50285b(0x21b)]&&(_0x1a4466[_0x50285b(0x21b)]=_0x410544[_0x50285b(0x21b)]);let _0x4f14e0=[];_0x410544[_0x50285b(0x214)]&&_0x410544[_0x50285b(0x214)][_0x50285b(0x23d)]>0x0&&(_0x4f14e0=_0x410544['columns'][_0x50285b(0x24f)](_0x4ef79f=>_0x4ef79f&&_0x4ef79f[_0x50285b(0x1e8)])['map'](_0x5f4775=>{const _0x408830=_0x50285b;if(_0x5f4775[_0x408830(0x218)]||_0x5f4775[_0x408830(0x1c8)])return{'name':_0x5f4775['name'],..._0x5f4775['type']&&{'type':_0x5f4775[_0x408830(0x218)]},..._0x5f4775[_0x408830(0x1c8)]&&{'visibility':_0x5f4775['visibility']}};return _0x5f4775[_0x408830(0x1e8)];}));_0x4f14e0[_0x50285b(0x23d)]>0x0&&(_0x1a4466[_0x50285b(0x214)]=_0x4f14e0);_0x410544[_0x50285b(0x1d3)]!==undefined&&(_0x410544[_0x50285b(0x1d3)]===![]&&_0x4f14e0['length']===0x0?_0x1a4466['all_columns']=!![]:_0x1a4466[_0x50285b(0x1cc)]=_0x410544[_0x50285b(0x1d3)]);const _0x405e08={};let _0x1e478a=![];_0x410544['scheduleType']&&(_0x405e08[_0x50285b(0x218)]=_0x410544[_0x50285b(0x1f2)],_0x1e478a=!![]);_0x410544['repeatUnit']&&(_0x405e08[_0x50285b(0x230)]=_0x410544[_0x50285b(0x1ca)],_0x1e478a=!![]);_0x410544[_0x50285b(0x224)]!==undefined&&_0x410544['repeatFrequency']!==null&&(_0x405e08[_0x50285b(0x22e)]=_0x410544[_0x50285b(0x224)],_0x1e478a=!![]);_0x410544['repeatSubFrequency']&&_0x410544[_0x50285b(0x1fd)][_0x50285b(0x23d)]>0x0&&(_0x405e08[_0x50285b(0x1db)]=_0x410544[_0x50285b(0x1fd)],_0x1e478a=!![]);_0x410544[_0x50285b(0x22d)]!==undefined&&(_0x405e08[_0x50285b(0x225)]=_0x410544['startAt'],_0x1e478a=!![]);_0x410544['endOn']!==undefined&&(_0x405e08[_0x50285b(0x1c6)]=_0x410544['endOn'],_0x1e478a=!![]);_0x410544['timezone']&&(_0x405e08[_0x50285b(0x1fb)]=_0x410544[_0x50285b(0x1fb)],_0x1e478a=!![]);_0x1e478a&&(_0x1a4466[_0x50285b(0x1df)]=_0x405e08);(_0x410544[_0x50285b(0x221)]&&_0x410544[_0x50285b(0x221)]['length']>0x0||_0x410544[_0x50285b(0x232)]&&_0x410544[_0x50285b(0x232)][_0x50285b(0x23d)]>0x0)&&(_0x1a4466[_0x50285b(0x24c)]={},_0x410544[_0x50285b(0x221)]&&_0x410544['notifyOn']['length']>0x0&&(_0x1a4466[_0x50285b(0x24c)][_0x50285b(0x1f4)]=_0x410544[_0x50285b(0x221)]),_0x410544[_0x50285b(0x232)]&&_0x410544['emailRecipients'][_0x50285b(0x23d)]>0x0&&(_0x1a4466[_0x50285b(0x24c)][_0x50285b(0x1f6)]=_0x410544[_0x50285b(0x232)]['map'](_0x478e0a=>{const _0xb5902b=_0x50285b,_0x40fddc=_0x3191?.[_0xb5902b(0x1de)](_0x478e0a);return _0x40fddc??String(_0x478e0a);})));_0x410544['connectorConfig']&&Object[_0x50285b(0x229)](_0x410544['connectorConfig'])[_0x50285b(0x23d)]>0x0&&(_0x1a4466[_0x50285b(0x1cf)]=normalizeConnectorConfigForYaml(_0x410544[_0x50285b(0x1ff)]));_0x410544[_0x50285b(0x1ea)]&&(_0x1a4466[_0x50285b(0x20f)]=_0x410544[_0x50285b(0x1ea)]);if(_0x410544[_0x50285b(0x1d8)]){const _0x282b96={},_0x42643b=_0x410544[_0x50285b(0x1d8)];_0x42643b[_0x50285b(0x214)]&&_0x42643b[_0x50285b(0x214)][_0x50285b(0x23d)]>0x0&&(_0x282b96['columns']=_0x42643b['columns'][_0x50285b(0x24f)](_0x378bb0=>_0x378bb0&&_0x378bb0['name'])[_0x50285b(0x21e)](_0xe1debc=>({'name':_0xe1debc[_0x50285b(0x1e8)],..._0xe1debc['type']&&{'type':_0xe1debc['type']},..._0xe1debc[_0x50285b(0x1c8)]&&{'visibility':_0xe1debc['visibility']}}))),_0x42643b['behaviorTableName']&&(_0x282b96['behavior_table']=_0x42643b[_0x50285b(0x23a)]),_0x42643b['joinRow']!==undefined&&(_0x282b96[_0x50285b(0x1e3)]=_0x42643b[_0x50285b(0x21d)]),_0x42643b[_0x50285b(0x1d4)]&&(_0x282b96[_0x50285b(0x240)]=_0x42643b[_0x50285b(0x1d4)]),_0x42643b[_0x50285b(0x254)]&&(_0x282b96[_0x50285b(0x254)]=_0x42643b[_0x50285b(0x254)]),_0x42643b[_0x50285b(0x239)]&&_0x42643b[_0x50285b(0x239)]['length']>0x0&&(_0x282b96['order_by']=_0x42643b['orderBy']),Object[_0x50285b(0x229)](_0x282b96)[_0x50285b(0x23d)]>0x0&&(_0x1a4466[_0x50285b(0x1f9)]=_0x282b96);}return _0x1a4466;}export function journeyActivationStepToYaml(_0x37d201,_0x3eb97f,_0x26cd3d){const _0x13fed5=a102_0x45780e,_0x284569=_0x37d201[_0x13fed5(0x22c)][_0x13fed5(0x1f1)],_0x32138e=_0x284569['connectionId']||'',_0x900bea=_0x26cd3d?.[_0x13fed5(0x1de)](_0x32138e)??_0x32138e,_0x3c0456={'name':_0x284569['name']||'','connection':_0x900bea};_0x284569[_0x13fed5(0x21b)]&&(_0x3c0456['description']=_0x284569['description']);let _0x53fe6e=[];_0x284569['columns']&&_0x284569[_0x13fed5(0x214)][_0x13fed5(0x23d)]>0x0&&(_0x53fe6e=_0x284569[_0x13fed5(0x214)][_0x13fed5(0x24f)](_0x215834=>_0x215834&&_0x215834['name'])[_0x13fed5(0x21e)](_0x4865a9=>{const _0x1fa1d5=_0x13fed5;if(_0x4865a9[_0x1fa1d5(0x218)]||_0x4865a9[_0x1fa1d5(0x1c8)])return{'name':_0x4865a9['name'],..._0x4865a9[_0x1fa1d5(0x218)]&&{'type':_0x4865a9[_0x1fa1d5(0x218)]},..._0x4865a9[_0x1fa1d5(0x1c8)]&&{'visibility':_0x4865a9['visibility']}};return _0x4865a9[_0x1fa1d5(0x1e8)];}));_0x53fe6e[_0x13fed5(0x23d)]>0x0&&(_0x3c0456[_0x13fed5(0x214)]=_0x53fe6e);_0x284569[_0x13fed5(0x1d3)]!==undefined&&(_0x284569['allColumns']===![]&&_0x53fe6e['length']===0x0?_0x3c0456[_0x13fed5(0x1cc)]=!![]:_0x3c0456[_0x13fed5(0x1cc)]=_0x284569[_0x13fed5(0x1d3)]);const _0x357776={};let _0x392d3d=![];_0x284569[_0x13fed5(0x1f2)]&&(_0x357776[_0x13fed5(0x218)]=_0x284569['scheduleType'],_0x392d3d=!![]);_0x284569[_0x13fed5(0x1ca)]&&(_0x357776[_0x13fed5(0x230)]=_0x284569[_0x13fed5(0x1ca)],_0x392d3d=!![]);_0x284569[_0x13fed5(0x224)]!==undefined&&_0x284569[_0x13fed5(0x224)]!==null&&(_0x357776[_0x13fed5(0x22e)]=_0x284569['repeatFrequency'],_0x392d3d=!![]);_0x284569[_0x13fed5(0x22d)]!==undefined&&(_0x357776[_0x13fed5(0x225)]=_0x284569['startAt'],_0x392d3d=!![]);_0x284569[_0x13fed5(0x252)]!==undefined&&(_0x357776[_0x13fed5(0x1c6)]=_0x284569[_0x13fed5(0x252)],_0x392d3d=!![]);_0x284569['timezone']&&(_0x357776[_0x13fed5(0x1fb)]=_0x284569[_0x13fed5(0x1fb)],_0x392d3d=!![]);_0x392d3d&&(_0x3c0456[_0x13fed5(0x1df)]=_0x357776);(_0x284569[_0x13fed5(0x221)]&&_0x284569[_0x13fed5(0x221)][_0x13fed5(0x23d)]>0x0||_0x284569['emailRecipients']&&_0x284569[_0x13fed5(0x232)][_0x13fed5(0x23d)]>0x0)&&(_0x3c0456[_0x13fed5(0x24c)]={},_0x284569[_0x13fed5(0x221)]&&_0x284569['notifyOn']['length']>0x0&&(_0x3c0456[_0x13fed5(0x24c)][_0x13fed5(0x1f4)]=_0x284569[_0x13fed5(0x221)]),_0x284569[_0x13fed5(0x232)]&&_0x284569[_0x13fed5(0x232)][_0x13fed5(0x23d)]>0x0&&(_0x3c0456[_0x13fed5(0x24c)]['email_recipients']=_0x284569[_0x13fed5(0x232)][_0x13fed5(0x21e)](_0x49bc1f=>{const _0x581ca3=_0x13fed5,_0x42ca72=_0x3eb97f?.[_0x581ca3(0x1de)](_0x49bc1f);return _0x42ca72??String(_0x49bc1f);})));_0x284569[_0x13fed5(0x1ff)]&&Object[_0x13fed5(0x229)](_0x284569['connectorConfig'])[_0x13fed5(0x23d)]>0x0&&(_0x3c0456[_0x13fed5(0x1cf)]=normalizeConnectorConfigForYaml(_0x284569[_0x13fed5(0x1ff)]));_0x284569[_0x13fed5(0x1ea)]&&(_0x3c0456[_0x13fed5(0x20f)]=_0x284569[_0x13fed5(0x1ea)]);if(_0x284569[_0x13fed5(0x1d8)]){const _0x1865be={},_0x351805=_0x284569[_0x13fed5(0x1d8)];_0x351805[_0x13fed5(0x214)]&&_0x351805[_0x13fed5(0x214)][_0x13fed5(0x23d)]>0x0&&(_0x1865be[_0x13fed5(0x214)]=_0x351805[_0x13fed5(0x214)][_0x13fed5(0x24f)](_0x5a3eb4=>_0x5a3eb4&&_0x5a3eb4[_0x13fed5(0x1e8)])[_0x13fed5(0x21e)](_0x1c754d=>({'name':_0x1c754d[_0x13fed5(0x1e8)],..._0x1c754d['type']&&{'type':_0x1c754d[_0x13fed5(0x218)]},..._0x1c754d['visibility']&&{'visibility':_0x1c754d[_0x13fed5(0x1c8)]}}))),_0x351805['behaviorTableName']&&(_0x1865be[_0x13fed5(0x226)]=_0x351805[_0x13fed5(0x23a)]),_0x351805[_0x13fed5(0x21d)]!==undefined&&(_0x1865be['join_row']=_0x351805['joinRow']),_0x351805[_0x13fed5(0x1d4)]&&(_0x1865be[_0x13fed5(0x240)]=_0x351805['joinStrategy']),_0x351805['formatting']&&(_0x1865be['formatting']=_0x351805[_0x13fed5(0x254)]),_0x351805[_0x13fed5(0x239)]&&_0x351805[_0x13fed5(0x239)][_0x13fed5(0x23d)]>0x0&&(_0x1865be['order_by']=_0x351805['orderBy']),Object[_0x13fed5(0x229)](_0x1865be)[_0x13fed5(0x23d)]>0x0&&(_0x3c0456['behavior']=_0x1865be);}return _0x3c0456;}export function segmentWithActivationsToYaml(_0x197852,_0x766ed6,_0x3dce85,_0x48f627,_0x3285df){const _0x33dc90=a102_0x45780e,_0x588809=segmentResponseToDefSync(_0x197852,_0x3dce85);return _0x766ed6[_0x33dc90(0x23d)]>0x0&&(_0x588809[_0x33dc90(0x1eb)]=_0x766ed6[_0x33dc90(0x21e)](_0x58a2fe=>activationResponseToDef(_0x58a2fe,_0x48f627,_0x3285df))),_0x588809;}function normalizeColumn(_0x2c46a1){const _0x2af00e=a102_0x45780e;if(typeof _0x2c46a1===_0x2af00e(0x228))return{'name':_0x2c46a1};return{'name':_0x2c46a1['name'],..._0x2c46a1[_0x2af00e(0x218)]&&{'type':_0x2c46a1[_0x2af00e(0x218)]},..._0x2c46a1[_0x2af00e(0x1c8)]&&{'visibility':_0x2c46a1[_0x2af00e(0x1c8)]}};}export async function activationDefToCreateRequest(_0x760be,_0x5a6774){const _0x4e6d86=a102_0x45780e,_0x36e169=_0x5a6774?.['emailToIdMap'],_0x546751=_0x5a6774?.[_0x4e6d86(0x1e9)],_0x48ae58=_0x760be[_0x4e6d86(0x1d7)];let _0x257955;const _0x107b76=parseInt(_0x48ae58,0xa);if(!isNaN(_0x107b76)&&String(_0x107b76)===_0x48ae58)_0x257955=_0x107b76;else{const _0x1265c7=_0x546751?.[_0x4e6d86(0x1de)](_0x48ae58);if(_0x1265c7===undefined)throw new SDKError(ErrorCode[_0x4e6d86(0x20d)],_0x4e6d86(0x223)+_0x48ae58,undefined,{'helpText':_0x4e6d86(0x235)});_0x257955=_0x1265c7;}const _0x1c7696={'name':_0x760be[_0x4e6d86(0x1e8)],'connectionId':_0x257955};_0x760be[_0x4e6d86(0x21b)]&&(_0x1c7696[_0x4e6d86(0x21b)]=_0x760be[_0x4e6d86(0x21b)]);let _0x464593=[];_0x760be['columns']&&_0x760be[_0x4e6d86(0x214)][_0x4e6d86(0x23d)]>0x0&&(_0x464593=_0x760be[_0x4e6d86(0x214)][_0x4e6d86(0x24f)](_0x20f102=>_0x20f102!=null)['map'](normalizeColumn));_0x464593[_0x4e6d86(0x23d)]>0x0&&(_0x1c7696['columns']=_0x464593);_0x760be[_0x4e6d86(0x1cc)]!==undefined&&(_0x760be['all_columns']===![]&&_0x464593[_0x4e6d86(0x23d)]===0x0?_0x1c7696[_0x4e6d86(0x1d3)]=!![]:_0x1c7696[_0x4e6d86(0x1d3)]=_0x760be[_0x4e6d86(0x1cc)]);if(_0x760be[_0x4e6d86(0x1df)]){const _0x536833=_0x760be[_0x4e6d86(0x1df)];_0x536833[_0x4e6d86(0x218)]&&(_0x1c7696['scheduleType']=_0x536833[_0x4e6d86(0x218)]),_0x536833['repeat_unit']&&(_0x1c7696[_0x4e6d86(0x1ca)]=_0x536833[_0x4e6d86(0x230)]),_0x536833[_0x4e6d86(0x22e)]!==undefined&&(_0x1c7696[_0x4e6d86(0x224)]=_0x536833[_0x4e6d86(0x22e)]),_0x536833[_0x4e6d86(0x1db)]&&(_0x1c7696[_0x4e6d86(0x1fd)]=_0x536833['repeat_sub_frequency']),_0x536833['start_at']!==undefined&&(_0x1c7696[_0x4e6d86(0x22d)]=_0x536833[_0x4e6d86(0x225)]),_0x536833[_0x4e6d86(0x1c6)]!==undefined&&(_0x1c7696[_0x4e6d86(0x252)]=_0x536833['end_on']),_0x536833['timezone']&&(_0x1c7696['timezone']=_0x536833[_0x4e6d86(0x1fb)]);}_0x760be[_0x4e6d86(0x24c)]&&(_0x760be['notification'][_0x4e6d86(0x1f4)]&&(_0x1c7696[_0x4e6d86(0x221)]=_0x760be[_0x4e6d86(0x24c)][_0x4e6d86(0x1f4)]),_0x760be[_0x4e6d86(0x24c)][_0x4e6d86(0x1f6)]&&(_0x1c7696[_0x4e6d86(0x232)]=_0x760be[_0x4e6d86(0x24c)]['email_recipients'][_0x4e6d86(0x21e)](_0x2dc366=>{const _0x14b4be=_0x4e6d86,_0x12f009=Number(_0x2dc366);if(!isNaN(_0x12f009)&&String(_0x12f009)===_0x2dc366)return _0x12f009;const _0x43f739=_0x36e169?.[_0x14b4be(0x1de)](_0x2dc366[_0x14b4be(0x24a)]());if(_0x43f739===undefined)throw new SDKError(ErrorCode[_0x14b4be(0x1d9)],_0x14b4be(0x20b)+_0x2dc366+_0x14b4be(0x1cd));return _0x43f739;})));if(_0x760be['connector_config']){const _0x68fdff=_0x5a6774?.[_0x4e6d86(0x241)]?.['get'](_0x48ae58);if(_0x68fdff&&_0x5a6774?.[_0x4e6d86(0x211)])try{const _0x3eeef8=await _0x5a6774['getSchema'](_0x68fdff),_0x2ea46b=validateConnectorConfig(_0x760be[_0x4e6d86(0x1cf)],_0x3eeef8);if(!_0x2ea46b[_0x4e6d86(0x21a)])throw new SDKError(ErrorCode['CONNECTOR_INVALID_CONFIG'],_0x4e6d86(0x1f0)+_0x760be['name']+'\x22:\x0a'+formatValidationErrors(_0x2ea46b[_0x4e6d86(0x213)]),undefined,{'helpText':_0x4e6d86(0x1fc)+_0x68fdff+_0x4e6d86(0x238)+formatSchemaAsHelp(_0x3eeef8)});if(_0x2ea46b[_0x4e6d86(0x243)][_0x4e6d86(0x23d)]>0x0){const _0x1a6756=formatValidationWarnings(_0x2ea46b['warnings']);console['warn'](_0x4e6d86(0x1dc)+_0x760be[_0x4e6d86(0x1e8)]+_0x4e6d86(0x234)+_0x1a6756);}_0x1c7696[_0x4e6d86(0x1ff)]=transformConfigToLegacy(_0x760be[_0x4e6d86(0x1cf)],_0x3eeef8);}catch(_0xe6bb9b){if(_0xe6bb9b instanceof SDKError&&_0xe6bb9b[_0x4e6d86(0x1f7)]===ErrorCode[_0x4e6d86(0x203)])_0x1c7696[_0x4e6d86(0x1ff)]=_0x760be[_0x4e6d86(0x1cf)];else throw _0xe6bb9b;}else _0x1c7696[_0x4e6d86(0x1ff)]=_0x760be[_0x4e6d86(0x1cf)];}_0x760be[_0x4e6d86(0x20f)]!==undefined&&(_0x1c7696[_0x4e6d86(0x1ea)]=_0x760be[_0x4e6d86(0x20f)]);if(_0x760be[_0x4e6d86(0x1f9)]){const _0x200ef8=_0x760be[_0x4e6d86(0x1f9)],_0x36e762={};if(_0x200ef8[_0x4e6d86(0x214)]&&_0x200ef8[_0x4e6d86(0x214)][_0x4e6d86(0x23d)]>0x0){const _0x471d06=_0x200ef8[_0x4e6d86(0x214)][_0x4e6d86(0x24f)](_0x3f3381=>_0x3f3381&&_0x3f3381[_0x4e6d86(0x1e8)]);_0x471d06[_0x4e6d86(0x23d)]>0x0&&(_0x36e762[_0x4e6d86(0x214)]=_0x471d06);}_0x200ef8[_0x4e6d86(0x226)]&&(_0x36e762[_0x4e6d86(0x23a)]=_0x200ef8[_0x4e6d86(0x226)]),_0x200ef8[_0x4e6d86(0x1e3)]!==undefined&&(_0x36e762['joinRow']=_0x200ef8[_0x4e6d86(0x1e3)]),_0x200ef8['join_strategy']&&(_0x36e762[_0x4e6d86(0x1d4)]=_0x200ef8[_0x4e6d86(0x240)]),_0x200ef8['formatting']&&(_0x36e762[_0x4e6d86(0x254)]=_0x200ef8[_0x4e6d86(0x254)]),_0x200ef8[_0x4e6d86(0x1c9)]&&(_0x36e762[_0x4e6d86(0x239)]=_0x200ef8[_0x4e6d86(0x1c9)]),_0x1c7696[_0x4e6d86(0x1d8)]=_0x36e762;}return _0x1c7696;}export async function activationDefToUpdateRequest(_0x39e9a9,_0x54f7fd){return activationDefToCreateRequest(_0x39e9a9,_0x54f7fd);}export function deepSortObject(_0x6b9944){const _0x437504=a102_0x45780e;if(_0x6b9944===null||typeof _0x6b9944!=='object')return _0x6b9944;if(Array[_0x437504(0x202)](_0x6b9944))return _0x6b9944[_0x437504(0x21e)](deepSortObject)['sort']((_0x19e0e2,_0x13783c)=>JSON[_0x437504(0x210)](_0x19e0e2)[_0x437504(0x1f8)](JSON['stringify'](_0x13783c)));const _0x3bf376={};for(const _0x5b39ed of Object[_0x437504(0x229)](_0x6b9944)[_0x437504(0x256)]()){_0x3bf376[_0x5b39ed]=deepSortObject(_0x6b9944[_0x5b39ed]);}return _0x3bf376;}export function serializeRule(_0x3b2e04){const _0x81ef54=a102_0x45780e;return JSON[_0x81ef54(0x210)](deepSortObject(_0x3b2e04));}export function normalizeRuleForMatching(_0x4bf46b){return normalizeConditionsForMatching(_0x4bf46b);}function normalizeConditionsForMatching(_0x394d1f){const _0x14ebac=a102_0x45780e;if(_0x394d1f===null||typeof _0x394d1f!=='object')return _0x394d1f;if(Array[_0x14ebac(0x202)](_0x394d1f))return _0x394d1f[_0x14ebac(0x21e)](normalizeConditionsForMatching);const _0x59dede=_0x394d1f;if((_0x59dede[_0x14ebac(0x218)]===_0x14ebac(0x1f3)||_0x59dede[_0x14ebac(0x218)]===_0x14ebac(0x219))&&typeof _0x59dede[_0x14ebac(0x1c5)]===_0x14ebac(0x228))return{..._0x59dede,'segment':'__SEGMENT_REF__'};const _0x220044={};for(const _0x21549a of Object[_0x14ebac(0x229)](_0x59dede)){_0x220044[_0x21549a]=normalizeConditionsForMatching(_0x59dede[_0x21549a]);}return _0x220044;}export function serializeRuleForMatching(_0x55d576){const _0xa6da24=a102_0x45780e;return JSON[_0xa6da24(0x210)](deepSortObject(normalizeRuleForMatching(_0x55d576)));}export function expandSegmentReferences(_0x8201f6,_0x133581,_0xe3fba1=new Set()){return expandConditions(_0x8201f6,_0x133581,_0xe3fba1);}function expandConditions(_0x2e06da,_0x417565,_0x40e9f8){const _0x242b27=a102_0x45780e;if(_0x2e06da===null||typeof _0x2e06da!==_0x242b27(0x23b))return _0x2e06da;if(Array[_0x242b27(0x202)](_0x2e06da))return _0x2e06da[_0x242b27(0x21e)](_0x54c918=>expandConditions(_0x54c918,_0x417565,_0x40e9f8));const _0x5b3e20=_0x2e06da;if((_0x5b3e20[_0x242b27(0x218)]===_0x242b27(0x1f3)||_0x5b3e20[_0x242b27(0x218)]==='exclude')&&typeof _0x5b3e20[_0x242b27(0x1c5)]==='string'){const _0x4a1937=_0x5b3e20[_0x242b27(0x1c5)],_0x37bf57=_0x417565[_0x242b27(0x1de)](_0x4a1937);if(_0x37bf57&&!_0x40e9f8[_0x242b27(0x23e)](_0x4a1937)){const _0x39b146=new Set(_0x40e9f8);_0x39b146[_0x242b27(0x1ee)](_0x4a1937);const _0x213e72=expandConditions(_0x37bf57,_0x417565,_0x39b146);return{'type':_0x5b3e20['type'],'expanded_rule':_0x213e72};}return{'type':_0x5b3e20[_0x242b27(0x218)],'expanded_rule':_0x242b27(0x22a)};}const _0x4ccc5e={};for(const _0x41d98d of Object['keys'](_0x5b3e20)){_0x4ccc5e[_0x41d98d]=expandConditions(_0x5b3e20[_0x41d98d],_0x417565,_0x40e9f8);}return _0x4ccc5e;}function a102_0xee4e(_0x3f7bae,_0xa945a5){_0x3f7bae=_0x3f7bae-0x1c3;const _0x20f205=a102_0x20f2();let _0xee4e0f=_0x20f205[_0x3f7bae];return _0xee4e0f;}export function serializeExpandedRule(_0xd43c96,_0x2e757b){const _0xca38d4=expandSegmentReferences(_0xd43c96,_0x2e757b);return JSON['stringify'](deepSortObject(_0xca38d4));}export function createSegmentNameContext(_0x51bbd6){const _0x519f07=a102_0x45780e,_0x2468ef=new Set(),_0xf0e974=new Map(),_0x3c94d7=new Map();if(_0x51bbd6)for(const [_0x5c5115,_0xffa1a7]of Object[_0x519f07(0x24b)](_0x51bbd6)){if(_0xffa1a7[_0x519f07(0x1cb)]){const _0x4e929a=serializeRule(_0xffa1a7['rule']);_0x3c94d7[_0x519f07(0x233)](_0x4e929a,_0x5c5115),_0x2468ef['add'](_0x5c5115);}}return{'usedNames':_0x2468ef,'ruleHashToName':_0xf0e974,'localRuleToName':_0x51bbd6?_0x3c94d7:undefined};}export function resolveSegmentName(_0x136f9e,_0x3592f7,_0x39f127,_0xa9fa61){const _0x17a797=a102_0x45780e,_0x58ce62=serializeRule(_0x3592f7);if(_0x39f127['localRuleToName']){const _0x42bbca=_0x39f127[_0x17a797(0x1d1)][_0x17a797(0x1de)](_0x58ce62);if(_0x42bbca)return{'name':_0x42bbca,'isDuplicate':![],'isLocalMatch':!![]};}const _0x2d343c=_0x39f127[_0x17a797(0x255)]['get'](_0x58ce62);if(_0x2d343c)return{'name':_0x2d343c,'isDuplicate':!![],'isLocalMatch':![]};const _0x49a5d0=_0xa9fa61(_0x136f9e);let _0x2e26f0=_0x49a5d0||_0x136f9e,_0xc03c5b=_0x2e26f0,_0x13416e=0x2;while(_0x39f127[_0x17a797(0x1c3)][_0x17a797(0x23e)](_0xc03c5b)){_0xc03c5b=_0x2e26f0+'_'+_0x13416e,_0x13416e++;}return _0x39f127[_0x17a797(0x1c3)][_0x17a797(0x1ee)](_0xc03c5b),_0x39f127[_0x17a797(0x255)][_0x17a797(0x233)](_0x58ce62,_0xc03c5b),{'name':_0xc03c5b,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x3cbffe){const _0x2c6562=[],_0x34401c=_0x2b9693=>{const _0x1285a4=a102_0xee4e;if(!_0x2b9693||typeof _0x2b9693!=='object')return;if(Array['isArray'](_0x2b9693)){_0x2b9693[_0x1285a4(0x1e0)](_0x34401c);return;}const _0x4442cf=_0x2b9693;(_0x4442cf[_0x1285a4(0x218)]===_0x1285a4(0x1f3)||_0x4442cf['type']===_0x1285a4(0x219))&&typeof _0x4442cf[_0x1285a4(0x1c5)]===_0x1285a4(0x228)&&_0x2c6562[_0x1285a4(0x1e2)](_0x4442cf[_0x1285a4(0x1c5)]);for(const _0x580ac9 of Object[_0x1285a4(0x208)](_0x4442cf)){_0x34401c(_0x580ac9);}};return _0x34401c(_0x3cbffe),_0x2c6562;}export function validateSegmentRule(_0x5ada0f,_0x5960d0){const _0x470706=a102_0x45780e;if(!_0x5960d0||!_0x5960d0[_0x470706(0x20c)])return;for(let _0x4ab451=0x0;_0x4ab451<_0x5960d0['conditions'][_0x470706(0x23d)];_0x4ab451++){const _0x54dc3a=_0x5960d0[_0x470706(0x20c)][_0x4ab451];if(_0x470706(0x218)in _0x54dc3a&&_0x54dc3a['type']===_0x470706(0x1da)){const _0x1936db=_0x54dc3a;if(!_0x1936db[_0x470706(0x209)]||_0x1936db[_0x470706(0x209)]==='')throw new SDKError(ErrorCode[_0x470706(0x247)],_0x470706(0x251)+_0x5ada0f+_0x470706(0x204)+('conditions['+_0x4ab451+_0x470706(0x20e))+'Please\x20specify\x20a\x20valid\x20attribute\x20name.');}}}
@@ -1 +1 @@
1
- (function(_0x37407d,_0x173c17){const _0x357522=a103_0x4987,_0x4c00e1=_0x37407d();while(!![]){try{const _0x5394e2=parseInt(_0x357522(0xf9))/0x1+parseInt(_0x357522(0x10c))/0x2+parseInt(_0x357522(0x103))/0x3*(-parseInt(_0x357522(0x10b))/0x4)+parseInt(_0x357522(0x10f))/0x5+-parseInt(_0x357522(0xfb))/0x6+parseInt(_0x357522(0x110))/0x7+parseInt(_0x357522(0x119))/0x8*(-parseInt(_0x357522(0xf0))/0x9);if(_0x5394e2===_0x173c17)break;else _0x4c00e1['push'](_0x4c00e1['shift']());}catch(_0x55c873){_0x4c00e1['push'](_0x4c00e1['shift']());}}}(a103_0x92b2,0x31acc));function a103_0x4987(_0x19f178,_0x2cbf10){_0x19f178=_0x19f178-0xe3;const _0x92b2a3=a103_0x92b2();let _0x49877f=_0x92b2a3[_0x19f178];return _0x49877f;}import a103_0x1715f5 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x4b2738){const _0x3fbdaf=a103_0x4987,_0x2a5571=_0x4b2738[_0x3fbdaf(0xe4)]['map'](_0x523c46=>({'column_name':_0x523c46['name'],'column_type':_0x523c46['type'],'null':_0x3fbdaf(0x116),'key':null,'default':null,'extra':null}));return{..._0x4b2738,'columns':[{'name':_0x3fbdaf(0x10e),'type':_0x3fbdaf(0x118)},{'name':_0x3fbdaf(0x101),'type':_0x3fbdaf(0x118)},{'name':_0x3fbdaf(0x10a),'type':_0x3fbdaf(0x118)},{'name':_0x3fbdaf(0x113),'type':_0x3fbdaf(0x118)},{'name':_0x3fbdaf(0xe3),'type':_0x3fbdaf(0x118)},{'name':_0x3fbdaf(0x112),'type':'varchar'}],'data':_0x2a5571};}function a103_0x92b2(){const _0x32458d=['push','slice','attribute','sort','270870LZbQeh','Fetching\x20schema...','2130468cXvLTT','SELECT\x20*\x20FROM\x20(\x0a','query','entries','Schema\x20query:\x0a','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','column_type','startsWith','8628napwdh','information_schema','groupingName','Behaviors','\x20\x20\x20\x20','setJobId','error','null','88BsRffK','332130Ctcvhy','filter','column_name','1050035ueYYDe','1942388tkZxkC','Unknown','extra','key','dim','fields','YES','size','varchar','302608UebOrU','data','default','columns','cyan','displayName','set','bold','execute','type','name','get','localeCompare','parentColumn','verbose','72iJKgNL','length','tableName','parentTableName','source'];a103_0x92b2=function(){return _0x32458d;};return a103_0x92b2();}export async function executeSchemaQuery(_0x331785,_0xf3b135,_0x21ecf3){const _0x1749f8=a103_0x4987,_0x10a9a3=_0x331785['trim']()['replace'](/;+$/,''),_0x5ddc6c=_0x1749f8(0xfc)+_0x10a9a3+_0x1749f8(0x100);_0x21ecf3[_0x1749f8(0xef)]&&console['error'](_0x1749f8(0xff)+_0x5ddc6c);const _0x5e91ad=await withProgressSpinner(_0x1749f8(0xfa),async _0x3bd811=>{const _0x4aac26=_0x1749f8,_0x4ea6ba=await _0xf3b135[_0x4aac26(0xfd)][_0x4aac26(0xe9)](_0x5ddc6c,{'catalog':'td','schema':_0x4aac26(0x104),'onJobId':_0x2887fb=>{const _0x56904f=_0x4aac26;_0x3bd811[_0x56904f(0x108)](_0x2887fb);}});return _0x4ea6ba;},{'verbose':_0x21ecf3[_0x1749f8(0xef)]});return buildSchemaResult(_0x5e91ad[_0x1749f8(0x11a)]);}export function displayFieldsHumanReadable(_0x581aa0,_0x14c12c){const _0x36530b=a103_0x4987,_0x38d4f1=_0x581aa0[_0x36530b(0x10d)](_0x5b3eb5=>_0x5b3eb5[_0x36530b(0xf4)]===_0x36530b(0xf7)),_0x2993a9=_0x581aa0[_0x36530b(0x10d)](_0x472dba=>_0x472dba[_0x36530b(0xf4)]==='behavior'),_0x31d1fb=new Map();for(const _0x5a6766 of _0x38d4f1){const _0x3cf48f=_0x5a6766[_0x36530b(0x105)]||_0x5a6766['parentTableName']||_0x36530b(0x111),_0x28d959=_0x31d1fb[_0x36530b(0xec)](_0x3cf48f);_0x28d959?_0x28d959[_0x36530b(0x115)][_0x36530b(0xf5)](_0x5a6766):_0x31d1fb[_0x36530b(0xe7)](_0x3cf48f,{'displayName':_0x3cf48f,'tableName':_0x5a6766[_0x36530b(0xf3)],'fields':[_0x5a6766]});}const _0x3523d7=new Map();for(const _0x42a876 of _0x2993a9){const _0x16eca8=_0x42a876['behaviorName']||_0x36530b(0x111),_0x28456e=_0x3523d7[_0x36530b(0xec)](_0x16eca8)||[];_0x28456e[_0x36530b(0xf5)](_0x42a876),_0x3523d7[_0x36530b(0xe7)](_0x16eca8,_0x28456e);}console[_0x36530b(0x109)]('\x0a'+a103_0x1715f5[_0x36530b(0xe8)](_0x14c12c));if(_0x31d1fb[_0x36530b(0x117)]>0x0){console['error']('\x0a'+a103_0x1715f5['dim']('Attributes'));const _0x80712a=[..._0x31d1fb['entries']()][_0x36530b(0xf8)]((_0x475d0b,_0x2b66ab)=>_0x475d0b[0x0][_0x36530b(0xed)](_0x2b66ab[0x0]));for(const [,_0x995990]of _0x80712a){const _0x243508=_0x995990[_0x36530b(0xf2)]&&_0x995990[_0x36530b(0xf2)]!==_0x995990[_0x36530b(0xe6)]?'\x20'+a103_0x1715f5[_0x36530b(0x114)]('('+_0x995990[_0x36530b(0xf2)]+')'):'';console[_0x36530b(0x109)]('\x20\x20'+a103_0x1715f5[_0x36530b(0xe8)](_0x995990[_0x36530b(0xe6)])+_0x243508);const _0x4208eb=[..._0x995990['fields']][_0x36530b(0xf8)]((_0x1191fa,_0x11b8de)=>_0x1191fa['name']['localeCompare'](_0x11b8de[_0x36530b(0xeb)]));for(const _0x48c949 of _0x4208eb){const _0x22b50b=_0x48c949['parentColumn']&&_0x48c949[_0x36530b(0xee)]!==_0x48c949[_0x36530b(0xeb)]?'\x20'+a103_0x1715f5[_0x36530b(0x114)]('('+_0x48c949[_0x36530b(0xee)]+')'):'';console[_0x36530b(0x109)](_0x36530b(0x107)+_0x48c949[_0x36530b(0xeb)]+_0x22b50b+':\x20'+a103_0x1715f5[_0x36530b(0xe5)](_0x48c949[_0x36530b(0xea)]));}}}if(_0x3523d7[_0x36530b(0x117)]>0x0){console['error']('\x0a'+a103_0x1715f5[_0x36530b(0x114)](_0x36530b(0x106)));const _0x280b6a=[..._0x3523d7[_0x36530b(0xfe)]()][_0x36530b(0xf8)]((_0x5d5a2,_0x51940c)=>_0x5d5a2[0x0]['localeCompare'](_0x51940c[0x0]));for(const [_0x4982dc,_0x4b44b8]of _0x280b6a){const _0x482943=_0x4b44b8[0x0],_0xaa5bf1=_0x482943?.[_0x36530b(0xf3)]||'';console[_0x36530b(0x109)]('\x20\x20'+a103_0x1715f5[_0x36530b(0xe8)](_0x4982dc)+(_0xaa5bf1?'\x20'+a103_0x1715f5[_0x36530b(0x114)]('('+_0xaa5bf1+')'):''));const _0x376dab=[..._0x4b44b8][_0x36530b(0xf8)]((_0x30c066,_0x1c42af)=>_0x30c066[_0x36530b(0xeb)]['localeCompare'](_0x1c42af[_0x36530b(0xeb)]));for(const _0x1e2f51 of _0x376dab){const _0x5a6d54=_0x1e2f51[_0x36530b(0xeb)][_0x36530b(0x102)](_0x4982dc+'.')?_0x1e2f51[_0x36530b(0xeb)][_0x36530b(0xf6)](_0x4982dc[_0x36530b(0xf1)]+0x1):_0x1e2f51['name'],_0x27bd0a=_0x1e2f51[_0x36530b(0xee)]&&_0x1e2f51['parentColumn']!==_0x5a6d54?'\x20'+a103_0x1715f5['dim']('('+_0x1e2f51[_0x36530b(0xee)]+')'):'';console[_0x36530b(0x109)](_0x36530b(0x107)+_0x5a6d54+_0x27bd0a+':\x20'+a103_0x1715f5[_0x36530b(0xe5)](_0x1e2f51[_0x36530b(0xea)]));}}}console[_0x36530b(0x109)]('');}
1
+ (function(_0x3bc995,_0x98757f){const _0x4c18c7=a103_0x2b0e,_0x38228f=_0x3bc995();while(!![]){try{const _0x4910f7=parseInt(_0x4c18c7(0x130))/0x1*(parseInt(_0x4c18c7(0x126))/0x2)+parseInt(_0x4c18c7(0x10f))/0x3*(parseInt(_0x4c18c7(0x112))/0x4)+-parseInt(_0x4c18c7(0x138))/0x5+-parseInt(_0x4c18c7(0x10b))/0x6*(parseInt(_0x4c18c7(0x116))/0x7)+parseInt(_0x4c18c7(0x129))/0x8*(parseInt(_0x4c18c7(0x128))/0x9)+-parseInt(_0x4c18c7(0x137))/0xa*(parseInt(_0x4c18c7(0x117))/0xb)+-parseInt(_0x4c18c7(0x110))/0xc*(parseInt(_0x4c18c7(0x122))/0xd);if(_0x4910f7===_0x98757f)break;else _0x38228f['push'](_0x38228f['shift']());}catch(_0x43e099){_0x38228f['push'](_0x38228f['shift']());}}}(a103_0x5c5e,0x4bf07));function a103_0x5c5e(){const _0x499d18=['type','bold','error','735RipOtQ','491161dPRBvW','behaviorName','Schema\x20query:\x0a','Attributes','\x20\x20\x20\x20','SELECT\x20*\x20FROM\x20(\x0a','column_name','push','source','replace','null','65QhncEA','groupingName','get','startsWith','532958CXzUyk','cyan','36qzwRKO','879288rYDhxh','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','extra','filter','verbose','Behaviors','dim','1LpuZgL','entries','query','name','sort','execute','parentTableName','40MhpvXm','1384280FrnAkE','localeCompare','parentColumn','column_type','set','varchar','slice','key','setJobId','4140IPkEGO','displayName','Unknown','tableName','3hukYAD','873708YteeIH','map','1987516rCJsMd'];a103_0x5c5e=function(){return _0x499d18;};return a103_0x5c5e();}import a103_0x5383df from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x3da89c){const _0x22a116=a103_0x2b0e,_0xd28dc1=_0x3da89c['columns'][_0x22a116(0x111)](_0x28246d=>({'column_name':_0x28246d[_0x22a116(0x133)],'column_type':_0x28246d['type'],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x3da89c,'columns':[{'name':_0x22a116(0x11d),'type':_0x22a116(0x13d)},{'name':_0x22a116(0x13b),'type':'varchar'},{'name':_0x22a116(0x121),'type':_0x22a116(0x13d)},{'name':_0x22a116(0x109),'type':'varchar'},{'name':'default','type':_0x22a116(0x13d)},{'name':_0x22a116(0x12b),'type':'varchar'}],'data':_0xd28dc1};}export async function executeSchemaQuery(_0x490e09,_0x41dbb6,_0x5c1616){const _0x404484=a103_0x2b0e,_0x202e2e=_0x490e09['trim']()[_0x404484(0x120)](/;+$/,''),_0xe5de68=_0x404484(0x11c)+_0x202e2e+_0x404484(0x12a);_0x5c1616[_0x404484(0x12d)]&&console[_0x404484(0x115)](_0x404484(0x119)+_0xe5de68);const _0x117b32=await withProgressSpinner('Fetching\x20schema...',async _0x12cfc0=>{const _0x347705=_0x404484,_0x128c36=await _0x41dbb6[_0x347705(0x132)][_0x347705(0x135)](_0xe5de68,{'catalog':'td','schema':'information_schema','onJobId':_0x571678=>{const _0x140a87=_0x347705;_0x12cfc0[_0x140a87(0x10a)](_0x571678);}});return _0x128c36;},{'verbose':_0x5c1616[_0x404484(0x12d)]});return buildSchemaResult(_0x117b32['data']);}function a103_0x2b0e(_0x2b53f0,_0x45a658){_0x2b53f0=_0x2b53f0-0x108;const _0x5c5e3f=a103_0x5c5e();let _0x2b0ea0=_0x5c5e3f[_0x2b53f0];return _0x2b0ea0;}export function displayFieldsHumanReadable(_0x29c1e,_0x2a64a0){const _0xcd2195=a103_0x2b0e,_0x4221c1=_0x29c1e['filter'](_0x1a165a=>_0x1a165a['source']==='attribute'),_0x2932c2=_0x29c1e[_0xcd2195(0x12c)](_0x1b8a3c=>_0x1b8a3c[_0xcd2195(0x11f)]==='behavior'),_0xfd6d64=new Map();for(const _0x7999ab of _0x4221c1){const _0x92e9fb=_0x7999ab[_0xcd2195(0x123)]||_0x7999ab[_0xcd2195(0x136)]||_0xcd2195(0x10d),_0x501c5e=_0xfd6d64[_0xcd2195(0x124)](_0x92e9fb);_0x501c5e?_0x501c5e['fields']['push'](_0x7999ab):_0xfd6d64['set'](_0x92e9fb,{'displayName':_0x92e9fb,'tableName':_0x7999ab[_0xcd2195(0x136)],'fields':[_0x7999ab]});}const _0x5966a8=new Map();for(const _0x34ef8d of _0x2932c2){const _0x53b802=_0x34ef8d[_0xcd2195(0x118)]||'Unknown',_0x3b04b=_0x5966a8[_0xcd2195(0x124)](_0x53b802)||[];_0x3b04b[_0xcd2195(0x11e)](_0x34ef8d),_0x5966a8[_0xcd2195(0x13c)](_0x53b802,_0x3b04b);}console['error']('\x0a'+a103_0x5383df['bold'](_0x2a64a0));if(_0xfd6d64['size']>0x0){console[_0xcd2195(0x115)]('\x0a'+a103_0x5383df[_0xcd2195(0x12f)](_0xcd2195(0x11a)));const _0x1369cf=[..._0xfd6d64[_0xcd2195(0x131)]()][_0xcd2195(0x134)]((_0x4b053d,_0x467c21)=>_0x4b053d[0x0][_0xcd2195(0x139)](_0x467c21[0x0]));for(const [,_0x2e2160]of _0x1369cf){const _0x19ad4e=_0x2e2160['tableName']&&_0x2e2160['tableName']!==_0x2e2160[_0xcd2195(0x10c)]?'\x20'+a103_0x5383df['dim']('('+_0x2e2160[_0xcd2195(0x10e)]+')'):'';console['error']('\x20\x20'+a103_0x5383df[_0xcd2195(0x114)](_0x2e2160['displayName'])+_0x19ad4e);const _0x5d5449=[..._0x2e2160['fields']][_0xcd2195(0x134)]((_0x48a9d2,_0x1332f9)=>_0x48a9d2[_0xcd2195(0x133)][_0xcd2195(0x139)](_0x1332f9[_0xcd2195(0x133)]));for(const _0x37d3ec of _0x5d5449){const _0x55e3d7=_0x37d3ec[_0xcd2195(0x13a)]&&_0x37d3ec[_0xcd2195(0x13a)]!==_0x37d3ec[_0xcd2195(0x133)]?'\x20'+a103_0x5383df[_0xcd2195(0x12f)]('('+_0x37d3ec[_0xcd2195(0x13a)]+')'):'';console[_0xcd2195(0x115)]('\x20\x20\x20\x20'+_0x37d3ec['name']+_0x55e3d7+':\x20'+a103_0x5383df[_0xcd2195(0x127)](_0x37d3ec[_0xcd2195(0x113)]));}}}if(_0x5966a8['size']>0x0){console[_0xcd2195(0x115)]('\x0a'+a103_0x5383df['dim'](_0xcd2195(0x12e)));const _0x5d6b5f=[..._0x5966a8[_0xcd2195(0x131)]()][_0xcd2195(0x134)]((_0x4675ba,_0x1ae931)=>_0x4675ba[0x0][_0xcd2195(0x139)](_0x1ae931[0x0]));for(const [_0x1b4593,_0x261800]of _0x5d6b5f){const _0xa07959=_0x261800[0x0],_0xf72c9=_0xa07959?.[_0xcd2195(0x136)]||'';console[_0xcd2195(0x115)]('\x20\x20'+a103_0x5383df[_0xcd2195(0x114)](_0x1b4593)+(_0xf72c9?'\x20'+a103_0x5383df[_0xcd2195(0x12f)]('('+_0xf72c9+')'):''));const _0x54a6fa=[..._0x261800][_0xcd2195(0x134)]((_0x3886f2,_0x5e95a5)=>_0x3886f2[_0xcd2195(0x133)][_0xcd2195(0x139)](_0x5e95a5['name']));for(const _0x185535 of _0x54a6fa){const _0xa30f96=_0x185535[_0xcd2195(0x133)][_0xcd2195(0x125)](_0x1b4593+'.')?_0x185535[_0xcd2195(0x133)][_0xcd2195(0x108)](_0x1b4593['length']+0x1):_0x185535[_0xcd2195(0x133)],_0x31015f=_0x185535[_0xcd2195(0x13a)]&&_0x185535[_0xcd2195(0x13a)]!==_0xa30f96?'\x20'+a103_0x5383df[_0xcd2195(0x12f)]('('+_0x185535['parentColumn']+')'):'';console[_0xcd2195(0x115)](_0xcd2195(0x11b)+_0xa30f96+_0x31015f+':\x20'+a103_0x5383df[_0xcd2195(0x127)](_0x185535[_0xcd2195(0x113)]));}}}console[_0xcd2195(0x115)]('');}
@@ -1 +1 @@
1
- (function(_0x21b2f5,_0x476b56){const _0x2769b1=a104_0x67aa,_0x4e6e9c=_0x21b2f5();while(!![]){try{const _0x2a1c3a=parseInt(_0x2769b1(0x161))/0x1*(parseInt(_0x2769b1(0x163))/0x2)+-parseInt(_0x2769b1(0x160))/0x3+parseInt(_0x2769b1(0x16b))/0x4+-parseInt(_0x2769b1(0x15d))/0x5*(-parseInt(_0x2769b1(0x15f))/0x6)+-parseInt(_0x2769b1(0x158))/0x7*(-parseInt(_0x2769b1(0x168))/0x8)+parseInt(_0x2769b1(0x16c))/0x9+-parseInt(_0x2769b1(0x16a))/0xa*(parseInt(_0x2769b1(0x166))/0xb);if(_0x2a1c3a===_0x476b56)break;else _0x4e6e9c['push'](_0x4e6e9c['shift']());}catch(_0x5b6999){_0x4e6e9c['push'](_0x4e6e9c['shift']());}}}(a104_0x5694,0xd72c1));function a104_0x67aa(_0x10f391,_0x543472){_0x10f391=_0x10f391-0x158;const _0x569412=a104_0x5694();let _0x67aab7=_0x569412[_0x10f391];return _0x67aab7;}import{readdirSync,statSync}from'fs';import a104_0x516703 from'path';export function findYamlFiles(_0x53c8a5){const _0x575191=[];function _0x356514(_0x9c088e){const _0x14bd81=a104_0x67aa,_0x202112=readdirSync(_0x9c088e,{'withFileTypes':!![]});for(const _0x1d42aa of _0x202112){const _0x1ba553=a104_0x516703[_0x14bd81(0x162)](_0x9c088e,_0x1d42aa[_0x14bd81(0x15c)]);if(_0x1d42aa[_0x14bd81(0x15b)]())_0x356514(_0x1ba553);else(_0x1d42aa[_0x14bd81(0x15c)][_0x14bd81(0x15e)](_0x14bd81(0x16d))||_0x1d42aa['name'][_0x14bd81(0x15e)](_0x14bd81(0x15a)))&&_0x575191[_0x14bd81(0x169)](_0x1ba553);}}return _0x356514(_0x53c8a5),_0x575191;}function a104_0x5694(){const _0x3a1c73=['toLowerCase','relative','14068450xLOnCY','map','5176QLLkfL','push','10ytrQoe','1507448HggeYc','3995739EGsSur','.yml','2996pXjnwx','isFile','.yaml','isDirectory','name','5420GRGjye','endsWith','5232ogNMnD','2387547IttTSd','1EtIxEh','join','1826294uRdctV'];a104_0x5694=function(){return _0x3a1c73;};return a104_0x5694();}export function discoverYamlFiles(_0x5fbd97){const _0xa615ce=a104_0x67aa,_0x1e12ba=findYamlFiles(_0x5fbd97);return _0x1e12ba[_0xa615ce(0x167)](_0x261179=>{const _0x287938=_0xa615ce,_0x707709=a104_0x516703[_0x287938(0x165)](_0x5fbd97,_0x261179),_0x129c07=a104_0x516703['dirname'](_0x707709);return{'absolutePath':_0x261179,'relativePath':_0x707709,'folderPath':_0x129c07==='.'?'':_0x129c07};});}export function isYamlFile(_0x32e94a){const _0x1ff91d=a104_0x67aa;try{const _0x2c2b95=statSync(_0x32e94a);if(!_0x2c2b95[_0x1ff91d(0x159)]())return![];const _0x32ed31=a104_0x516703['extname'](_0x32e94a)[_0x1ff91d(0x164)]();return _0x32ed31===_0x1ff91d(0x16d)||_0x32ed31===_0x1ff91d(0x15a);}catch{return![];}}
1
+ function a104_0x5ec0(_0x3393fb,_0x42800e){_0x3393fb=_0x3393fb-0x121;const _0x35c2e8=a104_0x35c2();let _0x5ec0e1=_0x35c2e8[_0x3393fb];return _0x5ec0e1;}(function(_0x15dc80,_0x40e1c3){const _0x2fa650=a104_0x5ec0,_0x5a3587=_0x15dc80();while(!![]){try{const _0x3bebb5=parseInt(_0x2fa650(0x124))/0x1*(parseInt(_0x2fa650(0x12a))/0x2)+parseInt(_0x2fa650(0x125))/0x3+-parseInt(_0x2fa650(0x134))/0x4+parseInt(_0x2fa650(0x136))/0x5*(parseInt(_0x2fa650(0x12e))/0x6)+-parseInt(_0x2fa650(0x130))/0x7*(parseInt(_0x2fa650(0x135))/0x8)+-parseInt(_0x2fa650(0x133))/0x9*(parseInt(_0x2fa650(0x12b))/0xa)+parseInt(_0x2fa650(0x123))/0xb;if(_0x3bebb5===_0x40e1c3)break;else _0x5a3587['push'](_0x5a3587['shift']());}catch(_0x55eba7){_0x5a3587['push'](_0x5a3587['shift']());}}}(a104_0x35c2,0x750ec));import{readdirSync,statSync}from'fs';import a104_0xf2d17d from'path';export function findYamlFiles(_0x463cd2){const _0x2a5a83=[];function _0x28ce11(_0x3f774c){const _0x2c7c90=a104_0x5ec0,_0x142d60=readdirSync(_0x3f774c,{'withFileTypes':!![]});for(const _0x592f2e of _0x142d60){const _0x379987=a104_0xf2d17d[_0x2c7c90(0x132)](_0x3f774c,_0x592f2e[_0x2c7c90(0x121)]);if(_0x592f2e[_0x2c7c90(0x12d)]())_0x28ce11(_0x379987);else(_0x592f2e[_0x2c7c90(0x121)][_0x2c7c90(0x128)](_0x2c7c90(0x126))||_0x592f2e[_0x2c7c90(0x121)][_0x2c7c90(0x128)]('.yaml'))&&_0x2a5a83[_0x2c7c90(0x131)](_0x379987);}}return _0x28ce11(_0x463cd2),_0x2a5a83;}function a104_0x35c2(){const _0x3ac014=['isDirectory','78UKSugT','extname','378bKoMyv','push','join','1077993PTbuus','2273524FUcQNI','28928PAJCIB','255770XLAkqs','name','dirname','1516273OqQscm','3kRUDyB','1704921udYDWC','.yml','relative','endsWith','toLowerCase','234046FVXZtc','40ymgVet','.yaml'];a104_0x35c2=function(){return _0x3ac014;};return a104_0x35c2();}export function discoverYamlFiles(_0x1a85f3){const _0x1086bf=findYamlFiles(_0x1a85f3);return _0x1086bf['map'](_0x55950e=>{const _0x566d39=a104_0x5ec0,_0x1d2625=a104_0xf2d17d[_0x566d39(0x127)](_0x1a85f3,_0x55950e),_0xf8bbe2=a104_0xf2d17d[_0x566d39(0x122)](_0x1d2625);return{'absolutePath':_0x55950e,'relativePath':_0x1d2625,'folderPath':_0xf8bbe2==='.'?'':_0xf8bbe2};});}export function isYamlFile(_0x6ccd6b){const _0x1758d4=a104_0x5ec0;try{const _0x22a9ba=statSync(_0x6ccd6b);if(!_0x22a9ba['isFile']())return![];const _0x340115=a104_0xf2d17d[_0x1758d4(0x12f)](_0x6ccd6b)[_0x1758d4(0x129)]();return _0x340115==='.yml'||_0x340115===_0x1758d4(0x12c);}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x46da8c,_0x37d44e){const _0x678aa=a105_0x464b,_0x519013=_0x46da8c();while(!![]){try{const _0x481278=parseInt(_0x678aa(0x10f))/0x1*(-parseInt(_0x678aa(0xd5))/0x2)+-parseInt(_0x678aa(0xd4))/0x3*(parseInt(_0x678aa(0xdc))/0x4)+-parseInt(_0x678aa(0xf5))/0x5+-parseInt(_0x678aa(0xd2))/0x6+parseInt(_0x678aa(0x10c))/0x7+parseInt(_0x678aa(0xcf))/0x8*(parseInt(_0x678aa(0xc8))/0x9)+-parseInt(_0x678aa(0xf4))/0xa*(-parseInt(_0x678aa(0xda))/0xb);if(_0x481278===_0x37d44e)break;else _0x519013['push'](_0x519013['shift']());}catch(_0x4b8bef){_0x519013['push'](_0x519013['shift']());}}}(a105_0x26f0,0x4c7d9));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x12fbcf){const _0x40b440=a105_0x464b;return _0x12fbcf[_0x40b440(0x104)]()['replace'](/\s+/g,'_')['replace'](/[^a-z0-9_]/g,'')[_0x40b440(0x107)](/_+/g,'_')[_0x40b440(0x107)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x8b981f){const _0x343ee2=a105_0x464b,_0x4b723c=_0x8b981f[_0x343ee2(0xe4)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x4b723c){const _0x52e339=_0x4b723c[0x1]['toLowerCase'](),_0x1e01be=_0x4b723c[0x2],_0x1c4361=_0x1e01be['replace'](/-/g,'')[_0x343ee2(0x102)](0x0,0x4)[_0x343ee2(0x104)]();return _0x52e339+'_'+_0x1c4361;}const _0xae4c68=_0x8b981f[_0x343ee2(0xe4)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0xae4c68){const _0x2b5128=_0xae4c68[0x1],_0x88ea2a=_0xae4c68[0x2][_0x343ee2(0x104)](),_0x13e9ee=_0x2b5128['replace'](/-/g,'')[_0x343ee2(0x102)](0x0,0x4)['toLowerCase']();return _0x88ea2a+'_'+_0x13e9ee;}return undefined;}function stableStringify(_0x5c3fac){const _0x4ad7b6=a105_0x464b;if(Array['isArray'](_0x5c3fac))return'['+_0x5c3fac[_0x4ad7b6(0xe6)](_0x3e7cf0=>stableStringify(_0x3e7cf0))[_0x4ad7b6(0xe9)](',')+']';if(_0x5c3fac&&typeof _0x5c3fac===_0x4ad7b6(0xd7)){const _0x79ea37=_0x5c3fac,_0x50aba=Object[_0x4ad7b6(0xd3)](_0x79ea37)[_0x4ad7b6(0xe5)](),_0x16c273=_0x50aba[_0x4ad7b6(0xe6)](_0x291feb=>'\x22'+_0x291feb+'\x22:'+stableStringify(_0x79ea37[_0x291feb]));return'{'+_0x16c273['join'](',')+'}';}const _0xab6633=JSON[_0x4ad7b6(0xdf)](_0x5c3fac);return _0xab6633===undefined?_0x4ad7b6(0xea):_0xab6633;}function a105_0x26f0(){const _0x371201=['stages','trim','journeyStages','launched','index','11720iyRMjd','versionNumber','yaml','1934082NCzMeF','keys','111354RlCLIf','288846uSNnNp','schedule','object','activation','steps','55NTDEvr','journeys','52bKZqDw','push','has','stringify','bundle_id','length','latest','conditions','match','sort','map','entry_criteria','segments','join','null','decision_point','versions','columns','attributes','behavior','nameMapping','string','with','rule','2267890WyuMBh','373285PTinwl','activation_template_id','notification','exit_criteria','journey','entries','bundle_name','draft','values','type','set','version_number','goal','slice','item','toLowerCase','all_columns','wait','replace','journeyBundleName','version','name','connector_config','594279EgXGqa','segment','endsWith','3qhITsC','isArray','get','some','branches','2502JpYqkP','description'];a105_0x26f0=function(){return _0x371201;};return a105_0x26f0();}export function consolidateActivationsByContent(_0x4dc460){const _0x5890cf=a105_0x464b,_0x1eafc8={},_0x50cc78=new Map(),_0xc93a8c=new Map();for(const _0x56f35c of _0x4dc460){if(!_0x56f35c)continue;for(const [_0x2e4e1f,_0x55a1a3]of Object[_0x5890cf(0xfa)](_0x56f35c)){const _0x4dfd34={'connection':_0x55a1a3['connection'],..._0x55a1a3[_0x5890cf(0x105)]!==undefined&&{'all_columns':_0x55a1a3['all_columns']},..._0x55a1a3['columns']!==undefined&&{'columns':_0x55a1a3[_0x5890cf(0xed)]},..._0x55a1a3['behavior']!==undefined&&{'behavior':_0x55a1a3[_0x5890cf(0xef)]},..._0x55a1a3['schedule']!==undefined&&{'schedule':_0x55a1a3[_0x5890cf(0xd6)]},..._0x55a1a3[_0x5890cf(0xf7)]!==undefined&&{'notification':_0x55a1a3[_0x5890cf(0xf7)]},..._0x55a1a3['connector_config']!==undefined&&{'connector_config':_0x55a1a3[_0x5890cf(0x10b)]},..._0x55a1a3[_0x5890cf(0xf6)]!==undefined&&{'activation_template_id':_0x55a1a3[_0x5890cf(0xf6)]}},_0x30403e=stableStringify(_0x4dfd34),_0xc92876=_0xc93a8c[_0x5890cf(0x111)](_0x30403e);_0xc92876?_0x50cc78[_0x5890cf(0xff)](_0x2e4e1f,_0xc92876):(_0x1eafc8[_0x2e4e1f]=_0x55a1a3,_0x50cc78['set'](_0x2e4e1f,_0x2e4e1f),_0xc93a8c['set'](_0x30403e,_0x2e4e1f));}}return{'merged':_0x1eafc8,'nameMapping':_0x50cc78};}export function updateActivationReferences(_0x253b13,_0x4e6107){const _0x1a4f5f=a105_0x464b;if(!_0x253b13)return;for(const _0x4377cb of _0x253b13){if(!_0x4377cb[_0x1a4f5f(0xd9)])continue;for(const _0x43874d of _0x4377cb[_0x1a4f5f(0xd9)]){if(_0x43874d[_0x1a4f5f(0xfe)]===_0x1a4f5f(0xd8)&&_0x43874d[_0x1a4f5f(0xf2)]?.[_0x1a4f5f(0xd8)]){const _0x238bad=_0x4e6107[_0x1a4f5f(0x111)](_0x43874d[_0x1a4f5f(0xf2)][_0x1a4f5f(0xd8)]);_0x238bad&&_0x238bad!==_0x43874d[_0x1a4f5f(0xf2)][_0x1a4f5f(0xd8)]&&(_0x43874d['with'][_0x1a4f5f(0xd8)]=_0x238bad);}}}}export function consolidateSegmentsByContent(_0x348839,_0x44e2b9){const _0x4c6773=a105_0x464b,_0x3747d6={},_0x4a0062=new Map(),_0x4623ef=new Map();for(const _0x8fe327 of _0x348839){if(!_0x8fe327)continue;for(const [_0xa2de4f,_0x2b70b7]of Object[_0x4c6773(0xfa)](_0x8fe327)){if(!_0x2b70b7[_0x4c6773(0xf3)]){_0x3747d6[_0xa2de4f]=_0x2b70b7,_0x4a0062[_0x4c6773(0xff)](_0xa2de4f,_0xa2de4f);continue;}const _0xe29c66=_0x2b70b7[_0x4c6773(0xc9)]&&_0x2b70b7[_0x4c6773(0xc9)][_0x4c6773(0xcb)]()?_0x2b70b7[_0x4c6773(0xc9)]:undefined,_0x2404f1=JSON['stringify']({'description':_0xe29c66,'rule':deepSortObject(_0x2b70b7[_0x4c6773(0xf3)])}),_0x1174ab=_0x4623ef[_0x4c6773(0x111)](_0x2404f1);if(_0x1174ab){const _0x290a48={..._0x2b70b7[_0x4c6773(0xc9)]!==undefined&&{'description':_0x2b70b7[_0x4c6773(0xc9)]},'rule':_0x2b70b7[_0x4c6773(0xf3)]?deepSortObject(_0x2b70b7[_0x4c6773(0xf3)]):_0x2b70b7[_0x4c6773(0xf3)]};if(_0xa2de4f<_0x1174ab){_0x3747d6[_0xa2de4f]=_0x290a48,delete _0x3747d6[_0x1174ab];for(const [_0x2cde17,_0x72ca1f]of _0x4a0062[_0x4c6773(0xfa)]()){_0x72ca1f===_0x1174ab&&_0x4a0062[_0x4c6773(0xff)](_0x2cde17,_0xa2de4f);}_0x4a0062['set'](_0xa2de4f,_0xa2de4f),_0x4623ef['set'](_0x2404f1,_0xa2de4f);}else _0x3747d6[_0x1174ab]=_0x290a48,_0x4a0062[_0x4c6773(0xff)](_0xa2de4f,_0x1174ab);}else{let _0x2066dd=_0xa2de4f;if(_0x44e2b9){const _0x110ca0=_0x44e2b9[_0x4c6773(0x111)](_0x2404f1);_0x110ca0&&_0x110ca0[_0x4c6773(0xe1)]>0x0&&(_0x2066dd=_0x110ca0[_0x4c6773(0x102)]()['sort']()[0x0]);}const _0x9dcb0d={..._0x2b70b7[_0x4c6773(0xc9)]!==undefined&&{'description':_0x2b70b7[_0x4c6773(0xc9)]},'rule':_0x2b70b7[_0x4c6773(0xf3)]?deepSortObject(_0x2b70b7[_0x4c6773(0xf3)]):_0x2b70b7['rule']};_0x3747d6[_0x2066dd]=_0x9dcb0d,_0x4a0062['set'](_0xa2de4f,_0x2066dd),_0x4623ef[_0x4c6773(0xff)](_0x2404f1,_0x2066dd);}}}return{'merged':_0x3747d6,'nameMapping':_0x4a0062};}export function updateSegmentReferences(_0x13071e,_0x4f201c){const _0x286970=a105_0x464b;if(!_0x13071e)return;for(const _0x1e017e of _0x13071e){if(_0x1e017e[_0x286970(0xe7)]?.[_0x286970(0x10d)]){const _0x2d9178=_0x4f201c[_0x286970(0x111)](_0x1e017e[_0x286970(0xe7)]['segment']);_0x2d9178&&(_0x1e017e[_0x286970(0xe7)][_0x286970(0x10d)]=_0x2d9178);}if(_0x1e017e[_0x286970(0xd9)])for(const _0x2aa446 of _0x1e017e['steps']){if(_0x2aa446[_0x286970(0xfe)]===_0x286970(0xeb)&&_0x2aa446[_0x286970(0xf2)]?.[_0x286970(0xc7)])for(const _0x3cdf21 of _0x2aa446[_0x286970(0xf2)][_0x286970(0xc7)]){if(_0x3cdf21[_0x286970(0x10d)]){const _0x222466=_0x4f201c[_0x286970(0x111)](_0x3cdf21['segment']);_0x222466&&(_0x3cdf21[_0x286970(0x10d)]=_0x222466);}}}}}export function updateSegmentRefsInSegments(_0xaf255e,_0x42c57d){const _0x2ae8da=a105_0x464b;for(const _0x34196f of Object[_0x2ae8da(0xfd)](_0xaf255e)){_0x34196f[_0x2ae8da(0xf3)]&&updateSegmentRefsInRule(_0x34196f[_0x2ae8da(0xf3)],_0x42c57d);}}function updateSegmentRefsInRule(_0x43e44e,_0x56679e){const _0x466154=a105_0x464b;if(_0x43e44e===null||typeof _0x43e44e!=='object')return;if(Array[_0x466154(0x110)](_0x43e44e)){for(const _0x46f485 of _0x43e44e){updateSegmentRefsInRule(_0x46f485,_0x56679e);}return;}const _0xd91940=_0x43e44e;if((_0xd91940[_0x466154(0xfe)]==='include'||_0xd91940[_0x466154(0xfe)]==='exclude')&&typeof _0xd91940[_0x466154(0x10d)]===_0x466154(0xf1)){const _0x3561ed=_0x56679e['get'](_0xd91940[_0x466154(0x10d)]);_0x3561ed&&(_0xd91940[_0x466154(0x10d)]=_0x3561ed);}if(_0xd91940[_0x466154(0xe3)]&&Array['isArray'](_0xd91940[_0x466154(0xe3)]))for(const _0x3a3117 of _0xd91940[_0x466154(0xe3)]){updateSegmentRefsInRule(_0x3a3117,_0x56679e);}}export function buildJourneysArray(_0x501fa1){const _0x536113=a105_0x464b,_0x4f9eee=Math['max'](..._0x501fa1[_0x536113(0xe6)](_0xa79872=>_0xa79872['item'][_0x536113(0xd0)]||0x0));return _0x501fa1[_0x536113(0xe6)](_0x363a52=>{const _0x456ebd=_0x536113,_0x550e25=(_0x363a52[_0x456ebd(0x103)]['versionNumber']||0x0)===_0x4f9eee,_0x34109a=_0x363a52[_0x456ebd(0xd1)][_0x456ebd(0xdb)]?.[0x0],_0x19f0a3={'version':_0x34109a?.['version']||_0x363a52['yaml'][_0x456ebd(0x109)]||_0x363a52[_0x456ebd(0x103)]['name'],'state':_0x363a52[_0x456ebd(0x103)]['state']===_0x456ebd(0xcd)?'launched':_0x456ebd(0xfc),'stages':_0x34109a?.[_0x456ebd(0xca)]||_0x363a52[_0x456ebd(0xd1)]['stages']||[],'id':_0x34109a?.['id']||_0x363a52[_0x456ebd(0xd1)]['id'],'version_number':_0x34109a?.[_0x456ebd(0x100)]||_0x363a52[_0x456ebd(0xd1)][_0x456ebd(0x100)]};return _0x550e25&&(_0x19f0a3[_0x456ebd(0xe2)]=!![]),_0x19f0a3;});}export function buildMergedJourneyDef(_0x1de575,_0xb7f5a0){const _0xd514cc=a105_0x464b,_0x429834=_0x1de575[0x0][_0xd514cc(0xd1)],_0x58ba49=buildJourneysArray(_0x1de575),{merged:_0x5c4834,nameMapping:_0x4eff25}=consolidateSegmentsByContent(_0x1de575['map'](_0x144c14=>_0x144c14[_0xd514cc(0xd1)]['segments']),_0xb7f5a0);updateSegmentRefsInSegments(_0x5c4834,_0x4eff25);const _0x446bd8=Array['from'](_0x4eff25[_0xd514cc(0xfa)]())[_0xd514cc(0x112)](([_0x49add4,_0x334bc8])=>_0x49add4!==_0x334bc8&&_0x49add4['startsWith'](_0xd514cc(0xe7)));let _0xb5bd27=_0x5c4834,_0x1aeea4=new Map();if(_0x446bd8){const _0x4bd66b=consolidateSegmentsByContent([_0x5c4834],_0xb7f5a0);_0xb5bd27=_0x4bd66b['merged'],_0x1aeea4=_0x4bd66b[_0xd514cc(0xf0)];}const _0x349f4c=new Map(_0x4eff25);for(const [_0x43cb04,_0x2e32a0]of _0x1aeea4['entries']()){_0x349f4c['set'](_0x43cb04,_0x2e32a0);}for(const [_0x32c0c7,_0x254130]of _0x349f4c[_0xd514cc(0xfa)]()){let _0x4b9313=_0x254130,_0x51855d=0x0;while(_0x349f4c[_0xd514cc(0xde)](_0x4b9313)&&_0x349f4c[_0xd514cc(0x111)](_0x4b9313)!==_0x4b9313&&_0x51855d<MAX_MAPPING_CHAIN_DEPTH){_0x4b9313=_0x349f4c[_0xd514cc(0x111)](_0x4b9313),_0x51855d++;}_0x4b9313!==_0x254130&&_0x349f4c[_0xd514cc(0xff)](_0x32c0c7,_0x4b9313);}for(const _0x59abdd of _0x58ba49){updateSegmentReferences(_0x59abdd[_0xd514cc(0xca)],_0x349f4c);}const {merged:_0x1ae85e,nameMapping:_0x32e9c1}=consolidateActivationsByContent(_0x1de575['map'](_0x206f6a=>_0x206f6a[_0xd514cc(0xd1)]['activations']));for(const _0x418d69 of _0x58ba49){updateActivationReferences(_0x418d69[_0xd514cc(0xca)],_0x32e9c1);}let _0x3e4c29=_0x429834['goal'];if(_0x3e4c29?.[_0xd514cc(0x10d)]){const _0x3712a6=_0x349f4c['get'](_0x3e4c29[_0xd514cc(0x10d)]);_0x3712a6&&(_0x3e4c29={..._0x3e4c29,'segment':_0x3712a6});}for(const _0x49870c of _0x58ba49){if(_0x49870c[_0xd514cc(0x101)]?.[_0xd514cc(0x10d)]){const _0x1b0963=_0x349f4c[_0xd514cc(0x111)](_0x49870c[_0xd514cc(0x101)][_0xd514cc(0x10d)]);_0x1b0963&&(_0x49870c['goal']={..._0x49870c[_0xd514cc(0x101)],'segment':_0x1b0963});}}return{'type':_0xd514cc(0xf9),'name':_0x429834[_0xd514cc(0x10a)],'description':_0x429834[_0xd514cc(0xc9)],'goal':_0x3e4c29,'reentry':_0x429834['reentry'],'segments':Object[_0xd514cc(0xd3)](_0xb5bd27)[_0xd514cc(0xe1)]>0x0?_0xb5bd27:undefined,'activations':Object[_0xd514cc(0xd3)](_0x1ae85e)['length']>0x0?_0x1ae85e:undefined,'journeys':_0x58ba49,'bundle_id':_0x429834[_0xd514cc(0xe0)],'bundle_name':_0x429834[_0xd514cc(0xfb)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x2e9fc1,_0x1b8597,_0x1b03e9,_0x3713b1){const _0x4bd2fb=a105_0x464b,_0x20c2b1=_0x2e9fc1+':'+_0x1b8597,_0xcd2ffd=_0x1b03e9[_0x4bd2fb(0x111)](_0x20c2b1);if(_0xcd2ffd)return _0xcd2ffd;const _0x36254b=await _0x3713b1(_0x2e9fc1),_0x532aa9=_0x36254b[_0x4bd2fb(0xee)][_0x4bd2fb(0x108)]||_0x36254b[_0x4bd2fb(0xee)]['name'],_0x574c4e=_0x36254b[_0x4bd2fb(0xee)][_0x4bd2fb(0xcc)]['find'](_0x254448=>String(_0x254448['id'])===String(_0x1b8597)),_0x388114=_0x574c4e?.[_0x4bd2fb(0x10a)]||_0x1b8597,_0x8e63da={'journeyName':_0x532aa9,'stageName':_0x388114};return _0x1b03e9['set'](_0x20c2b1,_0x8e63da),_0x8e63da;}export function formatApiJourneyName(_0x498175,_0x53073b){return _0x53073b+'\x20('+_0x498175+')';}export function isLocalJourneyRef(_0xd06ad7){const _0x591cf7=a105_0x464b;return _0xd06ad7[_0x591cf7(0x10e)]('.yml')||_0xd06ad7[_0x591cf7(0x10e)]('.yaml');}export function buildLocalRuleToNameMapping(_0x3314d2){const _0x3be272=a105_0x464b,_0x1b3e89=new Map();if(!_0x3314d2)return _0x1b3e89;for(const [_0x18e337,_0x2672fb]of Object[_0x3be272(0xfa)](_0x3314d2)){if(_0x2672fb[_0x3be272(0xf3)]){const _0x475427=serializeRule(_0x2672fb[_0x3be272(0xf3)]),_0xd13f62=_0x1b3e89['get'](_0x475427)||[];_0xd13f62[_0x3be272(0xdd)](_0x18e337),_0x1b3e89['set'](_0x475427,_0xd13f62);}}return _0x1b3e89;}export function buildLocalRuleToNameMappingFromJourney(_0x1c0a84){const _0x506fff=a105_0x464b,_0x301997=_0x1c0a84[_0x506fff(0xe8)];if(!_0x301997)return new Map();const _0x28f830=collectSegmentUsageCounts(_0x1c0a84),_0x4f6a85=new Map();let _0x524804=0x0;for(const [_0xf346a5,_0x5f5508]of Object[_0x506fff(0xfa)](_0x301997)){if(!_0x5f5508['rule']){_0x524804++;continue;}const _0x47c08a=serializeRule(_0x5f5508['rule']),_0x2da86d=_0x4f6a85[_0x506fff(0x111)](_0x47c08a)||[];_0x2da86d[_0x506fff(0xdd)]({'name':_0xf346a5,'index':_0x524804}),_0x4f6a85[_0x506fff(0xff)](_0x47c08a,_0x2da86d),_0x524804++;}const _0xfbb03d=new Map();for(const [_0x14ecb9,_0x47c85a]of _0x4f6a85){const _0x20ecdf=_0x47c85a[_0x506fff(0x102)]()[_0x506fff(0xe5)]((_0x4dbf0a,_0x334364)=>{const _0x3fd0b7=_0x506fff,_0x2684e0=_0x28f830[_0x3fd0b7(0x111)](_0x4dbf0a['name'])||0x0,_0x4a4bda=_0x28f830['get'](_0x334364['name'])||0x0;if(_0x2684e0!==_0x4a4bda)return _0x4a4bda-_0x2684e0;return _0x4dbf0a[_0x3fd0b7(0xce)]-_0x334364[_0x3fd0b7(0xce)];})[_0x506fff(0xe6)](_0x4b6bb2=>_0x4b6bb2[_0x506fff(0x10a)]);_0xfbb03d[_0x506fff(0xff)](_0x14ecb9,_0x20ecdf);}return _0xfbb03d;}function a105_0x464b(_0x2534e1,_0x221493){_0x2534e1=_0x2534e1-0xc7;const _0x26f0cb=a105_0x26f0();let _0x464b1f=_0x26f0cb[_0x2534e1];return _0x464b1f;}export function collectSegmentUsageCounts(_0x343074){const _0x563d31=a105_0x464b,_0x2e1531=new Map(),_0x3a619a=_0x4bc469=>{const _0x961bb6=a105_0x464b;if(!_0x4bc469)return;_0x2e1531[_0x961bb6(0xff)](_0x4bc469,(_0x2e1531[_0x961bb6(0x111)](_0x4bc469)||0x0)+0x1);},_0x5912f6=_0x563bea=>{const _0x434ba6=a105_0x464b;for(const _0x28031c of _0x563bea){_0x3a619a(_0x28031c[_0x434ba6(0xe7)]?.[_0x434ba6(0x10d)]);if(_0x28031c[_0x434ba6(0xf8)])for(const _0xb379ac of _0x28031c[_0x434ba6(0xf8)]){_0x3a619a(_0xb379ac[_0x434ba6(0x10d)]);}_0x3a619a(_0x28031c['milestone']?.[_0x434ba6(0x10d)]);if(_0x28031c[_0x434ba6(0xd9)])for(const _0x2155fe of _0x28031c[_0x434ba6(0xd9)]){if(_0x2155fe['type']===_0x434ba6(0xeb))for(const _0x125675 of _0x2155fe[_0x434ba6(0xf2)][_0x434ba6(0xc7)]){_0x3a619a(_0x125675[_0x434ba6(0x10d)]);}else _0x2155fe['type']===_0x434ba6(0x106)&&_0x3a619a(_0x2155fe['with']['condition']?.['segment']);}}};_0x3a619a(_0x343074[_0x563d31(0x101)]?.[_0x563d31(0x10d)]);if(_0x343074[_0x563d31(0xdb)])for(const _0x2396ed of _0x343074[_0x563d31(0xdb)]){_0x3a619a(_0x2396ed['goal']?.[_0x563d31(0x10d)]),_0x5912f6(_0x2396ed['stages']);}_0x343074['stages']&&_0x5912f6(_0x343074[_0x563d31(0xca)]);if(_0x343074[_0x563d31(0xec)])for(const _0x27bca2 of _0x343074[_0x563d31(0xec)]){_0x5912f6(_0x27bca2[_0x563d31(0xca)]);}return _0x2e1531;}
1
+ (function(_0x2f185c,_0x866b7d){const _0x577940=a105_0x3fc7,_0x2228e6=_0x2f185c();while(!![]){try{const _0x5209f9=-parseInt(_0x577940(0x18a))/0x1*(parseInt(_0x577940(0x19d))/0x2)+-parseInt(_0x577940(0x15b))/0x3+-parseInt(_0x577940(0x161))/0x4+parseInt(_0x577940(0x199))/0x5*(-parseInt(_0x577940(0x16f))/0x6)+parseInt(_0x577940(0x16c))/0x7+-parseInt(_0x577940(0x169))/0x8+parseInt(_0x577940(0x17e))/0x9;if(_0x5209f9===_0x866b7d)break;else _0x2228e6['push'](_0x2228e6['shift']());}catch(_0x7b5e8e){_0x2228e6['push'](_0x2228e6['shift']());}}}(a105_0x16f9,0x868ac));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';function a105_0x16f9(){const _0x1c108c=['activation_template_id','merged','latest','bundle_name','branches','connection','toLowerCase','417465CZZQFh','map','all_columns','schedule','rule','attributes','2949460mTUbQO','versions','bundle_id','replace','stringify','journeyStages','isArray','description','5640544DfiUBC','sort','segments','6441421drgFdv','object','get','6JMjlTr','endsWith','from','segment','connector_config','length','yaml','startsWith','activation','keys','launched','some','name','slice','item','24935301ANyOqq','values','columns','version','journeyBundleName','wait','journeys','conditions','null','type','with','push','855845EqVfXQ','goal','behavior','activations','milestone','notification','max','condition','nameMapping','.yaml','decision_point','set','journey','index','trim','3511375wKqvRB','entries','join','stages','2WwJFIK','state','match','entry_criteria','exit_criteria','version_number','steps','include'];a105_0x16f9=function(){return _0x1c108c;};return a105_0x16f9();}export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x4130b7){const _0x54c913=a105_0x3fc7;return _0x4130b7[_0x54c913(0x15a)]()[_0x54c913(0x164)](/\s+/g,'_')[_0x54c913(0x164)](/[^a-z0-9_]/g,'')['replace'](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x426b19){const _0x1a0a8a=a105_0x3fc7,_0x88bd01=_0x426b19[_0x1a0a8a(0x19f)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x88bd01){const _0x10ef8b=_0x88bd01[0x1]['toLowerCase'](),_0x43fa32=_0x88bd01[0x2],_0x417f34=_0x43fa32['replace'](/-/g,'')['slice'](0x0,0x4)[_0x1a0a8a(0x15a)]();return _0x10ef8b+'_'+_0x417f34;}const _0x547522=_0x426b19[_0x1a0a8a(0x19f)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x547522){const _0x5c604a=_0x547522[0x1],_0x4b53d8=_0x547522[0x2][_0x1a0a8a(0x15a)](),_0x18d83c=_0x5c604a['replace'](/-/g,'')[_0x1a0a8a(0x17c)](0x0,0x4)[_0x1a0a8a(0x15a)]();return _0x4b53d8+'_'+_0x18d83c;}return undefined;}function stableStringify(_0x4cef44){const _0x4f17b8=a105_0x3fc7;if(Array[_0x4f17b8(0x167)](_0x4cef44))return'['+_0x4cef44[_0x4f17b8(0x15c)](_0xd34e11=>stableStringify(_0xd34e11))[_0x4f17b8(0x19b)](',')+']';if(_0x4cef44&&typeof _0x4cef44==='object'){const _0x4184de=_0x4cef44,_0x306456=Object[_0x4f17b8(0x178)](_0x4184de)[_0x4f17b8(0x16a)](),_0x3b4a31=_0x306456[_0x4f17b8(0x15c)](_0x46c9d7=>'\x22'+_0x46c9d7+'\x22:'+stableStringify(_0x4184de[_0x46c9d7]));return'{'+_0x3b4a31['join'](',')+'}';}const _0x139f9f=JSON[_0x4f17b8(0x165)](_0x4cef44);return _0x139f9f===undefined?_0x4f17b8(0x186):_0x139f9f;}export function consolidateActivationsByContent(_0x1e9f6a){const _0x3e2dee=a105_0x3fc7,_0x4c6df0={},_0x2c5c76=new Map(),_0x24bc4a=new Map();for(const _0x1e1c61 of _0x1e9f6a){if(!_0x1e1c61)continue;for(const [_0x1e7199,_0x508f4a]of Object[_0x3e2dee(0x19a)](_0x1e1c61)){const _0x59d8b9={'connection':_0x508f4a[_0x3e2dee(0x159)],..._0x508f4a['all_columns']!==undefined&&{'all_columns':_0x508f4a[_0x3e2dee(0x15d)]},..._0x508f4a[_0x3e2dee(0x180)]!==undefined&&{'columns':_0x508f4a[_0x3e2dee(0x180)]},..._0x508f4a['behavior']!==undefined&&{'behavior':_0x508f4a[_0x3e2dee(0x18c)]},..._0x508f4a[_0x3e2dee(0x15e)]!==undefined&&{'schedule':_0x508f4a['schedule']},..._0x508f4a[_0x3e2dee(0x18f)]!==undefined&&{'notification':_0x508f4a[_0x3e2dee(0x18f)]},..._0x508f4a['connector_config']!==undefined&&{'connector_config':_0x508f4a[_0x3e2dee(0x173)]},..._0x508f4a[_0x3e2dee(0x1a5)]!==undefined&&{'activation_template_id':_0x508f4a[_0x3e2dee(0x1a5)]}},_0x4ba64d=stableStringify(_0x59d8b9),_0x86d3b6=_0x24bc4a['get'](_0x4ba64d);_0x86d3b6?_0x2c5c76[_0x3e2dee(0x195)](_0x1e7199,_0x86d3b6):(_0x4c6df0[_0x1e7199]=_0x508f4a,_0x2c5c76['set'](_0x1e7199,_0x1e7199),_0x24bc4a['set'](_0x4ba64d,_0x1e7199));}}return{'merged':_0x4c6df0,'nameMapping':_0x2c5c76};}export function updateActivationReferences(_0x3fb2d7,_0x49e57e){const _0x4e3d78=a105_0x3fc7;if(!_0x3fb2d7)return;for(const _0x5900e7 of _0x3fb2d7){if(!_0x5900e7['steps'])continue;for(const _0x10fcca of _0x5900e7[_0x4e3d78(0x1a3)]){if(_0x10fcca[_0x4e3d78(0x187)]==='activation'&&_0x10fcca['with']?.[_0x4e3d78(0x177)]){const _0x360d01=_0x49e57e['get'](_0x10fcca[_0x4e3d78(0x188)]['activation']);_0x360d01&&_0x360d01!==_0x10fcca[_0x4e3d78(0x188)][_0x4e3d78(0x177)]&&(_0x10fcca[_0x4e3d78(0x188)][_0x4e3d78(0x177)]=_0x360d01);}}}}export function consolidateSegmentsByContent(_0x1868de,_0x2904e6){const _0xc87429=a105_0x3fc7,_0xbfbf8d={},_0x27469b=new Map(),_0x260371=new Map();for(const _0x2f6667 of _0x1868de){if(!_0x2f6667)continue;for(const [_0x390847,_0x357fa9]of Object[_0xc87429(0x19a)](_0x2f6667)){if(!_0x357fa9[_0xc87429(0x15f)]){_0xbfbf8d[_0x390847]=_0x357fa9,_0x27469b[_0xc87429(0x195)](_0x390847,_0x390847);continue;}const _0x4d8413=_0x357fa9[_0xc87429(0x168)]&&_0x357fa9['description'][_0xc87429(0x198)]()?_0x357fa9[_0xc87429(0x168)]:undefined,_0x2139ee=JSON['stringify']({'description':_0x4d8413,'rule':deepSortObject(_0x357fa9[_0xc87429(0x15f)])}),_0x19e63d=_0x260371[_0xc87429(0x16e)](_0x2139ee);if(_0x19e63d){const _0x5a4e69={..._0x357fa9['description']!==undefined&&{'description':_0x357fa9['description']},'rule':_0x357fa9[_0xc87429(0x15f)]?deepSortObject(_0x357fa9[_0xc87429(0x15f)]):_0x357fa9['rule']};if(_0x390847<_0x19e63d){_0xbfbf8d[_0x390847]=_0x5a4e69,delete _0xbfbf8d[_0x19e63d];for(const [_0x3306ed,_0x27807b]of _0x27469b['entries']()){_0x27807b===_0x19e63d&&_0x27469b['set'](_0x3306ed,_0x390847);}_0x27469b[_0xc87429(0x195)](_0x390847,_0x390847),_0x260371['set'](_0x2139ee,_0x390847);}else _0xbfbf8d[_0x19e63d]=_0x5a4e69,_0x27469b[_0xc87429(0x195)](_0x390847,_0x19e63d);}else{let _0x452f34=_0x390847;if(_0x2904e6){const _0x44db55=_0x2904e6[_0xc87429(0x16e)](_0x2139ee);_0x44db55&&_0x44db55['length']>0x0&&(_0x452f34=_0x44db55[_0xc87429(0x17c)]()[_0xc87429(0x16a)]()[0x0]);}const _0x564d88={..._0x357fa9[_0xc87429(0x168)]!==undefined&&{'description':_0x357fa9[_0xc87429(0x168)]},'rule':_0x357fa9[_0xc87429(0x15f)]?deepSortObject(_0x357fa9['rule']):_0x357fa9['rule']};_0xbfbf8d[_0x452f34]=_0x564d88,_0x27469b[_0xc87429(0x195)](_0x390847,_0x452f34),_0x260371[_0xc87429(0x195)](_0x2139ee,_0x452f34);}}}return{'merged':_0xbfbf8d,'nameMapping':_0x27469b};}export function updateSegmentReferences(_0x41ad0d,_0x19ce7b){const _0x53561a=a105_0x3fc7;if(!_0x41ad0d)return;for(const _0x2edb54 of _0x41ad0d){if(_0x2edb54['entry_criteria']?.[_0x53561a(0x172)]){const _0x564b12=_0x19ce7b['get'](_0x2edb54[_0x53561a(0x1a0)][_0x53561a(0x172)]);_0x564b12&&(_0x2edb54[_0x53561a(0x1a0)][_0x53561a(0x172)]=_0x564b12);}if(_0x2edb54[_0x53561a(0x1a3)])for(const _0x3b7f50 of _0x2edb54[_0x53561a(0x1a3)]){if(_0x3b7f50['type']===_0x53561a(0x194)&&_0x3b7f50[_0x53561a(0x188)]?.[_0x53561a(0x158)])for(const _0x572365 of _0x3b7f50[_0x53561a(0x188)][_0x53561a(0x158)]){if(_0x572365['segment']){const _0x38c75b=_0x19ce7b[_0x53561a(0x16e)](_0x572365[_0x53561a(0x172)]);_0x38c75b&&(_0x572365[_0x53561a(0x172)]=_0x38c75b);}}}}}export function updateSegmentRefsInSegments(_0x287614,_0x373231){const _0x571a54=a105_0x3fc7;for(const _0x26616b of Object[_0x571a54(0x17f)](_0x287614)){_0x26616b[_0x571a54(0x15f)]&&updateSegmentRefsInRule(_0x26616b[_0x571a54(0x15f)],_0x373231);}}function updateSegmentRefsInRule(_0x2d05a6,_0x50da17){const _0xe03ea8=a105_0x3fc7;if(_0x2d05a6===null||typeof _0x2d05a6!==_0xe03ea8(0x16d))return;if(Array[_0xe03ea8(0x167)](_0x2d05a6)){for(const _0x2640c0 of _0x2d05a6){updateSegmentRefsInRule(_0x2640c0,_0x50da17);}return;}const _0x5a6db6=_0x2d05a6;if((_0x5a6db6[_0xe03ea8(0x187)]===_0xe03ea8(0x1a4)||_0x5a6db6[_0xe03ea8(0x187)]==='exclude')&&typeof _0x5a6db6[_0xe03ea8(0x172)]==='string'){const _0x1c5fe1=_0x50da17[_0xe03ea8(0x16e)](_0x5a6db6[_0xe03ea8(0x172)]);_0x1c5fe1&&(_0x5a6db6[_0xe03ea8(0x172)]=_0x1c5fe1);}if(_0x5a6db6['conditions']&&Array['isArray'](_0x5a6db6[_0xe03ea8(0x185)]))for(const _0x770f49 of _0x5a6db6[_0xe03ea8(0x185)]){updateSegmentRefsInRule(_0x770f49,_0x50da17);}}export function buildJourneysArray(_0x1bdf40){const _0x31981f=a105_0x3fc7,_0x112f40=Math[_0x31981f(0x190)](..._0x1bdf40[_0x31981f(0x15c)](_0x1b964d=>_0x1b964d['item']['versionNumber']||0x0));return _0x1bdf40[_0x31981f(0x15c)](_0x258342=>{const _0x41e91d=_0x31981f,_0x50106b=(_0x258342[_0x41e91d(0x17d)]['versionNumber']||0x0)===_0x112f40,_0x2b5b24=_0x258342[_0x41e91d(0x175)]['journeys']?.[0x0],_0x55d28e={'version':_0x2b5b24?.[_0x41e91d(0x181)]||_0x258342[_0x41e91d(0x175)]['version']||_0x258342[_0x41e91d(0x17d)][_0x41e91d(0x17b)],'state':_0x258342['item'][_0x41e91d(0x19e)]===_0x41e91d(0x179)?_0x41e91d(0x179):'draft','stages':_0x2b5b24?.[_0x41e91d(0x19c)]||_0x258342[_0x41e91d(0x175)][_0x41e91d(0x19c)]||[],'id':_0x2b5b24?.['id']||_0x258342[_0x41e91d(0x175)]['id'],'version_number':_0x2b5b24?.[_0x41e91d(0x1a2)]||_0x258342['yaml'][_0x41e91d(0x1a2)]};return _0x50106b&&(_0x55d28e[_0x41e91d(0x156)]=!![]),_0x55d28e;});}export function buildMergedJourneyDef(_0xb6c354,_0x270816){const _0x3a86cc=a105_0x3fc7,_0x414976=_0xb6c354[0x0][_0x3a86cc(0x175)],_0x3bca74=buildJourneysArray(_0xb6c354),{merged:_0x478381,nameMapping:_0x4cf817}=consolidateSegmentsByContent(_0xb6c354[_0x3a86cc(0x15c)](_0x31deaf=>_0x31deaf[_0x3a86cc(0x175)][_0x3a86cc(0x16b)]),_0x270816);updateSegmentRefsInSegments(_0x478381,_0x4cf817);const _0x3011c3=Array[_0x3a86cc(0x171)](_0x4cf817['entries']())[_0x3a86cc(0x17a)](([_0x472341,_0x1032fe])=>_0x472341!==_0x1032fe&&_0x472341[_0x3a86cc(0x176)](_0x3a86cc(0x1a0)));let _0x386b5b=_0x478381,_0x1e3535=new Map();if(_0x3011c3){const _0x37a081=consolidateSegmentsByContent([_0x478381],_0x270816);_0x386b5b=_0x37a081[_0x3a86cc(0x1a6)],_0x1e3535=_0x37a081[_0x3a86cc(0x192)];}const _0x3de4a3=new Map(_0x4cf817);for(const [_0x33a877,_0x3ac897]of _0x1e3535[_0x3a86cc(0x19a)]()){_0x3de4a3[_0x3a86cc(0x195)](_0x33a877,_0x3ac897);}for(const [_0x1a4845,_0x813019]of _0x3de4a3['entries']()){let _0x5eaa02=_0x813019,_0x5851eb=0x0;while(_0x3de4a3['has'](_0x5eaa02)&&_0x3de4a3[_0x3a86cc(0x16e)](_0x5eaa02)!==_0x5eaa02&&_0x5851eb<MAX_MAPPING_CHAIN_DEPTH){_0x5eaa02=_0x3de4a3[_0x3a86cc(0x16e)](_0x5eaa02),_0x5851eb++;}_0x5eaa02!==_0x813019&&_0x3de4a3['set'](_0x1a4845,_0x5eaa02);}for(const _0x4f5cdd of _0x3bca74){updateSegmentReferences(_0x4f5cdd['stages'],_0x3de4a3);}const {merged:_0x3bedf8,nameMapping:_0x93c08a}=consolidateActivationsByContent(_0xb6c354[_0x3a86cc(0x15c)](_0x204a58=>_0x204a58[_0x3a86cc(0x175)][_0x3a86cc(0x18d)]));for(const _0x40b4de of _0x3bca74){updateActivationReferences(_0x40b4de[_0x3a86cc(0x19c)],_0x93c08a);}let _0x2c51cf=_0x414976[_0x3a86cc(0x18b)];if(_0x2c51cf?.[_0x3a86cc(0x172)]){const _0x1e6d9b=_0x3de4a3[_0x3a86cc(0x16e)](_0x2c51cf['segment']);_0x1e6d9b&&(_0x2c51cf={..._0x2c51cf,'segment':_0x1e6d9b});}for(const _0x5bbf53 of _0x3bca74){if(_0x5bbf53[_0x3a86cc(0x18b)]?.[_0x3a86cc(0x172)]){const _0x332fb3=_0x3de4a3[_0x3a86cc(0x16e)](_0x5bbf53[_0x3a86cc(0x18b)][_0x3a86cc(0x172)]);_0x332fb3&&(_0x5bbf53[_0x3a86cc(0x18b)]={..._0x5bbf53[_0x3a86cc(0x18b)],'segment':_0x332fb3});}}return{'type':_0x3a86cc(0x196),'name':_0x414976[_0x3a86cc(0x17b)],'description':_0x414976[_0x3a86cc(0x168)],'goal':_0x2c51cf,'reentry':_0x414976['reentry'],'segments':Object[_0x3a86cc(0x178)](_0x386b5b)[_0x3a86cc(0x174)]>0x0?_0x386b5b:undefined,'activations':Object[_0x3a86cc(0x178)](_0x3bedf8)[_0x3a86cc(0x174)]>0x0?_0x3bedf8:undefined,'journeys':_0x3bca74,'bundle_id':_0x414976[_0x3a86cc(0x163)],'bundle_name':_0x414976[_0x3a86cc(0x157)]};}export function createJumpTargetCache(){return new Map();}function a105_0x3fc7(_0x460c86,_0xb44c16){_0x460c86=_0x460c86-0x156;const _0x16f99f=a105_0x16f9();let _0x3fc7e3=_0x16f99f[_0x460c86];return _0x3fc7e3;}export async function resolveJumpTarget(_0x1be97a,_0x3a2ac8,_0x4b0d02,_0x43dfe0){const _0x3ab04b=a105_0x3fc7,_0x22c681=_0x1be97a+':'+_0x3a2ac8,_0x289a63=_0x4b0d02[_0x3ab04b(0x16e)](_0x22c681);if(_0x289a63)return _0x289a63;const _0x23f1f4=await _0x43dfe0(_0x1be97a),_0x1f0c4a=_0x23f1f4[_0x3ab04b(0x160)][_0x3ab04b(0x182)]||_0x23f1f4[_0x3ab04b(0x160)]['name'],_0x16a236=_0x23f1f4['attributes'][_0x3ab04b(0x166)]['find'](_0x296a78=>String(_0x296a78['id'])===String(_0x3a2ac8)),_0x5aeaad=_0x16a236?.['name']||_0x3a2ac8,_0xd177bf={'journeyName':_0x1f0c4a,'stageName':_0x5aeaad};return _0x4b0d02[_0x3ab04b(0x195)](_0x22c681,_0xd177bf),_0xd177bf;}export function formatApiJourneyName(_0x5cb814,_0x3d6529){return _0x3d6529+'\x20('+_0x5cb814+')';}export function isLocalJourneyRef(_0xe364b9){const _0x295657=a105_0x3fc7;return _0xe364b9['endsWith']('.yml')||_0xe364b9[_0x295657(0x170)](_0x295657(0x193));}export function buildLocalRuleToNameMapping(_0x159301){const _0x3801b3=a105_0x3fc7,_0x56f749=new Map();if(!_0x159301)return _0x56f749;for(const [_0x4937f7,_0x57324d]of Object[_0x3801b3(0x19a)](_0x159301)){if(_0x57324d[_0x3801b3(0x15f)]){const _0x4a569a=serializeRule(_0x57324d['rule']),_0x22ced6=_0x56f749[_0x3801b3(0x16e)](_0x4a569a)||[];_0x22ced6[_0x3801b3(0x189)](_0x4937f7),_0x56f749[_0x3801b3(0x195)](_0x4a569a,_0x22ced6);}}return _0x56f749;}export function buildLocalRuleToNameMappingFromJourney(_0xc5c20e){const _0x3ea8ab=a105_0x3fc7,_0x31dd17=_0xc5c20e[_0x3ea8ab(0x16b)];if(!_0x31dd17)return new Map();const _0x3f52c0=collectSegmentUsageCounts(_0xc5c20e),_0xa1dd98=new Map();let _0x330e4c=0x0;for(const [_0x2cde3b,_0x2f61de]of Object['entries'](_0x31dd17)){if(!_0x2f61de[_0x3ea8ab(0x15f)]){_0x330e4c++;continue;}const _0x239b31=serializeRule(_0x2f61de[_0x3ea8ab(0x15f)]),_0x2aae90=_0xa1dd98['get'](_0x239b31)||[];_0x2aae90[_0x3ea8ab(0x189)]({'name':_0x2cde3b,'index':_0x330e4c}),_0xa1dd98[_0x3ea8ab(0x195)](_0x239b31,_0x2aae90),_0x330e4c++;}const _0x1d254b=new Map();for(const [_0x272ab5,_0x6de06f]of _0xa1dd98){const _0x32b4ac=_0x6de06f[_0x3ea8ab(0x17c)]()[_0x3ea8ab(0x16a)]((_0x2475c1,_0x19a100)=>{const _0x2e36df=_0x3ea8ab,_0x332f61=_0x3f52c0[_0x2e36df(0x16e)](_0x2475c1['name'])||0x0,_0x4c7e03=_0x3f52c0['get'](_0x19a100[_0x2e36df(0x17b)])||0x0;if(_0x332f61!==_0x4c7e03)return _0x4c7e03-_0x332f61;return _0x2475c1['index']-_0x19a100[_0x2e36df(0x197)];})[_0x3ea8ab(0x15c)](_0x409f41=>_0x409f41['name']);_0x1d254b[_0x3ea8ab(0x195)](_0x272ab5,_0x32b4ac);}return _0x1d254b;}export function collectSegmentUsageCounts(_0xd94beb){const _0x91ca71=a105_0x3fc7,_0xf8b944=new Map(),_0x518e66=_0x1d5fea=>{const _0x278506=a105_0x3fc7;if(!_0x1d5fea)return;_0xf8b944[_0x278506(0x195)](_0x1d5fea,(_0xf8b944['get'](_0x1d5fea)||0x0)+0x1);},_0x112a27=_0x2fe812=>{const _0x2391e3=a105_0x3fc7;for(const _0x1e15ad of _0x2fe812){_0x518e66(_0x1e15ad['entry_criteria']?.['segment']);if(_0x1e15ad[_0x2391e3(0x1a1)])for(const _0x157429 of _0x1e15ad[_0x2391e3(0x1a1)]){_0x518e66(_0x157429[_0x2391e3(0x172)]);}_0x518e66(_0x1e15ad[_0x2391e3(0x18e)]?.[_0x2391e3(0x172)]);if(_0x1e15ad[_0x2391e3(0x1a3)])for(const _0x29229a of _0x1e15ad[_0x2391e3(0x1a3)]){if(_0x29229a['type']===_0x2391e3(0x194))for(const _0x55ddf5 of _0x29229a[_0x2391e3(0x188)][_0x2391e3(0x158)]){_0x518e66(_0x55ddf5[_0x2391e3(0x172)]);}else _0x29229a[_0x2391e3(0x187)]===_0x2391e3(0x183)&&_0x518e66(_0x29229a[_0x2391e3(0x188)][_0x2391e3(0x191)]?.[_0x2391e3(0x172)]);}}};_0x518e66(_0xd94beb[_0x91ca71(0x18b)]?.[_0x91ca71(0x172)]);if(_0xd94beb[_0x91ca71(0x184)])for(const _0x25c060 of _0xd94beb[_0x91ca71(0x184)]){_0x518e66(_0x25c060[_0x91ca71(0x18b)]?.[_0x91ca71(0x172)]),_0x112a27(_0x25c060[_0x91ca71(0x19c)]);}_0xd94beb[_0x91ca71(0x19c)]&&_0x112a27(_0xd94beb[_0x91ca71(0x19c)]);if(_0xd94beb[_0x91ca71(0x162)])for(const _0x3d9a20 of _0xd94beb['versions']){_0x112a27(_0x3d9a20[_0x91ca71(0x19c)]);}return _0xf8b944;}