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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/flags.js +1 -1
  48. package/lib/commands/common/validate.js +1 -1
  49. package/lib/commands/config/get.js +1 -1
  50. package/lib/commands/config/index.js +1 -1
  51. package/lib/commands/config/list.js +1 -1
  52. package/lib/commands/config/set.js +1 -1
  53. package/lib/commands/config/shared.js +1 -1
  54. package/lib/commands/data/filter.js +1 -1
  55. package/lib/commands/data/getOne.js +1 -1
  56. package/lib/commands/data/index.js +1 -1
  57. package/lib/commands/data/shared.js +1 -1
  58. package/lib/commands/dataset/business-group-update.js +1 -1
  59. package/lib/commands/dataset/capability.js +1 -1
  60. package/lib/commands/dataset/delete.js +1 -1
  61. package/lib/commands/dataset/detail.js +1 -1
  62. package/lib/commands/dataset/extend-update.js +1 -1
  63. package/lib/commands/dataset/field-update.js +1 -1
  64. package/lib/commands/dataset/index.js +1 -1
  65. package/lib/commands/dataset/list.js +1 -1
  66. package/lib/commands/dataset/operations.js +1 -1
  67. package/lib/commands/dataset/relation-create.js +1 -1
  68. package/lib/commands/dataset/relation-delete.js +1 -1
  69. package/lib/commands/dataset/relation-shared.js +1 -1
  70. package/lib/commands/dataset/relation-update.js +1 -1
  71. package/lib/commands/dataset/relations.js +1 -1
  72. package/lib/commands/dataset/rename.js +1 -1
  73. package/lib/commands/dataset/restore.js +1 -1
  74. package/lib/commands/db/analyze-cancel.js +1 -1
  75. package/lib/commands/db/analyze-start.js +1 -1
  76. package/lib/commands/db/analyze-status.js +1 -1
  77. package/lib/commands/db/create.js +1 -1
  78. package/lib/commands/db/delete.js +1 -1
  79. package/lib/commands/db/detail.js +1 -1
  80. package/lib/commands/db/diff.js +1 -1
  81. package/lib/commands/db/index.js +1 -1
  82. package/lib/commands/db/list.js +1 -1
  83. package/lib/commands/db/shared.js +1 -1
  84. package/lib/commands/db/tables.js +1 -1
  85. package/lib/commands/db/test.js +1 -1
  86. package/lib/commands/db/update.js +1 -1
  87. package/lib/commands/doctor.js +1 -1
  88. package/lib/commands/init/index.js +1 -1
  89. package/lib/commands/issue/index.js +1 -1
  90. package/lib/commands/issue/nudge.js +1 -1
  91. package/lib/commands/issue/report.js +1 -1
  92. package/lib/commands/issue/shared.js +1 -1
  93. package/lib/commands/logs/index.js +1 -1
  94. package/lib/commands/menu/index.js +1 -1
  95. package/lib/commands/menu/list.js +1 -1
  96. package/lib/commands/menu/shared/compare-table.js +1 -1
  97. package/lib/commands/menu/shared/index.js +1 -1
  98. package/lib/commands/menu/shared/inquirer.js +1 -1
  99. package/lib/commands/menu/shared/local-pages.js +1 -1
  100. package/lib/commands/menu/shared/logic.js +1 -1
  101. package/lib/commands/menu/shared/service.js +1 -1
  102. package/lib/commands/menu/shared/sync-core.js +1 -1
  103. package/lib/commands/menu/shared/update-core.js +1 -1
  104. package/lib/commands/menu/shared/valid-url.js +1 -1
  105. package/lib/commands/menu/sync.js +1 -1
  106. package/lib/commands/menu/update.js +1 -1
  107. package/lib/commands/page/generate-start.js +1 -1
  108. package/lib/commands/page/generate-status.js +1 -1
  109. package/lib/commands/page/index.js +1 -1
  110. package/lib/commands/page/pull.js +1 -1
  111. package/lib/commands/page/push.js +1 -1
  112. package/lib/commands/page/relation-audit.js +1 -1
  113. package/lib/commands/page/shared.js +1 -1
  114. package/lib/commands/page/standard-page-status.js +1 -1
  115. package/lib/commands/page/sync.js +1 -1
  116. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  117. package/lib/commands/project/create/format-elapsed.js +1 -1
  118. package/lib/commands/project/create/main.js +1 -1
  119. package/lib/commands/project/create/non-interactive.js +1 -1
  120. package/lib/commands/project/create/project-template-path.js +1 -1
  121. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  122. package/lib/commands/project/create/use-format-code.js +1 -1
  123. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  124. package/lib/commands/project/index.js +1 -1
  125. package/lib/commands/project/init.js +1 -1
  126. package/lib/commands/project/upgrade.js +1 -1
  127. package/lib/commands/registry.js +1 -1
  128. package/lib/commands/run/index.js +1 -1
  129. package/lib/commands/schema.js +1 -1
  130. package/lib/commands/sql/create.js +1 -1
  131. package/lib/commands/sql/delete.js +1 -1
  132. package/lib/commands/sql/detail.js +1 -1
  133. package/lib/commands/sql/exec.js +1 -1
  134. package/lib/commands/sql/index.js +1 -1
  135. package/lib/commands/sql/list.js +1 -1
  136. package/lib/commands/sql/pull.js +1 -1
  137. package/lib/commands/sql/push.js +1 -1
  138. package/lib/commands/sql/save.js +1 -1
  139. package/lib/commands/sql/shared.js +1 -1
  140. package/lib/commands/sql/status.js +1 -1
  141. package/lib/commands/sql/validate.js +1 -1
  142. package/lib/commands/workspace/index.js +1 -1
  143. package/lib/config/schema.js +1 -1
  144. package/lib/constant/cdn.js +1 -1
  145. package/lib/constant/cli.js +1 -1
  146. package/lib/constant/defaults.js +1 -1
  147. package/lib/constant/domain.js +1 -1
  148. package/lib/constant/env.js +1 -1
  149. package/lib/constant/output.js +1 -1
  150. package/lib/constant/paths.js +1 -1
  151. package/lib/constant/risk.js +1 -1
  152. package/lib/context/app-resolver.js +1 -1
  153. package/lib/context/auth-resolver.js +1 -1
  154. package/lib/context/config-loader.js +1 -1
  155. package/lib/context.js +1 -1
  156. package/lib/core/alias-resolver.js +1 -1
  157. package/lib/core/api-client.js +1 -1
  158. package/lib/core/bff/config.js +1 -1
  159. package/lib/core/bff/file-system.js +1 -1
  160. package/lib/core/bff/hash.js +1 -1
  161. package/lib/core/bff/lock.js +1 -1
  162. package/lib/core/bff/utils.js +1 -1
  163. package/lib/core/db-resolver.js +1 -1
  164. package/lib/core/page/file-system.js +1 -1
  165. package/lib/core/page/hash.js +1 -1
  166. package/lib/core/page/lock.js +1 -1
  167. package/lib/core/sql-sync/config.js +1 -1
  168. package/lib/core/sql-sync/file-system.js +1 -1
  169. package/lib/core/sql-sync/hash.js +1 -1
  170. package/lib/core/sql-sync/lock.js +1 -1
  171. package/lib/core/sql-sync/utils.js +1 -1
  172. package/lib/core/sql-validator.js +1 -1
  173. package/lib/errors.js +1 -1
  174. package/lib/framework/build-all-flags.js +1 -1
  175. package/lib/framework/flags.js +1 -1
  176. package/lib/framework/help.js +1 -1
  177. package/lib/framework/index.js +1 -1
  178. package/lib/framework/output.js +1 -1
  179. package/lib/framework/response.js +1 -1
  180. package/lib/framework/runner-alias.js +1 -1
  181. package/lib/framework/runner.js +1 -1
  182. package/lib/framework/schema-export.js +1 -1
  183. package/lib/framework/types.js +1 -1
  184. package/lib/generated/build-info.js +1 -1
  185. package/lib/help.js +1 -1
  186. package/lib/skills/main.js +1 -1
  187. package/lib/skills/npx-skills-add.js +1 -1
  188. package/lib/telemetry/cli-command-trace.js +1 -1
  189. package/lib/telemetry/cli-help-trace.js +1 -1
  190. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  191. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  192. package/lib/telemetry/send-cli-trace-log.js +1 -1
  193. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  194. package/lib/utils/ai_config.js +1 -1
  195. package/lib/utils/apply-jq-filter.js +1 -1
  196. package/lib/utils/cdn-config.js +1 -1
  197. package/lib/utils/check-sdk-version.js +1 -1
  198. package/lib/utils/cli-version-check.js +1 -1
  199. package/lib/utils/cli-version-policy.js +1 -1
  200. package/lib/utils/config.js +1 -1
  201. package/lib/utils/copy-directory.js +1 -1
  202. package/lib/utils/entity-with-id.js +1 -1
  203. package/lib/utils/file-utils.js +1 -1
  204. package/lib/utils/guides-cdn.js +1 -1
  205. package/lib/utils/http-client.js +1 -1
  206. package/lib/utils/is-non-interactive.js +1 -1
  207. package/lib/utils/logger.js +1 -1
  208. package/lib/utils/params.js +1 -1
  209. package/lib/utils/platform.js +1 -1
  210. package/lib/utils/rules-cdn.js +1 -1
  211. package/lib/utils/sleep.js +1 -1
  212. package/lib/utils/template-replacer.js +1 -1
  213. package/lib/utils/update-notice.js +1 -1
  214. package/lib/utils/version.js +1 -1
  215. package/lib/utils/with-active-cookie.js +1 -1
  216. package/lib/utils/write-cli-side-channel.js +1 -1
  217. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x266622,_0x864b6a){const _0x30469c=a157_0x3c2b,_0x31573c=_0x266622();while(!![]){try{const _0x27bcec=parseInt(_0x30469c(0x146))/0x1*(parseInt(_0x30469c(0x18b))/0x2)+-parseInt(_0x30469c(0x1ab))/0x3*(-parseInt(_0x30469c(0x1b4))/0x4)+parseInt(_0x30469c(0x1ac))/0x5*(parseInt(_0x30469c(0x1ad))/0x6)+-parseInt(_0x30469c(0x1c5))/0x7*(parseInt(_0x30469c(0x1d6))/0x8)+parseInt(_0x30469c(0x138))/0x9*(-parseInt(_0x30469c(0x1cc))/0xa)+-parseInt(_0x30469c(0x18a))/0xb*(parseInt(_0x30469c(0x1c8))/0xc)+parseInt(_0x30469c(0x19e))/0xd*(parseInt(_0x30469c(0x172))/0xe);if(_0x27bcec===_0x864b6a)break;else _0x31573c['push'](_0x31573c['shift']());}catch(_0x1426bb){_0x31573c['push'](_0x31573c['shift']());}}}(a157_0x3c39,0xba674));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';let _activeCookie;export function setActiveCookie(_0x20cdc6){_activeCookie=_0x20cdc6||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}function a157_0x3c39(){const _0x3705cc=['26292658QwEVNn','});','totalCount','/smartapi/question/er-config/erDelete','/smartapi/dblink/getList','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','/smartapi/custom/queryUserCustomSqlList','UNAUTHORIZED','\x20\x20sqlCode:\x20\x27','\x20\x20return\x20rows;','&type=','update','code','operationId','includeImports','API\x20error:\x20','/generate-standard-pages/start','find','planId','warn','pageSize','/standard-page-status?appCode=','/smartapi/dataset/delete-dataset','signal','121WDtmVa','22xuoDtK','currentPage','\x20failed','scriptName','Operation\x20\x22','errorMessage','/smartapi/app/getList','/api/management/library/scripts/statistics?appCode=','getOne','/smartapi/custom/updateUserCustomSql','Page\x20not\x20found:\x20','object','stringify','/smartapi/app-config/create','test','join','401','/api/management/library/scripts/info?id=','string','13PEohXt','toLowerCase','path','value','responseFields','/smartapi/lovrabet/dataset/','operations','label','authRequired','/smartapi/db-analysis/status/','SQL\x20query\x20not\x20found:\x20','Warning:\x20showing\x20first\x20','/api/','3XLBYmf','317135DyQXdV','108rzJEjQ','data','modelCode','GET','validation','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','/smartapi/dblink/getAllTableList','698460bvvugR','/sync-to-pages','includes','SQL\x20query\x20not\x20found:\x20id=','deleted','isArray','/smartapi/dblink/getTableDiffV2ByPage','clientOperationId','\x20of\x20','/smartapi/dblink/create','API\x20error\x20code:\x20','/smartapi/question/er-config/business-group/edit','modelId','sdk','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','api_error','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','9235023lvEIuk','/smartapi/question/er-config/update-single','/api/management/library/scripts/list?appCode=','821388AyAcCg','name','scriptType','/api/management/library/scripts/save','2814220KfKyjK','tags','tableList','\x20\x20where:\x20{},','version','/smartapi/dblink/delete','enabled','dataset_','sqlCode','map','8oXQkRw','/smartapi/app-config/getByKey','message','/smartapi/custom/deleteUserCustomSql','sqlName','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','/smartapi/dataset/get-dataset-operation','dbtableConfig','tableData','/smartapi/question/er-config/erCreate','key','errorCode','application/json','/smartapi/custom/getUserCustomSql?id=','/smartapi/dblink/getOne','set','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','Check\x20network\x20connectivity\x20and\x20try\x20again.','//\x20','45tyFKbJ','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','cli:rabetbase','(/*\x20params\x20*/);','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','toString','/smartapi/dataset/restore-dataset','filter','/smartapi/app-config/list','/smartapi/dblink/testConnect','?sqlCode=','/smartapi/dataset/get-dataset-list','/smartapi/app-config/delete','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','95318RyvljD','entries','/smartapi/db-analysis/jobs/cancel','/smartapi/lovrabet/detail?pageId=','AbortError','method','appCode','create','BFF\x20script\x20not\x20found:\x20id=','.remove(id);','\x22\x20not\x20found\x20in\x20dataset\x20','.create({\x20/*\x20fields\x20*/\x20});','operationName','type','displayName','Request\x20timeout:\x20','Request\x20failed:\x20','\x20apps.\x20','cookie','has','POST','const\x20results\x20=\x20data.execResult\x20||\x20[];','const\x20result\x20=\x20await\x20client.models.','table','apiError','description','target','tableName','\x20\x20pageSize:\x2020,','errorMsg','error','json','push','/api/management/library/scripts/delete','remove','dbId','status','/smartapi/dataset/get-driven-data?','/api/node-toolbox/sql/save','/smartapi/db-analysis/start','/smartapi/dataset/update-driven-data','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','/smartapi/custom/saveUserCustomSql','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);'];a157_0x3c39=function(){return _0x3705cc;};return a157_0x3c39();}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0;function createFetchFailureError(_0x42e953,_0x4d787e){const _0x437ddc=a157_0x3c2b,_0x373813=_0x4d787e instanceof Error?_0x4d787e[_0x437ddc(0x1d8)]:String(_0x4d787e);return CliErrors[_0x437ddc(0x15e)](_0x437ddc(0x156)+_0x42e953+(_0x373813?'\x20('+_0x373813+')':''),_0x437ddc(0x136));}async function apiRequest(_0x3fc5fa,_0x3fab05={}){const _0x17f4c4=a157_0x3c2b,{method:method=_0x17f4c4(0x1b0),body:_0x18b5fd,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x3fab05,_0x4975ad=useRuntime?getRuntimeDomain():getApiDomain(),_0x37a11a=_activeCookie||getCookie(),_0x37dab0=''+_0x4975ad+_0x3fc5fa,_0x4a9424=new AbortController(),_0x50637d=setTimeout(()=>_0x4a9424['abort'](),timeout);try{const _0xe9d3b3=await fetch(_0x37dab0,{'method':method,'headers':{'Content-Type':_0x17f4c4(0x1e2),'Cookie':_0x37a11a,'X-Invoke-Source':'cli:rabetbase',...headers},'body':_0x18b5fd?JSON[_0x17f4c4(0x197)](_0x18b5fd):undefined,'signal':_0x4a9424[_0x17f4c4(0x189)]});let _0x143ef5;try{_0x143ef5=await _0xe9d3b3['json']();}catch(_0x1cf721){if(_0x1cf721 instanceof Error&&_0x1cf721['name']===_0x17f4c4(0x14a))throw CliErrors[_0x17f4c4(0x15e)]('Request\x20timeout:\x20'+_0x37dab0);if(_0xe9d3b3['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors['apiError']('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0xe9d3b3[_0x17f4c4(0x16a)]+')',_0xe9d3b3[_0x17f4c4(0x16a)]>=0x190?_0x17f4c4(0x135):undefined);}if(!_0xe9d3b3['ok']||_0x143ef5['success']===![])throw CliErrors[_0x17f4c4(0x15e)](_0x143ef5['errorMsg']||_0x143ef5[_0x17f4c4(0x1d8)]||_0x17f4c4(0x181)+_0xe9d3b3[_0x17f4c4(0x16a)],_0x143ef5[_0x17f4c4(0x1e1)]?_0x17f4c4(0x1be)+_0x143ef5['errorCode']:undefined);return _0x143ef5;}catch(_0x23c964){if(_0x23c964 instanceof CliError)throw _0x23c964;if(_0x23c964 instanceof Error&&_0x23c964[_0x17f4c4(0x1c9)]===_0x17f4c4(0x14a))throw CliErrors[_0x17f4c4(0x15e)](_0x17f4c4(0x155)+_0x37dab0);throw createFetchFailureError(_0x37dab0,_0x23c964);}finally{clearTimeout(_0x50637d);}}function isAuthFailure(_0x132a58){const _0x4751d8=a157_0x3c2b,_0xda3956=_0x132a58[_0x4751d8(0x163)]||_0x132a58[_0x4751d8(0x1d8)]||_0x132a58['data']?.[_0x4751d8(0x1d8)]||_0x132a58[_0x4751d8(0x190)]||_0x132a58[_0x4751d8(0x164)]||'';return _0x132a58[_0x4751d8(0x1e1)]===_0x4751d8(0x179)||_0x132a58['code']===0x191||_0x132a58['code']==='401'||_0xda3956[_0x4751d8(0x1b6)](_0x4751d8(0x19b))||_0xda3956['includes']('Unauthorized')||_0xda3956[_0x4751d8(0x1b6)]('登录')||_0xda3956[_0x4751d8(0x1b6)]('认证');}export async function platformFetch(_0x3e087e,_0x32f447){const _0x14ef54=a157_0x3c2b;let _0x15104b;try{_0x15104b=await fetch(_0x3e087e,{'method':_0x32f447['method']??_0x14ef54(0x1b0),'headers':{'Content-Type':'application/json','Cookie':_0x32f447[_0x14ef54(0x158)],'X-Invoke-Source':_0x14ef54(0x13a)},..._0x32f447['body']&&{'body':JSON['stringify'](_0x32f447['body'])}});}catch(_0x3aa0dc){throw createFetchFailureError(_0x3e087e,_0x3aa0dc);}if(!_0x15104b['ok']){if(_0x15104b[_0x14ef54(0x16a)]===0x191)throw CliErrors[_0x14ef54(0x1a6)]();throw CliErrors[_0x14ef54(0x15e)](_0x32f447[_0x14ef54(0x1a5)]+'\x20failed,\x20HTTP\x20'+_0x15104b[_0x14ef54(0x16a)]);}const _0x1f15ea=await _0x15104b[_0x14ef54(0x165)]();if(_0x1f15ea['success']===![]){if(isAuthFailure(_0x1f15ea))throw CliErrors['authRequired']();throw CliErrors['apiError'](_0x1f15ea[_0x14ef54(0x163)]||_0x1f15ea[_0x14ef54(0x1d8)]||_0x32f447[_0x14ef54(0x1a5)]+_0x14ef54(0x18d));}return _0x1f15ea[_0x14ef54(0x1ae)];}export async function listBffScripts(_0x3b6f9f,_0x2a24be,_0x54ae32){const _0x817aa2=a157_0x3c2b;let _0x53d282=_0x817aa2(0x1c7)+_0x3b6f9f;if(_0x2a24be)_0x53d282+=_0x817aa2(0x17c)+_0x2a24be;const _0x27f1e3=await apiRequest(_0x53d282);let _0x36223b=extractList(_0x27f1e3[_0x817aa2(0x1ae)]);if(_0x54ae32?.[_0x817aa2(0x18e)]){const _0x3bf678=_0x54ae32[_0x817aa2(0x18e)][_0x817aa2(0x19f)]();_0x36223b=_0x36223b[_0x817aa2(0x13f)](_0x540ecc=>_0x540ecc['functionName']?.[_0x817aa2(0x19f)]()['includes'](_0x3bf678)||_0x540ecc[_0x817aa2(0x15f)]?.[_0x817aa2(0x19f)]()[_0x817aa2(0x1b6)](_0x3bf678));}return _0x36223b;}export async function getBffScriptInfo(_0x1738bf){const _0x14562f=a157_0x3c2b,_0x7e86=await apiRequest(_0x14562f(0x19c)+_0x1738bf);if(!_0x7e86['data'])throw CliErrors[_0x14562f(0x1b1)](_0x14562f(0x14e)+_0x1738bf);return _0x7e86[_0x14562f(0x1ae)];}export async function saveBffScript(_0x49af31){const _0x501733=a157_0x3c2b,_0x29ee50=await apiRequest(_0x501733(0x1cb),{'method':_0x501733(0x15a),'body':_0x49af31}),{id:_0x51ddd8,entity:_0x2cbdfa}=normalizeEntityWithIdResponse(_0x29ee50[_0x501733(0x1ae)]);if(_0x51ddd8!==undefined){const _0x54c0a7=typeof _0x2cbdfa['functionName']===_0x501733(0x19d)||typeof _0x2cbdfa[_0x501733(0x1ca)]===_0x501733(0x19d)?_0x2cbdfa:undefined;return{'id':_0x51ddd8,'script':_0x54c0a7};}throw CliErrors['apiError']('BFF\x20save\x20returned\x20no\x20valid\x20id');}export async function deleteBffScript(_0x2f77d3){const _0x2abbc0=a157_0x3c2b;await apiRequest(_0x2abbc0(0x167),{'method':_0x2abbc0(0x15a),'body':{'id':_0x2f77d3}});}export async function getBffScriptStatistics(_0x4cb29d){const _0x47556e=a157_0x3c2b,_0x1c4de1=await apiRequest(_0x47556e(0x192)+_0x4cb29d);return extractList(_0x1c4de1[_0x47556e(0x1ae)]);}export async function clearBffScriptCache(){const _0x58a100=a157_0x3c2b,_0x18ce15=await apiRequest('/api/management/script/cache/clear',{'method':_0x58a100(0x15a),'useRuntime':!![]});return typeof _0x18ce15[_0x58a100(0x1ae)]===_0x58a100(0x19d)?_0x18ce15[_0x58a100(0x1ae)]:'';}export async function listBffDatasetOperations(_0x85b6d,_0x20eb6f){const _0x2fb38e=a157_0x3c2b,_0x5d2f1a=await apiRequest(_0x2fb38e(0x1dc),{'method':_0x2fb38e(0x15a),'body':{'appCode':_0x85b6d,'datasetId':_0x20eb6f}});return _0x5d2f1a['data'];}export async function listSqlQueries(_0x4c1e66,_0x172a39){const _0xaa5d05=a157_0x3c2b,_0x2588f3=await apiRequest(_0xaa5d05(0x178),{'method':'POST','body':{'appCode':_0x4c1e66,'currentPage':_0x172a39?.['currentPage']??0x1,'pageSize':_0x172a39?.[_0xaa5d05(0x186)]??0x32,'sqlCode':_0x172a39?.[_0xaa5d05(0x1d4)],'sqlName':_0x172a39?.[_0xaa5d05(0x1da)]}});return _0x2588f3[_0xaa5d05(0x1ae)];}export async function getSqlQueryInfo(_0x40e474,_0x48efd7){const _0x27c621=a157_0x3c2b,_0x216759=await listSqlQueries(_0x40e474,{'sqlCode':_0x48efd7}),_0x1514db=_0x216759[_0x27c621(0x1de)]?.[0x0];if(!_0x1514db)throw CliErrors['validation'](_0x27c621(0x1a8)+_0x48efd7);return _0x1514db;}export async function getSqlQueryDetail(_0xcefc9d){const _0x143e8d=a157_0x3c2b,_0x316f9e=await apiRequest('/smartapi/custom/getUserCustomSql'+(_0x143e8d(0x142)+encodeURIComponent(_0xcefc9d)));if(!_0x316f9e['data'])throw CliErrors[_0x143e8d(0x1b1)](_0x143e8d(0x1a8)+_0xcefc9d);return _0x316f9e[_0x143e8d(0x1ae)];}export async function getSqlQueryDetailById(_0xb74844){const _0x2fe474=a157_0x3c2b,_0x286f56=await apiRequest(_0x2fe474(0x132)+_0xb74844);if(!_0x286f56[_0x2fe474(0x1ae)])throw CliErrors[_0x2fe474(0x1b1)](_0x2fe474(0x1b7)+_0xb74844);return _0x286f56[_0x2fe474(0x1ae)];}export async function createSqlQuery(_0x1cb0e6){const _0x102923=a157_0x3c2b,_0x232bd5=await apiRequest(_0x102923(0x170),{'method':_0x102923(0x15a),'body':_0x1cb0e6}),{id:_0x39641c,entity:_0x208cfe}=normalizeEntityWithIdResponse(_0x232bd5[_0x102923(0x1ae)]);if(!(_0x102923(0x1d4)in _0x208cfe)&&_0x39641c)return getSqlQueryDetailById(_0x39641c);return normalizeSqlQueryEntity(_0x208cfe);}export async function updateSqlQuery(_0xff3b3c){const _0x20833c=a157_0x3c2b,_0xf812ee=await apiRequest(_0x20833c(0x194),{'method':_0x20833c(0x15a),'body':_0xff3b3c}),{id:_0x2e9e63,entity:_0x480665}=normalizeEntityWithIdResponse(_0xf812ee['data']);if(!('sqlCode'in _0x480665)){if(_0xff3b3c['sqlCode'])return getSqlQueryDetail(_0xff3b3c[_0x20833c(0x1d4)]);if(_0x2e9e63)return getSqlQueryDetailById(_0x2e9e63);}return normalizeSqlQueryEntity(_0x480665);}export async function deleteSqlQuery(_0x542aca){const _0x317dee=a157_0x3c2b;await apiRequest(_0x317dee(0x1d9),{'method':'POST','body':_0x542aca});}export async function saveSqlQuery(_0x2aeaf2){const _0x551ab9=a157_0x3c2b,_0x18b0d3=await apiRequest(_0x551ab9(0x16c),{'method':_0x551ab9(0x15a),'body':_0x2aeaf2});return _0x18b0d3[_0x551ab9(0x1ae)];}function normalizeSqlQueryEntity(_0x36822c){const _0x173138=a157_0x3c2b;return{..._0x36822c,'id':Number(_0x36822c['id']),'dbId':_0x36822c[_0x173138(0x169)]==null?undefined:Number(_0x36822c[_0x173138(0x169)]),'version':_0x36822c[_0x173138(0x1d0)]==null?undefined:Number(_0x36822c['version'])};}export async function executeSql(_0x594b00,_0x4eaf3a,_0x39e872){const _0x283a6b=a157_0x3c2b,_0x2a6be4=await apiRequest('/api/custom/executeSql',{'method':_0x283a6b(0x15a),'body':{'appCode':_0x594b00,'sqlCode':_0x4eaf3a,..._0x39e872&&{'params':_0x39e872}},'useRuntime':!![]});return _0x2a6be4[_0x283a6b(0x1ae)];}export async function executeDatasetDataOperation(_0x4d5a5e,_0x3b8e51,_0x1c2599,_0xa08e3b={}){const _0x4f6e2a=a157_0x3c2b;try{const _0x44a2f9=await apiRequest(_0x4f6e2a(0x1aa)+_0x4d5a5e+'/'+_0x3b8e51+'/'+_0x1c2599,{'method':_0x4f6e2a(0x15a),'body':_0xa08e3b,'useRuntime':!![]});return _0x44a2f9[_0x4f6e2a(0x1ae)];}catch(_0x4ceb73){if(_0x1c2599===_0x4f6e2a(0x193)&&_0x4ceb73 instanceof CliError&&_0x4ceb73[_0x4f6e2a(0x17e)]===_0x4f6e2a(0x1c3)&&_0xa08e3b['id']!==undefined&&_0xa08e3b['id']!==null&&_0xa08e3b['id']!==''){const _0x5bf0f0=await apiRequest(_0x4f6e2a(0x1aa)+_0x4d5a5e+'/'+_0x3b8e51+'/filter',{'method':_0x4f6e2a(0x15a),'body':{'where':{'id':{'$eq':_0xa08e3b['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x108e84=Array['isArray'](_0x5bf0f0['data']?.[_0x4f6e2a(0x1de)])?_0x5bf0f0['data'][_0x4f6e2a(0x1de)]:[];return _0x108e84[0x0]??null;}throw _0x4ceb73;}}export async function listDatasets(_0x243b16,_0x32b7aa){const _0x342dbf=a157_0x3c2b,_0x2e42d7={'appCode':_0x243b16,'deleted':_0x32b7aa?.[_0x342dbf(0x1b8)]??![]};if(_0x32b7aa?.[_0x342dbf(0x17e)])_0x2e42d7[_0x342dbf(0x17e)]=_0x32b7aa[_0x342dbf(0x17e)];if(_0x32b7aa?.[_0x342dbf(0x1c9)])_0x2e42d7[_0x342dbf(0x1c9)]=_0x32b7aa[_0x342dbf(0x1c9)];const _0x1318c7=await apiRequest(_0x342dbf(0x143),{'method':_0x342dbf(0x15a),'body':_0x2e42d7});return extractList(_0x1318c7[_0x342dbf(0x1ae)]);}export async function deleteDataset(_0x44132f,_0x2655ea){const _0x2e64ca=a157_0x3c2b;await apiRequest(_0x2e64ca(0x188),{'method':_0x2e64ca(0x15a),'body':{'appCode':_0x44132f,'datasetId':_0x2655ea}});}export async function restoreDataset(_0x418652,_0x3d6ad5){const _0x6aa117=a157_0x3c2b;await apiRequest(_0x6aa117(0x13e),{'method':'POST','body':{'appCode':_0x418652,'datasetId':_0x3d6ad5}});}export async function searchDatasets(_0x20a30b,_0x4362fb){const _0x15f9d0=a157_0x3c2b,_0x59ec14=await listDatasets(_0x20a30b,{'name':_0x4362fb}),_0x579692=_0x4362fb['toLowerCase'](),_0x285678=new Set(_0x59ec14[_0x15f9d0(0x1d5)](_0x84f943=>_0x84f943['id'])),_0x672b3e=_0x59ec14['filter'](_0x3957e5=>_0x3957e5[_0x15f9d0(0x1dd)]?.[_0x15f9d0(0x161)]?.[_0x15f9d0(0x19f)]()[_0x15f9d0(0x1b6)](_0x579692)||_0x3957e5[_0x15f9d0(0x15f)]?.[_0x15f9d0(0x19f)]()['includes'](_0x579692)),_0x2045de=await listDatasets(_0x20a30b,{'code':_0x4362fb});for(const _0x1c5547 of _0x2045de){!_0x285678[_0x15f9d0(0x159)](_0x1c5547['id'])&&(_0x59ec14[_0x15f9d0(0x166)](_0x1c5547),_0x285678['add'](_0x1c5547['id']));}return _0x59ec14;}export function normalizeDatasetOperations(_0x4728ca){const _0x47ee61=a157_0x3c2b;if(Array[_0x47ee61(0x1b9)](_0x4728ca))return _0x4728ca[_0x47ee61(0x13f)](_0x2363f0=>_0x2363f0!=null&&typeof _0x2363f0==='object');if(_0x4728ca&&typeof _0x4728ca===_0x47ee61(0x196))return Object[_0x47ee61(0x147)](_0x4728ca)['filter'](([,_0x2bcf9a])=>_0x2bcf9a!=null&&typeof _0x2bcf9a===_0x47ee61(0x196))[_0x47ee61(0x1d5)](([_0x4ac893,_0x3d56a0])=>({..._0x3d56a0,'name':_0x3d56a0['name']??_0x3d56a0[_0x47ee61(0x152)]??_0x4ac893}));return[];}export async function getDatasetDetail(_0x2ffae3){const _0x1b0489=a157_0x3c2b,_0x2ac656=/^\d+$/['test'](_0x2ffae3)?'id':_0x1b0489(0x17e),_0xe2dfe1=await apiRequest(_0x1b0489(0x16b)+_0x2ac656+'='+_0x2ffae3);return _0xe2dfe1['data'];}export async function updateDrivenData(_0x385b1c){const _0x5bab48=a157_0x3c2b,_0xf69ce7=await apiRequest(_0x5bab48(0x16e),{'method':_0x5bab48(0x15a),'body':_0x385b1c});return _0xf69ce7['data'];}export async function getDatasetOperations(_0xa7e5d1){const _0x1876c=a157_0x3c2b,_0x565bf8=await getDatasetDetail(_0xa7e5d1),_0x5caf4e=normalizeDatasetOperations(_0x565bf8[_0x1876c(0x1a4)])[_0x1876c(0x1d5)](_0x23a1b5=>({'name':_0x23a1b5[_0x1876c(0x1c9)]||_0x23a1b5[_0x1876c(0x152)],'displayName':_0x23a1b5[_0x1876c(0x154)]||_0x23a1b5[_0x1876c(0x1c9)],'type':_0x23a1b5[_0x1876c(0x153)],'method':_0x23a1b5[_0x1876c(0x14b)],'path':_0x23a1b5[_0x1876c(0x1a0)],'enabled':_0x23a1b5[_0x1876c(0x1d2)]??!![],'requestFields':_0x23a1b5['requestFields'],'responseFields':_0x23a1b5[_0x1876c(0x1a2)]}));return{'dataset':{'id':_0x565bf8['id']??_0x565bf8[_0x1876c(0x1c0)],'name':_0x565bf8['name'],'code':_0x565bf8[_0x1876c(0x17e)]||_0x565bf8[_0x1876c(0x1af)],'tableName':_0x565bf8['tableName']||_0x565bf8[_0x1876c(0x1dd)]?.[_0x1876c(0x161)]},'operations':_0x5caf4e};}export async function getOperationDetail(_0x433aba,_0xc10a2e,_0x4bf007){const _0x5747e8=a157_0x3c2b;let _0x492fe6=_0xc10a2e;if(!/^\d+$/['test'](_0xc10a2e)){const _0x332093=await listDatasets(_0x433aba,{'code':_0xc10a2e}),_0x13b8f6=_0x332093[_0x5747e8(0x183)](_0x26b5f0=>_0x26b5f0[_0x5747e8(0x17e)]===_0xc10a2e||String(_0x26b5f0['id'])===_0xc10a2e);if(!_0x13b8f6)throw CliErrors['validation']('Dataset\x20not\x20found:\x20'+_0xc10a2e);_0x492fe6=String(_0x13b8f6['id']);}const _0x56cc22=await getDatasetDetail(_0x492fe6),_0x5518b8=normalizeDatasetOperations(_0x56cc22[_0x5747e8(0x1a4)])[_0x5747e8(0x183)](_0x354d93=>(_0x354d93['name']||_0x354d93[_0x5747e8(0x152)])===_0x4bf007);if(!_0x5518b8)throw CliErrors[_0x5747e8(0x1b1)](_0x5747e8(0x18f)+_0x4bf007+_0x5747e8(0x150)+_0xc10a2e);return{'dataset':{'id':_0x56cc22['id']??_0x56cc22[_0x5747e8(0x1c0)],'name':_0x56cc22[_0x5747e8(0x1c9)],'code':_0x56cc22[_0x5747e8(0x17e)]||_0x56cc22[_0x5747e8(0x1af)],'tableName':_0x56cc22[_0x5747e8(0x161)]||_0x56cc22[_0x5747e8(0x1dd)]?.[_0x5747e8(0x161)]},'operation':_0x5518b8};}export async function startGenerateStandardPages(_0x4a594c,_0x4e6ae5,_0x395d22){const _0x51db3e=a157_0x3c2b,_0x2580fd=await apiRequest(_0x51db3e(0x1a3)+_0x4e6ae5+_0x51db3e(0x182),{'method':_0x51db3e(0x15a),'body':{'appCode':_0x4a594c,..._0x395d22?.[_0x51db3e(0x1bb)]?{'clientOperationId':_0x395d22[_0x51db3e(0x1bb)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x2580fd[_0x51db3e(0x1ae)];}export async function getGenerateStandardPagesStatus(_0x33647a,_0x2cd9bc,_0x35d83b){const _0x447be4=a157_0x3c2b,_0x50cedd=new URLSearchParams({'appCode':_0x33647a});_0x35d83b[_0x447be4(0x17f)]&&_0x50cedd['set']('operationId',_0x35d83b[_0x447be4(0x17f)]);_0x35d83b[_0x447be4(0x1bb)]&&_0x50cedd[_0x447be4(0x134)](_0x447be4(0x1bb),_0x35d83b[_0x447be4(0x1bb)]);const _0x1a93c8=await apiRequest('/smartapi/lovrabet/dataset/'+_0x2cd9bc+'/generate-standard-pages/status?'+_0x50cedd[_0x447be4(0x13d)]());return _0x1a93c8['data'];}export async function getStandardPageStatus(_0x2f175a,_0x5e4fda){const _0x3f1cf3=a157_0x3c2b,_0x5da9f9=await apiRequest(_0x3f1cf3(0x1a3)+_0x5e4fda+_0x3f1cf3(0x187)+encodeURIComponent(_0x2f175a));return _0x5da9f9[_0x3f1cf3(0x1ae)];}function a157_0x3c2b(_0x2c1336,_0x3ca1a0){_0x2c1336=_0x2c1336-0x132;const _0x3c3967=a157_0x3c39();let _0x3c2b78=_0x3c3967[_0x2c1336];return _0x3c2b78;}export async function tryGetStandardPageStatus(_0x262e9e,_0x3618f6){const _0x9b4b0c=a157_0x3c2b;try{return await getStandardPageStatus(_0x262e9e,_0x3618f6);}catch(_0x315419){if(_0x315419 instanceof CliError&&_0x315419[_0x9b4b0c(0x17e)]==='api_error'&&/404|not found|non-json response/i[_0x9b4b0c(0x199)](_0x315419[_0x9b4b0c(0x1d8)]))return null;throw _0x315419;}}export async function syncStandardPages(_0x4fb8b7,_0x298e6b){const _0x4f6396=a157_0x3c2b,_0x4184df=await apiRequest(_0x4f6396(0x1a3)+_0x298e6b+_0x4f6396(0x1b5),{'method':_0x4f6396(0x15a),'body':{'appCode':_0x4fb8b7}});return _0x4184df[_0x4f6396(0x1ae)];}export async function getPageDetail(_0x168835){const _0xe833f7=a157_0x3c2b,_0x225922=await apiRequest(_0xe833f7(0x149)+_0x168835);if(!_0x225922[_0xe833f7(0x1ae)])throw CliErrors['validation'](_0xe833f7(0x195)+_0x168835);return _0x225922[_0xe833f7(0x1ae)];}export async function updatePage(_0x3002a4,_0x6b7c05,_0x14d437,_0x3a52a6){const _0x96ca8a=a157_0x3c2b,_0x123a4d=await apiRequest('/smartapi/lovrabet/update-page',{'method':_0x96ca8a(0x15a),'body':{'appCode':_0x3002a4,'pageId':_0x6b7c05,'code':_0x14d437,'datasetIds':_0x3a52a6}});return _0x123a4d[_0x96ca8a(0x1ae)];}export function generateSdkCode(_0x2af265,_0x3b236c,_0x3fcb5e){const _0x12dfb2=a157_0x3c2b,_0x33cf12=_0x3fcb5e?.['includeImports']??!![],_0x208740=_0x12dfb2(0x1d3)+_0x2af265[_0x12dfb2(0x17e)]?.['replace'](/-/g,'_'),_0x21ef7b=_0x3b236c[_0x12dfb2(0x1c9)]||_0x3b236c[_0x12dfb2(0x152)]||'filter',_0x4a7c5d=[];_0x33cf12&&_0x4a7c5d['push'](_0x12dfb2(0x1db),'',_0x12dfb2(0x16f),'');_0x4a7c5d[_0x12dfb2(0x166)](_0x12dfb2(0x137)+_0x2af265[_0x12dfb2(0x1c9)]+'\x20('+(_0x2af265['tableName']||_0x12dfb2(0x15d))+')');if(_0x21ef7b===_0x12dfb2(0x13f))_0x4a7c5d['push'](_0x12dfb2(0x15c)+_0x208740+'.filter({',_0x12dfb2(0x1cf),_0x12dfb2(0x162),'\x20\x20currentPage:\x201,',_0x12dfb2(0x173));else{if(_0x21ef7b===_0x12dfb2(0x193))_0x4a7c5d[_0x12dfb2(0x166)]('const\x20result\x20=\x20await\x20client.models.'+_0x208740+'.getOne(id);');else{if(_0x21ef7b===_0x12dfb2(0x14d))_0x4a7c5d[_0x12dfb2(0x166)](_0x12dfb2(0x15c)+_0x208740+_0x12dfb2(0x151));else{if(_0x21ef7b===_0x12dfb2(0x17d))_0x4a7c5d['push'](_0x12dfb2(0x15c)+_0x208740+_0x12dfb2(0x139));else _0x21ef7b==='delete'||_0x21ef7b===_0x12dfb2(0x168)?_0x4a7c5d[_0x12dfb2(0x166)](_0x12dfb2(0x15c)+_0x208740+_0x12dfb2(0x14f)):_0x4a7c5d['push'](_0x12dfb2(0x15c)+_0x208740+'.'+_0x21ef7b+_0x12dfb2(0x13b));}}}return _0x4a7c5d[_0x12dfb2(0x19a)]('\x0a');}export function generateSqlCodeTemplate(_0x842de5,_0x11a70b){const _0x2623e3=a157_0x3c2b,_0x2e327d=_0x11a70b?.[_0x2623e3(0x160)]??_0x2623e3(0x1c1),_0x7a6ddc=_0x11a70b?.[_0x2623e3(0x180)]??!![],_0x65de62=[];return _0x65de62[_0x2623e3(0x166)]('//\x20SQL:\x20'+_0x842de5[_0x2623e3(0x1da)]+'\x20('+_0x842de5[_0x2623e3(0x1d4)]+')'),_0x2e327d==='sdk'?(_0x7a6ddc&&_0x65de62['push']('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','',_0x2623e3(0x16f),''),_0x65de62[_0x2623e3(0x166)]('const\x20data\x20=\x20await\x20client.sql.execute({',_0x2623e3(0x17a)+_0x842de5[_0x2623e3(0x1d4)]+'\x27,',_0x2623e3(0x177),'});',_0x2623e3(0x171),_0x2623e3(0x15b))):_0x65de62[_0x2623e3(0x166)](_0x2623e3(0x1c4),_0x2623e3(0x13c),_0x2623e3(0x1c2),'\x20\x20\x20\x20sqlCode:\x20\x27'+_0x842de5[_0x2623e3(0x1d4)]+'\x27,',_0x2623e3(0x1b2),'\x20\x20});',_0x2623e3(0x17b),'}'),_0x65de62[_0x2623e3(0x19a)]('\x0a');}export async function getErConfig(_0x15dced,_0x38b782){const _0x71a413=a157_0x3c2b,_0x3ba8cb=await apiRequest('/smartapi/question/er-config',{'method':'POST','body':{'appCode':_0x15dced,'dblinkId':_0x38b782},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x3ba8cb[_0x71a413(0x1ae)];}export async function createErRelation(_0x1254cd){const _0x5050cf=a157_0x3c2b,_0x135a74=await apiRequest(_0x5050cf(0x1df),{'method':_0x5050cf(0x15a),'body':_0x1254cd,'allowNonJsonSuccess':!![]});return _0x135a74[_0x5050cf(0x1ae)];}export async function updateErRelation(_0xea67c0){const _0x3d3c4b=a157_0x3c2b,_0x538fb5=await apiRequest(_0x3d3c4b(0x1c6),{'method':_0x3d3c4b(0x15a),'body':_0xea67c0,'allowNonJsonSuccess':!![]});return _0x538fb5['data'];}export async function deleteErRelation(_0x459054){const _0x5cffd0=a157_0x3c2b,_0xda649=await apiRequest(_0x5cffd0(0x175),{'method':_0x5cffd0(0x15a),'body':_0x459054,'allowNonJsonSuccess':!![]});return _0xda649['data'];}export async function updateErBusinessGroup(_0x1c18cb){const _0x2f1fb4=a157_0x3c2b,_0x19ccbe=await apiRequest(_0x2f1fb4(0x1bf),{'method':'POST','body':_0x1c18cb,'allowNonJsonSuccess':!![]});return _0x19ccbe[_0x2f1fb4(0x1ae)];}function buildQuery(_0x4730ec){const _0x27de53=a157_0x3c2b,_0x3ea6a0=new URLSearchParams();for(const [_0x54ed79,_0x491d7f]of Object[_0x27de53(0x147)](_0x4730ec)){if(_0x491d7f===undefined||_0x491d7f==='')continue;_0x3ea6a0['set'](_0x54ed79,String(_0x491d7f));}const _0x1ea239=_0x3ea6a0[_0x27de53(0x13d)]();return _0x1ea239?'?'+_0x1ea239:'';}export async function listAppConfigs(_0x381477,_0x20e79f){const _0x4353f3=a157_0x3c2b,_0x46cc95=await apiRequest(_0x4353f3(0x140),{'method':_0x4353f3(0x15a),'body':{'appCode':_0x381477,..._0x20e79f?.[_0x4353f3(0x1e0)]?{'key':_0x20e79f[_0x4353f3(0x1e0)]}:{},..._0x20e79f?.[_0x4353f3(0x1cd)]?{'tags':_0x20e79f[_0x4353f3(0x1cd)]}:{}}});return extractAppConfigList(_0x46cc95[_0x4353f3(0x1ae)]);}export async function getAppConfigByKey(_0x23e664,_0x4dbf4c){const _0x52a46a=a157_0x3c2b,_0x51d4c3=await apiRequest(_0x52a46a(0x1d7)+buildQuery({'appCode':_0x23e664,'key':_0x4dbf4c}));return _0x51d4c3['data']??null;}export async function createAppConfig(_0x21e912){const _0xcc5ea1=a157_0x3c2b,_0x5138c6=await apiRequest(_0xcc5ea1(0x198),{'method':_0xcc5ea1(0x15a),'body':{'appCode':_0x21e912[_0xcc5ea1(0x14c)],'key':_0x21e912[_0xcc5ea1(0x1e0)],'value':_0x21e912[_0xcc5ea1(0x1a1)],..._0x21e912['tags']?{'tags':_0x21e912[_0xcc5ea1(0x1cd)]}:{}}});return _0x5138c6[_0xcc5ea1(0x1ae)];}export async function updateAppConfig(_0x37e010){const _0x4db730=a157_0x3c2b;await apiRequest('/smartapi/app-config/update',{'method':'POST','body':{'id':_0x37e010['id'],'appCode':_0x37e010[_0x4db730(0x14c)],'key':_0x37e010[_0x4db730(0x1e0)],'value':_0x37e010[_0x4db730(0x1a1)],..._0x37e010[_0x4db730(0x1cd)]?{'tags':_0x37e010['tags']}:{}}});}export async function deleteAppConfig(_0x50b0af){const _0x58a109=a157_0x3c2b;await apiRequest(_0x58a109(0x144),{'method':'POST','body':_0x50b0af});}function extractAppConfigList(_0x163a8f){const _0x1db587=a157_0x3c2b;if(Array['isArray'](_0x163a8f))return _0x163a8f;if(_0x163a8f&&typeof _0x163a8f===_0x1db587(0x196)&&Array[_0x1db587(0x1b9)](_0x163a8f['list']))return _0x163a8f['list'];return extractList(_0x163a8f);}export async function listDbLinks(_0x1b1b79,_0x5bb61e){const _0x595d1f=a157_0x3c2b,_0x1d3f8b=await apiRequest(_0x595d1f(0x176),{'method':_0x595d1f(0x15a),'body':{'appCode':_0x1b1b79,'currentPage':_0x5bb61e?.[_0x595d1f(0x18c)]??0x1,'pageSize':_0x5bb61e?.[_0x595d1f(0x186)]??0x64}});return{'items':extractList(_0x1d3f8b[_0x595d1f(0x1ae)]),'paging':extractPaging(_0x1d3f8b['data'])};}export async function getDbLinkInfo(_0x3817a4){const _0x26743f=a157_0x3c2b,_0x474cb5=await apiRequest(_0x26743f(0x133)+buildQuery({'id':_0x3817a4}));return _0x474cb5['data'];}export async function createDbLink(_0x376e53){const _0x2848b0=a157_0x3c2b,_0x3088cf=await apiRequest(_0x2848b0(0x1bd),{'method':_0x2848b0(0x15a),'body':_0x376e53});return _0x3088cf[_0x2848b0(0x1ae)];}export async function updateDbLink(_0x20df67){const _0x14490c=a157_0x3c2b,_0x26ecef=await apiRequest('/smartapi/dblink/update',{'method':_0x14490c(0x15a),'body':_0x20df67});return _0x26ecef[_0x14490c(0x1ae)];}export async function deleteDbLink(_0x2f31d1){const _0x419601=a157_0x3c2b;await apiRequest(_0x419601(0x1d1),{'method':'POST','body':{'id':_0x2f31d1}});}export async function testDbLinkConnect(_0x372572){const _0x5641b5=a157_0x3c2b,_0x30648a=await apiRequest(_0x5641b5(0x141)+buildQuery({'id':_0x372572}));return _0x30648a[_0x5641b5(0x1ae)];}export async function startDbAnalysis(_0x1177a4,_0x18eb82){const _0x5b02cf=a157_0x3c2b,_0x552b40=await apiRequest(_0x5b02cf(0x16d),{'method':'POST','body':{'dbLinkId':_0x1177a4,..._0x18eb82&&_0x18eb82['length']>0x0?{'tableNames':_0x18eb82}:{}}}),_0x3a8f6a=_0x552b40[_0x5b02cf(0x1ae)];if(typeof _0x3a8f6a===_0x5b02cf(0x19d))return _0x3a8f6a;if(_0x3a8f6a&&typeof _0x3a8f6a===_0x5b02cf(0x196)&&typeof _0x3a8f6a['planId']===_0x5b02cf(0x19d))return _0x3a8f6a[_0x5b02cf(0x184)];return _0x3a8f6a!=null?String(_0x3a8f6a):'';}export async function cancelDbAnalysis(_0x1e1de0){const _0x10c5cc=a157_0x3c2b;await apiRequest(_0x10c5cc(0x148)+buildQuery({'planId':_0x1e1de0}),{'method':_0x10c5cc(0x15a)});}export async function getDbAnalysisStatus(_0x59fd47){const _0x57d88b=a157_0x3c2b,_0x44b528=await apiRequest(_0x57d88b(0x1a7)+encodeURIComponent(_0x59fd47));return _0x44b528[_0x57d88b(0x1ae)];}export async function getDbAllTableList(_0x4333d6,_0x3ca98b){const _0x2eeaba=a157_0x3c2b,_0x360c6e=await apiRequest(_0x2eeaba(0x1b3)+buildQuery({'appCode':_0x4333d6,'dbLinkId':_0x3ca98b})),_0x3da527=_0x360c6e[_0x2eeaba(0x1ae)];if(Array[_0x2eeaba(0x1b9)](_0x3da527))return _0x3da527;return extractList(_0x3da527);}export async function getDbTableDiff(_0x45753c,_0x4acedd,_0x598d0c){const _0x2f583a=a157_0x3c2b,_0x2c31f0=await apiRequest(_0x2f583a(0x1ba)+buildQuery({'appCode':_0x45753c,'dbLinkId':_0x4acedd,'pageIndex':_0x598d0c?.['pageIndex']??0x1,'pageSize':_0x598d0c?.[_0x2f583a(0x186)]??0x14,'tableName':_0x598d0c?.[_0x2f583a(0x161)]})),_0x2eee2b=_0x2c31f0[_0x2f583a(0x1ae)];return{'totalCount':_0x2eee2b?.[_0x2f583a(0x174)]??0x0,'tableList':Array[_0x2f583a(0x1b9)](_0x2eee2b?.['tableList'])?_0x2eee2b[_0x2f583a(0x1ce)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x157df9=a157_0x3c2b,_0x49a48d=await apiRequest(_0x157df9(0x191),{'method':_0x157df9(0x15a),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x96904a=extractList(_0x49a48d[_0x157df9(0x1ae)]),_0x6589=extractPaging(_0x49a48d[_0x157df9(0x1ae)]);return _0x6589&&_0x6589[_0x157df9(0x174)]>REMOTE_APP_PAGE_SIZE&&console[_0x157df9(0x185)](_0x157df9(0x1a9)+REMOTE_APP_PAGE_SIZE+_0x157df9(0x1bc)+_0x6589['totalCount']+_0x157df9(0x157)+_0x157df9(0x145)),_0x96904a;}
