@lovrabet/rabetbase-cli 2.4.4-beta.1 → 2.4.5-beta.1

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 (330) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.d.ts +1 -0
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/{permit/index.d.ts → dataset/business-groups.d.ts} +1 -1
  63. package/lib/commands/dataset/business-groups.js +1 -0
  64. package/lib/commands/dataset/capability.js +1 -1
  65. package/lib/commands/dataset/delete.js +1 -1
  66. package/lib/commands/dataset/detail.js +1 -1
  67. package/lib/commands/dataset/extend-update.js +1 -1
  68. package/lib/commands/dataset/field-update.js +1 -1
  69. package/lib/commands/dataset/generate.js +1 -1
  70. package/lib/commands/dataset/index.js +1 -1
  71. package/lib/commands/dataset/list.js +1 -1
  72. package/lib/commands/dataset/operations.js +1 -1
  73. package/lib/commands/dataset/relation-audit.js +1 -1
  74. package/lib/commands/dataset/relation-create.js +1 -1
  75. package/lib/commands/dataset/relation-delete.js +1 -1
  76. package/lib/commands/dataset/relation-shared.js +1 -1
  77. package/lib/commands/dataset/relation-update.js +1 -1
  78. package/lib/commands/dataset/relations.js +1 -1
  79. package/lib/commands/dataset/rename.js +1 -1
  80. package/lib/commands/dataset/restore.js +1 -1
  81. package/lib/commands/db/analysis-batching.js +1 -1
  82. package/lib/commands/db/analyze-batch-plan.js +1 -1
  83. package/lib/commands/db/analyze-cancel.js +1 -1
  84. package/lib/commands/db/analyze-start.js +1 -1
  85. package/lib/commands/db/analyze-status.js +1 -1
  86. package/lib/commands/db/create.js +1 -1
  87. package/lib/commands/db/delete.js +1 -1
  88. package/lib/commands/db/detail.js +1 -1
  89. package/lib/commands/db/diff-refresh-start.js +1 -1
  90. package/lib/commands/db/diff-refresh-status.js +1 -1
  91. package/lib/commands/db/diff.js +1 -1
  92. package/lib/commands/db/index.js +1 -1
  93. package/lib/commands/db/list.js +1 -1
  94. package/lib/commands/db/shared.d.ts +15 -1
  95. package/lib/commands/db/shared.js +1 -1
  96. package/lib/commands/db/tables.js +1 -1
  97. package/lib/commands/db/test.js +1 -1
  98. package/lib/commands/db/update.js +1 -1
  99. package/lib/commands/doctor.js +1 -1
  100. package/lib/commands/file/index.js +1 -1
  101. package/lib/commands/init/index.js +1 -1
  102. package/lib/commands/issue/index.js +1 -1
  103. package/lib/commands/issue/nudge.js +1 -1
  104. package/lib/commands/issue/report.js +1 -1
  105. package/lib/commands/issue/shared.js +1 -1
  106. package/lib/commands/kb/create.js +1 -1
  107. package/lib/commands/kb/delete.js +1 -1
  108. package/lib/commands/kb/detail.js +1 -1
  109. package/lib/commands/kb/index.js +1 -1
  110. package/lib/commands/kb/list.js +1 -1
  111. package/lib/commands/kb/shared.js +1 -1
  112. package/lib/commands/kb/update.js +1 -1
  113. package/lib/commands/logs/index.js +1 -1
  114. package/lib/commands/menu/asset-update.js +1 -1
  115. package/lib/commands/menu/delete.js +1 -1
  116. package/lib/commands/menu/external-link-create.js +1 -1
  117. package/lib/commands/menu/external-link-update.js +1 -1
  118. package/lib/commands/menu/group-create.js +1 -1
  119. package/lib/commands/menu/group-update.js +1 -1
  120. package/lib/commands/menu/index.js +1 -1
  121. package/lib/commands/menu/list.js +1 -1
  122. package/lib/commands/menu/move.js +1 -1
  123. package/lib/commands/menu/regroup-start.js +1 -1
  124. package/lib/commands/menu/rename.js +1 -1
  125. package/lib/commands/menu/shared/compare-table.js +1 -1
  126. package/lib/commands/menu/shared/delete-plan.js +1 -1
  127. package/lib/commands/menu/shared/facts.js +1 -1
  128. package/lib/commands/menu/shared/index.js +1 -1
  129. package/lib/commands/menu/shared/inquirer.js +1 -1
  130. package/lib/commands/menu/shared/local-pages.js +1 -1
  131. package/lib/commands/menu/shared/logic.js +1 -1
  132. package/lib/commands/menu/shared/mutations.js +1 -1
  133. package/lib/commands/menu/shared/service.js +1 -1
  134. package/lib/commands/menu/shared/sync-core.js +1 -1
  135. package/lib/commands/menu/shared/update-core.js +1 -1
  136. package/lib/commands/menu/shared/valid-url.js +1 -1
  137. package/lib/commands/menu/sync.js +1 -1
  138. package/lib/commands/notification/config-create.js +1 -1
  139. package/lib/commands/notification/config-delete.js +1 -1
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.js +1 -1
  142. package/lib/commands/notification/index.js +1 -1
  143. package/lib/commands/notification/shared.js +1 -1
  144. package/lib/commands/ocr/index.js +1 -1
  145. package/lib/commands/page/generate-start.js +1 -1
  146. package/lib/commands/page/generate-status.js +1 -1
  147. package/lib/commands/page/index.js +1 -1
  148. package/lib/commands/page/pull.js +1 -1
  149. package/lib/commands/page/push.js +1 -1
  150. package/lib/commands/page/react/create.js +1 -1
  151. package/lib/commands/page/react/detail.js +1 -1
  152. package/lib/commands/page/react/list.js +1 -1
  153. package/lib/commands/page/react/publish.js +1 -1
  154. package/lib/commands/page/react/shared.js +1 -1
  155. package/lib/commands/page/react/syntax.js +1 -1
  156. package/lib/commands/page/react/template.js +1 -1
  157. package/lib/commands/page/react/update.js +1 -1
  158. package/lib/commands/page/relation-audit.js +1 -1
  159. package/lib/commands/page/restore.js +1 -1
  160. package/lib/commands/page/shared.js +1 -1
  161. package/lib/commands/page/standard-page-status.js +1 -1
  162. package/lib/commands/page/sync.js +1 -1
  163. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  164. package/lib/commands/project/create/format-elapsed.js +1 -1
  165. package/lib/commands/project/create/main.js +1 -1
  166. package/lib/commands/project/create/materialize-project-template.js +1 -1
  167. package/lib/commands/project/create/project-name.js +1 -1
  168. package/lib/commands/project/create/project-template-archive.js +1 -1
  169. package/lib/commands/project/create/project-template-path.js +1 -1
  170. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  171. package/lib/commands/project/create/use-format-code.js +1 -1
  172. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  173. package/lib/commands/project/index.js +1 -1
  174. package/lib/commands/project/upgrade.js +1 -1
  175. package/lib/commands/registry.js +1 -1
  176. package/lib/commands/role/delete.js +1 -1
  177. package/lib/commands/role/detail.js +1 -1
  178. package/lib/commands/role/index.js +1 -1
  179. package/lib/commands/role/list.js +1 -1
  180. package/lib/commands/role/shared.d.ts +15 -17
  181. package/lib/commands/role/shared.js +1 -1
  182. package/lib/commands/role/update.js +1 -1
  183. package/lib/commands/role/user-add.js +1 -1
  184. package/lib/commands/role/user-remove.js +1 -1
  185. package/lib/commands/role/user-resolve.js +1 -1
  186. package/lib/commands/run/index.js +1 -1
  187. package/lib/commands/schema.js +1 -1
  188. package/lib/commands/sql/create.js +1 -1
  189. package/lib/commands/sql/delete.js +1 -1
  190. package/lib/commands/sql/detail.js +1 -1
  191. package/lib/commands/sql/exec.js +1 -1
  192. package/lib/commands/sql/index.js +1 -1
  193. package/lib/commands/sql/list.js +1 -1
  194. package/lib/commands/sql/pull.js +1 -1
  195. package/lib/commands/sql/push.js +1 -1
  196. package/lib/commands/sql/shared.js +1 -1
  197. package/lib/commands/sql/status.js +1 -1
  198. package/lib/commands/sql/validate.js +1 -1
  199. package/lib/commands/task/index.js +1 -1
  200. package/lib/commands/task/status.js +1 -1
  201. package/lib/commands/tenant/index.js +1 -1
  202. package/lib/commands/tenant/members-list.js +1 -1
  203. package/lib/commands/tenant/shared.js +1 -1
  204. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  205. package/lib/commands/user-account/index.js +1 -1
  206. package/lib/commands/workspace/add.js +1 -1
  207. package/lib/commands/workspace/index.js +1 -1
  208. package/lib/commands/workspace/remove.js +1 -1
  209. package/lib/config/schema.js +1 -1
  210. package/lib/constant/cdn.js +1 -1
  211. package/lib/constant/cli.js +1 -1
  212. package/lib/constant/defaults.js +1 -1
  213. package/lib/constant/domain.js +1 -1
  214. package/lib/constant/env.js +1 -1
  215. package/lib/constant/output.js +1 -1
  216. package/lib/constant/paths.js +1 -1
  217. package/lib/constant/risk.js +1 -1
  218. package/lib/context/app-resolver.js +1 -1
  219. package/lib/context/auth-resolver.js +1 -1
  220. package/lib/context/config-loader.js +1 -1
  221. package/lib/context.js +1 -1
  222. package/lib/core/alias-resolver.js +1 -1
  223. package/lib/core/api-client.d.ts +70 -79
  224. package/lib/core/api-client.js +1 -1
  225. package/lib/core/bff/config.js +1 -1
  226. package/lib/core/bff/file-system.d.ts +1 -0
  227. package/lib/core/bff/file-system.js +1 -1
  228. package/lib/core/bff/hash.js +1 -1
  229. package/lib/core/bff/lock.js +1 -1
  230. package/lib/core/bff/utils.js +1 -1
  231. package/lib/core/db-resolver.js +1 -1
  232. package/lib/core/page/file-system.js +1 -1
  233. package/lib/core/page/hash.js +1 -1
  234. package/lib/core/page/lock.js +1 -1
  235. package/lib/core/sql-index-auditor.js +1 -1
  236. package/lib/core/sql-sync/config.js +1 -1
  237. package/lib/core/sql-sync/file-system.js +1 -1
  238. package/lib/core/sql-sync/hash.js +1 -1
  239. package/lib/core/sql-sync/lock.js +1 -1
  240. package/lib/core/sql-sync/utils.js +1 -1
  241. package/lib/core/sql-validator.js +1 -1
  242. package/lib/errors.js +1 -1
  243. package/lib/framework/build-all-flags.js +1 -1
  244. package/lib/framework/error-output.js +1 -1
  245. package/lib/framework/explicit-yes.js +1 -1
  246. package/lib/framework/flags.js +1 -1
  247. package/lib/framework/help.js +1 -1
  248. package/lib/framework/index.js +1 -1
  249. package/lib/framework/output.js +1 -1
  250. package/lib/framework/response.js +1 -1
  251. package/lib/framework/runner-alias.js +1 -1
  252. package/lib/framework/runner.js +1 -1
  253. package/lib/framework/schema-export.js +1 -1
  254. package/lib/framework/types.js +1 -1
  255. package/lib/generated/build-info.d.ts +4 -4
  256. package/lib/generated/build-info.js +1 -1
  257. package/lib/help.js +1 -1
  258. package/lib/postinstall.js +1 -1
  259. package/lib/runtime/confirmation.js +1 -1
  260. package/lib/runtime/event.js +1 -1
  261. package/lib/runtime/index.js +1 -1
  262. package/lib/runtime/queue.js +1 -1
  263. package/lib/runtime/resolve.js +1 -1
  264. package/lib/skills/builtin-skill.js +1 -1
  265. package/lib/skills/main.js +1 -1
  266. package/lib/skills/npx-skills-add.js +1 -1
  267. package/lib/skills/skill-presence.js +1 -1
  268. package/lib/telemetry/cli-command-trace.js +1 -1
  269. package/lib/telemetry/cli-help-trace.js +1 -1
  270. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  271. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  272. package/lib/telemetry/send-cli-trace-log.js +1 -1
  273. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  274. package/lib/utils/ai_config.js +1 -1
  275. package/lib/utils/apply-jq-filter.js +1 -1
  276. package/lib/utils/cdn-config.js +1 -1
  277. package/lib/utils/check-sdk-version.js +1 -1
  278. package/lib/utils/cli-version-check.js +1 -1
  279. package/lib/utils/cli-version-policy.js +1 -1
  280. package/lib/utils/config.js +1 -1
  281. package/lib/utils/entity-with-id.js +1 -1
  282. package/lib/utils/file-utils.js +1 -1
  283. package/lib/utils/guides-cdn.js +1 -1
  284. package/lib/utils/http-client.js +1 -1
  285. package/lib/utils/is-non-interactive.js +1 -1
  286. package/lib/utils/logger.js +1 -1
  287. package/lib/utils/params.js +1 -1
  288. package/lib/utils/platform.js +1 -1
  289. package/lib/utils/rules-cdn.js +1 -1
  290. package/lib/utils/sleep.js +1 -1
  291. package/lib/utils/template-replacer.js +1 -1
  292. package/lib/utils/update-notice.js +1 -1
  293. package/lib/utils/version.js +1 -1
  294. package/lib/utils/with-active-cookie.js +1 -1
  295. package/lib/utils/write-cli-side-channel.js +1 -1
  296. package/package.json +1 -1
  297. package/skills/rabetbase/SKILL.md +18 -24
  298. package/skills/rabetbase/guides/database-connection-workflow.md +6 -2
  299. package/skills/rabetbase/references/rabetbase-dataset-business-groups.md +28 -0
  300. package/skills/rabetbase/references/rabetbase-dataset-delete.md +7 -5
  301. package/skills/rabetbase/references/rabetbase-dataset-list.md +6 -6
  302. package/skills/rabetbase/references/rabetbase-dataset-restore.md +5 -5
  303. package/skills/rabetbase/references/rabetbase-db-create.md +3 -0
  304. package/skills/rabetbase/references/rabetbase-db-delete.md +10 -2
  305. package/skills/rabetbase/references/rabetbase-db-detail.md +2 -0
  306. package/skills/rabetbase/references/rabetbase-db-list.md +3 -2
  307. package/skills/rabetbase/references/rabetbase-db-update.md +4 -2
  308. package/skills/rabetbase/references/rabetbase-role-list.md +9 -17
  309. package/skills/rabetbase/references/rabetbase-role-user-add.md +44 -16
  310. package/skills/rabetbase/references/rabetbase-role-user-resolve.md +2 -2
  311. package/skills/rabetbase.manifest.json +4 -7
  312. package/lib/commands/permit/index.js +0 -1
  313. package/lib/commands/permit/page-get.d.ts +0 -2
  314. package/lib/commands/permit/page-get.js +0 -1
  315. package/lib/commands/permit/page-set.d.ts +0 -2
  316. package/lib/commands/permit/page-set.js +0 -1
  317. package/lib/commands/permit/role-apis-set.d.ts +0 -2
  318. package/lib/commands/permit/role-apis-set.js +0 -1
  319. package/lib/commands/permit/role-menus-set.d.ts +0 -2
  320. package/lib/commands/permit/role-menus-set.js +0 -1
  321. package/lib/commands/permit/role-menus.d.ts +0 -2
  322. package/lib/commands/permit/role-menus.js +0 -1
  323. package/lib/commands/permit/shared.d.ts +0 -74
  324. package/lib/commands/permit/shared.js +0 -1
  325. package/lib/commands/role/create.d.ts +0 -2
  326. package/lib/commands/role/create.js +0 -1
  327. package/skills/rabetbase/guides/role-permit-workflow.md +0 -127
  328. package/skills/rabetbase/references/rabetbase-permit-page-set.md +0 -69
  329. package/skills/rabetbase/references/rabetbase-permit-role-apis-set.md +0 -53
  330. package/skills/rabetbase/references/rabetbase-permit-role-menus-set.md +0 -57
