@lovrabet/rabetbase-cli 2.3.13-beta.3 → 2.3.14-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 (263) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/asset-update.js +1 -1
  103. package/lib/commands/menu/delete.js +1 -1
  104. package/lib/commands/menu/external-link-create.js +1 -1
  105. package/lib/commands/menu/external-link-update.js +1 -1
  106. package/lib/commands/menu/group-create.js +1 -1
  107. package/lib/commands/menu/group-update.js +1 -1
  108. package/lib/commands/menu/index.js +1 -1
  109. package/lib/commands/menu/list.js +1 -1
  110. package/lib/commands/menu/move.js +1 -1
  111. package/lib/commands/menu/regroup-start.js +1 -1
  112. package/lib/commands/menu/shared/compare-table.js +1 -1
  113. package/lib/commands/menu/shared/delete-plan.js +1 -1
  114. package/lib/commands/menu/shared/facts.js +1 -1
  115. package/lib/commands/menu/shared/index.js +1 -1
  116. package/lib/commands/menu/shared/inquirer.js +1 -1
  117. package/lib/commands/menu/shared/local-pages.js +1 -1
  118. package/lib/commands/menu/shared/logic.js +1 -1
  119. package/lib/commands/menu/shared/mutations.js +1 -1
  120. package/lib/commands/menu/shared/service.js +1 -1
  121. package/lib/commands/menu/shared/sync-core.js +1 -1
  122. package/lib/commands/menu/shared/update-core.js +1 -1
  123. package/lib/commands/menu/shared/valid-url.js +1 -1
  124. package/lib/commands/menu/sync.js +1 -1
  125. package/lib/commands/notification/config-list.js +1 -1
  126. package/lib/commands/notification/index.js +1 -1
  127. package/lib/commands/ocr/index.js +1 -0
  128. package/lib/commands/page/generate-start.js +1 -1
  129. package/lib/commands/page/generate-status.js +1 -1
  130. package/lib/commands/page/index.js +1 -1
  131. package/lib/commands/page/pull.js +1 -1
  132. package/lib/commands/page/push.js +1 -1
  133. package/lib/commands/page/relation-audit.js +1 -1
  134. package/lib/commands/page/restore.js +1 -0
  135. package/lib/commands/page/shared.js +1 -1
  136. package/lib/commands/page/standard-page-status.js +1 -1
  137. package/lib/commands/page/sync.js +1 -1
  138. package/lib/commands/permit/index.js +1 -1
  139. package/lib/commands/permit/page-get.js +1 -1
  140. package/lib/commands/permit/page-set.js +1 -1
  141. package/lib/commands/permit/role-apis-set.js +1 -1
  142. package/lib/commands/permit/role-menus-set.js +1 -1
  143. package/lib/commands/permit/role-menus.js +1 -1
  144. package/lib/commands/permit/shared.js +1 -1
  145. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  146. package/lib/commands/project/create/format-elapsed.js +1 -1
  147. package/lib/commands/project/create/main.js +1 -1
  148. package/lib/commands/project/create/non-interactive.js +1 -1
  149. package/lib/commands/project/create/project-template-path.js +1 -1
  150. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  151. package/lib/commands/project/create/use-format-code.js +1 -1
  152. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  153. package/lib/commands/project/index.js +1 -1
  154. package/lib/commands/project/init.js +1 -1
  155. package/lib/commands/project/upgrade.js +1 -1
  156. package/lib/commands/registry.js +1 -1
  157. package/lib/commands/role/create.js +1 -1
  158. package/lib/commands/role/delete.js +1 -1
  159. package/lib/commands/role/detail.js +1 -1
  160. package/lib/commands/role/index.js +1 -1
  161. package/lib/commands/role/list.js +1 -1
  162. package/lib/commands/role/shared.js +1 -1
  163. package/lib/commands/role/update.js +1 -1
  164. package/lib/commands/role/user-add.js +1 -1
  165. package/lib/commands/role/user-remove.js +1 -1
  166. package/lib/commands/role/user-resolve.js +1 -1
  167. package/lib/commands/run/index.js +1 -1
  168. package/lib/commands/schema.js +1 -1
  169. package/lib/commands/sql/create.js +1 -1
  170. package/lib/commands/sql/delete.js +1 -1
  171. package/lib/commands/sql/detail.js +1 -1
  172. package/lib/commands/sql/exec.js +1 -1
  173. package/lib/commands/sql/index.js +1 -1
  174. package/lib/commands/sql/list.js +1 -1
  175. package/lib/commands/sql/pull.js +1 -1
  176. package/lib/commands/sql/push.js +1 -1
  177. package/lib/commands/sql/save.js +1 -1
  178. package/lib/commands/sql/shared.js +1 -1
  179. package/lib/commands/sql/status.js +1 -1
  180. package/lib/commands/sql/validate.js +1 -1
  181. package/lib/commands/task/index.js +1 -1
  182. package/lib/commands/task/status.js +1 -1
  183. package/lib/commands/workspace/add.js +1 -1
  184. package/lib/commands/workspace/index.js +1 -1
  185. package/lib/commands/workspace/remove.js +1 -1
  186. package/lib/config/schema.js +1 -1
  187. package/lib/constant/cdn.js +1 -1
  188. package/lib/constant/cli.js +1 -1
  189. package/lib/constant/defaults.js +1 -1
  190. package/lib/constant/domain.js +1 -1
  191. package/lib/constant/env.js +1 -1
  192. package/lib/constant/output.js +1 -1
  193. package/lib/constant/paths.js +1 -1
  194. package/lib/constant/risk.js +1 -1
  195. package/lib/context/app-resolver.js +1 -1
  196. package/lib/context/auth-resolver.js +1 -1
  197. package/lib/context/config-loader.js +1 -1
  198. package/lib/context.js +1 -1
  199. package/lib/core/alias-resolver.js +1 -1
  200. package/lib/core/api-client.js +1 -1
  201. package/lib/core/bff/config.js +1 -1
  202. package/lib/core/bff/file-system.js +1 -1
  203. package/lib/core/bff/hash.js +1 -1
  204. package/lib/core/bff/lock.js +1 -1
  205. package/lib/core/bff/utils.js +1 -1
  206. package/lib/core/db-resolver.js +1 -1
  207. package/lib/core/page/file-system.js +1 -1
  208. package/lib/core/page/hash.js +1 -1
  209. package/lib/core/page/lock.js +1 -1
  210. package/lib/core/sql-index-auditor.js +1 -1
  211. package/lib/core/sql-sync/config.js +1 -1
  212. package/lib/core/sql-sync/file-system.js +1 -1
  213. package/lib/core/sql-sync/hash.js +1 -1
  214. package/lib/core/sql-sync/lock.js +1 -1
  215. package/lib/core/sql-sync/utils.js +1 -1
  216. package/lib/core/sql-validator.js +1 -1
  217. package/lib/errors.js +1 -1
  218. package/lib/framework/build-all-flags.js +1 -1
  219. package/lib/framework/error-output.js +1 -1
  220. package/lib/framework/explicit-yes.js +1 -1
  221. package/lib/framework/flags.js +1 -1
  222. package/lib/framework/help.js +1 -1
  223. package/lib/framework/index.js +1 -1
  224. package/lib/framework/output.js +1 -1
  225. package/lib/framework/response.js +1 -1
  226. package/lib/framework/runner-alias.js +1 -1
  227. package/lib/framework/runner.js +1 -1
  228. package/lib/framework/schema-export.js +1 -1
  229. package/lib/framework/types.js +1 -1
  230. package/lib/generated/build-info.js +1 -1
  231. package/lib/help.js +1 -1
  232. package/lib/skills/main.js +1 -1
  233. package/lib/skills/npx-skills-add.js +1 -1
  234. package/lib/telemetry/cli-command-trace.js +1 -1
  235. package/lib/telemetry/cli-help-trace.js +1 -1
  236. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  237. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  238. package/lib/telemetry/send-cli-trace-log.js +1 -1
  239. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  240. package/lib/utils/ai_config.js +1 -1
  241. package/lib/utils/apply-jq-filter.js +1 -1
  242. package/lib/utils/cdn-config.js +1 -1
  243. package/lib/utils/check-sdk-version.js +1 -1
  244. package/lib/utils/cli-version-check.js +1 -1
  245. package/lib/utils/cli-version-policy.js +1 -1
  246. package/lib/utils/config.js +1 -1
  247. package/lib/utils/copy-directory.js +1 -1
  248. package/lib/utils/entity-with-id.js +1 -1
  249. package/lib/utils/file-utils.js +1 -1
  250. package/lib/utils/guides-cdn.js +1 -1
  251. package/lib/utils/http-client.js +1 -1
  252. package/lib/utils/is-non-interactive.js +1 -1
  253. package/lib/utils/logger.js +1 -1
  254. package/lib/utils/params.js +1 -1
  255. package/lib/utils/platform.js +1 -1
  256. package/lib/utils/rules-cdn.js +1 -1
  257. package/lib/utils/sleep.js +1 -1
  258. package/lib/utils/template-replacer.js +1 -1
  259. package/lib/utils/update-notice.js +1 -1
  260. package/lib/utils/version.js +1 -1
  261. package/lib/utils/with-active-cookie.js +1 -1
  262. package/lib/utils/write-cli-side-channel.js +1 -1
  263. package/package.json +1 -1
