@lovrabet/rabetbase-cli 2.5.5-beta.2 → 2.5.5

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 (363) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/detail.js +1 -1
  77. package/lib/commands/dataset/extend-update.js +1 -1
  78. package/lib/commands/dataset/field-restore.js +1 -1
  79. package/lib/commands/dataset/field-update.js +1 -1
  80. package/lib/commands/dataset/generate.js +1 -1
  81. package/lib/commands/dataset/index.js +1 -1
  82. package/lib/commands/dataset/list.js +1 -1
  83. package/lib/commands/dataset/operations.js +1 -1
  84. package/lib/commands/dataset/relation-audit.js +1 -1
  85. package/lib/commands/dataset/relation-create.js +1 -1
  86. package/lib/commands/dataset/relation-delete.js +1 -1
  87. package/lib/commands/dataset/relation-shared.js +1 -1
  88. package/lib/commands/dataset/relation-update.js +1 -1
  89. package/lib/commands/dataset/relations.js +1 -1
  90. package/lib/commands/dataset/rename.js +1 -1
  91. package/lib/commands/dataset/restore.js +1 -1
  92. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  93. package/lib/commands/db/analysis-batching.js +1 -1
  94. package/lib/commands/db/analyze-batch-plan.js +1 -1
  95. package/lib/commands/db/analyze-cancel.js +1 -1
  96. package/lib/commands/db/analyze-start.js +1 -1
  97. package/lib/commands/db/analyze-status.js +1 -1
  98. package/lib/commands/db/create.js +1 -1
  99. package/lib/commands/db/delete.js +1 -1
  100. package/lib/commands/db/detail.js +1 -1
  101. package/lib/commands/db/diff-refresh-start.js +1 -1
  102. package/lib/commands/db/diff-refresh-status.js +1 -1
  103. package/lib/commands/db/diff.js +1 -1
  104. package/lib/commands/db/index.js +1 -1
  105. package/lib/commands/db/list.js +1 -1
  106. package/lib/commands/db/shared.js +1 -1
  107. package/lib/commands/db/table-diff-shared.js +1 -1
  108. package/lib/commands/db/tables.js +1 -1
  109. package/lib/commands/db/test.js +1 -1
  110. package/lib/commands/db/update.js +1 -1
  111. package/lib/commands/deployment/index.js +1 -1
  112. package/lib/commands/deployment/sync-all.js +1 -1
  113. package/lib/commands/deployment/sync-jobs.js +1 -1
  114. package/lib/commands/deployment/sync-status.js +1 -1
  115. package/lib/commands/doctor.js +1 -1
  116. package/lib/commands/file/index.js +1 -1
  117. package/lib/commands/flow/create.js +1 -1
  118. package/lib/commands/flow/detail.js +1 -1
  119. package/lib/commands/flow/index.js +1 -1
  120. package/lib/commands/flow/list.js +1 -1
  121. package/lib/commands/flow/publish.js +1 -1
  122. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  123. package/lib/commands/flow/runtime-role-list.js +1 -1
  124. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  125. package/lib/commands/flow/runtime-user-search.js +1 -1
  126. package/lib/commands/flow/shared.js +1 -1
  127. package/lib/commands/flow/update.js +1 -1
  128. package/lib/commands/flow/validate.js +1 -1
  129. package/lib/commands/instant-api-policy/current.js +1 -1
  130. package/lib/commands/instant-api-policy/index.js +1 -1
  131. package/lib/commands/instant-api-policy/init.js +1 -1
  132. package/lib/commands/instant-api-policy/publish.js +1 -1
  133. package/lib/commands/instant-api-policy/pull.js +1 -1
  134. package/lib/commands/instant-api-policy/revision.js +1 -1
  135. package/lib/commands/instant-api-policy/revisions.js +1 -1
  136. package/lib/commands/instant-api-policy/rollback.js +1 -1
  137. package/lib/commands/instant-api-policy/shared.js +1 -1
  138. package/lib/commands/instant-api-policy/validate.js +1 -1
  139. package/lib/commands/issue/index.js +1 -1
  140. package/lib/commands/issue/nudge.js +1 -1
  141. package/lib/commands/issue/report.js +1 -1
  142. package/lib/commands/issue/shared.js +1 -1
  143. package/lib/commands/kb/create.js +1 -1
  144. package/lib/commands/kb/delete.js +1 -1
  145. package/lib/commands/kb/detail.js +1 -1
  146. package/lib/commands/kb/index.js +1 -1
  147. package/lib/commands/kb/list.js +1 -1
  148. package/lib/commands/kb/search.js +1 -1
  149. package/lib/commands/kb/shared.js +1 -1
  150. package/lib/commands/kb/update.js +1 -1
  151. package/lib/commands/logs/index.js +1 -1
  152. package/lib/commands/menu/asset-update.js +1 -1
  153. package/lib/commands/menu/delete.js +1 -1
  154. package/lib/commands/menu/external-link-create.js +1 -1
  155. package/lib/commands/menu/external-link-update.js +1 -1
  156. package/lib/commands/menu/group-create.js +1 -1
  157. package/lib/commands/menu/group-update.js +1 -1
  158. package/lib/commands/menu/index.js +1 -1
  159. package/lib/commands/menu/list.js +1 -1
  160. package/lib/commands/menu/move.js +1 -1
  161. package/lib/commands/menu/regroup-start.js +1 -1
  162. package/lib/commands/menu/rename.js +1 -1
  163. package/lib/commands/menu/shared/compare-table.js +1 -1
  164. package/lib/commands/menu/shared/delete-plan.js +1 -1
  165. package/lib/commands/menu/shared/facts.js +1 -1
  166. package/lib/commands/menu/shared/index.js +1 -1
  167. package/lib/commands/menu/shared/inquirer.js +1 -1
  168. package/lib/commands/menu/shared/local-pages.js +1 -1
  169. package/lib/commands/menu/shared/logic.js +1 -1
  170. package/lib/commands/menu/shared/mutations.js +1 -1
  171. package/lib/commands/menu/shared/path.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  174. package/lib/commands/menu/shared/sync-core.js +1 -1
  175. package/lib/commands/menu/shared/update-core.js +1 -1
  176. package/lib/commands/menu/shared/valid-url.js +1 -1
  177. package/lib/commands/menu/subapp-assets-status.js +1 -1
  178. package/lib/commands/menu/subapp-assets-update.js +1 -1
  179. package/lib/commands/menu/sync.js +1 -1
  180. package/lib/commands/menu/visibility-update.js +1 -1
  181. package/lib/commands/notification/config-create.js +1 -1
  182. package/lib/commands/notification/config-delete.js +1 -1
  183. package/lib/commands/notification/config-list.js +1 -1
  184. package/lib/commands/notification/config-update.js +1 -1
  185. package/lib/commands/notification/index.js +1 -1
  186. package/lib/commands/notification/shared.js +1 -1
  187. package/lib/commands/ocr/index.js +1 -1
  188. package/lib/commands/page/create.js +1 -1
  189. package/lib/commands/page/custom/detail.js +1 -1
  190. package/lib/commands/page/custom/list.js +1 -1
  191. package/lib/commands/page/custom/publish.js +1 -1
  192. package/lib/commands/page/custom/shared.js +1 -1
  193. package/lib/commands/page/custom/syntax.js +1 -1
  194. package/lib/commands/page/custom/update.js +1 -1
  195. package/lib/commands/page/data-list-status.js +1 -1
  196. package/lib/commands/page/generate-start.js +1 -1
  197. package/lib/commands/page/generate-status.js +1 -1
  198. package/lib/commands/page/index.js +1 -1
  199. package/lib/commands/page/pull.js +1 -1
  200. package/lib/commands/page/push.js +1 -1
  201. package/lib/commands/page/relation-audit.js +1 -1
  202. package/lib/commands/page/restore.js +1 -1
  203. package/lib/commands/page/shared.js +1 -1
  204. package/lib/commands/page/sync.js +1 -1
  205. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  206. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  207. package/lib/commands/project/create/format-elapsed.js +1 -1
  208. package/lib/commands/project/create/main.js +1 -1
  209. package/lib/commands/project/create/materialize-project-template.js +1 -1
  210. package/lib/commands/project/create/project-name.js +1 -1
  211. package/lib/commands/project/create/project-template-archive.js +1 -1
  212. package/lib/commands/project/create/project-template-path.js +1 -1
  213. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  214. package/lib/commands/project/create/use-format-code.js +1 -1
  215. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  216. package/lib/commands/project/domain-routing-sync.js +1 -1
  217. package/lib/commands/project/index.js +1 -1
  218. package/lib/commands/project/upgrade.js +1 -1
  219. package/lib/commands/registry.js +1 -1
  220. package/lib/commands/role/delete.js +1 -1
  221. package/lib/commands/role/detail.js +1 -1
  222. package/lib/commands/role/index.js +1 -1
  223. package/lib/commands/role/list.js +1 -1
  224. package/lib/commands/role/shared.js +1 -1
  225. package/lib/commands/role/update.js +1 -1
  226. package/lib/commands/role/user-add.js +1 -1
  227. package/lib/commands/role/user-remove.js +1 -1
  228. package/lib/commands/role/user-resolve.js +1 -1
  229. package/lib/commands/rule/get.js +1 -1
  230. package/lib/commands/rule/index.js +1 -1
  231. package/lib/commands/rule/list.js +1 -1
  232. package/lib/commands/rule/set.js +1 -1
  233. package/lib/commands/rule/shared.js +1 -1
  234. package/lib/commands/run/index.js +1 -1
  235. package/lib/commands/schema.js +1 -1
  236. package/lib/commands/sql/create.js +1 -1
  237. package/lib/commands/sql/delete.js +1 -1
  238. package/lib/commands/sql/detail.js +1 -1
  239. package/lib/commands/sql/exec.js +1 -1
  240. package/lib/commands/sql/index.js +1 -1
  241. package/lib/commands/sql/list.js +1 -1
  242. package/lib/commands/sql/pull.js +1 -1
  243. package/lib/commands/sql/push.js +1 -1
  244. package/lib/commands/sql/shared.js +1 -1
  245. package/lib/commands/sql/status.js +1 -1
  246. package/lib/commands/sql/validate.js +1 -1
  247. package/lib/commands/task/index.js +1 -1
  248. package/lib/commands/task/status.js +1 -1
  249. package/lib/commands/tenant/index.js +1 -1
  250. package/lib/commands/tenant/members-list.js +1 -1
  251. package/lib/commands/tenant/shared.js +1 -1
  252. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  253. package/lib/commands/user-account/feishu-bind.js +1 -1
  254. package/lib/commands/user-account/index.js +1 -1
  255. package/lib/commands/workspace/add.js +1 -1
  256. package/lib/commands/workspace/index.js +1 -1
  257. package/lib/commands/workspace/remove.js +1 -1
  258. package/lib/config/domain-config.js +1 -1
  259. package/lib/config/project-domain-routing.js +1 -1
  260. package/lib/config/region-config.js +1 -1
  261. package/lib/config/schema.js +1 -1
  262. package/lib/constant/cdn.js +1 -1
  263. package/lib/constant/cli.js +1 -1
  264. package/lib/constant/defaults.js +1 -1
  265. package/lib/constant/domain.js +1 -1
  266. package/lib/constant/env.js +1 -1
  267. package/lib/constant/output.js +1 -1
  268. package/lib/constant/paths.js +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.js +1 -1
  272. package/lib/context/app-resolver.js +1 -1
  273. package/lib/context/auth-resolver.js +1 -1
  274. package/lib/context/config-loader.js +1 -1
  275. package/lib/context.js +1 -1
  276. package/lib/core/alias-resolver.js +1 -1
  277. package/lib/core/api-client.js +1 -1
  278. package/lib/core/bff/config.js +1 -1
  279. package/lib/core/bff/file-system.js +1 -1
  280. package/lib/core/bff/hash.js +1 -1
  281. package/lib/core/bff/hook-directory.js +1 -1
  282. package/lib/core/bff/lock.js +1 -1
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/cross-db-relation.js +1 -1
  285. package/lib/core/db-resolver.js +1 -1
  286. package/lib/core/flow-config.js +1 -1
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +1 -1
  357. package/skills/rabetbase/SKILL.md +3 -3
  358. package/skills/rabetbase/guides/independent-deployment.md +11 -1
  359. package/skills/rabetbase/references/rabetbase-config.md +16 -19
  360. package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +5 -4
  361. package/skills/rabetbase/references/rabetbase-workspace.md +3 -1
  362. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  363. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a288_0x2c127d=a288_0x1490;(function(_0x544222,_0xdb8b1b){const _0x5e0c4b=a288_0x1490,_0x57f591=_0x544222();while(!![]){try{const _0x3b6b0f=-parseInt(_0x5e0c4b(0x116))/0x1*(-parseInt(_0x5e0c4b(0x100))/0x2)+parseInt(_0x5e0c4b(0x106))/0x3*(-parseInt(_0x5e0c4b(0xf9))/0x4)+parseInt(_0x5e0c4b(0x115))/0x5*(-parseInt(_0x5e0c4b(0x121))/0x6)+parseInt(_0x5e0c4b(0x113))/0x7+parseInt(_0x5e0c4b(0x10e))/0x8*(parseInt(_0x5e0c4b(0x129))/0x9)+parseInt(_0x5e0c4b(0x10f))/0xa+-parseInt(_0x5e0c4b(0x109))/0xb;if(_0x3b6b0f===_0xdb8b1b)break;else _0x57f591['push'](_0x57f591['shift']());}catch(_0x116d79){_0x57f591['push'](_0x57f591['shift']());}}}(a288_0x252f,0x899d4));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';function a288_0x1490(_0x4ac9d7,_0x496493){_0x4ac9d7=_0x4ac9d7-0xf7;const _0x252f80=a288_0x252f();let _0x149049=_0x252f80[_0x4ac9d7];return _0x149049;}import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a288_0x2c127d(0x119);export const INSTANT_API_POLICY_FILE_NAME='policy.json';export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x3cb261,_0x534518,_0xe62fe8){return new CliError(_0x3cb261,0x1,_0x534518,_0xe62fe8);}function a288_0x252f(){const _0x12ecf5=['policyRoot','3865OsfZhI','356VjEfsK','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','trim','.rabetbase/instant-api-policy','Review\x20the\x20file\x20before\x20retrying.','utf-8','instant_api_policy_file_missing','parse','instant_api_policy_version_invalid','instant_api_policy_file_unwritable','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','2418DOdwaY','appCode','force','instant_api_policy_file_invalid','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','overwritten','instant_api_policy_file_too_large','allow','285273mhRKzj','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','instant_api_policy_defaults_invalid','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','object','created','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','size','policyFilePath','instant_api_policy_file_unreadable','unchanged','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','instant_api_policy_file_exists','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','1862516KfLbrQ','isArray','EEXIST','isFile','version','stringify','code','4026UNIxCE','instant_api_policy_app_code_mismatch','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','defaults','ENOENT','instantApi','3nGwvTV','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','18566218DbvtaJ','Policy\x20defaults.instantApi\x20is\x20required.','rules','includes','instant_api_policy_json_invalid','168YGuZFo','10867290mrVfeM','utf8','length','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','3917620WfQTpM'];a288_0x252f=function(){return _0x12ecf5;};return a288_0x252f();}export function loadInstantApiPolicyLocalConfig(_0x1be92f,_0x14ae38){assertSafeAppCode(_0x1be92f);const _0x514545=resolve(_0x14ae38??findProjectRootDirectory()),_0x48e145=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x1be92f+'/'+INSTANT_API_POLICY_FILE_NAME,_0x40b5de=resolve(_0x514545,INSTANT_API_POLICY_RELATIVE_ROOT,_0x1be92f),_0x3f3214=resolve(_0x40b5de,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x514545,'appCode':_0x1be92f,'policyRoot':_0x40b5de,'policyFilePath':_0x3f3214,'policyRelativePath':_0x48e145};}export function createDefaultInstantApiPolicyConfig(_0x6ba7cc,_0x12f685=a288_0x2c127d(0x128)){return assertSafeAppCode(_0x6ba7cc),{'version':'2','appCode':_0x6ba7cc,'defaults':{'instantApi':_0x12f685},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x492adb){const _0x2f5555=a288_0x2c127d;let _0x251d50;try{_0x251d50=await stat(_0x492adb[_0x2f5555(0x136)]);}catch(_0x5584f6){throw instantApiPolicyError(_0x2f5555(0x11c),_0x2f5555(0x131)+_0x492adb[_0x2f5555(0x136)],_0x2f5555(0x130));}if(!_0x251d50[_0x2f5555(0xfc)]())throw instantApiPolicyError(_0x2f5555(0x124),_0x2f5555(0x12c)+_0x492adb[_0x2f5555(0x136)]);if(_0x251d50[_0x2f5555(0x135)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x2f5555(0x107));let _0x9912ae;try{_0x9912ae=await readFile(_0x492adb[_0x2f5555(0x136)]);}catch{throw instantApiPolicyError(_0x2f5555(0x137),_0x2f5555(0x102)+_0x492adb[_0x2f5555(0x136)]);}if(_0x9912ae['byteLength']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');let _0x460761;try{_0x460761=new TextDecoder(_0x2f5555(0x11b),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x9912ae);}catch{throw instantApiPolicyError(_0x2f5555(0x124),_0x2f5555(0x108)+_0x492adb[_0x2f5555(0x136)]);}let _0x35f21e;try{_0x35f21e=JSON[_0x2f5555(0x11d)](_0x460761);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid',_0x2f5555(0x12f)+_0x492adb[_0x2f5555(0x136)]);}return assertLocalPolicyContract(_0x35f21e,_0x492adb[_0x2f5555(0x122)]);}export async function writeInstantApiPolicyConfigFile(_0x343601,_0x2ee0fa,_0x452c9b={}){const _0x14d3a5=a288_0x2c127d,_0x238c7d=assertLocalPolicyContract(_0x2ee0fa,_0x343601['appCode']),_0x3b3ea6=JSON[_0x14d3a5(0xfe)](_0x238c7d,null,0x2)+'\x0a';if(Buffer['byteLength'](_0x3b3ea6,_0x14d3a5(0x110))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x14d3a5(0x127),_0x14d3a5(0x107));await mkdir(_0x343601[_0x14d3a5(0x114)],{'recursive':!![]});let _0x3d481e;try{_0x3d481e=await readFile(_0x343601[_0x14d3a5(0x136)],_0x14d3a5(0x110));}catch(_0x34e659){if(!isMissingFile(_0x34e659))throw instantApiPolicyError(_0x14d3a5(0x137),_0x14d3a5(0x12e)+_0x343601[_0x14d3a5(0x136)]);}if(_0x3d481e===_0x3b3ea6)return{'action':_0x14d3a5(0x138),'filePath':_0x343601[_0x14d3a5(0x136)]};if(_0x3d481e!==undefined&&!_0x452c9b['force'])throw instantApiPolicyError(_0x14d3a5(0x13a),_0x14d3a5(0x117)+_0x343601[_0x14d3a5(0x136)],_0x14d3a5(0xf7));if(_0x3d481e===undefined)try{return await writeFile(_0x343601[_0x14d3a5(0x136)],_0x3b3ea6,{'encoding':'utf8','flag':'wx'}),{'action':_0x14d3a5(0x133),'filePath':_0x343601[_0x14d3a5(0x136)]};}catch(_0x481f2c){if(!isAlreadyExists(_0x481f2c))throw instantApiPolicyError('instant_api_policy_file_unwritable',_0x14d3a5(0xf8)+_0x343601[_0x14d3a5(0x136)]);if(!_0x452c9b[_0x14d3a5(0x123)])throw instantApiPolicyError(_0x14d3a5(0x13a),_0x14d3a5(0x134)+_0x343601[_0x14d3a5(0x136)],_0x14d3a5(0x11a));}const _0x2e92a9=resolve(dirname(_0x343601[_0x14d3a5(0x136)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+'.tmp');try{await writeFile(_0x2e92a9,_0x3b3ea6,{'encoding':_0x14d3a5(0x110),'flag':'wx'}),await rename(_0x2e92a9,_0x343601['policyFilePath']);}catch{await unlink(_0x2e92a9)['catch'](()=>undefined);throw instantApiPolicyError(_0x14d3a5(0x11f),_0x14d3a5(0x120)+_0x343601[_0x14d3a5(0x136)]);}return{'action':_0x14d3a5(0x126),'filePath':_0x343601['policyFilePath']};}function assertSafeAppCode(_0x57a73f){const _0x44fee9=a288_0x2c127d,_0x166eab=_0x57a73f[_0x44fee9(0x118)]();if(!_0x166eab||_0x166eab!==_0x57a73f||_0x166eab[_0x44fee9(0x111)]>0x64||_0x166eab==='.'||_0x166eab==='..'||_0x166eab[_0x44fee9(0x10c)]('/')||_0x166eab[_0x44fee9(0x10c)]('\x5c')||_0x166eab['includes']('\x00'))throw instantApiPolicyError('instant_api_policy_app_code_invalid','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.');}function assertLocalPolicyContract(_0x16f0bf,_0x1e19fa){const _0x527f91=a288_0x2c127d;if(!isObject(_0x16f0bf))throw instantApiPolicyError(_0x527f91(0x10d),_0x527f91(0x125));if(_0x16f0bf[_0x527f91(0xfd)]!=='1'&&_0x16f0bf[_0x527f91(0xfd)]!=='2')throw instantApiPolicyError(_0x527f91(0x11e),_0x527f91(0x12a),_0x527f91(0x112));if(_0x16f0bf[_0x527f91(0x122)]!==_0x1e19fa)throw instantApiPolicyError(_0x527f91(0x101),_0x527f91(0x139)+_0x1e19fa+'.');if(!isObject(_0x16f0bf['defaults'])||typeof _0x16f0bf[_0x527f91(0x103)][_0x527f91(0x105)]!=='string')throw instantApiPolicyError(_0x527f91(0x12b),_0x527f91(0x10a));if(_0x16f0bf[_0x527f91(0x10b)]!==undefined&&_0x16f0bf[_0x527f91(0x10b)]!==null&&!Array[_0x527f91(0xfa)](_0x16f0bf[_0x527f91(0x10b)]))throw instantApiPolicyError('instant_api_policy_rules_invalid',_0x527f91(0x12d));return _0x16f0bf;}function isObject(_0x50eb96){const _0x4c7c88=a288_0x2c127d;return _0x50eb96!==null&&typeof _0x50eb96===_0x4c7c88(0x132)&&!Array[_0x4c7c88(0xfa)](_0x50eb96);}function isMissingFile(_0x3720cb){const _0x2cc830=a288_0x2c127d;return Boolean(_0x3720cb&&typeof _0x3720cb===_0x2cc830(0x132)&&_0x3720cb[_0x2cc830(0xff)]===_0x2cc830(0x104));}function isAlreadyExists(_0x408368){const _0x33f060=a288_0x2c127d;return Boolean(_0x408368&&typeof _0x408368===_0x33f060(0x132)&&_0x408368[_0x33f060(0xff)]===_0x33f060(0xfb));}
1
+ const a288_0x109450=a288_0x448c;(function(_0x18db23,_0x188a22){const _0x158e1f=a288_0x448c,_0x3ed5f6=_0x18db23();while(!![]){try{const _0x13c3cf=parseInt(_0x158e1f(0x200))/0x1+-parseInt(_0x158e1f(0x1d5))/0x2*(-parseInt(_0x158e1f(0x212))/0x3)+-parseInt(_0x158e1f(0x20f))/0x4*(parseInt(_0x158e1f(0x1ea))/0x5)+parseInt(_0x158e1f(0x1f2))/0x6*(-parseInt(_0x158e1f(0x1df))/0x7)+-parseInt(_0x158e1f(0x1d7))/0x8*(parseInt(_0x158e1f(0x1dc))/0x9)+parseInt(_0x158e1f(0x1e6))/0xa+parseInt(_0x158e1f(0x1e0))/0xb;if(_0x13c3cf===_0x188a22)break;else _0x3ed5f6['push'](_0x3ed5f6['shift']());}catch(_0xb31275){_0x3ed5f6['push'](_0x3ed5f6['shift']());}}}(a288_0x3ee4,0x2b433));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a288_0x109450(0x204);export const INSTANT_API_POLICY_FILE_NAME=a288_0x109450(0x20c);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x10301b,_0xdbbaab,_0x3ec255){return new CliError(_0x10301b,0x1,_0xdbbaab,_0x3ec255);}export function loadInstantApiPolicyLocalConfig(_0x241cc0,_0x271053){assertSafeAppCode(_0x241cc0);const _0x6267e0=resolve(_0x271053??findProjectRootDirectory()),_0x15c6aa=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x241cc0+'/'+INSTANT_API_POLICY_FILE_NAME,_0xb7a23b=resolve(_0x6267e0,INSTANT_API_POLICY_RELATIVE_ROOT,_0x241cc0),_0x161c11=resolve(_0xb7a23b,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x6267e0,'appCode':_0x241cc0,'policyRoot':_0xb7a23b,'policyFilePath':_0x161c11,'policyRelativePath':_0x15c6aa};}export function createDefaultInstantApiPolicyConfig(_0x6b1d3a,_0x464c01='allow'){return assertSafeAppCode(_0x6b1d3a),{'version':'2','appCode':_0x6b1d3a,'defaults':{'instantApi':_0x464c01},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x439315){const _0x34fd61=a288_0x109450;let _0x3531f8;try{_0x3531f8=await stat(_0x439315[_0x34fd61(0x20d)]);}catch(_0x568523){throw instantApiPolicyError(_0x34fd61(0x1e5),'Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'+_0x439315[_0x34fd61(0x20d)],_0x34fd61(0x1d6));}if(!_0x3531f8[_0x34fd61(0x1fd)]())throw instantApiPolicyError('instant_api_policy_file_invalid',_0x34fd61(0x1e3)+_0x439315[_0x34fd61(0x20d)]);if(_0x3531f8[_0x34fd61(0x213)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x34fd61(0x1da),_0x34fd61(0x1d2));let _0x310f04;try{_0x310f04=await readFile(_0x439315[_0x34fd61(0x20d)]);}catch{throw instantApiPolicyError(_0x34fd61(0x1e2),_0x34fd61(0x1ec)+_0x439315[_0x34fd61(0x20d)]);}if(_0x310f04[_0x34fd61(0x211)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x34fd61(0x1da),_0x34fd61(0x1d2));let _0x566759;try{_0x566759=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x34fd61(0x1ed)](_0x310f04);}catch{throw instantApiPolicyError('instant_api_policy_file_invalid',_0x34fd61(0x1e9)+_0x439315['policyFilePath']);}let _0x16a46f;try{_0x16a46f=JSON[_0x34fd61(0x1de)](_0x566759);}catch{throw instantApiPolicyError(_0x34fd61(0x1eb),_0x34fd61(0x1f9)+_0x439315[_0x34fd61(0x20d)]);}return assertLocalPolicyContract(_0x16a46f,_0x439315['appCode']);}function a288_0x448c(_0x4be3d4,_0x220a94){_0x4be3d4=_0x4be3d4-0x1d2;const _0x3ee489=a288_0x3ee4();let _0x448c67=_0x3ee489[_0x4be3d4];return _0x448c67;}export async function writeInstantApiPolicyConfigFile(_0x7141da,_0x20a23b,_0x420f76={}){const _0x50b662=a288_0x109450,_0x3d7d49=assertLocalPolicyContract(_0x20a23b,_0x7141da[_0x50b662(0x1f4)]),_0x3e09f2=JSON[_0x50b662(0x1fc)](_0x3d7d49,null,0x2)+'\x0a';if(Buffer[_0x50b662(0x211)](_0x3e09f2,_0x50b662(0x1fe))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x50b662(0x1da),_0x50b662(0x1d2));await mkdir(_0x7141da[_0x50b662(0x1e1)],{'recursive':!![]});let _0x556412;try{_0x556412=await readFile(_0x7141da[_0x50b662(0x20d)],'utf8');}catch(_0x571d34){if(!isMissingFile(_0x571d34))throw instantApiPolicyError(_0x50b662(0x1e2),'Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20'+_0x7141da[_0x50b662(0x20d)]);}if(_0x556412===_0x3e09f2)return{'action':_0x50b662(0x1dd),'filePath':_0x7141da[_0x50b662(0x20d)]};if(_0x556412!==undefined&&!_0x420f76[_0x50b662(0x1f8)])throw instantApiPolicyError(_0x50b662(0x1f6),_0x50b662(0x209)+_0x7141da[_0x50b662(0x20d)],_0x50b662(0x1d9));if(_0x556412===undefined)try{return await writeFile(_0x7141da[_0x50b662(0x20d)],_0x3e09f2,{'encoding':_0x50b662(0x1fe),'flag':'wx'}),{'action':_0x50b662(0x1db),'filePath':_0x7141da[_0x50b662(0x20d)]};}catch(_0xddbdef){if(!isAlreadyExists(_0xddbdef))throw instantApiPolicyError(_0x50b662(0x1d8),'Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20'+_0x7141da[_0x50b662(0x20d)]);if(!_0x420f76[_0x50b662(0x1f8)])throw instantApiPolicyError(_0x50b662(0x1f6),'Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20'+_0x7141da[_0x50b662(0x20d)],_0x50b662(0x1f1));}const _0x554b59=resolve(dirname(_0x7141da[_0x50b662(0x20d)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x50b662(0x20b)]+'.'+randomUUID()+_0x50b662(0x1ff));try{await writeFile(_0x554b59,_0x3e09f2,{'encoding':_0x50b662(0x1fe),'flag':'wx'}),await rename(_0x554b59,_0x7141da[_0x50b662(0x20d)]);}catch{await unlink(_0x554b59)[_0x50b662(0x202)](()=>undefined);throw instantApiPolicyError(_0x50b662(0x1d8),_0x50b662(0x1ef)+_0x7141da['policyFilePath']);}return{'action':_0x50b662(0x1d4),'filePath':_0x7141da['policyFilePath']};}function assertSafeAppCode(_0x38c64f){const _0x6a4125=a288_0x109450,_0x5b1673=_0x38c64f[_0x6a4125(0x1f3)]();if(!_0x5b1673||_0x5b1673!==_0x38c64f||_0x5b1673[_0x6a4125(0x203)]>0x64||_0x5b1673==='.'||_0x5b1673==='..'||_0x5b1673[_0x6a4125(0x1fb)]('/')||_0x5b1673[_0x6a4125(0x1fb)]('\x5c')||_0x5b1673[_0x6a4125(0x1fb)]('\x00'))throw instantApiPolicyError(_0x6a4125(0x201),_0x6a4125(0x210));}function assertLocalPolicyContract(_0x274451,_0x4e58c7){const _0x22cac1=a288_0x109450;if(!isObject(_0x274451))throw instantApiPolicyError(_0x22cac1(0x1eb),_0x22cac1(0x1f5));if(_0x274451[_0x22cac1(0x20a)]!=='1'&&_0x274451[_0x22cac1(0x20a)]!=='2')throw instantApiPolicyError(_0x22cac1(0x1e4),_0x22cac1(0x1fa),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x274451['appCode']!==_0x4e58c7)throw instantApiPolicyError(_0x22cac1(0x1d3),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x4e58c7+'.');if(!isObject(_0x274451[_0x22cac1(0x1f0)])||typeof _0x274451[_0x22cac1(0x1f0)][_0x22cac1(0x205)]!==_0x22cac1(0x1e7))throw instantApiPolicyError(_0x22cac1(0x214),_0x22cac1(0x1e8));if(_0x274451[_0x22cac1(0x206)]!==undefined&&_0x274451[_0x22cac1(0x206)]!==null&&!Array[_0x22cac1(0x208)](_0x274451[_0x22cac1(0x206)]))throw instantApiPolicyError(_0x22cac1(0x207),'Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x274451;}function isObject(_0x35269c){const _0x52e329=a288_0x109450;return _0x35269c!==null&&typeof _0x35269c==='object'&&!Array[_0x52e329(0x208)](_0x35269c);}function isMissingFile(_0x5780ca){const _0x2ec47d=a288_0x109450;return Boolean(_0x5780ca&&typeof _0x5780ca===_0x2ec47d(0x1f7)&&_0x5780ca[_0x2ec47d(0x1ee)]===_0x2ec47d(0x20e));}function isAlreadyExists(_0x3b0eb6){const _0x1d6c88=a288_0x109450;return Boolean(_0x3b0eb6&&typeof _0x3b0eb6===_0x1d6c88(0x1f7)&&_0x3b0eb6[_0x1d6c88(0x1ee)]==='EEXIST');}function a288_0x3ee4(){const _0x3fc1ef=['appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','byteLength','10407VxfkuV','size','instant_api_policy_defaults_invalid','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','instant_api_policy_app_code_mismatch','overwritten','12YbLWNq','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','2617456oJCvbK','instant_api_policy_file_unwritable','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','instant_api_policy_file_too_large','created','9WMtSuf','unchanged','parse','7ZLImCo','6662788YfzugF','policyRoot','instant_api_policy_file_unreadable','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','instant_api_policy_version_invalid','instant_api_policy_file_missing','2308230OGRoAt','string','Policy\x20defaults.instantApi\x20is\x20required.','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','12470EwUxVp','instant_api_policy_json_invalid','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','decode','code','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','defaults','Review\x20the\x20file\x20before\x20retrying.','1550370PKYaje','trim','appCode','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','instant_api_policy_file_exists','object','force','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','includes','stringify','isFile','utf8','.tmp','207OYSUPF','instant_api_policy_app_code_invalid','catch','length','.rabetbase/instant-api-policy','instantApi','rules','instant_api_policy_rules_invalid','isArray','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','version','pid','policy.json','policyFilePath','ENOENT','152gRqdPP'];a288_0x3ee4=function(){return _0x3fc1ef;};return a288_0x3ee4();}
@@ -1 +1 @@
1
- const a289_0x1ac01b=a289_0x470b;(function(_0x155e97,_0x9c50a0){const _0x5d7f0e=a289_0x470b,_0x23419b=_0x155e97();while(!![]){try{const _0x2004cf=-parseInt(_0x5d7f0e(0x1e2))/0x1*(-parseInt(_0x5d7f0e(0x1de))/0x2)+-parseInt(_0x5d7f0e(0x19d))/0x3*(-parseInt(_0x5d7f0e(0x1c7))/0x4)+parseInt(_0x5d7f0e(0x1b2))/0x5+-parseInt(_0x5d7f0e(0x19e))/0x6+parseInt(_0x5d7f0e(0x1d1))/0x7+-parseInt(_0x5d7f0e(0x1df))/0x8+parseInt(_0x5d7f0e(0x1a4))/0x9*(-parseInt(_0x5d7f0e(0x1ab))/0xa);if(_0x2004cf===_0x9c50a0)break;else _0x23419b['push'](_0x23419b['shift']());}catch(_0x468d6e){_0x23419b['push'](_0x23419b['shift']());}}}(a289_0x209a,0x93e01));import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a289_0x1ac01b(0x1b0),a289_0x1ac01b(0x1d5),a289_0x1ac01b(0x1ad),a289_0x1ac01b(0x1d2),a289_0x1ac01b(0x197),a289_0x1ac01b(0x1b9)],HIT_KEYS=[a289_0x1ac01b(0x1c6),a289_0x1ac01b(0x1bf),a289_0x1ac01b(0x1e0),a289_0x1ac01b(0x198),a289_0x1ac01b(0x1a0),a289_0x1ac01b(0x1a8),'tags',a289_0x1ac01b(0x199),a289_0x1ac01b(0x1e7),a289_0x1ac01b(0x1c1),a289_0x1ac01b(0x1a1)];export function normalizeKbServiceOrigin(_0x310127){const _0x398a23=a289_0x1ac01b,_0x57b1fe=()=>CliErrors[_0x398a23(0x1bc)]('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.'),_0x2361d6=_0x310127?.['trim']();if(!_0x2361d6||/[\u0000-\u0020\u007f]/[_0x398a23(0x1ae)](_0x2361d6)||!/^https:\/\/[^/?#@\\]+\/?$/i['test'](_0x2361d6))throw _0x57b1fe();let _0x548519;try{_0x548519=new URL(_0x2361d6);}catch{throw _0x57b1fe();}if(_0x548519[_0x398a23(0x1c4)]!==_0x398a23(0x1da)||!_0x548519['hostname']||_0x548519[_0x398a23(0x1a7)]||_0x548519[_0x398a23(0x19f)]||_0x548519[_0x398a23(0x1bd)]!=='/'||_0x548519['search']||_0x548519[_0x398a23(0x1af)])throw _0x57b1fe();return _0x548519[_0x398a23(0x1dd)];}function a289_0x470b(_0x55e773,_0xbe1f31){_0x55e773=_0x55e773-0x193;const _0x209ac4=a289_0x209a();let _0x470bcd=_0x209ac4[_0x55e773];return _0x470bcd;}export async function searchDirectKnowledge(_0xb90f7a){const _0x33b42d=a289_0x1ac01b,_0x11382a=_0xb90f7a[_0x33b42d(0x1d9)][_0x33b42d(0x1ac)](),_0x549750=_0xb90f7a[_0x33b42d(0x19b)][_0x33b42d(0x1ac)]();if(!_0x11382a)throw CliErrors[_0x33b42d(0x1bc)]('Knowledge\x20search\x20appCode\x20is\x20required.');if(!_0xb90f7a[_0x33b42d(0x1c3)][_0x33b42d(0x1ac)]())throw CliErrors[_0x33b42d(0x1e9)]();if(!_0x549750)throw CliErrors[_0x33b42d(0x1bc)]('Knowledge\x20search\x20query\x20is\x20required.');validateTopK(_0xb90f7a['topK']);const _0x116b9d=normalizeKbServiceOrigin(_0xb90f7a[_0x33b42d(0x1ca)]),_0xbe211=AbortSignal['timeout'](0xea60),_0x32a556=_0xb90f7a[_0x33b42d(0x1e4)]?AbortSignal[_0x33b42d(0x19c)]([_0xb90f7a['signal'],_0xbe211]):_0xbe211;let _0x165624;try{_0x165624=await fetch(_0x116b9d+_0x33b42d(0x1cd)+encodeURIComponent(_0x11382a)+_0x33b42d(0x195),{'method':_0x33b42d(0x1d4),'redirect':_0x33b42d(0x1c5),'headers':{'Content-Type':'application/json','Cookie':_0xb90f7a['cookie'],'X-Invoke-Source':_0x33b42d(0x1b4)},'body':JSON['stringify']({'query':_0x549750,..._0xb90f7a[_0x33b42d(0x1b1)]!==undefined?{'topK':_0xb90f7a[_0x33b42d(0x1b1)]}:{}}),'signal':_0x32a556});}catch(_0x2d2005){if(_0xb90f7a['signal']?.[_0x33b42d(0x19a)])throw new DOMException(_0x33b42d(0x196),_0x33b42d(0x1b3));if(_0x2d2005 instanceof Error&&_0x2d2005[_0x33b42d(0x1d0)]===_0x33b42d(0x1c9))throw CliErrors['networkError'](_0x33b42d(0x1aa));throw CliErrors[_0x33b42d(0x1e8)](_0x33b42d(0x1dc));}if(_0x165624['status']===0x191)throw CliErrors['authRequired']();if(_0x165624[_0x33b42d(0x1c2)]===0x1ad)throw CliErrors[_0x33b42d(0x1cb)](_0x33b42d(0x1e3));if(!_0x165624['ok'])throw CliErrors[_0x33b42d(0x1cb)](_0x33b42d(0x1ce)+_0x165624[_0x33b42d(0x1c2)]+').');if(!hasNoStore(_0x165624[_0x33b42d(0x1bb)]))throw CliErrors[_0x33b42d(0x1cb)]('KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(!(_0x165624[_0x33b42d(0x1bb)][_0x33b42d(0x193)]('content-type')??'')[_0x33b42d(0x1b6)]()[_0x33b42d(0x1b8)](_0x33b42d(0x1a5)))throw CliErrors[_0x33b42d(0x1cb)](_0x33b42d(0x1cf));let _0x4aaa22;try{_0x4aaa22=await _0x165624[_0x33b42d(0x1a6)]();}catch(_0x5e958c){if(_0xb90f7a[_0x33b42d(0x1e4)]?.[_0x33b42d(0x19a)])throw new DOMException('Knowledge\x20search\x20cancelled.',_0x33b42d(0x1b3));if(_0xbe211[_0x33b42d(0x19a)]||_0x5e958c instanceof Error&&_0x5e958c[_0x33b42d(0x1d0)]===_0x33b42d(0x1c9))throw CliErrors[_0x33b42d(0x1e8)](_0x33b42d(0x1aa));throw CliErrors[_0x33b42d(0x1cb)](_0x33b42d(0x1b5));}try{const _0x538d40=requireExactRecord(_0x4aaa22,[_0x33b42d(0x1d2),_0x33b42d(0x197),_0x33b42d(0x1b9)],_0x33b42d(0x1e6));if(!Array['isArray'](_0x538d40[_0x33b42d(0x1d2)]))throw invalidContract(_0x33b42d(0x1d2));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x33b42d(0x1c8),'total':_0x538d40[_0x33b42d(0x1d2)][_0x33b42d(0x1be)],'hits':_0x538d40[_0x33b42d(0x1d2)],'strategyFingerprint':_0x538d40[_0x33b42d(0x197)],'timingsMs':_0x538d40[_0x33b42d(0x1b9)]},_0xb90f7a[_0x33b42d(0x1b1)]??0xa);}catch(_0x5bceed){if(_0x5bceed instanceof CliError)throw CliErrors['apiError']('KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.');throw _0x5bceed;}}function validateTopK(_0x4ac2e1){const _0x413b3f=a289_0x1ac01b;if(_0x4ac2e1!==undefined&&(!Number[_0x413b3f(0x194)](_0x4ac2e1)||_0x4ac2e1<0x1||_0x4ac2e1>0x32))throw CliErrors[_0x413b3f(0x1bc)]('Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.');}function hasNoStore(_0x28d9d5){const _0x4e7219=a289_0x1ac01b;return(_0x28d9d5[_0x4e7219(0x193)](_0x4e7219(0x1a9))??'')['split'](',')['some'](_0x36514d=>_0x36514d[_0x4e7219(0x1ac)]()['toLowerCase']()===_0x4e7219(0x1d3));}function parseDevelopmentSearchResponse(_0x5b30aa,_0x1bbe41){const _0x2a269e=a289_0x1ac01b,_0x2352b5=requireExactRecord(_0x5b30aa,RESPONSE_KEYS,_0x2a269e(0x1e6));if(_0x2352b5['schemaVersion']!==0x2||_0x2352b5[_0x2a269e(0x1d5)]!==_0x2a269e(0x1c8))throw invalidContract(_0x2a269e(0x1d5));if(!Array[_0x2a269e(0x1b7)](_0x2352b5[_0x2a269e(0x1d2)])||_0x2352b5[_0x2a269e(0x1d2)][_0x2a269e(0x1be)]>(_0x1bbe41??0x32))throw invalidContract(_0x2a269e(0x1d2));if(typeof _0x2352b5[_0x2a269e(0x197)]!=='string'||!/^sha256:[0-9a-f]{64}$/[_0x2a269e(0x1ae)](_0x2352b5[_0x2a269e(0x197)]))throw invalidContract(_0x2a269e(0x197));const _0x200415=requireRecord(_0x2352b5[_0x2a269e(0x1b9)],'timingsMs'),_0x424abe={};for(const [_0x16c4f3,_0x1603a1]of Object[_0x2a269e(0x1d7)](_0x200415)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x2a269e(0x1ae)](_0x16c4f3)||typeof _0x1603a1!=='number'||!Number[_0x2a269e(0x1ba)](_0x1603a1)||_0x1603a1<0x0)throw invalidContract(_0x2a269e(0x1b9));_0x424abe[_0x16c4f3]=_0x1603a1;}const _0xa88997=_0x2352b5['hits'][_0x2a269e(0x1a2)]((_0x541d4d,_0x194d57)=>parseHit(_0x541d4d,_0x194d57));if(!Number['isSafeInteger'](_0x2352b5[_0x2a269e(0x1ad)])||_0x2352b5[_0x2a269e(0x1ad)]!==_0xa88997[_0x2a269e(0x1be)])throw invalidContract(_0x2a269e(0x1ad));return{'schemaVersion':_0x2352b5[_0x2a269e(0x1b0)],'profile':_0x2352b5[_0x2a269e(0x1d5)],'total':_0x2352b5[_0x2a269e(0x1ad)],'strategyFingerprint':_0x2352b5[_0x2a269e(0x197)],'timingsMs':_0x424abe,'hits':_0xa88997};}function parseHit(_0x59b983,_0x3a3e5f){const _0x3c9dfa=a289_0x1ac01b,_0x4146c3=requireExactRecord(_0x59b983,HIT_KEYS,'hits['+_0x3a3e5f+']'),_0x26cc57=_0x3ec9cd=>{const _0x30781c=_0x4146c3[_0x3ec9cd];if(typeof _0x30781c!=='string'||!_0x30781c)throw invalidContract(_0x3ec9cd);return _0x30781c;};if(!Number[_0x3c9dfa(0x194)](_0x4146c3[_0x3c9dfa(0x1bf)])||_0x4146c3[_0x3c9dfa(0x1bf)]<0x1)throw invalidContract(_0x3c9dfa(0x1bf));if(_0x4146c3[_0x3c9dfa(0x198)]!==_0x3c9dfa(0x1e5)&&_0x4146c3['scope']!=='company')throw invalidContract('scope');if(typeof _0x4146c3[_0x3c9dfa(0x1a0)]!==_0x3c9dfa(0x1d6)||typeof _0x4146c3[_0x3c9dfa(0x1a8)]!=='string')throw invalidContract('text');if(!Array[_0x3c9dfa(0x1b7)](_0x4146c3[_0x3c9dfa(0x1ea)])||_0x4146c3[_0x3c9dfa(0x1ea)]['some'](_0x18b554=>typeof _0x18b554!=='string'))throw invalidContract(_0x3c9dfa(0x1ea));if(!Number[_0x3c9dfa(0x194)](_0x4146c3['rank'])||_0x4146c3[_0x3c9dfa(0x199)]!==_0x3a3e5f+0x1)throw invalidContract(_0x3c9dfa(0x199));if(!isFiniteNumber(_0x4146c3[_0x3c9dfa(0x1e7)])||!isFiniteNumber(_0x4146c3[_0x3c9dfa(0x1c1)]))throw invalidContract('score');return{'documentId':_0x26cc57(_0x3c9dfa(0x1c6)),'revision':_0x4146c3[_0x3c9dfa(0x1bf)],'chunkId':_0x26cc57(_0x3c9dfa(0x1e0)),'scope':_0x4146c3[_0x3c9dfa(0x198)],'title':_0x4146c3['title'],'text':_0x4146c3[_0x3c9dfa(0x1a8)],'tags':[..._0x4146c3[_0x3c9dfa(0x1ea)]],'rank':_0x4146c3[_0x3c9dfa(0x199)],'rawScore':_0x4146c3[_0x3c9dfa(0x1e7)],'finalScore':_0x4146c3[_0x3c9dfa(0x1c1)],'scoreKind':_0x26cc57(_0x3c9dfa(0x1a1))};}function requireExactRecord(_0x23e6c6,_0x5bd4a0,_0x4d78a3){const _0x3145ae=a289_0x1ac01b,_0x40c2c2=requireRecord(_0x23e6c6,_0x4d78a3),_0x3dc715=Object['keys'](_0x40c2c2)[_0x3145ae(0x1db)](),_0x48a5a8=[..._0x5bd4a0][_0x3145ae(0x1db)]();if(_0x3dc715[_0x3145ae(0x1be)]!==_0x48a5a8[_0x3145ae(0x1be)]||_0x3dc715[_0x3145ae(0x1e1)]((_0x1262b7,_0x2fae0b)=>_0x1262b7!==_0x48a5a8[_0x2fae0b]))throw invalidContract(_0x4d78a3);return _0x40c2c2;}function a289_0x209a(){const _0x5c438e=['chunkId','some','15797ScszvI','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','signal','public','response','rawScore','networkError','authRequired','tags','get','isSafeInteger','/knowledge/search','Knowledge\x20search\x20cancelled.','strategyFingerprint','scope','rank','aborted','query','any','2991dNFwUf','4759878TQKndF','password','title','scoreKind','map','\x20contract.','1415331jMQHkH','application/json','json','username','text','cache-control','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','70NsoIFo','trim','total','test','hash','schemaVersion','topK','4813825cioprg','AbortError','cli:rabetbase','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','toLowerCase','isArray','includes','timingsMs','isFinite','headers','validation','pathname','length','revision','object','finalScore','status','cookie','protocol','error','documentId','4612DPJcMG','development','TimeoutError','serviceUrl','apiError','number','/v2/development/apps/','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','name','3594213Bdqzry','hits','no-store','POST','profile','string','entries','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','appCode','https:','sort','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','origin','128yGkZfG','9095600avBadq'];a289_0x209a=function(){return _0x5c438e;};return a289_0x209a();}function requireRecord(_0x3060ce,_0x8cbdb){const _0x1569e8=a289_0x1ac01b;if(!_0x3060ce||typeof _0x3060ce!==_0x1569e8(0x1c0)||Array[_0x1569e8(0x1b7)](_0x3060ce))throw invalidContract(_0x8cbdb);return _0x3060ce;}function isFiniteNumber(_0x470026){const _0x4f0afe=a289_0x1ac01b;return typeof _0x470026===_0x4f0afe(0x1cc)&&Number[_0x4f0afe(0x1ba)](_0x470026);}function invalidContract(_0x53b165){const _0x23f0a9=a289_0x1ac01b;return CliErrors['apiError'](_0x23f0a9(0x1d8)+_0x53b165+_0x23f0a9(0x1a3));}
1
+ const a289_0x5e6e62=a289_0x5be1;(function(_0x5e39a2,_0x4a945c){const _0x28e534=a289_0x5be1,_0xad8357=_0x5e39a2();while(!![]){try{const _0x44c0ff=parseInt(_0x28e534(0x1ee))/0x1+-parseInt(_0x28e534(0x1af))/0x2+parseInt(_0x28e534(0x1f2))/0x3+-parseInt(_0x28e534(0x1cc))/0x4*(parseInt(_0x28e534(0x1ba))/0x5)+parseInt(_0x28e534(0x1f4))/0x6+-parseInt(_0x28e534(0x1d0))/0x7*(-parseInt(_0x28e534(0x1ea))/0x8)+-parseInt(_0x28e534(0x1fd))/0x9;if(_0x44c0ff===_0x4a945c)break;else _0xad8357['push'](_0xad8357['shift']());}catch(_0x201e8d){_0xad8357['push'](_0xad8357['shift']());}}}(a289_0x44b0,0xb5c68));import{CliError,CliErrors}from'../errors.js';function a289_0x5be1(_0x1d67af,_0x2a18d4){_0x1d67af=_0x1d67af-0x1a7;const _0x44b080=a289_0x44b0();let _0x5be18e=_0x44b080[_0x1d67af];return _0x5be18e;}function a289_0x44b0(){const _0x162c79=['documentId','49236zWaXaO','stringify','sort','POST','7NuTyby','length','some','finalScore','json','isSafeInteger','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','public','signal','score','total','scope','authRequired','get','timingsMs','strategyFingerprint','name','revision','rank','origin','Knowledge\x20search\x20cancelled.','appCode','aborted','AbortError','entries','status','2901056xlHzco','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','search','response','1296252DybqSu','timeout','apiError','Knowledge\x20search\x20appCode\x20is\x20required.','4042506FvWJpl','any','2253120ncjmqT','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','title','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','profile','cli:rabetbase','toLowerCase','hits[','rawScore','13024800IMgjcp','Knowledge\x20search\x20query\x20is\x20required.','hits','query','test','TimeoutError','string','application/json','keys','927846qREhrz','schemaVersion','validation','trim','hostname','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','networkError','hash','cookie','development','KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','295DTPGfR','company','isFinite','tags','text','scoreKind','serviceUrl','\x20contract.','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','topK','split','headers','isArray','/v2/development/apps/','map','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20'];a289_0x44b0=function(){return _0x162c79;};return a289_0x44b0();}const RESPONSE_KEYS=['schemaVersion',a289_0x5e6e62(0x1f8),a289_0x5e6e62(0x1da),a289_0x5e6e62(0x1a8),'strategyFingerprint',a289_0x5e6e62(0x1de)],HIT_KEYS=[a289_0x5e6e62(0x1cb),a289_0x5e6e62(0x1e1),'chunkId',a289_0x5e6e62(0x1db),a289_0x5e6e62(0x1f6),a289_0x5e6e62(0x1be),'tags',a289_0x5e6e62(0x1e2),a289_0x5e6e62(0x1fc),a289_0x5e6e62(0x1d3),a289_0x5e6e62(0x1bf)];export function normalizeKbServiceOrigin(_0x432eb5){const _0x3033ce=a289_0x5e6e62,_0x4ec0fc=()=>CliErrors[_0x3033ce(0x1b1)](_0x3033ce(0x1f7)),_0x29d940=_0x432eb5?.[_0x3033ce(0x1b2)]();if(!_0x29d940||/[\u0000-\u0020\u007f]/[_0x3033ce(0x1aa)](_0x29d940)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x3033ce(0x1aa)](_0x29d940))throw _0x4ec0fc();let _0x52e8ec;try{_0x52e8ec=new URL(_0x29d940);}catch{throw _0x4ec0fc();}if(_0x52e8ec['protocol']!=='https:'||!_0x52e8ec[_0x3033ce(0x1b3)]||_0x52e8ec['username']||_0x52e8ec['password']||_0x52e8ec['pathname']!=='/'||_0x52e8ec[_0x3033ce(0x1ec)]||_0x52e8ec[_0x3033ce(0x1b6)])throw _0x4ec0fc();return _0x52e8ec[_0x3033ce(0x1e3)];}export async function searchDirectKnowledge(_0x2c028f){const _0x119e30=a289_0x5e6e62,_0x304ee2=_0x2c028f[_0x119e30(0x1e5)][_0x119e30(0x1b2)](),_0x26178e=_0x2c028f[_0x119e30(0x1a9)][_0x119e30(0x1b2)]();if(!_0x304ee2)throw CliErrors[_0x119e30(0x1b1)](_0x119e30(0x1f1));if(!_0x2c028f['cookie'][_0x119e30(0x1b2)]())throw CliErrors['authRequired']();if(!_0x26178e)throw CliErrors[_0x119e30(0x1b1)](_0x119e30(0x1a7));validateTopK(_0x2c028f[_0x119e30(0x1c3)]);const _0x19977b=normalizeKbServiceOrigin(_0x2c028f[_0x119e30(0x1c0)]),_0x14109c=AbortSignal[_0x119e30(0x1ef)](0xea60),_0x51d458=_0x2c028f[_0x119e30(0x1d8)]?AbortSignal[_0x119e30(0x1f3)]([_0x2c028f[_0x119e30(0x1d8)],_0x14109c]):_0x14109c;let _0x57981b;try{_0x57981b=await fetch(_0x19977b+_0x119e30(0x1c7)+encodeURIComponent(_0x304ee2)+'/knowledge/search',{'method':_0x119e30(0x1cf),'redirect':'error','headers':{'Content-Type':'application/json','Cookie':_0x2c028f[_0x119e30(0x1b7)],'X-Invoke-Source':_0x119e30(0x1f9)},'body':JSON[_0x119e30(0x1cd)]({'query':_0x26178e,..._0x2c028f[_0x119e30(0x1c3)]!==undefined?{'topK':_0x2c028f[_0x119e30(0x1c3)]}:{}}),'signal':_0x51d458});}catch(_0x494c25){if(_0x2c028f[_0x119e30(0x1d8)]?.[_0x119e30(0x1e6)])throw new DOMException(_0x119e30(0x1e4),_0x119e30(0x1e7));if(_0x494c25 instanceof Error&&_0x494c25[_0x119e30(0x1e0)]===_0x119e30(0x1ab))throw CliErrors[_0x119e30(0x1b5)](_0x119e30(0x1d6));throw CliErrors['networkError'](_0x119e30(0x1c2));}if(_0x57981b[_0x119e30(0x1e9)]===0x191)throw CliErrors[_0x119e30(0x1dc)]();if(_0x57981b[_0x119e30(0x1e9)]===0x1ad)throw CliErrors[_0x119e30(0x1f0)]('KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).');if(!_0x57981b['ok'])throw CliErrors[_0x119e30(0x1f0)](_0x119e30(0x1ca)+_0x57981b[_0x119e30(0x1e9)]+').');if(!hasNoStore(_0x57981b['headers']))throw CliErrors[_0x119e30(0x1f0)](_0x119e30(0x1b9));if(!(_0x57981b[_0x119e30(0x1c5)][_0x119e30(0x1dd)]('content-type')??'')[_0x119e30(0x1fa)]()['includes'](_0x119e30(0x1ad)))throw CliErrors[_0x119e30(0x1f0)]('KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.');let _0x5843f6;try{_0x5843f6=await _0x57981b[_0x119e30(0x1d4)]();}catch(_0x25dbad){if(_0x2c028f[_0x119e30(0x1d8)]?.[_0x119e30(0x1e6)])throw new DOMException('Knowledge\x20search\x20cancelled.',_0x119e30(0x1e7));if(_0x14109c[_0x119e30(0x1e6)]||_0x25dbad instanceof Error&&_0x25dbad['name']===_0x119e30(0x1ab))throw CliErrors[_0x119e30(0x1b5)]('KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.');throw CliErrors[_0x119e30(0x1f0)](_0x119e30(0x1eb));}try{const _0x2743c0=requireExactRecord(_0x5843f6,[_0x119e30(0x1a8),_0x119e30(0x1df),'timingsMs'],_0x119e30(0x1ed));if(!Array[_0x119e30(0x1c6)](_0x2743c0[_0x119e30(0x1a8)]))throw invalidContract('hits');return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x119e30(0x1b8),'total':_0x2743c0[_0x119e30(0x1a8)][_0x119e30(0x1d1)],'hits':_0x2743c0['hits'],'strategyFingerprint':_0x2743c0[_0x119e30(0x1df)],'timingsMs':_0x2743c0[_0x119e30(0x1de)]},_0x2c028f[_0x119e30(0x1c3)]??0xa);}catch(_0x1e57b9){if(_0x1e57b9 instanceof CliError)throw CliErrors['apiError'](_0x119e30(0x1b4));throw _0x1e57b9;}}function validateTopK(_0x211a6){const _0x364bd6=a289_0x5e6e62;if(_0x211a6!==undefined&&(!Number[_0x364bd6(0x1d5)](_0x211a6)||_0x211a6<0x1||_0x211a6>0x32))throw CliErrors['validation'](_0x364bd6(0x1c9));}function hasNoStore(_0x26dc60){const _0x4f9f51=a289_0x5e6e62;return(_0x26dc60['get']('cache-control')??'')[_0x4f9f51(0x1c4)](',')[_0x4f9f51(0x1d2)](_0x5664e8=>_0x5664e8[_0x4f9f51(0x1b2)]()[_0x4f9f51(0x1fa)]()==='no-store');}function parseDevelopmentSearchResponse(_0x499647,_0x2c5e78){const _0x2a1a92=a289_0x5e6e62,_0x1a8c57=requireExactRecord(_0x499647,RESPONSE_KEYS,_0x2a1a92(0x1ed));if(_0x1a8c57[_0x2a1a92(0x1b0)]!==0x2||_0x1a8c57[_0x2a1a92(0x1f8)]!==_0x2a1a92(0x1b8))throw invalidContract(_0x2a1a92(0x1f8));if(!Array[_0x2a1a92(0x1c6)](_0x1a8c57[_0x2a1a92(0x1a8)])||_0x1a8c57[_0x2a1a92(0x1a8)][_0x2a1a92(0x1d1)]>(_0x2c5e78??0x32))throw invalidContract(_0x2a1a92(0x1a8));if(typeof _0x1a8c57[_0x2a1a92(0x1df)]!=='string'||!/^sha256:[0-9a-f]{64}$/[_0x2a1a92(0x1aa)](_0x1a8c57[_0x2a1a92(0x1df)]))throw invalidContract(_0x2a1a92(0x1df));const _0x506986=requireRecord(_0x1a8c57[_0x2a1a92(0x1de)],_0x2a1a92(0x1de)),_0xce60ea={};for(const [_0x337041,_0x2586cc]of Object[_0x2a1a92(0x1e8)](_0x506986)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x2a1a92(0x1aa)](_0x337041)||typeof _0x2586cc!=='number'||!Number[_0x2a1a92(0x1bc)](_0x2586cc)||_0x2586cc<0x0)throw invalidContract(_0x2a1a92(0x1de));_0xce60ea[_0x337041]=_0x2586cc;}const _0x53a121=_0x1a8c57[_0x2a1a92(0x1a8)][_0x2a1a92(0x1c8)]((_0x45544b,_0x528567)=>parseHit(_0x45544b,_0x528567));if(!Number['isSafeInteger'](_0x1a8c57[_0x2a1a92(0x1da)])||_0x1a8c57['total']!==_0x53a121[_0x2a1a92(0x1d1)])throw invalidContract(_0x2a1a92(0x1da));return{'schemaVersion':_0x1a8c57[_0x2a1a92(0x1b0)],'profile':_0x1a8c57['profile'],'total':_0x1a8c57[_0x2a1a92(0x1da)],'strategyFingerprint':_0x1a8c57[_0x2a1a92(0x1df)],'timingsMs':_0xce60ea,'hits':_0x53a121};}function parseHit(_0x40011a,_0x41bb49){const _0x486a71=a289_0x5e6e62,_0x80d6f5=requireExactRecord(_0x40011a,HIT_KEYS,_0x486a71(0x1fb)+_0x41bb49+']'),_0x2d03a8=_0x2a0037=>{const _0x3dfcce=_0x486a71,_0x5f595e=_0x80d6f5[_0x2a0037];if(typeof _0x5f595e!==_0x3dfcce(0x1ac)||!_0x5f595e)throw invalidContract(_0x2a0037);return _0x5f595e;};if(!Number['isSafeInteger'](_0x80d6f5[_0x486a71(0x1e1)])||_0x80d6f5[_0x486a71(0x1e1)]<0x1)throw invalidContract('revision');if(_0x80d6f5[_0x486a71(0x1db)]!==_0x486a71(0x1d7)&&_0x80d6f5[_0x486a71(0x1db)]!==_0x486a71(0x1bb))throw invalidContract(_0x486a71(0x1db));if(typeof _0x80d6f5[_0x486a71(0x1f6)]!==_0x486a71(0x1ac)||typeof _0x80d6f5[_0x486a71(0x1be)]!==_0x486a71(0x1ac))throw invalidContract(_0x486a71(0x1be));if(!Array[_0x486a71(0x1c6)](_0x80d6f5['tags'])||_0x80d6f5[_0x486a71(0x1bd)][_0x486a71(0x1d2)](_0x1499b8=>typeof _0x1499b8!==_0x486a71(0x1ac)))throw invalidContract('tags');if(!Number['isSafeInteger'](_0x80d6f5[_0x486a71(0x1e2)])||_0x80d6f5[_0x486a71(0x1e2)]!==_0x41bb49+0x1)throw invalidContract(_0x486a71(0x1e2));if(!isFiniteNumber(_0x80d6f5[_0x486a71(0x1fc)])||!isFiniteNumber(_0x80d6f5[_0x486a71(0x1d3)]))throw invalidContract(_0x486a71(0x1d9));return{'documentId':_0x2d03a8('documentId'),'revision':_0x80d6f5[_0x486a71(0x1e1)],'chunkId':_0x2d03a8('chunkId'),'scope':_0x80d6f5['scope'],'title':_0x80d6f5['title'],'text':_0x80d6f5[_0x486a71(0x1be)],'tags':[..._0x80d6f5[_0x486a71(0x1bd)]],'rank':_0x80d6f5[_0x486a71(0x1e2)],'rawScore':_0x80d6f5[_0x486a71(0x1fc)],'finalScore':_0x80d6f5['finalScore'],'scoreKind':_0x2d03a8(_0x486a71(0x1bf))};}function requireExactRecord(_0xb5d29f,_0x29182e,_0xf77aed){const _0x23a1bf=a289_0x5e6e62,_0x4181a6=requireRecord(_0xb5d29f,_0xf77aed),_0x3bd792=Object[_0x23a1bf(0x1ae)](_0x4181a6)[_0x23a1bf(0x1ce)](),_0x347932=[..._0x29182e][_0x23a1bf(0x1ce)]();if(_0x3bd792[_0x23a1bf(0x1d1)]!==_0x347932['length']||_0x3bd792[_0x23a1bf(0x1d2)]((_0x487fa5,_0x5947f2)=>_0x487fa5!==_0x347932[_0x5947f2]))throw invalidContract(_0xf77aed);return _0x4181a6;}function requireRecord(_0x5d0e16,_0x3ef359){const _0x3ae17c=a289_0x5e6e62;if(!_0x5d0e16||typeof _0x5d0e16!=='object'||Array[_0x3ae17c(0x1c6)](_0x5d0e16))throw invalidContract(_0x3ef359);return _0x5d0e16;}function isFiniteNumber(_0x399fc7){const _0x4494e2=a289_0x5e6e62;return typeof _0x399fc7==='number'&&Number[_0x4494e2(0x1bc)](_0x399fc7);}function invalidContract(_0x3816d2){const _0x343fea=a289_0x5e6e62;return CliErrors['apiError'](_0x343fea(0x1f5)+_0x3816d2+_0x343fea(0x1c1));}
@@ -1 +1 @@
1
- const a290_0x563652=a290_0x14f8;(function(_0xaf2b59,_0x3c137f){const _0x191f1e=a290_0x14f8,_0x9e1e00=_0xaf2b59();while(!![]){try{const _0x2c91e6=parseInt(_0x191f1e(0x182))/0x1*(parseInt(_0x191f1e(0x16e))/0x2)+parseInt(_0x191f1e(0x171))/0x3+parseInt(_0x191f1e(0x18c))/0x4*(-parseInt(_0x191f1e(0x184))/0x5)+-parseInt(_0x191f1e(0x180))/0x6*(-parseInt(_0x191f1e(0x186))/0x7)+-parseInt(_0x191f1e(0x17b))/0x8*(parseInt(_0x191f1e(0x185))/0x9)+-parseInt(_0x191f1e(0x170))/0xa+parseInt(_0x191f1e(0x177))/0xb;if(_0x2c91e6===_0x3c137f)break;else _0x9e1e00['push'](_0x9e1e00['shift']());}catch(_0x58e62d){_0x9e1e00['push'](_0x9e1e00['shift']());}}}(a290_0x5abd,0xb3f39));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a290_0x5abd(){const _0x53de41=['.rabetbase','Unsupported\x20file\x20in\x20page\x20directory:\x20','8gntlrH','localeCompare','sort','page-dir','join','7632VTPVfG','.json','257198TBcvBy','validation','1444865whXdLT','8909271pxxbkZ','5880BJIRdn','isDirectory','page','name','flagMissing','isFile','12RaLhfp','4JpAThi','trim','3585230qEPRYl','1820523bHBLAt','appPagesDir','toUpperCase','utf8','split','cwd','8389975ILZmjl','Page\x20directory\x20is\x20not\x20a\x20directory:\x20'];a290_0x5abd=function(){return _0x53de41;};return a290_0x5abd();}function a290_0x14f8(_0x2be56f,_0x27856f){_0x2be56f=_0x2be56f-0x16e;const _0x5abdaf=a290_0x5abd();let _0x14f8b3=_0x5abdaf[_0x2be56f];return _0x14f8b3;}import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0xa9e103,_0x53f054=process[a290_0x563652(0x176)]()){const _0x24def9=a290_0x563652,_0x4f9c6c=resolve(_0x53f054),_0x2cdddb=join(_0x4f9c6c,_0x24def9(0x179),_0x24def9(0x188));return{'projectRoot':_0x4f9c6c,'pagesBaseDir':_0x2cdddb,'appPagesDir':join(_0x2cdddb,_0xa9e103),'lockFilePath':join(_0x4f9c6c,_0x24def9(0x179),'page.lock.json')};}export function buildPageFileName(_0x507238,_0x201422){const _0x547a32=a290_0x563652;return _0x507238+'-'+_0x201422[_0x547a32(0x173)]()+_0x547a32(0x181);}export function resolvePageFilePath(_0x1510fd,_0x2e9640,_0x278f64){const _0x3f3a28=a290_0x563652;return join(_0x1510fd[_0x3f3a28(0x172)],buildPageFileName(_0x2e9640,_0x278f64));}export async function ensureParentDirectory(_0x4b2f7f){await mkdir(dirname(_0x4b2f7f),{'recursive':!![]});}export async function fileExists(_0x4c6657){try{return await access(_0x4c6657,constants['F_OK']),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x21fe19){const _0x2dce52=a290_0x563652,_0x940f45=_0x21fe19[_0x2dce52(0x16f)]();if(!_0x940f45)throw CliErrors[_0x2dce52(0x18a)](_0x2dce52(0x17e));const _0x3e9dfd=resolve(_0x940f45);let _0x544b38;try{_0x544b38=await lstat(_0x3e9dfd);}catch{throw CliErrors[_0x2dce52(0x183)]('Page\x20directory\x20not\x20found:\x20'+_0x940f45);}if(!_0x544b38[_0x2dce52(0x187)]())throw CliErrors['validation'](_0x2dce52(0x178)+_0x940f45);const _0x303ab1={};return await readDirectory(_0x3e9dfd,_0x3e9dfd,_0x303ab1),_0x303ab1;}async function readDirectory(_0x3845bd,_0x62c2f4,_0x5d599b){const _0x1be581=a290_0x563652,_0x191159=await readdir(_0x62c2f4,{'withFileTypes':!![]});for(const _0x177c6a of _0x191159[_0x1be581(0x17d)]((_0xa96635,_0x14c146)=>_0xa96635[_0x1be581(0x189)][_0x1be581(0x17c)](_0x14c146[_0x1be581(0x189)]))){const _0x3ea2fe=join(_0x62c2f4,_0x177c6a[_0x1be581(0x189)]);if(_0x177c6a[_0x1be581(0x187)]()){await readDirectory(_0x3845bd,_0x3ea2fe,_0x5d599b);continue;}if(!_0x177c6a[_0x1be581(0x18b)]())throw CliErrors['validation'](_0x1be581(0x17a)+_0x3ea2fe);_0x5d599b[relative(_0x3845bd,_0x3ea2fe)[_0x1be581(0x175)](sep)[_0x1be581(0x17f)]('/')]=await readFile(_0x3ea2fe,_0x1be581(0x174));}}
1
+ const a290_0x51be12=a290_0x440f;(function(_0x365767,_0x109c07){const _0x294dc9=a290_0x440f,_0x444508=_0x365767();while(!![]){try{const _0x477d9e=-parseInt(_0x294dc9(0x184))/0x1+-parseInt(_0x294dc9(0x19b))/0x2*(parseInt(_0x294dc9(0x19d))/0x3)+parseInt(_0x294dc9(0x19c))/0x4+parseInt(_0x294dc9(0x18d))/0x5+parseInt(_0x294dc9(0x194))/0x6*(parseInt(_0x294dc9(0x198))/0x7)+-parseInt(_0x294dc9(0x190))/0x8+parseInt(_0x294dc9(0x19a))/0x9;if(_0x477d9e===_0x109c07)break;else _0x444508['push'](_0x444508['shift']());}catch(_0x65c0cf){_0x444508['push'](_0x444508['shift']());}}}(a290_0x598c,0xb1948));import{constants}from'node:fs';function a290_0x598c(){const _0x412773=['560366vKebeU','1329952hgOwdV','15YplYtN','isDirectory','F_OK','925805ubMCNb','split','name','appPagesDir','join','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','flagMissing','.rabetbase','page-dir','4006670lgyIfh','localeCompare','Unsupported\x20file\x20in\x20page\x20directory:\x20','10762952OySGst','page.lock.json','Page\x20directory\x20not\x20found:\x20','isFile','8397390avMCuE','toUpperCase','validation','cwd','7VsDNAX','.json','16794630HeVsFc'];a290_0x598c=function(){return _0x412773;};return a290_0x598c();}import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a290_0x440f(_0x15288f,_0x35deaa){_0x15288f=_0x15288f-0x184;const _0x598cfb=a290_0x598c();let _0x440f68=_0x598cfb[_0x15288f];return _0x440f68;}import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x2816bc,_0x57f425=process[a290_0x51be12(0x197)]()){const _0x44228a=a290_0x51be12,_0x24f9e5=resolve(_0x57f425),_0x449f01=join(_0x24f9e5,_0x44228a(0x18b),'page');return{'projectRoot':_0x24f9e5,'pagesBaseDir':_0x449f01,'appPagesDir':join(_0x449f01,_0x2816bc),'lockFilePath':join(_0x24f9e5,'.rabetbase',_0x44228a(0x191))};}export function buildPageFileName(_0x23dbbd,_0xe5353b){const _0x5591cc=a290_0x51be12;return _0x23dbbd+'-'+_0xe5353b[_0x5591cc(0x195)]()+_0x5591cc(0x199);}export function resolvePageFilePath(_0x4b5ed8,_0x8732b0,_0x31fbe1){const _0x187f52=a290_0x51be12;return join(_0x4b5ed8[_0x187f52(0x187)],buildPageFileName(_0x8732b0,_0x31fbe1));}export async function ensureParentDirectory(_0x41c7ec){await mkdir(dirname(_0x41c7ec),{'recursive':!![]});}export async function fileExists(_0x24e664){const _0x347340=a290_0x51be12;try{return await access(_0x24e664,constants[_0x347340(0x19f)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x5035ee){const _0x8d64b3=a290_0x51be12,_0x289a65=_0x5035ee['trim']();if(!_0x289a65)throw CliErrors[_0x8d64b3(0x18a)](_0x8d64b3(0x18c));const _0xd6629b=resolve(_0x289a65);let _0x7dd681;try{_0x7dd681=await lstat(_0xd6629b);}catch{throw CliErrors[_0x8d64b3(0x196)](_0x8d64b3(0x192)+_0x289a65);}if(!_0x7dd681[_0x8d64b3(0x19e)]())throw CliErrors[_0x8d64b3(0x196)](_0x8d64b3(0x189)+_0x289a65);const _0x3e67bd={};return await readDirectory(_0xd6629b,_0xd6629b,_0x3e67bd),_0x3e67bd;}async function readDirectory(_0x2d4201,_0x4b510f,_0x545a7c){const _0x22d4d8=a290_0x51be12,_0x4182f8=await readdir(_0x4b510f,{'withFileTypes':!![]});for(const _0x5c6bce of _0x4182f8['sort']((_0x3d2f1a,_0x4fc1cd)=>_0x3d2f1a['name'][_0x22d4d8(0x18e)](_0x4fc1cd['name']))){const _0x220997=join(_0x4b510f,_0x5c6bce[_0x22d4d8(0x186)]);if(_0x5c6bce[_0x22d4d8(0x19e)]()){await readDirectory(_0x2d4201,_0x220997,_0x545a7c);continue;}if(!_0x5c6bce[_0x22d4d8(0x193)]())throw CliErrors['validation'](_0x22d4d8(0x18f)+_0x220997);_0x545a7c[relative(_0x2d4201,_0x220997)[_0x22d4d8(0x185)](sep)[_0x22d4d8(0x188)]('/')]=await readFile(_0x220997,'utf8');}}
@@ -1 +1 @@
1
- function a291_0x5b2a(_0x4f5928,_0x595e49){_0x4f5928=_0x4f5928-0x1df;const _0x5ed213=a291_0x5ed2();let _0x5b2a91=_0x5ed213[_0x4f5928];return _0x5b2a91;}(function(_0x36600f,_0x3bbecb){const _0x4f8dff=a291_0x5b2a,_0x31687d=_0x36600f();while(!![]){try{const _0x1c1b8a=parseInt(_0x4f8dff(0x1df))/0x1+parseInt(_0x4f8dff(0x1ef))/0x2*(-parseInt(_0x4f8dff(0x1ec))/0x3)+-parseInt(_0x4f8dff(0x1ed))/0x4+parseInt(_0x4f8dff(0x1e5))/0x5+parseInt(_0x4f8dff(0x1e2))/0x6+parseInt(_0x4f8dff(0x1ee))/0x7*(-parseInt(_0x4f8dff(0x1e7))/0x8)+parseInt(_0x4f8dff(0x1eb))/0x9;if(_0x1c1b8a===_0x3bbecb)break;else _0x31687d['push'](_0x31687d['shift']());}catch(_0x1c2c07){_0x31687d['push'](_0x31687d['shift']());}}}(a291_0x5ed2,0xc3fab));import a291_0x17bfac from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x46dc2b){const _0x11bb5e=a291_0x5b2a;return JSON[_0x11bb5e(0x1ea)](JSON[_0x11bb5e(0x1e1)](_0x46dc2b),null,0x2)+'\x0a';}export function computePageContentHash(_0x5b7935){const _0x212d83=a291_0x5b2a;return a291_0x17bfac[_0x212d83(0x1e0)](_0x212d83(0x1e8))[_0x212d83(0x1e6)](_0x5b7935)[_0x212d83(0x1e3)](_0x212d83(0x1e9));}export function computeSerializedSchemaHash(_0x2da701){return computePageContentHash(serializePageSchemaForFile(_0x2da701));}export async function computePageFileHash(_0x423680){const _0x3c407f=a291_0x5b2a,_0x3762a9=await readFile(_0x423680,_0x3c407f(0x1e4));return computePageContentHash(_0x3762a9);}function a291_0x5ed2(){const _0x2afea1=['digest','utf8','2730430nlAhJP','update','20048dmnvdS','md5','hex','stringify','7155558VdDsAX','2518806OmRGjC','2329312WSrHOu','4039CyHMga','2NAtmXO','1326939NwVGOT','createHash','parse','6015216WmFUqK'];a291_0x5ed2=function(){return _0x2afea1;};return a291_0x5ed2();}
1
+ (function(_0x3d5011,_0x4ad5dd){const _0x14c285=a291_0x243c,_0x5a4f31=_0x3d5011();while(!![]){try{const _0x126f59=-parseInt(_0x14c285(0x18b))/0x1+-parseInt(_0x14c285(0x187))/0x2*(-parseInt(_0x14c285(0x186))/0x3)+-parseInt(_0x14c285(0x17c))/0x4+parseInt(_0x14c285(0x185))/0x5*(parseInt(_0x14c285(0x18d))/0x6)+parseInt(_0x14c285(0x189))/0x7*(-parseInt(_0x14c285(0x18e))/0x8)+-parseInt(_0x14c285(0x183))/0x9+-parseInt(_0x14c285(0x18a))/0xa*(-parseInt(_0x14c285(0x17f))/0xb);if(_0x126f59===_0x4ad5dd)break;else _0x5a4f31['push'](_0x5a4f31['shift']());}catch(_0xed4ca){_0x5a4f31['push'](_0x5a4f31['shift']());}}}(a291_0x5689,0x89a93));import a291_0x1ee8ea from'node:crypto';import{readFile}from'node:fs/promises';function a291_0x5689(){const _0x1120a6=['106290KiKKFz','380574pGqTHW','hex','4364082bMBLeD','264dnbCyw','1989860rLYlFT','stringify','createHash','1452WgwcKv','utf8','parse','digest','3203676erQKNt','md5','5hoUror','24711IfLnIz','16TdKdjR','update','84511xoNofx'];a291_0x5689=function(){return _0x1120a6;};return a291_0x5689();}export function serializePageSchemaForFile(_0x169ba6){const _0x4d1e67=a291_0x243c;return JSON[_0x4d1e67(0x17d)](JSON[_0x4d1e67(0x181)](_0x169ba6),null,0x2)+'\x0a';}export function computePageContentHash(_0x69e531){const _0x592836=a291_0x243c;return a291_0x1ee8ea[_0x592836(0x17e)](_0x592836(0x184))[_0x592836(0x188)](_0x69e531)[_0x592836(0x182)](_0x592836(0x18c));}function a291_0x243c(_0x2a6e1f,_0xce0939){_0x2a6e1f=_0x2a6e1f-0x17c;const _0x5689e2=a291_0x5689();let _0x243caf=_0x5689e2[_0x2a6e1f];return _0x243caf;}export function computeSerializedSchemaHash(_0x44e610){return computePageContentHash(serializePageSchemaForFile(_0x44e610));}export async function computePageFileHash(_0x5db7a1){const _0x9f6c29=a291_0x243c,_0x324a8e=await readFile(_0x5db7a1,_0x9f6c29(0x180));return computePageContentHash(_0x324a8e);}
@@ -1 +1 @@
1
- (function(_0x3eaae6,_0x5f50d5){const _0x23ef0d=a292_0x36a2,_0x581b64=_0x3eaae6();while(!![]){try{const _0x51b230=parseInt(_0x23ef0d(0x1cf))/0x1+parseInt(_0x23ef0d(0x1d3))/0x2+-parseInt(_0x23ef0d(0x1d4))/0x3+parseInt(_0x23ef0d(0x1d2))/0x4*(-parseInt(_0x23ef0d(0x1d5))/0x5)+parseInt(_0x23ef0d(0x1c5))/0x6*(parseInt(_0x23ef0d(0x1ce))/0x7)+parseInt(_0x23ef0d(0x1c7))/0x8+-parseInt(_0x23ef0d(0x1d0))/0x9;if(_0x51b230===_0x5f50d5)break;else _0x581b64['push'](_0x581b64['shift']());}catch(_0x451c5d){_0x581b64['push'](_0x581b64['shift']());}}}(a292_0x11b3,0xb6358));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}function a292_0x11b3(){const _0x2c2680=['object','2695ZrxxFt','828106pQdOhM','4653711jbJdGL','code','47836jrYsXB','795878mTVMjU','2268612jxUeaQ','165mGFVzJ','4602HPxlbV','apps','7143344kDEUZc','stringify','pages','lastSync','utf8','Failed\x20to\x20read\x20page\x20lock\x20file:\x20'];a292_0x11b3=function(){return _0x2c2680;};return a292_0x11b3();}function a292_0x36a2(_0x2d5ca8,_0x5577bd){_0x2d5ca8=_0x2d5ca8-0x1c5;const _0x11b365=a292_0x11b3();let _0x36a282=_0x11b365[_0x2d5ca8];return _0x36a282;}export function ensurePageLockScope(_0x523277,_0x18f2e0){const _0x11125b=a292_0x36a2,_0x36d26d={'apps':_0x523277[_0x11125b(0x1c6)]&&typeof _0x523277['apps']===_0x11125b(0x1cd)?_0x523277[_0x11125b(0x1c6)]:{}};let _0x599de5=_0x36d26d[_0x11125b(0x1c6)][_0x18f2e0];if(!_0x599de5)return _0x599de5={'lastSync':'','pages':{}},_0x36d26d[_0x11125b(0x1c6)][_0x18f2e0]=_0x599de5,{'lockData':_0x36d26d,'appLock':_0x599de5};return!_0x599de5[_0x11125b(0x1ca)]&&(_0x599de5[_0x11125b(0x1ca)]=''),(!_0x599de5[_0x11125b(0x1c9)]||typeof _0x599de5[_0x11125b(0x1c9)]!==_0x11125b(0x1cd))&&(_0x599de5[_0x11125b(0x1c9)]={}),{'lockData':_0x36d26d,'appLock':_0x599de5};}export async function readPageLockFile(_0x17734a){const _0x23d238=a292_0x36a2;try{const _0x2ee35a=await readFile(_0x17734a,_0x23d238(0x1cb)),_0x3e7d76=JSON['parse'](_0x2ee35a);return{'apps':_0x3e7d76['apps']&&typeof _0x3e7d76[_0x23d238(0x1c6)]==='object'?_0x3e7d76[_0x23d238(0x1c6)]:{}};}catch(_0x5c387a){if(_0x5c387a[_0x23d238(0x1d1)]==='ENOENT')return null;throw new Error(_0x23d238(0x1cc)+String(_0x5c387a));}}export async function writePageLockFile(_0x382621,_0x474ed3){const _0x455d81=a292_0x36a2;await mkdir(dirname(_0x382621),{'recursive':!![]}),await writeFile(_0x382621,JSON[_0x455d81(0x1c8)](_0x474ed3,null,0x2),_0x455d81(0x1cb));}
1
+ (function(_0x530ebb,_0x298c6e){const _0x5f4601=a292_0x2b75,_0x2e6883=_0x530ebb();while(!![]){try{const _0x221c11=-parseInt(_0x5f4601(0xc2))/0x1+parseInt(_0x5f4601(0xba))/0x2+-parseInt(_0x5f4601(0xc4))/0x3+parseInt(_0x5f4601(0xb6))/0x4*(parseInt(_0x5f4601(0xc6))/0x5)+-parseInt(_0x5f4601(0xbd))/0x6*(parseInt(_0x5f4601(0xb8))/0x7)+parseInt(_0x5f4601(0xb5))/0x8+parseInt(_0x5f4601(0xc0))/0x9;if(_0x221c11===_0x298c6e)break;else _0x2e6883['push'](_0x2e6883['shift']());}catch(_0x5e0701){_0x2e6883['push'](_0x2e6883['shift']());}}}(a292_0x1a67,0xf35f0));function a292_0x1a67(){const _0xf54c11=['lastSync','368545lxqyZk','6421168FZnsPV','68SGAjhl','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','7huYeCW','ENOENT','281140wsFYeo','utf8','parse','10954674GrxfZu','pages','stringify','14516577gCreeu','apps','498715fnDIaw','object','1463640rHbiUd'];a292_0x1a67=function(){return _0xf54c11;};return a292_0x1a67();}import{mkdir,readFile,writeFile}from'node:fs/promises';function a292_0x2b75(_0x42b8d5,_0x32ba57){_0x42b8d5=_0x42b8d5-0xb5;const _0x1a67c5=a292_0x1a67();let _0x2b7595=_0x1a67c5[_0x42b8d5];return _0x2b7595;}import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x19e404,_0x17a1fd){const _0x5dc2cb=a292_0x2b75,_0x11f95f={'apps':_0x19e404[_0x5dc2cb(0xc1)]&&typeof _0x19e404['apps']===_0x5dc2cb(0xc3)?_0x19e404[_0x5dc2cb(0xc1)]:{}};let _0x49a42f=_0x11f95f[_0x5dc2cb(0xc1)][_0x17a1fd];if(!_0x49a42f)return _0x49a42f={'lastSync':'','pages':{}},_0x11f95f[_0x5dc2cb(0xc1)][_0x17a1fd]=_0x49a42f,{'lockData':_0x11f95f,'appLock':_0x49a42f};return!_0x49a42f['lastSync']&&(_0x49a42f[_0x5dc2cb(0xc5)]=''),(!_0x49a42f['pages']||typeof _0x49a42f[_0x5dc2cb(0xbe)]!==_0x5dc2cb(0xc3))&&(_0x49a42f['pages']={}),{'lockData':_0x11f95f,'appLock':_0x49a42f};}export async function readPageLockFile(_0x5b5e2d){const _0x5a7527=a292_0x2b75;try{const _0x416b1d=await readFile(_0x5b5e2d,_0x5a7527(0xbb)),_0x1ae961=JSON[_0x5a7527(0xbc)](_0x416b1d);return{'apps':_0x1ae961[_0x5a7527(0xc1)]&&typeof _0x1ae961['apps']==='object'?_0x1ae961[_0x5a7527(0xc1)]:{}};}catch(_0xf8e0e){if(_0xf8e0e['code']===_0x5a7527(0xb9))return null;throw new Error(_0x5a7527(0xb7)+String(_0xf8e0e));}}export async function writePageLockFile(_0x334f8f,_0x403dd8){const _0x77dcb2=a292_0x2b75;await mkdir(dirname(_0x334f8f),{'recursive':!![]}),await writeFile(_0x334f8f,JSON[_0x77dcb2(0xbf)](_0x403dd8,null,0x2),_0x77dcb2(0xbb));}
@@ -1 +1 @@
1
- (function(_0x420231,_0x717082){const _0xefdab6=a293_0x166a,_0xb8ddc=_0x420231();while(!![]){try{const _0x8b90eb=-parseInt(_0xefdab6(0x1b0))/0x1*(-parseInt(_0xefdab6(0x18b))/0x2)+-parseInt(_0xefdab6(0x1aa))/0x3*(-parseInt(_0xefdab6(0x188))/0x4)+-parseInt(_0xefdab6(0x1a4))/0x5+-parseInt(_0xefdab6(0x18a))/0x6+-parseInt(_0xefdab6(0x19a))/0x7*(-parseInt(_0xefdab6(0x1a7))/0x8)+parseInt(_0xefdab6(0x1a1))/0x9+-parseInt(_0xefdab6(0x1a9))/0xa*(parseInt(_0xefdab6(0x189))/0xb);if(_0x8b90eb===_0x717082)break;else _0xb8ddc['push'](_0xb8ddc['shift']());}catch(_0x513212){_0xb8ddc['push'](_0xb8ddc['shift']());}}}(a293_0x15bc,0x201a0));import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x40e995,_0x5402de,_0x2eaec1){const _0x249728=a293_0x166a,_0x487d0e=parseSchema(_0x40e995,_0x249728(0x190)),_0x1e7125=parseSchema(_0x5402de,'remote'),_0x54695d=collectLrSmartJsx(_0x487d0e,!![]);if(_0x54695d[_0x249728(0x1b2)]===0x0)return{'content':_0x40e995,'compiledNodes':0x0,'normalizedNodes':0x0};const _0x46e1e5=new Map(collectLrSmartJsx(_0x1e7125)[_0x249728(0x19c)](_0x54e614=>[_0x54e614[_0x249728(0x1a2)],_0x54e614]));let _0x1eaa6c=0x0,_0x35b48f=0x0;for(const _0x44e90b of _0x54695d){const _0xb3232a=readNonEmptyString(_0x44e90b[_0x249728(0x195)][_0x249728(0x1ae)]),_0x3cfb51=readNonEmptyString(_0x44e90b[_0x249728(0x195)][_0x249728(0x19e)]),_0x4a8bc8=_0x46e1e5[_0x249728(0x197)](_0x44e90b[_0x249728(0x1a2)]),_0x4d3d49=readNonEmptyString(_0x4a8bc8?.['render'][_0x249728(0x1ae)]),_0x376dd2=readNonEmptyString(_0x4a8bc8?.[_0x249728(0x195)][_0x249728(0x19e)]);let _0xd3ccd1=![];_0x44e90b[_0x249728(0x195)][_0x249728(0x1b1)]!=='JSFunction'&&(_0x44e90b[_0x249728(0x195)][_0x249728(0x1b1)]=_0x249728(0x194),_0xd3ccd1=!![]);!isPageContextExpression(_0x44e90b[_0x249728(0x193)][_0x249728(0x199)])&&(_0x44e90b[_0x249728(0x193)][_0x249728(0x199)]={'type':_0x249728(0x196),'value':_0x249728(0x18c)},_0xd3ccd1=!![]);if(!_0xb3232a){if(!_0x3cfb51)throw CliErrors['validation'](_0x249728(0x198)+_0x44e90b[_0x249728(0x1ad)]+'\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.','Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.');if(_0xd3ccd1)_0x35b48f+=0x1;continue;}const _0x19ab73=!_0x4a8bc8||_0xb3232a!==_0x4d3d49,_0x2081f8=!_0x3cfb51;if(!_0x19ab73&&_0x3cfb51&&_0x376dd2&&_0x3cfb51!==_0x376dd2)throw CliErrors['validation'](_0x249728(0x198)+_0x44e90b[_0x249728(0x1ad)]+_0x249728(0x1a8),'Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.');if(_0x19ab73||_0x2081f8||!_0x376dd2){const _0x2a2b84=readNonEmptyString(await _0x2eaec1(_0xb3232a));if(!_0x2a2b84)throw CliErrors['apiError'](_0x249728(0x18d)+_0x44e90b['label']+'\x22.');_0x44e90b['render'][_0x249728(0x19e)]=_0x2a2b84,_0x1eaa6c+=0x1,_0xd3ccd1=!![];}if(_0xd3ccd1)_0x35b48f+=0x1;}if(_0x35b48f===0x0)return{'content':_0x40e995,'compiledNodes':_0x1eaa6c,'normalizedNodes':_0x35b48f};return{'content':JSON[_0x249728(0x191)](_0x487d0e),'compiledNodes':_0x1eaa6c,'normalizedNodes':_0x35b48f};}function a293_0x15bc(){const _0x4f529d=['props','JSFunction','render','JSExpression','get','LrSmartJsx\x20node\x20\x22','_context','7ivhpkr','push','map','forEach','value','componentName','\x22\x20has\x20missing\x20or\x20invalid\x20props.','120366eCsjlM','key','path:','206125lrYVQy','parse','string','1742360ENXLGB','\x22\x20has\x20a\x20manually\x20changed\x20render.value.','17210baKMAV','21oTtoOE','trim','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','label','source','Invalid\x20JSON\x20in\x20','1fFzObx','type','length','LrSmartJsx','\x22\x20has\x20missing\x20or\x20invalid\x20props.render.','Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.','125132jVKGxt','451CcHeSt','1339722WWCOSd','32822BCokRA','this','LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22','entries','id:','local','stringify','validation'];a293_0x15bc=function(){return _0x4f529d;};return a293_0x15bc();}function parseSchema(_0x2a031f,_0x246354){const _0x52fe70=a293_0x166a;try{return JSON[_0x52fe70(0x1a5)](_0x2a031f);}catch{throw CliErrors[_0x52fe70(0x192)](_0x52fe70(0x1af)+_0x246354+'\x20page\x20schema.');}}function collectLrSmartJsx(_0x672570,_0x523e6f=![]){const _0x3e9dae=[],_0x386450=(_0x41b38e,_0x25eafc)=>{const _0x5299e4=a293_0x166a;if(Array['isArray'](_0x41b38e)){_0x41b38e[_0x5299e4(0x19d)]((_0x3ade03,_0x1ef96f)=>_0x386450(_0x3ade03,_0x25eafc+'['+_0x1ef96f+']'));return;}if(!isObject(_0x41b38e))return;if(_0x41b38e[_0x5299e4(0x19f)]===_0x5299e4(0x185)){const _0x3780f4=readNonEmptyString(_0x41b38e['id']),_0x1d7038=_0x3780f4||_0x25eafc,_0x498859=isObject(_0x41b38e[_0x5299e4(0x193)])?_0x41b38e[_0x5299e4(0x193)]:undefined;if(!_0x498859){if(_0x523e6f)throw CliErrors[_0x5299e4(0x192)]('LrSmartJsx\x20node\x20\x22'+_0x1d7038+_0x5299e4(0x1a0),_0x5299e4(0x187));return;}const _0x4fed9e=isObject(_0x498859[_0x5299e4(0x195)])?_0x498859[_0x5299e4(0x195)]:undefined;if(!_0x4fed9e){if(_0x523e6f)throw CliErrors[_0x5299e4(0x192)]('LrSmartJsx\x20node\x20\x22'+_0x1d7038+_0x5299e4(0x186),_0x5299e4(0x1ac));return;}_0x3e9dae[_0x5299e4(0x19b)]({'key':_0x3780f4?_0x5299e4(0x18f)+_0x3780f4:_0x5299e4(0x1a3)+_0x25eafc,'label':_0x1d7038,'props':_0x498859,'render':_0x4fed9e});}for(const [_0x176614,_0x4dc22d]of Object[_0x5299e4(0x18e)](_0x41b38e)){if(_0x176614==='props'&&_0x41b38e[_0x5299e4(0x19f)]==='LrSmartJsx')continue;_0x386450(_0x4dc22d,_0x25eafc+'.'+_0x176614);}};return _0x386450(_0x672570,'$'),_0x3e9dae;}function a293_0x166a(_0x30d74b,_0x57d2a0){_0x30d74b=_0x30d74b-0x185;const _0x15bcba=a293_0x15bc();let _0x166a3d=_0x15bcba[_0x30d74b];return _0x166a3d;}function isObject(_0x33a2e9){return Boolean(_0x33a2e9)&&typeof _0x33a2e9==='object'&&!Array['isArray'](_0x33a2e9);}function readNonEmptyString(_0x16c282){const _0x45d0a9=a293_0x166a;return typeof _0x16c282===_0x45d0a9(0x1a6)&&_0x16c282[_0x45d0a9(0x1ab)]()?_0x16c282:undefined;}function isPageContextExpression(_0x2e54c9){const _0x2e5600=a293_0x166a;return isObject(_0x2e54c9)&&_0x2e54c9[_0x2e5600(0x1b1)]===_0x2e5600(0x196)&&_0x2e54c9['value']===_0x2e5600(0x18c);}
1
+ (function(_0x297fa2,_0x5b6f48){const _0x1db742=a293_0x1f51,_0x8bb4a=_0x297fa2();while(!![]){try{const _0x3cf145=parseInt(_0x1db742(0x87))/0x1+-parseInt(_0x1db742(0x72))/0x2*(-parseInt(_0x1db742(0x88))/0x3)+-parseInt(_0x1db742(0x90))/0x4+-parseInt(_0x1db742(0x68))/0x5+parseInt(_0x1db742(0x8b))/0x6*(parseInt(_0x1db742(0x75))/0x7)+parseInt(_0x1db742(0x82))/0x8*(-parseInt(_0x1db742(0x73))/0x9)+-parseInt(_0x1db742(0x6a))/0xa;if(_0x3cf145===_0x5b6f48)break;else _0x8bb4a['push'](_0x8bb4a['shift']());}catch(_0x4bb70d){_0x8bb4a['push'](_0x8bb4a['shift']());}}}(a293_0xd9a3,0x70955));import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x365e68,_0x4bcf63,_0x30b9fe){const _0x4bd516=a293_0x1f51,_0x4d8ace=parseSchema(_0x365e68,'local'),_0x4b80d7=parseSchema(_0x4bcf63,_0x4bd516(0x8c)),_0xd38b3=collectLrSmartJsx(_0x4d8ace,!![]);if(_0xd38b3[_0x4bd516(0x86)]===0x0)return{'content':_0x365e68,'compiledNodes':0x0,'normalizedNodes':0x0};const _0x42bc4a=new Map(collectLrSmartJsx(_0x4b80d7)['map'](_0x572883=>[_0x572883[_0x4bd516(0x7d)],_0x572883]));let _0x477358=0x0,_0x571e64=0x0;for(const _0x4673b4 of _0xd38b3){const _0x8ad7=readNonEmptyString(_0x4673b4[_0x4bd516(0x70)][_0x4bd516(0x83)]),_0x47a201=readNonEmptyString(_0x4673b4[_0x4bd516(0x70)]['value']),_0x42a67b=_0x42bc4a[_0x4bd516(0x80)](_0x4673b4[_0x4bd516(0x7d)]),_0x5530e0=readNonEmptyString(_0x42a67b?.[_0x4bd516(0x70)][_0x4bd516(0x83)]),_0x561dd5=readNonEmptyString(_0x42a67b?.[_0x4bd516(0x70)][_0x4bd516(0x71)]);let _0x4f301f=![];_0x4673b4['render'][_0x4bd516(0x65)]!==_0x4bd516(0x8e)&&(_0x4673b4[_0x4bd516(0x70)][_0x4bd516(0x65)]='JSFunction',_0x4f301f=!![]);!isPageContextExpression(_0x4673b4[_0x4bd516(0x76)][_0x4bd516(0x77)])&&(_0x4673b4[_0x4bd516(0x76)][_0x4bd516(0x77)]={'type':_0x4bd516(0x81),'value':_0x4bd516(0x7c)},_0x4f301f=!![]);if(!_0x8ad7){if(!_0x47a201)throw CliErrors[_0x4bd516(0x79)]('LrSmartJsx\x20node\x20\x22'+_0x4673b4[_0x4bd516(0x8f)]+_0x4bd516(0x7b),_0x4bd516(0x85));if(_0x4f301f)_0x571e64+=0x1;continue;}const _0x3d0afc=!_0x42a67b||_0x8ad7!==_0x5530e0,_0xd6e2d2=!_0x47a201;if(!_0x3d0afc&&_0x47a201&&_0x561dd5&&_0x47a201!==_0x561dd5)throw CliErrors['validation']('LrSmartJsx\x20node\x20\x22'+_0x4673b4[_0x4bd516(0x8f)]+'\x22\x20has\x20a\x20manually\x20changed\x20render.value.','Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.');if(_0x3d0afc||_0xd6e2d2||!_0x561dd5){const _0x47382f=readNonEmptyString(await _0x30b9fe(_0x8ad7));if(!_0x47382f)throw CliErrors['apiError'](_0x4bd516(0x6f)+_0x4673b4[_0x4bd516(0x8f)]+'\x22.');_0x4673b4['render'][_0x4bd516(0x71)]=_0x47382f,_0x477358+=0x1,_0x4f301f=!![];}if(_0x4f301f)_0x571e64+=0x1;}if(_0x571e64===0x0)return{'content':_0x365e68,'compiledNodes':_0x477358,'normalizedNodes':_0x571e64};return{'content':JSON[_0x4bd516(0x78)](_0x4d8ace),'compiledNodes':_0x477358,'normalizedNodes':_0x571e64};}function parseSchema(_0x31c955,_0x3e05eb){const _0x670ab=a293_0x1f51;try{return JSON['parse'](_0x31c955);}catch{throw CliErrors[_0x670ab(0x79)](_0x670ab(0x6d)+_0x3e05eb+_0x670ab(0x66));}}function collectLrSmartJsx(_0x2a3caa,_0x524e02=![]){const _0x1fc897=[],_0xcad770=(_0x272029,_0x485d5b)=>{const _0x11be45=a293_0x1f51;if(Array[_0x11be45(0x8a)](_0x272029)){_0x272029[_0x11be45(0x84)]((_0xf8968f,_0x30759e)=>_0xcad770(_0xf8968f,_0x485d5b+'['+_0x30759e+']'));return;}if(!isObject(_0x272029))return;if(_0x272029[_0x11be45(0x7a)]===_0x11be45(0x7e)){const _0x5a8eb1=readNonEmptyString(_0x272029['id']),_0x3f6334=_0x5a8eb1||_0x485d5b,_0x4c4506=isObject(_0x272029[_0x11be45(0x76)])?_0x272029['props']:undefined;if(!_0x4c4506){if(_0x524e02)throw CliErrors['validation'](_0x11be45(0x67)+_0x3f6334+_0x11be45(0x89),'Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.');return;}const _0x4e9e73=isObject(_0x4c4506['render'])?_0x4c4506[_0x11be45(0x70)]:undefined;if(!_0x4e9e73){if(_0x524e02)throw CliErrors[_0x11be45(0x79)](_0x11be45(0x67)+_0x3f6334+'\x22\x20has\x20missing\x20or\x20invalid\x20props.render.',_0x11be45(0x7f));return;}_0x1fc897[_0x11be45(0x6c)]({'key':_0x5a8eb1?_0x11be45(0x91)+_0x5a8eb1:_0x11be45(0x69)+_0x485d5b,'label':_0x3f6334,'props':_0x4c4506,'render':_0x4e9e73});}for(const [_0x3707aa,_0x52cd4e]of Object[_0x11be45(0x74)](_0x272029)){if(_0x3707aa===_0x11be45(0x76)&&_0x272029['componentName']==='LrSmartJsx')continue;_0xcad770(_0x52cd4e,_0x485d5b+'.'+_0x3707aa);}};return _0xcad770(_0x2a3caa,'$'),_0x1fc897;}function isObject(_0x3ba105){const _0x461146=a293_0x1f51;return Boolean(_0x3ba105)&&typeof _0x3ba105===_0x461146(0x6e)&&!Array[_0x461146(0x8a)](_0x3ba105);}function a293_0xd9a3(){const _0x5a1018=['validation','componentName','\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.','this','key','LrSmartJsx','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','get','JSExpression','8jLXVLD','source','forEach','Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.','length','405999pFbUwi','639VDZQWk','\x22\x20has\x20missing\x20or\x20invalid\x20props.','isArray','2433162CiZdBA','remote','string','JSFunction','label','2225056sCqOhj','id:','type','\x20page\x20schema.','LrSmartJsx\x20node\x20\x22','402830GkZuzz','path:','5869540WCoRxW','trim','push','Invalid\x20JSON\x20in\x20','object','LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22','render','value','6446AtkwMt','1967643uyIqBY','entries','14AoixDd','props','_context','stringify'];a293_0xd9a3=function(){return _0x5a1018;};return a293_0xd9a3();}function readNonEmptyString(_0x336a4c){const _0x382d3f=a293_0x1f51;return typeof _0x336a4c===_0x382d3f(0x8d)&&_0x336a4c[_0x382d3f(0x6b)]()?_0x336a4c:undefined;}function a293_0x1f51(_0x1247df,_0x1f978c){_0x1247df=_0x1247df-0x65;const _0xd9a3d0=a293_0xd9a3();let _0x1f51f5=_0xd9a3d0[_0x1247df];return _0x1f51f5;}function isPageContextExpression(_0x251c84){const _0x256b20=a293_0x1f51;return isObject(_0x251c84)&&_0x251c84['type']===_0x256b20(0x81)&&_0x251c84[_0x256b20(0x71)]===_0x256b20(0x7c);}
@@ -1 +1 @@
1
- (function(_0x95a7d,_0x4fbba7){const _0x580459=a295_0x3052,_0x48bfdd=_0x95a7d();while(!![]){try{const _0x5e4a6e=parseInt(_0x580459(0x1c5))/0x1*(parseInt(_0x580459(0x1ea))/0x2)+-parseInt(_0x580459(0x210))/0x3*(parseInt(_0x580459(0x1fb))/0x4)+-parseInt(_0x580459(0x1e9))/0x5+-parseInt(_0x580459(0x20e))/0x6+parseInt(_0x580459(0x1c7))/0x7+-parseInt(_0x580459(0x1de))/0x8+-parseInt(_0x580459(0x1df))/0x9*(-parseInt(_0x580459(0x1f6))/0xa);if(_0x5e4a6e===_0x4fbba7)break;else _0x48bfdd['push'](_0x48bfdd['shift']());}catch(_0x3e6291){_0x48bfdd['push'](_0x48bfdd['shift']());}}}(a295_0x47b7,0xc66f2));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x564c4f,_0x95d81a){const _0xdf4b82=a295_0x3052,_0x54c3f5=[],_0x14eb72=normalizeSqlForStaticAnalysis(_0x564c4f),_0x30927f=(_0x14eb72['error']?[]:extractJoinFacts(_0x14eb72[_0xdf4b82(0x202)]))[_0xdf4b82(0x1d4)](_0x8b5e23=>{const _0x275018=_0xdf4b82;if(_0x8b5e23[_0x275018(0x1e4)]||_0x8b5e23[_0x275018(0x1cb)][_0x275018(0x1f8)]===0x0)return _0x54c3f5[_0x275018(0x1e3)]({'code':_0x275018(0x204),'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23['alias'],'columns':_0x8b5e23[_0x275018(0x1cb)],'reason':_0x8b5e23['unsupportedReason']??_0x275018(0x1d3)}),{'table':_0x8b5e23['table'],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23[_0x275018(0x1cb)],'status':_0x275018(0x208)};const _0x3479b4=resolveTableMetadata(_0x95d81a,_0x8b5e23['table']),_0xe1f5e=(_0x3479b4?.['indexes']??[])['map'](_0x4aa281=>({'index':_0x4aa281,'matchedPrefix':findEqualityPrefix(_0x4aa281[_0x275018(0x1cb)],_0x8b5e23[_0x275018(0x1cb)])}))[_0x275018(0x1e7)](_0x1985fe=>_0x1985fe['matchedPrefix'][_0x275018(0x1f8)]>0x0),_0x22e363=_0xe1f5e['reduce']((_0x42ffa5,_0x1315b4)=>!_0x42ffa5||_0x1315b4[_0x275018(0x1ec)][_0x275018(0x1f8)]>_0x42ffa5[_0x275018(0x1ec)]['length']?_0x1315b4:_0x42ffa5,_0xe1f5e[0x0]);if(_0x22e363)return{'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23['columns'],'status':_0x275018(0x1ff),'matchedIndex':{..._0x22e363[_0x275018(0x1ef)],'matchedPrefix':_0x22e363[_0x275018(0x1ec)]}};const _0x371d7b=_0x3479b4?.[_0x275018(0x1d1)][_0x275018(0x1e7)](_0x2a3f28=>_0x2a3f28[_0x275018(0x1cb)]['some'](_0x50826a=>_0x8b5e23['columns']['some'](_0x97b264=>columnNamesMatch(_0x50826a,_0x97b264))))??[];if(_0x371d7b[_0x275018(0x1f8)]>0x0)return _0x54c3f5[_0x275018(0x1e3)]({'code':_0x275018(0x20a),'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23['columns'],'reason':_0x275018(0x1e8)}),{'table':_0x8b5e23['table'],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23['columns'],'status':'warning','candidateIndexes':_0x371d7b};if(_0x3479b4&&_0x3479b4[_0x275018(0x1f3)]!==![]&&_0x3479b4[_0x275018(0x1d1)][_0x275018(0x1f8)]>0x0&&_0x8b5e23[_0x275018(0x1cb)][_0x275018(0x1f8)]>0x0)return _0x54c3f5['push']({'code':_0x275018(0x1d7),'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23[_0x275018(0x1cb)],'reason':_0x275018(0x20c)}),{'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23[_0x275018(0x1cb)],'status':_0x275018(0x1c6)};return _0x54c3f5[_0x275018(0x1e3)]({'code':_0x275018(0x1db),'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23[_0x275018(0x1cb)],'reason':_0x3479b4?_0x275018(0x212):_0x275018(0x206)}),{'table':_0x8b5e23['table'],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23[_0x275018(0x1cb)],'status':_0x275018(0x208)};});return{'checked':_0x30927f['length']>0x0,'joins':_0x30927f,'warnings':_0x54c3f5};}function extractJoinFacts(_0x5186b4){const _0x208ddc=a295_0x3052,_0x1c767f=maskNestedQueries(stripSqlNoise(_0x5186b4)),_0x379db2=maskQuotedIdentifiers(_0x1c767f),_0x5a8aa3=[],_0xe08130=new Set(),_0x5c1684=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0x3c2de8 of _0x1c767f[_0x208ddc(0x20d)](_0x5c1684)){const _0x5fba63=_0x3c2de8[_0x208ddc(0x1ef)]??0x0,_0x52d13f=_0x3c2de8[0x0][_0x208ddc(0x1f7)](/\bJOIN\b/i),_0x35b548=_0x5fba63+Math['max'](0x0,_0x52d13f);if(!/^JOIN\b/i[_0x208ddc(0x203)](_0x379db2['slice'](_0x35b548)))continue;_0xe08130['add'](_0x35b548);const _0x46bcce=normalizeIdentifier(_0x3c2de8[0x1]||_0x208ddc(0x1fc)),_0xf1851b=normalizeIdentifier(_0x3c2de8[0x2]??''),_0x25bc38=normalizeIdentifier(_0x3c2de8[0x3]||_0xf1851b[_0x208ddc(0x1fd)]('.')['at'](-0x1)||_0xf1851b),_0x420077=[],_0x341d03=_0xf1851b===_0x208ddc(0x1cf);let _0x44e384=_0x46bcce===_0x208ddc(0x1e0)||_0x46bcce===_0x208ddc(0x1dd)||_0x341d03,_0x48c089=_0x44e384?_0x341d03?_0x208ddc(0x1fe):_0x46bcce[_0x208ddc(0x1f2)]()+_0x208ddc(0x1d0):undefined;const _0x301aec=stripOuterParentheses(_0x3c2de8[0x4]??''),_0x2ba56b=_0x301aec['includes'](MYBATIS_DYNAMIC_START_MARKER)||_0x301aec[_0x208ddc(0x1eb)](MYBATIS_DYNAMIC_END_MARKER),_0x571a06=_0x301aec['includes'](MYBATIS_INCLUDE_MARKER);_0x2ba56b&&(_0x44e384=!![],_0x48c089??=_0x208ddc(0x1d2));_0x571a06&&(_0x44e384=!![],_0x48c089??=_0x208ddc(0x1cd));const _0x49303f=_0x301aec[_0x208ddc(0x1f4)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x208ddc(0x1f4)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x49303f,'OR')&&(_0x44e384=!![],_0x48c089??=_0x208ddc(0x1e2));for(const _0xd2dfb of splitTopLevelAnd(_0x49303f)){const _0x34bd5c=stripOuterParentheses(_0xd2dfb);if(hasTopLevelKeyword(_0x34bd5c,'OR')){_0x44e384=!![],_0x48c089??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x5ba7a1=splitEquality(_0x34bd5c);if(!_0x5ba7a1){containsColumnReference(_0xd2dfb,_0x25bc38)&&(_0x44e384=!![]);continue;}const _0x13b5b5=parseDirectColumnReference(_0x5ba7a1[0x0],_0x25bc38),_0x35475d=parseDirectColumnReference(_0x5ba7a1[0x1],_0x25bc38),_0x25eb51=containsColumnReference(_0x5ba7a1[0x0],_0x25bc38),_0x2c33cd=containsColumnReference(_0x5ba7a1[0x1],_0x25bc38),_0x1f0cc3=_0x13b5b5&&!_0x2c33cd?_0x13b5b5:_0x35475d&&!_0x25eb51?_0x35475d:null;if(_0x1f0cc3&&!_0x420077['includes'](_0x1f0cc3))_0x420077['push'](_0x1f0cc3);else!_0x1f0cc3&&containsColumnReference(_0xd2dfb,_0x25bc38)&&(_0x44e384=!![]);}_0x5a8aa3['push']({'table':_0xf1851b,'alias':_0x25bc38,'columns':_0x420077,'unsupportedPredicate':_0x44e384,'unsupportedReason':_0x48c089,'containsUnresolvedInclude':_0x571a06,'position':_0x35b548});}for(const _0xbd21dd of _0x379db2['matchAll'](/\bJOIN\b/gi)){const _0x3361ba=_0xbd21dd[_0x208ddc(0x1ef)]??0x0;if(_0xe08130[_0x208ddc(0x1fa)](_0x3361ba))continue;const _0xe2f598=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x208ddc(0x1e6)](_0x1c767f['slice'](_0x3361ba+_0xbd21dd[0x0][_0x208ddc(0x1f8)])),_0x1f35c8=normalizeIdentifier(_0xe2f598?.[0x1]||'unknown'),_0x2ad0c9=normalizeIdentifier(_0xe2f598?.[0x2]||''),_0x2dacbd=isSqlClauseKeyword(_0x2ad0c9)?_0x1f35c8[_0x208ddc(0x1fd)]('.')['at'](-0x1)||_0x1f35c8:_0x2ad0c9||_0x1f35c8[_0x208ddc(0x1fd)]('.')['at'](-0x1)||_0x1f35c8;_0x5a8aa3['push']({'table':_0x1f35c8,'alias':_0x2dacbd,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x208ddc(0x1c9),'position':_0x3361ba});}const _0x10e978=_0x379db2['indexOf'](MYBATIS_INCLUDE_MARKER);return _0x10e978>=0x0&&!_0x5a8aa3[_0x208ddc(0x200)](_0x4710b7=>_0x4710b7[_0x208ddc(0x1d5)])&&_0x5a8aa3[_0x208ddc(0x1e3)]({'table':_0x208ddc(0x20b),'alias':_0x208ddc(0x20b),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x208ddc(0x1c8),'containsUnresolvedInclude':!![],'position':_0x10e978}),_0x5a8aa3['sort']((_0x35cd2e,_0x36d32d)=>_0x35cd2e[_0x208ddc(0x205)]-_0x36d32d[_0x208ddc(0x205)]);}function stripSqlNoise(_0x4838d6){const _0x499909=a295_0x3052,_0x3031ee=Array['from'](_0x4838d6),_0x505bf8=(_0x4b19a7,_0x14d86f)=>{for(let _0x2b29db=_0x4b19a7;_0x2b29db<_0x14d86f;_0x2b29db+=0x1){_0x3031ee[_0x2b29db]!=='\x0a'&&_0x3031ee[_0x2b29db]!=='\x0d'&&(_0x3031ee[_0x2b29db]='\x20');}};for(let _0xe65b1b=0x0;_0xe65b1b<_0x3031ee[_0x499909(0x1f8)];_0xe65b1b+=0x1){const _0xdffd53=_0x3031ee[_0xe65b1b],_0x533107=_0x3031ee[_0xe65b1b+0x1];if(_0xdffd53==='\x27'||_0xdffd53==='\x22'||_0xdffd53==='`'){const _0x26dfd6=_0xdffd53,_0x5974a0=_0xe65b1b;_0xe65b1b+=0x1;while(_0xe65b1b<_0x3031ee['length']){if(_0x3031ee[_0xe65b1b]==='\x5c'&&_0xe65b1b+0x1<_0x3031ee[_0x499909(0x1f8)]){_0xe65b1b+=0x2;continue;}if(_0x3031ee[_0xe65b1b]!==_0x26dfd6){_0xe65b1b+=0x1;continue;}if(_0x3031ee[_0xe65b1b+0x1]===_0x26dfd6){_0xe65b1b+=0x2;continue;}break;}if(_0x26dfd6==='\x27')_0x505bf8(_0x5974a0,Math[_0x499909(0x1d6)](_0xe65b1b+0x1,_0x3031ee['length']));continue;}if(_0xdffd53==='-'&&_0x533107==='-'){const _0xdf462e=_0xe65b1b;while(_0xe65b1b<_0x3031ee[_0x499909(0x1f8)]&&_0x3031ee[_0xe65b1b]!=='\x0a')_0xe65b1b+=0x1;_0x505bf8(_0xdf462e,_0xe65b1b);continue;}if(_0xdffd53==='/'&&_0x533107==='*'){const _0x5b7c24=_0xe65b1b;_0xe65b1b+=0x2;while(_0xe65b1b<_0x3031ee['length']&&!(_0x3031ee[_0xe65b1b]==='*'&&_0x3031ee[_0xe65b1b+0x1]==='/')){_0xe65b1b+=0x1;}_0xe65b1b=Math['min'](_0xe65b1b+0x1,_0x3031ee[_0x499909(0x1f8)]-0x1),_0x505bf8(_0x5b7c24,_0xe65b1b+0x1);continue;}if(_0xdffd53==='#'&&_0x533107!=='{'){const _0x481349=_0xe65b1b;while(_0xe65b1b<_0x3031ee[_0x499909(0x1f8)]&&_0x3031ee[_0xe65b1b]!=='\x0a')_0xe65b1b+=0x1;_0x505bf8(_0x481349,_0xe65b1b);continue;}if((_0xdffd53==='#'||_0xdffd53==='$')&&_0x533107==='{'){const _0x181572=_0xe65b1b;_0xe65b1b+=0x2;while(_0xe65b1b<_0x3031ee['length']&&_0x3031ee[_0xe65b1b]!=='}')_0xe65b1b+=0x1;_0x505bf8(_0x181572,Math['min'](_0xe65b1b+0x1,_0x3031ee[_0x499909(0x1f8)]));}}return _0x3031ee[_0x499909(0x1e1)]('');}function maskQuotedIdentifiers(_0x2ce868){const _0x404652=a295_0x3052,_0x27be75=Array['from'](_0x2ce868);for(let _0x29b794=0x0;_0x29b794<_0x27be75[_0x404652(0x1f8)];_0x29b794+=0x1){const _0x2a5692=_0x27be75[_0x29b794];if(_0x2a5692!=='\x22'&&_0x2a5692!=='`')continue;_0x29b794+=0x1;while(_0x29b794<_0x27be75[_0x404652(0x1f8)]){if(_0x27be75[_0x29b794]===_0x2a5692){if(_0x27be75[_0x29b794+0x1]===_0x2a5692){_0x27be75[_0x29b794]='\x20',_0x27be75[_0x29b794+0x1]='\x20',_0x29b794+=0x2;continue;}break;}_0x27be75[_0x29b794]='\x20',_0x29b794+=0x1;}}return _0x27be75['join']('');}function maskNestedQueries(_0x4730da){const _0x3c0c1f=a295_0x3052,_0x2c39bf=Array[_0x3c0c1f(0x1f0)](_0x4730da);for(let _0x3faa5a=0x0;_0x3faa5a<_0x2c39bf[_0x3c0c1f(0x1f8)];_0x3faa5a+=0x1){if(_0x2c39bf[_0x3faa5a]!=='(')continue;const _0x365642=_0x4730da[_0x3c0c1f(0x1e5)](_0x3faa5a+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x3c0c1f(0x203)](_0x365642))continue;let _0x5904b5=0x1,_0x30ae67=_0x3faa5a+0x1;for(;_0x30ae67<_0x2c39bf[_0x3c0c1f(0x1f8)]&&_0x5904b5>0x0;_0x30ae67+=0x1){if(_0x2c39bf[_0x30ae67]==='(')_0x5904b5+=0x1;if(_0x2c39bf[_0x30ae67]===')')_0x5904b5-=0x1;}if(_0x5904b5!==0x0)continue;for(let _0x32d125=_0x3faa5a;_0x32d125<_0x30ae67;_0x32d125+=0x1){_0x2c39bf[_0x32d125]='\x20';}const _0x12fb8e=_0x3c0c1f(0x1cf);for(let _0x410559=0x0;_0x410559<_0x12fb8e['length']&&_0x3faa5a+_0x410559<_0x30ae67;_0x410559+=0x1){_0x2c39bf[_0x3faa5a+_0x410559]=_0x12fb8e[_0x410559];}_0x3faa5a=_0x30ae67-0x1;}return _0x2c39bf[_0x3c0c1f(0x1e1)]('');}function splitTopLevelAnd(_0xa98603){const _0x323969=a295_0x3052,_0x2e7a72=[];let _0x1be3da=0x0,_0x5dde73=0x0;for(let _0x52bf23=0x0;_0x52bf23<_0xa98603[_0x323969(0x1f8)];_0x52bf23+=0x1){const _0x333ef0=_0xa98603[_0x52bf23];if(_0x333ef0==='(')_0x1be3da+=0x1;if(_0x333ef0===')')_0x1be3da=Math[_0x323969(0x1d9)](0x0,_0x1be3da-0x1);_0x1be3da===0x0&&_0xa98603[_0x323969(0x1e5)](_0x52bf23)[_0x323969(0x1cc)](/^AND\b/i)&&(_0x52bf23===0x0||/\s/[_0x323969(0x203)](_0xa98603[_0x52bf23-0x1]??''))&&(_0x2e7a72['push'](_0xa98603[_0x323969(0x1e5)](_0x5dde73,_0x52bf23)[_0x323969(0x201)]()),_0x52bf23+=0x2,_0x5dde73=_0x52bf23+0x1);}const _0x32fa53=_0xa98603['slice'](_0x5dde73)[_0x323969(0x201)]();if(_0x32fa53)_0x2e7a72[_0x323969(0x1e3)](_0x32fa53);return _0x2e7a72;}function hasTopLevelKeyword(_0x211b31,_0x428578){const _0x597c34=a295_0x3052;let _0x4b163c=0x0;for(let _0x3d8e23=0x0;_0x3d8e23<_0x211b31['length'];_0x3d8e23+=0x1){const _0x2e0667=_0x211b31[_0x3d8e23];if(_0x2e0667==='(')_0x4b163c+=0x1;if(_0x2e0667===')')_0x4b163c=Math[_0x597c34(0x1d9)](0x0,_0x4b163c-0x1);if(_0x4b163c!==0x0)continue;const _0x1d1074=_0x211b31[_0x597c34(0x1e5)](_0x3d8e23,_0x3d8e23+_0x428578[_0x597c34(0x1f8)]),_0x4dc4f0=_0x211b31[_0x3d8e23-0x1]??'\x20',_0x4b7e59=_0x211b31[_0x3d8e23+_0x428578[_0x597c34(0x1f8)]]??'\x20';if(_0x1d1074['toUpperCase']()===_0x428578['toUpperCase']()&&!/[\w$]/['test'](_0x4dc4f0)&&!/[\w$]/[_0x597c34(0x203)](_0x4b7e59))return!![];}return![];}function splitEquality(_0x23f0ae){const _0x2265b1=a295_0x3052,_0x483fe9=stripOuterParentheses(_0x23f0ae);let _0x2e91e1=0x0,_0x266f84;for(let _0x21250e=0x0;_0x21250e<_0x483fe9[_0x2265b1(0x1f8)];_0x21250e+=0x1){const _0x561b1f=_0x483fe9[_0x21250e];if(_0x561b1f==='(')_0x2e91e1+=0x1;if(_0x561b1f===')')_0x2e91e1=Math[_0x2265b1(0x1d9)](0x0,_0x2e91e1-0x1);const _0xff779a=_0x483fe9[_0x21250e-0x1]??'',_0x471fe0=_0x483fe9[_0x21250e+0x1]??'';if(_0x561b1f==='='&&_0x2e91e1===0x0&&!/[!<>=:]/[_0x2265b1(0x203)](_0xff779a)&&_0x471fe0!=='='){if(_0x266f84!==undefined)return null;_0x266f84=_0x21250e;}}return _0x266f84===undefined?null:[_0x483fe9[_0x2265b1(0x1e5)](0x0,_0x266f84)['trim'](),_0x483fe9[_0x2265b1(0x1e5)](_0x266f84+0x1)[_0x2265b1(0x201)]()];}function a295_0x47b7(){const _0x1d593e=['\x5c$&','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','2FkrqWq','warning','2615081GdCHik','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','toLowerCase','columns','match','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','cross','__sq__','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','indexes','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','map','containsUnresolvedInclude','min','JOIN_INDEX_MISSING','inner','max','\x5cs*\x5c.\x5cs*[\x5cw$]+','INDEX_METADATA_UNAVAILABLE','where','full','1701592orLacp','7551ZkaCKF','right','join','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','push','unsupportedPredicate','slice','exec','filter','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','7344070zeRthz','765192XJeDZp','includes','matchedPrefix','replace','(?:^|[^\x5cw$])','index','from','table','toUpperCase','metadataAvailable','replaceAll','natural','19810ymsLCD','search','length','tableName','has','7892wdzRPx','INNER','split','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','covered','some','trim','sql','test','JOIN_PREDICATE_UNSUPPORTED','position','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','left','unavailable','startsWith','JOIN_INDEX_NOT_USABLE','unknown','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','matchAll','1791858ymTyCj','alias','12QqJCJi'];a295_0x47b7=function(){return _0x1d593e;};return a295_0x47b7();}function parseDirectColumnReference(_0x4290b1,_0xf38026){const _0x420fae=a295_0x3052,_0x2b888b=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x420fae(0x1e6)](stripOuterParentheses(_0x4290b1));if(!_0x2b888b)return null;if(normalizeIdentifier(_0x2b888b[0x1]??'')!==normalizeIdentifier(_0xf38026))return null;return normalizeIdentifier(_0x2b888b[0x2]??'');}function containsColumnReference(_0x240f76,_0x2a8c27){const _0x1ed16b=a295_0x3052,_0x2100ed=_0x240f76[_0x1ed16b(0x1ed)](/[`"]/g,''),_0x3798fb=_0x2a8c27[_0x1ed16b(0x1ed)](/[.*+?^${}()|[\]\\]/g,_0x1ed16b(0x211));return new RegExp(_0x1ed16b(0x1ee)+_0x3798fb+_0x1ed16b(0x1da),'i')[_0x1ed16b(0x203)](_0x2100ed);}function findEqualityPrefix(_0x16b676,_0x4e164d){const _0x3e67c5=a295_0x3052,_0x436b50=new Set(_0x4e164d['map'](normalizeIdentifier)),_0x2f1c54=[];for(const _0x1b4fbb of _0x16b676){if(!_0x436b50[_0x3e67c5(0x1fa)](normalizeIdentifier(_0x1b4fbb)))break;_0x2f1c54[_0x3e67c5(0x1e3)](_0x1b4fbb);}return _0x2f1c54;}function resolveTableMetadata(_0x2515f9,_0x414226){const _0x5735a7=a295_0x3052,_0x236047=normalizeIdentifier(_0x414226),_0x189b5d=_0x2515f9[_0x5735a7(0x1e7)](_0x5a6420=>normalizeIdentifier(_0x5a6420[_0x5735a7(0x1f9)])===_0x236047);if(_0x189b5d[_0x5735a7(0x1f8)]===0x1)return _0x189b5d[0x0];const _0x1580f7=_0x236047[_0x5735a7(0x1eb)]('.'),_0x463aaa=_0x236047['split']('.')['at'](-0x1),_0x5c9437=_0x2515f9[_0x5735a7(0x1e7)](_0x278220=>{const _0x4adcaf=_0x5735a7,_0xd83921=normalizeIdentifier(_0x278220['tableName']);if(_0x1580f7&&_0xd83921[_0x4adcaf(0x1eb)]('.'))return![];return _0xd83921['split']('.')['at'](-0x1)===_0x463aaa;});return _0x5c9437[_0x5735a7(0x1f8)]===0x1?_0x5c9437[0x0]:undefined;}function columnNamesMatch(_0x5a0178,_0x2d824d){return normalizeIdentifier(_0x5a0178)===normalizeIdentifier(_0x2d824d);}function normalizeIdentifier(_0x33e017){const _0x32fee9=a295_0x3052;return _0x33e017[_0x32fee9(0x1ed)](/[`"]/g,'')['trim']()[_0x32fee9(0x1ca)]();}function isSqlClauseKeyword(_0x34dfd8){const _0x5e8a03=a295_0x3052;return new Set(['on','using',_0x5e8a03(0x1dc),_0x5e8a03(0x1e1),_0x5e8a03(0x1d8),_0x5e8a03(0x207),_0x5e8a03(0x1e0),_0x5e8a03(0x1dd),_0x5e8a03(0x1ce),_0x5e8a03(0x1f5)])[_0x5e8a03(0x1fa)](_0x34dfd8);}function a295_0x3052(_0x38846b,_0x42123e){_0x38846b=_0x38846b-0x1c5;const _0x47b7a8=a295_0x47b7();let _0x305265=_0x47b7a8[_0x38846b];return _0x305265;}function stripOuterParentheses(_0x563c9d){const _0x53e1a0=a295_0x3052;let _0x444076=_0x563c9d[_0x53e1a0(0x201)]();while(_0x444076[_0x53e1a0(0x209)]('(')&&_0x444076['endsWith'](')')){let _0x20bfb8=0x0,_0x798cbb=!![];for(let _0x18ffed=0x0;_0x18ffed<_0x444076[_0x53e1a0(0x1f8)];_0x18ffed+=0x1){if(_0x444076[_0x18ffed]==='(')_0x20bfb8+=0x1;if(_0x444076[_0x18ffed]===')')_0x20bfb8-=0x1;if(_0x20bfb8===0x0&&_0x18ffed<_0x444076[_0x53e1a0(0x1f8)]-0x1){_0x798cbb=![];break;}}if(!_0x798cbb||_0x20bfb8!==0x0)break;_0x444076=_0x444076[_0x53e1a0(0x1e5)](0x1,-0x1)[_0x53e1a0(0x201)]();}return _0x444076;}
1
+ (function(_0x24ba25,_0x353df4){const _0x403af9=a295_0x515a,_0x1db17d=_0x24ba25();while(!![]){try{const _0x24e394=parseInt(_0x403af9(0x1e7))/0x1*(-parseInt(_0x403af9(0x202))/0x2)+-parseInt(_0x403af9(0x21c))/0x3+-parseInt(_0x403af9(0x1e5))/0x4+-parseInt(_0x403af9(0x220))/0x5+parseInt(_0x403af9(0x1f0))/0x6+parseInt(_0x403af9(0x222))/0x7*(parseInt(_0x403af9(0x229))/0x8)+parseInt(_0x403af9(0x21b))/0x9*(parseInt(_0x403af9(0x218))/0xa);if(_0x24e394===_0x353df4)break;else _0x1db17d['push'](_0x1db17d['shift']());}catch(_0x10781e){_0x1db17d['push'](_0x1db17d['shift']());}}}(a295_0x15b0,0x382ea));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x1d22f7,_0x2dd330){const _0x40e352=a295_0x515a,_0x57c8e2=[],_0x23179a=normalizeSqlForStaticAnalysis(_0x1d22f7),_0x19d6ca=(_0x23179a['error']?[]:extractJoinFacts(_0x23179a['sql']))[_0x40e352(0x217)](_0x93f9a3=>{const _0x24e9fa=_0x40e352;if(_0x93f9a3[_0x24e9fa(0x22f)]||_0x93f9a3[_0x24e9fa(0x20a)]['length']===0x0)return _0x57c8e2[_0x24e9fa(0x216)]({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'reason':_0x93f9a3[_0x24e9fa(0x210)]??_0x24e9fa(0x1ee)}),{'table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3['columns'],'status':_0x24e9fa(0x209)};const _0x2a002b=resolveTableMetadata(_0x2dd330,_0x93f9a3[_0x24e9fa(0x205)]),_0x2b1f31=(_0x2a002b?.[_0x24e9fa(0x212)]??[])[_0x24e9fa(0x217)](_0x2b5ed4=>({'index':_0x2b5ed4,'matchedPrefix':findEqualityPrefix(_0x2b5ed4[_0x24e9fa(0x20a)],_0x93f9a3[_0x24e9fa(0x20a)])}))[_0x24e9fa(0x1ed)](_0x593258=>_0x593258['matchedPrefix'][_0x24e9fa(0x22d)]>0x0),_0x1c36fc=_0x2b1f31[_0x24e9fa(0x1f9)]((_0x3d2168,_0x2aa58c)=>!_0x3d2168||_0x2aa58c[_0x24e9fa(0x206)]['length']>_0x3d2168['matchedPrefix'][_0x24e9fa(0x22d)]?_0x2aa58c:_0x3d2168,_0x2b1f31[0x0]);if(_0x1c36fc)return{'table':_0x93f9a3['table'],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'status':_0x24e9fa(0x1fd),'matchedIndex':{..._0x1c36fc['index'],'matchedPrefix':_0x1c36fc[_0x24e9fa(0x206)]}};const _0x2532f9=_0x2a002b?.[_0x24e9fa(0x212)]['filter'](_0x3c1ea4=>_0x3c1ea4[_0x24e9fa(0x20a)][_0x24e9fa(0x1f6)](_0x4a546b=>_0x93f9a3[_0x24e9fa(0x20a)][_0x24e9fa(0x1f6)](_0x40fa88=>columnNamesMatch(_0x4a546b,_0x40fa88))))??[];if(_0x2532f9[_0x24e9fa(0x22d)]>0x0)return _0x57c8e2['push']({'code':_0x24e9fa(0x226),'table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'status':_0x24e9fa(0x201),'candidateIndexes':_0x2532f9};if(_0x2a002b&&_0x2a002b['metadataAvailable']!==![]&&_0x2a002b[_0x24e9fa(0x212)][_0x24e9fa(0x22d)]>0x0&&_0x93f9a3[_0x24e9fa(0x20a)][_0x24e9fa(0x22d)]>0x0)return _0x57c8e2[_0x24e9fa(0x216)]({'code':_0x24e9fa(0x22a),'table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'status':_0x24e9fa(0x201)};return _0x57c8e2[_0x24e9fa(0x216)]({'code':'INDEX_METADATA_UNAVAILABLE','table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'reason':_0x2a002b?_0x24e9fa(0x1e9):'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x93f9a3['table'],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3['columns'],'status':_0x24e9fa(0x209)};});return{'checked':_0x19d6ca['length']>0x0,'joins':_0x19d6ca,'warnings':_0x57c8e2};}function extractJoinFacts(_0x61a013){const _0x270436=a295_0x515a,_0x51cef4=maskNestedQueries(stripSqlNoise(_0x61a013)),_0x1e09ed=maskQuotedIdentifiers(_0x51cef4),_0x549e49=[],_0x202280=new Set(),_0x1edae7=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0x4444ea of _0x51cef4[_0x270436(0x224)](_0x1edae7)){const _0x1425ee=_0x4444ea[_0x270436(0x214)]??0x0,_0x3b96ce=_0x4444ea[0x0][_0x270436(0x21f)](/\bJOIN\b/i),_0x51b3dd=_0x1425ee+Math[_0x270436(0x1f2)](0x0,_0x3b96ce);if(!/^JOIN\b/i[_0x270436(0x1f8)](_0x1e09ed['slice'](_0x51b3dd)))continue;_0x202280[_0x270436(0x1fa)](_0x51b3dd);const _0x13fa66=normalizeIdentifier(_0x4444ea[0x1]||_0x270436(0x225)),_0x454d9b=normalizeIdentifier(_0x4444ea[0x2]??''),_0x592d34=normalizeIdentifier(_0x4444ea[0x3]||_0x454d9b[_0x270436(0x22e)]('.')['at'](-0x1)||_0x454d9b),_0x4ad2f3=[],_0x4afe3b=_0x454d9b===_0x270436(0x1ef);let _0x3e48cf=_0x13fa66===_0x270436(0x1e8)||_0x13fa66===_0x270436(0x204)||_0x4afe3b,_0xdcb82a=_0x3e48cf?_0x4afe3b?_0x270436(0x22c):_0x13fa66[_0x270436(0x1f5)]()+_0x270436(0x208):undefined;const _0x570d2e=stripOuterParentheses(_0x4444ea[0x4]??''),_0x1c2b26=_0x570d2e[_0x270436(0x1f7)](MYBATIS_DYNAMIC_START_MARKER)||_0x570d2e['includes'](MYBATIS_DYNAMIC_END_MARKER),_0xf6772a=_0x570d2e['includes'](MYBATIS_INCLUDE_MARKER);_0x1c2b26&&(_0x3e48cf=!![],_0xdcb82a??=_0x270436(0x1fe));_0xf6772a&&(_0x3e48cf=!![],_0xdcb82a??=_0x270436(0x20e));const _0xe54fe5=_0x570d2e[_0x270436(0x227)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x270436(0x227)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0xe54fe5,'OR')&&(_0x3e48cf=!![],_0xdcb82a??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x5d823f of splitTopLevelAnd(_0xe54fe5)){const _0xd44f6a=stripOuterParentheses(_0x5d823f);if(hasTopLevelKeyword(_0xd44f6a,'OR')){_0x3e48cf=!![],_0xdcb82a??=_0x270436(0x1ec);continue;}const _0x490015=splitEquality(_0xd44f6a);if(!_0x490015){containsColumnReference(_0x5d823f,_0x592d34)&&(_0x3e48cf=!![]);continue;}const _0x1ef697=parseDirectColumnReference(_0x490015[0x0],_0x592d34),_0x277e3d=parseDirectColumnReference(_0x490015[0x1],_0x592d34),_0x360e45=containsColumnReference(_0x490015[0x0],_0x592d34),_0xfc0ae3=containsColumnReference(_0x490015[0x1],_0x592d34),_0x508720=_0x1ef697&&!_0xfc0ae3?_0x1ef697:_0x277e3d&&!_0x360e45?_0x277e3d:null;if(_0x508720&&!_0x4ad2f3[_0x270436(0x1f7)](_0x508720))_0x4ad2f3['push'](_0x508720);else!_0x508720&&containsColumnReference(_0x5d823f,_0x592d34)&&(_0x3e48cf=!![]);}_0x549e49['push']({'table':_0x454d9b,'alias':_0x592d34,'columns':_0x4ad2f3,'unsupportedPredicate':_0x3e48cf,'unsupportedReason':_0xdcb82a,'containsUnresolvedInclude':_0xf6772a,'position':_0x51b3dd});}for(const _0x2f49fc of _0x1e09ed[_0x270436(0x224)](/\bJOIN\b/gi)){const _0x3ee1e9=_0x2f49fc['index']??0x0;if(_0x202280['has'](_0x3ee1e9))continue;const _0x229991=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x270436(0x21a)](_0x51cef4['slice'](_0x3ee1e9+_0x2f49fc[0x0][_0x270436(0x22d)])),_0x5080b4=normalizeIdentifier(_0x229991?.[0x1]||_0x270436(0x215)),_0x32571f=normalizeIdentifier(_0x229991?.[0x2]||''),_0x2233e8=isSqlClauseKeyword(_0x32571f)?_0x5080b4[_0x270436(0x22e)]('.')['at'](-0x1)||_0x5080b4:_0x32571f||_0x5080b4['split']('.')['at'](-0x1)||_0x5080b4;_0x549e49['push']({'table':_0x5080b4,'alias':_0x2233e8,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x270436(0x20b),'position':_0x3ee1e9});}const _0x2ea90b=_0x1e09ed[_0x270436(0x1f3)](MYBATIS_INCLUDE_MARKER);return _0x2ea90b>=0x0&&!_0x549e49[_0x270436(0x1f6)](_0x2c2ba2=>_0x2c2ba2[_0x270436(0x20f)])&&_0x549e49['push']({'table':_0x270436(0x215),'alias':'unknown','columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x270436(0x21d),'containsUnresolvedInclude':!![],'position':_0x2ea90b}),_0x549e49['sort']((_0x4caf08,_0x17dd82)=>_0x4caf08[_0x270436(0x21e)]-_0x17dd82['position']);}function stripSqlNoise(_0x4fae9a){const _0x16c722=a295_0x515a,_0x178dc0=Array[_0x16c722(0x1f4)](_0x4fae9a),_0x3aaaf3=(_0x54b7c9,_0x18da17)=>{for(let _0x4c6108=_0x54b7c9;_0x4c6108<_0x18da17;_0x4c6108+=0x1){_0x178dc0[_0x4c6108]!=='\x0a'&&_0x178dc0[_0x4c6108]!=='\x0d'&&(_0x178dc0[_0x4c6108]='\x20');}};for(let _0xd1ed45=0x0;_0xd1ed45<_0x178dc0[_0x16c722(0x22d)];_0xd1ed45+=0x1){const _0x4397de=_0x178dc0[_0xd1ed45],_0x4757a7=_0x178dc0[_0xd1ed45+0x1];if(_0x4397de==='\x27'||_0x4397de==='\x22'||_0x4397de==='`'){const _0x451b72=_0x4397de,_0x4eb4fc=_0xd1ed45;_0xd1ed45+=0x1;while(_0xd1ed45<_0x178dc0[_0x16c722(0x22d)]){if(_0x178dc0[_0xd1ed45]==='\x5c'&&_0xd1ed45+0x1<_0x178dc0['length']){_0xd1ed45+=0x2;continue;}if(_0x178dc0[_0xd1ed45]!==_0x451b72){_0xd1ed45+=0x1;continue;}if(_0x178dc0[_0xd1ed45+0x1]===_0x451b72){_0xd1ed45+=0x2;continue;}break;}if(_0x451b72==='\x27')_0x3aaaf3(_0x4eb4fc,Math[_0x16c722(0x20c)](_0xd1ed45+0x1,_0x178dc0['length']));continue;}if(_0x4397de==='-'&&_0x4757a7==='-'){const _0x4705d2=_0xd1ed45;while(_0xd1ed45<_0x178dc0[_0x16c722(0x22d)]&&_0x178dc0[_0xd1ed45]!=='\x0a')_0xd1ed45+=0x1;_0x3aaaf3(_0x4705d2,_0xd1ed45);continue;}if(_0x4397de==='/'&&_0x4757a7==='*'){const _0x23eae6=_0xd1ed45;_0xd1ed45+=0x2;while(_0xd1ed45<_0x178dc0[_0x16c722(0x22d)]&&!(_0x178dc0[_0xd1ed45]==='*'&&_0x178dc0[_0xd1ed45+0x1]==='/')){_0xd1ed45+=0x1;}_0xd1ed45=Math[_0x16c722(0x20c)](_0xd1ed45+0x1,_0x178dc0[_0x16c722(0x22d)]-0x1),_0x3aaaf3(_0x23eae6,_0xd1ed45+0x1);continue;}if(_0x4397de==='#'&&_0x4757a7!=='{'){const _0x539818=_0xd1ed45;while(_0xd1ed45<_0x178dc0[_0x16c722(0x22d)]&&_0x178dc0[_0xd1ed45]!=='\x0a')_0xd1ed45+=0x1;_0x3aaaf3(_0x539818,_0xd1ed45);continue;}if((_0x4397de==='#'||_0x4397de==='$')&&_0x4757a7==='{'){const _0x2830f7=_0xd1ed45;_0xd1ed45+=0x2;while(_0xd1ed45<_0x178dc0['length']&&_0x178dc0[_0xd1ed45]!=='}')_0xd1ed45+=0x1;_0x3aaaf3(_0x2830f7,Math[_0x16c722(0x20c)](_0xd1ed45+0x1,_0x178dc0[_0x16c722(0x22d)]));}}return _0x178dc0[_0x16c722(0x1eb)]('');}function maskQuotedIdentifiers(_0x707068){const _0x31cddc=a295_0x515a,_0x2bc811=Array['from'](_0x707068);for(let _0x4c9762=0x0;_0x4c9762<_0x2bc811[_0x31cddc(0x22d)];_0x4c9762+=0x1){const _0x370fa6=_0x2bc811[_0x4c9762];if(_0x370fa6!=='\x22'&&_0x370fa6!=='`')continue;_0x4c9762+=0x1;while(_0x4c9762<_0x2bc811[_0x31cddc(0x22d)]){if(_0x2bc811[_0x4c9762]===_0x370fa6){if(_0x2bc811[_0x4c9762+0x1]===_0x370fa6){_0x2bc811[_0x4c9762]='\x20',_0x2bc811[_0x4c9762+0x1]='\x20',_0x4c9762+=0x2;continue;}break;}_0x2bc811[_0x4c9762]='\x20',_0x4c9762+=0x1;}}return _0x2bc811['join']('');}function maskNestedQueries(_0x180abf){const _0xf5f17e=a295_0x515a,_0x2fc068=Array[_0xf5f17e(0x1f4)](_0x180abf);for(let _0x4a8872=0x0;_0x4a8872<_0x2fc068[_0xf5f17e(0x22d)];_0x4a8872+=0x1){if(_0x2fc068[_0x4a8872]!=='(')continue;const _0x213542=_0x180abf[_0xf5f17e(0x219)](_0x4a8872+0x1);if(!/^\s*(?:SELECT|WITH)\b/i['test'](_0x213542))continue;let _0x194193=0x1,_0x1b8ceb=_0x4a8872+0x1;for(;_0x1b8ceb<_0x2fc068['length']&&_0x194193>0x0;_0x1b8ceb+=0x1){if(_0x2fc068[_0x1b8ceb]==='(')_0x194193+=0x1;if(_0x2fc068[_0x1b8ceb]===')')_0x194193-=0x1;}if(_0x194193!==0x0)continue;for(let _0x85bb1e=_0x4a8872;_0x85bb1e<_0x1b8ceb;_0x85bb1e+=0x1){_0x2fc068[_0x85bb1e]='\x20';}const _0x23b811=_0xf5f17e(0x1ef);for(let _0x18573c=0x0;_0x18573c<_0x23b811[_0xf5f17e(0x22d)]&&_0x4a8872+_0x18573c<_0x1b8ceb;_0x18573c+=0x1){_0x2fc068[_0x4a8872+_0x18573c]=_0x23b811[_0x18573c];}_0x4a8872=_0x1b8ceb-0x1;}return _0x2fc068['join']('');}function splitTopLevelAnd(_0x2d349a){const _0xcb55ef=a295_0x515a,_0x7a18b1=[];let _0x2483ff=0x0,_0x4d9346=0x0;for(let _0x538c21=0x0;_0x538c21<_0x2d349a['length'];_0x538c21+=0x1){const _0x1fe354=_0x2d349a[_0x538c21];if(_0x1fe354==='(')_0x2483ff+=0x1;if(_0x1fe354===')')_0x2483ff=Math['max'](0x0,_0x2483ff-0x1);_0x2483ff===0x0&&_0x2d349a['slice'](_0x538c21)[_0xcb55ef(0x20d)](/^AND\b/i)&&(_0x538c21===0x0||/\s/[_0xcb55ef(0x1f8)](_0x2d349a[_0x538c21-0x1]??''))&&(_0x7a18b1['push'](_0x2d349a['slice'](_0x4d9346,_0x538c21)[_0xcb55ef(0x1ea)]()),_0x538c21+=0x2,_0x4d9346=_0x538c21+0x1);}const _0x3f4960=_0x2d349a[_0xcb55ef(0x219)](_0x4d9346)[_0xcb55ef(0x1ea)]();if(_0x3f4960)_0x7a18b1[_0xcb55ef(0x216)](_0x3f4960);return _0x7a18b1;}function hasTopLevelKeyword(_0x4bbfbe,_0x2800a3){const _0x52030f=a295_0x515a;let _0x253a2e=0x0;for(let _0x1bc7fa=0x0;_0x1bc7fa<_0x4bbfbe[_0x52030f(0x22d)];_0x1bc7fa+=0x1){const _0x2677e6=_0x4bbfbe[_0x1bc7fa];if(_0x2677e6==='(')_0x253a2e+=0x1;if(_0x2677e6===')')_0x253a2e=Math[_0x52030f(0x1f2)](0x0,_0x253a2e-0x1);if(_0x253a2e!==0x0)continue;const _0x42df47=_0x4bbfbe['slice'](_0x1bc7fa,_0x1bc7fa+_0x2800a3['length']),_0x4bd65a=_0x4bbfbe[_0x1bc7fa-0x1]??'\x20',_0x36ba19=_0x4bbfbe[_0x1bc7fa+_0x2800a3[_0x52030f(0x22d)]]??'\x20';if(_0x42df47[_0x52030f(0x1f5)]()===_0x2800a3[_0x52030f(0x1f5)]()&&!/[\w$]/['test'](_0x4bd65a)&&!/[\w$]/[_0x52030f(0x1f8)](_0x36ba19))return!![];}return![];}function splitEquality(_0x589b5b){const _0x4d9fd2=a295_0x515a,_0xc34982=stripOuterParentheses(_0x589b5b);let _0x85ac7=0x0,_0x3cecb2;for(let _0x3b66ea=0x0;_0x3b66ea<_0xc34982[_0x4d9fd2(0x22d)];_0x3b66ea+=0x1){const _0x11b9f6=_0xc34982[_0x3b66ea];if(_0x11b9f6==='(')_0x85ac7+=0x1;if(_0x11b9f6===')')_0x85ac7=Math[_0x4d9fd2(0x1f2)](0x0,_0x85ac7-0x1);const _0x5789d6=_0xc34982[_0x3b66ea-0x1]??'',_0x139499=_0xc34982[_0x3b66ea+0x1]??'';if(_0x11b9f6==='='&&_0x85ac7===0x0&&!/[!<>=:]/[_0x4d9fd2(0x1f8)](_0x5789d6)&&_0x139499!=='='){if(_0x3cecb2!==undefined)return null;_0x3cecb2=_0x3b66ea;}}return _0x3cecb2===undefined?null:[_0xc34982['slice'](0x0,_0x3cecb2)[_0x4d9fd2(0x1ea)](),_0xc34982['slice'](_0x3cecb2+0x1)[_0x4d9fd2(0x1ea)]()];}function parseDirectColumnReference(_0x23a736,_0x20a982){const _0x1c35e8=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0x23a736));if(!_0x1c35e8)return null;if(normalizeIdentifier(_0x1c35e8[0x1]??'')!==normalizeIdentifier(_0x20a982))return null;return normalizeIdentifier(_0x1c35e8[0x2]??'');}function containsColumnReference(_0x2b9c27,_0x1c56bd){const _0x137d71=a295_0x515a,_0xcfa019=_0x2b9c27[_0x137d71(0x211)](/[`"]/g,''),_0x211099=_0x1c56bd['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp(_0x137d71(0x1ff)+_0x211099+_0x137d71(0x213),'i')['test'](_0xcfa019);}function a295_0x15b0(){const _0x2bc60a=['has','full','table','matchedPrefix','using','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','unavailable','columns','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','min','match','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','containsUnresolvedInclude','unsupportedReason','replace','indexes','\x5cs*\x5c.\x5cs*[\x5cw$]+','index','unknown','push','map','5905630EQhuvW','slice','exec','9cbNOTL','1369431RzUcvb','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','position','search','603425xMCmtv','toLowerCase','26159IhIbFC','tableName','matchAll','INNER','JOIN_INDEX_NOT_USABLE','replaceAll','startsWith','144TQqBoD','JOIN_INDEX_MISSING','cross','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','length','split','unsupportedPredicate','558996uOxgae','inner','1yNxPHI','right','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','trim','join','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','filter','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','__sq__','2475342MEiBZj','left','max','indexOf','from','toUpperCase','some','includes','test','reduce','add','where','alias','covered','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','(?:^|[^\x5cw$])','natural','warning','246706MBTjlM'];a295_0x15b0=function(){return _0x2bc60a;};return a295_0x15b0();}function findEqualityPrefix(_0x33763c,_0x5173a2){const _0x171b54=a295_0x515a,_0x523fd7=new Set(_0x5173a2['map'](normalizeIdentifier)),_0x5614a0=[];for(const _0x452f76 of _0x33763c){if(!_0x523fd7[_0x171b54(0x203)](normalizeIdentifier(_0x452f76)))break;_0x5614a0['push'](_0x452f76);}return _0x5614a0;}function resolveTableMetadata(_0x456e4f,_0xf85526){const _0x1617ad=a295_0x515a,_0x2741a3=normalizeIdentifier(_0xf85526),_0x4c80cf=_0x456e4f[_0x1617ad(0x1ed)](_0x40888c=>normalizeIdentifier(_0x40888c[_0x1617ad(0x223)])===_0x2741a3);if(_0x4c80cf[_0x1617ad(0x22d)]===0x1)return _0x4c80cf[0x0];const _0x15c7e7=_0x2741a3[_0x1617ad(0x1f7)]('.'),_0x28946e=_0x2741a3['split']('.')['at'](-0x1),_0x268191=_0x456e4f[_0x1617ad(0x1ed)](_0x1e690b=>{const _0x10eb1d=_0x1617ad,_0x2cd4c0=normalizeIdentifier(_0x1e690b[_0x10eb1d(0x223)]);if(_0x15c7e7&&_0x2cd4c0['includes']('.'))return![];return _0x2cd4c0[_0x10eb1d(0x22e)]('.')['at'](-0x1)===_0x28946e;});return _0x268191[_0x1617ad(0x22d)]===0x1?_0x268191[0x0]:undefined;}function columnNamesMatch(_0x53336a,_0x3101b2){return normalizeIdentifier(_0x53336a)===normalizeIdentifier(_0x3101b2);}function normalizeIdentifier(_0x474c7d){const _0x5de2d9=a295_0x515a;return _0x474c7d[_0x5de2d9(0x211)](/[`"]/g,'')[_0x5de2d9(0x1ea)]()[_0x5de2d9(0x221)]();}function a295_0x515a(_0x43f3c1,_0xcd01c2){_0x43f3c1=_0x43f3c1-0x1e5;const _0x15b07f=a295_0x15b0();let _0x515ab3=_0x15b07f[_0x43f3c1];return _0x515ab3;}function isSqlClauseKeyword(_0x213135){const _0x360c3c=a295_0x515a;return new Set(['on',_0x360c3c(0x207),_0x360c3c(0x1fb),_0x360c3c(0x1eb),_0x360c3c(0x1e6),_0x360c3c(0x1f1),'right',_0x360c3c(0x204),_0x360c3c(0x22b),_0x360c3c(0x200)])[_0x360c3c(0x203)](_0x213135);}function stripOuterParentheses(_0x2698de){const _0x144abe=a295_0x515a;let _0x5ce766=_0x2698de[_0x144abe(0x1ea)]();while(_0x5ce766[_0x144abe(0x228)]('(')&&_0x5ce766['endsWith'](')')){let _0xb011f9=0x0,_0x4d579b=!![];for(let _0x1ff789=0x0;_0x1ff789<_0x5ce766[_0x144abe(0x22d)];_0x1ff789+=0x1){if(_0x5ce766[_0x1ff789]==='(')_0xb011f9+=0x1;if(_0x5ce766[_0x1ff789]===')')_0xb011f9-=0x1;if(_0xb011f9===0x0&&_0x1ff789<_0x5ce766[_0x144abe(0x22d)]-0x1){_0x4d579b=![];break;}}if(!_0x4d579b||_0xb011f9!==0x0)break;_0x5ce766=_0x5ce766['slice'](0x1,-0x1)['trim']();}return _0x5ce766;}
@@ -1 +1 @@
1
- const a296_0x18f6bd=a296_0x27e9;(function(_0xeb853f,_0xa2936){const _0x50f102=a296_0x27e9,_0x3e2e5f=_0xeb853f();while(!![]){try{const _0x495e87=parseInt(_0x50f102(0x7f))/0x1+parseInt(_0x50f102(0x83))/0x2*(-parseInt(_0x50f102(0x7b))/0x3)+parseInt(_0x50f102(0x84))/0x4+parseInt(_0x50f102(0x86))/0x5*(-parseInt(_0x50f102(0x81))/0x6)+parseInt(_0x50f102(0x7c))/0x7+-parseInt(_0x50f102(0x7e))/0x8*(-parseInt(_0x50f102(0x80))/0x9)+parseInt(_0x50f102(0x82))/0xa;if(_0x495e87===_0xa2936)break;else _0x3e2e5f['push'](_0x3e2e5f['shift']());}catch(_0x39540a){_0x3e2e5f['push'](_0x3e2e5f['shift']());}}}(a296_0x3840,0x4c995));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a296_0x18f6bd(0x7d),LOCK_FILE_NAME=a296_0x18f6bd(0x88),TRASH_DIR_NAME=a296_0x18f6bd(0x89);function a296_0x27e9(_0x534173,_0x3f0379){_0x534173=_0x534173-0x7b;const _0x384068=a296_0x3840();let _0x27e9c4=_0x384068[_0x534173];return _0x27e9c4;}function a296_0x3840(){const _0x543a8a=['2173185HOqLWK','.rabetbase','264IRFSJx','31091idhJSc','152496PvgYsG','3472746LuSDxv','1611730OdHtIC','2FQolzZ','298436TmMfIt','/sql','5zjfXVb','sql','sql.lock.json','sql-trash','731820NeVNNL'];a296_0x3840=function(){return _0x543a8a;};return a296_0x3840();}export function loadSqlProjectConfig(_0x3dbf53,_0x482eed){const _0x1f9a4a=a296_0x18f6bd,_0x39685b=resolve(_0x482eed??findProjectRootDirectory()),_0x438acd=DOT_DIR+_0x1f9a4a(0x85),_0x4e5570=_0x438acd+'/'+_0x3dbf53;return{'projectRoot':_0x39685b,'appCode':_0x3dbf53,'sqlWorkspaceRoot':_0x438acd,'sqlRoot':_0x4e5570,'sqlRootDir':resolve(_0x39685b,DOT_DIR,_0x1f9a4a(0x87),_0x3dbf53),'lockFilePath':resolve(_0x39685b,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x39685b,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a296_0x2b9e9c=a296_0x57a6;(function(_0x46c799,_0x1be3e0){const _0x1d5352=a296_0x57a6,_0x10bcbb=_0x46c799();while(!![]){try{const _0x558db8=-parseInt(_0x1d5352(0x16b))/0x1+-parseInt(_0x1d5352(0x169))/0x2+parseInt(_0x1d5352(0x165))/0x3+parseInt(_0x1d5352(0x166))/0x4+parseInt(_0x1d5352(0x168))/0x5+-parseInt(_0x1d5352(0x162))/0x6+parseInt(_0x1d5352(0x167))/0x7;if(_0x558db8===_0x1be3e0)break;else _0x10bcbb['push'](_0x10bcbb['shift']());}catch(_0x3743ec){_0x10bcbb['push'](_0x10bcbb['shift']());}}}(a296_0x48bb,0x77b9e));import{resolve}from'node:path';function a296_0x57a6(_0x47bb50,_0x2e020f){_0x47bb50=_0x47bb50-0x162;const _0x48bbad=a296_0x48bb();let _0x57a6fb=_0x48bbad[_0x47bb50];return _0x57a6fb;}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR='.rabetbase',LOCK_FILE_NAME=a296_0x2b9e9c(0x16c),TRASH_DIR_NAME=a296_0x2b9e9c(0x16a);function a296_0x48bb(){const _0x3a764d=['/sql','sql','1853517ORzrrG','3409300ylXKoM','3936009uCTvvL','2953775KABbMy','1725966WNdYzx','sql-trash','934990wxyERs','sql.lock.json','2009010HcGyZz'];a296_0x48bb=function(){return _0x3a764d;};return a296_0x48bb();}export function loadSqlProjectConfig(_0x267870,_0x51a931){const _0x41360c=a296_0x2b9e9c,_0x671b1e=resolve(_0x51a931??findProjectRootDirectory()),_0x1c38b8=DOT_DIR+_0x41360c(0x163),_0x4821ab=_0x1c38b8+'/'+_0x267870;return{'projectRoot':_0x671b1e,'appCode':_0x267870,'sqlWorkspaceRoot':_0x1c38b8,'sqlRoot':_0x4821ab,'sqlRootDir':resolve(_0x671b1e,DOT_DIR,_0x41360c(0x164),_0x267870),'lockFilePath':resolve(_0x671b1e,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x671b1e,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- (function(_0x518b31,_0x3e969c){const _0x244aac=a297_0x3c49,_0x529b8c=_0x518b31();while(!![]){try{const _0x212972=-parseInt(_0x244aac(0x83))/0x1+-parseInt(_0x244aac(0x7e))/0x2*(parseInt(_0x244aac(0x88))/0x3)+parseInt(_0x244aac(0x70))/0x4*(parseInt(_0x244aac(0x7b))/0x5)+parseInt(_0x244aac(0x77))/0x6+parseInt(_0x244aac(0x8c))/0x7+parseInt(_0x244aac(0x76))/0x8+-parseInt(_0x244aac(0x86))/0x9;if(_0x212972===_0x3e969c)break;else _0x529b8c['push'](_0x529b8c['shift']());}catch(_0xba90d6){_0x529b8c['push'](_0x529b8c['shift']());}}}(a297_0x5bbf,0x241f0));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function a297_0x5bbf(){const _0x52c488=['dbName','push','isFile','sql','1784448QNpWFi','1258614kWqSrR','path','ENOENT','dbId','29665PEmUWV','name','replace','4hAywWi','slice','toLowerCase','sqlCode','mybatisXml','129474ytCbgl','test','mode','1313586ZgutSl','.sql','322815cPtCtK','.xml','split','sqlRootDir','1149638KrJQtY','sqlName','indexOf','length','28XMnEvz','isDirectory'];a297_0x5bbf=function(){return _0x52c488;};return a297_0x5bbf();}function extensionToMode(_0x40ff86){const _0x3565f0=a297_0x3c49;if(_0x40ff86===_0x3565f0(0x87))return _0x3565f0(0x75);if(_0x40ff86===_0x3565f0(0x89))return _0x3565f0(0x82);return undefined;}async function scanSqlFilesRecursively(_0x369718,_0x1470fc){const _0x2f24df=a297_0x3c49,_0x20abce=[];try{const _0x2c0f62=await readdir(_0x369718,{'withFileTypes':!![]});for(const _0x2b7c71 of _0x2c0f62){const _0x328393=join(_0x369718,_0x2b7c71[_0x2f24df(0x7c)]);if(_0x2b7c71[_0x2f24df(0x71)]()){_0x20abce[_0x2f24df(0x73)](...await scanSqlFilesRecursively(_0x328393,_0x1470fc));continue;}if(!_0x2b7c71[_0x2f24df(0x74)]())continue;const _0x27a7ef=extname(_0x2b7c71[_0x2f24df(0x7c)])[_0x2f24df(0x80)](),_0xa49546=extensionToMode(_0x27a7ef);if(!_0xa49546)continue;const _0x144929=relative(_0x1470fc,_0x328393)[_0x2f24df(0x7d)](/\\/g,'/'),_0x1e8cc5=_0x144929[_0x2f24df(0x8a)]('/')['filter'](Boolean),_0x132bc5=parseSqlPath(_0x1e8cc5,_0x2b7c71[_0x2f24df(0x7c)],_0x27a7ef);if(!_0x132bc5)continue;_0x20abce[_0x2f24df(0x73)]({'sqlCode':_0x132bc5[_0x2f24df(0x81)],'sqlName':_0x132bc5[_0x2f24df(0x8d)],'dbDirectory':_0x1e8cc5[0x0],'filePath':_0x328393,'relativePath':_0x144929,'lockKey':_0x132bc5[_0x2f24df(0x81)],'mode':_0xa49546});}}catch(_0x36a6b0){if(_0x36a6b0['code']!==_0x2f24df(0x79))throw _0x36a6b0;}return _0x20abce;}export async function scanLocalSqlQueries(_0x47cd00){const _0x43cf53=a297_0x3c49;return scanSqlFilesRecursively(_0x47cd00[_0x43cf53(0x8b)],_0x47cd00['sqlRootDir']);}function a297_0x3c49(_0x352f65,_0x3d94d5){_0x352f65=_0x352f65-0x6f;const _0x5bbf9d=a297_0x5bbf();let _0x3c4996=_0x5bbf9d[_0x352f65];return _0x3c4996;}export function resolveLocalSqlFilePath(_0x533613,_0x345396,_0x577916){const _0x27c092=a297_0x3c49,_0x5a5a2c=_0x577916?.[_0x27c092(0x78)]||(_0x577916?.[_0x27c092(0x8d)]||_0x577916?.['dbName']?buildSqlRelativePath(_0x345396,_0x577916?.['sqlName'],_0x577916?.[_0x27c092(0x72)],_0x577916?.['mode']||'sql',_0x577916?.[_0x27c092(0x7a)]):buildDefaultSqlFileName(_0x345396,_0x577916?.[_0x27c092(0x85)]||_0x27c092(0x75)));return join(_0x533613[_0x27c092(0x8b)],_0x5a5a2c);}export async function directoryExists(_0x416747){const _0x2b3ade=a297_0x3c49;try{const _0x58162d=await stat(_0x416747);return _0x58162d[_0x2b3ade(0x71)]();}catch{return![];}}function parseSqlPath(_0x311ccc,_0x421b98,_0x3a7fde){const _0x37d383=a297_0x3c49,_0x5ee2c5=_0x421b98[_0x37d383(0x7f)](0x0,-_0x3a7fde[_0x37d383(0x6f)]);if(_0x311ccc[_0x37d383(0x6f)]<0x2)return null;const _0x3621d6=_0x5ee2c5[_0x37d383(0x8e)]('_');if(_0x3621d6<=0x0||_0x3621d6>=_0x5ee2c5[_0x37d383(0x6f)]-0x1)return null;const _0x3f7d7f=_0x5ee2c5['slice'](0x0,_0x3621d6);if(!isLikelySqlCode(_0x3f7d7f))return null;return{'sqlCode':_0x3f7d7f,'sqlName':_0x5ee2c5[_0x37d383(0x7f)](_0x3621d6+0x1)};}function isLikelySqlCode(_0x550f2e){const _0x3d9013=a297_0x3c49;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x3d9013(0x84)](_0x550f2e);}
1
+ function a297_0x3861(){const _0x38c5f3=['isFile','split','2804740ADMDiN','21EeQLbR','length','.sql','test','74ycFOWO','2060648tuwnPw','path','ENOENT','sql','replace','dbName','1102350DRrJIo','mode','60kNJdOB','.xml','sqlCode','name','filter','push','slice','9JEcYJX','sqlName','toLowerCase','22WvMyuE','63zdqPFG','isDirectory','mybatisXml','21311712uShrFq','235237torqEF','76260TRAlOS','sqlRootDir','indexOf'];a297_0x3861=function(){return _0x38c5f3;};return a297_0x3861();}(function(_0x258e5d,_0x26a498){const _0x4d86e9=a297_0x5e47,_0x1896e2=_0x258e5d();while(!![]){try{const _0x12cf29=-parseInt(_0x4d86e9(0x109))/0x1+-parseInt(_0x4d86e9(0xf1))/0x2*(parseInt(_0x4d86e9(0x105))/0x3)+parseInt(_0x4d86e9(0x10a))/0x4*(parseInt(_0x4d86e9(0xfa))/0x5)+parseInt(_0x4d86e9(0xf8))/0x6*(-parseInt(_0x4d86e9(0xed))/0x7)+-parseInt(_0x4d86e9(0xf2))/0x8*(parseInt(_0x4d86e9(0x101))/0x9)+-parseInt(_0x4d86e9(0xec))/0xa*(parseInt(_0x4d86e9(0x104))/0xb)+parseInt(_0x4d86e9(0x108))/0xc;if(_0x12cf29===_0x26a498)break;else _0x1896e2['push'](_0x1896e2['shift']());}catch(_0x2d9e95){_0x1896e2['push'](_0x1896e2['shift']());}}}(a297_0x3861,0x616be));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x5602a0){const _0x12adaa=a297_0x5e47;if(_0x5602a0===_0x12adaa(0xef))return _0x12adaa(0xf5);if(_0x5602a0===_0x12adaa(0xfb))return _0x12adaa(0x107);return undefined;}async function scanSqlFilesRecursively(_0xa3654d,_0x5264c8){const _0x53e1db=a297_0x5e47,_0x94dcc5=[];try{const _0x190acf=await readdir(_0xa3654d,{'withFileTypes':!![]});for(const _0x450ced of _0x190acf){const _0x2aadfa=join(_0xa3654d,_0x450ced[_0x53e1db(0xfd)]);if(_0x450ced[_0x53e1db(0x106)]()){_0x94dcc5['push'](...await scanSqlFilesRecursively(_0x2aadfa,_0x5264c8));continue;}if(!_0x450ced[_0x53e1db(0xea)]())continue;const _0x30a9ff=extname(_0x450ced[_0x53e1db(0xfd)])[_0x53e1db(0x103)](),_0x3865c0=extensionToMode(_0x30a9ff);if(!_0x3865c0)continue;const _0x144895=relative(_0x5264c8,_0x2aadfa)[_0x53e1db(0xf6)](/\\/g,'/'),_0xbe7887=_0x144895[_0x53e1db(0xeb)]('/')[_0x53e1db(0xfe)](Boolean),_0x4c79fe=parseSqlPath(_0xbe7887,_0x450ced[_0x53e1db(0xfd)],_0x30a9ff);if(!_0x4c79fe)continue;_0x94dcc5[_0x53e1db(0xff)]({'sqlCode':_0x4c79fe[_0x53e1db(0xfc)],'sqlName':_0x4c79fe[_0x53e1db(0x102)],'dbDirectory':_0xbe7887[0x0],'filePath':_0x2aadfa,'relativePath':_0x144895,'lockKey':_0x4c79fe[_0x53e1db(0xfc)],'mode':_0x3865c0});}}catch(_0x16df66){if(_0x16df66['code']!==_0x53e1db(0xf4))throw _0x16df66;}return _0x94dcc5;}export async function scanLocalSqlQueries(_0x147546){const _0x1c7432=a297_0x5e47;return scanSqlFilesRecursively(_0x147546[_0x1c7432(0x10b)],_0x147546['sqlRootDir']);}export function resolveLocalSqlFilePath(_0x29fef4,_0x9d3bb4,_0x4c21c9){const _0x17b025=a297_0x5e47,_0x3e9c16=_0x4c21c9?.[_0x17b025(0xf3)]||(_0x4c21c9?.[_0x17b025(0x102)]||_0x4c21c9?.[_0x17b025(0xf7)]?buildSqlRelativePath(_0x9d3bb4,_0x4c21c9?.[_0x17b025(0x102)],_0x4c21c9?.[_0x17b025(0xf7)],_0x4c21c9?.[_0x17b025(0xf9)]||_0x17b025(0xf5),_0x4c21c9?.['dbId']):buildDefaultSqlFileName(_0x9d3bb4,_0x4c21c9?.[_0x17b025(0xf9)]||_0x17b025(0xf5)));return join(_0x29fef4[_0x17b025(0x10b)],_0x3e9c16);}function a297_0x5e47(_0x59978b,_0x4d8e7d){_0x59978b=_0x59978b-0xe9;const _0x3861c1=a297_0x3861();let _0x5e4789=_0x3861c1[_0x59978b];return _0x5e4789;}export async function directoryExists(_0x40a8c9){const _0x5c16ff=a297_0x5e47;try{const _0x1e1baf=await stat(_0x40a8c9);return _0x1e1baf[_0x5c16ff(0x106)]();}catch{return![];}}function parseSqlPath(_0xeb9140,_0x498558,_0x2152f0){const _0x45ed52=a297_0x5e47,_0x15e109=_0x498558['slice'](0x0,-_0x2152f0[_0x45ed52(0xee)]);if(_0xeb9140[_0x45ed52(0xee)]<0x2)return null;const _0x17488d=_0x15e109[_0x45ed52(0xe9)]('_');if(_0x17488d<=0x0||_0x17488d>=_0x15e109[_0x45ed52(0xee)]-0x1)return null;const _0x5334bd=_0x15e109['slice'](0x0,_0x17488d);if(!isLikelySqlCode(_0x5334bd))return null;return{'sqlCode':_0x5334bd,'sqlName':_0x15e109[_0x45ed52(0x100)](_0x17488d+0x1)};}function isLikelySqlCode(_0x1ae360){const _0x6dee79=a297_0x5e47;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x6dee79(0xf0)](_0x1ae360);}
@@ -1 +1 @@
1
- (function(_0x16fbe7,_0x224961){const _0x383ee3=a298_0x13dc,_0x4c97ca=_0x16fbe7();while(!![]){try{const _0xe3bace=-parseInt(_0x383ee3(0x1da))/0x1*(-parseInt(_0x383ee3(0x1db))/0x2)+parseInt(_0x383ee3(0x1d3))/0x3+parseInt(_0x383ee3(0x1d8))/0x4*(-parseInt(_0x383ee3(0x1cc))/0x5)+-parseInt(_0x383ee3(0x1cf))/0x6+parseInt(_0x383ee3(0x1cd))/0x7*(parseInt(_0x383ee3(0x1d4))/0x8)+-parseInt(_0x383ee3(0x1dc))/0x9*(parseInt(_0x383ee3(0x1d7))/0xa)+parseInt(_0x383ee3(0x1d6))/0xb*(-parseInt(_0x383ee3(0x1d2))/0xc);if(_0xe3bace===_0x224961)break;else _0x4c97ca['push'](_0x4c97ca['shift']());}catch(_0x48a1e9){_0x4c97ca['push'](_0x4c97ca['shift']());}}}(a298_0x1c26,0x48300));import{readFile}from'node:fs/promises';function a298_0x13dc(_0x5983e1,_0x2f0c5e){_0x5983e1=_0x5983e1-0x1cb;const _0x1c269f=a298_0x1c26();let _0x13dcf5=_0x1c269f[_0x5983e1];return _0x13dcf5;}import a298_0x29373e from'node:crypto';export function computeSqlContentHash(_0x37cb0a){const _0x1b20b6=a298_0x13dc;return a298_0x29373e[_0x1b20b6(0x1d1)](_0x1b20b6(0x1d0))[_0x1b20b6(0x1d5)](_0x37cb0a)[_0x1b20b6(0x1d9)](_0x1b20b6(0x1ce));}function a298_0x1c26(){const _0x1ec159=['3624fubFaL','1724763GxkAoE','40CBRiuE','update','7392OxUjea','3998430nMwHpK','4idivNj','digest','3PVkCto','367378bGlYpd','9WbRveS','utf8','1279545XfzffH','800219asdLJI','hex','3259182uNkYlc','md5','createHash'];a298_0x1c26=function(){return _0x1ec159;};return a298_0x1c26();}export async function computeSqlFileHash(_0x5eed7f){const _0x4a30d5=a298_0x13dc,_0x2f3b68=await readFile(_0x5eed7f,_0x4a30d5(0x1cb));return computeSqlContentHash(_0x2f3b68);}
1
+ (function(_0x3922f7,_0x1af708){const _0x463e5f=a298_0x4e0b,_0x8cbc99=_0x3922f7();while(!![]){try{const _0x1d6af1=parseInt(_0x463e5f(0xe8))/0x1*(-parseInt(_0x463e5f(0xe7))/0x2)+parseInt(_0x463e5f(0xe9))/0x3*(-parseInt(_0x463e5f(0xea))/0x4)+parseInt(_0x463e5f(0xeb))/0x5+parseInt(_0x463e5f(0xe1))/0x6*(-parseInt(_0x463e5f(0xe6))/0x7)+-parseInt(_0x463e5f(0xe5))/0x8+parseInt(_0x463e5f(0xe4))/0x9+parseInt(_0x463e5f(0xec))/0xa;if(_0x1d6af1===_0x1af708)break;else _0x8cbc99['push'](_0x8cbc99['shift']());}catch(_0x1ab54c){_0x8cbc99['push'](_0x8cbc99['shift']());}}}(a298_0x1736,0x2bc83));function a298_0x1736(){const _0x1bcb1c=['2689016mIxDey','121765lThWHB','6SNiFFC','59260uDQoiL','3hQkiOr','881364uVispT','12465TatArS','10427790VHCxlG','96gOTrOF','update','digest','1319643izLEId'];a298_0x1736=function(){return _0x1bcb1c;};return a298_0x1736();}import{readFile}from'node:fs/promises';import a298_0x12b53d from'node:crypto';export function computeSqlContentHash(_0x57a8eb){const _0x1c275e=a298_0x4e0b;return a298_0x12b53d['createHash']('md5')[_0x1c275e(0xe2)](_0x57a8eb)[_0x1c275e(0xe3)]('hex');}function a298_0x4e0b(_0x37859f,_0x43e819){_0x37859f=_0x37859f-0xe1;const _0x1736c5=a298_0x1736();let _0x4e0bd6=_0x1736c5[_0x37859f];return _0x4e0bd6;}export async function computeSqlFileHash(_0x361564){const _0x50adb5=await readFile(_0x361564,'utf8');return computeSqlContentHash(_0x50adb5);}
@@ -1 +1 @@
1
- (function(_0xadf834,_0x56ec7d){const _0x1c9e18=a299_0x176c,_0x206398=_0xadf834();while(!![]){try{const _0x411180=parseInt(_0x1c9e18(0x87))/0x1*(-parseInt(_0x1c9e18(0x86))/0x2)+-parseInt(_0x1c9e18(0x8e))/0x3*(-parseInt(_0x1c9e18(0x88))/0x4)+-parseInt(_0x1c9e18(0x93))/0x5*(-parseInt(_0x1c9e18(0x92))/0x6)+-parseInt(_0x1c9e18(0x96))/0x7+-parseInt(_0x1c9e18(0x91))/0x8+parseInt(_0x1c9e18(0x98))/0x9*(-parseInt(_0x1c9e18(0x89))/0xa)+parseInt(_0x1c9e18(0x95))/0xb;if(_0x411180===_0x56ec7d)break;else _0x206398['push'](_0x206398['shift']());}catch(_0x3dbfc6){_0x206398['push'](_0x206398['shift']());}}}(a299_0x41d5,0x9cc8f));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x5dd3d1,_0x3dc5a0,_0x23371d,_0x4fd002){const _0x455245=a299_0x176c,_0x5d791e=_0x5dd3d1??createEmptySqlLock();let _0x4689ab=_0x5d791e[_0x455245(0x85)][_0x3dc5a0];if(!_0x4689ab)return _0x4689ab={'sqlRoot':_0x23371d,'lastSync':'','sqls':{}},_0x5d791e['apps'][_0x3dc5a0]=_0x4689ab,{'lockData':_0x5d791e,'appLock':_0x4689ab};if(!_0x4689ab[_0x455245(0x8f)])_0x4689ab[_0x455245(0x8f)]=_0x23371d;else{if(_0x4689ab[_0x455245(0x8f)]!==_0x23371d)throw new Error(_0x4fd002+_0x455245(0x82)+_0x23371d+'\x22\x20vs\x20lock\x20\x22'+_0x4689ab[_0x455245(0x8f)]+_0x455245(0x83)+_0x455245(0x81));}return!_0x4689ab[_0x455245(0x8d)]&&(_0x4689ab[_0x455245(0x8d)]={}),!_0x4689ab[_0x455245(0x8c)]&&(_0x4689ab[_0x455245(0x8c)]=''),{'lockData':_0x5d791e,'appLock':_0x4689ab};}function a299_0x176c(_0x15e5d1,_0x3f16b7){_0x15e5d1=_0x15e5d1-0x81;const _0x41d5f9=a299_0x41d5();let _0x176c36=_0x41d5f9[_0x15e5d1];return _0x176c36;}export async function readSqlLockFile(_0x5c475e){const _0x80e8c5=a299_0x176c;try{const _0x51352c=await readFile(_0x5c475e,_0x80e8c5(0x90));return JSON[_0x80e8c5(0x8b)](_0x51352c);}catch(_0x546be1){if(_0x546be1[_0x80e8c5(0x8a)]===_0x80e8c5(0x94))return null;throw new Error(_0x80e8c5(0x97)+String(_0x546be1));}}export async function writeSqlLockFile(_0x204de4,_0x353b15){const _0x2c541d=a299_0x176c;await mkdir(dirname(_0x204de4),{'recursive':!![]}),await writeFile(_0x204de4,JSON[_0x2c541d(0x84)](_0x353b15,null,0x2),_0x2c541d(0x90));}function a299_0x41d5(){const _0x7aa455=['26242656PEUlvj','4840829XcVUPM','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','342XOVYZw','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','\x22.\x20','stringify','apps','218ItETaJ','803cRzPWB','11136UIdyUK','281140XDPiTc','code','parse','lastSync','sqls','1341hmrrqN','sqlRoot','utf8','10052728jiGPMt','5196edAqmw','670rKUcIi','ENOENT'];a299_0x41d5=function(){return _0x7aa455;};return a299_0x41d5();}
1
+ function a299_0x1471(){const _0x177356=['code',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','91oWtPGy','3BNkZNY','4696628uMalBX','54xkoXRz','utf8','\x22.\x20','11365744WNgYdr','ENOENT','5496615kkFmxN','\x22\x20vs\x20lock\x20\x22','1659670UrHonP','276abpjJr','47514NHyEXk','2VHbFxn','sqlRoot','apps','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','168380UFsjGj','1616494JDRXgZ','lastSync'];a299_0x1471=function(){return _0x177356;};return a299_0x1471();}(function(_0x51db10,_0x273371){const _0x370c25=a299_0x40c8,_0x37e48f=_0x51db10();while(!![]){try{const _0x5cefb2=parseInt(_0x370c25(0x169))/0x1*(-parseInt(_0x370c25(0x16d))/0x2)+-parseInt(_0x370c25(0x173))/0x3*(parseInt(_0x370c25(0x174))/0x4)+parseInt(_0x370c25(0x17a))/0x5+parseInt(_0x370c25(0x168))/0x6*(parseInt(_0x370c25(0x172))/0x7)+-parseInt(_0x370c25(0x178))/0x8+-parseInt(_0x370c25(0x175))/0x9*(parseInt(_0x370c25(0x166))/0xa)+parseInt(_0x370c25(0x16e))/0xb*(parseInt(_0x370c25(0x167))/0xc);if(_0x5cefb2===_0x273371)break;else _0x37e48f['push'](_0x37e48f['shift']());}catch(_0x5efc1b){_0x37e48f['push'](_0x37e48f['shift']());}}}(a299_0x1471,0xc8f73));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a299_0x40c8(_0x527469,_0x12d316){_0x527469=_0x527469-0x165;const _0x1471b3=a299_0x1471();let _0x40c8a0=_0x1471b3[_0x527469];return _0x40c8a0;}export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x4f6ace,_0x1f1e3f,_0x283ad7,_0x544e3c){const _0x22eb89=a299_0x40c8,_0x5219b2=_0x4f6ace??createEmptySqlLock();let _0x4f104c=_0x5219b2['apps'][_0x1f1e3f];if(!_0x4f104c)return _0x4f104c={'sqlRoot':_0x283ad7,'lastSync':'','sqls':{}},_0x5219b2[_0x22eb89(0x16b)][_0x1f1e3f]=_0x4f104c,{'lockData':_0x5219b2,'appLock':_0x4f104c};if(!_0x4f104c[_0x22eb89(0x16a)])_0x4f104c['sqlRoot']=_0x283ad7;else{if(_0x4f104c[_0x22eb89(0x16a)]!==_0x283ad7)throw new Error(_0x544e3c+_0x22eb89(0x171)+_0x283ad7+_0x22eb89(0x165)+_0x4f104c['sqlRoot']+_0x22eb89(0x177)+'Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x4f104c['sqls']&&(_0x4f104c['sqls']={}),!_0x4f104c[_0x22eb89(0x16f)]&&(_0x4f104c[_0x22eb89(0x16f)]=''),{'lockData':_0x5219b2,'appLock':_0x4f104c};}export async function readSqlLockFile(_0x16e7c4){const _0x454f37=a299_0x40c8;try{const _0x3f5cba=await readFile(_0x16e7c4,_0x454f37(0x176));return JSON['parse'](_0x3f5cba);}catch(_0xee48d7){if(_0xee48d7[_0x454f37(0x170)]===_0x454f37(0x179))return null;throw new Error(_0x454f37(0x16c)+String(_0xee48d7));}}export async function writeSqlLockFile(_0x2eff99,_0x23da21){const _0x1c59d1=a299_0x40c8;await mkdir(dirname(_0x2eff99),{'recursive':!![]}),await writeFile(_0x2eff99,JSON['stringify'](_0x23da21,null,0x2),_0x1c59d1(0x176));}
@@ -1 +1 @@
1
- function a301_0x44f3(_0x35d30a,_0x5d6785){_0x35d30a=_0x35d30a-0x1b4;const _0x2a331c=a301_0x2a33();let _0x44f366=_0x2a331c[_0x35d30a];return _0x44f366;}(function(_0x555ba1,_0x5bde48){const _0x5554a8=a301_0x44f3,_0x44a3d7=_0x555ba1();while(!![]){try{const _0x50e60c=-parseInt(_0x5554a8(0x1b6))/0x1*(-parseInt(_0x5554a8(0x1b9))/0x2)+parseInt(_0x5554a8(0x1be))/0x3+parseInt(_0x5554a8(0x1bc))/0x4*(-parseInt(_0x5554a8(0x1c0))/0x5)+parseInt(_0x5554a8(0x1ba))/0x6+-parseInt(_0x5554a8(0x1c1))/0x7*(parseInt(_0x5554a8(0x1bf))/0x8)+parseInt(_0x5554a8(0x1bb))/0x9*(parseInt(_0x5554a8(0x1b4))/0xa)+-parseInt(_0x5554a8(0x1c4))/0xb*(-parseInt(_0x5554a8(0x1c6))/0xc);if(_0x50e60c===_0x5bde48)break;else _0x44a3d7['push'](_0x44a3d7['shift']());}catch(_0x1658ad){_0x44a3d7['push'](_0x44a3d7['shift']());}}}(a301_0x2a33,0xf1fbb));import{detectSqlSourceMode}from'../../core/sql-validator.js';export function detectSqlMode(_0x902f9e){return detectSqlSourceMode(_0x902f9e);}export function getSqlFileExtension(_0x1edb57){const _0x334b44=a301_0x44f3;return _0x1edb57===_0x334b44(0x1c3)?_0x334b44(0x1b5):'.sql';}export function buildDefaultSqlFileName(_0x339af9,_0x321ccb){return''+_0x339af9+getSqlFileExtension(_0x321ccb);}export function sanitizeSqlPathSegment(_0x3a19da,_0x5567f4){const _0x40fb7b=a301_0x44f3,_0x996dbd=String(_0x3a19da??'')[_0x40fb7b(0x1b7)](),_0x696fb8=_0x996dbd[_0x40fb7b(0x1bd)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x40fb7b(0x1bd)](/\s+/g,'-')[_0x40fb7b(0x1bd)](/-+/g,'-')[_0x40fb7b(0x1bd)](/^\.+/,'')[_0x40fb7b(0x1bd)](/\.+$/,'')[_0x40fb7b(0x1bd)](/^-+/,'')['replace'](/-+$/,'');return _0x696fb8||_0x5567f4;}function a301_0x2a33(){const _0x14ca8f=['53254CRZAbA','7579992PjRndB','4944708lbHzoZ','7655152PMeKPK','replace','3745149eMrBXA','953952fByHub','5XRMaFP','112jJxPIH','unknown-db','mybatisXml','1375ZIzIDL','db-','31068QzenCh','20kcOQCM','.xml','33pCCUKK','trim','unknown-sql'];a301_0x2a33=function(){return _0x14ca8f;};return a301_0x2a33();}export function buildDbDirectoryName(_0x7b4c5,_0x198a90){const _0xe75ce4=a301_0x44f3;return sanitizeSqlPathSegment(_0x7b4c5,_0x198a90!=null?_0xe75ce4(0x1c5)+_0x198a90:_0xe75ce4(0x1c2));}export function buildSqlRelativePath(_0x225718,_0x5623c5,_0x5c808a,_0x69966,_0x26fa08){const _0x5b290d=a301_0x44f3,_0x5f33df=buildDbDirectoryName(_0x5c808a,_0x26fa08),_0x4e231e=sanitizeSqlPathSegment(_0x225718,_0x5b290d(0x1b8)),_0x58f8fc=sanitizeSqlPathSegment(_0x5623c5,_0x4e231e);return _0x5f33df+'/'+_0x4e231e+'_'+_0x58f8fc+getSqlFileExtension(_0x69966);}
1
+ (function(_0x3a5f4c,_0x2356b6){const _0x41dfac=a301_0x485d,_0x5df968=_0x3a5f4c();while(!![]){try{const _0x4cdd98=parseInt(_0x41dfac(0x158))/0x1+-parseInt(_0x41dfac(0x156))/0x2+-parseInt(_0x41dfac(0x157))/0x3*(parseInt(_0x41dfac(0x151))/0x4)+parseInt(_0x41dfac(0x159))/0x5*(-parseInt(_0x41dfac(0x15e))/0x6)+parseInt(_0x41dfac(0x15c))/0x7+-parseInt(_0x41dfac(0x150))/0x8*(parseInt(_0x41dfac(0x154))/0x9)+parseInt(_0x41dfac(0x152))/0xa;if(_0x4cdd98===_0x2356b6)break;else _0x5df968['push'](_0x5df968['shift']());}catch(_0x2f8fc4){_0x5df968['push'](_0x5df968['shift']());}}}(a301_0x14f0,0x30156));function a301_0x14f0(){const _0x1b718e=['trim','replace','2944136Fjgrhs','28JgMwsZ','5717780BmPEXc','mybatisXml','9XQhlHq','.xml','352616jzXXYb','52431QXRTFT','343352wipsyh','80EshJhm','.sql','db-','981708nCIYGH','unknown-sql','71910aHcPjc'];a301_0x14f0=function(){return _0x1b718e;};return a301_0x14f0();}import{detectSqlSourceMode}from'../../core/sql-validator.js';export function detectSqlMode(_0x55ffd4){return detectSqlSourceMode(_0x55ffd4);}export function getSqlFileExtension(_0x251bcd){const _0x5928ee=a301_0x485d;return _0x251bcd===_0x5928ee(0x153)?_0x5928ee(0x155):_0x5928ee(0x15a);}function a301_0x485d(_0x4bbb82,_0x4cc84e){_0x4bbb82=_0x4bbb82-0x14f;const _0x14f01e=a301_0x14f0();let _0x485dbe=_0x14f01e[_0x4bbb82];return _0x485dbe;}export function buildDefaultSqlFileName(_0x46c3ff,_0x228c63){return''+_0x46c3ff+getSqlFileExtension(_0x228c63);}export function sanitizeSqlPathSegment(_0x1ef595,_0x3d38f1){const _0x167ce8=a301_0x485d,_0x58e4e4=String(_0x1ef595??'')[_0x167ce8(0x15f)](),_0x9e3d33=_0x58e4e4[_0x167ce8(0x14f)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')['replace'](/\s+/g,'-')[_0x167ce8(0x14f)](/-+/g,'-')[_0x167ce8(0x14f)](/^\.+/,'')['replace'](/\.+$/,'')[_0x167ce8(0x14f)](/^-+/,'')['replace'](/-+$/,'');return _0x9e3d33||_0x3d38f1;}export function buildDbDirectoryName(_0x4e0443,_0x219c23){const _0x279047=a301_0x485d;return sanitizeSqlPathSegment(_0x4e0443,_0x219c23!=null?_0x279047(0x15b)+_0x219c23:'unknown-db');}export function buildSqlRelativePath(_0x254438,_0x412b66,_0x17cf7d,_0x1bfd74,_0x3d3432){const _0x151a77=a301_0x485d,_0x3a1810=buildDbDirectoryName(_0x17cf7d,_0x3d3432),_0x3c696a=sanitizeSqlPathSegment(_0x254438,_0x151a77(0x15d)),_0x2c13d6=sanitizeSqlPathSegment(_0x412b66,_0x3c696a);return _0x3a1810+'/'+_0x3c696a+'_'+_0x2c13d6+getSqlFileExtension(_0x1bfd74);}