@lovrabet/rabetbase-cli 2.5.8-beta.1 → 2.5.8-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -2
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.d.ts +19 -0
- package/lib/core/kb-management-client.js +1 -0
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-kb.md +7 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a303_0x334ab3=a303_0x134b;(function(_0x3fa282,_0x566c62){const _0x57b5a3=a303_0x134b,_0x353aaf=_0x3fa282();while(!![]){try{const _0x3744aa=parseInt(_0x57b5a3(0x160))/0x1+parseInt(_0x57b5a3(0x168))/0x2+parseInt(_0x57b5a3(0x16d))/0x3*(parseInt(_0x57b5a3(0x16c))/0x4)+-parseInt(_0x57b5a3(0x171))/0x5*(-parseInt(_0x57b5a3(0x16b))/0x6)+parseInt(_0x57b5a3(0x169))/0x7+-parseInt(_0x57b5a3(0x162))/0x8+-parseInt(_0x57b5a3(0x15f))/0x9;if(_0x3744aa===_0x566c62)break;else _0x353aaf['push'](_0x353aaf['shift']());}catch(_0x4d3d15){_0x353aaf['push'](_0x353aaf['shift']());}}}(a303_0x2997,0xc5345));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x344dab,_0x48c156=process[a303_0x334ab3(0x175)]()){const _0x4b135d=a303_0x334ab3,_0x3944ad=resolve(_0x48c156),_0x4d2936=join(_0x3944ad,_0x4b135d(0x173),_0x4b135d(0x163));return{'projectRoot':_0x3944ad,'pagesBaseDir':_0x4d2936,'appPagesDir':join(_0x4d2936,_0x344dab),'lockFilePath':join(_0x3944ad,_0x4b135d(0x173),'page.lock.json')};}function a303_0x134b(_0xe66d7b,_0x1eb262){_0xe66d7b=_0xe66d7b-0x15f;const _0x2997de=a303_0x2997();let _0x134b7a=_0x2997de[_0xe66d7b];return _0x134b7a;}export function buildPageFileName(_0x631b45,_0x263e45){const _0x65ca53=a303_0x334ab3;return _0x631b45+'-'+_0x263e45['toUpperCase']()+_0x65ca53(0x164);}export function resolvePageFilePath(_0x1c99de,_0x4c19c2,_0xbeb14){return join(_0x1c99de['appPagesDir'],buildPageFileName(_0x4c19c2,_0xbeb14));}export async function ensureParentDirectory(_0xe35286){await mkdir(dirname(_0xe35286),{'recursive':!![]});}function a303_0x2997(){const _0x51954e=['utf8','Page\x20directory\x20not\x20found:\x20','split','page-dir','Unsupported\x20file\x20in\x20page\x20directory:\x20','13858101herwWM','47424JcdSDE','F_OK','3014432zhgqTv','page','.json','localeCompare','join','isDirectory','3185456AFrUgf','4789218tUjdIv','isFile','69786XlHSOo','12140DUKtHY','39XoeRij','trim','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','name','155Qcamvv','sort','.rabetbase','validation','cwd'];a303_0x2997=function(){return _0x51954e;};return a303_0x2997();}export async function fileExists(_0x4bc969){const _0x583e38=a303_0x334ab3;try{return await access(_0x4bc969,constants[_0x583e38(0x161)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x1bfb4b){const _0x5263af=a303_0x334ab3,_0x53daf1=_0x1bfb4b[_0x5263af(0x16e)]();if(!_0x53daf1)throw CliErrors['flagMissing'](_0x5263af(0x179));const _0x338a2d=resolve(_0x53daf1);let _0x44f082;try{_0x44f082=await lstat(_0x338a2d);}catch{throw CliErrors[_0x5263af(0x174)](_0x5263af(0x177)+_0x53daf1);}if(!_0x44f082[_0x5263af(0x167)]())throw CliErrors['validation'](_0x5263af(0x16f)+_0x53daf1);const _0x2a1ecf={};return await readDirectory(_0x338a2d,_0x338a2d,_0x2a1ecf),_0x2a1ecf;}async function readDirectory(_0x416c74,_0x4da1b7,_0x484cd6){const _0x3716a7=a303_0x334ab3,_0x565ffb=await readdir(_0x4da1b7,{'withFileTypes':!![]});for(const _0xa2c97b of _0x565ffb[_0x3716a7(0x172)]((_0x47e35e,_0x5ccbd4)=>_0x47e35e['name'][_0x3716a7(0x165)](_0x5ccbd4['name']))){const _0x5cd1e7=join(_0x4da1b7,_0xa2c97b[_0x3716a7(0x170)]);if(_0xa2c97b[_0x3716a7(0x167)]()){await readDirectory(_0x416c74,_0x5cd1e7,_0x484cd6);continue;}if(!_0xa2c97b[_0x3716a7(0x16a)]())throw CliErrors[_0x3716a7(0x174)](_0x3716a7(0x17a)+_0x5cd1e7);_0x484cd6[relative(_0x416c74,_0x5cd1e7)[_0x3716a7(0x178)](sep)[_0x3716a7(0x166)]('/')]=await readFile(_0x5cd1e7,_0x3716a7(0x176));}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28b572,_0x57b614){const _0x3fc48f=a304_0x32dd,_0x4d4407=_0x28b572();while(!![]){try{const _0x19d389=parseInt(_0x3fc48f(0x19e))/0x1*(parseInt(_0x3fc48f(0x1a5))/0x2)+parseInt(_0x3fc48f(0x1ae))/0x3*(parseInt(_0x3fc48f(0x1b0))/0x4)+parseInt(_0x3fc48f(0x1ab))/0x5*(parseInt(_0x3fc48f(0x1a8))/0x6)+parseInt(_0x3fc48f(0x19f))/0x7*(-parseInt(_0x3fc48f(0x1a3))/0x8)+-parseInt(_0x3fc48f(0x1a7))/0x9*(-parseInt(_0x3fc48f(0x1aa))/0xa)+-parseInt(_0x3fc48f(0x1a6))/0xb+parseInt(_0x3fc48f(0x1b2))/0xc*(-parseInt(_0x3fc48f(0x1a9))/0xd);if(_0x19d389===_0x57b614)break;else _0x4d4407['push'](_0x4d4407['shift']());}catch(_0x3fac6e){_0x4d4407['push'](_0x4d4407['shift']());}}}(a304_0x49ea,0xa5e90));function a304_0x49ea(){const _0x4db186=['hex','139248aORqjC','stringify','76198AMLIdn','6664383ERYQIM','2421HIXGkx','1176948MdzoIe','26LBsSMo','21230sAnxiV','20WubMUv','md5','parse','1401FQrGVC','utf8','2332uwSFAq','update','4716012vxVRzE','29kogYDF','266kmaiAp','digest','createHash'];a304_0x49ea=function(){return _0x4db186;};return a304_0x49ea();}import a304_0x471afc from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0xcba043){const _0x518936=a304_0x32dd;return JSON[_0x518936(0x1a4)](JSON[_0x518936(0x1ad)](_0xcba043),null,0x2)+'\x0a';}export function computePageContentHash(_0x4c548d){const _0x2c6090=a304_0x32dd;return a304_0x471afc[_0x2c6090(0x1a1)](_0x2c6090(0x1ac))[_0x2c6090(0x1b1)](_0x4c548d)[_0x2c6090(0x1a0)](_0x2c6090(0x1a2));}export function computeSerializedSchemaHash(_0x33827b){return computePageContentHash(serializePageSchemaForFile(_0x33827b));}function a304_0x32dd(_0x567639,_0x1da633){_0x567639=_0x567639-0x19e;const _0x49ea9d=a304_0x49ea();let _0x32dd18=_0x49ea9d[_0x567639];return _0x32dd18;}export async function computePageFileHash(_0x33bba9){const _0x332b38=a304_0x32dd,_0x5de0d7=await readFile(_0x33bba9,_0x332b38(0x1af));return computePageContentHash(_0x5de0d7);}
|
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48c6e4,_0x2c99d9){const _0x22f161=a305_0x567d,_0x7a1617=_0x48c6e4();while(!![]){try{const _0x58cd6c=-parseInt(_0x22f161(0x134))/0x1+-parseInt(_0x22f161(0x139))/0x2+-parseInt(_0x22f161(0x12f))/0x3+parseInt(_0x22f161(0x130))/0x4*(parseInt(_0x22f161(0x133))/0x5)+-parseInt(_0x22f161(0x138))/0x6+-parseInt(_0x22f161(0x12d))/0x7+parseInt(_0x22f161(0x137))/0x8;if(_0x58cd6c===_0x2c99d9)break;else _0x7a1617['push'](_0x7a1617['shift']());}catch(_0x348272){_0x7a1617['push'](_0x7a1617['shift']());}}}(a305_0x2772,0xdcc93));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x2dc8f3,_0x416cab){const _0x5d5fa0=a305_0x567d,_0x57173c={'apps':_0x2dc8f3[_0x5d5fa0(0x136)]&&typeof _0x2dc8f3[_0x5d5fa0(0x136)]===_0x5d5fa0(0x12c)?_0x2dc8f3[_0x5d5fa0(0x136)]:{}};let _0x44bc11=_0x57173c[_0x5d5fa0(0x136)][_0x416cab];if(!_0x44bc11)return _0x44bc11={'lastSync':'','pages':{}},_0x57173c[_0x5d5fa0(0x136)][_0x416cab]=_0x44bc11,{'lockData':_0x57173c,'appLock':_0x44bc11};return!_0x44bc11[_0x5d5fa0(0x12b)]&&(_0x44bc11[_0x5d5fa0(0x12b)]=''),(!_0x44bc11[_0x5d5fa0(0x131)]||typeof _0x44bc11['pages']!=='object')&&(_0x44bc11[_0x5d5fa0(0x131)]={}),{'lockData':_0x57173c,'appLock':_0x44bc11};}function a305_0x2772(){const _0xf9954=['utf8','319235zgHRSj','1274462mAKYZd','stringify','apps','46409832brWsDT','7782720ZeYrYH','2611834EZPQpk','code','lastSync','object','4033134dbbqGU','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','3245097cXbTLp','40MBEzYi','pages'];a305_0x2772=function(){return _0xf9954;};return a305_0x2772();}export async function readPageLockFile(_0x23f680){const _0x137b88=a305_0x567d;try{const _0x3f70c3=await readFile(_0x23f680,_0x137b88(0x132)),_0x81143b=JSON['parse'](_0x3f70c3);return{'apps':_0x81143b[_0x137b88(0x136)]&&typeof _0x81143b['apps']===_0x137b88(0x12c)?_0x81143b['apps']:{}};}catch(_0xee57d4){if(_0xee57d4[_0x137b88(0x13a)]==='ENOENT')return null;throw new Error(_0x137b88(0x12e)+String(_0xee57d4));}}function a305_0x567d(_0x5556c0,_0x413f6c){_0x5556c0=_0x5556c0-0x12b;const _0x277267=a305_0x2772();let _0x567de8=_0x277267[_0x5556c0];return _0x567de8;}export async function writePageLockFile(_0x33231f,_0x1df6b1){const _0x2a20af=a305_0x567d;await mkdir(dirname(_0x33231f),{'recursive':!![]}),await writeFile(_0x33231f,JSON[_0x2a20af(0x135)](_0x1df6b1,null,0x2),'utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a306_0x5055(){const _0x48d397=['get','12630gPUddB','LrSmartJsx','854052xiTKtm','componentName','object','key','remote','JSFunction','319xRNaHI','\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.','Invalid\x20JSON\x20in\x20','local','label','432bVBOfb','50782692LQQucu','Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.','648OqPdZw','520889GgtViY','263950oGjSLW','LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22','32BxtVYC','validation','this','forEach','\x22\x20has\x20missing\x20or\x20invalid\x20props.render.','stringify','LrSmartJsx\x20node\x20\x22','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.','517345bfUwFF','\x22\x20has\x20missing\x20or\x20invalid\x20props.','trim','length','map','isArray','value','props','\x20page\x20schema.','parse','type','JSExpression','apiError','string','_context','render','source','92264QsMBNf','42unsPnt'];a306_0x5055=function(){return _0x48d397;};return a306_0x5055();}(function(_0x4217c9,_0x48575c){const _0xe102ce=a306_0x5cfa,_0x2d627c=_0x4217c9();while(!![]){try{const _0x22381e=parseInt(_0xe102ce(0xce))/0x1+parseInt(_0xe102ce(0xbd))/0x2*(parseInt(_0xe102ce(0xca))/0x3)+-parseInt(_0xe102ce(0xd1))/0x4*(-parseInt(_0xe102ce(0xda))/0x5)+parseInt(_0xe102ce(0xbf))/0x6*(parseInt(_0xe102ce(0xbb))/0x7)+-parseInt(_0xe102ce(0xba))/0x8*(-parseInt(_0xe102ce(0xcd))/0x9)+parseInt(_0xe102ce(0xcf))/0xa*(parseInt(_0xe102ce(0xc5))/0xb)+-parseInt(_0xe102ce(0xcb))/0xc;if(_0x22381e===_0x48575c)break;else _0x2d627c['push'](_0x2d627c['shift']());}catch(_0x27d9ba){_0x2d627c['push'](_0x2d627c['shift']());}}}(a306_0x5055,0x74359));import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x494c4c,_0x166a10,_0x2f0ac5){const _0x3a7414=a306_0x5cfa,_0xc21c06=parseSchema(_0x494c4c,_0x3a7414(0xc8)),_0x4f0073=parseSchema(_0x166a10,_0x3a7414(0xc3)),_0x2ec391=collectLrSmartJsx(_0xc21c06,!![]);if(_0x2ec391[_0x3a7414(0xdd)]===0x0)return{'content':_0x494c4c,'compiledNodes':0x0,'normalizedNodes':0x0};const _0x77757=new Map(collectLrSmartJsx(_0x4f0073)[_0x3a7414(0xde)](_0x3bdfd0=>[_0x3bdfd0[_0x3a7414(0xc2)],_0x3bdfd0]));let _0x3cc5c5=0x0,_0xcbc731=0x0;for(const _0x38505a of _0x2ec391){const _0x31c2c9=readNonEmptyString(_0x38505a[_0x3a7414(0xb8)]['source']),_0x2a6d05=readNonEmptyString(_0x38505a['render']['value']),_0x5792b9=_0x77757[_0x3a7414(0xbc)](_0x38505a[_0x3a7414(0xc2)]),_0x216ae1=readNonEmptyString(_0x5792b9?.[_0x3a7414(0xb8)][_0x3a7414(0xb9)]),_0x51e49e=readNonEmptyString(_0x5792b9?.[_0x3a7414(0xb8)][_0x3a7414(0xe0)]);let _0x5e5f57=![];_0x38505a[_0x3a7414(0xb8)][_0x3a7414(0xe4)]!=='JSFunction'&&(_0x38505a[_0x3a7414(0xb8)][_0x3a7414(0xe4)]=_0x3a7414(0xc4),_0x5e5f57=!![]);!isPageContextExpression(_0x38505a['props'][_0x3a7414(0xb7)])&&(_0x38505a[_0x3a7414(0xe1)]['_context']={'type':_0x3a7414(0xb4),'value':_0x3a7414(0xd3)},_0x5e5f57=!![]);if(!_0x31c2c9){if(!_0x2a6d05)throw CliErrors['validation']('LrSmartJsx\x20node\x20\x22'+_0x38505a[_0x3a7414(0xc9)]+_0x3a7414(0xc6),'Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.');if(_0x5e5f57)_0xcbc731+=0x1;continue;}const _0x4982f0=!_0x5792b9||_0x31c2c9!==_0x216ae1,_0x53fe9d=!_0x2a6d05;if(!_0x4982f0&&_0x2a6d05&&_0x51e49e&&_0x2a6d05!==_0x51e49e)throw CliErrors[_0x3a7414(0xd2)](_0x3a7414(0xd7)+_0x38505a['label']+'\x22\x20has\x20a\x20manually\x20changed\x20render.value.',_0x3a7414(0xcc));if(_0x4982f0||_0x53fe9d||!_0x51e49e){const _0x373995=readNonEmptyString(await _0x2f0ac5(_0x31c2c9));if(!_0x373995)throw CliErrors[_0x3a7414(0xb5)](_0x3a7414(0xd0)+_0x38505a[_0x3a7414(0xc9)]+'\x22.');_0x38505a[_0x3a7414(0xb8)]['value']=_0x373995,_0x3cc5c5+=0x1,_0x5e5f57=!![];}if(_0x5e5f57)_0xcbc731+=0x1;}if(_0xcbc731===0x0)return{'content':_0x494c4c,'compiledNodes':_0x3cc5c5,'normalizedNodes':_0xcbc731};return{'content':JSON[_0x3a7414(0xd6)](_0xc21c06),'compiledNodes':_0x3cc5c5,'normalizedNodes':_0xcbc731};}function parseSchema(_0x33e2ba,_0x27691b){const _0x4c78ec=a306_0x5cfa;try{return JSON[_0x4c78ec(0xe3)](_0x33e2ba);}catch{throw CliErrors[_0x4c78ec(0xd2)](_0x4c78ec(0xc7)+_0x27691b+_0x4c78ec(0xe2));}}function a306_0x5cfa(_0x1506a3,_0x1ff4a5){_0x1506a3=_0x1506a3-0xb4;const _0x50557c=a306_0x5055();let _0x5cfae6=_0x50557c[_0x1506a3];return _0x5cfae6;}function collectLrSmartJsx(_0x19ab5e,_0x4dbc5c=![]){const _0x4ee579=[],_0x5f38bf=(_0x58a9de,_0x397bc8)=>{const _0x1ed02a=a306_0x5cfa;if(Array['isArray'](_0x58a9de)){_0x58a9de[_0x1ed02a(0xd4)]((_0x4b8a57,_0x356501)=>_0x5f38bf(_0x4b8a57,_0x397bc8+'['+_0x356501+']'));return;}if(!isObject(_0x58a9de))return;if(_0x58a9de['componentName']===_0x1ed02a(0xbe)){const _0x37d6e7=readNonEmptyString(_0x58a9de['id']),_0x4cc29a=_0x37d6e7||_0x397bc8,_0xa4a02b=isObject(_0x58a9de[_0x1ed02a(0xe1)])?_0x58a9de[_0x1ed02a(0xe1)]:undefined;if(!_0xa4a02b){if(_0x4dbc5c)throw CliErrors[_0x1ed02a(0xd2)](_0x1ed02a(0xd7)+_0x4cc29a+_0x1ed02a(0xdb),_0x1ed02a(0xd9));return;}const _0x32b827=isObject(_0xa4a02b[_0x1ed02a(0xb8)])?_0xa4a02b[_0x1ed02a(0xb8)]:undefined;if(!_0x32b827){if(_0x4dbc5c)throw CliErrors[_0x1ed02a(0xd2)](_0x1ed02a(0xd7)+_0x4cc29a+_0x1ed02a(0xd5),_0x1ed02a(0xd8));return;}_0x4ee579['push']({'key':_0x37d6e7?'id:'+_0x37d6e7:'path:'+_0x397bc8,'label':_0x4cc29a,'props':_0xa4a02b,'render':_0x32b827});}for(const [_0x2d44a2,_0x1c87ba]of Object['entries'](_0x58a9de)){if(_0x2d44a2===_0x1ed02a(0xe1)&&_0x58a9de[_0x1ed02a(0xc0)]===_0x1ed02a(0xbe))continue;_0x5f38bf(_0x1c87ba,_0x397bc8+'.'+_0x2d44a2);}};return _0x5f38bf(_0x19ab5e,'$'),_0x4ee579;}function isObject(_0x224fb5){const _0x2b9201=a306_0x5cfa;return Boolean(_0x224fb5)&&typeof _0x224fb5===_0x2b9201(0xc1)&&!Array[_0x2b9201(0xdf)](_0x224fb5);}function readNonEmptyString(_0x40591f){const _0x140d03=a306_0x5cfa;return typeof _0x40591f===_0x140d03(0xb6)&&_0x40591f[_0x140d03(0xdc)]()?_0x40591f:undefined;}function isPageContextExpression(_0x19f268){const _0x2d68f3=a306_0x5cfa;return isObject(_0x19f268)&&_0x19f268['type']===_0x2d68f3(0xb4)&&_0x19f268[_0x2d68f3(0xe0)]===_0x2d68f3(0xd3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x9c1f5,_0x15c2af){const _0x4ea783=a307_0x33fa,_0x4d0e10=_0x9c1f5();while(!![]){try{const _0x754e08=parseInt(_0x4ea783(0x16c))/0x1+-parseInt(_0x4ea783(0x150))/0x2*(parseInt(_0x4ea783(0x16d))/0x3)+-parseInt(_0x4ea783(0x137))/0x4*(-parseInt(_0x4ea783(0x160))/0x5)+parseInt(_0x4ea783(0x159))/0x6*(parseInt(_0x4ea783(0x156))/0x7)+parseInt(_0x4ea783(0x157))/0x8*(-parseInt(_0x4ea783(0x162))/0x9)+-parseInt(_0x4ea783(0x14e))/0xa*(parseInt(_0x4ea783(0x15a))/0xb)+-parseInt(_0x4ea783(0x14f))/0xc;if(_0x754e08===_0x15c2af)break;else _0x4d0e10['push'](_0x4d0e10['shift']());}catch(_0x9d4838){_0x4d0e10['push'](_0x4d0e10['shift']());}}}(a307_0x1077,0xa19f0));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x5e49a1,_0x40f958){const _0x358222=a307_0x33fa,_0xe87f5b=[],_0x5581c0=normalizeSqlForStaticAnalysis(_0x5e49a1),_0x17b18=(_0x5581c0[_0x358222(0x13e)]?[]:extractJoinFacts(_0x5581c0['sql']))['map'](_0x21ed06=>{const _0x576c8b=_0x358222;if(_0x21ed06['unsupportedPredicate']||_0x21ed06[_0x576c8b(0x143)]['length']===0x0)return _0xe87f5b[_0x576c8b(0x15f)]({'code':_0x576c8b(0x167),'table':_0x21ed06[_0x576c8b(0x13b)],'alias':_0x21ed06[_0x576c8b(0x158)],'columns':_0x21ed06['columns'],'reason':_0x21ed06['unsupportedReason']??_0x576c8b(0x144)}),{'table':_0x21ed06[_0x576c8b(0x13b)],'alias':_0x21ed06[_0x576c8b(0x158)],'columns':_0x21ed06['columns'],'status':_0x576c8b(0x145)};const _0x52428f=resolveTableMetadata(_0x40f958,_0x21ed06[_0x576c8b(0x13b)]),_0x1270d2=(_0x52428f?.['indexes']??[])[_0x576c8b(0x166)](_0x360b4f=>({'index':_0x360b4f,'matchedPrefix':findEqualityPrefix(_0x360b4f[_0x576c8b(0x143)],_0x21ed06[_0x576c8b(0x143)])}))[_0x576c8b(0x129)](_0x41f898=>_0x41f898[_0x576c8b(0x168)]['length']>0x0),_0x533059=_0x1270d2[_0x576c8b(0x155)]((_0x198bac,_0x571301)=>!_0x198bac||_0x571301[_0x576c8b(0x168)]['length']>_0x198bac[_0x576c8b(0x168)][_0x576c8b(0x13c)]?_0x571301:_0x198bac,_0x1270d2[0x0]);if(_0x533059)return{'table':_0x21ed06['table'],'alias':_0x21ed06[_0x576c8b(0x158)],'columns':_0x21ed06['columns'],'status':_0x576c8b(0x132),'matchedIndex':{..._0x533059[_0x576c8b(0x139)],'matchedPrefix':_0x533059[_0x576c8b(0x168)]}};const _0x1b5585=_0x52428f?.['indexes'][_0x576c8b(0x129)](_0x51a680=>_0x51a680[_0x576c8b(0x143)][_0x576c8b(0x16e)](_0x89ee3c=>_0x21ed06[_0x576c8b(0x143)][_0x576c8b(0x16e)](_0x3523a4=>columnNamesMatch(_0x89ee3c,_0x3523a4))))??[];if(_0x1b5585['length']>0x0)return _0xe87f5b[_0x576c8b(0x15f)]({'code':_0x576c8b(0x135),'table':_0x21ed06[_0x576c8b(0x13b)],'alias':_0x21ed06[_0x576c8b(0x158)],'columns':_0x21ed06[_0x576c8b(0x143)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x21ed06[_0x576c8b(0x13b)],'alias':_0x21ed06[_0x576c8b(0x158)],'columns':_0x21ed06['columns'],'status':'warning','candidateIndexes':_0x1b5585};if(_0x52428f&&_0x52428f[_0x576c8b(0x15e)]!==![]&&_0x52428f[_0x576c8b(0x13f)][_0x576c8b(0x13c)]>0x0&&_0x21ed06[_0x576c8b(0x143)]['length']>0x0)return _0xe87f5b[_0x576c8b(0x15f)]({'code':'JOIN_INDEX_MISSING','table':_0x21ed06[_0x576c8b(0x13b)],'alias':_0x21ed06['alias'],'columns':_0x21ed06['columns'],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0x21ed06[_0x576c8b(0x13b)],'alias':_0x21ed06[_0x576c8b(0x158)],'columns':_0x21ed06['columns'],'status':_0x576c8b(0x133)};return _0xe87f5b[_0x576c8b(0x15f)]({'code':'INDEX_METADATA_UNAVAILABLE','table':_0x21ed06['table'],'alias':_0x21ed06[_0x576c8b(0x158)],'columns':_0x21ed06[_0x576c8b(0x143)],'reason':_0x52428f?'The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.':'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x21ed06[_0x576c8b(0x13b)],'alias':_0x21ed06[_0x576c8b(0x158)],'columns':_0x21ed06[_0x576c8b(0x143)],'status':_0x576c8b(0x145)};});return{'checked':_0x17b18[_0x358222(0x13c)]>0x0,'joins':_0x17b18,'warnings':_0xe87f5b};}function extractJoinFacts(_0x14c758){const _0xe4f7cf=a307_0x33fa,_0x6e470b=maskNestedQueries(stripSqlNoise(_0x14c758)),_0x613376=maskQuotedIdentifiers(_0x6e470b),_0x1d1a2f=[],_0x28eda6=new Set(),_0x5a537c=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0x571a1f of _0x6e470b['matchAll'](_0x5a537c)){const _0x184cc4=_0x571a1f[_0xe4f7cf(0x139)]??0x0,_0x8ba65=_0x571a1f[0x0]['search'](/\bJOIN\b/i),_0x4232d8=_0x184cc4+Math[_0xe4f7cf(0x152)](0x0,_0x8ba65);if(!/^JOIN\b/i['test'](_0x613376[_0xe4f7cf(0x147)](_0x4232d8)))continue;_0x28eda6['add'](_0x4232d8);const _0x2c81df=normalizeIdentifier(_0x571a1f[0x1]||'INNER'),_0x58a0fe=normalizeIdentifier(_0x571a1f[0x2]??''),_0x204c96=normalizeIdentifier(_0x571a1f[0x3]||_0x58a0fe[_0xe4f7cf(0x151)]('.')['at'](-0x1)||_0x58a0fe),_0x36e522=[],_0x1cb28c=_0x58a0fe===_0xe4f7cf(0x12b);let _0x37bbea=_0x2c81df===_0xe4f7cf(0x14a)||_0x2c81df===_0xe4f7cf(0x15c)||_0x1cb28c,_0x8e0ffc=_0x37bbea?_0x1cb28c?_0xe4f7cf(0x136):_0x2c81df[_0xe4f7cf(0x16f)]()+_0xe4f7cf(0x134):undefined;const _0x47a39d=stripOuterParentheses(_0x571a1f[0x4]??''),_0x476c1c=_0x47a39d[_0xe4f7cf(0x130)](MYBATIS_DYNAMIC_START_MARKER)||_0x47a39d['includes'](MYBATIS_DYNAMIC_END_MARKER),_0x1ebe04=_0x47a39d[_0xe4f7cf(0x130)](MYBATIS_INCLUDE_MARKER);_0x476c1c&&(_0x37bbea=!![],_0x8e0ffc??=_0xe4f7cf(0x12e));_0x1ebe04&&(_0x37bbea=!![],_0x8e0ffc??=_0xe4f7cf(0x140));const _0x5d0d30=_0x47a39d['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0xe4f7cf(0x165)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0xe4f7cf(0x165)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x5d0d30,'OR')&&(_0x37bbea=!![],_0x8e0ffc??=_0xe4f7cf(0x13a));for(const _0x5166b8 of splitTopLevelAnd(_0x5d0d30)){const _0x582d52=stripOuterParentheses(_0x5166b8);if(hasTopLevelKeyword(_0x582d52,'OR')){_0x37bbea=!![],_0x8e0ffc??=_0xe4f7cf(0x13a);continue;}const _0x3e6d57=splitEquality(_0x582d52);if(!_0x3e6d57){containsColumnReference(_0x5166b8,_0x204c96)&&(_0x37bbea=!![]);continue;}const _0xc722c7=parseDirectColumnReference(_0x3e6d57[0x0],_0x204c96),_0x11c830=parseDirectColumnReference(_0x3e6d57[0x1],_0x204c96),_0x4ac96f=containsColumnReference(_0x3e6d57[0x0],_0x204c96),_0x14bd2e=containsColumnReference(_0x3e6d57[0x1],_0x204c96),_0x1062a7=_0xc722c7&&!_0x14bd2e?_0xc722c7:_0x11c830&&!_0x4ac96f?_0x11c830:null;if(_0x1062a7&&!_0x36e522[_0xe4f7cf(0x130)](_0x1062a7))_0x36e522['push'](_0x1062a7);else!_0x1062a7&&containsColumnReference(_0x5166b8,_0x204c96)&&(_0x37bbea=!![]);}_0x1d1a2f[_0xe4f7cf(0x15f)]({'table':_0x58a0fe,'alias':_0x204c96,'columns':_0x36e522,'unsupportedPredicate':_0x37bbea,'unsupportedReason':_0x8e0ffc,'containsUnresolvedInclude':_0x1ebe04,'position':_0x4232d8});}for(const _0x3eadef of _0x613376['matchAll'](/\bJOIN\b/gi)){const _0x1ca75e=_0x3eadef['index']??0x0;if(_0x28eda6['has'](_0x1ca75e))continue;const _0x153693=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/['exec'](_0x6e470b['slice'](_0x1ca75e+_0x3eadef[0x0][_0xe4f7cf(0x13c)])),_0x592182=normalizeIdentifier(_0x153693?.[0x1]||_0xe4f7cf(0x146)),_0x48e44a=normalizeIdentifier(_0x153693?.[0x2]||''),_0x455eeb=isSqlClauseKeyword(_0x48e44a)?_0x592182[_0xe4f7cf(0x151)]('.')['at'](-0x1)||_0x592182:_0x48e44a||_0x592182[_0xe4f7cf(0x151)]('.')['at'](-0x1)||_0x592182;_0x1d1a2f[_0xe4f7cf(0x15f)]({'table':_0x592182,'alias':_0x455eeb,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0xe4f7cf(0x164),'position':_0x1ca75e});}const _0x363415=_0x613376[_0xe4f7cf(0x12c)](MYBATIS_INCLUDE_MARKER);return _0x363415>=0x0&&!_0x1d1a2f[_0xe4f7cf(0x16e)](_0x595633=>_0x595633[_0xe4f7cf(0x13d)])&&_0x1d1a2f[_0xe4f7cf(0x15f)]({'table':_0xe4f7cf(0x146),'alias':_0xe4f7cf(0x146),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0xe4f7cf(0x138),'containsUnresolvedInclude':!![],'position':_0x363415}),_0x1d1a2f[_0xe4f7cf(0x141)]((_0x2c9e12,_0x4a7844)=>_0x2c9e12[_0xe4f7cf(0x14d)]-_0x4a7844['position']);}function stripSqlNoise(_0x3d5741){const _0x243875=a307_0x33fa,_0x190eb6=Array[_0x243875(0x169)](_0x3d5741),_0x44b94a=(_0xc3a98e,_0x5fd4c1)=>{for(let _0x3e7454=_0xc3a98e;_0x3e7454<_0x5fd4c1;_0x3e7454+=0x1){_0x190eb6[_0x3e7454]!=='\x0a'&&_0x190eb6[_0x3e7454]!=='\x0d'&&(_0x190eb6[_0x3e7454]='\x20');}};for(let _0x15c1cf=0x0;_0x15c1cf<_0x190eb6[_0x243875(0x13c)];_0x15c1cf+=0x1){const _0x19ee0c=_0x190eb6[_0x15c1cf],_0x4d84fe=_0x190eb6[_0x15c1cf+0x1];if(_0x19ee0c==='\x27'||_0x19ee0c==='\x22'||_0x19ee0c==='`'){const _0x10f080=_0x19ee0c,_0x55ab3e=_0x15c1cf;_0x15c1cf+=0x1;while(_0x15c1cf<_0x190eb6[_0x243875(0x13c)]){if(_0x190eb6[_0x15c1cf]==='\x5c'&&_0x15c1cf+0x1<_0x190eb6[_0x243875(0x13c)]){_0x15c1cf+=0x2;continue;}if(_0x190eb6[_0x15c1cf]!==_0x10f080){_0x15c1cf+=0x1;continue;}if(_0x190eb6[_0x15c1cf+0x1]===_0x10f080){_0x15c1cf+=0x2;continue;}break;}if(_0x10f080==='\x27')_0x44b94a(_0x55ab3e,Math[_0x243875(0x15b)](_0x15c1cf+0x1,_0x190eb6['length']));continue;}if(_0x19ee0c==='-'&&_0x4d84fe==='-'){const _0x1c3395=_0x15c1cf;while(_0x15c1cf<_0x190eb6[_0x243875(0x13c)]&&_0x190eb6[_0x15c1cf]!=='\x0a')_0x15c1cf+=0x1;_0x44b94a(_0x1c3395,_0x15c1cf);continue;}if(_0x19ee0c==='/'&&_0x4d84fe==='*'){const _0x12ca31=_0x15c1cf;_0x15c1cf+=0x2;while(_0x15c1cf<_0x190eb6['length']&&!(_0x190eb6[_0x15c1cf]==='*'&&_0x190eb6[_0x15c1cf+0x1]==='/')){_0x15c1cf+=0x1;}_0x15c1cf=Math[_0x243875(0x15b)](_0x15c1cf+0x1,_0x190eb6['length']-0x1),_0x44b94a(_0x12ca31,_0x15c1cf+0x1);continue;}if(_0x19ee0c==='#'&&_0x4d84fe!=='{'){const _0x135540=_0x15c1cf;while(_0x15c1cf<_0x190eb6[_0x243875(0x13c)]&&_0x190eb6[_0x15c1cf]!=='\x0a')_0x15c1cf+=0x1;_0x44b94a(_0x135540,_0x15c1cf);continue;}if((_0x19ee0c==='#'||_0x19ee0c==='$')&&_0x4d84fe==='{'){const _0x3ee33d=_0x15c1cf;_0x15c1cf+=0x2;while(_0x15c1cf<_0x190eb6['length']&&_0x190eb6[_0x15c1cf]!=='}')_0x15c1cf+=0x1;_0x44b94a(_0x3ee33d,Math['min'](_0x15c1cf+0x1,_0x190eb6[_0x243875(0x13c)]));}}return _0x190eb6[_0x243875(0x15d)]('');}function a307_0x33fa(_0x380576,_0x2a0c39){_0x380576=_0x380576-0x129;const _0x10778b=a307_0x1077();let _0x33fa53=_0x10778b[_0x380576];return _0x33fa53;}function maskQuotedIdentifiers(_0x5881a5){const _0x55405b=a307_0x33fa,_0x52a2cb=Array[_0x55405b(0x169)](_0x5881a5);for(let _0xa75915=0x0;_0xa75915<_0x52a2cb['length'];_0xa75915+=0x1){const _0x5f0464=_0x52a2cb[_0xa75915];if(_0x5f0464!=='\x22'&&_0x5f0464!=='`')continue;_0xa75915+=0x1;while(_0xa75915<_0x52a2cb[_0x55405b(0x13c)]){if(_0x52a2cb[_0xa75915]===_0x5f0464){if(_0x52a2cb[_0xa75915+0x1]===_0x5f0464){_0x52a2cb[_0xa75915]='\x20',_0x52a2cb[_0xa75915+0x1]='\x20',_0xa75915+=0x2;continue;}break;}_0x52a2cb[_0xa75915]='\x20',_0xa75915+=0x1;}}return _0x52a2cb[_0x55405b(0x15d)]('');}function maskNestedQueries(_0x1a80c1){const _0x5015ed=a307_0x33fa,_0x26571c=Array['from'](_0x1a80c1);for(let _0x3a8ed2=0x0;_0x3a8ed2<_0x26571c[_0x5015ed(0x13c)];_0x3a8ed2+=0x1){if(_0x26571c[_0x3a8ed2]!=='(')continue;const _0x368053=_0x1a80c1['slice'](_0x3a8ed2+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x5015ed(0x153)](_0x368053))continue;let _0x3a9b03=0x1,_0x3c32c0=_0x3a8ed2+0x1;for(;_0x3c32c0<_0x26571c[_0x5015ed(0x13c)]&&_0x3a9b03>0x0;_0x3c32c0+=0x1){if(_0x26571c[_0x3c32c0]==='(')_0x3a9b03+=0x1;if(_0x26571c[_0x3c32c0]===')')_0x3a9b03-=0x1;}if(_0x3a9b03!==0x0)continue;for(let _0xb91176=_0x3a8ed2;_0xb91176<_0x3c32c0;_0xb91176+=0x1){_0x26571c[_0xb91176]='\x20';}const _0x177924=_0x5015ed(0x12b);for(let _0x2b0ad8=0x0;_0x2b0ad8<_0x177924[_0x5015ed(0x13c)]&&_0x3a8ed2+_0x2b0ad8<_0x3c32c0;_0x2b0ad8+=0x1){_0x26571c[_0x3a8ed2+_0x2b0ad8]=_0x177924[_0x2b0ad8];}_0x3a8ed2=_0x3c32c0-0x1;}return _0x26571c[_0x5015ed(0x15d)]('');}function splitTopLevelAnd(_0x1a026e){const _0x1c25f5=a307_0x33fa,_0x510877=[];let _0x16a0bd=0x0,_0x51c8a0=0x0;for(let _0x25b7c2=0x0;_0x25b7c2<_0x1a026e['length'];_0x25b7c2+=0x1){const _0x348cdd=_0x1a026e[_0x25b7c2];if(_0x348cdd==='(')_0x16a0bd+=0x1;if(_0x348cdd===')')_0x16a0bd=Math[_0x1c25f5(0x152)](0x0,_0x16a0bd-0x1);_0x16a0bd===0x0&&_0x1a026e[_0x1c25f5(0x147)](_0x25b7c2)['match'](/^AND\b/i)&&(_0x25b7c2===0x0||/\s/['test'](_0x1a026e[_0x25b7c2-0x1]??''))&&(_0x510877[_0x1c25f5(0x15f)](_0x1a026e[_0x1c25f5(0x147)](_0x51c8a0,_0x25b7c2)['trim']()),_0x25b7c2+=0x2,_0x51c8a0=_0x25b7c2+0x1);}const _0x46841d=_0x1a026e['slice'](_0x51c8a0)[_0x1c25f5(0x161)]();if(_0x46841d)_0x510877[_0x1c25f5(0x15f)](_0x46841d);return _0x510877;}function hasTopLevelKeyword(_0x36b008,_0x4d8ffd){const _0x5eb77d=a307_0x33fa;let _0x2473ef=0x0;for(let _0x4e5c36=0x0;_0x4e5c36<_0x36b008[_0x5eb77d(0x13c)];_0x4e5c36+=0x1){const _0x546e45=_0x36b008[_0x4e5c36];if(_0x546e45==='(')_0x2473ef+=0x1;if(_0x546e45===')')_0x2473ef=Math['max'](0x0,_0x2473ef-0x1);if(_0x2473ef!==0x0)continue;const _0x5d3402=_0x36b008[_0x5eb77d(0x147)](_0x4e5c36,_0x4e5c36+_0x4d8ffd[_0x5eb77d(0x13c)]),_0xb5efed=_0x36b008[_0x4e5c36-0x1]??'\x20',_0x2c205b=_0x36b008[_0x4e5c36+_0x4d8ffd[_0x5eb77d(0x13c)]]??'\x20';if(_0x5d3402[_0x5eb77d(0x16f)]()===_0x4d8ffd[_0x5eb77d(0x16f)]()&&!/[\w$]/[_0x5eb77d(0x153)](_0xb5efed)&&!/[\w$]/[_0x5eb77d(0x153)](_0x2c205b))return!![];}return![];}function splitEquality(_0x4120ed){const _0x5d332c=a307_0x33fa,_0x3a86ac=stripOuterParentheses(_0x4120ed);let _0x15aca7=0x0,_0x48d9c7;for(let _0x15b1f6=0x0;_0x15b1f6<_0x3a86ac[_0x5d332c(0x13c)];_0x15b1f6+=0x1){const _0x1e6caa=_0x3a86ac[_0x15b1f6];if(_0x1e6caa==='(')_0x15aca7+=0x1;if(_0x1e6caa===')')_0x15aca7=Math[_0x5d332c(0x152)](0x0,_0x15aca7-0x1);const _0x5645e6=_0x3a86ac[_0x15b1f6-0x1]??'',_0x2b3ebe=_0x3a86ac[_0x15b1f6+0x1]??'';if(_0x1e6caa==='='&&_0x15aca7===0x0&&!/[!<>=:]/[_0x5d332c(0x153)](_0x5645e6)&&_0x2b3ebe!=='='){if(_0x48d9c7!==undefined)return null;_0x48d9c7=_0x15b1f6;}}return _0x48d9c7===undefined?null:[_0x3a86ac[_0x5d332c(0x147)](0x0,_0x48d9c7)['trim'](),_0x3a86ac[_0x5d332c(0x147)](_0x48d9c7+0x1)[_0x5d332c(0x161)]()];}function parseDirectColumnReference(_0x5cb099,_0x27985b){const _0x1b50e5=a307_0x33fa,_0x3dec5e=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x1b50e5(0x170)](stripOuterParentheses(_0x5cb099));if(!_0x3dec5e)return null;if(normalizeIdentifier(_0x3dec5e[0x1]??'')!==normalizeIdentifier(_0x27985b))return null;return normalizeIdentifier(_0x3dec5e[0x2]??'');}function containsColumnReference(_0x13eff4,_0x53a24f){const _0x57052c=a307_0x33fa,_0x3e61be=_0x13eff4['replace'](/[`"]/g,''),_0x20de74=_0x53a24f[_0x57052c(0x16a)](/[.*+?^${}()|[\]\\]/g,_0x57052c(0x149));return new RegExp(_0x57052c(0x148)+_0x20de74+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')[_0x57052c(0x153)](_0x3e61be);}function findEqualityPrefix(_0x158b9f,_0x230238){const _0x3608dd=a307_0x33fa,_0x6d2c25=new Set(_0x230238['map'](normalizeIdentifier)),_0x2e91cc=[];for(const _0x423c90 of _0x158b9f){if(!_0x6d2c25[_0x3608dd(0x12f)](normalizeIdentifier(_0x423c90)))break;_0x2e91cc[_0x3608dd(0x15f)](_0x423c90);}return _0x2e91cc;}function resolveTableMetadata(_0x126b5b,_0x309cdd){const _0x2bfec0=a307_0x33fa,_0x56ddca=normalizeIdentifier(_0x309cdd),_0x58c718=_0x126b5b[_0x2bfec0(0x129)](_0x4ce348=>normalizeIdentifier(_0x4ce348[_0x2bfec0(0x142)])===_0x56ddca);if(_0x58c718['length']===0x1)return _0x58c718[0x0];const _0x18c5a7=_0x56ddca['includes']('.'),_0x4afd62=_0x56ddca[_0x2bfec0(0x151)]('.')['at'](-0x1),_0x3f84c2=_0x126b5b[_0x2bfec0(0x129)](_0x192343=>{const _0x5c0b15=_0x2bfec0,_0x43fc7e=normalizeIdentifier(_0x192343[_0x5c0b15(0x142)]);if(_0x18c5a7&&_0x43fc7e[_0x5c0b15(0x130)]('.'))return![];return _0x43fc7e[_0x5c0b15(0x151)]('.')['at'](-0x1)===_0x4afd62;});return _0x3f84c2['length']===0x1?_0x3f84c2[0x0]:undefined;}function columnNamesMatch(_0x384193,_0x402476){return normalizeIdentifier(_0x384193)===normalizeIdentifier(_0x402476);}function normalizeIdentifier(_0x36b71d){const _0x3d4cf6=a307_0x33fa;return _0x36b71d[_0x3d4cf6(0x16a)](/[`"]/g,'')[_0x3d4cf6(0x161)]()[_0x3d4cf6(0x131)]();}function a307_0x1077(){const _0x618f61=['full','join','metadataAvailable','push','85hLjayX','trim','9nOWOaT','using','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','replaceAll','map','JOIN_PREDICATE_UNSUPPORTED','matchedPrefix','from','replace','where','1118264bjhUEn','112542eeigQE','some','toUpperCase','exec','filter','cross','__sq__','indexOf','inner','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','has','includes','toLowerCase','covered','warning','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','JOIN_INDEX_NOT_USABLE','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','265784RXJurz','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','index','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','table','length','containsUnresolvedInclude','error','indexes','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','sort','tableName','columns','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','unavailable','unknown','slice','(?:^|[^\x5cw$])','\x5c$&','right','startsWith','left','position','120LsMZaM','8880000RAisMe','28Jbvxlg','split','max','test','endsWith','reduce','71337qCgLEP','3233480ucqcqq','alias','366oVGhDM','493273WApKUZ','min'];a307_0x1077=function(){return _0x618f61;};return a307_0x1077();}function isSqlClauseKeyword(_0x4da686){const _0x4f2556=a307_0x33fa;return new Set(['on',_0x4f2556(0x163),_0x4f2556(0x16b),'join',_0x4f2556(0x12d),_0x4f2556(0x14c),'right',_0x4f2556(0x15c),_0x4f2556(0x12a),'natural'])[_0x4f2556(0x12f)](_0x4da686);}function stripOuterParentheses(_0x1634c8){const _0x287d9f=a307_0x33fa;let _0x3f990d=_0x1634c8['trim']();while(_0x3f990d[_0x287d9f(0x14b)]('(')&&_0x3f990d[_0x287d9f(0x154)](')')){let _0x51ed35=0x0,_0x4fb33b=!![];for(let _0x241c69=0x0;_0x241c69<_0x3f990d[_0x287d9f(0x13c)];_0x241c69+=0x1){if(_0x3f990d[_0x241c69]==='(')_0x51ed35+=0x1;if(_0x3f990d[_0x241c69]===')')_0x51ed35-=0x1;if(_0x51ed35===0x0&&_0x241c69<_0x3f990d['length']-0x1){_0x4fb33b=![];break;}}if(!_0x4fb33b||_0x51ed35!==0x0)break;_0x3f990d=_0x3f990d['slice'](0x1,-0x1)[_0x287d9f(0x161)]();}return _0x3f990d;}
|
|
1
|
+
(function(_0x394aba,_0x42a620){const _0x1fc815=a308_0x2a1c,_0x517795=_0x394aba();while(!![]){try{const _0x48c040=-parseInt(_0x1fc815(0x101))/0x1+-parseInt(_0x1fc815(0xf8))/0x2*(-parseInt(_0x1fc815(0xea))/0x3)+-parseInt(_0x1fc815(0xe8))/0x4+parseInt(_0x1fc815(0xe1))/0x5+parseInt(_0x1fc815(0xf3))/0x6+parseInt(_0x1fc815(0xce))/0x7*(-parseInt(_0x1fc815(0xe5))/0x8)+-parseInt(_0x1fc815(0x100))/0x9*(-parseInt(_0x1fc815(0xeb))/0xa);if(_0x48c040===_0x42a620)break;else _0x517795['push'](_0x517795['shift']());}catch(_0x23844a){_0x517795['push'](_0x517795['shift']());}}}(a308_0x57ee,0xd4c12));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x172cc0,_0xc1636e){const _0x3da1e6=a308_0x2a1c,_0x17a8fd=[],_0x3fb717=normalizeSqlForStaticAnalysis(_0x172cc0),_0x533bd0=(_0x3fb717[_0x3da1e6(0x10e)]?[]:extractJoinFacts(_0x3fb717[_0x3da1e6(0xe7)]))[_0x3da1e6(0xd7)](_0x35d348=>{const _0x51cc01=_0x3da1e6;if(_0x35d348[_0x51cc01(0xdf)]||_0x35d348[_0x51cc01(0xf0)]['length']===0x0)return _0x17a8fd['push']({'code':_0x51cc01(0xde),'table':_0x35d348[_0x51cc01(0x102)],'alias':_0x35d348['alias'],'columns':_0x35d348[_0x51cc01(0xf0)],'reason':_0x35d348[_0x51cc01(0x10a)]??_0x51cc01(0xdc)}),{'table':_0x35d348[_0x51cc01(0x102)],'alias':_0x35d348[_0x51cc01(0x10d)],'columns':_0x35d348[_0x51cc01(0xf0)],'status':'unavailable'};const _0x19f4f4=resolveTableMetadata(_0xc1636e,_0x35d348[_0x51cc01(0x102)]),_0x4de731=(_0x19f4f4?.[_0x51cc01(0xca)]??[])[_0x51cc01(0xd7)](_0x43abe4=>({'index':_0x43abe4,'matchedPrefix':findEqualityPrefix(_0x43abe4[_0x51cc01(0xf0)],_0x35d348[_0x51cc01(0xf0)])}))['filter'](_0x369166=>_0x369166[_0x51cc01(0xf9)][_0x51cc01(0xd5)]>0x0),_0x4dd0e3=_0x4de731[_0x51cc01(0xfb)]((_0x5e6340,_0x4d02ee)=>!_0x5e6340||_0x4d02ee['matchedPrefix'][_0x51cc01(0xd5)]>_0x5e6340[_0x51cc01(0xf9)][_0x51cc01(0xd5)]?_0x4d02ee:_0x5e6340,_0x4de731[0x0]);if(_0x4dd0e3)return{'table':_0x35d348[_0x51cc01(0x102)],'alias':_0x35d348[_0x51cc01(0x10d)],'columns':_0x35d348['columns'],'status':'covered','matchedIndex':{..._0x4dd0e3[_0x51cc01(0xc4)],'matchedPrefix':_0x4dd0e3[_0x51cc01(0xf9)]}};const _0x21dc90=_0x19f4f4?.[_0x51cc01(0xca)]['filter'](_0x2df3b4=>_0x2df3b4[_0x51cc01(0xf0)][_0x51cc01(0xef)](_0x273e11=>_0x35d348[_0x51cc01(0xf0)][_0x51cc01(0xef)](_0x171edf=>columnNamesMatch(_0x273e11,_0x171edf))))??[];if(_0x21dc90[_0x51cc01(0xd5)]>0x0)return _0x17a8fd[_0x51cc01(0xcf)]({'code':_0x51cc01(0x106),'table':_0x35d348[_0x51cc01(0x102)],'alias':_0x35d348['alias'],'columns':_0x35d348[_0x51cc01(0xf0)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x35d348['table'],'alias':_0x35d348['alias'],'columns':_0x35d348[_0x51cc01(0xf0)],'status':_0x51cc01(0xf6),'candidateIndexes':_0x21dc90};if(_0x19f4f4&&_0x19f4f4[_0x51cc01(0xd9)]!==![]&&_0x19f4f4[_0x51cc01(0xca)][_0x51cc01(0xd5)]>0x0&&_0x35d348[_0x51cc01(0xf0)][_0x51cc01(0xd5)]>0x0)return _0x17a8fd[_0x51cc01(0xcf)]({'code':_0x51cc01(0x10c),'table':_0x35d348['table'],'alias':_0x35d348['alias'],'columns':_0x35d348[_0x51cc01(0xf0)],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0x35d348[_0x51cc01(0x102)],'alias':_0x35d348[_0x51cc01(0x10d)],'columns':_0x35d348[_0x51cc01(0xf0)],'status':_0x51cc01(0xf6)};return _0x17a8fd[_0x51cc01(0xcf)]({'code':'INDEX_METADATA_UNAVAILABLE','table':_0x35d348['table'],'alias':_0x35d348[_0x51cc01(0x10d)],'columns':_0x35d348[_0x51cc01(0xf0)],'reason':_0x19f4f4?_0x51cc01(0x10f):_0x51cc01(0x105)}),{'table':_0x35d348[_0x51cc01(0x102)],'alias':_0x35d348['alias'],'columns':_0x35d348[_0x51cc01(0xf0)],'status':'unavailable'};});return{'checked':_0x533bd0[_0x3da1e6(0xd5)]>0x0,'joins':_0x533bd0,'warnings':_0x17a8fd};}function extractJoinFacts(_0x4f2c17){const _0x465196=a308_0x2a1c,_0x29fdcc=maskNestedQueries(stripSqlNoise(_0x4f2c17)),_0x357b1e=maskQuotedIdentifiers(_0x29fdcc),_0x53c0f3=[],_0x19188c=new Set(),_0x153451=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0xf56dc5 of _0x29fdcc[_0x465196(0xff)](_0x153451)){const _0xe398f3=_0xf56dc5[_0x465196(0xc4)]??0x0,_0x450205=_0xf56dc5[0x0][_0x465196(0xfa)](/\bJOIN\b/i),_0x1478b2=_0xe398f3+Math['max'](0x0,_0x450205);if(!/^JOIN\b/i[_0x465196(0xf5)](_0x357b1e[_0x465196(0xfe)](_0x1478b2)))continue;_0x19188c[_0x465196(0x107)](_0x1478b2);const _0x1bc15a=normalizeIdentifier(_0xf56dc5[0x1]||'INNER'),_0x22739f=normalizeIdentifier(_0xf56dc5[0x2]??''),_0x5519ec=normalizeIdentifier(_0xf56dc5[0x3]||_0x22739f['split']('.')['at'](-0x1)||_0x22739f),_0x144fdc=[],_0x54ea8d=_0x22739f===_0x465196(0xd0);let _0xe136f=_0x1bc15a===_0x465196(0x111)||_0x1bc15a===_0x465196(0xd6)||_0x54ea8d,_0x5f3563=_0xe136f?_0x54ea8d?_0x465196(0x103):_0x1bc15a['toUpperCase']()+_0x465196(0xcd):undefined;const _0xbdfd9b=stripOuterParentheses(_0xf56dc5[0x4]??''),_0x5330e0=_0xbdfd9b['includes'](MYBATIS_DYNAMIC_START_MARKER)||_0xbdfd9b[_0x465196(0xe4)](MYBATIS_DYNAMIC_END_MARKER),_0x370c78=_0xbdfd9b[_0x465196(0xe4)](MYBATIS_INCLUDE_MARKER);_0x5330e0&&(_0xe136f=!![],_0x5f3563??=_0x465196(0xf7));_0x370c78&&(_0xe136f=!![],_0x5f3563??=_0x465196(0x110));const _0x587aa1=_0xbdfd9b[_0x465196(0xcc)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x587aa1,'OR')&&(_0xe136f=!![],_0x5f3563??=_0x465196(0xf1));for(const _0x351efb of splitTopLevelAnd(_0x587aa1)){const _0x3cd996=stripOuterParentheses(_0x351efb);if(hasTopLevelKeyword(_0x3cd996,'OR')){_0xe136f=!![],_0x5f3563??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x19e21e=splitEquality(_0x3cd996);if(!_0x19e21e){containsColumnReference(_0x351efb,_0x5519ec)&&(_0xe136f=!![]);continue;}const _0x337c25=parseDirectColumnReference(_0x19e21e[0x0],_0x5519ec),_0x137501=parseDirectColumnReference(_0x19e21e[0x1],_0x5519ec),_0x229c62=containsColumnReference(_0x19e21e[0x0],_0x5519ec),_0x5bd839=containsColumnReference(_0x19e21e[0x1],_0x5519ec),_0x24b512=_0x337c25&&!_0x5bd839?_0x337c25:_0x137501&&!_0x229c62?_0x137501:null;if(_0x24b512&&!_0x144fdc[_0x465196(0xe4)](_0x24b512))_0x144fdc[_0x465196(0xcf)](_0x24b512);else!_0x24b512&&containsColumnReference(_0x351efb,_0x5519ec)&&(_0xe136f=!![]);}_0x53c0f3[_0x465196(0xcf)]({'table':_0x22739f,'alias':_0x5519ec,'columns':_0x144fdc,'unsupportedPredicate':_0xe136f,'unsupportedReason':_0x5f3563,'containsUnresolvedInclude':_0x370c78,'position':_0x1478b2});}for(const _0x441459 of _0x357b1e[_0x465196(0xff)](/\bJOIN\b/gi)){const _0x1b3e5f=_0x441459[_0x465196(0xc4)]??0x0;if(_0x19188c[_0x465196(0xe2)](_0x1b3e5f))continue;const _0x5c2e7f=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x465196(0xee)](_0x29fdcc[_0x465196(0xfe)](_0x1b3e5f+_0x441459[0x0]['length'])),_0x1e8d7f=normalizeIdentifier(_0x5c2e7f?.[0x1]||_0x465196(0x10b)),_0x28e85d=normalizeIdentifier(_0x5c2e7f?.[0x2]||''),_0x3fabbb=isSqlClauseKeyword(_0x28e85d)?_0x1e8d7f[_0x465196(0xd8)]('.')['at'](-0x1)||_0x1e8d7f:_0x28e85d||_0x1e8d7f[_0x465196(0xd8)]('.')['at'](-0x1)||_0x1e8d7f;_0x53c0f3[_0x465196(0xcf)]({'table':_0x1e8d7f,'alias':_0x3fabbb,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x465196(0xc5),'position':_0x1b3e5f});}const _0x2f64ca=_0x357b1e[_0x465196(0xc9)](MYBATIS_INCLUDE_MARKER);return _0x2f64ca>=0x0&&!_0x53c0f3[_0x465196(0xef)](_0x194dbb=>_0x194dbb[_0x465196(0xda)])&&_0x53c0f3[_0x465196(0xcf)]({'table':_0x465196(0x10b),'alias':_0x465196(0x10b),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x465196(0x108),'containsUnresolvedInclude':!![],'position':_0x2f64ca}),_0x53c0f3[_0x465196(0x104)]((_0x554f6c,_0x2aec6e)=>_0x554f6c[_0x465196(0xfd)]-_0x2aec6e[_0x465196(0xfd)]);}function stripSqlNoise(_0x3433d5){const _0x4574a4=a308_0x2a1c,_0x3f1fde=Array[_0x4574a4(0xec)](_0x3433d5),_0x1162e7=(_0xcba712,_0x5ad0c2)=>{for(let _0x1d7f0e=_0xcba712;_0x1d7f0e<_0x5ad0c2;_0x1d7f0e+=0x1){_0x3f1fde[_0x1d7f0e]!=='\x0a'&&_0x3f1fde[_0x1d7f0e]!=='\x0d'&&(_0x3f1fde[_0x1d7f0e]='\x20');}};for(let _0x4e5a8c=0x0;_0x4e5a8c<_0x3f1fde[_0x4574a4(0xd5)];_0x4e5a8c+=0x1){const _0xdbdf19=_0x3f1fde[_0x4e5a8c],_0x3149c8=_0x3f1fde[_0x4e5a8c+0x1];if(_0xdbdf19==='\x27'||_0xdbdf19==='\x22'||_0xdbdf19==='`'){const _0x491e3d=_0xdbdf19,_0x16b8e7=_0x4e5a8c;_0x4e5a8c+=0x1;while(_0x4e5a8c<_0x3f1fde[_0x4574a4(0xd5)]){if(_0x3f1fde[_0x4e5a8c]==='\x5c'&&_0x4e5a8c+0x1<_0x3f1fde[_0x4574a4(0xd5)]){_0x4e5a8c+=0x2;continue;}if(_0x3f1fde[_0x4e5a8c]!==_0x491e3d){_0x4e5a8c+=0x1;continue;}if(_0x3f1fde[_0x4e5a8c+0x1]===_0x491e3d){_0x4e5a8c+=0x2;continue;}break;}if(_0x491e3d==='\x27')_0x1162e7(_0x16b8e7,Math['min'](_0x4e5a8c+0x1,_0x3f1fde['length']));continue;}if(_0xdbdf19==='-'&&_0x3149c8==='-'){const _0x107dfb=_0x4e5a8c;while(_0x4e5a8c<_0x3f1fde[_0x4574a4(0xd5)]&&_0x3f1fde[_0x4e5a8c]!=='\x0a')_0x4e5a8c+=0x1;_0x1162e7(_0x107dfb,_0x4e5a8c);continue;}if(_0xdbdf19==='/'&&_0x3149c8==='*'){const _0x318756=_0x4e5a8c;_0x4e5a8c+=0x2;while(_0x4e5a8c<_0x3f1fde[_0x4574a4(0xd5)]&&!(_0x3f1fde[_0x4e5a8c]==='*'&&_0x3f1fde[_0x4e5a8c+0x1]==='/')){_0x4e5a8c+=0x1;}_0x4e5a8c=Math['min'](_0x4e5a8c+0x1,_0x3f1fde['length']-0x1),_0x1162e7(_0x318756,_0x4e5a8c+0x1);continue;}if(_0xdbdf19==='#'&&_0x3149c8!=='{'){const _0x1253e7=_0x4e5a8c;while(_0x4e5a8c<_0x3f1fde['length']&&_0x3f1fde[_0x4e5a8c]!=='\x0a')_0x4e5a8c+=0x1;_0x1162e7(_0x1253e7,_0x4e5a8c);continue;}if((_0xdbdf19==='#'||_0xdbdf19==='$')&&_0x3149c8==='{'){const _0x1d99d4=_0x4e5a8c;_0x4e5a8c+=0x2;while(_0x4e5a8c<_0x3f1fde['length']&&_0x3f1fde[_0x4e5a8c]!=='}')_0x4e5a8c+=0x1;_0x1162e7(_0x1d99d4,Math[_0x4574a4(0xd4)](_0x4e5a8c+0x1,_0x3f1fde[_0x4574a4(0xd5)]));}}return _0x3f1fde['join']('');}function maskQuotedIdentifiers(_0x13e344){const _0xc59a6=a308_0x2a1c,_0x55efa6=Array[_0xc59a6(0xec)](_0x13e344);for(let _0x4901e2=0x0;_0x4901e2<_0x55efa6[_0xc59a6(0xd5)];_0x4901e2+=0x1){const _0x2bb95e=_0x55efa6[_0x4901e2];if(_0x2bb95e!=='\x22'&&_0x2bb95e!=='`')continue;_0x4901e2+=0x1;while(_0x4901e2<_0x55efa6[_0xc59a6(0xd5)]){if(_0x55efa6[_0x4901e2]===_0x2bb95e){if(_0x55efa6[_0x4901e2+0x1]===_0x2bb95e){_0x55efa6[_0x4901e2]='\x20',_0x55efa6[_0x4901e2+0x1]='\x20',_0x4901e2+=0x2;continue;}break;}_0x55efa6[_0x4901e2]='\x20',_0x4901e2+=0x1;}}return _0x55efa6[_0xc59a6(0xed)]('');}function maskNestedQueries(_0x504203){const _0x14470e=a308_0x2a1c,_0x3601aa=Array[_0x14470e(0xec)](_0x504203);for(let _0x2d0313=0x0;_0x2d0313<_0x3601aa['length'];_0x2d0313+=0x1){if(_0x3601aa[_0x2d0313]!=='(')continue;const _0x49a25c=_0x504203[_0x14470e(0xfe)](_0x2d0313+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x14470e(0xf5)](_0x49a25c))continue;let _0x8fce7c=0x1,_0x4383d5=_0x2d0313+0x1;for(;_0x4383d5<_0x3601aa[_0x14470e(0xd5)]&&_0x8fce7c>0x0;_0x4383d5+=0x1){if(_0x3601aa[_0x4383d5]==='(')_0x8fce7c+=0x1;if(_0x3601aa[_0x4383d5]===')')_0x8fce7c-=0x1;}if(_0x8fce7c!==0x0)continue;for(let _0x872a4e=_0x2d0313;_0x872a4e<_0x4383d5;_0x872a4e+=0x1){_0x3601aa[_0x872a4e]='\x20';}const _0x46a69e=_0x14470e(0xd0);for(let _0x2f8d22=0x0;_0x2f8d22<_0x46a69e[_0x14470e(0xd5)]&&_0x2d0313+_0x2f8d22<_0x4383d5;_0x2f8d22+=0x1){_0x3601aa[_0x2d0313+_0x2f8d22]=_0x46a69e[_0x2f8d22];}_0x2d0313=_0x4383d5-0x1;}return _0x3601aa[_0x14470e(0xed)]('');}function splitTopLevelAnd(_0x31acba){const _0x2a3884=a308_0x2a1c,_0x4123db=[];let _0x43a055=0x0,_0x466ab8=0x0;for(let _0xb61bc3=0x0;_0xb61bc3<_0x31acba[_0x2a3884(0xd5)];_0xb61bc3+=0x1){const _0x5ce307=_0x31acba[_0xb61bc3];if(_0x5ce307==='(')_0x43a055+=0x1;if(_0x5ce307===')')_0x43a055=Math[_0x2a3884(0xdb)](0x0,_0x43a055-0x1);_0x43a055===0x0&&_0x31acba['slice'](_0xb61bc3)[_0x2a3884(0xe0)](/^AND\b/i)&&(_0xb61bc3===0x0||/\s/['test'](_0x31acba[_0xb61bc3-0x1]??''))&&(_0x4123db['push'](_0x31acba[_0x2a3884(0xfe)](_0x466ab8,_0xb61bc3)[_0x2a3884(0x109)]()),_0xb61bc3+=0x2,_0x466ab8=_0xb61bc3+0x1);}const _0x484fdc=_0x31acba[_0x2a3884(0xfe)](_0x466ab8)['trim']();if(_0x484fdc)_0x4123db[_0x2a3884(0xcf)](_0x484fdc);return _0x4123db;}function hasTopLevelKeyword(_0x2e935c,_0x28640e){const _0x340622=a308_0x2a1c;let _0x57a651=0x0;for(let _0x5e862f=0x0;_0x5e862f<_0x2e935c[_0x340622(0xd5)];_0x5e862f+=0x1){const _0xce3a99=_0x2e935c[_0x5e862f];if(_0xce3a99==='(')_0x57a651+=0x1;if(_0xce3a99===')')_0x57a651=Math[_0x340622(0xdb)](0x0,_0x57a651-0x1);if(_0x57a651!==0x0)continue;const _0x4ae7dc=_0x2e935c[_0x340622(0xfe)](_0x5e862f,_0x5e862f+_0x28640e['length']),_0x3fc10f=_0x2e935c[_0x5e862f-0x1]??'\x20',_0x5254cd=_0x2e935c[_0x5e862f+_0x28640e[_0x340622(0xd5)]]??'\x20';if(_0x4ae7dc[_0x340622(0xf2)]()===_0x28640e[_0x340622(0xf2)]()&&!/[\w$]/['test'](_0x3fc10f)&&!/[\w$]/[_0x340622(0xf5)](_0x5254cd))return!![];}return![];}function a308_0x2a1c(_0x57fc35,_0x22927c){_0x57fc35=_0x57fc35-0xc4;const _0x57eed0=a308_0x57ee();let _0x2a1c40=_0x57eed0[_0x57fc35];return _0x2a1c40;}function splitEquality(_0x3a7169){const _0x5ad92e=a308_0x2a1c,_0x338279=stripOuterParentheses(_0x3a7169);let _0x376c5e=0x0,_0xb50390;for(let _0x60353=0x0;_0x60353<_0x338279[_0x5ad92e(0xd5)];_0x60353+=0x1){const _0x48404c=_0x338279[_0x60353];if(_0x48404c==='(')_0x376c5e+=0x1;if(_0x48404c===')')_0x376c5e=Math[_0x5ad92e(0xdb)](0x0,_0x376c5e-0x1);const _0x31796e=_0x338279[_0x60353-0x1]??'',_0x51b689=_0x338279[_0x60353+0x1]??'';if(_0x48404c==='='&&_0x376c5e===0x0&&!/[!<>=:]/[_0x5ad92e(0xf5)](_0x31796e)&&_0x51b689!=='='){if(_0xb50390!==undefined)return null;_0xb50390=_0x60353;}}return _0xb50390===undefined?null:[_0x338279['slice'](0x0,_0xb50390)[_0x5ad92e(0x109)](),_0x338279[_0x5ad92e(0xfe)](_0xb50390+0x1)[_0x5ad92e(0x109)]()];}function parseDirectColumnReference(_0x49a92d,_0x42c8f3){const _0x1f9ced=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0x49a92d));if(!_0x1f9ced)return null;if(normalizeIdentifier(_0x1f9ced[0x1]??'')!==normalizeIdentifier(_0x42c8f3))return null;return normalizeIdentifier(_0x1f9ced[0x2]??'');}function containsColumnReference(_0x5b8e5c,_0xe72dcd){const _0x1fb208=a308_0x2a1c,_0x5bf8bd=_0x5b8e5c[_0x1fb208(0xe6)](/[`"]/g,''),_0x4a4c82=_0xe72dcd[_0x1fb208(0xe6)](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp(_0x1fb208(0xcb)+_0x4a4c82+_0x1fb208(0xfc),'i')[_0x1fb208(0xf5)](_0x5bf8bd);}function findEqualityPrefix(_0x59d9ce,_0x4c0ddc){const _0x3f0f36=a308_0x2a1c,_0x58335e=new Set(_0x4c0ddc[_0x3f0f36(0xd7)](normalizeIdentifier)),_0x450c0d=[];for(const _0x188f03 of _0x59d9ce){if(!_0x58335e['has'](normalizeIdentifier(_0x188f03)))break;_0x450c0d[_0x3f0f36(0xcf)](_0x188f03);}return _0x450c0d;}function resolveTableMetadata(_0x6a76a3,_0x28b269){const _0xbd522b=a308_0x2a1c,_0x736ba5=normalizeIdentifier(_0x28b269),_0x4794a0=_0x6a76a3[_0xbd522b(0xf4)](_0x1bde55=>normalizeIdentifier(_0x1bde55[_0xbd522b(0xc8)])===_0x736ba5);if(_0x4794a0[_0xbd522b(0xd5)]===0x1)return _0x4794a0[0x0];const _0x376114=_0x736ba5['includes']('.'),_0x4a832f=_0x736ba5[_0xbd522b(0xd8)]('.')['at'](-0x1),_0x561002=_0x6a76a3[_0xbd522b(0xf4)](_0x355210=>{const _0x9903aa=_0xbd522b,_0x31cdb2=normalizeIdentifier(_0x355210['tableName']);if(_0x376114&&_0x31cdb2[_0x9903aa(0xe4)]('.'))return![];return _0x31cdb2[_0x9903aa(0xd8)]('.')['at'](-0x1)===_0x4a832f;});return _0x561002['length']===0x1?_0x561002[0x0]:undefined;}function columnNamesMatch(_0x1c138e,_0x4a7587){return normalizeIdentifier(_0x1c138e)===normalizeIdentifier(_0x4a7587);}function normalizeIdentifier(_0x32f4c4){const _0x323747=a308_0x2a1c;return _0x32f4c4[_0x323747(0xe6)](/[`"]/g,'')[_0x323747(0x109)]()[_0x323747(0xd2)]();}function a308_0x57ee(){const _0x1f2fb8=['join','exec','some','columns','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','toUpperCase','7455342SFOaGO','filter','test','warning','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','1100FubGwL','matchedPrefix','search','reduce','\x5cs*\x5c.\x5cs*[\x5cw$]+','position','slice','matchAll','66735UDpwoG','1322205uQBWFN','table','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','sort','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','JOIN_INDEX_NOT_USABLE','add','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','trim','unsupportedReason','unknown','JOIN_INDEX_MISSING','alias','error','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','right','index','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','where','using','tableName','indexOf','indexes','(?:^|[^\x5cw$])','replaceAll','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','6782517kAJIbQ','push','__sq__','startsWith','toLowerCase','cross','min','length','full','map','split','metadataAvailable','containsUnresolvedInclude','max','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','natural','JOIN_PREDICATE_UNSUPPORTED','unsupportedPredicate','match','3982865Ajkvra','has','left','includes','8HsurmE','replace','sql','728548DFDHqy','endsWith','1095WYdMHT','1490bdcazM','from'];a308_0x57ee=function(){return _0x1f2fb8;};return a308_0x57ee();}function isSqlClauseKeyword(_0x3b20df){const _0x4d0e5b=a308_0x2a1c;return new Set(['on',_0x4d0e5b(0xc7),_0x4d0e5b(0xc6),_0x4d0e5b(0xed),'inner',_0x4d0e5b(0xe3),'right','full',_0x4d0e5b(0xd3),_0x4d0e5b(0xdd)])[_0x4d0e5b(0xe2)](_0x3b20df);}function stripOuterParentheses(_0x288068){const _0xf8b52f=a308_0x2a1c;let _0x3944d9=_0x288068['trim']();while(_0x3944d9[_0xf8b52f(0xd1)]('(')&&_0x3944d9[_0xf8b52f(0xe9)](')')){let _0x25c303=0x0,_0x5ca3f5=!![];for(let _0x3998b7=0x0;_0x3998b7<_0x3944d9[_0xf8b52f(0xd5)];_0x3998b7+=0x1){if(_0x3944d9[_0x3998b7]==='(')_0x25c303+=0x1;if(_0x3944d9[_0x3998b7]===')')_0x25c303-=0x1;if(_0x25c303===0x0&&_0x3998b7<_0x3944d9['length']-0x1){_0x5ca3f5=![];break;}}if(!_0x5ca3f5||_0x25c303!==0x0)break;_0x3944d9=_0x3944d9['slice'](0x1,-0x1)[_0xf8b52f(0x109)]();}return _0x3944d9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a309_0x1d5e06=a309_0x330c;(function(_0x2653cf,_0x4d42cc){const _0x429f8d=a309_0x330c,_0x470853=_0x2653cf();while(!![]){try{const _0x269aa3=parseInt(_0x429f8d(0x1c0))/0x1+-parseInt(_0x429f8d(0x1bb))/0x2*(parseInt(_0x429f8d(0x1be))/0x3)+parseInt(_0x429f8d(0x1bd))/0x4+parseInt(_0x429f8d(0x1c2))/0x5+-parseInt(_0x429f8d(0x1c1))/0x6+parseInt(_0x429f8d(0x1b9))/0x7+parseInt(_0x429f8d(0x1bf))/0x8;if(_0x269aa3===_0x4d42cc)break;else _0x470853['push'](_0x470853['shift']());}catch(_0x99950c){_0x470853['push'](_0x470853['shift']());}}}(a309_0x5bfd,0x2b04f));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a309_0x330c(_0x58f85b,_0x494799){_0x58f85b=_0x58f85b-0x1b8;const _0x5bfd36=a309_0x5bfd();let _0x330ce1=_0x5bfd36[_0x58f85b];return _0x330ce1;}const DOT_DIR=a309_0x1d5e06(0x1bc),LOCK_FILE_NAME=a309_0x1d5e06(0x1ba),TRASH_DIR_NAME=a309_0x1d5e06(0x1c3);export function loadSqlProjectConfig(_0x42378e,_0x161720){const _0xd39e16=a309_0x1d5e06,_0x1b8be2=resolve(_0x161720??findProjectRootDirectory()),_0xa9320a=DOT_DIR+'/sql',_0x129f2d=_0xa9320a+'/'+_0x42378e;return{'projectRoot':_0x1b8be2,'appCode':_0x42378e,'sqlWorkspaceRoot':_0xa9320a,'sqlRoot':_0x129f2d,'sqlRootDir':resolve(_0x1b8be2,DOT_DIR,_0xd39e16(0x1b8),_0x42378e),'lockFilePath':resolve(_0x1b8be2,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x1b8be2,DOT_DIR,TRASH_DIR_NAME)};}function a309_0x5bfd(){const _0x39b094=['571350YSpDSh','sql-trash','sql','1522171fgWzlN','sql.lock.json','684682VmsrML','.rabetbase','1352968ZfeeHc','3GpehdX','15152MBaWME','90273VxmqkF','1461504VoMkNC'];a309_0x5bfd=function(){return _0x39b094;};return a309_0x5bfd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4e3a08,_0x44e2e9){const _0x55e86d=a310_0x419c,_0x2a2768=_0x4e3a08();while(!![]){try{const _0x38f4f3=-parseInt(_0x55e86d(0x82))/0x1+parseInt(_0x55e86d(0x6f))/0x2*(-parseInt(_0x55e86d(0x67))/0x3)+parseInt(_0x55e86d(0x68))/0x4*(parseInt(_0x55e86d(0x6b))/0x5)+parseInt(_0x55e86d(0x7d))/0x6*(-parseInt(_0x55e86d(0x73))/0x7)+parseInt(_0x55e86d(0x7c))/0x8*(parseInt(_0x55e86d(0x7b))/0x9)+parseInt(_0x55e86d(0x76))/0xa*(parseInt(_0x55e86d(0x6d))/0xb)+parseInt(_0x55e86d(0x75))/0xc;if(_0x38f4f3===_0x44e2e9)break;else _0x2a2768['push'](_0x2a2768['shift']());}catch(_0x3142c6){_0x2a2768['push'](_0x2a2768['shift']());}}}(a310_0x2609,0x708a1));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x2aa4a1){const _0x11cb48=a310_0x419c;if(_0x2aa4a1===_0x11cb48(0x72))return _0x11cb48(0x71);if(_0x2aa4a1===_0x11cb48(0x84))return _0x11cb48(0x7f);return undefined;}async function scanSqlFilesRecursively(_0x22fc6e,_0x5eb897){const _0x46f2cb=a310_0x419c,_0x4fe402=[];try{const _0x45737b=await readdir(_0x22fc6e,{'withFileTypes':!![]});for(const _0x1c8390 of _0x45737b){const _0x50d959=join(_0x22fc6e,_0x1c8390['name']);if(_0x1c8390[_0x46f2cb(0x6e)]()){_0x4fe402['push'](...await scanSqlFilesRecursively(_0x50d959,_0x5eb897));continue;}if(!_0x1c8390['isFile']())continue;const _0x323e07=extname(_0x1c8390[_0x46f2cb(0x83)])['toLowerCase'](),_0x4484c9=extensionToMode(_0x323e07);if(!_0x4484c9)continue;const _0x352f95=relative(_0x5eb897,_0x50d959)[_0x46f2cb(0x7a)](/\\/g,'/'),_0x3b2cfa=_0x352f95['split']('/')['filter'](Boolean),_0x37cf7e=parseSqlPath(_0x3b2cfa,_0x1c8390['name'],_0x323e07);if(!_0x37cf7e)continue;_0x4fe402[_0x46f2cb(0x70)]({'sqlCode':_0x37cf7e[_0x46f2cb(0x6a)],'sqlName':_0x37cf7e[_0x46f2cb(0x78)],'dbDirectory':_0x3b2cfa[0x0],'filePath':_0x50d959,'relativePath':_0x352f95,'lockKey':_0x37cf7e[_0x46f2cb(0x6a)],'mode':_0x4484c9});}}catch(_0x282bd9){if(_0x282bd9['code']!==_0x46f2cb(0x81))throw _0x282bd9;}return _0x4fe402;}export async function scanLocalSqlQueries(_0xe742ab){const _0x484a49=a310_0x419c;return scanSqlFilesRecursively(_0xe742ab[_0x484a49(0x77)],_0xe742ab[_0x484a49(0x77)]);}export function resolveLocalSqlFilePath(_0x181d7d,_0xf7e7d7,_0x58c4ab){const _0x2d4c9d=a310_0x419c,_0x39cff0=_0x58c4ab?.[_0x2d4c9d(0x66)]||(_0x58c4ab?.[_0x2d4c9d(0x78)]||_0x58c4ab?.[_0x2d4c9d(0x65)]?buildSqlRelativePath(_0xf7e7d7,_0x58c4ab?.[_0x2d4c9d(0x78)],_0x58c4ab?.[_0x2d4c9d(0x65)],_0x58c4ab?.[_0x2d4c9d(0x79)]||'sql',_0x58c4ab?.[_0x2d4c9d(0x6c)]):buildDefaultSqlFileName(_0xf7e7d7,_0x58c4ab?.[_0x2d4c9d(0x79)]||_0x2d4c9d(0x71)));return join(_0x181d7d[_0x2d4c9d(0x77)],_0x39cff0);}export async function directoryExists(_0x196cad){try{const _0x26c740=await stat(_0x196cad);return _0x26c740['isDirectory']();}catch{return![];}}function parseSqlPath(_0x57fe7e,_0x46a77a,_0x45ccbe){const _0x250652=a310_0x419c,_0x29dd00=_0x46a77a[_0x250652(0x7e)](0x0,-_0x45ccbe[_0x250652(0x80)]);if(_0x57fe7e[_0x250652(0x80)]<0x2)return null;const _0x2ca27f=_0x29dd00[_0x250652(0x69)]('_');if(_0x2ca27f<=0x0||_0x2ca27f>=_0x29dd00[_0x250652(0x80)]-0x1)return null;const _0x2b0f72=_0x29dd00['slice'](0x0,_0x2ca27f);if(!isLikelySqlCode(_0x2b0f72))return null;return{'sqlCode':_0x2b0f72,'sqlName':_0x29dd00[_0x250652(0x7e)](_0x2ca27f+0x1)};}function a310_0x2609(){const _0x33625b=['replace','9oPjKXl','1399952JBnxbI','463938XwGlxX','slice','mybatisXml','length','ENOENT','62026lgFFus','name','.xml','dbName','path','47001FcLfvp','339032ZWapnE','indexOf','sqlCode','10OBblwI','dbId','11lfBefK','isDirectory','14FFigYc','push','sql','.sql','35qidolm','test','4430520ohUqYj','3055510WrwvTJ','sqlRootDir','sqlName','mode'];a310_0x2609=function(){return _0x33625b;};return a310_0x2609();}function a310_0x419c(_0x3e2c88,_0xd19ba){_0x3e2c88=_0x3e2c88-0x65;const _0x26093f=a310_0x2609();let _0x419cca=_0x26093f[_0x3e2c88];return _0x419cca;}function isLikelySqlCode(_0x46d246){const _0x42537c=a310_0x419c;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x42537c(0x74)](_0x46d246);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xded8ab,_0x207cd6){const _0x2fcde8=a311_0x2332,_0x5f58c8=_0xded8ab();while(!![]){try{const _0x2c721c=-parseInt(_0x2fcde8(0x74))/0x1+parseInt(_0x2fcde8(0x70))/0x2+-parseInt(_0x2fcde8(0x6a))/0x3*(parseInt(_0x2fcde8(0x75))/0x4)+-parseInt(_0x2fcde8(0x76))/0x5*(-parseInt(_0x2fcde8(0x6c))/0x6)+-parseInt(_0x2fcde8(0x6b))/0x7+parseInt(_0x2fcde8(0x6e))/0x8*(parseInt(_0x2fcde8(0x6d))/0x9)+-parseInt(_0x2fcde8(0x73))/0xa*(-parseInt(_0x2fcde8(0x72))/0xb);if(_0x2c721c===_0x207cd6)break;else _0x5f58c8['push'](_0x5f58c8['shift']());}catch(_0x4efb37){_0x5f58c8['push'](_0x5f58c8['shift']());}}}(a311_0x228d,0x30096));import{readFile}from'node:fs/promises';import a311_0xf25b02 from'node:crypto';export function computeSqlContentHash(_0xe98b6e){const _0x85a6c6=a311_0x2332;return a311_0xf25b02[_0x85a6c6(0x6f)]('md5')['update'](_0xe98b6e)[_0x85a6c6(0x71)]('hex');}export async function computeSqlFileHash(_0x3bd656){const _0xcaa6d6=await readFile(_0x3bd656,'utf8');return computeSqlContentHash(_0xcaa6d6);}function a311_0x2332(_0x5a53c5,_0x4ceec1){_0x5a53c5=_0x5a53c5-0x6a;const _0x228d82=a311_0x228d();let _0x23325b=_0x228d82[_0x5a53c5];return _0x23325b;}function a311_0x228d(){const _0x23c777=['781596cPWLXo','5XfOajM','3NnXoeZ','2699571bqmsik','1500348EbMUpN','27aGjxeK','121080caFKBY','createHash','267076oZtuaS','digest','3780997VKeFre','20RZYgzS','338645TlrlxS'];a311_0x228d=function(){return _0x23c777;};return a311_0x228d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a312_0x48d5(_0x4c2a14,_0x3db5c8){_0x4c2a14=_0x4c2a14-0x84;const _0x1b6346=a312_0x1b63();let _0x48d567=_0x1b6346[_0x4c2a14];return _0x48d567;}(function(_0x26b64c,_0x101932){const _0x780f98=a312_0x48d5,_0x4609fe=_0x26b64c();while(!![]){try{const _0x265d99=-parseInt(_0x780f98(0x8b))/0x1+-parseInt(_0x780f98(0x88))/0x2*(-parseInt(_0x780f98(0x87))/0x3)+parseInt(_0x780f98(0x8a))/0x4+parseInt(_0x780f98(0x91))/0x5+parseInt(_0x780f98(0x86))/0x6*(-parseInt(_0x780f98(0x8d))/0x7)+parseInt(_0x780f98(0x98))/0x8+parseInt(_0x780f98(0x95))/0x9*(-parseInt(_0x780f98(0x8c))/0xa);if(_0x265d99===_0x101932)break;else _0x4609fe['push'](_0x4609fe['shift']());}catch(_0x21019f){_0x4609fe['push'](_0x4609fe['shift']());}}}(a312_0x1b63,0x60fdc));import{mkdir,readFile,writeFile}from'node:fs/promises';function a312_0x1b63(){const _0x4e5dd2=['482024TCnyGT','sqls','apps','\x22\x20vs\x20lock\x20\x22','ENOENT','458502vsNdYc','1976442rnQEKE','2taStyi','stringify','1297972UevGJP','68419nfZgxQ','52770kWzEAd','21JGlIIo','lastSync','code','\x22.\x20','3718625QbAbAX','utf8','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','sqlRoot','1863JNojYd','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','parse'];a312_0x1b63=function(){return _0x4e5dd2;};return a312_0x1b63();}import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x1834a0,_0x489c76,_0x2e740d,_0x2ae6f4){const _0x23be7c=a312_0x48d5,_0x21ebb2=_0x1834a0??createEmptySqlLock();let _0x48ef76=_0x21ebb2['apps'][_0x489c76];if(!_0x48ef76)return _0x48ef76={'sqlRoot':_0x2e740d,'lastSync':'','sqls':{}},_0x21ebb2[_0x23be7c(0x9a)][_0x489c76]=_0x48ef76,{'lockData':_0x21ebb2,'appLock':_0x48ef76};if(!_0x48ef76[_0x23be7c(0x94)])_0x48ef76[_0x23be7c(0x94)]=_0x2e740d;else{if(_0x48ef76[_0x23be7c(0x94)]!==_0x2e740d)throw new Error(_0x2ae6f4+':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22'+_0x2e740d+_0x23be7c(0x84)+_0x48ef76[_0x23be7c(0x94)]+_0x23be7c(0x90)+_0x23be7c(0x96));}return!_0x48ef76[_0x23be7c(0x99)]&&(_0x48ef76[_0x23be7c(0x99)]={}),!_0x48ef76['lastSync']&&(_0x48ef76[_0x23be7c(0x8e)]=''),{'lockData':_0x21ebb2,'appLock':_0x48ef76};}export async function readSqlLockFile(_0x207dd6){const _0x3db2d5=a312_0x48d5;try{const _0x1138f6=await readFile(_0x207dd6,_0x3db2d5(0x92));return JSON[_0x3db2d5(0x97)](_0x1138f6);}catch(_0x4703f3){if(_0x4703f3[_0x3db2d5(0x8f)]===_0x3db2d5(0x85))return null;throw new Error(_0x3db2d5(0x93)+String(_0x4703f3));}}export async function writeSqlLockFile(_0xe44df2,_0x1f4c9e){const _0x4eff52=a312_0x48d5;await mkdir(dirname(_0xe44df2),{'recursive':!![]}),await writeFile(_0xe44df2,JSON[_0x4eff52(0x89)](_0x1f4c9e,null,0x2),'utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3be588,_0x3ab302){const _0x4a9ee8=a314_0x1744,_0xf46dfc=_0x3be588();while(!![]){try{const _0xf3f45d=-parseInt(_0x4a9ee8(0x1d3))/0x1*(parseInt(_0x4a9ee8(0x1d5))/0x2)+-parseInt(_0x4a9ee8(0x1cf))/0x3+-parseInt(_0x4a9ee8(0x1c9))/0x4*(-parseInt(_0x4a9ee8(0x1c8))/0x5)+-parseInt(_0x4a9ee8(0x1cb))/0x6*(-parseInt(_0x4a9ee8(0x1d1))/0x7)+-parseInt(_0x4a9ee8(0x1c4))/0x8+parseInt(_0x4a9ee8(0x1c5))/0x9*(-parseInt(_0x4a9ee8(0x1cc))/0xa)+parseInt(_0x4a9ee8(0x1c6))/0xb*(parseInt(_0x4a9ee8(0x1cd))/0xc);if(_0xf3f45d===_0x3ab302)break;else _0xf46dfc['push'](_0xf46dfc['shift']());}catch(_0x3fc877){_0xf46dfc['push'](_0xf46dfc['shift']());}}}(a314_0x247f,0x72c4c));import{detectSqlSourceMode}from'../../core/sql-validator.js';export function detectSqlMode(_0x48f7ca){return detectSqlSourceMode(_0x48f7ca);}export function getSqlFileExtension(_0x320b6d){const _0x4d2764=a314_0x1744;return _0x320b6d===_0x4d2764(0x1c3)?_0x4d2764(0x1d0):_0x4d2764(0x1c7);}function a314_0x1744(_0x5d246f,_0x3dcf26){_0x5d246f=_0x5d246f-0x1c3;const _0x247f3b=a314_0x247f();let _0x17442a=_0x247f3b[_0x5d246f];return _0x17442a;}export function buildDefaultSqlFileName(_0x191b36,_0x3a499c){return''+_0x191b36+getSqlFileExtension(_0x3a499c);}export function sanitizeSqlPathSegment(_0x3310fc,_0x1125c5){const _0x115d34=a314_0x1744,_0x2ea8a6=String(_0x3310fc??'')['trim'](),_0x12db97=_0x2ea8a6[_0x115d34(0x1ce)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x115d34(0x1ce)](/\s+/g,'-')['replace'](/-+/g,'-')[_0x115d34(0x1ce)](/^\.+/,'')['replace'](/\.+$/,'')['replace'](/^-+/,'')[_0x115d34(0x1ce)](/-+$/,'');return _0x12db97||_0x1125c5;}export function buildDbDirectoryName(_0x23c6b5,_0x9b7599){const _0x35f005=a314_0x1744;return sanitizeSqlPathSegment(_0x23c6b5,_0x9b7599!=null?_0x35f005(0x1ca)+_0x9b7599:_0x35f005(0x1d2));}function a314_0x247f(){const _0x239789=['4cqhYXH','db-','448386XLmths','20hIQGAb','264JYdFqI','replace','1349847rhsgCP','.xml','14MctUlo','unknown-db','244784PHYhtv','unknown-sql','2KSJyuE','mybatisXml','568096kEaDOT','3345912eBMgtB','451605wyXbsj','.sql','4633505Oxblxh'];a314_0x247f=function(){return _0x239789;};return a314_0x247f();}export function buildSqlRelativePath(_0x877a56,_0x32bada,_0x4ed5cf,_0x539b23,_0x598eb0){const _0x495dae=a314_0x1744,_0x49ce82=buildDbDirectoryName(_0x4ed5cf,_0x598eb0),_0x250f5c=sanitizeSqlPathSegment(_0x877a56,_0x495dae(0x1d4)),_0x5162c3=sanitizeSqlPathSegment(_0x32bada,_0x250f5c);return _0x49ce82+'/'+_0x250f5c+'_'+_0x5162c3+getSqlFileExtension(_0x539b23);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a314_0x4711(_0x4bc304,_0x4152d7){_0x4bc304=_0x4bc304-0x1d1;const _0x23710c=a314_0x2371();let _0x47112c=_0x23710c[_0x4bc304];return _0x47112c;}const a314_0x345168=a314_0x4711;(function(_0x19a786,_0x326434){const _0x4eed3f=a314_0x4711,_0x42ec86=_0x19a786();while(!![]){try{const _0x54a4a3=parseInt(_0x4eed3f(0x1fb))/0x1*(parseInt(_0x4eed3f(0x1fd))/0x2)+parseInt(_0x4eed3f(0x209))/0x3+parseInt(_0x4eed3f(0x1d2))/0x4+parseInt(_0x4eed3f(0x1e9))/0x5+-parseInt(_0x4eed3f(0x20f))/0x6+-parseInt(_0x4eed3f(0x1d6))/0x7*(-parseInt(_0x4eed3f(0x230))/0x8)+-parseInt(_0x4eed3f(0x225))/0x9;if(_0x54a4a3===_0x326434)break;else _0x42ec86['push'](_0x42ec86['shift']());}catch(_0x10b0ee){_0x42ec86['push'](_0x42ec86['shift']());}}}(a314_0x2371,0x19338));function a314_0x2371(){const _0x22857a=['test','>','property','replaceAll','&','Unterminated\x20MyBatis\x20XML\x20tag.','delete','Unterminated\x20XML\x20comment.','DDL\x20statements\x20require\x20explicit\x20review','<!--','where','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','1911060pCyBqs','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','DELETE','-->','sql','unknown\x20table(s)','pop','indexOf','from','NOT','fromCodePoint','28376pytmLz','toUpperCase','set','otherwise','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','\x20query\x20targeting\x20','rawName','UPDATE','WITH','LOCK\x20IN\x20SHARE\x20MODE','statementType','14604ULUmKk','push','Unterminated\x20XML\x20declaration.','when','301JatJER','foreach','toLowerCase','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','some','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','has','SET','RECURSIVE','__RABETBASE_MYBATIS_DYNAMIC_START__','isDangerous','matchAll','<','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.','length','join','add','startsWith','492295EGXicL',')\x5cb','INSERT','Unable\x20to\x20detect\x20SQL\x20type.\x20','UNKNOWN','SHARE','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','update','SQL\x20content\x20is\x20empty','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','error','mybatisXml','select','reason','\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','\x20SET\x20','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','1VpfJlB','match','58054pMtcmG','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','filter','includes','DDL','SELECT','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</',''','FOR','choose','slice','MATERIALIZED','548526EGVaEB','Invalid\x20MyBatis\x20XML\x20tag.','outer','KEY','tagName','bind','905616sRTneJ','get','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','exec','"','type','replace','trim','include',']]>'];a314_0x2371=function(){return _0x22857a;};return a314_0x2371();}const MYBATIS_OUTER_TAGS=new Map([[a314_0x345168(0x1f5),a314_0x345168(0x202)],['insert','INSERT'],[a314_0x345168(0x1f0),a314_0x345168(0x237)],[a314_0x345168(0x21f),a314_0x345168(0x227)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a314_0x345168(0x223),a314_0x345168(0x1d7),a314_0x345168(0x206),'when',a314_0x345168(0x233),a314_0x345168(0x216),a314_0x345168(0x232),a314_0x345168(0x20e),a314_0x345168(0x217),a314_0x345168(0x21b)]),MYBATIS_BRANCH_TAGS=new Set(['if','foreach',a314_0x345168(0x206),a314_0x345168(0x1d5),'otherwise']);export const MYBATIS_DYNAMIC_START_MARKER=a314_0x345168(0x1df);export const MYBATIS_DYNAMIC_END_MARKER='__RABETBASE_MYBATIS_DYNAMIC_END__';export const MYBATIS_INCLUDE_MARKER='__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__';const UNRESOLVED_SQL_FRAGMENT=a314_0x345168(0x224),MYBATIS_OUTER_TAG_PATTERN=new RegExp('^<\x5cs*(?:'+[...MYBATIS_OUTER_TAGS['keys']()]['join']('|')+a314_0x345168(0x1ea),'i');export function normalizeSqlForStaticAnalysis(_0x33760d){const _0x2ea0ad=a314_0x345168,_0xab6342=typeof _0x33760d==='string'?_0x33760d:'';if(detectSqlSourceMode(_0xab6342)===_0x2ea0ad(0x229))return{'sql':_0xab6342,'mode':'sql'};let _0x209c0f=0x0,_0x3498e7='',_0xa3b2c,_0x3ccd0b=![],_0x1f32aa=![];const _0x3542e5=[];while(_0x209c0f<_0xab6342[_0x2ea0ad(0x1e5)]){if(_0xab6342[_0x2ea0ad(0x1e8)](_0x2ea0ad(0x222),_0x209c0f)){const _0x37d2ac=_0xab6342[_0x2ea0ad(0x22c)](_0x2ea0ad(0x228),_0x209c0f+0x4);if(_0x37d2ac<0x0)return invalidMybatisSource(_0x2ea0ad(0x220));_0x3498e7+='\x20',_0x209c0f=_0x37d2ac+0x3;continue;}if(_0xab6342['startsWith']('<,_0x209c0f+0x9);if(_0x10a221<0x0)return invalidMybatisSource('Unterminated\x20CDATA\x20section.');_0x3498e7+=_0xab6342['slice'](_0x209c0f+0x9,_0x10a221),_0x209c0f=_0x10a221+0x3;continue;}if(_0xab6342[_0x2ea0ad(0x1e8)]('<?',_0x209c0f)){if(_0x3ccd0b)return invalidMybatisSource('XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.');const _0x590e1c=_0xab6342[_0x2ea0ad(0x22c)]('?>',_0x209c0f+0x2);if(_0x590e1c<0x0)return invalidMybatisSource(_0x2ea0ad(0x1d4));_0x3498e7+='\x20',_0x209c0f=_0x590e1c+0x2;continue;}if(_0xab6342[_0x209c0f]!=='<'){const _0x2537f9=_0xab6342[_0x2ea0ad(0x22c)]('<',_0x209c0f),_0x1d9aa4=_0x2537f9<0x0?_0xab6342['length']:_0x2537f9,_0xdf7e55=_0xab6342[_0x2ea0ad(0x207)](_0x209c0f,_0x1d9aa4);if((!_0x3ccd0b||_0x1f32aa)&&_0xdf7e55['trim']())return invalidMybatisSource(_0x2ea0ad(0x1fe));if(_0x3ccd0b&&!_0x1f32aa){const _0x261782=decodeXmlEntities(_0xdf7e55);if(_0x261782===null)return invalidMybatisSource('Invalid\x20XML\x20entity\x20reference.');_0x3498e7+=_0x261782;}else _0x3498e7+='\x20';_0x209c0f=_0x1d9aa4;continue;}const _0x5bbaf4=findXmlTagEnd(_0xab6342,_0x209c0f);if(_0x5bbaf4<0x0)return invalidMybatisSource(_0x2ea0ad(0x21e));const _0x3136a8=_0xab6342[_0x2ea0ad(0x207)](_0x209c0f,_0x5bbaf4+0x1),_0x1b7260=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x2ea0ad(0x212)](_0x3136a8);if(!_0x1b7260)return invalidMybatisSource(_0x2ea0ad(0x20a));const _0x1fd6cf=_0x1b7260[0x1]==='/',_0x366ab4=_0x1b7260[0x2]??'',_0x47b82f=_0x366ab4[_0x2ea0ad(0x1d8)](),_0x452f97=_0x1b7260[0x3]??'',_0x52338d=_0x1b7260[0x4]==='/',_0x965e88=MYBATIS_OUTER_TAGS[_0x2ea0ad(0x210)](_0x47b82f);if(!_0x965e88&&!MYBATIS_DYNAMIC_TAGS[_0x2ea0ad(0x1dc)](_0x47b82f))return invalidMybatisSource(_0x2ea0ad(0x1fa)+_0x47b82f+'>.');if(!_0x965e88&&_0x366ab4!==_0x47b82f)return invalidMybatisSource(_0x2ea0ad(0x1db)+_0x366ab4+'>.');if(_0x1fd6cf){if(_0x452f97['trim']()||_0x52338d)return invalidMybatisSource(_0x2ea0ad(0x203)+_0x366ab4+'>.');const _0x46d55e=_0x3542e5['at'](-0x1);if(!_0x46d55e||(_0x46d55e[_0x2ea0ad(0x20b)]?_0x46d55e[_0x2ea0ad(0x20d)]!==_0x47b82f:_0x46d55e[_0x2ea0ad(0x236)]!==_0x366ab4))return invalidMybatisSource(_0x2ea0ad(0x234)+_0x366ab4+'>.');_0x3542e5[_0x2ea0ad(0x22b)]();if(_0x46d55e[_0x2ea0ad(0x20b)])_0x1f32aa=!![];_0x3498e7+=MYBATIS_BRANCH_TAGS[_0x2ea0ad(0x1dc)](_0x47b82f)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x452f97))return invalidMybatisSource(_0x2ea0ad(0x1f2)+_0x366ab4+'>.');if(_0x47b82f==='property'&&(!_0x52338d||_0x3542e5['at'](-0x1)?.['tagName']!=='include'))return invalidMybatisSource(_0x2ea0ad(0x211));if(_0x965e88){if(_0x3ccd0b||_0x3542e5[_0x2ea0ad(0x1e5)]>0x0)return invalidMybatisSource(_0x2ea0ad(0x226));_0x3ccd0b=!![],_0x1f32aa=_0x52338d,_0xa3b2c=_0x965e88;}else{if(!_0x3ccd0b||_0x1f32aa)return invalidMybatisSource(_0x2ea0ad(0x1f8)+_0x366ab4+'>.');}_0x3498e7+=_0x47b82f===_0x2ea0ad(0x223)?'\x20WHERE\x20':_0x47b82f===_0x2ea0ad(0x232)?_0x2ea0ad(0x1f9):_0x47b82f==='include'?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x2ea0ad(0x1dc)](_0x47b82f)&&!_0x52338d?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x52338d&&_0x3542e5[_0x2ea0ad(0x1d3)]({'rawName':_0x366ab4,'tagName':_0x47b82f,'outer':!!_0x965e88});}_0x209c0f=_0x5bbaf4+0x1;}if(_0x3542e5[_0x2ea0ad(0x1e5)]>0x0)return invalidMybatisSource(_0x2ea0ad(0x1d9)+_0x3542e5['at'](-0x1)?.[_0x2ea0ad(0x236)]+'>.');if(!_0x3ccd0b||!_0x1f32aa)return invalidMybatisSource('MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.');return{'sql':_0x3498e7[_0x2ea0ad(0x216)](),'mode':_0x2ea0ad(0x1f4),..._0xa3b2c?{'statementType':_0xa3b2c}:{}};}function hasWellFormedXmlAttributes(_0x3e0b44){const _0x356e64=a314_0x345168;let _0x4702d5=0x0;const _0x429a14=new Set();while(_0x4702d5<_0x3e0b44[_0x356e64(0x1e5)]){while(_0x4702d5<_0x3e0b44['length']&&/\s/[_0x356e64(0x219)](_0x3e0b44[_0x4702d5]??''))_0x4702d5+=0x1;if(_0x4702d5>=_0x3e0b44[_0x356e64(0x1e5)])return!![];const _0x367542=/^[A-Za-z_:][\w:.-]*/['exec'](_0x3e0b44[_0x356e64(0x207)](_0x4702d5)),_0x493b37=_0x367542?.[0x0];if(!_0x493b37||_0x429a14['has'](_0x493b37))return![];_0x429a14[_0x356e64(0x1e7)](_0x493b37),_0x4702d5+=_0x493b37[_0x356e64(0x1e5)];while(_0x4702d5<_0x3e0b44[_0x356e64(0x1e5)]&&/\s/[_0x356e64(0x219)](_0x3e0b44[_0x4702d5]??''))_0x4702d5+=0x1;if(_0x3e0b44[_0x4702d5]!=='=')return![];_0x4702d5+=0x1;while(_0x4702d5<_0x3e0b44[_0x356e64(0x1e5)]&&/\s/[_0x356e64(0x219)](_0x3e0b44[_0x4702d5]??''))_0x4702d5+=0x1;const _0x2343a7=_0x3e0b44[_0x4702d5];if(_0x2343a7!=='\x22'&&_0x2343a7!=='\x27')return![];_0x4702d5+=0x1;const _0x11dc69=_0x3e0b44[_0x356e64(0x22c)](_0x2343a7,_0x4702d5);if(_0x11dc69<0x0)return![];if(decodeXmlEntities(_0x3e0b44['slice'](_0x4702d5,_0x11dc69))===null)return![];_0x4702d5=_0x11dc69+0x1;}return!![];}export function detectSqlSourceMode(_0x25acd2){const _0x2cf843=a314_0x345168;let _0x458349=0x0;const _0x2254bd=()=>{const _0x109964=a314_0x4711;while(_0x458349<_0x25acd2[_0x109964(0x1e5)]&&/\s/[_0x109964(0x219)](_0x25acd2[_0x458349]??''))_0x458349+=0x1;};_0x2254bd();while(_0x458349<_0x25acd2[_0x2cf843(0x1e5)]){if(_0x25acd2[_0x2cf843(0x1e8)](_0x2cf843(0x222),_0x458349)){const _0x57c333=_0x25acd2['indexOf'](_0x2cf843(0x228),_0x458349+0x4);if(_0x57c333<0x0)return _0x2cf843(0x1f4);_0x458349=_0x57c333+0x3,_0x2254bd();continue;}if(_0x25acd2[_0x2cf843(0x1e8)]('<?',_0x458349)){const _0x186c80=_0x25acd2[_0x2cf843(0x22c)]('?>',_0x458349+0x2);if(_0x186c80<0x0)return'mybatisXml';_0x458349=_0x186c80+0x2,_0x2254bd();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x2cf843(0x219)](_0x25acd2['slice'](_0x458349))?_0x2cf843(0x1f4):_0x2cf843(0x229);}function invalidMybatisSource(_0x279fd1){const _0x440178=a314_0x345168;return{'sql':'','mode':_0x440178(0x1f4),'error':_0x279fd1};}function findXmlTagEnd(_0x3d95ec,_0x48238f){let _0x558b4e;for(let _0x48e67a=_0x48238f+0x1;_0x48e67a<_0x3d95ec['length'];_0x48e67a+=0x1){const _0x4a1195=_0x3d95ec[_0x48e67a];if(_0x558b4e){if(_0x4a1195===_0x558b4e)_0x558b4e=undefined;continue;}if(_0x4a1195==='\x22'||_0x4a1195==='\x27'){_0x558b4e=_0x4a1195;continue;}if(_0x4a1195==='>')return _0x48e67a;}return-0x1;}function decodeXmlEntities(_0x344dc2){const _0x132c5e=a314_0x345168;let _0x309273=![];const _0x2fe423=_0x344dc2[_0x132c5e(0x215)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x4d880b=>{const _0x1822d7=_0x132c5e;if(_0x4d880b===_0x1822d7(0x1e2))return'<';if(_0x4d880b===_0x1822d7(0x21a))return'>';if(_0x4d880b===_0x1822d7(0x213))return'\x22';if(_0x4d880b===_0x1822d7(0x204))return'\x27';if(_0x4d880b===_0x1822d7(0x21d))return'&';const _0x3bc769=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x1822d7(0x212)](_0x4d880b);if(_0x3bc769){const _0x5e2527=_0x3bc769[0x1],_0x3a2d3e=_0x3bc769[0x2],_0x2849c7=Number['parseInt'](_0x5e2527??_0x3a2d3e??'',_0x5e2527?0x10:0xa);if(isValidXmlCharacter(_0x2849c7))return String[_0x1822d7(0x22f)](_0x2849c7);}return _0x309273=!![],'';});return _0x309273?null:_0x2fe423;}function isValidXmlCharacter(_0x6cf101){return _0x6cf101===0x9||_0x6cf101===0xa||_0x6cf101===0xd||_0x6cf101>=0x20&&_0x6cf101<=0xd7ff||_0x6cf101>=0xe000&&_0x6cf101<=0xfffd||_0x6cf101>=0x10000&&_0x6cf101<=0x10ffff;}export function detectSqlType(_0x38059b){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x38059b));}function detectNormalizedSqlType(_0x1a774a){const _0xffd04e=a314_0x345168;if(_0x1a774a[_0xffd04e(0x1f3)])return{'type':_0xffd04e(0x1ed),'isSelectOnly':![],'isDangerous':![],'reason':_0x1a774a['error']};if(!_0x1a774a[_0xffd04e(0x229)]['trim']())return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0xffd04e(0x1f1)};const _0xc181e6=tokenizeSqlForTypeAnalysis(_0x1a774a[_0xffd04e(0x229)]),_0x5bd535=_0xc181e6[_0xffd04e(0x1ff)](_0x392cb7=>_0x392cb7!==MYBATIS_DYNAMIC_START_MARKER&&_0x392cb7!==MYBATIS_DYNAMIC_END_MARKER),_0x5a8b33=findMainStatementIndex(_0x5bd535);if(_0x5a8b33<0x0)return{'type':_0xffd04e(0x1ed),'isSelectOnly':![],'isDangerous':![],'reason':_0xffd04e(0x1e4)};const _0x250d74=_0x5bd535[_0x5a8b33]??'',_0x3b2262=_0x1a774a[_0xffd04e(0x1d1)]??_0x250d74,_0x214454=_0xc181e6[_0xffd04e(0x1da)](_0x168346=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0xffd04e(0x219)](_0x168346)),_0x22ff01=new Set();let _0x8fe49b=![];for(let _0x10f0c8=0x0;_0x10f0c8<_0xc181e6[_0xffd04e(0x1e5)];_0x10f0c8+=0x1){const _0x130fa2=_0xc181e6[_0x10f0c8];(_0x130fa2===_0xffd04e(0x237)||_0x130fa2===_0xffd04e(0x1ee))&&isLockingClauseKeyword(_0xc181e6,_0x10f0c8)&&(_0x22ff01[_0xffd04e(0x1e7)](_0x10f0c8),_0x8fe49b=!![]);if(_0xc181e6[_0xffd04e(0x207)](_0x10f0c8,_0x10f0c8+0x4)['join']('\x20')===_0xffd04e(0x239))_0x8fe49b=!![];}if(_0x3b2262===_0xffd04e(0x202)){const _0xb7529b=_0xc181e6[_0xffd04e(0x1da)]((_0x2df670,_0x394b01)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/['test'](_0x2df670)&&!_0x22ff01[_0xffd04e(0x1dc)](_0x394b01));return{'type':'SELECT','isSelectOnly':!_0xb7529b&&!_0x8fe49b,'isLockingRead':_0x8fe49b,'isDangerous':_0xb7529b,'reason':_0xb7529b?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x3b2262===_0xffd04e(0x1eb))return{'type':_0xffd04e(0x1eb),'isSelectOnly':![],'isDangerous':_0x214454,'reason':_0x214454?_0xffd04e(0x1e3):undefined};if(_0x3b2262===_0xffd04e(0x237))return{'type':_0xffd04e(0x237),'isSelectOnly':![],'isDangerous':_0x214454,'reason':_0x214454?_0xffd04e(0x1e3):undefined};if(_0x3b2262===_0xffd04e(0x227))return{'type':_0xffd04e(0x227),'isSelectOnly':![],'isDangerous':!![],'reason':'DELETE\x20statements\x20require\x20explicit\x20review'};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0xffd04e(0x219)](_0x250d74))return{'type':_0xffd04e(0x201),'isSelectOnly':![],'isDangerous':!![],'reason':_0xffd04e(0x221)};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0x27aa50,_0x2515f4){const _0xe9cd94=a314_0x345168,_0x5d1068=_0x27aa50[_0x2515f4]===_0xe9cd94(0x237)?[[_0xe9cd94(0x205)],[_0xe9cd94(0x205),'NO',_0xe9cd94(0x20c)]]:[['FOR'],[_0xe9cd94(0x205),_0xe9cd94(0x20c)]],_0x3deaee=_0x5d1068[_0xe9cd94(0x1da)](_0xf13a18=>{const _0x47ddf9=_0xe9cd94,_0x5e5bae=_0x2515f4-_0xf13a18[_0x47ddf9(0x1e5)];return _0x5e5bae>=0x0&&_0x27aa50[_0x47ddf9(0x207)](_0x5e5bae,_0x2515f4)['join']('\x20')===_0xf13a18[_0x47ddf9(0x1e6)]('\x20');});if(!_0x3deaee)return![];return!_0x27aa50['slice'](_0x2515f4+0x1,_0x2515f4+0x5)[_0xe9cd94(0x200)](_0xe9cd94(0x1dd));}function findMainStatementIndex(_0x4d72d6){const _0x512aee=a314_0x345168;if(_0x4d72d6[0x0]!==_0x512aee(0x238))return 0x0;let _0xb0fce2=_0x4d72d6[0x1]===_0x512aee(0x1de)?0x2:0x1;while(_0xb0fce2<_0x4d72d6[_0x512aee(0x1e5)]){const _0xdf70af=_0x4d72d6[_0xb0fce2];if(!_0xdf70af||!(/^[A-Z_][\w$]*$/[_0x512aee(0x219)](_0xdf70af)||/^[`"]/[_0x512aee(0x219)](_0xdf70af)))return-0x1;_0xb0fce2+=0x1;if(_0x4d72d6[_0xb0fce2]==='('){_0xb0fce2=skipSqlParentheses(_0x4d72d6,_0xb0fce2);if(_0xb0fce2<0x0)return-0x1;}if(_0x4d72d6[_0xb0fce2]!=='AS')return-0x1;_0xb0fce2+=0x1;if(_0x4d72d6[_0xb0fce2]===_0x512aee(0x22e)&&_0x4d72d6[_0xb0fce2+0x1]===_0x512aee(0x208))_0xb0fce2+=0x2;else{if(_0x4d72d6[_0xb0fce2]===_0x512aee(0x208))_0xb0fce2+=0x1;}_0xb0fce2=skipSqlParentheses(_0x4d72d6,_0xb0fce2);if(_0xb0fce2<0x0)return-0x1;if(_0x4d72d6[_0xb0fce2]!==','){const _0x1dedbc=_0x4d72d6[_0xb0fce2]==='('?_0xb0fce2+0x1:_0xb0fce2;return/^(SELECT|INSERT|UPDATE|DELETE)$/[_0x512aee(0x219)](_0x4d72d6[_0x1dedbc]??'')?_0x1dedbc:-0x1;}_0xb0fce2+=0x1;}return-0x1;}function skipSqlParentheses(_0x2b5126,_0x6d656e){const _0x46cb49=a314_0x345168;if(_0x2b5126[_0x6d656e]!=='(')return-0x1;let _0x23a353=0x0;for(let _0x1004ad=_0x6d656e;_0x1004ad<_0x2b5126[_0x46cb49(0x1e5)];_0x1004ad+=0x1){const _0x13b1ec=_0x2b5126[_0x1004ad];if(_0x13b1ec===';')return-0x1;if(_0x13b1ec==='(')_0x23a353+=0x1;if(_0x13b1ec===')'&&--_0x23a353===0x0)return _0x1004ad+0x1;}return-0x1;}function stripStaticAnalysisMarkers(_0x1b27aa){const _0x23191b=a314_0x345168;return _0x1b27aa[_0x23191b(0x21c)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x23191b(0x21c)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x23191b(0x21c)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0x26c75b){const _0x4dd52a=a314_0x345168,_0x36c215=[],_0xbc5ddc=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x10e735 of _0x26c75b[_0x4dd52a(0x1e1)](_0xbc5ddc)){const _0x1da240=_0x10e735[0x0];if(_0x1da240[_0x4dd52a(0x1e8)]('/*')||_0x1da240[_0x4dd52a(0x1e8)]('--')||_0x1da240[_0x4dd52a(0x1e8)]('#')&&!_0x1da240[_0x4dd52a(0x1e8)]('#{'))continue;_0x36c215['push'](/^["`]/[_0x4dd52a(0x219)](_0x1da240)?_0x1da240:/^[\x27@#$]/[_0x4dd52a(0x219)](_0x1da240)?'?':_0x1da240[_0x4dd52a(0x231)]());}return _0x36c215;}function extractTables(_0x5b92b5,_0x319f27){const _0xc91763=a314_0x345168,_0x319c69=_0x5b92b5[_0xc91763(0x215)](/#\{[^}]*\}/g,'?')[_0xc91763(0x215)](/\$\{[^}]*\}/g,'?')['replace'](/'[^']*'/g,'\x27\x27')[_0xc91763(0x215)](/--.*$/gm,'')['replace'](/\/\*[\s\S]*?\*\//g,''),_0x450d9c=[],_0xbd5a84=_0x319c69[_0xc91763(0x1fc)](/FROM\s+([^\s,)(]+)/i);addTable(_0x450d9c,_0xbd5a84?.[0x1]);for(const _0x2c20fc of _0x319c69[_0xc91763(0x1e1)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x450d9c,_0x2c20fc[0x1]);}const _0x2a1da2=_0x319c69['match'](/INTO\s+([^\s(]+)/i);addTable(_0x450d9c,_0x2a1da2?.[0x1]);if(_0x319f27===_0xc91763(0x237)){const _0xe6229a=_0x319c69['match'](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x450d9c,_0xe6229a?.[0x1]);}return _0x450d9c;}function addTable(_0x409c4b,_0x424869){const _0x22a351=_0x424869?.['replace'](/[`"]/g,'');_0x22a351&&_0x22a351!==UNRESOLVED_SQL_FRAGMENT&&!_0x409c4b['includes'](_0x22a351)&&_0x409c4b['push'](_0x22a351);}function extractParameters(_0x54b47e){const _0x3adc17=a314_0x345168,_0xa1b976=new Set();for(const _0x20e8c0 of _0x54b47e[_0x3adc17(0x1e1)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x20e8c0[0x1])_0xa1b976['add'](_0x20e8c0[0x1]);}return Array[_0x3adc17(0x22d)](_0xa1b976);}export function validateSql(_0x50baea){const _0x49c98b=a314_0x345168,_0x4d7cc3=normalizeSqlForStaticAnalysis(_0x50baea),_0x1d498b=detectNormalizedSqlType(_0x4d7cc3),_0x49dfe8=stripStaticAnalysisMarkers(_0x4d7cc3['sql']),_0x514b36=_0x4d7cc3['error']?[]:extractTables(_0x49dfe8,_0x1d498b['type']),_0x23e021=_0x4d7cc3[_0x49c98b(0x1f3)]?[]:extractParameters(_0x49dfe8);if(_0x1d498b[_0x49c98b(0x1e0)])return{'valid':![],'sqlType':_0x1d498b,'tables':_0x514b36,'parameters':_0x23e021,'message':_0x1d498b[_0x49c98b(0x1f6)]||_0x1d498b[_0x49c98b(0x214)]+_0x49c98b(0x1f7)};if(_0x1d498b[_0x49c98b(0x214)]==='UNKNOWN')return{'valid':![],'sqlType':_0x1d498b,'tables':_0x514b36,'parameters':_0x23e021,'message':_0x4d7cc3[_0x49c98b(0x1f3)]?_0x49c98b(0x1ec)+_0x4d7cc3[_0x49c98b(0x1f3)]:_0x1d498b[_0x49c98b(0x1f6)]?_0x49c98b(0x1ec)+_0x1d498b[_0x49c98b(0x1f6)]:_0x49c98b(0x1ef)};return{'valid':!![],'sqlType':_0x1d498b,'tables':_0x514b36,'parameters':_0x23e021,'message':_0x1d498b[_0x49c98b(0x214)]+_0x49c98b(0x235)+(_0x514b36['length']?_0x514b36[_0x49c98b(0x1e6)](',\x20'):_0x49c98b(0x22a))+(_0x23e021[_0x49c98b(0x1e5)]?'\x20with\x20parameters:\x20'+_0x23e021[_0x49c98b(0x1e6)](',\x20'):'')};}
|
|
1
|
+
const a315_0x4fbd62=a315_0x37ec;(function(_0x5746af,_0x3cf5c3){const _0x3de4d2=a315_0x37ec,_0x1c3f38=_0x5746af();while(!![]){try{const _0x34eac1=-parseInt(_0x3de4d2(0x84))/0x1*(-parseInt(_0x3de4d2(0xdd))/0x2)+-parseInt(_0x3de4d2(0xc7))/0x3+parseInt(_0x3de4d2(0x7f))/0x4*(parseInt(_0x3de4d2(0x9a))/0x5)+-parseInt(_0x3de4d2(0x9d))/0x6*(-parseInt(_0x3de4d2(0xaa))/0x7)+-parseInt(_0x3de4d2(0xc1))/0x8*(-parseInt(_0x3de4d2(0xc8))/0x9)+-parseInt(_0x3de4d2(0x83))/0xa*(parseInt(_0x3de4d2(0x95))/0xb)+-parseInt(_0x3de4d2(0x81))/0xc*(-parseInt(_0x3de4d2(0x9c))/0xd);if(_0x34eac1===_0x3cf5c3)break;else _0x1c3f38['push'](_0x1c3f38['shift']());}catch(_0x7f53ab){_0x1c3f38['push'](_0x1c3f38['shift']());}}}(a315_0x2616,0xb53df));const MYBATIS_OUTER_TAGS=new Map([[a315_0x4fbd62(0xd4),a315_0x4fbd62(0x80)],[a315_0x4fbd62(0xd6),a315_0x4fbd62(0xc2)],[a315_0x4fbd62(0xb5),a315_0x4fbd62(0xad)],['delete',a315_0x4fbd62(0x8b)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a315_0x4fbd62(0x94),a315_0x4fbd62(0xbe),a315_0x4fbd62(0xb8),a315_0x4fbd62(0xd7),a315_0x4fbd62(0x7d),a315_0x4fbd62(0xbf),a315_0x4fbd62(0x9e),a315_0x4fbd62(0x87),'include','property']),MYBATIS_BRANCH_TAGS=new Set(['if',a315_0x4fbd62(0xbe),a315_0x4fbd62(0xb8),'when',a315_0x4fbd62(0x7d)]);export const MYBATIS_DYNAMIC_START_MARKER=a315_0x4fbd62(0xe0);export const MYBATIS_DYNAMIC_END_MARKER=a315_0x4fbd62(0x92);function a315_0x2616(){const _0xa0ada5=['otherwise','fromCodePoint','236392WiRPxG','SELECT','24wqeeaK','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','14792170ulEMbm','379aOimuQ','DDL\x20statements\x20require\x20explicit\x20review','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','bind','from',''','tagName','DELETE','DELETE\x20statements\x20require\x20explicit\x20review','statementType','exec','length','add','replace','__RABETBASE_MYBATIS_DYNAMIC_END__','SQL\x20content\x20is\x20empty','where','11KKnxwa','\x20query\x20targeting\x20','SET','has','outer','85WDafSb',')\x5cb','397319jxPVPe','669198rZYTtV','set','join','MATERIALIZED','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','pop','SHARE','sql','LOCK\x20IN\x20SHARE\x20MODE','<![CDATA[',']]>','get','77idTIWK','rawName','some','UPDATE','>','error','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','unknown\x20table(s)','test','reason','update','mybatisXml','<!--','choose','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','NOT','include','keys','startsWith','foreach','trim','\x20with\x20parameters:\x20','8JgOKdO','INSERT','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','FOR','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','2135436xdGTWc','2348847tslBeR','matchAll','push','slice','match','RECURSIVE','toUpperCase','\x20WHERE\x20','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','UNKNOWN','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','select','string','insert','when','indexOf','replaceAll','Unable\x20to\x20detect\x20SQL\x20type.\x20','property','\x20SET\x20','2004GVEJZL','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','WITH','__RABETBASE_MYBATIS_DYNAMIC_START__','Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.','filter','-->','includes','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','type'];a315_0x2616=function(){return _0xa0ada5;};return a315_0x2616();}export const MYBATIS_INCLUDE_MARKER=a315_0x4fbd62(0xc4);const UNRESOLVED_SQL_FRAGMENT=a315_0x4fbd62(0xde),MYBATIS_OUTER_TAG_PATTERN=new RegExp('^<\x5cs*(?:'+[...MYBATIS_OUTER_TAGS[a315_0x4fbd62(0xbc)]()][a315_0x4fbd62(0x9f)]('|')+a315_0x4fbd62(0x9b),'i');export function normalizeSqlForStaticAnalysis(_0x2bde26){const _0x3fc836=a315_0x4fbd62,_0x2089ca=typeof _0x2bde26===_0x3fc836(0xd5)?_0x2bde26:'';if(detectSqlSourceMode(_0x2089ca)===_0x3fc836(0xa5))return{'sql':_0x2089ca,'mode':'sql'};let _0x4fcb2d=0x0,_0x5e9012='',_0x1bfb69,_0x5a5580=![],_0x4d3263=![];const _0x5a0667=[];while(_0x4fcb2d<_0x2089ca[_0x3fc836(0x8f)]){if(_0x2089ca[_0x3fc836(0xbd)](_0x3fc836(0xb7),_0x4fcb2d)){const _0x3a80fd=_0x2089ca[_0x3fc836(0xd8)](_0x3fc836(0xe3),_0x4fcb2d+0x4);if(_0x3a80fd<0x0)return invalidMybatisSource('Unterminated\x20XML\x20comment.');_0x5e9012+='\x20',_0x4fcb2d=_0x3a80fd+0x3;continue;}if(_0x2089ca[_0x3fc836(0xbd)](_0x3fc836(0xa7),_0x4fcb2d)){if(!_0x5a5580||_0x4d3263)return invalidMybatisSource(_0x3fc836(0xd3));const _0xed72e3=_0x2089ca[_0x3fc836(0xd8)](_0x3fc836(0xa8),_0x4fcb2d+0x9);if(_0xed72e3<0x0)return invalidMybatisSource('Unterminated\x20CDATA\x20section.');_0x5e9012+=_0x2089ca[_0x3fc836(0xcb)](_0x4fcb2d+0x9,_0xed72e3),_0x4fcb2d=_0xed72e3+0x3;continue;}if(_0x2089ca[_0x3fc836(0xbd)]('<?',_0x4fcb2d)){if(_0x5a5580)return invalidMybatisSource(_0x3fc836(0xd1));const _0x5a544d=_0x2089ca[_0x3fc836(0xd8)]('?>',_0x4fcb2d+0x2);if(_0x5a544d<0x0)return invalidMybatisSource('Unterminated\x20XML\x20declaration.');_0x5e9012+='\x20',_0x4fcb2d=_0x5a544d+0x2;continue;}if(_0x2089ca[_0x4fcb2d]!=='<'){const _0x4044c3=_0x2089ca[_0x3fc836(0xd8)]('<',_0x4fcb2d),_0x30fc7a=_0x4044c3<0x0?_0x2089ca[_0x3fc836(0x8f)]:_0x4044c3,_0x112ca9=_0x2089ca[_0x3fc836(0xcb)](_0x4fcb2d,_0x30fc7a);if((!_0x5a5580||_0x4d3263)&&_0x112ca9[_0x3fc836(0xbf)]())return invalidMybatisSource(_0x3fc836(0xb9));if(_0x5a5580&&!_0x4d3263){const _0x41497c=decodeXmlEntities(_0x112ca9);if(_0x41497c===null)return invalidMybatisSource('Invalid\x20XML\x20entity\x20reference.');_0x5e9012+=_0x41497c;}else _0x5e9012+='\x20';_0x4fcb2d=_0x30fc7a;continue;}const _0x3389a6=findXmlTagEnd(_0x2089ca,_0x4fcb2d);if(_0x3389a6<0x0)return invalidMybatisSource('Unterminated\x20MyBatis\x20XML\x20tag.');const _0xa6f9ba=_0x2089ca['slice'](_0x4fcb2d,_0x3389a6+0x1),_0x54ff18=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x3fc836(0x8e)](_0xa6f9ba);if(!_0x54ff18)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20tag.');const _0x112295=_0x54ff18[0x1]==='/',_0x11b832=_0x54ff18[0x2]??'',_0x8fdb09=_0x11b832['toLowerCase'](),_0x2d8ff1=_0x54ff18[0x3]??'',_0x2e358b=_0x54ff18[0x4]==='/',_0x5c1cda=MYBATIS_OUTER_TAGS[_0x3fc836(0xa9)](_0x8fdb09);if(!_0x5c1cda&&!MYBATIS_DYNAMIC_TAGS[_0x3fc836(0x98)](_0x8fdb09))return invalidMybatisSource(_0x3fc836(0x82)+_0x8fdb09+'>.');if(!_0x5c1cda&&_0x11b832!==_0x8fdb09)return invalidMybatisSource(_0x3fc836(0xc3)+_0x11b832+'>.');if(_0x112295){if(_0x2d8ff1[_0x3fc836(0xbf)]()||_0x2e358b)return invalidMybatisSource(_0x3fc836(0xa2)+_0x11b832+'>.');const _0x4ebea8=_0x5a0667['at'](-0x1);if(!_0x4ebea8||(_0x4ebea8['outer']?_0x4ebea8[_0x3fc836(0x8a)]!==_0x8fdb09:_0x4ebea8['rawName']!==_0x11b832))return invalidMybatisSource(_0x3fc836(0x7b)+_0x11b832+'>.');_0x5a0667[_0x3fc836(0xa3)]();if(_0x4ebea8[_0x3fc836(0x99)])_0x4d3263=!![];_0x5e9012+=MYBATIS_BRANCH_TAGS[_0x3fc836(0x98)](_0x8fdb09)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x2d8ff1))return invalidMybatisSource(_0x3fc836(0xc6)+_0x11b832+'>.');if(_0x8fdb09===_0x3fc836(0xdb)&&(!_0x2e358b||_0x5a0667['at'](-0x1)?.['tagName']!==_0x3fc836(0xbb)))return invalidMybatisSource('MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.');if(_0x5c1cda){if(_0x5a5580||_0x5a0667[_0x3fc836(0x8f)]>0x0)return invalidMybatisSource(_0x3fc836(0xb1));_0x5a5580=!![],_0x4d3263=_0x2e358b,_0x1bfb69=_0x5c1cda;}else{if(!_0x5a5580||_0x4d3263)return invalidMybatisSource(_0x3fc836(0xb0)+_0x11b832+'>.');}_0x5e9012+=_0x8fdb09===_0x3fc836(0x94)?_0x3fc836(0xcf):_0x8fdb09===_0x3fc836(0x9e)?_0x3fc836(0xdc):_0x8fdb09==='include'?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS['has'](_0x8fdb09)&&!_0x2e358b?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x2e358b&&_0x5a0667[_0x3fc836(0xca)]({'rawName':_0x11b832,'tagName':_0x8fdb09,'outer':!!_0x5c1cda});}_0x4fcb2d=_0x3389a6+0x1;}if(_0x5a0667['length']>0x0)return invalidMybatisSource(_0x3fc836(0xd0)+_0x5a0667['at'](-0x1)?.[_0x3fc836(0xab)]+'>.');if(!_0x5a5580||!_0x4d3263)return invalidMybatisSource(_0x3fc836(0xa1));return{'sql':_0x5e9012[_0x3fc836(0xbf)](),'mode':_0x3fc836(0xb6),..._0x1bfb69?{'statementType':_0x1bfb69}:{}};}function hasWellFormedXmlAttributes(_0x55221d){const _0x1b8099=a315_0x4fbd62;let _0x33ef0e=0x0;const _0x54bbbc=new Set();while(_0x33ef0e<_0x55221d['length']){while(_0x33ef0e<_0x55221d[_0x1b8099(0x8f)]&&/\s/[_0x1b8099(0xb3)](_0x55221d[_0x33ef0e]??''))_0x33ef0e+=0x1;if(_0x33ef0e>=_0x55221d[_0x1b8099(0x8f)])return!![];const _0x562553=/^[A-Za-z_:][\w:.-]*/[_0x1b8099(0x8e)](_0x55221d['slice'](_0x33ef0e)),_0x38e1c3=_0x562553?.[0x0];if(!_0x38e1c3||_0x54bbbc[_0x1b8099(0x98)](_0x38e1c3))return![];_0x54bbbc[_0x1b8099(0x90)](_0x38e1c3),_0x33ef0e+=_0x38e1c3[_0x1b8099(0x8f)];while(_0x33ef0e<_0x55221d[_0x1b8099(0x8f)]&&/\s/[_0x1b8099(0xb3)](_0x55221d[_0x33ef0e]??''))_0x33ef0e+=0x1;if(_0x55221d[_0x33ef0e]!=='=')return![];_0x33ef0e+=0x1;while(_0x33ef0e<_0x55221d[_0x1b8099(0x8f)]&&/\s/['test'](_0x55221d[_0x33ef0e]??''))_0x33ef0e+=0x1;const _0xbdd69e=_0x55221d[_0x33ef0e];if(_0xbdd69e!=='\x22'&&_0xbdd69e!=='\x27')return![];_0x33ef0e+=0x1;const _0x2076d5=_0x55221d[_0x1b8099(0xd8)](_0xbdd69e,_0x33ef0e);if(_0x2076d5<0x0)return![];if(decodeXmlEntities(_0x55221d['slice'](_0x33ef0e,_0x2076d5))===null)return![];_0x33ef0e=_0x2076d5+0x1;}return!![];}export function detectSqlSourceMode(_0x5668cd){const _0x2ae894=a315_0x4fbd62;let _0x520e81=0x0;const _0x271cff=()=>{const _0x574084=a315_0x37ec;while(_0x520e81<_0x5668cd['length']&&/\s/[_0x574084(0xb3)](_0x5668cd[_0x520e81]??''))_0x520e81+=0x1;};_0x271cff();while(_0x520e81<_0x5668cd[_0x2ae894(0x8f)]){if(_0x5668cd['startsWith'](_0x2ae894(0xb7),_0x520e81)){const _0x19d592=_0x5668cd[_0x2ae894(0xd8)](_0x2ae894(0xe3),_0x520e81+0x4);if(_0x19d592<0x0)return _0x2ae894(0xb6);_0x520e81=_0x19d592+0x3,_0x271cff();continue;}if(_0x5668cd[_0x2ae894(0xbd)]('<?',_0x520e81)){const _0x47ee5c=_0x5668cd[_0x2ae894(0xd8)]('?>',_0x520e81+0x2);if(_0x47ee5c<0x0)return'mybatisXml';_0x520e81=_0x47ee5c+0x2,_0x271cff();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x2ae894(0xb3)](_0x5668cd['slice'](_0x520e81))?_0x2ae894(0xb6):_0x2ae894(0xa5);}function invalidMybatisSource(_0x447f06){const _0x40fd9a=a315_0x4fbd62;return{'sql':'','mode':_0x40fd9a(0xb6),'error':_0x447f06};}function findXmlTagEnd(_0x33d9a2,_0x3e11e3){const _0x566750=a315_0x4fbd62;let _0x29a121;for(let _0x1260d4=_0x3e11e3+0x1;_0x1260d4<_0x33d9a2[_0x566750(0x8f)];_0x1260d4+=0x1){const _0x16b0a0=_0x33d9a2[_0x1260d4];if(_0x29a121){if(_0x16b0a0===_0x29a121)_0x29a121=undefined;continue;}if(_0x16b0a0==='\x22'||_0x16b0a0==='\x27'){_0x29a121=_0x16b0a0;continue;}if(_0x16b0a0==='>')return _0x1260d4;}return-0x1;}function decodeXmlEntities(_0x25896d){const _0x50d27b=a315_0x4fbd62;let _0x286e70=![];const _0x9b636b=_0x25896d[_0x50d27b(0x91)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x13d5c2=>{const _0x3dabf1=_0x50d27b;if(_0x13d5c2==='<')return'<';if(_0x13d5c2===_0x3dabf1(0xae))return'>';if(_0x13d5c2==='"')return'\x22';if(_0x13d5c2===_0x3dabf1(0x89))return'\x27';if(_0x13d5c2==='&')return'&';const _0x5011d2=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x3dabf1(0x8e)](_0x13d5c2);if(_0x5011d2){const _0x33fc3d=_0x5011d2[0x1],_0x28b1d2=_0x5011d2[0x2],_0xd11612=Number['parseInt'](_0x33fc3d??_0x28b1d2??'',_0x33fc3d?0x10:0xa);if(isValidXmlCharacter(_0xd11612))return String[_0x3dabf1(0x7e)](_0xd11612);}return _0x286e70=!![],'';});return _0x286e70?null:_0x9b636b;}function isValidXmlCharacter(_0x3eddd9){return _0x3eddd9===0x9||_0x3eddd9===0xa||_0x3eddd9===0xd||_0x3eddd9>=0x20&&_0x3eddd9<=0xd7ff||_0x3eddd9>=0xe000&&_0x3eddd9<=0xfffd||_0x3eddd9>=0x10000&&_0x3eddd9<=0x10ffff;}export function detectSqlType(_0x4b3993){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x4b3993));}function detectNormalizedSqlType(_0x50e77c){const _0x3ea54e=a315_0x4fbd62;if(_0x50e77c[_0x3ea54e(0xaf)])return{'type':_0x3ea54e(0xd2),'isSelectOnly':![],'isDangerous':![],'reason':_0x50e77c['error']};if(!_0x50e77c['sql'][_0x3ea54e(0xbf)]())return{'type':_0x3ea54e(0xd2),'isSelectOnly':![],'isDangerous':![],'reason':_0x3ea54e(0x93)};const _0x29a8a8=tokenizeSqlForTypeAnalysis(_0x50e77c['sql']),_0x56138d=_0x29a8a8[_0x3ea54e(0xe2)](_0x318ae4=>_0x318ae4!==MYBATIS_DYNAMIC_START_MARKER&&_0x318ae4!==MYBATIS_DYNAMIC_END_MARKER),_0x4d5640=findMainStatementIndex(_0x56138d);if(_0x4d5640<0x0)return{'type':_0x3ea54e(0xd2),'isSelectOnly':![],'isDangerous':![],'reason':_0x3ea54e(0xe1)};const _0x4e3b54=_0x56138d[_0x4d5640]??'',_0x224160=_0x50e77c[_0x3ea54e(0x8d)]??_0x4e3b54,_0x9baf2a=_0x29a8a8[_0x3ea54e(0xac)](_0x1545fa=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x3ea54e(0xb3)](_0x1545fa)),_0x5f3ad9=new Set();let _0x25b929=![];for(let _0x5d3411=0x0;_0x5d3411<_0x29a8a8[_0x3ea54e(0x8f)];_0x5d3411+=0x1){const _0x50a67e=_0x29a8a8[_0x5d3411];(_0x50a67e===_0x3ea54e(0xad)||_0x50a67e===_0x3ea54e(0xa4))&&isLockingClauseKeyword(_0x29a8a8,_0x5d3411)&&(_0x5f3ad9[_0x3ea54e(0x90)](_0x5d3411),_0x25b929=!![]);if(_0x29a8a8[_0x3ea54e(0xcb)](_0x5d3411,_0x5d3411+0x4)[_0x3ea54e(0x9f)]('\x20')===_0x3ea54e(0xa6))_0x25b929=!![];}if(_0x224160===_0x3ea54e(0x80)){const _0x16bd27=_0x29a8a8[_0x3ea54e(0xac)]((_0x4c0506,_0x1420c3)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x3ea54e(0xb3)](_0x4c0506)&&!_0x5f3ad9[_0x3ea54e(0x98)](_0x1420c3));return{'type':_0x3ea54e(0x80),'isSelectOnly':!_0x16bd27&&!_0x25b929,'isLockingRead':_0x25b929,'isDangerous':_0x16bd27,'reason':_0x16bd27?_0x3ea54e(0x86):undefined};}if(_0x224160===_0x3ea54e(0xc2))return{'type':'INSERT','isSelectOnly':![],'isDangerous':_0x9baf2a,'reason':_0x9baf2a?_0x3ea54e(0x7a):undefined};if(_0x224160==='UPDATE')return{'type':_0x3ea54e(0xad),'isSelectOnly':![],'isDangerous':_0x9baf2a,'reason':_0x9baf2a?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x224160===_0x3ea54e(0x8b))return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':_0x3ea54e(0x8c)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x3ea54e(0xb3)](_0x4e3b54))return{'type':'DDL','isSelectOnly':![],'isDangerous':!![],'reason':_0x3ea54e(0x85)};return{'type':_0x3ea54e(0xd2),'isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0xc567f4,_0x11e0a9){const _0x96a5a8=a315_0x4fbd62,_0x4cecf5=_0xc567f4[_0x11e0a9]===_0x96a5a8(0xad)?[[_0x96a5a8(0xc5)],[_0x96a5a8(0xc5),'NO','KEY']]:[['FOR'],['FOR','KEY']],_0x276466=_0x4cecf5[_0x96a5a8(0xac)](_0xdc575f=>{const _0xb9aada=_0x96a5a8,_0x2abd96=_0x11e0a9-_0xdc575f[_0xb9aada(0x8f)];return _0x2abd96>=0x0&&_0xc567f4[_0xb9aada(0xcb)](_0x2abd96,_0x11e0a9)[_0xb9aada(0x9f)]('\x20')===_0xdc575f['join']('\x20');});if(!_0x276466)return![];return!_0xc567f4['slice'](_0x11e0a9+0x1,_0x11e0a9+0x5)[_0x96a5a8(0x79)](_0x96a5a8(0x97));}function findMainStatementIndex(_0x202b43){const _0x5d0e8c=a315_0x4fbd62;if(_0x202b43[0x0]!==_0x5d0e8c(0xdf))return 0x0;let _0x2d0851=_0x202b43[0x1]===_0x5d0e8c(0xcd)?0x2:0x1;while(_0x2d0851<_0x202b43['length']){const _0x222ee0=_0x202b43[_0x2d0851];if(!_0x222ee0||!(/^[A-Z_][\w$]*$/[_0x5d0e8c(0xb3)](_0x222ee0)||/^[`"]/[_0x5d0e8c(0xb3)](_0x222ee0)))return-0x1;_0x2d0851+=0x1;if(_0x202b43[_0x2d0851]==='('){_0x2d0851=skipSqlParentheses(_0x202b43,_0x2d0851);if(_0x2d0851<0x0)return-0x1;}if(_0x202b43[_0x2d0851]!=='AS')return-0x1;_0x2d0851+=0x1;if(_0x202b43[_0x2d0851]===_0x5d0e8c(0xba)&&_0x202b43[_0x2d0851+0x1]===_0x5d0e8c(0xa0))_0x2d0851+=0x2;else{if(_0x202b43[_0x2d0851]==='MATERIALIZED')_0x2d0851+=0x1;}_0x2d0851=skipSqlParentheses(_0x202b43,_0x2d0851);if(_0x2d0851<0x0)return-0x1;if(_0x202b43[_0x2d0851]!==','){const _0x569d73=_0x202b43[_0x2d0851]==='('?_0x2d0851+0x1:_0x2d0851;return/^(SELECT|INSERT|UPDATE|DELETE)$/['test'](_0x202b43[_0x569d73]??'')?_0x569d73:-0x1;}_0x2d0851+=0x1;}return-0x1;}function skipSqlParentheses(_0x4e3196,_0x7f68bc){const _0x304583=a315_0x4fbd62;if(_0x4e3196[_0x7f68bc]!=='(')return-0x1;let _0xe3056c=0x0;for(let _0x246248=_0x7f68bc;_0x246248<_0x4e3196[_0x304583(0x8f)];_0x246248+=0x1){const _0xb0ffd0=_0x4e3196[_0x246248];if(_0xb0ffd0===';')return-0x1;if(_0xb0ffd0==='(')_0xe3056c+=0x1;if(_0xb0ffd0===')'&&--_0xe3056c===0x0)return _0x246248+0x1;}return-0x1;}function stripStaticAnalysisMarkers(_0x506624){const _0x34d333=a315_0x4fbd62;return _0x506624[_0x34d333(0xd9)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x34d333(0xd9)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0xdb4ecb){const _0x1cc557=a315_0x4fbd62,_0xe492d1=[],_0x4d88db=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x337803 of _0xdb4ecb[_0x1cc557(0xc9)](_0x4d88db)){const _0x2afdbc=_0x337803[0x0];if(_0x2afdbc['startsWith']('/*')||_0x2afdbc[_0x1cc557(0xbd)]('--')||_0x2afdbc[_0x1cc557(0xbd)]('#')&&!_0x2afdbc[_0x1cc557(0xbd)]('#{'))continue;_0xe492d1['push'](/^["`]/[_0x1cc557(0xb3)](_0x2afdbc)?_0x2afdbc:/^[\x27@#$]/['test'](_0x2afdbc)?'?':_0x2afdbc[_0x1cc557(0xce)]());}return _0xe492d1;}function a315_0x37ec(_0x41caff,_0x8da33d){_0x41caff=_0x41caff-0x79;const _0x261685=a315_0x2616();let _0x37ec43=_0x261685[_0x41caff];return _0x37ec43;}function extractTables(_0x2c8711,_0x89c6b7){const _0x570883=a315_0x4fbd62,_0x717ba0=_0x2c8711['replace'](/#\{[^}]*\}/g,'?')[_0x570883(0x91)](/\$\{[^}]*\}/g,'?')[_0x570883(0x91)](/'[^']*'/g,'\x27\x27')[_0x570883(0x91)](/--.*$/gm,'')[_0x570883(0x91)](/\/\*[\s\S]*?\*\//g,''),_0x4f15ed=[],_0x4dacbd=_0x717ba0[_0x570883(0xcc)](/FROM\s+([^\s,)(]+)/i);addTable(_0x4f15ed,_0x4dacbd?.[0x1]);for(const _0x3cc363 of _0x717ba0[_0x570883(0xc9)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x4f15ed,_0x3cc363[0x1]);}const _0x22a13b=_0x717ba0['match'](/INTO\s+([^\s(]+)/i);addTable(_0x4f15ed,_0x22a13b?.[0x1]);if(_0x89c6b7===_0x570883(0xad)){const _0xacd786=_0x717ba0[_0x570883(0xcc)](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x4f15ed,_0xacd786?.[0x1]);}return _0x4f15ed;}function addTable(_0x5d3528,_0x8bc4ce){const _0x15cb9e=a315_0x4fbd62,_0x26564d=_0x8bc4ce?.[_0x15cb9e(0x91)](/[`"]/g,'');_0x26564d&&_0x26564d!==UNRESOLVED_SQL_FRAGMENT&&!_0x5d3528['includes'](_0x26564d)&&_0x5d3528[_0x15cb9e(0xca)](_0x26564d);}function extractParameters(_0x380402){const _0x1ddb63=a315_0x4fbd62,_0x2f3100=new Set();for(const _0x2ba139 of _0x380402[_0x1ddb63(0xc9)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x2ba139[0x1])_0x2f3100[_0x1ddb63(0x90)](_0x2ba139[0x1]);}return Array[_0x1ddb63(0x88)](_0x2f3100);}export function validateSql(_0xee5535){const _0x5b9ec9=a315_0x4fbd62,_0x17d766=normalizeSqlForStaticAnalysis(_0xee5535),_0x36ebf7=detectNormalizedSqlType(_0x17d766),_0x6213b0=stripStaticAnalysisMarkers(_0x17d766[_0x5b9ec9(0xa5)]),_0x5dec52=_0x17d766[_0x5b9ec9(0xaf)]?[]:extractTables(_0x6213b0,_0x36ebf7[_0x5b9ec9(0x7c)]),_0x41812e=_0x17d766[_0x5b9ec9(0xaf)]?[]:extractParameters(_0x6213b0);if(_0x36ebf7['isDangerous'])return{'valid':![],'sqlType':_0x36ebf7,'tables':_0x5dec52,'parameters':_0x41812e,'message':_0x36ebf7[_0x5b9ec9(0xb4)]||_0x36ebf7[_0x5b9ec9(0x7c)]+'\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.'};if(_0x36ebf7[_0x5b9ec9(0x7c)]===_0x5b9ec9(0xd2))return{'valid':![],'sqlType':_0x36ebf7,'tables':_0x5dec52,'parameters':_0x41812e,'message':_0x17d766['error']?_0x5b9ec9(0xda)+_0x17d766['error']:_0x36ebf7[_0x5b9ec9(0xb4)]?'Unable\x20to\x20detect\x20SQL\x20type.\x20'+_0x36ebf7[_0x5b9ec9(0xb4)]:'Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.'};return{'valid':!![],'sqlType':_0x36ebf7,'tables':_0x5dec52,'parameters':_0x41812e,'message':_0x36ebf7[_0x5b9ec9(0x7c)]+_0x5b9ec9(0x96)+(_0x5dec52[_0x5b9ec9(0x8f)]?_0x5dec52['join'](',\x20'):_0x5b9ec9(0xb2))+(_0x41812e[_0x5b9ec9(0x8f)]?_0x5b9ec9(0xc0)+_0x41812e['join'](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a316_0x8be9(_0xe05b97,_0x22122f){_0xe05b97=_0xe05b97-0x15b;const _0x2b7ebe=a316_0x2b7e();let _0x8be9a6=_0x2b7ebe[_0xe05b97];return _0x8be9a6;}const a316_0x4db2a9=a316_0x8be9;(function(_0x39d71d,_0x4b1025){const _0xf9c514=a316_0x8be9,_0x1645a8=_0x39d71d();while(!![]){try{const _0x8ff874=parseInt(_0xf9c514(0x169))/0x1+parseInt(_0xf9c514(0x171))/0x2*(parseInt(_0xf9c514(0x174))/0x3)+-parseInt(_0xf9c514(0x176))/0x4+-parseInt(_0xf9c514(0x166))/0x5+-parseInt(_0xf9c514(0x173))/0x6*(parseInt(_0xf9c514(0x16c))/0x7)+-parseInt(_0xf9c514(0x178))/0x8*(parseInt(_0xf9c514(0x16e))/0x9)+parseInt(_0xf9c514(0x168))/0xa;if(_0x8ff874===_0x4b1025)break;else _0x1645a8['push'](_0x1645a8['shift']());}catch(_0xc6fe8e){_0x1645a8['push'](_0x1645a8['shift']());}}}(a316_0x2b7e,0xade4c));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a316_0x2b7e(){const _0x325b81=['22642050tKDMrF','400937QbILee','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`','7YGLgcR','validation','4909293ZeBUnN','not_in_project','unknown_command','2311240zQWizE','Unknown\x20command:\x20','252894RKsPeH','3FgBmHp','Run\x20`','4847924gsuHfb','\x20project\x20directory','8aBmbVl','auth_required','apiError','Authentication\x20required','Not\x20in\x20a\x20','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','network_error','Missing\x20required\x20flag:\x20--','Set\x20appcode\x20via\x20`','\x20auth`\x20to\x20login\x20first.','config_missing','\x20--help`\x20to\x20see\x20available\x20commands.','6544435SOXKzC','Operation\x20cancelled.'];a316_0x2b7e=function(){return _0x325b81;};return a316_0x2b7e();}export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a316_0x4db2a9(0x175)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.','configMissingHint':a316_0x4db2a9(0x162)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`'+CLI_BIN_NAME+a316_0x4db2a9(0x15f),'notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.'});export const CliErrors={'authRequired'(_0x1dc48d){const _0x3918e7=a316_0x4db2a9;return new CliError(_0x3918e7(0x179),0x1,_0x3918e7(0x15c),_0x1dc48d??_0x3918e7(0x175)+CLI_BIN_NAME+_0x3918e7(0x163));},'configMissing'(_0x468e8f){const _0x49d3c1=a316_0x4db2a9;return new CliError(_0x49d3c1(0x164),0x1,'Configuration\x20file\x20not\x20found',_0x468e8f??_0x49d3c1(0x162)+CLI_BIN_NAME+_0x49d3c1(0x16b)+CLI_BIN_NAME+_0x49d3c1(0x15f));},'notInProject'(){const _0x349f24=a316_0x4db2a9;return new CliError(_0x349f24(0x16f),0x1,_0x349f24(0x15d)+CLI_BIN_NAME+_0x349f24(0x177),_0x349f24(0x16a));},'apiError'(_0x38fae2,_0x10f613){const _0x5cb75d=a316_0x4db2a9;return baseCliErrors[_0x5cb75d(0x15b)](_0x38fae2,_0x10f613);},'networkError'(_0x2aeda7){const _0x4d245d=a316_0x4db2a9;return new CliError(_0x4d245d(0x160),0x2,'Network\x20error:\x20'+_0x2aeda7,_0x4d245d(0x15e));},'unknownCommand'(_0x49bcac){const _0x3724e8=a316_0x4db2a9;return new CliError(_0x3724e8(0x170),0x1,_0x3724e8(0x172)+_0x49bcac,'Run\x20`'+CLI_BIN_NAME+_0x3724e8(0x165));},'flagMissing'(_0x1ddb1b,_0x383c4d){const _0x543988=a316_0x4db2a9;return new CliError('flag_missing',0x1,_0x543988(0x161)+_0x1ddb1b,_0x383c4d);},'validation'(_0x1eb343,_0x11d0bd){const _0x118fef=a316_0x4db2a9;return baseCliErrors[_0x118fef(0x16d)](_0x1eb343,_0x11d0bd);},'cancelled'(_0x26be97){const _0x820c38=a316_0x4db2a9;return new CliError('cancelled',0x0,_0x26be97??_0x820c38(0x167));}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a317_0x46de(_0x245c1f,_0x55fc8b){_0x245c1f=_0x245c1f-0x13f;const _0x215266=a317_0x2152();let _0x46de21=_0x215266[_0x245c1f];return _0x46de21;}(function(_0x2a4a98,_0x2bbbdd){const _0x2215c2=a317_0x46de,_0x43a1d0=_0x2a4a98();while(!![]){try{const _0x36a98a=parseInt(_0x2215c2(0x147))/0x1*(-parseInt(_0x2215c2(0x14c))/0x2)+-parseInt(_0x2215c2(0x14d))/0x3*(-parseInt(_0x2215c2(0x144))/0x4)+-parseInt(_0x2215c2(0x145))/0x5*(-parseInt(_0x2215c2(0x140))/0x6)+parseInt(_0x2215c2(0x141))/0x7*(parseInt(_0x2215c2(0x14b))/0x8)+-parseInt(_0x2215c2(0x13f))/0x9*(parseInt(_0x2215c2(0x148))/0xa)+parseInt(_0x2215c2(0x14a))/0xb*(parseInt(_0x2215c2(0x142))/0xc)+parseInt(_0x2215c2(0x143))/0xd*(parseInt(_0x2215c2(0x149))/0xe);if(_0x36a98a===_0x2bbbdd)break;else _0x43a1d0['push'](_0x43a1d0['shift']());}catch(_0xeba98b){_0x43a1d0['push'](_0x43a1d0['shift']());}}}(a317_0x2152,0xc6fbf));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a317_0x5e538c}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a317_0x2152(){const _0x4d9001=['1689490CEzckW','176BTnOrD','2010UJdOTT','84210MXfGon','yes','27JpgHjK','6QXxIvX','303723wGlOsl','36kyrtpE','26iKRfuh','56TTdrQb','4717215bWsxvs','map','1103UntfLT','3935210CyZzgJ','2466562WGASfY'];a317_0x2152=function(){return _0x4d9001;};return a317_0x2152();}export function buildAllFlags(_0x32927f){const _0x3735bb=a317_0x46de,_0x130ebd=a317_0x5e538c(_0x32927f,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x32927f))return _0x130ebd;return _0x130ebd[_0x3735bb(0x146)](_0xd3a3f3=>_0xd3a3f3['name']===_0x3735bb(0x14e)?{..._0xd3a3f3,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0xd3a3f3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x45b748,_0x13b6ab){var _0x1bc302=a318_0x98db,_0x1a8a5d=_0x45b748();while(!![]){try{var _0x20560b=-parseInt(_0x1bc302(0x18d))/0x1*(-parseInt(_0x1bc302(0x181))/0x2)+parseInt(_0x1bc302(0x18f))/0x3*(parseInt(_0x1bc302(0x182))/0x4)+-parseInt(_0x1bc302(0x18c))/0x5+parseInt(_0x1bc302(0x18e))/0x6*(parseInt(_0x1bc302(0x18a))/0x7)+parseInt(_0x1bc302(0x187))/0x8*(-parseInt(_0x1bc302(0x183))/0x9)+parseInt(_0x1bc302(0x189))/0xa*(-parseInt(_0x1bc302(0x180))/0xb)+parseInt(_0x1bc302(0x184))/0xc*(parseInt(_0x1bc302(0x18b))/0xd);if(_0x20560b===_0x13b6ab)break;else _0x1a8a5d['push'](_0x1a8a5d['shift']());}catch(_0x1423c4){_0x1a8a5d['push'](_0x1a8a5d['shift']());}}}(a318_0x4460,0xdd0d9));function a318_0x4460(){var _0x31d9a7=['def','16TSjAdK','defaultFormat','10yQTPoB','10108grqSRK','536120iTZBvs','2393020mBYhxR','7753LMqBwF','5526OTwWGE','1885596yXNSpf','format','4758402dIxMeE','34GuvkTg','4RAXDvb','4386231evwUio','204IhPHiK','compress'];a318_0x4460=function(){return _0x31d9a7;};return a318_0x4460();}import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0xc527c0){return _0xc527c0?.['structuredErrors']===!![];}function a318_0x98db(_0x5e8236,_0x34b3a0){_0x5e8236=_0x5e8236-0x17f;var _0x4460c6=a318_0x4460();var _0x98db15=_0x4460c6[_0x5e8236];return _0x98db15;}export function resolveErrorOutputFormat(_0x38cd8b){var _0x3e93e6=a318_0x98db;if(!_0x38cd8b['def'])return _0x38cd8b[_0x3e93e6(0x188)]??_0x3e93e6(0x185);return resolveOutputConfig({'flags':_0x38cd8b['flags']??{},'def':_0x38cd8b[_0x3e93e6(0x186)],'configDefault':_0x38cd8b[_0x3e93e6(0x188)]})[_0x3e93e6(0x17f)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a319_0x25b4(_0x3d3107,_0x429220){_0x3d3107=_0x3d3107-0x147;const _0x13a47f=a319_0x13a4();let _0x25b489=_0x13a47f[_0x3d3107];return _0x25b489;}const a319_0x4e2e4f=a319_0x25b4;(function(_0x5e3749,_0x5bef22){const _0x5e91f9=a319_0x25b4,_0x2987a2=_0x5e3749();while(!![]){try{const _0x4166ee=parseInt(_0x5e91f9(0x14f))/0x1*(-parseInt(_0x5e91f9(0x14c))/0x2)+parseInt(_0x5e91f9(0x14d))/0x3*(parseInt(_0x5e91f9(0x159))/0x4)+-parseInt(_0x5e91f9(0x158))/0x5+-parseInt(_0x5e91f9(0x154))/0x6*(-parseInt(_0x5e91f9(0x147))/0x7)+-parseInt(_0x5e91f9(0x156))/0x8*(-parseInt(_0x5e91f9(0x14e))/0x9)+-parseInt(_0x5e91f9(0x153))/0xa*(-parseInt(_0x5e91f9(0x150))/0xb)+-parseInt(_0x5e91f9(0x14a))/0xc;if(_0x4166ee===_0x5bef22)break;else _0x2987a2['push'](_0x2987a2['shift']());}catch(_0x45fee7){_0x2987a2['push'](_0x2987a2['shift']());}}}(a319_0x13a4,0x29754));const EXPLICIT_YES_COMMANDS=new Set([a319_0x4e2e4f(0x149),a319_0x4e2e4f(0x14b),a319_0x4e2e4f(0x148),'notification\x20config-delete']);function a319_0x13a4(){const _0x5267a9=['has','1115060OohZgy','1026912Ennfmh','28IgewBl','notification\x20config-update','menu\x20delete','3620328EeUnBn','kb\x20delete','4474nHhZej','3wPlTmX','549OhbonM','71QdVVtz','253QtUCSz','service','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan','123730DQNTii','416268IKcHGs','command','4528HaTIfa'];a319_0x13a4=function(){return _0x5267a9;};return a319_0x13a4();}export const EXPLICIT_YES_FLAG_DESCRIPTION=a319_0x4e2e4f(0x152);export function requiresExplicitYes(_0x2c1f00){const _0xea6667=a319_0x4e2e4f;return EXPLICIT_YES_COMMANDS[_0xea6667(0x157)](_0x2c1f00[_0xea6667(0x151)]+'\x20'+_0x2c1f00[_0xea6667(0x155)]);}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a320_0x15d8dc=a320_0x40e0;(function(_0x54ddb7,_0x4dcf79){const _0x424297=a320_0x40e0,_0xf30fa2=_0x54ddb7();while(!![]){try{const _0x490608=-parseInt(_0x424297(0x118))/0x1*(-parseInt(_0x424297(0x115))/0x2)+parseInt(_0x424297(0x120))/0x3+-parseInt(_0x424297(0x119))/0x4*(-parseInt(_0x424297(0x11f))/0x5)+-parseInt(_0x424297(0x117))/0x6+parseInt(_0x424297(0x11b))/0x7*(parseInt(_0x424297(0x116))/0x8)+parseInt(_0x424297(0x11d))/0x9+-parseInt(_0x424297(0x11e))/0xa;if(_0x490608===_0x4dcf79)break;else _0xf30fa2['push'](_0xf30fa2['shift']());}catch(_0x2c2b2b){_0xf30fa2['push'](_0xf30fa2['shift']());}}}(a320_0x283e,0x50347));function a320_0x283e(){const _0x5720fb=['364136kPgoiu','8PcJCXW','275844IpySsg','3BPtSiD','12jfZtAp','parseFlags','1222900iBbAmz','validateFlags','3436398jfKYTl','10609990HgDIMx','553485hYKAbX','2025CFpBqF'];a320_0x283e=function(){return _0x5720fb;};return a320_0x283e();}import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);function a320_0x40e0(_0x5a2f7c,_0x48cb99){_0x5a2f7c=_0x5a2f7c-0x115;const _0x283ec0=a320_0x283e();let _0x40e018=_0x283ec0[_0x5a2f7c];return _0x40e018;}export const parseFlags=helpers[a320_0x15d8dc(0x11a)];export const validateFlags=helpers[a320_0x15d8dc(0x11c)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a321_0x5b88(_0x2c29cd,_0x174c89){_0x2c29cd=_0x2c29cd-0x123;const _0x1740ac=a321_0x1740();let _0x5b88c4=_0x1740ac[_0x2c29cd];return _0x5b88c4;}(function(_0x61f543,_0x326b31){const _0x24f3d9=a321_0x5b88,_0x5e3115=_0x61f543();while(!![]){try{const _0x4cfb14=parseInt(_0x24f3d9(0x126))/0x1*(-parseInt(_0x24f3d9(0x131))/0x2)+parseInt(_0x24f3d9(0x132))/0x3+parseInt(_0x24f3d9(0x133))/0x4+parseInt(_0x24f3d9(0x130))/0x5*(parseInt(_0x24f3d9(0x125))/0x6)+parseInt(_0x24f3d9(0x134))/0x7*(parseInt(_0x24f3d9(0x135))/0x8)+-parseInt(_0x24f3d9(0x123))/0x9+parseInt(_0x24f3d9(0x12d))/0xa*(-parseInt(_0x24f3d9(0x12c))/0xb);if(_0x4cfb14===_0x326b31)break;else _0x5e3115['push'](_0x5e3115['shift']());}catch(_0x5d7d8b){_0x5e3115['push'](_0x5e3115['shift']());}}}(a321_0x1740,0x6d044));import{createHelpGenerators}from'@lovrabet/cli-framework';function a321_0x1740(){const _0x544df9=['Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','replace','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','11NMLbJI','4617110WcXyZN','\x20workspace\x20init`\x20or\x20--appcode).','\x20[args]\x20[flags]','65vlDKcY','467224kPOaWu','1614720wcRCcV','2168656ggGnsV','5802622otBoif','8ZsZzOh','7877736DDYbSS','generateServiceHelp','49758uYRaMM','1VAPsmi','Requires\x20appcode\x20(set\x20via\x20`','generateFullHelp'];a321_0x1740=function(){return _0x544df9;};return a321_0x1740();}import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{requiresExplicitYes}from'../framework/explicit-yes.js';function createGenerators(){const _0x3cbfbe=a321_0x5b88;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x417af2=>serviceGroups['get'](_0x417af2),'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x3cbfbe(0x127)+CLI_BIN_NAME+_0x3cbfbe(0x12e),'serviceUsageSuffix':_0x3cbfbe(0x12f)});}export function generateCommandHelp(_0x578827){const _0x550a71=a321_0x5b88,_0x4713e4=createGenerators()['generateCommandHelp'](_0x578827);if(!requiresExplicitYes(_0x578827))return _0x4713e4;return _0x4713e4[_0x550a71(0x12a)](_0x550a71(0x12b),_0x550a71(0x129));}export function generateServiceHelp(_0x17ecf6){const _0x2831a3=a321_0x5b88;return createGenerators()[_0x2831a3(0x124)](_0x17ecf6);}export function generateFullHelp(){const _0xfb504c=a321_0x5b88;return createGenerators()[_0xfb504c(0x128)]();}
|