@lovrabet/rabetbase-cli 2.5.2-beta.7 → 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_0x37a4f8=a157_0xd6b1;(function(_0xa425d7,_0x48ef0c){const _0x528709=a157_0xd6b1,_0x2c5188=_0xa425d7();while(!![]){try{const _0x4514e0=parseInt(_0x528709(0xb4))/0x1*(-parseInt(_0x528709(0x12b))/0x2)+-parseInt(_0x528709(0xec))/0x3*(parseInt(_0x528709(0x11e))/0x4)+parseInt(_0x528709(0xf9))/0x5+parseInt(_0x528709(0xe1))/0x6+parseInt(_0x528709(0xd8))/0x7+-parseInt(_0x528709(0xc0))/0x8+parseInt(_0x528709(0xdb))/0x9;if(_0x4514e0===_0x48ef0c)break;else _0x2c5188['push'](_0x2c5188['shift']());}catch(_0x106a5f){_0x2c5188['push'](_0x2c5188['shift']());}}}(a157_0x542b,0xca40f));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_0x37a4f8(0x129),a157_0x37a4f8(0xda),'DINGTALK',a157_0x37a4f8(0xf1),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType','endpointUrl',a157_0x37a4f8(0xd5),a157_0x37a4f8(0x10d),'connectTimeout',a157_0x37a4f8(0x109)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a157_0x37a4f8(0xbc),'configCode',a157_0x37a4f8(0x114)]),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x37a4f8(0xf4),a157_0x37a4f8(0xb9),a157_0x37a4f8(0xcd),'bccList',a157_0x37a4f8(0xc1),a157_0x37a4f8(0x103),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a157_0x37a4f8(0xe2),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a157_0x37a4f8(0x122),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a157_0x37a4f8(0xb1),'type':a157_0x37a4f8(0xe2),'required':![],'description':a157_0x37a4f8(0xc9)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x37a4f8(0xf6),'required':!![],'description':a157_0x37a4f8(0x11d)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5b422,_0x4d4f3e,_0x5cd0d8){return new CliError(_0x5b422,0x1,_0x4d4f3e,_0x5cd0d8);}export function readNotificationId(_0x320749){const _0x59a197=a157_0x37a4f8,_0x111b58=_0x320749[_0x59a197(0x134)]('id');if(!Number['isSafeInteger'](_0x111b58)||_0x111b58<=0x0)throw notificationError(_0x59a197(0xc3),_0x59a197(0x10e));return _0x111b58;}export function requireNotificationExplicitYes(_0x52b00f){const _0x1ea112=a157_0x37a4f8;if(_0x52b00f[_0x1ea112(0xe9)]('dry-run')||_0x52b00f[_0x1ea112(0xe9)](_0x1ea112(0x104)))return;throw notificationError(_0x1ea112(0xcc),_0x1ea112(0xb8),_0x1ea112(0x112));}export function readNotificationChannelType(_0xeb3f6c,_0x1213b2=a157_0x37a4f8(0x117),_0x42c3ba='EMAIL'){const _0xb4d90e=a157_0x37a4f8,_0x17a387=_0xeb3f6c[_0xb4d90e(0xbd)](_0x1213b2)['trim']()||_0x42c3ba;if(!NOTIFICATION_CHANNEL_TYPES[_0xb4d90e(0x102)](_0x17a387))throw CliErrors[_0xb4d90e(0xc5)](_0xb4d90e(0x116)+_0x1213b2+':\x20'+_0x17a387,_0xb4d90e(0x128)+NOTIFICATION_CHANNEL_TYPES[_0xb4d90e(0xcf)](',\x20')+'.');return _0x17a387;}function a157_0x542b(){const _0x19a60c=['setEncoding','file','_unavailable','object','a\x20non-empty\x20string','<redacted>','every','Notification\x20JSON\x20field\x20\x22','num','from-env','Notification\x20config\x20list\x20item\x20','some','2113vgwjeh','notification_config_field_invalid','\x20has\x20an\x20unsupported\x20channelType.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','recipients','notification_config_json_invalid','messageTemplate','appCode','str','length','preflight','7844760GoGyrl','replyTo','notification_config_field_unknown','notification_config_id_invalid','push','validation','\x20characters.','channelType','Missing\x20notification\x20JSON\x20source.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x20has\x20an\x20invalid\x20id.','notification_config_update_empty','notification_config_confirmation_required','ccList','\x20--format\x20compress','join','keys','Notification\x20JSON\x20source\x20is\x20ambiguous.','update','Notification\x20JSON\x20channelConfig\x20field\x20\x22','channelConfigRaw','channelConfig','\x22\x20cannot\x20exceed\x20','a\x20supported\x20string','1910076OpsYoG','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','FEISHU','5325849gOypRV','stringify','file\x20','entries','\x20must\x20be\x20an\x20object.','a\x20JSON\x20object','9671184QboKxO','string','connectTimeout','isSafeInteger','configCode','isArray','parse','\x20has\x20invalid\x20field\x20\x22','bool','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20--type\x20','176811InMCuN','Invalid\x20notification\x20config\x20response.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','endpointUrl','a\x20string\x20or\x20null','WECOM','\x22channelType\x22.','\x22\x20is\x20forbidden.','emailTargets','notification_config_response_invalid','number','path','Notification\x20JSON\x20from\x20','2130795MajjiV','hasOwnProperty','kind','endpointUrl:null','configName','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x22configName\x22.','env','notification_config_field_required','includes','subjectPrefix','yes','notification_config_source_unavailable','a\x20JSON\x20object\x20or\x20null','utf8','prototype','readTimeout','updateTime','Unknown\x20notification\x20JSON\x20field\x20\x22','\x20is\x20missing\x20required\x20field\x20\x22','description','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','endpointUrlRaw','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','name','channelCode','mutation','Invalid\x20--','type','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','has','create','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Application-level\x20notification\x20config\x20ID','16YbIXpi','trim','apiError','createTime','stdin','notification_config_field_forbidden','Create\x20JSON\x20requires\x20field\x20','\x20failed.','\x20has\x20an\x20invalid\x20channelType.','Notification\x20config\x20','Allowed\x20values:\x20','EMAIL','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','812mXXzGG'];a157_0x542b=function(){return _0x19a60c;};return a157_0x542b();}export function assertSingleNotificationSource(_0x544194){const _0x121bb8=a157_0x37a4f8,_0x445b94=[],_0x5a52e4=_0x544194[_0x121bb8(0xbd)](_0x121bb8(0x12d))[_0x121bb8(0x11f)]();if(_0x5a52e4)_0x445b94[_0x121bb8(0xc4)]({'kind':'file','path':_0x5a52e4});if(_0x544194[_0x121bb8(0xe9)]('stdin'))_0x445b94[_0x121bb8(0xc4)]({'kind':_0x121bb8(0x122)});const _0x4f8691=_0x544194['str'](_0x121bb8(0xb1))['trim']();if(_0x4f8691)_0x445b94[_0x121bb8(0xc4)]({'kind':_0x121bb8(0x100),'name':_0x4f8691});if(_0x445b94[_0x121bb8(0xbe)]===0x0)throw CliErrors[_0x121bb8(0xc5)](_0x121bb8(0xc8),_0x121bb8(0x11c));if(_0x445b94[_0x121bb8(0xbe)]>0x1)throw CliErrors[_0x121bb8(0xc5)](_0x121bb8(0xd1),_0x121bb8(0x11c));return _0x445b94[0x0];}export async function readNotificationDocument(_0x54e135,_0x5e00cc){const _0x2eb17f=a157_0x37a4f8,_0x5e1b17=assertSingleNotificationSource(_0x54e135),_0xe56845=_0x5e1b17['kind']===_0x2eb17f(0x12d)?_0x2eb17f(0xdd)+_0x5e1b17[_0x2eb17f(0xf7)]:_0x5e1b17[_0x2eb17f(0xfb)]===_0x2eb17f(0x100)?'environment\x20variable\x20'+_0x5e1b17[_0x2eb17f(0x113)]:_0x2eb17f(0x122);let _0x4b0c2f;try{if(_0x5e1b17[_0x2eb17f(0xfb)]==='file')_0x4b0c2f=await readFile(_0x5e1b17[_0x2eb17f(0xf7)],'utf8');else{if(_0x5e1b17['kind']===_0x2eb17f(0x100)){if(!(_0x5e1b17[_0x2eb17f(0x113)]in process.env))throw notificationError(_0x2eb17f(0x105),_0x2eb17f(0xea)+_0x5e1b17['name']);_0x4b0c2f=process.env[_0x5e1b17.name]??'';}else _0x4b0c2f=await readStdin();}}catch(_0x56f569){if(_0x56f569 instanceof CliError)throw _0x56f569;throw notificationError(_0x2eb17f(0x105),_0x2eb17f(0xfe)+_0xe56845+'.');}let _0x548dc7;try{_0x548dc7=JSON[_0x2eb17f(0xe7)](_0x4b0c2f);}catch{throw notificationError(_0x2eb17f(0xba),_0x2eb17f(0xf8)+_0xe56845+'\x20is\x20invalid.',_0x2eb17f(0x110));}if(!isJsonObject(_0x548dc7))throw notificationError(_0x2eb17f(0xba),_0x2eb17f(0xf8)+_0xe56845+_0x2eb17f(0xdf));return validateNotificationDocument(_0x548dc7,_0x5e00cc);}export function projectNotificationListConfig(_0x16aa57,_0x56772f){const _0x260df3=a157_0x37a4f8;return{'id':typeof _0x16aa57['id']===_0x260df3(0xf6)?_0x16aa57['id']:null,'configCode':requireResponseString(_0x16aa57[_0x260df3(0xe5)],_0x260df3(0xe5),_0x56772f),'configName':requireResponseString(_0x16aa57[_0x260df3(0xfd)],'configName',_0x56772f),'channelType':requireResponseString(_0x16aa57[_0x260df3(0xc7)],_0x260df3(0xc7),_0x56772f),'description':normalizeNullableString(_0x16aa57['description']),'createTime':normalizeNullableString(_0x16aa57[_0x260df3(0x121)]),'updateTime':normalizeNullableString(_0x16aa57[_0x260df3(0x10a)])};}export function normalizeExactNotificationConfig(_0x46d097,_0x34f7d3,_0x47003c){const _0x45a7ef=a157_0x37a4f8;if(!Number[_0x45a7ef(0xe4)](_0x46d097['id'])||_0x46d097['id']!==_0x34f7d3)throw notificationError(_0x45a7ef(0xf5),_0x45a7ef(0xb7)+_0x34f7d3+'.');if(_0x46d097['appCode']!==_0x47003c)throw notificationError(_0x45a7ef(0xf5),_0x45a7ef(0x127)+_0x34f7d3+_0x45a7ef(0x111));const _0x2c329d=requireExactString(_0x46d097['configName'],'configName',_0x34f7d3),_0x1362fe=requireExactString(_0x46d097[_0x45a7ef(0xe5)],_0x45a7ef(0xe5),_0x34f7d3),_0x5c1520=requireExactString(_0x46d097[_0x45a7ef(0xc7)],_0x45a7ef(0xc7),_0x34f7d3);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5c1520))throw notificationError(_0x45a7ef(0xf5),_0x45a7ef(0x127)+_0x34f7d3+_0x45a7ef(0xb6));const _0x587b82=responseNullableString(_0x46d097[_0x45a7ef(0xef)],_0x45a7ef(0xef),_0x34f7d3),_0x5a8ec8=responseNullableString(_0x46d097[_0x45a7ef(0xd5)],_0x45a7ef(0xd5),_0x34f7d3),_0x4c2acb=responseNullableString(_0x46d097[_0x45a7ef(0x10d)],_0x45a7ef(0x10d),_0x34f7d3),_0x4e8295=responseNullableTimeout(_0x46d097[_0x45a7ef(0xe3)],'connectTimeout',_0x34f7d3),_0x49e461=responseNullableTimeout(_0x46d097['readTimeout'],'readTimeout',_0x34f7d3);return{'id':_0x34f7d3,'appCode':_0x47003c,'configCode':_0x1362fe,'configName':_0x2c329d,'channelType':_0x5c1520,'endpointUrl':redactSensitive(_0x587b82),'channelConfig':redactSensitive(_0x5a8ec8),'description':_0x4c2acb,'connectTimeout':_0x4e8295,'readTimeout':_0x49e461,'endpointUrlRaw':_0x587b82,'channelConfigRaw':_0x5a8ec8};}export async function requireExactNotificationConfig(_0x4f249b,_0x2758d5,_0x5d9cfa){const _0x2d929e=a157_0x37a4f8;let _0x5cb28f;try{_0x5cb28f=await getNotificationChannelConfig(_0x2758d5,_0x4f249b);}catch{throw safeApiFailure(_0x5d9cfa,_0x2d929e(0xbf),_0x2d929e(0x118)+_0x4f249b+_0x2d929e(0x11b));}return normalizeExactNotificationConfig(_0x5cb28f,_0x2758d5,_0x4f249b);}export function projectNotificationConfig(_0x17b97c){const _0x50e6f9=a157_0x37a4f8;return{'id':_0x17b97c['id']??null,'appCode':_0x17b97c[_0x50e6f9(0xbc)],'configCode':_0x17b97c['configCode']??null,'configName':_0x17b97c['configName'],'channelType':_0x17b97c[_0x50e6f9(0xc7)],'endpointUrl':redactSensitive(_0x17b97c[_0x50e6f9(0xef)]),'channelConfig':redactSensitive(_0x17b97c['channelConfig']),'description':_0x17b97c[_0x50e6f9(0x10d)]??null,'connectTimeout':_0x17b97c[_0x50e6f9(0xe3)]??null,'readTimeout':_0x17b97c[_0x50e6f9(0x109)]??null};}export function notificationSelector(_0x30859b){const _0x39f4e5=a157_0x37a4f8;return{'appCode':_0x30859b[_0x39f4e5(0xbc)],'id':_0x30859b['id'],'configCode':_0x30859b[_0x39f4e5(0xe5)],'configName':_0x30859b[_0x39f4e5(0xfd)],'channelType':_0x30859b[_0x39f4e5(0xc7)]};}export function createMutationInput(_0x1854ca,_0x4794dd){const _0x10ccf0=a157_0x37a4f8;return{'appCode':_0x1854ca,'configName':_0x4794dd[_0x10ccf0(0xfd)],'channelType':_0x4794dd['channelType'],...hasOwn(_0x4794dd,_0x10ccf0(0xef))?{'endpointUrl':_0x4794dd[_0x10ccf0(0xef)]}:{},...hasOwn(_0x4794dd,_0x10ccf0(0xd5))?{'channelConfig':serializeChannelConfig(_0x4794dd[_0x10ccf0(0xd5)])}:{},...hasOwn(_0x4794dd,_0x10ccf0(0x10d))?{'description':_0x4794dd[_0x10ccf0(0x10d)]}:{},...hasOwn(_0x4794dd,_0x10ccf0(0xe3))?{'connectTimeout':_0x4794dd[_0x10ccf0(0xe3)]}:{},...hasOwn(_0x4794dd,'readTimeout')?{'readTimeout':_0x4794dd['readTimeout']}:{}};}export function mergeUpdateInput(_0x20a42f,_0x5ed855){const _0x5b9ac0=a157_0x37a4f8;return{'id':_0x20a42f['id'],'appCode':_0x20a42f[_0x5b9ac0(0xbc)],'configName':_0x5ed855[_0x5b9ac0(0xfd)]??_0x20a42f[_0x5b9ac0(0xfd)],'channelType':_0x5ed855[_0x5b9ac0(0xc7)]??_0x20a42f[_0x5b9ac0(0xc7)],'endpointUrl':hasOwn(_0x5ed855,_0x5b9ac0(0xef))?_0x5ed855['endpointUrl']:_0x20a42f['endpointUrlRaw'],'channelConfig':hasOwn(_0x5ed855,_0x5b9ac0(0xd5))?serializeChannelConfig(_0x5ed855[_0x5b9ac0(0xd5)]):_0x20a42f[_0x5b9ac0(0xd4)],'description':hasOwn(_0x5ed855,_0x5b9ac0(0x10d))?_0x5ed855[_0x5b9ac0(0x10d)]:_0x20a42f[_0x5b9ac0(0x10d)],'connectTimeout':hasOwn(_0x5ed855,'connectTimeout')?_0x5ed855[_0x5b9ac0(0xe3)]:_0x20a42f[_0x5b9ac0(0xe3)],'readTimeout':hasOwn(_0x5ed855,_0x5b9ac0(0x109))?_0x5ed855[_0x5b9ac0(0x109)]:_0x20a42f[_0x5b9ac0(0x109)]};}export function plannedUpdateProjection(_0x2d6464,_0x4ec200){const _0x1999e3=a157_0x37a4f8;return projectNotificationConfig({'id':_0x2d6464['id'],'appCode':_0x2d6464[_0x1999e3(0xbc)],'configCode':_0x2d6464[_0x1999e3(0xe5)],'configName':_0x4ec200[_0x1999e3(0xfd)]??_0x2d6464[_0x1999e3(0xfd)],'channelType':_0x4ec200[_0x1999e3(0xc7)]??_0x2d6464['channelType'],'endpointUrl':hasOwn(_0x4ec200,_0x1999e3(0xef))?_0x4ec200[_0x1999e3(0xef)]:_0x2d6464[_0x1999e3(0x10f)],'channelConfig':hasOwn(_0x4ec200,_0x1999e3(0xd5))?_0x4ec200['channelConfig']:_0x2d6464[_0x1999e3(0xd4)],'description':hasOwn(_0x4ec200,_0x1999e3(0x10d))?_0x4ec200[_0x1999e3(0x10d)]:_0x2d6464['description'],'connectTimeout':hasOwn(_0x4ec200,'connectTimeout')?_0x4ec200[_0x1999e3(0xe3)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2d6464[_0x1999e3(0xe3)],'readTimeout':hasOwn(_0x4ec200,_0x1999e3(0x109))?_0x4ec200[_0x1999e3(0x109)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2d6464['readTimeout']});}export function requestedSafeFieldsMatch(_0xaf5a4d,_0x203a6e,_0xd657bf){const _0x2e1575=a157_0x37a4f8,_0x29e9c9=[],_0x7f0c8d=[],_0x411c98=[];for(const _0x4f0fba of[_0x2e1575(0xfd),_0x2e1575(0xc7),'description']){if(!hasOwn(_0xd657bf,_0x4f0fba))continue;_0x411c98[_0x2e1575(0xc4)](_0x4f0fba),_0x29e9c9[_0x2e1575(0xc4)](_0x203a6e[_0x4f0fba]===_0xd657bf[_0x4f0fba]),_0x7f0c8d[_0x2e1575(0xc4)](_0xaf5a4d[_0x4f0fba]!==_0xd657bf[_0x4f0fba]&&_0x203a6e[_0x4f0fba]===_0xd657bf[_0x4f0fba]);}for(const _0x5ca010 of[_0x2e1575(0xe3),_0x2e1575(0x109)]){if(!hasOwn(_0xd657bf,_0x5ca010))continue;const _0x27e2d8=_0xd657bf[_0x5ca010]??(_0x5ca010===_0x2e1575(0xe3)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x411c98[_0x2e1575(0xc4)](_0x5ca010),_0x29e9c9[_0x2e1575(0xc4)](_0x203a6e[_0x5ca010]===_0x27e2d8),_0x7f0c8d[_0x2e1575(0xc4)](_0xaf5a4d[_0x5ca010]!==_0x27e2d8&&_0x203a6e[_0x5ca010]===_0x27e2d8);}return hasOwn(_0xd657bf,_0x2e1575(0xef))&&_0xd657bf['endpointUrl']===null&&(_0x411c98[_0x2e1575(0xc4)](_0x2e1575(0xfc)),_0x29e9c9[_0x2e1575(0xc4)](_0x203a6e[_0x2e1575(0x10f)]===null||_0x203a6e[_0x2e1575(0x10f)]===''),_0x7f0c8d[_0x2e1575(0xc4)](_0xaf5a4d[_0x2e1575(0x10f)]!==null&&_0xaf5a4d[_0x2e1575(0x10f)]!==''&&(_0x203a6e[_0x2e1575(0x10f)]===null||_0x203a6e[_0x2e1575(0x10f)]===''))),{'allMatch':_0x29e9c9[_0x2e1575(0x132)](Boolean),'provesChange':_0x7f0c8d[_0x2e1575(0xb3)](Boolean),'verifiedFields':_0x411c98};}export function validateNotificationDeleteReadback(_0x1ff2c9,_0x22db7a,_0xc3e318){const _0x456b1b=a157_0x37a4f8;for(const [_0x12d7e0,_0x158d48]of _0x1ff2c9[_0x456b1b(0xde)]()){if(!Number[_0x456b1b(0xe4)](_0x158d48['id'])||_0x158d48['id']<=0x0)throw notificationError(_0x456b1b(0xf5),_0x456b1b(0xb2)+(_0x12d7e0+0x1)+_0x456b1b(0xca));if(_0x158d48[_0x456b1b(0xbc)]!==_0x22db7a)throw notificationError(_0x456b1b(0xf5),_0x456b1b(0xb2)+(_0x12d7e0+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x158d48['channelType']!==_0xc3e318)throw notificationError(_0x456b1b(0xf5),_0x456b1b(0xb2)+(_0x12d7e0+0x1)+_0x456b1b(0x126));}}export function safeApiFailure(_0x2bf42e,_0x101322,_0x45629a){const _0x369184=a157_0x37a4f8;return notificationError('notification_config_'+_0x2bf42e+'_'+(_0x101322===_0x369184(0x115)?'failed':_0x101322+_0x369184(0x12e)),_0x369184(0x127)+_0x2bf42e+'\x20'+_0x101322+_0x369184(0x125),_0x45629a);}export function notificationLookupCommand(_0x318c4b,_0x3dda76){const _0x5d6435=a157_0x37a4f8;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x318c4b+_0x5d6435(0xeb)+_0x3dda76+_0x5d6435(0xce);}function validateNotificationDocument(_0x10aef2,_0x2a39c4){const _0x56934b=a157_0x37a4f8;for(const _0x7d91c6 of Object[_0x56934b(0xd0)](_0x10aef2)){if(FORBIDDEN_IDENTITY_FIELDS[_0x56934b(0x119)](_0x7d91c6))throw notificationError(_0x56934b(0x123),'Notification\x20JSON\x20field\x20\x22'+_0x7d91c6+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x56934b(0x119)](_0x7d91c6))throw notificationError(_0x56934b(0xc2),_0x56934b(0x10b)+_0x7d91c6+'\x22.');}if(_0x2a39c4==='update'&&Object[_0x56934b(0xd0)](_0x10aef2)[_0x56934b(0xbe)]===0x0)throw notificationError(_0x56934b(0xcb),_0x56934b(0x12a));const _0x32bef9={};if(hasOwn(_0x10aef2,_0x56934b(0xfd)))_0x32bef9['configName']=validateRequiredString(_0x10aef2[_0x56934b(0xfd)],_0x56934b(0xfd),0x80);else{if(_0x2a39c4===_0x56934b(0x11a))throw notificationError(_0x56934b(0x101),_0x56934b(0x124)+_0x56934b(0xff));}if(hasOwn(_0x10aef2,'channelType')){if(typeof _0x10aef2[_0x56934b(0xc7)]!==_0x56934b(0xe2))throw invalidFieldType(_0x56934b(0xc7),_0x56934b(0xd7));const _0x5ca6aa=_0x10aef2[_0x56934b(0xc7)][_0x56934b(0x11f)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x56934b(0x102)](_0x5ca6aa))throw notificationError('notification_config_field_invalid',_0x56934b(0xd9),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x32bef9[_0x56934b(0xc7)]=_0x5ca6aa;}else{if(_0x2a39c4===_0x56934b(0x11a))throw notificationError(_0x56934b(0x101),_0x56934b(0x124)+_0x56934b(0xf2));}for(const [_0x47e109,_0x3e9f5f]of[[_0x56934b(0xef),0x200],[_0x56934b(0x10d),0x100]]){if(!hasOwn(_0x10aef2,_0x47e109))continue;const _0x46eb7c=_0x10aef2[_0x47e109];if(_0x46eb7c!==null&&typeof _0x46eb7c!=='string')throw invalidFieldType(_0x47e109,_0x56934b(0xf0));if(typeof _0x46eb7c===_0x56934b(0xe2)&&_0x46eb7c['length']>_0x3e9f5f)throw notificationError(_0x56934b(0xb5),_0x56934b(0x133)+_0x47e109+_0x56934b(0xd6)+_0x3e9f5f+_0x56934b(0xc6));_0x32bef9[_0x47e109]=_0x46eb7c;}if(hasOwn(_0x10aef2,_0x56934b(0xd5))){const _0x4d1bbf=_0x10aef2[_0x56934b(0xd5)];if(_0x4d1bbf===null&&_0x2a39c4===_0x56934b(0x11a))throw invalidFieldType(_0x56934b(0xd5),_0x56934b(0xe0));if(_0x4d1bbf!==null&&!isJsonObject(_0x4d1bbf))throw invalidFieldType('channelConfig',_0x2a39c4===_0x56934b(0xd2)?_0x56934b(0x106):_0x56934b(0xe0));_0x4d1bbf!==null&&validateChannelConfigFields(_0x32bef9['channelType'],_0x4d1bbf),_0x32bef9[_0x56934b(0xd5)]=_0x4d1bbf;}for(const _0x5ed19f of[_0x56934b(0xe3),_0x56934b(0x109)]){if(!hasOwn(_0x10aef2,_0x5ed19f))continue;const _0x333a2e=_0x10aef2[_0x5ed19f];if(_0x333a2e!==null&&(!Number[_0x56934b(0xe4)](_0x333a2e)||_0x333a2e<0x0))throw notificationError('notification_config_field_invalid',_0x56934b(0x133)+_0x5ed19f+_0x56934b(0xee));_0x32bef9[_0x5ed19f]=_0x333a2e;}return _0x32bef9;}function validateRequiredString(_0x53cd78,_0x4b9622,_0x3332be){const _0x523413=a157_0x37a4f8;if(typeof _0x53cd78!==_0x523413(0xe2))throw invalidFieldType(_0x4b9622,_0x523413(0x130));const _0x40eee0=_0x53cd78['trim']();if(!_0x40eee0)throw notificationError(_0x523413(0xb5),_0x523413(0x133)+_0x4b9622+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x40eee0[_0x523413(0xbe)]>_0x3332be)throw notificationError(_0x523413(0xb5),_0x523413(0x133)+_0x4b9622+_0x523413(0xd6)+_0x3332be+_0x523413(0xc6));return _0x40eee0;}function validateChannelConfigFields(_0x5ac20f,_0xfbd027){const _0x33aeb4=a157_0x37a4f8;if(hasOwn(_0xfbd027,_0x33aeb4(0xbb)))throw forbiddenChannelConfigField(_0x33aeb4(0xbb));if(_0x5ac20f===_0x33aeb4(0x129))for(const _0x300df0 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0xfbd027,_0x300df0))throw forbiddenChannelConfigField(_0x300df0);}}function forbiddenChannelConfigField(_0x49d594){const _0x482c35=a157_0x37a4f8;return notificationError('notification_config_channel_field_forbidden',_0x482c35(0xd3)+_0x49d594+_0x482c35(0xf3));}function invalidFieldType(_0x4fdfd7,_0x40877b){const _0x23cf96=a157_0x37a4f8;return notificationError(_0x23cf96(0xb5),_0x23cf96(0x133)+_0x4fdfd7+'\x22\x20must\x20be\x20'+_0x40877b+'.');}function serializeChannelConfig(_0x30ffee){const _0x42d83e=a157_0x37a4f8;return _0x30ffee===null||_0x30ffee===undefined?null:JSON[_0x42d83e(0xdc)](_0x30ffee);}function redactSensitive(_0x1b882f){const _0x1ea55c=a157_0x37a4f8;return _0x1b882f===null||_0x1b882f===undefined||_0x1b882f===''?null:_0x1ea55c(0x131);}function requireResponseString(_0x1f900a,_0x4e8e69,_0x270ea1){const _0x32a5ae=a157_0x37a4f8;if(typeof _0x1f900a!=='string'||_0x1f900a[_0x32a5ae(0x11f)]()==='')throw CliErrors[_0x32a5ae(0x120)](_0x32a5ae(0xed),'Item\x20'+(_0x270ea1+0x1)+_0x32a5ae(0x10c)+_0x4e8e69+'\x22.');return _0x1f900a[_0x32a5ae(0x11f)]();}function requireExactString(_0x4d6880,_0x44e26a,_0x1d16aa){const _0x420240=a157_0x37a4f8;if(typeof _0x4d6880!==_0x420240(0xe2)||_0x4d6880[_0x420240(0x11f)]()==='')throw notificationError(_0x420240(0xf5),_0x420240(0x127)+_0x1d16aa+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x44e26a+'\x22.');return _0x4d6880[_0x420240(0x11f)]();}function responseNullableString(_0x22b343,_0x237a51,_0x4e5098){const _0x467376=a157_0x37a4f8;if(_0x22b343===undefined||_0x22b343===null)return null;if(typeof _0x22b343!==_0x467376(0xe2))throw notificationError('notification_config_response_invalid',_0x467376(0x127)+_0x4e5098+_0x467376(0xe8)+_0x237a51+'\x22.');return _0x22b343;}function responseNullableTimeout(_0x47f6bb,_0x4d1e24,_0x6509fc){const _0x30a3c2=a157_0x37a4f8;if(_0x47f6bb===undefined||_0x47f6bb===null)return null;if(!Number['isSafeInteger'](_0x47f6bb)||_0x47f6bb<0x0)throw notificationError(_0x30a3c2(0xf5),_0x30a3c2(0x127)+_0x6509fc+_0x30a3c2(0xe8)+_0x4d1e24+'\x22.');return _0x47f6bb;}function normalizeNullableString(_0xf73874){return typeof _0xf73874==='string'?_0xf73874:null;}function a157_0xd6b1(_0xd6ac8d,_0x23b785){_0xd6ac8d=_0xd6ac8d-0xb1;const _0x542b82=a157_0x542b();let _0xd6b1ca=_0x542b82[_0xd6ac8d];return _0xd6b1ca;}function isJsonObject(_0x15f47c){const _0x504b16=a157_0x37a4f8;return _0x15f47c!==null&&typeof _0x15f47c===_0x504b16(0x12f)&&!Array[_0x504b16(0xe6)](_0x15f47c);}function hasOwn(_0x5e2f6c,_0x1c74c6){const _0x105e7c=a157_0x37a4f8;return Object[_0x105e7c(0x108)][_0x105e7c(0xfa)]['call'](_0x5e2f6c,_0x1c74c6);}async function readStdin(){const _0x429056=a157_0x37a4f8;let _0x48c78e='';process[_0x429056(0x122)][_0x429056(0x12c)](_0x429056(0x107));for await(const _0x9753ba of process[_0x429056(0x122)])_0x48c78e+=_0x9753ba;return _0x48c78e;}
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_0x71a705=a158_0x50ed;(function(_0x5c4a42,_0x1edebe){const _0x2e6c5d=a158_0x50ed,_0x290a07=_0x5c4a42();while(!![]){try{const _0x52fea1=parseInt(_0x2e6c5d(0x202))/0x1*(-parseInt(_0x2e6c5d(0x21b))/0x2)+-parseInt(_0x2e6c5d(0x214))/0x3+-parseInt(_0x2e6c5d(0x201))/0x4*(-parseInt(_0x2e6c5d(0x208))/0x5)+parseInt(_0x2e6c5d(0x218))/0x6*(-parseInt(_0x2e6c5d(0x21a))/0x7)+-parseInt(_0x2e6c5d(0x1eb))/0x8*(parseInt(_0x2e6c5d(0x212))/0x9)+-parseInt(_0x2e6c5d(0x209))/0xa*(parseInt(_0x2e6c5d(0x1ec))/0xb)+parseInt(_0x2e6c5d(0x20f))/0xc;if(_0x52fea1===_0x1edebe)break;else _0x290a07['push'](_0x290a07['shift']());}catch(_0x5b723c){_0x290a07['push'](_0x290a07['shift']());}}}(a158_0x5696,0x478ea));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a158_0x50ed(_0x6d763d,_0x29353f){_0x6d763d=_0x6d763d-0x1ea;const _0x569614=a158_0x5696();let _0x50ed2a=_0x569614[_0x6d763d];return _0x50ed2a;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice','general',a158_0x71a705(0x206),a158_0x71a705(0x1fe)],SCENE_TO_LEGACY_TYPE={'invoice':a158_0x71a705(0x1f4),'general':a158_0x71a705(0x1fc),'form':a158_0x71a705(0x20b),'idCard':'IdCard'},SCENE_FLAG={'name':a158_0x71a705(0x21e),'type':a158_0x71a705(0x211),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a158_0x71a705(0x1f7),'type':a158_0x71a705(0x211),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':'image-url','type':'string','description':a158_0x71a705(0x1f9)};function normalizeScene(_0x289920){const _0x2e8528=a158_0x71a705,_0x454955=_0x289920[_0x2e8528(0x20e)]()[_0x2e8528(0x21d)]();if(_0x454955==='idcard')return _0x2e8528(0x1fe);if(_0x454955===_0x2e8528(0x20d)||_0x454955===_0x2e8528(0x1f8)||_0x454955==='form')return _0x454955;throw CliErrors['validation'](_0x2e8528(0x1f6)+_0x289920+_0x2e8528(0x1ea)+SUPPORTED_SCENES['join'](',\x20'));}function a158_0x5696(){const _0x5c7466=['7nvMdtv','256axbnXS','filter','toLowerCase','scene','/smartapi/common/queryFileUrl','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','.\x20Supported\x20scenes:\x20','48968tTPjHi','539CguODF','str','imageFile','appCode','toString','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','\x20OCR','imageUrl','Invoice','\x20OCR\x20from\x20URL','Unsupported\x20OCR\x20scene:\x20','image-file','general','Publicly\x20accessible\x20image\x20or\x20file\x20URL','validation','File\x20upload\x20response\x20missing\x20filePath.','General','image-url','idCard','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','read','259964nODDlP','953ERXczV','count','length','path','form','recognize','10RPRChJ','29720qzfvOX','ocr','Table','/smartapi/common/uploadFile','invoice','trim','14253504JLpjsm','/smartapi/ocr/recognize-text?','string','639MfmfzJ','filePath','153492rFjNud','POST','GET','fileUrl','1627854KZqzUl','/smartapi/ocr/recognize-text'];a158_0x5696=function(){return _0x5c7466;};return a158_0x5696();}function selectedInputs(_0x22b1bb){const _0x19f780=a158_0x71a705,_0x4e0699=_0x22b1bb[_0x19f780(0x1ed)](_0x19f780(0x1f7))[_0x19f780(0x20e)](),_0x8fbc42=_0x22b1bb['str'](_0x19f780(0x1fd))['trim']();return{'imageFile':_0x4e0699,'imageUrl':_0x8fbc42,'count':[_0x4e0699,_0x8fbc42][_0x19f780(0x21c)](Boolean)[_0x19f780(0x204)]};}function validateInputSelection(_0x5d8228){const _0x5a07c0=a158_0x71a705,_0x2b55f3=selectedInputs(_0x5d8228);if(_0x2b55f3[_0x5a07c0(0x203)]!==0x1)throw CliErrors[_0x5a07c0(0x1fa)](_0x5a07c0(0x1ff));return _0x2b55f3;}function withScene(_0x5f073d,_0x4b3ae2,_0xcbd815){const _0x405b41=a158_0x71a705;return{..._0x5f073d,'scene':_0x4b3ae2,..._0xcbd815?{'sourceFile':{'fileName':_0xcbd815['fileName'],'filePath':_0xcbd815[_0x405b41(0x213)]}}:{}};}const ocrRecognize={'service':a158_0x71a705(0x20a),'command':a158_0x71a705(0x207),'description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':a158_0x71a705(0x200),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x5a81c3){const _0x59e7c6=a158_0x71a705,_0x153c83=normalizeScene(_0x5a81c3['str']('scene')),_0x36749c=SCENE_TO_LEGACY_TYPE[_0x153c83],_0x81cf26=validateInputSelection(_0x5a81c3);if(_0x81cf26['imageUrl']){const _0x1e68ee=new URLSearchParams({'url':_0x81cf26[_0x59e7c6(0x1f3)],'type':_0x36749c,'appCode':_0x5a81c3['appCode']});return{'method':_0x59e7c6(0x216),'url':_0x59e7c6(0x210)+_0x1e68ee[_0x59e7c6(0x1f0)](),'description':'Preview:\x20recognize\x20'+_0x153c83+_0x59e7c6(0x1f5)};}const _0x260320=requireDevelopmentUploadFile(_0x81cf26['imageFile'],'image-file');return{'method':_0x59e7c6(0x215),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x59e7c6(0x215),'url':_0x59e7c6(0x20c),'body':{'appCode':_0x5a81c3[_0x59e7c6(0x1ef)],'multipart':{'file':_0x260320}}},{'method':_0x59e7c6(0x215),'url':_0x59e7c6(0x21f),'body':{'filePath':_0x59e7c6(0x1f1),'downloadFlag':![]}},{'method':_0x59e7c6(0x216),'url':_0x59e7c6(0x219),'query':{'appCode':_0x5a81c3[_0x59e7c6(0x1ef)],'url':_0x59e7c6(0x220),'type':_0x36749c}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x153c83+_0x59e7c6(0x1f2)};},async 'execute'(_0x2f13b2){const _0x3c78da=a158_0x71a705,_0x39e30e=normalizeScene(_0x2f13b2['str'](_0x3c78da(0x21e))),_0x3e4fe8=SCENE_TO_LEGACY_TYPE[_0x39e30e],_0x43719e=validateInputSelection(_0x2f13b2);if(_0x43719e['imageUrl']){const _0x4f712f=await recognizeDevelopmentOcr(_0x2f13b2[_0x3c78da(0x1ef)],{'url':_0x43719e[_0x3c78da(0x1f3)],'type':_0x3e4fe8});return{'ok':!![],'data':withScene(_0x4f712f,_0x39e30e)};}const _0x5511b7=requireDevelopmentUploadFile(_0x43719e[_0x3c78da(0x1ee)],_0x3c78da(0x1f7)),_0x86a80d=await uploadDevelopmentFile(_0x2f13b2[_0x3c78da(0x1ef)],_0x5511b7[_0x3c78da(0x205)]);if(!_0x86a80d['filePath'])throw CliErrors['apiError'](_0x3c78da(0x1fb));const _0x56b3bf=await queryDevelopmentFileUrl(_0x86a80d[_0x3c78da(0x213)],{'download':![]});if(!_0x56b3bf[_0x3c78da(0x217)])throw CliErrors['apiError']('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x17742c=await recognizeDevelopmentOcr(_0x2f13b2[_0x3c78da(0x1ef)],{'url':_0x56b3bf[_0x3c78da(0x217)],'type':_0x3e4fe8});return{'ok':!![],'data':withScene(_0x17742c,_0x39e30e,_0x86a80d)};}};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_0x3de0a7=a159_0x5288;function a159_0x5288(_0x999df6,_0x57ebc5){_0x999df6=_0x999df6-0x18a;const _0xd47460=a159_0xd474();let _0x5288e4=_0xd47460[_0x999df6];return _0x5288e4;}(function(_0x182fc3,_0x4fcfb7){const _0x2ea586=a159_0x5288,_0x54e509=_0x182fc3();while(!![]){try{const _0x5a9543=-parseInt(_0x2ea586(0x1c4))/0x1+parseInt(_0x2ea586(0x1a8))/0x2+parseInt(_0x2ea586(0x1a1))/0x3+parseInt(_0x2ea586(0x1a0))/0x4*(-parseInt(_0x2ea586(0x193))/0x5)+-parseInt(_0x2ea586(0x1ac))/0x6*(-parseInt(_0x2ea586(0x1cc))/0x7)+-parseInt(_0x2ea586(0x19e))/0x8+parseInt(_0x2ea586(0x1b5))/0x9;if(_0x5a9543===_0x4fcfb7)break;else _0x54e509['push'](_0x54e509['shift']());}catch(_0x150c02){_0x54e509['push'](_0x54e509['shift']());}}}(a159_0xd474,0xea775));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';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_0x3de0a7(0x1a3),a159_0x3de0a7(0x1c9),a159_0x3de0a7(0x19b)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a159_0x3de0a7(0x19a));export const pageCreate={'service':a159_0x3de0a7(0x194),'command':a159_0x3de0a7(0x18e),'description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a159_0x3de0a7(0x1c3),'defaultOutputFormat':a159_0x3de0a7(0x196),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':a159_0x3de0a7(0x1af),'hint':a159_0x3de0a7(0x18a)},{'name':'page-content','message':a159_0x3de0a7(0x1ba),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'name','type':a159_0x3de0a7(0x1c6),'description':a159_0x3de0a7(0x19c)},{'name':a159_0x3de0a7(0x1a9),'type':a159_0x3de0a7(0x18b),'description':a159_0x3de0a7(0x1ae)},{'name':a159_0x3de0a7(0x1b4),'type':'string','description':a159_0x3de0a7(0x1ca),'enum':CUSTOM_PAGE_PATTERNS},{'name':a159_0x3de0a7(0x1c0),'type':a159_0x3de0a7(0x1c6),'description':a159_0x3de0a7(0x1b2)},APPCODE_FLAG],async 'validate'(_0x35f54e){await readValidatedPageSource(_0x35f54e);},async 'dryRun'(_0x422fba){const _0x15a182=a159_0x3de0a7,_0x41e6f1=readInput(_0x422fba,await readValidatedPageSource(_0x422fba));return{'method':_0x15a182(0x190),'url':_0x15a182(0x1b3),'body':{'appCode':_0x41e6f1[_0x15a182(0x1c8)],'pageName':_0x41e6f1[_0x15a182(0x1a6)],..._0x41e6f1[_0x15a182(0x1c5)]!=null?{'parentMenuId':_0x41e6f1['parentMenuId']}:{},'createMenu':_0x41e6f1[_0x15a182(0x1c2)],'codeContent':_0x41e6f1[_0x15a182(0x1c7)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x15a182(0x1ad)](_0x41e6f1[_0x15a182(0x1a6)])+_0x15a182(0x197)};},async 'execute'(_0x31e021){const _0x47246b=a159_0x3de0a7,_0x585c38=readInput(_0x31e021,await readValidatedPageSource(_0x31e021)),_0x15b2e0=await createCustomPage(_0x585c38);if(!Number[_0x47246b(0x19d)](_0x15b2e0[_0x47246b(0x1b8)])||_0x15b2e0[_0x47246b(0x1b8)]<=0x0)throw CliErrors[_0x47246b(0x195)](_0x47246b(0x1bf));const _0x1b8558=buildCustomPageDevelopmentUrl(_0x585c38[_0x47246b(0x1c8)],_0x15b2e0[_0x47246b(0x1bb)]),_0x41438d=buildCustomPageEditUrl(_0x585c38[_0x47246b(0x1c8)],_0x15b2e0['pageId']);return{'ok':!![],'data':{'operation':_0x47246b(0x192),'pageType':'CUSTOM','pagePattern':readPagePattern(_0x31e021),'selector':{'appCode':_0x585c38['appCode'],'pageName':_0x585c38[_0x47246b(0x1a6)]},'before':null,'after':{'pageId':_0x15b2e0[_0x47246b(0x1b8)],'pageName':_0x15b2e0[_0x47246b(0x1a6)],'appCode':_0x15b2e0[_0x47246b(0x1c8)],'version':_0x15b2e0[_0x47246b(0x18d)],'menuId':_0x15b2e0[_0x47246b(0x18c)],'menuPath':_0x15b2e0[_0x47246b(0x1bb)],'files':_0x15b2e0[_0x47246b(0x1c7)]??Object['keys'](_0x585c38[_0x47246b(0x1c7)])},'dryRun':![],'request':_0x585c38,..._0x1b8558?{'pageUrl':_0x1b8558}:{},..._0x41438d?{'editPageUrl':_0x41438d}:{},'warnings':_0x1b8558?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x47246b(0x1a5)+_0x15b2e0['pageId']+'.'};}};function readPagePattern(_0x2cd8ce){const _0x1b83c2=a159_0x3de0a7,_0x570bea=_0x2cd8ce['str'](_0x1b83c2(0x1b4))[_0x1b83c2(0x1a2)](),_0x67dc59=_0x2cd8ce[_0x1b83c2(0x1a4)](_0x1b83c2(0x1c0))['trim']();if(_0x570bea&&_0x67dc59)throw CliErrors[_0x1b83c2(0x19f)](_0x1b83c2(0x191));if(_0x67dc59)return null;if(!_0x570bea)throw CliErrors['validation']('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x1b83c2(0x1bc)](_0x570bea))throw CliErrors[_0x1b83c2(0x19f)](_0x1b83c2(0x1b0));return _0x570bea;}function a159_0xd474(){const _0x2c8c62=['number','menuId','version','create','num','POST','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','page.create','3607820mOLeKT','page','apiError','compress','\x20and\x20its\x20menu\x20entry.','pageName\x20cannot\x20exceed\x20100\x20characters.','isNaN','../../../templates/custom-pages','DASHBOARD','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','isInteger','11210592iaAbFn','validation','4vCHMJk','2361777KAcBhN','trim','BLANK','str','Created\x20Custom\x20Page\x20','pageName','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','334738gQlJck','parent-menu-id','Custom_page_','now','18918RXqbCj','stringify','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','page\x20create\x20does\x20not\x20accept\x20--page-type.','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','object','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','/smartapi/webcode/page/create','page-pattern','17150220PyJylJ','length','keys','pageId','Invalid\x20Custom\x20Page\x20pattern:\x20','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','menuPath','includes','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','Custom\x20Page\x20pattern\x20not\x20found:\x20','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','page-dir','values','createMenu','write','101706sPKBir','parentMenuId','string','files','appCode','ONEPAGE','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','isArray','721emubwd','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.'];a159_0xd474=function(){return _0x2c8c62;};return a159_0xd474();}async function readPageSource(_0x46418b){const _0x36cc33=a159_0x3de0a7,_0x1776af=_0x46418b[_0x36cc33(0x1a4)](_0x36cc33(0x1c0))[_0x36cc33(0x1a2)](),_0x243d7f=readPagePattern(_0x46418b);if(_0x243d7f===null){const _0x1362bf=await readCustomPageDirectory(_0x1776af);if(Object[_0x36cc33(0x1b7)](_0x1362bf)['length']===0x0)throw CliErrors['validation'](_0x36cc33(0x1a7));return _0x1362bf;}let _0x2858aa;try{_0x2858aa=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x243d7f['toLowerCase']()+'.json'),'utf8');}catch{throw CliErrors['validation'](_0x36cc33(0x1be)+_0x243d7f+'.');}let _0xc0e7b;try{_0xc0e7b=JSON['parse'](_0x2858aa);}catch{throw CliErrors[_0x36cc33(0x19f)](_0x36cc33(0x1b9)+_0x243d7f+'.');}if(!_0xc0e7b||typeof _0xc0e7b!==_0x36cc33(0x1b1)||Array[_0x36cc33(0x1cb)](_0xc0e7b)||Object[_0x36cc33(0x1c1)](_0xc0e7b)['some'](_0x23a2f8=>typeof _0x23a2f8!=='string'))throw CliErrors['validation'](_0x36cc33(0x1b9)+_0x243d7f+'.');return _0xc0e7b;}async function readValidatedPageSource(_0x7e7aa1){const _0xb05bfd=await readPageSource(_0x7e7aa1);return await validateCustomPageContent(_0xb05bfd),_0xb05bfd;}function readInput(_0xb99290,_0x446958){const _0x261a54=a159_0x3de0a7,_0x4068ab=_0xb99290[_0x261a54(0x1a4)]('name')[_0x261a54(0x1a2)]()||_0x261a54(0x1aa)+Date[_0x261a54(0x1ab)]();if(_0x4068ab[_0x261a54(0x1b6)]>0x64)throw CliErrors['validation'](_0x261a54(0x198));const _0x578b74=_0xb99290[_0x261a54(0x18f)](_0x261a54(0x1a9),NaN),_0x21b349=!Number[_0x261a54(0x199)](_0x578b74);if(_0x21b349&&(!Number[_0x261a54(0x19d)](_0x578b74)||_0x578b74<=0x0))throw CliErrors[_0x261a54(0x19f)](_0x261a54(0x1bd));return{'appCode':_0xb99290['appCode'],'pageName':_0x4068ab,..._0x21b349?{'parentMenuId':_0x578b74}:{},'createMenu':!![],'files':_0x446958};}
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
- function a160_0x3218(){const _0x3fb095=['read','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','24293478XUcOLu','5438prpCZS','padStart','isNaN','Retrieved\x20Custom\x20Page\x20','28JhNsae','getMonth','appCode','appcode','getHours','page','getFullYear','4705lmybnG','73HyDSWf','1455yrIoFa','compress','getDate','str','988gwXPZB','trim','6786927AgbQzG','Custom\x20Page\x20ID','number','1133456BJboBb','282tAoYha','6935000bqKpSq'];a160_0x3218=function(){return _0x3fb095;};return a160_0x3218();}const a160_0x1cf311=a160_0x352b;function a160_0x352b(_0x310673,_0x5a48e8){_0x310673=_0x310673-0x1ef;const _0x321878=a160_0x3218();let _0x352b5d=_0x321878[_0x310673];return _0x352b5d;}(function(_0x3a7d4b,_0x2808fe){const _0x1a2a09=a160_0x352b,_0x223e6c=_0x3a7d4b();while(!![]){try{const _0x3c0c19=parseInt(_0x1a2a09(0x1f3))/0x1*(parseInt(_0x1a2a09(0x203))/0x2)+parseInt(_0x1a2a09(0x1f4))/0x3*(parseInt(_0x1a2a09(0x1f8))/0x4)+-parseInt(_0x1a2a09(0x1f2))/0x5*(parseInt(_0x1a2a09(0x1fe))/0x6)+parseInt(_0x1a2a09(0x207))/0x7*(-parseInt(_0x1a2a09(0x1fd))/0x8)+-parseInt(_0x1a2a09(0x1fa))/0x9+-parseInt(_0x1a2a09(0x1ff))/0xa+parseInt(_0x1a2a09(0x202))/0xb;if(_0x3c0c19===_0x2808fe)break;else _0x223e6c['push'](_0x223e6c['shift']());}catch(_0x3a3c79){_0x223e6c['push'](_0x223e6c['shift']());}}}(a160_0x3218,0x724fe));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_0x1cf311(0x1f0),'command':'custom-detail','description':a160_0x1cf311(0x201),'risk':a160_0x1cf311(0x200),'defaultOutputFormat':a160_0x1cf311(0x1f5),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a160_0x1cf311(0x1fc),'required':!![],'description':a160_0x1cf311(0x1fb)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2dc60d){readCustomPageId(_0x2dc60d);},async 'execute'(_0x18c90c){const _0xb64ec2=a160_0x1cf311,_0x176d17=readCustomPageId(_0x18c90c),_0x382254=await getCustomPageSource(_0x176d17),{bundle:_0x43296b,createTime:_0x52a5d2,updateTime:_0x59b399,..._0x3cdeaf}=_0x382254,_0x3e9f1d=_0x382254['id']??_0x176d17,_0x1e0bf8=_0x382254[_0xb64ec2(0x209)]?.[_0xb64ec2(0x1f9)]()||_0x18c90c[_0xb64ec2(0x1f7)](_0xb64ec2(0x20a))[_0xb64ec2(0x1f9)](),_0x209580=buildCustomPageRuntimeUrl(_0x1e0bf8,_0x382254['pageCode']),_0x4683cd=buildCustomPageEditUrl(_0x1e0bf8,_0x3e9f1d),_0x12c01f=await resolveCustomPageDevelopmentUrl(_0x1e0bf8,_0x3e9f1d,_0x18c90c['cookie']);return{'ok':!![],'data':{..._0x3cdeaf,..._0x209580?{'runtimePageUrl':_0x209580}:{},..._0x12c01f?{'pageUrl':_0x12c01f}:{},..._0x4683cd?{'editPageUrl':_0x4683cd}:{},..._0x52a5d2==null?{}:{'createTime':formatTime(_0x52a5d2)},..._0x59b399==null?{}:{'updateTime':formatTime(_0x59b399)}},'message':_0xb64ec2(0x206)+_0x176d17+'.'};}};function formatTime(_0x3dc6e9){const _0x8b9aaf=a160_0x1cf311,_0x2d7bcc=new Date(_0x3dc6e9);if(Number[_0x8b9aaf(0x205)](_0x2d7bcc['getTime']()))return String(_0x3dc6e9);const _0x581a14=[_0x2d7bcc[_0x8b9aaf(0x1f1)](),String(_0x2d7bcc[_0x8b9aaf(0x208)]()+0x1)[_0x8b9aaf(0x204)](0x2,'0'),String(_0x2d7bcc[_0x8b9aaf(0x1f6)]())['padStart'](0x2,'0')]['join']('-'),_0x34e142=[String(_0x2d7bcc[_0x8b9aaf(0x1ef)]())['padStart'](0x2,'0'),String(_0x2d7bcc['getMinutes']())[_0x8b9aaf(0x204)](0x2,'0'),String(_0x2d7bcc['getSeconds']())[_0x8b9aaf(0x204)](0x2,'0')]['join'](':');return _0x581a14+'\x20'+_0x34e142;}
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_0x36689d=a161_0x41ad;function a161_0xa78b(){const _0x1e42d3=['read','react','menus','length','1740642xNmwSA','\x20Custom\x20Page(s).','45XwCOAE','1zwYCeA','4OLbLra','compress','712136gtidom','page','114516Votbkr','28UzVnOU','pageId','custom-list','2380550gzFpRc','3432HTsgdo','cookie','appCode','5057915kyecPE','No\x20Custom\x20Pages\x20found.','path','flatMap','4275387EPSPve','type','Found\x20','2561558QTxCmH'];a161_0xa78b=function(){return _0x1e42d3;};return a161_0xa78b();}(function(_0x348b01,_0x3e319d){const _0xcf0769=a161_0x41ad,_0x29c8c9=_0x348b01();while(!![]){try{const _0x49801d=parseInt(_0xcf0769(0xa1))/0x1*(-parseInt(_0xcf0769(0x99))/0x2)+parseInt(_0xcf0769(0xb2))/0x3+-parseInt(_0xcf0769(0xa2))/0x4*(parseInt(_0xcf0769(0xae))/0x5)+parseInt(_0xcf0769(0x9e))/0x6+parseInt(_0xcf0769(0xa7))/0x7*(-parseInt(_0xcf0769(0xa4))/0x8)+-parseInt(_0xcf0769(0xa0))/0x9*(parseInt(_0xcf0769(0xaa))/0xa)+-parseInt(_0xcf0769(0xab))/0xb*(-parseInt(_0xcf0769(0xa6))/0xc);if(_0x49801d===_0x3e319d)break;else _0x29c8c9['push'](_0x29c8c9['shift']());}catch(_0x9cf870){_0x29c8c9['push'](_0x29c8c9['shift']());}}}(a161_0xa78b,0xd07bb));function a161_0x41ad(_0x5e6729,_0x16b740){_0x5e6729=_0x5e6729-0x99;const _0xa78b9b=a161_0xa78b();let _0x41adaf=_0xa78b9b[_0x5e6729];return _0x41adaf;}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_0x36689d(0xa5),'command':a161_0x36689d(0xa9),'description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':a161_0x36689d(0x9a),'defaultOutputFormat':a161_0x36689d(0xa3),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x12ba50){const _0x6cb3b9=a161_0x36689d,_0x4c69b6=(await fetchMenuSnapshot(_0x12ba50[_0x6cb3b9(0xad)],_0x12ba50[_0x6cb3b9(0xac)]))[_0x6cb3b9(0x9c)][_0x6cb3b9(0xb1)](_0xfc49fb=>{const _0x311bb5=_0x6cb3b9;if(_0xfc49fb[_0x311bb5(0xb3)]!==_0x311bb5(0x9b)||_0xfc49fb['pageId']==null)return[];const _0x4ac3e3=buildCustomPageDevelopmentUrl(_0x12ba50[_0x311bb5(0xad)],_0xfc49fb[_0x311bb5(0xb0)]),_0x36c38a=buildCustomPageEditUrl(_0x12ba50['appCode'],_0xfc49fb[_0x311bb5(0xa8)]);return[{'pageId':_0xfc49fb['pageId'],'label':_0xfc49fb['label'],..._0x4ac3e3?{'pageUrl':_0x4ac3e3}:{},..._0x36c38a?{'editPageUrl':_0x36c38a}:{}}];});return{'ok':!![],'data':{'pages':_0x4c69b6},'message':_0x4c69b6[_0x6cb3b9(0x9d)]===0x0?_0x6cb3b9(0xaf):_0x6cb3b9(0xb4)+_0x4c69b6[_0x6cb3b9(0x9d)]+_0x6cb3b9(0x9f)};}};
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_0x2416af=a162_0xebe1;(function(_0x5ea174,_0x29dbdf){const _0x34b769=a162_0xebe1,_0x11d748=_0x5ea174();while(!![]){try{const _0x1d0530=parseInt(_0x34b769(0x110))/0x1*(parseInt(_0x34b769(0x11b))/0x2)+-parseInt(_0x34b769(0x10a))/0x3+-parseInt(_0x34b769(0xff))/0x4*(parseInt(_0x34b769(0xf7))/0x5)+parseInt(_0x34b769(0x107))/0x6*(-parseInt(_0x34b769(0x11d))/0x7)+-parseInt(_0x34b769(0x113))/0x8+-parseInt(_0x34b769(0x11c))/0x9+parseInt(_0x34b769(0x118))/0xa*(parseInt(_0x34b769(0x102))/0xb);if(_0x1d0530===_0x29dbdf)break;else _0x11d748['push'](_0x11d748['shift']());}catch(_0x4f1ed3){_0x11d748['push'](_0x11d748['shift']());}}}(a162_0x4beb,0x4b362));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a162_0xebe1(_0x55fa62,_0x1e005f){_0x55fa62=_0x55fa62-0xf6;const _0x4beb98=a162_0x4beb();let _0xebe1a7=_0x4beb98[_0x55fa62];return _0xebe1a7;}export const pageCustomPublish={'service':a162_0x2416af(0xf8),'command':a162_0x2416af(0xfe),'description':a162_0x2416af(0x104),'risk':a162_0x2416af(0xfb),'defaultOutputFormat':a162_0x2416af(0x10f),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a162_0x2416af(0x10e)},{'name':'remark','type':'string','description':a162_0x2416af(0x111)}],async 'validate'(_0x1d0c20){readCustomPageId(_0x1d0c20);},async 'dryRun'(_0x513c4c){const _0x39c22f=a162_0x2416af,_0x5c3ae2=readInput(_0x513c4c);return{'method':_0x39c22f(0x114),'url':_0x39c22f(0xfa),'body':{'id':_0x5c3ae2[_0x39c22f(0x105)],..._0x5c3ae2[_0x39c22f(0x10b)]?{'remark':_0x5c3ae2[_0x39c22f(0x10b)]}:{}},'description':_0x39c22f(0x112)+_0x5c3ae2[_0x39c22f(0x105)]+'.'};},async 'execute'(_0x54c8b1){const _0x516f9d=a162_0x2416af,_0x24e8d0=readInput(_0x54c8b1);await getCustomPageSource(_0x24e8d0['pageId']);const _0x2805e1=await publishCustomPage(_0x24e8d0);if(!Number[_0x516f9d(0x108)](_0x2805e1)||_0x2805e1!==_0x24e8d0[_0x516f9d(0x105)])throw CliErrors[_0x516f9d(0x115)](_0x516f9d(0x119));const _0x390b61=await getCustomPageSource(_0x24e8d0[_0x516f9d(0x105)]);if(_0x390b61[_0x516f9d(0x11a)]!==_0x516f9d(0x116))throw CliErrors[_0x516f9d(0x115)]('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x390b61[_0x516f9d(0x11a)]??_0x516f9d(0x101))+'.');const _0xfebfe5=_0x390b61[_0x516f9d(0x103)]?.[_0x516f9d(0xf6)](),_0x41145c=buildCustomPageEditUrl(_0xfebfe5,_0x24e8d0[_0x516f9d(0x105)]),_0x1b5c0d=await resolveCustomPageDevelopmentUrl(_0xfebfe5,_0x24e8d0[_0x516f9d(0x105)],_0x54c8b1[_0x516f9d(0x10c)]),_0x2684a8=buildMutationData(_0x24e8d0,!![],_0x1b5c0d,_0x41145c);_0xfebfe5&&!_0x1b5c0d&&_0x2684a8['warnings']['push'](_0x516f9d(0x10d));const _0x40dd17=buildCustomPageRuntimeUrl(_0x390b61[_0x516f9d(0x103)],_0x390b61[_0x516f9d(0x109)]);return _0x40dd17?_0x2684a8[_0x516f9d(0x106)]=_0x40dd17:_0x2684a8[_0x516f9d(0xfc)]['push'](_0x516f9d(0xf9)),{'ok':!![],'data':_0x2684a8,'message':_0x516f9d(0x117)+_0x24e8d0[_0x516f9d(0x105)]+'.'};}};function a162_0x4beb(){const _0x5399a4=['/smartapi/webcode/file/publish','write','warnings','str','custom-publish','248668MkzdvI','page.custom-publish','unknown','3521177sjqFWR','appCode','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','pageId','runtimePageUrl','354BpkAwp','isInteger','pageCode','268416fByAQd','remark','cookie','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Custom\x20Page\x20ID','compress','1InvLfM','Optional\x20publish\x20remark','Would\x20publish\x20Custom\x20Page\x20','1294936oigcUV','POST','apiError','FORMAL','Published\x20Custom\x20Page\x20','50kzGGfR','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','status','208508xwRFiN','4417146efMept','26033nYcpeQ','trim','35aAXYdO','page','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'];a162_0x4beb=function(){return _0x5399a4;};return a162_0x4beb();}function readInput(_0x1d10fd){const _0x2574e5=a162_0x2416af,_0xd19810=readCustomPageId(_0x1d10fd),_0x548f0c=_0x1d10fd[_0x2574e5(0xfd)](_0x2574e5(0x10b))['trim']();return{'pageId':_0xd19810,..._0x548f0c?{'remark':_0x548f0c}:{}};}function buildMutationData(_0x100010,_0x36b3ce=![],_0x5ce413,_0x3f26e9){const _0x72f45d=a162_0x2416af;return{'operation':_0x72f45d(0x100),'selector':{'pageId':_0x100010['pageId']},'before':null,'after':{'pageId':_0x100010[_0x72f45d(0x105)],'status':_0x72f45d(0x116)},'dryRun':!_0x36b3ce,'request':_0x100010,..._0x5ce413?{'pageUrl':_0x5ce413}:{},..._0x3f26e9?{'editPageUrl':_0x3f26e9}:{},'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_0x236e7b=a163_0x2d29;(function(_0x5b5ecd,_0x1e0ef6){const _0x5e4900=a163_0x2d29,_0x337ce5=_0x5b5ecd();while(!![]){try{const _0x5a0b70=-parseInt(_0x5e4900(0xf1))/0x1+parseInt(_0x5e4900(0xfa))/0x2+-parseInt(_0x5e4900(0xed))/0x3*(-parseInt(_0x5e4900(0xf8))/0x4)+parseInt(_0x5e4900(0xef))/0x5*(parseInt(_0x5e4900(0xec))/0x6)+-parseInt(_0x5e4900(0xfb))/0x7*(parseInt(_0x5e4900(0xf4))/0x8)+-parseInt(_0x5e4900(0xf3))/0x9+-parseInt(_0x5e4900(0xee))/0xa*(-parseInt(_0x5e4900(0xf7))/0xb);if(_0x5a0b70===_0x1e0ef6)break;else _0x337ce5['push'](_0x337ce5['shift']());}catch(_0x53d16f){_0x337ce5['push'](_0x337ce5['shift']());}}}(a163_0x5aab,0x295c0));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a163_0x236e7b(0x101)};function trimOptional(_0x5ee83f){return _0x5ee83f?.['trim']()||undefined;}export function buildCustomPageRuntimeUrl(_0x277b6b,_0x415e3d){const _0x106213=trimOptional(_0x277b6b),_0x4a447d=trimOptional(_0x415e3d);if(!_0x106213||!_0x4a447d)return undefined;return getPublishedAppDomain(_0x106213)+'/'+encodeURIComponent(_0x4a447d);}function a163_0x5aab(){const _0x4514f0=['file','44gUnjLO','4LDsVMC','length','491290htCOZT','2429SATdoh','path','react','num','join','message','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','map','pageId','/ide/','1653954CwOJUv','340377PezNjq','80030oLGEUD','5annSpR','validation','270835rUWcFB','menus','168111WLxkBc','4792vtwnuj','isInteger'];a163_0x5aab=function(){return _0x4514f0;};return a163_0x5aab();}export function buildCustomPageDevelopmentUrl(_0x16ecda,_0x45b9c2){const _0x52a6b2=trimOptional(_0x16ecda),_0x2a3ac3=trimOptional(_0x45b9c2);if(!_0x52a6b2||!_0x2a3ac3)return undefined;return getAppBaseUrl(_0x52a6b2)+'/pages/'+encodeURIComponent(_0x2a3ac3);}function a163_0x2d29(_0x5c5ff3,_0x394c7d){_0x5c5ff3=_0x5c5ff3-0xe9;const _0x5aab19=a163_0x5aab();let _0x2d29f6=_0x5aab19[_0x5c5ff3];return _0x2d29f6;}export async function resolveCustomPageDevelopmentUrl(_0x456d5c,_0x19e8bc,_0x556907){const _0x215986=a163_0x236e7b,_0x17c423=trimOptional(_0x456d5c);if(!_0x17c423)return undefined;try{const _0x45233c=(await fetchMenuSnapshot(_0x17c423,_0x556907))[_0x215986(0xf2)]['find'](_0x4e4b3d=>_0x4e4b3d['type']===_0x215986(0xfd)&&_0x4e4b3d[_0x215986(0xea)]===_0x19e8bc);return buildCustomPageDevelopmentUrl(_0x17c423,_0x45233c?.[_0x215986(0xfc)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x258cc0,_0x522a72){const _0x166a27=a163_0x236e7b,_0x57c652=trimOptional(_0x258cc0);if(!_0x57c652)return;const _0x2d2104=trimOptional(String(_0x522a72??''));if(!_0x2d2104)return;return getAppBaseUrl(_0x57c652)+_0x166a27(0xeb)+encodeURIComponent(_0x2d2104);}export async function validateCustomPageContent(_0x235069){const _0xee528c=a163_0x236e7b,_0x36a029=await validateCustomPageSourceFiles(_0x235069);if(_0x36a029[_0xee528c(0xf9)]>0x0)throw CliErrors[_0xee528c(0xf0)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x36a029[_0xee528c(0xe9)](_0x4a6737=>_0x4a6737[_0xee528c(0xf6)]+':\x20'+_0x4a6737[_0xee528c(0x100)])[_0xee528c(0xff)](';\x20'));}export function readCustomPageId(_0x13e144){const _0x2f3469=a163_0x236e7b,_0x4f7f47=_0x13e144[_0x2f3469(0xfe)]('id');if(!Number[_0x2f3469(0xf5)](_0x4f7f47)||_0x4f7f47<=0x0)throw CliErrors[_0x2f3469(0xf0)]('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x4f7f47;}
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_0x29a1(_0x289390,_0x535aaf){_0x289390=_0x289390-0x1ce;const _0x21563f=a164_0x2156();let _0x29a180=_0x21563f[_0x289390];return _0x29a180;}const a164_0x49ac26=a164_0x29a1;(function(_0x15b9ca,_0x4a40e6){const _0x420b97=a164_0x29a1,_0x2e1b2e=_0x15b9ca();while(!![]){try{const _0x420194=parseInt(_0x420b97(0x1d5))/0x1+-parseInt(_0x420b97(0x1e0))/0x2*(-parseInt(_0x420b97(0x1d8))/0x3)+-parseInt(_0x420b97(0x1de))/0x4+-parseInt(_0x420b97(0x1d7))/0x5*(-parseInt(_0x420b97(0x1db))/0x6)+-parseInt(_0x420b97(0x1e3))/0x7+-parseInt(_0x420b97(0x1e2))/0x8*(parseInt(_0x420b97(0x1d6))/0x9)+parseInt(_0x420b97(0x1da))/0xa;if(_0x420194===_0x4a40e6)break;else _0x2e1b2e['push'](_0x2e1b2e['shift']());}catch(_0x1a6bd5){_0x2e1b2e['push'](_0x2e1b2e['shift']());}}}(a164_0x2156,0x40454));import{format}from'prettier';const SOURCE_PARSERS={'.js':'babel','.jsx':a164_0x49ac26(0x1d4),'.ts':'typescript','.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=[a164_0x49ac26(0x1d3),a164_0x49ac26(0x1dc)];function a164_0x2156(){const _0x53dfdf=['1730778VBYOoe','some','filter','map','entries','toLowerCase','.jsx','babel','25477XZDiMw','603weNNno','2277505XCTqQB','450039ydtTlZ','all','3312420KesUeY','6mQQppq','.tsx','endsWith','1051148BKOMtu','message','6jPhzkY','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','58384uxbIPK'];a164_0x2156=function(){return _0x53dfdf;};return a164_0x2156();}export async function validateCustomPageSourceFiles(_0x419d1f){const _0x1b9d46=a164_0x49ac26,_0x36147a=Object[_0x1b9d46(0x1d1)](_0x419d1f)[_0x1b9d46(0x1cf)](([_0x4c226c])=>getParser(_0x4c226c));if(!_0x36147a['some'](([_0x4def76])=>isReactSourceFile(_0x4def76)))return[{'file':'page\x20files','message':_0x1b9d46(0x1e1)}];const _0x52f563=await Promise[_0x1b9d46(0x1d9)](_0x36147a[_0x1b9d46(0x1d0)](async([_0x2e224e,_0x2e10c0])=>{const _0x5ede70=_0x1b9d46;try{return await format(_0x2e10c0,{'parser':getParser(_0x2e224e)}),undefined;}catch(_0x10db6f){return{'file':_0x2e224e,'message':_0x10db6f instanceof Error?_0x10db6f[_0x5ede70(0x1df)]:String(_0x10db6f)};}}));return _0x52f563['filter'](_0x35c499=>_0x35c499!==undefined);}function getParser(_0x1dbb7c){const _0x111195=a164_0x49ac26,_0x5e6e8c=_0x1dbb7c['trim']()['toLowerCase']();return Object[_0x111195(0x1d1)](SOURCE_PARSERS)['find'](([_0x56f1e4])=>_0x5e6e8c[_0x111195(0x1dd)](_0x56f1e4))?.[0x1];}function isReactSourceFile(_0x293a91){const _0x49d6d6=a164_0x49ac26,_0x3ba6c2=_0x293a91['trim']()[_0x49d6d6(0x1d2)]();return CUSTOM_PAGE_EXTENSIONS[_0x49d6d6(0x1ce)](_0x1ae24b=>_0x3ba6c2['endsWith'](_0x1ae24b));}
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_0x2dd1ca=a165_0x3866;(function(_0x2d8134,_0x127770){const _0x2d9f18=a165_0x3866,_0x29da49=_0x2d8134();while(!![]){try{const _0x51825a=parseInt(_0x2d9f18(0x18f))/0x1+parseInt(_0x2d9f18(0x1a5))/0x2*(-parseInt(_0x2d9f18(0x196))/0x3)+parseInt(_0x2d9f18(0x189))/0x4+-parseInt(_0x2d9f18(0x1a6))/0x5+-parseInt(_0x2d9f18(0x19f))/0x6+parseInt(_0x2d9f18(0x19c))/0x7+parseInt(_0x2d9f18(0x18a))/0x8*(-parseInt(_0x2d9f18(0x1a4))/0x9);if(_0x51825a===_0x127770)break;else _0x29da49['push'](_0x29da49['shift']());}catch(_0x78723d){_0x29da49['push'](_0x29da49['shift']());}}}(a165_0x1d52,0x1f62c));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';function a165_0x1d52(){const _0x3c70a1=['pageId','Updated\x20Custom\x20Page\x20','str','write','Custom\x20Page\x20ID','12rQUhth','page','cookie','newVersion','appcode','Directory\x20containing\x20all\x20complete\x20page\x20files','1724618nhBfqH','custom-update','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','414516AEQiBN','pageContent','number','page-dir','trim','63HpOzea','62022zCabpr','666470sUWQZB','compress','828300TrckhM','98216pOiYMh','apiError','/smartapi/webcode/page/update/content','appCode','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','87470sZWUZF','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.'];a165_0x1d52=function(){return _0x3c70a1;};return a165_0x1d52();}import{CliErrors}from'../../../errors.js';function a165_0x3866(_0x1106a3,_0x224e85){_0x1106a3=_0x1106a3-0x189;const _0x1d5243=a165_0x1d52();let _0x3866dd=_0x1d5243[_0x1106a3];return _0x3866dd;}import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a165_0x2dd1ca(0x197),'command':a165_0x2dd1ca(0x19d),'description':'Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','risk':a165_0x2dd1ca(0x194),'defaultOutputFormat':a165_0x2dd1ca(0x1a7),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':'page-content','message':a165_0x2dd1ca(0x190),'hint':a165_0x2dd1ca(0x18e)}],'flags':[{'name':'id','type':a165_0x2dd1ca(0x1a1),'required':!![],'description':a165_0x2dd1ca(0x195)},{'name':a165_0x2dd1ca(0x1a2),'type':'string','required':!![],'description':a165_0x2dd1ca(0x19b)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x485ced){readCustomPageId(_0x485ced),await readValidatedPageContent(_0x485ced);},async 'dryRun'(_0x33a443){const _0x15d791=a165_0x2dd1ca,_0x49d06c=await readInput(_0x33a443);return{'method':'POST','url':_0x15d791(0x18c),'body':{'id':_0x49d06c[_0x15d791(0x191)],'codeContent':_0x49d06c[_0x15d791(0x1a0)]},'description':_0x15d791(0x19e)+_0x49d06c[_0x15d791(0x191)]+'.'};},async 'execute'(_0x4d9320){const _0x5b86a1=a165_0x2dd1ca,_0x2edc3a=await readInput(_0x4d9320),_0x33088b=await updateCustomPageContent({'pageId':_0x2edc3a[_0x5b86a1(0x191)],'pageContent':_0x2edc3a[_0x5b86a1(0x1a0)]});if(!Number['isInteger'](_0x33088b[_0x5b86a1(0x199)])||_0x33088b[_0x5b86a1(0x199)]<=0x0)throw CliErrors[_0x5b86a1(0x18b)]('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x5bcf44=buildCustomPageEditUrl(_0x2edc3a[_0x5b86a1(0x18d)],_0x2edc3a['pageId']),_0x16b264=await resolveCustomPageDevelopmentUrl(_0x2edc3a[_0x5b86a1(0x18d)],_0x2edc3a[_0x5b86a1(0x191)],_0x4d9320[_0x5b86a1(0x198)]);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x2edc3a['appCode'],'pageId':_0x2edc3a[_0x5b86a1(0x191)]},'before':null,'after':{'pageId':_0x33088b[_0x5b86a1(0x191)],'version':_0x33088b[_0x5b86a1(0x199)],'pageContent':_0x2edc3a[_0x5b86a1(0x1a0)]},'dryRun':![],'request':_0x2edc3a,..._0x16b264?{'pageUrl':_0x16b264}:{},..._0x5bcf44?{'editPageUrl':_0x5bcf44}:{},'warnings':_0x16b264?[]:['Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x5b86a1(0x192)+_0x2edc3a['pageId']+'.'};}};async function readInput(_0x4255f0){const _0x25ce0b=a165_0x2dd1ca,_0x2413f6=readCustomPageId(_0x4255f0),_0x39876d=_0x4255f0['str'](_0x25ce0b(0x19a))[_0x25ce0b(0x1a3)]()||(await getCustomPageSource(_0x2413f6))['appCode']?.[_0x25ce0b(0x1a3)]();if(!_0x39876d)throw CliErrors['validation']('Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20'+_0x2413f6+'.');return{'appCode':_0x39876d,'pageId':_0x2413f6,'pageContent':await readValidatedPageContent(_0x4255f0)};}async function readValidatedPageContent(_0x2f7f47){const _0x374d70=a165_0x2dd1ca,_0x51f546=await readCustomPageDirectory(_0x2f7f47[_0x374d70(0x193)](_0x374d70(0x1a2)));return await validateCustomPageContent(_0x51f546),_0x51f546;}
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_0x345736=a166_0x589d;(function(_0x421665,_0x268f96){const _0x4060a5=a166_0x589d,_0x2bb20c=_0x421665();while(!![]){try{const _0x599407=parseInt(_0x4060a5(0x1c0))/0x1*(parseInt(_0x4060a5(0x1bf))/0x2)+-parseInt(_0x4060a5(0x1bc))/0x3+parseInt(_0x4060a5(0x1bd))/0x4*(-parseInt(_0x4060a5(0x1b8))/0x5)+-parseInt(_0x4060a5(0x1b6))/0x6+-parseInt(_0x4060a5(0x1aa))/0x7+parseInt(_0x4060a5(0x1bb))/0x8+parseInt(_0x4060a5(0x1a8))/0x9;if(_0x599407===_0x268f96)break;else _0x2bb20c['push'](_0x2bb20c['shift']());}catch(_0x4f1e54){_0x2bb20c['push'](_0x2bb20c['shift']());}}}(a166_0x334c,0x305b6));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a166_0x334c(){const _0x8922f8=['nextAction','824537DZVGON','appCode','query-data-list-status','alias','code','string','source','/standard-page-status?appCode=','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','read','status','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','151362LNHcQs','name','316035JDqgKI','related-pages-fallback','/smartapi/lovrabet/dataset/','1536624bMQfyU','907731ijCPQu','4PsCyto','data-list-status','240098PboLEr','2hVvMPJ','manualResolutionRequired','compress','GET','2472264iYALbi'];a166_0x334c=function(){return _0x8922f8;};return a166_0x334c();}function a166_0x589d(_0x1d6b06,_0x12dd55){_0x1d6b06=_0x1d6b06-0x1a8;const _0x334ce2=a166_0x334c();let _0x589dc8=_0x334ce2[_0x1d6b06];return _0x589dc8;}export const pageDataListStatus={'service':'page','command':a166_0x345736(0x1be),'description':a166_0x345736(0x1b5),'risk':a166_0x345736(0x1b3),'defaultOutputFormat':a166_0x345736(0x1c2),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a166_0x345736(0x1ad),'type':a166_0x345736(0x1af),'description':a166_0x345736(0x1b2)}],async 'validate'(_0x5e8904){validateDatasetSelector(_0x5e8904);},async 'dryRun'(_0x2fc151){const _0x880beb=a166_0x345736,_0x15aa54=await loadDatasetDetailForPage(_0x2fc151);return{'method':_0x880beb(0x1c3),'url':_0x880beb(0x1ba)+_0x15aa54[_0x880beb(0x1ae)]+_0x880beb(0x1b1)+encodeURIComponent(_0x2fc151[_0x880beb(0x1ab)]),'description':serializeDryRunDescription({'dataset':{'id':_0x15aa54['id'],'code':_0x15aa54[_0x880beb(0x1ae)],'name':_0x15aa54[_0x880beb(0x1b7)]},'action':_0x880beb(0x1ac)})};},async 'execute'(_0x587af0){const _0x4e071a=a166_0x345736,_0x561d47=await loadDatasetDetailForPage(_0x587af0),_0x49adf7=await loadDataListPageStatusForGenerate(_0x587af0,_0x561d47[_0x4e071a(0x1ae)]),_0x4cbe77=getUndeletedRelatedPages(_0x561d47),_0x10c307=assessDataListPageState(_0x561d47['code'],_0x49adf7,{'fallbackUndeletedPages':_0x4cbe77});return{'ok':!![],'data':{'datasetCode':_0x561d47[_0x4e071a(0x1ae)],'precheckSource':_0x49adf7?.[_0x4e071a(0x1b0)]??_0x4e071a(0x1b9),'status':_0x10c307[_0x4e071a(0x1b4)],'manualResolutionRequired':_0x10c307[_0x4e071a(0x1c1)],'nextAction':_0x10c307[_0x4e071a(0x1a9)],'dataListPageStatus':_0x49adf7,'relatedPages':{'total':_0x561d47['relatedPages']['length'],'undeletedCount':_0x4cbe77['length']}}};}};
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
- function a167_0x3b5d(_0x4bfdca,_0x3a22d8){_0x4bfdca=_0x4bfdca-0x18f;const _0x147927=a167_0x1479();let _0x3b5db6=_0x147927[_0x4bfdca];return _0x3b5db6;}const a167_0x427c1c=a167_0x3b5d;(function(_0x39b480,_0x5b5ed1){const _0x3c53d8=a167_0x3b5d,_0x4fce08=_0x39b480();while(!![]){try{const _0x102238=parseInt(_0x3c53d8(0x1a8))/0x1+-parseInt(_0x3c53d8(0x1a7))/0x2+parseInt(_0x3c53d8(0x1b5))/0x3+parseInt(_0x3c53d8(0x1ab))/0x4+-parseInt(_0x3c53d8(0x1b2))/0x5*(parseInt(_0x3c53d8(0x192))/0x6)+parseInt(_0x3c53d8(0x1b8))/0x7*(parseInt(_0x3c53d8(0x1b3))/0x8)+-parseInt(_0x3c53d8(0x18f))/0x9;if(_0x102238===_0x5b5ed1)break;else _0x4fce08['push'](_0x4fce08['shift']());}catch(_0x1a2a08){_0x4fce08['push'](_0x4fce08['shift']());}}}(a167_0x1479,0x85743));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a167_0x1479(){const _0x15b72a=['manualResolutionRequired','related-pages-fallback','page','status','precheck','Reusing\x20an\x20existing\x20generate\x20task','/generate-standard-pages/start','nextAction','number','CRUD_PAGE_SET','apply','dryRun','taskId','write','generate-start','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','string','clientOperationId','name','2010846JiTkoa','894844tFxcPW','code','dataListPageStatus','4015532ezCWjK','appCode','operationId','source','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','currentStep','reused','782120szsbLu','7042984VgghXM','dataset','1929570XzfLiR','DATA_LIST','fieldCount','7KETROS','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','allowGenerate','/smartapi/lovrabet/dataset/','bool','message','SUCCESS','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','PARTIAL_SUCCESS','14016528SujGnL','POST','alias','12rZdWUD','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.'];a167_0x1479=function(){return _0x15b72a;};return a167_0x1479();}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_0x427c1c(0x196),'command':a167_0x427c1c(0x1a2),'description':'Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a167_0x427c1c(0x1a1),'defaultOutputFormat':'compress','rejectedFlags':[{'name':'page-type','message':a167_0x427c1c(0x1b9),'hint':a167_0x427c1c(0x1af)},{'name':'page-pattern','message':a167_0x427c1c(0x193),'hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a167_0x427c1c(0x191),'type':a167_0x427c1c(0x1a4),'description':a167_0x427c1c(0x1a3)},{'name':a167_0x427c1c(0x19e),'type':'boolean','description':a167_0x427c1c(0x1c0)}],async 'validate'(_0x92911d){validateDatasetSelector(_0x92911d);},async 'dryRun'(_0x3997d9){const _0x16e9d6=a167_0x427c1c,_0x29db36=await prepare(_0x3997d9);return{'method':_0x16e9d6(0x190),'url':_0x16e9d6(0x1bc)+_0x29db36[_0x16e9d6(0x1b4)][_0x16e9d6(0x1a9)]+_0x16e9d6(0x19a),'body':{'appCode':_0x3997d9[_0x16e9d6(0x1ac)],'clientOperationId':_0x29db36[_0x16e9d6(0x1a5)]},'description':serializeDryRunDescription({'dataset':{'id':_0x29db36['dataset']['id'],'code':_0x29db36[_0x16e9d6(0x1b4)]['code'],'name':_0x29db36[_0x16e9d6(0x1b4)][_0x16e9d6(0x1a6)],'fieldCount':_0x29db36['dataset'][_0x16e9d6(0x1b7)]},'precheckSource':_0x29db36[_0x16e9d6(0x1aa)]?.['source']??_0x16e9d6(0x195),'action':_0x16e9d6(0x1a2),'clientOperationId':_0x29db36[_0x16e9d6(0x1a5)],'plannedStatus':_0x29db36[_0x16e9d6(0x198)]['status'],'reason':_0x29db36[_0x16e9d6(0x198)][_0x16e9d6(0x1be)]})};},async 'execute'(_0xc96b0f){const _0x282143=a167_0x427c1c;if(!_0xc96b0f[_0x282143(0x1bd)](_0x282143(0x19e))){const _0x293cb5=await pageGenerateStart[_0x282143(0x19f)](_0xc96b0f);return{'ok':!![],'message':_0x282143(0x1ba),'data':_0x293cb5};}const _0x307c47=await prepare(_0xc96b0f);if(!_0x307c47[_0x282143(0x198)][_0x282143(0x1bb)])return{'ok':![],'message':_0x307c47[_0x282143(0x198)][_0x282143(0x1be)],'data':{'datasetCode':_0x307c47['dataset'][_0x282143(0x1a9)],'pageType':_0x282143(0x1b6),'pagePattern':'CRUD_PAGE_SET','clientOperationId':_0x307c47['clientOperationId'],'precheckSource':_0x307c47['dataListPageStatus']?.[_0x282143(0x1ae)]??_0x282143(0x195),'status':_0x307c47['precheck'][_0x282143(0x197)],'manualResolutionRequired':_0x307c47['precheck']['manualResolutionRequired'],'nextAction':_0x307c47[_0x282143(0x198)]['nextAction'],'query':{'command':buildDataListPageStatusQueryCommand(_0x307c47['dataset'][_0x282143(0x1a9)],_0xc96b0f[_0x282143(0x1ac)])},'dataListPageStatus':_0x307c47[_0x282143(0x1aa)]}};const _0x18e65e=await startGenerateDataListPages(_0xc96b0f[_0x282143(0x1ac)],_0x307c47[_0x282143(0x1b4)][_0x282143(0x1a9)],{'clientOperationId':_0x307c47[_0x282143(0x1a5)]}),_0x5c5d5e=_0x18e65e[_0x282143(0x197)]===_0x282143(0x1bf)||_0x18e65e['status']===_0x282143(0x1c1)?await loadDataListPageStatusForGenerate(_0xc96b0f,_0x307c47[_0x282143(0x1b4)]['code']):null,_0x54612b=assessGenerateOperationState(_0x307c47[_0x282143(0x1b4)]['code'],_0x18e65e[_0x282143(0x197)],_0x5c5d5e);return{'ok':!![],'message':_0x18e65e[_0x282143(0x1b1)]?_0x282143(0x199):'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x307c47[_0x282143(0x1b4)][_0x282143(0x1a9)],'appCode':_0xc96b0f[_0x282143(0x1ac)],'pageType':_0x282143(0x1b6),'pagePattern':_0x282143(0x19d),'taskId':_0x18e65e[_0x282143(0x1a0)]??null,'operationId':_0x18e65e[_0x282143(0x1ad)]??null,'clientOperationId':_0x307c47[_0x282143(0x1a5)],'jobStatus':_0x18e65e[_0x282143(0x197)]??null,'progressRate':typeof _0x18e65e['progressRate']===_0x282143(0x19c)?_0x18e65e['progressRate']:null,'currentStep':_0x18e65e[_0x282143(0x1b0)]??null,'reused':_0x18e65e[_0x282143(0x1b1)]===!![],'status':_0x54612b['status'],'manualResolutionRequired':_0x54612b[_0x282143(0x194)],'nextAction':_0x54612b[_0x282143(0x19b)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x307c47[_0x282143(0x1b4)][_0x282143(0x1a9)],{'appCode':_0xc96b0f[_0x282143(0x1ac)],'taskId':_0x18e65e[_0x282143(0x1a0)],'operationId':_0x18e65e[_0x282143(0x1ad)],'clientOperationId':_0x307c47[_0x282143(0x1a5)]})},'dataListPageStatus':_0x5c5d5e}};}};async function prepare(_0x2b7448){const _0x507f06=a167_0x427c1c,_0x328322=await loadDatasetDetailForPage(_0x2b7448),_0x49723f=await loadDataListPageStatusForGenerate(_0x2b7448,_0x328322[_0x507f06(0x1a9)]),_0x1f6a19=getUndeletedRelatedPages(_0x328322);return{'dataset':_0x328322,'dataListPageStatus':_0x49723f,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x328322[_0x507f06(0x1a9)],_0x49723f,{'fallbackUndeletedPages':_0x1f6a19})};}
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})};}