1
+ (function(_0x5758b3,_0x561d0d){const _0x4012d3=a157_0x5aa0,_0x2e128b=_0x5758b3();while(!![]){try{const _0x21297f=-parseInt(_0x4012d3(0x148))/0x1*(parseInt(_0x4012d3(0x1be))/0x2)+parseInt(_0x4012d3(0x11b))/0x3*(parseInt(_0x4012d3(0x136))/0x4)+parseInt(_0x4012d3(0x162))/0x5*(-parseInt(_0x4012d3(0x1a2))/0x6)+-parseInt(_0x4012d3(0x123))/0x7+-parseInt(_0x4012d3(0x1a8))/0x8*(parseInt(_0x4012d3(0x149))/0x9)+-parseInt(_0x4012d3(0x11d))/0xa+-parseInt(_0x4012d3(0x154))/0xb*(-parseInt(_0x4012d3(0x196))/0xc);if(_0x21297f===_0x561d0d)break;else _0x2e128b['push'](_0x2e128b['shift']());}catch(_0x5841c8){_0x2e128b['push'](_0x2e128b['shift']());}}}(a157_0x263a,0xa3bcd));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';let _activeCookie;export function setActiveCookie(_0x3d3e88){_activeCookie=_0x3d3e88||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0;function createFetchFailureError(_0x21fe99,_0x48e46b){const _0x9296b5=a157_0x5aa0,_0x1d5e1b=_0x48e46b instanceof Error?_0x48e46b['message']:String(_0x48e46b);return CliErrors[_0x9296b5(0x16d)]('Request\x20failed:\x20'+_0x21fe99+(_0x1d5e1b?'\x20('+_0x1d5e1b+')':''),_0x9296b5(0x146));}async function apiRequest(_0x34253c,_0x5b24c4={}){const _0x105eb8=a157_0x5aa0,{method:method='GET',body:_0x257652,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x5b24c4,_0x2b21a2=useRuntime?getRuntimeDomain():getApiDomain(),_0x146997=_activeCookie||getCookie(),_0x466119=''+_0x2b21a2+_0x34253c,_0x2ce3a7=new AbortController(),_0x54ca6f=setTimeout(()=>_0x2ce3a7['abort'](),timeout);try{const _0x2c6688=await fetch(_0x466119,{'method':method,'headers':{'Content-Type':'application/json','Cookie':_0x146997,'X-Invoke-Source':'cli:rabetbase',...headers},'body':_0x257652?JSON[_0x105eb8(0x1af)](_0x257652):undefined,'signal':_0x2ce3a7[_0x105eb8(0x19e)]});let _0x52a50a;try{_0x52a50a=await _0x2c6688[_0x105eb8(0x170)]();}catch(_0x12f7cb){if(_0x12f7cb instanceof Error&&_0x12f7cb['name']===_0x105eb8(0x186))throw CliErrors[_0x105eb8(0x16d)](_0x105eb8(0x14b)+_0x466119);if(_0x2c6688['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x105eb8(0x16d)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x2c6688[_0x105eb8(0x1ac)]+')',_0x2c6688[_0x105eb8(0x1ac)]>=0x190?_0x105eb8(0x124):undefined);}if(!_0x2c6688['ok']||_0x52a50a[_0x105eb8(0x13e)]===![])throw CliErrors['apiError'](_0x52a50a[_0x105eb8(0x14a)]||_0x52a50a[_0x105eb8(0x15b)]||_0x105eb8(0x13b)+_0x2c6688['status'],_0x52a50a[_0x105eb8(0x13a)]?_0x105eb8(0x194)+_0x52a50a[_0x105eb8(0x13a)]:undefined);return _0x52a50a;}catch(_0x1e20d2){if(_0x1e20d2 instanceof CliError)throw _0x1e20d2;if(_0x1e20d2 instanceof Error&&_0x1e20d2['name']===_0x105eb8(0x186))throw CliErrors['apiError'](_0x105eb8(0x14b)+_0x466119);throw createFetchFailureError(_0x466119,_0x1e20d2);}finally{clearTimeout(_0x54ca6f);}}function isAuthFailure(_0x4779a0){const _0x10727f=a157_0x5aa0,_0x1c54c9=_0x4779a0['errorMsg']||_0x4779a0[_0x10727f(0x15b)]||_0x4779a0['data']?.[_0x10727f(0x15b)]||_0x4779a0[_0x10727f(0x16f)]||_0x4779a0[_0x10727f(0x151)]||'';return _0x4779a0[_0x10727f(0x13a)]===_0x10727f(0x191)||_0x4779a0[_0x10727f(0x159)]===0x191||_0x4779a0[_0x10727f(0x159)]==='401'||_0x1c54c9[_0x10727f(0x181)](_0x10727f(0x12b))||_0x1c54c9[_0x10727f(0x181)](_0x10727f(0x116))||_0x1c54c9[_0x10727f(0x181)]('登录')||_0x1c54c9[_0x10727f(0x181)]('认证');}export async function platformFetch(_0x221c8b,_0x4c799c){const _0x5801a5=a157_0x5aa0;let _0xbbf115;try{_0xbbf115=await fetch(_0x221c8b,{'method':_0x4c799c[_0x5801a5(0x11e)]??_0x5801a5(0x19b),'headers':{'Content-Type':_0x5801a5(0x18e),'Cookie':_0x4c799c[_0x5801a5(0x1ab)],'X-Invoke-Source':_0x5801a5(0x156)},..._0x4c799c['body']&&{'body':JSON[_0x5801a5(0x1af)](_0x4c799c[_0x5801a5(0x13d)])}});}catch(_0x512db3){throw createFetchFailureError(_0x221c8b,_0x512db3);}if(!_0xbbf115['ok']){if(_0xbbf115[_0x5801a5(0x1ac)]===0x191)throw CliErrors['authRequired']();throw CliErrors[_0x5801a5(0x16d)](_0x4c799c[_0x5801a5(0x167)]+_0x5801a5(0x133)+_0xbbf115[_0x5801a5(0x1ac)]);}const _0x330b91=await _0xbbf115[_0x5801a5(0x170)]();if(_0x330b91[_0x5801a5(0x13e)]===![]){if(isAuthFailure(_0x330b91))throw CliErrors['authRequired']();throw CliErrors[_0x5801a5(0x16d)](_0x330b91[_0x5801a5(0x14a)]||_0x330b91[_0x5801a5(0x15b)]||_0x4c799c['label']+_0x5801a5(0x187));}return _0x330b91[_0x5801a5(0x188)];}function a157_0x263a(){const _0x4881fe=['Request\x20timeout:\x20','const\x20result\x20=\x20await\x20client.models.','key','/generate-standard-pages/status?','tableName','add','error','join','list','38939626lHANeR','sdk','cli:rabetbase','/smartapi/dataset/get-dataset-operation','\x20\x20pageSize:\x2020,','code','});','message','/smartapi/custom/deleteUserCustomSql','dataset_','Dataset\x20not\x20found:\x20','version','.create({\x20/*\x20fields\x20*/\x20});','SQL\x20query\x20not\x20found:\x20id=','238115mabfpk','Operation\x20\x22','/api/management/library/scripts/save','dbId','\x20\x20});','label','/smartapi/dblink/delete','BFF\x20save\x20returned\x20no\x20valid\x20id','/smartapi/dblink/update','warn','/api/','apiError','deleted','errorMessage','json','enabled','/smartapi/db-analysis/jobs/cancel','test','\x20\x20sqlCode:\x20\x27','BFF\x20script\x20not\x20found:\x20id=','create','/smartapi/dataset/delete-dataset','set','(/*\x20params\x20*/);','operationId','/api/management/library/scripts/delete','/smartapi/dataset/update-driven-data','operationName','api_error','totalCount','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','includes','description','requestFields','find','\x20\x20return\x20rows;','AbortError','\x20failed','data','pageSize','\x20apps.\x20','delete','/smartapi/lovrabet/dataset/','POST','application/json','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','\x20\x20\x20\x20sqlCode:\x20\x27','UNAUTHORIZED','const\x20results\x20=\x20data.execResult\x20||\x20[];','modelCode','API\x20error\x20code:\x20','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','12bAkwpp','/smartapi/dblink/create','/smartapi/dblink/testConnect','/smartapi/app-config/getByKey','filter','GET','sqlCode','/smartapi/dblink/getList','signal','/api/management/library/scripts/info?id=','map','\x22\x20not\x20found\x20in\x20dataset\x20','90XXYuun','sqlName','/smartapi/dataset/get-dataset-list','/smartapi/lovrabet/update-page','replace','\x20\x20where:\x20{},','8781592NLfYWj','dbtableConfig','/smartapi/custom/getUserCustomSql?id=','cookie','status','tableData','path','stringify','/smartapi/dataset/restore-dataset','name','/smartapi/app-config/list','table','/standard-page-status?appCode=','/sync-to-pages','planId','isArray','update','getOne','push','target','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','/smartapi/app/getList','549084fWonxe','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','/smartapi/question/er-config/erCreate','Page\x20not\x20found:\x20','/smartapi/question/er-config','includeImports','type','\x20\x20currentPage:\x201,','.getOne(id);','Unauthorized','functionName','/api/management/library/scripts/statistics?appCode=','tableList','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','90891MkLDum','clientOperationId','506610MqaHob','method','/smartapi/app-config/update','object','entries','/smartapi/app-config/delete','2115995gKJmbQ','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','modelId','/smartapi/dblink/getAllTableList','//\x20','/smartapi/app-config/create','has','scriptName','401','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','currentPage','/smartapi/custom/getUserCustomSql','/smartapi/dblink/getOne','/smartapi/dblink/getTableDiffV2ByPage','string','.remove(id);','\x20failed,\x20HTTP\x20','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','/smartapi/lovrabet/detail?pageId=','52lCypHT','operations','const\x20data\x20=\x20await\x20client.sql.execute({','tags','errorCode','API\x20error:\x20','/smartapi/db-analysis/status/','body','success','value','validation','toLowerCase','appCode','//\x20SQL:\x20','responseFields','toString','Check\x20network\x20connectivity\x20and\x20try\x20again.','/smartapi/question/er-config/update-single','4aTRMXm','9kVKwhR','errorMsg'];a157_0x263a=function(){return _0x4881fe;};return a157_0x263a();}export async function listBffScripts(_0x29cc41,_0x19299d,_0x592ee7){const _0x50f300=a157_0x5aa0;let _0x36743a='/api/management/library/scripts/list?appCode='+_0x29cc41;if(_0x19299d)_0x36743a+='&type='+_0x19299d;const _0x5deecc=await apiRequest(_0x36743a);let _0x50970e=extractList(_0x5deecc[_0x50f300(0x188)]);if(_0x592ee7?.[_0x50f300(0x12a)]){const _0x2dff59=_0x592ee7[_0x50f300(0x12a)][_0x50f300(0x141)]();_0x50970e=_0x50970e[_0x50f300(0x19a)](_0x4a6c30=>_0x4a6c30['functionName']?.[_0x50f300(0x141)]()['includes'](_0x2dff59)||_0x4a6c30[_0x50f300(0x182)]?.[_0x50f300(0x141)]()[_0x50f300(0x181)](_0x2dff59));}return _0x50970e;}export async function getBffScriptInfo(_0x5d7be4){const _0x3e12b9=a157_0x5aa0,_0x446cff=await apiRequest(_0x3e12b9(0x19f)+_0x5d7be4);if(!_0x446cff[_0x3e12b9(0x188)])throw CliErrors[_0x3e12b9(0x140)](_0x3e12b9(0x175)+_0x5d7be4);return _0x446cff[_0x3e12b9(0x188)];}export async function saveBffScript(_0x55c328){const _0x47cf03=a157_0x5aa0,_0x5d105f=await apiRequest(_0x47cf03(0x164),{'method':_0x47cf03(0x18d),'body':_0x55c328}),{id:_0x40b335,entity:_0x445cb1}=normalizeEntityWithIdResponse(_0x5d105f[_0x47cf03(0x188)]);if(_0x40b335!==undefined){const _0x51d3e2=typeof _0x445cb1[_0x47cf03(0x117)]===_0x47cf03(0x131)||typeof _0x445cb1['scriptType']===_0x47cf03(0x131)?_0x445cb1:undefined;return{'id':_0x40b335,'script':_0x51d3e2};}throw CliErrors[_0x47cf03(0x16d)](_0x47cf03(0x169));}export async function deleteBffScript(_0x533de4){const _0x490c1e=a157_0x5aa0;await apiRequest(_0x490c1e(0x17b),{'method':_0x490c1e(0x18d),'body':{'id':_0x533de4}});}export async function getBffScriptStatistics(_0x37cfe5){const _0x5ad159=a157_0x5aa0,_0x265a9a=await apiRequest(_0x5ad159(0x118)+_0x37cfe5);return extractList(_0x265a9a['data']);}export async function clearBffScriptCache(){const _0x593738=a157_0x5aa0,_0x46076f=await apiRequest('/api/management/script/cache/clear',{'method':'POST','useRuntime':!![]});return typeof _0x46076f['data']===_0x593738(0x131)?_0x46076f[_0x593738(0x188)]:'';}export async function listBffDatasetOperations(_0x7599f5,_0x435aa2){const _0x5e66e3=a157_0x5aa0,_0x123735=await apiRequest(_0x5e66e3(0x157),{'method':_0x5e66e3(0x18d),'body':{'appCode':_0x7599f5,'datasetId':_0x435aa2}});return _0x123735[_0x5e66e3(0x188)];}export async function listSqlQueries(_0x504a5e,_0xaf5ff0){const _0x114dc0=a157_0x5aa0,_0x314679=await apiRequest('/smartapi/custom/queryUserCustomSqlList',{'method':'POST','body':{'appCode':_0x504a5e,'currentPage':_0xaf5ff0?.['currentPage']??0x1,'pageSize':_0xaf5ff0?.[_0x114dc0(0x189)]??0x32,'sqlCode':_0xaf5ff0?.['sqlCode'],'sqlName':_0xaf5ff0?.[_0x114dc0(0x1a3)]}});return _0x314679['data'];}export async function getSqlQueryInfo(_0xb2054,_0x1d7487){const _0x58c2ba=a157_0x5aa0,_0x381837=await listSqlQueries(_0xb2054,{'sqlCode':_0x1d7487}),_0x22f882=_0x381837[_0x58c2ba(0x1ad)]?.[0x0];if(!_0x22f882)throw CliErrors['validation']('SQL\x20query\x20not\x20found:\x20'+_0x1d7487);return _0x22f882;}export async function getSqlQueryDetail(_0x557084){const _0xb1216d=a157_0x5aa0,_0x1148b0=await apiRequest(_0xb1216d(0x12e)+('?sqlCode='+encodeURIComponent(_0x557084)));if(!_0x1148b0[_0xb1216d(0x188)])throw CliErrors[_0xb1216d(0x140)]('SQL\x20query\x20not\x20found:\x20'+_0x557084);return _0x1148b0[_0xb1216d(0x188)];}export async function getSqlQueryDetailById(_0x3c7ede){const _0x54599a=a157_0x5aa0,_0x57a938=await apiRequest(_0x54599a(0x1aa)+_0x3c7ede);if(!_0x57a938[_0x54599a(0x188)])throw CliErrors[_0x54599a(0x140)](_0x54599a(0x161)+_0x3c7ede);return _0x57a938[_0x54599a(0x188)];}export async function createSqlQuery(_0x2bc46c){const _0x136f13=a157_0x5aa0,_0x19ad66=await apiRequest('/smartapi/custom/saveUserCustomSql',{'method':_0x136f13(0x18d),'body':_0x2bc46c}),{id:_0x34c418,entity:_0x5b42b8}=normalizeEntityWithIdResponse(_0x19ad66['data']);if(!(_0x136f13(0x19c)in _0x5b42b8)&&_0x34c418)return getSqlQueryDetailById(_0x34c418);return normalizeSqlQueryEntity(_0x5b42b8);}export async function updateSqlQuery(_0x19e47e){const _0x15044e=a157_0x5aa0,_0x4e3f23=await apiRequest('/smartapi/custom/updateUserCustomSql',{'method':_0x15044e(0x18d),'body':_0x19e47e}),{id:_0x4c7777,entity:_0x2f94b9}=normalizeEntityWithIdResponse(_0x4e3f23[_0x15044e(0x188)]);if(!('sqlCode'in _0x2f94b9)){if(_0x19e47e['sqlCode'])return getSqlQueryDetail(_0x19e47e['sqlCode']);if(_0x4c7777)return getSqlQueryDetailById(_0x4c7777);}return normalizeSqlQueryEntity(_0x2f94b9);}export async function deleteSqlQuery(_0x214b5e){const _0x5cac61=a157_0x5aa0;await apiRequest(_0x5cac61(0x15c),{'method':_0x5cac61(0x18d),'body':_0x214b5e});}export async function saveSqlQuery(_0x799574){const _0x43f440=a157_0x5aa0,_0x4b15bc=await apiRequest('/api/node-toolbox/sql/save',{'method':'POST','body':_0x799574});return _0x4b15bc[_0x43f440(0x188)];}function normalizeSqlQueryEntity(_0x12ab1a){const _0x4f712b=a157_0x5aa0;return{..._0x12ab1a,'id':Number(_0x12ab1a['id']),'dbId':_0x12ab1a['dbId']==null?undefined:Number(_0x12ab1a[_0x4f712b(0x165)]),'version':_0x12ab1a[_0x4f712b(0x15f)]==null?undefined:Number(_0x12ab1a[_0x4f712b(0x15f)])};}export async function executeSql(_0x405eec,_0x59ee6f,_0x1b2a3c){const _0x2dc8fa=a157_0x5aa0,_0x3730a6=await apiRequest('/api/custom/executeSql',{'method':_0x2dc8fa(0x18d),'body':{'appCode':_0x405eec,'sqlCode':_0x59ee6f,..._0x1b2a3c&&{'params':_0x1b2a3c}},'useRuntime':!![]});return _0x3730a6[_0x2dc8fa(0x188)];}export async function executeDatasetDataOperation(_0x5d2cbf,_0x51b5ad,_0x309836,_0xcf73df={}){const _0x5d9177=a157_0x5aa0;try{const _0x33088b=await apiRequest(_0x5d9177(0x16c)+_0x5d2cbf+'/'+_0x51b5ad+'/'+_0x309836,{'method':'POST','body':_0xcf73df,'useRuntime':!![]});return _0x33088b[_0x5d9177(0x188)];}catch(_0x1d29d2){if(_0x309836==='getOne'&&_0x1d29d2 instanceof CliError&&_0x1d29d2[_0x5d9177(0x159)]===_0x5d9177(0x17e)&&_0xcf73df['id']!==undefined&&_0xcf73df['id']!==null&&_0xcf73df['id']!==''){const _0x593159=await apiRequest(_0x5d9177(0x16c)+_0x5d2cbf+'/'+_0x51b5ad+'/filter',{'method':_0x5d9177(0x18d),'body':{'where':{'id':{'$eq':_0xcf73df['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x56bc9b=Array[_0x5d9177(0x1b7)](_0x593159[_0x5d9177(0x188)]?.[_0x5d9177(0x1ad)])?_0x593159['data']['tableData']:[];return _0x56bc9b[0x0]??null;}throw _0x1d29d2;}}export async function listDatasets(_0x24f453,_0xc56beb){const _0x2b6075=a157_0x5aa0,_0x1c56cb={'appCode':_0x24f453,'deleted':_0xc56beb?.[_0x2b6075(0x16e)]??![]};if(_0xc56beb?.[_0x2b6075(0x159)])_0x1c56cb[_0x2b6075(0x159)]=_0xc56beb[_0x2b6075(0x159)];if(_0xc56beb?.[_0x2b6075(0x1b1)])_0x1c56cb[_0x2b6075(0x1b1)]=_0xc56beb[_0x2b6075(0x1b1)];const _0xc399ee=await apiRequest(_0x2b6075(0x1a4),{'method':_0x2b6075(0x18d),'body':_0x1c56cb});return extractList(_0xc399ee[_0x2b6075(0x188)]);}export async function deleteDataset(_0x28b32e,_0xaa9652){const _0x384c7b=a157_0x5aa0;await apiRequest(_0x384c7b(0x177),{'method':_0x384c7b(0x18d),'body':{'appCode':_0x28b32e,'datasetId':_0xaa9652}});}export async function restoreDataset(_0x422c15,_0xa5674){const _0x1c55e2=a157_0x5aa0;await apiRequest(_0x1c55e2(0x1b0),{'method':_0x1c55e2(0x18d),'body':{'appCode':_0x422c15,'datasetId':_0xa5674}});}export async function searchDatasets(_0x28c76d,_0x52ce71){const _0xade9f2=a157_0x5aa0,_0x187264=await listDatasets(_0x28c76d,{'name':_0x52ce71}),_0x5d3c4d=_0x52ce71[_0xade9f2(0x141)](),_0x38bb91=new Set(_0x187264[_0xade9f2(0x1a0)](_0xf94b74=>_0xf94b74['id'])),_0x5d08bb=_0x187264['filter'](_0x1aa374=>_0x1aa374['dbtableConfig']?.[_0xade9f2(0x14f)]?.['toLowerCase']()[_0xade9f2(0x181)](_0x5d3c4d)||_0x1aa374[_0xade9f2(0x182)]?.['toLowerCase']()[_0xade9f2(0x181)](_0x5d3c4d)),_0xc08e2a=await listDatasets(_0x28c76d,{'code':_0x52ce71});for(const _0x3d5438 of _0xc08e2a){!_0x38bb91[_0xade9f2(0x129)](_0x3d5438['id'])&&(_0x187264[_0xade9f2(0x1ba)](_0x3d5438),_0x38bb91[_0xade9f2(0x150)](_0x3d5438['id']));}return _0x187264;}export function normalizeDatasetOperations(_0x2c1726){const _0x323b24=a157_0x5aa0;if(Array[_0x323b24(0x1b7)](_0x2c1726))return _0x2c1726[_0x323b24(0x19a)](_0x42dea3=>_0x42dea3!=null&&typeof _0x42dea3===_0x323b24(0x120));if(_0x2c1726&&typeof _0x2c1726===_0x323b24(0x120))return Object['entries'](_0x2c1726)[_0x323b24(0x19a)](([,_0x4d2b22])=>_0x4d2b22!=null&&typeof _0x4d2b22===_0x323b24(0x120))[_0x323b24(0x1a0)](([_0x5e867f,_0x3a410b])=>({..._0x3a410b,'name':_0x3a410b[_0x323b24(0x1b1)]??_0x3a410b[_0x323b24(0x17d)]??_0x5e867f}));return[];}export async function getDatasetDetail(_0x1a50d0){const _0x5a8b57=a157_0x5aa0,_0x387862=/^\d+$/[_0x5a8b57(0x173)](_0x1a50d0)?'id':_0x5a8b57(0x159),_0x29fe36=await apiRequest('/smartapi/dataset/get-driven-data?'+_0x387862+'='+_0x1a50d0);return _0x29fe36[_0x5a8b57(0x188)];}export async function updateDrivenData(_0x53e03c){const _0x368b80=a157_0x5aa0,_0x20c427=await apiRequest(_0x368b80(0x17c),{'method':_0x368b80(0x18d),'body':_0x53e03c});return _0x20c427[_0x368b80(0x188)];}export async function getDatasetOperations(_0x4ffcc0){const _0x5affba=a157_0x5aa0,_0x380713=await getDatasetDetail(_0x4ffcc0),_0x567d05=normalizeDatasetOperations(_0x380713[_0x5affba(0x137)])[_0x5affba(0x1a0)](_0x3c0efd=>({'name':_0x3c0efd[_0x5affba(0x1b1)]||_0x3c0efd[_0x5affba(0x17d)],'displayName':_0x3c0efd['displayName']||_0x3c0efd[_0x5affba(0x1b1)],'type':_0x3c0efd[_0x5affba(0x1c4)],'method':_0x3c0efd[_0x5affba(0x11e)],'path':_0x3c0efd[_0x5affba(0x1ae)],'enabled':_0x3c0efd[_0x5affba(0x171)]??!![],'requestFields':_0x3c0efd[_0x5affba(0x183)],'responseFields':_0x3c0efd[_0x5affba(0x144)]}));return{'dataset':{'id':_0x380713['id']??_0x380713[_0x5affba(0x125)],'name':_0x380713[_0x5affba(0x1b1)],'code':_0x380713[_0x5affba(0x159)]||_0x380713[_0x5affba(0x193)],'tableName':_0x380713['tableName']||_0x380713[_0x5affba(0x1a9)]?.['tableName']},'operations':_0x567d05};}export async function getOperationDetail(_0x18728a,_0x45bc57,_0x19f352){const _0x5a4fdd=a157_0x5aa0;let _0x7a4f29=_0x45bc57;if(!/^\d+$/[_0x5a4fdd(0x173)](_0x45bc57)){const _0xc7e620=await listDatasets(_0x18728a,{'code':_0x45bc57}),_0x2eb234=_0xc7e620[_0x5a4fdd(0x184)](_0x200e8c=>_0x200e8c['code']===_0x45bc57||String(_0x200e8c['id'])===_0x45bc57);if(!_0x2eb234)throw CliErrors[_0x5a4fdd(0x140)](_0x5a4fdd(0x15e)+_0x45bc57);_0x7a4f29=String(_0x2eb234['id']);}const _0x17a52a=await getDatasetDetail(_0x7a4f29),_0x19f1ca=normalizeDatasetOperations(_0x17a52a[_0x5a4fdd(0x137)])['find'](_0x105af7=>(_0x105af7[_0x5a4fdd(0x1b1)]||_0x105af7[_0x5a4fdd(0x17d)])===_0x19f352);if(!_0x19f1ca)throw CliErrors['validation'](_0x5a4fdd(0x163)+_0x19f352+_0x5a4fdd(0x1a1)+_0x45bc57);return{'dataset':{'id':_0x17a52a['id']??_0x17a52a[_0x5a4fdd(0x125)],'name':_0x17a52a[_0x5a4fdd(0x1b1)],'code':_0x17a52a['code']||_0x17a52a[_0x5a4fdd(0x193)],'tableName':_0x17a52a['tableName']||_0x17a52a[_0x5a4fdd(0x1a9)]?.[_0x5a4fdd(0x14f)]},'operation':_0x19f1ca};}export async function startGenerateStandardPages(_0x586e19,_0x4406e6,_0x338036){const _0x565d86=a157_0x5aa0,_0xb53ca6=await apiRequest(_0x565d86(0x18c)+_0x4406e6+'/generate-standard-pages/start',{'method':_0x565d86(0x18d),'body':{'appCode':_0x586e19,..._0x338036?.[_0x565d86(0x11c)]?{'clientOperationId':_0x338036[_0x565d86(0x11c)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0xb53ca6['data'];}export async function getGenerateStandardPagesStatus(_0x33a12f,_0x54cf6e,_0x199499){const _0x16409e=a157_0x5aa0,_0x472f0e=new URLSearchParams({'appCode':_0x33a12f});_0x199499[_0x16409e(0x17a)]&&_0x472f0e[_0x16409e(0x178)]('operationId',_0x199499[_0x16409e(0x17a)]);_0x199499[_0x16409e(0x11c)]&&_0x472f0e[_0x16409e(0x178)](_0x16409e(0x11c),_0x199499[_0x16409e(0x11c)]);const _0x26d3ff=await apiRequest(_0x16409e(0x18c)+_0x54cf6e+_0x16409e(0x14e)+_0x472f0e[_0x16409e(0x145)]());return _0x26d3ff[_0x16409e(0x188)];}function a157_0x5aa0(_0x3e723b,_0x2a7730){_0x3e723b=_0x3e723b-0x115;const _0x263ae3=a157_0x263a();let _0x5aa09f=_0x263ae3[_0x3e723b];return _0x5aa09f;}export async function getStandardPageStatus(_0x3c96e8,_0x1d34d4){const _0xaa7a57=a157_0x5aa0,_0x3ba858=await apiRequest(_0xaa7a57(0x18c)+_0x1d34d4+_0xaa7a57(0x1b4)+encodeURIComponent(_0x3c96e8));return _0x3ba858[_0xaa7a57(0x188)];}export async function tryGetStandardPageStatus(_0x205f3d,_0x5e1796){const _0x314708=a157_0x5aa0;try{return await getStandardPageStatus(_0x205f3d,_0x5e1796);}catch(_0x59b16b){if(_0x59b16b instanceof CliError&&_0x59b16b[_0x314708(0x159)]===_0x314708(0x17e)&&/404|not found|non-json response/i[_0x314708(0x173)](_0x59b16b[_0x314708(0x15b)]))return null;throw _0x59b16b;}}export async function syncStandardPages(_0x508b78,_0x44316e){const _0x17434d=a157_0x5aa0,_0x445ce2=await apiRequest('/smartapi/lovrabet/dataset/'+_0x44316e+_0x17434d(0x1b5),{'method':_0x17434d(0x18d),'body':{'appCode':_0x508b78}});return _0x445ce2[_0x17434d(0x188)];}export async function getPageDetail(_0x54caac){const _0x1ef2b9=a157_0x5aa0,_0x579997=await apiRequest(_0x1ef2b9(0x135)+_0x54caac);if(!_0x579997['data'])throw CliErrors[_0x1ef2b9(0x140)](_0x1ef2b9(0x1c1)+_0x54caac);return _0x579997[_0x1ef2b9(0x188)];}export async function updatePage(_0x5e7dc6,_0x415f3c,_0x462ce9,_0x31f021){const _0x2ec223=a157_0x5aa0,_0x3d2c1b=await apiRequest(_0x2ec223(0x1a5),{'method':_0x2ec223(0x18d),'body':{'appCode':_0x5e7dc6,'pageId':_0x415f3c,'code':_0x462ce9,'datasetIds':_0x31f021}});return _0x3d2c1b[_0x2ec223(0x188)];}export function generateSdkCode(_0x24f63a,_0x13df0f,_0x16e0f5){const _0x24c1d3=a157_0x5aa0,_0x20cf15=_0x16e0f5?.['includeImports']??!![],_0x2c25e8=_0x24c1d3(0x15d)+_0x24f63a[_0x24c1d3(0x159)]?.[_0x24c1d3(0x1a6)](/-/g,'_'),_0x58d8a0=_0x13df0f[_0x24c1d3(0x1b1)]||_0x13df0f['operationName']||_0x24c1d3(0x19a),_0x2b7606=[];_0x20cf15&&_0x2b7606[_0x24c1d3(0x1ba)](_0x24c1d3(0x195),'',_0x24c1d3(0x1bf),'');_0x2b7606[_0x24c1d3(0x1ba)](_0x24c1d3(0x127)+_0x24f63a[_0x24c1d3(0x1b1)]+'\x20('+(_0x24f63a[_0x24c1d3(0x14f)]||_0x24c1d3(0x1b3))+')');if(_0x58d8a0==='filter')_0x2b7606['push'](_0x24c1d3(0x14c)+_0x2c25e8+'.filter({',_0x24c1d3(0x1a7),_0x24c1d3(0x158),_0x24c1d3(0x1c5),'});');else{if(_0x58d8a0===_0x24c1d3(0x1b9))_0x2b7606[_0x24c1d3(0x1ba)](_0x24c1d3(0x14c)+_0x2c25e8+_0x24c1d3(0x115));else{if(_0x58d8a0===_0x24c1d3(0x176))_0x2b7606[_0x24c1d3(0x1ba)](_0x24c1d3(0x14c)+_0x2c25e8+_0x24c1d3(0x160));else{if(_0x58d8a0===_0x24c1d3(0x1b8))_0x2b7606[_0x24c1d3(0x1ba)]('const\x20result\x20=\x20await\x20client.models.'+_0x2c25e8+'.update(id,\x20{\x20/*\x20fields\x20*/\x20});');else _0x58d8a0===_0x24c1d3(0x18b)||_0x58d8a0==='remove'?_0x2b7606[_0x24c1d3(0x1ba)](_0x24c1d3(0x14c)+_0x2c25e8+_0x24c1d3(0x132)):_0x2b7606[_0x24c1d3(0x1ba)](_0x24c1d3(0x14c)+_0x2c25e8+'.'+_0x58d8a0+_0x24c1d3(0x179));}}}return _0x2b7606[_0x24c1d3(0x152)]('\x0a');}export function generateSqlCodeTemplate(_0x148428,_0x4c73c0){const _0x5cb944=a157_0x5aa0,_0x51a65f=_0x4c73c0?.[_0x5cb944(0x1bb)]??_0x5cb944(0x155),_0x4bb0c2=_0x4c73c0?.[_0x5cb944(0x1c3)]??!![],_0x1522b7=[];return _0x1522b7[_0x5cb944(0x1ba)](_0x5cb944(0x143)+_0x148428['sqlName']+'\x20('+_0x148428['sqlCode']+')'),_0x51a65f==='sdk'?(_0x4bb0c2&&_0x1522b7[_0x5cb944(0x1ba)](_0x5cb944(0x195),'',_0x5cb944(0x1bf),''),_0x1522b7[_0x5cb944(0x1ba)](_0x5cb944(0x138),_0x5cb944(0x174)+_0x148428[_0x5cb944(0x19c)]+'\x27,',_0x5cb944(0x12c),_0x5cb944(0x15a),_0x5cb944(0x134),_0x5cb944(0x192))):_0x1522b7[_0x5cb944(0x1ba)](_0x5cb944(0x11a),_0x5cb944(0x180),'\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({',_0x5cb944(0x190)+_0x148428[_0x5cb944(0x19c)]+'\x27,',_0x5cb944(0x1bc),_0x5cb944(0x166),_0x5cb944(0x185),'}'),_0x1522b7['join']('\x0a');}export async function getErConfig(_0x25eba4,_0x52d593){const _0x4d8354=a157_0x5aa0,_0x44504d=await apiRequest(_0x4d8354(0x1c2),{'method':_0x4d8354(0x18d),'body':{'appCode':_0x25eba4,'dblinkId':_0x52d593},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x44504d[_0x4d8354(0x188)];}export async function createErRelation(_0x383a67){const _0x277585=a157_0x5aa0,_0x57501a=await apiRequest(_0x277585(0x1c0),{'method':_0x277585(0x18d),'body':_0x383a67,'allowNonJsonSuccess':!![]});return _0x57501a[_0x277585(0x188)];}export async function updateErRelation(_0xdde2cd){const _0x5ab97d=a157_0x5aa0,_0x2bb379=await apiRequest(_0x5ab97d(0x147),{'method':_0x5ab97d(0x18d),'body':_0xdde2cd,'allowNonJsonSuccess':!![]});return _0x2bb379['data'];}export async function deleteErRelation(_0x565126){const _0x30f218=a157_0x5aa0,_0x11e6c7=await apiRequest('/smartapi/question/er-config/erDelete',{'method':'POST','body':_0x565126,'allowNonJsonSuccess':!![]});return _0x11e6c7[_0x30f218(0x188)];}export async function updateErBusinessGroup(_0x276383){const _0xa8ced8=a157_0x5aa0,_0x499712=await apiRequest('/smartapi/question/er-config/business-group/edit',{'method':_0xa8ced8(0x18d),'body':_0x276383,'allowNonJsonSuccess':!![]});return _0x499712[_0xa8ced8(0x188)];}function buildQuery(_0x4bae26){const _0x4f18e0=a157_0x5aa0,_0x515a81=new URLSearchParams();for(const [_0x392f6a,_0x396005]of Object[_0x4f18e0(0x121)](_0x4bae26)){if(_0x396005===undefined||_0x396005==='')continue;_0x515a81['set'](_0x392f6a,String(_0x396005));}const _0x506f87=_0x515a81[_0x4f18e0(0x145)]();return _0x506f87?'?'+_0x506f87:'';}export async function listAppConfigs(_0x4254fc,_0x41bdef){const _0x226cd9=a157_0x5aa0,_0x3bbfd9=await apiRequest(_0x226cd9(0x1b2),{'method':'POST','body':{'appCode':_0x4254fc,..._0x41bdef?.[_0x226cd9(0x14d)]?{'key':_0x41bdef[_0x226cd9(0x14d)]}:{},..._0x41bdef?.[_0x226cd9(0x139)]?{'tags':_0x41bdef[_0x226cd9(0x139)]}:{}}});return extractAppConfigList(_0x3bbfd9[_0x226cd9(0x188)]);}export async function getAppConfigByKey(_0x5dc204,_0x2b12c4){const _0x537c84=a157_0x5aa0,_0xbc750b=await apiRequest(_0x537c84(0x199)+buildQuery({'appCode':_0x5dc204,'key':_0x2b12c4}));return _0xbc750b[_0x537c84(0x188)]??null;}export async function createAppConfig(_0x1f27c7){const _0x1e9d13=a157_0x5aa0,_0x4635e9=await apiRequest(_0x1e9d13(0x128),{'method':'POST','body':{'appCode':_0x1f27c7['appCode'],'key':_0x1f27c7[_0x1e9d13(0x14d)],'value':_0x1f27c7[_0x1e9d13(0x13f)],..._0x1f27c7['tags']?{'tags':_0x1f27c7['tags']}:{}}});return _0x4635e9[_0x1e9d13(0x188)];}export async function updateAppConfig(_0x15ff70){const _0x39b029=a157_0x5aa0;await apiRequest(_0x39b029(0x11f),{'method':_0x39b029(0x18d),'body':{'id':_0x15ff70['id'],'appCode':_0x15ff70[_0x39b029(0x142)],'key':_0x15ff70[_0x39b029(0x14d)],'value':_0x15ff70[_0x39b029(0x13f)],..._0x15ff70[_0x39b029(0x139)]?{'tags':_0x15ff70[_0x39b029(0x139)]}:{}}});}export async function deleteAppConfig(_0x41c954){const _0x617dac=a157_0x5aa0;await apiRequest(_0x617dac(0x122),{'method':_0x617dac(0x18d),'body':_0x41c954});}function extractAppConfigList(_0x1d065c){const _0x2db271=a157_0x5aa0;if(Array[_0x2db271(0x1b7)](_0x1d065c))return _0x1d065c;if(_0x1d065c&&typeof _0x1d065c===_0x2db271(0x120)&&Array['isArray'](_0x1d065c['list']))return _0x1d065c[_0x2db271(0x153)];return extractList(_0x1d065c);}export async function listDbLinks(_0x4d3995,_0x37647d){const _0x4f9c3b=a157_0x5aa0,_0x448f2f=await apiRequest(_0x4f9c3b(0x19d),{'method':_0x4f9c3b(0x18d),'body':{'appCode':_0x4d3995,'currentPage':_0x37647d?.[_0x4f9c3b(0x12d)]??0x1,'pageSize':_0x37647d?.['pageSize']??0x64}});return{'items':extractList(_0x448f2f[_0x4f9c3b(0x188)]),'paging':extractPaging(_0x448f2f[_0x4f9c3b(0x188)])};}export async function getDbLinkInfo(_0x3c2977){const _0x3d7c51=a157_0x5aa0,_0x42eff4=await apiRequest(_0x3d7c51(0x12f)+buildQuery({'id':_0x3c2977}));return _0x42eff4[_0x3d7c51(0x188)];}export async function createDbLink(_0x3d586f){const _0x543646=a157_0x5aa0,_0x3a225b=await apiRequest(_0x543646(0x197),{'method':_0x543646(0x18d),'body':_0x3d586f});return _0x3a225b[_0x543646(0x188)];}export async function updateDbLink(_0xade252){const _0x2e2cf3=a157_0x5aa0,_0x53fba5=await apiRequest(_0x2e2cf3(0x16a),{'method':'POST','body':_0xade252});return _0x53fba5[_0x2e2cf3(0x188)];}export async function deleteDbLink(_0x14a260){const _0x4b90b0=a157_0x5aa0;await apiRequest(_0x4b90b0(0x168),{'method':_0x4b90b0(0x18d),'body':{'id':_0x14a260}});}export async function testDbLinkConnect(_0x560b77){const _0x526bf8=a157_0x5aa0,_0x443f94=await apiRequest(_0x526bf8(0x198)+buildQuery({'id':_0x560b77}));return _0x443f94[_0x526bf8(0x188)];}export async function startDbAnalysis(_0x5a9b3c,_0x42e1cf){const _0x22020e=a157_0x5aa0,_0x28d100=await apiRequest('/smartapi/db-analysis/start',{'method':_0x22020e(0x18d),'body':{'dbLinkId':_0x5a9b3c,..._0x42e1cf&&_0x42e1cf['length']>0x0?{'tableNames':_0x42e1cf}:{}}}),_0x2ee326=_0x28d100['data'];if(typeof _0x2ee326==='string')return _0x2ee326;if(_0x2ee326&&typeof _0x2ee326==='object'&&typeof _0x2ee326[_0x22020e(0x1b6)]===_0x22020e(0x131))return _0x2ee326['planId'];return _0x2ee326!=null?String(_0x2ee326):'';}export async function cancelDbAnalysis(_0x3e8622){const _0x17b1c1=a157_0x5aa0;await apiRequest(_0x17b1c1(0x172)+buildQuery({'planId':_0x3e8622}),{'method':_0x17b1c1(0x18d)});}export async function getDbAnalysisStatus(_0x19d81d){const _0x5eac94=a157_0x5aa0,_0x255c91=await apiRequest(_0x5eac94(0x13c)+encodeURIComponent(_0x19d81d));return _0x255c91[_0x5eac94(0x188)];}export async function getDbAllTableList(_0x257985,_0x1a9944){const _0x2779fa=a157_0x5aa0,_0x2df929=await apiRequest(_0x2779fa(0x126)+buildQuery({'appCode':_0x257985,'dbLinkId':_0x1a9944})),_0x5d4df3=_0x2df929[_0x2779fa(0x188)];if(Array[_0x2779fa(0x1b7)](_0x5d4df3))return _0x5d4df3;return extractList(_0x5d4df3);}export async function getDbTableDiff(_0x42b055,_0x318fa2,_0x1f1962){const _0x3c9d13=a157_0x5aa0,_0x131601=await apiRequest(_0x3c9d13(0x130)+buildQuery({'appCode':_0x42b055,'dbLinkId':_0x318fa2,'pageIndex':_0x1f1962?.['pageIndex']??0x1,'pageSize':_0x1f1962?.[_0x3c9d13(0x189)]??0x14,'tableName':_0x1f1962?.[_0x3c9d13(0x14f)]})),_0x47c096=_0x131601[_0x3c9d13(0x188)];return{'totalCount':_0x47c096?.[_0x3c9d13(0x17f)]??0x0,'tableList':Array[_0x3c9d13(0x1b7)](_0x47c096?.[_0x3c9d13(0x119)])?_0x47c096['tableList']:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x3493fc=a157_0x5aa0,_0x406829=await apiRequest(_0x3493fc(0x1bd),{'method':_0x3493fc(0x18d),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x148fdd=extractList(_0x406829[_0x3493fc(0x188)]),_0x11566f=extractPaging(_0x406829[_0x3493fc(0x188)]);return _0x11566f&&_0x11566f[_0x3493fc(0x17f)]>REMOTE_APP_PAGE_SIZE&&console[_0x3493fc(0x16b)]('Warning:\x20showing\x20first\x20'+REMOTE_APP_PAGE_SIZE+'\x20of\x20'+_0x11566f[_0x3493fc(0x17f)]+_0x3493fc(0x18a)+_0x3493fc(0x18f)),_0x148fdd;}
@@ -1 +1 @@
1
- const a158_0x49b406=a158_0x17a5;(function(_0x3ff12d,_0x3e1029){const _0x3d1212=a158_0x17a5,_0x5890f5=_0x3ff12d();while(!![]){try{const _0x15eaeb=-parseInt(_0x3d1212(0xe0))/0x1*(-parseInt(_0x3d1212(0xde))/0x2)+parseInt(_0x3d1212(0xd3))/0x3+parseInt(_0x3d1212(0xdd))/0x4*(-parseInt(_0x3d1212(0xd1))/0x5)+-parseInt(_0x3d1212(0xe1))/0x6*(-parseInt(_0x3d1212(0xd2))/0x7)+-parseInt(_0x3d1212(0xda))/0x8*(-parseInt(_0x3d1212(0xd9))/0x9)+-parseInt(_0x3d1212(0xd0))/0xa*(parseInt(_0x3d1212(0xdb))/0xb)+parseInt(_0x3d1212(0xd7))/0xc*(-parseInt(_0x3d1212(0xd6))/0xd);if(_0x15eaeb===_0x3e1029)break;else _0x5890f5['push'](_0x5890f5['shift']());}catch(_0x5fe2d6){_0x5890f5['push'](_0x5890f5['shift']());}}}(a158_0xdd5a,0xb9257));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a158_0xdd5a(){const _0x588e2e=['2215857QNQQbg','2248380belGOI','bff.lock.json','.rabetbase','552487CFTHVp','132knDnjD','/bff','18rOkUWy','3949720KOuuLG','407GBAoEM','bff-trash','16EIQDDM','2UdNaqy','bff','225242EenGRe','6yBhdlC','259190pDdtzt','117290BJGZeH'];a158_0xdd5a=function(){return _0x588e2e;};return a158_0xdd5a();}function a158_0x17a5(_0x111dce,_0x1d14ce){_0x111dce=_0x111dce-0xd0;const _0xdd5a52=a158_0xdd5a();let _0x17a584=_0xdd5a52[_0x111dce];return _0x17a584;}const DOT_DIR=a158_0x49b406(0xd5),LOCK_FILE_NAME=a158_0x49b406(0xd4),TRASH_DIR_NAME=a158_0x49b406(0xdc);export function loadBffProjectConfig(_0x1b1256,_0x27eb72){const _0x3a511d=a158_0x49b406,_0x248586=resolve(_0x27eb72??findProjectRootDirectory()),_0x2ed4aa=DOT_DIR+_0x3a511d(0xd8),_0x45622a=_0x2ed4aa+'/'+_0x1b1256;return{'projectRoot':_0x248586,'appCode':_0x1b1256,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x2ed4aa,'scriptsRoot':_0x45622a,'scriptsRootDir':resolve(_0x248586,DOT_DIR,_0x3a511d(0xdf),_0x1b1256),'lockFilePath':resolve(_0x248586,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x248586,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a158_0xfaf954=a158_0x50c1;(function(_0x14787e,_0x3b516b){const _0x4ad725=a158_0x50c1,_0x5b5a76=_0x14787e();while(!![]){try{const _0x45cc5a=-parseInt(_0x4ad725(0x16e))/0x1+parseInt(_0x4ad725(0x170))/0x2+-parseInt(_0x4ad725(0x16d))/0x3*(-parseInt(_0x4ad725(0x16c))/0x4)+-parseInt(_0x4ad725(0x176))/0x5+-parseInt(_0x4ad725(0x171))/0x6+-parseInt(_0x4ad725(0x173))/0x7*(-parseInt(_0x4ad725(0x16f))/0x8)+parseInt(_0x4ad725(0x177))/0x9;if(_0x45cc5a===_0x3b516b)break;else _0x5b5a76['push'](_0x5b5a76['shift']());}catch(_0x19e483){_0x5b5a76['push'](_0x5b5a76['shift']());}}}(a158_0x3aa5,0xc2ed0));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a158_0x50c1(_0x5e44ce,_0x4547ec){_0x5e44ce=_0x5e44ce-0x16c;const _0x3aa512=a158_0x3aa5();let _0x50c118=_0x3aa512[_0x5e44ce];return _0x50c118;}const DOT_DIR=a158_0xfaf954(0x172),LOCK_FILE_NAME='bff.lock.json',TRASH_DIR_NAME=a158_0xfaf954(0x174);export function loadBffProjectConfig(_0xac5dda,_0x28a985){const _0x2c3997=a158_0xfaf954,_0x53e1a8=resolve(_0x28a985??findProjectRootDirectory()),_0x40c8f6=DOT_DIR+'/bff',_0x1249bd=_0x40c8f6+'/'+_0xac5dda;return{'projectRoot':_0x53e1a8,'appCode':_0xac5dda,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x40c8f6,'scriptsRoot':_0x1249bd,'scriptsRootDir':resolve(_0x53e1a8,DOT_DIR,_0x2c3997(0x175),_0xac5dda),'lockFilePath':resolve(_0x53e1a8,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x53e1a8,DOT_DIR,TRASH_DIR_NAME)};}function a158_0x3aa5(){const _0x7eadbc=['3AScbkS','1141511GHJJJi','2681880CegRIi','2007592FkXfBq','8342688CSjOMi','.rabetbase','28quljSa','bff-trash','bff','3233220JhzRWR','4481748opBvmK','4537244bEtegr'];a158_0x3aa5=function(){return _0x7eadbc;};return a158_0x3aa5();}
@@ -1 +1 @@
1
- const a159_0xb1b1b6=a159_0x128b;(function(_0x39ea32,_0xef6d79){const _0x344e9f=a159_0x128b,_0x41e0fc=_0x39ea32();while(!![]){try{const _0x3447d2=-parseInt(_0x344e9f(0xc5))/0x1+parseInt(_0x344e9f(0xba))/0x2+parseInt(_0x344e9f(0xd4))/0x3*(-parseInt(_0x344e9f(0xcd))/0x4)+parseInt(_0x344e9f(0xc6))/0x5*(parseInt(_0x344e9f(0xb4))/0x6)+parseInt(_0x344e9f(0xd1))/0x7+-parseInt(_0x344e9f(0xb3))/0x8+parseInt(_0x344e9f(0xbf))/0x9;if(_0x3447d2===_0xef6d79)break;else _0x41e0fc['push'](_0x41e0fc['shift']());}catch(_0x548b63){_0x41e0fc['push'](_0x41e0fc['shift']());}}}(a159_0x322e,0x3f04d));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a159_0xb1b1b6(0xb1),'ENDPOINT','HOOK'];export function normalizeBffType(_0x56b544){const _0x227ee7=a159_0xb1b1b6;if(!_0x56b544)return undefined;const _0x45c210=_0x56b544[_0x227ee7(0xc2)]()[_0x227ee7(0xc0)]();return SUPPORTED_BFF_TYPES[_0x227ee7(0xc8)](_0x45c210)?_0x45c210:undefined;}async function scanJsFilesRecursively(_0x12eb6c,_0x1531ff){const _0x22b99e=a159_0xb1b1b6,_0x572767=[];try{const _0x44b24b=await readdir(_0x12eb6c,{'withFileTypes':!![]});for(const _0x5a7929 of _0x44b24b){const _0x251616=join(_0x12eb6c,_0x5a7929[_0x22b99e(0xb8)]);if(_0x5a7929[_0x22b99e(0xcf)]())_0x572767['push'](...await scanJsFilesRecursively(_0x251616,_0x1531ff+'/'+_0x5a7929[_0x22b99e(0xb8)]));else _0x5a7929['isFile']()&&_0x5a7929['name']['endsWith']('.js')&&_0x572767[_0x22b99e(0xb9)]({'lockKey':_0x1531ff+'/'+_0x5a7929[_0x22b99e(0xb8)][_0x22b99e(0xc1)](/\.js$/,''),'filePath':_0x251616});}}catch(_0x4f0cb8){if(_0x4f0cb8[_0x22b99e(0xca)]!==_0x22b99e(0xc9))throw _0x4f0cb8;}return _0x572767;}async function scanFlatFunctions(_0x562a8d,_0xefe041){const _0x1296d5=a159_0xb1b1b6,_0x1df56d=join(_0x562a8d['scriptsRootDir'],_0xefe041),_0x4b5bc8=await scanJsFilesRecursively(_0x1df56d,_0xefe041);return _0x4b5bc8['map'](({lockKey:_0xb0543b,filePath:_0x20d5e7})=>({'type':_0xefe041,'name':_0xb0543b[_0x1296d5(0xaf)]('/')['at'](-0x1)??'','filePath':_0x20d5e7,'lockKey':_0xb0543b}));}async function scanHookFunctions(_0x2c73f2){const _0x243b44=a159_0xb1b1b6,_0xd2a0af=join(_0x2c73f2[_0x243b44(0xb2)],_0x243b44(0xbe)),_0x186b9e=[];try{const _0x2a13d6=await readdir(_0xd2a0af,{'withFileTypes':!![]});for(const _0x4d80de of _0x2a13d6){if(!_0x4d80de['isDirectory']())continue;const _0x310add=_0x4d80de[_0x243b44(0xb8)],_0x3c2324=join(_0xd2a0af,_0x310add),_0x236e61=await readdir(_0x3c2324,{'withFileTypes':!![]});for(const _0x1f1db6 of _0x236e61){if(!_0x1f1db6[_0x243b44(0xcf)]())continue;const _0x3f563a=_0x1f1db6[_0x243b44(0xb8)],_0x33fce8=join(_0x3c2324,_0x3f563a),_0xd9a827=await readdir(_0x33fce8,{'withFileTypes':!![]});for(const _0x48b207 of _0xd9a827){if(!_0x48b207['isDirectory']())continue;const _0x2d33eb=_0x48b207[_0x243b44(0xb8)],_0x37ae33=join(_0x33fce8,_0x2d33eb),_0x8b877d=await readdir(_0x37ae33,{'withFileTypes':!![]});for(const _0x398e63 of _0x8b877d){if(!_0x398e63[_0x243b44(0xc4)]()||!_0x398e63[_0x243b44(0xb8)]['endsWith'](_0x243b44(0xb0)))continue;const _0x4fa719=_0x398e63['name'][_0x243b44(0xc1)](/\.js$/,'');_0x186b9e[_0x243b44(0xb9)]({'type':_0x243b44(0xbe),'name':_0x4fa719,'filePath':join(_0x37ae33,_0x398e63[_0x243b44(0xb8)]),'lockKey':_0x243b44(0xd0)+_0x310add+'/'+_0x3f563a+'/'+_0x2d33eb+'/'+_0x4fa719,'alias':_0x310add,'operationType':_0x3f563a,'functionNode':_0x2d33eb});}}}}}catch(_0x22ef75){if(_0x22ef75[_0x243b44(0xca)]!=='ENOENT')throw _0x22ef75;}return _0x186b9e;}export async function scanLocalBffFunctions(_0x545a64,_0x1d1fc2){const _0x4919a3=a159_0xb1b1b6;if(_0x1d1fc2===_0x4919a3(0xb1)||_0x1d1fc2===_0x4919a3(0xd3))return scanFlatFunctions(_0x545a64,_0x1d1fc2);if(_0x1d1fc2===_0x4919a3(0xbe))return scanHookFunctions(_0x545a64);const [_0x21bf75,_0x86d8cd,_0x43da85]=await Promise[_0x4919a3(0xc3)]([scanFlatFunctions(_0x545a64,_0x4919a3(0xb1)),scanFlatFunctions(_0x545a64,_0x4919a3(0xd3)),scanHookFunctions(_0x545a64)]);return[..._0x21bf75,..._0x86d8cd,..._0x43da85];}export function resolveLocalFilePathFromLockKey(_0x320ed4,_0x317602){const _0x1285c7=a159_0xb1b1b6;return join(_0x320ed4[_0x1285c7(0xb2)],..._0x317602[_0x1285c7(0xaf)]('/'))+_0x1285c7(0xb0);}export function createHookLocationMap(_0x50a64e){const _0x54f05d=a159_0xb1b1b6,_0x27a4bf=new Map();for(const _0x44e1dc of _0x50a64e){_0x44e1dc['beforeScriptId']&&_0x27a4bf['set'](_0x44e1dc[_0x54f05d(0xd2)],{'datasetCode':_0x44e1dc[_0x54f05d(0xcc)],'operationType':snakeToCamel(_0x44e1dc[_0x54f05d(0xb7)]),'functionNode':_0x54f05d(0xc7)}),_0x44e1dc[_0x54f05d(0xb6)]&&_0x27a4bf['set'](_0x44e1dc[_0x54f05d(0xb6)],{'datasetCode':_0x44e1dc[_0x54f05d(0xcc)],'operationType':snakeToCamel(_0x44e1dc[_0x54f05d(0xb7)]),'functionNode':_0x54f05d(0xbb)});}return _0x27a4bf;}export function resolveRemoteScriptTarget(_0x215c96,_0x59e438,_0x224560,_0x1562d2,_0x321447){const _0xeca549=a159_0xb1b1b6,_0x4d59a2=normalizeBffType(_0x59e438[_0xeca549(0xce)]);if(!_0x4d59a2||!_0x59e438['functionName'])return null;if(_0x4d59a2===_0xeca549(0xbe)){const _0x3f3bd7=(_0x59e438['id']?_0x224560[_0xeca549(0xcb)](_0x59e438['id']):undefined)??findHookLocationByRemoteId(_0x1562d2,_0x59e438['id']);if(!_0x3f3bd7)return null;const _0x36282f=_0x3f3bd7[_0xeca549(0xbd)]||_0x321447[_0xeca549(0xcb)](_0x3f3bd7[_0xeca549(0xcc)]),_0x14f053=_0x36282f??_0x3f3bd7['datasetCode'],_0x22676a={..._0x3f3bd7,'alias':_0x36282f},_0x170cad=_0xeca549(0xd0)+_0x14f053+'/'+_0x22676a['operationType']+'/'+_0x22676a[_0xeca549(0xbc)]+'/'+_0x59e438['functionName'];return{'lockKey':_0x170cad,'filePath':resolveLocalFilePathFromLockKey(_0x215c96,_0x170cad),'type':_0xeca549(0xbe),'hookLocation':_0x22676a};}const _0x54c174=_0x4d59a2+'/'+_0x59e438['functionName'];return{'lockKey':_0x54c174,'filePath':resolveLocalFilePathFromLockKey(_0x215c96,_0x54c174),'type':_0x4d59a2};}export async function ensureParentDirectory(_0x2c0882){await mkdir(dirname(_0x2c0882),{'recursive':!![]});}function a159_0x322e(){const _0x1149d9=['HOOK','1727199BVoexc','toUpperCase','replace','trim','all','isFile','326980dyJoSr','138575eJCppl','before','includes','ENOENT','code','get','datasetCode','1801284hnPJvS','scriptType','isDirectory','HOOK/','2951060eOuvas','beforeScriptId','ENDPOINT','3HMHLfa','split','.js','COMMON','scriptsRootDir','1467784JgvUsu','36APEtYQ','F_OK','afterScriptId','operationType','name','push','878236fFwGBg','after','functionNode','alias'];a159_0x322e=function(){return _0x1149d9;};return a159_0x322e();}function a159_0x128b(_0x256c31,_0x4725a5){_0x256c31=_0x256c31-0xaf;const _0x322e85=a159_0x322e();let _0x128b68=_0x322e85[_0x256c31];return _0x128b68;}export async function fileExists(_0x1d9f9d){const _0x3c04f6=a159_0xb1b1b6;try{return await access(_0x1d9f9d,constants[_0x3c04f6(0xb5)]),!![];}catch{return![];}}export async function directoryExists(_0x1dd818){try{const _0x28af2d=await stat(_0x1dd818);return _0x28af2d['isDirectory']();}catch{return![];}}
1
+ const a159_0xc6b9af=a159_0x5b2d;(function(_0x30cd83,_0x362097){const _0x60a2cb=a159_0x5b2d,_0x546251=_0x30cd83();while(!![]){try{const _0x4237ae=-parseInt(_0x60a2cb(0x134))/0x1+-parseInt(_0x60a2cb(0x12a))/0x2*(-parseInt(_0x60a2cb(0x12e))/0x3)+-parseInt(_0x60a2cb(0x126))/0x4+parseInt(_0x60a2cb(0x133))/0x5+-parseInt(_0x60a2cb(0x140))/0x6+-parseInt(_0x60a2cb(0x14d))/0x7*(parseInt(_0x60a2cb(0x13c))/0x8)+-parseInt(_0x60a2cb(0x131))/0x9*(-parseInt(_0x60a2cb(0x13b))/0xa);if(_0x4237ae===_0x362097)break;else _0x546251['push'](_0x546251['shift']());}catch(_0x29581a){_0x546251['push'](_0x546251['shift']());}}}(a159_0x3693,0x1e697));function a159_0x3693(){const _0x75d59e=['get','isFile','push','COMMON','10qRZKUY','345904WbfWaB','datasetCode','ENOENT','trim','1261626hPjSDb','map','replace','endsWith','operationType','ENDPOINT','isDirectory','scriptType','scriptsRootDir','functionNode','code','includes','afterScriptId','21VLkzvh','671640jLQtXI','toUpperCase','name','functionName','4WSWxVI','split','all','after','48876DejYth','.js','HOOK/','4416912jAvzJI','HOOK','1108655GJBVfm','112621eXZfOE','beforeScriptId','F_OK'];a159_0x3693=function(){return _0x75d59e;};return a159_0x3693();}function a159_0x5b2d(_0x3df0aa,_0x514e00){_0x3df0aa=_0x3df0aa-0x126;const _0x3693e2=a159_0x3693();let _0x5b2d9d=_0x3693e2[_0x3df0aa];return _0x5b2d9d;}import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=['COMMON',a159_0xc6b9af(0x145),a159_0xc6b9af(0x132)];export function normalizeBffType(_0x1462cb){const _0x3e4bd8=a159_0xc6b9af;if(!_0x1462cb)return undefined;const _0x36ce83=_0x1462cb[_0x3e4bd8(0x13f)]()[_0x3e4bd8(0x127)]();return SUPPORTED_BFF_TYPES[_0x3e4bd8(0x14b)](_0x36ce83)?_0x36ce83:undefined;}async function scanJsFilesRecursively(_0x380a25,_0x452e13){const _0x4cea8d=a159_0xc6b9af,_0x227453=[];try{const _0x2445a3=await readdir(_0x380a25,{'withFileTypes':!![]});for(const _0x299762 of _0x2445a3){const _0x163237=join(_0x380a25,_0x299762[_0x4cea8d(0x128)]);if(_0x299762[_0x4cea8d(0x146)]())_0x227453[_0x4cea8d(0x139)](...await scanJsFilesRecursively(_0x163237,_0x452e13+'/'+_0x299762[_0x4cea8d(0x128)]));else _0x299762[_0x4cea8d(0x138)]()&&_0x299762['name'][_0x4cea8d(0x143)]('.js')&&_0x227453['push']({'lockKey':_0x452e13+'/'+_0x299762[_0x4cea8d(0x128)][_0x4cea8d(0x142)](/\.js$/,''),'filePath':_0x163237});}}catch(_0x42910a){if(_0x42910a[_0x4cea8d(0x14a)]!==_0x4cea8d(0x13e))throw _0x42910a;}return _0x227453;}async function scanFlatFunctions(_0x17ea31,_0x8fea82){const _0x37f369=a159_0xc6b9af,_0x168fa2=join(_0x17ea31['scriptsRootDir'],_0x8fea82),_0x268f11=await scanJsFilesRecursively(_0x168fa2,_0x8fea82);return _0x268f11[_0x37f369(0x141)](({lockKey:_0x27874a,filePath:_0x40e8b2})=>({'type':_0x8fea82,'name':_0x27874a['split']('/')['at'](-0x1)??'','filePath':_0x40e8b2,'lockKey':_0x27874a}));}async function scanHookFunctions(_0x9df579){const _0x55cf68=a159_0xc6b9af,_0x3a0e5e=join(_0x9df579[_0x55cf68(0x148)],_0x55cf68(0x132)),_0x1a434d=[];try{const _0x14c4f8=await readdir(_0x3a0e5e,{'withFileTypes':!![]});for(const _0x1053ae of _0x14c4f8){if(!_0x1053ae[_0x55cf68(0x146)]())continue;const _0x40568e=_0x1053ae[_0x55cf68(0x128)],_0x916efa=join(_0x3a0e5e,_0x40568e),_0x3d4fc0=await readdir(_0x916efa,{'withFileTypes':!![]});for(const _0x10cf10 of _0x3d4fc0){if(!_0x10cf10[_0x55cf68(0x146)]())continue;const _0x19bd03=_0x10cf10['name'],_0x43de7f=join(_0x916efa,_0x19bd03),_0x5a66ad=await readdir(_0x43de7f,{'withFileTypes':!![]});for(const _0x141c5c of _0x5a66ad){if(!_0x141c5c[_0x55cf68(0x146)]())continue;const _0x3b3517=_0x141c5c[_0x55cf68(0x128)],_0x4eab3f=join(_0x43de7f,_0x3b3517),_0x2262c4=await readdir(_0x4eab3f,{'withFileTypes':!![]});for(const _0x4f01c5 of _0x2262c4){if(!_0x4f01c5['isFile']()||!_0x4f01c5[_0x55cf68(0x128)][_0x55cf68(0x143)](_0x55cf68(0x12f)))continue;const _0x2667b7=_0x4f01c5[_0x55cf68(0x128)]['replace'](/\.js$/,'');_0x1a434d[_0x55cf68(0x139)]({'type':_0x55cf68(0x132),'name':_0x2667b7,'filePath':join(_0x4eab3f,_0x4f01c5['name']),'lockKey':_0x55cf68(0x130)+_0x40568e+'/'+_0x19bd03+'/'+_0x3b3517+'/'+_0x2667b7,'alias':_0x40568e,'operationType':_0x19bd03,'functionNode':_0x3b3517});}}}}}catch(_0x36f263){if(_0x36f263[_0x55cf68(0x14a)]!=='ENOENT')throw _0x36f263;}return _0x1a434d;}export async function scanLocalBffFunctions(_0x323af6,_0x25985b){const _0x188ccb=a159_0xc6b9af;if(_0x25985b===_0x188ccb(0x13a)||_0x25985b==='ENDPOINT')return scanFlatFunctions(_0x323af6,_0x25985b);if(_0x25985b===_0x188ccb(0x132))return scanHookFunctions(_0x323af6);const [_0x2c1bb8,_0x5bd717,_0x5bb5af]=await Promise[_0x188ccb(0x12c)]([scanFlatFunctions(_0x323af6,_0x188ccb(0x13a)),scanFlatFunctions(_0x323af6,'ENDPOINT'),scanHookFunctions(_0x323af6)]);return[..._0x2c1bb8,..._0x5bd717,..._0x5bb5af];}export function resolveLocalFilePathFromLockKey(_0x271f11,_0x332cc5){const _0xa34755=a159_0xc6b9af;return join(_0x271f11[_0xa34755(0x148)],..._0x332cc5[_0xa34755(0x12b)]('/'))+_0xa34755(0x12f);}export function createHookLocationMap(_0x491e6c){const _0x26ff94=a159_0xc6b9af,_0x5d75e2=new Map();for(const _0x2bf38f of _0x491e6c){_0x2bf38f[_0x26ff94(0x135)]&&_0x5d75e2['set'](_0x2bf38f[_0x26ff94(0x135)],{'datasetCode':_0x2bf38f['datasetCode'],'operationType':snakeToCamel(_0x2bf38f['operationType']),'functionNode':'before'}),_0x2bf38f['afterScriptId']&&_0x5d75e2['set'](_0x2bf38f[_0x26ff94(0x14c)],{'datasetCode':_0x2bf38f[_0x26ff94(0x13d)],'operationType':snakeToCamel(_0x2bf38f[_0x26ff94(0x144)]),'functionNode':_0x26ff94(0x12d)});}return _0x5d75e2;}export function resolveRemoteScriptTarget(_0x1a8506,_0x4ebdbf,_0x535ef4,_0x30e1e8,_0x16b9c1){const _0x45c721=a159_0xc6b9af,_0x3c46d6=normalizeBffType(_0x4ebdbf[_0x45c721(0x147)]);if(!_0x3c46d6||!_0x4ebdbf[_0x45c721(0x129)])return null;if(_0x3c46d6===_0x45c721(0x132)){const _0xaef277=(_0x4ebdbf['id']?_0x535ef4[_0x45c721(0x137)](_0x4ebdbf['id']):undefined)??findHookLocationByRemoteId(_0x30e1e8,_0x4ebdbf['id']);if(!_0xaef277)return null;const _0x3b6ac2=_0xaef277['alias']||_0x16b9c1['get'](_0xaef277[_0x45c721(0x13d)]),_0x562e32=_0x3b6ac2??_0xaef277[_0x45c721(0x13d)],_0x212a0e={..._0xaef277,'alias':_0x3b6ac2},_0x5bc8cf=_0x45c721(0x130)+_0x562e32+'/'+_0x212a0e[_0x45c721(0x144)]+'/'+_0x212a0e[_0x45c721(0x149)]+'/'+_0x4ebdbf[_0x45c721(0x129)];return{'lockKey':_0x5bc8cf,'filePath':resolveLocalFilePathFromLockKey(_0x1a8506,_0x5bc8cf),'type':'HOOK','hookLocation':_0x212a0e};}const _0x58be22=_0x3c46d6+'/'+_0x4ebdbf[_0x45c721(0x129)];return{'lockKey':_0x58be22,'filePath':resolveLocalFilePathFromLockKey(_0x1a8506,_0x58be22),'type':_0x3c46d6};}export async function ensureParentDirectory(_0x3b60fb){await mkdir(dirname(_0x3b60fb),{'recursive':!![]});}export async function fileExists(_0x1c97e5){const _0x9a5290=a159_0xc6b9af;try{return await access(_0x1c97e5,constants[_0x9a5290(0x136)]),!![];}catch{return![];}}export async function directoryExists(_0x320719){try{const _0xb3fb5a=await stat(_0x320719);return _0xb3fb5a['isDirectory']();}catch{return![];}}
@@ -1 +1 @@
1
- function a160_0x4215(_0x2a5b2e,_0xa95ba0){_0x2a5b2e=_0x2a5b2e-0x1a7;const _0x1a0355=a160_0x1a03();let _0x4215c8=_0x1a0355[_0x2a5b2e];return _0x4215c8;}(function(_0x544813,_0x2ff9e3){const _0x1a476d=a160_0x4215,_0x4c4bc5=_0x544813();while(!![]){try{const _0x5402a4=-parseInt(_0x1a476d(0x1b5))/0x1*(-parseInt(_0x1a476d(0x1b2))/0x2)+-parseInt(_0x1a476d(0x1b0))/0x3+parseInt(_0x1a476d(0x1ac))/0x4*(parseInt(_0x1a476d(0x1af))/0x5)+-parseInt(_0x1a476d(0x1aa))/0x6+-parseInt(_0x1a476d(0x1a9))/0x7+-parseInt(_0x1a476d(0x1ae))/0x8+-parseInt(_0x1a476d(0x1a8))/0x9*(-parseInt(_0x1a476d(0x1ad))/0xa);if(_0x5402a4===_0x2ff9e3)break;else _0x4c4bc5['push'](_0x4c4bc5['shift']());}catch(_0x463ea7){_0x4c4bc5['push'](_0x4c4bc5['shift']());}}}(a160_0x1a03,0xf3256));import{readFile}from'node:fs/promises';function a160_0x1a03(){const _0x5d0489=['1639728XoyGks','utf8','3472612MaModt','update','md5','1NzWgQh','createHash','9UngnKg','2706690PaPEOc','11472330ayLfQA','hex','1996yAadpu','8488360LJmilF','993192zZkznY','13830KLvqUc'];a160_0x1a03=function(){return _0x5d0489;};return a160_0x1a03();}import a160_0x14c81f from'node:crypto';export function computeContentHash(_0x16e56f){const _0x375072=a160_0x4215;return a160_0x14c81f[_0x375072(0x1a7)](_0x375072(0x1b4))[_0x375072(0x1b3)](_0x16e56f)['digest'](_0x375072(0x1ab));}export async function computeFileHash(_0xca7fe9){const _0x35fc29=a160_0x4215,_0x8d4fd2=await readFile(_0xca7fe9,_0x35fc29(0x1b1));return computeContentHash(_0x8d4fd2);}
1
+ function a160_0x13b7(){const _0x54bbe7=['723234svwfFI','72712okqevi','createHash','696501mRnPQR','md5','505886QquwCb','10AMtpkO','63PyNsYL','286728TyCSAE','192669AFBWzd','1814708vxSCrj','digest','utf8','hex'];a160_0x13b7=function(){return _0x54bbe7;};return a160_0x13b7();}(function(_0x574c82,_0x3b864f){const _0xf88cfd=a160_0xe285,_0x6a4c96=_0x574c82();while(!![]){try{const _0x20635b=-parseInt(_0xf88cfd(0xd9))/0x1+-parseInt(_0xf88cfd(0xe3))/0x2+parseInt(_0xf88cfd(0xe1))/0x3+-parseInt(_0xf88cfd(0xd8))/0x4+-parseInt(_0xf88cfd(0xd6))/0x5*(-parseInt(_0xf88cfd(0xde))/0x6)+parseInt(_0xf88cfd(0xda))/0x7+-parseInt(_0xf88cfd(0xdf))/0x8*(parseInt(_0xf88cfd(0xd7))/0x9);if(_0x20635b===_0x3b864f)break;else _0x6a4c96['push'](_0x6a4c96['shift']());}catch(_0x8d6a1d){_0x6a4c96['push'](_0x6a4c96['shift']());}}}(a160_0x13b7,0x25014));import{readFile}from'node:fs/promises';import a160_0x331bd5 from'node:crypto';function a160_0xe285(_0x3e66e0,_0x55de58){_0x3e66e0=_0x3e66e0-0xd6;const _0x13b762=a160_0x13b7();let _0xe285bb=_0x13b762[_0x3e66e0];return _0xe285bb;}export function computeContentHash(_0x2fdd12){const _0x3c32e9=a160_0xe285;return a160_0x331bd5[_0x3c32e9(0xe0)](_0x3c32e9(0xe2))['update'](_0x2fdd12)[_0x3c32e9(0xdb)](_0x3c32e9(0xdd));}export async function computeFileHash(_0x3338ab){const _0x31d4be=a160_0xe285,_0x6e25cf=await readFile(_0x3338ab,_0x31d4be(0xdc));return computeContentHash(_0x6e25cf);}
@@ -1 +1 @@
1
- function a161_0x1609(_0x5d6839,_0x368718){_0x5d6839=_0x5d6839-0xd1;const _0x38bb39=a161_0x38bb();let _0x1609c7=_0x38bb39[_0x5d6839];return _0x1609c7;}(function(_0x5d72a0,_0x58ff3b){const _0x32f028=a161_0x1609,_0x2a810a=_0x5d72a0();while(!![]){try{const _0x49148e=-parseInt(_0x32f028(0xe7))/0x1+-parseInt(_0x32f028(0xea))/0x2+-parseInt(_0x32f028(0xe2))/0x3*(-parseInt(_0x32f028(0xde))/0x4)+parseInt(_0x32f028(0xd1))/0x5*(-parseInt(_0x32f028(0xd7))/0x6)+parseInt(_0x32f028(0xdb))/0x7*(-parseInt(_0x32f028(0xe1))/0x8)+-parseInt(_0x32f028(0xe6))/0x9*(-parseInt(_0x32f028(0xe4))/0xa)+-parseInt(_0x32f028(0xd6))/0xb*(-parseInt(_0x32f028(0xdd))/0xc);if(_0x49148e===_0x58ff3b)break;else _0x2a810a['push'](_0x2a810a['shift']());}catch(_0x54baa8){_0x2a810a['push'](_0x2a810a['shift']());}}}(a161_0x38bb,0x7d10a));function a161_0x38bb(){const _0x5b5b78=['object','apps','242XIAnVD','460500szgbJX','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20',':\x20scriptsRoot\x20mismatch\x20—\x20','stringify','77uYjshb','\x22.\x20','575664UnelQd','2214748DsujlT','utf8','functions','164328LFBcKB','3SBKlmr','\x22\x20vs\x20lock\x20\x22','70190vorhAV','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','387GNSvOl','47516cpVMhh','ENOENT','scriptsRoot','1636310BdnUNA','20jlcnSm','code','lastSync'];a161_0x38bb=function(){return _0x5b5b78;};return a161_0x38bb();}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x39a412,_0x3b1480,_0x34bc9d,_0x586fe3){const _0x41cfc0=a161_0x1609,_0x27c03f={'apps':_0x39a412['apps']&&typeof _0x39a412[_0x41cfc0(0xd5)]===_0x41cfc0(0xd4)?_0x39a412[_0x41cfc0(0xd5)]:{}};let _0x2f76b6=_0x27c03f['apps'][_0x3b1480];if(!_0x2f76b6)return _0x2f76b6={'scriptsRoot':_0x34bc9d,'lastSync':'','functions':{}},_0x27c03f['apps'][_0x3b1480]=_0x2f76b6,{'lockData':_0x27c03f,'appLock':_0x2f76b6};if(!_0x2f76b6['scriptsRoot'])_0x2f76b6['scriptsRoot']=_0x34bc9d;else{if(_0x2f76b6[_0x41cfc0(0xe9)]!==_0x34bc9d)throw new Error(_0x586fe3+_0x41cfc0(0xd9)+('current\x20\x22'+_0x34bc9d+_0x41cfc0(0xe3)+_0x2f76b6[_0x41cfc0(0xe9)]+_0x41cfc0(0xdc))+_0x41cfc0(0xe5));}return!_0x2f76b6[_0x41cfc0(0xe0)]&&(_0x2f76b6[_0x41cfc0(0xe0)]={}),!_0x2f76b6['lastSync']&&(_0x2f76b6[_0x41cfc0(0xd3)]=''),{'lockData':_0x27c03f,'appLock':_0x2f76b6};}export async function readBffLockFile(_0x10f53b){const _0x4b64d7=a161_0x1609;try{const _0xb6179d=await readFile(_0x10f53b,_0x4b64d7(0xdf)),_0x48a204=JSON['parse'](_0xb6179d);return{'apps':_0x48a204['apps']&&typeof _0x48a204[_0x4b64d7(0xd5)]===_0x4b64d7(0xd4)?_0x48a204[_0x4b64d7(0xd5)]:{}};}catch(_0x243acb){if(_0x243acb[_0x4b64d7(0xd2)]===_0x4b64d7(0xe8))return null;throw new Error(_0x4b64d7(0xd8)+String(_0x243acb));}}export async function writeBffLockFile(_0x3e97c8,_0x1d49a6){const _0x44da6e=a161_0x1609;await mkdir(dirname(_0x3e97c8),{'recursive':!![]}),await writeFile(_0x3e97c8,JSON[_0x44da6e(0xda)](_0x1d49a6,null,0x2),'utf8');}
1
+ (function(_0x406490,_0x25e09f){const _0x3aa98c=a161_0x3292,_0x50788e=_0x406490();while(!![]){try{const _0x9afb41=-parseInt(_0x3aa98c(0xec))/0x1*(parseInt(_0x3aa98c(0xfd))/0x2)+parseInt(_0x3aa98c(0xfc))/0x3*(-parseInt(_0x3aa98c(0xf0))/0x4)+parseInt(_0x3aa98c(0xfa))/0x5*(-parseInt(_0x3aa98c(0xe5))/0x6)+-parseInt(_0x3aa98c(0xf9))/0x7+-parseInt(_0x3aa98c(0xe6))/0x8*(parseInt(_0x3aa98c(0xf1))/0x9)+parseInt(_0x3aa98c(0xea))/0xa*(-parseInt(_0x3aa98c(0xef))/0xb)+parseInt(_0x3aa98c(0xf6))/0xc;if(_0x9afb41===_0x25e09f)break;else _0x50788e['push'](_0x50788e['shift']());}catch(_0x5e1d08){_0x50788e['push'](_0x50788e['shift']());}}}(a161_0x4bd7,0xcd8f3));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}function a161_0x3292(_0x75c912,_0x3e25fe){_0x75c912=_0x75c912-0xe4;const _0x4bd753=a161_0x4bd7();let _0x3292de=_0x4bd753[_0x75c912];return _0x3292de;}function a161_0x4bd7(){const _0x2fe4ef=['scriptsRoot','66982zJRuCR','code','ENOENT','2981qdCPQE','4MJUDqb','107307xBvWqj',':\x20scriptsRoot\x20mismatch\x20—\x20','lastSync','utf8','object','42804804VesAMy','parse','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','2261434ZIlsYj','1145HqzsEL','current\x20\x22','1004979SEmyxV','10aSOtRo','apps','1470paqOSw','872THtXXR','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','\x22.\x20','functions','13890LBZJRL'];a161_0x4bd7=function(){return _0x2fe4ef;};return a161_0x4bd7();}export function ensureLockScope(_0x2d86b8,_0x4d03f7,_0x193a20,_0x56827a){const _0x2140fe=a161_0x3292,_0x25fd46={'apps':_0x2d86b8[_0x2140fe(0xe4)]&&typeof _0x2d86b8['apps']===_0x2140fe(0xf5)?_0x2d86b8['apps']:{}};let _0x3ab7b9=_0x25fd46[_0x2140fe(0xe4)][_0x4d03f7];if(!_0x3ab7b9)return _0x3ab7b9={'scriptsRoot':_0x193a20,'lastSync':'','functions':{}},_0x25fd46[_0x2140fe(0xe4)][_0x4d03f7]=_0x3ab7b9,{'lockData':_0x25fd46,'appLock':_0x3ab7b9};if(!_0x3ab7b9[_0x2140fe(0xeb)])_0x3ab7b9[_0x2140fe(0xeb)]=_0x193a20;else{if(_0x3ab7b9[_0x2140fe(0xeb)]!==_0x193a20)throw new Error(_0x56827a+_0x2140fe(0xf2)+(_0x2140fe(0xfb)+_0x193a20+'\x22\x20vs\x20lock\x20\x22'+_0x3ab7b9[_0x2140fe(0xeb)]+_0x2140fe(0xe8))+_0x2140fe(0xf8));}return!_0x3ab7b9[_0x2140fe(0xe9)]&&(_0x3ab7b9[_0x2140fe(0xe9)]={}),!_0x3ab7b9[_0x2140fe(0xf3)]&&(_0x3ab7b9['lastSync']=''),{'lockData':_0x25fd46,'appLock':_0x3ab7b9};}export async function readBffLockFile(_0x156d09){const _0x1e1e32=a161_0x3292;try{const _0x2e715f=await readFile(_0x156d09,_0x1e1e32(0xf4)),_0x15085e=JSON[_0x1e1e32(0xf7)](_0x2e715f);return{'apps':_0x15085e[_0x1e1e32(0xe4)]&&typeof _0x15085e[_0x1e1e32(0xe4)]===_0x1e1e32(0xf5)?_0x15085e[_0x1e1e32(0xe4)]:{}};}catch(_0x219d75){if(_0x219d75[_0x1e1e32(0xed)]===_0x1e1e32(0xee))return null;throw new Error(_0x1e1e32(0xe7)+String(_0x219d75));}}export async function writeBffLockFile(_0x4e87d4,_0x126ad5){const _0x491b9c=a161_0x3292;await mkdir(dirname(_0x4e87d4),{'recursive':!![]}),await writeFile(_0x4e87d4,JSON['stringify'](_0x126ad5,null,0x2),_0x491b9c(0xf4));}
@@ -1 +1 @@
1
- (function(_0x5a7d77,_0x3bce1d){const _0x7e49e1=a163_0xb10e,_0x54fcac=_0x5a7d77();while(!![]){try{const _0x37b13a=parseInt(_0x7e49e1(0x196))/0x1+-parseInt(_0x7e49e1(0x192))/0x2*(-parseInt(_0x7e49e1(0x191))/0x3)+-parseInt(_0x7e49e1(0x1a6))/0x4*(parseInt(_0x7e49e1(0x19d))/0x5)+-parseInt(_0x7e49e1(0x198))/0x6+-parseInt(_0x7e49e1(0x19f))/0x7+-parseInt(_0x7e49e1(0x1a1))/0x8*(parseInt(_0x7e49e1(0x1a0))/0x9)+-parseInt(_0x7e49e1(0x19c))/0xa*(-parseInt(_0x7e49e1(0x19e))/0xb);if(_0x37b13a===_0x3bce1d)break;else _0x54fcac['push'](_0x54fcac['shift']());}catch(_0x41a638){_0x54fcac['push'](_0x54fcac['shift']());}}}(a163_0x318e,0x6152d));export function snakeToCamel(_0x5435fb){const _0x18ce7f=a163_0xb10e;return _0x5435fb[_0x18ce7f(0x195)]()[_0x18ce7f(0x193)](/_([a-z])/g,(_0x4ab4c7,_0x4447e1)=>_0x4447e1[_0x18ce7f(0x19b)]());}export function findHookLocationByRemoteId(_0x33e2ad,_0x3fa4d9){const _0x26f159=a163_0xb10e;if(!_0x3fa4d9)return undefined;for(const _0x27a704 of Object['values'](_0x33e2ad)){if(_0x27a704['remoteId']===_0x3fa4d9&&_0x27a704[_0x26f159(0x1a5)]&&_0x27a704[_0x26f159(0x1a2)]&&_0x27a704['functionNode'])return{'datasetCode':_0x27a704[_0x26f159(0x1a5)],'operationType':_0x27a704[_0x26f159(0x1a2)],'functionNode':_0x27a704[_0x26f159(0x199)]};}return undefined;}function a163_0xb10e(_0x46587c,_0x949abe){_0x46587c=_0x46587c-0x191;const _0x318e40=a163_0x318e();let _0xb10e2=_0x318e40[_0x46587c];return _0xb10e2;}export function extractScriptDescription(_0x37566b){const _0x353fe6=a163_0xb10e,_0x405315=_0x37566b[_0x353fe6(0x1a4)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x405315?.[0x1]?.[_0x353fe6(0x19a)]()||undefined;}function a163_0x318e(){const _0x40f20b=['toUpperCase','1363910cBAiRd','17950xhXrXP','99tnAYbr','1404690GZBRKB','288TvkQbx','96808zJsXHA','operationType','before','match','datasetCode','404VooqLp','24375BDgKNA','46HErQCt','replace','test','toLowerCase','495286DgQgtf','after','3363306gfjQnI','functionNode','trim'];a163_0x318e=function(){return _0x40f20b;};return a163_0x318e();}export function isValidBffFunctionName(_0x6bb947){const _0x510096=a163_0xb10e;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x510096(0x194)](_0x6bb947);}export function normalizeHookFunctionNode(_0x44eafd){const _0x28579b=a163_0xb10e;if(!_0x44eafd)return undefined;const _0x19c2da=_0x44eafd[_0x28579b(0x19a)]()[_0x28579b(0x195)]();if(_0x19c2da===_0x28579b(0x1a3)||_0x19c2da===_0x28579b(0x197))return _0x19c2da;return undefined;}
1
+ function a163_0x36e6(_0x5d0d7f,_0x424a0a){_0x5d0d7f=_0x5d0d7f-0x1df;const _0x55a67a=a163_0x55a6();let _0x36e639=_0x55a67a[_0x5d0d7f];return _0x36e639;}(function(_0x126532,_0x5c4ce5){const _0x35e47d=a163_0x36e6,_0x2eaa82=_0x126532();while(!![]){try{const _0x3f67e8=-parseInt(_0x35e47d(0x1e3))/0x1+parseInt(_0x35e47d(0x1e6))/0x2+parseInt(_0x35e47d(0x1ea))/0x3*(-parseInt(_0x35e47d(0x1e0))/0x4)+parseInt(_0x35e47d(0x1eb))/0x5+parseInt(_0x35e47d(0x1e8))/0x6+-parseInt(_0x35e47d(0x1f0))/0x7+parseInt(_0x35e47d(0x1e5))/0x8;if(_0x3f67e8===_0x5c4ce5)break;else _0x2eaa82['push'](_0x2eaa82['shift']());}catch(_0x55d63e){_0x2eaa82['push'](_0x2eaa82['shift']());}}}(a163_0x55a6,0x1f8a9));export function snakeToCamel(_0x5be83c){const _0x53a21b=a163_0x36e6;return _0x5be83c['toLowerCase']()[_0x53a21b(0x1e9)](/_([a-z])/g,(_0x18d5c7,_0x5cecac)=>_0x5cecac[_0x53a21b(0x1ed)]());}function a163_0x55a6(){const _0x4519a3=['operationType','74720MhNNLF','418164UPllcs','toLowerCase','1025100mVYPDD','replace','105vnBZrI','690585LzyuSh','functionNode','toUpperCase','trim','match','649159HCTeAq','after','before','test','26668xzkRDv','values','datasetCode','72114IiqkXP'];a163_0x55a6=function(){return _0x4519a3;};return a163_0x55a6();}export function findHookLocationByRemoteId(_0x441280,_0x12aa37){const _0x267e90=a163_0x36e6;if(!_0x12aa37)return undefined;for(const _0x105021 of Object[_0x267e90(0x1e1)](_0x441280)){if(_0x105021['remoteId']===_0x12aa37&&_0x105021[_0x267e90(0x1e2)]&&_0x105021['operationType']&&_0x105021[_0x267e90(0x1ec)])return{'datasetCode':_0x105021['datasetCode'],'operationType':_0x105021[_0x267e90(0x1e4)],'functionNode':_0x105021[_0x267e90(0x1ec)]};}return undefined;}export function extractScriptDescription(_0x6a1839){const _0x183478=a163_0x36e6,_0x1162a1=_0x6a1839[_0x183478(0x1ef)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x1162a1?.[0x1]?.[_0x183478(0x1ee)]()||undefined;}export function isValidBffFunctionName(_0x39753b){const _0x29020d=a163_0x36e6;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x29020d(0x1df)](_0x39753b);}export function normalizeHookFunctionNode(_0x8ea09f){const _0x4168ed=a163_0x36e6;if(!_0x8ea09f)return undefined;const _0x41e7f7=_0x8ea09f[_0x4168ed(0x1ee)]()[_0x4168ed(0x1e7)]();if(_0x41e7f7===_0x4168ed(0x1f2)||_0x41e7f7===_0x4168ed(0x1f1))return _0x41e7f7;return undefined;}
@@ -1 +1 @@
1
- (function(_0xc5d788,_0x18327a){const _0x5614b4=a164_0xe2bb,_0x2dceb0=_0xc5d788();while(!![]){try{const _0x2a5d2b=-parseInt(_0x5614b4(0x1a2))/0x1*(-parseInt(_0x5614b4(0x1b6))/0x2)+-parseInt(_0x5614b4(0x1b1))/0x3+-parseInt(_0x5614b4(0x1af))/0x4+-parseInt(_0x5614b4(0x1ae))/0x5*(-parseInt(_0x5614b4(0x1b8))/0x6)+parseInt(_0x5614b4(0x1a8))/0x7*(-parseInt(_0x5614b4(0x1b7))/0x8)+-parseInt(_0x5614b4(0x1b2))/0x9+parseInt(_0x5614b4(0x1a4))/0xa;if(_0x2a5d2b===_0x18327a)break;else _0x2dceb0['push'](_0x2dceb0['shift']());}catch(_0x16673c){_0x2dceb0['push'](_0x2dceb0['shift']());}}}(a164_0x1489,0xabe24));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x1098ed){const _0x445ce7=a164_0xe2bb;if(cache[_0x445ce7(0x1a1)](_0x1098ed))return cache[_0x445ce7(0x1b3)](_0x1098ed);const _0x591223=await listDatasets(_0x1098ed),_0x44dc6d=new Map();for(const _0x5d87eb of _0x591223){const _0x1731c1=_0x5d87eb[_0x445ce7(0x1ac)];_0x1731c1?.[_0x445ce7(0x1bc)]!=null&&_0x44dc6d[_0x445ce7(0x1bb)](_0x1731c1[_0x445ce7(0x1bc)],_0x1731c1[_0x445ce7(0x1b4)]??'db-'+_0x1731c1[_0x445ce7(0x1bc)]);}const _0x3526a1=[..._0x44dc6d[_0x445ce7(0x1a6)]()][_0x445ce7(0x1bd)](([_0x4af73e,_0x301a93])=>({'dbId':_0x4af73e,'dbName':_0x301a93}));return cache[_0x445ce7(0x1bb)](_0x1098ed,_0x3526a1),_0x3526a1;}function a164_0xe2bb(_0x317b50,_0x20643a){_0x317b50=_0x317b50-0x1a0;const _0x148953=a164_0x1489();let _0xe2bbcb=_0x148953[_0x317b50];return _0xe2bbcb;}export async function resolveDb(_0x22672b,_0x1fdad6){const _0x4f8e17=a164_0xe2bb,_0x2e1b9c=await listDatabases(_0x22672b);if(_0x2e1b9c[_0x4f8e17(0x1a0)]===0x0)return{'resolved':[],'error':_0x4f8e17(0x1b5)+_0x22672b+'\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0x1fdad6)return{'resolved':_0x2e1b9c};const _0x88b2e6=Number(_0x1fdad6);if(!Number[_0x4f8e17(0x1b0)](_0x88b2e6)){const _0x7dc03a=_0x2e1b9c['find'](_0x221bb5=>_0x221bb5[_0x4f8e17(0x1bc)]===_0x88b2e6);if(_0x7dc03a)return{'resolved':[_0x7dc03a]};}const _0x22cd86=_0x1fdad6[_0x4f8e17(0x1ba)](),_0x25b69c=_0x2e1b9c[_0x4f8e17(0x1a5)](_0x20ed09=>_0x20ed09['dbName'][_0x4f8e17(0x1ba)]()['includes'](_0x22cd86));if(_0x25b69c[_0x4f8e17(0x1a0)]>0x0)return{'resolved':_0x25b69c};const _0x4ca569=_0x2e1b9c[_0x4f8e17(0x1bd)](_0x3c055e=>_0x3c055e[_0x4f8e17(0x1b4)]+'\x20('+_0x3c055e[_0x4f8e17(0x1bc)]+')')[_0x4f8e17(0x1a7)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x1fdad6+_0x4f8e17(0x1ab)+_0x22672b+_0x4f8e17(0x1a9)+_0x4ca569+_0x4f8e17(0x1ad)};}export async function resolveOneDb(_0x370e9a,_0x3e51f4){const _0x3c331f=a164_0xe2bb,{resolved:_0x159f0b,error:_0x1c3064}=await resolveDb(_0x370e9a,_0x3e51f4);if(_0x1c3064)return{'db':null,'error':_0x1c3064};if(_0x159f0b['length']===0x1)return{'db':_0x159f0b[0x0]};if(!_0x3e51f4){const _0x43b71c=_0x159f0b['map'](_0x261c56=>_0x261c56['dbName']+'\x20('+_0x261c56[_0x3c331f(0x1bc)]+')')[_0x3c331f(0x1a7)](',\x20');return{'db':null,'error':_0x3c331f(0x1aa)+_0x43b71c};}const _0x164c8e=_0x159f0b[_0x3c331f(0x1bd)](_0x5032c1=>_0x5032c1[_0x3c331f(0x1b4)]+'\x20('+_0x5032c1[_0x3c331f(0x1bc)]+')')[_0x3c331f(0x1a7)](',\x20');return{'db':null,'error':'\x22'+_0x3e51f4+_0x3c331f(0x1a3)+_0x164c8e+'.\x20Be\x20more\x20specific.'};}export async function getDbName(_0x3d4ad9,_0x144f15){const _0xb40059=a164_0xe2bb,_0x2a03d8=await listDatabases(_0x3d4ad9);return _0x2a03d8[_0xb40059(0x1b9)](_0x4a0fb3=>_0x4a0fb3['dbId']===_0x144f15)?.[_0xb40059(0x1b4)];}function a164_0x1489(){const _0x5465d6=['\x22.\x20Available:\x20','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','\x22\x20under\x20app\x20\x22','dbtableConfig','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','15ENUZVW','1162444qHnUrT','isNaN','3842718mWxFzb','10817802yukXkM','get','dbName','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','182mtaApF','40JfkQPL','2270058weqPVh','find','toLowerCase','set','dbId','map','length','has','4475ODqSSn','\x22\x20matches\x20multiple\x20databases:\x20','26728370MsrKDN','filter','entries','join','1032584sfLvGX'];a164_0x1489=function(){return _0x5465d6;};return a164_0x1489();}
1
+ (function(_0x51f348,_0x2c4ad9){const _0x50af47=a164_0x39ef,_0x3c5473=_0x51f348();while(!![]){try{const _0x168cb3=-parseInt(_0x50af47(0x1c5))/0x1*(parseInt(_0x50af47(0x1bd))/0x2)+-parseInt(_0x50af47(0x1d0))/0x3*(parseInt(_0x50af47(0x1c6))/0x4)+-parseInt(_0x50af47(0x1b7))/0x5*(parseInt(_0x50af47(0x1ba))/0x6)+parseInt(_0x50af47(0x1bc))/0x7*(-parseInt(_0x50af47(0x1c9))/0x8)+-parseInt(_0x50af47(0x1cb))/0x9+-parseInt(_0x50af47(0x1c0))/0xa+parseInt(_0x50af47(0x1ca))/0xb;if(_0x168cb3===_0x2c4ad9)break;else _0x3c5473['push'](_0x3c5473['shift']());}catch(_0xd2e977){_0x3c5473['push'](_0x3c5473['shift']());}}}(a164_0x42c3,0xd4b93));import{listDatasets}from'../core/api-client.js';function a164_0x39ef(_0x15b29b,_0x36bc95){_0x15b29b=_0x15b29b-0x1b6;const _0x42c3a6=a164_0x42c3();let _0x39ef2b=_0x42c3a6[_0x15b29b];return _0x39ef2b;}const cache=new Map();export async function listDatabases(_0xc52dc6){const _0x2e28d2=a164_0x39ef;if(cache[_0x2e28d2(0x1c3)](_0xc52dc6))return cache[_0x2e28d2(0x1c1)](_0xc52dc6);const _0x224b82=await listDatasets(_0xc52dc6),_0xef2e8=new Map();for(const _0x2899a0 of _0x224b82){const _0x906e39=_0x2899a0[_0x2e28d2(0x1cd)];_0x906e39?.[_0x2e28d2(0x1b6)]!=null&&_0xef2e8[_0x2e28d2(0x1d1)](_0x906e39[_0x2e28d2(0x1b6)],_0x906e39['dbName']??_0x2e28d2(0x1d2)+_0x906e39[_0x2e28d2(0x1b6)]);}const _0x20c88c=[..._0xef2e8['entries']()][_0x2e28d2(0x1c8)](([_0x12d76c,_0x4b7f28])=>({'dbId':_0x12d76c,'dbName':_0x4b7f28}));return cache['set'](_0xc52dc6,_0x20c88c),_0x20c88c;}function a164_0x42c3(){const _0x3de75d=['includes','312KIVJPE','set','db-','dbId','10HbCZOd','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','3175734ZkYObg','dbName','899241WMvRyv','321274IlbKyC','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','.\x20Be\x20more\x20specific.','6982880TkQFHV','get','join','has','length','7iJxVWx','11908VEJuWB','\x22.\x20Available:\x20','map','64zLHmNB','61972526NolMBL','4895226wtPzBb','No\x20database\x20matching\x20\x22','dbtableConfig','find'];a164_0x42c3=function(){return _0x3de75d;};return a164_0x42c3();}export async function resolveDb(_0x1e730e,_0x59778f){const _0xd12fe=a164_0x39ef,_0x3c700d=await listDatabases(_0x1e730e);if(_0x3c700d['length']===0x0)return{'resolved':[],'error':_0xd12fe(0x1b8)+_0x1e730e+'\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0x59778f)return{'resolved':_0x3c700d};const _0x24b873=Number(_0x59778f);if(!Number['isNaN'](_0x24b873)){const _0x5ad1d9=_0x3c700d['find'](_0x3806fd=>_0x3806fd['dbId']===_0x24b873);if(_0x5ad1d9)return{'resolved':[_0x5ad1d9]};}const _0x35fe74=_0x59778f['toLowerCase'](),_0x82e78b=_0x3c700d['filter'](_0x531d40=>_0x531d40[_0xd12fe(0x1bb)]['toLowerCase']()[_0xd12fe(0x1cf)](_0x35fe74));if(_0x82e78b[_0xd12fe(0x1c4)]>0x0)return{'resolved':_0x82e78b};const _0x4b99a7=_0x3c700d[_0xd12fe(0x1c8)](_0x3bbc28=>_0x3bbc28[_0xd12fe(0x1bb)]+'\x20('+_0x3bbc28[_0xd12fe(0x1b6)]+')')[_0xd12fe(0x1c2)](',\x20');return{'resolved':[],'error':_0xd12fe(0x1cc)+_0x59778f+'\x22\x20under\x20app\x20\x22'+_0x1e730e+_0xd12fe(0x1c7)+_0x4b99a7+_0xd12fe(0x1b9)};}export async function resolveOneDb(_0x42e9d8,_0x4fc7ed){const _0x4c81bc=a164_0x39ef,{resolved:_0x38959f,error:_0x22a6d4}=await resolveDb(_0x42e9d8,_0x4fc7ed);if(_0x22a6d4)return{'db':null,'error':_0x22a6d4};if(_0x38959f[_0x4c81bc(0x1c4)]===0x1)return{'db':_0x38959f[0x0]};if(!_0x4fc7ed){const _0x49747a=_0x38959f[_0x4c81bc(0x1c8)](_0x3ac8f7=>_0x3ac8f7[_0x4c81bc(0x1bb)]+'\x20('+_0x3ac8f7[_0x4c81bc(0x1b6)]+')')[_0x4c81bc(0x1c2)](',\x20');return{'db':null,'error':_0x4c81bc(0x1be)+_0x49747a};}const _0x802c3e=_0x38959f[_0x4c81bc(0x1c8)](_0x347dd9=>_0x347dd9[_0x4c81bc(0x1bb)]+'\x20('+_0x347dd9[_0x4c81bc(0x1b6)]+')')[_0x4c81bc(0x1c2)](',\x20');return{'db':null,'error':'\x22'+_0x4fc7ed+'\x22\x20matches\x20multiple\x20databases:\x20'+_0x802c3e+_0x4c81bc(0x1bf)};}export async function getDbName(_0x412f1e,_0x53e589){const _0x5d8148=a164_0x39ef,_0x4abb41=await listDatabases(_0x412f1e);return _0x4abb41[_0x5d8148(0x1ce)](_0x520946=>_0x520946['dbId']===_0x53e589)?.[_0x5d8148(0x1bb)];}
@@ -1 +1 @@
1
- const a165_0x5d102d=a165_0x11ca;(function(_0x177844,_0x5b9760){const _0x2cdef6=a165_0x11ca,_0x4f41eb=_0x177844();while(!![]){try{const _0x49fd76=parseInt(_0x2cdef6(0xf0))/0x1+parseInt(_0x2cdef6(0xf7))/0x2*(parseInt(_0x2cdef6(0xef))/0x3)+parseInt(_0x2cdef6(0xfb))/0x4*(parseInt(_0x2cdef6(0xfa))/0x5)+-parseInt(_0x2cdef6(0xf3))/0x6+-parseInt(_0x2cdef6(0xf4))/0x7*(parseInt(_0x2cdef6(0xfc))/0x8)+-parseInt(_0x2cdef6(0xf1))/0x9+parseInt(_0x2cdef6(0xf2))/0xa;if(_0x49fd76===_0x5b9760)break;else _0x4f41eb['push'](_0x4f41eb['shift']());}catch(_0x47c248){_0x4f41eb['push'](_0x4f41eb['shift']());}}}(a165_0x1f22,0x756fa));import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x13223a,_0x4833d5=process[a165_0x5d102d(0xf8)]()){const _0x20d346=a165_0x5d102d,_0x318d8c=resolve(_0x4833d5),_0x5adaf6=join(_0x318d8c,_0x20d346(0xf6),_0x20d346(0xf5));return{'projectRoot':_0x318d8c,'pagesBaseDir':_0x5adaf6,'appPagesDir':join(_0x5adaf6,_0x13223a),'lockFilePath':join(_0x318d8c,_0x20d346(0xf6),_0x20d346(0xf9))};}function a165_0x1f22(){const _0x3058d9=['13719130psBlvB','1604820LVIdSJ','1246889zXnEsi','page','.rabetbase','43714uzGTSp','cwd','page.lock.json','917845uOlbjh','4LrqUNn','40DDJeHp','toUpperCase','F_OK','33bvigms','387578MUFjfh','4899276NMqrys'];a165_0x1f22=function(){return _0x3058d9;};return a165_0x1f22();}export function buildPageFileName(_0x59ca59,_0x5de398){const _0x3ffb77=a165_0x5d102d;return _0x59ca59+'-'+String(_0x5de398)[_0x3ffb77(0xfd)]()+'.json';}export function resolvePageFilePath(_0x1789d7,_0x4bedff,_0x110c1a){return join(_0x1789d7['appPagesDir'],buildPageFileName(_0x4bedff,_0x110c1a));}export async function ensureParentDirectory(_0x35189f){await mkdir(dirname(_0x35189f),{'recursive':!![]});}function a165_0x11ca(_0x289ff7,_0x857c8f){_0x289ff7=_0x289ff7-0xef;const _0x1f22c9=a165_0x1f22();let _0x11caf3=_0x1f22c9[_0x289ff7];return _0x11caf3;}export async function fileExists(_0x3e6081){const _0x58d738=a165_0x5d102d;try{return await access(_0x3e6081,constants[_0x58d738(0xfe)]),!![];}catch{return![];}}
1
+ (function(_0x27a8e1,_0x311bfe){const _0x1b928a=a165_0x4de7,_0x805114=_0x27a8e1();while(!![]){try{const _0xfb876b=parseInt(_0x1b928a(0x92))/0x1*(-parseInt(_0x1b928a(0x93))/0x2)+parseInt(_0x1b928a(0x84))/0x3*(-parseInt(_0x1b928a(0x8f))/0x4)+parseInt(_0x1b928a(0x91))/0x5+-parseInt(_0x1b928a(0x86))/0x6*(parseInt(_0x1b928a(0x8b))/0x7)+parseInt(_0x1b928a(0x8d))/0x8+parseInt(_0x1b928a(0x89))/0x9*(parseInt(_0x1b928a(0x90))/0xa)+parseInt(_0x1b928a(0x87))/0xb;if(_0xfb876b===_0x311bfe)break;else _0x805114['push'](_0x805114['shift']());}catch(_0x292dbb){_0x805114['push'](_0x805114['shift']());}}}(a165_0x33e0,0x4f580));function a165_0x33e0(){const _0x53cdda=['toUpperCase','28MHrIYh','appPagesDir','4875280NHTgne','page','2560964SZeAVM','2322050JqvgVA','1219185bTaRWZ','4XzWRGD','73892lGROOe','F_OK','3rPxumq','page.lock.json','932136UuqymC','7138879OgbQmR','.rabetbase','9oRpEGd'];a165_0x33e0=function(){return _0x53cdda;};return a165_0x33e0();}import{constants}from'node:fs';function a165_0x4de7(_0x39f5df,_0x161208){_0x39f5df=_0x39f5df-0x83;const _0x33e0ec=a165_0x33e0();let _0x4de74f=_0x33e0ec[_0x39f5df];return _0x4de74f;}import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0xdd7e34,_0x1e5c07=process['cwd']()){const _0x3444c4=a165_0x4de7,_0x17f9b6=resolve(_0x1e5c07),_0x360809=join(_0x17f9b6,'.rabetbase',_0x3444c4(0x8e));return{'projectRoot':_0x17f9b6,'pagesBaseDir':_0x360809,'appPagesDir':join(_0x360809,_0xdd7e34),'lockFilePath':join(_0x17f9b6,_0x3444c4(0x88),_0x3444c4(0x85))};}export function buildPageFileName(_0xfc59e1,_0xd0af7b){const _0x315192=a165_0x4de7;return _0xfc59e1+'-'+String(_0xd0af7b)[_0x315192(0x8a)]()+'.json';}export function resolvePageFilePath(_0x3cb78c,_0x87a240,_0x19edcc){const _0x52e172=a165_0x4de7;return join(_0x3cb78c[_0x52e172(0x8c)],buildPageFileName(_0x87a240,_0x19edcc));}export async function ensureParentDirectory(_0x4262a5){await mkdir(dirname(_0x4262a5),{'recursive':!![]});}export async function fileExists(_0x1c4d14){const _0x3fa3ea=a165_0x4de7;try{return await access(_0x1c4d14,constants[_0x3fa3ea(0x83)]),!![];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x6ab595,_0x22eea5){const _0x3c1168=a166_0x1cee,_0x1e507f=_0x6ab595();while(!![]){try{const _0x49c099=parseInt(_0x3c1168(0x11c))/0x1+-parseInt(_0x3c1168(0x122))/0x2*(-parseInt(_0x3c1168(0x11b))/0x3)+parseInt(_0x3c1168(0x124))/0x4+-parseInt(_0x3c1168(0x119))/0x5*(parseInt(_0x3c1168(0x126))/0x6)+parseInt(_0x3c1168(0x127))/0x7+-parseInt(_0x3c1168(0x118))/0x8+parseInt(_0x3c1168(0x11d))/0x9*(-parseInt(_0x3c1168(0x123))/0xa);if(_0x49c099===_0x22eea5)break;else _0x1e507f['push'](_0x1e507f['shift']());}catch(_0x5166e9){_0x1e507f['push'](_0x1e507f['shift']());}}}(a166_0x5366,0xa1649));import a166_0xf8c0ec from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x132da0){const _0xb1adac=a166_0x1cee;return JSON[_0xb1adac(0x121)](JSON[_0xb1adac(0x11f)](_0x132da0),null,0x2)+'\x0a';}export function computePageContentHash(_0x57b74e){const _0x3c1ae1=a166_0x1cee;return a166_0xf8c0ec[_0x3c1ae1(0x120)](_0x3c1ae1(0x125))[_0x3c1ae1(0x11e)](_0x57b74e)[_0x3c1ae1(0x128)]('hex');}function a166_0x5366(){const _0x412da4=['digest','3241480FjmJso','4590NqbCBv','utf8','65646isResQ','1050624EdvkXk','17333370RdGPaS','update','parse','createHash','stringify','76QmWAbq','10sGLAto','4512776JnxsVQ','md5','2508kLqWOt','2558990PGKUkv'];a166_0x5366=function(){return _0x412da4;};return a166_0x5366();}export function computeSerializedSchemaHash(_0x1b919e){return computePageContentHash(serializePageSchemaForFile(_0x1b919e));}function a166_0x1cee(_0x384540,_0x230ce4){_0x384540=_0x384540-0x118;const _0x5366a1=a166_0x5366();let _0x1cee38=_0x5366a1[_0x384540];return _0x1cee38;}export async function computePageFileHash(_0x5850c1){const _0x5394e9=a166_0x1cee,_0x7d4d15=await readFile(_0x5850c1,_0x5394e9(0x11a));return computePageContentHash(_0x7d4d15);}
1
+ (function(_0x3bd03f,_0x411faa){const _0x190144=a166_0x214e,_0x20d5a3=_0x3bd03f();while(!![]){try{const _0x2f729e=parseInt(_0x190144(0x1ec))/0x1+parseInt(_0x190144(0x1eb))/0x2+-parseInt(_0x190144(0x1f3))/0x3*(parseInt(_0x190144(0x1ed))/0x4)+parseInt(_0x190144(0x1f5))/0x5+parseInt(_0x190144(0x1f4))/0x6*(parseInt(_0x190144(0x1ee))/0x7)+parseInt(_0x190144(0x1ef))/0x8+-parseInt(_0x190144(0x1f9))/0x9*(parseInt(_0x190144(0x1f8))/0xa);if(_0x2f729e===_0x411faa)break;else _0x20d5a3['push'](_0x20d5a3['shift']());}catch(_0xcfb650){_0x20d5a3['push'](_0x20d5a3['shift']());}}}(a166_0x569c,0x76392));import a166_0x53d911 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x576143){const _0x45732b=a166_0x214e;return JSON[_0x45732b(0x1f6)](JSON['parse'](_0x576143),null,0x2)+'\x0a';}function a166_0x569c(){const _0x16ccaa=['stringify','createHash','1811830uXcvWe','63VuDqDL','766950gAbpRa','806026CUDfAf','8cogfof','2219nKfSbC','2001816omfDoJ','md5','digest','utf8','349422gDNboY','4740fGvjvR','1476565pXyTeT'];a166_0x569c=function(){return _0x16ccaa;};return a166_0x569c();}export function computePageContentHash(_0x5d6c02){const _0x51b4d1=a166_0x214e;return a166_0x53d911[_0x51b4d1(0x1f7)](_0x51b4d1(0x1f0))['update'](_0x5d6c02)[_0x51b4d1(0x1f1)]('hex');}function a166_0x214e(_0x1e0011,_0x5487f4){_0x1e0011=_0x1e0011-0x1eb;const _0x569ceb=a166_0x569c();let _0x214e8d=_0x569ceb[_0x1e0011];return _0x214e8d;}export function computeSerializedSchemaHash(_0x26ad7b){return computePageContentHash(serializePageSchemaForFile(_0x26ad7b));}export async function computePageFileHash(_0x1c1cac){const _0x1df88e=a166_0x214e,_0x386f07=await readFile(_0x1c1cac,_0x1df88e(0x1f2));return computePageContentHash(_0x386f07);}
@@ -1 +1 @@
1
- (function(_0x2a9134,_0x5ef290){const _0x2bf6be=a167_0x5f14,_0x12dffb=_0x2a9134();while(!![]){try{const _0x17d31e=-parseInt(_0x2bf6be(0x1eb))/0x1+-parseInt(_0x2bf6be(0x1f0))/0x2*(-parseInt(_0x2bf6be(0x1f7))/0x3)+parseInt(_0x2bf6be(0x1ea))/0x4+-parseInt(_0x2bf6be(0x1ee))/0x5*(-parseInt(_0x2bf6be(0x1f6))/0x6)+-parseInt(_0x2bf6be(0x1e8))/0x7*(parseInt(_0x2bf6be(0x1f5))/0x8)+-parseInt(_0x2bf6be(0x1f3))/0x9+parseInt(_0x2bf6be(0x1e9))/0xa;if(_0x17d31e===_0x5ef290)break;else _0x12dffb['push'](_0x12dffb['shift']());}catch(_0x1d5e93){_0x12dffb['push'](_0x12dffb['shift']());}}}(a167_0x4079,0x2ad3b));function a167_0x5f14(_0x1a644b,_0x492ed5){_0x1a644b=_0x1a644b-0x1e6;const _0x4079ce=a167_0x4079();let _0x5f1498=_0x4079ce[_0x1a644b];return _0x5f1498;}import{mkdir,readFile,writeFile}from'node:fs/promises';function a167_0x4079(){const _0x5332f5=['28KBTPOG','2840400PjxDWJ','1282740yeVUdI','309256vOiKlY','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','stringify','12585LeJXkL','code','162ixRWCb','parse','apps','2946168jhront','utf8','320504TwBifD','786iCbpCH','1401jeLYGX','object','pages','lastSync'];a167_0x4079=function(){return _0x5332f5;};return a167_0x4079();}import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x58927b,_0x3a6e27){const _0x448cd0=a167_0x5f14,_0x54e59e={'apps':_0x58927b[_0x448cd0(0x1f2)]&&typeof _0x58927b[_0x448cd0(0x1f2)]===_0x448cd0(0x1f8)?_0x58927b[_0x448cd0(0x1f2)]:{}};let _0xe019f8=_0x54e59e[_0x448cd0(0x1f2)][_0x3a6e27];if(!_0xe019f8)return _0xe019f8={'lastSync':'','pages':{}},_0x54e59e[_0x448cd0(0x1f2)][_0x3a6e27]=_0xe019f8,{'lockData':_0x54e59e,'appLock':_0xe019f8};return!_0xe019f8[_0x448cd0(0x1e7)]&&(_0xe019f8[_0x448cd0(0x1e7)]=''),(!_0xe019f8[_0x448cd0(0x1e6)]||typeof _0xe019f8[_0x448cd0(0x1e6)]!=='object')&&(_0xe019f8[_0x448cd0(0x1e6)]={}),{'lockData':_0x54e59e,'appLock':_0xe019f8};}export async function readPageLockFile(_0x1eb6d4){const _0x593a62=a167_0x5f14;try{const _0x31e73a=await readFile(_0x1eb6d4,_0x593a62(0x1f4)),_0x1084c3=JSON[_0x593a62(0x1f1)](_0x31e73a);return{'apps':_0x1084c3[_0x593a62(0x1f2)]&&typeof _0x1084c3[_0x593a62(0x1f2)]===_0x593a62(0x1f8)?_0x1084c3[_0x593a62(0x1f2)]:{}};}catch(_0x285e38){if(_0x285e38[_0x593a62(0x1ef)]==='ENOENT')return null;throw new Error(_0x593a62(0x1ec)+String(_0x285e38));}}export async function writePageLockFile(_0x3c57a9,_0x555cc4){const _0x34c9f5=a167_0x5f14;await mkdir(dirname(_0x3c57a9),{'recursive':!![]}),await writeFile(_0x3c57a9,JSON[_0x34c9f5(0x1ed)](_0x555cc4,null,0x2),_0x34c9f5(0x1f4));}
1
+ (function(_0x2f9399,_0x3dceb0){const _0x30d715=a167_0x44d9,_0x322a56=_0x2f9399();while(!![]){try{const _0x396031=parseInt(_0x30d715(0x15f))/0x1*(parseInt(_0x30d715(0x15b))/0x2)+-parseInt(_0x30d715(0x165))/0x3+parseInt(_0x30d715(0x154))/0x4*(parseInt(_0x30d715(0x156))/0x5)+-parseInt(_0x30d715(0x166))/0x6+parseInt(_0x30d715(0x162))/0x7*(-parseInt(_0x30d715(0x159))/0x8)+parseInt(_0x30d715(0x164))/0x9*(-parseInt(_0x30d715(0x158))/0xa)+parseInt(_0x30d715(0x15c))/0xb;if(_0x396031===_0x3dceb0)break;else _0x322a56['push'](_0x322a56['shift']());}catch(_0x3ade2d){_0x322a56['push'](_0x322a56['shift']());}}}(a167_0x59c4,0x58549));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}function a167_0x59c4(){const _0x3fbea5=['apps','lastSync','907683IvlATY','utf8','1290789nNeqiP','836139qaGnvx','1392588ahhLtu','ENOENT','1492SUytfH','code','6605RDrXYd','stringify','30UDWhbZ','32kHROSV','parse','2SNOrXH','13191607rktyRn','pages','object','129581BDuAMs'];a167_0x59c4=function(){return _0x3fbea5;};return a167_0x59c4();}function a167_0x44d9(_0x5b93ff,_0x310ad1){_0x5b93ff=_0x5b93ff-0x153;const _0x59c451=a167_0x59c4();let _0x44d95a=_0x59c451[_0x5b93ff];return _0x44d95a;}export function ensurePageLockScope(_0x2e749c,_0x3f3b0a){const _0x24f5d4=a167_0x44d9,_0x4c19bb={'apps':_0x2e749c['apps']&&typeof _0x2e749c[_0x24f5d4(0x160)]===_0x24f5d4(0x15e)?_0x2e749c['apps']:{}};let _0x1b0923=_0x4c19bb[_0x24f5d4(0x160)][_0x3f3b0a];if(!_0x1b0923)return _0x1b0923={'lastSync':'','pages':{}},_0x4c19bb[_0x24f5d4(0x160)][_0x3f3b0a]=_0x1b0923,{'lockData':_0x4c19bb,'appLock':_0x1b0923};return!_0x1b0923[_0x24f5d4(0x161)]&&(_0x1b0923['lastSync']=''),(!_0x1b0923[_0x24f5d4(0x15d)]||typeof _0x1b0923['pages']!=='object')&&(_0x1b0923['pages']={}),{'lockData':_0x4c19bb,'appLock':_0x1b0923};}export async function readPageLockFile(_0x1029f2){const _0x5a14a0=a167_0x44d9;try{const _0x4f4e07=await readFile(_0x1029f2,'utf8'),_0x1a37a0=JSON[_0x5a14a0(0x15a)](_0x4f4e07);return{'apps':_0x1a37a0[_0x5a14a0(0x160)]&&typeof _0x1a37a0[_0x5a14a0(0x160)]===_0x5a14a0(0x15e)?_0x1a37a0[_0x5a14a0(0x160)]:{}};}catch(_0x25404a){if(_0x25404a[_0x5a14a0(0x155)]===_0x5a14a0(0x153))return null;throw new Error('Failed\x20to\x20read\x20page\x20lock\x20file:\x20'+String(_0x25404a));}}export async function writePageLockFile(_0x42a310,_0x8650ec){const _0x2b74ac=a167_0x44d9;await mkdir(dirname(_0x42a310),{'recursive':!![]}),await writeFile(_0x42a310,JSON[_0x2b74ac(0x157)](_0x8650ec,null,0x2),_0x2b74ac(0x163));}
@@ -1 +1 @@
1
- const a169_0x4caa2b=a169_0x5548;(function(_0x4a3ff3,_0x18dc03){const _0x1519ca=a169_0x5548,_0x56b01f=_0x4a3ff3();while(!![]){try{const _0x2600da=-parseInt(_0x1519ca(0x119))/0x1*(-parseInt(_0x1519ca(0x11f))/0x2)+-parseInt(_0x1519ca(0x117))/0x3+-parseInt(_0x1519ca(0x11d))/0x4*(-parseInt(_0x1519ca(0x113))/0x5)+parseInt(_0x1519ca(0x11b))/0x6*(parseInt(_0x1519ca(0x112))/0x7)+parseInt(_0x1519ca(0x116))/0x8*(-parseInt(_0x1519ca(0x11a))/0x9)+parseInt(_0x1519ca(0x118))/0xa+-parseInt(_0x1519ca(0x11c))/0xb*(parseInt(_0x1519ca(0x120))/0xc);if(_0x2600da===_0x18dc03)break;else _0x56b01f['push'](_0x56b01f['shift']());}catch(_0x242aa9){_0x56b01f['push'](_0x56b01f['shift']());}}}(a169_0x5dd3,0xe2b76));function a169_0x5dd3(){const _0x57d761=['3612999JWsiAS','4373560ZSXRVX','64433LmqeTZ','41751shXLhS','16098XKEEjA','22DkOXYy','188nkbIRk','.rabetbase','50mLUhpf','5993148OWWuOP','sql.lock.json','3976ImbXYU','15835rIPecT','/sql','sql-trash','1016YjUzbe'];a169_0x5dd3=function(){return _0x57d761;};return a169_0x5dd3();}import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a169_0x5548(_0x251b13,_0xeaf297){_0x251b13=_0x251b13-0x111;const _0x5dd3c7=a169_0x5dd3();let _0x5548d2=_0x5dd3c7[_0x251b13];return _0x5548d2;}const DOT_DIR=a169_0x4caa2b(0x11e),LOCK_FILE_NAME=a169_0x4caa2b(0x111),TRASH_DIR_NAME=a169_0x4caa2b(0x115);export function loadSqlProjectConfig(_0x3d979e,_0x111a93){const _0x1fa608=a169_0x4caa2b,_0x571d1c=resolve(_0x111a93??findProjectRootDirectory()),_0x4f6ab3=DOT_DIR+_0x1fa608(0x114),_0x1fa969=_0x4f6ab3+'/'+_0x3d979e;return{'projectRoot':_0x571d1c,'appCode':_0x3d979e,'sqlWorkspaceRoot':_0x4f6ab3,'sqlRoot':_0x1fa969,'sqlRootDir':resolve(_0x571d1c,DOT_DIR,'sql',_0x3d979e),'lockFilePath':resolve(_0x571d1c,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x571d1c,DOT_DIR,TRASH_DIR_NAME)};}
1
+ function a169_0x4ae4(_0x4a24cc,_0xf470d7){_0x4a24cc=_0x4a24cc-0x72;const _0x553e23=a169_0x553e();let _0x4ae455=_0x553e23[_0x4a24cc];return _0x4ae455;}const a169_0x59f5f0=a169_0x4ae4;(function(_0x5e8818,_0x365bb2){const _0x50f602=a169_0x4ae4,_0xf2abbd=_0x5e8818();while(!![]){try{const _0x3f69a1=parseInt(_0x50f602(0x7d))/0x1*(-parseInt(_0x50f602(0x72))/0x2)+parseInt(_0x50f602(0x75))/0x3*(-parseInt(_0x50f602(0x7b))/0x4)+parseInt(_0x50f602(0x7e))/0x5*(parseInt(_0x50f602(0x80))/0x6)+-parseInt(_0x50f602(0x78))/0x7*(-parseInt(_0x50f602(0x73))/0x8)+-parseInt(_0x50f602(0x74))/0x9+parseInt(_0x50f602(0x7c))/0xa*(-parseInt(_0x50f602(0x79))/0xb)+parseInt(_0x50f602(0x7a))/0xc*(parseInt(_0x50f602(0x7f))/0xd);if(_0x3f69a1===_0x365bb2)break;else _0xf2abbd['push'](_0xf2abbd['shift']());}catch(_0x58bf97){_0xf2abbd['push'](_0xf2abbd['shift']());}}}(a169_0x553e,0x31d79));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a169_0x59f5f0(0x77),LOCK_FILE_NAME=a169_0x59f5f0(0x76),TRASH_DIR_NAME='sql-trash';function a169_0x553e(){const _0x3e270=['8MHUHma','3350556VYwhcF','340938iRnCwH','sql.lock.json','.rabetbase','1257963pGESpA','165UtKTDV','12kGOwhq','4WxPlor','265340KIyrPA','1709OIHDjQ','403415MzwzQs','11590319tYsHbt','24cCsEQz','358NIuPUp'];a169_0x553e=function(){return _0x3e270;};return a169_0x553e();}export function loadSqlProjectConfig(_0x3f95e6,_0x479a39){const _0x28113b=resolve(_0x479a39??findProjectRootDirectory()),_0x1c1d9c=DOT_DIR+'/sql',_0x4133af=_0x1c1d9c+'/'+_0x3f95e6;return{'projectRoot':_0x28113b,'appCode':_0x3f95e6,'sqlWorkspaceRoot':_0x1c1d9c,'sqlRoot':_0x4133af,'sqlRootDir':resolve(_0x28113b,DOT_DIR,'sql',_0x3f95e6),'lockFilePath':resolve(_0x28113b,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x28113b,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- function a170_0x2c04(_0x50e327,_0x48a9d3){_0x50e327=_0x50e327-0x113;const _0x4dfb46=a170_0x4dfb();let _0x2c04be=_0x4dfb46[_0x50e327];return _0x2c04be;}(function(_0x2376c3,_0x8f0632){const _0x3d6f69=a170_0x2c04,_0x3348b6=_0x2376c3();while(!![]){try{const _0x1e9ae7=-parseInt(_0x3d6f69(0x11c))/0x1*(parseInt(_0x3d6f69(0x132))/0x2)+-parseInt(_0x3d6f69(0x121))/0x3+-parseInt(_0x3d6f69(0x11e))/0x4+parseInt(_0x3d6f69(0x127))/0x5*(parseInt(_0x3d6f69(0x12c))/0x6)+-parseInt(_0x3d6f69(0x129))/0x7+-parseInt(_0x3d6f69(0x119))/0x8+-parseInt(_0x3d6f69(0x117))/0x9*(-parseInt(_0x3d6f69(0x12e))/0xa);if(_0x1e9ae7===_0x8f0632)break;else _0x3348b6['push'](_0x3348b6['shift']());}catch(_0x45bdb0){_0x3348b6['push'](_0x3348b6['shift']());}}}(a170_0x4dfb,0xbf3f9));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x5bcb43){const _0x4e10d3=a170_0x2c04;if(_0x5bcb43===_0x4e10d3(0x123))return _0x4e10d3(0x113);if(_0x5bcb43===_0x4e10d3(0x115))return _0x4e10d3(0x12a);return undefined;}async function scanSqlFilesRecursively(_0x4744d5,_0x58c9d9){const _0x1245ca=a170_0x2c04,_0x2c09a1=[];try{const _0x1cb122=await readdir(_0x4744d5,{'withFileTypes':!![]});for(const _0x1a55c1 of _0x1cb122){const _0x263f8d=join(_0x4744d5,_0x1a55c1[_0x1245ca(0x130)]);if(_0x1a55c1[_0x1245ca(0x118)]()){_0x2c09a1[_0x1245ca(0x11f)](...await scanSqlFilesRecursively(_0x263f8d,_0x58c9d9));continue;}if(!_0x1a55c1['isFile']())continue;const _0xf122be=extname(_0x1a55c1['name'])[_0x1245ca(0x128)](),_0x5335fb=extensionToMode(_0xf122be);if(!_0x5335fb)continue;const _0x3c3790=relative(_0x58c9d9,_0x263f8d)[_0x1245ca(0x12f)](/\\/g,'/'),_0x4fbacc=_0x3c3790[_0x1245ca(0x133)]('/')[_0x1245ca(0x120)](Boolean),_0x41ace9=parseSqlPath(_0x4fbacc,_0x1a55c1[_0x1245ca(0x130)],_0xf122be);if(!_0x41ace9)continue;_0x2c09a1[_0x1245ca(0x11f)]({'sqlCode':_0x41ace9['sqlCode'],'sqlName':_0x41ace9['sqlName'],'dbDirectory':_0x4fbacc[0x0],'filePath':_0x263f8d,'relativePath':_0x3c3790,'lockKey':_0x41ace9['sqlCode'],'mode':_0x5335fb});}}catch(_0x67508){if(_0x67508[_0x1245ca(0x126)]!==_0x1245ca(0x131))throw _0x67508;}return _0x2c09a1;}export async function scanLocalSqlQueries(_0x5cf5ec){const _0x3e9a3b=a170_0x2c04;return scanSqlFilesRecursively(_0x5cf5ec[_0x3e9a3b(0x124)],_0x5cf5ec[_0x3e9a3b(0x124)]);}export function resolveLocalSqlFilePath(_0x1f39e6,_0x341a1c,_0x41d988){const _0x59c379=a170_0x2c04,_0x544cf0=_0x41d988?.[_0x59c379(0x12d)]||(_0x41d988?.[_0x59c379(0x116)]||_0x41d988?.['dbName']?buildSqlRelativePath(_0x341a1c,_0x41d988?.[_0x59c379(0x116)],_0x41d988?.[_0x59c379(0x11a)],_0x41d988?.[_0x59c379(0x11b)]||_0x59c379(0x113),_0x41d988?.[_0x59c379(0x114)]):buildDefaultSqlFileName(_0x341a1c,_0x41d988?.[_0x59c379(0x11b)]||_0x59c379(0x113)));return join(_0x1f39e6[_0x59c379(0x124)],_0x544cf0);}export async function directoryExists(_0x3f02f9){const _0x248d68=a170_0x2c04;try{const _0x174a1d=await stat(_0x3f02f9);return _0x174a1d[_0x248d68(0x118)]();}catch{return![];}}function a170_0x4dfb(){const _0x3a34b4=['ENOENT','2772466hVqTCH','split','sql','dbId','.xml','sqlName','39465mgpTzr','isDirectory','7746680AkFNOi','dbName','mode','1qGLKjv','slice','2712564vPHdZl','push','filter','1646685PfliXc','indexOf','.sql','sqlRootDir','test','code','320hmLLYL','toLowerCase','5649343ewEurJ','mybatisXml','length','21984lhoYKy','path','11260NJOFvh','replace','name'];a170_0x4dfb=function(){return _0x3a34b4;};return a170_0x4dfb();}function parseSqlPath(_0x40781e,_0x96d357,_0x231487){const _0x38506a=a170_0x2c04,_0x337bcd=_0x96d357[_0x38506a(0x11d)](0x0,-_0x231487['length']);if(_0x40781e['length']<0x2)return null;const _0x264a72=_0x337bcd[_0x38506a(0x122)]('_');if(_0x264a72<=0x0||_0x264a72>=_0x337bcd[_0x38506a(0x12b)]-0x1)return null;const _0x444140=_0x337bcd[_0x38506a(0x11d)](0x0,_0x264a72);if(!isLikelySqlCode(_0x444140))return null;return{'sqlCode':_0x444140,'sqlName':_0x337bcd[_0x38506a(0x11d)](_0x264a72+0x1)};}function isLikelySqlCode(_0x48a918){const _0x40bb5e=a170_0x2c04;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x40bb5e(0x125)](_0x48a918);}
1
+ (function(_0x1cb547,_0x25329c){const _0x434f72=a170_0x46e1,_0x444a8c=_0x1cb547();while(!![]){try{const _0x2718a3=-parseInt(_0x434f72(0xd2))/0x1+parseInt(_0x434f72(0xd3))/0x2*(-parseInt(_0x434f72(0xd7))/0x3)+parseInt(_0x434f72(0xcd))/0x4*(-parseInt(_0x434f72(0xde))/0x5)+parseInt(_0x434f72(0xda))/0x6+-parseInt(_0x434f72(0xce))/0x7*(-parseInt(_0x434f72(0xdd))/0x8)+parseInt(_0x434f72(0xdc))/0x9*(parseInt(_0x434f72(0xca))/0xa)+parseInt(_0x434f72(0xd5))/0xb*(parseInt(_0x434f72(0xcf))/0xc);if(_0x2718a3===_0x25329c)break;else _0x444a8c['push'](_0x444a8c['shift']());}catch(_0x258e44){_0x444a8c['push'](_0x444a8c['shift']());}}}(a170_0x5076,0xc7852));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x5cec6f){const _0x4d4023=a170_0x46e1;if(_0x5cec6f==='.sql')return'sql';if(_0x5cec6f===_0x4d4023(0xc8))return _0x4d4023(0xe4);return undefined;}async function scanSqlFilesRecursively(_0x4fcdd2,_0x3a7386){const _0x1d6921=a170_0x46e1,_0x2cd31d=[];try{const _0x260691=await readdir(_0x4fcdd2,{'withFileTypes':!![]});for(const _0x3a7056 of _0x260691){const _0x3d8371=join(_0x4fcdd2,_0x3a7056[_0x1d6921(0xd6)]);if(_0x3a7056[_0x1d6921(0xe7)]()){_0x2cd31d[_0x1d6921(0xc9)](...await scanSqlFilesRecursively(_0x3d8371,_0x3a7386));continue;}if(!_0x3a7056[_0x1d6921(0xe1)]())continue;const _0x240275=extname(_0x3a7056['name'])[_0x1d6921(0xdb)](),_0x28d3b3=extensionToMode(_0x240275);if(!_0x28d3b3)continue;const _0x598e39=relative(_0x3a7386,_0x3d8371)['replace'](/\\/g,'/'),_0x4ae6bd=_0x598e39[_0x1d6921(0xcc)]('/')['filter'](Boolean),_0x17f087=parseSqlPath(_0x4ae6bd,_0x3a7056['name'],_0x240275);if(!_0x17f087)continue;_0x2cd31d[_0x1d6921(0xc9)]({'sqlCode':_0x17f087[_0x1d6921(0xd1)],'sqlName':_0x17f087[_0x1d6921(0xd8)],'dbDirectory':_0x4ae6bd[0x0],'filePath':_0x3d8371,'relativePath':_0x598e39,'lockKey':_0x17f087['sqlCode'],'mode':_0x28d3b3});}}catch(_0x3c2b3a){if(_0x3c2b3a[_0x1d6921(0xd0)]!==_0x1d6921(0xdf))throw _0x3c2b3a;}return _0x2cd31d;}export async function scanLocalSqlQueries(_0x194cd6){const _0x194b9c=a170_0x46e1;return scanSqlFilesRecursively(_0x194cd6['sqlRootDir'],_0x194cd6[_0x194b9c(0xe2)]);}export function resolveLocalSqlFilePath(_0x3165fc,_0x23ac5a,_0x3770a9){const _0x376440=a170_0x46e1,_0x4117b3=_0x3770a9?.[_0x376440(0xe5)]||(_0x3770a9?.[_0x376440(0xd8)]||_0x3770a9?.[_0x376440(0xcb)]?buildSqlRelativePath(_0x23ac5a,_0x3770a9?.[_0x376440(0xd8)],_0x3770a9?.['dbName'],_0x3770a9?.['mode']||_0x376440(0xe3),_0x3770a9?.[_0x376440(0xe0)]):buildDefaultSqlFileName(_0x23ac5a,_0x3770a9?.['mode']||_0x376440(0xe3)));return join(_0x3165fc['sqlRootDir'],_0x4117b3);}export async function directoryExists(_0x88d8f){try{const _0x42bb91=await stat(_0x88d8f);return _0x42bb91['isDirectory']();}catch{return![];}}function parseSqlPath(_0x110278,_0xf6b1c1,_0x563763){const _0x3f2902=a170_0x46e1,_0x177d23=_0xf6b1c1[_0x3f2902(0xe6)](0x0,-_0x563763[_0x3f2902(0xd9)]);if(_0x110278[_0x3f2902(0xd9)]<0x2)return null;const _0x332eff=_0x177d23['indexOf']('_');if(_0x332eff<=0x0||_0x332eff>=_0x177d23[_0x3f2902(0xd9)]-0x1)return null;const _0x3ca593=_0x177d23[_0x3f2902(0xe6)](0x0,_0x332eff);if(!isLikelySqlCode(_0x3ca593))return null;return{'sqlCode':_0x3ca593,'sqlName':_0x177d23['slice'](_0x332eff+0x1)};}function a170_0x5076(){const _0x19a282=['test','15683173yxsomh','name','1546422NrfBUn','sqlName','length','4006626szmkUI','toLowerCase','711uYOUFD','6955144wlhYjy','50ZDPdWT','ENOENT','dbId','isFile','sqlRootDir','sql','mybatisXml','path','slice','isDirectory','.xml','push','89010kfEgmx','dbName','split','409544SYUFfX','7uIgysq','12ietKLM','code','sqlCode','1309518IfBubM','2DgPNib'];a170_0x5076=function(){return _0x19a282;};return a170_0x5076();}function a170_0x46e1(_0x5d6c85,_0x5a701e){_0x5d6c85=_0x5d6c85-0xc8;const _0x50765d=a170_0x5076();let _0x46e13e=_0x50765d[_0x5d6c85];return _0x46e13e;}function isLikelySqlCode(_0xb7d4d6){const _0xf61c8e=a170_0x46e1;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0xf61c8e(0xd4)](_0xb7d4d6);}
@@ -1 +1 @@
1
- function a171_0x15de(_0x304d7c,_0x3c12ee){_0x304d7c=_0x304d7c-0x17b;const _0xc72a5f=a171_0xc72a();let _0x15dec7=_0xc72a5f[_0x304d7c];return _0x15dec7;}(function(_0x103e65,_0xc6e265){const _0x4209cd=a171_0x15de,_0x3631d0=_0x103e65();while(!![]){try{const _0x137e80=parseInt(_0x4209cd(0x181))/0x1+-parseInt(_0x4209cd(0x188))/0x2+-parseInt(_0x4209cd(0x187))/0x3*(parseInt(_0x4209cd(0x180))/0x4)+parseInt(_0x4209cd(0x17d))/0x5+-parseInt(_0x4209cd(0x184))/0x6*(parseInt(_0x4209cd(0x17e))/0x7)+-parseInt(_0x4209cd(0x183))/0x8*(-parseInt(_0x4209cd(0x182))/0x9)+parseInt(_0x4209cd(0x17c))/0xa;if(_0x137e80===_0xc6e265)break;else _0x3631d0['push'](_0x3631d0['shift']());}catch(_0x38f287){_0x3631d0['push'](_0x3631d0['shift']());}}}(a171_0xc72a,0xbe2a2));import{readFile}from'node:fs/promises';import a171_0x9ed2bc from'node:crypto';export function computeSqlContentHash(_0x40f2ec){const _0x490a63=a171_0x15de;return a171_0x9ed2bc[_0x490a63(0x17f)](_0x490a63(0x17b))[_0x490a63(0x186)](_0x40f2ec)[_0x490a63(0x185)]('hex');}function a171_0xc72a(){const _0x508616=['createHash','5108qUfuSN','557260ZjrWaL','2529VyiODN','14792nJRBSA','684gIdMDY','digest','update','573MErOrj','1428814OeRSkK','md5','7641750Swiugo','3101760bDZaNq','44464KjmYPB'];a171_0xc72a=function(){return _0x508616;};return a171_0xc72a();}export async function computeSqlFileHash(_0x37d5d2){const _0x3a567b=await readFile(_0x37d5d2,'utf8');return computeSqlContentHash(_0x3a567b);}
1
+ function a171_0x33e7(_0x551590,_0x1467d){_0x551590=_0x551590-0x154;const _0x39a048=a171_0x39a0();let _0x33e77d=_0x39a048[_0x551590];return _0x33e77d;}(function(_0x6570be,_0x102ca0){const _0x35406b=a171_0x33e7,_0x35c2ab=_0x6570be();while(!![]){try{const _0x53e053=parseInt(_0x35406b(0x158))/0x1*(-parseInt(_0x35406b(0x157))/0x2)+-parseInt(_0x35406b(0x155))/0x3+parseInt(_0x35406b(0x156))/0x4*(parseInt(_0x35406b(0x15e))/0x5)+parseInt(_0x35406b(0x15d))/0x6+-parseInt(_0x35406b(0x154))/0x7+parseInt(_0x35406b(0x159))/0x8+parseInt(_0x35406b(0x15b))/0x9;if(_0x53e053===_0x102ca0)break;else _0x35c2ab['push'](_0x35c2ab['shift']());}catch(_0x354075){_0x35c2ab['push'](_0x35c2ab['shift']());}}}(a171_0x39a0,0x8d581));import{readFile}from'node:fs/promises';import a171_0x45cd36 from'node:crypto';export function computeSqlContentHash(_0x52df03){const _0x3f9472=a171_0x33e7;return a171_0x45cd36[_0x3f9472(0x160)](_0x3f9472(0x15a))['update'](_0x52df03)['digest'](_0x3f9472(0x15f));}export async function computeSqlFileHash(_0x169667){const _0x5ada20=a171_0x33e7,_0x161194=await readFile(_0x169667,_0x5ada20(0x15c));return computeSqlContentHash(_0x161194);}function a171_0x39a0(){const _0x447879=['39XlBWSl','4329984MsMjnQ','md5','4401126NxGUbi','utf8','1363668Mazmpd','4624555tYRSnH','hex','createHash','1410682yYolys','3353127TRIuEI','4fIhPQv','14578HCGqOT'];a171_0x39a0=function(){return _0x447879;};return a171_0x39a0();}
@@ -1 +1 @@
1
- (function(_0x29bba4,_0x34b5bc){const _0x3a4c8c=a172_0x1688,_0x2f0922=_0x29bba4();while(!![]){try{const _0x1a765b=parseInt(_0x3a4c8c(0x176))/0x1*(-parseInt(_0x3a4c8c(0x186))/0x2)+-parseInt(_0x3a4c8c(0x178))/0x3*(parseInt(_0x3a4c8c(0x18a))/0x4)+parseInt(_0x3a4c8c(0x185))/0x5+-parseInt(_0x3a4c8c(0x17f))/0x6*(-parseInt(_0x3a4c8c(0x177))/0x7)+-parseInt(_0x3a4c8c(0x184))/0x8*(-parseInt(_0x3a4c8c(0x189))/0x9)+-parseInt(_0x3a4c8c(0x187))/0xa+-parseInt(_0x3a4c8c(0x182))/0xb*(-parseInt(_0x3a4c8c(0x17d))/0xc);if(_0x1a765b===_0x34b5bc)break;else _0x2f0922['push'](_0x2f0922['shift']());}catch(_0x356835){_0x2f0922['push'](_0x2f0922['shift']());}}}(a172_0x49e9,0x4ec07));function a172_0x1688(_0x3d0b81,_0x18ad9c){_0x3d0b81=_0x3d0b81-0x176;const _0x49e9bb=a172_0x49e9();let _0x168877=_0x49e9bb[_0x3d0b81];return _0x168877;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}function a172_0x49e9(){const _0x2305ed=['6148aZNKcX','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','\x22.\x20','parse','lastSync','97288TBPpcu','7stIOzV','438FdSIRh','utf8','stringify',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','ENOENT','12HivIJz','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','407346BQXPeS','apps','sqlRoot','4851363WbYEYL','sqls','5968FxZTwO','1282880YsrjcI','4WQTdqU','276850wjOWZe','\x22\x20vs\x20lock\x20\x22','45LtUBbl'];a172_0x49e9=function(){return _0x2305ed;};return a172_0x49e9();}export function ensureSqlLockScope(_0x4e6f83,_0x56420f,_0x369b05,_0x26378d){const _0xc2cacc=a172_0x1688,_0x3ead42=_0x4e6f83??createEmptySqlLock();let _0x14da3d=_0x3ead42[_0xc2cacc(0x180)][_0x56420f];if(!_0x14da3d)return _0x14da3d={'sqlRoot':_0x369b05,'lastSync':'','sqls':{}},_0x3ead42[_0xc2cacc(0x180)][_0x56420f]=_0x14da3d,{'lockData':_0x3ead42,'appLock':_0x14da3d};if(!_0x14da3d['sqlRoot'])_0x14da3d[_0xc2cacc(0x181)]=_0x369b05;else{if(_0x14da3d[_0xc2cacc(0x181)]!==_0x369b05)throw new Error(_0x26378d+_0xc2cacc(0x17b)+_0x369b05+_0xc2cacc(0x188)+_0x14da3d['sqlRoot']+_0xc2cacc(0x18c)+_0xc2cacc(0x18b));}return!_0x14da3d[_0xc2cacc(0x183)]&&(_0x14da3d[_0xc2cacc(0x183)]={}),!_0x14da3d['lastSync']&&(_0x14da3d[_0xc2cacc(0x18e)]=''),{'lockData':_0x3ead42,'appLock':_0x14da3d};}export async function readSqlLockFile(_0x3fc6b6){const _0x744f92=a172_0x1688;try{const _0x5b8e42=await readFile(_0x3fc6b6,'utf8');return JSON[_0x744f92(0x18d)](_0x5b8e42);}catch(_0x55d5f9){if(_0x55d5f9['code']===_0x744f92(0x17c))return null;throw new Error(_0x744f92(0x17e)+String(_0x55d5f9));}}export async function writeSqlLockFile(_0x134a80,_0x1eea53){const _0x530f78=a172_0x1688;await mkdir(dirname(_0x134a80),{'recursive':!![]}),await writeFile(_0x134a80,JSON[_0x530f78(0x17a)](_0x1eea53,null,0x2),_0x530f78(0x179));}
1
+ (function(_0x590152,_0x5dd087){const _0x4d347f=a172_0x4c14,_0x1e8c94=_0x590152();while(!![]){try{const _0x3f06d4=-parseInt(_0x4d347f(0x15e))/0x1*(parseInt(_0x4d347f(0x152))/0x2)+-parseInt(_0x4d347f(0x14e))/0x3*(-parseInt(_0x4d347f(0x15c))/0x4)+parseInt(_0x4d347f(0x161))/0x5*(-parseInt(_0x4d347f(0x166))/0x6)+-parseInt(_0x4d347f(0x154))/0x7*(parseInt(_0x4d347f(0x15d))/0x8)+parseInt(_0x4d347f(0x150))/0x9+-parseInt(_0x4d347f(0x15f))/0xa+-parseInt(_0x4d347f(0x15b))/0xb*(-parseInt(_0x4d347f(0x14f))/0xc);if(_0x3f06d4===_0x5dd087)break;else _0x1e8c94['push'](_0x1e8c94['shift']());}catch(_0xb177c){_0x1e8c94['push'](_0x1e8c94['shift']());}}}(a172_0x43b7,0xd9ffd));function a172_0x4c14(_0x444daa,_0x1ca6e6){_0x444daa=_0x444daa-0x14e;const _0x43b76d=a172_0x43b7();let _0x4c144f=_0x43b76d[_0x444daa];return _0x4c144f;}function a172_0x43b7(){const _0x13bd55=['63722amhLlw','sqls','1447061avLeUr','stringify','utf8','\x22\x20vs\x20lock\x20\x22','apps','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','ENOENT','22kwuXrg','88pwGsEl','40wjTuZF','29QXrhZg','9090520FvLQoZ','code','5eiLMiu','sqlRoot','parse','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','lastSync','7555182gkviwc','33213LRuMxq','22216296aeDdcL','9652320qXsbsR','\x22.\x20'];a172_0x43b7=function(){return _0x13bd55;};return a172_0x43b7();}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x15fda4,_0x43bf9a,_0x3bf318,_0x404483){const _0x347e3c=a172_0x4c14,_0x3efec2=_0x15fda4??createEmptySqlLock();let _0x5a9a08=_0x3efec2[_0x347e3c(0x158)][_0x43bf9a];if(!_0x5a9a08)return _0x5a9a08={'sqlRoot':_0x3bf318,'lastSync':'','sqls':{}},_0x3efec2['apps'][_0x43bf9a]=_0x5a9a08,{'lockData':_0x3efec2,'appLock':_0x5a9a08};if(!_0x5a9a08[_0x347e3c(0x162)])_0x5a9a08['sqlRoot']=_0x3bf318;else{if(_0x5a9a08['sqlRoot']!==_0x3bf318)throw new Error(_0x404483+':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22'+_0x3bf318+_0x347e3c(0x157)+_0x5a9a08[_0x347e3c(0x162)]+_0x347e3c(0x151)+_0x347e3c(0x159));}return!_0x5a9a08[_0x347e3c(0x153)]&&(_0x5a9a08[_0x347e3c(0x153)]={}),!_0x5a9a08[_0x347e3c(0x165)]&&(_0x5a9a08['lastSync']=''),{'lockData':_0x3efec2,'appLock':_0x5a9a08};}export async function readSqlLockFile(_0x41bfc8){const _0x131d27=a172_0x4c14;try{const _0x3758dd=await readFile(_0x41bfc8,_0x131d27(0x156));return JSON[_0x131d27(0x163)](_0x3758dd);}catch(_0x27d3c8){if(_0x27d3c8[_0x131d27(0x160)]===_0x131d27(0x15a))return null;throw new Error(_0x131d27(0x164)+String(_0x27d3c8));}}export async function writeSqlLockFile(_0x2b7662,_0xb8f834){const _0x1b114d=a172_0x4c14;await mkdir(dirname(_0x2b7662),{'recursive':!![]}),await writeFile(_0x2b7662,JSON[_0x1b114d(0x155)](_0xb8f834,null,0x2),_0x1b114d(0x156));}
@@ -1 +1 @@
1
- (function(_0x5b9dac,_0x50cbfd){const _0x24067f=a174_0x2027,_0x148b65=_0x5b9dac();while(!![]){try{const _0x552ee9=parseInt(_0x24067f(0x84))/0x1*(-parseInt(_0x24067f(0x88))/0x2)+-parseInt(_0x24067f(0x95))/0x3*(parseInt(_0x24067f(0x87))/0x4)+-parseInt(_0x24067f(0x8d))/0x5+-parseInt(_0x24067f(0x85))/0x6+-parseInt(_0x24067f(0x8e))/0x7*(-parseInt(_0x24067f(0x83))/0x8)+-parseInt(_0x24067f(0x86))/0x9+parseInt(_0x24067f(0x8f))/0xa*(parseInt(_0x24067f(0x94))/0xb);if(_0x552ee9===_0x50cbfd)break;else _0x148b65['push'](_0x148b65['shift']());}catch(_0x49b18a){_0x148b65['push'](_0x148b65['shift']());}}}(a174_0x4b27,0x859ea));export function detectSqlMode(_0x13cf0a){const _0x14f233=a174_0x2027,_0x395801=_0x13cf0a[_0x14f233(0x89)]();if(/^<(select|insert|update|delete)\b/i[_0x14f233(0x97)](_0x395801))return _0x14f233(0x8a);return'sql';}export function getSqlFileExtension(_0xad6d3f){const _0x2d16c9=a174_0x2027;return _0xad6d3f===_0x2d16c9(0x8a)?_0x2d16c9(0x8b):_0x2d16c9(0x96);}function a174_0x4b27(){const _0x1542b9=['7CrWqmP','1684914hIAdUS','351081saaBOy','1684YdHUKo','112068trVnmy','trimStart','mybatisXml','.xml','replace','4207510vPSwpj','20433mFykPM','22396190dIGRer','trim','db-','unknown-db','unknown-sql','11TsueTi','6168XBBhXw','.sql','test','1992FyuuLH'];a174_0x4b27=function(){return _0x1542b9;};return a174_0x4b27();}export function buildDefaultSqlFileName(_0x398b97,_0x23a15c){return''+_0x398b97+getSqlFileExtension(_0x23a15c);}export function sanitizeSqlPathSegment(_0x4dfc94,_0x1eb986){const _0x2ed23d=a174_0x2027,_0x13b36c=String(_0x4dfc94??'')[_0x2ed23d(0x90)](),_0x34ed4a=_0x13b36c[_0x2ed23d(0x8c)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x2ed23d(0x8c)](/\s+/g,'-')[_0x2ed23d(0x8c)](/-+/g,'-')[_0x2ed23d(0x8c)](/^\.+/,'')[_0x2ed23d(0x8c)](/\.+$/,'')['replace'](/^-+/,'')[_0x2ed23d(0x8c)](/-+$/,'');return _0x34ed4a||_0x1eb986;}export function buildDbDirectoryName(_0x16d505,_0x5cdc14){const _0x2e1695=a174_0x2027;return sanitizeSqlPathSegment(_0x16d505,_0x5cdc14!=null?_0x2e1695(0x91)+_0x5cdc14:_0x2e1695(0x92));}function a174_0x2027(_0x2b717e,_0x7ce48f){_0x2b717e=_0x2b717e-0x83;const _0x4b273f=a174_0x4b27();let _0x202789=_0x4b273f[_0x2b717e];return _0x202789;}export function buildSqlRelativePath(_0x44d635,_0x387a99,_0x20d432,_0x49cd37,_0x33cc22){const _0x559ba3=a174_0x2027,_0x3b00c0=buildDbDirectoryName(_0x20d432,_0x33cc22),_0x228a16=sanitizeSqlPathSegment(_0x44d635,_0x559ba3(0x93)),_0x33a3b9=sanitizeSqlPathSegment(_0x387a99,_0x228a16);return _0x3b00c0+'/'+_0x228a16+'_'+_0x33a3b9+getSqlFileExtension(_0x49cd37);}
1
+ (function(_0x339a9c,_0x320f7b){const _0x393a1c=a174_0x1c16,_0x2d12ca=_0x339a9c();while(!![]){try{const _0x27e798=parseInt(_0x393a1c(0x92))/0x1*(parseInt(_0x393a1c(0x8c))/0x2)+parseInt(_0x393a1c(0x8a))/0x3+parseInt(_0x393a1c(0x82))/0x4+parseInt(_0x393a1c(0x8e))/0x5*(-parseInt(_0x393a1c(0x8f))/0x6)+-parseInt(_0x393a1c(0x90))/0x7+parseInt(_0x393a1c(0x94))/0x8+parseInt(_0x393a1c(0x8b))/0x9*(-parseInt(_0x393a1c(0x84))/0xa);if(_0x27e798===_0x320f7b)break;else _0x2d12ca['push'](_0x2d12ca['shift']());}catch(_0x1736a6){_0x2d12ca['push'](_0x2d12ca['shift']());}}}(a174_0x4394,0x6e7bb));export function detectSqlMode(_0x2e9a8a){const _0x34acd2=a174_0x1c16,_0x176e2c=_0x2e9a8a[_0x34acd2(0x93)]();if(/^<(select|insert|update|delete)\b/i[_0x34acd2(0x87)](_0x176e2c))return _0x34acd2(0x8d);return _0x34acd2(0x91);}export function getSqlFileExtension(_0x2599a2){const _0x5d77d3=a174_0x1c16;return _0x2599a2===_0x5d77d3(0x8d)?'.xml':_0x5d77d3(0x86);}export function buildDefaultSqlFileName(_0x4c0b40,_0x52000b){return''+_0x4c0b40+getSqlFileExtension(_0x52000b);}function a174_0x1c16(_0x125069,_0x54e875){_0x125069=_0x125069-0x81;const _0x4394ee=a174_0x4394();let _0x1c1643=_0x4394ee[_0x125069];return _0x1c1643;}export function sanitizeSqlPathSegment(_0x3420a1,_0x1c5caa){const _0x44550a=a174_0x1c16,_0x5170cd=String(_0x3420a1??'')[_0x44550a(0x85)](),_0x2de508=_0x5170cd[_0x44550a(0x83)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x44550a(0x83)](/\s+/g,'-')[_0x44550a(0x83)](/-+/g,'-')[_0x44550a(0x83)](/^\.+/,'')[_0x44550a(0x83)](/\.+$/,'')['replace'](/^-+/,'')[_0x44550a(0x83)](/-+$/,'');return _0x2de508||_0x1c5caa;}export function buildDbDirectoryName(_0x1cc3ea,_0x2b91d9){const _0x507068=a174_0x1c16;return sanitizeSqlPathSegment(_0x1cc3ea,_0x2b91d9!=null?_0x507068(0x89)+_0x2b91d9:_0x507068(0x88));}export function buildSqlRelativePath(_0x2435c7,_0x3e40ef,_0x4aaf7d,_0x2158cb,_0x82e287){const _0x226827=a174_0x1c16,_0x172c07=buildDbDirectoryName(_0x4aaf7d,_0x82e287),_0x4b8547=sanitizeSqlPathSegment(_0x2435c7,_0x226827(0x81)),_0xaa0321=sanitizeSqlPathSegment(_0x3e40ef,_0x4b8547);return _0x172c07+'/'+_0x4b8547+'_'+_0xaa0321+getSqlFileExtension(_0x2158cb);}function a174_0x4394(){const _0x197f9d=['923144iXLkwY','replace','1669490sJfwZA','trim','.sql','test','unknown-db','db-','1007799resfjh','9aDHACa','247334yAHRql','mybatisXml','2103425NHjPqP','6RCaDAW','4539976iqwIvk','sql','2LUAech','trimStart','6997504aldHAi','unknown-sql'];a174_0x4394=function(){return _0x197f9d;};return a174_0x4394();}