@@ -1 +1 @@
1
- const a129_0x5af3f7=a129_0x1b45;function a129_0x1b45(_0x5e5713,_0x3195a2){_0x5e5713=_0x5e5713-0x92;const _0x300f29=a129_0x300f();let _0x1b450a=_0x300f29[_0x5e5713];return _0x1b450a;}(function(_0x3492d9,_0x4beba4){const _0xb87243=a129_0x1b45,_0x30bfef=_0x3492d9();while(!![]){try{const _0x3f0ff8=parseInt(_0xb87243(0xa0))/0x1+parseInt(_0xb87243(0xb7))/0x2+parseInt(_0xb87243(0xb2))/0x3+parseInt(_0xb87243(0xa6))/0x4*(parseInt(_0xb87243(0xb9))/0x5)+-parseInt(_0xb87243(0xa8))/0x6*(-parseInt(_0xb87243(0xba))/0x7)+parseInt(_0xb87243(0xb6))/0x8*(parseInt(_0xb87243(0xa1))/0x9)+-parseInt(_0xb87243(0xa9))/0xa;if(_0x3f0ff8===_0x4beba4)break;else _0x30bfef['push'](_0x30bfef['shift']());}catch(_0x5aa597){_0x30bfef['push'](_0x30bfef['shift']());}}}(a129_0x300f,0x66bd9));function a129_0x300f(){const _0x9de5c0=['trim','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','603088ISBFHD','1314184GlzPNp','pages','115ypfXgz','21EOIBAP','Invalid\x20--params:\x20','length','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','get','push','filter','join','has','CSS\x20URL\x20is\x20unreachable:\x20','jsUrl','--params.','dryRun','Invalid\x20--params\x20JSON.','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','isArray','JS\x20URL\x20is\x20unreachable:\x20','cssUrl',':\x20expected\x20a\x20non-empty\x20string.','menu-sync','671102UYMTlI','63hJFnHd','keys','map','string','import','132316kuyBkB','Invalid\x20--params\x20fields:\x20','616386nsvRFJ','27403610QUhdle','info','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','label','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','setLogPath','No\x20local\x20pages\x20matched\x20paths:\x20','path','parse','708840myrjvG','hasOwn'];a129_0x300f=function(){return _0x9de5c0;};return a129_0x300f();}import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a129_0x5af3f7(0x96),a129_0x5af3f7(0x9d)]);function validateParams(_0x4374bf){const _0xf19e9b=a129_0x5af3f7,_0x2fae26=[];return _0x4374bf[_0xf19e9b(0x96)]&&!isValidJsHttpsUrl(_0x4374bf[_0xf19e9b(0x96)])&&_0x2fae26[_0xf19e9b(0xbf)]({'field':_0xf19e9b(0x96),'message':_0xf19e9b(0xad)}),_0x4374bf['cssUrl']&&!isValidCssHttpsUrl(_0x4374bf[_0xf19e9b(0x9d)])&&_0x2fae26[_0xf19e9b(0xbf)]({'field':_0xf19e9b(0x9d),'message':_0xf19e9b(0xab)}),_0x2fae26;}export async function runMenuSyncCore(_0x43c5fd,_0x46dd63,_0x4a2dd0=[],_0x14feca,_0x21139c={}){const _0xc2f13b=a129_0x5af3f7,_0x3f373c=parseMenuSyncParams(_0x14feca),_0x4b20fc=[...new Set(_0x4a2dd0[_0xc2f13b(0xa3)](_0x42c411=>_0x42c411['trim']())[_0xc2f13b(0x92)](Boolean))],_0x2870f6=_0x3f373c[_0xc2f13b(0x96)],_0x2ccf11=_0x3f373c['cssUrl'],_0x5ceb93=[];if(_0x2870f6)_0x5ceb93[_0xc2f13b(0xbf)](_0x2870f6);if(_0x2ccf11)_0x5ceb93[_0xc2f13b(0xbf)](_0x2ccf11);const _0x52578b=validateParams(_0x3f373c);if(_0x52578b[_0xc2f13b(0xbc)]>0x0){const _0x26e526=_0x52578b[_0xc2f13b(0xa3)](_0x5def1e=>_0xc2f13b(0x97)+_0x5def1e['field']+':\x20'+_0x5def1e['message'])[_0xc2f13b(0x93)](';\x20');throw new Error(_0xc2f13b(0xbb)+_0x26e526);}logger[_0xc2f13b(0xae)](process['cwd']()),logger['info'](_0xc2f13b(0x9f),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x43c5fd,'selectedCount':_0x4b20fc[_0xc2f13b(0xbc)],'jsUrl':_0x2870f6,'cssUrl':_0x2ccf11});if(_0x2870f6){const _0x55aca9=await isUrlReachable(_0x2870f6);if(!_0x55aca9)throw new Error(_0xc2f13b(0x9c)+_0x2870f6);}if(_0x2ccf11){const _0x37b12a=await isUrlReachable(_0x2ccf11);if(!_0x37b12a)throw new Error(_0xc2f13b(0x95)+_0x2ccf11);}const _0x18ab45=getLocalPages();if(_0x18ab45[_0xc2f13b(0xbc)]===0x0){if(_0x4b20fc[_0xc2f13b(0xbc)]>0x0)throw new Error(_0xc2f13b(0xaf)+_0x4b20fc[_0xc2f13b(0x93)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x21139c['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x3f33cd=await getOnlineMenuList(_0x43c5fd,_0x46dd63),_0x1cdb3a=new Set(_0x3f33cd['map'](_0x5cfdff=>_0x5cfdff[_0xc2f13b(0xb0)]));let _0x5e9790;if(_0x4b20fc[_0xc2f13b(0xbc)]>0x0){const _0x435422=new Map(_0x18ab45[_0xc2f13b(0xa3)](_0x5e84ed=>[_0x5e84ed[_0xc2f13b(0xb0)],_0x5e84ed])),_0x7f7269=_0x4b20fc[_0xc2f13b(0x92)](_0x1ef16a=>!_0x435422[_0xc2f13b(0x94)](_0x1ef16a));if(_0x7f7269[_0xc2f13b(0xbc)]>0x0){const _0x34335f=_0x18ab45[_0xc2f13b(0xa3)](_0x1a928a=>_0x1a928a[_0xc2f13b(0xb0)])[_0xc2f13b(0x93)](',\x20');throw new Error(_0xc2f13b(0xaf)+_0x7f7269[_0xc2f13b(0x93)](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x34335f);}const _0x2ae071=_0x4b20fc[_0xc2f13b(0x92)](_0x2a881f=>_0x1cdb3a[_0xc2f13b(0x94)](_0x2a881f));if(_0x2ae071[_0xc2f13b(0xbc)]>0x0)throw new Error(_0xc2f13b(0x9a)+_0x2ae071['join'](',\x20'));_0x5e9790=_0x4b20fc[_0xc2f13b(0xa3)](_0x51c1d7=>_0x435422[_0xc2f13b(0xbe)](_0x51c1d7));}else _0x5e9790=_0x18ab45['filter'](_0x5c1f18=>!_0x1cdb3a[_0xc2f13b(0x94)](_0x5c1f18[_0xc2f13b(0xb0)]));if(_0x5e9790[_0xc2f13b(0xbc)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x21139c[_0xc2f13b(0x98)]===!![],'targetPages':[],'plannedMenus':[]};const _0x1f07b2=_0x5e9790[_0xc2f13b(0xa3)](_0xfb391=>({'type':'procode','path':_0xfb391['path'],'label':_0xfb391[_0xc2f13b(0xac)],'loadScriptMode':_0xc2f13b(0xa5),'resources':[..._0x5ceb93]}));if(_0x21139c[_0xc2f13b(0x98)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x5e9790,'plannedMenus':_0x1f07b2};const _0x340a3d=await createMenus(_0x43c5fd,_0x46dd63,_0x5e9790,_0x5ceb93[_0xc2f13b(0xbc)]>0x0?_0x5ceb93:undefined);return logger[_0xc2f13b(0xaa)](_0xc2f13b(0x9f),'Menu\x20sync\x20completed',{'count':_0x5e9790[_0xc2f13b(0xbc)],'resources':_0x5ceb93}),{'created':_0x340a3d['length'],'skipped':![],'dryRun':![],'targetPages':_0x5e9790,'plannedMenus':_0x1f07b2,'menus':_0x340a3d};}export function parseMenuSyncParams(_0x556fc6){const _0x22d72f=a129_0x5af3f7;if(!_0x556fc6||typeof _0x556fc6!==_0x22d72f(0xa4))return{};let _0x575167;try{_0x575167=JSON[_0x22d72f(0xb1)](_0x556fc6);}catch{throw new Error(_0x22d72f(0x99));}if(typeof _0x575167!=='object'||_0x575167===null||Array[_0x22d72f(0x9b)](_0x575167))throw new Error(_0x22d72f(0xb5));const _0x5f4b7c=_0x575167;if(Object[_0x22d72f(0xb3)](_0x5f4b7c,_0x22d72f(0xb8)))throw new Error(_0x22d72f(0xbd));const _0xad2c4=Object[_0x22d72f(0xa2)](_0x5f4b7c)[_0x22d72f(0x92)](_0x2c3ba0=>!MENU_SYNC_PARAM_KEYS[_0x22d72f(0x94)](_0x2c3ba0));if(_0xad2c4[_0x22d72f(0xbc)]>0x0)throw new Error(_0x22d72f(0xa7)+_0xad2c4[_0x22d72f(0x93)](',\x20')+'.');for(const _0x258182 of MENU_SYNC_PARAM_KEYS){const _0x5b82f0=_0x5f4b7c[_0x258182];if(_0x5b82f0!==undefined&&(typeof _0x5b82f0!==_0x22d72f(0xa4)||_0x5b82f0[_0x22d72f(0xb4)]()===''))throw new Error('Invalid\x20--params.'+_0x258182+_0x22d72f(0x9e));}return{'jsUrl':typeof _0x5f4b7c[_0x22d72f(0x96)]===_0x22d72f(0xa4)?_0x5f4b7c[_0x22d72f(0x96)][_0x22d72f(0xb4)]():undefined,'cssUrl':typeof _0x5f4b7c['cssUrl']===_0x22d72f(0xa4)?_0x5f4b7c['cssUrl'][_0x22d72f(0xb4)]():undefined};}
1
+ const a130_0x48f8a8=a130_0x418c;(function(_0x2ac14a,_0x45c4ce){const _0xf75e5e=a130_0x418c,_0x14c70c=_0x2ac14a();while(!![]){try{const _0x4596b5=-parseInt(_0xf75e5e(0xb0))/0x1*(parseInt(_0xf75e5e(0xda))/0x2)+-parseInt(_0xf75e5e(0xd1))/0x3+parseInt(_0xf75e5e(0xd2))/0x4*(parseInt(_0xf75e5e(0xca))/0x5)+parseInt(_0xf75e5e(0xb6))/0x6+-parseInt(_0xf75e5e(0xc5))/0x7*(parseInt(_0xf75e5e(0xb2))/0x8)+parseInt(_0xf75e5e(0xad))/0x9*(-parseInt(_0xf75e5e(0xc0))/0xa)+parseInt(_0xf75e5e(0xc2))/0xb*(parseInt(_0xf75e5e(0xbf))/0xc);if(_0x4596b5===_0x45c4ce)break;else _0x14c70c['push'](_0x14c70c['shift']());}catch(_0x3a0ce2){_0x14c70c['push'](_0x14c70c['shift']());}}}(a130_0x493d,0x20428));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a130_0x493d(){const _0x3636ab=['procode','isArray','1774854lwxhou','label','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','1SrINeE','menu-sync','128HaSiZj','dryRun','Invalid\x20--params.','info','835620DPJHSW','has','map','join','push','Start\x20non-interactive\x20menu\x20sync','keys','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','filter','271056MnPnGJ','10awdvPv','pages','253EJIVUH','CSS\x20URL\x20is\x20unreachable:\x20','jsUrl','81683tQeWxQ','parse',':\x20expected\x20a\x20non-empty\x20string.','No\x20local\x20pages\x20matched\x20paths:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','1099345WfOfBZ','hasOwn','path','Invalid\x20--params:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','cssUrl','--params.','466248pYstvD','4wHBZLQ','get','JS\x20URL\x20is\x20unreachable:\x20','cwd','object','Menu\x20sync\x20completed','string','field','414402EmDRZY','trim','message','length'];a130_0x493d=function(){return _0x3636ab;};return a130_0x493d();}import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a130_0x48f8a8(0xc4),a130_0x48f8a8(0xcf)]);function validateParams(_0x5025d5){const _0x1f71ff=a130_0x48f8a8,_0x507c47=[];return _0x5025d5['jsUrl']&&!isValidJsHttpsUrl(_0x5025d5[_0x1f71ff(0xc4)])&&_0x507c47['push']({'field':_0x1f71ff(0xc4),'message':_0x1f71ff(0xc9)}),_0x5025d5[_0x1f71ff(0xcf)]&&!isValidCssHttpsUrl(_0x5025d5[_0x1f71ff(0xcf)])&&_0x507c47[_0x1f71ff(0xba)]({'field':_0x1f71ff(0xcf),'message':_0x1f71ff(0xce)}),_0x507c47;}function a130_0x418c(_0x324050,_0x989a1e){_0x324050=_0x324050-0xa8;const _0x493d95=a130_0x493d();let _0x418c47=_0x493d95[_0x324050];return _0x418c47;}export async function runMenuSyncCore(_0x486c96,_0x40e5c9,_0xa98a44=[],_0x17e916,_0x20f2ab={}){const _0x119d4b=a130_0x48f8a8,_0x5b79c0=parseMenuSyncParams(_0x17e916),_0x76586a=[...new Set(_0xa98a44[_0x119d4b(0xb8)](_0x55a482=>_0x55a482[_0x119d4b(0xa8)]())[_0x119d4b(0xbe)](Boolean))],_0x12052a=_0x5b79c0[_0x119d4b(0xc4)],_0x229b16=_0x5b79c0[_0x119d4b(0xcf)],_0x462970=[];if(_0x12052a)_0x462970['push'](_0x12052a);if(_0x229b16)_0x462970['push'](_0x229b16);const _0x5a9a60=validateParams(_0x5b79c0);if(_0x5a9a60['length']>0x0){const _0x4419c3=_0x5a9a60[_0x119d4b(0xb8)](_0x1d666f=>_0x119d4b(0xd0)+_0x1d666f[_0x119d4b(0xd9)]+':\x20'+_0x1d666f[_0x119d4b(0xa9)])[_0x119d4b(0xb9)](';\x20');throw new Error(_0x119d4b(0xcd)+_0x4419c3);}logger['setLogPath'](process[_0x119d4b(0xd5)]()),logger[_0x119d4b(0xb5)](_0x119d4b(0xb1),_0x119d4b(0xbb),{'appCode':_0x486c96,'selectedCount':_0x76586a['length'],'jsUrl':_0x12052a,'cssUrl':_0x229b16});if(_0x12052a){const _0x26cbd5=await isUrlReachable(_0x12052a);if(!_0x26cbd5)throw new Error(_0x119d4b(0xd4)+_0x12052a);}if(_0x229b16){const _0x5aedd1=await isUrlReachable(_0x229b16);if(!_0x5aedd1)throw new Error(_0x119d4b(0xc3)+_0x229b16);}const _0x4747bc=getLocalPages();if(_0x4747bc[_0x119d4b(0xaa)]===0x0){if(_0x76586a[_0x119d4b(0xaa)]>0x0)throw new Error(_0x119d4b(0xc8)+_0x76586a['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x20f2ab['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x3b26a0=await getOnlineMenuList(_0x486c96,_0x40e5c9),_0x5443bf=new Set(_0x3b26a0[_0x119d4b(0xb8)](_0x5256eb=>_0x5256eb[_0x119d4b(0xcc)]));let _0x9b2bac;if(_0x76586a[_0x119d4b(0xaa)]>0x0){const _0x525cc2=new Map(_0x4747bc[_0x119d4b(0xb8)](_0x359280=>[_0x359280['path'],_0x359280])),_0x5734c4=_0x76586a['filter'](_0x22c91e=>!_0x525cc2['has'](_0x22c91e));if(_0x5734c4['length']>0x0){const _0x9aec55=_0x4747bc[_0x119d4b(0xb8)](_0x256fcf=>_0x256fcf[_0x119d4b(0xcc)])['join'](',\x20');throw new Error(_0x119d4b(0xc8)+_0x5734c4[_0x119d4b(0xb9)](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x9aec55);}const _0x57faed=_0x76586a[_0x119d4b(0xbe)](_0x382bdb=>_0x5443bf[_0x119d4b(0xb7)](_0x382bdb));if(_0x57faed['length']>0x0)throw new Error(_0x119d4b(0xaf)+_0x57faed['join'](',\x20'));_0x9b2bac=_0x76586a['map'](_0x3e2162=>_0x525cc2[_0x119d4b(0xd3)](_0x3e2162));}else _0x9b2bac=_0x4747bc['filter'](_0x45105b=>!_0x5443bf[_0x119d4b(0xb7)](_0x45105b['path']));if(_0x9b2bac[_0x119d4b(0xaa)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x20f2ab[_0x119d4b(0xb3)]===!![],'targetPages':[],'plannedMenus':[]};const _0x122af3=_0x9b2bac['map'](_0x332d=>({'type':_0x119d4b(0xab),'path':_0x332d[_0x119d4b(0xcc)],'label':_0x332d[_0x119d4b(0xae)],'loadScriptMode':'import','resources':[..._0x462970]}));if(_0x20f2ab[_0x119d4b(0xb3)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x9b2bac,'plannedMenus':_0x122af3};const _0xb9d72=await createMenus(_0x486c96,_0x40e5c9,_0x9b2bac,_0x462970[_0x119d4b(0xaa)]>0x0?_0x462970:undefined);return logger[_0x119d4b(0xb5)](_0x119d4b(0xb1),_0x119d4b(0xd7),{'count':_0x9b2bac[_0x119d4b(0xaa)],'resources':_0x462970}),{'created':_0xb9d72['length'],'skipped':![],'dryRun':![],'targetPages':_0x9b2bac,'plannedMenus':_0x122af3,'menus':_0xb9d72};}export function parseMenuSyncParams(_0x387e5b){const _0x154aed=a130_0x48f8a8;if(!_0x387e5b||typeof _0x387e5b!==_0x154aed(0xd8))return{};let _0x1b7d93;try{_0x1b7d93=JSON[_0x154aed(0xc6)](_0x387e5b);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x1b7d93!==_0x154aed(0xd6)||_0x1b7d93===null||Array[_0x154aed(0xac)](_0x1b7d93))throw new Error(_0x154aed(0xbd));const _0x301521=_0x1b7d93;if(Object[_0x154aed(0xcb)](_0x301521,_0x154aed(0xc1)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x1d1ef5=Object[_0x154aed(0xbc)](_0x301521)['filter'](_0x45906d=>!MENU_SYNC_PARAM_KEYS[_0x154aed(0xb7)](_0x45906d));if(_0x1d1ef5[_0x154aed(0xaa)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x1d1ef5[_0x154aed(0xb9)](',\x20')+'.');for(const _0xb5a4b3 of MENU_SYNC_PARAM_KEYS){const _0x3af971=_0x301521[_0xb5a4b3];if(_0x3af971!==undefined&&(typeof _0x3af971!==_0x154aed(0xd8)||_0x3af971[_0x154aed(0xa8)]()===''))throw new Error(_0x154aed(0xb4)+_0xb5a4b3+_0x154aed(0xc7));}return{'jsUrl':typeof _0x301521['jsUrl']===_0x154aed(0xd8)?_0x301521[_0x154aed(0xc4)][_0x154aed(0xa8)]():undefined,'cssUrl':typeof _0x301521[_0x154aed(0xcf)]===_0x154aed(0xd8)?_0x301521[_0x154aed(0xcf)][_0x154aed(0xa8)]():undefined};}
@@ -1 +1 @@
1
- (function(_0x1bf7d1,_0x11a2ef){const _0x2a21ab=a131_0xb5de,_0x26f3df=_0x1bf7d1();while(!![]){try{const _0x3a98d2=-parseInt(_0x2a21ab(0x18d))/0x1+-parseInt(_0x2a21ab(0x17a))/0x2*(-parseInt(_0x2a21ab(0x177))/0x3)+parseInt(_0x2a21ab(0x164))/0x4+-parseInt(_0x2a21ab(0x180))/0x5*(parseInt(_0x2a21ab(0x189))/0x6)+parseInt(_0x2a21ab(0x193))/0x7+parseInt(_0x2a21ab(0x165))/0x8*(parseInt(_0x2a21ab(0x17c))/0x9)+-parseInt(_0x2a21ab(0x187))/0xa;if(_0x3a98d2===_0x11a2ef)break;else _0x26f3df['push'](_0x26f3df['shift']());}catch(_0x3bbd1b){_0x26f3df['push'](_0x26f3df['shift']());}}}(a131_0x24e4,0x89052));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a131_0x24e4(){const _0xb9152f=['has','allSettled','menuIds','patch','after','extend','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','.\x20Allowed\x20values:\x20replace,\x20patch','\x20existing\x20JS\x20resources\x20for\x20\x22','Start\x20non-interactive\x20menu\x20asset\x20update','status','paths','resources','\x22\x20(','JS\x20URL\x20is\x20unreachable:\x20','--params.','1233OWQCvY','mode','selection','302QrkuCD','message','45ENFQjO','label','dryRun','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','20YJwHEt','loadScriptMode','filter','trim','.css','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','force','2378580VJvAFz','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','1339836ESKwxw','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','join','menu\x20asset-update\x20cannot\x20patch\x20','601624KmbZhl','Menu\x20asset\x20update\x20completed','map','toLowerCase','all','replace','5571090JzQgPi','cwd','jsUrl','some','Invalid\x20--mode:\x20','string','cssUrl','info','Invalid\x20--params:\x20','parse','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','field','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','rejected','path','length','push','CSS\x20URL\x20is\x20unreachable:\x20','menu-asset-update','setLogPath','split','3120976SYBntC','1049224jCZQrs','fulfilled'];a131_0x24e4=function(){return _0xb9152f;};return a131_0x24e4();}function validateParams(_0x3f7e05){const _0x9a1271=a131_0xb5de,_0x4eb2b7=[];return _0x3f7e05[_0x9a1271(0x195)]&&!isValidJsHttpsUrl(_0x3f7e05[_0x9a1271(0x195)])&&_0x4eb2b7[_0x9a1271(0x15f)]({'field':_0x9a1271(0x195),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x3f7e05[_0x9a1271(0x199)]&&!isValidCssHttpsUrl(_0x3f7e05[_0x9a1271(0x199)])&&_0x4eb2b7[_0x9a1271(0x15f)]({'field':_0x9a1271(0x199),'message':_0x9a1271(0x18a)}),_0x4eb2b7;}export async function runMenuUpdateCore(_0xe2b849,_0x5d4624,_0x2f0bfe,_0x3f9052={}){const _0x51fc6c=a131_0xb5de,_0xa1e67=parseUpdateParamsFlag(_0x2f0bfe),_0xedab56=normalizeMode(_0x3f9052[_0x51fc6c(0x178)]);validateSelection(_0x3f9052['selection']);const _0x32f4a2=[];if(_0xa1e67['jsUrl'])_0x32f4a2[_0x51fc6c(0x15f)](_0xa1e67[_0x51fc6c(0x195)]);if(_0xa1e67['cssUrl'])_0x32f4a2['push'](_0xa1e67[_0x51fc6c(0x199)]);const _0x4ec184=validateParams(_0xa1e67);if(_0x4ec184[_0x51fc6c(0x15e)]>0x0){const _0x4dfc41=_0x4ec184[_0x51fc6c(0x18f)](_0x15718f=>_0x51fc6c(0x176)+_0x15718f[_0x51fc6c(0x158)]+':\x20'+_0x15718f[_0x51fc6c(0x17b)])[_0x51fc6c(0x18b)](';\x20');throw new Error(_0x51fc6c(0x155)+_0x4dfc41);}if(_0x32f4a2[_0x51fc6c(0x15e)]===0x0)throw new Error(_0x51fc6c(0x185)+_0x51fc6c(0x159));logger[_0x51fc6c(0x162)](process[_0x51fc6c(0x194)]()),logger[_0x51fc6c(0x154)](_0x51fc6c(0x161),_0x51fc6c(0x170),{'appCode':_0xe2b849,'jsUrl':_0xa1e67[_0x51fc6c(0x195)],'cssUrl':_0xa1e67[_0x51fc6c(0x199)],'mode':_0xedab56,'dryRun':_0x3f9052['dryRun']===!![]});if(_0xa1e67['jsUrl']){const _0x5702b3=await isUrlReachable(_0xa1e67['jsUrl']);if(!_0x5702b3)throw new Error(_0x51fc6c(0x175)+_0xa1e67[_0x51fc6c(0x195)]);}if(_0xa1e67['cssUrl']){const _0x135fa6=await isUrlReachable(_0xa1e67[_0x51fc6c(0x199)]);if(!_0x135fa6)throw new Error(_0x51fc6c(0x160)+_0xa1e67[_0x51fc6c(0x199)]);}const _0x58c49c=await getOnlineMenuList(_0xe2b849,_0x5d4624),_0x1b6927=_0x58c49c[_0x51fc6c(0x182)](_0x1a4ece=>_0x1a4ece[_0x51fc6c(0x173)][_0x51fc6c(0x15e)]>0x0),_0x4f696a=selectMenusForUpdate(_0x1b6927,_0x3f9052[_0x51fc6c(0x179)]);if(_0x4f696a[_0x51fc6c(0x15e)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x3f9052['dryRun']===!![]};const _0x123106=_0x4f696a['map'](_0x30d647=>buildMenuUpdateDiff(_0x30d647,_0xa1e67,_0xedab56,_0x3f9052[_0x51fc6c(0x186)]===!![],_0x3f9052[_0x51fc6c(0x181)]));if(_0x3f9052[_0x51fc6c(0x17e)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x123106};const _0x1e60cb=await Promise[_0x51fc6c(0x168)](_0x4f696a['map']((_0x327eb2,_0x11e50e)=>updateMenuCdnUrl(_0xe2b849,_0x5d4624,{'id':_0x327eb2['id'],'label':_0x327eb2[_0x51fc6c(0x17d)],'path':_0x327eb2['path'],'resources':_0x123106[_0x11e50e][_0x51fc6c(0x16b)][_0x51fc6c(0x173)],'extend':_0x327eb2[_0x51fc6c(0x16c)]??null,'loadScriptMode':_0x3f9052['loadScriptMode']}))),_0x45e7e9=_0x1e60cb[_0x51fc6c(0x182)](_0x4f62f2=>_0x4f62f2[_0x51fc6c(0x171)]===_0x51fc6c(0x166))[_0x51fc6c(0x18f)](_0x5c4b3e=>_0x5c4b3e['value']),_0x4cda90=_0x1e60cb[_0x51fc6c(0x182)](_0x48331f=>_0x48331f[_0x51fc6c(0x171)]===_0x51fc6c(0x15c))['length'];return logger['info']('menu-asset-update',_0x51fc6c(0x18e),{'count':_0x4f696a[_0x51fc6c(0x15e)],'resources':_0x32f4a2}),{'updated':_0x45e7e9[_0x51fc6c(0x15e)],'failed':_0x4cda90,'skipped':![],'menus':_0x45e7e9};}function validateSelection(_0x4aa0a4){const _0x430939=a131_0xb5de;if(!_0x4aa0a4)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x4aa0a4[_0x430939(0x191)]&&(_0x4aa0a4['menuIds'][_0x430939(0x15e)]>0x0||_0x4aa0a4[_0x430939(0x172)][_0x430939(0x15e)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x4aa0a4[_0x430939(0x191)]&&_0x4aa0a4[_0x430939(0x169)][_0x430939(0x15e)]===0x0&&_0x4aa0a4[_0x430939(0x172)][_0x430939(0x15e)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}function a131_0xb5de(_0x14ea03,_0x384514){_0x14ea03=_0x14ea03-0x154;const _0x24e494=a131_0x24e4();let _0xb5de4b=_0x24e494[_0x14ea03];return _0xb5de4b;}export function selectMenusForUpdate(_0x3d7ded,_0x5ce6d5){const _0x44e526=a131_0xb5de;validateSelection(_0x5ce6d5);if(_0x5ce6d5[_0x44e526(0x191)])return _0x3d7ded;const _0x153100=new Set(_0x3d7ded[_0x44e526(0x18f)](_0x47ce6c=>_0x47ce6c['id'])),_0x23aacf=new Set(_0x3d7ded[_0x44e526(0x18f)](_0x2186ce=>_0x2186ce[_0x44e526(0x15d)])),_0x2b996b=_0x5ce6d5[_0x44e526(0x169)][_0x44e526(0x182)](_0x4ba82c=>!_0x153100[_0x44e526(0x167)](_0x4ba82c)),_0x2b818c=_0x5ce6d5[_0x44e526(0x172)][_0x44e526(0x182)](_0x46bb30=>!_0x23aacf['has'](_0x46bb30));if(_0x2b996b[_0x44e526(0x15e)]>0x0||_0x2b818c[_0x44e526(0x15e)]>0x0){const _0x5046ce=[..._0x2b996b['map'](_0x2ee8d9=>String(_0x2ee8d9)),..._0x2b818c][_0x44e526(0x18b)](',\x20');throw new Error(_0x44e526(0x157)+_0x5046ce);}const _0x3a94b3=new Set(_0x5ce6d5[_0x44e526(0x169)]),_0x2026df=new Set(_0x5ce6d5[_0x44e526(0x172)]);return _0x3d7ded[_0x44e526(0x182)](_0x48dccb=>_0x3a94b3[_0x44e526(0x167)](_0x48dccb['id'])||_0x2026df[_0x44e526(0x167)](_0x48dccb[_0x44e526(0x15d)]));}function normalizeMode(_0x4e2cb7){const _0x2f6a76=a131_0xb5de;if(!_0x4e2cb7)return _0x2f6a76(0x16a);if(_0x4e2cb7===_0x2f6a76(0x192)||_0x4e2cb7===_0x2f6a76(0x16a))return _0x4e2cb7;throw new Error(_0x2f6a76(0x197)+_0x4e2cb7+_0x2f6a76(0x16e));}function buildMenuUpdateDiff(_0x4a0565,_0x2067a2,_0x16a573,_0x3ea1f3,_0x2bd029){const _0x146361=a131_0xb5de,_0x116f91=[..._0x4a0565[_0x146361(0x173)]];_0x16a573===_0x146361(0x16a)&&assertUnambiguousPatchResources(_0x4a0565,_0x116f91,_0x2067a2);const _0x2c903a=_0x16a573===_0x146361(0x16a)?patchResources(_0x116f91,_0x2067a2):replaceResources(_0x2067a2),_0x380531=[],_0x4264a0=_0x116f91[_0x146361(0x196)](isJsResource),_0x2bab9d=_0x2c903a[_0x146361(0x196)](isJsResource);if(_0x4264a0&&!_0x2bab9d){const _0x354d0a=_0x146361(0x15b)+_0x4a0565[_0x146361(0x17d)]+'\x22\x20('+_0x4a0565[_0x146361(0x15d)]+').\x20'+_0x146361(0x17f);if(!_0x3ea1f3)throw new Error(_0x354d0a);_0x380531[_0x146361(0x15f)](_0x354d0a);}const _0x89063b=_0x116f91[_0x146361(0x196)](isCssResource),_0x39f4be=_0x2c903a[_0x146361(0x196)](isCssResource);_0x89063b&&!_0x39f4be&&_0x380531['push'](_0x146361(0x15a)+_0x4a0565['label']+_0x146361(0x174)+_0x4a0565[_0x146361(0x15d)]+').');const _0x427806=typeof _0x4a0565[_0x146361(0x16c)]?.['loadScriptMode']===_0x146361(0x198)?_0x4a0565[_0x146361(0x16c)][_0x146361(0x181)]:null,_0x2e5ab0=_0x2bd029?{'loadScriptMode':_0x427806}:{},_0xa0006e=_0x2bd029?{'loadScriptMode':_0x2bd029}:{};return{'id':_0x4a0565['id'],'label':_0x4a0565[_0x146361(0x17d)],'path':_0x4a0565[_0x146361(0x15d)],'mode':_0x16a573,'before':{'resources':_0x116f91,..._0x2e5ab0},'after':{'resources':_0x2c903a,..._0xa0006e},'warnings':_0x380531};}function replaceResources(_0x3e1627){const _0x445782=a131_0xb5de;return[_0x3e1627[_0x445782(0x195)],_0x3e1627[_0x445782(0x199)]][_0x445782(0x182)](_0x3c8f11=>!!_0x3c8f11);}function assertUnambiguousPatchResources(_0x5f1c3a,_0x4637c7,_0x3699ed){const _0x286472=a131_0xb5de,_0x1fe4c6=_0x4637c7['filter'](isJsResource)['length'];if(_0x3699ed[_0x286472(0x195)]&&_0x1fe4c6>0x1)throw new Error(_0x286472(0x18c)+_0x1fe4c6+_0x286472(0x16f)+_0x5f1c3a[_0x286472(0x17d)]+_0x286472(0x174)+_0x5f1c3a['path']+')\x20'+_0x286472(0x188));const _0x337917=_0x4637c7['filter'](isCssResource)['length'];if(_0x3699ed['cssUrl']&&_0x337917>0x1)throw new Error(_0x286472(0x18c)+_0x337917+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x5f1c3a[_0x286472(0x17d)]+'\x22\x20('+_0x5f1c3a['path']+')\x20'+_0x286472(0x16d));}function patchResources(_0x41dfc1,_0x453337){const _0xd45b67=a131_0xb5de;let _0xbaae5c=![],_0x5e5331=![];const _0x49a2cb=[];for(const _0x4d7906 of _0x41dfc1){if(isJsResource(_0x4d7906)){if(_0x453337['jsUrl']&&!_0xbaae5c)_0x49a2cb['push'](_0x453337['jsUrl']),_0xbaae5c=!![];else!_0x453337[_0xd45b67(0x195)]&&_0x49a2cb[_0xd45b67(0x15f)](_0x4d7906);continue;}if(isCssResource(_0x4d7906)){if(_0x453337[_0xd45b67(0x199)]&&!_0x5e5331)_0x49a2cb[_0xd45b67(0x15f)](_0x453337[_0xd45b67(0x199)]),_0x5e5331=!![];else!_0x453337[_0xd45b67(0x199)]&&_0x49a2cb['push'](_0x4d7906);continue;}_0x49a2cb[_0xd45b67(0x15f)](_0x4d7906);}return _0x453337[_0xd45b67(0x195)]&&!_0xbaae5c&&_0x49a2cb['unshift'](_0x453337['jsUrl']),_0x453337[_0xd45b67(0x199)]&&!_0x5e5331&&_0x49a2cb['push'](_0x453337[_0xd45b67(0x199)]),_0x49a2cb;}function isJsResource(_0x14fe44){const _0x2b2254=a131_0xb5de;return stripQuery(_0x14fe44)[_0x2b2254(0x190)]()['endsWith']('.js');}function isCssResource(_0x2fc344){const _0x27301f=a131_0xb5de;return stripQuery(_0x2fc344)['toLowerCase']()['endsWith'](_0x27301f(0x184));}function stripQuery(_0x38eb13){const _0x32eaec=a131_0xb5de;return _0x38eb13[_0x32eaec(0x163)]('?')[0x0]??_0x38eb13;}function parseUpdateParamsFlag(_0x49aea4){const _0x5d05ed=a131_0xb5de;if(!_0x49aea4||typeof _0x49aea4!=='string')return{};try{const _0x3581b1=JSON[_0x5d05ed(0x156)](_0x49aea4);if(typeof _0x3581b1!=='object'||_0x3581b1===null||Array['isArray'](_0x3581b1))return{};return{'jsUrl':typeof _0x3581b1[_0x5d05ed(0x195)]==='string'?_0x3581b1[_0x5d05ed(0x195)][_0x5d05ed(0x183)]():undefined,'cssUrl':typeof _0x3581b1[_0x5d05ed(0x199)]==='string'?_0x3581b1[_0x5d05ed(0x199)][_0x5d05ed(0x183)]():undefined};}catch{return{};}}
1
+ (function(_0x2c52de,_0x47d9de){const _0x532072=a132_0x2ee8,_0xc2d603=_0x2c52de();while(!![]){try{const _0xa228a3=parseInt(_0x532072(0x15d))/0x1*(parseInt(_0x532072(0x15e))/0x2)+-parseInt(_0x532072(0x169))/0x3+parseInt(_0x532072(0x173))/0x4*(parseInt(_0x532072(0x161))/0x5)+-parseInt(_0x532072(0x179))/0x6+-parseInt(_0x532072(0x16d))/0x7+parseInt(_0x532072(0x15c))/0x8+parseInt(_0x532072(0x192))/0x9;if(_0xa228a3===_0x47d9de)break;else _0xc2d603['push'](_0xc2d603['shift']());}catch(_0xb8341b){_0xc2d603['push'](_0xc2d603['shift']());}}}(a132_0x35b3,0xa9ed9));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x374206){const _0xa2adbe=a132_0x2ee8,_0x98da83=[];return _0x374206[_0xa2adbe(0x168)]&&!isValidJsHttpsUrl(_0x374206[_0xa2adbe(0x168)])&&_0x98da83[_0xa2adbe(0x178)]({'field':_0xa2adbe(0x168),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x374206['cssUrl']&&!isValidCssHttpsUrl(_0x374206[_0xa2adbe(0x16b)])&&_0x98da83[_0xa2adbe(0x178)]({'field':_0xa2adbe(0x16b),'message':_0xa2adbe(0x17c)}),_0x98da83;}export async function runMenuUpdateCore(_0xdffb5d,_0x2b4541,_0x421f62,_0x5c88ae={}){const _0x5a0eab=a132_0x2ee8,_0x18fcf2=parseUpdateParamsFlag(_0x421f62),_0x3c2fd6=normalizeMode(_0x5c88ae[_0x5a0eab(0x186)]);validateSelection(_0x5c88ae['selection']);const _0x583b85=[];if(_0x18fcf2[_0x5a0eab(0x168)])_0x583b85[_0x5a0eab(0x178)](_0x18fcf2['jsUrl']);if(_0x18fcf2['cssUrl'])_0x583b85[_0x5a0eab(0x178)](_0x18fcf2['cssUrl']);const _0x4d9c48=validateParams(_0x18fcf2);if(_0x4d9c48['length']>0x0){const _0x5cc68e=_0x4d9c48['map'](_0x3ff318=>'--params.'+_0x3ff318[_0x5a0eab(0x18c)]+':\x20'+_0x3ff318['message'])[_0x5a0eab(0x189)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x5cc68e);}if(_0x583b85[_0x5a0eab(0x183)]===0x0)throw new Error(_0x5a0eab(0x18a)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x5a0eab(0x17b)](process[_0x5a0eab(0x15f)]()),logger[_0x5a0eab(0x15b)](_0x5a0eab(0x187),_0x5a0eab(0x172),{'appCode':_0xdffb5d,'jsUrl':_0x18fcf2[_0x5a0eab(0x168)],'cssUrl':_0x18fcf2[_0x5a0eab(0x16b)],'mode':_0x3c2fd6,'dryRun':_0x5c88ae[_0x5a0eab(0x184)]===!![]});if(_0x18fcf2[_0x5a0eab(0x168)]){const _0x1780db=await isUrlReachable(_0x18fcf2[_0x5a0eab(0x168)]);if(!_0x1780db)throw new Error(_0x5a0eab(0x191)+_0x18fcf2[_0x5a0eab(0x168)]);}if(_0x18fcf2[_0x5a0eab(0x16b)]){const _0x15f850=await isUrlReachable(_0x18fcf2[_0x5a0eab(0x16b)]);if(!_0x15f850)throw new Error(_0x5a0eab(0x195)+_0x18fcf2[_0x5a0eab(0x16b)]);}const _0x3e2577=await getOnlineMenuList(_0xdffb5d,_0x2b4541),_0x5e8ad7=_0x3e2577[_0x5a0eab(0x16a)](_0xfa1559=>_0xfa1559[_0x5a0eab(0x197)][_0x5a0eab(0x183)]>0x0),_0x2173ca=selectMenusForUpdate(_0x5e8ad7,_0x5c88ae[_0x5a0eab(0x18d)]);if(_0x2173ca[_0x5a0eab(0x183)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x5c88ae[_0x5a0eab(0x184)]===!![]};const _0x2f2601=_0x2173ca[_0x5a0eab(0x159)](_0x23ab3c=>buildMenuUpdateDiff(_0x23ab3c,_0x18fcf2,_0x3c2fd6,_0x5c88ae[_0x5a0eab(0x155)]===!![],_0x5c88ae[_0x5a0eab(0x17e)]));if(_0x5c88ae[_0x5a0eab(0x184)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2f2601};const _0xc5fb68=await Promise[_0x5a0eab(0x16e)](_0x2173ca['map']((_0x315d0c,_0x3d384c)=>updateMenuCdnUrl(_0xdffb5d,_0x2b4541,{'id':_0x315d0c['id'],'label':_0x315d0c[_0x5a0eab(0x174)],'path':_0x315d0c[_0x5a0eab(0x15a)],'resources':_0x2f2601[_0x3d384c]['after'][_0x5a0eab(0x197)],'extend':_0x315d0c[_0x5a0eab(0x193)]??null,'loadScriptMode':_0x5c88ae[_0x5a0eab(0x17e)]}))),_0x437ea2=_0xc5fb68[_0x5a0eab(0x16a)](_0x544f9b=>_0x544f9b[_0x5a0eab(0x17d)]===_0x5a0eab(0x156))[_0x5a0eab(0x159)](_0x2001ae=>_0x2001ae[_0x5a0eab(0x166)]),_0x2fbb7e=_0xc5fb68[_0x5a0eab(0x16a)](_0x412f5f=>_0x412f5f[_0x5a0eab(0x17d)]===_0x5a0eab(0x17a))[_0x5a0eab(0x183)];return logger[_0x5a0eab(0x15b)]('menu-asset-update',_0x5a0eab(0x162),{'count':_0x2173ca[_0x5a0eab(0x183)],'resources':_0x583b85}),{'updated':_0x437ea2[_0x5a0eab(0x183)],'failed':_0x2fbb7e,'skipped':![],'menus':_0x437ea2};}function validateSelection(_0x461378){const _0x4bcd55=a132_0x2ee8;if(!_0x461378)throw new Error(_0x4bcd55(0x167));if(_0x461378[_0x4bcd55(0x181)]&&(_0x461378[_0x4bcd55(0x180)][_0x4bcd55(0x183)]>0x0||_0x461378[_0x4bcd55(0x196)][_0x4bcd55(0x183)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x461378[_0x4bcd55(0x181)]&&_0x461378[_0x4bcd55(0x180)][_0x4bcd55(0x183)]===0x0&&_0x461378[_0x4bcd55(0x196)][_0x4bcd55(0x183)]===0x0)throw new Error(_0x4bcd55(0x167));}export function selectMenusForUpdate(_0xe8dda,_0x17e7c5){const _0x375116=a132_0x2ee8;validateSelection(_0x17e7c5);if(_0x17e7c5[_0x375116(0x181)])return _0xe8dda;const _0x52a1c1=new Set(_0xe8dda[_0x375116(0x159)](_0x414c21=>_0x414c21['id'])),_0x415333=new Set(_0xe8dda['map'](_0x4831a9=>_0x4831a9['path'])),_0x4f89ec=_0x17e7c5[_0x375116(0x180)][_0x375116(0x16a)](_0x313a69=>!_0x52a1c1[_0x375116(0x198)](_0x313a69)),_0x237e8b=_0x17e7c5[_0x375116(0x196)]['filter'](_0x2bf372=>!_0x415333[_0x375116(0x198)](_0x2bf372));if(_0x4f89ec['length']>0x0||_0x237e8b[_0x375116(0x183)]>0x0){const _0x9fc072=[..._0x4f89ec[_0x375116(0x159)](_0x38a6fb=>String(_0x38a6fb)),..._0x237e8b][_0x375116(0x189)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x9fc072);}const _0x413631=new Set(_0x17e7c5[_0x375116(0x180)]),_0x122981=new Set(_0x17e7c5[_0x375116(0x196)]);return _0xe8dda[_0x375116(0x16a)](_0x19aece=>_0x413631[_0x375116(0x198)](_0x19aece['id'])||_0x122981[_0x375116(0x198)](_0x19aece[_0x375116(0x15a)]));}function normalizeMode(_0x2bfb43){const _0x573796=a132_0x2ee8;if(!_0x2bfb43)return _0x573796(0x17f);if(_0x2bfb43===_0x573796(0x182)||_0x2bfb43===_0x573796(0x17f))return _0x2bfb43;throw new Error(_0x573796(0x176)+_0x2bfb43+_0x573796(0x160));}function buildMenuUpdateDiff(_0x40dd10,_0x383ae1,_0x5e614c,_0xdbde01,_0x156110){const _0x268945=a132_0x2ee8,_0xa7bd75=[..._0x40dd10[_0x268945(0x197)]];_0x5e614c===_0x268945(0x17f)&&assertUnambiguousPatchResources(_0x40dd10,_0xa7bd75,_0x383ae1);const _0x50d4ea=_0x5e614c===_0x268945(0x17f)?patchResources(_0xa7bd75,_0x383ae1):replaceResources(_0x383ae1),_0xbe038a=[],_0x5f30b8=_0xa7bd75[_0x268945(0x16f)](isJsResource),_0x13861f=_0x50d4ea['some'](isJsResource);if(_0x5f30b8&&!_0x13861f){const _0x26fcec=_0x268945(0x170)+_0x40dd10[_0x268945(0x174)]+_0x268945(0x185)+_0x40dd10[_0x268945(0x15a)]+_0x268945(0x18e)+_0x268945(0x190);if(!_0xdbde01)throw new Error(_0x26fcec);_0xbe038a[_0x268945(0x178)](_0x26fcec);}const _0x35af03=_0xa7bd75[_0x268945(0x16f)](isCssResource),_0xa95216=_0x50d4ea[_0x268945(0x16f)](isCssResource);_0x35af03&&!_0xa95216&&_0xbe038a[_0x268945(0x178)](_0x268945(0x175)+_0x40dd10[_0x268945(0x174)]+_0x268945(0x185)+_0x40dd10[_0x268945(0x15a)]+').');const _0x23bf56=typeof _0x40dd10[_0x268945(0x193)]?.['loadScriptMode']===_0x268945(0x157)?_0x40dd10['extend']['loadScriptMode']:null,_0x5ed60e=_0x156110?{'loadScriptMode':_0x23bf56}:{},_0x2342f3=_0x156110?{'loadScriptMode':_0x156110}:{};return{'id':_0x40dd10['id'],'label':_0x40dd10[_0x268945(0x174)],'path':_0x40dd10[_0x268945(0x15a)],'mode':_0x5e614c,'before':{'resources':_0xa7bd75,..._0x5ed60e},'after':{'resources':_0x50d4ea,..._0x2342f3},'warnings':_0xbe038a};}function a132_0x2ee8(_0x19489c,_0x2ae83c){_0x19489c=_0x19489c-0x155;const _0x35b3a3=a132_0x35b3();let _0x2ee8e=_0x35b3a3[_0x19489c];return _0x2ee8e;}function replaceResources(_0x5ad1cc){const _0x302dbd=a132_0x2ee8;return[_0x5ad1cc[_0x302dbd(0x168)],_0x5ad1cc[_0x302dbd(0x16b)]][_0x302dbd(0x16a)](_0xd383c1=>!!_0xd383c1);}function assertUnambiguousPatchResources(_0x556432,_0x11556a,_0x4e1689){const _0x29ea25=a132_0x2ee8,_0x5dfc47=_0x11556a[_0x29ea25(0x16a)](isJsResource)[_0x29ea25(0x183)];if(_0x4e1689['jsUrl']&&_0x5dfc47>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x5dfc47+_0x29ea25(0x18f)+_0x556432[_0x29ea25(0x174)]+_0x29ea25(0x185)+_0x556432[_0x29ea25(0x15a)]+')\x20'+_0x29ea25(0x194));const _0x4ce65f=_0x11556a['filter'](isCssResource)['length'];if(_0x4e1689[_0x29ea25(0x16b)]&&_0x4ce65f>0x1)throw new Error(_0x29ea25(0x163)+_0x4ce65f+_0x29ea25(0x165)+_0x556432[_0x29ea25(0x174)]+_0x29ea25(0x185)+_0x556432[_0x29ea25(0x15a)]+')\x20'+_0x29ea25(0x18b));}function a132_0x35b3(){const _0x4673d9=['map','path','info','7881104myPMCv','75315IVDXKT','30krJmRy','cwd','.\x20Allowed\x20values:\x20replace,\x20patch','23645mgncwm','Menu\x20asset\x20update\x20completed','menu\x20asset-update\x20cannot\x20patch\x20','split','\x20existing\x20CSS\x20resources\x20for\x20\x22','value','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','jsUrl','369975IzGEOI','filter','cssUrl','.css','7984242AmFchu','allSettled','some','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','endsWith','Start\x20non-interactive\x20menu\x20asset\x20update','128KUUqFJ','label','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','Invalid\x20--mode:\x20','trim','push','6276792dkdUrz','rejected','setLogPath','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','status','loadScriptMode','patch','menuIds','all','replace','length','dryRun','\x22\x20(','mode','menu-asset-update','parse','join','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','field','selection',').\x20','\x20existing\x20JS\x20resources\x20for\x20\x22','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','JS\x20URL\x20is\x20unreachable:\x20','6659073SyHtoC','extend','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','CSS\x20URL\x20is\x20unreachable:\x20','paths','resources','has','force','fulfilled','string','object'];a132_0x35b3=function(){return _0x4673d9;};return a132_0x35b3();}function patchResources(_0xee963f,_0x8e0eea){const _0x5a2b41=a132_0x2ee8;let _0x26fdb7=![],_0x51b526=![];const _0x410cc1=[];for(const _0x1e3b6b of _0xee963f){if(isJsResource(_0x1e3b6b)){if(_0x8e0eea[_0x5a2b41(0x168)]&&!_0x26fdb7)_0x410cc1[_0x5a2b41(0x178)](_0x8e0eea['jsUrl']),_0x26fdb7=!![];else!_0x8e0eea[_0x5a2b41(0x168)]&&_0x410cc1[_0x5a2b41(0x178)](_0x1e3b6b);continue;}if(isCssResource(_0x1e3b6b)){if(_0x8e0eea[_0x5a2b41(0x16b)]&&!_0x51b526)_0x410cc1[_0x5a2b41(0x178)](_0x8e0eea[_0x5a2b41(0x16b)]),_0x51b526=!![];else!_0x8e0eea['cssUrl']&&_0x410cc1[_0x5a2b41(0x178)](_0x1e3b6b);continue;}_0x410cc1['push'](_0x1e3b6b);}return _0x8e0eea[_0x5a2b41(0x168)]&&!_0x26fdb7&&_0x410cc1['unshift'](_0x8e0eea[_0x5a2b41(0x168)]),_0x8e0eea['cssUrl']&&!_0x51b526&&_0x410cc1[_0x5a2b41(0x178)](_0x8e0eea[_0x5a2b41(0x16b)]),_0x410cc1;}function isJsResource(_0x5ab653){const _0x36d433=a132_0x2ee8;return stripQuery(_0x5ab653)['toLowerCase']()[_0x36d433(0x171)]('.js');}function isCssResource(_0xc337dc){const _0xae1850=a132_0x2ee8;return stripQuery(_0xc337dc)['toLowerCase']()['endsWith'](_0xae1850(0x16c));}function stripQuery(_0xb92708){const _0x2741f9=a132_0x2ee8;return _0xb92708[_0x2741f9(0x164)]('?')[0x0]??_0xb92708;}function parseUpdateParamsFlag(_0x1442f4){const _0x193789=a132_0x2ee8;if(!_0x1442f4||typeof _0x1442f4!==_0x193789(0x157))return{};try{const _0x3f400a=JSON[_0x193789(0x188)](_0x1442f4);if(typeof _0x3f400a!==_0x193789(0x158)||_0x3f400a===null||Array['isArray'](_0x3f400a))return{};return{'jsUrl':typeof _0x3f400a['jsUrl']===_0x193789(0x157)?_0x3f400a[_0x193789(0x168)][_0x193789(0x177)]():undefined,'cssUrl':typeof _0x3f400a[_0x193789(0x16b)]==='string'?_0x3f400a[_0x193789(0x16b)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x2ef9f6,_0x1229bc){const _0x2f7fec=a132_0x4477,_0x598ed8=_0x2ef9f6();while(!![]){try{const _0x54b345=parseInt(_0x2f7fec(0x69))/0x1+-parseInt(_0x2f7fec(0x68))/0x2+-parseInt(_0x2f7fec(0x6c))/0x3+-parseInt(_0x2f7fec(0x70))/0x4*(parseInt(_0x2f7fec(0x6a))/0x5)+-parseInt(_0x2f7fec(0x6b))/0x6+-parseInt(_0x2f7fec(0x67))/0x7+-parseInt(_0x2f7fec(0x6e))/0x8*(-parseInt(_0x2f7fec(0x6f))/0x9);if(_0x54b345===_0x1229bc)break;else _0x598ed8['push'](_0x598ed8['shift']());}catch(_0x1f02c5){_0x598ed8['push'](_0x598ed8['shift']());}}}(a132_0x3bbf,0xe330d));function a132_0x4477(_0x2cb734,_0x3fced1){_0x2cb734=_0x2cb734-0x67;const _0x3bbf6b=a132_0x3bbf();let _0x447742=_0x3bbf6b[_0x2cb734];return _0x447742;}export function isValidJsHttpsUrl(_0xe5cc1f){const _0x3eec96=a132_0x4477;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0xe5cc1f[_0x3eec96(0x6d)]());}export function isValidCssHttpsUrl(_0x1c362a){const _0x28f478=a132_0x4477;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x1c362a[_0x28f478(0x6d)]());}function a132_0x3bbf(){const _0x2ada19=['1032VpTVeJ','445941BelPil','980424AXFfpY','12765193QAYuqO','2787842EwsPzC','339660jpLBhX','10siyHwv','9644664eicztC','1457196SaNeNK','trim'];a132_0x3bbf=function(){return _0x2ada19;};return a132_0x3bbf();}export async function isUrlReachable(_0x1358c4){try{const _0x5f2ede=await fetch(_0x1358c4,{'method':'HEAD'});return _0x5f2ede['ok'];}catch{return![];}}
1
+ (function(_0x29b30e,_0x12bd61){const _0x576982=a133_0x4a75,_0x3d70e3=_0x29b30e();while(!![]){try{const _0x5782c1=parseInt(_0x576982(0x72))/0x1+-parseInt(_0x576982(0x70))/0x2+-parseInt(_0x576982(0x76))/0x3+parseInt(_0x576982(0x73))/0x4*(-parseInt(_0x576982(0x71))/0x5)+-parseInt(_0x576982(0x6f))/0x6+-parseInt(_0x576982(0x6e))/0x7+parseInt(_0x576982(0x75))/0x8;if(_0x5782c1===_0x12bd61)break;else _0x3d70e3['push'](_0x3d70e3['shift']());}catch(_0x3115a4){_0x3d70e3['push'](_0x3d70e3['shift']());}}}(a133_0x55fc,0xe2d28));function a133_0x55fc(){const _0x55a5bb=['47718864qPnvjn','2831574RYUizP','HEAD','test','8243641AhMbYS','3014838IrRXWe','2943616cDBqlj','3695WqDEfe','752318kbFBTo','9160OOWZCX','trim'];a133_0x55fc=function(){return _0x55a5bb;};return a133_0x55fc();}export function isValidJsHttpsUrl(_0xfca8f3){const _0x568657=a133_0x4a75;return/^https:\/\/.+\.js(\?.*)?$/[_0x568657(0x6d)](_0xfca8f3[_0x568657(0x74)]());}export function isValidCssHttpsUrl(_0x43d4c2){const _0x5743ff=a133_0x4a75;return/^https:\/\/.+\.css(\?.*)?$/[_0x5743ff(0x6d)](_0x43d4c2['trim']());}function a133_0x4a75(_0x1b72f2,_0x38cd48){_0x1b72f2=_0x1b72f2-0x6c;const _0x55fcda=a133_0x55fc();let _0x4a7597=_0x55fcda[_0x1b72f2];return _0x4a7597;}export async function isUrlReachable(_0x13a7de){const _0x26087b=a133_0x4a75;try{const _0x376575=await fetch(_0x13a7de,{'method':_0x26087b(0x6c)});return _0x376575['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a133_0x5e7f23=a133_0x2b7c;(function(_0x481bf8,_0x5d78af){const _0x10ee69=a133_0x2b7c,_0x286089=_0x481bf8();while(!![]){try{const _0x520179=parseInt(_0x10ee69(0x158))/0x1*(-parseInt(_0x10ee69(0x156))/0x2)+parseInt(_0x10ee69(0x142))/0x3*(parseInt(_0x10ee69(0x165))/0x4)+parseInt(_0x10ee69(0x171))/0x5*(parseInt(_0x10ee69(0x175))/0x6)+parseInt(_0x10ee69(0x14e))/0x7+-parseInt(_0x10ee69(0x152))/0x8*(-parseInt(_0x10ee69(0x15f))/0x9)+-parseInt(_0x10ee69(0x172))/0xa+-parseInt(_0x10ee69(0x15b))/0xb;if(_0x520179===_0x5d78af)break;else _0x286089['push'](_0x286089['shift']());}catch(_0x42f9ab){_0x286089['push'](_0x286089['shift']());}}}(a133_0xf9c3,0xbae88));import a133_0x446a77 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a133_0xf9c3(){const _0x3e214f=['yellow','length','\x20menu(s)...','validation','rawFlags','\x20page(s)','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','str','\x20\x20Cancelled.','onlineMenuList','15ozgkuy','876020vmQxbY','gray','cyan','1939782plPgoP','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','sync','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','filter','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','appCode','skipped','trim','paths','yes','failed','\x20local\x20microfrontend\x20menu(s).','/smartapi/menu/create','\x20and\x20CSS:\x20','boolean','Menu\x20sync\x20completed:\x20','\x20\x20✓\x20Selected:\x20','cssUrl','jsUrl','93jidgoI','localPages','POST','size','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20created.','split','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Creating\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20\x20Create\x20','flag','4087923cAOPXx','map','menu','\x20failed.','1090592kAbQRM','appcode','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','created','5926GVfIWE','Menu\x20creation\x20failed','181FLBItO','string','params','9259987pHbegR','Failed\x20to\x20fetch\x20online\x20menu\x20list','cookie','targetPages','36gUiajy','Menu\x20sync\x20skipped','Would\x20create\x20','selectedAppName','write','✓\x20Menu\x20sync\x20completed:\x20','17048SFLsWt'];a133_0xf9c3=function(){return _0x3e214f;};return a133_0xf9c3();}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';function a133_0x2b7c(_0xc30ae,_0x509d92){_0xc30ae=_0xc30ae-0x142;const _0xf9c3ba=a133_0xf9c3();let _0x2b7c89=_0xf9c3ba[_0xc30ae];return _0x2b7c89;}export const menuSync={'service':a133_0x5e7f23(0x150),'command':a133_0x5e7f23(0x177),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a133_0x5e7f23(0x163),'flags':[{'name':a133_0x5e7f23(0x15a),'type':a133_0x5e7f23(0x159),'description':'Pre-fill\x20JS/CSS\x20URLs.\x20'+a133_0x5e7f23(0x14b)},{'name':a133_0x5e7f23(0x17e),'type':a133_0x5e7f23(0x159),'description':a133_0x5e7f23(0x17a)},{'name':a133_0x5e7f23(0x17f),'type':a133_0x5e7f23(0x184),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0xcf40db){const _0x7dfdbc=a133_0x5e7f23;ensureRunnableContext(_0xcf40db[_0x7dfdbc(0x16a)],_0xcf40db[_0x7dfdbc(0x162)]);const _0x8ea460=await runMenuSyncCore(_0xcf40db[_0x7dfdbc(0x17b)],_0xcf40db['cookie'],parsePaths(_0xcf40db[_0x7dfdbc(0x16e)](_0x7dfdbc(0x17e))),_0xcf40db[_0x7dfdbc(0x16e)](_0x7dfdbc(0x15a)),{'dryRun':!![]});return{'method':_0x7dfdbc(0x144),'url':_0x7dfdbc(0x182),'body':_0x8ea460,'description':_0x8ea460[_0x7dfdbc(0x17c)]?_0x7dfdbc(0x154):_0x7dfdbc(0x161)+_0x8ea460[_0x7dfdbc(0x15e)][_0x7dfdbc(0x167)]+_0x7dfdbc(0x181)};},async 'execute'(_0x2feb44){const _0x3c4613=a133_0x5e7f23;ensureRunnableContext(_0x2feb44[_0x3c4613(0x16a)],_0x2feb44[_0x3c4613(0x162)]);const _0x4a7c5d=_0x2feb44[_0x3c4613(0x14d)](_0x3c4613(0x17f)),_0x18e9b5=_0x2feb44['str'](_0x3c4613(0x15a)),_0x510a2b=parsePaths(_0x2feb44[_0x3c4613(0x16e)](_0x3c4613(0x17e))),_0x7294fa=parseMenuSyncParams(_0x18e9b5);if(_0x4a7c5d){const _0x4b9add=await runMenuSyncCore(_0x2feb44[_0x3c4613(0x17b)],_0x2feb44[_0x3c4613(0x15d)],_0x510a2b,_0x18e9b5);if(_0x4b9add[_0x3c4613(0x17c)]){const _0x2e726a=getLocalPages();_0x2e726a[_0x3c4613(0x167)]===0x0?writeCliSideChannelLine(_0x3c4613(0x16c)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x3c4613(0x164)+_0x4b9add['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x4b9add,'message':_0x4b9add[_0x3c4613(0x17c)]?_0x3c4613(0x160):_0x3c4613(0x185)+_0x4b9add[_0x3c4613(0x155)]+_0x3c4613(0x147)};}if(_0x510a2b[_0x3c4613(0x167)]>0x0)throw CliErrors[_0x3c4613(0x169)](_0x3c4613(0x178),_0x3c4613(0x146));if(!isInteractive()&&_0x18e9b5)throw CliErrors[_0x3c4613(0x169)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x3c4613(0x146));requireInteractive();const _0x4ea91d=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x2ce2eb,_0x39feec,_0x15b95e;try{const _0x126ec7=await fetchMenuData(_0x2feb44['appCode'],_0x2feb44['cookie']);_0x2ce2eb=_0x126ec7[_0x3c4613(0x143)],_0x39feec=_0x126ec7['onlinePaths'],_0x15b95e=_0x126ec7[_0x3c4613(0x170)],stopSpinner(_0x4ea91d,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x41a1d9){stopSpinner(_0x4ea91d,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x41a1d9 instanceof Error?_0x41a1d9['message']:_0x3c4613(0x15c));}if(_0x2ce2eb['length']===0x0)return writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x166)](_0x3c4613(0x149))),{'ok':!![]};const _0x513e3b=buildCompareRows(_0x2ce2eb,_0x39feec);writeCliSideChannelLine(renderCompareTable(_0x513e3b)),writeCliSideChannelLine('');const _0x184e46=await selectPages(_0x2ce2eb,_0x39feec);writeCliSideChannelLine(''),writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x174)](_0x3c4613(0x186)+_0x184e46[_0x3c4613(0x167)]+_0x3c4613(0x16b)));const _0x3ac40d=_0x7294fa[_0x3c4613(0x188)]&&_0x7294fa[_0x3c4613(0x187)];if(!_0x3ac40d){writeCliSideChannelLine(renderSyncSummary(_0x184e46,_0x39feec[_0x3c4613(0x145)]>0x0));const _0x183cec=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x183cec)return writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x173)](_0x3c4613(0x16f))),{'ok':!![]};}let _0x2effbc=_0x7294fa['jsUrl'],_0x2a7146=_0x7294fa[_0x3c4613(0x187)];!_0x2effbc&&(_0x2effbc=await askJsUrl());!_0x2a7146&&(_0x2a7146=await askCssUrl());const _0x1dba33=await askConfirm(_0x3c4613(0x14c)+_0x184e46[_0x3c4613(0x167)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x2effbc+_0x3c4613(0x183)+_0x2a7146+'?');if(!_0x1dba33)return writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x173)](_0x3c4613(0x16f))),{'ok':!![]};const _0x56d93b=[_0x2effbc,_0x2a7146],_0x4af1a6=startSpinner(_0x3c4613(0x14a)+_0x184e46['length']+_0x3c4613(0x168));try{const _0x44b0b1=await doCreateMenus(_0x2feb44[_0x3c4613(0x17b)],_0x2feb44['cookie'],_0x184e46,_0x56d93b);return stopSpinner(_0x4af1a6,'Created\x20'+_0x44b0b1[_0x3c4613(0x155)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x44b0b1,'message':_0x3c4613(0x185)+_0x44b0b1[_0x3c4613(0x155)]+'\x20created,\x20'+_0x44b0b1[_0x3c4613(0x180)]+_0x3c4613(0x151)};}catch(_0x338528){stopSpinner(_0x4af1a6,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x3c4613(0x169)](_0x338528 instanceof Error?_0x338528['message']:_0x3c4613(0x157));}}};function ensureRunnableContext(_0x36448d,_0x20a224){const _0x12b603=a133_0x5e7f23,_0x1f76fd=_0x36448d[_0x12b603(0x153)]?String(_0x36448d['appcode'])[_0x12b603(0x17d)]():'';if(!isInProject()&&!_0x20a224&&!_0x1f76fd)throw CliErrors[_0x12b603(0x169)](_0x12b603(0x16d)+_0x12b603(0x176));}function parsePaths(_0xa5c9ed){const _0x2c63f6=a133_0x5e7f23;return[...new Set(_0xa5c9ed[_0x2c63f6(0x148)](',')[_0x2c63f6(0x14f)](_0x260ee6=>_0x260ee6[_0x2c63f6(0x17d)]())[_0x2c63f6(0x179)](Boolean))];}
1
+ const a134_0x12de38=a134_0x5c03;(function(_0x38b782,_0x566ba0){const _0x3f14c3=a134_0x5c03,_0x5581ee=_0x38b782();while(!![]){try{const _0x5336c0=-parseInt(_0x3f14c3(0x19f))/0x1+-parseInt(_0x3f14c3(0x1a5))/0x2+-parseInt(_0x3f14c3(0x1d6))/0x3*(parseInt(_0x3f14c3(0x1a4))/0x4)+parseInt(_0x3f14c3(0x196))/0x5+parseInt(_0x3f14c3(0x19b))/0x6*(parseInt(_0x3f14c3(0x1b8))/0x7)+-parseInt(_0x3f14c3(0x1d4))/0x8+parseInt(_0x3f14c3(0x1cc))/0x9;if(_0x5336c0===_0x566ba0)break;else _0x5581ee['push'](_0x5581ee['shift']());}catch(_0x2f638b){_0x5581ee['push'](_0x5581ee['shift']());}}}(a134_0x1c5f,0x81466));import a134_0x11e9bd from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a134_0x1c5f(){const _0x4f5685=['5893376UdWPiR','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','33588LeVhrV','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20menu(s)\x20with\x20JS:\x20','write','Menu\x20creation\x20failed','Pre-fill\x20JS/CSS\x20URLs.\x20','2205810oipBuw','appcode','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','selectedAppName','\x20menu(s)','1818ydjpSh','flag','Created\x20','paths','130059PBQKqM','params','skipped','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','appCode','8qRLKeN','411300IFIzxn','/smartapi/menu/create','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','validation','created','\x20\x20Create\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20created,\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','targetPages','size','Creating\x20','\x20page(s)','message','\x20local\x20microfrontend\x20menu(s).','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20menu(s)\x20created','Fetching\x20online\x20menu\x20list...','5691AqWqrp','jsUrl','Sync\x20local\x20pages\x20as\x20platform\x20menus','rawFlags','\x20created.','cookie','onlineMenuList','\x20menu(s)...','str','\x20failed.','\x20\x20Cancelled.','split','string','Online\x20menu\x20list\x20fetched','failed','cssUrl','map','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','Would\x20create\x20','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','8431038rnMIkU','gray','trim','Menu\x20sync\x20completed:\x20','boolean','length','menu','Menu\x20sync\x20skipped'];a134_0x1c5f=function(){return _0x4f5685;};return a134_0x1c5f();}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';function a134_0x5c03(_0x2649e1,_0x545be8){_0x2649e1=_0x2649e1-0x193;const _0x1c5f61=a134_0x1c5f();let _0x5c03f3=_0x1c5f61[_0x2649e1];return _0x5c03f3;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a134_0x12de38(0x1d2),'command':'sync','description':a134_0x12de38(0x1ba),'risk':a134_0x12de38(0x193),'flags':[{'name':a134_0x12de38(0x1a0),'type':a134_0x12de38(0x1c4),'description':a134_0x12de38(0x195)+a134_0x12de38(0x1b5)},{'name':'paths','type':a134_0x12de38(0x1c4),'description':a134_0x12de38(0x1b4)},{'name':'yes','type':a134_0x12de38(0x1d0),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x37a7b9){const _0x3e0d53=a134_0x12de38;ensureRunnableContext(_0x37a7b9[_0x3e0d53(0x1bb)],_0x37a7b9[_0x3e0d53(0x199)]);const _0x1f0dc0=await runMenuSyncCore(_0x37a7b9[_0x3e0d53(0x1a3)],_0x37a7b9[_0x3e0d53(0x1bd)],parsePaths(_0x37a7b9[_0x3e0d53(0x1c0)](_0x3e0d53(0x19e))),_0x37a7b9[_0x3e0d53(0x1c0)](_0x3e0d53(0x1a0)),{'dryRun':!![]});return{'method':'POST','url':_0x3e0d53(0x1a6),'body':_0x1f0dc0,'description':_0x1f0dc0[_0x3e0d53(0x1a1)]?_0x3e0d53(0x1c9):_0x3e0d53(0x1ca)+_0x1f0dc0[_0x3e0d53(0x1ae)][_0x3e0d53(0x1d1)]+_0x3e0d53(0x1b3)};},async 'execute'(_0x5f48e5){const _0x4951fd=a134_0x12de38;ensureRunnableContext(_0x5f48e5[_0x4951fd(0x1bb)],_0x5f48e5['selectedAppName']);const _0x2852d2=_0x5f48e5[_0x4951fd(0x19c)]('yes'),_0x3dedd2=_0x5f48e5[_0x4951fd(0x1c0)]('params'),_0x39965a=parsePaths(_0x5f48e5['str'](_0x4951fd(0x19e))),_0x27c9a2=parseMenuSyncParams(_0x3dedd2);if(_0x2852d2){const _0x23fbf5=await runMenuSyncCore(_0x5f48e5[_0x4951fd(0x1a3)],_0x5f48e5[_0x4951fd(0x1bd)],_0x39965a,_0x3dedd2);if(_0x23fbf5[_0x4951fd(0x1a1)]){const _0x1f838f=getLocalPages();_0x1f838f[_0x4951fd(0x1d1)]===0x0?writeCliSideChannelLine(_0x4951fd(0x1a7)):writeCliSideChannelLine(_0x4951fd(0x198));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x23fbf5['created']+_0x4951fd(0x1b6));return{'ok':!![],'data':_0x23fbf5,'message':_0x23fbf5['skipped']?_0x4951fd(0x1d3):_0x4951fd(0x1cf)+_0x23fbf5[_0x4951fd(0x1a9)]+_0x4951fd(0x1bc)};}if(_0x39965a['length']>0x0)throw CliErrors[_0x4951fd(0x1a8)](_0x4951fd(0x1a2),_0x4951fd(0x1ab));if(!isInteractive()&&_0x3dedd2)throw CliErrors[_0x4951fd(0x1a8)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x4951fd(0x1ab));requireInteractive();const _0x2c9f42=startSpinner(_0x4951fd(0x1b7));let _0x502c49,_0x3138dd,_0x201fa0;try{const _0x19fdc8=await fetchMenuData(_0x5f48e5['appCode'],_0x5f48e5['cookie']);_0x502c49=_0x19fdc8['localPages'],_0x3138dd=_0x19fdc8['onlinePaths'],_0x201fa0=_0x19fdc8[_0x4951fd(0x1be)],stopSpinner(_0x2c9f42,_0x4951fd(0x1c5),!![]);}catch(_0x872ae7){stopSpinner(_0x2c9f42,_0x4951fd(0x1ad),![]);throw CliErrors['validation'](_0x872ae7 instanceof Error?_0x872ae7[_0x4951fd(0x1b2)]:_0x4951fd(0x1ad));}if(_0x502c49['length']===0x0)return writeCliSideChannelLine(a134_0x11e9bd['yellow'](_0x4951fd(0x1d5))),{'ok':!![]};const _0x526033=buildCompareRows(_0x502c49,_0x3138dd);writeCliSideChannelLine(renderCompareTable(_0x526033)),writeCliSideChannelLine('');const _0x32b3be=await selectPages(_0x502c49,_0x3138dd);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0x11e9bd['cyan']('\x20\x20✓\x20Selected:\x20'+_0x32b3be[_0x4951fd(0x1d1)]+_0x4951fd(0x1b1)));const _0x22836d=_0x27c9a2[_0x4951fd(0x1b9)]&&_0x27c9a2['cssUrl'];if(!_0x22836d){writeCliSideChannelLine(renderSyncSummary(_0x32b3be,_0x3138dd[_0x4951fd(0x1af)]>0x0));const _0x372f64=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x372f64)return writeCliSideChannelLine(a134_0x11e9bd[_0x4951fd(0x1cd)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x198b74=_0x27c9a2[_0x4951fd(0x1b9)],_0x6e0fab=_0x27c9a2[_0x4951fd(0x1c7)];!_0x198b74&&(_0x198b74=await askJsUrl());!_0x6e0fab&&(_0x6e0fab=await askCssUrl());const _0x2e5cbc=await askConfirm(_0x4951fd(0x1aa)+_0x32b3be[_0x4951fd(0x1d1)]+_0x4951fd(0x1d8)+_0x198b74+'\x20and\x20CSS:\x20'+_0x6e0fab+'?');if(!_0x2e5cbc)return writeCliSideChannelLine(a134_0x11e9bd['gray'](_0x4951fd(0x1c2))),{'ok':!![]};const _0xbf3f2c=[_0x198b74,_0x6e0fab],_0x5589e7=startSpinner(_0x4951fd(0x1b0)+_0x32b3be[_0x4951fd(0x1d1)]+_0x4951fd(0x1bf));try{const _0x282ce7=await doCreateMenus(_0x5f48e5[_0x4951fd(0x1a3)],_0x5f48e5[_0x4951fd(0x1bd)],_0x32b3be,_0xbf3f2c);return stopSpinner(_0x5589e7,_0x4951fd(0x19d)+_0x282ce7[_0x4951fd(0x1a9)]+_0x4951fd(0x19a),!![]),{'ok':!![],'data':_0x282ce7,'message':_0x4951fd(0x1cf)+_0x282ce7[_0x4951fd(0x1a9)]+_0x4951fd(0x1ac)+_0x282ce7[_0x4951fd(0x1c6)]+_0x4951fd(0x1c1)};}catch(_0x49f792){stopSpinner(_0x5589e7,_0x4951fd(0x194),![]);throw CliErrors['validation'](_0x49f792 instanceof Error?_0x49f792[_0x4951fd(0x1b2)]:_0x4951fd(0x194));}}};function ensureRunnableContext(_0x462bcf,_0x3d7eec){const _0x78d971=a134_0x12de38,_0x513e9c=_0x462bcf[_0x78d971(0x197)]?String(_0x462bcf['appcode'])['trim']():'';if(!isInProject()&&!_0x3d7eec&&!_0x513e9c)throw CliErrors[_0x78d971(0x1a8)](_0x78d971(0x1cb)+_0x78d971(0x1d7));}function parsePaths(_0x461d3a){const _0xc7298a=a134_0x12de38;return[...new Set(_0x461d3a[_0xc7298a(0x1c3)](',')[_0xc7298a(0x1c8)](_0x3418aa=>_0x3418aa[_0xc7298a(0x1ce)]())['filter'](Boolean))];}
@@ -1 +1 @@
1
- const a134_0x5d9504=a134_0x4368;(function(_0x2814ef,_0x2138cb){const _0x15d0f7=a134_0x4368,_0x35e619=_0x2814ef();while(!![]){try{const _0xf3366d=-parseInt(_0x15d0f7(0xda))/0x1*(parseInt(_0x15d0f7(0xe5))/0x2)+parseInt(_0x15d0f7(0xd4))/0x3+-parseInt(_0x15d0f7(0xcb))/0x4+parseInt(_0x15d0f7(0xc7))/0x5+-parseInt(_0x15d0f7(0xc9))/0x6+-parseInt(_0x15d0f7(0xd0))/0x7+parseInt(_0x15d0f7(0xcd))/0x8*(parseInt(_0x15d0f7(0xe0))/0x9);if(_0xf3366d===_0x2138cb)break;else _0x35e619['push'](_0x35e619['shift']());}catch(_0x5ccb03){_0x35e619['push'](_0x35e619['shift']());}}}(a134_0x575c,0xe7c69));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a134_0x575c(){const _0x3cdb64=['2262808oGjycA','verification','readTimeout','POST','Created\x20notification\x20config\x20','7197225BxejCT','appCode','4819656GaaeNl',';\x20do\x20not\x20resubmit\x20automatically.','4552400zkboVK','notification_config_create_outcome_unknown','13110992jIzvnv','connectTimeout','verified','5961004dCuNse','planned','mutation','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','5386158yaDvrM','/notification/channel-config/create','endpointUrl','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','notification','isSafeInteger','1iBbMVX','channelType','config-create','channelConfig','Inspect\x20with\x20','document','9XewmQA','configCode',';\x20do\x20not\x20resubmit.','configName','create'];a134_0x575c=function(){return _0x3cdb64;};return a134_0x575c();}import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a134_0x5d9504(0xd5);function a134_0x4368(_0xcf468,_0x3f59be){_0xcf468=_0xcf468-0xc3;const _0x575cb9=a134_0x575c();let _0x4368d2=_0x575cb9[_0xcf468];return _0x4368d2;}async function prepareCreate(_0x13079c){const _0x3c80f1=a134_0x5d9504,_0x21bb4c=await readNotificationDocument(_0x13079c,_0x3c80f1(0xe4)),_0xed7960=createMutationInput(_0x13079c['appCode'],_0x21bb4c);return{'document':_0x21bb4c,'input':_0xed7960,'planned':projectNotificationConfig({'appCode':_0x13079c[_0x3c80f1(0xc8)],'configName':_0x21bb4c[_0x3c80f1(0xe3)],'channelType':_0x21bb4c['channelType'],'endpointUrl':_0x21bb4c[_0x3c80f1(0xd6)],'channelConfig':_0x21bb4c[_0x3c80f1(0xdd)],'description':_0x21bb4c['description'],'connectTimeout':_0x21bb4c[_0x3c80f1(0xce)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x21bb4c[_0x3c80f1(0xc4)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a134_0x5d9504(0xd8),'command':a134_0x5d9504(0xdc),'description':a134_0x5d9504(0xd3),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x35bf70){assertSingleNotificationSource(_0x35bf70);},async 'dryRun'(_0x26159f){const _0x3bcf74=a134_0x5d9504,_0x21690c=await prepareCreate(_0x26159f),_0x288357=notificationLookupCommand(_0x26159f[_0x3bcf74(0xc8)],_0x21690c[_0x3bcf74(0xdf)][_0x3bcf74(0xdb)]);return asDryRunResult({'operation':_0x3bcf74(0xe4),'selector':{'appCode':_0x26159f['appCode'],'configName':_0x21690c[_0x3bcf74(0xdf)]['configName'],'channelType':_0x21690c[_0x3bcf74(0xdf)][_0x3bcf74(0xdb)]},'before':null,'after':_0x21690c[_0x3bcf74(0xd1)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3bcf74(0xd1),'lookupCommand':_0x288357}},{'method':_0x3bcf74(0xc5),'url':CREATE_PATH});},async 'execute'(_0x4745d3){const _0x45e0b0=a134_0x5d9504,_0x404056=await prepareCreate(_0x4745d3),_0x2073dd=notificationLookupCommand(_0x4745d3[_0x45e0b0(0xc8)],_0x404056[_0x45e0b0(0xdf)]['channelType']);let _0x3b4b1f;try{_0x3b4b1f=await createNotificationChannelConfig(_0x404056['input']);}catch(_0x5dc486){if(isPlatformTransportFailure(_0x5dc486))throw notificationError(_0x45e0b0(0xcc),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',_0x45e0b0(0xde)+_0x2073dd+_0x45e0b0(0xe2));throw safeApiFailure(_0x45e0b0(0xe4),_0x45e0b0(0xd2),_0x45e0b0(0xde)+_0x2073dd+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0x45e0b0(0xd9)](_0x3b4b1f)||_0x3b4b1f<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x45e0b0(0xd7),_0x45e0b0(0xde)+_0x2073dd+_0x45e0b0(0xe2));let _0x32e26d;try{const _0x3ae744=await getNotificationChannelConfig(_0x3b4b1f,_0x4745d3['appCode']);_0x32e26d=normalizeExactNotificationConfig(_0x3ae744,_0x3b4b1f,_0x4745d3[_0x45e0b0(0xc8)]);}catch{throw safeApiFailure(_0x45e0b0(0xe4),_0x45e0b0(0xc3),'Inspect\x20with\x20'+_0x2073dd+_0x45e0b0(0xca));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x32e26d[_0x45e0b0(0xc8)],'id':_0x32e26d['id'],'configCode':_0x32e26d[_0x45e0b0(0xe1)],'configName':_0x32e26d[_0x45e0b0(0xe3)],'channelType':_0x32e26d['channelType']},'before':null,'after':projectNotificationConfig(_0x32e26d),'dryRun':![],'backend':{'method':_0x45e0b0(0xc5),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x45e0b0(0xcf),'lookupCommand':_0x2073dd}},'message':_0x45e0b0(0xc6)+_0x32e26d['id']};}};
1
+ const a135_0x5366da=a135_0x2b24;function a135_0x2b24(_0x45f1fd,_0x5b30ff){_0x45f1fd=_0x45f1fd-0x16a;const _0x2ffb0c=a135_0x2ffb();let _0x2b24b7=_0x2ffb0c[_0x45f1fd];return _0x2b24b7;}(function(_0x2bffb7,_0x321548){const _0x3ab9be=a135_0x2b24,_0x97dee3=_0x2bffb7();while(!![]){try{const _0x24b60c=-parseInt(_0x3ab9be(0x18b))/0x1*(-parseInt(_0x3ab9be(0x180))/0x2)+parseInt(_0x3ab9be(0x179))/0x3+parseInt(_0x3ab9be(0x18a))/0x4+parseInt(_0x3ab9be(0x186))/0x5*(-parseInt(_0x3ab9be(0x183))/0x6)+-parseInt(_0x3ab9be(0x189))/0x7*(-parseInt(_0x3ab9be(0x171))/0x8)+parseInt(_0x3ab9be(0x172))/0x9+-parseInt(_0x3ab9be(0x16d))/0xa;if(_0x24b60c===_0x321548)break;else _0x97dee3['push'](_0x97dee3['shift']());}catch(_0x453d04){_0x97dee3['push'](_0x97dee3['shift']());}}}(a135_0x2ffb,0x2d04f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a135_0x5366da(0x187);async function prepareCreate(_0x49a1bb){const _0xe286bb=a135_0x5366da,_0x30b96b=await readNotificationDocument(_0x49a1bb,_0xe286bb(0x177)),_0xc6074b=createMutationInput(_0x49a1bb['appCode'],_0x30b96b);return{'document':_0x30b96b,'input':_0xc6074b,'planned':projectNotificationConfig({'appCode':_0x49a1bb[_0xe286bb(0x174)],'configName':_0x30b96b[_0xe286bb(0x185)],'channelType':_0x30b96b[_0xe286bb(0x17b)],'endpointUrl':_0x30b96b[_0xe286bb(0x184)],'channelConfig':_0x30b96b[_0xe286bb(0x17d)],'description':_0x30b96b['description'],'connectTimeout':_0x30b96b['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x30b96b['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a135_0x5366da(0x17a),'command':'config-create','description':a135_0x5366da(0x175),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x484ef0){assertSingleNotificationSource(_0x484ef0);},async 'dryRun'(_0x66bd5e){const _0x1c23f8=a135_0x5366da,_0x4497fe=await prepareCreate(_0x66bd5e),_0x54d143=notificationLookupCommand(_0x66bd5e[_0x1c23f8(0x174)],_0x4497fe['document'][_0x1c23f8(0x17b)]);return asDryRunResult({'operation':_0x1c23f8(0x177),'selector':{'appCode':_0x66bd5e[_0x1c23f8(0x174)],'configName':_0x4497fe['document'][_0x1c23f8(0x185)],'channelType':_0x4497fe['document']['channelType']},'before':null,'after':_0x4497fe[_0x1c23f8(0x181)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x54d143}},{'method':_0x1c23f8(0x188),'url':CREATE_PATH});},async 'execute'(_0x5bfa6d){const _0x3cc62e=a135_0x5366da,_0x1c61b3=await prepareCreate(_0x5bfa6d),_0x258d66=notificationLookupCommand(_0x5bfa6d[_0x3cc62e(0x174)],_0x1c61b3[_0x3cc62e(0x170)][_0x3cc62e(0x17b)]);let _0x5885bd;try{_0x5885bd=await createNotificationChannelConfig(_0x1c61b3[_0x3cc62e(0x17c)]);}catch(_0x51cfb0){if(isPlatformTransportFailure(_0x51cfb0))throw notificationError(_0x3cc62e(0x182),_0x3cc62e(0x17e),_0x3cc62e(0x176)+_0x258d66+_0x3cc62e(0x16e));throw safeApiFailure(_0x3cc62e(0x177),_0x3cc62e(0x173),_0x3cc62e(0x176)+_0x258d66+_0x3cc62e(0x16c));}if(!Number[_0x3cc62e(0x18d)](_0x5885bd)||_0x5885bd<=0x0)throw notificationError(_0x3cc62e(0x182),_0x3cc62e(0x16a),'Inspect\x20with\x20'+_0x258d66+_0x3cc62e(0x16e));let _0x46793e;try{const _0x11f834=await getNotificationChannelConfig(_0x5885bd,_0x5bfa6d['appCode']);_0x46793e=normalizeExactNotificationConfig(_0x11f834,_0x5885bd,_0x5bfa6d[_0x3cc62e(0x174)]);}catch{throw safeApiFailure('create',_0x3cc62e(0x178),_0x3cc62e(0x176)+_0x258d66+_0x3cc62e(0x17f));}return{'ok':!![],'data':{'operation':_0x3cc62e(0x177),'selector':{'appCode':_0x46793e[_0x3cc62e(0x174)],'id':_0x46793e['id'],'configCode':_0x46793e[_0x3cc62e(0x18c)],'configName':_0x46793e['configName'],'channelType':_0x46793e['channelType']},'before':null,'after':projectNotificationConfig(_0x46793e),'dryRun':![],'backend':{'method':_0x3cc62e(0x188),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3cc62e(0x16b),'lookupCommand':_0x258d66}},'message':_0x3cc62e(0x16f)+_0x46793e['id']};}};function a135_0x2ffb(){const _0x316ebe=['3996YGwxtz','planned','notification_config_create_outcome_unknown','1218mGRHFN','endpointUrl','configName','6665PBGGSy','/notification/channel-config/create','POST','698677sXYDgO','658364dmJOcc','23kAXrMk','configCode','isSafeInteger','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','verified',';\x20no\x20automatic\x20retry\x20was\x20attempted.','3134130jwwuvf',';\x20do\x20not\x20resubmit.','Created\x20notification\x20config\x20','document','16zWyPRu','1464543AIHxFj','mutation','appCode','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','Inspect\x20with\x20','create','verification','586551eqyIYq','notification','channelType','input','channelConfig','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',';\x20do\x20not\x20resubmit\x20automatically.'];a135_0x2ffb=function(){return _0x316ebe;};return a135_0x2ffb();}
@@ -1 +1 @@
1
- const a135_0x50a90a=a135_0x253b;(function(_0x3d931d,_0x51e1d5){const _0x14bba5=a135_0x253b,_0x1bddfa=_0x3d931d();while(!![]){try{const _0x325ac8=-parseInt(_0x14bba5(0x133))/0x1+parseInt(_0x14bba5(0x120))/0x2+-parseInt(_0x14bba5(0x132))/0x3+parseInt(_0x14bba5(0x134))/0x4+-parseInt(_0x14bba5(0x118))/0x5*(-parseInt(_0x14bba5(0x123))/0x6)+-parseInt(_0x14bba5(0x11f))/0x7+parseInt(_0x14bba5(0x12f))/0x8;if(_0x325ac8===_0x51e1d5)break;else _0x1bddfa['push'](_0x1bddfa['shift']());}catch(_0x4f60bb){_0x1bddfa['push'](_0x1bddfa['shift']());}}}(a135_0x7a52,0x65b50));function a135_0x7a52(){const _0x3f9ca2=['Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','high-risk-write','Notification\x20config\x20','5405687NtpbES','1441602vHJYDA','delete','verified','7884qUdSHt',';\x20do\x20not\x20resubmit\x20automatically.','Inspect\x20with\x20','unshift','mutation','some','\x20remains\x20present\x20after\x20delete.','notification','notification_config_delete_outcome_unknown','channelType','\x20delete\x20could\x20not\x20be\x20verified.','POST','10228160TyWZco',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','2215824FjFzlc','152561tBcpZu','291188DyfsdY','30lACRAC','appCode','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','before'];a135_0x7a52=function(){return _0x3f9ca2;};return a135_0x7a52();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a135_0x253b(_0x292632,_0x1d1c14){_0x292632=_0x292632-0x118;const _0x7a52da=a135_0x7a52();let _0x253bc8=_0x7a52da[_0x292632];return _0x253bc8;}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH='/notification/channel-config/delete',REFERENCE_WARNING=a135_0x50a90a(0x131);async function prepareDelete(_0x8a9ebb){const _0x527a77=a135_0x50a90a,_0x2b5ed8=readNotificationId(_0x8a9ebb),_0x59b5b8=await requireExactNotificationConfig(_0x8a9ebb[_0x527a77(0x119)],_0x2b5ed8,_0x527a77(0x121));return{'id':_0x2b5ed8,'before':_0x59b5b8};}export const notificationConfigDelete={'service':a135_0x50a90a(0x12a),'command':'config-delete','description':a135_0x50a90a(0x11a),'risk':a135_0x50a90a(0x11d),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x572308){readNotificationId(_0x572308),requireNotificationExplicitYes(_0x572308);},async 'dryRun'(_0x215022){const _0x4c0048=a135_0x50a90a,_0x12f888=await prepareDelete(_0x215022),_0x3f9242=notificationLookupCommand(_0x215022[_0x4c0048(0x119)],_0x12f888[_0x4c0048(0x11b)][_0x4c0048(0x12c)]);return asDryRunResult({'operation':_0x4c0048(0x121),'selector':notificationSelector(_0x12f888[_0x4c0048(0x11b)]),'before':projectNotificationConfig(_0x12f888[_0x4c0048(0x11b)]),'after':null,'dryRun':!![],'backend':{'method':_0x4c0048(0x12e),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x3f9242}},{'method':_0x4c0048(0x12e),'url':DELETE_PATH});},async 'execute'(_0x3f612c){const _0x533e76=a135_0x50a90a;requireNotificationExplicitYes(_0x3f612c);const _0x3e035c=await prepareDelete(_0x3f612c),_0x4755f5=notificationLookupCommand(_0x3f612c['appCode'],_0x3e035c[_0x533e76(0x11b)]['channelType']);let _0x37d7c6=![];try{await deleteNotificationChannelConfig(_0x3e035c['id'],_0x3f612c[_0x533e76(0x119)]);}catch(_0x3a9d48){if(!isPlatformTransportFailure(_0x3a9d48))throw safeApiFailure(_0x533e76(0x121),_0x533e76(0x127),_0x533e76(0x125)+_0x4755f5+_0x533e76(0x130));_0x37d7c6=!![];}let _0x12b6f7;try{_0x12b6f7=await listNotificationChannelConfigs(_0x3f612c[_0x533e76(0x119)],_0x3e035c[_0x533e76(0x11b)][_0x533e76(0x12c)]),validateNotificationDeleteReadback(_0x12b6f7,_0x3f612c[_0x533e76(0x119)],_0x3e035c[_0x533e76(0x11b)][_0x533e76(0x12c)]);}catch{throw notificationError(_0x37d7c6?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x533e76(0x11e)+_0x3e035c['id']+_0x533e76(0x12d),_0x533e76(0x125)+_0x4755f5+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x12b6f7[_0x533e76(0x128)](_0x1554a8=>_0x1554a8['id']===_0x3e035c['id']))throw notificationError(_0x37d7c6?_0x533e76(0x12b):'notification_config_delete_verification_failed','Notification\x20config\x20'+_0x3e035c['id']+_0x533e76(0x129),_0x533e76(0x125)+_0x4755f5+_0x533e76(0x124));const _0x56da08=[REFERENCE_WARNING];return _0x37d7c6&&_0x56da08[_0x533e76(0x126)](_0x533e76(0x11c)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x3e035c[_0x533e76(0x11b)]),'before':projectNotificationConfig(_0x3e035c[_0x533e76(0x11b)]),'after':null,'dryRun':![],'backend':{'method':_0x533e76(0x12e),'path':DELETE_PATH},'warnings':_0x56da08,'verification':{'status':_0x533e76(0x122),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x37d7c6,'lookupCommand':_0x4755f5}},'message':'Deleted\x20notification\x20config\x20'+_0x3e035c['id']};}};
1
+ const a136_0x57f9b6=a136_0xea1d;function a136_0x1076(){const _0x233e3e=['669339zRslNu','channelType','delete','notification','\x20delete\x20could\x20not\x20be\x20verified.','24HHEWJl','high-risk-write','verified','\x20remains\x20present\x20after\x20delete.','config-delete','notification_config_delete_outcome_unknown','notification_config_delete_verification_failed','before','4luosjD','3747512tzaYEp','299836PlJZOL','193772BERaAI','2288839JjgNLq','planned','2161360NemVFV','18JTiyoe','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight',';\x20do\x20not\x20resubmit\x20automatically.','Deleted\x20notification\x20config\x20','POST','appCode','Inspect\x20with\x20','some','21895610BUgjSZ',';\x20no\x20automatic\x20retry\x20was\x20attempted.','notification_config_delete_verification_unavailable','Notification\x20config\x20','/notification/channel-config/delete'];a136_0x1076=function(){return _0x233e3e;};return a136_0x1076();}(function(_0x3c1571,_0x389527){const _0x3251ed=a136_0xea1d,_0x35d21a=_0x3c1571();while(!![]){try{const _0x1f4763=parseInt(_0x3251ed(0xc5))/0x1*(parseInt(_0x3251ed(0xc3))/0x2)+-parseInt(_0x3251ed(0xb6))/0x3+-parseInt(_0x3251ed(0xc6))/0x4+parseInt(_0x3251ed(0xa8))/0x5+-parseInt(_0x3251ed(0xbb))/0x6*(parseInt(_0x3251ed(0xc7))/0x7)+parseInt(_0x3251ed(0xc4))/0x8*(-parseInt(_0x3251ed(0xa9))/0x9)+parseInt(_0x3251ed(0xb1))/0xa;if(_0x1f4763===_0x389527)break;else _0x35d21a['push'](_0x35d21a['shift']());}catch(_0x23bf44){_0x35d21a['push'](_0x35d21a['shift']());}}}(a136_0x1076,0xac28b));import{asDryRunResult}from'../../commands/common/dry-run.js';function a136_0xea1d(_0x5545a9,_0x566661){_0x5545a9=_0x5545a9-0xa8;const _0x1076e1=a136_0x1076();let _0xea1d8e=_0x1076e1[_0x5545a9];return _0xea1d8e;}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a136_0x57f9b6(0xb5),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x5402b6){const _0x393b14=a136_0x57f9b6,_0x54581a=readNotificationId(_0x5402b6),_0x268751=await requireExactNotificationConfig(_0x5402b6[_0x393b14(0xae)],_0x54581a,'delete');return{'id':_0x54581a,'before':_0x268751};}export const notificationConfigDelete={'service':a136_0x57f9b6(0xb9),'command':a136_0x57f9b6(0xbf),'description':a136_0x57f9b6(0xaa),'risk':a136_0x57f9b6(0xbc),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x3fc066){readNotificationId(_0x3fc066),requireNotificationExplicitYes(_0x3fc066);},async 'dryRun'(_0x54c08f){const _0x222bd1=a136_0x57f9b6,_0x28c936=await prepareDelete(_0x54c08f),_0x574afa=notificationLookupCommand(_0x54c08f[_0x222bd1(0xae)],_0x28c936[_0x222bd1(0xc2)][_0x222bd1(0xb7)]);return asDryRunResult({'operation':_0x222bd1(0xb8),'selector':notificationSelector(_0x28c936[_0x222bd1(0xc2)]),'before':projectNotificationConfig(_0x28c936['before']),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x222bd1(0xc8),'lookupCommand':_0x574afa}},{'method':_0x222bd1(0xad),'url':DELETE_PATH});},async 'execute'(_0x4e2b0f){const _0x33784e=a136_0x57f9b6;requireNotificationExplicitYes(_0x4e2b0f);const _0x48f975=await prepareDelete(_0x4e2b0f),_0x1b0e18=notificationLookupCommand(_0x4e2b0f[_0x33784e(0xae)],_0x48f975[_0x33784e(0xc2)][_0x33784e(0xb7)]);let _0x299903=![];try{await deleteNotificationChannelConfig(_0x48f975['id'],_0x4e2b0f[_0x33784e(0xae)]);}catch(_0x2a9d63){if(!isPlatformTransportFailure(_0x2a9d63))throw safeApiFailure(_0x33784e(0xb8),'mutation',_0x33784e(0xaf)+_0x1b0e18+_0x33784e(0xb2));_0x299903=!![];}let _0x3c6b9b;try{_0x3c6b9b=await listNotificationChannelConfigs(_0x4e2b0f[_0x33784e(0xae)],_0x48f975[_0x33784e(0xc2)][_0x33784e(0xb7)]),validateNotificationDeleteReadback(_0x3c6b9b,_0x4e2b0f[_0x33784e(0xae)],_0x48f975[_0x33784e(0xc2)][_0x33784e(0xb7)]);}catch{throw notificationError(_0x299903?_0x33784e(0xc0):_0x33784e(0xb3),_0x33784e(0xb4)+_0x48f975['id']+_0x33784e(0xba),_0x33784e(0xaf)+_0x1b0e18+_0x33784e(0xab));}if(_0x3c6b9b[_0x33784e(0xb0)](_0x4fbaf5=>_0x4fbaf5['id']===_0x48f975['id']))throw notificationError(_0x299903?_0x33784e(0xc0):_0x33784e(0xc1),_0x33784e(0xb4)+_0x48f975['id']+_0x33784e(0xbe),_0x33784e(0xaf)+_0x1b0e18+';\x20do\x20not\x20resubmit\x20automatically.');const _0x383db7=[REFERENCE_WARNING];return _0x299903&&_0x383db7['unshift']('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x33784e(0xb8),'selector':notificationSelector(_0x48f975[_0x33784e(0xc2)]),'before':projectNotificationConfig(_0x48f975[_0x33784e(0xc2)]),'after':null,'dryRun':![],'backend':{'method':_0x33784e(0xad),'path':DELETE_PATH},'warnings':_0x383db7,'verification':{'status':_0x33784e(0xbd),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x299903,'lookupCommand':_0x1b0e18}},'message':_0x33784e(0xac)+_0x48f975['id']};}};
@@ -1 +1 @@
1
- const a136_0x111fe1=a136_0xde54;(function(_0x2f7951,_0x39e155){const _0x5bbe2a=a136_0xde54,_0x12e1f2=_0x2f7951();while(!![]){try{const _0x5bbf03=parseInt(_0x5bbe2a(0xdb))/0x1+-parseInt(_0x5bbe2a(0xde))/0x2*(parseInt(_0x5bbe2a(0xd5))/0x3)+parseInt(_0x5bbe2a(0xdd))/0x4+-parseInt(_0x5bbe2a(0xd3))/0x5*(-parseInt(_0x5bbe2a(0xe4))/0x6)+-parseInt(_0x5bbe2a(0xdc))/0x7*(parseInt(_0x5bbe2a(0xd4))/0x8)+parseInt(_0x5bbe2a(0xd7))/0x9+-parseInt(_0x5bbe2a(0xe3))/0xa;if(_0x5bbf03===_0x39e155)break;else _0x12e1f2['push'](_0x12e1f2['shift']());}catch(_0x125626){_0x12e1f2['push'](_0x12e1f2['shift']());}}}(a136_0x3555,0x9eee8));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a136_0xde54(_0x560c87,_0x3894cc){_0x560c87=_0x560c87-0xd2;const _0x355503=a136_0x3555();let _0xde54e0=_0x355503[_0x560c87];return _0xde54e0;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a136_0x111fe1(0xd6),'description':a136_0x111fe1(0xdf),'risk':a136_0x111fe1(0xe2),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a136_0x111fe1(0xd8),'description':a136_0x111fe1(0xe1),'enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x158b1c){readNotificationChannelType(_0x158b1c);},async 'execute'(_0x217a59){const _0x4d091b=a136_0x111fe1,_0x546301=readNotificationChannelType(_0x217a59),_0x293335=await listNotificationChannelConfigs(_0x217a59[_0x4d091b(0xe0)],_0x546301),_0x4629c4=_0x293335[_0x4d091b(0xd9)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x217a59[_0x4d091b(0xe0)],'channelType':_0x546301,'count':_0x4629c4[_0x4d091b(0xda)],'configs':_0x4629c4},'message':_0x4d091b(0xd2)+_0x4629c4[_0x4d091b(0xda)]+'\x20'+_0x546301+'\x20notification\x20config(s)'};}};function a136_0x3555(){const _0x29d43f=['List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','appCode','Notification\x20channel\x20type','read','13061770yGsyIE','12GpLzsw','Found\x20','1470375LxCMMR','1317944pLcckD','12oELQdu','config-list','7461666DyZExa','string','map','length','1052267aFVCjk','28SQcQUy','2554056rLlcPX','245936DpSYpY'];a136_0x3555=function(){return _0x29d43f;};return a136_0x3555();}
1
+ const a137_0x189e42=a137_0x12e5;(function(_0x235af,_0x5c98da){const _0x4dd8b1=a137_0x12e5,_0x2d54c7=_0x235af();while(!![]){try{const _0x436355=parseInt(_0x4dd8b1(0x15e))/0x1+parseInt(_0x4dd8b1(0x157))/0x2*(-parseInt(_0x4dd8b1(0x155))/0x3)+-parseInt(_0x4dd8b1(0x151))/0x4+-parseInt(_0x4dd8b1(0x150))/0x5*(parseInt(_0x4dd8b1(0x156))/0x6)+-parseInt(_0x4dd8b1(0x15b))/0x7*(parseInt(_0x4dd8b1(0x158))/0x8)+parseInt(_0x4dd8b1(0x15f))/0x9*(-parseInt(_0x4dd8b1(0x15c))/0xa)+parseInt(_0x4dd8b1(0x153))/0xb;if(_0x436355===_0x5c98da)break;else _0x2d54c7['push'](_0x2d54c7['shift']());}catch(_0x3cde53){_0x2d54c7['push'](_0x2d54c7['shift']());}}}(a137_0x2d23,0x6359e));function a137_0x12e5(_0x4e5644,_0x51cc5f){_0x4e5644=_0x4e5644-0x14f;const _0x2d23da=a137_0x2d23();let _0x12e5bd=_0x2d23da[_0x4e5644];return _0x12e5bd;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a137_0x2d23(){const _0xbd748b=['7095OXjpXa','642fDtfZL','466jpwgBs','6194984bdYnaZ','EMAIL','appCode','7hLzEbv','72470Qpzcmd','read','33346eqHmdK','171uLTLVA','Notification\x20channel\x20type','37210TjDvjP','2116780IVOZLy','length','34784156Aevytx','\x20notification\x20config(s)'];a137_0x2d23=function(){return _0xbd748b;};return a137_0x2d23();}export const notificationConfigList={'service':'notification','command':'config-list','description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a137_0x189e42(0x15d),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','description':a137_0x189e42(0x14f),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a137_0x189e42(0x159)}],async 'validate'(_0x1aaa2f){readNotificationChannelType(_0x1aaa2f);},async 'execute'(_0x2f24d5){const _0x872090=a137_0x189e42,_0x36580b=readNotificationChannelType(_0x2f24d5),_0x395d9a=await listNotificationChannelConfigs(_0x2f24d5[_0x872090(0x15a)],_0x36580b),_0x1d4b33=_0x395d9a['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2f24d5[_0x872090(0x15a)],'channelType':_0x36580b,'count':_0x1d4b33[_0x872090(0x152)],'configs':_0x1d4b33},'message':'Found\x20'+_0x1d4b33[_0x872090(0x152)]+'\x20'+_0x36580b+_0x872090(0x154)};}};
@@ -1 +1 @@
1
- function a137_0x2e9b(){const _0x1d2df8=['1754765cEnFwS','notification_config_update_verification_unavailable','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','12YlAIzK','Notification\x20config\x20','before','11mrXfQN','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','high-risk-write','1994193DPitEM','appCode','patch','channelType','verifiedFields','allMatch','verified','planned','8sQfRSm','mutation','config-update','16006850DrIkwB','157087qUoGWZ','notification','POST','notification_config_update_outcome_unknown','payload','notification_config_update_verification_failed','2ukobnS','\x20via\x20','2217921uzekWn','264416tvtFbR','Inspect\x20ID\x20','3360200aPVXte','update',';\x20do\x20not\x20resubmit\x20automatically.','Updated\x20notification\x20config\x20','Inspect\x20with\x20--id\x20','provesChange','/notification/channel-config/update'];a137_0x2e9b=function(){return _0x1d2df8;};return a137_0x2e9b();}const a137_0x4bce88=a137_0x5ad5;(function(_0x14fbe7,_0x2a5c24){const _0x3fb2ca=a137_0x5ad5,_0x57053f=_0x14fbe7();while(!![]){try{const _0x4def18=parseInt(_0x3fb2ca(0xdf))/0x1+-parseInt(_0x3fb2ca(0xdc))/0x2*(parseInt(_0x3fb2ca(0xde))/0x3)+-parseInt(_0x3fb2ca(0xe1))/0x4+parseInt(_0x3fb2ca(0xe8))/0x5+-parseInt(_0x3fb2ca(0xeb))/0x6*(-parseInt(_0x3fb2ca(0xd6))/0x7)+-parseInt(_0x3fb2ca(0xd2))/0x8*(parseInt(_0x3fb2ca(0xca))/0x9)+parseInt(_0x3fb2ca(0xd5))/0xa*(parseInt(_0x3fb2ca(0xee))/0xb);if(_0x4def18===_0x2a5c24)break;else _0x57053f['push'](_0x57053f['shift']());}catch(_0x1290ab){_0x57053f['push'](_0x57053f['shift']());}}}(a137_0x2e9b,0x704e2));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a137_0x4bce88(0xe7);async function prepareUpdate(_0x3499ae){const _0x536f2e=a137_0x4bce88,_0x4548b0=readNotificationId(_0x3499ae),_0x5b7163=await readNotificationDocument(_0x3499ae,'update'),_0x95e647=await requireExactNotificationConfig(_0x3499ae[_0x536f2e(0xcb)],_0x4548b0,_0x536f2e(0xe2));return{'id':_0x4548b0,'patch':_0x5b7163,'before':_0x95e647,'payload':mergeUpdateInput(_0x95e647,_0x5b7163),'planned':plannedUpdateProjection(_0x95e647,_0x5b7163)};}function a137_0x5ad5(_0x5da6db,_0x4d555f){_0x5da6db=_0x5da6db-0xc8;const _0x2e9bdf=a137_0x2e9b();let _0x5ad542=_0x2e9bdf[_0x5da6db];return _0x5ad542;}export const notificationConfigUpdate={'service':a137_0x4bce88(0xd7),'command':a137_0x4bce88(0xd4),'description':a137_0x4bce88(0xea),'risk':a137_0x4bce88(0xc9),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x26ad36){readNotificationId(_0x26ad36),assertSingleNotificationSource(_0x26ad36),requireNotificationExplicitYes(_0x26ad36);},async 'dryRun'(_0x4e85ac){const _0x5b34d2=a137_0x4bce88,_0x3704e6=await prepareUpdate(_0x4e85ac),_0x3838e8=notificationLookupCommand(_0x4e85ac[_0x5b34d2(0xcb)],_0x3704e6[_0x5b34d2(0xed)][_0x5b34d2(0xcd)]);return asDryRunResult({'operation':_0x5b34d2(0xe2),'selector':notificationSelector(_0x3704e6[_0x5b34d2(0xed)]),'before':projectNotificationConfig(_0x3704e6['before']),'after':_0x3704e6[_0x5b34d2(0xd1)],'dryRun':!![],'backend':{'method':_0x5b34d2(0xd8),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x5b34d2(0xd1),'lookupCommand':_0x3838e8}},{'method':_0x5b34d2(0xd8),'url':UPDATE_PATH});},async 'execute'(_0x3276fe){const _0x104ac1=a137_0x4bce88;requireNotificationExplicitYes(_0x3276fe);const _0x138e74=await prepareUpdate(_0x3276fe),_0x389f90=notificationLookupCommand(_0x3276fe['appCode'],_0x138e74['before'][_0x104ac1(0xcd)]);let _0x5e06cb=![];try{await updateNotificationChannelConfig(_0x138e74[_0x104ac1(0xda)]);}catch(_0x2c6a42){if(!isPlatformTransportFailure(_0x2c6a42))throw safeApiFailure(_0x104ac1(0xe2),_0x104ac1(0xd3),_0x104ac1(0xe0)+_0x138e74['id']+'\x20with\x20'+_0x389f90+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x5e06cb=!![];}let _0x5305b5;try{const _0x462f53=await getNotificationChannelConfig(_0x138e74['id'],_0x3276fe[_0x104ac1(0xcb)]);_0x5305b5=normalizeExactNotificationConfig(_0x462f53,_0x138e74['id'],_0x3276fe['appCode']);}catch{throw notificationError(_0x5e06cb?'notification_config_update_outcome_unknown':_0x104ac1(0xe9),_0x104ac1(0xec)+_0x138e74['id']+_0x104ac1(0xc8),_0x104ac1(0xe5)+_0x138e74['id']+'\x20via\x20'+_0x389f90+_0x104ac1(0xe3));}const _0xb345=requestedSafeFieldsMatch(_0x138e74[_0x104ac1(0xed)],_0x5305b5,_0x138e74[_0x104ac1(0xcc)]);if(!_0xb345[_0x104ac1(0xcf)]||_0x5e06cb&&!_0xb345[_0x104ac1(0xe6)])throw notificationError(_0x5e06cb?_0x104ac1(0xd9):_0x104ac1(0xdb),_0x104ac1(0xec)+_0x138e74['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x104ac1(0xe5)+_0x138e74['id']+_0x104ac1(0xdd)+_0x389f90+_0x104ac1(0xe3));const _0x44f5b2=_0x5e06cb?[_0x104ac1(0xef)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x5305b5),'before':projectNotificationConfig(_0x138e74[_0x104ac1(0xed)]),'after':projectNotificationConfig(_0x5305b5),'dryRun':![],'backend':{'method':_0x104ac1(0xd8),'path':UPDATE_PATH},'warnings':_0x44f5b2,'verification':{'status':_0x104ac1(0xd0),'recoveredAfterUnknownResponse':_0x5e06cb,'verifiedFields':_0xb345[_0x104ac1(0xce)],'lookupCommand':_0x389f90}},'message':_0x104ac1(0xe4)+_0x5305b5['id']};}};
1
+ const a138_0x4943cb=a138_0x13f4;function a138_0x388a(){const _0x540bbe=['provesChange','channelType','before','mutation','Inspect\x20ID\x20','60843VJDGby','5560fLqfBu','verifiedFields','Updated\x20notification\x20config\x20','58IFgsjO','notification_config_update_outcome_unknown','972nMRxGw','payload',';\x20do\x20not\x20resubmit\x20automatically.','372948BqEHjh','2992432TaTTpg','18592kMBIUp','notification_config_update_verification_unavailable','appCode','planned','7536617kzpJHr','update','\x20via\x20','patch','notification_config_update_verification_failed','Notification\x20config\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20with\x20','/notification/channel-config/update','POST','823040FhoQlO','15ZAWMZC','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','36SuAiTd','Inspect\x20with\x20--id\x20','13761TRaJty'];a138_0x388a=function(){return _0x540bbe;};return a138_0x388a();}(function(_0x21f870,_0x566285){const _0x300779=a138_0x13f4,_0x11c3b0=_0x21f870();while(!![]){try{const _0x2502f0=parseInt(_0x300779(0xa3))/0x1+-parseInt(_0x300779(0xb2))/0x2*(-parseInt(_0x300779(0xae))/0x3)+-parseInt(_0x300779(0xb7))/0x4*(-parseInt(_0x300779(0xa4))/0x5)+parseInt(_0x300779(0xb4))/0x6*(-parseInt(_0x300779(0xb9))/0x7)+parseInt(_0x300779(0xb8))/0x8+parseInt(_0x300779(0xa8))/0x9*(parseInt(_0x300779(0xaf))/0xa)+-parseInt(_0x300779(0x99))/0xb*(parseInt(_0x300779(0xa6))/0xc);if(_0x2502f0===_0x566285)break;else _0x11c3b0['push'](_0x11c3b0['shift']());}catch(_0x1bddbe){_0x11c3b0['push'](_0x11c3b0['shift']());}}}(a138_0x388a,0x68d35));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a138_0x4943cb(0xa1);async function prepareUpdate(_0x25fbb8){const _0xf517d4=a138_0x4943cb,_0x228b2d=readNotificationId(_0x25fbb8),_0x558706=await readNotificationDocument(_0x25fbb8,_0xf517d4(0x9a)),_0x5b36ed=await requireExactNotificationConfig(_0x25fbb8[_0xf517d4(0xbb)],_0x228b2d,_0xf517d4(0x9a));return{'id':_0x228b2d,'patch':_0x558706,'before':_0x5b36ed,'payload':mergeUpdateInput(_0x5b36ed,_0x558706),'planned':plannedUpdateProjection(_0x5b36ed,_0x558706)};}function a138_0x13f4(_0x4a8746,_0x27cff4){_0x4a8746=_0x4a8746-0x98;const _0x388a75=a138_0x388a();let _0x13f401=_0x388a75[_0x4a8746];return _0x13f401;}export const notificationConfigUpdate={'service':'notification','command':'config-update','description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x5daefd){readNotificationId(_0x5daefd),assertSingleNotificationSource(_0x5daefd),requireNotificationExplicitYes(_0x5daefd);},async 'dryRun'(_0x20105a){const _0x321ba8=a138_0x4943cb,_0x4c37fd=await prepareUpdate(_0x20105a),_0x534009=notificationLookupCommand(_0x20105a['appCode'],_0x4c37fd[_0x321ba8(0xab)][_0x321ba8(0xaa)]);return asDryRunResult({'operation':_0x321ba8(0x9a),'selector':notificationSelector(_0x4c37fd[_0x321ba8(0xab)]),'before':projectNotificationConfig(_0x4c37fd[_0x321ba8(0xab)]),'after':_0x4c37fd[_0x321ba8(0x98)],'dryRun':!![],'backend':{'method':_0x321ba8(0xa2),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x321ba8(0x98),'lookupCommand':_0x534009}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x2d216f){const _0x4448fe=a138_0x4943cb;requireNotificationExplicitYes(_0x2d216f);const _0x382535=await prepareUpdate(_0x2d216f),_0x4b340d=notificationLookupCommand(_0x2d216f[_0x4448fe(0xbb)],_0x382535['before'][_0x4448fe(0xaa)]);let _0x1fa907=![];try{await updateNotificationChannelConfig(_0x382535[_0x4448fe(0xb5)]);}catch(_0x49253e){if(!isPlatformTransportFailure(_0x49253e))throw safeApiFailure(_0x4448fe(0x9a),_0x4448fe(0xac),_0x4448fe(0xad)+_0x382535['id']+_0x4448fe(0xa0)+_0x4b340d+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x1fa907=!![];}let _0x493f58;try{const _0x5d12ed=await getNotificationChannelConfig(_0x382535['id'],_0x2d216f['appCode']);_0x493f58=normalizeExactNotificationConfig(_0x5d12ed,_0x382535['id'],_0x2d216f[_0x4448fe(0xbb)]);}catch{throw notificationError(_0x1fa907?_0x4448fe(0xb3):_0x4448fe(0xba),'Notification\x20config\x20'+_0x382535['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Inspect\x20with\x20--id\x20'+_0x382535['id']+_0x4448fe(0x9b)+_0x4b340d+_0x4448fe(0xb6));}const _0x40efc4=requestedSafeFieldsMatch(_0x382535['before'],_0x493f58,_0x382535[_0x4448fe(0x9c)]);if(!_0x40efc4['allMatch']||_0x1fa907&&!_0x40efc4[_0x4448fe(0xa9)])throw notificationError(_0x1fa907?'notification_config_update_outcome_unknown':_0x4448fe(0x9d),_0x4448fe(0x9e)+_0x382535['id']+_0x4448fe(0xa5),_0x4448fe(0xa7)+_0x382535['id']+_0x4448fe(0x9b)+_0x4b340d+_0x4448fe(0xb6));const _0x1db790=_0x1fa907?[_0x4448fe(0x9f)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x493f58),'before':projectNotificationConfig(_0x382535['before']),'after':projectNotificationConfig(_0x493f58),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x1db790,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x1fa907,'verifiedFields':_0x40efc4[_0x4448fe(0xb0)],'lookupCommand':_0x4b340d}},'message':_0x4448fe(0xb1)+_0x493f58['id']};}};
@@ -1 +1 @@
1
- function a138_0x5a65(_0xff28e9,_0x55dcfd){_0xff28e9=_0xff28e9-0xe7;const _0x1c109c=a138_0x1c10();let _0x5a652d=_0x1c109c[_0xff28e9];return _0x5a652d;}(function(_0x41a59f,_0x856eae){const _0x5a3092=a138_0x5a65,_0x39f455=_0x41a59f();while(!![]){try{const _0x33d3de=-parseInt(_0x5a3092(0xf0))/0x1*(parseInt(_0x5a3092(0xe7))/0x2)+parseInt(_0x5a3092(0xec))/0x3*(parseInt(_0x5a3092(0xe8))/0x4)+parseInt(_0x5a3092(0xef))/0x5+parseInt(_0x5a3092(0xee))/0x6+-parseInt(_0x5a3092(0xea))/0x7+parseInt(_0x5a3092(0xed))/0x8*(-parseInt(_0x5a3092(0xe9))/0x9)+parseInt(_0x5a3092(0xeb))/0xa;if(_0x33d3de===_0x856eae)break;else _0x39f455['push'](_0x39f455['shift']());}catch(_0x155bca){_0x39f455['push'](_0x39f455['shift']());}}}(a138_0x1c10,0x49b69));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a138_0x1c10(){const _0x6c0347=['16dUFKGn','1668168dIdVTP','850665NmxRZY','529786jQxevu','2wwgDEF','894508PtFpMo','2698857VvsrMn','84035IsuooC','7716780GipGXI','3jRTaPU'];a138_0x1c10=function(){return _0x6c0347;};return a138_0x1c10();}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ (function(_0x40e517,_0x1393ca){const _0x3a607c=a139_0x4183,_0x1e53f9=_0x40e517();while(!![]){try{const _0x2dd4e0=-parseInt(_0x3a607c(0x19c))/0x1*(parseInt(_0x3a607c(0x199))/0x2)+parseInt(_0x3a607c(0x19b))/0x3+parseInt(_0x3a607c(0x1a1))/0x4*(-parseInt(_0x3a607c(0x19e))/0x5)+-parseInt(_0x3a607c(0x19d))/0x6*(-parseInt(_0x3a607c(0x1a3))/0x7)+-parseInt(_0x3a607c(0x19a))/0x8+parseInt(_0x3a607c(0x1a0))/0x9*(parseInt(_0x3a607c(0x19f))/0xa)+parseInt(_0x3a607c(0x1a2))/0xb;if(_0x2dd4e0===_0x1393ca)break;else _0x1e53f9['push'](_0x1e53f9['shift']());}catch(_0x100bdc){_0x1e53f9['push'](_0x1e53f9['shift']());}}}(a139_0x56a3,0x59a1e));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a139_0x4183(_0x18eab1,_0x3a10cb){_0x18eab1=_0x18eab1-0x199;const _0x56a3b9=a139_0x56a3();let _0x418384=_0x56a3b9[_0x18eab1];return _0x418384;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a139_0x56a3(){const _0x33d099=['7OSmqtk','2ZRAoFa','300192GnILRk','1018794iOvDHL','239170PbGYKj','1065426Hcvcfl','5DfUmAK','1720BBCMEm','7200FpdqrN','1039340moAvWX','2737834eKfkNl'];a139_0x56a3=function(){return _0x33d099;};return a139_0x56a3();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
@@ -1 +1 @@
1
- const a139_0x216800=a139_0x2ea6;(function(_0x11fc61,_0x27d6ae){const _0x3f6787=a139_0x2ea6,_0x44c1f8=_0x11fc61();while(!![]){try{const _0x211e30=-parseInt(_0x3f6787(0x162))/0x1*(parseInt(_0x3f6787(0x1af))/0x2)+-parseInt(_0x3f6787(0x174))/0x3+parseInt(_0x3f6787(0x166))/0x4+parseInt(_0x3f6787(0x13c))/0x5*(-parseInt(_0x3f6787(0x16f))/0x6)+parseInt(_0x3f6787(0x14d))/0x7+parseInt(_0x3f6787(0x189))/0x8+-parseInt(_0x3f6787(0x172))/0x9*(-parseInt(_0x3f6787(0x1a0))/0xa);if(_0x211e30===_0x27d6ae)break;else _0x44c1f8['push'](_0x44c1f8['shift']());}catch(_0x2dc578){_0x44c1f8['push'](_0x44c1f8['shift']());}}}(a139_0x3eb1,0x561a0));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a139_0x216800(0x173),a139_0x216800(0x17b),a139_0x216800(0x199),a139_0x216800(0x13f),a139_0x216800(0x18e)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a139_0x216800(0x17e),a139_0x216800(0x14e),'endpointUrl','channelConfig',a139_0x216800(0x1b1),'connectTimeout','readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a139_0x216800(0x1bf),a139_0x216800(0x170),a139_0x216800(0x154)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets','recipients',a139_0x216800(0x1b4),a139_0x216800(0x1c2),a139_0x216800(0x1b7),a139_0x216800(0x1a3),a139_0x216800(0x150),'to','cc']);function a139_0x3eb1(){const _0x5307d5=['has','\x22channelType\x22.','\x20characters.','notification_config_response_invalid','appCode','Notification\x20JSON\x20channelConfig\x20field\x20\x22','boolean','bccList','153410IKzdez','mutation','a\x20non-empty\x20string','WECOM','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','name','\x20--format\x20compress','failed','Invalid\x20notification\x20config\x20response.','a\x20JSON\x20object','stringify','connectTimeout','\x22configName\x22.','Allowed\x20values:\x20','Notification\x20JSON\x20field\x20\x22','rabetbase\x20notification\x20config-list\x20--appcode\x20','channelConfigRaw','3040660ejhewa','channelType','\x22\x20must\x20be\x20a\x20non-empty\x20string.','fromName','isSafeInteger','Notification\x20config\x20list\x20item\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','channelCode','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20has\x20an\x20unsupported\x20channelType.','includes','trim','\x22\x20is\x20forbidden.','path','createTime','object','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','call','6718ZFSVQM','str','messageTemplate','length','2305324Nglfgu','endpointUrlRaw','\x20is\x20missing\x20required\x20field\x20\x22','\x20has\x20an\x20invalid\x20channelType.','kind','notification_config_','notification_config_source_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','isArray','114rToihj','configCode','readTimeout','660303gNpPZu','EMAIL','193431TSFOvM','some','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','parse','notification_config_update_empty','Missing\x20notification\x20JSON\x20source.','every','FEISHU','setEncoding','type','configName','<redacted>','notification_config_field_required','validation','join','from-env','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Invalid\x20--','\x20must\x20be\x20an\x20object.','\x20--type\x20','Notification\x20config\x20','2284152tjcVSP','preflight','notification_config_json_invalid','Item\x20','Notification\x20JSON\x20source\x20is\x20ambiguous.','WEBHOOK','\x20has\x20an\x20invalid\x20appCode.','dry-run','Unknown\x20notification\x20JSON\x20field\x20\x22','a\x20string\x20or\x20null','updateTime','file','notification_config_field_invalid','keys','channelConfig','Application-level\x20notification\x20config\x20ID','DINGTALK','\x22\x20cannot\x20exceed\x20','Create\x20JSON\x20requires\x20field\x20','environment\x20variable\x20','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','endpointUrl','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','10LjDvuL','Notification\x20JSON\x20from\x20','push','subjectPrefix','yes','number','string','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','utf8','stdin','notification_config_confirmation_required','_unavailable','hasOwnProperty','create','entries','110SYanpj','\x20has\x20an\x20invalid\x20id.','description','env','prototype','ccList','\x20failed.','bool','replyTo','notification_config_field_forbidden','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','update'];a139_0x3eb1=function(){return _0x5307d5;};return a139_0x3eb1();}export const NOTIFICATION_INPUT_FLAGS=[{'name':a139_0x216800(0x194),'type':a139_0x216800(0x1a6),'required':![],'description':a139_0x216800(0x155)},{'name':a139_0x216800(0x1a9),'type':a139_0x216800(0x1c1),'required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a139_0x216800(0x183),'type':a139_0x216800(0x1a6),'required':![],'description':a139_0x216800(0x140)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a139_0x216800(0x1a5),'required':!![],'description':a139_0x216800(0x198)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0xdab7fd,_0x1f14bc,_0x4470a1){return new CliError(_0xdab7fd,0x1,_0x1f14bc,_0x4470a1);}export function readNotificationId(_0x563404){const _0x1570c3=a139_0x216800,_0xda8574=_0x563404['num']('id');if(!Number[_0x1570c3(0x151)](_0xda8574)||_0xda8574<=0x0)throw notificationError('notification_config_id_invalid',_0x1570c3(0x153));return _0xda8574;}export function requireNotificationExplicitYes(_0x5cad85){const _0x34733c=a139_0x216800;if(_0x5cad85[_0x34733c(0x1b6)](_0x34733c(0x190))||_0x5cad85[_0x34733c(0x1b6)](_0x34733c(0x1a4)))return;throw notificationError(_0x34733c(0x1aa),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x34733c(0x1a7));}export function readNotificationChannelType(_0x558fc1,_0x5b5f03=a139_0x216800(0x17d),_0x509224=a139_0x216800(0x173)){const _0x3a014e=a139_0x216800,_0x582846=_0x558fc1[_0x3a014e(0x163)](_0x5b5f03)[_0x3a014e(0x15b)]()||_0x509224;if(!NOTIFICATION_CHANNEL_TYPES[_0x3a014e(0x15a)](_0x582846))throw CliErrors[_0x3a014e(0x181)](_0x3a014e(0x185)+_0x5b5f03+':\x20'+_0x582846,_0x3a014e(0x149)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x582846;}export function assertSingleNotificationSource(_0x492855){const _0x41dcd1=a139_0x216800,_0x9bcf44=[],_0x29dafa=_0x492855[_0x41dcd1(0x163)](_0x41dcd1(0x194))[_0x41dcd1(0x15b)]();if(_0x29dafa)_0x9bcf44[_0x41dcd1(0x1a2)]({'kind':_0x41dcd1(0x194),'path':_0x29dafa});if(_0x492855[_0x41dcd1(0x1b6)](_0x41dcd1(0x1a9)))_0x9bcf44['push']({'kind':_0x41dcd1(0x1a9)});const _0x5de3d4=_0x492855[_0x41dcd1(0x163)](_0x41dcd1(0x183))[_0x41dcd1(0x15b)]();if(_0x5de3d4)_0x9bcf44['push']({'kind':_0x41dcd1(0x1b2),'name':_0x5de3d4});if(_0x9bcf44['length']===0x0)throw CliErrors[_0x41dcd1(0x181)](_0x41dcd1(0x179),_0x41dcd1(0x176));if(_0x9bcf44[_0x41dcd1(0x165)]>0x1)throw CliErrors[_0x41dcd1(0x181)](_0x41dcd1(0x18d),_0x41dcd1(0x176));return _0x9bcf44[0x0];}function a139_0x2ea6(_0x4a4be2,_0x3a1aca){_0x4a4be2=_0x4a4be2-0x13c;const _0x3eb174=a139_0x3eb1();let _0x2ea6f3=_0x3eb174[_0x4a4be2];return _0x2ea6f3;}export async function readNotificationDocument(_0x9ea806,_0x1baa2a){const _0x24f2f1=a139_0x216800,_0x1e7341=assertSingleNotificationSource(_0x9ea806),_0x38616e=_0x1e7341[_0x24f2f1(0x16a)]===_0x24f2f1(0x194)?'file\x20'+_0x1e7341[_0x24f2f1(0x15d)]:_0x1e7341[_0x24f2f1(0x16a)]===_0x24f2f1(0x1b2)?_0x24f2f1(0x19c)+_0x1e7341[_0x24f2f1(0x141)]:_0x24f2f1(0x1a9);let _0xd2d331;try{if(_0x1e7341[_0x24f2f1(0x16a)]===_0x24f2f1(0x194))_0xd2d331=await readFile(_0x1e7341['path'],_0x24f2f1(0x1a8));else{if(_0x1e7341[_0x24f2f1(0x16a)]===_0x24f2f1(0x1b2)){if(!(_0x1e7341[_0x24f2f1(0x141)]in process.env))throw notificationError(_0x24f2f1(0x16c),_0x24f2f1(0x16d)+_0x1e7341[_0x24f2f1(0x141)]);_0xd2d331=process.env[_0x1e7341.name]??'';}else _0xd2d331=await readStdin();}}catch(_0x8969f2){if(_0x8969f2 instanceof CliError)throw _0x8969f2;throw notificationError(_0x24f2f1(0x16c),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x38616e+'.');}let _0x58b0e8;try{_0x58b0e8=JSON[_0x24f2f1(0x177)](_0xd2d331);}catch{throw notificationError(_0x24f2f1(0x18b),_0x24f2f1(0x1a1)+_0x38616e+'\x20is\x20invalid.',_0x24f2f1(0x158));}if(!isJsonObject(_0x58b0e8))throw notificationError(_0x24f2f1(0x18b),_0x24f2f1(0x1a1)+_0x38616e+_0x24f2f1(0x186));return validateNotificationDocument(_0x58b0e8,_0x1baa2a);}export function projectNotificationListConfig(_0x416df2,_0xf33dc0){const _0x3bb913=a139_0x216800;return{'id':typeof _0x416df2['id']===_0x3bb913(0x1a5)?_0x416df2['id']:null,'configCode':requireResponseString(_0x416df2[_0x3bb913(0x170)],_0x3bb913(0x170),_0xf33dc0),'configName':requireResponseString(_0x416df2[_0x3bb913(0x17e)],'configName',_0xf33dc0),'channelType':requireResponseString(_0x416df2[_0x3bb913(0x14e)],_0x3bb913(0x14e),_0xf33dc0),'description':normalizeNullableString(_0x416df2[_0x3bb913(0x1b1)]),'createTime':normalizeNullableString(_0x416df2[_0x3bb913(0x15e)]),'updateTime':normalizeNullableString(_0x416df2[_0x3bb913(0x193)])};}export function normalizeExactNotificationConfig(_0xa8618a,_0x19a12d,_0x28f3cd){const _0x532e99=a139_0x216800;if(!Number[_0x532e99(0x151)](_0xa8618a['id'])||_0xa8618a['id']!==_0x19a12d)throw notificationError(_0x532e99(0x1be),_0x532e99(0x19f)+_0x19a12d+'.');if(_0xa8618a['appCode']!==_0x28f3cd)throw notificationError(_0x532e99(0x1be),'Notification\x20config\x20'+_0x19a12d+_0x532e99(0x157));const _0x44bc74=requireExactString(_0xa8618a[_0x532e99(0x17e)],'configName',_0x19a12d),_0x4c7af7=requireExactString(_0xa8618a[_0x532e99(0x170)],_0x532e99(0x170),_0x19a12d),_0x24e4f2=requireExactString(_0xa8618a[_0x532e99(0x14e)],_0x532e99(0x14e),_0x19a12d);if(!NOTIFICATION_CHANNEL_TYPES[_0x532e99(0x15a)](_0x24e4f2))throw notificationError('notification_config_response_invalid',_0x532e99(0x188)+_0x19a12d+_0x532e99(0x159));const _0x1503e=responseNullableString(_0xa8618a[_0x532e99(0x19e)],_0x532e99(0x19e),_0x19a12d),_0x169edf=responseNullableString(_0xa8618a[_0x532e99(0x197)],_0x532e99(0x197),_0x19a12d),_0x333f2c=responseNullableString(_0xa8618a[_0x532e99(0x1b1)],'description',_0x19a12d),_0x340ce4=responseNullableTimeout(_0xa8618a[_0x532e99(0x147)],_0x532e99(0x147),_0x19a12d),_0x426eb2=responseNullableTimeout(_0xa8618a['readTimeout'],_0x532e99(0x171),_0x19a12d);return{'id':_0x19a12d,'appCode':_0x28f3cd,'configCode':_0x4c7af7,'configName':_0x44bc74,'channelType':_0x24e4f2,'endpointUrl':redactSensitive(_0x1503e),'channelConfig':redactSensitive(_0x169edf),'description':_0x333f2c,'connectTimeout':_0x340ce4,'readTimeout':_0x426eb2,'endpointUrlRaw':_0x1503e,'channelConfigRaw':_0x169edf};}export async function requireExactNotificationConfig(_0x462956,_0x11bfcf,_0x60274d){const _0x4cca01=a139_0x216800;let _0x491992;try{_0x491992=await getNotificationChannelConfig(_0x11bfcf,_0x462956);}catch{throw safeApiFailure(_0x60274d,_0x4cca01(0x18a),_0x4cca01(0x184)+_0x462956+_0x4cca01(0x1b9));}return normalizeExactNotificationConfig(_0x491992,_0x11bfcf,_0x462956);}export function projectNotificationConfig(_0x392634){const _0x50b683=a139_0x216800;return{'id':_0x392634['id']??null,'appCode':_0x392634[_0x50b683(0x1bf)],'configCode':_0x392634[_0x50b683(0x170)]??null,'configName':_0x392634[_0x50b683(0x17e)],'channelType':_0x392634[_0x50b683(0x14e)],'endpointUrl':redactSensitive(_0x392634[_0x50b683(0x19e)]),'channelConfig':redactSensitive(_0x392634[_0x50b683(0x197)]),'description':_0x392634[_0x50b683(0x1b1)]??null,'connectTimeout':_0x392634[_0x50b683(0x147)]??null,'readTimeout':_0x392634[_0x50b683(0x171)]??null};}export function notificationSelector(_0xbf2308){const _0x37acbb=a139_0x216800;return{'appCode':_0xbf2308[_0x37acbb(0x1bf)],'id':_0xbf2308['id'],'configCode':_0xbf2308[_0x37acbb(0x170)],'configName':_0xbf2308[_0x37acbb(0x17e)],'channelType':_0xbf2308[_0x37acbb(0x14e)]};}export function createMutationInput(_0x2a3f67,_0xb0714d){const _0x29f2c5=a139_0x216800;return{'appCode':_0x2a3f67,'configName':_0xb0714d[_0x29f2c5(0x17e)],'channelType':_0xb0714d[_0x29f2c5(0x14e)],...hasOwn(_0xb0714d,_0x29f2c5(0x19e))?{'endpointUrl':_0xb0714d[_0x29f2c5(0x19e)]}:{},...hasOwn(_0xb0714d,_0x29f2c5(0x197))?{'channelConfig':serializeChannelConfig(_0xb0714d[_0x29f2c5(0x197)])}:{},...hasOwn(_0xb0714d,_0x29f2c5(0x1b1))?{'description':_0xb0714d['description']}:{},...hasOwn(_0xb0714d,_0x29f2c5(0x147))?{'connectTimeout':_0xb0714d['connectTimeout']}:{},...hasOwn(_0xb0714d,_0x29f2c5(0x171))?{'readTimeout':_0xb0714d[_0x29f2c5(0x171)]}:{}};}export function mergeUpdateInput(_0x15b64a,_0x2a2313){const _0x2bbbeb=a139_0x216800;return{'id':_0x15b64a['id'],'appCode':_0x15b64a[_0x2bbbeb(0x1bf)],'configName':_0x2a2313[_0x2bbbeb(0x17e)]??_0x15b64a['configName'],'channelType':_0x2a2313['channelType']??_0x15b64a[_0x2bbbeb(0x14e)],'endpointUrl':hasOwn(_0x2a2313,_0x2bbbeb(0x19e))?_0x2a2313['endpointUrl']:_0x15b64a[_0x2bbbeb(0x167)],'channelConfig':hasOwn(_0x2a2313,_0x2bbbeb(0x197))?serializeChannelConfig(_0x2a2313[_0x2bbbeb(0x197)]):_0x15b64a[_0x2bbbeb(0x14c)],'description':hasOwn(_0x2a2313,_0x2bbbeb(0x1b1))?_0x2a2313[_0x2bbbeb(0x1b1)]:_0x15b64a['description'],'connectTimeout':hasOwn(_0x2a2313,_0x2bbbeb(0x147))?_0x2a2313[_0x2bbbeb(0x147)]:_0x15b64a[_0x2bbbeb(0x147)],'readTimeout':hasOwn(_0x2a2313,_0x2bbbeb(0x171))?_0x2a2313[_0x2bbbeb(0x171)]:_0x15b64a['readTimeout']};}export function plannedUpdateProjection(_0x29b695,_0x2c3468){const _0x5319c6=a139_0x216800;return projectNotificationConfig({'id':_0x29b695['id'],'appCode':_0x29b695[_0x5319c6(0x1bf)],'configCode':_0x29b695[_0x5319c6(0x170)],'configName':_0x2c3468[_0x5319c6(0x17e)]??_0x29b695[_0x5319c6(0x17e)],'channelType':_0x2c3468[_0x5319c6(0x14e)]??_0x29b695[_0x5319c6(0x14e)],'endpointUrl':hasOwn(_0x2c3468,_0x5319c6(0x19e))?_0x2c3468[_0x5319c6(0x19e)]:_0x29b695[_0x5319c6(0x167)],'channelConfig':hasOwn(_0x2c3468,_0x5319c6(0x197))?_0x2c3468['channelConfig']:_0x29b695[_0x5319c6(0x14c)],'description':hasOwn(_0x2c3468,'description')?_0x2c3468[_0x5319c6(0x1b1)]:_0x29b695[_0x5319c6(0x1b1)],'connectTimeout':hasOwn(_0x2c3468,_0x5319c6(0x147))?_0x2c3468[_0x5319c6(0x147)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x29b695[_0x5319c6(0x147)],'readTimeout':hasOwn(_0x2c3468,_0x5319c6(0x171))?_0x2c3468[_0x5319c6(0x171)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x29b695[_0x5319c6(0x171)]});}export function requestedSafeFieldsMatch(_0x58305f,_0xb61f50,_0x501edf){const _0x1e54c8=a139_0x216800,_0x3cae13=[],_0x1239b4=[],_0x2a8b92=[];for(const _0xe9f238 of['configName','channelType',_0x1e54c8(0x1b1)]){if(!hasOwn(_0x501edf,_0xe9f238))continue;_0x2a8b92[_0x1e54c8(0x1a2)](_0xe9f238),_0x3cae13[_0x1e54c8(0x1a2)](_0xb61f50[_0xe9f238]===_0x501edf[_0xe9f238]),_0x1239b4[_0x1e54c8(0x1a2)](_0x58305f[_0xe9f238]!==_0x501edf[_0xe9f238]&&_0xb61f50[_0xe9f238]===_0x501edf[_0xe9f238]);}for(const _0x28d652 of[_0x1e54c8(0x147),_0x1e54c8(0x171)]){if(!hasOwn(_0x501edf,_0x28d652))continue;const _0x5eddd9=_0x501edf[_0x28d652]??(_0x28d652===_0x1e54c8(0x147)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x2a8b92['push'](_0x28d652),_0x3cae13[_0x1e54c8(0x1a2)](_0xb61f50[_0x28d652]===_0x5eddd9),_0x1239b4['push'](_0x58305f[_0x28d652]!==_0x5eddd9&&_0xb61f50[_0x28d652]===_0x5eddd9);}return hasOwn(_0x501edf,_0x1e54c8(0x19e))&&_0x501edf[_0x1e54c8(0x19e)]===null&&(_0x2a8b92[_0x1e54c8(0x1a2)]('endpointUrl:null'),_0x3cae13[_0x1e54c8(0x1a2)](_0xb61f50[_0x1e54c8(0x167)]===null||_0xb61f50[_0x1e54c8(0x167)]===''),_0x1239b4['push'](_0x58305f[_0x1e54c8(0x167)]!==null&&_0x58305f[_0x1e54c8(0x167)]!==''&&(_0xb61f50['endpointUrlRaw']===null||_0xb61f50[_0x1e54c8(0x167)]===''))),{'allMatch':_0x3cae13[_0x1e54c8(0x17a)](Boolean),'provesChange':_0x1239b4[_0x1e54c8(0x175)](Boolean),'verifiedFields':_0x2a8b92};}export function validateNotificationDeleteReadback(_0x186b53,_0x4da9a2,_0x87cb33){const _0x21576c=a139_0x216800;for(const [_0x5765ed,_0x5dd5ae]of _0x186b53[_0x21576c(0x1ae)]()){if(!Number[_0x21576c(0x151)](_0x5dd5ae['id'])||_0x5dd5ae['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x21576c(0x152)+(_0x5765ed+0x1)+_0x21576c(0x1b0));if(_0x5dd5ae[_0x21576c(0x1bf)]!==_0x4da9a2)throw notificationError('notification_config_response_invalid',_0x21576c(0x152)+(_0x5765ed+0x1)+_0x21576c(0x18f));if(_0x5dd5ae[_0x21576c(0x14e)]!==_0x87cb33)throw notificationError(_0x21576c(0x1be),_0x21576c(0x152)+(_0x5765ed+0x1)+_0x21576c(0x169));}}export function safeApiFailure(_0x3b7679,_0x64c6f6,_0x2f59bf){const _0x5102c1=a139_0x216800;return notificationError(_0x5102c1(0x16b)+_0x3b7679+'_'+(_0x64c6f6===_0x5102c1(0x13d)?_0x5102c1(0x143):_0x64c6f6+_0x5102c1(0x1ab)),_0x5102c1(0x188)+_0x3b7679+'\x20'+_0x64c6f6+_0x5102c1(0x1b5),_0x2f59bf);}export function notificationLookupCommand(_0x86501e,_0x5e5e5f){const _0x39eed6=a139_0x216800;return _0x39eed6(0x14b)+_0x86501e+_0x39eed6(0x187)+_0x5e5e5f+_0x39eed6(0x142);}function validateNotificationDocument(_0x5a70aa,_0x1ec5db){const _0x461247=a139_0x216800;for(const _0x10d94f of Object[_0x461247(0x196)](_0x5a70aa)){if(FORBIDDEN_IDENTITY_FIELDS[_0x461247(0x1bb)](_0x10d94f))throw notificationError(_0x461247(0x1b8),_0x461247(0x14a)+_0x10d94f+_0x461247(0x160));if(!ALLOWED_INPUT_FIELDS[_0x461247(0x1bb)](_0x10d94f))throw notificationError('notification_config_field_unknown',_0x461247(0x191)+_0x10d94f+'\x22.');}if(_0x1ec5db===_0x461247(0x1ba)&&Object[_0x461247(0x196)](_0x5a70aa)[_0x461247(0x165)]===0x0)throw notificationError(_0x461247(0x178),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x2e007d={};if(hasOwn(_0x5a70aa,_0x461247(0x17e)))_0x2e007d[_0x461247(0x17e)]=validateRequiredString(_0x5a70aa['configName'],_0x461247(0x17e),0x80);else{if(_0x1ec5db===_0x461247(0x1ad))throw notificationError(_0x461247(0x180),_0x461247(0x19b)+_0x461247(0x148));}if(hasOwn(_0x5a70aa,_0x461247(0x14e))){if(typeof _0x5a70aa[_0x461247(0x14e)]!=='string')throw invalidFieldType('channelType','a\x20supported\x20string');const _0x20a118=_0x5a70aa[_0x461247(0x14e)][_0x461247(0x15b)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x461247(0x15a)](_0x20a118))throw notificationError(_0x461247(0x195),_0x461247(0x19d),_0x461247(0x149)+NOTIFICATION_CHANNEL_TYPES[_0x461247(0x182)](',\x20')+'.');_0x2e007d[_0x461247(0x14e)]=_0x20a118;}else{if(_0x1ec5db===_0x461247(0x1ad))throw notificationError('notification_config_field_required',_0x461247(0x19b)+_0x461247(0x1bc));}for(const [_0x38d2ae,_0x569dda]of[[_0x461247(0x19e),0x200],[_0x461247(0x1b1),0x100]]){if(!hasOwn(_0x5a70aa,_0x38d2ae))continue;const _0x15c826=_0x5a70aa[_0x38d2ae];if(_0x15c826!==null&&typeof _0x15c826!==_0x461247(0x1a6))throw invalidFieldType(_0x38d2ae,_0x461247(0x192));if(typeof _0x15c826==='string'&&_0x15c826[_0x461247(0x165)]>_0x569dda)throw notificationError(_0x461247(0x195),_0x461247(0x14a)+_0x38d2ae+'\x22\x20cannot\x20exceed\x20'+_0x569dda+_0x461247(0x1bd));_0x2e007d[_0x38d2ae]=_0x15c826;}if(hasOwn(_0x5a70aa,'channelConfig')){const _0x59a634=_0x5a70aa['channelConfig'];if(_0x59a634===null&&_0x1ec5db===_0x461247(0x1ad))throw invalidFieldType(_0x461247(0x197),_0x461247(0x145));if(_0x59a634!==null&&!isJsonObject(_0x59a634))throw invalidFieldType(_0x461247(0x197),_0x1ec5db===_0x461247(0x1ba)?'a\x20JSON\x20object\x20or\x20null':'a\x20JSON\x20object');_0x59a634!==null&&validateChannelConfigFields(_0x2e007d['channelType'],_0x59a634),_0x2e007d[_0x461247(0x197)]=_0x59a634;}for(const _0x576de6 of['connectTimeout','readTimeout']){if(!hasOwn(_0x5a70aa,_0x576de6))continue;const _0x22d2f8=_0x5a70aa[_0x576de6];if(_0x22d2f8!==null&&(!Number['isSafeInteger'](_0x22d2f8)||_0x22d2f8<0x0))throw notificationError(_0x461247(0x195),_0x461247(0x14a)+_0x576de6+_0x461247(0x156));_0x2e007d[_0x576de6]=_0x22d2f8;}return _0x2e007d;}function validateRequiredString(_0x1cf624,_0x2e69dc,_0xe74c9e){const _0x3637e0=a139_0x216800;if(typeof _0x1cf624!=='string')throw invalidFieldType(_0x2e69dc,_0x3637e0(0x13e));const _0x20af0b=_0x1cf624['trim']();if(!_0x20af0b)throw notificationError(_0x3637e0(0x195),'Notification\x20JSON\x20field\x20\x22'+_0x2e69dc+_0x3637e0(0x14f));if(_0x20af0b[_0x3637e0(0x165)]>_0xe74c9e)throw notificationError(_0x3637e0(0x195),'Notification\x20JSON\x20field\x20\x22'+_0x2e69dc+_0x3637e0(0x19a)+_0xe74c9e+_0x3637e0(0x1bd));return _0x20af0b;}function validateChannelConfigFields(_0x6c174a,_0x58d737){const _0xf8d929=a139_0x216800;if(hasOwn(_0x58d737,_0xf8d929(0x164)))throw forbiddenChannelConfigField(_0xf8d929(0x164));if(_0x6c174a===_0xf8d929(0x173))for(const _0x2d49cf of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x58d737,_0x2d49cf))throw forbiddenChannelConfigField(_0x2d49cf);}}function forbiddenChannelConfigField(_0x349680){const _0x28d82a=a139_0x216800;return notificationError('notification_config_channel_field_forbidden',_0x28d82a(0x1c0)+_0x349680+_0x28d82a(0x15c));}function invalidFieldType(_0x386dfd,_0x50f32d){const _0x2ef91c=a139_0x216800;return notificationError(_0x2ef91c(0x195),_0x2ef91c(0x14a)+_0x386dfd+'\x22\x20must\x20be\x20'+_0x50f32d+'.');}function serializeChannelConfig(_0x54ca1e){const _0x2b31a9=a139_0x216800;return _0x54ca1e===null||_0x54ca1e===undefined?null:JSON[_0x2b31a9(0x146)](_0x54ca1e);}function redactSensitive(_0x1e065b){const _0x3a7329=a139_0x216800;return _0x1e065b===null||_0x1e065b===undefined||_0x1e065b===''?null:_0x3a7329(0x17f);}function requireResponseString(_0x17a47f,_0x146e49,_0x26aae3){const _0x23caa0=a139_0x216800;if(typeof _0x17a47f!==_0x23caa0(0x1a6)||_0x17a47f[_0x23caa0(0x15b)]()==='')throw CliErrors['apiError'](_0x23caa0(0x144),_0x23caa0(0x18c)+(_0x26aae3+0x1)+_0x23caa0(0x168)+_0x146e49+'\x22.');return _0x17a47f[_0x23caa0(0x15b)]();}function requireExactString(_0x2df6f2,_0x3e9e0c,_0x2ed8cf){const _0x5aaa75=a139_0x216800;if(typeof _0x2df6f2!==_0x5aaa75(0x1a6)||_0x2df6f2['trim']()==='')throw notificationError(_0x5aaa75(0x1be),_0x5aaa75(0x188)+_0x2ed8cf+_0x5aaa75(0x168)+_0x3e9e0c+'\x22.');return _0x2df6f2[_0x5aaa75(0x15b)]();}function responseNullableString(_0x14bdc1,_0x553d15,_0x405388){const _0x1b7e05=a139_0x216800;if(_0x14bdc1===undefined||_0x14bdc1===null)return null;if(typeof _0x14bdc1!==_0x1b7e05(0x1a6))throw notificationError(_0x1b7e05(0x1be),'Notification\x20config\x20'+_0x405388+'\x20has\x20invalid\x20field\x20\x22'+_0x553d15+'\x22.');return _0x14bdc1;}function responseNullableTimeout(_0x1b6267,_0x6a0640,_0x420d1f){const _0x3e9878=a139_0x216800;if(_0x1b6267===undefined||_0x1b6267===null)return null;if(!Number[_0x3e9878(0x151)](_0x1b6267)||_0x1b6267<0x0)throw notificationError(_0x3e9878(0x1be),_0x3e9878(0x188)+_0x420d1f+'\x20has\x20invalid\x20field\x20\x22'+_0x6a0640+'\x22.');return _0x1b6267;}function normalizeNullableString(_0x36bc06){const _0x55f608=a139_0x216800;return typeof _0x36bc06===_0x55f608(0x1a6)?_0x36bc06:null;}function isJsonObject(_0x35548b){const _0x39209f=a139_0x216800;return _0x35548b!==null&&typeof _0x35548b===_0x39209f(0x15f)&&!Array[_0x39209f(0x16e)](_0x35548b);}function hasOwn(_0x494faf,_0x19fbc0){const _0x305474=a139_0x216800;return Object[_0x305474(0x1b3)][_0x305474(0x1ac)][_0x305474(0x161)](_0x494faf,_0x19fbc0);}async function readStdin(){const _0x3b4432=a139_0x216800;let _0xa8e907='';process[_0x3b4432(0x1a9)][_0x3b4432(0x17c)](_0x3b4432(0x1a8));for await(const _0x159803 of process[_0x3b4432(0x1a9)])_0xa8e907+=_0x159803;return _0xa8e907;}
1
+ const a140_0x7d39b8=a140_0x7061;(function(_0x1b0a4b,_0x19cd83){const _0xfd52e8=a140_0x7061,_0x5723f0=_0x1b0a4b();while(!![]){try{const _0x368211=-parseInt(_0xfd52e8(0x132))/0x1*(parseInt(_0xfd52e8(0x12b))/0x2)+parseInt(_0xfd52e8(0x162))/0x3*(-parseInt(_0xfd52e8(0x16a))/0x4)+parseInt(_0xfd52e8(0x10e))/0x5+parseInt(_0xfd52e8(0x15f))/0x6*(-parseInt(_0xfd52e8(0x100))/0x7)+parseInt(_0xfd52e8(0x109))/0x8+parseInt(_0xfd52e8(0x126))/0x9*(-parseInt(_0xfd52e8(0x123))/0xa)+parseInt(_0xfd52e8(0x10d))/0xb;if(_0x368211===_0x19cd83)break;else _0x5723f0['push'](_0x5723f0['shift']());}catch(_0x24e6bb){_0x5723f0['push'](_0x5723f0['shift']());}}}(a140_0x11f3,0x9cf75));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a140_0x7d39b8(0x11c),a140_0x7d39b8(0xf8),a140_0x7d39b8(0x147),a140_0x7d39b8(0x14d)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a140_0x7d39b8(0x14a),a140_0x7d39b8(0xf0),a140_0x7d39b8(0x101),'channelConfig','description',a140_0x7d39b8(0x160),a140_0x7d39b8(0x104)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a140_0x7d39b8(0x11f),'configCode',a140_0x7d39b8(0x154)]),EMAIL_RECIPIENT_FIELDS=new Set([a140_0x7d39b8(0x15a),'recipients','ccList',a140_0x7d39b8(0x116),a140_0x7d39b8(0xfb),'subjectPrefix','fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a140_0x7d39b8(0x153),'type':a140_0x7d39b8(0x111),'required':![],'description':a140_0x7d39b8(0x13c)},{'name':'stdin','type':a140_0x7d39b8(0xfa),'required':![],'default':![],'description':a140_0x7d39b8(0x145)},{'name':a140_0x7d39b8(0x11a),'type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a140_0x7d39b8(0x14f),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a140_0x7061(_0x4d4e20,_0x322ed2){_0x4d4e20=_0x4d4e20-0xec;const _0x11f381=a140_0x11f3();let _0x70613e=_0x11f381[_0x4d4e20];return _0x70613e;}export function notificationError(_0x4f49d3,_0x5a0659,_0x5c9cdd){return new CliError(_0x4f49d3,0x1,_0x5a0659,_0x5c9cdd);}export function readNotificationId(_0x356cd4){const _0x45e584=a140_0x7d39b8,_0xf2a486=_0x356cd4[_0x45e584(0x150)]('id');if(!Number[_0x45e584(0x12d)](_0xf2a486)||_0xf2a486<=0x0)throw notificationError(_0x45e584(0x13f),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0xf2a486;}export function requireNotificationExplicitYes(_0x2c349f){const _0x4e6f2=a140_0x7d39b8;if(_0x2c349f[_0x4e6f2(0x158)](_0x4e6f2(0x144))||_0x2c349f['bool'](_0x4e6f2(0x10c)))return;throw notificationError(_0x4e6f2(0x12c),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x4e6f2(0x129));}export function readNotificationChannelType(_0xf005a3,_0x2544bc=a140_0x7d39b8(0x14b),_0x2aed4b='EMAIL'){const _0xe324c7=a140_0x7d39b8,_0x10e53e=_0xf005a3['str'](_0x2544bc)[_0xe324c7(0x15e)]()||_0x2aed4b;if(!NOTIFICATION_CHANNEL_TYPES[_0xe324c7(0x12a)](_0x10e53e))throw CliErrors[_0xe324c7(0x137)](_0xe324c7(0xf1)+_0x2544bc+':\x20'+_0x10e53e,_0xe324c7(0x113)+NOTIFICATION_CHANNEL_TYPES[_0xe324c7(0x13e)](',\x20')+'.');return _0x10e53e;}export function assertSingleNotificationSource(_0x16783a){const _0x5e5d9a=a140_0x7d39b8,_0x10f03d=[],_0x8f7d26=_0x16783a[_0x5e5d9a(0x110)](_0x5e5d9a(0x153))[_0x5e5d9a(0x15e)]();if(_0x8f7d26)_0x10f03d[_0x5e5d9a(0x155)]({'kind':_0x5e5d9a(0x153),'path':_0x8f7d26});if(_0x16783a['bool'](_0x5e5d9a(0x13d)))_0x10f03d['push']({'kind':'stdin'});const _0x134158=_0x16783a['str'](_0x5e5d9a(0x11a))['trim']();if(_0x134158)_0x10f03d[_0x5e5d9a(0x155)]({'kind':_0x5e5d9a(0x10b),'name':_0x134158});if(_0x10f03d[_0x5e5d9a(0x114)]===0x0)throw CliErrors[_0x5e5d9a(0x137)](_0x5e5d9a(0x103),_0x5e5d9a(0x10a));if(_0x10f03d[_0x5e5d9a(0x114)]>0x1)throw CliErrors[_0x5e5d9a(0x137)](_0x5e5d9a(0x151),_0x5e5d9a(0x10a));return _0x10f03d[0x0];}export async function readNotificationDocument(_0xd740c9,_0x39e708){const _0x5ed6e7=a140_0x7d39b8,_0xb54917=assertSingleNotificationSource(_0xd740c9),_0x3fd270=_0xb54917[_0x5ed6e7(0x115)]===_0x5ed6e7(0x153)?_0x5ed6e7(0x107)+_0xb54917['path']:_0xb54917[_0x5ed6e7(0x115)]==='env'?_0x5ed6e7(0x127)+_0xb54917[_0x5ed6e7(0x117)]:'stdin';let _0x2e1564;try{if(_0xb54917[_0x5ed6e7(0x115)]==='file')_0x2e1564=await readFile(_0xb54917[_0x5ed6e7(0x168)],'utf8');else{if(_0xb54917[_0x5ed6e7(0x115)]===_0x5ed6e7(0x10b)){if(!(_0xb54917[_0x5ed6e7(0x117)]in process.env))throw notificationError(_0x5ed6e7(0x102),_0x5ed6e7(0x12e)+_0xb54917[_0x5ed6e7(0x117)]);_0x2e1564=process.env[_0xb54917.name]??'';}else _0x2e1564=await readStdin();}}catch(_0xea4a0e){if(_0xea4a0e instanceof CliError)throw _0xea4a0e;throw notificationError('notification_config_source_unavailable',_0x5ed6e7(0x15b)+_0x3fd270+'.');}let _0x4a9c78;try{_0x4a9c78=JSON[_0x5ed6e7(0x140)](_0x2e1564);}catch{throw notificationError(_0x5ed6e7(0x157),_0x5ed6e7(0x108)+_0x3fd270+_0x5ed6e7(0xfe),_0x5ed6e7(0x125));}if(!isJsonObject(_0x4a9c78))throw notificationError('notification_config_json_invalid',_0x5ed6e7(0x108)+_0x3fd270+_0x5ed6e7(0x11e));return validateNotificationDocument(_0x4a9c78,_0x39e708);}export function projectNotificationListConfig(_0x58fc08,_0x4fb93f){const _0x45c8cc=a140_0x7d39b8;return{'id':typeof _0x58fc08['id']===_0x45c8cc(0x14f)?_0x58fc08['id']:null,'configCode':requireResponseString(_0x58fc08[_0x45c8cc(0x161)],_0x45c8cc(0x161),_0x4fb93f),'configName':requireResponseString(_0x58fc08[_0x45c8cc(0x14a)],_0x45c8cc(0x14a),_0x4fb93f),'channelType':requireResponseString(_0x58fc08['channelType'],'channelType',_0x4fb93f),'description':normalizeNullableString(_0x58fc08[_0x45c8cc(0x16e)]),'createTime':normalizeNullableString(_0x58fc08['createTime']),'updateTime':normalizeNullableString(_0x58fc08[_0x45c8cc(0x15d)])};}export function normalizeExactNotificationConfig(_0x4e5dc5,_0x453715,_0x310762){const _0x17c626=a140_0x7d39b8;if(!Number[_0x17c626(0x12d)](_0x4e5dc5['id'])||_0x4e5dc5['id']!==_0x453715)throw notificationError('notification_config_response_invalid',_0x17c626(0xff)+_0x453715+'.');if(_0x4e5dc5[_0x17c626(0x11f)]!==_0x310762)throw notificationError(_0x17c626(0xf5),_0x17c626(0x136)+_0x453715+_0x17c626(0x164));const _0x22c8ad=requireExactString(_0x4e5dc5['configName'],'configName',_0x453715),_0x2a3ac3=requireExactString(_0x4e5dc5[_0x17c626(0x161)],'configCode',_0x453715),_0x41d584=requireExactString(_0x4e5dc5[_0x17c626(0xf0)],_0x17c626(0xf0),_0x453715);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x41d584))throw notificationError('notification_config_response_invalid',_0x17c626(0x136)+_0x453715+_0x17c626(0x121));const _0x1ab1dd=responseNullableString(_0x4e5dc5[_0x17c626(0x101)],_0x17c626(0x101),_0x453715),_0x14a811=responseNullableString(_0x4e5dc5[_0x17c626(0x134)],_0x17c626(0x134),_0x453715),_0x1401f4=responseNullableString(_0x4e5dc5[_0x17c626(0x16e)],_0x17c626(0x16e),_0x453715),_0x22623a=responseNullableTimeout(_0x4e5dc5[_0x17c626(0x160)],_0x17c626(0x160),_0x453715),_0x2df6aa=responseNullableTimeout(_0x4e5dc5[_0x17c626(0x104)],_0x17c626(0x104),_0x453715);return{'id':_0x453715,'appCode':_0x310762,'configCode':_0x2a3ac3,'configName':_0x22c8ad,'channelType':_0x41d584,'endpointUrl':redactSensitive(_0x1ab1dd),'channelConfig':redactSensitive(_0x14a811),'description':_0x1401f4,'connectTimeout':_0x22623a,'readTimeout':_0x2df6aa,'endpointUrlRaw':_0x1ab1dd,'channelConfigRaw':_0x14a811};}export async function requireExactNotificationConfig(_0xb6abb0,_0x30254c,_0x456886){const _0x3b7bc1=a140_0x7d39b8;let _0x1a8bfe;try{_0x1a8bfe=await getNotificationChannelConfig(_0x30254c,_0xb6abb0);}catch{throw safeApiFailure(_0x456886,_0x3b7bc1(0x169),_0x3b7bc1(0x14c)+_0xb6abb0+_0x3b7bc1(0x105));}return normalizeExactNotificationConfig(_0x1a8bfe,_0x30254c,_0xb6abb0);}export function projectNotificationConfig(_0x56b06d){const _0xdd7c78=a140_0x7d39b8;return{'id':_0x56b06d['id']??null,'appCode':_0x56b06d[_0xdd7c78(0x11f)],'configCode':_0x56b06d[_0xdd7c78(0x161)]??null,'configName':_0x56b06d[_0xdd7c78(0x14a)],'channelType':_0x56b06d['channelType'],'endpointUrl':redactSensitive(_0x56b06d[_0xdd7c78(0x101)]),'channelConfig':redactSensitive(_0x56b06d[_0xdd7c78(0x134)]),'description':_0x56b06d[_0xdd7c78(0x16e)]??null,'connectTimeout':_0x56b06d[_0xdd7c78(0x160)]??null,'readTimeout':_0x56b06d['readTimeout']??null};}export function notificationSelector(_0x55d391){const _0xd1cb6c=a140_0x7d39b8;return{'appCode':_0x55d391[_0xd1cb6c(0x11f)],'id':_0x55d391['id'],'configCode':_0x55d391['configCode'],'configName':_0x55d391[_0xd1cb6c(0x14a)],'channelType':_0x55d391['channelType']};}export function createMutationInput(_0xe20136,_0x766f26){const _0x4d6064=a140_0x7d39b8;return{'appCode':_0xe20136,'configName':_0x766f26[_0x4d6064(0x14a)],'channelType':_0x766f26[_0x4d6064(0xf0)],...hasOwn(_0x766f26,_0x4d6064(0x101))?{'endpointUrl':_0x766f26[_0x4d6064(0x101)]}:{},...hasOwn(_0x766f26,_0x4d6064(0x134))?{'channelConfig':serializeChannelConfig(_0x766f26[_0x4d6064(0x134)])}:{},...hasOwn(_0x766f26,'description')?{'description':_0x766f26['description']}:{},...hasOwn(_0x766f26,'connectTimeout')?{'connectTimeout':_0x766f26[_0x4d6064(0x160)]}:{},...hasOwn(_0x766f26,_0x4d6064(0x104))?{'readTimeout':_0x766f26[_0x4d6064(0x104)]}:{}};}export function mergeUpdateInput(_0x42b6ec,_0x445ca7){const _0x3ffd3c=a140_0x7d39b8;return{'id':_0x42b6ec['id'],'appCode':_0x42b6ec[_0x3ffd3c(0x11f)],'configName':_0x445ca7['configName']??_0x42b6ec[_0x3ffd3c(0x14a)],'channelType':_0x445ca7[_0x3ffd3c(0xf0)]??_0x42b6ec[_0x3ffd3c(0xf0)],'endpointUrl':hasOwn(_0x445ca7,_0x3ffd3c(0x101))?_0x445ca7['endpointUrl']:_0x42b6ec['endpointUrlRaw'],'channelConfig':hasOwn(_0x445ca7,_0x3ffd3c(0x134))?serializeChannelConfig(_0x445ca7['channelConfig']):_0x42b6ec[_0x3ffd3c(0x130)],'description':hasOwn(_0x445ca7,_0x3ffd3c(0x16e))?_0x445ca7[_0x3ffd3c(0x16e)]:_0x42b6ec[_0x3ffd3c(0x16e)],'connectTimeout':hasOwn(_0x445ca7,'connectTimeout')?_0x445ca7[_0x3ffd3c(0x160)]:_0x42b6ec[_0x3ffd3c(0x160)],'readTimeout':hasOwn(_0x445ca7,_0x3ffd3c(0x104))?_0x445ca7[_0x3ffd3c(0x104)]:_0x42b6ec[_0x3ffd3c(0x104)]};}export function plannedUpdateProjection(_0x247b8a,_0x127d21){const _0x26fdf3=a140_0x7d39b8;return projectNotificationConfig({'id':_0x247b8a['id'],'appCode':_0x247b8a[_0x26fdf3(0x11f)],'configCode':_0x247b8a[_0x26fdf3(0x161)],'configName':_0x127d21[_0x26fdf3(0x14a)]??_0x247b8a[_0x26fdf3(0x14a)],'channelType':_0x127d21[_0x26fdf3(0xf0)]??_0x247b8a['channelType'],'endpointUrl':hasOwn(_0x127d21,_0x26fdf3(0x101))?_0x127d21['endpointUrl']:_0x247b8a[_0x26fdf3(0x133)],'channelConfig':hasOwn(_0x127d21,_0x26fdf3(0x134))?_0x127d21[_0x26fdf3(0x134)]:_0x247b8a[_0x26fdf3(0x130)],'description':hasOwn(_0x127d21,_0x26fdf3(0x16e))?_0x127d21[_0x26fdf3(0x16e)]:_0x247b8a[_0x26fdf3(0x16e)],'connectTimeout':hasOwn(_0x127d21,'connectTimeout')?_0x127d21[_0x26fdf3(0x160)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x247b8a[_0x26fdf3(0x160)],'readTimeout':hasOwn(_0x127d21,_0x26fdf3(0x104))?_0x127d21[_0x26fdf3(0x104)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x247b8a[_0x26fdf3(0x104)]});}export function requestedSafeFieldsMatch(_0x49f978,_0x4921be,_0x2763fd){const _0x2b3b12=a140_0x7d39b8,_0x534e7f=[],_0x12e831=[],_0x2adf14=[];for(const _0x214518 of[_0x2b3b12(0x14a),_0x2b3b12(0xf0),'description']){if(!hasOwn(_0x2763fd,_0x214518))continue;_0x2adf14[_0x2b3b12(0x155)](_0x214518),_0x534e7f[_0x2b3b12(0x155)](_0x4921be[_0x214518]===_0x2763fd[_0x214518]),_0x12e831[_0x2b3b12(0x155)](_0x49f978[_0x214518]!==_0x2763fd[_0x214518]&&_0x4921be[_0x214518]===_0x2763fd[_0x214518]);}for(const _0x3d2a23 of['connectTimeout',_0x2b3b12(0x104)]){if(!hasOwn(_0x2763fd,_0x3d2a23))continue;const _0xb00a1=_0x2763fd[_0x3d2a23]??(_0x3d2a23===_0x2b3b12(0x160)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x2adf14[_0x2b3b12(0x155)](_0x3d2a23),_0x534e7f['push'](_0x4921be[_0x3d2a23]===_0xb00a1),_0x12e831['push'](_0x49f978[_0x3d2a23]!==_0xb00a1&&_0x4921be[_0x3d2a23]===_0xb00a1);}return hasOwn(_0x2763fd,'endpointUrl')&&_0x2763fd[_0x2b3b12(0x101)]===null&&(_0x2adf14[_0x2b3b12(0x155)](_0x2b3b12(0xf2)),_0x534e7f[_0x2b3b12(0x155)](_0x4921be[_0x2b3b12(0x133)]===null||_0x4921be[_0x2b3b12(0x133)]===''),_0x12e831[_0x2b3b12(0x155)](_0x49f978[_0x2b3b12(0x133)]!==null&&_0x49f978[_0x2b3b12(0x133)]!==''&&(_0x4921be[_0x2b3b12(0x133)]===null||_0x4921be['endpointUrlRaw']===''))),{'allMatch':_0x534e7f[_0x2b3b12(0x167)](Boolean),'provesChange':_0x12e831['some'](Boolean),'verifiedFields':_0x2adf14};}export function validateNotificationDeleteReadback(_0xa73ffa,_0x1efd34,_0x4c177d){const _0x235ad6=a140_0x7d39b8;for(const [_0x517cca,_0x599c24]of _0xa73ffa[_0x235ad6(0xee)]()){if(!Number[_0x235ad6(0x12d)](_0x599c24['id'])||_0x599c24['id']<=0x0)throw notificationError(_0x235ad6(0xf5),_0x235ad6(0x120)+(_0x517cca+0x1)+_0x235ad6(0x159));if(_0x599c24[_0x235ad6(0x11f)]!==_0x1efd34)throw notificationError(_0x235ad6(0xf5),_0x235ad6(0x120)+(_0x517cca+0x1)+_0x235ad6(0xf7));if(_0x599c24['channelType']!==_0x4c177d)throw notificationError(_0x235ad6(0xf5),_0x235ad6(0x120)+(_0x517cca+0x1)+_0x235ad6(0x166));}}export function safeApiFailure(_0x594851,_0x35bcea,_0xef551a){const _0x44e5d0=a140_0x7d39b8;return notificationError(_0x44e5d0(0x149)+_0x594851+'_'+(_0x35bcea==='mutation'?_0x44e5d0(0xf6):_0x35bcea+'_unavailable'),_0x44e5d0(0x136)+_0x594851+'\x20'+_0x35bcea+_0x44e5d0(0x16d),_0xef551a);}export function notificationLookupCommand(_0x198e9c,_0x143704){const _0x2eee14=a140_0x7d39b8;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x198e9c+_0x2eee14(0x12f)+_0x143704+'\x20--format\x20compress';}function validateNotificationDocument(_0x14fb7c,_0x144a90){const _0x2832de=a140_0x7d39b8;for(const _0x1fe066 of Object[_0x2832de(0x14e)](_0x14fb7c)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x1fe066))throw notificationError(_0x2832de(0x118),_0x2832de(0xfd)+_0x1fe066+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x2832de(0x11b)](_0x1fe066))throw notificationError(_0x2832de(0x10f),_0x2832de(0x128)+_0x1fe066+'\x22.');}if(_0x144a90===_0x2832de(0x139)&&Object['keys'](_0x14fb7c)[_0x2832de(0x114)]===0x0)throw notificationError(_0x2832de(0x141),_0x2832de(0x13a));const _0x4d5849={};if(hasOwn(_0x14fb7c,_0x2832de(0x14a)))_0x4d5849[_0x2832de(0x14a)]=validateRequiredString(_0x14fb7c[_0x2832de(0x14a)],_0x2832de(0x14a),0x80);else{if(_0x144a90===_0x2832de(0x16c))throw notificationError(_0x2832de(0x131),_0x2832de(0x165)+_0x2832de(0x146));}if(hasOwn(_0x14fb7c,_0x2832de(0xf0))){if(typeof _0x14fb7c[_0x2832de(0xf0)]!==_0x2832de(0x111))throw invalidFieldType('channelType','a\x20supported\x20string');const _0xcb2b55=_0x14fb7c[_0x2832de(0xf0)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x2832de(0x12a)](_0xcb2b55))throw notificationError(_0x2832de(0xed),_0x2832de(0x152),_0x2832de(0x113)+NOTIFICATION_CHANNEL_TYPES[_0x2832de(0x13e)](',\x20')+'.');_0x4d5849[_0x2832de(0xf0)]=_0xcb2b55;}else{if(_0x144a90===_0x2832de(0x16c))throw notificationError(_0x2832de(0x131),_0x2832de(0x165)+_0x2832de(0xf9));}for(const [_0x565a4f,_0x4a3570]of[['endpointUrl',0x200],[_0x2832de(0x16e),0x100]]){if(!hasOwn(_0x14fb7c,_0x565a4f))continue;const _0x2d05e7=_0x14fb7c[_0x565a4f];if(_0x2d05e7!==null&&typeof _0x2d05e7!==_0x2832de(0x111))throw invalidFieldType(_0x565a4f,'a\x20string\x20or\x20null');if(typeof _0x2d05e7===_0x2832de(0x111)&&_0x2d05e7[_0x2832de(0x114)]>_0x4a3570)throw notificationError(_0x2832de(0xed),_0x2832de(0xfd)+_0x565a4f+_0x2832de(0xf3)+_0x4a3570+'\x20characters.');_0x4d5849[_0x565a4f]=_0x2d05e7;}if(hasOwn(_0x14fb7c,_0x2832de(0x134))){const _0x6eb6f8=_0x14fb7c[_0x2832de(0x134)];if(_0x6eb6f8===null&&_0x144a90===_0x2832de(0x16c))throw invalidFieldType(_0x2832de(0x134),_0x2832de(0x124));if(_0x6eb6f8!==null&&!isJsonObject(_0x6eb6f8))throw invalidFieldType(_0x2832de(0x134),_0x144a90===_0x2832de(0x139)?'a\x20JSON\x20object\x20or\x20null':_0x2832de(0x124));_0x6eb6f8!==null&&validateChannelConfigFields(_0x4d5849['channelType'],_0x6eb6f8),_0x4d5849['channelConfig']=_0x6eb6f8;}for(const _0x3e545d of[_0x2832de(0x160),'readTimeout']){if(!hasOwn(_0x14fb7c,_0x3e545d))continue;const _0x3e0b6c=_0x14fb7c[_0x3e545d];if(_0x3e0b6c!==null&&(!Number[_0x2832de(0x12d)](_0x3e0b6c)||_0x3e0b6c<0x0))throw notificationError('notification_config_field_invalid',_0x2832de(0xfd)+_0x3e545d+_0x2832de(0x135));_0x4d5849[_0x3e545d]=_0x3e0b6c;}return _0x4d5849;}function validateRequiredString(_0x9d8ab,_0x5aac37,_0x654f69){const _0x672d24=a140_0x7d39b8;if(typeof _0x9d8ab!=='string')throw invalidFieldType(_0x5aac37,'a\x20non-empty\x20string');const _0x47c735=_0x9d8ab[_0x672d24(0x15e)]();if(!_0x47c735)throw notificationError('notification_config_field_invalid',_0x672d24(0xfd)+_0x5aac37+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x47c735['length']>_0x654f69)throw notificationError(_0x672d24(0xed),_0x672d24(0xfd)+_0x5aac37+_0x672d24(0xf3)+_0x654f69+_0x672d24(0xef));return _0x47c735;}function validateChannelConfigFields(_0x513732,_0x35e0ca){const _0x5afc11=a140_0x7d39b8;if(hasOwn(_0x35e0ca,_0x5afc11(0x148)))throw forbiddenChannelConfigField(_0x5afc11(0x148));if(_0x513732===_0x5afc11(0xec))for(const _0x2fc57e of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x35e0ca,_0x2fc57e))throw forbiddenChannelConfigField(_0x2fc57e);}}function forbiddenChannelConfigField(_0xa03df2){const _0x154bd6=a140_0x7d39b8;return notificationError(_0x154bd6(0x112),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0xa03df2+_0x154bd6(0xf4));}function invalidFieldType(_0x1bd764,_0x45f8f4){const _0x1e31ea=a140_0x7d39b8;return notificationError('notification_config_field_invalid',_0x1e31ea(0xfd)+_0x1bd764+_0x1e31ea(0x11d)+_0x45f8f4+'.');}function serializeChannelConfig(_0x4191c0){const _0xa55be=a140_0x7d39b8;return _0x4191c0===null||_0x4191c0===undefined?null:JSON[_0xa55be(0x142)](_0x4191c0);}function redactSensitive(_0x2c1743){const _0x37fb79=a140_0x7d39b8;return _0x2c1743===null||_0x2c1743===undefined||_0x2c1743===''?null:_0x37fb79(0x156);}function requireResponseString(_0x119150,_0x311f5a,_0x55488d){const _0x8b47bc=a140_0x7d39b8;if(typeof _0x119150!==_0x8b47bc(0x111)||_0x119150['trim']()==='')throw CliErrors['apiError'](_0x8b47bc(0x138),_0x8b47bc(0x143)+(_0x55488d+0x1)+_0x8b47bc(0x106)+_0x311f5a+'\x22.');return _0x119150[_0x8b47bc(0x15e)]();}function requireExactString(_0x143de0,_0x1d60c9,_0x38aa48){const _0x44fd38=a140_0x7d39b8;if(typeof _0x143de0!==_0x44fd38(0x111)||_0x143de0[_0x44fd38(0x15e)]()==='')throw notificationError(_0x44fd38(0xf5),_0x44fd38(0x136)+_0x38aa48+_0x44fd38(0x106)+_0x1d60c9+'\x22.');return _0x143de0[_0x44fd38(0x15e)]();}function a140_0x11f3(){const _0x23b90b=['parse','notification_config_update_empty','stringify','Item\x20','dry-run','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','\x22configName\x22.','WECOM','messageTemplate','notification_config_','configName','type','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','WEBHOOK','keys','number','num','Notification\x20JSON\x20source\x20is\x20ambiguous.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','file','channelCode','push','<redacted>','notification_config_json_invalid','bool','\x20has\x20an\x20invalid\x20id.','emailTargets','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','hasOwnProperty','updateTime','trim','12exAkFE','connectTimeout','configCode','2391Jokcbw','setEncoding','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Create\x20JSON\x20requires\x20field\x20','\x20has\x20an\x20invalid\x20channelType.','every','path','preflight','2284lSafFs','\x20has\x20invalid\x20field\x20\x22','create','\x20failed.','description','EMAIL','notification_config_field_invalid','entries','\x20characters.','channelType','Invalid\x20--','endpointUrl:null','\x22\x20cannot\x20exceed\x20','\x22\x20is\x20forbidden.','notification_config_response_invalid','failed','\x20has\x20an\x20invalid\x20appCode.','DINGTALK','\x22channelType\x22.','boolean','replyTo','call','Notification\x20JSON\x20field\x20\x22','\x20is\x20invalid.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','1252538YZBlMQ','endpointUrl','notification_config_source_unavailable','Missing\x20notification\x20JSON\x20source.','readTimeout','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20is\x20missing\x20required\x20field\x20\x22','file\x20','Notification\x20JSON\x20from\x20','7850320WWvZmo','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','env','yes','7053244RHHZHb','5666050gaSXTX','notification_config_field_unknown','str','string','notification_config_channel_field_forbidden','Allowed\x20values:\x20','length','kind','bccList','name','notification_config_field_forbidden','utf8','from-env','has','FEISHU','\x22\x20must\x20be\x20','\x20must\x20be\x20an\x20object.','appCode','Notification\x20config\x20list\x20item\x20','\x20has\x20an\x20unsupported\x20channelType.','prototype','10vGwXiR','a\x20JSON\x20object','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','7607988ggpWVU','environment\x20variable\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','includes','4oEmNaG','notification_config_confirmation_required','isSafeInteger','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20--type\x20','channelConfigRaw','notification_config_field_required','227242lRiNRi','endpointUrlRaw','channelConfig','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','Notification\x20config\x20','validation','Invalid\x20notification\x20config\x20response.','update','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','isArray','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','stdin','join','notification_config_id_invalid'];a140_0x11f3=function(){return _0x23b90b;};return a140_0x11f3();}function responseNullableString(_0x40706f,_0x56d40d,_0x4536f0){const _0x2ed895=a140_0x7d39b8;if(_0x40706f===undefined||_0x40706f===null)return null;if(typeof _0x40706f!==_0x2ed895(0x111))throw notificationError('notification_config_response_invalid',_0x2ed895(0x136)+_0x4536f0+_0x2ed895(0x16b)+_0x56d40d+'\x22.');return _0x40706f;}function responseNullableTimeout(_0x4cac65,_0x24bcc6,_0x437f09){const _0x217ba3=a140_0x7d39b8;if(_0x4cac65===undefined||_0x4cac65===null)return null;if(!Number[_0x217ba3(0x12d)](_0x4cac65)||_0x4cac65<0x0)throw notificationError(_0x217ba3(0xf5),'Notification\x20config\x20'+_0x437f09+_0x217ba3(0x16b)+_0x24bcc6+'\x22.');return _0x4cac65;}function normalizeNullableString(_0x119d50){const _0x27cfae=a140_0x7d39b8;return typeof _0x119d50===_0x27cfae(0x111)?_0x119d50:null;}function isJsonObject(_0x3eaac5){const _0x110809=a140_0x7d39b8;return _0x3eaac5!==null&&typeof _0x3eaac5==='object'&&!Array[_0x110809(0x13b)](_0x3eaac5);}function hasOwn(_0x1ee35f,_0x42d2ed){const _0x5aed1c=a140_0x7d39b8;return Object[_0x5aed1c(0x122)][_0x5aed1c(0x15c)][_0x5aed1c(0xfc)](_0x1ee35f,_0x42d2ed);}async function readStdin(){const _0x5112fe=a140_0x7d39b8;let _0x2c2adb='';process[_0x5112fe(0x13d)][_0x5112fe(0x163)](_0x5112fe(0x119));for await(const _0x503838 of process[_0x5112fe(0x13d)])_0x2c2adb+=_0x503838;return _0x2c2adb;}
@@ -1 +1 @@
1
- const a140_0x421c85=a140_0x5865;(function(_0x9e26ac,_0x4c472d){const _0x2918e4=a140_0x5865,_0x35467a=_0x9e26ac();while(!![]){try{const _0x4441dd=parseInt(_0x2918e4(0x105))/0x1+-parseInt(_0x2918e4(0x115))/0x2+-parseInt(_0x2918e4(0x114))/0x3*(parseInt(_0x2918e4(0xeb))/0x4)+-parseInt(_0x2918e4(0x117))/0x5+-parseInt(_0x2918e4(0xe7))/0x6+-parseInt(_0x2918e4(0x11d))/0x7*(-parseInt(_0x2918e4(0x10b))/0x8)+parseInt(_0x2918e4(0xf0))/0x9*(parseInt(_0x2918e4(0x10f))/0xa);if(_0x4441dd===_0x4c472d)break;else _0x35467a['push'](_0x35467a['shift']());}catch(_0x29332d){_0x35467a['push'](_0x35467a['shift']());}}}(a140_0x425b,0xd9e7e));function a140_0x425b(){const _0x207c38=['.\x20Supported\x20scenes:\x20','scene','fileName','trim','filePath','14LGhgkv','使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','idCard','str','\x20OCR','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','3377016wOFPmo','ocr','appCode','toString','5543504YzOAYp','recognize','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','read','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','9mXgqcp','length','path','filter','invoice','apiError','Publicly\x20accessible\x20image\x20or\x20file\x20URL','File\x20URL\x20response\x20missing\x20fileUrl.','\x20OCR\x20from\x20URL','imageFile','Table','join','fileUrl','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','validation','/smartapi/common/uploadFile','Preview:\x20recognize\x20','form','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','POST','/smartapi/ocr/recognize-text','144917CxyvuB','Invoice','imageUrl','idcard','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','IdCard','3232480tsCtkZ','image-file','General','GET','39930910npLFcZ','toLowerCase','/smartapi/common/queryFileUrl','File\x20upload\x20response\x20missing\x20filePath.','count','3VpFITF','1809068HBOgPh','string','6001700lZqfcE'];a140_0x425b=function(){return _0x207c38;};return a140_0x425b();}import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a140_0x421c85(0xf4),'general',a140_0x421c85(0x101),a140_0x421c85(0x11f)],SCENE_TO_LEGACY_TYPE={'invoice':a140_0x421c85(0x106),'general':a140_0x421c85(0x10d),'form':a140_0x421c85(0xfa),'idCard':a140_0x421c85(0x10a)},SCENE_FLAG={'name':a140_0x421c85(0x119),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a140_0x421c85(0x109)},IMAGE_FILE_FLAG={'name':a140_0x421c85(0x10c),'type':a140_0x421c85(0x116),'description':a140_0x421c85(0xed)},IMAGE_URL_FLAG={'name':'image-url','type':'string','description':a140_0x421c85(0xf6)};function normalizeScene(_0x522058){const _0x413e83=a140_0x421c85,_0x3c88e4=_0x522058['trim']()[_0x413e83(0x110)]();if(_0x3c88e4===_0x413e83(0x108))return _0x413e83(0x11f);if(_0x3c88e4===_0x413e83(0xf4)||_0x3c88e4==='general'||_0x3c88e4==='form')return _0x3c88e4;throw CliErrors[_0x413e83(0xfe)]('Unsupported\x20OCR\x20scene:\x20'+_0x522058+_0x413e83(0x118)+SUPPORTED_SCENES[_0x413e83(0xfb)](',\x20'));}function a140_0x5865(_0x1d7b6e,_0x4c983f){_0x1d7b6e=_0x1d7b6e-0xe7;const _0x425b2f=a140_0x425b();let _0x586592=_0x425b2f[_0x1d7b6e];return _0x586592;}function selectedInputs(_0x32b88b){const _0x4eeb3d=a140_0x421c85,_0x48aa1b=_0x32b88b[_0x4eeb3d(0x120)](_0x4eeb3d(0x10c))[_0x4eeb3d(0x11b)](),_0x2dcf6f=_0x32b88b[_0x4eeb3d(0x120)]('image-url')[_0x4eeb3d(0x11b)]();return{'imageFile':_0x48aa1b,'imageUrl':_0x2dcf6f,'count':[_0x48aa1b,_0x2dcf6f][_0x4eeb3d(0xf3)](Boolean)[_0x4eeb3d(0xf1)]};}function validateInputSelection(_0x4f4c6f){const _0x17365e=a140_0x421c85,_0x5b33af=selectedInputs(_0x4f4c6f);if(_0x5b33af[_0x17365e(0x113)]!==0x1)throw CliErrors[_0x17365e(0xfe)](_0x17365e(0xfd));return _0x5b33af;}function withScene(_0x51f120,_0x5cfd31,_0x434ea8){const _0x14986a=a140_0x421c85;return{..._0x51f120,'scene':_0x5cfd31,..._0x434ea8?{'sourceFile':{'fileName':_0x434ea8[_0x14986a(0x11a)],'filePath':_0x434ea8['filePath']}}:{}};}const ocrRecognize={'service':a140_0x421c85(0xe8),'command':a140_0x421c85(0xec),'description':a140_0x421c85(0x11e),'risk':a140_0x421c85(0xee),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3fd5ae){const _0x668afe=a140_0x421c85,_0x18321e=normalizeScene(_0x3fd5ae[_0x668afe(0x120)](_0x668afe(0x119))),_0x206a8f=SCENE_TO_LEGACY_TYPE[_0x18321e],_0x44ceab=validateInputSelection(_0x3fd5ae);if(_0x44ceab['imageUrl']){const _0x21c969=new URLSearchParams({'url':_0x44ceab[_0x668afe(0x107)],'type':_0x206a8f,'appCode':_0x3fd5ae[_0x668afe(0xe9)]});return{'method':_0x668afe(0x10e),'url':'/smartapi/ocr/recognize-text?'+_0x21c969[_0x668afe(0xea)](),'description':_0x668afe(0x100)+_0x18321e+_0x668afe(0xf8)};}const _0x3c4db5=requireDevelopmentUploadFile(_0x44ceab[_0x668afe(0xf9)],_0x668afe(0x10c));return{'method':'POST','url':_0x668afe(0xff),'body':{'steps':[{'method':_0x668afe(0x103),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x3fd5ae[_0x668afe(0xe9)],'multipart':{'file':_0x3c4db5}}},{'method':_0x668afe(0x103),'url':_0x668afe(0x111),'body':{'filePath':_0x668afe(0xef),'downloadFlag':![]}},{'method':_0x668afe(0x10e),'url':_0x668afe(0x104),'query':{'appCode':_0x3fd5ae[_0x668afe(0xe9)],'url':_0x668afe(0x102),'type':_0x206a8f}}]},'description':_0x668afe(0x122)+_0x18321e+_0x668afe(0x121)};},async 'execute'(_0x20c09f){const _0x41f49b=a140_0x421c85,_0x127499=normalizeScene(_0x20c09f[_0x41f49b(0x120)](_0x41f49b(0x119))),_0x29f253=SCENE_TO_LEGACY_TYPE[_0x127499],_0xb863a8=validateInputSelection(_0x20c09f);if(_0xb863a8[_0x41f49b(0x107)]){const _0x17cb3b=await recognizeDevelopmentOcr(_0x20c09f['appCode'],{'url':_0xb863a8[_0x41f49b(0x107)],'type':_0x29f253});return{'ok':!![],'data':withScene(_0x17cb3b,_0x127499)};}const _0x40bbd5=requireDevelopmentUploadFile(_0xb863a8['imageFile'],_0x41f49b(0x10c)),_0x3ffbf3=await uploadDevelopmentFile(_0x20c09f[_0x41f49b(0xe9)],_0x40bbd5[_0x41f49b(0xf2)]);if(!_0x3ffbf3[_0x41f49b(0x11c)])throw CliErrors[_0x41f49b(0xf5)](_0x41f49b(0x112));const _0x479c4b=await queryDevelopmentFileUrl(_0x3ffbf3[_0x41f49b(0x11c)],{'download':![]});if(!_0x479c4b[_0x41f49b(0xfc)])throw CliErrors['apiError'](_0x41f49b(0xf7));const _0x233299=await recognizeDevelopmentOcr(_0x20c09f['appCode'],{'url':_0x479c4b['fileUrl'],'type':_0x29f253});return{'ok':!![],'data':withScene(_0x233299,_0x127499,_0x3ffbf3)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a141_0x3a8e1c=a141_0xaaad;(function(_0x23e271,_0x361008){const _0x58c804=a141_0xaaad,_0xd0435a=_0x23e271();while(!![]){try{const _0x2317d3=-parseInt(_0x58c804(0x14e))/0x1+parseInt(_0x58c804(0x133))/0x2+-parseInt(_0x58c804(0x15d))/0x3*(parseInt(_0x58c804(0x156))/0x4)+parseInt(_0x58c804(0x154))/0x5*(parseInt(_0x58c804(0x136))/0x6)+parseInt(_0x58c804(0x12f))/0x7+parseInt(_0x58c804(0x141))/0x8*(-parseInt(_0x58c804(0x139))/0x9)+parseInt(_0x58c804(0x160))/0xa;if(_0x2317d3===_0x361008)break;else _0xd0435a['push'](_0xd0435a['shift']());}catch(_0x11f40c){_0xd0435a['push'](_0xd0435a['shift']());}}}(a141_0x591b,0x44c2a));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a141_0x3a8e1c(0x13d),a141_0x3a8e1c(0x147),a141_0x3a8e1c(0x135),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a141_0x3a8e1c(0x131),'form':a141_0x3a8e1c(0x134),'idCard':a141_0x3a8e1c(0x158)},SCENE_FLAG={'name':a141_0x3a8e1c(0x15e),'type':a141_0x3a8e1c(0x132),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a141_0x3a8e1c(0x137)},IMAGE_FILE_FLAG={'name':a141_0x3a8e1c(0x146),'type':a141_0x3a8e1c(0x132),'description':a141_0x3a8e1c(0x13c)},IMAGE_URL_FLAG={'name':'image-url','type':a141_0x3a8e1c(0x132),'description':a141_0x3a8e1c(0x13f)};function normalizeScene(_0xe537ef){const _0x39ae43=a141_0x3a8e1c,_0x1b062d=_0xe537ef[_0x39ae43(0x13b)]()[_0x39ae43(0x15c)]();if(_0x1b062d===_0x39ae43(0x140))return _0x39ae43(0x14b);if(_0x1b062d===_0x39ae43(0x13d)||_0x1b062d===_0x39ae43(0x147)||_0x1b062d==='form')return _0x1b062d;throw CliErrors[_0x39ae43(0x150)](_0x39ae43(0x13e)+_0xe537ef+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x39ae43(0x14d)](',\x20'));}function selectedInputs(_0x2b5a8e){const _0x2a6e23=a141_0x3a8e1c,_0x222cf8=_0x2b5a8e[_0x2a6e23(0x14c)](_0x2a6e23(0x146))[_0x2a6e23(0x13b)](),_0x88edcc=_0x2b5a8e['str'](_0x2a6e23(0x142))[_0x2a6e23(0x13b)]();return{'imageFile':_0x222cf8,'imageUrl':_0x88edcc,'count':[_0x222cf8,_0x88edcc][_0x2a6e23(0x138)](Boolean)['length']};}function validateInputSelection(_0x3442e0){const _0x27f3ce=a141_0x3a8e1c,_0xbf363=selectedInputs(_0x3442e0);if(_0xbf363[_0x27f3ce(0x162)]!==0x1)throw CliErrors[_0x27f3ce(0x150)](_0x27f3ce(0x12e));return _0xbf363;}function withScene(_0xd16bfc,_0x172451,_0x425798){const _0x3fe74f=a141_0x3a8e1c;return{..._0xd16bfc,'scene':_0x172451,..._0x425798?{'sourceFile':{'fileName':_0x425798[_0x3fe74f(0x130)],'filePath':_0x425798[_0x3fe74f(0x148)]}}:{}};}const ocrRecognize={'service':a141_0x3a8e1c(0x149),'command':'recognize','description':'使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','risk':a141_0x3a8e1c(0x12d),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x49ffcd){const _0x171a48=a141_0x3a8e1c,_0xbbd79c=normalizeScene(_0x49ffcd['str'](_0x171a48(0x15e))),_0x21cda0=SCENE_TO_LEGACY_TYPE[_0xbbd79c],_0x3babec=validateInputSelection(_0x49ffcd);if(_0x3babec['imageUrl']){const _0x47aff7=new URLSearchParams({'url':_0x3babec['imageUrl'],'type':_0x21cda0,'appCode':_0x49ffcd[_0x171a48(0x15b)]});return{'method':_0x171a48(0x161),'url':'/smartapi/ocr/recognize-text?'+_0x47aff7[_0x171a48(0x12c)](),'description':_0x171a48(0x144)+_0xbbd79c+_0x171a48(0x13a)};}const _0x5dcd5f=requireDevelopmentUploadFile(_0x3babec[_0x171a48(0x155)],_0x171a48(0x146));return{'method':_0x171a48(0x12b),'url':_0x171a48(0x12a),'body':{'steps':[{'method':_0x171a48(0x12b),'url':_0x171a48(0x12a),'body':{'appCode':_0x49ffcd[_0x171a48(0x15b)],'multipart':{'file':_0x5dcd5f}}},{'method':_0x171a48(0x12b),'url':_0x171a48(0x143),'body':{'filePath':_0x171a48(0x14a),'downloadFlag':![]}},{'method':_0x171a48(0x161),'url':_0x171a48(0x151),'query':{'appCode':_0x49ffcd[_0x171a48(0x15b)],'url':_0x171a48(0x145),'type':_0x21cda0}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0xbbd79c+_0x171a48(0x14f)};},async 'execute'(_0x44fc47){const _0x335e2e=a141_0x3a8e1c,_0x126014=normalizeScene(_0x44fc47['str'](_0x335e2e(0x15e))),_0x522cb7=SCENE_TO_LEGACY_TYPE[_0x126014],_0x2ddd87=validateInputSelection(_0x44fc47);if(_0x2ddd87[_0x335e2e(0x157)]){const _0x3582c4=await recognizeDevelopmentOcr(_0x44fc47[_0x335e2e(0x15b)],{'url':_0x2ddd87[_0x335e2e(0x157)],'type':_0x522cb7});return{'ok':!![],'data':withScene(_0x3582c4,_0x126014)};}const _0x932b31=requireDevelopmentUploadFile(_0x2ddd87[_0x335e2e(0x155)],_0x335e2e(0x146)),_0x1e4912=await uploadDevelopmentFile(_0x44fc47[_0x335e2e(0x15b)],_0x932b31[_0x335e2e(0x153)]);if(!_0x1e4912[_0x335e2e(0x148)])throw CliErrors[_0x335e2e(0x15f)](_0x335e2e(0x159));const _0xa9ab77=await queryDevelopmentFileUrl(_0x1e4912[_0x335e2e(0x148)],{'download':![]});if(!_0xa9ab77['fileUrl'])throw CliErrors[_0x335e2e(0x15f)](_0x335e2e(0x15a));const _0xf25840=await recognizeDevelopmentOcr(_0x44fc47['appCode'],{'url':_0xa9ab77[_0x335e2e(0x152)],'type':_0x522cb7});return{'ok':!![],'data':withScene(_0xf25840,_0x126014,_0x1e4912)};}};function a141_0xaaad(_0xbb23c1,_0x137bbf){_0xbb23c1=_0xbb23c1-0x12a;const _0x591b6e=a141_0x591b();let _0xaaad30=_0x591b6e[_0xbb23c1];return _0xaaad30;}export const ocrDefinitions=[ocrRecognize];function a141_0x591b(){const _0x20c204=['Unsupported\x20OCR\x20scene:\x20','Publicly\x20accessible\x20image\x20or\x20file\x20URL','idcard','916664JgfhbM','image-url','/smartapi/common/queryFileUrl','Preview:\x20recognize\x20','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','image-file','general','filePath','ocr','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','idCard','str','join','457530LGuMwK','\x20OCR','validation','/smartapi/ocr/recognize-text','fileUrl','path','10egjTWK','imageFile','152hviGPN','imageUrl','IdCard','File\x20upload\x20response\x20missing\x20filePath.','File\x20URL\x20response\x20missing\x20fileUrl.','appCode','toLowerCase','6330VColxj','scene','apiError','1137930wjbhhn','GET','count','/smartapi/common/uploadFile','POST','toString','read','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','3039526ZCIFnV','fileName','General','string','1095264HKoetK','Table','form','202374wCSxKa','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','filter','27xtmIts','\x20OCR\x20from\x20URL','trim','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','invoice'];a141_0x591b=function(){return _0x20c204;};return a141_0x591b();}