@lovrabet/rabetbase-cli 2.5.2-beta.6 → 2.5.2

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 (322) 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/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  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/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-restore.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/table-diff-shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/deployment/index.js +1 -1
  99. package/lib/commands/deployment/sync-all.js +1 -1
  100. package/lib/commands/deployment/sync-jobs.js +1 -1
  101. package/lib/commands/deployment/sync-status.js +1 -1
  102. package/lib/commands/doctor.js +1 -1
  103. package/lib/commands/file/index.js +1 -1
  104. package/lib/commands/instant-api-policy/current.js +1 -1
  105. package/lib/commands/instant-api-policy/index.js +1 -1
  106. package/lib/commands/instant-api-policy/init.js +1 -1
  107. package/lib/commands/instant-api-policy/publish.js +1 -1
  108. package/lib/commands/instant-api-policy/pull.js +1 -1
  109. package/lib/commands/instant-api-policy/revision.js +1 -1
  110. package/lib/commands/instant-api-policy/revisions.js +1 -1
  111. package/lib/commands/instant-api-policy/rollback.js +1 -1
  112. package/lib/commands/instant-api-policy/shared.js +1 -1
  113. package/lib/commands/instant-api-policy/validate.js +1 -1
  114. package/lib/commands/issue/index.js +1 -1
  115. package/lib/commands/issue/nudge.js +1 -1
  116. package/lib/commands/issue/report.js +1 -1
  117. package/lib/commands/issue/shared.js +1 -1
  118. package/lib/commands/kb/create.js +1 -1
  119. package/lib/commands/kb/delete.js +1 -1
  120. package/lib/commands/kb/detail.js +1 -1
  121. package/lib/commands/kb/index.js +1 -1
  122. package/lib/commands/kb/list.js +1 -1
  123. package/lib/commands/kb/search.js +1 -1
  124. package/lib/commands/kb/shared.js +1 -1
  125. package/lib/commands/kb/update.js +1 -1
  126. package/lib/commands/logs/index.js +1 -1
  127. package/lib/commands/menu/asset-update.js +1 -1
  128. package/lib/commands/menu/delete.js +1 -1
  129. package/lib/commands/menu/external-link-create.js +1 -1
  130. package/lib/commands/menu/external-link-update.js +1 -1
  131. package/lib/commands/menu/group-create.js +1 -1
  132. package/lib/commands/menu/group-update.js +1 -1
  133. package/lib/commands/menu/index.js +1 -1
  134. package/lib/commands/menu/list.js +1 -1
  135. package/lib/commands/menu/move.js +1 -1
  136. package/lib/commands/menu/regroup-start.js +1 -1
  137. package/lib/commands/menu/rename.js +1 -1
  138. package/lib/commands/menu/shared/compare-table.js +1 -1
  139. package/lib/commands/menu/shared/delete-plan.js +1 -1
  140. package/lib/commands/menu/shared/facts.js +1 -1
  141. package/lib/commands/menu/shared/index.js +1 -1
  142. package/lib/commands/menu/shared/inquirer.js +1 -1
  143. package/lib/commands/menu/shared/local-pages.js +1 -1
  144. package/lib/commands/menu/shared/logic.js +1 -1
  145. package/lib/commands/menu/shared/mutations.js +1 -1
  146. package/lib/commands/menu/shared/service.js +1 -1
  147. package/lib/commands/menu/shared/sync-core.js +1 -1
  148. package/lib/commands/menu/shared/update-core.js +1 -1
  149. package/lib/commands/menu/shared/valid-url.js +1 -1
  150. package/lib/commands/menu/sync.js +1 -1
  151. package/lib/commands/menu/visibility-update.js +1 -1
  152. package/lib/commands/notification/config-create.js +1 -1
  153. package/lib/commands/notification/config-delete.js +1 -1
  154. package/lib/commands/notification/config-list.js +1 -1
  155. package/lib/commands/notification/config-update.js +1 -1
  156. package/lib/commands/notification/index.js +1 -1
  157. package/lib/commands/notification/shared.js +1 -1
  158. package/lib/commands/ocr/index.js +1 -1
  159. package/lib/commands/page/create.js +1 -1
  160. package/lib/commands/page/custom/detail.js +1 -1
  161. package/lib/commands/page/custom/list.js +1 -1
  162. package/lib/commands/page/custom/publish.js +1 -1
  163. package/lib/commands/page/custom/shared.js +1 -1
  164. package/lib/commands/page/custom/syntax.js +1 -1
  165. package/lib/commands/page/custom/update.js +1 -1
  166. package/lib/commands/page/data-list-status.js +1 -1
  167. package/lib/commands/page/generate-start.js +1 -1
  168. package/lib/commands/page/generate-status.js +1 -1
  169. package/lib/commands/page/index.js +1 -1
  170. package/lib/commands/page/pull.js +1 -1
  171. package/lib/commands/page/push.js +1 -1
  172. package/lib/commands/page/relation-audit.js +1 -1
  173. package/lib/commands/page/restore.js +1 -1
  174. package/lib/commands/page/shared.js +1 -1
  175. package/lib/commands/page/sync.js +1 -1
  176. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  177. package/lib/commands/project/create/format-elapsed.js +1 -1
  178. package/lib/commands/project/create/main.js +1 -1
  179. package/lib/commands/project/create/materialize-project-template.js +1 -1
  180. package/lib/commands/project/create/project-name.js +1 -1
  181. package/lib/commands/project/create/project-template-archive.js +1 -1
  182. package/lib/commands/project/create/project-template-path.js +1 -1
  183. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  184. package/lib/commands/project/create/use-format-code.js +1 -1
  185. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  186. package/lib/commands/project/domain-routing-sync.js +1 -1
  187. package/lib/commands/project/index.js +1 -1
  188. package/lib/commands/project/upgrade.js +1 -1
  189. package/lib/commands/registry.js +1 -1
  190. package/lib/commands/role/delete.js +1 -1
  191. package/lib/commands/role/detail.js +1 -1
  192. package/lib/commands/role/index.js +1 -1
  193. package/lib/commands/role/list.js +1 -1
  194. package/lib/commands/role/shared.js +1 -1
  195. package/lib/commands/role/update.js +1 -1
  196. package/lib/commands/role/user-add.js +1 -1
  197. package/lib/commands/role/user-remove.js +1 -1
  198. package/lib/commands/role/user-resolve.js +1 -1
  199. package/lib/commands/rule/get.js +1 -1
  200. package/lib/commands/rule/index.js +1 -1
  201. package/lib/commands/rule/list.js +1 -1
  202. package/lib/commands/rule/set.js +1 -1
  203. package/lib/commands/rule/shared.js +1 -1
  204. package/lib/commands/run/index.js +1 -1
  205. package/lib/commands/schema.js +1 -1
  206. package/lib/commands/sql/create.js +1 -1
  207. package/lib/commands/sql/delete.js +1 -1
  208. package/lib/commands/sql/detail.js +1 -1
  209. package/lib/commands/sql/exec.js +1 -1
  210. package/lib/commands/sql/index.js +1 -1
  211. package/lib/commands/sql/list.js +1 -1
  212. package/lib/commands/sql/pull.js +1 -1
  213. package/lib/commands/sql/push.js +1 -1
  214. package/lib/commands/sql/shared.js +1 -1
  215. package/lib/commands/sql/status.js +1 -1
  216. package/lib/commands/sql/validate.js +1 -1
  217. package/lib/commands/task/index.js +1 -1
  218. package/lib/commands/task/status.js +1 -1
  219. package/lib/commands/tenant/index.js +1 -1
  220. package/lib/commands/tenant/members-list.js +1 -1
  221. package/lib/commands/tenant/shared.js +1 -1
  222. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  223. package/lib/commands/user-account/index.js +1 -1
  224. package/lib/commands/workspace/add.js +1 -1
  225. package/lib/commands/workspace/index.js +1 -1
  226. package/lib/commands/workspace/remove.js +1 -1
  227. package/lib/config/domain-config.js +1 -1
  228. package/lib/config/project-domain-routing.js +1 -1
  229. package/lib/config/schema.js +1 -1
  230. package/lib/constant/cdn.js +1 -1
  231. package/lib/constant/cli.js +1 -1
  232. package/lib/constant/defaults.js +1 -1
  233. package/lib/constant/domain.js +1 -1
  234. package/lib/constant/env.js +1 -1
  235. package/lib/constant/output.js +1 -1
  236. package/lib/constant/paths.js +1 -1
  237. package/lib/constant/region.js +1 -1
  238. package/lib/constant/risk.js +1 -1
  239. package/lib/constant/routing-profile.js +1 -1
  240. package/lib/context/app-resolver.js +1 -1
  241. package/lib/context/auth-resolver.js +1 -1
  242. package/lib/context/config-loader.js +1 -1
  243. package/lib/context.js +1 -1
  244. package/lib/core/alias-resolver.js +1 -1
  245. package/lib/core/api-client.js +1 -1
  246. package/lib/core/bff/config.js +1 -1
  247. package/lib/core/bff/file-system.js +1 -1
  248. package/lib/core/bff/hash.js +1 -1
  249. package/lib/core/bff/lock.js +1 -1
  250. package/lib/core/bff/utils.js +1 -1
  251. package/lib/core/db-resolver.js +1 -1
  252. package/lib/core/instant-api-policy/config.js +1 -1
  253. package/lib/core/kb-search-client.js +1 -1
  254. package/lib/core/page/file-system.js +1 -1
  255. package/lib/core/page/hash.js +1 -1
  256. package/lib/core/page/lock.js +1 -1
  257. package/lib/core/sql-index-auditor.js +1 -1
  258. package/lib/core/sql-sync/config.js +1 -1
  259. package/lib/core/sql-sync/file-system.js +1 -1
  260. package/lib/core/sql-sync/hash.js +1 -1
  261. package/lib/core/sql-sync/lock.js +1 -1
  262. package/lib/core/sql-sync/utils.js +1 -1
  263. package/lib/core/sql-validator.js +1 -1
  264. package/lib/errors.js +1 -1
  265. package/lib/framework/build-all-flags.js +1 -1
  266. package/lib/framework/error-output.js +1 -1
  267. package/lib/framework/explicit-yes.js +1 -1
  268. package/lib/framework/flags.js +1 -1
  269. package/lib/framework/help.js +1 -1
  270. package/lib/framework/index.js +1 -1
  271. package/lib/framework/output.js +1 -1
  272. package/lib/framework/response.js +1 -1
  273. package/lib/framework/runner-alias.js +1 -1
  274. package/lib/framework/runner.js +1 -1
  275. package/lib/framework/schema-export.js +1 -1
  276. package/lib/framework/supported-flags.js +1 -1
  277. package/lib/framework/types.js +1 -1
  278. package/lib/generated/build-info.d.ts +4 -4
  279. package/lib/generated/build-info.js +1 -1
  280. package/lib/generated/official-routing.js +1 -1
  281. package/lib/generated/routing-contract.js +1 -1
  282. package/lib/help.js +1 -1
  283. package/lib/postinstall.js +1 -1
  284. package/lib/runtime/confirmation.js +1 -1
  285. package/lib/runtime/event.js +1 -1
  286. package/lib/runtime/index.js +1 -1
  287. package/lib/runtime/queue.js +1 -1
  288. package/lib/runtime/resolve.js +1 -1
  289. package/lib/skills/builtin-skill.js +1 -1
  290. package/lib/skills/main.js +1 -1
  291. package/lib/skills/npx-skills-add.js +1 -1
  292. package/lib/skills/skill-presence.js +1 -1
  293. package/lib/telemetry/cli-command-trace.js +1 -1
  294. package/lib/telemetry/cli-help-trace.js +1 -1
  295. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  296. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  297. package/lib/telemetry/send-cli-trace-log.js +1 -1
  298. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  299. package/lib/utils/ai_config.js +1 -1
  300. package/lib/utils/apply-jq-filter.js +1 -1
  301. package/lib/utils/cdn-config.js +1 -1
  302. package/lib/utils/check-sdk-version.js +1 -1
  303. package/lib/utils/cli-version-check.js +1 -1
  304. package/lib/utils/cli-version-policy.js +1 -1
  305. package/lib/utils/config.js +1 -1
  306. package/lib/utils/entity-with-id.js +1 -1
  307. package/lib/utils/file-utils.js +1 -1
  308. package/lib/utils/guides-cdn.js +1 -1
  309. package/lib/utils/http-client.js +1 -1
  310. package/lib/utils/is-non-interactive.js +1 -1
  311. package/lib/utils/logger.js +1 -1
  312. package/lib/utils/params.js +1 -1
  313. package/lib/utils/platform.js +1 -1
  314. package/lib/utils/sleep.js +1 -1
  315. package/lib/utils/template-replacer.js +1 -1
  316. package/lib/utils/update-notice.js +1 -1
  317. package/lib/utils/version.js +1 -1
  318. package/lib/utils/with-active-cookie.js +1 -1
  319. package/lib/utils/write-cli-side-channel.js +1 -1
  320. package/package.json +1 -1
  321. package/skills/rabetbase/SKILL.md +1 -1
  322. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a157_0x7f9c85=a157_0x4f94;(function(_0x42b9d1,_0x249dee){const _0x543fd6=a157_0x4f94,_0x5e89ef=_0x42b9d1();while(!![]){try{const _0x316a4e=-parseInt(_0x543fd6(0x188))/0x1*(parseInt(_0x543fd6(0x170))/0x2)+-parseInt(_0x543fd6(0x17f))/0x3+parseInt(_0x543fd6(0x159))/0x4+parseInt(_0x543fd6(0x185))/0x5+-parseInt(_0x543fd6(0x145))/0x6*(-parseInt(_0x543fd6(0x187))/0x7)+-parseInt(_0x543fd6(0x137))/0x8+-parseInt(_0x543fd6(0x193))/0x9*(-parseInt(_0x543fd6(0x14c))/0xa);if(_0x316a4e===_0x249dee)break;else _0x5e89ef['push'](_0x5e89ef['shift']());}catch(_0x437766){_0x5e89ef['push'](_0x5e89ef['shift']());}}}(a157_0x5dd9,0x475ec));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=[a157_0x7f9c85(0x15b),a157_0x7f9c85(0x149),a157_0x7f9c85(0x19c),a157_0x7f9c85(0x134),a157_0x7f9c85(0x18f)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;function a157_0x5dd9(){const _0x3409cc=['has','1332256FtjMQv','validation','\x20has\x20an\x20invalid\x20id.','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_response_invalid','includes','Notification\x20JSON\x20from\x20','recipients','createTime','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','description','string','\x22\x20must\x20be\x20','Allowed\x20values:\x20','306HeBjUg','boolean','preflight','Notification\x20config\x20list\x20item\x20','FEISHU','utf8','\x20failed.','49430yvwXZt','_unavailable','\x20characters.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','length','\x22\x20must\x20be\x20a\x20non-empty\x20string.','\x20must\x20be\x20an\x20object.','kind','readTimeout','hasOwnProperty','a\x20JSON\x20object','channelType','\x20has\x20an\x20invalid\x20channelType.','371000UKNEWs','entries','EMAIL','Create\x20JSON\x20requires\x20field\x20','update','<redacted>','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','emailTargets','\x20--type\x20','type','channelConfigRaw','some','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','messageTemplate','notification_config_field_unknown','connectTimeout','Application-level\x20notification\x20config\x20ID','notification_config_confirmation_required','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','\x20is\x20invalid.','notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22','551058FgGPaF','endpointUrlRaw','Notification\x20JSON\x20channelConfig\x20field\x20\x22','\x20has\x20an\x20invalid\x20appCode.','parse','\x20has\x20an\x20unsupported\x20channelType.','str','\x20has\x20invalid\x20field\x20\x22','bccList','channelCode','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','notification_config_source_unavailable','a\x20non-empty\x20string','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','rabetbase\x20notification\x20config-list\x20--appcode\x20','1617816eWzOtf','file','keys','call','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','env','1117770djcLvW','updateTime','68131SHwhLD','2YWcAVW','notification_config_','name','every','notification_config_json_invalid','bool','stdin','WEBHOOK','object','notification_config_field_invalid','Unknown\x20notification\x20JSON\x20field\x20\x22','1341XSqWQO','create','a\x20string\x20or\x20null','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','subjectPrefix','environment\x20variable\x20','isSafeInteger','stringify','notification_config_id_invalid','DINGTALK','configCode','Missing\x20notification\x20JSON\x20source.','notification_config_update_empty','join','\x20is\x20missing\x20required\x20field\x20\x22','appCode','trim','path','number','a\x20JSON\x20object\x20or\x20null','configName','Notification\x20config\x20','ccList','failed','channelConfig','from-env','dry-run','endpointUrl','push','WECOM','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.'];a157_0x5dd9=function(){return _0x3409cc;};return a157_0x5dd9();}export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a157_0x7f9c85(0x1a7),a157_0x7f9c85(0x157),'endpointUrl',a157_0x7f9c85(0x12f),a157_0x7f9c85(0x141),a157_0x7f9c85(0x169),a157_0x7f9c85(0x154)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a157_0x7f9c85(0x1a2),a157_0x7f9c85(0x19d),a157_0x7f9c85(0x179)]),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x7f9c85(0x161),a157_0x7f9c85(0x13e),a157_0x7f9c85(0x12d),a157_0x7f9c85(0x178),'replyTo',a157_0x7f9c85(0x197),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a157_0x7f9c85(0x180),'type':a157_0x7f9c85(0x142),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a157_0x7f9c85(0x18e),'type':a157_0x7f9c85(0x146),'required':![],'default':![],'description':a157_0x7f9c85(0x16c)},{'name':a157_0x7f9c85(0x130),'type':'string','required':![],'description':a157_0x7f9c85(0x140)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x7f9c85(0x1a5),'required':!![],'description':a157_0x7f9c85(0x16a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x45ce67,_0x1811d2,_0x1385f9){return new CliError(_0x45ce67,0x1,_0x1811d2,_0x1385f9);}export function readNotificationId(_0x5ba78b){const _0x52317d=a157_0x7f9c85,_0x2f1a3e=_0x5ba78b['num']('id');if(!Number['isSafeInteger'](_0x2f1a3e)||_0x2f1a3e<=0x0)throw notificationError(_0x52317d(0x19b),_0x52317d(0x183));return _0x2f1a3e;}export function requireNotificationExplicitYes(_0x3d9870){const _0x18a95f=a157_0x7f9c85;if(_0x3d9870['bool'](_0x18a95f(0x131))||_0x3d9870[_0x18a95f(0x18d)]('yes'))return;throw notificationError(_0x18a95f(0x16b),_0x18a95f(0x14f),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x3f6363,_0x542f28=a157_0x7f9c85(0x163),_0x547be4='EMAIL'){const _0x4925df=a157_0x7f9c85,_0x56cae9=_0x3f6363[_0x4925df(0x176)](_0x542f28)[_0x4925df(0x1a3)]()||_0x547be4;if(!NOTIFICATION_CHANNEL_TYPES[_0x4925df(0x13c)](_0x56cae9))throw CliErrors[_0x4925df(0x138)]('Invalid\x20--'+_0x542f28+':\x20'+_0x56cae9,_0x4925df(0x144)+NOTIFICATION_CHANNEL_TYPES[_0x4925df(0x1a0)](',\x20')+'.');return _0x56cae9;}function a157_0x4f94(_0x36add0,_0x28489a){_0x36add0=_0x36add0-0x12c;const _0x5dd984=a157_0x5dd9();let _0x4f9421=_0x5dd984[_0x36add0];return _0x4f9421;}export function assertSingleNotificationSource(_0x52f278){const _0x373cb9=a157_0x7f9c85,_0x1dc3cf=[],_0x3f949f=_0x52f278['str']('file')[_0x373cb9(0x1a3)]();if(_0x3f949f)_0x1dc3cf[_0x373cb9(0x133)]({'kind':'file','path':_0x3f949f});if(_0x52f278[_0x373cb9(0x18d)](_0x373cb9(0x18e)))_0x1dc3cf[_0x373cb9(0x133)]({'kind':_0x373cb9(0x18e)});const _0x52bf88=_0x52f278[_0x373cb9(0x176)](_0x373cb9(0x130))[_0x373cb9(0x1a3)]();if(_0x52bf88)_0x1dc3cf[_0x373cb9(0x133)]({'kind':'env','name':_0x52bf88});if(_0x1dc3cf['length']===0x0)throw CliErrors[_0x373cb9(0x138)](_0x373cb9(0x19e),_0x373cb9(0x15f));if(_0x1dc3cf[_0x373cb9(0x150)]>0x1)throw CliErrors[_0x373cb9(0x138)](_0x373cb9(0x13a),_0x373cb9(0x15f));return _0x1dc3cf[0x0];}export async function readNotificationDocument(_0x1fd917,_0x161f21){const _0x383773=a157_0x7f9c85,_0x4b6ff8=assertSingleNotificationSource(_0x1fd917),_0x2007ba=_0x4b6ff8[_0x383773(0x153)]===_0x383773(0x180)?'file\x20'+_0x4b6ff8['path']:_0x4b6ff8[_0x383773(0x153)]==='env'?_0x383773(0x198)+_0x4b6ff8['name']:_0x383773(0x18e);let _0x25899d;try{if(_0x4b6ff8[_0x383773(0x153)]==='file')_0x25899d=await readFile(_0x4b6ff8[_0x383773(0x1a4)],_0x383773(0x14a));else{if(_0x4b6ff8[_0x383773(0x153)]===_0x383773(0x184)){if(!(_0x4b6ff8['name']in process.env))throw notificationError(_0x383773(0x17b),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x4b6ff8[_0x383773(0x18a)]);_0x25899d=process.env[_0x4b6ff8.name]??'';}else _0x25899d=await readStdin();}}catch(_0x49fe63){if(_0x49fe63 instanceof CliError)throw _0x49fe63;throw notificationError(_0x383773(0x17b),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x2007ba+'.');}let _0x3a856b;try{_0x3a856b=JSON[_0x383773(0x174)](_0x25899d);}catch{throw notificationError(_0x383773(0x18c),_0x383773(0x13d)+_0x2007ba+_0x383773(0x16d),_0x383773(0x135));}if(!isJsonObject(_0x3a856b))throw notificationError(_0x383773(0x18c),'Notification\x20JSON\x20from\x20'+_0x2007ba+_0x383773(0x152));return validateNotificationDocument(_0x3a856b,_0x161f21);}export function projectNotificationListConfig(_0x138c14,_0x4e7846){const _0x3d22fb=a157_0x7f9c85;return{'id':typeof _0x138c14['id']===_0x3d22fb(0x1a5)?_0x138c14['id']:null,'configCode':requireResponseString(_0x138c14[_0x3d22fb(0x19d)],_0x3d22fb(0x19d),_0x4e7846),'configName':requireResponseString(_0x138c14[_0x3d22fb(0x1a7)],_0x3d22fb(0x1a7),_0x4e7846),'channelType':requireResponseString(_0x138c14[_0x3d22fb(0x157)],_0x3d22fb(0x157),_0x4e7846),'description':normalizeNullableString(_0x138c14['description']),'createTime':normalizeNullableString(_0x138c14[_0x3d22fb(0x13f)]),'updateTime':normalizeNullableString(_0x138c14[_0x3d22fb(0x186)])};}export function normalizeExactNotificationConfig(_0x52ce6b,_0x5132ed,_0x3dba0f){const _0x59374d=a157_0x7f9c85;if(!Number[_0x59374d(0x199)](_0x52ce6b['id'])||_0x52ce6b['id']!==_0x5132ed)throw notificationError(_0x59374d(0x13b),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x5132ed+'.');if(_0x52ce6b[_0x59374d(0x1a2)]!==_0x3dba0f)throw notificationError('notification_config_response_invalid',_0x59374d(0x12c)+_0x5132ed+_0x59374d(0x17a));const _0x2ede6f=requireExactString(_0x52ce6b['configName'],'configName',_0x5132ed),_0x2eac85=requireExactString(_0x52ce6b['configCode'],_0x59374d(0x19d),_0x5132ed),_0x407394=requireExactString(_0x52ce6b[_0x59374d(0x157)],_0x59374d(0x157),_0x5132ed);if(!NOTIFICATION_CHANNEL_TYPES[_0x59374d(0x13c)](_0x407394))throw notificationError(_0x59374d(0x13b),_0x59374d(0x12c)+_0x5132ed+_0x59374d(0x175));const _0x41b8d7=responseNullableString(_0x52ce6b[_0x59374d(0x132)],_0x59374d(0x132),_0x5132ed),_0x24a79b=responseNullableString(_0x52ce6b['channelConfig'],_0x59374d(0x12f),_0x5132ed),_0x258c9a=responseNullableString(_0x52ce6b[_0x59374d(0x141)],_0x59374d(0x141),_0x5132ed),_0x11495c=responseNullableTimeout(_0x52ce6b[_0x59374d(0x169)],_0x59374d(0x169),_0x5132ed),_0x1fbce8=responseNullableTimeout(_0x52ce6b['readTimeout'],_0x59374d(0x154),_0x5132ed);return{'id':_0x5132ed,'appCode':_0x3dba0f,'configCode':_0x2eac85,'configName':_0x2ede6f,'channelType':_0x407394,'endpointUrl':redactSensitive(_0x41b8d7),'channelConfig':redactSensitive(_0x24a79b),'description':_0x258c9a,'connectTimeout':_0x11495c,'readTimeout':_0x1fbce8,'endpointUrlRaw':_0x41b8d7,'channelConfigRaw':_0x24a79b};}export async function requireExactNotificationConfig(_0x598a1d,_0x30b522,_0x1a4d4d){const _0x2d7bb6=a157_0x7f9c85;let _0x4962b9;try{_0x4962b9=await getNotificationChannelConfig(_0x30b522,_0x598a1d);}catch{throw safeApiFailure(_0x1a4d4d,_0x2d7bb6(0x147),_0x2d7bb6(0x17d)+_0x598a1d+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x4962b9,_0x30b522,_0x598a1d);}export function projectNotificationConfig(_0x126f25){const _0x55fc0f=a157_0x7f9c85;return{'id':_0x126f25['id']??null,'appCode':_0x126f25[_0x55fc0f(0x1a2)],'configCode':_0x126f25[_0x55fc0f(0x19d)]??null,'configName':_0x126f25[_0x55fc0f(0x1a7)],'channelType':_0x126f25['channelType'],'endpointUrl':redactSensitive(_0x126f25[_0x55fc0f(0x132)]),'channelConfig':redactSensitive(_0x126f25[_0x55fc0f(0x12f)]),'description':_0x126f25['description']??null,'connectTimeout':_0x126f25[_0x55fc0f(0x169)]??null,'readTimeout':_0x126f25[_0x55fc0f(0x154)]??null};}export function notificationSelector(_0x3f123f){const _0x43f112=a157_0x7f9c85;return{'appCode':_0x3f123f[_0x43f112(0x1a2)],'id':_0x3f123f['id'],'configCode':_0x3f123f[_0x43f112(0x19d)],'configName':_0x3f123f[_0x43f112(0x1a7)],'channelType':_0x3f123f[_0x43f112(0x157)]};}export function createMutationInput(_0x4b87dc,_0x517ef7){const _0x2a8097=a157_0x7f9c85;return{'appCode':_0x4b87dc,'configName':_0x517ef7['configName'],'channelType':_0x517ef7[_0x2a8097(0x157)],...hasOwn(_0x517ef7,_0x2a8097(0x132))?{'endpointUrl':_0x517ef7['endpointUrl']}:{},...hasOwn(_0x517ef7,_0x2a8097(0x12f))?{'channelConfig':serializeChannelConfig(_0x517ef7[_0x2a8097(0x12f)])}:{},...hasOwn(_0x517ef7,_0x2a8097(0x141))?{'description':_0x517ef7['description']}:{},...hasOwn(_0x517ef7,_0x2a8097(0x169))?{'connectTimeout':_0x517ef7[_0x2a8097(0x169)]}:{},...hasOwn(_0x517ef7,'readTimeout')?{'readTimeout':_0x517ef7[_0x2a8097(0x154)]}:{}};}export function mergeUpdateInput(_0x505422,_0x365284){const _0x220be1=a157_0x7f9c85;return{'id':_0x505422['id'],'appCode':_0x505422['appCode'],'configName':_0x365284['configName']??_0x505422[_0x220be1(0x1a7)],'channelType':_0x365284[_0x220be1(0x157)]??_0x505422[_0x220be1(0x157)],'endpointUrl':hasOwn(_0x365284,_0x220be1(0x132))?_0x365284[_0x220be1(0x132)]:_0x505422[_0x220be1(0x171)],'channelConfig':hasOwn(_0x365284,_0x220be1(0x12f))?serializeChannelConfig(_0x365284['channelConfig']):_0x505422[_0x220be1(0x164)],'description':hasOwn(_0x365284,_0x220be1(0x141))?_0x365284[_0x220be1(0x141)]:_0x505422['description'],'connectTimeout':hasOwn(_0x365284,_0x220be1(0x169))?_0x365284[_0x220be1(0x169)]:_0x505422['connectTimeout'],'readTimeout':hasOwn(_0x365284,_0x220be1(0x154))?_0x365284['readTimeout']:_0x505422[_0x220be1(0x154)]};}export function plannedUpdateProjection(_0x967874,_0x2edb9d){const _0x27c882=a157_0x7f9c85;return projectNotificationConfig({'id':_0x967874['id'],'appCode':_0x967874[_0x27c882(0x1a2)],'configCode':_0x967874['configCode'],'configName':_0x2edb9d['configName']??_0x967874['configName'],'channelType':_0x2edb9d[_0x27c882(0x157)]??_0x967874[_0x27c882(0x157)],'endpointUrl':hasOwn(_0x2edb9d,_0x27c882(0x132))?_0x2edb9d[_0x27c882(0x132)]:_0x967874[_0x27c882(0x171)],'channelConfig':hasOwn(_0x2edb9d,_0x27c882(0x12f))?_0x2edb9d[_0x27c882(0x12f)]:_0x967874['channelConfigRaw'],'description':hasOwn(_0x2edb9d,_0x27c882(0x141))?_0x2edb9d['description']:_0x967874[_0x27c882(0x141)],'connectTimeout':hasOwn(_0x2edb9d,_0x27c882(0x169))?_0x2edb9d[_0x27c882(0x169)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x967874[_0x27c882(0x169)],'readTimeout':hasOwn(_0x2edb9d,'readTimeout')?_0x2edb9d[_0x27c882(0x154)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x967874[_0x27c882(0x154)]});}export function requestedSafeFieldsMatch(_0x249149,_0x1f6e34,_0x5d0956){const _0x2a6405=a157_0x7f9c85,_0x3c5c76=[],_0x10427d=[],_0x39a022=[];for(const _0xf03a38 of[_0x2a6405(0x1a7),_0x2a6405(0x157),_0x2a6405(0x141)]){if(!hasOwn(_0x5d0956,_0xf03a38))continue;_0x39a022[_0x2a6405(0x133)](_0xf03a38),_0x3c5c76[_0x2a6405(0x133)](_0x1f6e34[_0xf03a38]===_0x5d0956[_0xf03a38]),_0x10427d['push'](_0x249149[_0xf03a38]!==_0x5d0956[_0xf03a38]&&_0x1f6e34[_0xf03a38]===_0x5d0956[_0xf03a38]);}for(const _0x2273c4 of[_0x2a6405(0x169),_0x2a6405(0x154)]){if(!hasOwn(_0x5d0956,_0x2273c4))continue;const _0x4cd578=_0x5d0956[_0x2273c4]??(_0x2273c4==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x39a022[_0x2a6405(0x133)](_0x2273c4),_0x3c5c76[_0x2a6405(0x133)](_0x1f6e34[_0x2273c4]===_0x4cd578),_0x10427d[_0x2a6405(0x133)](_0x249149[_0x2273c4]!==_0x4cd578&&_0x1f6e34[_0x2273c4]===_0x4cd578);}return hasOwn(_0x5d0956,_0x2a6405(0x132))&&_0x5d0956[_0x2a6405(0x132)]===null&&(_0x39a022[_0x2a6405(0x133)]('endpointUrl:null'),_0x3c5c76[_0x2a6405(0x133)](_0x1f6e34[_0x2a6405(0x171)]===null||_0x1f6e34[_0x2a6405(0x171)]===''),_0x10427d[_0x2a6405(0x133)](_0x249149['endpointUrlRaw']!==null&&_0x249149['endpointUrlRaw']!==''&&(_0x1f6e34[_0x2a6405(0x171)]===null||_0x1f6e34['endpointUrlRaw']===''))),{'allMatch':_0x3c5c76[_0x2a6405(0x18b)](Boolean),'provesChange':_0x10427d[_0x2a6405(0x165)](Boolean),'verifiedFields':_0x39a022};}export function validateNotificationDeleteReadback(_0x18a362,_0x2a5b09,_0x4d5aab){const _0x459730=a157_0x7f9c85;for(const [_0x3e26f7,_0x5b5baf]of _0x18a362[_0x459730(0x15a)]()){if(!Number[_0x459730(0x199)](_0x5b5baf['id'])||_0x5b5baf['id']<=0x0)throw notificationError(_0x459730(0x13b),_0x459730(0x148)+(_0x3e26f7+0x1)+_0x459730(0x139));if(_0x5b5baf['appCode']!==_0x2a5b09)throw notificationError(_0x459730(0x13b),_0x459730(0x148)+(_0x3e26f7+0x1)+_0x459730(0x173));if(_0x5b5baf[_0x459730(0x157)]!==_0x4d5aab)throw notificationError(_0x459730(0x13b),_0x459730(0x148)+(_0x3e26f7+0x1)+_0x459730(0x158));}}export function safeApiFailure(_0x4c96fc,_0x1b264c,_0x57f16d){const _0x2879bf=a157_0x7f9c85;return notificationError(_0x2879bf(0x189)+_0x4c96fc+'_'+(_0x1b264c==='mutation'?_0x2879bf(0x12e):_0x1b264c+_0x2879bf(0x14d)),_0x2879bf(0x12c)+_0x4c96fc+'\x20'+_0x1b264c+_0x2879bf(0x14b),_0x57f16d);}export function notificationLookupCommand(_0x266456,_0x7adc9b){const _0x4e83d5=a157_0x7f9c85;return _0x4e83d5(0x17e)+_0x266456+_0x4e83d5(0x162)+_0x7adc9b+'\x20--format\x20compress';}function validateNotificationDocument(_0xd5b018,_0x71969b){const _0x184c18=a157_0x7f9c85;for(const _0x302b3f of Object[_0x184c18(0x181)](_0xd5b018)){if(FORBIDDEN_IDENTITY_FIELDS[_0x184c18(0x136)](_0x302b3f))throw notificationError(_0x184c18(0x16e),_0x184c18(0x16f)+_0x302b3f+_0x184c18(0x160));if(!ALLOWED_INPUT_FIELDS['has'](_0x302b3f))throw notificationError(_0x184c18(0x168),_0x184c18(0x192)+_0x302b3f+'\x22.');}if(_0x71969b===_0x184c18(0x15d)&&Object[_0x184c18(0x181)](_0xd5b018)[_0x184c18(0x150)]===0x0)throw notificationError(_0x184c18(0x19f),_0x184c18(0x166));const _0x2e95de={};if(hasOwn(_0xd5b018,_0x184c18(0x1a7)))_0x2e95de['configName']=validateRequiredString(_0xd5b018[_0x184c18(0x1a7)],_0x184c18(0x1a7),0x80);else{if(_0x71969b===_0x184c18(0x194))throw notificationError('notification_config_field_required',_0x184c18(0x15c)+'\x22configName\x22.');}if(hasOwn(_0xd5b018,'channelType')){if(typeof _0xd5b018[_0x184c18(0x157)]!==_0x184c18(0x142))throw invalidFieldType(_0x184c18(0x157),'a\x20supported\x20string');const _0x323f1e=_0xd5b018['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x184c18(0x13c)](_0x323f1e))throw notificationError(_0x184c18(0x191),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x184c18(0x144)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x2e95de[_0x184c18(0x157)]=_0x323f1e;}else{if(_0x71969b===_0x184c18(0x194))throw notificationError('notification_config_field_required',_0x184c18(0x15c)+'\x22channelType\x22.');}for(const [_0x59b68a,_0xb0ec4a]of[['endpointUrl',0x200],['description',0x100]]){if(!hasOwn(_0xd5b018,_0x59b68a))continue;const _0x569287=_0xd5b018[_0x59b68a];if(_0x569287!==null&&typeof _0x569287!==_0x184c18(0x142))throw invalidFieldType(_0x59b68a,_0x184c18(0x195));if(typeof _0x569287===_0x184c18(0x142)&&_0x569287[_0x184c18(0x150)]>_0xb0ec4a)throw notificationError(_0x184c18(0x191),'Notification\x20JSON\x20field\x20\x22'+_0x59b68a+'\x22\x20cannot\x20exceed\x20'+_0xb0ec4a+_0x184c18(0x14e));_0x2e95de[_0x59b68a]=_0x569287;}if(hasOwn(_0xd5b018,'channelConfig')){const _0x1aaef0=_0xd5b018[_0x184c18(0x12f)];if(_0x1aaef0===null&&_0x71969b==='create')throw invalidFieldType(_0x184c18(0x12f),_0x184c18(0x156));if(_0x1aaef0!==null&&!isJsonObject(_0x1aaef0))throw invalidFieldType(_0x184c18(0x12f),_0x71969b===_0x184c18(0x15d)?_0x184c18(0x1a6):'a\x20JSON\x20object');_0x1aaef0!==null&&validateChannelConfigFields(_0x2e95de['channelType'],_0x1aaef0),_0x2e95de[_0x184c18(0x12f)]=_0x1aaef0;}for(const _0x342f43 of[_0x184c18(0x169),'readTimeout']){if(!hasOwn(_0xd5b018,_0x342f43))continue;const _0x103a54=_0xd5b018[_0x342f43];if(_0x103a54!==null&&(!Number[_0x184c18(0x199)](_0x103a54)||_0x103a54<0x0))throw notificationError(_0x184c18(0x191),_0x184c18(0x16f)+_0x342f43+_0x184c18(0x196));_0x2e95de[_0x342f43]=_0x103a54;}return _0x2e95de;}function validateRequiredString(_0x5384bb,_0x1718da,_0x59ed06){const _0xa7c3dc=a157_0x7f9c85;if(typeof _0x5384bb!==_0xa7c3dc(0x142))throw invalidFieldType(_0x1718da,_0xa7c3dc(0x17c));const _0x520e6f=_0x5384bb[_0xa7c3dc(0x1a3)]();if(!_0x520e6f)throw notificationError(_0xa7c3dc(0x191),'Notification\x20JSON\x20field\x20\x22'+_0x1718da+_0xa7c3dc(0x151));if(_0x520e6f[_0xa7c3dc(0x150)]>_0x59ed06)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x1718da+'\x22\x20cannot\x20exceed\x20'+_0x59ed06+'\x20characters.');return _0x520e6f;}function validateChannelConfigFields(_0x46fd46,_0x32c315){const _0x4ea3c6=a157_0x7f9c85;if(hasOwn(_0x32c315,_0x4ea3c6(0x167)))throw forbiddenChannelConfigField('messageTemplate');if(_0x46fd46===_0x4ea3c6(0x15b))for(const _0x27a88e of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x32c315,_0x27a88e))throw forbiddenChannelConfigField(_0x27a88e);}}function forbiddenChannelConfigField(_0x1f15fa){const _0x2b0d3b=a157_0x7f9c85;return notificationError('notification_config_channel_field_forbidden',_0x2b0d3b(0x172)+_0x1f15fa+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x4f11f0,_0x19a9cf){const _0x42b450=a157_0x7f9c85;return notificationError(_0x42b450(0x191),_0x42b450(0x16f)+_0x4f11f0+_0x42b450(0x143)+_0x19a9cf+'.');}function serializeChannelConfig(_0x3f3e5f){const _0x37128b=a157_0x7f9c85;return _0x3f3e5f===null||_0x3f3e5f===undefined?null:JSON[_0x37128b(0x19a)](_0x3f3e5f);}function redactSensitive(_0xd36e80){const _0x1bdd61=a157_0x7f9c85;return _0xd36e80===null||_0xd36e80===undefined||_0xd36e80===''?null:_0x1bdd61(0x15e);}function requireResponseString(_0x36fe7f,_0x128338,_0xa6c2a9){const _0x38c53a=a157_0x7f9c85;if(typeof _0x36fe7f!==_0x38c53a(0x142)||_0x36fe7f['trim']()==='')throw CliErrors['apiError']('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0xa6c2a9+0x1)+_0x38c53a(0x1a1)+_0x128338+'\x22.');return _0x36fe7f[_0x38c53a(0x1a3)]();}function requireExactString(_0x447c21,_0x3d766b,_0x4e9ad6){const _0x3cb2ec=a157_0x7f9c85;if(typeof _0x447c21!==_0x3cb2ec(0x142)||_0x447c21['trim']()==='')throw notificationError(_0x3cb2ec(0x13b),'Notification\x20config\x20'+_0x4e9ad6+_0x3cb2ec(0x1a1)+_0x3d766b+'\x22.');return _0x447c21[_0x3cb2ec(0x1a3)]();}function responseNullableString(_0x564280,_0x48dfe4,_0x1e41be){const _0x3f084f=a157_0x7f9c85;if(_0x564280===undefined||_0x564280===null)return null;if(typeof _0x564280!=='string')throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x1e41be+_0x3f084f(0x177)+_0x48dfe4+'\x22.');return _0x564280;}function responseNullableTimeout(_0x4cf80c,_0x500355,_0x115e25){const _0x38dfd7=a157_0x7f9c85;if(_0x4cf80c===undefined||_0x4cf80c===null)return null;if(!Number[_0x38dfd7(0x199)](_0x4cf80c)||_0x4cf80c<0x0)throw notificationError(_0x38dfd7(0x13b),_0x38dfd7(0x12c)+_0x115e25+_0x38dfd7(0x177)+_0x500355+'\x22.');return _0x4cf80c;}function normalizeNullableString(_0x35078a){const _0x34f19f=a157_0x7f9c85;return typeof _0x35078a===_0x34f19f(0x142)?_0x35078a:null;}function isJsonObject(_0x2aea7e){const _0x3dc43a=a157_0x7f9c85;return _0x2aea7e!==null&&typeof _0x2aea7e===_0x3dc43a(0x190)&&!Array['isArray'](_0x2aea7e);}function hasOwn(_0x3c8de5,_0x19a415){const _0x3a0149=a157_0x7f9c85;return Object['prototype'][_0x3a0149(0x155)][_0x3a0149(0x182)](_0x3c8de5,_0x19a415);}async function readStdin(){const _0x1bee27=a157_0x7f9c85;let _0x5ea544='';process[_0x1bee27(0x18e)]['setEncoding']('utf8');for await(const _0x316828 of process[_0x1bee27(0x18e)])_0x5ea544+=_0x316828;return _0x5ea544;}
1
+ const a157_0x43d0bd=a157_0x3e62;(function(_0x4eaa10,_0x59f345){const _0x5a0650=a157_0x3e62,_0x2065e6=_0x4eaa10();while(!![]){try{const _0x290249=-parseInt(_0x5a0650(0x117))/0x1+parseInt(_0x5a0650(0x160))/0x2*(parseInt(_0x5a0650(0xf6))/0x3)+parseInt(_0x5a0650(0xfc))/0x4*(-parseInt(_0x5a0650(0x128))/0x5)+parseInt(_0x5a0650(0xfe))/0x6+parseInt(_0x5a0650(0x15b))/0x7*(parseInt(_0x5a0650(0x14c))/0x8)+parseInt(_0x5a0650(0x166))/0x9+-parseInt(_0x5a0650(0x131))/0xa;if(_0x290249===_0x59f345)break;else _0x2065e6['push'](_0x2065e6['shift']());}catch(_0x4518f6){_0x2065e6['push'](_0x2065e6['shift']());}}}(a157_0x2cbc,0xd1d03));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','FEISHU',a157_0x43d0bd(0xf3),a157_0x43d0bd(0xf8),a157_0x43d0bd(0x14f)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a157_0x43d0bd(0x134),'channelType',a157_0x43d0bd(0xfb),'channelConfig','description',a157_0x43d0bd(0xf0),a157_0x43d0bd(0x13b)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a157_0x43d0bd(0x168),a157_0x43d0bd(0x15d),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x43d0bd(0x109),a157_0x43d0bd(0x151),a157_0x43d0bd(0x142),a157_0x43d0bd(0x14a),a157_0x43d0bd(0x16b),a157_0x43d0bd(0xee),a157_0x43d0bd(0x169),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a157_0x43d0bd(0x108),'type':a157_0x43d0bd(0x10b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a157_0x43d0bd(0x156),'required':![],'default':![],'description':a157_0x43d0bd(0x140)},{'name':a157_0x43d0bd(0x10a),'type':a157_0x43d0bd(0x10b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x43d0bd(0x100),'required':!![],'description':a157_0x43d0bd(0x126)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3ee723,_0x43bea4,_0x4d7ccc){return new CliError(_0x3ee723,0x1,_0x43bea4,_0x4d7ccc);}export function readNotificationId(_0x5f01cc){const _0xd9eb6c=a157_0x43d0bd,_0x58643d=_0x5f01cc['num']('id');if(!Number[_0xd9eb6c(0x139)](_0x58643d)||_0x58643d<=0x0)throw notificationError('notification_config_id_invalid',_0xd9eb6c(0x106));return _0x58643d;}export function requireNotificationExplicitYes(_0x2974e7){const _0x4d6b6d=a157_0x43d0bd;if(_0x2974e7[_0x4d6b6d(0x144)](_0x4d6b6d(0x104))||_0x2974e7[_0x4d6b6d(0x144)](_0x4d6b6d(0x10f)))return;throw notificationError('notification_config_confirmation_required',_0x4d6b6d(0x136),_0x4d6b6d(0x145));}export function readNotificationChannelType(_0x45d0dc,_0x15ea5c='type',_0x2a6520=a157_0x43d0bd(0x12f)){const _0x3f437f=a157_0x43d0bd,_0x1016db=_0x45d0dc[_0x3f437f(0x152)](_0x15ea5c)['trim']()||_0x2a6520;if(!NOTIFICATION_CHANNEL_TYPES[_0x3f437f(0x10e)](_0x1016db))throw CliErrors[_0x3f437f(0x15c)](_0x3f437f(0x13f)+_0x15ea5c+':\x20'+_0x1016db,_0x3f437f(0x127)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1016db;}export function assertSingleNotificationSource(_0xc3f528){const _0x174505=a157_0x43d0bd,_0x30dac4=[],_0x4aded8=_0xc3f528[_0x174505(0x152)](_0x174505(0x108))[_0x174505(0x147)]();if(_0x4aded8)_0x30dac4[_0x174505(0x111)]({'kind':'file','path':_0x4aded8});if(_0xc3f528[_0x174505(0x144)](_0x174505(0x14d)))_0x30dac4[_0x174505(0x111)]({'kind':_0x174505(0x14d)});const _0x591f1f=_0xc3f528[_0x174505(0x152)](_0x174505(0x10a))[_0x174505(0x147)]();if(_0x591f1f)_0x30dac4[_0x174505(0x111)]({'kind':'env','name':_0x591f1f});if(_0x30dac4[_0x174505(0x13e)]===0x0)throw CliErrors[_0x174505(0x15c)](_0x174505(0x10c),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x30dac4[_0x174505(0x13e)]>0x1)throw CliErrors[_0x174505(0x15c)](_0x174505(0x155),_0x174505(0xf9));return _0x30dac4[0x0];}export async function readNotificationDocument(_0x27ede7,_0x4ef74f){const _0xb5c43f=a157_0x43d0bd,_0x247a0c=assertSingleNotificationSource(_0x27ede7),_0x46cb22=_0x247a0c['kind']===_0xb5c43f(0x108)?_0xb5c43f(0x146)+_0x247a0c['path']:_0x247a0c['kind']===_0xb5c43f(0x12a)?_0xb5c43f(0xf1)+_0x247a0c[_0xb5c43f(0x157)]:_0xb5c43f(0x14d);let _0x498e05;try{if(_0x247a0c[_0xb5c43f(0x12e)]==='file')_0x498e05=await readFile(_0x247a0c['path'],'utf8');else{if(_0x247a0c[_0xb5c43f(0x12e)]===_0xb5c43f(0x12a)){if(!(_0x247a0c[_0xb5c43f(0x157)]in process.env))throw notificationError(_0xb5c43f(0x153),_0xb5c43f(0x122)+_0x247a0c['name']);_0x498e05=process.env[_0x247a0c.name]??'';}else _0x498e05=await readStdin();}}catch(_0x2d0005){if(_0x2d0005 instanceof CliError)throw _0x2d0005;throw notificationError(_0xb5c43f(0x153),_0xb5c43f(0x15e)+_0x46cb22+'.');}let _0x17521a;try{_0x17521a=JSON[_0xb5c43f(0xfa)](_0x498e05);}catch{throw notificationError('notification_config_json_invalid',_0xb5c43f(0x114)+_0x46cb22+_0xb5c43f(0x11b),_0xb5c43f(0x14e));}if(!isJsonObject(_0x17521a))throw notificationError('notification_config_json_invalid',_0xb5c43f(0x114)+_0x46cb22+_0xb5c43f(0x112));return validateNotificationDocument(_0x17521a,_0x4ef74f);}export function projectNotificationListConfig(_0x1937cd,_0xfc7b9c){const _0x3e53fe=a157_0x43d0bd;return{'id':typeof _0x1937cd['id']===_0x3e53fe(0x100)?_0x1937cd['id']:null,'configCode':requireResponseString(_0x1937cd[_0x3e53fe(0x15d)],'configCode',_0xfc7b9c),'configName':requireResponseString(_0x1937cd['configName'],_0x3e53fe(0x134),_0xfc7b9c),'channelType':requireResponseString(_0x1937cd[_0x3e53fe(0x148)],_0x3e53fe(0x148),_0xfc7b9c),'description':normalizeNullableString(_0x1937cd[_0x3e53fe(0x12c)]),'createTime':normalizeNullableString(_0x1937cd['createTime']),'updateTime':normalizeNullableString(_0x1937cd[_0x3e53fe(0x11a)])};}export function normalizeExactNotificationConfig(_0xd22d4a,_0x8d8b24,_0x22ca36){const _0x5d0790=a157_0x43d0bd;if(!Number['isSafeInteger'](_0xd22d4a['id'])||_0xd22d4a['id']!==_0x8d8b24)throw notificationError(_0x5d0790(0x165),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x8d8b24+'.');if(_0xd22d4a[_0x5d0790(0x168)]!==_0x22ca36)throw notificationError('notification_config_response_invalid',_0x5d0790(0x163)+_0x8d8b24+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x4f22e3=requireExactString(_0xd22d4a[_0x5d0790(0x134)],_0x5d0790(0x134),_0x8d8b24),_0x2670e3=requireExactString(_0xd22d4a['configCode'],_0x5d0790(0x15d),_0x8d8b24),_0x222404=requireExactString(_0xd22d4a[_0x5d0790(0x148)],_0x5d0790(0x148),_0x8d8b24);if(!NOTIFICATION_CHANNEL_TYPES[_0x5d0790(0x10e)](_0x222404))throw notificationError(_0x5d0790(0x165),'Notification\x20config\x20'+_0x8d8b24+_0x5d0790(0x150));const _0x157ffa=responseNullableString(_0xd22d4a[_0x5d0790(0xfb)],_0x5d0790(0xfb),_0x8d8b24),_0x18a0bc=responseNullableString(_0xd22d4a[_0x5d0790(0x121)],_0x5d0790(0x121),_0x8d8b24),_0x335def=responseNullableString(_0xd22d4a[_0x5d0790(0x12c)],_0x5d0790(0x12c),_0x8d8b24),_0x3a45ea=responseNullableTimeout(_0xd22d4a['connectTimeout'],_0x5d0790(0xf0),_0x8d8b24),_0x4d417e=responseNullableTimeout(_0xd22d4a[_0x5d0790(0x13b)],'readTimeout',_0x8d8b24);return{'id':_0x8d8b24,'appCode':_0x22ca36,'configCode':_0x2670e3,'configName':_0x4f22e3,'channelType':_0x222404,'endpointUrl':redactSensitive(_0x157ffa),'channelConfig':redactSensitive(_0x18a0bc),'description':_0x335def,'connectTimeout':_0x3a45ea,'readTimeout':_0x4d417e,'endpointUrlRaw':_0x157ffa,'channelConfigRaw':_0x18a0bc};}export async function requireExactNotificationConfig(_0x522249,_0x564295,_0x2979e0){const _0x3a1636=a157_0x43d0bd;let _0x282623;try{_0x282623=await getNotificationChannelConfig(_0x564295,_0x522249);}catch{throw safeApiFailure(_0x2979e0,'preflight',_0x3a1636(0x161)+_0x522249+_0x3a1636(0x12b));}return normalizeExactNotificationConfig(_0x282623,_0x564295,_0x522249);}export function projectNotificationConfig(_0x47b694){const _0x1c8348=a157_0x43d0bd;return{'id':_0x47b694['id']??null,'appCode':_0x47b694[_0x1c8348(0x168)],'configCode':_0x47b694['configCode']??null,'configName':_0x47b694[_0x1c8348(0x134)],'channelType':_0x47b694[_0x1c8348(0x148)],'endpointUrl':redactSensitive(_0x47b694[_0x1c8348(0xfb)]),'channelConfig':redactSensitive(_0x47b694[_0x1c8348(0x121)]),'description':_0x47b694[_0x1c8348(0x12c)]??null,'connectTimeout':_0x47b694[_0x1c8348(0xf0)]??null,'readTimeout':_0x47b694[_0x1c8348(0x13b)]??null};}export function notificationSelector(_0x1088cd){const _0x4e7d5f=a157_0x43d0bd;return{'appCode':_0x1088cd[_0x4e7d5f(0x168)],'id':_0x1088cd['id'],'configCode':_0x1088cd[_0x4e7d5f(0x15d)],'configName':_0x1088cd[_0x4e7d5f(0x134)],'channelType':_0x1088cd[_0x4e7d5f(0x148)]};}export function createMutationInput(_0x4d2f74,_0x50aa51){const _0x288057=a157_0x43d0bd;return{'appCode':_0x4d2f74,'configName':_0x50aa51[_0x288057(0x134)],'channelType':_0x50aa51['channelType'],...hasOwn(_0x50aa51,_0x288057(0xfb))?{'endpointUrl':_0x50aa51[_0x288057(0xfb)]}:{},...hasOwn(_0x50aa51,_0x288057(0x121))?{'channelConfig':serializeChannelConfig(_0x50aa51[_0x288057(0x121)])}:{},...hasOwn(_0x50aa51,_0x288057(0x12c))?{'description':_0x50aa51[_0x288057(0x12c)]}:{},...hasOwn(_0x50aa51,_0x288057(0xf0))?{'connectTimeout':_0x50aa51['connectTimeout']}:{},...hasOwn(_0x50aa51,_0x288057(0x13b))?{'readTimeout':_0x50aa51[_0x288057(0x13b)]}:{}};}export function mergeUpdateInput(_0x3f5c16,_0x1ee7b6){const _0x256e06=a157_0x43d0bd;return{'id':_0x3f5c16['id'],'appCode':_0x3f5c16[_0x256e06(0x168)],'configName':_0x1ee7b6[_0x256e06(0x134)]??_0x3f5c16[_0x256e06(0x134)],'channelType':_0x1ee7b6['channelType']??_0x3f5c16[_0x256e06(0x148)],'endpointUrl':hasOwn(_0x1ee7b6,_0x256e06(0xfb))?_0x1ee7b6[_0x256e06(0xfb)]:_0x3f5c16[_0x256e06(0xed)],'channelConfig':hasOwn(_0x1ee7b6,_0x256e06(0x121))?serializeChannelConfig(_0x1ee7b6['channelConfig']):_0x3f5c16[_0x256e06(0x13c)],'description':hasOwn(_0x1ee7b6,_0x256e06(0x12c))?_0x1ee7b6[_0x256e06(0x12c)]:_0x3f5c16[_0x256e06(0x12c)],'connectTimeout':hasOwn(_0x1ee7b6,'connectTimeout')?_0x1ee7b6[_0x256e06(0xf0)]:_0x3f5c16[_0x256e06(0xf0)],'readTimeout':hasOwn(_0x1ee7b6,_0x256e06(0x13b))?_0x1ee7b6[_0x256e06(0x13b)]:_0x3f5c16[_0x256e06(0x13b)]};}export function plannedUpdateProjection(_0x15d7e5,_0x81fc32){const _0x3ab044=a157_0x43d0bd;return projectNotificationConfig({'id':_0x15d7e5['id'],'appCode':_0x15d7e5[_0x3ab044(0x168)],'configCode':_0x15d7e5[_0x3ab044(0x15d)],'configName':_0x81fc32[_0x3ab044(0x134)]??_0x15d7e5['configName'],'channelType':_0x81fc32['channelType']??_0x15d7e5[_0x3ab044(0x148)],'endpointUrl':hasOwn(_0x81fc32,_0x3ab044(0xfb))?_0x81fc32[_0x3ab044(0xfb)]:_0x15d7e5['endpointUrlRaw'],'channelConfig':hasOwn(_0x81fc32,_0x3ab044(0x121))?_0x81fc32[_0x3ab044(0x121)]:_0x15d7e5[_0x3ab044(0x13c)],'description':hasOwn(_0x81fc32,_0x3ab044(0x12c))?_0x81fc32['description']:_0x15d7e5[_0x3ab044(0x12c)],'connectTimeout':hasOwn(_0x81fc32,_0x3ab044(0xf0))?_0x81fc32[_0x3ab044(0xf0)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x15d7e5[_0x3ab044(0xf0)],'readTimeout':hasOwn(_0x81fc32,_0x3ab044(0x13b))?_0x81fc32['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x15d7e5[_0x3ab044(0x13b)]});}export function requestedSafeFieldsMatch(_0x5e29cc,_0x2d642d,_0x30fe5e){const _0x4529e0=a157_0x43d0bd,_0x3a3dc2=[],_0x51478d=[],_0x184e1d=[];for(const _0xf58648 of[_0x4529e0(0x134),_0x4529e0(0x148),_0x4529e0(0x12c)]){if(!hasOwn(_0x30fe5e,_0xf58648))continue;_0x184e1d[_0x4529e0(0x111)](_0xf58648),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0xf58648]===_0x30fe5e[_0xf58648]),_0x51478d[_0x4529e0(0x111)](_0x5e29cc[_0xf58648]!==_0x30fe5e[_0xf58648]&&_0x2d642d[_0xf58648]===_0x30fe5e[_0xf58648]);}for(const _0x1e100f of[_0x4529e0(0xf0),_0x4529e0(0x13b)]){if(!hasOwn(_0x30fe5e,_0x1e100f))continue;const _0x2adba2=_0x30fe5e[_0x1e100f]??(_0x1e100f===_0x4529e0(0xf0)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x184e1d['push'](_0x1e100f),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0x1e100f]===_0x2adba2),_0x51478d['push'](_0x5e29cc[_0x1e100f]!==_0x2adba2&&_0x2d642d[_0x1e100f]===_0x2adba2);}return hasOwn(_0x30fe5e,_0x4529e0(0xfb))&&_0x30fe5e[_0x4529e0(0xfb)]===null&&(_0x184e1d[_0x4529e0(0x111)](_0x4529e0(0x133)),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0x4529e0(0xed)]===null||_0x2d642d['endpointUrlRaw']===''),_0x51478d['push'](_0x5e29cc[_0x4529e0(0xed)]!==null&&_0x5e29cc['endpointUrlRaw']!==''&&(_0x2d642d['endpointUrlRaw']===null||_0x2d642d[_0x4529e0(0xed)]===''))),{'allMatch':_0x3a3dc2[_0x4529e0(0xf7)](Boolean),'provesChange':_0x51478d[_0x4529e0(0x159)](Boolean),'verifiedFields':_0x184e1d};}export function validateNotificationDeleteReadback(_0x3e645a,_0x5671e0,_0x5a82c2){const _0x18d168=a157_0x43d0bd;for(const [_0x1904e8,_0x18fa1d]of _0x3e645a[_0x18d168(0x158)]()){if(!Number['isSafeInteger'](_0x18fa1d['id'])||_0x18fa1d['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x18d168(0x119)+(_0x1904e8+0x1)+_0x18d168(0x154));if(_0x18fa1d[_0x18d168(0x168)]!==_0x5671e0)throw notificationError('notification_config_response_invalid',_0x18d168(0x119)+(_0x1904e8+0x1)+_0x18d168(0x138));if(_0x18fa1d[_0x18d168(0x148)]!==_0x5a82c2)throw notificationError(_0x18d168(0x165),'Notification\x20config\x20list\x20item\x20'+(_0x1904e8+0x1)+_0x18d168(0x132));}}export function safeApiFailure(_0xb8039a,_0x482455,_0x28f833){const _0x15cffb=a157_0x43d0bd;return notificationError(_0x15cffb(0x11d)+_0xb8039a+'_'+(_0x482455===_0x15cffb(0xf2)?'failed':_0x482455+'_unavailable'),_0x15cffb(0x163)+_0xb8039a+'\x20'+_0x482455+_0x15cffb(0x15f),_0x28f833);}function a157_0x3e62(_0x1114b5,_0x58f5c8){_0x1114b5=_0x1114b5-0xed;const _0x2cbc2a=a157_0x2cbc();let _0x3e62af=_0x2cbc2a[_0x1114b5];return _0x3e62af;}export function notificationLookupCommand(_0x1726c3,_0x21076b){const _0x5aa1f9=a157_0x43d0bd;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x1726c3+_0x5aa1f9(0x167)+_0x21076b+_0x5aa1f9(0x110);}function validateNotificationDocument(_0x216dc3,_0x2278a7){const _0x20a472=a157_0x43d0bd;for(const _0x4886aa of Object[_0x20a472(0x141)](_0x216dc3)){if(FORBIDDEN_IDENTITY_FIELDS[_0x20a472(0x12d)](_0x4886aa))throw notificationError(_0x20a472(0x135),_0x20a472(0x137)+_0x4886aa+_0x20a472(0x125));if(!ALLOWED_INPUT_FIELDS[_0x20a472(0x12d)](_0x4886aa))throw notificationError(_0x20a472(0x16a),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x4886aa+'\x22.');}if(_0x2278a7==='update'&&Object[_0x20a472(0x141)](_0x216dc3)['length']===0x0)throw notificationError(_0x20a472(0x149),_0x20a472(0x130));const _0xb7e9f={};if(hasOwn(_0x216dc3,_0x20a472(0x134)))_0xb7e9f['configName']=validateRequiredString(_0x216dc3[_0x20a472(0x134)],'configName',0x80);else{if(_0x2278a7===_0x20a472(0xf5))throw notificationError(_0x20a472(0x162),_0x20a472(0x164)+_0x20a472(0x120));}if(hasOwn(_0x216dc3,'channelType')){if(typeof _0x216dc3[_0x20a472(0x148)]!==_0x20a472(0x10b))throw invalidFieldType(_0x20a472(0x148),_0x20a472(0x143));const _0x5a536a=_0x216dc3[_0x20a472(0x148)][_0x20a472(0x147)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x20a472(0x10e)](_0x5a536a))throw notificationError(_0x20a472(0xfd),_0x20a472(0x107),_0x20a472(0x127)+NOTIFICATION_CHANNEL_TYPES[_0x20a472(0xf4)](',\x20')+'.');_0xb7e9f[_0x20a472(0x148)]=_0x5a536a;}else{if(_0x2278a7==='create')throw notificationError(_0x20a472(0x162),_0x20a472(0x164)+_0x20a472(0x118));}for(const [_0xe72660,_0x719837]of[[_0x20a472(0xfb),0x200],[_0x20a472(0x12c),0x100]]){if(!hasOwn(_0x216dc3,_0xe72660))continue;const _0x57644c=_0x216dc3[_0xe72660];if(_0x57644c!==null&&typeof _0x57644c!=='string')throw invalidFieldType(_0xe72660,'a\x20string\x20or\x20null');if(typeof _0x57644c===_0x20a472(0x10b)&&_0x57644c['length']>_0x719837)throw notificationError(_0x20a472(0xfd),_0x20a472(0x137)+_0xe72660+_0x20a472(0x103)+_0x719837+_0x20a472(0x115));_0xb7e9f[_0xe72660]=_0x57644c;}if(hasOwn(_0x216dc3,_0x20a472(0x121))){const _0x56b50e=_0x216dc3[_0x20a472(0x121)];if(_0x56b50e===null&&_0x2278a7==='create')throw invalidFieldType(_0x20a472(0x121),_0x20a472(0x13a));if(_0x56b50e!==null&&!isJsonObject(_0x56b50e))throw invalidFieldType(_0x20a472(0x121),_0x2278a7===_0x20a472(0x113)?_0x20a472(0x11e):_0x20a472(0x13a));_0x56b50e!==null&&validateChannelConfigFields(_0xb7e9f[_0x20a472(0x148)],_0x56b50e),_0xb7e9f[_0x20a472(0x121)]=_0x56b50e;}for(const _0x6013b0 of[_0x20a472(0xf0),_0x20a472(0x13b)]){if(!hasOwn(_0x216dc3,_0x6013b0))continue;const _0x205841=_0x216dc3[_0x6013b0];if(_0x205841!==null&&(!Number[_0x20a472(0x139)](_0x205841)||_0x205841<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x6013b0+_0x20a472(0x124));_0xb7e9f[_0x6013b0]=_0x205841;}return _0xb7e9f;}function validateRequiredString(_0x110357,_0x26ed33,_0xc2aea4){const _0x13e08e=a157_0x43d0bd;if(typeof _0x110357!==_0x13e08e(0x10b))throw invalidFieldType(_0x26ed33,'a\x20non-empty\x20string');const _0x38c798=_0x110357[_0x13e08e(0x147)]();if(!_0x38c798)throw notificationError('notification_config_field_invalid',_0x13e08e(0x137)+_0x26ed33+_0x13e08e(0x14b));if(_0x38c798[_0x13e08e(0x13e)]>_0xc2aea4)throw notificationError(_0x13e08e(0xfd),'Notification\x20JSON\x20field\x20\x22'+_0x26ed33+'\x22\x20cannot\x20exceed\x20'+_0xc2aea4+'\x20characters.');return _0x38c798;}function validateChannelConfigFields(_0x29de41,_0x46c2dc){const _0x3383e3=a157_0x43d0bd;if(hasOwn(_0x46c2dc,_0x3383e3(0x102)))throw forbiddenChannelConfigField(_0x3383e3(0x102));if(_0x29de41===_0x3383e3(0x12f))for(const _0x116b67 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x46c2dc,_0x116b67))throw forbiddenChannelConfigField(_0x116b67);}}function forbiddenChannelConfigField(_0x3701d7){const _0x73115c=a157_0x43d0bd;return notificationError('notification_config_channel_field_forbidden',_0x73115c(0x13d)+_0x3701d7+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x4dbfae,_0x4fb9cc){const _0x18f030=a157_0x43d0bd;return notificationError(_0x18f030(0xfd),_0x18f030(0x137)+_0x4dbfae+'\x22\x20must\x20be\x20'+_0x4fb9cc+'.');}function serializeChannelConfig(_0xa4f499){const _0x12cb0a=a157_0x43d0bd;return _0xa4f499===null||_0xa4f499===undefined?null:JSON[_0x12cb0a(0xef)](_0xa4f499);}function redactSensitive(_0x389060){const _0x4e522f=a157_0x43d0bd;return _0x389060===null||_0x389060===undefined||_0x389060===''?null:_0x4e522f(0xff);}function requireResponseString(_0x4419e5,_0x1a43d5,_0x11b606){const _0x1674f6=a157_0x43d0bd;if(typeof _0x4419e5!=='string'||_0x4419e5['trim']()==='')throw CliErrors[_0x1674f6(0x11f)](_0x1674f6(0x15a),_0x1674f6(0x10d)+(_0x11b606+0x1)+_0x1674f6(0x129)+_0x1a43d5+'\x22.');return _0x4419e5[_0x1674f6(0x147)]();}function requireExactString(_0x659b58,_0x5261d6,_0x5236c1){const _0x436b33=a157_0x43d0bd;if(typeof _0x659b58!==_0x436b33(0x10b)||_0x659b58[_0x436b33(0x147)]()==='')throw notificationError(_0x436b33(0x165),_0x436b33(0x163)+_0x5236c1+_0x436b33(0x129)+_0x5261d6+'\x22.');return _0x659b58[_0x436b33(0x147)]();}function responseNullableString(_0x4624af,_0x16c98b,_0x81df74){const _0x394417=a157_0x43d0bd;if(_0x4624af===undefined||_0x4624af===null)return null;if(typeof _0x4624af!==_0x394417(0x10b))throw notificationError(_0x394417(0x165),_0x394417(0x163)+_0x81df74+_0x394417(0x11c)+_0x16c98b+'\x22.');return _0x4624af;}function responseNullableTimeout(_0x2d5b9b,_0xccf686,_0x224416){const _0x216422=a157_0x43d0bd;if(_0x2d5b9b===undefined||_0x2d5b9b===null)return null;if(!Number['isSafeInteger'](_0x2d5b9b)||_0x2d5b9b<0x0)throw notificationError('notification_config_response_invalid',_0x216422(0x163)+_0x224416+_0x216422(0x11c)+_0xccf686+'\x22.');return _0x2d5b9b;}function normalizeNullableString(_0x250ffd){const _0x5ce6be=a157_0x43d0bd;return typeof _0x250ffd===_0x5ce6be(0x10b)?_0x250ffd:null;}function a157_0x2cbc(){const _0x35762d=['replyTo','endpointUrlRaw','subjectPrefix','stringify','connectTimeout','environment\x20variable\x20','mutation','DINGTALK','join','create','846093ktmqWm','every','WECOM','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','parse','endpointUrl','22620BeiTOy','notification_config_field_invalid','1109406kqNZGv','<redacted>','number','call','messageTemplate','\x22\x20cannot\x20exceed\x20','dry-run','isArray','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','file','emailTargets','from-env','string','Missing\x20notification\x20JSON\x20source.','Item\x20','includes','yes','\x20--format\x20compress','push','\x20must\x20be\x20an\x20object.','update','Notification\x20JSON\x20from\x20','\x20characters.','object','1243335KoGlzG','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','updateTime','\x20is\x20invalid.','\x20has\x20invalid\x20field\x20\x22','notification_config_','a\x20JSON\x20object\x20or\x20null','apiError','\x22configName\x22.','channelConfig','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','utf8','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Application-level\x20notification\x20config\x20ID','Allowed\x20values:\x20','575nwXhSy','\x20is\x20missing\x20required\x20field\x20\x22','env','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','description','has','kind','EMAIL','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','20946830FPdAOx','\x20has\x20an\x20invalid\x20channelType.','endpointUrl:null','configName','notification_config_field_forbidden','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Notification\x20JSON\x20field\x20\x22','\x20has\x20an\x20invalid\x20appCode.','isSafeInteger','a\x20JSON\x20object','readTimeout','channelConfigRaw','Notification\x20JSON\x20channelConfig\x20field\x20\x22','length','Invalid\x20--','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','keys','ccList','a\x20supported\x20string','bool','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','file\x20','trim','channelType','notification_config_update_empty','bccList','\x22\x20must\x20be\x20a\x20non-empty\x20string.','6392024aaWhCJ','stdin','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','WEBHOOK','\x20has\x20an\x20unsupported\x20channelType.','recipients','str','notification_config_source_unavailable','\x20has\x20an\x20invalid\x20id.','Notification\x20JSON\x20source\x20is\x20ambiguous.','boolean','name','entries','some','Invalid\x20notification\x20config\x20response.','14koSZQM','validation','configCode','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20failed.','10NJbuIj','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_required','Notification\x20config\x20','Create\x20JSON\x20requires\x20field\x20','notification_config_response_invalid','14892084SAdoRD','\x20--type\x20','appCode','fromName','notification_config_field_unknown'];a157_0x2cbc=function(){return _0x35762d;};return a157_0x2cbc();}function isJsonObject(_0x16ecbb){const _0x165f02=a157_0x43d0bd;return _0x16ecbb!==null&&typeof _0x16ecbb===_0x165f02(0x116)&&!Array[_0x165f02(0x105)](_0x16ecbb);}function hasOwn(_0x43b563,_0x58d2fc){const _0x340663=a157_0x43d0bd;return Object['prototype']['hasOwnProperty'][_0x340663(0x101)](_0x43b563,_0x58d2fc);}async function readStdin(){const _0x332b4b=a157_0x43d0bd;let _0x44f03d='';process[_0x332b4b(0x14d)]['setEncoding'](_0x332b4b(0x123));for await(const _0x7d7242 of process[_0x332b4b(0x14d)])_0x44f03d+=_0x7d7242;return _0x44f03d;}
@@ -1 +1 @@
1
- const a158_0x3111c7=a158_0x5666;(function(_0x36fe2e,_0x30647b){const _0x2d1acb=a158_0x5666,_0x561e5e=_0x36fe2e();while(!![]){try{const _0xfb4a03=-parseInt(_0x2d1acb(0x1af))/0x1+-parseInt(_0x2d1acb(0x1a0))/0x2*(-parseInt(_0x2d1acb(0x199))/0x3)+parseInt(_0x2d1acb(0x1a1))/0x4+parseInt(_0x2d1acb(0x19c))/0x5*(-parseInt(_0x2d1acb(0x19a))/0x6)+parseInt(_0x2d1acb(0x1bf))/0x7*(parseInt(_0x2d1acb(0x1a7))/0x8)+-parseInt(_0x2d1acb(0x19d))/0x9+parseInt(_0x2d1acb(0x1be))/0xa;if(_0xfb4a03===_0x30647b)break;else _0x561e5e['push'](_0x561e5e['shift']());}catch(_0x1123d5){_0x561e5e['push'](_0x561e5e['shift']());}}}(a158_0x28bc,0x9fe9c));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a158_0x28bc(){const _0x13861e=['8561MCZWFE','validation','fileName','Publicly\x20accessible\x20image\x20or\x20file\x20URL','File\x20upload\x20response\x20missing\x20filePath.','image-url','image-file','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','\x20OCR\x20from\x20URL','toString','path','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','/smartapi/ocr/recognize-text','filePath','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','IdCard','390CouOtB','12nxtzDs','filter','2952180TJuwbx','10275633WLqqrE','appCode','\x20OCR','11654pSEPUL','1992608wxzahi','Preview:\x20recognize\x20','idcard','/smartapi/ocr/recognize-text?','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','POST','6216hewUCf','Invoice','form','scene','read','trim','imageUrl','Table','48468wbTcdD','invoice','/smartapi/common/uploadFile','GET','idCard','general','apiError','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','string','fileUrl','str','imageFile','General','/smartapi/common/queryFileUrl','8201480ymPvHu'];a158_0x28bc=function(){return _0x13861e;};return a158_0x28bc();}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a158_0x3111c7(0x1b0),a158_0x3111c7(0x1b4),a158_0x3111c7(0x1a9),a158_0x3111c7(0x1b3)],SCENE_TO_LEGACY_TYPE={'invoice':a158_0x3111c7(0x1a8),'general':a158_0x3111c7(0x1bc),'form':a158_0x3111c7(0x1ae),'idCard':a158_0x3111c7(0x198)},SCENE_FLAG={'name':'scene','type':a158_0x3111c7(0x1b8),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a158_0x3111c7(0x194)},IMAGE_FILE_FLAG={'name':a158_0x3111c7(0x1c5),'type':a158_0x3111c7(0x1b8),'description':a158_0x3111c7(0x1b6)},IMAGE_URL_FLAG={'name':a158_0x3111c7(0x1c4),'type':a158_0x3111c7(0x1b8),'description':a158_0x3111c7(0x1c2)};function normalizeScene(_0x570ce2){const _0x58368d=a158_0x3111c7,_0x371380=_0x570ce2[_0x58368d(0x1ac)]()['toLowerCase']();if(_0x371380===_0x58368d(0x1a3))return'idCard';if(_0x371380==='invoice'||_0x371380==='general'||_0x371380===_0x58368d(0x1a9))return _0x371380;throw CliErrors[_0x58368d(0x1c0)]('Unsupported\x20OCR\x20scene:\x20'+_0x570ce2+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x441f08){const _0x2d83f7=a158_0x3111c7,_0xdbd5f6=_0x441f08[_0x2d83f7(0x1ba)]('image-file')[_0x2d83f7(0x1ac)](),_0x1a8ebf=_0x441f08[_0x2d83f7(0x1ba)](_0x2d83f7(0x1c4))['trim']();return{'imageFile':_0xdbd5f6,'imageUrl':_0x1a8ebf,'count':[_0xdbd5f6,_0x1a8ebf][_0x2d83f7(0x19b)](Boolean)['length']};}function validateInputSelection(_0x12bd5e){const _0x2dbf89=a158_0x3111c7,_0x5352b1=selectedInputs(_0x12bd5e);if(_0x5352b1['count']!==0x1)throw CliErrors[_0x2dbf89(0x1c0)](_0x2dbf89(0x1b7));return _0x5352b1;}function withScene(_0x539170,_0x2fe774,_0xe4341e){const _0x4d5c4c=a158_0x3111c7;return{..._0x539170,'scene':_0x2fe774,..._0xe4341e?{'sourceFile':{'fileName':_0xe4341e[_0x4d5c4c(0x1c1)],'filePath':_0xe4341e[_0x4d5c4c(0x196)]}}:{}};}function a158_0x5666(_0x1d42ac,_0x544f47){_0x1d42ac=_0x1d42ac-0x194;const _0x28bc0b=a158_0x28bc();let _0x56666f=_0x28bc0b[_0x1d42ac];return _0x56666f;}const ocrRecognize={'service':'ocr','command':'recognize','description':a158_0x3111c7(0x197),'risk':a158_0x3111c7(0x1ab),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x37acfa){const _0x459ca9=a158_0x3111c7,_0x449ebc=normalizeScene(_0x37acfa['str'](_0x459ca9(0x1aa))),_0x5870bb=SCENE_TO_LEGACY_TYPE[_0x449ebc],_0x585254=validateInputSelection(_0x37acfa);if(_0x585254[_0x459ca9(0x1ad)]){const _0x44ac85=new URLSearchParams({'url':_0x585254['imageUrl'],'type':_0x5870bb,'appCode':_0x37acfa[_0x459ca9(0x19e)]});return{'method':_0x459ca9(0x1b2),'url':_0x459ca9(0x1a4)+_0x44ac85[_0x459ca9(0x1c8)](),'description':_0x459ca9(0x1a2)+_0x449ebc+_0x459ca9(0x1c7)};}const _0x5b3cb1=requireDevelopmentUploadFile(_0x585254[_0x459ca9(0x1bb)],_0x459ca9(0x1c5));return{'method':_0x459ca9(0x1a6),'url':_0x459ca9(0x1b1),'body':{'steps':[{'method':_0x459ca9(0x1a6),'url':_0x459ca9(0x1b1),'body':{'appCode':_0x37acfa[_0x459ca9(0x19e)],'multipart':{'file':_0x5b3cb1}}},{'method':_0x459ca9(0x1a6),'url':_0x459ca9(0x1bd),'body':{'filePath':_0x459ca9(0x1a5),'downloadFlag':![]}},{'method':_0x459ca9(0x1b2),'url':_0x459ca9(0x195),'query':{'appCode':_0x37acfa[_0x459ca9(0x19e)],'url':_0x459ca9(0x1c6),'type':_0x5870bb}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x449ebc+_0x459ca9(0x19f)};},async 'execute'(_0x15757d){const _0x5f3a81=a158_0x3111c7,_0x8afc8a=normalizeScene(_0x15757d['str'](_0x5f3a81(0x1aa))),_0x17676c=SCENE_TO_LEGACY_TYPE[_0x8afc8a],_0x39188c=validateInputSelection(_0x15757d);if(_0x39188c[_0x5f3a81(0x1ad)]){const _0x3f41f7=await recognizeDevelopmentOcr(_0x15757d['appCode'],{'url':_0x39188c[_0x5f3a81(0x1ad)],'type':_0x17676c});return{'ok':!![],'data':withScene(_0x3f41f7,_0x8afc8a)};}const _0x6b83c7=requireDevelopmentUploadFile(_0x39188c[_0x5f3a81(0x1bb)],_0x5f3a81(0x1c5)),_0xbe52a1=await uploadDevelopmentFile(_0x15757d[_0x5f3a81(0x19e)],_0x6b83c7[_0x5f3a81(0x1c9)]);if(!_0xbe52a1['filePath'])throw CliErrors[_0x5f3a81(0x1b5)](_0x5f3a81(0x1c3));const _0x2ea3b7=await queryDevelopmentFileUrl(_0xbe52a1[_0x5f3a81(0x196)],{'download':![]});if(!_0x2ea3b7[_0x5f3a81(0x1b9)])throw CliErrors['apiError']('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x108dfc=await recognizeDevelopmentOcr(_0x15757d[_0x5f3a81(0x19e)],{'url':_0x2ea3b7[_0x5f3a81(0x1b9)],'type':_0x17676c});return{'ok':!![],'data':withScene(_0x108dfc,_0x8afc8a,_0xbe52a1)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a158_0x3df950=a158_0xbc1a;(function(_0x5d1d96,_0x163b8a){const _0x51088f=a158_0xbc1a,_0x3a7e30=_0x5d1d96();while(!![]){try{const _0x49fa63=parseInt(_0x51088f(0xfe))/0x1*(parseInt(_0x51088f(0x109))/0x2)+parseInt(_0x51088f(0xf1))/0x3*(-parseInt(_0x51088f(0xf9))/0x4)+parseInt(_0x51088f(0x11a))/0x5*(-parseInt(_0x51088f(0xfd))/0x6)+parseInt(_0x51088f(0x10a))/0x7*(-parseInt(_0x51088f(0x11c))/0x8)+-parseInt(_0x51088f(0xee))/0x9+-parseInt(_0x51088f(0x10c))/0xa*(parseInt(_0x51088f(0xf3))/0xb)+parseInt(_0x51088f(0xfb))/0xc;if(_0x49fa63===_0x163b8a)break;else _0x3a7e30['push'](_0x3a7e30['shift']());}catch(_0x119f66){_0x3a7e30['push'](_0x3a7e30['shift']());}}}(a158_0x4cc7,0x46cd4));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a158_0x4cc7(){const _0x162e02=['filePath','GET','count','/smartapi/common/uploadFile','1660vYUFFe','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','1836824ucpXBB','apiError','length','IdCard','imageFile','trim','path','fileUrl','3921327EIJswG','Table','idCard','12vBtCTn','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','33CTgYyn','form','recognize','File\x20URL\x20response\x20missing\x20fileUrl.','string','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','560684WoJRWW','toLowerCase','19947492oMVMdz','toString','3858dzXeRv','12nOEKns','/smartapi/ocr/recognize-text?','POST','appCode','invoice','ocr','File\x20upload\x20response\x20missing\x20filePath.','scene','idcard','fileName','image-url','26298rcJpAG','7iieULG','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','302030SYSwOj','/smartapi/ocr/recognize-text','image-file','general','imageUrl','Invoice','str','/smartapi/common/queryFileUrl','Preview:\x20recognize\x20','validation'];a158_0x4cc7=function(){return _0x162e02;};return a158_0x4cc7();}import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a158_0x3df950(0x102),a158_0x3df950(0x10f),a158_0x3df950(0xf4),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a158_0x3df950(0x111),'general':'General','form':a158_0x3df950(0xef),'idCard':a158_0x3df950(0x11f)},SCENE_FLAG={'name':a158_0x3df950(0x105),'type':a158_0x3df950(0xf7),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a158_0x3df950(0x11b)},IMAGE_FILE_FLAG={'name':a158_0x3df950(0x10e),'type':a158_0x3df950(0xf7),'description':a158_0x3df950(0x10b)},IMAGE_URL_FLAG={'name':a158_0x3df950(0x108),'type':a158_0x3df950(0xf7),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x4ee540){const _0x3aad2f=a158_0x3df950,_0x228cb0=_0x4ee540['trim']()[_0x3aad2f(0xfa)]();if(_0x228cb0===_0x3aad2f(0x106))return _0x3aad2f(0xf0);if(_0x228cb0===_0x3aad2f(0x102)||_0x228cb0===_0x3aad2f(0x10f)||_0x228cb0===_0x3aad2f(0xf4))return _0x228cb0;throw CliErrors[_0x3aad2f(0x115)]('Unsupported\x20OCR\x20scene:\x20'+_0x4ee540+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x5b3394){const _0x4eeece=a158_0x3df950,_0x3331d6=_0x5b3394[_0x4eeece(0x112)](_0x4eeece(0x10e))['trim'](),_0x6347c2=_0x5b3394['str'](_0x4eeece(0x108))[_0x4eeece(0xeb)]();return{'imageFile':_0x3331d6,'imageUrl':_0x6347c2,'count':[_0x3331d6,_0x6347c2]['filter'](Boolean)[_0x4eeece(0x11e)]};}function a158_0xbc1a(_0x174df2,_0x1b7f6d){_0x174df2=_0x174df2-0xea;const _0x4cc78f=a158_0x4cc7();let _0xbc1a74=_0x4cc78f[_0x174df2];return _0xbc1a74;}function validateInputSelection(_0x441629){const _0x35e3ff=a158_0x3df950,_0x3d0108=selectedInputs(_0x441629);if(_0x3d0108[_0x35e3ff(0x118)]!==0x1)throw CliErrors[_0x35e3ff(0x115)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x3d0108;}function withScene(_0x4dcbcd,_0x475cd2,_0xd80205){const _0x213621=a158_0x3df950;return{..._0x4dcbcd,'scene':_0x475cd2,..._0xd80205?{'sourceFile':{'fileName':_0xd80205[_0x213621(0x107)],'filePath':_0xd80205[_0x213621(0x116)]}}:{}};}const ocrRecognize={'service':a158_0x3df950(0x103),'command':a158_0x3df950(0xf5),'description':a158_0x3df950(0xf2),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3bd7a4){const _0x477728=a158_0x3df950,_0x4eedb1=normalizeScene(_0x3bd7a4[_0x477728(0x112)](_0x477728(0x105))),_0xdc064a=SCENE_TO_LEGACY_TYPE[_0x4eedb1],_0x4107e3=validateInputSelection(_0x3bd7a4);if(_0x4107e3[_0x477728(0x110)]){const _0x4040fd=new URLSearchParams({'url':_0x4107e3[_0x477728(0x110)],'type':_0xdc064a,'appCode':_0x3bd7a4[_0x477728(0x101)]});return{'method':_0x477728(0x117),'url':_0x477728(0xff)+_0x4040fd[_0x477728(0xfc)](),'description':_0x477728(0x114)+_0x4eedb1+'\x20OCR\x20from\x20URL'};}const _0x33d60d=requireDevelopmentUploadFile(_0x4107e3[_0x477728(0xea)],_0x477728(0x10e));return{'method':_0x477728(0x100),'url':_0x477728(0x119),'body':{'steps':[{'method':'POST','url':_0x477728(0x119),'body':{'appCode':_0x3bd7a4[_0x477728(0x101)],'multipart':{'file':_0x33d60d}}},{'method':'POST','url':_0x477728(0x113),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x477728(0x117),'url':_0x477728(0x10d),'query':{'appCode':_0x3bd7a4[_0x477728(0x101)],'url':_0x477728(0xf8),'type':_0xdc064a}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x4eedb1+'\x20OCR'};},async 'execute'(_0x59e373){const _0x505a27=a158_0x3df950,_0x32d0f4=normalizeScene(_0x59e373[_0x505a27(0x112)](_0x505a27(0x105))),_0x5d8fd5=SCENE_TO_LEGACY_TYPE[_0x32d0f4],_0xf4f8bf=validateInputSelection(_0x59e373);if(_0xf4f8bf['imageUrl']){const _0x5209ae=await recognizeDevelopmentOcr(_0x59e373['appCode'],{'url':_0xf4f8bf['imageUrl'],'type':_0x5d8fd5});return{'ok':!![],'data':withScene(_0x5209ae,_0x32d0f4)};}const _0x47ea69=requireDevelopmentUploadFile(_0xf4f8bf[_0x505a27(0xea)],_0x505a27(0x10e)),_0x860fa5=await uploadDevelopmentFile(_0x59e373[_0x505a27(0x101)],_0x47ea69[_0x505a27(0xec)]);if(!_0x860fa5['filePath'])throw CliErrors[_0x505a27(0x11d)](_0x505a27(0x104));const _0x4da50a=await queryDevelopmentFileUrl(_0x860fa5[_0x505a27(0x116)],{'download':![]});if(!_0x4da50a[_0x505a27(0xed)])throw CliErrors[_0x505a27(0x11d)](_0x505a27(0xf6));const _0x53abf7=await recognizeDevelopmentOcr(_0x59e373[_0x505a27(0x101)],{'url':_0x4da50a[_0x505a27(0xed)],'type':_0x5d8fd5});return{'ok':!![],'data':withScene(_0x53abf7,_0x32d0f4,_0x860fa5)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a159_0x2c30b7=a159_0x4c85;function a159_0x278f(){const _0x28fd06=['isInteger','number','93240FpMIrg','2628440wRMJqP','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','parent-menu-id','length','toLowerCase','18WdyfPy','pageName\x20cannot\x20exceed\x20100\x20characters.','BLANK','ONEPAGE','page-content','CUSTOM','validation','Created\x20Custom\x20Page\x20','includes','createMenu','isArray','page\x20create\x20does\x20not\x20accept\x20--page-type.','220cfdiUU','page-dir','object','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','compress','appCode','Invalid\x20Custom\x20Page\x20pattern:\x20','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','create','10148256OLTnAW','isNaN','370253kSDnUT','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','/smartapi/webcode/page/create','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','parentMenuId','pageName','menuPath','17709nkVEVs','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','stringify','page-pattern','string','apiError','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','str','utf8','keys','.json','write','version','3605562pRNeYh','files','page-type','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','pageId','name','num','178739IWpdpY','430iUwBTR','7XhMdCo','POST','parse','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','trim','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','DASHBOARD','now'];a159_0x278f=function(){return _0x28fd06;};return a159_0x278f();}(function(_0x359af2,_0x44ee0b){const _0x1c192e=a159_0x4c85,_0x2fa630=_0x359af2();while(!![]){try{const _0x535020=-parseInt(_0x1c192e(0x13d))/0x1+-parseInt(_0x1c192e(0x10a))/0x2+parseInt(_0x1c192e(0x144))/0x3*(-parseInt(_0x1c192e(0x131))/0x4)+parseInt(_0x1c192e(0x11e))/0x5*(parseInt(_0x1c192e(0x125))/0x6)+-parseInt(_0x1c192e(0x113))/0x7*(-parseInt(_0x1c192e(0x11d))/0x8)+parseInt(_0x1c192e(0x13b))/0x9+parseInt(_0x1c192e(0x112))/0xa*(parseInt(_0x1c192e(0x111))/0xb);if(_0x535020===_0x44ee0b)break;else _0x2fa630['push'](_0x2fa630['shift']());}catch(_0x591420){_0x2fa630['push'](_0x2fa630['shift']());}}}(a159_0x278f,0xdff3f));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';function a159_0x4c85(_0x119b08,_0x16fb50){_0x119b08=_0x119b08-0x100;const _0x278f2b=a159_0x278f();let _0x4c8528=_0x278f2b[_0x119b08];return _0x4c8528;}import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a159_0x2c30b7(0x127),a159_0x2c30b7(0x128),a159_0x2c30b7(0x119)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');export const pageCreate={'service':'page','command':a159_0x2c30b7(0x13a),'description':a159_0x2c30b7(0x145),'risk':a159_0x2c30b7(0x108),'defaultOutputFormat':a159_0x2c30b7(0x135),'structuredErrors':!![],'rejectedFlags':[{'name':a159_0x2c30b7(0x10c),'message':a159_0x2c30b7(0x130),'hint':a159_0x2c30b7(0x120)},{'name':a159_0x2c30b7(0x129),'message':a159_0x2c30b7(0x118),'hint':a159_0x2c30b7(0x116)}],'flags':[{'name':'name','type':'string','description':a159_0x2c30b7(0x134)},{'name':a159_0x2c30b7(0x122),'type':a159_0x2c30b7(0x11c),'description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':a159_0x2c30b7(0x100),'type':a159_0x2c30b7(0x101),'description':a159_0x2c30b7(0x103),'enum':CUSTOM_PAGE_PATTERNS},{'name':'page-dir','type':a159_0x2c30b7(0x101),'description':a159_0x2c30b7(0x11f)},APPCODE_FLAG],async 'validate'(_0x18c843){await readValidatedPageSource(_0x18c843);},async 'dryRun'(_0x5b846b){const _0x89bbf3=a159_0x2c30b7,_0x258d77=readInput(_0x5b846b,await readValidatedPageSource(_0x5b846b));return{'method':_0x89bbf3(0x114),'url':_0x89bbf3(0x13f),'body':{'appCode':_0x258d77[_0x89bbf3(0x136)],'pageName':_0x258d77[_0x89bbf3(0x142)],..._0x258d77[_0x89bbf3(0x141)]!=null?{'parentMenuId':_0x258d77[_0x89bbf3(0x141)]}:{},'createMenu':_0x258d77[_0x89bbf3(0x12e)],'codeContent':_0x258d77[_0x89bbf3(0x10b)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x89bbf3(0x146)](_0x258d77[_0x89bbf3(0x142)])+'\x20and\x20its\x20menu\x20entry.'};},async 'execute'(_0x5e4b8c){const _0x5b40cb=a159_0x2c30b7,_0x558428=readInput(_0x5e4b8c,await readValidatedPageSource(_0x5e4b8c)),_0x12a4ab=await createCustomPage(_0x558428);if(!Number[_0x5b40cb(0x11b)](_0x12a4ab[_0x5b40cb(0x10e)])||_0x12a4ab['pageId']<=0x0)throw CliErrors[_0x5b40cb(0x102)](_0x5b40cb(0x140));const _0x5b68e7=buildCustomPageDevelopmentUrl(_0x558428[_0x5b40cb(0x136)],_0x12a4ab[_0x5b40cb(0x143)]),_0x288f80=buildCustomPageEditUrl(_0x558428[_0x5b40cb(0x136)],_0x12a4ab['pageId']);return{'ok':!![],'data':{'operation':'page.create','pageType':_0x5b40cb(0x12a),'pagePattern':readPagePattern(_0x5e4b8c),'selector':{'appCode':_0x558428[_0x5b40cb(0x136)],'pageName':_0x558428[_0x5b40cb(0x142)]},'before':null,'after':{'pageId':_0x12a4ab[_0x5b40cb(0x10e)],'pageName':_0x12a4ab[_0x5b40cb(0x142)],'appCode':_0x12a4ab[_0x5b40cb(0x136)],'version':_0x12a4ab[_0x5b40cb(0x109)],'menuId':_0x12a4ab['menuId'],'menuPath':_0x12a4ab[_0x5b40cb(0x143)],'files':_0x12a4ab[_0x5b40cb(0x10b)]??Object['keys'](_0x558428[_0x5b40cb(0x10b)])},'dryRun':![],'request':_0x558428,..._0x5b68e7?{'pageUrl':_0x5b68e7}:{},..._0x288f80?{'editPageUrl':_0x288f80}:{},'warnings':_0x5b68e7?[]:[_0x5b40cb(0x139)]},'message':_0x5b40cb(0x12c)+_0x12a4ab[_0x5b40cb(0x10e)]+'.'};}};function readPagePattern(_0x256060){const _0x1e5220=a159_0x2c30b7,_0x40d4cb=_0x256060[_0x1e5220(0x104)](_0x1e5220(0x100))[_0x1e5220(0x117)](),_0x193556=_0x256060[_0x1e5220(0x104)](_0x1e5220(0x132))[_0x1e5220(0x117)]();if(_0x40d4cb&&_0x193556)throw CliErrors['validation'](_0x1e5220(0x138));if(_0x193556)return null;if(!_0x40d4cb)throw CliErrors['validation']('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x1e5220(0x12d)](_0x40d4cb))throw CliErrors['validation'](_0x1e5220(0x121));return _0x40d4cb;}async function readPageSource(_0x203786){const _0x154290=a159_0x2c30b7,_0x123e3d=_0x203786[_0x154290(0x104)](_0x154290(0x132))[_0x154290(0x117)](),_0x5944d4=readPagePattern(_0x203786);if(_0x5944d4===null){const _0x1267dd=await readCustomPageDirectory(_0x123e3d);if(Object[_0x154290(0x106)](_0x1267dd)[_0x154290(0x123)]===0x0)throw CliErrors[_0x154290(0x12b)](_0x154290(0x10d));return _0x1267dd;}let _0x28a4e3;try{_0x28a4e3=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x5944d4[_0x154290(0x124)]()+_0x154290(0x107)),_0x154290(0x105));}catch{throw CliErrors['validation']('Custom\x20Page\x20pattern\x20not\x20found:\x20'+_0x5944d4+'.');}let _0x1f5a66;try{_0x1f5a66=JSON[_0x154290(0x115)](_0x28a4e3);}catch{throw CliErrors[_0x154290(0x12b)](_0x154290(0x137)+_0x5944d4+'.');}if(!_0x1f5a66||typeof _0x1f5a66!==_0x154290(0x133)||Array[_0x154290(0x12f)](_0x1f5a66)||Object['values'](_0x1f5a66)['some'](_0x10c8aa=>typeof _0x10c8aa!==_0x154290(0x101)))throw CliErrors[_0x154290(0x12b)](_0x154290(0x137)+_0x5944d4+'.');return _0x1f5a66;}async function readValidatedPageSource(_0x216967){const _0x40c50f=await readPageSource(_0x216967);return await validateCustomPageContent(_0x40c50f),_0x40c50f;}function readInput(_0x360a82,_0x4cdd92){const _0x38aa9a=a159_0x2c30b7,_0x349285=_0x360a82[_0x38aa9a(0x104)](_0x38aa9a(0x10f))['trim']()||'Custom_page_'+Date[_0x38aa9a(0x11a)]();if(_0x349285[_0x38aa9a(0x123)]>0x64)throw CliErrors[_0x38aa9a(0x12b)](_0x38aa9a(0x126));const _0x49842f=_0x360a82[_0x38aa9a(0x110)](_0x38aa9a(0x122),NaN),_0x143d97=!Number[_0x38aa9a(0x13c)](_0x49842f);if(_0x143d97&&(!Number['isInteger'](_0x49842f)||_0x49842f<=0x0))throw CliErrors['validation'](_0x38aa9a(0x13e));return{'appCode':_0x360a82['appCode'],'pageName':_0x349285,..._0x143d97?{'parentMenuId':_0x49842f}:{},'createMenu':!![],'files':_0x4cdd92};}
1
+ const a159_0x3fe597=a159_0x9571;function a159_0x9571(_0x33442f,_0x2d0839){_0x33442f=_0x33442f-0x1d6;const _0x17d522=a159_0x17d5();let _0x957136=_0x17d522[_0x33442f];return _0x957136;}(function(_0x2508b3,_0x325705){const _0x4720d2=a159_0x9571,_0x44f2d1=_0x2508b3();while(!![]){try{const _0x30abcf=parseInt(_0x4720d2(0x209))/0x1*(parseInt(_0x4720d2(0x1ea))/0x2)+-parseInt(_0x4720d2(0x210))/0x3*(parseInt(_0x4720d2(0x20f))/0x4)+-parseInt(_0x4720d2(0x1d9))/0x5+-parseInt(_0x4720d2(0x202))/0x6*(parseInt(_0x4720d2(0x1dd))/0x7)+-parseInt(_0x4720d2(0x215))/0x8*(parseInt(_0x4720d2(0x1ef))/0x9)+parseInt(_0x4720d2(0x1dc))/0xa*(-parseInt(_0x4720d2(0x212))/0xb)+-parseInt(_0x4720d2(0x1db))/0xc*(-parseInt(_0x4720d2(0x200))/0xd);if(_0x30abcf===_0x325705)break;else _0x44f2d1['push'](_0x44f2d1['shift']());}catch(_0x589ddd){_0x44f2d1['push'](_0x44f2d1['shift']());}}}(a159_0x17d5,0x1c379));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';function a159_0x17d5(){const _0x41dce7=['/smartapi/webcode/page/create','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','286twvNZa','parse','30LKGYlN','page\x20create\x20does\x20not\x20accept\x20--page-type.','stringify','page-pattern','pageName','keys','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','20zSvTAU','includes','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','pageId','\x20and\x20its\x20menu\x20entry.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','105816ivVqep','12mJAyTU','Custom_page_','2067439yyIdtu','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','object','1581176UtRoIy','menuPath','appCode','.json','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','validation','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','isNaN','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','361845qIYlId','page-type','258828kEZkwj','10ReXHfy','11284ZUohfJ','some','length','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','string','Would\x20create\x20Custom\x20Page\x20','page-dir','Invalid\x20Custom\x20Page\x20pattern:\x20','apiError','now','DASHBOARD','files','str','21290KecQKD','Created\x20Custom\x20Page\x20','isArray','version','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','9WKKBuk','parentMenuId','../../../templates/custom-pages','trim','page.create','page-content','isInteger','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','utf8','page','BLANK','parent-menu-id','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','values','create'];a159_0x17d5=function(){return _0x41dce7;};return a159_0x17d5();}import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a159_0x3fe597(0x1f9),'ONEPAGE',a159_0x3fe597(0x1e7)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a159_0x3fe597(0x1f1));export const pageCreate={'service':a159_0x3fe597(0x1f8),'command':a159_0x3fe597(0x1fd),'description':a159_0x3fe597(0x1f6),'risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a159_0x3fe597(0x1da),'message':a159_0x3fe597(0x203),'hint':a159_0x3fe597(0x1d6)},{'name':a159_0x3fe597(0x1f4),'message':a159_0x3fe597(0x1d8),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'name','type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x1fb)},{'name':a159_0x3fe597(0x1fa),'type':'number','description':a159_0x3fe597(0x1e0)},{'name':'page-pattern','type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x1ff),'enum':CUSTOM_PAGE_PATTERNS},{'name':a159_0x3fe597(0x1e3),'type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x20e)},APPCODE_FLAG],async 'validate'(_0x3f7b92){await readValidatedPageSource(_0x3f7b92);},async 'dryRun'(_0x551df5){const _0x5ce1e2=a159_0x3fe597,_0x5d86d7=readInput(_0x551df5,await readValidatedPageSource(_0x551df5));return{'method':'POST','url':_0x5ce1e2(0x1fe),'body':{'appCode':_0x5d86d7['appCode'],'pageName':_0x5d86d7[_0x5ce1e2(0x206)],..._0x5d86d7['parentMenuId']!=null?{'parentMenuId':_0x5d86d7[_0x5ce1e2(0x1f0)]}:{},'createMenu':_0x5d86d7['createMenu'],'codeContent':_0x5d86d7[_0x5ce1e2(0x1e8)]},'description':_0x5ce1e2(0x1e2)+JSON[_0x5ce1e2(0x204)](_0x5d86d7['pageName'])+_0x5ce1e2(0x20d)};},async 'execute'(_0x1fa884){const _0x1a4a71=a159_0x3fe597,_0x49747e=readInput(_0x1fa884,await readValidatedPageSource(_0x1fa884)),_0x8dd575=await createCustomPage(_0x49747e);if(!Number[_0x1a4a71(0x1f5)](_0x8dd575[_0x1a4a71(0x20c)])||_0x8dd575[_0x1a4a71(0x20c)]<=0x0)throw CliErrors[_0x1a4a71(0x1e5)](_0x1a4a71(0x20b));const _0x5c009e=buildCustomPageDevelopmentUrl(_0x49747e[_0x1a4a71(0x217)],_0x8dd575[_0x1a4a71(0x216)]),_0x5b83ba=buildCustomPageEditUrl(_0x49747e[_0x1a4a71(0x217)],_0x8dd575['pageId']);return{'ok':!![],'data':{'operation':_0x1a4a71(0x1f3),'pageType':'CUSTOM','pagePattern':readPagePattern(_0x1fa884),'selector':{'appCode':_0x49747e[_0x1a4a71(0x217)],'pageName':_0x49747e[_0x1a4a71(0x206)]},'before':null,'after':{'pageId':_0x8dd575['pageId'],'pageName':_0x8dd575[_0x1a4a71(0x206)],'appCode':_0x8dd575[_0x1a4a71(0x217)],'version':_0x8dd575[_0x1a4a71(0x1ed)],'menuId':_0x8dd575['menuId'],'menuPath':_0x8dd575[_0x1a4a71(0x216)],'files':_0x8dd575[_0x1a4a71(0x1e8)]??Object[_0x1a4a71(0x207)](_0x49747e[_0x1a4a71(0x1e8)])},'dryRun':![],'request':_0x49747e,..._0x5c009e?{'pageUrl':_0x5c009e}:{},..._0x5b83ba?{'editPageUrl':_0x5b83ba}:{},'warnings':_0x5c009e?[]:[_0x1a4a71(0x213)]},'message':_0x1a4a71(0x1eb)+_0x8dd575['pageId']+'.'};}};function readPagePattern(_0x2c38f8){const _0x514b3c=a159_0x3fe597,_0x8300a5=_0x2c38f8[_0x514b3c(0x1e9)](_0x514b3c(0x205))[_0x514b3c(0x1f2)](),_0x3440ad=_0x2c38f8[_0x514b3c(0x1e9)]('page-dir')['trim']();if(_0x8300a5&&_0x3440ad)throw CliErrors[_0x514b3c(0x21a)](_0x514b3c(0x1ee));if(_0x3440ad)return null;if(!_0x8300a5)throw CliErrors[_0x514b3c(0x21a)]('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x514b3c(0x20a)](_0x8300a5))throw CliErrors[_0x514b3c(0x21a)](_0x514b3c(0x219));return _0x8300a5;}async function readPageSource(_0x51f76d){const _0x4019cc=a159_0x3fe597,_0xac43d4=_0x51f76d[_0x4019cc(0x1e9)]('page-dir')['trim'](),_0x2a99f5=readPagePattern(_0x51f76d);if(_0x2a99f5===null){const _0x583c9d=await readCustomPageDirectory(_0xac43d4);if(Object['keys'](_0x583c9d)[_0x4019cc(0x1df)]===0x0)throw CliErrors[_0x4019cc(0x21a)](_0x4019cc(0x208));return _0x583c9d;}let _0x4cae47;try{_0x4cae47=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x2a99f5['toLowerCase']()+_0x4019cc(0x218)),_0x4019cc(0x1f7));}catch{throw CliErrors[_0x4019cc(0x21a)]('Custom\x20Page\x20pattern\x20not\x20found:\x20'+_0x2a99f5+'.');}let _0x1b5592;try{_0x1b5592=JSON[_0x4019cc(0x201)](_0x4cae47);}catch{throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x2a99f5+'.');}if(!_0x1b5592||typeof _0x1b5592!==_0x4019cc(0x214)||Array[_0x4019cc(0x1ec)](_0x1b5592)||Object[_0x4019cc(0x1fc)](_0x1b5592)[_0x4019cc(0x1de)](_0x46a6f7=>typeof _0x46a6f7!==_0x4019cc(0x1e1)))throw CliErrors[_0x4019cc(0x21a)](_0x4019cc(0x1e4)+_0x2a99f5+'.');return _0x1b5592;}async function readValidatedPageSource(_0x2230a0){const _0x2ee6e6=await readPageSource(_0x2230a0);return await validateCustomPageContent(_0x2ee6e6),_0x2ee6e6;}function readInput(_0x5bb56f,_0x932e52){const _0x5e6ff0=a159_0x3fe597,_0x52b95e=_0x5bb56f[_0x5e6ff0(0x1e9)]('name')[_0x5e6ff0(0x1f2)]()||_0x5e6ff0(0x211)+Date[_0x5e6ff0(0x1e6)]();if(_0x52b95e[_0x5e6ff0(0x1df)]>0x64)throw CliErrors[_0x5e6ff0(0x21a)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x300358=_0x5bb56f['num']('parent-menu-id',NaN),_0x2c4105=!Number[_0x5e6ff0(0x1d7)](_0x300358);if(_0x2c4105&&(!Number[_0x5e6ff0(0x1f5)](_0x300358)||_0x300358<=0x0))throw CliErrors[_0x5e6ff0(0x21a)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x5bb56f[_0x5e6ff0(0x217)],'pageName':_0x52b95e,..._0x2c4105?{'parentMenuId':_0x300358}:{},'createMenu':!![],'files':_0x932e52};}
@@ -1 +1 @@
1
- const a160_0x3e665f=a160_0x5626;(function(_0x4cdf68,_0x15aac9){const _0x10bd99=a160_0x5626,_0x15878f=_0x4cdf68();while(!![]){try{const _0x44f44e=-parseInt(_0x10bd99(0xa8))/0x1*(parseInt(_0x10bd99(0xb8))/0x2)+-parseInt(_0x10bd99(0xbb))/0x3*(-parseInt(_0x10bd99(0xbc))/0x4)+parseInt(_0x10bd99(0xab))/0x5*(parseInt(_0x10bd99(0xc3))/0x6)+parseInt(_0x10bd99(0xc1))/0x7*(-parseInt(_0x10bd99(0xb1))/0x8)+parseInt(_0x10bd99(0xbf))/0x9*(parseInt(_0x10bd99(0xb7))/0xa)+parseInt(_0x10bd99(0xa3))/0xb+-parseInt(_0x10bd99(0xaf))/0xc*(parseInt(_0x10bd99(0xa9))/0xd);if(_0x44f44e===_0x15aac9)break;else _0x15878f['push'](_0x15878f['shift']());}catch(_0x11b57a){_0x15878f['push'](_0x15878f['shift']());}}}(a160_0x2c89,0xce542));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';function a160_0x5626(_0x20a4de,_0x7804e2){_0x20a4de=_0x20a4de-0xa2;const _0x2c89ab=a160_0x2c89();let _0x56268f=_0x2c89ab[_0x20a4de];return _0x56268f;}export const pageCustomDetail={'service':a160_0x3e665f(0xb5),'command':a160_0x3e665f(0xb2),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':'read','defaultOutputFormat':a160_0x3e665f(0xa7),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a160_0x3e665f(0xb3),'required':!![],'description':a160_0x3e665f(0xa4)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0xad9461){readCustomPageId(_0xad9461);},async 'execute'(_0x31044e){const _0x35bc67=a160_0x3e665f,_0xd95a07=readCustomPageId(_0x31044e),_0x1e779b=await getCustomPageSource(_0xd95a07),{bundle:_0x3fce48,createTime:_0x3e060e,updateTime:_0x4bf86c,..._0x25591b}=_0x1e779b,_0x19b66d=_0x1e779b['id']??_0xd95a07,_0x1edbdc=_0x1e779b[_0x35bc67(0xba)]?.['trim']()||_0x31044e[_0x35bc67(0xb6)](_0x35bc67(0xb4))[_0x35bc67(0xad)](),_0x49bcd6=buildCustomPageRuntimeUrl(_0x1edbdc,_0x1e779b[_0x35bc67(0xbe)]),_0x306457=buildCustomPageEditUrl(_0x1edbdc,_0x19b66d),_0xf04122=await resolveCustomPageDevelopmentUrl(_0x1edbdc,_0x19b66d,_0x31044e[_0x35bc67(0xc0)]);return{'ok':!![],'data':{..._0x25591b,..._0x49bcd6?{'runtimePageUrl':_0x49bcd6}:{},..._0xf04122?{'pageUrl':_0xf04122}:{},..._0x306457?{'editPageUrl':_0x306457}:{},..._0x3e060e==null?{}:{'createTime':formatTime(_0x3e060e)},..._0x4bf86c==null?{}:{'updateTime':formatTime(_0x4bf86c)}},'message':_0x35bc67(0xa6)+_0xd95a07+'.'};}};function formatTime(_0x5d9173){const _0xd3a810=a160_0x3e665f,_0x8b6979=new Date(_0x5d9173);if(Number[_0xd3a810(0xa5)](_0x8b6979[_0xd3a810(0xae)]()))return String(_0x5d9173);const _0x13295d=[_0x8b6979['getFullYear'](),String(_0x8b6979[_0xd3a810(0xac)]()+0x1)[_0xd3a810(0xb0)](0x2,'0'),String(_0x8b6979[_0xd3a810(0xaa)]())[_0xd3a810(0xb0)](0x2,'0')][_0xd3a810(0xc2)]('-'),_0x14e90f=[String(_0x8b6979[_0xd3a810(0xbd)]())['padStart'](0x2,'0'),String(_0x8b6979[_0xd3a810(0xa2)]())[_0xd3a810(0xb0)](0x2,'0'),String(_0x8b6979[_0xd3a810(0xb9)]())[_0xd3a810(0xb0)](0x2,'0')][_0xd3a810(0xc2)](':');return _0x13295d+'\x20'+_0x14e90f;}function a160_0x2c89(){const _0x1cc1e7=['number','appcode','page','str','211910PDCLnt','243944yzvCfj','getSeconds','appCode','36gvGxjX','198236lrXslX','getHours','pageCode','603Tczlqa','cookie','14xYaPIR','join','59532pRCQVC','getMinutes','18198972ywDcpV','Custom\x20Page\x20ID','isNaN','Retrieved\x20Custom\x20Page\x20','compress','1WoTTCp','400647OcrRcn','getDate','465GnQfBn','getMonth','trim','getTime','1308DrpGZL','padStart','1061352CGMABw','custom-detail'];a160_0x2c89=function(){return _0x1cc1e7;};return a160_0x2c89();}
1
+ const a160_0x37fa01=a160_0x151e;(function(_0x1630b3,_0x3387ce){const _0x28b8c6=a160_0x151e,_0x4df038=_0x1630b3();while(!![]){try{const _0x2b718c=-parseInt(_0x28b8c6(0xb9))/0x1+-parseInt(_0x28b8c6(0xa8))/0x2*(-parseInt(_0x28b8c6(0xab))/0x3)+-parseInt(_0x28b8c6(0xae))/0x4+parseInt(_0x28b8c6(0xaa))/0x5*(-parseInt(_0x28b8c6(0xb4))/0x6)+-parseInt(_0x28b8c6(0xad))/0x7*(parseInt(_0x28b8c6(0xb5))/0x8)+-parseInt(_0x28b8c6(0xb6))/0x9+parseInt(_0x28b8c6(0xb0))/0xa;if(_0x2b718c===_0x3387ce)break;else _0x4df038['push'](_0x4df038['shift']());}catch(_0x2d24b7){_0x4df038['push'](_0x4df038['shift']());}}}(a160_0x6773,0xe2221));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a160_0x37fa01(0xbe),'command':a160_0x37fa01(0xbc),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':'read','defaultOutputFormat':a160_0x37fa01(0xbb),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a160_0x37fa01(0xa6),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x13fc05){readCustomPageId(_0x13fc05);},async 'execute'(_0x14fcc4){const _0x10e205=a160_0x37fa01,_0x53bd25=readCustomPageId(_0x14fcc4),_0x1e4f00=await getCustomPageSource(_0x53bd25),{bundle:_0x392725,createTime:_0x45de4f,updateTime:_0x506361,..._0x3ecdc2}=_0x1e4f00,_0x380991=_0x1e4f00['id']??_0x53bd25,_0x16b045=_0x1e4f00['appCode']?.[_0x10e205(0xa7)]()||_0x14fcc4[_0x10e205(0xa5)](_0x10e205(0xb1))['trim'](),_0x3ebc46=buildCustomPageRuntimeUrl(_0x16b045,_0x1e4f00[_0x10e205(0xb8)]),_0x110efe=buildCustomPageEditUrl(_0x16b045,_0x380991),_0x469db2=await resolveCustomPageDevelopmentUrl(_0x16b045,_0x380991,_0x14fcc4['cookie']);return{'ok':!![],'data':{..._0x3ecdc2,..._0x3ebc46?{'runtimePageUrl':_0x3ebc46}:{},..._0x469db2?{'pageUrl':_0x469db2}:{},..._0x110efe?{'editPageUrl':_0x110efe}:{},..._0x45de4f==null?{}:{'createTime':formatTime(_0x45de4f)},..._0x506361==null?{}:{'updateTime':formatTime(_0x506361)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x53bd25+'.'};}};function a160_0x151e(_0x496ce2,_0x5b6edc){_0x496ce2=_0x496ce2-0xa4;const _0x67735e=a160_0x6773();let _0x151e8d=_0x67735e[_0x496ce2];return _0x151e8d;}function formatTime(_0xa7d899){const _0x46b2bc=a160_0x37fa01,_0x565103=new Date(_0xa7d899);if(Number[_0x46b2bc(0xa4)](_0x565103[_0x46b2bc(0xac)]()))return String(_0xa7d899);const _0x18c8eb=[_0x565103['getFullYear'](),String(_0x565103[_0x46b2bc(0xaf)]()+0x1)[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xbd)]())['padStart'](0x2,'0')][_0x46b2bc(0xba)]('-'),_0x5b37cd=[String(_0x565103[_0x46b2bc(0xb7)]())[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xb2)]())[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xb3)]())['padStart'](0x2,'0')]['join'](':');return _0x18c8eb+'\x20'+_0x5b37cd;}function a160_0x6773(){const _0x362320=['1718KaJqPv','padStart','14765KaZYXx','6189ULxxZq','getTime','7VdeObD','7091476JATmXg','getMonth','50745600NDzGkG','appcode','getMinutes','getSeconds','2958ozCmtV','11049544chnwOH','5669442IfRgtg','getHours','pageCode','680607WeKHei','join','compress','custom-detail','getDate','page','isNaN','str','number','trim'];a160_0x6773=function(){return _0x362320;};return a160_0x6773();}
@@ -1 +1 @@
1
- const a161_0x1cf8a1=a161_0x267a;(function(_0x2ebf64,_0x3371ee){const _0x52c893=a161_0x267a,_0x129c21=_0x2ebf64();while(!![]){try{const _0x13936f=-parseInt(_0x52c893(0xd2))/0x1*(parseInt(_0x52c893(0xd6))/0x2)+parseInt(_0x52c893(0xdf))/0x3+parseInt(_0x52c893(0xe0))/0x4*(parseInt(_0x52c893(0xd0))/0x5)+parseInt(_0x52c893(0xd3))/0x6*(parseInt(_0x52c893(0xd9))/0x7)+parseInt(_0x52c893(0xe6))/0x8+-parseInt(_0x52c893(0xe1))/0x9+parseInt(_0x52c893(0xcf))/0xa*(-parseInt(_0x52c893(0xde))/0xb);if(_0x13936f===_0x3371ee)break;else _0x129c21['push'](_0x129c21['shift']());}catch(_0x345bbf){_0x129c21['push'](_0x129c21['shift']());}}}(a161_0x31be,0x69229));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a161_0x267a(_0xdd70e4,_0x5b4f6b){_0xdd70e4=_0xdd70e4-0xcf;const _0x31bea9=a161_0x31be();let _0x267abd=_0x31bea9[_0xdd70e4];return _0x267abd;}function a161_0x31be(){const _0x3afa3b=['593830WsUVnL','length','1bSBXMy','6tyJZdO','compress','flatMap','133324KMqtiP','Found\x20','pageId','146874uVmNxF','\x20Custom\x20Page(s).','page','react','menus','19701gXAjwD','1000602zpPFzU','12SzWFih','93861dkcpNx','No\x20Custom\x20Pages\x20found.','label','custom-list','cookie','2773976FBZgTK','appCode','3070QZhnyi'];a161_0x31be=function(){return _0x3afa3b;};return a161_0x31be();}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a161_0x1cf8a1(0xdb),'command':a161_0x1cf8a1(0xe4),'description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':'read','defaultOutputFormat':a161_0x1cf8a1(0xd4),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2f2c7a){const _0x37efc6=a161_0x1cf8a1,_0x1321bb=(await fetchMenuSnapshot(_0x2f2c7a[_0x37efc6(0xe7)],_0x2f2c7a[_0x37efc6(0xe5)]))[_0x37efc6(0xdd)][_0x37efc6(0xd5)](_0x1eba8b=>{const _0x1f51a2=_0x37efc6;if(_0x1eba8b['type']!==_0x1f51a2(0xdc)||_0x1eba8b[_0x1f51a2(0xd8)]==null)return[];const _0x11ad86=buildCustomPageDevelopmentUrl(_0x2f2c7a['appCode'],_0x1eba8b['path']),_0x522446=buildCustomPageEditUrl(_0x2f2c7a[_0x1f51a2(0xe7)],_0x1eba8b[_0x1f51a2(0xd8)]);return[{'pageId':_0x1eba8b[_0x1f51a2(0xd8)],'label':_0x1eba8b[_0x1f51a2(0xe3)],..._0x11ad86?{'pageUrl':_0x11ad86}:{},..._0x522446?{'editPageUrl':_0x522446}:{}}];});return{'ok':!![],'data':{'pages':_0x1321bb},'message':_0x1321bb['length']===0x0?_0x37efc6(0xe2):_0x37efc6(0xd7)+_0x1321bb[_0x37efc6(0xd1)]+_0x37efc6(0xda)};}};
1
+ const a161_0x51c3d4=a161_0x3a39;function a161_0x264a(){const _0x3f4e20=['type','314807cCpoMU','Found\x20','502747NApZZE','label','121726dKZVhL','menus','read','compress','pageId','appCode','custom-list','\x20Custom\x20Page(s).','2zkrtXK','70ypylXx','19140TGlbkS','flatMap','No\x20Custom\x20Pages\x20found.','555Ggsxwn','376dshENZ','path','105330nMJvQY','length','page','89937UaoKqh','1706145QfpuxG'];a161_0x264a=function(){return _0x3f4e20;};return a161_0x264a();}(function(_0x3dc4a0,_0x2c29eb){const _0x19227b=a161_0x3a39,_0x1e8e4c=_0x3dc4a0();while(!![]){try{const _0x57aef0=parseInt(_0x19227b(0x186))/0x1*(-parseInt(_0x19227b(0x192))/0x2)+parseInt(_0x19227b(0x184))/0x3+parseInt(_0x19227b(0x17a))/0x4*(parseInt(_0x19227b(0x17d))/0x5)+parseInt(_0x19227b(0x180))/0x6+parseInt(_0x19227b(0x188))/0x7+-parseInt(_0x19227b(0x17e))/0x8*(parseInt(_0x19227b(0x183))/0x9)+parseInt(_0x19227b(0x193))/0xa*(-parseInt(_0x19227b(0x18a))/0xb);if(_0x57aef0===_0x2c29eb)break;else _0x1e8e4c['push'](_0x1e8e4c['shift']());}catch(_0x408bd5){_0x1e8e4c['push'](_0x1e8e4c['shift']());}}}(a161_0x264a,0x4fe76));function a161_0x3a39(_0xefc548,_0x6ba524){_0xefc548=_0xefc548-0x17a;const _0x264a83=a161_0x264a();let _0x3a3988=_0x264a83[_0xefc548];return _0x3a3988;}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a161_0x51c3d4(0x182),'command':a161_0x51c3d4(0x190),'description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':a161_0x51c3d4(0x18c),'defaultOutputFormat':a161_0x51c3d4(0x18d),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1a70c5){const _0x185465=a161_0x51c3d4,_0x115b3d=(await fetchMenuSnapshot(_0x1a70c5['appCode'],_0x1a70c5['cookie']))[_0x185465(0x18b)][_0x185465(0x17b)](_0x16f81a=>{const _0x57757c=_0x185465;if(_0x16f81a[_0x57757c(0x185)]!=='react'||_0x16f81a[_0x57757c(0x18e)]==null)return[];const _0x57a80a=buildCustomPageDevelopmentUrl(_0x1a70c5[_0x57757c(0x18f)],_0x16f81a[_0x57757c(0x17f)]),_0x2b6b6a=buildCustomPageEditUrl(_0x1a70c5[_0x57757c(0x18f)],_0x16f81a['pageId']);return[{'pageId':_0x16f81a['pageId'],'label':_0x16f81a[_0x57757c(0x189)],..._0x57a80a?{'pageUrl':_0x57a80a}:{},..._0x2b6b6a?{'editPageUrl':_0x2b6b6a}:{}}];});return{'ok':!![],'data':{'pages':_0x115b3d},'message':_0x115b3d['length']===0x0?_0x185465(0x17c):_0x185465(0x187)+_0x115b3d[_0x185465(0x181)]+_0x185465(0x191)};}};
@@ -1 +1 @@
1
- const a162_0x3f4533=a162_0x1ec3;(function(_0x2354b0,_0x58b6d5){const _0x521fcb=a162_0x1ec3,_0x45c96e=_0x2354b0();while(!![]){try{const _0x37a821=-parseInt(_0x521fcb(0x7a))/0x1*(parseInt(_0x521fcb(0x83))/0x2)+-parseInt(_0x521fcb(0x76))/0x3*(parseInt(_0x521fcb(0x8e))/0x4)+-parseInt(_0x521fcb(0x79))/0x5+parseInt(_0x521fcb(0x82))/0x6*(-parseInt(_0x521fcb(0x9a))/0x7)+-parseInt(_0x521fcb(0x94))/0x8+parseInt(_0x521fcb(0x84))/0x9+parseInt(_0x521fcb(0x88))/0xa*(parseInt(_0x521fcb(0x95))/0xb);if(_0x37a821===_0x58b6d5)break;else _0x45c96e['push'](_0x45c96e['shift']());}catch(_0x4394ad){_0x45c96e['push'](_0x45c96e['shift']());}}}(a162_0x53d1,0x8a7fb));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a162_0x3f4533(0x93),'command':'custom-publish','description':a162_0x3f4533(0x87),'risk':'write','defaultOutputFormat':a162_0x3f4533(0x7c),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a162_0x3f4533(0x89),'required':!![],'description':a162_0x3f4533(0x78)},{'name':a162_0x3f4533(0x7d),'type':'string','description':a162_0x3f4533(0x8b)}],async 'validate'(_0x2427d2){readCustomPageId(_0x2427d2);},async 'dryRun'(_0x31d5c1){const _0x2a13d4=a162_0x3f4533,_0x1378f9=readInput(_0x31d5c1);return{'method':_0x2a13d4(0x7f),'url':_0x2a13d4(0x7b),'body':{'id':_0x1378f9[_0x2a13d4(0x97)],..._0x1378f9[_0x2a13d4(0x7d)]?{'remark':_0x1378f9[_0x2a13d4(0x7d)]}:{}},'description':_0x2a13d4(0x8a)+_0x1378f9[_0x2a13d4(0x97)]+'.'};},async 'execute'(_0x75e3e3){const _0x28eff4=a162_0x3f4533,_0x3a6113=readInput(_0x75e3e3);await getCustomPageSource(_0x3a6113['pageId']);const _0x5a0a2d=await publishCustomPage(_0x3a6113);if(!Number[_0x28eff4(0x81)](_0x5a0a2d)||_0x5a0a2d!==_0x3a6113['pageId'])throw CliErrors['apiError']('Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.');const _0x1bf19c=await getCustomPageSource(_0x3a6113[_0x28eff4(0x97)]);if(_0x1bf19c[_0x28eff4(0x99)]!==_0x28eff4(0x96))throw CliErrors[_0x28eff4(0x8f)](_0x28eff4(0x92)+(_0x1bf19c[_0x28eff4(0x99)]??_0x28eff4(0x90))+'.');const _0x1cd955=_0x1bf19c[_0x28eff4(0x8c)]?.[_0x28eff4(0x91)](),_0x3c5c68=buildCustomPageEditUrl(_0x1cd955,_0x3a6113[_0x28eff4(0x97)]),_0x384ed8=await resolveCustomPageDevelopmentUrl(_0x1cd955,_0x3a6113[_0x28eff4(0x97)],_0x75e3e3['cookie']),_0x5b6c95=buildMutationData(_0x3a6113,!![],_0x384ed8,_0x3c5c68);_0x1cd955&&!_0x384ed8&&_0x5b6c95[_0x28eff4(0x77)]['push'](_0x28eff4(0x98));const _0x50bbb1=buildCustomPageRuntimeUrl(_0x1bf19c[_0x28eff4(0x8c)],_0x1bf19c[_0x28eff4(0x80)]);return _0x50bbb1?_0x5b6c95[_0x28eff4(0x8d)]=_0x50bbb1:_0x5b6c95[_0x28eff4(0x77)][_0x28eff4(0x85)](_0x28eff4(0x86)),{'ok':!![],'data':_0x5b6c95,'message':'Published\x20Custom\x20Page\x20'+_0x3a6113[_0x28eff4(0x97)]+'.'};}};function a162_0x53d1(){const _0x3f7880=['warnings','Custom\x20Page\x20ID','689850mITjqG','1ylTuEP','/smartapi/webcode/file/publish','compress','remark','page.custom-publish','POST','pageCode','isInteger','39954TCWQCA','1631316fgAZMt','1235952izOGAt','push','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','20PozxcU','number','Would\x20publish\x20Custom\x20Page\x20','Optional\x20publish\x20remark','appCode','runtimePageUrl','8QtQxWV','apiError','unknown','trim','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','page','2594640KjsMFD','15562151EcNgrO','FORMAL','pageId','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','status','343THoOMU','1192905CGveZv'];a162_0x53d1=function(){return _0x3f7880;};return a162_0x53d1();}function readInput(_0x42467d){const _0x53f68a=a162_0x3f4533,_0x20936c=readCustomPageId(_0x42467d),_0x3d27d6=_0x42467d['str'](_0x53f68a(0x7d))[_0x53f68a(0x91)]();return{'pageId':_0x20936c,..._0x3d27d6?{'remark':_0x3d27d6}:{}};}function a162_0x1ec3(_0x523d9d,_0x2ec54c){_0x523d9d=_0x523d9d-0x76;const _0x53d199=a162_0x53d1();let _0x1ec3fd=_0x53d199[_0x523d9d];return _0x1ec3fd;}function buildMutationData(_0xdaaa58,_0x2a7e2d=![],_0x573dfe,_0x2446da){const _0x3bb6c4=a162_0x3f4533;return{'operation':_0x3bb6c4(0x7e),'selector':{'pageId':_0xdaaa58['pageId']},'before':null,'after':{'pageId':_0xdaaa58[_0x3bb6c4(0x97)],'status':_0x3bb6c4(0x96)},'dryRun':!_0x2a7e2d,'request':_0xdaaa58,..._0x573dfe?{'pageUrl':_0x573dfe}:{},..._0x2446da?{'editPageUrl':_0x2446da}:{},'warnings':[]};}
1
+ function a162_0x2a92(_0x740c85,_0x52b8df){_0x740c85=_0x740c85-0x189;const _0x5973e5=a162_0x5973();let _0x2a9235=_0x5973e5[_0x740c85];return _0x2a9235;}const a162_0x108a1a=a162_0x2a92;(function(_0x4ebab9,_0x221de4){const _0x2e82df=a162_0x2a92,_0x250c45=_0x4ebab9();while(!![]){try{const _0x38e8a4=parseInt(_0x2e82df(0x198))/0x1+parseInt(_0x2e82df(0x197))/0x2*(-parseInt(_0x2e82df(0x19d))/0x3)+parseInt(_0x2e82df(0x19f))/0x4+-parseInt(_0x2e82df(0x1a5))/0x5*(parseInt(_0x2e82df(0x1ae))/0x6)+-parseInt(_0x2e82df(0x1b0))/0x7*(-parseInt(_0x2e82df(0x1a8))/0x8)+-parseInt(_0x2e82df(0x1a1))/0x9+-parseInt(_0x2e82df(0x19b))/0xa*(-parseInt(_0x2e82df(0x1ab))/0xb);if(_0x38e8a4===_0x221de4)break;else _0x250c45['push'](_0x250c45['shift']());}catch(_0x50d744){_0x250c45['push'](_0x250c45['shift']());}}}(a162_0x5973,0x59a25));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a162_0x5973(){const _0x16122f=['1130974TnxRBe','215290QpTvnx','Published\x20Custom\x20Page\x20','custom-publish','11350tQPgti','cookie','3lYcWfq','isInteger','1577960SIULPF','pageCode','1850706noQeMX','warnings','FORMAL','apiError','1360tbQRRa','appCode','Would\x20publish\x20Custom\x20Page\x20','8wyTGgG','Custom\x20Page\x20ID','compress','6127vxLqfi','number','page','3858rBJGqN','POST','498281mLcNDV','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','page.custom-publish','remark','string','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','unknown','pageId','status','Optional\x20publish\x20remark','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','push','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','runtimePageUrl','trim'];a162_0x5973=function(){return _0x16122f;};return a162_0x5973();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a162_0x108a1a(0x1ad),'command':a162_0x108a1a(0x19a),'description':a162_0x108a1a(0x194),'risk':'write','defaultOutputFormat':a162_0x108a1a(0x1aa),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a162_0x108a1a(0x1ac),'required':!![],'description':a162_0x108a1a(0x1a9)},{'name':a162_0x108a1a(0x18b),'type':a162_0x108a1a(0x18c),'description':a162_0x108a1a(0x191)}],async 'validate'(_0x1e6a6a){readCustomPageId(_0x1e6a6a);},async 'dryRun'(_0x202563){const _0x3c4b47=a162_0x108a1a,_0x466a31=readInput(_0x202563);return{'method':_0x3c4b47(0x1af),'url':'/smartapi/webcode/file/publish','body':{'id':_0x466a31[_0x3c4b47(0x18f)],..._0x466a31['remark']?{'remark':_0x466a31[_0x3c4b47(0x18b)]}:{}},'description':_0x3c4b47(0x1a7)+_0x466a31[_0x3c4b47(0x18f)]+'.'};},async 'execute'(_0x2b6b1c){const _0x1e5f00=a162_0x108a1a,_0x5af304=readInput(_0x2b6b1c);await getCustomPageSource(_0x5af304['pageId']);const _0xc745bd=await publishCustomPage(_0x5af304);if(!Number[_0x1e5f00(0x19e)](_0xc745bd)||_0xc745bd!==_0x5af304['pageId'])throw CliErrors[_0x1e5f00(0x1a4)](_0x1e5f00(0x189));const _0x32de56=await getCustomPageSource(_0x5af304[_0x1e5f00(0x18f)]);if(_0x32de56[_0x1e5f00(0x190)]!=='FORMAL')throw CliErrors[_0x1e5f00(0x1a4)](_0x1e5f00(0x192)+(_0x32de56[_0x1e5f00(0x190)]??_0x1e5f00(0x18e))+'.');const _0x2c4a16=_0x32de56['appCode']?.[_0x1e5f00(0x196)](),_0x10c988=buildCustomPageEditUrl(_0x2c4a16,_0x5af304['pageId']),_0x4a9ef1=await resolveCustomPageDevelopmentUrl(_0x2c4a16,_0x5af304[_0x1e5f00(0x18f)],_0x2b6b1c[_0x1e5f00(0x19c)]),_0x233cd5=buildMutationData(_0x5af304,!![],_0x4a9ef1,_0x10c988);_0x2c4a16&&!_0x4a9ef1&&_0x233cd5[_0x1e5f00(0x1a2)][_0x1e5f00(0x193)](_0x1e5f00(0x18d));const _0x669aa9=buildCustomPageRuntimeUrl(_0x32de56[_0x1e5f00(0x1a6)],_0x32de56[_0x1e5f00(0x1a0)]);return _0x669aa9?_0x233cd5[_0x1e5f00(0x195)]=_0x669aa9:_0x233cd5['warnings']['push']('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0x233cd5,'message':_0x1e5f00(0x199)+_0x5af304['pageId']+'.'};}};function readInput(_0x136510){const _0x5ad328=a162_0x108a1a,_0x38bc2a=readCustomPageId(_0x136510),_0x5e631c=_0x136510['str'](_0x5ad328(0x18b))[_0x5ad328(0x196)]();return{'pageId':_0x38bc2a,..._0x5e631c?{'remark':_0x5e631c}:{}};}function buildMutationData(_0x1aede5,_0xb09930=![],_0x374ded,_0x44468f){const _0x78c174=a162_0x108a1a;return{'operation':_0x78c174(0x18a),'selector':{'pageId':_0x1aede5[_0x78c174(0x18f)]},'before':null,'after':{'pageId':_0x1aede5[_0x78c174(0x18f)],'status':_0x78c174(0x1a3)},'dryRun':!_0xb09930,'request':_0x1aede5,..._0x374ded?{'pageUrl':_0x374ded}:{},..._0x44468f?{'editPageUrl':_0x44468f}:{},'warnings':[]};}
@@ -1 +1 @@
1
- const a163_0x5f082d=a163_0x8bb3;(function(_0x490c3e,_0x19b0d4){const _0x35da4c=a163_0x8bb3,_0x19e9e3=_0x490c3e();while(!![]){try{const _0x29d3e7=parseInt(_0x35da4c(0xb5))/0x1+-parseInt(_0x35da4c(0xc2))/0x2+parseInt(_0x35da4c(0xba))/0x3+-parseInt(_0x35da4c(0xb0))/0x4+parseInt(_0x35da4c(0xb1))/0x5+-parseInt(_0x35da4c(0xad))/0x6*(parseInt(_0x35da4c(0xb6))/0x7)+parseInt(_0x35da4c(0xc1))/0x8;if(_0x29d3e7===_0x19b0d4)break;else _0x19e9e3['push'](_0x19e9e3['shift']());}catch(_0x34a23c){_0x19e9e3['push'](_0x19e9e3['shift']());}}}(a163_0x462a,0x54225));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';function a163_0x8bb3(_0x44cc48,_0x174a81){_0x44cc48=_0x44cc48-0xad;const _0x462a00=a163_0x462a();let _0x8bb3bd=_0x462a00[_0x44cc48];return _0x8bb3bd;}import{CliErrors}from'../../../errors.js';function a163_0x462a(){const _0x1f815e=['37107lzIWNH','pageId','map','--id\x20must\x20be\x20a\x20positive\x20integer.','num','Invalid\x20Custom\x20Page\x20content:\x20','menus','8669032uDElfi','1366708gvMOXY','react','message','7188GXbUYZ','find','isInteger','225044AYinHH','1035395WsPxsA','/ide/','join','type','448437rGOpET','3899NrrVnN','/pages/','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','path'];a163_0x462a=function(){return _0x1f815e;};return a163_0x462a();}import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a163_0x5f082d(0xb8)};function trimOptional(_0x386c25){return _0x386c25?.['trim']()||undefined;}export function buildCustomPageRuntimeUrl(_0x2b2c3a,_0xe7e0e3){const _0x5ca320=trimOptional(_0x2b2c3a),_0x1f1a8a=trimOptional(_0xe7e0e3);if(!_0x5ca320||!_0x1f1a8a)return undefined;return getPublishedAppDomain(_0x5ca320)+'/'+encodeURIComponent(_0x1f1a8a);}export function buildCustomPageDevelopmentUrl(_0x552db2,_0x126be1){const _0x233676=a163_0x5f082d,_0x434188=trimOptional(_0x552db2),_0x3e6b94=trimOptional(_0x126be1);if(!_0x434188||!_0x3e6b94)return undefined;return getAppBaseUrl(_0x434188)+_0x233676(0xb7)+encodeURIComponent(_0x3e6b94);}export async function resolveCustomPageDevelopmentUrl(_0x4b4174,_0x3f4441,_0x308765){const _0x386c1a=a163_0x5f082d,_0x1c7f09=trimOptional(_0x4b4174);if(!_0x1c7f09)return undefined;try{const _0x57c3d1=(await fetchMenuSnapshot(_0x1c7f09,_0x308765))[_0x386c1a(0xc0)][_0x386c1a(0xae)](_0x3084d0=>_0x3084d0[_0x386c1a(0xb4)]===_0x386c1a(0xc3)&&_0x3084d0[_0x386c1a(0xbb)]===_0x3f4441);return buildCustomPageDevelopmentUrl(_0x1c7f09,_0x57c3d1?.[_0x386c1a(0xb9)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x758f1f,_0x31451c){const _0x3e2f46=a163_0x5f082d,_0x215f1b=trimOptional(_0x758f1f);if(!_0x215f1b)return;const _0x46d136=trimOptional(String(_0x31451c??''));if(!_0x46d136)return;return getAppBaseUrl(_0x215f1b)+_0x3e2f46(0xb2)+encodeURIComponent(_0x46d136);}export async function validateCustomPageContent(_0x22b17d){const _0x12b692=a163_0x5f082d,_0x569803=await validateCustomPageSourceFiles(_0x22b17d);if(_0x569803['length']>0x0)throw CliErrors['validation'](_0x12b692(0xbf)+_0x569803[_0x12b692(0xbc)](_0xb0b8b6=>_0xb0b8b6['file']+':\x20'+_0xb0b8b6[_0x12b692(0xc4)])[_0x12b692(0xb3)](';\x20'));}export function readCustomPageId(_0x2784cb){const _0x4cbc03=a163_0x5f082d,_0x5305f0=_0x2784cb[_0x4cbc03(0xbe)]('id');if(!Number[_0x4cbc03(0xaf)](_0x5305f0)||_0x5305f0<=0x0)throw CliErrors['validation'](_0x4cbc03(0xbd));return _0x5305f0;}
1
+ const a163_0x49c4b2=a163_0x5acf;(function(_0x4b1cc3,_0x1378ab){const _0x469ee1=a163_0x5acf,_0x558a7e=_0x4b1cc3();while(!![]){try{const _0xa6e692=-parseInt(_0x469ee1(0x1ba))/0x1*(-parseInt(_0x469ee1(0x1bc))/0x2)+-parseInt(_0x469ee1(0x1b1))/0x3+-parseInt(_0x469ee1(0x1af))/0x4*(-parseInt(_0x469ee1(0x1bd))/0x5)+-parseInt(_0x469ee1(0x1c1))/0x6*(parseInt(_0x469ee1(0x1ab))/0x7)+-parseInt(_0x469ee1(0x1b2))/0x8+parseInt(_0x469ee1(0x1bf))/0x9*(-parseInt(_0x469ee1(0x1b0))/0xa)+-parseInt(_0x469ee1(0x1b8))/0xb*(-parseInt(_0x469ee1(0x1c0))/0xc);if(_0xa6e692===_0x1378ab)break;else _0x558a7e['push'](_0x558a7e['shift']());}catch(_0x3e54a6){_0x558a7e['push'](_0x558a7e['shift']());}}}(a163_0x3e80,0xec0a5));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a163_0x5acf(_0x1942fa,_0xfa4bba){_0x1942fa=_0x1942fa-0x1a7;const _0x3e8072=a163_0x3e80();let _0x5acf63=_0x3e8072[_0x1942fa];return _0x5acf63;}import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';function a163_0x3e80(){const _0x1f8433=['isInteger','type','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','21118746gmmBVn','validation','2057NBjzba','menus','698wAjqzn','1340RrkVsq','num','2289339uAxQAo','12rvpYZP','2488902SDcQSU','/ide/','path','pageId','message','/pages/','14NdXihy','file','map','find','21404JUvVOy','20jbdehK','2577873lrKdqH','7258872nfxdLe','trim','length'];a163_0x3e80=function(){return _0x1f8433;};return a163_0x3e80();}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a163_0x49c4b2(0x1b7)};function trimOptional(_0x51fdff){const _0x483aa2=a163_0x49c4b2;return _0x51fdff?.[_0x483aa2(0x1b3)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x1a4382,_0x1688d3){const _0x1c715f=trimOptional(_0x1a4382),_0x3f7abb=trimOptional(_0x1688d3);if(!_0x1c715f||!_0x3f7abb)return undefined;return getPublishedAppDomain(_0x1c715f)+'/'+encodeURIComponent(_0x3f7abb);}export function buildCustomPageDevelopmentUrl(_0x1fd820,_0x40726e){const _0x1ec33e=a163_0x49c4b2,_0x4c0556=trimOptional(_0x1fd820),_0x2e6b70=trimOptional(_0x40726e);if(!_0x4c0556||!_0x2e6b70)return undefined;return getAppBaseUrl(_0x4c0556)+_0x1ec33e(0x1aa)+encodeURIComponent(_0x2e6b70);}export async function resolveCustomPageDevelopmentUrl(_0xf8a319,_0xdfb2fe,_0x4c5b36){const _0x1d59ae=a163_0x49c4b2,_0x28ba8b=trimOptional(_0xf8a319);if(!_0x28ba8b)return undefined;try{const _0x1bb755=(await fetchMenuSnapshot(_0x28ba8b,_0x4c5b36))[_0x1d59ae(0x1bb)][_0x1d59ae(0x1ae)](_0x3d6d05=>_0x3d6d05[_0x1d59ae(0x1b6)]==='react'&&_0x3d6d05[_0x1d59ae(0x1a8)]===_0xdfb2fe);return buildCustomPageDevelopmentUrl(_0x28ba8b,_0x1bb755?.[_0x1d59ae(0x1a7)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x49fd25,_0x4d3cfc){const _0xa2138=a163_0x49c4b2,_0x19c960=trimOptional(_0x49fd25);if(!_0x19c960)return;const _0x3764bb=trimOptional(String(_0x4d3cfc??''));if(!_0x3764bb)return;return getAppBaseUrl(_0x19c960)+_0xa2138(0x1c2)+encodeURIComponent(_0x3764bb);}export async function validateCustomPageContent(_0x65e384){const _0x8ba1f=a163_0x49c4b2,_0x4b6794=await validateCustomPageSourceFiles(_0x65e384);if(_0x4b6794[_0x8ba1f(0x1b4)]>0x0)throw CliErrors[_0x8ba1f(0x1b9)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x4b6794[_0x8ba1f(0x1ad)](_0x4ee79f=>_0x4ee79f[_0x8ba1f(0x1ac)]+':\x20'+_0x4ee79f[_0x8ba1f(0x1a9)])['join'](';\x20'));}export function readCustomPageId(_0x38746e){const _0x52327f=a163_0x49c4b2,_0x214cb3=_0x38746e[_0x52327f(0x1be)]('id');if(!Number[_0x52327f(0x1b5)](_0x214cb3)||_0x214cb3<=0x0)throw CliErrors['validation']('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x214cb3;}
@@ -1 +1 @@
1
- function a164_0x1843(){const _0x2ae9b1=['Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','4shaGwB','map','.jsx','endsWith','5VPQdNm','page\x20files','some','message','492846HlfgaF','214632USaBdG','filter','10671542rdQeDd','117fyFSrC','typescript','entries','10786160MLzvQH','3383468hsAuAW','babel','trim','all','2405510OGQKQE','toLowerCase','1326090mEcaEM'];a164_0x1843=function(){return _0x2ae9b1;};return a164_0x1843();}const a164_0x2b060e=a164_0x8f82;function a164_0x8f82(_0x58938a,_0x2eabfe){_0x58938a=_0x58938a-0x129;const _0x1843ec=a164_0x1843();let _0x8f82c7=_0x1843ec[_0x58938a];return _0x8f82c7;}(function(_0x591291,_0x5a034c){const _0xeb327=a164_0x8f82,_0x2d8d1f=_0x591291();while(!![]){try{const _0x4f6c67=parseInt(_0xeb327(0x12f))/0x1+parseInt(_0xeb327(0x13e))/0x2*(parseInt(_0xeb327(0x12e))/0x3)+parseInt(_0xeb327(0x136))/0x4+parseInt(_0xeb327(0x12a))/0x5*(-parseInt(_0xeb327(0x13c))/0x6)+parseInt(_0xeb327(0x131))/0x7+parseInt(_0xeb327(0x135))/0x8+-parseInt(_0xeb327(0x132))/0x9*(parseInt(_0xeb327(0x13a))/0xa);if(_0x4f6c67===_0x5a034c)break;else _0x2d8d1f['push'](_0x2d8d1f['shift']());}catch(_0x299c95){_0x2d8d1f['push'](_0x2d8d1f['shift']());}}}(a164_0x1843,0xdf0fd));import{format}from'prettier';const SOURCE_PARSERS={'.js':a164_0x2b060e(0x137),'.jsx':a164_0x2b060e(0x137),'.ts':a164_0x2b060e(0x133),'.tsx':a164_0x2b060e(0x133)},CUSTOM_PAGE_EXTENSIONS=[a164_0x2b060e(0x140),'.tsx'];export async function validateCustomPageSourceFiles(_0x5186dc){const _0x39c447=a164_0x2b060e,_0x4dd14e=Object[_0x39c447(0x134)](_0x5186dc)[_0x39c447(0x130)](([_0x15e48e])=>getParser(_0x15e48e));if(!_0x4dd14e[_0x39c447(0x12c)](([_0x1d22da])=>isReactSourceFile(_0x1d22da)))return[{'file':_0x39c447(0x12b),'message':_0x39c447(0x13d)}];const _0x2cffb3=await Promise[_0x39c447(0x139)](_0x4dd14e[_0x39c447(0x13f)](async([_0x570222,_0x739b4b])=>{const _0x4dde7b=_0x39c447;try{return await format(_0x739b4b,{'parser':getParser(_0x570222)}),undefined;}catch(_0x3e82bf){return{'file':_0x570222,'message':_0x3e82bf instanceof Error?_0x3e82bf[_0x4dde7b(0x12d)]:String(_0x3e82bf)};}}));return _0x2cffb3[_0x39c447(0x130)](_0x240430=>_0x240430!==undefined);}function getParser(_0x134d00){const _0x5448f4=a164_0x2b060e,_0x15017f=_0x134d00[_0x5448f4(0x138)]()['toLowerCase']();return Object['entries'](SOURCE_PARSERS)['find'](([_0x4bdeae])=>_0x15017f[_0x5448f4(0x129)](_0x4bdeae))?.[0x1];}function isReactSourceFile(_0x22c57c){const _0x25f89f=a164_0x2b060e,_0x5acc8e=_0x22c57c[_0x25f89f(0x138)]()[_0x25f89f(0x13b)]();return CUSTOM_PAGE_EXTENSIONS['some'](_0x503a8f=>_0x5acc8e['endsWith'](_0x503a8f));}
1
+ const a164_0x3ada7e=a164_0xe87f;(function(_0x583c22,_0xd70e81){const _0x361c90=a164_0xe87f,_0x369b60=_0x583c22();while(!![]){try{const _0x5a735b=-parseInt(_0x361c90(0x106))/0x1+parseInt(_0x361c90(0x109))/0x2*(-parseInt(_0x361c90(0x119))/0x3)+-parseInt(_0x361c90(0x104))/0x4*(parseInt(_0x361c90(0x114))/0x5)+parseInt(_0x361c90(0x10c))/0x6*(-parseInt(_0x361c90(0x116))/0x7)+-parseInt(_0x361c90(0x118))/0x8*(parseInt(_0x361c90(0x10e))/0x9)+-parseInt(_0x361c90(0x10f))/0xa*(-parseInt(_0x361c90(0x10a))/0xb)+parseInt(_0x361c90(0x111))/0xc;if(_0x5a735b===_0xd70e81)break;else _0x369b60['push'](_0x369b60['shift']());}catch(_0x23bca5){_0x369b60['push'](_0x369b60['shift']());}}}(a164_0x35a9,0x5f447));function a164_0x35a9(){const _0x34642d=['endsWith','.tsx','4pNbHfp','11FmBKYe','some','48jsZOaj','filter','54cxfxGa','1362440RCVXDr','message','21872520ZqRcSD','map','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','1415NZILbb','page\x20files','190071DSNAkQ','entries','765792izkGkr','834294lZoksA','typescript','trim','1556WHuAEx','toLowerCase','110888mReQXQ'];a164_0x35a9=function(){return _0x34642d;};return a164_0x35a9();}import{format}from'prettier';const SOURCE_PARSERS={'.js':'babel','.jsx':'babel','.ts':a164_0x3ada7e(0x102),'.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=['.jsx',a164_0x3ada7e(0x108)];function a164_0xe87f(_0x472e7b,_0x9a6191){_0x472e7b=_0x472e7b-0x102;const _0x35a9bf=a164_0x35a9();let _0xe87f0f=_0x35a9bf[_0x472e7b];return _0xe87f0f;}export async function validateCustomPageSourceFiles(_0x2512aa){const _0x4d76f4=a164_0x3ada7e,_0x4fade8=Object[_0x4d76f4(0x117)](_0x2512aa)[_0x4d76f4(0x10d)](([_0x2c7b8b])=>getParser(_0x2c7b8b));if(!_0x4fade8['some'](([_0x483784])=>isReactSourceFile(_0x483784)))return[{'file':_0x4d76f4(0x115),'message':_0x4d76f4(0x113)}];const _0x37e2a8=await Promise['all'](_0x4fade8[_0x4d76f4(0x112)](async([_0x2c91ed,_0x1188b1])=>{const _0x51a668=_0x4d76f4;try{return await format(_0x1188b1,{'parser':getParser(_0x2c91ed)}),undefined;}catch(_0x24da22){return{'file':_0x2c91ed,'message':_0x24da22 instanceof Error?_0x24da22[_0x51a668(0x110)]:String(_0x24da22)};}}));return _0x37e2a8[_0x4d76f4(0x10d)](_0x52e37f=>_0x52e37f!==undefined);}function getParser(_0x21f944){const _0x624eb3=a164_0x3ada7e,_0x396726=_0x21f944['trim']()['toLowerCase']();return Object[_0x624eb3(0x117)](SOURCE_PARSERS)['find'](([_0xc3c486])=>_0x396726[_0x624eb3(0x107)](_0xc3c486))?.[0x1];}function isReactSourceFile(_0x1cf793){const _0x282149=a164_0x3ada7e,_0x390917=_0x1cf793[_0x282149(0x103)]()[_0x282149(0x105)]();return CUSTOM_PAGE_EXTENSIONS[_0x282149(0x10b)](_0x1298ea=>_0x390917[_0x282149(0x107)](_0x1298ea));}
@@ -1 +1 @@
1
- const a165_0x295349=a165_0x282a;(function(_0xcd159c,_0x20b9cc){const _0xa1b973=a165_0x282a,_0x978a3f=_0xcd159c();while(!![]){try{const _0x2c7b2c=parseInt(_0xa1b973(0x166))/0x1*(parseInt(_0xa1b973(0x181))/0x2)+parseInt(_0xa1b973(0x169))/0x3*(-parseInt(_0xa1b973(0x170))/0x4)+-parseInt(_0xa1b973(0x176))/0x5+-parseInt(_0xa1b973(0x185))/0x6+parseInt(_0xa1b973(0x183))/0x7*(parseInt(_0xa1b973(0x178))/0x8)+-parseInt(_0xa1b973(0x167))/0x9*(parseInt(_0xa1b973(0x188))/0xa)+parseInt(_0xa1b973(0x16e))/0xb*(parseInt(_0xa1b973(0x179))/0xc);if(_0x2c7b2c===_0x20b9cc)break;else _0x978a3f['push'](_0x978a3f['shift']());}catch(_0x5e0fc2){_0x978a3f['push'](_0x978a3f['shift']());}}}(a165_0x4238,0x3b32b));function a165_0x282a(_0x5cdc80,_0x5194c2){_0x5cdc80=_0x5cdc80-0x162;const _0x42384c=a165_0x4238();let _0x282ae5=_0x42384c[_0x5cdc80];return _0x282ae5;}import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a165_0x295349(0x16a),'command':a165_0x295349(0x175),'description':a165_0x295349(0x177),'risk':a165_0x295349(0x164),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a165_0x295349(0x17b),'message':a165_0x295349(0x182),'hint':a165_0x295349(0x17d)}],'flags':[{'name':'id','type':a165_0x295349(0x165),'required':!![],'description':a165_0x295349(0x168)},{'name':'page-dir','type':a165_0x295349(0x174),'required':!![],'description':a165_0x295349(0x16b)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x34deda){readCustomPageId(_0x34deda),await readValidatedPageContent(_0x34deda);},async 'dryRun'(_0x977e07){const _0x405211=a165_0x295349,_0xcd2d27=await readInput(_0x977e07);return{'method':'POST','url':_0x405211(0x162),'body':{'id':_0xcd2d27['pageId'],'codeContent':_0xcd2d27[_0x405211(0x16f)]},'description':_0x405211(0x172)+_0xcd2d27[_0x405211(0x17e)]+'.'};},async 'execute'(_0x22013a){const _0x3c8d4c=a165_0x295349,_0x49da42=await readInput(_0x22013a),_0x4bd9b4=await updateCustomPageContent({'pageId':_0x49da42[_0x3c8d4c(0x17e)],'pageContent':_0x49da42[_0x3c8d4c(0x16f)]});if(!Number[_0x3c8d4c(0x186)](_0x4bd9b4[_0x3c8d4c(0x16c)])||_0x4bd9b4[_0x3c8d4c(0x16c)]<=0x0)throw CliErrors[_0x3c8d4c(0x173)]('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x53b920=buildCustomPageEditUrl(_0x49da42[_0x3c8d4c(0x171)],_0x49da42[_0x3c8d4c(0x17e)]),_0x19c359=await resolveCustomPageDevelopmentUrl(_0x49da42[_0x3c8d4c(0x171)],_0x49da42[_0x3c8d4c(0x17e)],_0x22013a[_0x3c8d4c(0x17c)]);return{'ok':!![],'data':{'operation':_0x3c8d4c(0x16d),'selector':{'appCode':_0x49da42[_0x3c8d4c(0x171)],'pageId':_0x49da42[_0x3c8d4c(0x17e)]},'before':null,'after':{'pageId':_0x4bd9b4['pageId'],'version':_0x4bd9b4[_0x3c8d4c(0x16c)],'pageContent':_0x49da42[_0x3c8d4c(0x16f)]},'dryRun':![],'request':_0x49da42,..._0x19c359?{'pageUrl':_0x19c359}:{},..._0x53b920?{'editPageUrl':_0x53b920}:{},'warnings':_0x19c359?[]:['Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':'Updated\x20Custom\x20Page\x20'+_0x49da42[_0x3c8d4c(0x17e)]+'.'};}};async function readInput(_0x452011){const _0xbbb2b3=a165_0x295349,_0x35da3f=readCustomPageId(_0x452011),_0x3116c1=_0x452011[_0xbbb2b3(0x17f)](_0xbbb2b3(0x184))[_0xbbb2b3(0x180)]()||(await getCustomPageSource(_0x35da3f))[_0xbbb2b3(0x171)]?.[_0xbbb2b3(0x180)]();if(!_0x3116c1)throw CliErrors[_0xbbb2b3(0x163)](_0xbbb2b3(0x17a)+_0x35da3f+'.');return{'appCode':_0x3116c1,'pageId':_0x35da3f,'pageContent':await readValidatedPageContent(_0x452011)};}async function readValidatedPageContent(_0x40237c){const _0x314648=a165_0x295349,_0x4bf94a=await readCustomPageDirectory(_0x40237c['str'](_0x314648(0x187)));return await validateCustomPageContent(_0x4bf94a),_0x4bf94a;}function a165_0x4238(){const _0x5b7927=['2591649kHbiQD','Custom\x20Page\x20ID','461454bBZLAU','page','Directory\x20containing\x20all\x20complete\x20page\x20files','newVersion','page.custom-update','9613538RmeKbI','pageContent','4BERgqZ','appCode','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','apiError','string','custom-update','1115265aVlJKz','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','3243128aGCFNh','12BGXhGK','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','page-content','cookie','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','pageId','str','trim','103310XBHQIb','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','7iTjrVy','appcode','2852112WWoqLA','isInteger','page-dir','10WtKDmD','/smartapi/webcode/page/update/content','validation','write','number','2iKStfp'];a165_0x4238=function(){return _0x5b7927;};return a165_0x4238();}
1
+ const a165_0x5c6bd1=a165_0x59c1;(function(_0x3645f7,_0xf4b7a2){const _0x18d967=a165_0x59c1,_0x3f1745=_0x3645f7();while(!![]){try{const _0x411d45=parseInt(_0x18d967(0xa2))/0x1+parseInt(_0x18d967(0xa5))/0x2+parseInt(_0x18d967(0xaa))/0x3*(-parseInt(_0x18d967(0x9d))/0x4)+-parseInt(_0x18d967(0x9e))/0x5+-parseInt(_0x18d967(0xa7))/0x6+-parseInt(_0x18d967(0xa8))/0x7*(-parseInt(_0x18d967(0x9b))/0x8)+-parseInt(_0x18d967(0xb5))/0x9*(parseInt(_0x18d967(0xaf))/0xa);if(_0x411d45===_0xf4b7a2)break;else _0x3f1745['push'](_0x3f1745['shift']());}catch(_0x254cf7){_0x3f1745['push'](_0x3f1745['shift']());}}}(a165_0x9c77,0x81d61));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a165_0x5c6bd1(0xac),'command':a165_0x5c6bd1(0x9a),'description':a165_0x5c6bd1(0xa9),'risk':a165_0x5c6bd1(0xb3),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a165_0x5c6bd1(0xa1),'message':a165_0x5c6bd1(0x9f),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'id','type':a165_0x5c6bd1(0x99),'required':!![],'description':a165_0x5c6bd1(0xb0)},{'name':'page-dir','type':'string','required':!![],'description':a165_0x5c6bd1(0xb4)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x59300a){readCustomPageId(_0x59300a),await readValidatedPageContent(_0x59300a);},async 'dryRun'(_0x162d6d){const _0x1c32aa=a165_0x5c6bd1,_0x59b28b=await readInput(_0x162d6d);return{'method':_0x1c32aa(0xa3),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x59b28b[_0x1c32aa(0xa0)],'codeContent':_0x59b28b[_0x1c32aa(0xab)]},'description':'Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20'+_0x59b28b[_0x1c32aa(0xa0)]+'.'};},async 'execute'(_0x436312){const _0xfccc8e=a165_0x5c6bd1,_0x38d852=await readInput(_0x436312),_0x1009e1=await updateCustomPageContent({'pageId':_0x38d852[_0xfccc8e(0xa0)],'pageContent':_0x38d852[_0xfccc8e(0xab)]});if(!Number[_0xfccc8e(0xb1)](_0x1009e1[_0xfccc8e(0xae)])||_0x1009e1[_0xfccc8e(0xae)]<=0x0)throw CliErrors['apiError'](_0xfccc8e(0x9c));const _0x138ce1=buildCustomPageEditUrl(_0x38d852[_0xfccc8e(0xb6)],_0x38d852['pageId']),_0x312bc0=await resolveCustomPageDevelopmentUrl(_0x38d852[_0xfccc8e(0xb6)],_0x38d852[_0xfccc8e(0xa0)],_0x436312['cookie']);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x38d852[_0xfccc8e(0xb6)],'pageId':_0x38d852[_0xfccc8e(0xa0)]},'before':null,'after':{'pageId':_0x1009e1['pageId'],'version':_0x1009e1[_0xfccc8e(0xae)],'pageContent':_0x38d852['pageContent']},'dryRun':![],'request':_0x38d852,..._0x312bc0?{'pageUrl':_0x312bc0}:{},..._0x138ce1?{'editPageUrl':_0x138ce1}:{},'warnings':_0x312bc0?[]:[_0xfccc8e(0xad)]},'message':'Updated\x20Custom\x20Page\x20'+_0x38d852[_0xfccc8e(0xa0)]+'.'};}};async function readInput(_0x27d95f){const _0x14f830=a165_0x5c6bd1,_0x2e6d7d=readCustomPageId(_0x27d95f),_0x47a23c=_0x27d95f[_0x14f830(0xb2)](_0x14f830(0x98))['trim']()||(await getCustomPageSource(_0x2e6d7d))['appCode']?.[_0x14f830(0xa6)]();if(!_0x47a23c)throw CliErrors[_0x14f830(0xa4)](_0x14f830(0xb7)+_0x2e6d7d+'.');return{'appCode':_0x47a23c,'pageId':_0x2e6d7d,'pageContent':await readValidatedPageContent(_0x27d95f)};}function a165_0x59c1(_0x255483,_0x2ff091){_0x255483=_0x255483-0x98;const _0x9c77a4=a165_0x9c77();let _0x59c1e8=_0x9c77a4[_0x255483];return _0x59c1e8;}function a165_0x9c77(){const _0x47a6ce=['str','write','Directory\x20containing\x20all\x20complete\x20page\x20files','27unIyeB','appCode','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','appcode','number','custom-update','144616HOBZxm','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','1116tpsHZx','1462745NqAFRr','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','pageId','page-content','939617QxewnY','POST','validation','1325032dcFDFG','trim','1262412kiVncL','196fBWifQ','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','2295rquIEc','pageContent','page','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','newVersion','2866980ZxDwQu','Custom\x20Page\x20ID','isInteger'];a165_0x9c77=function(){return _0x47a6ce;};return a165_0x9c77();}async function readValidatedPageContent(_0x5df85e){const _0x4adea5=a165_0x5c6bd1,_0x3451a7=await readCustomPageDirectory(_0x5df85e[_0x4adea5(0xb2)]('page-dir'));return await validateCustomPageContent(_0x3451a7),_0x3451a7;}
@@ -1 +1 @@
1
- const a166_0xb2746=a166_0x18b0;function a166_0x3d0a(){const _0x30be48=['4843624eAgYut','code','page','1230729RinCKq','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','status','nextAction','manualResolutionRequired','15295DjqNku','compress','104997xiHLfT','2094745KvmNmk','alias','length','16jSVMXQ','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','string','6849396QVqRlv','data-list-status','2921072vAIWbH','3396FvADdq'];a166_0x3d0a=function(){return _0x30be48;};return a166_0x3d0a();}function a166_0x18b0(_0x5ea31a,_0x17b153){_0x5ea31a=_0x5ea31a-0x158;const _0x3d0aa9=a166_0x3d0a();let _0x18b07d=_0x3d0aa9[_0x5ea31a];return _0x18b07d;}(function(_0x11ce59,_0xb5ee8d){const _0x397e65=a166_0x18b0,_0x2329b1=_0x11ce59();while(!![]){try{const _0x4cee65=parseInt(_0x397e65(0x162))/0x1+-parseInt(_0x397e65(0x15d))/0x2+-parseInt(_0x397e65(0x169))/0x3+parseInt(_0x397e65(0x15f))/0x4+-parseInt(_0x397e65(0x16a))/0x5+-parseInt(_0x397e65(0x15e))/0x6*(parseInt(_0x397e65(0x167))/0x7)+parseInt(_0x397e65(0x158))/0x8*(parseInt(_0x397e65(0x15b))/0x9);if(_0x4cee65===_0xb5ee8d)break;else _0x2329b1['push'](_0x2329b1['shift']());}catch(_0x1fc519){_0x2329b1['push'](_0x2329b1['shift']());}}}(a166_0x3d0a,0xc65f1));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a166_0xb2746(0x161),'command':a166_0xb2746(0x15c),'description':a166_0xb2746(0x163),'risk':'read','defaultOutputFormat':a166_0xb2746(0x168),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a166_0xb2746(0x16b),'type':a166_0xb2746(0x15a),'description':a166_0xb2746(0x159)}],async 'validate'(_0x1310fc){validateDatasetSelector(_0x1310fc);},async 'dryRun'(_0x788e94){const _0x622726=a166_0xb2746,_0x347a54=await loadDatasetDetailForPage(_0x788e94);return{'method':'GET','url':'/smartapi/lovrabet/dataset/'+_0x347a54[_0x622726(0x160)]+'/standard-page-status?appCode='+encodeURIComponent(_0x788e94['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x347a54['id'],'code':_0x347a54[_0x622726(0x160)],'name':_0x347a54['name']},'action':'query-data-list-status'})};},async 'execute'(_0x19ff21){const _0x276c19=a166_0xb2746,_0x34029f=await loadDatasetDetailForPage(_0x19ff21),_0x5ebe14=await loadDataListPageStatusForGenerate(_0x19ff21,_0x34029f['code']),_0x461ee2=getUndeletedRelatedPages(_0x34029f),_0x4b4de2=assessDataListPageState(_0x34029f[_0x276c19(0x160)],_0x5ebe14,{'fallbackUndeletedPages':_0x461ee2});return{'ok':!![],'data':{'datasetCode':_0x34029f['code'],'precheckSource':_0x5ebe14?.['source']??'related-pages-fallback','status':_0x4b4de2[_0x276c19(0x164)],'manualResolutionRequired':_0x4b4de2[_0x276c19(0x166)],'nextAction':_0x4b4de2[_0x276c19(0x165)],'dataListPageStatus':_0x5ebe14,'relatedPages':{'total':_0x34029f['relatedPages'][_0x276c19(0x16c)],'undeletedCount':_0x461ee2[_0x276c19(0x16c)]}}};}};
1
+ const a166_0x5d409e=a166_0x40db;(function(_0x133c95,_0x591134){const _0x320713=a166_0x40db,_0x530a10=_0x133c95();while(!![]){try{const _0x130aeb=parseInt(_0x320713(0x119))/0x1+parseInt(_0x320713(0x115))/0x2*(parseInt(_0x320713(0x12e))/0x3)+parseInt(_0x320713(0x113))/0x4*(parseInt(_0x320713(0x127))/0x5)+-parseInt(_0x320713(0x122))/0x6*(parseInt(_0x320713(0x118))/0x7)+parseInt(_0x320713(0x11a))/0x8+parseInt(_0x320713(0x117))/0x9+-parseInt(_0x320713(0x11e))/0xa;if(_0x130aeb===_0x591134)break;else _0x530a10['push'](_0x530a10['shift']());}catch(_0x465052){_0x530a10['push'](_0x530a10['shift']());}}}(a166_0x5e05,0xf1861));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a166_0x40db(_0x20645b,_0x571665){_0x20645b=_0x20645b-0x112;const _0x5e0516=a166_0x5e05();let _0x40db69=_0x5e0516[_0x20645b];return _0x40db69;}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a166_0x5d409e(0x11c),'command':a166_0x5d409e(0x125),'description':a166_0x5d409e(0x12c),'risk':a166_0x5d409e(0x12b),'defaultOutputFormat':a166_0x5d409e(0x123),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a166_0x5d409e(0x121),'type':a166_0x5d409e(0x112),'description':a166_0x5d409e(0x124)}],async 'validate'(_0x327bc0){validateDatasetSelector(_0x327bc0);},async 'dryRun'(_0x202163){const _0x3cc0f9=a166_0x5d409e,_0x50615e=await loadDatasetDetailForPage(_0x202163);return{'method':_0x3cc0f9(0x120),'url':'/smartapi/lovrabet/dataset/'+_0x50615e[_0x3cc0f9(0x128)]+'/standard-page-status?appCode='+encodeURIComponent(_0x202163[_0x3cc0f9(0x11b)]),'description':serializeDryRunDescription({'dataset':{'id':_0x50615e['id'],'code':_0x50615e[_0x3cc0f9(0x128)],'name':_0x50615e['name']},'action':_0x3cc0f9(0x116)})};},async 'execute'(_0x532de7){const _0x2c0318=a166_0x5d409e,_0xed4b14=await loadDatasetDetailForPage(_0x532de7),_0x3bb7a3=await loadDataListPageStatusForGenerate(_0x532de7,_0xed4b14[_0x2c0318(0x128)]),_0x35ca89=getUndeletedRelatedPages(_0xed4b14),_0x38f081=assessDataListPageState(_0xed4b14[_0x2c0318(0x128)],_0x3bb7a3,{'fallbackUndeletedPages':_0x35ca89});return{'ok':!![],'data':{'datasetCode':_0xed4b14[_0x2c0318(0x128)],'precheckSource':_0x3bb7a3?.[_0x2c0318(0x126)]??_0x2c0318(0x11f),'status':_0x38f081[_0x2c0318(0x129)],'manualResolutionRequired':_0x38f081[_0x2c0318(0x12d)],'nextAction':_0x38f081[_0x2c0318(0x114)],'dataListPageStatus':_0x3bb7a3,'relatedPages':{'total':_0xed4b14[_0x2c0318(0x11d)][_0x2c0318(0x12a)],'undeletedCount':_0x35ca89['length']}}};}};function a166_0x5e05(){const _0xff1271=['76872ZRIwgJ','nextAction','98tNwmBw','query-data-list-status','12645603UTgDQf','11879329UfuzeJ','257537GIdHbR','12372992eupaHK','appCode','page','relatedPages','31632050xRuwPF','related-pages-fallback','GET','alias','6TUlmhh','compress','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','data-list-status','source','215qIMAin','code','status','length','read','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','manualResolutionRequired','111057KYyQmX','string'];a166_0x5e05=function(){return _0xff1271;};return a166_0x5e05();}
@@ -1 +1 @@
1
- const a167_0x4e7339=a167_0x5f31;(function(_0x3adb1a,_0x5ede44){const _0x4a1ef9=a167_0x5f31,_0x123dae=_0x3adb1a();while(!![]){try{const _0x5580be=-parseInt(_0x4a1ef9(0x9b))/0x1+-parseInt(_0x4a1ef9(0xa0))/0x2+-parseInt(_0x4a1ef9(0xb1))/0x3+-parseInt(_0x4a1ef9(0x90))/0x4+parseInt(_0x4a1ef9(0x9c))/0x5*(-parseInt(_0x4a1ef9(0xa5))/0x6)+parseInt(_0x4a1ef9(0xa8))/0x7*(parseInt(_0x4a1ef9(0xb5))/0x8)+parseInt(_0x4a1ef9(0x98))/0x9;if(_0x5580be===_0x5ede44)break;else _0x123dae['push'](_0x123dae['shift']());}catch(_0x3c4f30){_0x123dae['push'](_0x123dae['shift']());}}}(a167_0x23bd,0xcabba));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';function a167_0x23bd(){const _0x2a969c=['/generate-standard-pages/start','page-pattern','41361579EwnbuV','status','dataset','1518240uQspIf','5dUVurM','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','taskId','1616096brswuo','reused','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','code','Submitted\x20a\x20generate\x20task','1249998JFneWy','source','PARTIAL_SUCCESS','3143KeEbFP','apply','clientOperationId','DATA_LIST','/smartapi/lovrabet/dataset/','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','alias','SUCCESS','string','1469682oStaBz','dryRun','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','currentStep','104JOWCIy','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','appCode','message','fieldCount','operationId','page','related-pages-fallback','POST','page-type','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','progressRate','number','2986636KzWDej','bool','nextAction','precheck','dataListPageStatus','name'];a167_0x23bd=function(){return _0x2a969c;};return a167_0x23bd();}export const pageGenerateStart={'service':a167_0x4e7339(0xbb),'command':'generate-start','description':a167_0x4e7339(0xad),'risk':'write','defaultOutputFormat':'compress','rejectedFlags':[{'name':a167_0x4e7339(0x8c),'message':a167_0x4e7339(0x9d),'hint':a167_0x4e7339(0xb6)},{'name':a167_0x4e7339(0x97),'message':a167_0x4e7339(0x9e),'hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a167_0x4e7339(0xae),'type':a167_0x4e7339(0xb0),'description':a167_0x4e7339(0xb3)},{'name':a167_0x4e7339(0xa9),'type':'boolean','description':a167_0x4e7339(0xa2)}],async 'validate'(_0x2d972f){validateDatasetSelector(_0x2d972f);},async 'dryRun'(_0x48c4a5){const _0x3c02e0=a167_0x4e7339,_0x202aaa=await prepare(_0x48c4a5);return{'method':_0x3c02e0(0x8b),'url':_0x3c02e0(0xac)+_0x202aaa[_0x3c02e0(0x9a)]['code']+_0x3c02e0(0x96),'body':{'appCode':_0x48c4a5['appCode'],'clientOperationId':_0x202aaa['clientOperationId']},'description':serializeDryRunDescription({'dataset':{'id':_0x202aaa[_0x3c02e0(0x9a)]['id'],'code':_0x202aaa[_0x3c02e0(0x9a)][_0x3c02e0(0xa3)],'name':_0x202aaa['dataset'][_0x3c02e0(0x95)],'fieldCount':_0x202aaa[_0x3c02e0(0x9a)][_0x3c02e0(0xb9)]},'precheckSource':_0x202aaa['dataListPageStatus']?.[_0x3c02e0(0xa6)]??_0x3c02e0(0xbc),'action':'generate-start','clientOperationId':_0x202aaa[_0x3c02e0(0xaa)],'plannedStatus':_0x202aaa['precheck'][_0x3c02e0(0x99)],'reason':_0x202aaa[_0x3c02e0(0x93)][_0x3c02e0(0xb8)]})};},async 'execute'(_0x2194dd){const _0x2300d7=a167_0x4e7339;if(!_0x2194dd[_0x2300d7(0x91)](_0x2300d7(0xa9))){const _0x1e7195=await pageGenerateStart[_0x2300d7(0xb2)](_0x2194dd);return{'ok':!![],'message':_0x2300d7(0x8d),'data':_0x1e7195};}const _0x3d0916=await prepare(_0x2194dd);if(!_0x3d0916['precheck']['allowGenerate'])return{'ok':![],'message':_0x3d0916[_0x2300d7(0x93)][_0x2300d7(0xb8)],'data':{'datasetCode':_0x3d0916[_0x2300d7(0x9a)][_0x2300d7(0xa3)],'pageType':_0x2300d7(0xab),'pagePattern':'CRUD_PAGE_SET','clientOperationId':_0x3d0916['clientOperationId'],'precheckSource':_0x3d0916['dataListPageStatus']?.[_0x2300d7(0xa6)]??_0x2300d7(0xbc),'status':_0x3d0916[_0x2300d7(0x93)][_0x2300d7(0x99)],'manualResolutionRequired':_0x3d0916[_0x2300d7(0x93)]['manualResolutionRequired'],'nextAction':_0x3d0916[_0x2300d7(0x93)][_0x2300d7(0x92)],'query':{'command':buildDataListPageStatusQueryCommand(_0x3d0916[_0x2300d7(0x9a)][_0x2300d7(0xa3)],_0x2194dd['appCode'])},'dataListPageStatus':_0x3d0916[_0x2300d7(0x94)]}};const _0x5b8774=await startGenerateDataListPages(_0x2194dd['appCode'],_0x3d0916[_0x2300d7(0x9a)][_0x2300d7(0xa3)],{'clientOperationId':_0x3d0916[_0x2300d7(0xaa)]}),_0xc10990=_0x5b8774['status']===_0x2300d7(0xaf)||_0x5b8774[_0x2300d7(0x99)]===_0x2300d7(0xa7)?await loadDataListPageStatusForGenerate(_0x2194dd,_0x3d0916[_0x2300d7(0x9a)]['code']):null,_0x37c0c7=assessGenerateOperationState(_0x3d0916[_0x2300d7(0x9a)][_0x2300d7(0xa3)],_0x5b8774[_0x2300d7(0x99)],_0xc10990);return{'ok':!![],'message':_0x5b8774[_0x2300d7(0xa1)]?'Reusing\x20an\x20existing\x20generate\x20task':_0x2300d7(0xa4),'data':{'datasetCode':_0x3d0916[_0x2300d7(0x9a)]['code'],'appCode':_0x2194dd[_0x2300d7(0xb7)],'pageType':_0x2300d7(0xab),'pagePattern':'CRUD_PAGE_SET','taskId':_0x5b8774[_0x2300d7(0x9f)]??null,'operationId':_0x5b8774[_0x2300d7(0xba)]??null,'clientOperationId':_0x3d0916['clientOperationId'],'jobStatus':_0x5b8774[_0x2300d7(0x99)]??null,'progressRate':typeof _0x5b8774[_0x2300d7(0x8e)]===_0x2300d7(0x8f)?_0x5b8774[_0x2300d7(0x8e)]:null,'currentStep':_0x5b8774[_0x2300d7(0xb4)]??null,'reused':_0x5b8774[_0x2300d7(0xa1)]===!![],'status':_0x37c0c7[_0x2300d7(0x99)],'manualResolutionRequired':_0x37c0c7['manualResolutionRequired'],'nextAction':_0x37c0c7[_0x2300d7(0x92)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x3d0916[_0x2300d7(0x9a)]['code'],{'appCode':_0x2194dd[_0x2300d7(0xb7)],'taskId':_0x5b8774[_0x2300d7(0x9f)],'operationId':_0x5b8774['operationId'],'clientOperationId':_0x3d0916[_0x2300d7(0xaa)]})},'dataListPageStatus':_0xc10990}};}};function a167_0x5f31(_0x1f08ed,_0x177c5a){_0x1f08ed=_0x1f08ed-0x8b;const _0x23bd3d=a167_0x23bd();let _0x5f31d=_0x23bd3d[_0x1f08ed];return _0x5f31d;}async function prepare(_0x571b21){const _0x398f58=a167_0x4e7339,_0x6ae8b8=await loadDatasetDetailForPage(_0x571b21),_0x23279c=await loadDataListPageStatusForGenerate(_0x571b21,_0x6ae8b8[_0x398f58(0xa3)]),_0x1611d4=getUndeletedRelatedPages(_0x6ae8b8);return{'dataset':_0x6ae8b8,'dataListPageStatus':_0x23279c,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x6ae8b8[_0x398f58(0xa3)],_0x23279c,{'fallbackUndeletedPages':_0x1611d4})};}
1
+ function a167_0x173a(){const _0x3cb341=['appCode','137919qKkYGB','412dPvLur','progressRate','10657197dhVJDL','precheck','PARTIAL_SUCCESS','4HkpYYz','code','status','8KLklsD','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','page-pattern','1049880NMQzNb','page','reused','21631214gSoKgi','55485cqMSCH','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','Submitted\x20a\x20generate\x20task','clientOperationId','source','dataListPageStatus','dataset','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','generate-start','bool','dryRun','related-pages-fallback','allowGenerate','manualResolutionRequired','/smartapi/lovrabet/dataset/','name','13174dlcPlf','operationId','apply','CRUD_PAGE_SET','currentStep','3246LfzZms','POST','message','fieldCount','alias','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','Reusing\x20an\x20existing\x20generate\x20task','191823MatknT','number','taskId','nextAction','compress','DATA_LIST','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','boolean'];a167_0x173a=function(){return _0x3cb341;};return a167_0x173a();}const a167_0x1ac45d=a167_0x55d6;(function(_0x480a51,_0x1f4594){const _0x5e87f4=a167_0x55d6,_0x7b1dc3=_0x480a51();while(!![]){try{const _0x30af03=-parseInt(_0x5e87f4(0x1d6))/0x1+-parseInt(_0x5e87f4(0x1dc))/0x2*(parseInt(_0x5e87f4(0x1cd))/0x3)+-parseInt(_0x5e87f4(0x1d7))/0x4*(parseInt(_0x5e87f4(0x1e6))/0x5)+parseInt(_0x5e87f4(0x1fb))/0x6*(-parseInt(_0x5e87f4(0x1f6))/0x7)+parseInt(_0x5e87f4(0x1df))/0x8*(parseInt(_0x5e87f4(0x1d9))/0x9)+parseInt(_0x5e87f4(0x1e2))/0xa+parseInt(_0x5e87f4(0x1e5))/0xb;if(_0x30af03===_0x1f4594)break;else _0x7b1dc3['push'](_0x7b1dc3['shift']());}catch(_0x34fedb){_0x7b1dc3['push'](_0x7b1dc3['shift']());}}}(a167_0x173a,0xca4e1));function a167_0x55d6(_0x530787,_0xb06071){_0x530787=_0x530787-0x1c7;const _0x173a72=a167_0x173a();let _0x55d6f0=_0x173a72[_0x530787];return _0x55d6f0;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a167_0x1ac45d(0x1e3),'command':a167_0x1ac45d(0x1ee),'description':a167_0x1ac45d(0x1cb),'risk':'write','defaultOutputFormat':a167_0x1ac45d(0x1d1),'rejectedFlags':[{'name':'page-type','message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':a167_0x1ac45d(0x1e1),'message':a167_0x1ac45d(0x1e7),'hint':a167_0x1ac45d(0x1d3)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a167_0x1ac45d(0x1ca),'type':'string','description':a167_0x1ac45d(0x1ed)},{'name':a167_0x1ac45d(0x1f8),'type':a167_0x1ac45d(0x1d4),'description':a167_0x1ac45d(0x1e0)}],async 'validate'(_0x3bc54a){validateDatasetSelector(_0x3bc54a);},async 'dryRun'(_0x264ff5){const _0x228ecd=a167_0x1ac45d,_0x37247c=await prepare(_0x264ff5);return{'method':_0x228ecd(0x1c7),'url':_0x228ecd(0x1f4)+_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1dd)]+'/generate-standard-pages/start','body':{'appCode':_0x264ff5[_0x228ecd(0x1d5)],'clientOperationId':_0x37247c[_0x228ecd(0x1e9)]},'description':serializeDryRunDescription({'dataset':{'id':_0x37247c['dataset']['id'],'code':_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1dd)],'name':_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1f5)],'fieldCount':_0x37247c['dataset'][_0x228ecd(0x1c9)]},'precheckSource':_0x37247c['dataListPageStatus']?.[_0x228ecd(0x1ea)]??_0x228ecd(0x1f1),'action':_0x228ecd(0x1ee),'clientOperationId':_0x37247c[_0x228ecd(0x1e9)],'plannedStatus':_0x37247c[_0x228ecd(0x1da)][_0x228ecd(0x1de)],'reason':_0x37247c[_0x228ecd(0x1da)][_0x228ecd(0x1c8)]})};},async 'execute'(_0x54348a){const _0x832e23=a167_0x1ac45d;if(!_0x54348a[_0x832e23(0x1ef)](_0x832e23(0x1f8))){const _0x293fc8=await pageGenerateStart[_0x832e23(0x1f0)](_0x54348a);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x293fc8};}const _0x23c082=await prepare(_0x54348a);if(!_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1f2)])return{'ok':![],'message':_0x23c082[_0x832e23(0x1da)]['message'],'data':{'datasetCode':_0x23c082['dataset'][_0x832e23(0x1dd)],'pageType':_0x832e23(0x1d2),'pagePattern':_0x832e23(0x1f9),'clientOperationId':_0x23c082[_0x832e23(0x1e9)],'precheckSource':_0x23c082[_0x832e23(0x1eb)]?.[_0x832e23(0x1ea)]??_0x832e23(0x1f1),'status':_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1de)],'manualResolutionRequired':_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1f3)],'nextAction':_0x23c082['precheck'][_0x832e23(0x1d0)],'query':{'command':buildDataListPageStatusQueryCommand(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],_0x54348a[_0x832e23(0x1d5)])},'dataListPageStatus':_0x23c082[_0x832e23(0x1eb)]}};const _0x5e9180=await startGenerateDataListPages(_0x54348a[_0x832e23(0x1d5)],_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],{'clientOperationId':_0x23c082['clientOperationId']}),_0x4c6637=_0x5e9180['status']==='SUCCESS'||_0x5e9180['status']===_0x832e23(0x1db)?await loadDataListPageStatusForGenerate(_0x54348a,_0x23c082[_0x832e23(0x1ec)]['code']):null,_0x318539=assessGenerateOperationState(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],_0x5e9180['status'],_0x4c6637);return{'ok':!![],'message':_0x5e9180[_0x832e23(0x1e4)]?_0x832e23(0x1cc):_0x832e23(0x1e8),'data':{'datasetCode':_0x23c082[_0x832e23(0x1ec)]['code'],'appCode':_0x54348a[_0x832e23(0x1d5)],'pageType':_0x832e23(0x1d2),'pagePattern':_0x832e23(0x1f9),'taskId':_0x5e9180[_0x832e23(0x1cf)]??null,'operationId':_0x5e9180['operationId']??null,'clientOperationId':_0x23c082[_0x832e23(0x1e9)],'jobStatus':_0x5e9180[_0x832e23(0x1de)]??null,'progressRate':typeof _0x5e9180[_0x832e23(0x1d8)]===_0x832e23(0x1ce)?_0x5e9180[_0x832e23(0x1d8)]:null,'currentStep':_0x5e9180[_0x832e23(0x1fa)]??null,'reused':_0x5e9180[_0x832e23(0x1e4)]===!![],'status':_0x318539[_0x832e23(0x1de)],'manualResolutionRequired':_0x318539[_0x832e23(0x1f3)],'nextAction':_0x318539[_0x832e23(0x1d0)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],{'appCode':_0x54348a['appCode'],'taskId':_0x5e9180[_0x832e23(0x1cf)],'operationId':_0x5e9180[_0x832e23(0x1f7)],'clientOperationId':_0x23c082[_0x832e23(0x1e9)]})},'dataListPageStatus':_0x4c6637}};}};async function prepare(_0x2cd4db){const _0x2e3b65=a167_0x1ac45d,_0x14ab2d=await loadDatasetDetailForPage(_0x2cd4db),_0x2a07e3=await loadDataListPageStatusForGenerate(_0x2cd4db,_0x14ab2d[_0x2e3b65(0x1dd)]),_0x190e0=getUndeletedRelatedPages(_0x14ab2d);return{'dataset':_0x14ab2d,'dataListPageStatus':_0x2a07e3,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x14ab2d['code'],_0x2a07e3,{'fallbackUndeletedPages':_0x190e0})};}