@lovrabet/rabetbase-cli 2.5.4 → 2.5.5-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/detail.js +1 -1
  77. package/lib/commands/dataset/extend-update.js +1 -1
  78. package/lib/commands/dataset/field-restore.js +1 -1
  79. package/lib/commands/dataset/field-update.js +1 -1
  80. package/lib/commands/dataset/generate.js +1 -1
  81. package/lib/commands/dataset/index.js +1 -1
  82. package/lib/commands/dataset/list.js +1 -1
  83. package/lib/commands/dataset/operations.js +1 -1
  84. package/lib/commands/dataset/relation-audit.js +1 -1
  85. package/lib/commands/dataset/relation-create.js +1 -1
  86. package/lib/commands/dataset/relation-delete.js +1 -1
  87. package/lib/commands/dataset/relation-shared.js +1 -1
  88. package/lib/commands/dataset/relation-update.js +1 -1
  89. package/lib/commands/dataset/relations.js +1 -1
  90. package/lib/commands/dataset/rename.js +1 -1
  91. package/lib/commands/dataset/restore.js +1 -1
  92. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  93. package/lib/commands/db/analysis-batching.js +1 -1
  94. package/lib/commands/db/analyze-batch-plan.js +1 -1
  95. package/lib/commands/db/analyze-cancel.js +1 -1
  96. package/lib/commands/db/analyze-start.js +1 -1
  97. package/lib/commands/db/analyze-status.js +1 -1
  98. package/lib/commands/db/create.js +1 -1
  99. package/lib/commands/db/delete.js +1 -1
  100. package/lib/commands/db/detail.js +1 -1
  101. package/lib/commands/db/diff-refresh-start.js +1 -1
  102. package/lib/commands/db/diff-refresh-status.js +1 -1
  103. package/lib/commands/db/diff.js +1 -1
  104. package/lib/commands/db/index.js +1 -1
  105. package/lib/commands/db/list.js +1 -1
  106. package/lib/commands/db/shared.js +1 -1
  107. package/lib/commands/db/table-diff-shared.js +1 -1
  108. package/lib/commands/db/tables.js +1 -1
  109. package/lib/commands/db/test.js +1 -1
  110. package/lib/commands/db/update.js +1 -1
  111. package/lib/commands/deployment/index.js +1 -1
  112. package/lib/commands/deployment/sync-all.js +1 -1
  113. package/lib/commands/deployment/sync-jobs.js +1 -1
  114. package/lib/commands/deployment/sync-status.js +1 -1
  115. package/lib/commands/doctor.js +1 -1
  116. package/lib/commands/file/index.js +1 -1
  117. package/lib/commands/flow/create.js +1 -1
  118. package/lib/commands/flow/detail.js +1 -1
  119. package/lib/commands/flow/index.js +1 -1
  120. package/lib/commands/flow/list.js +1 -1
  121. package/lib/commands/flow/publish.js +1 -1
  122. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  123. package/lib/commands/flow/runtime-role-list.js +1 -1
  124. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  125. package/lib/commands/flow/runtime-user-search.js +1 -1
  126. package/lib/commands/flow/shared.js +1 -1
  127. package/lib/commands/flow/update.js +1 -1
  128. package/lib/commands/flow/validate.js +1 -1
  129. package/lib/commands/instant-api-policy/current.js +1 -1
  130. package/lib/commands/instant-api-policy/index.js +1 -1
  131. package/lib/commands/instant-api-policy/init.js +1 -1
  132. package/lib/commands/instant-api-policy/publish.js +1 -1
  133. package/lib/commands/instant-api-policy/pull.js +1 -1
  134. package/lib/commands/instant-api-policy/revision.js +1 -1
  135. package/lib/commands/instant-api-policy/revisions.js +1 -1
  136. package/lib/commands/instant-api-policy/rollback.js +1 -1
  137. package/lib/commands/instant-api-policy/shared.js +1 -1
  138. package/lib/commands/instant-api-policy/validate.js +1 -1
  139. package/lib/commands/issue/index.js +1 -1
  140. package/lib/commands/issue/nudge.js +1 -1
  141. package/lib/commands/issue/report.js +1 -1
  142. package/lib/commands/issue/shared.js +1 -1
  143. package/lib/commands/kb/create.js +1 -1
  144. package/lib/commands/kb/delete.js +1 -1
  145. package/lib/commands/kb/detail.js +1 -1
  146. package/lib/commands/kb/index.js +1 -1
  147. package/lib/commands/kb/list.js +1 -1
  148. package/lib/commands/kb/search.js +1 -1
  149. package/lib/commands/kb/shared.js +1 -1
  150. package/lib/commands/kb/update.js +1 -1
  151. package/lib/commands/logs/index.js +1 -1
  152. package/lib/commands/menu/asset-update.js +1 -1
  153. package/lib/commands/menu/delete.js +1 -1
  154. package/lib/commands/menu/external-link-create.js +1 -1
  155. package/lib/commands/menu/external-link-update.js +1 -1
  156. package/lib/commands/menu/group-create.js +1 -1
  157. package/lib/commands/menu/group-update.js +1 -1
  158. package/lib/commands/menu/index.js +1 -1
  159. package/lib/commands/menu/list.js +1 -1
  160. package/lib/commands/menu/move.js +1 -1
  161. package/lib/commands/menu/regroup-start.js +1 -1
  162. package/lib/commands/menu/rename.js +1 -1
  163. package/lib/commands/menu/shared/compare-table.js +1 -1
  164. package/lib/commands/menu/shared/delete-plan.js +1 -1
  165. package/lib/commands/menu/shared/facts.js +1 -1
  166. package/lib/commands/menu/shared/index.js +1 -1
  167. package/lib/commands/menu/shared/inquirer.js +1 -1
  168. package/lib/commands/menu/shared/local-pages.js +1 -1
  169. package/lib/commands/menu/shared/logic.js +1 -1
  170. package/lib/commands/menu/shared/mutations.js +1 -1
  171. package/lib/commands/menu/shared/path.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  174. package/lib/commands/menu/shared/sync-core.js +1 -1
  175. package/lib/commands/menu/shared/update-core.js +1 -1
  176. package/lib/commands/menu/shared/valid-url.js +1 -1
  177. package/lib/commands/menu/subapp-assets-status.js +1 -1
  178. package/lib/commands/menu/subapp-assets-update.js +1 -1
  179. package/lib/commands/menu/sync.js +1 -1
  180. package/lib/commands/menu/visibility-update.js +1 -1
  181. package/lib/commands/notification/config-create.js +1 -1
  182. package/lib/commands/notification/config-delete.js +1 -1
  183. package/lib/commands/notification/config-list.js +1 -1
  184. package/lib/commands/notification/config-update.js +1 -1
  185. package/lib/commands/notification/index.js +1 -1
  186. package/lib/commands/notification/shared.js +1 -1
  187. package/lib/commands/ocr/index.js +1 -1
  188. package/lib/commands/page/create.js +1 -1
  189. package/lib/commands/page/custom/detail.js +1 -1
  190. package/lib/commands/page/custom/list.js +1 -1
  191. package/lib/commands/page/custom/publish.js +1 -1
  192. package/lib/commands/page/custom/shared.js +1 -1
  193. package/lib/commands/page/custom/syntax.js +1 -1
  194. package/lib/commands/page/custom/update.js +1 -1
  195. package/lib/commands/page/data-list-status.js +1 -1
  196. package/lib/commands/page/generate-start.js +1 -1
  197. package/lib/commands/page/generate-status.js +1 -1
  198. package/lib/commands/page/index.js +1 -1
  199. package/lib/commands/page/pull.js +1 -1
  200. package/lib/commands/page/push.js +1 -1
  201. package/lib/commands/page/relation-audit.js +1 -1
  202. package/lib/commands/page/restore.js +1 -1
  203. package/lib/commands/page/shared.js +1 -1
  204. package/lib/commands/page/sync.js +1 -1
  205. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  206. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  207. package/lib/commands/project/create/format-elapsed.js +1 -1
  208. package/lib/commands/project/create/main.js +1 -1
  209. package/lib/commands/project/create/materialize-project-template.js +1 -1
  210. package/lib/commands/project/create/project-name.js +1 -1
  211. package/lib/commands/project/create/project-template-archive.js +1 -1
  212. package/lib/commands/project/create/project-template-path.js +1 -1
  213. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  214. package/lib/commands/project/create/use-format-code.js +1 -1
  215. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  216. package/lib/commands/project/domain-routing-sync.js +1 -1
  217. package/lib/commands/project/index.js +1 -1
  218. package/lib/commands/project/upgrade.js +1 -1
  219. package/lib/commands/registry.js +1 -1
  220. package/lib/commands/role/delete.js +1 -1
  221. package/lib/commands/role/detail.js +1 -1
  222. package/lib/commands/role/index.js +1 -1
  223. package/lib/commands/role/list.js +1 -1
  224. package/lib/commands/role/shared.js +1 -1
  225. package/lib/commands/role/update.js +1 -1
  226. package/lib/commands/role/user-add.js +1 -1
  227. package/lib/commands/role/user-remove.js +1 -1
  228. package/lib/commands/role/user-resolve.js +1 -1
  229. package/lib/commands/rule/get.js +1 -1
  230. package/lib/commands/rule/index.js +1 -1
  231. package/lib/commands/rule/list.js +1 -1
  232. package/lib/commands/rule/set.js +1 -1
  233. package/lib/commands/rule/shared.js +1 -1
  234. package/lib/commands/run/index.js +1 -1
  235. package/lib/commands/schema.js +1 -1
  236. package/lib/commands/sql/create.js +1 -1
  237. package/lib/commands/sql/delete.js +1 -1
  238. package/lib/commands/sql/detail.js +1 -1
  239. package/lib/commands/sql/exec.js +1 -1
  240. package/lib/commands/sql/index.js +1 -1
  241. package/lib/commands/sql/list.js +1 -1
  242. package/lib/commands/sql/pull.js +1 -1
  243. package/lib/commands/sql/push.js +1 -1
  244. package/lib/commands/sql/shared.js +1 -1
  245. package/lib/commands/sql/status.js +1 -1
  246. package/lib/commands/sql/validate.js +1 -1
  247. package/lib/commands/task/index.js +1 -1
  248. package/lib/commands/task/status.js +1 -1
  249. package/lib/commands/tenant/index.js +1 -1
  250. package/lib/commands/tenant/members-list.js +1 -1
  251. package/lib/commands/tenant/shared.js +1 -1
  252. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  253. package/lib/commands/user-account/feishu-bind.js +1 -1
  254. package/lib/commands/user-account/index.js +1 -1
  255. package/lib/commands/workspace/add.js +1 -1
  256. package/lib/commands/workspace/index.js +1 -1
  257. package/lib/commands/workspace/remove.js +1 -1
  258. package/lib/config/domain-config.js +1 -1
  259. package/lib/config/project-domain-routing.js +1 -1
  260. package/lib/config/region-config.js +1 -1
  261. package/lib/config/schema.js +1 -1
  262. package/lib/constant/cdn.js +1 -1
  263. package/lib/constant/cli.js +1 -1
  264. package/lib/constant/defaults.js +1 -1
  265. package/lib/constant/domain.js +1 -1
  266. package/lib/constant/env.js +1 -1
  267. package/lib/constant/output.js +1 -1
  268. package/lib/constant/paths.js +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.js +1 -1
  272. package/lib/context/app-resolver.js +1 -1
  273. package/lib/context/auth-resolver.js +1 -1
  274. package/lib/context/config-loader.js +1 -1
  275. package/lib/context.js +1 -1
  276. package/lib/core/alias-resolver.js +1 -1
  277. package/lib/core/api-client.js +1 -1
  278. package/lib/core/bff/config.js +1 -1
  279. package/lib/core/bff/file-system.js +1 -1
  280. package/lib/core/bff/hash.js +1 -1
  281. package/lib/core/bff/hook-directory.js +1 -1
  282. package/lib/core/bff/lock.js +1 -1
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/cross-db-relation.js +1 -1
  285. package/lib/core/db-resolver.js +1 -1
  286. package/lib/core/flow-config.js +1 -1
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +2 -1
  357. package/skills/rabetbase/SKILL.md +1 -1
  358. package/skills/rabetbase-page-generation/SKILL.md +35 -0
  359. package/skills/rabetbase-page-generation/references/component-baseline.md +18 -0
  360. package/skills/rabetbase-page-generation/references/generation.md +77 -0
  361. package/skills/rabetbase-page-generation/templates/onepage/build.mjs +63 -0
  362. package/skills/rabetbase-page-generation/templates/onepage/create/README.md +20 -0
  363. package/skills/rabetbase-page-generation/templates/onepage/create/index.jsx +4 -0
  364. package/skills/rabetbase-page-generation/templates/onepage/create/preview.png +0 -0
  365. package/skills/rabetbase-page-generation/templates/onepage/detail/README.md +20 -0
  366. package/skills/rabetbase-page-generation/templates/onepage/detail/index.jsx +194 -0
  367. package/skills/rabetbase-page-generation/templates/onepage/detail/preview.png +0 -0
  368. package/skills/rabetbase-page-generation/templates/onepage/list/README.md +20 -0
  369. package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +717 -0
  370. package/skills/rabetbase-page-generation/templates/onepage/list/preview.png +0 -0
  371. package/skills/rabetbase-page-generation/templates/onepage/shared/editor.jsx +395 -0
  372. package/skills/rabetbase-page-generation/templates/onepage/shared/model.js +141 -0
  373. package/skills/rabetbase-page-generation/templates/onepage/shared/page.css +377 -0
  374. package/skills/rabetbase-page-generation/templates/onepage/shared/record-layout.jsx +90 -0
  375. package/skills/rabetbase-page-generation/templates/onepage/shared/responsive.jsx +70 -0
  376. package/skills/rabetbase-page-generation/templates/onepage/update/README.md +21 -0
  377. package/skills/rabetbase-page-generation/templates/onepage/update/index.jsx +4 -0
  378. package/skills/rabetbase-page-generation/templates/onepage/update/preview.png +0 -0
  379. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x2cc0c5,_0x51f48d){const _0x1ab38a=a272_0x3eb8,_0x4e97b7=_0x2cc0c5();while(!![]){try{const _0x50b1df=parseInt(_0x1ab38a(0xc3))/0x1*(-parseInt(_0x1ab38a(0xd4))/0x2)+-parseInt(_0x1ab38a(0xec))/0x3*(-parseInt(_0x1ab38a(0xc4))/0x4)+-parseInt(_0x1ab38a(0xd1))/0x5*(parseInt(_0x1ab38a(0xed))/0x6)+-parseInt(_0x1ab38a(0xe7))/0x7*(parseInt(_0x1ab38a(0xe6))/0x8)+parseInt(_0x1ab38a(0xda))/0x9+parseInt(_0x1ab38a(0xd6))/0xa*(parseInt(_0x1ab38a(0xeb))/0xb)+parseInt(_0x1ab38a(0xc9))/0xc*(parseInt(_0x1ab38a(0xc7))/0xd);if(_0x50b1df===_0x51f48d)break;else _0x4e97b7['push'](_0x4e97b7['shift']());}catch(_0x3ed814){_0x4e97b7['push'](_0x4e97b7['shift']());}}}(a272_0x52f0,0x5bb33));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';import{DEFAULT_LOVRABET_REGION,normalizeLovrabetRegion}from'../constant/region.js';import{selectConfiguredRegion}from'../config/region-config.js';function stringConfigValue(_0x1673a3){const _0x5db491=a272_0x3eb8;return typeof _0x1673a3===_0x5db491(0xcc)&&_0x1673a3[_0x5db491(0xcb)]()?_0x1673a3['trim']():undefined;}function appProfiles(_0x24ff92){const _0x4fe45a=a272_0x3eb8;return _0x24ff92[_0x4fe45a(0xee)]&&typeof _0x24ff92[_0x4fe45a(0xee)]==='object'?_0x24ff92['apps']:{};}function a272_0x52f0(){const _0x18173a=['apiDir','format','6215697ROLfPv','production','filter','keys','projectPath','cookie','read','riskLevel','write','globalConfig','value','projectConfig','3416MXpnbm','3346kLeHBk','length','object','app','11bhFxec','570378wYGGgr','6JNemhL','apps','accessKey','9HOKrnD','4tCrBga','PAGE_SIZE','pageSize','13KUQcFB','high-risk-write','6735768JtPkgW','source','trim','string','ACCESS_KEY','entries','env','true','2286605EArbKl','defaultApp','region','153246eJXbSo','appcode','2845640xdWjDq','locale'];a272_0x52f0=function(){return _0x18173a;};return a272_0x52f0();}function resolveDefaultAppName(_0x8f3e99){const _0x3f4b7f=a272_0x3eb8,_0x1547d4=stringConfigValue(_0x8f3e99[_0x3f4b7f(0xd2)]);if(_0x1547d4)return _0x1547d4;const _0xee7c8c=Object['keys'](appProfiles(_0x8f3e99));return _0xee7c8c['length']===0x1?_0xee7c8c[0x0]:undefined;}function resolveTopLevelAppCode(_0x5b6b6a){const _0x1439d1=a272_0x3eb8;return stringConfigValue(_0x5b6b6a[_0x1439d1(0xd5)])||stringConfigValue(_0x5b6b6a[_0x1439d1(0xea)]);}function a272_0x3eb8(_0x218c4e,_0x255d71){_0x218c4e=_0x218c4e-0xc3;const _0x52f0d8=a272_0x52f0();let _0x3eb84c=_0x52f0d8[_0x218c4e];return _0x3eb84c;}function normalizeRiskCeiling(_0x199ac2){const _0xe5fd2=a272_0x3eb8;if(_0x199ac2===undefined||_0x199ac2===null)return undefined;if(_0x199ac2===_0xe5fd2(0xe0)||_0x199ac2===_0xe5fd2(0xe2)||_0x199ac2===_0xe5fd2(0xc8))return _0x199ac2;return'read';}function resolveRiskCeiling(..._0x389d63){const _0xe27d70=a272_0x3eb8;let _0x756648;for(const _0xac0856 of _0x389d63){const _0xada713=normalizeRiskCeiling(_0xac0856);_0xada713&&(!_0x756648||riskLevelOrder(_0xada713)<riskLevelOrder(_0x756648))&&(_0x756648=_0xada713);}return _0x756648??DEFAULT_CONFIG_VALUES[_0xe27d70(0xe1)];}export function resolveAppConfig({raw:_0x153b41,flags:_0x31f5be,layers:_0x2820ac,readEnv:_0x1d09e4}){const _0x2ca5b3=a272_0x3eb8,_0x4cd646=_0x2820ac?.[_0x2ca5b3(0xe5)]??{},_0x2c90fd=_0x2820ac?.[_0x2ca5b3(0xe3)]??{},_0x387d39=!!_0x2820ac?.[_0x2ca5b3(0xde)]||Object['keys'](_0x4cd646)[_0x2ca5b3(0xe8)]>0x0,_0x1087c1=!_0x387d39,_0x1e42ec=_0x387d39?resolveDefaultAppName(_0x4cd646):undefined,_0x372c92=_0x1087c1?resolveDefaultAppName(_0x2c90fd):undefined,_0x58ae1d=stringConfigValue(_0x31f5be[_0x2ca5b3(0xea)]),_0x48fbf2=_0x1d09e4('APP'),_0x2bc3f0={};if(_0x153b41[_0x2ca5b3(0xee)]&&typeof _0x153b41[_0x2ca5b3(0xee)]===_0x2ca5b3(0xe9))for(const [_0x52f287,_0x421769]of Object[_0x2ca5b3(0xce)](_0x153b41[_0x2ca5b3(0xee)])){_0x421769&&typeof _0x421769===_0x2ca5b3(0xe9)&&_0x421769[_0x2ca5b3(0xd5)]&&(_0x2bc3f0[_0x52f287]=_0x421769);}const _0x11f7ca=_0x1e42ec||_0x372c92||resolveDefaultAppName(_0x153b41),_0x21acb9=Object[_0x2ca5b3(0xdd)](_0x2bc3f0)[_0x2ca5b3(0xe8)]>0x0,_0x6cd265=_0x58ae1d||_0x1e42ec||_0x48fbf2||_0x372c92||_0x11f7ca||undefined,_0xad51d1=stringConfigValue(_0x31f5be[_0x2ca5b3(0xd5)]),_0x2b4511=_0xad51d1?Object[_0x2ca5b3(0xce)](_0x2bc3f0)[_0x2ca5b3(0xdc)](([,_0x33356e])=>_0x33356e?.[_0x2ca5b3(0xd5)]===_0xad51d1):[],_0x1e2de6=_0x58ae1d&&_0x2bc3f0[_0x58ae1d]?.[_0x2ca5b3(0xd5)]===_0xad51d1?[_0x58ae1d,_0x2bc3f0[_0x58ae1d]]:undefined,_0x17499d=_0x1e2de6??(_0x2b4511['length']===0x1?_0x2b4511[0x0]:undefined),_0x28b01c=_0x17499d?.[0x0],_0x2690ea=_0x17499d?.[0x1],_0x303192=_0xad51d1?_0x28b01c:_0x6cd265;let _0x142687=_0x303192&&_0x2bc3f0[_0x303192]?_0x2bc3f0[_0x303192]:undefined;_0xad51d1&&_0x2690ea&&(_0x142687=_0x2690ea);const _0x25c592=_0xad51d1?_0x2690ea??_0x142687:_0x142687,_0x46d12b=!_0x58ae1d&&!_0x1e42ec&&_0x48fbf2&&_0x303192===_0x48fbf2,_0xabcb44=_0x58ae1d||(_0x46d12b?_0x48fbf2:undefined)||(_0xad51d1?_0x28b01c:undefined),_0x300750=_0x25c592?.['appcode'],_0x5a7871=_0x387d39?resolveTopLevelAppCode(_0x4cd646):undefined,_0x45d0b0=_0x1087c1?resolveTopLevelAppCode(_0x2c90fd):undefined,_0x278fc4=_0x58ae1d||_0x1e42ec?_0x300750:undefined,_0x5a9b51=!_0x58ae1d&&!_0x1e42ec?_0x300750:undefined,_0x17f7b3=_0xad51d1||_0x278fc4||_0x5a7871||_0x5a9b51||_0x45d0b0||undefined,_0x208627=_0x387d39?stringConfigValue(_0x4cd646[_0x2ca5b3(0xcf)]):undefined,_0x244815=_0x1087c1?stringConfigValue(_0x2c90fd[_0x2ca5b3(0xcf)]):undefined,_0x564891=_0x31f5be[_0x2ca5b3(0xcf)]||_0x25c592?.[_0x2ca5b3(0xcf)]||_0x208627||_0x1d09e4('ENV')||_0x244815||_0x153b41[_0x2ca5b3(0xcf)]||DEFAULT_CONFIG_VALUES[_0x2ca5b3(0xcf)],_0x30b2a1=_0x25c592?.[_0x2ca5b3(0xd7)]||_0x153b41['locale']||DEFAULT_CONFIG_VALUES[_0x2ca5b3(0xd7)],_0x4b9feb=_0x1d09e4('COOKIE')||_0x25c592?.[_0x2ca5b3(0xdf)]||_0x153b41[_0x2ca5b3(0xdf)]||undefined,_0x69df25=_0x1d09e4(_0x2ca5b3(0xcd))||_0x25c592?.['accessKey']||_0x153b41[_0x2ca5b3(0xef)]||undefined,_0x4bcfcd=_0x31f5be[_0x2ca5b3(0xd9)]||_0x1d09e4('FORMAT')||_0x25c592?.['format']||_0x153b41['format'],_0x59d1b7=normalizeLegacyOutputFormat(_0x4bcfcd),_0x33a044=_0x1d09e4(_0x2ca5b3(0xc5))||_0x25c592?.[_0x2ca5b3(0xc6)]||_0x153b41['pageSize'],_0x7ffe6e=_0x33a044?Number(_0x33a044)||undefined:undefined,_0x3a3cca=_0x2820ac?[_0x2820ac[_0x2ca5b3(0xe3)][_0x2ca5b3(0xe1)],_0x2820ac[_0x2ca5b3(0xe5)][_0x2ca5b3(0xe1)]]:[_0x153b41[_0x2ca5b3(0xe1)]],_0x432cb5=resolveRiskCeiling(..._0x3a3cca,_0x25c592?.[_0x2ca5b3(0xe1)]),_0x3cbdf3=resolveRiskCeiling(_0x432cb5,_0x1d09e4('RISK_LEVEL')),_0xf33dd3=_0x1d09e4('VERBOSE'),_0x4d5c74=_0xf33dd3==='1'||_0xf33dd3===_0x2ca5b3(0xd0),_0x357aa5=_0x25c592?.['apiDir']||_0x153b41[_0x2ca5b3(0xd8)]||DEFAULT_CONFIG_VALUES['apiDir'],_0x32a3cb=selectConfiguredRegion({'appRegion':_0x25c592?.['region'],'projectRegion':_0x387d39?_0x4cd646[_0x2ca5b3(0xd3)]:undefined,'globalRegion':_0x387d39||_0x1087c1?_0x2c90fd[_0x2ca5b3(0xd3)]:undefined,'mergedRegion':_0x153b41[_0x2ca5b3(0xd3)]}),_0x1f1cfb=normalizeLovrabetRegion(_0x32a3cb['value'])??DEFAULT_LOVRABET_REGION,_0x312a3e=isDaily(normalizeEnv(String(_0x564891)))?'daily':_0x2ca5b3(0xdb);return{'appCode':typeof _0x17f7b3===_0x2ca5b3(0xcc)&&_0x17f7b3[_0x2ca5b3(0xcb)]()?_0x17f7b3[_0x2ca5b3(0xcb)]():undefined,'region':_0x1f1cfb,'regionConfiguredValue':_0x32a3cb[_0x2ca5b3(0xe4)],'regionSource':_0x32a3cb[_0x2ca5b3(0xca)],'env':_0x312a3e,'locale':_0x30b2a1,'cookie':_0x4b9feb,'accessKey':_0x69df25,'format':_0x59d1b7,'pageSize':_0x7ffe6e,'riskLevel':_0x3cbdf3,'verbose':_0x4d5c74,'apiDir':_0x357aa5,'apps':_0x2bc3f0,'defaultApp':_0x11f7ca,'currentApp':_0x21acb9?_0x303192:undefined,'explicitAppName':_0xabcb44};}