@@ -1 +1 @@
1
- const a188_0x5d9e4c=a188_0x1119;(function(_0xd6f0c1,_0x2bc356){const _0x186709=a188_0x1119,_0x168f29=_0xd6f0c1();while(!![]){try{const _0x5ce88a=parseInt(_0x186709(0xc4))/0x1+-parseInt(_0x186709(0xcb))/0x2+parseInt(_0x186709(0xcc))/0x3*(parseInt(_0x186709(0xc2))/0x4)+-parseInt(_0x186709(0xc7))/0x5+-parseInt(_0x186709(0xd0))/0x6*(-parseInt(_0x186709(0xd4))/0x7)+parseInt(_0x186709(0xd2))/0x8*(-parseInt(_0x186709(0xc0))/0x9)+parseInt(_0x186709(0xd1))/0xa*(parseInt(_0x186709(0xca))/0xb);if(_0x5ce88a===_0x2bc356)break;else _0x168f29['push'](_0x168f29['shift']());}catch(_0x1d6b50){_0x168f29['push'](_0x168f29['shift']());}}}(a188_0x207e,0x8cd11));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;function a188_0x1119(_0x4c8761,_0xdd35dc){_0x4c8761=_0x4c8761-0xc0;const _0x207e2d=a188_0x207e();let _0x111968=_0x207e2d[_0x4c8761];return _0x111968;}function a188_0x207e(){const _0x17d9c5=['66492rlKAjl','https://user-daily.lovrabet.com','44ESqYtn','https://daily-api.lovrabet.com','242643RnhWGW','apiDomain','runtimeDomain','4284035cgjnkT','/app/','trim','107558MCQNNd','1809506jwAdon','218181VKXNWf','https://daily-runtime.lovrabet.com','/web-app/app/','userDomain','727626ggNwor','1730kuPIeL','560djGqoN','https://app.lovrabet.com','7BDHkBN'];a188_0x207e=function(){return _0x17d9c5;};return a188_0x207e();}export function initDomains(_0x10cdc2){const _0x307024=a188_0x1119;customApiDomain=_0x10cdc2?.[_0x307024(0xc5)],customUserDomain=_0x10cdc2?.[_0x307024(0xcf)],customRuntimeDomain=_0x10cdc2?.[_0x307024(0xc6)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':a188_0x5d9e4c(0xc1));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a188_0x5d9e4c(0xc3));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a188_0x5d9e4c(0xcd));export const getAppDomain=()=>isProduction(getEnv())?a188_0x5d9e4c(0xd3):'https://daily.lovrabet.com';export const getAppBaseUrl=_0x5b9db2=>{const _0x3f8ab1=a188_0x5d9e4c,_0x3af3c8=encodeURIComponent(_0x5b9db2[_0x3f8ab1(0xc9)]());return isProduction(getEnv())?getAppDomain()+_0x3f8ab1(0xc8)+_0x3af3c8:getAppDomain()+_0x3f8ab1(0xce)+_0x3af3c8;};
1
+ const a190_0x2bb7b1=a190_0x1d8e;(function(_0x37e0d0,_0x5b9a66){const _0x201149=a190_0x1d8e,_0x1eb60f=_0x37e0d0();while(!![]){try{const _0x2f1d4a=-parseInt(_0x201149(0x8d))/0x1+parseInt(_0x201149(0x89))/0x2+parseInt(_0x201149(0x8e))/0x3+-parseInt(_0x201149(0x81))/0x4*(parseInt(_0x201149(0x90))/0x5)+-parseInt(_0x201149(0x8b))/0x6*(parseInt(_0x201149(0x84))/0x7)+parseInt(_0x201149(0x91))/0x8+-parseInt(_0x201149(0x88))/0x9*(parseInt(_0x201149(0x82))/0xa);if(_0x2f1d4a===_0x5b9a66)break;else _0x1eb60f['push'](_0x1eb60f['shift']());}catch(_0x5c8dd5){_0x1eb60f['push'](_0x1eb60f['shift']());}}}(a190_0xecaa,0x58cec));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x49d09a){const _0x321d91=a190_0x1d8e;customApiDomain=_0x49d09a?.[_0x321d91(0x85)],customUserDomain=_0x49d09a?.['userDomain'],customRuntimeDomain=_0x49d09a?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a190_0x2bb7b1(0x8c):'https://user-daily.lovrabet.com');function a190_0xecaa(){const _0x4815e4=['155kqoPjN','5541448pCarIV','/web-app/app/','https://api.lovrabet.com','91700gDsMOB','12010qJoaBM','https://runtime.lovrabet.com','287pQbsNp','apiDomain','/app/','https://daily.lovrabet.com','234GDlSCh','1394386XqwZMe','https://app.lovrabet.com','19662lldomy','https://user.lovrabet.com','317477uVEPlh','502851NtXhHh','https://daily-api.lovrabet.com'];a190_0xecaa=function(){return _0x4815e4;};return a190_0xecaa();}function a190_0x1d8e(_0x33beee,_0x2d6a38){_0x33beee=_0x33beee-0x81;const _0xecaa47=a190_0xecaa();let _0x1d8ecc=_0xecaa47[_0x33beee];return _0x1d8ecc;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a190_0x2bb7b1(0x93):a190_0x2bb7b1(0x8f));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a190_0x2bb7b1(0x83):'https://daily-runtime.lovrabet.com');export const getAppDomain=()=>isProduction(getEnv())?a190_0x2bb7b1(0x8a):a190_0x2bb7b1(0x87);export const getAppBaseUrl=_0x5c31d8=>{const _0x5dab41=a190_0x2bb7b1,_0x41546f=encodeURIComponent(_0x5c31d8['trim']());return isProduction(getEnv())?getAppDomain()+_0x5dab41(0x86)+_0x41546f:getAppDomain()+_0x5dab41(0x92)+_0x41546f;};
@@ -1 +1 @@
1
- function a189_0x4651(){const _0x5143e9=['1042310OqwAdX','63IkTKiO','123963WwExWR','2091236RTjLax','232HPaRQS','3NhJMyr','867392umXuxZ','development','21481428Nzyrba','6CJLCux','dev','daily','11rPvQtw','5761475Iwcczj','online','production','2832628Eevhqy'];a189_0x4651=function(){return _0x5143e9;};return a189_0x4651();}const a189_0x3499f2=a189_0x4856;(function(_0x5bf06c,_0x15fff1){const _0x25198d=a189_0x4856,_0xae7d17=_0x5bf06c();while(!![]){try{const _0x56dd84=parseInt(_0x25198d(0xcd))/0x1+-parseInt(_0x25198d(0xca))/0x2*(-parseInt(_0x25198d(0xcc))/0x3)+-parseInt(_0x25198d(0xc6))/0x4+parseInt(_0x25198d(0xd4))/0x5*(parseInt(_0x25198d(0xd0))/0x6)+-parseInt(_0x25198d(0xc9))/0x7*(parseInt(_0x25198d(0xcb))/0x8)+-parseInt(_0x25198d(0xc8))/0x9*(-parseInt(_0x25198d(0xc7))/0xa)+-parseInt(_0x25198d(0xd3))/0xb*(parseInt(_0x25198d(0xcf))/0xc);if(_0x56dd84===_0x15fff1)break;else _0xae7d17['push'](_0xae7d17['shift']());}catch(_0x48d8ce){_0xae7d17['push'](_0xae7d17['shift']());}}}(a189_0x4651,0xbf2ed));export const RABETBASE_ENV_VALUES=['production',a189_0x3499f2(0xd2)];export function normalizeEnv(_0xd24dee){const _0x4a8d81=a189_0x3499f2;return _0xd24dee===_0x4a8d81(0xc4)?_0x4a8d81(0xc5):_0xd24dee;}export function isProduction(_0x563357){const _0x10df5b=a189_0x3499f2;return normalizeEnv(_0x563357)===_0x10df5b(0xc5);}export function isDaily(_0x4874c4){const _0x98c37c=a189_0x3499f2;return normalizeEnv(_0x4874c4)===_0x98c37c(0xd2);}export function isDev(_0xfab55e){const _0x5b0512=a189_0x3499f2,_0x447f55=normalizeEnv(_0xfab55e);return _0x447f55===_0x5b0512(0xce)||_0x447f55===_0x5b0512(0xd1);}function a189_0x4856(_0x5568b9,_0x277f40){_0x5568b9=_0x5568b9-0xc4;const _0x46518f=a189_0x4651();let _0x485654=_0x46518f[_0x5568b9];return _0x485654;}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a189_0x3499f2(0xc5));export function getEnv(){return env;}export function initEnv(_0x4d9fba){env=normalizeEnv(_0x4d9fba);}
1
+ function a191_0x3175(_0x191661,_0xeea93c){_0x191661=_0x191661-0x1b9;const _0x3f2d7d=a191_0x3f2d();let _0x317580=_0x3f2d7d[_0x191661];return _0x317580;}const a191_0x5a1a54=a191_0x3175;(function(_0x44e3c3,_0x5bc208){const _0x58f143=a191_0x3175,_0x404ab0=_0x44e3c3();while(!![]){try{const _0x2e4adc=-parseInt(_0x58f143(0x1ba))/0x1+-parseInt(_0x58f143(0x1bf))/0x2+-parseInt(_0x58f143(0x1bb))/0x3*(-parseInt(_0x58f143(0x1bc))/0x4)+parseInt(_0x58f143(0x1c5))/0x5+-parseInt(_0x58f143(0x1c6))/0x6*(-parseInt(_0x58f143(0x1c1))/0x7)+-parseInt(_0x58f143(0x1be))/0x8*(parseInt(_0x58f143(0x1b9))/0x9)+parseInt(_0x58f143(0x1c7))/0xa;if(_0x2e4adc===_0x5bc208)break;else _0x404ab0['push'](_0x404ab0['shift']());}catch(_0x4ddd7f){_0x404ab0['push'](_0x404ab0['shift']());}}}(a191_0x3f2d,0x74b51));export const RABETBASE_ENV_VALUES=[a191_0x5a1a54(0x1c0),'daily'];export function normalizeEnv(_0x1bee6f){const _0x152f40=a191_0x5a1a54;return _0x1bee6f===_0x152f40(0x1c2)?_0x152f40(0x1c0):_0x1bee6f;}export function isProduction(_0x1e4300){const _0xe7e304=a191_0x5a1a54;return normalizeEnv(_0x1e4300)===_0xe7e304(0x1c0);}export function isDaily(_0x25a233){const _0x24c8b3=a191_0x5a1a54;return normalizeEnv(_0x25a233)===_0x24c8b3(0x1c4);}export function isDev(_0x1e80bc){const _0x3c41e7=a191_0x5a1a54,_0x25f539=normalizeEnv(_0x1e80bc);return _0x25f539===_0x3c41e7(0x1bd)||_0x25f539===_0x3c41e7(0x1c3);}function a191_0x3f2d(){const _0x1bdfcb=['3479384uNWjtc','894236rVaZsb','production','91LEPBwl','online','dev','daily','1340105xgIpnB','406254GJqyCn','2173650epeIRp','9uYrnKB','906063dvocTO','9sAizCN','1200712EpkIiV','development'];a191_0x3f2d=function(){return _0x1bdfcb;};return a191_0x3f2d();}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a191_0x5a1a54(0x1c0));export function getEnv(){return env;}export function initEnv(_0x11d3e7){env=normalizeEnv(_0x11d3e7);}
@@ -1 +1 @@
1
- const a190_0x2ed03a=a190_0xe618;(function(_0x225090,_0x45a282){const _0x3da2be=a190_0xe618,_0x519b61=_0x225090();while(!![]){try{const _0x2eebf3=-parseInt(_0x3da2be(0x8e))/0x1+-parseInt(_0x3da2be(0x93))/0x2+parseInt(_0x3da2be(0x94))/0x3*(-parseInt(_0x3da2be(0x97))/0x4)+parseInt(_0x3da2be(0x91))/0x5*(-parseInt(_0x3da2be(0x90))/0x6)+parseInt(_0x3da2be(0x98))/0x7+-parseInt(_0x3da2be(0x92))/0x8+parseInt(_0x3da2be(0x99))/0x9*(parseInt(_0x3da2be(0x96))/0xa);if(_0x2eebf3===_0x45a282)break;else _0x519b61['push'](_0x519b61['shift']());}catch(_0x312262){_0x519b61['push'](_0x519b61['shift']());}}}(a190_0x4a27,0xa113d));function a190_0x4a27(){const _0x13ac3c=['14214UpgYdL','515lrbeGE','6121056zhZMnn','703250kFPcat','123AJIGcH','compress','10UFDNXf','35444RNWvhr','5415956ZkrAzI','20239803MoPVVj','638737yucqUW','pretty'];a190_0x4a27=function(){return _0x13ac3c;};return a190_0x4a27();}function a190_0xe618(_0x8ef3eb,_0x43f0b3){_0x8ef3eb=_0x8ef3eb-0x8e;const _0x4a2776=a190_0x4a27();let _0xe618a3=_0x4a2776[_0x8ef3eb];return _0xe618a3;}export const RABETBASE_OUTPUT_FORMAT_VALUES=['json',a190_0x2ed03a(0x8f),a190_0x2ed03a(0x95)];
1
+ const a192_0x542973=a192_0x57bf;function a192_0x57bf(_0x3eaa43,_0x4837b9){_0x3eaa43=_0x3eaa43-0x157;const _0x21f850=a192_0x21f8();let _0x57bfd7=_0x21f850[_0x3eaa43];return _0x57bfd7;}function a192_0x21f8(){const _0x4e7002=['24UHVEJc','2405ysehbY','343064FuyHLW','27748EdwhQc','36xFikWI','pretty','json','349783AWVsUC','118550ZMDoxX','104oDQIMS','171ZhYIVW','49287MIuHDO','7442556TbClBc'];a192_0x21f8=function(){return _0x4e7002;};return a192_0x21f8();}(function(_0x38c76f,_0x55baaf){const _0x2f5023=a192_0x57bf,_0x16bbef=_0x38c76f();while(!![]){try{const _0x41e0dd=parseInt(_0x2f5023(0x15f))/0x1*(parseInt(_0x2f5023(0x15c))/0x2)+parseInt(_0x2f5023(0x15a))/0x3+-parseInt(_0x2f5023(0x158))/0x4*(-parseInt(_0x2f5023(0x15d))/0x5)+parseInt(_0x2f5023(0x160))/0x6*(parseInt(_0x2f5023(0x163))/0x7)+-parseInt(_0x2f5023(0x15e))/0x8+-parseInt(_0x2f5023(0x159))/0x9*(-parseInt(_0x2f5023(0x157))/0xa)+-parseInt(_0x2f5023(0x15b))/0xb;if(_0x41e0dd===_0x55baaf)break;else _0x16bbef['push'](_0x16bbef['shift']());}catch(_0x4ceb67){_0x16bbef['push'](_0x16bbef['shift']());}}}(a192_0x21f8,0x28e43));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a192_0x542973(0x162),a192_0x542973(0x161),'compress'];
@@ -1 +1 @@
1
- function a191_0x386c(){const _0x27a65f=['204253zgqwsH','1148585qyFCfm','9VEyidM','3162676CzYnME','259054hyowUY','18iJaTyT','353641NwioHV','1505400iNzgzD','./src/api','10082728VtYjPV'];a191_0x386c=function(){return _0x27a65f;};return a191_0x386c();}const a191_0x1e20b4=a191_0x39df;function a191_0x39df(_0x50f39a,_0x480b67){_0x50f39a=_0x50f39a-0x185;const _0x386c6c=a191_0x386c();let _0x39dfbe=_0x386c6c[_0x50f39a];return _0x39dfbe;}(function(_0x16211c,_0x6fed8c){const _0x3e0950=a191_0x39df,_0x31ea77=_0x16211c();while(!![]){try{const _0x2a3711=-parseInt(_0x3e0950(0x18b))/0x1+parseInt(_0x3e0950(0x189))/0x2*(-parseInt(_0x3e0950(0x187))/0x3)+-parseInt(_0x3e0950(0x188))/0x4+-parseInt(_0x3e0950(0x186))/0x5+-parseInt(_0x3e0950(0x18c))/0x6+-parseInt(_0x3e0950(0x185))/0x7+parseInt(_0x3e0950(0x18e))/0x8*(parseInt(_0x3e0950(0x18a))/0x9);if(_0x2a3711===_0x6fed8c)break;else _0x31ea77['push'](_0x31ea77['shift']());}catch(_0x347bbc){_0x31ea77['push'](_0x31ea77['shift']());}}}(a191_0x386c,0x74b2b));export const DEFAULT_API_DIR=a191_0x1e20b4(0x18d);
1
+ const a193_0x3cea73=a193_0x4e35;(function(_0x565489,_0x395a8f){const _0x4fbd8e=a193_0x4e35,_0x5ad83f=_0x565489();while(!![]){try{const _0x544969=parseInt(_0x4fbd8e(0x1c6))/0x1+-parseInt(_0x4fbd8e(0x1ca))/0x2*(-parseInt(_0x4fbd8e(0x1c2))/0x3)+parseInt(_0x4fbd8e(0x1c7))/0x4+-parseInt(_0x4fbd8e(0x1c1))/0x5+parseInt(_0x4fbd8e(0x1c5))/0x6+parseInt(_0x4fbd8e(0x1c4))/0x7+-parseInt(_0x4fbd8e(0x1c8))/0x8*(parseInt(_0x4fbd8e(0x1c3))/0x9);if(_0x544969===_0x395a8f)break;else _0x5ad83f['push'](_0x5ad83f['shift']());}catch(_0x466269){_0x5ad83f['push'](_0x5ad83f['shift']());}}}(a193_0x3b1f,0xdd167));function a193_0x3b1f(){const _0x200e11=['18621600ojzNqT','./src/api','323732GTEwDn','5965420glWAMp','15YDkZou','9HYNyJn','4236337YJhuxC','7068540uUpskQ','825916hgTMDe','4031328jWuenq'];a193_0x3b1f=function(){return _0x200e11;};return a193_0x3b1f();}function a193_0x4e35(_0x478bae,_0x288c81){_0x478bae=_0x478bae-0x1c1;const _0x3b1fd1=a193_0x3b1f();let _0x4e35af=_0x3b1fd1[_0x478bae];return _0x4e35af;}export const DEFAULT_API_DIR=a193_0x3cea73(0x1c9);
@@ -1 +1 @@
1
- const a192_0x2a44f5=a192_0x2b67;function a192_0x2b67(_0x80e60,_0x133cf4){_0x80e60=_0x80e60-0x64;const _0x34c943=a192_0x34c9();let _0x2b67aa=_0x34c943[_0x80e60];return _0x2b67aa;}(function(_0x983875,_0x2cc0b5){const _0x513aa6=a192_0x2b67,_0x6a3771=_0x983875();while(!![]){try{const _0x3811bf=-parseInt(_0x513aa6(0x6a))/0x1+parseInt(_0x513aa6(0x66))/0x2*(parseInt(_0x513aa6(0x6d))/0x3)+-parseInt(_0x513aa6(0x68))/0x4+parseInt(_0x513aa6(0x65))/0x5+parseInt(_0x513aa6(0x6f))/0x6*(-parseInt(_0x513aa6(0x69))/0x7)+parseInt(_0x513aa6(0x6b))/0x8+-parseInt(_0x513aa6(0x67))/0x9*(-parseInt(_0x513aa6(0x64))/0xa);if(_0x3811bf===_0x2cc0b5)break;else _0x6a3771['push'](_0x6a3771['shift']());}catch(_0x22c940){_0x6a3771['push'](_0x6a3771['shift']());}}}(a192_0x34c9,0xac675));function a192_0x34c9(){const _0x145732=['2403rMrSEZ','write','1632VnnGIQ','high-risk-write','13190Kactes','4851315RVxHsW','1810NWvNht','1161KYjLer','379212NjijTO','35609UDYFhf','84855wZNsJE','3233344iBxvuv','read'];a192_0x34c9=function(){return _0x145732;};return a192_0x34c9();}export const RISK_LEVEL_VALUES=[a192_0x2a44f5(0x6c),a192_0x2a44f5(0x6e),a192_0x2a44f5(0x70)];
1
+ const a194_0x46533b=a194_0x3d73;(function(_0x228c79,_0xb6db55){const _0x3f3369=a194_0x3d73,_0x5c3f09=_0x228c79();while(!![]){try{const _0x43f0e5=parseInt(_0x3f3369(0x13f))/0x1+-parseInt(_0x3f3369(0x146))/0x2*(-parseInt(_0x3f3369(0x148))/0x3)+-parseInt(_0x3f3369(0x149))/0x4*(parseInt(_0x3f3369(0x142))/0x5)+-parseInt(_0x3f3369(0x147))/0x6+parseInt(_0x3f3369(0x144))/0x7*(-parseInt(_0x3f3369(0x140))/0x8)+parseInt(_0x3f3369(0x141))/0x9+-parseInt(_0x3f3369(0x143))/0xa*(parseInt(_0x3f3369(0x13d))/0xb);if(_0x43f0e5===_0xb6db55)break;else _0x5c3f09['push'](_0x5c3f09['shift']());}catch(_0x23bb6f){_0x5c3f09['push'](_0x5c3f09['shift']());}}}(a194_0x4658,0x2b85c));export const RISK_LEVEL_VALUES=[a194_0x46533b(0x145),'write',a194_0x46533b(0x13e)];function a194_0x3d73(_0x4a4d82,_0x38f2ed){_0x4a4d82=_0x4a4d82-0x13d;const _0x465870=a194_0x4658();let _0x3d7332=_0x465870[_0x4a4d82];return _0x3d7332;}function a194_0x4658(){const _0x1a722c=['11368IGBfnu','2671308vqAkBq','395ayUkRj','30eosmGG','889NjxAIk','read','550uPdeHi','81546oJzWWc','2181ccSdWN','3360GskNFE','547921qoJGHU','high-risk-write','91382jmvmhv'];a194_0x4658=function(){return _0x1a722c;};return a194_0x4658();}
@@ -1 +1 @@
1
- (function(_0x43d098,_0x20356f){const _0x3b219f=a193_0x4a9c,_0x1adb54=_0x43d098();while(!![]){try{const _0x3a6351=parseInt(_0x3b219f(0xb6))/0x1+-parseInt(_0x3b219f(0xc1))/0x2+-parseInt(_0x3b219f(0xc8))/0x3+-parseInt(_0x3b219f(0xd4))/0x4+-parseInt(_0x3b219f(0xca))/0x5*(parseInt(_0x3b219f(0xd9))/0x6)+-parseInt(_0x3b219f(0xcf))/0x7*(parseInt(_0x3b219f(0xd6))/0x8)+parseInt(_0x3b219f(0xdb))/0x9;if(_0x3a6351===_0x20356f)break;else _0x1adb54['push'](_0x1adb54['shift']());}catch(_0x5c1da1){_0x1adb54['push'](_0x1adb54['shift']());}}}(a193_0x267e,0xedb5a));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';function a193_0x267e(){const _0x243683=['entries','globalConfig','10905276ffBMlP','riskLevel','58210236TfPQIt','length','APP','FORMAT','appcode','1035680gbbHSo','VERBOSE','RISK_LEVEL','pageSize','env','daily','apps','production','locale','read','format','2705116blxSuX','cookie','inherit','projectConfig','trim','maxRisk','COOKIE','1695258tzuLHp','defaultApp','5LKENPB','keys','true','app','find','938BzXpTO','ACCESS_KEY','string','write','apiDir','3438168ykEmre','object','115528TbGiFf'];a193_0x267e=function(){return _0x243683;};return a193_0x267e();}import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x39e161){const _0xaabc62=a193_0x4a9c;return typeof _0x39e161===_0xaabc62(0xd1)&&_0x39e161[_0xaabc62(0xc5)]()?_0x39e161[_0xaabc62(0xc5)]():undefined;}function appProfiles(_0x5bd12e){const _0x3e0b56=a193_0x4a9c;return _0x5bd12e['apps']&&typeof _0x5bd12e[_0x3e0b56(0xbc)]==='object'?_0x5bd12e['apps']:{};}function a193_0x4a9c(_0x2d4a41,_0x46d7e4){_0x2d4a41=_0x2d4a41-0xb2;const _0x267e1d=a193_0x267e();let _0x4a9cfe=_0x267e1d[_0x2d4a41];return _0x4a9cfe;}function resolveDefaultAppName(_0x14b148){const _0x148e8a=a193_0x4a9c,_0x6eb4ad=stringConfigValue(_0x14b148[_0x148e8a(0xc9)]);if(_0x6eb4ad)return _0x6eb4ad;return Object[_0x148e8a(0xcb)](appProfiles(_0x14b148))[0x0];}function resolveTopLevelAppCode(_0x3e77cc){const _0x1f5b2b=a193_0x4a9c;return stringConfigValue(_0x3e77cc[_0x1f5b2b(0xb5)])||stringConfigValue(_0x3e77cc[_0x1f5b2b(0xcd)]);}export function resolveAppConfig({raw:_0x104864,flags:_0x354c96,layers:_0x30ebba,readEnv:_0x413559}){const _0x2e1194=a193_0x4a9c,_0x553d6a=_0x30ebba?.[_0x2e1194(0xc4)]??{},_0x1cf27f=_0x30ebba?.[_0x2e1194(0xd8)]??{},_0x408f19=Object['keys'](_0x553d6a)['length']>0x0,_0xf5f3f2=!_0x408f19||_0x553d6a[_0x2e1194(0xc3)]===!![],_0x35d23a=_0x408f19?resolveDefaultAppName(_0x553d6a):undefined,_0x4375a0=_0xf5f3f2?resolveDefaultAppName(_0x1cf27f):undefined,_0x3def79=stringConfigValue(_0x354c96[_0x2e1194(0xcd)]),_0x51cd1e=_0x413559(_0x2e1194(0xb3)),_0x4165d1={};if(_0x104864[_0x2e1194(0xbc)]&&typeof _0x104864[_0x2e1194(0xbc)]===_0x2e1194(0xd5))for(const [_0x1f1a52,_0x536a3f]of Object['entries'](_0x104864[_0x2e1194(0xbc)])){_0x536a3f&&typeof _0x536a3f===_0x2e1194(0xd5)&&_0x536a3f[_0x2e1194(0xb5)]&&(_0x4165d1[_0x1f1a52]=_0x536a3f);}const _0x41a1fa=_0x104864['defaultApp']||undefined,_0x434ad6=Object[_0x2e1194(0xcb)](_0x4165d1)[_0x2e1194(0xb2)]>0x0,_0x567b1f=_0x3def79||_0x35d23a||_0x51cd1e||_0x4375a0||_0x41a1fa||undefined,_0x5971d5=stringConfigValue(_0x354c96[_0x2e1194(0xb5)]),_0x3803bd=_0x5971d5?Object[_0x2e1194(0xd7)](_0x4165d1)[_0x2e1194(0xce)](([,_0x5a9ec0])=>_0x5a9ec0?.['appcode']===_0x5971d5):undefined,_0x4a0e8a=_0x3803bd?.[0x0],_0x472ca2=_0x3803bd?.[0x1],_0x42d095=_0x5971d5?_0x4a0e8a:_0x567b1f;let _0x1a653f=_0x42d095&&_0x4165d1[_0x42d095]?_0x4165d1[_0x42d095]:undefined;_0x5971d5&&_0x472ca2&&(_0x1a653f=_0x472ca2);const _0x3bbea9=_0x5971d5?_0x472ca2??_0x1a653f:_0x1a653f,_0xc6cda2=!_0x3def79&&!_0x35d23a&&_0x51cd1e&&_0x42d095===_0x51cd1e,_0x580244=_0x3def79||(_0xc6cda2?_0x51cd1e:undefined)||(_0x5971d5?_0x4a0e8a:undefined),_0x22a518=_0x3bbea9?.['appcode'],_0x1dc1cc=_0x408f19?resolveTopLevelAppCode(_0x553d6a):undefined,_0x519dd3=_0xf5f3f2?resolveTopLevelAppCode(_0x1cf27f):undefined,_0x5ab3f7=_0x3def79||_0x35d23a?_0x22a518:undefined,_0x543c33=!_0x3def79&&!_0x35d23a?_0x22a518:undefined,_0x222416=_0x5971d5||_0x5ab3f7||_0x1dc1cc||_0x543c33||_0x519dd3||undefined,_0x2204e3=_0x408f19?stringConfigValue(_0x553d6a[_0x2e1194(0xba)]):undefined,_0x1a7a2b=_0xf5f3f2?stringConfigValue(_0x1cf27f[_0x2e1194(0xba)]):undefined,_0x39163b=_0x354c96[_0x2e1194(0xba)]||_0x3bbea9?.['env']||_0x2204e3||_0x413559('ENV')||_0x1a7a2b||_0x104864[_0x2e1194(0xba)]||DEFAULT_CONFIG_VALUES[_0x2e1194(0xba)],_0x1c9381=_0x3bbea9?.[_0x2e1194(0xbe)]||_0x104864[_0x2e1194(0xbe)]||DEFAULT_CONFIG_VALUES['locale'],_0x8dbbf0=_0x413559(_0x2e1194(0xc7))||_0x3bbea9?.[_0x2e1194(0xc2)]||_0x104864[_0x2e1194(0xc2)]||undefined,_0x475cd7=_0x413559(_0x2e1194(0xd0))||_0x3bbea9?.['accessKey']||_0x104864['accessKey']||undefined,_0x3d9017=_0x354c96[_0x2e1194(0xc0)]||_0x413559(_0x2e1194(0xb4))||_0x3bbea9?.[_0x2e1194(0xc0)]||_0x104864[_0x2e1194(0xc0)],_0x28b641=normalizeLegacyOutputFormat(_0x3d9017),_0x497c48=_0x413559('PAGE_SIZE')||_0x3bbea9?.[_0x2e1194(0xb9)]||_0x104864['pageSize'],_0x16b367=_0x497c48?Number(_0x497c48)||undefined:undefined,_0x25722b=_0x413559(_0x2e1194(0xb8))||_0x413559('MAX_RISK')||_0x3bbea9?.[_0x2e1194(0xda)]||_0x104864['riskLevel']||_0x104864[_0x2e1194(0xc6)],_0x55a194=_0x25722b===_0x2e1194(0xbf)||_0x25722b===_0x2e1194(0xd2)?_0x25722b:DEFAULT_CONFIG_VALUES['riskLevel'],_0x4381af=_0x413559(_0x2e1194(0xb7)),_0x49a9d4=_0x4381af==='1'||_0x4381af===_0x2e1194(0xcc),_0x287aba=_0x3bbea9?.['apiDir']||_0x104864[_0x2e1194(0xd3)]||DEFAULT_CONFIG_VALUES[_0x2e1194(0xd3)],_0x50c4dc=isDaily(normalizeEnv(String(_0x39163b)))?_0x2e1194(0xbb):_0x2e1194(0xbd);return{'appCode':typeof _0x222416===_0x2e1194(0xd1)&&_0x222416['trim']()?_0x222416[_0x2e1194(0xc5)]():undefined,'env':_0x50c4dc,'locale':_0x1c9381,'cookie':_0x8dbbf0,'accessKey':_0x475cd7,'format':_0x28b641,'pageSize':_0x16b367,'riskLevel':_0x55a194,'verbose':_0x49a9d4,'apiDir':_0x287aba,'apps':_0x4165d1,'defaultApp':_0x41a1fa,'currentApp':_0x434ad6?_0x42d095:undefined,'explicitAppName':_0x580244};}
1
+ (function(_0x1fbddd,_0x53a77e){const _0x10ac95=a195_0x2575,_0x4ff196=_0x1fbddd();while(!![]){try{const _0x4abf8c=parseInt(_0x10ac95(0x156))/0x1+parseInt(_0x10ac95(0x16e))/0x2*(-parseInt(_0x10ac95(0x14e))/0x3)+-parseInt(_0x10ac95(0x14c))/0x4+-parseInt(_0x10ac95(0x163))/0x5+-parseInt(_0x10ac95(0x14a))/0x6*(parseInt(_0x10ac95(0x166))/0x7)+parseInt(_0x10ac95(0x15d))/0x8*(-parseInt(_0x10ac95(0x154))/0x9)+parseInt(_0x10ac95(0x157))/0xa*(parseInt(_0x10ac95(0x14f))/0xb);if(_0x4abf8c===_0x53a77e)break;else _0x4ff196['push'](_0x4ff196['shift']());}catch(_0x3afb54){_0x4ff196['push'](_0x4ff196['shift']());}}}(a195_0x51e3,0x2bbef));function a195_0x51e3(){const _0x51acf9=['true','accessKey','find','inherit','39738XdnRHE','appcode','MAX_RISK','VERBOSE','APP','env','FORMAT','write','6SUDvey','object','1173572QAByUC','apiDir','15EfePqL','11PsEUiq','format','globalConfig','pageSize','locale','236799mqINEH','cookie','34889NwBwuT','7794890mVSMeW','COOKIE','PAGE_SIZE','riskLevel','entries','projectConfig','16ENWAUB','read','apps','length','keys','trim','208905GiCKBC','app','ENV','1036378xxyHjd','string','ACCESS_KEY','defaultApp'];a195_0x51e3=function(){return _0x51acf9;};return a195_0x51e3();}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x32040e){const _0x32304a=a195_0x2575;return typeof _0x32040e===_0x32304a(0x167)&&_0x32040e[_0x32304a(0x162)]()?_0x32040e[_0x32304a(0x162)]():undefined;}function appProfiles(_0xb4714b){const _0x1a2fbe=a195_0x2575;return _0xb4714b['apps']&&typeof _0xb4714b[_0x1a2fbe(0x15f)]===_0x1a2fbe(0x14b)?_0xb4714b[_0x1a2fbe(0x15f)]:{};}function resolveDefaultAppName(_0x370be0){const _0x3a7e01=a195_0x2575,_0x30d8e3=stringConfigValue(_0x370be0[_0x3a7e01(0x169)]);if(_0x30d8e3)return _0x30d8e3;return Object[_0x3a7e01(0x161)](appProfiles(_0x370be0))[0x0];}function a195_0x2575(_0xeb1851,_0x1375dc){_0xeb1851=_0xeb1851-0x143;const _0x51e365=a195_0x51e3();let _0x257596=_0x51e365[_0xeb1851];return _0x257596;}function resolveTopLevelAppCode(_0x19f3d5){const _0x3c1b76=a195_0x2575;return stringConfigValue(_0x19f3d5[_0x3c1b76(0x143)])||stringConfigValue(_0x19f3d5[_0x3c1b76(0x164)]);}export function resolveAppConfig({raw:_0x3a1f62,flags:_0x46a71e,layers:_0x1c009b,readEnv:_0x2ca2d7}){const _0x4f65e1=a195_0x2575,_0x469fd5=_0x1c009b?.[_0x4f65e1(0x15c)]??{},_0x3c3e23=_0x1c009b?.[_0x4f65e1(0x151)]??{},_0x3868c0=Object[_0x4f65e1(0x161)](_0x469fd5)['length']>0x0,_0x17b978=!_0x3868c0||_0x469fd5[_0x4f65e1(0x16d)]===!![],_0x3a6e3b=_0x3868c0?resolveDefaultAppName(_0x469fd5):undefined,_0x5a0f35=_0x17b978?resolveDefaultAppName(_0x3c3e23):undefined,_0x3461ee=stringConfigValue(_0x46a71e[_0x4f65e1(0x164)]),_0x16f20c=_0x2ca2d7(_0x4f65e1(0x146)),_0x12195f={};if(_0x3a1f62[_0x4f65e1(0x15f)]&&typeof _0x3a1f62[_0x4f65e1(0x15f)]===_0x4f65e1(0x14b))for(const [_0x24cd99,_0x4e6b22]of Object[_0x4f65e1(0x15b)](_0x3a1f62[_0x4f65e1(0x15f)])){_0x4e6b22&&typeof _0x4e6b22===_0x4f65e1(0x14b)&&_0x4e6b22['appcode']&&(_0x12195f[_0x24cd99]=_0x4e6b22);}const _0x32aebd=_0x3a1f62['defaultApp']||undefined,_0x5d0276=Object[_0x4f65e1(0x161)](_0x12195f)[_0x4f65e1(0x160)]>0x0,_0x17e4b2=_0x3461ee||_0x3a6e3b||_0x16f20c||_0x5a0f35||_0x32aebd||undefined,_0x618e99=stringConfigValue(_0x46a71e[_0x4f65e1(0x143)]),_0x1afb8a=_0x618e99?Object[_0x4f65e1(0x15b)](_0x12195f)[_0x4f65e1(0x16c)](([,_0x3d830d])=>_0x3d830d?.[_0x4f65e1(0x143)]===_0x618e99):undefined,_0x3148a5=_0x1afb8a?.[0x0],_0x375616=_0x1afb8a?.[0x1],_0x16ce77=_0x618e99?_0x3148a5:_0x17e4b2;let _0x5b0597=_0x16ce77&&_0x12195f[_0x16ce77]?_0x12195f[_0x16ce77]:undefined;_0x618e99&&_0x375616&&(_0x5b0597=_0x375616);const _0x1bc264=_0x618e99?_0x375616??_0x5b0597:_0x5b0597,_0x105249=!_0x3461ee&&!_0x3a6e3b&&_0x16f20c&&_0x16ce77===_0x16f20c,_0x39e7bf=_0x3461ee||(_0x105249?_0x16f20c:undefined)||(_0x618e99?_0x3148a5:undefined),_0x2ea584=_0x1bc264?.['appcode'],_0x46f5dd=_0x3868c0?resolveTopLevelAppCode(_0x469fd5):undefined,_0x472204=_0x17b978?resolveTopLevelAppCode(_0x3c3e23):undefined,_0x2f187b=_0x3461ee||_0x3a6e3b?_0x2ea584:undefined,_0x3148ec=!_0x3461ee&&!_0x3a6e3b?_0x2ea584:undefined,_0x3f0457=_0x618e99||_0x2f187b||_0x46f5dd||_0x3148ec||_0x472204||undefined,_0x5d782c=_0x3868c0?stringConfigValue(_0x469fd5['env']):undefined,_0xfbd3a2=_0x17b978?stringConfigValue(_0x3c3e23['env']):undefined,_0x57aec4=_0x46a71e[_0x4f65e1(0x147)]||_0x1bc264?.[_0x4f65e1(0x147)]||_0x5d782c||_0x2ca2d7(_0x4f65e1(0x165))||_0xfbd3a2||_0x3a1f62[_0x4f65e1(0x147)]||DEFAULT_CONFIG_VALUES[_0x4f65e1(0x147)],_0x43d039=_0x1bc264?.[_0x4f65e1(0x153)]||_0x3a1f62[_0x4f65e1(0x153)]||DEFAULT_CONFIG_VALUES[_0x4f65e1(0x153)],_0xc40296=_0x2ca2d7(_0x4f65e1(0x158))||_0x1bc264?.[_0x4f65e1(0x155)]||_0x3a1f62[_0x4f65e1(0x155)]||undefined,_0xf7696a=_0x2ca2d7(_0x4f65e1(0x168))||_0x1bc264?.[_0x4f65e1(0x16b)]||_0x3a1f62[_0x4f65e1(0x16b)]||undefined,_0x27841a=_0x46a71e[_0x4f65e1(0x150)]||_0x2ca2d7(_0x4f65e1(0x148))||_0x1bc264?.['format']||_0x3a1f62[_0x4f65e1(0x150)],_0x201eac=normalizeLegacyOutputFormat(_0x27841a),_0x52431e=_0x2ca2d7(_0x4f65e1(0x159))||_0x1bc264?.[_0x4f65e1(0x152)]||_0x3a1f62[_0x4f65e1(0x152)],_0x6b5091=_0x52431e?Number(_0x52431e)||undefined:undefined,_0x58519b=_0x2ca2d7('RISK_LEVEL')||_0x2ca2d7(_0x4f65e1(0x144))||_0x1bc264?.[_0x4f65e1(0x15a)]||_0x3a1f62[_0x4f65e1(0x15a)]||_0x3a1f62['maxRisk'],_0xb98068=_0x58519b===_0x4f65e1(0x15e)||_0x58519b===_0x4f65e1(0x149)?_0x58519b:DEFAULT_CONFIG_VALUES[_0x4f65e1(0x15a)],_0x47f3b0=_0x2ca2d7(_0x4f65e1(0x145)),_0x272efd=_0x47f3b0==='1'||_0x47f3b0===_0x4f65e1(0x16a),_0x1a2bc1=_0x1bc264?.[_0x4f65e1(0x14d)]||_0x3a1f62[_0x4f65e1(0x14d)]||DEFAULT_CONFIG_VALUES[_0x4f65e1(0x14d)],_0x1112dd=isDaily(normalizeEnv(String(_0x57aec4)))?'daily':'production';return{'appCode':typeof _0x3f0457===_0x4f65e1(0x167)&&_0x3f0457[_0x4f65e1(0x162)]()?_0x3f0457[_0x4f65e1(0x162)]():undefined,'env':_0x1112dd,'locale':_0x43d039,'cookie':_0xc40296,'accessKey':_0xf7696a,'format':_0x201eac,'pageSize':_0x6b5091,'riskLevel':_0xb98068,'verbose':_0x272efd,'apiDir':_0x1a2bc1,'apps':_0x12195f,'defaultApp':_0x32aebd,'currentApp':_0x5d0276?_0x16ce77:undefined,'explicitAppName':_0x39e7bf};}
@@ -1 +1 @@
1
- (function(_0x300b97,_0x5c825b){const _0x1af4df=a194_0x3a31,_0x19ef31=_0x300b97();while(!![]){try{const _0x5179d6=-parseInt(_0x1af4df(0x139))/0x1+parseInt(_0x1af4df(0x140))/0x2+-parseInt(_0x1af4df(0x13e))/0x3*(-parseInt(_0x1af4df(0x135))/0x4)+-parseInt(_0x1af4df(0x13d))/0x5*(-parseInt(_0x1af4df(0x13f))/0x6)+-parseInt(_0x1af4df(0x13a))/0x7*(-parseInt(_0x1af4df(0x138))/0x8)+parseInt(_0x1af4df(0x137))/0x9*(parseInt(_0x1af4df(0x136))/0xa)+parseInt(_0x1af4df(0x13b))/0xb*(-parseInt(_0x1af4df(0x13c))/0xc);if(_0x5179d6===_0x5c825b)break;else _0x19ef31['push'](_0x19ef31['shift']());}catch(_0x3220e6){_0x19ef31['push'](_0x19ef31['shift']());}}}(a194_0x5f0e,0x99253));import{getIsSessionValid}from'../auth/is-session-valid.js';function a194_0x5f0e(){const _0x58a685=['1083132PgdcFs','3074744sDDkoo','986711ptZwdl','21fLxYgj','4337553dwbhgO','48hhjrTw','9905UtUBzC','3RhoxJs','606RHTSiu','1680978cffLEo','authRequired','2546572ecRZMq','30xZCHMn'];a194_0x5f0e=function(){return _0x58a685;};return a194_0x5f0e();}import{CliErrors}from'../errors.js';function a194_0x3a31(_0x3dba5e,_0x4f41b7){_0x3dba5e=_0x3dba5e-0x135;const _0x5f0e7f=a194_0x5f0e();let _0x3a3185=_0x5f0e7f[_0x3dba5e];return _0x3a3185;}export async function buildAuth(_0x36e20d){const {getCookie:_0x2c057f}=await import('../auth/get-cookie.js'),_0xf63d47=_0x36e20d['cookie']||_0x2c057f(),_0x33b2ff=_0xf63d47?await getIsSessionValid():![];return{'cookie':_0xf63d47,'isLoggedIn':_0x33b2ff,async 'getOrLogin'(){const _0x509a3a=a194_0x3a31;if(_0xf63d47&&_0x33b2ff)return _0xf63d47;throw CliErrors[_0x509a3a(0x141)]();}};}
1
+ (function(_0xa6dd9b,_0x50a646){const _0xfe2d26=a196_0x5d6b,_0x2ed033=_0xa6dd9b();while(!![]){try{const _0x3e83c1=-parseInt(_0xfe2d26(0xcb))/0x1*(-parseInt(_0xfe2d26(0xc8))/0x2)+-parseInt(_0xfe2d26(0xc7))/0x3+-parseInt(_0xfe2d26(0xcd))/0x4+-parseInt(_0xfe2d26(0xc6))/0x5+parseInt(_0xfe2d26(0xca))/0x6+parseInt(_0xfe2d26(0xc9))/0x7*(parseInt(_0xfe2d26(0xcf))/0x8)+parseInt(_0xfe2d26(0xce))/0x9;if(_0x3e83c1===_0x50a646)break;else _0x2ed033['push'](_0x2ed033['shift']());}catch(_0x8379){_0x2ed033['push'](_0x2ed033['shift']());}}}(a196_0x1190,0x5f652));import{getIsSessionValid}from'../auth/is-session-valid.js';function a196_0x1190(){const _0x5ba5aa=['2192804VgTGSx','3625164nDeRfY','1616rjWsZi','cookie','2494775vXSkCW','476076IUvwYC','2PlrdOx','10164GyNIeZ','1144194gClOJI','709787BiRvSY','../auth/get-cookie.js'];a196_0x1190=function(){return _0x5ba5aa;};return a196_0x1190();}import{CliErrors}from'../errors.js';function a196_0x5d6b(_0x2a1544,_0x34e0fd){_0x2a1544=_0x2a1544-0xc5;const _0x1190fd=a196_0x1190();let _0x5d6b9d=_0x1190fd[_0x2a1544];return _0x5d6b9d;}export async function buildAuth(_0x5382a2){const _0x30e48a=a196_0x5d6b,{getCookie:_0x1462fa}=await import(_0x30e48a(0xcc)),_0x5268e3=_0x5382a2[_0x30e48a(0xc5)]||_0x1462fa(),_0x4e2f4c=_0x5268e3?await getIsSessionValid():![];return{'cookie':_0x5268e3,'isLoggedIn':_0x4e2f4c,async 'getOrLogin'(){if(_0x5268e3&&_0x4e2f4c)return _0x5268e3;throw CliErrors['authRequired']();}};}
@@ -1 +1 @@
1
- const a195_0x414066=a195_0x386b;(function(_0x1a6ea9,_0x4d237f){const _0xae1d8d=a195_0x386b,_0x3711b1=_0x1a6ea9();while(!![]){try{const _0x4e2296=-parseInt(_0xae1d8d(0x195))/0x1+parseInt(_0xae1d8d(0x1bd))/0x2*(parseInt(_0xae1d8d(0x1c2))/0x3)+parseInt(_0xae1d8d(0x1ae))/0x4+parseInt(_0xae1d8d(0x191))/0x5*(-parseInt(_0xae1d8d(0x19b))/0x6)+-parseInt(_0xae1d8d(0x1b4))/0x7*(-parseInt(_0xae1d8d(0x19f))/0x8)+-parseInt(_0xae1d8d(0x1b1))/0x9+parseInt(_0xae1d8d(0x1a2))/0xa;if(_0x4e2296===_0x4d237f)break;else _0x3711b1['push'](_0x3711b1['shift']());}catch(_0x57a599){_0x3711b1['push'](_0x3711b1['shift']());}}}(a195_0x2a28,0x19947));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';export const NEW_CONFIG_NAME=a195_0x414066(0x192);export const CONFIG_NAMES=[a195_0x414066(0x192),'.lovrabet.json',a195_0x414066(0x1ac)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a195_0x414066(0x1af)](_0x31fad0=>_0x31fad0!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x4f747b){for(const _0x11038b of CONFIG_NAMES){const _0x3c2b2b=resolve(_0x4f747b,_0x11038b);if(existsSync(_0x3c2b2b))return _0x3c2b2b;}return undefined;}export function findProjectRootDirectory(_0x3d00c8=process['cwd']()){let _0x3def66=resolve(_0x3d00c8);const {root:_0x65a692}=parse(_0x3def66),_0x9b83ac=homedir();while(!![]){if(resolveConfigPath(_0x3def66)){if(_0x3def66===_0x9b83ac)break;return _0x3def66;}if(_0x3def66===_0x65a692||_0x3def66===_0x9b83ac)break;const _0x3f7682=dirname(_0x3def66);if(_0x3f7682===_0x3def66)break;_0x3def66=_0x3f7682;}return resolve(_0x3d00c8);}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x39d0cf){const _0x3cf54d=a195_0x414066;if(!existsSync(_0x39d0cf))return{'status':_0x3cf54d(0x1a1)};try{const _0x56c803=readFileSync(_0x39d0cf,{'encoding':'utf8'});if(!_0x56c803?.[_0x3cf54d(0x1b6)]())return{'status':'empty'};const _0x3d38cb=JSON[_0x3cf54d(0x1a0)](_0x56c803);return{'status':'ok','data':_0x3d38cb};}catch(_0x1f2327){return{'status':_0x3cf54d(0x1bf),'message':_0x1f2327 instanceof Error?_0x1f2327[_0x3cf54d(0x1a8)]:String(_0x1f2327)};}}function parseCliConfigJsonFile(_0x4a9f38,_0x1a4849,_0x3420af){const _0x26fd58=a195_0x414066,_0x3a87ff=inspectCliConfigJsonFile(_0x4a9f38);if(_0x3a87ff[_0x26fd58(0x1a9)]==='missing'||_0x3a87ff['status']===_0x26fd58(0x19d))return{};if(_0x3a87ff[_0x26fd58(0x1a9)]==='ok')return _0x3a87ff[_0x26fd58(0x1b8)];return _0x1a4849===_0x26fd58(0x1be)&&_0x3420af&&console['error'](CLI_BIN_NAME+':\x20'+_0x3420af+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x4a9f38+_0x26fd58(0x1c1)+_0x3a87ff[_0x26fd58(0x1a8)]),{};}function normalizeLegacyConfigShape(_0x2f418){const _0x414698=a195_0x414066;if(!_0x2f418||typeof _0x2f418!==_0x414698(0x1ab))return{'config':{},'migrated':![]};const _0x550fac={..._0x2f418},_0x4609fd=_0x550fac[_0x414698(0x19a)]&&typeof _0x550fac[_0x414698(0x19a)]===_0x414698(0x1ab)?{..._0x550fac[_0x414698(0x19a)]}:{},_0x1a9292=Object[_0x414698(0x193)](_0x4609fd)[_0x414698(0x1c0)],_0x3c7273=_0x550fac[_0x414698(0x1ad)]||_0x550fac[_0x414698(0x1a4)];let _0xe296f=![];if(_0x3c7273&&_0x1a9292===0x0){const _0x5ddab6=typeof _0x550fac[_0x414698(0x1b0)]===_0x414698(0x1b9)&&_0x550fac['defaultApp']['trim']()?_0x550fac[_0x414698(0x1b0)]:String(_0x3c7273)[_0x414698(0x1b6)]();_0x4609fd[_0x5ddab6]={'appcode':String(_0x3c7273)['trim'](),..._0x550fac[_0x414698(0x1b3)]!=null?{'env':_0x550fac[_0x414698(0x1b3)]}:{},..._0x550fac[_0x414698(0x190)]!=null?{'apiDir':_0x550fac[_0x414698(0x190)]}:{},..._0x550fac[_0x414698(0x194)]!=null?{'cookie':_0x550fac['cookie']}:{},..._0x550fac[_0x414698(0x1a3)]!=null?{'accessKey':_0x550fac['accessKey']}:{},..._0x550fac[_0x414698(0x1a6)]!=null?{'format':_0x550fac['format']}:{},..._0x550fac[_0x414698(0x19c)]!=null?{'pageSize':_0x550fac[_0x414698(0x19c)]}:{},..._0x550fac[_0x414698(0x1a7)]!=null?{'riskLevel':_0x550fac[_0x414698(0x1a7)]}:{},..._0x550fac['locale']!=null?{'locale':_0x550fac[_0x414698(0x1ba)]}:{}},_0x550fac[_0x414698(0x19a)]=_0x4609fd;if(!_0x550fac['defaultApp'])_0x550fac[_0x414698(0x1b0)]=_0x5ddab6;_0xe296f=!![];}return(_0x414698(0x1ad)in _0x550fac||_0x414698(0x1a4)in _0x550fac)&&(delete _0x550fac[_0x414698(0x1ad)],delete _0x550fac[_0x414698(0x1a4)],_0xe296f=!![]),{'config':_0x550fac,'migrated':_0xe296f};}function a195_0x386b(_0x300af0,_0xd9c684){_0x300af0=_0x300af0-0x190;const _0x2a283b=a195_0x2a28();let _0x386b36=_0x2a283b[_0x300af0];return _0x386b36;}function writeNormalizedConfigIfNeeded(_0x4b664a,_0xfd02be){const _0x2ec6e0=a195_0x414066,_0x2a3320=JSON[_0x2ec6e0(0x1bc)](_0xfd02be,null,0x2)+'\x0a';if(normalizedWriteCache[_0x2ec6e0(0x1a5)](_0x4b664a)===_0x2a3320)return;writeConfigFile(_0x4b664a,_0xfd02be),normalizedWriteCache[_0x2ec6e0(0x1b7)](_0x4b664a,_0x2a3320);}function parseAndNormalizeConfig(_0xcf03f0,_0x3b4671,_0x18994f){const _0x4cb566=a195_0x414066,_0x416b18=parseCliConfigJsonFile(_0xcf03f0,_0x3b4671,_0x18994f),_0x7de00d=normalizeLegacyConfigShape(_0x416b18);if(_0x7de00d[_0x4cb566(0x1bb)])try{writeNormalizedConfigIfNeeded(_0xcf03f0,_0x7de00d[_0x4cb566(0x196)]);}catch{}return _0x7de00d['config'];}export function loadRawConfigLayers(_0x175825){const _0x1b1cf2=a195_0x414066;let _0x2571c7={},_0x32a59a={};const _0x5dd87f=resolveConfigPath(homedir());_0x5dd87f&&(_0x2571c7=parseAndNormalizeConfig(_0x5dd87f,_0x1b1cf2(0x1be),_0x1b1cf2(0x1b2)));const _0x254cf6=_0x175825??findProjectRootDirectory(),_0x14d158=resolveConfigPath(_0x254cf6);return _0x14d158&&(_0x32a59a=parseAndNormalizeConfig(_0x14d158,'warn',_0x1b1cf2(0x1aa))),{'globalPath':_0x5dd87f,'projectPath':_0x14d158,'globalConfig':_0x2571c7,'projectConfig':_0x32a59a};}const INHERIT_WHITELIST=['cookie','accessKey',a195_0x414066(0x1ba),a195_0x414066(0x1a6),a195_0x414066(0x1a7),a195_0x414066(0x19c)];export function mergeRawConfigLayers(_0x28ba8d){const _0x2b97e6=a195_0x414066,{globalConfig:_0x4a44ec,projectConfig:_0x5a19e6}=_0x28ba8d,_0x55aa24=Object[_0x2b97e6(0x193)](_0x5a19e6)[_0x2b97e6(0x1c0)]>0x0;if(!_0x55aa24)return mergeGlobalOnly(_0x4a44ec);if(_0x5a19e6[_0x2b97e6(0x1b5)]===!![])return mergeFullInherit(_0x4a44ec,_0x5a19e6);if(_0x5a19e6['inherit']===![])return mergeIsolated(_0x5a19e6);return mergeProjectFirst(_0x4a44ec,_0x5a19e6);}function mergeGlobalOnly(_0x581423){const _0x2cb1eb=a195_0x414066,_0x92c11a={..._0x581423},_0xc07a18=_0x581423[_0x2cb1eb(0x19a)]&&typeof _0x581423[_0x2cb1eb(0x19a)]===_0x2cb1eb(0x1ab)?_0x581423[_0x2cb1eb(0x19a)]:{};if(Object['keys'](_0xc07a18)[_0x2cb1eb(0x1c0)]>0x0)_0x92c11a[_0x2cb1eb(0x19a)]=_0xc07a18;if(_0x581423['defaultApp'])_0x92c11a[_0x2cb1eb(0x1b0)]=_0x581423[_0x2cb1eb(0x1b0)];else{const _0x22600d=Object[_0x2cb1eb(0x193)](_0xc07a18);if(_0x22600d[_0x2cb1eb(0x1c0)]>0x0)_0x92c11a[_0x2cb1eb(0x1b0)]=_0x22600d[0x0];}return _0x92c11a;}function mergeIsolated(_0x484765){const _0x2c766c=a195_0x414066,_0x3e1657={..._0x484765};delete _0x3e1657['inherit'];const _0x2f2c7c=_0x484765[_0x2c766c(0x19a)]&&typeof _0x484765[_0x2c766c(0x19a)]===_0x2c766c(0x1ab)?_0x484765[_0x2c766c(0x19a)]:{};Object[_0x2c766c(0x193)](_0x2f2c7c)[_0x2c766c(0x1c0)]>0x0?_0x3e1657[_0x2c766c(0x19a)]=_0x2f2c7c:delete _0x3e1657[_0x2c766c(0x19a)];if('defaultApp'in _0x484765)_0x3e1657['defaultApp']=_0x484765['defaultApp'];else Object[_0x2c766c(0x193)](_0x2f2c7c)['length']>0x0?_0x3e1657[_0x2c766c(0x1b0)]=Object['keys'](_0x2f2c7c)[0x0]:delete _0x3e1657[_0x2c766c(0x1b0)];return _0x3e1657;}function mergeProjectFirst(_0x4599da,_0x36c6c7){const _0x331d4e=a195_0x414066,_0x24bc44={..._0x36c6c7};delete _0x24bc44[_0x331d4e(0x1b5)];for(const _0x9bd8e7 of INHERIT_WHITELIST){!(_0x9bd8e7 in _0x24bc44)&&_0x9bd8e7 in _0x4599da&&(_0x24bc44[_0x9bd8e7]=_0x4599da[_0x9bd8e7]);}const _0x277350=_0x36c6c7[_0x331d4e(0x19a)]&&typeof _0x36c6c7['apps']===_0x331d4e(0x1ab)?_0x36c6c7[_0x331d4e(0x19a)]:{};Object[_0x331d4e(0x193)](_0x277350)[_0x331d4e(0x1c0)]>0x0?_0x24bc44[_0x331d4e(0x19a)]=_0x277350:delete _0x24bc44[_0x331d4e(0x19a)];if(_0x331d4e(0x1b0)in _0x36c6c7)_0x24bc44['defaultApp']=_0x36c6c7[_0x331d4e(0x1b0)];else Object[_0x331d4e(0x193)](_0x277350)['length']>0x0?_0x24bc44[_0x331d4e(0x1b0)]=Object[_0x331d4e(0x193)](_0x277350)[0x0]:delete _0x24bc44[_0x331d4e(0x1b0)];return _0x24bc44;}function mergeFullInherit(_0x295607,_0x146ecd){const _0x133cb9=a195_0x414066,_0x38507a=_0x295607['apps']&&typeof _0x295607[_0x133cb9(0x19a)]===_0x133cb9(0x1ab)?_0x295607['apps']:{},_0x2a58d5=_0x146ecd[_0x133cb9(0x19a)]&&typeof _0x146ecd[_0x133cb9(0x19a)]===_0x133cb9(0x1ab)?_0x146ecd['apps']:{},_0x1c95cc={..._0x38507a,..._0x2a58d5},_0x3b483b={..._0x295607,..._0x146ecd};delete _0x3b483b[_0x133cb9(0x1b5)];if(Object[_0x133cb9(0x193)](_0x1c95cc)[_0x133cb9(0x1c0)]>0x0)_0x3b483b[_0x133cb9(0x19a)]=_0x1c95cc;if(_0x133cb9(0x1b0)in _0x146ecd)_0x3b483b[_0x133cb9(0x1b0)]=_0x146ecd['defaultApp'];else{if(Object[_0x133cb9(0x193)](_0x2a58d5)[_0x133cb9(0x1c0)]>0x0)_0x3b483b[_0x133cb9(0x1b0)]=Object[_0x133cb9(0x193)](_0x2a58d5)[0x0];else{if(_0x295607[_0x133cb9(0x1b0)])_0x3b483b[_0x133cb9(0x1b0)]=_0x295607[_0x133cb9(0x1b0)];else{const _0x12b4d6=Object[_0x133cb9(0x193)](_0x38507a);if(_0x12b4d6[_0x133cb9(0x1c0)]>0x0)_0x3b483b['defaultApp']=_0x12b4d6[0x0];}}}return _0x3b483b;}export function readRawConfigWithLayers(_0x2de5a1){const _0x24130d=loadRawConfigLayers(_0x2de5a1);return{'config':mergeRawConfigLayers(_0x24130d),'layers':_0x24130d};}export function readRawConfig(_0x1189c1){return mergeRawConfigLayers(loadRawConfigLayers(_0x1189c1));}function a195_0x2a28(){const _0x40ccd1=['data','string','locale','migrated','stringify','4nBQlTE','warn','error','length','\x0a\x20\x20','35079qBwwZS','apiDir','5tFmAQx','.rabetbase.json','keys','cookie','19996tfkzxQ','config','cwd','utf8','.tmp','apps','503364ZwHSzF','pageSize','empty','project','20504MVDFQt','parse','missing','365040MEWIdY','accessKey','app','get','format','riskLevel','message','status','Project','object','.lovrabetrc','appcode','543048PoXomS','filter','defaultApp','644094DNhBSw','Global','env','231LbBnyy','inherit','trim','set'];a195_0x2a28=function(){return _0x40ccd1;};return a195_0x2a28();}export function readConfigFile(_0x216b15){return parseAndNormalizeConfig(_0x216b15,'silent');}export function writeConfigFile(_0x3720b4,_0x3ee3a6){const _0x175524=a195_0x414066,_0x5d5799=dirname(_0x3720b4);!existsSync(_0x5d5799)&&mkdirSync(_0x5d5799,{'recursive':!![]});const _0x44dee4=_0x3720b4+_0x175524(0x199);try{writeFileSync(_0x44dee4,JSON['stringify'](_0x3ee3a6,null,0x2)+'\x0a',{'encoding':_0x175524(0x198),'mode':0x180}),renameSync(_0x44dee4,_0x3720b4);}catch(_0x8c50f2){try{unlinkSync(_0x44dee4);}catch{}throw _0x8c50f2;}}export function resolveWriteConfigPath(_0x2774bc){const _0x38f16f=a195_0x414066,_0x297d67=_0x2774bc===_0x38f16f(0x19e)?process[_0x38f16f(0x197)]():homedir(),_0x2afb90=resolveConfigPath(_0x297d67);return _0x2afb90??resolve(_0x297d67,NEW_CONFIG_NAME);}
1
+ const a197_0x1eb014=a197_0x5c15;(function(_0x2c9ebc,_0x149cac){const _0x50cfd5=a197_0x5c15,_0x562c69=_0x2c9ebc();while(!![]){try{const _0x4134fd=parseInt(_0x50cfd5(0x131))/0x1+-parseInt(_0x50cfd5(0x119))/0x2*(-parseInt(_0x50cfd5(0x130))/0x3)+parseInt(_0x50cfd5(0x140))/0x4+parseInt(_0x50cfd5(0x139))/0x5*(-parseInt(_0x50cfd5(0x142))/0x6)+parseInt(_0x50cfd5(0x123))/0x7*(-parseInt(_0x50cfd5(0x120))/0x8)+-parseInt(_0x50cfd5(0x136))/0x9+-parseInt(_0x50cfd5(0x12b))/0xa*(parseInt(_0x50cfd5(0x145))/0xb);if(_0x4134fd===_0x149cac)break;else _0x562c69['push'](_0x562c69['shift']());}catch(_0x44e110){_0x562c69['push'](_0x562c69['shift']());}}}(a197_0x484e,0x82228));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';export const NEW_CONFIG_NAME='.rabetbase.json';export const CONFIG_NAMES=[a197_0x1eb014(0x11f),a197_0x1eb014(0x116),a197_0x1eb014(0x13b)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a197_0x1eb014(0x11b)](_0x598783=>_0x598783!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x29764a){for(const _0x169362 of CONFIG_NAMES){const _0x3fa550=resolve(_0x29764a,_0x169362);if(existsSync(_0x3fa550))return _0x3fa550;}return undefined;}export function findProjectRootDirectory(_0x3fe54f=process[a197_0x1eb014(0x13f)]()){let _0x4e5324=resolve(_0x3fe54f);const {root:_0x4ca8ad}=parse(_0x4e5324),_0x41f9a3=homedir();while(!![]){if(resolveConfigPath(_0x4e5324)){if(_0x4e5324===_0x41f9a3)break;return _0x4e5324;}if(_0x4e5324===_0x4ca8ad||_0x4e5324===_0x41f9a3)break;const _0x1e33e5=dirname(_0x4e5324);if(_0x1e33e5===_0x4e5324)break;_0x4e5324=_0x1e33e5;}return resolve(_0x3fe54f);}function a197_0x484e(){const _0x58343c=['1183ADIBHV','status','.tmp','Global','length','project','pageSize','accessKey','20LJaYFk','config','appcode','missing','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','1749LtmOJe','1025943GmmqqS','migrated','silent','utf8','data','1733589hSlOog','riskLevel','empty','145KsXcFz','parse','.lovrabetrc','trim','stringify','format','cwd','1573332XhWhbJ','\x0a\x20\x20','204354hyUrsv','error','object','825297kcFTTg','warn','.lovrabet.json','keys','cookie','3318ppvTze','message','filter','apps','defaultApp','app','.rabetbase.json','24760NFBCCd','set','inherit'];a197_0x484e=function(){return _0x58343c;};return a197_0x484e();}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x44d38c){const _0x50af0c=a197_0x1eb014;if(!existsSync(_0x44d38c))return{'status':_0x50af0c(0x12e)};try{const _0x32c2a0=readFileSync(_0x44d38c,{'encoding':_0x50af0c(0x134)});if(!_0x32c2a0?.[_0x50af0c(0x13c)]())return{'status':_0x50af0c(0x138)};const _0x42c49a=JSON[_0x50af0c(0x13a)](_0x32c2a0);return{'status':'ok','data':_0x42c49a};}catch(_0x4976c8){return{'status':_0x50af0c(0x143),'message':_0x4976c8 instanceof Error?_0x4976c8[_0x50af0c(0x11a)]:String(_0x4976c8)};}}function parseCliConfigJsonFile(_0x416267,_0x47667e,_0x33bd7b){const _0x51a88a=a197_0x1eb014,_0x531176=inspectCliConfigJsonFile(_0x416267);if(_0x531176[_0x51a88a(0x124)]===_0x51a88a(0x12e)||_0x531176[_0x51a88a(0x124)]===_0x51a88a(0x138))return{};if(_0x531176[_0x51a88a(0x124)]==='ok')return _0x531176[_0x51a88a(0x135)];return _0x47667e===_0x51a88a(0x146)&&_0x33bd7b&&console[_0x51a88a(0x143)](CLI_BIN_NAME+':\x20'+_0x33bd7b+_0x51a88a(0x12f)+_0x416267+_0x51a88a(0x141)+_0x531176['message']),{};}function normalizeLegacyConfigShape(_0x5be165){const _0xfcabd8=a197_0x1eb014;if(!_0x5be165||typeof _0x5be165!==_0xfcabd8(0x144))return{'config':{},'migrated':![]};const _0x3ed122={..._0x5be165},_0x30e80f=_0x3ed122[_0xfcabd8(0x11c)]&&typeof _0x3ed122[_0xfcabd8(0x11c)]===_0xfcabd8(0x144)?{..._0x3ed122[_0xfcabd8(0x11c)]}:{},_0x5d45f6=Object[_0xfcabd8(0x117)](_0x30e80f)[_0xfcabd8(0x127)],_0x1411bf=_0x3ed122[_0xfcabd8(0x12d)]||_0x3ed122['app'];let _0x108af6=![];if(_0x1411bf&&_0x5d45f6===0x0){const _0x1aaf87=typeof _0x3ed122[_0xfcabd8(0x11d)]==='string'&&_0x3ed122[_0xfcabd8(0x11d)]['trim']()?_0x3ed122[_0xfcabd8(0x11d)]:String(_0x1411bf)[_0xfcabd8(0x13c)]();_0x30e80f[_0x1aaf87]={'appcode':String(_0x1411bf)['trim'](),..._0x3ed122['env']!=null?{'env':_0x3ed122['env']}:{},..._0x3ed122['apiDir']!=null?{'apiDir':_0x3ed122['apiDir']}:{},..._0x3ed122[_0xfcabd8(0x118)]!=null?{'cookie':_0x3ed122[_0xfcabd8(0x118)]}:{},..._0x3ed122[_0xfcabd8(0x12a)]!=null?{'accessKey':_0x3ed122['accessKey']}:{},..._0x3ed122['format']!=null?{'format':_0x3ed122[_0xfcabd8(0x13e)]}:{},..._0x3ed122[_0xfcabd8(0x129)]!=null?{'pageSize':_0x3ed122[_0xfcabd8(0x129)]}:{},..._0x3ed122[_0xfcabd8(0x137)]!=null?{'riskLevel':_0x3ed122['riskLevel']}:{},..._0x3ed122['locale']!=null?{'locale':_0x3ed122['locale']}:{}},_0x3ed122['apps']=_0x30e80f;if(!_0x3ed122[_0xfcabd8(0x11d)])_0x3ed122[_0xfcabd8(0x11d)]=_0x1aaf87;_0x108af6=!![];}return(_0xfcabd8(0x12d)in _0x3ed122||_0xfcabd8(0x11e)in _0x3ed122)&&(delete _0x3ed122[_0xfcabd8(0x12d)],delete _0x3ed122[_0xfcabd8(0x11e)],_0x108af6=!![]),{'config':_0x3ed122,'migrated':_0x108af6};}function a197_0x5c15(_0xa0d849,_0x53719e){_0xa0d849=_0xa0d849-0x116;const _0x484e4e=a197_0x484e();let _0x5c15b4=_0x484e4e[_0xa0d849];return _0x5c15b4;}function writeNormalizedConfigIfNeeded(_0x1aec8b,_0x385864){const _0x81cdc0=a197_0x1eb014,_0x26699b=JSON[_0x81cdc0(0x13d)](_0x385864,null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x1aec8b)===_0x26699b)return;writeConfigFile(_0x1aec8b,_0x385864),normalizedWriteCache[_0x81cdc0(0x121)](_0x1aec8b,_0x26699b);}function parseAndNormalizeConfig(_0x2a0a3a,_0x37f8c1,_0x27ecd8){const _0x2cf32c=a197_0x1eb014,_0x1dcb1a=parseCliConfigJsonFile(_0x2a0a3a,_0x37f8c1,_0x27ecd8),_0x5b2806=normalizeLegacyConfigShape(_0x1dcb1a);if(_0x5b2806[_0x2cf32c(0x132)])try{writeNormalizedConfigIfNeeded(_0x2a0a3a,_0x5b2806[_0x2cf32c(0x12c)]);}catch{}return _0x5b2806[_0x2cf32c(0x12c)];}export function loadRawConfigLayers(_0x3abc94){const _0x97b72a=a197_0x1eb014;let _0x5a65d2={},_0x3504fa={};const _0x1c3d08=resolveConfigPath(homedir());_0x1c3d08&&(_0x5a65d2=parseAndNormalizeConfig(_0x1c3d08,_0x97b72a(0x146),_0x97b72a(0x126)));const _0x13f93b=_0x3abc94??findProjectRootDirectory(),_0x2ebdb8=resolveConfigPath(_0x13f93b);return _0x2ebdb8&&(_0x3504fa=parseAndNormalizeConfig(_0x2ebdb8,_0x97b72a(0x146),'Project')),{'globalPath':_0x1c3d08,'projectPath':_0x2ebdb8,'globalConfig':_0x5a65d2,'projectConfig':_0x3504fa};}const INHERIT_WHITELIST=['cookie',a197_0x1eb014(0x12a),'locale',a197_0x1eb014(0x13e),'riskLevel','pageSize'];export function mergeRawConfigLayers(_0x198014){const _0x21ab1f=a197_0x1eb014,{globalConfig:_0x54570a,projectConfig:_0x254a1f}=_0x198014,_0x45a302=Object[_0x21ab1f(0x117)](_0x254a1f)[_0x21ab1f(0x127)]>0x0;if(!_0x45a302)return mergeGlobalOnly(_0x54570a);if(_0x254a1f[_0x21ab1f(0x122)]===!![])return mergeFullInherit(_0x54570a,_0x254a1f);if(_0x254a1f['inherit']===![])return mergeIsolated(_0x254a1f);return mergeProjectFirst(_0x54570a,_0x254a1f);}function mergeGlobalOnly(_0x4d2fe6){const _0x471af4=a197_0x1eb014,_0x53d410={..._0x4d2fe6},_0x3017f6=_0x4d2fe6[_0x471af4(0x11c)]&&typeof _0x4d2fe6[_0x471af4(0x11c)]===_0x471af4(0x144)?_0x4d2fe6[_0x471af4(0x11c)]:{};if(Object[_0x471af4(0x117)](_0x3017f6)['length']>0x0)_0x53d410[_0x471af4(0x11c)]=_0x3017f6;if(_0x4d2fe6['defaultApp'])_0x53d410[_0x471af4(0x11d)]=_0x4d2fe6[_0x471af4(0x11d)];else{const _0x104625=Object[_0x471af4(0x117)](_0x3017f6);if(_0x104625[_0x471af4(0x127)]>0x0)_0x53d410[_0x471af4(0x11d)]=_0x104625[0x0];}return _0x53d410;}function mergeIsolated(_0x36cbfb){const _0x33309d=a197_0x1eb014,_0x24b6c0={..._0x36cbfb};delete _0x24b6c0[_0x33309d(0x122)];const _0x1416e9=_0x36cbfb[_0x33309d(0x11c)]&&typeof _0x36cbfb[_0x33309d(0x11c)]===_0x33309d(0x144)?_0x36cbfb['apps']:{};Object[_0x33309d(0x117)](_0x1416e9)[_0x33309d(0x127)]>0x0?_0x24b6c0[_0x33309d(0x11c)]=_0x1416e9:delete _0x24b6c0[_0x33309d(0x11c)];if(_0x33309d(0x11d)in _0x36cbfb)_0x24b6c0[_0x33309d(0x11d)]=_0x36cbfb[_0x33309d(0x11d)];else Object[_0x33309d(0x117)](_0x1416e9)[_0x33309d(0x127)]>0x0?_0x24b6c0['defaultApp']=Object[_0x33309d(0x117)](_0x1416e9)[0x0]:delete _0x24b6c0['defaultApp'];return _0x24b6c0;}function mergeProjectFirst(_0x3a01f5,_0x4c4070){const _0x55acf9=a197_0x1eb014,_0x1edb5c={..._0x4c4070};delete _0x1edb5c[_0x55acf9(0x122)];for(const _0x19d164 of INHERIT_WHITELIST){!(_0x19d164 in _0x1edb5c)&&_0x19d164 in _0x3a01f5&&(_0x1edb5c[_0x19d164]=_0x3a01f5[_0x19d164]);}const _0x265aec=_0x4c4070[_0x55acf9(0x11c)]&&typeof _0x4c4070[_0x55acf9(0x11c)]==='object'?_0x4c4070[_0x55acf9(0x11c)]:{};Object[_0x55acf9(0x117)](_0x265aec)[_0x55acf9(0x127)]>0x0?_0x1edb5c[_0x55acf9(0x11c)]=_0x265aec:delete _0x1edb5c[_0x55acf9(0x11c)];if(_0x55acf9(0x11d)in _0x4c4070)_0x1edb5c[_0x55acf9(0x11d)]=_0x4c4070[_0x55acf9(0x11d)];else Object[_0x55acf9(0x117)](_0x265aec)['length']>0x0?_0x1edb5c[_0x55acf9(0x11d)]=Object['keys'](_0x265aec)[0x0]:delete _0x1edb5c[_0x55acf9(0x11d)];return _0x1edb5c;}function mergeFullInherit(_0x35106e,_0x5a2d52){const _0x5015da=a197_0x1eb014,_0x71363e=_0x35106e[_0x5015da(0x11c)]&&typeof _0x35106e[_0x5015da(0x11c)]==='object'?_0x35106e[_0x5015da(0x11c)]:{},_0x18b48a=_0x5a2d52[_0x5015da(0x11c)]&&typeof _0x5a2d52[_0x5015da(0x11c)]==='object'?_0x5a2d52[_0x5015da(0x11c)]:{},_0x2710e3={..._0x71363e,..._0x18b48a},_0x59afd8={..._0x35106e,..._0x5a2d52};delete _0x59afd8['inherit'];if(Object[_0x5015da(0x117)](_0x2710e3)[_0x5015da(0x127)]>0x0)_0x59afd8[_0x5015da(0x11c)]=_0x2710e3;if('defaultApp'in _0x5a2d52)_0x59afd8[_0x5015da(0x11d)]=_0x5a2d52['defaultApp'];else{if(Object['keys'](_0x18b48a)[_0x5015da(0x127)]>0x0)_0x59afd8[_0x5015da(0x11d)]=Object['keys'](_0x18b48a)[0x0];else{if(_0x35106e[_0x5015da(0x11d)])_0x59afd8[_0x5015da(0x11d)]=_0x35106e['defaultApp'];else{const _0x5e8c55=Object[_0x5015da(0x117)](_0x71363e);if(_0x5e8c55[_0x5015da(0x127)]>0x0)_0x59afd8['defaultApp']=_0x5e8c55[0x0];}}}return _0x59afd8;}export function readRawConfigWithLayers(_0x5b2553){const _0x545c6f=loadRawConfigLayers(_0x5b2553);return{'config':mergeRawConfigLayers(_0x545c6f),'layers':_0x545c6f};}export function readRawConfig(_0x314fb5){return mergeRawConfigLayers(loadRawConfigLayers(_0x314fb5));}export function readConfigFile(_0xe199af){const _0x285112=a197_0x1eb014;return parseAndNormalizeConfig(_0xe199af,_0x285112(0x133));}export function writeConfigFile(_0x526f34,_0x221200){const _0x564275=a197_0x1eb014,_0x133af4=dirname(_0x526f34);!existsSync(_0x133af4)&&mkdirSync(_0x133af4,{'recursive':!![]});const _0x5a9ee0=_0x526f34+_0x564275(0x125);try{writeFileSync(_0x5a9ee0,JSON[_0x564275(0x13d)](_0x221200,null,0x2)+'\x0a',{'encoding':_0x564275(0x134),'mode':0x180}),renameSync(_0x5a9ee0,_0x526f34);}catch(_0x5510f2){try{unlinkSync(_0x5a9ee0);}catch{}throw _0x5510f2;}}export function resolveWriteConfigPath(_0x218d77){const _0x14b479=a197_0x1eb014,_0x44c86d=_0x218d77===_0x14b479(0x128)?process[_0x14b479(0x13f)]():homedir(),_0x449a97=resolveConfigPath(_0x44c86d);return _0x449a97??resolve(_0x44c86d,NEW_CONFIG_NAME);}
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- function a196_0x5941(){const _0x4623ee=['cookie','2784172svRyYd','cwd','3496036pBkmvw','https://g.lovrabet.com/dist/lovrabet-skill','projectConfig','5126270azIYwc','apiDir','join','1317363OystdM','defaultApp','project','appcode','18968VGjrEX','3148878LuHOcG','4542405gbeyRr','apiDomain','runtimeDomain','slice','replace','keys','./constant/domain.js','./utils/is-non-interactive.js','env','8267UKDegk','template_base_url','trim','values','string','userDomain','map','globalConfig','setLogPath','apps','object','-api.ts','app'];a196_0x5941=function(){return _0x4623ee;};return a196_0x5941();}const a196_0x3b7e82=a196_0x1580;function a196_0x1580(_0x66c447,_0xc58b5d){_0x66c447=_0x66c447-0x1d6;const _0x59415c=a196_0x5941();let _0x158029=_0x59415c[_0x66c447];return _0x158029;}(function(_0x11fe49,_0x141bb9){const _0xf51cfb=a196_0x1580,_0x4c3c25=_0x11fe49();while(!![]){try{const _0x516c45=-parseInt(_0xf51cfb(0x1d8))/0x1+parseInt(_0xf51cfb(0x1f5))/0x2+-parseInt(_0xf51cfb(0x1de))/0x3+-parseInt(_0xf51cfb(0x1f7))/0x4+parseInt(_0xf51cfb(0x1fa))/0x5+-parseInt(_0xf51cfb(0x1dd))/0x6+-parseInt(_0xf51cfb(0x1e7))/0x7*(-parseInt(_0xf51cfb(0x1dc))/0x8);if(_0x516c45===_0x141bb9)break;else _0x4c3c25['push'](_0x4c3c25['shift']());}catch(_0x5297e6){_0x4c3c25['push'](_0x4c3c25['shift']());}}}(a196_0x5941,0xf1023));import{resolve}from'node:path';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,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x2823d5){return process.env[`RABETBASE_${_0x2823d5}`]||process.env[`LOVRABET_${_0x2823d5}`]||undefined;}export async function createContext(_0x3f00d7){const _0x2f164f=a196_0x1580,{config:_0x185ab3,layers:_0x35ab7d}=readRawConfigWithLayers(),_0x28dda8=buildConfig(_0x185ab3,_0x3f00d7,_0x35ab7d),{initEnv:_0x2a3c53}=await import('./constant/env.js');if(_0x28dda8[_0x2f164f(0x1e6)])_0x2a3c53(_0x28dda8[_0x2f164f(0x1e6)]);else _0x3f00d7[_0x2f164f(0x1e6)]&&typeof _0x3f00d7[_0x2f164f(0x1e6)]===_0x2f164f(0x1eb)&&_0x2a3c53(_0x3f00d7['env']);const {initDomains:_0x4b4778,getUserDomain:_0x111bd8,getApiDomain:_0x3e4afb}=await import(_0x2f164f(0x1e4));_0x4b4778({'apiDomain':_0x185ab3[_0x2f164f(0x1df)]||undefined,'userDomain':_0x185ab3[_0x2f164f(0x1ec)]||undefined,'runtimeDomain':_0x185ab3[_0x2f164f(0x1e0)]||undefined});const _0x41b111={'apiDomain':_0x3e4afb(),'userDomain':_0x111bd8()},_0x24d191=await buildAuth(_0x28dda8);logger[_0x2f164f(0x1ef)](process['cwd']());const _0x1af463=(CLI_BIN_NAME+'\x20'+process['argv'][_0x2f164f(0x1e1)](0x2)[_0x2f164f(0x1d7)]('\x20'))[_0x2f164f(0x1e9)]();logger['setRawCommand'](_0x1af463);const {isNonInteractive:_0x353a65}=await import(_0x2f164f(0x1e5)),_0x3b66f0=_0x353a65(_0x3f00d7);return{'config':_0x28dda8,'auth':_0x24d191,'logger':logger,'env':_0x41b111,'nonInteractive':_0x3b66f0};}export function buildConfigFromFlags(_0x7205f3){const {config:_0x1f06e4,layers:_0x26ac57}=readRawConfigWithLayers();return buildConfig(_0x1f06e4,_0x7205f3,_0x26ac57);}export function getConfigAppCode(_0x7b1a2c){const _0x44ddaf=a196_0x1580,_0x53dced=readRawConfig(_0x7b1a2c);if(_0x53dced[_0x44ddaf(0x1f0)]&&typeof _0x53dced[_0x44ddaf(0x1f0)]===_0x44ddaf(0x1f1)){const _0x399427=_0x53dced[_0x44ddaf(0x1d9)];if(_0x399427&&_0x53dced['apps'][_0x399427]?.['appcode'])return String(_0x53dced[_0x44ddaf(0x1f0)][_0x399427][_0x44ddaf(0x1db)])[_0x44ddaf(0x1e9)]();const _0x41d9cf=Object[_0x44ddaf(0x1ea)](_0x53dced[_0x44ddaf(0x1f0)])[0x0];if(_0x41d9cf?.[_0x44ddaf(0x1db)])return String(_0x41d9cf['appcode'])['trim']();}const _0xa8c76f=_0x53dced[_0x44ddaf(0x1db)]||_0x53dced[_0x44ddaf(0x1f3)];if(typeof _0xa8c76f!==_0x44ddaf(0x1eb)||_0xa8c76f['trim']()==='')return undefined;return _0xa8c76f[_0x44ddaf(0x1e9)]();}export function getMultiAppConfigs(_0x30012c=a196_0x3b7e82(0x1da),_0x33c67e){const _0x59274e=a196_0x3b7e82,_0x43202f=loadRawConfigLayers(_0x33c67e);let _0x3b42cb,_0x3df210;if(_0x30012c==='merged'){const _0x339e0a=_0x43202f[_0x59274e(0x1ee)][_0x59274e(0x1f0)]&&typeof _0x43202f[_0x59274e(0x1ee)][_0x59274e(0x1f0)]==='object'?_0x43202f[_0x59274e(0x1ee)][_0x59274e(0x1f0)]:{},_0xa926fe=_0x43202f[_0x59274e(0x1f9)]['apps']&&typeof _0x43202f['projectConfig']['apps']===_0x59274e(0x1f1)?_0x43202f[_0x59274e(0x1f9)][_0x59274e(0x1f0)]:{};_0x3b42cb={..._0x339e0a,..._0xa926fe};const _0xa147c1=readRawConfig(_0x33c67e);_0x3df210=_0xa147c1[_0x59274e(0x1d9)];}else _0x3b42cb=_0x43202f['projectConfig'][_0x59274e(0x1f0)],_0x3df210=_0x43202f[_0x59274e(0x1f9)][_0x59274e(0x1d9)];if(!_0x3b42cb||typeof _0x3b42cb!==_0x59274e(0x1f1)||Object[_0x59274e(0x1e3)](_0x3b42cb)['length']===0x0)return null;return Object['entries'](_0x3b42cb)[_0x59274e(0x1ed)](([_0x3886e9,_0x38f97f])=>({'name':_0x3886e9,'appcode':_0x38f97f?.[_0x59274e(0x1db)]||'','isDefault':_0x3886e9===_0x3df210,'env':_0x38f97f?.[_0x59274e(0x1e6)],'apiDir':_0x38f97f?.[_0x59274e(0x1d6)],'cookie':_0x38f97f?.[_0x59274e(0x1f4)]||undefined}))['filter'](_0x2b06f6=>_0x2b06f6['appcode']);}export function getTemplateBaseUrl(_0x59a91a){const _0x709a26=a196_0x3b7e82,_0x63de2f=readRawConfig(_0x59a91a);if(_0x63de2f[_0x709a26(0x1e8)]&&typeof _0x63de2f['template_base_url']==='string')return _0x63de2f[_0x709a26(0x1e8)][_0x709a26(0x1e2)](/\/$/,'');return _0x709a26(0x1f8);}function buildConfig(_0x25557e,_0x9becda,_0x1c92a2){return{...resolveAppConfig({'raw':_0x25557e,'flags':_0x9becda,'layers':_0x1c92a2,'readEnv':env}),'raw':_0x25557e};}export function resolveApiFilePath(_0x3bc12e,_0x3a9a22){const _0x5b8717=a196_0x3b7e82,_0x39433b=resolve(process[_0x5b8717(0x1f6)](),_0x3bc12e),_0x315a0f=resolve(_0x39433b,'api.ts');if(!_0x3a9a22)return _0x315a0f;const _0x361f81=readRawConfig(),_0x481dd3=_0x361f81[_0x5b8717(0x1f0)]&&typeof _0x361f81[_0x5b8717(0x1f0)]===_0x5b8717(0x1f1)?_0x361f81[_0x5b8717(0x1f0)]:{},_0x2cdae7=Object['entries'](_0x481dd3)['find'](([,_0x4cfaae])=>_0x4cfaae?.[_0x5b8717(0x1db)]===_0x3a9a22);if(!_0x2cdae7)return _0x315a0f;const [_0xb23f17,_0x1b8d93]=_0x2cdae7,_0xba6cf1=typeof _0x361f81[_0x5b8717(0x1d9)]==='string'?_0x361f81[_0x5b8717(0x1d9)]:undefined;if(_0x1b8d93?.[_0x5b8717(0x1d6)])return _0x315a0f;if(_0xba6cf1&&_0xb23f17!==_0xba6cf1)return resolve(_0x39433b,_0xb23f17+_0x5b8717(0x1f2));return _0x315a0f;}
1
+ (function(_0x5e0cc9,_0x51cf77){const _0xce25bd=a198_0x5523,_0x34924c=_0x5e0cc9();while(!![]){try{const _0x1e3fcd=parseInt(_0xce25bd(0x16e))/0x1*(parseInt(_0xce25bd(0x15d))/0x2)+-parseInt(_0xce25bd(0x167))/0x3*(parseInt(_0xce25bd(0x16b))/0x4)+-parseInt(_0xce25bd(0x176))/0x5+parseInt(_0xce25bd(0x17a))/0x6+parseInt(_0xce25bd(0x170))/0x7+-parseInt(_0xce25bd(0x17e))/0x8*(parseInt(_0xce25bd(0x175))/0x9)+parseInt(_0xce25bd(0x17d))/0xa*(parseInt(_0xce25bd(0x15a))/0xb);if(_0x1e3fcd===_0x51cf77)break;else _0x34924c['push'](_0x34924c['shift']());}catch(_0x241628){_0x34924c['push'](_0x34924c['shift']());}}}(a198_0x44ae,0x279d6));import{resolve}from'node:path';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,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';function a198_0x5523(_0xcaa12b,_0x1aeaae){_0xcaa12b=_0xcaa12b-0x15a;const _0x44ae8e=a198_0x44ae();let _0x552385=_0x44ae8e[_0xcaa12b];return _0x552385;}import{logger}from'./utils/logger.js';function a198_0x44ae(){const _0x16630e=['104cGLQnr','merged','trim','slice','-api.ts','globalConfig','values','userDomain','44tQpVHd','setRawCommand','filter','46DbgoJE','runtimeDomain','keys','cookie','length','cwd','object','defaultApp','https://g.lovrabet.com/dist/lovrabet-skill','find','178197JJntuC','join','./constant/domain.js','apiDomain','12nTlDLs','api.ts','string','348GdKEkx','./constant/env.js','955815xRoiyD','setLogPath','appcode','replace','apps','47007NlXdsw','1444575vKynwK','entries','projectConfig','argv','1415376RbNkZs','env','map','792070ucqaEb'];a198_0x44ae=function(){return _0x16630e;};return a198_0x44ae();}export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x39c20e){return process.env[`RABETBASE_${_0x39c20e}`]||process.env[`LOVRABET_${_0x39c20e}`]||undefined;}export async function createContext(_0x4f654a){const _0x9d8abe=a198_0x5523,{config:_0x2cd502,layers:_0xd28e52}=readRawConfigWithLayers(),_0x46677e=buildConfig(_0x2cd502,_0x4f654a,_0xd28e52),{initEnv:_0x3a2715}=await import(_0x9d8abe(0x16f));if(_0x46677e[_0x9d8abe(0x17b)])_0x3a2715(_0x46677e[_0x9d8abe(0x17b)]);else _0x4f654a['env']&&typeof _0x4f654a[_0x9d8abe(0x17b)]===_0x9d8abe(0x16d)&&_0x3a2715(_0x4f654a[_0x9d8abe(0x17b)]);const {initDomains:_0x364dd0,getUserDomain:_0x38946c,getApiDomain:_0x26b89f}=await import(_0x9d8abe(0x169));_0x364dd0({'apiDomain':_0x2cd502[_0x9d8abe(0x16a)]||undefined,'userDomain':_0x2cd502[_0x9d8abe(0x185)]||undefined,'runtimeDomain':_0x2cd502[_0x9d8abe(0x15e)]||undefined});const _0x1585a5={'apiDomain':_0x26b89f(),'userDomain':_0x38946c()},_0x2bdffb=await buildAuth(_0x46677e);logger[_0x9d8abe(0x171)](process[_0x9d8abe(0x162)]());const _0x483d10=(CLI_BIN_NAME+'\x20'+process[_0x9d8abe(0x179)][_0x9d8abe(0x181)](0x2)[_0x9d8abe(0x168)]('\x20'))[_0x9d8abe(0x180)]();logger[_0x9d8abe(0x15b)](_0x483d10);const {isNonInteractive:_0x17e313}=await import('./utils/is-non-interactive.js'),_0x1b4832=_0x17e313(_0x4f654a);return{'config':_0x46677e,'auth':_0x2bdffb,'logger':logger,'env':_0x1585a5,'nonInteractive':_0x1b4832};}export function buildConfigFromFlags(_0x4e150b){const {config:_0x1d94b1,layers:_0x178e22}=readRawConfigWithLayers();return buildConfig(_0x1d94b1,_0x4e150b,_0x178e22);}export function getConfigAppCode(_0xc6f7e0){const _0x5351f1=a198_0x5523,_0x27d956=readRawConfig(_0xc6f7e0);if(_0x27d956[_0x5351f1(0x174)]&&typeof _0x27d956[_0x5351f1(0x174)]===_0x5351f1(0x163)){const _0x58b0f=_0x27d956[_0x5351f1(0x164)];if(_0x58b0f&&_0x27d956[_0x5351f1(0x174)][_0x58b0f]?.[_0x5351f1(0x172)])return String(_0x27d956['apps'][_0x58b0f]['appcode'])[_0x5351f1(0x180)]();const _0x5ed551=Object[_0x5351f1(0x184)](_0x27d956[_0x5351f1(0x174)])[0x0];if(_0x5ed551?.['appcode'])return String(_0x5ed551['appcode'])[_0x5351f1(0x180)]();}const _0x5201bc=_0x27d956['appcode']||_0x27d956['app'];if(typeof _0x5201bc!==_0x5351f1(0x16d)||_0x5201bc[_0x5351f1(0x180)]()==='')return undefined;return _0x5201bc[_0x5351f1(0x180)]();}export function getMultiAppConfigs(_0x459a14='project',_0x61c385){const _0x4e04cb=a198_0x5523,_0x3e27b2=loadRawConfigLayers(_0x61c385);let _0xcbbdc7,_0x586f71;if(_0x459a14===_0x4e04cb(0x17f)){const _0x29954d=_0x3e27b2['globalConfig'][_0x4e04cb(0x174)]&&typeof _0x3e27b2[_0x4e04cb(0x183)][_0x4e04cb(0x174)]==='object'?_0x3e27b2['globalConfig'][_0x4e04cb(0x174)]:{},_0x2a6785=_0x3e27b2[_0x4e04cb(0x178)][_0x4e04cb(0x174)]&&typeof _0x3e27b2[_0x4e04cb(0x178)][_0x4e04cb(0x174)]===_0x4e04cb(0x163)?_0x3e27b2[_0x4e04cb(0x178)]['apps']:{};_0xcbbdc7={..._0x29954d,..._0x2a6785};const _0x4fa69b=readRawConfig(_0x61c385);_0x586f71=_0x4fa69b[_0x4e04cb(0x164)];}else _0xcbbdc7=_0x3e27b2[_0x4e04cb(0x178)][_0x4e04cb(0x174)],_0x586f71=_0x3e27b2[_0x4e04cb(0x178)]['defaultApp'];if(!_0xcbbdc7||typeof _0xcbbdc7!==_0x4e04cb(0x163)||Object[_0x4e04cb(0x15f)](_0xcbbdc7)[_0x4e04cb(0x161)]===0x0)return null;return Object[_0x4e04cb(0x177)](_0xcbbdc7)[_0x4e04cb(0x17c)](([_0x15ed08,_0x583f6a])=>({'name':_0x15ed08,'appcode':_0x583f6a?.['appcode']||'','isDefault':_0x15ed08===_0x586f71,'env':_0x583f6a?.[_0x4e04cb(0x17b)],'apiDir':_0x583f6a?.['apiDir'],'cookie':_0x583f6a?.[_0x4e04cb(0x160)]||undefined}))[_0x4e04cb(0x15c)](_0x24b0ca=>_0x24b0ca[_0x4e04cb(0x172)]);}export function getTemplateBaseUrl(_0x5ec304){const _0x447dd0=a198_0x5523,_0x2bc814=readRawConfig(_0x5ec304);if(_0x2bc814['template_base_url']&&typeof _0x2bc814['template_base_url']===_0x447dd0(0x16d))return _0x2bc814['template_base_url'][_0x447dd0(0x173)](/\/$/,'');return _0x447dd0(0x165);}function buildConfig(_0x264e21,_0x285d7b,_0x365721){return{...resolveAppConfig({'raw':_0x264e21,'flags':_0x285d7b,'layers':_0x365721,'readEnv':env}),'raw':_0x264e21};}export function resolveApiFilePath(_0x634fa5,_0x75ff3){const _0x2c23f0=a198_0x5523,_0x4a1311=resolve(process[_0x2c23f0(0x162)](),_0x634fa5),_0x42956b=resolve(_0x4a1311,_0x2c23f0(0x16c));if(!_0x75ff3)return _0x42956b;const _0x3cf4e0=readRawConfig(),_0x3f6b2d=_0x3cf4e0[_0x2c23f0(0x174)]&&typeof _0x3cf4e0['apps']==='object'?_0x3cf4e0['apps']:{},_0x4a9fd2=Object['entries'](_0x3f6b2d)[_0x2c23f0(0x166)](([,_0x10b537])=>_0x10b537?.[_0x2c23f0(0x172)]===_0x75ff3);if(!_0x4a9fd2)return _0x42956b;const [_0x284ab8,_0x51e7f7]=_0x4a9fd2,_0x1d24bf=typeof _0x3cf4e0[_0x2c23f0(0x164)]===_0x2c23f0(0x16d)?_0x3cf4e0['defaultApp']:undefined;if(_0x51e7f7?.['apiDir'])return _0x42956b;if(_0x1d24bf&&_0x284ab8!==_0x1d24bf)return resolve(_0x4a1311,_0x284ab8+_0x2c23f0(0x182));return _0x42956b;}
@@ -1 +1 @@
1
- (function(_0x5d9293,_0x3f3e0b){const _0x10c521=a197_0x5104,_0xcbd68f=_0x5d9293();while(!![]){try{const _0x17e33f=-parseInt(_0x10c521(0x1b1))/0x1+-parseInt(_0x10c521(0x1b4))/0x2*(-parseInt(_0x10c521(0x1af))/0x3)+parseInt(_0x10c521(0x1b5))/0x4+-parseInt(_0x10c521(0x1b8))/0x5+parseInt(_0x10c521(0x1ad))/0x6*(parseInt(_0x10c521(0x1b9))/0x7)+parseInt(_0x10c521(0x1ba))/0x8*(parseInt(_0x10c521(0x1b2))/0x9)+-parseInt(_0x10c521(0x1bb))/0xa;if(_0x17e33f===_0x3f3e0b)break;else _0xcbd68f['push'](_0xcbd68f['shift']());}catch(_0x3ea4e8){_0xcbd68f['push'](_0xcbd68f['shift']());}}}(a197_0x5746,0x7e319));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a197_0x5746(){const _0x53ef2e=['has','alias','api.ts','datasetCode','utf-8','16584SfNkqq','cwd','1023caHtib','exec','405156tAVIPr','117FtXEdy','push','34WsLSGf','3681416vbgQdF','find','set','2743410jNCKEK','1470EQVUbB','535336hGQgST','9057850zNTIoU'];a197_0x5746=function(){return _0x53ef2e;};return a197_0x5746();}const cache=new Map();function parseApiFile(_0x2b1202){const _0x21e980=a197_0x5104,_0x4b4ce6=[],_0x5966e2=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x5e39a0;while((_0x5e39a0=_0x5966e2[_0x21e980(0x1b0)](_0x2b1202))!==null){_0x4b4ce6[_0x21e980(0x1b3)]({'datasetCode':_0x5e39a0[0x1],'tableName':_0x5e39a0[0x2],'name':_0x5e39a0[0x3],'alias':_0x5e39a0[0x4]});}return _0x4b4ce6;}export function loadAliasMap(_0x22c0c3,_0x46d582,_0xde90f0){const _0x75ef2e=a197_0x5104,_0x338de9=_0xde90f0??resolve(process[_0x75ef2e(0x1ae)](),_0x22c0c3,_0x75ef2e(0x1be));if(cache[_0x75ef2e(0x1bc)](_0x338de9))return cache['get'](_0x338de9);if(!existsSync(_0x338de9))return cache[_0x75ef2e(0x1b7)](_0x338de9,[]),[];try{const _0x3caf98=readFileSync(_0x338de9,_0x75ef2e(0x1c0)),_0x169b1c=parseApiFile(_0x3caf98);return cache[_0x75ef2e(0x1b7)](_0x338de9,_0x169b1c),_0x169b1c;}catch{return cache[_0x75ef2e(0x1b7)](_0x338de9,[]),[];}}export function resolveAlias(_0x131e0c,_0x2ac02c,_0x1a840e,_0x2fed6f){const _0x43a840=a197_0x5104;if(!_0x2ac02c)return undefined;const _0x432c44=loadAliasMap(_0x131e0c,_0x1a840e,_0x2fed6f),_0x1c2ae4=_0x432c44[_0x43a840(0x1b6)](_0x341988=>_0x341988[_0x43a840(0x1bd)]===_0x2ac02c);return _0x1c2ae4?.[_0x43a840(0x1bf)];}function a197_0x5104(_0x2710ee,_0x2d6655){_0x2710ee=_0x2710ee-0x1ad;const _0x5746af=a197_0x5746();let _0x5104c8=_0x5746af[_0x2710ee];return _0x5104c8;}export function listAliases(_0x1c0482,_0x16a0e5,_0x3c3609){return loadAliasMap(_0x1c0482,_0x16a0e5,_0x3c3609);}
1
+ (function(_0x128530,_0x862d9){const _0x3f3288=a199_0x1a5b,_0x6fc090=_0x128530();while(!![]){try{const _0x3c73c3=parseInt(_0x3f3288(0x1dd))/0x1+-parseInt(_0x3f3288(0x1d8))/0x2+-parseInt(_0x3f3288(0x1dc))/0x3*(parseInt(_0x3f3288(0x1d1))/0x4)+-parseInt(_0x3f3288(0x1da))/0x5*(parseInt(_0x3f3288(0x1d5))/0x6)+-parseInt(_0x3f3288(0x1d6))/0x7+parseInt(_0x3f3288(0x1d9))/0x8+parseInt(_0x3f3288(0x1db))/0x9;if(_0x3c73c3===_0x862d9)break;else _0x6fc090['push'](_0x6fc090['shift']());}catch(_0x57c34e){_0x6fc090['push'](_0x6fc090['shift']());}}}(a199_0x29ac,0xeb9f2));import{readFileSync,existsSync}from'node:fs';function a199_0x29ac(){const _0x4b9fe3=['utf-8','160yGOssY','alias','datasetCode','has','114738nptkjW','1977731eKuBtX','find','1298488bRjFVV','165776VogKBj','465PfAwfC','36535545OHoPms','55302QnSRow','332455yUDDxG','set','cwd'];a199_0x29ac=function(){return _0x4b9fe3;};return a199_0x29ac();}import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x4e87e4){const _0x3340af=[],_0x46e3c0=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x36370e;while((_0x36370e=_0x46e3c0['exec'](_0x4e87e4))!==null){_0x3340af['push']({'datasetCode':_0x36370e[0x1],'tableName':_0x36370e[0x2],'name':_0x36370e[0x3],'alias':_0x36370e[0x4]});}return _0x3340af;}function a199_0x1a5b(_0x349f56,_0x13e3c8){_0x349f56=_0x349f56-0x1d1;const _0x29acc9=a199_0x29ac();let _0x1a5b1e=_0x29acc9[_0x349f56];return _0x1a5b1e;}export function loadAliasMap(_0xac3f90,_0x81f0ca,_0x53b3b5){const _0xa99076=a199_0x1a5b,_0x2ed9e5=_0x53b3b5??resolve(process[_0xa99076(0x1df)](),_0xac3f90,'api.ts');if(cache[_0xa99076(0x1d4)](_0x2ed9e5))return cache['get'](_0x2ed9e5);if(!existsSync(_0x2ed9e5))return cache[_0xa99076(0x1de)](_0x2ed9e5,[]),[];try{const _0x5e2ed0=readFileSync(_0x2ed9e5,_0xa99076(0x1e0)),_0x3862fe=parseApiFile(_0x5e2ed0);return cache['set'](_0x2ed9e5,_0x3862fe),_0x3862fe;}catch{return cache[_0xa99076(0x1de)](_0x2ed9e5,[]),[];}}export function resolveAlias(_0x23f59e,_0x373714,_0x1facd7,_0x1068ae){const _0x1aa3c0=a199_0x1a5b;if(!_0x373714)return undefined;const _0xe28d99=loadAliasMap(_0x23f59e,_0x1facd7,_0x1068ae),_0x236574=_0xe28d99[_0x1aa3c0(0x1d7)](_0x209ba0=>_0x209ba0[_0x1aa3c0(0x1d2)]===_0x373714);return _0x236574?.[_0x1aa3c0(0x1d3)];}export function listAliases(_0x1d693b,_0x3a9342,_0x13c753){return loadAliasMap(_0x1d693b,_0x3a9342,_0x13c753);}
@@ -1 +1 @@
1
- (function(_0x244e45,_0x153b77){const _0x5e4727=a198_0x42d3,_0x37864a=_0x244e45();while(!![]){try{const _0x5f17fa=-parseInt(_0x5e4727(0x1a1))/0x1+parseInt(_0x5e4727(0x1d0))/0x2*(parseInt(_0x5e4727(0x13b))/0x3)+parseInt(_0x5e4727(0x135))/0x4+-parseInt(_0x5e4727(0x179))/0x5*(-parseInt(_0x5e4727(0x188))/0x6)+-parseInt(_0x5e4727(0xfc))/0x7*(-parseInt(_0x5e4727(0x173))/0x8)+-parseInt(_0x5e4727(0x183))/0x9+-parseInt(_0x5e4727(0x169))/0xa;if(_0x5f17fa===_0x153b77)break;else _0x37864a['push'](_0x37864a['shift']());}catch(_0xda691b){_0x37864a['push'](_0x37864a['shift']());}}}(a198_0x3464,0xbb42d));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';let _activeCookie;export function setActiveCookie(_0x26fd76){_activeCookie=_0x26fd76||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x2bf20;function createFetchFailureError(_0x4ebe30,_0x30f9fa){const _0x2e141d=a198_0x42d3,_0x49f355=_0x30f9fa instanceof Error?_0x30f9fa[_0x2e141d(0x137)]:String(_0x30f9fa);return CliErrors[_0x2e141d(0x1b8)]('Request\x20failed:\x20'+_0x4ebe30+(_0x49f355?'\x20('+_0x49f355+')':''),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}async function apiRequest(_0x520a80,_0x489785={}){const _0xdf65c9=a198_0x42d3,{method:method=_0xdf65c9(0x1a8),body:_0x32890e,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x489785,_0x21eb3b=useRuntime?getRuntimeDomain():getApiDomain(),_0x1b22fd=_activeCookie||getCookie(),_0x48dd58=''+_0x21eb3b+_0x520a80,_0x52e0da=new AbortController(),_0x80ceb8=setTimeout(()=>_0x52e0da[_0xdf65c9(0x10d)](),timeout);try{const _0x44d526=await fetch(_0x48dd58,{'method':method,'headers':{'Content-Type':_0xdf65c9(0x17c),'Cookie':_0x1b22fd,'X-Invoke-Source':_0xdf65c9(0x1d8),...headers},'body':_0x32890e?JSON[_0xdf65c9(0x187)](_0x32890e):undefined,'signal':_0x52e0da['signal']});let _0xc2c830;try{_0xc2c830=await _0x44d526[_0xdf65c9(0x100)]();}catch(_0x2a37ae){if(_0x2a37ae instanceof Error&&_0x2a37ae[_0xdf65c9(0x146)]===_0xdf65c9(0x161))throw CliErrors[_0xdf65c9(0x1b8)](_0xdf65c9(0x114)+_0x48dd58);if(_0x44d526['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0xdf65c9(0x1b8)](_0xdf65c9(0x123)+_0x44d526['status']+')',_0x44d526[_0xdf65c9(0x162)]>=0x190?_0xdf65c9(0x1cf):undefined);}if(!_0x44d526['ok']||_0xc2c830[_0xdf65c9(0x125)]===![])throw CliErrors[_0xdf65c9(0x1b8)](_0xc2c830[_0xdf65c9(0x11c)]||_0xc2c830['message']||_0xdf65c9(0x133)+_0x44d526[_0xdf65c9(0x162)],_0xc2c830[_0xdf65c9(0x1c2)]?_0xdf65c9(0x16b)+_0xc2c830[_0xdf65c9(0x1c2)]:undefined);return _0xc2c830;}catch(_0x338a75){if(_0x338a75 instanceof CliError)throw _0x338a75;if(_0x338a75 instanceof Error&&_0x338a75[_0xdf65c9(0x146)]===_0xdf65c9(0x161))throw CliErrors[_0xdf65c9(0x1b8)]('Request\x20timeout:\x20'+_0x48dd58);throw createFetchFailureError(_0x48dd58,_0x338a75);}finally{clearTimeout(_0x80ceb8);}}async function apiFormRequest(_0x14aa17,_0x354aa8,_0x4a3d52={}){const _0x51f700=a198_0x42d3,{timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS}=_0x4a3d52,_0x29b903=_activeCookie||getCookie(),_0x2575d7=''+getApiDomain()+_0x14aa17,_0x4c3403=new AbortController(),_0x1eaf87=setTimeout(()=>_0x4c3403[_0x51f700(0x10d)](),timeout);try{const _0x107ebb=await fetch(_0x2575d7,{'method':_0x51f700(0x165),'headers':{'Cookie':_0x29b903,'X-Invoke-Source':'cli:rabetbase'},'body':_0x354aa8,'signal':_0x4c3403[_0x51f700(0x19a)]});let _0x12e1d6;try{_0x12e1d6=await _0x107ebb[_0x51f700(0x100)]();}catch(_0x4434f7){if(_0x4434f7 instanceof Error&&_0x4434f7[_0x51f700(0x146)]==='AbortError')throw CliErrors[_0x51f700(0x1b8)](_0x51f700(0x114)+_0x2575d7);throw CliErrors[_0x51f700(0x1b8)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x107ebb['status']+')',_0x107ebb[_0x51f700(0x162)]>=0x190?_0x51f700(0x1cf):undefined);}if(!_0x107ebb['ok']||_0x12e1d6[_0x51f700(0x125)]===![])throw CliErrors['apiError'](_0x12e1d6[_0x51f700(0x11c)]||_0x12e1d6[_0x51f700(0x137)]||_0x51f700(0x133)+_0x107ebb[_0x51f700(0x162)],_0x12e1d6[_0x51f700(0x1c2)]?_0x51f700(0x16b)+_0x12e1d6[_0x51f700(0x1c2)]:undefined);return _0x12e1d6;}catch(_0x1fa22f){if(_0x1fa22f instanceof CliError)throw _0x1fa22f;if(_0x1fa22f instanceof Error&&_0x1fa22f[_0x51f700(0x146)]===_0x51f700(0x161))throw CliErrors[_0x51f700(0x1b8)](_0x51f700(0x114)+_0x2575d7);throw createFetchFailureError(_0x2575d7,_0x1fa22f);}finally{clearTimeout(_0x1eaf87);}}export async function uploadDevelopmentFile(_0x406c93,_0x5c6b38){const _0xaa8f93=a198_0x42d3,_0x5caea1=await readFile(_0x5c6b38),_0x386c13=new FormData();_0x386c13[_0xaa8f93(0x17f)]('appCode',_0x406c93),_0x386c13['append'](_0xaa8f93(0x10c),new Blob([new Uint8Array(_0x5caea1)]),basename(_0x5c6b38));const _0x2191f8=await apiFormRequest('/smartapi/common/uploadFile',_0x386c13);return _0x2191f8[_0xaa8f93(0xf9)];}export async function queryDevelopmentFileUrl(_0x5463e3,_0x281e2e={}){const _0x9643aa=a198_0x42d3,_0x3bfd05=await apiRequest(_0x9643aa(0x12e),{'method':'POST','body':{'filePath':_0x5463e3,'downloadFlag':_0x281e2e[_0x9643aa(0x110)]??![],..._0x281e2e[_0x9643aa(0x122)]?{'longTerm':!![]}:{}}});return _0x3bfd05[_0x9643aa(0xf9)];}function isAuthFailure(_0x496a78){const _0x560d03=a198_0x42d3,_0x1b281f=_0x496a78['errorMsg']||_0x496a78[_0x560d03(0x137)]||_0x496a78['data']?.[_0x560d03(0x137)]||_0x496a78[_0x560d03(0x1a2)]||_0x496a78['error']||'';return _0x496a78[_0x560d03(0x1c2)]===_0x560d03(0x1d7)||_0x496a78[_0x560d03(0x118)]===0x191||_0x496a78[_0x560d03(0x118)]===_0x560d03(0x120)||_0x1b281f[_0x560d03(0x16d)](_0x560d03(0x120))||_0x1b281f[_0x560d03(0x16d)](_0x560d03(0xfe))||_0x1b281f['includes']('登录')||_0x1b281f[_0x560d03(0x16d)]('认证');}export async function platformFetch(_0x3b8e67,_0x3fcb49){const _0x57e16c=a198_0x42d3;let _0x56d641;try{_0x56d641=await fetch(_0x3b8e67,{'method':_0x3fcb49[_0x57e16c(0x1c4)]??_0x57e16c(0x1a8),'headers':{'Content-Type':_0x57e16c(0x17c),'Cookie':_0x3fcb49[_0x57e16c(0x18c)],'X-Invoke-Source':'cli:rabetbase'},..._0x3fcb49[_0x57e16c(0x18a)]&&{'body':JSON[_0x57e16c(0x187)](_0x3fcb49[_0x57e16c(0x18a)])}});}catch(_0x507297){throw createFetchFailureError(_0x3b8e67,_0x507297);}if(!_0x56d641['ok']){if(_0x56d641['status']===0x191)throw CliErrors['authRequired']();throw CliErrors[_0x57e16c(0x1b8)](_0x3fcb49[_0x57e16c(0x11e)]+_0x57e16c(0x105)+_0x56d641['status']);}const _0x56ae95=await _0x56d641[_0x57e16c(0x100)]();if(_0x56ae95['success']===![]){if(isAuthFailure(_0x56ae95))throw CliErrors[_0x57e16c(0x144)]();throw CliErrors[_0x57e16c(0x1b8)](_0x56ae95[_0x57e16c(0x11c)]||_0x56ae95[_0x57e16c(0x137)]||_0x3fcb49[_0x57e16c(0x11e)]+_0x57e16c(0x18b));}return _0x56ae95[_0x57e16c(0xf9)];}export async function platformRequest(_0x1bd513,_0x210996){const _0x29f5d3=a198_0x42d3;if(/^https?:\/\//i['test'](_0x1bd513))throw CliErrors[_0x29f5d3(0x107)]('platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20'+_0x1bd513,_0x29f5d3(0x1d1));const _0x4cf639=_0x1bd513['startsWith']('/')?_0x1bd513:'/'+_0x1bd513;return platformFetch(''+getApiDomain()+_0x4cf639,_0x210996);}function cleanNewlines(_0x24ca18){const _0x440bbd=a198_0x42d3;return _0x24ca18[_0x440bbd(0x15c)](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0x1db50a){const _0x52db55=a198_0x42d3;if(!_0x1db50a[_0x52db55(0x146)])return _0x1db50a;return{..._0x1db50a,'name':cleanNewlines(_0x1db50a[_0x52db55(0x146)])};}export async function fetchModelList(_0x9ceadd,_0x5c4a55){const _0x438cbc=a198_0x42d3,_0x3fbd88=getEnv(),_0x258eb8=new URLSearchParams({'appcode':_0x9ceadd,'otype':_0x438cbc(0x138)}),_0x1c326e='/api/node-toolbox/dataset/model-list?'+_0x258eb8[_0x438cbc(0x14d)]();logger[_0x438cbc(0x174)]('fetch-model-list',_0x438cbc(0x1c1)+_0x3fbd88+')',{'apiPath':_0x1c326e});const _0x3e7bf2=await platformRequest(_0x1c326e,{'cookie':_0x5c4a55,'label':_0x438cbc(0x12c)}),_0x4c0adf=(_0x3e7bf2['configArray']??[])['map'](cleanDatasetName);return{'configArray':_0x4c0adf,'count':_0x4c0adf[_0x438cbc(0x1c7)]};}export async function fetchDatasetDoc(_0x1efd1c){const _0x5102c8=a198_0x42d3,{appCode:_0xe55ed5,cookie:_0x3ea436,datasetCode:_0x486f5f,datasetId:_0x106f3b,extraParams:_0x62b2fe}=_0x1efd1c,_0x4515e4=await platformRequest(_0x5102c8(0x1ba),{'method':'POST','body':{'appCode':_0xe55ed5,'datasetCode':_0x486f5f,'datasetId':_0x106f3b,..._0x62b2fe||{}},'cookie':_0x3ea436,'label':_0x5102c8(0x119)+_0x486f5f+')'});if(!_0x4515e4||typeof _0x4515e4['markdown']!==_0x5102c8(0x140))throw new Error(_0x5102c8(0x1c6)+_0x486f5f+_0x5102c8(0xf6));return _0x4515e4[_0x5102c8(0x184)];}export async function getMenuTree(_0x5e6ef5,_0x459729){const _0x25dc9a=a198_0x42d3,_0xa9c7e6=new URLSearchParams({'appCode':_0x5e6ef5});return platformRequest('/smartapi/menu/find?'+_0xa9c7e6['toString'](),{'cookie':_0x459729,'label':_0x25dc9a(0x1ca)});}export async function createMenuRecord(_0x2c8b2e,_0x536e4d,_0x1ed6a0){const _0x2d76d2=a198_0x42d3;return platformRequest(_0x2d76d2(0x1a4),{'method':_0x2d76d2(0x165),'body':_0x2c8b2e,'cookie':_0x536e4d,'label':_0x1ed6a0});}export async function updateMenuRecord(_0x5bf32f,_0x4ed34c,_0x24da46){const _0x230058=a198_0x42d3;return platformRequest(_0x230058(0x1bb),{'method':_0x230058(0x165),'body':_0x5bf32f,'cookie':_0x4ed34c,'label':_0x24da46});}function a198_0x42d3(_0x1be1a6,_0x33dd9e){_0x1be1a6=_0x1be1a6-0xf4;const _0x3464e3=a198_0x3464();let _0x42d3aa=_0x3464e3[_0x1be1a6];return _0x42d3aa;}export async function deleteMenuRecord(_0xb655fc,_0x3ffc4f,_0x137157){const _0x3956ae=a198_0x42d3;return platformRequest('/smartapi/menu/delete',{'method':_0x3956ae(0x165),'body':{'id':_0xb655fc},'cookie':_0x3ffc4f,'label':_0x137157});}export async function batchDeleteMenuRecords(_0x509eaf,_0x11e43d,_0x105f6d){const _0x3ce1e0=a198_0x42d3;return platformRequest(_0x3ce1e0(0x14e),{'method':_0x3ce1e0(0x165),'body':{'idList':_0x509eaf},'cookie':_0x11e43d,'label':_0x105f6d});}export async function startMenuRegroup(_0x4768fe,_0x5aaf6d,_0xba98d5){return platformRequest('/smartapi/menu/regroup',{'method':'POST','body':_0x4768fe,'cookie':_0x5aaf6d,'label':_0xba98d5});}export async function getAsyncTaskStatus(_0x4635b9,_0x1aa994,_0x42c442){const _0x4bc909=a198_0x42d3,_0x3b2d8e=new URLSearchParams({'appCode':_0x1aa994});return platformRequest(_0x4bc909(0x152)+encodeURIComponent(_0x4635b9)+'?'+_0x3b2d8e['toString'](),{'cookie':_0x42c442,'label':'Fetch\x20async\x20task\x20'+_0x4635b9});}export async function listBffScripts(_0x3853ec,_0xc78ac,_0x2eee5b){const _0x33a1a5=a198_0x42d3;let _0x21dd1d=_0x33a1a5(0x197)+_0x3853ec;if(_0xc78ac)_0x21dd1d+=_0x33a1a5(0xfd)+_0xc78ac;const _0x272b0d=await apiRequest(_0x21dd1d);let _0x10cd2b=extractList(_0x272b0d['data']);if(_0x2eee5b?.['scriptName']){const _0x125090=_0x2eee5b[_0x33a1a5(0x167)][_0x33a1a5(0x1aa)]();_0x10cd2b=_0x10cd2b[_0x33a1a5(0x10a)](_0x14b25c=>_0x14b25c[_0x33a1a5(0x10e)]?.[_0x33a1a5(0x1aa)]()['includes'](_0x125090)||_0x14b25c['description']?.['toLowerCase']()[_0x33a1a5(0x16d)](_0x125090));}return _0x10cd2b;}export async function getBffScriptInfo(_0x395519){const _0x2421ad=a198_0x42d3,_0x2a9318=await apiRequest(_0x2421ad(0x1c8)+_0x395519);if(!_0x2a9318[_0x2421ad(0xf9)])throw CliErrors[_0x2421ad(0x107)]('BFF\x20script\x20not\x20found:\x20id='+_0x395519);return _0x2a9318[_0x2421ad(0xf9)];}export async function saveBffScript(_0x41f2a1){const _0x4d2e40=a198_0x42d3,_0x1668e5=await apiRequest(_0x4d2e40(0x18f),{'method':_0x4d2e40(0x165),'body':_0x41f2a1}),{id:_0x3e293f,entity:_0x5c71d3}=normalizeEntityWithIdResponse(_0x1668e5['data']);if(_0x3e293f!==undefined){const _0x54953a=typeof _0x5c71d3[_0x4d2e40(0x10e)]===_0x4d2e40(0x140)||typeof _0x5c71d3[_0x4d2e40(0x12a)]===_0x4d2e40(0x140)?_0x5c71d3:undefined;return{'id':_0x3e293f,'script':_0x54953a};}throw CliErrors[_0x4d2e40(0x1b8)]('BFF\x20save\x20returned\x20no\x20valid\x20id');}function a198_0x3464(){const _0x24abc1=['/smartapi/dataset/text-generate/start','type','/smartapi/dataset/get-dataset-list','datasetTableCount','AbortError','status','avatar','/smartapi/question/er-config/cli/update-single','POST','.filter({','scriptName','const\x20result\x20=\x20await\x20client.models.','16632020sAsqEK','object','API\x20error\x20code:\x20','?sqlCode=','includes','/smartapi/permit/role/get-permit-list','version','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','ENABLE','/smartapi/custom/updateUserCustomSql','112Nvahml','info','join','permits','/smartapi/db-analysis/start','getOne','572765UdyDhK','/smartapi/dataset/text-generate/preview','/notification/channel-config/list','application/json','/smartapi/permit/role/delete','/smartapi/permit/resource/get-menu-list','append','sqlCode','dbId','remark','5318433rtwofR','markdown','pageSize','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','stringify','12vCnlmN','modelCode','body','\x20failed','cookie','\x20\x20currentPage:\x201,','tableName','/api/management/library/scripts/save','description','});','/smartapi/permit/user-role/get-user-list','/smartapi/dataset/delete-dataset','/smartapi/db-analysis/status/','/smartapi/lovrabet/update-page','CUSTOM','/api/management/library/scripts/list?appCode=','requestFields','(/*\x20params\x20*/);','signal','enabled','\x20\x20sqlCode:\x20\x27','/smartapi/dblink/getOne','needSelf','tableList','userTenantRelationList','654396fIwpEy','errorMessage','pageIndex','/smartapi/menu/create','summary','\x20\x20where:\x20{},','responseFields','GET','modelId','toLowerCase','remove','/smartapi/app/getList','list','username','/smartapi/app-config/getByKey','set','has','/smartapi/dataset/update-driven-data','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','userId','isFinite','Page\x20not\x20found:\x20','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','apiError','dbtableConfig','/api/node-toolbox/api-doc-generator','/smartapi/menu/update','/smartapi/question/er-config/business-group/edit','/filter','.create({\x20/*\x20fields\x20*/\x20});','delete','totalCount','正在从服务器拉取模型列表...\x20(环境:\x20','errorCode','/smartapi/app-config/create','method','SQL\x20query\x20not\x20found:\x20id=','Invalid\x20response\x20format\x20(','length','/api/management/library/scripts/info?id=','/smartapi/custom/saveUserCustomSql','Fetch\x20menu\x20list','/smartapi/permit/role/get-list','relation','/smartapi/custom/queryUserCustomSqlList','SQL\x20query\x20not\x20found:\x20','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','577502KxHLlq','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','/smartapi/question/er-config/cli/detail?','mobile','/standard-page-status?appCode=','path','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','UNAUTHORIZED','cli:rabetbase','\x20\x20});','clientOperationId','):\x20missing\x20data.markdown\x20field','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','/smartapi/app-config/list','data','datasetName','/smartapi/custom/getUserCustomSql?id=','328622SUsXSc','&type=','Unauthorized','/api/custom/executeSql','json','email','/api/management/library/scripts/delete','/sync-to-pages','.getOne(id);','\x20failed,\x20HTTP\x20','displayName','validation','/smartapi/permit/page/get-one','/generate-standard-pages/start','filter','api_error','file','abort','functionName','find','download','\x20of\x20','/smartapi/custom/getUserCustomSql','tableData','Request\x20timeout:\x20','add','needPublic','roleType','code','Fetch\x20doc\x20(','DATA_NOT_EXIST','\x20\x20pageSize:\x2020,','errorMsg','\x22\x20not\x20found\x20in\x20dataset\x20','label','/smartapi/db-analysis/jobs/cancel','401','//\x20SQL:\x20','longTerm','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','ER\x20relation\x20does\x20not\x20exist','success','sqlName','operations','/smartapi/question/er-config/cli/erCreate','max','scriptType','Dataset\x20not\x20found:\x20','Fetch\x20datasets','map','/smartapi/common/queryFileUrl','/smartapi/lovrabet/dataset/','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','tags','/smartapi/question/er-config/cli/delete-single','API\x20error:\x20','/smartapi/custom/deleteUserCustomSql','5381804eWnmVp','operationId','message','array','roleName','isArray','15zVKEwL','/smartapi/permit/role/create','hint','min','deleted','string','sdk','test','appCode','authRequired','requirementDescription','name','value','\x20\x20return\x20rows;','table','key','/generate-standard-pages/status?','dataset_','toString','/smartapi/menu/batchDelete','/api/','/smartapi/permit/role/update','entries','/smartapi/tasks/','Warning:\x20showing\x20first\x20','/smartapi/dblink/delete','/smartapi/dblink/getAllTableList','/smartapi/dblink/getTableDiffV2ByPage','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','//\x20','operationName','push','/api/management/script/cache/clear','replace'];a198_0x3464=function(){return _0x24abc1;};return a198_0x3464();}export async function deleteBffScript(_0x29562c){const _0x378df3=a198_0x42d3;await apiRequest(_0x378df3(0x102),{'method':_0x378df3(0x165),'body':{'id':_0x29562c}});}export async function getBffScriptStatistics(_0xf71835){const _0x56670d=a198_0x42d3,_0x5a6540=await apiRequest('/api/management/library/scripts/statistics?appCode='+_0xf71835);return extractList(_0x5a6540[_0x56670d(0xf9)]);}export async function clearBffScriptCache(){const _0x247673=a198_0x42d3,_0x3e4845=await apiRequest(_0x247673(0x15b),{'method':_0x247673(0x165),'useRuntime':!![]});return typeof _0x3e4845['data']==='string'?_0x3e4845[_0x247673(0xf9)]:'';}export async function listBffDatasetOperations(_0x4a587d,_0x1ce8be){const _0xdb33a3=await apiRequest('/smartapi/dataset/get-dataset-operation',{'method':'POST','body':{'appCode':_0x4a587d,'datasetId':_0x1ce8be}});return _0xdb33a3['data'];}export async function listSqlQueries(_0x2ed29e,_0x5a9e04){const _0x1647d9=a198_0x42d3,_0x204a73=await apiRequest(_0x1647d9(0x1cd),{'method':_0x1647d9(0x165),'body':{'appCode':_0x2ed29e,'currentPage':_0x5a9e04?.['currentPage']??0x1,'pageSize':_0x5a9e04?.[_0x1647d9(0x185)]??0x32,'sqlCode':_0x5a9e04?.[_0x1647d9(0x180)],'sqlName':_0x5a9e04?.[_0x1647d9(0x126)]}});return _0x204a73[_0x1647d9(0xf9)];}export async function getSqlQueryInfo(_0x3bf6f9,_0x811297){const _0x348e6e=a198_0x42d3,_0xbedfcc=await listSqlQueries(_0x3bf6f9,{'sqlCode':_0x811297}),_0x1f17f0=_0xbedfcc[_0x348e6e(0x113)]?.[0x0];if(!_0x1f17f0)throw CliErrors[_0x348e6e(0x107)](_0x348e6e(0x1ce)+_0x811297);return _0x1f17f0;}export async function getSqlQueryDetail(_0x4b2c3c){const _0xd31da8=a198_0x42d3,_0x5d3907=await apiRequest(_0xd31da8(0x112)+(_0xd31da8(0x16c)+encodeURIComponent(_0x4b2c3c)));if(!_0x5d3907[_0xd31da8(0xf9)])throw CliErrors[_0xd31da8(0x107)]('SQL\x20query\x20not\x20found:\x20'+_0x4b2c3c);return _0x5d3907[_0xd31da8(0xf9)];}export async function getSqlQueryDetailById(_0x36b073){const _0x4055fc=a198_0x42d3,_0xcd84e5=await apiRequest(_0x4055fc(0xfb)+_0x36b073);if(!_0xcd84e5[_0x4055fc(0xf9)])throw CliErrors[_0x4055fc(0x107)](_0x4055fc(0x1c5)+_0x36b073);return _0xcd84e5[_0x4055fc(0xf9)];}export async function createSqlQuery(_0x241a24){const _0x980fa9=a198_0x42d3,_0x41aff6=await apiRequest(_0x980fa9(0x1c9),{'method':'POST','body':_0x241a24}),{id:_0x2e5085,entity:_0x1afd45}=normalizeEntityWithIdResponse(_0x41aff6[_0x980fa9(0xf9)]);if(!(_0x980fa9(0x180)in _0x1afd45)&&_0x2e5085)return getSqlQueryDetailById(_0x2e5085);return normalizeSqlQueryEntity(_0x1afd45);}export async function updateSqlQuery(_0x2c829e){const _0x31f138=a198_0x42d3,_0x47467a=await apiRequest(_0x31f138(0x172),{'method':_0x31f138(0x165),'body':_0x2c829e}),{id:_0x48b9cc,entity:_0x3394a1}=normalizeEntityWithIdResponse(_0x47467a[_0x31f138(0xf9)]);if(!(_0x31f138(0x180)in _0x3394a1)){if(_0x2c829e[_0x31f138(0x180)])return getSqlQueryDetail(_0x2c829e[_0x31f138(0x180)]);if(_0x48b9cc)return getSqlQueryDetailById(_0x48b9cc);}return normalizeSqlQueryEntity(_0x3394a1);}export async function deleteSqlQuery(_0x83749a){const _0x3b52b0=a198_0x42d3;await apiRequest(_0x3b52b0(0x134),{'method':_0x3b52b0(0x165),'body':_0x83749a});}export async function saveSqlQuery(_0x3a1f7e){const _0x46c445=a198_0x42d3,_0xc0047a=await apiRequest('/api/node-toolbox/sql/save',{'method':_0x46c445(0x165),'body':_0x3a1f7e});return _0xc0047a[_0x46c445(0xf9)];}function normalizeSqlQueryEntity(_0x2b488d){const _0x5bbcd7=a198_0x42d3;return{..._0x2b488d,'id':Number(_0x2b488d['id']),'dbId':_0x2b488d[_0x5bbcd7(0x181)]==null?undefined:Number(_0x2b488d[_0x5bbcd7(0x181)]),'version':_0x2b488d[_0x5bbcd7(0x16f)]==null?undefined:Number(_0x2b488d[_0x5bbcd7(0x16f)])};}export async function executeSql(_0x112045,_0x5144ca,_0x21c386){const _0x41a483=a198_0x42d3,_0x4b3fce=await apiRequest(_0x41a483(0xff),{'method':_0x41a483(0x165),'body':{'appCode':_0x112045,'sqlCode':_0x5144ca,..._0x21c386&&{'params':_0x21c386}},'useRuntime':!![]});return _0x4b3fce[_0x41a483(0xf9)];}export async function executeDatasetDataOperation(_0x1441e6,_0x3b4210,_0x339a7b,_0x3af4bb={}){const _0x3045b3=a198_0x42d3;try{const _0x4004b0=await apiRequest(_0x3045b3(0x14f)+_0x1441e6+'/'+_0x3b4210+'/'+_0x339a7b,{'method':_0x3045b3(0x165),'body':_0x3af4bb,'useRuntime':!![]});return _0x4004b0[_0x3045b3(0xf9)];}catch(_0x158e25){if(_0x339a7b===_0x3045b3(0x178)&&_0x158e25 instanceof CliError&&_0x158e25[_0x3045b3(0x118)]===_0x3045b3(0x10b)&&_0x3af4bb['id']!==undefined&&_0x3af4bb['id']!==null&&_0x3af4bb['id']!==''){const _0x3e2668=await apiRequest(_0x3045b3(0x14f)+_0x1441e6+'/'+_0x3b4210+_0x3045b3(0x1bd),{'method':_0x3045b3(0x165),'body':{'where':{'id':{'$eq':_0x3af4bb['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x131467=Array[_0x3045b3(0x13a)](_0x3e2668[_0x3045b3(0xf9)]?.[_0x3045b3(0x113)])?_0x3e2668[_0x3045b3(0xf9)][_0x3045b3(0x113)]:[];return _0x131467[0x0]??null;}throw _0x158e25;}}export async function listDatasets(_0x20454e,_0x330597){const _0x4de41d=a198_0x42d3,_0x18cfee={'appCode':_0x20454e,'deleted':_0x330597?.[_0x4de41d(0x13f)]??![]};if(_0x330597?.[_0x4de41d(0x118)])_0x18cfee[_0x4de41d(0x118)]=_0x330597[_0x4de41d(0x118)];if(_0x330597?.[_0x4de41d(0x146)])_0x18cfee[_0x4de41d(0x146)]=_0x330597[_0x4de41d(0x146)];const _0x2d52fd=await apiRequest(_0x4de41d(0x15f),{'method':_0x4de41d(0x165),'body':_0x18cfee});return extractList(_0x2d52fd['data']);}export async function deleteDataset(_0x2b24ef,_0x1a1699){const _0xf5b0cd=a198_0x42d3;await apiRequest(_0xf5b0cd(0x193),{'method':_0xf5b0cd(0x165),'body':{'appCode':_0x2b24ef,'datasetId':_0x1a1699}});}export async function restoreDataset(_0x3c9392,_0x14f6df){const _0x27472d=a198_0x42d3;await apiRequest('/smartapi/dataset/restore-dataset',{'method':_0x27472d(0x165),'body':{'appCode':_0x3c9392,'datasetId':_0x14f6df}});}export async function previewTextGeneratedDataset(_0x423f26,_0x2779d5){const _0x333c77=a198_0x42d3,_0x260aa2=await apiRequest(_0x333c77(0x17a),{'method':_0x333c77(0x165),'body':{'appCode':_0x423f26,'datasetName':_0x2779d5[_0x333c77(0xfa)],'requirementDescription':_0x2779d5[_0x333c77(0x145)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x260aa2[_0x333c77(0xf9)];}export async function startTextGeneratedDataset(_0x115130,_0x54f942,_0x329d4a){const _0x3c9b31=a198_0x42d3,_0x470f78=await apiRequest(_0x3c9b31(0x15d),{'method':'POST','body':{'appCode':_0x115130,..._0x329d4a?.[_0x3c9b31(0xf5)]?{'clientOperationId':_0x329d4a[_0x3c9b31(0xf5)]}:{},'design':_0x54f942},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x470f78[_0x3c9b31(0xf9)];}export async function getTextGeneratedDatasetStatus(_0x1921db,_0x179162){const _0x36ff22=a198_0x42d3,_0x494ec6=new URLSearchParams({'appCode':_0x1921db});_0x179162['operationId']&&_0x494ec6['set'](_0x36ff22(0x136),_0x179162[_0x36ff22(0x136)]);_0x179162[_0x36ff22(0xf5)]&&_0x494ec6[_0x36ff22(0x1b0)](_0x36ff22(0xf5),_0x179162[_0x36ff22(0xf5)]);const _0x1be9b3=await apiRequest('/smartapi/dataset/text-generate/status?'+_0x494ec6['toString']());return _0x1be9b3[_0x36ff22(0xf9)];}export async function searchDatasets(_0x3efa17,_0x83a674){const _0x2d589b=a198_0x42d3,_0x580098=await listDatasets(_0x3efa17,{'name':_0x83a674}),_0x10efb8=_0x83a674[_0x2d589b(0x1aa)](),_0x3812b4=new Set(_0x580098[_0x2d589b(0x12d)](_0x4f0184=>_0x4f0184['id'])),_0x5a225b=_0x580098['filter'](_0x1277a6=>_0x1277a6[_0x2d589b(0x1b9)]?.[_0x2d589b(0x18e)]?.['toLowerCase']()[_0x2d589b(0x16d)](_0x10efb8)||_0x1277a6[_0x2d589b(0x190)]?.[_0x2d589b(0x1aa)]()[_0x2d589b(0x16d)](_0x10efb8)),_0x1d14e6=await listDatasets(_0x3efa17,{'code':_0x83a674});for(const _0x323116 of _0x1d14e6){!_0x3812b4[_0x2d589b(0x1b1)](_0x323116['id'])&&(_0x580098[_0x2d589b(0x15a)](_0x323116),_0x3812b4[_0x2d589b(0x115)](_0x323116['id']));}return _0x580098;}export function normalizeDatasetOperations(_0x129ed6){const _0x20d613=a198_0x42d3;if(Array['isArray'](_0x129ed6))return _0x129ed6[_0x20d613(0x10a)](_0x3655ac=>_0x3655ac!=null&&typeof _0x3655ac===_0x20d613(0x16a));if(_0x129ed6&&typeof _0x129ed6===_0x20d613(0x16a))return Object['entries'](_0x129ed6)[_0x20d613(0x10a)](([,_0x51ee5a])=>_0x51ee5a!=null&&typeof _0x51ee5a===_0x20d613(0x16a))[_0x20d613(0x12d)](([_0x60c9ee,_0x5f395b])=>({..._0x5f395b,'name':_0x5f395b[_0x20d613(0x146)]??_0x5f395b[_0x20d613(0x159)]??_0x60c9ee}));return[];}export async function getDatasetDetail(_0x51c753){const _0x535592=a198_0x42d3,_0x3ee21e=/^\d+$/[_0x535592(0x142)](_0x51c753)?'id':_0x535592(0x118),_0x2c28c5=await apiRequest('/smartapi/dataset/get-driven-data?'+_0x3ee21e+'='+_0x51c753);return _0x2c28c5['data'];}export async function updateDrivenData(_0x379f16){const _0x577d34=a198_0x42d3,_0xc3acd7=await apiRequest(_0x577d34(0x1b2),{'method':_0x577d34(0x165),'body':_0x379f16});return _0xc3acd7[_0x577d34(0xf9)];}export async function getDatasetOperations(_0x74b32c){const _0x4efd4e=a198_0x42d3,_0x42bc87=await getDatasetDetail(_0x74b32c),_0xc7fca7=normalizeDatasetOperations(_0x42bc87[_0x4efd4e(0x127)])[_0x4efd4e(0x12d)](_0x2e6ef3=>({'name':_0x2e6ef3[_0x4efd4e(0x146)]||_0x2e6ef3[_0x4efd4e(0x159)],'displayName':_0x2e6ef3[_0x4efd4e(0x106)]||_0x2e6ef3['name'],'type':_0x2e6ef3[_0x4efd4e(0x15e)],'method':_0x2e6ef3[_0x4efd4e(0x1c4)],'path':_0x2e6ef3[_0x4efd4e(0x1d5)],'enabled':_0x2e6ef3[_0x4efd4e(0x19b)]??!![],'requestFields':_0x2e6ef3[_0x4efd4e(0x198)],'responseFields':_0x2e6ef3[_0x4efd4e(0x1a7)]}));return{'dataset':{'id':_0x42bc87['id']??_0x42bc87[_0x4efd4e(0x1a9)],'name':_0x42bc87[_0x4efd4e(0x146)],'code':_0x42bc87[_0x4efd4e(0x118)]||_0x42bc87[_0x4efd4e(0x189)],'tableName':_0x42bc87[_0x4efd4e(0x18e)]||_0x42bc87['dbtableConfig']?.[_0x4efd4e(0x18e)]},'operations':_0xc7fca7};}export async function getOperationDetail(_0x17aabc,_0x360f67,_0x26b1e5){const _0x43f727=a198_0x42d3;let _0x56378e=_0x360f67;if(!/^\d+$/[_0x43f727(0x142)](_0x360f67)){const _0x20fd3a=await listDatasets(_0x17aabc,{'code':_0x360f67}),_0x58c932=_0x20fd3a[_0x43f727(0x10f)](_0x40e7a8=>_0x40e7a8[_0x43f727(0x118)]===_0x360f67||String(_0x40e7a8['id'])===_0x360f67);if(!_0x58c932)throw CliErrors[_0x43f727(0x107)](_0x43f727(0x12b)+_0x360f67);_0x56378e=String(_0x58c932['id']);}const _0x5263ee=await getDatasetDetail(_0x56378e),_0x4b13fa=normalizeDatasetOperations(_0x5263ee[_0x43f727(0x127)])[_0x43f727(0x10f)](_0x28c0ee=>(_0x28c0ee[_0x43f727(0x146)]||_0x28c0ee[_0x43f727(0x159)])===_0x26b1e5);if(!_0x4b13fa)throw CliErrors[_0x43f727(0x107)]('Operation\x20\x22'+_0x26b1e5+_0x43f727(0x11d)+_0x360f67);return{'dataset':{'id':_0x5263ee['id']??_0x5263ee[_0x43f727(0x1a9)],'name':_0x5263ee[_0x43f727(0x146)],'code':_0x5263ee[_0x43f727(0x118)]||_0x5263ee['modelCode'],'tableName':_0x5263ee[_0x43f727(0x18e)]||_0x5263ee[_0x43f727(0x1b9)]?.[_0x43f727(0x18e)]},'operation':_0x4b13fa};}export async function startGenerateStandardPages(_0x207812,_0x4fb898,_0x442862){const _0x295c9e=a198_0x42d3,_0x2b1566=await apiRequest(_0x295c9e(0x12f)+_0x4fb898+_0x295c9e(0x109),{'method':_0x295c9e(0x165),'body':{'appCode':_0x207812,..._0x442862?.[_0x295c9e(0xf5)]?{'clientOperationId':_0x442862[_0x295c9e(0xf5)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x2b1566['data'];}export async function getGenerateStandardPagesStatus(_0x311dd3,_0x37deca,_0x5d84f3){const _0x143eec=a198_0x42d3,_0x310ae3=new URLSearchParams({'appCode':_0x311dd3});_0x5d84f3[_0x143eec(0x136)]&&_0x310ae3[_0x143eec(0x1b0)](_0x143eec(0x136),_0x5d84f3['operationId']);_0x5d84f3[_0x143eec(0xf5)]&&_0x310ae3[_0x143eec(0x1b0)](_0x143eec(0xf5),_0x5d84f3[_0x143eec(0xf5)]);const _0x362078=await apiRequest(_0x143eec(0x12f)+_0x37deca+_0x143eec(0x14b)+_0x310ae3['toString']());return _0x362078['data'];}export async function getStandardPageStatus(_0x2d73e9,_0x3d268b){const _0x3027a1=a198_0x42d3,_0x38013c=await apiRequest(_0x3027a1(0x12f)+_0x3d268b+_0x3027a1(0x1d4)+encodeURIComponent(_0x2d73e9));return _0x38013c[_0x3027a1(0xf9)];}export async function tryGetStandardPageStatus(_0x184170,_0xff4e81){const _0x51011e=a198_0x42d3;try{return await getStandardPageStatus(_0x184170,_0xff4e81);}catch(_0x3ca30e){if(_0x3ca30e instanceof CliError&&_0x3ca30e[_0x51011e(0x118)]===_0x51011e(0x10b)&&/404|not found|non-json response/i[_0x51011e(0x142)](_0x3ca30e[_0x51011e(0x137)]))return null;throw _0x3ca30e;}}export async function syncStandardPages(_0x967d6d,_0x304113){const _0x56d586=a198_0x42d3,_0x238f45=await apiRequest(_0x56d586(0x12f)+_0x304113+_0x56d586(0x103),{'method':_0x56d586(0x165),'body':{'appCode':_0x967d6d}});return _0x238f45[_0x56d586(0xf9)];}export async function getPageDetail(_0x135aff){const _0x3e38f2=a198_0x42d3,_0x51a545=await apiRequest('/smartapi/lovrabet/detail?pageId='+_0x135aff);if(!_0x51a545['data'])throw CliErrors[_0x3e38f2(0x107)](_0x3e38f2(0x1b6)+_0x135aff);return _0x51a545[_0x3e38f2(0xf9)];}export async function updatePage(_0x52352c,_0x4044ac,_0x17ba89,_0x5a3636){const _0x1fd21e=a198_0x42d3,_0x51744b=await apiRequest(_0x1fd21e(0x195),{'method':_0x1fd21e(0x165),'body':{'appCode':_0x52352c,'pageId':_0x4044ac,'code':_0x17ba89,'datasetIds':_0x5a3636}});return _0x51744b[_0x1fd21e(0xf9)];}export function generateSdkCode(_0x1d2792,_0x4691be,_0xb216d9){const _0x507f83=a198_0x42d3,_0x56a547=_0xb216d9?.['includeImports']??!![],_0x4cc5dc=_0x507f83(0x14c)+_0x1d2792[_0x507f83(0x118)]?.['replace'](/-/g,'_'),_0x3f0139=_0x4691be[_0x507f83(0x146)]||_0x4691be['operationName']||_0x507f83(0x10a),_0x5e3146=[];_0x56a547&&_0x5e3146['push'](_0x507f83(0xf7),'','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','');_0x5e3146[_0x507f83(0x15a)](_0x507f83(0x158)+_0x1d2792[_0x507f83(0x146)]+'\x20('+(_0x1d2792[_0x507f83(0x18e)]||_0x507f83(0x149))+')');if(_0x3f0139===_0x507f83(0x10a))_0x5e3146['push'](_0x507f83(0x168)+_0x4cc5dc+_0x507f83(0x166),_0x507f83(0x1a6),_0x507f83(0x11b),_0x507f83(0x18d),'});');else{if(_0x3f0139===_0x507f83(0x178))_0x5e3146[_0x507f83(0x15a)](_0x507f83(0x168)+_0x4cc5dc+_0x507f83(0x104));else{if(_0x3f0139==='create')_0x5e3146['push']('const\x20result\x20=\x20await\x20client.models.'+_0x4cc5dc+_0x507f83(0x1be));else{if(_0x3f0139==='update')_0x5e3146[_0x507f83(0x15a)](_0x507f83(0x168)+_0x4cc5dc+_0x507f83(0x1b7));else _0x3f0139===_0x507f83(0x1bf)||_0x3f0139===_0x507f83(0x1ab)?_0x5e3146[_0x507f83(0x15a)]('const\x20result\x20=\x20await\x20client.models.'+_0x4cc5dc+'.remove(id);'):_0x5e3146[_0x507f83(0x15a)](_0x507f83(0x168)+_0x4cc5dc+'.'+_0x3f0139+_0x507f83(0x199));}}}return _0x5e3146['join']('\x0a');}export function generateSqlCodeTemplate(_0xbca9d6,_0x28a169){const _0x5804f1=a198_0x42d3,_0x13b73d=_0x28a169?.['target']??'sdk',_0x67c275=_0x28a169?.['includeImports']??!![],_0xa32d96=[];return _0xa32d96['push'](_0x5804f1(0x121)+_0xbca9d6['sqlName']+'\x20('+_0xbca9d6[_0x5804f1(0x180)]+')'),_0x13b73d===_0x5804f1(0x141)?(_0x67c275&&_0xa32d96[_0x5804f1(0x15a)](_0x5804f1(0xf7),'',_0x5804f1(0x170),''),_0xa32d96[_0x5804f1(0x15a)]('const\x20data\x20=\x20await\x20client.sql.execute({',_0x5804f1(0x19c)+_0xbca9d6[_0x5804f1(0x180)]+'\x27,',_0x5804f1(0x186),_0x5804f1(0x191),_0x5804f1(0x1d6),'const\x20results\x20=\x20data.execResult\x20||\x20[];')):_0xa32d96[_0x5804f1(0x15a)]('//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{',_0x5804f1(0x130),'\x20\x20\x20\x20sqlCode:\x20\x27'+_0xbca9d6[_0x5804f1(0x180)]+'\x27,',_0x5804f1(0x1b3),_0x5804f1(0xf4),_0x5804f1(0x148),'}'),_0xa32d96[_0x5804f1(0x175)]('\x0a');}export async function getErConfig(_0x1c613c,_0x1f53b0){const _0x1f2a52=a198_0x42d3,_0x1b2ea9=await apiRequest('/smartapi/question/er-config',{'method':'POST','body':{'appCode':_0x1c613c,'dblinkId':_0x1f53b0},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x1b2ea9[_0x1f2a52(0xf9)];}export async function getErRelationDetail(_0x2a8f7e,_0x5e473f){const _0x553ba8=a198_0x42d3,_0x31bfd6=new URLSearchParams({'appCode':_0x2a8f7e,'relationId':String(_0x5e473f)});try{const _0x133e3b=await apiRequest(_0x553ba8(0x1d2)+_0x31bfd6[_0x553ba8(0x14d)]());return _0x133e3b[_0x553ba8(0xf9)]?.[_0x553ba8(0x1cc)]??null;}catch(_0x459008){if(_0x459008 instanceof CliError&&_0x459008[_0x553ba8(0x118)]===_0x553ba8(0x10b)&&(_0x459008['hint']?.[_0x553ba8(0x16d)](_0x553ba8(0x11a))||_0x459008[_0x553ba8(0x13d)]==='API\x20error\x20code:\x20306'&&_0x459008[_0x553ba8(0x137)]===_0x553ba8(0x124)))return null;throw _0x459008;}}export async function createErRelation(_0x44bd69){const _0x18e0d7=a198_0x42d3,_0xef1b9=await apiRequest(_0x18e0d7(0x128),{'method':_0x18e0d7(0x165),'body':_0x44bd69,'allowNonJsonSuccess':!![]});return _0xef1b9[_0x18e0d7(0xf9)];}export async function updateErRelation(_0x40eb2b){const _0x51cb1b=a198_0x42d3,_0x11c1ef=await apiRequest(_0x51cb1b(0x164),{'method':_0x51cb1b(0x165),'body':_0x40eb2b,'allowNonJsonSuccess':!![]});return _0x11c1ef[_0x51cb1b(0xf9)];}export async function deleteErRelation(_0x49bfcf){const _0x206426=a198_0x42d3,_0x257e3f=await apiRequest(_0x206426(0x132),{'method':_0x206426(0x165),'body':_0x49bfcf,'allowNonJsonSuccess':!![]});return _0x257e3f[_0x206426(0xf9)];}export async function updateErBusinessGroup(_0x1a05f0){const _0x3965b5=a198_0x42d3,_0x38d42b=await apiRequest(_0x3965b5(0x1bc),{'method':_0x3965b5(0x165),'body':_0x1a05f0,'allowNonJsonSuccess':!![]});return _0x38d42b[_0x3965b5(0xf9)];}function buildQuery(_0x156e87){const _0x2e572b=a198_0x42d3,_0x1ba649=new URLSearchParams();for(const [_0x7142f0,_0x3e098a]of Object[_0x2e572b(0x151)](_0x156e87)){if(_0x3e098a===undefined||_0x3e098a==='')continue;_0x1ba649[_0x2e572b(0x1b0)](_0x7142f0,String(_0x3e098a));}const _0x2c460d=_0x1ba649[_0x2e572b(0x14d)]();return _0x2c460d?'?'+_0x2c460d:'';}export async function listNotificationChannelConfigs(_0x4d79c2,_0x189216){const _0x47e4c0=a198_0x42d3,_0x2cf777=await apiRequest(_0x47e4c0(0x17b)+buildQuery({'appCode':_0x4d79c2,'channelType':_0x189216}));return Array[_0x47e4c0(0x13a)](_0x2cf777[_0x47e4c0(0xf9)])?_0x2cf777[_0x47e4c0(0xf9)]:[];}export async function listAppConfigs(_0x53b159,_0x528b65){const _0x4fe7bc=a198_0x42d3,_0x13219b=await apiRequest(_0x4fe7bc(0xf8),{'method':_0x4fe7bc(0x165),'body':{'appCode':_0x53b159,..._0x528b65?.[_0x4fe7bc(0x14a)]?{'key':_0x528b65[_0x4fe7bc(0x14a)]}:{},..._0x528b65?.[_0x4fe7bc(0x131)]?{'tags':_0x528b65['tags']}:{}}});return extractAppConfigList(_0x13219b[_0x4fe7bc(0xf9)]);}export async function getAppConfigByKey(_0x2094eb,_0x4b8724){const _0x35d463=a198_0x42d3,_0xd85556=await apiRequest(_0x35d463(0x1af)+buildQuery({'appCode':_0x2094eb,'key':_0x4b8724}));return _0xd85556[_0x35d463(0xf9)]??null;}export async function createAppConfig(_0x392f28){const _0x87c5bc=a198_0x42d3,_0x16421c=await apiRequest(_0x87c5bc(0x1c3),{'method':_0x87c5bc(0x165),'body':{'appCode':_0x392f28[_0x87c5bc(0x143)],'key':_0x392f28[_0x87c5bc(0x14a)],'value':_0x392f28[_0x87c5bc(0x147)],..._0x392f28[_0x87c5bc(0x131)]?{'tags':_0x392f28[_0x87c5bc(0x131)]}:{}}});return _0x16421c[_0x87c5bc(0xf9)];}export async function updateAppConfig(_0xb7a66b){const _0x2299e6=a198_0x42d3;await apiRequest('/smartapi/app-config/update',{'method':_0x2299e6(0x165),'body':{'id':_0xb7a66b['id'],'appCode':_0xb7a66b[_0x2299e6(0x143)],'key':_0xb7a66b[_0x2299e6(0x14a)],'value':_0xb7a66b[_0x2299e6(0x147)],..._0xb7a66b[_0x2299e6(0x131)]?{'tags':_0xb7a66b[_0x2299e6(0x131)]}:{}}});}export async function deleteAppConfig(_0xd3eac0){const _0x7865f3=a198_0x42d3;await apiRequest('/smartapi/app-config/delete',{'method':_0x7865f3(0x165),'body':_0xd3eac0});}function extractAppConfigList(_0x43f287){const _0x48bb80=a198_0x42d3;if(Array['isArray'](_0x43f287))return _0x43f287;if(_0x43f287&&typeof _0x43f287===_0x48bb80(0x16a)&&Array[_0x48bb80(0x13a)](_0x43f287['list']))return _0x43f287[_0x48bb80(0x1ad)];return extractList(_0x43f287);}export async function listDbLinks(_0xeb572c,_0x3251af){const _0x1e754f=a198_0x42d3,_0x165bed=await apiRequest('/smartapi/dblink/getList',{'method':_0x1e754f(0x165),'body':{'appCode':_0xeb572c,'currentPage':_0x3251af?.['currentPage']??0x1,'pageSize':_0x3251af?.['pageSize']??0x64}});return{'items':extractList(_0x165bed[_0x1e754f(0xf9)]),'paging':extractPaging(_0x165bed[_0x1e754f(0xf9)])};}export async function getDbLinkInfo(_0x176f94){const _0x379c21=a198_0x42d3,_0x3db815=await apiRequest(_0x379c21(0x19d)+buildQuery({'id':_0x176f94}));return _0x3db815[_0x379c21(0xf9)];}export async function createDbLink(_0x11b87e){const _0x165498=a198_0x42d3,_0x287338=await apiRequest('/smartapi/dblink/create',{'method':_0x165498(0x165),'body':_0x11b87e});return _0x287338[_0x165498(0xf9)];}export async function updateDbLink(_0x2b0846){const _0x12f03e=a198_0x42d3,_0x3962cf=await apiRequest('/smartapi/dblink/update',{'method':_0x12f03e(0x165),'body':_0x2b0846});return _0x3962cf[_0x12f03e(0xf9)];}export async function deleteDbLink(_0x1b7669){const _0x2054dc=a198_0x42d3;await apiRequest(_0x2054dc(0x154),{'method':'POST','body':{'id':_0x1b7669}});}export async function testDbLinkConnect(_0x454596){const _0x55bf61=a198_0x42d3,_0x3df695=await apiRequest('/smartapi/dblink/testConnect'+buildQuery({'id':_0x454596}));return _0x3df695[_0x55bf61(0xf9)];}export async function startDbAnalysis(_0x337309,_0x587731){const _0x4e7a91=a198_0x42d3,_0x3d2290=await apiRequest(_0x4e7a91(0x177),{'method':_0x4e7a91(0x165),'body':{'dbLinkId':_0x337309,..._0x587731&&_0x587731[_0x4e7a91(0x1c7)]>0x0?{'tableNames':_0x587731}:{}}});return _0x3d2290[_0x4e7a91(0xf9)];}export async function cancelDbAnalysis(_0x37ec83){const _0x252499=a198_0x42d3;await apiRequest(_0x252499(0x11f)+buildQuery({'planId':_0x37ec83}),{'method':_0x252499(0x165)});}export async function getDbAnalysisStatus(_0x3346f2){const _0x268063=a198_0x42d3,_0x26831c=await apiRequest(_0x268063(0x194)+encodeURIComponent(_0x3346f2));return _0x26831c[_0x268063(0xf9)];}export async function getDbAllTableList(_0x42a111,_0x592b91){const _0x3fd83c=a198_0x42d3,_0x5edfc3=await apiRequest(_0x3fd83c(0x155)+buildQuery({'appCode':_0x42a111,'dbLinkId':_0x592b91})),_0x327a32=_0x5edfc3[_0x3fd83c(0xf9)];if(Array[_0x3fd83c(0x13a)](_0x327a32))return _0x327a32;return extractList(_0x327a32);}export async function getDbTableDiff(_0x12c386,_0x252730,_0x3baaff){const _0x3460ca=a198_0x42d3,_0x328d41=await apiRequest(_0x3460ca(0x156)+buildQuery({'appCode':_0x12c386,'dbLinkId':_0x252730,'pageIndex':_0x3baaff?.[_0x3460ca(0x1a3)]??0x1,'pageSize':_0x3baaff?.[_0x3460ca(0x185)]??0x14,'tableName':_0x3baaff?.['tableName']})),_0x2ad220=_0x328d41[_0x3460ca(0xf9)];return{'totalCount':_0x2ad220?.[_0x3460ca(0x1c0)]??0x0,'physicalTableCount':_0x2ad220?.['physicalTableCount']??0x0,'datasetTableCount':_0x2ad220?.[_0x3460ca(0x160)]??0x0,..._0x2ad220?.[_0x3460ca(0x1a5)]?{'summary':_0x2ad220[_0x3460ca(0x1a5)]}:{},'tableList':Array[_0x3460ca(0x13a)](_0x2ad220?.['tableList'])?_0x2ad220[_0x3460ca(0x19f)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x33b469=a198_0x42d3,_0x3089a0=await apiRequest(_0x33b469(0x1ac),{'method':_0x33b469(0x165),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0xb9da1c=extractList(_0x3089a0[_0x33b469(0xf9)]),_0x5972dc=extractPaging(_0x3089a0['data']);return _0x5972dc&&_0x5972dc['totalCount']>REMOTE_APP_PAGE_SIZE&&console['warn'](_0x33b469(0x153)+REMOTE_APP_PAGE_SIZE+_0x33b469(0x111)+_0x5972dc[_0x33b469(0x1c0)]+'\x20apps.\x20'+_0x33b469(0x157)),_0xb9da1c;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x327703,_0x4ee246){const _0x515a55=a198_0x42d3,_0x4dcf8a=Math[_0x515a55(0x13e)](Math[_0x515a55(0x129)](_0x4ee246?.[_0x515a55(0x185)]??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0xaf7077=await apiRequest(_0x515a55(0x1cb),{'method':'POST','body':{'appCode':_0x327703,'currentPage':_0x4ee246?.['currentPage']??0x1,'pageSize':_0x4dcf8a}});return{'items':extractList(_0xaf7077['data']),'paging':extractPaging(_0xaf7077[_0x515a55(0xf9)])};}export async function getAppRole(_0x3ee6a9){const _0x243119=a198_0x42d3,_0xcdf7f9=await apiRequest('/smartapi/permit/role/get-one'+buildQuery({'id':_0x3ee6a9}));return _0xcdf7f9[_0x243119(0xf9)];}export async function createAppRole(_0x2542d7){const _0x4188db=a198_0x42d3,_0x399eb1=await apiRequest(_0x4188db(0x13c),{'method':_0x4188db(0x165),'body':{'appCode':_0x2542d7[_0x4188db(0x143)],'roleName':_0x2542d7['roleName'],'roleType':_0x4188db(0x196),..._0x2542d7[_0x4188db(0x182)]?{'remark':_0x2542d7[_0x4188db(0x182)]}:{}}});return _0x399eb1[_0x4188db(0xf9)];}export async function updateAppRole(_0xceb8ae){const _0x371e53=a198_0x42d3,_0x23961a=await apiRequest(_0x371e53(0x150),{'method':_0x371e53(0x165),'body':{'id':_0xceb8ae['id'],'appCode':_0xceb8ae[_0x371e53(0x143)],..._0xceb8ae['roleType']?{'roleType':_0xceb8ae[_0x371e53(0x117)]}:{},..._0xceb8ae[_0x371e53(0x139)]!==undefined?{'roleName':_0xceb8ae[_0x371e53(0x139)]}:{},..._0xceb8ae[_0x371e53(0x182)]!==undefined?{'remark':_0xceb8ae['remark']}:{},..._0xceb8ae[_0x371e53(0x176)]?{'permits':_0xceb8ae[_0x371e53(0x176)]}:{}}});return _0x23961a['data'];}export async function deleteAppRole(_0x48207f){const _0x173de1=a198_0x42d3;await apiRequest(_0x173de1(0x17d),{'method':_0x173de1(0x165),'body':{'id':_0x48207f}});}export async function listPermitRoles(_0x1d71a0,_0x115262){const _0x3d7e24=a198_0x42d3,_0x381b79=await apiRequest(_0x3d7e24(0x16e),{'method':_0x3d7e24(0x165),'body':{'appCode':_0x1d71a0,..._0x115262?.[_0x3d7e24(0x19e)]!==undefined?{'needSelf':_0x115262['needSelf']}:{},..._0x115262?.[_0x3d7e24(0x116)]!==undefined?{'needPublic':_0x115262['needPublic']}:{}}});return extractList(_0x381b79[_0x3d7e24(0xf9)]);}export async function getRoleMenuResources(_0x51c16b,_0x5093b1){const _0x49983f=a198_0x42d3,_0x1868be=await apiRequest(_0x49983f(0x17e),{'method':_0x49983f(0x165),'body':{'appCode':_0x51c16b,'roleId':_0x5093b1}});return extractList(_0x1868be[_0x49983f(0xf9)]);}export async function getRoleApiResources(_0x47b455,_0x30d939){const _0x27718b=a198_0x42d3,_0xe6c05f=await apiRequest('/smartapi/permit/resource/get-api-list',{'method':_0x27718b(0x165),'body':{'appCode':_0x47b455,'roleId':_0x30d939}});return extractList(_0xe6c05f[_0x27718b(0xf9)]);}export async function listRoleUsers(_0x4e07e6){const _0x1e2f3e=a198_0x42d3,_0x518363=await apiRequest(_0x1e2f3e(0x192),{'method':'POST','body':{'appCode':_0x4e07e6}});return extractList(_0x518363[_0x1e2f3e(0xf9)]);}export async function updateRoleUsers(_0x3a6a3d,_0xc242d9){await apiRequest('/smartapi/permit/user-role/update-user-list',{'method':'POST','body':{'appCode':_0x3a6a3d,'roleList':_0xc242d9}});}export async function getPagePermit(_0x25ccca){const _0x1a0c4a=a198_0x42d3,_0x520213=await apiRequest(_0x1a0c4a(0x108)+buildQuery({'menuId':_0x25ccca}));return _0x520213[_0x1a0c4a(0xf9)];}export async function savePagePermit(_0x486998){const _0x45a869=a198_0x42d3,_0x380dac=await apiRequest('/smartapi/permit/page/save',{'method':'POST','body':_0x486998});return _0x380dac[_0x45a869(0xf9)];}export async function getTenantMembers(_0x283196){const _0x34de96=a198_0x42d3,_0x17da68=await apiRequest('/userTenant/getByTenantCode'+buildQuery({'code':_0x283196})),_0x3e3bd0=_0x17da68[_0x34de96(0xf9)]??{},_0xbc42b1=Array[_0x34de96(0x13a)](_0x3e3bd0?.[_0x34de96(0x1a0)])?_0x3e3bd0[_0x34de96(0x1a0)]:[];return _0xbc42b1[_0x34de96(0x10a)](_0x1b3327=>_0x1b3327?.[_0x34de96(0x162)]===_0x34de96(0x171)||_0x1b3327?.[_0x34de96(0x162)]===undefined)[_0x34de96(0x12d)](_0x36f45b=>({'userId':Number(_0x36f45b[_0x34de96(0x1b4)]??_0x36f45b['id']),'username':_0x36f45b[_0x34de96(0x1ae)],'nickname':_0x36f45b['nickname'],'status':_0x36f45b[_0x34de96(0x162)],'email':_0x36f45b[_0x34de96(0x101)],'mobile':_0x36f45b[_0x34de96(0x1d3)],'avatar':_0x36f45b[_0x34de96(0x163)]}))['filter'](_0x691c89=>Number[_0x34de96(0x1b5)](_0x691c89['userId'])&&_0x691c89[_0x34de96(0x1b4)]>0x0);}
1
+ (function(_0x1e5006,_0x5413f5){const _0x202554=a200_0x589f,_0x83587c=_0x1e5006();while(!![]){try{const _0xe78801=parseInt(_0x202554(0x12d))/0x1+parseInt(_0x202554(0x142))/0x2+-parseInt(_0x202554(0x105))/0x3+parseInt(_0x202554(0x147))/0x4*(-parseInt(_0x202554(0x160))/0x5)+parseInt(_0x202554(0x97))/0x6+-parseInt(_0x202554(0xcd))/0x7*(parseInt(_0x202554(0x104))/0x8)+parseInt(_0x202554(0x13a))/0x9*(parseInt(_0x202554(0xb2))/0xa);if(_0xe78801===_0x5413f5)break;else _0x83587c['push'](_0x83587c['shift']());}catch(_0x508da6){_0x83587c['push'](_0x83587c['shift']());}}}(a200_0x46a6,0xb4cf5));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';let _activeCookie;export function setActiveCookie(_0x121725){_activeCookie=_0x121725||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x2bf20;function createFetchFailureError(_0x403d97,_0xa96cac){const _0x3a819c=a200_0x589f,_0x46f4ba=_0xa96cac instanceof Error?_0xa96cac[_0x3a819c(0x9c)]:String(_0xa96cac);return CliErrors[_0x3a819c(0x121)]('Request\x20failed:\x20'+_0x403d97+(_0x46f4ba?'\x20('+_0x46f4ba+')':''),_0x3a819c(0x17a));}async function apiRequest(_0x40e461,_0x9c86bd={}){const _0x926439=a200_0x589f,{method:method='GET',body:_0x67c545,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x9c86bd,_0x58de84=useRuntime?getRuntimeDomain():getApiDomain(),_0xea24cc=_activeCookie||getCookie(),_0x384d74=''+_0x58de84+_0x40e461,_0x582610=new AbortController(),_0x3d3b33=setTimeout(()=>_0x582610[_0x926439(0x154)](),timeout);try{const _0xdaf16b=await fetch(_0x384d74,{'method':method,'headers':{'Content-Type':'application/json','Cookie':_0xea24cc,'X-Invoke-Source':_0x926439(0x14d),...headers},'body':_0x67c545?JSON['stringify'](_0x67c545):undefined,'signal':_0x582610[_0x926439(0xd7)]});let _0x5ddd09;try{_0x5ddd09=await _0xdaf16b[_0x926439(0x132)]();}catch(_0x5c111e){if(_0x5c111e instanceof Error&&_0x5c111e['name']===_0x926439(0xe6))throw CliErrors[_0x926439(0x121)](_0x926439(0x145)+_0x384d74);if(_0xdaf16b['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x926439(0x121)](_0x926439(0xc4)+_0xdaf16b[_0x926439(0xf0)]+')',_0xdaf16b['status']>=0x190?_0x926439(0x12f):undefined);}if(!_0xdaf16b['ok']||_0x5ddd09['success']===![])throw CliErrors['apiError'](_0x5ddd09[_0x926439(0x108)]||_0x5ddd09[_0x926439(0x9c)]||'API\x20error:\x20'+_0xdaf16b[_0x926439(0xf0)],_0x5ddd09[_0x926439(0x157)]?_0x926439(0x15a)+_0x5ddd09['errorCode']:undefined);return _0x5ddd09;}catch(_0x3bc676){if(_0x3bc676 instanceof CliError)throw _0x3bc676;if(_0x3bc676 instanceof Error&&_0x3bc676['name']===_0x926439(0xe6))throw CliErrors[_0x926439(0x121)](_0x926439(0x145)+_0x384d74);throw createFetchFailureError(_0x384d74,_0x3bc676);}finally{clearTimeout(_0x3d3b33);}}async function apiFormRequest(_0x220905,_0x39b920,_0xee9094={}){const _0x4f0a9f=a200_0x589f,{timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS}=_0xee9094,_0x133dc8=_activeCookie||getCookie(),_0x1ed005=''+getApiDomain()+_0x220905,_0x1fdd47=new AbortController(),_0x2cde20=setTimeout(()=>_0x1fdd47['abort'](),timeout);try{const _0x80c603=await fetch(_0x1ed005,{'method':_0x4f0a9f(0xf7),'headers':{'Cookie':_0x133dc8,'X-Invoke-Source':_0x4f0a9f(0x14d)},'body':_0x39b920,'signal':_0x1fdd47[_0x4f0a9f(0xd7)]});let _0x186d7f;try{_0x186d7f=await _0x80c603[_0x4f0a9f(0x132)]();}catch(_0x3f20da){if(_0x3f20da instanceof Error&&_0x3f20da[_0x4f0a9f(0xb0)]==='AbortError')throw CliErrors[_0x4f0a9f(0x121)](_0x4f0a9f(0x145)+_0x1ed005);throw CliErrors[_0x4f0a9f(0x121)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x80c603[_0x4f0a9f(0xf0)]+')',_0x80c603[_0x4f0a9f(0xf0)]>=0x190?_0x4f0a9f(0x12f):undefined);}if(!_0x80c603['ok']||_0x186d7f['success']===![])throw CliErrors[_0x4f0a9f(0x121)](_0x186d7f[_0x4f0a9f(0x108)]||_0x186d7f[_0x4f0a9f(0x9c)]||_0x4f0a9f(0x13e)+_0x80c603[_0x4f0a9f(0xf0)],_0x186d7f[_0x4f0a9f(0x157)]?_0x4f0a9f(0x15a)+_0x186d7f['errorCode']:undefined);return _0x186d7f;}catch(_0x24d3d4){if(_0x24d3d4 instanceof CliError)throw _0x24d3d4;if(_0x24d3d4 instanceof Error&&_0x24d3d4[_0x4f0a9f(0xb0)]===_0x4f0a9f(0xe6))throw CliErrors[_0x4f0a9f(0x121)]('Request\x20timeout:\x20'+_0x1ed005);throw createFetchFailureError(_0x1ed005,_0x24d3d4);}finally{clearTimeout(_0x2cde20);}}export async function uploadDevelopmentFile(_0x48d7ef,_0x56053a){const _0x239654=a200_0x589f,_0xf9eaeb=await readFile(_0x56053a),_0x1c0032=new FormData();_0x1c0032['append'](_0x239654(0x155),_0x48d7ef),_0x1c0032[_0x239654(0xcb)](_0x239654(0xef),new Blob([new Uint8Array(_0xf9eaeb)]),basename(_0x56053a));const _0x13bd5d=await apiFormRequest(_0x239654(0xc7),_0x1c0032);return _0x13bd5d[_0x239654(0xd9)];}export async function queryDevelopmentFileUrl(_0x596c40,_0x9f074={}){const _0x41220d=a200_0x589f,_0x405087=await apiRequest(_0x41220d(0x117),{'method':'POST','body':{'filePath':_0x596c40,'downloadFlag':_0x9f074['download']??![],..._0x9f074[_0x41220d(0xed)]?{'longTerm':!![]}:{}}});return _0x405087[_0x41220d(0xd9)];}export async function recognizeDevelopmentOcr(_0x608607,_0x591ae6){const _0xba44bf=a200_0x589f,_0x4d479c=new URLSearchParams({'url':_0x591ae6['url'],'type':_0x591ae6[_0xba44bf(0xa4)],'appCode':_0x608607}),_0x317839=await apiRequest(_0xba44bf(0x134)+_0x4d479c[_0xba44bf(0x188)](),{'method':_0xba44bf(0xf2)});return _0x317839[_0xba44bf(0xd9)];}function isAuthFailure(_0x2ad17a){const _0x2caa21=a200_0x589f,_0x8dca10=_0x2ad17a['errorMsg']||_0x2ad17a[_0x2caa21(0x9c)]||_0x2ad17a[_0x2caa21(0xd9)]?.['message']||_0x2ad17a[_0x2caa21(0xbf)]||_0x2ad17a[_0x2caa21(0xf3)]||'';return _0x2ad17a[_0x2caa21(0x157)]===_0x2caa21(0x149)||_0x2ad17a[_0x2caa21(0xd5)]===0x191||_0x2ad17a['code']===_0x2caa21(0x163)||_0x8dca10['includes']('401')||_0x8dca10['includes'](_0x2caa21(0xe0))||_0x8dca10[_0x2caa21(0x181)]('登录')||_0x8dca10[_0x2caa21(0x181)]('认证');}export async function platformFetch(_0x50b5e1,_0x3a26f8){const _0x5a1830=a200_0x589f;let _0x37b4f6;try{_0x37b4f6=await fetch(_0x50b5e1,{'method':_0x3a26f8['method']??_0x5a1830(0xf2),'headers':{'Content-Type':_0x5a1830(0x127),'Cookie':_0x3a26f8[_0x5a1830(0x135)],'X-Invoke-Source':_0x5a1830(0x14d)},..._0x3a26f8['body']&&{'body':JSON[_0x5a1830(0x16e)](_0x3a26f8[_0x5a1830(0x170)])}});}catch(_0x4838f2){throw createFetchFailureError(_0x50b5e1,_0x4838f2);}if(!_0x37b4f6['ok']){if(_0x37b4f6[_0x5a1830(0xf0)]===0x191)throw CliErrors[_0x5a1830(0x11f)]();throw CliErrors[_0x5a1830(0x121)](_0x3a26f8[_0x5a1830(0x159)]+_0x5a1830(0x165)+_0x37b4f6[_0x5a1830(0xf0)]);}const _0xee59e2=await _0x37b4f6[_0x5a1830(0x132)]();if(_0xee59e2[_0x5a1830(0x180)]===![]){if(isAuthFailure(_0xee59e2))throw CliErrors['authRequired']();throw CliErrors[_0x5a1830(0x121)](_0xee59e2[_0x5a1830(0x108)]||_0xee59e2[_0x5a1830(0x9c)]||_0x3a26f8[_0x5a1830(0x159)]+'\x20failed');}return _0xee59e2['data'];}export async function platformRequest(_0x498e6c,_0x54af41){const _0x530e24=a200_0x589f;if(/^https?:\/\//i[_0x530e24(0xb5)](_0x498e6c))throw CliErrors[_0x530e24(0xa5)](_0x530e24(0x17f)+_0x498e6c,_0x530e24(0x139));const _0x2b6732=_0x498e6c[_0x530e24(0x130)]('/')?_0x498e6c:'/'+_0x498e6c;return platformFetch(''+getApiDomain()+_0x2b6732,_0x54af41);}function cleanNewlines(_0x2ec26c){const _0x55247d=a200_0x589f;return _0x2ec26c[_0x55247d(0x15b)](/[\r\n]+/g,'\x20')[_0x55247d(0x14a)]();}function cleanDatasetName(_0x22e62d){const _0x54a314=a200_0x589f;if(!_0x22e62d[_0x54a314(0xb0)])return _0x22e62d;return{..._0x22e62d,'name':cleanNewlines(_0x22e62d[_0x54a314(0xb0)])};}export async function fetchModelList(_0x31700d,_0x404773){const _0x43843f=a200_0x589f,_0x12486e=getEnv(),_0x1e9ddf=new URLSearchParams({'appcode':_0x31700d,'otype':'array'}),_0x3aa600=_0x43843f(0x13b)+_0x1e9ddf[_0x43843f(0x188)]();logger[_0x43843f(0x96)]('fetch-model-list',_0x43843f(0x133)+_0x12486e+')',{'apiPath':_0x3aa600});const _0x28002b=await platformRequest(_0x3aa600,{'cookie':_0x404773,'label':_0x43843f(0x15e)}),_0x3ecd03=(_0x28002b['configArray']??[])[_0x43843f(0xac)](cleanDatasetName);return{'configArray':_0x3ecd03,'count':_0x3ecd03[_0x43843f(0x11e)]};}export async function fetchDatasetDoc(_0x515f04){const _0x2eac3e=a200_0x589f,{appCode:_0x736231,cookie:_0x4b833b,datasetCode:_0x2a64d6,datasetId:_0x4055eb,extraParams:_0x2d6226}=_0x515f04,_0x4b7e8a=await platformRequest(_0x2eac3e(0xe9),{'method':'POST','body':{'appCode':_0x736231,'datasetCode':_0x2a64d6,'datasetId':_0x4055eb,..._0x2d6226||{}},'cookie':_0x4b833b,'label':'Fetch\x20doc\x20('+_0x2a64d6+')'});if(!_0x4b7e8a||typeof _0x4b7e8a['markdown']!==_0x2eac3e(0x15f))throw new Error(_0x2eac3e(0x106)+_0x2a64d6+_0x2eac3e(0x146));return _0x4b7e8a[_0x2eac3e(0x169)];}export async function getMenuTree(_0x53dc04,_0x25c45b){const _0x50d0b2=a200_0x589f,_0x103760=new URLSearchParams({'appCode':_0x53dc04});return platformRequest('/smartapi/menu/find?'+_0x103760[_0x50d0b2(0x188)](),{'cookie':_0x25c45b,'label':'Fetch\x20menu\x20list'});}export async function createMenuRecord(_0x38e7e8,_0x138d8a,_0x245cb0){const _0x53bedd=a200_0x589f;return platformRequest(_0x53bedd(0x152),{'method':_0x53bedd(0xf7),'body':_0x38e7e8,'cookie':_0x138d8a,'label':_0x245cb0});}export async function updateMenuRecord(_0x47698b,_0x33006c,_0x551c6d){const _0xbd4cbf=a200_0x589f;return platformRequest(_0xbd4cbf(0x15d),{'method':'POST','body':_0x47698b,'cookie':_0x33006c,'label':_0x551c6d});}export async function deleteMenuRecord(_0x116159,_0xefbceb,_0x5179df){const _0x5d76b3=a200_0x589f;return platformRequest(_0x5d76b3(0x17c),{'method':_0x5d76b3(0xf7),'body':{'id':_0x116159},'cookie':_0xefbceb,'label':_0x5179df});}export async function batchDeleteMenuRecords(_0x274428,_0x74d071,_0x27e21a){const _0x34a4c8=a200_0x589f;return platformRequest(_0x34a4c8(0xad),{'method':_0x34a4c8(0xf7),'body':{'idList':_0x274428},'cookie':_0x74d071,'label':_0x27e21a});}export async function startMenuRegroup(_0x36ffb4,_0x7a4b8e,_0x1da3c8){const _0xe8448b=a200_0x589f;return platformRequest(_0xe8448b(0x178),{'method':_0xe8448b(0xf7),'body':_0x36ffb4,'cookie':_0x7a4b8e,'label':_0x1da3c8});}export async function getAsyncTaskStatus(_0x2a2820,_0x4d31fd,_0x9fdb44){const _0x38ad11=a200_0x589f,_0x1afd87=new URLSearchParams({'appCode':_0x4d31fd});return platformRequest(_0x38ad11(0x184)+encodeURIComponent(_0x2a2820)+'?'+_0x1afd87['toString'](),{'cookie':_0x9fdb44,'label':_0x38ad11(0xff)+_0x2a2820});}export async function listBffScripts(_0x32600b,_0x367207,_0x3715d8){const _0x502e19=a200_0x589f;let _0x21cc9a='/api/management/library/scripts/list?appCode='+_0x32600b;if(_0x367207)_0x21cc9a+=_0x502e19(0x122)+_0x367207;const _0x15820e=await apiRequest(_0x21cc9a);let _0x1d7e95=extractList(_0x15820e[_0x502e19(0xd9)]);if(_0x3715d8?.[_0x502e19(0x14b)]){const _0x42db09=_0x3715d8[_0x502e19(0x14b)][_0x502e19(0x90)]();_0x1d7e95=_0x1d7e95['filter'](_0x3559ef=>_0x3559ef[_0x502e19(0x126)]?.['toLowerCase']()[_0x502e19(0x181)](_0x42db09)||_0x3559ef[_0x502e19(0x107)]?.[_0x502e19(0x90)]()['includes'](_0x42db09));}return _0x1d7e95;}export async function getBffScriptInfo(_0x2fd770){const _0x2c26e1=a200_0x589f,_0x3db32e=await apiRequest(_0x2c26e1(0xb6)+_0x2fd770);if(!_0x3db32e['data'])throw CliErrors[_0x2c26e1(0xa5)](_0x2c26e1(0xdf)+_0x2fd770);return _0x3db32e[_0x2c26e1(0xd9)];}export async function saveBffScript(_0x5900c8){const _0x3b9249=a200_0x589f,_0x14622a=await apiRequest(_0x3b9249(0xbc),{'method':'POST','body':_0x5900c8}),{id:_0x251aa2,entity:_0x504b7b}=normalizeEntityWithIdResponse(_0x14622a['data']);if(_0x251aa2!==undefined){const _0x189db1=typeof _0x504b7b['functionName']===_0x3b9249(0x15f)||typeof _0x504b7b[_0x3b9249(0xbe)]==='string'?_0x504b7b:undefined;return{'id':_0x251aa2,'script':_0x189db1};}throw CliErrors[_0x3b9249(0x121)](_0x3b9249(0xa3));}export async function deleteBffScript(_0x552d3b){const _0x21c7ea=a200_0x589f;await apiRequest(_0x21c7ea(0x148),{'method':_0x21c7ea(0xf7),'body':{'id':_0x552d3b}});}export async function getBffScriptStatistics(_0x407196){const _0x262837=a200_0x589f,_0x434df3=await apiRequest(_0x262837(0x173)+_0x407196);return extractList(_0x434df3[_0x262837(0xd9)]);}export async function clearBffScriptCache(){const _0x287396=a200_0x589f,_0x27917d=await apiRequest('/api/management/script/cache/clear',{'method':_0x287396(0xf7),'useRuntime':!![]});return typeof _0x27917d[_0x287396(0xd9)]===_0x287396(0x15f)?_0x27917d[_0x287396(0xd9)]:'';}export async function listBffDatasetOperations(_0x51052e,_0x57bb27){const _0x5c756d=a200_0x589f,_0x599aa9=await apiRequest(_0x5c756d(0xf8),{'method':_0x5c756d(0xf7),'body':{'appCode':_0x51052e,'datasetId':_0x57bb27}});return _0x599aa9['data'];}export async function listSqlQueries(_0x3b1095,_0x15229f){const _0x3b786a=a200_0x589f,_0x34e159=await apiRequest(_0x3b786a(0x119),{'method':_0x3b786a(0xf7),'body':{'appCode':_0x3b1095,'currentPage':_0x15229f?.[_0x3b786a(0x11c)]??0x1,'pageSize':_0x15229f?.['pageSize']??0x32,'sqlCode':_0x15229f?.[_0x3b786a(0x17b)],'sqlName':_0x15229f?.[_0x3b786a(0xa9)]}});return _0x34e159['data'];}export async function getSqlQueryInfo(_0x67aac0,_0x332c4c){const _0x2f4f22=a200_0x589f,_0x2ce3c4=await listSqlQueries(_0x67aac0,{'sqlCode':_0x332c4c}),_0x1084cf=_0x2ce3c4[_0x2f4f22(0x11a)]?.[0x0];if(!_0x1084cf)throw CliErrors[_0x2f4f22(0xa5)](_0x2f4f22(0x12c)+_0x332c4c);return _0x1084cf;}export async function getSqlQueryDetail(_0x31b367){const _0x350345=a200_0x589f,_0x1e34b1=await apiRequest(_0x350345(0x131)+(_0x350345(0x176)+encodeURIComponent(_0x31b367)));if(!_0x1e34b1[_0x350345(0xd9)])throw CliErrors[_0x350345(0xa5)](_0x350345(0x12c)+_0x31b367);return _0x1e34b1[_0x350345(0xd9)];}export async function getSqlQueryDetailById(_0x1bd506){const _0x4a14be=a200_0x589f,_0x220222=await apiRequest(_0x4a14be(0xda)+_0x1bd506);if(!_0x220222[_0x4a14be(0xd9)])throw CliErrors[_0x4a14be(0xa5)](_0x4a14be(0xfd)+_0x1bd506);return _0x220222[_0x4a14be(0xd9)];}export async function createSqlQuery(_0x516827){const _0x223fe5=a200_0x589f,_0x440724=await apiRequest(_0x223fe5(0xc0),{'method':_0x223fe5(0xf7),'body':_0x516827}),{id:_0x14db5f,entity:_0x13bfcd}=normalizeEntityWithIdResponse(_0x440724['data']);if(!(_0x223fe5(0x17b)in _0x13bfcd)&&_0x14db5f)return getSqlQueryDetailById(_0x14db5f);return normalizeSqlQueryEntity(_0x13bfcd);}export async function updateSqlQuery(_0x3348af){const _0xc80b67=a200_0x589f,_0xb526f1=await apiRequest(_0xc80b67(0x175),{'method':_0xc80b67(0xf7),'body':_0x3348af}),{id:_0x4dd466,entity:_0x33345b}=normalizeEntityWithIdResponse(_0xb526f1[_0xc80b67(0xd9)]);if(!('sqlCode'in _0x33345b)){if(_0x3348af[_0xc80b67(0x17b)])return getSqlQueryDetail(_0x3348af[_0xc80b67(0x17b)]);if(_0x4dd466)return getSqlQueryDetailById(_0x4dd466);}return normalizeSqlQueryEntity(_0x33345b);}export async function deleteSqlQuery(_0x7998a4){const _0x358776=a200_0x589f;await apiRequest(_0x358776(0x144),{'method':'POST','body':_0x7998a4});}export async function saveSqlQuery(_0x3f23f0){const _0x4e8066=a200_0x589f,_0x32859a=await apiRequest(_0x4e8066(0x10f),{'method':'POST','body':_0x3f23f0});return _0x32859a[_0x4e8066(0xd9)];}function normalizeSqlQueryEntity(_0xb4c63b){const _0x1c5451=a200_0x589f;return{..._0xb4c63b,'id':Number(_0xb4c63b['id']),'dbId':_0xb4c63b['dbId']==null?undefined:Number(_0xb4c63b['dbId']),'version':_0xb4c63b[_0x1c5451(0xfa)]==null?undefined:Number(_0xb4c63b[_0x1c5451(0xfa)])};}export async function executeSql(_0x98e7f6,_0x3013c0,_0x46c41f){const _0x2dff0a=a200_0x589f,_0x3dafbd=await apiRequest(_0x2dff0a(0xa8),{'method':'POST','body':{'appCode':_0x98e7f6,'sqlCode':_0x3013c0,..._0x46c41f&&{'params':_0x46c41f}},'useRuntime':!![]});return _0x3dafbd['data'];}export async function executeDatasetDataOperation(_0x1b0041,_0x4d8ea5,_0x2b679d,_0x5d8bea={}){const _0x3bb8f0=a200_0x589f;try{const _0x403192=await apiRequest(_0x3bb8f0(0xf4)+_0x1b0041+'/'+_0x4d8ea5+'/'+_0x2b679d,{'method':_0x3bb8f0(0xf7),'body':_0x5d8bea,'useRuntime':!![]});return _0x403192[_0x3bb8f0(0xd9)];}catch(_0x49f395){if(_0x2b679d===_0x3bb8f0(0x177)&&_0x49f395 instanceof CliError&&_0x49f395['code']===_0x3bb8f0(0xee)&&_0x5d8bea['id']!==undefined&&_0x5d8bea['id']!==null&&_0x5d8bea['id']!==''){const _0x3b595d=await apiRequest(_0x3bb8f0(0xf4)+_0x1b0041+'/'+_0x4d8ea5+_0x3bb8f0(0x109),{'method':_0x3bb8f0(0xf7),'body':{'where':{'id':{'$eq':_0x5d8bea['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x532ef5=Array['isArray'](_0x3b595d[_0x3bb8f0(0xd9)]?.[_0x3bb8f0(0x11a)])?_0x3b595d[_0x3bb8f0(0xd9)]['tableData']:[];return _0x532ef5[0x0]??null;}throw _0x49f395;}}export async function listDatasets(_0x41de89,_0x5b405a){const _0x275b92=a200_0x589f,_0x5cc394={'appCode':_0x41de89,'deleted':_0x5b405a?.[_0x275b92(0xe4)]??![]};if(_0x5b405a?.[_0x275b92(0xd5)])_0x5cc394[_0x275b92(0xd5)]=_0x5b405a[_0x275b92(0xd5)];if(_0x5b405a?.[_0x275b92(0xb0)])_0x5cc394['name']=_0x5b405a[_0x275b92(0xb0)];const _0x442afa=await apiRequest(_0x275b92(0x10a),{'method':_0x275b92(0xf7),'body':_0x5cc394});return extractList(_0x442afa[_0x275b92(0xd9)]);}export async function deleteDataset(_0x4cf44c,_0x7826ab){const _0x37532e=a200_0x589f;await apiRequest(_0x37532e(0x8d),{'method':_0x37532e(0xf7),'body':{'appCode':_0x4cf44c,'datasetId':_0x7826ab}});}export async function restoreDataset(_0x3fd854,_0x35179c){const _0x28aa61=a200_0x589f;await apiRequest(_0x28aa61(0x9a),{'method':_0x28aa61(0xf7),'body':{'appCode':_0x3fd854,'datasetId':_0x35179c}});}export async function previewTextGeneratedDataset(_0x4a41c0,_0x1ac3a2){const _0x805d66=a200_0x589f,_0x223c18=await apiRequest(_0x805d66(0xf5),{'method':_0x805d66(0xf7),'body':{'appCode':_0x4a41c0,'datasetName':_0x1ac3a2[_0x805d66(0xeb)],'requirementDescription':_0x1ac3a2[_0x805d66(0x8e)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x223c18[_0x805d66(0xd9)];}export async function startTextGeneratedDataset(_0xc4bf57,_0x1c4d16,_0x44d5c9){const _0x84a857=a200_0x589f,_0x12910f=await apiRequest(_0x84a857(0x156),{'method':_0x84a857(0xf7),'body':{'appCode':_0xc4bf57,..._0x44d5c9?.[_0x84a857(0xec)]?{'clientOperationId':_0x44d5c9['clientOperationId']}:{},'design':_0x1c4d16},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x12910f[_0x84a857(0xd9)];}export async function getTextGeneratedDatasetStatus(_0x2efd23,_0x3dbea6){const _0x123172=a200_0x589f,_0x480443=new URLSearchParams({'appCode':_0x2efd23});_0x3dbea6['operationId']&&_0x480443['set'](_0x123172(0x158),_0x3dbea6[_0x123172(0x158)]);_0x3dbea6['clientOperationId']&&_0x480443[_0x123172(0x91)](_0x123172(0xec),_0x3dbea6[_0x123172(0xec)]);const _0x3578a7=await apiRequest(_0x123172(0x14c)+_0x480443['toString']());return _0x3578a7['data'];}export async function searchDatasets(_0x7ce83,_0x43d4d3){const _0x2290ca=a200_0x589f,_0x1b3798=await listDatasets(_0x7ce83,{'name':_0x43d4d3}),_0x4bad07=_0x43d4d3[_0x2290ca(0x90)](),_0x31c0fa=new Set(_0x1b3798[_0x2290ca(0xac)](_0x240603=>_0x240603['id'])),_0x5a2352=_0x1b3798[_0x2290ca(0x10e)](_0xb726d7=>_0xb726d7['dbtableConfig']?.['tableName']?.[_0x2290ca(0x90)]()[_0x2290ca(0x181)](_0x4bad07)||_0xb726d7[_0x2290ca(0x107)]?.[_0x2290ca(0x90)]()[_0x2290ca(0x181)](_0x4bad07)),_0x2562cc=await listDatasets(_0x7ce83,{'code':_0x43d4d3});for(const _0x5e0c10 of _0x2562cc){!_0x31c0fa[_0x2290ca(0xaf)](_0x5e0c10['id'])&&(_0x1b3798['push'](_0x5e0c10),_0x31c0fa[_0x2290ca(0xfe)](_0x5e0c10['id']));}return _0x1b3798;}export function normalizeDatasetOperations(_0x42bb4d){const _0xc6ac5a=a200_0x589f;if(Array[_0xc6ac5a(0xc5)](_0x42bb4d))return _0x42bb4d[_0xc6ac5a(0x10e)](_0xe72f96=>_0xe72f96!=null&&typeof _0xe72f96===_0xc6ac5a(0x129));if(_0x42bb4d&&typeof _0x42bb4d==='object')return Object[_0xc6ac5a(0xfc)](_0x42bb4d)[_0xc6ac5a(0x10e)](([,_0x39374f])=>_0x39374f!=null&&typeof _0x39374f===_0xc6ac5a(0x129))[_0xc6ac5a(0xac)](([_0x756f3d,_0x473a64])=>({..._0x473a64,'name':_0x473a64[_0xc6ac5a(0xb0)]??_0x473a64[_0xc6ac5a(0x113)]??_0x756f3d}));return[];}export async function getDatasetDetail(_0x5d19c4){const _0x47e43d=a200_0x589f,_0x45803d=/^\d+$/[_0x47e43d(0xb5)](_0x5d19c4)?'id':_0x47e43d(0xd5),_0x3e10c1=await apiRequest(_0x47e43d(0x123)+_0x45803d+'='+_0x5d19c4);return _0x3e10c1[_0x47e43d(0xd9)];}export async function updateDrivenData(_0x58e994){const _0x1ef66f=a200_0x589f,_0x450f3a=await apiRequest(_0x1ef66f(0x186),{'method':_0x1ef66f(0xf7),'body':_0x58e994});return _0x450f3a[_0x1ef66f(0xd9)];}export async function getDatasetOperations(_0x2f670f){const _0x324bfe=a200_0x589f,_0x451f8a=await getDatasetDetail(_0x2f670f),_0xbc0fe=normalizeDatasetOperations(_0x451f8a[_0x324bfe(0x9e)])[_0x324bfe(0xac)](_0x437e2e=>({'name':_0x437e2e[_0x324bfe(0xb0)]||_0x437e2e['operationName'],'displayName':_0x437e2e[_0x324bfe(0xe2)]||_0x437e2e[_0x324bfe(0xb0)],'type':_0x437e2e[_0x324bfe(0xa4)],'method':_0x437e2e[_0x324bfe(0xcf)],'path':_0x437e2e[_0x324bfe(0xaa)],'enabled':_0x437e2e[_0x324bfe(0x114)]??!![],'requestFields':_0x437e2e[_0x324bfe(0x171)],'responseFields':_0x437e2e[_0x324bfe(0x103)]}));return{'dataset':{'id':_0x451f8a['id']??_0x451f8a['modelId'],'name':_0x451f8a['name'],'code':_0x451f8a[_0x324bfe(0xd5)]||_0x451f8a[_0x324bfe(0x115)],'tableName':_0x451f8a['tableName']||_0x451f8a[_0x324bfe(0x8f)]?.[_0x324bfe(0xa0)]},'operations':_0xbc0fe};}export async function getOperationDetail(_0x718a5d,_0x3a77a1,_0x2b770c){const _0x4fce70=a200_0x589f;let _0x111a6f=_0x3a77a1;if(!/^\d+$/[_0x4fce70(0xb5)](_0x3a77a1)){const _0x703fb7=await listDatasets(_0x718a5d,{'code':_0x3a77a1}),_0x26dc1a=_0x703fb7[_0x4fce70(0xd6)](_0x155e57=>_0x155e57[_0x4fce70(0xd5)]===_0x3a77a1||String(_0x155e57['id'])===_0x3a77a1);if(!_0x26dc1a)throw CliErrors[_0x4fce70(0xa5)](_0x4fce70(0x16a)+_0x3a77a1);_0x111a6f=String(_0x26dc1a['id']);}const _0x367f73=await getDatasetDetail(_0x111a6f),_0x32b608=normalizeDatasetOperations(_0x367f73[_0x4fce70(0x9e)])[_0x4fce70(0xd6)](_0x3e791f=>(_0x3e791f[_0x4fce70(0xb0)]||_0x3e791f[_0x4fce70(0x113)])===_0x2b770c);if(!_0x32b608)throw CliErrors[_0x4fce70(0xa5)](_0x4fce70(0x141)+_0x2b770c+_0x4fce70(0xcc)+_0x3a77a1);return{'dataset':{'id':_0x367f73['id']??_0x367f73[_0x4fce70(0xc3)],'name':_0x367f73['name'],'code':_0x367f73[_0x4fce70(0xd5)]||_0x367f73['modelCode'],'tableName':_0x367f73[_0x4fce70(0xa0)]||_0x367f73[_0x4fce70(0x8f)]?.[_0x4fce70(0xa0)]},'operation':_0x32b608};}export async function startGenerateStandardPages(_0x24d79f,_0x4abb18,_0x4b824d){const _0x2cf486=a200_0x589f,_0x1aa33d=await apiRequest(_0x2cf486(0xdc)+_0x4abb18+_0x2cf486(0xf9),{'method':_0x2cf486(0xf7),'body':{'appCode':_0x24d79f,..._0x4b824d?.[_0x2cf486(0xec)]?{'clientOperationId':_0x4b824d[_0x2cf486(0xec)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x1aa33d[_0x2cf486(0xd9)];}export async function getGenerateStandardPagesStatus(_0x2f77f8,_0x5980d0,_0x15bc0f){const _0x7f30b2=a200_0x589f,_0x2cbf4d=new URLSearchParams({'appCode':_0x2f77f8});_0x15bc0f[_0x7f30b2(0x158)]&&_0x2cbf4d[_0x7f30b2(0x91)]('operationId',_0x15bc0f[_0x7f30b2(0x158)]);_0x15bc0f[_0x7f30b2(0xec)]&&_0x2cbf4d[_0x7f30b2(0x91)]('clientOperationId',_0x15bc0f[_0x7f30b2(0xec)]);const _0x385096=await apiRequest('/smartapi/lovrabet/dataset/'+_0x5980d0+'/generate-standard-pages/status?'+_0x2cbf4d['toString']());return _0x385096[_0x7f30b2(0xd9)];}export async function getStandardPageStatus(_0x4d6a27,_0x525ef8){const _0x1ce33b=a200_0x589f,_0x480f26=await apiRequest(_0x1ce33b(0xdc)+_0x525ef8+'/standard-page-status?appCode='+encodeURIComponent(_0x4d6a27));return _0x480f26[_0x1ce33b(0xd9)];}export async function tryGetStandardPageStatus(_0x5c8573,_0x384c6d){const _0x3230b0=a200_0x589f;try{return await getStandardPageStatus(_0x5c8573,_0x384c6d);}catch(_0x1edeac){if(_0x1edeac instanceof CliError&&_0x1edeac[_0x3230b0(0xd5)]===_0x3230b0(0xee)&&/404|not found|non-json response/i[_0x3230b0(0xb5)](_0x1edeac['message']))return null;throw _0x1edeac;}}export async function syncStandardPages(_0x2459e0,_0x343200){const _0x17ee8a=a200_0x589f,_0x22dbee=await apiRequest('/smartapi/lovrabet/dataset/'+_0x343200+_0x17ee8a(0xc6),{'method':_0x17ee8a(0xf7),'body':{'appCode':_0x2459e0}});return _0x22dbee[_0x17ee8a(0xd9)];}export async function getPageDetail(_0x45ca8e){const _0xa73112=a200_0x589f,_0xce1f35=await apiRequest(_0xa73112(0xd1)+_0x45ca8e);if(!_0xce1f35[_0xa73112(0xd9)])throw CliErrors[_0xa73112(0xa5)](_0xa73112(0x98)+_0x45ca8e);return _0xce1f35[_0xa73112(0xd9)];}export async function listDeletedPages(_0x317364,_0x596a4d,_0x51fcef){const _0x1f2ab2=a200_0x589f,_0x3febfa=new URLSearchParams({'appCode':_0x317364,'type':_0x596a4d,'currentPage':String(_0x51fcef[_0x1f2ab2(0x11c)]),'pageSize':String(_0x51fcef['pageSize'])}),_0x222e9b=await apiRequest(_0x1f2ab2(0x151)+_0x3febfa['toString']());return _0x222e9b[_0x1f2ab2(0xd9)];}export async function restoreStandardPage(_0x448af9){const _0x1642e7=a200_0x589f;await apiRequest(_0x1642e7(0x143),{'method':_0x1642e7(0xf7),'body':{'id':_0x448af9}});}export async function restoreJsxPage(_0x5526bc,_0x3cd11f){const _0x11928a=a200_0x589f,_0x246a7c=await apiRequest(_0x11928a(0x10d),{'method':'POST','body':{'appCode':_0x5526bc,'id':_0x3cd11f}});return _0x246a7c[_0x11928a(0xd9)];}export async function updatePage(_0x1a2689,_0x2abd28,_0xdb09d8,_0xfdf383){const _0x550441=a200_0x589f,_0x5c8611=await apiRequest(_0x550441(0x128),{'method':_0x550441(0xf7),'body':{'appCode':_0x1a2689,'pageId':_0x2abd28,'code':_0xdb09d8,'datasetIds':_0xfdf383}});return _0x5c8611[_0x550441(0xd9)];}export function generateSdkCode(_0x5cddc8,_0x44e308,_0x5981c7){const _0xbd274=a200_0x589f,_0x5e0e78=_0x5981c7?.[_0xbd274(0xa2)]??!![],_0x92cb8b=_0xbd274(0x102)+_0x5cddc8['code']?.[_0xbd274(0x15b)](/-/g,'_'),_0x3a496a=_0x44e308[_0xbd274(0xb0)]||_0x44e308[_0xbd274(0x113)]||'filter',_0x57d970=[];_0x5e0e78&&_0x57d970[_0xbd274(0x187)](_0xbd274(0x9d),'','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','');_0x57d970['push'](_0xbd274(0xe8)+_0x5cddc8[_0xbd274(0xb0)]+'\x20('+(_0x5cddc8['tableName']||_0xbd274(0xb7))+')');if(_0x3a496a===_0xbd274(0x10e))_0x57d970[_0xbd274(0x187)](_0xbd274(0x140)+_0x92cb8b+_0xbd274(0xb4),_0xbd274(0x13c),'\x20\x20pageSize:\x2020,','\x20\x20currentPage:\x201,',_0xbd274(0xe5));else{if(_0x3a496a==='getOne')_0x57d970['push']('const\x20result\x20=\x20await\x20client.models.'+_0x92cb8b+_0xbd274(0xbd));else{if(_0x3a496a===_0xbd274(0x11d))_0x57d970[_0xbd274(0x187)]('const\x20result\x20=\x20await\x20client.models.'+_0x92cb8b+'.create({\x20/*\x20fields\x20*/\x20});');else{if(_0x3a496a==='update')_0x57d970['push'](_0xbd274(0x140)+_0x92cb8b+_0xbd274(0xd8));else _0x3a496a===_0xbd274(0x16f)||_0x3a496a===_0xbd274(0x99)?_0x57d970[_0xbd274(0x187)](_0xbd274(0x140)+_0x92cb8b+_0xbd274(0xe1)):_0x57d970[_0xbd274(0x187)](_0xbd274(0x140)+_0x92cb8b+'.'+_0x3a496a+_0xbd274(0x17d));}}}return _0x57d970[_0xbd274(0x124)]('\x0a');}export function generateSqlCodeTemplate(_0x571117,_0xfca93e){const _0x4c3712=a200_0x589f,_0x1dcd58=_0xfca93e?.[_0x4c3712(0x153)]??_0x4c3712(0x17e),_0x30a158=_0xfca93e?.[_0x4c3712(0xa2)]??!![],_0x473d93=[];return _0x473d93[_0x4c3712(0x187)]('//\x20SQL:\x20'+_0x571117[_0x4c3712(0xa9)]+'\x20('+_0x571117[_0x4c3712(0x17b)]+')'),_0x1dcd58===_0x4c3712(0x17e)?(_0x30a158&&_0x473d93[_0x4c3712(0x187)]('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','',_0x4c3712(0x100),''),_0x473d93['push']('const\x20data\x20=\x20await\x20client.sql.execute({','\x20\x20sqlCode:\x20\x27'+_0x571117[_0x4c3712(0x17b)]+'\x27,',_0x4c3712(0x162),_0x4c3712(0xe5),_0x4c3712(0x138),_0x4c3712(0xd2))):_0x473d93[_0x4c3712(0x187)](_0x4c3712(0x182),_0x4c3712(0xb3),_0x4c3712(0x12e),'\x20\x20\x20\x20sqlCode:\x20\x27'+_0x571117[_0x4c3712(0x17b)]+'\x27,',_0x4c3712(0x101),_0x4c3712(0x183),_0x4c3712(0xae),'}'),_0x473d93[_0x4c3712(0x124)]('\x0a');}export async function getErConfig(_0x56bb24,_0x90b3fc){const _0x43b27b=a200_0x589f,_0x39826e=await apiRequest(_0x43b27b(0x13d),{'method':'POST','body':{'appCode':_0x56bb24,'dblinkId':_0x90b3fc},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x39826e[_0x43b27b(0xd9)];}export async function getErRelationDetail(_0x4cdf8d,_0xdc2d82){const _0x22c8e8=a200_0x589f,_0x507750=new URLSearchParams({'appCode':_0x4cdf8d,'relationId':String(_0xdc2d82)});try{const _0x220842=await apiRequest('/smartapi/question/er-config/cli/detail?'+_0x507750[_0x22c8e8(0x188)]());return _0x220842[_0x22c8e8(0xd9)]?.[_0x22c8e8(0xbb)]??null;}catch(_0x5eee9c){if(_0x5eee9c instanceof CliError&&_0x5eee9c[_0x22c8e8(0xd5)]===_0x22c8e8(0xee)&&(_0x5eee9c[_0x22c8e8(0xf1)]?.[_0x22c8e8(0x181)](_0x22c8e8(0x136))||_0x5eee9c[_0x22c8e8(0xf1)]===_0x22c8e8(0xa1)&&_0x5eee9c[_0x22c8e8(0x9c)]===_0x22c8e8(0xce)))return null;throw _0x5eee9c;}}export async function createErRelation(_0x5469e0){const _0x4c595c=a200_0x589f,_0x5985aa=await apiRequest(_0x4c595c(0x120),{'method':'POST','body':_0x5469e0,'allowNonJsonSuccess':!![]});return _0x5985aa[_0x4c595c(0xd9)];}export async function updateErRelation(_0x51e881){const _0x33f9c5=a200_0x589f,_0x1f4100=await apiRequest(_0x33f9c5(0xb9),{'method':'POST','body':_0x51e881,'allowNonJsonSuccess':!![]});return _0x1f4100[_0x33f9c5(0xd9)];}export async function deleteErRelation(_0x1c9ea8){const _0x489c7f=a200_0x589f,_0x554e5a=await apiRequest(_0x489c7f(0x161),{'method':_0x489c7f(0xf7),'body':_0x1c9ea8,'allowNonJsonSuccess':!![]});return _0x554e5a[_0x489c7f(0xd9)];}export async function updateErBusinessGroup(_0x1668f7){const _0x522cc9=a200_0x589f,_0x4e1d89=await apiRequest(_0x522cc9(0x116),{'method':_0x522cc9(0xf7),'body':_0x1668f7,'allowNonJsonSuccess':!![]});return _0x4e1d89[_0x522cc9(0xd9)];}function buildQuery(_0x8c986){const _0x2238a1=a200_0x589f,_0x475e47=new URLSearchParams();for(const [_0x3efd2a,_0x315a26]of Object[_0x2238a1(0xfc)](_0x8c986)){if(_0x315a26===undefined||_0x315a26==='')continue;_0x475e47[_0x2238a1(0x91)](_0x3efd2a,String(_0x315a26));}const _0x5833c3=_0x475e47['toString']();return _0x5833c3?'?'+_0x5833c3:'';}export async function listNotificationChannelConfigs(_0x4cfabc,_0x31cca1){const _0x3d266b=a200_0x589f,_0x3a93ff=await apiRequest(_0x3d266b(0x14e)+buildQuery({'appCode':_0x4cfabc,'channelType':_0x31cca1}));return Array[_0x3d266b(0xc5)](_0x3a93ff[_0x3d266b(0xd9)])?_0x3a93ff[_0x3d266b(0xd9)]:[];}export async function listAppConfigs(_0x22abc6,_0x1540f0){const _0x67e54c=a200_0x589f,_0x1c4c4a=await apiRequest(_0x67e54c(0x16b),{'method':_0x67e54c(0xf7),'body':{'appCode':_0x22abc6,..._0x1540f0?.[_0x67e54c(0x174)]?{'key':_0x1540f0[_0x67e54c(0x174)]}:{},..._0x1540f0?.[_0x67e54c(0xa7)]?{'tags':_0x1540f0[_0x67e54c(0xa7)]}:{}}});return extractAppConfigList(_0x1c4c4a[_0x67e54c(0xd9)]);}export async function getAppConfigByKey(_0x4c8ea6,_0x41a6c6){const _0x541247=a200_0x589f,_0x20a361=await apiRequest(_0x541247(0xdd)+buildQuery({'appCode':_0x4c8ea6,'key':_0x41a6c6}));return _0x20a361['data']??null;}function a200_0x589f(_0x2162be,_0x5043ba){_0x2162be=_0x2162be-0x8d;const _0x46a605=a200_0x46a6();let _0x589fc7=_0x46a605[_0x2162be];return _0x589fc7;}export async function createAppConfig(_0x3aa875){const _0x484b7d=a200_0x589f,_0x53bc13=await apiRequest('/smartapi/app-config/create',{'method':_0x484b7d(0xf7),'body':{'appCode':_0x3aa875[_0x484b7d(0x155)],'key':_0x3aa875[_0x484b7d(0x174)],'value':_0x3aa875['value'],..._0x3aa875[_0x484b7d(0xa7)]?{'tags':_0x3aa875[_0x484b7d(0xa7)]}:{}}});return _0x53bc13[_0x484b7d(0xd9)];}export async function updateAppConfig(_0x1d0f58){const _0x491920=a200_0x589f;await apiRequest('/smartapi/app-config/update',{'method':'POST','body':{'id':_0x1d0f58['id'],'appCode':_0x1d0f58[_0x491920(0x155)],'key':_0x1d0f58[_0x491920(0x174)],'value':_0x1d0f58[_0x491920(0xc1)],..._0x1d0f58[_0x491920(0xa7)]?{'tags':_0x1d0f58[_0x491920(0xa7)]}:{}}});}export async function deleteAppConfig(_0x2d53fa){const _0xbe44f8=a200_0x589f;await apiRequest(_0xbe44f8(0x13f),{'method':'POST','body':_0x2d53fa});}function extractAppConfigList(_0x31e68f){const _0x39135f=a200_0x589f;if(Array[_0x39135f(0xc5)](_0x31e68f))return _0x31e68f;if(_0x31e68f&&typeof _0x31e68f===_0x39135f(0x129)&&Array[_0x39135f(0xc5)](_0x31e68f[_0x39135f(0x93)]))return _0x31e68f[_0x39135f(0x93)];return extractList(_0x31e68f);}export async function listDbLinks(_0x3e861a,_0x6fa370){const _0x4200f5=a200_0x589f,_0x51a4bf=await apiRequest(_0x4200f5(0xe7),{'method':'POST','body':{'appCode':_0x3e861a,'currentPage':_0x6fa370?.['currentPage']??0x1,'pageSize':_0x6fa370?.[_0x4200f5(0xd3)]??0x64}});return{'items':extractList(_0x51a4bf[_0x4200f5(0xd9)]),'paging':extractPaging(_0x51a4bf[_0x4200f5(0xd9)])};}export async function getDbLinkInfo(_0x24e7e0){const _0x19cb07=a200_0x589f,_0x536252=await apiRequest(_0x19cb07(0xb8)+buildQuery({'id':_0x24e7e0}));return _0x536252[_0x19cb07(0xd9)];}export async function createDbLink(_0x10f3b0){const _0x5c9743=a200_0x589f,_0x39f9d0=await apiRequest(_0x5c9743(0xc2),{'method':_0x5c9743(0xf7),'body':_0x10f3b0});return _0x39f9d0[_0x5c9743(0xd9)];}export async function updateDbLink(_0x3d3b42){const _0x1498dd=a200_0x589f,_0x3ed9f6=await apiRequest(_0x1498dd(0x14f),{'method':_0x1498dd(0xf7),'body':_0x3d3b42});return _0x3ed9f6[_0x1498dd(0xd9)];}export async function deleteDbLink(_0x589203){const _0x41605a=a200_0x589f;await apiRequest(_0x41605a(0xd4),{'method':_0x41605a(0xf7),'body':{'id':_0x589203}});}export async function testDbLinkConnect(_0xde0b6e){const _0x23600c=a200_0x589f,_0x5a6d4d=await apiRequest(_0x23600c(0x9b)+buildQuery({'id':_0xde0b6e}));return _0x5a6d4d[_0x23600c(0xd9)];}export async function startDbAnalysis(_0x23b003,_0x52b8fa){const _0x43a7ab=a200_0x589f,_0x58743b=await apiRequest('/smartapi/db-analysis/start',{'method':_0x43a7ab(0xf7),'body':{'dbLinkId':_0x23b003,..._0x52b8fa&&_0x52b8fa['length']>0x0?{'tableNames':_0x52b8fa}:{}}});return _0x58743b[_0x43a7ab(0xd9)];}export async function cancelDbAnalysis(_0x3ed904){const _0x28725d=a200_0x589f;await apiRequest(_0x28725d(0x185)+buildQuery({'planId':_0x3ed904}),{'method':'POST'});}export async function getDbAnalysisStatus(_0xbc6d66){const _0x284dbf=a200_0x589f,_0x17606d=await apiRequest(_0x284dbf(0x12a)+encodeURIComponent(_0xbc6d66));return _0x17606d[_0x284dbf(0xd9)];}export async function getDbAllTableList(_0x19cf16,_0x25a6c9){const _0x577789=a200_0x589f,_0x123d7e=await apiRequest(_0x577789(0xde)+buildQuery({'appCode':_0x19cf16,'dbLinkId':_0x25a6c9})),_0x56a57b=_0x123d7e[_0x577789(0xd9)];if(Array[_0x577789(0xc5)](_0x56a57b))return _0x56a57b;return extractList(_0x56a57b);}export async function getDbTableDiff(_0x24d168,_0xdb983b,_0x512603){const _0x4917f6=a200_0x589f,_0xad7609=await apiRequest('/smartapi/dblink/getTableDiffV2ByPage'+buildQuery({'appCode':_0x24d168,'dbLinkId':_0xdb983b,'pageIndex':_0x512603?.[_0x4917f6(0x189)]??0x1,'pageSize':_0x512603?.['pageSize']??0x14,'tableName':_0x512603?.[_0x4917f6(0xa0)]})),_0xde404b=_0xad7609['data'];return{'totalCount':_0xde404b?.[_0x4917f6(0x164)]??0x0,'physicalTableCount':_0xde404b?.[_0x4917f6(0x172)]??0x0,'datasetTableCount':_0xde404b?.[_0x4917f6(0xdb)]??0x0,..._0xde404b?.['summary']?{'summary':_0xde404b[_0x4917f6(0xc9)]}:{},'tableList':Array[_0x4917f6(0xc5)](_0xde404b?.[_0x4917f6(0x168)])?_0xde404b[_0x4917f6(0x168)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x4c5f1d=a200_0x589f,_0x265c03=await apiRequest(_0x4c5f1d(0xe3),{'method':_0x4c5f1d(0xf7),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x2630a0=extractList(_0x265c03[_0x4c5f1d(0xd9)]),_0x149d3a=extractPaging(_0x265c03[_0x4c5f1d(0xd9)]);return _0x149d3a&&_0x149d3a[_0x4c5f1d(0x164)]>REMOTE_APP_PAGE_SIZE&&console[_0x4c5f1d(0xba)]('Warning:\x20showing\x20first\x20'+REMOTE_APP_PAGE_SIZE+_0x4c5f1d(0x137)+_0x149d3a['totalCount']+'\x20apps.\x20'+_0x4c5f1d(0xd0)),_0x2630a0;}const APP_ROLE_PAGE_SIZE_MAX=0x64;function a200_0x46a6(){const _0x332db8=['cookie','DATA_NOT_EXIST','\x20of\x20','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','9JNUBrL','/api/node-toolbox/dataset/model-list?','\x20\x20where:\x20{},','/smartapi/question/er-config','API\x20error:\x20','/smartapi/app-config/delete','const\x20result\x20=\x20await\x20client.models.','Operation\x20\x22','1981558GOSoXi','/smartapi/page/restore','/smartapi/custom/deleteUserCustomSql','Request\x20timeout:\x20','):\x20missing\x20data.markdown\x20field','12jYWjLK','/api/management/library/scripts/delete','UNAUTHORIZED','trim','scriptName','/smartapi/dataset/text-generate/status?','cli:rabetbase','/notification/channel-config/list','/smartapi/dblink/update','min','/smartapi/page/getDeletedPageList?','/smartapi/menu/create','target','abort','appCode','/smartapi/dataset/text-generate/start','errorCode','operationId','label','API\x20error\x20code:\x20','replace','userTenantRelationList','/smartapi/menu/update','Fetch\x20datasets','string','1880140lDKGZq','/smartapi/question/er-config/cli/delete-single','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','401','totalCount','\x20failed,\x20HTTP\x20','/smartapi/permit/resource/get-menu-list','CUSTOM','tableList','markdown','Dataset\x20not\x20found:\x20','/smartapi/app-config/list','remark','/smartapi/permit/role/delete','stringify','delete','body','requestFields','physicalTableCount','/api/management/library/scripts/statistics?appCode=','key','/smartapi/custom/updateUserCustomSql','?sqlCode=','getOne','/smartapi/menu/regroup','roleType','Check\x20network\x20connectivity\x20and\x20try\x20again.','sqlCode','/smartapi/menu/delete','(/*\x20params\x20*/);','sdk','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','success','includes','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','\x20\x20});','/smartapi/tasks/','/smartapi/db-analysis/jobs/cancel','/smartapi/dataset/update-driven-data','push','toString','pageIndex','/smartapi/dataset/delete-dataset','requirementDescription','dbtableConfig','toLowerCase','set','ENABLE','list','/smartapi/permit/role/get-one','userId','info','1217676VORFkb','Page\x20not\x20found:\x20','remove','/smartapi/dataset/restore-dataset','/smartapi/dblink/testConnect','message','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','operations','needPublic','tableName','API\x20error\x20code:\x20306','includeImports','BFF\x20save\x20returned\x20no\x20valid\x20id','type','validation','avatar','tags','/api/custom/executeSql','sqlName','path','/smartapi/permit/page/get-one','map','/smartapi/menu/batchDelete','\x20\x20return\x20rows;','has','name','permits','24427090eKWpTX','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','.filter({','test','/api/management/library/scripts/info?id=','table','/smartapi/dblink/getOne','/smartapi/question/er-config/cli/update-single','warn','relation','/api/management/library/scripts/save','.getOne(id);','scriptType','errorMessage','/smartapi/custom/saveUserCustomSql','value','/smartapi/dblink/create','modelId','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','isArray','/sync-to-pages','/smartapi/common/uploadFile','roleName','summary','/smartapi/permit/role/get-permit-list','append','\x22\x20not\x20found\x20in\x20dataset\x20','7DArplZ','ER\x20relation\x20does\x20not\x20exist','method','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','/smartapi/lovrabet/detail?pageId=','const\x20results\x20=\x20data.execResult\x20||\x20[];','pageSize','/smartapi/dblink/delete','code','find','signal','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','data','/smartapi/custom/getUserCustomSql?id=','datasetTableCount','/smartapi/lovrabet/dataset/','/smartapi/app-config/getByKey','/smartapi/dblink/getAllTableList','BFF\x20script\x20not\x20found:\x20id=','Unauthorized','.remove(id);','displayName','/smartapi/app/getList','deleted','});','AbortError','/smartapi/dblink/getList','//\x20','/api/node-toolbox/api-doc-generator','needSelf','datasetName','clientOperationId','longTerm','api_error','file','status','hint','GET','error','/api/','/smartapi/dataset/text-generate/preview','/smartapi/permit/resource/get-api-list','POST','/smartapi/dataset/get-dataset-operation','/generate-standard-pages/start','version','/smartapi/permit/user-role/update-user-list','entries','SQL\x20query\x20not\x20found:\x20id=','add','Fetch\x20async\x20task\x20','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','dataset_','responseFields','9204904HnEfNJ','4270767OtNldm','Invalid\x20response\x20format\x20(','description','errorMsg','/filter','/smartapi/dataset/get-dataset-list','email','/smartapi/permit/page/save','/smartapi/webcode/page/restore','filter','/api/node-toolbox/sql/save','nickname','isFinite','/userTenant/getByTenantCode','operationName','enabled','modelCode','/smartapi/question/er-config/business-group/edit','/smartapi/common/queryFileUrl','/smartapi/permit/role/get-list','/smartapi/custom/queryUserCustomSqlList','tableData','/smartapi/permit/user-role/get-user-list','currentPage','create','length','authRequired','/smartapi/question/er-config/cli/erCreate','apiError','&type=','/smartapi/dataset/get-driven-data?','join','/smartapi/permit/role/update','functionName','application/json','/smartapi/lovrabet/update-page','object','/smartapi/db-analysis/status/','max','SQL\x20query\x20not\x20found:\x20','806449MpGEfZ','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','startsWith','/smartapi/custom/getUserCustomSql','json','正在从服务器拉取模型列表...\x20(环境:\x20','/smartapi/ocr/recognize-text?'];a200_0x46a6=function(){return _0x332db8;};return a200_0x46a6();}export async function listAppRoles(_0x555180,_0x535d2a){const _0x274638=a200_0x589f,_0x372ce4=Math[_0x274638(0x150)](Math[_0x274638(0x12b)](_0x535d2a?.['pageSize']??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0x3476fd=await apiRequest(_0x274638(0x118),{'method':_0x274638(0xf7),'body':{'appCode':_0x555180,'currentPage':_0x535d2a?.[_0x274638(0x11c)]??0x1,'pageSize':_0x372ce4}});return{'items':extractList(_0x3476fd[_0x274638(0xd9)]),'paging':extractPaging(_0x3476fd[_0x274638(0xd9)])};}export async function getAppRole(_0x152e26){const _0x4c9b0a=a200_0x589f,_0x4e6290=await apiRequest(_0x4c9b0a(0x94)+buildQuery({'id':_0x152e26}));return _0x4e6290['data'];}export async function createAppRole(_0x484f88){const _0x12b98c=a200_0x589f,_0x138a02=await apiRequest('/smartapi/permit/role/create',{'method':_0x12b98c(0xf7),'body':{'appCode':_0x484f88['appCode'],'roleName':_0x484f88[_0x12b98c(0xc8)],'roleType':_0x12b98c(0x167),..._0x484f88[_0x12b98c(0x16c)]?{'remark':_0x484f88['remark']}:{}}});return _0x138a02[_0x12b98c(0xd9)];}export async function updateAppRole(_0x7ba694){const _0x3e3933=a200_0x589f,_0x549853=await apiRequest(_0x3e3933(0x125),{'method':_0x3e3933(0xf7),'body':{'id':_0x7ba694['id'],'appCode':_0x7ba694[_0x3e3933(0x155)],..._0x7ba694[_0x3e3933(0x179)]?{'roleType':_0x7ba694['roleType']}:{},..._0x7ba694[_0x3e3933(0xc8)]!==undefined?{'roleName':_0x7ba694['roleName']}:{},..._0x7ba694['remark']!==undefined?{'remark':_0x7ba694[_0x3e3933(0x16c)]}:{},..._0x7ba694['permits']?{'permits':_0x7ba694[_0x3e3933(0xb1)]}:{}}});return _0x549853[_0x3e3933(0xd9)];}export async function deleteAppRole(_0x389843){const _0x224a41=a200_0x589f;await apiRequest(_0x224a41(0x16d),{'method':_0x224a41(0xf7),'body':{'id':_0x389843}});}export async function listPermitRoles(_0x1b23d6,_0x2dcb10){const _0x32c22f=a200_0x589f,_0x245e5e=await apiRequest(_0x32c22f(0xca),{'method':_0x32c22f(0xf7),'body':{'appCode':_0x1b23d6,..._0x2dcb10?.[_0x32c22f(0xea)]!==undefined?{'needSelf':_0x2dcb10[_0x32c22f(0xea)]}:{},..._0x2dcb10?.['needPublic']!==undefined?{'needPublic':_0x2dcb10[_0x32c22f(0x9f)]}:{}}});return extractList(_0x245e5e[_0x32c22f(0xd9)]);}export async function getRoleMenuResources(_0xb225aa,_0xfd7fac){const _0x5f12c6=a200_0x589f,_0x1a7dde=await apiRequest(_0x5f12c6(0x166),{'method':_0x5f12c6(0xf7),'body':{'appCode':_0xb225aa,'roleId':_0xfd7fac}});return extractList(_0x1a7dde[_0x5f12c6(0xd9)]);}export async function getRoleApiResources(_0x184fbc,_0x2dd7b0){const _0x3c1759=a200_0x589f,_0x5a19d7=await apiRequest(_0x3c1759(0xf6),{'method':'POST','body':{'appCode':_0x184fbc,'roleId':_0x2dd7b0}});return extractList(_0x5a19d7[_0x3c1759(0xd9)]);}export async function listRoleUsers(_0x3ce1bd){const _0x581113=a200_0x589f,_0x328acc=await apiRequest(_0x581113(0x11b),{'method':'POST','body':{'appCode':_0x3ce1bd}});return extractList(_0x328acc[_0x581113(0xd9)]);}export async function updateRoleUsers(_0x28531a,_0x5c0e47){const _0x3fd41b=a200_0x589f;await apiRequest(_0x3fd41b(0xfb),{'method':'POST','body':{'appCode':_0x28531a,'roleList':_0x5c0e47}});}export async function getPagePermit(_0x162a7f){const _0x4bb264=a200_0x589f,_0x3aaaa9=await apiRequest(_0x4bb264(0xab)+buildQuery({'menuId':_0x162a7f}));return _0x3aaaa9[_0x4bb264(0xd9)];}export async function savePagePermit(_0x1e38ac){const _0x12e0d0=a200_0x589f,_0x4829c4=await apiRequest(_0x12e0d0(0x10c),{'method':'POST','body':_0x1e38ac});return _0x4829c4[_0x12e0d0(0xd9)];}export async function getTenantMembers(_0x486928){const _0x50a93c=a200_0x589f,_0x23ec8b=await apiRequest(_0x50a93c(0x112)+buildQuery({'code':_0x486928})),_0x38899b=_0x23ec8b['data']??{},_0x296b78=Array[_0x50a93c(0xc5)](_0x38899b?.[_0x50a93c(0x15c)])?_0x38899b['userTenantRelationList']:[];return _0x296b78[_0x50a93c(0x10e)](_0x85ad75=>_0x85ad75?.['status']===_0x50a93c(0x92)||_0x85ad75?.['status']===undefined)[_0x50a93c(0xac)](_0x3e65eb=>({'userId':Number(_0x3e65eb['userId']??_0x3e65eb['id']),'username':_0x3e65eb['username'],'nickname':_0x3e65eb[_0x50a93c(0x110)],'status':_0x3e65eb[_0x50a93c(0xf0)],'email':_0x3e65eb[_0x50a93c(0x10b)],'mobile':_0x3e65eb['mobile'],'avatar':_0x3e65eb[_0x50a93c(0xa6)]}))[_0x50a93c(0x10e)](_0x27f56a=>Number[_0x50a93c(0x111)](_0x27f56a[_0x50a93c(0x95)])&&_0x27f56a['userId']>0x0);}
@@ -1 +1 @@
1
- const a199_0x16ce8a=a199_0x26fa;(function(_0x43127c,_0x1c47fb){const _0x1a3ea4=a199_0x26fa,_0x5b7f0e=_0x43127c();while(!![]){try{const _0x489094=-parseInt(_0x1a3ea4(0x1d7))/0x1+-parseInt(_0x1a3ea4(0x1d6))/0x2+parseInt(_0x1a3ea4(0x1e1))/0x3*(parseInt(_0x1a3ea4(0x1dc))/0x4)+-parseInt(_0x1a3ea4(0x1d9))/0x5+parseInt(_0x1a3ea4(0x1d5))/0x6+parseInt(_0x1a3ea4(0x1da))/0x7+parseInt(_0x1a3ea4(0x1df))/0x8;if(_0x489094===_0x1c47fb)break;else _0x5b7f0e['push'](_0x5b7f0e['shift']());}catch(_0x2770fe){_0x5b7f0e['push'](_0x5b7f0e['shift']());}}}(a199_0x57d9,0xc33b0));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a199_0x57d9(){const _0x94253=['bff-trash','bff.lock.json','8725568YlJmSl','bff','21759rSIBXd','795000Kojosa','1166936EdubUJ','24910ewOoyS','.rabetbase','5967550bGSftL','3911369avlJfJ','/bff','452EFqneb'];a199_0x57d9=function(){return _0x94253;};return a199_0x57d9();}function a199_0x26fa(_0x166e37,_0x5eeb2a){_0x166e37=_0x166e37-0x1d5;const _0x57d9b4=a199_0x57d9();let _0x26fa3c=_0x57d9b4[_0x166e37];return _0x26fa3c;}const DOT_DIR=a199_0x16ce8a(0x1d8),LOCK_FILE_NAME=a199_0x16ce8a(0x1de),TRASH_DIR_NAME=a199_0x16ce8a(0x1dd);export function loadBffProjectConfig(_0x47ebdc,_0x1af52f){const _0x565bef=a199_0x16ce8a,_0x2485c6=resolve(_0x1af52f??findProjectRootDirectory()),_0x5b4cad=DOT_DIR+_0x565bef(0x1db),_0xd9cd25=_0x5b4cad+'/'+_0x47ebdc;return{'projectRoot':_0x2485c6,'appCode':_0x47ebdc,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x5b4cad,'scriptsRoot':_0xd9cd25,'scriptsRootDir':resolve(_0x2485c6,DOT_DIR,_0x565bef(0x1e0),_0x47ebdc),'lockFilePath':resolve(_0x2485c6,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x2485c6,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a201_0x176e20=a201_0x166b;(function(_0x40b9fb,_0x466398){const _0x484955=a201_0x166b,_0x55eb36=_0x40b9fb();while(!![]){try{const _0x3f47f4=-parseInt(_0x484955(0x9d))/0x1+-parseInt(_0x484955(0xa2))/0x2*(-parseInt(_0x484955(0x9a))/0x3)+-parseInt(_0x484955(0xa5))/0x4*(parseInt(_0x484955(0xa4))/0x5)+-parseInt(_0x484955(0xa1))/0x6+parseInt(_0x484955(0x9b))/0x7+parseInt(_0x484955(0xa7))/0x8*(-parseInt(_0x484955(0xa0))/0x9)+parseInt(_0x484955(0x9c))/0xa;if(_0x3f47f4===_0x466398)break;else _0x55eb36['push'](_0x55eb36['shift']());}catch(_0x1932bd){_0x55eb36['push'](_0x55eb36['shift']());}}}(a201_0x2e64,0x49d76));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a201_0x166b(_0x674778,_0x1bce51){_0x674778=_0x674778-0x9a;const _0x2e64c0=a201_0x2e64();let _0x166ba8=_0x2e64c0[_0x674778];return _0x166ba8;}const DOT_DIR=a201_0x176e20(0x9f),LOCK_FILE_NAME=a201_0x176e20(0xa3),TRASH_DIR_NAME=a201_0x176e20(0xa6);export function loadBffProjectConfig(_0xe14fd,_0x5c0583){const _0x40facb=a201_0x176e20,_0x5ad0cf=resolve(_0x5c0583??findProjectRootDirectory()),_0x549d1b=DOT_DIR+_0x40facb(0xa8),_0x17a2df=_0x549d1b+'/'+_0xe14fd;return{'projectRoot':_0x5ad0cf,'appCode':_0xe14fd,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x549d1b,'scriptsRoot':_0x17a2df,'scriptsRootDir':resolve(_0x5ad0cf,DOT_DIR,_0x40facb(0x9e),_0xe14fd),'lockFilePath':resolve(_0x5ad0cf,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x5ad0cf,DOT_DIR,TRASH_DIR_NAME)};}function a201_0x2e64(){const _0x5dfd72=['bff-trash','168392fCkQdv','/bff','12GBwOQh','1151220jgVdsD','4643270UtkkWx','137616ZaakfU','bff','.rabetbase','135bFJnyR','2440146NIGHdj','268538EvHtzf','bff.lock.json','185TVyqJE','364fuGdWd'];a201_0x2e64=function(){return _0x5dfd72;};return a201_0x2e64();}