1
+ (function(_0x4a3e78,_0x22dbbb){const _0x3b589f=a272_0x1406,_0x4b28eb=_0x4a3e78();while(!![]){try{const _0x5bc0b0=-parseInt(_0x3b589f(0x1c3))/0x1+-parseInt(_0x3b589f(0x1ae))/0x2+-parseInt(_0x3b589f(0x1b7))/0x3+parseInt(_0x3b589f(0x1a2))/0x4+parseInt(_0x3b589f(0x1a8))/0x5+parseInt(_0x3b589f(0x1b5))/0x6*(-parseInt(_0x3b589f(0x1a4))/0x7)+parseInt(_0x3b589f(0x1b4))/0x8*(parseInt(_0x3b589f(0x1cb))/0x9);if(_0x5bc0b0===_0x22dbbb)break;else _0x4b28eb['push'](_0x4b28eb['shift']());}catch(_0x5c3e9c){_0x4b28eb['push'](_0x4b28eb['shift']());}}}(a272_0xf549,0x609e1));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';function a272_0xf549(){const _0x591593=['env','APP','798380HTZiLT','locale','value','trim','write','COOKIE','630376nidIFv','object','globalConfig','source','VERBOSE','string','72NAsLAr','6GErHwf','pageSize','605631iJAmLW','defaultApp','projectPath','riskLevel','cookie','read','ENV','production','daily','apps','length','format','36993RyQlVi','projectConfig','region','ACCESS_KEY','app','PAGE_SIZE','entries','high-risk-write','1193733dXfIuy','appcode','accessKey','keys','apiDir','766404VjhTEm','filter','4166449rFKKsd','RISK_LEVEL'];a272_0xf549=function(){return _0x591593;};return a272_0xf549();}import{DEFAULT_LOVRABET_REGION,normalizeLovrabetRegion}from'../constant/region.js';import{selectConfiguredRegion}from'../config/region-config.js';function stringConfigValue(_0x36bbb7){const _0xb17a21=a272_0x1406;return typeof _0x36bbb7==='string'&&_0x36bbb7[_0xb17a21(0x1ab)]()?_0x36bbb7['trim']():undefined;}function appProfiles(_0x29855c){const _0x12be21=a272_0x1406;return _0x29855c[_0x12be21(0x1c0)]&&typeof _0x29855c['apps']===_0x12be21(0x1af)?_0x29855c[_0x12be21(0x1c0)]:{};}function resolveDefaultAppName(_0x34842b){const _0x3caf62=a272_0x1406,_0x57677b=stringConfigValue(_0x34842b[_0x3caf62(0x1b8)]);if(_0x57677b)return _0x57677b;const _0x52d9d3=Object[_0x3caf62(0x1a0)](appProfiles(_0x34842b));return _0x52d9d3[_0x3caf62(0x1c1)]===0x1?_0x52d9d3[0x0]:undefined;}function resolveTopLevelAppCode(_0x2b0810){const _0x6690cb=a272_0x1406;return stringConfigValue(_0x2b0810['appcode'])||stringConfigValue(_0x2b0810[_0x6690cb(0x1c7)]);}function normalizeRiskCeiling(_0x3bce4c){const _0x7f6f1f=a272_0x1406;if(_0x3bce4c===undefined||_0x3bce4c===null)return undefined;if(_0x3bce4c===_0x7f6f1f(0x1bc)||_0x3bce4c===_0x7f6f1f(0x1ac)||_0x3bce4c===_0x7f6f1f(0x1ca))return _0x3bce4c;return'read';}function a272_0x1406(_0x4d3c85,_0x461285){_0x4d3c85=_0x4d3c85-0x19e;const _0xf54924=a272_0xf549();let _0x140628=_0xf54924[_0x4d3c85];return _0x140628;}function resolveRiskCeiling(..._0x504bf0){const _0x3e166b=a272_0x1406;let _0x14114e;for(const _0xcf6179 of _0x504bf0){const _0x998b79=normalizeRiskCeiling(_0xcf6179);_0x998b79&&(!_0x14114e||riskLevelOrder(_0x998b79)<riskLevelOrder(_0x14114e))&&(_0x14114e=_0x998b79);}return _0x14114e??DEFAULT_CONFIG_VALUES[_0x3e166b(0x1ba)];}export function resolveAppConfig({raw:_0x102b58,flags:_0x3b58be,layers:_0x3de3bb,readEnv:_0x2b940d}){const _0x467de4=a272_0x1406,_0x57fef1=_0x3de3bb?.['projectConfig']??{},_0x2c068e=_0x3de3bb?.[_0x467de4(0x1b0)]??{},_0x5be679=!!_0x3de3bb?.[_0x467de4(0x1b9)]||Object[_0x467de4(0x1a0)](_0x57fef1)[_0x467de4(0x1c1)]>0x0,_0x155a3c=!_0x5be679,_0x47ae1b=_0x5be679?resolveDefaultAppName(_0x57fef1):undefined,_0x90b59e=_0x155a3c?resolveDefaultAppName(_0x2c068e):undefined,_0x10fa7b=stringConfigValue(_0x3b58be[_0x467de4(0x1c7)]),_0x33daed=_0x2b940d(_0x467de4(0x1a7)),_0x29432f={};if(_0x102b58[_0x467de4(0x1c0)]&&typeof _0x102b58['apps']===_0x467de4(0x1af))for(const [_0x1d18f6,_0x47dc81]of Object['entries'](_0x102b58[_0x467de4(0x1c0)])){_0x47dc81&&typeof _0x47dc81===_0x467de4(0x1af)&&_0x47dc81[_0x467de4(0x19e)]&&(_0x29432f[_0x1d18f6]=_0x47dc81);}const _0x3ebd09=_0x47ae1b||_0x90b59e||resolveDefaultAppName(_0x102b58),_0x871e0c=Object[_0x467de4(0x1a0)](_0x29432f)['length']>0x0,_0x31113a=_0x10fa7b||_0x47ae1b||_0x33daed||_0x90b59e||_0x3ebd09||undefined,_0x296a9b=stringConfigValue(_0x3b58be['appcode']),_0x33d3cd=_0x296a9b?Object[_0x467de4(0x1c9)](_0x29432f)[_0x467de4(0x1a3)](([,_0x2efe7a])=>_0x2efe7a?.[_0x467de4(0x19e)]===_0x296a9b):[],_0x6879be=_0x10fa7b&&_0x29432f[_0x10fa7b]?.[_0x467de4(0x19e)]===_0x296a9b?[_0x10fa7b,_0x29432f[_0x10fa7b]]:undefined,_0x1d17cc=_0x6879be??(_0x33d3cd['length']===0x1?_0x33d3cd[0x0]:undefined),_0x148846=_0x1d17cc?.[0x0],_0xb18e4b=_0x1d17cc?.[0x1],_0x51cb3d=_0x296a9b?_0x148846:_0x31113a;let _0x552ec1=_0x51cb3d&&_0x29432f[_0x51cb3d]?_0x29432f[_0x51cb3d]:undefined;_0x296a9b&&_0xb18e4b&&(_0x552ec1=_0xb18e4b);const _0x4ccd95=_0x296a9b?_0xb18e4b??_0x552ec1:_0x552ec1,_0x3bfa93=!_0x10fa7b&&!_0x47ae1b&&_0x33daed&&_0x51cb3d===_0x33daed,_0x70599d=_0x10fa7b||(_0x3bfa93?_0x33daed:undefined)||(_0x296a9b?_0x148846:undefined),_0xf509e3=_0x4ccd95?.[_0x467de4(0x19e)],_0x1aab3d=_0x5be679?resolveTopLevelAppCode(_0x57fef1):undefined,_0x167aa4=_0x155a3c?resolveTopLevelAppCode(_0x2c068e):undefined,_0x49c79e=_0x10fa7b||_0x47ae1b?_0xf509e3:undefined,_0x2e7bb4=!_0x10fa7b&&!_0x47ae1b?_0xf509e3:undefined,_0x15f581=_0x296a9b||_0x49c79e||_0x1aab3d||_0x2e7bb4||_0x167aa4||undefined,_0x1271e9=_0x5be679?stringConfigValue(_0x57fef1[_0x467de4(0x1a6)]):undefined,_0x2342bc=_0x155a3c?stringConfigValue(_0x2c068e[_0x467de4(0x1a6)]):undefined,_0xd2d6e8=_0x3b58be[_0x467de4(0x1a6)]||_0x4ccd95?.[_0x467de4(0x1a6)]||_0x1271e9||_0x2b940d(_0x467de4(0x1bd))||_0x2342bc||_0x102b58[_0x467de4(0x1a6)]||DEFAULT_CONFIG_VALUES[_0x467de4(0x1a6)],_0x2f158a=_0x4ccd95?.['locale']||_0x102b58['locale']||DEFAULT_CONFIG_VALUES[_0x467de4(0x1a9)],_0x348bea=_0x2b940d(_0x467de4(0x1ad))||_0x4ccd95?.[_0x467de4(0x1bb)]||_0x102b58[_0x467de4(0x1bb)]||undefined,_0x232365=_0x2b940d(_0x467de4(0x1c6))||_0x4ccd95?.[_0x467de4(0x19f)]||_0x102b58['accessKey']||undefined,_0x24bbe8=_0x3b58be['format']||_0x2b940d('FORMAT')||_0x4ccd95?.[_0x467de4(0x1c2)]||_0x102b58[_0x467de4(0x1c2)],_0x386d3b=normalizeLegacyOutputFormat(_0x24bbe8),_0xeb9909=_0x2b940d(_0x467de4(0x1c8))||_0x4ccd95?.[_0x467de4(0x1b6)]||_0x102b58['pageSize'],_0x2490f3=_0xeb9909?Number(_0xeb9909)||undefined:undefined,_0x1610e5=_0x3de3bb?[_0x3de3bb['globalConfig'][_0x467de4(0x1ba)],_0x3de3bb[_0x467de4(0x1c4)][_0x467de4(0x1ba)]]:[_0x102b58[_0x467de4(0x1ba)]],_0x155818=resolveRiskCeiling(..._0x1610e5,_0x4ccd95?.[_0x467de4(0x1ba)]),_0xa610df=resolveRiskCeiling(_0x155818,_0x2b940d(_0x467de4(0x1a5))),_0x29854e=_0x2b940d(_0x467de4(0x1b2)),_0x2a7028=_0x29854e==='1'||_0x29854e==='true',_0x3967a0=_0x4ccd95?.[_0x467de4(0x1a1)]||_0x102b58[_0x467de4(0x1a1)]||DEFAULT_CONFIG_VALUES['apiDir'],_0x57bd72=selectConfiguredRegion({'appRegion':_0x4ccd95?.[_0x467de4(0x1c5)],'projectRegion':_0x5be679?_0x57fef1[_0x467de4(0x1c5)]:undefined,'globalRegion':_0x5be679||_0x155a3c?_0x2c068e[_0x467de4(0x1c5)]:undefined,'mergedRegion':_0x102b58[_0x467de4(0x1c5)]}),_0x2bef4d=normalizeLovrabetRegion(_0x57bd72[_0x467de4(0x1aa)])??DEFAULT_LOVRABET_REGION,_0x19410e=isDaily(normalizeEnv(String(_0xd2d6e8)))?_0x467de4(0x1bf):_0x467de4(0x1be);return{'appCode':typeof _0x15f581===_0x467de4(0x1b3)&&_0x15f581[_0x467de4(0x1ab)]()?_0x15f581[_0x467de4(0x1ab)]():undefined,'region':_0x2bef4d,'regionConfiguredValue':_0x57bd72[_0x467de4(0x1aa)],'regionSource':_0x57bd72[_0x467de4(0x1b1)],'env':_0x19410e,'locale':_0x2f158a,'cookie':_0x348bea,'accessKey':_0x232365,'format':_0x386d3b,'pageSize':_0x2490f3,'riskLevel':_0xa610df,'verbose':_0x2a7028,'apiDir':_0x3967a0,'apps':_0x29432f,'defaultApp':_0x3ebd09,'currentApp':_0x871e0c?_0x51cb3d:undefined,'explicitAppName':_0x70599d};}
@@ -1 +1 @@
1
- (function(_0x22dd1e,_0x1c7231){const _0x5883cd=a273_0x31b3,_0xeb0816=_0x22dd1e();while(!![]){try{const _0x1993d5=parseInt(_0x5883cd(0x19d))/0x1*(parseInt(_0x5883cd(0x19c))/0x2)+-parseInt(_0x5883cd(0x19b))/0x3*(-parseInt(_0x5883cd(0x199))/0x4)+parseInt(_0x5883cd(0x195))/0x5+parseInt(_0x5883cd(0x1a0))/0x6+-parseInt(_0x5883cd(0x194))/0x7+-parseInt(_0x5883cd(0x196))/0x8*(-parseInt(_0x5883cd(0x19a))/0x9)+-parseInt(_0x5883cd(0x19e))/0xa;if(_0x1993d5===_0x1c7231)break;else _0xeb0816['push'](_0xeb0816['shift']());}catch(_0x70dc8b){_0xeb0816['push'](_0xeb0816['shift']());}}}(a273_0x3c52,0x953de));function a273_0x31b3(_0x25482f,_0x429fb6){_0x25482f=_0x25482f-0x194;const _0x3c5245=a273_0x3c52();let _0x31b378=_0x3c5245[_0x25482f];return _0x31b378;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';function a273_0x3c52(){const _0x7a77e0=['20604570mQBCLq','../auth/get-cookie.js','4879146CqDCBy','6507900SLrJeI','5645950LWhnQE','128sfeDmI','authRequired','cookie','1468OjVWiP','274788MbJMNl','5208UIPaXY','9788DVPvTh','109RnwnAD'];a273_0x3c52=function(){return _0x7a77e0;};return a273_0x3c52();}export async function buildAuth(_0x1c9661){const _0x1d157a=a273_0x31b3,{getCookie:_0x33c445}=await import(_0x1d157a(0x19f)),_0x9f3a84=_0x1c9661[_0x1d157a(0x198)]||_0x33c445(),_0x5a9584=_0x9f3a84?await getIsSessionValid():![];return{'cookie':_0x9f3a84,'isLoggedIn':_0x5a9584,async 'getOrLogin'(){const _0x44c8f6=_0x1d157a;if(_0x9f3a84&&_0x5a9584)return _0x9f3a84;throw CliErrors[_0x44c8f6(0x197)]();}};}
1
+ (function(_0x35ad0a,_0x2d3335){const _0x58de3d=a273_0x1889,_0x2ce0aa=_0x35ad0a();while(!![]){try{const _0x545350=-parseInt(_0x58de3d(0x160))/0x1+parseInt(_0x58de3d(0x15d))/0x2*(parseInt(_0x58de3d(0x15a))/0x3)+parseInt(_0x58de3d(0x162))/0x4+-parseInt(_0x58de3d(0x15c))/0x5+parseInt(_0x58de3d(0x15f))/0x6*(-parseInt(_0x58de3d(0x161))/0x7)+-parseInt(_0x58de3d(0x157))/0x8+parseInt(_0x58de3d(0x15b))/0x9*(parseInt(_0x58de3d(0x158))/0xa);if(_0x545350===_0x2d3335)break;else _0x2ce0aa['push'](_0x2ce0aa['shift']());}catch(_0x5a2541){_0x2ce0aa['push'](_0x2ce0aa['shift']());}}}(a273_0x3bb9,0x6ee8c));import{getIsSessionValid}from'../auth/is-session-valid.js';function a273_0x1889(_0x5d46c3,_0x1bb6db){_0x5d46c3=_0x5d46c3-0x157;const _0x3bb938=a273_0x3bb9();let _0x18896b=_0x3bb938[_0x5d46c3];return _0x18896b;}import{CliErrors}from'../errors.js';function a273_0x3bb9(){const _0xc502b3=['2007iicshv','14643333DfQsrJ','1902690HjCerP','1082COGTuc','../auth/get-cookie.js','5748TaYmUg','890281eoNUJg','1736lWqYKq','2323172QJQBzn','4856576GuYnwp','10NiVQIs','cookie'];a273_0x3bb9=function(){return _0xc502b3;};return a273_0x3bb9();}export async function buildAuth(_0x56ad81){const _0x47f089=a273_0x1889,{getCookie:_0x57fb7e}=await import(_0x47f089(0x15e)),_0x11202c=_0x56ad81[_0x47f089(0x159)]||_0x57fb7e(),_0x1e79f5=_0x11202c?await getIsSessionValid():![];return{'cookie':_0x11202c,'isLoggedIn':_0x1e79f5,async 'getOrLogin'(){if(_0x11202c&&_0x1e79f5)return _0x11202c;throw CliErrors['authRequired']();}};}
@@ -1 +1 @@
1
- const a274_0x4906f0=a274_0x50b2;(function(_0x515c8d,_0x20cbc0){const _0x16bf3f=a274_0x50b2,_0x3923db=_0x515c8d();while(!![]){try{const _0xabb144=parseInt(_0x16bf3f(0x123))/0x1*(parseInt(_0x16bf3f(0x116))/0x2)+-parseInt(_0x16bf3f(0x11e))/0x3*(parseInt(_0x16bf3f(0x105))/0x4)+-parseInt(_0x16bf3f(0x103))/0x5+-parseInt(_0x16bf3f(0x122))/0x6*(parseInt(_0x16bf3f(0x102))/0x7)+parseInt(_0x16bf3f(0x106))/0x8*(parseInt(_0x16bf3f(0xfb))/0x9)+parseInt(_0x16bf3f(0xfd))/0xa*(parseInt(_0x16bf3f(0x119))/0xb)+-parseInt(_0x16bf3f(0x127))/0xc*(-parseInt(_0x16bf3f(0x101))/0xd);if(_0xabb144===_0x20cbc0)break;else _0x3923db['push'](_0x3923db['shift']());}catch(_0x433d73){_0x3923db['push'](_0x3923db['shift']());}}}(a274_0x4c11,0x871e5));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';function a274_0x50b2(_0x4d357f,_0xa3b4ee){_0x4d357f=_0x4d357f-0xf0;const _0x4c1158=a274_0x4c11();let _0x50b2ab=_0x4c1158[_0x4d357f];return _0x50b2ab;}import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';import{normalizeConfigForWrite}from'../config/schema.js';export const NEW_CONFIG_NAME=a274_0x4906f0(0x126);export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();export function resolveConfigPath(_0x509cae){for(const _0x5613c8 of CONFIG_NAMES){const _0x1909f3=resolve(_0x509cae,_0x5613c8);if(existsSync(_0x1909f3))return _0x1909f3;}return undefined;}export function findProjectRootDirectory(_0x490e7a=process[a274_0x4906f0(0x108)]()){let _0x190e15=resolve(_0x490e7a);const {root:_0x3d9728}=parse(_0x190e15),_0x3c711b=homedir();while(!![]){if(resolveConfigPath(_0x190e15)){if(_0x190e15===_0x3c711b)break;return _0x190e15;}if(_0x190e15===_0x3d9728||_0x190e15===_0x3c711b)break;const _0x22852b=dirname(_0x190e15);if(_0x22852b===_0x190e15)break;_0x190e15=_0x22852b;}return resolve(_0x490e7a);}export function getProjectConfigPath(){const _0x205f85=a274_0x4906f0;return resolveConfigPath(process[_0x205f85(0x108)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x53f990){const _0x2c6bbe=a274_0x4906f0;if(!existsSync(_0x53f990))return{'status':_0x2c6bbe(0xf9)};try{const _0x29f00f=readFileSync(_0x53f990,{'encoding':_0x2c6bbe(0x118)});if(!_0x29f00f?.['trim']())return{'status':_0x2c6bbe(0xf1)};const _0x2d6c3c=JSON['parse'](_0x29f00f);return{'status':'ok','data':_0x2d6c3c};}catch(_0x86d816){return{'status':_0x2c6bbe(0x11b),'message':_0x86d816 instanceof Error?_0x86d816[_0x2c6bbe(0x121)]:String(_0x86d816)};}}function parseCliConfigJsonFile(_0x246390,_0x54d062,_0x3b9896){const _0x1bcc74=a274_0x4906f0,_0x2f5a12=inspectCliConfigJsonFile(_0x246390);if(_0x2f5a12[_0x1bcc74(0x100)]===_0x1bcc74(0xf9)||_0x2f5a12[_0x1bcc74(0x100)]===_0x1bcc74(0xf1))return{};if(_0x2f5a12[_0x1bcc74(0x100)]==='ok')return _0x2f5a12[_0x1bcc74(0x10c)];return _0x54d062===_0x1bcc74(0xf3)&&_0x3b9896&&console[_0x1bcc74(0x11b)](CLI_BIN_NAME+':\x20'+_0x3b9896+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x246390+_0x1bcc74(0x104)+_0x2f5a12[_0x1bcc74(0x121)]),{};}function normalizeLegacyConfigShape(_0x4c0bd1){const _0x4dd686=a274_0x4906f0;if(!_0x4c0bd1||typeof _0x4c0bd1!==_0x4dd686(0x107))return{'config':{},'migrated':![]};const _0xa7cbe4={..._0x4c0bd1},_0x250521=_0xa7cbe4['apps']&&typeof _0xa7cbe4[_0x4dd686(0x128)]===_0x4dd686(0x107)?{..._0xa7cbe4['apps']}:{},_0xa78b74=Object[_0x4dd686(0x11a)](_0x250521)[_0x4dd686(0x11d)],_0x4e5277=_0xa7cbe4['appcode']||_0xa7cbe4[_0x4dd686(0x125)];let _0x5040f9=![];if(_0x4e5277&&_0xa78b74===0x0){const _0x4fb721=typeof _0xa7cbe4['defaultApp']==='string'&&_0xa7cbe4['defaultApp']['trim']()?_0xa7cbe4[_0x4dd686(0x117)]:String(_0x4e5277)['trim']();_0x250521[_0x4fb721]={'appcode':String(_0x4e5277)[_0x4dd686(0x114)](),..._0xa7cbe4[_0x4dd686(0x120)]!=null?{'env':_0xa7cbe4[_0x4dd686(0x120)]}:{},..._0xa7cbe4['apiDir']!=null?{'apiDir':_0xa7cbe4[_0x4dd686(0x109)]}:{},..._0xa7cbe4[_0x4dd686(0xf0)]!=null?{'cookie':_0xa7cbe4[_0x4dd686(0xf0)]}:{},..._0xa7cbe4[_0x4dd686(0xf2)]!=null?{'accessKey':_0xa7cbe4[_0x4dd686(0xf2)]}:{},..._0xa7cbe4['format']!=null?{'format':_0xa7cbe4[_0x4dd686(0xf8)]}:{},..._0xa7cbe4[_0x4dd686(0x11f)]!=null?{'pageSize':_0xa7cbe4[_0x4dd686(0x11f)]}:{},..._0xa7cbe4['riskLevel']!=null?{'riskLevel':_0xa7cbe4[_0x4dd686(0xf5)]}:{},..._0xa7cbe4[_0x4dd686(0x11c)]!=null?{'locale':_0xa7cbe4['locale']}:{}},_0xa7cbe4['apps']=_0x250521,delete _0xa7cbe4['defaultApp'],_0x5040f9=!![];}return(_0x4dd686(0xf6)in _0xa7cbe4||_0x4dd686(0x125)in _0xa7cbe4)&&(delete _0xa7cbe4[_0x4dd686(0xf6)],delete _0xa7cbe4[_0x4dd686(0x125)],_0x5040f9=!![]),{'config':_0xa7cbe4,'migrated':_0x5040f9};}function writeNormalizedConfigIfNeeded(_0x2ddb85,_0x4f7299){const _0x440dde=a274_0x4906f0,_0x566c50=JSON['stringify'](normalizeConfigForWrite(_0x4f7299),null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x2ddb85)===_0x566c50)return;writeConfigFile(_0x2ddb85,_0x4f7299),normalizedWriteCache[_0x440dde(0xff)](_0x2ddb85,_0x566c50);}function parseAndNormalizeConfig(_0x29eba4,_0x5d15a6,_0x2d5363){const _0x4d2837=a274_0x4906f0,_0x411715=parseCliConfigJsonFile(_0x29eba4,_0x5d15a6,_0x2d5363),_0x1428f1=normalizeLegacyConfigShape(_0x411715);if(_0x1428f1[_0x4d2837(0xfe)])try{writeNormalizedConfigIfNeeded(_0x29eba4,_0x1428f1[_0x4d2837(0xf7)]);}catch{}return _0x1428f1[_0x4d2837(0xf7)];}export function loadRawConfigLayers(_0x2e582e){const _0x13253c=a274_0x4906f0;let _0x27ca21={},_0x2eefbb={};const _0x1e7d31=resolveConfigPath(homedir());_0x1e7d31&&(_0x27ca21=parseAndNormalizeConfig(_0x1e7d31,_0x13253c(0xf3),_0x13253c(0x10b)));const _0x377d3b=_0x2e582e??findProjectRootDirectory(),_0x46abb4=resolveConfigPath(_0x377d3b);return _0x46abb4&&(_0x2eefbb=parseAndNormalizeConfig(_0x46abb4,_0x13253c(0xf3),_0x13253c(0x10a))),{'globalPath':_0x1e7d31,'projectPath':_0x46abb4,'globalConfig':_0x27ca21,'projectConfig':_0x2eefbb};}const INHERIT_WHITELIST=['cookie',a274_0x4906f0(0xf2),a274_0x4906f0(0x11c),a274_0x4906f0(0xf8),a274_0x4906f0(0xf5),a274_0x4906f0(0x11f),a274_0x4906f0(0x115),a274_0x4906f0(0xfc),a274_0x4906f0(0x10f),a274_0x4906f0(0xf4),'runtimeDomain',a274_0x4906f0(0x113),a274_0x4906f0(0x10e),a274_0x4906f0(0x112),a274_0x4906f0(0x110),a274_0x4906f0(0x111),'certificateDomain'];export function mergeRawConfigLayers(_0x3ff82e){const _0x18b77f=a274_0x4906f0,{globalConfig:_0x344a5f,projectConfig:_0x2208dc}=_0x3ff82e,_0x387197=!!_0x3ff82e['projectPath']||Object['keys'](_0x2208dc)[_0x18b77f(0x11d)]>0x0;if(!_0x387197)return mergeGlobalOnly(_0x344a5f);return mergeProjectFirst(_0x344a5f,_0x2208dc);}function mergeGlobalOnly(_0xf0978b){const _0x42eb05=a274_0x4906f0,_0x51247f={..._0xf0978b};delete _0x51247f[_0x42eb05(0x124)];const _0x89d405=_0xf0978b[_0x42eb05(0x128)]&&typeof _0xf0978b[_0x42eb05(0x128)]==='object'?_0xf0978b[_0x42eb05(0x128)]:{};if(Object[_0x42eb05(0x11a)](_0x89d405)[_0x42eb05(0x11d)]>0x0)_0x51247f['apps']=_0x89d405;if(_0xf0978b[_0x42eb05(0x117)])_0x51247f[_0x42eb05(0x117)]=_0xf0978b[_0x42eb05(0x117)];return _0x51247f;}function mergeProjectFirst(_0x2fdff2,_0x263697){const _0x228c53=a274_0x4906f0,_0x36e4bf={..._0x263697};delete _0x36e4bf[_0x228c53(0x124)];for(const _0xc2e74b of INHERIT_WHITELIST){!(_0xc2e74b in _0x36e4bf)&&_0xc2e74b in _0x2fdff2&&(_0x36e4bf[_0xc2e74b]=_0x2fdff2[_0xc2e74b]);}const _0x317a87=_0x263697[_0x228c53(0x128)]&&typeof _0x263697[_0x228c53(0x128)]===_0x228c53(0x107)?_0x263697['apps']:{};return Object['keys'](_0x317a87)[_0x228c53(0x11d)]>0x0?_0x36e4bf[_0x228c53(0x128)]=_0x317a87:delete _0x36e4bf[_0x228c53(0x128)],_0x228c53(0x117)in _0x263697?_0x36e4bf[_0x228c53(0x117)]=_0x263697['defaultApp']:delete _0x36e4bf[_0x228c53(0x117)],_0x36e4bf;}export function readRawConfigWithLayers(_0x34fdfc){const _0x1b3cf4=loadRawConfigLayers(_0x34fdfc);return{'config':mergeRawConfigLayers(_0x1b3cf4),'layers':_0x1b3cf4};}export function readRawConfig(_0x4a6c16){return mergeRawConfigLayers(loadRawConfigLayers(_0x4a6c16));}export function readConfigFile(_0x40f4b3){return parseAndNormalizeConfig(_0x40f4b3,'silent');}export function writeConfigFile(_0x293299,_0x287d7a){const _0x22c37c=a274_0x4906f0,_0x4fd475=dirname(_0x293299);!existsSync(_0x4fd475)&&mkdirSync(_0x4fd475,{'recursive':!![]});const _0x14a060=_0x293299+_0x22c37c(0xfa);try{const _0x5734c6=normalizeConfigForWrite(_0x287d7a);writeFileSync(_0x14a060,JSON[_0x22c37c(0x10d)](_0x5734c6,null,0x2)+'\x0a',{'encoding':_0x22c37c(0x118),'mode':0x180}),renameSync(_0x14a060,_0x293299);}catch(_0x52c7c0){try{unlinkSync(_0x14a060);}catch{}throw _0x52c7c0;}}function a274_0x4c11(){const _0x319838=['format','missing','.tmp','333OZloNH','routing','2330vXehee','migrated','set','status','783562nwNUOK','21UfkgmQ','5156150QncTTF','\x0a\x20\x20','4XitCXY','70288DWqxKR','object','cwd','apiDir','Project','Global','data','stringify','kbDomain','userDomain','appDomain','localDomain','kbServiceDomain','skillDomain','trim','region','154CMarfc','defaultApp','utf8','2332JFZfSs','keys','error','locale','length','1784241fzRpdp','pageSize','env','message','576726TbIlTG','12313dQMsCb','inherit','app','.rabetbase.json','228uJgjFq','apps','cookie','empty','accessKey','warn','apiDomain','riskLevel','appcode','config'];a274_0x4c11=function(){return _0x319838;};return a274_0x4c11();}export function resolveWriteConfigPath(_0x4ce145){const _0x41049a=a274_0x4906f0,_0x7f567c=_0x4ce145==='project'?process[_0x41049a(0x108)]():homedir(),_0x3cbbdc=resolveConfigPath(_0x7f567c);return _0x3cbbdc??resolve(_0x7f567c,NEW_CONFIG_NAME);}
1
+ const a274_0x5c758b=a274_0x2519;(function(_0x4d907a,_0x1927d7){const _0x509068=a274_0x2519,_0x50e69a=_0x4d907a();while(!![]){try{const _0x2d9fc3=-parseInt(_0x509068(0x1ed))/0x1*(parseInt(_0x509068(0x1fc))/0x2)+parseInt(_0x509068(0x1fd))/0x3*(-parseInt(_0x509068(0x1c9))/0x4)+parseInt(_0x509068(0x1ef))/0x5+-parseInt(_0x509068(0x1f0))/0x6*(-parseInt(_0x509068(0x1f3))/0x7)+-parseInt(_0x509068(0x1d7))/0x8+parseInt(_0x509068(0x1e3))/0x9*(-parseInt(_0x509068(0x1f4))/0xa)+parseInt(_0x509068(0x1dc))/0xb*(parseInt(_0x509068(0x1eb))/0xc);if(_0x2d9fc3===_0x1927d7)break;else _0x50e69a['push'](_0x50e69a['shift']());}catch(_0x5c285b){_0x50e69a['push'](_0x50e69a['shift']());}}}(a274_0x5af5,0xdfe9e));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';import{normalizeConfigForWrite}from'../config/schema.js';export const NEW_CONFIG_NAME=a274_0x5c758b(0x1cf);export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();export function resolveConfigPath(_0x3cc9bc){for(const _0x3681ca of CONFIG_NAMES){const _0x3b5c1b=resolve(_0x3cc9bc,_0x3681ca);if(existsSync(_0x3b5c1b))return _0x3b5c1b;}return undefined;}export function findProjectRootDirectory(_0x165484=process['cwd']()){let _0x170cc3=resolve(_0x165484);const {root:_0x39ceac}=parse(_0x170cc3),_0x36dbcd=homedir();while(!![]){if(resolveConfigPath(_0x170cc3)){if(_0x170cc3===_0x36dbcd)break;return _0x170cc3;}if(_0x170cc3===_0x39ceac||_0x170cc3===_0x36dbcd)break;const _0xfbfcf0=dirname(_0x170cc3);if(_0xfbfcf0===_0x170cc3)break;_0x170cc3=_0xfbfcf0;}return resolve(_0x165484);}export function getProjectConfigPath(){const _0x2d2524=a274_0x5c758b;return resolveConfigPath(process[_0x2d2524(0x1dd)]());}function a274_0x5af5(){const _0xc07885=['apiDir','stringify','project','empty','12JBJNjQ','locale','1ufEnNL','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','8946765Wahjag','36fTtztH','Project','skillDomain','1404340temVNL','60svVGST','data','silent','migrated','utf8','object','\x0a\x20\x20','apps','3264106duXlPP','3eqbqIF','parse','region','error','app','status','3938636aaEsVG','localDomain','defaultApp','trim','missing','message','.rabetbase.json','set','runtimeDomain','appcode','certificateDomain','format','config','inherit','9660288sjfjbn','length','riskLevel','accessKey','env','37350159FDHZPv','cwd','kbServiceDomain','cookie','pageSize','projectPath','kbDomain','2470716YaNapT','get','keys','warn'];a274_0x5af5=function(){return _0xc07885;};return a274_0x5af5();}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x572cc5){const _0x5b8c89=a274_0x5c758b;if(!existsSync(_0x572cc5))return{'status':_0x5b8c89(0x1cd)};try{const _0x26ca64=readFileSync(_0x572cc5,{'encoding':_0x5b8c89(0x1f8)});if(!_0x26ca64?.[_0x5b8c89(0x1cc)]())return{'status':_0x5b8c89(0x1ea)};const _0x3e6a09=JSON[_0x5b8c89(0x1fe)](_0x26ca64);return{'status':'ok','data':_0x3e6a09};}catch(_0x30e006){return{'status':_0x5b8c89(0x200),'message':_0x30e006 instanceof Error?_0x30e006[_0x5b8c89(0x1ce)]:String(_0x30e006)};}}function parseCliConfigJsonFile(_0x379264,_0xef2ab9,_0x50a7f3){const _0x42b6e5=a274_0x5c758b,_0x3934e5=inspectCliConfigJsonFile(_0x379264);if(_0x3934e5[_0x42b6e5(0x1c8)]===_0x42b6e5(0x1cd)||_0x3934e5[_0x42b6e5(0x1c8)]===_0x42b6e5(0x1ea))return{};if(_0x3934e5[_0x42b6e5(0x1c8)]==='ok')return _0x3934e5[_0x42b6e5(0x1f5)];return _0xef2ab9===_0x42b6e5(0x1e6)&&_0x50a7f3&&console[_0x42b6e5(0x200)](CLI_BIN_NAME+':\x20'+_0x50a7f3+_0x42b6e5(0x1ee)+_0x379264+_0x42b6e5(0x1fa)+_0x3934e5[_0x42b6e5(0x1ce)]),{};}function normalizeLegacyConfigShape(_0x3fc785){const _0x323b39=a274_0x5c758b;if(!_0x3fc785||typeof _0x3fc785!=='object')return{'config':{},'migrated':![]};const _0x57af96={..._0x3fc785},_0x514f74=_0x57af96[_0x323b39(0x1fb)]&&typeof _0x57af96[_0x323b39(0x1fb)]===_0x323b39(0x1f9)?{..._0x57af96[_0x323b39(0x1fb)]}:{},_0x1dae32=Object[_0x323b39(0x1e5)](_0x514f74)[_0x323b39(0x1d8)],_0x4a72cd=_0x57af96[_0x323b39(0x1d2)]||_0x57af96['app'];let _0x25b2b2=![];if(_0x4a72cd&&_0x1dae32===0x0){const _0x5d7f99=typeof _0x57af96[_0x323b39(0x1cb)]==='string'&&_0x57af96['defaultApp'][_0x323b39(0x1cc)]()?_0x57af96[_0x323b39(0x1cb)]:String(_0x4a72cd)[_0x323b39(0x1cc)]();_0x514f74[_0x5d7f99]={'appcode':String(_0x4a72cd)[_0x323b39(0x1cc)](),..._0x57af96[_0x323b39(0x1db)]!=null?{'env':_0x57af96[_0x323b39(0x1db)]}:{},..._0x57af96['apiDir']!=null?{'apiDir':_0x57af96[_0x323b39(0x1e7)]}:{},..._0x57af96['cookie']!=null?{'cookie':_0x57af96[_0x323b39(0x1df)]}:{},..._0x57af96['accessKey']!=null?{'accessKey':_0x57af96['accessKey']}:{},..._0x57af96[_0x323b39(0x1d4)]!=null?{'format':_0x57af96['format']}:{},..._0x57af96[_0x323b39(0x1e0)]!=null?{'pageSize':_0x57af96['pageSize']}:{},..._0x57af96[_0x323b39(0x1d9)]!=null?{'riskLevel':_0x57af96[_0x323b39(0x1d9)]}:{},..._0x57af96[_0x323b39(0x1ec)]!=null?{'locale':_0x57af96['locale']}:{}},_0x57af96[_0x323b39(0x1fb)]=_0x514f74,delete _0x57af96[_0x323b39(0x1cb)],_0x25b2b2=!![];}return('appcode'in _0x57af96||'app'in _0x57af96)&&(delete _0x57af96[_0x323b39(0x1d2)],delete _0x57af96[_0x323b39(0x1c7)],_0x25b2b2=!![]),{'config':_0x57af96,'migrated':_0x25b2b2};}function writeNormalizedConfigIfNeeded(_0x3892ee,_0x21df5a){const _0x9931a3=a274_0x5c758b,_0x5e2693=JSON[_0x9931a3(0x1e8)](normalizeConfigForWrite(_0x21df5a),null,0x2)+'\x0a';if(normalizedWriteCache[_0x9931a3(0x1e4)](_0x3892ee)===_0x5e2693)return;writeConfigFile(_0x3892ee,_0x21df5a),normalizedWriteCache[_0x9931a3(0x1d0)](_0x3892ee,_0x5e2693);}function parseAndNormalizeConfig(_0x465f8d,_0x589a27,_0x2270fc){const _0x82c0c2=a274_0x5c758b,_0x116eea=parseCliConfigJsonFile(_0x465f8d,_0x589a27,_0x2270fc),_0x45bfd1=normalizeLegacyConfigShape(_0x116eea);if(_0x45bfd1[_0x82c0c2(0x1f7)])try{writeNormalizedConfigIfNeeded(_0x465f8d,_0x45bfd1['config']);}catch{}return _0x45bfd1[_0x82c0c2(0x1d5)];}export function loadRawConfigLayers(_0x12f18e){const _0x1de598=a274_0x5c758b;let _0x46b4fc={},_0x45c65a={};const _0x3ecc4b=resolveConfigPath(homedir());_0x3ecc4b&&(_0x46b4fc=parseAndNormalizeConfig(_0x3ecc4b,'warn','Global'));const _0xc77562=_0x12f18e??findProjectRootDirectory(),_0x4cf361=resolveConfigPath(_0xc77562);return _0x4cf361&&(_0x45c65a=parseAndNormalizeConfig(_0x4cf361,_0x1de598(0x1e6),_0x1de598(0x1f1))),{'globalPath':_0x3ecc4b,'projectPath':_0x4cf361,'globalConfig':_0x46b4fc,'projectConfig':_0x45c65a};}function a274_0x2519(_0x339f56,_0x2e9346){_0x339f56=_0x339f56-0x1c7;const _0x5af520=a274_0x5af5();let _0x2519f3=_0x5af520[_0x339f56];return _0x2519f3;}const INHERIT_WHITELIST=[a274_0x5c758b(0x1df),a274_0x5c758b(0x1da),a274_0x5c758b(0x1ec),a274_0x5c758b(0x1d4),a274_0x5c758b(0x1d9),a274_0x5c758b(0x1e0),a274_0x5c758b(0x1ff),'routing','userDomain','apiDomain',a274_0x5c758b(0x1d1),a274_0x5c758b(0x1f2),a274_0x5c758b(0x1e2),a274_0x5c758b(0x1de),'appDomain',a274_0x5c758b(0x1ca),a274_0x5c758b(0x1d3)];export function mergeRawConfigLayers(_0x1ed2d5){const _0x44c9eb=a274_0x5c758b,{globalConfig:_0x5ba158,projectConfig:_0x42b552}=_0x1ed2d5,_0x4b6d18=!!_0x1ed2d5[_0x44c9eb(0x1e1)]||Object[_0x44c9eb(0x1e5)](_0x42b552)[_0x44c9eb(0x1d8)]>0x0;if(!_0x4b6d18)return mergeGlobalOnly(_0x5ba158);return mergeProjectFirst(_0x5ba158,_0x42b552);}function mergeGlobalOnly(_0x537bfc){const _0x441594=a274_0x5c758b,_0x29193a={..._0x537bfc};delete _0x29193a[_0x441594(0x1d6)];const _0x284f10=_0x537bfc[_0x441594(0x1fb)]&&typeof _0x537bfc[_0x441594(0x1fb)]===_0x441594(0x1f9)?_0x537bfc[_0x441594(0x1fb)]:{};if(Object['keys'](_0x284f10)[_0x441594(0x1d8)]>0x0)_0x29193a[_0x441594(0x1fb)]=_0x284f10;if(_0x537bfc[_0x441594(0x1cb)])_0x29193a[_0x441594(0x1cb)]=_0x537bfc[_0x441594(0x1cb)];return _0x29193a;}function mergeProjectFirst(_0x45a102,_0x1a8608){const _0x2ae89c=a274_0x5c758b,_0x4a5d64={..._0x1a8608};delete _0x4a5d64['inherit'];for(const _0x231a61 of INHERIT_WHITELIST){!(_0x231a61 in _0x4a5d64)&&_0x231a61 in _0x45a102&&(_0x4a5d64[_0x231a61]=_0x45a102[_0x231a61]);}const _0x9f8a31=_0x1a8608[_0x2ae89c(0x1fb)]&&typeof _0x1a8608['apps']===_0x2ae89c(0x1f9)?_0x1a8608['apps']:{};return Object[_0x2ae89c(0x1e5)](_0x9f8a31)[_0x2ae89c(0x1d8)]>0x0?_0x4a5d64[_0x2ae89c(0x1fb)]=_0x9f8a31:delete _0x4a5d64[_0x2ae89c(0x1fb)],_0x2ae89c(0x1cb)in _0x1a8608?_0x4a5d64[_0x2ae89c(0x1cb)]=_0x1a8608['defaultApp']:delete _0x4a5d64[_0x2ae89c(0x1cb)],_0x4a5d64;}export function readRawConfigWithLayers(_0x42c962){const _0x39dc1f=loadRawConfigLayers(_0x42c962);return{'config':mergeRawConfigLayers(_0x39dc1f),'layers':_0x39dc1f};}export function readRawConfig(_0x272a75){return mergeRawConfigLayers(loadRawConfigLayers(_0x272a75));}export function readConfigFile(_0x1e064c){const _0x348718=a274_0x5c758b;return parseAndNormalizeConfig(_0x1e064c,_0x348718(0x1f6));}export function writeConfigFile(_0x17fb9f,_0x37375d){const _0x155482=a274_0x5c758b,_0x1eced5=dirname(_0x17fb9f);!existsSync(_0x1eced5)&&mkdirSync(_0x1eced5,{'recursive':!![]});const _0x13575f=_0x17fb9f+'.tmp';try{const _0x211fe8=normalizeConfigForWrite(_0x37375d);writeFileSync(_0x13575f,JSON[_0x155482(0x1e8)](_0x211fe8,null,0x2)+'\x0a',{'encoding':_0x155482(0x1f8),'mode':0x180}),renameSync(_0x13575f,_0x17fb9f);}catch(_0x2523d2){try{unlinkSync(_0x13575f);}catch{}throw _0x2523d2;}}export function resolveWriteConfigPath(_0x5c1ca0){const _0x5b5f97=a274_0x5c758b,_0x4741b3=_0x5c1ca0===_0x5b5f97(0x1e9)?process[_0x5b5f97(0x1dd)]():homedir(),_0x5189c8=resolveConfigPath(_0x4741b3);return _0x5189c8??resolve(_0x4741b3,NEW_CONFIG_NAME);}
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a275_0x50c477=a275_0x36d9;(function(_0x2d39f7,_0x9bb700){const _0x452f8f=a275_0x36d9,_0x563a87=_0x2d39f7();while(!![]){try{const _0x3bbd15=-parseInt(_0x452f8f(0x144))/0x1+-parseInt(_0x452f8f(0x109))/0x2+parseInt(_0x452f8f(0x151))/0x3*(parseInt(_0x452f8f(0x12b))/0x4)+-parseInt(_0x452f8f(0x14e))/0x5+parseInt(_0x452f8f(0x10c))/0x6*(parseInt(_0x452f8f(0x118))/0x7)+-parseInt(_0x452f8f(0x12e))/0x8+parseInt(_0x452f8f(0x116))/0x9;if(_0x3bbd15===_0x9bb700)break;else _0x563a87['push'](_0x563a87['shift']());}catch(_0x395feb){_0x563a87['push'](_0x563a87['shift']());}}}(a275_0xeb6e,0x812d5));import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{resolveConfiguredRegion,resolveEffectiveRegion}from'./config/region-config.js';import{resolveEnterpriseRoutingManifest}from'./config/domain-config.js';import{logger}from'./utils/logger.js';import{resolveApiModelSource}from'./api/model-source.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x2f6175){return process.env[`RABETBASE_${_0x2f6175}`]||process.env[`LOVRABET_${_0x2f6175}`]||undefined;}function optionalString(_0x26e946){const _0x167eac=a275_0x36d9;return typeof _0x26e946===_0x167eac(0x11c)&&_0x26e946['trim']()?_0x26e946[_0x167eac(0x13a)]():undefined;}export function isRoutingRecoveryService(_0x46dd01){const _0x1052eb=a275_0x36d9;return _0x46dd01===_0x1052eb(0x13b)||_0x46dd01===_0x1052eb(0x10b);}export async function createContext(_0x395798){const _0x30d402=a275_0x36d9,{config:_0x3986d0,layers:_0x1ca27f}=readRawConfigWithLayers(),_0x1b374b=buildConfig(_0x3986d0,_0x395798,_0x1ca27f);await initGlobalEnvironment(_0x1b374b);const {getUserDomain:_0x28fab2,getApiDomain:_0x139067}=await import(_0x30d402(0x135)),_0x2254f5={'apiDomain':_0x139067(),'userDomain':_0x28fab2()},_0x3cafdc=await buildAuth(_0x1b374b);logger['setLogPath'](process['cwd']());const _0x38baff=(CLI_BIN_NAME+'\x20'+process['argv'][_0x30d402(0x10a)](0x2)['join']('\x20'))['trim']();logger[_0x30d402(0x14c)](_0x38baff);const {isNonInteractive:_0x41822e}=await import(_0x30d402(0x133)),_0x2cb300=_0x41822e(_0x395798);return{'config':_0x1b374b,'auth':_0x3cafdc,'logger':logger,'env':_0x2254f5,'nonInteractive':_0x2cb300};}export function buildConfigFromFlags(_0x3011d2){const {config:_0x4d220a,layers:_0x22da7e}=readRawConfigWithLayers();return buildConfig(_0x4d220a,_0x3011d2,_0x22da7e);}export async function initGlobalEnvironment(_0x4fe5e5){const _0x1b320c=a275_0x36d9,_0x181ba4=_0x4fe5e5['regionSource']===_0x1b320c(0x141)&&_0x4fe5e5[_0x1b320c(0x126)]?'app\x20profile\x20\x22'+_0x4fe5e5[_0x1b320c(0x126)]+'\x22':_0x4fe5e5[_0x1b320c(0x148)]===_0x1b320c(0x12c)?_0x1b320c(0x120):_0x4fe5e5[_0x1b320c(0x148)]===_0x1b320c(0x139)?_0x1b320c(0x10e):_0x1b320c(0x114);await initConfiguredEnvironment({'raw':_0x4fe5e5[_0x1b320c(0x147)],'configuredRegion':_0x4fe5e5[_0x1b320c(0x11e)]??_0x4fe5e5[_0x1b320c(0x147)]?.[_0x1b320c(0x138)]??_0x4fe5e5[_0x1b320c(0x138)],'regionLocation':_0x181ba4,'targetEnv':_0x4fe5e5[_0x1b320c(0x117)]});}function a275_0x36d9(_0x2ea4ed,_0x4dd803){_0x2ea4ed=_0x2ea4ed-0x109;const _0xeb6ebf=a275_0xeb6e();let _0x36d986=_0xeb6ebf[_0x2ea4ed];return _0x36d986;}async function initConfiguredEnvironment(_0x51cf5c){const _0x3af334=a275_0x36d9,_0x5618cd=resolveConfiguredRegion(_0x51cf5c[_0x3af334(0x145)],_0x51cf5c[_0x3af334(0x149)]),_0x36c514=resolveEnterpriseRoutingManifest(_0x51cf5c[_0x3af334(0x147)]?.['routing']),_0x58c2cb={'region':_0x5618cd,'apiDomain':_0x36c514?_0x36c514[_0x3af334(0x13d)][_0x3af334(0x123)]:optionalString(_0x51cf5c[_0x3af334(0x147)]?.['apiDomain']),'userDomain':_0x36c514?_0x36c514['domains'][_0x3af334(0x146)]:optionalString(_0x51cf5c['raw']?.[_0x3af334(0x146)]),'runtimeDomain':_0x36c514?_0x36c514[_0x3af334(0x13d)][_0x3af334(0x11f)]:optionalString(_0x51cf5c[_0x3af334(0x147)]?.['runtimeDomain']),'skillDomain':_0x36c514?_0x36c514[_0x3af334(0x13d)][_0x3af334(0x137)]:optionalString(_0x51cf5c[_0x3af334(0x147)]?.[_0x3af334(0x137)])||optionalString(_0x51cf5c[_0x3af334(0x147)]?.['skillHubDomain'])||optionalString(_0x51cf5c[_0x3af334(0x147)]?.[_0x3af334(0x111)])||optionalString(_0x51cf5c[_0x3af334(0x147)]?.[_0x3af334(0x150)]),'kbDomain':_0x36c514?_0x36c514[_0x3af334(0x13d)][_0x3af334(0x129)]:optionalString(_0x51cf5c[_0x3af334(0x147)]?.[_0x3af334(0x129)])||optionalString(_0x51cf5c['raw']?.[_0x3af334(0x111)])||optionalString(_0x51cf5c['raw']?.['platformDomain']),'kbServiceDomain':_0x36c514?_0x36c514[_0x3af334(0x13d)][_0x3af334(0x14f)]:optionalString(_0x51cf5c[_0x3af334(0x147)]?.[_0x3af334(0x14f)]),'appDomain':_0x36c514?_0x36c514[_0x3af334(0x13d)][_0x3af334(0x136)]:optionalString(_0x51cf5c[_0x3af334(0x147)]?.[_0x3af334(0x136)]),'localDomain':_0x36c514?_0x36c514[_0x3af334(0x13d)][_0x3af334(0x119)]:optionalString(_0x51cf5c[_0x3af334(0x147)]?.[_0x3af334(0x119)]),'certificateDomain':_0x36c514?_0x36c514[_0x3af334(0x13d)][_0x3af334(0x113)]:optionalString(_0x51cf5c['raw']?.[_0x3af334(0x113)]),'cdn':_0x36c514?.[_0x3af334(0x122)],'allowOfficialKbServiceDefault':!(_0x36c514!==undefined||['apiDomain',_0x3af334(0x146),_0x3af334(0x11f),_0x3af334(0x137),_0x3af334(0x11b),'kbDomain',_0x3af334(0x14f),'agentDomain',_0x3af334(0x150),_0x3af334(0x136),'localDomain','certificateDomain'][_0x3af334(0x125)](_0x48b18b=>Object[_0x3af334(0x10d)][_0x3af334(0x10f)][_0x3af334(0x143)](_0x51cf5c[_0x3af334(0x147)]??{},_0x48b18b)))},{initEnv:_0x21c21e}=await import(_0x3af334(0x131)),{initDomains:_0x12a60b}=await import(_0x3af334(0x135));_0x21c21e(_0x51cf5c['targetEnv']),_0x12a60b(_0x58c2cb);}export async function initMultiAppEnvironment(_0x5baff2){const _0x57eda9=a275_0x36d9;await initConfiguredEnvironment({'raw':_0x5baff2[_0x57eda9(0x12f)],'configuredRegion':_0x5baff2['region'],'regionLocation':_0x57eda9(0x132)+_0x5baff2[_0x57eda9(0x13c)]+'\x22','targetEnv':_0x5baff2['env']===_0x57eda9(0x128)?_0x57eda9(0x128):'production'});}export function getConfigAppCode(_0x12226b){const _0x35615e=a275_0x36d9,_0x47eae2=readRawConfig(_0x12226b);if(_0x47eae2[_0x35615e(0x121)]&&typeof _0x47eae2['apps']==='object'){const _0x27f5be=_0x47eae2['defaultApp'];if(_0x27f5be)return _0x47eae2[_0x35615e(0x121)][_0x27f5be]?.[_0x35615e(0x134)]?String(_0x47eae2[_0x35615e(0x121)][_0x27f5be][_0x35615e(0x134)])['trim']():undefined;const _0x319974=Object[_0x35615e(0x14a)](_0x47eae2[_0x35615e(0x121)]);if(_0x319974[_0x35615e(0x11a)]===0x1&&_0x319974[0x0]?.['appcode'])return String(_0x319974[0x0][_0x35615e(0x134)])[_0x35615e(0x13a)]();}const _0x5defbd=_0x47eae2[_0x35615e(0x134)]||_0x47eae2[_0x35615e(0x141)];if(typeof _0x5defbd!==_0x35615e(0x11c)||_0x5defbd[_0x35615e(0x13a)]()==='')return undefined;return _0x5defbd['trim']();}const CONNECTION_ROUTING_KEYS=[a275_0x50c477(0x13f),a275_0x50c477(0x123),a275_0x50c477(0x146),a275_0x50c477(0x11f),'skillDomain',a275_0x50c477(0x11b),a275_0x50c477(0x129),'kbServiceDomain',a275_0x50c477(0x111),'platformDomain','appDomain','localDomain',a275_0x50c477(0x113)];function withAppProfileRouting(_0x56c2b3,_0x30cb65){const _0x2a8f56=a275_0x50c477;if(!_0x30cb65||_0x30cb65[_0x2a8f56(0x14f)]===undefined)return _0x56c2b3;return{..._0x56c2b3,'kbServiceDomain':_0x30cb65[_0x2a8f56(0x14f)]};}function pickConnectionRoutingConfig(_0x44b1a4,_0x3e6198){const _0x4a1850={'region':_0x3e6198};for(const _0xedf3c7 of CONNECTION_ROUTING_KEYS){if(_0x44b1a4[_0xedf3c7]!==undefined)_0x4a1850[_0xedf3c7]=_0x44b1a4[_0xedf3c7];}return _0x4a1850;}export function getMultiAppConfigs(_0x17f7c5=a275_0x50c477(0x12c),_0x176c4c){const _0x35ac49=a275_0x50c477,_0x3919bd=loadRawConfigLayers(_0x176c4c);let _0x25bb89,_0x2b5c34;const _0x4befa6=mergeRawConfigLayers(_0x3919bd),_0x247d13=_0x3919bd[_0x35ac49(0x13e)][_0x35ac49(0x121)]&&typeof _0x3919bd[_0x35ac49(0x13e)][_0x35ac49(0x121)]===_0x35ac49(0x112)?_0x3919bd[_0x35ac49(0x13e)]['apps']:{},_0x97b258=_0x3919bd['projectConfig']['apps']&&typeof _0x3919bd[_0x35ac49(0x130)][_0x35ac49(0x121)]===_0x35ac49(0x112)?_0x3919bd[_0x35ac49(0x130)][_0x35ac49(0x121)]:{};_0x17f7c5===_0x35ac49(0x124)?(_0x25bb89={..._0x247d13,..._0x97b258},_0x2b5c34=_0x4befa6[_0x35ac49(0x127)]):(_0x25bb89=_0x3919bd[_0x35ac49(0x130)][_0x35ac49(0x121)],_0x2b5c34=_0x3919bd[_0x35ac49(0x130)]['defaultApp']);!_0x2b5c34&&_0x25bb89&&typeof _0x25bb89===_0x35ac49(0x112)&&Object[_0x35ac49(0x11d)](_0x25bb89)[_0x35ac49(0x11a)]===0x1&&(_0x2b5c34=Object['keys'](_0x25bb89)[0x0]);if(!_0x25bb89||typeof _0x25bb89!==_0x35ac49(0x112)||Object[_0x35ac49(0x11d)](_0x25bb89)['length']===0x0)return null;return Object[_0x35ac49(0x14b)](_0x25bb89)[_0x35ac49(0x12a)](([_0x3f71fc,_0x12e9a7])=>{const _0xeb58e9=_0x35ac49,_0x4637af=_0x17f7c5==='project'||Object[_0xeb58e9(0x10d)]['hasOwnProperty'][_0xeb58e9(0x143)](_0x97b258,_0x3f71fc),_0x29aad9=withAppProfileRouting(_0x4637af?_0x4befa6:_0x3919bd[_0xeb58e9(0x13e)],_0x12e9a7),_0x37f78f=resolveEffectiveRegion({'appRegion':_0x12e9a7?.['region'],'projectRegion':_0x4637af?_0x3919bd[_0xeb58e9(0x130)][_0xeb58e9(0x138)]:undefined,'globalRegion':_0x3919bd[_0xeb58e9(0x13e)][_0xeb58e9(0x138)],'mergedRegion':_0x29aad9[_0xeb58e9(0x138)],'appName':_0x3f71fc});return{'name':_0x3f71fc,'appcode':_0x12e9a7?.['appcode']||'','apiGroup':optionalString(_0x12e9a7?.['apiGroup']),'isDefault':_0x3f71fc===_0x2b5c34,'region':_0x37f78f[_0xeb58e9(0x138)],'regionSource':_0x37f78f[_0xeb58e9(0x14d)],'env':_0x12e9a7?.[_0xeb58e9(0x117)],'apiDir':optionalString(_0x12e9a7?.[_0xeb58e9(0x142)])||optionalString(_0x29aad9[_0xeb58e9(0x142)]),'cookie':_0x12e9a7?.[_0xeb58e9(0x110)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x29aad9,_0x37f78f[_0xeb58e9(0x138)])};})['filter'](_0x5ad867=>_0x5ad867[_0x35ac49(0x134)]);}export function getTemplateBaseUrl(_0x4f0bac){const _0x353dab=a275_0x50c477,_0x1fa896=readRawConfig(_0x4f0bac);if(_0x1fa896['template_base_url']&&typeof _0x1fa896['template_base_url']==='string')return _0x1fa896[_0x353dab(0x12d)][_0x353dab(0x115)](/\/$/,'');return _0x353dab(0x140);}function buildConfig(_0x525b7e,_0x515f16,_0x326088){const _0x2fd009=a275_0x50c477,_0x1309c7=resolveAppConfig({'raw':_0x525b7e,'flags':_0x515f16,'layers':_0x326088,'readEnv':env}),_0x502b8a=_0x1309c7[_0x2fd009(0x126)]?_0x1309c7[_0x2fd009(0x121)][_0x1309c7[_0x2fd009(0x126)]]:undefined;return{..._0x1309c7,'raw':withAppProfileRouting(_0x525b7e,_0x502b8a)};}export function resolveApiFilePath(_0x234c4f,_0x887c8f,_0x571937){return resolveApiModelSource(_0x234c4f,_0x887c8f,_0x571937)['filePath'];}function a275_0xeb6e(){const _0x177e9e=['hasOwnProperty','cookie','agentDomain','object','certificateDomain','Rabetbase\x20configuration','replace','16044516nWrbmE','env','1744463mkuqka','localDomain','length','skillHubDomain','string','keys','regionConfiguredValue','runtimeDomain','project\x20Rabetbase\x20configuration','apps','cdn','apiDomain','merged','some','currentApp','defaultApp','daily','kbDomain','map','76292YesUfF','project','template_base_url','3526032RgHqiM','routingConfig','projectConfig','./constant/env.js','app\x20profile\x20\x22','./utils/is-non-interactive.js','appcode','./constant/domain.js','appDomain','skillDomain','region','global','trim','config','name','domains','globalConfig','routing','https://g.lovrabet.com/dist/lovrabet-skill','app','apiDir','call','493084yLSclb','configuredRegion','userDomain','raw','regionSource','regionLocation','values','entries','setRawCommand','source','1547720YKnlgw','kbServiceDomain','platformDomain','9wVoqnA','1131740vPMlRI','slice','doctor','12oPVqvi','prototype','global\x20Rabetbase\x20configuration'];a275_0xeb6e=function(){return _0x177e9e;};return a275_0xeb6e();}
1
+ const a275_0x476c0c=a275_0x59c9;(function(_0x54857c,_0x7823f){const _0x1cc260=a275_0x59c9,_0x34e58d=_0x54857c();while(!![]){try{const _0x182f7e=parseInt(_0x1cc260(0x195))/0x1*(-parseInt(_0x1cc260(0x161))/0x2)+-parseInt(_0x1cc260(0x179))/0x3*(parseInt(_0x1cc260(0x199))/0x4)+-parseInt(_0x1cc260(0x15e))/0x5+-parseInt(_0x1cc260(0x184))/0x6+-parseInt(_0x1cc260(0x15b))/0x7+-parseInt(_0x1cc260(0x187))/0x8*(parseInt(_0x1cc260(0x176))/0x9)+parseInt(_0x1cc260(0x188))/0xa;if(_0x182f7e===_0x7823f)break;else _0x34e58d['push'](_0x34e58d['shift']());}catch(_0x351313){_0x34e58d['push'](_0x34e58d['shift']());}}}(a275_0xa6e4,0x79b61));import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{resolveConfiguredRegion,resolveEffectiveRegion}from'./config/region-config.js';import{resolveEnterpriseRoutingManifest}from'./config/domain-config.js';import{logger}from'./utils/logger.js';import{resolveApiModelSource}from'./api/model-source.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function a275_0x59c9(_0x6c4400,_0x9895fb){_0x6c4400=_0x6c4400-0x154;const _0xa6e478=a275_0xa6e4();let _0x59c910=_0xa6e478[_0x6c4400];return _0x59c910;}function env(_0x5849bb){return process.env[`RABETBASE_${_0x5849bb}`]||process.env[`LOVRABET_${_0x5849bb}`]||undefined;}function optionalString(_0x490c24){const _0x486cd3=a275_0x59c9;return typeof _0x490c24==='string'&&_0x490c24[_0x486cd3(0x19e)]()?_0x490c24[_0x486cd3(0x19e)]():undefined;}export function isRoutingRecoveryService(_0x5a9976){const _0x448139=a275_0x59c9;return _0x5a9976===_0x448139(0x158)||_0x5a9976===_0x448139(0x15c);}export async function createContext(_0x2dc8ed){const _0x4487b2=a275_0x59c9,{config:_0x5459a9,layers:_0x37d066}=readRawConfigWithLayers(),_0x288aea=buildConfig(_0x5459a9,_0x2dc8ed,_0x37d066);await initGlobalEnvironment(_0x288aea);const {getUserDomain:_0x39b3ec,getApiDomain:_0x44d0d7}=await import(_0x4487b2(0x17c)),_0x436dee={'apiDomain':_0x44d0d7(),'userDomain':_0x39b3ec()},_0x30566d=await buildAuth(_0x288aea);logger[_0x4487b2(0x167)](process[_0x4487b2(0x16e)]());const _0x7baabe=(CLI_BIN_NAME+'\x20'+process[_0x4487b2(0x190)][_0x4487b2(0x194)](0x2)[_0x4487b2(0x198)]('\x20'))[_0x4487b2(0x19e)]();logger[_0x4487b2(0x162)](_0x7baabe);const {isNonInteractive:_0xb1b48c}=await import(_0x4487b2(0x15d)),_0x33c532=_0xb1b48c(_0x2dc8ed);return{'config':_0x288aea,'auth':_0x30566d,'logger':logger,'env':_0x436dee,'nonInteractive':_0x33c532};}export function buildConfigFromFlags(_0x33aa50){const {config:_0x2236d6,layers:_0x503beb}=readRawConfigWithLayers();return buildConfig(_0x2236d6,_0x33aa50,_0x503beb);}export async function initGlobalEnvironment(_0x5bc389){const _0x10ad80=a275_0x59c9,_0x412130=_0x5bc389[_0x10ad80(0x165)]===_0x10ad80(0x182)&&_0x5bc389[_0x10ad80(0x160)]?'app\x20profile\x20\x22'+_0x5bc389['currentApp']+'\x22':_0x5bc389[_0x10ad80(0x165)]==='project'?_0x10ad80(0x169):_0x5bc389['regionSource']===_0x10ad80(0x18e)?_0x10ad80(0x166):_0x10ad80(0x16d);await initConfiguredEnvironment({'raw':_0x5bc389[_0x10ad80(0x17a)],'configuredRegion':_0x5bc389[_0x10ad80(0x185)]??_0x5bc389[_0x10ad80(0x17a)]?.[_0x10ad80(0x19a)]??_0x5bc389[_0x10ad80(0x19a)],'regionLocation':_0x412130,'targetEnv':_0x5bc389[_0x10ad80(0x16b)]});}function a275_0xa6e4(){const _0x163847=['routing','352373ZgqjsZ','doctor','./utils/is-non-interactive.js','2402575PTdvNX','cookie','currentApp','1183970AnUumu','setRawCommand','apps','entries','regionSource','global\x20Rabetbase\x20configuration','setLogPath','name','project\x20Rabetbase\x20configuration','object','env','apiGroup','Rabetbase\x20configuration','cwd','platformDomain','skillHubDomain','kbDomain','prototype','production','userDomain','projectConfig','279RiJFuX','some','https://g.lovrabet.com/dist/lovrabet-skill','303141fASzMZ','raw','runtimeDomain','./constant/domain.js','regionLocation','filter','template_base_url','call','replace','app','skillDomain','5687868UOEfZA','regionConfiguredValue','appcode','42904SYSyjV','29376930SMxUCM','string','defaultApp','source','length','hasOwnProperty','global','keys','argv','filePath','targetEnv','kbServiceDomain','slice','1pOhXxA','apiDomain','certificateDomain','join','8PVqCYe','region','domains','map','localDomain','trim','cdn','agentDomain','daily','appDomain','apiDir','routingConfig','config','configuredRegion'];a275_0xa6e4=function(){return _0x163847;};return a275_0xa6e4();}async function initConfiguredEnvironment(_0x4bea5f){const _0x533ff3=a275_0x59c9,_0x19fc99=resolveConfiguredRegion(_0x4bea5f[_0x533ff3(0x159)],_0x4bea5f[_0x533ff3(0x17d)]),_0x17921a=resolveEnterpriseRoutingManifest(_0x4bea5f[_0x533ff3(0x17a)]?.['routing']),_0x40b81a={'region':_0x19fc99,'apiDomain':_0x17921a?_0x17921a['domains'][_0x533ff3(0x196)]:optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.['apiDomain']),'userDomain':_0x17921a?_0x17921a['domains'][_0x533ff3(0x174)]:optionalString(_0x4bea5f['raw']?.[_0x533ff3(0x174)]),'runtimeDomain':_0x17921a?_0x17921a['domains'][_0x533ff3(0x17b)]:optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.[_0x533ff3(0x17b)]),'skillDomain':_0x17921a?_0x17921a[_0x533ff3(0x19b)]['skillDomain']:optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.[_0x533ff3(0x183)])||optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.[_0x533ff3(0x170)])||optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.[_0x533ff3(0x1a0)])||optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.[_0x533ff3(0x16f)]),'kbDomain':_0x17921a?_0x17921a[_0x533ff3(0x19b)][_0x533ff3(0x171)]:optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.['kbDomain'])||optionalString(_0x4bea5f['raw']?.[_0x533ff3(0x1a0)])||optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.['platformDomain']),'kbServiceDomain':_0x17921a?_0x17921a['domains'][_0x533ff3(0x193)]:optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.[_0x533ff3(0x193)]),'appDomain':_0x17921a?_0x17921a[_0x533ff3(0x19b)][_0x533ff3(0x155)]:optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.[_0x533ff3(0x155)]),'localDomain':_0x17921a?_0x17921a[_0x533ff3(0x19b)][_0x533ff3(0x19d)]:optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.[_0x533ff3(0x19d)]),'certificateDomain':_0x17921a?_0x17921a[_0x533ff3(0x19b)][_0x533ff3(0x197)]:optionalString(_0x4bea5f[_0x533ff3(0x17a)]?.[_0x533ff3(0x197)]),'cdn':_0x17921a?.[_0x533ff3(0x19f)],'allowOfficialKbServiceDefault':!(_0x17921a!==undefined||[_0x533ff3(0x196),_0x533ff3(0x174),_0x533ff3(0x17b),_0x533ff3(0x183),_0x533ff3(0x170),_0x533ff3(0x171),_0x533ff3(0x193),_0x533ff3(0x1a0),_0x533ff3(0x16f),_0x533ff3(0x155),_0x533ff3(0x19d),_0x533ff3(0x197)][_0x533ff3(0x177)](_0x2025bf=>Object['prototype'][_0x533ff3(0x18d)][_0x533ff3(0x180)](_0x4bea5f[_0x533ff3(0x17a)]??{},_0x2025bf)))},{initEnv:_0x23a861}=await import('./constant/env.js'),{initDomains:_0x21751c}=await import(_0x533ff3(0x17c));_0x23a861(_0x4bea5f[_0x533ff3(0x192)]),_0x21751c(_0x40b81a);}export async function initMultiAppEnvironment(_0x143415){const _0x166db9=a275_0x59c9;await initConfiguredEnvironment({'raw':_0x143415[_0x166db9(0x157)],'configuredRegion':_0x143415['region'],'regionLocation':'app\x20profile\x20\x22'+_0x143415[_0x166db9(0x168)]+'\x22','targetEnv':_0x143415[_0x166db9(0x16b)]==='daily'?_0x166db9(0x154):_0x166db9(0x173)});}export function getConfigAppCode(_0x4520ae){const _0x427669=a275_0x59c9,_0x40ae92=readRawConfig(_0x4520ae);if(_0x40ae92[_0x427669(0x163)]&&typeof _0x40ae92['apps']===_0x427669(0x16a)){const _0x27a9f8=_0x40ae92[_0x427669(0x18a)];if(_0x27a9f8)return _0x40ae92[_0x427669(0x163)][_0x27a9f8]?.[_0x427669(0x186)]?String(_0x40ae92[_0x427669(0x163)][_0x27a9f8]['appcode'])[_0x427669(0x19e)]():undefined;const _0x4d607a=Object['values'](_0x40ae92[_0x427669(0x163)]);if(_0x4d607a['length']===0x1&&_0x4d607a[0x0]?.[_0x427669(0x186)])return String(_0x4d607a[0x0][_0x427669(0x186)])['trim']();}const _0x2a027a=_0x40ae92[_0x427669(0x186)]||_0x40ae92[_0x427669(0x182)];if(typeof _0x2a027a!==_0x427669(0x189)||_0x2a027a[_0x427669(0x19e)]()==='')return undefined;return _0x2a027a[_0x427669(0x19e)]();}const CONNECTION_ROUTING_KEYS=[a275_0x476c0c(0x15a),a275_0x476c0c(0x196),'userDomain',a275_0x476c0c(0x17b),a275_0x476c0c(0x183),a275_0x476c0c(0x170),'kbDomain','kbServiceDomain',a275_0x476c0c(0x1a0),a275_0x476c0c(0x16f),a275_0x476c0c(0x155),a275_0x476c0c(0x19d),a275_0x476c0c(0x197)];function withAppProfileRouting(_0x5a00b1,_0x23d680){const _0x1c288d=a275_0x476c0c;if(!_0x23d680||_0x23d680['kbServiceDomain']===undefined)return _0x5a00b1;return{..._0x5a00b1,'kbServiceDomain':_0x23d680[_0x1c288d(0x193)]};}function pickConnectionRoutingConfig(_0x3cbb46,_0xc611f){const _0x1487a4={'region':_0xc611f};for(const _0x146e95 of CONNECTION_ROUTING_KEYS){if(_0x3cbb46[_0x146e95]!==undefined)_0x1487a4[_0x146e95]=_0x3cbb46[_0x146e95];}return _0x1487a4;}export function getMultiAppConfigs(_0x1a4a01='project',_0x2ec24e){const _0x51ced4=a275_0x476c0c,_0x546a82=loadRawConfigLayers(_0x2ec24e);let _0x590a00,_0x293ca0;const _0x1384b8=mergeRawConfigLayers(_0x546a82),_0x35bb35=_0x546a82['globalConfig'][_0x51ced4(0x163)]&&typeof _0x546a82['globalConfig'][_0x51ced4(0x163)]==='object'?_0x546a82['globalConfig'][_0x51ced4(0x163)]:{},_0x11c06c=_0x546a82[_0x51ced4(0x175)][_0x51ced4(0x163)]&&typeof _0x546a82[_0x51ced4(0x175)][_0x51ced4(0x163)]===_0x51ced4(0x16a)?_0x546a82[_0x51ced4(0x175)][_0x51ced4(0x163)]:{};_0x1a4a01==='merged'?(_0x590a00={..._0x35bb35,..._0x11c06c},_0x293ca0=_0x1384b8[_0x51ced4(0x18a)]):(_0x590a00=_0x546a82[_0x51ced4(0x175)][_0x51ced4(0x163)],_0x293ca0=_0x546a82[_0x51ced4(0x175)]['defaultApp']);!_0x293ca0&&_0x590a00&&typeof _0x590a00===_0x51ced4(0x16a)&&Object[_0x51ced4(0x18f)](_0x590a00)[_0x51ced4(0x18c)]===0x1&&(_0x293ca0=Object[_0x51ced4(0x18f)](_0x590a00)[0x0]);if(!_0x590a00||typeof _0x590a00!==_0x51ced4(0x16a)||Object[_0x51ced4(0x18f)](_0x590a00)['length']===0x0)return null;return Object[_0x51ced4(0x164)](_0x590a00)[_0x51ced4(0x19c)](([_0x30540a,_0x4c0894])=>{const _0x5efd68=_0x51ced4,_0x5abf84=_0x1a4a01==='project'||Object[_0x5efd68(0x172)][_0x5efd68(0x18d)][_0x5efd68(0x180)](_0x11c06c,_0x30540a),_0x50e028=withAppProfileRouting(_0x5abf84?_0x1384b8:_0x546a82['globalConfig'],_0x4c0894),_0x3eda7b=resolveEffectiveRegion({'appRegion':_0x4c0894?.['region'],'projectRegion':_0x5abf84?_0x546a82[_0x5efd68(0x175)][_0x5efd68(0x19a)]:undefined,'globalRegion':_0x546a82['globalConfig']['region'],'mergedRegion':_0x50e028[_0x5efd68(0x19a)],'appName':_0x30540a});return{'name':_0x30540a,'appcode':_0x4c0894?.[_0x5efd68(0x186)]||'','apiGroup':optionalString(_0x4c0894?.[_0x5efd68(0x16c)]),'isDefault':_0x30540a===_0x293ca0,'region':_0x3eda7b['region'],'regionSource':_0x3eda7b[_0x5efd68(0x18b)],'env':_0x4c0894?.[_0x5efd68(0x16b)],'apiDir':optionalString(_0x4c0894?.[_0x5efd68(0x156)])||optionalString(_0x50e028[_0x5efd68(0x156)]),'cookie':_0x4c0894?.[_0x5efd68(0x15f)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x50e028,_0x3eda7b[_0x5efd68(0x19a)])};})[_0x51ced4(0x17e)](_0x159c23=>_0x159c23[_0x51ced4(0x186)]);}export function getTemplateBaseUrl(_0xe5c077){const _0x3b89a2=a275_0x476c0c,_0x5a1b16=readRawConfig(_0xe5c077);if(_0x5a1b16[_0x3b89a2(0x17f)]&&typeof _0x5a1b16['template_base_url']==='string')return _0x5a1b16['template_base_url'][_0x3b89a2(0x181)](/\/$/,'');return _0x3b89a2(0x178);}function buildConfig(_0x5c7b2a,_0x1cf1e5,_0x584f60){const _0x2e7de5=a275_0x476c0c,_0xd559da=resolveAppConfig({'raw':_0x5c7b2a,'flags':_0x1cf1e5,'layers':_0x584f60,'readEnv':env}),_0x301e84=_0xd559da[_0x2e7de5(0x160)]?_0xd559da['apps'][_0xd559da[_0x2e7de5(0x160)]]:undefined;return{..._0xd559da,'raw':withAppProfileRouting(_0x5c7b2a,_0x301e84)};}export function resolveApiFilePath(_0x4ecc58,_0x261782,_0x2bc985){const _0x737b04=a275_0x476c0c;return resolveApiModelSource(_0x4ecc58,_0x261782,_0x2bc985)[_0x737b04(0x191)];}
@@ -1 +1 @@
1
- const a276_0x22c3dc=a276_0x200f;(function(_0x33fd1d,_0x28e05b){const _0x6845d4=a276_0x200f,_0x5bfed7=_0x33fd1d();while(!![]){try{const _0x459017=-parseInt(_0x6845d4(0x9e))/0x1+parseInt(_0x6845d4(0x80))/0x2+-parseInt(_0x6845d4(0x7e))/0x3+-parseInt(_0x6845d4(0x7f))/0x4*(parseInt(_0x6845d4(0x9a))/0x5)+-parseInt(_0x6845d4(0xa5))/0x6*(-parseInt(_0x6845d4(0x82))/0x7)+parseInt(_0x6845d4(0x9f))/0x8*(-parseInt(_0x6845d4(0x8d))/0x9)+parseInt(_0x6845d4(0x83))/0xa;if(_0x459017===_0x28e05b)break;else _0x5bfed7['push'](_0x5bfed7['shift']());}catch(_0x410e5e){_0x5bfed7['push'](_0x5bfed7['shift']());}}}(a276_0x42da,0x56df7));import{existsSync,readFileSync,realpathSync,statSync}from'node:fs';function a276_0x42da(){const _0x3dc752=['endsWith','.mts','add','../','.ts','5105jgXosc','tableName','map','has','649333eMsIvK','272GmomfV','utf-8','alias','.cts','startsWith','size','1947552ZaftOl','filter','set','28287zQLBie','932bhgmyO','1397786ulJaQQ','slice','14WAbiJm','1441770KxRysV','flatMap','exec','.tsx','length','get','push','name','datasetCode','.js','63468AxzYDm','.jsx','index','defaultProfile','.cjs','cwd','.mjs','isFile'];a276_0x42da=function(){return _0x3dc752;};return a276_0x42da();}import{dirname,extname,isAbsolute,relative,resolve}from'node:path';import{MODEL_REGISTRY_FILE_NAME,getProfileModels,readModelRegistry}from'../api/model-registry-file.js';import{parseLegacyApiModels}from'../api/legacy-api-file.js';import{findProjectRootDirectory}from'../context/config-loader.js';const cache=new Map(),MAX_LOCAL_REEXPORT_DEPTH=0x8,SOURCE_FILE_EXTENSIONS=['.ts',a276_0x22c3dc(0x86),a276_0x22c3dc(0x96),a276_0x22c3dc(0xa2),a276_0x22c3dc(0x8c),a276_0x22c3dc(0x8e),a276_0x22c3dc(0x93),a276_0x22c3dc(0x91)],LOCAL_REEXPORT_RE=/\bexport\s+(?:type\s+)?(?:\{[\s\S]*?\}|\*)\s+from\s*["']([^"']+)["']/g,SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION={'.js':[a276_0x22c3dc(0x99),'.tsx'],'.jsx':[a276_0x22c3dc(0x86)],'.mjs':['.mts'],'.cjs':['.cts']};function parseApiFile(_0x27ae30){const _0x11274e=a276_0x22c3dc;return parseLegacyApiModels(_0x27ae30)[_0x11274e(0x84)](_0xd4bf51=>_0xd4bf51[_0x11274e(0xa1)]?[{'alias':_0xd4bf51[_0x11274e(0xa1)],'datasetCode':_0xd4bf51[_0x11274e(0x8b)],'tableName':_0xd4bf51['tableName'],'name':_0xd4bf51[_0x11274e(0x8a)]}]:[]);}function isWithinRoot(_0x1c89c0,_0x4d8986){const _0x36ad9a=a276_0x22c3dc,_0x3c5df8=relative(_0x1c89c0,_0x4d8986);return _0x3c5df8===''||!_0x3c5df8[_0x36ad9a(0xa3)]('..')&&!isAbsolute(_0x3c5df8);}function resolveExistingFile(_0x124471){const _0x25d2bf=a276_0x22c3dc;if(!existsSync(_0x124471))return undefined;try{return statSync(_0x124471)[_0x25d2bf(0x94)]()?realpathSync(_0x124471):undefined;}catch{return undefined;}}function reexportCandidatePaths(_0x523379){const _0x3fd81b=a276_0x22c3dc,_0x34d995=extname(_0x523379);if(!_0x34d995)return[...SOURCE_FILE_EXTENSIONS[_0x3fd81b(0x9c)](_0x34017b=>''+_0x523379+_0x34017b),...SOURCE_FILE_EXTENSIONS[_0x3fd81b(0x9c)](_0x1b34e6=>resolve(_0x523379,_0x3fd81b(0x8f)+_0x1b34e6))];const _0x200af0=SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION[_0x34d995];if(!_0x200af0)return[_0x523379];const _0xbdfdfd=_0x523379[_0x3fd81b(0x81)](0x0,-_0x34d995[_0x3fd81b(0x87)]);return[..._0x200af0[_0x3fd81b(0x9c)](_0x2c8572=>''+_0xbdfdfd+_0x2c8572),_0x523379];}function resolveLocalReexport(_0x134146,_0x2195a2,_0x48c8f0){const _0x42b642=a276_0x22c3dc;if(!_0x2195a2[_0x42b642(0xa3)]('./')&&!_0x2195a2[_0x42b642(0xa3)](_0x42b642(0x98)))return undefined;const _0x228120=resolve(dirname(_0x134146),_0x2195a2);if(!isWithinRoot(_0x48c8f0,_0x228120))return undefined;for(const _0x2d55df of reexportCandidatePaths(_0x228120)){const _0x5cc648=resolveExistingFile(_0x2d55df);if(_0x5cc648&&isWithinRoot(_0x48c8f0,_0x5cc648))return _0x5cc648;}return undefined;}function parseApiFileTree(_0x1afa40,_0x3ae6df,_0x2e0075,_0x196f66){const _0x576447=a276_0x22c3dc,_0x5b0909=resolveExistingFile(_0x1afa40);if(!_0x5b0909)return[];const _0x5adbeb=_0x2e0075[_0x576447(0x88)](_0x5b0909);if(_0x5adbeb!==undefined&&_0x5adbeb<=_0x196f66)return[];_0x2e0075[_0x576447(0x7d)](_0x5b0909,_0x196f66);const _0x19c1d6=readFileSync(_0x5b0909,_0x576447(0xa0)),_0x5a3c7b=parseApiFile(_0x19c1d6);if(_0x196f66>=MAX_LOCAL_REEXPORT_DEPTH)return _0x5a3c7b;const _0x13a176=new RegExp(LOCAL_REEXPORT_RE['source'],LOCAL_REEXPORT_RE['flags']);let _0x28e969;while((_0x28e969=_0x13a176[_0x576447(0x85)](_0x19c1d6))!==null){const _0x2a8250=resolveLocalReexport(_0x5b0909,_0x28e969[0x1],_0x3ae6df);_0x2a8250&&_0x5a3c7b[_0x576447(0x89)](...parseApiFileTree(_0x2a8250,_0x3ae6df,_0x2e0075,_0x196f66+0x1));}return _0x5a3c7b;}function aliasProjectRoot(_0x4e9d05){const _0x49dcb8=findProjectRootDirectory(dirname(_0x4e9d05));try{return realpathSync(_0x49dcb8);}catch{return _0x49dcb8;}}function a276_0x200f(_0x340443,_0x314d6d){_0x340443=_0x340443-0x7c;const _0x42dafd=a276_0x42da();let _0x200f59=_0x42dafd[_0x340443];return _0x200f59;}function uniqueAliasEntries(_0x152aaa){const _0x3d6763=a276_0x22c3dc,_0x750d31=new Set();return _0x152aaa[_0x3d6763(0x7c)](_0x5f1451=>{const _0x22f64f=_0x3d6763,_0x9dc4b9=JSON['stringify'](_0x5f1451);if(_0x750d31[_0x22f64f(0x9d)](_0x9dc4b9))return![];return _0x750d31[_0x22f64f(0x97)](_0x9dc4b9),!![];});}export function loadAliasMap(_0x57e53a,_0x41fc89,_0x1f79fb,_0x4add66){const _0x9405f1=a276_0x22c3dc,_0x56949b=resolve(_0x1f79fb??resolve(process[_0x9405f1(0x92)](),_0x57e53a,'api.ts')),_0x1cdad9=_0x4add66?_0x56949b+'#'+_0x4add66:_0x56949b;if(cache[_0x9405f1(0x9d)](_0x1cdad9))return cache[_0x9405f1(0x88)](_0x1cdad9);if(!existsSync(_0x56949b))return cache['set'](_0x1cdad9,[]),[];try{if(_0x56949b[_0x9405f1(0x95)](MODEL_REGISTRY_FILE_NAME)){const _0x3da905=readModelRegistry(_0x56949b),_0x4423f1=_0x4add66??_0x3da905?.[_0x9405f1(0x90)],_0x5e41a7=_0x4423f1&&_0x3da905?getProfileModels(_0x3da905,_0x4423f1):[],_0x4522a6=uniqueAliasEntries(_0x5e41a7['flatMap'](_0x22e1f7=>_0x22e1f7[_0x9405f1(0xa1)]?[{'alias':_0x22e1f7[_0x9405f1(0xa1)],'datasetCode':_0x22e1f7[_0x9405f1(0x8b)],'tableName':_0x22e1f7[_0x9405f1(0x9b)],'name':_0x22e1f7[_0x9405f1(0x8a)]}]:[]));return cache[_0x9405f1(0x7d)](_0x1cdad9,_0x4522a6),_0x4522a6;}const _0x57d551=uniqueAliasEntries(parseApiFileTree(_0x56949b,aliasProjectRoot(_0x56949b),new Map(),0x0));return cache['set'](_0x1cdad9,_0x57d551),_0x57d551;}catch{return cache[_0x9405f1(0x7d)](_0x1cdad9,[]),[];}}export function resolveAlias(_0x5a4061,_0x59cd2f,_0x2b552e,_0x3ac777,_0x233f86){const _0x3e5197=a276_0x22c3dc;if(!_0x59cd2f)return undefined;const _0x4cded5=loadAliasMap(_0x5a4061,_0x2b552e,_0x3ac777,_0x233f86),_0x18cf0b=new Set(_0x4cded5['filter'](_0x7ee598=>_0x7ee598[_0x3e5197(0xa1)]===_0x59cd2f)[_0x3e5197(0x9c)](_0x1bdce2=>_0x1bdce2[_0x3e5197(0x8b)]));return _0x18cf0b[_0x3e5197(0xa4)]===0x1?[..._0x18cf0b][0x0]:undefined;}export function listAliases(_0x445158,_0xf2a3ce,_0x2430fe,_0x3adc1b){return loadAliasMap(_0x445158,_0xf2a3ce,_0x2430fe,_0x3adc1b);}
1
+ const a276_0x3b9ef0=a276_0x51be;(function(_0x47f49f,_0x11ab5e){const _0x2309e1=a276_0x51be,_0x852fbf=_0x47f49f();while(!![]){try{const _0x325c9b=-parseInt(_0x2309e1(0x151))/0x1*(-parseInt(_0x2309e1(0x14d))/0x2)+parseInt(_0x2309e1(0x154))/0x3+-parseInt(_0x2309e1(0x15f))/0x4*(parseInt(_0x2309e1(0x159))/0x5)+parseInt(_0x2309e1(0x15c))/0x6*(parseInt(_0x2309e1(0x167))/0x7)+parseInt(_0x2309e1(0x173))/0x8*(-parseInt(_0x2309e1(0x161))/0x9)+-parseInt(_0x2309e1(0x16c))/0xa*(-parseInt(_0x2309e1(0x171))/0xb)+-parseInt(_0x2309e1(0x157))/0xc;if(_0x325c9b===_0x11ab5e)break;else _0x852fbf['push'](_0x852fbf['shift']());}catch(_0x2a8788){_0x852fbf['push'](_0x852fbf['shift']());}}}(a276_0x4b10,0x76b4e));import{existsSync,readFileSync,realpathSync,statSync}from'node:fs';import{dirname,extname,isAbsolute,relative,resolve}from'node:path';import{MODEL_REGISTRY_FILE_NAME,getProfileModels,readModelRegistry}from'../api/model-registry-file.js';import{parseLegacyApiModels}from'../api/legacy-api-file.js';import{findProjectRootDirectory}from'../context/config-loader.js';const cache=new Map(),MAX_LOCAL_REEXPORT_DEPTH=0x8,SOURCE_FILE_EXTENSIONS=[a276_0x3b9ef0(0x166),a276_0x3b9ef0(0x162),a276_0x3b9ef0(0x16d),a276_0x3b9ef0(0x15b),a276_0x3b9ef0(0x14a),'.jsx',a276_0x3b9ef0(0x14c),a276_0x3b9ef0(0x165)],LOCAL_REEXPORT_RE=/\bexport\s+(?:type\s+)?(?:\{[\s\S]*?\}|\*)\s+from\s*["']([^"']+)["']/g,SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION={'.js':[a276_0x3b9ef0(0x166),a276_0x3b9ef0(0x162)],'.jsx':[a276_0x3b9ef0(0x162)],'.mjs':['.mts'],'.cjs':[a276_0x3b9ef0(0x15b)]};function a276_0x4b10(){const _0x5dba9c=['source','endsWith','7149850Jbvhwf','.mts','push','slice','has','11RyAURj','defaultProfile','8YNzKrY','set','.js','length','.mjs','32816WBtjqG','size','filter','tableName','37QsjbWn','map','flatMap','716994ApDIqG','alias','../','1908828tSzEPW','utf-8','259320KNnBcO','startsWith','.cts','2454tEOwPq','get','api.ts','56eoorDd','cwd','2564901DfwbSP','.tsx','datasetCode','name','.cjs','.ts','1631lLcbrF','add','exec'];a276_0x4b10=function(){return _0x5dba9c;};return a276_0x4b10();}function parseApiFile(_0x4e743e){const _0x2b3394=a276_0x3b9ef0;return parseLegacyApiModels(_0x4e743e)[_0x2b3394(0x153)](_0x11bbd4=>_0x11bbd4['alias']?[{'alias':_0x11bbd4[_0x2b3394(0x155)],'datasetCode':_0x11bbd4[_0x2b3394(0x163)],'tableName':_0x11bbd4[_0x2b3394(0x150)],'name':_0x11bbd4['name']}]:[]);}function isWithinRoot(_0x168f4b,_0x3bc445){const _0x5c071b=a276_0x3b9ef0,_0x902a67=relative(_0x168f4b,_0x3bc445);return _0x902a67===''||!_0x902a67[_0x5c071b(0x15a)]('..')&&!isAbsolute(_0x902a67);}function resolveExistingFile(_0x355838){if(!existsSync(_0x355838))return undefined;try{return statSync(_0x355838)['isFile']()?realpathSync(_0x355838):undefined;}catch{return undefined;}}function a276_0x51be(_0x5808ab,_0x44ef19){_0x5808ab=_0x5808ab-0x14a;const _0x4b10af=a276_0x4b10();let _0x51becc=_0x4b10af[_0x5808ab];return _0x51becc;}function reexportCandidatePaths(_0xe413ba){const _0x1edc1c=a276_0x3b9ef0,_0x56624e=extname(_0xe413ba);if(!_0x56624e)return[...SOURCE_FILE_EXTENSIONS[_0x1edc1c(0x152)](_0xda1ea7=>''+_0xe413ba+_0xda1ea7),...SOURCE_FILE_EXTENSIONS['map'](_0x27f54b=>resolve(_0xe413ba,'index'+_0x27f54b))];const _0x5db534=SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION[_0x56624e];if(!_0x5db534)return[_0xe413ba];const _0x214b7c=_0xe413ba[_0x1edc1c(0x16f)](0x0,-_0x56624e[_0x1edc1c(0x14b)]);return[..._0x5db534[_0x1edc1c(0x152)](_0x73c237=>''+_0x214b7c+_0x73c237),_0xe413ba];}function resolveLocalReexport(_0x338072,_0x5e1918,_0x448a8b){const _0x13a77d=a276_0x3b9ef0;if(!_0x5e1918['startsWith']('./')&&!_0x5e1918[_0x13a77d(0x15a)](_0x13a77d(0x156)))return undefined;const _0x178975=resolve(dirname(_0x338072),_0x5e1918);if(!isWithinRoot(_0x448a8b,_0x178975))return undefined;for(const _0x432cf4 of reexportCandidatePaths(_0x178975)){const _0x330e39=resolveExistingFile(_0x432cf4);if(_0x330e39&&isWithinRoot(_0x448a8b,_0x330e39))return _0x330e39;}return undefined;}function parseApiFileTree(_0x5e429e,_0x123935,_0x4de3ad,_0x177910){const _0x15db38=a276_0x3b9ef0,_0x45d484=resolveExistingFile(_0x5e429e);if(!_0x45d484)return[];const _0x11400b=_0x4de3ad[_0x15db38(0x15d)](_0x45d484);if(_0x11400b!==undefined&&_0x11400b<=_0x177910)return[];_0x4de3ad['set'](_0x45d484,_0x177910);const _0x39349c=readFileSync(_0x45d484,_0x15db38(0x158)),_0x4f402a=parseApiFile(_0x39349c);if(_0x177910>=MAX_LOCAL_REEXPORT_DEPTH)return _0x4f402a;const _0x2898ce=new RegExp(LOCAL_REEXPORT_RE[_0x15db38(0x16a)],LOCAL_REEXPORT_RE['flags']);let _0x19d48a;while((_0x19d48a=_0x2898ce[_0x15db38(0x169)](_0x39349c))!==null){const _0x4b79bd=resolveLocalReexport(_0x45d484,_0x19d48a[0x1],_0x123935);_0x4b79bd&&_0x4f402a[_0x15db38(0x16e)](...parseApiFileTree(_0x4b79bd,_0x123935,_0x4de3ad,_0x177910+0x1));}return _0x4f402a;}function aliasProjectRoot(_0x131be6){const _0x2e6ee0=findProjectRootDirectory(dirname(_0x131be6));try{return realpathSync(_0x2e6ee0);}catch{return _0x2e6ee0;}}function uniqueAliasEntries(_0x2e902c){const _0x4a5d55=new Set();return _0x2e902c['filter'](_0x122a83=>{const _0x3fa613=a276_0x51be,_0x40f1aa=JSON['stringify'](_0x122a83);if(_0x4a5d55['has'](_0x40f1aa))return![];return _0x4a5d55[_0x3fa613(0x168)](_0x40f1aa),!![];});}export function loadAliasMap(_0x22ba3a,_0x2ba8b4,_0x38a408,_0x225ab1){const _0x292f13=a276_0x3b9ef0,_0x230d2d=resolve(_0x38a408??resolve(process[_0x292f13(0x160)](),_0x22ba3a,_0x292f13(0x15e))),_0x2bc57f=_0x225ab1?_0x230d2d+'#'+_0x225ab1:_0x230d2d;if(cache[_0x292f13(0x170)](_0x2bc57f))return cache[_0x292f13(0x15d)](_0x2bc57f);if(!existsSync(_0x230d2d))return cache['set'](_0x2bc57f,[]),[];try{if(_0x230d2d[_0x292f13(0x16b)](MODEL_REGISTRY_FILE_NAME)){const _0x59099a=readModelRegistry(_0x230d2d),_0x879fda=_0x225ab1??_0x59099a?.[_0x292f13(0x172)],_0x5b0494=_0x879fda&&_0x59099a?getProfileModels(_0x59099a,_0x879fda):[],_0x5c0fcb=uniqueAliasEntries(_0x5b0494[_0x292f13(0x153)](_0x4f57ad=>_0x4f57ad[_0x292f13(0x155)]?[{'alias':_0x4f57ad['alias'],'datasetCode':_0x4f57ad['datasetCode'],'tableName':_0x4f57ad['tableName'],'name':_0x4f57ad[_0x292f13(0x164)]}]:[]));return cache['set'](_0x2bc57f,_0x5c0fcb),_0x5c0fcb;}const _0x3577a5=uniqueAliasEntries(parseApiFileTree(_0x230d2d,aliasProjectRoot(_0x230d2d),new Map(),0x0));return cache[_0x292f13(0x174)](_0x2bc57f,_0x3577a5),_0x3577a5;}catch{return cache['set'](_0x2bc57f,[]),[];}}export function resolveAlias(_0x46b005,_0x1a7498,_0x1220d7,_0x5d8da1,_0x2ac791){const _0x314cb2=a276_0x3b9ef0;if(!_0x1a7498)return undefined;const _0x1b9100=loadAliasMap(_0x46b005,_0x1220d7,_0x5d8da1,_0x2ac791),_0x3a72f7=new Set(_0x1b9100[_0x314cb2(0x14f)](_0x5d055f=>_0x5d055f[_0x314cb2(0x155)]===_0x1a7498)['map'](_0x51be40=>_0x51be40[_0x314cb2(0x163)]));return _0x3a72f7[_0x314cb2(0x14e)]===0x1?[..._0x3a72f7][0x0]:undefined;}export function listAliases(_0x374caa,_0x2928fe,_0x294114,_0x17507f){return loadAliasMap(_0x374caa,_0x2928fe,_0x294114,_0x17507f);}