@kedem/okdb 1.0.0
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/LICENSE +57 -0
- package/README.md +344 -0
- package/banner.jpg +0 -0
- package/bin/okdb.js +2 -0
- package/docs/OKDB-ARCHITECTURE.md +1036 -0
- package/docs/auth-and-sync.md +558 -0
- package/docs/auth-permissions.md +143 -0
- package/docs/change-log.md +169 -0
- package/docs/data-model.md +174 -0
- package/docs/embeddings.md +338 -0
- package/docs/files.md +131 -0
- package/docs/fts.md +139 -0
- package/docs/functions.md +514 -0
- package/docs/getting-started.md +233 -0
- package/docs/http-api.md +705 -0
- package/docs/index.md +115 -0
- package/docs/indexes.md +207 -0
- package/docs/logging.md +116 -0
- package/docs/manifest.json +38 -0
- package/docs/migration.md +154 -0
- package/docs/pipelines.md +598 -0
- package/docs/plugins.md +144 -0
- package/docs/querying.md +204 -0
- package/docs/queue.md +637 -0
- package/docs/sync.md +156 -0
- package/docs/transactions.md +140 -0
- package/docs/ttl.md +375 -0
- package/okdb.js +1 -0
- package/package.json +26 -0
- package/public/admin-app.js +1 -0
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/components/admin-route-host.ok.js +1 -0
- package/public/components/env-picker.ok.js +1 -0
- package/public/components/field-path-input.ok.js +1 -0
- package/public/components/field.html +6 -0
- package/public/components/geo-map.ok.js +1 -0
- package/public/components/ok-cron-input.ok.js +1 -0
- package/public/components/ok-dropzone.ok.js +1 -0
- package/public/components/ok-js-input.ok.js +1 -0
- package/public/components/ok-json-input.ok.js +1 -0
- package/public/components/ok-text-monaco-input.ok.js +1 -0
- package/public/components/theme-toggle.ok.js +1 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/images/logo.png +0 -0
- package/public/images/logo.svg +333 -0
- package/public/index.html +6 -0
- package/public/layouts/_default.ok.html +1 -0
- package/public/layouts/okdb-cube.ok.html +1 -0
- package/public/login-app.js +1 -0
- package/public/login.html +1 -0
- package/public/modules/ok.js +1 -0
- package/public/sections/api/index.ok.html +1 -0
- package/public/sections/api/parts/api-endpoint.ok.js +1 -0
- package/public/sections/auth/index.ok.html +1 -0
- package/public/sections/auth/modals/create-token-modal.ok.js +1 -0
- package/public/sections/auth/modals/edit-token-modal.ok.js +1 -0
- package/public/sections/auth/modals/perm-info-popover.ok.js +1 -0
- package/public/sections/auth/parts/token-detail.ok.js +1 -0
- package/public/sections/auth/parts/token-list.ok.js +1 -0
- package/public/sections/db/index.ok.html +1 -0
- package/public/sections/db/modals/add-item-modal.ok.js +1 -0
- package/public/sections/db/modals/create-env-modal.ok.js +1 -0
- package/public/sections/db/modals/create-fts-modal.ok.js +1 -0
- package/public/sections/db/modals/create-index-modal.ok.js +1 -0
- package/public/sections/db/modals/create-pipeline-modal.ok.js +1 -0
- package/public/sections/db/modals/demo-env-modal.ok.js +1 -0
- package/public/sections/db/modals/remove-env-modal.ok.js +1 -0
- package/public/sections/db/modals/schema-edit-modal.ok.js +1 -0
- package/public/sections/db/parts/db-overview.ok.js +1 -0
- package/public/sections/db/parts/db-pipelines-panel.ok.js +1 -0
- package/public/sections/db/parts/edit-row.ok.js +1 -0
- package/public/sections/db/parts/tm-timeline.ok.js +1 -0
- package/public/sections/db/parts/type-changelog.ok.js +1 -0
- package/public/sections/db/parts/type-list.ok.js +1 -0
- package/public/sections/db/parts/type-pipelines-tab.ok.js +1 -0
- package/public/sections/db/parts/type-schema-tab.ok.js +1 -0
- package/public/sections/db/parts/type-viewer.ok.js +1 -0
- package/public/sections/db/parts/type-violations-tab.ok.js +1 -0
- package/public/sections/docs/index.ok.html +1 -0
- package/public/sections/embeddings/index.ok.html +1 -0
- package/public/sections/embeddings/modals/register-model-modal.ok.js +1 -0
- package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -0
- package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +1 -0
- package/public/sections/embeddings/parts/embed-engine-declaration-editor.ok.js +1 -0
- package/public/sections/embeddings/parts/embed-engine-list.ok.js +1 -0
- package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +1 -0
- package/public/sections/embeddings/parts/embed-lifecycle-bar.ok.js +1 -0
- package/public/sections/embeddings/parts/embed-model-catalog.ok.js +1 -0
- package/public/sections/embeddings/parts/embed-overview.ok.js +1 -0
- package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -0
- package/public/sections/embeddings/parts/embed-worker-panel.ok.js +1 -0
- package/public/sections/embeddings/parts/embeddings-engine-panel.ok.js +1 -0
- package/public/sections/embeddings/parts/engines-overview.ok.js +1 -0
- package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +1 -0
- package/public/sections/engines/engine-panel-shared-style.js +1 -0
- package/public/sections/engines/engine-ui-utils.js +1 -0
- package/public/sections/engines/index.ok.html +1 -0
- package/public/sections/engines/modals/engine-modal.ok.js +1 -0
- package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -0
- package/public/sections/engines/parts/engine-lifecycle-actions.ok.js +1 -0
- package/public/sections/engines/parts/engine-panel-shell.ok.js +1 -0
- package/public/sections/engines/parts/engine-resource-card.ok.js +1 -0
- package/public/sections/engines/parts/engine-row-item.ok.js +1 -0
- package/public/sections/engines/parts/generic-engine-panel.ok.js +1 -0
- package/public/sections/files/index.ok.html +1 -0
- package/public/sections/files/parts/files-blob-status.ok.js +1 -0
- package/public/sections/files/parts/files-collection-list.ok.js +1 -0
- package/public/sections/files/parts/files-collection-panel.ok.js +1 -0
- package/public/sections/files/parts/files-file-list.ok.js +1 -0
- package/public/sections/files/parts/files-overview.ok.js +1 -0
- package/public/sections/files/parts/files-path-browser.ok.js +1 -0
- package/public/sections/files/parts/files-upload-panel.ok.js +1 -0
- package/public/sections/functions/index.ok.html +1 -0
- package/public/sections/functions/modals/function-modal.ok.js +1 -0
- package/public/sections/functions/parts/function-detail.ok.js +1 -0
- package/public/sections/functions/parts/function-logs.ok.js +1 -0
- package/public/sections/functions/parts/function-runner.ok.js +1 -0
- package/public/sections/functions/parts/functions-list.ok.js +1 -0
- package/public/sections/license/index.ok.html +1 -0
- package/public/sections/license/parts/license-panel.ok.js +1 -0
- package/public/sections/processors/index.ok.html +1 -0
- package/public/sections/queue/index.ok.html +1 -0
- package/public/sections/queue/modals/create-bucket-modal.ok.js +1 -0
- package/public/sections/queue/modals/edit-bucket-modal.ok.js +1 -0
- package/public/sections/queue/modals/edit-job-modal.ok.js +1 -0
- package/public/sections/queue/modals/enqueue-job-modal.ok.js +1 -0
- package/public/sections/queue/modals/job-type-modal.ok.js +1 -0
- package/public/sections/queue/parts/ok-job-form.ok.js +1 -0
- package/public/sections/queue/parts/queue-buckets.ok.js +1 -0
- package/public/sections/queue/parts/queue-job-types.ok.js +1 -0
- package/public/sections/queue/parts/queue-jobs.ok.js +1 -0
- package/public/sections/queue/parts/queue-types.ok.js +1 -0
- package/public/sections/queue/parts/queue-workers.ok.js +1 -0
- package/public/sections/sync/index.ok.html +5 -0
- package/public/sections/sync/parts/sync-node-detail.ok.js +1 -0
- package/public/sections/sync/parts/sync-retention.ok.js +1 -0
- package/public/sections/sync/parts/sync-topology.ok.js +1 -0
- package/public/sections/system/index.ok.html +1 -0
- package/public/sections/system/modals/data-ops-modal.ok.js +1 -0
- package/public/sections/system/parts/system-api-panel.ok.js +1 -0
- package/public/sections/system/parts/system-auth-panel.ok.js +1 -0
- package/public/sections/system/parts/system-log-history.ok.js +1 -0
- package/public/sections/system/parts/system-log.ok.js +1 -0
- package/public/sections/system/parts/system-status.ok.js +1 -0
- package/public/sections/system/parts/system-sync-panel.ok.js +1 -0
- package/public/sections/views/index.ok.html +1 -0
- package/public/sections/views/modals/create-view-modal.ok.js +1 -0
- package/public/sections/views/parts/view-detail.ok.js +1 -0
- package/public/sections/views/parts/views-list.ok.js +1 -0
- package/public/sections/views/parts/views-overview.ok.js +1 -0
- package/public/setup-app.js +1 -0
- package/public/setup.html +1 -0
- package/public/site.webmanifest +1 -0
- package/public/stores/auth-store.js +1 -0
- package/public/stores/events-store.js +1 -0
- package/public/stores/functions-store.js +1 -0
- package/public/stores/okdb-store.js +1 -0
- package/public/stores/theme-store.js +1 -0
- package/public/styles.css +1 -0
- package/public/test-cron-input.html +10 -0
- package/public/test-json-input.html +101 -0
- package/public/util/permissions.js +1 -0
- package/public/util/sift-schema.js +1 -0
- package/public/vendor/okjs/ok.esm.min.js +2 -0
- package/public/vendor/okjs/toolkit/behavior/async.ok.js +1 -0
- package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -0
- package/public/vendor/okjs/toolkit/components/ok-doc-viewer.ok.js +1 -0
- package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -0
- package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -0
- package/public/vendor/okjs/toolkit/core/ok-layer-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/core/ok-layer.ok.js +1 -0
- package/public/vendor/okjs/toolkit/core/ok-overlay.ok.js +1 -0
- package/public/vendor/okjs/toolkit/core/ok-sandbox.ok.js +1 -0
- package/public/vendor/okjs/toolkit/core/transition.ok.js +1 -0
- package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-console-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-console.ok.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor.ok.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-inspector-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-inspector.ok.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-js-tree.ok.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-timeline-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-timeline.ok.js +1 -0
- package/public/vendor/okjs/toolkit/docs/doc-viewer.ok.js +1 -0
- package/public/vendor/okjs/toolkit/editor/ok-live-component.ok.js +1 -0
- package/public/vendor/okjs/toolkit/editor/ok-live-example.ok.js +1 -0
- package/public/vendor/okjs/toolkit/editor/ok-live-shell.ok.js +1 -0
- package/public/vendor/okjs/toolkit/elements/ok-dropdown.ok.js +1 -0
- package/public/vendor/okjs/toolkit/elements/ok-icon.ok.js +1 -0
- package/public/vendor/okjs/toolkit/elements/ok-select.ok.js +1 -0
- package/public/vendor/okjs/toolkit/elements/ok-table.ok.js +1 -0
- package/public/vendor/okjs/toolkit/errors/ok-crash-boundary.ok.js +1 -0
- package/public/vendor/okjs/toolkit/errors/ok-crash-info.ok.js +1 -0
- package/public/vendor/okjs/toolkit/i18n/i18n-editor-examples.ok.js +1 -0
- package/public/vendor/okjs/toolkit/i18n/i18n-editor.ok.js +1 -0
- package/public/vendor/okjs/toolkit/i18n/i18n-key-editor-tips.ok.js +1 -0
- package/public/vendor/okjs/toolkit/i18n/i18n-key-editor.ok.js +1 -0
- package/public/vendor/okjs/toolkit/i18n/i18n-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/i18n/ok-i18n.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-contextmenu.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-dismiss-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-draggable.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-flyover-panel.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-flyover.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-highlight-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-highlight.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-hotkeys-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-picker-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-popout-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-popout.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-portal-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/interaction/ok-submenu.ok.js +1 -0
- package/public/vendor/okjs/toolkit/layout/ok-resizer.ok.js +1 -0
- package/public/vendor/okjs/toolkit/manifest.js +1 -0
- package/public/vendor/okjs/toolkit/modals/ok-modal-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/modals/ok-modal.ok.js +1 -0
- package/public/vendor/okjs/toolkit/modals/ok-toast-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/modals/ok-window.ok.js +1 -0
- package/public/vendor/okjs/toolkit/navigation/hash-router.ok.js +1 -0
- package/public/vendor/okjs/toolkit/navigation/history-router.ok.js +1 -0
- package/public/vendor/okjs/toolkit/navigation/router.ok.js +1 -0
- package/public/vendor/okjs/toolkit/sync/reactive-sync-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/sync/reactive-sync.js +1 -0
- package/public/vendor/okjs/toolkit/theming/blocks/ok-design-button.css.js +1 -0
- package/public/vendor/okjs/toolkit/theming/blocks/ok-design-input.css.js +1 -0
- package/public/vendor/okjs/toolkit/theming/ok-design-style.js +1 -0
- package/public/vendor/okjs/toolkit/theming/ok-design-vars.js +1 -0
- package/public/vendor/okjs/toolkit/theming/ok-design.ok.js +1 -0
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-input.ok.js +1 -0
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-style.js +1 -0
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-utils.js +1 -0
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-variable.ok.js +1 -0
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-vm.js +1 -0
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor.ok.js +1 -0
- package/public/vendor/okjs/toolkit/theming/ok-theme.ok.js +1 -0
- package/public/view-models/type-query-vm.js +1 -0
- package/types/environment.d.ts +130 -0
- package/types/errors.d.ts +98 -0
- package/types/features/admin.d.ts +4 -0
- package/types/features/api.d.ts +18 -0
- package/types/features/auth.d.ts +31 -0
- package/types/features/embeddings.d.ts +39 -0
- package/types/features/engines.d.ts +23 -0
- package/types/features/files.d.ts +29 -0
- package/types/features/fts.d.ts +25 -0
- package/types/features/functions.d.ts +23 -0
- package/types/features/mcp.d.ts +17 -0
- package/types/features/pipelines.d.ts +19 -0
- package/types/features/queue.d.ts +189 -0
- package/types/features/sync.d.ts +34 -0
- package/types/features/time-machine.d.ts +32 -0
- package/types/features/views.d.ts +16 -0
- package/types/index.d.ts +153 -0
- package/types/options.d.ts +202 -0
package/okdb.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0xef8cd8=_0x47ab;(function(_0x3e168f,_0x2fc003){const _0x143390=_0x47ab,_0x345c31=_0x3e168f();while(!![]){try{const _0x40988b=parseInt(_0x143390(0x6dc))/0x1+parseInt(_0x143390(0xbb6))/0x2*(parseInt(_0x143390(0xbb8))/0x3)+-parseInt(_0x143390(0xd67))/0x4*(-parseInt(_0x143390(0x425))/0x5)+-parseInt(_0x143390(0xc71))/0x6*(-parseInt(_0x143390(0x10d9))/0x7)+-parseInt(_0x143390(0xb85))/0x8*(parseInt(_0x143390(0x729))/0x9)+-parseInt(_0x143390(0xf57))/0xa*(parseInt(_0x143390(0x868))/0xb)+-parseInt(_0x143390(0x1039))/0xc;if(_0x40988b===_0x2fc003)break;else _0x345c31['push'](_0x345c31['shift']());}catch(_0x4aaf06){_0x345c31['push'](_0x345c31['shift']());}}}(_0x523f,0xbd2b2));var require$$0$6=require(_0xef8cd8(0x96b)),require$$1$2=require(_0xef8cd8(0x20b)),require$$0$7=require('fs'),require$$3$1=require('events'),require$$0$1=require(_0xef8cd8(0x198)),require$$0$5=require(_0xef8cd8(0x9a8)),require$$0=require(_0xef8cd8(0x5cd)),require$$1=require('os'),require$$0$3=require('node:crypto'),require$$0$2=require(_0xef8cd8(0x85d)),require$$0$4=require('node:path'),require$$1$1=require('node:child_process'),require$$17=require('shmbuf'),require$$0$8=require(_0xef8cd8(0x9f4)),require$$1$3=require(_0xef8cd8(0x1038)),require$$2=require('url'),require$$3=require('stream'),require$$0$9=require(_0xef8cd8(0x11c1)),require$$1$4=require(_0xef8cd8(0x9a4)),require$$9=require(_0xef8cd8(0x17d)),require$$0$a=require(_0xef8cd8(0x4a5)),require$$0$b=require(_0xef8cd8(0x2aa)),commonjsGlobal=typeof globalThis!==_0xef8cd8(0x4ae)?globalThis:typeof window!==_0xef8cd8(0x4ae)?window:typeof global!=='undefined'?global:typeof self!==_0xef8cd8(0x4ae)?self:{};function getDefaultExportFromCjs(_0x35b2b9){const _0x1fdbdb=_0xef8cd8;return _0x35b2b9&&_0x35b2b9['__esModule']&&Object['prototype']['hasOwnProperty'][_0x1fdbdb(0x834)](_0x35b2b9,_0x1fdbdb(0x8d0))?_0x35b2b9[_0x1fdbdb(0x8d0)]:_0x35b2b9;}function commonjsRequire(_0x4dc1d9){const _0xf20104=_0xef8cd8;throw new Error(_0xf20104(0xea4)+_0x4dc1d9+'\x22.\x20Please\x20configure\x20the\x20dynamicRequireTargets\x20or/and\x20ignoreDynamicRequires\x20option\x20of\x20@rollup/plugin-commonjs\x20appropriately\x20for\x20this\x20require\x20call\x20to\x20work.');}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x3339e5=_0xef8cd8;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x34bcca={'PUT':_0x3339e5(0x92c),'REMOVE':_0x3339e5(0x21e),'INDEX_DROP':_0x3339e5(0xfff),'INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x3339e5(0x2c8),'TYPE_REGISTER':_0x3339e5(0xa39),'TYPE_DROP':_0x3339e5(0x665),'FTS_REGISTER':'registerFts','FTS_DROP':_0x3339e5(0xe94),'FTS_RESET':_0x3339e5(0x713),'SCHEMA_SET':_0x3339e5(0xb46),'SCHEMA_DROP':_0x3339e5(0x10ea),'TTL_SET':_0x3339e5(0x2cd),'TTL_CLEAR':'clearTtl'},_0x1bab69={'SYSTEM_READY':_0x3339e5(0xa5e),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x3339e5(0x480),'SYSTEM_POKE':_0x3339e5(0xefa),'SYSTEM_DRAIN':_0x3339e5(0xffb),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x3339e5(0x1201),'ITEM_UPDATE':_0x3339e5(0x804),'ITEM_REMOVE':_0x3339e5(0x457),'INDEX_RESET':'index:reset','INDEX_READY':_0x3339e5(0x64b),'INDEX_PROGRESS':_0x3339e5(0x115),'INDEX_DROP':_0x3339e5(0x296),'INDEX_REGISTERED':_0x3339e5(0x46f),'FTS_REGISTERED':_0x3339e5(0x3a5),'FTS_DROP':_0x3339e5(0xffd),'FTS_RESET':_0x3339e5(0x11c2),'SCHEMA_SET':_0x3339e5(0xf24),'SCHEMA_DROP':_0x3339e5(0xa0d),'UNIQUE_VIOLATION':_0x3339e5(0x2a1),'UNIQUE_VIOLATION_RESOLVED':_0x3339e5(0x1138),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x3339e5(0x109),'SYNC_APPLY':'sync:apply','TXN_START':_0x3339e5(0x71f),'TXN_END':_0x3339e5(0x3e6),'TXN_ROLLBACK':_0x3339e5(0x80a),'TYPE_REGISTERED':_0x3339e5(0x10e3),'TYPE_DROP':_0x3339e5(0xaeb),'ENV_OPENED':_0x3339e5(0x10c1),'ENV_REMOVED':_0x3339e5(0x822),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x3339e5(0xd7d),'TTL_CLEAR':_0x3339e5(0x915),'LICENSE_INVALID':_0x3339e5(0x662),'LICENSE_ADDED':_0x3339e5(0x31c),'LICENSE_ACTIVATED':_0x3339e5(0xc93),'LICENSE_REMOVED':_0x3339e5(0xf11)},_0x11cb97={'CREATING':_0x3339e5(0x975),'RESETTING':_0x3339e5(0xe0b),'READY':_0x3339e5(0x8f0),'DROPPING':'dropping','WAITING':_0x3339e5(0xcf7)},_0xd4e42c={'CREATED':'created','STARTING':'starting','STARTED':_0x3339e5(0x3c4),'STOPPING':_0x3339e5(0x109c),'STOPPED':_0x3339e5(0xd45)},_0x15d6bb={'CREATING':_0x3339e5(0x975),'READY':'ready','HALTED':_0x3339e5(0xc6a),'STOPPED':_0x3339e5(0xd45),'RESETTING':_0x3339e5(0xe0b)},_0x4e180d=Object[_0x3339e5(0x108b)]({'POKE':_0x3339e5(0xf0a),'DRAIN':_0x3339e5(0xf72)});return okdbEnums={'BUS_EVENTS':_0x4e180d,'CHANGE_ACTIONS':_0x34bcca,'EVENTS':_0x1bab69,'INDEX_STATE':_0x11cb97,'OKDB_STATE':_0xd4e42c,'VIEW_STATE':_0x15d6bb},okdbEnums;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x48c71e extends Error{constructor(_0x5c6098,_0x1164a3,_0x21e0c5={}){const _0x5ef08c=_0x47ab;super(_0x5c6098),this['name']=_0x5ef08c(0x510),this['code']=_0x1164a3,this[_0x5ef08c(0x933)]=_0x21e0c5,_0x21e0c5[_0x5ef08c(0x105d)]&&(this[_0x5ef08c(0x105d)]=_0x21e0c5[_0x5ef08c(0x105d)]),Error[_0x5ef08c(0x3ed)](this,this[_0x5ef08c(0x1004)]);}}class _0x4e9a61 extends _0x48c71e{constructor(_0xc03fed,_0x4963cf,_0x947939,_0x12cfd7){const _0x17ae95=_0x47ab;super(_0x17ae95(0x10cb)+_0xc03fed+'@'+_0x4963cf+_0x17ae95(0x1135)+_0x947939+_0x17ae95(0xb43)+_0x12cfd7,'VERSION_MISMATCH',{'type':_0xc03fed,'key':_0x4963cf,'expectedVersion':_0x947939,'actualVersion':_0x12cfd7}),this[_0x17ae95(0x1173)]=_0x17ae95(0x67d);}}class _0x41308b extends _0x48c71e{constructor(_0x58cba0,_0x596084){const _0x3f4898=_0x47ab;super(_0x58cba0+'@'+_0x596084+_0x3f4898(0x8eb),_0x3f4898(0xb7f),{'type':_0x58cba0,'key':_0x596084}),this[_0x3f4898(0x1173)]=_0x3f4898(0x103b);}}class _0x1067cf extends _0x48c71e{constructor(_0x1fc7d7,_0xf27a5b){const _0x92c7e0=_0x47ab;super(_0x1fc7d7+'@'+_0xf27a5b+_0x92c7e0(0xf30),_0x92c7e0(0x9b2),{'type':_0x1fc7d7,'key':_0xf27a5b}),this[_0x92c7e0(0x1173)]=_0x92c7e0(0xa19);}}class _0xd9faec extends _0x48c71e{constructor(_0x184498,_0x4ec80d){const _0x16828e=_0x47ab,_0x278270=typeof _0x4ec80d;super(_0x16828e(0xea1)+_0x184498+_0x16828e(0xe2f)+_0x278270+_0x16828e(0xafd)+_0x4ec80d,_0x16828e(0xefb),{'index':_0x184498,'key':_0x4ec80d,'keyType':_0x278270}),this[_0x16828e(0x1173)]=_0x16828e(0x467);}}class _0xa60ec extends _0x48c71e{constructor(_0x37e1c2){const _0x4c2d81=_0x47ab,_0x277bc1=typeof _0x37e1c2;super('Invalid\x20primary\x20key\x20type:\x20'+_0x277bc1+_0x4c2d81(0x10c2)+_0x37e1c2,'INVALID_PRIMARY_KEY',{'key':_0x37e1c2,'keyType':_0x277bc1}),this[_0x4c2d81(0x1173)]='OKDBInvalidPrimaryKeyError';}}class _0x14cfc1 extends _0x48c71e{constructor(_0x2709e9){const _0x4a88ff=_0x47ab;super(_0x4a88ff(0x948)+_0x2709e9+'\x27\x20doesn\x27t\x20exist',_0x4a88ff(0x3db),{'type':_0x2709e9}),this['name']=_0x4a88ff(0x70b);}}class _0x30bc20 extends _0x48c71e{constructor(_0xbe2e32){const _0x412ba2=_0x47ab;super(_0x412ba2(0x948)+_0xbe2e32+_0x412ba2(0xc3d),_0x412ba2(0x3f4),{'type':_0xbe2e32}),this['name']=_0x412ba2(0x302);}}class _0xc80847 extends _0x48c71e{constructor(_0xe64ead,_0x40277d){const _0x46282b=_0x47ab;super(_0x46282b(0xb32)+_0x40277d+_0x46282b(0x373)+_0xe64ead+_0x46282b(0x170),_0x46282b(0xd7),{'type':_0xe64ead,'index':_0x40277d}),this[_0x46282b(0x1173)]=_0x46282b(0x8f9);}}class _0x17388d extends _0x48c71e{constructor(_0x7bc3b1,_0x399f55){const _0x17bd14=_0x47ab;super(_0x17bd14(0xb32)+_0x399f55+_0x17bd14(0x373)+_0x7bc3b1+_0x17bd14(0x9e2),_0x17bd14(0x152),{'type':_0x7bc3b1,'index':_0x399f55}),this[_0x17bd14(0x1173)]=_0x17bd14(0x903);}}class _0x10c1f5 extends _0x48c71e{constructor(_0xdd3f,_0x49b076={}){const _0x3b5b63=_0x47ab;super(_0xdd3f,_0x3b5b63(0x5d4),_0x49b076),this[_0x3b5b63(0x1173)]=_0x3b5b63(0x4a3);}}class _0x3f1492 extends _0x48c71e{constructor(_0x388406,_0x46d4ad,_0x1bf50d,_0x27c8de,_0x10be73){const _0x5b856c=_0x47ab;super('Unique\x20constraint\x20violated\x20on\x20'+_0x388406+'@'+_0x46d4ad+':\x20key\x20['+_0x1bf50d+_0x5b856c(0x112e)+_0x27c8de+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x10be73+'\x27',_0x5b856c(0xba2),{'type':_0x388406,'index':_0x46d4ad,'indexKey':_0x1bf50d,'existingKey':_0x27c8de,'conflictingKey':_0x10be73}),this[_0x5b856c(0x1173)]='OKDBUniqueConstraintError';}}class _0x577fff extends _0x48c71e{constructor(_0x4332f5,_0x114c8a,_0x3fb8f3){const _0x25cd6f=_0x47ab;super(_0x25cd6f(0x937)+_0x4332f5+'@'+_0x114c8a,_0x25cd6f(0x11b0),{'type':_0x4332f5,'key':_0x114c8a,'errors':_0x3fb8f3}),this[_0x25cd6f(0x1173)]=_0x25cd6f(0x28d),this[_0x25cd6f(0xaee)]=_0x4332f5,this[_0x25cd6f(0x9dd)]=_0x114c8a,this[_0x25cd6f(0x736)]=_0x3fb8f3;}}class _0x4269e1 extends _0x48c71e{constructor(_0x5e8949,_0x4578cb){const _0x3055fb=_0x47ab;super(_0x3055fb(0x224)+_0x5e8949+':\x20'+_0x4578cb[_0x3055fb(0x156)]+_0x3055fb(0x715),_0x3055fb(0x1148),{'type':_0x5e8949,'failures':_0x4578cb}),this[_0x3055fb(0x1173)]=_0x3055fb(0x182),this[_0x3055fb(0xaee)]=_0x5e8949,this['failures']=_0x4578cb;}}class _0x22487f extends _0x48c71e{constructor(_0x303b8e,_0x50d921,_0x3f536d,_0x2108ad,_0x9c7d7a){const _0x5cce19=_0x47ab;super(_0x5cce19(0x325)+_0x303b8e+'@'+_0x50d921+'.'+_0x3f536d+'\x20references\x20'+_0x2108ad+'@'+_0x9c7d7a+_0x5cce19(0x267),_0x5cce19(0x2e8),{'sourceType':_0x303b8e,'sourceKey':_0x50d921,'fieldPath':_0x3f536d,'targetType':_0x2108ad,'targetKey':_0x9c7d7a}),this['name']=_0x5cce19(0x93a),this[_0x5cce19(0xc1a)]=_0x303b8e,this[_0x5cce19(0x11b)]=_0x50d921,this['fieldPath']=_0x3f536d,this[_0x5cce19(0x11c8)]=_0x2108ad,this[_0x5cce19(0x603)]=_0x9c7d7a;}}class _0x51716d extends _0x48c71e{constructor(_0x18da4a,_0x57825b,_0xcecd09){const _0x3a0c9d=_0x47ab;super(_0x3a0c9d(0x529)+_0x18da4a+'@'+_0x57825b+':\x20'+_0xcecd09['length']+_0x3a0c9d(0xdc6),_0x3a0c9d(0x30e),{'targetType':_0x18da4a,'targetKey':_0x57825b,'references':_0xcecd09}),this[_0x3a0c9d(0x1173)]='OKDBForeignKeyDeleteError',this['targetType']=_0x18da4a,this[_0x3a0c9d(0x603)]=_0x57825b,this[_0x3a0c9d(0x7c1)]=_0xcecd09;}}class _0x1d7876 extends _0x48c71e{constructor(_0x1224e0,_0x567a0d,_0x41cacf){const _0x58e34c=_0x47ab;super(_0x58e34c(0x114f)+_0x567a0d+_0x58e34c(0x3a7)+_0x1224e0+_0x58e34c(0xc0f)+_0x41cacf[_0x58e34c(0x1166)](_0x535aef=>_0x535aef[_0x58e34c(0x31e)]+':'+_0x535aef[_0x58e34c(0x1173)])[_0x58e34c(0x3d9)](',\x20'),_0x58e34c(0x6ae),{'type':_0x1224e0,'index':_0x567a0d,'usedBy':_0x41cacf}),this[_0x58e34c(0x1173)]=_0x58e34c(0x1246);}}return okdbError={'OKDBError':_0x48c71e,'OKDBVersionMismatchError':_0x4e9a61,'OKDBNotFoundError':_0x41308b,'OKDBAlreadyExistsError':_0x1067cf,'OKDBInvalidIndexKeyError':_0xd9faec,'OKDBInvalidPrimaryKeyError':_0xa60ec,'OKDBTypeNotRegisteredError':_0x14cfc1,'OKDBTypeAlreadyRegisteredError':_0x30bc20,'OKDBIndexNotRegisteredError':_0xc80847,'OKDBIndexAlreadyRegisteredError':_0x17388d,'OKDBInvalidValueError':_0x10c1f5,'OKDBUniqueConstraintError':_0x3f1492,'OKDBSchemaValidationError':_0x577fff,'OKDBSchemaCollectionError':_0x4269e1,'OKDBForeignKeyError':_0x22487f,'OKDBForeignKeyDeleteError':_0x51716d,'OKDBIndexHasConsumersError':_0x1d7876},okdbError;}var okdbTransaction,hasRequiredOkdbTransaction;function requireOkdbTransaction(){const _0xefcf92=_0xef8cd8;if(hasRequiredOkdbTransaction)return okdbTransaction;hasRequiredOkdbTransaction=0x1;const _0x48d42d=require$$0,{EVENTS:_0x195a70}=requireOkdbEnums(),{OKDBError:_0x5bd1d9}=requireOkdbError();class _0xb02d32{['okdb'];[_0xefcf92(0x677)]=[];[_0xefcf92(0x3c2)]=[];[_0xefcf92(0x13d)]=[];constructor(_0x1fd998,_0x2e08bd={'useReadTransaction':![]}){const _0x3941cc=_0xefcf92;this[_0x3941cc(0xd4f)]=_0x1fd998,this[_0x3941cc(0x11e5)]=_0x2e08bd,this['id']=_0x48d42d['v4'](),this[_0x3941cc(0x4c2)]=this[_0x3941cc(0x11e5)][_0x3941cc(0xb3d)]?this[_0x3941cc(0xd4f)]['db']['useReadTransaction']():null,this[_0x3941cc(0xf4f)]=![];}['onDo'](_0xd4c413){const _0x3cd64a=_0xefcf92;this[_0x3cd64a(0x3c2)]['push'](_0xd4c413);}[_0xefcf92(0xf48)](_0x15b685){const _0x5dccac=_0xefcf92;this['_undoHooks'][_0x5dccac(0x597)](_0x15b685);}[_0xefcf92(0x825)](){const _0x7c76f1=_0xefcf92;if(!this[_0x7c76f1(0x4c2)])return;try{this[_0x7c76f1(0x4c2)][_0x7c76f1(0x787)]();}catch(_0x5147a1){}this[_0x7c76f1(0x4c2)]=null;}[_0xefcf92(0xf13)](){const _0x46b4da=_0xefcf92;if(this[_0x46b4da(0xf4f)])throw new _0x5bd1d9('Transaction\x20already\x20closed',_0x46b4da(0x10f0));}[_0xefcf92(0xbeb)](_0x4deacd,_0x5eb631){const _0x17c5ea=_0xefcf92;return this[_0x17c5ea(0xf13)](),this['okdb'][_0x17c5ea(0xbeb)](_0x4deacd,_0x5eb631,{'transaction':this[_0x17c5ea(0x4c2)]});}[_0xefcf92(0xa57)](_0x497a5c,_0x73fda0){const _0x3d59b3=_0xefcf92;return this[_0x3d59b3(0xf13)](),this[_0x3d59b3(0xd4f)]['getEntry'](_0x497a5c,_0x73fda0,{'transaction':this[_0x3d59b3(0x4c2)]});}['getMany'](_0x8744f8,_0x1790f1){const _0x93459b=_0xefcf92;return this[_0x93459b(0xf13)](),this[_0x93459b(0xd4f)]['getMany'](_0x8744f8,_0x1790f1,{'transaction':this[_0x93459b(0x4c2)]});}[_0xefcf92(0x9ce)](_0x42ce9f,_0x5b6d47={}){const _0x477d57=_0xefcf92;return this[_0x477d57(0xf13)](),this[_0x477d57(0xd4f)][_0x477d57(0x9ce)](_0x42ce9f,{'transaction':this[_0x477d57(0x4c2)],..._0x5b6d47});}['getValues'](_0x1c30f5,_0x17fb79={}){const _0x499143=_0xefcf92;return this[_0x499143(0xf13)](),this[_0x499143(0xd4f)]['getValues'](_0x1c30f5,{'transaction':this[_0x499143(0x4c2)],..._0x17fb79});}[_0xefcf92(0x40e)](_0x1f8566,_0x2d95ce={}){const _0x380768=_0xefcf92;return this[_0x380768(0xf13)](),this['okdb']['getKeys'](_0x1f8566,{'transaction':this[_0x380768(0x4c2)],..._0x2d95ce});}['byIndex'](_0x16bfde,_0x4a37b4,_0x127774={}){const _0x35b769=_0xefcf92;return this[_0x35b769(0xf13)](),this['okdb'][_0x35b769(0x22e)](_0x16bfde,_0x4a37b4,{'transaction':this['readTransaction'],..._0x127774});}[_0xefcf92(0xa28)](_0x56cf3d,_0x15bf66,_0x11194d={}){const _0x3760b8=_0xefcf92;return this[_0x3760b8(0xf13)](),this[_0x3760b8(0xd4f)][_0x3760b8(0xa28)](_0x56cf3d,_0x15bf66,{'transaction':this[_0x3760b8(0x4c2)],..._0x11194d});}[_0xefcf92(0x5ea)](_0x4f8d54=null){const _0x29c4b8=_0xefcf92;return this[_0x29c4b8(0xf13)](),this[_0x29c4b8(0xd4f)][_0x29c4b8(0x5ea)](_0x4f8d54,{'transaction':this[_0x29c4b8(0x4c2)]});}[_0xefcf92(0x7df)](_0x35cd20){const _0x4cf1b3=_0xefcf92;return this[_0x4cf1b3(0xf13)](),this['okdb']['getCount'](_0x35cd20,{'transaction':this['readTransaction']});}[_0xefcf92(0x92c)](_0x223b4c,_0x4ad943,_0x3711b6,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date['now'](),origin:origin=null,ttl:ttl=null}={}){const _0x5b3821=_0xefcf92;this[_0x5b3821(0x677)][_0x5b3821(0x597)]({'action':'put','args':[_0x223b4c,_0x4ad943,_0x3711b6,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0xefcf92(0xbb7)](_0x515ad5,_0x1b6385,_0x18aa4f,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0xefcf92(0x555)](),origin:origin=null,ttl:ttl=null}={}){const _0xfa7bdb=_0xefcf92;this['actions'][_0xfa7bdb(0x597)]({'action':_0xfa7bdb(0xbb7),'args':[_0x515ad5,_0x1b6385,_0x18aa4f,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}['patch'](_0x371dc6,_0x4ad10,_0x5137ae,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0xefcf92(0x555)](),origin:origin=null,ttl:ttl=null}={}){const _0x56001a=_0xefcf92;this[_0x56001a(0x677)][_0x56001a(0x597)]({'action':'patch','args':[_0x371dc6,_0x4ad10,_0x5137ae,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}['create'](_0x557526,_0x3fd1fb,_0x24c3c7,{version:version=null,timestamp:timestamp=Date[_0xefcf92(0x555)](),origin:origin=null,ttl:ttl=null}={}){const _0x280f88=_0xefcf92;this['actions'][_0x280f88(0x597)]({'action':_0x280f88(0x725),'args':[_0x557526,_0x3fd1fb,_0x24c3c7,{'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0xefcf92(0x21e)](_0x111eb3,_0x37e951,{ifVersion:ifVersion=null,timestamp:timestamp=Date['now'](),origin:origin=null}={}){const _0x30888e=_0xefcf92;this[_0x30888e(0x677)][_0x30888e(0x597)]({'action':'remove','args':[_0x111eb3,_0x37e951,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin}]});}['setTTL'](_0x3247c2,_0x1fa1a7,_0x49881f){const _0x2ee5a3=_0xefcf92;this[_0x2ee5a3(0x677)][_0x2ee5a3(0x597)]({'action':_0x2ee5a3(0x6bf),'args':[_0x3247c2,_0x1fa1a7,_0x49881f]});}[_0xefcf92(0xb8b)](_0x256060,_0x4db961){const _0x219577=_0xefcf92;this[_0x219577(0x677)][_0x219577(0x597)]({'action':_0x219577(0xb8b),'args':[_0x256060,_0x4db961]});}[_0xefcf92(0xcb1)](){const _0x39aecc=_0xefcf92;if(this[_0x39aecc(0xf4f)])return;for(const _0x1d2b2c of this[_0x39aecc(0x13d)]){try{_0x1d2b2c();}catch{}}this['okdb'][_0x39aecc(0xea8)][_0x39aecc(0xf5d)](_0x195a70['TXN_ROLLBACK'],{'id':this['id']}),this['actions']=[],this[_0x39aecc(0x825)](),this[_0x39aecc(0xf4f)]=!![];}async['commit'](){const _0x54b299=_0xefcf92;if(this[_0x54b299(0xf4f)])throw new Error(_0x54b299(0xc46));const _0x5d3fe9={'id':this['id'],'timestamp':Date['now'](),'actions':this[_0x54b299(0x677)]};this['okdb'][_0x54b299(0xea8)][_0x54b299(0xf5d)](_0x195a70['TXN_START'],_0x5d3fe9);try{this['okdb']['db'][_0x54b299(0x5ef)](()=>{const _0x2a08b9=_0x54b299;for(const _0x209116 of this[_0x2a08b9(0x677)]){const _0x4ca8f4=this[_0x2a08b9(0xd4f)]['_'+_0x209116[_0x2a08b9(0x942)]];if(typeof _0x4ca8f4!=='function')throw new Error(_0x2a08b9(0x800)+_0x209116['action']);_0x4ca8f4[_0x2a08b9(0x834)](this['okdb'],this,..._0x209116[_0x2a08b9(0x47b)]);}});}catch(_0x113314){for(const _0x3a7a20 of this[_0x54b299(0x13d)]){try{_0x3a7a20();}catch{}}this[_0x54b299(0x825)](),this[_0x54b299(0xf4f)]=!![];if(_0x113314 instanceof _0x5bd1d9)throw _0x113314;throw new _0x5bd1d9(_0x113314?.[_0x54b299(0xb4e)]||_0x54b299(0xe7d),_0x54b299(0x4ba),{'cause':_0x113314});}this['okdb'][_0x54b299(0xea8)][_0x54b299(0xf5d)](_0x195a70['TXN_END'],_0x5d3fe9);for(const _0x1f040a of this['_doHooks']){try{_0x1f040a();}catch{}}this[_0x54b299(0x677)]=[],this[_0x54b299(0x825)](),this[_0x54b299(0xf4f)]=!![];}static[_0xefcf92(0x7c5)](_0x577e33){const _0x57b6eb=_0xefcf92;return Object[_0x57b6eb(0x108b)]({'id':_0x577e33['id'],'put':_0x577e33[_0x57b6eb(0x92c)][_0x57b6eb(0x10d5)](_0x577e33),'update':_0x577e33[_0x57b6eb(0xbb7)][_0x57b6eb(0x10d5)](_0x577e33),'patch':_0x577e33[_0x57b6eb(0xba7)][_0x57b6eb(0x10d5)](_0x577e33),'create':_0x577e33['create'][_0x57b6eb(0x10d5)](_0x577e33),'remove':_0x577e33[_0x57b6eb(0x21e)]['bind'](_0x577e33),'setTTL':_0x577e33['setTTL']['bind'](_0x577e33),'clearTTL':_0x577e33[_0x57b6eb(0xb8b)][_0x57b6eb(0x10d5)](_0x577e33),'commit':_0x577e33[_0x57b6eb(0xa78)][_0x57b6eb(0x10d5)](_0x577e33),'rollback':_0x577e33[_0x57b6eb(0xcb1)][_0x57b6eb(0x10d5)](_0x577e33),'get':_0x577e33[_0x57b6eb(0xbeb)][_0x57b6eb(0x10d5)](_0x577e33),'getEntry':_0x577e33[_0x57b6eb(0xa57)]['bind'](_0x577e33),'getMany':_0x577e33[_0x57b6eb(0x32d)]['bind'](_0x577e33),'getRange':_0x577e33[_0x57b6eb(0x9ce)][_0x57b6eb(0x10d5)](_0x577e33),'getValues':_0x577e33['getValues'][_0x57b6eb(0x10d5)](_0x577e33),'getKeys':_0x577e33[_0x57b6eb(0x40e)]['bind'](_0x577e33),'byIndex':_0x577e33[_0x57b6eb(0x22e)]['bind'](_0x577e33),'query':_0x577e33[_0x57b6eb(0xa28)][_0x57b6eb(0x10d5)](_0x577e33),'getClock':_0x577e33[_0x57b6eb(0x5ea)][_0x57b6eb(0x10d5)](_0x577e33),'getCount':_0x577e33[_0x57b6eb(0x7df)][_0x57b6eb(0x10d5)](_0x577e33),'read':_0x577e33,'raw':_0x577e33});}static[_0xefcf92(0xd8c)](_0x40a024,_0x207fac=[]){const _0x2f00d7=_0xefcf92;if(!Array[_0x2f00d7(0x10f5)](_0x207fac))throw new _0x5bd1d9(_0x2f00d7(0x177),_0x2f00d7(0x9ab));for(const _0x2ba3aa of _0x207fac){if(Array['isArray'](_0x2ba3aa)){const [_0x528ef2,..._0x4e7289]=_0x2ba3aa;if(typeof _0x40a024[_0x528ef2]!==_0x2f00d7(0x63b))throw new _0x5bd1d9(_0x2f00d7(0x800)+_0x528ef2,_0x2f00d7(0xb05),{'action':_0x528ef2});_0x40a024[_0x528ef2](..._0x4e7289);continue;}if(!_0x2ba3aa||typeof _0x2ba3aa!==_0x2f00d7(0xb36))throw new _0x5bd1d9(_0x2f00d7(0x124),_0x2f00d7(0xdfc));const {action:_0x40d4ee}=_0x2ba3aa;if(typeof _0x40d4ee!=='string'||typeof _0x40a024[_0x40d4ee]!==_0x2f00d7(0x63b))throw new _0x5bd1d9('Unknown\x20transaction\x20action:\x20'+_0x40d4ee,_0x2f00d7(0xb05),{'action':_0x40d4ee});switch(_0x40d4ee){case'put':case'update':case'create':_0x40a024[_0x40d4ee](_0x2ba3aa[_0x2f00d7(0xaee)],_0x2ba3aa[_0x2f00d7(0x9dd)],_0x2ba3aa[_0x2f00d7(0x568)],{..._0x2ba3aa['options'],'ttl':_0x2ba3aa[_0x2f00d7(0x347)]??_0x2ba3aa[_0x2f00d7(0x11e5)]?.['ttl']??null});break;case _0x2f00d7(0xba7):_0x40a024['patch'](_0x2ba3aa['type'],_0x2ba3aa[_0x2f00d7(0x9dd)],_0x2ba3aa[_0x2f00d7(0xba7)],{..._0x2ba3aa[_0x2f00d7(0x11e5)],'ttl':_0x2ba3aa[_0x2f00d7(0x347)]??_0x2ba3aa['options']?.[_0x2f00d7(0x347)]??null});break;case _0x2f00d7(0x21e):_0x40a024['remove'](_0x2ba3aa[_0x2f00d7(0xaee)],_0x2ba3aa['key'],_0x2ba3aa[_0x2f00d7(0x11e5)]||{});break;case _0x2f00d7(0x6bf):_0x40a024[_0x2f00d7(0x6bf)](_0x2ba3aa[_0x2f00d7(0xaee)],_0x2ba3aa[_0x2f00d7(0x9dd)],_0x2ba3aa['ttl']);break;case _0x2f00d7(0xb8b):_0x40a024[_0x2f00d7(0xb8b)](_0x2ba3aa[_0x2f00d7(0xaee)],_0x2ba3aa[_0x2f00d7(0x9dd)]);break;default:throw new _0x5bd1d9('Unsupported\x20transaction\x20action:\x20'+_0x40d4ee,_0x2f00d7(0xb05),{'action':_0x40d4ee});}}}static async[_0xefcf92(0x110b)](_0x339500,_0x23770d,_0x19b351={}){const _0x22d86d=_0xefcf92,_0x3c087e=new _0xb02d32(_0x339500,_0x19b351),_0x285bd0=_0xb02d32[_0x22d86d(0x7c5)](_0x3c087e);try{typeof _0x23770d==='function'?await _0x23770d(_0x285bd0):_0xb02d32[_0x22d86d(0xd8c)](_0x3c087e,_0x23770d||[]);const _0x139e8b=_0x3c087e[_0x22d86d(0x677)][_0x22d86d(0x156)];return await _0x3c087e[_0x22d86d(0xa78)](),{'id':_0x3c087e['id'],'actions':_0x139e8b};}catch(_0x2c2372){try{_0x3c087e[_0x22d86d(0xcb1)]();}catch(_0x50e749){}throw _0x2c2372;}}}return okdbTransaction=_0xb02d32,okdbTransaction;}var okdbHlc,hasRequiredOkdbHlc;function requireOkdbHlc(){const _0x1dcc75=_0xef8cd8;if(hasRequiredOkdbHlc)return okdbHlc;hasRequiredOkdbHlc=0x1;const _0x36fc31=0x400,_0x42a04f=_0x36fc31-0x1,_0x2d017b=0xea60;function _0x1e3bd5(_0x580a9f,_0x5640f8){const _0x45d81b=_0x47ab;return _0x580a9f*_0x36fc31+Math[_0x45d81b(0x10bf)](0x0,Math[_0x45d81b(0x2dc)](_0x5640f8,_0x42a04f));}function _0x1dfa35(_0x11fe6b){const _0x86c746=_0x47ab,_0x372070=Math[_0x86c746(0x10bf)](0x0,Number(_0x11fe6b)||0x0),_0x709736=_0x372070%_0x36fc31,_0x59440b=(_0x372070-_0x709736)/_0x36fc31;return{'pt':_0x59440b,'l':_0x709736};}function _0x5296c0(_0x47b1f0,_0x3a2294=Date[_0x1dcc75(0x555)]()){const _0x10c73e=_0x1dcc75,{pt:_0x5dabe5,l:_0x2b1a97}=_0x1dfa35(_0x47b1f0),_0x16828d=Math[_0x10c73e(0x10bf)](_0x5dabe5,_0x3a2294),_0x3851e1=_0x16828d===_0x5dabe5?Math['min'](_0x2b1a97+0x1,_0x42a04f):0x0;return _0x1e3bd5(_0x16828d,_0x3851e1);}function _0x5ede4d(_0x3ae3de,_0x54ba72,_0x33bd5c=Date[_0x1dcc75(0x555)]()){const _0x181edf=_0x1dcc75,{pt:_0xb82afe,l:_0x37c8a7}=_0x1dfa35(_0x3ae3de),{pt:_0x39b349,l:_0x6d2a85}=_0x1dfa35(_0x54ba72),_0xbf0365=Math[_0x181edf(0x10bf)](_0xb82afe,_0x39b349,_0x33bd5c);let _0x55d47e;if(_0xbf0365===_0xb82afe&&_0xbf0365===_0x39b349)_0x55d47e=Math[_0x181edf(0x2dc)](Math['max'](_0x37c8a7,_0x6d2a85)+0x1,_0x42a04f);else{if(_0xbf0365===_0xb82afe)_0x55d47e=Math[_0x181edf(0x2dc)](_0x37c8a7+0x1,_0x42a04f);else _0xbf0365===_0x39b349?_0x55d47e=Math[_0x181edf(0x2dc)](_0x6d2a85+0x1,_0x42a04f):_0x55d47e=0x0;}return _0x1e3bd5(_0xbf0365,_0x55d47e);}function _0x380202(_0x1242c0,_0x6de92a){const _0x296949=Number(_0x1242c0)||0x0,_0x2a3406=Number(_0x6de92a)||0x0;if(_0x296949<_0x2a3406)return-0x1;if(_0x296949>_0x2a3406)return 0x1;return 0x0;}function _0x12c405(_0xdbd7d9){return _0x1dfa35(_0xdbd7d9)['pt'];}return okdbHlc={'send':_0x5296c0,'recv':_0x5ede4d,'compare':_0x380202,'toMs':_0x12c405,'encode':_0x1e3bd5,'decode':_0x1dfa35,'SCALE':_0x36fc31,'L_MAX':_0x42a04f,'DRIFT_MAX':_0x2d017b},okdbHlc;}var okdbProcessor,hasRequiredOkdbProcessor;function requireOkdbProcessor(){const _0x5accaa=_0xef8cd8;if(hasRequiredOkdbProcessor)return okdbProcessor;hasRequiredOkdbProcessor=0x1;const _0x56d339=require$$0$1,_0x588b51=require$$1,{CHANGE_ACTIONS:_0xa843f3,INDEX_STATE:_0xcc8566}=requireOkdbEnums(),_0x4cb5a8='~proc:state',_0x3e7043=_0x5accaa(0x6a3);class _0x1b5e4a{constructor(_0x453b31){const _0x591ec9=_0x5accaa;this[_0x591ec9(0xd4f)]=_0x453b31,this['env']=_0x453b31,this['_stateDb']=null,this[_0x591ec9(0x121d)]=null,this[_0x591ec9(0x621)]=new Map(),this[_0x591ec9(0x9a1)]=new Map(),this[_0x591ec9(0xcf2)]=[],this['_flushLocks']=new Map();}[_0x5accaa(0x2a4)](_0x595219,{handler:_0x1103e7,mode:mode='async',bootstrap:bootstrap='log',originMode:originMode='self',batchSize:batchSize=0x100,hydrateValues:hydrateValues=!![],cursorKey:cursorKey=null,lockMode:lockMode=null,failOnHandlerError:failOnHandlerError=![],name:name=null,meta:meta={},leaseTtlMs:leaseTtlMs=0x7530}={}){const _0x1d2031=_0x5accaa;if(!_0x595219)throw new Error(_0x1d2031(0x2da));if(typeof _0x1103e7!=='function')throw new Error(_0x1d2031(0x827));if(![_0x1d2031(0x1006),'inline'][_0x1d2031(0x29c)](mode))throw new Error('invalid\x20mode');if(mode===_0x1d2031(0x10aa))bootstrap=null;this[_0x1d2031(0xeab)]();const _0x539e0e=_0x56d339[_0x1d2031(0xa91)](),_0xc003b6=cursorKey||(name?_0x595219+':'+name:null),_0x5a1e33=_0xc003b6?this['_stateDb'][_0x1d2031(0xbeb)](_0xc003b6)??0x0:0x0,_0x5bb9ad=_0xc003b6?!!this[_0x1d2031(0xb3e)][_0x1d2031(0xbeb)](this[_0x1d2031(0xcc9)](_0xc003b6)):![],_0xa86cf2={'id':_0x539e0e,'type':_0x595219,'mode':mode,'bootstrap':bootstrap,'handler':_0x1103e7,'originMode':originMode,'batchSize':batchSize,'hydrateValues':hydrateValues,'lockMode':lockMode||null,'failOnHandlerError':failOnHandlerError===!![],'cursorKey':_0xc003b6,'meta':{'name':name,...meta},'state':mode==='async'?_0x1d2031(0x760):_0x1d2031(0x998),'paused':![],'error':null,'lastClock':_0x5a1e33,'snapshotComplete':_0x5bb9ad,'snapshotHead':null,'buildStartClock':_0x5a1e33,'progress':null,'leaseTtlMs':leaseTtlMs,'stopped':![],'_scheduled':![],'_inflightFlush':null,'_leaseKey':null,'_heartbeatTimer':null};if(!this[_0x1d2031(0x9a1)][_0x1d2031(0x9d0)](_0x595219))this[_0x1d2031(0x9a1)][_0x1d2031(0x211)](_0x595219,new Set());this[_0x1d2031(0x9a1)][_0x1d2031(0xbeb)](_0x595219)[_0x1d2031(0x33c)](_0x539e0e),this[_0x1d2031(0x621)]['set'](_0x539e0e,_0xa86cf2);mode==='async'&&queueMicrotask(()=>{const _0x68399c=_0x1d2031;this[_0x68399c(0x53e)](_0xa86cf2)[_0x68399c(0x415)](_0xb79d53=>this['_fail'](_0xa86cf2,_0xb79d53));});const _0xe4b672=async()=>{const _0x390318=_0x1d2031;_0xa86cf2[_0x390318(0xd45)]=!![];_0xa86cf2['_heartbeatTimer']&&(clearInterval(_0xa86cf2[_0x390318(0x1082)]),_0xa86cf2['_heartbeatTimer']=null);_0xa86cf2[_0x390318(0x11c5)]&&(this[_0x390318(0x684)](_0xa86cf2[_0x390318(0x11c5)]),_0xa86cf2[_0x390318(0x11c5)]=null);if(_0xa86cf2[_0x390318(0x14e)])try{await _0xa86cf2[_0x390318(0x14e)];}catch{}this[_0x390318(0x621)]['delete'](_0x539e0e),this[_0x390318(0x722)][_0x390318(0x3b3)](_0x539e0e);const _0x3278a5=this['_byType'][_0x390318(0xbeb)](_0x595219);if(_0x3278a5){_0x3278a5['delete'](_0x539e0e);if(_0x3278a5[_0x390318(0xfb)]===0x0)this[_0x390318(0x9a1)][_0x390318(0x3b3)](_0x595219);}const _0x24bff8=this[_0x390318(0xcf2)]['indexOf'](_0xe4b672);if(_0x24bff8!==-0x1)this[_0x390318(0xcf2)]['splice'](_0x24bff8,0x1);};return this['_stops'][_0x1d2031(0x597)](_0xe4b672),_0xe4b672['id']=_0x539e0e,_0xe4b672[_0x1d2031(0x10f6)]=_0xc003b6,_0xe4b672[_0x1d2031(0xfcd)]=()=>this[_0x1d2031(0xbeb)](_0x539e0e),_0xe4b672[_0x1d2031(0x1ab)]=_0xe4b672[_0x1d2031(0xfcd)],_0xe4b672[_0x1d2031(0x315)]=()=>this[_0x1d2031(0x315)](_0x539e0e),_0xe4b672[_0x1d2031(0x445)]=()=>this[_0x1d2031(0x445)](_0x539e0e),_0xe4b672[_0x1d2031(0x1116)]=()=>this[_0x1d2031(0x1116)](_0x539e0e),_0xe4b672;}async[_0x5accaa(0x910)](){const _0x1c2be3=_0x5accaa,_0x5a792e=[...this[_0x1c2be3(0xcf2)]];for(const _0x5228a8 of _0x5a792e)await _0x5228a8();}[_0x5accaa(0x63e)](){const _0x524618=_0x5accaa;return[...this['_registrations'][_0x524618(0x231)]()]['map'](_0x156257=>this[_0x524618(0x55d)](_0x156257));}['get'](_0x20d89c){const _0x577438=_0x5accaa,_0x4407c4=this['_registrations'][_0x577438(0xbeb)](_0x20d89c);if(!_0x4407c4)return null;return this[_0x577438(0x55d)](_0x4407c4);}[_0x5accaa(0x1c3)](_0x239d5f){const _0x537eea=_0x5accaa;return this[_0x537eea(0xeab)](),this[_0x537eea(0xb3e)][_0x537eea(0xbeb)](_0x239d5f)??0x0;}[_0x5accaa(0xcec)](_0x435d9a){const _0x47982c=_0x5accaa;this['_ensureDbs']();try{this[_0x47982c(0xb3e)][_0x47982c(0xb6f)](_0x435d9a,0x0),this['_stateDb'][_0x47982c(0x123a)](this[_0x47982c(0xcc9)](_0x435d9a));}catch{}}[_0x5accaa(0x16c)](_0x3b740a){const _0x59ba42=_0x5accaa;this['_ensureDbs']();try{this[_0x59ba42(0xb3e)][_0x59ba42(0xb6f)](this[_0x59ba42(0xcc9)](_0x3b740a),!![]);}catch{}}[_0x5accaa(0x315)](_0x126ef6){const _0x312870=_0x5accaa,_0x44132e=this[_0x312870(0x621)][_0x312870(0xbeb)](_0x126ef6);if(!_0x44132e)return![];return _0x44132e[_0x312870(0xf68)]=!![],this['okdb'][_0x312870(0xea8)][_0x312870(0xf5d)]?.(_0x312870(0x8c4),this['_status'](_0x44132e)),!![];}[_0x5accaa(0x445)](_0x452c03){const _0x36770f=_0x5accaa,_0x5b1c9f=this[_0x36770f(0x621)][_0x36770f(0xbeb)](_0x452c03);if(!_0x5b1c9f)return![];return _0x5b1c9f[_0x36770f(0xf68)]=![],this[_0x36770f(0xd4f)][_0x36770f(0xea8)][_0x36770f(0xf5d)]?.(_0x36770f(0x216),this['_status'](_0x5b1c9f)),_0x5b1c9f[_0x36770f(0x259)]===_0x36770f(0x1006)&&_0x5b1c9f[_0x36770f(0x10e2)]===_0x36770f(0x998)&&this[_0x36770f(0x1232)](_0x5b1c9f),!![];}['retry'](_0x1522bb){const _0x106ece=_0x5accaa,_0x30cf91=this[_0x106ece(0x621)]['get'](_0x1522bb);if(!_0x30cf91)return![];if(_0x30cf91[_0x106ece(0x10e2)]!==_0x106ece(0x225))return![];return _0x30cf91[_0x106ece(0x10e2)]='building',_0x30cf91[_0x106ece(0x225)]=null,this[_0x106ece(0xd4f)][_0x106ece(0xea8)][_0x106ece(0xf5d)]?.(_0x106ece(0x890),this[_0x106ece(0x55d)](_0x30cf91)),_0x30cf91[_0x106ece(0x259)]===_0x106ece(0x1006)?queueMicrotask(()=>{const _0x3b5433=_0x106ece;this[_0x3b5433(0x53e)](_0x30cf91)['catch'](_0x55aebd=>this[_0x3b5433(0x4e3)](_0x30cf91,_0x55aebd));}):_0x30cf91[_0x106ece(0x10e2)]='online',!![];}[_0x5accaa(0x274)](_0x1650e1){const _0x28f827=_0x5accaa,_0x3919ec=this['_byType'][_0x28f827(0xbeb)](_0x1650e1['type']);if(!_0x3919ec)return;for(const _0x5cdd9e of _0x3919ec){const _0x225207=this[_0x28f827(0x621)][_0x28f827(0xbeb)](_0x5cdd9e);if(!_0x225207||_0x225207[_0x28f827(0xd45)]||_0x225207[_0x28f827(0x10e2)]==='error'||_0x225207['paused'])continue;if(_0x225207['mode']!=='inline')continue;if(!_0x5de424(_0x1650e1['origin'],_0x225207[_0x28f827(0xb4)],this[_0x28f827(0xd4f)]['id']))continue;try{const _0x106941=_0x225207[_0x28f827(0x34c)]([_0x1650e1],{'mode':_0x28f827(0x10aa),'type':_0x225207['type'],'processor':_0x225207['id']});_0x106941&&typeof _0x106941[_0x28f827(0x7db)]===_0x28f827(0x63b)&&this[_0x28f827(0xd4f)][_0x28f827(0x9be)]?.['warn']?.(_0x28f827(0xe80));}catch(_0x1b26f3){this[_0x28f827(0xd4f)][_0x28f827(0x9be)]?.[_0x28f827(0xf78)]?.(_0x28f827(0xe52)+(_0x225207[_0x28f827(0x654)]?.['name']||_0x225207['id'])+'):',_0x1b26f3?.[_0x28f827(0xb4e)]||_0x1b26f3),this[_0x28f827(0xd4f)]['events'][_0x28f827(0xf5d)]?.(_0x28f827(0xc72),{...this[_0x28f827(0x55d)](_0x225207),'error':_0x1b26f3?.[_0x28f827(0xb4e)]??String(_0x1b26f3)});}_0x1650e1[_0x28f827(0x114d)]!=null&&_0x1650e1[_0x28f827(0x114d)]>_0x225207[_0x28f827(0x1e9)]&&(_0x225207['lastClock']=_0x1650e1[_0x28f827(0x114d)]);}}[_0x5accaa(0x6e2)](_0x20ad99){return this['_onAfterCommit'](_0x20ad99);}[_0x5accaa(0x333)](_0x45fb51){const _0x5722e6=_0x5accaa,_0x1d2c8e=this[_0x5722e6(0x9a1)]['get'](_0x45fb51['type']);if(!_0x1d2c8e)return;for(const _0x2d2c93 of _0x1d2c8e){const _0x120250=this['_registrations']['get'](_0x2d2c93);if(!_0x120250||_0x120250[_0x5722e6(0xd45)]||_0x120250[_0x5722e6(0xf68)])continue;if(_0x120250[_0x5722e6(0x259)]!==_0x5722e6(0x1006))continue;if(_0x120250[_0x5722e6(0x10e2)]!==_0x5722e6(0x998))continue;this['_scheduleFlush'](_0x120250);}}['_scheduleFlush'](_0x42faa4){const _0x8df773=_0x5accaa;if(_0x42faa4[_0x8df773(0x18d)]||_0x42faa4[_0x8df773(0xf68)])return;_0x42faa4[_0x8df773(0x18d)]=!![],setTimeout(()=>{const _0x3e5f84=_0x8df773;_0x42faa4['_scheduled']=![];if(_0x42faa4[_0x3e5f84(0xf68)]||_0x42faa4['stopped'])return;if(!this[_0x3e5f84(0xd4f)][_0x3e5f84(0xe56)])return;this[_0x3e5f84(0x323)](_0x42faa4)[_0x3e5f84(0x415)](_0x2799cb=>this[_0x3e5f84(0x4e3)](_0x42faa4,_0x2799cb));},0x0);}async[_0x5accaa(0x323)](_0x274f31){const _0xb1df5=_0x5accaa;return this[_0xb1df5(0x1127)](_0x274f31,()=>this[_0xb1df5(0xaff)](_0x274f31));}async[_0x5accaa(0x1127)](_0x551891,_0x617c3d){const _0x5efb23=_0x5accaa;if(_0x551891[_0x5efb23(0x2fb)]!==_0x5efb23(0x7f3))return _0x617c3d();const _0x91ba3f=this['_flushLocks']['get'](_0x551891['id'])||Promise[_0x5efb23(0x797)](),_0x7a861b=_0x91ba3f['catch'](()=>{})[_0x5efb23(0x7db)](_0x617c3d);return this[_0x5efb23(0x722)][_0x5efb23(0x211)](_0x551891['id'],_0x7a861b[_0x5efb23(0x415)](()=>{})),_0x7a861b;}async['_bootstrap'](_0x111023){const _0x3d7ca6=_0x5accaa;if(_0x111023[_0x3d7ca6(0xd45)]||_0x111023[_0x3d7ca6(0x10e2)]===_0x3d7ca6(0x225))return;const _0x2373c4=_0x3d7ca6(0x483)+_0x111023[_0x3d7ca6(0xaee)]+':'+(_0x111023[_0x3d7ca6(0x10f6)]||_0x111023['id']),_0x139427=this[_0x3d7ca6(0x808)](_0x2373c4,_0x111023[_0x3d7ca6(0x991)]);if(!_0x139427){_0x111023[_0x3d7ca6(0x10e2)]=_0xcc8566[_0x3d7ca6(0x68b)];return;}_0x111023['_leaseKey']=_0x2373c4,_0x111023['_heartbeatTimer']=setInterval(()=>this[_0x3d7ca6(0xf7d)](_0x111023),_0x111023[_0x3d7ca6(0x991)]/0x3);try{await this['_withExclusiveLock'](_0x111023,async()=>{const _0x4fee78=_0x3d7ca6;if(_0x111023['lastClock']>0x0||_0x111023[_0x4fee78(0x781)]===_0x4fee78(0x33f)&&_0x111023['snapshotComplete'])_0x111023[_0x4fee78(0xaa8)]=_0x111023[_0x4fee78(0x1e9)],await this[_0x4fee78(0xaff)](_0x111023);else _0x111023[_0x4fee78(0x781)]===_0x4fee78(0x33f)?(await this[_0x4fee78(0x5af)](_0x111023),await this[_0x4fee78(0xaff)](_0x111023)):await this[_0x4fee78(0x877)](_0x111023);_0x111023[_0x4fee78(0x10e2)]=_0x4fee78(0x998),await this['_flush'](_0x111023),_0x111023[_0x4fee78(0xb97)]={'phase':_0x4fee78(0x38b)},this[_0x4fee78(0xd4f)][_0x4fee78(0xea8)][_0x4fee78(0xf5d)]?.(_0x4fee78(0x1106),this[_0x4fee78(0x55d)](_0x111023));});}catch(_0x1d7295){_0x111023[_0x3d7ca6(0x1082)]&&(clearInterval(_0x111023[_0x3d7ca6(0x1082)]),_0x111023['_heartbeatTimer']=null);this['_releaseLease'](_0x2373c4),_0x111023['_leaseKey']=null;throw _0x1d7295;}}async[_0x5accaa(0x5af)](_0x447cee){const _0x33404d=_0x5accaa;_0x447cee[_0x33404d(0x10e2)]='building';const _0x332d43=this[_0x33404d(0x30b)][_0x33404d(0x5ea)](_0x447cee[_0x33404d(0xaee)]);_0x447cee[_0x33404d(0x11c6)]=_0x332d43,_0x447cee[_0x33404d(0xaa8)]=_0x332d43;const _0x1c9bd0=this[_0x33404d(0xd4f)][_0x33404d(0x7df)](_0x447cee[_0x33404d(0xaee)]);let _0x2a96a2=0x0;_0x447cee[_0x33404d(0xb97)]={'phase':_0x33404d(0x33f),'processed':_0x2a96a2,'total':_0x1c9bd0,'percent':0x0};const _0x3eafb1=this[_0x33404d(0xd4f)][_0x33404d(0x9ca)](_0x447cee[_0x33404d(0xaee)]),_0x35e0ea=_0x3eafb1[_0x33404d(0xc88)][_0x33404d(0x9ce)]({'snapshot':!![]}),_0x521ad8=_0x447cee[_0x33404d(0xc2a)]||0x64;for(const {key:_0x156e8a,value:_0x12885c,version:_0x545873}of _0x35e0ea){if(_0x447cee[_0x33404d(0xd45)]||_0x447cee[_0x33404d(0x10e2)]===_0x33404d(0x225))return;const _0x2c7f40={'action':_0xa843f3[_0x33404d(0x719)],'type':_0x447cee['type'],'key':_0x156e8a,'value':_0x12885c,'version':_0x545873,'clock':null,'origin':this[_0x33404d(0xd4f)]['id'],'timestamp':Date[_0x33404d(0x555)](),'newValue':_0x12885c,'oldValue':undefined};await _0x447cee['handler']([_0x2c7f40],{'mode':_0x33404d(0x4e6),'type':_0x447cee['type'],'processor':_0x447cee['id']}),_0x2a96a2++,_0x447cee['progress']={'phase':_0x33404d(0x33f),'processed':_0x2a96a2,'total':_0x1c9bd0,'percent':_0x1c9bd0?_0x2a96a2/_0x1c9bd0:0x1},this[_0x33404d(0xd4f)][_0x33404d(0xea8)][_0x33404d(0xf5d)]?.(_0x33404d(0x311),this[_0x33404d(0x55d)](_0x447cee));_0x2a96a2%_0x521ad8===0x0&&!_0x447cee['stopped']&&!_0x447cee[_0x33404d(0xf68)]&&await new Promise(_0x2b978a=>setTimeout(_0x2b978a,0x0));if(_0x447cee[_0x33404d(0xd45)]||_0x447cee[_0x33404d(0xf68)])break;}_0x447cee['lastClock']=_0x332d43,this[_0x33404d(0x98c)](_0x447cee),this[_0x33404d(0x62f)](_0x447cee);}async[_0x5accaa(0x877)](_0x51f206){const _0x244c7c=_0x5accaa;_0x51f206[_0x244c7c(0x10e2)]=_0x244c7c(0x760),_0x51f206[_0x244c7c(0xaa8)]=_0x51f206[_0x244c7c(0x1e9)],await this[_0x244c7c(0xaff)](_0x51f206);}async[_0x5accaa(0xaff)](_0x3fae26){const _0x17ab4c=_0x5accaa;if(_0x3fae26[_0x17ab4c(0xd45)]||_0x3fae26['state']===_0x17ab4c(0x225)||_0x3fae26['paused'])return;const _0x16ed96=this['okdb'][_0x17ab4c(0x5ea)](_0x3fae26[_0x17ab4c(0xaee)]);if(_0x16ed96<=_0x3fae26[_0x17ab4c(0x1e9)])return;const _0x1e5042=this['_doFlush'](_0x3fae26,_0x16ed96);_0x3fae26['_inflightFlush']=_0x1e5042;try{await _0x1e5042;}finally{_0x3fae26[_0x17ab4c(0x14e)]===_0x1e5042&&(_0x3fae26[_0x17ab4c(0x14e)]=null);}}async['_doFlush'](_0xf218be,_0x53bb35){const _0x360de1=_0x5accaa,_0x4457d9=Array[_0x360de1(0x9f8)](this[_0x360de1(0xd4f)][_0x360de1(0x151)](_0xf218be[_0x360de1(0xaee)],_0xf218be[_0x360de1(0x1e9)]+0x1,_0x53bb35)),_0x236eb1=_0x4457d9[_0x360de1(0x1103)](_0x8c6ddf=>_0x8c6ddf[_0x360de1(0x942)]===_0xa843f3[_0x360de1(0x719)]||_0x8c6ddf[_0x360de1(0x942)]===_0xa843f3[_0x360de1(0x1b8)]),_0x58d981=_0x35d5ec(_0x236eb1,_0xf218be[_0x360de1(0xb4)],this[_0x360de1(0xd4f)]['id']),_0xbe8785=_0x53bb35-_0xf218be[_0x360de1(0xaa8)];for(let _0x3c1fd3=0x0;_0x3c1fd3<_0x58d981['length'];_0x3c1fd3+=_0xf218be[_0x360de1(0xc2a)]){if(_0xf218be[_0x360de1(0xd45)]||_0xf218be[_0x360de1(0xf68)])return;const _0x3c9473=_0x58d981['slice'](_0x3c1fd3,_0x3c1fd3+_0xf218be[_0x360de1(0xc2a)]),_0x2fc309=_0xf218be['hydrateValues']?_0x3c9473[_0x360de1(0x1166)](_0xe08245=>_0xe08245[_0x360de1(0x942)]===_0xa843f3[_0x360de1(0x719)]?{..._0xe08245,'value':this['env'][_0x360de1(0xbeb)](_0xf218be[_0x360de1(0xaee)],_0xe08245[_0x360de1(0x9dd)])}:_0xe08245):_0x3c9473;try{await _0xf218be[_0x360de1(0x34c)](_0x2fc309,{'mode':_0xf218be['state']===_0x360de1(0x760)?_0x360de1(0x4e6):_0x360de1(0x38b),'type':_0xf218be[_0x360de1(0xaee)],'processor':_0xf218be['id']});}catch(_0x53fc21){this['okdb'][_0x360de1(0x9be)]?.['warn']?.(_0x360de1(0xc03)+(_0xf218be['meta']?.[_0x360de1(0x1173)]||_0xf218be['id'])+'):',_0x53fc21?.['message']||_0x53fc21),this[_0x360de1(0xd4f)][_0x360de1(0xea8)][_0x360de1(0xf5d)]?.(_0x360de1(0xc72),{...this['_status'](_0xf218be),'error':_0x53fc21?.[_0x360de1(0xb4e)]??String(_0x53fc21),'batchOffset':_0x3c1fd3});if(_0xf218be[_0x360de1(0xf6d)]){this[_0x360de1(0x4e3)](_0xf218be,_0x53fc21);return;}}_0xf218be[_0x360de1(0x1e9)]=_0x3c9473[_0x3c9473['length']-0x1][_0x360de1(0x114d)],this[_0x360de1(0x98c)](_0xf218be);const _0x283279=_0xf218be[_0x360de1(0x1e9)]-_0xf218be[_0x360de1(0xaa8)];_0xf218be[_0x360de1(0xb97)]={'phase':'log','processed':_0x283279,'total':_0xbe8785,'percent':_0xbe8785?_0x283279/_0xbe8785:0x1,'lag':_0x53bb35-_0xf218be['lastClock']},this['okdb'][_0x360de1(0xea8)][_0x360de1(0xf5d)]?.(_0x360de1(0x311),this[_0x360de1(0x55d)](_0xf218be)),_0x3c1fd3+_0xf218be[_0x360de1(0xc2a)]<_0x58d981[_0x360de1(0x156)]&&!_0xf218be[_0x360de1(0xd45)]&&!_0xf218be[_0x360de1(0xf68)]&&await new Promise(_0x5f5d51=>setTimeout(_0x5f5d51,0x0));}!_0xf218be['stopped']&&!_0xf218be['paused']&&_0xf218be['lastClock']<_0x53bb35&&(_0xf218be['lastClock']=_0x53bb35,this[_0x360de1(0x98c)](_0xf218be));}['_acquireLease'](_0x59f401,_0x1258ae=0x7530){const _0x1f90c0=_0x5accaa;try{const _0x25e0dc=this[_0x1f90c0(0x121d)][_0x1f90c0(0xbeb)](_0x59f401);if(_0x25e0dc){const _0x5ae4ac=_0x25e0dc[_0x1f90c0(0x2d3)]??_0x25e0dc[_0x1f90c0(0x8a0)]??0x0,_0x302281=_0x5ae4ac+_0x1258ae<Date['now']();if(!_0x302281)return![];}return this[_0x1f90c0(0x121d)]['putSync'](_0x59f401,{'pid':process[_0x1f90c0(0x8fc)],'hostname':_0x588b51[_0x1f90c0(0x73b)](),'startedAt':Date[_0x1f90c0(0x555)](),'updatedAt':Date[_0x1f90c0(0x555)](),'leaseTtlMs':_0x1258ae}),!![];}catch{return![];}}[_0x5accaa(0xf7d)](_0x14717f){const _0x4c1945=_0x5accaa;if(!_0x14717f['_leaseKey'])return;try{const _0x4556f6=this[_0x4c1945(0x121d)][_0x4c1945(0xbeb)](_0x14717f['_leaseKey']);if(!_0x4556f6)return;this[_0x4c1945(0x121d)][_0x4c1945(0xb6f)](_0x14717f[_0x4c1945(0x11c5)],{..._0x4556f6,'updatedAt':Date['now']()});}catch{}}[_0x5accaa(0x684)](_0x39051b){const _0x91907a=_0x5accaa;try{this[_0x91907a(0x121d)]['removeSync'](_0x39051b);}catch{}}[_0x5accaa(0x4e3)](_0x538f43,_0x3e4a91){const _0x208554=_0x5accaa;_0x538f43[_0x208554(0x10e2)]=_0x208554(0x225),_0x538f43[_0x208554(0x225)]=_0x3e4a91?.['message']??String(_0x3e4a91),this[_0x208554(0xd4f)][_0x208554(0xea8)]['emit']?.(_0x208554(0xc72),this[_0x208554(0x55d)](_0x538f43));}[_0x5accaa(0x55d)](_0x29f69f){const _0x2de8c4=_0x5accaa;let _0x2f851f=_0x29f69f[_0x2de8c4(0x1e9)];try{this[_0x2de8c4(0xd4f)]?.[_0x2de8c4(0xe56)]!==![]&&(_0x2f851f=this['okdb']['getClock'](_0x29f69f[_0x2de8c4(0xaee)]));}catch{_0x2f851f=_0x29f69f[_0x2de8c4(0x1e9)];}return{'id':_0x29f69f['id'],'type':_0x29f69f[_0x2de8c4(0xaee)],'mode':_0x29f69f['mode'],'state':_0x29f69f[_0x2de8c4(0x10e2)],'paused':_0x29f69f[_0x2de8c4(0xf68)],'lastClock':_0x29f69f[_0x2de8c4(0x1e9)],'headClock':_0x2f851f,'lag':_0x2f851f-_0x29f69f[_0x2de8c4(0x1e9)],'bootstrap':_0x29f69f[_0x2de8c4(0x781)],'progress':_0x29f69f[_0x2de8c4(0xb97)],'error':_0x29f69f[_0x2de8c4(0x225)],'meta':_0x29f69f[_0x2de8c4(0x654)],'cursorKey':_0x29f69f[_0x2de8c4(0x10f6)]??null};}['_ensureDbs'](){const _0xd5b981=_0x5accaa;!this[_0xd5b981(0xb3e)]&&(this[_0xd5b981(0xb3e)]=this[_0xd5b981(0xd4f)]['db'][_0xd5b981(0x730)](_0x4cb5a8,{'dupSort':![]})),!this['_leaseDb']&&(this['_leaseDb']=this[_0xd5b981(0xd4f)]['db'][_0xd5b981(0x730)](_0x3e7043,{'dupSort':![]}));}[_0x5accaa(0x98c)](_0x5badb5){const _0x97bb30=_0x5accaa;if(!_0x5badb5[_0x97bb30(0x10f6)])return;try{this['_stateDb'][_0x97bb30(0xb6f)](_0x5badb5[_0x97bb30(0x10f6)],_0x5badb5['lastClock']);}catch{}}['_saveSnapshotComplete'](_0x1aba16){const _0x1c6942=_0x5accaa;if(!_0x1aba16[_0x1c6942(0x10f6)]||_0x1aba16[_0x1c6942(0x781)]!==_0x1c6942(0x33f))return;_0x1aba16['snapshotComplete']=!![];try{this[_0x1c6942(0xb3e)][_0x1c6942(0xb6f)](this['_snapshotCompleteKey'](_0x1aba16[_0x1c6942(0x10f6)]),!![]);}catch{}}[_0x5accaa(0xcc9)](_0x539b3a){const _0x1866f9=_0x5accaa;return _0x539b3a+_0x1866f9(0x374);}}function _0x35d5ec(_0x23703f,_0x511a0e,_0x2269e3){const _0x2c1f4c=_0x5accaa;if(_0x511a0e===_0x2c1f4c(0xf09))return _0x23703f;if(_0x511a0e==='self')return _0x23703f[_0x2c1f4c(0x1103)](_0x36c2da=>_0x36c2da[_0x2c1f4c(0xca6)]===_0x2269e3);if(_0x511a0e===_0x2c1f4c(0xe61))return _0x23703f[_0x2c1f4c(0x1103)](_0x27a2cb=>_0x27a2cb[_0x2c1f4c(0xca6)]!==_0x2269e3);return _0x23703f;}function _0x5de424(_0x21bbd9,_0x1c4ead,_0x465801){const _0x44d639=_0x5accaa;if(_0x1c4ead===_0x44d639(0xf09))return!![];if(_0x1c4ead===_0x44d639(0x726))return _0x21bbd9===_0x465801;if(_0x1c4ead===_0x44d639(0xe61))return _0x21bbd9!==_0x465801;return!![];}return okdbProcessor=_0x1b5e4a,okdbProcessor;}var okdbGeo,hasRequiredOkdbGeo;function requireOkdbGeo(){const _0x231b8d=_0xef8cd8;if(hasRequiredOkdbGeo)return okdbGeo;hasRequiredOkdbGeo=0x1;const _0x20e097=_0x231b8d(0x100f),_0x1f5cba=0x6136b8;function _0x2dbc9c(_0x315c05,_0x2172e6,_0x23ee9d=0x7){const _0x3e02d8=_0x231b8d,_0xbf0917=[-0x5a,0x5a],_0x1a7068=[-0xb4,0xb4];let _0x4fdc0f='',_0x4786d4=0x0,_0x130461=0x0,_0x26c5f8=!![];while(_0x4fdc0f[_0x3e02d8(0x156)]<_0x23ee9d){const _0x5c0448=_0x26c5f8?_0x1a7068:_0xbf0917,_0x20e14f=_0x26c5f8?_0x2172e6:_0x315c05,_0x112747=(_0x5c0448[0x0]+_0x5c0448[0x1])/0x2;_0x20e14f>=_0x112747?(_0x130461|=0x1<<0x4-_0x4786d4,_0x5c0448[0x0]=_0x112747):_0x5c0448[0x1]=_0x112747,_0x26c5f8=!_0x26c5f8,++_0x4786d4===0x5&&(_0x4fdc0f+=_0x20e097[_0x130461],_0x4786d4=0x0,_0x130461=0x0);}return _0x4fdc0f;}function _0x284e04(_0x3f8d0b){const _0x180a2c=_0x231b8d,_0x501704=[-0x5a,0x5a],_0x3e058d=[-0xb4,0xb4];let _0x58f2ef=!![];for(const _0x42f9a5 of _0x3f8d0b){const _0x2481e3=_0x20e097[_0x180a2c(0x10b8)](_0x42f9a5);for(let _0x416e2d=0x4;_0x416e2d>=0x0;_0x416e2d--){const _0x421813=_0x58f2ef?_0x3e058d:_0x501704,_0x5054de=(_0x421813[0x0]+_0x421813[0x1])/0x2;if(_0x2481e3&0x1<<_0x416e2d)_0x421813[0x0]=_0x5054de;else _0x421813[0x1]=_0x5054de;_0x58f2ef=!_0x58f2ef;}}return{'lat':(_0x501704[0x0]+_0x501704[0x1])/0x2,'lon':(_0x3e058d[0x0]+_0x3e058d[0x1])/0x2};}function _0x2f7262(_0xcca5aa){const _0x525790=_0x231b8d,_0x5e2ef5=[-0x5a,0x5a],_0x14a82e=[-0xb4,0xb4];let _0x99150d=!![];for(const _0x19c40d of _0xcca5aa){const _0x2a2753=_0x20e097[_0x525790(0x10b8)](_0x19c40d);for(let _0x194dc1=0x4;_0x194dc1>=0x0;_0x194dc1--){const _0x5cce02=_0x99150d?_0x14a82e:_0x5e2ef5,_0x31fef1=(_0x5cce02[0x0]+_0x5cce02[0x1])/0x2;if(_0x2a2753&0x1<<_0x194dc1)_0x5cce02[0x0]=_0x31fef1;else _0x5cce02[0x1]=_0x31fef1;_0x99150d=!_0x99150d;}}return{'minLat':_0x5e2ef5[0x0],'maxLat':_0x5e2ef5[0x1],'minLon':_0x14a82e[0x0],'maxLon':_0x14a82e[0x1]};}function _0x5b45a3(_0x7b5ac8){const _0x5bf5f2=_0x231b8d,{lat:_0x5cfbd4,lon:_0x313087}=_0x284e04(_0x7b5ac8),_0x302c1e=_0x2f7262(_0x7b5ac8),_0x5838a2=_0x302c1e[_0x5bf5f2(0x8fe)]-_0x302c1e[_0x5bf5f2(0xd80)],_0x2160a0=_0x302c1e[_0x5bf5f2(0x101c)]-_0x302c1e[_0x5bf5f2(0xeb2)],_0x487154=_0x7b5ac8[_0x5bf5f2(0x156)],_0x26d33d=[];for(const _0x1c5efc of[-_0x5838a2,0x0,_0x5838a2]){for(const _0x4fbfe8 of[-_0x2160a0,0x0,_0x2160a0]){if(_0x1c5efc===0x0&&_0x4fbfe8===0x0)continue;const _0x4140b7=_0x5cfbd4+_0x1c5efc,_0x128b5e=_0x313087+_0x4fbfe8;_0x4140b7>=-0x5a&&_0x4140b7<=0x5a&&_0x128b5e>=-0xb4&&_0x128b5e<=0xb4&&_0x26d33d['push'](_0x2dbc9c(_0x4140b7,_0x128b5e,_0x487154));}}return _0x26d33d;}function _0x5117ab(_0x2122f5,_0x4b63a9,_0x4f27d2,_0x5ea281){const _0x4a5233=_0x231b8d,_0x127389=Math['PI']/0xb4,_0x194cfd=(_0x4f27d2-_0x2122f5)*_0x127389,_0x528bd3=(_0x5ea281-_0x4b63a9)*_0x127389,_0x28c2c2=Math['sin'](_0x194cfd/0x2)**0x2+Math['cos'](_0x2122f5*_0x127389)*Math[_0x4a5233(0xf1)](_0x4f27d2*_0x127389)*Math[_0x4a5233(0x110d)](_0x528bd3/0x2)**0x2;return _0x1f5cba*0x2*Math[_0x4a5233(0x111a)](Math[_0x4a5233(0x609)](_0x28c2c2),Math['sqrt'](0x1-_0x28c2c2));}function _0x339b05(_0x4cf144){if(_0x4cf144>0x4c4b40)return 0x1;if(_0x4cf144>0x1312d0)return 0x2;if(_0x4cf144>0x26160)return 0x3;if(_0x4cf144>0x9858)return 0x4;if(_0x4cf144>0x1324)return 0x5;if(_0x4cf144>0x4b0)return 0x6;if(_0x4cf144>0x99)return 0x7;if(_0x4cf144>0x26)return 0x8;return 0x9;}function _0xd047d6(_0x4915ee,_0x3149dd,_0xa28b6c,_0x1ccd01){let _0x476b13=_0x339b05(_0xa28b6c);if(_0x1ccd01&&_0x476b13>_0x1ccd01)_0x476b13=_0x1ccd01;const _0x774466=_0x2dbc9c(_0x4915ee,_0x3149dd,_0x476b13);return[...new Set([_0x774466,..._0x5b45a3(_0x774466)])];}function _0x49a3de(_0x500eac,_0x3d382e,_0x39fcab,_0x48b425,_0x24885c,_0x3d8515){const _0x4506d4=_0x231b8d;if(!_0x24885c){const _0x471dfb=_0x5117ab(_0x500eac,_0x3d382e,_0x39fcab,_0x48b425);_0x24885c=_0x339b05(_0x471dfb/0x2);}if(_0x3d8515&&_0x24885c>_0x3d8515)_0x24885c=_0x3d8515;const _0x6d83cf=_0x2f7262(_0x2dbc9c((_0x500eac+_0x39fcab)/0x2,(_0x3d382e+_0x48b425)/0x2,_0x24885c)),_0x287e60=_0x6d83cf[_0x4506d4(0x8fe)]-_0x6d83cf['minLat'],_0x15acee=_0x6d83cf[_0x4506d4(0x101c)]-_0x6d83cf[_0x4506d4(0xeb2)],_0x1c11d0=new Set();for(let _0x13a6ac=_0x500eac;_0x13a6ac<=_0x39fcab+_0x287e60;_0x13a6ac+=_0x287e60*0.9){for(let _0x205f59=_0x3d382e;_0x205f59<=_0x48b425+_0x15acee;_0x205f59+=_0x15acee*0.9){_0x1c11d0[_0x4506d4(0x33c)](_0x2dbc9c(Math[_0x4506d4(0x10bf)](-0x5a,Math[_0x4506d4(0x2dc)](0x5a,_0x13a6ac)),Math[_0x4506d4(0x10bf)](-0xb4,Math[_0x4506d4(0x2dc)](0xb4,_0x205f59)),_0x24885c));}}return[..._0x1c11d0];}function _0x1a466f(_0x2f79ab){const _0x43109c=_0x231b8d;return _0x2f79ab!=null&&typeof _0x2f79ab===_0x43109c(0xb36)&&typeof _0x2f79ab['lat']==='number'&&typeof _0x2f79ab['lon']==='number'&&_0x2f79ab[_0x43109c(0xe4d)]>=-0x5a&&_0x2f79ab[_0x43109c(0xe4d)]<=0x5a&&_0x2f79ab[_0x43109c(0xb29)]>=-0xb4&&_0x2f79ab[_0x43109c(0xb29)]<=0xb4;}return okdbGeo={'encode':_0x2dbc9c,'decode':_0x284e04,'bounds':_0x2f7262,'neighbors':_0x5b45a3,'haversine':_0x5117ab,'choosePrecision':_0x339b05,'expandRadius':_0xd047d6,'expandBBox':_0x49a3de,'isLocation':_0x1a466f,'EARTH_RADIUS':_0x1f5cba},okdbGeo;}var okdbEqual,hasRequiredOkdbEqual;function requireOkdbEqual(){if(hasRequiredOkdbEqual)return okdbEqual;hasRequiredOkdbEqual=0x1;function _0x4c6f10(_0x3d7a8f,_0x3ade31){const _0x2ad4bf=_0x47ab;if(_0x3d7a8f===_0x3ade31)return!![];if(_0x3d7a8f&&_0x3ade31&&typeof _0x3d7a8f==='object'&&typeof _0x3ade31==='object'){if(_0x3d7a8f['constructor']!==_0x3ade31[_0x2ad4bf(0x1004)])return![];if(Array[_0x2ad4bf(0x10f5)](_0x3d7a8f))return _0x3d7a8f[_0x2ad4bf(0x156)]===_0x3ade31['length']&&_0x3d7a8f[_0x2ad4bf(0x244)]((_0x50e7f2,_0x2d0c6b)=>_0x4c6f10(_0x50e7f2,_0x3ade31[_0x2d0c6b]));if(_0x3d7a8f instanceof Map&&_0x3ade31 instanceof Map)return _0x3d7a8f[_0x2ad4bf(0xfb)]===_0x3ade31['size']&&[..._0x3d7a8f[_0x2ad4bf(0x1129)]()][_0x2ad4bf(0x244)](([_0x2b879e,_0x412402])=>_0x3ade31[_0x2ad4bf(0x9d0)](_0x2b879e)&&_0x4c6f10(_0x412402,_0x3ade31['get'](_0x2b879e)));if(_0x3d7a8f instanceof Set&&_0x3ade31 instanceof Set)return _0x3d7a8f[_0x2ad4bf(0xfb)]===_0x3ade31[_0x2ad4bf(0xfb)]&&[..._0x3d7a8f][_0x2ad4bf(0x244)](_0x181bef=>_0x3ade31[_0x2ad4bf(0x9d0)](_0x181bef));if(ArrayBuffer[_0x2ad4bf(0xf1b)](_0x3d7a8f)&&ArrayBuffer['isView'](_0x3ade31))return _0x3d7a8f['length']===_0x3ade31['length']&&_0x3d7a8f[_0x2ad4bf(0x244)]((_0x2d3ef1,_0x509dc1)=>_0x2d3ef1===_0x3ade31[_0x509dc1]);if(_0x3d7a8f[_0x2ad4bf(0x1004)]===RegExp)return _0x3d7a8f[_0x2ad4bf(0x1091)]===_0x3ade31[_0x2ad4bf(0x1091)]&&_0x3d7a8f['flags']===_0x3ade31[_0x2ad4bf(0x10e9)];if(_0x3d7a8f['valueOf']!==Object['prototype']['valueOf'])return _0x3d7a8f['valueOf']()===_0x3ade31[_0x2ad4bf(0x1018)]();if(_0x3d7a8f[_0x2ad4bf(0x583)]!==Object[_0x2ad4bf(0x901)][_0x2ad4bf(0x583)])return _0x3d7a8f[_0x2ad4bf(0x583)]()===_0x3ade31[_0x2ad4bf(0x583)]();const _0x56eabe=Object[_0x2ad4bf(0xa52)](_0x3d7a8f),_0x1ccceb=Object[_0x2ad4bf(0xa52)](_0x3ade31);if(_0x56eabe[_0x2ad4bf(0x156)]!==_0x1ccceb[_0x2ad4bf(0x156)])return![];for(const _0xe811ef of _0x56eabe){if(!_0x3ade31['hasOwnProperty'](_0xe811ef))return![];const _0x393f90=_0x3d7a8f[_0xe811ef],_0x3790db=_0x3ade31[_0xe811ef];if(_0x393f90===_0x3790db)continue;if(typeof _0x393f90!==typeof _0x3790db)return![];if(typeof _0x393f90!==_0x2ad4bf(0xb36)||_0x393f90===null||_0x3790db===null)return![];}return _0x56eabe[_0x2ad4bf(0x244)](_0x5e5a0e=>_0x4c6f10(_0x3d7a8f[_0x5e5a0e],_0x3ade31[_0x5e5a0e]));}return _0x3d7a8f!==_0x3d7a8f&&_0x3ade31!==_0x3ade31;}return okdbEqual={'equal':_0x4c6f10},okdbEqual;}var okdbEnvIndexes,hasRequiredOkdbEnvIndexes;function requireOkdbEnvIndexes(){if(hasRequiredOkdbEnvIndexes)return okdbEnvIndexes;hasRequiredOkdbEnvIndexes=0x1;const _0x1bc8bc=requireOkdbHlc(),_0x340162=requireOkdbGeo(),{INDEX_STATE:_0x32ef74,EVENTS:_0x444a08}=requireOkdbEnums(),{OKDBInvalidIndexKeyError:_0x54428e,OKDBInvalidPrimaryKeyError:_0x3568c7,OKDBUniqueConstraintError:_0x3c1b0b}=requireOkdbError(),{equal:_0x5afe92}=requireOkdbEqual();function _0xe50d85(_0x1b1c9e,_0x3d1547){const _0x535e19=_0x47ab;if(_0x3d1547===null)return null;const _0x3dbbea=_0x3d1547[_0x535e19(0xfb1)]('.');let _0x28984f=_0x1b1c9e;for(const _0x57c269 of _0x3dbbea){if(_0x28984f==null||typeof _0x28984f!==_0x535e19(0xb36)||!(_0x57c269 in _0x28984f))return null;_0x28984f=_0x28984f[_0x57c269];}return _0x28984f===undefined?null:_0x28984f;}function _0xee2f82(_0xbaed6b){const _0x540b9d=_0x47ab;if(typeof _0xbaed6b===_0x540b9d(0xf7a))_0xbaed6b=_0xbaed6b[_0x540b9d(0xfb1)]('~');if(!Array[_0x540b9d(0x10f5)](_0xbaed6b)||_0xbaed6b[_0x540b9d(0x156)]===0x0)throw new _0x54428e(_0xbaed6b,'Index\x20must\x20be\x20a\x20non-empty\x20array');return _0xbaed6b;}function _0x4f5ad3(_0x1013ca,_0x471dcb,_0x36669f=0x0){const _0x1a1331=_0x47ab;if(_0x36669f===0x0){if(!Array['isArray'](_0x471dcb))throw new _0x54428e(_0x1013ca,_0x1a1331(0x8f5));for(const _0x3294d5 of _0x471dcb)_0x4f5ad3(_0x1013ca,_0x3294d5,_0x36669f+0x1);return;}if(_0x471dcb===null)return;if(Buffer[_0x1a1331(0x1ba)](_0x471dcb))return;const _0x403d30=typeof _0x471dcb;if(_0x403d30==='string'||_0x403d30===_0x1a1331(0x9f0)||_0x403d30===_0x1a1331(0x854)||_0x403d30===_0x1a1331(0x438)||_0x403d30===_0x1a1331(0xccf))return;throw new _0x54428e(_0x1013ca,_0x471dcb);}function _0x15594f(_0x5225e5,_0xb66a20){return _0xb66a20['map'](_0x49939c=>_0xe50d85(_0x5225e5,_0x49939c));}function _0x1e8ca6(_0x585089){const _0x45bd18=_0x47ab;for(let _0x2c2471=0x0,_0x5e6cfc=_0x585089[_0x45bd18(0x156)]-0x1;_0x2c2471<_0x5e6cfc;_0x2c2471++){if(_0x585089[_0x2c2471]===null)return!![];}return![];}function _0x534aba(_0x4600cb){if(!_0x4600cb)return;_0x4600cb['transactionSync'](()=>{const _0x4a8f2f=_0x47ab;try{_0x4600cb[_0x4a8f2f(0x9a6)]();}catch{try{_0x4600cb['drop']();}catch{}}});}function _0x340d21(_0x58cbc2,_0x137803,_0x38dc0f,_0x38fd8c,_0x58ed4a,_0x3f743b,_0xf92289=null,_0x4eb7a5=0x0){const _0x3d3db8=_0x47ab,_0x3934cc=_0x38fd8c[_0x3d3db8(0x3d9)]('~'),_0x2850de=_0x58cbc2[_0x3d3db8(0x9ca)](_0x137803)[_0x3d3db8(0xf7b)]['get'](_0x3934cc);if(_0x2850de[_0x3d3db8(0x19f)]){const _0x58040d=_0x38fd8c[0x0],_0x4150a0=_0x2850de[_0x3d3db8(0x19f)][_0x3d3db8(0x105e)]||0x7,_0x140fd0=_0x2850de['db'],_0x39ea54=_0x5c7e8e=>{const _0x52070c=_0x3d3db8;if(!_0x5c7e8e)return null;const _0x529e8e=_0x58cbc2[_0x52070c(0x54f)](_0x5c7e8e,_0x58040d);return _0x340162['isLocation'](_0x529e8e)?_0x529e8e:null;},_0x22e827=_0x39ea54(_0x3f743b),_0x22a89b=_0x39ea54(_0x58ed4a),_0x3b2824=_0x22e827?_0x340162['encode'](_0x22e827[_0x3d3db8(0xe4d)],_0x22e827[_0x3d3db8(0xb29)],_0x4150a0):null,_0x5c0f48=_0x22a89b?_0x340162['encode'](_0x22a89b[_0x3d3db8(0xe4d)],_0x22a89b[_0x3d3db8(0xb29)],_0x4150a0):null;if(_0x3b2824===_0x5c0f48)return;if(typeof _0x38dc0f!==_0x3d3db8(0xf7a))throw new _0x3568c7(_0x38dc0f);if(_0x3b2824)_0x140fd0[_0x3d3db8(0x21e)]([_0x3b2824,null],_0x38dc0f);if(_0x5c0f48)_0x140fd0[_0x3d3db8(0x92c)]([_0x5c0f48,null],_0x38dc0f);return;}const _0x218c71=[..._0x38fd8c,null],_0x6331f9=_0x3f743b?_0x218c71[_0x3d3db8(0x1166)](_0x2caa37=>_0xe50d85(_0x3f743b,_0x2caa37)):undefined,_0x4529da=_0x58ed4a?_0x218c71[_0x3d3db8(0x1166)](_0x1e0fb1=>_0xe50d85(_0x58ed4a,_0x1e0fb1)):undefined;if(_0x3f743b)_0x4f5ad3(_0x3934cc,_0x6331f9);if(_0x58ed4a)_0x4f5ad3(_0x3934cc,_0x4529da);if(_0x5afe92(_0x6331f9,_0x4529da))return;if(typeof _0x38dc0f!==_0x3d3db8(0xf7a))throw new _0x3568c7(_0x38dc0f);const _0x1529a5=_0x2850de['db'];if(_0x3f743b)_0x1529a5[_0x3d3db8(0x21e)](_0x6331f9,_0x38dc0f);if(_0x58ed4a)_0x1529a5[_0x3d3db8(0x92c)](_0x4529da,_0x38dc0f);if(_0x2850de[_0x3d3db8(0x774)]){const _0x27a32e=_0xf92289==='__rebuild__';!_0x27a32e&&_0xf92289!==null&&_0xf92289!==undefined&&_0x58ed4a&&_0x4867c1(_0x58cbc2,_0x137803,_0x2850de,_0x1529a5,_0x4529da,String(_0x38dc0f),_0xf92289,_0x4eb7a5),!_0x27a32e&&_0x3f743b&&!_0x5afe92(_0x6331f9,_0x4529da)&&_0x483ed3(_0x58cbc2,_0x137803,_0x2850de,_0x1529a5,_0x6331f9);}}function _0x48ffae(_0xf2ae35,_0x94bc80,_0x2170bb,_0x51b7c9,_0x1a58a0,_0x1ed20b=null,_0x1e7dc6=0x0){const _0x317b10=_0x47ab,_0x594bd6=_0xf2ae35[_0x317b10(0x9ca)](_0x94bc80);for(const [,_0x441c18]of _0x594bd6['indexToDb']){const _0x276a0f=_0xf2ae35['getIndexStatus'](_0x94bc80,_0x441c18['parts'])===_0x32ef74[_0x317b10(0x179)];_0x340d21(_0xf2ae35,_0x94bc80,_0x2170bb,_0x441c18[_0x317b10(0x184)],_0x51b7c9,_0x276a0f?undefined:_0x1a58a0,_0x1ed20b,_0x1e7dc6);}}async function _0x4e23a0(_0x4e84a9,_0x1e720b,_0x317293,_0x5cdf43){const _0x5a76ae=_0x47ab,_0x5b9c7e=_0x4e84a9[_0x5a76ae(0x9ca)](_0x1e720b);await _0x5b9c7e[_0x5a76ae(0x11d3)][_0x5a76ae(0x683)](async()=>{for(const {key:_0x4ac6c9,value:_0x371e08,version:_0x46335f}of _0x5cdf43){_0x5b9c7e['data']['ifVersion'](_0x4ac6c9,_0x46335f,()=>{const _0x3f37c7=_0x47ab;_0x340d21(_0x4e84a9,_0x1e720b,_0x4ac6c9,_0x317293,_0x371e08,undefined,_0x3f37c7(0x22c),0x0);});}});}function _0x3fa920(_0x254d76,_0x943bfb,_0x9119a3,_0x175924,_0x4ac254){const _0xc0db2d=_0x47ab,_0x4255b2=_0x254d76['_getType'](_0x943bfb);for(const [_0x3697cc,_0x7d939f]of _0x4255b2['indexToDb']){if(!_0x7d939f[_0xc0db2d(0x774)]||_0x7d939f[_0xc0db2d(0x19f)])continue;const _0x2c9ef5=_0x4255b2['indexes'][_0xc0db2d(0xbeb)](_0x3697cc)?.['status'];if(_0x2c9ef5!==_0x32ef74[_0xc0db2d(0x1b5)])continue;const _0x407e2a=[..._0x7d939f[_0xc0db2d(0x184)],null],_0x2a124f=_0x4ac254?_0x407e2a[_0xc0db2d(0x1166)](_0x3c377a=>_0xe50d85(_0x4ac254,_0x3c377a)):undefined,_0x3aed7f=_0x175924?_0x407e2a[_0xc0db2d(0x1166)](_0x1d354c=>_0xe50d85(_0x175924,_0x1d354c)):undefined;if(_0x5afe92(_0x2a124f,_0x3aed7f))continue;if(_0x3aed7f&&!_0x1e8ca6(_0x3aed7f)){const _0x1ac054=_0x7d939f['db'][_0xc0db2d(0xbeb)](_0x3aed7f);if(_0x1ac054!==undefined&&_0x1ac054!==String(_0x9119a3))throw new _0x3c1b0b(_0x943bfb,_0x3697cc,_0x3aed7f[_0xc0db2d(0xc3c)](0x0,-0x1),_0x1ac054,String(_0x9119a3));}}}function _0x945509(_0x2c346a){_0x2c346a['sort']((_0xc91ea0,_0x523711)=>{const _0x29d5f8=_0x47ab,_0x3c957d=_0x1bc8bc['compare'](_0x523711[_0x29d5f8(0xab1)],_0xc91ea0['hlc']);if(_0x3c957d!==0x0)return _0x3c957d;const _0x421eb3=String(_0xc91ea0['origin']||''),_0x35baef=String(_0x523711[_0x29d5f8(0xca6)]||'');if(_0x35baef>_0x421eb3)return 0x1;if(_0x421eb3>_0x35baef)return-0x1;return 0x0;});}function _0x2d1fb1(_0x2795ba,_0x3022ee,_0x6e9c0f){const _0x177ade=_0x47ab;if(!_0x2795ba['_sync'])return null;const _0x332d5d=_0x2795ba[_0x177ade(0x1145)][_0x177ade(0xbeb)](_0x3022ee);if(!_0x332d5d)return null;const _0x5148af=_0x332d5d[_0x177ade(0x770)]?.[_0x177ade(0xbeb)](_0x6e9c0f);if(!_0x5148af)return null;const _0xd3e67b=_0x2795ba['changeToClockDb']?.['get'](_0x5148af);if(_0xd3e67b==null)return null;return _0x2795ba[_0x177ade(0xcda)]?.[_0x177ade(0xbeb)](_0xd3e67b)??null;}function _0x4867c1(_0xdb7323,_0x5234e4,_0x462fdd,_0x19dc0e,_0x2e4a5b,_0x316582,_0x1a0ab6=null,_0x20c51e=0x0){const _0xb76214=_0x47ab,_0x1e96f8=_0x462fdd['parts'][_0xb76214(0x3d9)]('~'),_0x9921bf=_0x2e4a5b[_0xb76214(0xc3c)](0x0,-0x1),_0x51464c=_0x5234e4+'@'+_0x1e96f8+'@'+JSON[_0xb76214(0xf75)](_0x9921bf),_0x22d4d8=_0xdb7323[_0xb76214(0x586)]();if(_0x1e8ca6(_0x2e4a5b))return;const _0x599b3a=[];for(const _0x595032 of _0x19dc0e['getValues'](_0x2e4a5b)){_0x599b3a[_0xb76214(0x597)](_0x595032);}if(_0x599b3a[_0xb76214(0x156)]<=0x1){_0x22d4d8['doesExist'](_0x51464c)&&(_0x22d4d8[_0xb76214(0x21e)](_0x51464c),_0xdb7323[_0xb76214(0xea8)]['emit'](_0x444a08['UNIQUE_VIOLATION_RESOLVED'],{'type':_0x5234e4,'index':_0x1e96f8,'indexKey':_0x9921bf,'env':_0xdb7323['name']}));return;}const _0x56833a=_0x599b3a['map'](_0x357792=>{const _0x4b0049=_0xb76214;if(_0x316582&&_0x357792===_0x316582)return{'primaryKey':_0x357792,'hlc':_0x20c51e||0x0,'origin':_0x1a0ab6||''};const _0x49b1f1=_0x2d1fb1(_0xdb7323,_0x5234e4,_0x357792);return{'primaryKey':_0x357792,'hlc':_0x49b1f1?.['timestamp']||0x0,'origin':_0x49b1f1?.[_0x4b0049(0xca6)]||''};});_0x945509(_0x56833a);const _0x3aa4c6=_0x56833a[0x0][_0xb76214(0x6da)],_0x15b260=_0x22d4d8[_0xb76214(0xbeb)](_0x51464c),_0x29defa={'type':_0x5234e4,'index':_0x1e96f8,'indexKey':_0x9921bf,'entries':_0x56833a,'winner':_0x3aa4c6,'count':_0x56833a['length'],'detectedAt':_0x15b260?.[_0xb76214(0x1083)]||Date[_0xb76214(0x555)](),'updatedAt':Date['now']()};_0x22d4d8[_0xb76214(0x92c)](_0x51464c,_0x29defa),_0xdb7323[_0xb76214(0xea8)][_0xb76214(0xf5d)](_0x444a08[_0xb76214(0x53d)],{'type':_0x5234e4,'index':_0x1e96f8,'indexKey':_0x9921bf,'winner':_0x3aa4c6,'count':_0x56833a[_0xb76214(0x156)],'env':_0xdb7323['name']});}function _0x483ed3(_0x3cb9e6,_0x376247,_0x2045ea,_0x41ebf5,_0x3f74eb){const _0x34f144=_0x47ab,_0x4b14e3=_0x2045ea[_0x34f144(0x184)]['join']('~'),_0x175ffc=_0x3f74eb[_0x34f144(0xc3c)](0x0,-0x1),_0x4bea77=_0x376247+'@'+_0x4b14e3+'@'+JSON[_0x34f144(0xf75)](_0x175ffc),_0x1be2c5=_0x3cb9e6[_0x34f144(0x586)]();let _0x2c71a0=0x0;for(const _0x21f7e4 of _0x41ebf5[_0x34f144(0x11d6)](_0x3f74eb))_0x2c71a0++;_0x2c71a0<=0x1?_0x1be2c5[_0x34f144(0x779)](_0x4bea77)&&(_0x1be2c5[_0x34f144(0x21e)](_0x4bea77),_0x3cb9e6[_0x34f144(0xea8)][_0x34f144(0xf5d)](_0x444a08[_0x34f144(0x56d)],{'type':_0x376247,'index':_0x4b14e3,'indexKey':_0x175ffc,'env':_0x3cb9e6['name']})):_0x4867c1(_0x3cb9e6,_0x376247,_0x2045ea,_0x41ebf5,_0x3f74eb,null);}function _0x4ca5d1(_0x117cdf,_0x4b90b8,_0x36496b){const _0x57bc67=_0x47ab,_0x25f477=_0x117cdf[_0x57bc67(0x586)](),_0x232d6a=_0x4b90b8+'@'+_0x36496b+'@',_0x3e98c0=[];for(const {key:_0x2f7a1d}of _0x25f477[_0x57bc67(0x9ce)]({'start':_0x232d6a,'end':_0x232d6a+''})){_0x3e98c0['push'](_0x2f7a1d);}for(const _0x2903ed of _0x3e98c0)_0x25f477[_0x57bc67(0x21e)](_0x2903ed);}async function _0x22d4d7(_0xb4f71c,_0x389ba2,_0x4217c5){const _0x578c7a=_0x47ab,_0xe88414=_0x4217c5[_0x578c7a(0x184)]['join']('~'),_0x2ad743=_0x4217c5['db'],_0x30980d=_0xb4f71c[_0x578c7a(0x586)]();_0xb4f71c['db'][_0x578c7a(0x5ef)](()=>{const _0x2dd69f=_0x578c7a;_0x4ca5d1(_0xb4f71c,_0x389ba2,_0xe88414);let _0x5ced22=null,_0x49a50f=null,_0x19d9b2=[];const _0x1a39e5=()=>{const _0x2d51a7=_0x47ab;if(_0x19d9b2[_0x2d51a7(0x156)]<=0x1)return;if(_0x1e8ca6(_0x49a50f))return;const _0x15ce61=_0x49a50f[_0x2d51a7(0xc3c)](0x0,-0x1),_0x1e839e=_0x389ba2+'@'+_0xe88414+'@'+JSON[_0x2d51a7(0xf75)](_0x15ce61),_0x487a1c=_0x19d9b2[_0x2d51a7(0x1166)](_0x3b870f=>{const _0x4c7164=_0x2d51a7,_0x29fef9=_0x2d1fb1(_0xb4f71c,_0x389ba2,_0x3b870f);return{'primaryKey':_0x3b870f,'hlc':_0x29fef9?.[_0x4c7164(0xdfe)]||0x0,'origin':_0x29fef9?.[_0x4c7164(0xca6)]||''};});_0x945509(_0x487a1c),_0x30980d[_0x2d51a7(0x92c)](_0x1e839e,{'type':_0x389ba2,'index':_0xe88414,'indexKey':_0x15ce61,'entries':_0x487a1c,'winner':_0x487a1c[0x0][_0x2d51a7(0x6da)],'count':_0x487a1c[_0x2d51a7(0x156)],'detectedAt':Date[_0x2d51a7(0x555)](),'updatedAt':Date[_0x2d51a7(0x555)]()});};for(const {key:_0x447343,value:_0x43231f}of _0x2ad743[_0x2dd69f(0x9ce)]()){const _0x506a3e=JSON[_0x2dd69f(0xf75)](_0x447343);_0x506a3e!==_0x5ced22&&(_0x1a39e5(),_0x49a50f=_0x447343,_0x5ced22=_0x506a3e,_0x19d9b2=[]),_0x19d9b2[_0x2dd69f(0x597)](_0x43231f);}_0x1a39e5();});}return okdbEnvIndexes={'normalizeIndex':_0xee2f82,'validateIndexKey':_0x4f5ad3,'extractIndexKey':_0x15594f,'indexKeyHasNull':_0x1e8ca6,'clearPhysicalIndex':_0x534aba,'updateItemIndex':_0x340d21,'updateItemIndexes':_0x48ffae,'batchUpdateIndex':_0x4e23a0,'checkUniqueConstraints':_0x3fa920,'checkUniqueViolation':_0x4867c1,'resolveUniqueViolationForKey':_0x483ed3,'resolveUniqueWinner':_0x945509,'getLatestChangeForKey':_0x2d1fb1,'clearViolationsForIndex':_0x4ca5d1,'scanUniqueViolations':_0x22d4d7},okdbEnvIndexes;}var okdbEnvRefs,hasRequiredOkdbEnvRefs;function requireOkdbEnvRefs(){const _0xda9de=_0xef8cd8;if(hasRequiredOkdbEnvRefs)return okdbEnvRefs;hasRequiredOkdbEnvRefs=0x1;const {CHANGE_ACTIONS:_0x41daba,EVENTS:_0x5c6840}=requireOkdbEnums(),{OKDBError:_0x56d655,OKDBForeignKeyDeleteError:_0x95f98b}=requireOkdbError(),_0x28eb14='~ref_violations',_0x1ae8bf=new Set([_0xda9de(0xc69),_0xda9de(0xccc),'set_null',_0xda9de(0x752)]);function _0x2ff998(_0x21f62f,_0x245abf){const _0x25fe49=_0xda9de;if(_0x21f62f==null||!_0x245abf)return undefined;const _0x410f58=_0x245abf[_0x25fe49(0xfb1)]('.');let _0x352292=_0x21f62f;for(const _0x542825 of _0x410f58){if(_0x352292==null||typeof _0x352292!=='object'||!(_0x542825 in _0x352292))return undefined;_0x352292=_0x352292[_0x542825];}return _0x352292;}function _0x96099e(_0x23236c,_0x113d9b,_0x418695){const _0x20f95a=_0xda9de,_0x324e37=_0x113d9b[_0x20f95a(0xfb1)]('.'),_0x3a3808={..._0x23236c};let _0x42e075=_0x3a3808;for(let _0x1848a9=0x0;_0x1848a9<_0x324e37[_0x20f95a(0x156)]-0x1;_0x1848a9++){_0x42e075[_0x324e37[_0x1848a9]]=_0x42e075[_0x324e37[_0x1848a9]]!=null?{..._0x42e075[_0x324e37[_0x1848a9]]}:{},_0x42e075=_0x42e075[_0x324e37[_0x1848a9]];}return _0x42e075[_0x324e37[_0x324e37[_0x20f95a(0x156)]-0x1]]=_0x418695,_0x3a3808;}function _0x2e8dfd(_0x3ff7ea,_0xb5455f,_0x1893ab,_0xb6fc81,_0x3afdcc){return _0x3ff7ea+'@'+_0xb5455f+'@'+_0x1893ab+'@'+_0xb6fc81+'@'+_0x3afdcc;}function _0x2e7420(_0x556197,_0x26214e='',_0x545bff=null){const _0x40cfa7=_0xda9de,_0x1a8f10=[];if(!_0x556197||typeof _0x556197!==_0x40cfa7(0xb36))return _0x1a8f10;if(!_0x545bff)_0x545bff=_0x556197;if(_0x556197[_0x40cfa7(0x6ad)]){const _0xd3162f=_0x556197[_0x40cfa7(0x6ad)][_0x40cfa7(0xa0b)](/^#\/\$defs\/(.+)$/);if(_0xd3162f&&_0x545bff?.['$defs']?.[_0xd3162f[0x1]])return _0x2e7420(_0x545bff[_0x40cfa7(0xfe5)][_0xd3162f[0x1]],_0x26214e,_0x545bff);return _0x1a8f10;}if(_0x556197['ref']&&typeof _0x556197['ref']===_0x40cfa7(0xb36)&&_0x556197[_0x40cfa7(0xc8f)][_0x40cfa7(0xaee)]){const _0x14e3cd=_0x556197[_0x40cfa7(0xc8f)][_0x40cfa7(0x8b2)]||_0x40cfa7(0xc69);if(!_0x1ae8bf[_0x40cfa7(0x9d0)](_0x14e3cd))throw new _0x56d655('Invalid\x20onDelete\x20rule\x20\x27'+_0x14e3cd+_0x40cfa7(0x931)+(_0x26214e||_0x40cfa7(0x11d3))+_0x40cfa7(0x24f)+[..._0x1ae8bf][_0x40cfa7(0x3d9)](',\x20'),'INVALID_SCHEMA');_0x1a8f10[_0x40cfa7(0x597)]({'fieldPath':_0x26214e,'targetType':_0x556197[_0x40cfa7(0xc8f)][_0x40cfa7(0xaee)],'onDelete':_0x14e3cd});}if(_0x556197['properties'])for(const [_0x216ab1,_0xbf6212]of Object[_0x40cfa7(0x1129)](_0x556197[_0x40cfa7(0x1ef)])){const _0x3cdb5a=_0x26214e?_0x26214e+'.'+_0x216ab1:_0x216ab1;_0x1a8f10[_0x40cfa7(0x597)](..._0x2e7420(_0xbf6212,_0x3cdb5a,_0x545bff));}return _0x1a8f10;}function _0x1c2476(_0x38fab6){const _0x492d24=_0xda9de,_0x142899=new Map(),_0x41ec66=new Map();for(const _0x299a59 of _0x38fab6[_0x492d24(0xce1)]['getKeys']()){if(_0x299a59[_0x492d24(0x8ba)]('~'))continue;const _0x28f84f=_0x38fab6[_0x492d24(0xce1)]['get'](_0x299a59);if(!_0x28f84f?.[_0x492d24(0xdce)]?.[_0x492d24(0x83a)])continue;let _0x43b202;try{_0x43b202=_0x2e7420(_0x28f84f[_0x492d24(0xdce)][_0x492d24(0x83a)]);}catch{continue;}if(_0x43b202[_0x492d24(0x156)]>0x0){_0x142899['set'](_0x299a59,_0x43b202);for(const _0x3321a3 of _0x43b202){if(!_0x41ec66[_0x492d24(0x9d0)](_0x3321a3[_0x492d24(0x11c8)]))_0x41ec66[_0x492d24(0x211)](_0x3321a3['targetType'],[]);_0x41ec66['get'](_0x3321a3[_0x492d24(0x11c8)])[_0x492d24(0x597)]({'sourceType':_0x299a59,'fieldPath':_0x3321a3[_0x492d24(0x147)],'onDelete':_0x3321a3[_0x492d24(0x8b2)]});}}}_0x38fab6[_0x492d24(0x1126)]={'outgoing':_0x142899,'incoming':_0x41ec66};}function _0x887940(_0x31fd8f,_0x5afb15){const _0x14a725=_0xda9de;return _0x31fd8f[_0x14a725(0x1126)][_0x14a725(0x499)][_0x14a725(0xbeb)](_0x5afb15)||[];}function _0x2d0b81(_0x1d145e,_0x3e98a1){const _0x1515d7=_0xda9de;return _0x1d145e[_0x1515d7(0x1126)][_0x1515d7(0x195)][_0x1515d7(0xbeb)](_0x3e98a1)||[];}function _0x367b97(_0x19f38c){const _0xff885f=_0xda9de;if(_0x19f38c['_refIndexDb'])return _0x19f38c[_0xff885f(0x1087)];return _0x19f38c['_refIndexDb']=_0x19f38c['db'][_0xff885f(0x730)](_0xff885f(0xa69),{'dupSort':![]}),_0x19f38c['_refIndexDb'];}function _0x54a13e(_0x33ed87,_0xa3c3ea,_0x1d58a4,_0x20f7a0,_0x498154){const _0x137344=_0xda9de,_0x44b84b=_0x887940(_0x33ed87,_0xa3c3ea);if(_0x44b84b[_0x137344(0x156)]===0x0)return;const _0xc3595a=_0x367b97(_0x33ed87);for(const _0x468a0b of _0x44b84b){const _0xe6a768=_0x498154!=null?_0x2ff998(_0x498154,_0x468a0b[_0x137344(0x147)]):undefined,_0xecfcfe=_0x20f7a0!=null?_0x2ff998(_0x20f7a0,_0x468a0b[_0x137344(0x147)]):undefined;if(_0xe6a768===_0xecfcfe)continue;_0xe6a768!=null&&_0xc3595a['remove'](_0x2e8dfd(_0x468a0b['targetType'],_0xe6a768,_0xa3c3ea,_0x1d58a4,_0x468a0b['fieldPath'])),_0xecfcfe!=null&&_0xc3595a[_0x137344(0x92c)](_0x2e8dfd(_0x468a0b[_0x137344(0x11c8)],_0xecfcfe,_0xa3c3ea,_0x1d58a4,_0x468a0b[_0x137344(0x147)]),0x1);}}function _0x12820e(_0x21ef40,_0x35a859,_0x91a819,_0x3783ef){const _0x25fa98=_0xda9de,_0x5b30ea=_0x887940(_0x21ef40,_0x35a859);if(_0x5b30ea[_0x25fa98(0x156)]===0x0)return;const _0x3d581a=_0x367b97(_0x21ef40);for(const _0x474df9 of _0x5b30ea){const _0x4e0461=_0x3783ef!=null?_0x2ff998(_0x3783ef,_0x474df9['fieldPath']):undefined;_0x4e0461!=null&&_0x3d581a[_0x25fa98(0x21e)](_0x2e8dfd(_0x474df9[_0x25fa98(0x11c8)],_0x4e0461,_0x35a859,_0x91a819,_0x474df9[_0x25fa98(0x147)]));}}function _0x37df7f(_0xc3835a,_0x5b216e,_0x46312b,_0x51d511){const _0x5f5660=_0xda9de,_0x276825=_0x887940(_0xc3835a,_0x5b216e);if(_0x276825[_0x5f5660(0x156)]===0x0)return[];const _0x1b8a98=[];for(const _0x4f19ca of _0x276825){const _0x247d90=_0x2ff998(_0x51d511,_0x4f19ca[_0x5f5660(0x147)]);if(_0x247d90==null)continue;if(!_0xc3835a['hasType'](_0x4f19ca['targetType'])){_0x1b8a98[_0x5f5660(0x597)]({'fieldPath':_0x4f19ca['fieldPath'],'targetType':_0x4f19ca[_0x5f5660(0x11c8)],'targetKey':_0x247d90,'message':_0x5f5660(0x63a)+_0x4f19ca[_0x5f5660(0x11c8)]+_0x5f5660(0x932)});continue;}const _0x5dc476=_0xc3835a[_0x5f5660(0x9ca)](_0x4f19ca[_0x5f5660(0x11c8)])[_0x5f5660(0xc88)];!_0x5dc476['doesExist'](_0x247d90)&&_0x1b8a98[_0x5f5660(0x597)]({'fieldPath':_0x4f19ca[_0x5f5660(0x147)],'targetType':_0x4f19ca[_0x5f5660(0x11c8)],'targetKey':_0x247d90,'message':_0x5f5660(0x1118)+_0x247d90+_0x5f5660(0x20e)+_0x4f19ca['targetType']+'\x27'});}return _0x1b8a98;}function _0x40af61(_0xbb3d0,_0x36087f,_0x5d5e5c,_0x3e9950,_0x5841cb,{timestamp:_0x2e8cbd,origin:_0x155717,_cascadeVisited:_0x800c82}){const _0x183d27=_0xda9de,_0x50ff02=_0x2d0b81(_0xbb3d0,_0x5d5e5c);if(_0x50ff02[_0x183d27(0x156)]===0x0)return;const _0x56527d=_0x367b97(_0xbb3d0),_0x4a3887=_0x5d5e5c+'@'+_0x3e9950+'@',_0x7b2b08=[];for(const {key:_0x5d9f5e}of _0x56527d[_0x183d27(0x9ce)]({'start':_0x4a3887,'end':_0x4a3887+''})){const _0x570094=_0x5d9f5e[_0x183d27(0xc3c)](_0x4a3887[_0x183d27(0x156)]),_0x1cf308=_0x570094[_0x183d27(0x10b8)]('@');if(_0x1cf308===-0x1)continue;const _0x58e5d5=_0x570094[_0x183d27(0xc3c)](0x0,_0x1cf308),_0x476919=_0x570094['slice'](_0x1cf308+0x1),_0x33e471=_0x476919[_0x183d27(0x10b8)]('@');if(_0x33e471===-0x1)continue;const _0x1c40ae=_0x476919[_0x183d27(0xc3c)](0x0,_0x33e471),_0x4c665e=_0x476919[_0x183d27(0xc3c)](_0x33e471+0x1);_0x7b2b08[_0x183d27(0x597)]({'sourceType':_0x58e5d5,'sourceKey':_0x1c40ae,'fieldPath':_0x4c665e});}if(_0x7b2b08[_0x183d27(0x156)]===0x0)return;for(const _0x47bc93 of _0x7b2b08){const _0x42c7ad=_0x50ff02[_0x183d27(0xbdd)](_0x2a1149=>_0x2a1149[_0x183d27(0xc1a)]===_0x47bc93[_0x183d27(0xc1a)]&&_0x2a1149[_0x183d27(0x147)]===_0x47bc93['fieldPath']),_0x255a01=_0x42c7ad?.[_0x183d27(0x8b2)]||'no_action';switch(_0x255a01){case'restrict':{if(_0x155717===null)throw new _0x95f98b(_0x5d5e5c,_0x3e9950,_0x7b2b08['filter'](_0x10ad0f=>{const _0x2d4f6a=_0x183d27,_0x152f9e=_0x50ff02[_0x2d4f6a(0xbdd)](_0x37563c=>_0x37563c[_0x2d4f6a(0xc1a)]===_0x10ad0f[_0x2d4f6a(0xc1a)]&&_0x37563c['fieldPath']===_0x10ad0f[_0x2d4f6a(0x147)]);return(_0x152f9e?.[_0x2d4f6a(0x8b2)]||'no_action')==='restrict';}));break;}case _0x183d27(0xccc):{const _0x50aff1=_0x47bc93[_0x183d27(0xc1a)]+'@'+_0x47bc93[_0x183d27(0x11b)];if(_0x800c82['has'](_0x50aff1))continue;_0xbb3d0['_getType'](_0x47bc93[_0x183d27(0xc1a)])['data'][_0x183d27(0x779)](_0x47bc93['sourceKey'])&&_0xbb3d0[_0x183d27(0xfa0)](_0x36087f,_0x47bc93[_0x183d27(0xc1a)],_0x47bc93['sourceKey'],{'timestamp':_0x2e8cbd,'origin':_0x155717,'_cascadeVisited':_0x800c82});break;}case _0x183d27(0x97e):{const _0x261939=_0xbb3d0['_getType'](_0x47bc93[_0x183d27(0xc1a)])['data'],_0x5ebba6=_0x261939[_0x183d27(0xa57)](_0x47bc93['sourceKey']);if(_0x5ebba6){const _0x3d522f=_0x96099e(_0x5ebba6[_0x183d27(0x568)],_0x47bc93[_0x183d27(0x147)],null);_0xbb3d0[_0x183d27(0x34b)](_0x36087f,_0x183d27(0x92c),_0x47bc93[_0x183d27(0xc1a)],_0x47bc93[_0x183d27(0x11b)],_0x3d522f,{'timestamp':_0x2e8cbd,'origin':_0x155717,'_cascading':!![]});}break;}}}}function _0x229ede(_0x173f85){const _0x88df23=_0xda9de;!_0x173f85['hasType'](_0x28eb14)&&_0x173f85[_0x88df23(0x924)](_0x28eb14);}function _0x5b8fbf(_0x1656e9,_0x1f38ac,_0x253167,_0xcfb2eb,_0x5b1412,_0xdcfbf,_0x269789,{timestamp:timestamp=Date[_0xda9de(0x555)](),origin:origin=null}={}){const _0x2add22=_0xda9de;_0x229ede(_0x1656e9);const _0x160464=_0x253167+'@'+_0xcfb2eb+'@'+_0x5b1412,_0x481145={'sourceType':_0x253167,'sourceKey':_0xcfb2eb,'fieldPath':_0x5b1412,'targetType':_0xdcfbf,'targetKey':_0x269789,'timestamp':timestamp,'origin':origin},_0x5016e9=_0x1656e9[_0x2add22(0x9ca)](_0x28eb14)[_0x2add22(0xc88)],_0xc8bc5f=_0x5016e9[_0x2add22(0xa57)](_0x160464),_0x5ccdf5=_0xc8bc5f?_0xc8bc5f[_0x2add22(0x45c)]+0x1:0x1;_0x5016e9['put'](_0x160464,_0x481145,_0x5ccdf5),_0x1656e9[_0x2add22(0xee9)]({'id':_0x2add22(0xfe3)+_0x28eb14+'@'+_0x160464,'type':_0x28eb14,'key':_0x160464,'action':_0x41daba['PUT'],'timestamp':timestamp,'txnId':_0x1f38ac?.['id'],'origin':origin},_0xc8bc5f?.[_0x2add22(0x568)],_0x481145),_0x1656e9[_0x2add22(0xea8)][_0x2add22(0xf5d)](_0x5c6840[_0x2add22(0x334)],{'sourceType':_0x253167,'sourceKey':_0xcfb2eb,'fieldPath':_0x5b1412,'targetType':_0xdcfbf,'targetKey':_0x269789,'env':_0x1656e9['name']});}function _0x479e92(_0x3fd4cc,_0xe61a5a,_0x589daf,_0x327911,_0x13d5ed,{timestamp:timestamp=Date['now'](),origin:origin=null}={}){const _0x1d4f76=_0xda9de;if(!_0x3fd4cc[_0x1d4f76(0x7c0)](_0x28eb14))return;const _0xb82dc6=_0x589daf+'@'+_0x327911+'@'+_0x13d5ed,_0x571cff=_0x3fd4cc[_0x1d4f76(0x9ca)](_0x28eb14)[_0x1d4f76(0xc88)],_0x5cbeca=_0x571cff[_0x1d4f76(0xa57)](_0xb82dc6);if(!_0x5cbeca)return;_0x571cff['remove'](_0xb82dc6),_0x3fd4cc[_0x1d4f76(0xee9)]({'id':_0x1d4f76(0xfe3)+_0x28eb14+'@'+_0xb82dc6,'type':_0x28eb14,'key':_0xb82dc6,'action':_0x41daba['REMOVE'],'timestamp':timestamp,'txnId':_0xe61a5a?.['id'],'origin':origin},_0x5cbeca['value'],undefined),_0x3fd4cc[_0x1d4f76(0xea8)][_0x1d4f76(0xf5d)](_0x5c6840[_0x1d4f76(0x997)],{'sourceType':_0x589daf,'sourceKey':_0x327911,'fieldPath':_0x13d5ed,'env':_0x3fd4cc[_0x1d4f76(0x1173)]});}function _0x132891(_0x5e760f,_0x15eacc,_0x509210,_0x577f44,_0x77845a={}){const _0x50efe0=_0xda9de;if(!_0x5e760f[_0x50efe0(0x7c0)](_0x28eb14))return;const _0x4463ba=_0x5e760f[_0x50efe0(0x9ca)](_0x28eb14)[_0x50efe0(0xc88)],_0x111d84=_0x509210+'@'+_0x577f44+'@',_0x4d6bb2=[];for(const {key:_0x37875f}of _0x4463ba[_0x50efe0(0x9ce)]({'start':_0x111d84,'end':_0x111d84+''})){_0x4d6bb2['push'](_0x37875f);}for(const _0x4a78bc of _0x4d6bb2){const _0x3947aa=_0x4463ba[_0x50efe0(0xa57)](_0x4a78bc);if(!_0x3947aa)continue;_0x4463ba[_0x50efe0(0x21e)](_0x4a78bc),_0x5e760f['_logChange']({'id':'item:'+_0x28eb14+'@'+_0x4a78bc,'type':_0x28eb14,'key':_0x4a78bc,'action':_0x41daba['REMOVE'],'timestamp':_0x77845a[_0x50efe0(0xdfe)]||Date[_0x50efe0(0x555)](),'txnId':_0x15eacc?.['id'],'origin':_0x77845a[_0x50efe0(0xca6)]},_0x3947aa[_0x50efe0(0x568)],undefined);}}function _0x5f50f3(_0x3c67f9,_0x10fc4e){const _0x183e62=_0xda9de;if(!_0x3c67f9[_0x183e62(0x7c0)](_0x28eb14))return;const _0x2472c2=_0x3c67f9['_getType'](_0x28eb14)[_0x183e62(0xc88)],_0x441751=_0x10fc4e+'@',_0x420e5b=[];for(const {key:_0xe275ac}of _0x2472c2[_0x183e62(0x9ce)]({'start':_0x441751,'end':_0x441751+''})){_0x420e5b[_0x183e62(0x597)](_0xe275ac);}for(const _0x3bfba9 of _0x420e5b)_0x2472c2[_0x183e62(0x21e)](_0x3bfba9);}async function _0x10315e(_0x4dc146,_0x4e7a35){const _0x538384=_0xda9de,_0x497a27=_0x887940(_0x4dc146,_0x4e7a35);if(_0x497a27['length']===0x0)return;await _0x4dc146['db'][_0x538384(0x683)](()=>{const _0x115354=_0x538384;for(const {key:_0xdeca0c,value:_0x451280}of _0x4dc146[_0x115354(0x9ce)](_0x4e7a35)){_0x54a13e(_0x4dc146,_0x4e7a35,_0xdeca0c,_0x451280,null);const _0x4fd2d1=_0x37df7f(_0x4dc146,_0x4e7a35,_0xdeca0c,_0x451280);for(const _0x50c375 of _0x4fd2d1){_0x5b8fbf(_0x4dc146,null,_0x4e7a35,_0xdeca0c,_0x50c375[_0x115354(0x147)],_0x50c375[_0x115354(0x11c8)],_0x50c375[_0x115354(0x603)]);}}});}return okdbEnvRefs={'getFieldValue':_0x2ff998,'setFieldValue':_0x96099e,'refIndexKey':_0x2e8dfd,'extractRefs':_0x2e7420,'rebuildRefCache':_0x1c2476,'getTypeRefs':_0x887940,'getIncomingRefs':_0x2d0b81,'getRefIndexDb':_0x367b97,'updateRefIndex':_0x54a13e,'removeRefIndexEntries':_0x12820e,'checkForeignKeys':_0x37df7f,'processDeleteCascade':_0x40af61,'setRefViolation':_0x5b8fbf,'clearRefViolation':_0x479e92,'clearRefViolationsForKey':_0x132891,'clearRefViolationsForType':_0x5f50f3,'syncRefIndex':_0x10315e},okdbEnvRefs;}var okdbSchemaValidator,hasRequiredOkdbSchemaValidator;function requireOkdbSchemaValidator(){const _0x3cf3af=_0xef8cd8;if(hasRequiredOkdbSchemaValidator)return okdbSchemaValidator;hasRequiredOkdbSchemaValidator=0x1;const _0x44206b={'date-time':_0x16ddd6=>/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})$/i['test'](_0x16ddd6)&&!isNaN(Date[_0x3cf3af(0xdcd)](_0x16ddd6)),'date':_0x3e8507=>/^\d{4}-\d{2}-\d{2}$/[_0x3cf3af(0xe10)](_0x3e8507)&&!isNaN(Date['parse'](_0x3e8507)),'time':_0x459c5d=>/^\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/i[_0x3cf3af(0xe10)](_0x459c5d),'email':_0x200246=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/['test'](_0x200246),'uri':_0x2759e7=>/^[a-zA-Z][a-zA-Z\d+\-.]*:\/?\/?[^\s]*$/[_0x3cf3af(0xe10)](_0x2759e7),'uuid':_0x3aca5a=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x3cf3af(0xe10)](_0x3aca5a),'ipv4':_0x214606=>{const _0xfc13a3=_0x214606['split']('.');return _0xfc13a3['length']===0x4&&_0xfc13a3['every'](_0x3f2eaa=>/^\d{1,3}$/['test'](_0x3f2eaa)&&+_0x3f2eaa>=0x0&&+_0x3f2eaa<=0xff);},'ipv6':_0x1ec56b=>/^([0-9a-f]{0,4}:){2,7}[0-9a-f]{0,4}$/i['test'](_0x1ec56b),'hostname':_0x58b0cf=>/^(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.[A-Za-z0-9-]{1,63})*$/[_0x3cf3af(0xe10)](_0x58b0cf)};function _0xacf58d(_0x52b8de,_0x3f97b2={}){const _0x284205=_0x3cf3af,_0x209015=[];return _0x5d40f9(_0x52b8de,_0x3f97b2,'',_0x209015,_0x3f97b2,new Set()),{'valid':_0x209015[_0x284205(0x156)]===0x0,'errors':_0x209015};}function _0x5d40f9(_0x4fa47f,_0x469142,_0xe01b6,_0x17613d,_0xa14e71,_0x4ac004){const _0x2cd429=_0x3cf3af;if(!_0x469142||typeof _0x469142!==_0x2cd429(0xb36))return;if(Object[_0x2cd429(0xa52)](_0x469142)[_0x2cd429(0x156)]===0x0)return;if(_0x469142[_0x2cd429(0x6ad)]){if(_0x4ac004['has'](_0x469142['$ref'])){_0x17613d['push']({'path':_0xe01b6||_0x2cd429(0x11d3),'message':_0x2cd429(0x7ba)+_0x469142[_0x2cd429(0x6ad)],'expected':_0x2cd429(0xa4),'actual':_0x469142['$ref']});return;}const _0x131105=_0x5446b7(_0x469142[_0x2cd429(0x6ad)],_0xa14e71);_0x131105&&(_0x4ac004[_0x2cd429(0x33c)](_0x469142['$ref']),_0x5d40f9(_0x4fa47f,_0x131105,_0xe01b6,_0x17613d,_0xa14e71,_0x4ac004),_0x4ac004['delete'](_0x469142[_0x2cd429(0x6ad)]));return;}_0x469142['type']!==undefined&&_0xffd287(_0x4fa47f,_0x469142[_0x2cd429(0xaee)],_0xe01b6,_0x17613d);_0x469142[_0x2cd429(0xf8b)]!==undefined&&(!_0x4e4cbb(_0x4fa47f,_0x469142[_0x2cd429(0xf8b)])&&_0x17613d['push']({'path':_0xe01b6||'root','message':_0x2cd429(0x14d)+JSON['stringify'](_0x469142[_0x2cd429(0xf8b)]),'expected':_0x469142['const'],'actual':_0x4fa47f}));_0x469142[_0x2cd429(0x428)]!==undefined&&_0x5af537(_0x4fa47f,_0x469142[_0x2cd429(0x428)],_0xe01b6,_0x17613d);if(typeof _0x4fa47f==='object'&&_0x4fa47f!==null&&!Array[_0x2cd429(0x10f5)](_0x4fa47f)){_0x469142[_0x2cd429(0x1ef)]&&_0xaf7ac3(_0x4fa47f,_0x469142[_0x2cd429(0x1ef)],_0x469142[_0x2cd429(0x359)],_0xe01b6,_0x17613d,_0xa14e71,_0x4ac004);if(_0x469142[_0x2cd429(0x4fe)])for(const [_0x54e9e8,_0x3ea29b]of Object[_0x2cd429(0x1129)](_0x469142['patternProperties'])){let _0x5d2f5d;try{_0x5d2f5d=new RegExp(_0x54e9e8);}catch{continue;}for(const _0x70b2e9 of Object[_0x2cd429(0xa52)](_0x4fa47f)){if(_0x5d2f5d[_0x2cd429(0xe10)](_0x70b2e9)){const _0x8e5e7b=_0xe01b6?_0xe01b6+'.'+_0x70b2e9:_0x70b2e9;_0x5d40f9(_0x4fa47f[_0x70b2e9],_0x3ea29b,_0x8e5e7b,_0x17613d,_0xa14e71,_0x4ac004);}}}if(_0x469142[_0x2cd429(0x9f6)]!==undefined){const _0x252ece=new Set(Object[_0x2cd429(0xa52)](_0x469142[_0x2cd429(0x1ef)]||{})),_0x2ff507=Object[_0x2cd429(0xa52)](_0x469142[_0x2cd429(0x4fe)]||{})['map'](_0x2110b9=>{try{return new RegExp(_0x2110b9);}catch{return null;}})[_0x2cd429(0x1103)](Boolean);for(const _0x3cd09b of Object[_0x2cd429(0xa52)](_0x4fa47f)){if(_0x252ece['has'](_0x3cd09b))continue;if(_0x2ff507[_0x2cd429(0xa83)](_0x4b0f8f=>_0x4b0f8f[_0x2cd429(0xe10)](_0x3cd09b)))continue;const _0x21277a=_0xe01b6?_0xe01b6+'.'+_0x3cd09b:_0x3cd09b;if(_0x469142[_0x2cd429(0x9f6)]===![])_0x17613d[_0x2cd429(0x597)]({'path':_0x21277a,'message':'Additional\x20property\x20\x27'+_0x3cd09b+_0x2cd429(0x319),'expected':_0x2cd429(0xdc5),'actual':_0x3cd09b});else typeof _0x469142['additionalProperties']===_0x2cd429(0xb36)&&_0x5d40f9(_0x4fa47f[_0x3cd09b],_0x469142[_0x2cd429(0x9f6)],_0x21277a,_0x17613d,_0xa14e71,_0x4ac004);}}_0x469142['required']&&_0x5270e7(_0x4fa47f,_0x469142[_0x2cd429(0x359)],_0xe01b6,_0x17613d);if(_0x469142[_0x2cd429(0xe68)])for(const _0x2c4760 of Object['keys'](_0x4fa47f)){const _0x58bcca=[];_0x5d40f9(_0x2c4760,_0x469142['propertyNames'],_0xe01b6?_0xe01b6+'.<key:'+_0x2c4760+'>':_0x2cd429(0xe8)+_0x2c4760+'>',_0x58bcca,_0xa14e71,_0x4ac004),_0x58bcca[_0x2cd429(0x156)]>0x0&&_0x17613d[_0x2cd429(0x597)]({'path':_0xe01b6||_0x2cd429(0x11d3),'message':_0x2cd429(0xd38)+_0x2c4760+_0x2cd429(0x9d6),'expected':_0x469142[_0x2cd429(0xe68)],'actual':_0x2c4760});}const _0x993099=Object[_0x2cd429(0xa52)](_0x4fa47f)[_0x2cd429(0x156)];_0x469142['minProperties']!==undefined&&_0x993099<_0x469142[_0x2cd429(0xfec)]&&_0x17613d[_0x2cd429(0x597)]({'path':_0xe01b6||_0x2cd429(0x11d3),'message':_0x2cd429(0x84b)+_0x469142[_0x2cd429(0xfec)]+'\x20properties','expected':_0x2cd429(0xd06)+_0x469142[_0x2cd429(0xfec)],'actual':_0x993099});_0x469142[_0x2cd429(0x818)]!==undefined&&_0x993099>_0x469142[_0x2cd429(0x818)]&&_0x17613d['push']({'path':_0xe01b6||'root','message':_0x2cd429(0x3c8)+_0x469142[_0x2cd429(0x818)]+_0x2cd429(0x976),'expected':_0x2cd429(0xf86)+_0x469142[_0x2cd429(0x818)],'actual':_0x993099});if(_0x469142[_0x2cd429(0xbce)])for(const [_0x5bbaec,_0x347fb8]of Object[_0x2cd429(0x1129)](_0x469142['dependentRequired'])){if(_0x5bbaec in _0x4fa47f)for(const _0x2bf6e0 of _0x347fb8){if(!(_0x2bf6e0 in _0x4fa47f)){const _0x494fa1=_0xe01b6?_0xe01b6+'.'+_0x2bf6e0:_0x2bf6e0;_0x17613d['push']({'path':_0x494fa1,'message':_0x2cd429(0x897)+_0x2bf6e0+_0x2cd429(0x523)+_0x5bbaec+_0x2cd429(0x213),'expected':_0x2cd429(0x777),'actual':_0x2cd429(0x4ae)});}}}if(_0x469142['dependentSchemas'])for(const [_0x2a9c9f,_0x8aa74d]of Object[_0x2cd429(0x1129)](_0x469142['dependentSchemas'])){_0x2a9c9f in _0x4fa47f&&_0x5d40f9(_0x4fa47f,_0x8aa74d,_0xe01b6,_0x17613d,_0xa14e71,_0x4ac004);}}if(Array[_0x2cd429(0x10f5)](_0x4fa47f)){_0x469142[_0x2cd429(0xe50)]&&_0x5dc51b(_0x4fa47f,_0x469142[_0x2cd429(0xe50)],_0xe01b6,_0x17613d,_0xa14e71,_0x4ac004);_0x469142['minItems']!==undefined&&_0x4fa47f[_0x2cd429(0x156)]<_0x469142[_0x2cd429(0x699)]&&_0x17613d['push']({'path':_0xe01b6||_0x2cd429(0x11d3),'message':_0x2cd429(0xdba)+_0x469142['minItems']+_0x2cd429(0x805),'expected':'minItems\x20'+_0x469142[_0x2cd429(0x699)],'actual':_0x4fa47f['length']});_0x469142[_0x2cd429(0xa54)]!==undefined&&_0x4fa47f[_0x2cd429(0x156)]>_0x469142[_0x2cd429(0xa54)]&&_0x17613d[_0x2cd429(0x597)]({'path':_0xe01b6||_0x2cd429(0x11d3),'message':_0x2cd429(0xf2d)+_0x469142[_0x2cd429(0xa54)]+'\x20items','expected':'maxItems\x20'+_0x469142[_0x2cd429(0xa54)],'actual':_0x4fa47f[_0x2cd429(0x156)]});if(_0x469142[_0x2cd429(0x6b2)]===!![]){const _0x5630b3=[];for(let _0x1d2a48=0x0;_0x1d2a48<_0x4fa47f[_0x2cd429(0x156)];_0x1d2a48++){for(let _0x1e9c78=0x0;_0x1e9c78<_0x5630b3[_0x2cd429(0x156)];_0x1e9c78++){if(_0x4e4cbb(_0x4fa47f[_0x1d2a48],_0x5630b3[_0x1e9c78])){_0x17613d['push']({'path':_0xe01b6+'['+_0x1d2a48+']','message':_0x2cd429(0x1041)+_0x1d2a48,'expected':_0x2cd429(0x5f2),'actual':_0x4fa47f[_0x1d2a48]});break;}}_0x5630b3[_0x2cd429(0x597)](_0x4fa47f[_0x1d2a48]);}}}if(typeof _0x4fa47f==='string'){_0x469142[_0x2cd429(0x9e7)]!==undefined&&_0x4fa47f[_0x2cd429(0x156)]<_0x469142[_0x2cd429(0x9e7)]&&_0x17613d[_0x2cd429(0x597)]({'path':_0xe01b6||_0x2cd429(0x11d3),'message':'String\x20length\x20must\x20be\x20>=\x20'+_0x469142[_0x2cd429(0x9e7)],'expected':_0x2cd429(0xec3)+_0x469142[_0x2cd429(0x9e7)],'actual':_0x4fa47f[_0x2cd429(0x156)]});_0x469142[_0x2cd429(0x83b)]!==undefined&&_0x4fa47f[_0x2cd429(0x156)]>_0x469142['maxLength']&&_0x17613d['push']({'path':_0xe01b6||'root','message':_0x2cd429(0x1144)+_0x469142['maxLength'],'expected':'maxLength\x20'+_0x469142['maxLength'],'actual':_0x4fa47f[_0x2cd429(0x156)]});if(_0x469142[_0x2cd429(0x439)]!==undefined)try{!new RegExp(_0x469142[_0x2cd429(0x439)])['test'](_0x4fa47f)&&_0x17613d[_0x2cd429(0x597)]({'path':_0xe01b6||'root','message':_0x2cd429(0x8a3)+_0x469142[_0x2cd429(0x439)]+'\x27','expected':_0x469142[_0x2cd429(0x439)],'actual':_0x4fa47f});}catch{}if(_0x469142['format']!==undefined){const _0x13ee01=_0x44206b[_0x469142['format']];_0x13ee01&&!_0x13ee01(_0x4fa47f)&&_0x17613d[_0x2cd429(0x597)]({'path':_0xe01b6||_0x2cd429(0x11d3),'message':'String\x20does\x20not\x20match\x20format\x20\x27'+_0x469142[_0x2cd429(0xf17)]+'\x27','expected':_0x2cd429(0xa8c)+_0x469142[_0x2cd429(0xf17)],'actual':_0x4fa47f});}}if(typeof _0x4fa47f===_0x2cd429(0x9f0)&&Number['isFinite'](_0x4fa47f)){_0x469142[_0x2cd429(0x344)]!==undefined&&_0x4fa47f<_0x469142[_0x2cd429(0x344)]&&_0x17613d['push']({'path':_0xe01b6||_0x2cd429(0x11d3),'message':'Value\x20must\x20be\x20>=\x20'+_0x469142[_0x2cd429(0x344)],'expected':'minimum\x20'+_0x469142[_0x2cd429(0x344)],'actual':_0x4fa47f});_0x469142['maximum']!==undefined&&_0x4fa47f>_0x469142[_0x2cd429(0x3dd)]&&_0x17613d[_0x2cd429(0x597)]({'path':_0xe01b6||_0x2cd429(0x11d3),'message':_0x2cd429(0xc1b)+_0x469142[_0x2cd429(0x3dd)],'expected':'maximum\x20'+_0x469142[_0x2cd429(0x3dd)],'actual':_0x4fa47f});_0x469142['exclusiveMinimum']!==undefined&&_0x4fa47f<=_0x469142[_0x2cd429(0x10d2)]&&_0x17613d['push']({'path':_0xe01b6||_0x2cd429(0x11d3),'message':_0x2cd429(0x8c1)+_0x469142[_0x2cd429(0x10d2)],'expected':_0x2cd429(0xa3c)+_0x469142['exclusiveMinimum'],'actual':_0x4fa47f});_0x469142[_0x2cd429(0xbf8)]!==undefined&&_0x4fa47f>=_0x469142[_0x2cd429(0xbf8)]&&_0x17613d[_0x2cd429(0x597)]({'path':_0xe01b6||_0x2cd429(0x11d3),'message':_0x2cd429(0xd92)+_0x469142[_0x2cd429(0xbf8)],'expected':'exclusiveMaximum\x20'+_0x469142[_0x2cd429(0xbf8)],'actual':_0x4fa47f});if(_0x469142['multipleOf']!==undefined&&_0x469142['multipleOf']>0x0){const _0x566ce1=_0x4fa47f/_0x469142[_0x2cd429(0x138)];Math[_0x2cd429(0x9f7)](_0x566ce1-Math[_0x2cd429(0xc66)](_0x566ce1))>1e-10&&_0x17613d[_0x2cd429(0x597)]({'path':_0xe01b6||'root','message':_0x2cd429(0x11f3)+_0x469142[_0x2cd429(0x138)],'expected':_0x2cd429(0xbe9)+_0x469142[_0x2cd429(0x138)],'actual':_0x4fa47f});}}if(_0x469142[_0x2cd429(0x10b3)])for(let _0x5e4e31=0x0;_0x5e4e31<_0x469142[_0x2cd429(0x10b3)][_0x2cd429(0x156)];_0x5e4e31++){_0x5d40f9(_0x4fa47f,_0x469142[_0x2cd429(0x10b3)][_0x5e4e31],_0xe01b6,_0x17613d,_0xa14e71,_0x4ac004);}if(_0x469142['anyOf']){const _0x258c7c=_0x469142['anyOf'][_0x2cd429(0xa83)](_0x568b01=>{const _0x3e7ea6=_0x2cd429,_0x493669=[];return _0x5d40f9(_0x4fa47f,_0x568b01,_0xe01b6,_0x493669,_0xa14e71,_0x4ac004),_0x493669[_0x3e7ea6(0x156)]===0x0;});!_0x258c7c&&_0x17613d[_0x2cd429(0x597)]({'path':_0xe01b6||_0x2cd429(0x11d3),'message':'Value\x20does\x20not\x20match\x20any\x20of\x20the\x20\x27anyOf\x27\x20schemas','expected':_0x2cd429(0xacd),'actual':_0x520204(_0x4fa47f)});}if(_0x469142['oneOf']){let _0x1e6585=0x0;for(const _0x548c09 of _0x469142[_0x2cd429(0x24e)]){const _0x28b501=[];_0x5d40f9(_0x4fa47f,_0x548c09,_0xe01b6,_0x28b501,_0xa14e71,_0x4ac004);if(_0x28b501[_0x2cd429(0x156)]===0x0)_0x1e6585++;}_0x1e6585!==0x1&&_0x17613d[_0x2cd429(0x597)]({'path':_0xe01b6||_0x2cd429(0x11d3),'message':_0x1e6585===0x0?_0x2cd429(0x40a):'Value\x20matches\x20'+_0x1e6585+'\x20of\x20the\x20\x27oneOf\x27\x20schemas\x20(must\x20match\x20exactly\x201)','expected':_0x2cd429(0xdbd),'actual':_0x1e6585+_0x2cd429(0xcb)});}if(_0x469142['not']){const _0x4b12b7=[];_0x5d40f9(_0x4fa47f,_0x469142[_0x2cd429(0xbfc)],_0xe01b6,_0x4b12b7,_0xa14e71,_0x4ac004),_0x4b12b7[_0x2cd429(0x156)]===0x0&&_0x17613d['push']({'path':_0xe01b6||_0x2cd429(0x11d3),'message':_0x2cd429(0x109a),'expected':_0x2cd429(0xbff),'actual':_0x4fa47f});}if(_0x469142['if']){const _0x2efa3c=[];_0x5d40f9(_0x4fa47f,_0x469142['if'],_0xe01b6,_0x2efa3c,_0xa14e71,_0x4ac004);if(_0x2efa3c[_0x2cd429(0x156)]===0x0){if(_0x469142[_0x2cd429(0x7db)])_0x5d40f9(_0x4fa47f,_0x469142[_0x2cd429(0x7db)],_0xe01b6,_0x17613d,_0xa14e71,_0x4ac004);}else{if(_0x469142[_0x2cd429(0x1047)])_0x5d40f9(_0x4fa47f,_0x469142[_0x2cd429(0x1047)],_0xe01b6,_0x17613d,_0xa14e71,_0x4ac004);}}}function _0x5446b7(_0x479f3b,_0x46d617){const _0x186f08=_0x3cf3af;if(!_0x479f3b||typeof _0x479f3b!==_0x186f08(0xf7a))return null;const _0x2baf66=_0x479f3b[_0x186f08(0xa0b)](/^#\/\$defs\/(.+)$/);if(!_0x2baf66)return null;const _0x1601fa=_0x2baf66[0x1];return _0x46d617?.['$defs']?.[_0x1601fa]??null;}function _0xffd287(_0x307017,_0x1b2367,_0x57fd43,_0x20fce6){const _0x1d0f46=_0x3cf3af,_0x3cc084=Array[_0x1d0f46(0x10f5)](_0x1b2367)?_0x1b2367:[_0x1b2367];if(!_0x58b48c(_0x307017,_0x3cc084)){const _0x2ca97c=_0x520204(_0x307017);_0x20fce6[_0x1d0f46(0x597)]({'path':_0x57fd43||_0x1d0f46(0x11d3),'message':_0x1d0f46(0x1e2)+_0x3cc084[_0x1d0f46(0x3d9)](_0x1d0f46(0x47c))+_0x1d0f46(0xb43)+_0x2ca97c,'expected':_0x3cc084,'actual':_0x2ca97c});}}function _0x58b48c(_0x253dd8,_0x5b5680){const _0x372e10=_0x3cf3af;for(const _0xf6d9d2 of _0x5b5680){if(_0xf6d9d2==='null'){if(_0x253dd8===null)return!![];}else{if(_0xf6d9d2===_0x372e10(0x10f2)){if(typeof _0x253dd8==='number'&&Number[_0x372e10(0x2b5)](_0x253dd8)&&Number['isInteger'](_0x253dd8))return!![];}else{if(_0xf6d9d2===_0x372e10(0x9f0)){if(typeof _0x253dd8==='number'&&Number['isFinite'](_0x253dd8))return!![];}else{if(_0xf6d9d2===_0x372e10(0xf9d)){if(Array['isArray'](_0x253dd8))return!![];}else{if(_0xf6d9d2===_0x372e10(0xb36)){if(typeof _0x253dd8==='object'&&_0x253dd8!==null&&!Array[_0x372e10(0x10f5)](_0x253dd8))return!![];}else{if(typeof _0x253dd8===_0xf6d9d2)return!![];}}}}}}return![];}function _0x520204(_0x179d1f){const _0x1fad0a=_0x3cf3af;if(_0x179d1f===null)return _0x1fad0a(0x11e);if(Array[_0x1fad0a(0x10f5)](_0x179d1f))return _0x1fad0a(0xf9d);if(typeof _0x179d1f===_0x1fad0a(0x9f0)){if(Number[_0x1fad0a(0x474)](_0x179d1f))return _0x1fad0a(0x10f2);return _0x1fad0a(0x9f0);}if(typeof _0x179d1f===_0x1fad0a(0xb36))return'object';return typeof _0x179d1f;}function _0x5af537(_0x1a2032,_0x4fe954,_0x564718,_0x47e2ac){const _0x26f6b2=_0x3cf3af,_0x5cb124=_0x4fe954[_0x26f6b2(0xa83)](_0x438227=>_0x4e4cbb(_0x1a2032,_0x438227));!_0x5cb124&&_0x47e2ac['push']({'path':_0x564718||'root','message':_0x26f6b2(0x19d)+JSON[_0x26f6b2(0xf75)](_0x4fe954),'expected':_0x4fe954,'actual':_0x1a2032});}function _0xaf7ac3(_0x4a92b7,_0x28f4ca,_0x14a462=[],_0x3a316f,_0xf61a18,_0x4ef977,_0x4c8e15){const _0x351583=_0x3cf3af;for(const [_0x9f0d88,_0x3ed125]of Object[_0x351583(0x1129)](_0x28f4ca)){const _0x25d5b7=_0x3a316f?_0x3a316f+'.'+_0x9f0d88:_0x9f0d88;_0x9f0d88 in _0x4a92b7&&_0x5d40f9(_0x4a92b7[_0x9f0d88],_0x3ed125,_0x25d5b7,_0xf61a18,_0x4ef977,_0x4c8e15);}}function _0x5270e7(_0x3a3c56,_0x5db4ca,_0x19e001,_0x214ab1){const _0x18c4a7=_0x3cf3af;for(const _0x2d7efa of _0x5db4ca){if(!(_0x2d7efa in _0x3a3c56)){const _0x48bf2a=_0x19e001?_0x19e001+'.'+_0x2d7efa:_0x2d7efa;_0x214ab1[_0x18c4a7(0x597)]({'path':_0x48bf2a,'message':'Required\x20field\x20is\x20missing','expected':_0x18c4a7(0x777),'actual':'undefined'});}}}function _0x5dc51b(_0xea6a94,_0x1763ad,_0x5eae0f,_0x7c4055,_0x260ef1,_0x11358d){const _0x289845=_0x3cf3af;for(let _0x5542b8=0x0;_0x5542b8<_0xea6a94[_0x289845(0x156)];_0x5542b8++){const _0x347faa=_0x5eae0f+'['+_0x5542b8+']';_0x5d40f9(_0xea6a94[_0x5542b8],_0x1763ad,_0x347faa,_0x7c4055,_0x260ef1,_0x11358d);}}function _0x4e4cbb(_0x122b5e,_0x393afb){const _0x209e93=_0x3cf3af;if(_0x122b5e===_0x393afb)return!![];if(_0x122b5e===null||_0x393afb===null)return![];if(typeof _0x122b5e!==typeof _0x393afb)return![];if(Array['isArray'](_0x122b5e)){if(!Array[_0x209e93(0x10f5)](_0x393afb)||_0x122b5e['length']!==_0x393afb[_0x209e93(0x156)])return![];return _0x122b5e['every']((_0xade687,_0x38ba56)=>_0x4e4cbb(_0xade687,_0x393afb[_0x38ba56]));}if(typeof _0x122b5e==='object'){const _0x51fed4=Object[_0x209e93(0xa52)](_0x122b5e),_0xb45f99=Object[_0x209e93(0xa52)](_0x393afb);if(_0x51fed4[_0x209e93(0x156)]!==_0xb45f99[_0x209e93(0x156)])return![];return _0x51fed4['every'](_0x8c29bf=>_0x8c29bf in _0x393afb&&_0x4e4cbb(_0x122b5e[_0x8c29bf],_0x393afb[_0x8c29bf]));}return![];}return okdbSchemaValidator={'validate':_0xacf58d,'FORMAT_VALIDATORS':_0x44206b},okdbSchemaValidator;}var okdbEnvSchema,hasRequiredOkdbEnvSchema;function requireOkdbEnvSchema(){const _0x4f9757=_0xef8cd8;if(hasRequiredOkdbEnvSchema)return okdbEnvSchema;hasRequiredOkdbEnvSchema=0x1;const {CHANGE_ACTIONS:_0xeaeb64}=requireOkdbEnums(),{OKDBError:_0x43aa6f,OKDBSchemaCollectionError:_0x251086}=requireOkdbError(),{validate:_0x3914fa}=requireOkdbSchemaValidator(),_0x2ffbb1=requireOkdbEnvRefs(),_0x4bbfc4=_0x4f9757(0x79a);function _0x55e4ed(_0x3ee83f,_0x22cc45,_0x13bfbf,_0x19e1ec,_0x4e1b15={}){const _0x226a6c=_0x4f9757,_0x15bd66=_0x3ee83f[_0x226a6c(0x9ca)](_0x13bfbf),_0x1e9c17=_0x4e1b15['timestamp']||Date[_0x226a6c(0x555)](),_0x550454=_0x4e1b15[_0x226a6c(0xca6)];if(!_0x19e1ec||typeof _0x19e1ec!==_0x226a6c(0xb36))throw new _0x43aa6f(_0x226a6c(0x7c4),_0x226a6c(0xda6));if(!('definition'in _0x19e1ec))throw new _0x43aa6f('Schema\x20must\x20have\x20a\x20definition\x20property',_0x226a6c(0xda6));const _0x11320a=_0x19e1ec[_0x226a6c(0xcf0)]??![],_0x3fcb47={'definition':_0x19e1ec['definition'],'enforce':_0x11320a};_0x2ffbb1['extractRefs'](_0x19e1ec[_0x226a6c(0x83a)]),_0x3ee83f['db'][_0x226a6c(0x5ef)](()=>{const _0x47a4a1=_0x226a6c,_0x4ff92b=_0x3ee83f[_0x47a4a1(0xce1)]['get'](_0x13bfbf)||{};_0x3ee83f['typesDb'][_0x47a4a1(0x92c)](_0x13bfbf,{..._0x4ff92b,'schema':_0x3fcb47}),_0x15bd66[_0x47a4a1(0xdce)]=_0x3fcb47,_0x3ee83f[_0x47a4a1(0xee9)]({'id':'schema:'+_0x13bfbf,'type':_0x13bfbf,'action':_0xeaeb64['SCHEMA_SET'],'schema':_0x3fcb47,'timestamp':_0x1e9c17,'origin':_0x550454});}),_0x2ffbb1[_0x226a6c(0x89c)](_0x3ee83f);}function _0x26d67c(_0x54572b,_0x2de54f,_0x3ee3cf,_0x3e43d2={}){const _0x5f2a86=_0x4f9757,_0x2f885a=_0x54572b[_0x5f2a86(0x9ca)](_0x3ee3cf),_0x25b275=_0x3e43d2['timestamp']||Date['now'](),_0x55699d=_0x3e43d2[_0x5f2a86(0xca6)],_0x10c013=_0x2ffbb1[_0x5f2a86(0x8e6)](_0x54572b,_0x3ee3cf);if(_0x10c013[_0x5f2a86(0x156)]>0x0){const _0x51924e=_0x2ffbb1[_0x5f2a86(0x855)](_0x54572b);for(const {key:_0x5e1fc9,value:_0x29c5b1}of _0x54572b['getRange'](_0x3ee3cf)){for(const _0x468023 of _0x10c013){const _0x5cf12a=_0x2ffbb1[_0x5f2a86(0xef7)](_0x29c5b1,_0x468023[_0x5f2a86(0x147)]);_0x5cf12a!=null&&_0x51924e[_0x5f2a86(0x21e)](_0x2ffbb1[_0x5f2a86(0xb0d)](_0x468023[_0x5f2a86(0x11c8)],_0x5cf12a,_0x3ee3cf,_0x5e1fc9,_0x468023['fieldPath']));}}_0x2ffbb1[_0x5f2a86(0x313)](_0x54572b,_0x3ee3cf);}const _0x5ba724=_0x54572b[_0x5f2a86(0xce1)]['get'](_0x3ee3cf)||{},{schema:_0x562503,..._0xf17a40}=_0x5ba724;_0x54572b[_0x5f2a86(0xce1)]['put'](_0x3ee3cf,_0xf17a40),_0x2f885a[_0x5f2a86(0xdce)]=null;if(_0x54572b[_0x5f2a86(0x7c0)](_0x4bbfc4)){const _0x5e29f2=_0x54572b[_0x5f2a86(0x9ca)](_0x4bbfc4)['data'],_0x5117ca=_0x3ee3cf+'@',_0x65651b=[];for(const {key:_0x2450f2,value:_0x878cf8}of _0x5e29f2[_0x5f2a86(0x9ce)]({'start':_0x5117ca,'end':_0x5117ca+''})){_0x65651b[_0x5f2a86(0x597)]({'key':_0x2450f2,'value':_0x878cf8});}for(const {key:_0x45a194,value:_0xfb5a5a}of _0x65651b){_0x5e29f2['remove'](_0x45a194),_0x54572b[_0x5f2a86(0xee9)]({'id':_0x5f2a86(0xfe3)+_0x4bbfc4+'@'+_0x45a194,'type':_0x4bbfc4,'key':_0x45a194,'action':_0xeaeb64[_0x5f2a86(0x1b8)],'timestamp':_0x25b275,'txnId':_0x2de54f?.['id'],'origin':_0x55699d},_0xfb5a5a,undefined);}}_0x54572b[_0x5f2a86(0xee9)]({'id':_0x5f2a86(0xc04)+_0x3ee3cf,'type':_0x3ee3cf,'action':_0xeaeb64[_0x5f2a86(0xd9c)],'timestamp':_0x25b275,'origin':_0x55699d}),_0x2ffbb1[_0x5f2a86(0x89c)](_0x54572b);}async function _0x45b1b8(_0x368676,_0x4ecad3,_0x28c850){const _0x291b5a=_0x4f9757,_0x5ddaf5=[];for(const {key:_0x4a5ec1,value:_0x5bb1cd}of _0x368676[_0x291b5a(0x9ce)](_0x4ecad3)){const _0x10c861=_0x3914fa(_0x5bb1cd,_0x28c850[_0x291b5a(0x83a)]);!_0x10c861[_0x291b5a(0x64c)]&&_0x5ddaf5[_0x291b5a(0x597)]({'key':_0x4a5ec1,'errors':_0x10c861['errors']});}return{'valid':_0x5ddaf5[_0x291b5a(0x156)]===0x0,'failures':_0x5ddaf5};}async function _0x4f5492(_0xfe606c,_0x5e970a,_0x28427f){const _0x2368ee=_0x4f9757,_0x20a12c=new Set(_0xfe606c[_0x2368ee(0xd35)](_0x5e970a)[_0x2368ee(0x1166)](_0x3864a8=>_0x3864a8['key']));await _0xfe606c['db'][_0x2368ee(0x683)](()=>{const _0xbe9d80=_0x2368ee;for(const {key:_0xf73b27,value:_0x2f9e38}of _0xfe606c[_0xbe9d80(0x9ce)](_0x5e970a)){const _0x1e1f96=_0x3914fa(_0x2f9e38,_0x28427f[_0xbe9d80(0x83a)]);!_0x1e1f96[_0xbe9d80(0x64c)]?(_0xe1f8b0(_0xfe606c,null,_0x5e970a,_0xf73b27,_0x1e1f96[_0xbe9d80(0x736)]),_0x20a12c[_0xbe9d80(0x3b3)](_0xf73b27)):_0x20a12c[_0xbe9d80(0x9d0)](_0xf73b27)&&(_0x51cc3f(_0xfe606c,null,_0x5e970a,_0xf73b27),_0x20a12c['delete'](_0xf73b27));}for(const _0x1cbf1e of _0x20a12c){_0x51cc3f(_0xfe606c,null,_0x5e970a,_0x1cbf1e);}});}async function _0x5c9a41(_0x2cebfb,_0x3183eb,_0x1e4621){const _0x1b3e9c=_0x4f9757;if(!_0x1e4621||typeof _0x1e4621!==_0x1b3e9c(0xb36))throw new _0x43aa6f('Schema\x20must\x20be\x20an\x20object\x20with\x20{\x20definition,\x20enforce\x20}',_0x1b3e9c(0xda6));if(!(_0x1b3e9c(0x83a)in _0x1e4621))throw new _0x43aa6f(_0x1b3e9c(0x286),'INVALID_SCHEMA');const _0x22cc52=_0x1e4621['enforce']??![];if(_0x22cc52){const _0x508249=await _0x45b1b8(_0x2cebfb,_0x3183eb,_0x1e4621);if(!_0x508249[_0x1b3e9c(0x64c)])throw new _0x251086(_0x3183eb,_0x508249[_0x1b3e9c(0xba)]);}await _0x2cebfb['db'][_0x1b3e9c(0x683)](()=>{_0x55e4ed(_0x2cebfb,null,_0x3183eb,_0x1e4621);}),!_0x22cc52&&await _0x4f5492(_0x2cebfb,_0x3183eb,_0x1e4621),_0x2ffbb1[_0x1b3e9c(0x8e6)](_0x2cebfb,_0x3183eb)['length']>0x0&&await _0x2ffbb1[_0x1b3e9c(0xa9)](_0x2cebfb,_0x3183eb);}function _0x297f14(_0x1d7079){const _0x4fb488=_0x4f9757;!_0x1d7079[_0x4fb488(0x7c0)](_0x4bbfc4)&&_0x1d7079[_0x4fb488(0x924)](_0x4bbfc4);}function _0xe1f8b0(_0x899b27,_0x3fb2ae,_0x252447,_0x5801a7,_0x5a6ee1,{timestamp:timestamp=Date[_0x4f9757(0x555)](),origin:origin=null}={}){const _0x4a3879=_0x4f9757;_0x297f14(_0x899b27);const _0x1fe48d=_0x252447+'@'+_0x5801a7,_0x5d50e1={'type':_0x252447,'key':_0x5801a7,'errors':_0x5a6ee1,'timestamp':timestamp,'origin':origin},_0x425436=_0x899b27[_0x4a3879(0x9ca)](_0x4bbfc4)[_0x4a3879(0xc88)],_0x2af42a=_0x425436[_0x4a3879(0xa57)](_0x1fe48d),_0x53275f=_0x2af42a?_0x2af42a['version']+0x1:0x1;_0x425436[_0x4a3879(0x92c)](_0x1fe48d,_0x5d50e1,_0x53275f),_0x899b27[_0x4a3879(0xee9)]({'id':'item:'+_0x4bbfc4+'@'+_0x1fe48d,'type':_0x4bbfc4,'key':_0x1fe48d,'action':_0xeaeb64[_0x4a3879(0x719)],'timestamp':timestamp,'txnId':_0x3fb2ae?.['id'],'origin':origin},_0x2af42a?.[_0x4a3879(0x568)],_0x5d50e1);}function _0x51cc3f(_0x2775df,_0x3fbf38,_0x1b609d,_0x229c04,{timestamp:timestamp=Date[_0x4f9757(0x555)](),origin:origin=null}={}){const _0x1ed37a=_0x4f9757;if(!_0x2775df['hasType'](_0x4bbfc4))return;const _0xc90b90=_0x1b609d+'@'+_0x229c04,_0x5d94e0=_0x2775df['_getType'](_0x4bbfc4)[_0x1ed37a(0xc88)],_0x4fc50d=_0x5d94e0[_0x1ed37a(0xa57)](_0xc90b90);if(!_0x4fc50d)return;_0x5d94e0['remove'](_0xc90b90),_0x2775df['_logChange']({'id':_0x1ed37a(0xfe3)+_0x4bbfc4+'@'+_0xc90b90,'type':_0x4bbfc4,'key':_0xc90b90,'action':_0xeaeb64[_0x1ed37a(0x1b8)],'timestamp':timestamp,'txnId':_0x3fbf38?.['id'],'origin':origin},_0x4fc50d['value'],undefined);}return okdbEnvSchema={'setSchema':_0x55e4ed,'dropSchema':_0x26d67c,'validateCollection':_0x45b1b8,'syncCollectionViolations':_0x4f5492,'applySchema':_0x5c9a41,'setViolation':_0xe1f8b0,'clearViolation':_0x51cc3f},okdbEnvSchema;}var okdbEnvPatches,hasRequiredOkdbEnvPatches;function requireOkdbEnvPatches(){const _0x189007=_0xef8cd8;if(hasRequiredOkdbEnvPatches)return okdbEnvPatches;hasRequiredOkdbEnvPatches=0x1;const {OKDBInvalidValueError:_0x3c7d77}=requireOkdbError(),{equal:_0x47ca98}=requireOkdbEqual();function _0x3ac420(_0x40d4ed){const _0x4a56bf=_0x47ab;return!!_0x40d4ed&&typeof _0x40d4ed===_0x4a56bf(0xb36)&&!Array[_0x4a56bf(0x10f5)](_0x40d4ed)&&Object[_0x4a56bf(0x3dc)](_0x40d4ed)===Object[_0x4a56bf(0x901)];}function _0x1dcaa8(_0x52dd06){const _0x18a67d=_0x47ab;if(Array[_0x18a67d(0x10f5)](_0x52dd06))return _0x52dd06[_0x18a67d(0x1166)](_0x1dcaa8);if(_0x3ac420(_0x52dd06)){const _0x3de8a1={};for(const [_0x3e9085,_0x1985c6]of Object[_0x18a67d(0x1129)](_0x52dd06))_0x3de8a1[_0x3e9085]=_0x1dcaa8(_0x1985c6);return _0x3de8a1;}return _0x52dd06;}function _0x34e2ee(_0x1f573f,_0x89a2a3='path'){const _0x30a77d=_0x47ab;if(typeof _0x1f573f!=='string'||!_0x1f573f[_0x30a77d(0xf4d)]())throw new _0x3c7d77('Patch\x20'+_0x89a2a3+_0x30a77d(0x690),{'path':_0x1f573f,'label':_0x89a2a3});const _0x5431b3=_0x1f573f['split']('.');for(const _0x433953 of _0x5431b3){if(!_0x433953)throw new _0x3c7d77(_0x30a77d(0x92a)+_0x89a2a3+'\x20cannot\x20contain\x20empty\x20path\x20segments',{'path':_0x1f573f,'label':_0x89a2a3});if(_0x433953===_0x30a77d(0x984)||_0x433953===_0x30a77d(0x901)||_0x433953===_0x30a77d(0x1004))throw new _0x3c7d77(_0x30a77d(0x92a)+_0x89a2a3+_0x30a77d(0xc0a),{'path':_0x1f573f,'label':_0x89a2a3,'segment':_0x433953});}return _0x5431b3;}function _0x45d8bf(_0x409831,_0x2f7e60,{create:create=![],op:op=_0x189007(0xba7)}={}){const _0x1e7205=_0x189007,_0x3d062a=_0x34e2ee(_0x2f7e60,op);let _0x98cde3=_0x409831;for(let _0x29cdf7=0x0;_0x29cdf7<_0x3d062a['length']-0x1;_0x29cdf7++){const _0x4bc969=_0x3d062a[_0x29cdf7],_0x587b5d=_0x98cde3[_0x4bc969];if(_0x587b5d==null){if(!create)return{'parent':null,'key':_0x3d062a[_0x3d062a[_0x1e7205(0x156)]-0x1],'exists':![]};_0x98cde3[_0x4bc969]={},_0x98cde3=_0x98cde3[_0x4bc969];continue;}if(!_0x3ac420(_0x587b5d))throw new _0x3c7d77('Patch\x20'+op+'\x20requires\x20object\x20path\x20\x27'+_0x3d062a[_0x1e7205(0xc3c)](0x0,_0x29cdf7+0x1)['join']('.')+'\x27',{'path':_0x2f7e60,'op':op,'segment':_0x4bc969});_0x98cde3=_0x587b5d;}return{'parent':_0x98cde3,'key':_0x3d062a[_0x3d062a[_0x1e7205(0x156)]-0x1],'exists':Object[_0x1e7205(0x901)]['hasOwnProperty']['call'](_0x98cde3,_0x3d062a[_0x3d062a[_0x1e7205(0x156)]-0x1])};}function _0x2a095a(_0x113a52,_0x4573f2,_0x326327=''){const _0x3a0965=_0x189007;if(!_0x3ac420(_0x4573f2))throw new _0x3c7d77(_0x3a0965(0xc20),{'path':_0x326327,'source':_0x4573f2});for(const [_0x548cd5,_0x2c47a7]of Object[_0x3a0965(0x1129)](_0x4573f2)){if(_0x2c47a7===undefined)throw new _0x3c7d77('Patch\x20cannot\x20assign\x20undefined\x20values',{'path':_0x326327?_0x326327+'.'+_0x548cd5:_0x548cd5});if(_0x3ac420(_0x2c47a7)){const _0x117444=_0x113a52[_0x548cd5];if(_0x117444==null)_0x113a52[_0x548cd5]={};else{if(!_0x3ac420(_0x117444))throw new _0x3c7d77(_0x3a0965(0xe34)+(_0x326327?_0x326327+'.'+_0x548cd5:_0x548cd5)+_0x3a0965(0xa29),{'path':_0x326327?_0x326327+'.'+_0x548cd5:_0x548cd5});}_0x2a095a(_0x113a52[_0x548cd5],_0x2c47a7,_0x326327?_0x326327+'.'+_0x548cd5:_0x548cd5);}else _0x113a52[_0x548cd5]=_0x1dcaa8(_0x2c47a7);}}function _0x5613d9(_0xdf83bd){const _0x469ba0=_0x189007;if(!_0x3ac420(_0xdf83bd))throw new _0x3c7d77(_0x469ba0(0xbbe),{'patch':_0xdf83bd});const _0x4bf99d=new Set(['set','unset','inc','merge',_0x469ba0(0x111c),_0x469ba0(0x881)]);for(const _0x156398 of Object[_0x469ba0(0xa52)](_0xdf83bd)){if(!_0x4bf99d[_0x469ba0(0x9d0)](_0x156398))throw new _0x3c7d77('Unknown\x20patch\x20operation\x20\x27'+_0x156398+'\x27',{'key':_0x156398});}const _0xeaceb3={'set':{},'unset':[],'inc':{},'merge':{},'append':{},'pull':{}},_0xf55fe7=new Map(),_0x378b5b=(_0x374fcf,_0x34197b)=>{const _0x30708c=_0x469ba0;if(!_0x34197b)return;const _0x3187c7=_0xf55fe7['get'](_0x34197b)||new Set(),_0x3d2b0e=_0x3187c7[_0x30708c(0x9d0)](_0x30708c(0x111c))&&_0x374fcf===_0x30708c(0x881)||_0x3187c7[_0x30708c(0x9d0)]('pull')&&_0x374fcf===_0x30708c(0x111c);if(_0x3187c7[_0x30708c(0xfb)]>0x0&&!_0x3187c7[_0x30708c(0x9d0)](_0x374fcf)&&!_0x3d2b0e)throw new _0x3c7d77(_0x30708c(0xc44)+_0x34197b+'\x27',{'path':_0x34197b,'sections':[..._0x3187c7,_0x374fcf]});_0x3187c7['add'](_0x374fcf),_0xf55fe7['set'](_0x34197b,_0x3187c7);};if(_0xdf83bd[_0x469ba0(0x211)]!=null){if(!_0x3ac420(_0xdf83bd['set']))throw new _0x3c7d77('Patch\x20set\x20must\x20be\x20a\x20plain\x20object',{'set':_0xdf83bd['set']});for(const [_0x4a1035,_0x4d390f]of Object[_0x469ba0(0x1129)](_0xdf83bd[_0x469ba0(0x211)])){_0x34e2ee(_0x4a1035,_0x469ba0(0x211));if(_0x4d390f===undefined)throw new _0x3c7d77(_0x469ba0(0xb02),{'path':_0x4a1035});_0xeaceb3[_0x469ba0(0x211)][_0x4a1035]=_0x1dcaa8(_0x4d390f),_0x378b5b(_0x469ba0(0x211),_0x4a1035);}}if(_0xdf83bd[_0x469ba0(0x113f)]!=null){if(!Array[_0x469ba0(0x10f5)](_0xdf83bd[_0x469ba0(0x113f)]))throw new _0x3c7d77(_0x469ba0(0xb9c),{'unset':_0xdf83bd['unset']});for(const _0xfb7b98 of _0xdf83bd['unset']){_0x34e2ee(_0xfb7b98,_0x469ba0(0x113f)),_0xeaceb3[_0x469ba0(0x113f)]['push'](_0xfb7b98),_0x378b5b('unset',_0xfb7b98);}}if(_0xdf83bd[_0x469ba0(0x535)]!=null){if(!_0x3ac420(_0xdf83bd[_0x469ba0(0x535)]))throw new _0x3c7d77('Patch\x20inc\x20must\x20be\x20a\x20plain\x20object',{'inc':_0xdf83bd[_0x469ba0(0x535)]});for(const [_0x578668,_0x56379d]of Object[_0x469ba0(0x1129)](_0xdf83bd[_0x469ba0(0x535)])){_0x34e2ee(_0x578668,_0x469ba0(0x535));if(typeof _0x56379d!==_0x469ba0(0x9f0)||Number[_0x469ba0(0xf3)](_0x56379d))throw new _0x3c7d77(_0x469ba0(0xa89),{'path':_0x578668,'amount':_0x56379d});_0xeaceb3[_0x469ba0(0x535)][_0x578668]=_0x56379d,_0x378b5b(_0x469ba0(0x535),_0x578668);}}if(_0xdf83bd[_0x469ba0(0xe5a)]!=null){if(!_0x3ac420(_0xdf83bd[_0x469ba0(0xe5a)]))throw new _0x3c7d77('Patch\x20merge\x20must\x20be\x20a\x20plain\x20object',{'merge':_0xdf83bd['merge']});for(const [_0x1b9b05,_0x14fd68]of Object[_0x469ba0(0x1129)](_0xdf83bd[_0x469ba0(0xe5a)])){_0x34e2ee(_0x1b9b05,'merge');if(!_0x3ac420(_0x14fd68))throw new _0x3c7d77(_0x469ba0(0xc20),{'path':_0x1b9b05,'value':_0x14fd68});_0xeaceb3[_0x469ba0(0xe5a)][_0x1b9b05]=_0x1dcaa8(_0x14fd68),_0x378b5b(_0x469ba0(0xe5a),_0x1b9b05);}}const _0x17d70d=_0x3db5bd=>{const _0x295205=_0x469ba0,_0x51da75=_0xdf83bd[_0x3db5bd];if(_0x51da75==null)return;if(!_0x3ac420(_0x51da75))throw new _0x3c7d77('Patch\x20'+_0x3db5bd+_0x295205(0xdc4),{[_0x3db5bd]:_0x51da75});for(const [_0x4e1225,_0x45b540]of Object[_0x295205(0x1129)](_0x51da75)){_0x34e2ee(_0x4e1225,_0x3db5bd);const _0x16f939=Array['isArray'](_0x45b540)?_0x45b540[_0x295205(0x1166)](_0x1dcaa8):[_0x1dcaa8(_0x45b540)];if(_0x16f939[_0x295205(0xa83)](_0x6d4a1=>_0x6d4a1===undefined))throw new _0x3c7d77(_0x295205(0x92a)+_0x3db5bd+_0x295205(0x82b),{'path':_0x4e1225});_0xeaceb3[_0x3db5bd][_0x4e1225]=_0x16f939,_0x378b5b(_0x3db5bd,_0x4e1225);}};_0x17d70d(_0x469ba0(0x111c)),_0x17d70d(_0x469ba0(0x881));const _0x47af5f=Object['keys'](_0xeaceb3[_0x469ba0(0x211)])[_0x469ba0(0x156)]||_0xeaceb3[_0x469ba0(0x113f)][_0x469ba0(0x156)]||Object[_0x469ba0(0xa52)](_0xeaceb3[_0x469ba0(0x535)])[_0x469ba0(0x156)]||Object[_0x469ba0(0xa52)](_0xeaceb3[_0x469ba0(0xe5a)])['length']||Object[_0x469ba0(0xa52)](_0xeaceb3['append'])[_0x469ba0(0x156)]||Object['keys'](_0xeaceb3['pull'])[_0x469ba0(0x156)];if(!_0x47af5f)throw new _0x3c7d77(_0x469ba0(0x11b2));return _0xeaceb3;}function _0x176a62(_0x1b0bc7,_0x4c04fa){const _0x586a48=_0x189007;if(!_0x3ac420(_0x1b0bc7))throw new _0x3c7d77(_0x586a48(0x5a4),{'value':_0x1b0bc7});const _0x375b81=_0x5613d9(_0x4c04fa),_0x1d600c=_0x1dcaa8(_0x1b0bc7);for(const [_0x56ce26,_0xe654e2]of Object[_0x586a48(0x1129)](_0x375b81[_0x586a48(0x211)])){const {parent:_0x24e3f9,key:_0x211f9c}=_0x45d8bf(_0x1d600c,_0x56ce26,{'create':!![],'op':_0x586a48(0x211)});_0x24e3f9[_0x211f9c]=_0x1dcaa8(_0xe654e2);}for(const _0x8ba895 of _0x375b81[_0x586a48(0x113f)]){const {parent:_0x14ec6a,key:_0xac2ce3}=_0x45d8bf(_0x1d600c,_0x8ba895,{'create':![],'op':_0x586a48(0x113f)});if(!_0x14ec6a)continue;delete _0x14ec6a[_0xac2ce3];}for(const [_0xe75259,_0x3a3e9d]of Object[_0x586a48(0x1129)](_0x375b81[_0x586a48(0x535)])){const {parent:_0x37f61c,key:_0x52729f,exists:_0x502122}=_0x45d8bf(_0x1d600c,_0xe75259,{'create':!![],'op':'inc'}),_0x509d1e=_0x502122?_0x37f61c[_0x52729f]:0x0;if(_0x509d1e!==undefined&&typeof _0x509d1e!==_0x586a48(0x9f0))throw new _0x3c7d77(_0x586a48(0xe23)+_0xe75259+_0x586a48(0x11ea),{'path':_0xe75259,'value':_0x509d1e});_0x37f61c[_0x52729f]=(_0x509d1e??0x0)+_0x3a3e9d;}for(const [_0x3f7c86,_0x180f66]of Object[_0x586a48(0x1129)](_0x375b81['merge'])){const {parent:_0x27cd00,key:_0x23d728,exists:_0x518c29}=_0x45d8bf(_0x1d600c,_0x3f7c86,{'create':!![],'op':_0x586a48(0xe5a)});if(!_0x518c29||_0x27cd00[_0x23d728]==null)_0x27cd00[_0x23d728]={};else{if(!_0x3ac420(_0x27cd00[_0x23d728]))throw new _0x3c7d77(_0x586a48(0xe34)+_0x3f7c86+'\x27\x20must\x20be\x20an\x20object',{'path':_0x3f7c86,'value':_0x27cd00[_0x23d728]});}_0x2a095a(_0x27cd00[_0x23d728],_0x180f66,_0x3f7c86);}for(const [_0x572c1f,_0x38f0f]of Object['entries'](_0x375b81['append'])){const {parent:_0x29ebf7,key:_0x30e458,exists:_0x3b68c1}=_0x45d8bf(_0x1d600c,_0x572c1f,{'create':!![],'op':'append'}),_0x1d7e5e=_0x3b68c1?_0x29ebf7[_0x30e458]:[];if(!Array[_0x586a48(0x10f5)](_0x1d7e5e))throw new _0x3c7d77('Patch\x20append\x20target\x20\x27'+_0x572c1f+_0x586a48(0x4bd),{'path':_0x572c1f,'value':_0x1d7e5e});_0x29ebf7[_0x30e458]=[..._0x1d7e5e,..._0x38f0f['map'](_0x1dcaa8)];}for(const [_0x1cf8d1,_0x5be03a]of Object[_0x586a48(0x1129)](_0x375b81[_0x586a48(0x881)])){const {parent:_0x4dc457,key:_0x229b44,exists:_0x25e81e}=_0x45d8bf(_0x1d600c,_0x1cf8d1,{'create':![],'op':'pull'});if(!_0x4dc457||!_0x25e81e)continue;const _0x56d3c5=_0x4dc457[_0x229b44];if(!Array[_0x586a48(0x10f5)](_0x56d3c5))throw new _0x3c7d77('Patch\x20pull\x20target\x20\x27'+_0x1cf8d1+_0x586a48(0x4bd),{'path':_0x1cf8d1,'value':_0x56d3c5});_0x4dc457[_0x229b44]=_0x56d3c5[_0x586a48(0x1103)](_0x3ad21a=>!_0x5be03a[_0x586a48(0xa83)](_0x5e97da=>_0x47ca98(_0x3ad21a,_0x5e97da)));}return _0x1d600c;}return okdbEnvPatches={'applyPatch':_0x176a62,'normalizePatchDocument':_0x5613d9,'validatePatchPath':_0x34e2ee},okdbEnvPatches;}var okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function requireOkdbFunctionsSandbox(){if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0xd2a0c6=require$$0$2;function _0x147b32(_0xabe982){const _0x1436e4=_0x47ab,_0x4485a4=_0xabe982==='*',_0x5673d5=_0x4485a4?null:new Set(Array[_0x1436e4(0x10f5)](_0xabe982)?_0xabe982:[]);return function _0x20d11d(_0x292047,_0x2d3523){const _0x26299b=_0x1436e4;if(!_0x4485a4){let _0x313605;try{const _0xd3bbf7=new URL(typeof _0x292047===_0x26299b(0xf7a)?_0x292047:_0x292047?.[_0x26299b(0xb14)]??String(_0x292047));_0x313605=_0xd3bbf7[_0x26299b(0x73b)];}catch{const _0x4b5da9=new Error(_0x26299b(0x239));return _0x4b5da9[_0x26299b(0x1f8)]=_0x26299b(0xd12),Promise[_0x26299b(0xc74)](_0x4b5da9);}if(!_0x5673d5[_0x26299b(0x9d0)](_0x313605)){const _0x376a4c=new Error(_0x5673d5[_0x26299b(0xfb)]===0x0?'fetch\x20is\x20not\x20allowed\x20in\x20this\x20function\x20sandbox\x20(no\x20allowedFetchDomains\x20configured)':'fetch\x20blocked:\x20hostname\x20\x22'+_0x313605+_0x26299b(0xfd4));return _0x376a4c[_0x26299b(0x1f8)]=_0x26299b(0xd12),Promise['reject'](_0x376a4c);}}return fetch(_0x292047,_0x2d3523);};}function _0x32a5e6(_0x4baf8d={}){const _0x24d7f4=_0x47ab,_0x3d5ede=_0x4baf8d[_0x24d7f4(0x207)]!==![],_0x1bdbcc=_0x4baf8d['allowedFetchDomains']??[],_0x29897a={'Date':Date,'Math':Math,'JSON':JSON,'Array':Array,'Object':Object,'String':String,'Number':Number,'Boolean':Boolean,'Map':Map,'Set':Set,'Promise':Promise,'URL':URL,'URLSearchParams':URLSearchParams,'TextEncoder':TextEncoder,'TextDecoder':TextDecoder,'AbortController':AbortController,'AbortSignal':AbortSignal};return _0x3d5ede&&typeof fetch===_0x24d7f4(0x63b)&&(_0x29897a[_0x24d7f4(0x5a5)]=_0x147b32(_0x1bdbcc)),_0x29897a[_0x24d7f4(0x108c)]=_0x29897a,_0x29897a;}function _0x4a21c3(_0x247dca,_0x530a31={}){const _0x24230a=_0x47ab,_0x3779f7=_0x32a5e6(_0x530a31),_0x106516=_0xd2a0c6['createContext'](_0x3779f7,{'name':'okdb-function-sandbox','codeGeneration':{'strings':![],'wasm':![]}});let _0x50fe2d;try{_0x50fe2d=new _0xd2a0c6['Script']('('+_0x247dca+')',{'filename':_0x530a31[_0x24230a(0x8c6)]??_0x24230a(0xddd)});}catch(_0x283f61){const _0x5e3b89=new Error(_0x283f61?.[_0x24230a(0xb4e)]||_0x24230a(0x1054));_0x5e3b89[_0x24230a(0x1f8)]='FUNCTION_SCRIPT_COMPILE_FAILED',_0x5e3b89[_0x24230a(0x105d)]=_0x283f61;throw _0x5e3b89;}let _0x31d2a9;try{_0x31d2a9=_0x50fe2d[_0x24230a(0x1003)](_0x106516,{'timeout':_0x530a31[_0x24230a(0x237)]??0x64});}catch(_0x3574b7){const _0x4f1a02=new Error(_0x3574b7?.[_0x24230a(0xb4e)]||_0x24230a(0xac6));_0x4f1a02[_0x24230a(0x1f8)]=_0x24230a(0x5f7),_0x4f1a02[_0x24230a(0x105d)]=_0x3574b7;throw _0x4f1a02;}if(typeof _0x31d2a9!==_0x24230a(0x63b)){const _0x2856eb=new Error(_0x24230a(0x180));_0x2856eb['code']=_0x24230a(0xa31);throw _0x2856eb;}return _0x31d2a9;}return okdbFunctionsSandbox={'createSandboxGlobals':_0x32a5e6,'compileFunctionExpression':_0x4a21c3,'_buildRestrictedFetch':_0x147b32},okdbFunctionsSandbox;}var okdbFunctionsValidate,hasRequiredOkdbFunctionsValidate;function requireOkdbFunctionsValidate(){const _0x359672=_0xef8cd8;if(hasRequiredOkdbFunctionsValidate)return okdbFunctionsValidate;hasRequiredOkdbFunctionsValidate=0x1;const _0x278fb5=require$$0$3,{compileFunctionExpression:_0x171abd}=requireOkdbFunctionsSandbox(),_0x4d8ee9=[{'symbol':_0x359672(0x11d4),'pattern':/(^|[^\w$.])require\s*\(/},{'symbol':'import','pattern':/(^|[^\w$.])import\b/},{'symbol':_0x359672(0xc99),'pattern':/(^|[^\w$.])console\b/},{'symbol':_0x359672(0xa3f),'pattern':/(^|[^\w$.])module\b/},{'symbol':_0x359672(0xe5f),'pattern':/(^|[^\w$.])exports\b/},{'symbol':'process','pattern':/(^|[^\w$.])process\b/},{'symbol':'child_process','pattern':/child_process/},{'symbol':_0x359672(0x4a5),'pattern':/worker_threads/}];function _0x512014(_0x24851a,_0x1c7cb6,_0x2ce996={}){const _0x2dc1c0=_0x359672,_0x249157=new Error(_0x1c7cb6);return _0x249157['code']=_0x24851a,_0x249157[_0x2dc1c0(0x933)]=_0x2ce996,_0x249157;}function _0x537ea2(_0x369da6){const _0x4e1281=_0x359672;if(typeof _0x369da6!=='string')throw _0x512014('FUNCTION_SCRIPT_REQUIRED',_0x4e1281(0xb73));return _0x369da6[_0x4e1281(0x8d8)](/\r\n/g,'\x0a')['trim']();}function _0xcaa244(_0x4f4bb1){const _0x12ebf5=_0x359672;return'sha256:'+_0x278fb5[_0x12ebf5(0x687)](_0x12ebf5(0xeee))[_0x12ebf5(0xbb7)](_0x4f4bb1)[_0x12ebf5(0xdea)](_0x12ebf5(0x57b));}function _0x50cac7(_0x16dd55,_0x50a920={}){const _0x3b2a70=_0x359672,_0x245ec9=_0x537ea2(_0x16dd55);if(!_0x245ec9)throw _0x512014(_0x3b2a70(0x96e),_0x3b2a70(0xd25));const _0x4a079d=Buffer[_0x3b2a70(0x13c)](_0x245ec9,_0x3b2a70(0x57a)),_0x34ec5e=_0x50a920[_0x3b2a70(0xc14)]??0x40*0x400;if(_0x4a079d>_0x34ec5e)throw _0x512014('FUNCTION_SCRIPT_TOO_LARGE',_0x3b2a70(0x6e9)+_0x34ec5e+_0x3b2a70(0x124d),{'bytes':_0x4a079d,'maxCodeSizeBytes':_0x34ec5e});if(/^(async\s+)?\(\s*\{/[_0x3b2a70(0xe10)](_0x245ec9))throw _0x512014(_0x3b2a70(0xa31),_0x3b2a70(0x1037));if(!/^(async\s+)?\(\s*[A-Za-z_$][\w$]*\s*\)\s*=>/['test'](_0x245ec9))throw _0x512014(_0x3b2a70(0xa31),'Function\x20script\x20must\x20be\x20an\x20anonymous\x20arrow\x20function\x20of\x20the\x20form\x20[async]\x20(ctx)\x20=>\x20{}');for(const {symbol:_0x242001,pattern:_0x2c149e}of _0x4d8ee9){if(_0x2c149e[_0x3b2a70(0xe10)](_0x245ec9))throw _0x512014(_0x3b2a70(0x1eb),_0x3b2a70(0x7cf)+_0x242001,{'symbol':_0x242001});}try{_0x171abd(_0x245ec9,{'allowFetch':_0x50a920['allowFetch']!==![],'filename':_0x50a920[_0x3b2a70(0x8c6)]});}catch(_0x1609ca){if(_0x1609ca?.[_0x3b2a70(0x1f8)]===_0x3b2a70(0xa31)||_0x1609ca?.[_0x3b2a70(0x1f8)]===_0x3b2a70(0x5f7))throw _0x1609ca;throw _0x512014(_0x3b2a70(0x5f7),_0x1609ca?.[_0x3b2a70(0xb4e)]||_0x3b2a70(0x1054));}return{'source':_0x245ec9,'bytes':_0x4a079d,'hash':_0xcaa244(_0x245ec9)};}const _0x4ead49=new Set(['payload',_0x359672(0x26c),'signal',_0x359672(0x9be),_0x359672(0x30b),_0x359672(0x1035),_0x359672(0xf39),_0x359672(0xfbb)]),_0x4f279c=new Set([_0x359672(0xd4f)]);function _0x504548(_0x5f476f,_0x44762a={}){const _0x109dea=_0x359672,{unsafe:unsafe=![]}=_0x44762a,_0x3d9438=_0x5f476f[_0x109dea(0xa0b)](/^(?:async\s+)?\(\s*([A-Za-z_$][\w$]*)\s*\)\s*=>/),_0x12a38b=_0x3d9438?.[0x1]??'ctx',_0x1a0d76=new RegExp('\x5cb'+_0x12a38b+_0x109dea(0x935),'g'),_0x2f73d9=new Set();for(const _0x4b84f7 of _0x5f476f['matchAll'](_0x1a0d76)){const _0x22dfae=_0x4b84f7[0x0][_0x109dea(0x2f0)]('.'),_0x230458=_0x4b84f7[0x0]['slice'](_0x22dfae+0x1);if(_0x2f73d9[_0x109dea(0x9d0)](_0x230458))continue;_0x2f73d9[_0x109dea(0x33c)](_0x230458);if(_0x4f279c['has'](_0x230458)){if(!unsafe)throw _0x512014(_0x109dea(0x256),_0x230458===_0x109dea(0xd4f)?_0x109dea(0x566):_0x109dea(0xcad)+_0x230458+_0x109dea(0xe93),{'prop':_0x230458});}else{if(!_0x4ead49[_0x109dea(0x9d0)](_0x230458))throw _0x512014(_0x109dea(0x106c),_0x109dea(0x132)+_0x230458+_0x109dea(0xdb)+[..._0x4ead49][_0x109dea(0x3d9)](',\x20'),{'prop':_0x230458,'allowed':[..._0x4ead49]});}}}return okdbFunctionsValidate={'FORBIDDEN_PATTERNS':_0x4d8ee9,'CTX_ALLOWED':_0x4ead49,'CTX_UNSAFE_ONLY':_0x4f279c,'createValidationError':_0x512014,'validateFunctionSource':_0x50cac7,'validateFunctionCtxApi':_0x504548},okdbFunctionsValidate;}var okdbFunctionsRecords,hasRequiredOkdbFunctionsRecords;function requireOkdbFunctionsRecords(){const _0x226e8b=_0xef8cd8;if(hasRequiredOkdbFunctionsRecords)return okdbFunctionsRecords;hasRequiredOkdbFunctionsRecords=0x1;const {validateFunctionSource:_0x23f501,validateFunctionCtxApi:_0xa9946a}=requireOkdbFunctionsValidate(),_0x315bff=_0x226e8b(0xe29),_0x1f67ff=_0x226e8b(0xf08),_0x3e52ca=new Set([_0x226e8b(0x30b),'global']),_0x1ea013=new Set(['queued','running',_0x226e8b(0x7ca),_0x226e8b(0x225),'timeout',_0x226e8b(0xeea)]),_0x4a4909=/^[A-Za-z0-9._-]+$/;function _0xbcf456(_0x1a3eff){const _0x3395d0=_0x226e8b;if(_0x1a3eff==null)return _0x1a3eff;return JSON[_0x3395d0(0xdcd)](JSON['stringify'](_0x1a3eff));}function _0x2df532(_0x28226e){const _0x3eff3f=_0x226e8b;if(!_0x3e52ca[_0x3eff3f(0x9d0)](_0x28226e))throw new Error(_0x3eff3f(0xcac)+_0x28226e);}function _0x1363fb(_0x211bd0){const _0x128e1e=_0x226e8b;if(typeof _0x211bd0!==_0x128e1e(0xf7a)||!_0x211bd0||!_0x4a4909['test'](_0x211bd0))throw new Error(_0x128e1e(0x694));}function _0x12ebc9(_0xc9898a={},_0x3e6946={}){const _0x476084=_0x226e8b;return{'timeoutMs':Number[_0x476084(0x2b5)](_0xc9898a[_0x476084(0xb30)])?_0xc9898a[_0x476084(0xb30)]:_0x3e6946[_0x476084(0xb30)]??0x1388,'memoryMb':Number['isFinite'](_0xc9898a['memoryMb'])?_0xc9898a[_0x476084(0x92d)]:_0x3e6946['memoryMb']??0x20,'allowFetch':_0xc9898a['allowFetch']??_0x3e6946[_0x476084(0x207)]??!![],'pool':_0xc9898a[_0x476084(0x3bf)]??_0x3e6946[_0x476084(0x3bf)]??null};}function _0x477497(_0x305e3a={},_0x4de9ab=null){const _0x1358b5=_0x226e8b,_0x562dc2=Date['now'](),_0x19a5bc={'description':_0x305e3a['description']??_0x4de9ab?.['metadata']?.['description']??null,'tags':Array[_0x1358b5(0x10f5)](_0x305e3a['tags'])?[..._0x305e3a['tags']]:_0x4de9ab?.[_0x1358b5(0x670)]?.[_0x1358b5(0x35b)]?[..._0x4de9ab['metadata'][_0x1358b5(0x35b)]]:[],'createdAt':_0x4de9ab?.[_0x1358b5(0x670)]?.[_0x1358b5(0x1156)]??_0x305e3a[_0x1358b5(0x1156)]??_0x562dc2,'updatedAt':_0x305e3a[_0x1358b5(0x2d3)]??_0x562dc2,'createdBy':_0x305e3a['createdBy']??_0x4de9ab?.[_0x1358b5(0x670)]?.[_0x1358b5(0x1f4)]??null,'updatedBy':_0x305e3a[_0x1358b5(0x100a)]??null},_0x528d3f=[_0x1358b5(0x51c),'pipeline'];for(const _0x5bfe6f of _0x528d3f){const _0x4cec18=_0x305e3a[_0x5bfe6f]??_0x4de9ab?.[_0x1358b5(0x670)]?.[_0x5bfe6f]??undefined;if(_0x4cec18!==undefined)_0x19a5bc[_0x5bfe6f]=_0x4cec18;}return _0x19a5bc;}function _0x593645(_0x4a6d6a,_0x556f9a={}){const _0x400405=_0x226e8b,_0x3e2bbd=_0x556f9a[_0x400405(0xd52)]??null,_0x1ceddd=_0x4a6d6a['name']??_0x3e2bbd?.[_0x400405(0x1173)];_0x1363fb(_0x1ceddd);const _0x36497b=_0x4a6d6a[_0x400405(0x549)]?.['source']??_0x4a6d6a[_0x400405(0x1091)]??_0x3e2bbd?.[_0x400405(0x549)]?.['source']??'',_0x4d9239=_0x23f501(_0x36497b,{'maxCodeSizeBytes':_0x556f9a['defaults']?.[_0x400405(0xc14)],'allowFetch':_0x4a6d6a[_0x400405(0x9de)]?.[_0x400405(0x207)]??_0x556f9a[_0x400405(0xabb)]?.[_0x400405(0x207)],'filename':_0x1ceddd+_0x400405(0xaed)}),_0x4d0812=_0x4d9239['source'],_0x3a0cd5=_0x12ebc9(_0x4a6d6a[_0x400405(0x9de)],_0x556f9a[_0x400405(0xabb)]),_0x394647=_0x3e2bbd?_0x4a6d6a['version']??_0x3e2bbd[_0x400405(0x45c)]+0x1:_0x4a6d6a['version']??0x1,_0x2eaac8=_0x4a6d6a[_0x400405(0x74d)]!=null?!!_0x4a6d6a[_0x400405(0x74d)]:_0x3e2bbd?.[_0x400405(0x74d)]??![];return _0xa9946a(_0x4d0812,{'unsafe':_0x2eaac8}),{'name':_0x1ceddd,'scope':_0x400405(0x30b),'unsafe':_0x2eaac8,'enabled':_0x4a6d6a['enabled']??_0x3e2bbd?.['enabled']??!![],'version':_0x394647,'hash':_0x4d9239[_0x400405(0x6f9)],'runtime':_0x3a0cd5,'script':{'language':_0x400405(0xcbb),'source':_0x4d0812,'bytes':_0x4d9239[_0x400405(0x37f)]},'metadata':_0x477497(_0x4a6d6a[_0x400405(0x670)],_0x3e2bbd)};}function _0x2cf78c(_0x44bb5,_0x4e04ae={}){const _0x549ec1=_0x226e8b,_0x542c49=_0x44bb5[_0x549ec1(0xfcd)]??_0x549ec1(0xbf2);if(!_0x1ea013[_0x549ec1(0x9d0)](_0x542c49))throw new Error(_0x549ec1(0x19a)+_0x542c49);const _0x1a8f70=_0x44bb5[_0x549ec1(0x85b)]??_0x4e04ae[_0x549ec1(0x85b)];_0x2df532(_0x1a8f70);const _0x517d2f=_0x4e04ae[_0x549ec1(0xa70)]??_0x44bb5[_0x549ec1(0x670)]?.['env']??null,_0x434359=_0x44bb5[_0x549ec1(0x6f8)]?.['requestedAt']??Date[_0x549ec1(0x555)](),_0x440bd7={'truncated':!!_0x44bb5[_0x549ec1(0x80e)]?.['truncated']};_0x44bb5['result']&&Object[_0x549ec1(0x901)][_0x549ec1(0x9e)][_0x549ec1(0x834)](_0x44bb5[_0x549ec1(0x80e)],_0x549ec1(0x568))&&(_0x440bd7[_0x549ec1(0x568)]=_0xbcf456(_0x44bb5[_0x549ec1(0x80e)][_0x549ec1(0x568)]??null));const _0x3dc64f=Array[_0x549ec1(0x10f5)](_0x44bb5[_0x549ec1(0x292)])?_0x44bb5['logs'][_0x549ec1(0x1166)](_0x1e3414=>({'level':_0x1e3414?.[_0x549ec1(0x10b6)]??_0x549ec1(0x26c),'msg':_0x1e3414?.[_0x549ec1(0xd33)]??'','meta':_0xbcf456(_0x1e3414?.[_0x549ec1(0x654)]??null),'context':_0xbcf456(_0x1e3414?.['context']??null),'ts':_0x1e3414?.['ts']??Date['now']()})):[];return{'id':_0x44bb5['id'],'functionName':_0x44bb5[_0x549ec1(0x279)],'scope':_0x1a8f70,'status':_0x542c49,'request':{'payload':_0xbcf456(_0x44bb5['request']?.[_0x549ec1(0x3c3)]??null),'trigger':_0x44bb5[_0x549ec1(0x6f8)]?.[_0x549ec1(0x5c3)]??_0x549ec1(0xb5c),'requestedAt':_0x434359},'execution':{'runnerId':_0x44bb5[_0x549ec1(0xf81)]?.[_0x549ec1(0x493)]??null,'startedAt':_0x44bb5[_0x549ec1(0xf81)]?.['startedAt']??null,'finishedAt':_0x44bb5[_0x549ec1(0xf81)]?.[_0x549ec1(0x1112)]??null,'durationMs':_0x44bb5[_0x549ec1(0xf81)]?.[_0x549ec1(0x446)]??null,'timeoutMs':_0x44bb5[_0x549ec1(0xf81)]?.['timeoutMs']??null,'memoryMb':_0x44bb5[_0x549ec1(0xf81)]?.[_0x549ec1(0x92d)]??null},'result':_0x440bd7,'logs':_0x3dc64f,'error':_0x44bb5['error']?_0xbcf456(_0x44bb5[_0x549ec1(0x225)]):null,'metadata':{'env':_0x517d2f,'functionVersion':_0x44bb5[_0x549ec1(0x670)]?.['functionVersion']??null,'preview':!!_0x44bb5[_0x549ec1(0x670)]?.[_0x549ec1(0x763)]}};}return okdbFunctionsRecords={'TYPE_FUNCTIONS':_0x315bff,'TYPE_FUNCTION_RUNS':_0x1f67ff,'normalizeFunctionRecord':_0x593645,'normalizeFunctionRunRecord':_0x2cf78c,'cloneJson':_0xbcf456},okdbFunctionsRecords;}var okdbFunctionsIpc,hasRequiredOkdbFunctionsIpc;function requireOkdbFunctionsIpc(){if(hasRequiredOkdbFunctionsIpc)return okdbFunctionsIpc;hasRequiredOkdbFunctionsIpc=0x1;function _0xa7b159(_0xaaadfb){const _0x236d79=_0x47ab;if(!_0xaaadfb)return null;return{'message':_0xaaadfb[_0x236d79(0xb4e)]||String(_0xaaadfb),'stack':_0xaaadfb['stack']||null,'code':_0xaaadfb['code']||null,'details':_0xaaadfb[_0x236d79(0x933)]||null};}function _0x121dd9(_0x3e511f){const _0x43b3a9=_0x47ab;if(!_0x3e511f)return new Error(_0x43b3a9(0x567));const _0x594562=new Error(_0x3e511f[_0x43b3a9(0xb4e)]||String(_0x3e511f));if(_0x3e511f[_0x43b3a9(0x56e)])_0x594562[_0x43b3a9(0x56e)]=_0x3e511f['stack'];if(_0x3e511f[_0x43b3a9(0x1f8)])_0x594562['code']=_0x3e511f['code'];if(_0x3e511f[_0x43b3a9(0x933)])_0x594562[_0x43b3a9(0x933)]=_0x3e511f[_0x43b3a9(0x933)];return _0x594562;}return okdbFunctionsIpc={'serializeError':_0xa7b159,'deserializeError':_0x121dd9},okdbFunctionsIpc;}var okdbFunctionsPool,hasRequiredOkdbFunctionsPool;function requireOkdbFunctionsPool(){const _0x6e31fe=_0xef8cd8;if(hasRequiredOkdbFunctionsPool)return okdbFunctionsPool;hasRequiredOkdbFunctionsPool=0x1;const _0x567777=require$$0$4,{fork:_0x256388}=require$$1$1,{randomUUID:_0x4df22c}=require$$0$3,{deserializeError:_0x3469c5,serializeError:_0xbe2f4a}=requireOkdbFunctionsIpc(),_0xb82342=_0x567777[_0x6e31fe(0x3d9)](__dirname,_0x6e31fe(0x482)),_0x3b35cc=new Set([_0x6e31fe(0x92c),'patch',_0x6e31fe(0x725),_0x6e31fe(0x21e),'update',_0x6e31fe(0x6bf),_0x6e31fe(0xb8b),_0x6e31fe(0x2ad),'setDefaultTTL','clearDefaultTTL','dropType',_0x6e31fe(0xfff),_0x6e31fe(0x2c8)]),_0x436ef0=new Set([_0x6e31fe(0xafa),_0x6e31fe(0x737),_0x6e31fe(0x255),_0x6e31fe(0x29e)]),_0x46a221=new Set(['upload','remove']);function _0x527a41(_0x1143a7,_0x34e0c3){const _0x1b4760=_0x6e31fe;if(_0x1143a7===_0x1b4760(0x30b)||_0x1143a7===_0x1b4760(0x917))return _0x3b35cc[_0x1b4760(0x9d0)](_0x34e0c3);if(_0x1143a7===_0x1b4760(0x879))return _0x436ef0[_0x1b4760(0x9d0)](_0x34e0c3);if(_0x1143a7===_0x1b4760(0xf5b))return _0x46a221[_0x1b4760(0x9d0)](_0x34e0c3);return![];}class _0x31c2eb{constructor(_0x2caf55,_0x513610={}){const _0x14cd2e=_0x6e31fe;this['okdb']=_0x2caf55,this[_0x14cd2e(0x451)]=_0x513610[_0x14cd2e(0x451)]??Infinity,this['minIdleRunners']=0x1,this[_0x14cd2e(0xa43)]=0x7530,this[_0x14cd2e(0xb15)]=_0x513610[_0x14cd2e(0xb15)]??{},this[_0x14cd2e(0x174)]=[],this['_requestToRunner']=new Map(),this[_0x14cd2e(0x66c)]=null,this['_started']=![],this[_0x14cd2e(0x615)]=[],this[_0x14cd2e(0x372)]=null;}async[_0x6e31fe(0xa00)](){const _0x2947a3=_0x6e31fe;if(this[_0x2947a3(0x250)])return this;return this[_0x2947a3(0x250)]=!![],this;}async[_0x6e31fe(0x1fe)](){const _0x3c6190=_0x6e31fe;this['_reaperTimer']&&(clearInterval(this[_0x3c6190(0x372)]),this[_0x3c6190(0x372)]=null);while(this[_0x3c6190(0x615)][_0x3c6190(0x156)]>0x0){const {reject:_0x1b8e21}=this['_waiters']['shift']();_0x1b8e21(new Error('Pool\x20stopped'));}const _0x6944cb=[...this[_0x3c6190(0x174)]];this[_0x3c6190(0x174)]=[],await Promise[_0x3c6190(0xf09)](_0x6944cb['map'](_0x59a189=>this[_0x3c6190(0x247)](_0x59a189))),this[_0x3c6190(0x250)]=![];}async[_0x6e31fe(0x110b)](_0x2f92bd){const _0x5c1bbb=_0x6e31fe;await this[_0x5c1bbb(0xa00)]();const _0x9f59b0=_0x2f92bd[_0x5c1bbb(0x9de)]?.['memoryMb']??this['runtimeDefaults'][_0x5c1bbb(0x92d)]??null;let _0xeb9ea5=await this[_0x5c1bbb(0x341)](_0x9f59b0);(!_0xeb9ea5[_0x5c1bbb(0xd9b)]?.['connected']||_0xeb9ea5[_0x5c1bbb(0xd9b)]['exitCode']!==null)&&(_0xeb9ea5=await this[_0x5c1bbb(0xf60)](_0xeb9ea5),_0xeb9ea5[_0x5c1bbb(0x269)]=!![]);const _0x27c7a8=_0x4df22c(),_0x50474c=Date['now'](),_0x2a3efb=this[_0x5c1bbb(0xd4f)][_0x5c1bbb(0x9be)]['child']({'feature':_0x5c1bbb(0x705),'env':_0x2f92bd['envName'],'fn':_0x2f92bd[_0x5c1bbb(0x279)],'runId':_0x2f92bd['runId'],'runnerId':_0xeb9ea5['id']});_0x2a3efb[_0x5c1bbb(0x26c)](_0x5c1bbb(0x120f));let _0x3a83d3=null;const _0x3e8324=new Promise((_0x5330c6,_0x22f7b4)=>{const _0x43b814=_0x5c1bbb,_0x360845=Math[_0x43b814(0x10bf)](0x1,_0x2f92bd[_0x43b814(0x9de)]?.[_0x43b814(0xb30)]??this[_0x43b814(0xb15)][_0x43b814(0xb30)]??0x1388),_0xa996f1=setTimeout(async()=>{const _0x5e5ed3=_0x43b814;this['_requestToRunner']['delete'](_0x27c7a8),_0xeb9ea5[_0x5e5ed3(0x11bb)]=!![];const _0x83465=new Error(_0x5e5ed3(0x1227)+_0x360845+'ms');_0x83465['code']=_0x5e5ed3(0xa8a);try{const _0x316943=await this['_restartRunner'](_0xeb9ea5);this[_0x5e5ed3(0x351)](_0x316943);}catch{}_0x22f7b4(_0x83465);},_0x360845);_0x3a83d3={'resolve':_0x2cf869=>{const _0x23fecd=_0x43b814;clearTimeout(_0xa996f1),_0x2a3efb['info'](_0x23fecd(0x1140),{'durationMs':Date[_0x23fecd(0x555)]()-_0x50474c}),_0x5330c6(_0x2cf869);},'reject':_0x4e83a9=>{const _0x215ff2=_0x43b814;clearTimeout(_0xa996f1),_0x2a3efb[_0x215ff2(0x225)](_0x215ff2(0x43e),{'err':_0x4e83a9[_0x215ff2(0xb4e)]}),_0x22f7b4(_0x4e83a9);},'onLog':typeof _0x2f92bd[_0x43b814(0x53f)]===_0x43b814(0x63b)?_0x2f92bd[_0x43b814(0x53f)]:null,'onJobAction':typeof _0x2f92bd[_0x43b814(0x336)]==='function'?_0x2f92bd['onJobAction']:null,'envName':_0x2f92bd[_0x43b814(0xa70)],'functionName':_0x2f92bd['functionName']},_0xeb9ea5[_0x43b814(0x178)][_0x43b814(0x211)](_0x27c7a8,_0x3a83d3);});this[_0x5c1bbb(0x1137)]['set'](_0x27c7a8,_0xeb9ea5),_0xeb9ea5[_0x5c1bbb(0xc45)]=_0x2f92bd;if(_0x2f92bd['dryRun'])_0xeb9ea5['dryRunActions']=[];try{_0xeb9ea5['child'][_0x5c1bbb(0x771)]({'type':_0x5c1bbb(0x110b),..._0x2f92bd,'requestId':_0x27c7a8});}catch{const _0x15cee8=await this[_0x5c1bbb(0xf60)](_0xeb9ea5);_0xeb9ea5['pending'][_0x5c1bbb(0x3b3)](_0x27c7a8),this[_0x5c1bbb(0x1137)][_0x5c1bbb(0x3b3)](_0x27c7a8),_0xeb9ea5[_0x5c1bbb(0xc45)]=null,_0xeb9ea5[_0x5c1bbb(0x3b9)]=null,_0xeb9ea5=_0x15cee8,_0xeb9ea5['busy']=!![],_0xeb9ea5[_0x5c1bbb(0xc45)]=_0x2f92bd;if(_0x2f92bd['dryRun'])_0xeb9ea5[_0x5c1bbb(0x3b9)]=[];_0xeb9ea5[_0x5c1bbb(0x178)][_0x5c1bbb(0x211)](_0x27c7a8,_0x3a83d3),this[_0x5c1bbb(0x1137)]['set'](_0x27c7a8,_0xeb9ea5),_0xeb9ea5['child'][_0x5c1bbb(0x771)]({'type':'run',..._0x2f92bd,'requestId':_0x27c7a8});}return _0x3e8324[_0x5c1bbb(0x39e)](()=>{const _0x229442=_0x5c1bbb;_0xeb9ea5[_0x229442(0xc45)]=null,_0xeb9ea5[_0x229442(0x3b9)]=null,_0xeb9ea5[_0x229442(0x178)][_0x229442(0x3b3)](_0x27c7a8),this['_requestToRunner'][_0x229442(0x3b3)](_0x27c7a8),this[_0x229442(0xc92)](_0xeb9ea5);});}async[_0x6e31fe(0x341)](_0x14816b){const _0x136751=_0x6e31fe,_0x4ef1d6=this['runners'][_0x136751(0xbdd)](_0x4b0da3=>_0x4b0da3[_0x136751(0x8f0)]&&!_0x4b0da3[_0x136751(0x269)]&&_0x4b0da3[_0x136751(0x92d)]===_0x14816b);if(_0x4ef1d6)return _0x4ef1d6['busy']=!![],_0x4ef1d6;const _0x1f83aa=this[_0x136751(0x174)]['some'](_0x276fa2=>_0x276fa2[_0x136751(0x92d)]===_0x14816b);if(this['runners'][_0x136751(0x156)]<this[_0x136751(0x451)]||!_0x1f83aa){const _0x3cc6f8=await this[_0x136751(0x1015)](this[_0x136751(0x174)][_0x136751(0x156)],_0x14816b);return _0x3cc6f8['busy']=!![],_0x3cc6f8;}return new Promise((_0x33a78b,_0x26eaf8)=>this[_0x136751(0x615)][_0x136751(0x597)]({'resolve':_0x33a78b,'reject':_0x26eaf8,'memoryMb':_0x14816b}));}[_0x6e31fe(0x351)](_0x4f56d6){const _0x385e77=_0x6e31fe,_0x150c02=this[_0x385e77(0x615)][_0x385e77(0x10e0)](_0x240928=>_0x240928[_0x385e77(0x92d)]===_0x4f56d6[_0x385e77(0x92d)]);if(_0x150c02>=0x0){_0x4f56d6[_0x385e77(0x269)]=!![];const [{resolve:_0x1d9822}]=this[_0x385e77(0x615)][_0x385e77(0x8ad)](_0x150c02,0x1);return _0x1d9822(_0x4f56d6),!![];}return![];}['_releaseRunner'](_0x18fadd){const _0x564d9c=_0x6e31fe;_0x18fadd['lastUsedAt']=Date[_0x564d9c(0x555)]();if(_0x18fadd[_0x564d9c(0x11bb)]){_0x18fadd['busy']=![];return;}!this[_0x564d9c(0x351)](_0x18fadd)&&(_0x18fadd[_0x564d9c(0x269)]=![]);}[_0x6e31fe(0x4a6)](){const _0x334327=_0x6e31fe;return this[_0x334327(0x174)]['filter'](_0x27beeb=>_0x27beeb[_0x334327(0x8f0)]&&!_0x27beeb[_0x334327(0x269)])[_0x334327(0x156)];}[_0x6e31fe(0x88e)](){const _0x16e1bd=_0x6e31fe,_0xe8c3fb=Date['now']();for(let _0x511c1d=this['runners']['length']-0x1;_0x511c1d>=0x0;_0x511c1d--){const _0x4ad564=this[_0x16e1bd(0x174)][_0x511c1d];if(_0x4ad564[_0x16e1bd(0x269)]||!_0x4ad564[_0x16e1bd(0x8f0)])continue;if(this[_0x16e1bd(0x4a6)]()<=this['minIdleRunners'])break;_0xe8c3fb-_0x4ad564[_0x16e1bd(0x73f)]>this['runnerIdleTimeout']&&(this['_stopRunner'](_0x4ad564),this[_0x16e1bd(0x174)][_0x16e1bd(0x8ad)](_0x511c1d,0x1));}}[_0x6e31fe(0x981)](){const _0x142d69=_0x6e31fe;this[_0x142d69(0x372)]=setInterval(()=>this[_0x142d69(0x88e)](),0x7530),this[_0x142d69(0x372)][_0x142d69(0xba4)]();}async[_0x6e31fe(0x1015)](_0x48a69c,_0x372b04){const _0x2d4227=_0x6e31fe,_0x4af98f=_0x2d4227(0x321)+(_0x48a69c+0x1),_0x1b0d07=[];Number['isFinite'](_0x372b04)&&_0x372b04>0x0&&_0x1b0d07['push'](_0x2d4227(0xad4)+Math[_0x2d4227(0x10bf)](0x20,Math[_0x2d4227(0xf9a)](_0x372b04)));const _0x1f2227=_0x256388(_0xb82342,[],{'stdio':[_0x2d4227(0x67f),_0x2d4227(0x67f),'ignore',_0x2d4227(0x11d9)],'execArgv':_0x1b0d07,'env':{...process.env,'OKDB_FUNCTION_DB_PATH':this[_0x2d4227(0xd4f)]['path'],'OKDB_FUNCTION_RUNNER_ID':_0x4af98f,'OKDB_FUNCTION_OPTIONS':JSON[_0x2d4227(0xf75)](this['runtimeDefaults'])}}),_0x4de3e4={'id':_0x4af98f,'child':_0x1f2227,'memoryMb':Number[_0x2d4227(0x2b5)](_0x372b04)&&_0x372b04>0x0?_0x372b04:null,'ready':![],'busy':![],'pending':new Map(),'stopping':![],'restartReason':null,'lastUsedAt':Date[_0x2d4227(0x555)]()};return _0x1f2227['on'](_0x2d4227(0xb4e),_0x235e51=>this[_0x2d4227(0x4cc)](_0x4de3e4,_0x235e51)),_0x1f2227['on'](_0x2d4227(0x5e6),(_0x220970,_0x224595)=>this['_onExit'](_0x4de3e4,_0x220970,_0x224595)),_0x1f2227['on'](_0x2d4227(0x225),_0x52ac3f=>this[_0x2d4227(0xe11)](_0x4de3e4,_0x52ac3f)),this[_0x2d4227(0x174)][_0x2d4227(0x597)](_0x4de3e4),!this[_0x2d4227(0x372)]&&this[_0x2d4227(0x981)](),await new Promise((_0x17ccaa,_0x41e8c0)=>{const _0x1d8993=_0x2d4227;_0x4de3e4[_0x1d8993(0x74e)]=_0x17ccaa,_0x4de3e4[_0x1d8993(0xb24)]=_0x41e8c0;}),_0x4de3e4;}['_onMessage'](_0x33430c,_0x1b90af){const _0x32e10c=_0x6e31fe;if(!_0x1b90af||typeof _0x1b90af!=='object')return;if(_0x1b90af['type']===_0x32e10c(0x8f0)){_0x33430c[_0x32e10c(0x8f0)]=!![],_0x33430c[_0x32e10c(0x74e)]?.(_0x33430c),_0x33430c[_0x32e10c(0x74e)]=null,_0x33430c['_rejectReady']=null;return;}if(_0x1b90af[_0x32e10c(0xaee)]===_0x32e10c(0x9be)){const _0x253f22=_0x33430c[_0x32e10c(0x178)][_0x32e10c(0xbeb)](_0x1b90af[_0x32e10c(0x116b)]),_0x1ea97b=this[_0x32e10c(0xd4f)][_0x32e10c(0x9be)][_0x32e10c(0xd9b)]({'feature':_0x32e10c(0x705),'env':_0x253f22?.['envName'],'fn':_0x253f22?.[_0x32e10c(0x279)],'runId':_0x1b90af[_0x32e10c(0xc2d)],'runnerId':_0x33430c['id']});_0x1ea97b[_0x32e10c(0x447)](_0x1b90af[_0x32e10c(0x674)][_0x32e10c(0x10b6)],_0x1b90af[_0x32e10c(0x674)][_0x32e10c(0xd33)],_0x1b90af[_0x32e10c(0x674)]['context']);const _0x815675={..._0x1b90af[_0x32e10c(0x674)],'meta':_0x1ea97b['_meta']};_0x253f22?.[_0x32e10c(0x53f)]?.(_0x815675);return;}if(_0x1b90af[_0x32e10c(0xaee)]==='job_heartbeat'||_0x1b90af[_0x32e10c(0xaee)]===_0x32e10c(0x1092)){const _0x21c8c2=_0x33430c[_0x32e10c(0x178)][_0x32e10c(0xbeb)](_0x1b90af[_0x32e10c(0x116b)]),_0xc6006b=_0x21c8c2?.[_0x32e10c(0x336)];if(_0xc6006b)try{_0xc6006b(_0x1b90af);}catch{}return;}if(_0x1b90af[_0x32e10c(0xaee)]===_0x32e10c(0xf71)){this[_0x32e10c(0xc4d)](_0x33430c,_0x1b90af)['catch'](()=>{});return;}const _0x1a4f19=_0x33430c[_0x32e10c(0x178)][_0x32e10c(0xbeb)](_0x1b90af[_0x32e10c(0x116b)]);if(!_0x1a4f19)return;if(_0x1b90af[_0x32e10c(0xaee)]===_0x32e10c(0x80e)){if(_0x33430c[_0x32e10c(0x92d)]!=null)_0x1b90af={..._0x1b90af,'meta':{..._0x1b90af[_0x32e10c(0x654)],'memoryMb':_0x33430c[_0x32e10c(0x92d)]}};if(_0x33430c[_0x32e10c(0xc45)]?.[_0x32e10c(0xc56)])_0x1b90af={..._0x1b90af,'dryRunActions':_0x33430c['dryRunActions']??[]};_0x1a4f19['resolve'](_0x1b90af);}else{if(_0x1b90af[_0x32e10c(0xaee)]==='error')_0x1a4f19['reject'](_0x3469c5(_0x1b90af['error']));else _0x1b90af[_0x32e10c(0xaee)]==='pong'&&_0x1a4f19[_0x32e10c(0x797)](_0x1b90af);}}async[_0x6e31fe(0xc4d)](_0x4281d4,_0xd78854){const _0x5a02aa=_0x6e31fe,{dbRequestId:_0x58121c,scope:_0x47a21d,method:_0x1a0ded,envName:_0x199f01,args:_0x24ca51}=_0xd78854;if(_0x4281d4['currentJob']?.['dryRun']&&_0x527a41(_0x47a21d,_0x1a0ded)){_0x4281d4[_0x5a02aa(0x3b9)][_0x5a02aa(0x597)]({'scope':_0x47a21d,'method':_0x1a0ded,'envName':_0x199f01,'args':_0x24ca51}),_0x4281d4[_0x5a02aa(0xd9b)][_0x5a02aa(0x771)]({'type':_0x5a02aa(0x62a),'dbRequestId':_0x58121c,'result':null},()=>{});return;}try{let _0x51efa1;if(_0x47a21d===_0x5a02aa(0x30b))_0x51efa1=this[_0x5a02aa(0xd4f)][_0x5a02aa(0x30b)](_0x199f01);else{if(_0x47a21d===_0x5a02aa(0x879))_0x51efa1=this[_0x5a02aa(0xd4f)]['env'](_0x199f01)['queue'];else{if(_0x47a21d==='files')_0x51efa1=this[_0x5a02aa(0xd4f)][_0x5a02aa(0x30b)](_0x199f01)[_0x5a02aa(0xf5b)];else{if(_0x47a21d===_0x5a02aa(0x917))_0x51efa1=this['okdb'];else throw new Error(_0x5a02aa(0x9ff)+_0x47a21d);}}}if(!_0x51efa1||typeof _0x51efa1[_0x1a0ded]!==_0x5a02aa(0x63b))throw new Error(_0x47a21d+'.'+_0x1a0ded+_0x5a02aa(0x9f5));let _0xcf0900=_0x51efa1[_0x1a0ded](..._0x24ca51||[]);if(_0xcf0900&&typeof _0xcf0900[_0x5a02aa(0x7db)]===_0x5a02aa(0x63b))_0xcf0900=await _0xcf0900;_0xcf0900!=null&&typeof _0xcf0900!==_0x5a02aa(0xf7a)&&typeof _0xcf0900[Symbol['iterator']]===_0x5a02aa(0x63b)&&(_0xcf0900=Array[_0x5a02aa(0x9f8)](_0xcf0900)),_0x4281d4[_0x5a02aa(0xd9b)][_0x5a02aa(0x771)]({'type':_0x5a02aa(0x62a),'dbRequestId':_0x58121c,'result':_0xcf0900},_0x36808d=>{});}catch(_0x414775){try{_0x4281d4[_0x5a02aa(0xd9b)][_0x5a02aa(0x771)]({'type':'db_error','dbRequestId':_0x58121c,'error':_0xbe2f4a(_0x414775)},_0x38d46e=>{});}catch{}}}['_onChildError'](_0x3262d8,_0x86565d){const _0xa73131=_0x6e31fe;for(const {reject:_0x51fe74}of _0x3262d8[_0xa73131(0x178)][_0xa73131(0x231)]())_0x51fe74(_0x86565d);_0x3262d8[_0xa73131(0x178)][_0xa73131(0x859)]();}['_onExit'](_0x885c22,_0x3fd0bb,_0x455614){const _0x24ae7c=_0x6e31fe,_0x45c8ea=_0x3fd0bb===0x86||_0x455614==='SIGABRT',_0x159509=_0x885c22[_0x24ae7c(0xeb7)]===_0x24ae7c(0x44f)?_0x24ae7c(0xd03):_0x45c8ea?_0x24ae7c(0x3a9)+(_0x885c22[_0x24ae7c(0x92d)]??0x80)+'\x20MB)':_0x24ae7c(0xeb)+_0x3fd0bb+_0x24ae7c(0xf3e)+_0x455614+')',_0x13163f=new Error(_0x159509);_0x13163f['code']=_0x885c22['restartReason']==='timeout'?_0x24ae7c(0xa8a):_0x45c8ea?_0x24ae7c(0x69e):'FUNCTION_RUNNER_EXIT';for(const {reject:_0x3bfac7}of _0x885c22[_0x24ae7c(0x178)][_0x24ae7c(0x231)]())_0x3bfac7(_0x13163f);_0x885c22[_0x24ae7c(0x178)][_0x24ae7c(0x859)](),_0x885c22['ready']=![],_0x885c22[_0x24ae7c(0xeb7)]=null,_0x885c22['_rejectReady']&&(_0x885c22[_0x24ae7c(0xb24)](_0x13163f),_0x885c22[_0x24ae7c(0x74e)]=null,_0x885c22[_0x24ae7c(0xb24)]=null),!_0x885c22[_0x24ae7c(0x109c)]&&this[_0x24ae7c(0x250)]&&this[_0x24ae7c(0x75e)](_0x885c22)[_0x24ae7c(0x415)](()=>{});}async[_0x6e31fe(0x75e)](_0x26f848){const _0x40d09c=_0x6e31fe,_0x1a6251=Math['max'](0x0,this['runners'][_0x40d09c(0x10b8)](_0x26f848));this['runners']=this[_0x40d09c(0x174)][_0x40d09c(0x1103)](_0x40b2f3=>_0x40b2f3!==_0x26f848);const _0x195613=await this[_0x40d09c(0x1015)](_0x1a6251,_0x26f848[_0x40d09c(0x92d)]);return this['_dispatchToWaiter'](_0x195613),_0x195613;}async[_0x6e31fe(0xf60)](_0x4db1b7){const _0x2153cc=_0x6e31fe;if(!this['runners'][_0x2153cc(0x29c)](_0x4db1b7))return this[_0x2153cc(0x1015)](this['runners'][_0x2153cc(0x156)],_0x4db1b7['memoryMb']);_0x4db1b7[_0x2153cc(0x109c)]=!![],_0x4db1b7[_0x2153cc(0xeb7)]=_0x2153cc(0x44f);const _0x7438b8=_0x4db1b7['memoryMb'],_0x39a03e=this[_0x2153cc(0x174)][_0x2153cc(0x10b8)](_0x4db1b7),_0x3d0704=new Promise(_0x27d22a=>{const _0x1da2a=_0x2153cc,_0x30bada=async()=>{const _0x2f9877=_0x47ab;_0x4db1b7[_0x2f9877(0xd9b)]['off'](_0x2f9877(0x5e6),_0x30bada),this[_0x2f9877(0x174)]=this[_0x2f9877(0x174)]['filter'](_0x1dfb40=>_0x1dfb40!==_0x4db1b7);const _0x197706=await this['_spawnRunner'](_0x39a03e>=0x0?_0x39a03e:this['runners'][_0x2f9877(0x156)],_0x7438b8);_0x27d22a(_0x197706);};_0x4db1b7[_0x1da2a(0xd9b)][_0x1da2a(0x1064)](_0x1da2a(0x5e6),_0x30bada);try{if(_0x4db1b7[_0x1da2a(0xd9b)][_0x1da2a(0x25e)]!==null)_0x30bada();else _0x4db1b7[_0x1da2a(0xd9b)][_0x1da2a(0x10e4)]();}catch{_0x30bada();}});return _0x3d0704;}async['_stopRunner'](_0xc910e7){const _0x297fbf=_0x6e31fe;_0xc910e7[_0x297fbf(0x109c)]=!![];if(!_0xc910e7['child'])return;await new Promise(_0x52b582=>{const _0x250ff1=_0x297fbf,_0x456fba=()=>_0x52b582();_0xc910e7['child'][_0x250ff1(0x1064)](_0x250ff1(0x5e6),_0x456fba);try{_0xc910e7[_0x250ff1(0xd9b)]['send']({'type':_0x250ff1(0x1fe)},_0x3c8990=>{const _0x45e1ac=_0x250ff1;if(_0x3c8990)try{_0xc910e7[_0x45e1ac(0xd9b)][_0x45e1ac(0x10e4)]();}catch{}});}catch{try{_0xc910e7[_0x250ff1(0xd9b)]['kill']();}catch{}}setTimeout(()=>{const _0x55a858=_0x250ff1;try{_0xc910e7[_0x55a858(0xd9b)][_0x55a858(0x10e4)]();}catch{}},0x7d0);});}}return okdbFunctionsPool=_0x31c2eb,okdbFunctionsPool;}var okdbFunctions,hasRequiredOkdbFunctions;function requireOkdbFunctions(){const _0x196309=_0xef8cd8;if(hasRequiredOkdbFunctions)return okdbFunctions;hasRequiredOkdbFunctions=0x1;const {randomUUID:_0x225494}=require$$0$3,{TYPE_FUNCTIONS:_0x5548e3,TYPE_FUNCTION_RUNS:_0x4abd67,normalizeFunctionRecord:_0x47cac1,normalizeFunctionRunRecord:_0x152826}=requireOkdbFunctionsRecords(),_0x37e2b5=requireOkdbFunctionsPool(),{validateFunctionSource:_0x349c67}=requireOkdbFunctionsValidate();class _0x4e3e02{constructor(_0x437b56,_0x108770={}){const _0x420dcf=_0x47ab;this['owner']=_0x437b56,this['_registryEnv']=_0x108770[_0x420dcf(0xba5)]??null,this[_0x420dcf(0x1028)]=_0x108770[_0x420dcf(0xa70)]??null,this[_0x420dcf(0x659)]=_0x108770[_0x420dcf(0xb15)]??{},this[_0x420dcf(0x874)]=null;}get[_0x196309(0x30b)](){const _0x35d1b5=_0x196309;if(this[_0x35d1b5(0xd78)])return this[_0x35d1b5(0xd78)];if(this['owner']?.['name']&&this[_0x35d1b5(0xe9)]?.['db'])return this[_0x35d1b5(0xe9)];if(this[_0x35d1b5(0xe9)]?.[_0x35d1b5(0xc65)])return this[_0x35d1b5(0xe9)][_0x35d1b5(0xc65)];return null;}get[_0x196309(0xa70)](){const _0x25ed4f=_0x196309;return this[_0x25ed4f(0x1028)]??this[_0x25ed4f(0x30b)]?.['name']??null;}async[_0x196309(0x7b7)](){const _0x30e462=_0x196309,_0x385650=this[_0x30e462(0x30b)];if(!_0x385650)throw new Error(_0x30e462(0xa21));if(!_0x385650[_0x30e462(0x7c0)](_0x5548e3))await _0x385650['registerType'](_0x5548e3);if(!_0x385650[_0x30e462(0x7c0)](_0x4abd67))await _0x385650[_0x30e462(0xa39)](_0x4abd67);return _0x385650;}[_0x196309(0x95f)](){const _0x4399c2=_0x196309,_0x562227=this[_0x4399c2(0x30b)];if(!_0x562227)throw new Error(_0x4399c2(0xa21));if(!_0x562227['hasType'](_0x5548e3)&&!_0x562227['hasType'](_0x4abd67))return null;return _0x562227;}async[_0x196309(0x63e)](){const _0x44aa91=_0x196309,_0xc742a4=this[_0x44aa91(0x95f)]();if(!_0xc742a4||!_0xc742a4['hasType'](_0x5548e3))return[];const _0x60d4cc=[];for(const _0x21e112 of _0xc742a4[_0x44aa91(0x9ce)](_0x5548e3)){_0x60d4cc[_0x44aa91(0x597)]({'key':_0x21e112['key'],'value':_0x21e112[_0x44aa91(0x568)],'version':_0x21e112[_0x44aa91(0x45c)]});}return _0x60d4cc;}async[_0x196309(0xbeb)](_0xf5c32e){const _0xf3f4b2=_0x196309,_0x2d9c02=this[_0xf3f4b2(0x95f)]();if(!_0x2d9c02||!_0x2d9c02[_0xf3f4b2(0x7c0)](_0x5548e3))return null;return _0x2d9c02[_0xf3f4b2(0xbeb)](_0x5548e3,_0xf5c32e)??null;}async[_0x196309(0x725)](_0x3bdd6b){const _0x379e99=_0x196309,_0x10263d=await this[_0x379e99(0x7b7)](),_0x25821d=_0x10263d[_0x379e99(0xbeb)](_0x5548e3,_0x3bdd6b?.[_0x379e99(0x1173)]);if(_0x25821d)throw new Error(_0x379e99(0xb53)+_0x3bdd6b[_0x379e99(0x1173)]);const _0x1061a3=_0x47cac1(_0x3bdd6b,{'defaults':this[_0x379e99(0x659)]});return await _0x10263d[_0x379e99(0x92c)](_0x5548e3,_0x1061a3['name'],_0x1061a3),_0x1061a3;}async['update'](_0x53c7ee,_0x32ee17={}){const _0x27edc7=_0x196309,_0xc9c0c=await this['_ensureRegistry'](),_0x90ce0=_0xc9c0c[_0x27edc7(0xbeb)](_0x5548e3,_0x53c7ee);if(!_0x90ce0)throw new Error('Function\x20not\x20found:\x20'+_0x53c7ee);const _0x2c0f03=_0x47cac1({..._0x32ee17,'name':_0x53c7ee},{'previous':_0x90ce0,'defaults':this[_0x27edc7(0x659)]});return await _0xc9c0c[_0x27edc7(0x92c)](_0x5548e3,_0x2c0f03[_0x27edc7(0x1173)],_0x2c0f03),_0x2c0f03;}async[_0x196309(0x21e)](_0xb1cdd){const _0x340637=_0x196309,_0x2ec0f7=await this[_0x340637(0x7b7)](),_0x329c40=_0x2ec0f7['get'](_0x5548e3,_0xb1cdd);if(!_0x329c40)return![];return await _0x2ec0f7[_0x340637(0x21e)](_0x5548e3,_0xb1cdd),!![];}async['listRuns']({functionName:functionName=null}={}){const _0x36ec75=_0x196309,_0x543783=this['_readRegistry']();if(!_0x543783||!_0x543783[_0x36ec75(0x7c0)](_0x4abd67))return[];const _0x582306=[];for(const _0x357cbc of _0x543783[_0x36ec75(0x9ce)](_0x4abd67)){_0x582306[_0x36ec75(0x597)]({'key':_0x357cbc['key'],'value':_0x357cbc['value'],'version':_0x357cbc[_0x36ec75(0x45c)]});}return functionName?_0x582306[_0x36ec75(0x1103)](_0x42a7b0=>_0x42a7b0['value']?.[_0x36ec75(0x279)]===functionName):_0x582306;}async[_0x196309(0xc2f)](_0x4b4e0b){const _0x4fbda1=_0x196309,_0x1aa8bf=this[_0x4fbda1(0x95f)]();if(!_0x1aa8bf||!_0x1aa8bf[_0x4fbda1(0x7c0)](_0x4abd67))return null;return _0x1aa8bf[_0x4fbda1(0xbeb)](_0x4abd67,_0x4b4e0b)??null;}async[_0x196309(0x9ac)](_0x2ce703={}){const _0x4674f8=_0x196309,_0x29fd6d=await this['_ensureRegistry'](),_0x4f9edc=_0x2ce703[_0x4674f8(0x279)]?_0x29fd6d[_0x4674f8(0xbeb)](_0x5548e3,_0x2ce703[_0x4674f8(0x279)]):null,_0x3676a2=_0x2ce703['id']??_0x225494(),_0x1de889=_0x152826({..._0x2ce703,'id':_0x3676a2,'metadata':{..._0x2ce703[_0x4674f8(0x670)]||{},'env':this['envName'],'functionVersion':_0x2ce703[_0x4674f8(0x670)]?.[_0x4674f8(0xb60)]??_0x4f9edc?.[_0x4674f8(0x45c)]??null}},{'scope':_0x4674f8(0x30b),'envName':this[_0x4674f8(0xa70)]});return await _0x29fd6d['put'](_0x4abd67,_0x3676a2,_0x1de889),_0x1de889;}async[_0x196309(0x731)](){const _0x19cd15=_0x196309;if(!this['_pool']){const _0x31102d=this[_0x19cd15(0xe9)]?.['options']?.[_0x19cd15(0x705)]??this['_runtimeDefaults']??{},_0x2cc999=_0x31102d[_0x19cd15(0x451)];this[_0x19cd15(0x874)]=new _0x37e2b5(this[_0x19cd15(0xe9)][_0x19cd15(0xd4f)]??this[_0x19cd15(0xe9)],{'maxRunners':_0x2cc999,'runtimeDefaults':{'memoryMb':0x20,..._0x31102d,...this[_0x19cd15(0x659)]}});}return await this[_0x19cd15(0x874)][_0x19cd15(0xa00)](),this[_0x19cd15(0x874)];}async[_0x196309(0x1fe)](){const _0x543db1=_0x196309;await this['_pool']?.[_0x543db1(0x1fe)]?.(),this[_0x543db1(0x874)]=null;}async['run'](_0xa25401,_0x4a588e=null,_0x4b63b3={}){const _0xa499f5=_0x196309,{dryRun:dryRun=![],..._0x19e05d}=_0x4b63b3,_0x4d8c5f=await this[_0xa499f5(0x7b7)](),_0x56fe6b=_0x4d8c5f[_0xa499f5(0xbeb)](_0x5548e3,_0xa25401);if(!_0x56fe6b)throw new Error('Function\x20not\x20found:\x20'+_0xa25401);if(_0x56fe6b[_0xa499f5(0x951)]===![]){const _0x17c8eb=new Error(_0xa499f5(0xf80)+_0xa25401);_0x17c8eb[_0xa499f5(0x1f8)]=_0xa499f5(0xa94);throw _0x17c8eb;}const _0x42e42e=_0x19e05d['recordRuns']??_0xa499f5(0xf09),_0x41acd8=_0x42e42e==='all',_0x3e543a=_0x42e42e==='all',_0x48d41d=_0x42e42e!=='none',_0xd70e18=_0x41acd8?await this[_0xa499f5(0x9ac)]({'functionName':_0xa25401,'status':_0xa499f5(0x94e),'request':{'payload':_0x4a588e,'trigger':_0x4b63b3[_0xa499f5(0x5c3)]??_0xa499f5(0xb5c),'requestedAt':Date[_0xa499f5(0x555)]()},'execution':{'timeoutMs':_0x56fe6b[_0xa499f5(0x9de)]?.[_0xa499f5(0xb30)]??this[_0xa499f5(0x659)][_0xa499f5(0xb30)]??0x1388,'memoryMb':_0x56fe6b[_0xa499f5(0x9de)]?.['memoryMb']??this[_0xa499f5(0x659)][_0xa499f5(0x92d)]??0x20},'metadata':{'env':this['envName'],'functionVersion':_0x56fe6b[_0xa499f5(0x45c)]}}):_0x152826({'id':_0x225494(),'functionName':_0xa25401,'status':_0xa499f5(0x94e),'request':{'payload':_0x4a588e,'trigger':_0x4b63b3['trigger']??_0xa499f5(0xb5c),'requestedAt':Date[_0xa499f5(0x555)]()},'execution':{'timeoutMs':_0x56fe6b[_0xa499f5(0x9de)]?.[_0xa499f5(0xb30)]??this[_0xa499f5(0x659)][_0xa499f5(0xb30)]??0x1388,'memoryMb':_0x56fe6b[_0xa499f5(0x9de)]?.[_0xa499f5(0x92d)]??this[_0xa499f5(0x659)]['memoryMb']??0x20},'metadata':{'env':this[_0xa499f5(0xa70)],'functionVersion':_0x56fe6b['version']}},{'scope':_0xa499f5(0x30b),'envName':this[_0xa499f5(0xa70)]}),_0x10a08f=await this[_0xa499f5(0x731)](),_0x3b5c23=[];try{const _0x2ea105=await _0x10a08f[_0xa499f5(0x110b)]({'runId':_0xd70e18['id'],'scope':_0xa499f5(0x30b),'envName':this[_0xa499f5(0xa70)],'unsafe':_0x56fe6b[_0xa499f5(0x74d)]===!![],'functionName':_0x56fe6b[_0xa499f5(0x1173)],'version':_0x56fe6b['version'],'hash':_0x56fe6b['hash'],'script':_0x56fe6b[_0xa499f5(0x549)][_0xa499f5(0x1091)],'payload':_0x4a588e,'runtime':_0x56fe6b['runtime'],'info':_0xd70e18[_0xa499f5(0x6f8)],'dryRun':dryRun,'jobContext':_0x19e05d[_0xa499f5(0xa6a)]??null,'processorContext':_0x19e05d[_0xa499f5(0x700)]??null,'materializerContext':_0x19e05d[_0xa499f5(0x385)]??null,'onLog'(_0x4b8743){const _0x58c094=_0xa499f5;_0x3b5c23[_0x58c094(0x597)](_0x4b8743);},'onJobAction':typeof _0x19e05d[_0xa499f5(0x336)]===_0xa499f5(0x63b)?_0x19e05d['onJobAction']:null}),_0x1207f1=_0x152826({..._0xd70e18,'status':_0xa499f5(0x7ca),'execution':{..._0xd70e18[_0xa499f5(0xf81)],'runnerId':_0x2ea105['meta']?.[_0xa499f5(0x493)]??null,'startedAt':_0x2ea105[_0xa499f5(0x654)]?.[_0xa499f5(0x8a0)]??null,'finishedAt':_0x2ea105[_0xa499f5(0x654)]?.[_0xa499f5(0x1112)]??null,'durationMs':_0x2ea105[_0xa499f5(0x654)]?.['durationMs']??null,'memoryMb':_0x2ea105[_0xa499f5(0x654)]?.['memoryMb']??_0xd70e18['execution']?.[_0xa499f5(0x92d)]??null},'result':{'value':_0x2ea105['result']??null,'truncated':![]},'logs':_0x3b5c23},{'scope':_0xa499f5(0x30b),'envName':this[_0xa499f5(0xa70)]});_0x3e543a&&await _0x4d8c5f[_0xa499f5(0x92c)](_0x4abd67,_0xd70e18['id'],_0x1207f1);if(dryRun)_0x1207f1[_0xa499f5(0x80e)][_0xa499f5(0x3b9)]=_0x2ea105[_0xa499f5(0x3b9)]??[];return _0x1207f1;}catch(_0x1d1314){const _0x360eaf=_0x1d1314?.[_0xa499f5(0x1f8)]===_0xa499f5(0xa8a)?_0xa499f5(0x44f):'error',_0x2f9295=_0x152826({..._0xd70e18,'status':_0x360eaf,'error':{'message':_0x1d1314?.['message']||String(_0x1d1314),'code':_0x1d1314?.[_0xa499f5(0x1f8)]||null,'details':_0x1d1314?.[_0xa499f5(0x933)]||null,'stack':_0x1d1314?.[_0xa499f5(0x56e)]||null},'logs':_0x3b5c23},{'scope':_0xa499f5(0x30b),'envName':this[_0xa499f5(0xa70)]});_0x48d41d&&await _0x4d8c5f['put'](_0x4abd67,_0xd70e18['id'],_0x2f9295);_0x1d1314[_0xa499f5(0x8e3)]=_0x2f9295;throw _0x1d1314;}}async[_0x196309(0x763)](_0x104649={},_0x51fa8e=null,_0xcd47f={}){const _0x5be677=_0x196309,_0x2fd2d1=_0xcd47f[_0x5be677(0xc56)]===!![],_0x1d615f=_0x47cac1(_0x104649,{'defaults':this[_0x5be677(0x659)]});if(_0x1d615f[_0x5be677(0x951)]===![]){const _0x3bce43=new Error(_0x5be677(0xf80)+(_0x1d615f['name']||_0x5be677(0xba1)));_0x3bce43['code']=_0x5be677(0xa94);throw _0x3bce43;}const _0x6be3ef=_0x349c67(_0x1d615f['script']?.['source']??_0x104649?.['source']??'',{'allowFetch':_0x1d615f[_0x5be677(0x9de)]?.[_0x5be677(0x207)]!==![],'filename':_0xcd47f['filename']}),_0x4661e7=_0x152826({'id':_0xcd47f['runId']??_0x225494(),'functionName':_0x1d615f[_0x5be677(0x1173)]||_0xcd47f[_0x5be677(0x279)]||'__draft__','status':_0x5be677(0x94e),'request':{'payload':_0x51fa8e,'trigger':_0xcd47f[_0x5be677(0x5c3)]??_0x5be677(0x763),'requestedAt':Date[_0x5be677(0x555)]()},'execution':{'timeoutMs':_0x1d615f['runtime']?.[_0x5be677(0xb30)]??this['_runtimeDefaults'][_0x5be677(0xb30)]??0x1388,'memoryMb':_0x1d615f['runtime']?.[_0x5be677(0x92d)]??this[_0x5be677(0x659)]['memoryMb']??0x20},'metadata':{'env':this['envName'],'functionVersion':_0x1d615f[_0x5be677(0x45c)]??null,'preview':!![]}},{'scope':'env','envName':this[_0x5be677(0xa70)]}),_0x5825a2=await this['_poolForRun'](),_0x3e6f27=[],_0xf03769=await _0x5825a2['run']({'runId':_0x4661e7['id'],'scope':_0x5be677(0x30b),'envName':this['envName'],'unsafe':_0x1d615f[_0x5be677(0x74d)]===!![],'functionName':_0x1d615f[_0x5be677(0x1173)]||_0xcd47f[_0x5be677(0x279)]||_0x5be677(0xaf1),'version':_0x1d615f['version']??null,'hash':_0x6be3ef['hash'],'script':_0x6be3ef['source'],'payload':_0x51fa8e,'runtime':_0x1d615f[_0x5be677(0x9de)],'dryRun':_0x2fd2d1,'jobContext':_0xcd47f[_0x5be677(0xa6a)]??null,'processorContext':_0xcd47f[_0x5be677(0x700)]??null,'materializerContext':_0xcd47f[_0x5be677(0x385)]??null,'info':{..._0x4661e7[_0x5be677(0x6f8)],'preview':!![]},'onLog'(_0x384841){const _0x40f9fc=_0x5be677;_0x3e6f27[_0x40f9fc(0x597)](_0x384841);}}),_0x5833d9=_0x152826({..._0x4661e7,'status':'success','execution':{..._0x4661e7[_0x5be677(0xf81)],'runnerId':_0xf03769[_0x5be677(0x654)]?.[_0x5be677(0x493)]??null,'startedAt':_0xf03769[_0x5be677(0x654)]?.[_0x5be677(0x8a0)]??null,'finishedAt':_0xf03769['meta']?.[_0x5be677(0x1112)]??null,'durationMs':_0xf03769['meta']?.['durationMs']??null},'result':{'value':_0xf03769[_0x5be677(0x80e)]??null,'truncated':![]},'logs':_0x3e6f27},{'scope':_0x5be677(0x30b),'envName':this[_0x5be677(0xa70)]});if(_0x2fd2d1)_0x5833d9[_0x5be677(0x80e)][_0x5be677(0x3b9)]=_0xf03769[_0x5be677(0x3b9)]??[];return _0x5833d9;}}return okdbFunctions=_0x4e3e02,okdbFunctions;}var okdbEngines={'exports':{}},okdbEngineAffinity,hasRequiredOkdbEngineAffinity;function requireOkdbEngineAffinity(){if(hasRequiredOkdbEngineAffinity)return okdbEngineAffinity;hasRequiredOkdbEngineAffinity=0x1;const {OKDBError:_0x558db3}=requireOkdbError();function _0xafb8d8(_0x42af27,{field:_0x540ccb,nullWhenMissing:nullWhenMissing=![],defaultValue:defaultValue=[]}={}){const _0x56b283=_0x47ab;if(_0x42af27==null)return nullWhenMissing?null:[...defaultValue];if(!Array[_0x56b283(0x10f5)](_0x42af27))throw new _0x558db3(_0x540ccb+_0x56b283(0xa80),_0x56b283(0xb0f),{'field':_0x540ccb,'value':_0x42af27});const _0x1eeed3=[],_0x23c312=new Set();for(const _0x321eed of _0x42af27){if(typeof _0x321eed!==_0x56b283(0xf7a))throw new _0x558db3(_0x540ccb+_0x56b283(0xa80),_0x56b283(0xb0f),{'field':_0x540ccb,'value':_0x42af27});const _0x1897b9=_0x321eed[_0x56b283(0xf4d)]();if(!_0x1897b9||_0x23c312[_0x56b283(0x9d0)](_0x1897b9))continue;_0x23c312[_0x56b283(0x33c)](_0x1897b9),_0x1eeed3[_0x56b283(0x597)](_0x1897b9);}return _0x1eeed3;}function _0x261841(_0x1813ac){const _0x34931d=_0x47ab;return _0xafb8d8(_0x1813ac,{'field':_0x34931d(0x54a),'nullWhenMissing':!![]});}function _0x2d3e03(_0x203b0b){const _0x592315=_0x47ab;return _0xafb8d8(_0x203b0b,{'field':_0x592315(0x35b),'nullWhenMissing':![],'defaultValue':[]});}function _0x3fdc62(_0x25b9cd,_0x1f4f9c){const _0x24eef9=_0x47ab,_0x173af4=_0x261841(_0x25b9cd);if(_0x173af4==null)return!![];const _0x195d4b=new Set(_0x2d3e03(_0x1f4f9c));return _0x173af4[_0x24eef9(0x244)](_0x50401d=>_0x195d4b[_0x24eef9(0x9d0)](_0x50401d));}return okdbEngineAffinity={'normalizeAffinity':_0x261841,'normalizeNodeTags':_0x2d3e03,'affinityMatchesTags':_0x3fdc62},okdbEngineAffinity;}var okdbEngineTemplates,hasRequiredOkdbEngineTemplates;function _0x523f(){const _0x3479e4=['INDEX_READY','maxTokenLength','Get\x20a\x20canonical\x20function\x20template\x20as\x20a\x20starting\x20point.\x20Templates\x20use\x20the\x20correct\x20ctx.env\x20API\x20and\x20demonstrate\x20best\x20practices\x20(txn\x20for\x20bulk\x20writes,\x20return\x20counts\x20for\x20verification).\x20Available\x20templates:\x20','env_type_pipeline_stop','job\x20type\x20not\x20found','env_engine_template_create','queue_types','materializer-engine','_restarting','Multi-bucket\x20rate\x20limiting.\x20Each\x20entry\x20claims\x20the\x20specified\x20tokens\x20from\x20the\x20named\x20bucket.','File\x20not\x20found:\x20','Actions:\x20list\x20(all\x20envs);\x20get\x20(info\x20on\x20one\x20env);\x20create\x20(name,\x20optional\x20sync,\x20compression,\x20mapSize);\x20','TXN_START','_ensureTypeOpen','dgram','fts:reset','target_type','_lock','_leaseKey','snapshotHead',']/files','targetType','_storage','Create\x20view','getOpenWarning','none','clocks','Preview\x20pipeline\x20template\x20plan','Snowflake\x20Arctic\x20Embed','PENDING','_makePipelineApi','clearRefViolation','root','require','LICENSE_ADDED','getValues','labelForEphemeral','List\x20foreign\x20key\x20violations','ipc','index_drop','VIEW_INVALID_NAME','embeddings_indexer_create','_getRecord','/api/embeddings/engines/:key/restart','_skipHttp','_algorithmFactories','Creates\x20a\x20materialized,\x20incrementally-maintained\x20view\x20over\x20a\x20source\x20type.\x20Required\x20body\x20fields:\x20type\x20(source\x20type,\x20must\x20be\x20registered),\x20reduce\x20(non-empty\x20map\x20of\x20output-field\x20→\x20reducer\x20spec).\x20Optional:\x20filter\x20(sift-style\x20filter\x20applied\x20to\x20source\x20docs\x20before\x20reducing),\x20map\x20(declarative\x20per-doc\x20transform\x20applied\x20before\x20reducers\x20see\x20the\x20doc).\x20Built-in\x20reducer\x20specs:\x20{\x20$count:\x20true\x20},\x20{\x20$sum:\x20\x22field\x22\x20},\x20{\x20$avg:\x20\x22field\x22\x20},\x20{\x20$min:\x20\x22field\x22\x20},\x20{\x20$max:\x20\x22field\x22\x20},\x20{\x20$countBy:\x20\x22field\x22\x20}\x20(grouped\x20output).\x20Add\x20{\x20items:\x20true\x20}\x20to\x20a\x20reducer\x20to\x20expose\x20source\x20docs\x20via\x20items()\x20on\x20the\x20result.\x20For\x20child\x20aggregations:\x20{\x20$ref:\x20{\x20type,\x20key,\x20filter?,\x20reduce\x20}\x20}\x20where\x20key\x20is\x20the\x20FK\x20field\x20on\x20the\x20child\x20type.\x20Map\x20operators:\x20plain\x20string\x20renames\x20a\x20field\x20(\x22storeName\x22:\x20\x22name\x22);\x20{\x20$ref:\x20[refType,\x20\x22$fkField\x22,\x20\x22targetField\x22]\x20}\x20looks\x20up\x20an\x20FK;\x20{\x20$concat:\x20[...]\x20};\x20{\x20$coalesce:\x20[...]\x20}.\x20Tip:\x20call\x20get_view_definition\x20on\x20an\x20existing\x20view\x20to\x20see\x20a\x20concrete\x20example.\x20Examples\x20—\x20simple\x20count:\x20{\x20name,\x20type:\x20\x22items\x22,\x20reduce:\x20{\x20count:\x20{\x20$count:\x20true\x20}\x20}\x20};\x20grouped\x20sum\x20with\x20filter\x20and\x20map:\x20{\x20name,\x20type:\x20\x22stores\x22,\x20filter:\x20{\x20active:\x20true\x20},\x20map:\x20{\x20region:\x20{\x20$ref:\x20[\x22regions\x22,\x20\x22$regionId\x22,\x20\x22name\x22]\x20}\x20},\x20reduce:\x20{\x20byRegion:\x20{\x20$countBy:\x20\x22region\x22\x20},\x20totalSales:\x20{\x20$sum:\x20\x22sales\x22\x20}\x20}\x20}.','setViolation','queue-worker-basic','ALL_EVENTS','options','_announceBlob','removeConfig','queue-worker\x20config\x20must\x20be\x20an\x20object','_getPeerState','\x27\x20must\x20be\x20a\x20number','List\x20environments','env_engine_delete','queue_clear_done_jobs','registerIndex','$within','Backup\x20database','_totalReadMs','resolveStoreEnv','Value\x20must\x20be\x20a\x20multiple\x20of\x20','generic_list_all','Get\x20processor','arrayBuffer','publicDir','/type/:type/indexes','writeIndexSync','embeddings_model_register','payload-or-self','api_key','vectorSearch','org','reconcile_peer','failed','item:create','Authentication\x20is\x20disabled\x20(open\x20mode)','getRecord','Rebuild\x20view','_jsonRpcError','_mcpApiDescribe','/admin/login/config','[files]\x20failed\x20to\x20pull\x20blob\x20','createWorker','pathname','range','/buckets','System\x20changelog','Returns\x20all\x20registered\x20secondary\x20indexes\x20for\x20a\x20type.','function\x20invoked','inputSchema','/auth/token','Query\x20type','readIndexSync','Env\x20config','signature','http://','Update\x20one\x20job','LICENSE_INVALID','annotate','cron_next','\x20\x20ג†’\x20\x20set\x20allowUnsafe:true\x20to\x20override.','handler_env','_leaseDb','Generic\x20dispatch\x20fallback:\x20route\x20a\x20call\x20to\x20any\x20OKDB\x20capability\x20via\x20{\x20capability,\x20action,\x20...args\x20}.\x20','item_get_ttl','patch\x20(env+type+key+patch{set,unset,inc,merge,append,pull},\x20optional\x20ifVersion\x20for\x20optimistic\x20concurrency\x20→\x20partial\x20update),\x20','Ollama\x20request\x20failed\x20(','function_get_template','heartbeat\x20requires\x20claim_id','listVectorStores','/admin/auth/start','/bucket/add/:bucket','Function\x20execution\x20timed\x20out\x20after\x20','lastPageNumber','POKE','link_remove','_bootPromise','Embeddings\x20indexer\x20that\x20calls\x20the\x20embedder\x20directly\x20in-process.','destructive','materializer\x20config.target_env\x20must\x20be\x20a\x20non-empty\x20string\x20when\x20provided','create_env','[admin]\x20backup\x20error:\x20','$max','_scheduleFlush','streamByHash','Embedder\x20name','/api/env/:env/type/:type/pipelines/:pipeline/snapshot','export','writeSync',':ref:','remote\x20node\x20did\x20not\x20return\x20valid\x20info','removeSync','Chunking\x20and\x20prepare\x20strategies\x20are\x20optional\x20and\x20apply\x20before\x20embedding.','tokenType','_coarseType','Preview\x20function\x20draft','getSecurityNotices','files_status','_jwksNegativeCache','Ollama\x20returned\x20HTTP\x20','Environment\x20name.\x20Defaults\x20to\x20\x22default\x22.','orders','Lists\x20items\x20that\x20have\x20a\x20TTL\x20set,\x20ordered\x20by\x20expiry\x20time\x20(soonest\x20first).\x20Optionally\x20filter\x20by\x20type.','OKDBIndexHasConsumersError','_systemToolNames','/api/env/:env/type/:type/pipelines/:pipeline/flush','Model\x20key,\x20e.g.\x20ollama:my-model','type:','/job/:id/complete','stopRefreshProc','\x20bytes','minTokenLength','VIEW_INVALID_REDUCER','clearType','function_run_list','embeddings_models_by_provider','get_type_deep_properties','_blobPath','TTL:\x20get_item_ttl/set_item_ttl/clear_item_ttl,\x20get_type_default_ttl/set_type_default_ttl/clear_type_default_ttl,\x20ttl_list,\x20ttl_stats,\x20ttl_sweep.\x20',';\x20HttpOnly','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','_claim','function_create_global','_rotateBucket','Invalid\x20MCP\x20session','_tokenSecret','_localhostSpec','\x20—\x20purged\x20','hasOwnProperty','Plugin\x20\x27','~local','Engine\x20disappeared\x20during\x20update:\x20','setStorageResolver','_envs','non-circular\x20$ref','typeStats','x-forwarded-host','embed','forceAfterMs','syncRefIndex','created_at','getIndex','newValue','_openEnvFromRecord','Login\x20username\x20\x27','licensee','Username\x20for\x20/auth/login\x20on\x20the\x20remote\x20node','legacy','Drop\x20type\x20schema','add_bucket','originMode','processor\x20config\x20must\x20be\x20an\x20object','Function\x20name','_lookupAllByName','articles','flushDelayMs','failures','Start\x20pipelines\x20via\x20okdb.env(name).pipelines.start(...)','reconcile,\x20reconcile_all,\x20reconcile_peer\x20(force\x20resync);\x20poke\x20(nudge\x20a\x20pull).\x20','syncPeers','includeChanges','JWT\x20not\x20yet\x20valid','batch','To\x20create\x20one,\x20set\x20action=\x22create_view\x22\x20and\x20pass\x20a\x20body\x20with:\x20name,\x20type\x20(source\x20type),\x20and\x20reduce\x20(output-field\x20→\x20reducer\x20spec,\x20e.g.\x20{\x20count:\x20{\x20$count:\x20true\x20},\x20total:\x20{\x20$sum:\x20\x22amount\x22\x20}\x20}).\x20','_snapshotDir','[vector-search]\x20catch-up:\x20applied\x20','Timeout\x20(ms)','Update\x20engine\x20declaration','Job\x20lifecycle\x20actions:\x20','mapSize','_buildAnnotations','ftsDb','arrayBuffers','\x20matches','trunc','tokenUrl','reduce','cosine','my-indexer','/api/processors/:id/pause','_buildStandaloneTools','Delete\x20custom\x20model','capability','List\x20engine\x20and\x20pipeline\x20templates','~emb:models','INDEX_NOT_REGISTERED','job.claim_expires\x20must\x20be\x20number|null','Proxies\x20to\x20the\x20configured\x20Ollama\x20server\x20and\x20returns\x20the\x20locally\x20available\x20models.','List\x20models\x20on\x20Ollama\x20embedder','.\x20Allowed:\x20','_formatValidationDetails','JWT\x20signature\x20verification\x20failed','File-blob\x20metadata\x20sync\x20(large\x20file\x20blobs\x20stored\x20alongside\x20docs\x20and\x20replicated\x20peer-to-peer).\x20','okdb\x20router\x20requires\x20both\x20capability\x20and\x20action','MISSING_PROCESSOR','queue:work','Rebuild\x20engine\x20(materializer)','snapshotEveryChanges','concurrency','Missing\x20peer\x20id','exec','_memberRuntime','<key:','owner','env_pipeline_get','Function\x20runner\x20exited\x20(code=','input','reverse','ieee-p1363','debug','/type/:type/changelog','cos','/api/env/:env/type/:type/pipelines/:pipeline/query','isNaN','generic-materializer','[engines]\x20duplicate\x20engine\x20key\x20\x22','_clearViolationsForType','[vector-search]\x20algorithm\x20stop()\x20error\x20for\x20','describeTypeDetailed','geo','/api/processors/cursor/:key','size','updateBucket','\x22\x20already\x20exists','L2\x20(Euclidean\x20squared)','files_list','handler_name','_indexReadyPromises','Sweep\x20expired\x20TTL\x20items','_buildIdentity','UNSAFE_CONFIG','expiry','managedIndexes','getResolvedOptions','sync_reconcile_peer','ref:violation_resolved','bucket.tokens\x20must\x20be\x20int\x20>=\x200','Truncates\x20the\x20target\x20type\x20and\x20re-materializes\x20from\x20the\x20source\x20change\x20log.','recordRuns','putDiff','toUTCString','List\x20engines\x20for\x20env','searchDocs','JWT\x20audience\x20mismatch','mapDef','/api/embeddings/models','stopHeartbeat','index:progress','Pipeline\x20name\x20(storage_key)','lifecycleSkipRoles','_reopenEnv\x20failed:\x20','/type/:type/index/:index/violations','snapshotTo','sourceKey','pow','image/jpeg','null','pipelines_list','isTypeEmpty','analytics:articles-ingest','Returns\x20all\x20stored\x20global\x20functions\x20(system\x20registry).','_copyDir','txn\x20op\x20must\x20be\x20an\x20object\x20or\x20tuple','MALFORMED_TOKEN','Not\x20Found','INVALID_INPUT','/api/engines/templates/:template/preview','Each\x20operation\x20is\x20{\x20action,\x20type,\x20key,\x20...\x20}:\x20','-worker','maxFlushBatch','includeStuckPending','PLUGIN_ALREADY_REGISTERED','VIEW_ALREADY_EXISTS','PREFER\x20the\x20dedicated\x20okdb_<capability>\x20tool\x20when\x20you\x20know\x20which\x20feature\x20you\x20want\x20(e.g.\x20okdb_data\x20action=\x22query\x22)\x20—\x20','Discovery:\x20list\x20(env-scoped\x20engine\x20summary),\x20template_list\x20/\x20template_get\x20/\x20template_preview\x20/\x20template_create.\x20','_loopDone','Unknown\x20ctx\x20property:\x20ctx.','list_functions','job_type.max_concurrency\x20must\x20be\x20int\x20>=\x201\x20or\x20null','latestSnapshotId','\x20must\x20specify\x20an\x20explicit\x20environment.','_registerOAuthAS','multipleOf','\x22,\x20','embedder_models','Create\x20function','byteLength','_undoHooks','_lane','job.tag\x20must\x20be\x20string|null','BAD_VECTOR_DIMS','\x22.\x20','config','prune','Engine\x20type','Embeddings\x20pipeline\x20\x22','expandRadius','fieldPath','Reset\x20engine\x20cursor','list_fts_indexes','FTS_RESET','processor_','generic_create','Value\x20must\x20be\x20','_inflightFlush','env_config','OKDB-SYNC-V1\x0a','getChanges','INDEX_ALREADY_REGISTERED','bucket.tokens\x20cannot\x20exceed\x20capacity','env_pipeline_template_create','subject','length','_lookupByName','_ensurePipelineRecord','Stops\x20then\x20restarts\x20all\x20engines\x20belonging\x20to\x20this\x20pipeline.\x20Useful\x20for\x20error\x20recovery.','token','setAuthTag','Executes\x20a\x20stored\x20function\x20with\x20an\x20optional\x20payload\x20in\x20the\x20specified\x20environment.','_closeForDrain','_create','mcp_api','run_transaction','onLicenseExpired','beforeWrite','update_token','/api/system/export','\x22\x20uses\x20queue\x20mode\x20but\x20typeEnv.queue\x20is\x20not\x20available','registerPreparer','body.vector\x20must\x20be\x20a\x20finite\x20number[]','sync:read','Rebuild\x20index','return\x20{\x20processed\x20}\x20for\x20verification','snapshot\x20id\x20required','markSnapshotComplete','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','OKDB-PIN-V1:','vector-search-flat','\x27\x20doesn\x27t\x20exist','.css','embeddings-queue-fake','INACTIVE','runners','bootSyncedPipelines','Name\x20of\x20the\x20embedder\x20engine\x20to\x20use.','txn\x20ops\x20must\x20be\x20an\x20array','pending','CREATING','embed-worker','okjs/','toFixed','node:events','providers','describeIndex','Function\x20script\x20must\x20evaluate\x20to\x20a\x20callable\x20function','claim\x20mismatch\x20for\x20job:\x20','OKDBSchemaCollectionError','cron','parts','\x22\x20requires\x20functions\x20in\x20env\x20\x22','startIndex','reconcileActivation','MIME\x20type','ttl_stats','cancel','_reopenPromise','parseInt','_scheduled','embedder_create','~queue_jobs','remove_env','Retry\x20engine\x20after\x20error','sync:write','/job-type/:type/drain','response','incoming','describeType','_lastTick','crypto','Count\x20items','Invalid\x20function\x20run\x20status:\x20','queue_cancel_job','Plugin\x20must\x20have\x20a\x20name','Value\x20must\x20be\x20one\x20of:\x20','feature','geoConfig','_evict','job.buckets\x20must\x20be\x20array|null','endKey','allowUnsafe','INVALID_INDEX_OPTIONS','clientName','Create\x20environment','Runtime\x20stats','/api/system/logs','Immediately\x20runs\x20a\x20GC\x20sweep,\x20deleting\x20changelog\x20entries\x20below\x20the\x20current\x20watermark\x20horizon.','public','getStatus','scrypt','Invalid\x20--open\x20spec:\x20must\x20be\x20boolean,\x20string,\x20or\x20string[]','prefix','x-okdb-nodeid','Source\x20type\x20the\x20view\x20reduces\x20over.\x20Must\x20already\x20be\x20registered.','Complete\x20job','Returns\x20schema\x20validation\x20violations\x20for\x20a\x20specific\x20type.','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22\x20instead.\x20',':meta','READY','loadavg','remove_bucket','REMOVE','SNAPSHOT.LOCK','isBuffer','ENGINE_NOT_LOADED','BAD_STATE','headers.','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','status_message','Index\x20must\x20be\x20a\x20non-empty\x20array','syncBlobs','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','getCursor','ref_violations_type','_ensured','validate_function','Forces\x20the\x20indexer\x20to\x20embed\x20all\x20pending\x20records\x20immediately.','/api/pipelines','system_emit_log','\x27,\x20factory)','_defaultProcessor','storage_key','committed','encrypted:\x20DB\x20requires\x20an\x20encryptionKey\x20but\x20none\x20was\x20provided','list_type_properties','queue-worker\x20config\x20patch\x20must\x20be\x20an\x20object','EMBEDDER','examples','get_item','anonymous','mcpEquivalent','_validateDefinition','sync-node','.svg','\x22\x20in\x20env\x20\x22','port','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','maxAge','effective','job\x20type\x20must\x20be\x20a\x20non-empty\x20string','(snapshot\x20clock:\x20','job_type.defaults.','item_changelog','Expected\x20type\x20','auth_token_update','engine\x20config\x20patch\x20not\x20supported\x20for\x20\x22','Returns\x20counts,\x20field\x20schemas,\x20and\x20index\x20status\x20for\x20a\x20single\x20type.','/api/queue','\x22\x20(required\x20by\x20worker\x20\x22','password','lastClock','/type/:type/count','FUNCTION_SCRIPT_FORBIDDEN_SYMBOL','BAD_QUERY','processor_pause','json','properties','Embedder\x20health','Create\x20or\x20update\x20a\x20data\x20link','FAILED','indexer-queue','createdBy','api','_resolveFilter','oldValue','code','_trackPending','add()\x20dims\x20mismatch:\x20expected\x20','text','Engine\x20name','ttl\x20must\x20be\x20a\x20positive\x20number\x20(milliseconds)','stop','Register\x20it\x20with\x20okdb.embeddings.registerEmbedderFactory(\x27','mime','env_type_pipeline_doc_get','content-type','Engine\x20update\x20failed\x20after\x20','_licenseInterval','The\x20rebuild\x20action\x20truncates\x20and\x20regenerates\x20owned\x20target\x20state.','materializer\x20config\x20must\x20be\x20an\x20object','allowFetch','dropForType','ENGINE_DRIVER_ALREADY_REGISTERED','Get\x20processor\x20cursor','path',':processor','allowDestructive','\x27\x20does\x20not\x20exist\x20in\x20type\x20\x27','Human-readable\x20token\x20label','ver','set','Returns\x20live\x20process\x20memory,\x20CPU\x20usage\x20(%\x20of\x20total\x20capacity\x20since\x20last\x20call),\x20uptime,\x20and\x20OS\x20metrics.','\x27\x20is\x20present','createDecipheriv','peers','processor:resumed',';\x20Expires=','_totalErrors','\x27\x20conflicts\x20with\x20existing\x20OKDB\x20property','The\x20raw\x20token\x20string\x20is\x20shown\x20ONLY\x20at\x20create_token\x20time\x20—\x20store\x20it\x20then.','_runMiddlewares','writeUInt8','isType','remove','SYSTEM_READY','jsonrpc','field','Bearer\x20token\x20accepted\x20by\x20the\x20remote\x20node','setup-app.js','Cannot\x20set\x20enforce\x20schema\x20on\x20','error','_drainHandler','readFileSync','processor\x20source','Returns\x20all\x20generic\x20pipeline\x20records\x20defined\x20in\x20the\x20specified\x20environment,\x20enriched\x20with\x20derived\x20runtime\x20health.','abort','/api/files','__rebuild__','embeddings_engine_stop','byIndex','aes-256-gcm','Unknown\x20prepare\x20strategy:\x20\x22','values','outputSchema','env_list','orchestrator','/admin/index.html#/docs','env_type_pipeline_doc_mark_fail','compileTimeoutMs','List\x20engine\x20types','fetch\x20blocked:\x20invalid\x20URL','_diffsDb','endIndex','PLUGIN_DEPENDENCY_MISSING','\x22\x20has\x20no\x20value','When\x20true,\x20all\x20writes\x20are\x20validated\x20against\x20the\x20schema\x20and\x20rejected\x20if\x20invalid','vector-search\x20config.','listTypes','known\x20field','Pipeline\x20engines\x20are\x20structurally\x20immutable\x20in\x20V1','Validation\x20failed:\x20','every','fts\x20rebuild\x20failed','prepare','_stopRunner','register_index','/api/processors','ordered-binary','bucket\x20not\x20found:\x20','embedder\x20config.type\x20required\x20(e.g.\x20\x22ollama\x22,\x20\x22openai\x22)','search\x20terms','oneOf','.\x20Valid:\x20','_started','indexer\x20\x22','Closes,\x20deregisters,\x20and\x20deletes\x20the\x20LMDB\x20data\x20files\x20for\x20a\x20named\x20environment.\x20Sub-environments\x20(embeddings\x20DBs,\x20etc.)\x20are\x20also\x20removed\x20by\x20default.\x20Pass\x20`keepSubEnvs`\x20as\x20a\x20comma-separated\x20query\x20param\x20to\x20preserve\x20specific\x20sub-environments\x20on\x20disk\x20—\x20they\x20become\x20orphaned\x20rather\x20than\x20deleted.\x20File\x20deletion\x20is\x20best-effort\x20—\x20locked\x20files\x20are\x20reported\x20in\x20`filesLocked`.\x20Only\x20\x22~system\x22\x20is\x20protected\x20and\x20cannot\x20be\x20removed.','nodes','The\x20server\x20is\x20running\x20in\x20open\x20access\x20mode\x20—\x20any\x20client\x20can\x20access\x20all\x20data\x20without\x20credentials.','removeJob','FUNCTION_SCRIPT_RESTRICTED_CTX_PROP','Auth','/api/env/:env/type/:type/pipelines/:pipeline/stop','mode','_nodeTags','regex','::1','ttl_list','exitCode','listRefViolations','okdb-queue-spawn-child.js',':\x20ping\x0a\x0a','lag','getUniqueViolations','HIGH_FREQ_EVENTS','get_env_changelog','tag\x20too\x20long','\x20which\x20does\x20not\x20exist','Starter\x20config\x20for\x20a\x20deterministic\x20source-to-target\x20materializer.','busy','Custom\x20reducer\x20name\x20must\x20start\x20with\x20\x22$\x22','flush','info','REQUEST_TIMEOUT','no-cache,\x20no-transform','Simple\x20exact\x20nearest-neighbor\x20vector\x20search\x20engine.','_resolvedAuthConfig','Returns\x20size,\x20clock,\x20types,\x20and\x20config\x20for\x20a\x20named\x20environment.','clearRefViolationsForKey','0\x20B','_onBeforeCommit','body.dims\x20must\x20be\x20a\x20positive\x20integer','markFail','Unknown\x20search\x20algorithm:\x20\x22','server','functionName','_isFree','clear_stuck','Token\x20ID','listLicenses','renameSync','Page\x20size,\x20default\x2050,\x20max\x20200','doc_retry','At\x20least\x20one\x20member\x20is\x20required','embed:indexer@default:articles','compare','image/x-icon','Optional\x20sift-style\x20filter\x20applied\x20to\x20source\x20docs\x20before\x20reducers\x20see\x20them.\x20Example:\x20{\x20status:\x20\x22active\x22,\x20amount:\x20{\x20$gte:\x2010\x20}\x20}.','Schema\x20must\x20have\x20a\x20definition\x20property','_licenseHash','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','[admin-catalog]\x20route\x20','aud','_isGeoShape','Returns\x20foreign\x20key\x20(ref)\x20violations\x20for\x20a\x20specific\x20type\x20—\x20dangling\x20references\x20where\x20the\x20target\x20document\x20does\x20not\x20exist.','OKDBSchemaValidationError','views_get_meta','_buildCapabilitySchema','Emit\x20a\x20test\x20warn\x20log\x20entry\x20(dev/verification\x20use\x20only)','_loginStates','logs','configureAuth','_ttlByExpiry','/api/env/:env/type/:type/pipelines/:pipeline/rebuild','index:drop','remove_view','models_by_provider','assign','markJobHeartbeat','_embedderSchemas','includes','\x20bytes,\x20need\x20>=\x2065)','addBucket','Compact\x20environment','Stored\x20function\x20that\x20returns\x20put/remove\x20ops.','unique:violation','drainJobType','nextLabel','register','list_runs','is\x20invalid','reconcile_all','Manage\x20materialized\x20views\x20(incremental\x20reductions\x20over\x20a\x20source\x20type).\x20','listStores','node:net','compression:\x20DB\x20created\x20with\x20','_initSharedBlobs','sweepExpiredTTL','data:read','Registered\x20embedder\x20factory\x20name,\x20e.g.\x20\x22ollama\x22\x20or\x20\x22openai\x22.','HNSW\x20algorithm\x20unavailable:\x20the\x20native\x20\x22hnswlib-node\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','STARTED','OpenAI\x203rd-gen\x20small\x20—\x20best\x20value','Array\x20of\x20operations\x20to\x20commit\x20atomically.\x20Each\x20item\x20shape:\x20{\x20action:\x20\x22put\x22|\x22update\x22|\x22patch\x22|\x22remove\x22,\x20type,\x20key,\x20value?\x20(put/update),\x20patch?\x20(patch\x20—\x20{\x20set,\x20unset,\x20inc,\x20merge,\x20append,\x20pull\x20}),\x20ifVersion?\x20}.','Add\x20bucket','isFinite','_resolveStorage','address\x20is\x20required','https://api.openai.com/v1','_pendingOps','stopProcessor','view','_ttlParseComposite','QUEUE_WORKER_JOB_TYPE_CONFLICT','_bucketIdx','createServer','Invalid\x20arguments\x20for\x20','Comma-separated\x20feature\x20names','PIPELINE_TEMPLATE_KIND_MISMATCH','balanced','Required\x20for\x20nearly\x20every\x20action:\x20env,\x20type.\x20','~ref_violations','engine_template_get','nomic-embed-text:v1.5','resetIndex','Unknown\x20action:\x20','_flushTimer','prefix\x20cannot\x20be\x20combined\x20with\x20startIndex/endIndex','Redirecting\x20to\x20login','setTtl','Cancel\x20job','Invalid\x20engine\x20status:\x20\x22','Search\x20FTS\x20index','noSync\x20+\x20useWritemap:\x20zero\x20durability\x20guarantees.','blob','updatedAt','Deprecated\x20alias\x20for\x20`template`\x20—\x20kept\x20for\x20HTTP\x20backwards\x20compatibility.\x20New\x20callers\x20should\x20use\x20`template`.','api_docs','Register\x20Type\x20Error:\x20','discoveryTtlMs','_mergePropertySchema',',\x20dims=','processor:\x20type\x20required','function_run','min','configExample','clockToChange','New\x20password','ENGINE_INVALID_STATUS','max_tries','Removes\x20the\x20TTL\x20from\x20an\x20item,\x20making\x20it\x20permanent.','Permissions:\x20array\x20of\x20\x22<namespace>:<operation>\x22\x20strings\x20(e.g.\x20\x22data:read\x22,\x20\x22data:write\x22,\x20\x22auth:write\x22);\x20','getSelfNode','_clearTTLEntry','Drain\x20a\x20job\x20type','default_retry_delay','FOREIGN_KEY_VIOLATION','closeIdleConnections','before','/job/:id/heartbeat','getIndexStatus','(root)','gc\x20sweep\x20failed','_migrateSystemDirs','lastIndexOf','hasUniqueViolations','queue_create_job_type','TIMEOUT','embed:','cli','_ringSize','Replays\x20source\x20changes\x20through\x20a\x20stored\x20function\x20and\x20applies\x20the\x20returned\x20put/remove\x20ops\x20to\x20a\x20target\x20type.','access','Delete\x20pipeline','async\x20(ctx)\x20=>\x20{\x0a\x20\x20const\x20items\x20=\x20[]\x0a\x20\x20for\x20(const\x20{\x20key,\x20value\x20}\x20of\x20ctx.env.getRange(\x27items\x27,\x20{}))\x20{\x0a\x20\x20\x20\x20items.push({\x20key,\x20value\x20})\x0a\x20\x20}\x0a\x0a\x20\x20let\x20processed\x20=\x200\x0a\x20\x20ctx.env.txn(t\x20=>\x20{\x0a\x20\x20\x20\x20for\x20(const\x20{\x20key,\x20value\x20}\x20of\x20items)\x20{\x0a\x20\x20\x20\x20\x20\x20t.put(\x27items\x27,\x20key,\x20{\x20...value,\x20updatedAt:\x20Date.now()\x20})\x0a\x20\x20\x20\x20\x20\x20processed++\x0a\x20\x20\x20\x20}\x0a\x20\x20})\x0a\x0a\x20\x20return\x20{\x20processed\x20}\x0a}','lockMode','authorizationUrl','false','job.','[embedder]\x20config.dims=','readOnlyHint','_snapshotPaths','OKDBTypeAlreadyRegisteredError','login\x20success','BAD_SPAWN','reconcile_batch_limit','accept','getIndexMeta','_env','\x20is\x20required','Your\x20account\x20is\x20not\x20authorized\x20to\x20access\x20this\x20instance','env','Clear\x20type\x20default\x20TTL','/api/env/:env/time-machine/:type/:key/history','FOREIGN_KEY_DELETE_RESTRICTED','_inspectRecord','\x22\x20not\x20found','processor:progress','job.max_tries\x20must\x20be\x20>=1\x20or\x20Infinity','clearRefViolationsForType','protected:read','pause',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','Drops\x20a\x20full-text\x20search\x20index\x20from\x20a\x20type.','_postJson','\x27\x20is\x20not\x20allowed','content-length','_maxSize','license:added','/admin','kind','cf-ray','_isLoopbackIp','fn-','List\x20pipelines\x20for\x20env','_runFlush','processor\x20config.lockMode\x20must\x20be\x20null\x20or\x20\x22exclusive\x22','Foreign\x20key\x20violation:\x20','.js','value\x20cannot\x20be\x20undefined.\x20Use\x20remove().','data:write','FORBIDDEN','embeddings_embedder_create','job\x20retry','group','getMany','ipv6','Engine\x20lifecycle:\x20engine_start,\x20engine_stop,\x20engine_restart,\x20engine_delete.\x20','invalid_scope','upsertLink','materializer\x20config.bootstrap\x20must\x20be\x20\x22snapshot\x22,\x20\x22log\x22,\x20or\x20null','_onAfterCommit','REF_VIOLATION','getStateAt','onJobAction','sync-gc','embeddings_storage_vector_get','context','embeddings_storage_list','Pipeline\x20references\x20missing\x20engines:\x20','add','validate','isLocation','snapshot','snowflake-arctic-embed','_acquireRunner','/type/:type/index/:index','Atomically\x20creates\x20one\x20or\x20more\x20engines\x20and\x20a\x20pipeline\x20record\x20that\x20groups\x20them.\x20On\x20failure,\x20already-created\x20engines\x20are\x20cleaned\x20up.','minimum','views_remove','Queue\x20embeddings\x20indexer','ttl','job.tags\x20must\x20be\x20array','computing','storeEnvName','_write','handler','bucket.updated\x20must\x20be\x20number','also\x20accepts\x20top-level\x20limit/cursor/fields\x20shortcuts\x20→\x20scan,\x20secondary-index,\x20FTS,\x20or\x20vector\x20search\x20depending\x20on\x20options);\x20','compact:\x20','recheck','_dispatchToWaiter','generic_scaffold','_totalRequests','_push','For\x20action=list.\x20tag:\x20tag\x20name;\x20search:\x20substring\x20match\x20on\x20id/summary/path;\x20mutating:\x20true=writes\x20only,\x20false=reads\x20only.','Remove\x20the\x20JSON\x20Schema\x20from\x20a\x20type.\x20Clears\x20all\x20schema\x20violations,\x20ref\x20violations,\x20and\x20the\x20foreign\x20key\x20ref\x20index\x20for\x20the\x20type.','HTTP\x20server\x20already\x20running','data.mdb','required','$concat','tags','decoded','_mergeFieldSchema','/admin/api/auth/permissions','Pipeline\x20not\x20found:\x20','fts_search','_ftsDbClosed','Blob\x20missing\x20for\x20file:\x20','_uniqueTokens','CREATED','Invalid\x20username\x20or\x20password','Delete\x20function','No\x20state\x20found\x20for\x20key\x20\x22','Get\x20type\x20schema','drop\x20(env+type\x20→\x20remove\x20the\x20schema,\x20leaves\x20data\x20intact);\x20','MetricKind','field\x20\x22','Removes\x20the\x20default\x20TTL\x20from\x20a\x20type.\x20New\x20items\x20will\x20no\x20longer\x20automatically\x20expire.','_openTTLDbs','_getNodeRecord','_gcTimer','registerAlgorithmFactory','TTL_EXPIRED','_reaperTimer','\x27\x20on\x20type\x20\x27',':snapshotComplete','generic-processor','HTTP\x20method\x20(for\x20describe/call).\x20E.g.\x20\x22GET\x22,\x20\x22POST\x22.','_resolveCapabilityAction','save','_totalWriteMs','time-machine:\x20error\x20processing\x20key\x20\x22','embedder','_openType','padEnd','enqueue\x20(env+jobType+payload,\x20optional\x20priority,\x20tags,\x20ttl,\x20max_tries,\x20retry_delay,\x20backoff_multiplier,\x20when\x20(delay/cron),\x20buckets);\x20','bytes','unknown\x20peer:\x20','ed25519','_cascadeRefRemove','installedAt','Embedder\x20engine\x20not\x20running:\x20\x22','materializerContext','allocUnsafe','failed_ttl','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','paths','_toError','live','_decRef','materializer\x20config.originMode\x20must\x20be\x20\x22self\x22,\x20\x22remote\x22,\x20or\x20\x22all\x22','Rebuilds\x20the\x20inferred\x20field\x20schema\x20for\x20a\x20type\x20by\x20scanning\x20all\x20records.','Dangerous:\x20grants\x20the\x20function\x20unrestricted\x20read/write\x20access\x20to\x20ALL\x20environments\x20via\x20ctx.okdb\x20(bypasses\x20the\x20per-env\x20scope).\x20Use\x20only\x20when\x20cross-env\x20orchestration\x20is\x20genuinely\x20required.','equals','Template\x20id\x20to\x20fetch.','env_type_pipeline_doc_mark_done','\x20origin=','_mergeCapabilityProperties','Database\x20already\x20started','cannot\x20cancel\x20job\x20with\x20status\x20\x22','sync_links_list','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','/api/env/:env/type/:type/pipelines/:pipeline/docs/:key/markFail','/api/processors/:id/retry','Custom\x20reducer\x20must\x20have\x20an\x20\x22apply\x22\x20function','ONLINE','Manage\x20per-type\x20JSON\x20Schemas\x20and\x20inspect\x20documents\x20that\x20violate\x20them.\x20','finally','Blob\x20availability\x20status','_reconcile','_violationsDb','_parkWrite','_license','chunks','fts:registered','Actions:\x20list\x20(type\x20names);\x20describe\x20(full\x20schema/index/processor\x20info\x20for\x20one\x20type);\x20','\x22\x20on\x20\x22','_inferEmbeddingsPipelineType','Function\x20runner\x20ran\x20out\x20of\x20memory\x20(limit:\x20','longitude','register_fts_index',':items:','default_backoff_multiplier','Minimal\x20function\x20boilerplate.\x20All\x20available\x20ctx\x20properties\x20are\x20shown\x20in\x20comments.','Starter\x20config\x20for\x20a\x20change-log\x20processor\x20backed\x20by\x20a\x20stored\x20function.','txn','_ttlSweepScheduled','job.buckets[].tokens\x20must\x20be\x20int\x20>=\x201','delete','Vector\x20store\x20stats','_openLocalPeerDb','Returns\x20the\x20JSON\x20Schema\x20definition\x20and\x20enforce\x20mode\x20for\x20a\x20type,\x20or\x20null\x20if\x20no\x20schema\x20is\x20set.\x20The\x20schema\x20may\x20include\x20foreign\x20key\x20ref\x20annotations\x20on\x20string\x20properties.','_fetchJwks','_openSpec','dryRunActions','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','item_patch',',\x20now\x20opening\x20with\x20','/api/sync/topology','⚠\x20No\x20external\x20service\x20needed.\x20Results\x20are\x20not\x20semantically\x20meaningful.','pool','queue_set_job_type_schema','_tryCatchUp','_doHooks','payload','started','/type/:type/fts',').\x20','login','Object\x20must\x20have\x20<=\x20','Returns\x20a\x20stored\x20global\x20(system)\x20function\x20by\x20name.','options.lmdb.useWritemap\x20changes\x20crash-atomicity\x20semantics.\x20Use\x20durability:\x22fast\x22\x20or\x20\x22custom\x22.','uninstall','_buildCapabilityIndex','set_type_default_ttl','._compact_','snowflake-arctic-embed2-m','randomBytes','_runRefBootstrapScans','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','engine_stop','uri','Inner\x20product','client_name','tokens','env_pipeline_start','join','/api/engines/types','TYPE_NOT_REGISTERED','getPrototypeOf','maximum','fromCharCode','queue-worker\x20config.handler.name\x20must\x20be\x20a\x20non-empty\x20string','dir','builtin','/stats','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','(required\x20by\x20indexer\x20\x22','_plugins','txn:end','auto_prune_types','ENGINE_SYSTEM_NOT_STARTED','/oauth/register','payload_schema','Action\x20to\x20perform\x20within\x20the\x20capability','queue_retry_job','captureStackTrace','makeKey','/api/embeddings/engines/:key/stop','Optional\x20explicit\x20dimensions\x20override','params','/api/engines/templates','queue:done','TYPE_ALREADY_REGISTERED','Source\x20type','sort','OIDC\x20discovery\x20missing\x20jwks_uri','header','LICENSE_HASH_MISMATCH','[admin]\x20export\x20stream\x20error:\x20','_chunkStatusType','type_get_default_ttl','Function\x20registry\x20env.\x20Defaults\x20to\x20the\x20engine\x20owning\x20env.','change','pageSize','cpuUsage','bucket','algorithms','kdb_admin_csrf','queue_job_type_sample_payloads','rebuildFromJobs','_viewState','ID\x20token\x20is\x20not\x20accepted','Probe\x20Ollama\x20server\x20for\x20available\x20models','Environment\x20\x22','Value\x20does\x20not\x20match\x20any\x20of\x20the\x20\x27oneOf\x27\x20schemas','MCP\x20Client','_reconcilingControl','jwksTtlMs','getKeys','sync_info','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','__nodePublicKey','protocol','/types','_computeRetryWhen','catch','definition\x20is\x20required\x20and\x20must\x20be\x20an\x20object','queue-worker\x20config.queue_env\x20must\x20be\x20a\x20non-empty\x20string\x20when\x20provided','[engines]\x20failed\x20to\x20start\x20','metric','.json','\x20must\x20be\x20null\x20|\x200\x20|\x20positive\x20integer','_returnTokens','scaffold','hnsw','snapshots','Deletes\x20a\x20stored\x20function\x20by\x20name.','Unknown\x20change\x20action:\x20','/job/:id/update','topology','VIEW_TYPE_NOT_REGISTERED','1214540eEfLfh','Delete\x20engine','~queue_buckets','enum','_writeTypeMeta','Engine\x20driver\x20missing\x20required\x20start()\x20method:\x20\x22','base_url','Time\x20machine\x20is\x20not\x20enabled\x20for\x20this\x20environment','CLEAR_DONE','files:write','DELETE','\x27\x20which\x20is\x20not\x20in\x20the\x20namespace\x20catalog','randomToken','addRaw','clearFailed','functions:read','/api/info','SYNC_SELF_MISSING','issuedAt','bigint','pattern','source_env','rename','schema_drop','bge-m3','function\x20threw','active','\x22.\x20Register\x20the\x20driver\x20first\x20with\x20engines.registerDriver().','_reconcilePeer','Read\x20a\x20documentation\x20file','_okdb','copy','resume','durationMs','_emit','_syncApplyFtsDrop','\x22:\x20','my_address','_deriveHealth','text/html','processDeleteCascade','\x20environment\x20not\x20found:\x20','timeout','types','maxRunners','applyChange','forceResync','migrate','clearTargetOnRebuild','[embed-worker]\x20permanently\x20failed\x20job\x20for\x20\x22','item:remove','subscribe','openSync','queue_try_claim_tokens','user','version','Returns\x20historical\x20log\x20entries\x20with\x20optional\x20filtering\x20by\x20level,\x20feature,\x20node,\x20and\x20time\x20range.\x20Supports\x20cursor-based\x20pagination.','listen','Peer\x20','search','fields','_reconciling','Request\x20body\x20for\x20call\x20(any\x20JSON\x20value,\x20or\x20null).','claim\x20requires\x20non-empty\x20type','permission','searchParams','OKDBInvalidIndexKeyError','/mcp/messages','allowMethods','LICENSE_FEATURE_DISABLED','pipeline','Run','.pre-compact','get_function_template','index:registered','relay','setDefaultTTL','allSettled','ref_violations\x20/\x20ref_violations_type\x20(broken\x20foreign-key\x20references).','isInteger','239.1.2.3','$avg','embeddings_embedder_health','[embedder]\x20stop()\x20error\x20for\x20','_patch','setMulticastLoopback','args','\x20|\x20','promises','engine_types_list','vector-search\x20\x22','system:clock_change','source_type','okdb-functions-runner-child.js','lease:','statusText','Embedder\x20engine\x20name\x20used\x20to\x20generate\x20vectors.','typesPerEnv','markJobComplete\x20failed\x20(claim\x20expired?)','okdb_session','codeChallenge','_resolveEnvOptions','/job-type/:type','sync_self_patch','[indexer]\x20','Returns\x20all\x20generic\x20pipeline\x20records\x20across\x20opened\x20environments,\x20enriched\x20with\x20derived\x20runtime\x20health\x20and\x20member\x20inspection\x20data.','/api/system/emit-log','_signedFetch','/mcp','Runs\x20an\x20unsaved\x20function\x20draft\x20in\x20the\x20sandbox\x20and\x20returns\x20the\x20execution\x20result\x20without\x20persisting\x20the\x20function\x20definition.','runnerId','/api/sync/poke','env_pipeline_create','\x22\x20cannot\x20run\x20because\x20\x22','applySchema','subs','outgoing','ensureType','_eventHandler','_resolveSearchApi','Item\x20changelog','Field\x20paths\x20to\x20index\x20for\x20full-text\x20search,\x20e.g.\x20[\x22name\x22,\x20\x22description\x22]','connectivity','ifVersion','REMOVED','removeLicense','OKDBInvalidValueError','function_delete','worker_threads','_idleRunnerCount','env_pipeline_scaffold','TXN_END','patchConfigSchema','_ensurePromise','x-okdb-bodyhash','__writeCounter','Returns\x20the\x20local\x20blob\x20status\x20table:\x20hash,\x20ref-count,\x20per-node\x20availability,\x20disk\x20size.','undefined','OAuth\x20callback\x20is\x20not\x20configured','body.query\x20must\x20be\x20a\x20non-empty\x20string','fts_drop','fixed','job.buckets[].id\x20must\x20be\x20non-empty\x20string','Multi-node\x20sync\x20cluster.\x20','Returns\x20relay\x20connection\x20and\x20buffer\x20statistics\x20for\x20the\x20event\x20stream\x20transport.','/ttl/sweep','stats_rebuild','/views/:name/start','Create\x20a\x20job\x20type','TXN_ERROR','Connect\x20to\x20remote\x20node','distance','\x27\x20must\x20be\x20an\x20array','resolveModelDims','Restart\x20pipeline','_makeLazyVectorAdapter','Token\x20label','readTransaction','keepNumbers','_typeEnv','ENGINE_INVALID_DRIVER','License\x20expired\x20or\x20invalidated','redirect_uri\x20must\x20be\x20a\x20localhost\x20/oauth/callback\x20URL\x20for\x20this\x20built-in\x20client','with\x20catalog\x20value\x20','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','fts_list','/api/embeddings/storage/:key/:doc_key','_onMessage','failJob','system:write','queue_add_bucket','Actions:\x20list_tokens;\x20get_token\x20(id);\x20create_token\x20(label,\x20permissions,\x20grants,\x20optional\x20ttl\x20ms);\x20update_token;\x20delete_token.\x20','Engine\x20driver\x20already\x20registered:\x20\x22','Upload\x20a\x20binary\x20file.\x20Pass\x20the\x20full\x20path\x20(incl.\x20filename)\x20via\x20?path=.\x20Content-Length\x20is\x20required.','auth_token_list','_normalizedActionName','lng','Use\x20call\x20to\x20fetch\x20/docs/manifest.json\x20then\x20individual\x20/docs/<file>.md\x20for\x20documentation,\x20','processor\x20config.failOnHandlerError\x20must\x20be\x20a\x20boolean\x20when\x20provided','some\x20vectors\x20may\x20be\x20missing\x20from\x20the\x20index:','nodeA','Stops\x20the\x20named\x20view\x20from\x20processing\x20new\x20changes.','timeMachine','ENGINE_ALREADY_EXISTS','operation','job_type.defaults\x20must\x20be\x20object|null','_blobsDir','efConstruction','Fake\x20(dev\x20/\x20testing)','final','_fail','no-store','Run\x20identifier','build','embeddings_engine_delete','body.name','jwks_uri','Bucket\x20name','image/svg+xml','__tokenSecret','maxClock','processor\x20config.bootstrap\x20must\x20be\x20\x22snapshot\x22,\x20\x22log\x22,\x20or\x20null','Default\x20TTL\x20in\x20milliseconds','mcp_api.call:\x20route\x20not\x20found\x20','-----BEGIN\x20CERTIFICATE-----\x0a','Resume\x20a\x20paused\x20or\x20draining\x20job\x20type','base64',':materializer','action=\x22remove\x22\x20→\x20no\x20extra\x20fields,\x20optional\x20ifVersion.','patch_item','isHealthy','store','self_update','Returns\x20all\x20API\x20tokens\x20(both\x20cluster\x20and\x20local).','job_type.payload_schema.enforce\x20must\x20be\x20boolean','node.id\x20is\x20required','isOAuthEmailAllowed','patternProperties','function_get','queue_remove_job','F32','indexer:','tokenSecret','_heartbeatIntervalMs','_findRouteByMethodPath','\x20day(s).','env_type_pipeline_query','getTotalHeadCount','Returns\x20all\x20active\x20LMDB\x20vector\x20store\x20keys.','Job\x20type\x20name','fts_reset','NO_EMBEDDER','/bucket/tryClaimTokens/:bucket','setup.html','job.tries\x20must\x20be\x20non-negative\x20int','OKDBError','/api/env/:env/ref-violations/:type','projectOrders','removeLink','_timer','Invalid\x20pipeline\x20status:\x20','algorithm-worker-thread.js','/mcp/sse','/api/env/:env/functions/:name/runs/:runId','installed','_normalizeName','doc\x20status\x20write\x20contention\x20(','owner_engine','missing_blob','sync_links_upsert','0.0.0','queue-worker\x20config.handler.recordRuns\x20must\x20be\x20\x22all\x22,\x20\x22errors\x22,\x20or\x20\x22none\x22','_buckets','auto_reconcile','\x27\x20is\x20required\x20when\x20\x27','Creates\x20or\x20updates\x20a\x20registered\x20job\x20type\x20by\x20name.','claims','authenticateToken','list_views','usearch\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','Cannot\x20delete\x20','/admin/session','Job\x20type\x20name\x20(path\x20param\x20for\x20PUT\x20/job-type/:type)','embeddings_model_delete','_updateFtsIndexes','sub','.html','tmDiff','importJSON',':emb:','::ffff:','priority','inc','ENGINE_RETRY_UNSUPPORTED','_listeners','Max\x20entries\x20to\x20return\x20(max\x201000)','/auth/login','listRoutes','This\x20is\x20risky\x20on\x20slow\x20disks\x20or\x20overloaded\x20machines.\x20Consider\x20increasing\x20staleLockMaxAgeMs\x20if\x20this\x20happens\x20frequently.','Optional\x20username\x20for\x20password\x20login','UNIQUE_VIOLATION','_bootstrap','onLog','[engines]\x20sync-start\x20failed\x20for\x20\x22','summary','.name','scan','Scaffolds\x20a\x20generic\x20pipeline\x20containing\x20one\x20queue-worker\x20engine.','indexer\x20config\x20must\x20be\x20an\x20object','_batchIndexDocs','_writeBlob','queue_get_job','script','affinity','system_metrics','_managedLifecycleRefs','notes','Starter\x20config\x20for\x20a\x20queue-backed\x20function\x20worker.','_getField','writes','failed\x20to\x20fetch\x20remote\x20info:\x20HTTP\x20','Pagination:\x20query\x20returns\x20last-row\x20key\x20as\x20cursor\x20(string);\x20pass\x20it\x20back\x20as\x20cursor\x20on\x20the\x20next\x20call.\x20','_readyPromises','ENV_OPENED','now','Set\x20or\x20replace\x20the\x20JSON\x20Schema\x20for\x20a\x20type.\x20The\x20definition\x20can\x20include\x20foreign\x20key\x20ref\x20annotations\x20(e.g.\x20`{\x20\x22ref\x22:\x20{\x20\x22type\x22:\x20\x22Author\x22,\x20\x22onDelete\x22:\x20\x22cascade\x22\x20}\x20}`)\x20on\x20string\x20properties.\x20When\x20enforce\x20is\x20true,\x20all\x20existing\x20documents\x20must\x20conform\x20or\x20the\x20call\x20will\x20be\x20rejected\x20with\x20a\x20409.','ctx.env.getRange(type,\x20opts)\x20—\x20paginated\x20scan','drop_index','Starts\x20all\x20stopped\x20engines\x20belonging\x20to\x20this\x20pipeline.','rebuild_index','GONE','/type/:type/fts/:ftsName/reset','_status','_listPeers','offset','Engine\x20template\x20not\x20found:\x20','Permissions\x20array','x-requested-with','apple-touch-icon.png','connectionCount','sync:peer','ctx.okdb\x20requires\x20unsafe:\x20true.\x20For\x20normal\x20env-scoped\x20reads\x20and\x20writes,\x20use\x20ctx.env\x20(for\x20example\x20ctx.env.txn(...))\x20instead.','Unknown\x20custom\x20function\x20error','value','addMembership','materializer\x20config.batchSize\x20must\x20be\x20a\x20positive\x20integer','/api/sync/info','hasIndex','UNIQUE_VIOLATION_RESOLVED','stack','Environment\x20not\x20found:\x20','embeddings_providers','cancelled','describe\x20—\x20full\x20operation\x20block\x20for\x20one\x20route\x20(schemas,\x20access,\x20safety,\x20mcpEquivalent\x20if\x20any);\x20','Data','_createAndBindSocket','validateRedirect','_resetInProgress','function_preview_global','platform','peerStalenessLimitDays','utf8','hex','queue_clear_stuck_jobs','Registers\x20a\x20connection\x20to\x20an\x20embedding\x20provider\x20(Ollama,\x20OpenAI,\x20etc.).\x20Embedders\x20are\x20global\x20�\x20shared\x20across\x20all\x20environments.','viewRefreshMs','.ndjson','Vector\x20indexer\x20engine','hydrateValues','refStopFns','toString','/api/sync/delta','\x20cf-ip=','_getViolationsDb','OKDB\x20not\x20opened','\x22\x20is\x20missing/null\x20on\x20doc\x20\x22','Job\x20type\x20name\x20(used\x20for\x20POST\x20/job-type)','delete_function','schema:read','startKey','Search','Mark\x20doc\x20done','__unique_violations','embeddings:indexer:flushed','count=','_ensurePeerState','_pipelineMembers','embedder@','jobId','Query-time\x20exploration\x20factor\x20(equivalent\x20to\x20efSearch).','push','host','Get\x20function\x20template','consumer','_ackDb','Env\x20info','/type/:type/unique-violations','Index-time\x20exploration\x20factor\x20—\x20higher\x20=\x20better\x20quality,\x20slower\x20writes.','_createViewHandler','Invalid\x20clock\x20value:\x20','ENGINE_DRIVER_MISSING_START','File\x20id','SEARCH','Patch\x20target\x20must\x20be\x20a\x20plain\x20object','fetch','embeddings:indexer:doc:queued','listRecords','fail','Get\x20token','unique_violations','Token\x20not\x20found','List\x20buckets','action=\x22update\x22\x20→\x20also\x20pass\x20value\x20(full\x20doc),\x20optional\x20ifVersion\x20(rejects\x20if\x20key\x20absent);\x20','getLoginConfig','_snapshotBuild','embeddings_engine_start','signingInput','keyToLabel','__nodePrivateKey',':clockToChange','</strong>\x20is\x20requesting\x20access\x20to\x20your\x20OKDB\x20instance.</div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20class=\x22err\x22\x20id=\x22err\x22>','Direct\x20engine-instance\x20management\x20for\x20engines\x20NOT\x20wrapped\x20by\x20a\x20pipeline\x20(lower\x20level\x20than\x20okdb_pipeline).\x20','Scheduling\x20priority\x20(higher\x20=\x20sooner).\x20Default\x200.','Changelog\x20endpoints\x20(get_item_changelog,\x20get_type_changelog)\x20use\x20a\x20numeric\x20clock\x20cursor\x20instead\x20—\x20pass\x20the\x20integer\x20back\x20as\x20cursor.\x20','~files','Index\x20name\x20or\x20field\x20path,\x20~-separated\x20for\x20composite\x20indexes','_extractText','_getTypeMapSafe','$near','get_view','/api/env/:env/type/:type/pipelines/:pipeline/nearest','some\x20chunks\x20failed','HTTP_','/api/env/:env/time-machine/enable','trigger','rawStream\x20missing','\x20is\x20not\x20exposed\x20to\x20MCP\x20(audiences\x20must\x20include\x20\x27mcp\x27)','_options','Writable','embeddings_engine_restart','_onStop','tries','doc_mark_delete','count\x20(env+type,\x20same\x20filter\x20contract\x20as\x20query\x20→\x20integer);\x20','uuid','/api/env/:env/pipelines/scaffold','Re-arms\x20an\x20engine\x20that\x20is\x20in\x20an\x20error\x20state\x20after\x20its\x20handler\x20or\x20startup\x20failed.','email','_getRef','INVALID_FTS','drivers','INVALID_VALUE','indexKey','_registerAuthGuard','\x20declares\x20permission\x20\x27','VIEW_REF_UNSUPPORTED_REDUCER','when','job_type','ENGINE_TEMPLATE_NOT_FOUND','/api/system/import','docs','_readNDJSON','Work','Stops\x20all\x20engines\x20(indexer,\x20search,\x20worker)\x20belonging\x20to\x20this\x20pipeline.','statuses','env_pipeline_stop','snapshot\x20incomplete:\x20','search_fts_index','_ensureVectorStore','exit','_openRefTrackingDb','wrong_node','~sync_links','getClock','_findStandaloneRoute','\x20fetching\x20blob\x20','_normalizeConfig','_getEnv','transactionSync','session','pop','unique\x20items','/api/files/blobs/','Create\x20global\x20function','Invalid\x20activation\x20token:\x20','keysOnly','FUNCTION_SCRIPT_COMPILE_FAILED','Initiates\x20join\x20+\x20handshake\x20with\x20a\x20one-time\x20credential.\x20After\x20join,\x20ongoing\x20sync\x20authenticates\x20via\x20Ed25519\x20(publicKey\x20stored\x20in\x20~sync_nodes\x20�\x20no\x20token\x20needed\x20in\x20config).','mxbai-embed-large','_sampleAndWalk','INVALID_INDEX','memory','Nomic\x20Embed\x20Text\x20v1.5','writeUInt16BE','):\x20','Sync\x20blobs\x20from\x20peers','Restart\x20engine','Optional\x20materializer\x20context\x20for\x20ctx.materializer\x20in\x20materializer-engine\x20previews.','targetKey','[embedder]\x20dims\x20probe\x20failed\x20for\x20','arr','_templateInputSchema','Embedder\x20factory\x20for\x20\x22','data_link','sqrt','_store','stopwords','Hash\x20mismatch:\x20expected\x20','doc\x20\x22','ENGINE_INVALID_TYPE','userId','PUBLIC_KEY_PEM','Default\x20TTL\x20must\x20be\x20a\x20positive\x20number\x20(milliseconds)','item_get','OKDBEngine','Mark\x20doc\x20failed','_waiters','set\x20(env+type+definition,\x20optional\x20enforce=true|false\x20→\x20install\x20or\x20update);\x20','authenticateRequest','runGc','reload','runtimeDeclarations','Algorithm\x20worker\x20not\x20running','Get\x20item\x20TTL','write','Max\x20items\x20to\x20remove\x20per\x20sweep','draining','Rebuild\x20queue\x20stats','_registrations','reconcilePeer','createEmbedder','Username\x20and\x20password\x20are\x20required','Updates\x20a\x20stored\x20global\x20(system)\x20function\x20definition\x20and\x20metadata.','vector-search\x20engine\x20not\x20running:\x20\x22','/api/env/:env/type/:type/pipelines/:pipeline/docs/:key/markDone','readUInt32BE','ENV_PROTECTED','db_result','durability:\x22strict\x22\x20is\x20contradicted\x20by\x20options.lmdb.noSync\x20/\x20noMetaSync.','Broadcast\x20reconcile','\x20missing\x20path\x20field\x20in\x20inputSchema:\x20','vector\x20dims\x20mismatch:\x20expected\x20','_saveSnapshotComplete','_broadcast','\x22\x20in\x20store\x20\x22','forEach','\x22.\x20Valid\x20values:\x20','getDiffsInRange','Samples\x20records\x20and\x20returns\x20dot-notation\x20paths\x20with\x20coarse\x20types.\x20Geo-shaped\x20objects\x20({lat,lon})\x20are\x20tagged\x20\x22geo\x22.\x20Cached\x20by\x20type\x20clock\x20—\x20free\x20to\x20call\x20repeatedly.','Arrow\x20function\x20source\x20code\x20to\x20validate','ENGINE_CONFIG_PATCH_UNSUPPORTED','race','Queue\x20types','Referenced\x20type\x20\x27','function','_pipelineRecordMeta','\x20already\x20registered','list','Unknown\x20method\x20','Pings\x20the\x20embedding\x20provider\x20to\x20check\x20it\x20is\x20reachable.','/reconcile','DEFAULT_EVENTS','ITEM_REMOVE','token_use','violations_list_type','Bulk\x20delete\x20failed\x20jobs','Environments','INDEXER_READY','model_delete','\x20cannot\x20be\x20changed\x20—\x20recreate\x20the\x20engine\x20to\x20change\x20it','index:ready','valid','event','Engine\x20not\x20loaded:\x20','Unknown\x20error','_getControlEnv','_processor','Returns\x20env-scoped\x20engine\x20summaries\x20for\x20the\x20specified\x20environment.\x20Optional\x20query\x20parameter\x20`type`\x20narrows\x20the\x20result\x20set\x20to\x20one\x20engine\x20type.','safety','meta','setJobTypeSchema','middlewares','_heartbeat','_updateDoc','_runtimeDefaults','get_type_changelog','engine_templates_list','actual','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','env_type_pipeline_create','/auth/login/select','function_update_global','isHeld','license:invalid','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','Required\x20for\x20patch.\x20Same\x20shape\x20as\x20item_patch.patch.','dropType','localeCompare','Use\x20a\x20stored\x20function\x20handler;\x20inline\x20code\x20is\x20not\x20part\x20of\x20engine\x20config\x20itself.','draft.okdb-function.js','Imports\x20a\x20raw\x20NDJSON\x20export\x20stream\x20into\x20one\x20or\x20more\x20environments.','/api/env/:env/time-machine/status','get_env_function_run','_ready','existsSync','_recordEnvCreated','use','metadata','text\x20produced\x200\x20chunks','MISSING_FUNCTIONS','Changelog\x20GC\x20status','entry','createHmac','Returns\x20all\x20foreign\x20key\x20(ref)\x20violations\x20across\x20all\x20types\x20in\x20the\x20environment.\x20These\x20are\x20dangling\x20references\x20where\x20the\x20target\x20document\x20does\x20not\x20exist.','actions','plugins','detach','Create\x20pipeline','\x20from\x20','Remove\x20the\x20--open\x20flag\x20and\x20create\x20tokens\x20via\x20the\x20Auth\x20section\x20for\x20production\x20use.','OKDBVersionMismatchError','/admin/index.html','ignore','rebuild_fts_index','/optional/path/to/file.pdf','Pipeline\x20already\x20exists:\x20','transaction','_releaseLease','instance','_ttl_enabled','createHash','metrics','TTL\x20in\x20milliseconds','/api/env/:env/functions/:name/run','WAITING','materializer\x20\x22','expiresIn','Invalid\x20client\x20or\x20redirect_uri','default_bucket_tokens','\x20must\x20be\x20a\x20non-empty\x20string','List\x20schema\x20violations','job.idempotency_key\x20must\x20be\x20string|null','LICENSED_BUILD','Function\x20name\x20must\x20match\x20/^[A-Za-z0-9._-]+$/','inherit','LICENSE_ACTIVATION_INVALID','baseUrl','paragraph','minItems','Get\x20a\x20registered\x20job\x20type','sync_reconcile','listBlobStatus','description','FUNCTION_OOM','keep-alive','verifyCookie','\x22).\x20Start\x20it\x20first.','removeEnvironment','~proc:lease','drain','/api/env/:env/engines/:type/:name/rebuild','engineMeta','Bulk-insert\x20records\x20in\x20a\x20transaction.\x20Returns\x20write\x20count\x20for\x20verification.','Job\x20ID','updated_at','responseStatuses','headClock','isEnabled','$ref','INDEX_HAS_CONSUMERS','ENGINE_NOT_RUNNING','/type/:type/item/:key','default_ttl','uniqueItems','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','drop_type','function_validate','Remove\x20payload\x20schema\x20from\x20a\x20job\x20type','_typeName','Content-Type','licenseHash','resetView','authorization_endpoint','X-OKDB-Timestamp','iss','clearDefaultTTL','setTTL','\x20provider.','embeddings-inline-fake','_processKey','jsonrpcCode','ENGINE_DRIVER_NOT_REGISTERED','Index','No\x20violation\x20for\x20','ENGINE_NOT_FOUND','_validatePrimaryKey','permissions','(?:/(.*))?$','(must\x20match\x20the\x20indexer\x27s\x20job_type\x20—\x20convention:\x20\x22embed:indexer@<name>\x22)','raw','uninstallEngine','Unauthorized','TTL\x20must\x20be\x20a\x20positive\x20number\x20(milliseconds)','processor_cursor_get','_logEnv','_scheduleTTLSweep','alg','/api/sync/self','BAD_VECTOR','_dropType','List\x20TTL\x20entries','system_runtime','toMs','primaryKey','Get\x20function','300448KJeAGT','chunkHash','Cannot\x20reach\x20peer\x20','haversine','Flush\x20pipeline\x20indexer','_lockPath','onAfterCommit','matchesLocalNodeAffinity','sync_peers','tokenHash','warning','writerLockMaxAgeMs','Preview\x20global\x20function\x20draft','Function\x20script\x20exceeds\x20','embeddings_embedder_models','/api/env/:env','invalid\x20index\x20name\x20in\x20change\x20log','Optional\x20explicit\x20embedding\x20dimensions.','exportEnvsToStream','ftsToDb','time-machine:\x20could\x20not\x20acquire\x20writer\x20lock,\x20another\x20process\x20is\x20active','work','template_get','Cancelled\x20by\x20admin','cidr','_ensureType','[embedder]\x20started\x20','/api/embeddings/search','request','hash','patchSelf','start_error','__view:','env_engine_resume','unsupported_response_type','_requiredForCapabilityAction','processorContext','indexer\x20config.source_type\x20required','Earliest\x20run\x20timestamp\x20(ms).\x20Defaults\x20to\x20now.','hnsw\x20algorithm\x20requires\x20dims\x20>\x200','onEnqueue','functions',';\x20Secure','/functions','\x22\x20—\x20','closeAllConnections','/api/system/backup','OKDBTypeNotRegisteredError','Missing\x20plugin:\x20','processor\x20config.hydrateValues\x20must\x20be\x20a\x20boolean\x20when\x20provided','Applies\x20a\x20structured\x20partial\x20update\x20to\x20an\x20existing\x20item\x20by\x20type\x20and\x20key.','maxElements','markJobProgress','ITEM_CREATE','\x20more)','resetFts','authorization','\x20documents\x20fail\x20validation','treeBranchPageCount','open','_incRef','PUT','Draft\x20function\x20name\x20override','activateLicense','\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20','materializer-basic','readUInt16BE','txn:start','createSocket','limits','_flushLocks','body.indexer\x20required','tools/call:okdb:','create','self','loadSnapshot','engine\x20\x22','54gJNHsz','_clearTTL','application/manifest+json;\x20charset=utf-8','post','sync_gc_run','_invokeRoute','Returns\x20all\x20registered\x20embedding\x20provider\x20schemas\x20(used\x20to\x20render\x20the\x20create\x20form).','openDB','_poolForRun','Invalid\x20CIDR\x20address:\x20','_reconnectDelayMs','gc\x20timer\x20sweep\x20failed','_kdb','errors','updateJob','worker','text-embedding-ada-002','/api/engines/templates/:template','hostname','Reset\x20processor\x20cursor','\x27\x20is\x20already\x20in\x20use\x20by\x20token\x20\x22','setNoDelay','lastUsedAt','\x22\x20conflicts\x20with\x20a\x20built-in\x20reducer','missing','unique_violations_list','_reopenResolve','List\x20pipelines\x20for\x20env+type','_sync','okdb_','_resolveReopen','ENGINE_RESET_CURSOR_UNSUPPORTED','pathParams','_getDeepSchema','autoHeartbeat','/admin/*','unsafe','_resolveReady','Creates\x20a\x20new\x20type\x20in\x20the\x20selected\x20environment.','Try\x20claim\x20tokens','_enforceIdentity','restrict',']/queue','createAndStartEngine','Blob\x20on\x20disk\x20has\x20no\x20~files\x20record\x20in\x20any\x20env\x20(hash:\x20','License\x20limit\x20exceeded:\x20','label','maxScore','handleEmailJob','/oauth/token','/type/:type/item/:key/changelog','[vector-search]\x20stopped\x20','refill_amount','_replaceRunner','_registerBuiltinFactories','building','DELETED','Tokenizer\x20settings\x20(optional)','preview','Required\x20to\x20call\x20routes\x20marked\x20safety.destructive=true.','job.type','order_projection','Time\x20machine\x20not\x20available\x20for\x20environment\x20\x22','bootSyncedEngines','Permanently\x20removes\x20running\x20jobs\x20whose\x20claim\x20TTL\x20has\x20expired.','Get\x20global\x20function','totalmem','/docs','_sockets','Update\x20self\x20node','_getJobBuckets','keyToChange','send','treeLeafPageCount','MODELS','unique','materializer\x20config.source_type\x20must\x20be\x20a\x20non-empty\x20string','Expands\x20a\x20registered\x20generic\x20or\x20embeddings\x20pipeline\x20template\x20and\x20executes\x20it\x20in\x20the\x20target\x20environment.','field\x20to\x20exist','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','doesExist','Available\x20algorithms\x20are\x20discoverable\x20through\x20/api/embeddings/algorithms\x20or\x20okdb_embeddings\x20{\x20action:\x20\x22algorithms\x22\x20}.','View\x20definition\x20must\x20be\x20an\x20object','getPeerAcks','Reconcile\x20queue','\x22.\x20Register\x20custom\x20strategies\x20via\x20okdb.embeddings.registerPreparer(name,\x20fn).','queue_update_job_type','_migrateIdentity','bootstrap','~queue_stats',':worker','views_get','disabled','affinity_mismatch','done','/api/env/:env/type/:type/pipelines/:pipeline/docs/:key/retry','FTS\x20index\x20already\x20exists:\x20','INDEX_REGISTERED','stale','clear_failed','TYPE_PIPELINES','total_chunks','doc_status:','_detachConsole','/api','queue_mark_job_fail','_addIndexConsumer','_gcIntervalMs','Accept\x20peer\x20join','endpoint','resolve','error_stack','algorithm\x20factory\x20name\x20required','~schema_violations','embeddings_models','startClock','function_run_env','List\x20vector\x20stores','isFeatureEnabled','TYPE_REGISTERED','clearViolation','_rootDb','/functions/template','Cluster\x20ops:\x20join\x20(address+token\x20→\x20attach\x20this\x20node\x20to\x20an\x20existing\x20cluster),\x20connect\x20(peer-to-peer\x20link),\x20self_update;\x20','expansionSearch','env_type_pipeline_stats','embed-worker\x20config\x20must\x20be\x20an\x20object','JWT\x20issuer\x20mismatch','\x22\x20tokens\x20must\x20be\x20>=\x201','generic_stop','maxDbs','sameSite','List\x20functions\x20and\x20inspect\x20their\x20source.','retryFailed\x20is\x20only\x20available\x20in\x20queue\x20mode','getUniqueViolation','probe','auto\x20(grows\x20as\x20needed)','redirectUri','Stored\x20function\x20name\x20to\x20invoke\x20for\x20each\x20job.','://','Source\x20env\x20name.\x20Defaults\x20to\x20the\x20engine\x20owning\x20env.','action=\x22patch\x22\x20→\x20also\x20pass\x20patch\x20({\x20set,\x20unset,\x20inc,\x20merge,\x20append,\x20pull\x20}),\x20optional\x20ifVersion;\x20','_ensureRegistry','latitude','\x20(required\x20by\x20','Circular\x20$ref:\x20','Source\x20type\x20name','x-okdb-timestamp','client_id\x20mismatch','schema:write','job\x20failed','hasType','references','SYNC_BAD_PEER','dropExisting','Schema\x20must\x20be\x20an\x20object\x20with\x20{\x20definition,\x20enforce\x20}','createWriteFacade','BAD_EMBEDDER_FACTORY','BAD_GATEWAY','itemsDbs','load','success','Bucket\x20actions:\x20list_buckets,\x20add_bucket\x20(env+bucket+tokens),\x20update_bucket,\x20remove_bucket,\x20try_claim_tokens\x20(env+bucket+tokens).\x20','\x20(expected:\x20','doc_mark_fail','issuer','Function\x20script\x20may\x20not\x20reference\x20','job.finished\x20must\x20be\x20number|null','~__global','cors','pipelines','model','processor\x20config.handler.name\x20must\x20be\x20a\x20non-empty\x20string','clearViolationsForIndex','Database\x20not\x20started','clearStuck','\x22.\x20Expected\x20one\x20of:\x20','tmp','then','_removeConsumerFromAllIndexes','getSchema','You\x20can\x20shadow\x20it\x20by\x20creating\x20a\x20custom\x20entry\x20with\x20the\x20same\x20key.','getCount','writeUInt32BE','remove\x20(env+type+key\x20→\x20delete).\x20','Returns\x20execution\x20ledger\x20entries\x20for\x20a\x20stored\x20function.','pollInterval','AUTH_MODE_OPEN','/api/env/:env/pipelines/:pipeline/stop','_capabilityNameForTool','Readable','true','Loads\x20a\x20vector\x20index\x20for\x20one\x20storage\x20key\x20and\x20serves\x20nearest-neighbor\x20queries\x20using\x20a\x20chosen\x20search\x20algorithm.','access-control-max-age','Processor\x20handlers\x20receive\x20ctx.payload\x20as\x20an\x20array\x20of\x20changes.',';\x20received:\x20','/api/env/:env/pipelines/:pipeline','Engine\x20type\x20(processor,\x20materializer,\x20queue-worker,\x20…)','force','\x20(originMode=remote)','embeddings','address','exclusive','View\x20definition\x20must\x20include\x20a\x20\x22type\x22\x20field','/admin/','attachConsole','0123456789ABCDEFGHJKMNPQRSTVWXYZ','list_properties','recompute_type_fields','features','attachOKDB','algorithm','fetchPeer','getCatchUp','invalid','Unknown\x20transaction\x20action:\x20','/admin/setup','files_blob_sync','Use\x20path\x20\x22/docs/manifest.json\x22\x20to\x20discover\x20the\x20doc\x20tree,\x20then\x20fetch\x20individual\x20files\x20like\x20\x22/docs/querying.md\x22.','item:update','\x20items','Unsupported\x20JWT\x20alg:\x20','_markDone','_acquireLease','_authOptions','txn:rollback','_emitState','views_start','/retryFailed','result','METHOD_NOT_ALLOWED','LICENSE_EXPIRED_ACTION','\x22\x20is\x20already\x20consuming\x20job\x20type\x20\x22','Shared\x20embedding\x20provider\x20engine','[vector-search]\x20snapshot\x20catch-up\x20failed\x20for\x20\x22','_ownWriters','ENGINE_STORE_NOT_SET','degraded','ReplayCache','maxProperties','Engine\x20name\x20is\x20required','engineType','violation_get','Batch\x20transaction','Authorization','_reopenTimer','HEAD','retryJob','credentials','env:removed','matchAny','engine_template_preview','_closeReadTransaction','setHeader','processor:\x20handler\x20required','Engine\x20key','_oidcDiscoveryCache','getVector','\x20cannot\x20contain\x20undefined\x20values','Upload\x20file','socket','areIndexesReady','algorithm_config','delta_limit','item_delete','WRITER.LOCK','OKDBPipelines','call','time-machine:\x20flush\x20error','text/event-stream;\x20charset=utf-8','\x20\x20ג€¢\x20','_nodePublicKey','function_update','definition','maxLength','index_reset','List\x20violations\x20for\x20a\x20unique\x20index','system','getTime','UNAUTHORIZED','use\x20ctx.env.txn\x20for\x20atomic\x20bulk\x20writes','_getTypeMap','vector-search\x20config.dims\x20must\x20be\x20a\x20positive\x20integer\x20if\x20provided','token_endpoint','Update\x20global\x20function','Updates\x20editable\x20declaration\x20fields\x20for\x20a\x20specific\x20embeddings\x20engine\x20by\x20key.\x20When\x20config\x20is\x20included,\x20the\x20engine\x20is\x20automatically\x20restarted\x20to\x20apply\x20the\x20changes.','\x20embedder\x20engine.','FUNCTION_','retry_delay','Worker\x20already\x20running','Object\x20must\x20have\x20>=\x20','ceil','setEf','\x20—\x20','queue_update_bucket','/admin/auth/callback','(id:\x20','\x0a\x20\x20','text\x20produced\x200\x20chunks\x20(strategy=\x22','boolean','getRefIndexDb','/admin/license','_cursorDb','_openFtsEnv','clear','_lifecycleSkipRoles','scope','Queue-backed\x20worker\x20engine','node:vm','access_token','Returns\x20changes\x20since\x20from_clocks.\x20Optional\x20envs[]\x20filter\x20restricts\x20which\x20environments\x20are\x20included.','Resets\x20the\x20ACK\x20watermark\x20for\x20a\x20peer\x20to\x20zero,\x20triggering\x20full\x20resync\x20on\x20next\x20connect.','embed-worker\x20config.job_type\x20required\x20','SYSTEM_DRAIN','_extractGeoFilter','[embed-worker]\x20started\x20','getRefViolation','idempotent','_replayCache','3822324NXIRTw','job_type.payload_schema.definition\x20must\x20be\x20object','Rebuilds\x20an\x20existing\x20index\x20from\x20current\x20type\x20contents.','Feature\x20not\x20licensed:\x20','candidates','_customReducers','No\x20license\x20found\x20matching\x20this\x20activation\x20token',':keyToChange','Actions:\x20list,\x20get\x20(key),\x20pause,\x20resume,\x20retry\x20(re-run\x20after\x20error),\x20cursor_get,\x20cursor_reset\x20(replay\x20from\x20a\x20clock).','addSubnet','_setPeerState','.png','_pool','/admin/login','peerStalenessLimitMs','_logReplay','engine_delete','queue','Blob\x20ref-count\x20is\x20zero\x20for\x20~files\x20record\x20\x22','_reconnect','/api/auth/tokens','x-forwarded-proto','Returns\x20the\x20internal\x20meta\x20document\x20(field\x20schemas,\x20index\x20definitions,\x20etc.).','env_type_pipeline_docs_list','_releaseClaim','pull','Semantic\x20text\x20search','Sets\x20pipeline\x20status\x20to\x20active\x20and\x20starts\x20member\x20engines\x20in\x20declaration\x20order.','Returns\x20live\x20request\x20counts,\x20read/write\x20rates,\x20and\x20average\x20latencies\x20—\x20both\x20lifetime\x20totals\x20and\x20a\x20rolling\x2060-second\x20window.','application/x-ndjson','from_clocks','cannot\x20join\x20self','import','loadFrom','queue_pause_job_type',':index','_listMcpRoutes','rmSync','_runReaper','async\x20(ctx)\x20=>\x20{\x0a\x20\x20//\x20ctx.payload\x20—\x20input\x20from\x20caller\x0a\x20\x20//\x20ctx.env\x20\x20\x20\x20\x20—\x20scoped\x20env:\x20put,\x20get,\x20getCount,\x20getRange,\x20txn,\x20query,\x20...\x0a\x20\x20//\x20ctx.log\x20\x20\x20\x20\x20—\x20structured\x20logger:\x20ctx.log.info(msg,\x20data)\x0a\x20\x20//\x20ctx.signal\x20\x20—\x20AbortSignal\x20for\x20timeout\x20control\x0a\x0a\x20\x20return\x20{\x20ok:\x20true\x20}\x0a}','processor:retry','_getLink','_detachLogSink','text\x20produced\x200\x20chunks\x20after\x20splitting\x20(strategy=\x22','FTS\x20index\x20name','near','peer_id','Property\x20\x27','Queue\x20mode\x20requires\x20a\x20matching\x20embed-worker\x20consumer\x20for\x20the\x20configured\x20job\x20type.','Returns\x20a\x20stored\x20function\x20by\x20name.','materializer\x20function','env:write','rebuildRefCache','materializer\x20config.handler.name\x20must\x20be\x20a\x20non-empty\x20string','processor\x20config.handler.kind\x20must\x20be\x20\x22function\x22\x20in\x20V1','/views/:name/stop','startedAt','query_type','distances','String\x20does\x20not\x20match\x20pattern\x20\x27','Actions:\x20files_list\x20(env),\x20files_status\x20(env+id),\x20files_blob_status\x20(env+id),\x20blob_sync\x20(env+id,\x20optional\x20peerIds\x20→\x20pull\x20blob\x20from\x20peers),\x20files_delete\x20(env+id,\x20optional\x20recursive).','getGcHorizon','queue_drain_job_type','_hasAnyLinks','Env\x20changelog','Full\x20scan\x20rebuild\x20of\x20stats\x20counters\x20from\x20raw\x20job\x20records.','/api/auth/tokens/:id','\x0a\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20if\x20(mode\x20===\x20\x27pw\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20body.username\x20=\x20document.getElementById(\x27username\x27).value;\x0a\x20\x20\x20\x20\x20\x20\x20\x20body.password\x20=\x20document.getElementById(\x27password\x27).value;\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20body.token\x20=\x20document.getElementById(\x27token\x27).value;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20res\x20=\x20await\x20fetch(\x27/oauth/authorize\x27,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20method:\x20\x27POST\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers:\x20{\x20\x27Content-Type\x27:\x20\x27application/json\x27,\x20\x27Accept\x27:\x20\x27application/json\x27\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body:\x20JSON.stringify(body)\x0a\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20json\x20=\x20await\x20res.json();\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!res.ok\x20||\x20!json.location)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20throw\x20new\x20Error(json.error\x20||\x20json.detail\x20||\x20\x27Invalid\x20credentials\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Navigate\x20explicitly\x20—\x20preserves\x20window.opener\x20for\x20ChatGPT\x20session\x20binding\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.location.replace(json.location);\x0a\x20\x20\x20\x20\x20\x20}\x20catch(e)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20errEl.textContent\x20=\x20e.message\x20||\x20\x27Something\x20went\x20wrong\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20errEl.classList.add(\x27on\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20btn.disabled\x20=\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20btn.textContent\x20=\x20\x27Authorize\x27;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20</script>\x0a</body>\x0a</html>','Expands\x20a\x20registered\x20template\x20into\x20a\x20direct\x20engine\x20create\x20request\x20and\x20executes\x20it\x20in\x20the\x20target\x20environment.','splice','Unsupported\x20pipeline\x20template\x20strategy\x20for\x20\x22','restart','assertLimit','getAuthorizationUrl','onDelete','addSSE','Deletes\x20a\x20type\x20and\x20all\x20of\x20its\x20records\x20from\x20the\x20selected\x20environment.','exposeHeaders','PKCE\x20code_verifier\x20does\x20not\x20match','sync.address\x20is\x20required\x20to\x20join\x20a\x20remote\x20node','releaseClaim\x20requires\x20claim_id','Route\x20','startsWith','cancelJob','configSchema','total','decodeLicenseBlob','Ollama\x20returned\x20no\x20embedding\x20(model:\x20','ctx.log.info(msg,\x20data)\x20—\x20structured\x20logging','Value\x20must\x20be\x20>\x20','chunk_failed','action=\x22put\x22\x20→\x20also\x20pass\x20value\x20(full\x20doc),\x20optional\x20ifVersion;\x20','processor:paused','/api/functions/preview','filename','\x22\x20does\x20not\x20support\x20rebuild','TYPE_PREFIX','Invalid\x20params','processor\x20config.handler\x20must\x20be\x20an\x20object','Env-scoped\x20actions:\x20list,\x20get,\x20create\x20(env+name+source,\x20optional\x20unsafe,\x20metadata,\x20enabled,\x20runtime),\x20update,\x20delete,\x20validate,\x20get_template\x20(starter\x20source).\x20','links','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','Per-item:\x20get\x20(env+type+key\x20→\x20fetch\x20one),\x20put\x20(env+type+key+value,\x20optional\x20ttl\x20in\x20ms\x20→\x20create\x20or\x20replace),\x20','Engine\x20template\x20kind\x20must\x20be\x20\x22engine\x22\x20or\x20\x22pipeline\x22:\x20','default','violations','my-worker','Retry\x20job','LICENSE_LIMIT_EXCEEDED','_onClock','Clear\x20item\x20TTL','File\x20status','replace','_capabilitySchemaOverrides','\x20are\x20trusted\x20without\x20authentication','Template\x20id','type_drop','encode','usearch\x20algorithm\x20requires\x20dims\x20>\x200','req','tmpMaxAgeMs','API\x20tokens,\x20users,\x20and\x20credentials.','files:removed','_runRecord','to\x20forge\x20valid\x20bus\x20messages.\x20Set\x20an\x20explicit\x20secret\x20via\x20the\x20`secret`\x20','redirect','getTypeRefs','job\x20type\x20\x22','Set\x20config.dims\x20explicitly\x20if\x20the\x20model\x20is\x20not\x20reachable\x20at\x20start\x20time.','job.error_stack\x20must\x20be\x20string|null','update_function','\x20does\x20not\x20exist','PassThrough','registerDriver','\x20chunks\x20failed','ENV_NOT_FOUND','ready','This\x20secret\x20is\x20publicly\x20known\x20and\x20allows\x20any\x20process\x20on\x20the\x20same\x20network\x20','Embedders,\x20models,\x20indexers,\x20searchers\x20and\x20workers\x20in\x20this\x20capability\x20are\x20GLOBAL\x20—\x20shared\x20across\x20all\x20environments\x20—\x20so\x20they\x20take\x20no\x20env\x20arg,\x20by\x20design.\x20','heapUsed','redirect_uri\x20does\x20not\x20match\x20registered\x20URIs','Index\x20key\x20must\x20be\x20an\x20array','tombstone','Stops\x20and\x20permanently\x20removes\x20all\x20engines\x20(indexer,\x20search,\x20worker)\x20belonging\x20to\x20this\x20pipeline.\x20','list_envs','OKDBIndexNotRegisteredError','env_type_pipeline_restart','resumeJobType','pid','username,\x20password,\x20and\x20tokenId\x20are\x20required','maxLat','_resolveOrCreateEnv','ipVersion','prototype','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','OKDBIndexAlreadyRegisteredError','/api/embeddings/workers','get_token','Workers\x20can\x20be\x20scaled\x20independently\x20without\x20recreating\x20the\x20indexer\x20or\x20search\x20engine.','_ttlTimeout','license','Pause\x20processor','admin','catalog','/api/files/blobs/sync','ipv4','Authorization\x20code\x20is\x20invalid\x20or\x20expired','View\x20not\x20found:\x20','stopAll','indexBacked','grants','_isMcpRoute','_storeRemoteNode','ttl:clear','[indexer]\x20index\x20state\x20empty\x20on\x20restart\x20but\x20cursor=','global','okdb-export-','functions:run','requests','Creates\x20a\x20generic\x20pipeline\x20record\x20in\x20the\x20specified\x20environment\x20after\x20validating\x20its\x20member\x20engine\x20references.','Read\x20and\x20modify\x20records\x20stored\x20in\x20OKDB\x20types.\x20','SYNC_NO_ADDRESS',',\x0a\x20\x20\x20\x20\x20\x20\x20\x20code_challenge:\x20','Raw\x20meta\x20store','txn\x20(env+operations:\x20array\x20of\x20{\x20action:\x20\x22put\x22|\x22patch\x22|\x22remove\x22|\x22update\x22,\x20type,\x20key,\x20value?\x20|\x20patch?,\x20ifVersion?\x20}\x20→\x20atomic\x20batch).\x20','.type','embed-worker\x20config.indexer\x20required\x20(name\x20of\x20the\x20indexer\x20engine)','127.0.0.1','_registerType','publishSnapshot','_getJwkKey','RSA-SHA256','fromEntries','GET','Patch\x20','/site.webmanifest','put','memoryMb','clearCookie','_dropIndex','For\x20per-type\x20embeddings\x20actions,\x20env+pipeline\x20are\x20required;\x20type\x20is\x20auto-inferred\x20from\x20the\x20pipeline\x20if\x20omitted.','\x27\x20at\x20','\x27\x20does\x20not\x20exist','details','_envClosedForDrain','\x5c??\x5c.[A-Za-z_$][\x5cw$]*','registeredAt','Schema\x20validation\x20failed\x20for\x20','getMeta','FTS\x20config.fields\x20must\x20be\x20a\x20non-empty\x20array\x20of\x20field\x20paths','OKDBForeignKeyError','createEmbedderDriver:\x20opts.resolveFactory\x20is\x20required','VIEW_REDUCER_CONFLICT','processor-basic','_usingDefaultSecret','auth','Custom\x20model\x20registry:\x20model_register,\x20model_delete.\x20','indexer\x20source_type\x20not\x20registered:\x20\x22','action','embeddings-create','OpenAI\x20embedder:\x20api_key\x20required\x20(set\x20config.api_key\x20or\x20OPENAI_API_KEY\x20env\x20var)','bge-large','Invalid\x20license\x20blob:\x20','_initialize','Type\x20\x27','removeDiffs','checkUniqueConstraints','Queue\x20environment\x20name.\x20Defaults\x20to\x20the\x20engine\x20owning\x20env.','\x20must\x20be\x20a\x20positive\x20integer','onPermanentFail','running','_fillPathTemplate','cookieName','enabled','EEXIST','chunk_hash','system_changelog','queue:clear-done','queue_env','expected','Read\x20and\x20return\x20records\x20from\x20the\x20environment.','indexReady','Cos','createPrivateKey','/api/embeddings/storage','_tombstoneCount','/api/env/:env/engines/:type/:name','_readRegistry','internalOnly','Index\x20name','query\x20dims\x20mismatch:\x20expected\x20','getConfig','views_rebuild','updated','CLEAR_PROGRESS','SYSTEM_CLOCK_CHANGE','vectorStoreStats','changeToClockDb','\x22\x20to\x20enable\x20it.','lmdb','materializer\x20config.clearTargetOnRebuild\x20must\x20be\x20a\x20boolean\x20when\x20provided','toUpperCase','FUNCTION_SCRIPT_REQUIRED','PATCH','fieldSchema','_algorithmRemove','Extends\x20the\x20lock\x20TTL\x20on\x20a\x20claimed\x20job\x20to\x20prevent\x20expiry.','Resets\x20the\x20persisted\x20engine\x20cursor\x20so\x20the\x20source\x20stream\x20is\x20replayed\x20without\x20clearing\x20owned\x20state.','_totalReads','creating','\x20properties','normalizeIndex','ref_violations','audience','_processorStops','views:read','exchangeCode','ERROR','set_null','recommended','INVALID_CREDENTIALS','_startIdleReaper','Inspection:\x20info\x20(this\x20node),\x20peers\x20(known\x20peers),\x20links\x20(per-env\x20data\x20links),\x20topology\x20(full\x20cluster\x20graph).\x20','Payload\x20too\x20large','__proto__','function_get_global','template_list','\x20(saved\x20','_matchTags','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','getViolation','Ollama\x20embed\x20error\x20','_saveCursor','system:env-sync','invalid_grant','no\x20next\x20run','_resolvedEnvOptions','leaseTtlMs','putHead','attach','poke\x20failed','JWT\x20is\x20missing\x20kid','_laneJobs','REF_VIOLATION_RESOLVED','online','install','searchKnn','system:read','Run\x20function','OKDBBus\x20is\x20using\x20the\x20default\x20bus\x20secret\x20(\x22okdb\x22).\x20','_ttlByKey','prepare\x20\x22','retry\x20/\x20cancel\x20/\x20remove\x20(env+id).\x20','_byType','Embeddings\x20pipelines\x20(per-type,\x20lifecycle-bound):\x20create,\x20start,\x20stop,\x20restart,\x20delete,\x20rebuild,\x20flush,\x20snapshot,\x20stats,\x20query,\x20nearest\x20(k-NN),\x20','Bearer\x20','croner','/oauth/authorize','clearSync','Invalid\x20CIDR\x20prefix:\x20','sift','peer\x20has\x20no\x20address','/ttl/stats','TXN_INVALID_OPS','recordRun','HIGH_SENTINEL','inactive','Low-level\x20sync\x20delta\x20operations\x20(used\x20by\x20sync\x20replication;\x20rarely\x20called\x20directly).','files_blob_status','patchDeclaration','ALREADY_EXISTS','STATE','Returns\x20all\x20registered\x20routes\x20with\x20normalized\x20operation\x20metadata\x20where\x20available.\x20Legacy\x20route\x20metadata\x20remains\x20present\x20during\x20migration\x20for\x20existing\x20consumers.','_oauthAllowedDomains','30000','Job\x20scheduling\x20and\x20retention\x20options.','\x22\x20(hash:\x20','(?:','functions:write','create_token','_interval','writeMs','log','_mcpApiCall','_envRef','_detachLog','Optional\x20tags\x20for\x20filtering.','ips','readCurrentId','_oauthConfig','adapter','Location','BlockList','_readTypeMeta','_getType','Rebuilds\x20an\x20existing\x20full-text\x20search\x20index\x20from\x20current\x20type\x20contents.','toISOString','readUInt8','getRange','/api/embeddings/providers','has','/api/env/:env/type/:type/pipelines/:pipeline/start','_projectedCapabilityForRoute','Flat\x20scan','_childWorkerOptions','_reconnectTimer','\x27\x20is\x20invalid','_decodeBuffer','Breaking\x20stale\x20snapshot\x20lock\x20(age:\x20','Connectivity','Explicit\x20environment\x20name.\x20MCP\x20calls\x20must\x20always\x20provide\x20an\x20accepted\x20env\x20explicitly.','worker_create','auth:read','key','runtime','/:id/status','Engine\x20driver\x20type\x20must\x20be\x20a\x20non-empty\x20string','Optional\x20password\x20(only\x20if\x20name\x20is\x20set)','\x27\x20is\x20already\x20registered','text/css','name\x20is\x20required','_typeEnvs','partial','minLength','Connections\x20per\x20node\x20—\x20higher\x20=\x20better\x20recall,\x20more\x20memory.','\x20for\x20system\x20env','rules','views_create','algorithm\x20factory\x20must\x20be\x20a\x20function','\x22,\x20embedder=\x22','$countBy','deleted','number','removeHead','type_set_default_ttl','MixedBread\x20AI\x20large\x20—\x20best\x20quality\x20on\x20Ollama','http','\x20is\x20not\x20available','additionalProperties','abs','from','Engine\x20template\x20build()\x20is\x20required:\x20','is\x20started\x20before\x20the\x20search\x20engine.',',\x20host:\x20','shift','or\x20/api/docs\x20for\x20the\x20live\x20route\x20registry.\x20','formatCookie','Unknown\x20DB\x20scope:\x20','start','code_verifier\x20required','List\x20tokens','JSON\x20Schema\x20definition\x20(type:\x20\x22object\x22\x20with\x20properties)','Query\x20log\x20history','delete_global','disabledAt','queue_claim_next_job','_walkValue','_mcpApiList','Env\x20reopen\x20timed\x20out\x20after\x20drain','match','_countFileRefs','schema:drop','~envs','Expands\x20a\x20template\x20into\x20the\x20engine\x20or\x20pipeline\x20create\x20payload\x20it\x20would\x20generate\x20without\x20executing\x20it.','vector\x20store\x20\x22','[res]\x20','authMode','numTerms','mcp_api.describe:\x20route\x20','assertFeature','invalid_request','/job-type/:type/resume','_scheduleRuntimeActivation','OKDBAlreadyExistsError','sync_topology','maxWrites','/api/files/blobs/:hash','_okdbAdminAttached','logRequests','allowedOrigins','ENGINE_REBUILD_UNSUPPORTED','Functions\x20registry\x20environment\x20is\x20not\x20available','/setup.html','startIndex/endIndex\x20require\x20options.index','queue_mark_job_heartbeat','reason','mcp_api.call:\x20route\x20','target_env','query','\x27\x20must\x20be\x20an\x20object','Named\x20path-param\x20values\x20for\x20call.\x20E.g.\x20{\x20env:\x20\x22default\x22,\x20type:\x20\x22users\x22,\x20key:\x20\x22u1\x22\x20}.\x20','bindings','_shouldWrapResponse','/api/embeddings/embedders/:name/health','finish','_getOrphanedIndexesOnRemove','indexer\x20engine\x20not\x20running:\x20\x22','FUNCTION_SCRIPT_INVALID_SHAPE','SYNC_INVALID_PEER','missing\x20wildcard\x20path\x20parameter\x20\x22*\x22',':index:','Type\x20changelog','useWritemap','queue_remove_job_type','readdirSync','registerType','Use\x20jobType\x20(NOT\x20type)\x20to\x20name\x20the\x20job\x20kind\x20in\x20MCP\x20calls.\x20','List\x20models','exclusiveMinimum\x20','SCHEMA_VIOLATION','_openAckDb','module','Get\x20engine','reconcile_concurrency','payload\x20schema\x20violation:\x20','runnerIdleTimeout','_allEnvsWithFiles','system_export','System','pem','isIPv4','jobs:email','indexer','/type/:type/fts/:ftsName/search','Create\x20vector-search\x20engine\x20(advanced)','rss','Per-type:\x20query\x20(env+type,\x20optional\x20filter\x20(sift-style\x20mongo\x20query,\x20e.g.\x20{\x20status:\x20\x22active\x22,\x20amount:\x20{\x20$gte:\x2010\x20}\x20}),\x20options{limit,startKey,fields,index,sort,reverse};\x20','snapshotsDir','List\x20search\x20algorithms','_resolvedWarnings','keys','login-app.js','maxItems','labelForExisting','_mutate','getEntry','1.0.0','groups','_computeStatus','from_clock','clockToKeys','licenseType','system:ready','tokenId','sentence','_totalWrites','engine_restart','HNSW\x20vector\x20search','openid','/admin/logout','template','dims','compact\x20rollback:\x20reopen\x20failed:\x20','__ref_index','jobContext','segmentName','heartbeat\x20/\x20progress\x20/\x20complete\x20/\x20fail\x20(env+id+claim_id,\x20payload-shape\x20per\x20action\x20—\x20fine-grained\x20worker\x20reporting);\x20','roles','list\x20—\x20filter\x20routes\x20by\x20tag/search/mutating,\x20returns\x20method+path+summary+safety+auth;\x20','blob\x20status\x20db\x20not\x20available','envName','gcOrphanedBlobs','_typeSchema','get_function_run','Get\x20view\x20output','ok.esm.min.js','job.retry_delay\x20must\x20be\x20int\x20>=\x200','rebuild_view','commit','afterOp','origins','invalid\x20job\x20type\x20status:\x20','_tmPath','OPTIONS','env:read','_ensureSystemEnv','\x20must\x20be\x20an\x20array\x20of\x20strings','\x27\x20but\x20op\x20\x27','HNSW','some','notifications/initialized','Token\x20secret\x20not\x20configured','run_function','importBlobs','direction','Patch\x20inc\x20values\x20must\x20be\x20numbers','FUNCTION_TIMEOUT','mcp','format:\x20','_ctxBase','Returns\x20~files\x20records\x20whose\x20path\x20starts\x20with\x20the\x20given\x20prefix.','ref_violations_list','authRequired','randomUUID','expiresAt','Starter\x20config\x20for\x20an\x20','FUNCTION_DISABLED','Optional\x20declarative\x20transform\x20merged\x20onto\x20each\x20source\x20doc\x20before\x20reducers\x20run.\x20Each\x20entry\x20is\x20one\x20of:\x20plain\x20string\x20(rename,\x20e.g.\x20{\x20storeName:\x20\x22name\x22\x20});\x20{\x20$ref:\x20[refType,\x20\x22$fkField\x22,\x20\x22targetField\x22]\x20}\x20(FK\x20lookup);\x20{\x20$concat:\x20[\x22$first\x22,\x20\x22\x20\x22,\x20\x22$last\x22]\x20};\x20{\x20$coalesce:\x20[\x22$primary\x22,\x20\x22$fallback\x22]\x20}.\x20Field\x20references\x20inside\x20operators\x20use\x20a\x20\x22$\x22\x20prefix.','_buildCapabilityDescription','encrypted','redirectUris','_call','Resumes\x20a\x20paused\x20processor\x20in\x20the\x20default\x20environment.','off','\x22\x20has\x20no\x20queue','.tmp','.tmp-','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','bucket\x20must\x20be\x20object','STOPPED','_keysAtStop','queue:enqueued','TYPE_REGISTER','views','\x22\x20owns\x20indexes\x20that\x20will\x20become\x20orphaned:\x20','/docs/*','buildStartClock','\x22\x20found\x20in\x20env\x20\x22','Event\x20stream\x20stats','decodeActivationToken','model\x20\x22','Download\x20file','allowHeaders','env_type_pipeline_doc_retry','mcp_api.call:\x20','hlc','compiled','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','materializer\x20config.handler\x20must\x20be\x20an\x20object','passwordHash','_memberState','cpus','engines','embedding','engineName','defaults','RESETTING','_envOrDefault','clockAtScan','_storeEnv','lock_busy','Cannot\x20remove\x20protected\x20environment\x20\x22','nextRun','articles-embedder','Original\x20error:\x20','Returns\x20all\x20stored\x20functions\x20for\x20the\x20selected\x20environment.','Function\x20script\x20failed\x20to\x20initialize','ACTIVATION_EXPIRED','MAX_SAFE_INTEGER','rawBuf','parseBearer','_fetchRemoteInfo','My\x20Pipeline','anyOf\x20match','Approximate\x20nearest-neighbor\x20vector\x20search\x20engine\x20using\x20HNSW.','Invalid\x20Request','_tryRegisterHttp','_sweepInProgress','template_create','doc','--max-old-space-size=','dirname','_peerDb','pkcs8','clearDone','Requires\x20native\x20usearch\x20bindings\x20(npm\x20install\x20usearch).\x20Startup\x20fails\x20if\x20bindings\x20are\x20unavailable.','INDEX_REGISTER','unsupported_grant_type','repairBlobRefs','\x20vectors\x20(','embed-worker\x20config.embedder\x20required\x20(name\x20of\x20the\x20embedder\x20engine)','ENGINE_STORE_NOT_AVAILABLE','/api/embeddings/models/:provider','List\x20global\x20functions','The\x20merged\x20\x22action\x22\x20enum\x20on\x20this\x20router\x20contains\x20every\x20action\x20from\x20every\x20capability,\x20so\x20the\x20same\x20name\x20(e.g.\x20\x22list\x22,\x20\x22create\x22,\x20\x22get\x22)\x20','generic_delete','List\x20views','/api/sync/join','_savePeerProgress','vector\x20\x22','listChanges','embeddings_search_create','How\x20long\x20(ms)\x20to\x20keep\x20the\x20job\x20after\x20it\x20completes.\x20null\x20=\x20keep\x20forever.\x200\x20=\x20delete\x20immediately.\x20Positive\x20integer\x20=\x20TTL\x20in\x20ms.\x20Per-job\x20value\x20overrides\x20the\x20queue-level\x20default.','type:drop','Lifecycle:\x20list,\x20get,\x20create\x20(env+type+name+config,\x20optional\x20meta/enabled/affinity),\x20patch,\x20delete,\x20restart,\x20pause,\x20resume,\x20retry,\x20reset_cursor,\x20rebuild.','.okdb-function.js','type','List\x20processors','link_upsert\x20/\x20link_remove\x20(manage\x20data\x20links\x20between\x20envs\x20/\x20peers);\x20','__draft__','verifyPassword','manifestVersion',',\x20actual:\x20','_systemEnvPromise','_searchWithScores','updateConfig','_attached','handle','enqueue','bus','body.provider\x20required','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','\x22\x20must\x20be\x20a\x20plain\x20object','_flush','queue_list_jobs','reads','Patch\x20cannot\x20assign\x20undefined\x20values','Peer','heartbeat','TXN_INVALID_ACTION','DRAINING','hasCanonical','cron\x20reschedule\x20failed','_held','getPins','0.0.0.0','tools/call','refIndexKey','all-minilm','BAD_CONFIG','retryDoc\x20is\x20only\x20available\x20in\x20queue\x20mode','registerEmbedderFactory','processor\x20config.cursorKey\x20must\x20be\x20a\x20non-empty\x20string\x20when\x20provided','defaultEnv','url','runtimeDefaults','Read','/admin/license/:id','_workers','heartbeatIntervalMs','validateBlobIntegrity','cleanupTmpDirs','_resolveIndexReady','\x22\x20cannot\x20be\x20deleted.\x20','Inline\x20embeddings\x20pipeline\x20(Ollama)','/api/docs','Source\x20key','writer','/api/embeddings/embedders/:name/models','OpenAI\x20embed\x20error\x20','_rejectReady','Updates\x20the\x20progress\x20field\x20on\x20a\x20claimed\x20running\x20job.','\x20—\x20pass\x20allowDestructive:\x20true\x20to\x20confirm','where','INDEXER','lon','env_type_pipeline_delete','Hello','job_type.','\x22\x20uses\x20$min/$max\x20which\x20is\x20not\x20supported\x20inside\x20$ref\x20reducers','Remove\x20the\x20~files\x20record\x20and\x20decrement\x20blob\x20ref-count.\x20Blob\x20is\x20deleted\x20when\x20refs\x20reach\x20zero.','engine\x20meta\x20patch\x20must\x20be\x20an\x20object\x20or\x20null','timeoutMs','patchConfig','Index\x20\x27','job_type.defaults.max_tries\x20must\x20be\x20int\x20>=\x201\x20or\x20null','xml','Deterministic\x20materializer\x20engine','object','reader','drop_fts_index','/api/embed','nbf','updateStatus','schema_set','useReadTransaction','_stateDb','addLicense','INDEX_PROGRESS','bootSyncedViews','List\x20schema\x20violations\x20for\x20type',',\x20got\x20','_loaded','Delete\x20global\x20function','setSchema','_meta','indexer\x20config.dims\x20must\x20be\x20a\x20positive\x20integer\x20if\x20provided','_ttlCompositeKey','/admin/license/:id/activate','protected:write','[embed-worker]\x20onPermanentFail\x20callback\x20error\x20(','_deepSchemaCache','message','indexes','/type/:type/properties','byStatus','toLowerCase','Function\x20already\x20exists:\x20','List\x20jobs','job.backoff_multiplier\x20must\x20be\x20number\x20>=\x201','_maxConnections','s,\x20pid:\x20','getHead','env_engines_list','dropAll','job\x20type\x20id\x20required','sdk','DRAIN','How\x20long\x20(ms)\x20to\x20keep\x20the\x20job\x20after\x20it\x20permanently\x20fails.\x20null\x20=\x20keep\x20forever.\x200\x20=\x20delete\x20immediately.\x20Positive\x20integer\x20=\x20TTL\x20in\x20ms.\x20Per-job\x20value\x20overrides\x20the\x20queue-level\x20default.','LENGTH_REQUIRED','functionVersion','index.hnsw','inline_deletes','getIndexCount','Bearer\x20token\x20required','/api/env/:env/type/:type/pipelines/:pipeline/retry-failed','Returns\x20per-type\x20counts:\x20pending,\x20running,\x20done,\x20failed.','Pipeline\x20template\x20must\x20be\x20null\x20for\x20V1','_supportedCapabilities','mkdirSync','_algorithmSchemas','nomic-embed-text','create_function','Bulk\x20delete\x20stuck\x20(expired-claim)\x20running\x20jobs','base64url','putSync','views_get_definition','Optional\x20queue\x20job\x20context\x20for\x20ctx.job\x20in\x20queue-worker\x20previews.','queue_mark_job_progress','Function\x20script\x20source\x20must\x20be\x20a\x20string','changelog','tokenizer','getAuthOptions','isAuthenticated','Rebuild\x20HNSW\x20index','Missing\x20required\x20argument:\x20env.\x20MCP\x20calls\x20to\x20','_openItemsDb','overflowPages','skip','materializer\x20config.source_env\x20must\x20be\x20a\x20non-empty\x20string\x20when\x20provided','ok.esm.js','NOT_FOUND','concurrency=','authorization_code','clients','queue_mark_job_complete','Retry\x20single\x20doc','1645768oMCsLz','fetchRemoteDelta','_resolveMemberEngine','Remove\x20pipelines\x20via\x20okdb.env(name).pipelines.remove(...)','backup','_cleanupSubEnvs','clearTTL','Queue\x20job\x20type\x20to\x20consume.','Base\x20permissions\x20(always\x20in\x20effect).\x20Format\x20\x22<namespace>:<operation>\x22.\x20Examples:\x20\x22data:read\x22,\x20\x22data:write\x22,\x20\x22auth:write\x22,\x20\x22schema:write\x22.\x20Use\x20\x22*\x22\x20alone\x20for\x20full\x20access;\x20\x22<ns>:*\x22\x20or\x20\x22*:<op>\x22\x20wildcards\x20are\x20also\x20accepted.','_tokenTtl','dimensions','status_code','Returns\x20all\x20schema\x20validation\x20violations\x20across\x20all\x20types\x20in\x20the\x20environment.','okdb:','files:read','Engine\x20driver\x20for\x20\x22','\x22:\x20dims\x20could\x20not\x20be\x20resolved.\x20','/api/env/:env/engines','progress','JWT\x20expired','system_info','assertCreateAllowed','system_logs','Patch\x20unset\x20must\x20be\x20an\x20array\x20of\x20paths','/api/env/:env/config','_runtimeActivationScheduled','rawStream','Register\x20custom\x20model','draft','UNIQUE_CONSTRAINT','oauth\x20login','unref','registryEnv','isOrchestrator','patch','Sets\x20pipeline\x20status\x20to\x20stopped\x20and\x20stops\x20running\x20member\x20engines\x20in\x20reverse\x20order.','_bulkRemoveJobs','BAD_PLUGIN','lastError','getDiffs','concat','limit','clearPhysicalIndex','~tokens','~queue_payloads','afterWrite','interrupted','Pull\x20change\x20delta','myHandler','966ifJWsU','update','4764hSMbwn','PLUGIN_NAME_CONFLICT','OpenAI\x20request\x20failed\x20(','delete_function_global','Create,\x20delete,\x20and\x20compact\x20environments.','Start\x20pipeline','Patch\x20document\x20must\x20be\x20a\x20plain\x20object','_methodNotFound','\x22\x20is\x20draining\x20—\x20new\x20jobs\x20not\x20accepted','explainIndex','listModels','finished','[vector-search]\x20algorithm\x20load\x20failed\x20for\x20\x22','Returns\x20registered\x20generic\x20and\x20embeddings\x20pipeline\x20starter\x20templates\x20and\x20recommendations.','::ffff:127.0.0.1','recompute_fields\x20(re-derive\x20computed\x20fields);\x20list_properties\x20/\x20deep_properties\x20(shallow\x20/\x20nested\x20observed\x20property\x20paths).','List\x20FTS\x20indexes','List\x20foreign\x20key\x20violations\x20for\x20type','_getOidcDiscovery','Embedding\x20worker\x20starter','/.well-known/openid-configuration',';\x20Max-Age=','dependentRequired','$count','embeddings:indexer:ready','\x22\x20received\x20a\x20text\x20query\x20but\x20no\x20embedder\x20is\x20configured.\x20','oauth-user','&','List\x20doc\x20statuses','external\x20failure','Capability\x20name,\x20e.g.\x20\x22data\x22,\x20\x22queue\x22,\x20\x22sync\x22','select','job_heartbeat','SKIP','queue-worker\x20queue','closed','INDEX_RESET','find','queue_resume_job_type','all\x20interfaces','When\x20true,\x20intercept\x20writes\x20and\x20return\x20them\x20as\x20dryRunActions\x20without\x20committing.','basename','Returns\x20recent\x20changelog\x20entries\x20for\x20a\x20single\x20item\x20key.','runtimeState','derivePin','enqueue\x20requires\x20non-empty\x20type','job.claim_id\x20must\x20be\x20string|null','generic-queue-worker','\x20delta\x20entries\x20for\x20\x22','multipleOf\x20','indexStats','get','Optional\x20optimistic-concurrency\x20guard.','Job\x20heartbeat','\x22\x20requires\x20processor\x20support\x20in\x20env\x20\x22','allowedAlgs','removeBucket','pipeline_template_get','queued','since_ms','get_type_default_ttl','refs','get_global_function','mcp_api:\x20unknown\x20action\x20','exclusiveMaximum','internal','promise','Register\x20index','not','processor\x20config.originMode\x20must\x20be\x20\x22self\x22,\x20\x22remote\x22,\x20or\x20\x22all\x22','PARTIAL','not\x20match','_findCapabilityAction','_openSystemEnv','/api/embeddings/engines/:key/start','processor\x20handler\x20error\x20(','schema:','~views','mutating','Get\x20view\x20meta','queue_remove_job_type_schema','auth_token_delete','\x20contains\x20a\x20forbidden\x20path\x20segment','peer','INDEXER_FLUSHED','/api/events/stats','_lazyOpenRefItemsDb','\x22\x20is\x20used\x20by:\x20','_register','_lockMaxAgeMs','noSync','config\x20(live\x20config\x20view);\x20changelog\x20(cross-type\x20recent\x20writes,\x20newest\x20first;\x20pagination\x20via\x20cursor).','maxCodeSizeBytes','_isMcpApiRoute','Token\x20cost\x20per\x20execution\x20(legacy,\x20requires\x20bucket).','MISSING_QUEUE','Token\x20must\x20be\x20a\x20JWT','_sinks','sourceType','Value\x20must\x20be\x20<=\x20','violations_list','what\x20is\x20machine\x20learning?','activation','Validation\x20failed','Patch\x20merge\x20values\x20must\x20be\x20plain\x20objects','_setNodeHasBlob','ITEM_UPDATE','initialize','Deep\x20field\x20schema','Set\x20item\x20TTL','_extractLeaves','getDefaultTTL','_validateOidcAccessToken','Files','batchSize','INDEXER_DOC_QUEUED','redirect_uris\x20is\x20required','runId','application/octet-stream','getRun','/api/embeddings/algorithms','\x22\x20—\x20starting\x20empty:','http-preview','createEngine','peerIds','views:write','/api/env/:env/type/:type/schema','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22/\x22hnsw\x22\x20instead.\x20','~root','If\x20dims\x20is\x20omitted,\x20the\x20engine\x20attempts\x20to\x20resolve\x20it\x20from\x20the\x20embedder\x20or\x20sibling\x20engines\x20using\x20the\x20same\x20storage\x20key.','job.bucket\x20must\x20be\x20string|null','default_max_tries','slice','\x27\x20already\x20registered','doc_key','labels','Build\x20expects\x20public\x20key\x20fingerprint\x20','Drop\x20FTS\x20index','updateRefIndex','/api/sync/links/:nodeA/:nodeB','Conflicting\x20patch\x20operations\x20for\x20\x27','currentJob','Transaction\x20already\x20closed',';\x20SameSite=','/api/env/:env/violations/:type','embed-worker-basic','refItemsDbs','_connections','Returns\x20registered\x20starter\x20templates\x20and\x20recommendations\x20for\x20direct\x20engines\x20and\x20pipelines.','_handleDbCall','function_list','pipeline_template_preview','embeddings_algorithms','_lazyOpenItemsDb','Returns\x20all\x20open\x20OKDB\x20environments\x20with\x20stats,\x20types,\x20clock,\x20sync\x20status,\x20parentEnv,\x20and\x20any\x20stale\x20orphaned\x20entries.','isRunning','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','_linkAllows','dryRun','_coordinator','queue_remove_bucket','hidden','queue_get_job_type','SYSTEM_STOPPED','getTemplate','listSnapshotIds','\x22\x20does\x20not\x20create\x20a\x20direct\x20engine','env_changelog','Arrow\x20function\x20source\x20code','schema_get','_isEnsured','ENGINE_CONFIG_IMMUTABLE','addPoint','_systemEnv','round','Serve\x20raw\x20blob\x20by\x20hash','includeViolations','no_action','halted','done_ttl','ScalarKind','vector-search\x20config\x20must\x20be\x20an\x20object','doc_get','.role','Engine-driven\x20pipelines\x20(generic\x20pipelines\x20and\x20embeddings\x20pipelines\x20built\x20on\x20top\x20of\x20engines).\x20','36198IGVsMp','processor:error','_shouldApplyChange','reject','/api/env/:env/time-machine/:type/:key/at/:clock','job\x20type\x20not\x20found:\x20','The\x20embedder\x20is\x20NOT\x20deleted\x20�\x20it\x20is\x20shared\x20and\x20may\x20be\x20used\x20by\x20other\x20pipelines.','Actions:\x20','connected','Engine\x20type\x20\x22','[indexer]\x20hash-vec\x20cache\x20warm-up\x20failed\x20(non-fatal):\x20','auth=','For\x20most\x20users,\x20prefer\x20okdb_pipeline\x20(per-env,\x20type-bound)\x20—\x20it\x20orchestrates\x20these\x20engines\x20for\x20you\x20and\x20keeps\x20the\x20per-env\x20scoping\x20contract\x20intact.','EVENTS','/type/:type/recompute-fields','delete_token','for\x20Node\x20','claim_id','cookie','__env_meta','/api/files/blobs/status','vector-search\x20config.embedder\x20must\x20be\x20a\x20string\x20if\x20provided','SYSTEM_BUS_STATE_CHANGE','data','~licenses','update_bucket','_ts','release','Request\x20body\x20must\x20be\x20an\x20object','disable','ref','coordinates','driver','_releaseRunner','license:activated','Retries\x20a\x20processor\x20that\x20is\x20in\x20an\x20error\x20state.','registerModel','Deletes\x20all\x20done\x20jobs\x20(optionally\x20scoped\x20to\x20a\x20type).','Write','List\x20embedders','console','Returns\x20a\x20single\x20execution\x20ledger\x20entry\x20for\x20a\x20stored\x20function\x20run\x20in\x20the\x20specified\x20environment.','processor\x20config.source_env\x20must\x20be\x20a\x20non-empty\x20string\x20when\x20provided','end','resolveStorage','category','node','Worker\x20name','profile','Processor\x20id','chunk_done','drop','tools/call:','origin','vector-search@','SYNC_SELF_JOIN','SERVICE_UNAVAILABLE','compression','docs_list','Invalid\x20function\x20scope:\x20','ctx.','read','TYPE_DROP','get_global','rollback','cursor_get','/api/env/:env/type/:type/pipelines/:pipeline/docs/:key','starting','_initiatedDrain','function_create','include','/functions/:name/run','~fts','chunk_text','javascript','RUNNING','engine','_stopped','describe_type','keep','Returns\x20the\x20materialized\x20view\x20document\x20for\x20the\x20named\x20view.','external','\x20for\x20model\x20\x22','headers','onTransition','/([^/]+)','index','enginesPreserved','_snapshotCompleteKey','env_engine_get','Create\x20indexer\x20(advanced)','cascade','_put','Deletes\x20a\x20single\x20item\x20by\x20type\x20and\x20key.','symbol','list_tokens','queue-worker\x20config.handler.kind\x20must\x20be\x20\x22function\x22\x20in\x20V1','/:id','markDone','_refreshNextExpiry','Access-Control-Request-Headers','plan','remaining-fields','_clockListener','search:query','clockToChangeDb','viewDb','articles-ingest','desc','FTS_DROP','processor_cursor_reset','efSearch','typesDb','/admin/api/notices','license\x20recheck\x20error','\x22,\x20dims=','L2sq','system_import','Type\x20name','body','oauth','bootstrap-blocked','params.','resetCursor','Storage\x20key','BAD_REQUEST','Marks\x20a\x20claimed\x20running\x20job\x20as\x20done.','enforce','_lazyOpenRefTrackingDb','_stops','resetReadTxn','copyFileSync','explicit\x20environment\x20name','_enforceOperationAccess','waiting','\x22\x20failed:\x20','_openRefItemsDb','Invalid\x20cron\x20expression\x20\x22','fake-v1','X-OKDB-NodeId','/api/sync/peers','Optional\x20type\x20filter','login\x20failure','[vector-search]\x20could\x20not\x20register\x20refresh\x20processor\x20for\x20','Invalid\x20IP\x20address\x20in\x20--open\x20spec:\x20','wildcard','Function\x20execution\x20timed\x20out','uptime','job.cron\x20must\x20be\x20string|null','minProperties\x20','INDEXER_DOC_FAILED','unknown','gcPeerStalenessLimitDays','[files]\x20upload\x20','state.json','parentEnv','_ensure','SYSTEM_POKE','engine_start','sum','_blobStatusDb','FETCH_NOT_ALLOWED','vec:','shell','x5c','their\x20per-capability\x20descriptions\x20document\x20each\x20action\x20and\x20its\x20required\x20arguments.\x20','onDo','type_query','[indexer]\x20stopped\x20','env_engine_restart','_checkTTLSweepNeeded','retainDays','Bulk\x20retry\x20failed\x20jobs','capacity','listAlgorithms','record','peer_id\x20required','embeddings_probe_ollama_models','_nodePrivateKey','templates','Function\x20script\x20source\x20is\x20required','Mark\x20doc\x20deleted','role','VIEW_NOT_FOUND','Base\x20delay\x20between\x20retries\x20in\x20ms.\x20Default\x200.','tag','Pipeline\x20engines\x20must\x20be\x20a\x20non-empty\x20array','ctx.payload\x20—\x20caller-provided\x20input','max_concurrency','~log_entry','idle','registerHttp','/type/:type/item/:key/ttl','\x22;\x20already\x20loaded\x20from\x20env\x20\x22','msg','Compact\x20failed:\x20file\x20busy.\x20Another\x20process\x20has\x20data.mdb\x20open.\x20Drain\x20cleared\x20—\x20all\x20processes\x20resuming.','listViolations','queue-worker\x20config.concurrency\x20must\x20be\x20a\x20positive\x20integer','vector\x20writes\x20will\x20be\x20skipped\x20(','Property\x20name\x20\x27','Pipeline\x20template\x20not\x20found:\x20','env_pipelines_list','_materializeTemplate','env_type_pipeline_','job\x20id\x20required','listLinks','assertStartAllowed','createIndexer','pauseJobType','USEARCH_BINDINGS_UNAVAILABLE','Returns\x20a\x20single\x20execution\x20ledger\x20entry\x20for\x20a\x20stored\x20function\x20run.','Returns\x20the\x20default\x20TTL\x20setting\x20for\x20a\x20type.\x20New\x20items\x20inserted\x20into\x20this\x20type\x20automatically\x20receive\x20this\x20TTL.','stopped','params.env','bucket\x20required','VIEW_MISSING_REDUCE','Shutting\x20down\x20due\x20to\x20license\x20expiry','Pipeline\x20stats','body.embedder\x20required','retryDoc','\x22\x20is\x20missing\x20or\x20null\x20on\x20doc\x20\x22','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','okdb','~blobs','listIndexes','previous','Path\x20templates\x20like\x20/api/env/:env/type/:type/item/:key\x20are\x20filled\x20from\x20args.params.\x20','charCodeAt','Forbidden','Stored\x20function\x20name\x20to\x20invoke\x20for\x20each\x20batch.','_buildCapabilityTools','SYNC_AUTH_FAILED','files:http:uploaded','claim_expires','bucket\x20id\x20required','Registers\x20a\x20new\x20job\x20type\x20(or\x20upserts\x20if\x20it\x20already\x20exists).\x20Provide\x20id\x20in\x20the\x20request\x20body.','_algorithmAdd','repeat','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','_ensureTTLDbs','Registers\x20a\x20new\x20global\x20(system)\x20function.','refill_every','\x20(+','Returns\x20all\x20configured\x20queue\x20bucket\x20definitions.','[indexer]\x20hash-vec\x20cache\x20warmed:\x20','Background\x20job\x20queue:\x20enqueue,\x20claim,\x20and\x20update\x20jobs;\x20manage\x20buckets\x20and\x20tags.\x20','16gYbEOu','family','\x22\x20(custom\x20resolver\x20active)','TOO_MANY_REQUESTS','gate','_setTTLEntry','Drop\x20index','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','/api/env/:env/compact','buckets','Vector-search\x20engine\x20\x22','stats','spawn','/api/sync/reconcile-peer','job_type.defaults.ttl\x20must\x20be\x20int\x20>=\x200\x20or\x20null','compact','Internal\x20error','_registryEnv','oauth\x20login\x20rejected\x20—\x20email\x20not\x20allowed','describe','embeddings-inline-ollama','_activateView','ttl:set','_removeIndexConsumer','_nextCronWhen','minLat','FTS_REGISTERED','Functions','refreshReadTxn','engine:','Returns\x20metadata\x20+\x20blob\x20ref-count\x20for\x20a\x20file\x20id.','expired','/api/events','list_function_runs','Execute\x20stored\x20functions\x20and\x20inspect\x20runs.\x20','vector-search','/api/embeddings/probe-ollama-models','applyOps','_adminRelay','Embedding\x20queue\x20worker\x20engine','Point','files:uploaded','env_engine_patch','Value\x20must\x20be\x20<\x20','If\x20using\x20a\x20custom\x20setStorageResolver,\x20ensure\x20it\x20returns\x20an\x20adapter\x20for\x20this\x20key.','listTemplates','defaultRoles','_cookieName','jobType','route','Creates\x20a\x20new\x20named\x20OKDB\x20environment\x20with\x20optional\x20sync/compression/mapSize\x20overrides.','/api/env/:env/engines/:type/:name/resume','child','SCHEMA_DROP','chunk\x20strategy\x20must\x20be\x20a\x20function','Validates\x20function\x20source\x20without\x20storing.\x20Returns\x20errors\x20for\x20unknown\x20ctx\x20properties\x20(e.g.\x20ctx.data,\x20ctx.db),\x20forbidden\x20symbols,\x20compile\x20failures,\x20and\x20shape\x20issues.\x20Use\x20this\x20before\x20create\x20or\x20preview.','models','postMessage','embed-worker\x20config.concurrency\x20must\x20be\x20a\x20positive\x20integer','files_upload','Optional\x20TTL\x20in\x20milliseconds','BAAI\x20BGE-M3\x20multilingual','store_error_stack','INVALID_SCHEMA','body.name\x20required','must\x20be\x20','idempotency_key','strategy','username','job.priority\x20must\x20be\x20int','processor_resume','[engines]\x20failed\x20to\x20stop\x20','/type/:type','Starts\x20(or\x20resumes)\x20the\x20named\x20view.','bucket\x20\x22','/api/env/:env/type/:type/pipelines/:pipeline/stats','isFile','/api/pipelines/templates/:template/preview','Ollama\x20(local)','Bulk\x20retry\x20failed\x20docs','Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','arch','Database\x20info','Array\x20must\x20have\x20>=\x20','engine\x20driver\x20patchConfig()\x20must\x20return\x20a\x20config\x20object','vector-search\x20config.algorithm_config\x20must\x20be\x20an\x20object','exactly\x20one\x20oneOf\x20match','PAUSED','Clears\x20and\x20rebuilds\x20the\x20named\x20view\x20from\x20scratch.','Inspect\x20and\x20invoke\x20any\x20HTTP\x20route\x20exposed\x20to\x20MCP,\x20using\x20the\x20session\x27s\x20own\x20auth\x20','stream','vector-search\x20config.storage_key\x20required','fts:','\x20must\x20be\x20a\x20plain\x20object','no\x20additional\x20properties','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','getAll','\x22\x20in\x20queue\x20env\x20\x22','recompute_fields','_runGuards','statSync','Max\x20elements','parse','schema','Fast\x20ANN\x20via\x20Unum\x20usearch\x20—\x20HNSW\x20variant\x20with\x20more\x20metric\x20options,\x20single-writer\x20multi-reader\x20snapshot\x20persistence.','Cosine\x20similarity','last_seen','/api/system/changelog','markJobComplete','_headDb','getRunningEngine','Start\x20timestamp\x20in\x20milliseconds\x20(default:\x200)','job.buckets\x20entries\x20must\x20be\x20objects','algorithm=\x22','sig','getTypeCount','guard','seed','okdb-function.js',':reset','Unknown\x20spawned\x20queue\x20worker\x20error','embed-worker@','Environment\x20name','hashToken','indexer@','_clockCounter','_jwksCache','uninstalled','recordPeerAck','try_claim_tokens','hasDiff','digest','/type/:type/ttl/default','_getRetryConfig','backoff_multiplier','_wrapApiResponse','Blob\x20not\x20found:\x20','nodeA\x20and\x20nodeB\x20are\x20required','files.upload:\x20id\x20is\x20required','getJob','\x20cf-ray=','ctx.env\x20—\x20scoped\x20env\x20(put,\x20get,\x20getCount,\x20getRange,\x20txn,\x20...)','calculateDelta','sync_join','body.model\x20required','_ensureFtsProcessor','_embedderFactories','importFromStream','maxBodyBytes','TXN_INVALID_OP','_refillBucketNow','timestamp','expandBBox','Creates\x20an\x20','Reconcile\x20with\x20one\x20peer','BUILTIN_MODEL','keepSubEnvs','provider','Stop\x20pipeline','_tools','HTTP\x20','readCurrentClock','add()\x20requires\x20a\x20Float32Array','queue-worker\x20config.ttl\x20must\x20be\x20a\x20positive\x20integer','resetting','Once\x20an\x20index\x20exists,\x20query\x20it\x20via\x20okdb_data\x20action=\x22query\x22\x20with\x20options.index=\x22<index\x20id>\x22.','probe_ollama_models','Stop\x20engine','custom','test','_onChildError','pipe','FTS_REGISTER','_normalizeResponseBody','Manage\x20isolated\x20database\x20environments\x20(each\x20env\x20is\x20its\x20own\x20namespace\x20of\x20types\x20and\x20data).\x20','OAuth\x20login\x20is\x20not\x20configured','_renameRetry','querySchema','WORKER','Maintains\x20a\x20live\x20connection\x20to\x20an\x20embedding\x20provider\x20such\x20as\x20Ollama\x20or\x20OpenAI-compatible\x20APIs.','adjustCounts','indexer\x20config.storage_key\x20required','address\x20and\x20token\x20are\x20required','bootRuntimeDeclarations','ringSize','typeClockToChangeDb','destDir','Item\x20key','Patch\x20inc\x20target\x20\x27','generic_start','isCoordinator','search_create','providerLabel','list_index_violations','~functions','Poke\x20(fire-and-forget\x20reconcile)','env-sync','spawn\x20requires\x20non-empty\x20modulePath','_buildRouterTool','env_compact','\x27:\x20','VIEW_HAS_ORPHANED_INDEXES','Blob\x20file\x20missing\x20for\x20~files\x20record\x20\x22','getTTL','Byte\x20count','Patch\x20merge\x20target\x20\x27','exportJSON','Drop\x20type',',\x0a\x20\x20\x20\x20\x20\x20\x20\x20scope:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2.0','/api/env/:env/ref-violations','UNSUPPORTED_MEDIA_TYPE','removed','./admin/index.html','item_set_ttl','Catalogs:\x20providers,\x20models,\x20models_by_provider,\x20algorithms,\x20embedder_models,\x20probe_ollama_models.\x20','_markFail','standard','Function\x20not\x20found','tryClaimTokens','poke','Route\x20path\x20template\x20(for\x20describe/call).\x20E.g.\x20\x22/docs/*\x22\x20or\x20\x22/api/env/:env/type/:type/item/:key\x22.','WARNING:\x20okdb\x20is\x20running\x20in\x20open\x20mode\x20—\x20all\x20requests\x20from\x20','POST','job.id\x20must\x20be\x20string','listTTL','Start\x20view','byType','Algorithm\x20worker\x20exited\x20with\x20code\x20','indexType','lat','/api/sync/gc/peer/:id/resync','_attachTimeMachine','items','Fetches\x20the\x20locally\x20available\x20models\x20from\x20any\x20Ollama\x20server\x20URL\x20without\x20needing\x20a\x20registered\x20embedder.','inline\x20processor\x20error\x20(','Actions:\x20list\x20(per\x20env);\x20create\x20(env+type+ftsName+config{fields,\x20language,\x20stemming,\x20...});\x20','Cancels\x20a\x20pending\x20or\x20running\x20job\x20by\x20marking\x20it\x20as\x20failed\x20with\x20status_code=cancelled.','preparer\x20must\x20be\x20a\x20function','_isOpen','Revokes\x20(deletes)\x20an\x20API\x20token.',';\x20Path=','vector','merge','Unknown\x20client_id\x20—\x20register\x20first\x20via\x20POST\x20/oauth/register,\x20or\x20use\x20a\x20built-in\x20dev\x20client\x20(e.g.\x20MCP\x20Inspector\x20should\x20call\x20its\x20\x22Register\x20Client\x22\x20/\x20\x22Quick\x20OAuth\x20Flow\x22\x20before\x20authorizing).','auth:write',',\x0a\x20\x20\x20\x20\x20\x20\x20\x20state:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','INVALID_STATE','exports','body.source_type\x20required','remote','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','is\x20required','ref_violations_list_type','Unknown\x20engine\x20type:\x20\x22','/api/env/:env/engines/:type/:name/retry','job\x20is\x20not\x20running:\x20','propertyNames','destroy','HNSW_BINDINGS_UNAVAILABLE','ENV_REMOVED','processor_retry','health','image/png','(none)','sse','timingSafeEqual','\x22*\x22\x20alone\x20grants\x20everything;\x20wildcards\x20are\x20allowed\x20in\x20either\x20half\x20(\x22data:*\x22,\x20\x22*:read\x22).\x20','\x22\x20must\x20have\x20a\x20start()\x20method','Metric','x-forwarded-for','claim_batch_limit','bucket.id\x20must\x20be\x20non-empty\x20string','protocolVersion','_active','_applyRetentionPolicy','type_register','clear_done','Unknown\x20OKDB\x20transaction\x20error','TTL_CLEAR','embeddings_worker_create','inline\x20processor\x20returned\x20Promise\x20(ignored)','_session','TTL\x20statistics','index_register','files.upload:\x20stream\x20is\x20required','usedBy','stopTimeout','_pullBlobFromPeer','can\x20mean\x20different\x20things\x20depending\x20on\x20capability.\x20Use\x20it\x20when\x20you\x20need\x20uniform\x20dispatch\x20from\x20a\x20generic\x20client;\x20otherwise\x20reach\x20for\x20the\x20focused\x20tool.','Returns\x20recent\x20changes\x20across\x20ALL\x20sync-enabled\x20environments,\x20newest\x20first.\x20Each\x20entry\x20has\x20_env\x20field.','embeddings:indexer:doc:failed','batchUpdateIndex','_cleanupViewStorage','text/markdown;\x20charset=utf-8','EBUSY','sync_links_remove','scanUniqueViolations','kid','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','\x20requires\x20unsafe:\x20true','dropFts','processor_list','markdown','reset','LICENSE_ACTIVATED','reset_cursor','_buffer','Engine\x20store\x20env\x20not\x20set:\x20','queue:reconciled','function_list_global','Creates\x20a\x20new\x20engine\x20directly\x20without\x20requiring\x20a\x20pipeline\x20record.','/views/:name','remote\x20did\x20not\x20return\x20a\x20token\x20after\x20login','Invalid\x20index\x20key\x20type\x20for\x20\x27','routes','Delete\x20item','Could\x20not\x20dynamically\x20require\x20\x22','[indexer]\x20no\x20storage\x20adapter\x20resolved\x20for\x20\x22','create_view','\x22\x20is\x20not\x20registered','events','LICENSE_REMOVED','engine\x20config\x20patch\x20must\x20be\x20an\x20object','_ensureDbs','_stopFtsProcessor','operations','BAD_ENQUEUE','<','Executes\x20multiple\x20put/update/patch/remove\x20operations\x20atomically.\x20Either\x20all\x20writes\x20commit\x20or\x20none\x20do.\x20','Convenience\x20alias\x20for\x20index\x20field\x20paths.\x20MCP\x20joins\x20these\x20with\x20\x22~\x22\x20and\x20sends\x20them\x20as\x20the\x20canonical\x20index\x20id.','minLon','mtimeMs','extractIndexKey','search\x20query\x20must\x20be\x20a\x20string\x20or\x20Float32Array','~ttl:expiry','restartReason','samplePayloads','compact_env','relay:error','createLoginState','pipelineFamily','\x20—\x20no\x20doc-status\x20rows\x20found','_resolveEnv','processor\x20not\x20found','/views/:name/meta','env_type_pipeline_rebuild','_oauthAllowedEmails','minLength\x20','verify','delete_item','describeIndexes','job_type.defaults.backoff_multiplier\x20must\x20be\x20number\x20>=\x201\x20or\x20null','Lax','STARTING','[/env/:env=','Queue\x20worker\x20that\x20processes\x20embedding\x20jobs\x20for\x20a\x20queue-mode\x20indexer.','no\x20license\x20—\x20running\x20on\x20free\x20tier','access-control-allow-credentials','/transaction','_sanitizeCapabilityProperties','usearch\x20algorithm\x20unavailable:\x20the\x20native\x20\x22usearch\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','Returns\x20registered\x20engine\x20driver\x20types\x20plus\x20any\x20self-declared\x20config\x20schema,\x20examples,\x20patchability,\x20and\x20creation\x20notes.','Unique\x20constraint\x20is\x20not\x20supported\x20on\x20geo\x20indexes','ambiguous','_setRuntimeState','createSearch','Activation\x20invalid:\x20','[indexer]\x20uninstalled\x20','\x22\x20conflicts\x20with\x20existing\x20generic\x20pipeline\x20topology','ttlStats','statusCode','_startSystemEnvProcessor','/api/env/:env/pipelines','pipeline\x20\x22','job_type.defaults.retry_delay\x20must\x20be\x20int\x20>=\x200\x20or\x20null','/api/tags','application/javascript','job_type.payload_schema\x20must\x20be\x20object|null','getBlobStatus','Scan,\x20index-query,\x20FTS,\x20or\x20vector-search\x20a\x20type.','stateCookieName','Comma-separated\x20event\x20filter\x20list','/functions/validate','job_type.defaults.priority\x20must\x20be\x20int\x20or\x20null','\x20(type=','_logChange','killed','env_pipeline_delete','Snapshot\x20HNSW\x20index','near.field\x20is\x20required','sha256','isIP','for\x20','destroyed','queue_stats_rebuild','listPath','generateKeypair','/api/events/types','flatMap','getFieldValue','_callMcpApi','pipeline_templates_list','system:poke','INVALID_INDEX_KEY','update\x20(env+id+claim_id\x20with\x20status,\x20progress,\x20result,\x20error,\x20status_message,\x20code,\x20message);\x20','ENGINE_STATUS','time-machine','../','Unrecognized\x20input\x20—\x20expected\x20a\x20license\x20blob\x20(~150–250\x20chars)\x20or\x20activation\x20token\x20(124\x20chars).','\x20fetching\x20','SCHEMA_SET','filesLocked','env_type_pipeline_nearest','INDEXER_NOT_RUNNING','DOC_STATUS_CHANGE','site.webmanifest','~function_runs','all','bus:poke','_configDb','changes','/admin/setup/join','Active\x20claim\x20ID\x20for\x20the\x20running\x20job','rawResponse',',\x20chunk=','license:removed','Engine\x20template\x20already\x20registered:\x20','_assertOpen','ENGINE_EVENTS','ctx.env.getCount(type)\x20—\x20count\x20without\x20scanning','Run\x20function\x20(env-scoped)','format','/api/env/:env/type/:type/violations/:key','signCookie','created','isView','ftsIndexes','_getLoginConfig','removeJobTypeSchema','~log','Pipeline\x20name','.\x20Supported:\x20','INTERNAL_ERROR','Required,\x20non-empty.\x20Each\x20key\x20is\x20an\x20output\x20field;\x20each\x20value\x20is\x20a\x20reducer\x20spec.\x20Built-ins:\x20{\x20$count:\x20true\x20}\x20|\x20{\x20$sum:\x20\x22field\x22\x20}\x20|\x20{\x20$avg:\x20\x22field\x22\x20}\x20|\x20{\x20$min:\x20\x22field\x22\x20}\x20|\x20{\x20$max:\x20\x22field\x22\x20}\x20|\x20{\x20$countBy:\x20\x22field\x22\x20}.\x20Add\x20items:\x20true\x20to\x20expose\x20matching\x20source\x20docs\x20via\x20.items().\x20For\x20child\x20aggregations\x20use\x20{\x20$ref:\x20{\x20type,\x20key,\x20filter?,\x20reduce\x20}\x20}\x20where\x20\x22key\x22\x20is\x20the\x20FK\x20field\x20on\x20the\x20child\x20type\x20pointing\x20back\x20to\x20the\x20parent.','schema:set','x-okdb-signature','chunk','_routeArgsForCapability','Embeddings\x20indexer\x20that\x20enqueues\x20work\x20for\x20one\x20or\x20more\x20embed-workers.','connect','/api/embeddings/indexers','keepSnapshots','\x20on\x20','Array\x20must\x20have\x20<=\x20','Get\x20function\x20run\x20(env-scoped)','getByPrefix','\x20already\x20exists','connection','queue-worker','Generic\x20pipelines\x20(sequence\x20of\x20engines):\x20generic_list_all,\x20generic_list,\x20generic_get,\x20generic_create,\x20generic_scaffold,\x20generic_start,\x20generic_stop,\x20generic_delete.\x20','_reopenAfterDrain','~sync_nodes','reducers','localhost','The\x20raw\x20token\x20string\x20is\x20returned\x20ONLY\x20in\x20this\x20response\x20—\x20store\x20it\x20then.\x20','processor','Embedder\x20engines\x20are\x20typically\x20shared\x20across\x20many\x20indexer/search\x20pipelines.','\x20must\x20be\x20number','queue:read','Type\x20\x22',',\x20signal=','job\x20claimed','stopFn','API\x20route\x20registry','Import\x20database\x20export','filterFn','methods','queue_stats','markJobFail','List\x20unique-index\x20violations','onUndo','queue_update_job','/api/processors/:id','ftsQuery','Returns\x20the\x20stored\x20definition\x20for\x20the\x20named\x20view.','trim','_dispatch','_closed','_lookupByTokenHash','OpenAI-Organization','note','Register\x20FTS\x20index','verifyActivation','Sync','head','20fiOgJu','lastProcessedClock','sampled','[embedder]\x20stopped\x20','files','\x20bytes,\x20received\x20','emit','fake','geoQuery','_restartRunner','_buildMcpApiTool','Returns\x20a\x20markdown\x20file\x20or\x20asset\x20from\x20the\x20bundled\x20docs/\x20directory.\x20','stateTtlMs','_loop','/api/env/:env/time-machine/changes','Create\x20pipelines\x20via\x20okdb.env(name).pipelines.create(...)','Flat\x20vector\x20search','paused','queue_retry_failed_jobs','isGrouped','Queue\x20worker\x20starter','</div>\x0a\x20\x20\x20\x20<div\x20class=\x22tabs\x22>\x0a\x20\x20\x20\x20\x20\x20<button\x20class=\x22tab\x20active\x22\x20onclick=\x22sw(\x27pw\x27)\x22\x20type=\x22button\x22>Password</button>\x0a\x20\x20\x20\x20\x20\x20<button\x20class=\x22tab\x22\x20\x20\x20\x20\x20\x20\x20\x20onclick=\x22sw(\x27tk\x27)\x22\x20type=\x22button\x22>API\x20Token</button>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20id=\x22pw\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22field\x22\x20style=\x22margin-bottom:12px\x22><label>Username</label><input\x20id=\x22username\x22\x20type=\x22text\x22\x20value=\x22admin\x22\x20autocomplete=\x22username\x22></div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22field\x22><label>Password</label><input\x20id=\x22password\x22\x20type=\x22password\x22\x20autocomplete=\x22current-password\x22></div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20id=\x22tk\x22\x20style=\x22display:none\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22field\x22><label>API\x20Token</label><input\x20id=\x22token\x22\x20type=\x22password\x22\x20placeholder=\x22Bearer\x20token\x22\x20autocomplete=\x22off\x22></div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<button\x20id=\x22submit\x22\x20type=\x22button\x22>Authorize</button>\x0a\x20\x20\x20\x20<div\x20class=\x22note\x22>You\x20will\x20be\x20redirected\x20back\x20to\x20','failOnHandlerError','next','Updates\x20synced\x20declaration\x20fields\x20such\x20as\x20enabled,\x20affinity,\x20meta,\x20and\x20driver-approved\x20config\x20patches,\x20then\x20re-evaluates\x20local\x20activation.','createCipheriv','db_call','bus:drain','retryFailed\x20not\x20available\x20on\x20this\x20indexer\x20(inline\x20mode?)','Actions:\x20list\x20(indexes\x20for\x20a\x20type);\x20create\x20(env+type+fields,\x20optional\x20unique,\x20indexType,\x20precision);\x20','stringify','_handle','env_type_pipeline_start','warn','createEnvironment','string','indexToDb','fill','_heartbeatLease','queue:write','views_list','Function\x20is\x20disabled:\x20','execution','metaDb','getEngine','Engine\x20type\x20is\x20required','remoteAddress','maxProperties\x20','Fake\x20—\x20768\x20dims,\x20realistic\x20size\x20for\x20testing','code,\x20client_id\x20and\x20redirect_uri\x20are\x20required','cursorKey\x20required','Source\x20type\x20whose\x20change\x20log\x20is\x20consumed.','const','[engines]\x20failed\x20to\x20start\x20engine\x20','Use\x20action=\x22get_view_definition\x22\x20on\x20an\x20existing\x20view\x20to\x20see\x20a\x20concrete\x20definition\x20shape.','hnsw\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','OKDBEngines\x20not\x20started','Indexer\x20engine\x20not\x20running:\x20\x22','Stop\x20view','update_function_global','getJobType','Provide\x20a\x20license\x20blob\x20or\x20activation\x20token.','/api/env/:env/info','OAuth\x20provider\x20did\x20not\x20return\x20an\x20email','Manage\x20OKDB\x20types\x20(a\x20type\x20is\x20a\x20logical\x20collection\x20like\x20a\x20table)\x20within\x20an\x20env.\x20','previewTemplate','[embed-worker]\x20transient\x20failure\x20(','floor','application/json','/job/:id/progress','array','cf-connecting-ip','createReadStream','_remove','privateKey','env_type_pipelines_list','duplicate\x20bucket:\x20','both','indexName','queue-worker\x20\x22','exportToStream','Drops\x20a\x20secondary\x20index\x20from\x20a\x20type.','INDEX_DROP','registration','Returns\x20the\x20event\x20catalogue\x20and\x20recommended\x20subsets\x20used\x20by\x20the\x20admin\x20UI\x20event\x20selector.','Put\x20item','X-OKDB-BodyHash','tools/list','putCursor','lockPath','split','_isSupportedCapability','OpenAI\x20Ada\x20v2\x20(legacy)','Returns\x20one\x20generic\x20pipeline\x20record\x20with\x20derived\x20aggregate\x20health\x20and\x20member\x20engine\x20state.','Set\x20payload\x20schema\x20for\x20a\x20job\x20type','fts\x20reset\x20failed','durability','return\x20{\x20written\x20}\x20makes\x20the\x20result\x20machine-verifiable','Claim\x20next\x20job','Query-time\x20exploration\x20factor\x20—\x20higher\x20=\x20better\x20recall,\x20slower\x20queries.','materializer','Remove\x20a\x20registered\x20job\x20type','definition\x20required','PUB_FINGERPRINT','_startHeartbeat','writeFileSync','View\x20\x22','fake-v768','job\x20not\x20found:\x20','job\x20type\x20must\x20be\x20object','method','Creates\x20a\x20single\x20indexer\x20engine.\x20source_env\x20defaults\x20to\x20\x22default\x22.\x20Prefer\x20POST\x20/api/env/:env/type/:type/pipelines\x20for\x20normal\x20use.','[indexer]\x20embed\x20failed\x20for\x20\x22','ensure','/job/:id/retry','fts','bucket_tokens','envs','status','CONFLICT','\x20doc-status\x20rows','async\x20(ctx)\x20=>\x20{\x0a\x20\x20let\x20written\x20=\x200\x0a\x0a\x20\x20ctx.env.txn(t\x20=>\x20{\x0a\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20100;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20t.put(\x27items\x27,\x20`item-${i}`,\x20{\x20index:\x20i,\x20createdAt:\x20Date.now()\x20})\x0a\x20\x20\x20\x20\x20\x20written++\x0a\x20\x20\x20\x20}\x0a\x20\x20})\x0a\x0a\x20\x20return\x20{\x20written\x20}\x0a}','asc','Update\x20pipelines\x20via\x20okdb.env(name).pipelines.update(...)','_cascadeRefAdd','\x22\x20is\x20not\x20in\x20the\x20allowedFetchDomains\x20list','~system','audiences','OpenAI\x20/\x20compatible\x20API','Returns\x20all\x20~sync_links\x20records.\x20Links\x20control\x20which\x20peers\x20sync\x20data\x20and\x20in\x20which\x20direction.','Retry\x20processor','env_engine_reset_cursor','listProviders','versions','magic','validateRouteInput','_cancelTTLTimeout','chunk_status:','/api/functions/:name','\x22\x20requires\x20an\x20active\x20queue\x20in\x20env\x20\x22','item:','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','$defs','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20','_geoQueryImpl','dims\x20mismatch:\x20expected\x20','Returns\x20all\x20known\x20models\x20grouped\x20by\x20provider.','cron_next\x20returned\x20invalid\x20timestamp','extname','minProperties','retryDoc\x20not\x20available\x20on\x20this\x20indexer\x20(inline\x20mode?)','list_runs\x20(env,\x20optional\x20name);\x20get_run\x20(env+runId).','putConfig','Consumes\x20changes\x20from\x20a\x20source\x20type\x20and\x20invokes\x20a\x20stored\x20function\x20handler\x20over\x20batches.','enginesRemoved','Sets\x20a\x20default\x20TTL\x20for\x20a\x20type.\x20New\x20items\x20inserted\x20into\x20this\x20type\x20will\x20automatically\x20receive\x20this\x20TTL\x20unless\x20an\x20explicit\x20TTL\x20is\x20provided.','android-chrome-192x192.png','unlinkSync','Max\x20attempts\x20before\x20permanent\x20failure.\x20null\x20=\x20unlimited.','index:','clear_item_ttl','[embed-worker]\x20','list_types','_matchRoute','system:drain','queue:removed','fts:drop','readMs','dropIndex','embeddings:doc:status_change','ftsName','Returns\x20metadata\x20for\x20a\x20single\x20token.','runInContext','constructor','fts_','async','publicKey','lockMaxAgeMs','auth_token_create','updatedBy','Worker\x20shutdown\x20timeout\x20—\x20job\x20interrupted','engineConfig','Template\x20\x22','Embeds\x20the\x20query\x20string\x20and\x20returns\x20the\x20k\x20nearest\x20documents\x20from\x20this\x20type\x20in\x20this\x20environment.','0123456789bcdefghjkmnpqrstuvwxyz','sync\x20feature\x20not\x20available','docEntry','RS256','TYPE_DRAINING','/api/sync/reconcile','_spawnRunner','redirect_uris','indexer_create','valueOf','isSetupMode','FTS\x20index\x20name\x20must\x20be\x20a\x20non-empty\x20string','exportToFile','maxLon','orphanedFrom','embed-worker\x20\x22','getMaxElements','Create\x20direct\x20engine\x20from\x20template','createPublicKey','env_engine_rebuild','RECONCILED','indexEventHandlers','activation\x20token\x20required','Schemas\x20may\x20include\x20foreign-key\x20ref\x20annotations\x20on\x20string\x20properties.\x20','memoryUsage','_envName','Unknown\x20durability\x20tier\x20\x22','secure','startNewEnginesFromSync','shutdownTimeout','Export\x20database','Plugin\x20name\x20\x27','ttl_sweep','oauth-clients.json','Creates\x20a\x20queue\x20consumer\x20that\x20processes\x20embedding\x20jobs\x20asynchronously.','_setJobTypeStatus',',\x20key=','sync','job','_vectorStores','Function\x20script\x20must\x20use\x20a\x20single\x20ctx\x20parameter,\x20e.g.\x20async\x20(ctx)\x20=>\x20{\x20}.\x20Do\x20not\x20destructure\x20it\x20as\x20async\x20({\x20ctx\x20})\x20=>\x20{\x20}.','https','6933048DgXlGE','typeHint','OKDBNotFoundError','registerTemplate','/admin/license/status','ENQUEUED','flat','Update\x20function','Duplicate\x20item\x20at\x20index\x20','Articles\x20ingest','_validateOperationRequest','completeJob','getDefinition','get_env_config','else','/api/env/:env/engines/:type/:name/restart','get_template','markDelete\x20drop=true\x20requires\x20explicit\x20clock','EMBEDDER_NOT_RUNNING','materializer\x20config.target_type\x20must\x20be\x20a\x20non-empty\x20string','/admin/vendor/okjs/*','Get\x20item','sync_gc_peer_resync','Materializer\x20starter','NOT_IMPLEMENTED','Lists\x20jobs\x20in\x20the\x20queue,\x20optionally\x20filtered\x20by\x20type/status/bucket/tag.','my-model','Function\x20script\x20failed\x20to\x20compile','getSync','system_meta','Scope\x20grants','tryAcquire','articles-body','consumeLoginState','/job/:id/remove','queue-worker\x20config.job_type\x20must\x20be\x20a\x20non-empty\x20string','cause','precision','get_function','Create\x20token','preview_function','markJobFail\x20failed\x20(claim\x20expired?)','List\x20providers','once','nodeB','FTS\x20index\x20configuration.\x20Must\x20include\x20\x22fields\x22:\x20an\x20array\x20of\x20field\x20paths\x20to\x20index,\x20e.g.\x20{\x20\x22fields\x22:\x20[\x22name\x22,\x20\x22description\x22]\x20}','after','Optional\x20filter\x20(sift\x20query)\x20and\x20map\x20(declarative\x20per-doc\x20transform)\x20further\x20shape\x20input.\x20','List\x20files\x20at\x20path','updateItemIndexes','/api/embeddings/embedders','FUNCTION_SCRIPT_UNKNOWN_CTX_PROP','env_type_pipeline_doc_mark_delete','_runBootstrapScan','Schema\x20&\x20Indexes','recv','preferred_username','link_upsert','Engine\x20template\x20id\x20must\x20be\x20a\x20non-empty\x20string','invalid\x20job_type.status:\x20','_syncApplyFtsRegister','_logTTLChange','\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20','guards','Discovery:\x20types\x20(engine\x20kinds),\x20templates\x20/\x20template_get\x20/\x20template_preview\x20/\x20template_create.\x20','gcIntervalMs','Bearer','sync_gc_status','Node\x20ID\x20to\x20filter\x20by','_running','near\x20requires\x20(lat\x20+\x20lon)\x20or\x20bbox','Remove\x20view','listJobTypes','_heartbeatTimer','detectedAt','Invalid\x20credentials','FTS\x20index\x20not\x20found:\x20','\x20(id:\x20','_refIndexDb','Stop\x20pipelines\x20via\x20okdb.env(name).pipelines.stop(...)','Get\x20pipeline','retryFailed','freeze','globalThis','reconcile','Unknown\x20JWKS\x20kid:\x20','env_type_pipeline_flush','sync_connect','source','job_progress','Returns\x20recent\x20changelog\x20entries\x20for\x20a\x20type.','isIndex','clear_type_default_ttl','markDelete','_pullBlobsFromPeer','Spawned\x20queue\x20worker\x20exited\x20before\x20ready\x20(code=','INDEXER_DOC_DONE','Value\x20must\x20NOT\x20match\x20the\x20given\x20schema','Get\x20one\x20job','stopping','Pause\x20engine','\x20unique\x20hashes\x20from\x20','2024-11-05','\x20embeddings\x20pipeline\x20using\x20the\x20','usearch','Create\x20embedder','delete;\x20rebuild;\x20search\x20(env+type+ftsName+query\x20string,\x20optional\x20options{limit,\x20filter,\x20...}\x20→\x20ranked\x20rows).','scopes','Get\x20stored\x20vector','TTL\x20sweep\x20error:\x20','_envSyncStop','lo_to_hi','item_put','inline','createPipeline','http://host:port','get_function_global','processor_get','Password\x20for\x20/auth/login\x20on\x20the\x20remote\x20node','_isBootstrap','generic_get','timemachine','allOf','STOPPING','BAD_PARAM','level','upload','indexOf','_flushDelayMs','closeSync','transport','builtinName','last-event-id','cursor','max','Deletes\x20a\x20generic\x20pipeline\x20record.\x20Engines\x20owned\x20by\x20the\x20same\x20env\x20are\x20removed;\x20shared/global\x20members\x20are\x20preserved.','env:opened','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','Extra\x20request\x20headers\x20for\x20call.','__identity','files\x20feature\x20not\x20available','Fail\x20job','ES256','keyForLabel','job.bucket_tokens\x20must\x20be\x20int\x20>=1','5cf671aada50aa8e','Version\x20mismatch\x20for\x20','labelToKey','patchableConfigKeys','chunk_pending','describeAllTypes','doc_mark_done','_markProgress','exclusiveMinimum','and','List\x20environments\x20and\x20read\x20environment\x20info.','bind','Creates\x20a\x20single\x20vector-search\x20engine.\x20source_env\x20defaults\x20to\x20\x22default\x22.\x20Include\x20source_type\x20so\x20env/type-scoped\x20admin\x20views\x20can\x20associate\x20the\x20engine\x20correctly.\x20Prefer\x20POST\x20/api/env/:env/type/:type/pipelines\x20for\x20normal\x20use.','NOT_SUPPORTED','Marks\x20a\x20claimed\x20running\x20job\x20as\x20failed\x20or\x20schedules\x20a\x20retry,\x20depending\x20on\x20retry\x20policy.','1442lYvUVe','parent\x20view\x20halted','check','/.well-known/oauth-authorization-server','_registerDrivers','direction:\x20both\x20|\x20lo_to_hi\x20|\x20hi_to_lo\x20(canonical,\x20lo\x20<\x20hi\x20alphabetically).\x20envs:\x20null\x20=\x20all\x20data\x20envs.','Create\x20pipeline\x20from\x20template','findIndex','body.','state','type:registered','kill','/api/env/:env/type/:type/pipelines/:pipeline/docs','Returns\x20active\x20violations\x20for\x20the\x20specified\x20unique\x20index.','/api/functions','_ensureTokensType','flags','dropSchema','\x20binding\x20references\x20missing\x20input\x20field:\x20','Streams\x20an\x20NDJSON\x20logical\x20export\x20for\x20one\x20or\x20more\x20environments.','/api/env/:env/type/:type/pipelines','/api/env/:env/pipelines/:pipeline/start','Bearer\x20$1…','TXN_CLOSED','Event\x20stream','integer','standalone','BAAI\x20BGE\x20Large','isArray','cursorKey','Creates\x20or\x20replaces\x20a\x20single\x20item\x20value\x20by\x20type\x20and\x20key.\x20Optionally\x20set\x20a\x20TTL\x20in\x20milliseconds.','sync_poke','addJobType','Actions:\x20run\x20(env+name+payload,\x20optional\x20jobContext\x20/\x20processorContext\x20/\x20materializerContext\x20→\x20invoke\x20a\x20saved\x20function);\x20','http:','_httpRegistered','my-embedder','files_blob_download','_reopenReject','/api/env/:env/engines/:type/:name/reset-cursor','last_error','embedder\x20\x22','filter','/job/:id','startHeartbeat','processor:ready','entryCount','Get\x20engine\x20template','attachment;\x20filename=\x22','DONE','run','Replacement\x20arrow\x20function\x20source\x20code','sin','body.job_type\x20required','opts','Grants:\x20per-env\x20additive\x20permissions,\x20shape\x20{\x20\x22<envName>\x22:\x20[\x22<ns>:<op>\x22,\x20...]\x20}\x20—\x20added\x20on\x20top\x20of\x20base\x20permissions\x20whenever\x20the\x20token\x20operates\x20inside\x20that\x20env.','ENV_REOPEN_TIMEOUT','finishedAt','createWriteStream','200','getStats','retry','system_backup','Referenced\x20key\x20\x27','_loadEntryFromEnv','atan2','apply','append',',\x20model=','SYNC_UNKNOWN_PEER','create\x20(env+type\x20→\x20register\x20a\x20new\x20type);\x20delete\x20(env+type,\x20force=true\x20to\x20drop\x20a\x20non-empty\x20type);\x20','locked','issueToken','score','checkForeignKeys','cookies','loginSelect','_refCache','_withExclusiveLock','Rebuild\x20FTS\x20index','entries','_reconcilePeerControl','createPipeline:\x20config.source_type\x20is\x20required','defaultTTL','claim',']\x20already\x20maps\x20to\x20\x27','getClocksInRange','.\x20Using\x20config.dims\x20—\x20verify\x20your\x20model.','mcp-session-id','Returns\x20all\x20types\x20in\x20the\x20selected\x20environment\x20with\x20record\x20counts\x20and\x20field\x20schemas.','fromWeb','Resets\x20a\x20failed/done\x20job\x20back\x20to\x20pending\x20with\x20a\x20fresh\x20tries\x20counter.',':\x20expected\x20','Safely\x20deletes\x20a\x20job\x20and\x20keeps\x20stats\x20counters\x20consistent.','_requestToRunner','unique:violation_resolved','matcher','[vector-search]\x20started\x20','ollama','exportName','[oauth]\x20failed\x20to\x20load\x20client\x20registrations:\x20','Ollama\x20URL','unset','function\x20returned','heapTotal','enable','cluster','String\x20length\x20must\x20be\x20<=\x20','typeSubDbs','_pokeListener','count','SCHEMA_COLLECTION_INVALID','\x22\x20does\x20not\x20support\x20cursor\x20reset','http://localhost:11434','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','_openViewDbs','clock','_streamToTemp','Index\x20\x22','BOOTSTRAP_LOCALHOST_ONLY','bodyMode','View\x20name','tokenTtl','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','generic_list','createdAt','is\x20required\x20for\x20MCP\x20calls','getHistory','processor\x20config.batchSize\x20must\x20be\x20a\x20positive\x20integer','get_view_meta','count_items','Engine\x20type\x20(materializer)','/functions/:name','removeJobType','~vectors','signRequest','openai','text/','processor\x20config.mode\x20must\x20be\x20\x22async\x22\x20or\x20\x22inline\x22','okdb_session_','violations_type','map','DB\x20identity\x20mismatch\x20ג€”\x20these\x20options\x20are\x20immutable\x20after\x20creation:\x0a','text/html;\x20charset=utf-8','jwk','env_type_pipeline_snapshot','requestId','Forbidden\x20—\x20requires\x20','ACTIVE','embedder.embed()\x20must\x20return\x20a\x20Float32Array','exp','stdout','getDocStatus','_normalizeOAuthAuthResult','name','refTrackingDbs','embeddings:indexer:doc:done','/ttl/list','mcp_api.call:\x20method\x20and\x20path\x20are\x20required','/api/sync/reconcile-all','favicon-32x32.png','describeAllTypesDetailed','\x20engine\x20not\x20running','processor\x20\x22','login\x20success\x20(token\x20endpoint)','_registerIndex','Pause\x20a\x20job\x20type','getAuthTag','queue_reconcile','Environment\x20already\x20exists:\x20','HierarchicalNSW','List\x20pipelines\x20across\x20opened\x20environments','_hlc','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','Create\x20embed\x20worker','Engine\x20not\x20found:\x20','ENGINE_INVALID_TEMPLATE','_oauthDefaultRoles','_onError','INVALID_CONFIG','addr','_engineSyncStop','[req]\x20','vector-search-hnsw','_nextExpiry','_cache','generic','freemem','Returns\x20DB\x20metadata:\x20size\x20on\x20disk,\x20clock,\x20page\x20stats,\x20loaded\x20plugins,\x20and\x20a\x20per-type\x20summary.','View\x20name\x20(no\x20whitespace,\x20must\x20not\x20start\x20with\x20\x22~\x22).','markDone:\x20vector\x20must\x20be\x20Float32Array','join\x20credential\x20rejected\x20by\x20remote:\x20','encryptionKey','S256','preview\x20(env+source+payload\x20→\x20run\x20an\x20unsaved\x20draft\x20inline,\x20no\x20save);\x20','_clockToKeysDb','Vector\x20search\x20engine','Delete\x20file','_ensureTypeEnv','isDirectory','published','RETRY','expansionAdd','Index-time\x20exploration\x20factor\x20(equivalent\x20to\x20efConstruction).','CLAIM_MISMATCH','removeRefIndexEntries','/enqueue/:type','/type/:type/index/:index/reset','Source\x20record\x20key','endsWith','rebuild','close','Queue\x20stats','putClockToKeys','_autoIndex','SCHEMA_VALIDATION_FAILED','list_buckets','Patch\x20document\x20must\x20contain\x20at\x20least\x20one\x20operation'];_0x523f=function(){return _0x3479e4;};return _0x523f();}function requireOkdbEngineTemplates(){if(hasRequiredOkdbEngineTemplates)return okdbEngineTemplates;hasRequiredOkdbEngineTemplates=0x1;function _0x3391aa(_0x2c3eca){const _0x2a25d0=_0x47ab;return _0x2c3eca==null?_0x2c3eca:JSON[_0x2a25d0(0xdcd)](JSON[_0x2a25d0(0xf75)](_0x2c3eca));}function _0x59b09c(_0x2eb491,_0x3c904d){const _0x22d9ba=_0x47ab;if(typeof _0x2eb491!==_0x22d9ba(0xf7a)||!_0x2eb491[_0x22d9ba(0xf4d)]())throw new Error(_0x3c904d+_0x22d9ba(0x309));return _0x2eb491[_0x22d9ba(0xf4d)]();}function _0x529564(_0x48b59f){const _0x1cb0d8=_0x47ab;return typeof _0x48b59f===_0x1cb0d8(0xf7a)&&_0x48b59f[_0x1cb0d8(0xf4d)]()?_0x48b59f[_0x1cb0d8(0xf4d)]():undefined;}function _0x7bf27d(_0x4e326a,_0x4c0833){const _0x182b6b=_0x47ab;if(_0x4e326a==null||_0x4e326a==='')return undefined;const _0x8adbc1=Math['trunc'](Number(_0x4e326a));if(!Number[_0x182b6b(0x474)](_0x8adbc1)||_0x8adbc1<0x1)throw new Error(_0x4c0833+_0x182b6b(0x94c));return _0x8adbc1;}function _0x173421(_0x330318){const _0x245f7b=_0x47ab;if(_0x330318==null||_0x330318==='')return undefined;return _0x330318===!![]||_0x330318===_0x245f7b(0x7e8)||_0x330318===0x1||_0x330318==='1';}function _0x50d2c5(_0x14ea4c,_0x37981d,_0x3e4adf=[]){const _0x102611=_0x47ab,_0x111c9f={'name':{'type':_0x102611(0xf7a),'description':_0x102611(0x1fc)},'model':{'type':'string','description':_0x37981d+'\x20model\x20name'},'dims':{'type':_0x102611(0x10f2),'minimum':0x1,'description':_0x102611(0x3f0)}},_0x224953=[_0x102611(0x1173)];for(const _0x11cae4 of _0x3e4adf){_0x111c9f[_0x11cae4['key']]={'type':_0x11cae4[_0x102611(0xaee)]===_0x102611(0x9f0)?_0x102611(0x9f0):_0x102611(0xf7a),'description':_0x11cae4[_0x102611(0x757)]??_0x11cae4['key'],'default':_0x11cae4[_0x102611(0x8d0)]};if(_0x11cae4[_0x102611(0x359)])_0x224953[_0x102611(0x597)](_0x11cae4[_0x102611(0x9dd)]);}return{'type':'object','required':_0x224953,'properties':_0x111c9f,'additionalProperties':![]};}return okdbEngineTemplates=function _0x371865(_0x12d26f){const _0x2d345d=_0x47ab,_0x560fca=_0x12d26f[_0x2d345d(0xd4f)],_0x9c16ff=_0x48c1de=>_0x12d26f[_0x2d345d(0x103c)](_0x48c1de),_0x53f6f6=()=>{const _0x27e893=_0x2d345d,_0x3b219f=typeof _0x560fca[_0x27e893(0x7f1)]?.[_0x27e893(0xfdb)]===_0x27e893(0x63b)?_0x560fca[_0x27e893(0x7f1)]['listProviders']():[];return new Map(_0x3b219f['map'](_0x11c735=>[_0x11c735[_0x27e893(0x9dd)],_0x11c735]));};_0x9c16ff({'id':_0x2d345d(0x93d),'kind':_0x2d345d(0xcbd),'family':_0x2d345d(0x1193),'engineType':'processor','recommended':!![],'summary':'Processor\x20starter','description':_0x2d345d(0x3af),'inputSchema':{'type':_0x2d345d(0xb36),'required':[_0x2d345d(0x1173),_0x2d345d(0x481),_0x2d345d(0x100)],'properties':{'name':{'type':_0x2d345d(0xf7a)},'source_type':{'type':_0x2d345d(0xf7a)},'source_env':{'type':'string'},'handler_name':{'type':_0x2d345d(0xf7a)},'handler_env':{'type':'string'},'mode':{'type':_0x2d345d(0xf7a),'enum':[_0x2d345d(0x1006),_0x2d345d(0x10aa)],'default':_0x2d345d(0x1006)},'bootstrap':{'type':_0x2d345d(0xf7a),'enum':['snapshot',_0x2d345d(0x9be)],'default':_0x2d345d(0x33f)},'batchSize':{'type':_0x2d345d(0x10f2),'minimum':0x1,'default':0x100},'originMode':{'type':_0x2d345d(0xf7a),'enum':[_0x2d345d(0x726),'remote',_0x2d345d(0xf09)],'default':'all'},'hydrateValues':{'type':_0x2d345d(0x854),'default':!![]},'failOnHandlerError':{'type':_0x2d345d(0x854),'default':!![]}},'additionalProperties':![]},'defaults':{'mode':'async','bootstrap':_0x2d345d(0x33f),'batchSize':0x100,'originMode':'all','hydrateValues':!![],'failOnHandlerError':!![]},'build'(_0x1d13de={}){const _0x53dd25=_0x2d345d;return{'kind':'engine','type':'processor','name':_0x59b09c(_0x1d13de[_0x53dd25(0x1173)],_0x53dd25(0x1173)),'config':{'source_type':_0x59b09c(_0x1d13de['source_type'],_0x53dd25(0x481)),'source_env':_0x529564(_0x1d13de[_0x53dd25(0x43a)]),'handler':{'kind':_0x53dd25(0x63b),'name':_0x59b09c(_0x1d13de[_0x53dd25(0x100)],_0x53dd25(0x100)),..._0x529564(_0x1d13de['handler_env'])?{'env':_0x529564(_0x1d13de[_0x53dd25(0x121c)])}:{}},..._0x529564(_0x1d13de[_0x53dd25(0x259)])?{'mode':_0x1d13de[_0x53dd25(0x259)]}:{},..._0x529564(_0x1d13de['bootstrap'])?{'bootstrap':_0x1d13de[_0x53dd25(0x781)]}:{},..._0x7bf27d(_0x1d13de[_0x53dd25(0xc2a)],_0x53dd25(0xc2a))?{'batchSize':_0x7bf27d(_0x1d13de['batchSize'],'batchSize')}:{},..._0x529564(_0x1d13de[_0x53dd25(0xb4)])?{'originMode':_0x1d13de[_0x53dd25(0xb4)]}:{},..._0x1d13de[_0x53dd25(0x581)]!=null?{'hydrateValues':_0x173421(_0x1d13de['hydrateValues'])}:{},..._0x1d13de[_0x53dd25(0xf6d)]!=null?{'failOnHandlerError':_0x173421(_0x1d13de[_0x53dd25(0xf6d)])}:{}}};}}),_0x9c16ff({'id':_0x2d345d(0x71d),'kind':_0x2d345d(0xcbd),'family':'generic','engineType':_0x2d345d(0xfbb),'recommended':!![],'summary':_0x2d345d(0x1050),'description':_0x2d345d(0x268),'inputSchema':{'type':'object','required':['name',_0x2d345d(0x481),_0x2d345d(0x11c3),_0x2d345d(0x100)],'properties':{'name':{'type':_0x2d345d(0xf7a)},'source_type':{'type':'string'},'target_type':{'type':_0x2d345d(0xf7a)},'source_env':{'type':_0x2d345d(0xf7a)},'target_env':{'type':_0x2d345d(0xf7a)},'handler_name':{'type':_0x2d345d(0xf7a)},'handler_env':{'type':_0x2d345d(0xf7a)},'bootstrap':{'type':'string','enum':[_0x2d345d(0x33f),_0x2d345d(0x9be)],'default':_0x2d345d(0x33f)},'batchSize':{'type':_0x2d345d(0x10f2),'minimum':0x1,'default':0x80},'originMode':{'type':'string','enum':[_0x2d345d(0x726),'remote',_0x2d345d(0xf09)],'default':_0x2d345d(0xf09)},'clearTargetOnRebuild':{'type':_0x2d345d(0x854),'default':!![]}},'additionalProperties':![]},'defaults':{'bootstrap':_0x2d345d(0x33f),'batchSize':0x80,'originMode':'all','clearTargetOnRebuild':!![]},'build'(_0x564c81={}){const _0x566ec6=_0x2d345d;return{'kind':_0x566ec6(0xcbd),'type':_0x566ec6(0xfbb),'name':_0x59b09c(_0x564c81[_0x566ec6(0x1173)],_0x566ec6(0x1173)),'config':{'source_type':_0x59b09c(_0x564c81[_0x566ec6(0x481)],_0x566ec6(0x481)),'target_type':_0x59b09c(_0x564c81[_0x566ec6(0x11c3)],_0x566ec6(0x11c3)),..._0x529564(_0x564c81['source_env'])?{'source_env':_0x529564(_0x564c81[_0x566ec6(0x43a)])}:{},..._0x529564(_0x564c81[_0x566ec6(0xa27)])?{'target_env':_0x529564(_0x564c81[_0x566ec6(0xa27)])}:{},'handler':{'kind':'function','name':_0x59b09c(_0x564c81['handler_name'],'handler_name'),..._0x529564(_0x564c81['handler_env'])?{'env':_0x529564(_0x564c81[_0x566ec6(0x121c)])}:{}},..._0x529564(_0x564c81[_0x566ec6(0x781)])?{'bootstrap':_0x564c81[_0x566ec6(0x781)]}:{},..._0x7bf27d(_0x564c81[_0x566ec6(0xc2a)],_0x566ec6(0xc2a))?{'batchSize':_0x7bf27d(_0x564c81[_0x566ec6(0xc2a)],_0x566ec6(0xc2a))}:{},..._0x529564(_0x564c81[_0x566ec6(0xb4)])?{'originMode':_0x564c81[_0x566ec6(0xb4)]}:{},..._0x564c81[_0x566ec6(0x455)]!=null?{'clearTargetOnRebuild':_0x173421(_0x564c81[_0x566ec6(0x455)])}:{}}};}}),_0x9c16ff({'id':_0x2d345d(0x11e3),'kind':_0x2d345d(0xcbd),'family':_0x2d345d(0x1193),'engineType':_0x2d345d(0xf32),'recommended':!![],'summary':_0x2d345d(0xf6b),'description':_0x2d345d(0x54e),'inputSchema':{'type':_0x2d345d(0xb36),'required':[_0x2d345d(0x1173),_0x2d345d(0x5da),_0x2d345d(0x100)],'properties':{'name':{'type':_0x2d345d(0xf7a)},'job_type':{'type':'string'},'queue_env':{'type':_0x2d345d(0xf7a)},'handler_name':{'type':_0x2d345d(0xf7a)},'handler_env':{'type':_0x2d345d(0xf7a)},'concurrency':{'type':_0x2d345d(0x10f2),'minimum':0x1,'default':0x1},'pollInterval':{'type':_0x2d345d(0x10f2),'minimum':0x1,'default':0x64},'ttl':{'type':_0x2d345d(0x10f2),'minimum':0x1,'default':0x7530}},'additionalProperties':![]},'defaults':{'concurrency':0x1,'pollInterval':0x64,'ttl':0x7530},'build'(_0x57ccf5={}){const _0x2bb3ca=_0x2d345d;return{'kind':_0x2bb3ca(0xcbd),'type':_0x2bb3ca(0xf32),'name':_0x59b09c(_0x57ccf5[_0x2bb3ca(0x1173)],_0x2bb3ca(0x1173)),'config':{'job_type':_0x59b09c(_0x57ccf5[_0x2bb3ca(0x5da)],_0x2bb3ca(0x5da)),..._0x529564(_0x57ccf5[_0x2bb3ca(0x956)])?{'queue_env':_0x529564(_0x57ccf5[_0x2bb3ca(0x956)])}:{},'handler':{'kind':_0x2bb3ca(0x63b),'name':_0x59b09c(_0x57ccf5['handler_name'],_0x2bb3ca(0x100)),..._0x529564(_0x57ccf5[_0x2bb3ca(0x121c)])?{'env':_0x529564(_0x57ccf5[_0x2bb3ca(0x121c)])}:{}},..._0x7bf27d(_0x57ccf5[_0x2bb3ca(0xe4)],_0x2bb3ca(0xe4))?{'concurrency':_0x7bf27d(_0x57ccf5['concurrency'],'concurrency')}:{},..._0x7bf27d(_0x57ccf5['pollInterval'],_0x2bb3ca(0x7e3))?{'pollInterval':_0x7bf27d(_0x57ccf5[_0x2bb3ca(0x7e3)],'pollInterval')}:{},..._0x7bf27d(_0x57ccf5[_0x2bb3ca(0x347)],'ttl')?{'ttl':_0x7bf27d(_0x57ccf5[_0x2bb3ca(0x347)],_0x2bb3ca(0x347))}:{}}};}});for(const _0x42c807 of[_0x2d345d(0xf5e),_0x2d345d(0x113b),_0x2d345d(0x1161)]){_0x9c16ff({'id':'embedder-'+_0x42c807,'kind':_0x2d345d(0xcbd),'family':_0x2d345d(0x7f1),'engineType':_0x2d345d(0x37b),'recommended':_0x42c807==='fake'||_0x42c807===_0x2d345d(0x113b),'summary':_0x42c807+'\x20embedder','description':_0x2d345d(0xa93)+_0x42c807+_0x2d345d(0x847),'inputSchema'(){const _0x46128c=_0x2d345d,_0x3213bc=_0x53f6f6()[_0x46128c(0xbeb)](_0x42c807)??{'label':_0x42c807,'fields':[]};return _0x50d2c5(_0x42c807,_0x3213bc[_0x46128c(0x757)]??_0x42c807,_0x3213bc[_0x46128c(0x461)]??[]);},'defaults':_0x42c807==='fake'?{'model':_0x2d345d(0xcfb)}:_0x42c807===_0x2d345d(0x113b)?{'url':'http://localhost:11434'}:{'base_url':'https://api.openai.com/v1'},'build'(_0x32b1a8={}){const _0x835bc2=_0x2d345d,_0x57aa84=_0x53f6f6()[_0x835bc2(0xbeb)](_0x42c807)??{'fields':[]},_0x1c2dbb={'type':_0x42c807},_0x3d3bc6=_0x59b09c(_0x32b1a8['name'],_0x835bc2(0x1173));if(_0x529564(_0x32b1a8[_0x835bc2(0x7d4)]))_0x1c2dbb[_0x835bc2(0x7d4)]=_0x529564(_0x32b1a8['model']);if(_0x7bf27d(_0x32b1a8[_0x835bc2(0xa67)],_0x835bc2(0xa67)))_0x1c2dbb[_0x835bc2(0xa67)]=_0x7bf27d(_0x32b1a8[_0x835bc2(0xa67)],_0x835bc2(0xa67));for(const _0x342ae9 of _0x57aa84[_0x835bc2(0x461)]??[]){const _0x3bcb19=_0x32b1a8[_0x342ae9[_0x835bc2(0x9dd)]];if(_0x3bcb19==null||_0x3bcb19===''){if(_0x342ae9[_0x835bc2(0x8d0)]!==undefined)_0x1c2dbb[_0x342ae9[_0x835bc2(0x9dd)]]=_0x342ae9[_0x835bc2(0x8d0)];}else _0x1c2dbb[_0x342ae9[_0x835bc2(0x9dd)]]=_0x342ae9[_0x835bc2(0xaee)]===_0x835bc2(0x9f0)?Number(_0x3bcb19):String(_0x3bcb19);}return{'kind':'engine','type':_0x835bc2(0x37b),'name':_0x3d3bc6,'config':_0x1c2dbb};}});}_0x9c16ff({'id':'indexer-inline','kind':_0x2d345d(0xcbd),'family':_0x2d345d(0x7f1),'engineType':_0x2d345d(0xa4a),'recommended':!![],'summary':'Inline\x20embeddings\x20indexer','description':_0x2d345d(0x122c),'inputSchema':{'type':_0x2d345d(0xb36),'required':[_0x2d345d(0x1173),_0x2d345d(0x481),_0x2d345d(0x1cc),_0x2d345d(0x37b)],'properties':{'name':{'type':_0x2d345d(0xf7a)},'source_type':{'type':'string'},'source_env':{'type':_0x2d345d(0xf7a)},'storage_key':{'type':'string'},'embedder':{'type':_0x2d345d(0xf7a)},'field':{'type':_0x2d345d(0xf7a)},'dims':{'type':_0x2d345d(0x10f2),'minimum':0x1}},'additionalProperties':![]},'build'(_0x2236b0={}){const _0x4a9e3d=_0x2d345d;return{'kind':_0x4a9e3d(0xcbd),'type':_0x4a9e3d(0xa4a),'name':_0x59b09c(_0x2236b0[_0x4a9e3d(0x1173)],_0x4a9e3d(0x1173)),'config':{'source_type':_0x59b09c(_0x2236b0[_0x4a9e3d(0x481)],'source_type'),'storage_key':_0x59b09c(_0x2236b0[_0x4a9e3d(0x1cc)],_0x4a9e3d(0x1cc)),'embedder':_0x59b09c(_0x2236b0[_0x4a9e3d(0x37b)],'embedder'),..._0x529564(_0x2236b0['source_env'])?{'source_env':_0x529564(_0x2236b0[_0x4a9e3d(0x43a)])}:{},..._0x529564(_0x2236b0[_0x4a9e3d(0x221)])?{'field':_0x529564(_0x2236b0[_0x4a9e3d(0x221)])}:{},..._0x7bf27d(_0x2236b0[_0x4a9e3d(0xa67)],_0x4a9e3d(0xa67))?{'dims':_0x7bf27d(_0x2236b0['dims'],_0x4a9e3d(0xa67))}:{},'mode':'inline'}};}}),_0x9c16ff({'id':_0x2d345d(0x1f3),'kind':_0x2d345d(0xcbd),'family':_0x2d345d(0x7f1),'engineType':'indexer','recommended':!![],'summary':_0x2d345d(0x346),'description':_0x2d345d(0xf28),'inputSchema':{'type':_0x2d345d(0xb36),'required':[_0x2d345d(0x1173),'source_type',_0x2d345d(0x1cc),_0x2d345d(0x37b)],'properties':{'name':{'type':_0x2d345d(0xf7a)},'source_type':{'type':'string'},'source_env':{'type':'string'},'storage_key':{'type':'string'},'embedder':{'type':_0x2d345d(0xf7a)},'field':{'type':_0x2d345d(0xf7a)},'dims':{'type':_0x2d345d(0x10f2),'minimum':0x1},'job_type':{'type':_0x2d345d(0xf7a)}},'additionalProperties':![]},'build'(_0x49bb32={}){const _0x7e32df=_0x2d345d;return{'kind':_0x7e32df(0xcbd),'type':_0x7e32df(0xa4a),'name':_0x59b09c(_0x49bb32[_0x7e32df(0x1173)],_0x7e32df(0x1173)),'config':{'source_type':_0x59b09c(_0x49bb32['source_type'],_0x7e32df(0x481)),'storage_key':_0x59b09c(_0x49bb32[_0x7e32df(0x1cc)],_0x7e32df(0x1cc)),'embedder':_0x59b09c(_0x49bb32[_0x7e32df(0x37b)],_0x7e32df(0x37b)),..._0x529564(_0x49bb32[_0x7e32df(0x43a)])?{'source_env':_0x529564(_0x49bb32[_0x7e32df(0x43a)])}:{},..._0x529564(_0x49bb32[_0x7e32df(0x221)])?{'field':_0x529564(_0x49bb32[_0x7e32df(0x221)])}:{},..._0x7bf27d(_0x49bb32[_0x7e32df(0xa67)],'dims')?{'dims':_0x7bf27d(_0x49bb32[_0x7e32df(0xa67)],_0x7e32df(0xa67))}:{},..._0x529564(_0x49bb32['job_type'])?{'job_type':_0x529564(_0x49bb32[_0x7e32df(0x5da)])}:{},'mode':_0x7e32df(0x879)}};}}),_0x9c16ff({'id':_0x2d345d(0x16f),'kind':'engine','family':_0x2d345d(0x7f1),'engineType':_0x2d345d(0xd8a),'recommended':!![],'summary':_0x2d345d(0xf67),'description':_0x2d345d(0x26f),'inputSchema':{'type':_0x2d345d(0xb36),'required':[_0x2d345d(0x1173),'storage_key'],'properties':{'name':{'type':_0x2d345d(0xf7a)},'storage_key':{'type':'string'},'source_type':{'type':_0x2d345d(0xf7a)},'source_env':{'type':_0x2d345d(0xf7a)},'embedder':{'type':_0x2d345d(0xf7a)},'dims':{'type':_0x2d345d(0x10f2),'minimum':0x1}},'additionalProperties':![]},'build'(_0x1f0c22={}){const _0x56cdfa=_0x2d345d;return{'kind':_0x56cdfa(0xcbd),'type':_0x56cdfa(0xd8a),'name':_0x59b09c(_0x1f0c22['name'],_0x56cdfa(0x1173)),'config':{'storage_key':_0x59b09c(_0x1f0c22[_0x56cdfa(0x1cc)],'storage_key'),..._0x529564(_0x1f0c22['source_type'])?{'source_type':_0x529564(_0x1f0c22[_0x56cdfa(0x481)])}:{},..._0x529564(_0x1f0c22[_0x56cdfa(0x43a)])?{'source_env':_0x529564(_0x1f0c22[_0x56cdfa(0x43a)])}:{},..._0x529564(_0x1f0c22[_0x56cdfa(0x37b)])?{'embedder':_0x529564(_0x1f0c22[_0x56cdfa(0x37b)])}:{},..._0x7bf27d(_0x1f0c22[_0x56cdfa(0xa67)],'dims')?{'dims':_0x7bf27d(_0x1f0c22[_0x56cdfa(0xa67)],_0x56cdfa(0xa67))}:{},'algorithm':_0x56cdfa(0x103f)}};}}),_0x9c16ff({'id':_0x2d345d(0x1190),'kind':_0x2d345d(0xcbd),'family':_0x2d345d(0x7f1),'engineType':_0x2d345d(0xd8a),'recommended':!![],'summary':_0x2d345d(0xa63),'description':_0x2d345d(0xace),'inputSchema':{'type':_0x2d345d(0xb36),'required':[_0x2d345d(0x1173),_0x2d345d(0x1cc)],'properties':{'name':{'type':_0x2d345d(0xf7a)},'storage_key':{'type':_0x2d345d(0xf7a)},'source_type':{'type':_0x2d345d(0xf7a)},'source_env':{'type':_0x2d345d(0xf7a)},'embedder':{'type':_0x2d345d(0xf7a)},'dims':{'type':_0x2d345d(0x10f2),'minimum':0x1},'M':{'type':_0x2d345d(0x10f2),'minimum':0x1,'default':0x10},'efConstruction':{'type':_0x2d345d(0x10f2),'minimum':0x1,'default':0xc8},'efSearch':{'type':'integer','minimum':0x1,'default':0x40}},'additionalProperties':![]},'build'(_0x41eb34={}){const _0x472a0c=_0x2d345d;return{'kind':_0x472a0c(0xcbd),'type':'vector-search','name':_0x59b09c(_0x41eb34[_0x472a0c(0x1173)],_0x472a0c(0x1173)),'config':{'storage_key':_0x59b09c(_0x41eb34[_0x472a0c(0x1cc)],_0x472a0c(0x1cc)),..._0x529564(_0x41eb34[_0x472a0c(0x481)])?{'source_type':_0x529564(_0x41eb34[_0x472a0c(0x481)])}:{},..._0x529564(_0x41eb34[_0x472a0c(0x43a)])?{'source_env':_0x529564(_0x41eb34[_0x472a0c(0x43a)])}:{},..._0x529564(_0x41eb34['embedder'])?{'embedder':_0x529564(_0x41eb34[_0x472a0c(0x37b)])}:{},..._0x7bf27d(_0x41eb34[_0x472a0c(0xa67)],_0x472a0c(0xa67))?{'dims':_0x7bf27d(_0x41eb34[_0x472a0c(0xa67)],_0x472a0c(0xa67))}:{},'algorithm':_0x472a0c(0x41e),'algorithm_config':{..._0x7bf27d(_0x41eb34['M'],'M')?{'M':_0x7bf27d(_0x41eb34['M'],'M')}:{},..._0x7bf27d(_0x41eb34['efConstruction'],_0x472a0c(0x4e0))?{'efConstruction':_0x7bf27d(_0x41eb34[_0x472a0c(0x4e0)],'efConstruction')}:{},..._0x7bf27d(_0x41eb34[_0x472a0c(0xce0)],'efSearch')?{'efSearch':_0x7bf27d(_0x41eb34[_0x472a0c(0xce0)],_0x472a0c(0xce0))}:{}}}};}}),_0x9c16ff({'id':_0x2d345d(0xc49),'kind':_0x2d345d(0xcbd),'family':_0x2d345d(0x7f1),'engineType':_0x2d345d(0x17a),'recommended':!![],'summary':_0x2d345d(0xbcb),'description':_0x2d345d(0xecb),'inputSchema':{'type':_0x2d345d(0xb36),'required':[_0x2d345d(0x1173),_0x2d345d(0x5da),_0x2d345d(0xa4a),_0x2d345d(0x37b)],'properties':{'name':{'type':_0x2d345d(0xf7a)},'job_type':{'type':'string'},'indexer':{'type':_0x2d345d(0xf7a)},'embedder':{'type':_0x2d345d(0xf7a)},'source_env':{'type':_0x2d345d(0xf7a)},'source_type':{'type':_0x2d345d(0xf7a)},'concurrency':{'type':_0x2d345d(0x10f2),'minimum':0x1,'default':0x1},'pollInterval':{'type':'integer','minimum':0x1,'default':0x3e8},'ttl':{'type':_0x2d345d(0x10f2),'minimum':0x1,'default':0x7530}},'additionalProperties':![]},'defaults':{'concurrency':0x1,'pollInterval':0x3e8,'ttl':0x7530},'build'(_0x1ef23a={}){const _0x5b1081=_0x2d345d;return{'kind':_0x5b1081(0xcbd),'type':_0x5b1081(0x17a),'name':_0x59b09c(_0x1ef23a[_0x5b1081(0x1173)],_0x5b1081(0x1173)),'config':{'job_type':_0x59b09c(_0x1ef23a[_0x5b1081(0x5da)],'job_type'),'indexer':_0x59b09c(_0x1ef23a['indexer'],_0x5b1081(0xa4a)),'embedder':_0x59b09c(_0x1ef23a[_0x5b1081(0x37b)],_0x5b1081(0x37b)),..._0x529564(_0x1ef23a[_0x5b1081(0x43a)])?{'source_env':_0x529564(_0x1ef23a[_0x5b1081(0x43a)])}:{},..._0x529564(_0x1ef23a['source_type'])?{'source_type':_0x529564(_0x1ef23a[_0x5b1081(0x481)])}:{},..._0x7bf27d(_0x1ef23a[_0x5b1081(0xe4)],_0x5b1081(0xe4))?{'concurrency':_0x7bf27d(_0x1ef23a[_0x5b1081(0xe4)],_0x5b1081(0xe4))}:{},..._0x7bf27d(_0x1ef23a['pollInterval'],'pollInterval')?{'pollInterval':_0x7bf27d(_0x1ef23a[_0x5b1081(0x7e3)],_0x5b1081(0x7e3))}:{},..._0x7bf27d(_0x1ef23a[_0x5b1081(0x347)],_0x5b1081(0x347))?{'ttl':_0x7bf27d(_0x1ef23a[_0x5b1081(0x347)],_0x5b1081(0x347))}:{}}};}}),_0x9c16ff({'id':'generic-processor','kind':'pipeline','family':'generic','pipelineFamily':_0x2d345d(0x1193),'recommended':!![],'summary':'Generic\x20processor\x20pipeline','description':'Scaffolds\x20a\x20generic\x20pipeline\x20containing\x20one\x20processor\x20engine.','inputSchema':{'type':_0x2d345d(0xb36),'required':[_0x2d345d(0x1173),_0x2d345d(0x481),'handler_name'],'properties':{'name':{'type':'string'},'engineName':{'type':'string'},'source_type':{'type':_0x2d345d(0xf7a)},'source_env':{'type':_0x2d345d(0xf7a)},'handler_name':{'type':_0x2d345d(0xf7a)},'handler_env':{'type':'string'},'bootstrap':{'type':_0x2d345d(0xf7a),'enum':[_0x2d345d(0x33f),_0x2d345d(0x9be)],'default':_0x2d345d(0x33f)},'batchSize':{'type':_0x2d345d(0x10f2),'minimum':0x1,'default':0x100}},'additionalProperties':![]},'build'(_0x51f0a9={},{envName:envName=_0x2d345d(0x8d0)}={}){const _0x40648c=_0x2d345d,_0x5cba16=_0x59b09c(_0x51f0a9[_0x40648c(0x1173)],_0x40648c(0x1173));return{'kind':'pipeline','pipelineFamily':_0x40648c(0x1193),'strategy':'scaffold','payload':{'name':_0x5cba16,'meta':{'label':_0x5cba16,'templateId':_0x40648c(0x375)},'members':[{'engineType':_0x40648c(0xf39),'engineName':_0x529564(_0x51f0a9[_0x40648c(0xaba)])??_0x5cba16+_0x40648c(0x20c),'role':_0x40648c(0xf39),'engineConfig':_0x3391aa({'source_type':_0x59b09c(_0x51f0a9['source_type'],_0x40648c(0x481)),'source_env':_0x529564(_0x51f0a9[_0x40648c(0x43a)])??envName,'handler':{'kind':_0x40648c(0x63b),'name':_0x59b09c(_0x51f0a9[_0x40648c(0x100)],'handler_name'),..._0x529564(_0x51f0a9['handler_env'])?{'env':_0x529564(_0x51f0a9[_0x40648c(0x121c)])}:{}},'bootstrap':_0x529564(_0x51f0a9[_0x40648c(0x781)])??_0x40648c(0x33f),'batchSize':_0x7bf27d(_0x51f0a9[_0x40648c(0xc2a)],'batchSize')??0x100})}]}};}}),_0x9c16ff({'id':_0x2d345d(0xf4),'kind':_0x2d345d(0x46b),'family':_0x2d345d(0x1193),'pipelineFamily':_0x2d345d(0x1193),'recommended':!![],'summary':'Generic\x20materializer\x20pipeline','description':'Scaffolds\x20a\x20generic\x20pipeline\x20containing\x20one\x20materializer\x20engine.','inputSchema':{'type':_0x2d345d(0xb36),'required':[_0x2d345d(0x1173),_0x2d345d(0x481),_0x2d345d(0x11c3),_0x2d345d(0x100)],'properties':{'name':{'type':'string'},'engineName':{'type':_0x2d345d(0xf7a)},'source_type':{'type':_0x2d345d(0xf7a)},'target_type':{'type':_0x2d345d(0xf7a)},'handler_name':{'type':_0x2d345d(0xf7a)},'bootstrap':{'type':_0x2d345d(0xf7a),'enum':[_0x2d345d(0x33f),_0x2d345d(0x9be)],'default':'snapshot'}},'additionalProperties':![]},'build'(_0x1ac8a1={},{envName:envName='default'}={}){const _0x5af4ae=_0x2d345d,_0x5af92c=_0x59b09c(_0x1ac8a1['name'],_0x5af4ae(0x1173));return{'kind':_0x5af4ae(0x46b),'pipelineFamily':_0x5af4ae(0x1193),'strategy':'scaffold','payload':{'name':_0x5af92c,'meta':{'label':_0x5af92c,'templateId':_0x5af4ae(0xf4)},'members':[{'engineType':'materializer','engineName':_0x529564(_0x1ac8a1['engineName'])??_0x5af92c+_0x5af4ae(0x4f4),'role':'materializer','engineConfig':{'source_type':_0x59b09c(_0x1ac8a1[_0x5af4ae(0x481)],'source_type'),'source_env':envName,'target_type':_0x59b09c(_0x1ac8a1[_0x5af4ae(0x11c3)],_0x5af4ae(0x11c3)),'target_env':envName,'handler':{'kind':_0x5af4ae(0x63b),'name':_0x59b09c(_0x1ac8a1[_0x5af4ae(0x100)],'handler_name')},'bootstrap':_0x529564(_0x1ac8a1[_0x5af4ae(0x781)])??_0x5af4ae(0x33f)}}]}};}}),_0x9c16ff({'id':_0x2d345d(0xbe7),'kind':_0x2d345d(0x46b),'family':_0x2d345d(0x1193),'pipelineFamily':_0x2d345d(0x1193),'recommended':!![],'summary':'Generic\x20queue-worker\x20pipeline','description':_0x2d345d(0x544),'inputSchema':{'type':'object','required':['name',_0x2d345d(0x5da),_0x2d345d(0x100)],'properties':{'name':{'type':_0x2d345d(0xf7a)},'engineName':{'type':'string'},'job_type':{'type':_0x2d345d(0xf7a)},'handler_name':{'type':_0x2d345d(0xf7a)},'concurrency':{'type':_0x2d345d(0x10f2),'minimum':0x1,'default':0x1},'pollInterval':{'type':'integer','minimum':0x1,'default':0x64}},'additionalProperties':![]},'build'(_0x3b26c3={}){const _0x1a7c4a=_0x2d345d,_0x4f30d3=_0x59b09c(_0x3b26c3['name'],_0x1a7c4a(0x1173));return{'kind':'pipeline','pipelineFamily':_0x1a7c4a(0x1193),'strategy':'scaffold','payload':{'name':_0x4f30d3,'meta':{'label':_0x4f30d3,'templateId':_0x1a7c4a(0xbe7)},'members':[{'engineType':'queue-worker','engineName':_0x529564(_0x3b26c3[_0x1a7c4a(0xaba)])??_0x4f30d3+_0x1a7c4a(0x783),'role':_0x1a7c4a(0x738),'engineConfig':{'job_type':_0x59b09c(_0x3b26c3[_0x1a7c4a(0x5da)],_0x1a7c4a(0x5da)),'handler':{'kind':'function','name':_0x59b09c(_0x3b26c3[_0x1a7c4a(0x100)],_0x1a7c4a(0x100))},'concurrency':_0x7bf27d(_0x3b26c3['concurrency'],_0x1a7c4a(0xe4))??0x1,'pollInterval':_0x7bf27d(_0x3b26c3[_0x1a7c4a(0x7e3)],_0x1a7c4a(0x7e3))??0x64}}]}};}});function _0x502aea(_0x2b8243,_0x461827,_0x41b40e,_0x4e1297){const _0x272685=_0x2d345d;_0x9c16ff({'id':_0x2b8243,'kind':'pipeline','family':_0x272685(0x7f1),'pipelineFamily':_0x272685(0x7f1),'recommended':_0x4e1297===_0x272685(0xf5e)||_0x4e1297===_0x272685(0x113b),'summary':_0x461827,'description':_0x272685(0xe00)+_0x41b40e+_0x272685(0x10a0)+_0x4e1297+_0x272685(0x6c0),'inputSchema':{'type':_0x272685(0xb36),'required':['name',_0x272685(0x481),_0x272685(0x7d4)],'properties':{'name':{'type':'string'},'source_type':{'type':_0x272685(0xf7a)},'field':{'type':_0x272685(0xf7a)},'storage_key':{'type':_0x272685(0xf7a)},'model':{'type':_0x272685(0xf7a)},'dims':{'type':'integer','minimum':0x1},'algorithm':{'type':_0x272685(0xf7a),'enum':[_0x272685(0x103f),_0x272685(0x41e)],'default':_0x272685(0x103f)},'url':{'type':_0x272685(0xf7a)},'api_key':{'type':_0x272685(0xf7a)},'base_url':{'type':'string'},'concurrency':{'type':_0x272685(0x10f2),'minimum':0x1},'pollInterval':{'type':_0x272685(0x10f2),'minimum':0x1}},'additionalProperties':![]},'build'(_0x4b89aa={},{envName:envName=_0x272685(0x8d0)}={}){const _0x2ce5fa=_0x272685,_0xa220c2={'source_env':envName,'source_type':_0x59b09c(_0x4b89aa[_0x2ce5fa(0x481)],_0x2ce5fa(0x481)),'field':_0x529564(_0x4b89aa[_0x2ce5fa(0x221)]),'storage_key':_0x529564(_0x4b89aa[_0x2ce5fa(0x1cc)])??_0x59b09c(_0x4b89aa[_0x2ce5fa(0x1173)],'name'),'mode':_0x41b40e,'algorithm':_0x529564(_0x4b89aa['algorithm'])??_0x2ce5fa(0x103f),'embedder':{'type':_0x4e1297,'model':_0x59b09c(_0x4b89aa[_0x2ce5fa(0x7d4)],_0x2ce5fa(0x7d4))}};if(_0x7bf27d(_0x4b89aa['dims'],_0x2ce5fa(0xa67)))_0xa220c2['dims']=_0x7bf27d(_0x4b89aa[_0x2ce5fa(0xa67)],_0x2ce5fa(0xa67));if(_0x4e1297===_0x2ce5fa(0x113b)&&_0x529564(_0x4b89aa[_0x2ce5fa(0xb14)]))_0xa220c2['embedder'][_0x2ce5fa(0xb14)]=_0x529564(_0x4b89aa[_0x2ce5fa(0xb14)]);if(_0x4e1297===_0x2ce5fa(0x1161)){if(_0x529564(_0x4b89aa['api_key']))_0xa220c2[_0x2ce5fa(0x37b)][_0x2ce5fa(0x11fc)]=_0x529564(_0x4b89aa[_0x2ce5fa(0x11fc)]);if(_0x529564(_0x4b89aa[_0x2ce5fa(0x42b)]))_0xa220c2[_0x2ce5fa(0x37b)][_0x2ce5fa(0x42b)]=_0x529564(_0x4b89aa['base_url']);}return _0x41b40e==='queue'&&(_0xa220c2[_0x2ce5fa(0x738)]={'concurrency':_0x7bf27d(_0x4b89aa[_0x2ce5fa(0xe4)],'concurrency')??0x1,'pollInterval':_0x7bf27d(_0x4b89aa[_0x2ce5fa(0x7e3)],_0x2ce5fa(0x7e3))??0x3e8}),{'kind':_0x2ce5fa(0x46b),'pipelineFamily':_0x2ce5fa(0x7f1),'strategy':_0x2ce5fa(0x943),'payload':{'name':_0x59b09c(_0x4b89aa[_0x2ce5fa(0x1173)],'name'),'config':_0xa220c2,'meta':{'label':_0x59b09c(_0x4b89aa['name'],'name'),'templateId':_0x2b8243}}};}});}_0x502aea(_0x2d345d(0x6c1),'Inline\x20embeddings\x20pipeline\x20(fake)',_0x2d345d(0x10aa),_0x2d345d(0xf5e)),_0x502aea(_0x2d345d(0xd7b),_0x2d345d(0xb1e),_0x2d345d(0x10aa),_0x2d345d(0x113b)),_0x502aea(_0x2d345d(0x172),'Queue\x20embeddings\x20pipeline\x20(fake)',_0x2d345d(0x879),_0x2d345d(0xf5e)),_0x502aea('embeddings-queue-ollama','Queue\x20embeddings\x20pipeline\x20(Ollama)','queue',_0x2d345d(0x113b));},okdbEngineTemplates;}var okdbEnginesEnums,hasRequiredOkdbEnginesEnums;function requireOkdbEnginesEnums(){const _0x36cd75=_0xef8cd8;if(hasRequiredOkdbEnginesEnums)return okdbEnginesEnums;hasRequiredOkdbEnginesEnums=0x1;const _0xde2d0d='~engines',_0x405e6e=0xa,_0x1cfab1=Object['freeze']({'CREATED':_0x36cd75(0xf1a),'ONLINE':_0x36cd75(0x998),'STOPPED':_0x36cd75(0xd45),'INACTIVE':'inactive','ERROR':_0x36cd75(0x225),'REMOVED':'removed'}),_0x5c2cd8=Object[_0x36cd75(0x108b)]({'STARTED':_0x36cd75(0x3c4),'STOPPED':_0x36cd75(0xd45),'ERROR':_0x36cd75(0x225),'INSTALLED':_0x36cd75(0x519),'UNINSTALLED':'uninstalled'}),_0x33c7e7=Object['freeze'](new Set([_0x1cfab1[_0x36cd75(0x39c)],_0x1cfab1[_0x36cd75(0xaa1)],_0x1cfab1[_0x36cd75(0x173)],_0x1cfab1[_0x36cd75(0x97d)]]));return okdbEnginesEnums={'TYPE_ENGINES':_0xde2d0d,'MAX_UPDATE_RETRIES':_0x405e6e,'ENGINE_STATUS':_0x1cfab1,'ENGINE_EVENTS':_0x5c2cd8,'UPDATABLE_STATUSES':_0x33c7e7},okdbEnginesEnums;}var hasRequiredOkdbEngines;function requireOkdbEngines(){const _0x3f350d=_0xef8cd8;if(hasRequiredOkdbEngines)return okdbEngines[_0x3f350d(0xe5f)];hasRequiredOkdbEngines=0x1;const {OKDBError:_0x5c5223,OKDBVersionMismatchError:_0x173e31}=requireOkdbError(),{normalizeAffinity:_0x319755,affinityMatchesTags:_0x4c1dc0}=requireOkdbEngineAffinity(),_0x1c001a=requireOkdbEngineTemplates(),{TYPE_ENGINES:_0x4cbbd5,MAX_UPDATE_RETRIES:_0xe05887,ENGINE_STATUS:_0x39d5fa,ENGINE_EVENTS:_0x49e04c,UPDATABLE_STATUSES:_0x17be60}=requireOkdbEnginesEnums();class _0x691a9a{constructor(_0x9f7266,_0x11b9ab,_0x5da4ef=null){const _0x11220b=_0x3f350d;this['okdb']=_0x9f7266,this[_0x11220b(0x9dd)]=String(_0x11b9ab),this['_storeEnv']=_0x5da4ef;const _0xb3d1fe=this[_0x11220b(0x9dd)][_0x11220b(0x10b8)]('@');this[_0x11220b(0xaee)]=_0xb3d1fe>=0x0?this[_0x11220b(0x9dd)][_0x11220b(0xc3c)](0x0,_0xb3d1fe):'',this[_0x11220b(0x1173)]=_0xb3d1fe>=0x0?this[_0x11220b(0x9dd)][_0x11220b(0xc3c)](_0xb3d1fe+0x1):this['key'],this[_0x11220b(0x1011)]=null,this[_0x11220b(0xc91)]=null,this[_0x11220b(0x9de)]={'api':null,'running':![],'error':null,'state':_0x39d5fa['CREATED'],'reason':_0x11220b(0xf1a),'updated':Date[_0x11220b(0x555)]()},this['_loaded']=![];}get[_0x3f350d(0x60a)](){const _0x4d9110=_0x3f350d;if(!this['_storeEnv'])throw new _0x5c5223(_0x4d9110(0xe9b)+this[_0x4d9110(0x9dd)],_0x4d9110(0x815),{'key':this[_0x4d9110(0x9dd)]});return this[_0x4d9110(0xabf)];}static['makeKey'](_0x42233d,_0x586566){return _0x42233d+'@'+_0x586566;}static async[_0x3f350d(0x725)](_0x8067ff,_0x471a7f,_0x4cfefa,_0x44eb1b,_0x2688e2={},_0x805e2e={}){const _0x4a56d6=_0x3f350d,_0x443f12=await _0x2b7cf0[_0x4a56d6(0xfc8)](_0x8067ff),_0x70c6eb=_0x691a9a['makeKey'](_0x471a7f,_0x4cfefa),_0x37324b={'type':_0x471a7f,'config':_0x44eb1b,'meta':_0x2688e2,'enabled':_0x805e2e?.['enabled']!==![],'affinity':_0x319755(_0x805e2e?.[_0x4a56d6(0x54a)]),'source_env':_0x44eb1b[_0x4a56d6(0x43a)]??null,'installedAt':null,'created':Date[_0x4a56d6(0x555)](),'updated':Date[_0x4a56d6(0x555)]()};await _0x443f12[_0x4a56d6(0x92c)](_0x4cbbd5,_0x70c6eb,_0x37324b);const _0x2cd797=new _0x691a9a(_0x443f12['okdb']??_0x8067ff,_0x70c6eb,_0x443f12);return await _0x2cd797['load'](),_0x2cd797;}get[_0x3f350d(0x81a)](){const _0x15d4e1=_0x3f350d;return this[_0x15d4e1(0xaee)];}get[_0x3f350d(0x1f5)](){const _0x2e3a34=_0x3f350d;return this[_0x2e3a34(0x9de)]['api'];}get[_0x3f350d(0xad3)](){const _0x391298=_0x3f350d;return this[_0x391298(0x1011)]?.[_0x391298(0x568)]??null;}get[_0x3f350d(0x951)](){const _0x485210=_0x3f350d;return this[_0x485210(0xad3)]?.[_0x485210(0x951)]!==![];}get[_0x3f350d(0x54a)](){const _0x198d1e=_0x3f350d;return this[_0x198d1e(0xad3)]?.[_0x198d1e(0x54a)]??null;}get['isRunning'](){const _0x3cc07d=_0x3f350d;return this[_0x3cc07d(0x9de)][_0x3cc07d(0x94e)];}get[_0x3f350d(0xfcd)](){const _0x1dd866=_0x3f350d;return this[_0x1dd866(0x9de)][_0x1dd866(0x10e2)];}get[_0x3f350d(0xa25)](){return this['runtime']['reason'];}get[_0x3f350d(0xbab)](){const _0x3afec2=_0x3f350d;return this[_0x3afec2(0x9de)][_0x3afec2(0x225)];}get['runtimeState'](){const _0x298caa=_0x3f350d;return{'state':this[_0x298caa(0x9de)][_0x298caa(0x10e2)],'reason':this['runtime'][_0x298caa(0xa25)],'error':this['runtime'][_0x298caa(0x225)]?.[_0x298caa(0xb4e)]??null,'running':this[_0x298caa(0x9de)][_0x298caa(0x94e)],'updated':this['runtime'][_0x298caa(0x965)]};}async['load']({force:force=![]}={}){const _0x14236d=_0x3f350d;if(this[_0x14236d(0xb44)]&&!force)return this;this[_0x14236d(0x1011)]=await this[_0x14236d(0x60a)][_0x14236d(0xa57)](_0x4cbbd5,this[_0x14236d(0x9dd)]);if(!this[_0x14236d(0x1011)])throw new _0x5c5223(_0x14236d(0x1188)+this['key'],'ENGINE_NOT_FOUND',{'key':this[_0x14236d(0x9dd)]});const _0x2e7e31=this[_0x14236d(0xd4f)][_0x14236d(0xab8)]?.[_0x14236d(0x5d3)]?.[_0x14236d(0xbeb)](this[_0x14236d(0x81a)]);if(!_0x2e7e31)throw new _0x5c5223('Engine\x20driver\x20not\x20registered:\x20\x22'+this['engineType']+'\x22',_0x14236d(0x6c4),{'type':this['engineType']});return typeof _0x2e7e31[_0x14236d(0x33d)]===_0x14236d(0x63b)&&_0x2e7e31['validate'](this[_0x14236d(0x1011)][_0x14236d(0x568)][_0x14236d(0x142)]),this[_0x14236d(0xc91)]=_0x2e7e31,this[_0x14236d(0xb44)]=!![],this;}[_0x3f350d(0xed4)](_0x231e77,{error:error=null,reason:reason=null,api:_0x36b7f0}={}){const _0x70710c=_0x3f350d;let _0x315f0e=null;if(error instanceof Error)_0x315f0e=error;else{if(error!=null)_0x315f0e=new Error(String(error));}this['runtime'][_0x70710c(0x10e2)]=_0x231e77,this[_0x70710c(0x9de)]['running']=_0x231e77===_0x39d5fa['ONLINE'],this[_0x70710c(0x9de)][_0x70710c(0x225)]=_0x315f0e;if(_0x36b7f0!==undefined)this[_0x70710c(0x9de)][_0x70710c(0x1f5)]=_0x36b7f0;this['runtime'][_0x70710c(0xa25)]=reason??(_0x231e77===_0x39d5fa[_0x70710c(0x39c)]?_0x70710c(0x94e):_0x231e77===_0x39d5fa[_0x70710c(0x97d)]?'start_error':_0x231e77===_0x39d5fa['INACTIVE']?_0x70710c(0x9ae):_0x70710c(0xd45)),this[_0x70710c(0x9de)][_0x70710c(0x965)]=Date[_0x70710c(0x555)]();}[_0x3f350d(0x25a)](){const _0x10fa0c=_0x3f350d;try{return this[_0x10fa0c(0xd4f)][_0x10fa0c(0x1034)]?.[_0x10fa0c(0x2e4)]?.()?.['tags']??[];}catch{return[];}}[_0x3f350d(0x6e3)](){const _0x4221=_0x3f350d;return _0x4c1dc0(this['affinity'],this[_0x4221(0x25a)]());}async['patchDeclaration'](_0x512655={}){const _0x5b1e83=_0x3f350d,_0x39cf42={};Object[_0x5b1e83(0x901)][_0x5b1e83(0x9e)][_0x5b1e83(0x834)](_0x512655,_0x5b1e83(0x951))&&(_0x39cf42['enabled']=_0x512655[_0x5b1e83(0x951)]!==![]);Object[_0x5b1e83(0x901)]['hasOwnProperty']['call'](_0x512655,_0x5b1e83(0x54a))&&(_0x39cf42['affinity']=_0x319755(_0x512655[_0x5b1e83(0x54a)]));if(Object[_0x5b1e83(0x901)][_0x5b1e83(0x9e)]['call'](_0x512655,'meta')){if(_0x512655[_0x5b1e83(0x654)]==null)_0x39cf42[_0x5b1e83(0x654)]={};else{if(typeof _0x512655['meta']==='object'&&!Array[_0x5b1e83(0x10f5)](_0x512655[_0x5b1e83(0x654)]))_0x39cf42[_0x5b1e83(0x654)]={...this[_0x5b1e83(0xad3)]?.[_0x5b1e83(0x654)]??{},..._0x512655[_0x5b1e83(0x654)]};else throw new _0x5c5223(_0x5b1e83(0xb2f),'BAD_CONFIG',{'key':this[_0x5b1e83(0x9dd)]});}}if(Object[_0x5b1e83(0x901)][_0x5b1e83(0x9e)][_0x5b1e83(0x834)](_0x512655,_0x5b1e83(0x142))){if(_0x512655[_0x5b1e83(0x142)]==null||typeof _0x512655[_0x5b1e83(0x142)]!==_0x5b1e83(0xb36)||Array[_0x5b1e83(0x10f5)](_0x512655[_0x5b1e83(0x142)]))throw new _0x5c5223(_0x5b1e83(0xeaa),'BAD_CONFIG',{'key':this[_0x5b1e83(0x9dd)]});if(typeof this[_0x5b1e83(0xc91)]?.[_0x5b1e83(0xb31)]!==_0x5b1e83(0x63b))throw new _0x5c5223(_0x5b1e83(0x1e4)+this[_0x5b1e83(0x9dd)]+'\x22',_0x5b1e83(0x637),{'key':this[_0x5b1e83(0x9dd)],'type':this['type']});const _0x35afdd=this['doc']?.['config']??{},_0x400030=await this[_0x5b1e83(0xc91)][_0x5b1e83(0xb31)](_0x35afdd,_0x512655[_0x5b1e83(0x142)],{'okdb':this['okdb'],'key':this[_0x5b1e83(0x9dd)],'type':this[_0x5b1e83(0xaee)],'name':this[_0x5b1e83(0x1173)],'storeEnv':this['_store'],'storeEnvName':this['_store']?.['name']??null});if(!_0x400030||typeof _0x400030!==_0x5b1e83(0xb36)||Array[_0x5b1e83(0x10f5)](_0x400030))throw new _0x5c5223(_0x5b1e83(0xdbb),'ENGINE_INVALID_DRIVER',{'key':this[_0x5b1e83(0x9dd)]});typeof this[_0x5b1e83(0xc91)]?.[_0x5b1e83(0x33d)]===_0x5b1e83(0x63b)&&this['driver']['validate'](_0x400030),_0x39cf42[_0x5b1e83(0x142)]=_0x400030,_0x39cf42['source_env']=_0x400030[_0x5b1e83(0x43a)]??this[_0x5b1e83(0xad3)]?.[_0x5b1e83(0x43a)]??null;}if(Object[_0x5b1e83(0xa52)](_0x39cf42)[_0x5b1e83(0x156)]===0x0)return this;return await this[_0x5b1e83(0x658)](_0x39cf42),await this[_0x5b1e83(0x7c9)]({'force':!![]}),this;}async[_0x3f350d(0x187)](){const _0x38d68c=_0x3f350d;if(!this[_0x38d68c(0xb44)])await this[_0x38d68c(0x7c9)]();if(!this[_0x38d68c(0x951)]){await this['stop']({'reason':'disabled'});if(!this[_0x38d68c(0xc53)])this['_setRuntimeState'](_0x39d5fa[_0x38d68c(0x173)],{'reason':'disabled','api':null,'error':null});return this;}if(!this['matchesLocalNodeAffinity']()){await this[_0x38d68c(0x1fe)]({'reason':_0x38d68c(0x786)});if(!this[_0x38d68c(0xc53)])this['_setRuntimeState'](_0x39d5fa['INACTIVE'],{'reason':_0x38d68c(0x786),'api':null,'error':null});return this;}if(this[_0x38d68c(0x9de)]['running'])return this[_0x38d68c(0xed4)](_0x39d5fa['ONLINE'],{'reason':'running'}),this;return await this['start'](),this;}async[_0x3f350d(0x658)](_0x4e111f){const _0x3f3499=_0x3f350d;for(let _0x62dfaf=0x0;_0x62dfaf<_0xe05887;_0x62dfaf++){const _0x3d353b=this[_0x3f3499(0x1011)];if(!_0x3d353b)throw new _0x5c5223(_0x3f3499(0x64e)+this[_0x3f3499(0x9dd)],'ENGINE_NOT_LOADED',{'key':this['key']});const _0x2b2157={..._0x3d353b[_0x3f3499(0x568)],..._0x4e111f,'updated':Date['now']()};try{await this[_0x3f3499(0x60a)][_0x3f3499(0xbb7)](_0x4cbbd5,this[_0x3f3499(0x9dd)],_0x2b2157,_0x3d353b[_0x3f3499(0x45c)]),this[_0x3f3499(0x1011)]={..._0x3d353b,'value':_0x2b2157};return;}catch(_0x27f806){if(!(_0x27f806 instanceof _0x173e31))throw _0x27f806;this[_0x3f3499(0x1011)]=await this[_0x3f3499(0x60a)][_0x3f3499(0xa57)](_0x4cbbd5,this[_0x3f3499(0x9dd)]);if(!this[_0x3f3499(0x1011)])throw new _0x5c5223(_0x3f3499(0xa1)+this['key'],'ENGINE_NOT_FOUND',{'key':this['key']});}}throw new _0x5c5223(_0x3f3499(0x203)+_0xe05887+'\x20retries\x20(version\x20contention):\x20'+this[_0x3f3499(0x9dd)],'ENGINE_UPDATE_CONTENTION',{'key':this[_0x3f3499(0x9dd)],'retries':_0xe05887});}['_ctxBase'](){const _0x2f5f5b=_0x3f350d;return{'okdb':this[_0x2f5f5b(0xd4f)],'key':this[_0x2f5f5b(0x9dd)],'type':this[_0x2f5f5b(0xaee)],'name':this[_0x2f5f5b(0x1173)],'storeEnv':this[_0x2f5f5b(0x60a)],'storeEnvName':this[_0x2f5f5b(0x60a)][_0x2f5f5b(0x1173)],'emit':(_0x12e405,_0x51db60={})=>{const _0x49cde1=_0x2f5f5b;this[_0x49cde1(0xd4f)][_0x49cde1(0xea8)]?.['emit']?.(_0x49cde1(0xd84)+_0x12e405,{'engine':this[_0x49cde1(0x9dd)],'type':this['type'],'name':this[_0x49cde1(0x1173)],..._0x51db60});},'updateStatus':async(_0x5635a1,_0x414288=null)=>{const _0x71256d=_0x2f5f5b;if(!_0x17be60[_0x71256d(0x9d0)](_0x5635a1))throw new _0x5c5223(_0x71256d(0x2cf)+_0x5635a1+_0x71256d(0x7d9)+[..._0x17be60]['join'](',\x20'),_0x71256d(0x2e0),{'status':_0x5635a1,'valid':[..._0x17be60]});this[_0x71256d(0xed4)](_0x5635a1,{'error':_0x414288});},'updateMeta':async _0x5d069a=>{const _0x146866=_0x2f5f5b;for(let _0x57503d=0x0;_0x57503d<_0xe05887;_0x57503d++){const _0x5b7350=this[_0x146866(0x1011)]??await this['_store'][_0x146866(0xa57)](_0x4cbbd5,this[_0x146866(0x9dd)]);if(!_0x5b7350)return;const _0x2a7f71=_0x5b7350[_0x146866(0x568)]?.[_0x146866(0x654)]??{},_0x2df007={..._0x5b7350[_0x146866(0x568)],'meta':{..._0x2a7f71,..._0x5d069a},'updated':Date[_0x146866(0x555)]()};try{await this[_0x146866(0x60a)][_0x146866(0xbb7)](_0x4cbbd5,this[_0x146866(0x9dd)],_0x2df007,_0x5b7350[_0x146866(0x45c)]),this[_0x146866(0x1011)]={..._0x5b7350,'value':_0x2df007};return;}catch(_0x242b54){if(!(_0x242b54 instanceof _0x173e31))throw _0x242b54;this[_0x146866(0x1011)]=await this[_0x146866(0x60a)][_0x146866(0xa57)](_0x4cbbd5,this[_0x146866(0x9dd)]);if(!this[_0x146866(0x1011)])return;}}},'updateConfig':async _0x384742=>{const _0x67681d=_0x2f5f5b;for(let _0x178ac8=0x0;_0x178ac8<_0xe05887;_0x178ac8++){const _0x21bb70=this['docEntry']??await this[_0x67681d(0x60a)][_0x67681d(0xa57)](_0x4cbbd5,this[_0x67681d(0x9dd)]);if(!_0x21bb70)return;const _0x3172a1=_0x21bb70[_0x67681d(0x568)]?.[_0x67681d(0x142)]??{},_0x57290c={..._0x3172a1,..._0x384742},_0x298649={..._0x21bb70['value'],'config':_0x57290c,'source_env':_0x57290c[_0x67681d(0x43a)]??_0x21bb70['value']?.['source_env']??null,'updated':Date[_0x67681d(0x555)]()};try{await this['_store'][_0x67681d(0xbb7)](_0x4cbbd5,this[_0x67681d(0x9dd)],_0x298649,_0x21bb70[_0x67681d(0x45c)]),this[_0x67681d(0x1011)]={..._0x21bb70,'value':_0x298649};return;}catch(_0x413b22){if(!(_0x413b22 instanceof _0x173e31))throw _0x413b22;this[_0x67681d(0x1011)]=await this['_store'][_0x67681d(0xa57)](_0x4cbbd5,this[_0x67681d(0x9dd)]);if(!this[_0x67681d(0x1011)])return;}}}};}async[_0x3f350d(0xa00)](){const _0x1dd1ea=_0x3f350d;if(!this[_0x1dd1ea(0xb44)])throw new _0x5c5223(_0x1dd1ea(0x64e)+this[_0x1dd1ea(0x9dd)],_0x1dd1ea(0x1bb),{'key':this[_0x1dd1ea(0x9dd)]});if(this['runtime'][_0x1dd1ea(0x94e)])return;if(!this['enabled']){this['_setRuntimeState'](_0x39d5fa[_0x1dd1ea(0x173)],{'reason':_0x1dd1ea(0x785),'api':null,'error':null});return;}if(!this['matchesLocalNodeAffinity']()){this['_setRuntimeState'](_0x39d5fa[_0x1dd1ea(0x173)],{'reason':_0x1dd1ea(0x786),'api':null,'error':null});return;}try{const _0xc45438=this[_0x1dd1ea(0xa8d)](),_0x1af269=this[_0x1dd1ea(0xc91)],_0x486e7d=this[_0x1dd1ea(0x1011)][_0x1dd1ea(0x568)];typeof _0x1af269[_0x1dd1ea(0xd3f)]===_0x1dd1ea(0x63b)&&await _0x1af269[_0x1dd1ea(0xd3f)]({..._0xc45438,'config':_0x486e7d[_0x1dd1ea(0x142)],'meta':_0x486e7d[_0x1dd1ea(0x654)]});_0x486e7d[_0x1dd1ea(0x383)]==null&&typeof _0x1af269[_0x1dd1ea(0x999)]===_0x1dd1ea(0x63b)&&(await _0x1af269['install']({..._0xc45438,'config':_0x486e7d[_0x1dd1ea(0x142)],'meta':_0x486e7d[_0x1dd1ea(0x654)]}),await this[_0x1dd1ea(0x658)]({'installedAt':Date['now']()}),_0xc45438[_0x1dd1ea(0xf5d)](_0x49e04c['INSTALLED']));if(typeof _0x1af269[_0x1dd1ea(0xa00)]!==_0x1dd1ea(0x63b))throw new _0x5c5223(_0x1dd1ea(0x42a)+this[_0x1dd1ea(0x81a)]+'\x22','ENGINE_DRIVER_MISSING_START',{'type':this[_0x1dd1ea(0x81a)]});this[_0x1dd1ea(0x9de)][_0x1dd1ea(0x1f5)]=await _0x1af269[_0x1dd1ea(0xa00)]({..._0xc45438,'config':_0x486e7d[_0x1dd1ea(0x142)],'meta':_0x486e7d[_0x1dd1ea(0x654)]}),this[_0x1dd1ea(0xed4)](_0x39d5fa[_0x1dd1ea(0x39c)],{'reason':_0x1dd1ea(0x94e)}),_0xc45438[_0x1dd1ea(0xf5d)](_0x49e04c[_0x1dd1ea(0x2b1)]);}catch(_0x348e47){this[_0x1dd1ea(0x9de)][_0x1dd1ea(0x1f5)]=null,this['_setRuntimeState'](_0x39d5fa['ERROR'],{'error':_0x348e47,'reason':_0x1dd1ea(0x6fb)}),this[_0x1dd1ea(0xd4f)][_0x1dd1ea(0x9be)]?.['error']?.(_0x1dd1ea(0xf8c)+this[_0x1dd1ea(0x9dd)]+':',_0x348e47);}}async[_0x3f350d(0x1fe)]({reason:reason=_0x3f350d(0xd45)}={}){const _0xba6f71=_0x3f350d;if(!this['_loaded']){this[_0xba6f71(0xed4)](reason===_0xba6f71(0x786)||reason==='disabled'?_0x39d5fa[_0xba6f71(0x173)]:_0x39d5fa['STOPPED'],{'reason':reason,'api':null,'error':null});return;}if(!this[_0xba6f71(0x9de)]['running']){this[_0xba6f71(0xed4)](reason==='affinity_mismatch'||reason===_0xba6f71(0x785)?_0x39d5fa[_0xba6f71(0x173)]:_0x39d5fa[_0xba6f71(0xaa1)],{'reason':reason,'api':null,'error':null});return;}const _0x4276ff=this['_ctxBase']();try{typeof this[_0xba6f71(0xc91)]['stop']===_0xba6f71(0x63b)&&await this[_0xba6f71(0xc91)][_0xba6f71(0x1fe)]({..._0x4276ff,'config':this['docEntry'][_0xba6f71(0x568)][_0xba6f71(0x142)],'meta':this[_0xba6f71(0x1011)][_0xba6f71(0x568)]['meta']});}finally{this[_0xba6f71(0xed4)](reason===_0xba6f71(0x786)||reason===_0xba6f71(0x785)?_0x39d5fa[_0xba6f71(0x173)]:_0x39d5fa['STOPPED'],{'reason':reason,'api':null,'error':null}),_0x4276ff[_0xba6f71(0xf5d)](_0x49e04c[_0xba6f71(0xaa1)]);}}async[_0x3f350d(0x3cb)](){const _0x1fe282=_0x3f350d;if(!this['_loaded'])await this[_0x1fe282(0x7c9)]();try{await this[_0x1fe282(0x1fe)]();}catch{}const _0x293450=this[_0x1fe282(0xa8d)]();typeof this[_0x1fe282(0xc91)]['uninstall']===_0x1fe282(0x63b)&&await this['driver'][_0x1fe282(0x3cb)]({..._0x293450,'config':this[_0x1fe282(0x1011)][_0x1fe282(0x568)][_0x1fe282(0x142)],'meta':this[_0x1fe282(0x1011)]['value'][_0x1fe282(0x654)]}),await this[_0x1fe282(0x60a)]['remove'](_0x4cbbd5,this[_0x1fe282(0x9dd)]),_0x293450[_0x1fe282(0xf5d)](_0x49e04c['UNINSTALLED']);}}class _0x2b7cf0{constructor(_0x1adbd9,_0x8cf81b={}){const _0x116c6b=_0x3f350d;this[_0x116c6b(0xd4f)]=_0x1adbd9,this['env']=_0x8cf81b[_0x116c6b(0x30b)]??null,this[_0x116c6b(0x234)]=_0x8cf81b['orchestrator']??this,this['drivers']=this[_0x116c6b(0xba6)]?new Map():this[_0x116c6b(0x234)][_0x116c6b(0x5d3)],this['engines']=this[_0x116c6b(0xba6)]?new Map():this['orchestrator'][_0x116c6b(0xab8)],this[_0x116c6b(0xd24)]=this[_0x116c6b(0xba6)]?new Map():this['orchestrator'][_0x116c6b(0xd24)],this[_0x116c6b(0x250)]=![],this[_0x116c6b(0xba6)]&&_0x1c001a(this);}get[_0x3f350d(0xba6)](){const _0x2dc619=_0x3f350d;return this[_0x2dc619(0x234)]===this;}static async[_0x3f350d(0x11f2)](_0x2e530b){const _0x1cfdbe=_0x3f350d;if(_0x2e530b?.['db']&&_0x2e530b?.[_0x1cfdbe(0xd4f)]&&_0x2e530b?.['name'])return _0x2e530b;if(typeof _0x2e530b?.[_0x1cfdbe(0xa7f)]===_0x1cfdbe(0x63b))return _0x2e530b[_0x1cfdbe(0xa7f)]();throw new _0x5c5223('Engine\x20store\x20environment\x20is\x20not\x20available',_0x1cfdbe(0xadf));}static async[_0x3f350d(0xfc8)](_0x4fd9c8){const _0x4af9df=_0x3f350d,_0x520944=await _0x2b7cf0[_0x4af9df(0x11f2)](_0x4fd9c8);return!_0x520944[_0x4af9df(0x7c0)](_0x4cbbd5)&&await _0x520944[_0x4af9df(0xa39)](_0x4cbbd5),_0x520944;}async[_0x3f350d(0x1119)](_0x2191d8,_0x2df870){const _0x5bf462=_0x3f350d,_0x1fd3f7=_0x2df870[_0x5bf462(0x9dd)],_0x16a9eb=this[_0x5bf462(0x234)][_0x5bf462(0xab8)][_0x5bf462(0xbeb)](_0x1fd3f7);if(_0x16a9eb){if(_0x16a9eb[_0x5bf462(0x60a)]===_0x2191d8)return await _0x16a9eb['load']({'force':!![]}),await _0x16a9eb[_0x5bf462(0x187)](),_0x16a9eb;return this[_0x5bf462(0xd4f)][_0x5bf462(0x9be)]?.[_0x5bf462(0x225)]?.(_0x5bf462(0xf5)+_0x1fd3f7+_0x5bf462(0xaa9)+_0x2191d8['name']+_0x5bf462(0xd32)+(_0x16a9eb['_store']?.[_0x5bf462(0x1173)]??'unknown')+'\x22'),_0x16a9eb;}const _0x41933e=new _0x691a9a(this[_0x5bf462(0xd4f)],_0x1fd3f7,_0x2191d8);this[_0x5bf462(0x234)]['engines'][_0x5bf462(0x211)](_0x1fd3f7,_0x41933e);try{return await _0x41933e['load'](),await _0x41933e[_0x5bf462(0x187)](),_0x41933e;}catch(_0x33f5e6){return this[_0x5bf462(0xd4f)][_0x5bf462(0x9be)]?.[_0x5bf462(0x225)]?.(_0x5bf462(0x418)+_0x1fd3f7+':',_0x33f5e6),_0x41933e;}}['registerDriver'](_0x574fb3,_0xbcfb){const _0x463662=_0x3f350d;if(!this[_0x463662(0xba6)])return this[_0x463662(0x234)][_0x463662(0x8ed)](_0x574fb3,_0xbcfb);if(!_0x574fb3||typeof _0x574fb3!==_0x463662(0xf7a))throw new _0x5c5223(_0x463662(0x9e0),_0x463662(0x60e),{'type':_0x574fb3});if(!_0xbcfb||typeof _0xbcfb!==_0x463662(0xb36))throw new _0x5c5223(_0x463662(0xb94)+_0x574fb3+_0x463662(0xafe),_0x463662(0x4c5),{'type':_0x574fb3});if(typeof _0xbcfb['start']!=='function')throw new _0x5c5223(_0x463662(0xb94)+_0x574fb3+_0x463662(0xe73),_0x463662(0x5a1),{'type':_0x574fb3});if(this['drivers'][_0x463662(0x9d0)](_0x574fb3))throw new _0x5c5223(_0x463662(0x4d1)+_0x574fb3+'\x22',_0x463662(0x209),{'type':_0x574fb3});this[_0x463662(0x5d3)][_0x463662(0x211)](_0x574fb3,_0xbcfb);}[_0x3f350d(0x103c)](_0x371354){const _0x17eb0d=_0x3f350d;if(!this[_0x17eb0d(0xba6)])return this[_0x17eb0d(0x234)]['registerTemplate'](_0x371354);if(!_0x371354||typeof _0x371354!=='object')throw new _0x5c5223('Engine\x20template\x20must\x20be\x20a\x20plain\x20object',_0x17eb0d(0x1189));if(!_0x371354['id']||typeof _0x371354['id']!==_0x17eb0d(0xf7a))throw new _0x5c5223(_0x17eb0d(0x1073),_0x17eb0d(0x1189));if(![_0x17eb0d(0xcbd),_0x17eb0d(0x46b)][_0x17eb0d(0x29c)](_0x371354[_0x17eb0d(0x31e)]))throw new _0x5c5223(_0x17eb0d(0x8cf)+_0x371354['id'],_0x17eb0d(0x1189));if(typeof _0x371354['build']!==_0x17eb0d(0x63b))throw new _0x5c5223(_0x17eb0d(0x9f9)+_0x371354['id'],'ENGINE_INVALID_TEMPLATE');if(this[_0x17eb0d(0xd24)][_0x17eb0d(0x9d0)](_0x371354['id']))throw new _0x5c5223(_0x17eb0d(0xf12)+_0x371354['id'],'ENGINE_TEMPLATE_ALREADY_REGISTERED');this['templates']['set'](_0x371354['id'],_0x371354);}[_0x3f350d(0x606)](_0x1e67f4){const _0x239d8e=_0x3f350d;if(!_0x1e67f4)return null;const _0x1c043e=typeof _0x1e67f4[_0x239d8e(0x1210)]==='function'?_0x1e67f4[_0x239d8e(0x1210)](this[_0x239d8e(0xd4f)]):_0x1e67f4[_0x239d8e(0x1210)];return _0x1c043e??{'type':_0x239d8e(0xb36),'properties':{},'additionalProperties':![]};}['_materializeTemplate'](_0x343b53){const _0x479a67=_0x3f350d;if(!_0x343b53)return null;return{'id':_0x343b53['id'],'kind':_0x343b53[_0x479a67(0x31e)],'family':_0x343b53['family']??null,'engineType':_0x343b53[_0x479a67(0x81a)]??null,'pipelineFamily':_0x343b53[_0x479a67(0xebc)]??null,'recommended':_0x343b53['recommended']===!![],'summary':_0x343b53[_0x479a67(0x541)]??null,'description':_0x343b53['description']??null,'inputSchema':this[_0x479a67(0x606)](_0x343b53),'defaults':_0x343b53['defaults']??{},'notes':Array[_0x479a67(0x10f5)](_0x343b53['notes'])?_0x343b53['notes']:[],'links':Array[_0x479a67(0x10f5)](_0x343b53[_0x479a67(0x8cc)])?_0x343b53[_0x479a67(0x8cc)]:[]};}[_0x3f350d(0xd94)](_0x49daa9=null){const _0x39f790=_0x3f350d;return[...this['templates'][_0x39f790(0x231)]()][_0x39f790(0x1103)](_0x3b15e7=>!_0x49daa9||_0x3b15e7[_0x39f790(0x31e)]===_0x49daa9)[_0x39f790(0x1166)](_0x21de0a=>this[_0x39f790(0xd3b)](_0x21de0a))[_0x39f790(0x3f6)]((_0x3e86a7,_0x35bef4)=>_0x3e86a7['id'][_0x39f790(0x666)](_0x35bef4['id']));}[_0x3f350d(0xc5c)](_0x3be860){const _0x4a1d47=_0x3f350d;return this['_materializeTemplate'](this[_0x4a1d47(0xd24)][_0x4a1d47(0xbeb)](_0x3be860)??null);}[_0x3f350d(0xf98)](_0x154a86,_0x2a227d={},_0x400c04={}){const _0x4d0ba8=_0x3f350d,_0x24d8b2=this[_0x4d0ba8(0xd24)][_0x4d0ba8(0xbeb)](_0x154a86);if(!_0x24d8b2)throw new _0x5c5223(_0x4d0ba8(0x560)+_0x154a86,_0x4d0ba8(0x5db),{'id':_0x154a86});const _0x51a632=_0x24d8b2['build'](_0x2a227d??{},{'okdb':this[_0x4d0ba8(0xd4f)],'envName':_0x400c04?.[_0x4d0ba8(0xa70)]??null});return{'template':this[_0x4d0ba8(0xd3b)](_0x24d8b2),'plan':_0x51a632};}[_0x3f350d(0x90b)](){const _0x443c57=_0x3f350d,_0x44ea4d=this[_0x443c57(0xd94)]();return[...this[_0x443c57(0x5d3)]['entries']()][_0x443c57(0x1166)](([_0x5d9d0f,_0x9c4c16])=>{const _0x76cac1=_0x443c57,_0x5bbb23=_0x9c4c16?.[_0x76cac1(0x5dd)]&&typeof _0x9c4c16['docs']===_0x76cac1(0xb36)&&!Array[_0x76cac1(0x10f5)](_0x9c4c16[_0x76cac1(0x5dd)])?_0x9c4c16[_0x76cac1(0x5dd)]:{},_0x381cf5=_0x44ea4d['filter'](_0x5a80dd=>_0x5a80dd[_0x76cac1(0x31e)]===_0x76cac1(0xcbd)&&_0x5a80dd[_0x76cac1(0x81a)]===_0x5d9d0f)[_0x76cac1(0x1166)](_0x386ab3=>_0x386ab3['id']),_0x1ed542=_0x44ea4d['filter'](_0x34a72b=>_0x34a72b[_0x76cac1(0x31e)]===_0x76cac1(0xcbd)&&_0x34a72b[_0x76cac1(0x81a)]===_0x5d9d0f&&_0x34a72b[_0x76cac1(0x97f)])[_0x76cac1(0x1166)](_0x5199ec=>_0x5199ec['id']);return{'type':_0x5d9d0f,'summary':_0x5bbb23[_0x76cac1(0x541)]??null,'description':_0x5bbb23['description']??null,'standalone':_0x5bbb23[_0x76cac1(0x10f3)]??!![],'pipelineCompatible':_0x5bbb23['pipelineCompatible']??![],'scope':_0x5bbb23[_0x76cac1(0x85b)]??_0x76cac1(0x30b),'configSchema':_0x5bbb23[_0x76cac1(0x8bc)]??null,'configExample':_0x5bbb23[_0x76cac1(0x2dd)]??null,'patchConfigSchema':_0x5bbb23[_0x76cac1(0x4a9)]??null,'patchableConfigKeys':_0x5bbb23[_0x76cac1(0x10cd)]??[],'templateIds':_0x381cf5,'recommendedTemplateIds':_0x1ed542,'notes':Array[_0x76cac1(0x10f5)](_0x5bbb23[_0x76cac1(0x54d)])?_0x5bbb23[_0x76cac1(0x54d)]:[],'links':Array[_0x76cac1(0x10f5)](_0x5bbb23[_0x76cac1(0x8cc)])?_0x5bbb23[_0x76cac1(0x8cc)]:[]};})[_0x443c57(0x3f6)]((_0x345705,_0xba8bec)=>_0x345705[_0x443c57(0xaee)][_0x443c57(0x666)](_0xba8bec[_0x443c57(0xaee)]));}async[_0x3f350d(0xa00)](){const _0x16cb80=_0x3f350d;if(this[_0x16cb80(0x250)])return;if(this[_0x16cb80(0xba6)]&&this[_0x16cb80(0xd4f)]?.[_0x16cb80(0x3a3)]&&!this[_0x16cb80(0xd4f)][_0x16cb80(0x3a3)][_0x16cb80(0x79f)](_0x16cb80(0xab8))){this['_started']=!![];return;}if(!this[_0x16cb80(0xba6)]){const _0x369e0c=this['env'];if(!_0x369e0c?.[_0x16cb80(0x7c0)](_0x4cbbd5)){this[_0x16cb80(0x250)]=!![];return;}for(const _0x53c147 of _0x369e0c['getRange'](_0x4cbbd5)){await this[_0x16cb80(0x1119)](_0x369e0c,_0x53c147);}this[_0x16cb80(0x250)]=!![];return;}for(const _0x22417d of this[_0x16cb80(0xd4f)][_0x16cb80(0xa3)]['values']()){await _0x22417d[_0x16cb80(0xab8)][_0x16cb80(0xa00)]();}this[_0x16cb80(0x250)]=!![];}async[_0x3f350d(0x1fe)](){const _0x135e99=_0x3f350d;if(!this[_0x135e99(0xba6)]){if(!this['_started'])return null;const _0x2f0e4c={},_0xaa6455=this[_0x135e99(0x63e)]()[_0x135e99(0xed)]();for(const _0x238c34 of _0xaa6455){try{await _0x238c34[_0x135e99(0x1fe)]();}catch(_0x3bfd5e){const _0x75f410=_0x238c34?.['key']||_0x135e99(0xd08);_0x2f0e4c[_0x75f410]=_0x3bfd5e?.[_0x135e99(0xb4e)]||String(_0x3bfd5e),this[_0x135e99(0xd4f)][_0x135e99(0x9be)]?.['error']?.(_0x135e99(0xdae)+_0x75f410+':',_0x3bfd5e);}}return this[_0x135e99(0x250)]=![],Object[_0x135e99(0xa52)](_0x2f0e4c)[_0x135e99(0x156)]?_0x2f0e4c:null;}if(!this['_started'])return null;const _0x5c57ca={},_0x2ef1f0=[...this[_0x135e99(0xab8)][_0x135e99(0x231)]()][_0x135e99(0xed)]();for(const _0x33eb63 of _0x2ef1f0){try{await _0x33eb63[_0x135e99(0x1fe)]();}catch(_0x2e7a1d){const _0x10271c=_0x33eb63?.[_0x135e99(0x9dd)]||'unknown';_0x5c57ca[_0x10271c]=_0x2e7a1d?.[_0x135e99(0xb4e)]||String(_0x2e7a1d),this[_0x135e99(0xd4f)][_0x135e99(0x9be)]?.[_0x135e99(0x225)]?.(_0x135e99(0xdae)+_0x10271c+':',_0x2e7a1d);}}this[_0x135e99(0x250)]=![];for(const _0x237030 of this[_0x135e99(0xd4f)]['_envs'][_0x135e99(0x231)]()){if(_0x237030[_0x135e99(0xab8)])_0x237030[_0x135e99(0xab8)]['_started']=![];}return Object['keys'](_0x5c57ca)[_0x135e99(0x156)]?_0x5c57ca:null;}async['createEngine'](_0x47e793,_0xa07753,_0x1706bb,_0x17e582={},_0x365f90={}){const _0x3fb96d=_0x3f350d;this[_0x3fb96d(0xd4f)]?.['_license']?.[_0x3fb96d(0xa15)](_0x3fb96d(0xab8));const _0x4b7e88=await _0x2b7cf0[_0x3fb96d(0xfc8)](this['env']??this[_0x3fb96d(0xd4f)]);if(!this[_0x3fb96d(0x5d3)][_0x3fb96d(0x9d0)](_0x47e793))throw new _0x5c5223(_0x3fb96d(0xe65)+_0x47e793+_0x3fb96d(0x440),'ENGINE_UNKNOWN_TYPE',{'type':_0x47e793});const _0x59e26e=this[_0x3fb96d(0x5d3)]['get'](_0x47e793),_0x2fb598=_0x691a9a[_0x3fb96d(0x3ee)](_0x47e793,_0xa07753);if(this[_0x3fb96d(0x234)][_0x3fb96d(0xab8)][_0x3fb96d(0x9d0)](_0x2fb598))throw new _0x5c5223('Engine\x20already\x20exists:\x20\x22'+_0x2fb598+'\x22',_0x3fb96d(0x4dc),{'key':_0x2fb598,'type':_0x47e793,'name':_0xa07753});typeof _0x59e26e?.[_0x3fb96d(0xb9a)]===_0x3fb96d(0x63b)&&await _0x59e26e[_0x3fb96d(0xb9a)]({'okdb':this[_0x3fb96d(0xd4f)],'key':_0x2fb598,'type':_0x47e793,'name':_0xa07753,'config':_0x1706bb,'meta':_0x17e582,'storeEnv':_0x4b7e88,'storeEnvName':_0x4b7e88?.['name']??null,'options':_0x365f90});const _0x21800d=this[_0x3fb96d(0x30b)]??this[_0x3fb96d(0xd4f)],_0x150a02=await _0x691a9a[_0x3fb96d(0x725)](_0x21800d,_0x47e793,_0xa07753,_0x1706bb,_0x17e582,_0x365f90);return this[_0x3fb96d(0x234)]['engines'][_0x3fb96d(0x211)](_0x150a02[_0x3fb96d(0x9dd)],_0x150a02),_0x150a02;}async['createAndStartEngine'](_0x5bd227,_0x3a7472,_0x592f07,_0x5b54f3={},_0x3bdff9={}){const _0x476ca5=_0x3f350d,_0x1c5aa0=await this[_0x476ca5(0xc33)](_0x5bd227,_0x3a7472,_0x592f07,_0x5b54f3,_0x3bdff9);return await _0x1c5aa0[_0x476ca5(0xa00)](),_0x1c5aa0;}[_0x3f350d(0xf83)](_0x53f946,_0x4429f4){const _0x2ee3a7=_0x3f350d;if(!this[_0x2ee3a7(0x234)]['_started'])throw new _0x5c5223(_0x2ee3a7(0xf8f),_0x2ee3a7(0x3e8));const _0x5dd14a=_0x691a9a[_0x2ee3a7(0x3ee)](_0x53f946,_0x4429f4),_0x2d5874=this['orchestrator'][_0x2ee3a7(0xab8)][_0x2ee3a7(0xbeb)](_0x5dd14a)??null;if(this[_0x2ee3a7(0x30b)]&&_0x2d5874?.[_0x2ee3a7(0x60a)]!==this[_0x2ee3a7(0x30b)])return null;return _0x2d5874;}[_0x3f350d(0xdd5)](_0x77e5a4,_0x29e886){const _0x2846bc=_0x3f350d,_0x4d785a=this[_0x2846bc(0xf83)](_0x77e5a4,_0x29e886);return _0x4d785a?.[_0x2846bc(0xc53)]?_0x4d785a:null;}[_0x3f350d(0x63e)](_0x522b97=null){const _0x55b11f=_0x3f350d,_0xc5a041=[...this[_0x55b11f(0x234)][_0x55b11f(0xab8)][_0x55b11f(0x231)]()][_0x55b11f(0x1103)](_0x2d8806=>!this[_0x55b11f(0x30b)]||_0x2d8806[_0x55b11f(0x60a)]===this['env']);return _0x522b97?_0xc5a041['filter'](_0x1eb29e=>_0x1eb29e['type']===_0x522b97):_0xc5a041;}async['restart'](_0xff89cb,_0x2b414e){const _0x5b3748=_0x3f350d,_0x1e2434=this['getEngine'](_0xff89cb,_0x2b414e);if(!_0x1e2434)throw new _0x5c5223('Engine\x20not\x20found:\x20\x22'+_0x691a9a[_0x5b3748(0x3ee)](_0xff89cb,_0x2b414e)+'\x22',_0x5b3748(0x6c7),{'type':_0xff89cb,'name':_0x2b414e});return _0x1e2434[_0x5b3748(0xc53)]&&await _0x1e2434[_0x5b3748(0x1fe)](),await _0x1e2434['load']({'force':!![]}),await _0x1e2434[_0x5b3748(0x187)](),_0x1e2434;}async[_0x3f350d(0x6cd)](_0x2387b5,_0x3e1e0f){const _0x1acc4=_0x3f350d,_0x1f74f3=_0x691a9a[_0x1acc4(0x3ee)](_0x2387b5,_0x3e1e0f),_0x306716=this['getEngine'](_0x2387b5,_0x3e1e0f);if(!_0x306716)throw new _0x5c5223('Engine\x20not\x20found:\x20\x22'+_0x1f74f3+'\x22',_0x1acc4(0x6c7),{'key':_0x1f74f3,'type':_0x2387b5,'name':_0x3e1e0f});await _0x306716[_0x1acc4(0x3cb)](),this['orchestrator'][_0x1acc4(0xab8)][_0x1acc4(0x3b3)](_0x1f74f3);}async['startNewEnginesFromSync'](_0x511209){const _0x3095cc=_0x3f350d;if(this[_0x3095cc(0xba6)]){for(const _0x3b55c7 of this[_0x3095cc(0xd4f)][_0x3095cc(0xa3)][_0x3095cc(0x231)]()){await _0x3b55c7[_0x3095cc(0xab8)]['startNewEnginesFromSync'](_0x511209);}return;}if(!this[_0x3095cc(0x30b)]?.[_0x3095cc(0x7c0)](_0x4cbbd5)||!this['env'][_0x3095cc(0xbeb)](_0x4cbbd5,_0x511209))return;let _0x7d2cf8=this[_0x3095cc(0x234)][_0x3095cc(0xab8)][_0x3095cc(0xbeb)](_0x511209);if(_0x7d2cf8&&_0x7d2cf8[_0x3095cc(0x60a)]!==this[_0x3095cc(0x30b)])return;!_0x7d2cf8&&(_0x7d2cf8=new _0x691a9a(this[_0x3095cc(0xd4f)],_0x511209,this[_0x3095cc(0x30b)]),this[_0x3095cc(0x234)][_0x3095cc(0xab8)]['set'](_0x511209,_0x7d2cf8));try{await _0x7d2cf8['load']({'force':!![]}),await _0x7d2cf8[_0x3095cc(0x187)]();}catch(_0x4210a7){this[_0x3095cc(0xd4f)][_0x3095cc(0x9be)]?.[_0x3095cc(0x225)]?.(_0x3095cc(0x540)+_0x511209+'\x22:',_0x4210a7),this[_0x3095cc(0x234)][_0x3095cc(0xab8)][_0x3095cc(0xbeb)](_0x511209)===_0x7d2cf8&&this[_0x3095cc(0x234)][_0x3095cc(0xab8)]['delete'](_0x511209);}}async[_0x3f350d(0x768)](){const _0x4aa4b4=_0x3f350d;if(this[_0x4aa4b4(0xba6)]){for(const _0x265a06 of this[_0x4aa4b4(0xd4f)]['_envs'][_0x4aa4b4(0x231)]()){await _0x265a06['engines'][_0x4aa4b4(0x768)]();}return;}const _0x4bbaca=this[_0x4aa4b4(0x30b)];if(!_0x4bbaca?.['hasType'](_0x4cbbd5))return;const _0x21554b=[..._0x4bbaca[_0x4aa4b4(0x9ce)](_0x4cbbd5)][_0x4aa4b4(0x1166)](_0x5a321f=>_0x5a321f['key']);for(const _0x527d08 of _0x21554b){await this[_0x4aa4b4(0x102b)](_0x527d08);}}}return okdbEngines[_0x3f350d(0xe5f)]=_0x2b7cf0,okdbEngines[_0x3f350d(0xe5f)]['OKDBEngines']=_0x2b7cf0,okdbEngines[_0x3f350d(0xe5f)][_0x3f350d(0x613)]=_0x691a9a,okdbEngines['exports'][_0x3f350d(0xefd)]=_0x39d5fa,okdbEngines[_0x3f350d(0xe5f)][_0x3f350d(0xf14)]=_0x49e04c,okdbEngines['exports'];}var okdbPipelines={'exports':{}},okdbPipelinesRecords,hasRequiredOkdbPipelinesRecords;function requireOkdbPipelinesRecords(){const _0x30bcd8=_0xef8cd8;if(hasRequiredOkdbPipelinesRecords)return okdbPipelinesRecords;hasRequiredOkdbPipelinesRecords=0x1;const _0x45690c='~pipelines',_0xe11592=new Set(['active',_0x30bcd8(0xd45)]);function _0x46ba11(_0x2a4e9c){const _0x2a1af5=_0x30bcd8;if(_0x2a4e9c==null)return _0x2a4e9c;return JSON[_0x2a1af5(0xdcd)](JSON['stringify'](_0x2a4e9c));}function _0x28c425(_0x5b76c1,_0x55a2de){const _0xcc96f1=_0x30bcd8;if(typeof _0x5b76c1!==_0xcc96f1(0xf7a)||!_0x5b76c1[_0xcc96f1(0xf4d)]())throw new Error(_0x55a2de+'\x20must\x20be\x20a\x20non-empty\x20string');}function _0x2f5e14(_0x441563,_0x17132c){const _0xed5d7d=_0x30bcd8,_0x35d89d='engines['+_0x17132c+']';return _0x28c425(_0x441563?.[_0xed5d7d(0xaee)],_0x35d89d+_0xed5d7d(0x921)),_0x28c425(_0x441563?.['name'],_0x35d89d+_0xed5d7d(0x542)),_0x28c425(_0x441563?.[_0xed5d7d(0xd27)],_0x35d89d+_0xed5d7d(0xc6f)),{'type':_0x441563['type'][_0xed5d7d(0xf4d)](),'name':_0x441563[_0xed5d7d(0x1173)][_0xed5d7d(0xf4d)](),'role':_0x441563[_0xed5d7d(0xd27)][_0xed5d7d(0xf4d)]()};}function _0x5cce40(_0x4813c2,_0x1beb58={}){const _0x3d354a=_0x30bcd8,_0x4c7136=_0x1beb58[_0x3d354a(0xd52)]??null,_0x2f4119=Date['now'](),_0x23af23=_0x4813c2?.[_0x3d354a(0x1173)]??_0x4c7136?.[_0x3d354a(0x1173)];_0x28c425(_0x23af23,'Pipeline\x20name');const _0x287ddd=_0x4813c2?.[_0x3d354a(0xa66)]??_0x4c7136?.[_0x3d354a(0xa66)]??null;if(_0x287ddd!==null)throw new Error(_0x3d354a(0xb67));const _0x9a016c=_0x4813c2?.['status']??_0x4c7136?.['status']??_0x3d354a(0x43f);if(!_0xe11592[_0x3d354a(0x9d0)](_0x9a016c))throw new Error(_0x3d354a(0x515)+_0x9a016c);const _0x478a89=_0x4813c2?.[_0x3d354a(0xab8)]??_0x4c7136?.[_0x3d354a(0xab8)];if(!Array[_0x3d354a(0x10f5)](_0x478a89)||_0x478a89[_0x3d354a(0x156)]===0x0)throw new Error(_0x3d354a(0xd2b));const _0x4bd7c9=_0x4813c2?.[_0x3d354a(0x654)]??_0x4c7136?.['meta']??{};if(!_0x4bd7c9||typeof _0x4bd7c9!=='object'||Array['isArray'](_0x4bd7c9))throw new Error('Pipeline\x20meta\x20must\x20be\x20a\x20plain\x20object');return{'name':_0x23af23['trim'](),'template':null,'status':_0x9a016c,'meta':_0x46ba11(_0x4bd7c9),'created':_0x4c7136?.['created']??_0x4813c2?.[_0x3d354a(0xf1a)]??_0x2f4119,'updated':_0x4813c2?.[_0x3d354a(0x965)]??_0x2f4119,'engines':_0x478a89['map'](_0x2f5e14)};}return okdbPipelinesRecords={'TYPE_PIPELINES':_0x45690c,'VALID_PIPELINE_STATUSES':_0xe11592,'normalizePipelineRecord':_0x5cce40},okdbPipelinesRecords;}var queueWorker,hasRequiredQueueWorker;function requireQueueWorker(){if(hasRequiredQueueWorker)return queueWorker;hasRequiredQueueWorker=0x1;const {OKDBError:_0xa16063}=requireOkdbError(),{ENGINE_STATUS:_0xcc623f}=requireOkdbEnginesEnums();return queueWorker=function _0x59d139(){const _0x4ed3d2=_0x47ab,_0x5b27a6=new Map();function _0x5c34df(_0x405d2b={},_0xdece0c=_0x4ed3d2(0x8d0)){const _0x9d33a2=_0x4ed3d2;return{'queueEnvName':_0x405d2b[_0x9d33a2(0x956)]??_0xdece0c,'jobType':_0x405d2b[_0x9d33a2(0x5da)]};}function _0x315828(_0x3999ca,{key:_0x3343e1,queueEnvName:_0x1daa6b,jobType:_0x30e3bd}){const _0x40c259=_0x4ed3d2;if(!_0x3999ca?.[_0x40c259(0xab8)]?.[_0x40c259(0x63e)]||!_0x1daa6b||!_0x30e3bd)return null;return _0x3999ca['engines'][_0x40c259(0x63e)](_0x40c259(0xf32))[_0x40c259(0xbdd)](_0x14ef36=>{const _0x3e3972=_0x40c259;if(!_0x14ef36||_0x14ef36[_0x3e3972(0x9dd)]===_0x3343e1||!_0x14ef36['isRunning'])return![];const _0x47632b=_0x14ef36['doc']?.[_0x3e3972(0x142)]??{},_0x56c4b8=_0x47632b[_0x3e3972(0x956)]??_0x14ef36[_0x3e3972(0x60a)]?.['name']??'default';return _0x56c4b8===_0x1daa6b&&_0x47632b[_0x3e3972(0x5da)]===_0x30e3bd;})??null;}function _0x12b06c(_0x1b7517,{queueEnvName:_0x556797,jobType:_0x57e336},_0x121bfb){const _0x58e863=_0x4ed3d2,_0x2cac7c=new _0xa16063(_0x58e863(0xfa6)+_0x1b7517+_0x58e863(0x496)+_0x121bfb[_0x58e863(0x9dd)]+_0x58e863(0x811)+_0x57e336+_0x58e863(0xdc8)+_0x556797+'\x22',_0x58e863(0x2bd),{'key':_0x1b7517,'queue_env':_0x556797,'job_type':_0x57e336,'conflict':_0x121bfb[_0x58e863(0x9dd)]});return _0x2cac7c[_0x58e863(0xfcd)]=0x199,_0x2cac7c;}function _0xae7b9(_0x28cb4f,_0x262008,_0x463bc1){const _0x38ffbb=_0x4ed3d2,_0x19ea7f=_0x28cb4f[_0x38ffbb(0xa3)]?.['get'](_0x262008)??(typeof _0x28cb4f[_0x38ffbb(0x30b)]==='function'?_0x28cb4f[_0x38ffbb(0x30b)](_0x262008):null);if(!_0x19ea7f)throw new _0xa16063(_0x463bc1+'\x20environment\x20not\x20found:\x20'+_0x262008,'ENV_NOT_FOUND',{'env':_0x262008,'label':_0x463bc1});return _0x19ea7f;}return{'docs':{'summary':_0x4ed3d2(0x85c),'description':'Consumes\x20jobs\x20of\x20one\x20queue\x20type\x20and\x20invokes\x20an\x20env\x20function\x20for\x20each\x20payload.','standalone':!![],'pipelineCompatible':!![],'scope':'env','configSchema':{'type':_0x4ed3d2(0xb36),'required':['job_type',_0x4ed3d2(0x34c)],'properties':{'job_type':{'type':_0x4ed3d2(0xf7a),'description':_0x4ed3d2(0xb8c)},'queue_env':{'type':_0x4ed3d2(0xf7a),'description':_0x4ed3d2(0x94b)},'handler':{'type':_0x4ed3d2(0xb36),'required':[_0x4ed3d2(0x31e),'name'],'properties':{'kind':{'type':'string','enum':[_0x4ed3d2(0x63b)]},'name':{'type':'string','description':_0x4ed3d2(0x7b3)},'env':{'type':'string','description':'Function\x20registry\x20env.\x20Defaults\x20to\x20the\x20engine\x20owning\x20env.'},'recordRuns':{'type':_0x4ed3d2(0xf7a),'enum':[_0x4ed3d2(0xf09),_0x4ed3d2(0x736),_0x4ed3d2(0x11cc)]}},'additionalProperties':![]},'concurrency':{'type':_0x4ed3d2(0x10f2),'minimum':0x1},'pollInterval':{'type':_0x4ed3d2(0x10f2),'minimum':0x1},'ttl':{'type':_0x4ed3d2(0x10f2),'minimum':0x1}},'additionalProperties':![]},'configExample':{'job_type':_0x4ed3d2(0xa49),'handler':{'kind':_0x4ed3d2(0x63b),'name':_0x4ed3d2(0x759)},'concurrency':0x1,'pollInterval':0x64,'ttl':0x7530},'patchConfigSchema':{'type':_0x4ed3d2(0xb36),'properties':{'concurrency':{'type':'integer','minimum':0x1},'pollInterval':{'type':_0x4ed3d2(0x10f2),'minimum':0x1},'ttl':{'type':_0x4ed3d2(0x10f2),'minimum':0x1}},'additionalProperties':![]},'patchableConfigKeys':[_0x4ed3d2(0xe4),_0x4ed3d2(0x7e3),_0x4ed3d2(0x347)],'notes':['Only\x20one\x20running\x20queue-worker\x20may\x20consume\x20the\x20same\x20job_type\x20within\x20the\x20same\x20queue\x20env.',_0x4ed3d2(0x667)],'links':['/api/env/:env/engines',_0x4ed3d2(0x5ce)]},'validate'(_0x43c998){const _0x4c669d=_0x4ed3d2;if(!_0x43c998||typeof _0x43c998!==_0x4c669d(0xb36)||Array[_0x4c669d(0x10f5)](_0x43c998))throw new _0xa16063(_0x4c669d(0x11e8),_0x4c669d(0xb0f));if(!_0x43c998['job_type']||typeof _0x43c998['job_type']!==_0x4c669d(0xf7a))throw new _0xa16063(_0x4c669d(0x105c),_0x4c669d(0xb0f));const _0x47fa68=_0x43c998[_0x4c669d(0x34c)];if(!_0x47fa68||typeof _0x47fa68!=='object'||Array['isArray'](_0x47fa68))throw new _0xa16063('queue-worker\x20config.handler\x20must\x20be\x20an\x20object',_0x4c669d(0xb0f));if(_0x47fa68[_0x4c669d(0x31e)]!==_0x4c669d(0x63b))throw new _0xa16063(_0x4c669d(0xcd1),_0x4c669d(0xb0f));if(!_0x47fa68['name']||typeof _0x47fa68['name']!=='string')throw new _0xa16063(_0x4c669d(0x3df),_0x4c669d(0xb0f));if(_0x43c998['queue_env']!==undefined&&(typeof _0x43c998[_0x4c669d(0x956)]!==_0x4c669d(0xf7a)||!_0x43c998['queue_env']))throw new _0xa16063(_0x4c669d(0x417),_0x4c669d(0xb0f));if(_0x47fa68['env']!==undefined&&(typeof _0x47fa68[_0x4c669d(0x30b)]!==_0x4c669d(0xf7a)||!_0x47fa68[_0x4c669d(0x30b)]))throw new _0xa16063('queue-worker\x20config.handler.env\x20must\x20be\x20a\x20non-empty\x20string\x20when\x20provided',_0x4c669d(0xb0f));if(_0x43c998['concurrency']!==undefined&&!(Number['isInteger'](_0x43c998[_0x4c669d(0xe4)])&&_0x43c998[_0x4c669d(0xe4)]>=0x1))throw new _0xa16063(_0x4c669d(0xd36),'BAD_CONFIG');if(_0x43c998[_0x4c669d(0x7e3)]!==undefined&&!(Number[_0x4c669d(0x474)](_0x43c998['pollInterval'])&&_0x43c998[_0x4c669d(0x7e3)]>=0x1))throw new _0xa16063('queue-worker\x20config.pollInterval\x20must\x20be\x20a\x20positive\x20integer','BAD_CONFIG');if(_0x43c998[_0x4c669d(0x347)]!==undefined&&!(Number[_0x4c669d(0x474)](_0x43c998['ttl'])&&_0x43c998[_0x4c669d(0x347)]>=0x1))throw new _0xa16063(_0x4c669d(0xe0a),_0x4c669d(0xb0f));if(_0x47fa68[_0x4c669d(0x10c)]!==undefined&&![_0x4c669d(0xf09),_0x4c669d(0x736),_0x4c669d(0x11cc)]['includes'](_0x47fa68[_0x4c669d(0x10c)]))throw new _0xa16063(_0x4c669d(0x520),_0x4c669d(0xb0f));},'patchConfig'(_0x285704={},_0xf104f5={}){const _0x1bd584=_0x4ed3d2;if(!_0xf104f5||typeof _0xf104f5!==_0x1bd584(0xb36)||Array[_0x1bd584(0x10f5)](_0xf104f5))throw new _0xa16063(_0x1bd584(0x1d0),_0x1bd584(0xb0f));const _0x390def={..._0x285704},_0x5736d0=['concurrency',_0x1bd584(0x7e3),_0x1bd584(0x347)],_0x2f9ac7=Object[_0x1bd584(0xa52)](_0xf104f5)[_0x1bd584(0x1103)](_0x166337=>!_0x5736d0[_0x1bd584(0x29c)](_0x166337));if(_0x2f9ac7[_0x1bd584(0x156)]>0x0)throw new _0xa16063('queue-worker\x20config\x20patch\x20only\x20supports\x20'+_0x5736d0['join'](',\x20')+_0x1bd584(0x7ec)+_0x2f9ac7[_0x1bd584(0x3d9)](',\x20'),_0x1bd584(0xb0f),{'allowed':_0x5736d0,'received':_0x2f9ac7});for(const _0xcbb8dc of _0x5736d0){if(!Object[_0x1bd584(0x901)]['hasOwnProperty']['call'](_0xf104f5,_0xcbb8dc))continue;const _0xdb0d5b=_0xf104f5[_0xcbb8dc];if(_0xdb0d5b==null||_0xdb0d5b==='')delete _0x390def[_0xcbb8dc];else _0x390def[_0xcbb8dc]=Math[_0x1bd584(0xcc)](Number(_0xdb0d5b));}return this['validate'](_0x390def),_0x390def;},async 'assertCreateAllowed'(_0x16bec3={}){const _0x5a3ba0=_0x4ed3d2,_0x2d279e=_0x5c34df(_0x16bec3[_0x5a3ba0(0x142)]??{},_0x16bec3[_0x5a3ba0(0x34a)]??_0x5a3ba0(0x8d0)),_0x409b31=_0x315828(_0x16bec3['okdb'],{'key':_0x16bec3[_0x5a3ba0(0x9dd)],..._0x2d279e});if(_0x409b31)throw _0x12b06c(_0x16bec3['key'],_0x2d279e,_0x409b31);},async 'assertStartAllowed'(_0x303c9c={}){const _0x33c7a2=_0x4ed3d2,_0x15e0db=_0x5c34df(_0x303c9c[_0x33c7a2(0x142)]??{},_0x303c9c['storeEnvName']??_0x33c7a2(0x8d0)),_0x57a946=_0x315828(_0x303c9c[_0x33c7a2(0xd4f)],{'key':_0x303c9c[_0x33c7a2(0x9dd)],..._0x15e0db});if(_0x57a946)throw _0x12b06c(_0x303c9c['key'],_0x15e0db,_0x57a946);},async 'start'(_0x45f508){const _0x4024e2=_0x4ed3d2,{okdb:_0x2ae210,key:_0x2a41a7,config:_0x4da177,storeEnvName:_0x317d4f}=_0x45f508,_0x194d07=_0x4da177[_0x4024e2(0x956)]??_0x317d4f,_0x3b3782=_0x4da177[_0x4024e2(0x34c)]?.[_0x4024e2(0x30b)]??_0x317d4f,_0x35ee53=_0xae7b9(_0x2ae210,_0x194d07,_0x4024e2(0xbda)),_0x3e4142=_0xae7b9(_0x2ae210,_0x3b3782,'queue-worker\x20function'),_0x109e6e=_0x35ee53[_0x4024e2(0x879)],_0xee600a=_0x3e4142[_0x4024e2(0x705)];if(!_0x109e6e||typeof _0x109e6e[_0x4024e2(0x738)]!==_0x4024e2(0x63b))throw new _0xa16063(_0x4024e2(0xfa6)+_0x2a41a7+_0x4024e2(0xfe2)+_0x194d07+'\x22',_0x4024e2(0xc17),{'env':_0x194d07});if(!_0xee600a||typeof _0xee600a[_0x4024e2(0x110b)]!=='function')throw new _0xa16063(_0x4024e2(0xfa6)+_0x2a41a7+_0x4024e2(0x185)+_0x3b3782+'\x22',_0x4024e2(0x672),{'env':_0x3b3782});let _0x2ca5f0=0x0,_0x481b45=0x0,_0x1d1ef5=0x0,_0x21e046=![];const _0x10c055=async(_0x143d33,_0x528cec)=>{const _0xc56fd3=_0x4024e2;_0x1d1ef5++;try{const _0x41f508=_0x528cec[_0xc56fd3(0x1035)]??{},_0x43990e=await _0x3e4142[_0xc56fd3(0x705)][_0xc56fd3(0x110b)](_0x4da177[_0xc56fd3(0x34c)][_0xc56fd3(0x1173)],_0x143d33,{'trigger':_0xc56fd3(0xf32),'recordRuns':_0x4da177[_0xc56fd3(0x34c)]['recordRuns']??'all','jobContext':{'id':_0x41f508['id']??_0x528cec[_0xc56fd3(0x595)]??null,'type':_0x41f508[_0xc56fd3(0xaee)]??_0x4da177[_0xc56fd3(0x5da)],'tries':_0x41f508['tries']??null,'created':_0x41f508[_0xc56fd3(0xf1a)]??null,'tags':_0x41f508[_0xc56fd3(0x35b)]??null,'priority':_0x41f508[_0xc56fd3(0x534)]??null,'bucket':_0x41f508[_0xc56fd3(0x401)]??null,'cron':_0x41f508[_0xc56fd3(0x183)]??null},'onJobAction'(_0x3e90f4){const _0x53ba00=_0xc56fd3;if(_0x3e90f4[_0x53ba00(0xaee)]===_0x53ba00(0xbd8))_0x528cec['heartbeat']?.();else _0x3e90f4[_0x53ba00(0xaee)]===_0x53ba00(0x1092)&&_0x528cec['markProgress']?.(_0x3e90f4[_0x53ba00(0xb4e)]);}});return _0x2ca5f0++,_0x43990e?.[_0xc56fd3(0x80e)]?.['value']??null;}catch(_0x27bf18){_0x481b45++;throw _0x27bf18;}finally{_0x1d1ef5--;}},_0x1923df=_0x109e6e[_0x4024e2(0x738)](_0x4da177[_0x4024e2(0x5da)],_0x10c055,{'concurrency':_0x4da177['concurrency']??0x1,'pollInterval':_0x4da177[_0x4024e2(0x7e3)]??0x3e8,'ttl':_0x4da177[_0x4024e2(0x347)]??0x7530});function _0x53b79e(){const _0x1879ff=_0x4024e2;return{'engine_key':_0x2a41a7,'job_type':_0x4da177[_0x1879ff(0x5da)],'queue_env':_0x194d07,'handler':{'kind':'function','name':_0x4da177['handler'][_0x1879ff(0x1173)],'env':_0x3b3782},'concurrency':_0x4da177['concurrency']??0x1,'processed':_0x2ca5f0,'failed':_0x481b45,'running':_0x1d1ef5,'state':_0x21e046?'paused':_0x1879ff(0x998),'paused':_0x21e046};}return _0x5b27a6[_0x4024e2(0x211)](_0x2a41a7,{'worker':_0x1923df,'stats':_0x53b79e}),{async 'stats'(){const _0x3d1701=_0x4024e2;return _0x5b27a6[_0x3d1701(0xbeb)](_0x2a41a7)?.[_0x3d1701(0xd72)]()??null;},async 'status'(){const _0x13cec3=_0x4024e2;return _0x5b27a6['get'](_0x2a41a7)?.[_0x13cec3(0xd72)]()??null;},async 'pause'(){const _0x3dbacc=_0x4024e2,_0x1130b2=_0x5b27a6[_0x3dbacc(0xbeb)](_0x2a41a7);if(!_0x1130b2||_0x21e046)return![];return _0x21e046=!![],await _0x1130b2[_0x3dbacc(0x738)]?.['stop']?.(),await _0x45f508['updateStatus']?.(_0xcc623f[_0x3dbacc(0xaa1)]),!![];},async 'resume'(){const _0x3534c1=_0x4024e2,_0x4e353e=_0x5b27a6['get'](_0x2a41a7);if(!_0x4e353e||!_0x21e046)return![];return _0x21e046=![],_0x4e353e[_0x3534c1(0x738)]?.[_0x3534c1(0xa00)]?.(_0x10c055),await _0x45f508[_0x3534c1(0xb3b)]?.(_0xcc623f[_0x3534c1(0x39c)]),!![];}};},async 'stop'(_0x378961){const _0x35cbac=_0x4ed3d2,_0x466e65=_0x5b27a6[_0x35cbac(0xbeb)](_0x378961[_0x35cbac(0x9dd)]);if(!_0x466e65)return;try{await _0x466e65['worker']?.[_0x35cbac(0x1fe)]?.();}finally{_0x5b27a6['delete'](_0x378961[_0x35cbac(0x9dd)]);}}};},queueWorker;}var processor,hasRequiredProcessor;function requireProcessor(){if(hasRequiredProcessor)return processor;hasRequiredProcessor=0x1;const {OKDBError:_0x105727}=requireOkdbError();return processor=function _0x4e13e9(){const _0x37dcef=_0x47ab,_0x2b20a0=new Map();function _0x8b4afa(_0x53b9b2,_0xa1a902,_0x1d4723){const _0x301e26=_0x47ab,_0x253b63=_0x53b9b2['_envs']?.[_0x301e26(0xbeb)](_0xa1a902)??(typeof _0x53b9b2[_0x301e26(0x30b)]===_0x301e26(0x63b)?_0x53b9b2[_0x301e26(0x30b)](_0xa1a902):null);if(!_0x253b63)throw new _0x105727(_0x1d4723+_0x301e26(0x44e)+_0xa1a902,_0x301e26(0x8ef),{'env':_0xa1a902,'label':_0x1d4723});return _0x253b63;}return{'docs':{'summary':'Change-log\x20processor\x20engine','description':_0x37dcef(0xff0),'standalone':!![],'pipelineCompatible':!![],'scope':_0x37dcef(0x30b),'configSchema':{'type':_0x37dcef(0xb36),'required':['source_type',_0x37dcef(0x34c)],'properties':{'source_type':{'type':_0x37dcef(0xf7a),'description':_0x37dcef(0xf8a)},'source_env':{'type':_0x37dcef(0xf7a),'description':_0x37dcef(0x7b5)},'handler':{'type':_0x37dcef(0xb36),'required':[_0x37dcef(0x31e),_0x37dcef(0x1173)],'properties':{'kind':{'type':_0x37dcef(0xf7a),'enum':[_0x37dcef(0x63b)]},'name':{'type':_0x37dcef(0xf7a),'description':_0x37dcef(0xd56)},'env':{'type':_0x37dcef(0xf7a),'description':'Function\x20registry\x20env.\x20Defaults\x20to\x20the\x20engine\x20owning\x20env.'},'recordRuns':{'type':'string','enum':[_0x37dcef(0xf09),_0x37dcef(0x736),'none']}},'additionalProperties':![]},'mode':{'type':_0x37dcef(0xf7a),'enum':[_0x37dcef(0x1006),_0x37dcef(0x10aa)]},'bootstrap':{'type':[_0x37dcef(0xf7a),'null'],'enum':['snapshot',_0x37dcef(0x9be),null]},'originMode':{'type':_0x37dcef(0xf7a),'enum':[_0x37dcef(0x726),_0x37dcef(0xe61),_0x37dcef(0xf09)]},'batchSize':{'type':'integer','minimum':0x1},'hydrateValues':{'type':_0x37dcef(0x854)},'cursorKey':{'type':_0x37dcef(0xf7a)},'lockMode':{'type':[_0x37dcef(0xf7a),_0x37dcef(0x11e)],'enum':[_0x37dcef(0x7f3),null]},'failOnHandlerError':{'type':_0x37dcef(0x854)}},'additionalProperties':![]},'configExample':{'source_type':_0x37dcef(0x1244),'handler':{'kind':_0x37dcef(0x63b),'name':'projectOrders'},'bootstrap':_0x37dcef(0x33f),'batchSize':0x100},'notes':[_0x37dcef(0x7eb),'Runtime\x20pause/resume/retry\x20controls\x20are\x20available\x20after\x20creation.'],'links':['/api/env/:env/engines',_0x37dcef(0x5ce)]},'validate'(_0x2958fe){const _0xbe20=_0x37dcef;if(!_0x2958fe||typeof _0x2958fe!==_0xbe20(0xb36)||Array[_0xbe20(0x10f5)](_0x2958fe))throw new _0x105727(_0xbe20(0xb5),_0xbe20(0xb0f));if(!_0x2958fe[_0xbe20(0x481)]||typeof _0x2958fe[_0xbe20(0x481)]!=='string')throw new _0x105727('processor\x20config.source_type\x20must\x20be\x20a\x20non-empty\x20string',_0xbe20(0xb0f));const _0x165c44=_0x2958fe[_0xbe20(0x34c)];if(!_0x165c44||typeof _0x165c44!==_0xbe20(0xb36)||Array['isArray'](_0x165c44))throw new _0x105727(_0xbe20(0x8ca),_0xbe20(0xb0f));if(_0x165c44['kind']!=='function')throw new _0x105727(_0xbe20(0x89e),_0xbe20(0xb0f));if(!_0x165c44[_0xbe20(0x1173)]||typeof _0x165c44['name']!==_0xbe20(0xf7a))throw new _0x105727(_0xbe20(0x7d5),_0xbe20(0xb0f));if(_0x2958fe[_0xbe20(0x43a)]!==undefined&&(typeof _0x2958fe[_0xbe20(0x43a)]!==_0xbe20(0xf7a)||!_0x2958fe['source_env']))throw new _0x105727(_0xbe20(0xc9b),'BAD_CONFIG');if(_0x165c44[_0xbe20(0x30b)]!==undefined&&(typeof _0x165c44[_0xbe20(0x30b)]!==_0xbe20(0xf7a)||!_0x165c44[_0xbe20(0x30b)]))throw new _0x105727('processor\x20config.handler.env\x20must\x20be\x20a\x20non-empty\x20string\x20when\x20provided','BAD_CONFIG');if(_0x2958fe[_0xbe20(0x259)]!==undefined&&![_0xbe20(0x1006),_0xbe20(0x10aa)][_0xbe20(0x29c)](_0x2958fe['mode']))throw new _0x105727(_0xbe20(0x1163),'BAD_CONFIG');if(_0x2958fe['bootstrap']!==undefined&&_0x2958fe['bootstrap']!==null&&![_0xbe20(0x33f),'log'][_0xbe20(0x29c)](_0x2958fe[_0xbe20(0x781)]))throw new _0x105727(_0xbe20(0x4ee),_0xbe20(0xb0f));if(_0x2958fe['originMode']!==undefined&&![_0xbe20(0x726),_0xbe20(0xe61),_0xbe20(0xf09)][_0xbe20(0x29c)](_0x2958fe[_0xbe20(0xb4)]))throw new _0x105727(_0xbe20(0xbfd),_0xbe20(0xb0f));if(_0x2958fe[_0xbe20(0xc2a)]!==undefined&&!(Number[_0xbe20(0x474)](_0x2958fe[_0xbe20(0xc2a)])&&_0x2958fe[_0xbe20(0xc2a)]>=0x1))throw new _0x105727(_0xbe20(0x1159),'BAD_CONFIG');if(_0x2958fe['cursorKey']!==undefined&&(typeof _0x2958fe[_0xbe20(0x10f6)]!==_0xbe20(0xf7a)||!_0x2958fe[_0xbe20(0x10f6)]))throw new _0x105727(_0xbe20(0xb12),_0xbe20(0xb0f));if(_0x2958fe[_0xbe20(0x2fb)]!==undefined&&_0x2958fe[_0xbe20(0x2fb)]!==null&&_0x2958fe[_0xbe20(0x2fb)]!==_0xbe20(0x7f3))throw new _0x105727(_0xbe20(0x324),_0xbe20(0xb0f));if(_0x2958fe['hydrateValues']!==undefined&&typeof _0x2958fe[_0xbe20(0x581)]!==_0xbe20(0x854))throw new _0x105727(_0xbe20(0x70d),_0xbe20(0xb0f));if(_0x2958fe[_0xbe20(0xf6d)]!==undefined&&typeof _0x2958fe[_0xbe20(0xf6d)]!==_0xbe20(0x854))throw new _0x105727(_0xbe20(0x4d7),_0xbe20(0xb0f));if(_0x165c44[_0xbe20(0x10c)]!==undefined&&![_0xbe20(0xf09),_0xbe20(0x736),_0xbe20(0x11cc)]['includes'](_0x165c44[_0xbe20(0x10c)]))throw new _0x105727('processor\x20config.handler.recordRuns\x20must\x20be\x20\x22all\x22,\x20\x22errors\x22,\x20or\x20\x22none\x22',_0xbe20(0xb0f));},async 'start'(_0x4c5659){const _0x58fdd9=_0x37dcef,{okdb:_0x130d12,key:_0x5840a3,config:_0x4ccd79,storeEnvName:_0x30eb3c}=_0x4c5659,_0x415f2f=_0x4ccd79['source_env']??_0x30eb3c,_0x43704c=_0x4ccd79[_0x58fdd9(0x34c)]?.[_0x58fdd9(0x30b)]??_0x30eb3c,_0x582f2c=_0x8b4afa(_0x130d12,_0x415f2f,_0x58fdd9(0x228)),_0x502938=_0x8b4afa(_0x130d12,_0x43704c,'processor\x20function'),_0x260855=_0x582f2c[_0x58fdd9(0xf39)],_0x55bd40=_0x502938[_0x58fdd9(0x705)];if(!_0x260855||typeof _0x260855[_0x58fdd9(0x2a4)]!==_0x58fdd9(0x63b))throw new _0x105727(_0x58fdd9(0x117c)+_0x5840a3+_0x58fdd9(0xbee)+_0x415f2f+'\x22',_0x58fdd9(0xe0),{'env':_0x415f2f});if(!_0x55bd40||typeof _0x55bd40[_0x58fdd9(0x110b)]!=='function')throw new _0x105727(_0x58fdd9(0x117c)+_0x5840a3+_0x58fdd9(0x185)+_0x43704c+'\x22',_0x58fdd9(0x672),{'env':_0x43704c});let _0x294ec0=0x0,_0x3e8a93=0x0,_0x16bff7=0x0,_0x5b51c7=0x0,_0x368bfe=null,_0x7b1593=null,_0x3a02b3=null;const _0x1138bb=()=>_0x260855[_0x58fdd9(0x2a4)](_0x4ccd79[_0x58fdd9(0x481)],{'mode':_0x4ccd79[_0x58fdd9(0x259)]??'async','bootstrap':(_0x4ccd79['mode']??_0x58fdd9(0x1006))===_0x58fdd9(0x10aa)?null:_0x4ccd79[_0x58fdd9(0x781)]??_0x58fdd9(0x33f),'originMode':_0x4ccd79[_0x58fdd9(0xb4)]??_0x58fdd9(0xf09),'batchSize':_0x4ccd79['batchSize']??0x100,'hydrateValues':_0x4ccd79[_0x58fdd9(0x581)]??!![],'cursorKey':_0x4ccd79['cursorKey']??_0x5840a3,'lockMode':_0x4ccd79[_0x58fdd9(0x2fb)]??_0x58fdd9(0x7f3),'failOnHandlerError':![],'name':_0x4ccd79['name']??_0x5840a3,'meta':{'engine_key':_0x5840a3,'engine_type':_0x58fdd9(0xf39)},'handler':async(_0x755554,_0x4aaf2f={})=>{const _0x997ff6=_0x58fdd9;if(_0x7b1593===_0x997ff6(0x225))return _0x368bfe;_0x5b51c7++;try{const _0x492892=await _0x502938[_0x997ff6(0x705)]['run'](_0x4ccd79[_0x997ff6(0x34c)][_0x997ff6(0x1173)],_0x755554,{'trigger':'processor-engine','recordRuns':_0x4ccd79[_0x997ff6(0x34c)][_0x997ff6(0x10c)]??_0x997ff6(0xf09),'processorContext':{'mode':_0x4aaf2f[_0x997ff6(0x259)]??null,'sourceType':_0x4ccd79[_0x997ff6(0x481)],'sourceEnv':_0x415f2f,'processor':_0x4aaf2f['processor']??_0x131e9c['id'],'engineKey':_0x5840a3,'cursorKey':_0x131e9c[_0x997ff6(0x10f6)]}});return _0x294ec0++,_0x3e8a93+=_0x755554[_0x997ff6(0x156)],_0x3a02b3=null,_0x368bfe=_0x492892?.[_0x997ff6(0x80e)]?.[_0x997ff6(0x568)]??null,_0x368bfe;}catch(_0x347887){_0x16bff7++,_0x7b1593='error',_0x3a02b3=_0x347887?.[_0x997ff6(0xb4e)]??String(_0x347887);throw _0x347887;}finally{_0x5b51c7--;}}});let _0x131e9c=_0x1138bb();return _0x2b20a0[_0x58fdd9(0x211)](_0x5840a3,{'registration':_0x131e9c,'startRegistration':_0x1138bb,'stats':()=>{const _0x15e566=_0x58fdd9,_0x2c2612=_0x131e9c['status']?.()??null,_0x5d13f3=_0x7b1593===_0x15e566(0x225)?_0x15e566(0x225):_0x2c2612?.[_0x15e566(0x10e2)]??_0x7b1593??null;return{'engine_key':_0x5840a3,'source_type':_0x4ccd79[_0x15e566(0x481)],'source_env':_0x415f2f,'handler':{'kind':'function','name':_0x4ccd79[_0x15e566(0x34c)]['name'],'env':_0x43704c},'mode':_0x4ccd79[_0x15e566(0x259)]??'async','bootstrap':(_0x4ccd79[_0x15e566(0x259)]??_0x15e566(0x1006))==='inline'?null:_0x4ccd79[_0x15e566(0x781)]??'snapshot','originMode':_0x4ccd79['originMode']??_0x15e566(0xf09),'batchSize':_0x4ccd79['batchSize']??0x100,'hydrateValues':_0x4ccd79[_0x15e566(0x581)]??!![],'cursorKey':_0x131e9c[_0x15e566(0x10f6)],'lockMode':_0x4ccd79[_0x15e566(0x2fb)]??_0x15e566(0x7f3),'failOnHandlerError':_0x4ccd79[_0x15e566(0xf6d)]??!![],'invocations':_0x294ec0,'processedChanges':_0x3e8a93,'failedBatches':_0x16bff7,'runningBatches':_0x5b51c7,'lastResult':_0x368bfe,'registrationId':_0x131e9c['id'],'state':_0x5d13f3,'paused':_0x2c2612?.['paused']??![],'lastClock':_0x2c2612?.['lastClock']??0x0,'headClock':_0x2c2612?.[_0x15e566(0x6ab)]??0x0,'lag':_0x2c2612?.[_0x15e566(0x262)]??0x0,'progress':_0x2c2612?.[_0x15e566(0xb97)]??null,'error':_0x3a02b3??_0x2c2612?.[_0x15e566(0x225)]??null};}}),_0x7b1593=_0x131e9c[_0x58fdd9(0xfcd)]?.()?.[_0x58fdd9(0x10e2)]??null,{async 'stats'(){const _0x126fd4=_0x58fdd9;return _0x2b20a0[_0x126fd4(0xbeb)](_0x5840a3)?.[_0x126fd4(0xd72)]()??null;},async 'status'(){const _0xccb426=_0x58fdd9;return _0x2b20a0['get'](_0x5840a3)?.[_0xccb426(0xd72)]()??null;},async 'pause'(){const _0x1c42a2=_0x58fdd9;return _0x131e9c[_0x1c42a2(0x315)]?.()??![];},async 'resume'(){const _0x1c280a=_0x58fdd9;return _0x131e9c[_0x1c280a(0x445)]?.()??![];},async 'retry'(){const _0x4a7397=_0x58fdd9;try{await _0x131e9c?.();}catch{}return _0x7b1593=null,_0x3a02b3=null,_0x131e9c=_0x1138bb(),_0x2b20a0['get'](_0x5840a3)[_0x4a7397(0xfaa)]=_0x131e9c,!![];}};},async 'stop'(_0x243411){const _0x4092d6=_0x37dcef,_0x2444f1=_0x2b20a0[_0x4092d6(0xbeb)](_0x243411[_0x4092d6(0x9dd)]);if(!_0x2444f1)return;try{await _0x2444f1['registration']?.();}finally{_0x2b20a0[_0x4092d6(0x3b3)](_0x243411[_0x4092d6(0x9dd)]);}}};},processor;}var materializer,hasRequiredMaterializer;function requireMaterializer(){if(hasRequiredMaterializer)return materializer;hasRequiredMaterializer=0x1;const {OKDBError:_0x1aa2ef}=requireOkdbError();return materializer=function _0xbef327(){const _0x422f2a=_0x47ab,_0x295ea7=new Map();function _0x5af971(_0x41f983,_0x117cf3,_0x1b1b49){const _0x193b9b=_0x47ab,_0x1e17b4=_0x41f983[_0x193b9b(0xa3)]?.['get'](_0x117cf3)??(typeof _0x41f983[_0x193b9b(0x30b)]===_0x193b9b(0x63b)?_0x41f983[_0x193b9b(0x30b)](_0x117cf3):null);if(!_0x1e17b4)throw new _0x1aa2ef(_0x1b1b49+'\x20environment\x20not\x20found:\x20'+_0x117cf3,'ENV_NOT_FOUND',{'env':_0x117cf3,'label':_0x1b1b49});return _0x1e17b4;}async function _0x37c754(_0x52ef77,_0x8e44f,_0x3ce170){const _0x50efc6=_0x47ab;if(!Array['isArray'](_0x3ce170)||_0x3ce170[_0x50efc6(0x156)]===0x0)return;for(const _0x3fb435 of _0x3ce170){if(!_0x3fb435||typeof _0x3fb435!==_0x50efc6(0xb36))continue;if(_0x3fb435[_0x50efc6(0x942)]===_0x50efc6(0x92c)&&_0x3fb435['key']!=null)await _0x52ef77[_0x50efc6(0x92c)](_0x8e44f,String(_0x3fb435[_0x50efc6(0x9dd)]),_0x3fb435[_0x50efc6(0x568)]??null);else _0x3fb435[_0x50efc6(0x942)]==='remove'&&_0x3fb435[_0x50efc6(0x9dd)]!=null&&await _0x52ef77[_0x50efc6(0x21e)](_0x8e44f,String(_0x3fb435[_0x50efc6(0x9dd)]));}}return{'docs':{'summary':_0x422f2a(0xb35),'description':_0x422f2a(0x2f7),'standalone':!![],'pipelineCompatible':!![],'scope':_0x422f2a(0x30b),'configSchema':{'type':_0x422f2a(0xb36),'required':[_0x422f2a(0x481),_0x422f2a(0x11c3),_0x422f2a(0x34c)],'properties':{'source_type':{'type':_0x422f2a(0xf7a),'description':_0x422f2a(0xf8a)},'target_type':{'type':'string','description':'Target\x20type\x20maintained\x20by\x20the\x20materializer.'},'source_env':{'type':_0x422f2a(0xf7a),'description':_0x422f2a(0x7b5)},'target_env':{'type':'string','description':'Target\x20env\x20name.\x20Defaults\x20to\x20the\x20engine\x20owning\x20env.'},'handler':{'type':_0x422f2a(0xb36),'required':['kind',_0x422f2a(0x1173)],'properties':{'kind':{'type':_0x422f2a(0xf7a),'enum':[_0x422f2a(0x63b)]},'name':{'type':'string','description':_0x422f2a(0x2a0)},'env':{'type':_0x422f2a(0xf7a),'description':_0x422f2a(0x3fd)},'recordRuns':{'type':_0x422f2a(0xf7a),'enum':[_0x422f2a(0xf09),'errors','none']}},'additionalProperties':![]},'bootstrap':{'type':[_0x422f2a(0xf7a),_0x422f2a(0x11e)],'enum':[_0x422f2a(0x33f),_0x422f2a(0x9be),null]},'originMode':{'type':_0x422f2a(0xf7a),'enum':[_0x422f2a(0x726),'remote','all']},'batchSize':{'type':_0x422f2a(0x10f2),'minimum':0x1},'clearTargetOnRebuild':{'type':_0x422f2a(0x854)}},'additionalProperties':![]},'configExample':{'source_type':'orders','target_type':_0x422f2a(0x766),'handler':{'kind':_0x422f2a(0x63b),'name':_0x422f2a(0x512)},'bootstrap':'snapshot','batchSize':0x80,'clearTargetOnRebuild':!![]},'notes':['Materializer\x20handlers\x20must\x20return\x20an\x20array\x20of\x20put/remove\x20operations;\x20direct\x20writes\x20are\x20not\x20part\x20of\x20the\x20contract.',_0x422f2a(0x205)],'links':[_0x422f2a(0xb96),_0x422f2a(0x5ce)]},'validate'(_0x538189){const _0x376e71=_0x422f2a;if(!_0x538189||typeof _0x538189!==_0x376e71(0xb36)||Array[_0x376e71(0x10f5)](_0x538189))throw new _0x1aa2ef(_0x376e71(0x206),_0x376e71(0xb0f));if(!_0x538189[_0x376e71(0x481)]||typeof _0x538189[_0x376e71(0x481)]!==_0x376e71(0xf7a))throw new _0x1aa2ef(_0x376e71(0x775),_0x376e71(0xb0f));if(!_0x538189[_0x376e71(0x11c3)]||typeof _0x538189[_0x376e71(0x11c3)]!=='string')throw new _0x1aa2ef(_0x376e71(0x104c),_0x376e71(0xb0f));const _0x3e3110=_0x538189[_0x376e71(0x34c)];if(!_0x3e3110||typeof _0x3e3110!=='object'||Array[_0x376e71(0x10f5)](_0x3e3110))throw new _0x1aa2ef(_0x376e71(0xab4),_0x376e71(0xb0f));if(_0x3e3110['kind']!==_0x376e71(0x63b))throw new _0x1aa2ef('materializer\x20config.handler.kind\x20must\x20be\x20\x22function\x22\x20in\x20V1','BAD_CONFIG');if(!_0x3e3110[_0x376e71(0x1173)]||typeof _0x3e3110[_0x376e71(0x1173)]!=='string')throw new _0x1aa2ef(_0x376e71(0x89d),'BAD_CONFIG');if(_0x538189[_0x376e71(0x43a)]!==undefined&&(typeof _0x538189[_0x376e71(0x43a)]!=='string'||!_0x538189[_0x376e71(0x43a)]))throw new _0x1aa2ef(_0x376e71(0xb7d),'BAD_CONFIG');if(_0x538189[_0x376e71(0xa27)]!==undefined&&(typeof _0x538189[_0x376e71(0xa27)]!=='string'||!_0x538189[_0x376e71(0xa27)]))throw new _0x1aa2ef(_0x376e71(0x122e),_0x376e71(0xb0f));if(_0x3e3110[_0x376e71(0x30b)]!==undefined&&(typeof _0x3e3110[_0x376e71(0x30b)]!==_0x376e71(0xf7a)||!_0x3e3110['env']))throw new _0x1aa2ef('materializer\x20config.handler.env\x20must\x20be\x20a\x20non-empty\x20string\x20when\x20provided',_0x376e71(0xb0f));if(_0x538189[_0x376e71(0x781)]!==undefined&&_0x538189[_0x376e71(0x781)]!==null&&![_0x376e71(0x33f),'log'][_0x376e71(0x29c)](_0x538189[_0x376e71(0x781)]))throw new _0x1aa2ef(_0x376e71(0x332),_0x376e71(0xb0f));if(_0x538189['originMode']!==undefined&&![_0x376e71(0x726),'remote',_0x376e71(0xf09)][_0x376e71(0x29c)](_0x538189[_0x376e71(0xb4)]))throw new _0x1aa2ef(_0x376e71(0x38d),_0x376e71(0xb0f));if(_0x538189[_0x376e71(0xc2a)]!==undefined&&!(Number[_0x376e71(0x474)](_0x538189[_0x376e71(0xc2a)])&&_0x538189[_0x376e71(0xc2a)]>=0x1))throw new _0x1aa2ef(_0x376e71(0x56a),_0x376e71(0xb0f));if(_0x538189[_0x376e71(0x455)]!==undefined&&typeof _0x538189[_0x376e71(0x455)]!==_0x376e71(0x854))throw new _0x1aa2ef(_0x376e71(0x96c),_0x376e71(0xb0f));if(_0x3e3110[_0x376e71(0x10c)]!==undefined&&!['all','errors',_0x376e71(0x11cc)][_0x376e71(0x29c)](_0x3e3110[_0x376e71(0x10c)]))throw new _0x1aa2ef('materializer\x20config.handler.recordRuns\x20must\x20be\x20\x22all\x22,\x20\x22errors\x22,\x20or\x20\x22none\x22',_0x376e71(0xb0f));},async 'start'(_0x33f5c3){const _0x51211f=_0x422f2a,{okdb:_0x5c4be7,key:_0x490893,config:_0x1aa6b4,storeEnvName:_0x4e1f00}=_0x33f5c3,_0x3b1838=_0x1aa6b4[_0x51211f(0x43a)]??_0x4e1f00,_0x27b397=_0x1aa6b4[_0x51211f(0xa27)]??_0x4e1f00,_0x471935=_0x1aa6b4[_0x51211f(0x34c)]?.['env']??_0x4e1f00,_0x27eb64=_0x5af971(_0x5c4be7,_0x3b1838,'materializer\x20source'),_0x564f72=_0x5af971(_0x5c4be7,_0x27b397,'materializer\x20target'),_0x57e492=_0x5af971(_0x5c4be7,_0x471935,_0x51211f(0x89a)),_0xf4616a=_0x27eb64[_0x51211f(0xf39)],_0x32a73a=_0x57e492[_0x51211f(0x705)];if(!_0xf4616a||typeof _0xf4616a[_0x51211f(0x2a4)]!=='function')throw new _0x1aa2ef('materializer\x20\x22'+_0x490893+_0x51211f(0xbee)+_0x3b1838+'\x22',_0x51211f(0xe0),{'env':_0x3b1838});if(!_0x32a73a||typeof _0x32a73a[_0x51211f(0x110b)]!=='function')throw new _0x1aa2ef(_0x51211f(0x68c)+_0x490893+_0x51211f(0x185)+_0x471935+'\x22',_0x51211f(0x672),{'env':_0x471935});let _0x27f483=0x0,_0x1f1188=0x0,_0xdee484=0x0,_0x20fa08=0x0,_0x54b151=0x0,_0x14961=null,_0x52c46b=null,_0x460cec=null;const _0xf2961f=_0x1aa6b4[_0x51211f(0x10f6)]??_0x490893,_0xa38bba=()=>_0xf4616a[_0x51211f(0x2a4)](_0x1aa6b4[_0x51211f(0x481)],{'bootstrap':_0x1aa6b4[_0x51211f(0x781)]??_0x51211f(0x33f),'originMode':_0x1aa6b4[_0x51211f(0xb4)]??_0x51211f(0xf09),'batchSize':_0x1aa6b4[_0x51211f(0xc2a)]??0x80,'hydrateValues':_0x1aa6b4['hydrateValues']!==![],'cursorKey':_0xf2961f,'lockMode':_0x51211f(0x7f3),'failOnHandlerError':![],'name':_0x1aa6b4[_0x51211f(0x1173)]??_0x490893,'meta':{'engine_key':_0x490893,'engine_type':_0x51211f(0xfbb)},'handler':async(_0x3b550b,_0x3657f4={})=>{const _0x542ce6=_0x51211f;if(_0x52c46b==='error')return _0x14961;_0x54b151++;try{const _0x50b83e=await _0x32a73a[_0x542ce6(0x110b)](_0x1aa6b4[_0x542ce6(0x34c)][_0x542ce6(0x1173)],_0x3b550b,{'trigger':_0x542ce6(0x11ba),'recordRuns':_0x1aa6b4[_0x542ce6(0x34c)][_0x542ce6(0x10c)]??_0x542ce6(0xf09),'materializerContext':{'sourceType':_0x1aa6b4[_0x542ce6(0x481)],'targetType':_0x1aa6b4['target_type'],'sourceEnv':_0x3b1838,'targetEnv':_0x27b397,'mode':_0x3657f4[_0x542ce6(0x259)]??null,'engineKey':_0x490893,'cursorKey':_0xf2961f}}),_0x5d03b8=_0x50b83e?.['result']?.[_0x542ce6(0x568)];return Array['isArray'](_0x5d03b8)&&_0x5d03b8['length']>0x0&&(!_0x564f72['hasType'](_0x1aa6b4[_0x542ce6(0x11c3)])&&await _0x564f72[_0x542ce6(0x49a)](_0x1aa6b4[_0x542ce6(0x11c3)]),await _0x37c754(_0x564f72,_0x1aa6b4[_0x542ce6(0x11c3)],_0x5d03b8),_0xdee484+=_0x5d03b8[_0x542ce6(0x156)]),_0x27f483++,_0x1f1188+=_0x3b550b['length'],_0x460cec=null,_0x14961=_0x5d03b8??null,_0x14961;}catch(_0x4f1c8c){_0x20fa08++,_0x52c46b='error',_0x460cec=_0x4f1c8c?.[_0x542ce6(0xb4e)]??String(_0x4f1c8c);throw _0x4f1c8c;}finally{_0x54b151--;}}});let _0x300a10=_0xa38bba();return _0x295ea7[_0x51211f(0x211)](_0x490893,{'registration':_0x300a10,'config':_0x1aa6b4,'sourceEnvName':_0x3b1838,'targetEnvName':_0x27b397,'functionEnvName':_0x471935,'cursorKey':_0xf2961f,'processor':_0xf4616a,'targetEnv':_0x564f72,'startRegistration':_0xa38bba,'getStats':()=>{const _0x4cb75e=_0x51211f,_0x393f78=_0x300a10['status']?.()??null,_0x4316d1=_0x52c46b===_0x4cb75e(0x225)?_0x4cb75e(0x225):_0x393f78?.[_0x4cb75e(0x10e2)]??_0x52c46b??null;let _0xa3f43e=null;try{_0x564f72[_0x4cb75e(0x7c0)](_0x1aa6b4[_0x4cb75e(0x11c3)])&&(_0xa3f43e=_0x564f72[_0x4cb75e(0x7df)](_0x1aa6b4['target_type']));}catch{}return{'engine_key':_0x490893,'source_type':_0x1aa6b4[_0x4cb75e(0x481)],'target_type':_0x1aa6b4[_0x4cb75e(0x11c3)],'source_env':_0x3b1838,'target_env':_0x27b397,'handler':{'kind':_0x4cb75e(0x63b),'name':_0x1aa6b4[_0x4cb75e(0x34c)]['name'],'env':_0x471935},'bootstrap':_0x1aa6b4[_0x4cb75e(0x781)]??_0x4cb75e(0x33f),'originMode':_0x1aa6b4[_0x4cb75e(0xb4)]??_0x4cb75e(0xf09),'batchSize':_0x1aa6b4[_0x4cb75e(0xc2a)]??0x80,'cursorKey':_0x300a10[_0x4cb75e(0x10f6)]??_0xf2961f,'clearTargetOnRebuild':_0x1aa6b4[_0x4cb75e(0x455)]!==![],'invocations':_0x27f483,'processedChanges':_0x1f1188,'appliedOps':_0xdee484,'failedBatches':_0x20fa08,'runningBatches':_0x54b151,'targetCount':_0xa3f43e,'lastResult':_0x14961,'registrationId':_0x300a10['id'],'state':_0x4316d1,'paused':_0x393f78?.['paused']??![],'lastClock':_0x393f78?.['lastClock']??0x0,'headClock':_0x393f78?.[_0x4cb75e(0x6ab)]??0x0,'lag':_0x393f78?.[_0x4cb75e(0x262)]??0x0,'progress':_0x393f78?.[_0x4cb75e(0xb97)]??null,'error':_0x460cec??_0x393f78?.[_0x4cb75e(0x225)]??null};},async 'rebuild'(){const _0x4890bd=_0x51211f;try{await _0x300a10?.();}catch{}if(_0x1aa6b4['clearTargetOnRebuild']!==![])try{if(_0x564f72[_0x4890bd(0x7c0)](_0x1aa6b4[_0x4890bd(0x11c3)])){const _0x5d076e=_0x564f72[_0x4890bd(0xa28)](_0x1aa6b4['target_type'])['map'](_0x5495eb=>_0x5495eb['key']);for(const _0xfd3008 of _0x5d076e){_0x564f72['remove'](_0x1aa6b4['target_type'],_0xfd3008);}}}catch{}_0x27f483=0x0,_0x1f1188=0x0,_0xdee484=0x0,_0x20fa08=0x0,_0x52c46b=null,_0x460cec=null,_0x14961=null;try{typeof _0xf4616a[_0x4890bd(0xcec)]==='function'&&await _0xf4616a[_0x4890bd(0xcec)](_0xf2961f);}catch{}_0x300a10=_0xa38bba(),_0x295ea7[_0x4890bd(0xbeb)](_0x490893)[_0x4890bd(0xfaa)]=_0x300a10;},async 'resetCursor'(){const _0x37c94a=_0x51211f;try{await _0x300a10?.();}catch{}_0x52c46b=null,_0x460cec=null;try{typeof _0xf4616a['resetCursor']===_0x37c94a(0x63b)&&await _0xf4616a['resetCursor'](_0xf2961f);}catch{}_0x300a10=_0xa38bba(),_0x295ea7['get'](_0x490893)[_0x37c94a(0xfaa)]=_0x300a10;}}),_0x52c46b=_0x300a10['status']?.()?.[_0x51211f(0x10e2)]??null,{async 'stats'(){return _0x295ea7['get'](_0x490893)?.['getStats']()??null;},async 'status'(){const _0x4346b2=_0x51211f;return _0x295ea7[_0x4346b2(0xbeb)](_0x490893)?.['getStats']()??null;},async 'pause'(){const _0x2b0690=_0x51211f;return _0x300a10[_0x2b0690(0x315)]?.()??![];},async 'resume'(){const _0x5e64ae=_0x51211f;return _0x300a10[_0x5e64ae(0x445)]?.()??![];},async 'retry'(){const _0x5336d7=_0x51211f;try{await _0x300a10?.();}catch{}_0x52c46b=null,_0x460cec=null;try{typeof _0xf4616a['resetCursor']==='function'&&await _0xf4616a[_0x5336d7(0xcec)](_0xf2961f);}catch{}return _0x300a10=_0xa38bba(),_0x295ea7[_0x5336d7(0xbeb)](_0x490893)[_0x5336d7(0xfaa)]=_0x300a10,!![];},async 'rebuild'(){const _0x22b5c0=_0x51211f;return _0x295ea7[_0x22b5c0(0xbeb)](_0x490893)?.[_0x22b5c0(0x11ab)]();},async 'resetCursor'(){const _0x285c52=_0x51211f;return _0x295ea7[_0x285c52(0xbeb)](_0x490893)?.[_0x285c52(0xcec)]();}};},async 'stop'(_0x51bf52){const _0x35d7cb=_0x422f2a,_0x34535d=_0x295ea7[_0x35d7cb(0xbeb)](_0x51bf52[_0x35d7cb(0x9dd)]);if(!_0x34535d)return;try{await _0x34535d[_0x35d7cb(0xfaa)]?.();}finally{_0x295ea7['delete'](_0x51bf52[_0x35d7cb(0x9dd)]);}}};},materializer;}var hasRequiredOkdbPipelines;function requireOkdbPipelines(){const _0x1b7efa=_0xef8cd8;if(hasRequiredOkdbPipelines)return okdbPipelines[_0x1b7efa(0xe5f)];hasRequiredOkdbPipelines=0x1;const {TYPE_PIPELINES:_0x59d592,normalizePipelineRecord:_0x2c5a0b}=requireOkdbPipelinesRecords(),_0x55c239=requireQueueWorker(),_0x2c2988=requireProcessor(),_0x16ba90=requireMaterializer();class _0x3da467{constructor(_0x3780c4,_0x343155={}){const _0x44411e=_0x1b7efa;this[_0x44411e(0xe9)]=_0x3780c4,this['_registryEnv']=_0x343155['registryEnv']??null,this[_0x44411e(0x1028)]=_0x343155[_0x44411e(0xa70)]??null,this['_bootPromise']=null,!this[_0x44411e(0xd78)]&&this['okdb']?.[_0x44411e(0xab8)]?.[_0x44411e(0x5d3)]&&(!this[_0x44411e(0xd4f)][_0x44411e(0xab8)]['drivers'][_0x44411e(0x9d0)]('queue-worker')&&this[_0x44411e(0xd4f)][_0x44411e(0xab8)][_0x44411e(0x8ed)](_0x44411e(0xf32),_0x55c239()),!this['okdb'][_0x44411e(0xab8)][_0x44411e(0x5d3)][_0x44411e(0x9d0)](_0x44411e(0xf39))&&this[_0x44411e(0xd4f)][_0x44411e(0xab8)]['registerDriver']('processor',_0x2c2988()),!this[_0x44411e(0xd4f)][_0x44411e(0xab8)][_0x44411e(0x5d3)][_0x44411e(0x9d0)]('materializer')&&this[_0x44411e(0xd4f)][_0x44411e(0xab8)][_0x44411e(0x8ed)](_0x44411e(0xfbb),_0x16ba90()));}get[_0x1b7efa(0x30b)](){const _0x4ae090=_0x1b7efa;if(this[_0x4ae090(0xd78)])return this[_0x4ae090(0xd78)];if(this[_0x4ae090(0xe9)]?.[_0x4ae090(0x1173)]&&this[_0x4ae090(0xe9)]?.['db'])return this[_0x4ae090(0xe9)];return null;}get[_0x1b7efa(0xa70)](){const _0x120f27=_0x1b7efa;return this['_envName']??this[_0x120f27(0x30b)]?.[_0x120f27(0x1173)]??null;}get[_0x1b7efa(0xd4f)](){const _0x40ded4=_0x1b7efa;return this[_0x40ded4(0xe9)]?.[_0x40ded4(0xd4f)]??this[_0x40ded4(0xe9)];}get[_0x1b7efa(0xe25)](){const _0x1b07d3=_0x1b7efa;return!this[_0x1b07d3(0x30b)]&&typeof this[_0x1b07d3(0xe9)]?.[_0x1b07d3(0x30b)]==='function';}['_envFacade'](_0x3bb71a=_0x1b7efa(0x8d0)){const _0x428eb3=_0x1b7efa;if(!this[_0x428eb3(0xe25)])return this;return this[_0x428eb3(0xe9)]['env'](_0x3bb71a)['pipelines'];}async[_0x1b7efa(0x7b7)](){const _0x165cd1=_0x1b7efa,_0xeb1a84=this[_0x165cd1(0x30b)];if(!_0xeb1a84)throw new Error('Pipelines\x20registry\x20environment\x20is\x20not\x20available');if(!_0xeb1a84[_0x165cd1(0x7c0)](_0x59d592))await _0xeb1a84[_0x165cd1(0xa39)](_0x59d592);return _0xeb1a84;}async[_0x1b7efa(0xfc8)](_0x35f6d3=_0x1b7efa(0x8d0)){const _0x2e7dfb=_0x1b7efa;return this['_envFacade'](_0x35f6d3)[_0x2e7dfb(0x7b7)]();}async[_0x1b7efa(0x11dd)](_0x2a8a1b){const _0x290146=_0x1b7efa,_0x59085b=this[_0x290146(0x30b)];if(!_0x59085b||!_0x59085b['hasType'](_0x59d592))return null;return _0x59085b[_0x290146(0xbeb)](_0x59d592,_0x2a8a1b)??null;}async[_0x1b7efa(0x1203)](_0x1c0ed0,_0x42d44d=null){const _0x1e0539=_0x1b7efa;if(!this[_0x1e0539(0xe25)])return this[_0x1e0539(0x11dd)](_0x1c0ed0);const _0x400ebb=_0x42d44d==null?_0x1e0539(0x8d0):_0x1c0ed0,_0x344453=_0x42d44d==null?_0x1c0ed0:_0x42d44d;return this[_0x1e0539(0xe9)][_0x1e0539(0x30b)](_0x400ebb)[_0x1e0539(0x7d3)][_0x1e0539(0x1203)](_0x344453);}async[_0x1b7efa(0x5a7)](_0x1be708={}){const _0x1185ee=_0x1b7efa;if(!this[_0x1185ee(0xe25)]){const _0x320366=this['env'];if(!_0x320366||!_0x320366[_0x1185ee(0x7c0)](_0x59d592))return[];const _0x4786ee=[];for(const _0x29679e of _0x320366[_0x1185ee(0x9ce)](_0x59d592)){_0x4786ee['push']({'key':_0x29679e[_0x1185ee(0x9dd)],'value':_0x29679e[_0x1185ee(0x568)],'version':_0x29679e[_0x1185ee(0x45c)]});}return _0x4786ee;}const _0x2222b6=_0x1be708?.[_0x1185ee(0xa70)]??null,_0x4356d6=_0x2222b6?[this[_0x1185ee(0xe9)][_0x1185ee(0x30b)](_0x2222b6)]:[...this[_0x1185ee(0xe9)][_0x1185ee(0xa3)][_0x1185ee(0x231)]()],_0x2c21e9=[];for(const _0x5e2b7d of _0x4356d6){if(!_0x5e2b7d[_0x1185ee(0x7c0)](_0x59d592))continue;for(const _0x583f6f of _0x5e2b7d[_0x1185ee(0x9ce)](_0x59d592)){_0x2c21e9[_0x1185ee(0x597)]({'env':_0x5e2b7d['name'],'key':_0x583f6f['key'],'value':_0x583f6f[_0x1185ee(0x568)],'version':_0x583f6f[_0x1185ee(0x45c)]});}}return _0x2c21e9;}[_0x1b7efa(0xb87)](_0x2a0d0c,_0xccd964){const _0x400e15=_0x1b7efa;try{return this[_0x400e15(0xd4f)][_0x400e15(0xab8)][_0x400e15(0xf83)](_0x2a0d0c,_0xccd964);}catch{return null;}}[_0x1b7efa(0xab6)](_0x1c3dd5,_0x266235=null){const _0x4eff03=_0x1b7efa;if(!_0x1c3dd5)return'missing';if(_0x266235?.[_0x4eff03(0x10e2)])return _0x266235[_0x4eff03(0x10e2)]==='online'?_0x4eff03(0x998):_0x266235[_0x4eff03(0x10e2)];if(_0x1c3dd5['isRunning'])return _0x4eff03(0x998);return _0x1c3dd5[_0x4eff03(0xfcd)]??_0x4eff03(0xf1a);}async[_0x1b7efa(0xe7)](_0x3a373){const _0x5316b8=_0x1b7efa;if(!_0x3a373?.[_0x5316b8(0xc53)]||!_0x3a373[_0x5316b8(0x1f5)])return null;try{if(typeof _0x3a373[_0x5316b8(0x1f5)][_0x5316b8(0xfcd)]===_0x5316b8(0x63b))return await _0x3a373[_0x5316b8(0x1f5)]['status']();if(typeof _0x3a373[_0x5316b8(0x1f5)][_0x5316b8(0xd72)]==='function')return await _0x3a373[_0x5316b8(0x1f5)][_0x5316b8(0xd72)]();}catch{return null;}return null;}['_deriveHealth'](_0x3e4e72,_0x518ede){const _0x52161d=_0x1b7efa;if(_0x3e4e72===_0x52161d(0xd45))return'stopped';const _0x2ab756=_0x518ede['map'](_0x43eee3=>_0x43eee3['state']);if(_0x2ab756[_0x52161d(0x156)]===0x0)return _0x52161d(0x225);if(_0x2ab756[_0x52161d(0x244)](_0x53f81f=>_0x53f81f===_0x52161d(0x998)))return _0x52161d(0x998);if(!_0x2ab756[_0x52161d(0x29c)](_0x52161d(0x998))&&_0x2ab756[_0x52161d(0x244)](_0x333b33=>_0x333b33===_0x52161d(0x225)||_0x333b33===_0x52161d(0x741)||_0x333b33===_0x52161d(0xd45)))return _0x52161d(0x225);return _0x52161d(0x816);}async[_0x1b7efa(0x30f)](_0x483ecc,_0x49bee0=this[_0x1b7efa(0xa70)],_0x48901e=_0x483ecc?.[_0x1b7efa(0x1173)],_0xec09f=null){const _0x5f21ae=_0x1b7efa;if(!_0x483ecc)return null;const _0x3d9c5e=_0x49bee0?this[_0x5f21ae(0xd4f)][_0x5f21ae(0xa3)][_0x5f21ae(0xbeb)](_0x49bee0):null,_0x5a6b48=await Promise['all'](_0x483ecc[_0x5f21ae(0xab8)]['map'](async _0x19b784=>{const _0xe67ca6=_0x5f21ae,_0x523407=this[_0xe67ca6(0xb87)](_0x19b784['type'],_0x19b784[_0xe67ca6(0x1173)]),_0x43371b=await this[_0xe67ca6(0xe7)](_0x523407);return{..._0x19b784,'key':_0x523407?.['key']??null,'state':this[_0xe67ca6(0xab6)](_0x523407,_0x43371b),'exists':!!_0x523407,'isRunning':!!_0x523407?.[_0xe67ca6(0xc53)],'status':_0x523407?.[_0xe67ca6(0xfcd)]??null,'reason':_0x523407?.['reason']??null,'config':_0x523407?.[_0xe67ca6(0xad3)]?.['config']??null,'meta':_0x523407?.[_0xe67ca6(0xad3)]?.['meta']??null,'error':_0x43371b?.[_0xe67ca6(0x225)]??_0x523407?.[_0xe67ca6(0xbab)]?.[_0xe67ca6(0xb4e)]??null,'storeEnv':_0x523407?.[_0xe67ca6(0x60a)]?.[_0xe67ca6(0x1173)]??null,'owned':!!_0x3d9c5e&&!!_0x523407&&_0x523407[_0xe67ca6(0x60a)]===_0x3d9c5e,'runtime':_0x43371b??_0x523407?.['runtimeState']??null,'lastClock':_0x43371b?.['lastClock']??null,'headClock':_0x43371b?.['headClock']??null,'lag':_0x43371b?.[_0xe67ca6(0x262)]??null,'progress':_0x43371b?.['progress']??null,'paused':_0x43371b?.[_0xe67ca6(0xf68)]??![],'cursorKey':_0x43371b?.['cursorKey']??null};}));return{'key':_0x48901e,'version':_0xec09f,..._0x483ecc,'env':_0x49bee0??null,'health':this[_0x5f21ae(0x44b)](_0x483ecc['status'],_0x5a6b48),'engines':_0x5a6b48};}[_0x1b7efa(0x85a)](_0x48497a){const _0x172e36=_0x1b7efa,_0x535092=_0x48497a?.[_0x172e36(0x654)]?.[_0x172e36(0x117)];if(!Array[_0x172e36(0x10f5)](_0x535092)||_0x535092[_0x172e36(0x156)]===0x0)return null;return new Set(_0x535092[_0x172e36(0x1103)](_0x22f970=>typeof _0x22f970===_0x172e36(0xf7a)&&_0x22f970[_0x172e36(0xf4d)]())['map'](_0x5cd3d8=>_0x5cd3d8[_0x172e36(0xf4d)]()));}[_0x1b7efa(0x54c)](_0x40c9ef){const _0x170bd9=_0x1b7efa,_0x22367e=this[_0x170bd9(0x85a)](_0x40c9ef);if(!_0x22367e)return _0x40c9ef?.[_0x170bd9(0xab8)]??[];return(_0x40c9ef?.[_0x170bd9(0xab8)]??[])[_0x170bd9(0x1103)](_0x481171=>!_0x22367e['has'](_0x481171?.[_0x170bd9(0xd27)]));}async[_0x1b7efa(0xbeb)](_0x32672d,_0x3ae943=null){const _0x33cfdb=_0x1b7efa;if(!this[_0x33cfdb(0xe25)])return this[_0x33cfdb(0x30f)](await this[_0x33cfdb(0x11dd)](_0x32672d),this[_0x33cfdb(0xa70)],_0x32672d,null);const _0x171b47=_0x3ae943==null?_0x33cfdb(0x8d0):_0x32672d,_0x373bcf=_0x3ae943==null?_0x32672d:_0x3ae943;return this[_0x33cfdb(0xe9)][_0x33cfdb(0x30b)](_0x171b47)['pipelines']['get'](_0x373bcf);}async[_0x1b7efa(0x63e)](_0x7542a9={}){const _0x2ff774=_0x1b7efa;if(!this[_0x2ff774(0xe25)]){const _0x2dbcc2=await this[_0x2ff774(0x5a7)]();return Promise[_0x2ff774(0xf09)](_0x2dbcc2[_0x2ff774(0x1166)](_0x309cc7=>this[_0x2ff774(0x30f)](_0x309cc7[_0x2ff774(0x568)],this[_0x2ff774(0xa70)],_0x309cc7[_0x2ff774(0x9dd)],_0x309cc7[_0x2ff774(0x45c)])));}const _0x3d2e19=await this['listRecords'](_0x7542a9);return Promise[_0x2ff774(0xf09)](_0x3d2e19[_0x2ff774(0x1166)](_0x773ae2=>this[_0x2ff774(0x30f)](_0x773ae2[_0x2ff774(0x568)],_0x773ae2[_0x2ff774(0x30b)],_0x773ae2[_0x2ff774(0x9dd)],_0x773ae2[_0x2ff774(0x45c)])));}['validate'](_0x4f4259,_0x1001e0={}){return _0x2c5a0b(_0x4f4259,_0x1001e0);}async['create'](_0x35220e){const _0x1a54db=_0x1b7efa;if(this[_0x1a54db(0xe25)])throw new Error(_0x1a54db(0xf66));const _0x106c5d=await this[_0x1a54db(0x7b7)](),_0x2a16c4=_0x106c5d[_0x1a54db(0xbeb)](_0x59d592,_0x35220e?.['name']);if(_0x2a16c4)throw new Error('Pipeline\x20already\x20exists:\x20'+_0x35220e?.['name']);const _0x1f808c=_0x2c5a0b(_0x35220e),_0x272f6a=_0x1f808c[_0x1a54db(0xab8)][_0x1a54db(0x1103)](_0x479744=>!this[_0x1a54db(0xb87)](_0x479744['type'],_0x479744[_0x1a54db(0x1173)]));if(_0x272f6a[_0x1a54db(0x156)])throw new Error(_0x1a54db(0x33b)+_0x272f6a[_0x1a54db(0x1166)](_0x207a72=>_0x207a72[_0x1a54db(0xaee)]+'@'+_0x207a72[_0x1a54db(0x1173)])['join'](',\x20'));return await _0x106c5d[_0x1a54db(0x92c)](_0x59d592,_0x1f808c['name'],_0x1f808c),this[_0x1a54db(0xbeb)](_0x1f808c[_0x1a54db(0x1173)]);}async[_0x1b7efa(0xbb7)](_0x36bec8,_0x484913={}){const _0x4516fe=_0x1b7efa;if(this[_0x4516fe(0xe25)])throw new Error(_0x4516fe(0xfd2));const _0xea80e2=await this[_0x4516fe(0x7b7)](),_0x372923=_0xea80e2[_0x4516fe(0xbeb)](_0x59d592,_0x36bec8);if(!_0x372923)throw new Error(_0x4516fe(0x35f)+_0x36bec8);if(Object[_0x4516fe(0x901)]['hasOwnProperty'][_0x4516fe(0x834)](_0x484913,'engines')){const _0x35bc14=JSON[_0x4516fe(0xf75)](_0x372923['engines']??[]),_0x2a9a2c=JSON[_0x4516fe(0xf75)]((_0x484913[_0x4516fe(0xab8)]??[])['map'](_0x4c4bf1=>({'type':_0x4c4bf1?.['type'],'name':_0x4c4bf1?.['name'],'role':_0x4c4bf1?.[_0x4516fe(0xd27)]})));if(_0x35bc14!==_0x2a9a2c)throw new Error(_0x4516fe(0x242));}const _0x360838=_0x2c5a0b({..._0x484913,'name':_0x36bec8},{'previous':_0x372923});return await _0xea80e2[_0x4516fe(0x92c)](_0x59d592,_0x360838[_0x4516fe(0x1173)],_0x360838),this[_0x4516fe(0xbeb)](_0x360838[_0x4516fe(0x1173)]);}async['stop'](_0x5565c5){const _0x4c2ac8=_0x1b7efa;if(this[_0x4c2ac8(0xe25)])throw new Error(_0x4c2ac8(0x1088));const _0x3b3daa=await this[_0x4c2ac8(0x11dd)](_0x5565c5);if(!_0x3b3daa)throw new Error(_0x4c2ac8(0x35f)+_0x5565c5);for(const _0x1534a3 of[...this[_0x4c2ac8(0x54c)](_0x3b3daa)][_0x4c2ac8(0xed)]()){const _0x5a18d1=this['_resolveMemberEngine'](_0x1534a3[_0x4c2ac8(0xaee)],_0x1534a3['name']);if(!_0x5a18d1?.[_0x4c2ac8(0xc53)])continue;await _0x5a18d1[_0x4c2ac8(0x1fe)]();}return this['update'](_0x5565c5,{'status':_0x4c2ac8(0xd45)});}async['start'](_0x1a300a){const _0x4fe760=_0x1b7efa;if(this[_0x4fe760(0xe25)])throw new Error(_0x4fe760(0xbb));const _0x254202=await this[_0x4fe760(0x11dd)](_0x1a300a);if(!_0x254202)throw new Error('Pipeline\x20not\x20found:\x20'+_0x1a300a);const _0x319f82=this[_0x4fe760(0x54c)](_0x254202),_0x475a28=_0x319f82[_0x4fe760(0x1103)](_0x117b74=>!this[_0x4fe760(0xb87)](_0x117b74[_0x4fe760(0xaee)],_0x117b74[_0x4fe760(0x1173)]));if(_0x475a28['length'])throw new Error('Pipeline\x20references\x20missing\x20engines:\x20'+_0x475a28['map'](_0x55e08a=>_0x55e08a['type']+'@'+_0x55e08a[_0x4fe760(0x1173)])[_0x4fe760(0x3d9)](',\x20'));for(const _0x39fcd2 of _0x319f82){const _0x588c93=this['_resolveMemberEngine'](_0x39fcd2['type'],_0x39fcd2[_0x4fe760(0x1173)]);if(!_0x588c93?.[_0x4fe760(0xc53)])await _0x588c93[_0x4fe760(0xa00)]();}return this[_0x4fe760(0xbb7)](_0x1a300a,{'status':_0x4fe760(0x43f)});}async[_0x1b7efa(0x21e)](_0x4b7b64){const _0x1c2ad7=_0x1b7efa;if(this[_0x1c2ad7(0xe25)])throw new Error(_0x1c2ad7(0xb88));const _0x5a5f1c=await this[_0x1c2ad7(0x7b7)](),_0x17e9d4=_0x5a5f1c[_0x1c2ad7(0xbeb)](_0x59d592,_0x4b7b64);if(!_0x17e9d4)return{'removed':![],'enginesRemoved':[],'enginesPreserved':[]};const _0x2bff89=[],_0x478399=[];for(const _0x2eb86f of[..._0x17e9d4[_0x1c2ad7(0xab8)]]['reverse']()){const _0x2b9453=this[_0x1c2ad7(0xb87)](_0x2eb86f['type'],_0x2eb86f['name']);_0x2b9453&&_0x2b9453[_0x1c2ad7(0x60a)]===this[_0x1c2ad7(0x30b)]?(await this[_0x1c2ad7(0xd4f)]['engines']['uninstallEngine'](_0x2eb86f[_0x1c2ad7(0xaee)],_0x2eb86f[_0x1c2ad7(0x1173)]),_0x2bff89[_0x1c2ad7(0x597)](_0x2eb86f['type']+'@'+_0x2eb86f[_0x1c2ad7(0x1173)])):_0x478399['push'](_0x2eb86f['type']+'@'+_0x2eb86f[_0x1c2ad7(0x1173)]);}return await _0x5a5f1c[_0x1c2ad7(0x21e)](_0x59d592,_0x4b7b64),{'removed':!![],'enginesRemoved':_0x2bff89,'enginesPreserved':_0x478399};}async[_0x1b7efa(0x910)](){const _0x2cc3b1=_0x1b7efa;if(this[_0x2cc3b1(0xe25)])return;const _0x5ef4e3=this['env'],_0x243ea2=_0x5ef4e3?.[_0x2cc3b1(0x1145)]?.[_0x2cc3b1(0xbeb)]?.(_0x59d592);if(!_0x243ea2?.[_0x2cc3b1(0xc88)])return;for(const {value:_0x44d518}of _0x243ea2['data'][_0x2cc3b1(0x9ce)]()){if(!_0x44d518?.[_0x2cc3b1(0x1173)])continue;for(const _0x536269 of[...this[_0x2cc3b1(0x54c)](_0x44d518)][_0x2cc3b1(0xed)]()){const _0x461616=this[_0x2cc3b1(0xb87)](_0x536269[_0x2cc3b1(0xaee)],_0x536269[_0x2cc3b1(0x1173)]);if(!_0x461616?.[_0x2cc3b1(0xc53)])continue;try{await _0x461616[_0x2cc3b1(0x1fe)]();}catch{}}}}async['bootSyncedPipelines'](){const _0x427c24=_0x1b7efa;if(this[_0x427c24(0xe25)]){if(this[_0x427c24(0x122b)])return this['_bootPromise'];this[_0x427c24(0x122b)]=((async()=>{const _0x4797dc=_0x427c24;for(const _0x28bb6e of this['okdb'][_0x4797dc(0xa3)]['values']()){if(_0x28bb6e[_0x4797dc(0x1173)]===_0x4797dc(0xfd5)||_0x28bb6e[_0x4797dc(0x745)]===![])continue;await _0x28bb6e[_0x4797dc(0x7d3)][_0x4797dc(0x175)]();}})());try{return await this[_0x427c24(0x122b)];}finally{this[_0x427c24(0x122b)]=null;}}const _0x326395=this[_0x427c24(0x30b)];if(!_0x326395?.[_0x427c24(0x7c0)](_0x59d592))return;for(const {key:_0x2e8dee,value:_0x415e3b}of _0x326395[_0x427c24(0x9ce)](_0x59d592)){const _0x19ce79=_0x415e3b??null;if(!_0x19ce79?.['name'])continue;try{const _0x10efcf=_0x19ce79[_0x427c24(0xab8)]??[],_0x53c993=_0x10efcf[_0x427c24(0x1166)](_0x26327a=>({'ref':_0x26327a,'engine':this[_0x427c24(0xb87)](_0x26327a['type'],_0x26327a[_0x427c24(0x1173)])})),_0x1e3d0f=this['_lifecycleSkipRoles'](_0x19ce79),_0xad1788=_0x1e3d0f?_0x53c993[_0x427c24(0x1103)](_0x2e85f4=>!_0x1e3d0f[_0x427c24(0x9d0)](_0x2e85f4[_0x427c24(0xc8f)]?.['role'])):_0x53c993,_0x27fca7=_0xad1788[_0x427c24(0x1103)](_0x11e8b6=>!_0x11e8b6[_0x427c24(0xcbd)]);if(_0x19ce79[_0x427c24(0xfcd)]===_0x427c24(0x43f)){if(_0x27fca7[_0x427c24(0x156)])continue;_0xad1788[_0x427c24(0xa83)](_0x8eb8a3=>!_0x8eb8a3[_0x427c24(0xcbd)]['isRunning'])&&await this[_0x427c24(0xa00)](_0x2e8dee);continue;}_0x19ce79[_0x427c24(0xfcd)]===_0x427c24(0xd45)&&(_0xad1788[_0x427c24(0xa83)](_0x128946=>_0x128946[_0x427c24(0xcbd)]?.[_0x427c24(0xc53)])&&await this['stop'](_0x2e8dee));}catch(_0x536573){this[_0x427c24(0xd4f)][_0x427c24(0x9be)]?.['error']?.('[pipelines]\x20sync\x20activation\x20failed\x20for\x20\x22'+_0x326395[_0x427c24(0x1173)]+':'+_0x2e8dee+'\x22:',_0x536573);}}}}return okdbPipelines['exports']=_0x3da467,okdbPipelines[_0x1b7efa(0xe5f)][_0x1b7efa(0x833)]=_0x3da467,okdbPipelines[_0x1b7efa(0xe5f)][_0x1b7efa(0x78d)]=_0x59d592,okdbPipelines['exports']['normalizePipelineRecord']=_0x2c5a0b,okdbPipelines[_0x1b7efa(0xe5f)];}var okdbViewsReducers,hasRequiredOkdbViewsReducers;function requireOkdbViewsReducers(){if(hasRequiredOkdbViewsReducers)return okdbViewsReducers;hasRequiredOkdbViewsReducers=0x1;function _0x44bb61(_0x4bfb00){const _0x2565c4=_0x47ab;if(_0x4bfb00===null||_0x4bfb00===undefined)return[];if(Array[_0x2565c4(0x10f5)](_0x4bfb00))return _0x4bfb00;return[_0x4bfb00];}const _0x477642={'apply'(_0x12ce7b,_0x167648,_0x5b66d9){_0x12ce7b=_0x12ce7b??0x0;if(_0x167648===null&&_0x5b66d9!==null)return _0x12ce7b+0x1;if(_0x167648!==null&&_0x5b66d9===null)return _0x12ce7b-0x1;return _0x12ce7b;}},_0x4c7566={'apply'(_0x269dc4,_0x54f62d,_0x239a1d,_0x12a4f3){const _0x1f968d=_0x47ab;_0x269dc4=_0x269dc4??0x0;const _0x3d522e=_0x12a4f3;if(_0x54f62d!==null){const _0x3e7b42=_0x54f62d[_0x3d522e];if(typeof _0x3e7b42===_0x1f968d(0x9f0))_0x269dc4-=_0x3e7b42;}if(_0x239a1d!==null){const _0x1c8aed=_0x239a1d[_0x3d522e];if(typeof _0x1c8aed===_0x1f968d(0x9f0))_0x269dc4+=_0x1c8aed;}return _0x269dc4;}},_0x5229ec={'apply'(_0x55be46,_0xb04402,_0x36ae7e,_0x151d0e){const _0x55ef03=_0x47ab;_0x55be46=_0x55be46??{'sum':0x0,'count':0x0,'value':0x0};const _0x184f9e=_0x151d0e;if(_0xb04402!==null){const _0x3e49bb=_0xb04402[_0x184f9e];typeof _0x3e49bb==='number'&&(_0x55be46[_0x55ef03(0xd10)]-=_0x3e49bb,_0x55be46[_0x55ef03(0x1147)]-=0x1);}if(_0x36ae7e!==null){const _0xaed891=_0x36ae7e[_0x184f9e];typeof _0xaed891===_0x55ef03(0x9f0)&&(_0x55be46[_0x55ef03(0xd10)]+=_0xaed891,_0x55be46['count']+=0x1);}return _0x55be46[_0x55ef03(0x568)]=_0x55be46['count']>0x0?_0x55be46[_0x55ef03(0xd10)]/_0x55be46['count']:0x0,_0x55be46;}},_0x11c757={'indexBacked':!![],'apply'(_0x2ca950,_0x13d8c5,_0x537528,_0x36d5b0){return _0x2ca950;}},_0x321ffe={'indexBacked':!![],'apply'(_0x2dd753,_0x260c87,_0x40e3a5,_0x9256f3){return _0x2dd753;}},_0x3b0f58={'apply'(_0x40d564,_0x39acde,_0x50d165,_0x4bd037){const _0x57aee1=_0x47ab;_0x40d564=_0x40d564??{};const _0x9761f=_0x4bd037,_0x832b01=_0x39acde?_0x44bb61(_0x39acde[_0x9761f]):[],_0x59d9b3=_0x50d165?_0x44bb61(_0x50d165[_0x9761f]):[],_0x4df7f6=new Set(_0x832b01),_0x3e86ab=new Set(_0x59d9b3);for(const _0x547ab7 of _0x4df7f6){if(!_0x3e86ab[_0x57aee1(0x9d0)](_0x547ab7)){if(_0x40d564[_0x547ab7]){_0x40d564[_0x547ab7][_0x57aee1(0x568)]-=0x1;if(_0x40d564[_0x547ab7][_0x57aee1(0x568)]<=0x0)delete _0x40d564[_0x547ab7];}}}for(const _0x3a01df of _0x3e86ab){if(!_0x4df7f6[_0x57aee1(0x9d0)](_0x3a01df)){if(!_0x40d564[_0x3a01df])_0x40d564[_0x3a01df]={'value':0x0};_0x40d564[_0x3a01df][_0x57aee1(0x568)]+=0x1;}}return _0x40d564;}},_0x55afb7={'$count':_0x477642,'$sum':_0x4c7566,'$avg':_0x5229ec,'$min':_0x11c757,'$max':_0x321ffe,'$countBy':_0x3b0f58};function _0x3bbe89(_0x4479fc,_0x363f45){const _0x25394e=_0x47ab;for(const _0x49a9d9 of Object[_0x25394e(0xa52)](_0x4479fc)){if(_0x49a9d9===_0x25394e(0xe50))continue;if(_0x49a9d9 in _0x55afb7)return{'apply':_0x55afb7[_0x49a9d9][_0x25394e(0x111b)],'opts':_0x4479fc[_0x49a9d9],'name':_0x49a9d9,'indexBacked':_0x55afb7[_0x49a9d9][_0x25394e(0x911)]??![]};if(_0x363f45?.[_0x25394e(0x9d0)](_0x49a9d9))return{'apply':_0x363f45['get'](_0x49a9d9)['apply'],'opts':_0x4479fc[_0x49a9d9],'name':_0x49a9d9};}return null;}return okdbViewsReducers={'builtins':_0x55afb7,'resolveReducer':_0x3bbe89},okdbViewsReducers;}var okdbViewsMap,hasRequiredOkdbViewsMap;function requireOkdbViewsMap(){if(hasRequiredOkdbViewsMap)return okdbViewsMap;hasRequiredOkdbViewsMap=0x1;function _0xfb7a11(_0x3456c6,_0x13c40e,_0x391651){const _0x21dddf=_0x47ab,_0x41cdce={..._0x13c40e};for(const [_0x181cb7,_0x3e4390]of Object['entries'](_0x3456c6)){if(typeof _0x3e4390===_0x21dddf(0xf7a))_0x41cdce[_0x181cb7]=_0x13c40e[_0x3e4390]??null;else{if(_0x3e4390[_0x21dddf(0x6ad)]){const [_0x5c067f,_0x2de1a4,_0x35104c]=_0x3e4390[_0x21dddf(0x6ad)],_0xcec833=_0x2de1a4[_0x21dddf(0x8ba)]('$')?_0x13c40e[_0x2de1a4['slice'](0x1)]:_0x2de1a4,_0x3438dc=_0xcec833!=null?_0x391651[_0x21dddf(0xbeb)](_0x5c067f,_0xcec833):null;_0x41cdce[_0x181cb7]=_0x3438dc!=null?_0x3438dc[_0x35104c]??null:null;}else{if(_0x3e4390[_0x21dddf(0x35a)])_0x41cdce[_0x181cb7]=_0x3e4390[_0x21dddf(0x35a)][_0x21dddf(0x1166)](_0x27ee42=>_0x27ee42[_0x21dddf(0x8ba)]('$')?String(_0x13c40e[_0x27ee42['slice'](0x1)]??''):_0x27ee42)[_0x21dddf(0x3d9)]('');else _0x3e4390['$coalesce']&&(_0x41cdce[_0x181cb7]=_0x3e4390['$coalesce'][_0x21dddf(0xce)]((_0x7f7b92,_0x58023c)=>{const _0xe12c3=_0x21dddf;if(_0x7f7b92!=null)return _0x7f7b92;return _0x58023c['startsWith']('$')?_0x13c40e[_0x58023c[_0xe12c3(0xc3c)](0x1)]??null:_0x58023c;},null));}}}return _0x41cdce;}return okdbViewsMap={'evaluateMap':_0xfb7a11},okdbViewsMap;}var okdbViewsEngine,hasRequiredOkdbViewsEngine;function requireOkdbViewsEngine(){const _0x41a070=_0xef8cd8;if(hasRequiredOkdbViewsEngine)return okdbViewsEngine;hasRequiredOkdbViewsEngine=0x1;const _0x3772c8=require$$0$5,{resolveReducer:_0x39bfeb}=requireOkdbViewsReducers(),{evaluateMap:_0x450c9d}=requireOkdbViewsMap(),_0x19177f='doc',_0x196281=_0x41a070(0x654),_0x161945=_0x41a070(0x7d1);function _0x5afaf9(_0x443b4c){const _0x50b93f=_0x41a070;if(_0x443b4c===null||_0x443b4c===undefined)return[];if(Array[_0x50b93f(0x10f5)](_0x443b4c))return _0x443b4c;return[_0x443b4c];}function _0x50473e(_0x1dd98b,_0x53fa32){const _0x373408=_0x41a070,_0x5adf31=[];for(const [_0x1b2fce,_0x55fbbb]of Object['entries'](_0x1dd98b)){if(_0x55fbbb[_0x373408(0x6ad)])continue;const _0x774e89=_0x39bfeb(_0x55fbbb,_0x53fa32);if(!_0x774e89)continue;const _0x3bc35c=_0x774e89[_0x373408(0x1173)]===_0x373408(0x9ee);_0x5adf31[_0x373408(0x597)]({'name':_0x1b2fce,'apply':_0x774e89['apply'],'opts':_0x774e89[_0x373408(0x110f)],'items':_0x55fbbb[_0x373408(0xe50)]===!![],'isGrouped':_0x3bc35c,'itemsField':_0x3bc35c?_0x55fbbb[_0x774e89[_0x373408(0x1173)]]:null,'indexBacked':_0x774e89['indexBacked']??![],'builtinName':_0x774e89[_0x373408(0x1173)],'uses':_0x774e89[_0x373408(0x911)]?{'kind':_0x373408(0xcc7),'name':_0x774e89[_0x373408(0x110f)]}:null});}return _0x5adf31;}function _0x29b979(_0x1548c0,_0x2bdbab){const _0x526450=_0x41a070,_0x1ebd8f=_0x1548c0['filter']?_0x3772c8(_0x1548c0[_0x526450(0x1103)]):null,_0x1c65f1=_0x1548c0[_0x526450(0x1166)]??null,_0x12714b=_0x50473e(_0x1548c0[_0x526450(0xce)],_0x2bdbab),_0x46428b=new Map();for(const [_0x297bdc,_0x437b9f]of Object[_0x526450(0x1129)](_0x1548c0[_0x526450(0xce)])){if(!_0x437b9f[_0x526450(0x6ad)])continue;const _0x309286=_0x437b9f[_0x526450(0x6ad)],_0x3f5bce=_0x309286[_0x526450(0x1103)]?_0x3772c8(_0x309286['filter']):null,_0x2c4783=_0x50473e(_0x309286['reduce']??{},_0x2bdbab);_0x46428b[_0x526450(0x211)](_0x297bdc,{'type':_0x309286[_0x526450(0xaee)],'key':_0x309286[_0x526450(0x9dd)],'filterFn':_0x3f5bce,'reducers':_0x2c4783});}return{'filterFn':_0x1ebd8f,'mapDef':_0x1c65f1,'reducers':_0x12714b,'refs':_0x46428b,'type':_0x1548c0['type']};}function _0x2f0fc4(_0x590aef){const _0x1c4325=_0x41a070,_0x21bea7={};for(const _0x4d3c29 of _0x590aef[_0x1c4325(0xf36)]){_0x21bea7[_0x4d3c29[_0x1c4325(0x1173)]]=_0x4d3c29['apply'](null,null,null,_0x4d3c29[_0x1c4325(0x110f)]);}return _0x21bea7;}function _0x2b6ea4(_0x4b7c7a){const _0x11fadb=_0x41a070,_0x4f7efb={};for(const _0x10106d of _0x4b7c7a[_0x11fadb(0xf36)]){_0x4f7efb[_0x10106d[_0x11fadb(0x1173)]]=_0x10106d[_0x11fadb(0x111b)](null,null,null,_0x10106d[_0x11fadb(0x110f)]);}for(const [_0x4cf5ba,_0x472983]of _0x4b7c7a['refs']){_0x4f7efb[_0x4cf5ba]=_0x2f0fc4(_0x472983);}return _0x4f7efb;}function _0x5505e4(_0x9e2af3,_0x4c9e62){const _0x2899ac=_0x41a070;let _0xf9c892=_0x4c9e62['oldValue']??null,_0x553a09=_0x4c9e62[_0x2899ac(0xac)]??null;if(_0x9e2af3[_0x2899ac(0xf43)]){if(_0xf9c892!==null&&!_0x9e2af3[_0x2899ac(0xf43)](_0xf9c892))_0xf9c892=null;if(_0x553a09!==null&&!_0x9e2af3[_0x2899ac(0xf43)](_0x553a09))_0x553a09=null;}return{'before':_0xf9c892,'after':_0x553a09};}function _0x392e14(_0x2ccafb,_0x4a5d3a,_0x159f31){const _0x4078fe=_0x41a070;let {before:_0x50d179,after:_0x44d26f}=_0x5505e4(_0x2ccafb,_0x159f31);if(_0x2ccafb[_0x4078fe(0x112)]&&_0x4a5d3a){if(_0x50d179!==null)_0x50d179=_0x450c9d(_0x2ccafb[_0x4078fe(0x112)],_0x50d179,_0x4a5d3a);if(_0x44d26f!==null)_0x44d26f=_0x450c9d(_0x2ccafb[_0x4078fe(0x112)],_0x44d26f,_0x4a5d3a);}return{'before':_0x50d179,'after':_0x44d26f};}function _0x41319b(_0x4cd925,_0x341ed5,_0x2b8a57,_0x47b0dc=null){const _0x306a78=_0x41a070,{before:_0x1d8c96,after:_0x36047f}=_0x392e14(_0x4cd925,_0x47b0dc,_0x2b8a57);if(_0x1d8c96===null&&_0x36047f===null)return null;const _0x193a90=Object[_0x306a78(0x299)]({},_0x341ed5);for(const _0xc64b1f of _0x4cd925[_0x306a78(0xf36)]){_0x193a90[_0xc64b1f[_0x306a78(0x1173)]]=_0xc64b1f[_0x306a78(0x111b)](_0x193a90[_0xc64b1f[_0x306a78(0x1173)]]??null,_0x1d8c96,_0x36047f,_0xc64b1f[_0x306a78(0x110f)]);}if(_0x47b0dc)for(const _0x97d085 of _0x4cd925[_0x306a78(0xf36)]){if(!_0x97d085[_0x306a78(0x911)])continue;const _0x5815ef=_0x47b0dc[_0x306a78(0x9ca)](_0x4cd925[_0x306a78(0xaee)]),_0x2fddeb=_0x5815ef[_0x306a78(0xf7b)][_0x306a78(0xbeb)](_0x97d085[_0x306a78(0x110f)]);if(!_0x2fddeb)continue;const _0x56a83e=_0x2fddeb['db'],_0x34cd4c=_0x97d085['builtinName']===_0x306a78(0x1231);let _0x9101e0=null;for(const {key:_0x45a6c8}of _0x56a83e[_0x306a78(0x9ce)]({'reverse':_0x34cd4c,'limit':0x1})){_0x9101e0=_0x45a6c8[0x0]??null;break;}_0x193a90[_0x97d085[_0x306a78(0x1173)]]=_0x9101e0;}return _0x193a90;}function _0x5972ca(_0x5a0588,_0x1847a1,_0x2e155d,_0x3b9759){return _0x23b9cc(_0x5a0588['reducers'],_0x1847a1,_0x2e155d,_0x3b9759);}function _0x5ceb97(_0x459b38,_0x24b900,_0x1bec28,_0x3b668c){const _0x4a674c=_0x41a070;return _0x23b9cc(_0x459b38[_0x4a674c(0xf36)],_0x24b900,_0x1bec28,_0x3b668c);}function _0x23b9cc(_0x17ab0f,_0x4a828e,_0x49ff47,_0x596b14){const _0x17ccbd=_0x41a070,_0x596951=new Map();for(const _0x5a330e of _0x17ab0f){if(!_0x5a330e[_0x17ccbd(0xe50)])continue;let _0x196d82,_0x206cb2;_0x5a330e[_0x17ccbd(0xf6a)]?(_0x196d82=_0x4a828e!==null?_0x5afaf9(_0x4a828e[_0x5a330e['itemsField']]):[],_0x206cb2=_0x49ff47!==null?_0x5afaf9(_0x49ff47[_0x5a330e['itemsField']]):[]):(_0x196d82=_0x4a828e!==null?[_0x161945]:[],_0x206cb2=_0x49ff47!==null?[_0x161945]:[]);const _0x461e5d=new Set(_0x196d82),_0x51bc14=new Set(_0x206cb2),_0x220f77=[],_0xe94772=[];for(const _0x380172 of _0x461e5d){if(!_0x51bc14[_0x17ccbd(0x9d0)](_0x380172))_0xe94772[_0x17ccbd(0x597)](_0x380172);}for(const _0x491ed1 of _0x51bc14){if(!_0x461e5d['has'](_0x491ed1))_0x220f77[_0x17ccbd(0x597)](_0x491ed1);}(_0x220f77[_0x17ccbd(0x156)]>0x0||_0xe94772[_0x17ccbd(0x156)]>0x0)&&_0x596951[_0x17ccbd(0x211)](_0x5a330e[_0x17ccbd(0x1173)],{'toAdd':_0x220f77,'toRemove':_0xe94772,'docKey':_0x596b14});}return _0x596951;}function _0x352c64(_0x196bf9,_0x59c8c7,_0x247f0d,_0x53c327=null){const _0x538ddd=_0x41319b(_0x196bf9,_0x59c8c7['get'](_0x19177f)??{},_0x247f0d,_0x53c327);if(_0x538ddd!==null)_0x59c8c7['put'](_0x19177f,_0x538ddd);}function _0x2d454c(_0x23b631,_0x4ac64d,_0x5f01ac,_0x1fd35f,_0x203d6d=null){const _0x444f04=_0x41a070,{clock:_0xaa2b3b}=_0x1fd35f,_0x2f68a2=Object[_0x444f04(0x299)]({'state':_0x444f04(0x8f0),'clock':0x0,'error':null,'refs':{}},_0x5f01ac['get'](_0x196281));if(_0xaa2b3b!=null&&_0xaa2b3b<_0x2f68a2[_0x444f04(0x114d)]&&_0x1fd35f[_0x444f04(0xca6)]===null)return _0x2f68a2[_0x444f04(0x10e2)]=_0x444f04(0xe0b),_0x5f01ac[_0x444f04(0x92c)](_0x196281,_0x2f68a2),{'action':_0x444f04(0xe97)};if(_0x2f68a2[_0x444f04(0x10e2)]==='halted')try{_0x352c64(_0x23b631,_0x4ac64d,_0x1fd35f,_0x203d6d),_0x2f68a2[_0x444f04(0x10e2)]=_0x444f04(0x8f0),_0x2f68a2[_0x444f04(0x225)]=null;for(const _0x3648a8 of _0x23b631[_0x444f04(0xbf5)][_0x444f04(0xa52)]()){const _0x5a2f85=Object[_0x444f04(0x299)]({'state':'ready','clock':0x0,'error':null},_0x2f68a2[_0x444f04(0xbf5)][_0x3648a8]);_0x5a2f85[_0x444f04(0x225)]===_0x444f04(0x10da)&&(_0x5a2f85[_0x444f04(0x10e2)]=_0x444f04(0x8f0),_0x5a2f85['error']=null),_0x2f68a2[_0x444f04(0xbf5)][_0x3648a8]=_0x5a2f85;}if(_0xaa2b3b!=null&&_0xaa2b3b>_0x2f68a2[_0x444f04(0x114d)])_0x2f68a2[_0x444f04(0x114d)]=_0xaa2b3b;return _0x5f01ac[_0x444f04(0x92c)](_0x196281,_0x2f68a2),{'action':'ok'};}catch{return{'action':'halted'};}if(_0x2f68a2['state']!=='ready')return{'action':_0x444f04(0xb7c)};try{_0x352c64(_0x23b631,_0x4ac64d,_0x1fd35f,_0x203d6d);if(_0xaa2b3b!=null&&_0xaa2b3b>_0x2f68a2[_0x444f04(0x114d)])_0x2f68a2[_0x444f04(0x114d)]=_0xaa2b3b;return _0x5f01ac['put'](_0x196281,_0x2f68a2),{'action':'ok'};}catch(_0x4cb361){_0x2f68a2[_0x444f04(0x10e2)]=_0x444f04(0xc6a),_0x2f68a2['error']={'clock':_0xaa2b3b,'key':_0x1fd35f['key'],'error':_0x4cb361?.[_0x444f04(0xb4e)]??String(_0x4cb361)};for(const _0x13bf51 of _0x23b631[_0x444f04(0xbf5)]['keys']()){const _0x45cec6=Object[_0x444f04(0x299)]({'state':_0x444f04(0x8f0),'clock':0x0,'error':null},_0x2f68a2[_0x444f04(0xbf5)][_0x13bf51]);_0x45cec6[_0x444f04(0x10e2)]=_0x444f04(0xc6a),_0x45cec6[_0x444f04(0x225)]='parent\x20view\x20halted',_0x2f68a2['refs'][_0x13bf51]=_0x45cec6;}return _0x5f01ac[_0x444f04(0x92c)](_0x196281,_0x2f68a2),{'action':_0x444f04(0xc6a)};}}function _0x20d9a8(_0x308a9d,_0x12c364,_0x34b406,_0x20dbd8){const _0x391172=_0x41a070,_0x570752=_0x308a9d[_0x391172(0xbeb)](_0x34b406,_0x20dbd8);if(_0x570752===undefined||_0x570752===null)return![];return _0x12c364===null||_0x12c364(_0x570752);}function _0xe10b7e(_0x142fca,_0x1e4107,_0x3df6ae,_0x5284ca){const _0x35a358=_0x41a070;if(_0x3df6ae===null&&_0x5284ca===null)return null;const _0x3a3c3a=Object['assign']({},_0x1e4107);for(const _0x1da7d9 of _0x142fca['reducers']){_0x3a3c3a[_0x1da7d9[_0x35a358(0x1173)]]=_0x1da7d9[_0x35a358(0x111b)](_0x3a3c3a[_0x1da7d9[_0x35a358(0x1173)]]??null,_0x3df6ae,_0x5284ca,_0x1da7d9[_0x35a358(0x110f)]);}return _0x3a3c3a;}function _0x5a9247(_0x4cbf9b,_0x4c4b10,_0x5f559c,_0x3560f3,_0x2e1f2b,_0x5ad83c,_0xcc53d5,_0x5f5cb7,_0x5ae5fe){const _0x334847=_0x41a070,_0xe1b2cb=Object[_0x334847(0x299)]({'state':_0x334847(0x8f0),'clock':0x0,'error':null,'refs':{}},_0x2e1f2b['get'](_0x196281));if(_0xe1b2cb[_0x334847(0x10e2)]!=='ready')return{'action':_0x334847(0xb7c)};const _0x5b8e8d=Object[_0x334847(0x299)]({'state':'ready','clock':0x0,'error':null},_0xe1b2cb['refs'][_0x4c4b10]);if(_0x5b8e8d[_0x334847(0x10e2)]==='creating')return{'action':'skip'};const {clock:_0x5c6c1b}=_0x5ae5fe,_0x327cba=_0x5ae5fe[_0x334847(0x9dd)],_0x30bcda=_0x5ae5fe[_0x334847(0x1f7)]??null,_0x3d6bf7=_0x5ae5fe[_0x334847(0xac)]??null,_0xfefd12=_0x5ad83c['get'](_0x327cba)!==undefined,_0x4846cb=_0x3d6bf7!==null?_0x3d6bf7[_0x5f559c[_0x334847(0x9dd)]]??null:null,_0x351ada=_0x3d6bf7!==null&&(_0x5f559c[_0x334847(0xf43)]===null||_0x5f559c[_0x334847(0xf43)](_0x3d6bf7)),_0x542f4c=_0x4846cb!==null&&_0x20d9a8(_0xcc53d5,_0x4cbf9b[_0x334847(0xf43)],_0x5f5cb7,_0x4846cb),_0x204f6d=_0x351ada&&_0x542f4c;if(!_0xfefd12&&!_0x204f6d)return{'action':_0x334847(0xb7c)};const _0x48cb7a=_0xfefd12?_0x30bcda:null,_0x48c6da=_0x204f6d?_0x3d6bf7:null,_0x3589a7=()=>{const _0x51436f=_0x334847,_0x283b55=_0x3560f3['get'](_0x19177f)??{},_0x2726cc=_0x283b55[_0x4c4b10]??_0x2f0fc4(_0x5f559c),_0x36776e=_0xe10b7e(_0x5f559c,_0x2726cc,_0x48cb7a,_0x48c6da);_0x36776e!==null&&_0x3560f3[_0x51436f(0x92c)](_0x19177f,{..._0x283b55,[_0x4c4b10]:_0x36776e});if(_0x204f6d)_0x5ad83c[_0x51436f(0x92c)](_0x327cba,_0x4846cb);else _0x5ad83c[_0x51436f(0x21e)](_0x327cba);};if(_0x5b8e8d[_0x334847(0x10e2)]===_0x334847(0xc6a))try{_0x3589a7(),_0x5b8e8d[_0x334847(0x10e2)]='ready',_0x5b8e8d['error']=null;if(_0x5c6c1b!=null&&_0x5c6c1b>_0x5b8e8d[_0x334847(0x114d)])_0x5b8e8d[_0x334847(0x114d)]=_0x5c6c1b;return _0xe1b2cb[_0x334847(0xbf5)][_0x4c4b10]=_0x5b8e8d,_0x2e1f2b[_0x334847(0x92c)](_0x196281,_0xe1b2cb),{'action':'ok','before':_0x48cb7a,'after':_0x48c6da,'childKey':_0x327cba};}catch{return{'action':_0x334847(0xc6a)};}try{_0x3589a7();if(_0x5c6c1b!=null&&_0x5c6c1b>_0x5b8e8d[_0x334847(0x114d)])_0x5b8e8d[_0x334847(0x114d)]=_0x5c6c1b;return _0xe1b2cb[_0x334847(0xbf5)][_0x4c4b10]=_0x5b8e8d,_0x2e1f2b[_0x334847(0x92c)](_0x196281,_0xe1b2cb),{'action':'ok','before':_0x48cb7a,'after':_0x48c6da,'childKey':_0x327cba};}catch(_0x2f5699){return _0x5b8e8d[_0x334847(0x10e2)]='halted',_0x5b8e8d[_0x334847(0x225)]={'clock':_0x5c6c1b,'key':_0x327cba,'error':_0x2f5699?.['message']??String(_0x2f5699)},_0xe1b2cb[_0x334847(0xbf5)][_0x4c4b10]=_0x5b8e8d,_0x2e1f2b[_0x334847(0x92c)](_0x196281,_0xe1b2cb),{'action':_0x334847(0xc6a)};}}function _0x328cf7(_0x3625a0,_0x3daa7e){const _0x4528ec=_0x41a070,_0x48ef80={},_0x1b2a6c=new Set(_0x3625a0['reducers']['filter'](_0x41824a=>_0x41824a[_0x4528ec(0xf6a)])[_0x4528ec(0x1166)](_0x56a506=>_0x56a506['name']));for(const [_0x322c52,_0x27e6e9]of Object['entries'](_0x3daa7e)){if(_0x3625a0['refs']['has'](_0x322c52))_0x48ef80[_0x322c52]=_0x13f045(_0x3625a0[_0x4528ec(0xbf5)][_0x4528ec(0xbeb)](_0x322c52),_0x27e6e9??{});else{if(_0x1b2a6c[_0x4528ec(0x9d0)](_0x322c52))_0x48ef80[_0x322c52]=_0x27e6e9??{};else _0x27e6e9!==null&&typeof _0x27e6e9===_0x4528ec(0xb36)&&'value'in _0x27e6e9?_0x48ef80[_0x322c52]={'value':_0x27e6e9[_0x4528ec(0x568)]}:_0x48ef80[_0x322c52]={'value':_0x27e6e9};}}return _0x48ef80;}function _0x13f045(_0x37021f,_0x4b375e){const _0xb61b4d=_0x41a070,_0xb94f09=new Set(_0x37021f['reducers'][_0xb61b4d(0x1103)](_0x5818f6=>_0x5818f6[_0xb61b4d(0xf6a)])[_0xb61b4d(0x1166)](_0x20fe2c=>_0x20fe2c[_0xb61b4d(0x1173)])),_0x40ca9a={};for(const [_0x2d27a6,_0x5cc74b]of Object[_0xb61b4d(0x1129)](_0x4b375e)){if(_0xb94f09[_0xb61b4d(0x9d0)](_0x2d27a6))_0x40ca9a[_0x2d27a6]=_0x5cc74b??{};else _0x5cc74b!==null&&typeof _0x5cc74b===_0xb61b4d(0xb36)&&_0xb61b4d(0x568)in _0x5cc74b?_0x40ca9a[_0x2d27a6]={'value':_0x5cc74b[_0xb61b4d(0x568)]}:_0x40ca9a[_0x2d27a6]={'value':_0x5cc74b};}return _0x40ca9a;}return okdbViewsEngine={'compileView':_0x29b979,'initViewDoc':_0x2b6ea4,'applyFilter':_0x5505e4,'applyFilterAndMap':_0x392e14,'computeViewDoc':_0x41319b,'computeItemsOps':_0x5972ca,'computeRefItemsOps':_0x5ceb97,'applyReducers':_0x352c64,'processWrite':_0x2d454c,'processRefWrite':_0x5a9247,'exposeViewDoc':_0x328cf7,'VIEW_DOC_KEY':_0x19177f,'VIEW_META_KEY':_0x196281,'SCALAR_ITEMS_KEY':_0x161945},okdbViewsEngine;}var okdbViews,hasRequiredOkdbViews;function requireOkdbViews(){const _0x4be78b=_0xef8cd8;if(hasRequiredOkdbViews)return okdbViews;hasRequiredOkdbViews=0x1;const {OKDBError:_0x1e2f85}=requireOkdbError(),{EVENTS:_0x489690}=requireOkdbEnums(),{compileView:_0x443a03,initViewDoc:_0x1bba26,applyFilterAndMap:_0x58b840,computeViewDoc:_0xbfe93e,computeItemsOps:_0x1a6444,computeRefItemsOps:_0x274221,processWrite:_0x36a298,processRefWrite:_0x1f0679,exposeViewDoc:_0x2ab272,VIEW_DOC_KEY:_0x3e6ce6,VIEW_META_KEY:_0xfd6604,SCALAR_ITEMS_KEY:_0xbfe906}=requireOkdbViewsEngine(),_0x4ba4a8=_0x4be78b(0xc05),_0x22d8bd=new Set([_0x4be78b(0xbcf),'$sum',_0x4be78b(0x476),'$min',_0x4be78b(0x1231),_0x4be78b(0x9ee)]);class _0xe1d2ff{constructor(_0x449269){const _0xb27d25=_0x4be78b;this[_0xb27d25(0x30b)]=_0x449269,this['_customReducers']=new Map(),this[_0xb27d25(0x406)]=new Map();}async[_0x4be78b(0x6f5)](){const _0x26f546=_0x4be78b;return!this[_0x26f546(0x30b)][_0x26f546(0x7c0)](_0x4ba4a8)&&await this[_0x26f546(0x30b)][_0x26f546(0xa39)](_0x4ba4a8),this[_0x26f546(0x30b)];}['_validateDefinition'](_0x3ee1b2,_0x1f7e54){const _0x3319cb=_0x4be78b;if(!_0x3ee1b2||typeof _0x3ee1b2!==_0x3319cb(0xf7a)||/\s/[_0x3319cb(0xe10)](_0x3ee1b2)||_0x3ee1b2['startsWith']('~'))throw new _0x1e2f85('Invalid\x20view\x20name:\x20\x22'+_0x3ee1b2+'\x22',_0x3319cb(0x11db),{'name':_0x3ee1b2});if(!_0x1f7e54||typeof _0x1f7e54!==_0x3319cb(0xb36))throw new _0x1e2f85(_0x3319cb(0x77b),'VIEW_INVALID_DEFINITION');if(!_0x1f7e54['type']||typeof _0x1f7e54[_0x3319cb(0xaee)]!==_0x3319cb(0xf7a))throw new _0x1e2f85(_0x3319cb(0x7f4),'VIEW_MISSING_TYPE');if(!_0x1f7e54['reduce']||typeof _0x1f7e54[_0x3319cb(0xce)]!==_0x3319cb(0xb36)||Object['keys'](_0x1f7e54[_0x3319cb(0xce)])['length']===0x0)throw new _0x1e2f85('View\x20definition\x20must\x20include\x20a\x20non-empty\x20\x22reduce\x22\x20object',_0x3319cb(0xd48));}[_0x4be78b(0x114c)](_0x39a507){const _0x53188a=_0x4be78b,_0x263bd8=this[_0x53188a(0x30b)],_0x51e608=_0x263bd8['db'][_0x53188a(0x730)](_0x53188a(0x6fc)+_0x39a507,{'dupSort':![]}),_0x2794f9=_0x263bd8['db']['openDB'](_0x53188a(0x6fc)+_0x39a507+_0x53188a(0x1b4),{'dupSort':![]});return{'viewDb':_0x51e608,'metaDb':_0x2794f9};}[_0x4be78b(0xb7a)](_0x5e4361,_0x33cc75){const _0x5887a6=_0x4be78b,_0x5cb723=this[_0x5887a6(0x30b)];return _0x5cb723['db'][_0x5887a6(0x730)](_0x5887a6(0x6fc)+_0x5e4361+_0x5887a6(0x3ac)+_0x33cc75,{'dupSort':!![]});}[_0x4be78b(0xc51)](_0x2f41be,_0x271444,_0xef81d2){const _0x3c6df9=_0x4be78b;return!_0x2f41be[_0x3c6df9(0x9d0)](_0xef81d2)&&_0x2f41be['set'](_0xef81d2,this['_openItemsDb'](_0x271444,_0xef81d2)),_0x2f41be[_0x3c6df9(0xbeb)](_0xef81d2);}[_0x4be78b(0x5e7)](_0x141165,_0x23b943){const _0x3fb236=_0x4be78b,_0x453efa=this['env'];return _0x453efa['db'][_0x3fb236(0x730)](_0x3fb236(0x6fc)+_0x141165+_0x3fb236(0x1238)+_0x23b943,{'dupSort':![]});}[_0x4be78b(0xcf1)](_0x56a50c,_0x1991b2,_0x4e1060){return!_0x56a50c['has'](_0x4e1060)&&_0x56a50c['set'](_0x4e1060,this['_openRefTrackingDb'](_0x1991b2,_0x4e1060)),_0x56a50c['get'](_0x4e1060);}['_openRefItemsDb'](_0x425ff1,_0x5cac14,_0x18a864){const _0x167a88=_0x4be78b,_0x1794fe=this[_0x167a88(0x30b)];return _0x1794fe['db'][_0x167a88(0x730)](_0x167a88(0x6fc)+_0x425ff1+_0x167a88(0x1238)+_0x5cac14+':items:'+_0x18a864,{'dupSort':!![]});}[_0x4be78b(0xc0e)](_0xa1459d,_0x54f0a6,_0x1854c1,_0x4a4f4b){const _0x121bc6=_0x4be78b;return!_0xa1459d[_0x121bc6(0x9d0)](_0x4a4f4b)&&_0xa1459d[_0x121bc6(0x211)](_0x4a4f4b,this[_0x121bc6(0xcf9)](_0x54f0a6,_0x1854c1,_0x4a4f4b)),_0xa1459d['get'](_0x4a4f4b);}async[_0x4be78b(0x725)](_0x4bcef3,_0x2a115d){const _0x186a1d=_0x4be78b;this[_0x186a1d(0x1d6)](_0x4bcef3,_0x2a115d);const _0x4eac70=this[_0x186a1d(0x30b)];if(!_0x4eac70[_0x186a1d(0x7c0)](_0x2a115d[_0x186a1d(0xaee)]))throw new _0x1e2f85(_0x186a1d(0xf3d)+_0x2a115d[_0x186a1d(0xaee)]+_0x186a1d(0xea7),_0x186a1d(0x424),{'name':_0x4bcef3,'type':_0x2a115d['type']});const _0x2ca9ce=await this['_ensureType']();if(_0x2ca9ce['get'](_0x4ba4a8,_0x4bcef3))throw new _0x1e2f85(_0x186a1d(0xfc1)+_0x4bcef3+_0x186a1d(0xfd),_0x186a1d(0x12e),{'name':_0x4bcef3});const _0xf50af8=_0x443a03(_0x2a115d,this[_0x186a1d(0x86d)]);for(const [_0x1300da,_0x19c8af]of _0xf50af8[_0x186a1d(0xbf5)]){for(const _0x36e732 of _0x19c8af[_0x186a1d(0xf36)]){if(_0x36e732[_0x186a1d(0x911)])throw new _0x1e2f85('$ref\x20\x22'+_0x1300da+_0x186a1d(0xb2d),_0x186a1d(0x5d8),{'refName':_0x1300da,'reducer':_0x36e732[_0x186a1d(0x10bc)]});}}const _0x5556ee={'kind':_0x186a1d(0x2bb),'name':_0x4bcef3};for(const _0x78214a of _0xf50af8[_0x186a1d(0xf36)]){if(!_0x78214a[_0x186a1d(0x911)])continue;const _0x5a12de=_0x78214a[_0x186a1d(0x110f)];_0x4eac70[_0x186a1d(0x56c)](_0x2a115d['type'],[_0x5a12de])?_0x4eac70[_0x186a1d(0x793)](_0x2a115d['type'],_0x5a12de,_0x5556ee):await _0x4eac70['registerIndex'](_0x2a115d['type'],[_0x5a12de],{'createdBy':_0x5556ee,'consumer':_0x5556ee});}await _0x2ca9ce[_0x186a1d(0x92c)](_0x4ba4a8,_0x4bcef3,{..._0x2a115d,'name':_0x4bcef3,'createdAt':Date['now']()});for(const _0x2f1d24 of _0xf50af8[_0x186a1d(0xf36)]){if(!_0x2f1d24[_0x186a1d(0x911)])continue;await _0x4eac70[_0x186a1d(0x959)](_0x2a115d[_0x186a1d(0xaee)],[_0x2f1d24[_0x186a1d(0x110f)]]);}return this[_0x186a1d(0xd7c)](_0x4bcef3,_0x2a115d),this[_0x186a1d(0x106e)](_0x4bcef3,_0x2a115d),{'name':_0x4bcef3};}[_0x4be78b(0xd7c)](_0x52ca7b,_0x324c6d){const _0x1336a6=_0x4be78b,_0x19f1a4=_0x443a03(_0x324c6d,this[_0x1336a6(0x86d)]),{viewDb:_0x358155,metaDb:_0x1cc8ad}=this[_0x1336a6(0x114c)](_0x52ca7b);!_0x358155[_0x1336a6(0xbeb)](_0x3e6ce6)&&(_0x358155[_0x1336a6(0xb6f)](_0x3e6ce6,_0x1bba26(_0x19f1a4)),_0x1cc8ad[_0x1336a6(0xb6f)](_0xfd6604,{'state':'ready','clock':0x0,'error':null,'refs':{}}));const _0x297d7c=new Map(),_0x2c7a11=new Map(),_0x5b4a3e=new Map(),_0x11287f=new Map(),_0x5b40d8={'compiled':_0x19f1a4,'viewDb':_0x358155,'metaDb':_0x1cc8ad,'itemsDbs':_0x297d7c,'refTrackingDbs':_0x2c7a11,'refItemsDbs':_0x5b4a3e,'refStopFns':_0x11287f,'stopFn':null,'definition':_0x324c6d,'indexEventHandlers':[]};this[_0x1336a6(0x406)][_0x1336a6(0x211)](_0x52ca7b,_0x5b40d8),this['_reactivateView'](_0x52ca7b,_0x5b40d8);for(const _0x272d2d of _0x19f1a4[_0x1336a6(0xf36)]){if(!_0x272d2d[_0x1336a6(0x911)])continue;const _0xc378cb=_0x272d2d[_0x1336a6(0x110f)],_0x1cc632=({type:_0x42d2e2,index:_0x45ccd3})=>{const _0x3f75a5=_0x1336a6;if(_0x42d2e2!==_0x324c6d['type'])return;if(_0x45ccd3['join']('~')!==_0xc378cb)return;_0x5b40d8[_0x3f75a5(0xf40)]?.(),_0x5b40d8[_0x3f75a5(0xf40)]=null;const _0x52a71d=_0x5b40d8[_0x3f75a5(0xf82)][_0x3f75a5(0xbeb)](_0xfd6604)??{};_0x5b40d8[_0x3f75a5(0xf82)]['putSync'](_0xfd6604,{..._0x52a71d,'state':_0x3f75a5(0xc6a)});},_0x1ddebc=({type:_0x27aaee,index:_0x31dbb4})=>{const _0x19d7b3=_0x1336a6;if(_0x27aaee!==_0x324c6d[_0x19d7b3(0xaee)])return;if(_0x31dbb4[_0x19d7b3(0x3d9)]('~')!==_0xc378cb)return;this['rebuild'](_0x52ca7b)[_0x19d7b3(0x415)](()=>{});};this[_0x1336a6(0x30b)][_0x1336a6(0xea8)]['on'](_0x489690[_0x1336a6(0xbdc)],_0x1cc632),this[_0x1336a6(0x30b)]['events']['on'](_0x489690[_0x1336a6(0x11b3)],_0x1ddebc),_0x5b40d8[_0x1336a6(0x1024)][_0x1336a6(0x597)]({'event':_0x489690['INDEX_RESET'],'handler':_0x1cc632}),_0x5b40d8[_0x1336a6(0x1024)][_0x1336a6(0x597)]({'event':_0x489690['INDEX_READY'],'handler':_0x1ddebc});}}['_createViewHandler'](_0x312b73,_0x466431){const _0x5101f8=_0x4be78b,{compiled:_0x20a283,viewDb:_0x163659,metaDb:_0x2f9c2f,itemsDbs:_0x222a4a,refTrackingDbs:_0x5a2eca,refItemsDbs:_0x2ca511,refStopFns:_0x357921,definition:_0x266ae2}=_0x466431,_0x167af2=this,_0x1a0075=this[_0x5101f8(0x30b)],_0x4ce877=_0x3f14f0=>{const _0x47de5f=_0x5101f8;for(const _0x33d873 of _0x3f14f0){const _0x50ffa2=_0x36a298(_0x20a283,_0x163659,_0x2f9c2f,_0x33d873,_0x1a0075);if(_0x50ffa2?.[_0x47de5f(0x942)]===_0x47de5f(0xe97)){queueMicrotask(()=>_0x167af2[_0x47de5f(0x6ba)](_0x312b73)[_0x47de5f(0x415)](()=>{}));continue;}if(_0x50ffa2?.[_0x47de5f(0x942)]==='ok')try{const {before:_0x747b86,after:_0x428a5e}=_0x58b840(_0x20a283,_0x1a0075,_0x33d873),_0x9b0a31=_0x1a6444(_0x20a283,_0x747b86,_0x428a5e,_0x33d873['key']);for(const [_0xd99dc9,{toAdd:_0x17e61a,toRemove:_0x2feb75,docKey:_0x4b4241}]of _0x9b0a31){const _0x6133c5=_0x167af2[_0x47de5f(0xc51)](_0x222a4a,_0x312b73,_0xd99dc9);for(const _0x45bb71 of _0x2feb75)_0x6133c5[_0x47de5f(0x21e)](_0x45bb71,_0x4b4241);for(const _0x332c38 of _0x17e61a)_0x6133c5[_0x47de5f(0x92c)](_0x332c38,_0x4b4241);}const _0xdc1c13=_0x33d873[_0x47de5f(0x1f7)]!==null&&(_0x20a283[_0x47de5f(0xf43)]===null||_0x20a283['filterFn'](_0x33d873[_0x47de5f(0x1f7)])),_0x5dd624=_0x33d873['newValue']!==null&&(_0x20a283['filterFn']===null||_0x20a283[_0x47de5f(0xf43)](_0x33d873[_0x47de5f(0xac)]));if(_0xdc1c13!==_0x5dd624&&_0x20a283[_0x47de5f(0xbf5)][_0x47de5f(0xfb)]>0x0)for(const [_0x298b60,_0x19339b]of _0x20a283[_0x47de5f(0xbf5)]){const _0x3dab16=_0x167af2['_lazyOpenRefTrackingDb'](_0x5a2eca,_0x312b73,_0x298b60);if(!_0x2ca511['has'](_0x298b60))_0x2ca511['set'](_0x298b60,new Map());const _0x318512=_0x2ca511[_0x47de5f(0xbeb)](_0x298b60);_0x5dd624?_0x167af2[_0x47de5f(0xfd3)](_0x20a283,_0x298b60,_0x19339b,_0x163659,_0x2f9c2f,_0x3dab16,_0x318512,_0x1a0075,_0x266ae2[_0x47de5f(0xaee)],_0x312b73,_0x33d873[_0x47de5f(0x9dd)]):_0x167af2[_0x47de5f(0x382)](_0x20a283,_0x298b60,_0x19339b,_0x163659,_0x2f9c2f,_0x3dab16,_0x318512,_0x1a0075,_0x266ae2[_0x47de5f(0xaee)],_0x312b73,_0x33d873[_0x47de5f(0x9dd)]);}}catch(_0x572e31){const _0xf19c61=Object[_0x47de5f(0x299)]({'state':_0x47de5f(0x8f0),'clock':0x0,'error':null,'refs':{}},_0x2f9c2f[_0x47de5f(0xbeb)](_0xfd6604));_0xf19c61[_0x47de5f(0x10e2)]=_0x47de5f(0xc6a),_0xf19c61[_0x47de5f(0x225)]={'clock':_0x33d873[_0x47de5f(0x114d)],'key':_0x33d873['key'],'error':_0x572e31?.[_0x47de5f(0xb4e)]??String(_0x572e31)},_0x2f9c2f[_0x47de5f(0x92c)](_0xfd6604,_0xf19c61);}}},_0x10b8c7=()=>{const _0x42069e=_0x5101f8;for(const [_0x16fea5,_0x119caa]of _0x20a283[_0x42069e(0xbf5)]){const _0x470187=_0x167af2['_lazyOpenRefTrackingDb'](_0x5a2eca,_0x312b73,_0x16fea5);if(!_0x2ca511[_0x42069e(0x9d0)](_0x16fea5))_0x2ca511[_0x42069e(0x211)](_0x16fea5,new Map());const _0x2229f7=_0x1a0075[_0x42069e(0xf39)][_0x42069e(0x2a4)](_0x119caa['type'],{'mode':'inline','name':'view:'+_0x312b73+':ref:'+_0x16fea5,'handler':_0x60d5e2=>{const _0x2a38c2=_0x42069e,_0x48fd75=_0x2ca511[_0x2a38c2(0xbeb)](_0x16fea5);for(const _0x1d83d4 of _0x60d5e2){const _0x5b2072=_0x1f0679(_0x20a283,_0x16fea5,_0x119caa,_0x163659,_0x2f9c2f,_0x470187,_0x1a0075,_0x266ae2[_0x2a38c2(0xaee)],_0x1d83d4);if(_0x5b2072?.['action']==='ok'){const {before:_0xab6bc7,after:_0x4d19fb,childKey:_0x55d276}=_0x5b2072,_0x5692c7=_0x274221(_0x119caa,_0xab6bc7,_0x4d19fb,_0x55d276);for(const [_0x1db893,{toAdd:_0x31ebc5,toRemove:_0x4a2d05,docKey:_0x3fcb7d}]of _0x5692c7){const _0x246dd6=_0x167af2[_0x2a38c2(0xc0e)](_0x48fd75,_0x312b73,_0x16fea5,_0x1db893);for(const _0x1379eb of _0x4a2d05)_0x246dd6[_0x2a38c2(0x21e)](_0x1379eb,_0x3fcb7d);for(const _0x4d176b of _0x31ebc5)_0x246dd6[_0x2a38c2(0x92c)](_0x4d176b,_0x3fcb7d);}}}}});_0x357921[_0x42069e(0x211)](_0x16fea5,_0x2229f7);}};return{'mainHandler':_0x4ce877,'registerRefs':_0x10b8c7};}['_reactivateView'](_0x2bc361,_0x232822){const _0x1b08d3=_0x4be78b,{mainHandler:_0x5b895b,registerRefs:_0xbf55b5}=this[_0x1b08d3(0x59f)](_0x2bc361,_0x232822);_0x232822[_0x1b08d3(0xf40)]=this[_0x1b08d3(0x30b)][_0x1b08d3(0xf39)][_0x1b08d3(0x2a4)](_0x232822[_0x1b08d3(0x83a)][_0x1b08d3(0xaee)],{'mode':_0x1b08d3(0x10aa),'name':'view:'+_0x2bc361,'handler':_0x5b895b}),_0xbf55b5();}[_0x4be78b(0xfd3)](_0x2eb87a,_0x3a7c7b,_0x243367,_0x43b191,_0x9228f3,_0x29f08c,_0xc1376d,_0x5c79f1,_0x477078,_0x18d993,_0x23541a){const _0x447b68=_0x4be78b;for(const {key:_0x217e0e,value:_0x2395bd}of _0x5c79f1[_0x447b68(0x9ce)](_0x243367[_0x447b68(0xaee)])){if((_0x2395bd[_0x243367[_0x447b68(0x9dd)]]??null)!==_0x23541a)continue;if(_0x243367['filterFn']!==null&&!_0x243367[_0x447b68(0xf43)](_0x2395bd))continue;if(_0x29f08c['get'](_0x217e0e)!==undefined)continue;const _0x177959=_0x1f0679(_0x2eb87a,_0x3a7c7b,_0x243367,_0x43b191,_0x9228f3,_0x29f08c,_0x5c79f1,_0x477078,{'oldValue':null,'newValue':_0x2395bd,'key':_0x217e0e,'clock':null,'origin':null});if(_0x177959?.[_0x447b68(0x942)]==='ok'){const _0xf9b014=_0x274221(_0x243367,null,_0x2395bd,_0x217e0e);for(const [_0x385d98,{toAdd:_0x17c2f4,docKey:_0x11570f}]of _0xf9b014){const _0x4ec06c=this[_0x447b68(0xc0e)](_0xc1376d,_0x18d993,_0x3a7c7b,_0x385d98);for(const _0x5aeee3 of _0x17c2f4)_0x4ec06c[_0x447b68(0x92c)](_0x5aeee3,_0x11570f);}}}}['_cascadeRefRemove'](_0x2ca3f3,_0xb3e94f,_0x107126,_0x2d60c8,_0x7c961b,_0x3a284a,_0x339d50,_0x464e76,_0x441526,_0x5b8f24,_0x49a279){const _0x1fac31=_0x4be78b,_0x42b3f7=[];for(const {key:_0x2f608b,value:_0x51ee12}of _0x3a284a[_0x1fac31(0x9ce)]()){if(_0x51ee12===_0x49a279)_0x42b3f7[_0x1fac31(0x597)](_0x2f608b);}for(const _0x45459d of _0x42b3f7){const _0x47d424=_0x464e76['get'](_0x107126[_0x1fac31(0xaee)],_0x45459d)??null,_0x3d1e92=_0x1f0679(_0x2ca3f3,_0xb3e94f,_0x107126,_0x2d60c8,_0x7c961b,_0x3a284a,_0x464e76,_0x441526,{'oldValue':_0x47d424,'newValue':_0x47d424,'key':_0x45459d,'clock':null,'origin':null});if(_0x3d1e92?.[_0x1fac31(0x942)]==='ok'){const {before:_0x32bd9e}=_0x3d1e92,_0x40e4a3=_0x274221(_0x107126,_0x32bd9e,null,_0x45459d);for(const [_0x2d3bb6,{toRemove:_0x81f977,docKey:_0x131988}]of _0x40e4a3){const _0x563794=this[_0x1fac31(0xc0e)](_0x339d50,_0x5b8f24,_0xb3e94f,_0x2d3bb6);for(const _0x2a610f of _0x81f977)_0x563794['remove'](_0x2a610f,_0x131988);}}}}[_0x4be78b(0x106e)](_0x54ff80,_0x5acfb6){const _0x2791b2=_0x4be78b,_0xee70f=this['_viewState']['get'](_0x54ff80);if(!_0xee70f)return;const {compiled:_0x78f6ab,viewDb:_0x228203,metaDb:_0x149fdf,itemsDbs:_0x296837}=_0xee70f,_0x5ab0d6=this[_0x2791b2(0x30b)],_0x5df9e8=Object[_0x2791b2(0x299)]({'state':_0x2791b2(0x8f0),'clock':0x0,'error':null,'refs':{}},_0x149fdf[_0x2791b2(0xbeb)](_0xfd6604));_0x5df9e8[_0x2791b2(0x10e2)]=_0x2791b2(0x975),_0x149fdf['putSync'](_0xfd6604,_0x5df9e8);let _0x58b65e=_0x228203[_0x2791b2(0xbeb)](_0x3e6ce6)??_0x1bba26(_0x78f6ab);for(const {key:_0x4a8a28,value:_0x517d27}of _0x5ab0d6[_0x2791b2(0x9ce)](_0x5acfb6[_0x2791b2(0xaee)])){const _0xc859cf={'oldValue':null,'newValue':_0x517d27,'key':_0x4a8a28},{before:_0x12d3da,after:_0x171b66}=_0x58b840(_0x78f6ab,_0x5ab0d6,_0xc859cf);if(_0x12d3da===null&&_0x171b66===null)continue;try{const _0x35eb4c=_0xbfe93e(_0x78f6ab,_0x58b65e,_0xc859cf,_0x5ab0d6);if(_0x35eb4c!==null)_0x58b65e=_0x35eb4c;}catch{continue;}const _0x56b6fa=_0x1a6444(_0x78f6ab,_0x12d3da,_0x171b66,_0x4a8a28);for(const [_0x2054c6,{toAdd:_0x1d7a4d,docKey:_0xe5c508}]of _0x56b6fa){const _0x5e6192=this['_lazyOpenItemsDb'](_0x296837,_0x54ff80,_0x2054c6);for(const _0x10842e of _0x1d7a4d)_0x5e6192['putSync'](_0x10842e,_0xe5c508);}}_0x228203[_0x2791b2(0xb6f)](_0x3e6ce6,_0x58b65e);const _0x4dd48f=Object[_0x2791b2(0x299)]({},_0x149fdf['get'](_0xfd6604));_0x4dd48f[_0x2791b2(0x10e2)]='ready',_0x4dd48f[_0x2791b2(0x114d)]=_0x5ab0d6[_0x2791b2(0x5ea)](_0x5acfb6[_0x2791b2(0xaee)]),_0x149fdf[_0x2791b2(0xb6f)](_0xfd6604,_0x4dd48f),this[_0x2791b2(0x3d1)](_0x54ff80,_0x5acfb6);}[_0x4be78b(0x3d1)](_0x41dd64,_0x5338ac){const _0x2d7300=_0x4be78b,_0x28517d=this[_0x2d7300(0x406)][_0x2d7300(0xbeb)](_0x41dd64);if(!_0x28517d)return;const {compiled:_0x568740,viewDb:_0x5d88ce,metaDb:_0x5c0d7e,refTrackingDbs:_0xa13887,refItemsDbs:_0x299da2}=_0x28517d,_0x57f58c=this[_0x2d7300(0x30b)];for(const [_0x57a9d6,_0x57ba9d]of _0x568740[_0x2d7300(0xbf5)]){const _0x2b1f0f=this[_0x2d7300(0xcf1)](_0xa13887,_0x41dd64,_0x57a9d6);if(!_0x299da2[_0x2d7300(0x9d0)](_0x57a9d6))_0x299da2[_0x2d7300(0x211)](_0x57a9d6,new Map());const _0x5648db=_0x299da2[_0x2d7300(0xbeb)](_0x57a9d6),_0x1b1806=Object[_0x2d7300(0x299)]({'state':_0x2d7300(0x8f0),'clock':0x0,'error':null,'refs':{}},_0x5c0d7e['get'](_0xfd6604)),_0x1bcf25=Object[_0x2d7300(0x299)]({'state':'ready','clock':0x0,'error':null},_0x1b1806['refs'][_0x57a9d6]);_0x1bcf25[_0x2d7300(0x10e2)]=_0x2d7300(0x975),_0x1b1806[_0x2d7300(0xbf5)][_0x57a9d6]=_0x1bcf25,_0x5c0d7e[_0x2d7300(0xb6f)](_0xfd6604,_0x1b1806);let _0x318a27=_0x5d88ce[_0x2d7300(0xbeb)](_0x3e6ce6)??{},_0x58fb00=_0x318a27[_0x57a9d6]??{};for(const {key:_0x2192f1,value:_0x225931}of _0x57f58c['getRange'](_0x57ba9d[_0x2d7300(0xaee)])){const _0x1118ef=_0x225931[_0x57ba9d[_0x2d7300(0x9dd)]]??null;if(_0x1118ef===null)continue;if(_0x57ba9d[_0x2d7300(0xf43)]!==null&&!_0x57ba9d['filterFn'](_0x225931))continue;if(!_0x1cefc1(_0x57f58c,_0x568740[_0x2d7300(0xf43)],_0x5338ac['type'],_0x1118ef))continue;try{const _0x1b908c=_0x11cbd8(_0x57ba9d,_0x58fb00,null,_0x225931);if(_0x1b908c!==null)_0x58fb00=_0x1b908c;}catch{continue;}_0x2b1f0f[_0x2d7300(0xb6f)](_0x2192f1,_0x1118ef);const _0x2f271d=_0x274221(_0x57ba9d,null,_0x225931,_0x2192f1);for(const [_0x3eb107,{toAdd:_0x431bce,docKey:_0x536061}]of _0x2f271d){const _0x3b0c47=this[_0x2d7300(0xc0e)](_0x5648db,_0x41dd64,_0x57a9d6,_0x3eb107);for(const _0x5a8eba of _0x431bce)_0x3b0c47[_0x2d7300(0xb6f)](_0x5a8eba,_0x536061);}}_0x318a27=_0x5d88ce[_0x2d7300(0xbeb)](_0x3e6ce6)??{},_0x318a27={..._0x318a27,[_0x57a9d6]:_0x58fb00},_0x5d88ce[_0x2d7300(0xb6f)](_0x3e6ce6,_0x318a27);const _0x181398=Object['assign']({},_0x5c0d7e['get'](_0xfd6604)),_0x5cafe8=Object[_0x2d7300(0x299)]({},_0x181398['refs'][_0x57a9d6]);_0x5cafe8[_0x2d7300(0x10e2)]=_0x2d7300(0x8f0),_0x181398[_0x2d7300(0xbf5)][_0x57a9d6]=_0x5cafe8,_0x5c0d7e[_0x2d7300(0xb6f)](_0xfd6604,_0x181398);}}[_0x4be78b(0x6ba)](_0x5a2840){const _0x368e39=_0x4be78b,_0x117e1e=this[_0x368e39(0x406)][_0x368e39(0xbeb)](_0x5a2840);if(!_0x117e1e)throw new _0x1e2f85('View\x20\x22'+_0x5a2840+_0x368e39(0x310),'VIEW_NOT_FOUND',{'name':_0x5a2840});const {compiled:_0x5c5cc1,viewDb:_0x2dc402,metaDb:_0x7887ef,itemsDbs:_0x49015f,refTrackingDbs:_0x32febb,refItemsDbs:_0x8910aa,definition:_0x31854e}=_0x117e1e,_0x1d31d9=Object[_0x368e39(0x299)]({'state':'ready','clock':0x0,'error':null,'refs':{}},_0x7887ef['get'](_0xfd6604));_0x1d31d9[_0x368e39(0x10e2)]=_0x368e39(0xe0b),_0x1d31d9[_0x368e39(0x114d)]=0x0,_0x1d31d9[_0x368e39(0x225)]=null,_0x7887ef[_0x368e39(0xb6f)](_0xfd6604,_0x1d31d9),_0x2dc402[_0x368e39(0xb6f)](_0x3e6ce6,_0x1bba26(_0x5c5cc1));for(const _0x2b41ef of _0x49015f[_0x368e39(0x231)]()){try{_0x2b41ef[_0x368e39(0x9a6)]();}catch{}}_0x49015f[_0x368e39(0x859)]();for(const [_0x2d5f8f]of _0x5c5cc1[_0x368e39(0xbf5)]){const _0x3ca2e0=_0x32febb[_0x368e39(0xbeb)](_0x2d5f8f);if(_0x3ca2e0)try{_0x3ca2e0['clearSync']();}catch{}const _0x4918a8=_0x8910aa['get'](_0x2d5f8f);if(_0x4918a8){for(const _0x2b8569 of _0x4918a8[_0x368e39(0x231)]()){try{_0x2b8569[_0x368e39(0x9a6)]();}catch{}}_0x4918a8[_0x368e39(0x859)]();}}_0x32febb[_0x368e39(0x859)](),this[_0x368e39(0x106e)](_0x5a2840,_0x31854e);}async[_0x4be78b(0xb41)](){const _0x48bcd3=_0x4be78b;if(!this[_0x48bcd3(0x30b)][_0x48bcd3(0x7c0)](_0x4ba4a8))return;const _0x4e902b=new Set();for(const {key:_0x2a0f05,value:_0xf0bcf1}of this[_0x48bcd3(0x30b)]['getRange'](_0x4ba4a8)){_0x4e902b[_0x48bcd3(0x33c)](_0x2a0f05);if(this[_0x48bcd3(0x406)][_0x48bcd3(0x9d0)](_0x2a0f05))continue;if(!this[_0x48bcd3(0x30b)]['hasType'](_0xf0bcf1[_0x48bcd3(0xaee)]))continue;this[_0x48bcd3(0xd7c)](_0x2a0f05,_0xf0bcf1),this[_0x48bcd3(0x106e)](_0x2a0f05,_0xf0bcf1);}for(const _0x1380ee of[...this[_0x48bcd3(0x406)]['keys']()]){!_0x4e902b['has'](_0x1380ee)&&await this[_0x48bcd3(0xe8c)](_0x1380ee);}}async[_0x4be78b(0x21e)](_0x38dd29,_0x1dc7ed={}){const _0x399119=_0x4be78b,_0x37b7ba=this[_0x399119(0x30b)],_0x4f87e4=await this[_0x399119(0x6f5)](),_0x4d28f0=_0x4f87e4['get'](_0x4ba4a8,_0x38dd29);if(!_0x4d28f0)throw new _0x1e2f85(_0x399119(0xfc1)+_0x38dd29+_0x399119(0x310),'VIEW_NOT_FOUND',{'name':_0x38dd29});const _0x3dadbe={'kind':'view','name':_0x38dd29},_0x4b75b3=_0x37b7ba[_0x399119(0xa2f)](_0x4d28f0[_0x399119(0xaee)],_0x3dadbe);if(_0x4b75b3[_0x399119(0x156)]>0x0&&!_0x1dc7ed[_0x399119(0x106)])throw new _0x1e2f85(_0x399119(0xfc1)+_0x38dd29+_0x399119(0xaa6)+_0x4b75b3[_0x399119(0x1166)](_0x578196=>_0x578196[_0x399119(0xfa5)])[_0x399119(0x3d9)](',\x20'),_0x399119(0xe30),{'orphanedIndexes':_0x4b75b3[_0x399119(0x1166)](_0x381b6b=>_0x381b6b['indexName'])});await _0x4f87e4[_0x399119(0x21e)](_0x4ba4a8,_0x38dd29),await _0x37b7ba['db']['transaction'](()=>{const _0x33f12f=_0x399119;_0x37b7ba['_removeConsumerFromAllIndexes'](_0x4d28f0[_0x33f12f(0xaee)],_0x3dadbe);if(_0x1dc7ed['managedIndexes']===_0x33f12f(0xca4))for(const {type:_0x1771d8,indexName:_0x406572}of _0x4b75b3){_0x37b7ba[_0x33f12f(0x92f)](_0x1771d8,_0x406572['split']('~'),Date[_0x33f12f(0x555)](),null);}}),await this[_0x399119(0xe8c)](_0x38dd29);}async['stop'](_0x3e3c19){const _0x12ea42=_0x4be78b,_0x54efb3=this[_0x12ea42(0x406)][_0x12ea42(0xbeb)](_0x3e3c19);if(!_0x54efb3)throw new _0x1e2f85(_0x12ea42(0xfc1)+_0x3e3c19+_0x12ea42(0x310),_0x12ea42(0xd28),{'name':_0x3e3c19});const _0x4fa21c=_0x54efb3[_0x12ea42(0xf82)]['get'](_0xfd6604);if(_0x4fa21c?.[_0x12ea42(0x10e2)]===_0x12ea42(0xd45))return;const _0x110787=_0x54efb3[_0x12ea42(0x83a)]['type'],_0x168460=this[_0x12ea42(0x30b)]['getClock'](_0x110787),_0x5789b6=new Set();for(const _0x195f84 of this[_0x12ea42(0x30b)][_0x12ea42(0x151)](_0x110787,0x0,_0x168460)){if(_0x195f84[_0x12ea42(0x942)]===_0x12ea42(0x92c))_0x5789b6['add'](_0x195f84[_0x12ea42(0x9dd)]);else{if(_0x195f84[_0x12ea42(0x942)]==='remove')_0x5789b6[_0x12ea42(0x3b3)](_0x195f84['key']);}}_0x54efb3[_0x12ea42(0xaa2)]=_0x5789b6,_0x54efb3[_0x12ea42(0xf40)]?.(),_0x54efb3[_0x12ea42(0xf40)]=null;for(const [,_0x1742dc]of _0x54efb3[_0x12ea42(0x582)]){_0x1742dc?.();}_0x54efb3['refStopFns'][_0x12ea42(0x859)]();const _0x52e9f3=Object[_0x12ea42(0x299)]({'state':_0x12ea42(0x8f0),'clock':0x0,'error':null,'refs':{}},_0x4fa21c);_0x52e9f3[_0x12ea42(0x10e2)]=_0x12ea42(0xd45),_0x54efb3[_0x12ea42(0xf82)][_0x12ea42(0xb6f)](_0xfd6604,_0x52e9f3);}async[_0x4be78b(0xa00)](_0x90494a){const _0x3a1926=_0x4be78b;this['env']?.[_0x3a1926(0xd4f)]?.[_0x3a1926(0x3a3)]?.['assertFeature'](_0x3a1926(0xaa5));const _0x525dde=this[_0x3a1926(0x406)][_0x3a1926(0xbeb)](_0x90494a);if(!_0x525dde)throw new _0x1e2f85(_0x3a1926(0xfc1)+_0x90494a+'\x22\x20not\x20found',_0x3a1926(0xd28),{'name':_0x90494a});const _0x30f075=Object['assign']({'state':'ready','clock':0x0,'error':null,'refs':{}},_0x525dde[_0x3a1926(0xf82)][_0x3a1926(0xbeb)](_0xfd6604));if(_0x30f075['state']==='ready'||_0x30f075['state']===_0x3a1926(0x975)||_0x30f075[_0x3a1926(0x10e2)]===_0x3a1926(0xe0b))return;_0x525dde['stopFn']?.(),_0x525dde['stopFn']=null;for(const [,_0xc5934e]of _0x525dde['refStopFns']){_0xc5934e?.();}_0x525dde[_0x3a1926(0x582)][_0x3a1926(0x859)]();const _0x4dde54=_0x525dde[_0x3a1926(0x83a)][_0x3a1926(0xaee)],_0x4a4bfe=this[_0x3a1926(0x30b)][_0x3a1926(0x5ea)](_0x4dde54);if(_0x30f075[_0x3a1926(0x114d)]>=_0x4a4bfe){this['_reactivateView'](_0x90494a,_0x525dde),_0x30f075[_0x3a1926(0x10e2)]=_0x3a1926(0x8f0),_0x30f075[_0x3a1926(0x225)]=null,_0x525dde[_0x3a1926(0xaa2)]=null,_0x525dde[_0x3a1926(0xf82)]['putSync'](_0xfd6604,_0x30f075);return;}const _0x790e76=this[_0x3a1926(0x3c1)](_0x90494a,_0x525dde,_0x30f075,_0x4a4bfe);_0x525dde['_keysAtStop']=null,_0x790e76?(this['_reactivateView'](_0x90494a,_0x525dde),_0x30f075[_0x3a1926(0x10e2)]=_0x3a1926(0x8f0),_0x30f075['error']=null,_0x30f075[_0x3a1926(0x114d)]=_0x4a4bfe,_0x525dde[_0x3a1926(0xf82)][_0x3a1926(0xb6f)](_0xfd6604,_0x30f075)):await this[_0x3a1926(0x11ab)](_0x90494a);}['_tryCatchUp'](_0x1ee091,_0x5dd3c8,_0x378947,_0x2d1a08){const _0x120212=_0x4be78b,{compiled:_0x1a299a,viewDb:_0x1080b1,itemsDbs:_0x3bc18f}=_0x5dd3c8,_0x54ce84=this[_0x120212(0x30b)],_0x29d46b=_0x5dd3c8[_0x120212(0x83a)]['type'],_0x3550f3=Array['from'](_0x54ce84[_0x120212(0x151)](_0x29d46b,_0x378947[_0x120212(0x114d)]+0x1,_0x2d1a08)),_0xb49dc7=_0x5dd3c8[_0x120212(0xaa2)]??new Set(),_0x951ac8=new Set();let _0xb01566=_0x1080b1[_0x120212(0xbeb)](_0x3e6ce6)??_0x1bba26(_0x1a299a);for(const _0xbab824 of _0x3550f3){if(_0xbab824[_0x120212(0x942)]===_0x120212(0x21e))return![];if(_0xbab824[_0x120212(0x942)]!==_0x120212(0x92c))continue;if(_0x951ac8[_0x120212(0x9d0)](_0xbab824[_0x120212(0x9dd)]))return![];_0x951ac8[_0x120212(0x33c)](_0xbab824['key']);if(_0xb49dc7[_0x120212(0x9d0)](_0xbab824[_0x120212(0x9dd)]))return![];const _0x2a208e=_0x54ce84['getEntry'](_0x29d46b,_0xbab824['key']);if(!_0x2a208e)return![];const _0x46a50d={'oldValue':null,'newValue':_0x2a208e['value'],'key':_0xbab824['key']},{before:_0x14c91f,after:_0xe34f77}=_0x58b840(_0x1a299a,_0x54ce84,_0x46a50d);if(_0x14c91f===null&&_0xe34f77===null)continue;try{const _0x2d5f2c=_0xbfe93e(_0x1a299a,_0xb01566,_0x46a50d,_0x54ce84);if(_0x2d5f2c!==null)_0xb01566=_0x2d5f2c;}catch{return![];}const _0x4584fe=_0x1a6444(_0x1a299a,_0x14c91f,_0xe34f77,_0xbab824[_0x120212(0x9dd)]);for(const [_0x3896b7,{toAdd:_0x16e088,docKey:_0x1ef708}]of _0x4584fe){const _0x15fad7=this[_0x120212(0xc51)](_0x3bc18f,_0x1ee091,_0x3896b7);for(const _0x3a838c of _0x16e088)_0x15fad7[_0x120212(0xb6f)](_0x3a838c,_0x1ef708);}}return _0x1080b1['putSync'](_0x3e6ce6,_0xb01566),!![];}async[_0x4be78b(0x11ab)](_0x3e8028){const _0x42d73b=_0x4be78b,_0x34c84e=this[_0x42d73b(0x406)][_0x42d73b(0xbeb)](_0x3e8028);if(!_0x34c84e)throw new _0x1e2f85(_0x42d73b(0xfc1)+_0x3e8028+'\x22\x20not\x20found','VIEW_NOT_FOUND',{'name':_0x3e8028});_0x34c84e[_0x42d73b(0xf40)]?.(),_0x34c84e[_0x42d73b(0xf40)]=null;for(const [,_0x285fd7]of _0x34c84e[_0x42d73b(0x582)]){_0x285fd7?.();}_0x34c84e[_0x42d73b(0x582)][_0x42d73b(0x859)](),_0x34c84e[_0x42d73b(0xcdb)][_0x42d73b(0x123a)](_0x3e6ce6),_0x34c84e[_0x42d73b(0xf82)][_0x42d73b(0x123a)](_0xfd6604);for(const [,_0x3ac6d5]of _0x34c84e[_0x42d73b(0x7c8)]){try{_0x3ac6d5[_0x42d73b(0x9a6)]();}catch{}}_0x34c84e[_0x42d73b(0x7c8)][_0x42d73b(0x859)]();for(const [_0x215dfa,_0x2058c1]of _0x34c84e[_0x42d73b(0xab2)][_0x42d73b(0xbf5)]){try{const _0x1a6cab=_0x34c84e[_0x42d73b(0x1174)][_0x42d73b(0xbeb)](_0x215dfa)??this[_0x42d73b(0x5e7)](_0x3e8028,_0x215dfa);_0x1a6cab[_0x42d73b(0x9a6)]();}catch{}const _0x51ae48=_0x34c84e[_0x42d73b(0xc4a)][_0x42d73b(0xbeb)](_0x215dfa)??new Map();for(const _0x410c79 of _0x2058c1['reducers'][_0x42d73b(0x1103)](_0x360842=>_0x360842[_0x42d73b(0xe50)])){try{const _0x6ee64a=_0x51ae48[_0x42d73b(0xbeb)](_0x410c79[_0x42d73b(0x1173)])??this[_0x42d73b(0xcf9)](_0x3e8028,_0x215dfa,_0x410c79[_0x42d73b(0x1173)]);_0x6ee64a[_0x42d73b(0x9a6)]();}catch{}}}_0x34c84e[_0x42d73b(0x1174)][_0x42d73b(0x859)](),_0x34c84e['refItemsDbs']['clear']();for(const {event:_0x1230f9,handler:_0x3fbc0e}of _0x34c84e[_0x42d73b(0x1024)]??[]){this[_0x42d73b(0x30b)][_0x42d73b(0xea8)][_0x42d73b(0xa9b)](_0x1230f9,_0x3fbc0e);}this[_0x42d73b(0xd7c)](_0x3e8028,_0x34c84e[_0x42d73b(0x83a)]),this[_0x42d73b(0x106e)](_0x3e8028,_0x34c84e[_0x42d73b(0x83a)]);}async['_cleanupViewStorage'](_0x91a8d1){const _0x5e60cc=_0x4be78b,_0x1d6d2d=this[_0x5e60cc(0x406)]['get'](_0x91a8d1);if(_0x1d6d2d){_0x1d6d2d['stopFn']?.();for(const _0x484aa8 of _0x1d6d2d['refStopFns']['values']()){_0x484aa8?.();}for(const {event:_0x200a00,handler:_0x33543b}of _0x1d6d2d[_0x5e60cc(0x1024)]??[]){this['env'][_0x5e60cc(0xea8)]['off'](_0x200a00,_0x33543b);}_0x1d6d2d[_0x5e60cc(0xcdb)][_0x5e60cc(0x123a)](_0x3e6ce6),_0x1d6d2d[_0x5e60cc(0xf82)][_0x5e60cc(0x123a)](_0xfd6604);for(const _0x33cc09 of _0x1d6d2d[_0x5e60cc(0xab2)][_0x5e60cc(0xf36)]['filter'](_0x1b83d2=>_0x1b83d2[_0x5e60cc(0xe50)])){try{const _0x1d1f25=_0x1d6d2d[_0x5e60cc(0x7c8)][_0x5e60cc(0xbeb)](_0x33cc09['name'])??this['_openItemsDb'](_0x91a8d1,_0x33cc09[_0x5e60cc(0x1173)]);_0x1d1f25[_0x5e60cc(0x9a6)]();}catch{}}for(const [_0x2d02ef,_0xd0cffb]of _0x1d6d2d[_0x5e60cc(0xab2)][_0x5e60cc(0xbf5)]){try{const _0x20728b=_0x1d6d2d[_0x5e60cc(0x1174)]['get'](_0x2d02ef)??this[_0x5e60cc(0x5e7)](_0x91a8d1,_0x2d02ef);_0x20728b[_0x5e60cc(0x9a6)]();}catch{}const _0x4c8725=_0x1d6d2d[_0x5e60cc(0xc4a)]['get'](_0x2d02ef)??new Map();for(const _0x304abf of _0xd0cffb[_0x5e60cc(0xf36)]['filter'](_0x149e6a=>_0x149e6a[_0x5e60cc(0xe50)])){try{const _0x5240a4=_0x4c8725[_0x5e60cc(0xbeb)](_0x304abf[_0x5e60cc(0x1173)])??this[_0x5e60cc(0xcf9)](_0x91a8d1,_0x2d02ef,_0x304abf['name']);_0x5240a4['clearSync']();}catch{}}}this['_viewState'][_0x5e60cc(0x3b3)](_0x91a8d1);}else{const {viewDb:_0x3ae3f9,metaDb:_0x506e6a}=this[_0x5e60cc(0x114c)](_0x91a8d1);_0x3ae3f9[_0x5e60cc(0x123a)](_0x3e6ce6),_0x506e6a[_0x5e60cc(0x123a)](_0xfd6604);}}[_0x4be78b(0xbeb)](_0x1c435c){const _0x53eec4=_0x4be78b,_0x19ad87=this[_0x53eec4(0x406)][_0x53eec4(0xbeb)](_0x1c435c);if(!_0x19ad87)return null;const _0x219480=_0x19ad87[_0x53eec4(0xcdb)][_0x53eec4(0xbeb)](_0x3e6ce6);if(!_0x219480)return null;_0x19ad87[_0x53eec4(0xf82)][_0x53eec4(0xbeb)](_0xfd6604)??null;const _0x14da0a=_0x2ab272(_0x19ad87['compiled'],_0x219480),_0x239b66=this['env'];for(const _0x4f53f6 of _0x19ad87['compiled'][_0x53eec4(0xf36)]){if(!_0x4f53f6[_0x53eec4(0xe50)])continue;const _0x3b598b=_0x19ad87['itemsDbs'][_0x53eec4(0xbeb)](_0x4f53f6[_0x53eec4(0x1173)]);if(!_0x3b598b)continue;if(_0x4f53f6[_0x53eec4(0xf6a)]){const _0x33a0b1=_0x14da0a[_0x4f53f6[_0x53eec4(0x1173)]];if(_0x33a0b1&&typeof _0x33a0b1===_0x53eec4(0xb36))for(const _0x33030a of Object[_0x53eec4(0xa52)](_0x33a0b1)){_0x33a0b1[_0x33030a]['items']=_0x1d3aa4(_0x3b598b,_0x33030a,_0x19ad87['definition']['type'],_0x239b66);}}else _0x14da0a[_0x4f53f6['name']]&&(_0x14da0a[_0x4f53f6[_0x53eec4(0x1173)]]['items']=_0x1d3aa4(_0x3b598b,_0xbfe906,_0x19ad87[_0x53eec4(0x83a)]['type'],_0x239b66));}for(const [_0x36e6e6,_0x2bdbc0]of _0x19ad87['compiled'][_0x53eec4(0xbf5)]){const _0x25ddc8=_0x19ad87['refItemsDbs'][_0x53eec4(0xbeb)](_0x36e6e6);if(!_0x25ddc8)continue;const _0x1e36d1=_0x14da0a[_0x36e6e6];if(!_0x1e36d1||typeof _0x1e36d1!=='object')continue;for(const _0x577701 of _0x2bdbc0[_0x53eec4(0xf36)]){if(!_0x577701['items'])continue;const _0x20e5bd=_0x25ddc8[_0x53eec4(0xbeb)](_0x577701[_0x53eec4(0x1173)]);if(!_0x20e5bd)continue;if(_0x577701[_0x53eec4(0xf6a)]){const _0x157273=_0x1e36d1[_0x577701[_0x53eec4(0x1173)]];if(_0x157273&&typeof _0x157273==='object')for(const _0x39f601 of Object[_0x53eec4(0xa52)](_0x157273)){_0x157273[_0x39f601][_0x53eec4(0xe50)]=_0x1d3aa4(_0x20e5bd,_0x39f601,_0x2bdbc0['type'],_0x239b66);}}else _0x1e36d1[_0x577701[_0x53eec4(0x1173)]]&&(_0x1e36d1[_0x577701[_0x53eec4(0x1173)]][_0x53eec4(0xe50)]=_0x1d3aa4(_0x20e5bd,_0xbfe906,_0x2bdbc0['type'],_0x239b66));}}return _0x14da0a;}[_0x4be78b(0x938)](_0x317758){const _0x263a15=_0x4be78b,_0x14cae7=this['_viewState'][_0x263a15(0xbeb)](_0x317758);if(!_0x14cae7)return null;return _0x14cae7[_0x263a15(0xf82)]['get'](_0xfd6604)??null;}async['getDefinition'](_0xdc526c){const _0x1e70fa=_0x4be78b,_0x286d86=await this[_0x1e70fa(0x6f5)]();return _0x286d86[_0x1e70fa(0xbeb)](_0x4ba4a8,_0xdc526c)??null;}async['list'](){const _0x4d0492=_0x4be78b,_0x20f5cf=await this[_0x4d0492(0x6f5)](),_0x4a4cee=[];for(const {key:_0x244f9d}of _0x20f5cf[_0x4d0492(0x9ce)](_0x4ba4a8)){_0x4a4cee[_0x4d0492(0x597)](_0x244f9d);}return _0x4a4cee;}['registerReducer'](_0x113be5,{apply:_0x37349a}={}){const _0x50fbc1=_0x4be78b;if(!_0x113be5||!_0x113be5['startsWith']('$'))throw new _0x1e2f85(_0x50fbc1(0x26a),'VIEW_INVALID_REDUCER_NAME',{'name':_0x113be5});if(_0x22d8bd['has'](_0x113be5))throw new _0x1e2f85('\x22'+_0x113be5+_0x50fbc1(0x740),_0x50fbc1(0x93c),{'name':_0x113be5});if(typeof _0x37349a!==_0x50fbc1(0x63b))throw new _0x1e2f85(_0x50fbc1(0x39b),_0x50fbc1(0x8e));this[_0x50fbc1(0x86d)][_0x50fbc1(0x211)](_0x113be5,{'apply':_0x37349a});}}function _0x1d3aa4(_0x7c4a5,_0x59175f,_0x2aa720,_0x389c9b){return function _0x13b997(){const _0xa6dcb4=_0x47ab,_0x310ed2=[];for(const {key:_0x2c5697,value:_0x4bb1ac}of _0x7c4a5[_0xa6dcb4(0x9ce)]({'start':_0x59175f})){if(_0x2c5697!==_0x59175f)break;const _0x205c0d=_0x389c9b['get'](_0x2aa720,_0x4bb1ac);if(_0x205c0d!==undefined)_0x310ed2[_0xa6dcb4(0x597)](_0x205c0d);}return _0x310ed2;};}function _0x1cefc1(_0x29197a,_0x714668,_0x5d0f5c,_0x8ae813){const _0x2f7351=_0x4be78b,_0x1bc137=_0x29197a[_0x2f7351(0xbeb)](_0x5d0f5c,_0x8ae813);if(_0x1bc137===undefined||_0x1bc137===null)return![];return _0x714668===null||_0x714668(_0x1bc137);}function _0x11cbd8(_0x257f95,_0x253aef,_0x3cfbbb,_0x35273c){const _0x2f6791=_0x4be78b;if(_0x35273c===null)return null;const _0x2638b6=Object[_0x2f6791(0x299)]({},_0x253aef);for(const _0x451958 of _0x257f95[_0x2f6791(0xf36)]){_0x2638b6[_0x451958[_0x2f6791(0x1173)]]=_0x451958[_0x2f6791(0x111b)](_0x2638b6[_0x451958['name']]??null,_0x3cfbbb,_0x35273c,_0x451958['opts']);}return _0x2638b6;}return okdbViews=_0xe1d2ff,okdbViews;}var okdbEnv,hasRequiredOkdbEnv;function requireOkdbEnv(){const _0x52c6ca=_0xef8cd8;if(hasRequiredOkdbEnv)return okdbEnv;hasRequiredOkdbEnv=0x1;const _0x3a424d=require$$0$6,_0x47de9b=require$$0$5,_0x424dee=requireOkdbTransaction(),_0x300e4d=requireOkdbHlc(),_0x2a76c2=requireOkdbProcessor(),_0x3ba914=requireOkdbGeo(),_0x76cf00=requireOkdbEnvIndexes(),_0x414eac=requireOkdbEnvRefs(),_0x1a45f8=requireOkdbEnvSchema(),_0x2632d6=requireOkdbEnvPatches(),_0x213e4a=requireOkdbFunctions(),_0x56e3c0=requireOkdbEngines(),_0x22d516=requireOkdbPipelines(),_0x49a4a0=requireOkdbViews(),{BUS_EVENTS:_0x29e4e0,INDEX_STATE:_0x13f7fa,CHANGE_ACTIONS:_0x510008,EVENTS:_0x8758ea}=requireOkdbEnums(),{OKDBError:_0x271948,OKDBVersionMismatchError:_0x3c3f09,OKDBNotFoundError:_0x2a41e6,OKDBAlreadyExistsError:_0x1e3c9e,OKDBInvalidIndexKeyError:_0x51b540,OKDBInvalidPrimaryKeyError:_0x461744,OKDBTypeNotRegisteredError:_0x5cf835,OKDBIndexNotRegisteredError:_0x206246,OKDBIndexAlreadyRegisteredError:_0x16dcd6,OKDBInvalidValueError:_0x34ee2a,OKDBSchemaValidationError:_0xbaf508,OKDBForeignKeyError:_0x75b8f2,OKDBIndexHasConsumersError:_0xf85ec3}=requireOkdbError(),{validate:_0x5269e9}=requireOkdbSchemaValidator(),_0x37cf73=Buffer[_0x52c6ca(0x9f8)]([0xff]),_0xfff91a='~schema_violations',_0x128fbc=_0x52c6ca(0x2c5),_0x469788=0x14,_0x212549=0x3a98,_0xb673e1=0x2710,_0x33f112=0x1388,_0x4da837=0xbb8;class _0x31638a{constructor(_0x216feb){const _0x47a028=_0x52c6ca,_0x9ef518=require$$17;this['segmentName']=_0x216feb['replace'](/[^a-zA-Z0-9]/g,'-');const _0xf559f4=_0x9ef518[_0x47a028(0x717)](this[_0x47a028(0xa6b)],0x8);this[_0x47a028(0x2bb)]=new Int32Array(_0xf559f4),this[_0x47a028(0x934)]=![],this[_0x47a028(0xcb5)]=![],this['_reopenPromise']=null,this['_reopenResolve']=null,this[_0x47a028(0x10ff)]=null,this[_0x47a028(0x81e)]=null,this[_0x47a028(0x1082)]=null,this[_0x47a028(0x814)]=0x0;}async[_0x52c6ca(0x162)](){const _0x442679=_0x52c6ca;Atomics[_0x442679(0x33c)](this[_0x442679(0x2bb)],0x1,0x1),this[_0x442679(0x814)]++;const _0x231a82=Atomics[_0x442679(0x7c9)](this['view'],0x0);_0x231a82>0x0&&(Atomics[_0x442679(0x33c)](this[_0x442679(0x2bb)],0x1,-0x1),this['_ownWriters']--,await this[_0x442679(0x3a2)](),Atomics[_0x442679(0x33c)](this['view'],0x1,0x1),this[_0x442679(0x814)]++);}['afterWrite'](){const _0x1f44eb=_0x52c6ca;Atomics[_0x1f44eb(0x33c)](this[_0x1f44eb(0x2bb)],0x1,-0x1),this[_0x1f44eb(0x814)]--;}[_0x52c6ca(0xa79)](){}['_parkWrite'](){const _0x4a4c08=_0x52c6ca;return!this['_reopenPromise']&&(this[_0x4a4c08(0x18b)]=new Promise((_0x1ec603,_0x284a2d)=>{const _0x43bcef=_0x4a4c08;this[_0x43bcef(0x743)]=_0x1ec603,this['_reopenReject']=_0x284a2d,this[_0x43bcef(0x81e)]=setTimeout(()=>{const _0x59feac=_0x43bcef;this[_0x59feac(0x18b)]=null,this['_reopenResolve']=null,this[_0x59feac(0x10ff)]=null,_0x284a2d(new _0x271948(_0x59feac(0xa0a),_0x59feac(0x1111)));},_0x212549);})),this[_0x4a4c08(0x18b)];}['_resolveReopen'](){const _0xf5eed5=_0x52c6ca;if(this['_reopenResolve']){clearTimeout(this[_0xf5eed5(0x81e)]);const _0x4cb8b8=this[_0xf5eed5(0x743)];this[_0xf5eed5(0x18b)]=null,this['_reopenResolve']=null,this['_reopenReject']=null,this[_0xf5eed5(0x81e)]=null,_0x4cb8b8();}}['resetDrain'](){const _0x28d660=_0x52c6ca;Atomics[_0x28d660(0x4f8)](this[_0x28d660(0x2bb)],0x0,0x0);}[_0x52c6ca(0x1105)](){const _0x1bdd70=_0x52c6ca;this[_0x1bdd70(0x1082)]=setInterval(()=>Atomics[_0x1bdd70(0x4f8)](this[_0x1bdd70(0x2bb)],0x0,Math['floor'](Date[_0x1bdd70(0x555)]()/0x3e8)),_0x33f112);}[_0x52c6ca(0x114)](){const _0x4faa16=_0x52c6ca;this[_0x4faa16(0x1082)]&&(clearInterval(this[_0x4faa16(0x1082)]),this[_0x4faa16(0x1082)]=null);}async['drain'](_0x1f10c9){const _0x4b7416=_0x52c6ca;this[_0x4b7416(0xcb5)]=!![],Atomics[_0x4b7416(0x4f8)](this['view'],0x0,Math['floor'](Date[_0x4b7416(0x555)]()/0x3e8)),this[_0x4b7416(0x1105)](),_0x1f10c9['okdb'][_0x4b7416(0xafb)]?.[_0x4b7416(0xf5d)](_0x29e4e0[_0x4b7416(0xb5d)]);const _0x4e2986=Date[_0x4b7416(0x555)]();while(Date[_0x4b7416(0x555)]()-_0x4e2986<_0xb673e1){if(Atomics[_0x4b7416(0x7c9)](this['view'],0x1)===0x0)break;await new Promise(_0x78f2a6=>setTimeout(_0x78f2a6,0x32));}Atomics[_0x4b7416(0x4f8)](this['view'],0x1,0x0);}[_0x52c6ca(0x11ac)](){const _0x131004=_0x52c6ca,_0x47c9c0=require$$17;_0x47c9c0[_0x131004(0x11ac)](this['segmentName']);}[_0x52c6ca(0xe69)](){const _0x449ef6=_0x52c6ca,_0x135b62=require$$17;try{_0x135b62['unlink'](this[_0x449ef6(0xa6b)]);}catch{}}}class _0x3d0c61{constructor(_0x3faac5,_0x34f0b8,_0x136652,_0x30fc79={}){const _0x3e840d=_0x52c6ca;this[_0x3e840d(0xd4f)]=_0x3faac5,this[_0x3e840d(0x1173)]=_0x34f0b8,this[_0x3e840d(0x20b)]=_0x136652,this[_0x3e840d(0x142)]=_0x30fc79,this[_0x3e840d(0x745)]=_0x30fc79[_0x3e840d(0x1034)]!==![],this[_0x3e840d(0xea8)]=_0x3faac5['events'],this[_0x3e840d(0x9be)]=_0x3faac5[_0x3e840d(0x9be)][_0x3e840d(0xd9b)]({'feature':_0x3e840d(0x30b),'env':_0x34f0b8}),this['db']=null,this[_0x3e840d(0xce1)]=null,this['clockToChangeDb']=null,this[_0x3e840d(0x969)]=null,this[_0x3e840d(0x1145)]=new Map(),this[_0x3e840d(0x1185)]=0x0,this['_isOpen']=![],this['_refIndexDb']=null,this[_0x3e840d(0x294)]=null,this['_ttlByKey']=null,this[_0x3e840d(0x1191)]=null,this[_0x3e840d(0x3b1)]=![],this['_ttlTimeout']=null,this['_refCache']={'outgoing':new Map(),'incoming':new Map()},this[_0x3e840d(0x990)]=null,this[_0x3e840d(0xa51)]=[],this[_0x3e840d(0xf39)]=new _0x2a76c2(this),this[_0x3e840d(0xab8)]=new _0x56e3c0(_0x3faac5,{'env':this,'orchestrator':_0x3faac5[_0x3e840d(0xab8)]}),this[_0x3e840d(0x7d3)]=new _0x22d516(this,{'registryEnv':this,'envName':_0x34f0b8}),this['functions']=new _0x213e4a(this,{'registryEnv':this,'envName':_0x34f0b8,'runtimeDefaults':_0x3faac5[_0x3e840d(0x11e5)]['functions']}),this[_0x3e840d(0xaa5)]=new _0x49a4a0(this),this[_0x3e840d(0xc57)]=new _0x31638a(_0x136652);}get['id'](){const _0xfaac84=_0x52c6ca;return this[_0xfaac84(0xd4f)]['id'];}[_0x52c6ca(0x48a)](){const _0x231ba3=_0x52c6ca,_0x4b7277={...this[_0x231ba3(0xd4f)][_0x231ba3(0x11e5)],...this[_0x231ba3(0x142)],'lmdb':{...this[_0x231ba3(0xd4f)][_0x231ba3(0x11e5)][_0x231ba3(0x96b)]||{},...this['config'][_0x231ba3(0x96b)]||{}}},_0x383ee8=_0x4b7277['durability']??_0x231ba3(0x2c3),_0x1cf3e5=_0x4b7277[_0x231ba3(0x96b)]||{},_0x4020e7=[],_0x446e1e=[],_0x114f20={'strict':{},'balanced':{'overlappingSync':!![]},'fast':{'noSync':!![]},'custom':{}},_0x5a97e3=[{'test':(_0x3ea3a6,_0x47753a)=>_0x47753a==='strict'&&(_0x3ea3a6[_0x231ba3(0xc12)]||_0x3ea3a6['noMetaSync']),'msg':_0x231ba3(0x62b),'fatal':!![]},{'test':(_0x3ccd76,_0x5a4e3e)=>_0x3ccd76['useWritemap']&&(_0x5a4e3e==='strict'||_0x5a4e3e===_0x231ba3(0x2c3)),'msg':_0x231ba3(0x3ca),'fatal':!![]},{'test':_0x198a49=>_0x198a49[_0x231ba3(0xc12)]&&_0x198a49[_0x231ba3(0xa36)],'msg':_0x231ba3(0x2d1),'fatal':![]}];if(!_0x114f20[_0x383ee8])throw new _0x271948(_0x231ba3(0x1029)+_0x383ee8+_0x231ba3(0x633)+Object[_0x231ba3(0xa52)](_0x114f20)[_0x231ba3(0x3d9)](',\x20')+'.',_0x231ba3(0x118c));const _0x363876={'maxDbs':_0x4b7277[_0x231ba3(0x7ab)],'pageSize':_0x4b7277[_0x231ba3(0x3ff)],'compression':_0x4b7277[_0x231ba3(0xcaa)],'encryptionKey':_0x4b7277[_0x231ba3(0x1199)],'mapSize':_0x4b7277[_0x231ba3(0xc7)]},_0x284b8f=_0x114f20[_0x383ee8],_0x2280d9={..._0x284b8f,..._0x363876,..._0x1cf3e5,'dupSort':![]};for(const {test:_0x337cc2,msg:_0x2e870b,fatal:_0x110b8c}of _0x5a97e3){if(!_0x337cc2(_0x2280d9,_0x383ee8))continue;_0x110b8c&&!_0x4b7277[_0x231ba3(0x1a3)]?_0x446e1e['push'](_0x2e870b+_0x231ba3(0x121b)):_0x4020e7['push']('[OKDB\x20unsafe\x20config]\x20'+_0x2e870b);}if(_0x446e1e[_0x231ba3(0x156)])throw new _0x271948('Unsafe\x20OKDB\x20configuration\x20detected:\x0a'+_0x446e1e[_0x231ba3(0x1166)](_0xdb6a10=>'\x20\x20ג€¢\x20'+_0xdb6a10)[_0x231ba3(0x3d9)]('\x0a'),_0x231ba3(0x104));return{'envOptions':_0x2280d9,'warnings':_0x4020e7};}[_0x52c6ca(0x107)](){const _0x1cffb1=_0x52c6ca;return{'durability':this['config'][_0x1cffb1(0xfb7)]??this[_0x1cffb1(0xd4f)][_0x1cffb1(0x11e5)][_0x1cffb1(0xfb7)],'lmdbOptions':this['_resolvedEnvOptions'],'warnings':this['_resolvedWarnings']};}[_0x52c6ca(0x103)](){const _0x5168ba=_0x52c6ca,_0x198dd1={...this[_0x5168ba(0xd4f)][_0x5168ba(0x11e5)],...this[_0x5168ba(0x142)]};return{'pageSize':_0x198dd1[_0x5168ba(0x3ff)],'compression':_0x198dd1[_0x5168ba(0xcaa)],'encrypted':!!_0x198dd1['encryptionKey']};}['_enforceIdentity'](){const _0x5a27ce=_0x52c6ca,_0x2fddcd=this[_0x5a27ce(0x103)](),_0x3e9a19=this['db']['get'](_0x5a27ce(0xc84));if(!_0x3e9a19){this['db'][_0x5a27ce(0xb6f)]('__env_meta',_0x2fddcd);return;}const _0xf05d92=[];if(_0x3e9a19[_0x5a27ce(0x3ff)]!==_0x2fddcd[_0x5a27ce(0x3ff)])_0xf05d92[_0x5a27ce(0x597)]('pageSize:\x20DB\x20created\x20with\x20'+_0x3e9a19[_0x5a27ce(0x3ff)]+',\x20now\x20opening\x20with\x20'+_0x2fddcd[_0x5a27ce(0x3ff)]);if(_0x3e9a19[_0x5a27ce(0xcaa)]!==_0x2fddcd[_0x5a27ce(0xcaa)])_0xf05d92[_0x5a27ce(0x597)](_0x5a27ce(0x2ab)+_0x3e9a19['compression']+_0x5a27ce(0x3bc)+_0x2fddcd['compression']);if(_0x3e9a19['encrypted']!==_0x2fddcd[_0x5a27ce(0xa97)])_0xf05d92[_0x5a27ce(0x597)](_0x3e9a19[_0x5a27ce(0xa97)]?_0x5a27ce(0x1ce):'encrypted:\x20DB\x20was\x20created\x20without\x20encryption\x20but\x20a\x20key\x20was\x20provided');if(_0xf05d92[_0x5a27ce(0x156)])throw new _0x271948(_0x5a27ce(0x1167)+_0xf05d92[_0x5a27ce(0x1166)](_0x1ddff1=>_0x5a27ce(0x837)+_0x1ddff1)[_0x5a27ce(0x3d9)]('\x0a'),_0x5a27ce(0x118c));}async[_0x52c6ca(0x717)](){const _0x37a84f=_0x52c6ca,{envOptions:_0x3f6b43,warnings:_0x164b8a}=this[_0x37a84f(0x48a)]();this[_0x37a84f(0x990)]=_0x3f6b43,this[_0x37a84f(0xa51)]=_0x164b8a;for(const _0x320bd0 of _0x164b8a)this[_0x37a84f(0x9be)][_0x37a84f(0xf78)](_0x320bd0);this['db']=_0x3a424d['open'](this[_0x37a84f(0x20b)],_0x3f6b43),this[_0x37a84f(0xce1)]=this['db']['openDB']('types',{'dupSort':![]});this[_0x37a84f(0x745)]&&(this[_0x37a84f(0x969)]=this['db'][_0x37a84f(0x730)](_0x37a84f(0xf0c),{'dupSort':![]}),this['clockToChangeDb']=this['db'][_0x37a84f(0x730)](_0x37a84f(0x11cd),{'dupSort':![]}));try{this[_0x37a84f(0x751)]();}catch(_0x3ed657){try{await this['db'][_0x37a84f(0x11ac)]();}catch{}this['db']=null;throw _0x3ed657;}const _0x56b973=Number(this['db'][_0x37a84f(0xbeb)](_0x37a84f(0xab1)))||0x0;this[_0x37a84f(0x1185)]=Math[_0x37a84f(0x10bf)](_0x56b973,_0x300e4d[_0x37a84f(0x8dd)](Date['now'](),0x0)),this[_0x37a84f(0xde4)]=this['_sync']?this['db'][_0x37a84f(0xbeb)](_0x37a84f(0x114d))||0x0:0x0;for(const _0x127a44 of this[_0x37a84f(0xce1)][_0x37a84f(0x40e)]())this['_openType'](_0x127a44);this['db'][_0x37a84f(0xbeb)]('_ttl_enabled')&&this['_openTTLDbs'](),this[_0x37a84f(0xe56)]=!![],_0x414eac[_0x37a84f(0x89c)](this),this['_drainHandler']=()=>{const _0x2c27e9=_0x37a84f,_0x3a4aa0=this[_0x2c27e9(0xc57)],_0x136fd1=Atomics['load'](_0x3a4aa0[_0x2c27e9(0x2bb)],0x0),_0x50cf33=Math[_0x2c27e9(0xf9a)](Date['now']()/0x3e8);if(_0x136fd1>0x0&&_0x50cf33-_0x136fd1>_0x469788){Atomics[_0x2c27e9(0x4f8)](_0x3a4aa0['view'],0x0,0x0),_0x3a4aa0[_0x2c27e9(0x747)]();return;}if(_0x136fd1>0x0&&this[_0x2c27e9(0xe56)]&&!_0x3a4aa0[_0x2c27e9(0x934)]&&!_0x3a4aa0[_0x2c27e9(0xcb5)]){_0x3a4aa0[_0x2c27e9(0x934)]=!![];const _0x37bcb9=()=>{const _0x5b5bc3=_0x2c27e9;if(_0x3a4aa0['_ownWriters']>0x0){setTimeout(_0x37bcb9,0x32);return;}this[_0x5b5bc3(0x15d)]();};_0x37bcb9();}_0x136fd1===0x0&&_0x3a4aa0['_envClosedForDrain']&&(_0x3a4aa0[_0x2c27e9(0x934)]=![],_0x3a4aa0[_0x2c27e9(0xcb5)]=![],this['_reopenAfterDrain'](),_0x3a4aa0[_0x2c27e9(0x747)]());},this[_0x37a84f(0xd4f)][_0x37a84f(0xea8)]['on'](_0x8758ea['SYSTEM_DRAIN'],this[_0x37a84f(0x226)]);}async[_0x52c6ca(0x11ac)](){const _0x6eabb8=_0x52c6ca;this['_isOpen']=![],this[_0x6eabb8(0xfdf)](),this[_0x6eabb8(0xd4f)][_0x6eabb8(0xea8)][_0x6eabb8(0xa9b)](_0x8758ea[_0x6eabb8(0x862)],this[_0x6eabb8(0x226)]),await this[_0x6eabb8(0xf39)]?.[_0x6eabb8(0x910)]?.(),await this['pipelines']?.[_0x6eabb8(0x910)]?.(),await this[_0x6eabb8(0xab8)]?.[_0x6eabb8(0x1fe)]?.(),await this[_0x6eabb8(0x705)]?.[_0x6eabb8(0x1fe)]?.(),await this['db'][_0x6eabb8(0x11ac)]();}[_0x52c6ca(0x15d)](){const _0x362b86=_0x52c6ca;if(!this['_isOpen'])return;this['db'][_0x362b86(0x11ac)](),this[_0x362b86(0xe56)]=![],this[_0x362b86(0x1145)][_0x362b86(0x859)](),this['db']=null,this[_0x362b86(0xce1)]=null,this[_0x362b86(0x969)]=null,this[_0x362b86(0xcda)]=null;}['_reopenAfterDrain'](){const _0x425073=_0x52c6ca;if(this[_0x425073(0xe56)])return;const {envOptions:_0x239623}=this[_0x425073(0x48a)]();this['db']=_0x3a424d[_0x425073(0x717)](this[_0x425073(0x20b)],_0x239623),this[_0x425073(0xce1)]=this['db']['openDB'](_0x425073(0x450),{'dupSort':![]});this['_sync']&&(this[_0x425073(0x969)]=this['db']['openDB'](_0x425073(0xf0c),{'dupSort':![]}),this[_0x425073(0xcda)]=this['db']['openDB'](_0x425073(0x11cd),{'dupSort':![]}));for(const _0x552ed5 of this[_0x425073(0xce1)][_0x425073(0x40e)]())this[_0x425073(0x37c)](_0x552ed5);if(this['db']['get'](_0x425073(0x686)))this[_0x425073(0x36d)]();this[_0x425073(0xe56)]=!![],_0x414eac[_0x425073(0x89c)](this);}['_reopenEnv'](){const _0x51a6c1=_0x52c6ca;try{this['db']&&this['db']['close']();this['_isOpen']=![],this[_0x51a6c1(0x1145)][_0x51a6c1(0x859)]();const {envOptions:_0x4bbf1e}=this['_resolveEnvOptions']();this['db']=_0x3a424d[_0x51a6c1(0x717)](this[_0x51a6c1(0x20b)],_0x4bbf1e),this[_0x51a6c1(0xce1)]=this['db'][_0x51a6c1(0x730)](_0x51a6c1(0x450),{'dupSort':![]});this[_0x51a6c1(0x745)]&&(this[_0x51a6c1(0x969)]=this['db'][_0x51a6c1(0x730)](_0x51a6c1(0xf0c),{'dupSort':![]}),this[_0x51a6c1(0xcda)]=this['db']['openDB'](_0x51a6c1(0x11cd),{'dupSort':![]}));for(const _0x18ea70 of this['typesDb'][_0x51a6c1(0x40e)]()){this['_openType'](_0x18ea70);}this['db'][_0x51a6c1(0xbeb)](_0x51a6c1(0x686))&&this[_0x51a6c1(0x36d)](),this['_isOpen']=!![],_0x414eac['rebuildRefCache'](this);}catch(_0x2d8f92){this['log'][_0x51a6c1(0x225)](_0x51a6c1(0x118)+_0x2d8f92['message']);throw _0x2d8f92;}}[_0x52c6ca(0xd83)](){const _0x504943=_0x52c6ca,_0x532de0=[this['db'],this[_0x504943(0xce1)],this[_0x504943(0xcda)],this[_0x504943(0x969)],this[_0x504943(0x294)],this[_0x504943(0x99e)]];for(const _0x554d85 of this[_0x504943(0x1145)][_0x504943(0x231)]()){_0x532de0[_0x504943(0x597)](_0x554d85?.['root'],_0x554d85?.[_0x504943(0xc88)],_0x554d85?.['indexes'],_0x554d85?.['clockToChange'],_0x554d85?.[_0x504943(0x770)]);for(const _0x3fd2ae of _0x554d85?.[_0x504943(0xf7b)]?.[_0x504943(0x231)]?.()??[]){_0x532de0[_0x504943(0x597)](_0x3fd2ae?.['db']);}for(const _0x51fa35 of _0x554d85?.['ftsToDb']?.['values']?.()??[]){_0x532de0[_0x504943(0x597)](_0x51fa35?.[_0x504943(0xc9)]);}}const _0x561620=new Set();for(const _0x33cdfe of _0x532de0){if(!_0x33cdfe||_0x561620[_0x504943(0x9d0)](_0x33cdfe))continue;_0x561620['add'](_0x33cdfe);try{_0x33cdfe[_0x504943(0xcf3)]?.();}catch{}}}async[_0x52c6ca(0xd76)](){const _0xd93a55=_0x52c6ca,_0x1f5187=require$$0$7,_0x3cafa6=require$$1$2;this['_assertOpen']();const _0x2d9d0f=_0x3cafa6[_0xd93a55(0x3d9)](this['path'],_0xd93a55(0x358)),_0x28ea61=this[_0xd93a55(0x20b)]+_0xd93a55(0x3ce)+Date['now'](),_0x5b94dd=_0x2d9d0f+_0xd93a55(0x46d);await this[_0xd93a55(0xc57)][_0xd93a55(0x6a4)](this),await new Promise(_0x4c8cba=>setTimeout(_0x4c8cba,_0x4da837));let _0x117632=0x0;try{_0x117632=_0x1f5187[_0xd93a55(0xdcb)](_0x2d9d0f)[_0xd93a55(0xfb)];}catch{}_0x1f5187[_0xd93a55(0xb69)](_0x28ea61,{'recursive':!![]});let _0x355bf0=![];try{await this['db']['backup'](_0x28ea61,{'compact':!![]});const _0x1cb66b=_0x3cafa6[_0xd93a55(0x3d9)](_0x28ea61,_0xd93a55(0x358));let _0x11c8f8=0x0;try{_0x11c8f8=_0x1f5187[_0xd93a55(0xdcb)](_0x1cb66b)['size'];}catch{}for(const [,_0x140c16]of this[_0xd93a55(0x1145)]){if(!_0x140c16[_0xd93a55(0x6ef)])continue;for(const [,_0x44bd35]of _0x140c16['ftsToDb']){try{_0x44bd35[_0xd93a55(0x361)]=!![],await _0x44bd35[_0xd93a55(0xc9)]?.['close']?.();}catch{}}}this[_0xd93a55(0x15d)]();try{try{_0x1f5187[_0xd93a55(0xff4)](_0x5b94dd);}catch{}_0x1f5187[_0xd93a55(0x27e)](_0x2d9d0f,_0x5b94dd);try{_0x1f5187[_0xd93a55(0x27e)](_0x1cb66b,_0x2d9d0f);}catch{_0x1f5187[_0xd93a55(0xcf4)](_0x1cb66b,_0x2d9d0f);}_0x355bf0=!![];}catch(_0x897fa5){if(_0x897fa5[_0xd93a55(0x1f8)]===_0xd93a55(0xe8e)){this[_0xd93a55(0xc57)][_0xd93a55(0x114)](),this[_0xd93a55(0xc57)][_0xd93a55(0xcb5)]=![],this[_0xd93a55(0xf34)](),this['_coordinator']['_resolveReopen'](),Atomics[_0xd93a55(0x4f8)](this[_0xd93a55(0xc57)][_0xd93a55(0x2bb)],0x0,0x0),this[_0xd93a55(0xd4f)]['bus']?.[_0xd93a55(0xf5d)](_0x29e4e0[_0xd93a55(0xb5d)]);throw new _0x271948(_0xd93a55(0xd34),'COMPACT_EBUSY');}throw _0x897fa5;}this[_0xd93a55(0xf34)](),this['_coordinator'][_0xd93a55(0x114)](),this[_0xd93a55(0xc57)][_0xd93a55(0xcb5)]=![],this[_0xd93a55(0xc57)][_0xd93a55(0x747)](),Atomics[_0xd93a55(0x4f8)](this['_coordinator'][_0xd93a55(0x2bb)],0x0,0x0),this[_0xd93a55(0xd4f)][_0xd93a55(0xafb)]?.[_0xd93a55(0xf5d)](_0x29e4e0[_0xd93a55(0xb5d)]);try{_0x1f5187[_0xd93a55(0xff4)](_0x5b94dd);}catch{}try{_0x1f5187[_0xd93a55(0x88d)](_0x28ea61,{'recursive':!![],'force':!![]});}catch{}const _0x971c86=Math[_0xd93a55(0x10bf)](0x0,_0x117632-_0x11c8f8),_0x1aabd3=_0x117632>0x0?Math[_0xd93a55(0x10bf)](0x0,Math[_0xd93a55(0xc66)](_0x971c86/_0x117632*0x64)):0x0;return this[_0xd93a55(0x9be)][_0xd93a55(0x26c)](_0xd93a55(0x34f)+_0x311aca(_0x117632)+'\x20→\x20'+_0x311aca(_0x11c8f8)+_0xd93a55(0x987)+_0x311aca(_0x971c86)+',\x20'+_0x1aabd3+'%)'),{'ok':!![],'sizeBefore':_0x117632,'sizeAfter':_0x11c8f8,'saved':_0x971c86,'savedPct':_0x1aabd3};}catch(_0x186972){try{_0x1f5187['rmSync'](_0x28ea61,{'recursive':!![],'force':!![]});}catch{}try{this[_0xd93a55(0xc57)][_0xd93a55(0x114)](),Atomics[_0xd93a55(0x4f8)](this[_0xd93a55(0xc57)][_0xd93a55(0x2bb)],0x0,0x0),this['okdb'][_0xd93a55(0xafb)]?.[_0xd93a55(0xf5d)](_0x29e4e0[_0xd93a55(0xb5d)]);}catch{}if(!this[_0xd93a55(0xe56)]){try{if(_0x355bf0&&_0x1f5187[_0xd93a55(0x66d)](_0x5b94dd))_0x1f5187[_0xd93a55(0x27e)](_0x5b94dd,_0x2d9d0f);else{if(_0x1f5187['existsSync'](_0x5b94dd)&&!_0x1f5187[_0xd93a55(0x66d)](_0x2d9d0f))_0x1f5187['renameSync'](_0x5b94dd,_0x2d9d0f);}}catch{}try{await this[_0xd93a55(0x717)]();}catch(_0x5af16d){this[_0xd93a55(0x9be)][_0xd93a55(0x225)](_0xd93a55(0xa68)+_0x5af16d['message']);}}throw _0x186972;}}[_0x52c6ca(0xf13)](){const _0x4a6f0c=_0x52c6ca;if(!this['_isOpen'])throw new _0x271948(_0x4a6f0c(0x587),_0x4a6f0c(0xe5e),{'state':_0x4a6f0c(0xbdb)});}[_0x52c6ca(0x683)](_0x53a848){return this['_assertOpen'](),new _0x424dee(this,_0x53a848);}async[_0x52c6ca(0x3b0)](_0x240610,_0x108423={}){const _0x47286c=_0x52c6ca;return this['_assertOpen'](),_0x424dee[_0x47286c(0x110b)](this,_0x240610,_0x108423);}[_0x52c6ca(0xee9)](_0x22ab3e,_0x42a88f,_0x2f7044){const _0x1910d2=_0x52c6ca,_0x39e332=_0xc9089f=>{const _0x3689b5=_0x47ab;switch(_0xc9089f[_0x3689b5(0x942)]){case _0x510008[_0x3689b5(0x719)]:return _0x42a88f===undefined?_0x8758ea[_0x3689b5(0x711)]:_0x8758ea[_0x3689b5(0xc22)];case _0x510008[_0x3689b5(0x1b8)]:return _0x8758ea['ITEM_REMOVE'];case _0x510008[_0x3689b5(0xaa4)]:return _0x8758ea[_0x3689b5(0x7a0)];case _0x510008[_0x3689b5(0xcaf)]:return _0x8758ea[_0x3689b5(0xcaf)];case _0x510008[_0x3689b5(0xada)]:return _0x8758ea[_0x3689b5(0x78a)];case _0x510008[_0x3689b5(0xfa9)]:return _0x8758ea[_0x3689b5(0xfa9)];case _0x510008[_0x3689b5(0xbdc)]:return _0x8758ea['INDEX_RESET'];case _0x510008['FTS_REGISTER']:return _0x8758ea[_0x3689b5(0xd81)];case _0x510008[_0x3689b5(0xcde)]:return _0x8758ea[_0x3689b5(0xcde)];case _0x510008[_0x3689b5(0x14a)]:return _0x8758ea['FTS_RESET'];case _0x510008['SCHEMA_SET']:return _0x8758ea[_0x3689b5(0xf02)];case _0x510008[_0x3689b5(0xd9c)]:return _0x8758ea[_0x3689b5(0xd9c)];default:throw new Error(_0x3689b5(0x421)+_0xc9089f[_0x3689b5(0x942)]);}};let _0x5bdd58=0x0;if(this[_0x1910d2(0x745)]){_0x5bdd58=++this[_0x1910d2(0xde4)],_0x22ab3e['origin']=_0x22ab3e[_0x1910d2(0xca6)]||this['id'];_0x22ab3e[_0x1910d2(0xca6)]===this['id']&&(this[_0x1910d2(0x1185)]=_0x300e4d['send'](this[_0x1910d2(0x1185)]),_0x22ab3e[_0x1910d2(0xdfe)]=this[_0x1910d2(0x1185)],this['db'][_0x1910d2(0x92c)]('hlc',String(this[_0x1910d2(0x1185)])));this['db']['put'](_0x1910d2(0x114d),_0x5bdd58),this['clockToChangeDb'][_0x1910d2(0x92c)](_0x5bdd58,_0x22ab3e);const _0x5748e7=this[_0x1910d2(0x969)][_0x1910d2(0xbeb)](_0x22ab3e['id']);_0x5748e7&&(this['clockToChangeDb'][_0x1910d2(0x21e)](_0x5748e7),_0x22ab3e[_0x1910d2(0xaee)]!=null&&this[_0x1910d2(0x1145)][_0x1910d2(0x9d0)](_0x22ab3e[_0x1910d2(0xaee)])&&this[_0x1910d2(0x1145)]['get'](_0x22ab3e[_0x1910d2(0xaee)])?.['clockToChange']?.['remove'](_0x5748e7));if(_0x22ab3e[_0x1910d2(0xaee)]!=null&&this['typeSubDbs'][_0x1910d2(0x9d0)](_0x22ab3e[_0x1910d2(0xaee)])){const _0x217a30=this['typeSubDbs'][_0x1910d2(0xbeb)](_0x22ab3e[_0x1910d2(0xaee)]);_0x217a30['clockToChange'][_0x1910d2(0x92c)](_0x5bdd58,_0x22ab3e['id']);if(_0x22ab3e[_0x1910d2(0x9dd)]!=null)_0x217a30['keyToChange'][_0x1910d2(0x92c)](_0x22ab3e['key'],_0x22ab3e['id']);}this[_0x1910d2(0x969)][_0x1910d2(0x92c)](_0x22ab3e['id'],_0x5bdd58);}const _0x54c7c6={'clock':_0x5bdd58,'origin':_0x22ab3e[_0x1910d2(0xca6)],'type':_0x22ab3e[_0x1910d2(0xaee)],'key':_0x22ab3e[_0x1910d2(0x9dd)],'action':_0x22ab3e[_0x1910d2(0x942)],'version':_0x22ab3e['version'],'timestamp':_0x22ab3e[_0x1910d2(0xdfe)],'newValue':_0x2f7044,'oldValue':_0x42a88f,'txnId':_0x22ab3e['txnId']};this['processor'][_0x1910d2(0x274)](_0x54c7c6),this[_0x1910d2(0xd1b)](),this['db'][_0x1910d2(0x1cd)][_0x1910d2(0x7db)](()=>{const _0x360588=_0x1910d2;this['processor'][_0x360588(0x6e2)](_0x54c7c6),this['events'][_0x360588(0xf5d)](_0x39e332(_0x22ab3e),_0x54c7c6),this[_0x360588(0x745)]&&(this['events']['emit'](_0x8758ea[_0x360588(0x967)],_0x54c7c6),this[_0x360588(0xea8)][_0x360588(0xf5d)](_0x8758ea[_0x360588(0x967)]+'@'+_0x22ab3e[_0x360588(0xaee)])),this['okdb'][_0x360588(0xafb)]?.[_0x360588(0xf5d)](_0x29e4e0['POKE'],_0x22ab3e[_0x360588(0xaee)]);});}[_0x52c6ca(0x9ca)](_0x6eeaf7){const _0x441e6e=_0x52c6ca;if(!this[_0x441e6e(0x1145)][_0x441e6e(0x9d0)](_0x6eeaf7)){if(!this[_0x441e6e(0xce1)][_0x441e6e(0x779)](_0x6eeaf7))throw new _0x5cf835(_0x6eeaf7);this[_0x441e6e(0x37c)](_0x6eeaf7);}return this['typeSubDbs'][_0x441e6e(0xbeb)](_0x6eeaf7);}[_0x52c6ca(0x123d)](_0x1aa35a){const _0x2e1e54=_0x52c6ca;if(_0x1aa35a===null)return _0x2e1e54(0x11e);if(_0x1aa35a===undefined)return _0x2e1e54(0x4ae);if(Array[_0x2e1e54(0x10f5)](_0x1aa35a))return'array';return typeof _0x1aa35a;}[_0x52c6ca(0x35d)](_0x415503,_0x4fb896){const _0x4ad8cd=_0x52c6ca;if(_0x4fb896===null||typeof _0x4fb896!==_0x4ad8cd(0xb36)||Array[_0x4ad8cd(0x10f5)](_0x4fb896))return;const _0x536140=this[_0x4ad8cd(0x9ca)](_0x415503);let _0x46d213=![];for(const _0x4c226a of Object[_0x4ad8cd(0xa52)](_0x4fb896)){const _0x1d5a26=this[_0x4ad8cd(0x123d)](_0x4fb896[_0x4c226a]);if(!_0x536140['fieldSchema'][_0x4ad8cd(0x9d0)](_0x4c226a))_0x536140[_0x4ad8cd(0x970)][_0x4ad8cd(0x211)](_0x4c226a,new Set([_0x1d5a26])),_0x46d213=!![];else{const _0x17020d=_0x536140[_0x4ad8cd(0x970)][_0x4ad8cd(0xbeb)](_0x4c226a);!_0x17020d[_0x4ad8cd(0x9d0)](_0x1d5a26)&&(_0x17020d['add'](_0x1d5a26),_0x46d213=!![]);}}if(_0x46d213){const _0x2be177={};for(const [_0xbe8aab,_0x3673f1]of _0x536140['fieldSchema'])_0x2be177[_0xbe8aab]=[..._0x3673f1][_0x4ad8cd(0x3f6)]();const _0xf37ec6=this[_0x4ad8cd(0xce1)][_0x4ad8cd(0xbeb)](_0x415503)||{};this[_0x4ad8cd(0xce1)][_0x4ad8cd(0x92c)](_0x415503,{..._0xf37ec6,'fields':_0x2be177});}}[_0x52c6ca(0x37c)](_0x2e8cba){const _0x83231a=_0x52c6ca,_0x4c6c94=this['db']['openDB']('type:'+_0x2e8cba,{'dupSort':![]}),_0xf26be1=this['db'][_0x83231a(0x730)]('type:'+_0x2e8cba+':data',{'dupSort':![],'useVersions':!![],'compression':this[_0x83231a(0x142)]['compression']??this['okdb']['options']['compression']}),_0x213a13=this['db'][_0x83231a(0x730)](_0x83231a(0x124a)+_0x2e8cba+_0x83231a(0x88b),{'dupSort':![]}),_0x12b141=this['db'][_0x83231a(0x730)](_0x83231a(0x124a)+_0x2e8cba+_0x83231a(0x5b4),{'dupSort':![]}),_0x459e5b=this['db']['openDB'](_0x83231a(0x124a)+_0x2e8cba+_0x83231a(0x86f),{'dupSort':![]}),_0x492e8f=this[_0x83231a(0xce1)][_0x83231a(0xbeb)](_0x2e8cba)||{},_0x5bdd93=_0x492e8f[_0x83231a(0x461)]||{},_0x589b04=new Map();for(const [_0x2aa18e,_0x75c456]of Object[_0x83231a(0x1129)](_0x5bdd93)){_0x589b04[_0x83231a(0x211)](_0x2aa18e,new Set(Array[_0x83231a(0x10f5)](_0x75c456)?_0x75c456:[_0x75c456]));}const _0x3596d6={'root':_0x4c6c94,'data':_0xf26be1,'indexes':_0x213a13,'clockToChange':_0x12b141,'keyToChange':_0x459e5b,'fieldSchema':_0x589b04,'indexToDb':new Map(),'ftsToDb':null,'schema':_0x492e8f['schema']||null,'defaultTTL':_0x492e8f[_0x83231a(0x112c)]||null};this['typeSubDbs'][_0x83231a(0x211)](_0x2e8cba,_0x3596d6);for(const _0x2976b5 of _0x213a13[_0x83231a(0x40e)]()){const _0x492fe1=_0x2976b5['split']('~'),_0x35cb45=_0x213a13['get'](_0x2976b5)||{},_0x58055e=_0x213a13[_0x83231a(0x730)]('type:'+_0x2e8cba+':index:'+_0x2976b5,{'dupSort':!![],'keyEncoding':_0x83231a(0x24a),'valueEncoding':_0x83231a(0x24a)}),_0xfb27b={'parts':_0x492fe1,'db':_0x58055e};if(_0x35cb45[_0x83231a(0x19f)])_0xfb27b[_0x83231a(0x19f)]=_0x35cb45['geoConfig'];if(_0x35cb45[_0x83231a(0x774)])_0xfb27b[_0x83231a(0x774)]=!![];if(_0x35cb45[_0x83231a(0x1f4)])_0xfb27b[_0x83231a(0x1f4)]=_0x35cb45[_0x83231a(0x1f4)];_0xfb27b[_0x83231a(0xe85)]=new Set((_0x35cb45[_0x83231a(0xe85)]??[])[_0x83231a(0x1166)](_0x39bfbb=>_0x39bfbb[_0x83231a(0x31e)]+':'+_0x39bfbb[_0x83231a(0x1173)])),_0x3596d6[_0x83231a(0xf7b)]['set'](_0x2976b5,_0xfb27b);}_0x492e8f[_0x83231a(0xf1c)]&&Object[_0x83231a(0xa52)](_0x492e8f[_0x83231a(0xf1c)])[_0x83231a(0x156)]>0x0&&this[_0x83231a(0xd4f)][_0x83231a(0xfca)][_0x83231a(0x37c)](_0x3596d6,_0x2e8cba,this);}[_0x52c6ca(0x924)](_0x2336a9,_0x330c7d=Date[_0x52c6ca(0x555)](),_0x13112e){const _0x2d6558=_0x52c6ca;if(this[_0x2d6558(0xce1)]&&this['typesDb']['doesExist'](_0x2336a9))throw new Error(_0x2d6558(0x2d6)+_0x2336a9+_0x2d6558(0x63d));this[_0x2d6558(0xce1)][_0x2d6558(0x92c)](_0x2336a9,{}),this[_0x2d6558(0x37c)](_0x2336a9),this['_logChange']({'id':_0x2d6558(0x124a)+_0x2336a9,'type':_0x2336a9,'action':_0x510008[_0x2d6558(0xaa4)],'timestamp':_0x330c7d,'origin':_0x13112e});}async[_0x52c6ca(0xa39)](_0x28d76f,_0x234d9b=Date[_0x52c6ca(0x555)]()){const _0x369205=_0x52c6ca;this[_0x369205(0xf13)](),await this['db']['transaction'](()=>{const _0xf0236d=_0x369205;if(!_0x28d76f[_0xf0236d(0x8ba)]('~')&&this[_0xf0236d(0xd4f)]?.[_0xf0236d(0x3a3)]){const _0x5035b3=[...this[_0xf0236d(0xce1)][_0xf0236d(0x40e)]()][_0xf0236d(0x1103)](_0x4537bc=>!_0x4537bc['startsWith']('~'))[_0xf0236d(0x156)];this['okdb']['_license'][_0xf0236d(0x8b0)](_0xf0236d(0x486),_0x5035b3);}this['_registerType'](_0x28d76f,_0x234d9b);});}async[_0x52c6ca(0x49a)](_0x262df7,{timestamp:timestamp=Date[_0x52c6ca(0x555)](),indexes:indexes=[]}={}){const _0xfc732d=_0x52c6ca;if(!this[_0xfc732d(0x7c0)](_0x262df7))await this[_0xfc732d(0xa39)](_0x262df7,timestamp);for(const _0xe77a4e of indexes){if(_0xe77a4e&&typeof _0xe77a4e===_0xfc732d(0xb36)&&!Array[_0xfc732d(0x10f5)](_0xe77a4e)){const _0x47e8f8=_0xe77a4e[_0xfc732d(0x461)];if(!this[_0xfc732d(0x56c)](_0x262df7,_0x47e8f8)){const _0x5e179c={};if(_0xe77a4e[_0xfc732d(0xaee)])_0x5e179c[_0xfc732d(0xaee)]=_0xe77a4e[_0xfc732d(0xaee)];if(_0xe77a4e[_0xfc732d(0x105e)])_0x5e179c['precision']=_0xe77a4e[_0xfc732d(0x105e)];if(_0xe77a4e[_0xfc732d(0x774)])_0x5e179c[_0xfc732d(0x774)]=_0xe77a4e[_0xfc732d(0x774)];await this['registerIndex'](_0x262df7,_0x47e8f8,_0x5e179c);}}else{if(!this['hasIndex'](_0x262df7,_0xe77a4e))await this[_0xfc732d(0x11ee)](_0x262df7,_0xe77a4e,timestamp);}}}[_0x52c6ca(0x7c0)](_0x19ea58){const _0x151d20=_0x52c6ca;this['_assertOpen']();const _0x2becb6=this[_0x151d20(0xce1)][_0x151d20(0x779)](_0x19ea58);return this[_0x151d20(0xc57)]['afterOp'](this),_0x2becb6;}['_dropType'](_0x102082,_0x59c596=Date['now'](),_0x41f303){const _0x2d7268=_0x52c6ca,_0x41c3cf=this[_0x2d7268(0x9ca)](_0x102082);this[_0x2d7268(0xf6)](_0x102082);const _0x57ec70=_0x414eac['getTypeRefs'](this,_0x102082);if(_0x57ec70[_0x2d7268(0x156)]>0x0){const _0x615026=_0x414eac['getRefIndexDb'](this);for(const {key:_0x8bda4c,value:_0x2b04db}of _0x41c3cf[_0x2d7268(0xc88)]['getRange']()){for(const _0x173918 of _0x57ec70){const _0x2cc32f=_0x414eac[_0x2d7268(0xef7)](_0x2b04db,_0x173918[_0x2d7268(0x147)]);_0x2cc32f!=null&&_0x2cc32f!==undefined&&_0x615026[_0x2d7268(0x21e)](_0x414eac[_0x2d7268(0xb0d)](_0x173918[_0x2d7268(0x11c8)],_0x2cc32f,_0x102082,_0x8bda4c,_0x173918[_0x2d7268(0x147)]));}}_0x414eac[_0x2d7268(0x313)](this,_0x102082);}const _0x4c483d=_0x414eac['getIncomingRefs'](this,_0x102082);if(_0x4c483d[_0x2d7268(0x156)]>0x0){const _0x5c7ba9=_0x414eac[_0x2d7268(0x855)](this),_0x2b89e2=_0x102082+'@',_0x27eb50=[];for(const {key:_0x24b0ab}of _0x5c7ba9[_0x2d7268(0x9ce)]({'start':_0x2b89e2,'end':_0x2b89e2+''})){_0x27eb50['push'](_0x24b0ab);}for(const _0x3e926c of _0x27eb50)_0x5c7ba9[_0x2d7268(0x21e)](_0x3e926c);}const _0x211d3a=[_0x41c3cf[_0x2d7268(0x11d3)],_0x41c3cf['data'],_0x41c3cf['indexes'],_0x41c3cf[_0x2d7268(0x2de)],_0x41c3cf[_0x2d7268(0x770)],...[..._0x41c3cf['indexToDb'][_0x2d7268(0x231)]()][_0x2d7268(0x1166)](_0xa58379=>_0xa58379['db'])];if(this['_ttlByKey']){const _0x55e30e=_0x102082+'\x09',_0x5e2e16=[];for(const {key:_0x482811,value:_0x3ae439}of this[_0x2d7268(0x99e)][_0x2d7268(0x9ce)]({'start':_0x55e30e,'end':_0x55e30e+''})){_0x5e2e16['push']({'compositeKey':_0x482811,'expiry':_0x3ae439});}for(const {compositeKey:_0x5562b1,expiry:_0x2a3c5f}of _0x5e2e16){this[_0x2d7268(0x99e)][_0x2d7268(0x21e)](_0x5562b1),this[_0x2d7268(0x294)]&&this[_0x2d7268(0x294)][_0x2d7268(0x21e)](_0x2a3c5f,_0x5562b1);}}this[_0x2d7268(0xd4f)][_0x2d7268(0xfca)][_0x2d7268(0x208)](_0x102082,this),this[_0x2d7268(0xce1)][_0x2d7268(0x21e)](_0x102082),this[_0x2d7268(0x1145)]['delete'](_0x102082),this['_logChange']({'id':_0x2d7268(0x124a)+_0x102082,'type':_0x102082,'action':_0x510008[_0x2d7268(0xcaf)],'timestamp':_0x59c596,'origin':_0x41f303}),_0x414eac[_0x2d7268(0x89c)](this),this['db']['committed'][_0x2d7268(0x7db)](()=>{const _0x225092=_0x2d7268;for(const _0x2a10a8 of _0x211d3a){try{_0x2a10a8[_0x225092(0xca4)]();}catch{}}});}async['dropType'](_0x51387a,_0x3bfeea=Date[_0x52c6ca(0x555)]()){const _0x4342b0=_0x52c6ca;this['_assertOpen'](),await this['db'][_0x4342b0(0x683)](()=>{const _0x17f611=_0x4342b0;this[_0x17f611(0x6d6)](_0x51387a,_0x3bfeea);});}async[_0x52c6ca(0xb46)](_0x785d4d,_0x364fb0){const _0x1fab68=_0x52c6ca;this[_0x1fab68(0xf13)](),await _0x1a45f8[_0x1fab68(0x497)](this,_0x785d4d,_0x364fb0);}['getSchema'](_0x272b72){const _0xf68a4a=_0x52c6ca;this[_0xf68a4a(0xf13)]();const _0x440415=this[_0xf68a4a(0x9ca)](_0x272b72),_0x324bd6=_0x440415[_0xf68a4a(0xdce)]||null;return this[_0xf68a4a(0xc57)][_0xf68a4a(0xa79)](this),_0x324bd6;}async[_0x52c6ca(0x10ea)](_0x4756c4){const _0x4c0c7e=_0x52c6ca;this[_0x4c0c7e(0xf13)](),await this['db'][_0x4c0c7e(0x683)](()=>{_0x1a45f8['dropSchema'](this,null,_0x4756c4);});}[_0x52c6ca(0x54f)](_0x4e3908,_0x557e84){const _0x24ef2a=_0x52c6ca;if(_0x557e84===null)return null;const _0x4f347c=_0x557e84[_0x24ef2a(0xfb1)]('.');let _0x2da883=_0x4e3908;for(const _0x545865 of _0x4f347c){if(_0x2da883==null||!(_0x545865 in _0x2da883))return null;_0x2da883=_0x2da883[_0x545865];}return _0x2da883??null;}[_0x52c6ca(0x117e)](_0x138430,_0x9fe79d,_0xc76fe4=Date[_0x52c6ca(0x555)](),_0x239b12,_0x323665={}){const _0x389a4d=_0x52c6ca;if(!Array[_0x389a4d(0x10f5)](_0x9fe79d)||_0x9fe79d[_0x389a4d(0x156)]===0x0)throw new _0x51b540(_0x9fe79d,_0x389a4d(0x1c0));const _0x2c6d99=this[_0x389a4d(0x9ca)](_0x138430),_0x1dda62=_0x9fe79d['join']('~');if(_0x2c6d99[_0x389a4d(0xf7b)][_0x389a4d(0x9d0)](_0x1dda62)){if(_0x323665[_0x389a4d(0x59a)]){this[_0x389a4d(0x793)](_0x138430,_0x1dda62,_0x323665[_0x389a4d(0x59a)]);return;}throw new _0x16dcd6(_0x138430,_0x1dda62);}const _0x2c9688=_0x323665['type']===_0x389a4d(0xf9),_0x28f626=_0x2c9688?{'precision':_0x323665[_0x389a4d(0x105e)]||0x7}:undefined;if(_0x323665['unique']&&_0x2c9688)throw new _0x271948(_0x389a4d(0xed2),_0x389a4d(0x1a4));const _0x405318={'status':_0x13f7fa[_0x389a4d(0x179)]};if(_0x28f626)_0x405318[_0x389a4d(0x19f)]=_0x28f626;if(_0x323665['unique'])_0x405318[_0x389a4d(0x774)]=!![];if(_0x323665['createdBy'])_0x405318[_0x389a4d(0x1f4)]=_0x323665[_0x389a4d(0x1f4)];_0x2c6d99['indexes'][_0x389a4d(0x92c)](_0x1dda62,_0x405318);const _0x28aef1=_0x2c6d99['indexes'][_0x389a4d(0x730)](_0x389a4d(0x124a)+_0x138430+_0x389a4d(0xa34)+_0x1dda62,{'dupSort':!![],'keyEncoding':_0x389a4d(0x24a),'valueEncoding':_0x389a4d(0x24a)}),_0x3782ac={'parts':_0x9fe79d,'db':_0x28aef1};if(_0x28f626)_0x3782ac[_0x389a4d(0x19f)]=_0x28f626;if(_0x323665[_0x389a4d(0x774)])_0x3782ac[_0x389a4d(0x774)]=!![];if(_0x323665[_0x389a4d(0x1f4)])_0x3782ac[_0x389a4d(0x1f4)]=_0x323665[_0x389a4d(0x1f4)];_0x3782ac[_0x389a4d(0xe85)]=new Set(),_0x2c6d99[_0x389a4d(0xf7b)]['set'](_0x1dda62,_0x3782ac),_0x323665[_0x389a4d(0x59a)]&&this[_0x389a4d(0x793)](_0x138430,_0x1dda62,_0x323665['consumer']),this[_0x389a4d(0xee9)]({'id':_0x389a4d(0xff6)+_0x138430+'@'+_0x1dda62,'type':_0x138430,'index':_0x1dda62,'action':_0x510008[_0x389a4d(0xada)],'timestamp':_0xc76fe4,'origin':_0x239b12,'unique':!!_0x323665[_0x389a4d(0x774)]}),_0x2c6d99[_0x389a4d(0xb4f)][_0x389a4d(0x1cd)][_0x389a4d(0x7db)](async()=>{const _0x5e9f97=_0x389a4d;if(!this['_isOpen'])return;await this[_0x5e9f97(0x2c8)](_0x138430,_0x9fe79d);});}async[_0x52c6ca(0x11ee)](_0x26bafd,_0x17d360,_0x53fef2){const _0x290716=_0x52c6ca;this[_0x290716(0xf13)](),_0x17d360=_0x76cf00[_0x290716(0x977)](_0x17d360);const _0x39227b=typeof _0x53fef2===_0x290716(0xb36)&&_0x53fef2!==null?_0x53fef2:{},_0x2ca1fd=typeof _0x53fef2===_0x290716(0x9f0)?_0x53fef2:_0x39227b[_0x290716(0xdfe)]??Date[_0x290716(0x555)]();await this['db'][_0x290716(0x683)](()=>{const _0x22781d=_0x290716;this[_0x22781d(0x117e)](_0x26bafd,_0x17d360,_0x2ca1fd,null,_0x39227b);});}[_0x52c6ca(0x92f)](_0x47b7cd,_0x4c21a8,_0xa36af1=Date[_0x52c6ca(0x555)](),_0x176b0d){const _0x2c8a29=_0x52c6ca,_0x52d010=this[_0x2c8a29(0x9ca)](_0x47b7cd),_0x1bf869=Array['isArray'](_0x4c21a8)?_0x4c21a8['join']('~'):_0x4c21a8,_0x1d8e95=_0x52d010[_0x2c8a29(0xb4f)]['get'](_0x1bf869),_0x4a5b32=_0x1d8e95?.[_0x2c8a29(0xe85)]??[];if(_0x4a5b32[_0x2c8a29(0x156)]>0x0)throw new _0xf85ec3(_0x47b7cd,_0x1bf869,_0x4a5b32);const _0x5be655=_0x52d010[_0x2c8a29(0xf7b)]['get'](_0x1bf869);_0x5be655?.['unique']&&_0x76cf00[_0x2c8a29(0x7d6)](this,_0x47b7cd,_0x1bf869),_0x52d010[_0x2c8a29(0xb4f)][_0x2c8a29(0x21e)](_0x1bf869),this[_0x2c8a29(0xee9)]({'id':_0x2c8a29(0xff6)+_0x47b7cd+'@'+_0x1bf869,'type':_0x47b7cd,'index':_0x1bf869,'action':_0x510008[_0x2c8a29(0xfa9)],'timestamp':_0xa36af1,'origin':_0x176b0d}),this['db'][_0x2c8a29(0x1cd)][_0x2c8a29(0x7db)](()=>{const _0x476c4e=_0x2c8a29;_0x76cf00[_0x476c4e(0xbaf)](_0x52d010['indexToDb'][_0x476c4e(0xbeb)](_0x1bf869)?.['db']),_0x52d010[_0x476c4e(0xf7b)]['delete'](_0x1bf869);});}async[_0x52c6ca(0xfff)](_0x2a8750,_0x4a46cf,_0x396129=Date['now']()){const _0x50c702=_0x52c6ca;this[_0x50c702(0xf13)](),_0x4a46cf=_0x76cf00[_0x50c702(0x977)](_0x4a46cf),await this['db']['transaction'](()=>{const _0x2927e3=_0x50c702;this[_0x2927e3(0x92f)](_0x2a8750,_0x4a46cf,_0x396129);});}[_0x52c6ca(0x56c)](_0xc5d963,_0x37e607){const _0x4b04bb=_0x52c6ca;this[_0x4b04bb(0xf13)](),_0x37e607=_0x76cf00[_0x4b04bb(0x977)](_0x37e607);const _0x593e36=this[_0x4b04bb(0x9ca)](_0xc5d963)[_0x4b04bb(0xf7b)][_0x4b04bb(0x9d0)](_0x37e607['join']('~'));return this['_coordinator'][_0x4b04bb(0xa79)](this),_0x593e36;}[_0x52c6ca(0x2ec)](_0x2631ca,_0x974d53){const _0x461fca=_0x52c6ca;this['_assertOpen'](),_0x974d53=_0x76cf00[_0x461fca(0x977)](_0x974d53);const _0x1b7e91=this[_0x461fca(0x9ca)](_0x2631ca)[_0x461fca(0xb4f)][_0x461fca(0xbeb)](_0x974d53[_0x461fca(0x3d9)]('~'));if(!_0x1b7e91)throw new _0x206246(_0x2631ca,_0x974d53[_0x461fca(0x3d9)]('~'));const _0xaaee53=_0x1b7e91[_0x461fca(0xfcd)];return this[_0x461fca(0xc57)][_0x461fca(0xa79)](this),_0xaaee53;}['_indexReadyPromises']=new Map();['_resetInProgress']=new Set();async[_0x52c6ca(0x959)](_0x29cc64,_0x4337d5){const _0xa052fd=_0x52c6ca;this[_0xa052fd(0xf13)](),_0x4337d5=_0x76cf00[_0xa052fd(0x977)](_0x4337d5);const _0x30f266=_0x4337d5[_0xa052fd(0x3d9)]('~'),_0x3a89a1=_0x29cc64+'@'+_0x30f266;if(this[_0xa052fd(0x101)][_0xa052fd(0x9d0)](_0x3a89a1))return this['_indexReadyPromises'][_0xa052fd(0xbeb)](_0x3a89a1)[_0xa052fd(0xbfa)];if(this[_0xa052fd(0x2ec)](_0x29cc64,_0x4337d5)===_0x13f7fa[_0xa052fd(0x1b5)])return!![];const _0xe16ddc={};return _0xe16ddc[_0xa052fd(0xbfa)]=new Promise(_0x4899a5=>{const _0x1dce84=_0xa052fd;_0xe16ddc[_0x1dce84(0x797)]=_0x4899a5;}),this[_0xa052fd(0x101)][_0xa052fd(0x211)](_0x3a89a1,_0xe16ddc),_0xe16ddc[_0xa052fd(0xbfa)];}[_0x52c6ca(0xb1c)](_0x314376,_0x138132){const _0x5c94a5=_0x52c6ca,_0x5da403=_0x314376+'@'+_0x138132[_0x5c94a5(0x3d9)]('~'),_0x24908d=this[_0x5c94a5(0x101)][_0x5c94a5(0xbeb)](_0x5da403);_0x24908d&&(_0x24908d[_0x5c94a5(0x797)](!![]),this['_indexReadyPromises']['delete'](_0x5da403));}async['resetIndex'](_0x49d2b8,_0x8819e8,_0x367ff4=!![]){const _0xa28dde=_0x52c6ca;if(!this[_0xa28dde(0xe56)])return;this[_0xa28dde(0xf13)](),_0x8819e8=_0x76cf00[_0xa28dde(0x977)](_0x8819e8);const _0x2fc9b6=_0x8819e8[_0xa28dde(0x3d9)]('~'),_0x35a6a6=_0x49d2b8+'@'+_0x2fc9b6;if(this[_0xa28dde(0x576)][_0xa28dde(0x9d0)](_0x35a6a6))return this['indexReady'](_0x49d2b8,_0x8819e8);if(!this['hasType'](_0x49d2b8))return;this[_0xa28dde(0x576)]['add'](_0x35a6a6);try{const _0x5db2db=this[_0xa28dde(0x9ca)](_0x49d2b8),_0x5be266=_0x5db2db[_0xa28dde(0xf7b)]['get'](_0x2fc9b6);if(!_0x5be266)throw new _0x206246(_0x49d2b8,_0x2fc9b6);const _0x3ee035=_0x5be266['db'];let _0x462da4=_0x5db2db[_0xa28dde(0xb4f)][_0xa28dde(0xbeb)](_0x2fc9b6);try{await _0x5db2db['root']['transaction'](async()=>{const _0x452abf=_0xa28dde;if(_0x367ff4)_0x3ee035['clearSync']();_0x5db2db[_0x452abf(0xb4f)]['put'](_0x2fc9b6,{..._0x462da4,'status':_0x13f7fa[_0x452abf(0xabc)]});});}catch(_0x21286a){if(!this['hasType'](_0x49d2b8))return;throw _0x21286a;}if(!this[_0xa28dde(0xe56)])return;this['events']['emit'](_0x8758ea[_0xa28dde(0xbdc)],{'type':_0x49d2b8,'index':_0x8819e8});const _0x2e96d1=_0x5db2db[_0xa28dde(0xc88)][_0xa28dde(0x9ce)]({'snapshot':!![]}),_0x32d27c=this['getCount'](_0x49d2b8);let _0x4b3e3f=0x0;const _0x5a97ba=0x2710;let _0x1a3d5b=[];for(const {key:_0x408072,value:_0x5328bc,version:_0x56c0ab}of _0x2e96d1){_0x1a3d5b['push']({'key':_0x408072,'value':_0x5328bc,'version':_0x56c0ab});if(_0x1a3d5b[_0xa28dde(0x156)]>=_0x5a97ba){if(!this['_isOpen'])return;await _0x76cf00['batchUpdateIndex'](this,_0x49d2b8,_0x8819e8,_0x1a3d5b),_0x4b3e3f+=_0x1a3d5b[_0xa28dde(0x156)],this[_0xa28dde(0xea8)][_0xa28dde(0xf5d)](_0x8758ea['INDEX_PROGRESS'],_0x49d2b8,_0x8819e8,_0x4b3e3f,_0x32d27c),_0x1a3d5b=[];}}if(_0x1a3d5b[_0xa28dde(0x156)]>0x0){if(!this[_0xa28dde(0xe56)])return;await _0x76cf00[_0xa28dde(0xe8b)](this,_0x49d2b8,_0x8819e8,_0x1a3d5b);}if(!this[_0xa28dde(0xe56)])return;_0x462da4=_0x5db2db[_0xa28dde(0xb4f)][_0xa28dde(0xbeb)](_0x2fc9b6),await _0x5db2db[_0xa28dde(0xb4f)][_0xa28dde(0x92c)](_0x2fc9b6,{..._0x462da4,'status':_0x13f7fa[_0xa28dde(0x1b5)]});if(_0x5be266[_0xa28dde(0x774)]){if(!this[_0xa28dde(0xe56)])return;await _0x76cf00[_0xa28dde(0xe90)](this,_0x49d2b8,_0x5be266);}this[_0xa28dde(0xb1c)](_0x49d2b8,_0x8819e8),this[_0xa28dde(0xea8)][_0xa28dde(0xf5d)](_0x8758ea[_0xa28dde(0x11b3)],{'type':_0x49d2b8,'index':_0x8819e8});}catch(_0x521441){if(!this['_isOpen'])return;throw _0x521441;}finally{this[_0xa28dde(0x576)][_0xa28dde(0x3b3)](_0x35a6a6);}}[_0x52c6ca(0x6c8)](_0x4e18a4){const _0x9c2e01=typeof _0x4e18a4;if(_0x9c2e01==='string'||_0x9c2e01==='number')return;throw new _0x461744(_0x4e18a4);}[_0x52c6ca(0x34b)](_0x305629,_0xdb8736,_0x204540,_0x58f0c5,_0x5d3122,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x52c6ca(0x555)](),origin:origin=null,_cascading:_cascading=![],ttl:ttl=null}={}){const _0x5edcbc=_0x52c6ca;if(_0x5d3122===undefined)throw new _0x34ee2a(_0x5edcbc(0x327));this['_validatePrimaryKey'](_0x58f0c5);const _0x10f2b1=this[_0x5edcbc(0x9ca)](_0x204540),_0x44a165=_0x10f2b1[_0x5edcbc(0xc88)],_0x285c90=_0x44a165[_0x5edcbc(0xa57)](_0x58f0c5);if(_0xdb8736===_0x5edcbc(0x725)&&_0x285c90)throw new _0x1e3c9e(_0x204540,_0x58f0c5);if(_0xdb8736===_0x5edcbc(0xbb7)&&!_0x285c90)throw new _0x2a41e6(_0x204540,_0x58f0c5);if(ifVersion&&_0x285c90?.[_0x5edcbc(0x45c)]!==ifVersion)throw new _0x3c3f09(_0x204540,_0x58f0c5,ifVersion,_0x285c90?.[_0x5edcbc(0x45c)]);origin===null&&_0x76cf00[_0x5edcbc(0x94a)](this,_0x204540,_0x58f0c5,_0x5d3122,_0x285c90?.[_0x5edcbc(0x568)]);if(!_0x204540[_0x5edcbc(0x8ba)]('~')){const _0x5a31f2=this[_0x5edcbc(0x7dd)](_0x204540);if(_0x5a31f2){const {valid:_0x47430b,errors:_0x92ea31}=_0x5269e9(_0x5d3122,_0x5a31f2[_0x5edcbc(0x83a)]);if(!_0x47430b){if(_0x5a31f2[_0x5edcbc(0xcf0)]&&origin===null&&!_cascading)throw new _0xbaf508(_0x204540,_0x58f0c5,_0x92ea31);_0x1a45f8[_0x5edcbc(0x11e2)](this,null,_0x204540,_0x58f0c5,_0x92ea31,{'timestamp':timestamp,'origin':origin});}else _0x1a45f8[_0x5edcbc(0x7a1)](this,null,_0x204540,_0x58f0c5,{'timestamp':timestamp,'origin':origin});}const _0x6d4bb8=_0x414eac['getTypeRefs'](this,_0x204540),_0x1535a0=_0x414eac[_0x5edcbc(0x1123)](this,_0x204540,_0x58f0c5,_0x5d3122);if(_0x1535a0[_0x5edcbc(0x156)]>0x0){const _0x1dcae4=this[_0x5edcbc(0x7dd)](_0x204540),_0x36b176=_0x1dcae4?.[_0x5edcbc(0xcf0)]??![];if(_0x36b176&&origin===null&&!_cascading){const _0x1de5e1=_0x1535a0[0x0];throw new _0x75b8f2(_0x204540,_0x58f0c5,_0x1de5e1[_0x5edcbc(0x147)],_0x1de5e1[_0x5edcbc(0x11c8)],_0x1de5e1[_0x5edcbc(0x603)]);}const _0x2815d7=new Set(_0x1535a0[_0x5edcbc(0x1166)](_0x2bd5e7=>_0x2bd5e7[_0x5edcbc(0x147)]));for(const _0x352a32 of _0x1535a0){_0x414eac['setRefViolation'](this,null,_0x204540,_0x58f0c5,_0x352a32[_0x5edcbc(0x147)],_0x352a32['targetType'],_0x352a32[_0x5edcbc(0x603)],{'timestamp':timestamp,'origin':origin});}for(const _0x20016c of _0x6d4bb8){!_0x2815d7['has'](_0x20016c[_0x5edcbc(0x147)])&&_0x414eac[_0x5edcbc(0x11d2)](this,null,_0x204540,_0x58f0c5,_0x20016c['fieldPath'],{'timestamp':timestamp,'origin':origin});}}else _0x414eac[_0x5edcbc(0x272)](this,null,_0x204540,_0x58f0c5,{'timestamp':timestamp,'origin':origin});}const _0x56427f=version??(_0x285c90?_0x285c90[_0x5edcbc(0x45c)]+0x1:0x1);_0x44a165[_0x5edcbc(0x92c)](_0x58f0c5,_0x5d3122,_0x56427f),_0x76cf00[_0x5edcbc(0x106a)](this,_0x204540,_0x58f0c5,_0x5d3122,_0x285c90?.[_0x5edcbc(0x568)],origin,timestamp),this[_0x5edcbc(0x35d)](_0x204540,_0x5d3122);!_0x204540['startsWith']('~')&&_0x414eac[_0x5edcbc(0xc42)](this,_0x204540,_0x58f0c5,_0x5d3122,_0x285c90?.[_0x5edcbc(0x568)]);this['_logChange']({'id':_0x5edcbc(0xfe3)+_0x204540+'@'+_0x58f0c5,'type':_0x204540,'key':_0x58f0c5,'action':_0x510008[_0x5edcbc(0x719)],'timestamp':timestamp,'txnId':_0x305629?.['id'],'origin':origin},_0x285c90?.[_0x5edcbc(0x568)],_0x5d3122);const _0x45fa04=typeof ttl===_0x5edcbc(0x9f0)&&ttl>0x0?ttl:!_0x285c90&&_0x10f2b1['defaultTTL']?_0x10f2b1['defaultTTL']:null;if(_0x45fa04){this[_0x5edcbc(0xd60)]();const _0x1386a6=Date[_0x5edcbc(0x555)]()+_0x45fa04;this['_setTTLEntry'](_0x204540,_0x58f0c5,_0x1386a6);if(!this[_0x5edcbc(0x1191)]||_0x1386a6<this[_0x5edcbc(0x1191)])this[_0x5edcbc(0x1191)]=_0x1386a6;this['_logTTLChange'](_0x204540,_0x58f0c5,_0x1386a6,'set');}}[_0x52c6ca(0xccd)](_0x34acc1,_0x1498fa,_0x331dbf,_0x13e65d,_0x21df38){const _0x2ede89=_0x52c6ca;return this[_0x2ede89(0x34b)](_0x34acc1,_0x2ede89(0x92c),_0x1498fa,_0x331dbf,_0x13e65d,_0x21df38);}['_update'](_0x323199,_0x267cb7,_0x501e5f,_0xfd624c,_0x4865fd){const _0x33deac=_0x52c6ca;return this['_write'](_0x323199,_0x33deac(0xbb7),_0x267cb7,_0x501e5f,_0xfd624c,_0x4865fd);}[_0x52c6ca(0x15e)](_0x5f4185,_0x136787,_0x1a4949,_0x5ce75e,_0x112860){const _0x56d105=_0x52c6ca;return this[_0x56d105(0x34b)](_0x5f4185,'create',_0x136787,_0x1a4949,_0x5ce75e,_0x112860);}[_0x52c6ca(0x479)](_0x43703f,_0x6c78f9,_0x51493e,_0x400310,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x52c6ca(0x555)](),origin:origin=null,ttl:ttl=null}={}){const _0x2c2611=_0x52c6ca;this[_0x2c2611(0x6c8)](_0x51493e);const _0x3f8bcb=this['_getType'](_0x6c78f9)[_0x2c2611(0xc88)],_0x254a53=_0x3f8bcb[_0x2c2611(0xa57)](_0x51493e);if(!_0x254a53)throw new _0x2a41e6(_0x6c78f9,_0x51493e);if(ifVersion&&ifVersion!==_0x254a53[_0x2c2611(0x45c)])throw new _0x3c3f09(_0x6c78f9,_0x51493e,ifVersion,_0x254a53['version']);const _0x1f4810=_0x2632d6['applyPatch'](_0x254a53[_0x2c2611(0x568)],_0x400310);return this[_0x2c2611(0x34b)](_0x43703f,_0x2c2611(0xbb7),_0x6c78f9,_0x51493e,_0x1f4810,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl});}[_0x52c6ca(0xfa0)](_0x1ed16a,_0x569c47,_0x577aab,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x52c6ca(0x555)](),origin:origin=null,_cascadeVisited:_cascadeVisited=null}={}){const _0x151d23=_0x52c6ca;this['_validatePrimaryKey'](_0x577aab);const _0x282dc0=this[_0x151d23(0x9ca)](_0x569c47)[_0x151d23(0xc88)],_0x365b5f=_0x282dc0['getEntry'](_0x577aab);if(!_0x365b5f)throw new _0x2a41e6(_0x569c47,_0x577aab);if(ifVersion&&ifVersion!==_0x365b5f[_0x151d23(0x45c)])throw new _0x3c3f09(_0x569c47,_0x577aab,ifVersion,_0x365b5f[_0x151d23(0x45c)]);if(!_0x569c47[_0x151d23(0x8ba)]('~')){const _0x2b306f=_0x569c47+'@'+_0x577aab;if(!_cascadeVisited)_cascadeVisited=new Set();if(_cascadeVisited[_0x151d23(0x9d0)](_0x2b306f))return;_cascadeVisited[_0x151d23(0x33c)](_0x2b306f),_0x414eac[_0x151d23(0x44d)](this,_0x1ed16a,_0x569c47,_0x577aab,_0x365b5f[_0x151d23(0x568)],{'timestamp':timestamp,'origin':origin,'_cascadeVisited':_cascadeVisited}),_0x414eac[_0x151d23(0x11a6)](this,_0x569c47,_0x577aab,_0x365b5f[_0x151d23(0x568)]);}_0x282dc0['remove'](_0x577aab),_0x76cf00['updateItemIndexes'](this,_0x569c47,_0x577aab,undefined,_0x365b5f[_0x151d23(0x568)],origin,timestamp),!_0x569c47[_0x151d23(0x8ba)]('~')&&(_0x1a45f8[_0x151d23(0x7a1)](this,null,_0x569c47,_0x577aab,{'timestamp':timestamp,'origin':origin}),_0x414eac[_0x151d23(0x272)](this,null,_0x569c47,_0x577aab,{'timestamp':timestamp,'origin':origin})),this[_0x151d23(0x2e5)](_0x569c47,_0x577aab),this[_0x151d23(0xee9)]({'id':'item:'+_0x569c47+'@'+_0x577aab,'type':_0x569c47,'key':_0x577aab,'action':_0x510008[_0x151d23(0x1b8)],'timestamp':timestamp,'txnId':_0x1ed16a?.['id'],'origin':origin},_0x365b5f[_0x151d23(0x568)],undefined);}async[_0x52c6ca(0x92c)](_0x37c0df,_0x566f0b,_0x30056a,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x52c6ca(0x555)](),origin:origin=null,ttl:ttl=null}={}){const _0x5dbbfd=_0x52c6ca;this['_assertOpen'](),await this['_coordinator']['beforeWrite']();try{let _0x44efc8=null,_0x1ccc85=0x0;!this[_0x5dbbfd(0x1173)]['startsWith']('~')&&this[_0x5dbbfd(0xd4f)]?.[_0x5dbbfd(0x3a3)]&&(_0x44efc8=this['okdb']['_systemEnv']?.['db']??null,_0x1ccc85=_0x44efc8?_0x44efc8[_0x5dbbfd(0xbeb)]('__writeCounter')??0x0:0x0,this[_0x5dbbfd(0xd4f)][_0x5dbbfd(0x3a3)][_0x5dbbfd(0x8b0)]('maxWrites',_0x1ccc85));const _0x23b548=this[_0x5dbbfd(0x683)]();_0x23b548[_0x5dbbfd(0x92c)](_0x37c0df,_0x566f0b,_0x30056a,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl});const _0x7f4000=await _0x23b548[_0x5dbbfd(0xa78)]();if(_0x44efc8)_0x44efc8[_0x5dbbfd(0xb6f)](_0x5dbbfd(0x4ac),_0x1ccc85+0x1);return this[_0x5dbbfd(0xc57)][_0x5dbbfd(0xa79)](this),_0x7f4000;}finally{this[_0x5dbbfd(0xc57)][_0x5dbbfd(0xbb2)]();}}async[_0x52c6ca(0xbb7)](_0x39e5db,_0x532a21,_0x56ea5a,{ifVersion:ifVersion=null,timestamp:timestamp=Date['now'](),origin:origin=null,ttl:ttl=null}={}){const _0x4ba694=_0x52c6ca;this[_0x4ba694(0xf13)](),await this[_0x4ba694(0xc57)][_0x4ba694(0x162)]();try{const _0x33e07=this[_0x4ba694(0x683)]();_0x33e07[_0x4ba694(0xbb7)](_0x39e5db,_0x532a21,_0x56ea5a,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl});const _0x404037=await _0x33e07['commit']();return this[_0x4ba694(0xc57)]['afterOp'](this),_0x404037;}finally{this['_coordinator'][_0x4ba694(0xbb2)]();}}async['patch'](_0x5b2f5d,_0xc0c074,_0x5f1e65,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x52c6ca(0x555)](),origin:origin=null,ttl:ttl=null}={}){const _0x58f200=_0x52c6ca;this[_0x58f200(0xf13)](),await this[_0x58f200(0xc57)][_0x58f200(0x162)]();try{const _0x374f43=this['transaction']();_0x374f43[_0x58f200(0xba7)](_0x5b2f5d,_0xc0c074,_0x5f1e65,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl});const _0x305076=await _0x374f43['commit']();return this[_0x58f200(0xc57)][_0x58f200(0xa79)](this),_0x305076;}finally{this['_coordinator']['afterWrite']();}}async[_0x52c6ca(0x725)](_0x13e383,_0xa26e3e,_0x597191,{timestamp:timestamp=Date[_0x52c6ca(0x555)](),origin:origin=null,ttl:ttl=null}={}){const _0x1e3f8e=_0x52c6ca;this[_0x1e3f8e(0xf13)](),await this[_0x1e3f8e(0xc57)][_0x1e3f8e(0x162)]();try{const _0x53d040=this['transaction']();_0x53d040[_0x1e3f8e(0x725)](_0x13e383,_0xa26e3e,_0x597191,{'timestamp':timestamp,'origin':origin,'ttl':ttl});const _0x26c8f7=await _0x53d040[_0x1e3f8e(0xa78)]();return this[_0x1e3f8e(0xc57)][_0x1e3f8e(0xa79)](this),_0x26c8f7;}finally{this[_0x1e3f8e(0xc57)][_0x1e3f8e(0xbb2)]();}}async[_0x52c6ca(0x21e)](_0x5379fc,_0x5205b3,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x52c6ca(0x555)](),origin:origin=null}={}){const _0x45ebb7=_0x52c6ca;this[_0x45ebb7(0xf13)](),await this[_0x45ebb7(0xc57)][_0x45ebb7(0x162)]();try{const _0x552f81=this[_0x45ebb7(0x683)]();_0x552f81['remove'](_0x5379fc,_0x5205b3,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin});const _0x1ce210=await _0x552f81[_0x45ebb7(0xa78)]();return this[_0x45ebb7(0xc57)][_0x45ebb7(0xa79)](this),_0x1ce210;}finally{this[_0x45ebb7(0xc57)][_0x45ebb7(0xbb2)]();}}[_0x52c6ca(0xbeb)](_0x36b79b,_0x1d93e1,_0x730e6d){const _0x46316a=_0x52c6ca;this['_assertOpen']();const _0x2b9fa6=this['_getType'](_0x36b79b)['data'][_0x46316a(0xbeb)](_0x1d93e1,_0x730e6d);return this[_0x46316a(0xc57)][_0x46316a(0xa79)](this),_0x2b9fa6;}['getMany'](_0x34e8a0,_0x5339c9,_0x364c83){const _0xa71c2d=_0x52c6ca;this[_0xa71c2d(0xf13)]();const _0x3be219=_0x5339c9[_0xa71c2d(0x1166)](_0x294798=>this[_0xa71c2d(0x9ca)](_0x34e8a0)[_0xa71c2d(0xc88)][_0xa71c2d(0xbeb)](_0x294798,_0x364c83));return this[_0xa71c2d(0xc57)]['afterOp'](this),_0x3be219;}[_0x52c6ca(0xa57)](_0x45b812,_0x54a237,_0x7e28b6){const _0x5b5ab6=_0x52c6ca;this['_assertOpen']();const _0x2b3e85=this[_0x5b5ab6(0x9ca)](_0x45b812)['data'][_0x5b5ab6(0xa57)](_0x54a237,_0x7e28b6);return this[_0x5b5ab6(0xc57)]['afterOp'](this),_0x2b3e85;}[_0x52c6ca(0x9ce)](_0x40ac07,_0x57b83e){const _0xecb2b3=_0x52c6ca;this['_assertOpen']();const _0x3ae20f=this[_0xecb2b3(0x9ca)](_0x40ac07)['data'][_0xecb2b3(0x9ce)](_0x57b83e);return this[_0xecb2b3(0xc57)][_0xecb2b3(0xa79)](this),_0x3ae20f;}['getValues'](_0x34c984,_0x5a77b5){const _0x10cbd6=_0x52c6ca;this['_assertOpen']();const _0xa85544=this['getRange'](_0x34c984,_0x5a77b5)['map'](_0x565eb9=>_0x565eb9[_0x10cbd6(0x568)]);return this['_coordinator']['afterOp'](this),_0xa85544;}[_0x52c6ca(0x40e)](_0x1d7702,_0x710a8a){const _0x544a85=_0x52c6ca;this[_0x544a85(0xf13)]();const _0x5940be=this[_0x544a85(0x9ca)](_0x1d7702)[_0x544a85(0xc88)]['getKeys'](_0x710a8a);return this[_0x544a85(0xc57)]['afterOp'](this),_0x5940be;}[_0x52c6ca(0x7df)](_0x594348,_0x4c7d22){const _0x123482=_0x52c6ca;this[_0x123482(0xf13)]();const _0x24d0b0=this['_getType'](_0x594348)[_0x123482(0xc88)]['getCount'](_0x4c7d22);return this['_coordinator'][_0x123482(0xa79)](this),_0x24d0b0;}[_0x52c6ca(0xf2f)](_0x282935,_0x324e82,_0x251a6b={}){const _0x3b64ab=_0x52c6ca;return this[_0x3b64ab(0xf13)](),this[_0x3b64ab(0x9ce)](_0x282935,{'start':_0x324e82,'end':_0x324e82+'',..._0x251a6b});}[_0x52c6ca(0xab)](_0x829a2a,_0x2503c4,_0xa99bcc){const _0x5afea4=_0x52c6ca;this['_assertOpen']();if(!Array[_0x5afea4(0x10f5)](_0x2503c4)||_0x2503c4[_0x5afea4(0x156)]===0x0)throw new _0x51b540(_0x2503c4,_0x5afea4(0x1c0));const _0x32fdbc=_0x2503c4['join']('~'),_0x4466e1=this[_0x5afea4(0x9ca)](_0x829a2a)['indexToDb'][_0x5afea4(0xbeb)](_0x32fdbc);if(!_0x4466e1)throw new _0x206246(_0x829a2a,_0x32fdbc);const _0x198dd9=[];for(const _0x46e8d0 of _0x4466e1['db'][_0x5afea4(0x9ce)](_0xa99bcc))_0x198dd9[_0x5afea4(0x597)](_0x46e8d0[_0x5afea4(0x568)]);return this[_0x5afea4(0xc57)][_0x5afea4(0xa79)](this),_0x198dd9;}[_0x52c6ca(0x22e)](_0x1fc9ab,_0x3913ab,_0x7985db){const _0x28aa8b=_0x52c6ca;this[_0x28aa8b(0xf13)](),_0x3913ab=_0x76cf00[_0x28aa8b(0x977)](_0x3913ab),_0x7985db={'reverse':![],..._0x7985db};const _0x34d951=this[_0x28aa8b(0x9ca)](_0x1fc9ab),_0x1b5b58=_0x3913ab[_0x28aa8b(0x3d9)]('~'),_0x3990d4=_0x34d951[_0x28aa8b(0xf7b)][_0x28aa8b(0xbeb)](_0x1b5b58);if(!_0x3990d4)throw new _0x206246(_0x1fc9ab,_0x1b5b58);const _0x39fdfb=!!_0x7985db[_0x28aa8b(0xc68)],_0x19aa09=_0x3990d4[_0x28aa8b(0x774)]&&!_0x39fdfb?this['_getViolationsDb']():null,_0x2bed3f=_0x3990d4['db'][_0x28aa8b(0x9ce)](_0x7985db)[_0x28aa8b(0x1166)](_0x396e69=>{const _0x3ffd38=_0x28aa8b,_0x1b2b5d=_0x396e69['value'],_0xa40f85=_0x34d951[_0x3ffd38(0xc88)][_0x3ffd38(0xa57)](_0x1b2b5d);if(!_0xa40f85)return _0x3a424d[_0x3ffd38(0xbd9)];if(_0x19aa09){const _0x555728=_0x396e69[_0x3ffd38(0x9dd)][_0x3ffd38(0xc3c)](0x0,-0x1),_0x396e8b=_0x1fc9ab+'@'+_0x1b5b58+'@'+JSON[_0x3ffd38(0xf75)](_0x555728),_0x4b1258=_0x19aa09[_0x3ffd38(0xbeb)](_0x396e8b);if(_0x4b1258&&_0x4b1258['winner']!==_0x1b2b5d)return _0x3a424d[_0x3ffd38(0xbd9)];}return{'key':_0x1b2b5d,'value':_0xa40f85[_0x3ffd38(0x568)],'version':_0xa40f85[_0x3ffd38(0x45c)],'indexKey':_0x396e69[_0x3ffd38(0x9dd)],'indexVersion':_0x396e69[_0x3ffd38(0x45c)]};});return this[_0x28aa8b(0xc57)][_0x28aa8b(0xa79)](this),_0x2bed3f;}[_0x52c6ca(0x586)](){const _0x373daa=_0x52c6ca;return!this[_0x373daa(0x3a1)]&&(this['_violationsDb']=this['db'][_0x373daa(0x730)](_0x373daa(0x58f),{'dupSort':![]})),this['_violationsDb'];}[_0x52c6ca(0xf6)](_0x2ba80d){const _0x557903=_0x52c6ca,_0x740908=this[_0x557903(0x586)](),_0x44f477=_0x2ba80d+'@',_0x44995e=[];for(const {key:_0x101f6e}of _0x740908[_0x557903(0x9ce)]({'start':_0x44f477,'end':_0x44f477+''})){_0x44995e[_0x557903(0x597)](_0x101f6e);}for(const _0x5867e4 of _0x44995e)_0x740908['remove'](_0x5867e4);}[_0x52c6ca(0x263)](_0x22e172,_0x4bddda){const _0x1ee001=_0x52c6ca;this[_0x1ee001(0xf13)]();const _0x2183cc=this[_0x1ee001(0x586)](),_0x49bd81=_0x22e172?_0x4bddda?_0x22e172+'@'+_0x76cf00[_0x1ee001(0x977)](_0x4bddda)['join']('~')+'@':_0x22e172+'@':null,_0x58d552=[],_0x169fc0=_0x49bd81?_0x2183cc[_0x1ee001(0x9ce)]({'start':_0x49bd81,'end':_0x49bd81+''}):_0x2183cc[_0x1ee001(0x9ce)]();for(const {value:_0x1a9af2}of _0x169fc0)_0x58d552[_0x1ee001(0x597)](_0x1a9af2);return this[_0x1ee001(0xc57)][_0x1ee001(0xa79)](this),_0x58d552;}[_0x52c6ca(0x2f1)](_0x3a96be,_0x375391){const _0x5b88f0=_0x52c6ca;this[_0x5b88f0(0xf13)]();const _0x25d0c9=this[_0x5b88f0(0x586)](),_0xdee19b=_0x3a96be?_0x375391?_0x3a96be+'@'+_0x76cf00['normalizeIndex'](_0x375391)[_0x5b88f0(0x3d9)]('~')+'@':_0x3a96be+'@':null,_0x402c36=_0xdee19b?_0x25d0c9[_0x5b88f0(0x9ce)]({'start':_0xdee19b,'end':_0xdee19b+'','limit':0x1}):_0x25d0c9[_0x5b88f0(0x9ce)]({'limit':0x1});for(const _0x2f92f6 of _0x402c36){return this[_0x5b88f0(0xc57)][_0x5b88f0(0xa79)](this),!![];}return this[_0x5b88f0(0xc57)]['afterOp'](this),![];}[_0x52c6ca(0x7af)](_0x5064c0,_0x2885d0,_0x1d0777){const _0x3562af=_0x52c6ca;this[_0x3562af(0xf13)](),_0x2885d0=_0x76cf00[_0x3562af(0x977)](_0x2885d0);const _0xdcd14c=_0x5064c0+'@'+_0x2885d0[_0x3562af(0x3d9)]('~')+'@'+JSON['stringify'](_0x1d0777),_0x257960=this[_0x3562af(0x586)]()[_0x3562af(0xbeb)](_0xdcd14c)??null;return this[_0x3562af(0xc57)][_0x3562af(0xa79)](this),_0x257960;}[_0x52c6ca(0x98a)](_0xd4a8e3,_0x59b52b){const _0x5c5024=_0x52c6ca;this[_0x5c5024(0xf13)]();if(!this[_0x5c5024(0x7c0)](_0xfff91a))return null;const _0x570d92=this['_getType'](_0xfff91a)[_0x5c5024(0xc88)]['get'](_0xd4a8e3+'@'+_0x59b52b)??null;return this[_0x5c5024(0xc57)][_0x5c5024(0xa79)](this),_0x570d92;}[_0x52c6ca(0xd35)](_0x207e37=null){const _0xcec44d=_0x52c6ca;this[_0xcec44d(0xf13)]();if(!this[_0xcec44d(0x7c0)](_0xfff91a))return[];const _0x5f0b0a=[];for(const {value:_0x3006ec}of this['_getType'](_0xfff91a)['data'][_0xcec44d(0x9ce)]()){if(!_0x207e37||_0x3006ec[_0xcec44d(0xaee)]===_0x207e37)_0x5f0b0a[_0xcec44d(0x597)](_0x3006ec);}return this['_coordinator']['afterOp'](this),_0x5f0b0a;}[_0x52c6ca(0x865)](_0x4bc059,_0x1e236a,_0x170b71){const _0x2e3813=_0x52c6ca;this['_assertOpen']();if(!this[_0x2e3813(0x7c0)](_0x128fbc))return null;const _0x38c4d0=this[_0x2e3813(0x9ca)](_0x128fbc)[_0x2e3813(0xc88)][_0x2e3813(0xbeb)](_0x4bc059+'@'+_0x1e236a+'@'+_0x170b71)??null;return this[_0x2e3813(0xc57)][_0x2e3813(0xa79)](this),_0x38c4d0;}[_0x52c6ca(0x25f)](_0x193192=null){const _0x1d958c=_0x52c6ca;this[_0x1d958c(0xf13)]();if(!this[_0x1d958c(0x7c0)](_0x128fbc))return[];const _0x16079a=[];for(const {value:_0x27a767}of this[_0x1d958c(0x9ca)](_0x128fbc)[_0x1d958c(0xc88)][_0x1d958c(0x9ce)]()){if(!_0x193192||_0x27a767[_0x1d958c(0xc1a)]===_0x193192)_0x16079a['push'](_0x27a767);}return this[_0x1d958c(0xc57)][_0x1d958c(0xa79)](this),_0x16079a;}[_0x52c6ca(0x5ea)](_0x4a438f=null,_0x5cbb4b={}){const _0x4d6218=_0x52c6ca;this[_0x4d6218(0xf13)]();if(!_0x4a438f){const _0x58c2a2=this['db'][_0x4d6218(0xbeb)](_0x4d6218(0x114d),_0x5cbb4b)||0x0;return this[_0x4d6218(0xc57)][_0x4d6218(0xa79)](this),_0x58c2a2;}if(!this[_0x4d6218(0xce1)]['doesExist'](_0x4a438f))return this[_0x4d6218(0xc57)][_0x4d6218(0xa79)](this),0x0;const _0xfcb3e=this[_0x4d6218(0x9ca)](_0x4a438f),_0x57da94=_0xfcb3e['clockToChange'][_0x4d6218(0x9ce)]({..._0x5cbb4b,'start':Number[_0x4d6218(0xac8)],'end':0x0,'reverse':!![],'limit':0x1});for(const {key:_0x344d55}of _0x57da94){return this['_coordinator']['afterOp'](this),Number[_0x4d6218(0x2b5)](_0x344d55)?_0x344d55:0x0;}return this[_0x4d6218(0xc57)][_0x4d6218(0xa79)](this),0x0;}[_0x52c6ca(0x151)](_0x21fb29=null,_0x45380d=0x0,_0x1404de=Number[_0x52c6ca(0xac8)],_0x53b3ec={}){const _0x1c6500=_0x52c6ca;this[_0x1c6500(0xf13)]();const _0x10f8c9=_0x45380d>_0x1404de,_0x63232d=_0x10f8c9?_0x1404de-0x1:_0x1404de+0x1;if(_0x21fb29){if(!this[_0x1c6500(0xce1)][_0x1c6500(0x779)](_0x21fb29))return this[_0x1c6500(0xc57)][_0x1c6500(0xa79)](this),[];const _0x593dd1=this[_0x1c6500(0x9ca)](_0x21fb29),_0x776d5a=_0x593dd1[_0x1c6500(0x2de)][_0x1c6500(0x9ce)]({..._0x53b3ec,'start':_0x45380d,'end':_0x63232d,'reverse':_0x10f8c9})[_0x1c6500(0x1166)](({key:_0x5d9dc2})=>{const _0x497a9e=_0x1c6500,_0x29170c=this['clockToChangeDb'][_0x497a9e(0xbeb)](_0x5d9dc2);if(!_0x29170c)return _0x3a424d['SKIP'];return{'clock':_0x5d9dc2,..._0x29170c};});return this[_0x1c6500(0xc57)][_0x1c6500(0xa79)](this),_0x776d5a;}const _0x452315=this[_0x1c6500(0xcda)][_0x1c6500(0x9ce)]({..._0x53b3ec,'start':_0x45380d,'end':_0x63232d,'reverse':_0x10f8c9})[_0x1c6500(0x1166)](({key:_0x365ad9,value:_0x1f93a3})=>({'clock':_0x365ad9,..._0x1f93a3}));return this['_coordinator'][_0x1c6500(0xa79)](this),_0x452315;}[_0x52c6ca(0x863)](_0x4dfe42,_0x95e664){const _0x33b024=_0x52c6ca;if(!_0x95e664||typeof _0x95e664!==_0x33b024(0xb36))return{'cleanFilter':_0x95e664,'nearOpt':null};let _0x229fa3=null;for(const _0x44a340 of Object[_0x33b024(0xa52)](_0x95e664)){const _0x9d3d95=_0x95e664[_0x44a340];if(!_0x9d3d95||typeof _0x9d3d95!==_0x33b024(0xb36))continue;if(_0x9d3d95[_0x33b024(0x5bd)]){const {lat:_0xa9243c,lon:_0x17304e,radius:_0x49b9b4}=_0x9d3d95[_0x33b024(0x5bd)];_0x229fa3={'field':_0x44a340,'lat':_0xa9243c,'lon':_0x17304e,'radius':_0x49b9b4};const _0x41d714=this[_0x33b024(0x9ca)](_0x4dfe42),_0x2a33e6=_0x41d714[_0x33b024(0xf7b)][_0x33b024(0xbeb)](_0x44a340);if(_0x2a33e6&&_0x2a33e6['geoConfig'])_0x229fa3[_0x33b024(0x11af)]=[_0x44a340];break;}if(_0x9d3d95[_0x33b024(0x11ef)]){const {bbox:_0x1048a9}=_0x9d3d95['$within'];if(_0x1048a9){_0x229fa3={'field':_0x44a340,'bbox':_0x1048a9};const _0x363b6e=this['_getType'](_0x4dfe42),_0x20470a=_0x363b6e[_0x33b024(0xf7b)][_0x33b024(0xbeb)](_0x44a340);if(_0x20470a&&_0x20470a[_0x33b024(0x19f)])_0x229fa3['_autoIndex']=[_0x44a340];}break;}}if(!_0x229fa3)return{'cleanFilter':_0x95e664,'nearOpt':null};const _0x123c3d={..._0x95e664};return delete _0x123c3d[_0x229fa3['field']],{'cleanFilter':_0x123c3d,'nearOpt':_0x229fa3};}[_0x52c6ca(0xa28)](_0x5cbb10,_0x2131ca={},_0x31312e={}){const _0x2b0a33=_0x52c6ca;this[_0x2b0a33(0xf13)]();const {cleanFilter:_0x2f0087,nearOpt:_0x403110}=this[_0x2b0a33(0x863)](_0x5cbb10,_0x2131ca),_0x97167=_0x31312e[_0x2b0a33(0x895)]||_0x403110;_0x97167&&!_0x31312e[_0x2b0a33(0x895)]&&_0x403110?.[_0x2b0a33(0x11af)]&&!_0x31312e[_0x2b0a33(0xcc7)]&&(_0x31312e={..._0x31312e,'index':_0x403110[_0x2b0a33(0x11af)]});const _0x116ce4=_0x31312e[_0x2b0a33(0xbd7)]||(_0x32d327=>_0x32d327),_0x3f47e8=Object[_0x2b0a33(0xa52)](_0x2f0087)['length']>0x0?_0x47de9b(_0x2f0087):null,_0x5dcd11=_0x3f47e8?_0xa7a3d=>_0x3f47e8(_0xa7a3d):()=>!![],_0x105f4b=Number['isInteger'](_0x31312e[_0x2b0a33(0xbae)])?_0x31312e[_0x2b0a33(0xbae)]:Infinity,_0x581c0b=_0x31312e[_0x2b0a33(0x55f)]||0x0,_0x1c2949=!!_0x31312e[_0x2b0a33(0xed)],_0xc1339a=!!_0x31312e[_0x2b0a33(0xcc7)],_0xdfd4d=_0x31312e[_0x2b0a33(0x1ae)]!==undefined;if(!_0xc1339a&&_0xdfd4d)throw new Error('prefix\x20requires\x20options.index');if(_0xdfd4d&&(_0x31312e[_0x2b0a33(0x186)]!==undefined||_0x31312e[_0x2b0a33(0x23b)]!==undefined))throw new Error(_0x2b0a33(0x2cb));if(!_0xc1339a&&(_0x31312e['startIndex']!==undefined||_0x31312e[_0x2b0a33(0x23b)]!==undefined))throw new Error(_0x2b0a33(0xa23));if(_0x97167)return this[_0x2b0a33(0xfe7)](_0x5cbb10,_0x2f0087,_0x31312e,_0x97167,_0x5dcd11,_0x116ce4,_0x105f4b,_0x581c0b);const _0x3c2bd8={'reverse':_0x1c2949};if(_0xc1339a){_0x31312e[_0x2b0a33(0xcc7)]=_0x76cf00[_0x2b0a33(0x977)](_0x31312e[_0x2b0a33(0xcc7)]);if(_0xdfd4d){const _0x1ecfd8=Array[_0x2b0a33(0x10f5)](_0x31312e[_0x2b0a33(0x1ae)])?_0x31312e[_0x2b0a33(0x1ae)]:[_0x31312e[_0x2b0a33(0x1ae)]];_0x3c2bd8[_0x2b0a33(0xa00)]=[..._0x1ecfd8],_0x3c2bd8[_0x2b0a33(0xc9c)]=[..._0x1ecfd8,_0x37cf73];}else{if(_0x31312e['startIndex']!==undefined)_0x3c2bd8[_0x2b0a33(0xa00)]=_0x31312e[_0x2b0a33(0x186)];if(_0x31312e[_0x2b0a33(0x23b)]!==undefined)_0x3c2bd8[_0x2b0a33(0xc9c)]=_0x31312e[_0x2b0a33(0x23b)];}if(_0x31312e[_0x2b0a33(0x58c)]){const _0x14e709=this[_0x2b0a33(0xa57)](_0x5cbb10,_0x31312e['startKey']);if(_0x14e709)_0x3c2bd8['start']=_0x76cf00[_0x2b0a33(0xeb4)](_0x14e709['value'],_0x31312e[_0x2b0a33(0xcc7)]);}if(_0x31312e[_0x2b0a33(0x1a2)]){const _0x15e73b=this[_0x2b0a33(0xa57)](_0x5cbb10,_0x31312e[_0x2b0a33(0x1a2)]);if(_0x15e73b)_0x3c2bd8[_0x2b0a33(0xc9c)]=_0x76cf00[_0x2b0a33(0xeb4)](_0x15e73b[_0x2b0a33(0x568)],_0x31312e['index']);}}else{if(_0x31312e[_0x2b0a33(0x58c)]!==undefined)_0x3c2bd8[_0x2b0a33(0xa00)]=_0x31312e[_0x2b0a33(0x58c)];if(_0x31312e[_0x2b0a33(0x1a2)]!==undefined)_0x3c2bd8[_0x2b0a33(0xc9c)]=_0x31312e[_0x2b0a33(0x1a2)];}if(_0x1c2949){const _0x3d1ecd=_0x3c2bd8[_0x2b0a33(0xa00)];_0x3c2bd8[_0x2b0a33(0xa00)]=_0x3c2bd8['end'],_0x3c2bd8[_0x2b0a33(0xc9c)]=_0x3d1ecd;}let _0x165084=_0xc1339a?this[_0x2b0a33(0x22e)](_0x5cbb10,_0x31312e[_0x2b0a33(0xcc7)],_0x3c2bd8):this[_0x2b0a33(0x9ce)](_0x5cbb10,_0x3c2bd8),_0x565e58=_0x31312e[_0x2b0a33(0x58c)]===undefined;_0xc1339a&&(_0x31312e[_0x2b0a33(0x58c)]!==undefined||_0x31312e[_0x2b0a33(0x1a2)]!==undefined)&&(_0x165084=_0x165084['map'](_0x37094d=>{const _0x58fee2=_0x2b0a33;if(!_0x565e58){if(_0x37094d[_0x58fee2(0x9dd)]===_0x31312e[_0x58fee2(0x58c)])_0x565e58=!![];return _0x3a424d[_0x58fee2(0xbd9)];}if(_0x31312e[_0x58fee2(0x1a2)]!==undefined&&_0x37094d['key']===_0x31312e[_0x58fee2(0x1a2)])return _0x165084[_0x58fee2(0x110a)];return _0x37094d;}));let _0x4d55f8=0x0,_0x5da57d=0x0;const _0x458d53=_0x165084['map'](_0x30b49c=>{const _0x189a3d=_0x2b0a33;if(_0x4d55f8>=_0x105f4b)return _0x165084[_0x189a3d(0x110a)];if(!_0x5dcd11(_0x30b49c[_0x189a3d(0x568)]))return _0x3a424d[_0x189a3d(0xbd9)];if(_0x5da57d<_0x581c0b)return _0x5da57d++,_0x3a424d[_0x189a3d(0xbd9)];return _0x4d55f8++,_0x116ce4(_0x30b49c);});return this[_0x2b0a33(0xc57)][_0x2b0a33(0xa79)](this),_0x458d53;}['_geoQueryImpl'](_0x5857fc,_0x5e6e01,_0x56995d,_0xf6070e,_0x480b30,_0x4d79b4,_0xee9329,_0xa57ae5){const _0x364813=_0x52c6ca,{field:_0x4dd34b,lat:_0x18ef2e,lon:_0x3f10e4,radius:_0x1b1f0c,bbox:_0x295265}=_0xf6070e;if(!_0x4dd34b)throw new Error(_0x364813(0xeed));const _0x559768=!!_0x295265,_0x30899b=typeof _0x18ef2e===_0x364813(0x9f0)&&typeof _0x3f10e4==='number';if(!_0x559768&&!_0x30899b)throw new Error(_0x364813(0x107f));const _0x50fff4=this[_0x364813(0x9ca)](_0x5857fc),_0x2e604a=!!_0x56995d[_0x364813(0xcc7)];let _0x3a27e7=null,_0x3700ef=![];if(_0x2e604a){const _0x23ff71=_0x76cf00[_0x364813(0x977)](_0x56995d['index']),_0x168e4d=_0x23ff71[_0x364813(0x3d9)]('~');_0x3a27e7=_0x50fff4[_0x364813(0xf7b)][_0x364813(0xbeb)](_0x168e4d);if(!_0x3a27e7)throw new _0x206246(_0x5857fc,_0x168e4d);_0x3700ef=!!_0x3a27e7[_0x364813(0x19f)];}const _0x4d8ff6=[],_0x47fc83=(_0x3c016e,_0x6f858)=>{const _0x732e2f=_0x364813;if(_0x6f858[_0x732e2f(0x9d0)](_0x3c016e))return;_0x6f858['add'](_0x3c016e);const _0x444c7c=_0x50fff4[_0x732e2f(0xc88)][_0x732e2f(0xa57)](_0x3c016e);if(!_0x444c7c)return;const _0x586a46=_0x444c7c[_0x732e2f(0x568)];if(!_0x480b30(_0x586a46))return;const _0x580448=this['_getField'](_0x586a46,_0x4dd34b);if(!_0x3ba914[_0x732e2f(0x33e)](_0x580448))return;if(_0x559768){if(_0x580448[_0x732e2f(0xe4d)]<_0x295265[0x0]||_0x580448[_0x732e2f(0xe4d)]>_0x295265[0x2]||_0x580448[_0x732e2f(0xb29)]<_0x295265[0x1]||_0x580448[_0x732e2f(0xb29)]>_0x295265[0x3])return;_0x4d8ff6['push']({'key':_0x3c016e,'value':_0x586a46,'version':_0x444c7c[_0x732e2f(0x45c)],'distance':0x0});return;}const _0x4bf15c=_0x3ba914[_0x732e2f(0x6df)](_0x18ef2e,_0x3f10e4,_0x580448[_0x732e2f(0xe4d)],_0x580448[_0x732e2f(0xb29)]);if(_0x1b1f0c!==undefined&&_0x4bf15c>_0x1b1f0c)return;_0x4d8ff6['push']({'key':_0x3c016e,'value':_0x586a46,'version':_0x444c7c[_0x732e2f(0x45c)],'distance':_0x4bf15c});};if(_0x3700ef){const _0x510e92=_0x3a27e7['geoConfig']?.['precision'],_0x4df716=!_0x559768&&_0x1b1f0c===undefined,_0x1e3d6f=new Set();if(_0x4df716){for(const _0x3d69d8 of _0x3a27e7['db'][_0x364813(0x9ce)]())_0x47fc83(_0x3d69d8['value'],_0x1e3d6f);}else{const _0x40f19c=_0x559768?_0x3ba914[_0x364813(0xdff)](_0x295265[0x0],_0x295265[0x1],_0x295265[0x2],_0x295265[0x3],undefined,_0x510e92):_0x3ba914[_0x364813(0x146)](_0x18ef2e,_0x3f10e4,_0x1b1f0c,_0x510e92);for(const _0x49ecdf of _0x40f19c){const _0x2bd04f=_0x3a27e7['db']['getRange']({'start':[_0x49ecdf],'end':[_0x49ecdf+'']});for(const _0x26a1e2 of _0x2bd04f)_0x47fc83(_0x26a1e2['value'],_0x1e3d6f);}}}else for(const {key:_0x3d662b,value:_0x42d924,version:_0x5856f4}of _0x50fff4[_0x364813(0xc88)][_0x364813(0x9ce)]()){if(!_0x480b30(_0x42d924))continue;const _0x42a63b=this['_getField'](_0x42d924,_0x4dd34b);if(!_0x3ba914[_0x364813(0x33e)](_0x42a63b))continue;if(_0x559768){if(_0x42a63b[_0x364813(0xe4d)]<_0x295265[0x0]||_0x42a63b['lat']>_0x295265[0x2]||_0x42a63b['lon']<_0x295265[0x1]||_0x42a63b['lon']>_0x295265[0x3])continue;_0x4d8ff6['push']({'key':_0x3d662b,'value':_0x42d924,'version':_0x5856f4,'distance':0x0});}else{const _0x3c19ee=_0x3ba914[_0x364813(0x6df)](_0x18ef2e,_0x3f10e4,_0x42a63b[_0x364813(0xe4d)],_0x42a63b[_0x364813(0xb29)]);if(_0x1b1f0c!==undefined&&_0x3c19ee>_0x1b1f0c)continue;_0x4d8ff6['push']({'key':_0x3d662b,'value':_0x42d924,'version':_0x5856f4,'distance':_0x3c19ee});}}if(_0x30899b)_0x4d8ff6['sort']((_0xce7459,_0x5e669f)=>_0xce7459[_0x364813(0x4bc)]-_0x5e669f[_0x364813(0x4bc)]);const _0x329a45=_0xa57ae5,_0x45ad4f=Math[_0x364813(0x2dc)](_0x4d8ff6['length'],_0xa57ae5+_0xee9329),_0x5fef75=[];for(let _0x459000=_0x329a45;_0x459000<_0x45ad4f;_0x459000++)_0x5fef75[_0x364813(0x597)](_0x4d79b4(_0x4d8ff6[_0x459000]));return _0x5fef75;}[_0x52c6ca(0xf4b)](_0x5986d2,_0x1b238d,_0x188612,_0x3b506d={},_0x1f00ba={}){const _0x3f275d=_0x52c6ca;this[_0x3f275d(0xf13)]();const _0x5922fc=this[_0x3f275d(0xd4f)][_0x3f275d(0xfca)][_0x3f275d(0x110)](_0x5986d2,_0x1b238d,_0x188612,_0x1f00ba,this);if(!_0x3b506d||Object[_0x3f275d(0xa52)](_0x3b506d)[_0x3f275d(0x156)]===0x0)return _0x5922fc;const _0x1b1477=_0x47de9b(_0x3b506d);return _0x5922fc['filter'](_0xbd5e5c=>_0xbd5e5c[_0x3f275d(0x568)]!=null&&_0x1b1477(_0xbd5e5c[_0x3f275d(0x568)]));}[_0x52c6ca(0xf5f)](_0x44b767,_0x120553,_0x2d26f3={}){const _0x2586a6=_0x52c6ca;this['_assertOpen']();const {lat:_0x42308d,lon:_0x4aff9a,radius:_0x10eae0,bbox:_0x22e638,filter:filter={},limit:_0x149b62,offset:_0x44e9bb,select:_0x11a5e2}=_0x2d26f3,_0x416cf7={'field':_0x120553,'lat':_0x42308d,'lon':_0x4aff9a,'radius':_0x10eae0,'bbox':_0x22e638},_0x4f3996=this[_0x2586a6(0x9ca)](_0x44b767),_0x592c51=_0x120553,_0x2dd293=_0x4f3996[_0x2586a6(0xf7b)]['get'](_0x592c51),_0x3f6de9=_0x2dd293&&_0x2dd293[_0x2586a6(0x19f)];return this[_0x2586a6(0xa28)](_0x44b767,filter,{'near':_0x416cf7,'index':_0x3f6de9?[_0x120553]:undefined,'limit':_0x149b62,'offset':_0x44e9bb,'select':_0x11a5e2});}[_0x52c6ca(0xb49)](_0x1858f6,_0x25a3f2){return _0x1858f6+'\x09'+String(_0x25a3f2);}['_ttlParseComposite'](_0x5e3cef){const _0x10eb72=_0x52c6ca,_0x5a9ef1=_0x5e3cef[_0x10eb72(0x10b8)]('\x09');return{'type':_0x5e3cef[_0x10eb72(0xc3c)](0x0,_0x5a9ef1),'key':_0x5e3cef[_0x10eb72(0xc3c)](_0x5a9ef1+0x1)};}[_0x52c6ca(0x36d)](){const _0x31444a=_0x52c6ca;if(this[_0x31444a(0x294)])return;this[_0x31444a(0x294)]=this['db'][_0x31444a(0x730)](_0x31444a(0xeb6),{'dupSort':!![],'keyEncoding':_0x31444a(0x24a),'encoding':_0x31444a(0x24a)}),this[_0x31444a(0x99e)]=this['db'][_0x31444a(0x730)]('~ttl:key',{'dupSort':![]}),this[_0x31444a(0xcd4)](),this[_0x31444a(0x6d2)]();}[_0x52c6ca(0xd60)](){const _0x1c14e2=_0x52c6ca;if(this[_0x1c14e2(0x294)])return;this[_0x1c14e2(0x36d)](),this['db'][_0x1c14e2(0x92c)]('_ttl_enabled',!![]);}[_0x52c6ca(0xcd4)](){const _0x31bfd8=_0x52c6ca;if(!this[_0x31bfd8(0x294)]){this[_0x31bfd8(0x1191)]=null;return;}for(const {key:_0x397842}of this['_ttlByExpiry'][_0x31bfd8(0x9ce)]({'limit':0x1})){this[_0x31bfd8(0x1191)]=_0x397842;return;}this[_0x31bfd8(0x1191)]=null;}[_0x52c6ca(0xfdf)](){const _0x9696b9=_0x52c6ca;this['_ttlTimeout']&&(clearTimeout(this[_0x9696b9(0x907)]),this['_ttlTimeout']=null);}[_0x52c6ca(0x6d2)](){const _0x5e3541=_0x52c6ca;this[_0x5e3541(0xfdf)]();if(!this['_nextExpiry'])return;const _0x1936cc=Math['max'](0x0,this[_0x5e3541(0x1191)]-Date[_0x5e3541(0x555)]());this[_0x5e3541(0x907)]=setTimeout(async()=>{const _0x5966df=_0x5e3541;this[_0x5966df(0x907)]=null;if(!this[_0x5966df(0xe56)])return;try{await this[_0x5966df(0x2ad)]();}catch(_0x5a6e1f){this[_0x5966df(0x9be)]['error']('TTL\x20sweep\x20error:\x20'+_0x5a6e1f[_0x5966df(0xb4e)]);}},_0x1936cc);if(this['_ttlTimeout'][_0x5e3541(0xba4)])this[_0x5e3541(0x907)][_0x5e3541(0xba4)]();}[_0x52c6ca(0xd1b)](){const _0x430926=_0x52c6ca;if(!this[_0x430926(0x1191)])return;if(this[_0x430926(0xad1)])return;if(Date[_0x430926(0x555)]()<this[_0x430926(0x1191)])return;if(this['_ttlSweepScheduled'])return;this[_0x430926(0x3b1)]=!![],queueMicrotask(()=>{const _0x54f50c=_0x430926;this[_0x54f50c(0x3b1)]=![];if(!this[_0x54f50c(0xe56)])return;this['sweepExpiredTTL']()['catch'](_0x4582c9=>{const _0x3cfced=_0x54f50c;this[_0x3cfced(0x9be)][_0x3cfced(0x225)](_0x3cfced(0x10a6)+_0x4582c9[_0x3cfced(0xb4e)]);});});}['_setTTL'](_0x37077b,_0x751816,_0x529f72,_0x5b002d){const _0x110099=_0x52c6ca;if(typeof _0x5b002d!=='number'||_0x5b002d<=0x0)throw new _0x34ee2a(_0x110099(0x6cf));const _0x524560=this[_0x110099(0x9ca)](_0x751816);if(!_0x524560['data'][_0x110099(0x779)](_0x529f72))throw new _0x2a41e6(_0x751816,_0x529f72);this['_ensureTTLDbs']();const _0x17e99a=Date['now']()+_0x5b002d;this['_setTTLEntry'](_0x751816,_0x529f72,_0x17e99a);if(!this['_nextExpiry']||_0x17e99a<this[_0x110099(0x1191)])this[_0x110099(0x1191)]=_0x17e99a;this[_0x110099(0x1076)](_0x751816,_0x529f72,_0x17e99a,_0x110099(0x211));}[_0x52c6ca(0x72a)](_0x18dac9,_0x2cce5e,_0x255bbc){const _0x47aa0f=_0x52c6ca;this[_0x47aa0f(0x9ca)](_0x2cce5e),this['_clearTTLEntry'](_0x2cce5e,_0x255bbc),this[_0x47aa0f(0x1076)](_0x2cce5e,_0x255bbc,null,_0x47aa0f(0x859));}async['setTTL'](_0x4c08ab,_0x189638,_0x540bf4){const _0x1f39fc=_0x52c6ca;this[_0x1f39fc(0xf13)](),await this['db']['transaction'](()=>{this['_setTTL'](null,_0x4c08ab,_0x189638,_0x540bf4);}),this['_scheduleTTLSweep']();}[_0x52c6ca(0xe32)](_0x3ece37,_0x805e8){const _0x3f01ab=_0x52c6ca;this[_0x3f01ab(0xf13)](),this['_getType'](_0x3ece37);if(!this['_ttlByKey'])return this[_0x3f01ab(0xc57)][_0x3f01ab(0xa79)](this),null;const _0x298b47=this[_0x3f01ab(0xb49)](_0x3ece37,_0x805e8),_0x2ea89b=this[_0x3f01ab(0x99e)][_0x3f01ab(0xbeb)](_0x298b47);if(_0x2ea89b==null)return this[_0x3f01ab(0xc57)][_0x3f01ab(0xa79)](this),null;const _0x2394b0=Math['max'](0x0,_0x2ea89b-Date[_0x3f01ab(0x555)]()),_0x375200={'expiresAt':_0x2ea89b,'remainingMs':_0x2394b0};return this[_0x3f01ab(0xc57)][_0x3f01ab(0xa79)](this),_0x375200;}async['setDefaultTTL'](_0x53c443,_0x5a300a){const _0x16ac93=_0x52c6ca;this[_0x16ac93(0xf13)]();if(typeof _0x5a300a!==_0x16ac93(0x9f0)||_0x5a300a<=0x0)throw new _0x34ee2a(_0x16ac93(0x611));const _0x409841=this[_0x16ac93(0x9ca)](_0x53c443),_0x156dc2=this[_0x16ac93(0xce1)]['get'](_0x53c443)||{};await this['db'][_0x16ac93(0x683)](()=>{const _0x5edcda=_0x16ac93;this[_0x5edcda(0xce1)][_0x5edcda(0x92c)](_0x53c443,{..._0x156dc2,'defaultTTL':_0x5a300a});}),_0x409841[_0x16ac93(0x112c)]=_0x5a300a;}['getDefaultTTL'](_0x27c670){const _0x39a529=_0x52c6ca;this[_0x39a529(0xf13)]();const _0x2412d1=this[_0x39a529(0x9ca)](_0x27c670),_0x276de8=_0x2412d1['defaultTTL']||null;return this[_0x39a529(0xc57)][_0x39a529(0xa79)](this),_0x276de8;}async['clearDefaultTTL'](_0x502a0a){const _0x42a176=_0x52c6ca;this['_assertOpen']();const _0x107940=this[_0x42a176(0x9ca)](_0x502a0a),_0x6902cd=this['typesDb'][_0x42a176(0xbeb)](_0x502a0a)||{},{defaultTTL:_0x47dea3,..._0x2648b6}=_0x6902cd;await this['db'][_0x42a176(0x683)](()=>{const _0x2c373c=_0x42a176;this['typesDb'][_0x2c373c(0x92c)](_0x502a0a,_0x2648b6);}),_0x107940[_0x42a176(0x112c)]=null;}[_0x52c6ca(0xe48)]({type:type=null,limit:limit=0x64}={}){const _0x12a7d0=_0x52c6ca;this[_0x12a7d0(0xf13)]();if(!this['_ttlByExpiry'])return{'items':[],'total':0x0};const _0x51a2cb=Date[_0x12a7d0(0x555)](),_0x491edc=[];let _0x4389e5=0x0;for(const {key:_0x690550,value:_0xf31a43}of this['_ttlByExpiry'][_0x12a7d0(0x9ce)]()){const _0x14671f=this['_ttlParseComposite'](_0xf31a43);if(type&&_0x14671f[_0x12a7d0(0xaee)]!==type)continue;_0x4389e5++,_0x491edc[_0x12a7d0(0x156)]<limit&&_0x491edc[_0x12a7d0(0x597)]({'type':_0x14671f[_0x12a7d0(0xaee)],'key':_0x14671f[_0x12a7d0(0x9dd)],'expiresAt':_0x690550,'remainingMs':Math[_0x12a7d0(0x10bf)](0x0,_0x690550-_0x51a2cb),'expired':_0x51a2cb>=_0x690550});}return{'items':_0x491edc,'total':_0x4389e5};}['ttlStats'](_0x532afd=null){const _0xecf84=_0x52c6ca;this[_0xecf84(0xf13)]();if(!this['_ttlByExpiry'])return{'enabled':![],'totalEntries':0x0,'expiredEntries':0x0,'nextExpiry':null,'byType':{}};const _0x2a387d=Date[_0xecf84(0x555)]();let _0x346402=0x0,_0x1045d1=0x0;const _0x4adfa5={};for(const {key:_0x39b423,value:_0x3f1d4b}of this[_0xecf84(0x294)][_0xecf84(0x9ce)]()){const _0x2c77e0=this['_ttlParseComposite'](_0x3f1d4b);if(_0x532afd&&_0x2c77e0[_0xecf84(0xaee)]!==_0x532afd)continue;_0x346402++;if(_0x2a387d>=_0x39b423)_0x1045d1++;_0x4adfa5[_0x2c77e0[_0xecf84(0xaee)]]=(_0x4adfa5[_0x2c77e0[_0xecf84(0xaee)]]||0x0)+0x1;}return{'enabled':!![],'totalEntries':_0x346402,'expiredEntries':_0x1045d1,'nextExpiry':this['_nextExpiry'],'byType':_0x4adfa5};}async['clearTTL'](_0x70b48c,_0x1556a0){const _0x5200fe=_0x52c6ca;this[_0x5200fe(0xf13)](),this[_0x5200fe(0x9ca)](_0x70b48c),await this['db']['transaction'](()=>{const _0x227200=_0x5200fe;this[_0x227200(0x2e5)](_0x70b48c,_0x1556a0);}),this[_0x5200fe(0xcd4)](),this[_0x5200fe(0x6d2)](),this[_0x5200fe(0x1076)](_0x70b48c,_0x1556a0,null,_0x5200fe(0x859));}[_0x52c6ca(0xd6c)](_0x3bf57c,_0x3cebcc,_0x10eba6){const _0x11a111=_0x52c6ca;this[_0x11a111(0xd60)]();const _0x46e9b1=this[_0x11a111(0xb49)](_0x3bf57c,_0x3cebcc),_0x5a1785=this[_0x11a111(0x99e)][_0x11a111(0xbeb)](_0x46e9b1);_0x5a1785!=null&&this['_ttlByExpiry'][_0x11a111(0x21e)](_0x5a1785,_0x46e9b1),this[_0x11a111(0x99e)]['put'](_0x46e9b1,_0x10eba6),this[_0x11a111(0x294)][_0x11a111(0x92c)](_0x10eba6,_0x46e9b1);}['_clearTTLEntry'](_0xfcaf7f,_0x126c93){const _0x3f1b6d=_0x52c6ca;if(!this[_0x3f1b6d(0x99e)])return;const _0x1bf5b3=this[_0x3f1b6d(0xb49)](_0xfcaf7f,_0x126c93),_0x1a0cd8=this['_ttlByKey']['get'](_0x1bf5b3);_0x1a0cd8!=null&&(this[_0x3f1b6d(0x294)][_0x3f1b6d(0x21e)](_0x1a0cd8,_0x1bf5b3),this[_0x3f1b6d(0x99e)][_0x3f1b6d(0x21e)](_0x1bf5b3));}[_0x52c6ca(0x1076)](_0xc8e221,_0x48860e,_0x1e05b5,_0x53f717){const _0x4ef9b5=_0x52c6ca;if(_0x53f717===_0x4ef9b5(0x211))this[_0x4ef9b5(0xea8)]['emit'](_0x8758ea['TTL_SET'],{'type':_0xc8e221,'key':_0x48860e,'expiresAt':_0x1e05b5,'env':this['name']});else _0x53f717===_0x4ef9b5(0x859)&&this[_0x4ef9b5(0xea8)][_0x4ef9b5(0xf5d)](_0x8758ea[_0x4ef9b5(0xe7e)],{'type':_0xc8e221,'key':_0x48860e,'env':this['name']});}['_isExpired'](_0x233018,_0x2463ab){const _0x86447b=_0x52c6ca;if(!this[_0x86447b(0x99e)])return![];const _0xdafc17=this['_ttlCompositeKey'](_0x233018,_0x2463ab),_0x3d75c1=this['_ttlByKey'][_0x86447b(0xbeb)](_0xdafc17);if(_0x3d75c1==null)return![];return Date[_0x86447b(0x555)]()>=_0x3d75c1;}async[_0x52c6ca(0x2ad)](_0x186837=0x3e8){const _0x27ad89=_0x52c6ca;this[_0x27ad89(0xf13)]();if(!this[_0x27ad89(0x294)])return{'removed':0x0,'types':{}};this['_sweepInProgress']=!![];try{const _0x2ff212=Date[_0x27ad89(0x555)]();let _0x2d5538=0x0;const _0x258898={},_0x1119fa=[];for(const {key:_0x4df4ed,value:_0x24c57e}of this[_0x27ad89(0x294)][_0x27ad89(0x9ce)]({'end':_0x2ff212+0x1})){_0x1119fa[_0x27ad89(0x597)]({'expiresAt':_0x4df4ed,'compositeKey':_0x24c57e});if(_0x1119fa[_0x27ad89(0x156)]>=_0x186837)break;}return _0x1119fa[_0x27ad89(0x156)]>0x0&&await this['db'][_0x27ad89(0x683)](()=>{const _0x2a35c6=_0x27ad89;for(const {expiresAt:_0x297640,compositeKey:_0x5637d9}of _0x1119fa){const {type:_0xf89adf,key:_0x46c626}=this[_0x2a35c6(0x2bc)](_0x5637d9),_0x44b0e3=this[_0x2a35c6(0x99e)][_0x2a35c6(0xbeb)](_0x5637d9);if(_0x44b0e3==null||_0x44b0e3!==_0x297640){this['_ttlByExpiry'][_0x2a35c6(0x21e)](_0x297640,_0x5637d9);continue;}if(this[_0x2a35c6(0x1145)]['has'](_0xf89adf)){const _0x4edfa0=this[_0x2a35c6(0x1145)][_0x2a35c6(0xbeb)](_0xf89adf);if(_0x4edfa0['data'][_0x2a35c6(0x779)](_0x46c626))try{this[_0x2a35c6(0xfa0)](null,_0xf89adf,_0x46c626,{'timestamp':Date[_0x2a35c6(0x555)]()});}catch{continue;}}this[_0x2a35c6(0x294)][_0x2a35c6(0x21e)](_0x297640,_0x5637d9),this['_ttlByKey'][_0x2a35c6(0x21e)](_0x5637d9);if(!_0x258898[_0xf89adf])_0x258898[_0xf89adf]=0x0;_0x258898[_0xf89adf]++,_0x2d5538++,this[_0x2a35c6(0xea8)]['emit'](_0x8758ea[_0x2a35c6(0x371)],{'type':_0xf89adf,'key':_0x46c626,'env':this[_0x2a35c6(0x1173)]});}}),this['_refreshNextExpiry'](),{'removed':_0x2d5538,'types':_0x258898};}finally{this['_sweepInProgress']=![];}}['_addIndexConsumer'](_0x59552b,_0x59588f,_0x2dc11a){const _0x3b5615=_0x52c6ca,_0x5bd59f=this[_0x3b5615(0x9ca)](_0x59552b),_0x4852ef=_0x5bd59f['indexes'][_0x3b5615(0xbeb)](_0x59588f)||{},_0x1f4b0b=_0x4852ef[_0x3b5615(0xe85)]??[],_0x597035=_0x2dc11a[_0x3b5615(0x31e)]+':'+_0x2dc11a[_0x3b5615(0x1173)];!_0x1f4b0b['some'](_0x48b88c=>_0x48b88c[_0x3b5615(0x31e)]===_0x2dc11a[_0x3b5615(0x31e)]&&_0x48b88c[_0x3b5615(0x1173)]===_0x2dc11a[_0x3b5615(0x1173)])&&_0x1f4b0b['push']({'kind':_0x2dc11a[_0x3b5615(0x31e)],'name':_0x2dc11a[_0x3b5615(0x1173)]});_0x5bd59f[_0x3b5615(0xb4f)]['put'](_0x59588f,{..._0x4852ef,'usedBy':_0x1f4b0b});const _0x4d4a44=_0x5bd59f[_0x3b5615(0xf7b)][_0x3b5615(0xbeb)](_0x59588f);if(_0x4d4a44)_0x4d4a44[_0x3b5615(0xe85)][_0x3b5615(0x33c)](_0x597035);}['_removeIndexConsumer'](_0x1b64c5,_0x2bdf34,_0x1050bb){const _0x52f1c6=_0x52c6ca,_0x4e8bd0=this['_getType'](_0x1b64c5),_0x6e3344=_0x4e8bd0[_0x52f1c6(0xb4f)][_0x52f1c6(0xbeb)](_0x2bdf34)||{},_0x59572f=(_0x6e3344[_0x52f1c6(0xe85)]??[])['filter'](_0x47ced3=>!(_0x47ced3[_0x52f1c6(0x31e)]===_0x1050bb[_0x52f1c6(0x31e)]&&_0x47ced3['name']===_0x1050bb[_0x52f1c6(0x1173)]));_0x4e8bd0[_0x52f1c6(0xb4f)]['put'](_0x2bdf34,{..._0x6e3344,'usedBy':_0x59572f});const _0x178d4d=_0x4e8bd0[_0x52f1c6(0xf7b)][_0x52f1c6(0xbeb)](_0x2bdf34);if(_0x178d4d)_0x178d4d['usedBy']['delete'](_0x1050bb[_0x52f1c6(0x31e)]+':'+_0x1050bb['name']);const _0x541596=_0x59572f[_0x52f1c6(0x156)]===0x0&&_0x6e3344['createdBy']?.['kind']===_0x1050bb['kind']&&_0x6e3344[_0x52f1c6(0x1f4)]?.['name']===_0x1050bb[_0x52f1c6(0x1173)];return{'orphaned':_0x541596};}[_0x52c6ca(0xa2f)](_0x2d3f50,_0x1232b2){const _0x32e9df=_0x52c6ca,_0x2d242e=this[_0x32e9df(0x9ca)](_0x2d3f50),_0x32579f=[];for(const [_0x51fb54,_0x879e7c]of _0x2d242e[_0x32e9df(0xf7b)]){const _0x4c4ff3=_0x1232b2[_0x32e9df(0x31e)]+':'+_0x1232b2[_0x32e9df(0x1173)];_0x879e7c[_0x32e9df(0x1f4)]?.[_0x32e9df(0x31e)]===_0x1232b2[_0x32e9df(0x31e)]&&_0x879e7c[_0x32e9df(0x1f4)]?.['name']===_0x1232b2[_0x32e9df(0x1173)]&&_0x879e7c[_0x32e9df(0xe85)][_0x32e9df(0xfb)]===0x1&&_0x879e7c[_0x32e9df(0xe85)][_0x32e9df(0x9d0)](_0x4c4ff3)&&_0x32579f[_0x32e9df(0x597)]({'type':_0x2d3f50,'indexName':_0x51fb54});}return _0x32579f;}[_0x52c6ca(0x7dc)](_0x37ee87,_0x22528f){const _0x2b1e1a=_0x52c6ca,_0x2f045c=this[_0x2b1e1a(0x9ca)](_0x37ee87),_0x1b25ef=_0x22528f[_0x2b1e1a(0x31e)]+':'+_0x22528f['name'];for(const [_0x320343,_0x60c2b7]of _0x2f045c[_0x2b1e1a(0xf7b)]){_0x60c2b7[_0x2b1e1a(0xe85)][_0x2b1e1a(0x9d0)](_0x1b25ef)&&this[_0x2b1e1a(0xd7e)](_0x37ee87,_0x320343,_0x22528f);}}[_0x52c6ca(0x307)](_0x14cac2,_0x2f894b){const _0x32a364=_0x52c6ca,_0x10edab=this[_0x32a364(0x9ca)](_0x14cac2);return _0x10edab[_0x32a364(0xb4f)]['get'](_0x2f894b)??null;}['count'](_0x41d7c4){let _0xe78829=0x0;for(const _0x1028c2 of _0x41d7c4)_0xe78829++;return _0xe78829;}*['range'](_0x15dba8){const _0x18ab1d=_0x52c6ca,_0x2249ab=_0x15dba8['iterate']();let _0x2e3dfa;while((_0x2e3dfa=_0x2249ab[_0x18ab1d(0xf6e)]())!==null)yield _0x2e3dfa;}[_0x52c6ca(0x555)](){const _0x2f722e=_0x52c6ca;return _0x300e4d[_0x2f722e(0x6d9)](this[_0x2f722e(0x1185)]);}}function _0x311aca(_0x54ba89){const _0x4fdc90=_0x52c6ca;if(typeof _0x54ba89!=='number'||isNaN(_0x54ba89))return _0x4fdc90(0x273);if(_0x54ba89<0x400)return _0x54ba89+'\x20B';const _0x47eafb=['KB','MB','GB','TB'];let _0x50cd02=-0x1;do{_0x54ba89/=0x400,_0x50cd02++;}while(_0x54ba89>=0x400&&_0x50cd02<_0x47eafb[_0x4fdc90(0x156)]-0x1);return _0x54ba89[_0x4fdc90(0x17c)](0x1)+'\x20'+_0x47eafb[_0x50cd02];}return _0x3d0c61[_0x52c6ca(0x9ad)]=_0x37cf73,okdbEnv=_0x3d0c61,okdbEnv;}var okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x21020f=_0xef8cd8;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x30f751=0x3c;function _0xe3f451(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x1eee96{constructor(){const _0x590894=_0x47ab;this['_totalRequests']=0x0,this[_0x590894(0x974)]=0x0,this['_totalWrites']=0x0,this[_0x590894(0x218)]=0x0,this[_0x590894(0x11f1)]=0x0,this[_0x590894(0x379)]=0x0,this[_0x590894(0x521)]=Array[_0x590894(0x9f8)]({'length':_0x30f751},_0xe3f451),this[_0x590894(0x2be)]=0x0,this[_0x590894(0x197)]=Date['now'](),this[_0x590894(0x514)]=setInterval(()=>this['_rotateBucket'](),0x3e8);if(this[_0x590894(0x514)][_0x590894(0xba4)])this[_0x590894(0x514)][_0x590894(0xba4)]();}[_0x21020f(0x99)](){const _0xf34741=_0x21020f;this[_0xf34741(0x2be)]=(this[_0xf34741(0x2be)]+0x1)%_0x30f751,this['_buckets'][this[_0xf34741(0x2be)]]=_0xe3f451(),this[_0xf34741(0x197)]=Date['now']();}[_0x21020f(0xd20)](_0x105313,_0x4cfdb3,_0x2edcb9){const _0x19604b=_0x21020f,_0x42d3f5=/^(POST|PUT|PATCH|DELETE)$/i[_0x19604b(0xe10)](_0x105313),_0x2ea036=this[_0x19604b(0x521)][this[_0x19604b(0x2be)]];this[_0x19604b(0x353)]++,_0x2ea036[_0x19604b(0x91a)]++,_0x2edcb9&&(this[_0x19604b(0x218)]++,_0x2ea036[_0x19604b(0x736)]++),_0x42d3f5?(this[_0x19604b(0xa61)]++,this[_0x19604b(0x379)]+=_0x4cfdb3,_0x2ea036[_0x19604b(0x550)]++,_0x2ea036[_0x19604b(0x9bd)]+=_0x4cfdb3):(this['_totalReads']++,this[_0x19604b(0x11f1)]+=_0x4cfdb3,_0x2ea036['reads']++,_0x2ea036[_0x19604b(0xffe)]+=_0x4cfdb3);}[_0x21020f(0xd72)](){const _0x37dfd9=_0x21020f;let _0x1fdae7=0x0,_0x5d8806=0x0,_0x3a842a=0x0,_0x2f6997=0x0,_0x2bbf12=0x0,_0x21ec31=0x0;for(const _0x49db3b of this[_0x37dfd9(0x521)]){_0x1fdae7+=_0x49db3b[_0x37dfd9(0x91a)],_0x5d8806+=_0x49db3b[_0x37dfd9(0xb01)],_0x3a842a+=_0x49db3b[_0x37dfd9(0x550)],_0x2f6997+=_0x49db3b[_0x37dfd9(0x736)],_0x2bbf12+=_0x49db3b['readMs'],_0x21ec31+=_0x49db3b[_0x37dfd9(0x9bd)];}const _0x2c861b=_0x30f751;return{'lifetime':{'requests':this[_0x37dfd9(0x353)],'reads':this['_totalReads'],'writes':this[_0x37dfd9(0xa61)],'errors':this['_totalErrors'],'avgReadMs':this[_0x37dfd9(0x974)]>0x0?+(this[_0x37dfd9(0x11f1)]/this[_0x37dfd9(0x974)])[_0x37dfd9(0x17c)](0x2):null,'avgWriteMs':this[_0x37dfd9(0xa61)]>0x0?+(this[_0x37dfd9(0x379)]/this[_0x37dfd9(0xa61)])[_0x37dfd9(0x17c)](0x2):null},'window':{'seconds':_0x2c861b,'requests':_0x1fdae7,'reads':_0x5d8806,'writes':_0x3a842a,'errors':_0x2f6997,'reqPerSec':+(_0x1fdae7/_0x2c861b)[_0x37dfd9(0x17c)](0x2),'readPerSec':+(_0x5d8806/_0x2c861b)[_0x37dfd9(0x17c)](0x2),'writePerSec':+(_0x3a842a/_0x2c861b)[_0x37dfd9(0x17c)](0x2),'avgReadMs':_0x5d8806>0x0?+(_0x2bbf12/_0x5d8806)[_0x37dfd9(0x17c)](0x2):null,'avgWriteMs':_0x3a842a>0x0?+(_0x21ec31/_0x3a842a)[_0x37dfd9(0x17c)](0x2):null}};}[_0x21020f(0x11ac)](){const _0x3861b7=_0x21020f;clearInterval(this[_0x3861b7(0x514)]);}}return okdbMetrics=_0x1eee96,okdbMetrics;}var okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0xef080f=require$$0$1;function _0x461442(_0x2badde,_0x11dfbc){const _0x3a9875=_0x47ab;return _0xef080f[_0x3a9875(0x675)]('sha256',_0x11dfbc)[_0x3a9875(0xbb7)](_0x2badde)[_0x3a9875(0xdea)](_0x3a9875(0xb6e));}function _0x1e9fe6(_0x5466bc,_0x185830){const _0x14803a=_0x47ab;if(typeof _0x5466bc!==_0x14803a(0xf7a)||typeof _0x185830!==_0x14803a(0xf7a))return![];if(Buffer[_0x14803a(0x13c)](_0x5466bc)!==Buffer[_0x14803a(0x13c)](_0x185830))return![];return _0xef080f[_0x14803a(0xe71)](Buffer[_0x14803a(0x9f8)](_0x5466bc),Buffer[_0x14803a(0x9f8)](_0x185830));}function _0x43c4a9(_0x4831b5){const _0xc14ac9=_0x47ab;if(!_0x4831b5?.[_0xc14ac9(0x8ba)](_0xc14ac9(0x9a3)))return null;return _0x4831b5['slice'](0x7);}function _0x116372(_0x1f342e=0x20){const _0x5377c6=_0x47ab;return _0xef080f[_0x5377c6(0x3d0)](_0x1f342e)[_0x5377c6(0x583)](_0x5377c6(0xb6e));}function _0x33f1fd(_0xe137e1){const _0x5ce5dd=_0x47ab;return _0xef080f['createHash'](_0x5ce5dd(0xeee))['update'](_0xe137e1)[_0x5ce5dd(0xdea)](_0x5ce5dd(0x57b));}function _0xff0ffc(_0x347be7,_0x4d3434,_0x29fc3f=0x36ee80){const _0x24dcff=_0x47ab;if(!_0x4d3434)throw new Error(_0x24dcff(0xa85));const _0x19724=Date['now'](),_0x342570=Buffer[_0x24dcff(0x9f8)](JSON['stringify']({'iat':_0x19724,'exp':_0x19724+_0x29fc3f,'sub':_0x347be7?.['id']??_0x347be7?.[_0x24dcff(0x52e)]??null,'username':_0x347be7?.['username']??_0x347be7?.[_0x24dcff(0x1173)]??null,'roles':Array[_0x24dcff(0x10f5)](_0x347be7?.[_0x24dcff(0xa6d)])?_0x347be7['roles']:[]}))[_0x24dcff(0x583)](_0x24dcff(0xb6e)),_0x43c377=_0x461442(_0x342570,_0x4d3434);return _0x342570+'.'+_0x43c377;}function _0x4760ff(_0x25f6c3,_0x5542fe){const _0x24f704=_0x47ab;if(!_0x5542fe||typeof _0x25f6c3!==_0x24f704(0xf7a))return null;const [_0x88ce33,_0x24ba9e]=_0x25f6c3[_0x24f704(0xfb1)]('.');if(!_0x88ce33||!_0x24ba9e)return null;const _0x5c77b8=_0x461442(_0x88ce33,_0x5542fe);if(!_0x1e9fe6(_0x24ba9e,_0x5c77b8))return null;try{const _0x1337d4=JSON[_0x24f704(0xdcd)](Buffer['from'](_0x88ce33,'base64url')[_0x24f704(0x583)]()),_0x31a974=0x7530;if(Date[_0x24f704(0x555)]()>Number(_0x1337d4?.[_0x24f704(0x116f)]??0x0)+_0x31a974)return null;return _0x1337d4;}catch{return null;}}async function _0x46cf6c(_0x306cb4){return new Promise((_0x5ec756,_0x4a12c7)=>{const _0x557cb3=_0x47ab,_0x45770b=_0xef080f[_0x557cb3(0x3d0)](0x10);_0xef080f[_0x557cb3(0x1ac)](_0x306cb4,_0x45770b,0x40,(_0xe54141,_0x534dfd)=>{const _0x5adc86=_0x557cb3;if(_0xe54141)_0x4a12c7(_0xe54141);_0x5ec756(_0x45770b[_0x5adc86(0x583)](_0x5adc86(0x57b))+':'+_0x534dfd['toString'](_0x5adc86(0x57b)));});});}async function _0x11ce9d(_0x5460c1,_0x3501b3){const _0x343a54=_0x47ab,[_0x1972aa,_0x4aa903]=_0x3501b3[_0x343a54(0xfb1)](':');if(!_0x1972aa||!_0x4aa903)return![];const _0x2d1022=Buffer[_0x343a54(0x9f8)](_0x1972aa,_0x343a54(0x57b));return new Promise((_0x5b92f1,_0x2abd29)=>{const _0x478e78=_0x343a54;_0xef080f[_0x478e78(0x1ac)](_0x5460c1,_0x2d1022,0x40,(_0x18c044,_0x11e7eb)=>{const _0x14983e=_0x478e78;if(_0x18c044)_0x2abd29(_0x18c044);_0x5b92f1(_0xef080f[_0x14983e(0xe71)](_0x11e7eb,Buffer[_0x14983e(0x9f8)](_0x4aa903,_0x14983e(0x57b))));});});}return okdbAuthTokens={'hmac':_0x461442,'timingSafeEqual':_0x1e9fe6,'parseBearer':_0x43c4a9,'randomToken':_0x116372,'hashToken':_0x33f1fd,'issueToken':_0xff0ffc,'authenticateToken':_0x4760ff,'hashPassword':_0x46cf6c,'verifyPassword':_0x11ce9d},okdbAuthTokens;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x731182=_0xef8cd8;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x200fb4={'data':{'label':_0x731182(0x573),'scope':_0x731182(0x30b),'description':_0x731182(0x4c9),'operations':{'read':{'label':_0x731182(0xb16),'summary':'Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.'},'write':{'label':_0x731182(0xc97),'summary':'Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).'}}},'schema':{'label':_0x731182(0x106f),'scope':'env','description':'Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','operations':{'read':{'label':'Read','summary':_0x731182(0x398)},'write':{'label':_0x731182(0xc97),'summary':'Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.'}}},'search':{'label':_0x731182(0x58d),'scope':_0x731182(0x30b),'description':_0x731182(0xdb7),'operations':{'query':{'label':'Query','summary':'Execute\x20full-text\x20and\x20vector\x20searches.'}}},'queue':{'label':'Queue','scope':'env','description':_0x731182(0x3d2),'operations':{'read':{'label':'Read','summary':_0x731182(0xa9f)},'write':{'label':_0x731182(0xc97),'summary':_0x731182(0x8cd)},'work':{'label':_0x731182(0x5df),'summary':'Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.'}}},'files':{'label':_0x731182(0xc29),'scope':_0x731182(0x30b),'description':_0x731182(0x1be),'operations':{'read':{'label':_0x731182(0xb16),'summary':'List,\x20download,\x20and\x20inspect\x20file\x20metadata.'},'write':{'label':_0x731182(0xc97),'summary':'Upload,\x20update\x20metadata,\x20and\x20delete\x20files.'}}},'functions':{'label':_0x731182(0xd82),'scope':_0x731182(0x30b),'description':_0x731182(0x3ba),'operations':{'read':{'label':_0x731182(0xb16),'summary':_0x731182(0x7ad)},'write':{'label':_0x731182(0xc97),'summary':_0x731182(0x288)},'run':{'label':_0x731182(0x46c),'summary':'Execute\x20functions\x20over\x20HTTP/MCP/shell.'}}},'views':{'label':'Views','scope':_0x731182(0x30b),'description':_0x731182(0x16d),'operations':{'read':{'label':_0x731182(0xb16),'summary':_0x731182(0x65d)},'write':{'label':_0x731182(0xc97),'summary':'Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.'}}},'env':{'label':_0x731182(0x647),'scope':_0x731182(0x30b),'description':_0x731182(0xe62),'operations':{'read':{'label':_0x731182(0xb16),'summary':_0x731182(0x10d4)},'write':{'label':_0x731182(0xc97),'summary':_0x731182(0xbbc)}}},'auth':{'label':_0x731182(0x257),'scope':_0x731182(0x83e),'description':_0x731182(0x8e1),'operations':{'read':{'label':_0x731182(0xb16),'summary':'List\x20tokens\x20and\x20users.'},'write':{'label':_0x731182(0xc97),'summary':'Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.'}}},'system':{'label':_0x731182(0xa46),'scope':'system','description':_0x731182(0x1186),'operations':{'read':{'label':_0x731182(0xb16),'summary':_0x731182(0x96)},'write':{'label':_0x731182(0xc97),'summary':_0x731182(0xd4e)}}},'sync':{'label':_0x731182(0xf55),'scope':_0x731182(0x83e),'description':'Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','operations':{'read':{'label':_0x731182(0xb16),'summary':'View\x20peer\x20status\x20and\x20replication\x20stats.'},'write':{'label':_0x731182(0xc97),'summary':'Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.'},'peer':{'label':_0x731182(0xb03),'summary':_0x731182(0x410),'machineOnly':!![]}}},'protected':{'label':'Protected\x20(gate)','scope':'gate','description':_0x731182(0xc54),'operations':{'read':{'label':'Read','summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':_0x731182(0xc97),'summary':_0x731182(0x3e3)}}}},_0x2ffbcc={'schema:read':[_0x731182(0x2ae),_0x731182(0x328),'search:query']},_0x23b6b5=['read',_0x731182(0xa28),_0x731182(0x110b),_0x731182(0x61d),_0x731182(0x6f1),_0x731182(0xc0b)];function _0x346aa8(){const _0x39e6a8=_0x731182,_0x3dc1f1=[];for(const [_0x599413,_0x285bc0]of Object[_0x39e6a8(0x1129)](_0x200fb4)){for(const _0x2dfc27 of Object['keys'](_0x285bc0['operations'])){_0x3dc1f1['push'](_0x599413+':'+_0x2dfc27);}}return _0x3dc1f1;}function _0x2206f2(_0x25d56e){return _0x200fb4[_0x25d56e]||null;}function _0x33e62a(_0x49cdd8,_0x3a35a3){const _0x32a6d0=_0x731182;return _0x200fb4[_0x49cdd8]?.[_0x32a6d0(0xead)][_0x3a35a3]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x200fb4,'IMPLIED_BY':_0x2ffbcc,'OP_ORDER':_0x23b6b5,'listAllPermissions':_0x346aa8,'getNamespaceMeta':_0x2206f2,'getOperationMeta':_0x33e62a},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x1cef39=_0xef8cd8;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x590e4c}=requireOkdbAuthNamespaces(),_0x340906=new Set(['read',_0x1cef39(0xa28)]);function _0x2264aa(_0x4ae440,_0x3740f5){const _0x4f4517=_0x1cef39;if(!Array[_0x4f4517(0x10f5)](_0x4ae440)||_0x4ae440[_0x4f4517(0x156)]===0x0)return![];for(const _0x3465b0 of _0x4ae440){if(typeof _0x3465b0!==_0x4f4517(0xf7a)||!_0x3465b0[_0x4f4517(0x29c)](':')){if(_0x3465b0==='*')return!![];continue;}const [_0x13ae20,_0x2ea8ce]=_0x3465b0[_0x4f4517(0xfb1)](':'),[_0x34b8b6,_0xc8d9e8]=_0x3740f5[_0x4f4517(0xfb1)](':'),_0x524002=_0x13ae20==='*'||_0x13ae20===_0x34b8b6,_0x528460=_0x2ea8ce==='*'||_0x2ea8ce===_0xc8d9e8;if(_0x524002&&_0x528460)return!![];}const _0xad02c=_0x590e4c[_0x3740f5];if(_0xad02c)for(const _0x368e98 of _0xad02c){if(_0x2264aa(_0x4ae440,_0x368e98))return!![];}return![];}function _0x4939eb(_0x5608ba,_0x134d61){const _0x17cf0f=_0x1cef39,_0x21b0af=new Set();if(Array['isArray'](_0x5608ba)){for(const _0x1f2447 of _0x5608ba)_0x21b0af[_0x17cf0f(0x33c)](_0x1f2447);}if(Array[_0x17cf0f(0x10f5)](_0x134d61)){for(const _0x1f8288 of _0x134d61)_0x21b0af[_0x17cf0f(0x33c)](_0x1f8288);}return Array[_0x17cf0f(0x9f8)](_0x21b0af);}function _0x4ee99(_0x4da91f){const _0x4f8e69=_0x1cef39;if(typeof _0x4da91f!==_0x4f8e69(0xf7a))return![];const [,_0x4d1c47]=_0x4da91f[_0x4f8e69(0xfb1)](':');return _0x340906[_0x4f8e69(0x9d0)](_0x4d1c47);}function _0x9ef268(_0x25e460){const _0x39406a=_0x1cef39;return _0x4ee99(_0x25e460)?_0x39406a(0x314):_0x39406a(0xb4b);}function _0x2526be(_0x9134fd,_0x2b8f83){const _0x54b1b1=_0x1cef39;return _0x4939eb(_0x9134fd[_0x54b1b1(0x6c9)]||[],_0x2b8f83?(_0x9134fd['grants']||{})[_0x2b8f83]||[]:[]);}function _0x41533e(_0x4a2346){const _0x2dd1f9=_0x1cef39,_0x15ac12=[];for(const _0x1ef458 of _0x4a2346['listRoutes']()){const _0x2632fd=_0x1ef458[_0x2dd1f9(0x4dd)]?.[_0x2dd1f9(0x2f8)];if(!_0x2632fd)continue;_0x2632fd['authRequired']&&!_0x2632fd[_0x2dd1f9(0x465)]&&_0x15ac12[_0x2dd1f9(0x597)](_0x1ef458['method']+'\x20'+_0x1ef458[_0x2dd1f9(0x20b)]+_0x2dd1f9(0x1086)+(_0x1ef458[_0x2dd1f9(0x4dd)]['id']??'?')+')');}if(_0x15ac12['length'])throw new Error(_0x2dd1f9(0xfe4)+_0x15ac12[_0x2dd1f9(0x3d9)](_0x2dd1f9(0x852)));}return okdbAuthPermissions={'hasPermission':_0x2264aa,'unionPermissions':_0x4939eb,'isReadOperation':_0x4ee99,'resolveProtectedGate':_0x9ef268,'getEffectivePermissions':_0x2526be,'assertEveryRouteHasPermission':_0x41533e},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x2e5c41=require$$0$8,_0x5a3480=require$$1$3,_0x8f9190=require$$0$1;function _0xe15b9(_0x10da0a){const _0x4546ef=_0x47ab,_0x358c1b=String(_0x10da0a||'')['replace'](/-/g,'+')[_0x4546ef(0x8d8)](/_/g,'/'),_0x260742=_0x358c1b+'='[_0x4546ef(0xd5e)]((0x4-(_0x358c1b[_0x4546ef(0x156)]%0x4||0x4))%0x4);return Buffer['from'](_0x260742,_0x4546ef(0x4f3));}function _0x232846(_0x19f161){const _0x1fe2ff=_0x47ab;if(typeof _0x19f161!=='string')throw new Error('Invalid\x20token');const _0x25be5b=_0x19f161[_0x1fe2ff(0xfb1)]('.');if(_0x25be5b[_0x1fe2ff(0x156)]!==0x3)throw new Error(_0x1fe2ff(0xc18));const [_0x3992c7,_0x47fc21,_0x33e066]=_0x25be5b,_0x3f3fd4=JSON[_0x1fe2ff(0xdcd)](_0xe15b9(_0x3992c7)[_0x1fe2ff(0x583)](_0x1fe2ff(0x57a))),_0x51d4ce=JSON['parse'](_0xe15b9(_0x47fc21)[_0x1fe2ff(0x583)]('utf8'));return{'header':_0x3f3fd4,'payload':_0x51d4ce,'signature':_0xe15b9(_0x33e066),'signingInput':Buffer[_0x1fe2ff(0x9f8)](_0x3992c7+'.'+_0x47fc21),'encodedHeader':_0x3992c7,'encodedPayload':_0x47fc21};}function _0x50a391(_0x21c4d8){const _0x3066e5=_0x47ab;if(Array[_0x3066e5(0x10f5)](_0x21c4d8))return _0x21c4d8;if(_0x21c4d8==null)return[];return[_0x21c4d8];}function _0x107b67(_0x418519){const _0x14e882=_0x47ab,_0x140f94=String(_0x418519||'')[_0x14e882(0xa0b)](/.{1,64}/g)||[];return _0x14e882(0x4f1)+_0x140f94['join']('\x0a')+'\x0a-----END\x20CERTIFICATE-----\x0a';}function _0x488268(_0x27e65d={}){const _0x400c67=_0x47ab;if(_0x27e65d[_0x400c67(0xd15)]?.[0x0])return _0x8f9190[_0x400c67(0x1021)](_0x107b67(_0x27e65d['x5c'][0x0]));return _0x8f9190[_0x400c67(0x1021)]({'key':_0x27e65d,'format':_0x400c67(0x1169)});}function _0x2f2ed3(_0x4deeb9,_0x407939,_0x3a0f75,_0x3aafce){const _0x555688=_0x47ab;if(_0x4deeb9==='RS256')return _0x8f9190['verify'](_0x555688(0x927),_0x3a0f75,_0x407939,_0x3aafce);if(_0x4deeb9===_0x555688(0x10c7))return _0x8f9190[_0x555688(0xec4)](_0x555688(0xeee),_0x3a0f75,{'key':_0x407939,'dsaEncoding':_0x555688(0xee)},_0x3aafce);return![];}function _0x5ca121(_0x423ef9){const _0x4bf69f=_0x47ab;if(typeof commonjsGlobal['fetch']==='function')return commonjsGlobal[_0x4bf69f(0x5a5)](_0x423ef9,{'headers':{'accept':'application/json'}})['then'](async _0x1ab918=>{const _0x2428f8=_0x4bf69f;if(!_0x1ab918['ok']){const _0x29c660=new Error(_0x2428f8(0xe07)+_0x1ab918['status']+_0x2428f8(0xf01)+_0x423ef9);_0x29c660[_0x2428f8(0xfcd)]=_0x1ab918['status'];throw _0x29c660;}return _0x1ab918['json']();});return new Promise((_0x4ac307,_0x400e13)=>{const _0x2bee3e=_0x4bf69f,_0x90e7=String(_0x423ef9)[_0x2bee3e(0x8ba)]('https:')?_0x5a3480:_0x2e5c41,_0x371139=_0x90e7[_0x2bee3e(0xbeb)](_0x423ef9,{'headers':{'accept':_0x2bee3e(0xf9b)}},_0x4ac383=>{const _0x449bda=_0x2bee3e;let _0x1591fa='';_0x4ac383['setEncoding'](_0x449bda(0x57a)),_0x4ac383['on'](_0x449bda(0xc88),_0xe49c8e=>{_0x1591fa+=_0xe49c8e;}),_0x4ac383['on'](_0x449bda(0xc9c),()=>{const _0x16f29c=_0x449bda;if(_0x4ac383['statusCode']<0xc8||_0x4ac383[_0x16f29c(0xeda)]>=0x12c){const _0x3da5ae=new Error(_0x16f29c(0xe07)+_0x4ac383['statusCode']+_0x16f29c(0xf01)+_0x423ef9);return _0x3da5ae['status']=_0x4ac383['statusCode'],_0x400e13(_0x3da5ae);}try{_0x4ac307(JSON[_0x16f29c(0xdcd)](_0x1591fa||'{}'));}catch(_0xba63fe){_0x400e13(_0xba63fe);}});});_0x371139['on'](_0x2bee3e(0x225),_0x400e13),_0x371139[_0x2bee3e(0xc9c)]();});}return okdbJwtUtils={'base64UrlDecode':_0xe15b9,'parseJwt':_0x232846,'normalizeAudience':_0x50a391,'normalizePemCertificate':_0x107b67,'jwkToKeyObject':_0x488268,'verifyJwtSignature':_0x2f2ed3,'fetchJson':_0x5ca121},okdbJwtUtils;}var okdbHttp,hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x5dbf2a=_0xef8cd8;if(hasRequiredOkdbHttp)return okdbHttp;hasRequiredOkdbHttp=0x1;const _0x21e823=require$$0$8,{URL:_0xe61099}=require$$2,_0x58e3a6=requireOkdbMetrics(),_0x1816ef=requireOkdbAuthTokens(),{hasPermission:_0x140826,unionPermissions:_0xfbf069,resolveProtectedGate:_0x193275}=requireOkdbAuthPermissions(),_0x1706df={0x190:_0x5dbf2a(0xcee),0x191:_0x5dbf2a(0x840),0x193:_0x5dbf2a(0x329),0x194:_0x5dbf2a(0xb7f),0x195:_0x5dbf2a(0x80f),0x198:_0x5dbf2a(0x26d),0x199:_0x5dbf2a(0xfce),0x19a:_0x5dbf2a(0x55b),0x19b:_0x5dbf2a(0xb5f),0x19d:'PAYLOAD_TOO_LARGE',0x19f:_0x5dbf2a(0xe3a),0x1a6:'UNPROCESSABLE_ENTITY',0x1ad:_0x5dbf2a(0xd6a),0x1f4:_0x5dbf2a(0xf22),0x1f5:_0x5dbf2a(0x1051),0x1f6:_0x5dbf2a(0x7c7),0x1f7:_0x5dbf2a(0xca9),0x1f8:'GATEWAY_TIMEOUT'},_0x1ef5fc={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190},{hmac:_0x2a5f46,timingSafeEqual:_0xd001a6,parseBearer:_0x12ef01,randomToken:_0x1e3250,issueToken:_0xef5a90,authenticateToken:_0x5be0dc}=_0x1816ef,{base64UrlDecode:_0x1ca9b5,parseJwt:_0x32c286,normalizeAudience:_0x38d85c,normalizePemCertificate:_0x55ebf8,jwkToKeyObject:_0x20b6ac,verifyJwtSignature:_0x4324d2,fetchJson:_0x530388}=requireOkdbJwtUtils();function _0x30db3b(_0x362f94){const _0x3974a6=_0x5dbf2a;return(_0x362f94||_0x3974a6(0x929))[_0x3974a6(0x96d)]();}function _0x1544e7(_0x14e5d7){const _0x28c05a=_0x5dbf2a;if(Array['isArray'](_0x14e5d7))return _0x14e5d7[_0x28c05a(0xef6)](_0x1544e7);return String(_0x14e5d7||'')[_0x28c05a(0xfb1)](',')[_0x28c05a(0x1166)](_0x57ae5e=>_0x57ae5e['trim']())[_0x28c05a(0x1103)](Boolean);}function _0x12c819(..._0x1e7e39){const _0x354620=_0x5dbf2a;return[...new Set(_0x1e7e39[_0x354620(0xef6)](_0x1544e7))][_0x354620(0x3d9)](',\x20');}function _0x3c31d7(_0xcfb963,_0x218735){const _0x2996c9=_0x5dbf2a;if(!_0xcfb963)return![];if(_0x218735==='*')return!![];if(_0x218735 instanceof RegExp)return _0x218735[_0x2996c9(0xe10)](_0xcfb963);if(typeof _0x218735===_0x2996c9(0x63b))return!!_0x218735(_0xcfb963);if(Array[_0x2996c9(0x10f5)](_0x218735))return _0x218735[_0x2996c9(0x29c)](_0xcfb963);return _0x218735===_0xcfb963;}function _0x117442(_0x1796e2={},_0xa67e94={},_0x237f98=null){const _0x1a9b0e=_0x5dbf2a;if(!_0xa67e94)return null;const _0x3535b9=_0x1796e2[_0x1a9b0e(0xca6)],_0x2c9847=_0xa67e94[_0x1a9b0e(0xa7a)]??_0xa67e94[_0x1a9b0e(0xca6)]??'*',_0x37c14b=_0x2c9847==='*'?'*':_0x3c31d7(_0x3535b9,_0x2c9847)?_0x3535b9:null;if(!_0x37c14b)return null;const _0x514fdd=_0x1796e2['access-control-request-headers'],_0x2f0c02=_0xa67e94['headers']??_0xa67e94[_0x1a9b0e(0xaae)]??[_0x1a9b0e(0x202),'authorization',_0x1a9b0e(0x1131),_0x1a9b0e(0x10bd),_0x1a9b0e(0x562)],_0x29b66f=_0xa67e94[_0x1a9b0e(0xf44)]??_0xa67e94[_0x1a9b0e(0x469)]??(_0x237f98?[_0x237f98,'OPTIONS']:['GET',_0x1a9b0e(0xe46),_0x1a9b0e(0xa7d)]),_0x11e8f4=_0xa67e94[_0x1a9b0e(0x8b5)]??['mcp-session-id'],_0x770299={'access-control-allow-origin':_0x37c14b,'access-control-allow-methods':Array[_0x1a9b0e(0x10f5)](_0x29b66f)?_0x29b66f[_0x1a9b0e(0x3d9)](',\x20'):String(_0x29b66f),'access-control-allow-headers':_0x514fdd?_0x12c819(_0x2f0c02,_0x514fdd):Array[_0x1a9b0e(0x10f5)](_0x2f0c02)?_0x2f0c02[_0x1a9b0e(0x3d9)](',\x20'):String(_0x2f0c02),'access-control-expose-headers':Array['isArray'](_0x11e8f4)?_0x11e8f4[_0x1a9b0e(0x3d9)](',\x20'):String(_0x11e8f4),'vary':_0x12c819('Origin',_0x37c14b==='*'?'':'Origin',_0x514fdd?_0x1a9b0e(0xcd5):'')};if(_0xa67e94[_0x1a9b0e(0x821)])_0x770299[_0x1a9b0e(0xecd)]=_0x1a9b0e(0x7e8);if(Number['isFinite'](_0xa67e94[_0x1a9b0e(0x1dc)]))_0x770299[_0x1a9b0e(0x7ea)]=String(_0xa67e94[_0x1a9b0e(0x1dc)]);return _0x770299;}function _0x4f6864(_0x990131){const _0x342a3c=_0x5dbf2a,_0x1d8fe1=[],_0x385723={};let _0x2b252=![];_0x990131[_0x342a3c(0x11aa)]('/*')&&(_0x2b252=!![],_0x990131=_0x990131[_0x342a3c(0xc3c)](0x0,-0x2),_0x1d8fe1['push']('*'));let _0x68fd34=_0x990131[_0x342a3c(0x8d8)](/\/+$/,'')[_0x342a3c(0x8d8)](/\[([^\]]*)\]/g,(_0x4be21e,_0x5f311f)=>{const _0x2e8278=_0x342a3c,_0x5d9468=_0x5f311f['replace'](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x10ae2c,_0x1facd,_0x5e08fd)=>{const _0x13d9ff=_0x47ab;_0x1d8fe1['push'](_0x1facd);if(_0x5e08fd!==undefined)_0x385723[_0x1facd]=_0x5e08fd;return _0x13d9ff(0xcc6);});return _0x2e8278(0x9b9)+_0x5d9468+')?';})['replace'](/\/:(\w+)/g,(_0x12abdb,_0x42cba2)=>{const _0x2a5d3d=_0x342a3c;return _0x1d8fe1['push'](_0x42cba2),_0x2a5d3d(0xcc6);});if(_0x68fd34==='')_0x68fd34='/';return{'keys':_0x1d8fe1,'defaults':_0x385723,'wildcard':_0x2b252,'regex':new RegExp(_0x2b252?'^'+_0x68fd34+_0x342a3c(0x6ca):'^'+_0x68fd34+'$')};}function _0x179574(_0x428a39){const _0x210ab7=_0x5dbf2a;if(_0x428a39==null)return _0x428a39;return JSON[_0x210ab7(0xdcd)](JSON[_0x210ab7(0xf75)](_0x428a39));}function _0x270ec1(_0x1fd1c5){const _0x259ed1=_0x5dbf2a;if(_0x1fd1c5==null)return null;if(_0x1fd1c5[_0x259ed1(0xaee)]===_0x259ed1(0xb36)&&_0x1fd1c5[_0x259ed1(0x1ef)]&&!Array[_0x259ed1(0x10f5)](_0x1fd1c5[_0x259ed1(0x1ef)]))return _0x179574(_0x1fd1c5);const _0xfbe2fe=Object['values'](_0x1fd1c5),_0x12e6b5=_0xfbe2fe['length']>0x0&&_0xfbe2fe[_0x259ed1(0x244)](_0x5ef549=>{const _0x19c64e=_0x259ed1;return _0x5ef549&&typeof _0x5ef549==='object'&&!Array['isArray'](_0x5ef549)&&(Object[_0x19c64e(0x901)][_0x19c64e(0x9e)][_0x19c64e(0x834)](_0x5ef549,_0x19c64e(0xaee))||Object[_0x19c64e(0x901)]['hasOwnProperty'][_0x19c64e(0x834)](_0x5ef549,_0x19c64e(0x1ef))||Object[_0x19c64e(0x901)]['hasOwnProperty'][_0x19c64e(0x834)](_0x5ef549,_0x19c64e(0xe50))||Object[_0x19c64e(0x901)][_0x19c64e(0x9e)][_0x19c64e(0x834)](_0x5ef549,_0x19c64e(0x8d0)));});if(_0x12e6b5)return{'type':_0x259ed1(0xb36),'properties':_0x179574(_0x1fd1c5),'required':[],'additionalProperties':![]};const _0x1aae63={},_0x5734ba=[];for(const [_0x57cbea,_0x25453a]of Object[_0x259ed1(0x1129)](_0x1fd1c5)){_0x1aae63[_0x57cbea]=_0x12effa(_0x25453a);if(_0x25453a!==null&&_0x25453a!==undefined)_0x5734ba[_0x259ed1(0x597)](_0x57cbea);}return{'type':'object','properties':_0x1aae63,'required':_0x5734ba,'additionalProperties':![]};}function _0x12effa(_0xba7a11){const _0x5c6227=_0x5dbf2a;if(_0xba7a11===null)return{'type':['null','string','number',_0x5c6227(0x854),'object',_0x5c6227(0xf9d)]};if(Array[_0x5c6227(0x10f5)](_0xba7a11))return{'type':'array','items':_0xba7a11[_0x5c6227(0x156)]>0x0?_0x12effa(_0xba7a11[0x0]):{}};switch(typeof _0xba7a11){case _0x5c6227(0xf7a):return{'type':_0x5c6227(0xf7a),'default':_0xba7a11};case _0x5c6227(0x9f0):return{'type':Number[_0x5c6227(0x474)](_0xba7a11)?_0x5c6227(0x10f2):_0x5c6227(0x9f0),'default':_0xba7a11};case'boolean':return{'type':_0x5c6227(0x854),'default':_0xba7a11};case _0x5c6227(0xb36):{const _0x3692a9={};for(const [_0x1b8282,_0x7c55f0]of Object[_0x5c6227(0x1129)](_0xba7a11))_0x3692a9[_0x1b8282]=_0x12effa(_0x7c55f0);return{'type':'object','properties':_0x3692a9,'additionalProperties':!![],'default':_0x179574(_0xba7a11)};}default:return{};}}function _0x3a5ddd(_0x412a26,_0x128c2e){const _0x361a90=_0x5dbf2a,_0x57da83=[];for(const _0x5d5813 of _0x128c2e[_0x361a90(0xa52)]){if(_0x5d5813==='*')continue;_0x57da83[_0x361a90(0x597)]({'name':_0x5d5813,'required':!Object[_0x361a90(0x901)]['hasOwnProperty']['call'](_0x128c2e[_0x361a90(0xabb)],_0x5d5813),'default':_0x128c2e[_0x361a90(0xabb)][_0x5d5813]});}return _0x57da83;}function _0x1ac5f4(_0x453b4f={},_0x3026b8){const _0x5b51f4=_0x5dbf2a,_0x35edee=_0x270ec1(_0x453b4f[_0x5b51f4(0x9f4)]?.['querySchema']??_0x453b4f[_0x5b51f4(0xa28)]??null),_0x24dc28=_0x453b4f[_0x5b51f4(0x9f4)]?.['bodyMode']??(_0x453b4f[_0x5b51f4(0x6cc)]?_0x5b51f4(0x6cc):_0x3026b8[_0x5b51f4(0xfc5)]==='GET'||_0x3026b8[_0x5b51f4(0xfc5)]===_0x5b51f4(0x81f)?_0x5b51f4(0x11cc):_0x5b51f4(0xcd7));return{'querySchema':_0x35edee,'bodyMode':_0x24dc28,'bindings':_0x179574(_0x453b4f[_0x5b51f4(0x9f4)]?.[_0x5b51f4(0xa2b)]??{}),'statuses':_0x179574(_0x453b4f[_0x5b51f4(0x9f4)]?.[_0x5b51f4(0x5e1)]??(_0x453b4f[_0x5b51f4(0x6aa)]||[])),'transport':_0x453b4f[_0x5b51f4(0x9f4)]?.['transport']??(_0x453b4f[_0x5b51f4(0xe70)]?_0x5b51f4(0xe70):_0x453b4f['raw']?'raw':_0x5b51f4(0xe40)),'rawResponse':_0x453b4f[_0x5b51f4(0x9f4)]?.[_0x5b51f4(0xf0f)]??!!_0x453b4f[_0x5b51f4(0xf0f)],'cors':_0x179574(_0x453b4f[_0x5b51f4(0x9f4)]?.['cors']??_0x453b4f['cors']??null)};}function _0x28f020(_0x50b70a){const _0x4851de=_0x5dbf2a,_0x1faa5c=_0x50b70a[_0x4851de(0x654)]||{},_0x278436=_0x3a5ddd(_0x50b70a[_0x4851de(0x20b)],_0x50b70a['matcher']),_0x11e9b1=!!(_0x1faa5c['id']||_0x1faa5c[_0x4851de(0x1210)]||_0x1faa5c[_0x4851de(0x232)]||_0x1faa5c[_0x4851de(0x9f4)]||_0x1faa5c[_0x4851de(0xa8b)]||_0x1faa5c[_0x4851de(0x2f5)]||_0x1faa5c[_0x4851de(0x2f8)]||_0x1faa5c['safety']),_0xec41c=_0x1ac5f4(_0x1faa5c,_0x50b70a),_0x185ed8=_0x1faa5c[_0x4851de(0x1210)]?_0x179574(_0x1faa5c[_0x4851de(0x1210)]):null;return{'id':_0x1faa5c['id']??null,'summary':_0x1faa5c['summary']??null,'description':_0x1faa5c['description']??null,'tags':_0x179574(_0x1faa5c[_0x4851de(0x35b)]??[]),'category':_0x1faa5c[_0x4851de(0xc9e)]??null,'safety':_0x179574(_0x1faa5c[_0x4851de(0x653)]??null),'access':_0x179574(_0x1faa5c[_0x4851de(0x2f8)]??null),'inputSchema':_0x185ed8,'outputSchema':_0x179574(_0x1faa5c[_0x4851de(0x232)]??null),'examples':_0x179574(_0x1faa5c[_0x4851de(0x1d2)]??[]),'pathParams':_0x278436,'http':_0xec41c,'cli':_0x179574(_0x1faa5c[_0x4851de(0x2f5)]??null),'mcp':_0x179574(_0x1faa5c['mcp']??null),'legacy':{'params':_0x179574(_0x1faa5c[_0x4851de(0x3f1)]??null),'query':_0x179574(_0x1faa5c['query']??null),'body':_0x179574(_0x1faa5c[_0x4851de(0xce8)]??null),'response':_0x179574(_0x1faa5c[_0x4851de(0x194)]??null)},'transport':{'raw':!!_0x1faa5c[_0x4851de(0x6cc)],'sse':!!_0x1faa5c['sse'],'rawResponse':!!_0x1faa5c[_0x4851de(0xf0f)],'cors':_0x179574(_0x1faa5c['cors']??null)},'hasCanonical':_0x11e9b1};}function _0x273abd(_0xff7bf5,_0x3d72da){const _0x45c676=_0x5dbf2a;if(!_0x3d72da?.[_0x45c676(0xb07)])return;if(!_0x3d72da[_0x45c676(0x1210)]||_0x3d72da[_0x45c676(0x1210)][_0x45c676(0xaee)]!==_0x45c676(0xb36)||!_0x3d72da[_0x45c676(0x1210)][_0x45c676(0x1ef)])throw new Error('Route\x20'+_0xff7bf5[_0x45c676(0xfc5)]+'\x20'+_0xff7bf5[_0x45c676(0x20b)]+_0x45c676(0x663));const _0x45582f=_0x3d72da[_0x45c676(0x1210)][_0x45c676(0x1ef)]||{},_0x3e6d86=new Set(_0x3d72da['pathParams'][_0x45c676(0x1166)](_0x26c8ad=>_0x26c8ad[_0x45c676(0x1173)])),_0xc2c911=new Set(Object[_0x45c676(0xa52)](_0x3d72da[_0x45c676(0x9f4)]?.[_0x45c676(0xe18)]?.[_0x45c676(0x1ef)]||{})),_0x32c9d2=new Set(Object[_0x45c676(0xa52)](_0x3d72da['http']?.[_0x45c676(0xa2b)]||{}));for(const _0x182dc0 of _0x3d72da[_0x45c676(0x749)]){if(!_0x45582f[_0x182dc0[_0x45c676(0x1173)]])throw new Error(_0x45c676(0x8b9)+_0xff7bf5['method']+'\x20'+_0xff7bf5[_0x45c676(0x20b)]+_0x45c676(0x62d)+_0x182dc0[_0x45c676(0x1173)]);}for(const _0x2fff7b of _0xc2c911){if(!_0x45582f[_0x2fff7b])throw new Error(_0x45c676(0x8b9)+_0xff7bf5[_0x45c676(0xfc5)]+'\x20'+_0xff7bf5['path']+_0x45c676(0x1db)+_0x2fff7b);}for(const _0x2169d3 of _0x32c9d2){if(!_0x45582f[_0x2169d3])throw new Error(_0x45c676(0x8b9)+_0xff7bf5[_0x45c676(0xfc5)]+'\x20'+_0xff7bf5[_0x45c676(0x20b)]+_0x45c676(0x10eb)+_0x2169d3);}for(const _0x24c6ca of _0x32c9d2){if(_0x3e6d86[_0x45c676(0x9d0)](_0x24c6ca))throw new Error('Route\x20'+_0xff7bf5[_0x45c676(0xfc5)]+'\x20'+_0xff7bf5[_0x45c676(0x20b)]+'\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20'+_0x24c6ca);if(_0xc2c911['has'](_0x24c6ca))throw new Error(_0x45c676(0x8b9)+_0xff7bf5['method']+'\x20'+_0xff7bf5['path']+_0x45c676(0xfe6)+_0x24c6ca);const _0x2ee7c9=_0x3d72da[_0x45c676(0x9f4)]['bindings'][_0x24c6ca];if(!/^params\.[A-Za-z0-9_*.-]+$/['test'](_0x2ee7c9)&&!/^query\.[A-Za-z0-9_*.-]+$/[_0x45c676(0xe10)](_0x2ee7c9)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/['test'](_0x2ee7c9)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x45c676(0xe10)](_0x2ee7c9))throw new Error(_0x45c676(0x8b9)+_0xff7bf5[_0x45c676(0xfc5)]+'\x20'+_0xff7bf5['path']+'\x20has\x20illegal\x20binding\x20target\x20for\x20'+_0x24c6ca+':\x20'+_0x2ee7c9);}for(const _0x3120c6 of _0xc2c911){if(_0x3e6d86[_0x45c676(0x9d0)](_0x3120c6))throw new Error(_0x45c676(0x8b9)+_0xff7bf5[_0x45c676(0xfc5)]+'\x20'+_0xff7bf5[_0x45c676(0x20b)]+'\x20has\x20ambiguous\x20query/path\x20field:\x20'+_0x3120c6);}const _0x4c09d8=_0x3d72da[_0x45c676(0x9f4)]?.[_0x45c676(0x1151)],_0x23e06a=new Set([_0x45c676(0x11cc),_0x45c676(0xcd7),_0x45c676(0xb36),_0x45c676(0x11fb),_0x45c676(0xf9d),'raw']);if(!_0x23e06a[_0x45c676(0x9d0)](_0x4c09d8))throw new Error('Route\x20'+_0xff7bf5['method']+'\x20'+_0xff7bf5[_0x45c676(0x20b)]+'\x20has\x20invalid\x20http.bodyMode:\x20'+_0x4c09d8);if(_0x4c09d8==='raw'&&!_0xff7bf5['meta']?.['raw'])throw new Error(_0x45c676(0x8b9)+_0xff7bf5[_0x45c676(0xfc5)]+'\x20'+_0xff7bf5['path']+_0x45c676(0x388));if(_0x3d72da[_0x45c676(0xa8b)]?.[_0x45c676(0xcb7)]!==![]&&(_0xff7bf5[_0x45c676(0x654)]?.[_0x45c676(0x6cc)]||_0xff7bf5[_0x45c676(0x654)]?.[_0x45c676(0xe70)]||_0x3d72da['http']?.['transport']===_0x45c676(0xdc1)))throw new Error('Route\x20'+_0xff7bf5[_0x45c676(0xfc5)]+'\x20'+_0xff7bf5[_0x45c676(0x20b)]+_0x45c676(0x1077)+_0x3d72da['http']?.[_0x45c676(0x10bb)]);const _0x58aa72=Object[_0x45c676(0xa52)](_0x45582f)[_0x45c676(0x1103)](_0x56cb87=>{const _0xed302e=_0x45c676;if(_0x3e6d86[_0xed302e(0x9d0)](_0x56cb87))return![];if(_0xc2c911[_0xed302e(0x9d0)](_0x56cb87))return![];if(_0x32c9d2['has'](_0x56cb87))return![];return!![];});if(_0x4c09d8==='none'&&_0x58aa72[_0x45c676(0x156)]>0x0)throw new Error(_0x45c676(0x8b9)+_0xff7bf5[_0x45c676(0xfc5)]+'\x20'+_0xff7bf5[_0x45c676(0x20b)]+_0x45c676(0x71c)+_0x58aa72[_0x45c676(0x3d9)](',\x20'));}function _0x287b77(_0x1a6bf5){const _0x1f4f76=_0x5dbf2a;if(Array[_0x1f4f76(0x10f5)](_0x1a6bf5))return _0x1a6bf5;if(_0x1a6bf5==null)return[];return[_0x1a6bf5];}function _0x4bdaa5(_0x5534f7,_0x4acdbb){const _0x202661=_0x5dbf2a;return _0x287b77(_0x5534f7?.[_0x202661(0xaee)])[_0x202661(0x29c)](_0x4acdbb);}function _0x4edf8c(_0x130d54,_0x3dd6d5){const _0x514829=_0x5dbf2a;if(_0x130d54==null||typeof _0x130d54!==_0x514829(0xf7a))return _0x130d54;const _0x5d0708=_0x287b77(_0x3dd6d5?.[_0x514829(0xaee)]);if(_0x5d0708[_0x514829(0x156)]===0x0)return _0x130d54;if(_0x5d0708[_0x514829(0x29c)]('null')&&_0x130d54===_0x514829(0x11e))return null;if(_0x5d0708[_0x514829(0x29c)](_0x514829(0x854))){if(_0x130d54==='true')return!![];if(_0x130d54===_0x514829(0x2fd))return![];}if(_0x5d0708[_0x514829(0x29c)](_0x514829(0x10f2))&&/^-?\d+$/[_0x514829(0xe10)](_0x130d54))return Number[_0x514829(0x18c)](_0x130d54,0xa);if(_0x5d0708['includes'](_0x514829(0x9f0))&&/^-?(?:\d+|\d*\.\d+)$/[_0x514829(0xe10)](_0x130d54))return Number(_0x130d54);return _0x130d54;}function _0x583d01(_0x227728){return _0x179574(_0x227728);}function _0x24ca8e(_0x26e1b2,_0x4793ef={},_0x135c0f={},_0x39cdeb=null,_0x4d591f={}){const _0x3a1d76=_0x5dbf2a,_0x200499=_0x26e1b2?.[_0x3a1d76(0x4dd)];if(!_0x200499?.[_0x3a1d76(0xb07)]||!_0x200499[_0x3a1d76(0x1210)])return null;const _0x3bfc2=_0x200499['inputSchema'][_0x3a1d76(0x1ef)]||{},_0x584396=_0x200499[_0x3a1d76(0x9f4)]?.[_0x3a1d76(0xe18)]?.[_0x3a1d76(0x1ef)]||{},_0x1a6071=_0x200499[_0x3a1d76(0x9f4)]?.['bindings']||{},_0x302b01=new Set((_0x200499[_0x3a1d76(0x749)]||[])['map'](_0x49fc53=>_0x49fc53[_0x3a1d76(0x1173)])),_0x554f12=new Set(Object['keys'](_0x584396)),_0x3648f1={};for(const [_0xa7e91b,_0x2fd223]of Object['entries'](_0x3bfc2)){Object[_0x3a1d76(0x901)]['hasOwnProperty'][_0x3a1d76(0x834)](_0x2fd223||{},_0x3a1d76(0x8d0))&&(_0x3648f1[_0xa7e91b]=_0x583d01(_0x2fd223[_0x3a1d76(0x8d0)]));}for(const _0x1594a5 of _0x200499[_0x3a1d76(0x749)]||[]){if(!Object[_0x3a1d76(0x901)][_0x3a1d76(0x9e)][_0x3a1d76(0x834)](_0x4793ef,_0x1594a5[_0x3a1d76(0x1173)]))continue;const _0x1d82f1=_0x3bfc2[_0x1594a5['name']]||{};_0x3648f1[_0x1594a5[_0x3a1d76(0x1173)]]=_0x4edf8c(_0x4793ef[_0x1594a5[_0x3a1d76(0x1173)]],_0x1d82f1);}for(const [_0x2ca419,_0x3f00f9]of Object[_0x3a1d76(0x1129)](_0x584396)){if(!Object[_0x3a1d76(0x901)][_0x3a1d76(0x9e)][_0x3a1d76(0x834)](_0x135c0f,_0x2ca419))continue;_0x3648f1[_0x2ca419]=_0x4edf8c(_0x135c0f[_0x2ca419],_0x3f00f9||_0x3bfc2[_0x2ca419]||{});}for(const [_0x3e3544,_0x364528]of Object['entries'](_0x1a6071)){if(typeof _0x364528!==_0x3a1d76(0xf7a))continue;let _0x240b66;if(_0x364528[_0x3a1d76(0x8ba)](_0x3a1d76(0xceb)))_0x240b66=_0x4793ef[_0x364528['slice'](0x7)];else{if(_0x364528['startsWith']('query.'))_0x240b66=_0x135c0f[_0x364528['slice'](0x6)];else{if(_0x364528===_0x3a1d76(0xce8))_0x240b66=_0x39cdeb;else{if(_0x364528[_0x3a1d76(0x8ba)](_0x3a1d76(0x10e1)))_0x240b66=_0x39cdeb?.[_0x364528[_0x3a1d76(0xc3c)](0x5)];else{if(_0x364528[_0x3a1d76(0x8ba)](_0x3a1d76(0x1bd)))_0x240b66=_0x4d591f?.[_0x364528['slice'](0x8)[_0x3a1d76(0xb52)]()]??_0x4d591f?.[_0x364528['slice'](0x8)];}}}}if(_0x240b66!==undefined)_0x3648f1[_0x3e3544]=_0x240b66;}const _0x163ffe=_0x200499[_0x3a1d76(0x9f4)]?.[_0x3a1d76(0x1151)];if(_0x163ffe!==_0x3a1d76(0x11cc)&&_0x163ffe!=='raw'&&_0x39cdeb!=null){if(_0x163ffe===_0x3a1d76(0xb36))for(const [_0xe2ecab,_0x213007]of Object[_0x3a1d76(0x1129)](_0x3bfc2)){if(_0x302b01['has'](_0xe2ecab)||_0x554f12['has'](_0xe2ecab)||Object[_0x3a1d76(0x901)][_0x3a1d76(0x9e)][_0x3a1d76(0x834)](_0x1a6071,_0xe2ecab))continue;if(Object[_0x3a1d76(0x901)]['hasOwnProperty'][_0x3a1d76(0x834)](_0x39cdeb,_0xe2ecab))_0x3648f1[_0xe2ecab]=_0x39cdeb[_0xe2ecab];else{if(_0x4bdaa5(_0x213007,_0x3a1d76(0xb36)))_0x3648f1[_0xe2ecab]=_0x39cdeb;}}else for(const [_0x463ebb,_0x10097a]of Object[_0x3a1d76(0x1129)](_0x39cdeb)){if(_0x302b01[_0x3a1d76(0x9d0)](_0x463ebb)||_0x554f12[_0x3a1d76(0x9d0)](_0x463ebb)||Object[_0x3a1d76(0x901)][_0x3a1d76(0x9e)][_0x3a1d76(0x834)](_0x1a6071,_0x463ebb))continue;_0x3648f1[_0x463ebb]=_0x10097a;}}return _0x3648f1;}function _0x992a3c(_0x367362,_0x60f980,_0x3460c9,_0x6205f){const _0x2ebe2a=_0x5dbf2a;if(!_0x60f980)return;const _0x41287b=_0x287b77(_0x60f980[_0x2ebe2a(0xaee)]);if(_0x367362===undefined)return;if(_0x367362===null){_0x41287b[_0x2ebe2a(0x156)]>0x0&&!_0x41287b[_0x2ebe2a(0x29c)](_0x2ebe2a(0x11e))&&_0x6205f[_0x2ebe2a(0x597)]({'field':_0x3460c9,'message':'must\x20not\x20be\x20null','expected':_0x41287b[_0x2ebe2a(0x3d9)]('|'),'actual':null});return;}if(_0x41287b[_0x2ebe2a(0x156)]===0x0)return;const _0x1ff85f=_0x41287b[_0x2ebe2a(0xa83)](_0x5922d4=>{const _0x261d98=_0x2ebe2a;switch(_0x5922d4){case'string':return typeof _0x367362===_0x261d98(0xf7a);case'integer':return Number[_0x261d98(0x474)](_0x367362);case _0x261d98(0x9f0):return typeof _0x367362==='number'&&Number[_0x261d98(0x2b5)](_0x367362);case'boolean':return typeof _0x367362===_0x261d98(0x854);case _0x261d98(0xb36):return _0x367362&&typeof _0x367362==='object'&&!Array[_0x261d98(0x10f5)](_0x367362);case _0x261d98(0xf9d):return Array['isArray'](_0x367362);case _0x261d98(0x11e):return _0x367362===null;default:return!![];}});if(!_0x1ff85f){_0x6205f[_0x2ebe2a(0x597)]({'field':_0x3460c9,'message':_0x2ebe2a(0xda8)+_0x41287b[_0x2ebe2a(0x3d9)]('|'),'expected':_0x41287b[_0x2ebe2a(0x3d9)]('|'),'actual':_0x367362});return;}Array[_0x2ebe2a(0x10f5)](_0x367362)&&_0x60f980['items']&&_0x367362[_0x2ebe2a(0x632)]((_0x404def,_0xaddef4)=>_0x992a3c(_0x404def,_0x60f980[_0x2ebe2a(0xe50)],_0x3460c9+'['+_0xaddef4+']',_0x6205f));}function _0x5d54f5(_0x2de3e2,_0x34dea1){const _0x465589=_0x5dbf2a,_0x552395=_0x2de3e2?.[_0x465589(0x4dd)];if(!_0x552395?.[_0x465589(0xb07)]||!_0x552395[_0x465589(0x1210)])return null;const _0x4ec252=_0x552395[_0x465589(0x1210)],_0x10908a=_0x4ec252[_0x465589(0x1ef)]||{},_0x54166b=new Set(_0x4ec252['required']||[]),_0xb09861=[];for(const _0x13c457 of _0x54166b){_0x34dea1[_0x13c457]===undefined&&_0xb09861['push']({'field':_0x13c457,'message':_0x465589(0xe63),'expected':'present','actual':undefined});}if(_0x4ec252[_0x465589(0x9f6)]===![])for(const _0x314e7a of Object['keys'](_0x34dea1||{})){!Object[_0x465589(0x901)]['hasOwnProperty'][_0x465589(0x834)](_0x10908a,_0x314e7a)&&_0xb09861[_0x465589(0x597)]({'field':_0x314e7a,'message':'is\x20not\x20allowed','expected':_0x465589(0x241),'actual':_0x34dea1[_0x314e7a]});}for(const [_0x46c105,_0x102ffd]of Object[_0x465589(0x1129)](_0x10908a)){_0x992a3c(_0x34dea1[_0x46c105],_0x102ffd,_0x46c105,_0xb09861);}if(_0xb09861[_0x465589(0x156)]===0x0)return null;return{'code':'VALIDATION_ERROR','errors':_0xb09861};}function _0x140145(_0x523a5b=[]){const _0x1e397e=_0x5dbf2a;if(!Array[_0x1e397e(0x10f5)](_0x523a5b)||_0x523a5b[_0x1e397e(0x156)]===0x0)return null;const _0x3ce972=_0x523a5b[_0x1e397e(0xc3c)](0x0,0x3)[_0x1e397e(0x1166)]((_0x145c1e={})=>{const _0x1b8d9c=_0x1e397e,_0x42b1b8=_0x145c1e[_0x1b8d9c(0x221)]?_0x145c1e[_0x1b8d9c(0x221)]+'\x20':'';return(''+_0x42b1b8+(_0x145c1e[_0x1b8d9c(0xb4e)]||_0x1b8d9c(0x2a6)))[_0x1b8d9c(0xf4d)]();})[_0x1e397e(0x3d9)](';\x20');return _0x523a5b['length']>0x3?_0x3ce972+_0x1e397e(0xd63)+(_0x523a5b[_0x1e397e(0x156)]-0x3)+_0x1e397e(0x712):_0x3ce972;}function _0x386306(_0x3b240d,_0x45b774={}){const _0x4079b4=_0x5dbf2a,_0x2935b6=_0x45b774?.[_0x4079b4(0x80e)]?.[_0x4079b4(0x225)]??_0x45b774?.[_0x4079b4(0x225)]??'Unknown\x20error',_0x500995=_0x45b774?.[_0x4079b4(0x80e)]?.['details']??_0x45b774?.[_0x4079b4(0x933)]??_0x2935b6?.[_0x4079b4(0x933)]??null,_0x169c90=_0x45b774?.[_0x4079b4(0x80e)]?.[_0x4079b4(0x1f8)]??_0x45b774?.['code']??_0x2935b6?.[_0x4079b4(0x1f8)]??null,_0x169915=_0x45b774?.[_0x4079b4(0x80e)]?.[_0x4079b4(0xb4e)]??_0x45b774?.[_0x4079b4(0xb4e)]??_0x2935b6?.[_0x4079b4(0xb4e)]??null,_0x4da171=typeof _0x2935b6===_0x4079b4(0xf7a)?_0x2935b6:null,_0x30215c=typeof _0x4da171===_0x4079b4(0xf7a)&&/^[A-Z0-9_]+$/['test'](_0x4da171),_0x1d9c34=_0x169c90??(_0x30215c?_0x4da171:null)??(_0x1706df[_0x3b240d]||_0x4079b4(0x5c1)+_0x3b240d);let _0x42746e=_0x169915;!_0x42746e&&typeof _0x4da171===_0x4079b4(0xf7a)&&!_0x30215c&&(_0x42746e=_0x4da171);if(!_0x42746e&&_0x1d9c34==='VALIDATION_ERROR'){const _0x4a3a4e=_0x140145(_0x500995);_0x42746e=_0x4a3a4e?'Validation\x20failed:\x20'+_0x4a3a4e:'Validation\x20failed';}if(!_0x42746e&&Array[_0x4079b4(0x10f5)](_0x500995)&&_0x500995['length']>0x0){const _0x262b46=_0x140145(_0x500995);if(_0x262b46)_0x42746e=_0x262b46;}if(!_0x42746e)_0x42746e=_0x1706df[_0x3b240d]||_0x4079b4(0x64f);const _0xf47cd3={'code':_0x1d9c34,'message':_0x42746e};if(_0x500995!=null)_0xf47cd3[_0x4079b4(0x933)]=_0x500995;return _0xf47cd3;}function _0x2845c1(_0x27509b){const _0x43c70d=_0x5dbf2a,_0x42c9df={};if(!_0x27509b)return _0x42c9df;for(const _0x4d6f0f of _0x27509b[_0x43c70d(0xfb1)](';')){const _0x185709=_0x4d6f0f[_0x43c70d(0x10b8)]('=');if(_0x185709===-0x1)continue;const _0x4c8b6b=_0x4d6f0f['slice'](0x0,_0x185709)['trim'](),_0x42feb7=_0x4d6f0f['slice'](_0x185709+0x1)[_0x43c70d(0xf4d)]();_0x42c9df[_0x4c8b6b]=decodeURIComponent(_0x42feb7);}return _0x42c9df;}function _0x284318(_0x37d357,_0x518199){const _0x8128d3=_0x5dbf2a;return _0x518199=_0x552f29(_0x518199),{'status':_0x518199[_0x8128d3(0xfcd)]??_0x37d357['status'],'headers':{..._0x37d357[_0x8128d3(0xcc4)]||{},..._0x518199[_0x8128d3(0xcc4)]||{}},'body':_0x518199[_0x8128d3(0xce8)]??_0x37d357[_0x8128d3(0xce8)]};}function _0x7ab80b(_0x4fbd4f={}){const _0x16c982=_0x5dbf2a;return _0x4fbd4f[_0x16c982(0x10bb)]||(_0x4fbd4f['internal']?'internal':'http');}function _0x2ae585(_0x59c81a){const _0x415ac8=_0x5dbf2a;if(_0x59c81a[_0x415ac8(0x339)]?.[_0x415ac8(0xbf9)]===!![])return!![];if(_0x59c81a['context']?.[_0x415ac8(0x93f)]?.[_0x415ac8(0xb77)]===!![])return!![];if(_0x59c81a[_0x415ac8(0x339)]?.['auth']?.['ok']===!![])return!![];return![];}function _0x1b97c2(_0xd865b,_0x1887f2){const _0x57ffea=_0x1887f2['split']('.');let _0x230d1a=_0xd865b;for(const _0x58e5f2 of _0x57ffea){_0x230d1a=_0x230d1a?.[_0x58e5f2];}return _0x230d1a||null;}class _0x105b2a{constructor(){const _0x238dc6=_0x5dbf2a;this['middlewares']=[],this[_0x238dc6(0x1078)]=[],this[_0x238dc6(0xea2)]=[],this[_0x238dc6(0xdfb)]=0x5*0x400*0x400,this[_0x238dc6(0x278)]=null,this[_0x238dc6(0x76d)]=new Set(),this[_0x238dc6(0x93f)]={'cookieName':'okdb_session','stateCookieName':'kdb_admin_oauth_state','csrfCookieName':_0x238dc6(0x403)},this[_0x238dc6(0x809)]={},this['_loginStates']=new Map(),this[_0x238dc6(0x829)]=null,this['_jwksCache']=null,this['_jwksNegativeCache']=new Map(),this[_0x238dc6(0x688)]=new _0x58e3a6();}[_0x5dbf2a(0x293)](_0xeb6e2a={}){const _0xfc5876=_0x5dbf2a;return this[_0xfc5876(0x809)]=_0xeb6e2a||{},this[_0xfc5876(0xa12)]=_0xeb6e2a[_0xfc5876(0x259)]??_0xfc5876(0x717),this[_0xfc5876(0x809)];}get[_0x5dbf2a(0x1019)](){const _0x3c6b50=_0x5dbf2a;if(this[_0x3c6b50(0x443)]?.[_0x3c6b50(0x93f)])return this['_okdb']['auth'][_0x3c6b50(0x1019)];return![];}[_0x5dbf2a(0xb76)](){const _0x4159f2=_0x5dbf2a;if(this[_0x4159f2(0x443)]?.['auth'])return this[_0x4159f2(0x443)][_0x4159f2(0x93f)][_0x4159f2(0xb76)]();return this[_0x4159f2(0x809)]||{};}[_0x5dbf2a(0x66f)](_0x3ac5e1){const _0x270323=_0x5dbf2a;this[_0x270323(0x656)]['push'](_0x3ac5e1);}['guard'](_0x63dbe9,_0x5e0df){const _0xcbc82b=_0x5dbf2a;this[_0xcbc82b(0x1078)][_0xcbc82b(0x597)]({'match':_0x63dbe9,'handler':_0x5e0df});}['add'](_0x3d0b82,_0x6ffc57,_0x57e97a,_0x235f84={}){const _0x29d731=_0x5dbf2a,_0xd6806b={'method':_0x30db3b(_0x3d0b82),'path':_0x6ffc57,'matcher':_0x4f6864(_0x6ffc57),'handler':_0x57e97a,'meta':_0x235f84||{}},_0x418b00=_0x28f020(_0xd6806b);_0x273abd(_0xd6806b,_0x418b00),_0xd6806b[_0x29d731(0x4dd)]=_0x418b00,this[_0x29d731(0xea2)][_0x29d731(0x597)](_0xd6806b);}[_0x5dbf2a(0x432)](_0x36da01,_0x177ea5,_0x1ab281,_0x149427={}){const _0x2a0103=_0x5dbf2a;this[_0x2a0103(0x33c)](_0x36da01,_0x177ea5,_0x1ab281,{..._0x149427,'raw':!![]});}[_0x5dbf2a(0xffa)](_0x5e849a,_0x36b72b){const _0x57ebb0=_0x5dbf2a;for(const _0x35b974 of this[_0x57ebb0(0xea2)]){if(_0x35b974[_0x57ebb0(0xfc5)]!==_0x30db3b(_0x5e849a))continue;if(_0x35b974[_0x57ebb0(0x1139)][_0x57ebb0(0x25b)][_0x57ebb0(0xe10)](_0x36b72b))return _0x35b974;}if(_0x30db3b(_0x5e849a)===_0x57ebb0(0xa7d))for(const _0xfb351a of this[_0x57ebb0(0xea2)]){if(_0xfb351a[_0x57ebb0(0x1139)][_0x57ebb0(0x25b)][_0x57ebb0(0xe10)](_0x36b72b)&&_0xfb351a[_0x57ebb0(0x654)]?.['cors'])return _0xfb351a;}return null;}[_0x5dbf2a(0xa2c)](_0x162a7f,_0x3f9649){const _0x2bc5cd=_0x5dbf2a;if(_0x162a7f?.[_0x2bc5cd(0x654)]?.[_0x2bc5cd(0xf0f)])return![];if(_0x3f9649?.['headers']?.['x-okdb-raw-response'])return![];return!![];}[_0x5dbf2a(0x53a)](){const _0x245268=_0x5dbf2a;return this['routes'][_0x245268(0x1103)](_0x2d2541=>!_0x2d2541['meta']?.[_0x245268(0xc59)])['map'](_0x2a4883=>({'method':_0x2a4883[_0x245268(0xfc5)],'path':_0x2a4883[_0x245268(0x20b)],'defaults':_0x2a4883['matcher'][_0x245268(0xabb)],'meta':_0x2a4883[_0x245268(0x654)],'operation':_0x2a4883['operation']}));}[_0x5dbf2a(0x8b3)](_0xdf0b50,_0x4d2bea,_0x3269c0={}){const _0x23fa1b=_0x5dbf2a,{PassThrough:_0x3c2e01}=require$$3;this[_0x23fa1b(0x33c)](_0x23fa1b(0x929),_0xdf0b50,({query:_0x7197fa,headers:_0x232f24,context:_0xe95ee4})=>{const _0x1c456e=_0x23fa1b,_0x55950e=new _0x3c2e01();let _0x5ad0bb=null;const _0x265366={};try{_0xe95ee4?.['req']?.['socket']?.[_0x1c456e(0x73e)](!![]);}catch{}_0x55950e['write'](':\x20connected\x0a\x0a'),_0x5ad0bb=setInterval(()=>{const _0x53f32f=_0x1c456e;try{_0x55950e[_0x53f32f(0x61d)](_0x53f32f(0x261));}catch{}},0x3a98);const _0x466df1=(_0x2a397c,_0x1b89ed,_0x56dc05={})=>{const _0x21cea1=_0x1c456e;try{const _0x1571f7=_0x56dc05[_0x21cea1(0x6cc)]?String(_0x1b89ed??''):JSON['stringify'](_0x1b89ed);_0x55950e[_0x21cea1(0x61d)]('event:\x20'+_0x2a397c+'\x0a');for(const _0x378db8 of _0x1571f7[_0x21cea1(0xfb1)]('\x0a')){_0x55950e[_0x21cea1(0x61d)]('data:\x20'+_0x378db8+'\x0a');}_0x55950e['write']('\x0a');}catch{}},_0xf355d6=()=>{const _0x53c28b=_0x1c456e;_0x5ad0bb&&(clearInterval(_0x5ad0bb),_0x5ad0bb=null);try{_0x55950e[_0x53c28b(0xe69)]();}catch{}},_0x57adcd=(_0xec6c,_0x40581f)=>{_0x265366[_0xec6c]=_0x40581f;};_0xe95ee4?.[_0x1c456e(0x8df)]?.['on'](_0x1c456e(0x11ac),_0xf355d6),_0x55950e['on'](_0x1c456e(0x11ac),_0xf355d6);const _0x360dbe=_0x4d2bea({'send':_0x466df1,'close':_0xf355d6,'query':_0x7197fa??{},'headers':_0x232f24??{},'context':_0xe95ee4,'setHeader':_0x57adcd});return typeof _0x360dbe==='function'&&_0x55950e['on'](_0x1c456e(0x11ac),_0x360dbe),{'status':0xc8,'headers':{'content-type':_0x1c456e(0x836),'cache-control':_0x1c456e(0x26e),'connection':_0x1c456e(0x69f),'x-accel-buffering':'no',..._0x265366},'body':_0x55950e};},{..._0x3269c0,'sse':!![]});}async[_0x5dbf2a(0xdca)](_0x45a3b6,_0x39abd0){const _0x2f75fc=_0x5dbf2a;for(const _0x565282 of this['guards']){if(!_0x565282[_0x2f75fc(0xa0b)](_0x45a3b6))continue;const _0x1c89f3=await _0x565282[_0x2f75fc(0x34c)](_0x45a3b6,_0x39abd0);if(_0x1c89f3===![])return![];}return!![];}async['_runMiddlewares'](_0x1fb1b4,_0x420afb,_0x11e167){let _0x1af601=0x0;const _0x39488e=async()=>{const _0x227dad=this['middlewares'][_0x1af601++];if(!_0x227dad)return _0x11e167();return _0x227dad(_0x1fb1b4,_0x420afb,_0x39488e);};return _0x39488e();}[_0x5dbf2a(0xdee)](_0x3d6f4f,_0x303a90){const _0x2683bf=_0x5dbf2a,{status:status=0xc8,headers:headers={},body:_0x5f05e1}=_0x3d6f4f;if(status>=0x12c&&status<0x190)return _0x3d6f4f;if(_0x1ec984(_0x5f05e1))return _0x3d6f4f;if(Buffer[_0x2683bf(0x1ba)](_0x5f05e1))return _0x3d6f4f;if(typeof _0x5f05e1==='string')return _0x3d6f4f;const _0x3c833d={'time':+_0x303a90[_0x2683bf(0x17c)](0x2)};if(_0x5f05e1?.[_0x2683bf(0x654)]&&typeof _0x5f05e1[_0x2683bf(0x654)]===_0x2683bf(0xb36)){const {time:_0x267fdd,..._0x381d9c}=_0x5f05e1['meta'];Object[_0x2683bf(0x299)](_0x3c833d,_0x381d9c);}let _0x5de9df;if(status>=0x190){const _0x3422bf=_0x386306(status,_0x5f05e1);_0x5de9df={'data':null,'error':_0x3422bf,'meta':_0x3c833d};}else{if(status===0xcc||_0x5f05e1==null)_0x5de9df={'data':null,'error':null,'meta':_0x3c833d};else{let _0xefae59;if(_0x2683bf(0x80e)in _0x5f05e1)_0xefae59=_0x5f05e1[_0x2683bf(0x80e)];else{const {meta:_0x34c251,..._0x3f8091}=_0x5f05e1;_0xefae59=Object[_0x2683bf(0xa52)](_0x3f8091)[_0x2683bf(0x156)]>0x0?_0x3f8091:null;}_0x5de9df={'data':_0xefae59,'error':null,'meta':_0x3c833d};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x5de9df};}async[_0x5dbf2a(0xaf9)](_0x7674c7,_0x37c1e2,_0x555238={},_0x5d9397={}){const _0x2263f6=_0x5dbf2a;_0x7674c7=_0x30db3b(_0x7674c7);const _0x5205c0=this[_0x2263f6(0xffa)](_0x7674c7,_0x37c1e2),_0x23a833={'method':_0x7674c7,'path':_0x37c1e2,'headers':_0x555238['headers']??{},'body':_0x555238[_0x2263f6(0xce8)]??null,'query':_0x555238[_0x2263f6(0xa28)]??{},'context':_0x5d9397,'cookies':_0x2845c1(_0x555238[_0x2263f6(0xcc4)]?.[_0x2263f6(0xc83)]),'route':_0x5205c0,'socket':{'remoteAddress':_0x555238['remoteAddress']??'127.0.0.1'}};_0x23a833['context']=_0x23a833[_0x2263f6(0x339)]||{};!_0x23a833[_0x2263f6(0x339)]['auth']&&(_0x23a833[_0x2263f6(0x339)]['auth']=await this[_0x2263f6(0x617)](_0x23a833));if(_0x23a833[_0x2263f6(0x339)][_0x2263f6(0x93f)]?.['bootstrapBlocked'])return _0x552f29({'status':0x193,'body':{'error':{'code':_0x2263f6(0x1150),'message':'Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.'}}});_0x23a833[_0x2263f6(0x339)][_0x2263f6(0x93f)]?.[_0x2263f6(0x45b)]&&!_0x23a833['context'][_0x2263f6(0x45b)]&&(_0x23a833[_0x2263f6(0x339)][_0x2263f6(0x45b)]=_0x23a833[_0x2263f6(0x339)][_0x2263f6(0x93f)][_0x2263f6(0x45b)]);let _0x356144=null;const _0x2d881b={'status'(_0x4310d1){const _0x24183a=_0x2263f6;_0x356144=_0x356144||{},_0x356144[_0x24183a(0xfcd)]=_0x4310d1;},'setHeader'(_0x3fa9b3,_0x539886){const _0x26895d=_0x2263f6;_0x356144=_0x356144||{},_0x356144[_0x26895d(0xcc4)]=_0x356144[_0x26895d(0xcc4)]||{};const _0x51fd7c=String(_0x3fa9b3)[_0x26895d(0xb52)]();if(_0x51fd7c==='set-cookie'){const _0x268a37=_0x356144['headers'][_0x3fa9b3];if(!_0x268a37)_0x356144[_0x26895d(0xcc4)][_0x3fa9b3]=_0x539886;else{if(Array[_0x26895d(0x10f5)](_0x268a37))_0x268a37[_0x26895d(0x597)](_0x539886);else _0x356144['headers'][_0x3fa9b3]=[_0x268a37,_0x539886];}return;}_0x356144[_0x26895d(0xcc4)][_0x3fa9b3]=_0x539886;},'send'(_0x4c85c8){_0x356144=_0x356144||{},_0x356144['body']=_0x4c85c8;}},_0x5e4553=await this[_0x2263f6(0xdca)](_0x23a833,_0x2d881b);if(!_0x5e4553)return _0x552f29(_0x356144??{'status':0x193});const _0x415053=this[_0x2263f6(0xcf6)](_0x23a833);if(_0x415053)return _0x552f29(_0x415053);const _0x297235=this[_0x2263f6(0x1043)](_0x23a833);if(_0x297235)return _0x552f29(_0x297235);return await this[_0x2263f6(0x21b)](_0x23a833,_0x2d881b,async()=>{const _0x33115a=_0x2263f6,_0x5e9b3a=await this[_0x33115a(0xf4e)](_0x23a833);if(_0x356144==null){_0x356144=_0x5e9b3a;return;}_0x356144=_0x284318(_0x356144,_0x5e9b3a);}),_0x552f29(_0x356144);}[_0x5dbf2a(0xcf6)](_0x371054){const _0xd434e=_0x5dbf2a,_0x2dd187=_0x371054['route']?.['operation'],_0x43e7a8=_0x2dd187?.[_0xd434e(0x2f8)];if(!_0x2dd187?.['hasCanonical']||!_0x43e7a8)return null;if(_0x371054[_0xd434e(0x339)]?.[_0xd434e(0x93f)]?.[_0xd434e(0x717)]===!![]||_0x371054[_0xd434e(0x339)]?.[_0xd434e(0x93f)]?.['isSystem']===!![])return null;const _0x44896d=_0x7ab80b(_0x371054[_0xd434e(0x339)]),_0x2f77f3=Array['isArray'](_0x43e7a8[_0xd434e(0xfd6)])?_0x43e7a8[_0xd434e(0xfd6)]:null;if(_0x43e7a8[_0xd434e(0x960)]&&_0x371054[_0xd434e(0x339)]?.[_0xd434e(0xbf9)]!==!![])return{'status':0x193,'body':{'error':_0xd434e(0xd55)}};if(_0x2f77f3&&_0x2f77f3['length']>0x0&&!_0x2f77f3[_0xd434e(0x29c)](_0x44896d)&&!(_0x44896d===_0xd434e(0xbf9)&&_0x2f77f3['includes']('shell')))return{'status':0x193,'body':{'error':_0xd434e(0xd55)}};if(_0x43e7a8[_0xd434e(0xa90)]&&!_0x2ae585(_0x371054))return{'status':0x191,'body':{'error':_0xd434e(0x6ce)}};const _0x46e0a5=_0x43e7a8[_0xd434e(0x465)];if(!_0x46e0a5)return null;if(_0x371054['context']?.[_0xd434e(0x93f)]?.[_0xd434e(0xaee)]===_0xd434e(0x1d7))return null;const _0x56e142=_0x371054['context']?.[_0xd434e(0x93f)]?.['token'];if(!_0x56e142){if(_0x371054[_0xd434e(0x339)]?.[_0xd434e(0x93f)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':'Forbidden\x20—\x20no\x20permissions\x20available'}};}if(!_0x371054[_0xd434e(0x3f1)]&&_0x371054[_0xd434e(0xd98)]?.[_0xd434e(0x1139)]){const _0x2759ec=_0x371054[_0xd434e(0xd98)][_0xd434e(0x1139)][_0xd434e(0x25b)]['exec'](_0x371054['path']);_0x2759ec&&(_0x371054[_0xd434e(0x3f1)]={},_0x371054[_0xd434e(0xd98)][_0xd434e(0x1139)][_0xd434e(0xa52)]['forEach']((_0x48b8f7,_0xed5b37)=>{const _0x48fa51=_0xd434e,_0x1b7156=_0x2759ec[_0xed5b37+0x1];_0x371054[_0x48fa51(0x3f1)][_0x48b8f7]=_0x1b7156?decodeURIComponent(_0x1b7156):_0x371054['route'][_0x48fa51(0x1139)]['defaults'][_0x48b8f7]??undefined;}));}let _0x53b6de=null;_0x43e7a8[_0xd434e(0x85b)]?.[_0xd434e(0x30b)]&&(_0x53b6de=_0x1b97c2(_0x371054,_0x43e7a8[_0xd434e(0x85b)][_0xd434e(0x30b)]));if(_0x53b6de&&_0x53b6de[_0xd434e(0x8ba)]('~')){const _0x4c41c1=_0x193275(_0x46e0a5),_0xccdef8=_0xfbf069(_0x56e142[_0xd434e(0x6c9)]||[],(_0x56e142[_0xd434e(0x912)]||{})[_0x53b6de]||[]);if(!_0x140826(_0xccdef8,_0x4c41c1))return{'status':0x193,'body':{'error':'Forbidden\x20—\x20requires\x20'+_0x4c41c1+_0xd434e(0x9e9)}};}const _0x31bdc5=_0xfbf069(_0x56e142[_0xd434e(0x6c9)]||[],_0x53b6de?(_0x56e142['grants']||{})[_0x53b6de]||[]:[]);if(!_0x140826(_0x31bdc5,_0x46e0a5))return{'status':0x193,'body':{'error':_0xd434e(0x116c)+_0x46e0a5}};return null;}[_0x5dbf2a(0x1043)](_0x51805a){const _0x59e0a3=_0x5dbf2a,_0x3136d5=_0x51805a[_0x59e0a3(0xd98)],_0x5231de=_0x3136d5?.[_0x59e0a3(0x4dd)];if(!_0x5231de?.[_0x59e0a3(0xb07)]||!_0x5231de['inputSchema'])return null;let _0x148458=_0x51805a[_0x59e0a3(0x3f1)]??null;if(!_0x148458&&_0x3136d5?.[_0x59e0a3(0x1139)]){const _0x4e4713=_0x3136d5[_0x59e0a3(0x1139)][_0x59e0a3(0x25b)][_0x59e0a3(0xe6)](_0x51805a[_0x59e0a3(0x20b)]);_0x4e4713&&(_0x148458={},_0x3136d5[_0x59e0a3(0x1139)][_0x59e0a3(0xa52)][_0x59e0a3(0x632)]((_0x2098d5,_0x2ae180)=>{const _0x52ee05=_0x59e0a3,_0x9b8db8=_0x4e4713[_0x2ae180+0x1];_0x148458[_0x2098d5]=_0x9b8db8?decodeURIComponent(_0x9b8db8):_0x3136d5['matcher'][_0x52ee05(0xabb)][_0x2098d5]??undefined;}));}const _0x365c85=_0x24ca8e(_0x3136d5,_0x148458??{},_0x51805a['query']??{},_0x51805a[_0x59e0a3(0xce8)],_0x51805a[_0x59e0a3(0xcc4)]??{}),_0x5db667=_0x5d54f5(_0x3136d5,_0x365c85||{});if(!_0x5db667)return null;const _0xf78b11=_0x140145(_0x5db667[_0x59e0a3(0x736)]);return{'status':0x190,'body':{'error':_0x5db667[_0x59e0a3(0x1f8)],'code':_0x5db667[_0x59e0a3(0x1f8)],'message':_0xf78b11?_0x59e0a3(0x243)+_0xf78b11:_0x59e0a3(0xc1f),'details':_0x5db667['errors']}};}[_0x5dbf2a(0xfde)](_0x3ba88f,_0x3e1957){const _0x4e85e8=_0x5dbf2a,_0x8fcaf2=_0x5d54f5(_0x3ba88f,_0x3e1957||{});if(!_0x8fcaf2)return null;return{'code':_0x8fcaf2[_0x4e85e8(0x1f8)],'message':_0x140145(_0x8fcaf2[_0x4e85e8(0x736)])?_0x4e85e8(0x243)+_0x140145(_0x8fcaf2['errors']):_0x4e85e8(0xc1f),'details':_0x8fcaf2[_0x4e85e8(0x736)]};}async[_0x5dbf2a(0xf4e)](_0x311a7a){const _0x6f5aed=_0x5dbf2a;if(_0x311a7a[_0x6f5aed(0xfc5)]==='OPTIONS')for(const _0x347388 of this[_0x6f5aed(0xea2)]){const _0x1af979=_0x347388['matcher'][_0x6f5aed(0x25b)][_0x6f5aed(0xe6)](_0x311a7a[_0x6f5aed(0x20b)]);if(!_0x1af979||!_0x347388['meta']?.[_0x6f5aed(0x7d2)])continue;return{'status':0xcc,'headers':_0x117442(_0x311a7a['headers'],_0x347388['meta'][_0x6f5aed(0x7d2)],_0x347388['method'])||{}};}for(const _0x25d238 of this['routes']){if(_0x25d238['method']!==_0x311a7a[_0x6f5aed(0xfc5)])continue;const _0x3c8eb2=_0x25d238[_0x6f5aed(0x1139)][_0x6f5aed(0x25b)]['exec'](_0x311a7a[_0x6f5aed(0x20b)]);if(!_0x3c8eb2)continue;const _0x578973={};_0x25d238[_0x6f5aed(0x1139)][_0x6f5aed(0xa52)][_0x6f5aed(0x632)]((_0x36bf0a,_0x4e6881)=>{const _0x2f6582=_0x3c8eb2[_0x4e6881+0x1];_0x578973[_0x36bf0a]=_0x2f6582?decodeURIComponent(_0x2f6582):_0x25d238['matcher']['defaults'][_0x36bf0a]??undefined;}),_0x311a7a[_0x6f5aed(0x3f1)]=_0x578973;try{const _0x32992b=await _0x25d238[_0x6f5aed(0x34c)]({'params':_0x578973,'body':_0x311a7a[_0x6f5aed(0xce8)],'query':_0x311a7a['query'],'headers':_0x311a7a[_0x6f5aed(0xcc4)],'context':_0x311a7a[_0x6f5aed(0x339)]}),_0x444f30=_0x552f29(_0x32992b),_0x26aaa0=_0x117442(_0x311a7a[_0x6f5aed(0xcc4)],_0x25d238[_0x6f5aed(0x654)]?.['cors'],_0x25d238[_0x6f5aed(0xfc5)]);if(!_0x26aaa0)return _0x444f30;return{..._0x444f30,'headers':{..._0x444f30[_0x6f5aed(0xcc4)]||{},..._0x26aaa0}};}catch(_0x14ce0b){const _0x22c11e=_0x14ce0b?.[_0x6f5aed(0xfcd)]||_0x1ef5fc[_0x14ce0b?.[_0x6f5aed(0x1f8)]]||0x1f4;return{'status':_0x22c11e,'body':{'error':_0x14ce0b['message']||'Internal\x20error','code':_0x14ce0b?.[_0x6f5aed(0x1f8)]||_0x1706df[_0x22c11e]||_0x6f5aed(0x5c1)+_0x22c11e,'message':_0x14ce0b?.[_0x6f5aed(0xb4e)]||_0x6f5aed(0xd77),..._0x14ce0b?.[_0x6f5aed(0x933)]!=null?{'details':_0x14ce0b[_0x6f5aed(0x933)]}:{}}};}}return{'status':0x194,'body':{'error':_0x6f5aed(0x126)}};}[_0x5dbf2a(0x45e)](_0x585ce3){const _0x1c9f18=_0x5dbf2a;if(this[_0x1c9f18(0x278)])throw new Error(_0x1c9f18(0x357));_0x585ce3&&this['auth'][_0x1c9f18(0x950)]==='okdb_session'&&(this['auth'][_0x1c9f18(0x950)]=_0x1c9f18(0x1164)+_0x585ce3,this[_0x1c9f18(0x443)]?.[_0x1c9f18(0x93f)]&&(this[_0x1c9f18(0x443)][_0x1c9f18(0x93f)]['_cookieName']=this[_0x1c9f18(0x93f)]['cookieName']));const _0x1e6a7e=this[_0x1c9f18(0x443)]?.['options']?.[_0x1c9f18(0xef)]?.[_0x1c9f18(0xa1e)]??![];return this[_0x1c9f18(0x278)]=_0x21e823[_0x1c9f18(0x2bf)](async(_0x400175,_0x5dab54)=>{const _0x59bc42=_0x1c9f18,_0x2e18fe=Date[_0x59bc42(0x555)]();if(_0x1e6a7e){const _0x2afddb=_0x400175[_0x59bc42(0xb14)]||'/',_0x1724b1=_0x400175[_0x59bc42(0xcc4)]?.['authorization']?_0x400175[_0x59bc42(0xcc4)][_0x59bc42(0x714)]['replace'](/^Bearer\s+(\S{0,8})\S*/i,_0x59bc42(0x10ef)):'-',_0x53472b=_0x400175[_0x59bc42(0xcc4)]?.[_0x59bc42(0x31f)]||'-',_0xda18a=_0x400175[_0x59bc42(0xcc4)]?.[_0x59bc42(0xf9e)]||_0x400175[_0x59bc42(0xcc4)]?.[_0x59bc42(0xe75)]||'-',_0x23441f=_0x400175['headers']?.['origin']||'-';process['stdout'][_0x59bc42(0x61d)](_0x59bc42(0x118f)+_0x400175[_0x59bc42(0xfc5)][_0x59bc42(0x37d)](0x7)+'\x20'+_0x2afddb[_0x59bc42(0x37d)](0x2d)+'\x20'+(_0x59bc42(0xc7c)+_0x1724b1+_0x59bc42(0x393)+_0x23441f+_0x59bc42(0xdf3)+_0x53472b+_0x59bc42(0x585)+_0xda18a+'\x0a'));}try{const _0x1367d7=new _0xe61099(_0x400175[_0x59bc42(0xb14)],_0x59bc42(0x1216)+_0x400175[_0x59bc42(0xcc4)][_0x59bc42(0x598)]),_0x5020cf=this[_0x59bc42(0xffa)](_0x400175[_0x59bc42(0xfc5)],_0x1367d7[_0x59bc42(0x120a)]),_0x3da4df=_0x5020cf?.[_0x59bc42(0x654)]?.[_0x59bc42(0x6cc)]===!![];if(_0x3da4df){const _0x24c32e=_0x400175[_0x59bc42(0xcc4)]?.[_0x59bc42(0x31a)];if(_0x24c32e!=null){const _0x506f7d=Number(_0x24c32e);if(Number['isFinite'](_0x506f7d)&&_0x506f7d>this['maxBodyBytes']){_0x5dab54['statusCode']=0x19d,_0x5dab54[_0x59bc42(0xc9c)](_0x59bc42(0x983));return;}}}const _0x34f670=_0x3da4df?null:await _0x643663(_0x400175,this[_0x59bc42(0xdfb)]),_0x27ca8b=_0x3da4df?_0x2b0e6b(_0x400175,this[_0x59bc42(0xdfb)]):undefined,_0x369c4f=await this[_0x59bc42(0xaf9)](_0x400175[_0x59bc42(0xfc5)],_0x1367d7['pathname'],{'body':_0x34f670,'query':Object['fromEntries'](_0x1367d7[_0x59bc42(0x466)][_0x59bc42(0x1129)]()),'headers':_0x400175[_0x59bc42(0xcc4)]},{'req':_0x400175,'res':_0x5dab54,'rawStream':_0x27ca8b}),_0x483b03=this[_0x59bc42(0xffa)](_0x400175[_0x59bc42(0xfc5)],_0x1367d7['pathname']),_0x29bbeb=Date[_0x59bc42(0x555)]()-_0x2e18fe,_0x256efd=this[_0x59bc42(0xa2c)](_0x483b03,_0x369c4f)?this['_wrapApiResponse'](_0x369c4f,_0x29bbeb):_0x552f29(_0x369c4f),_0x17d228=(_0x256efd[_0x59bc42(0xfcd)]||0xc8)>=0x190;this[_0x59bc42(0x688)][_0x59bc42(0xd20)](_0x400175[_0x59bc42(0xfc5)],_0x29bbeb,_0x17d228),_0x4a0ad7(_0x5dab54,_0x256efd);if(_0x1e6a7e){const _0x692e60=_0x256efd[_0x59bc42(0xfcd)]||0xc8,_0x1ac1de=Date[_0x59bc42(0x555)]()-_0x2e18fe;process[_0x59bc42(0x1170)]['write'](_0x59bc42(0xa11)+_0x400175[_0x59bc42(0xfc5)][_0x59bc42(0x37d)](0x7)+'\x20'+_0x1367d7[_0x59bc42(0x120a)][_0x59bc42(0x37d)](0x2d)+'\x20'+_0x692e60+'\x20\x20'+_0x1ac1de+'ms\x0a');}}catch(_0x4acb99){const _0x5cc050=Date[_0x59bc42(0x555)]()-_0x2e18fe;this[_0x59bc42(0x688)][_0x59bc42(0xd20)](_0x400175[_0x59bc42(0xfc5)],_0x5cc050,!![]);const _0x18bacc=_0x4acb99?.[_0x59bc42(0xfcd)]||0x1f4;_0x5dab54[_0x59bc42(0xeda)]=_0x18bacc,_0x18bacc===0x19d?_0x5dab54[_0x59bc42(0xc9c)](_0x59bc42(0x983)):_0x5dab54['end'](_0x4acb99['message']||_0x59bc42(0xd77));}}),this['server']['on'](_0x1c9f18(0xf31),_0x27c961=>{const _0x536723=_0x1c9f18;this[_0x536723(0x76d)][_0x536723(0x33c)](_0x27c961),_0x27c961['on'](_0x536723(0x11ac),()=>this[_0x536723(0x76d)]['delete'](_0x27c961));}),this[_0x1c9f18(0x278)][_0x1c9f18(0x45e)](_0x585ce3),this[_0x1c9f18(0x278)];}async[_0x5dbf2a(0x11ac)](_0xd9c774={}){const _0x12291a=_0x5dbf2a,_0x56bee5=this[_0x12291a(0x278)];this[_0x12291a(0x278)]=null;if(_0x56bee5){const _0x5542b6=Number['isFinite'](_0xd9c774[_0x12291a(0xa8)])?Math[_0x12291a(0x10bf)](0x0,_0xd9c774[_0x12291a(0xa8)]):0x3e8;await new Promise(_0x108a38=>{const _0x2ecdf6=_0x12291a;let _0x5029fe=![],_0x307a14=null,_0x770b81=null;const _0x432aa9=()=>{if(_0x5029fe)return;_0x5029fe=!![];if(_0x307a14)clearTimeout(_0x307a14);if(_0x770b81)clearTimeout(_0x770b81);_0x108a38();};try{_0x56bee5[_0x2ecdf6(0x11ac)](_0x432aa9);}catch{_0x432aa9();return;}try{_0x56bee5[_0x2ecdf6(0x2e9)]?.();}catch{}_0x307a14=setTimeout(()=>{const _0x2c5ef7=_0x2ecdf6;try{_0x56bee5[_0x2c5ef7(0x709)]?.();}catch{}for(const _0x4b25bf of this['_sockets']){try{_0x4b25bf[_0x2c5ef7(0xe69)]();}catch{}}_0x770b81=setTimeout(_0x432aa9,0x64),_0x770b81[_0x2c5ef7(0xba4)]?.();},_0x5542b6),_0x307a14[_0x2ecdf6(0xba4)]?.();});}this[_0x12291a(0x688)]&&this[_0x12291a(0x688)][_0x12291a(0x11ac)]();}[_0x5dbf2a(0xf19)](_0x24711d,_0x54054f,_0xc5acab=0x36ee80){const _0x3be031=_0x5dbf2a,_0x245822=Date['now'](),_0x2cf4c5=Buffer[_0x3be031(0x9f8)](JSON[_0x3be031(0xf75)]({'iat':_0x245822,'exp':_0x245822+_0xc5acab,..._0x24711d}))[_0x3be031(0x583)]('base64url'),_0x15bf45=_0x2a5f46(_0x2cf4c5,_0x54054f);return _0x2cf4c5+'.'+_0x15bf45;}[_0x5dbf2a(0x9fe)](_0x16809a,_0x4cfa7c={}){const _0x12e4e1=_0x5dbf2a,{httpOnly:httpOnly=!![],sameSite:sameSite='Lax',path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x4cfa7c;let _0xff8526=this[_0x12e4e1(0x93f)][_0x12e4e1(0x950)]+'='+_0x16809a;if(httpOnly)_0xff8526+=_0x12e4e1(0x95);if(sameSite)_0xff8526+=_0x12e4e1(0xc47)+sameSite;if(path)_0xff8526+=_0x12e4e1(0xe58)+path;if(secure)_0xff8526+=_0x12e4e1(0x706);if(Number['isFinite'](maxAge))_0xff8526+=_0x12e4e1(0xbcd)+Math[_0x12e4e1(0x10bf)](0x0,Math[_0x12e4e1(0xf9a)](maxAge));if(expires instanceof Date)_0xff8526+=_0x12e4e1(0x217)+expires[_0x12e4e1(0x10e)]();return _0xff8526;}['clearCookie'](_0x422753=this['auth'][_0x5dbf2a(0x950)],_0x529656={}){const _0x33a3ef=_0x5dbf2a,{path:path='/',sameSite:sameSite=_0x33a3ef(0xec8),secure:secure=![],httpOnly:httpOnly=!![]}=_0x529656;let _0x1080c8=_0x422753+'=';if(httpOnly)_0x1080c8+=';\x20HttpOnly';if(sameSite)_0x1080c8+=_0x33a3ef(0xc47)+sameSite;if(path)_0x1080c8+=_0x33a3ef(0xe58)+path;if(secure)_0x1080c8+=_0x33a3ef(0x706);return _0x1080c8+=_0x33a3ef(0x316),_0x1080c8;}[_0x5dbf2a(0x6a0)](_0x2cfbfb,_0x1391f4){const _0x33dfc4=_0x5dbf2a;if(!_0x2cfbfb)return null;const [_0x523e11,_0x29ee42]=String(_0x2cfbfb)['split']('.');if(!_0x523e11||!_0x29ee42)return null;const _0x54dca7=_0x2a5f46(_0x523e11,_0x1391f4);if(!_0xd001a6(_0x29ee42,_0x54dca7))return null;try{const _0x312e0a=JSON[_0x33dfc4(0xdcd)](Buffer['from'](_0x523e11,_0x33dfc4(0xb6e))[_0x33dfc4(0x583)]());if(_0x312e0a['exp']<=Date[_0x33dfc4(0x555)]())return null;return _0x312e0a;}catch{return null;}}[_0x5dbf2a(0xaca)](_0x467906){const _0x50efc0=_0x5dbf2a;if(this['_okdb']?.[_0x50efc0(0x93f)])return this[_0x50efc0(0x443)][_0x50efc0(0x93f)][_0x50efc0(0xaca)](_0x467906);return _0x12ef01(_0x467906);}[_0x5dbf2a(0x1121)](_0x4adea7){const _0x39dd32=_0x5dbf2a;if(this[_0x39dd32(0x443)]?.['auth'])return this[_0x39dd32(0x443)][_0x39dd32(0x93f)]['issueToken'](_0x4adea7);const _0x1aa012=this[_0x39dd32(0x809)]?.['tokenTtl']??0x36ee80,_0x1a823e=this[_0x39dd32(0x809)]?.[_0x39dd32(0x503)];return _0xef5a90(_0x4adea7,_0x1a823e,_0x1aa012);}[_0x5dbf2a(0x526)](_0x1a276e){const _0x43bd66=_0x5dbf2a;if(this[_0x43bd66(0x443)]?.[_0x43bd66(0x93f)])return this['_okdb'][_0x43bd66(0x93f)][_0x43bd66(0x526)](_0x1a276e);const _0x325a77=this[_0x43bd66(0x809)]?.[_0x43bd66(0x503)];return _0x5be0dc(_0x1a276e,_0x325a77);}async[_0x5dbf2a(0x617)](_0x2694b3){const _0xf0af1b=_0x5dbf2a;if(this[_0xf0af1b(0x443)]?.[_0xf0af1b(0x93f)])return this[_0xf0af1b(0x443)][_0xf0af1b(0x93f)][_0xf0af1b(0x617)](_0x2694b3);if(_0x2694b3['context']?.[_0xf0af1b(0xbf9)]===!![]||this['authMode']==='open')return{'id':_0xf0af1b(0x83e),'username':_0xf0af1b(0x83e),'roles':[_0xf0af1b(0x90a)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':'system','username':_0xf0af1b(0x83e),'roles':[_0xf0af1b(0x90a)],'isAuthenticated':!![],'isSystem':!![]}};const _0x43f8fc=this['parseBearer'](_0x2694b3[_0xf0af1b(0xcc4)]?.['authorization']),_0x34665b=_0x2694b3[_0xf0af1b(0x1124)]?.[this[_0xf0af1b(0x93f)]['cookieName']],_0x1f8421=_0x43f8fc||_0x34665b;if(!_0x1f8421)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x1b14a4=this[_0xf0af1b(0x526)](_0x1f8421);if(!_0x1b14a4)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x3650af={'id':_0x1b14a4[_0xf0af1b(0x52e)]??null,'username':_0x1b14a4['username']??null,'roles':Array['isArray'](_0x1b14a4[_0xf0af1b(0xa6d)])?_0x1b14a4[_0xf0af1b(0xa6d)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x3650af['id'],'username':_0x3650af[_0xf0af1b(0xdab)],'roles':_0x3650af['roles'],'isAuthenticated':!![],'isSystem':![],'user':_0x3650af,'claims':_0x1b14a4,'subject':_0x3650af['id']};}async[_0x5dbf2a(0xc28)](_0x43b813,_0xe8be38={}){const _0x27bd60=_0x5dbf2a,_0x1f29a4=_0x32c286(_0x43b813),_0x13aa49=Array[_0x27bd60(0x10f5)](_0xe8be38[_0x27bd60(0xbef)])&&_0xe8be38[_0x27bd60(0xbef)][_0x27bd60(0x156)]>0x0?_0xe8be38[_0x27bd60(0xbef)]:[_0x27bd60(0x1012),_0x27bd60(0x10c7)],_0x32b243=_0x1f29a4[_0x27bd60(0x3f8)]?.['alg'];if(!_0x13aa49[_0x27bd60(0x29c)](_0x32b243))throw new Error('Unsupported\x20JWT\x20alg:\x20'+_0x32b243);if(!_0x1f29a4[_0x27bd60(0x3f8)]?.['kid'])throw new Error(_0x27bd60(0x995));const _0x1048cb=await this[_0x27bd60(0xbca)](_0xe8be38);if(!_0x1048cb?.[_0x27bd60(0x4e9)])throw new Error(_0x27bd60(0x3f7));const _0x48ad65=await this[_0x27bd60(0x926)](_0x1048cb[_0x27bd60(0x4e9)],_0x1f29a4[_0x27bd60(0x3f8)][_0x27bd60(0xe91)],_0xe8be38);if(!_0x4324d2(_0x32b243,_0x48ad65,_0x1f29a4[_0x27bd60(0x5b1)],_0x1f29a4['signature']))throw new Error('JWT\x20signature\x20verification\x20failed');const _0x1db87f=Math[_0x27bd60(0xf9a)](Date['now']()/0x3e8),_0x313217=_0x1f29a4[_0x27bd60(0x3c3)]||{};if(_0x313217['iss']!==_0x1048cb[_0x27bd60(0x7ce)])throw new Error('JWT\x20issuer\x20mismatch');const _0x4a59e0=_0xe8be38[_0x27bd60(0x979)];if(_0x4a59e0){const _0x46f557=_0x38d85c(_0x313217[_0x27bd60(0x28a)]);if(!_0x46f557[_0x27bd60(0x29c)](_0x4a59e0))throw new Error(_0x27bd60(0x111));}if(typeof _0x313217[_0x27bd60(0x116f)]!=='number'||_0x313217['exp']<=_0x1db87f)throw new Error('JWT\x20expired');if(_0x313217[_0x27bd60(0xb3a)]!=null&&_0x313217[_0x27bd60(0xb3a)]>_0x1db87f)throw new Error(_0x27bd60(0xbf));if(_0x313217['token_use']==='id')throw new Error(_0x27bd60(0x407));return{'subject':_0x313217['sub']??null,'email':_0x313217['email']??null,'scopes':typeof _0x313217[_0x27bd60(0x85b)]===_0x27bd60(0xf7a)?_0x313217[_0x27bd60(0x85b)][_0x27bd60(0xfb1)](/\s+/)[_0x27bd60(0x1103)](Boolean):[],'claims':_0x313217,'tokenType':_0x27bd60(0x2f8)};}async[_0x5dbf2a(0xbca)](_0x2a89c9={}){const _0x2f4121=_0x5dbf2a,_0x1fb26b=String(_0x2a89c9[_0x2f4121(0x7ce)]||'')['replace'](/\/+$/,'');if(!_0x1fb26b)return null;const _0x1c65fb=Number[_0x2f4121(0x2b5)](_0x2a89c9[_0x2f4121(0x2d7)])?_0x2a89c9[_0x2f4121(0x2d7)]:0xa*0x3c*0x3e8;if(this['_oidcDiscoveryCache']?.[_0x2f4121(0x7ce)]===_0x1fb26b&&this[_0x2f4121(0x829)]['expiresAt']>Date[_0x2f4121(0x555)]())return this[_0x2f4121(0x829)][_0x2f4121(0x568)];const _0xf53812=await _0x530388(_0x1fb26b+'/.well-known/openid-configuration'),_0x269bd1={'issuer':_0xf53812['issuer']||_0x1fb26b,'authorization_endpoint':_0x2a89c9[_0x2f4121(0x2fc)]||_0xf53812['authorization_endpoint'],'token_endpoint':_0x2a89c9['tokenUrl']||_0xf53812[_0x2f4121(0x844)],'jwks_uri':_0x2a89c9['jwksUri']||_0xf53812['jwks_uri']};return this['_oidcDiscoveryCache']={'issuer':_0x1fb26b,'value':_0x269bd1,'expiresAt':Date['now']()+_0x1c65fb},_0x269bd1;}async[_0x5dbf2a(0x3b7)](_0x343a81,_0x34caa3=0x5*0x3c*0x3e8){const _0xd4e4c4=_0x5dbf2a,_0x3b2ff3=await _0x530388(_0x343a81),_0xcb2524=new Map();for(const _0x531d1c of _0x3b2ff3[_0xd4e4c4(0xa52)]||[]){if(!_0x531d1c?.[_0xd4e4c4(0xe91)])continue;_0xcb2524[_0xd4e4c4(0x211)](_0x531d1c[_0xd4e4c4(0xe91)],_0x20b6ac(_0x531d1c));}return this[_0xd4e4c4(0xde5)]={'uri':_0x343a81,'keys':_0xcb2524,'expiresAt':Date[_0xd4e4c4(0x555)]()+_0x34caa3},this[_0xd4e4c4(0xde5)];}async['_getJwkKey'](_0xbcb309,_0x729de3,_0x5b16f2={}){const _0x5ac0fe=_0x5dbf2a,_0x2cd6a0=Number[_0x5ac0fe(0x2b5)](_0x5b16f2[_0x5ac0fe(0x40d)])?_0x5b16f2[_0x5ac0fe(0x40d)]:0x5*0x3c*0x3e8,_0x3eaf7d=0x1e*0x3e8,_0x7902aa=this[_0x5ac0fe(0x1241)]['get'](_0x729de3);if(_0x7902aa!==undefined&&_0x7902aa>Date['now']())throw new Error(_0x5ac0fe(0x108e)+_0x729de3);(!this['_jwksCache']||this[_0x5ac0fe(0xde5)][_0x5ac0fe(0x3d4)]!==_0xbcb309||this[_0x5ac0fe(0xde5)]['expiresAt']<=Date[_0x5ac0fe(0x555)]())&&await this[_0x5ac0fe(0x3b7)](_0xbcb309,_0x2cd6a0);let _0x25ea33=this[_0x5ac0fe(0xde5)]?.[_0x5ac0fe(0xa52)]?.[_0x5ac0fe(0xbeb)](_0x729de3);if(_0x25ea33)return _0x25ea33;await this[_0x5ac0fe(0x3b7)](_0xbcb309,_0x2cd6a0),_0x25ea33=this[_0x5ac0fe(0xde5)]?.[_0x5ac0fe(0xa52)]?.[_0x5ac0fe(0xbeb)](_0x729de3);if(!_0x25ea33){this[_0x5ac0fe(0x1241)][_0x5ac0fe(0x211)](_0x729de3,Date[_0x5ac0fe(0x555)]()+_0x3eaf7d);throw new Error('Unknown\x20JWKS\x20kid:\x20'+_0x729de3);}return _0x25ea33;}[_0x5dbf2a(0x1172)](_0x5ad334){const _0x527b1a=_0x5dbf2a;if(this['_okdb']?.[_0x527b1a(0x93f)])return this['_okdb'][_0x527b1a(0x93f)][_0x527b1a(0x1172)](_0x5ad334);const _0x265316=_0x5ad334?.[_0x527b1a(0x525)]||{},_0x2a0387={'sub':_0x5ad334?.[_0x527b1a(0x155)]??_0x265316['sub']??null,'email':_0x5ad334?.['email']??_0x265316[_0x527b1a(0x5d0)]??null,'name':_0x5ad334?.[_0x527b1a(0x1173)]??_0x265316[_0x527b1a(0x1173)]??_0x265316['preferred_username']??null,'groups':_0x5ad334?.[_0x527b1a(0xa59)]??_0x265316['groups']??[],'roles':_0x5ad334?.['roles']??_0x265316[_0x527b1a(0xa6d)]??[]};return{'type':_0x527b1a(0xce9),'tokenType':_0x5ad334?.[_0x527b1a(0x123c)]??_0x527b1a(0x2f8),'subject':_0x2a0387[_0x527b1a(0x52e)],'email':_0x2a0387[_0x527b1a(0x5d0)],'scopes':_0x5ad334?.[_0x527b1a(0x10a4)]??_0x265316[_0x527b1a(0x85b)]?.[_0x527b1a(0xfb1)]?.('\x20')?.[_0x527b1a(0x1103)](Boolean)??[],'claims':_0x265316,'user':_0x2a0387,'isAuthenticated':!![]};}[_0x5dbf2a(0xebb)](_0x348686={},_0x1d4e53=0x927c0){const _0x289fbf=_0x5dbf2a;if(this[_0x289fbf(0x443)]?.[_0x289fbf(0x93f)])return this['_okdb'][_0x289fbf(0x93f)]['createLoginState'](_0x348686,_0x1d4e53);const _0x302b96=_0x1e3250(0x18);this[_0x289fbf(0x291)]['set'](_0x302b96,{..._0x348686,'exp':Date['now']()+_0x1d4e53});if(this[_0x289fbf(0x291)][_0x289fbf(0xfb)]%0x32===0x0){const _0x4f91fa=Date[_0x289fbf(0x555)]();for(const [_0x102476,_0x21f512]of this[_0x289fbf(0x291)]){if(_0x21f512['exp']<=_0x4f91fa)this[_0x289fbf(0x291)]['delete'](_0x102476);}}return _0x302b96;}['consumeLoginState'](_0x52cc40){const _0x5d5097=_0x5dbf2a;if(this['_okdb']?.[_0x5d5097(0x93f)])return this[_0x5d5097(0x443)][_0x5d5097(0x93f)][_0x5d5097(0x105a)](_0x52cc40);if(!_0x52cc40)return null;const _0x42ff2e=this[_0x5d5097(0x291)][_0x5d5097(0xbeb)](_0x52cc40);this[_0x5d5097(0x291)]['delete'](_0x52cc40);if(!_0x42ff2e)return null;if(_0x42ff2e[_0x5d5097(0x116f)]<=Date[_0x5d5097(0x555)]())return null;return _0x42ff2e;}}function _0x552f29(_0x4ca3b7){const _0x5d9550=_0x5dbf2a;if(_0x4ca3b7==null)return{'status':0xcc};if(Buffer[_0x5d9550(0x1ba)](_0x4ca3b7)||_0x1ec984(_0x4ca3b7))return{'status':0xc8,'body':_0x4ca3b7};if(typeof _0x4ca3b7===_0x5d9550(0xb36)&&_0x5d9550(0xfcd)in _0x4ca3b7){if(!(_0x5d9550(0xce8)in _0x4ca3b7)&&!_0x1ec984(_0x4ca3b7['body'])){const {status:_0x3f3b85,headers:_0x3e87fd,..._0x3b4a17}=_0x4ca3b7;if(Object[_0x5d9550(0xa52)](_0x3b4a17)[_0x5d9550(0x156)]>0x0)return{'status':_0x3f3b85,'headers':_0x3e87fd,'body':_0x3b4a17};}return _0x4ca3b7;}return{'status':0xc8,'body':_0x4ca3b7};}function _0x1ec984(_0x368c32){const _0x39841e=_0x5dbf2a;return _0x368c32&&typeof _0x368c32[_0x39841e(0xe12)]===_0x39841e(0x63b);}function _0x2b0e6b(_0x5ec405,_0x3e3f45){const _0x3ca423=_0x5dbf2a,{PassThrough:_0x461bea}=require$$3;let _0x1b4c85=0x0,_0x29ab29=![];const _0x2b2901=new _0x461bea();return _0x5ec405['on']('data',_0x4a2083=>{const _0x53cf29=_0x47ab;if(_0x29ab29)return;_0x1b4c85+=_0x4a2083[_0x53cf29(0x156)];if(_0x1b4c85>_0x3e3f45){_0x29ab29=!![];const _0x32bb6e=new Error(_0x53cf29(0x983));_0x32bb6e[_0x53cf29(0xfcd)]=0x19d,_0x2b2901[_0x53cf29(0xe69)](_0x32bb6e);return;}if(!_0x2b2901['destroyed'])_0x2b2901[_0x53cf29(0x597)](_0x4a2083);}),_0x5ec405['on'](_0x3ca423(0xc9c),()=>{const _0x278e3f=_0x3ca423;!_0x29ab29&&!_0x2b2901[_0x278e3f(0xef1)]&&(_0x29ab29=!![],_0x2b2901[_0x278e3f(0xc9c)]());}),_0x5ec405['on'](_0x3ca423(0x225),_0x559c5d=>{const _0x41825d=_0x3ca423;if(!_0x2b2901[_0x41825d(0xef1)])_0x2b2901['destroy'](_0x559c5d);}),_0x5ec405[_0x3ca423(0x315)](),_0x2b2901['on'](_0x3ca423(0x445),()=>{const _0x35aa80=_0x3ca423;if(!_0x2b2901[_0x35aa80(0xef1)])_0x5ec405[_0x35aa80(0x445)]();}),_0x2b2901;}function _0x643663(_0x42a77e,_0x3f6e59){const _0x590efe=_0x5dbf2a;if(_0x42a77e[_0x590efe(0xfc5)]===_0x590efe(0x929)||_0x42a77e[_0x590efe(0xfc5)]===_0x590efe(0x81f))return null;const _0x3ce013=_0x42a77e['headers']?.[_0x590efe(0x31a)];if(_0x3ce013!=null){const _0x3d42cb=Number(_0x3ce013);if(Number[_0x590efe(0x2b5)](_0x3d42cb)&&_0x3d42cb>_0x3f6e59){const _0x42a0aa=new Error('Payload\x20too\x20large');_0x42a0aa[_0x590efe(0xfcd)]=0x19d;throw _0x42a0aa;}}return new Promise((_0x4fdb69,_0x3b16ac)=>{const _0x5b5d48=_0x590efe;let _0x5b1522='',_0x1a9866=0x0;_0x42a77e['on']('data',_0x264951=>{const _0x302d94=_0x47ab;_0x1a9866+=_0x264951[_0x302d94(0x156)];if(_0x1a9866>_0x3f6e59){try{_0x42a77e[_0x302d94(0xe69)]();}catch{}const _0x488b8c=new Error(_0x302d94(0x983));_0x488b8c[_0x302d94(0xfcd)]=0x19d,_0x3b16ac(_0x488b8c);return;}_0x5b1522+=_0x264951;}),_0x42a77e['on'](_0x5b5d48(0xc9c),()=>{const _0x2469a4=_0x5b5d48;if(!_0x5b1522)return _0x4fdb69(null);const _0x55bffb=_0x42a77e[_0x2469a4(0xcc4)]?.['content-type']||'';if(_0x55bffb[_0x2469a4(0x29c)]('application/x-www-form-urlencoded')){const _0x36bad7={};for(const [_0x560e30,_0x565a29]of new URLSearchParams(_0x5b1522))_0x36bad7[_0x560e30]=_0x565a29;return _0x4fdb69(_0x36bad7);}try{_0x4fdb69(JSON[_0x2469a4(0xdcd)](_0x5b1522));}catch(_0x287711){_0x3b16ac(_0x287711);}}),_0x42a77e['on']('error',_0x3b16ac);});}function _0x4a0ad7(_0x118846,_0x25e50e){const _0x21c286=_0x5dbf2a,{status:status=0xc8,headers:headers={},body:_0x677f91}=_0x25e50e;_0x118846['statusCode']=status;for(const [_0x45410d,_0x3b9248]of Object['entries'](headers)){_0x118846[_0x21c286(0x826)](_0x45410d,_0x3b9248);}if(_0x677f91==null){_0x118846[_0x21c286(0xc9c)]();return;}if(_0x1ec984(_0x677f91)){_0x677f91[_0x21c286(0xe12)](_0x118846);return;}if(Buffer[_0x21c286(0x1ba)](_0x677f91)){_0x118846['end'](_0x677f91);return;}if(typeof _0x677f91===_0x21c286(0xb36)){!_0x118846['getHeader'](_0x21c286(0x6b8))&&_0x118846[_0x21c286(0x826)](_0x21c286(0x6b8),_0x21c286(0xf9b));_0x118846[_0x21c286(0xc9c)](JSON['stringify'](_0x677f91));return;}_0x118846[_0x21c286(0xc9c)](String(_0x677f91));}return okdbHttp=_0x105b2a,okdbHttp;}var okdbLogger,hasRequiredOkdbLogger;function requireOkdbLogger(){const _0x544fc1=_0xef8cd8;if(hasRequiredOkdbLogger)return okdbLogger;hasRequiredOkdbLogger=0x1;class _0x16ab58{constructor(_0x4684bd){const _0x40e670=_0x47ab;this[_0x40e670(0xd4f)]=_0x4684bd,this[_0x40e670(0xc19)]=new Set(),this[_0x40e670(0xb47)]={};}[_0x544fc1(0xd9b)](_0x29e7c6){const _0x2d40d2=_0x544fc1,_0x90152=new _0x16ab58(this['okdb']);return _0x90152[_0x2d40d2(0xc19)]=this[_0x2d40d2(0xc19)],_0x90152[_0x2d40d2(0xb47)]={...this['_meta'],..._0x29e7c6},_0x90152;}['attach'](_0x1a5bfb){const _0x1f3cf4=_0x544fc1;return this[_0x1f3cf4(0xc19)]['add'](_0x1a5bfb),()=>this[_0x1f3cf4(0xc19)][_0x1f3cf4(0x3b3)](_0x1a5bfb);}[_0x544fc1(0x7f6)](){const _0x248e09=_0x544fc1;return this[_0x248e09(0x790)]=this[_0x248e09(0x993)](({level:_0x3051e7,msg:_0x5e520a,meta:_0x244fb6,context:_0xcd6571,ts:_0xec24d})=>{const _0x2fa76c=_0x248e09;if(_0x244fb6?.[_0x2fa76c(0x19e)]===_0x2fa76c(0x705)&&(_0x3051e7==='info'||_0x3051e7===_0x2fa76c(0xef)))return;const _0x413239=_0x3051e7===_0x2fa76c(0x225)?console[_0x2fa76c(0x225)]:_0x3051e7==='warn'?console['warn']:_0x3051e7===_0x2fa76c(0x26c)?console[_0x2fa76c(0x26c)]:console[_0x2fa76c(0x9be)],_0x32f3db=_0x244fb6&&Object['keys'](_0x244fb6)[_0x2fa76c(0x156)]>0x0;_0x32f3db||_0xcd6571!==undefined?_0x413239(new Date(_0xec24d)[_0x2fa76c(0x9cc)](),_0x5e520a,..._0x32f3db?[_0x244fb6]:[],..._0xcd6571!==undefined?[_0xcd6571]:[]):_0x413239(new Date(_0xec24d)[_0x2fa76c(0x9cc)](),_0x5e520a);}),this[_0x248e09(0x790)];}['detachConsole'](){const _0x4f3812=_0x544fc1;this[_0x4f3812(0x790)]&&(this[_0x4f3812(0x790)](),this['_detachConsole']=null);}['attachOKDB'](_0xc4293f,_0x14bdcc){const _0x2a72e0=_0x544fc1,_0x58c735=require$$0$1;return this[_0x2a72e0(0x993)](({level:_0x4971c6,msg:_0x46b5b6,meta:_0x7db6c0,context:_0x26a661,ts:_0x153a17})=>{const _0xfca23f=_0x2a72e0;if(_0x4971c6===_0xfca23f(0xef))return;_0xc4293f[_0xfca23f(0x92c)]('~log_entry',_0x58c735[_0xfca23f(0xa91)](),{'ts':_0x153a17,'level':_0x4971c6,'msg':_0x46b5b6,'feature':_0x7db6c0?.[_0xfca23f(0x19e)]??_0x7db6c0?.['module']??null,'node':_0x14bdcc,'context':_0x26a661??null})[_0xfca23f(0x415)](()=>{});});}[_0x544fc1(0x447)](_0x1c9241,_0x4dd39f,_0x58e552){const _0x3163a4=_0x544fc1;_0x4dd39f instanceof Error&&(_0x58e552={'message':_0x4dd39f[_0x3163a4(0xb4e)],'stack':_0x4dd39f['stack'],..._0x58e552},_0x4dd39f=_0x4dd39f[_0x3163a4(0xb4e)]);const _0x529001={'level':_0x1c9241,'msg':_0x4dd39f,'meta':{...this['_meta']},'context':_0x58e552,'ts':Date['now']()};try{this['okdb'][_0x3163a4(0xea8)]['emit'](_0x3163a4(0x9be),_0x529001);}catch{}for(const _0x1e2370 of this[_0x3163a4(0xc19)]){try{_0x1e2370(_0x529001);}catch{}}}[_0x544fc1(0x26c)](_0x503456,_0x398e6c){this['_emit']('info',_0x503456,_0x398e6c);}[_0x544fc1(0xf78)](_0x14b622,_0x3b3401){const _0x5594bc=_0x544fc1;this[_0x5594bc(0x447)]('warn',_0x14b622,_0x3b3401);}[_0x544fc1(0x225)](_0x20e68d,_0x1e8683){const _0x1e363a=_0x544fc1;this['_emit'](_0x1e363a(0x225),_0x20e68d,_0x1e8683);}[_0x544fc1(0xef)](_0x4dd2e8,_0x30bc59){const _0x13c25d=_0x544fc1;this[_0x13c25d(0x447)](_0x13c25d(0xef),_0x4dd2e8,_0x30bc59);}}return okdbLogger=_0x16ab58,okdbLogger;}var okdbBus,hasRequiredOkdbBus;function requireOkdbBus(){const _0x5d2ee1=_0xef8cd8;if(hasRequiredOkdbBus)return okdbBus;hasRequiredOkdbBus=0x1;const _0x4e4309=require$$0$9,{BUS_EVENTS:_0x33f520,EVENTS:_0x5d14e0}=requireOkdbEnums(),_0x3a36b3=Object[_0x5d2ee1(0x108b)]({'STOPPED':'stopped','STARTING':_0x5d2ee1(0xcb4),'STARTED':_0x5d2ee1(0x3c4),'STOPPING':_0x5d2ee1(0x109c),'ERROR':'error'}),_0x4ee8c7=_0x5d2ee1(0xd4f);class _0x210cc4{constructor(_0x295577,{port:port=0x765f,group:group=_0x5d2ee1(0x475),secret:secret=_0x4ee8c7}={}){const _0x532c52=_0x5d2ee1;this[_0x532c52(0xd4f)]=_0x295577,this['port']=port,this[_0x532c52(0x32c)]=group,this[_0x532c52(0x93e)]=secret===_0x4ee8c7,this[_0x532c52(0xfdd)]=Buffer[_0x532c52(0x9f8)](secret),this[_0x532c52(0x82d)]=null,this[_0x532c52(0x10e2)]=_0x3a36b3[_0x532c52(0xaa1)],this[_0x532c52(0x9d5)]=null,this[_0x532c52(0x733)]=0x3e8,this['lastRxAt']=null,this['lastTxAt']=null,this[_0x532c52(0xbab)]=null;}get[_0x5d2ee1(0xc53)](){const _0x39361e=_0x5d2ee1;return this[_0x39361e(0x10e2)]===_0x3a36b3[_0x39361e(0x2b1)];}get[_0x5d2ee1(0x4f7)](){const _0x3863e8=_0x5d2ee1;return this['state']===_0x3a36b3[_0x3863e8(0x2b1)]&&!this[_0x3863e8(0xbab)];}[_0x5d2ee1(0xa00)](){const _0x36486b=_0x5d2ee1;if(this['state']===_0x3a36b3[_0x36486b(0x2b1)]||this[_0x36486b(0x10e2)]===_0x3a36b3['STARTING'])return;if(this[_0x36486b(0x93e)])try{this[_0x36486b(0xd4f)][_0x36486b(0x9be)]?.['warn']?.(_0x36486b(0x99d)+_0x36486b(0x8f1)+_0x36486b(0x8e4)+'constructor\x20option\x20for\x20production\x20deployments.',{'component':_0x36486b(0xafb)});}catch{}const _0x19dace=this[_0x36486b(0x10e2)];this[_0x36486b(0x10e2)]=_0x3a36b3['STARTING'],this[_0x36486b(0x80b)](_0x19dace,this[_0x36486b(0x10e2)],_0x36486b(0xa00));try{this[_0x36486b(0x574)]();}catch(_0x257ea8){this[_0x36486b(0x118b)](_0x257ea8);}}['stop'](){const _0x58e5f8=_0x5d2ee1;if(this['state']===_0x3a36b3[_0x58e5f8(0xaa1)]||this[_0x58e5f8(0x10e2)]===_0x3a36b3[_0x58e5f8(0x10b4)])return;this[_0x58e5f8(0x9d5)]&&(clearTimeout(this[_0x58e5f8(0x9d5)]),this['_reconnectTimer']=null);this[_0x58e5f8(0x733)]=0x3e8;const _0x1f5d04=this[_0x58e5f8(0x10e2)];this[_0x58e5f8(0x10e2)]=_0x3a36b3[_0x58e5f8(0x10b4)],this['_emitState'](_0x1f5d04,this[_0x58e5f8(0x10e2)],'stop');try{this[_0x58e5f8(0x82d)]?.[_0x58e5f8(0x11ac)]();}catch{}this['socket']=null;const _0xe6440a=this[_0x58e5f8(0x10e2)];this[_0x58e5f8(0x10e2)]=_0x3a36b3[_0x58e5f8(0xaa1)],this[_0x58e5f8(0x80b)](_0xe6440a,this[_0x58e5f8(0x10e2)],_0x58e5f8(0xbdb));}['_createAndBindSocket'](){const _0x569113=_0x5d2ee1;this[_0x569113(0x82d)]=_0x4e4309[_0x569113(0x720)]({'type':'udp4','reuseAddr':!![]}),this[_0x569113(0x82d)]['on'](_0x569113(0xb4e),_0x5d1a9a=>this[_0x569113(0x4cc)](_0x5d1a9a)),this[_0x569113(0x82d)]['on']('error',_0x31971a=>this[_0x569113(0x118b)](_0x31971a)),this['socket'][_0x569113(0x10d5)](this[_0x569113(0x1da)],_0x569113(0xb0b),()=>{const _0x55fc53=_0x569113;try{this[_0x55fc53(0x82d)][_0x55fc53(0x569)](this[_0x55fc53(0x32c)]),this[_0x55fc53(0x82d)][_0x55fc53(0x47a)](!![]),this[_0x55fc53(0xbab)]=null,this[_0x55fc53(0x733)]=0x3e8;const _0x531a2e=this[_0x55fc53(0x10e2)];this[_0x55fc53(0x10e2)]=_0x3a36b3[_0x55fc53(0x2b1)],this[_0x55fc53(0x80b)](_0x531a2e,this[_0x55fc53(0x10e2)],'bound');}catch(_0x3763fa){this[_0x55fc53(0x118b)](_0x3763fa);}});}[_0x5d2ee1(0x87b)](){const _0x27d9df=_0x5d2ee1;if(this['state']!==_0x3a36b3[_0x27d9df(0x97d)])return;try{this[_0x27d9df(0x574)]();}catch(_0x406dff){this[_0x27d9df(0x118b)](_0x406dff);}}[_0x5d2ee1(0xf5d)](_0x3fb5dd,_0x5e937b=''){const _0x3c1815=_0x5d2ee1;if(!this[_0x3c1815(0xc53)])return;const _0x5e0533=Buffer['from'](String(_0x3fb5dd)),_0x349f18=Buffer['from'](_0x5e937b==null?'':String(_0x5e937b)),_0x1448e9=Buffer[_0x3c1815(0x386)](0x4);_0x1448e9['writeUInt16BE'](_0x5e0533[_0x3c1815(0x156)],0x0),_0x1448e9[_0x3c1815(0x5fe)](_0x349f18[_0x3c1815(0x156)],0x2);const _0x46f96c=Buffer[_0x3c1815(0xbad)]([this['magic'],_0x1448e9,_0x5e0533,_0x349f18]);try{this['socket']['send'](_0x46f96c,this[_0x3c1815(0x1da)],this[_0x3c1815(0x32c)]),this['lastTxAt']=Date[_0x3c1815(0x555)]();}catch(_0x544240){this[_0x3c1815(0x118b)](_0x544240);}}[_0x5d2ee1(0x4cc)](_0x5f49db){const _0x1ff87e=_0x5d2ee1;if(_0x5f49db[_0x1ff87e(0x156)]<this[_0x1ff87e(0xfdd)][_0x1ff87e(0x156)]+0x4)return;if(!_0x5f49db[_0x1ff87e(0xc3c)](0x0,this[_0x1ff87e(0xfdd)][_0x1ff87e(0x156)])[_0x1ff87e(0x390)](this[_0x1ff87e(0xfdd)]))return;const _0x3afd59=this[_0x1ff87e(0xfdd)][_0x1ff87e(0x156)],_0x4eaae0=_0x5f49db['readUInt16BE'](_0x3afd59),_0x54576a=_0x5f49db[_0x1ff87e(0x71e)](_0x3afd59+0x2);if(_0x5f49db[_0x1ff87e(0x156)]<_0x3afd59+0x4+_0x4eaae0+_0x54576a)return;const _0x4ce63e=_0x5f49db['slice'](_0x3afd59+0x4,_0x3afd59+0x4+_0x4eaae0)[_0x1ff87e(0x583)]();_0x5f49db['slice'](_0x3afd59+0x4+_0x4eaae0,_0x3afd59+0x4+_0x4eaae0+_0x54576a)[_0x1ff87e(0x583)](),this['lastRxAt']=Date[_0x1ff87e(0x555)](),_0x4ce63e===_0x33f520[_0x1ff87e(0x1229)]&&this['okdb'][_0x1ff87e(0xea8)][_0x1ff87e(0xf5d)](_0x5d14e0[_0x1ff87e(0xd0e)]),_0x4ce63e===_0x33f520[_0x1ff87e(0xb5d)]&&this[_0x1ff87e(0xd4f)]['events'][_0x1ff87e(0xf5d)](_0x5d14e0[_0x1ff87e(0x862)]);}[_0x5d2ee1(0x118b)](_0x44584a){const _0x57142d=_0x5d2ee1;this[_0x57142d(0xbab)]=_0x44584a;const _0x416bec=this[_0x57142d(0x10e2)];this['state']=_0x3a36b3[_0x57142d(0x97d)],this[_0x57142d(0x80b)](_0x416bec,this[_0x57142d(0x10e2)],_0x44584a?.[_0x57142d(0xb4e)]||_0x57142d(0x225));try{this[_0x57142d(0x82d)]?.[_0x57142d(0x11ac)]();}catch{}this['socket']=null;const _0x4d28ee=this[_0x57142d(0x733)];this[_0x57142d(0x733)]=Math[_0x57142d(0x2dc)](this['_reconnectDelayMs']*0x2,0x7530),this[_0x57142d(0x9d5)]=setTimeout(()=>{const _0x1f7db0=_0x57142d;this[_0x1f7db0(0x9d5)]=null,this[_0x1f7db0(0x87b)]();},_0x4d28ee),this[_0x57142d(0x9d5)][_0x57142d(0xba4)]();}[_0x5d2ee1(0x80b)](_0x58c23e,_0x59742b,_0x5742c4){const _0x24a37d=_0x5d2ee1;if(_0x58c23e===_0x59742b)return;this[_0x24a37d(0xd4f)]['events'][_0x24a37d(0xf5d)](_0x5d14e0[_0x24a37d(0xc87)],{'prev':_0x58c23e,'next':_0x59742b,'reason':_0x5742c4,'timestamp':Date['now']()});}}return _0x210cc4[_0x5d2ee1(0x9b3)]=_0x3a36b3,_0x210cc4[_0x5d2ee1(0xc7e)]=_0x33f520,okdbBus=_0x210cc4,okdbBus;}var okdbPlugins,hasRequiredOkdbPlugins;function requireOkdbPlugins(){const _0x1afac5=_0xef8cd8;if(hasRequiredOkdbPlugins)return okdbPlugins;hasRequiredOkdbPlugins=0x1;const {OKDB_STATE:_0x168085}=requireOkdbEnums(),{OKDBError:_0x8851a8}=requireOkdbError();class _0x3b3a85{constructor(_0x133e8b){const _0x246c7e=_0x47ab;this[_0x246c7e(0xd4f)]=_0x133e8b,this[_0x246c7e(0x3e5)]=[];}[_0x1afac5(0x2a4)](_0x55049a,_0x100333){const _0x427339=_0x1afac5;if(this[_0x427339(0xd4f)][_0x427339(0x10e2)]!==_0x168085[_0x427339(0x364)])throw new _0x8851a8('Cannot\x20register\x20plugins\x20after\x20start',_0x427339(0xe5e),{'state':this[_0x427339(0xd4f)]['state']});if(!_0x55049a[_0x427339(0x1173)])throw new _0x8851a8(_0x427339(0x19c),_0x427339(0xbaa),{'plugin':_0x55049a[_0x427339(0x1173)]});const _0x1235cb=_0x55049a['requires']??[];for(const _0x25fa93 of _0x1235cb){if(!this[_0x427339(0x3e5)][_0x427339(0xa83)](_0x18875c=>_0x18875c[_0x427339(0xa3f)]['name']===_0x25fa93))throw new _0x8851a8(_0x427339(0x70c)+_0x25fa93+_0x427339(0x7b9)+_0x55049a['name']+')',_0x427339(0x23c),{'required':_0x25fa93});}if(this[_0x427339(0x3e5)][_0x427339(0xbdd)](_0x3ecfec=>_0x3ecfec[_0x427339(0xa3f)]['name']===_0x55049a[_0x427339(0x1173)]))throw new _0x8851a8(_0x427339(0x9f)+_0x55049a['name']+'\x27\x20already\x20registered',_0x427339(0x12d),{'plugin':_0x55049a[_0x427339(0x1173)]});if(_0x55049a[_0x427339(0x1173)]in this[_0x427339(0xd4f)])throw new _0x8851a8(_0x427339(0x102e)+_0x55049a['name']+_0x427339(0x219),_0x427339(0xbb9));const _0x2771f9=_0x55049a[_0x427339(0x2a4)](this[_0x427339(0xd4f)],_0x100333);if(!_0x2771f9||typeof _0x2771f9!==_0x427339(0xb36))throw new _0x8851a8(_0x427339(0x9f)+_0x55049a[_0x427339(0x1173)]+'\x27\x20did\x20not\x20return\x20a\x20valid\x20instance',_0x427339(0xbaa),{'plugin':_0x55049a[_0x427339(0x1173)]});this[_0x427339(0x3e5)]['push']({'module':_0x55049a,'options':_0x100333,'instance':_0x2771f9});}async[_0x1afac5(0xa00)](){const _0x17b183=_0x1afac5,_0xe1e107=[];try{for(const _0x3898d4 of this[_0x17b183(0x3e5)]){await _0x3898d4[_0x17b183(0x685)][_0x17b183(0xa00)]?.(this[_0x17b183(0xd4f)]),_0xe1e107[_0x17b183(0x597)](_0x3898d4);}}catch(_0x2e6695){for(const _0x5e944f of _0xe1e107[_0x17b183(0xed)]()){await _0x5e944f[_0x17b183(0x685)][_0x17b183(0x1fe)]?.(this[_0x17b183(0xd4f)]);}throw _0x2e6695;}}async[_0x1afac5(0x1fe)](){const _0x5b66f3=_0x1afac5;for(const _0x142532 of[...this[_0x5b66f3(0x3e5)]][_0x5b66f3(0xed)]()){await _0x142532[_0x5b66f3(0x685)]['stop']?.(this[_0x5b66f3(0xd4f)]);}}}return okdbPlugins=_0x3b3a85,okdbPlugins;}var okdbQueueHttp,hasRequiredOkdbQueueHttp;function requireOkdbQueueHttp(){if(hasRequiredOkdbQueueHttp)return okdbQueueHttp;hasRequiredOkdbQueueHttp=0x1,okdbQueueHttp=function _0x208145(_0xdfd652){const _0x2d396d=_0x47ab,_0x214b67=typeof _0xdfd652?.['enqueue']===_0x2d396d(0x63b);if(_0x214b67){_0x540749(_0xdfd652['okdb']['http'],()=>_0xdfd652,_0x2d396d(0x1e6));return;}const _0x2e664a=_0xdfd652,_0x4dbb66=_0x2e664a[_0x2d396d(0x9f4)],_0x12e61f=_0x1680ac=>{const _0x47dce6=_0x2d396d,_0x349766=_0x1680ac[_0x47dce6(0x30b)],_0x29dcd0=_0x2e664a[_0x47dce6(0xa3)][_0x47dce6(0xbeb)](_0x349766);if(!_0x29dcd0){const _0x18cba0=new Error(_0x47dce6(0x56f)+_0x349766);_0x18cba0[_0x47dce6(0xfcd)]=0x194;throw _0x18cba0;}if(!_0x29dcd0[_0x47dce6(0x879)]){const _0x37615b=new Error(_0x47dce6(0x409)+_0x349766+_0x47dce6(0xa9c));_0x37615b[_0x47dce6(0xfcd)]=0x194;throw _0x37615b;}return _0x29dcd0[_0x47dce6(0x879)];},_0x45a378=_0x2e664a[_0x2d396d(0x11e5)]?.[_0x2d396d(0x1f5)]?.[_0x2d396d(0xb13)]??_0x2d396d(0x8d0);_0x540749(_0x4dbb66,_0x12e61f,'/api[/env/:env='+_0x45a378+_0x2d396d(0x753));};function _0x540749(_0x1262eb,_0x1f47c6,_0x5ec9d9='/api/queue'){const _0x1d98b2=_0x47ab;_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+_0x1d98b2(0x11a7),async({params:_0x33d066,body:_0x1c768e})=>{const _0x514bc4=_0x1d98b2,_0x4c1bd8=_0x1f47c6(_0x33d066),_0x15afc8=await _0x4c1bd8['enqueue'](_0x33d066[_0x514bc4(0xaee)],_0x1c768e?.[_0x514bc4(0x3c3)],_0x1c768e?.['options']);return{'result':{'id':_0x15afc8}};},{'id':'queue_enqueue_job','summary':'Enqueue\x20job','description':'Adds\x20a\x20new\x20job\x20to\x20the\x20queue.\x20Data\x20lives\x20in\x20the\x20current\x20environment.','tags':[_0x1d98b2(0x879)],'params':{'type':_0x1d98b2(0x50a)},'body':{'payload':{},'options':{'priority':0x0,'done_ttl':null,'failed_ttl':null}},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'type':{'type':_0x1d98b2(0xf7a),'description':_0x1d98b2(0x50a)},'payload':{},'options':{'type':_0x1d98b2(0xb36),'description':_0x1d98b2(0x9b7),'properties':{'when':{'type':['integer','null'],'description':_0x1d98b2(0x702)},'priority':{'type':_0x1d98b2(0x10f2),'description':_0x1d98b2(0x5b7)},'max_tries':{'type':[_0x1d98b2(0x10f2),_0x1d98b2(0x11e)],'description':_0x1d98b2(0xff5)},'retry_delay':{'type':'integer','description':_0x1d98b2(0xd29)},'backoff_multiplier':{'type':_0x1d98b2(0x9f0),'description':'Exponential\x20backoff\x20multiplier.\x20Default\x201\x20(no\x20backoff).'},'tags':{'type':_0x1d98b2(0xf9d),'items':{'type':_0x1d98b2(0xf7a)},'description':_0x1d98b2(0x9c2)},'bucket':{'type':[_0x1d98b2(0xf7a),'null'],'description':'Rate-limit\x20bucket\x20name\x20(legacy\x20single-bucket).'},'bucket_tokens':{'type':[_0x1d98b2(0x10f2),_0x1d98b2(0x11e)],'description':_0x1d98b2(0xc16)},'buckets':{'type':[_0x1d98b2(0xf9d),_0x1d98b2(0x11e)],'items':{'type':_0x1d98b2(0xb36),'properties':{'id':{'type':_0x1d98b2(0xf7a)},'tokens':{'type':_0x1d98b2(0x10f2)}},'required':['id'],'additionalProperties':![]},'description':_0x1d98b2(0x11bc)},'cron':{'type':['string',_0x1d98b2(0x11e)],'description':'Cron\x20expression\x20for\x20recurring\x20jobs.'},'done_ttl':{'type':[_0x1d98b2(0x10f2),_0x1d98b2(0x11e)],'description':_0x1d98b2(0xaea)},'failed_ttl':{'type':[_0x1d98b2(0x10f2),_0x1d98b2(0x11e)],'description':_0x1d98b2(0xb5e)}},'additionalProperties':![]}},'required':[_0x1d98b2(0xaee)],'additionalProperties':![]},'outputSchema':{'type':'object','properties':{'id':{'type':_0x1d98b2(0xf7a)}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),'shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':'queue:write','scope':'env'},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':'queue_enqueue_job'}}),_0x1262eb['add']('GET',_0x5ec9d9+'/jobs',async({params:_0x1adb70,query:_0x594f26})=>{const _0x556328=_0x1d98b2,_0x3ce583=_0x1f47c6(_0x1adb70);let _0x50e530=_0x594f26?.[_0x556328(0x10be)]??null;if(typeof _0x50e530===_0x556328(0xf7a)&&_0x50e530['startsWith']('['))try{_0x50e530=JSON['parse'](_0x50e530);}catch{_0x50e530=null;}const _0xc388dc=await _0x3ce583['list']({'type':_0x594f26?.[_0x556328(0xaee)]??null,'status':_0x594f26?.[_0x556328(0xfcd)]??null,'bucket':_0x594f26?.['bucket']??null,'tag':_0x594f26?.[_0x556328(0xd2a)]??null,'sort':_0x594f26?.[_0x556328(0x3f6)]??_0x556328(0x5d9),'direction':_0x594f26?.[_0x556328(0xa88)]??'asc','limit':_0x594f26?.[_0x556328(0xbae)]?parseInt(_0x594f26['limit']):0x32,'cursor':_0x50e530}),_0x460841=_0xc388dc[_0x556328(0xe50)][_0x556328(0x1166)](_0x40645f=>({'id':_0x40645f[_0x556328(0x9dd)],..._0x40645f['value']}));return{'result':{'items':_0x460841,'cursor':_0xc388dc['cursor']}};},{'id':_0x1d98b2(0xb00),'summary':_0x1d98b2(0xb54),'description':_0x1d98b2(0x1052),'tags':[_0x1d98b2(0x879)],'query':{'type':null,'status':null,'bucket':null,'tag':null,'sort':'when','direction':_0x1d98b2(0xfd1),'limit':0x32,'cursor':null},'inputSchema':{'type':'object','properties':{'env':{'type':'string','default':_0x1d98b2(0x8d0),'description':'Environment\x20name'},'type':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)]},'status':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)]},'bucket':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)]},'tag':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)]},'sort':{'type':_0x1d98b2(0xf7a)},'direction':{'type':_0x1d98b2(0xf7a)},'limit':{'type':_0x1d98b2(0x10f2)},'cursor':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)]}},'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf3c),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none','querySchema':{'type':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)],'default':null},'status':{'type':[_0x1d98b2(0xf7a),'null'],'default':null},'bucket':{'type':['string',_0x1d98b2(0x11e)],'default':null},'tag':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)],'default':null},'sort':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x5d9)},'direction':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0xfd1)},'limit':{'type':_0x1d98b2(0x10f2),'default':0x32},'cursor':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)],'default':null}}},'mcp':{'capability':'queue','action':_0x1d98b2(0xb00),'readOnlyHint':!![]}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0x929),_0x5ec9d9+_0x1d98b2(0x1104),async({params:_0x24c46a})=>{const _0x424c04=_0x1d98b2,_0x535797=_0x1f47c6(_0x24c46a),_0x318d64=await _0x535797['getJob'](_0x24c46a['id']);if(!_0x318d64){const _0x4a5ed8=new Error('Job\x20not\x20found:\x20'+_0x24c46a['id']);_0x4a5ed8[_0x424c04(0xfcd)]=0x194;throw _0x4a5ed8;}return{'result':_0x318d64};},{'id':_0x1d98b2(0x548),'summary':_0x1d98b2(0x109b),'description':'Returns\x20a\x20single\x20queue\x20job\x20including\x20its\x20payload.','tags':[_0x1d98b2(0x879)],'params':{'id':_0x1d98b2(0x6a8)},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'id':{'type':'string','description':'Job\x20ID'}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),'shell',_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf3c),'scope':'env'},'safety':{'access':_0x1d98b2(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0x11cc)},'mcp':{'capability':'queue','action':_0x1d98b2(0x548),'readOnlyHint':!![]}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+_0x1d98b2(0x422),async({params:_0x2c374b,body:_0x10f6f1})=>{const _0x49430c=_0x1f47c6(_0x2c374b),_0x1f5f8c=await _0x49430c['updateJob'](_0x2c374b['id'],_0x10f6f1??{});return{'result':_0x1f5f8c};},{'id':_0x1d98b2(0xf49),'summary':_0x1d98b2(0x1217),'description':'Updates\x20editable\x20queue\x20job\x20metadata\x20and\x20optionally\x20the\x20payload.','tags':['queue'],'params':{'id':_0x1d98b2(0x6a8)},'body':{'type':_0x1d98b2(0x765),'payload':{},'when':0x0,'priority':0x0,'tags':[],'bucket':null,'bucket_tokens':0x1,'buckets':null,'cron':null,'max_tries':0x1,'retry_delay':0x0,'backoff_multiplier':0x1,'status_message':null,'progress':null},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'id':{'type':_0x1d98b2(0xf7a),'description':_0x1d98b2(0x6a8)},'type':{'type':'string'},'payload':{},'when':{'type':[_0x1d98b2(0x10f2),_0x1d98b2(0x11e)]},'priority':{'type':[_0x1d98b2(0x10f2),_0x1d98b2(0x11e)]},'tags':{'type':[_0x1d98b2(0xf9d),'null'],'items':{'type':'string'}},'bucket':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)]},'bucket_tokens':{'type':['integer','null']},'buckets':{'type':[_0x1d98b2(0xf9d),_0x1d98b2(0x11e)],'items':{'type':_0x1d98b2(0xb36),'properties':{'id':{'type':_0x1d98b2(0xf7a)},'tokens':{'type':'integer'}},'required':['id'],'additionalProperties':![]}},'cron':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)]},'max_tries':{'type':[_0x1d98b2(0x10f2),'null']},'retry_delay':{'type':[_0x1d98b2(0x10f2),'null']},'backoff_multiplier':{'type':[_0x1d98b2(0x9f0),_0x1d98b2(0x11e)]},'status_message':{'type':[_0x1d98b2(0xf7a),'null']},'progress':{'type':[_0x1d98b2(0x9f0),_0x1d98b2(0x11e)]}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':['http',_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'queue:write','scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':_0x1d98b2(0x879),'action':'queue_update_job'}}),_0x1262eb['add']('POST',_0x5ec9d9+'/claim/:type',async({params:_0x10563c,body:_0x109a2f})=>{const _0x2c79f6=_0x1d98b2,_0x27b3f3=_0x1f47c6(_0x10563c),_0x30f963=await _0x27b3f3[_0x2c79f6(0x112d)](_0x10563c[_0x2c79f6(0xaee)],_0x109a2f?.[_0x2c79f6(0x11e5)]);return{'result':_0x30f963};},{'id':_0x1d98b2(0xa07),'summary':_0x1d98b2(0xfb9),'description':'Claims\x20and\x20locks\x20the\x20next\x20available\x20job\x20of\x20the\x20given\x20type.','tags':[_0x1d98b2(0x879)],'params':{'type':'Job\x20type\x20name'},'body':{'options':{'ttl':0x7530}},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':'Environment\x20name'},'type':{'type':_0x1d98b2(0xf7a),'description':_0x1d98b2(0x50a)},'options':{'type':[_0x1d98b2(0xb36),_0x1d98b2(0x11e)],'additionalProperties':!![]}},'required':[_0x1d98b2(0xaee)],'additionalProperties':![]},'outputSchema':{'type':['object',_0x1d98b2(0x11e)],'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xe1),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':'queue','action':_0x1d98b2(0xa07)}}),_0x1262eb[_0x1d98b2(0x33c)]('POST',_0x5ec9d9+_0x1d98b2(0x2eb),async({params:_0x2965b5,body:_0x758eb7})=>{const _0x13d247=_0x1d98b2,_0x5000a4=_0x1f47c6(_0x2965b5),_0x1c5e15=await _0x5000a4[_0x13d247(0x29a)](_0x2965b5['id'],_0x758eb7?.['claim_id'],_0x758eb7?.['ttl']);return{'result':_0x1c5e15};},{'id':'queue_mark_job_heartbeat','summary':_0x1d98b2(0xbed),'description':_0x1d98b2(0x972),'tags':[_0x1d98b2(0x879)],'params':{'id':_0x1d98b2(0x6a8)},'body':{'claim_id':'','ttl':0x7530},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':'Environment\x20name'},'id':{'type':_0x1d98b2(0xf7a),'description':_0x1d98b2(0x6a8)},'claim_id':{'type':_0x1d98b2(0xf7a),'description':_0x1d98b2(0xf0e)},'ttl':{'type':[_0x1d98b2(0x10f2),_0x1d98b2(0x11e)]}},'required':['id',_0x1d98b2(0xc82)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xe1),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0xa24)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+_0x1d98b2(0xf9c),async({params:_0x249ff1,body:_0x223a67})=>{const _0x1fc1df=_0x1d98b2,_0x11ffb8=_0x1f47c6(_0x249ff1),_0x1c370b=await _0x11ffb8[_0x1fc1df(0x710)](_0x249ff1['id'],_0x223a67?.[_0x1fc1df(0xc82)],_0x223a67?.[_0x1fc1df(0xb97)]??_0x223a67?.[_0x1fc1df(0xb4e)]??null);return{'result':_0x1c370b};},{'id':_0x1d98b2(0xb72),'summary':'Mark\x20job\x20progress','description':_0x1d98b2(0xb25),'tags':[_0x1d98b2(0x879)],'params':{'id':_0x1d98b2(0x6a8)},'body':{'claim_id':'','progress':'50%'},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'id':{'type':'string','description':'Job\x20ID'},'claim_id':{'type':_0x1d98b2(0xf7a),'description':'Active\x20claim\x20ID\x20for\x20the\x20running\x20job'},'progress':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x9f0),_0x1d98b2(0x11e)]},'message':{'type':['string','number',_0x1d98b2(0x11e)]}},'required':['id',_0x1d98b2(0xc82)],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'queue:work','scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0xb72)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+_0x1d98b2(0x124b),async({params:_0x38bd2b,body:_0x48b103})=>{const _0x1229b3=_0x1d98b2,_0x19c600=_0x1f47c6(_0x38bd2b),_0x48bda4=await _0x19c600['markJobComplete'](_0x38bd2b['id'],_0x48b103?.[_0x1229b3(0xc82)],_0x48b103?.['result']);return{'result':_0x48bda4};},{'id':_0x1d98b2(0xb83),'summary':_0x1d98b2(0x1b1),'description':_0x1d98b2(0xcef),'tags':[_0x1d98b2(0x879)],'params':{'id':_0x1d98b2(0x6a8)},'body':{'claim_id':'','result':{}},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':'string','default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'id':{'type':_0x1d98b2(0xf7a),'description':_0x1d98b2(0x6a8)},'claim_id':{'type':_0x1d98b2(0xf7a),'description':_0x1d98b2(0xf0e)},'result':{}},'required':['id','claim_id'],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'queue:work','scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0xb83)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+'/job/:id/fail',async({params:_0x3dacbd,body:_0x40c842})=>{const _0x4fcb73=_0x1d98b2,_0x2ac1a2=_0x1f47c6(_0x3dacbd),_0x50491f=await _0x2ac1a2[_0x4fcb73(0xf46)](_0x3dacbd['id'],_0x40c842?.[_0x4fcb73(0xc82)],_0x40c842?.[_0x4fcb73(0x225)]??_0x40c842?.[_0x4fcb73(0xb4e)]??_0x40c842,_0x40c842?.['code']??_0x4fcb73(0x225));return{'result':_0x50491f};},{'id':_0x1d98b2(0x792),'summary':_0x1d98b2(0x10c6),'description':_0x1d98b2(0x10d8),'tags':['queue'],'params':{'id':_0x1d98b2(0x6a8)},'body':{'claim_id':'','code':_0x1d98b2(0x225),'message':'something\x20went\x20wrong'},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':'Environment\x20name'},'id':{'type':'string','description':_0x1d98b2(0x6a8)},'claim_id':{'type':_0x1d98b2(0xf7a),'description':_0x1d98b2(0xf0e)},'code':{'type':[_0x1d98b2(0xf7a),'null']},'message':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)]},'error':{'type':[_0x1d98b2(0xb36),'string','null'],'additionalProperties':!![]}},'required':['id','claim_id'],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xe1),'scope':_0x1d98b2(0x30b)},'safety':{'access':'write','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x792)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+_0x1d98b2(0x641),async({params:_0x54503c,body:_0x10574d})=>{const _0x49758d=_0x1d98b2,_0x58b658=_0x1f47c6(_0x54503c);return await _0x58b658['_reconcile'](_0x10574d?.[_0x49758d(0xbae)]),{'result':_0x49758d(0x787)};},{'id':_0x1d98b2(0x1181),'summary':_0x1d98b2(0x77d),'description':'Re-queues\x20expired/stalled\x20jobs\x20and\x20cleans\x20up\x20finished\x20ones.','tags':[_0x1d98b2(0x879)],'body':{'limit':0x64},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'limit':{'type':[_0x1d98b2(0x10f2),_0x1d98b2(0x11e)]}},'additionalProperties':![]},'outputSchema':{'type':'object','properties':{'result':{'type':'string'}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x1181)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0x929),_0x5ec9d9+_0x1d98b2(0x413),async({params:_0x271560})=>{const _0x4dbef2=_0x1d98b2,_0x4b5d98=_0x1f47c6(_0x271560);if(!_0x4b5d98[_0x4dbef2(0x30b)][_0x4dbef2(0x7c0)](_0x4dbef2(0x18f)))return{'result':{'total':0x0,'types':[]}};const _0x564672=[],_0x283edb=new Map();let _0x1b70ab=0x0;for(const _0x13bf81 of _0x4b5d98[_0x4dbef2(0x30b)][_0x4dbef2(0x22e)]('~queue_jobs',[_0x4dbef2(0xaee)],{})){const _0x5e032e=_0x13bf81?.[_0x4dbef2(0x568)],_0x5884d5=_0x5e032e?.[_0x4dbef2(0xaee)]==null?'':String(_0x5e032e[_0x4dbef2(0xaee)]);if(!_0x5884d5)continue;let _0x3c71db=_0x283edb[_0x4dbef2(0xbeb)](_0x5884d5);!_0x3c71db&&(_0x3c71db={'type':_0x5884d5,'total':0x0,'byStatus':{}},_0x283edb[_0x4dbef2(0x211)](_0x5884d5,_0x3c71db),_0x564672[_0x4dbef2(0x597)](_0x3c71db));_0x3c71db[_0x4dbef2(0x8bd)]+=0x1,_0x1b70ab+=0x1;const _0x4a765e=_0x5e032e?.[_0x4dbef2(0xfcd)]==null?'':String(_0x5e032e[_0x4dbef2(0xfcd)]);if(_0x4a765e)_0x3c71db[_0x4dbef2(0xb51)][_0x4a765e]=(_0x3c71db[_0x4dbef2(0xb51)][_0x4a765e]||0x0)+0x1;}return{'result':{'total':_0x1b70ab,'types':_0x564672}};},{'id':_0x1d98b2(0x11b9),'summary':_0x1d98b2(0x639),'description':'Returns\x20the\x20actual\x20queued\x20job\x20types\x20present\x20in\x20the\x20environment,\x20with\x20exact\x20per-type\x20counts.','tags':[_0x1d98b2(0x879)],'inputSchema':{'type':'object','properties':{'env':{'type':_0x1d98b2(0xf7a),'default':'default','description':_0x1d98b2(0xde1)}},'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf3c),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0x11cc)},'mcp':{'capability':'queue','action':_0x1d98b2(0x11b9),'readOnlyHint':!![]}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0x929),_0x5ec9d9+_0x1d98b2(0x3e2),async({params:_0x102da5})=>{const _0x353114=_0x1d98b2,_0xe5a777=_0x1f47c6(_0x102da5);let _0x50f107=_0xe5a777[_0x353114(0xd72)][_0x353114(0x1055)]();const _0x4b8d35=_0x50f107&&_0x50f107[_0x353114(0xe4a)]&&Object[_0x353114(0xa52)](_0x50f107[_0x353114(0xe4a)])[_0x353114(0x156)]>0x0;if(!_0x4b8d35&&_0xe5a777['env']['hasType'](_0x353114(0x18f))){const _0x51a42a=_0xe5a777['env'][_0x353114(0xa28)]('~queue_jobs',{},{'entry':!![],'limit':Infinity});_0x50f107=await _0xe5a777[_0x353114(0xd72)][_0x353114(0x405)]('~queue_jobs',_0x51a42a);}return{'result':_0x50f107};},{'id':_0x1d98b2(0xf45),'summary':_0x1d98b2(0x11ad),'description':_0x1d98b2(0xb66),'tags':['queue'],'inputSchema':{'type':'object','properties':{'env':{'type':_0x1d98b2(0xf7a),'default':'default','description':_0x1d98b2(0xde1)}},'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf3c),'scope':_0x1d98b2(0x30b)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0x11cc)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0xf45),'readOnlyHint':!![]}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+'/stats/rebuild',async({params:_0x5a80b0})=>{const _0x52c7c9=_0x1d98b2,_0x411fc3=_0x1f47c6(_0x5a80b0);if(!_0x411fc3[_0x52c7c9(0x30b)][_0x52c7c9(0x7c0)]('~queue_jobs'))return{'result':'ok'};const _0x289474=_0x411fc3[_0x52c7c9(0x30b)][_0x52c7c9(0xa28)](_0x52c7c9(0x18f),{},{'entry':!![],'limit':Infinity});return await _0x411fc3[_0x52c7c9(0xd72)][_0x52c7c9(0x405)](_0x52c7c9(0x18f),_0x289474),{'result':'ok'};},{'id':_0x1d98b2(0xef2),'summary':_0x1d98b2(0x620),'description':_0x1d98b2(0x8a9),'tags':[_0x1d98b2(0x879)],'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':'string','default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)}},'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':'string'}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),'shell',_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':'env'},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0x11cc)},'mcp':{'capability':_0x1d98b2(0x879),'action':'queue_stats_rebuild'}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+_0x1d98b2(0x105b),async({params:_0x34784d})=>{const _0x2b1d9f=_0x1f47c6(_0x34784d),_0x3d883a=await _0x2b1d9f['removeJob'](_0x34784d['id']);return{'result':{'ok':_0x3d883a}};},{'id':_0x1d98b2(0x500),'summary':'Remove\x20job','description':_0x1d98b2(0x1136),'tags':['queue'],'params':{'id':_0x1d98b2(0x6a8)},'inputSchema':{'type':'object','properties':{'env':{'type':_0x1d98b2(0xf7a),'default':'default','description':'Environment\x20name'},'id':{'type':_0x1d98b2(0xf7a),'description':'Job\x20ID'}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':'object','properties':{'result':{'type':_0x1d98b2(0xb36),'properties':{'ok':{'type':_0x1d98b2(0x854)}}}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':!![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x500)}}),_0x1262eb['add'](_0x1d98b2(0xe46),_0x5ec9d9+_0x1d98b2(0xfc9),async({params:_0x784f8c})=>{const _0x9399be=_0x1d98b2,_0x34b694=_0x1f47c6(_0x784f8c),_0x6e208b=await _0x34b694[_0x9399be(0x820)](_0x784f8c['id']);return{'result':{'ok':!![],'id':_0x6e208b['id'],'status':_0x6e208b['status']}};},{'id':_0x1d98b2(0x3ec),'summary':_0x1d98b2(0x8d3),'description':_0x1d98b2(0x1134),'tags':[_0x1d98b2(0x879)],'params':{'id':'Job\x20ID'},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':'default','description':_0x1d98b2(0xde1)},'id':{'type':_0x1d98b2(0xf7a),'description':'Job\x20ID'}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':_0x1d98b2(0xb36),'properties':{'ok':{'type':_0x1d98b2(0x854)}}}},'additionalProperties':![]},'access':{'audiences':['http','shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':'env'},'safety':{'access':'write','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0x11cc)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x3ec)}}),_0x1262eb[_0x1d98b2(0x33c)]('POST',_0x5ec9d9+'/job/:id/cancel',async({params:_0x334539})=>{const _0x407fb0=_0x1f47c6(_0x334539),_0x2bbd97=await _0x407fb0['cancelJob'](_0x334539['id']);return{'result':_0x2bbd97};},{'id':_0x1d98b2(0x19b),'summary':_0x1d98b2(0x2ce),'description':_0x1d98b2(0xe54),'tags':[_0x1d98b2(0x879)],'params':{'id':_0x1d98b2(0x6a8)},'inputSchema':{'type':'object','properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'id':{'type':'string','description':'Job\x20ID'}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'queue:write','scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x19b)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+'/clearDone',async({params:_0x23ca4e,body:_0x4d2dd3})=>{const _0x1fa687=_0x1d98b2,_0x17dc72=_0x1f47c6(_0x23ca4e),_0x5bbaf5=_0x4d2dd3?.['type']??null,_0x5a2e7d=_0x4d2dd3?.[_0x1fa687(0xbae)]??0xc350,_0x266e22=await _0x17dc72[_0x1fa687(0xad8)](_0x5bbaf5,_0x5a2e7d);return{'result':{'deleted':_0x266e22}};},{'id':_0x1d98b2(0x11ed),'summary':'Bulk\x20delete\x20done\x20jobs','description':_0x1d98b2(0xc96),'tags':['queue'],'body':{'type':null,'limit':0xc350},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':'string','default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'type':{'type':[_0x1d98b2(0xf7a),_0x1d98b2(0x11e)]},'limit':{'type':_0x1d98b2(0x10f2)}},'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':_0x1d98b2(0xb36),'properties':{'deleted':{'type':_0x1d98b2(0x10f2)}}}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':!![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x11ed)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+'/clearFailed',async({params:_0x503227,body:_0xb015bd})=>{const _0x4c87a0=_0x1d98b2,_0x304fe5=_0x1f47c6(_0x503227),_0x7cc236=_0xb015bd?.['type']??null,_0x45d93d=_0xb015bd?.[_0x4c87a0(0xbae)]??0xc350,_0x3c8ab2=await _0x304fe5[_0x4c87a0(0x433)](_0x7cc236,_0x45d93d);return{'result':{'deleted':_0x3c8ab2}};},{'id':'queue_clear_failed_jobs','summary':_0x1d98b2(0x646),'description':'Deletes\x20all\x20permanently-failed\x20jobs\x20(optionally\x20scoped\x20to\x20a\x20type).','tags':['queue'],'body':{'type':null,'limit':0xc350},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':'string','default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'type':{'type':['string',_0x1d98b2(0x11e)]},'limit':{'type':_0x1d98b2(0x10f2)}},'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':_0x1d98b2(0xb36),'properties':{'deleted':{'type':'integer'}}}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':!![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':'queue','action':'queue_clear_failed_jobs'}}),_0x1262eb[_0x1d98b2(0x33c)]('POST',_0x5ec9d9+'/clearStuck',async({params:_0x59cf92,body:_0x286f11})=>{const _0x456439=_0x1d98b2,_0x3fc3c8=_0x1f47c6(_0x59cf92),_0x35ad5a=_0x286f11?.[_0x456439(0xaee)]??null,_0x33a8f5=_0x286f11?.['limit']??0xc350,_0x8bd25b=await _0x3fc3c8['clearStuck'](_0x35ad5a,_0x33a8f5);return{'result':{'deleted':_0x8bd25b}};},{'id':_0x1d98b2(0x57c),'summary':_0x1d98b2(0xb6d),'description':_0x1d98b2(0x769),'tags':[_0x1d98b2(0x879)],'body':{'type':null,'limit':0xc350},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'type':{'type':['string',_0x1d98b2(0x11e)]},'limit':{'type':_0x1d98b2(0x10f2)}},'additionalProperties':![]},'outputSchema':{'type':'object','properties':{'result':{'type':_0x1d98b2(0xb36),'properties':{'deleted':{'type':'integer'}}}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),'shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':'queue:write','scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':!![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x57c)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+_0x1d98b2(0x80d),async({params:_0x31b8ee,body:_0x2a7aaf})=>{const _0x2755ad=_0x1d98b2,_0x56e941=_0x1f47c6(_0x31b8ee),_0x48b44c=_0x2a7aaf?.[_0x2755ad(0xaee)]??null,_0x283e5c=_0x2a7aaf?.[_0x2755ad(0xbae)]??0x1388,_0x4c5890=await _0x56e941[_0x2755ad(0x108a)](_0x48b44c,_0x283e5c);return{'result':{'retried':_0x4c5890}};},{'id':_0x1d98b2(0xf69),'summary':_0x1d98b2(0xd1d),'description':'Resets\x20all\x20permanently-failed\x20jobs\x20back\x20to\x20pending\x20(optionally\x20scoped\x20to\x20a\x20type).','tags':[_0x1d98b2(0x879)],'body':{'type':null,'limit':0x1388},'inputSchema':{'type':'object','properties':{'env':{'type':_0x1d98b2(0xf7a),'default':'default','description':_0x1d98b2(0xde1)},'type':{'type':['string',_0x1d98b2(0x11e)]},'limit':{'type':_0x1d98b2(0x10f2)}},'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':'object','properties':{'retried':{'type':_0x1d98b2(0x10f2)}}}},'additionalProperties':![]},'access':{'audiences':['http','shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':'env'},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0xf69)}}),_0x1262eb[_0x1d98b2(0x33c)]('GET',_0x5ec9d9+_0x1d98b2(0x120c),async({params:_0x13c30d})=>{const _0x15f18e=_0x1d98b2,_0x61db4f=_0x1f47c6(_0x13c30d);if(!_0x61db4f[_0x15f18e(0x30b)][_0x15f18e(0x7c0)](_0x15f18e(0x427)))return{'result':[]};const _0x1d89e4=[];for(const _0x35628b of _0x61db4f[_0x15f18e(0x30b)]['query'](_0x15f18e(0x427),{},{})){_0x1d89e4['push'](_0x35628b[_0x15f18e(0x568)]??_0x35628b);}return{'result':_0x1d89e4};},{'id':'queue_list_buckets','summary':_0x1d98b2(0x5ac),'description':_0x1d98b2(0xd64),'tags':['queue'],'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)}},'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),'shell',_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf3c),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x1d98b2(0x879),'action':'queue_list_buckets','readOnlyHint':!![]}}),_0x1262eb['add']('POST',_0x5ec9d9+_0x1d98b2(0x1226),async({params:_0x1b796b,body:_0x27ff40})=>{const _0x4ced11=_0x1f47c6(_0x1b796b);return await _0x4ced11['addBucket'](_0x1b796b['bucket'],_0x27ff40),{'result':'ok'};},{'id':_0x1d98b2(0x4cf),'summary':_0x1d98b2(0x2b4),'tags':['queue'],'params':{'bucket':_0x1d98b2(0x4ea)},'body':{'concurrency':0x1,'ttl':0x7530},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':'Environment\x20name'},'bucket':{'type':_0x1d98b2(0xf7a),'description':_0x1d98b2(0x4ea)},'concurrency':{'type':_0x1d98b2(0x10f2)},'ttl':{'type':_0x1d98b2(0x10f2)},'capacity':{'type':_0x1d98b2(0x10f2)},'tokens':{'type':'integer'},'refill_amount':{'type':_0x1d98b2(0x10f2)},'refill_every':{'type':_0x1d98b2(0x10f2)}},'required':[_0x1d98b2(0x401)],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':'string'}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),'shell',_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':'env'},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x4cf)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+'/bucket/update/:bucket',async({params:_0x265cbe,body:_0x5f128b})=>{const _0x281ccf=_0x1d98b2,_0x815938=_0x1f47c6(_0x265cbe);return await _0x815938[_0x281ccf(0xfc)](_0x265cbe[_0x281ccf(0x401)],_0x5f128b),{'result':'ok'};},{'id':_0x1d98b2(0x84f),'summary':'Update\x20bucket','tags':[_0x1d98b2(0x879)],'params':{'bucket':_0x1d98b2(0x4ea)},'body':{'concurrency':0x2},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':'string','default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'bucket':{'type':_0x1d98b2(0xf7a),'description':'Bucket\x20name'},'concurrency':{'type':'integer'}},'required':['bucket'],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':_0x1d98b2(0xf7a)}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),'shell',_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':'env'},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':'queue','action':'queue_update_bucket'}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+'/bucket/remove/:bucket',async({params:_0x5d1d7c})=>{const _0x1aa2dd=_0x1d98b2,_0x41740c=_0x1f47c6(_0x5d1d7c);return await _0x41740c[_0x1aa2dd(0xbf0)](_0x5d1d7c[_0x1aa2dd(0x401)]),{'result':'ok'};},{'id':_0x1d98b2(0xc58),'summary':'Remove\x20bucket','tags':['queue'],'params':{'bucket':_0x1d98b2(0x4ea)},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)},'bucket':{'type':'string','description':_0x1d98b2(0x4ea)}},'required':[_0x1d98b2(0x401)],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':_0x1d98b2(0xf7a)}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'queue:write','scope':_0x1d98b2(0x30b)},'safety':{'access':'write','destructive':!![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0x11cc)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0xc58)}}),_0x1262eb['add'](_0x1d98b2(0xe46),_0x5ec9d9+_0x1d98b2(0x50d),async({params:_0x4c373a,body:_0x35c625})=>{const _0x4cae09=_0x1d98b2,_0x2c56a3=_0x1f47c6(_0x4c373a),_0xc83763=await _0x2c56a3[_0x4cae09(0xe42)](_0x4c373a[_0x4cae09(0x401)],_0x35c625?.[_0x4cae09(0x3d7)]);return{'result':{'ok':_0xc83763}};},{'id':_0x1d98b2(0x45a),'summary':_0x1d98b2(0x750),'description':'Attempts\x20to\x20claim\x20rate-limit\x20tokens.\x20Returns\x20ok:false\x20if\x20at\x20capacity.','tags':[_0x1d98b2(0x879)],'params':{'bucket':_0x1d98b2(0x4ea)},'body':{'tokens':0x1},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':'Environment\x20name'},'bucket':{'type':'string','description':'Bucket\x20name'},'tokens':{'type':_0x1d98b2(0x10f2)}},'required':[_0x1d98b2(0x401)],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':'object','properties':{'ok':{'type':_0x1d98b2(0x854)}}}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),'shell',_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'queue:work','scope':_0x1d98b2(0x30b)},'safety':{'access':'write','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x45a)}}),_0x1262eb[_0x1d98b2(0x33c)]('GET',_0x5ec9d9+'/job-types',async({params:_0x551d61})=>{const _0x1610ce=_0x1d98b2,_0x5bba4f=_0x1f47c6(_0x551d61),_0x2025a0=await _0x5bba4f[_0x1610ce(0x1081)]();return{'result':_0x2025a0};},{'id':'queue_list_job_types','summary':'List\x20registered\x20job\x20types','description':'Returns\x20all\x20registered\x20job\x20type\x20definitions\x20with\x20their\x20defaults\x20and\x20status.','tags':[_0x1d98b2(0x879)],'inputSchema':{'type':'object','properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0),'description':_0x1d98b2(0xde1)}},'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf3c),'scope':'env'},'safety':{'access':_0x1d98b2(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0x11cc)},'mcp':{'capability':_0x1d98b2(0x879),'action':'queue_list_job_types','readOnlyHint':!![]}}),_0x1262eb['add'](_0x1d98b2(0x929),_0x5ec9d9+_0x1d98b2(0x48b),async({params:_0x130ba4})=>{const _0x4d04a5=_0x1d98b2,_0x5dee0e=_0x1f47c6(_0x130ba4),_0x1b925f=await _0x5dee0e[_0x4d04a5(0xf93)](_0x130ba4[_0x4d04a5(0xaee)]);if(!_0x1b925f){const _0x2aa680=new Error(_0x4d04a5(0x11b7));_0x2aa680[_0x4d04a5(0xfcd)]=0x194;throw _0x2aa680;}return{'result':_0x1b925f};},{'id':_0x1d98b2(0xc5a),'summary':_0x1d98b2(0x69a),'tags':[_0x1d98b2(0x879)],'params':{'type':_0x1d98b2(0x50a)},'inputSchema':{'type':'object','properties':{'env':{'type':'string','default':'default'},'type':{'type':'string','description':_0x1d98b2(0x50a)}},'required':['type'],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x1d98b2(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':'queue:read','scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':'queue','action':_0x1d98b2(0xc5a),'readOnlyHint':!![]}});const _0x6958a9={'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0)},'id':{'type':_0x1d98b2(0xf7a),'description':_0x1d98b2(0x589)},'type':{'type':'string','description':_0x1d98b2(0x52b)},'status':{'type':_0x1d98b2(0xf7a),'enum':[_0x1d98b2(0x43f),_0x1d98b2(0xf68),_0x1d98b2(0x61f)]},'max_concurrency':{'type':[_0x1d98b2(0x10f2),_0x1d98b2(0x11e)],'minimum':0x1},'defaults':{'type':'object','properties':{'max_tries':{'type':[_0x1d98b2(0x10f2),'null'],'minimum':0x1},'retry_delay':{'type':_0x1d98b2(0x10f2),'minimum':0x0},'backoff_multiplier':{'type':'number','minimum':0x1},'priority':{'type':_0x1d98b2(0x10f2)},'ttl':{'type':[_0x1d98b2(0x10f2),_0x1d98b2(0x11e)],'minimum':0x0},'done_ttl':{'type':[_0x1d98b2(0x10f2),'null'],'minimum':0x0},'failed_ttl':{'type':[_0x1d98b2(0x10f2),'null'],'minimum':0x0},'buckets':{'type':[_0x1d98b2(0xf9d),'null']}},'additionalProperties':![]}},'additionalProperties':![]};_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+'/job-type',async({params:_0x1cc90a,body:_0x39506b})=>{const _0x39529e=_0x1d98b2,_0x4b7294=_0x1f47c6(_0x1cc90a);if(!_0x39506b?.['id']){const _0x214bf3=new Error('id\x20required');_0x214bf3[_0x39529e(0xfcd)]=0x190;throw _0x214bf3;}const _0x176281=await _0x4b7294[_0x39529e(0x10f9)](_0x39506b['id'],_0x39506b);return{'result':_0x176281};},{'id':'queue_create_job_type','summary':_0x1d98b2(0x4b9),'description':_0x1d98b2(0xd5c),'tags':[_0x1d98b2(0x879)],'inputSchema':_0x6958a9,'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':'env'},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x2f2)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0x719),_0x5ec9d9+_0x1d98b2(0x48b),async({params:_0x3d2d32,body:_0x568334})=>{const _0x496b04=_0x1d98b2,_0x5b32b1=_0x1f47c6(_0x3d2d32),_0x533018=await _0x5b32b1[_0x496b04(0x10f9)](_0x3d2d32[_0x496b04(0xaee)],_0x568334??{});return{'result':_0x533018};},{'id':'queue_update_job_type','summary':'Update\x20a\x20job\x20type','description':_0x1d98b2(0x524),'tags':[_0x1d98b2(0x879)],'params':{'type':_0x1d98b2(0x50a)},'inputSchema':_0x6958a9,'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':['http','shell',_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':'env'},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':'queue','action':_0x1d98b2(0x77f)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0x719),_0x5ec9d9+'/job-type/:type/schema',async({params:_0x5b45f6,body:_0x3f1c7a})=>{const _0x263515=_0x1d98b2,_0x258098=_0x1f47c6(_0x5b45f6),{definition:_0x25fd34,enforce:_0x46e8ee}=_0x3f1c7a??{};if(!_0x25fd34||typeof _0x25fd34!=='object'){const _0x4f4dec=new Error(_0x263515(0xfbd));_0x4f4dec[_0x263515(0xfcd)]=0x190;throw _0x4f4dec;}const _0x396cfd=await _0x258098['setJobTypeSchema'](_0x5b45f6['type'],_0x25fd34,_0x46e8ee??![]);return{'result':_0x396cfd};},{'id':_0x1d98b2(0x3c0),'summary':_0x1d98b2(0xfb5),'tags':[_0x1d98b2(0x879)],'params':{'type':'Job\x20type\x20name'},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':'default'},'type':{'type':_0x1d98b2(0xf7a)},'definition':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'enforce':{'type':_0x1d98b2(0x854)}},'required':['type'],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':'queue:write','scope':_0x1d98b2(0x30b)},'safety':{'access':'write','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0xcd7)},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x3c0)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0x42f),_0x5ec9d9+'/job-type/:type/schema',async({params:_0x700058})=>{const _0x51ec92=_0x1d98b2,_0x5114a2=_0x1f47c6(_0x700058);return await _0x5114a2[_0x51ec92(0xf1e)](_0x700058[_0x51ec92(0xaee)]),{'result':'ok'};},{'id':_0x1d98b2(0xc08),'summary':_0x1d98b2(0x6b6),'tags':[_0x1d98b2(0x879)],'params':{'type':_0x1d98b2(0x50a)},'inputSchema':{'type':'object','properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0)},'type':{'type':_0x1d98b2(0xf7a)}},'required':[_0x1d98b2(0xaee)],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':_0x1d98b2(0xf7a)}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),'shell',_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':'env'},'safety':{'access':_0x1d98b2(0x61d),'destructive':!![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0x11cc)},'mcp':{'capability':_0x1d98b2(0x879),'action':'queue_remove_job_type_schema'}}),_0x1262eb['add'](_0x1d98b2(0x929),_0x5ec9d9+'/job-type/:type/sample-payloads',async({params:_0x24e3da})=>{const _0x502994=_0x1d98b2,_0x157f11=_0x1f47c6(_0x24e3da),_0x46b1bc=await _0x157f11['samplePayloads'](_0x24e3da[_0x502994(0xaee)],0x32);return{'result':_0x46b1bc['map'](_0x12720d=>({'value':_0x12720d}))};},{'id':_0x1d98b2(0x404),'summary':'Get\x20sample\x20payloads\x20for\x20schema\x20inference','tags':[_0x1d98b2(0x879)],'params':{'type':_0x1d98b2(0x50a)},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0)},'type':{'type':_0x1d98b2(0xf7a)}},'required':[_0x1d98b2(0xaee)],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'additionalProperties':!![]},'access':{'audiences':['http','shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf3c),'scope':'env'},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x1d98b2(0x879),'action':_0x1d98b2(0x404),'readOnlyHint':!![]}}),_0x1262eb['add'](_0x1d98b2(0xe46),_0x5ec9d9+'/job-type/:type/pause',async({params:_0x3572ae})=>{const _0x189a29=_0x1d98b2,_0x57197c=_0x1f47c6(_0x3572ae);return await _0x57197c[_0x189a29(0xd41)](_0x3572ae[_0x189a29(0xaee)]),{'result':'ok'};},{'id':_0x1d98b2(0x88a),'summary':_0x1d98b2(0x117f),'description':'Prevents\x20workers\x20from\x20claiming\x20new\x20jobs\x20of\x20this\x20type.\x20Existing\x20running\x20jobs\x20continue.','tags':['queue'],'params':{'type':'Job\x20type\x20name'},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':'string','default':_0x1d98b2(0x8d0)},'type':{'type':_0x1d98b2(0xf7a),'description':_0x1d98b2(0x50a)}},'required':[_0x1d98b2(0xaee)],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':_0x1d98b2(0xf7a)}},'additionalProperties':![]},'access':{'audiences':['http',_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1d98b2(0x11cc)},'mcp':{'capability':'queue','action':_0x1d98b2(0x88a)}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0xe46),_0x5ec9d9+_0x1d98b2(0xa17),async({params:_0x5eab49})=>{const _0x321d8c=_0x1d98b2,_0x5d1ba9=_0x1f47c6(_0x5eab49);return await _0x5d1ba9[_0x321d8c(0x8fb)](_0x5eab49[_0x321d8c(0xaee)]),{'result':'ok'};},{'id':_0x1d98b2(0xbde),'summary':_0x1d98b2(0x4f2),'tags':[_0x1d98b2(0x879)],'params':{'type':_0x1d98b2(0x50a)},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0)},'type':{'type':_0x1d98b2(0xf7a),'description':'Job\x20type\x20name'}},'required':[_0x1d98b2(0xaee)],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':_0x1d98b2(0xf7a)}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':'queue','action':_0x1d98b2(0xbde)}}),_0x1262eb['add']('POST',_0x5ec9d9+_0x1d98b2(0x193),async({params:_0x6c5ff4})=>{const _0x21cf6d=_0x1d98b2,_0x43db4d=_0x1f47c6(_0x6c5ff4);return await _0x43db4d[_0x21cf6d(0x2a2)](_0x6c5ff4['type']),{'result':'ok'};},{'id':_0x1d98b2(0x8a6),'summary':_0x1d98b2(0x2e6),'description':'Stops\x20accepting\x20new\x20jobs\x20of\x20this\x20type\x20while\x20allowing\x20existing\x20queued\x20jobs\x20to\x20run.','tags':['queue'],'params':{'type':_0x1d98b2(0x50a)},'inputSchema':{'type':'object','properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0)},'type':{'type':'string','description':_0x1d98b2(0x50a)}},'required':[_0x1d98b2(0xaee)],'additionalProperties':![]},'outputSchema':{'type':_0x1d98b2(0xb36),'properties':{'result':{'type':_0x1d98b2(0xf7a)}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),_0x1d98b2(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':_0x1d98b2(0x30b)},'safety':{'access':_0x1d98b2(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x1d98b2(0x879),'action':'queue_drain_job_type'}}),_0x1262eb[_0x1d98b2(0x33c)](_0x1d98b2(0x42f),_0x5ec9d9+_0x1d98b2(0x48b),async({params:_0x54cc42})=>{const _0x58ebda=_0x1d98b2,_0x38d702=_0x1f47c6(_0x54cc42);return await _0x38d702[_0x58ebda(0x115e)](_0x54cc42[_0x58ebda(0xaee)]),{'result':'ok'};},{'id':_0x1d98b2(0xa37),'summary':_0x1d98b2(0xfbc),'description':'Deletes\x20the\x20job\x20type\x20definition.\x20Existing\x20jobs\x20of\x20this\x20type\x20are\x20unaffected.','tags':[_0x1d98b2(0x879)],'params':{'type':_0x1d98b2(0x50a)},'inputSchema':{'type':_0x1d98b2(0xb36),'properties':{'env':{'type':_0x1d98b2(0xf7a),'default':_0x1d98b2(0x8d0)},'type':{'type':'string','description':_0x1d98b2(0x50a)}},'required':[_0x1d98b2(0xaee)],'additionalProperties':![]},'outputSchema':{'type':'object','properties':{'result':{'type':_0x1d98b2(0xf7a)}},'additionalProperties':![]},'access':{'audiences':[_0x1d98b2(0x9f4),_0x1d98b2(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1d98b2(0xf7e),'scope':'env'},'safety':{'access':'write','destructive':!![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':'queue','action':'queue_remove_job_type'}});}return okdbQueueHttp;}var okdbFilesHttp,hasRequiredOkdbFilesHttp;function requireOkdbFilesHttp(){const _0x2a3b3d=_0xef8cd8;if(hasRequiredOkdbFilesHttp)return okdbFilesHttp;hasRequiredOkdbFilesHttp=0x1;const _0x4b1b20=require$$0$1;okdbFilesHttp=function _0x111738(_0x583969){const _0x34ca13=_0x47ab,_0x50bd96=typeof _0x583969?.[_0x34ca13(0x10b7)]===_0x34ca13(0x63b);if(_0x50bd96){const _0x2ac138=_0x583969;_0x1ed367(_0x2ac138['okdb']['http'],_0x2ac138),_0x1862b8(_0x2ac138['okdb'][_0x34ca13(0x9f4)],()=>_0x2ac138,'/api/files');return;}const _0x2ef31d=_0x583969,_0x3658d3=_0x2ef31d[_0x34ca13(0x9f4)];_0x1ed367(_0x3658d3,{'listBlobStatus':()=>_0x2ef31d[_0x34ca13(0xa3)]['get'](_0x34ca13(0x8d0))?.[_0x34ca13(0xf5b)]?.[_0x34ca13(0x69c)]?.()??[],'streamByHash':_0x10b2ae=>_0x2ef31d['_envs'][_0x34ca13(0xbeb)]('default')?.[_0x34ca13(0xf5b)]?.[_0x34ca13(0x1233)](_0x10b2ae),'syncBlobs':_0x20dcb3=>_0x2ef31d['_envs'][_0x34ca13(0xbeb)](_0x34ca13(0x8d0))?.[_0x34ca13(0xf5b)]?.[_0x34ca13(0x1c1)](_0x20dcb3)??{'synced':0x0,'errors':[]}});const _0x37a32e=_0x5ede6f=>{const _0x51f72d=_0x34ca13,_0x33e2de=_0x2ef31d['_envs'][_0x51f72d(0xbeb)](_0x5ede6f[_0x51f72d(0x30b)]);if(!_0x33e2de){const _0x452e53=new Error(_0x51f72d(0x56f)+_0x5ede6f['env']);_0x452e53[_0x51f72d(0xfcd)]=0x194;throw _0x452e53;}if(!_0x33e2de[_0x51f72d(0xf5b)]){const _0x62230c=new Error(_0x51f72d(0x409)+_0x5ede6f['env']+'\x22\x20has\x20no\x20files\x20feature');_0x62230c[_0x51f72d(0xfcd)]=0x194;throw _0x62230c;}return _0x33e2de[_0x51f72d(0xf5b)];},_0x11806e=_0x2ef31d[_0x34ca13(0x11e5)]?.[_0x34ca13(0x1f5)]?.[_0x34ca13(0xb13)]??_0x34ca13(0x8d0);_0x1862b8(_0x3658d3,_0x37a32e,'/api[/env/:env='+_0x11806e+_0x34ca13(0x11c7));};function _0x1ed367(_0x449f90,_0x31cbbe){const _0x594bde=_0x47ab;_0x449f90[_0x594bde(0x33c)](_0x594bde(0x929),_0x594bde(0xc85),()=>{const _0x17d15b=_0x594bde,_0x2ea3a8=typeof _0x31cbbe['listBlobStatus']==='function'?_0x31cbbe[_0x17d15b(0x69c)]():_0x31cbbe[_0x17d15b(0x69c)];return{'result':_0x2ea3a8};},{'id':_0x594bde(0x9b0),'summary':_0x594bde(0x39f),'description':_0x594bde(0x4ad),'tags':[_0x594bde(0xf5b)],'inputSchema':{'type':_0x594bde(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0x594bde(0xf9d),'items':{'type':_0x594bde(0xb36)}},'access':{'audiences':[_0x594bde(0x9f4),_0x594bde(0xd14),_0x594bde(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x594bde(0xb93)},'safety':{'access':_0x594bde(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x594bde(0x11cc)},'mcp':{'capability':'files','action':_0x594bde(0x9b0),'readOnlyHint':!![]}}),_0x449f90[_0x594bde(0x33c)]('GET',_0x594bde(0xa1c),({params:_0x29c09f})=>{const _0x33e697=_0x594bde;return{'status':0xc8,'headers':{'content-type':_0x33e697(0xc2e)},'body':_0x31cbbe[_0x33e697(0x1233)](_0x29c09f[_0x33e697(0x6f9)])};},{'id':_0x594bde(0x10fe),'summary':_0x594bde(0xc67),'description':'Streams\x20the\x20raw\x20blob\x20bytes\x20for\x20a\x20given\x20SHA-256\x20hash.\x20Used\x20for\x20peer-to-peer\x20blob\x20replication.','tags':[_0x594bde(0xf5b)],'params':{'hash':'SHA-256\x20hex\x20hash'},'inputSchema':{'type':_0x594bde(0xb36),'properties':{'hash':{'type':_0x594bde(0xf7a)}},'required':[_0x594bde(0x6f9)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x594bde(0x9f4),_0x594bde(0xd14),_0x594bde(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x594bde(0xb93)},'safety':{'access':_0x594bde(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':!![]},'http':{'bodyMode':_0x594bde(0x11cc),'transport':_0x594bde(0xdc1)},'mcp':{'include':![]}}),_0x449f90[_0x594bde(0x33c)](_0x594bde(0xe46),_0x594bde(0x90c),async({body:_0xf390f1})=>{const _0x3c123b=_0x594bde,_0x2f17c0=await _0x31cbbe[_0x3c123b(0x1c1)]({'peerIds':_0xf390f1?.[_0x3c123b(0xc34)]??undefined});return{'result':_0x2f17c0};},{'id':_0x594bde(0x802),'summary':_0x594bde(0x600),'description':'Pull\x20any\x20blobs\x20from\x20known\x20peers\x20that\x20are\x20not\x20yet\x20available\x20locally.','tags':[_0x594bde(0xf5b)],'body':{'peerIds':['optional\x20array\x20of\x20peer\x20IDs']},'inputSchema':{'type':_0x594bde(0xb36),'properties':{'peerIds':{'type':_0x594bde(0xf9d),'items':{'type':_0x594bde(0xf7a)}}},'additionalProperties':![]},'outputSchema':{'type':_0x594bde(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x594bde(0x9f4),_0x594bde(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x594bde(0x42e)},'safety':{'access':_0x594bde(0x90a),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x594bde(0xcd7)},'mcp':{'capability':'files','action':_0x594bde(0x802)}});}function _0x1862b8(_0x5e2c7c,_0x19a150,_0x47b0cd=_0x2a3b3d(0x22b)){const _0x15a0b4=_0x2a3b3d;_0x5e2c7c[_0x15a0b4(0x432)](_0x15a0b4(0xe46),''+_0x47b0cd,async({params:_0x5b6146,query:_0x1f561b,headers:_0x307399,context:_0xd42fa1})=>{const _0x12a679=_0x15a0b4,_0x2134b5=_0x19a150(_0x5b6146),_0x5748d1=_0xd42fa1[_0x12a679(0xb9f)];if(!_0x5748d1)throw Object[_0x12a679(0x299)](new Error(_0x12a679(0x5c4)),{'status':0x1f4});const _0x47087e=_0x307399[_0x12a679(0x31a)];if(_0x47087e==null)throw Object[_0x12a679(0x299)](new Error('Content-Length\x20header\x20is\x20required\x20for\x20file\x20uploads'),{'status':0x19b});const _0x1036a9=Number(_0x47087e);if(!Number[_0x12a679(0x2b5)](_0x1036a9)||_0x1036a9<0x0)throw Object[_0x12a679(0x299)](new Error('Invalid\x20Content-Length'),{'status':0x190});const _0x53c99e=_0x307399[_0x12a679(0x202)]||_0x12a679(0xc2e),_0x4cc3b7=_0x1f561b?.[_0x12a679(0x20b)]??'',_0x2145ce=_0x4b1b20[_0x12a679(0xa91)](),_0x25250e=await _0x2134b5[_0x12a679(0x10b7)]({'id':_0x2145ce,'stream':_0x5748d1,'mime':_0x53c99e,'path':_0x4cc3b7});return _0x25250e['size']!==_0x1036a9&&_0x2134b5[_0x12a679(0xd4f)][_0x12a679(0x9be)]?.[_0x12a679(0xf78)]?.(_0x12a679(0xd0a)+_0x2145ce+':\x20declared\x20'+_0x1036a9+_0x12a679(0xf5c)+_0x25250e['size']),_0x2134b5[_0x12a679(0xd4f)][_0x12a679(0xea8)][_0x12a679(0xf5d)](_0x12a679(0xd59),{'id':_0x2145ce,'path':_0x4cc3b7,'size':_0x25250e[_0x12a679(0xfb)]}),{'status':0xc9,'body':{'result':_0x25250e}};},{'id':_0x15a0b4(0xda2),'summary':_0x15a0b4(0x82c),'description':_0x15a0b4(0x4d2),'tags':[_0x15a0b4(0xf5b)],'query':{'path':_0x15a0b4(0x681)},'headers':{'content-type':_0x15a0b4(0x188),'content-length':_0x15a0b4(0xe33)},'raw':!![],'inputSchema':{'type':_0x15a0b4(0xb36),'properties':{'env':{'type':'string','default':_0x15a0b4(0x8d0)},'path':{'type':_0x15a0b4(0xf7a),'default':_0x15a0b4(0x681)}},'additionalProperties':![]},'outputSchema':{'type':_0x15a0b4(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x15a0b4(0x9f4),_0x15a0b4(0xd14),_0x15a0b4(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x15a0b4(0x42e),'scope':_0x15a0b4(0x30b)},'safety':{'access':_0x15a0b4(0x61d),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':!![]},'http':{'bodyMode':_0x15a0b4(0x6cc),'transport':_0x15a0b4(0x6cc),'querySchema':{'path':{'type':_0x15a0b4(0xf7a),'default':_0x15a0b4(0x681)}}},'mcp':{'include':![]}}),_0x5e2c7c[_0x15a0b4(0x33c)](_0x15a0b4(0x929),''+_0x47b0cd,async({params:_0x4cd267,query:_0x29bb1b})=>{const _0x88326b=_0x15a0b4,_0x3c2a42=_0x19a150(_0x4cd267),_0x527252=_0x29bb1b?.[_0x88326b(0x20b)]??'/',_0xe6c94a=_0x29bb1b?.['recursive']!==_0x88326b(0x2fd),_0x385d9d=Math[_0x88326b(0x2dc)](Math['max'](0x1,parseInt(_0x29bb1b?.[_0x88326b(0xbae)])||0x64),0x2710),_0x48025a=await _0x3c2a42[_0x88326b(0xef3)](_0x527252,{'recursive':_0xe6c94a,'limit':_0x385d9d});return{'result':_0x48025a,'meta':{'count':_0x48025a[_0x88326b(0x156)]}};},{'id':_0x15a0b4(0xff),'summary':_0x15a0b4(0x1069),'description':_0x15a0b4(0xa8e),'tags':['files'],'query':{'path':'/','recursive':!![],'limit':0x64},'inputSchema':{'type':'object','properties':{'env':{'type':_0x15a0b4(0xf7a),'default':_0x15a0b4(0x8d0)},'path':{'type':_0x15a0b4(0xf7a),'default':'/'},'recursive':{'type':'boolean','default':!![]},'limit':{'type':'integer','default':0x64}},'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0x15a0b4(0xb36)}},'access':{'audiences':[_0x15a0b4(0x9f4),'shell',_0x15a0b4(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x15a0b4(0xb93),'scope':'env'},'safety':{'access':_0x15a0b4(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none','querySchema':{'path':{'type':_0x15a0b4(0xf7a),'default':'/'},'recursive':{'type':[_0x15a0b4(0x854),_0x15a0b4(0xf7a)],'default':!![]},'limit':{'type':[_0x15a0b4(0x10f2),_0x15a0b4(0xf7a)],'default':0x64}}},'mcp':{'capability':_0x15a0b4(0xf5b),'action':_0x15a0b4(0xff),'readOnlyHint':!![]}}),_0x5e2c7c[_0x15a0b4(0x33c)]('GET',_0x47b0cd+_0x15a0b4(0xcd2),async({params:_0x575712})=>{const _0x5ed44b=_0x15a0b4,_0x58b9a7=_0x19a150(_0x575712),{stream:_0x3e2f5d,record:_0x21bca9}=await _0x58b9a7['stream'](_0x575712['id']),_0x1c0481={'content-type':_0x21bca9[_0x5ed44b(0x200)]||'application/octet-stream','content-length':String(_0x21bca9[_0x5ed44b(0xfb)])};if(_0x21bca9[_0x5ed44b(0x20b)]){const _0x3c788a=_0x21bca9[_0x5ed44b(0x20b)]['split']('/')[_0x5ed44b(0x5f1)]();_0x3c788a&&(_0x1c0481['content-disposition']='attachment;\x20filename=\x22'+_0x3c788a[_0x5ed44b(0x8d8)](/"/g,'\x5c\x22')+'\x22');}return{'status':0xc8,'headers':_0x1c0481,'body':_0x3e2f5d};},{'id':'files_download','summary':_0x15a0b4(0xaad),'description':'Stream\x20the\x20raw\x20blob\x20for\x20a\x20file\x20id.','tags':[_0x15a0b4(0xf5b)],'params':{'id':_0x15a0b4(0x5a2)},'inputSchema':{'type':_0x15a0b4(0xb36),'properties':{'env':{'type':_0x15a0b4(0xf7a),'default':_0x15a0b4(0x8d0)},'id':{'type':_0x15a0b4(0xf7a)}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':_0x15a0b4(0xb36),'additionalProperties':!![]},'access':{'audiences':['http','shell',_0x15a0b4(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x15a0b4(0xb93),'scope':'env'},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':!![]},'http':{'bodyMode':'none','transport':_0x15a0b4(0xdc1)},'mcp':{'include':![]}}),_0x5e2c7c[_0x15a0b4(0x33c)](_0x15a0b4(0x42f),_0x47b0cd+_0x15a0b4(0xcd2),async({params:_0x108312})=>{const _0x5b3250=_0x15a0b4,_0x2b5206=_0x19a150(_0x108312);return await _0x2b5206[_0x5b3250(0x21e)](_0x108312['id']),{'status':0xcc};},{'id':'files_delete','summary':_0x15a0b4(0x119e),'description':_0x15a0b4(0xb2e),'tags':[_0x15a0b4(0xf5b)],'params':{'id':_0x15a0b4(0x5a2)},'inputSchema':{'type':_0x15a0b4(0xb36),'properties':{'env':{'type':_0x15a0b4(0xf7a),'default':_0x15a0b4(0x8d0)},'id':{'type':_0x15a0b4(0xf7a)}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':_0x15a0b4(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x15a0b4(0x9f4),'shell',_0x15a0b4(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x15a0b4(0x42e),'scope':_0x15a0b4(0x30b)},'safety':{'access':_0x15a0b4(0x61d),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x15a0b4(0x11cc)},'mcp':{'capability':_0x15a0b4(0xf5b),'action':'files_delete'}}),_0x5e2c7c[_0x15a0b4(0x33c)](_0x15a0b4(0x929),_0x47b0cd+_0x15a0b4(0x9df),async({params:_0x4916ed})=>{const _0x32aa7f=_0x15a0b4,_0x160d2f=_0x19a150(_0x4916ed);if(!_0x160d2f['_isEnsured']&&!_0x160d2f[_0x32aa7f(0x30b)][_0x32aa7f(0x7c0)](_0x32aa7f(0x5b9)))throw Object[_0x32aa7f(0x299)](new Error(_0x32aa7f(0x11bd)+_0x4916ed['id']),{'status':0x194});const _0x2de752=_0x160d2f[_0x32aa7f(0x30b)][_0x32aa7f(0xbeb)](_0x32aa7f(0x5b9),_0x4916ed['id']);if(!_0x2de752)throw Object[_0x32aa7f(0x299)](new Error('File\x20not\x20found:\x20'+_0x4916ed['id']),{'status':0x194});const _0x18d93b=_0x160d2f[_0x32aa7f(0xee2)](_0x2de752[_0x32aa7f(0x6f9)]);return{'result':{'id':_0x2de752['id'],'hash':_0x2de752[_0x32aa7f(0x6f9)],'size':_0x2de752[_0x32aa7f(0xfb)],'mime':_0x2de752[_0x32aa7f(0x200)],'path':_0x2de752[_0x32aa7f(0x20b)],'createdAt':_0x2de752[_0x32aa7f(0x1156)],'blob':{'refs':_0x18d93b?.[_0x32aa7f(0xbf5)]??0x0}}};},{'id':_0x15a0b4(0x1240),'summary':_0x15a0b4(0x8d7),'description':_0x15a0b4(0xd85),'tags':[_0x15a0b4(0xf5b)],'params':{'id':_0x15a0b4(0x5a2)},'inputSchema':{'type':'object','properties':{'env':{'type':_0x15a0b4(0xf7a),'default':'default'},'id':{'type':'string'}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':_0x15a0b4(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x15a0b4(0x9f4),_0x15a0b4(0xd14),_0x15a0b4(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x15a0b4(0xb93),'scope':_0x15a0b4(0x30b)},'safety':{'access':_0x15a0b4(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x15a0b4(0xf5b),'action':_0x15a0b4(0x1240),'readOnlyHint':!![]}});}return okdbFilesHttp;}var okdbPipelinesHttp,hasRequiredOkdbPipelinesHttp;function requireOkdbPipelinesHttp(){if(hasRequiredOkdbPipelinesHttp)return okdbPipelinesHttp;hasRequiredOkdbPipelinesHttp=0x1;const {OKDBError:_0xc09333}=requireOkdbError();return okdbPipelinesHttp=function _0x543918(_0xc9da1b){const _0x3536ab=_0x47ab;if(!_0xc9da1b[_0x3536ab(0x9f4)])return;const _0x5ec514=_0xc9da1b['http'];function _0x3d6532(_0x7b37cf){const _0x2e95d9=_0x3536ab,_0x3f7d6b=_0xc9da1b['_envs'][_0x2e95d9(0xbeb)](_0x7b37cf);if(!_0x3f7d6b){const _0x51cb22=new _0xc09333('Environment\x20not\x20found:\x20'+_0x7b37cf,_0x2e95d9(0xb7f));_0x51cb22[_0x2e95d9(0xfcd)]=0x194;throw _0x51cb22;}return _0x3f7d6b;}async function _0x490251(_0x5712e0,_0x316b00={}){const _0x381eef=_0x3536ab;_0x3d6532(_0x5712e0);const _0x1748ce=_0xc9da1b[_0x381eef(0x30b)](_0x5712e0),_0x43a387=_0x316b00?.[_0x381eef(0x1173)];if(!_0x43a387||typeof _0x43a387!=='string'||!_0x43a387[_0x381eef(0xf4d)]()){const _0x3ce5e2=new _0xc09333('Pipeline\x20name\x20is\x20required',_0x381eef(0xcee));_0x3ce5e2[_0x381eef(0xfcd)]=0x190;throw _0x3ce5e2;}const _0x3b003d=_0x316b00?.[_0x381eef(0x654)]??{},_0x3916ee=_0x316b00?.['members'];if(!Array[_0x381eef(0x10f5)](_0x3916ee)||_0x3916ee[_0x381eef(0x156)]===0x0){const _0x4a54fd=new _0xc09333(_0x381eef(0x281),_0x381eef(0xcee));_0x4a54fd[_0x381eef(0xfcd)]=0x190;throw _0x4a54fd;}const _0x256092=[];try{for(const _0x2889c7 of _0x3916ee){if(!_0x2889c7?.[_0x381eef(0x81a)]||!_0x2889c7?.[_0x381eef(0xaba)]||!_0x2889c7?.[_0x381eef(0xd27)]||!_0x2889c7?.[_0x381eef(0x100c)]){const _0x95a291=new _0xc09333('Each\x20member\x20needs\x20engineType,\x20engineName,\x20role,\x20and\x20engineConfig',_0x381eef(0xcee));_0x95a291[_0x381eef(0xfcd)]=0x190;throw _0x95a291;}const _0x36a1f4=await _0x1748ce[_0x381eef(0xab8)]['createAndStartEngine'](_0x2889c7['engineType'],_0x2889c7[_0x381eef(0xaba)],_0x2889c7['engineConfig'],_0x2889c7[_0x381eef(0x6a6)]??{});_0x256092['push']({'engine':_0x36a1f4,'member':_0x2889c7});}const _0x2ab54c=_0x256092[_0x381eef(0x1166)](({member:_0x21b683})=>({'type':_0x21b683['engineType'],'name':_0x21b683[_0x381eef(0xaba)],'role':_0x21b683[_0x381eef(0xd27)]}));return _0x1748ce[_0x381eef(0x7d3)][_0x381eef(0x725)]({'name':_0x43a387['trim'](),'meta':_0x3b003d,'engines':_0x2ab54c});}catch(_0x1befcb){for(const {member:_0x470984}of _0x256092){try{await _0xc9da1b[_0x381eef(0xab8)]['uninstallEngine'](_0x470984[_0x381eef(0x81a)],_0x470984[_0x381eef(0xaba)]);}catch{}}throw _0x1befcb;}}async function _0x56d161(_0x17d6c6,_0x44f6ff,_0xed738d={}){const _0x463cb5=_0x3536ab,_0x31b7cf=_0xc9da1b[_0x463cb5(0xab8)][_0x463cb5(0xf98)](_0x44f6ff,_0xed738d,{'envName':_0x17d6c6}),_0x5235bd=_0x31b7cf[_0x463cb5(0xcd6)]??{};if(_0x5235bd[_0x463cb5(0x31e)]!==_0x463cb5(0x46b)){const _0x16a46c=new _0xc09333(_0x463cb5(0x100d)+_0x44f6ff+'\x22\x20does\x20not\x20create\x20a\x20pipeline',_0x463cb5(0x2c2));_0x16a46c['status']=0x190;throw _0x16a46c;}if(_0x5235bd[_0x463cb5(0xebc)]===_0x463cb5(0x1193)&&_0x5235bd[_0x463cb5(0xdaa)]===_0x463cb5(0x41d)){const _0x21627f=await _0x490251(_0x17d6c6,_0x5235bd[_0x463cb5(0x3c3)]??{});return{'template':_0x31b7cf[_0x463cb5(0xa66)],'plan':_0x5235bd,'result':_0x21627f};}if(_0x5235bd[_0x463cb5(0xebc)]===_0x463cb5(0x7f1)&&_0x5235bd[_0x463cb5(0xdaa)]==='embeddings-create'){const _0x51853a=_0x5235bd[_0x463cb5(0x3c3)]??{};await _0xc9da1b['embeddings'][_0x463cb5(0x10ab)](_0x51853a['name'],_0x51853a[_0x463cb5(0x142)]??{},_0x51853a[_0x463cb5(0x654)]??{});const _0x1a92c2=_0x51853a[_0x463cb5(0x142)]?.['storage_key']??_0x51853a[_0x463cb5(0x1173)],_0x4547b9=await _0xc9da1b[_0x463cb5(0x30b)](_0x17d6c6)[_0x463cb5(0x7d3)][_0x463cb5(0xbeb)](_0x1a92c2);return{'template':_0x31b7cf[_0x463cb5(0xa66)],'plan':_0x5235bd,'result':_0x4547b9};}const _0x3836ca=new _0xc09333(_0x463cb5(0x8ae)+_0x44f6ff+'\x22','PIPELINE_TEMPLATE_UNSUPPORTED');_0x3836ca[_0x463cb5(0xfcd)]=0x190;throw _0x3836ca;}_0x5ec514['add']('GET','/api/pipelines/templates',async()=>{const _0x4e29ec=_0x3536ab;return{'result':_0xc9da1b[_0x4e29ec(0xab8)]['listTemplates']('pipeline')};},{'id':_0x3536ab(0xef9),'summary':'List\x20pipeline\x20templates','description':_0x3536ab(0xbc5),'tags':['pipelines'],'inputSchema':{'type':_0x3536ab(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0x3536ab(0xf9d),'items':{'type':_0x3536ab(0xb36)}},'access':{'audiences':[_0x3536ab(0x9f4),_0x3536ab(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x3536ab(0x58b)},'safety':{'access':_0x3536ab(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x3536ab(0x46b),'action':_0x3536ab(0xef9),'readOnlyHint':!![]}}),_0x5ec514[_0x3536ab(0x33c)](_0x3536ab(0x929),'/api/pipelines/templates/:template',async({params:_0x345729})=>{const _0x32126a=_0x3536ab,_0x3a6c6f=_0xc9da1b['engines']['getTemplate'](_0x345729[_0x32126a(0xa66)]);if(!_0x3a6c6f||_0x3a6c6f[_0x32126a(0x31e)]!==_0x32126a(0x46b)){const _0x58940b=new _0xc09333('Pipeline\x20template\x20not\x20found:\x20'+_0x345729[_0x32126a(0xa66)],_0x32126a(0xb7f));_0x58940b[_0x32126a(0xfcd)]=0x194;throw _0x58940b;}return{'result':_0x3a6c6f};},{'id':_0x3536ab(0xbf1),'summary':'Get\x20pipeline\x20template','tags':['pipelines'],'params':{'template':_0x3536ab(0x8db)},'inputSchema':{'type':_0x3536ab(0xb36),'properties':{'template':{'type':_0x3536ab(0xf7a)}},'required':['template'],'additionalProperties':![]},'outputSchema':{'type':_0x3536ab(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x3536ab(0x9f4),_0x3536ab(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':'schema:read'},'safety':{'access':_0x3536ab(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':'pipeline','action':_0x3536ab(0xbf1),'readOnlyHint':!![]}}),_0x5ec514[_0x3536ab(0x33c)](_0x3536ab(0xe46),_0x3536ab(0xdb4),async({params:_0x44d83e,body:_0x2881e6})=>{const _0x45e296=_0x3536ab,_0x2d9d29=_0xc9da1b[_0x45e296(0xab8)][_0x45e296(0xf98)](_0x44d83e[_0x45e296(0xa66)],_0x2881e6??{});if(_0x2d9d29['template']?.[_0x45e296(0x31e)]!==_0x45e296(0x46b)){const _0x10a97b=new _0xc09333(_0x45e296(0xd39)+_0x44d83e['template'],_0x45e296(0xb7f));_0x10a97b[_0x45e296(0xfcd)]=0x194;throw _0x10a97b;}return{'result':_0x2d9d29};},{'id':_0x3536ab(0xc4f),'summary':_0x3536ab(0x11ce),'description':'Expands\x20a\x20registered\x20pipeline\x20template\x20into\x20the\x20create\x20payload\x20it\x20would\x20execute\x20without\x20applying\x20it.','tags':[_0x3536ab(0x7d3)],'params':{'template':'Template\x20id'},'inputSchema':{'type':_0x3536ab(0xb36),'properties':{'template':{'type':'string'}},'required':[_0x3536ab(0xa66)],'additionalProperties':!![]},'outputSchema':{'type':_0x3536ab(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x3536ab(0x9f4),'shell',_0x3536ab(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x3536ab(0x58b)},'safety':{'access':_0x3536ab(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':'pipeline','action':_0x3536ab(0xc4f),'readOnlyHint':!![]}}),_0x5ec514[_0x3536ab(0x33c)]('POST','/api/env/:env/pipelines/templates/:template/create',async({params:_0x15c7a1,body:_0x11d06e})=>{const _0x13e726=_0x3536ab;_0x3d6532(_0x15c7a1['env']);const _0x423a16=await _0x56d161(_0x15c7a1[_0x13e726(0x30b)],_0x15c7a1[_0x13e726(0xa66)],_0x11d06e??{});return{'status':0xc9,'body':{'result':_0x423a16}};},{'id':_0x3536ab(0x154),'summary':_0x3536ab(0x10df),'description':_0x3536ab(0x776),'tags':[_0x3536ab(0x7d3),'envs'],'params':{'env':'Environment\x20name','template':'Template\x20id'},'inputSchema':{'type':_0x3536ab(0xb36),'properties':{'env':{'type':_0x3536ab(0xf7a)},'template':{'type':'string'}},'required':[_0x3536ab(0x30b),_0x3536ab(0xa66)],'additionalProperties':!![]},'outputSchema':{'type':_0x3536ab(0xb36),'additionalProperties':!![]},'access':{'audiences':['http','shell',_0x3536ab(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:write'},'safety':{'access':_0x3536ab(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x3536ab(0xcd7)},'mcp':{'capability':_0x3536ab(0x46b),'action':'env_pipeline_template_create'}}),_0x5ec514[_0x3536ab(0x33c)](_0x3536ab(0x929),_0x3536ab(0x1c8),async()=>{const _0x582719=_0x3536ab;return{'result':await _0xc9da1b[_0x582719(0x7d3)][_0x582719(0x63e)]()};},{'id':_0x3536ab(0x11f),'summary':_0x3536ab(0x1184),'description':_0x3536ab(0x48e),'tags':[_0x3536ab(0x7d3)],'inputSchema':{'type':_0x3536ab(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0x3536ab(0xb36)}},'access':{'audiences':[_0x3536ab(0x9f4),_0x3536ab(0xd14),_0x3536ab(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x3536ab(0x58b)},'safety':{'access':_0x3536ab(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x3536ab(0x46b),'action':_0x3536ab(0x11f),'readOnlyHint':!![]}}),_0x5ec514[_0x3536ab(0x33c)](_0x3536ab(0x929),_0x3536ab(0xedc),async({params:_0xcaaf6e})=>{const _0x5d4e86=_0x3536ab;return _0x3d6532(_0xcaaf6e[_0x5d4e86(0x30b)]),{'result':await _0xc9da1b[_0x5d4e86(0x30b)](_0xcaaf6e[_0x5d4e86(0x30b)])[_0x5d4e86(0x7d3)][_0x5d4e86(0x63e)]()};},{'id':_0x3536ab(0xd3a),'summary':_0x3536ab(0x322),'description':_0x3536ab(0x229),'tags':[_0x3536ab(0x7d3),_0x3536ab(0xfcc)],'params':{'env':'Environment\x20name'},'inputSchema':{'type':_0x3536ab(0xb36),'properties':{'env':{'type':_0x3536ab(0xf7a)}},'required':[_0x3536ab(0x30b)],'additionalProperties':![]},'outputSchema':{'type':_0x3536ab(0xf9d),'items':{'type':'object'}},'access':{'audiences':[_0x3536ab(0x9f4),_0x3536ab(0xd14),_0x3536ab(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x3536ab(0x58b)},'safety':{'access':_0x3536ab(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x3536ab(0x46b),'action':_0x3536ab(0xd3a),'readOnlyHint':!![]}}),_0x5ec514['add'](_0x3536ab(0x929),_0x3536ab(0x7ed),async({params:_0x50de8b})=>{const _0x47cf7f=_0x3536ab;_0x3d6532(_0x50de8b[_0x47cf7f(0x30b)]);const _0x558b2f=await _0xc9da1b[_0x47cf7f(0x30b)](_0x50de8b[_0x47cf7f(0x30b)])[_0x47cf7f(0x7d3)][_0x47cf7f(0xbeb)](_0x50de8b[_0x47cf7f(0x46b)]);if(!_0x558b2f){const _0x5ba9f8=new _0xc09333(_0x47cf7f(0x35f)+_0x50de8b[_0x47cf7f(0x46b)],_0x47cf7f(0xb7f));_0x5ba9f8[_0x47cf7f(0xfcd)]=0x194;throw _0x5ba9f8;}return{'result':_0x558b2f};},{'id':_0x3536ab(0xea),'summary':_0x3536ab(0x1089),'description':_0x3536ab(0xfb4),'tags':[_0x3536ab(0x7d3),_0x3536ab(0xfcc)],'params':{'env':_0x3536ab(0xde1),'pipeline':_0x3536ab(0xf20)},'inputSchema':{'type':_0x3536ab(0xb36),'properties':{'env':{'type':'string'},'pipeline':{'type':'string'}},'required':[_0x3536ab(0x30b),_0x3536ab(0x46b)],'additionalProperties':![]},'outputSchema':{'type':_0x3536ab(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x3536ab(0xd14),_0x3536ab(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x3536ab(0x58b)},'safety':{'access':_0x3536ab(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x3536ab(0x11cc)},'mcp':{'capability':_0x3536ab(0x46b),'action':_0x3536ab(0xea),'readOnlyHint':!![]}}),_0x5ec514['add'](_0x3536ab(0xe46),'/api/env/:env/pipelines',async({params:_0xf2f6b5,body:_0x58f8eb})=>{const _0x538eb3=_0x3536ab;_0x3d6532(_0xf2f6b5['env']);const _0xd2eefb=await _0xc9da1b[_0x538eb3(0x30b)](_0xf2f6b5[_0x538eb3(0x30b)])[_0x538eb3(0x7d3)][_0x538eb3(0x725)](_0x58f8eb??{});return{'status':0xc9,'body':{'result':_0xd2eefb}};},{'id':_0x3536ab(0x495),'summary':_0x3536ab(0x67a),'description':_0x3536ab(0x91b),'tags':[_0x3536ab(0x7d3),_0x3536ab(0xfcc)],'params':{'env':'Environment\x20name'},'body':{'name':_0x3536ab(0xcdc),'template':null,'status':_0x3536ab(0x43f),'meta':{'label':_0x3536ab(0x1042)},'engines':[{'type':_0x3536ab(0x37b),'name':'shared-embedder','role':_0x3536ab(0x37b)},{'type':_0x3536ab(0xa4a),'name':_0x3536ab(0x121),'role':_0x3536ab(0xa4a)}]},'inputSchema':{'type':_0x3536ab(0xb36),'properties':{'env':{'type':_0x3536ab(0xf7a)},'name':{'type':'string'},'template':{'type':[_0x3536ab(0x11e)]},'status':{'type':_0x3536ab(0xf7a)},'meta':{'type':[_0x3536ab(0xb36),_0x3536ab(0x11e)],'additionalProperties':!![]},'engines':{'type':_0x3536ab(0xf9d),'items':{'type':_0x3536ab(0xb36),'properties':{'type':{'type':_0x3536ab(0xf7a)},'name':{'type':_0x3536ab(0xf7a)},'role':{'type':'string'}},'required':[_0x3536ab(0xaee),'name','role'],'additionalProperties':![]}}},'required':[_0x3536ab(0x30b),_0x3536ab(0x1173),'engines'],'additionalProperties':![]},'outputSchema':{'type':_0x3536ab(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x3536ab(0x9f4),_0x3536ab(0xd14),_0x3536ab(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x3536ab(0x7be)},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x3536ab(0xcd7)},'mcp':{'capability':_0x3536ab(0x46b),'action':_0x3536ab(0x495)}}),_0x5ec514[_0x3536ab(0x33c)](_0x3536ab(0xe46),_0x3536ab(0x7e5),async({params:_0x40ae22})=>{const _0x2f02ed=_0x3536ab;return _0x3d6532(_0x40ae22['env']),{'result':await _0xc9da1b[_0x2f02ed(0x30b)](_0x40ae22[_0x2f02ed(0x30b)])['pipelines'][_0x2f02ed(0x1fe)](_0x40ae22[_0x2f02ed(0x46b)])};},{'id':_0x3536ab(0x5e2),'summary':_0x3536ab(0xe05),'description':_0x3536ab(0xba8),'tags':['pipelines','envs'],'params':{'env':_0x3536ab(0xde1),'pipeline':'Pipeline\x20name'},'inputSchema':{'type':_0x3536ab(0xb36),'properties':{'env':{'type':_0x3536ab(0xf7a)},'pipeline':{'type':_0x3536ab(0xf7a)}},'required':[_0x3536ab(0x30b),'pipeline'],'additionalProperties':![]},'outputSchema':{'type':_0x3536ab(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x3536ab(0x9f4),_0x3536ab(0xd14),_0x3536ab(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x3536ab(0x7be)},'safety':{'access':_0x3536ab(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x3536ab(0x11cc)},'mcp':{'capability':_0x3536ab(0x46b),'action':_0x3536ab(0x5e2)}}),_0x5ec514[_0x3536ab(0x33c)](_0x3536ab(0xe46),_0x3536ab(0x10ee),async({params:_0x168253})=>{const _0x18d4f8=_0x3536ab;return _0x3d6532(_0x168253[_0x18d4f8(0x30b)]),{'result':await _0xc9da1b[_0x18d4f8(0x30b)](_0x168253[_0x18d4f8(0x30b)])[_0x18d4f8(0x7d3)][_0x18d4f8(0xa00)](_0x168253['pipeline'])};},{'id':_0x3536ab(0x3d8),'summary':'Start\x20pipeline','description':_0x3536ab(0x883),'tags':[_0x3536ab(0x7d3),'envs'],'params':{'env':_0x3536ab(0xde1),'pipeline':_0x3536ab(0xf20)},'inputSchema':{'type':_0x3536ab(0xb36),'properties':{'env':{'type':_0x3536ab(0xf7a)},'pipeline':{'type':_0x3536ab(0xf7a)}},'required':[_0x3536ab(0x30b),'pipeline'],'additionalProperties':![]},'outputSchema':{'type':_0x3536ab(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x3536ab(0x9f4),_0x3536ab(0xd14),_0x3536ab(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x3536ab(0x7be)},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x3536ab(0x46b),'action':_0x3536ab(0x3d8)}}),_0x5ec514[_0x3536ab(0x33c)]('DELETE',_0x3536ab(0x7ed),async({params:_0xfdab90})=>{const _0x224913=_0x3536ab;return _0x3d6532(_0xfdab90[_0x224913(0x30b)]),{'result':await _0xc9da1b['env'](_0xfdab90[_0x224913(0x30b)])[_0x224913(0x7d3)]['remove'](_0xfdab90[_0x224913(0x46b)])};},{'id':_0x3536ab(0xeeb),'summary':_0x3536ab(0x2f9),'description':_0x3536ab(0x10c0),'tags':['pipelines',_0x3536ab(0xfcc)],'params':{'env':_0x3536ab(0xde1),'pipeline':_0x3536ab(0xf20)},'inputSchema':{'type':_0x3536ab(0xb36),'properties':{'env':{'type':_0x3536ab(0xf7a)},'pipeline':{'type':_0x3536ab(0xf7a)}},'required':['env',_0x3536ab(0x46b)],'additionalProperties':![]},'outputSchema':{'type':_0x3536ab(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x3536ab(0x9f4),_0x3536ab(0xd14),_0x3536ab(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x3536ab(0x7be)},'safety':{'access':_0x3536ab(0x90a),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x3536ab(0x11cc)},'mcp':{'capability':_0x3536ab(0x46b),'action':_0x3536ab(0xeeb)}}),_0x5ec514['add'](_0x3536ab(0xe46),'/api/env/:env/pipelines/scaffold',async({params:_0xef71d,body:_0x2397f2})=>{const _0x30f21d=_0x3536ab;return{'status':0xc9,'body':{'result':await _0x490251(_0xef71d[_0x30f21d(0x30b)],_0x2397f2??{})}};},{'id':_0x3536ab(0x4a7),'summary':'Scaffold\x20pipeline\x20with\x20engines','description':_0x3536ab(0x343),'tags':['pipelines','envs'],'params':{'env':_0x3536ab(0xde1)},'body':{'name':'my-pipeline','meta':{'label':_0x3536ab(0xacc)},'members':[{'engineType':_0x3536ab(0xf39),'engineName':'my-pipeline:processor','role':_0x3536ab(0xf39),'engineConfig':{'source_type':_0x3536ab(0xb8),'handler':{'kind':_0x3536ab(0x63b),'name':_0x3536ab(0xbb5)}}}]},'inputSchema':{'type':_0x3536ab(0xb36),'properties':{'env':{'type':_0x3536ab(0xf7a)},'name':{'type':'string'},'meta':{'type':['object','null'],'additionalProperties':!![]},'members':{'type':_0x3536ab(0xf9d),'items':{'type':_0x3536ab(0xb36),'properties':{'engineType':{'type':_0x3536ab(0xf7a)},'engineName':{'type':_0x3536ab(0xf7a)},'role':{'type':_0x3536ab(0xf7a)},'engineConfig':{'type':_0x3536ab(0xb36),'additionalProperties':!![]},'engineMeta':{'type':[_0x3536ab(0xb36),_0x3536ab(0x11e)],'additionalProperties':!![]}},'required':[_0x3536ab(0x81a),_0x3536ab(0xaba),'role',_0x3536ab(0x100c)]}}},'required':[_0x3536ab(0x30b),_0x3536ab(0x1173),'members'],'additionalProperties':![]},'outputSchema':{'type':_0x3536ab(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x3536ab(0x9f4),_0x3536ab(0xd14),_0x3536ab(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x3536ab(0x7be)},'safety':{'access':_0x3536ab(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x3536ab(0xcd7)},'mcp':{'capability':_0x3536ab(0x46b),'action':_0x3536ab(0x4a7)}});},okdbPipelinesHttp;}function _0x47ab(_0x380eb1,_0x299123){_0x380eb1=_0x380eb1-0x8e;const _0x523f48=_0x523f();let _0x47abb6=_0x523f48[_0x380eb1];return _0x47abb6;}var okdbEnginesHttp,hasRequiredOkdbEnginesHttp;function requireOkdbEnginesHttp(){if(hasRequiredOkdbEnginesHttp)return okdbEnginesHttp;hasRequiredOkdbEnginesHttp=0x1;const {OKDBError:_0x5d75cd}=requireOkdbError();return okdbEnginesHttp=function _0x33604e(_0x3254a2){const _0x1a23bf=_0x47ab;if(!_0x3254a2[_0x1a23bf(0x9f4)])return;const _0x4bf165=_0x3254a2[_0x1a23bf(0x9f4)];function _0x41e2b1(_0x540a30){const _0x1a6cf0=_0x1a23bf,_0xa92da7=_0x3254a2['_envs'][_0x1a6cf0(0xbeb)](_0x540a30);if(!_0xa92da7){const _0x5f436a=new _0x5d75cd(_0x1a6cf0(0x56f)+_0x540a30,'NOT_FOUND');_0x5f436a[_0x1a6cf0(0xfcd)]=0x194;throw _0x5f436a;}return _0xa92da7;}function _0x2b1d4f(_0x561607,_0x57c659,_0x2f9001){const _0x4021c4=_0x1a23bf,_0x15ea6e=_0x3254a2[_0x4021c4(0x30b)](_0x561607),_0x469b3=_0x15ea6e[_0x4021c4(0xab8)][_0x4021c4(0xf83)](_0x57c659,_0x2f9001);if(!_0x469b3){const _0x1d2eac=new _0x5d75cd(_0x4021c4(0x1188)+_0x57c659+'@'+_0x2f9001,_0x4021c4(0x6c7));_0x1d2eac[_0x4021c4(0xfcd)]=0x194;throw _0x1d2eac;}return _0x469b3;}async function _0x1b2ecb(_0x3b8cfa){const _0x46a817=_0x1a23bf;if(!_0x3b8cfa?.[_0x46a817(0x951)]||!_0x3b8cfa[_0x46a817(0x6e3)]())return;const _0xe645d9=_0x3b8cfa[_0x46a817(0xad3)]??{};typeof _0x3b8cfa[_0x46a817(0xc91)]?.['assertStartAllowed']==='function'&&await _0x3b8cfa[_0x46a817(0xc91)][_0x46a817(0xd3f)]({'okdb':_0x3254a2,'key':_0x3b8cfa[_0x46a817(0x9dd)],'type':_0x3b8cfa[_0x46a817(0xaee)],'name':_0x3b8cfa[_0x46a817(0x1173)],'config':_0xe645d9['config']??{},'meta':_0xe645d9[_0x46a817(0x654)]??{},'storeEnv':_0x3b8cfa['_store'],'storeEnvName':_0x3b8cfa['_store']?.[_0x46a817(0x1173)]??null});}async function _0x566844(_0x2f2677){const _0x563651=_0x1a23bf,_0x3fd80c=_0x2f2677[_0x563651(0x1f5)]??{},_0x121610=_0x2f2677[_0x563651(0xad3)]??null,_0x1227d9=_0x2f2677['runtimeState']??null;let _0x28d1d2=null;try{if(typeof _0x3fd80c[_0x563651(0xd72)]==='function')_0x28d1d2=await _0x3fd80c['stats']();}catch{}return{'key':_0x2f2677['key'],'type':_0x2f2677[_0x563651(0xaee)],'name':_0x2f2677['name'],'env':_0x2f2677[_0x563651(0x60a)]?.[_0x563651(0x1173)]??null,'status':_0x2f2677[_0x563651(0xfcd)]??null,'reason':_0x2f2677[_0x563651(0xa25)]??null,'isRunning':_0x2f2677[_0x563651(0xc53)],'enabled':_0x2f2677[_0x563651(0x951)],'affinity':_0x2f2677[_0x563651(0x54a)],'config':_0x121610?.[_0x563651(0x142)]??null,'meta':_0x121610?.[_0x563651(0x654)]??null,'error':_0x2f2677[_0x563651(0xbab)]?.['message']??null,'runtime':_0x1227d9,'stats':_0x28d1d2};}async function _0x3bae2a(_0x3cdec2,_0x2abd9c,_0x196699={}){const _0x203fc7=_0x1a23bf,_0x2845fe=_0x3254a2[_0x203fc7(0xab8)]['previewTemplate'](_0x2abd9c,_0x196699,{'envName':_0x3cdec2}),_0x48c2fe=_0x2845fe['plan']??{};if(_0x48c2fe[_0x203fc7(0x31e)]!=='engine'){const _0x5fcef5=new _0x5d75cd(_0x203fc7(0x100d)+_0x2abd9c+_0x203fc7(0xc5e),'ENGINE_TEMPLATE_KIND_MISMATCH');_0x5fcef5[_0x203fc7(0xfcd)]=0x190;throw _0x5fcef5;}const _0x40aeb8=_0x3254a2[_0x203fc7(0x30b)](_0x3cdec2),_0x4dbe21=await _0x40aeb8[_0x203fc7(0xab8)][_0x203fc7(0x754)](_0x48c2fe[_0x203fc7(0xaee)],_0x48c2fe[_0x203fc7(0x1173)],_0x48c2fe['config']??{},_0x48c2fe[_0x203fc7(0x654)]??{},_0x48c2fe[_0x203fc7(0x11e5)]??{});return{'template':_0x2845fe['template'],'plan':_0x48c2fe,'result':await _0x566844(_0x4dbe21)};}_0x4bf165[_0x1a23bf(0x33c)](_0x1a23bf(0x929),_0x1a23bf(0x3da),async()=>{const _0x56b498=_0x1a23bf;return{'result':_0x3254a2[_0x56b498(0xab8)]['catalog']()};},{'id':_0x1a23bf(0x47e),'summary':_0x1a23bf(0x238),'description':_0x1a23bf(0xed1),'tags':[_0x1a23bf(0xab8)],'inputSchema':{'type':'object','properties':{},'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':'object'}},'access':{'audiences':[_0x1a23bf(0x9f4),'shell',_0x1a23bf(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x99b)},'safety':{'access':_0x1a23bf(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x1a23bf(0xcbd),'action':'engine_types_list','readOnlyHint':!![]}}),_0x4bf165[_0x1a23bf(0x33c)]('GET',_0x1a23bf(0x3f2),async()=>{const _0x5bd89e=_0x1a23bf;return{'result':_0x3254a2[_0x5bd89e(0xab8)]['listTemplates']()};},{'id':'engine_templates_list','summary':_0x1a23bf(0xd5),'description':_0x1a23bf(0xc4c),'tags':[_0x1a23bf(0xab8),'pipelines'],'inputSchema':{'type':_0x1a23bf(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0x1a23bf(0xf9d),'items':{'type':_0x1a23bf(0xb36)}},'access':{'audiences':[_0x1a23bf(0x9f4),_0x1a23bf(0xd14),_0x1a23bf(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x99b)},'safety':{'access':_0x1a23bf(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0x11cc)},'mcp':{'capability':_0x1a23bf(0xcbd),'action':_0x1a23bf(0x65b),'readOnlyHint':!![]}}),_0x4bf165[_0x1a23bf(0x33c)](_0x1a23bf(0x929),_0x1a23bf(0x73a),async({params:_0x295763})=>{const _0x9dfe39=_0x1a23bf,_0x3c3449=_0x3254a2['engines']['getTemplate'](_0x295763['template']);if(!_0x3c3449){const _0x34d5e6=new _0x5d75cd('Template\x20not\x20found:\x20'+_0x295763['template'],_0x9dfe39(0xb7f));_0x34d5e6[_0x9dfe39(0xfcd)]=0x194;throw _0x34d5e6;}return{'result':_0x3c3449};},{'id':_0x1a23bf(0x2c6),'summary':_0x1a23bf(0x1108),'tags':['engines',_0x1a23bf(0x7d3)],'params':{'template':_0x1a23bf(0x8db)},'inputSchema':{'type':'object','properties':{'template':{'type':_0x1a23bf(0xf7a)}},'required':[_0x1a23bf(0xa66)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x1a23bf(0x9f4),'shell',_0x1a23bf(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x99b)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0x11cc)},'mcp':{'capability':'engine','action':_0x1a23bf(0x2c6),'readOnlyHint':!![]}}),_0x4bf165[_0x1a23bf(0x33c)]('POST',_0x1a23bf(0x128),async({params:_0x4c3fad,body:_0xa9724b})=>{const _0x5f0caf=_0x1a23bf;return{'result':_0x3254a2[_0x5f0caf(0xab8)]['previewTemplate'](_0x4c3fad[_0x5f0caf(0xa66)],_0xa9724b??{})};},{'id':'engine_template_preview','summary':'Preview\x20engine\x20template\x20plan','description':_0x1a23bf(0xa0f),'tags':[_0x1a23bf(0xab8),'pipelines'],'params':{'template':_0x1a23bf(0x8db)},'inputSchema':{'type':_0x1a23bf(0xb36),'properties':{'template':{'type':'string'}},'required':[_0x1a23bf(0xa66)],'additionalProperties':!![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x1a23bf(0x9f4),_0x1a23bf(0xd14),_0x1a23bf(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x99b)},'safety':{'access':_0x1a23bf(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0xcd7)},'mcp':{'capability':_0x1a23bf(0xcbd),'action':_0x1a23bf(0x824),'readOnlyHint':!![]}}),_0x4bf165[_0x1a23bf(0x33c)](_0x1a23bf(0xe46),'/api/env/:env/engines/templates/:template/create',async({params:_0x1c3c42,body:_0x11ca95})=>{const _0x25171a=_0x1a23bf;_0x41e2b1(_0x1c3c42[_0x25171a(0x30b)]);const _0x2df54a=await _0x3bae2a(_0x1c3c42[_0x25171a(0x30b)],_0x1c3c42[_0x25171a(0xa66)],_0x11ca95??{});return{'status':0xc9,'body':{'result':_0x2df54a}};},{'id':'env_engine_template_create','summary':_0x1a23bf(0x1020),'description':_0x1a23bf(0x8ac),'tags':[_0x1a23bf(0xab8),_0x1a23bf(0xfcc),_0x1a23bf(0x7d3)],'params':{'env':_0x1a23bf(0xde1),'template':_0x1a23bf(0x8db)},'inputSchema':{'type':'object','properties':{'env':{'type':_0x1a23bf(0xf7a)},'template':{'type':_0x1a23bf(0xf7a)}},'required':[_0x1a23bf(0x30b),_0x1a23bf(0xa66)],'additionalProperties':!![]},'outputSchema':{'type':_0x1a23bf(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1a23bf(0x9f4),_0x1a23bf(0xd14),_0x1a23bf(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'system:write'},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0xcd7)},'mcp':{'capability':_0x1a23bf(0xcbd),'action':_0x1a23bf(0x11b8)}}),_0x4bf165[_0x1a23bf(0x33c)]('GET',_0x1a23bf(0xb96),async({params:_0x3e2b33,query:_0x49f274})=>{const _0x316fcf=_0x1a23bf;_0x41e2b1(_0x3e2b33[_0x316fcf(0x30b)]);const _0x53887c=_0x3254a2[_0x316fcf(0x30b)](_0x3e2b33['env']),_0x3d4fff=_0x49f274?.[_0x316fcf(0xaee)]??null,_0x58bb57=_0x53887c[_0x316fcf(0xab8)][_0x316fcf(0x63e)](_0x3d4fff||null),_0x1e383e=await Promise['all'](_0x58bb57['map'](_0x566844));return{'result':_0x1e383e};},{'id':_0x1a23bf(0xb59),'summary':_0x1a23bf(0x10f),'description':_0x1a23bf(0x652),'tags':[_0x1a23bf(0xab8),'envs'],'params':{'env':'Environment\x20name'},'query':{'type':null},'inputSchema':{'type':_0x1a23bf(0xb36),'properties':{'env':{'type':'string'},'type':{'type':[_0x1a23bf(0xf7a),_0x1a23bf(0x11e)]}},'required':[_0x1a23bf(0x30b)],'additionalProperties':![]},'outputSchema':{'type':_0x1a23bf(0xf9d),'items':{'type':_0x1a23bf(0xb36)}},'access':{'audiences':['http',_0x1a23bf(0xd14),_0x1a23bf(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x99b)},'safety':{'access':_0x1a23bf(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0x11cc),'querySchema':{'type':{'type':['string',_0x1a23bf(0x11e)],'default':null}}},'mcp':{'capability':_0x1a23bf(0xcbd),'action':_0x1a23bf(0xb59),'readOnlyHint':!![]}}),_0x4bf165[_0x1a23bf(0x33c)](_0x1a23bf(0x929),_0x1a23bf(0x95e),async({params:_0x524c47})=>{const _0x32ec1d=_0x1a23bf;_0x41e2b1(_0x524c47[_0x32ec1d(0x30b)]);const _0x1a7ffe=_0x2b1d4f(_0x524c47[_0x32ec1d(0x30b)],_0x524c47[_0x32ec1d(0xaee)],_0x524c47[_0x32ec1d(0x1173)]);return{'result':await _0x566844(_0x1a7ffe)};},{'id':_0x1a23bf(0xcca),'summary':_0x1a23bf(0xa40),'tags':['engines','envs'],'params':{'env':_0x1a23bf(0xde1),'type':_0x1a23bf(0x144),'name':_0x1a23bf(0x1fc)},'inputSchema':{'type':_0x1a23bf(0xb36),'properties':{'env':{'type':_0x1a23bf(0xf7a)},'type':{'type':_0x1a23bf(0xf7a)},'name':{'type':'string'}},'required':[_0x1a23bf(0x30b),_0x1a23bf(0xaee),_0x1a23bf(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0x1a23bf(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1a23bf(0x9f4),'shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x99b)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0x11cc)},'mcp':{'capability':_0x1a23bf(0xcbd),'action':_0x1a23bf(0xcca),'readOnlyHint':!![]}}),_0x4bf165[_0x1a23bf(0x33c)]('POST',_0x1a23bf(0xb96),async({params:_0x23753c,body:_0x40ccb8})=>{const _0x5b75d1=_0x1a23bf;_0x41e2b1(_0x23753c[_0x5b75d1(0x30b)]);const _0x2daec5=_0x3254a2[_0x5b75d1(0x30b)](_0x23753c[_0x5b75d1(0x30b)]),{type:_0x467a1c,name:_0x418aa8,config:_0x1d4c9a,meta:_0x87b3e,enabled:_0xaa49b9,affinity:_0x415c2e}=_0x40ccb8??{};if(!_0x467a1c||typeof _0x467a1c!==_0x5b75d1(0xf7a)){const _0x26b612=new _0x5d75cd(_0x5b75d1(0xf84),'BAD_REQUEST');_0x26b612[_0x5b75d1(0xfcd)]=0x190;throw _0x26b612;}if(!_0x418aa8||typeof _0x418aa8!==_0x5b75d1(0xf7a)){const _0x13e612=new _0x5d75cd(_0x5b75d1(0x819),_0x5b75d1(0xcee));_0x13e612[_0x5b75d1(0xfcd)]=0x190;throw _0x13e612;}if(!_0x1d4c9a||typeof _0x1d4c9a!==_0x5b75d1(0xb36)){const _0x41a70d=new _0x5d75cd('Engine\x20config\x20is\x20required',_0x5b75d1(0xcee));_0x41a70d[_0x5b75d1(0xfcd)]=0x190;throw _0x41a70d;}const _0x13efc2=await _0x2daec5['engines']['createAndStartEngine'](_0x467a1c,_0x418aa8,_0x1d4c9a,_0x87b3e??{},{'enabled':_0xaa49b9,'affinity':_0x415c2e});return{'status':0xc9,'body':{'result':await _0x566844(_0x13efc2)}};},{'id':'env_engine_create','summary':'Create\x20and\x20start\x20engine','description':_0x1a23bf(0xe9e),'tags':[_0x1a23bf(0xab8),'envs'],'params':{'env':_0x1a23bf(0xde1)},'inputSchema':{'type':_0x1a23bf(0xb36),'properties':{'env':{'type':'string'},'type':{'type':_0x1a23bf(0xf7a),'description':_0x1a23bf(0x7ee)},'name':{'type':_0x1a23bf(0xf7a),'description':'Engine\x20name\x20(unique\x20within\x20type)'},'config':{'type':_0x1a23bf(0xb36),'additionalProperties':!![]},'meta':{'type':[_0x1a23bf(0xb36),_0x1a23bf(0x11e)],'additionalProperties':!![]},'enabled':{'type':_0x1a23bf(0x854)},'affinity':{'type':[_0x1a23bf(0xf9d),_0x1a23bf(0x11e)],'items':{'type':'string'}}},'required':[_0x1a23bf(0x30b),_0x1a23bf(0xaee),_0x1a23bf(0x1173),_0x1a23bf(0x142)],'additionalProperties':![]},'outputSchema':{'type':_0x1a23bf(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1a23bf(0x9f4),_0x1a23bf(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':'system:write'},'safety':{'access':_0x1a23bf(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0xcd7)},'mcp':{'capability':_0x1a23bf(0xcbd),'action':'env_engine_create'}}),_0x4bf165[_0x1a23bf(0x33c)](_0x1a23bf(0x96f),'/api/env/:env/engines/:type/:name',async({params:_0x4370eb,body:_0x4d5115})=>{const _0x3d4aa6=_0x1a23bf;_0x41e2b1(_0x4370eb[_0x3d4aa6(0x30b)]);const _0x19ca51=_0x2b1d4f(_0x4370eb['env'],_0x4370eb['type'],_0x4370eb['name']),_0x30bef8=Object['prototype'][_0x3d4aa6(0x9e)][_0x3d4aa6(0x834)](_0x4d5115??{},'config');await _0x19ca51[_0x3d4aa6(0x9b1)](_0x4d5115??{}),await _0x19ca51[_0x3d4aa6(0x7c9)]({'force':!![]}),await _0x1b2ecb(_0x19ca51);const _0x3ffb82=_0x30bef8&&_0x19ca51['enabled']&&_0x19ca51[_0x3d4aa6(0x6e3)]()?await _0x3254a2[_0x3d4aa6(0x30b)](_0x4370eb[_0x3d4aa6(0x30b)])[_0x3d4aa6(0xab8)]['restart'](_0x4370eb[_0x3d4aa6(0xaee)],_0x4370eb[_0x3d4aa6(0x1173)]):await _0x19ca51[_0x3d4aa6(0x187)]();return{'result':await _0x566844(_0x3ffb82)};},{'id':'env_engine_patch','summary':_0x1a23bf(0xc5),'description':_0x1a23bf(0xf6f),'tags':[_0x1a23bf(0xab8),_0x1a23bf(0xfcc)],'params':{'env':'Environment\x20name','type':_0x1a23bf(0x144),'name':'Engine\x20name'},'inputSchema':{'type':'object','properties':{'env':{'type':_0x1a23bf(0xf7a)},'type':{'type':_0x1a23bf(0xf7a)},'name':{'type':'string'},'enabled':{'type':'boolean'},'affinity':{'type':[_0x1a23bf(0xf9d),_0x1a23bf(0x11e)],'items':{'type':_0x1a23bf(0xf7a)}},'meta':{'type':[_0x1a23bf(0xb36),'null'],'additionalProperties':!![]},'config':{'type':_0x1a23bf(0xb36),'additionalProperties':!![]}},'required':['env',_0x1a23bf(0xaee),'name'],'additionalProperties':![]},'outputSchema':{'type':_0x1a23bf(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x1a23bf(0xd14),_0x1a23bf(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x4ce)},'safety':{'access':_0x1a23bf(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':'engine','action':_0x1a23bf(0xd91)}}),_0x4bf165[_0x1a23bf(0x33c)](_0x1a23bf(0x42f),_0x1a23bf(0x95e),async({params:_0xf34ee8})=>{const _0x93890a=_0x1a23bf;_0x41e2b1(_0xf34ee8[_0x93890a(0x30b)]);const _0x1a2330=_0x3254a2[_0x93890a(0x30b)](_0xf34ee8[_0x93890a(0x30b)]);return await _0x1a2330[_0x93890a(0xab8)]['uninstallEngine'](_0xf34ee8[_0x93890a(0xaee)],_0xf34ee8[_0x93890a(0x1173)]),{'result':{'ok':!![]}};},{'id':_0x1a23bf(0x11ec),'summary':_0x1a23bf(0x426),'tags':[_0x1a23bf(0xab8),'envs'],'params':{'env':_0x1a23bf(0xde1),'type':_0x1a23bf(0x144),'name':_0x1a23bf(0x1fc)},'inputSchema':{'type':_0x1a23bf(0xb36),'properties':{'env':{'type':_0x1a23bf(0xf7a)},'type':{'type':_0x1a23bf(0xf7a)},'name':{'type':'string'}},'required':[_0x1a23bf(0x30b),_0x1a23bf(0xaee),_0x1a23bf(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0x1a23bf(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x1a23bf(0xd14),_0x1a23bf(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x4ce)},'safety':{'access':_0x1a23bf(0x90a),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0x11cc)},'mcp':{'capability':'engine','action':'env_engine_delete'}}),_0x4bf165['add'](_0x1a23bf(0xe46),_0x1a23bf(0x1048),async({params:_0x54384a})=>{const _0x54fa9e=_0x1a23bf;_0x41e2b1(_0x54384a[_0x54fa9e(0x30b)]);const _0x42064f=_0x3254a2[_0x54fa9e(0x30b)](_0x54384a[_0x54fa9e(0x30b)]),_0x2d24b5=_0x2b1d4f(_0x54384a['env'],_0x54384a[_0x54fa9e(0xaee)],_0x54384a['name']);await _0x2d24b5[_0x54fa9e(0x7c9)]({'force':!![]}),await _0x1b2ecb(_0x2d24b5),await _0x42064f[_0x54fa9e(0xab8)]['restart'](_0x54384a[_0x54fa9e(0xaee)],_0x54384a[_0x54fa9e(0x1173)]);const _0x369f29=_0x2b1d4f(_0x54384a[_0x54fa9e(0x30b)],_0x54384a[_0x54fa9e(0xaee)],_0x54384a[_0x54fa9e(0x1173)]);return{'result':await _0x566844(_0x369f29)};},{'id':_0x1a23bf(0xd1a),'summary':_0x1a23bf(0x601),'tags':[_0x1a23bf(0xab8),_0x1a23bf(0xfcc)],'params':{'env':_0x1a23bf(0xde1),'type':_0x1a23bf(0x144),'name':_0x1a23bf(0x1fc)},'inputSchema':{'type':'object','properties':{'env':{'type':_0x1a23bf(0xf7a)},'type':{'type':'string'},'name':{'type':_0x1a23bf(0xf7a)}},'required':[_0x1a23bf(0x30b),'type','name'],'additionalProperties':![]},'outputSchema':{'type':_0x1a23bf(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1a23bf(0x9f4),_0x1a23bf(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x4ce)},'safety':{'access':_0x1a23bf(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0x11cc)},'mcp':{'capability':_0x1a23bf(0xcbd),'action':_0x1a23bf(0xd1a)}}),_0x4bf165['add']('POST','/api/env/:env/engines/:type/:name/pause',async({params:_0x4ce9a5})=>{const _0x1e1fb9=_0x1a23bf;_0x41e2b1(_0x4ce9a5[_0x1e1fb9(0x30b)]);const _0x1db867=_0x2b1d4f(_0x4ce9a5[_0x1e1fb9(0x30b)],_0x4ce9a5[_0x1e1fb9(0xaee)],_0x4ce9a5['name']);return await _0x1db867['api']?.[_0x1e1fb9(0x315)]?.(),{'result':await _0x566844(_0x1db867)};},{'id':'env_engine_pause','summary':_0x1a23bf(0x109d),'tags':['engines',_0x1a23bf(0xfcc)],'params':{'env':_0x1a23bf(0xde1),'type':'Engine\x20type','name':'Engine\x20name'},'inputSchema':{'type':_0x1a23bf(0xb36),'properties':{'env':{'type':_0x1a23bf(0xf7a)},'type':{'type':'string'},'name':{'type':'string'}},'required':['env','type',_0x1a23bf(0x1173)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':['http','shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x4ce)},'safety':{'access':_0x1a23bf(0x90a),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0x11cc)},'mcp':{'capability':_0x1a23bf(0xcbd),'action':'env_engine_pause'}}),_0x4bf165[_0x1a23bf(0x33c)](_0x1a23bf(0xe46),_0x1a23bf(0xd9a),async({params:_0x14b6fc})=>{const _0x4af2a4=_0x1a23bf;_0x41e2b1(_0x14b6fc['env']);const _0x28c0a1=_0x2b1d4f(_0x14b6fc[_0x4af2a4(0x30b)],_0x14b6fc[_0x4af2a4(0xaee)],_0x14b6fc[_0x4af2a4(0x1173)]);return await _0x28c0a1[_0x4af2a4(0x1f5)]?.[_0x4af2a4(0x445)]?.(),{'result':await _0x566844(_0x28c0a1)};},{'id':_0x1a23bf(0x6fd),'summary':'Resume\x20engine','tags':['engines','envs'],'params':{'env':_0x1a23bf(0xde1),'type':_0x1a23bf(0x144),'name':_0x1a23bf(0x1fc)},'inputSchema':{'type':_0x1a23bf(0xb36),'properties':{'env':{'type':_0x1a23bf(0xf7a)},'type':{'type':_0x1a23bf(0xf7a)},'name':{'type':_0x1a23bf(0xf7a)}},'required':[_0x1a23bf(0x30b),_0x1a23bf(0xaee),_0x1a23bf(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0x1a23bf(0xb36),'additionalProperties':!![]},'access':{'audiences':['http','shell',_0x1a23bf(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x4ce)},'safety':{'access':_0x1a23bf(0x90a),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0x11cc)},'mcp':{'capability':_0x1a23bf(0xcbd),'action':_0x1a23bf(0x6fd)}}),_0x4bf165[_0x1a23bf(0x33c)]('POST',_0x1a23bf(0xe66),async({params:_0xf2c87f})=>{const _0x4e7598=_0x1a23bf;_0x41e2b1(_0xf2c87f[_0x4e7598(0x30b)]);const _0xd2c36c=_0x2b1d4f(_0xf2c87f[_0x4e7598(0x30b)],_0xf2c87f[_0x4e7598(0xaee)],_0xf2c87f[_0x4e7598(0x1173)]);if(typeof _0xd2c36c[_0x4e7598(0x1f5)]?.[_0x4e7598(0x1116)]!==_0x4e7598(0x63b)){const _0xc1138e=new _0x5d75cd('Engine\x20type\x20\x22'+_0xf2c87f[_0x4e7598(0xaee)]+'\x22\x20does\x20not\x20support\x20retry',_0x4e7598(0x536));_0xc1138e[_0x4e7598(0xfcd)]=0x190;throw _0xc1138e;}return await _0xd2c36c[_0x4e7598(0x1f5)][_0x4e7598(0x1116)](),{'result':await _0x566844(_0xd2c36c)};},{'id':'env_engine_retry','summary':_0x1a23bf(0x191),'description':_0x1a23bf(0x5cf),'tags':['engines','envs'],'params':{'env':_0x1a23bf(0xde1),'type':_0x1a23bf(0x144),'name':_0x1a23bf(0x1fc)},'inputSchema':{'type':_0x1a23bf(0xb36),'properties':{'env':{'type':_0x1a23bf(0xf7a)},'type':{'type':'string'},'name':{'type':'string'}},'required':[_0x1a23bf(0x30b),_0x1a23bf(0xaee),_0x1a23bf(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0x1a23bf(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1a23bf(0x9f4),_0x1a23bf(0xd14),_0x1a23bf(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x4ce)},'safety':{'access':_0x1a23bf(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x1a23bf(0xcbd),'action':'env_engine_retry'}}),_0x4bf165[_0x1a23bf(0x33c)]('POST',_0x1a23bf(0x1100),async({params:_0x16bf13})=>{const _0x7d996a=_0x1a23bf;_0x41e2b1(_0x16bf13['env']);const _0x938f=_0x2b1d4f(_0x16bf13[_0x7d996a(0x30b)],_0x16bf13[_0x7d996a(0xaee)],_0x16bf13[_0x7d996a(0x1173)]);if(typeof _0x938f[_0x7d996a(0x1f5)]?.['resetCursor']!=='function'){const _0x492e90=new _0x5d75cd(_0x7d996a(0xc7a)+_0x16bf13[_0x7d996a(0xaee)]+_0x7d996a(0x1149),_0x7d996a(0x748));_0x492e90[_0x7d996a(0xfcd)]=0x190;throw _0x492e90;}return await _0x938f['api']['resetCursor'](),{'result':await _0x566844(_0x938f)};},{'id':'env_engine_reset_cursor','summary':_0x1a23bf(0x148),'description':_0x1a23bf(0x973),'tags':['engines',_0x1a23bf(0xfcc)],'params':{'env':_0x1a23bf(0xde1),'type':_0x1a23bf(0x144),'name':_0x1a23bf(0x1fc)},'inputSchema':{'type':_0x1a23bf(0xb36),'properties':{'env':{'type':_0x1a23bf(0xf7a)},'type':{'type':_0x1a23bf(0xf7a)},'name':{'type':_0x1a23bf(0xf7a)}},'required':[_0x1a23bf(0x30b),_0x1a23bf(0xaee),_0x1a23bf(0x1173)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x1a23bf(0x9f4),_0x1a23bf(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x4ce)},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x1a23bf(0xcbd),'action':_0x1a23bf(0xfda)}}),_0x4bf165['add'](_0x1a23bf(0xe46),_0x1a23bf(0x6a5),async({params:_0x2bcd93})=>{const _0x3ef277=_0x1a23bf;_0x41e2b1(_0x2bcd93[_0x3ef277(0x30b)]);const _0x882772=_0x2b1d4f(_0x2bcd93[_0x3ef277(0x30b)],_0x2bcd93[_0x3ef277(0xaee)],_0x2bcd93[_0x3ef277(0x1173)]);if(typeof _0x882772[_0x3ef277(0x1f5)]?.[_0x3ef277(0x11ab)]!=='function'){const _0x3d4162=new _0x5d75cd(_0x3ef277(0xc7a)+_0x2bcd93[_0x3ef277(0xaee)]+_0x3ef277(0x8c7),_0x3ef277(0xa20));_0x3d4162[_0x3ef277(0xfcd)]=0x190;throw _0x3d4162;}return await _0x882772[_0x3ef277(0x1f5)][_0x3ef277(0x11ab)](),{'result':await _0x566844(_0x882772)};},{'id':'env_engine_rebuild','summary':_0x1a23bf(0xe2),'description':_0x1a23bf(0x10b),'tags':[_0x1a23bf(0xab8),_0x1a23bf(0xfcc)],'params':{'env':_0x1a23bf(0xde1),'type':_0x1a23bf(0x115c),'name':_0x1a23bf(0x1fc)},'inputSchema':{'type':_0x1a23bf(0xb36),'properties':{'env':{'type':_0x1a23bf(0xf7a)},'type':{'type':_0x1a23bf(0xf7a)},'name':{'type':'string'}},'required':[_0x1a23bf(0x30b),_0x1a23bf(0xaee),'name'],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x1a23bf(0x9f4),_0x1a23bf(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1a23bf(0x4ce)},'safety':{'access':'admin','destructive':!![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x1a23bf(0x11cc)},'mcp':{'capability':_0x1a23bf(0xcbd),'action':_0x1a23bf(0x1022)}});},okdbEnginesHttp;}var okdbSchemaHttp,hasRequiredOkdbSchemaHttp;function requireOkdbSchemaHttp(){if(hasRequiredOkdbSchemaHttp)return okdbSchemaHttp;hasRequiredOkdbSchemaHttp=0x1;const {OKDBSchemaCollectionError:_0x32abd4}=requireOkdbError();return okdbSchemaHttp=function _0x1ab61a(_0x1d525d){const _0x1e6883=_0x47ab,_0x21afdb=_0x1d525d['http'],_0x89e666=_0x1e6883(0x8d0);function _0x4d835b(_0x16a9a6){const _0x3fc276=_0x1e6883,_0x57fd93=_0x16a9a6[_0x3fc276(0x30b)],_0x2a0688=_0x1d525d['_envs'][_0x3fc276(0xbeb)](_0x57fd93);if(!_0x2a0688){const _0x1fefee=new Error(_0x3fc276(0x56f)+_0x57fd93);_0x1fefee[_0x3fc276(0xfcd)]=0x194;throw _0x1fefee;}return _0x2a0688;}_0x21afdb[_0x1e6883(0x33c)]('GET',_0x1e6883(0xc36),async({params:_0x1823fe})=>{const _0x32fb05=_0x1e6883,_0x5ecbe8=_0x4d835b(_0x1823fe),_0x18108f=_0x5ecbe8[_0x32fb05(0x7dd)](_0x1823fe['type']);if(_0x18108f===null)return{'result':null};return{'result':_0x18108f};},{'id':_0x1e6883(0xc61),'summary':_0x1e6883(0x368),'description':_0x1e6883(0x3b6),'tags':[_0x1e6883(0xdce)],'inputSchema':{'type':_0x1e6883(0xb36),'properties':{'env':{'type':_0x1e6883(0xf7a),'default':_0x89e666,'description':_0x1e6883(0xde1)},'type':{'type':'string','description':_0x1e6883(0xce7)}},'required':[_0x1e6883(0xaee)],'additionalProperties':![]},'outputSchema':{'type':[_0x1e6883(0xb36),_0x1e6883(0x11e)],'properties':{'definition':{'type':_0x1e6883(0xb36)},'enforce':{'type':_0x1e6883(0x854)}}},'access':{'audiences':[_0x1e6883(0x9f4),_0x1e6883(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1e6883(0x58b)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'mcp':{'capability':_0x1e6883(0xdce),'action':_0x1e6883(0xc61),'readOnlyHint':!![]}}),_0x21afdb[_0x1e6883(0x33c)](_0x1e6883(0x719),_0x1e6883(0xc36),async({params:_0x4b0aef,body:_0x5674bb})=>{const _0x392710=_0x1e6883;if(!_0x5674bb||typeof _0x5674bb!==_0x392710(0xb36)){const _0x46eafd=new Error(_0x392710(0xc8d));_0x46eafd[_0x392710(0xfcd)]=0x190;throw _0x46eafd;}if(!_0x5674bb[_0x392710(0x83a)]||typeof _0x5674bb[_0x392710(0x83a)]!=='object'){const _0x532796=new Error(_0x392710(0x416));_0x532796[_0x392710(0xfcd)]=0x190;throw _0x532796;}const _0x5e3eb8=_0x4d835b(_0x4b0aef);try{await _0x5e3eb8[_0x392710(0xb46)](_0x4b0aef[_0x392710(0xaee)],{'definition':_0x5674bb[_0x392710(0x83a)],'enforce':_0x5674bb[_0x392710(0xcf0)]??![]});}catch(_0x4f7797){if(_0x4f7797 instanceof _0x32abd4){const _0x3a67b3=new Error(_0x4f7797[_0x392710(0xb4e)]);_0x3a67b3[_0x392710(0xfcd)]=0x199,_0x3a67b3[_0x392710(0x1f8)]=_0x4f7797[_0x392710(0x1f8)],_0x3a67b3[_0x392710(0xba)]=_0x4f7797['failures'],_0x3a67b3[_0x392710(0x933)]={'failures':_0x4f7797[_0x392710(0xba)]};throw _0x3a67b3;}throw _0x4f7797;}return{'result':{'ok':!![]}};},{'id':'schema_set','summary':'Set\x20type\x20schema','description':_0x1e6883(0x556),'tags':['schema'],'inputSchema':{'type':_0x1e6883(0xb36),'properties':{'env':{'type':_0x1e6883(0xf7a),'default':_0x89e666,'description':'Environment\x20name'},'type':{'type':_0x1e6883(0xf7a),'description':'Type\x20name'},'definition':{'type':_0x1e6883(0xb36),'description':_0x1e6883(0xa03)},'enforce':{'type':_0x1e6883(0x854),'default':![],'description':_0x1e6883(0x23e)}},'required':[_0x1e6883(0xaee),_0x1e6883(0x83a)],'additionalProperties':![]},'access':{'audiences':[_0x1e6883(0x9f4),_0x1e6883(0xd14),_0x1e6883(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:write'},'safety':{'access':'write','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':'schema','action':_0x1e6883(0xb3c)}}),_0x21afdb[_0x1e6883(0x33c)](_0x1e6883(0x42f),_0x1e6883(0xc36),async({params:_0x500d82})=>{const _0x5c5d2a=_0x1e6883,_0x164047=_0x4d835b(_0x500d82),_0xeaad09=_0x164047[_0x5c5d2a(0x7dd)](_0x500d82[_0x5c5d2a(0xaee)]);return _0xeaad09!==null&&await _0x164047[_0x5c5d2a(0x10ea)](_0x500d82[_0x5c5d2a(0xaee)]),{'result':{'ok':!![]}};},{'id':_0x1e6883(0x43c),'summary':_0x1e6883(0xb2),'description':_0x1e6883(0x356),'tags':[_0x1e6883(0xdce)],'inputSchema':{'type':_0x1e6883(0xb36),'properties':{'env':{'type':_0x1e6883(0xf7a),'default':_0x89e666,'description':_0x1e6883(0xde1)},'type':{'type':_0x1e6883(0xf7a),'description':_0x1e6883(0xce7)}},'required':[_0x1e6883(0xaee)],'additionalProperties':![]},'access':{'audiences':[_0x1e6883(0x9f4),_0x1e6883(0xd14),_0x1e6883(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1e6883(0x7be)},'safety':{'access':_0x1e6883(0x61d),'destructive':!![],'idempotent':!![],'longRunning':![],'streaming':![]},'mcp':{'capability':_0x1e6883(0xdce),'action':_0x1e6883(0x43c)}}),_0x21afdb[_0x1e6883(0x33c)]('GET','/api/env/:env/violations',async({params:_0x48b8a1})=>{const _0x3ebcd8=_0x1e6883,_0x2210ee=_0x4d835b(_0x48b8a1),_0x267e83=_0x2210ee[_0x3ebcd8(0xd35)]();return{'result':{'violations':_0x267e83}};},{'id':_0x1e6883(0xc1c),'summary':_0x1e6883(0x691),'description':_0x1e6883(0xb91),'tags':['schema'],'inputSchema':{'type':_0x1e6883(0xb36),'properties':{'env':{'type':'string','default':_0x89e666,'description':_0x1e6883(0xde1)}},'additionalProperties':![]},'access':{'audiences':['http',_0x1e6883(0xd14),_0x1e6883(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1e6883(0x58b)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'mcp':{'capability':_0x1e6883(0xdce),'action':_0x1e6883(0xc1c),'readOnlyHint':!![]}}),_0x21afdb[_0x1e6883(0x33c)](_0x1e6883(0x929),_0x1e6883(0xc48),async({params:_0x34755b})=>{const _0x43b9d2=_0x1e6883,_0x1eb2fa=_0x4d835b(_0x34755b),_0x119748=_0x1eb2fa[_0x43b9d2(0xd35)](_0x34755b[_0x43b9d2(0xaee)]);return{'result':{'violations':_0x119748}};},{'id':_0x1e6883(0x645),'summary':_0x1e6883(0xb42),'description':_0x1e6883(0x1b2),'tags':[_0x1e6883(0xdce)],'inputSchema':{'type':_0x1e6883(0xb36),'properties':{'env':{'type':_0x1e6883(0xf7a),'default':_0x89e666,'description':_0x1e6883(0xde1)},'type':{'type':_0x1e6883(0xf7a),'description':_0x1e6883(0xce7)}},'required':[_0x1e6883(0xaee)],'additionalProperties':![]},'access':{'audiences':[_0x1e6883(0x9f4),_0x1e6883(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1e6883(0x58b)},'safety':{'access':_0x1e6883(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'mcp':{'capability':_0x1e6883(0xdce),'action':_0x1e6883(0x645),'readOnlyHint':!![]}}),_0x21afdb['add'](_0x1e6883(0x929),_0x1e6883(0xf18),async({params:_0x55c4a0})=>{const _0x3fcc21=_0x1e6883,_0x1bb05c=_0x4d835b(_0x55c4a0),_0x36a313=_0x1bb05c[_0x3fcc21(0x98a)](_0x55c4a0[_0x3fcc21(0xaee)],_0x55c4a0[_0x3fcc21(0x9dd)]);if(_0x36a313===null){const _0x54aca2=new Error(_0x3fcc21(0x6c6)+_0x55c4a0[_0x3fcc21(0xaee)]+'@'+_0x55c4a0['key']);_0x54aca2['status']=0x194;throw _0x54aca2;}return{'result':{'violation':_0x36a313}};},{'id':'violation_get','summary':'Get\x20single\x20schema\x20violation','description':'Returns\x20the\x20schema\x20violation\x20details\x20for\x20a\x20specific\x20document\x20key,\x20or\x20404\x20if\x20none\x20exists.','tags':[_0x1e6883(0xdce)],'inputSchema':{'type':'object','properties':{'env':{'type':_0x1e6883(0xf7a),'default':_0x89e666,'description':'Environment\x20name'},'type':{'type':'string','description':_0x1e6883(0xce7)},'key':{'type':'string','description':'Document\x20key'}},'required':[_0x1e6883(0xaee),_0x1e6883(0x9dd)],'additionalProperties':![]},'access':{'audiences':[_0x1e6883(0x9f4),_0x1e6883(0xd14),_0x1e6883(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:read'},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'mcp':{'capability':'schema','action':_0x1e6883(0x81b),'readOnlyHint':!![]}}),_0x21afdb[_0x1e6883(0x33c)]('GET',_0x1e6883(0xe39),async({params:_0x8738b3})=>{const _0x444b99=_0x1e6883,_0x4857cb=_0x4d835b(_0x8738b3);return{'result':{'violations':_0x4857cb[_0x444b99(0x25f)]()}};},{'id':_0x1e6883(0xa8f),'summary':_0x1e6883(0x11d8),'description':_0x1e6883(0x676),'tags':[_0x1e6883(0xdce)],'inputSchema':{'type':_0x1e6883(0xb36),'properties':{'env':{'type':'string','default':_0x89e666,'description':'Environment\x20name'}},'additionalProperties':![]},'access':{'audiences':[_0x1e6883(0x9f4),_0x1e6883(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1e6883(0x58b)},'safety':{'access':_0x1e6883(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'mcp':{'capability':_0x1e6883(0xdce),'action':_0x1e6883(0xa8f),'readOnlyHint':!![]}}),_0x21afdb[_0x1e6883(0x33c)](_0x1e6883(0x929),_0x1e6883(0x511),async({params:_0x2c28ba})=>{const _0x2f9e7e=_0x1e6883,_0x55590f=_0x4d835b(_0x2c28ba);return{'result':{'violations':_0x55590f[_0x2f9e7e(0x25f)](_0x2c28ba[_0x2f9e7e(0xaee)])}};},{'id':_0x1e6883(0xe64),'summary':_0x1e6883(0xbc9),'description':_0x1e6883(0x28c),'tags':[_0x1e6883(0xdce)],'inputSchema':{'type':'object','properties':{'env':{'type':'string','default':_0x89e666,'description':_0x1e6883(0xde1)},'type':{'type':'string','description':_0x1e6883(0xce7)}},'required':[_0x1e6883(0xaee)],'additionalProperties':![]},'access':{'audiences':[_0x1e6883(0x9f4),_0x1e6883(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':'schema:read'},'safety':{'access':_0x1e6883(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'mcp':{'capability':_0x1e6883(0xdce),'action':_0x1e6883(0xe64),'readOnlyHint':!![]}});},okdbSchemaHttp;}var okdbTimeMachineHttp,hasRequiredOkdbTimeMachineHttp;function requireOkdbTimeMachineHttp(){if(hasRequiredOkdbTimeMachineHttp)return okdbTimeMachineHttp;hasRequiredOkdbTimeMachineHttp=0x1;function _0x4150e4(_0x1e9636){const _0x213bd8=_0x47ab,_0x267efd=_0x1e9636[_0x213bd8(0x9f4)];function _0x51adb0(_0x10a5c6){const _0x20c5c4=_0x213bd8,_0x117b4a=_0x1e9636[_0x20c5c4(0xa3)][_0x20c5c4(0xbeb)](_0x10a5c6[_0x20c5c4(0x30b)]);if(!_0x117b4a){const _0x16eddb=new Error(_0x20c5c4(0x409)+_0x10a5c6[_0x20c5c4(0x30b)]+'\x22\x20not\x20found');_0x16eddb[_0x20c5c4(0xfcd)]=0x194,_0x16eddb[_0x20c5c4(0x1f8)]=_0x20c5c4(0x8ef);throw _0x16eddb;}return _0x117b4a;}function _0x460a38(_0x1080d9){const _0x174189=_0x213bd8,_0x149751=_0x51adb0(_0x1080d9);if(!_0x149751[_0x174189(0x4db)]){const _0x4220cc=new Error(_0x174189(0x767)+_0x1080d9[_0x174189(0x30b)]+'\x22');_0x4220cc[_0x174189(0xfcd)]=0x194;throw _0x4220cc;}return _0x149751[_0x174189(0x4db)];}function _0x3ec367(_0x1d0b69){const _0x2e601a=_0x213bd8;if(!_0x1d0b69[_0x2e601a(0x6ac)]()){const _0x5633fb=new Error(_0x2e601a(0x42c));_0x5633fb[_0x2e601a(0xfcd)]=0x194;throw _0x5633fb;}}_0x267efd[_0x213bd8(0x33c)](_0x213bd8(0xe46),_0x213bd8(0x5c2),async({params:_0x17c3cb})=>{const _0x5b30d1=_0x213bd8,_0x231897=_0x460a38(_0x17c3cb);return await _0x231897[_0x5b30d1(0x1142)](),{'result':{'ok':!![],..._0x231897[_0x5b30d1(0xfcd)]()}};}),_0x267efd[_0x213bd8(0x33c)](_0x213bd8(0x42f),_0x213bd8(0x5c2),async({params:_0x499f96,query:_0x37eaa9})=>{const _0x561dee=_0x213bd8,_0x53482b=_0x460a38(_0x499f96);return _0x37eaa9?.[_0x561dee(0x259)]===_0x561dee(0xca4)?await _0x53482b[_0x561dee(0xca4)]():await _0x53482b[_0x561dee(0xc8e)](),{'result':{'ok':!![]}};}),_0x267efd[_0x213bd8(0x33c)](_0x213bd8(0x929),_0x213bd8(0x66a),async({params:_0x4f9cf1})=>{const _0x1a191d=_0x213bd8,_0x535096=_0x460a38(_0x4f9cf1);return{'result':_0x535096[_0x1a191d(0xfcd)]()};}),_0x267efd[_0x213bd8(0x33c)](_0x213bd8(0x929),_0x213bd8(0x30d),async({params:_0x7a43b6,query:_0x31c745})=>{const _0xf38f96=_0x213bd8,_0x1c1788=_0x460a38(_0x7a43b6);_0x3ec367(_0x1c1788);const _0x47ac97={};if(_0x31c745?.[_0xf38f96(0xbae)])_0x47ac97['limit']=parseInt(_0x31c745[_0xf38f96(0xbae)],0xa);if(_0x31c745?.[_0xf38f96(0x2ea)])_0x47ac97[_0xf38f96(0x4ed)]=parseInt(_0x31c745[_0xf38f96(0x2ea)],0xa);if(_0x31c745?.[_0xf38f96(0x1067)])_0x47ac97[_0xf38f96(0x1067)]=parseInt(_0x31c745[_0xf38f96(0x1067)],0xa);const _0x1fb940=_0x1c1788[_0xf38f96(0x1158)](_0x7a43b6[_0xf38f96(0xaee)],_0x7a43b6[_0xf38f96(0x9dd)],_0x47ac97);return{'result':_0x1fb940};}),_0x267efd['add']('GET',_0x213bd8(0xc75),async({params:_0x86092f})=>{const _0x1db9ae=_0x213bd8,_0x23401d=_0x460a38(_0x86092f);_0x3ec367(_0x23401d);const _0x31b996=parseInt(_0x86092f[_0x1db9ae(0x114d)],0xa);if(!Number[_0x1db9ae(0x2b5)](_0x31b996)){const _0x44f901=new Error(_0x1db9ae(0x5a0)+_0x86092f[_0x1db9ae(0x114d)]);_0x44f901[_0x1db9ae(0xfcd)]=0x190;throw _0x44f901;}const _0x300ffc=_0x23401d['getStateAt'](_0x86092f[_0x1db9ae(0xaee)],_0x86092f['key'],_0x31b996);if(_0x300ffc===undefined){const _0x32b75e=new Error(_0x1db9ae(0x367)+_0x86092f[_0x1db9ae(0x9dd)]+'\x22\x20at\x20clock\x20'+_0x31b996);_0x32b75e[_0x1db9ae(0xfcd)]=0x194;throw _0x32b75e;}return{'result':{'value':_0x300ffc,'clock':_0x31b996}};}),_0x267efd[_0x213bd8(0x33c)]('GET',_0x213bd8(0xf65),async({params:_0x317eff,query:_0x98e995})=>{const _0x15c575=_0x213bd8,_0x2755a5=_0x460a38(_0x317eff);_0x3ec367(_0x2755a5);const _0x5dee93=_0x98e995?.[_0x15c575(0xaee)]??null,_0xb7073d=_0x98e995?.['from']?parseInt(_0x98e995['from'],0xa):0x0,_0x9d1354=_0x98e995?.['to']?parseInt(_0x98e995['to'],0xa):Number[_0x15c575(0xac8)],_0x5803eb=_0x5dee93?[..._0x2755a5[_0x15c575(0x151)](_0x5dee93,_0xb7073d,_0x9d1354)]:[..._0x2755a5[_0x15c575(0x151)](null,_0xb7073d,_0x9d1354)];return{'result':_0x5803eb};});}return okdbTimeMachineHttp=_0x4150e4,okdbTimeMachineHttp;}var okdbTimeMachineStore,hasRequiredOkdbTimeMachineStore;function requireOkdbTimeMachineStore(){const _0x1590da=_0xef8cd8;if(hasRequiredOkdbTimeMachineStore)return okdbTimeMachineStore;hasRequiredOkdbTimeMachineStore=0x1;const _0x26ee0d=require$$0$6,_0x272935=require$$1$2,_0x5a8963=require$$0$7,_0x47da81=_0x1590da(0x142),_0x4534a5=_0x1590da(0x10be);class _0x528db6{constructor(_0xe3fc0e){const _0x2879b1=_0x1590da;this['_envPath']=_0xe3fc0e,this[_0x2879b1(0xa7c)]=_0x272935[_0x2879b1(0x3d9)](_0xe3fc0e,_0x2879b1(0xefe)),this['db']=null,this[_0x2879b1(0xdd4)]=null,this[_0x2879b1(0x23a)]=null,this['_clockToKeysDb']=null,this[_0x2879b1(0xf0b)]=null,this['_cursorDb']=null;}[_0x1590da(0x717)](){const _0x48a0ee=_0x1590da;_0x5a8963[_0x48a0ee(0xb69)](this[_0x48a0ee(0xa7c)],{'recursive':!![]}),this['db']=_0x26ee0d[_0x48a0ee(0x717)](this[_0x48a0ee(0xa7c)],{'compression':!![],'maxDbs':0x8,'noSync':!![]}),this[_0x48a0ee(0xdd4)]=this['db'][_0x48a0ee(0x730)](_0x48a0ee(0xf56),{'dupSort':![],'keyEncoding':_0x48a0ee(0x24a),'compression':!![]}),this[_0x48a0ee(0x23a)]=this['db'][_0x48a0ee(0x730)]('diffs',{'dupSort':![],'keyEncoding':_0x48a0ee(0x24a),'compression':!![]}),this['_clockToKeysDb']=this['db'][_0x48a0ee(0x730)](_0x48a0ee(0xa5c),{'dupSort':!![],'keyEncoding':_0x48a0ee(0x24a),'encoding':'ordered-binary'}),this[_0x48a0ee(0xf0b)]=this['db'][_0x48a0ee(0x730)](_0x48a0ee(0x142),{'dupSort':![]}),this[_0x48a0ee(0x857)]=this['db'][_0x48a0ee(0x730)](_0x48a0ee(0x10be),{'dupSort':![]});}[_0x1590da(0x11ac)](){if(this['db'])return this['db']['close']();}[_0x1590da(0xb58)](_0x1b54bf,_0x35d771){const _0x1a9b50=_0x1590da;if(!this['db'])return null;return this[_0x1a9b50(0xdd4)][_0x1a9b50(0xbeb)]([_0x1b54bf,_0x35d771])??null;}[_0x1590da(0x992)](_0x4a7f41,_0x3d8598,_0x45f24c,_0x4515d7){const _0x3a24e5=_0x1590da;return this[_0x3a24e5(0xdd4)][_0x3a24e5(0x92c)]([_0x4a7f41,_0x3d8598],{'value':_0x45f24c,'clock':_0x4515d7});}[_0x1590da(0x9f1)](_0x4f203a,_0x27e46b){const _0x79ed79=_0x1590da;return this[_0x79ed79(0xdd4)][_0x79ed79(0x21e)]([_0x4f203a,_0x27e46b]);}['getHeadCount'](_0x149708){const _0x33c8dd=_0x1590da;let _0x2dc3a6=0x0;for(const {key:_0x338d01}of this[_0x33c8dd(0xdd4)][_0x33c8dd(0x9ce)]({'start':[_0x149708]})){if(!Array[_0x33c8dd(0x10f5)](_0x338d01)||_0x338d01[0x0]!==_0x149708)break;_0x2dc3a6++;}return _0x2dc3a6;}[_0x1590da(0x508)](){const _0x3fcafd=_0x1590da;let _0x40a65f=0x0;for(const _0x4bd0e2 of this['_headDb'][_0x3fcafd(0x9ce)]())_0x40a65f++;return _0x40a65f;}['putDiff'](_0x391fcd,_0x2ee2b9,_0x3caeb4,_0x142577){const _0x5253bf=_0x1590da;return this['_diffsDb'][_0x5253bf(0x92c)]([_0x391fcd,_0x2ee2b9,_0x3caeb4],_0x142577);}[_0x1590da(0xde9)](_0x2658aa,_0x4ce8f2,_0x4f534f){return this['_diffsDb']['doesExist']([_0x2658aa,_0x4ce8f2,_0x4f534f]);}[_0x1590da(0xbac)](_0x16d259,_0x1f69cd,_0x1f6517){const _0x24d557=_0x1590da;_0x1f6517=_0x1f6517||{};const _0x4262fe=_0x1f6517[_0x24d557(0x4ed)]!=null?_0x1f6517[_0x24d557(0x4ed)]:Number['MAX_SAFE_INTEGER'],_0x4afe95=_0x1f6517[_0x24d557(0x1067)]!=null?_0x1f6517['after']:-0x1,_0x242fde=_0x1f6517['limit'],_0x32c380=[];for(const {key:_0x19b587,value:_0x264efb}of this[_0x24d557(0x23a)][_0x24d557(0x9ce)]({'start':[_0x16d259,_0x1f69cd,_0x4afe95+0x1],'end':[_0x16d259,_0x1f69cd,_0x4262fe+0x1]})){if(!Array['isArray'](_0x19b587)||_0x19b587[0x0]!==_0x16d259||_0x19b587[0x1]!==_0x1f69cd)break;_0x32c380[_0x24d557(0x597)]({'clock':_0x19b587[0x2],..._0x264efb});if(_0x242fde&&_0x32c380[_0x24d557(0x156)]>=_0x242fde)break;}return _0x32c380;}*[_0x1590da(0x634)](_0x2fbcc0,_0x5817dd,_0xbf3b5a){const _0x5c24c1=_0x1590da;if(_0x2fbcc0==null){for(const {key:_0x8a252a,value:_0x1fb673}of this[_0x5c24c1(0x23a)][_0x5c24c1(0x9ce)]()){if(!Array[_0x5c24c1(0x10f5)](_0x8a252a))continue;const _0x1bacc4=_0x8a252a[0x2];_0x1bacc4>=_0x5817dd&&_0x1bacc4<=_0xbf3b5a&&(yield{'clock':_0x1bacc4,'type':_0x8a252a[0x0],'key':_0x8a252a[0x1],..._0x1fb673});}return;}for(const {key:_0x4b083e,value:_0x1f2a09}of this[_0x5c24c1(0x23a)][_0x5c24c1(0x9ce)]({'start':[_0x2fbcc0]})){if(!Array[_0x5c24c1(0x10f5)](_0x4b083e)||_0x4b083e[0x0]!==_0x2fbcc0)break;const _0xc1c22c=_0x4b083e[0x2];_0xc1c22c>=_0x5817dd&&_0xc1c22c<=_0xbf3b5a&&(yield{'clock':_0xc1c22c,'type':_0x2fbcc0,'key':_0x4b083e[0x1],..._0x1f2a09});}}[_0x1590da(0x949)](_0x24c41f,_0x498070){const _0x417abd=_0x1590da,_0xaa3284=[];for(const {key:_0x316ed9}of this[_0x417abd(0x23a)][_0x417abd(0x9ce)]({'start':[_0x24c41f,_0x498070,0x0],'end':[_0x24c41f,_0x498070,Number[_0x417abd(0xac8)]+0x1]})){if(!Array['isArray'](_0x316ed9)||_0x316ed9[0x0]!==_0x24c41f||_0x316ed9[0x1]!==_0x498070)break;_0xaa3284['push'](_0x316ed9);}return this['db'][_0x417abd(0x683)](()=>{const _0x48c2dd=_0x417abd;for(const _0x4156e5 of _0xaa3284)this[_0x48c2dd(0x23a)][_0x48c2dd(0x21e)](_0x4156e5);});}[_0x1590da(0x11ae)](_0x47a756,_0x4e9ee0,_0x18bc98){const _0x304d47=_0x1590da;return this['db'][_0x304d47(0x683)](()=>{for(const _0x5d1647 of _0x18bc98){this['_clockToKeysDb']['put']([_0x47a756,_0x4e9ee0],_0x5d1647);}});}['getKeysAtClock'](_0x33580d,_0x5b540f){const _0x400ba2=_0x1590da;return[...this[_0x400ba2(0x119c)][_0x400ba2(0x11d6)]([_0x33580d,_0x5b540f])??[]];}*[_0x1590da(0x112f)](_0x3aa5cf,_0x3b2bd2,_0x280ac7){const _0x3179c9=_0x1590da;let _0x4eaa64=null,_0x305ce3=[];for(const {key:_0x570e83,value:_0x31cd8d}of this[_0x3179c9(0x119c)][_0x3179c9(0x9ce)]({'start':[_0x3aa5cf,_0x3b2bd2],'end':[_0x3aa5cf,_0x280ac7+0x1]})){if(!Array['isArray'](_0x570e83)||_0x570e83[0x0]!==_0x3aa5cf)break;const _0x555c38=_0x570e83[0x1];if(_0x555c38!==_0x4eaa64){if(_0x4eaa64!==null)yield{'clock':_0x4eaa64,'keys':_0x305ce3};_0x4eaa64=_0x555c38,_0x305ce3=[];}_0x305ce3[_0x3179c9(0x597)](_0x31cd8d);}if(_0x4eaa64!==null)yield{'clock':_0x4eaa64,'keys':_0x305ce3};}[_0x1590da(0x963)](){if(!this['db'])return null;return this['_configDb']['get'](_0x47da81)??null;}[_0x1590da(0xfef)](_0x42ef25){const _0x3d5c33=_0x1590da;return this[_0x3d5c33(0xf0b)][_0x3d5c33(0x92c)](_0x47da81,_0x42ef25);}[_0x1590da(0x11e7)](){const _0xb9e84d=_0x1590da;return this[_0xb9e84d(0xf0b)]['remove'](_0x47da81);}[_0x1590da(0x1c3)](){const _0x15cdb1=_0x1590da;if(!this['db'])return null;return this[_0x15cdb1(0x857)][_0x15cdb1(0xbeb)](_0x4534a5)??null;}[_0x1590da(0xfaf)](_0x4ff0f3){const _0x5f0de3=_0x1590da;return this[_0x5f0de3(0x857)][_0x5f0de3(0x92c)](_0x4534a5,_0x4ff0f3);}['removeCursor'](){const _0x5b344=_0x1590da;return this[_0x5b344(0x857)]['remove'](_0x4534a5);}['dropType'](_0x4f8b09){return this['db']['transaction'](()=>{const _0x34716d=_0x47ab,_0x45ebc1=[];for(const {key:_0x3e96d7}of this['_headDb'][_0x34716d(0x9ce)]({'start':[_0x4f8b09]})){if(!Array[_0x34716d(0x10f5)](_0x3e96d7)||_0x3e96d7[0x0]!==_0x4f8b09)break;_0x45ebc1['push'](_0x3e96d7);}for(const _0xcd4acb of _0x45ebc1)this['_headDb'][_0x34716d(0x21e)](_0xcd4acb);const _0x42fb64=[];for(const {key:_0x1c0fb1}of this['_diffsDb']['getRange']({'start':[_0x4f8b09]})){if(!Array['isArray'](_0x1c0fb1)||_0x1c0fb1[0x0]!==_0x4f8b09)break;_0x42fb64[_0x34716d(0x597)](_0x1c0fb1);}for(const _0x353d12 of _0x42fb64)this['_diffsDb'][_0x34716d(0x21e)](_0x353d12);const _0x45ee7c=[];for(const {key:_0x1f779d}of this[_0x34716d(0x119c)][_0x34716d(0x9ce)]({'start':[_0x4f8b09]})){if(!Array[_0x34716d(0x10f5)](_0x1f779d)||_0x1f779d[0x0]!==_0x4f8b09)break;const _0x102260=JSON[_0x34716d(0xf75)](_0x1f779d);if(!_0x45ee7c['includes'](_0x102260))_0x45ee7c[_0x34716d(0x597)](_0x102260);}for(const _0x3f121b of _0x45ee7c){const _0x29c391=JSON[_0x34716d(0xdcd)](_0x3f121b);this['_clockToKeysDb'][_0x34716d(0x21e)](_0x29c391);}});}[_0x1590da(0xb5a)](){return this['db']['transaction'](()=>{const _0x3f570f=_0x47ab,_0x3f33ec=[];for(const {key:_0x22f94e}of this[_0x3f570f(0xdd4)][_0x3f570f(0x9ce)]())_0x3f33ec[_0x3f570f(0x597)](_0x22f94e);for(const _0x59a95b of _0x3f33ec)this[_0x3f570f(0xdd4)][_0x3f570f(0x21e)](_0x59a95b);const _0x402616=[];for(const {key:_0x409b8e}of this['_diffsDb'][_0x3f570f(0x9ce)]())_0x402616[_0x3f570f(0x597)](_0x409b8e);for(const _0x237ba0 of _0x402616)this[_0x3f570f(0x23a)][_0x3f570f(0x21e)](_0x237ba0);const _0x5ea103=[];for(const {key:_0x429a0c}of this['_clockToKeysDb']['getRange']()){const _0x385daf=JSON[_0x3f570f(0xf75)](_0x429a0c);if(!_0x5ea103[_0x3f570f(0x29c)](_0x385daf))_0x5ea103[_0x3f570f(0x597)](_0x385daf);}for(const _0x14600a of _0x5ea103){const _0xe52bf2=JSON[_0x3f570f(0xdcd)](_0x14600a);this[_0x3f570f(0x119c)][_0x3f570f(0x21e)](_0xe52bf2);}this['_configDb'][_0x3f570f(0x21e)](_0x47da81),this['_cursorDb'][_0x3f570f(0x21e)](_0x4534a5);});}}return okdbTimeMachineStore={'TimeMachineStore':_0x528db6},okdbTimeMachineStore;}var okdbTimeMachineLock,hasRequiredOkdbTimeMachineLock;function requireOkdbTimeMachineLock(){const _0x462825=_0xef8cd8;if(hasRequiredOkdbTimeMachineLock)return okdbTimeMachineLock;hasRequiredOkdbTimeMachineLock=0x1;const _0x2b4c72=require$$0$7,_0x472176=require$$1$2;class _0x24b587{constructor(_0x12e1cf,_0x732bf){const _0xcf29e9=_0x47ab;_0x732bf=_0x732bf||{},this[_0xcf29e9(0x6e1)]=_0x472176[_0xcf29e9(0x3d9)](_0x12e1cf,_0xcf29e9(0x832)),this[_0xcf29e9(0x504)]=_0x732bf[_0xcf29e9(0xb19)]??0x1388,this[_0xcf29e9(0xc11)]=_0x732bf[_0xcf29e9(0x1008)]??0x3a98,this['_held']=![],this[_0xcf29e9(0x1082)]=null;}[_0x462825(0x1058)](){const _0x926190=_0x462825;try{const _0x442244=_0x2b4c72[_0x926190(0x459)](this[_0x926190(0x6e1)],'wx'),_0x4c388b=JSON['stringify']({'pid':process[_0x926190(0x8fc)],'at':Date[_0x926190(0x555)]()});return _0x2b4c72[_0x926190(0x1237)](_0x442244,_0x4c388b),_0x2b4c72[_0x926190(0x10ba)](_0x442244),this[_0x926190(0xb09)]=!![],this[_0x926190(0xfbf)](),!![];}catch(_0x301d08){if(_0x301d08[_0x926190(0x1f8)]!==_0x926190(0x952))throw _0x301d08;try{const _0x1f714b=_0x2b4c72[_0x926190(0x227)](this[_0x926190(0x6e1)],_0x926190(0x57a)),_0x412188=JSON[_0x926190(0xdcd)](_0x1f714b);if(_0x412188[_0x926190(0x8fc)]===process[_0x926190(0x8fc)]){this[_0x926190(0xb09)]=!![];if(!this['_heartbeatTimer'])this['_startHeartbeat']();return!![];}if(Date['now']()-_0x412188['at']>this['_lockMaxAgeMs']){try{_0x2b4c72['unlinkSync'](this['_lockPath']);}catch{return![];}return this[_0x926190(0x1058)]();}return![];}catch{return![];}}}[_0x462825(0xc8c)](){const _0x476d56=_0x462825;this[_0x476d56(0x1082)]&&(clearInterval(this[_0x476d56(0x1082)]),this[_0x476d56(0x1082)]=null);this[_0x476d56(0xb09)]=![];try{const _0x297633=_0x2b4c72[_0x476d56(0x227)](this[_0x476d56(0x6e1)],_0x476d56(0x57a)),_0x313e66=JSON[_0x476d56(0xdcd)](_0x297633);_0x313e66[_0x476d56(0x8fc)]===process['pid']&&_0x2b4c72['unlinkSync'](this[_0x476d56(0x6e1)]);}catch{}}[_0x462825(0x661)](){const _0x439f93=_0x462825;return this[_0x439f93(0xb09)];}['isLockedByOther'](){const _0xa9c50e=_0x462825;try{const _0x445c5f=_0x2b4c72[_0xa9c50e(0x227)](this[_0xa9c50e(0x6e1)],'utf8'),_0x433c52=JSON[_0xa9c50e(0xdcd)](_0x445c5f);if(_0x433c52['pid']===process[_0xa9c50e(0x8fc)])return![];if(Date[_0xa9c50e(0x555)]()-_0x433c52['at']>this[_0xa9c50e(0xc11)])return![];return!![];}catch{return![];}}[_0x462825(0xfbf)](){const _0xb570d8=_0x462825;this['_heartbeatTimer']=setInterval(()=>{const _0x10a231=_0x47ab;try{_0x2b4c72['writeFileSync'](this[_0x10a231(0x6e1)],JSON['stringify']({'pid':process['pid'],'at':Date['now']()}));}catch{}},this[_0xb570d8(0x504)]),this[_0xb570d8(0x1082)][_0xb570d8(0xba4)]();}}return okdbTimeMachineLock={'TimeMachineLock':_0x24b587},okdbTimeMachineLock;}var okdbTimeMachineDiff,hasRequiredOkdbTimeMachineDiff;function requireOkdbTimeMachineDiff(){if(hasRequiredOkdbTimeMachineDiff)return okdbTimeMachineDiff;hasRequiredOkdbTimeMachineDiff=0x1;const {equal:_0x779427}=requireOkdbEqual();function _0x327d9c(_0x1a0d9b){const _0x5d252e=_0x47ab;return _0x1a0d9b!==null&&typeof _0x1a0d9b===_0x5d252e(0xb36)&&!Array[_0x5d252e(0x10f5)](_0x1a0d9b);}function _0x4cb76c(_0x49482d){const _0x1a8d71=_0x47ab;if(_0x49482d===null||_0x49482d===undefined||typeof _0x49482d!==_0x1a8d71(0xb36))return _0x49482d;if(Array['isArray'](_0x49482d))return _0x49482d[_0x1a8d71(0x1166)](_0x4cb76c);const _0x5f2156={};for(const _0x2cc0a8 of Object[_0x1a8d71(0xa52)](_0x49482d))_0x5f2156[_0x2cc0a8]=_0x4cb76c(_0x49482d[_0x2cc0a8]);return _0x5f2156;}function _0x3c2ba1(_0x34bcbd,_0x4f4842,_0x5a3560){const _0x3ed95d=_0x47ab,_0x3590d8=_0x4f4842[_0x3ed95d(0xfb1)]('.');let _0x546482=_0x34bcbd;for(let _0xa2be64=0x0;_0xa2be64<_0x3590d8[_0x3ed95d(0x156)]-0x1;_0xa2be64++){if(!_0x327d9c(_0x546482[_0x3590d8[_0xa2be64]]))_0x546482[_0x3590d8[_0xa2be64]]={};_0x546482=_0x546482[_0x3590d8[_0xa2be64]];}_0x546482[_0x3590d8[_0x3590d8['length']-0x1]]=_0x5a3560;}function _0x24265f(_0x3f1620,_0x2e0d97){const _0x21d8ac=_0x47ab,_0x2dc518=_0x2e0d97[_0x21d8ac(0xfb1)]('.');let _0x48a67c=_0x3f1620;for(let _0x1fe66b=0x0;_0x1fe66b<_0x2dc518['length']-0x1;_0x1fe66b++){if(!_0x327d9c(_0x48a67c[_0x2dc518[_0x1fe66b]]))return;_0x48a67c=_0x48a67c[_0x2dc518[_0x1fe66b]];}delete _0x48a67c[_0x2dc518[_0x2dc518[_0x21d8ac(0x156)]-0x1]];}function _0x3b3455(_0x98985d,_0x1da806,_0x13fd87,_0x2a5f95){const _0x3eda7b=_0x47ab;_0x2a5f95=_0x2a5f95||'';if(_0x98985d===undefined){if(_0x1da806===undefined||_0x1da806===null)return null;const _0xbedcd={};for(const _0x4e1d58 of Object[_0x3eda7b(0xa52)](_0x1da806)){_0xbedcd[_0x2a5f95?_0x2a5f95+'.'+_0x4e1d58:_0x4e1d58]=_0x1da806[_0x4e1d58];}if(Object[_0x3eda7b(0xa52)](_0xbedcd)[_0x3eda7b(0x156)]===0x0)return null;return{'put':_0xbedcd,'delete':[]};}if(_0x1da806===undefined){const _0x1739ac=[];for(const _0x3f9311 of Object[_0x3eda7b(0xa52)](_0x98985d)){_0x1739ac[_0x3eda7b(0x597)](_0x2a5f95?_0x2a5f95+'.'+_0x3f9311:_0x3f9311);}if(_0x1739ac['length']===0x0)return null;return{'put':{},'delete':_0x1739ac};}const _0x18d36d={},_0x23b663=[],_0x66cfc1=_0x13fd87?.[_0x3eda7b(0x1ef)]??null,_0x4227ba=new Set([...Object[_0x3eda7b(0xa52)](_0x98985d),...Object['keys'](_0x1da806)]);for(const _0xe505bc of _0x4227ba){const _0x1de49d=_0x2a5f95?_0x2a5f95+'.'+_0xe505bc:_0xe505bc,_0x4d8c10=Object['prototype'][_0x3eda7b(0x9e)][_0x3eda7b(0x834)](_0x98985d,_0xe505bc),_0x4c5795=Object[_0x3eda7b(0x901)][_0x3eda7b(0x9e)][_0x3eda7b(0x834)](_0x1da806,_0xe505bc),_0x375db7=_0x98985d[_0xe505bc],_0x47f691=_0x1da806[_0xe505bc];if(!_0x4d8c10)_0x18d36d[_0x1de49d]=_0x47f691;else{if(!_0x4c5795)_0x23b663[_0x3eda7b(0x597)](_0x1de49d);else{if(_0x779427(_0x375db7,_0x47f691));else{const _0x422b98=_0x66cfc1?.[_0xe505bc]??null;if(_0x422b98?.[_0x3eda7b(0x1ef)]&&_0x327d9c(_0x375db7)&&_0x327d9c(_0x47f691)){const _0x264678=_0x3b3455(_0x375db7,_0x47f691,_0x422b98,_0x1de49d);_0x264678&&(Object[_0x3eda7b(0x299)](_0x18d36d,_0x264678[_0x3eda7b(0x92c)]),_0x23b663[_0x3eda7b(0x597)](..._0x264678[_0x3eda7b(0x3b3)]));}else _0x18d36d[_0x1de49d]=_0x47f691;}}}}if(Object[_0x3eda7b(0xa52)](_0x18d36d)[_0x3eda7b(0x156)]===0x0&&_0x23b663['length']===0x0)return null;return{'put':_0x18d36d,'delete':_0x23b663};}function _0x2f9f69(_0x586155,_0x1bc9a2){const _0x34356e=_0x47ab,_0x105a45=_0x4cb76c(_0x586155);for(const _0x5eaddc of _0x1bc9a2[_0x34356e(0x3b3)]||[])_0x24265f(_0x105a45,_0x5eaddc);for(const [_0x1615d9,_0x25e91f]of Object['entries'](_0x1bc9a2[_0x34356e(0x92c)]||{}))_0x3c2ba1(_0x105a45,_0x1615d9,_0x4cb76c(_0x25e91f));return _0x105a45;}function _0xe7c043(_0xf18ccb){let _0x43d18a={};for(const _0x21db69 of _0xf18ccb)_0x43d18a=_0x2f9f69(_0x43d18a,_0x21db69);return _0x43d18a;}return okdbTimeMachineDiff={'diff':_0x3b3455,'applyPatch':_0x2f9f69,'reconstructState':_0xe7c043,'setPath':_0x3c2ba1,'deletePath':_0x24265f},okdbTimeMachineDiff;}var okdbTimeMachineProcessor,hasRequiredOkdbTimeMachineProcessor;function requireOkdbTimeMachineProcessor(){const _0x334b52=_0xef8cd8;if(hasRequiredOkdbTimeMachineProcessor)return okdbTimeMachineProcessor;hasRequiredOkdbTimeMachineProcessor=0x1;const {EVENTS:_0x442f13}=requireOkdbEnums(),{diff:_0x25e404}=requireOkdbTimeMachineDiff();class _0x38aff0{constructor(_0x2ca5ea,_0x7bf7c2,_0xead183,_0x4837af){const _0x19ffdd=_0x47ab;_0x4837af=_0x4837af||{},this[_0x19ffdd(0x308)]=_0x2ca5ea,this['_store']=_0x7bf7c2,this[_0x19ffdd(0x11c4)]=_0xead183,this[_0x19ffdd(0x10b9)]=_0x4837af[_0x19ffdd(0xb9)]??0x3e8,this[_0x19ffdd(0x107e)]=![],this['_flushTimer']=null,this[_0x19ffdd(0x49b)]=null;}[_0x334b52(0xa00)](){const _0x538670=_0x334b52;if(this[_0x538670(0x107e)])return;if(!this[_0x538670(0x11c4)][_0x538670(0x1058)]()){try{this[_0x538670(0x308)][_0x538670(0x9be)]?.['warn']?.(_0x538670(0x6f0));}catch{}return;}this[_0x538670(0x107e)]=!![],this[_0x538670(0x49b)]=()=>this[_0x538670(0x1232)](),this[_0x538670(0x308)][_0x538670(0xea8)]['on'](_0x442f13[_0x538670(0xd0e)],this['_eventHandler']),this['_env'][_0x538670(0xea8)]['on'](_0x442f13[_0x538670(0x967)],this[_0x538670(0x49b)]);}[_0x334b52(0x1fe)](){const _0x5d05cb=_0x334b52;this[_0x5d05cb(0x107e)]=![],this[_0x5d05cb(0x2ca)]&&(clearTimeout(this['_flushTimer']),this[_0x5d05cb(0x2ca)]=null),this['_eventHandler']&&(this[_0x5d05cb(0x308)][_0x5d05cb(0xea8)][_0x5d05cb(0xa9b)](_0x442f13[_0x5d05cb(0xd0e)],this[_0x5d05cb(0x49b)]),this['_env']['events'][_0x5d05cb(0xa9b)](_0x442f13[_0x5d05cb(0x967)],this[_0x5d05cb(0x49b)]),this[_0x5d05cb(0x49b)]=null),this[_0x5d05cb(0x11c4)][_0x5d05cb(0xc8c)]();}[_0x334b52(0xc53)](){const _0x189886=_0x334b52;return this[_0x189886(0x107e)];}[_0x334b52(0x1232)](){const _0x5adebd=_0x334b52;if(!this['_running'])return;if(this['_flushTimer'])return;this[_0x5adebd(0x2ca)]=setTimeout(()=>{const _0x1a9337=_0x5adebd;this[_0x1a9337(0x2ca)]=null;if(!this['_running'])return;this[_0x1a9337(0xaff)]()[_0x1a9337(0x415)](_0x50cbb4=>{const _0x3aa73e=_0x1a9337;try{this['_env'][_0x3aa73e(0x9be)]?.['error']?.(_0x3aa73e(0x835),{'err':_0x50cbb4[_0x3aa73e(0xb4e)]});}catch{}});},this[_0x5adebd(0x10b9)]);}async['_flush'](){const _0x417d61=_0x334b52;if(!this[_0x417d61(0x107e)])return;const _0x37268a=this[_0x417d61(0x60a)][_0x417d61(0x963)]();if(!_0x37268a||!_0x37268a[_0x417d61(0x951)])return;const _0x4ffefb=this['_store'][_0x417d61(0x1c3)]()||{'lastProcessedClock':0x0},_0x1e53b1=this[_0x417d61(0x308)]['getClock']();if(_0x1e53b1===0x0||_0x1e53b1<=_0x4ffefb['lastProcessedClock'])return;const _0x37ba02=_0x4ffefb[_0x417d61(0xf58)]+0x1,_0xe55a0d=new Map();for(const _0xbe26ff of this[_0x417d61(0x308)]['getChanges'](null,_0x37ba02,_0x1e53b1)){if(typeof _0xbe26ff['id']!==_0x417d61(0xf7a)||!_0xbe26ff['id'][_0x417d61(0x8ba)]('item:'))continue;if(!_0xbe26ff[_0x417d61(0xaee)]||!_0xbe26ff['key'])continue;const _0x187237=_0xbe26ff[_0x417d61(0xaee)]+'\x00'+_0xbe26ff[_0x417d61(0x9dd)];if(!_0xe55a0d[_0x417d61(0x9d0)](_0x187237))_0xe55a0d[_0x417d61(0x211)](_0x187237,{'type':_0xbe26ff['type'],'key':_0xbe26ff[_0x417d61(0x9dd)]});}for(const {type:_0x4c9bb2,key:_0x2df9b0}of _0xe55a0d[_0x417d61(0x231)]()){try{await this['_processKey'](_0x4c9bb2,_0x2df9b0,_0x1e53b1);}catch(_0x37fb98){try{this['_env'][_0x417d61(0x9be)]?.['error']?.(_0x417d61(0x37a)+_0x2df9b0+'\x22\x20of\x20type\x20\x22'+_0x4c9bb2+'\x22',{'err':_0x37fb98[_0x417d61(0xb4e)]});}catch{}}}if(_0xe55a0d[_0x417d61(0xfb)]>0x0){const _0x29411f=new Map();for(const {type:_0x58caee,key:_0x41e008}of _0xe55a0d[_0x417d61(0x231)]()){if(!_0x29411f[_0x417d61(0x9d0)](_0x58caee))_0x29411f[_0x417d61(0x211)](_0x58caee,[]);_0x29411f['get'](_0x58caee)['push'](_0x41e008);}for(const [_0x304019,_0x39e803]of _0x29411f){await this[_0x417d61(0x60a)]['putClockToKeys'](_0x304019,_0x1e53b1,_0x39e803);}}await this['_store'][_0x417d61(0xfaf)]({'lastProcessedClock':_0x1e53b1});}async[_0x334b52(0x6c2)](_0x32baab,_0x394363,_0x48204f){const _0x27e2ef=_0x334b52,_0x476bf8=this[_0x27e2ef(0x60a)]['getHead'](_0x32baab,_0x394363);let _0x2b2bfe=null;try{_0x2b2bfe=this['_env'][_0x27e2ef(0x7dd)](_0x32baab)?.[_0x27e2ef(0x83a)]??null;}catch{}const _0x14de2b=this['_env']['get'](_0x32baab,_0x394363),_0x551b34=_0x25e404(_0x476bf8?.['value'],_0x14de2b,_0x2b2bfe);if(!_0x551b34)return;await this[_0x27e2ef(0x60a)][_0x27e2ef(0x10d)](_0x32baab,_0x394363,_0x48204f,{..._0x551b34,'fromClock':_0x476bf8?.[_0x27e2ef(0x114d)]??0x0,'timestamp':Date[_0x27e2ef(0x555)]()}),_0x14de2b===undefined?await this[_0x27e2ef(0x60a)][_0x27e2ef(0x9f1)](_0x32baab,_0x394363):await this['_store'][_0x27e2ef(0x992)](_0x32baab,_0x394363,_0x14de2b,_0x48204f);}async[_0x334b52(0x26b)](){const _0x44fa37=_0x334b52;return this[_0x44fa37(0x2ca)]&&(clearTimeout(this[_0x44fa37(0x2ca)]),this['_flushTimer']=null),this['_flush']();}}return okdbTimeMachineProcessor={'TimeMachineProcessor':_0x38aff0},okdbTimeMachineProcessor;}var okdbTimeMachine,hasRequiredOkdbTimeMachine;function requireOkdbTimeMachine(){const _0x37fe05=_0xef8cd8;if(hasRequiredOkdbTimeMachine)return okdbTimeMachine;hasRequiredOkdbTimeMachine=0x1;const _0x820482=require$$1$2,{TimeMachineStore:_0x142dfd}=requireOkdbTimeMachineStore(),{TimeMachineLock:_0x5108a7}=requireOkdbTimeMachineLock(),{TimeMachineProcessor:_0x12269a}=requireOkdbTimeMachineProcessor(),{reconstructState:_0x460cdb}=requireOkdbTimeMachineDiff();class _0x758a57{constructor(_0x872d41,_0xe0f7ce,_0x5ee4a1){const _0x3d3e74=_0x47ab;_0x5ee4a1=_0x5ee4a1||{},this[_0x3d3e74(0x443)]=_0x872d41,this[_0x3d3e74(0x308)]=_0xe0f7ce,this[_0x3d3e74(0x5c6)]=_0x5ee4a1,this[_0x3d3e74(0x10b9)]=_0x5ee4a1[_0x3d3e74(0xb9)]??0x3e8,this[_0x3d3e74(0x504)]=_0x5ee4a1['heartbeatIntervalMs']??0x1388,this[_0x3d3e74(0xc11)]=_0x5ee4a1[_0x3d3e74(0x1008)]??0x3a98;const _0x314fe3=_0x820482['join'](_0xe0f7ce['path'],_0x3d3e74(0xefe));this[_0x3d3e74(0x60a)]=new _0x142dfd(_0xe0f7ce[_0x3d3e74(0x20b)]),this['_lock']=new _0x5108a7(_0x314fe3,{'heartbeatIntervalMs':this[_0x3d3e74(0x504)],'lockMaxAgeMs':this[_0x3d3e74(0xc11)]}),this[_0x3d3e74(0x651)]=new _0x12269a(_0xe0f7ce,this['_store'],this[_0x3d3e74(0x11c4)],{'flushDelayMs':this[_0x3d3e74(0x10b9)]}),this['_started']=![];}['start'](){const _0x47e4d1=_0x47ab;if(this[_0x47e4d1(0x250)])return;this[_0x47e4d1(0x443)]?.[_0x47e4d1(0x3a3)]?.['assertFeature'](_0x47e4d1(0x4db)),this[_0x47e4d1(0x60a)][_0x47e4d1(0x717)](),this['_processor'][_0x47e4d1(0xa00)](),this[_0x47e4d1(0x250)]=!![];}async['stop'](){const _0x41fb61=_0x47ab;if(!this[_0x41fb61(0x250)])return;this[_0x41fb61(0x250)]=![],this[_0x41fb61(0x651)][_0x41fb61(0x1fe)](),await this['_store']['close']();}async[_0x37fe05(0x1142)](){const _0x453ab3=_0x37fe05,_0x7a325a=this[_0x453ab3(0x60a)][_0x453ab3(0x963)]();if(_0x7a325a&&_0x7a325a['enabled'])return;const _0x185f02=this[_0x453ab3(0x308)][_0x453ab3(0x5ea)]();for(const _0x32a028 of this[_0x453ab3(0x308)][_0x453ab3(0xce1)][_0x453ab3(0x40e)]()){for(const {key:_0x37ab7d,value:_0x4601b6}of this[_0x453ab3(0x308)][_0x453ab3(0x9ce)](_0x32a028)){await this[_0x453ab3(0x60a)][_0x453ab3(0x992)](_0x32a028,_0x37ab7d,_0x4601b6,_0x185f02);}}await this[_0x453ab3(0x60a)][_0x453ab3(0xfef)]({'enabled':!![],'startClock':_0x185f02}),await this[_0x453ab3(0x60a)][_0x453ab3(0xfaf)]({'lastProcessedClock':_0x185f02});}async[_0x37fe05(0xc8e)](){const _0x221eec=_0x37fe05,_0x1d58f2=this['_store']['getConfig']();if(!_0x1d58f2||!_0x1d58f2[_0x221eec(0x951)])return;await this[_0x221eec(0x60a)]['putConfig']({..._0x1d58f2,'enabled':![],'disabledAt':Date[_0x221eec(0x555)]()});}async[_0x37fe05(0xca4)](){const _0x150e19=_0x37fe05;await this['_store'][_0x150e19(0xb5a)]();}[_0x37fe05(0x335)](_0x3ad3af,_0x5ba055,_0x330389){const _0x433345=_0x37fe05;if(!this[_0x433345(0x6ac)]())return undefined;const _0x51dbd1=this[_0x433345(0x60a)][_0x433345(0xbac)](_0x3ad3af,_0x5ba055,{'maxClock':_0x330389});if(_0x51dbd1[_0x433345(0x156)]===0x0)return undefined;return _0x460cdb(_0x51dbd1);}['getHistory'](_0x39aa99,_0x5ae7fb,_0x57a1ab){const _0x5075ac=_0x37fe05;_0x57a1ab=_0x57a1ab||{};const _0x39625f=this[_0x5075ac(0x60a)]['getDiffs'](_0x39aa99,_0x5ae7fb,_0x57a1ab),_0x27bfc2=this[_0x5075ac(0x60a)][_0x5075ac(0xb58)](_0x39aa99,_0x5ae7fb);return{'diffs':_0x39625f,'head':_0x27bfc2};}*[_0x37fe05(0x151)](_0x33d75b,_0xa3f966,_0x1e7f5a){const _0x2d9e46=_0x37fe05;yield*this[_0x2d9e46(0x60a)][_0x2d9e46(0x634)](_0x33d75b,_0xa3f966,_0x1e7f5a);}[_0x37fe05(0x6ac)](){const _0x5e0771=_0x37fe05;return this[_0x5e0771(0x60a)][_0x5e0771(0x963)]()?.['enabled']===!![];}['getCursor'](){const _0x260353=_0x37fe05;return this[_0x260353(0x60a)][_0x260353(0x1c3)]();}[_0x37fe05(0xfcd)](){const _0xf310dd=_0x37fe05,_0xf2df43=this[_0xf310dd(0x60a)][_0xf310dd(0x963)](),_0x10626d=this[_0xf310dd(0x60a)]['getCursor'](),_0x142a7c=this[_0xf310dd(0x60a)][_0xf310dd(0x508)]();return{'enabled':_0xf2df43?.[_0xf310dd(0x951)]??![],'startClock':_0xf2df43?.[_0xf310dd(0x79c)]??null,'lastProcessedClock':_0x10626d?.[_0xf310dd(0xf58)]??null,'headCount':_0x142a7c,'disabledAt':_0xf2df43?.[_0xf310dd(0xa06)]??null};}async[_0x37fe05(0x26b)](){const _0x372a0b=_0x37fe05;return this[_0x372a0b(0x651)][_0x372a0b(0x26b)]();}}return okdbTimeMachine={'OKDBTimeMachine':_0x758a57},okdbTimeMachine;}var enums,hasRequiredEnums;function requireEnums(){const _0x4ab315=_0xef8cd8;if(hasRequiredEnums)return enums;hasRequiredEnums=0x1;const _0x1e3682=Object[_0x4ab315(0x108b)]({'EMBEDDER':_0x4ab315(0x37b),'INDEXER':_0x4ab315(0xa4a),'SEARCH':_0x4ab315(0xd8a),'WORKER':_0x4ab315(0x17a)}),_0x243a22=Object['freeze']({'PENDING':_0x4ab315(0x178),'DONE':_0x4ab315(0x787),'FAILED':_0x4ab315(0x1200),'DELETED':_0x4ab315(0x9ef),'PARTIAL':_0x4ab315(0x9e6)}),_0xd2e324=Object['freeze']({'INDEXER_READY':_0x4ab315(0xbd0),'INDEXER_FLUSHED':_0x4ab315(0x590),'INDEXER_DOC_DONE':_0x4ab315(0x1175),'INDEXER_DOC_FAILED':_0x4ab315(0xe8a),'INDEXER_DOC_QUEUED':_0x4ab315(0x5a6),'DOC_STATUS_CHANGE':_0x4ab315(0x1000),'PIPELINE_READY':'embeddings:pipeline:ready'}),_0x5923c0=Object[_0x4ab315(0x108b)]({'MODELS':_0x4ab315(0xd6),'DOC_STATUS_PREFIX':'doc_status:','VEC_PREFIX':_0x4ab315(0xd13)});return enums={'ENGINE_TYPES':_0x1e3682,'INDEXER_DOC_STATUS':_0x243a22,'EMBEDDINGS_EVENTS':_0xd2e324,'INTERNAL_TYPES':_0x5923c0},enums;}var okdbQueueValidate,hasRequiredOkdbQueueValidate;function requireOkdbQueueValidate(){const _0x1b23c9=_0xef8cd8;if(hasRequiredOkdbQueueValidate)return okdbQueueValidate;hasRequiredOkdbQueueValidate=0x1;const _0x40636c=Object[_0x1b23c9(0x108b)]({'PENDING':_0x1b23c9(0x178),'RUNNING':'running','DONE':_0x1b23c9(0x787),'FAILED':_0x1b23c9(0x1200)}),_0x363f31=Object['freeze']({'ACTIVE':_0x1b23c9(0x43f),'PAUSED':'paused','DRAINING':_0x1b23c9(0x61f)}),_0x491e31=Object[_0x1b23c9(0x108b)]({'ENQUEUED':_0x1b23c9(0xaa3),'DONE':_0x1b23c9(0x3f3),'FAILED':'queue:failed','RETRY':'queue:retry','REMOVED':_0x1b23c9(0xffc),'RECONCILED':_0x1b23c9(0xe9c),'CLEAR_PROGRESS':'queue:clear-progress','CLEAR_DONE':_0x1b23c9(0x955)});function _0x5207ac(_0x192da6){const _0x45b4c1=_0x1b23c9;return _0x192da6!=null&&typeof _0x192da6===_0x45b4c1(0xb36)&&(_0x192da6[_0x45b4c1(0x1004)]===Object||Object[_0x45b4c1(0x3dc)](_0x192da6)===null);}function _0xca4e06(_0x1faabf,_0x546708,_0x1e2e29,_0x485d13){const _0xaeb729=_0x1b23c9;if(_0x1faabf==null)return _0x546708;const _0x1b4bee=Number(_0x1faabf);if(!Number[_0xaeb729(0x2b5)](_0x1b4bee))return _0x546708;const _0x76123f=Math[_0xaeb729(0xcc)](_0x1b4bee);if(_0x76123f<_0x1e2e29)return _0x1e2e29;if(_0x76123f>_0x485d13)return _0x485d13;return _0x76123f;}function _0x10e586(_0x4035aa){const _0x33b59e=_0x1b23c9;if(!_0x4035aa)return[];if(typeof _0x4035aa==='string')_0x4035aa=[_0x4035aa];if(!Array[_0x33b59e(0x10f5)](_0x4035aa))throw new Error('tags\x20must\x20be\x20array\x20or\x20string');const _0x4eb166=[],_0x176968=new Set();for(const _0x122664 of _0x4035aa){if(_0x122664==null)continue;const _0x521372=String(_0x122664)[_0x33b59e(0xf4d)]();if(!_0x521372)continue;if(_0x521372['length']>0x80)throw new Error(_0x33b59e(0x266));if(_0x176968['has'](_0x521372))continue;_0x176968[_0x33b59e(0x33c)](_0x521372),_0x4eb166[_0x33b59e(0x597)](_0x521372);if(_0x4eb166[_0x33b59e(0x156)]>=0x20)break;}return _0x4eb166;}function _0x110949(_0x223538){const _0x4c322c=_0x1b23c9;if(_0x223538==null)return null;const _0x1804d2=String(_0x223538)[_0x4c322c(0xf4d)]();if(!_0x1804d2)return null;if(_0x1804d2['length']>0x80)throw new Error('bucket\x20too\x20long');return _0x1804d2;}function _0x4c0193(_0x55517f,_0x42a2a2=0x1){const _0x41ead2=_0x1b23c9;if(_0x55517f==null)return[];if(typeof _0x55517f===_0x41ead2(0xf7a)){const _0x484ed8=_0x110949(_0x55517f);if(!_0x484ed8)return[];return[{'id':_0x484ed8,'tokens':_0x42a2a2}];}if(!Array[_0x41ead2(0x10f5)](_0x55517f))throw new Error('buckets\x20must\x20be\x20array\x20or\x20string');const _0x2d3887=[],_0x46afa9=new Set();for(const _0x12999b of _0x55517f){let _0x3a9b3e,_0x7ec336;if(Array[_0x41ead2(0x10f5)](_0x12999b))[_0x3a9b3e,_0x7ec336]=_0x12999b;else{if(_0x12999b&&typeof _0x12999b===_0x41ead2(0xb36))({id:_0x3a9b3e,tokens:_0x7ec336}=_0x12999b);else{if(typeof _0x12999b===_0x41ead2(0xf7a))_0x3a9b3e=_0x12999b,_0x7ec336=_0x42a2a2;else continue;}}_0x3a9b3e=_0x110949(_0x3a9b3e);if(!_0x3a9b3e)continue;const _0x30b1b2=_0x7ec336==null?_0x42a2a2:Math[_0x41ead2(0xcc)](Number(_0x7ec336));if(!Number['isFinite'](_0x30b1b2)||_0x30b1b2<0x1)throw new Error(_0x41ead2(0xdb1)+_0x3a9b3e+_0x41ead2(0x7a9));if(_0x30b1b2>0xf4240)throw new Error(_0x41ead2(0xdb1)+_0x3a9b3e+'\x22\x20tokens\x20too\x20large');if(_0x46afa9[_0x41ead2(0x9d0)](_0x3a9b3e))throw new Error(_0x41ead2(0xfa3)+_0x3a9b3e);_0x46afa9['add'](_0x3a9b3e),_0x2d3887[_0x41ead2(0x597)]({'id':_0x3a9b3e,'tokens':_0x30b1b2});}return _0x2d3887;}function _0x109076(_0x513cdd,_0x5772e9=0x400){const _0x14fd17=_0x1b23c9;if(_0x513cdd==null)return null;const _0xd59739=String(_0x513cdd)[_0x14fd17(0xc3c)](0x0,_0x5772e9);return _0xd59739||null;}function _0x6f4956(_0x3e4e44){const _0x268291=_0x1b23c9;if(_0x3e4e44==null)return null;if(_0x3e4e44['key']!==undefined&&_0x3e4e44[_0x268291(0x568)]!==undefined)return _0x3e4e44;return{'key':_0x3e4e44['id']??null,'value':_0x3e4e44};}function _0x505fdb(_0x2b8d9a){const _0x1834b6=_0x1b23c9;if(!_0x5207ac(_0x2b8d9a))throw new Error('job\x20must\x20be\x20object');if(typeof _0x2b8d9a['id']!==_0x1834b6(0xf7a)||_0x2b8d9a['id'][_0x1834b6(0x156)]<0x8)throw new Error(_0x1834b6(0xe47));if(typeof _0x2b8d9a[_0x1834b6(0xaee)]!==_0x1834b6(0xf7a)||!_0x2b8d9a[_0x1834b6(0xaee)])throw new Error('job.type\x20must\x20be\x20non-empty\x20string');if(!Object['values'](_0x40636c)[_0x1834b6(0x29c)](_0x2b8d9a[_0x1834b6(0xfcd)]))throw new Error('invalid\x20job.status:\x20'+_0x2b8d9a['status']);for(const _0x286880 of[_0x1834b6(0x5d9),_0x1834b6(0xf1a),_0x1834b6(0x965)]){if(typeof _0x2b8d9a[_0x286880]!==_0x1834b6(0x9f0)||!Number[_0x1834b6(0x2b5)](_0x2b8d9a[_0x286880]))throw new Error(_0x1834b6(0x2fe)+_0x286880+'\x20must\x20be\x20number');}if(_0x2b8d9a[_0x1834b6(0xbc3)]!=null&&(typeof _0x2b8d9a[_0x1834b6(0xbc3)]!==_0x1834b6(0x9f0)||!Number[_0x1834b6(0x2b5)](_0x2b8d9a[_0x1834b6(0xbc3)])))throw new Error(_0x1834b6(0x7d0));if(!Number[_0x1834b6(0x474)](_0x2b8d9a[_0x1834b6(0x5ca)])||_0x2b8d9a[_0x1834b6(0x5ca)]<0x0)throw new Error(_0x1834b6(0x50f));if(!Number[_0x1834b6(0x474)](_0x2b8d9a[_0x1834b6(0x534)]))throw new Error(_0x1834b6(0xdac));if(_0x2b8d9a[_0x1834b6(0x2e1)]!==Infinity&&(!Number[_0x1834b6(0x474)](_0x2b8d9a['max_tries'])||_0x2b8d9a[_0x1834b6(0x2e1)]<0x1))throw new Error(_0x1834b6(0x312));if(_0x2b8d9a[_0x1834b6(0x849)]!=null&&(!Number[_0x1834b6(0x474)](_0x2b8d9a[_0x1834b6(0x849)])||_0x2b8d9a[_0x1834b6(0x849)]<0x0))throw new Error(_0x1834b6(0xa76));if(_0x2b8d9a[_0x1834b6(0xded)]!=null&&(typeof _0x2b8d9a[_0x1834b6(0xded)]!==_0x1834b6(0x9f0)||_0x2b8d9a['backoff_multiplier']<0x1))throw new Error(_0x1834b6(0xb55));if(_0x2b8d9a['claim_id']!=null&&typeof _0x2b8d9a['claim_id']!==_0x1834b6(0xf7a))throw new Error(_0x1834b6(0xbe6));if(_0x2b8d9a[_0x1834b6(0xd5a)]!=null&&(typeof _0x2b8d9a[_0x1834b6(0xd5a)]!=='number'||!Number['isFinite'](_0x2b8d9a[_0x1834b6(0xd5a)])))throw new Error(_0x1834b6(0xd8));if(_0x2b8d9a[_0x1834b6(0x401)]!=null&&typeof _0x2b8d9a[_0x1834b6(0x401)]!==_0x1834b6(0xf7a))throw new Error(_0x1834b6(0xc3a));if(_0x2b8d9a[_0x1834b6(0xfcb)]!=null&&(!Number['isInteger'](_0x2b8d9a[_0x1834b6(0xfcb)])||_0x2b8d9a[_0x1834b6(0xfcb)]<0x1))throw new Error(_0x1834b6(0x10c9));if(_0x2b8d9a[_0x1834b6(0xd70)]!=null){if(!Array[_0x1834b6(0x10f5)](_0x2b8d9a[_0x1834b6(0xd70)]))throw new Error(_0x1834b6(0x1a1));for(const _0x30b0cc of _0x2b8d9a['buckets']){if(!_0x30b0cc||typeof _0x30b0cc!==_0x1834b6(0xb36))throw new Error(_0x1834b6(0xdd7));if(typeof _0x30b0cc['id']!==_0x1834b6(0xf7a)||!_0x30b0cc['id'][_0x1834b6(0xf4d)]())throw new Error(_0x1834b6(0x4b3));if(!Number['isInteger'](_0x30b0cc[_0x1834b6(0x3d7)])||_0x30b0cc[_0x1834b6(0x3d7)]<0x1)throw new Error(_0x1834b6(0x3b2));}}if(_0x2b8d9a[_0x1834b6(0x183)]!=null&&typeof _0x2b8d9a['cron']!=='string')throw new Error(_0x1834b6(0xd05));if(_0x2b8d9a[_0x1834b6(0xda9)]!=null&&typeof _0x2b8d9a['idempotency_key']!==_0x1834b6(0xf7a))throw new Error(_0x1834b6(0x692));if(!Array[_0x1834b6(0x10f5)](_0x2b8d9a['tags']))throw new Error(_0x1834b6(0x348));if(_0x2b8d9a[_0x1834b6(0xd2a)]!=null&&typeof _0x2b8d9a[_0x1834b6(0xd2a)]!=='string')throw new Error(_0x1834b6(0x13f));if(_0x2b8d9a[_0x1834b6(0xb90)]!=null&&typeof _0x2b8d9a[_0x1834b6(0xb90)]!==_0x1834b6(0xf7a))throw new Error('job.status_code\x20must\x20be\x20string|null');if(_0x2b8d9a[_0x1834b6(0x1bf)]!=null&&typeof _0x2b8d9a[_0x1834b6(0x1bf)]!==_0x1834b6(0xf7a))throw new Error('job.status_message\x20must\x20be\x20string|null');if(_0x2b8d9a[_0x1834b6(0x798)]!=null&&typeof _0x2b8d9a[_0x1834b6(0x798)]!==_0x1834b6(0xf7a))throw new Error(_0x1834b6(0x8e9));for(const _0x4b71f3 of[_0x1834b6(0xc6b),_0x1834b6(0x387)]){const _0x575144=_0x2b8d9a[_0x4b71f3];if(_0x575144!=null&&(!Number['isInteger'](_0x575144)||_0x575144<0x0))throw new Error(_0x1834b6(0x2fe)+_0x4b71f3+_0x1834b6(0x41b));}}function _0x21457a(_0x28846c){const _0xfb52f9=_0x1b23c9;if(!_0x5207ac(_0x28846c))throw new Error(_0xfb52f9(0xfc4));if(typeof _0x28846c['id']!==_0xfb52f9(0xf7a)||!_0x28846c['id'][_0xfb52f9(0xf4d)]())throw new Error('job_type.id\x20must\x20be\x20non-empty\x20string');if(!Object[_0xfb52f9(0x231)](_0x363f31)[_0xfb52f9(0x29c)](_0x28846c['status']))throw new Error(_0xfb52f9(0x1074)+_0x28846c[_0xfb52f9(0xfcd)]);if(_0x28846c['max_concurrency']!=null&&(!Number[_0xfb52f9(0x474)](_0x28846c[_0xfb52f9(0xd2d)])||_0x28846c[_0xfb52f9(0xd2d)]<0x1))throw new Error(_0xfb52f9(0x134));if(_0x28846c[_0xfb52f9(0xabb)]!=null){if(!_0x5207ac(_0x28846c[_0xfb52f9(0xabb)]))throw new Error(_0xfb52f9(0x4de));const _0x434580=_0x28846c[_0xfb52f9(0xabb)];if(_0x434580[_0xfb52f9(0x2e1)]!=null&&(!Number[_0xfb52f9(0x474)](_0x434580[_0xfb52f9(0x2e1)])||_0x434580[_0xfb52f9(0x2e1)]<0x1))throw new Error(_0xfb52f9(0xb33));if(_0x434580['retry_delay']!=null&&(!Number[_0xfb52f9(0x474)](_0x434580[_0xfb52f9(0x849)])||_0x434580[_0xfb52f9(0x849)]<0x0))throw new Error(_0xfb52f9(0xede));if(_0x434580[_0xfb52f9(0xded)]!=null&&(typeof _0x434580['backoff_multiplier']!==_0xfb52f9(0x9f0)||_0x434580[_0xfb52f9(0xded)]<0x1))throw new Error(_0xfb52f9(0xec7));if(_0x434580[_0xfb52f9(0x534)]!=null&&!Number['isInteger'](_0x434580[_0xfb52f9(0x534)]))throw new Error(_0xfb52f9(0xee7));if(_0x434580[_0xfb52f9(0x347)]!=null&&(!Number[_0xfb52f9(0x474)](_0x434580[_0xfb52f9(0x347)])||_0x434580['ttl']<0x0))throw new Error(_0xfb52f9(0xd75));for(const _0x55556e of['done_ttl',_0xfb52f9(0x387)]){if(_0x434580[_0x55556e]!=null&&(!Number[_0xfb52f9(0x474)](_0x434580[_0x55556e])||_0x434580[_0x55556e]<0x0))throw new Error(_0xfb52f9(0x1e0)+_0x55556e+'\x20must\x20be\x20null\x20|\x200\x20|\x20positive\x20integer');}if(_0x434580[_0xfb52f9(0xd70)]!=null&&!Array['isArray'](_0x434580[_0xfb52f9(0xd70)]))throw new Error('job_type.defaults.buckets\x20must\x20be\x20array|null');}if(_0x28846c[_0xfb52f9(0x3ea)]!=null){if(!_0x5207ac(_0x28846c[_0xfb52f9(0x3ea)]))throw new Error(_0xfb52f9(0xee1));if(!_0x5207ac(_0x28846c[_0xfb52f9(0x3ea)][_0xfb52f9(0x83a)]))throw new Error(_0xfb52f9(0x869));if(typeof _0x28846c[_0xfb52f9(0x3ea)]['enforce']!==_0xfb52f9(0x854))throw new Error(_0xfb52f9(0x4fb));}for(const _0x3cfc1f of[_0xfb52f9(0xaa),_0xfb52f9(0x6a9)]){if(typeof _0x28846c[_0x3cfc1f]!=='number'||!Number[_0xfb52f9(0x2b5)](_0x28846c[_0x3cfc1f]))throw new Error(_0xfb52f9(0xb2c)+_0x3cfc1f+_0xfb52f9(0xf3b));}}function _0x133db1(_0x44d748){const _0x21db18=_0x1b23c9;if(!_0x5207ac(_0x44d748))throw new Error(_0x21db18(0xaa0));if(typeof _0x44d748['id']!==_0x21db18(0xf7a)||!_0x44d748['id'][_0x21db18(0xf4d)]())throw new Error(_0x21db18(0xe77));if(!Number['isInteger'](_0x44d748[_0x21db18(0x3d7)])||_0x44d748[_0x21db18(0x3d7)]<0x0)throw new Error(_0x21db18(0x10a));if(!Number[_0x21db18(0x474)](_0x44d748['capacity'])||_0x44d748['capacity']<0x0)throw new Error('bucket.capacity\x20must\x20be\x20int\x20>=\x200');if(_0x44d748[_0x21db18(0x3d7)]>_0x44d748['capacity'])throw new Error(_0x21db18(0x153));if(!Number['isInteger'](_0x44d748[_0x21db18(0x75d)])||_0x44d748[_0x21db18(0x75d)]<0x0)throw new Error('bucket.refill_amount\x20must\x20be\x20int\x20>=\x200');if(!Number[_0x21db18(0x474)](_0x44d748[_0x21db18(0xd62)])||_0x44d748[_0x21db18(0xd62)]<0x0)throw new Error('bucket.refill_every\x20must\x20be\x20int\x20>=\x200');if(typeof _0x44d748['updated']!==_0x21db18(0x9f0)||!Number[_0x21db18(0x2b5)](_0x44d748[_0x21db18(0x965)]))throw new Error(_0x21db18(0x34d));}return okdbQueueValidate={'STATUS':_0x40636c,'JOB_TYPE_STATUS':_0x363f31,'QUEUE_EVENTS':_0x491e31,'clampInt':_0xca4e06,'asNullableString':_0x109076,'normalizeResult':_0x6f4956,'normalizeTags':_0x10e586,'normalizeBucket':_0x110949,'normalizeBuckets':_0x4c0193,'validateJobShape':_0x505fdb,'validateJobTypeShape':_0x21457a,'validateBucketShape':_0x133db1},okdbQueueValidate;}var okdbRelay,hasRequiredOkdbRelay;function requireOkdbRelay(){const _0xdee943=_0xef8cd8;if(hasRequiredOkdbRelay)return okdbRelay;hasRequiredOkdbRelay=0x1;const {EVENTS:_0x3dd741}=requireOkdbEnums(),{ENGINE_EVENTS:_0x337a3e}=requireOkdbEnginesEnums(),{EMBEDDINGS_EVENTS:_0x30d787}=requireEnums(),{QUEUE_EVENTS:_0x30ec20}=requireOkdbQueueValidate(),_0x4c6c96=Object[_0xdee943(0x231)](_0x3dd741),_0x328b4=Object[_0xdee943(0x231)](_0x337a3e)[_0xdee943(0x1166)](_0xf14804=>'engine:'+_0xf14804),_0x1e28d6=Object['values'](_0x30d787),_0x133f07=Object['values'](_0x30ec20),_0x1d1e1c=[_0xdee943(0x1106),'processor:progress',_0xdee943(0xc72),_0xdee943(0x8c4),_0xdee943(0x216),_0xdee943(0x890)],_0x10f8a8=[..._0x4c6c96,..._0x328b4,..._0x1e28d6,..._0x133f07,..._0x1d1e1c,_0xdee943(0x9be)],_0x937875=new Set(_0x10f8a8),_0x5d8023=new Set([_0x3dd741[_0xdee943(0x711)],_0x3dd741[_0xdee943(0xc22)],_0x3dd741[_0xdee943(0x643)],_0x3dd741[_0xdee943(0x11bf)],_0x3dd741[_0xdee943(0x4a8)],_0x3dd741['TXN_ROLLBACK'],_0x3dd741[_0xdee943(0x967)],_0x3dd741['INDEX_PROGRESS'],_0x30d787[_0xdee943(0x1099)],_0x30d787['INDEXER_DOC_FAILED'],_0x30d787[_0xdee943(0xc2b)],_0x30d787['DOC_STATUS_CHANGE'],_0xdee943(0x311)]),_0x4624db=_0x10f8a8[_0xdee943(0x1103)](_0x16fd3c=>_0x16fd3c===_0xdee943(0x9be)||!_0x5d8023[_0xdee943(0x9d0)](_0x16fd3c)),_0x4eb6ae=0x14,_0x119710=0xc8;class _0x21d0c5{constructor(_0x33f89c,_0x2ebadd={}){const _0x52b271=_0xdee943;this[_0x52b271(0xd4f)]=_0x33f89c,this[_0x52b271(0xb56)]=_0x2ebadd['maxConnections']??_0x4eb6ae,this[_0x52b271(0x2f6)]=_0x2ebadd[_0x52b271(0xe1f)]??_0x119710,this[_0x52b271(0xc4b)]=new Set(),this[_0x52b271(0xe9a)]=[],this[_0x52b271(0x537)]=[],this['_detachLog']=null,this[_0x52b271(0xaf8)]=![];}['attach'](){const _0x54148e=_0xdee943;if(this[_0x54148e(0xaf8)])return;this['_attached']=!![];const {okdb:_0x1f1d1b}=this;this[_0x54148e(0x9c1)]=_0x1f1d1b['log'][_0x54148e(0x993)](_0x24d875=>this[_0x54148e(0x354)](_0x54148e(0x9be),_0x24d875));for(const _0x3886a2 of _0x10f8a8){if(_0x3886a2===_0x54148e(0x9be))continue;const _0x4cc741=_0x567043=>this['_push'](_0x3886a2,_0x567043??{});_0x1f1d1b[_0x54148e(0xea8)]['on'](_0x3886a2,_0x4cc741),this[_0x54148e(0x537)][_0x54148e(0x597)]({'event':_0x3886a2,'handler':_0x4cc741});}this[_0x54148e(0x5c9)]=()=>this[_0x54148e(0x679)](),_0x1f1d1b[_0x54148e(0xea8)][_0x54148e(0x1064)](_0x3dd741[_0x54148e(0xc5b)],this['_onStop']);}[_0xdee943(0x679)](){const _0x26d409=_0xdee943;if(!this[_0x26d409(0xaf8)])return;if(this['_onStop']){try{this[_0x26d409(0xd4f)][_0x26d409(0xea8)][_0x26d409(0xa9b)](_0x3dd741[_0x26d409(0xc5b)],this[_0x26d409(0x5c9)]);}catch{}this[_0x26d409(0x5c9)]=null;}this[_0x26d409(0x9c1)]?.(),this['_detachLog']=null;for(const {event:_0x24dc77,handler:_0x93ccbb}of this[_0x26d409(0x537)]){try{this[_0x26d409(0xd4f)][_0x26d409(0xea8)][_0x26d409(0xa9b)](_0x24dc77,_0x93ccbb);}catch{}}this[_0x26d409(0x537)]=[];for(const _0x4fec3d of this[_0x26d409(0xc4b)]){try{_0x4fec3d[_0x26d409(0x11ac)]?.();}catch{}}this[_0x26d409(0xc4b)]['clear'](),this[_0x26d409(0xaf8)]=![];}[_0xdee943(0x458)](_0x15b8d6,_0x448f5e,_0x5c8686){const _0x47bb19=_0xdee943;if(this['_connections']['size']>=this[_0x47bb19(0xb56)])return _0x448f5e(_0x47bb19(0xeba),{'message':'Too\x20many\x20concurrent\x20connections','code':'RELAY_FULL'}),()=>{};const _0x38c6b5=this[_0x47bb19(0x1f6)](_0x15b8d6),_0x4d1e06={'send':_0x448f5e,'filter':_0x38c6b5,'close':_0x5c8686??null};this[_0x47bb19(0xc4b)]['add'](_0x4d1e06);for(const {event:_0x16ad20,data:_0x22ce19}of this[_0x47bb19(0xe9a)]){if(_0x38c6b5['has'](_0x16ad20))try{_0x448f5e(_0x16ad20,_0x22ce19);}catch{}}return()=>this['_connections'][_0x47bb19(0x3b3)](_0x4d1e06);}get[_0xdee943(0x564)](){const _0xcfab43=_0xdee943;return this['_connections'][_0xcfab43(0xfb)];}['stats'](){const _0x2071f6=_0xdee943;return{'connections':this[_0x2071f6(0x564)],'bufferSize':this[_0x2071f6(0xe9a)][_0x2071f6(0x156)],'attached':this[_0x2071f6(0xaf8)],'allEvents':_0x10f8a8[_0x2071f6(0x156)],'defaultEvents':_0x4624db[_0x2071f6(0x156)]};}static get[_0xdee943(0x11e4)](){return _0x10f8a8;}static get['DEFAULT_EVENTS'](){return _0x4624db;}static get[_0xdee943(0x264)](){return[..._0x5d8023];}[_0xdee943(0x1f6)](_0x2e0de3){const _0xc73a96=_0xdee943;if(!_0x2e0de3||!_0x2e0de3[_0xc73a96(0x156)])return new Set(_0x4624db);const _0xf29fc2=_0x2e0de3['filter'](_0x8a25da=>_0x937875[_0xc73a96(0x9d0)](_0x8a25da));return new Set(_0xf29fc2[_0xc73a96(0x156)]?_0xf29fc2:_0x4624db);}[_0xdee943(0x354)](_0x24ed43,_0x1226a9){const _0x1bf143=_0xdee943,_0x5061aa={..._0x1226a9,'_ts':_0x1226a9?.[_0x1bf143(0xc8b)]??_0x1226a9?.['ts']??Date[_0x1bf143(0x555)]()};this['_buffer'][_0x1bf143(0x597)]({'event':_0x24ed43,'data':_0x5061aa});if(this[_0x1bf143(0xe9a)][_0x1bf143(0x156)]>this[_0x1bf143(0x2f6)])this['_buffer']['shift']();for(const _0x25e269 of this[_0x1bf143(0xc4b)]){if(_0x25e269['filter'][_0x1bf143(0x9d0)](_0x24ed43))try{_0x25e269['send'](_0x24ed43,_0x5061aa);}catch{}}}}return okdbRelay=_0x21d0c5,okdbRelay;}var admin,hasRequiredAdmin;function requireAdmin(){if(hasRequiredAdmin)return admin;hasRequiredAdmin=0x1;const _0x487d84=requireOkdbRelay();return admin=function _0x2ca162({okdb:_0x56e0c8,http:_0x1aa72a}){const _0x1aa4e7=_0x47ab;if(!_0x56e0c8[_0x1aa4e7(0xd8d)]){const _0x3f84f4=new _0x487d84(_0x56e0c8,_0x56e0c8[_0x1aa4e7(0x11e5)]?.['admin']?.[_0x1aa4e7(0x470)]??{});_0x3f84f4['attach'](),_0x3f84f4[_0x1aa4e7(0xa1d)]=!![],_0x56e0c8[_0x1aa4e7(0xd8d)]=_0x3f84f4;}const _0x4713bf=_0x56e0c8['_adminRelay'];_0x1aa72a['addSSE'](_0x1aa4e7(0xd87),({send:_0x26230f,close:_0x3b4c4b,query:_0x4535fe})=>{const _0x439ed9=_0x1aa4e7,_0x41dfeb=_0x4535fe[_0x439ed9(0x450)]?String(_0x4535fe['types'])[_0x439ed9(0xfb1)](',')[_0x439ed9(0x1166)](_0x1145c0=>_0x1145c0[_0x439ed9(0xf4d)]())[_0x439ed9(0x1103)](Boolean):null;return _0x4713bf[_0x439ed9(0x458)](_0x41dfeb,_0x26230f,_0x3b4c4b);},{'summary':_0x1aa4e7(0x10f1),'description':'Server-Sent\x20Events\x20stream\x20of\x20log\x20and\x20system\x20activity\x20for\x20the\x20admin\x20UI\x20and\x20diagnostics.','tags':['event'],'hidden':!![],'mcp':{'include':![]},'access':{'audiences':['http',_0x1aa4e7(0xd14)],'authRequired':!![],'internalOnly':![],'permission':_0x1aa4e7(0x99b)},'safety':{'access':_0x1aa4e7(0xcae),'destructive':![],'idempotent':!![],'longRunning':!![],'streaming':!![]},'inputSchema':{'type':_0x1aa4e7(0xb36),'properties':{'types':{'type':[_0x1aa4e7(0xf7a),_0x1aa4e7(0x11e)],'description':_0x1aa4e7(0xee5)}},'additionalProperties':![]},'outputSchema':{'type':_0x1aa4e7(0xb36),'additionalProperties':!![]},'http':{'bodyMode':_0x1aa4e7(0x11cc),'transport':_0x1aa4e7(0xe70),'querySchema':{'types':{'type':[_0x1aa4e7(0xf7a),'null'],'default':null}}}}),_0x1aa72a[_0x1aa4e7(0x33c)](_0x1aa4e7(0x929),_0x1aa4e7(0xc0d),()=>({'result':_0x4713bf['stats']()}),{'id':'events_stats','summary':_0x1aa4e7(0xaaa),'description':_0x1aa4e7(0x4b5),'tags':['event'],'inputSchema':{'type':_0x1aa4e7(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x1aa4e7(0x9f4),_0x1aa4e7(0xd14)],'authRequired':!![],'internalOnly':![],'permission':_0x1aa4e7(0x99b)},'safety':{'access':_0x1aa4e7(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1aa4e7(0x11cc)},'mcp':{'include':![]}}),_0x1aa72a[_0x1aa4e7(0x33c)]('GET',_0x1aa4e7(0xef5),()=>({'result':{'all':_0x487d84[_0x1aa4e7(0x11e4)],'default':_0x487d84[_0x1aa4e7(0x642)],'highFreq':_0x487d84[_0x1aa4e7(0x264)]}}),{'id':'events_types','summary':'Event\x20type\x20catalogue','description':_0x1aa4e7(0xfab),'tags':[_0x1aa4e7(0x64d)],'inputSchema':{'type':_0x1aa4e7(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x1aa4e7(0x9f4),_0x1aa4e7(0xd14)],'authRequired':!![],'internalOnly':![],'permission':'system:read'},'safety':{'access':_0x1aa4e7(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1aa4e7(0x11cc)},'mcp':{'include':![]}}),_0x1aa72a[_0x1aa4e7(0x33c)](_0x1aa4e7(0x929),_0x1aa4e7(0x249),()=>({'result':_0x56e0c8[_0x1aa4e7(0x30b)](_0x1aa4e7(0x8d0))[_0x1aa4e7(0xf39)][_0x1aa4e7(0x63e)]()}),{'id':_0x1aa4e7(0xe95),'summary':_0x1aa4e7(0xaef),'description':'Returns\x20all\x20active\x20processor\x20registrations\x20and\x20their\x20status\x20in\x20the\x20default\x20environment.','tags':['processor'],'inputSchema':{'type':_0x1aa4e7(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0x1aa4e7(0xf9d),'items':{'type':_0x1aa4e7(0xb36)}},'access':{'audiences':[_0x1aa4e7(0x9f4),_0x1aa4e7(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x1aa4e7(0x99b)},'safety':{'access':_0x1aa4e7(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1aa4e7(0x11cc)},'mcp':{'capability':'system','action':_0x1aa4e7(0xe95),'readOnlyHint':!![]}}),_0x1aa72a['add'](_0x1aa4e7(0x929),_0x1aa4e7(0xf4a),({params:_0x1813bc})=>{const _0x3ee2aa=_0x1aa4e7,_0x2f481d=decodeURIComponent(_0x1813bc['id']),_0x5dd8ea=_0x56e0c8[_0x3ee2aa(0x30b)](_0x3ee2aa(0x8d0))[_0x3ee2aa(0xf39)][_0x3ee2aa(0xbeb)](_0x2f481d);if(!_0x5dd8ea)return{'status':0x194,'result':{'error':_0x3ee2aa(0xebf)}};return{'result':_0x5dd8ea};},{'id':_0x1aa4e7(0x10ae),'summary':_0x1aa4e7(0x11f5),'description':'Returns\x20a\x20single\x20processor\x20registration\x20and\x20its\x20current\x20status\x20by\x20id.','tags':[_0x1aa4e7(0xf39)],'inputSchema':{'type':_0x1aa4e7(0xb36),'properties':{'id':{'type':'string','description':_0x1aa4e7(0xca2)}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':_0x1aa4e7(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x1aa4e7(0xd14),_0x1aa4e7(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1aa4e7(0x99b)},'safety':{'access':_0x1aa4e7(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1aa4e7(0x11cc)},'mcp':{'capability':_0x1aa4e7(0x83e),'action':_0x1aa4e7(0x10ae),'readOnlyHint':!![]}}),_0x1aa72a[_0x1aa4e7(0x33c)](_0x1aa4e7(0xe46),_0x1aa4e7(0xd1),({params:_0x3d4b2f})=>{const _0x279083=_0x1aa4e7,_0x54d9bc=decodeURIComponent(_0x3d4b2f['id']),_0x5976fe=_0x56e0c8['env'](_0x279083(0x8d0))[_0x279083(0xf39)][_0x279083(0x315)](_0x54d9bc);if(!_0x5976fe)return{'status':0x194,'result':{'error':_0x279083(0xebf)}};return{'result':{'ok':!![],'id':_0x54d9bc}};},{'id':_0x1aa4e7(0x1ed),'summary':_0x1aa4e7(0x909),'description':'Pauses\x20a\x20processor\x20in\x20the\x20default\x20environment.','tags':['processor'],'inputSchema':{'type':_0x1aa4e7(0xb36),'properties':{'id':{'type':_0x1aa4e7(0xf7a),'description':_0x1aa4e7(0xca2)}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':_0x1aa4e7(0xb36),'properties':{'ok':{'type':_0x1aa4e7(0x854)},'id':{'type':_0x1aa4e7(0xf7a)}},'additionalProperties':![]},'access':{'audiences':[_0x1aa4e7(0x9f4),'shell',_0x1aa4e7(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1aa4e7(0x4ce)},'safety':{'access':_0x1aa4e7(0x90a),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1aa4e7(0x11cc)},'mcp':{'capability':_0x1aa4e7(0x83e),'action':'processor_pause'}}),_0x1aa72a[_0x1aa4e7(0x33c)](_0x1aa4e7(0xe46),'/api/processors/:id/resume',({params:_0x100597})=>{const _0x5669da=_0x1aa4e7,_0x320d6b=decodeURIComponent(_0x100597['id']),_0x49e556=_0x56e0c8[_0x5669da(0x30b)](_0x5669da(0x8d0))[_0x5669da(0xf39)][_0x5669da(0x445)](_0x320d6b);if(!_0x49e556)return{'status':0x194,'result':{'error':_0x5669da(0xebf)}};return{'result':{'ok':!![],'id':_0x320d6b}};},{'id':'processor_resume','summary':'Resume\x20processor','description':_0x1aa4e7(0xa9a),'tags':['processor'],'inputSchema':{'type':'object','properties':{'id':{'type':'string','description':_0x1aa4e7(0xca2)}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':_0x1aa4e7(0xb36),'properties':{'ok':{'type':_0x1aa4e7(0x854)},'id':{'type':'string'}},'additionalProperties':![]},'access':{'audiences':['http',_0x1aa4e7(0xd14),_0x1aa4e7(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1aa4e7(0x4ce)},'safety':{'access':_0x1aa4e7(0x90a),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x1aa4e7(0x83e),'action':_0x1aa4e7(0xdad)}}),_0x1aa72a[_0x1aa4e7(0x33c)](_0x1aa4e7(0xe46),_0x1aa4e7(0x39a),({params:_0x56dc39})=>{const _0x37f9fc=_0x1aa4e7,_0xcd75fa=decodeURIComponent(_0x56dc39['id']),_0x3d8b40=_0x56e0c8['env']('default')[_0x37f9fc(0xf39)][_0x37f9fc(0x1116)](_0xcd75fa);if(!_0x3d8b40)return{'status':0x194,'result':{'error':'processor\x20not\x20found\x20or\x20not\x20in\x20error\x20state'}};return{'result':{'ok':!![],'id':_0xcd75fa}};},{'id':_0x1aa4e7(0xe6c),'summary':_0x1aa4e7(0xfd9),'description':_0x1aa4e7(0xc94),'tags':[_0x1aa4e7(0xf39)],'inputSchema':{'type':_0x1aa4e7(0xb36),'properties':{'id':{'type':_0x1aa4e7(0xf7a),'description':_0x1aa4e7(0xca2)}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':'object','properties':{'ok':{'type':_0x1aa4e7(0x854)},'id':{'type':_0x1aa4e7(0xf7a)}},'additionalProperties':![]},'access':{'audiences':[_0x1aa4e7(0x9f4),_0x1aa4e7(0xd14),_0x1aa4e7(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1aa4e7(0x4ce)},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x1aa4e7(0x83e),'action':_0x1aa4e7(0xe6c)}}),_0x1aa72a[_0x1aa4e7(0x33c)](_0x1aa4e7(0xe46),'/api/processors/cursor/reset',({body:_0x363238})=>{const _0xc27981=_0x1aa4e7,{cursorKey:_0x2ff2c8}=_0x363238||{};if(!_0x2ff2c8)return{'status':0x190,'result':{'error':_0xc27981(0xf89)}};return _0x56e0c8[_0xc27981(0x30b)](_0xc27981(0x8d0))['processor'][_0xc27981(0xcec)](_0x2ff2c8),{'result':{'ok':!![],'cursorKey':_0x2ff2c8}};},{'id':_0x1aa4e7(0xcdf),'summary':_0x1aa4e7(0x73c),'description':'Forces\x20reprocessing\x20from\x20the\x20beginning\x20on\x20the\x20next\x20processor\x20registration\x20for\x20the\x20given\x20cursor\x20key.','tags':[_0x1aa4e7(0xf39)],'inputSchema':{'type':'object','properties':{'cursorKey':{'type':_0x1aa4e7(0xf7a)}},'required':[_0x1aa4e7(0x10f6)],'additionalProperties':![]},'outputSchema':{'type':_0x1aa4e7(0xb36),'additionalProperties':![],'properties':{'ok':{'type':_0x1aa4e7(0x854)},'cursorKey':{'type':_0x1aa4e7(0xf7a)}}},'access':{'audiences':[_0x1aa4e7(0x9f4),_0x1aa4e7(0xd14),_0x1aa4e7(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1aa4e7(0x4ce)},'safety':{'access':_0x1aa4e7(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':'system','action':_0x1aa4e7(0xcdf)}}),_0x1aa72a[_0x1aa4e7(0x33c)](_0x1aa4e7(0x929),_0x1aa4e7(0xfa),({params:_0x30182c})=>{const _0x485ff3=_0x1aa4e7,_0xb9c119=decodeURIComponent(_0x30182c[_0x485ff3(0x9dd)]);return{'result':{'cursorKey':_0xb9c119,'clock':_0x56e0c8[_0x485ff3(0x30b)]('default')[_0x485ff3(0xf39)][_0x485ff3(0x1c3)](_0xb9c119)}};},{'id':_0x1aa4e7(0x6d0),'summary':_0x1aa4e7(0x20a),'description':'Returns\x20the\x20current\x20stored\x20cursor\x20clock\x20for\x20a\x20processor\x20cursor\x20key.','tags':['processor'],'inputSchema':{'type':'object','properties':{'key':{'type':_0x1aa4e7(0xf7a)}},'required':[_0x1aa4e7(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':_0x1aa4e7(0xb36),'additionalProperties':![],'properties':{'cursorKey':{'type':'string'},'clock':{'type':[_0x1aa4e7(0x10f2),_0x1aa4e7(0x11e)]}}},'access':{'audiences':[_0x1aa4e7(0x9f4),'shell',_0x1aa4e7(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1aa4e7(0x99b)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x1aa4e7(0x11cc)},'mcp':{'capability':'system','action':_0x1aa4e7(0x6d0),'readOnlyHint':!![]}}),_0x1aa72a[_0x1aa4e7(0x33c)](_0x1aa4e7(0x929),_0x1aa4e7(0x164),async({query:_0x494f22})=>{const _0x10159a=_0x1aa4e7,{PassThrough:_0x7fdaa0}=require$$3,_0x478b67=_0x494f22[_0x10159a(0xbe)]==='true',_0x44628f=_0x494f22['types']?String(_0x494f22[_0x10159a(0x450)])[_0x10159a(0xfb1)](',')[_0x10159a(0x1166)](_0x4823c0=>_0x4823c0['trim']())['filter'](Boolean):null,_0x5a2173=!!_0x494f22[_0x10159a(0xfcc)],_0x3a7fba=_0x5a2173?String(_0x494f22[_0x10159a(0xfcc)])['split'](',')[_0x10159a(0x1166)](_0x49d3b5=>_0x49d3b5['trim']())[_0x10159a(0x1103)](Boolean):null,_0x2d37ec=_0x494f22['env']||_0x10159a(0x8d0),_0x3b1287=_0x5a2173?'all':_0x2d37ec,_0x538e2d=_0x10159a(0x918)+_0x3b1287+'-'+Date[_0x10159a(0x555)]()+_0x10159a(0x57f),_0x41515f=new _0x7fdaa0(),_0xb04469=_0x5a2173?_0x56e0c8['migrate'][_0x10159a(0x6ee)](_0x41515f,{'envNames':_0x3a7fba,'types':_0x44628f,'includeChanges':_0x478b67}):_0x56e0c8[_0x10159a(0x454)][_0x10159a(0xfa7)](_0x41515f,{'envName':_0x2d37ec,'types':_0x44628f,'includeChanges':_0x478b67});return _0xb04469[_0x10159a(0x7db)](()=>_0x41515f['end']())[_0x10159a(0x415)](_0x515457=>{const _0x5bf136=_0x10159a;_0x56e0c8[_0x5bf136(0x9be)]?.[_0x5bf136(0x225)]?.(_0x5bf136(0x3fa)+_0x515457['message']);try{_0x41515f[_0x5bf136(0xe69)](_0x515457);}catch{}}),{'status':0xc8,'headers':{'content-type':_0x10159a(0x885),'content-disposition':_0x10159a(0x1109)+_0x538e2d+'\x22','transfer-encoding':'chunked','cache-control':_0x10159a(0x4e4)},'body':_0x41515f};},{'id':_0x1aa4e7(0xa45),'summary':_0x1aa4e7(0x102d),'description':_0x1aa4e7(0x10ec),'tags':[_0x1aa4e7(0x83e)],'inputSchema':{'type':_0x1aa4e7(0xb36),'properties':{'env':{'type':[_0x1aa4e7(0xf7a),_0x1aa4e7(0x11e)],'default':_0x1aa4e7(0x8d0)},'envs':{'type':[_0x1aa4e7(0xf7a),_0x1aa4e7(0x11e)],'default':null},'types':{'type':[_0x1aa4e7(0xf7a),'null'],'default':null},'includeChanges':{'type':[_0x1aa4e7(0xf7a),_0x1aa4e7(0x11e)],'default':null}},'additionalProperties':![]},'outputSchema':{'type':_0x1aa4e7(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1aa4e7(0x9f4),'shell'],'authRequired':!![],'internalOnly':![],'permission':'system:read'},'safety':{'access':_0x1aa4e7(0x90a),'destructive':![],'idempotent':!![],'longRunning':!![],'streaming':!![]},'http':{'bodyMode':_0x1aa4e7(0x11cc),'transport':'stream','querySchema':{'env':{'type':[_0x1aa4e7(0xf7a),'null'],'default':_0x1aa4e7(0x8d0)},'envs':{'type':[_0x1aa4e7(0xf7a),_0x1aa4e7(0x11e)],'default':null},'types':{'type':[_0x1aa4e7(0xf7a),_0x1aa4e7(0x11e)],'default':null},'includeChanges':{'type':['string',_0x1aa4e7(0x11e)],'default':null}}},'mcp':{'include':![]}}),_0x1aa72a[_0x1aa4e7(0x432)](_0x1aa4e7(0xe46),_0x1aa4e7(0x5dc),async({query:_0x554ff2,context:_0x252d46})=>{const _0x3658e2=_0x1aa4e7,_0x574c60=_0x252d46[_0x3658e2(0xb9f)],_0x3f3d68={'envName':_0x554ff2[_0x3658e2(0x30b)]||null,'types':_0x554ff2[_0x3658e2(0x450)]?String(_0x554ff2[_0x3658e2(0x450)])[_0x3658e2(0xfb1)](',')['map'](_0x2caaed=>_0x2caaed[_0x3658e2(0xf4d)]())['filter'](Boolean):null,'dropExisting':_0x554ff2[_0x3658e2(0x7c3)]===_0x3658e2(0x7e8),'includeChanges':_0x554ff2[_0x3658e2(0xbe)]==='true','batchSize':_0x554ff2['batchSize']?Number(_0x554ff2[_0x3658e2(0xc2a)]):0x1f4};try{const _0x2e6bc8=await _0x56e0c8[_0x3658e2(0x454)][_0x3658e2(0xdfa)](_0x574c60,_0x3f3d68);return{'result':{'ok':!![],..._0x2e6bc8}};}catch(_0x215edf){return _0x56e0c8['log']?.['error']?.('[admin]\x20import\x20error:\x20'+_0x215edf[_0x3658e2(0xb4e)]),{'status':0x1f4,'result':{'ok':![],'error':_0x215edf[_0x3658e2(0xb4e)]}};}},{'id':_0x1aa4e7(0xce6),'summary':_0x1aa4e7(0xf42),'description':_0x1aa4e7(0x669),'tags':[_0x1aa4e7(0x83e)],'inputSchema':{'type':_0x1aa4e7(0xb36),'properties':{'env':{'type':[_0x1aa4e7(0xf7a),_0x1aa4e7(0x11e)],'default':null},'types':{'type':['string',_0x1aa4e7(0x11e)],'default':null},'dropExisting':{'type':[_0x1aa4e7(0xf7a),_0x1aa4e7(0x11e)],'default':null},'includeChanges':{'type':['string','null'],'default':null},'batchSize':{'type':[_0x1aa4e7(0xf7a),'null'],'default':null}},'additionalProperties':![]},'outputSchema':{'type':_0x1aa4e7(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1aa4e7(0x9f4),_0x1aa4e7(0xd14)],'authRequired':!![],'internalOnly':![],'permission':'system:write'},'safety':{'access':_0x1aa4e7(0x90a),'destructive':!![],'idempotent':![],'longRunning':!![],'streaming':!![]},'http':{'bodyMode':_0x1aa4e7(0x6cc),'transport':_0x1aa4e7(0x6cc),'querySchema':{'env':{'type':['string',_0x1aa4e7(0x11e)],'default':null},'types':{'type':[_0x1aa4e7(0xf7a),_0x1aa4e7(0x11e)],'default':null},'dropExisting':{'type':[_0x1aa4e7(0xf7a),'null'],'default':null},'includeChanges':{'type':[_0x1aa4e7(0xf7a),'null'],'default':null},'batchSize':{'type':[_0x1aa4e7(0xf7a),_0x1aa4e7(0x11e)],'default':null}}},'mcp':{'include':![]}}),_0x1aa72a[_0x1aa4e7(0x33c)](_0x1aa4e7(0xe46),_0x1aa4e7(0x70a),async({body:_0x3bca82})=>{const _0x24d9ed=_0x1aa4e7,{destDir:_0x1e0078,envNames:envNames=null,compact:compact=!![]}=_0x3bca82||{};if(!_0x1e0078)return{'status':0x190,'result':{'error':'destDir\x20is\x20required'}};try{const _0x219fcb=Date[_0x24d9ed(0x555)](),_0x8d787e=await _0x56e0c8[_0x24d9ed(0x454)]['backup'](_0x1e0078,{'envNames':envNames,'compact':compact});return{'result':{..._0x8d787e,'durationMs':Date[_0x24d9ed(0x555)]()-_0x219fcb}};}catch(_0x16d341){return _0x56e0c8[_0x24d9ed(0x9be)]?.[_0x24d9ed(0x225)]?.(_0x24d9ed(0x1230)+_0x16d341[_0x24d9ed(0xb4e)]),{'status':0x1f4,'result':{'ok':![],'error':_0x16d341['message']}};}},{'id':_0x1aa4e7(0x1117),'summary':_0x1aa4e7(0x11f0),'description':'Creates\x20a\x20server-side\x20LMDB\x20native\x20backup.','tags':['system'],'inputSchema':{'type':_0x1aa4e7(0xb36),'properties':{'destDir':{'type':_0x1aa4e7(0xf7a)},'envNames':{'type':[_0x1aa4e7(0xf9d),_0x1aa4e7(0x11e)],'items':{'type':_0x1aa4e7(0xf7a)},'default':null},'compact':{'type':_0x1aa4e7(0x854),'default':!![]}},'required':[_0x1aa4e7(0xe21)],'additionalProperties':![]},'outputSchema':{'type':_0x1aa4e7(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x1aa4e7(0x9f4),_0x1aa4e7(0xd14),_0x1aa4e7(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x1aa4e7(0x4ce)},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x1aa4e7(0xcd7)},'mcp':{'action':'system_backup','standalone':!![]}});},admin;}var _helpers,hasRequired_helpers;function require_helpers(){if(hasRequired_helpers)return _helpers;hasRequired_helpers=0x1;function _0x59408c(_0x1032d1,_0x22c139){const _0x102263=_0x47ab,_0x543bd7=_0x1032d1[_0x102263(0xa3)][_0x102263(0xbeb)](_0x22c139);if(!_0x543bd7){const _0x3f3599=new Error(_0x102263(0x56f)+_0x22c139);_0x3f3599['status']=0x194;throw _0x3f3599;}return _0x543bd7;}function _0x517b6e(_0x4b633e){const _0x478ca6=_0x47ab,_0x2d9c91=_0x4b633e['db']?.[_0x478ca6(0x30b)]?.[_0x478ca6(0x26c)]?.()??{},_0x571417=_0x4b633e[_0x478ca6(0xd4f)]?.[_0x478ca6(0x11e5)]?.[_0x478ca6(0x3ff)]??0x1000,_0x5ca789={};function _0x53a4f7(_0x44a656){const _0x3766b8=_0x478ca6;if(!_0x44a656)return{'entryCount':0x0,'pages':0x0};return{'entryCount':_0x44a656[_0x3766b8(0x1107)]??0x0,'pages':(_0x44a656[_0x3766b8(0x716)]??0x0)+(_0x44a656[_0x3766b8(0x772)]??0x0)+(_0x44a656[_0x3766b8(0xb7b)]??0x0)};}for(const [_0x2c980d,_0x80f01b]of _0x4b633e[_0x478ca6(0x1145)]){const _0x11ea40={};if(_0x80f01b?.[_0x478ca6(0x970)]){for(const [_0x2b670d,_0x5a159a]of _0x80f01b[_0x478ca6(0x970)])_0x11ea40[_0x2b670d]=[..._0x5a159a][_0x478ca6(0x3f6)]();}const _0x50adad={};for(const [_0x30529e,_0x1dd4f7]of _0x80f01b?.[_0x478ca6(0xf7b)]??new Map()){_0x50adad[_0x30529e]={'status':_0x80f01b[_0x478ca6(0xb4f)]?.['get']?.(_0x30529e)?.[_0x478ca6(0xfcd)]??null,'unique':_0x1dd4f7[_0x478ca6(0x774)]??![],..._0x53a4f7(_0x1dd4f7['db']?.['getStats']?.())};}_0x5ca789[_0x2c980d]={'count':_0x80f01b?.[_0x478ca6(0xc88)]?.['getCount']?.()??0x0,'data':_0x53a4f7(_0x80f01b?.[_0x478ca6(0xc88)]?.[_0x478ca6(0x1115)]?.()),'indexes':_0x50adad,'fields':_0x11ea40};}return{'name':_0x4b633e[_0x478ca6(0x1173)],'id':_0x4b633e['okdb']?.['id']??null,'version':_0x4b633e[_0x478ca6(0xd4f)]?.['info']?.[_0x478ca6(0x45c)]??null,'sync':_0x4b633e[_0x478ca6(0x745)],'clock':_0x4b633e[_0x478ca6(0x745)]?_0x4b633e[_0x478ca6(0x5ea)]?.()??0x0:null,'pageSize':_0x571417,'lastPageNumber':_0x2d9c91[_0x478ca6(0x1228)]??0x0,'mapSize':_0x2d9c91[_0x478ca6(0xc7)]??0x0,'types':_0x5ca789,'config':_0x4b633e[_0x478ca6(0x107)]?.()??{}};}return _helpers={'resolveEnv':_0x59408c,'describeEnv':_0x517b6e},_helpers;}var envs,hasRequiredEnvs;function requireEnvs(){if(hasRequiredEnvs)return envs;hasRequiredEnvs=0x1;const {resolveEnv:_0x23f3f5,describeEnv:_0x1f5dcf}=require_helpers(),{hasPermission:_0x351f0c}=requireOkdbAuthPermissions();return envs=function _0x55ebf9({okdb:_0x519899,http:_0x5d3dac}){const _0x2b8445=_0x47ab;_0x5d3dac['add'](_0x2b8445(0x929),'/api/envs',({context:_0xbfc9ad})=>{const _0x327653=_0x2b8445,_0x1ebebb=_0xbfc9ad?.['auth']?.[_0x327653(0x15a)],_0x19d4a2=_0x1ebebb?.[_0x327653(0x6c9)]??[],_0x5b16a5=_0x1ebebb?.[_0x327653(0x912)]??{},_0x9c1b74=_0x351f0c(_0x19d4a2,_0x327653(0xa7e))||_0x351f0c(_0x19d4a2,'data:read')||_0x351f0c(_0x19d4a2,'*'),_0x133d9d=new Set(Object[_0x327653(0xa52)](_0x5b16a5)),_0xe9298=[],_0x485f98=new Set(),_0x457aca=new Map();try{if(_0x519899[_0x327653(0xc65)]?.[_0x327653(0x7c0)]?.(_0x327653(0xa0e)))for(const {key:_0x430d1d,value:_0x1e5798}of _0x519899[_0x327653(0xc65)][_0x327653(0x9ce)](_0x327653(0xa0e))){_0x457aca[_0x327653(0x211)](_0x430d1d,_0x1e5798);}}catch{}for(const [_0xa9b862,_0x5e396e]of _0x519899[_0x327653(0xa3)]){_0x485f98['add'](_0xa9b862);const _0x51fbe6=_0x5e396e['db']?.[_0x327653(0x30b)]?.[_0x327653(0x26c)]?.()??{},_0x27265d=_0x519899['options']?.[_0x327653(0x3ff)]??0x1000,_0x572d6d=_0x457aca[_0x327653(0xbeb)](_0xa9b862)??{};_0xe9298[_0x327653(0x597)]({'name':_0xa9b862,'sync':_0x5e396e[_0x327653(0x745)],'clock':_0x5e396e[_0x327653(0x745)]?_0x5e396e[_0x327653(0x5ea)]?.()??0x0:null,'types':[..._0x5e396e[_0x327653(0x1145)][_0x327653(0x1129)]()][_0x327653(0x1166)](([_0x55758d,_0x4dbdc8])=>({'name':_0x55758d,'count':_0x4dbdc8?.[_0x327653(0xc88)]?.[_0x327653(0x7df)]?.()??0x0})),'size':(_0x51fbe6[_0x327653(0x1228)]??0x0)*_0x27265d,'parentEnv':_0x572d6d[_0x327653(0xd0c)]??null});}for(const [_0x371e96,_0x8b313a]of _0x457aca){if(_0x485f98[_0x327653(0x9d0)](_0x371e96))continue;if(!_0x8b313a['orphanedAt'])continue;_0xe9298[_0x327653(0x597)]({'name':_0x371e96,'sync':_0x8b313a[_0x327653(0x142)]?.['sync']!==![],'clock':null,'types':[],'size':0x0,'parentEnv':_0x8b313a[_0x327653(0xd0c)]??null,'orphaned':!![],'orphanedAt':_0x8b313a['orphanedAt'],'orphanedFrom':_0x8b313a[_0x327653(0x101d)]??null});}const _0x2b9861=_0x9c1b74?_0xe9298:_0xe9298[_0x327653(0x1103)](_0x19995f=>_0x133d9d['has'](_0x19995f['name']));return{'result':_0x2b9861};},{'id':_0x2b8445(0x233),'summary':_0x2b8445(0x11eb),'description':_0x2b8445(0xc52),'tags':['envs'],'inputSchema':{'type':_0x2b8445(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0x2b8445(0xf9d),'items':{'type':_0x2b8445(0xb36)}},'access':{'audiences':[_0x2b8445(0x9f4),_0x2b8445(0xd14),_0x2b8445(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x2b8445(0xa7e)},'safety':{'access':_0x2b8445(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x2b8445(0x11cc)},'mcp':{'capability':_0x2b8445(0x30b),'action':_0x2b8445(0x8f8),'readOnlyHint':!![]}}),_0x5d3dac['add'](_0x2b8445(0x929),_0x2b8445(0xdd2),({query:_0x584954})=>{const _0x315d4a=_0x2b8445,_0x47d87a=Math['min'](Math['max'](0x1,parseInt(_0x584954?.[_0x315d4a(0xbae)])||0x64),0x3e8),_0x1ff9bf=[];for(const [_0x4eddc3,_0x30d208]of _0x519899[_0x315d4a(0xa3)]){if(!_0x30d208[_0x315d4a(0x745)])continue;for(const _0x160805 of _0x30d208[_0x315d4a(0x151)](null,Number[_0x315d4a(0xac8)],0x0,{'limit':_0x47d87a})){_0x1ff9bf[_0x315d4a(0x597)]({..._0x160805,'_env':_0x4eddc3});}}return _0x1ff9bf[_0x315d4a(0x3f6)]((_0x3a43ab,_0x22fff1)=>Number(_0x22fff1[_0x315d4a(0xdfe)]||0x0)-Number(_0x3a43ab['timestamp']||0x0)),{'result':_0x1ff9bf[_0x315d4a(0xc3c)](0x0,_0x47d87a)};},{'id':_0x2b8445(0x954),'summary':_0x2b8445(0x120d),'description':_0x2b8445(0xe89),'tags':[_0x2b8445(0x83e)],'query':{'limit':0x64},'inputSchema':{'type':_0x2b8445(0xb36),'properties':{'limit':{'type':_0x2b8445(0x10f2),'default':0x64}},'additionalProperties':![]},'outputSchema':{'type':_0x2b8445(0xf9d),'items':{'type':_0x2b8445(0xb36)}},'access':{'audiences':[_0x2b8445(0x9f4),_0x2b8445(0xd14),_0x2b8445(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x2b8445(0x99b)},'safety':{'access':_0x2b8445(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x2b8445(0x11cc),'querySchema':{'limit':{'type':_0x2b8445(0x10f2),'default':0x64}}},'mcp':{'action':_0x2b8445(0x954),'standalone':!![],'readOnlyHint':!![]}}),_0x5d3dac[_0x2b8445(0x33c)](_0x2b8445(0xe46),'/api/envs',async({body:_0x22051e})=>{const _0x241ee7=_0x2b8445,{name:_0x1bce4e,sync:_0x1f2285,compression:_0x45076e,mapSize:_0x3fdd1f}=_0x22051e||{};if(!_0x1bce4e||typeof _0x1bce4e!==_0x241ee7(0xf7a))return{'status':0x190,'result':{'error':_0x241ee7(0x9e4)}};if(_0x519899['_envs'][_0x241ee7(0x9d0)](_0x1bce4e))return{'status':0x199,'body':{'error':_0x241ee7(0x1182)+_0x1bce4e}};const _0x240751={};if(_0x1f2285===![])_0x240751[_0x241ee7(0x1034)]=![];if(_0x45076e!=null)_0x240751[_0x241ee7(0xcaa)]=_0x45076e;if(_0x3fdd1f!=null)_0x240751[_0x241ee7(0xc7)]=_0x3fdd1f;const _0xf3cb20=await _0x519899['createEnvironment'](_0x1bce4e,_0x240751);return{'status':0xc9,'body':{'result':{'name':_0xf3cb20[_0x241ee7(0x1173)],'sync':_0xf3cb20[_0x241ee7(0x745)],'config':_0xf3cb20[_0x241ee7(0x142)]}}};},{'id':'env_create','summary':_0x2b8445(0x1a6),'description':_0x2b8445(0xd99),'tags':[_0x2b8445(0xfcc)],'body':{'name':_0x2b8445(0xe0f),'sync':!![],'compression':!![]},'inputSchema':{'type':_0x2b8445(0xb36),'properties':{'name':{'type':_0x2b8445(0xf7a),'description':'Environment\x20name'},'sync':{'type':[_0x2b8445(0x854),_0x2b8445(0x11e)]},'compression':{'type':[_0x2b8445(0x854),_0x2b8445(0x11e)]},'mapSize':{'type':[_0x2b8445(0x10f2),_0x2b8445(0x11e)]}},'required':[_0x2b8445(0x1173)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x2b8445(0x9f4),_0x2b8445(0xd14),_0x2b8445(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'env:write','scope':{'env':_0x2b8445(0x4e8)}},'safety':{'access':_0x2b8445(0x61d),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x2b8445(0xcd7)},'mcp':{'capability':_0x2b8445(0x30b),'action':_0x2b8445(0x122f)}}),_0x5d3dac['add'](_0x2b8445(0x42f),_0x2b8445(0x6eb),async({params:_0x440ca2,query:_0x5cbfe3})=>{const _0x2c0b42=_0x2b8445,_0x1ca795=_0x440ca2[_0x2c0b42(0x30b)],_0x200ccc=new Set([_0x2c0b42(0xfd5)]);if(_0x200ccc['has'](_0x1ca795))return{'status':0x193,'result':{'error':_0x2c0b42(0xac1)+_0x1ca795+'\x22'}};try{const _0x5b2267=_0x5cbfe3?.[_0x2c0b42(0xe03)]?String(_0x5cbfe3['keepSubEnvs'])[_0x2c0b42(0xfb1)](',')[_0x2c0b42(0x1166)](_0x51c65d=>_0x51c65d['trim']())[_0x2c0b42(0x1103)](Boolean):[],_0x1283fa=await _0x519899[_0x2c0b42(0x6a2)](_0x1ca795,{'keepSubEnvs':_0x5b2267});return _0x1283fa[_0x2c0b42(0xf03)]?.['length']&&(_0x1283fa[_0x2c0b42(0x6e6)]='Some\x20files\x20could\x20not\x20be\x20deleted\x20(locked\x20by\x20another\x20process):\x20'+_0x1283fa[_0x2c0b42(0xf03)]['join'](',\x20')),{'result':_0x1283fa};}catch(_0x5dbf33){const _0x5ed06d=_0x5dbf33[_0x2c0b42(0x1f8)]===_0x2c0b42(0x8ef)?0x194:0x1f4;return{'status':_0x5ed06d,'result':{'error':_0x5dbf33[_0x2c0b42(0xb4e)]}};}},{'id':'env_remove','summary':'Remove\x20environment','description':_0x2b8445(0x252),'tags':[_0x2b8445(0xfcc)],'query':{'keepSubEnvs':null},'inputSchema':{'type':'object','properties':{'env':{'type':_0x2b8445(0xf7a),'description':'Environment\x20name'},'keepSubEnvs':{'type':['string','null'],'default':null}},'required':[_0x2b8445(0x30b)],'additionalProperties':![]},'outputSchema':{'type':_0x2b8445(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x2b8445(0x9f4),'shell',_0x2b8445(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x2b8445(0x89b),'scope':{'env':_0x2b8445(0xd46)}},'safety':{'access':_0x2b8445(0x61d),'destructive':!![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x2b8445(0x11cc),'querySchema':{'keepSubEnvs':{'type':[_0x2b8445(0xf7a),_0x2b8445(0x11e)],'default':null}}},'mcp':{'capability':_0x2b8445(0x30b),'action':_0x2b8445(0x190)}}),_0x5d3dac[_0x2b8445(0x33c)](_0x2b8445(0x929),_0x2b8445(0xf95),({params:_0x2ef880})=>{const _0x1ca0e6=_0x23f3f5(_0x519899,_0x2ef880['env']);return{'result':_0x1f5dcf(_0x1ca0e6)};},{'id':'env_info','summary':_0x2b8445(0x59c),'description':_0x2b8445(0x271),'tags':[_0x2b8445(0xfcc)],'inputSchema':{'type':_0x2b8445(0xb36),'properties':{'env':{'type':_0x2b8445(0xf7a),'description':_0x2b8445(0xde1)}},'required':[_0x2b8445(0x30b)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x2b8445(0x9f4),_0x2b8445(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x2b8445(0xa7e),'scope':{'env':_0x2b8445(0xd46)}},'safety':{'access':_0x2b8445(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x2b8445(0x11cc)},'mcp':{'capability':_0x2b8445(0x30b),'action':'get_env_info','readOnlyHint':!![]}}),_0x5d3dac[_0x2b8445(0x33c)](_0x2b8445(0x929),'/api/env/:env/changelog',({params:_0x29b599,query:_0x1d3117})=>{const _0x25603e=_0x2b8445,_0x1ba788=_0x23f3f5(_0x519899,_0x29b599[_0x25603e(0x30b)]);if(!_0x1ba788['_sync'])return{'result':[],'clock':0x0};const _0x4165de=Math[_0x25603e(0x2dc)](Math['max'](0x1,parseInt(_0x1d3117?.[_0x25603e(0xbae)])||0x64),0x3e8),_0x36cfdf=_0x1d3117?.[_0x25603e(0x2ea)]!=null?parseInt(_0x1d3117['before']):Number[_0x25603e(0xac8)],_0x2e7961=_0x1d3117?.['after']!=null?parseInt(_0x1d3117[_0x25603e(0x1067)]):0x0,_0x2d9b77=[];for(const _0x277810 of _0x1ba788[_0x25603e(0x151)](null,_0x36cfdf,_0x2e7961,{'limit':_0x4165de,'reverse':!![]}))_0x2d9b77[_0x25603e(0x597)](_0x277810);return{'result':_0x2d9b77,'clock':_0x1ba788[_0x25603e(0x5ea)]()};},{'id':_0x2b8445(0xc5f),'summary':_0x2b8445(0x8a8),'description':'Returns\x20recent\x20changes\x20across\x20all\x20types\x20in\x20the\x20named\x20environment.','tags':['envs'],'query':{'limit':0x32,'before':null,'after':null},'inputSchema':{'type':_0x2b8445(0xb36),'properties':{'env':{'type':_0x2b8445(0xf7a),'description':_0x2b8445(0xde1)},'limit':{'type':_0x2b8445(0x10f2),'default':0x32},'before':{'type':[_0x2b8445(0x10f2),_0x2b8445(0x11e)],'default':null},'after':{'type':['integer','null'],'default':null}},'required':[_0x2b8445(0x30b)],'additionalProperties':![]},'outputSchema':{'type':_0x2b8445(0xb36),'additionalProperties':!![]},'access':{'audiences':['http','shell',_0x2b8445(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x2b8445(0xa7e),'scope':{'env':'params.env'}},'safety':{'access':_0x2b8445(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x2b8445(0x11cc),'querySchema':{'limit':{'type':'integer','default':0x32},'before':{'type':[_0x2b8445(0x10f2),_0x2b8445(0x11e)],'default':null},'after':{'type':[_0x2b8445(0x10f2),_0x2b8445(0x11e)],'default':null}}},'mcp':{'capability':_0x2b8445(0x30b),'action':_0x2b8445(0x265),'readOnlyHint':!![]}}),_0x5d3dac['add'](_0x2b8445(0xe46),_0x2b8445(0xd6f),async({params:_0x1a723c})=>{const _0x1789ea=_0x2b8445,_0x45d265=_0x23f3f5(_0x519899,_0x1a723c[_0x1789ea(0x30b)]),_0xb80016=await _0x45d265[_0x1789ea(0xd76)]();return{'result':{..._0xb80016,'name':_0x45d265[_0x1789ea(0x1173)]}};},{'id':_0x2b8445(0xe2e),'summary':_0x2b8445(0x29f),'description':'Defragments\x20the\x20LMDB\x20data\x20file\x20in-place:\x20backup(compact:true)\x20→\x20close\x20→\x20replace\x20→\x20reopen.\x20Returns\x20sizeBefore/sizeAfter/saved/savedPct.','tags':[_0x2b8445(0xfcc)],'inputSchema':{'type':_0x2b8445(0xb36),'properties':{'env':{'type':'string','description':_0x2b8445(0xde1)}},'required':['env'],'additionalProperties':![]},'outputSchema':{'type':_0x2b8445(0xb36),'additionalProperties':!![]},'access':{'audiences':['http','shell',_0x2b8445(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x2b8445(0x89b),'scope':{'env':_0x2b8445(0xd46)}},'safety':{'access':_0x2b8445(0x61d),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x2b8445(0x30b),'action':_0x2b8445(0xeb9)}}),_0x5d3dac[_0x2b8445(0x33c)](_0x2b8445(0x929),_0x2b8445(0xb9d),({params:_0x22723a})=>{const _0x3cd9de=_0x2b8445,_0x1da25f=_0x23f3f5(_0x519899,_0x22723a['env']),_0x9b0148=_0x1da25f['db']?.['stat']?.()??{};return{'result':{'name':_0x1da25f[_0x3cd9de(0x1173)],'sync':_0x1da25f[_0x3cd9de(0x745)],'path':_0x1da25f[_0x3cd9de(0x20b)],'compression':_0x1da25f[_0x3cd9de(0x142)][_0x3cd9de(0xcaa)]??null,'mapSize':_0x1da25f['db']?.['env']?.[_0x3cd9de(0x26c)]?.()?.[_0x3cd9de(0xc7)]??null,'pageSize':_0x9b0148[_0x3cd9de(0x3ff)]??null}};},{'id':_0x2b8445(0x14f),'summary':_0x2b8445(0x1214),'description':'Returns\x20the\x20resolved\x20configuration\x20for\x20a\x20named\x20environment.','tags':[_0x2b8445(0xfcc)],'inputSchema':{'type':_0x2b8445(0xb36),'properties':{'env':{'type':_0x2b8445(0xf7a),'description':_0x2b8445(0xde1)}},'required':[_0x2b8445(0x30b)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':['http',_0x2b8445(0xd14),_0x2b8445(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x2b8445(0xa7e),'scope':{'env':_0x2b8445(0xd46)}},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x2b8445(0x11cc)},'mcp':{'capability':'env','action':_0x2b8445(0x1046),'readOnlyHint':!![]}});},envs;}var system,hasRequiredSystem;function requireSystem(){if(hasRequiredSystem)return system;hasRequiredSystem=0x1;const _0x5c7791=require$$1;return system=function _0x41443d({okdb:_0x35583e,http:_0x2fc77e}){const _0xf06265=_0x47ab;_0x2fc77e[_0xf06265(0x33c)](_0xf06265(0x929),_0xf06265(0xb1f),()=>({'result':_0x2fc77e['listRoutes']()}),{'id':_0xf06265(0x2d5),'summary':_0xf06265(0xf41),'description':_0xf06265(0x9b4),'tags':[_0xf06265(0x5dd)],'inputSchema':{'type':_0xf06265(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0xf06265(0xf9d),'items':{'type':_0xf06265(0xb36)}},'access':{'audiences':[_0xf06265(0x9f4),_0xf06265(0xd14),_0xf06265(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0xf06265(0x99b)},'safety':{'access':_0xf06265(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xf06265(0x11cc)},'mcp':null}),_0x2fc77e['add'](_0xf06265(0x929),_0xf06265(0x435),()=>({'result':_0x35583e[_0xf06265(0x26c)]}),{'id':_0xf06265(0xb99),'summary':_0xf06265(0xdb9),'description':_0xf06265(0x1195),'tags':[_0xf06265(0x83e)],'response':{'result':{'clock':0x0,'pageSize':0x1000,'lastPageNumber':0x0,'mapSize':0x0,'plugins':[],'types':{}}},'inputSchema':{'type':_0xf06265(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0xf06265(0xb36),'properties':{'clock':{'type':_0xf06265(0x10f2)},'pageSize':{'type':_0xf06265(0x10f2)},'lastPageNumber':{'type':_0xf06265(0x10f2)},'mapSize':{'type':'integer'},'plugins':{'type':'array','items':{}},'types':{'type':_0xf06265(0xb36)}},'additionalProperties':!![]},'access':{'audiences':[_0xf06265(0x9f4),_0xf06265(0xd14),_0xf06265(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0xf06265(0x99b)},'safety':{'access':_0xf06265(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xf06265(0x11cc)},'mcp':{'action':'system_info','standalone':!![],'readOnlyHint':!![]}}),_0x2fc77e['add'](_0xf06265(0x929),'/api/system/runtime',((()=>{const _0x12a1c4=_0xf06265;let _0xeb6219=process['cpuUsage'](),_0x54e09c=Date[_0x12a1c4(0x555)]();return()=>{const _0xa0c2=_0x12a1c4,_0x401a87=Date[_0xa0c2(0x555)](),_0x10c4e5=process[_0xa0c2(0x400)](),_0x306f70=(_0x401a87-_0x54e09c)*0x3e8,_0x4be3a7=_0x10c4e5[_0xa0c2(0x45b)]-_0xeb6219[_0xa0c2(0x45b)],_0x333ed3=_0x10c4e5[_0xa0c2(0x83e)]-_0xeb6219['system'],_0xca7542=_0x5c7791[_0xa0c2(0xab7)]()[_0xa0c2(0x156)],_0x3f3ae4=_0x4be3a7+_0x333ed3,_0x7b29ce=_0x306f70>0x0?Math[_0xa0c2(0x2dc)](0x64,Math[_0xa0c2(0xc66)](_0x3f3ae4/(_0x306f70*_0xca7542)*0x64)):0x0;_0xeb6219=_0x10c4e5,_0x54e09c=_0x401a87;const _0x426f81=process[_0xa0c2(0x1027)](),_0x4ef19c=_0x5c7791[_0xa0c2(0xab7)]();return{'result':{'process':{'pid':process[_0xa0c2(0x8fc)],'uptime':process[_0xa0c2(0xd04)](),'cpu':{'userUs':_0x4be3a7,'systemUs':_0x333ed3,'pct':_0x7b29ce},'memory':{'rss':_0x426f81[_0xa0c2(0xa4d)],'heapTotal':_0x426f81[_0xa0c2(0x1141)],'heapUsed':_0x426f81[_0xa0c2(0x8f3)],'external':_0x426f81[_0xa0c2(0xcc2)],'arrayBuffers':_0x426f81[_0xa0c2(0xca)]},'node':process[_0xa0c2(0xfdc)][_0xa0c2(0xc9f)],'platform':process[_0xa0c2(0x578)]},'os':{'platform':_0x5c7791['platform'](),'arch':_0x5c7791['arch'](),'release':_0x5c7791[_0xa0c2(0xc8c)](),'hostname':_0x5c7791[_0xa0c2(0x73b)](),'totalMemory':_0x5c7791[_0xa0c2(0x76b)](),'freeMemory':_0x5c7791[_0xa0c2(0x1194)](),'loadAvg':_0x5c7791[_0xa0c2(0x1b6)](),'cpuCount':_0x4ef19c[_0xa0c2(0x156)],'cpuModel':_0x4ef19c[0x0]?.[_0xa0c2(0x7d4)]??null}}};};})()),{'id':'system_runtime','summary':_0xf06265(0x1a7),'description':_0xf06265(0x212),'tags':[_0xf06265(0x83e)],'inputSchema':{'type':_0xf06265(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0xf06265(0xb36),'properties':{'process':{'type':_0xf06265(0xb36)},'os':{'type':_0xf06265(0xb36)}},'additionalProperties':!![]},'access':{'audiences':[_0xf06265(0x9f4),_0xf06265(0xd14),_0xf06265(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'system:read'},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xf06265(0x11cc)},'mcp':{'action':_0xf06265(0x6d8),'standalone':!![],'readOnlyHint':!![]}}),_0x2fc77e[_0xf06265(0x33c)]('GET','/api/meta',()=>({'result':_0x35583e[_0xf06265(0x654)]['meta']()}),{'id':'system_meta','summary':_0xf06265(0x91f),'description':_0xf06265(0x87e),'tags':['system'],'inputSchema':{'type':_0xf06265(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0xf06265(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0xf06265(0x9f4),'shell',_0xf06265(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0xf06265(0x99b)},'safety':{'access':_0xf06265(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'action':_0xf06265(0x1056),'standalone':!![],'readOnlyHint':!![]}}),_0x2fc77e[_0xf06265(0x33c)]('GET','/api/system/metrics',()=>({'result':_0x35583e['http'][_0xf06265(0x688)][_0xf06265(0xd72)]()}),{'id':_0xf06265(0x54b),'summary':'API\x20performance\x20metrics','description':_0xf06265(0x884),'tags':[_0xf06265(0x83e)],'inputSchema':{'type':_0xf06265(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0xf06265(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0xf06265(0x9f4),_0xf06265(0xd14),_0xf06265(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0xf06265(0x99b)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xf06265(0x11cc)},'mcp':{'action':_0xf06265(0x54b),'standalone':!![],'readOnlyHint':!![]}}),_0x2fc77e['add'](_0xf06265(0x929),_0xf06265(0x1a8),_0x352449=>{const _0x12ce46=_0xf06265,{level:_0x402d4f,feature:_0x2749dd,node:_0x479975,from:_0x13f276,to:_0x554f09,limit:_0x44fb74,cursor:_0x2d236b}=_0x352449[_0x12ce46(0xa28)],_0x4948e8=_0x402d4f?_0x402d4f[_0x12ce46(0xfb1)](',')[_0x12ce46(0x1166)](_0x410858=>_0x410858['trim']()):null,_0x1f0fc5=_0x2749dd?_0x2749dd[_0x12ce46(0xfb1)](',')[_0x12ce46(0x1166)](_0x168914=>_0x168914['trim']()):null,_0x4974b5=_0x13f276?parseInt(_0x13f276,0xa):0x0,_0x161e41=_0x554f09?parseInt(_0x554f09,0xa):Date['now'](),_0x1212db=Math['min'](parseInt(_0x44fb74,0xa)||0x32,0xc8),_0x244a4a=_0x2d236b?parseInt(_0x2d236b,0xa):null,_0x437ab2=Array['from'](_0x35583e['_logEnv'][_0x12ce46(0x9ce)](_0x12ce46(0xd2e),['ts'],{'min':_0x4974b5,'max':_0x161e41})),_0x588ec7=_0x437ab2[_0x12ce46(0x1166)](_0x395624=>({'key':_0x395624[_0x12ce46(0x9dd)],..._0x395624['value']||_0x395624})),_0x1a8ae6=_0x588ec7[_0x12ce46(0x1103)](_0x5f3859=>{const _0x44a8fa=_0x12ce46;if(_0x244a4a!==null&&_0x5f3859['ts']>=_0x244a4a)return![];if(_0x4948e8&&!_0x4948e8[_0x44a8fa(0x29c)](_0x5f3859[_0x44a8fa(0x10b6)]))return![];if(_0x1f0fc5&&!_0x1f0fc5[_0x44a8fa(0x29c)](_0x5f3859[_0x44a8fa(0x19e)]))return![];if(_0x479975&&_0x5f3859[_0x44a8fa(0xc9f)]!==_0x479975)return![];return!![];})[_0x12ce46(0x3f6)]((_0x7cf290,_0x231862)=>_0x231862['ts']-_0x7cf290['ts']),_0x5cc018=_0x1a8ae6[_0x12ce46(0xc3c)](0x0,_0x1212db),_0xfa4cdd=_0x5cc018['length']>=_0x1212db&&_0x5cc018[_0x12ce46(0x156)]>0x0?_0x5cc018[_0x5cc018[_0x12ce46(0x156)]-0x1]['ts']:null;return{'result':{'entries':_0x5cc018['map'](_0xcbb583=>({'key':_0xcbb583[_0x12ce46(0x9dd)],'ts':_0xcbb583['ts'],'level':_0xcbb583[_0x12ce46(0x10b6)],'msg':_0xcbb583['msg'],'feature':_0xcbb583[_0x12ce46(0x19e)],'node':_0xcbb583['node'],'context':_0xcbb583['context']})),'next_cursor':_0xfa4cdd}};},{'id':'system_logs','summary':_0xf06265(0xa04),'description':_0xf06265(0x45d),'tags':[_0xf06265(0x83e)],'inputSchema':{'type':_0xf06265(0xb36),'properties':{},'additionalProperties':![]},'querySchema':{'level':{'type':_0xf06265(0xf7a),'description':'Comma-separated\x20log\x20levels\x20(info,\x20warn,\x20error,\x20debug)'},'feature':{'type':_0xf06265(0xf7a),'description':_0xf06265(0x2c1)},'node':{'type':_0xf06265(0xf7a),'description':_0xf06265(0x107d)},'from':{'type':_0xf06265(0xf7a),'description':_0xf06265(0xdd6)},'to':{'type':_0xf06265(0xf7a),'description':'End\x20timestamp\x20in\x20milliseconds\x20(default:\x20now)'},'limit':{'type':'string','description':_0xf06265(0x27f)},'cursor':{'type':_0xf06265(0xf7a),'description':'Last\x20ts\x20from\x20previous\x20page\x20for\x20pagination'}},'outputSchema':{'type':_0xf06265(0xb36),'properties':{'entries':{'type':_0xf06265(0xf9d),'items':{'type':_0xf06265(0xb36),'properties':{'key':{'type':_0xf06265(0xf7a)},'ts':{'type':_0xf06265(0x9f0)},'level':{'type':'string'},'msg':{'type':_0xf06265(0xf7a)},'feature':{'type':'string'},'node':{'type':_0xf06265(0xf7a)},'context':{}}}},'next_cursor':{'type':[_0xf06265(0x9f0),_0xf06265(0x11e)]}},'additionalProperties':![]},'access':{'audiences':[_0xf06265(0x9f4),_0xf06265(0xd14),_0xf06265(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0xf06265(0x99b)},'safety':{'access':_0xf06265(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'action':_0xf06265(0xb9b),'standalone':!![],'readOnlyHint':!![]}}),_0x2fc77e[_0xf06265(0x33c)](_0xf06265(0xe46),_0xf06265(0x48f),({body:_0x4a0d11})=>{const _0x3be9b6=_0xf06265,{msg:msg='test\x20log\x20entry',feature:_0x2e9391=_0x3be9b6(0xe10)}=_0x4a0d11??{};return _0x35583e[_0x3be9b6(0x9be)][_0x3be9b6(0xd9b)]({'feature':_0x2e9391})[_0x3be9b6(0xf78)](msg),{'ok':!![]};},{'id':_0xf06265(0x1c9),'tags':[_0xf06265(0x83e)],'summary':_0xf06265(0x290),'inputSchema':{'type':_0xf06265(0xb36),'properties':{'msg':{'type':_0xf06265(0xf7a)},'feature':{'type':_0xf06265(0xf7a)}},'additionalProperties':![]},'access':{'audiences':[_0xf06265(0x9f4)],'authRequired':![],'internalOnly':![],'permission':_0xf06265(0x99b)},'safety':{'access':_0xf06265(0x717),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xf06265(0xcd7)}});},system;}var functionsTemplates,hasRequiredFunctionsTemplates;function requireFunctionsTemplates(){const _0x55f505=_0xef8cd8;if(hasRequiredFunctionsTemplates)return functionsTemplates;hasRequiredFunctionsTemplates=0x1;const _0x136623=[{'name':'default','description':_0x55f505(0x3ae),'notes':[_0x55f505(0xdf4),_0x55f505(0xd2c),_0x55f505(0x8c0)],'source':_0x55f505(0x88f)},{'name':_0x55f505(0xddc),'description':_0x55f505(0x6a7),'notes':[_0x55f505(0x841),_0x55f505(0xfb8)],'source':_0x55f505(0xfd0)},{'name':_0x55f505(0xa28),'description':_0x55f505(0x958),'notes':[_0x55f505(0x557),_0x55f505(0xf15)],'source':'async\x20(ctx)\x20=>\x20{\x0a\x20\x20const\x20type\x20=\x20ctx.payload?.type\x20??\x20\x27items\x27\x0a\x20\x20const\x20limit\x20=\x20ctx.payload?.limit\x20??\x2050\x0a\x20\x20const\x20results\x20=\x20[]\x0a\x0a\x20\x20for\x20(const\x20{\x20key,\x20value\x20}\x20of\x20ctx.env.getRange(type,\x20{\x20limit\x20}))\x20{\x0a\x20\x20\x20\x20results.push({\x20key,\x20value\x20})\x0a\x20\x20}\x0a\x0a\x20\x20return\x20{\x20count:\x20results.length,\x20results\x20}\x0a}'},{'name':_0x55f505(0xc0),'description':'Read\x20records,\x20transform\x20them,\x20and\x20write\x20back\x20in\x20a\x20transaction.','notes':['combine\x20getRange\x20+\x20txn\x20for\x20read-modify-write',_0x55f505(0x16a)],'source':_0x55f505(0x2fa)}];return functionsTemplates=_0x136623,functionsTemplates;}var functionsRegistry,hasRequiredFunctionsRegistry;function requireFunctionsRegistry(){if(hasRequiredFunctionsRegistry)return functionsRegistry;hasRequiredFunctionsRegistry=0x1;const {resolveEnv:_0x3db7b3}=require_helpers(),_0x89302e=requireFunctionsTemplates();return functionsRegistry=function _0x9c8742({okdb:_0x5455bf,http:_0x11b18f,E:_0x190ed3,defaultEnvName:_0x346e60}){const _0xd55049=_0x47ab;_0x11b18f[_0xd55049(0x33c)](_0xd55049(0x929),_0xd55049(0x10e7),async()=>({'result':await _0x5455bf[_0xd55049(0x705)][_0xd55049(0x63e)]()}),{'id':_0xd55049(0xe9d),'summary':_0xd55049(0xae1),'description':_0xd55049(0x122),'tags':['functions'],'inputSchema':{'type':'object','properties':{},'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0xd55049(0xb36)}},'access':{'audiences':['http',_0xd55049(0xd14)],'authRequired':!![],'internalOnly':![],'permission':'functions:read'},'safety':{'access':_0xd55049(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'include':![]}}),_0x11b18f[_0xd55049(0x33c)](_0xd55049(0xe46),'/api/functions',async({body:_0x38103d})=>({'result':await _0x5455bf[_0xd55049(0x705)][_0xd55049(0x725)](_0x38103d||{})}),{'id':_0xd55049(0x98),'summary':_0xd55049(0x5f4),'description':_0xd55049(0xd61),'tags':[_0xd55049(0x705)],'inputSchema':{'type':_0xd55049(0xb36),'properties':{'name':{'type':_0xd55049(0xf7a),'description':'Function\x20name'},'source':{'type':_0xd55049(0xf7a),'description':'Arrow\x20function\x20source\x20code'},'unsafe':{'type':['boolean',_0xd55049(0x11e)],'description':'Dangerous:\x20grants\x20the\x20function\x20unrestricted\x20read/write\x20access\x20to\x20ALL\x20environments\x20via\x20ctx.okdb\x20(bypasses\x20the\x20per-env\x20scope).\x20Use\x20only\x20when\x20cross-env\x20orchestration\x20is\x20genuinely\x20required.'},'metadata':{'type':[_0xd55049(0xb36),_0xd55049(0x11e)],'additionalProperties':!![]},'enabled':{'type':[_0xd55049(0x854),_0xd55049(0x11e)]},'runtime':{'type':[_0xd55049(0xb36),_0xd55049(0x11e)],'additionalProperties':!![]}},'required':[_0xd55049(0x1173),'source'],'additionalProperties':![]},'outputSchema':{'type':_0xd55049(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0xd55049(0xd14)],'authRequired':!![],'internalOnly':![],'permission':_0xd55049(0x9ba)},'safety':{'access':_0xd55049(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'include':![]}}),_0x11b18f[_0xd55049(0x33c)](_0xd55049(0x929),_0xd55049(0x791)+_0x190ed3+_0xd55049(0x707),async({params:_0x36b00b})=>({'result':await _0x3db7b3(_0x5455bf,_0x36b00b[_0xd55049(0x30b)])[_0xd55049(0x705)][_0xd55049(0x63e)]()}),{'id':_0xd55049(0xc4e),'summary':'List\x20functions','description':_0xd55049(0xac5),'tags':[_0xd55049(0x705)],'inputSchema':{'type':_0xd55049(0xb36),'properties':{'env':{'type':_0xd55049(0xf7a),'default':_0x346e60,'description':_0xd55049(0xde1)}},'additionalProperties':![]},'outputSchema':{'type':_0xd55049(0xf9d),'items':{'type':_0xd55049(0xb36)}},'access':{'audiences':['http',_0xd55049(0xd14),_0xd55049(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0xd55049(0x434),'scope':_0xd55049(0x30b)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xd55049(0x11cc)},'mcp':{'capability':_0xd55049(0x63b),'action':_0xd55049(0x133),'readOnlyHint':!![]}}),_0x11b18f[_0xd55049(0x33c)]('GET',_0xd55049(0x791)+_0x190ed3+_0xd55049(0x7a3),({query:_0x46edce})=>{const _0x3c2fd6=_0xd55049,_0xd3da01=_0x46edce?.[_0x3c2fd6(0xa66)]??_0x46edce?.[_0x3c2fd6(0x1173)]??'default',_0x2f9890=_0x89302e[_0x3c2fd6(0xbdd)](_0x273b33=>_0x273b33[_0x3c2fd6(0x1173)]===_0xd3da01);if(!_0x2f9890){const _0x422321=_0x89302e['map'](_0x5bd058=>_0x5bd058[_0x3c2fd6(0x1173)])[_0x3c2fd6(0x3d9)](',\x20');return{'status':0x190,'error':'Unknown\x20template:\x20\x22'+_0xd3da01+'\x22.\x20Available:\x20'+_0x422321};}return{'result':_0x2f9890};},{'id':_0xd55049(0x1222),'summary':_0xd55049(0x599),'description':_0xd55049(0x11b5)+_0x89302e['map'](_0x8a84cf=>_0x8a84cf[_0xd55049(0x1173)])[_0xd55049(0x3d9)](',\x20')+'.','tags':['functions'],'inputSchema':{'type':'object','properties':{'env':{'type':'string','default':_0x346e60,'description':_0xd55049(0xde1)},'template':{'type':_0xd55049(0xf7a),'enum':_0x89302e[_0xd55049(0x1166)](_0x1d2ceb=>_0x1d2ceb['name']),'default':_0xd55049(0x8d0),'description':_0xd55049(0x391)},'name':{'type':'string','description':_0xd55049(0x2d4)}},'additionalProperties':![]},'outputSchema':{'type':_0xd55049(0xb36),'properties':{'name':{'type':_0xd55049(0xf7a)},'description':{'type':'string'},'source':{'type':_0xd55049(0xf7a)},'notes':{'type':_0xd55049(0xf9d),'items':{'type':_0xd55049(0xf7a)}}}},'access':{'audiences':['http',_0xd55049(0xd14),_0xd55049(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0xd55049(0x434),'scope':_0xd55049(0x30b)},'safety':{'access':_0xd55049(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none','querySchema':{'template':{'type':_0xd55049(0xf7a),'default':_0xd55049(0x8d0)},'name':{'type':'string','default':'default'}}},'mcp':{'capability':_0xd55049(0x63b),'action':_0xd55049(0x46e),'readOnlyHint':!![]}}),_0x11b18f[_0xd55049(0x33c)](_0xd55049(0xe46),_0xd55049(0x791)+_0x190ed3+_0xd55049(0x707),async({params:_0x17f312,body:_0x45529a})=>({'result':await _0x3db7b3(_0x5455bf,_0x17f312[_0xd55049(0x30b)])[_0xd55049(0x705)]['create'](_0x45529a||{})}),{'id':_0xd55049(0xcb6),'summary':_0xd55049(0x13b),'description':'Registers\x20a\x20new\x20stored\x20function.\x20Set\x20unsafe:\x20true\x20to\x20grant\x20ctx.okdb\x20cross-environment\x20access.','tags':[_0xd55049(0x705)],'inputSchema':{'type':_0xd55049(0xb36),'properties':{'env':{'type':_0xd55049(0xf7a),'default':_0x346e60,'description':'Environment\x20name'},'name':{'type':'string','description':_0xd55049(0xb6)},'source':{'type':_0xd55049(0xf7a),'description':_0xd55049(0xc60)},'unsafe':{'type':[_0xd55049(0x854),_0xd55049(0x11e)],'description':_0xd55049(0x38f)},'metadata':{'type':[_0xd55049(0xb36),_0xd55049(0x11e)],'additionalProperties':!![]},'enabled':{'type':['boolean',_0xd55049(0x11e)]},'runtime':{'type':[_0xd55049(0xb36),_0xd55049(0x11e)],'additionalProperties':!![]}},'required':['name',_0xd55049(0x1091)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0xd55049(0x9f4),'shell',_0xd55049(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0xd55049(0x9ba),'scope':_0xd55049(0x30b)},'safety':{'access':'write','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xd55049(0xcd7)},'mcp':{'capability':_0xd55049(0x63b),'action':_0xd55049(0xb6c)}}),_0x11b18f[_0xd55049(0x33c)]('GET','/api/functions/:name',async({params:_0x280f3f})=>({'result':await _0x5455bf['functions'][_0xd55049(0xbeb)](_0x280f3f['name'])}),{'id':_0xd55049(0x985),'summary':_0xd55049(0x76a),'description':_0xd55049(0x3c9),'tags':[_0xd55049(0x705)],'inputSchema':{'type':'object','properties':{'name':{'type':_0xd55049(0xf7a),'description':_0xd55049(0xb6)}},'required':[_0xd55049(0x1173)],'additionalProperties':![]},'outputSchema':{'type':['object',_0xd55049(0x11e)],'additionalProperties':!![]},'access':{'audiences':['http',_0xd55049(0xd14),_0xd55049(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'functions:read'},'safety':{'access':_0xd55049(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xd55049(0x11cc)},'mcp':{'include':!![],'capability':'function','action':_0xd55049(0x10ad),'tool':_0xd55049(0xbf6)}}),_0x11b18f[_0xd55049(0x33c)](_0xd55049(0x719),'/api/functions/:name',async({params:_0x2aa099,body:_0x3066fb})=>({'result':await _0x5455bf[_0xd55049(0x705)][_0xd55049(0xbb7)](_0x2aa099[_0xd55049(0x1173)],_0x3066fb||{})}),{'id':_0xd55049(0x660),'summary':_0xd55049(0x845),'description':_0xd55049(0x625),'tags':[_0xd55049(0x705)],'inputSchema':{'type':_0xd55049(0xb36),'properties':{'name':{'type':_0xd55049(0xf7a),'description':_0xd55049(0xb6)},'source':{'type':[_0xd55049(0xf7a),_0xd55049(0x11e)],'description':_0xd55049(0x110c)},'unsafe':{'type':[_0xd55049(0x854),'null'],'description':'Dangerous:\x20grants\x20the\x20function\x20unrestricted\x20read/write\x20access\x20to\x20ALL\x20environments\x20via\x20ctx.okdb\x20(bypasses\x20the\x20per-env\x20scope).\x20Use\x20only\x20when\x20cross-env\x20orchestration\x20is\x20genuinely\x20required.'},'metadata':{'type':[_0xd55049(0xb36),_0xd55049(0x11e)],'additionalProperties':!![]},'enabled':{'type':[_0xd55049(0x854),_0xd55049(0x11e)]},'runtime':{'type':[_0xd55049(0xb36),_0xd55049(0x11e)],'additionalProperties':!![]}},'required':[_0xd55049(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0xd55049(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0xd55049(0xd14),_0xd55049(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0xd55049(0x9ba)},'safety':{'access':_0xd55049(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xd55049(0xcd7)},'mcp':{'capability':_0xd55049(0x63b),'action':_0xd55049(0xf92)}}),_0x11b18f[_0xd55049(0x33c)](_0xd55049(0x42f),_0xd55049(0xfe1),async({params:_0x1beec1})=>{const _0x3bb6ce=_0xd55049,_0x3931f6=await _0x5455bf[_0x3bb6ce(0x705)][_0x3bb6ce(0x21e)](_0x1beec1[_0x3bb6ce(0x1173)]);return _0x3931f6?{'status':0xcc}:{'status':0x194,'error':_0x3bb6ce(0xe41)};},{'id':'function_delete_global','summary':_0xd55049(0xb45),'description':'Deletes\x20a\x20stored\x20global\x20(system)\x20function\x20by\x20name.','tags':[_0xd55049(0x705)],'inputSchema':{'type':_0xd55049(0xb36),'properties':{'name':{'type':_0xd55049(0xf7a),'description':_0xd55049(0xb6)}},'required':[_0xd55049(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0xd55049(0x11e)},'access':{'audiences':['http','shell',_0xd55049(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'functions:write'},'safety':{'access':'write','destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':'function','action':_0xd55049(0xbbb)}}),_0x11b18f[_0xd55049(0x33c)](_0xd55049(0x929),'/api'+_0x190ed3+_0xd55049(0x115d),async({params:_0x31711d})=>({'result':await _0x3db7b3(_0x5455bf,_0x31711d[_0xd55049(0x30b)])[_0xd55049(0x705)][_0xd55049(0xbeb)](_0x31711d['name'])}),{'id':_0xd55049(0x4ff),'summary':_0xd55049(0x6db),'description':_0xd55049(0x899),'tags':[_0xd55049(0x705)],'inputSchema':{'type':_0xd55049(0xb36),'properties':{'env':{'type':_0xd55049(0xf7a),'default':_0x346e60,'description':'Environment\x20name'},'name':{'type':_0xd55049(0xf7a),'description':_0xd55049(0xb6)}},'required':[_0xd55049(0x1173)],'additionalProperties':![]},'outputSchema':{'type':['object',_0xd55049(0x11e)],'additionalProperties':!![]},'access':{'audiences':[_0xd55049(0x9f4),_0xd55049(0xd14),_0xd55049(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0xd55049(0x434),'scope':_0xd55049(0x30b)},'safety':{'access':_0xd55049(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xd55049(0x11cc)},'mcp':{'capability':'function','action':_0xd55049(0x105f),'readOnlyHint':!![]}}),_0x11b18f[_0xd55049(0x33c)](_0xd55049(0x719),_0xd55049(0x791)+_0x190ed3+_0xd55049(0x115d),async({params:_0xc632b0,body:_0x1d5d7a})=>({'result':await _0x3db7b3(_0x5455bf,_0xc632b0[_0xd55049(0x30b)])[_0xd55049(0x705)][_0xd55049(0xbb7)](_0xc632b0['name'],_0x1d5d7a||{})}),{'id':_0xd55049(0x839),'summary':_0xd55049(0x1040),'description':'Updates\x20a\x20stored\x20function\x20definition\x20and\x20metadata.','tags':['functions'],'inputSchema':{'type':_0xd55049(0xb36),'properties':{'env':{'type':_0xd55049(0xf7a),'default':_0x346e60,'description':_0xd55049(0xde1)},'name':{'type':_0xd55049(0xf7a),'description':_0xd55049(0xb6)},'source':{'type':['string',_0xd55049(0x11e)],'description':_0xd55049(0x110c)},'unsafe':{'type':[_0xd55049(0x854),_0xd55049(0x11e)],'description':_0xd55049(0x38f)},'metadata':{'type':[_0xd55049(0xb36),_0xd55049(0x11e)],'additionalProperties':!![]},'enabled':{'type':[_0xd55049(0x854),_0xd55049(0x11e)]},'runtime':{'type':['object',_0xd55049(0x11e)],'additionalProperties':!![]}},'required':[_0xd55049(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0xd55049(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0xd55049(0x9f4),'shell',_0xd55049(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0xd55049(0x9ba),'scope':'env'},'safety':{'access':_0xd55049(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xd55049(0xcd7)},'mcp':{'capability':_0xd55049(0x63b),'action':_0xd55049(0x8ea)}}),_0x11b18f['add'](_0xd55049(0x42f),_0xd55049(0x791)+_0x190ed3+'/functions/:name',async({params:_0x8b11cc})=>{const _0x5a2bbb=_0xd55049,_0x1c5551=await _0x3db7b3(_0x5455bf,_0x8b11cc[_0x5a2bbb(0x30b)])[_0x5a2bbb(0x705)][_0x5a2bbb(0x21e)](_0x8b11cc[_0x5a2bbb(0x1173)]);return _0x1c5551?{'status':0xcc}:{'status':0x194,'error':'Function\x20not\x20found'};},{'id':_0xd55049(0x4a4),'summary':_0xd55049(0x366),'description':_0xd55049(0x420),'tags':[_0xd55049(0x705)],'inputSchema':{'type':'object','properties':{'env':{'type':_0xd55049(0xf7a),'default':_0x346e60,'description':_0xd55049(0xde1)},'name':{'type':_0xd55049(0xf7a),'description':_0xd55049(0xb6)}},'required':[_0xd55049(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0xd55049(0x11e)},'access':{'audiences':[_0xd55049(0x9f4),_0xd55049(0xd14),_0xd55049(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'functions:write','scope':_0xd55049(0x30b)},'safety':{'access':_0xd55049(0x61d),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0xd55049(0x11cc)},'mcp':{'capability':_0xd55049(0x63b),'action':_0xd55049(0x58a)}});},functionsRegistry;}var functionsExec,hasRequiredFunctionsExec;function requireFunctionsExec(){if(hasRequiredFunctionsExec)return functionsExec;hasRequiredFunctionsExec=0x1;const {validateFunctionSource:_0x35e682,validateFunctionCtxApi:_0x489dc8}=requireOkdbFunctionsValidate(),{resolveEnv:_0x369988}=require_helpers(),_0x2a33a6=requireFunctionsTemplates();return functionsExec=function _0x3c7216({okdb:_0x44ce2b,http:_0x54aff2,E:_0x5483e1,defaultEnvName:_0x3749f2}){const _0x9c4800=_0x47ab;_0x54aff2[_0x9c4800(0x33c)](_0x9c4800(0xe46),_0x9c4800(0x68a),async({params:_0xb8bdd3,body:_0x47757d})=>{const _0x36d21b=_0x9c4800;try{return{'result':await _0x369988(_0x44ce2b,_0xb8bdd3[_0x36d21b(0x30b)])['functions'][_0x36d21b(0x110b)](_0xb8bdd3[_0x36d21b(0x1173)],_0x47757d?.[_0x36d21b(0x3c3)]??_0x47757d??null,{'trigger':_0x36d21b(0x9f4),'dryRun':_0x47757d?.[_0x36d21b(0xc56)]===!![]})};}catch(_0x519dad){if(_0x519dad['_runRecord'])return{'result':{..._0x519dad[_0x36d21b(0x8e3)],'hints':{'templates':_0x2a33a6}}};throw _0x519dad;}},{'id':_0x9c4800(0x79d),'summary':_0x9c4800(0xf16),'description':_0x9c4800(0x15c),'tags':[_0x9c4800(0x705)],'inputSchema':{'type':_0x9c4800(0xb36),'properties':{'env':{'type':_0x9c4800(0xf7a),'default':_0x3749f2,'description':_0x9c4800(0xde1)},'name':{'type':_0x9c4800(0xf7a),'description':_0x9c4800(0xb6)},'payload':{}},'required':['name'],'additionalProperties':!![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x9c4800(0x9f4),_0x9c4800(0xd14),_0x9c4800(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c4800(0x919),'scope':_0x9c4800(0x30b)},'safety':{'access':'write','destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x9c4800(0x11fb)},'mcp':{'include':!![],'capability':_0x9c4800(0x2db),'action':'run_function'}}),_0x54aff2[_0x9c4800(0x33c)](_0x9c4800(0xe46),_0x9c4800(0x791)+_0x5483e1+_0x9c4800(0xcb8),async({params:_0x4dfdf5,body:_0x24def6})=>{const _0x58585c=_0x9c4800;try{return{'result':await _0x369988(_0x44ce2b,_0x4dfdf5[_0x58585c(0x30b)])[_0x58585c(0x705)][_0x58585c(0x110b)](_0x4dfdf5[_0x58585c(0x1173)],_0x24def6?.[_0x58585c(0x3c3)]??_0x24def6??null,{'trigger':_0x58585c(0x9f4),'dryRun':_0x24def6?.['dryRun']===!![]})};}catch(_0x3bd135){if(_0x3bd135[_0x58585c(0x8e3)])return{'result':{..._0x3bd135['_runRecord'],'hints':{'templates':_0x2a33a6}}};throw _0x3bd135;}},{'id':_0x9c4800(0x2db),'summary':_0x9c4800(0x99c),'description':'Executes\x20a\x20stored\x20function\x20with\x20an\x20optional\x20payload.','tags':['functions'],'inputSchema':{'type':_0x9c4800(0xb36),'properties':{'env':{'type':_0x9c4800(0xf7a),'default':_0x3749f2,'description':'Environment\x20name'},'name':{'type':_0x9c4800(0xf7a),'description':_0x9c4800(0xb6)},'payload':{}},'required':['name'],'additionalProperties':!![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':['http',_0x9c4800(0xd14),_0x9c4800(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c4800(0x919),'scope':_0x9c4800(0x30b)},'safety':{'access':_0x9c4800(0x61d),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x9c4800(0x11fb)},'mcp':{'capability':_0x9c4800(0x63b),'action':'run_function'}}),_0x54aff2[_0x9c4800(0x33c)](_0x9c4800(0xe46),_0x9c4800(0x8c5),async({body:_0x457fda})=>{const _0x29de55=_0x9c4800;try{return{'result':await _0x44ce2b['functions'][_0x29de55(0x763)]({'name':_0x457fda?.[_0x29de55(0x1173)]||_0x29de55(0xaf1),'source':_0x457fda?.[_0x29de55(0x1091)],'unsafe':_0x457fda?.[_0x29de55(0x74d)],'metadata':_0x457fda?.['metadata']||{},'enabled':_0x457fda?.[_0x29de55(0x951)]!==![],'runtime':_0x457fda?.[_0x29de55(0x9de)]},_0x457fda?.['payload']??null,{'trigger':_0x29de55(0xc32),'functionName':_0x457fda?.[_0x29de55(0x1173)]||_0x29de55(0xaf1),'dryRun':_0x457fda?.[_0x29de55(0xc56)]===!![],'jobContext':_0x457fda?.[_0x29de55(0xa6a)]??null,'processorContext':_0x457fda?.[_0x29de55(0x700)]??null,'materializerContext':_0x457fda?.[_0x29de55(0x385)]??null})};}catch(_0x10f044){if(_0x10f044[_0x29de55(0x8e3)])return{'result':{..._0x10f044[_0x29de55(0x8e3)],'hints':{'templates':_0x2a33a6}}};if(_0x10f044?.[_0x29de55(0x1f8)]?.[_0x29de55(0x8ba)](_0x29de55(0x848))||!_0x10f044?.[_0x29de55(0x1f8)])return{'result':{'status':_0x10f044?.[_0x29de55(0x1f8)]==='FUNCTION_TIMEOUT'?_0x29de55(0x44f):_0x29de55(0x225),'error':{'message':_0x10f044[_0x29de55(0xb4e)],'code':_0x10f044[_0x29de55(0x1f8)]||null},'hints':{'templates':_0x2a33a6}}};throw _0x10f044;}},{'id':_0x9c4800(0x577),'summary':_0x9c4800(0x6e8),'description':'Runs\x20an\x20unsaved\x20global\x20function\x20draft\x20in\x20the\x20sandbox\x20without\x20persisting\x20the\x20function\x20definition.','tags':[_0x9c4800(0x705)],'inputSchema':{'type':_0x9c4800(0xb36),'properties':{'name':{'type':[_0x9c4800(0xf7a),_0x9c4800(0x11e)],'description':_0x9c4800(0x71a)},'source':{'type':_0x9c4800(0xf7a),'description':_0x9c4800(0xc60)},'unsafe':{'type':['boolean',_0x9c4800(0x11e)],'description':_0x9c4800(0x38f)},'metadata':{'type':['object',_0x9c4800(0x11e)],'additionalProperties':!![]},'enabled':{'type':[_0x9c4800(0x854),_0x9c4800(0x11e)]},'runtime':{'type':['object',_0x9c4800(0x11e)],'additionalProperties':!![]},'payload':{},'dryRun':{'type':[_0x9c4800(0x854),'null'],'description':_0x9c4800(0xbe0)},'jobContext':{'type':[_0x9c4800(0xb36),_0x9c4800(0x11e)],'additionalProperties':!![],'description':_0x9c4800(0xb71)},'processorContext':{'type':[_0x9c4800(0xb36),_0x9c4800(0x11e)],'additionalProperties':!![],'description':'Optional\x20processor\x20context\x20for\x20ctx.processor\x20in\x20processor-engine\x20previews.'},'materializerContext':{'type':[_0x9c4800(0xb36),'null'],'additionalProperties':!![],'description':_0x9c4800(0x602)}},'required':[_0x9c4800(0x1091)],'additionalProperties':![]},'outputSchema':{'type':_0x9c4800(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c4800(0x9f4),_0x9c4800(0xd14)],'authRequired':!![],'internalOnly':![],'permission':_0x9c4800(0x919)},'safety':{'access':_0x9c4800(0x61d),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x9c4800(0xcd7)},'mcp':{'include':![]}}),_0x54aff2[_0x9c4800(0x33c)]('POST','/api'+_0x5483e1+'/functions/preview',async({params:_0x532a34,body:_0x38ee2f})=>{const _0x55e117=_0x9c4800;try{return{'result':await _0x369988(_0x44ce2b,_0x532a34[_0x55e117(0x30b)])[_0x55e117(0x705)][_0x55e117(0x763)]({'name':_0x38ee2f?.[_0x55e117(0x1173)]||_0x55e117(0xaf1),'source':_0x38ee2f?.['source'],'unsafe':_0x38ee2f?.['unsafe'],'metadata':_0x38ee2f?.[_0x55e117(0x670)]||{},'enabled':_0x38ee2f?.[_0x55e117(0x951)]!==![],'runtime':_0x38ee2f?.[_0x55e117(0x9de)]},_0x38ee2f?.[_0x55e117(0x3c3)]??null,{'trigger':_0x55e117(0xc32),'functionName':_0x38ee2f?.[_0x55e117(0x1173)]||_0x55e117(0xaf1),'dryRun':_0x38ee2f?.[_0x55e117(0xc56)]===!![],'jobContext':_0x38ee2f?.['jobContext']??null,'processorContext':_0x38ee2f?.[_0x55e117(0x700)]??null,'materializerContext':_0x38ee2f?.[_0x55e117(0x385)]??null})};}catch(_0x3cc659){if(_0x3cc659[_0x55e117(0x8e3)])return{'result':{..._0x3cc659[_0x55e117(0x8e3)],'hints':{'templates':_0x2a33a6}}};if(_0x3cc659?.[_0x55e117(0x1f8)]?.[_0x55e117(0x8ba)](_0x55e117(0x848))||!_0x3cc659?.[_0x55e117(0x1f8)])return{'result':{'status':_0x3cc659?.[_0x55e117(0x1f8)]===_0x55e117(0xa8a)?_0x55e117(0x44f):_0x55e117(0x225),'error':{'message':_0x3cc659[_0x55e117(0xb4e)],'code':_0x3cc659[_0x55e117(0x1f8)]||null},'hints':{'templates':_0x2a33a6}}};throw _0x3cc659;}},{'id':'function_preview','summary':_0x9c4800(0x123e),'description':_0x9c4800(0x492),'tags':[_0x9c4800(0x705)],'inputSchema':{'type':_0x9c4800(0xb36),'properties':{'env':{'type':'string','default':_0x3749f2,'description':_0x9c4800(0xde1)},'name':{'type':[_0x9c4800(0xf7a),_0x9c4800(0x11e)],'description':'Draft\x20function\x20name\x20override'},'source':{'type':_0x9c4800(0xf7a),'description':_0x9c4800(0xc60)},'unsafe':{'type':[_0x9c4800(0x854),'null'],'description':_0x9c4800(0x38f)},'metadata':{'type':[_0x9c4800(0xb36),_0x9c4800(0x11e)],'additionalProperties':!![]},'enabled':{'type':['boolean',_0x9c4800(0x11e)]},'runtime':{'type':['object','null'],'additionalProperties':!![]},'payload':{},'dryRun':{'type':[_0x9c4800(0x854),'null'],'description':_0x9c4800(0xbe0)},'jobContext':{'type':[_0x9c4800(0xb36),_0x9c4800(0x11e)],'additionalProperties':!![],'description':_0x9c4800(0xb71)},'processorContext':{'type':[_0x9c4800(0xb36),_0x9c4800(0x11e)],'additionalProperties':!![],'description':'Optional\x20processor\x20context\x20for\x20ctx.processor\x20in\x20processor-engine\x20previews.'},'materializerContext':{'type':['object',_0x9c4800(0x11e)],'additionalProperties':!![],'description':_0x9c4800(0x602)}},'required':['source'],'additionalProperties':![]},'outputSchema':{'type':_0x9c4800(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c4800(0x9f4),_0x9c4800(0xd14),_0x9c4800(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c4800(0x919),'scope':'env'},'safety':{'access':_0x9c4800(0x61d),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x9c4800(0xcd7)},'mcp':{'capability':_0x9c4800(0x63b),'action':_0x9c4800(0x1061)}}),_0x54aff2['add'](_0x9c4800(0xe46),_0x9c4800(0x791)+_0x5483e1+_0x9c4800(0xee6),async({body:_0x2e1e7b})=>{const _0x527558=_0x9c4800,_0x22d404=_0x2e1e7b?.[_0x527558(0x1091)]??'',_0x2e06fb=_0x2e1e7b?.[_0x527558(0x74d)]===!![],_0x2c3e53=[];let _0x2030fb,_0x49e2b3;try{const _0x5d2640=_0x35e682(_0x22d404,{'allowFetch':!![],'filename':_0x527558(0x668)});_0x2030fb=_0x5d2640[_0x527558(0x37f)],_0x49e2b3=_0x5d2640[_0x527558(0x6f9)],_0x489dc8(_0x5d2640[_0x527558(0x1091)],{'unsafe':_0x2e06fb});}catch(_0x1e83fe){_0x2c3e53[_0x527558(0x597)](_0x1e83fe[_0x527558(0xb4e)]);}return{'result':{'valid':_0x2c3e53[_0x527558(0x156)]===0x0,'errors':_0x2c3e53,'warnings':[],'bytes':_0x2030fb,'hash':_0x49e2b3}};},{'id':_0x9c4800(0x6b5),'summary':'Validate\x20function\x20source','description':_0x9c4800(0xd9e),'tags':[_0x9c4800(0x705)],'inputSchema':{'type':_0x9c4800(0xb36),'properties':{'env':{'type':_0x9c4800(0xf7a),'default':_0x3749f2,'description':_0x9c4800(0xde1)},'source':{'type':_0x9c4800(0xf7a),'description':_0x9c4800(0x636)},'unsafe':{'type':[_0x9c4800(0x854),_0x9c4800(0x11e)],'description':'Dangerous:\x20grants\x20the\x20function\x20unrestricted\x20read/write\x20access\x20to\x20ALL\x20environments\x20via\x20ctx.okdb\x20(bypasses\x20the\x20per-env\x20scope).\x20Use\x20only\x20when\x20cross-env\x20orchestration\x20is\x20genuinely\x20required.'}},'required':[_0x9c4800(0x1091)],'additionalProperties':![]},'outputSchema':{'type':_0x9c4800(0xb36),'properties':{'valid':{'type':_0x9c4800(0x854)},'errors':{'type':'array','items':{'type':_0x9c4800(0xf7a)}},'warnings':{'type':_0x9c4800(0xf9d),'items':{'type':_0x9c4800(0xf7a)}},'bytes':{'type':_0x9c4800(0x9f0)},'hash':{'type':_0x9c4800(0xf7a)}}},'access':{'audiences':[_0x9c4800(0x9f4),_0x9c4800(0xd14),_0x9c4800(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c4800(0x434),'scope':'env'},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c4800(0xcd7)},'mcp':{'capability':_0x9c4800(0x63b),'action':_0x9c4800(0x1c6),'readOnlyHint':!![]}}),_0x54aff2[_0x9c4800(0x33c)](_0x9c4800(0x929),'/api'+_0x5483e1+'/functions/:name/runs',async({params:_0x249864})=>({'result':await _0x369988(_0x44ce2b,_0x249864[_0x9c4800(0x30b)])[_0x9c4800(0x705)]['listRuns']({'functionName':_0x249864[_0x9c4800(0x1173)]})}),{'id':_0x9c4800(0x90),'summary':'List\x20function\x20runs','description':_0x9c4800(0x7e2),'tags':['functions'],'inputSchema':{'type':_0x9c4800(0xb36),'properties':{'env':{'type':_0x9c4800(0xf7a),'default':_0x3749f2,'description':_0x9c4800(0xde1)},'name':{'type':_0x9c4800(0xf7a),'description':_0x9c4800(0xb6)}},'required':[_0x9c4800(0x1173)],'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0x9c4800(0xb36)}},'access':{'audiences':[_0x9c4800(0x9f4),'shell',_0x9c4800(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'functions:read','scope':_0x9c4800(0x30b)},'safety':{'access':_0x9c4800(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c4800(0x11cc)},'mcp':{'capability':_0x9c4800(0x63b),'action':_0x9c4800(0xd88),'readOnlyHint':!![]}}),_0x54aff2['add'](_0x9c4800(0x929),_0x9c4800(0x518),async({params:_0x3eac93})=>({'result':await _0x369988(_0x44ce2b,_0x3eac93[_0x9c4800(0x30b)])['functions'][_0x9c4800(0xc2f)](_0x3eac93['runId'])}),{'id':'function_run_get_env','summary':_0x9c4800(0xf2e),'description':_0x9c4800(0xc9a),'tags':[_0x9c4800(0x705)],'inputSchema':{'type':_0x9c4800(0xb36),'properties':{'env':{'type':'string','default':_0x3749f2,'description':_0x9c4800(0xde1)},'name':{'type':'string','description':_0x9c4800(0xb6)},'runId':{'type':_0x9c4800(0xf7a),'description':_0x9c4800(0x4e5)}},'required':['name',_0x9c4800(0xc2d)],'additionalProperties':![]},'outputSchema':{'type':[_0x9c4800(0xb36),_0x9c4800(0x11e)],'additionalProperties':!![]},'access':{'audiences':[_0x9c4800(0x9f4),'shell',_0x9c4800(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c4800(0x434),'scope':'env'},'safety':{'access':_0x9c4800(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c4800(0x11cc)},'mcp':{'include':!![],'capability':_0x9c4800(0x2db),'action':_0x9c4800(0xa73),'tool':_0x9c4800(0x66b)}}),_0x54aff2[_0x9c4800(0x33c)](_0x9c4800(0x929),_0x9c4800(0x791)+_0x5483e1+'/functions/:name/runs/:runId',async({params:_0x56fa24})=>({'result':await _0x369988(_0x44ce2b,_0x56fa24[_0x9c4800(0x30b)])['functions'][_0x9c4800(0xc2f)](_0x56fa24[_0x9c4800(0xc2d)])}),{'id':'function_run_get','summary':'Get\x20function\x20run','description':_0x9c4800(0xd43),'tags':[_0x9c4800(0x705)],'inputSchema':{'type':_0x9c4800(0xb36),'properties':{'env':{'type':_0x9c4800(0xf7a),'default':_0x3749f2,'description':_0x9c4800(0xde1)},'name':{'type':_0x9c4800(0xf7a),'description':_0x9c4800(0xb6)},'runId':{'type':_0x9c4800(0xf7a),'description':_0x9c4800(0x4e5)}},'required':['name',_0x9c4800(0xc2d)],'additionalProperties':![]},'outputSchema':{'type':['object',_0x9c4800(0x11e)],'additionalProperties':!![]},'access':{'audiences':[_0x9c4800(0x9f4),_0x9c4800(0xd14),_0x9c4800(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c4800(0x434),'scope':_0x9c4800(0x30b)},'safety':{'access':_0x9c4800(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x9c4800(0x63b),'action':_0x9c4800(0xa73),'readOnlyHint':!![]}});},functionsExec;}var types,hasRequiredTypes;function requireTypes(){if(hasRequiredTypes)return types;hasRequiredTypes=0x1;const {resolveEnv:_0x5679d6}=require_helpers();return types=function _0x2f7035({okdb:_0x1f4df9,http:_0x79c828,api:_0x2ca3b8,E:_0xd3c0f3,defaultEnvName:_0x5dff5d}){const _0x384c97=_0x47ab;_0x79c828[_0x384c97(0x33c)](_0x384c97(0x929),_0x384c97(0x791)+_0xd3c0f3+_0x384c97(0x413),({params:_0x3f5ac8})=>{const _0xd8117a=_0x384c97,_0x7d1781=_0x5679d6(_0x1f4df9,_0x3f5ac8[_0xd8117a(0x30b)]),_0x13d875=[..._0x7d1781[_0xd8117a(0x1145)]['keys']()][_0xd8117a(0x1166)](_0x13e6e1=>{const _0x226b0c=_0xd8117a,_0x524e86=_0x7d1781[_0x226b0c(0x1145)][_0x226b0c(0xbeb)](_0x13e6e1),_0x48f929=_0x524e86?.['data']?.['getCount']?.()??0x0,_0x28411a={};if(_0x524e86?.[_0x226b0c(0x970)]){for(const [_0x4869ba,_0x355a35]of _0x524e86[_0x226b0c(0x970)])_0x28411a[_0x4869ba]=[..._0x355a35][_0x226b0c(0x3f6)]();}return{'type':_0x13e6e1,'count':_0x48f929,'fields':_0x28411a};});return{'result':_0x13d875};},{'id':'type_list','summary':'List\x20types','description':_0x384c97(0x1132),'tags':['types'],'inputSchema':{'type':_0x384c97(0xb36),'properties':{'env':{'type':_0x384c97(0xf7a),'default':_0x5dff5d,'description':_0x384c97(0xde1)}},'additionalProperties':![]},'outputSchema':{'type':_0x384c97(0xf9d),'items':{'type':_0x384c97(0xb36)}},'access':{'audiences':[_0x384c97(0x9f4),'shell',_0x384c97(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x384c97(0x58b),'scope':{'env':'params.env'}},'safety':{'access':_0x384c97(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x384c97(0x11cc)},'mcp':{'capability':'type','action':_0x384c97(0xff9),'readOnlyHint':!![]}}),_0x79c828['add'](_0x384c97(0x929),_0x384c97(0x791)+_0xd3c0f3+_0x384c97(0xdaf),({params:_0x3d2cf1})=>{const _0x4bcb14=_0x384c97,_0x165fc7=_0x5679d6(_0x1f4df9,_0x3d2cf1[_0x4bcb14(0x30b)]),_0x5b5e50=_0x165fc7[_0x4bcb14(0x9ca)](_0x3d2cf1['type']),_0x128506={};for(const [_0xc2a451,_0x207733]of _0x5b5e50[_0x4bcb14(0x970)])_0x128506[_0xc2a451]=[..._0x207733][_0x4bcb14(0x3f6)]();const _0x419cc2={};for(const [_0x955163]of _0x5b5e50['indexToDb'])_0x419cc2[_0x955163]={'status':_0x5b5e50[_0x4bcb14(0xb4f)]?.['get']?.(_0x955163)?.[_0x4bcb14(0xfcd)]??null};return{'result':{'type':_0x3d2cf1[_0x4bcb14(0xaee)],'count':_0x5b5e50[_0x4bcb14(0xc88)][_0x4bcb14(0x7df)](),'fields':_0x128506,'indexes':_0x419cc2}};},{'id':'type_describe','summary':'Describe\x20type','description':_0x384c97(0x1e5),'tags':[_0x384c97(0x450)],'inputSchema':{'type':_0x384c97(0xb36),'properties':{'env':{'type':_0x384c97(0xf7a),'default':_0x5dff5d,'description':_0x384c97(0xde1)},'type':{'type':_0x384c97(0xf7a),'description':_0x384c97(0xce7)}},'required':[_0x384c97(0xaee)],'additionalProperties':![]},'outputSchema':{'type':_0x384c97(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x384c97(0x9f4),_0x384c97(0xd14),_0x384c97(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x384c97(0x58b),'scope':{'env':_0x384c97(0xd46)}},'safety':{'access':_0x384c97(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x384c97(0x11cc)},'mcp':{'capability':_0x384c97(0xaee),'action':_0x384c97(0xcbf),'readOnlyHint':!![]}}),_0x79c828[_0x384c97(0x33c)](_0x384c97(0xe46),_0x384c97(0x791)+_0xd3c0f3+_0x384c97(0xdaf),async({params:_0x5762a8})=>{const _0x188e5e=_0x384c97;return await _0x5679d6(_0x1f4df9,_0x5762a8[_0x188e5e(0x30b)])[_0x188e5e(0xa39)](_0x5762a8['type']),{'status':0xcc};},{'id':_0x384c97(0xe7b),'summary':'Register\x20type','description':_0x384c97(0x74f),'tags':['types'],'inputSchema':{'type':_0x384c97(0xb36),'properties':{'env':{'type':_0x384c97(0xf7a),'default':_0x5dff5d,'description':_0x384c97(0xde1)},'type':{'type':_0x384c97(0xf7a),'description':'Type\x20name'}},'required':[_0x384c97(0xaee)],'additionalProperties':![]},'outputSchema':{'type':_0x384c97(0x11e)},'access':{'audiences':[_0x384c97(0x9f4),_0x384c97(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x384c97(0x7be),'scope':{'env':'params.env'}},'safety':{'access':'write','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x384c97(0x11cc)},'mcp':{'capability':'type','action':'register_type'}}),_0x79c828[_0x384c97(0x33c)]('DELETE',_0x384c97(0x791)+_0xd3c0f3+_0x384c97(0xdaf),async({params:_0x3b5b11})=>{const _0x516364=_0x384c97;return await _0x5679d6(_0x1f4df9,_0x3b5b11['env'])[_0x516364(0x665)](_0x3b5b11[_0x516364(0xaee)]),{'status':0xcc};},{'id':_0x384c97(0x8dc),'summary':_0x384c97(0xe36),'description':_0x384c97(0x8b4),'tags':['types'],'inputSchema':{'type':_0x384c97(0xb36),'properties':{'env':{'type':_0x384c97(0xf7a),'default':_0x5dff5d,'description':_0x384c97(0xde1)},'type':{'type':_0x384c97(0xf7a),'description':'Type\x20name'}},'required':[_0x384c97(0xaee)],'additionalProperties':![]},'outputSchema':{'type':'null'},'access':{'audiences':[_0x384c97(0x9f4),'shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x384c97(0x7be),'scope':{'env':'params.env'}},'safety':{'access':'write','destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x384c97(0x11cc)},'mcp':{'capability':_0x384c97(0xaee),'action':_0x384c97(0x6b4)}}),_0x79c828[_0x384c97(0x33c)](_0x384c97(0xe46),_0x384c97(0x791)+_0xd3c0f3+_0x384c97(0xc7f),async({params:_0x456d4c})=>{const _0x59c12c=_0x384c97,_0x34df13=_0x5679d6(_0x1f4df9,_0x456d4c[_0x59c12c(0x30b)]),_0x321571=_0x34df13[_0x59c12c(0x9ca)](_0x456d4c['type']);_0x321571['fieldSchema'][_0x59c12c(0x859)]();for(const {value:_0x53d5d9}of _0x321571[_0x59c12c(0xc88)][_0x59c12c(0x9ce)]())_0x34df13['_mergeFieldSchema'](_0x456d4c[_0x59c12c(0xaee)],_0x53d5d9);return{'status':0xcc};},{'id':'type_recompute_fields','summary':'Recompute\x20field\x20schema','description':_0x384c97(0x38e),'tags':[_0x384c97(0x450)],'inputSchema':{'type':'object','properties':{'env':{'type':_0x384c97(0xf7a),'default':_0x5dff5d,'description':'Environment\x20name'},'type':{'type':'string','description':_0x384c97(0xce7)}},'required':[_0x384c97(0xaee)],'additionalProperties':![]},'outputSchema':{'type':'null'},'access':{'audiences':[_0x384c97(0x9f4),_0x384c97(0xd14),_0x384c97(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:write','scope':{'env':_0x384c97(0xd46)}},'safety':{'access':_0x384c97(0x61d),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x384c97(0x11cc)},'mcp':{'capability':_0x384c97(0xaee),'action':_0x384c97(0x7f9)}}),_0x79c828[_0x384c97(0x33c)](_0x384c97(0x929),_0x384c97(0x791)+_0xd3c0f3+_0x384c97(0xb50),({params:_0x29b276})=>{const _0x45beef=_0x384c97,_0x194e70=_0x5679d6(_0x1f4df9,_0x29b276[_0x45beef(0x30b)]),_0x4010df=_0x194e70[_0x45beef(0x9ca)](_0x29b276['type']);return{'result':{'properties':[..._0x4010df[_0x45beef(0x970)][_0x45beef(0xa52)]()][_0x45beef(0x3f6)]()}};},{'id':'type_properties','summary':'List\x20field\x20names','description':'Returns\x20the\x20top-level\x20field\x20names\x20currently\x20known\x20for\x20a\x20type.','tags':[_0x384c97(0x450)],'inputSchema':{'type':_0x384c97(0xb36),'properties':{'env':{'type':_0x384c97(0xf7a),'default':_0x5dff5d,'description':_0x384c97(0xde1)},'type':{'type':'string','description':'Type\x20name'}},'required':[_0x384c97(0xaee)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':['http',_0x384c97(0xd14),_0x384c97(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x384c97(0x58b),'scope':{'env':_0x384c97(0xd46)}},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x384c97(0xaee),'action':_0x384c97(0x1cf),'readOnlyHint':!![]}}),_0x79c828[_0x384c97(0x33c)](_0x384c97(0x929),_0x384c97(0x791)+_0xd3c0f3+'/type/:type/deep-properties',({params:_0x2245dd,query:_0x12eaf7})=>{const _0x405400=_0x384c97,_0x3d1fb4=_0x5679d6(_0x1f4df9,_0x2245dd[_0x405400(0x30b)]);if(!_0x3d1fb4['hasType'](_0x2245dd[_0x405400(0xaee)]))return{'result':{'paths':{},'sampled':0x0,'stale':![]}};const _0xe9ad9d=_0x12eaf7?.[_0x405400(0x7ef)]===_0x405400(0x7e8)||_0x12eaf7?.['force']==='1',{paths:_0x754fdd,sampled:_0x351bbb,stale:_0x3118b1}=_0x2ca3b8[_0x405400(0x74a)](_0x3d1fb4,_0x2245dd[_0x405400(0xaee)],_0xe9ad9d);return{'result':{'paths':_0x754fdd,'sampled':_0x351bbb,'stale':_0x3118b1}};},{'id':'type_deep_properties','summary':_0x384c97(0xc24),'description':_0x384c97(0x635),'tags':[_0x384c97(0x450)],'query':{'force':null},'inputSchema':{'type':_0x384c97(0xb36),'properties':{'env':{'type':_0x384c97(0xf7a),'default':_0x5dff5d,'description':_0x384c97(0xde1)},'type':{'type':_0x384c97(0xf7a),'description':'Type\x20name'},'force':{'type':[_0x384c97(0x854),_0x384c97(0x11e)],'default':null}},'required':['type'],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x384c97(0x9f4),_0x384c97(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x384c97(0x58b),'scope':{'env':_0x384c97(0xd46)}},'safety':{'access':_0x384c97(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x384c97(0x11cc),'querySchema':{'force':{'type':[_0x384c97(0x854),_0x384c97(0x11e)],'default':null}}},'mcp':{'capability':_0x384c97(0xaee),'action':_0x384c97(0x92),'readOnlyHint':!![]}});},types;}var items,hasRequiredItems;function requireItems(){if(hasRequiredItems)return items;hasRequiredItems=0x1;const _0x173d2e=require$$0$5,{resolveEnv:_0x46d047}=require_helpers();return items=function _0x282c93({okdb:_0x53d114,http:_0x2e97c1,E:_0x1615a1,defaultEnvName:_0x26bcb7}){const _0x31ad31=_0x47ab,_0x5e1827={'type':'object','properties':{'set':{'type':_0x31ad31(0xb36),'additionalProperties':!![]},'unset':{'type':_0x31ad31(0xf9d),'items':{'type':_0x31ad31(0xf7a)}},'inc':{'type':'object','additionalProperties':{'type':_0x31ad31(0x9f0)}},'merge':{'type':_0x31ad31(0xb36),'additionalProperties':!![]},'append':{'type':_0x31ad31(0xb36),'additionalProperties':!![]},'pull':{'type':_0x31ad31(0xb36),'additionalProperties':!![]}},'additionalProperties':![]};_0x2e97c1['add'](_0x31ad31(0x929),_0x31ad31(0x791)+_0x1615a1+_0x31ad31(0x6b0),({params:_0x41ab4b})=>{const _0x513694=_0x31ad31,_0x16c543=_0x46d047(_0x53d114,_0x41ab4b[_0x513694(0x30b)]),_0x8f246e=_0x16c543[_0x513694(0xbeb)](_0x41ab4b['type'],_0x41ab4b[_0x513694(0x9dd)]),_0x141acf=_0x16c543[_0x513694(0xe32)](_0x41ab4b['type'],_0x41ab4b[_0x513694(0x9dd)]),_0x59a526={'key':_0x41ab4b[_0x513694(0x9dd)],'value':_0x8f246e};if(_0x141acf)_0x59a526[_0x513694(0x347)]=_0x141acf;return{'result':_0x59a526};},{'id':_0x31ad31(0x612),'summary':_0x31ad31(0x104e),'description':'Returns\x20a\x20single\x20item\x20value\x20by\x20type\x20and\x20key.','tags':[_0x31ad31(0xc88)],'inputSchema':{'type':_0x31ad31(0xb36),'properties':{'env':{'type':_0x31ad31(0xf7a),'default':_0x26bcb7,'description':'Environment\x20name'},'type':{'type':'string','description':_0x31ad31(0xce7)},'key':{'type':'string','description':_0x31ad31(0xe22)}},'required':[_0x31ad31(0xaee),_0x31ad31(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':'object','properties':{'key':{'type':_0x31ad31(0xf7a)},'value':{}},'additionalProperties':![]},'access':{'audiences':['http',_0x31ad31(0xd14),_0x31ad31(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x31ad31(0x2ae),'scope':{'env':_0x31ad31(0xd46)}},'safety':{'access':_0x31ad31(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x31ad31(0x11cc)},'mcp':{'capability':'data','action':_0x31ad31(0x1d3),'readOnlyHint':!![]}}),_0x2e97c1[_0x31ad31(0x33c)](_0x31ad31(0x929),_0x31ad31(0x791)+_0x1615a1+_0x31ad31(0x75b),({params:_0x29af01,query:_0x2b73df})=>{const _0x476f64=_0x31ad31,_0x437321=_0x46d047(_0x53d114,_0x29af01[_0x476f64(0x30b)]),_0x143613=Math['min'](Math[_0x476f64(0x10bf)](0x1,parseInt(_0x2b73df?.['limit'])||0x32),0x1f4),_0x5d0126=_0x2b73df?.[_0x476f64(0x2ea)]!=null?parseInt(_0x2b73df[_0x476f64(0x2ea)]):Number[_0x476f64(0xac8)],_0x59dc96=[];try{for(const _0x2e907f of _0x437321['getChanges'](_0x29af01[_0x476f64(0xaee)],_0x5d0126,0x0,{'limit':_0x143613*0xa})){if(_0x2e907f['key']===_0x29af01[_0x476f64(0x9dd)])_0x59dc96['push'](_0x2e907f);if(_0x59dc96[_0x476f64(0x156)]>=_0x143613)break;}}catch{}return{'result':_0x59dc96};},{'id':_0x31ad31(0x1e1),'summary':_0x31ad31(0x49d),'description':_0x31ad31(0xbe2),'tags':['data'],'inputSchema':{'type':_0x31ad31(0xb36),'properties':{'env':{'type':'string','default':_0x26bcb7,'description':_0x31ad31(0xde1)},'type':{'type':_0x31ad31(0xf7a),'description':_0x31ad31(0xce7)},'key':{'type':_0x31ad31(0xf7a),'description':_0x31ad31(0xe22)},'limit':{'type':_0x31ad31(0x10f2),'default':0x32},'before':{'type':[_0x31ad31(0x10f2),_0x31ad31(0x11e)],'default':null}},'required':[_0x31ad31(0xaee),_0x31ad31(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':_0x31ad31(0xf9d),'items':{'type':_0x31ad31(0xb36)}},'access':{'audiences':[_0x31ad31(0x9f4),_0x31ad31(0xd14),_0x31ad31(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x31ad31(0x2ae),'scope':{'env':_0x31ad31(0xd46)}},'safety':{'access':_0x31ad31(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x31ad31(0x11cc),'querySchema':{'limit':{'type':_0x31ad31(0x10f2),'default':0x32},'before':{'type':['integer',_0x31ad31(0x11e)],'default':null}}},'mcp':{'capability':_0x31ad31(0xc88),'action':'get_item_changelog','readOnlyHint':!![]}}),_0x2e97c1[_0x31ad31(0x33c)](_0x31ad31(0x719),_0x31ad31(0x791)+_0x1615a1+_0x31ad31(0x6b0),async({params:_0x414777,body:_0x1e7fe4})=>{const _0x4b5bd3=_0x31ad31,_0x21aa82=_0x46d047(_0x53d114,_0x414777[_0x4b5bd3(0x30b)]),_0x77a116=_0x1e7fe4?.[_0x4b5bd3(0x347)]!=null&&typeof _0x1e7fe4[_0x4b5bd3(0x347)]===_0x4b5bd3(0x9f0)&&_0x1e7fe4[_0x4b5bd3(0x347)]>0x0?_0x1e7fe4[_0x4b5bd3(0x347)]:undefined;return await _0x21aa82[_0x4b5bd3(0x92c)](_0x414777['type'],_0x414777[_0x4b5bd3(0x9dd)],_0x1e7fe4,{'ttl':_0x77a116}),{'status':0xcc};},{'id':_0x31ad31(0x10a9),'summary':_0x31ad31(0xfac),'description':_0x31ad31(0x10f7),'tags':[_0x31ad31(0xc88)],'inputSchema':{'type':'object','properties':{'env':{'type':'string','default':_0x26bcb7,'description':_0x31ad31(0xde1)},'type':{'type':'string','description':_0x31ad31(0xce7)},'key':{'type':_0x31ad31(0xf7a),'description':_0x31ad31(0xe22)},'value':{},'ttl':{'type':[_0x31ad31(0x10f2),'null'],'default':null,'description':_0x31ad31(0xda3)}},'required':['type',_0x31ad31(0x9dd),'value'],'additionalProperties':![]},'outputSchema':{'type':_0x31ad31(0x11e)},'access':{'audiences':[_0x31ad31(0x9f4),'shell',_0x31ad31(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x31ad31(0x328),'scope':{'env':_0x31ad31(0xd46)}},'safety':{'access':_0x31ad31(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x31ad31(0xb36),'bindings':{'value':_0x31ad31(0xce8)}},'mcp':{'capability':_0x31ad31(0xc88),'action':'put_item'}}),_0x2e97c1['add'](_0x31ad31(0x96f),_0x31ad31(0x791)+_0x1615a1+_0x31ad31(0x6b0),async({params:_0x4f0a2f,body:_0x2b8dfa})=>{const _0x5495c6=_0x31ad31,_0x4c732a=_0x46d047(_0x53d114,_0x4f0a2f[_0x5495c6(0x30b)]);return await _0x4c732a[_0x5495c6(0xba7)](_0x4f0a2f[_0x5495c6(0xaee)],_0x4f0a2f[_0x5495c6(0x9dd)],_0x2b8dfa?.[_0x5495c6(0xba7)]??_0x2b8dfa,{'ifVersion':_0x2b8dfa?.[_0x5495c6(0x4a0)]??null}),{'status':0xcc};},{'id':_0x31ad31(0x3bb),'summary':'Patch\x20item','description':_0x31ad31(0x70e),'tags':[_0x31ad31(0xc88)],'inputSchema':{'type':_0x31ad31(0xb36),'properties':{'env':{'type':_0x31ad31(0xf7a),'default':_0x26bcb7,'description':_0x31ad31(0xde1)},'type':{'type':_0x31ad31(0xf7a),'description':_0x31ad31(0xce7)},'key':{'type':'string','description':'Item\x20key'},'ifVersion':{'type':[_0x31ad31(0x10f2),_0x31ad31(0x11e)],'default':null},'patch':_0x5e1827},'required':[_0x31ad31(0xaee),_0x31ad31(0x9dd),_0x31ad31(0xba7)],'additionalProperties':![]},'outputSchema':{'type':'null'},'access':{'audiences':['http',_0x31ad31(0xd14),_0x31ad31(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x31ad31(0x328),'scope':{'env':_0x31ad31(0xd46)}},'safety':{'access':_0x31ad31(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x31ad31(0xcd7)},'mcp':{'capability':_0x31ad31(0xc88),'action':_0x31ad31(0x4f6)}}),_0x2e97c1['add'](_0x31ad31(0x42f),_0x31ad31(0x791)+_0x1615a1+'/type/:type/item/:key',async({params:_0x2b328d})=>{const _0x3b769e=_0x31ad31;return await _0x46d047(_0x53d114,_0x2b328d[_0x3b769e(0x30b)])['remove'](_0x2b328d[_0x3b769e(0xaee)],_0x2b328d['key']),{'status':0xcc};},{'id':_0x31ad31(0x831),'summary':_0x31ad31(0xea3),'description':_0x31ad31(0xcce),'tags':[_0x31ad31(0xc88)],'inputSchema':{'type':_0x31ad31(0xb36),'properties':{'env':{'type':_0x31ad31(0xf7a),'default':_0x26bcb7,'description':_0x31ad31(0xde1)},'type':{'type':_0x31ad31(0xf7a),'description':'Type\x20name'},'key':{'type':_0x31ad31(0xf7a),'description':'Item\x20key'}},'required':['type',_0x31ad31(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':_0x31ad31(0x11e)},'access':{'audiences':[_0x31ad31(0x9f4),_0x31ad31(0xd14),_0x31ad31(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x31ad31(0x328),'scope':{'env':_0x31ad31(0xd46)}},'safety':{'access':_0x31ad31(0x61d),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x31ad31(0x11cc)},'mcp':{'capability':_0x31ad31(0xc88),'action':_0x31ad31(0xec5)}}),_0x2e97c1[_0x31ad31(0x33c)]('POST',_0x31ad31(0x791)+_0x1615a1+'/type/:type/query',async({params:_0x393d5a,body:_0x1f3d25})=>{const _0x482a68=_0x31ad31,_0x52d55e=_0x46d047(_0x53d114,_0x393d5a[_0x482a68(0x30b)]),{filter:filter={},options:options={}}=_0x1f3d25||{},_0x262829=Date[_0x482a68(0x555)](),_0x5952bd=[];if(!_0x52d55e[_0x482a68(0x7c0)](_0x393d5a[_0x482a68(0xaee)]))return{'result':_0x5952bd,'meta':{'time':Date['now']()-_0x262829,'count':0x0}};if(options[_0x482a68(0xfca)]){const {name:_0x2c5ade,query:_0x31443b='',..._0x1c1b71}=options[_0x482a68(0xfca)];for(const _0x4aa2cd of _0x52d55e[_0x482a68(0xf4b)](_0x393d5a['type'],_0x2c5ade,_0x31443b,filter,_0x1c1b71))_0x5952bd['push']({'key':_0x4aa2cd[_0x482a68(0x9dd)],'value':_0x4aa2cd[_0x482a68(0x568)],'score':_0x4aa2cd[_0x482a68(0x1122)],'numTerms':_0x4aa2cd['numTerms'],'maxScore':_0x4aa2cd[_0x482a68(0x758)]});}else{if(options[_0x482a68(0x11fd)]){const {name:_0x4f813e,query:_0x125aef='',limit:_0x4e9a49=0x14}=options['vectorSearch'],_0x26e938=Math[_0x482a68(0x10bf)](0x0,Math[_0x482a68(0xcc)](Number(_0x4e9a49)||0x0)),_0x47a199=_0x4f813e['includes'](':')?_0x4f813e:_0x393d5a[_0x482a68(0x30b)]+':'+_0x4f813e,_0x33455b=_0x53d114[_0x482a68(0x7f1)]?.['search']?.(_0x47a199);if(!_0x33455b){const _0x46b9c3=new Error(_0x482a68(0xd71)+_0x47a199+_0x482a68(0x310));_0x46b9c3[_0x482a68(0xfcd)]=0x194;throw _0x46b9c3;}const _0x1d2249=Math[_0x482a68(0x10bf)](_0x26e938,Math['min'](_0x26e938*0x4,0x3e8)),_0x296471=await _0x33455b['search'](_0x125aef,{'limit':_0x1d2249}),_0x27e858=Object[_0x482a68(0xa52)](filter)[_0x482a68(0x156)]>0x0?_0x173d2e(filter):null,_0x2a6c8e=new Set(),_0x118e0e='~'+_0x393d5a['env']+_0x482a68(0x532)+_0x393d5a[_0x482a68(0xaee)],_0x3e067b=_0x53d114[_0x482a68(0xa3)]?.['get'](_0x118e0e)??null;for(const _0xd283ee of _0x296471){const _0x46b89e=_0xd283ee['key'][_0x482a68(0x10b8)]('\x09'),_0x297e7b=_0x46b89e>=0x0?_0xd283ee['key'][_0x482a68(0xc3c)](0x0,_0x46b89e):_0xd283ee[_0x482a68(0x9dd)],_0x265377=_0x46b89e>=0x0?_0xd283ee['key']['slice'](_0x46b89e+0x1):null;if(_0x2a6c8e[_0x482a68(0x9d0)](_0x297e7b))continue;const _0x11c7ab=_0x52d55e[_0x482a68(0xbeb)](_0x393d5a['type'],_0x297e7b);if(_0x11c7ab===undefined||_0x27e858&&!_0x27e858(_0x11c7ab))continue;_0x2a6c8e[_0x482a68(0x33c)](_0x297e7b);const _0x385dae={'key':_0x297e7b,'value':_0x11c7ab,'score':_0xd283ee['score']};if(_0x265377){_0x385dae[_0x482a68(0x6dd)]=_0x265377;const _0x28493f='chunk_status:'+_0x4f813e;if(_0x3e067b?.[_0x482a68(0x7c0)]?.(_0x28493f)){const _0x1ce101=_0x297e7b+'\x09'+_0x265377,_0x582be5=_0x3e067b[_0x482a68(0xbeb)](_0x28493f,_0x1ce101);_0x582be5&&(_0x385dae[_0x482a68(0xf26)]={'start':_0x582be5['start'],'end':_0x582be5[_0x482a68(0xc9c)]});}}_0x5952bd['push'](_0x385dae);if(_0x5952bd['length']>=_0x26e938)break;}}else for(const _0x355f29 of _0x52d55e['query'](_0x393d5a[_0x482a68(0xaee)],filter,options)){const _0x526e89={'key':_0x355f29[_0x482a68(0x9dd)],'value':_0x355f29[_0x482a68(0x568)]};if(_0x355f29[_0x482a68(0x4bc)]!=null)_0x526e89['distance']=_0x355f29[_0x482a68(0x4bc)];_0x5952bd[_0x482a68(0x597)](_0x526e89);}}return{'result':_0x5952bd,'meta':{'time':Date[_0x482a68(0x555)]()-_0x262829,'count':_0x5952bd[_0x482a68(0x156)]}};},{'id':_0x31ad31(0xd18),'summary':_0x31ad31(0x1212),'description':_0x31ad31(0xee3),'tags':['data'],'body':{'filter':{},'options':{'limit':0x32}},'inputSchema':{'type':'object','properties':{'env':{'type':'string','default':_0x26bcb7,'description':_0x31ad31(0xde1)},'type':{'type':_0x31ad31(0xf7a),'description':_0x31ad31(0xce7)},'filter':{'type':_0x31ad31(0xb36),'default':{},'additionalProperties':!![]},'options':{'type':_0x31ad31(0xb36),'default':{},'additionalProperties':!![]}},'required':[_0x31ad31(0xaee)],'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0x31ad31(0xb36)}},'access':{'audiences':[_0x31ad31(0x9f4),'shell',_0x31ad31(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x31ad31(0x2ae),'scope':{'env':_0x31ad31(0xd46)}},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':'data','action':_0x31ad31(0x8a1),'readOnlyHint':!![]}}),_0x2e97c1[_0x31ad31(0x33c)](_0x31ad31(0xe46),'/api'+_0x1615a1+_0x31ad31(0x1ea),({params:_0x4a1bbc,body:_0x535833})=>{const _0x96400a=_0x31ad31,_0x36ddfa=_0x46d047(_0x53d114,_0x4a1bbc[_0x96400a(0x30b)]),{filter:filter={},options:options={}}=_0x535833||{},_0x7001b1=Date[_0x96400a(0x555)]();if(!_0x36ddfa['hasType'](_0x4a1bbc[_0x96400a(0xaee)]))return{'result':0x0,'meta':{'time':Date['now']()-_0x7001b1}};let _0x2960a4=0x0;for(const _0x359aa3 of _0x36ddfa[_0x96400a(0xa28)](_0x4a1bbc['type'],filter,options))_0x2960a4++;return{'result':_0x2960a4,'meta':{'time':Date['now']()-_0x7001b1}};},{'id':'type_count','summary':_0x31ad31(0x199),'description':'Counts\x20matching\x20items\x20in\x20a\x20type\x20using\x20the\x20same\x20filter/options\x20contract\x20as\x20query.','tags':['data'],'inputSchema':{'type':_0x31ad31(0xb36),'properties':{'env':{'type':_0x31ad31(0xf7a),'default':_0x26bcb7,'description':'Environment\x20name'},'type':{'type':_0x31ad31(0xf7a),'description':_0x31ad31(0xce7)},'filter':{'type':_0x31ad31(0xb36),'default':{},'additionalProperties':!![]},'options':{'type':'object','default':{},'additionalProperties':!![]}},'required':['type'],'additionalProperties':![]},'outputSchema':{'type':'integer'},'access':{'audiences':['http',_0x31ad31(0xd14),_0x31ad31(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x31ad31(0x2ae),'scope':{'env':_0x31ad31(0xd46)}},'safety':{'access':_0x31ad31(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x31ad31(0xcd7)},'mcp':{'capability':_0x31ad31(0xc88),'action':_0x31ad31(0x115b),'readOnlyHint':!![]}}),_0x2e97c1[_0x31ad31(0x33c)](_0x31ad31(0x929),_0x31ad31(0x791)+_0x1615a1+_0x31ad31(0xf0),({params:_0x379c57,query:_0x38f64b})=>{const _0x9a401e=_0x31ad31,_0x2d0d4e=_0x46d047(_0x53d114,_0x379c57['env']),_0x4a6a92=Math['min'](Math[_0x9a401e(0x10bf)](0x1,parseInt(_0x38f64b?.['limit'])||0x64),0x3e8),_0x3223bd=_0x38f64b?.[_0x9a401e(0x2ea)]!=null?parseInt(_0x38f64b[_0x9a401e(0x2ea)]):Number['MAX_SAFE_INTEGER'],_0x512cd7=[];for(const _0xe4a781 of _0x2d0d4e[_0x9a401e(0x151)](_0x379c57[_0x9a401e(0xaee)],_0x3223bd,0x0,{'limit':_0x4a6a92}))_0x512cd7[_0x9a401e(0x597)](_0xe4a781);if(_0x38f64b?.[_0x9a401e(0x1219)]===_0x9a401e(0x10b2)&&_0x2d0d4e['timeMachine']?.[_0x9a401e(0x6ac)]()){const _0x5f1d29=_0x2d0d4e['timeMachine'][_0x9a401e(0x60a)];for(const _0x34fd81 of _0x512cd7){_0x34fd81['key']!=null&&_0x5f1d29['hasDiff'](_0x379c57[_0x9a401e(0xaee)],_0x34fd81[_0x9a401e(0x9dd)],_0x34fd81[_0x9a401e(0x114d)])&&(_0x34fd81[_0x9a401e(0x530)]=!![]);}}return{'result':_0x512cd7,'clock':_0x2d0d4e[_0x9a401e(0x5ea)](_0x379c57[_0x9a401e(0xaee)])};},{'id':'type_changelog','summary':_0x31ad31(0xa35),'description':_0x31ad31(0x1093),'tags':[_0x31ad31(0xb74)],'inputSchema':{'type':_0x31ad31(0xb36),'properties':{'env':{'type':'string','default':_0x26bcb7,'description':_0x31ad31(0xde1)},'type':{'type':_0x31ad31(0xf7a),'description':_0x31ad31(0xce7)},'limit':{'type':_0x31ad31(0x10f2),'default':0x32},'before':{'type':[_0x31ad31(0x10f2),_0x31ad31(0x11e)],'default':null}},'required':['type'],'additionalProperties':![]},'outputSchema':{'type':_0x31ad31(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x31ad31(0x9f4),_0x31ad31(0xd14),_0x31ad31(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x31ad31(0x2ae),'scope':{'env':_0x31ad31(0xd46)}},'safety':{'access':_0x31ad31(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x31ad31(0x11cc),'querySchema':{'limit':{'type':'integer','default':0x32},'before':{'type':[_0x31ad31(0x10f2),_0x31ad31(0x11e)],'default':null}}},'mcp':{'capability':_0x31ad31(0xc88),'action':_0x31ad31(0x65a),'readOnlyHint':!![]}}),_0x2e97c1['add']('POST',_0x31ad31(0x791)+_0x1615a1+_0x31ad31(0xece),async({params:_0x226961,body:_0x191ff5})=>{const _0x579b99=_0x31ad31,_0xd2db65=_0x46d047(_0x53d114,_0x226961['env']),_0x1dfa88=Array[_0x579b99(0x10f5)](_0x191ff5)?_0x191ff5:_0x191ff5?.['operations']||[],_0x45c290=_0xd2db65[_0x579b99(0x683)]();for(const _0x172664 of _0x1dfa88){const {action:_0x1755b3,type:_0x4b69ca,key:_0x38e591,value:_0x683064,patch:_0x2effae,ifVersion:ifVersion=null}=_0x172664||{};switch(_0x1755b3){case _0x579b99(0x92c):_0x45c290['put'](_0x4b69ca,_0x38e591,_0x683064,{'ifVersion':ifVersion});break;case _0x579b99(0xbb7):_0x45c290['update'](_0x4b69ca,_0x38e591,_0x683064,{'ifVersion':ifVersion});break;case _0x579b99(0xba7):_0x45c290['patch'](_0x4b69ca,_0x38e591,_0x2effae,{'ifVersion':ifVersion});break;case _0x579b99(0x21e):_0x45c290[_0x579b99(0x21e)](_0x4b69ca,_0x38e591,{'ifVersion':ifVersion});break;default:throw new Error(_0x579b99(0x2c9)+_0x1755b3);}}return await _0x45c290[_0x579b99(0xa78)](),{'status':0xcc};},{'id':'data_transaction','summary':_0x31ad31(0x81c),'description':_0x31ad31(0xeb0)+_0x31ad31(0x129)+_0x31ad31(0x8c3)+_0x31ad31(0x5ad)+_0x31ad31(0x7b6)+_0x31ad31(0x4f5),'tags':['data'],'body':[{'action':_0x31ad31(0x92c),'type':'articles','key':'a1','value':{'title':_0x31ad31(0xb2b)}},{'action':_0x31ad31(0xba7),'type':'articles','key':'a1','patch':{'set':{'published':!![]}}},{'action':_0x31ad31(0x21e),'type':'articles','key':'a2'}],'inputSchema':{'type':'object','properties':{'env':{'type':_0x31ad31(0xf7a),'default':_0x26bcb7,'description':'Environment\x20name'},'operations':{'type':_0x31ad31(0xf9d),'description':_0x31ad31(0x2b3),'items':{'type':'object','properties':{'action':{'type':'string','enum':[_0x31ad31(0x92c),_0x31ad31(0xbb7),_0x31ad31(0xba7),'remove']},'type':{'type':'string','description':_0x31ad31(0xce7)},'key':{'type':_0x31ad31(0xf7a),'description':_0x31ad31(0xe22)},'value':{'description':'Required\x20for\x20put/update.'},'patch':{'type':_0x31ad31(0xb36),'description':_0x31ad31(0x664),'additionalProperties':!![]},'ifVersion':{'type':[_0x31ad31(0x10f2),_0x31ad31(0x11e)],'description':_0x31ad31(0xbec)}},'required':[_0x31ad31(0x942),'type',_0x31ad31(0x9dd)],'additionalProperties':!![]}}},'required':[_0x31ad31(0xead)],'additionalProperties':![]},'outputSchema':{'type':_0x31ad31(0x11e)},'access':{'audiences':[_0x31ad31(0x9f4),_0x31ad31(0xd14),_0x31ad31(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'data:write','scope':{'env':_0x31ad31(0xd46)}},'safety':{'access':_0x31ad31(0x61d),'destructive':!![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x31ad31(0xcd7)},'mcp':{'capability':_0x31ad31(0xc88),'action':_0x31ad31(0x160)}});},items;}var ttl,hasRequiredTtl;function requireTtl(){if(hasRequiredTtl)return ttl;hasRequiredTtl=0x1;const {resolveEnv:_0x5279e3}=require_helpers();return ttl=function _0x13b0f2({okdb:_0x2668ef,http:_0x205f77,E:_0x2e5d59,defaultEnvName:_0x497aab}){const _0x5a2f55=_0x47ab;_0x205f77['add'](_0x5a2f55(0x929),'/api'+_0x2e5d59+_0x5a2f55(0xd31),({params:_0x22eec6})=>{const _0x25be62=_0x5a2f55,_0x498a88=_0x5279e3(_0x2668ef,_0x22eec6[_0x25be62(0x30b)]),_0x1c5f7a=_0x498a88[_0x25be62(0xe32)](_0x22eec6['type'],_0x22eec6[_0x25be62(0x9dd)]);return{'result':_0x1c5f7a};},{'id':_0x5a2f55(0x121f),'summary':_0x5a2f55(0x61c),'description':'Returns\x20the\x20TTL\x20info\x20for\x20a\x20single\x20item,\x20or\x20null\x20if\x20no\x20TTL\x20is\x20set.','tags':[_0x5a2f55(0xc88)],'inputSchema':{'type':_0x5a2f55(0xb36),'properties':{'env':{'type':'string','default':_0x497aab,'description':'Environment\x20name'},'type':{'type':_0x5a2f55(0xf7a),'description':_0x5a2f55(0xce7)},'key':{'type':_0x5a2f55(0xf7a),'description':_0x5a2f55(0xe22)}},'required':[_0x5a2f55(0xaee),_0x5a2f55(0x9dd)],'additionalProperties':![]},'outputSchema':{'oneOf':[{'type':_0x5a2f55(0x11e)},{'type':_0x5a2f55(0xb36),'properties':{'expiresAt':{'type':_0x5a2f55(0x9f0)},'remainingMs':{'type':'number'}}}]},'access':{'audiences':['http',_0x5a2f55(0xd14),_0x5a2f55(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x5a2f55(0x2ae),'scope':{'env':_0x5a2f55(0xd46)}},'safety':{'access':_0x5a2f55(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x5a2f55(0xc88),'action':'get_item_ttl','readOnlyHint':!![]}}),_0x205f77[_0x5a2f55(0x33c)](_0x5a2f55(0x719),'/api'+_0x2e5d59+_0x5a2f55(0xd31),async({params:_0x490052,body:_0x5ef3e6})=>{const _0x5c0556=_0x5a2f55,_0x3987c6=_0x5279e3(_0x2668ef,_0x490052[_0x5c0556(0x30b)]),_0xa286f4=_0x5ef3e6?.[_0x5c0556(0x347)];if(typeof _0xa286f4!=='number'||_0xa286f4<=0x0){const _0x19a306=new Error(_0x5c0556(0x1fd));_0x19a306[_0x5c0556(0xfcd)]=0x190;throw _0x19a306;}return await _0x3987c6['setTTL'](_0x490052['type'],_0x490052['key'],_0xa286f4),{'status':0xcc};},{'id':_0x5a2f55(0xe3d),'summary':_0x5a2f55(0xc25),'description':'Sets\x20a\x20TTL\x20(time-to-live)\x20in\x20milliseconds\x20on\x20an\x20existing\x20item.','tags':['data'],'inputSchema':{'type':_0x5a2f55(0xb36),'properties':{'env':{'type':_0x5a2f55(0xf7a),'default':_0x497aab,'description':'Environment\x20name'},'type':{'type':'string','description':'Type\x20name'},'key':{'type':_0x5a2f55(0xf7a),'description':_0x5a2f55(0xe22)},'ttl':{'type':_0x5a2f55(0x10f2),'description':_0x5a2f55(0x689)}},'required':[_0x5a2f55(0xaee),_0x5a2f55(0x9dd),_0x5a2f55(0x347)],'additionalProperties':![]},'outputSchema':{'type':_0x5a2f55(0x11e)},'access':{'audiences':[_0x5a2f55(0x9f4),_0x5a2f55(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x5a2f55(0x328),'scope':{'env':_0x5a2f55(0xd46)}},'safety':{'access':_0x5a2f55(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x5a2f55(0xcd7)},'mcp':{'capability':'data','action':'set_item_ttl'}}),_0x205f77[_0x5a2f55(0x33c)]('DELETE',_0x5a2f55(0x791)+_0x2e5d59+'/type/:type/item/:key/ttl',async({params:_0x567cf9})=>{const _0x28bb77=_0x5a2f55,_0x544a84=_0x5279e3(_0x2668ef,_0x567cf9['env']);return await _0x544a84[_0x28bb77(0xb8b)](_0x567cf9[_0x28bb77(0xaee)],_0x567cf9[_0x28bb77(0x9dd)]),{'status':0xcc};},{'id':'item_clear_ttl','summary':_0x5a2f55(0x8d6),'description':_0x5a2f55(0x2e2),'tags':[_0x5a2f55(0xc88)],'inputSchema':{'type':'object','properties':{'env':{'type':_0x5a2f55(0xf7a),'default':_0x497aab,'description':_0x5a2f55(0xde1)},'type':{'type':_0x5a2f55(0xf7a),'description':'Type\x20name'},'key':{'type':'string','description':_0x5a2f55(0xe22)}},'required':['type',_0x5a2f55(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':'null'},'access':{'audiences':[_0x5a2f55(0x9f4),'shell',_0x5a2f55(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x5a2f55(0x328),'scope':{'env':'params.env'}},'safety':{'access':_0x5a2f55(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x5a2f55(0xc88),'action':_0x5a2f55(0xff7)}}),_0x205f77[_0x5a2f55(0x33c)](_0x5a2f55(0x929),'/api'+_0x2e5d59+_0x5a2f55(0x9aa),({params:_0x2f19fe,query:_0x4b01f5})=>{const _0x2c61d4=_0x5a2f55,_0x39f890=_0x5279e3(_0x2668ef,_0x2f19fe[_0x2c61d4(0x30b)]),_0x43c006=_0x4b01f5?.[_0x2c61d4(0xaee)]||null;return{'result':_0x39f890['ttlStats'](_0x43c006)};},{'id':_0x5a2f55(0x189),'summary':_0x5a2f55(0xe82),'description':'Returns\x20TTL\x20statistics\x20for\x20this\x20environment:\x20total\x20entries,\x20expired\x20count,\x20next\x20expiry,\x20and\x20per-type\x20breakdown.','tags':['data'],'inputSchema':{'type':_0x5a2f55(0xb36),'properties':{'env':{'type':'string','default':_0x497aab,'description':_0x5a2f55(0xde1)},'type':{'type':[_0x5a2f55(0xf7a),_0x5a2f55(0x11e)],'default':null,'description':_0x5a2f55(0xcfe)}},'additionalProperties':![]},'outputSchema':{'type':_0x5a2f55(0xb36),'properties':{'enabled':{'type':_0x5a2f55(0x854)},'totalEntries':{'type':_0x5a2f55(0x10f2)},'expiredEntries':{'type':_0x5a2f55(0x10f2)},'nextExpiry':{'type':[_0x5a2f55(0x9f0),_0x5a2f55(0x11e)]},'byType':{'type':'object'}}},'access':{'audiences':['http','shell',_0x5a2f55(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'system:read','scope':{'env':_0x5a2f55(0xd46)}},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x5a2f55(0x11cc),'querySchema':{'type':{'type':[_0x5a2f55(0xf7a),_0x5a2f55(0x11e)],'default':null}}},'mcp':{'capability':_0x5a2f55(0xc88),'action':_0x5a2f55(0x189),'readOnlyHint':!![]}}),_0x205f77['add'](_0x5a2f55(0x929),_0x5a2f55(0x791)+_0x2e5d59+_0x5a2f55(0x1176),({params:_0x2a0483,query:_0x3b4fcd})=>{const _0x4e16cd=_0x5a2f55,_0x5bdc78=_0x5279e3(_0x2668ef,_0x2a0483[_0x4e16cd(0x30b)]),_0x5b8345=_0x3b4fcd?.[_0x4e16cd(0xaee)]||null,_0x4e2e59=Math[_0x4e16cd(0x2dc)](Math[_0x4e16cd(0x10bf)](0x1,parseInt(_0x3b4fcd?.[_0x4e16cd(0xbae)])||0x64),0x3e8);return{'result':_0x5bdc78[_0x4e16cd(0xe48)]({'type':_0x5b8345,'limit':_0x4e2e59})};},{'id':_0x5a2f55(0x25d),'summary':_0x5a2f55(0x6d7),'description':_0x5a2f55(0x1245),'tags':[_0x5a2f55(0xc88)],'inputSchema':{'type':_0x5a2f55(0xb36),'properties':{'env':{'type':'string','default':_0x497aab,'description':'Environment\x20name'},'type':{'type':[_0x5a2f55(0xf7a),_0x5a2f55(0x11e)],'default':null,'description':_0x5a2f55(0xcfe)},'limit':{'type':_0x5a2f55(0x10f2),'default':0x64,'description':_0x5a2f55(0x538)}},'additionalProperties':![]},'outputSchema':{'type':_0x5a2f55(0xb36),'properties':{'items':{'type':_0x5a2f55(0xf9d),'items':{'type':_0x5a2f55(0xb36)}},'total':{'type':_0x5a2f55(0x10f2)}}},'access':{'audiences':[_0x5a2f55(0x9f4),_0x5a2f55(0xd14),_0x5a2f55(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x5a2f55(0x2ae),'scope':{'env':'params.env'}},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x5a2f55(0x11cc),'querySchema':{'type':{'type':[_0x5a2f55(0xf7a),_0x5a2f55(0x11e)],'default':null},'limit':{'type':_0x5a2f55(0x10f2),'default':0x64}}},'mcp':{'capability':_0x5a2f55(0xc88),'action':_0x5a2f55(0x25d),'readOnlyHint':!![]}}),_0x205f77[_0x5a2f55(0x33c)]('GET',_0x5a2f55(0x791)+_0x2e5d59+_0x5a2f55(0xdeb),({params:_0x556f84})=>{const _0x2bd491=_0x5a2f55,_0x594ec5=_0x5279e3(_0x2668ef,_0x556f84['env']),_0x5c1c39=_0x594ec5[_0x2bd491(0xc27)](_0x556f84[_0x2bd491(0xaee)]);return{'result':{'type':_0x556f84['type'],'defaultTTL':_0x5c1c39}};},{'id':_0x5a2f55(0x3fc),'summary':'Get\x20type\x20default\x20TTL','description':_0x5a2f55(0xd44),'tags':['data'],'inputSchema':{'type':_0x5a2f55(0xb36),'properties':{'env':{'type':_0x5a2f55(0xf7a),'default':_0x497aab,'description':_0x5a2f55(0xde1)},'type':{'type':_0x5a2f55(0xf7a),'description':_0x5a2f55(0xce7)}},'required':['type'],'additionalProperties':![]},'outputSchema':{'type':_0x5a2f55(0xb36),'properties':{'type':{'type':'string'},'defaultTTL':{'type':[_0x5a2f55(0x10f2),_0x5a2f55(0x11e)]}}},'access':{'audiences':[_0x5a2f55(0x9f4),_0x5a2f55(0xd14),_0x5a2f55(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:read','scope':{'env':_0x5a2f55(0xd46)}},'safety':{'access':_0x5a2f55(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x5a2f55(0x11cc)},'mcp':{'capability':_0x5a2f55(0xc88),'action':_0x5a2f55(0xbf4),'readOnlyHint':!![]}}),_0x205f77[_0x5a2f55(0x33c)](_0x5a2f55(0x719),_0x5a2f55(0x791)+_0x2e5d59+_0x5a2f55(0xdeb),async({params:_0x20cb2d,body:_0x3dc717})=>{const _0x4be269=_0x5a2f55,_0xbf787c=_0x5279e3(_0x2668ef,_0x20cb2d[_0x4be269(0x30b)]),_0x1237b2=_0x3dc717?.['ttl'];if(typeof _0x1237b2!==_0x4be269(0x9f0)||_0x1237b2<=0x0){const _0x1c506d=new Error(_0x4be269(0x1fd));_0x1c506d[_0x4be269(0xeda)]=0x190;throw _0x1c506d;}return await _0xbf787c[_0x4be269(0x471)](_0x20cb2d['type'],_0x1237b2),{'status':0xcc};},{'id':_0x5a2f55(0x9f2),'summary':'Set\x20type\x20default\x20TTL','description':_0x5a2f55(0xff2),'tags':[_0x5a2f55(0xc88)],'inputSchema':{'type':_0x5a2f55(0xb36),'properties':{'env':{'type':'string','default':_0x497aab,'description':_0x5a2f55(0xde1)},'type':{'type':_0x5a2f55(0xf7a),'description':_0x5a2f55(0xce7)},'ttl':{'type':_0x5a2f55(0x10f2),'description':_0x5a2f55(0x4ef)}},'required':['type',_0x5a2f55(0x347)],'additionalProperties':![]},'outputSchema':{'type':_0x5a2f55(0x11e)},'access':{'audiences':['http',_0x5a2f55(0xd14),_0x5a2f55(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x5a2f55(0x7be),'scope':{'env':'params.env'}},'safety':{'access':'write','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x5a2f55(0xcd7)},'mcp':{'capability':_0x5a2f55(0xc88),'action':_0x5a2f55(0x3cd)}}),_0x205f77['add'](_0x5a2f55(0x42f),_0x5a2f55(0x791)+_0x2e5d59+_0x5a2f55(0xdeb),async({params:_0x2b8daa})=>{const _0x3fb4f5=_0x5a2f55,_0x5ed7c9=_0x5279e3(_0x2668ef,_0x2b8daa[_0x3fb4f5(0x30b)]);return await _0x5ed7c9[_0x3fb4f5(0x6be)](_0x2b8daa[_0x3fb4f5(0xaee)]),{'status':0xcc};},{'id':'type_clear_default_ttl','summary':_0x5a2f55(0x30c),'description':_0x5a2f55(0x36c),'tags':[_0x5a2f55(0xc88)],'inputSchema':{'type':_0x5a2f55(0xb36),'properties':{'env':{'type':_0x5a2f55(0xf7a),'default':_0x497aab,'description':_0x5a2f55(0xde1)},'type':{'type':_0x5a2f55(0xf7a),'description':_0x5a2f55(0xce7)}},'required':[_0x5a2f55(0xaee)],'additionalProperties':![]},'outputSchema':{'type':_0x5a2f55(0x11e)},'access':{'audiences':[_0x5a2f55(0x9f4),_0x5a2f55(0xd14),_0x5a2f55(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x5a2f55(0x7be),'scope':{'env':_0x5a2f55(0xd46)}},'safety':{'access':'write','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x5a2f55(0x11cc)},'mcp':{'capability':_0x5a2f55(0xc88),'action':_0x5a2f55(0x1095)}}),_0x205f77[_0x5a2f55(0x33c)]('POST',_0x5a2f55(0x791)+_0x2e5d59+_0x5a2f55(0x4b6),async({params:_0x2af1d6,body:_0x32a7c8})=>{const _0x35f45f=_0x5a2f55,_0x7996da=_0x5279e3(_0x2668ef,_0x2af1d6[_0x35f45f(0x30b)]),_0x18cd64=_0x32a7c8?.[_0x35f45f(0xc2a)]||0x3e8,_0x3f8e24=await _0x7996da['sweepExpiredTTL'](_0x18cd64);return{'result':_0x3f8e24};},{'id':_0x5a2f55(0x102f),'summary':_0x5a2f55(0x102),'description':'Manually\x20triggers\x20a\x20sweep\x20of\x20all\x20expired\x20TTL\x20items.\x20Returns\x20the\x20count\x20of\x20removed\x20items.','tags':[_0x5a2f55(0xc88)],'inputSchema':{'type':_0x5a2f55(0xb36),'properties':{'env':{'type':_0x5a2f55(0xf7a),'default':_0x497aab,'description':_0x5a2f55(0xde1)},'batchSize':{'type':_0x5a2f55(0x10f2),'default':0x3e8,'description':_0x5a2f55(0x61e)}},'additionalProperties':![]},'outputSchema':{'type':'object','properties':{'removed':{'type':_0x5a2f55(0x10f2)},'types':{'type':'object'}}},'access':{'audiences':['http',_0x5a2f55(0xd14),_0x5a2f55(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x5a2f55(0x4ce),'scope':{'env':_0x5a2f55(0xd46)}},'safety':{'access':_0x5a2f55(0x61d),'destructive':!![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x5a2f55(0xcd7)},'mcp':{'capability':_0x5a2f55(0xc88),'action':_0x5a2f55(0x102f)}});},ttl;}var indexes,hasRequiredIndexes;function requireIndexes(){if(hasRequiredIndexes)return indexes;hasRequiredIndexes=0x1;const {resolveEnv:_0x106b49}=require_helpers(),{OKDBIndexHasConsumersError:_0x530ce1}=requireOkdbError();return indexes=function _0x2e293c({okdb:_0x30dd32,http:_0x1a8b23,E:_0x449456,defaultEnvName:_0x5d97a8}){const _0x18499b=_0x47ab;_0x1a8b23['add']('GET',_0x18499b(0x791)+_0x449456+_0x18499b(0x11f8),({params:_0x27f0a1})=>{const _0x2046c7=_0x18499b,_0x2768d5=_0x106b49(_0x30dd32,_0x27f0a1[_0x2046c7(0x30b)]),_0x4fcf69=_0x2768d5[_0x2046c7(0x9ca)](_0x27f0a1[_0x2046c7(0xaee)]),_0x330c82={};for(const [_0x12af2d,_0x474323]of _0x4fcf69[_0x2046c7(0xf7b)]){const _0xa2e635={'status':_0x4fcf69['indexes']?.['get']?.(_0x12af2d)?.[_0x2046c7(0xfcd)]??null};if(_0x474323[_0x2046c7(0x19f)])_0xa2e635[_0x2046c7(0x19f)]=_0x474323['geoConfig'];if(_0x474323['unique'])_0xa2e635[_0x2046c7(0x774)]=!![];if(_0x474323[_0x2046c7(0x1f4)])_0xa2e635[_0x2046c7(0x1f4)]=_0x474323[_0x2046c7(0x1f4)];_0xa2e635[_0x2046c7(0xe85)]=[..._0x474323[_0x2046c7(0xe85)]??[]],_0x330c82[_0x12af2d]=_0xa2e635;}return{'result':_0x330c82};},{'id':'index_list','summary':'List\x20indexes','description':_0x18499b(0x120e),'tags':['indexes'],'inputSchema':{'type':'object','properties':{'env':{'type':'string','default':_0x5d97a8,'description':'Environment\x20name'},'type':{'type':_0x18499b(0xf7a),'description':_0x18499b(0xce7)}},'required':[_0x18499b(0xaee)],'additionalProperties':![]},'outputSchema':{'type':_0x18499b(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x18499b(0x9f4),_0x18499b(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x18499b(0x58b),'scope':{'env':_0x18499b(0xd46)}},'safety':{'access':_0x18499b(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x18499b(0x11cc)},'mcp':{'capability':_0x18499b(0xcc7),'action':'list_indexes','readOnlyHint':!![]}}),_0x1a8b23[_0x18499b(0x33c)](_0x18499b(0xe46),'/api'+_0x449456+'/type/:type/index/:index',async({params:_0x49cd69,body:_0x5249c2})=>{const _0x5d06f6=_0x18499b,_0x58d019=_0x106b49(_0x30dd32,_0x49cd69[_0x5d06f6(0x30b)]),_0x2dfef2=_0x49cd69[_0x5d06f6(0xcc7)][_0x5d06f6(0xfb1)]('~'),_0x5e353c={};if(_0x5249c2?.[_0x5d06f6(0xaee)])_0x5e353c[_0x5d06f6(0xaee)]=_0x5249c2[_0x5d06f6(0xaee)];if(_0x5249c2?.[_0x5d06f6(0x105e)])_0x5e353c[_0x5d06f6(0x105e)]=_0x5249c2[_0x5d06f6(0x105e)];if(_0x5249c2?.[_0x5d06f6(0x774)])_0x5e353c['unique']=!![];return await _0x58d019['registerIndex'](_0x49cd69[_0x5d06f6(0xaee)],_0x2dfef2,Object[_0x5d06f6(0xa52)](_0x5e353c)['length']?_0x5e353c:Date[_0x5d06f6(0x555)]()),{'status':0xcc};},{'id':_0x18499b(0xe83),'summary':_0x18499b(0xbfb),'description':'Registers\x20a\x20secondary\x20index\x20for\x20a\x20type.','tags':[_0x18499b(0xb4f)],'body':{'type':'geo','precision':0x7,'unique':![]},'inputSchema':{'type':'object','properties':{'env':{'type':_0x18499b(0xf7a),'default':_0x5d97a8,'description':_0x18499b(0xde1)},'type':{'type':_0x18499b(0xf7a),'description':_0x18499b(0xce7)},'index':{'type':'string','description':_0x18499b(0x5ba)},'unique':{'type':[_0x18499b(0x854),_0x18499b(0x11e)]},'precision':{'type':[_0x18499b(0x10f2),_0x18499b(0x11e)]},'typeHint':{'type':[_0x18499b(0xf7a),_0x18499b(0x11e)]}},'required':[_0x18499b(0xaee),_0x18499b(0xcc7)],'additionalProperties':![]},'outputSchema':{'type':_0x18499b(0x11e)},'access':{'audiences':[_0x18499b(0x9f4),_0x18499b(0xd14),_0x18499b(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x18499b(0x7be),'scope':{'env':_0x18499b(0xd46)}},'safety':{'access':_0x18499b(0x61d),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x18499b(0xcd7),'bindings':{'typeHint':'body.type'}},'mcp':{'capability':_0x18499b(0xcc7),'action':_0x18499b(0x248)}}),_0x1a8b23['add'](_0x18499b(0x42f),'/api'+_0x449456+_0x18499b(0x342),async({params:_0x1f4b39})=>{const _0x111867=_0x18499b,_0x4ee849=_0x106b49(_0x30dd32,_0x1f4b39[_0x111867(0x30b)]);try{await _0x4ee849[_0x111867(0xfff)](_0x1f4b39['type'],_0x1f4b39[_0x111867(0xcc7)]);}catch(_0x1377c7){if(_0x1377c7 instanceof _0x530ce1){const _0x5d0787=new Error(_0x1377c7[_0x111867(0xb4e)]);_0x5d0787[_0x111867(0xfcd)]=0x199,_0x5d0787['code']=_0x1377c7[_0x111867(0x1f8)],_0x5d0787['details']=_0x1377c7[_0x111867(0x933)];throw _0x5d0787;}throw _0x1377c7;}return{'status':0xcc};},{'id':_0x18499b(0x11da),'summary':_0x18499b(0xd6d),'description':_0x18499b(0xfa8),'tags':[_0x18499b(0xb4f)],'inputSchema':{'type':_0x18499b(0xb36),'properties':{'env':{'type':_0x18499b(0xf7a),'default':_0x5d97a8,'description':_0x18499b(0xde1)},'type':{'type':_0x18499b(0xf7a),'description':_0x18499b(0xce7)},'index':{'type':_0x18499b(0xf7a),'description':_0x18499b(0x961)}},'required':['type','index'],'additionalProperties':![]},'outputSchema':{'type':_0x18499b(0x11e)},'access':{'audiences':[_0x18499b(0x9f4),_0x18499b(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x18499b(0x7be),'scope':{'env':_0x18499b(0xd46)}},'safety':{'access':_0x18499b(0x61d),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':'index','action':_0x18499b(0x558)}}),_0x1a8b23['add']('POST',_0x18499b(0x791)+_0x449456+_0x18499b(0x11a8),async({params:_0x16bdf3})=>{const _0x53ad8f=_0x18499b,_0x5a2f5c=_0x106b49(_0x30dd32,_0x16bdf3['env']),_0x212a94=_0x16bdf3[_0x53ad8f(0xcc7)][_0x53ad8f(0xfb1)]('~');return await _0x5a2f5c[_0x53ad8f(0x2c8)](_0x16bdf3[_0x53ad8f(0xaee)],_0x212a94),{'status':0xcc};},{'id':_0x18499b(0x83c),'summary':_0x18499b(0x169),'description':_0x18499b(0x86a),'tags':[_0x18499b(0xb4f)],'inputSchema':{'type':_0x18499b(0xb36),'properties':{'env':{'type':_0x18499b(0xf7a),'default':_0x5d97a8,'description':_0x18499b(0xde1)},'type':{'type':_0x18499b(0xf7a),'description':'Type\x20name'},'index':{'type':_0x18499b(0xf7a),'description':_0x18499b(0x961)}},'required':['type','index'],'additionalProperties':![]},'outputSchema':{'type':_0x18499b(0x11e)},'access':{'audiences':[_0x18499b(0x9f4),_0x18499b(0xd14),_0x18499b(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x18499b(0x7be),'scope':{'env':_0x18499b(0xd46)}},'safety':{'access':'write','destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x18499b(0x11cc)},'mcp':{'capability':_0x18499b(0xcc7),'action':_0x18499b(0x55a)}}),_0x1a8b23[_0x18499b(0x33c)](_0x18499b(0x929),_0x18499b(0x791)+_0x449456+_0x18499b(0x59d),({params:_0x1363d3,query:_0xdc6ab0})=>{const _0x1df4b3=_0x18499b,_0x2782d8=_0x106b49(_0x30dd32,_0x1363d3[_0x1df4b3(0x30b)]),_0x307b97=_0xdc6ab0?.[_0x1df4b3(0xcc7)]?_0xdc6ab0['index'][_0x1df4b3(0xfb1)]('~'):null,_0x162fa9=_0x2782d8[_0x1df4b3(0x263)](_0x1363d3[_0x1df4b3(0xaee)],_0x307b97);return{'result':_0x162fa9};},{'id':_0x18499b(0x742),'summary':_0x18499b(0xf47),'description':'Returns\x20active\x20unique-index\x20violations\x20for\x20a\x20type.\x20Filter\x20by\x20index\x20with\x20?index=field1~field2.','tags':[_0x18499b(0xb4f)],'query':{'index':null},'inputSchema':{'type':_0x18499b(0xb36),'properties':{'env':{'type':_0x18499b(0xf7a),'default':_0x5d97a8,'description':_0x18499b(0xde1)},'type':{'type':_0x18499b(0xf7a),'description':_0x18499b(0xce7)},'index':{'type':['string',_0x18499b(0x11e)],'default':null}},'required':[_0x18499b(0xaee)],'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0x18499b(0xb36)}},'access':{'audiences':[_0x18499b(0x9f4),_0x18499b(0xd14),_0x18499b(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x18499b(0x58b),'scope':{'env':_0x18499b(0xd46)}},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x18499b(0x11cc),'querySchema':{'index':{'type':['string',_0x18499b(0x11e)],'default':null}}},'mcp':{'capability':_0x18499b(0xcc7),'action':'list_unique_violations','readOnlyHint':!![]}}),_0x1a8b23[_0x18499b(0x33c)](_0x18499b(0x929),_0x18499b(0x791)+_0x449456+_0x18499b(0x119),({params:_0x1e07d3})=>{const _0x436f65=_0x18499b,_0x542f00=_0x106b49(_0x30dd32,_0x1e07d3['env']),_0x5cd219=_0x1e07d3[_0x436f65(0xcc7)][_0x436f65(0xfb1)]('~'),_0x8c51d2=_0x542f00['getUniqueViolations'](_0x1e07d3[_0x436f65(0xaee)],_0x5cd219);return{'result':_0x8c51d2};},{'id':'index_violations_list','summary':_0x18499b(0x83d),'description':_0x18499b(0x10e6),'tags':[_0x18499b(0xb4f)],'inputSchema':{'type':'object','properties':{'env':{'type':_0x18499b(0xf7a),'default':_0x5d97a8,'description':_0x18499b(0xde1)},'type':{'type':_0x18499b(0xf7a),'description':_0x18499b(0xce7)},'index':{'type':_0x18499b(0xf7a),'description':'Index\x20name'}},'required':['type','index'],'additionalProperties':![]},'outputSchema':{'type':_0x18499b(0xf9d),'items':{'type':_0x18499b(0xb36)}},'access':{'audiences':[_0x18499b(0x9f4),_0x18499b(0xd14),_0x18499b(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:read','scope':{'env':_0x18499b(0xd46)}},'safety':{'access':_0x18499b(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x18499b(0x11cc)},'mcp':{'capability':_0x18499b(0xcc7),'action':_0x18499b(0xe28),'readOnlyHint':!![]}});},indexes;}var fts,hasRequiredFts;function requireFts(){if(hasRequiredFts)return fts;hasRequiredFts=0x1;const {resolveEnv:_0x13bfe4}=require_helpers();return fts=function _0x448f3c({okdb:_0x5ec5e7,http:_0x294b6a,E:_0x4253ee,defaultEnvName:_0x54ec34}){const _0x4b4787=_0x47ab;_0x294b6a[_0x4b4787(0x33c)](_0x4b4787(0x929),_0x4b4787(0x791)+_0x4253ee+_0x4b4787(0x3c5),({params:_0x291293})=>{const _0x31ccc6=_0x4b4787;return{'result':_0x5ec5e7[_0x31ccc6(0xfca)]['list'](_0x291293[_0x31ccc6(0xaee)],_0x13bfe4(_0x5ec5e7,_0x291293[_0x31ccc6(0x30b)]))};},{'id':_0x4b4787(0x4ca),'summary':_0x4b4787(0xbc8),'description':'Returns\x20all\x20full-text\x20search\x20indexes\x20for\x20a\x20type.','tags':[_0x4b4787(0xfca)],'inputSchema':{'type':_0x4b4787(0xb36),'properties':{'env':{'type':_0x4b4787(0xf7a),'default':_0x54ec34,'description':'Environment\x20name'},'type':{'type':_0x4b4787(0xf7a),'description':_0x4b4787(0xce7)}},'required':[_0x4b4787(0xaee)],'additionalProperties':![]},'outputSchema':{'type':_0x4b4787(0xf9d),'items':{'type':_0x4b4787(0xb36)}},'access':{'audiences':[_0x4b4787(0x9f4),_0x4b4787(0xd14),_0x4b4787(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x4b4787(0x58b),'scope':_0x4b4787(0x30b)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x4b4787(0x11cc)},'mcp':{'capability':'fts','action':_0x4b4787(0x149),'readOnlyHint':!![]}}),_0x294b6a[_0x4b4787(0x33c)](_0x4b4787(0xe46),'/api'+_0x4253ee+'/type/:type/fts/:ftsName',async({params:_0x49b923,body:_0x5a430f})=>{const _0x28b00e=_0x4b4787;return await _0x5ec5e7['fts'][_0x28b00e(0x2a4)](_0x49b923[_0x28b00e(0xaee)],_0x49b923[_0x28b00e(0x1001)],_0x5a430f||{},undefined,_0x13bfe4(_0x5ec5e7,_0x49b923[_0x28b00e(0x30b)])),{'status':0xcc};},{'id':'fts_register','summary':_0x4b4787(0xf53),'description':'Registers\x20a\x20full-text\x20search\x20index\x20for\x20a\x20type.\x20The\x20config.fields\x20array\x20is\x20required\x20and\x20must\x20list\x20the\x20field\x20paths\x20to\x20index\x20(e.g.\x20[\x22name\x22,\x20\x22description\x22]).','tags':[_0x4b4787(0xfca)],'inputSchema':{'type':_0x4b4787(0xb36),'properties':{'env':{'type':_0x4b4787(0xf7a),'default':_0x54ec34,'description':_0x4b4787(0xde1)},'type':{'type':_0x4b4787(0xf7a),'description':_0x4b4787(0xce7)},'ftsName':{'type':'string','description':_0x4b4787(0x894)},'config':{'type':_0x4b4787(0xb36),'description':_0x4b4787(0x1066),'properties':{'fields':{'type':_0x4b4787(0xf9d),'items':{'type':_0x4b4787(0xf7a)},'description':_0x4b4787(0x49e)},'tokenizer':{'type':_0x4b4787(0xb36),'description':_0x4b4787(0x762),'properties':{'minTokenLength':{'type':_0x4b4787(0x10f2),'default':0x2},'maxTokenLength':{'type':_0x4b4787(0x10f2),'default':0x40},'keepNumbers':{'type':_0x4b4787(0x854),'default':!![]},'toLower':{'type':_0x4b4787(0x854),'default':!![]}},'additionalProperties':![]}},'required':['fields'],'additionalProperties':![]}},'required':[_0x4b4787(0xaee),_0x4b4787(0x1001),'config'],'additionalProperties':![]},'outputSchema':{'type':_0x4b4787(0x11e)},'access':{'audiences':[_0x4b4787(0x9f4),'shell',_0x4b4787(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x4b4787(0x7be),'scope':_0x4b4787(0x30b)},'safety':{'access':'write','destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x4b4787(0xb36),'bindings':{'config':'body'}},'mcp':{'capability':_0x4b4787(0xfca),'action':_0x4b4787(0x3ab)}}),_0x294b6a[_0x4b4787(0x33c)](_0x4b4787(0x42f),'/api'+_0x4253ee+'/type/:type/fts/:ftsName',async({params:_0x79a7fa})=>{const _0x2d9988=_0x4b4787;return await _0x5ec5e7[_0x2d9988(0xfca)][_0x2d9988(0xca4)](_0x79a7fa[_0x2d9988(0xaee)],_0x79a7fa[_0x2d9988(0x1001)],_0x13bfe4(_0x5ec5e7,_0x79a7fa[_0x2d9988(0x30b)])),{'status':0xcc};},{'id':_0x4b4787(0x4b1),'summary':_0x4b4787(0xc41),'description':_0x4b4787(0x317),'tags':[_0x4b4787(0xfca)],'inputSchema':{'type':_0x4b4787(0xb36),'properties':{'env':{'type':_0x4b4787(0xf7a),'default':_0x54ec34,'description':_0x4b4787(0xde1)},'type':{'type':'string','description':_0x4b4787(0xce7)},'ftsName':{'type':'string','description':_0x4b4787(0x894)}},'required':['type','ftsName'],'additionalProperties':![]},'outputSchema':{'type':'null'},'access':{'audiences':[_0x4b4787(0x9f4),_0x4b4787(0xd14),_0x4b4787(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x4b4787(0x7be),'scope':_0x4b4787(0x30b)},'safety':{'access':'write','destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x4b4787(0xfca),'action':_0x4b4787(0xb38)}}),_0x294b6a[_0x4b4787(0x33c)](_0x4b4787(0xe46),_0x4b4787(0x791)+_0x4253ee+_0x4b4787(0x55c),async({params:_0x2edfee})=>{const _0x522ee3=_0x4b4787;return await _0x5ec5e7[_0x522ee3(0xfca)]['reset'](_0x2edfee['type'],_0x2edfee[_0x522ee3(0x1001)],!![],_0x13bfe4(_0x5ec5e7,_0x2edfee['env'])),{'status':0xcc};},{'id':_0x4b4787(0x50b),'summary':_0x4b4787(0x1128),'description':_0x4b4787(0x9cb),'tags':[_0x4b4787(0xfca)],'inputSchema':{'type':_0x4b4787(0xb36),'properties':{'env':{'type':_0x4b4787(0xf7a),'default':_0x54ec34,'description':_0x4b4787(0xde1)},'type':{'type':_0x4b4787(0xf7a),'description':_0x4b4787(0xce7)},'ftsName':{'type':_0x4b4787(0xf7a),'description':_0x4b4787(0x894)}},'required':['type','ftsName'],'additionalProperties':![]},'outputSchema':{'type':'null'},'access':{'audiences':[_0x4b4787(0x9f4),_0x4b4787(0xd14),_0x4b4787(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x4b4787(0x7be),'scope':_0x4b4787(0x30b)},'safety':{'access':_0x4b4787(0x61d),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x4b4787(0x11cc)},'mcp':{'capability':_0x4b4787(0xfca),'action':_0x4b4787(0x680)}}),_0x294b6a[_0x4b4787(0x33c)](_0x4b4787(0xe46),_0x4b4787(0x791)+_0x4253ee+_0x4b4787(0xa4b),({params:_0x3eae8d,body:_0x52de9b})=>{const _0x4db7fb=_0x4b4787,_0x56ecfa=_0x13bfe4(_0x5ec5e7,_0x3eae8d[_0x4db7fb(0x30b)]),{query:query='',filter:filter={},options:options={}}=_0x52de9b||{},_0x5669f7=Date['now'](),_0x8134a9=[];for(const _0x1285d7 of _0x56ecfa[_0x4db7fb(0xf4b)](_0x3eae8d[_0x4db7fb(0xaee)],_0x3eae8d[_0x4db7fb(0x1001)],query,filter,options))_0x8134a9[_0x4db7fb(0x597)]({'key':_0x1285d7[_0x4db7fb(0x9dd)],'value':_0x1285d7['value'],'score':_0x1285d7[_0x4db7fb(0x1122)],'numTerms':_0x1285d7[_0x4db7fb(0xa13)],'maxScore':_0x1285d7['maxScore']});return{'result':_0x8134a9,'meta':{'time':Date[_0x4db7fb(0x555)]()-_0x5669f7,'count':_0x8134a9[_0x4db7fb(0x156)]}};},{'id':_0x4b4787(0x360),'summary':_0x4b4787(0x2d0),'description':'Supports\x20AND/OR\x20modes,\x20prefix\x20matching,\x20and\x20sift\x20post-filter.','tags':['fts'],'body':{'query':_0x4b4787(0x24d),'filter':{},'options':{'limit':0x32,'mode':_0x4b4787(0x10d3),'prefix':![]}},'inputSchema':{'type':_0x4b4787(0xb36),'properties':{'env':{'type':_0x4b4787(0xf7a),'default':_0x54ec34,'description':_0x4b4787(0xde1)},'type':{'type':_0x4b4787(0xf7a),'description':_0x4b4787(0xce7)},'ftsName':{'type':_0x4b4787(0xf7a),'description':'FTS\x20index\x20name'},'query':{'type':[_0x4b4787(0xf7a),_0x4b4787(0x11e)],'default':''},'filter':{'type':_0x4b4787(0xb36),'default':{},'additionalProperties':!![]},'options':{'type':'object','default':{},'additionalProperties':!![]}},'required':[_0x4b4787(0xaee),_0x4b4787(0x1001)],'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0x4b4787(0xb36)}},'access':{'audiences':[_0x4b4787(0x9f4),'shell',_0x4b4787(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'search:query','scope':_0x4b4787(0x30b)},'safety':{'access':_0x4b4787(0xcae),'destructive':![],'idempotent':!![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':_0x4b4787(0xfca),'action':_0x4b4787(0x5e4),'readOnlyHint':!![]}});},fts;}var auth,hasRequiredAuth;function requireAuth(){if(hasRequiredAuth)return auth;hasRequiredAuth=0x1;const _0x41a959=require$$0$1,_0x321094=requireOkdbAuthTokens();return auth=function _0x516843({okdb:_0x1d611c,http:_0xebcc3}){const _0x4b1290=_0x47ab;_0xebcc3['add']('POST',_0x4b1290(0x87c),async({body:_0x35aa0a})=>{const _0x402264=_0x4b1290,{label:_0x4536a7,permissions:permissions=[],grants:grants={},name:_0x314936,password:_0x1e85fc,ttl:_0x22dd12}=_0x35aa0a||{};await _0x1d611c[_0x402264(0x93f)][_0x402264(0x10e8)]();const _0x1b7726=_0x321094['randomToken'](0x20),_0x34b420=_0x321094['hashToken'](_0x1b7726);if(_0x314936){const _0x2120d6=await _0x1d611c[_0x402264(0x93f)][_0x402264(0x157)](_0x314936);if(_0x2120d6){const _0x11d1b3=_0x2120d6['label']||'(unknown)',_0x410519=new Error(_0x402264(0xae)+_0x314936+_0x402264(0x73d)+_0x11d1b3+'\x22');_0x410519[_0x402264(0xfcd)]=0x199;throw _0x410519;}}const _0x568d69=_0x1e85fc?await _0x321094['hashPassword'](_0x1e85fc):null,_0x55f3e9=_0x41a959['randomUUID'](),_0x2798af=_0x22dd12?parseInt(_0x22dd12):null,_0x4c8cfc={'tokenHash':_0x34b420,'name':_0x314936||null,'passwordHash':_0x568d69,'label':_0x4536a7||null,'permissions':Array[_0x402264(0x10f5)](permissions)?permissions:[],'grants':typeof grants===_0x402264(0xb36)?grants:{},'createdAt':Date[_0x402264(0x555)](),'lastUsedAt':null,'expiresAt':_0x2798af?Date[_0x402264(0x555)]()+_0x2798af:null},_0x42a167=_0x1d611c[_0x402264(0xc65)];return await _0x42a167[_0x402264(0x92c)](_0x402264(0xbb0),_0x55f3e9,_0x4c8cfc,_0x2798af?{'ttl':_0x2798af}:{}),{'ok':!![],'data':{'id':_0x55f3e9,'label':_0x4c8cfc['label'],'name':_0x4c8cfc['name'],'permissions':_0x4c8cfc['permissions'],'grants':_0x4c8cfc[_0x402264(0x912)]},'token':_0x1b7726};},{'id':_0x4b1290(0x1009),'summary':_0x4b1290(0x1060),'description':'Creates\x20a\x20new\x20API\x20token\x20with\x20optional\x20password\x20login\x20support.\x20'+_0x4b1290(0xf38)+_0x4b1290(0x2e3)+_0x4b1290(0xe72)+_0x4b1290(0x1110),'tags':[_0x4b1290(0x93f)],'inputSchema':{'type':_0x4b1290(0xb36),'properties':{'label':{'type':_0x4b1290(0xf7a),'description':_0x4b1290(0x20f)},'permissions':{'type':_0x4b1290(0xf9d),'items':{'type':_0x4b1290(0xf7a)},'default':[],'description':_0x4b1290(0xb8d)},'grants':{'type':_0x4b1290(0xb36),'default':{},'description':'Per-env\x20additive\x20permissions,\x20shape\x20{\x20\x22<envName>\x22:\x20[\x22<ns>:<op>\x22,\x20...]\x20}.\x20Merged\x20with\x20base\x20permissions\x20when\x20the\x20token\x20is\x20used\x20in\x20that\x20env.\x20Example:\x20{\x20\x22production\x22:\x20[\x22data:read\x22],\x20\x22staging\x22:\x20[\x22data:read\x22,\x20\x22data:write\x22]\x20}.','additionalProperties':{'type':'array','items':{'type':_0x4b1290(0xf7a)}}},'name':{'type':_0x4b1290(0xf7a),'description':_0x4b1290(0x53c)},'password':{'type':'string','description':_0x4b1290(0x9e1)},'ttl':{'type':_0x4b1290(0x10f2),'description':_0x4b1290(0xda3)}},'additionalProperties':![]},'outputSchema':{'type':_0x4b1290(0xb36),'additionalProperties':!![]},'access':{'audiences':['http','shell',_0x4b1290(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x4b1290(0xe5c)},'safety':{'access':_0x4b1290(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':'admin','action':_0x4b1290(0x9bb)}}),_0xebcc3[_0x4b1290(0x33c)](_0x4b1290(0x929),_0x4b1290(0x87c),()=>{const _0x2c7968=_0x4b1290,_0x87d900=_0x1d611c[_0x2c7968(0xc65)],_0xd67827=[];if(_0x87d900&&_0x87d900[_0x2c7968(0x7c0)](_0x2c7968(0xbb0)))for(const {key:_0x1a2b32,value:_0x538bdd}of _0x87d900['getRange']('~tokens')){_0xd67827['push']({'id':_0x1a2b32,'label':_0x538bdd['label'],'name':_0x538bdd[_0x2c7968(0x1173)],'permissions':_0x538bdd[_0x2c7968(0x6c9)],'grants':_0x538bdd['grants'],'createdAt':_0x538bdd[_0x2c7968(0x1156)],'lastUsedAt':_0x538bdd['lastUsedAt'],'expiresAt':_0x538bdd[_0x2c7968(0xa92)]??null,'source':_0x2c7968(0x1143)});}return{'result':_0xd67827};},{'id':_0x4b1290(0x4d3),'summary':_0x4b1290(0xa02),'description':_0x4b1290(0x4fa),'tags':[_0x4b1290(0x93f)],'inputSchema':{'type':_0x4b1290(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0x4b1290(0xf9d),'items':{'type':_0x4b1290(0xb36)}},'access':{'audiences':['http',_0x4b1290(0xd14),_0x4b1290(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'auth:read'},'safety':{'access':_0x4b1290(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x4b1290(0x90a),'action':_0x4b1290(0xcd0),'readOnlyHint':!![]}}),_0xebcc3[_0x4b1290(0x33c)](_0x4b1290(0x929),_0x4b1290(0x8aa),({params:_0x1d26f4})=>{const _0x3733bb=_0x4b1290,_0x3e6b7e=_0x1d611c[_0x3733bb(0xc65)];if(_0x3e6b7e&&_0x3e6b7e[_0x3733bb(0x7c0)](_0x3733bb(0xbb0))){const _0x2c90e0=_0x3e6b7e[_0x3733bb(0xbeb)](_0x3733bb(0xbb0),_0x1d26f4['id']);if(_0x2c90e0)return{'data':{'id':_0x1d26f4['id'],'label':_0x2c90e0[_0x3733bb(0x757)],'name':_0x2c90e0[_0x3733bb(0x1173)],'permissions':_0x2c90e0['permissions'],'grants':_0x2c90e0[_0x3733bb(0x912)],'createdAt':_0x2c90e0[_0x3733bb(0x1156)],'lastUsedAt':_0x2c90e0[_0x3733bb(0x73f)],'expiresAt':_0x2c90e0['expiresAt']??null,'source':_0x3733bb(0x1143)}};}const _0x279059=new Error(_0x3733bb(0x5ab));_0x279059[_0x3733bb(0xfcd)]=0x194;throw _0x279059;},{'id':'auth_token_get','summary':_0x4b1290(0x5a9),'description':_0x4b1290(0x1002),'tags':[_0x4b1290(0x93f)],'inputSchema':{'type':_0x4b1290(0xb36),'properties':{'id':{'type':_0x4b1290(0xf7a),'description':_0x4b1290(0x27c)}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x4b1290(0x9f4),_0x4b1290(0xd14),_0x4b1290(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x4b1290(0x9dc)},'safety':{'access':_0x4b1290(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x4b1290(0x11cc)},'mcp':{'capability':_0x4b1290(0x90a),'action':_0x4b1290(0x905),'readOnlyHint':!![]}}),_0xebcc3['add']('PATCH',_0x4b1290(0x8aa),async({params:_0x45136c,body:_0x8d2989})=>{const _0x443891=_0x4b1290,_0x1b7d14=_0x1d611c[_0x443891(0xc65)];if(!_0x1b7d14||!_0x1b7d14[_0x443891(0x7c0)](_0x443891(0xbb0))){const _0x59787b=new Error(_0x443891(0x5ab));_0x59787b[_0x443891(0xfcd)]=0x194;throw _0x59787b;}const _0x38a79d=_0x1b7d14[_0x443891(0xbeb)](_0x443891(0xbb0),_0x45136c['id']);if(!_0x38a79d){const _0xf91c5e=new Error('Token\x20not\x20found');_0xf91c5e['status']=0x194;throw _0xf91c5e;}const _0x167840={'label':_0x8d2989?.[_0x443891(0x757)]!==undefined?_0x8d2989[_0x443891(0x757)]:_0x38a79d[_0x443891(0x757)],'permissions':_0x8d2989?.[_0x443891(0x6c9)]!==undefined?_0x8d2989[_0x443891(0x6c9)]:_0x38a79d[_0x443891(0x6c9)],'grants':_0x8d2989?.[_0x443891(0x912)]!==undefined?_0x8d2989[_0x443891(0x912)]:_0x38a79d['grants'],'name':_0x8d2989?.[_0x443891(0x1173)]!==undefined?_0x8d2989['name']:_0x38a79d[_0x443891(0x1173)],'passwordHash':_0x38a79d['passwordHash'],'expiresAt':_0x8d2989?.[_0x443891(0xa92)]!==undefined?_0x8d2989[_0x443891(0xa92)]||null:_0x38a79d[_0x443891(0xa92)]??null},_0x1ea927=_0x38a79d[_0x443891(0x1173)]??null;if(_0x8d2989?.[_0x443891(0x1173)]&&_0x8d2989[_0x443891(0x1173)]!==_0x1ea927){let _0x2d6987=null;for(const {key:_0x5b51fa,value:_0x31cdc}of _0x1b7d14['query']('~tokens',{'name':_0x8d2989[_0x443891(0x1173)]})){if(_0x5b51fa!==_0x45136c['id']){_0x2d6987=_0x31cdc[_0x443891(0x757)]||_0x443891(0x851)+_0x5b51fa+')';break;}}if(_0x2d6987!==null){const _0xdb338d=new Error(_0x443891(0xae)+_0x8d2989[_0x443891(0x1173)]+_0x443891(0x73d)+_0x2d6987+'\x22');_0xdb338d[_0x443891(0xfcd)]=0x199;throw _0xdb338d;}}_0x8d2989?.[_0x443891(0x1e8)]!==undefined&&(_0x167840[_0x443891(0xab5)]=await _0x321094['hashPassword'](_0x8d2989[_0x443891(0x1e8)]));const _0x10d493={..._0x38a79d,..._0x167840},_0x4ac216=_0x167840[_0x443891(0xa92)]?Math[_0x443891(0x10bf)](0x1,_0x167840[_0x443891(0xa92)]-Date['now']()):null;return await _0x1b7d14[_0x443891(0x92c)](_0x443891(0xbb0),_0x45136c['id'],_0x10d493,_0x4ac216?{'ttl':_0x4ac216}:{}),{'data':{'id':_0x45136c['id'],'label':_0x10d493[_0x443891(0x757)],'name':_0x10d493['name'],'permissions':_0x10d493[_0x443891(0x6c9)],'grants':_0x10d493['grants'],'createdAt':_0x10d493[_0x443891(0x1156)],'lastUsedAt':_0x10d493[_0x443891(0x73f)],'expiresAt':_0x10d493[_0x443891(0xa92)]??null,'source':'cluster'}};},{'id':_0x4b1290(0x1e3),'summary':'Update\x20token','description':'Updates\x20a\x20token\x20(label,\x20permissions,\x20grants,\x20or\x20password).','tags':[_0x4b1290(0x93f)],'inputSchema':{'type':'object','properties':{'id':{'type':'string','description':_0x4b1290(0x27c)},'label':{'type':_0x4b1290(0xf7a),'description':_0x4b1290(0x4c1)},'permissions':{'type':'array','items':{'type':_0x4b1290(0xf7a)},'description':_0x4b1290(0x561)},'grants':{'type':_0x4b1290(0xb36),'description':_0x4b1290(0x1057)},'name':{'type':_0x4b1290(0xf7a),'description':'Username'},'password':{'type':_0x4b1290(0xf7a),'description':_0x4b1290(0x2df)},'expiresAt':{'type':[_0x4b1290(0x10f2),_0x4b1290(0x11e)],'description':'Expiry\x20timestamp\x20(ms),\x20null\x20to\x20remove'}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x4b1290(0x9f4),_0x4b1290(0xd14),_0x4b1290(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'auth:write'},'safety':{'access':_0x4b1290(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x4b1290(0xcd7)},'mcp':{'capability':_0x4b1290(0x90a),'action':_0x4b1290(0x163)}}),_0xebcc3[_0x4b1290(0x33c)](_0x4b1290(0x42f),'/api/auth/tokens/:id',async({params:_0x591452})=>{const _0xccc49=_0x4b1290,_0x1240da=_0x1d611c[_0xccc49(0xc65)];if(!_0x1240da||!_0x1240da[_0xccc49(0x7c0)]('~tokens')){const _0x4e1ded=new Error(_0xccc49(0x5ab));_0x4e1ded[_0xccc49(0xfcd)]=0x194;throw _0x4e1ded;}const _0x431d37=_0x1240da['get'](_0xccc49(0xbb0),_0x591452['id']);if(!_0x431d37){const _0xe90abb=new Error(_0xccc49(0x5ab));_0xe90abb[_0xccc49(0xfcd)]=0x194;throw _0xe90abb;}return await _0x1240da[_0xccc49(0x21e)](_0xccc49(0xbb0),_0x591452['id']),{'ok':!![]};},{'id':_0x4b1290(0xc09),'summary':'Delete\x20token','description':_0x4b1290(0xe57),'tags':[_0x4b1290(0x93f)],'inputSchema':{'type':_0x4b1290(0xb36),'properties':{'id':{'type':_0x4b1290(0xf7a),'description':_0x4b1290(0x27c)}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x4b1290(0x9f4),_0x4b1290(0xd14),_0x4b1290(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'auth:write'},'safety':{'access':_0x4b1290(0x61d),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x4b1290(0x90a),'action':_0x4b1290(0xc80)}});},auth;}var views,hasRequiredViews;function requireViews(){if(hasRequiredViews)return views;hasRequiredViews=0x1;const {resolveEnv:_0x4d2ad2}=require_helpers(),{OKDBError:_0x5695cd}=requireOkdbError();return views=function _0x2f7a25({okdb:_0x534efa,http:_0x5c0c46,api:_0x1f5c97,E:_0x9b9e1a,defaultEnvName:_0x5461ae}){const _0x194f64=_0x47ab;_0x5c0c46[_0x194f64(0x33c)](_0x194f64(0x929),_0x194f64(0x791)+_0x9b9e1a+'/views',async({params:_0x350846})=>{const _0x461f89=_0x194f64,_0x31c0b1=_0x4d2ad2(_0x534efa,_0x350846[_0x461f89(0x30b)]),_0x58a7fa=await _0x31c0b1[_0x461f89(0xaa5)][_0x461f89(0x63e)]();return{'result':_0x58a7fa};},{'id':_0x194f64(0xf7f),'summary':_0x194f64(0xae4),'description':'Returns\x20the\x20names\x20of\x20all\x20views\x20in\x20the\x20selected\x20environment.','tags':['views'],'inputSchema':{'type':_0x194f64(0xb36),'properties':{'env':{'type':_0x194f64(0xf7a),'default':_0x5461ae,'description':_0x194f64(0xde1)}},'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0x194f64(0xf7a)}},'access':{'audiences':['http',_0x194f64(0xd14),_0x194f64(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'views:read','scope':{'env':_0x194f64(0xd46)}},'safety':{'access':_0x194f64(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x194f64(0x11cc)},'mcp':{'capability':'views','action':_0x194f64(0x527),'readOnlyHint':!![]}}),_0x5c0c46[_0x194f64(0x33c)](_0x194f64(0x929),_0x194f64(0x791)+_0x9b9e1a+_0x194f64(0xe9f),({params:_0x1de4e7})=>{const _0x8b9ac3=_0x194f64,_0x5dcd62=_0x4d2ad2(_0x534efa,_0x1de4e7[_0x8b9ac3(0x30b)]),_0x4c329d=_0x5dcd62[_0x8b9ac3(0xaa5)][_0x8b9ac3(0xbeb)](_0x1de4e7[_0x8b9ac3(0x1173)]);if(_0x4c329d===null){const _0x224cd1=new Error('View\x20not\x20found:\x20'+_0x1de4e7[_0x8b9ac3(0x1173)]);_0x224cd1[_0x8b9ac3(0xfcd)]=0x194;throw _0x224cd1;}return{'result':_0x4c329d};},{'id':_0x194f64(0x784),'summary':_0x194f64(0xa74),'description':_0x194f64(0xcc1),'tags':['views'],'inputSchema':{'type':_0x194f64(0xb36),'properties':{'env':{'type':_0x194f64(0xf7a),'default':_0x5461ae,'description':_0x194f64(0xde1)},'name':{'type':'string','description':'View\x20name'}},'required':['name'],'additionalProperties':![]},'outputSchema':{'type':_0x194f64(0xb36),'additionalProperties':!![]},'access':{'audiences':['http','shell',_0x194f64(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'views:read','scope':{'env':_0x194f64(0xd46)}},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x194f64(0x11cc)},'mcp':{'capability':_0x194f64(0xaa5),'action':_0x194f64(0x5be),'readOnlyHint':!![]}}),_0x5c0c46[_0x194f64(0x33c)]('GET','/api'+_0x9b9e1a+_0x194f64(0xec0),({params:_0x56e3ad})=>{const _0x5cf26a=_0x194f64,_0x25a72b=_0x4d2ad2(_0x534efa,_0x56e3ad['env']),_0x1d5dca=_0x25a72b[_0x5cf26a(0xaa5)][_0x5cf26a(0x938)](_0x56e3ad['name']);if(_0x1d5dca===null){const _0x3ef8fb=new Error(_0x5cf26a(0x90f)+_0x56e3ad[_0x5cf26a(0x1173)]);_0x3ef8fb[_0x5cf26a(0xfcd)]=0x194;throw _0x3ef8fb;}return{'result':_0x1d5dca};},{'id':_0x194f64(0x28e),'summary':_0x194f64(0xc07),'description':'Returns\x20the\x20meta\x20information\x20(state,\x20clock,\x20error,\x20refs)\x20for\x20the\x20named\x20view.','tags':[_0x194f64(0xaa5)],'inputSchema':{'type':_0x194f64(0xb36),'properties':{'env':{'type':_0x194f64(0xf7a),'default':_0x5461ae,'description':_0x194f64(0xde1)},'name':{'type':_0x194f64(0xf7a),'description':_0x194f64(0x1152)}},'required':['name'],'additionalProperties':![]},'outputSchema':{'type':_0x194f64(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x194f64(0x9f4),_0x194f64(0xd14),_0x194f64(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x194f64(0x97b),'scope':{'env':'params.env'}},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x194f64(0x11cc)},'mcp':{'capability':'views','action':_0x194f64(0x115a),'readOnlyHint':!![]}}),_0x5c0c46[_0x194f64(0x33c)](_0x194f64(0x929),_0x194f64(0x791)+_0x9b9e1a+'/views/:name/definition',async({params:_0x2becb0})=>{const _0x2d117b=_0x194f64,_0x3ed6a2=_0x4d2ad2(_0x534efa,_0x2becb0[_0x2d117b(0x30b)]),_0x4a7e7e=await _0x3ed6a2[_0x2d117b(0xaa5)][_0x2d117b(0x1045)](_0x2becb0[_0x2d117b(0x1173)]);if(_0x4a7e7e===null){const _0x2bf021=new Error('View\x20not\x20found:\x20'+_0x2becb0[_0x2d117b(0x1173)]);_0x2bf021[_0x2d117b(0xfcd)]=0x194;throw _0x2bf021;}return{'result':_0x4a7e7e};},{'id':_0x194f64(0xb70),'summary':'Get\x20view\x20definition','description':_0x194f64(0xf4c),'tags':[_0x194f64(0xaa5)],'inputSchema':{'type':_0x194f64(0xb36),'properties':{'env':{'type':_0x194f64(0xf7a),'default':_0x5461ae,'description':_0x194f64(0xde1)},'name':{'type':_0x194f64(0xf7a),'description':_0x194f64(0x1152)}},'required':[_0x194f64(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0x194f64(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x194f64(0x9f4),_0x194f64(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x194f64(0x97b),'scope':{'env':'params.env'}},'safety':{'access':_0x194f64(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x194f64(0x11cc)},'mcp':{'capability':_0x194f64(0xaa5),'action':'get_view_definition','readOnlyHint':!![]}}),_0x5c0c46[_0x194f64(0x33c)](_0x194f64(0xe46),'/api'+_0x9b9e1a+'/views',async({params:_0x1a1047,body:_0x30f790})=>{const _0x5509f4=_0x194f64,_0x5b1883=_0x4d2ad2(_0x534efa,_0x1a1047[_0x5509f4(0x30b)]),{name:_0x1ddf46,..._0x3a4706}=_0x30f790??{},_0x384f71=await _0x5b1883['views']['create'](_0x1ddf46,_0x3a4706);return{'result':_0x384f71};},{'id':_0x194f64(0x9eb),'summary':_0x194f64(0x11ca),'description':_0x194f64(0x11e1),'tags':['views'],'inputSchema':{'type':'object','properties':{'env':{'type':_0x194f64(0xf7a),'default':_0x5461ae,'description':_0x194f64(0xde1)},'name':{'type':_0x194f64(0xf7a),'description':_0x194f64(0x1196)},'type':{'type':_0x194f64(0xf7a),'description':_0x194f64(0x1b0)},'reduce':{'type':_0x194f64(0xb36),'description':_0x194f64(0xf23),'additionalProperties':!![],'minProperties':0x1},'filter':{'type':_0x194f64(0xb36),'description':_0x194f64(0x285),'additionalProperties':!![]},'map':{'type':_0x194f64(0xb36),'description':_0x194f64(0xa95),'additionalProperties':!![]}},'required':[_0x194f64(0x1173),_0x194f64(0xaee),_0x194f64(0xce)],'additionalProperties':!![]},'outputSchema':{'type':'object','properties':{'name':{'type':_0x194f64(0xf7a)}}},'access':{'audiences':[_0x194f64(0x9f4),_0x194f64(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x194f64(0xc35),'scope':{'env':_0x194f64(0xd46)}},'safety':{'access':_0x194f64(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x194f64(0xcd7)},'mcp':{'capability':_0x194f64(0xaa5),'action':_0x194f64(0xea6)}}),_0x5c0c46[_0x194f64(0x33c)](_0x194f64(0x42f),'/api'+_0x9b9e1a+_0x194f64(0xe9f),async({params:_0x41f978,body:_0x4ce8ee})=>{const _0x3f2e0c=_0x194f64,_0x505fb4=_0x4d2ad2(_0x534efa,_0x41f978[_0x3f2e0c(0x30b)]),_0x379fdd={};if(_0x4ce8ee?.[_0x3f2e0c(0x106)])_0x379fdd['managedIndexes']=_0x4ce8ee[_0x3f2e0c(0x106)];try{await _0x505fb4[_0x3f2e0c(0xaa5)]['remove'](_0x41f978[_0x3f2e0c(0x1173)],_0x379fdd);}catch(_0xf78176){if(_0xf78176 instanceof _0x5695cd&&_0xf78176[_0x3f2e0c(0x1f8)]===_0x3f2e0c(0xe30)){const _0x3bfba4=new Error(_0xf78176['message']);_0x3bfba4[_0x3f2e0c(0xfcd)]=0x199,_0x3bfba4[_0x3f2e0c(0x1f8)]=_0xf78176[_0x3f2e0c(0x1f8)],_0x3bfba4[_0x3f2e0c(0x933)]=_0xf78176[_0x3f2e0c(0x933)];throw _0x3bfba4;}throw _0xf78176;}return{'result':null};},{'id':_0x194f64(0x345),'summary':_0x194f64(0x1080),'description':'Removes\x20the\x20named\x20view\x20from\x20the\x20selected\x20environment.','tags':[_0x194f64(0xaa5)],'inputSchema':{'type':_0x194f64(0xb36),'properties':{'env':{'type':'string','default':_0x5461ae,'description':_0x194f64(0xde1)},'name':{'type':_0x194f64(0xf7a),'description':_0x194f64(0x1152)},'managedIndexes':{'type':[_0x194f64(0xf7a),_0x194f64(0x11e)],'enum':[_0x194f64(0xca4),_0x194f64(0xcc0),null],'description':'How\x20to\x20handle\x20indexes\x20owned\x20by\x20this\x20view.\x20\x22drop\x22\x20drops\x20them;\x20\x22keep\x22\x20retains\x20them.\x20Required\x20if\x20the\x20view\x20owns\x20orphaned\x20indexes.'}},'required':[_0x194f64(0x1173)],'additionalProperties':![]},'outputSchema':{'type':'null'},'access':{'audiences':[_0x194f64(0x9f4),'shell',_0x194f64(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x194f64(0xc35),'scope':{'env':_0x194f64(0xd46)}},'safety':{'access':'write','destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x194f64(0xcd7)},'mcp':{'capability':_0x194f64(0xaa5),'action':_0x194f64(0x297)}}),_0x5c0c46[_0x194f64(0x33c)](_0x194f64(0xe46),_0x194f64(0x791)+_0x9b9e1a+_0x194f64(0x89f),async({params:_0x341606})=>{const _0x4dbf4e=_0x194f64,_0x3fcb53=_0x4d2ad2(_0x534efa,_0x341606[_0x4dbf4e(0x30b)]);return await _0x3fcb53[_0x4dbf4e(0xaa5)][_0x4dbf4e(0x1fe)](_0x341606['name']),{'result':{'ok':!![]}};},{'id':'views_stop','summary':_0x194f64(0xf91),'description':_0x194f64(0x4da),'tags':[_0x194f64(0xaa5)],'inputSchema':{'type':_0x194f64(0xb36),'properties':{'env':{'type':_0x194f64(0xf7a),'default':_0x5461ae,'description':_0x194f64(0xde1)},'name':{'type':_0x194f64(0xf7a),'description':'View\x20name'}},'required':[_0x194f64(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0x194f64(0xb36),'properties':{'ok':{'type':_0x194f64(0x854)}}},'access':{'audiences':[_0x194f64(0x9f4),_0x194f64(0xd14),_0x194f64(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x194f64(0xc35),'scope':{'env':_0x194f64(0xd46)}},'safety':{'access':_0x194f64(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x194f64(0x11cc)},'mcp':{'capability':_0x194f64(0xaa5),'action':'stop_view'}}),_0x5c0c46[_0x194f64(0x33c)](_0x194f64(0xe46),_0x194f64(0x791)+_0x9b9e1a+_0x194f64(0x4b8),async({params:_0x1450c0})=>{const _0x1ebba5=_0x194f64,_0x196a87=_0x4d2ad2(_0x534efa,_0x1450c0['env']);return await _0x196a87[_0x1ebba5(0xaa5)]['start'](_0x1450c0[_0x1ebba5(0x1173)]),{'result':{'ok':!![]}};},{'id':_0x194f64(0x80c),'summary':_0x194f64(0xe49),'description':_0x194f64(0xdb0),'tags':['views'],'inputSchema':{'type':'object','properties':{'env':{'type':_0x194f64(0xf7a),'default':_0x5461ae,'description':_0x194f64(0xde1)},'name':{'type':_0x194f64(0xf7a),'description':_0x194f64(0x1152)}},'required':['name'],'additionalProperties':![]},'outputSchema':{'type':_0x194f64(0xb36),'properties':{'ok':{'type':'boolean'}}},'access':{'audiences':['http',_0x194f64(0xd14),_0x194f64(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x194f64(0xc35),'scope':{'env':_0x194f64(0xd46)}},'safety':{'access':_0x194f64(0x61d),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x194f64(0x11cc)},'mcp':{'capability':_0x194f64(0xaa5),'action':'start_view'}}),_0x5c0c46['add'](_0x194f64(0xe46),_0x194f64(0x791)+_0x9b9e1a+'/views/:name/rebuild',async({params:_0x12cddd})=>{const _0x57c762=_0x194f64,_0x2d7c02=_0x4d2ad2(_0x534efa,_0x12cddd[_0x57c762(0x30b)]);return await _0x2d7c02['views'][_0x57c762(0x11ab)](_0x12cddd[_0x57c762(0x1173)]),{'result':{'ok':!![]}};},{'id':_0x194f64(0x964),'summary':_0x194f64(0x1204),'description':_0x194f64(0xdbf),'tags':[_0x194f64(0xaa5)],'inputSchema':{'type':_0x194f64(0xb36),'properties':{'env':{'type':_0x194f64(0xf7a),'default':_0x5461ae,'description':_0x194f64(0xde1)},'name':{'type':_0x194f64(0xf7a),'description':_0x194f64(0x1152)}},'required':[_0x194f64(0x1173)],'additionalProperties':![]},'outputSchema':{'type':'object','properties':{'ok':{'type':_0x194f64(0x854)}}},'access':{'audiences':['http','shell',_0x194f64(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x194f64(0xc35),'scope':{'env':_0x194f64(0xd46)}},'safety':{'access':_0x194f64(0x61d),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x194f64(0x11cc)},'mcp':{'capability':_0x194f64(0xaa5),'action':_0x194f64(0xa77)}});},views;}var okdbApi,hasRequiredOkdbApi;function requireOkdbApi(){const _0x15edd7=_0xef8cd8;if(hasRequiredOkdbApi)return okdbApi;hasRequiredOkdbApi=0x1;const _0x233995=requireAdmin(),_0x288d97=requireEnvs(),_0x3c226b=requireSystem(),_0x3b3fad=requireFunctionsRegistry(),_0x1172ed=requireFunctionsExec(),_0x5c5afa=requireTypes(),_0x7dfeb=requireItems(),_0x428b60=requireTtl(),_0x2528c7=requireIndexes(),_0x338876=requireFts(),_0x406686=requireAuth(),_0x49f682=requireViews();class _0xa8e827{constructor(_0x3b03e1){const _0x53947e=_0x47ab;this['okdb']=_0x3b03e1,this[_0x53947e(0x5d6)](),this['_register']();}['_deepSchemaCache']=new Map();[_0x15edd7(0x28b)](_0x502791){const _0x25de4d=_0x15edd7;if(!_0x502791||typeof _0x502791!==_0x25de4d(0xb36)||Array[_0x25de4d(0x10f5)](_0x502791))return![];const _0x3e4f8c=_0x502791[_0x25de4d(0xe4d)]??_0x502791[_0x25de4d(0x7b8)],_0x49af83=_0x502791[_0x25de4d(0xb29)]??_0x502791[_0x25de4d(0x4d5)]??_0x502791[_0x25de4d(0x3aa)];if(typeof _0x3e4f8c===_0x25de4d(0x9f0)&&typeof _0x49af83===_0x25de4d(0x9f0))return _0x3e4f8c>=-0x5a&&_0x3e4f8c<=0x5a&&_0x49af83>=-0xb4&&_0x49af83<=0xb4;if(_0x502791[_0x25de4d(0xaee)]===_0x25de4d(0xd8f)&&Array[_0x25de4d(0x10f5)](_0x502791[_0x25de4d(0xc90)])&&_0x502791[_0x25de4d(0xc90)][_0x25de4d(0x156)]>=0x2)return typeof _0x502791[_0x25de4d(0xc90)][0x0]===_0x25de4d(0x9f0)&&typeof _0x502791['coordinates'][0x1]===_0x25de4d(0x9f0);return![];}[_0x15edd7(0xa08)](_0x160727,_0x491bb8,_0x54accf,_0x2b847c){const _0x49395e=_0x15edd7;if(_0x2b847c>0x6||!_0x160727||typeof _0x160727!==_0x49395e(0xb36)||Array[_0x49395e(0x10f5)](_0x160727))return;for(const [_0x1a7873,_0x53e077]of Object[_0x49395e(0x1129)](_0x160727)){const _0x5d6bc2=_0x491bb8?_0x491bb8+'.'+_0x1a7873:_0x1a7873,_0x4f1ea0=_0x53e077===null?'null':Array['isArray'](_0x53e077)?'array':typeof _0x53e077!==_0x49395e(0xb36)?typeof _0x53e077:this[_0x49395e(0x28b)](_0x53e077)?'geo':'object';(_0x54accf[_0x5d6bc2]??=new Set())[_0x49395e(0x33c)](_0x4f1ea0);if(_0x4f1ea0===_0x49395e(0xb36))this[_0x49395e(0xa08)](_0x53e077,_0x5d6bc2,_0x54accf,_0x2b847c+0x1);}}[_0x15edd7(0x5fa)](_0x518792,_0x380120,_0x80a45d=0x12c){const _0x255757=_0x15edd7,_0xddae99=_0x518792[_0x255757(0x9ca)](_0x380120),_0x33b4d6=_0xddae99[_0x255757(0xc88)][_0x255757(0x7df)]();if(_0x33b4d6===0x0)return{'paths':{},'sampled':0x0};const _0x220181=Math[_0x255757(0x10bf)](0x1,Math[_0x255757(0xf9a)](_0x33b4d6/_0x80a45d)),_0x4475b0={};let _0x1fdca2=0x0,_0x34f2cb=0x0;for(const {value:_0x9e332e}of _0xddae99[_0x255757(0xc88)][_0x255757(0x9ce)]()){if(_0x34f2cb%_0x220181===0x0){this[_0x255757(0xa08)](_0x9e332e,'',_0x4475b0,0x0),_0x1fdca2++;if(_0x1fdca2>=_0x80a45d)break;}_0x34f2cb++;}const _0x30e433={};for(const [_0x4efe32,_0x28d341]of Object[_0x255757(0x1129)](_0x4475b0))_0x30e433[_0x4efe32]=[..._0x28d341][_0x255757(0x3f6)]();return{'paths':_0x30e433,'sampled':_0x1fdca2};}[_0x15edd7(0x74a)](_0x1419f6,_0x4d9deb,_0x2f3f6e=![]){const _0x32f599=_0x15edd7,_0x38140b=_0x1419f6[_0x32f599(0x1173)]+':'+_0x4d9deb,_0x4cdc20=this[_0x32f599(0xb4d)][_0x32f599(0xbeb)](_0x38140b),_0x3289f6=_0x1419f6['getClock'](_0x4d9deb);if(_0x4cdc20&&!_0x2f3f6e&&_0x4cdc20[_0x32f599(0xabe)]===_0x3289f6)return{'paths':_0x4cdc20[_0x32f599(0x389)],'sampled':_0x4cdc20[_0x32f599(0xf59)],'stale':![]};if(_0x4cdc20&&!_0x2f3f6e&&!_0x4cdc20[_0x32f599(0x349)])return _0x4cdc20['computing']=!![],setImmediate(()=>{const _0x55a9a5=_0x32f599;try{const _0x216157=this[_0x55a9a5(0x5fa)](_0x1419f6,_0x4d9deb);this['_deepSchemaCache'][_0x55a9a5(0x211)](_0x38140b,{..._0x216157,'clockAtScan':_0x3289f6,'computing':![]});}catch{this[_0x55a9a5(0xb4d)][_0x55a9a5(0x3b3)](_0x38140b);}}),{'paths':_0x4cdc20['paths'],'sampled':_0x4cdc20['sampled'],'stale':!![]};if(_0x4cdc20?.[_0x32f599(0x349)])return{'paths':_0x4cdc20[_0x32f599(0x389)],'sampled':_0x4cdc20[_0x32f599(0xf59)],'stale':!![]};const _0x443cc9=this[_0x32f599(0x5fa)](_0x1419f6,_0x4d9deb);return this[_0x32f599(0xb4d)][_0x32f599(0x211)](_0x38140b,{..._0x443cc9,'clockAtScan':_0x3289f6,'computing':![]}),{..._0x443cc9,'stale':![]};}['_registerAuthGuard'](){const _0x420e3f=_0x15edd7,_0x191d0d=this['okdb'],_0x47dc8a=_0x191d0d[_0x420e3f(0x9f4)];_0x47dc8a[_0x420e3f(0xddb)](_0x45e822=>_0x45e822[_0x420e3f(0x20b)][_0x420e3f(0x8ba)](_0x420e3f(0x791)),async(_0x40fcf3,_0x55c19b)=>{const _0x51017c=_0x420e3f;if(_0x40fcf3['context']?.[_0x51017c(0xbf9)]===!![])return!![];if(_0x40fcf3[_0x51017c(0x339)]?.[_0x51017c(0x93f)]?.[_0x51017c(0xb77)])return!![];const _0x55bef5=await _0x191d0d['auth'][_0x51017c(0x617)](_0x40fcf3);if(_0x55bef5?.[_0x51017c(0xb77)])return _0x40fcf3[_0x51017c(0x339)]['auth']=_0x55bef5,_0x40fcf3[_0x51017c(0x339)][_0x51017c(0x45b)]=_0x55bef5[_0x51017c(0x45b)]||_0x55bef5,!![];return _0x55c19b['status'](0x191),_0x55c19b[_0x51017c(0x771)]({'error':_0x51017c(0x6ce)}),![];});}[_0x15edd7(0xc10)](){const _0x403773=_0x15edd7,_0x3518fb=this[_0x403773(0xd4f)],_0x863c6b=_0x3518fb[_0x403773(0x9f4)],_0x91d8fa=_0x3518fb['options']?.[_0x403773(0x1f5)]?.[_0x403773(0xb13)]??_0x403773(0x8d0),_0x11871e=_0x403773(0xeca)+_0x91d8fa+']',_0x248f69={'okdb':_0x3518fb,'http':_0x863c6b,'api':this,'E':_0x11871e,'defaultEnvName':_0x91d8fa};_0x233995(_0x248f69),_0x3c226b(_0x248f69),_0x288d97(_0x248f69),_0x3b3fad(_0x248f69),_0x1172ed(_0x248f69),_0x406686(_0x248f69),_0x5c5afa(_0x248f69),_0x7dfeb(_0x248f69),_0x428b60(_0x248f69),_0x2528c7(_0x248f69),_0x338876(_0x248f69),_0x49f682(_0x248f69);}}return okdbApi=_0xa8e827,okdbApi;}var okdbAdminCatalog,hasRequiredOkdbAdminCatalog;function requireOkdbAdminCatalog(){const _0x5cb012=_0xef8cd8;if(hasRequiredOkdbAdminCatalog)return okdbAdminCatalog;hasRequiredOkdbAdminCatalog=0x1;const {NAMESPACES:_0x5893fc,IMPLIED_BY:_0x2e21f1,OP_ORDER:_0x40a7c4}=requireOkdbAuthNamespaces(),_0x280df9=[_0x5cb012(0x30b),'system',_0x5cb012(0xd6b)];function _0xe96d05({http:_0x255aa9,allowedEnvs:_0x3bfae2}){const _0x364403=_0x5cb012,_0x5a9493={};for(const [_0x2f1625,_0x3b687d]of Object[_0x364403(0x1129)](_0x5893fc)){_0x5a9493[_0x2f1625]={'label':_0x3b687d[_0x364403(0x757)],'scope':_0x3b687d[_0x364403(0x85b)],'description':_0x3b687d['description'],'operations':{}};for(const [_0x389f24,_0x11ca54]of Object[_0x364403(0x1129)](_0x3b687d[_0x364403(0xead)])){_0x5a9493[_0x2f1625]['operations'][_0x389f24]={'label':_0x11ca54[_0x364403(0x757)],'summary':_0x11ca54[_0x364403(0x541)],'routes':[],..._0x11ca54['machineOnly']?{'machineOnly':!![]}:{}};}}for(const _0x31f790 of _0x255aa9[_0x364403(0x53a)]()){const _0x442966=_0x31f790['operation']?.[_0x364403(0x2f8)]?.['permission'];if(!_0x442966)continue;const [_0x3fb1db,_0x47c144]=_0x442966[_0x364403(0xfb1)](':'),_0xa78ba1=_0x5a9493[_0x3fb1db];if(!_0xa78ba1){console[_0x364403(0xf78)](_0x364403(0x289)+_0x31f790['method']+'\x20'+_0x31f790[_0x364403(0x20b)]+'\x20declares\x20permission\x20\x27'+_0x442966+_0x364403(0x430));continue;}const _0x47eea9=_0xa78ba1[_0x364403(0xead)][_0x47c144];if(!_0x47eea9){console['warn'](_0x364403(0x289)+_0x31f790['method']+'\x20'+_0x31f790['path']+_0x364403(0x5d7)+_0x442966+_0x364403(0xa81)+_0x47c144+'\x27\x20is\x20not\x20in\x20namespace\x20\x27'+_0x3fb1db+'\x27');continue;}_0x47eea9[_0x364403(0xea2)][_0x364403(0x597)]({'method':_0x31f790[_0x364403(0xfc5)],'path':_0x31f790[_0x364403(0x20b)],'summary':_0x31f790[_0x364403(0x4dd)][_0x364403(0x541)]||'','destructive':!!_0x31f790[_0x364403(0x4dd)][_0x364403(0x653)]?.[_0x364403(0x122d)],'longRunning':!!_0x31f790[_0x364403(0x4dd)][_0x364403(0x653)]?.['longRunning'],'tags':_0x31f790[_0x364403(0x4dd)][_0x364403(0x35b)]||[]});}const _0x4c9497={},_0x224196=Object[_0x364403(0x1129)](_0x5a9493)[_0x364403(0x3f6)](([_0x2f7599,_0xb0bdfe],[_0x32e14f,_0x43988f])=>{const _0x3b7edc=_0x364403,_0x15ab6c=_0x280df9[_0x3b7edc(0x10b8)](_0xb0bdfe['scope']),_0x1f4836=_0x280df9[_0x3b7edc(0x10b8)](_0x43988f[_0x3b7edc(0x85b)]);if(_0x15ab6c!==_0x1f4836)return _0x15ab6c-_0x1f4836;return _0x2f7599['localeCompare'](_0x32e14f);});for(const [_0x211290,_0x315c15]of _0x224196){const _0xa91b90={},_0x502e67=Object[_0x364403(0x1129)](_0x315c15['operations'])[_0x364403(0x3f6)](([_0x2a898d],[_0x3e7e45])=>{const _0x3607c1=_0x364403,_0x473152=_0x40a7c4[_0x3607c1(0x10b8)](_0x2a898d),_0x1cd49f=_0x40a7c4[_0x3607c1(0x10b8)](_0x3e7e45);if(_0x473152===-0x1&&_0x1cd49f===-0x1)return _0x2a898d['localeCompare'](_0x3e7e45);if(_0x473152===-0x1)return 0x1;if(_0x1cd49f===-0x1)return-0x1;return _0x473152-_0x1cd49f;});for(const [_0x2e972e,_0x414795]of _0x502e67){_0xa91b90[_0x2e972e]=_0x414795;}_0x4c9497[_0x211290]={..._0x315c15,'operations':_0xa91b90};}return{'envs':_0x3bfae2,'implies':_0x2e21f1,'opOrder':_0x40a7c4,'namespaces':_0x4c9497};}return okdbAdminCatalog={'buildCatalog':_0xe96d05},okdbAdminCatalog;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x5d0854=_0xef8cd8;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x2fb8aa=require$$0$3,_0x178434=_0x5d0854(0x7f7),_0x8d1f07=new Uint8Array(0x100)[_0x5d0854(0xf7c)](0xff);for(let _0x352238=0x0;_0x352238<_0x178434[_0x5d0854(0x156)];_0x352238++){_0x8d1f07[_0x178434[_0x5d0854(0xd54)](_0x352238)]=_0x352238,_0x8d1f07[_0x178434['charCodeAt'](_0x352238)+0x20]=_0x352238;}_0x8d1f07['O'['charCodeAt'](0x0)]=0x0,_0x8d1f07['o'[_0x5d0854(0xd54)](0x0)]=0x0,_0x8d1f07['I'['charCodeAt'](0x0)]=0x1,_0x8d1f07['i'[_0x5d0854(0xd54)](0x0)]=0x1,_0x8d1f07['L'[_0x5d0854(0xd54)](0x0)]=0x1,_0x8d1f07['l'['charCodeAt'](0x0)]=0x1;function _0x2e6dcf(_0x35cfaf){let _0x29e517=0x0,_0x245a7d=0x0,_0x2421f1='';for(let _0x120c84=0x0;_0x120c84<_0x35cfaf['length'];_0x120c84++){_0x245a7d=_0x245a7d<<0x8|_0x35cfaf[_0x120c84],_0x29e517+=0x8;while(_0x29e517>=0x5){_0x29e517-=0x5,_0x2421f1+=_0x178434[_0x245a7d>>>_0x29e517&0x1f];}}return _0x29e517>0x0&&(_0x2421f1+=_0x178434[_0x245a7d<<0x5-_0x29e517&0x1f]),_0x2421f1;}function _0x189789(_0x11d863){const _0x129483=_0x5d0854;_0x11d863=_0x11d863[_0x129483(0x8d8)](/-/g,'')[_0x129483(0x96d)]();let _0x24b384=0x0,_0x47996e=0x0;const _0x1fbd75=[];for(let _0x5bccf0=0x0;_0x5bccf0<_0x11d863[_0x129483(0x156)];_0x5bccf0++){const _0x4dba7e=_0x8d1f07[_0x11d863[_0x129483(0xd54)](_0x5bccf0)];if(_0x4dba7e===0xff)continue;_0x47996e=_0x47996e<<0x5|_0x4dba7e,_0x24b384+=0x5,_0x24b384>=0x8&&(_0x24b384-=0x8,_0x1fbd75[_0x129483(0x597)](_0x47996e>>>_0x24b384&0xff));}return Buffer[_0x129483(0x9f8)](_0x1fbd75);}const _0x261c4e=[_0x5d0854(0x1034),_0x5d0854(0x7f1),_0x5d0854(0xab8),'fts',_0x5d0854(0x4db),_0x5d0854(0xaa5),_0x5d0854(0xa8b),_0x5d0854(0xf5b)],_0x3d8b36=0x0,_0x1d5126=0x1,_0x40cebf=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x51adf0({issuedAt:_0x117c67,expiresAt:_0x351765,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x3d8b36}){const _0x42f442=_0x5d0854,_0x81c24e=Buffer['from'](licensee,'utf8')[_0x42f442(0xc3c)](0x0,0x40),_0x4bb37a=0x1+0x1+0x4+0x4+0x1+_0x81c24e[_0x42f442(0x156)]+0x2+0x10,_0x5c7480=Buffer['allocUnsafe'](_0x4bb37a);let _0x1ca01e=0x0;_0x5c7480[_0x42f442(0x21c)](0x1,_0x1ca01e++),_0x5c7480[_0x42f442(0x21c)](licenseType,_0x1ca01e++),_0x5c7480[_0x42f442(0x7e0)](Math[_0x42f442(0xf9a)](_0x117c67/0x3e8),_0x1ca01e),_0x1ca01e+=0x4,_0x5c7480['writeUInt32BE'](Math[_0x42f442(0xf9a)](_0x351765/0x3e8),_0x1ca01e),_0x1ca01e+=0x4,_0x5c7480['writeUInt8'](_0x81c24e[_0x42f442(0x156)],_0x1ca01e++),_0x81c24e['copy'](_0x5c7480,_0x1ca01e),_0x1ca01e+=_0x81c24e['length'];let _0x540ca3=0x0;for(let _0x1b2124=0x0;_0x1b2124<_0x261c4e[_0x42f442(0x156)];_0x1b2124++){if(features[_0x261c4e[_0x1b2124]])_0x540ca3|=0x1<<_0x1b2124;}_0x5c7480[_0x42f442(0x5fe)](_0x540ca3,_0x1ca01e),_0x1ca01e+=0x2;const _0x4d1faf=[_0x42f442(0xfcc),_0x42f442(0x486),_0x42f442(0xbd),_0x42f442(0xa1b)];for(const _0x355074 of _0x4d1faf){_0x5c7480[_0x42f442(0x7e0)](limits[_0x355074]||0x0,_0x1ca01e),_0x1ca01e+=0x4;}return _0x5c7480;}function _0x55a18b(_0x4532fe){const _0x6106fa=_0x5d0854;let _0x11051e=0x0;const _0x1fc2e4=_0x4532fe[_0x6106fa(0x9cd)](_0x11051e++),_0x12dde6=_0x4532fe[_0x6106fa(0x9cd)](_0x11051e++),_0x3789fa=_0x4532fe[_0x6106fa(0x628)](_0x11051e);_0x11051e+=0x4;const _0x118c73=_0x4532fe[_0x6106fa(0x628)](_0x11051e);_0x11051e+=0x4;const _0x59d16f=_0x4532fe[_0x6106fa(0x9cd)](_0x11051e++),_0x2ec6c6=_0x4532fe[_0x6106fa(0xc3c)](_0x11051e,_0x11051e+_0x59d16f)[_0x6106fa(0x583)]('utf8');_0x11051e+=_0x59d16f;const _0x5449eb=_0x4532fe['readUInt16BE'](_0x11051e);_0x11051e+=0x2;const _0x2eae0d={};for(let _0x5bcdc6=0x0;_0x5bcdc6<_0x261c4e['length'];_0x5bcdc6++){_0x2eae0d[_0x261c4e[_0x5bcdc6]]=Boolean(_0x5449eb&0x1<<_0x5bcdc6);}const _0x53090c=[_0x6106fa(0xfcc),_0x6106fa(0x486),_0x6106fa(0xbd),_0x6106fa(0xa1b)],_0x31d424={};for(const _0x124ac3 of _0x53090c){const _0x5e3ef2=_0x4532fe[_0x6106fa(0x628)](_0x11051e);_0x11051e+=0x4,_0x31d424[_0x124ac3]=_0x5e3ef2===0x0?null:_0x5e3ef2;}return{'v':_0x1fc2e4,'licenseType':_0x12dde6,'issuedAt':_0x3789fa*0x3e8,'expiresAt':_0x118c73*0x3e8,'licensee':_0x2ec6c6,'features':_0x2eae0d,'limits':_0x31d424};}function _0x4da19c(_0x43b328,_0x22a707){const _0x5c22ca=_0x5d0854,_0x190bde=Buffer[_0x5c22ca(0xbad)]([_0x43b328,_0x22a707]),_0x85d59e=_0x2e6dcf(_0x190bde),_0x493bfe=[];for(let _0x15a523=0x0;_0x15a523<_0x85d59e[_0x5c22ca(0x156)];_0x15a523+=0x8){_0x493bfe['push'](_0x85d59e[_0x5c22ca(0xc3c)](_0x15a523,_0x15a523+0x8));}return _0x493bfe[_0x5c22ca(0x3d9)]('-');}function _0x21160c(_0x37a79a){const _0x50c078=_0x5d0854;if(typeof _0x37a79a!==_0x50c078(0xf7a))throw new Error(_0x50c078(0x6b3));const _0x4f3631=_0x189789(_0x37a79a[_0x50c078(0x8d8)](/-/g,''));if(_0x4f3631[_0x50c078(0x156)]<0x41)throw new Error(_0x50c078(0x778)+_0x4f3631[_0x50c078(0x156)]+_0x50c078(0x29d));const _0x4b1618=_0x4f3631['slice'](0x0,_0x4f3631['length']-0x40),_0x5c773a=_0x4f3631[_0x50c078(0xc3c)](_0x4f3631['length']-0x40);let _0x44bb8e;try{_0x44bb8e=_0x55a18b(_0x4b1618);}catch(_0x506ce7){throw new Error(_0x50c078(0x989)+_0x506ce7[_0x50c078(0xb4e)]);}return{'rawBuf':_0x4f3631,'payload':_0x4b1618,'sig':_0x5c773a,'decoded':_0x44bb8e};}function _0xa33cd(_0x10968d){const _0x1aea38=_0x5d0854;return _0x2fb8aa[_0x1aea38(0x687)](_0x1aea38(0xeee))[_0x1aea38(0xbb7)](_0x10968d)[_0x1aea38(0xdea)]()[_0x1aea38(0xc3c)](0x0,0x8);}function _0x42cf11(_0x276a75,_0x175036,_0x42cb3e){const _0x2f7932=_0x5d0854,_0x57aad9=_0x2f7932(0x16e)+_0x42cb3e,_0x17dc74=Buffer['concat']([Buffer[_0x2f7932(0x9f8)](_0x276a75,_0x2f7932(0x57a)),_0x175036]),_0x2768fb=_0x2fb8aa[_0x2f7932(0x675)](_0x2f7932(0xeee),_0x57aad9)[_0x2f7932(0xbb7)](_0x17dc74)[_0x2f7932(0xdea)](),_0x5a695b=_0x2e6dcf(_0x2768fb[_0x2f7932(0xc3c)](0x0,0x5));return{'pin':_0x5a695b,'pinHmac':_0x2768fb};}function _0x58cb1a(_0x415db0,_0x465ce2,_0x1bb157){const _0x254e42=_0x5d0854,_0x223d60=Buffer[_0x254e42(0x386)](0x4d);let _0x445dc=0x0;_0x223d60[_0x254e42(0x21c)](0x1,_0x445dc++),_0x415db0[_0x254e42(0x444)](_0x223d60,_0x445dc),_0x445dc+=0x8,_0x223d60[_0x254e42(0x7e0)](_0x465ce2,_0x445dc),_0x445dc+=0x4,_0x1bb157['copy'](_0x223d60,_0x445dc);const _0x14887b=_0x2e6dcf(_0x223d60),_0x29a993=[];for(let _0x5c8cb9=0x0;_0x5c8cb9<_0x14887b['length'];_0x5c8cb9+=0x6){_0x29a993['push'](_0x14887b['slice'](_0x5c8cb9,_0x5c8cb9+0x6));}return _0x29a993[_0x254e42(0x3d9)]('-');}function _0x12ae2c(_0x5ed9b0){const _0x244dd6=_0x5d0854;if(typeof _0x5ed9b0!==_0x244dd6(0xf7a))throw new Error(_0x244dd6(0xe92));const _0x48cb06=_0x189789(_0x5ed9b0[_0x244dd6(0x8d8)](/-/g,''));if(_0x48cb06[_0x244dd6(0x156)]!==0x4d)throw new Error(_0x244dd6(0xd6e)+_0x48cb06[_0x244dd6(0x156)]);let _0x1099d4=0x0;const _0x5ea30b=_0x48cb06[_0x244dd6(0x9cd)](_0x1099d4++),_0x458e16=_0x48cb06[_0x244dd6(0xc3c)](_0x1099d4,_0x1099d4+0x8);_0x1099d4+=0x8;const _0x493431=_0x48cb06[_0x244dd6(0x628)](_0x1099d4);_0x1099d4+=0x4;const _0x421896=_0x48cb06[_0x244dd6(0xc3c)](_0x1099d4);return{'v':_0x5ea30b,'licenseHash':_0x458e16,'expiry':_0x493431,'sig':_0x421896};}function _0x36ab4c({tokenString:_0x44c6ff,nodeId:_0x4718cc,rawBlobBuf:_0x193a30,pubKeyPem:_0x3e98f3,pubFingerprint:_0x8a5acd}){const _0x5bac9c=_0x5d0854;let _0x571ad2;try{_0x571ad2=_0x12ae2c(_0x44c6ff);}catch(_0x5f4e89){return{'valid':![],'reason':_0x5bac9c(0x125)};}const _0x122aa2=_0xa33cd(_0x193a30);if(!_0x122aa2[_0x5bac9c(0x390)](_0x571ad2['licenseHash']))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x21d191}=_0x42cf11(_0x4718cc,_0x122aa2,_0x8a5acd),_0x17d9f6=Buffer[_0x5bac9c(0x386)](0x4);_0x17d9f6[_0x5bac9c(0x7e0)](_0x571ad2[_0x5bac9c(0x105)],0x0);const _0x1f49dd=Buffer[_0x5bac9c(0xbad)]([Buffer[_0x5bac9c(0x9f8)]([_0x571ad2['v']]),_0x21d191['slice'](0x0,0x5),_0x571ad2[_0x5bac9c(0x6b9)],_0x17d9f6]);try{const _0x2f2b04=_0x2fb8aa[_0x5bac9c(0xec4)](null,_0x1f49dd,_0x3e98f3,_0x571ad2[_0x5bac9c(0xdd9)]);if(!_0x2f2b04)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0xd2f650){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x571ad2['expiry']<Date[_0x5bac9c(0x555)]()/0x3e8)return{'valid':![],'reason':_0x5bac9c(0xac7)};return{'valid':!![],'reason':'ok'};}function _0x8ff7a2(_0x4fa0ad){const _0x2b8367=_0x5d0854;if(typeof _0x4fa0ad!==_0x2b8367(0xf7a))return _0x2b8367(0xd08);const _0x1c39d7=_0x4fa0ad['trim']();if(_0x1c39d7['startsWith']('/')||_0x1c39d7[_0x2b8367(0x8ba)]('./')||_0x1c39d7['startsWith'](_0x2b8367(0xeff))||/^[A-Za-z]:[\\/]/['test'](_0x1c39d7))return _0x2b8367(0x20b);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x2b8367(0xe10)](_0x1c39d7))return _0x2b8367(0x5cd);const _0x105357=_0x1c39d7[_0x2b8367(0x8d8)](/[\s-]+/g,'')[_0x2b8367(0x156)];if(_0x105357===0x7c)return _0x2b8367(0xc1e);if(_0x105357>=0x95&&_0x105357<=0xfc)return'blob';return _0x2b8367(0xd08);}return okdbLicenseCodec={'toBase32':_0x2e6dcf,'fromBase32':_0x189789,'encodeLicensePayload':_0x51adf0,'decodeLicensePayload':_0x55a18b,'encodeLicenseBlob':_0x4da19c,'decodeLicenseBlob':_0x21160c,'licenseHash':_0xa33cd,'derivePin':_0x42cf11,'encodeActivationToken':_0x58cb1a,'decodeActivationToken':_0x12ae2c,'verifyActivation':_0x36ab4c,'detectInputType':_0x8ff7a2,'FEATURE_NAMES':_0x261c4e,'LICENSE_TYPE_STANDARD':_0x3d8b36,'LICENSE_TYPE_OPEN':_0x1d5126,'OPEN_LICENSE_MAX_DURATION_MS':_0x40cebf},okdbLicenseCodec;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x486a44=_0xef8cd8;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x36d415='-----BEGIN\x20PUBLIC\x20KEY-----\x0aMCowBQYDK2VwAyEAacrkExPrhxNVHyeQBLDwg8xfm1OwyxDAPNdGXABYS2s=\x0a-----END\x20PUBLIC\x20KEY-----',_0x1164ac=_0x486a44(0x10ca);return okdbPubkey={'PUBLIC_KEY_PEM':_0x36d415,'PUB_FINGERPRINT':_0x1164ac},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x35fe58=_0xef8cd8;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x473425=require$$0$1,{OKDBError:_0x19e707}=requireOkdbError(),{EVENTS:_0x2c1cce}=requireOkdbEnums(),_0x18a5d8=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x5eac5d,OPEN_LICENSE_MAX_DURATION_MS:_0x16dfda}=_0x18a5d8,_0x330b93=requireOkdbPubkey(),_0x202002={'LICENSED_BUILD':_0x35fe58(0x7e8),'PUBLIC_KEY_PEM':_0x330b93[_0x35fe58(0x610)],'PUB_FINGERPRINT':_0x330b93[_0x35fe58(0xfbe)],'LICENSE_EXPIRED_ACTION':'log'},_0x5e7165=_0x35fe58(0xc89),_0x303bbe={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x86d9e5(_0x1f160d){const _0x4ea609=_0x35fe58;!_0x1f160d[_0x4ea609(0x7c0)](_0x5e7165)&&await _0x1f160d['registerType'](_0x5e7165);}class _0x220c5f{constructor(_0x268819){const _0x2714c3=_0x35fe58;this['okdb']=_0x268819,this[_0x2714c3(0xe79)]=null;}async[_0x35fe58(0x619)](){const _0x1f30f8=_0x35fe58,_0x4d30d0=this[_0x1f30f8(0xd4f)][_0x1f30f8(0xc65)];if(!_0x4d30d0||!_0x4d30d0[_0x1f30f8(0x7c0)](_0x5e7165)){this[_0x1f30f8(0xe79)]=null;return;}const _0x533468=this[_0x1f30f8(0xd4f)]['id'];let _0x1f70e1=null;for(const {key:_0x271c39,value:_0x50b0bf}of _0x4d30d0['getRange'](_0x5e7165)){const _0x5a91bc=this[_0x1f30f8(0xa5a)](_0x50b0bf,_0x533468);_0x5a91bc===_0x1f30f8(0x43f)&&!_0x1f70e1&&(_0x1f70e1={..._0x50b0bf,'id':_0x271c39,'status':_0x5a91bc});}this['_active']=_0x1f70e1;if(this[_0x1f30f8(0xe79)]&&this[_0x1f30f8(0xe79)][_0x1f30f8(0xa5d)]===_0x5eac5d){const _0x54232d=Math['ceil']((this['_active'][_0x1f30f8(0xa92)]-Date[_0x1f30f8(0x555)]())/0x5265c00);this[_0x1f30f8(0xd4f)][_0x1f30f8(0x9be)]?.[_0x1f30f8(0xf78)](_0x1f30f8(0x1154)+_0x54232d+_0x1f30f8(0x506),{'feature':_0x1f30f8(0x908),'licensee':this[_0x1f30f8(0xe79)][_0x1f30f8(0xaf)],'expiresAt':new Date(this[_0x1f30f8(0xe79)][_0x1f30f8(0xa92)])[_0x1f30f8(0x9cc)]()});}}[_0x35fe58(0xa5a)](_0x434df6,_0x3ed4a9){const _0x4bdf66=_0x35fe58;if(!_0x434df6['blob'])return'invalid';let _0x56364f;try{_0x56364f=_0x18a5d8[_0x4bdf66(0x8be)](_0x434df6['blob']);}catch(_0xeabd6){return _0x4bdf66(0x7ff);}try{const _0x218a06=_0x473425[_0x4bdf66(0xec4)](null,_0x56364f[_0x4bdf66(0x3c3)],_0x202002[_0x4bdf66(0x610)],_0x56364f[_0x4bdf66(0xdd9)]);if(!_0x218a06)return _0x4bdf66(0x7ff);}catch(_0x358d57){return'invalid';}if(_0x56364f[_0x4bdf66(0x35c)][_0x4bdf66(0xa92)]<=Date[_0x4bdf66(0x555)]())return _0x4bdf66(0xd86);if(_0x56364f['decoded'][_0x4bdf66(0xa5d)]===_0x5eac5d)return'active';if(!_0x434df6['activation'])return _0x4bdf66(0x178);const _0x44d0eb=_0x18a5d8['verifyActivation']({'tokenString':_0x434df6['activation'],'nodeId':_0x3ed4a9,'rawBlobBuf':_0x56364f[_0x4bdf66(0xac9)],'pubKeyPem':_0x202002[_0x4bdf66(0x610)],'pubFingerprint':_0x202002[_0x4bdf66(0xfbe)]});if(_0x44d0eb[_0x4bdf66(0xa25)]===_0x4bdf66(0x3f9)||_0x44d0eb[_0x4bdf66(0xa25)]==='SIG_INVALID')return'wrong_node';if(_0x44d0eb[_0x4bdf66(0xa25)]===_0x4bdf66(0xac7))return _0x4bdf66(0xd86);if(!_0x44d0eb[_0x4bdf66(0x64c)])return _0x4bdf66(0x5e8);return'active';}get[_0x35fe58(0x43f)](){return this['_active'];}get[_0x35fe58(0x1dd)](){const _0x479991=_0x35fe58;return this[_0x479991(0xe79)]??_0x303bbe;}[_0x35fe58(0xa15)](_0x542e45){const _0x3e17f5=_0x35fe58;if(_0x202002[_0x3e17f5(0x693)]!==_0x3e17f5(0x7e8))return;const _0x357ca1=this[_0x3e17f5(0x1dd)];if(!_0x357ca1[_0x3e17f5(0x7fa)]?.[_0x542e45]){const _0x49f028=_0x357ca1[_0x3e17f5(0x27a)]?_0x3e17f5(0x114b)+_0x542e45+_0x3e17f5(0xab3)+_0x542e45+_0x3e17f5(0x96a):_0x3e17f5(0x86b)+_0x542e45+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x542e45+'\x22.';throw new _0x19e707(_0x49f028,_0x3e17f5(0x46a),{'feature':_0x542e45});}}['isFeatureEnabled'](_0x5ee2f3){const _0x957ce=_0x35fe58;if(_0x202002[_0x957ce(0x693)]!=='true')return!![];return!!this['effective'][_0x957ce(0x7fa)]?.[_0x5ee2f3];}['assertLimit'](_0x263e02,_0x41ec59){const _0x35f325=_0x35fe58;if(_0x202002[_0x35f325(0x693)]!==_0x35f325(0x7e8))return;const _0x156131=this[_0x35f325(0x1dd)],_0x31f12e=_0x156131[_0x35f325(0x721)]?.[_0x263e02];if(_0x31f12e===null||_0x31f12e===undefined||_0x31f12e===0x0)return;if(_0x41ec59>=_0x31f12e)throw new _0x19e707(_0x35f325(0x756)+_0x263e02+'\x20('+_0x41ec59+'/'+_0x31f12e+')',_0x35f325(0x8d4),{'limit':_0x263e02,'current':_0x41ec59,'max':_0x31f12e});}async[_0x35fe58(0xb3f)](_0x1d41a9){const _0xb259b3=_0x35fe58;let _0x1e8b80;try{_0x1e8b80=_0x18a5d8['decodeLicenseBlob'](_0x1d41a9);}catch(_0x533571){throw new _0x19e707(_0xb259b3(0x946)+_0x533571[_0xb259b3(0xb4e)],_0xb259b3(0x1218));}let _0x1d306a;try{_0x1d306a=_0x473425['verify'](null,_0x1e8b80[_0xb259b3(0x3c3)],_0x202002['PUBLIC_KEY_PEM'],_0x1e8b80[_0xb259b3(0xdd9)]);}catch(_0xeccf09){throw new _0x19e707('License\x20signature\x20invalid:\x20'+_0xeccf09['message'],'LICENSE_INVALID');}if(!_0x1d306a)throw new _0x19e707(_0xb259b3(0x902)+(_0xb259b3(0xc40)+_0x202002['PUB_FINGERPRINT']+'.\x20')+_0xb259b3(0xd5f),_0xb259b3(0x1218),{'expectedFingerprint':_0x202002[_0xb259b3(0xfbe)]});if(_0x1e8b80['decoded'][_0xb259b3(0xa5d)]===_0x5eac5d){const _0x263d95=_0x1e8b80[_0xb259b3(0x35c)][_0xb259b3(0xa92)]-_0x1e8b80[_0xb259b3(0x35c)][_0xb259b3(0x437)];if(_0x263d95>_0x16dfda)throw new _0x19e707(_0xb259b3(0x1c2)+Math['ceil'](_0x263d95/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)','LICENSE_INVALID');}const _0x5d8530=this[_0xb259b3(0xd4f)][_0xb259b3(0xc65)];await _0x86d9e5(_0x5d8530);const _0x46ad66=_0x18a5d8[_0xb259b3(0x6b9)](_0x1e8b80['rawBuf'])[_0xb259b3(0x583)](_0xb259b3(0x57b));for(const {value:_0x371e1d}of _0x5d8530[_0xb259b3(0x9ce)](_0x5e7165)){if(_0x371e1d['_licenseHash']===_0x46ad66)throw new _0x19e707('License\x20already\x20stored',_0xb259b3(0x1218));}const _0x517d9b=_0x473425[_0xb259b3(0xa91)](),_0x49fa8c={'blob':_0x1d41a9,'activation':null,'addedAt':Date[_0xb259b3(0x555)](),'_licenseHash':_0x46ad66,'licensee':_0x1e8b80[_0xb259b3(0x35c)]['licensee'],'expiresAt':_0x1e8b80[_0xb259b3(0x35c)][_0xb259b3(0xa92)],'features':_0x1e8b80['decoded'][_0xb259b3(0x7fa)],'limits':_0x1e8b80[_0xb259b3(0x35c)][_0xb259b3(0x721)],'licenseType':_0x1e8b80['decoded']['licenseType']};return await _0x5d8530[_0xb259b3(0x92c)](_0x5e7165,_0x517d9b,_0x49fa8c),{'id':_0x517d9b,..._0x49fa8c};}async[_0x35fe58(0x71b)](_0x51e290){const _0x1d00d7=_0x35fe58;let _0x5640cf;try{_0x5640cf=_0x18a5d8[_0x1d00d7(0xaab)](_0x51e290);}catch(_0x31e220){throw new _0x19e707(_0x1d00d7(0x5f5)+_0x31e220['message'],_0x1d00d7(0x696));}const _0x1309fe=_0x5640cf[_0x1d00d7(0x6b9)][_0x1d00d7(0x583)](_0x1d00d7(0x57b)),_0x191f03=this['okdb'][_0x1d00d7(0xc65)];if(!_0x191f03||!_0x191f03[_0x1d00d7(0x7c0)](_0x5e7165))throw new _0x19e707(_0x1d00d7(0x86e),'LICENSE_ACTIVATION_INVALID');let _0x51cc60=null,_0x4217b6=null;for(const {key:_0x1825b3,value:_0x38fb64}of _0x191f03[_0x1d00d7(0x9ce)](_0x5e7165)){if(_0x38fb64[_0x1d00d7(0x287)]===_0x1309fe){_0x51cc60=_0x1825b3,_0x4217b6=_0x38fb64;break;}}if(!_0x51cc60)throw new _0x19e707(_0x1d00d7(0x86e),'LICENSE_ACTIVATION_INVALID');const {rawBuf:_0x489aa6}=_0x18a5d8[_0x1d00d7(0x8be)](_0x4217b6[_0x1d00d7(0x2d2)]),_0x1ea4c7=_0x18a5d8[_0x1d00d7(0xf54)]({'tokenString':_0x51e290,'nodeId':this[_0x1d00d7(0xd4f)]['id'],'rawBlobBuf':_0x489aa6,'pubKeyPem':_0x202002[_0x1d00d7(0x610)],'pubFingerprint':_0x202002[_0x1d00d7(0xfbe)]});if(!_0x1ea4c7['valid'])throw new _0x19e707(_0x1d00d7(0xed6)+_0x1ea4c7[_0x1d00d7(0xa25)],_0x1d00d7(0x696),{'reason':_0x1ea4c7[_0x1d00d7(0xa25)]});const _0x3f5ca2={..._0x4217b6,'activation':_0x51e290};return await _0x191f03['update'](_0x5e7165,_0x51cc60,_0x3f5ca2),{'id':_0x51cc60,..._0x3f5ca2};}async[_0x35fe58(0x4a2)](_0x472737){const _0x490750=_0x35fe58,_0x226d28=this['okdb']['_systemEnv'];if(!_0x226d28||!_0x226d28[_0x490750(0x7c0)](_0x5e7165))return;await _0x226d28[_0x490750(0x21e)](_0x5e7165,_0x472737);}async[_0x35fe58(0x27d)](){const _0x3b5acc=_0x35fe58,_0x32ac4e=this[_0x3b5acc(0xd4f)]['_systemEnv'];if(!_0x32ac4e||!_0x32ac4e[_0x3b5acc(0x7c0)](_0x5e7165))return[];const _0x357a4e=this[_0x3b5acc(0xd4f)]['id'],_0x2fffab=[];for(const {key:_0x32ab60,value:_0x519870}of _0x32ac4e['getRange'](_0x5e7165)){const _0x16351f=this[_0x3b5acc(0xa5a)](_0x519870,_0x357a4e);_0x2fffab['push']({..._0x519870,'id':_0x32ab60,'status':_0x16351f});}return _0x2fffab;}[_0x35fe58(0xb0a)](){const _0x494164=_0x35fe58,_0x45ac0e=this[_0x494164(0xd4f)][_0x494164(0xc65)];if(!_0x45ac0e||!_0x45ac0e[_0x494164(0x7c0)](_0x5e7165))return[];const _0x241a64=this[_0x494164(0xd4f)]['id'],_0x1beb08=[];for(const {key:_0x4234fd,value:_0x3554bb}of _0x45ac0e['getRange'](_0x5e7165)){if(_0x3554bb['_licenseHash']){if(_0x3554bb['licenseType']===_0x5eac5d)_0x1beb08['push']({'licenseId':_0x4234fd,'pin':null});else{const _0x21733c=Buffer[_0x494164(0x9f8)](_0x3554bb[_0x494164(0x287)],_0x494164(0x57b)),{pin:_0x31bc37}=_0x18a5d8[_0x494164(0xbe4)](_0x241a64,_0x21733c,_0x202002['PUB_FINGERPRINT']);_0x1beb08['push']({'licenseId':_0x4234fd,'pin':_0x31bc37});}}}return _0x1beb08;}async[_0x35fe58(0x350)](){const _0xecc909=_0x35fe58,_0x1d81d8=this['_active'];await this[_0xecc909(0x619)]();if(this[_0xecc909(0xe79)]&&this[_0xecc909(0xe79)]['licenseType']===_0x5eac5d){const _0xc113f0=Math[_0xecc909(0x84c)]((this['_active'][_0xecc909(0xa92)]-Date['now']())/0x5265c00);this[_0xecc909(0xd4f)][_0xecc909(0x9be)]?.[_0xecc909(0xf78)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0xc113f0+_0xecc909(0x506),{'feature':_0xecc909(0x908),'licensee':this[_0xecc909(0xe79)][_0xecc909(0xaf)],'expiresAt':new Date(this[_0xecc909(0xe79)]['expiresAt'])[_0xecc909(0x9cc)]()});}if(_0x1d81d8&&!this[_0xecc909(0xe79)]){this['okdb'][_0xecc909(0x9be)]?.[_0xecc909(0xf78)](_0xecc909(0x4c6),{'feature':_0xecc909(0x908)}),this[_0xecc909(0xd4f)][_0xecc909(0xea8)]?.[_0xecc909(0xf5d)](_0x2c1cce['LICENSE_INVALID'],{'previous':_0x1d81d8});const _0x92eb72=this[_0xecc909(0xd4f)][_0xecc909(0x11e5)]?.[_0xecc909(0x161)]??_0x202002[_0xecc909(0x810)];_0x92eb72==='shutdown'&&(this[_0xecc909(0xd4f)][_0xecc909(0x9be)]?.['error'](_0xecc909(0xd49),{'feature':_0xecc909(0x908)}),this['okdb'][_0xecc909(0x11ac)]()[_0xecc909(0x415)](()=>{})['finally'](()=>process[_0xecc909(0x5e6)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x220c5f,'_C':_0x202002},okdbLicense;}var okdbAdmin,hasRequiredOkdbAdmin;function requireOkdbAdmin(){const _0x5dc724=_0xef8cd8;if(hasRequiredOkdbAdmin)return okdbAdmin;hasRequiredOkdbAdmin=0x1;const _0x168b6a=require$$0$7,_0x1b1ac3=require$$1$2,_0x1faf5f=require$$0$1,_0x1653e1=requireOkdbRelay(),{buildCatalog:_0x802d8b}=requireOkdbAdminCatalog(),{EVENTS:_0x1d1e61}=requireOkdbEnums();class _0x401236{constructor(_0x5f0180,_0x132dae={}){const _0x471572=_0x47ab;this[_0x471572(0xd4f)]=_0x5f0180,this['options']=_0x132dae,this[_0x471572(0x9be)]=_0x5f0180[_0x471572(0x9be)][_0x471572(0xd9b)]({'feature':_0x471572(0x93f)}),this[_0x471572(0x11f7)]=_0x132dae[_0x471572(0x11f7)]||_0x1b1ac3[_0x471572(0x3d9)](__dirname,_0x471572(0x1aa)),this[_0x471572(0x470)]=_0x5f0180[_0x471572(0xd8d)]||new _0x1653e1(_0x5f0180,_0x132dae['relay']??{}),_0x5f0180['_adminRelay']=this[_0x471572(0x470)],!this[_0x471572(0x470)]['_okdbAdminAttached']&&(this[_0x471572(0x470)]['attach'](),this[_0x471572(0x470)][_0x471572(0xa1d)]=!![]),this[_0x471572(0xc10)]();}['_register'](){const _0x3635f0=_0x47ab,_0x1fcae9=this['okdb'],_0x23305d=_0x1fcae9['http'],_0x48aa9d=_0x1fcae9[_0x3635f0(0x93f)],_0x301237=this[_0x3635f0(0x11f7)],_0x1eb75c=()=>_0x48aa9d[_0x3635f0(0xb76)]?.()||{};_0x23305d[_0x3635f0(0xdfb)]=0x200*0x400*0x400,this[_0x3635f0(0x5d6)](),this[_0x3635f0(0x137)]();const _0x89860b=_0x1b1ac3[_0x3635f0(0x3d9)](__dirname,_0x3635f0(0x5dd));_0x23305d['add']('GET',_0x3635f0(0x875),()=>{const _0x50df98=_0x3635f0,_0x3fd548=this[_0x50df98(0xf1d)]();if(_0x3fd548['openAccess'])return{'status':0x12e,'headers':{'Location':_0x50df98(0x67e)}};const _0x274a7f=_0x5f1d0d(_0x301237,'/login.html');if(!_0x274a7f||!_0x5d2c7a(_0x274a7f))return{'status':0x194,'body':_0x50df98(0x126)};return _0x870b1(_0x274a7f,_0x50df98(0x1168));}),_0x23305d[_0x3635f0(0x33c)]('GET',_0x3635f0(0x1207),()=>({'result':this[_0x3635f0(0xf1d)]()})),_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0x929),_0x3635f0(0x801),()=>{const _0x33d695=_0x3635f0,_0x1c1288=_0x5f1d0d(_0x301237,_0x33d695(0xa22));if(!_0x1c1288||!_0x5d2c7a(_0x1c1288))return{'status':0x194,'body':_0x33d695(0x126)};return _0x870b1(_0x1c1288,'text/html;\x20charset=utf-8');}),_0x23305d['add'](_0x3635f0(0xe46),_0x3635f0(0xf0d),async({body:_0x2a866d,context:_0x54862a})=>{const _0x404bcf=_0x3635f0;if(!_0x54862a?.['auth']?.[_0x404bcf(0xb77)])return{'status':0x191,'result':{'error':{'code':_0x404bcf(0x840),'message':_0x404bcf(0x6ce)}}};const _0x37e999=String(_0x2a866d?.['address']??'')[_0x404bcf(0xf4d)](),_0x52e759=String(_0x2a866d?.['token']??'')[_0x404bcf(0xf4d)]();if(!_0x37e999||!_0x52e759)return{'status':0x190,'result':{'error':_0x404bcf(0xe1d)}};try{await _0x1fcae9[_0x404bcf(0x1034)][_0x404bcf(0x3d9)](_0x37e999,{'token':_0x52e759});}catch(_0x565f8c){const _0x583486=_0x565f8c[_0x404bcf(0xfcd)]||0x1f6;return{'status':_0x583486,'result':{'error':{'code':_0x565f8c['code']||'SYNC_ERROR','message':_0x565f8c[_0x404bcf(0xb4e)]}}};}return{'result':{'ok':!![]}};}),_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0x929),_0x3635f0(0xce2),()=>({'result':{'notices':_0x1fcae9[_0x3635f0(0x93f)][_0x3635f0(0x123f)]?.()??[]}})),_0x23305d[_0x3635f0(0x33c)]('GET',_0x3635f0(0x52a),async({headers:_0x32adf5})=>{const _0x194cff=_0x3635f0,_0x333b2b={'headers':_0x32adf5||{},'cookies':_0x84b78e(_0x32adf5?.[_0x194cff(0xc83)]),'context':{}},_0x38f1e3=await _0x48aa9d[_0x194cff(0x617)](_0x333b2b);if(!_0x38f1e3?.[_0x194cff(0xb77)])return{'status':0x191,'result':{'authenticated':![]}};return{'result':{'authenticated':!![],'user':_0x38f1e3[_0x194cff(0x45b)]||_0x38f1e3,'grants':_0x38f1e3[_0x194cff(0x15a)]?.[_0x194cff(0x912)]??{}}};}),_0x23305d['add'](_0x3635f0(0xe46),_0x3635f0(0x539),async({body:_0x150b93})=>{const _0x370406=_0x3635f0,_0x43fd04=String(_0x150b93?.[_0x370406(0xdab)]??'')[_0x370406(0xf4d)](),_0x1d4e5d=String(_0x150b93?.['password']??'');if(!_0x43fd04||!_0x1d4e5d)return{'status':0x190,'result':{'error':_0x370406(0x624)}};const _0x148878=await _0x48aa9d[_0x370406(0x3c7)](_0x43fd04,_0x1d4e5d);if(!_0x148878['ok'])return this[_0x370406(0x9be)][_0x370406(0x26c)](_0x370406(0xcff),{'user':_0x43fd04}),{'status':0x191,'result':{'error':_0x148878[_0x370406(0x225)]}};if(_0x148878[_0x370406(0xed3)])return{'status':0xc8,'result':{'ambiguous':!![],'tokens':_0x148878[_0x370406(0x86c)]}};return this[_0x370406(0x9be)][_0x370406(0x26c)]('login\x20success',{'user':_0x148878[_0x370406(0x45b)]['name']}),{'status':0xc8,'result':{'access_token':_0x148878[_0x370406(0xc83)],'expires_in':_0x148878[_0x370406(0x68d)]},'headers':{'Set-Cookie':_0x23305d[_0x370406(0x9fe)](_0x148878[_0x370406(0xc83)],{'path':'/','sameSite':_0x1eb75c()['session']?.[_0x370406(0x7ac)]??'Lax','secure':_0x1eb75c()[_0x370406(0x5f0)]?.['secure']??![],'maxAge':_0x148878['expiresIn']})}};}),_0x23305d['add']('POST',_0x3635f0(0x65f),async({body:_0x2d7ea9})=>{const _0x38f11e=_0x3635f0,_0x475be7=String(_0x2d7ea9?.[_0x38f11e(0xdab)]??'')[_0x38f11e(0xf4d)](),_0x17d9fe=String(_0x2d7ea9?.[_0x38f11e(0x1e8)]??''),_0x1f26fb=String(_0x2d7ea9?.[_0x38f11e(0xa5f)]??'')['trim']();if(!_0x475be7||!_0x17d9fe||!_0x1f26fb)return{'status':0x190,'result':{'error':_0x38f11e(0x8fd)}};const _0x2a9444=await _0x48aa9d[_0x38f11e(0x1125)](_0x475be7,_0x17d9fe,_0x1f26fb);if(!_0x2a9444['ok'])return this['log'][_0x38f11e(0x26c)]('login/select\x20failure',{'user':_0x475be7}),{'status':0x191,'result':{'error':{'code':'INVALID_CREDENTIALS','message':_0x38f11e(0x365)}}};return this[_0x38f11e(0x9be)][_0x38f11e(0x26c)]('login/select\x20success',{'user':_0x2a9444[_0x38f11e(0x45b)][_0x38f11e(0x1173)]}),{'status':0xc8,'result':{'ok':!![]},'headers':{'Set-Cookie':_0x23305d['formatCookie'](_0x2a9444['cookie'],{'path':'/','sameSite':_0x1eb75c()['session']?.[_0x38f11e(0x7ac)]??_0x38f11e(0xec8),'secure':_0x1eb75c()[_0x38f11e(0x5f0)]?.[_0x38f11e(0x102a)]??![],'maxAge':_0x2a9444['expiresIn']})}};}),_0x23305d[_0x3635f0(0x33c)]('POST',_0x3635f0(0x1211),async({body:_0xf00802})=>{const _0x15e854=_0x3635f0,_0x245538=String(_0xf00802?.['username']??'')[_0x15e854(0xf4d)](),_0x457e7e=String(_0xf00802?.['password']??'');if(!_0x245538||!_0x457e7e)return{'status':0x190,'result':{'error':'Username\x20and\x20password\x20are\x20required'}};const _0x14f837=await _0x48aa9d[_0x15e854(0x3c7)](_0x245538,_0x457e7e);if(!_0x14f837['ok'])return this[_0x15e854(0x9be)][_0x15e854(0x26c)]('login\x20failure',{'user':_0x245538}),{'status':0x191,'result':{'error':_0x14f837[_0x15e854(0x225)]}};return this[_0x15e854(0x9be)][_0x15e854(0x26c)](_0x15e854(0x117d),{'user':_0x14f837[_0x15e854(0x45b)][_0x15e854(0x1173)]}),{'status':0xc8,'result':{'access_token':_0x14f837['cookie'],'token_type':_0x15e854(0x107b),'expires_in':_0x14f837['expiresIn']}};}),_0x23305d[_0x3635f0(0x33c)]('GET',_0x3635f0(0x1225),({query:_0x5bd7ce})=>{const _0x19b68f=_0x3635f0,_0x45e4b4=_0x1eb75c()['oauth']||{};if(typeof _0x45e4b4['getAuthorizationUrl']!==_0x19b68f(0x63b))return{'status':0x1f5,'result':{'error':_0x19b68f(0xe16)}};const _0x4a68b7=_0x5bd7ce?.[_0x19b68f(0x8e5)]||_0x19b68f(0x67e),_0x38aafd=_0x48aa9d[_0x19b68f(0xebb)]({'redirectTo':_0x4a68b7,'provider':_0x45e4b4[_0x19b68f(0xe27)]||'oauth'},_0x45e4b4[_0x19b68f(0xf63)]||0x927c0),_0xfdcf3f=_0x1faf5f[_0x19b68f(0x3d0)](0x20)[_0x19b68f(0x583)](_0x19b68f(0xb6e)),_0x3ee1f7=_0x1faf5f[_0x19b68f(0x687)](_0x19b68f(0xeee))[_0x19b68f(0xbb7)](_0xfdcf3f)[_0x19b68f(0xdea)]('base64url'),_0x3bff53=_0x45e4b4[_0x19b68f(0x8b1)]({'state':_0x38aafd,'codeVerifier':_0xfdcf3f,'codeChallenge':_0x3ee1f7,'redirectUri':_0x45e4b4[_0x19b68f(0x7b2)],'scopes':_0x45e4b4[_0x19b68f(0x10a4)]||[_0x19b68f(0xa64),_0x19b68f(0xca1),_0x19b68f(0x5d0)]});return{'status':0x12e,'headers':{'Location':_0x3bff53,'Set-Cookie':_0x23305d['formatCookie'](_0x38aafd,{'path':_0x19b68f(0x31d),'sameSite':_0x1eb75c()[_0x19b68f(0x5f0)]?.[_0x19b68f(0x7ac)]??'Lax','secure':_0x1eb75c()[_0x19b68f(0x5f0)]?.[_0x19b68f(0x102a)]??![]})[_0x19b68f(0x8d8)](_0x23305d[_0x19b68f(0x93f)][_0x19b68f(0x950)]+'=',_0x23305d[_0x19b68f(0x93f)][_0x19b68f(0xee4)]+'=')}};}),_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0x929),_0x3635f0(0x850),async({query:_0x2e9136,headers:_0x50862d})=>{const _0x2c8362=_0x3635f0,_0x2f55cd=_0x1eb75c()[_0x2c8362(0xce9)]||{};if(typeof _0x2f55cd[_0x2c8362(0x97c)]!==_0x2c8362(0x63b))return{'status':0x1f5,'result':{'error':_0x2c8362(0x4af)}};const _0x567095=_0x84b78e(_0x50862d?.[_0x2c8362(0xc83)]);if(!_0x2e9136?.[_0x2c8362(0x10e2)]||_0x567095[_0x23305d[_0x2c8362(0x93f)]['stateCookieName']]!==_0x2e9136[_0x2c8362(0x10e2)])return{'status':0x190,'result':{'error':'Invalid\x20OAuth\x20state'}};const _0x20c078=_0x48aa9d[_0x2c8362(0x105a)](_0x2e9136[_0x2c8362(0x10e2)]);if(!_0x20c078)return{'status':0x190,'result':{'error':'OAuth\x20state\x20expired'}};const _0xc42c1=await _0x2f55cd['exchangeCode']({'code':_0x2e9136[_0x2c8362(0x1f8)],'state':_0x2e9136[_0x2c8362(0x10e2)],'redirectUri':_0x2f55cd[_0x2c8362(0x7b2)]}),_0x116c1b=_0x48aa9d[_0x2c8362(0x1172)](_0xc42c1||{}),_0x4481c5=_0x116c1b[_0x2c8362(0x5d0)];if(!_0x4481c5)return{'status':0x190,'result':{'error':_0x2c8362(0xf96)}};if(!_0x48aa9d[_0x2c8362(0x4fd)](_0x4481c5)){const _0x59fc08=_0x20c078[_0x2c8362(0xe04)]||_0x2f55cd['providerLabel']||_0x2c8362(0xce9);return this['log'][_0x2c8362(0x26c)](_0x2c8362(0xd79),{'provider':_0x59fc08,'email':_0x4481c5}),{'status':0x193,'result':{'error':_0x2c8362(0x30a)},'headers':{'Set-Cookie':_0x23305d['clearCookie'](_0x23305d['auth']['stateCookieName'],{'path':_0x2c8362(0x31d),'sameSite':_0x1eb75c()[_0x2c8362(0x5f0)]?.[_0x2c8362(0x7ac)]??'Lax','secure':_0x1eb75c()['session']?.[_0x2c8362(0x102a)]??![]})}};}const _0x36181e=Array[_0x2c8362(0x10f5)](_0x116c1b['user']?.[_0x2c8362(0xa6d)])&&_0x116c1b[_0x2c8362(0x45b)][_0x2c8362(0xa6d)][_0x2c8362(0x156)]?_0x116c1b[_0x2c8362(0x45b)]['roles']:_0x48aa9d[_0x2c8362(0x118a)],_0x2749ea={'id':_0x116c1b[_0x2c8362(0x155)]||_0x4481c5,'username':_0x4481c5[_0x2c8362(0xfb1)]('@')[0x0]['replace'](/[^a-z0-9_-]/gi,'_')[_0x2c8362(0xb52)]()||_0x2c8362(0xbd2),'email':_0x4481c5,'roles':_0x36181e},_0x31b139=_0x20c078['provider']||_0x2f55cd[_0x2c8362(0xe27)]||'oauth';this[_0x2c8362(0x9be)][_0x2c8362(0x26c)](_0x2c8362(0xba3),{'provider':_0x31b139,'user':_0x2749ea[_0x2c8362(0xdab)]});const _0x27f5c5=_0x48aa9d[_0x2c8362(0x1121)](_0x2749ea);return{'status':0x12e,'headers':{'Location':_0x20c078['redirectTo']||_0x2c8362(0x67e),'Set-Cookie':[_0x23305d['formatCookie'](_0x27f5c5,{'path':'/','sameSite':_0x1eb75c()[_0x2c8362(0x5f0)]?.['sameSite']??'Lax','secure':_0x1eb75c()[_0x2c8362(0x5f0)]?.[_0x2c8362(0x102a)]??![]}),_0x23305d[_0x2c8362(0x92e)](_0x23305d[_0x2c8362(0x93f)][_0x2c8362(0xee4)],{'path':_0x2c8362(0x31d),'sameSite':_0x1eb75c()[_0x2c8362(0x5f0)]?.[_0x2c8362(0x7ac)]??_0x2c8362(0xec8),'secure':_0x1eb75c()['session']?.[_0x2c8362(0x102a)]??![]})]}};}),_0x23305d['add'](_0x3635f0(0xe46),'/auth/logout',()=>({'status':0xc8,'result':{'ok':!![]},'headers':{'Set-Cookie':_0x23305d[_0x3635f0(0x92e)](_0x23305d['auth'][_0x3635f0(0x950)],{'path':'/','sameSite':_0x1eb75c()['session']?.['sameSite']??_0x3635f0(0xec8),'secure':_0x1eb75c()['session']?.[_0x3635f0(0x102a)]??![]})}})),_0x23305d['add'](_0x3635f0(0x929),_0x3635f0(0x76c),()=>({'status':0x12e,'headers':{'Location':_0x3635f0(0x235)}})),_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0x929),_0x3635f0(0xaa7),({params:_0x337cf})=>{const _0x3d5060=_0x3635f0,_0x474e33='/'+(_0x337cf['*']||'index.md'),_0x4d4e98=_0x5f1d0d(_0x89860b,_0x474e33);if(!_0x4d4e98)return{'status':0x193,'body':_0x3d5060(0xd55)};if(!_0x5d2c7a(_0x4d4e98))return{'status':0x194,'body':_0x3d5060(0x126)};return _0x870b1(_0x4d4e98);},{'id':'docs_read','summary':_0x3635f0(0x442),'description':_0x3635f0(0xf62)+_0x3635f0(0x803),'tags':[_0x3635f0(0x5dd)],'inputSchema':{'type':_0x3635f0(0xb36),'properties':{},'additionalProperties':![]},'access':{'audiences':[_0x3635f0(0x9f4),_0x3635f0(0xa8b)],'authRequired':![],'internalOnly':![]},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x3635f0(0x11cc)},'mcp':null}),_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0x929),_0x3635f0(0x92b),()=>{const _0x2584ec=_0x3635f0,_0x556286=_0x5f1d0d(_0x301237,_0x2584ec(0x92b));if(!_0x556286||!_0x5d2c7a(_0x556286))return{'status':0x194,'body':_0x2584ec(0x126)};return _0x870b1(_0x556286,_0x2584ec(0x72b));}),_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0x929),'/admin/site.webmanifest',()=>{const _0x3b6ab9=_0x3635f0,_0x603217=_0x5f1d0d(_0x301237,'/site.webmanifest');if(!_0x603217||!_0x5d2c7a(_0x603217))return{'status':0x194,'body':'Not\x20Found'};return _0x870b1(_0x603217,_0x3b6ab9(0x72b));}),_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0x929),_0x3635f0(0x104d),({params:_0x1e9773})=>{const _0x153060=_0x3635f0,_0x3f9538=_0x1e9773['*'];try{const _0x5e7841=require['resolve']('okjs/dist/'+_0x3f9538);return _0x870b1(_0x5e7841);}catch{}if(_0x3f9538===_0x153060(0xa75)||_0x3f9538===_0x153060(0xb7e))try{const _0x55ef76=require['resolve']('okjs/src/ok.js');return _0x870b1(_0x55ef76);}catch{}else try{const _0x43e979=require[_0x153060(0x797)](_0x153060(0x17b)+_0x3f9538);return _0x870b1(_0x43e979);}catch{}return{'status':0x194,'body':_0x153060(0x126)};}),_0x23305d['add']('GET','/',()=>({'status':0x12e,'headers':{'Location':'./admin/index.html'}})),_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0x929),_0x3635f0(0x31d),()=>({'status':0x12e,'headers':{'Location':_0x3635f0(0xe3c)}})),_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0x929),_0x3635f0(0x35e),({context:_0x35333d})=>{const _0x3627cf=_0x3635f0,_0x10f0c=[..._0x1fcae9[_0x3627cf(0xa3)][_0x3627cf(0xa52)]()][_0x3627cf(0x1103)](_0x26bb20=>!_0x26bb20[_0x3627cf(0x8ba)]('~')),_0x6f29af=_0x35333d?.[_0x3627cf(0x93f)]?.[_0x3627cf(0x15a)];let _0x3f7ccf=_0x10f0c;if(_0x6f29af&&!_0x6f29af['permissions']?.[_0x3627cf(0x156)]&&_0x6f29af[_0x3627cf(0x912)]&&Object[_0x3627cf(0xa52)](_0x6f29af[_0x3627cf(0x912)])['length']>0x0){const _0x115dea=new Set(Object[_0x3627cf(0xa52)](_0x6f29af['grants']));_0x3f7ccf=_0x10f0c[_0x3627cf(0x1103)](_0x492d46=>_0x115dea[_0x3627cf(0x9d0)](_0x492d46));}const _0x285dd0=_0x802d8b({'http':_0x23305d,'allowedEnvs':_0x3f7ccf});return{'result':_0x285dd0};});const _0x292808=requireOkdbLicenseCodec(),_0x179b51=requireOkdbLicense(),_0x1dc8c4=()=>{const _0x41cb4c=_0x3635f0;try{return _0x1fcae9[_0x41cb4c(0xc65)]?.['db']?.[_0x41cb4c(0xbeb)]?.(_0x41cb4c(0x4ac))??0x0;}catch{return 0x0;}},_0x38fe6c=_0x179b51['_C']?.[_0x3635f0(0xfbe)]||null;_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0x929),_0x3635f0(0x103d),async()=>{const _0x331776=_0x3635f0,_0x7629b={'writes':_0x1dc8c4(),'envs':[..._0x1fcae9['_envs'][_0x331776(0xa52)]()][_0x331776(0x1103)](_0x49c7d3=>!_0x49c7d3[_0x331776(0x8ba)]('~'))[_0x331776(0x156)]},_0x17c949=await _0x1fcae9[_0x331776(0x3a3)][_0x331776(0x27d)](),_0x341fb1=_0x1fcae9[_0x331776(0x3a3)][_0x331776(0xb0a)](),_0x1a4741=_0x1fcae9[_0x331776(0x3a3)][_0x331776(0x1dd)];return{'result':{'pin':_0x341fb1,'activeCount':_0x17c949[_0x331776(0x1103)](_0x4c5ec0=>_0x4c5ec0[_0x331776(0xfcd)]===_0x331776(0x43f))[_0x331776(0x156)],'licenses':_0x17c949,'effective':{'isFree':_0x1a4741[_0x331776(0x27a)]??![],'features':_0x1a4741['features'],'limits':_0x1a4741[_0x331776(0x721)],'licensee':_0x1a4741['licensee']??null,'expiresAt':_0x1a4741[_0x331776(0xa92)]??null},'isLicensedBuild':_0x179b51['_C'][_0x331776(0x693)]===_0x331776(0x7e8),'usage':_0x7629b,'buildFingerprint':_0x38fe6c}};}),_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0xe46),_0x3635f0(0x856),async({body:_0x1aad02})=>{const _0x141359=_0x3635f0;let _0x242772=(_0x1aad02?.['blob']||'')['trim'](),_0x368f28=(_0x1aad02?.[_0x141359(0xc1e)]||'')[_0x141359(0xf4d)]();const _0x18ddd8=(_0x1aad02?.[_0x141359(0xec)]||'')[_0x141359(0xf4d)]();if(_0x18ddd8&&!_0x242772&&!_0x368f28){const _0x33746d=_0x292808['detectInputType'](_0x18ddd8);if(_0x33746d==='blob')_0x242772=_0x18ddd8;else{if(_0x33746d===_0x141359(0xc1e))_0x368f28=_0x18ddd8;else return{'status':0x190,'result':{'error':_0x141359(0xf00)}};}}if(!_0x242772&&!_0x368f28)return{'status':0x190,'result':{'error':_0x141359(0xf94)}};try{if(_0x242772){const _0x45083e=await _0x1fcae9['_license'][_0x141359(0xb3f)](_0x242772);_0x368f28?(await _0x1fcae9[_0x141359(0x3a3)][_0x141359(0x71b)](_0x368f28),await _0x1fcae9[_0x141359(0x3a3)][_0x141359(0x619)](),_0x1fcae9[_0x141359(0xea8)]['emit'](_0x1d1e61['LICENSE_ACTIVATED'],{'id':_0x45083e['id']})):(await _0x1fcae9[_0x141359(0x3a3)][_0x141359(0x619)](),_0x1fcae9[_0x141359(0xea8)][_0x141359(0xf5d)](_0x1d1e61[_0x141359(0x11d5)],{'id':_0x45083e['id'],'licensee':_0x45083e[_0x141359(0xaf)]}));const _0x5d44cc=await _0x1fcae9[_0x141359(0x3a3)][_0x141359(0x27d)]();return{'result':_0x5d44cc[_0x141359(0xbdd)](_0x39f8f0=>_0x39f8f0[_0x141359(0x287)]===_0x45083e[_0x141359(0x287)])};}const _0x2e3514=await _0x1fcae9[_0x141359(0x3a3)]['activateLicense'](_0x368f28);await _0x1fcae9[_0x141359(0x3a3)][_0x141359(0x619)](),_0x1fcae9[_0x141359(0xea8)]['emit'](_0x1d1e61[_0x141359(0xe98)],{'id':_0x2e3514['id']});const _0x1c4446=await _0x1fcae9[_0x141359(0x3a3)][_0x141359(0x27d)]();return{'result':_0x1c4446['find'](_0x5862d5=>_0x5862d5['id']===_0x2e3514['id'])};}catch(_0x4cbb44){return{'status':0x190,'result':{'error':_0x4cbb44[_0x141359(0xb4e)]||String(_0x4cbb44)}};}}),_0x23305d['add']('POST',_0x3635f0(0xb4a),async({params:_0x6f6f,body:_0x26f852})=>{const _0x44c04d=_0x3635f0;if(!_0x26f852?.[_0x44c04d(0xc1e)])return{'status':0x190,'result':{'error':_0x44c04d(0x1025)}};try{await _0x1fcae9[_0x44c04d(0x3a3)][_0x44c04d(0x71b)](_0x26f852[_0x44c04d(0xc1e)][_0x44c04d(0xf4d)]()),await _0x1fcae9[_0x44c04d(0x3a3)][_0x44c04d(0x619)](),_0x1fcae9[_0x44c04d(0xea8)][_0x44c04d(0xf5d)](_0x1d1e61[_0x44c04d(0xe98)],{'id':_0x6f6f['id']});const _0x21b8fc=await _0x1fcae9[_0x44c04d(0x3a3)]['listLicenses']();return{'result':_0x21b8fc[_0x44c04d(0xbdd)](_0x230e42=>_0x230e42['id']===_0x6f6f['id'])};}catch(_0x48cde6){return{'status':0x190,'result':{'error':_0x48cde6[_0x44c04d(0xb4e)]||String(_0x48cde6)}};}}),_0x23305d[_0x3635f0(0x33c)]('DELETE',_0x3635f0(0xb17),async({params:_0x1cb543})=>{const _0x518e63=_0x3635f0;return await _0x1fcae9[_0x518e63(0x3a3)][_0x518e63(0x4a2)](_0x1cb543['id']),await _0x1fcae9[_0x518e63(0x3a3)][_0x518e63(0x619)](),_0x1fcae9[_0x518e63(0xea8)]['emit'](_0x1d1e61[_0x518e63(0xea9)],{'id':_0x1cb543['id']}),{'result':{'ok':!![]}};}),_0x23305d[_0x3635f0(0x33c)](_0x3635f0(0x929),_0x3635f0(0x74c),({params:_0x1d10be})=>{if(!_0x1d10be['*'])return{'status':0x12e,'headers':{'Location':'./index.html'}};const _0x39b1b1='/'+(_0x1d10be['*']||''),_0x1354ca=_0x5f1d0d(_0x301237,_0x39b1b1);if(!_0x1354ca)return{'status':0x193,'body':'Forbidden'};if(!_0x5d2c7a(_0x1354ca))return{'status':0x194,'body':'Not\x20Found'};return _0x870b1(_0x1354ca);});}[_0x5dc724(0x5d6)](){const _0x1275df=_0x5dc724,_0x37f471=this[_0x1275df(0xd4f)],_0x368e31=_0x37f471[_0x1275df(0x9f4)],_0x3b7cfb=_0x37f471['auth'],_0x2c2c73=new Set([_0x1275df(0xf07),'favicon.ico','favicon-16x16.png',_0x1275df(0x1179),_0x1275df(0x563),_0x1275df(0xff3),'android-chrome-512x512.png',_0x1275df(0xa53),_0x1275df(0x50e),_0x1275df(0x223)]);_0x368e31[_0x1275df(0xddb)](_0x18ac7b=>_0x18ac7b['path']['startsWith'](_0x1275df(0x31d))&&_0x18ac7b[_0x1275df(0x20b)]!==_0x1275df(0x875)&&_0x18ac7b[_0x1275df(0x20b)]!=='/admin/setup'&&!_0x18ac7b[_0x1275df(0x20b)]['startsWith'](_0x1275df(0x1207))&&!_0x18ac7b['path']['startsWith'](_0x1275df(0xf0d))&&!_0x18ac7b[_0x1275df(0x20b)][_0x1275df(0x8ba)]('/admin/auth/start')&&!_0x18ac7b[_0x1275df(0x20b)]['startsWith']('/admin/auth/callback')&&!_0x18ac7b['path'][_0x1275df(0x8ba)]('/admin/session')&&!_0x18ac7b['path'][_0x1275df(0x8ba)](_0x1275df(0xa65))&&!_0x18ac7b[_0x1275df(0x20b)]['startsWith'](_0x1275df(0xce2))&&!_0x2c2c73[_0x1275df(0x9d0)](_0x18ac7b[_0x1275df(0x20b)]['slice'](_0x1275df(0x7f5)[_0x1275df(0x156)])),async(_0x266a39,_0x289cc3)=>{const _0x5cbc74=_0x1275df;if(_0x266a39['context']?.[_0x5cbc74(0xbf9)]===!![])return!![];const _0x2146e6=await _0x3b7cfb[_0x5cbc74(0x617)](_0x266a39);if(_0x2146e6?.[_0x5cbc74(0x717)]===!![])return!![];if(_0x2146e6?.[_0x5cbc74(0xb77)])return _0x266a39[_0x5cbc74(0x339)]['auth']=_0x2146e6,_0x266a39[_0x5cbc74(0x339)][_0x5cbc74(0x45b)]=_0x2146e6['user']||_0x2146e6,!![];return _0x289cc3[_0x5cbc74(0xfcd)](0x12e),_0x289cc3['setHeader'](_0x5cbc74(0x9c7),_0x5cbc74(0x875)),_0x289cc3[_0x5cbc74(0x771)](_0x5cbc74(0x2cc)),![];});}['_getLoginConfig'](){const _0x3e1b24=_0x5dc724;return this[_0x3e1b24(0xd4f)]['auth'][_0x3e1b24(0x5ae)]();}[_0x5dc724(0x137)](){const _0x184345=_0x5dc724,_0x5d50fc=this[_0x184345(0xd4f)]['http'],_0x355bd9=this['okdb']['auth'],_0x55498a=_0x1b1ac3[_0x184345(0x3d9)](this['okdb'][_0x184345(0x20b)],_0x184345(0xa0)),_0x903fad=_0x1b1ac3[_0x184345(0x3d9)](_0x55498a,_0x184345(0x1030)),_0x12c89b=new Map(),_0x13fa35=new Map(),_0x275310=0xea60,_0x599d1c=0x5a*0x5265c00,_0x49aedf=()=>{const _0x33ad62=_0x184345,_0x1e9e26=Date[_0x33ad62(0x555)]();for(const [_0x5cc28f,_0x170a05]of _0x13fa35)if(_0x170a05[_0x33ad62(0xa92)]<_0x1e9e26)_0x13fa35['delete'](_0x5cc28f);},_0x1f60bf=()=>{const _0x4659c2=_0x184345,_0x5f1406=Date[_0x4659c2(0x555)]()-_0x599d1c;for(const [_0x357eac,_0x16e327]of _0x12c89b){if(_0x16e327[_0x4659c2(0x3e1)])continue;const _0x137bcf=_0x16e327['lastUsedAt']??_0x16e327[_0x4659c2(0x936)];if(_0x137bcf<_0x5f1406)_0x12c89b[_0x4659c2(0x3b3)](_0x357eac);}},_0xc6f3d=()=>{const _0xdb82ce=_0x184345;_0x1f60bf();try{_0x168b6a[_0xdb82ce(0xb69)](_0x55498a,{'recursive':!![]});const _0x5ae31f=Object[_0xdb82ce(0x928)]([..._0x12c89b][_0xdb82ce(0x1103)](([,_0x4221eb])=>!_0x4221eb['builtin']));_0x168b6a[_0xdb82ce(0xfc0)](_0x903fad,JSON[_0xdb82ce(0xf75)](_0x5ae31f,null,0x2),_0xdb82ce(0x57a));}catch(_0x4d103e){this[_0xdb82ce(0xd4f)][_0xdb82ce(0x9be)]?.['warn']?.('[oauth]\x20failed\x20to\x20persist\x20client\x20registrations:\x20'+_0x4d103e['message']);}},_0x4bec36=_0x293c67=>{const _0x4bfe13=_0x184345;if(typeof _0x293c67!==_0x4bfe13(0xf7a)||!_0x293c67)return![];try{const _0x290e3f=new URL(_0x293c67);if(_0x290e3f[_0x4bfe13(0x412)]!==_0x4bfe13(0x10fb)&&_0x290e3f['protocol']!=='https:')return![];const _0x255d5c=_0x290e3f[_0x4bfe13(0x73b)];if(_0x255d5c!==_0x4bfe13(0xf37)&&_0x255d5c!==_0x4bfe13(0x923)&&_0x255d5c!=='[::1]'&&_0x255d5c!=='::1')return![];return _0x290e3f[_0x4bfe13(0x120a)][_0x4bfe13(0x8ba)]('/oauth/callback');}catch{return![];}},_0x181408={'mcp-inspector':{'clientName':'MCP\x20Inspector\x20(built-in)','registeredAt':Date[_0x184345(0x555)](),'builtin':!![],'validateRedirect':_0x4bec36}};for(const [_0x2fdf65,_0x5c2237]of Object[_0x184345(0x1129)](_0x181408)){if(!_0x12c89b['has'](_0x2fdf65))_0x12c89b['set'](_0x2fdf65,_0x5c2237);}const _0x1971d7=(_0x2d102f,_0xcafc62)=>{const _0x4dafba=_0x184345;if(!_0x2d102f||!_0xcafc62)return![];if(typeof _0x2d102f['validateRedirect']==='function')return _0x2d102f[_0x4dafba(0x575)](_0xcafc62);return Array[_0x4dafba(0x10f5)](_0x2d102f[_0x4dafba(0xa98)])&&_0x2d102f[_0x4dafba(0xa98)][_0x4dafba(0x29c)](_0xcafc62);},_0x9fc535=[_0x184345(0xcae),_0x184345(0x90a)],_0x57af5d=_0x2e3951=>{const _0x4c8e00=_0x184345;if(!_0x2e3951||typeof _0x2e3951!=='string')return[];return _0x2e3951[_0x4c8e00(0xfb1)](/\s+/)[_0x4c8e00(0x1166)](_0x41385d=>_0x41385d[_0x4c8e00(0xf4d)]())[_0x4c8e00(0x1103)](Boolean);},_0x27d3bf=(_0x3c474f,_0xf31fe2)=>{const _0x30c22c=_0x184345,_0x213b4f=new Set(_0xf31fe2?.[_0x30c22c(0xa6d)]||[]),_0x62a1bf=_0x213b4f[_0x30c22c(0x9d0)]('admin')||_0x213b4f['has']('*'),_0x10b01c=[];for(const _0x589643 of _0x3c474f){if(!_0x9fc535['includes'](_0x589643))continue;if(_0x589643===_0x30c22c(0x90a)&&!_0x62a1bf)continue;_0x10b01c[_0x30c22c(0x597)](_0x589643);}if(_0x10b01c[_0x30c22c(0x156)]===0x0&&_0x3c474f[_0x30c22c(0x156)]===0x0){_0x10b01c[_0x30c22c(0x597)](_0x30c22c(0xcae));if(_0x62a1bf)_0x10b01c[_0x30c22c(0x597)]('admin');}return _0x10b01c;},_0x7e2b0=()=>{const _0x4c47ba=_0x184345;try{if(!_0x168b6a[_0x4c47ba(0x66d)](_0x903fad))return;const _0x526ab6=JSON[_0x4c47ba(0xdcd)](_0x168b6a['readFileSync'](_0x903fad,_0x4c47ba(0x57a))||'{}');for(const [_0xc724a2,_0x5b5d62]of Object[_0x4c47ba(0x1129)](_0x526ab6)){if(!_0x5b5d62||typeof _0x5b5d62!==_0x4c47ba(0xb36))continue;if(!Array[_0x4c47ba(0x10f5)](_0x5b5d62[_0x4c47ba(0xa98)])||_0x5b5d62[_0x4c47ba(0xa98)][_0x4c47ba(0x156)]===0x0)continue;_0x12c89b[_0x4c47ba(0x211)](_0xc724a2,{'redirectUris':_0x5b5d62[_0x4c47ba(0xa98)],'clientName':String(_0x5b5d62[_0x4c47ba(0x1a5)]||_0x4c47ba(0x40b))[_0x4c47ba(0xc3c)](0x0,0x80),'registeredAt':Number(_0x5b5d62[_0x4c47ba(0x936)])||Date[_0x4c47ba(0x555)](),'lastUsedAt':Number(_0x5b5d62[_0x4c47ba(0x73f)])||Number(_0x5b5d62[_0x4c47ba(0x936)])||Date[_0x4c47ba(0x555)]()});}_0x1f60bf();}catch(_0x1b7129){this[_0x4c47ba(0xd4f)][_0x4c47ba(0x9be)]?.[_0x4c47ba(0xf78)]?.(_0x4c47ba(0x113d)+_0x1b7129[_0x4c47ba(0xb4e)]);}};_0x7e2b0();const _0x132a49=_0x46da8d=>{const _0x368dc4=_0x184345,_0x44116e=_0x46da8d?.[_0x368dc4(0x87d)]||_0x368dc4(0x1038),_0x2b4783=_0x46da8d?.[_0x368dc4(0xa6)]||_0x46da8d?.[_0x368dc4(0x598)]||_0x368dc4(0xf37);return _0x44116e+_0x368dc4(0x7b4)+_0x2b4783;},_0x126b6d={'origins':'*','methods':['GET',_0x184345(0xe46),_0x184345(0xa7d)],'headers':['content-type',_0x184345(0x714)],'maxAge':0x15180},_0x29ef3b={'rawResponse':!![],'cors':_0x126b6d},_0x55ab8d=(_0x1de3cd={})=>({'content-type':_0x184345(0xf9b),'cache-control':_0x184345(0x4e4),..._0x1de3cd}),_0x3a3314=(_0x3e89c4,_0x331b69,_0x3dcf7b,_0x471db9)=>{const _0x41b4b8=_0x184345;if(!_0x3e89c4)return{'status':0x190,'headers':_0x55ab8d(),'body':{'error':_0x3dcf7b,'error_description':_0x471db9}};const _0x55acd7=new URLSearchParams({'error':_0x3dcf7b});if(_0x471db9)_0x55acd7[_0x41b4b8(0x211)]('error_description',_0x471db9);if(_0x331b69)_0x55acd7[_0x41b4b8(0x211)](_0x41b4b8(0x10e2),_0x331b69);return{'status':0x12e,'headers':{'Location':_0x3e89c4+'?'+_0x55acd7}};};_0x5d50fc[_0x184345(0x33c)](_0x184345(0x929),_0x184345(0x10dc),({headers:_0x4704ae})=>{const _0x25ebe1=_0x184345,_0x4bbea7=_0x132a49(_0x4704ae);return{'status':0xc8,'headers':_0x55ab8d(),'body':{'issuer':_0x4bbea7,'authorization_endpoint':_0x4bbea7+_0x25ebe1(0x9a5),'token_endpoint':_0x4bbea7+_0x25ebe1(0x75a),'registration_endpoint':_0x4bbea7+_0x25ebe1(0x3e9),'response_types_supported':['code'],'grant_types_supported':[_0x25ebe1(0xb81)],'code_challenge_methods_supported':['S256'],'token_endpoint_auth_methods_supported':[_0x25ebe1(0x11cc)],'scopes_supported':[_0x25ebe1(0xcae),_0x25ebe1(0x90a)]}};},_0x29ef3b),_0x5d50fc[_0x184345(0x33c)]('POST',_0x184345(0x3e9),({body:_0x9d9c2b})=>{const _0x3db563=_0x184345,_0x3fcff5=_0x9d9c2b?.[_0x3db563(0x1016)];if(!Array[_0x3db563(0x10f5)](_0x3fcff5)||_0x3fcff5[_0x3db563(0x156)]===0x0)return{'status':0x190,'headers':_0x55ab8d(),'body':{'error':'invalid_client_metadata','error_description':_0x3db563(0xc2c)}};_0x1f60bf();const _0x3bbe4f=_0x1faf5f['randomUUID'](),_0x59c785=Date[_0x3db563(0x555)]();return _0x12c89b[_0x3db563(0x211)](_0x3bbe4f,{'redirectUris':_0x3fcff5,'clientName':String(_0x9d9c2b?.[_0x3db563(0x3d6)]||_0x3db563(0x40b))[_0x3db563(0xc3c)](0x0,0x80),'registeredAt':_0x59c785,'lastUsedAt':_0x59c785}),_0xc6f3d(),{'status':0xc9,'headers':_0x55ab8d(),'body':{'client_id':_0x3bbe4f,'client_id_issued_at':Math[_0x3db563(0xf9a)](Date[_0x3db563(0x555)]()/0x3e8),'redirect_uris':_0x3fcff5,'grant_types':[_0x3db563(0xb81)],'response_types':[_0x3db563(0x1f8)],'token_endpoint_auth_method':_0x3db563(0x11cc)}};},_0x29ef3b),_0x5d50fc[_0x184345(0x33c)]('GET',_0x184345(0x9a5),({query:_0x689fc0})=>{const _0x37025b=_0x184345,{client_id:_0x472c9e,redirect_uri:_0x5d4f01,state:_0x17d0a9,code_challenge:_0x2d4a63,code_challenge_method:_0x339d2e,response_type:_0x1a1a12,scope:_0x387066}=_0x689fc0||{};if(_0x1a1a12!==_0x37025b(0x1f8))return _0x3a3314(_0x5d4f01,_0x17d0a9,_0x37025b(0x6fe));if(!_0x472c9e)return{'status':0x190,'body':'client_id\x20required'};if(_0x339d2e&&_0x339d2e!==_0x37025b(0x119a))return _0x3a3314(_0x5d4f01,_0x17d0a9,_0x37025b(0xa16),'Only\x20code_challenge_method=S256\x20is\x20supported');const _0x2e49d3=_0x57af5d(_0x387066),_0x2bf244=_0x2e49d3['find'](_0x343d32=>!_0x9fc535[_0x37025b(0x29c)](_0x343d32));if(_0x2bf244)return _0x3a3314(_0x5d4f01,_0x17d0a9,_0x37025b(0x330),'Unsupported\x20scope:\x20'+_0x2bf244+_0x37025b(0xf21)+_0x9fc535[_0x37025b(0x3d9)]('\x20'));_0x1f60bf();const _0x11096b=_0x12c89b[_0x37025b(0xbeb)](_0x472c9e);if(!_0x11096b)return{'status':0x190,'body':_0x37025b(0xe5b)};if(!_0x1971d7(_0x11096b,_0x5d4f01))return _0x3a3314(_0x5d4f01,_0x17d0a9,_0x37025b(0xa16),_0x11096b['builtin']?_0x37025b(0x4c7):_0x37025b(0x8f4));return{'status':0xc8,'headers':{'content-type':_0x37025b(0x1168),'cache-control':_0x37025b(0x4e4)},'body':_0x2945e9({'client':_0x11096b,'client_id':_0x472c9e,'redirect_uri':_0x5d4f01,'state':_0x17d0a9,'code_challenge':_0x2d4a63,'scope':_0x2e49d3[_0x37025b(0x3d9)]('\x20')})};},_0x29ef3b),_0x5d50fc[_0x184345(0x33c)](_0x184345(0xe46),_0x184345(0x9a5),async({body:_0x257c8d})=>{const _0x3e5693=_0x184345,{client_id:_0x1cd2ab,redirect_uri:_0x1591da,state:_0x1f595b,code_challenge:_0x447312,username:_0x24d38c,password:_0x9768c,token:_0x99b6db,scope:_0x3055d8}=_0x257c8d||{},_0x2609a9=_0x57af5d(_0x3055d8);_0x1f60bf();const _0x34bb7b=_0x12c89b['get'](_0x1cd2ab);if(!_0x34bb7b||!_0x1971d7(_0x34bb7b,_0x1591da))return{'status':0x190,'body':_0x3e5693(0x68e)};let _0x48c3ad=null;if(_0x99b6db&&_0x99b6db[_0x3e5693(0xf4d)]()){const _0x20a8bc={'headers':{'authorization':'Bearer\x20'+_0x99b6db[_0x3e5693(0xf4d)]()},'cookies':{},'context':{}},_0x323680=await _0x355bd9[_0x3e5693(0x617)](_0x20a8bc);if(_0x323680?.['isAuthenticated'])_0x48c3ad=_0x323680[_0x3e5693(0x45b)];}else{if(_0x9768c){const _0x43dbad=await _0x355bd9[_0x3e5693(0x3c7)](String(_0x24d38c||_0x3e5693(0x90a))[_0x3e5693(0xf4d)](),String(_0x9768c));if(_0x43dbad['ok'])_0x48c3ad=_0x43dbad['user'];}}if(!_0x48c3ad)return{'status':0x191,'headers':_0x55ab8d(),'body':{'error':_0x3e5693(0x1084)}};const _0x2cc4a6={'id':_0x48c3ad['id']??_0x48c3ad[_0x3e5693(0x1173)]??'unknown','username':_0x48c3ad[_0x3e5693(0xdab)]??_0x48c3ad[_0x3e5693(0x1173)]??_0x3e5693(0xd08),'roles':Array[_0x3e5693(0x10f5)](_0x48c3ad['roles'])&&_0x48c3ad[_0x3e5693(0xa6d)]['length']>0x0?_0x48c3ad[_0x3e5693(0xa6d)]:Array[_0x3e5693(0x10f5)](_0x48c3ad[_0x3e5693(0x6c9)])?_0x48c3ad[_0x3e5693(0x6c9)]:[]};!_0x34bb7b[_0x3e5693(0x3e1)]&&(_0x34bb7b['lastUsedAt']=Date[_0x3e5693(0x555)](),_0xc6f3d());_0x49aedf();const _0x33d6fd=_0x1faf5f[_0x3e5693(0x3d0)](0x20)[_0x3e5693(0x583)]('base64url');_0x13fa35[_0x3e5693(0x211)](_0x33d6fd,{'clientId':_0x1cd2ab,'redirectUri':_0x1591da,'userId':_0x2cc4a6['id'],'username':_0x2cc4a6[_0x3e5693(0xdab)],'roles':_0x2cc4a6[_0x3e5693(0xa6d)],'codeChallenge':_0x447312,'requestedScopes':_0x2609a9,'expiresAt':Date[_0x3e5693(0x555)]()+_0x275310});const _0x1f7382=new URLSearchParams({'code':_0x33d6fd});if(_0x1f595b)_0x1f7382[_0x3e5693(0x211)](_0x3e5693(0x10e2),_0x1f595b);return{'status':0xc8,'headers':_0x55ab8d(),'body':{'location':_0x1591da+'?'+_0x1f7382}};},_0x29ef3b),_0x5d50fc[_0x184345(0x33c)](_0x184345(0xe46),'/oauth/token',async({body:_0x52013d})=>{const _0x4b8270=_0x184345,_0x66e620=_0x52013d||{};if(_0x66e620['grant_type']!==_0x4b8270(0xb81))return{'status':0x190,'headers':_0x55ab8d(),'body':{'error':_0x4b8270(0xadb)}};const {code:_0x1dc24d,redirect_uri:_0x1f8495,client_id:_0x50d2dc,code_verifier:_0x5883b2}=_0x66e620;if(!_0x1dc24d||!_0x50d2dc||!_0x1f8495)return{'status':0x190,'headers':_0x55ab8d(),'body':{'error':_0x4b8270(0xa16),'error_description':_0x4b8270(0xf88)}};const _0x1f8f8b=_0x13fa35[_0x4b8270(0xbeb)](_0x1dc24d);if(!_0x1f8f8b||_0x1f8f8b[_0x4b8270(0xa92)]<Date[_0x4b8270(0x555)]())return _0x13fa35[_0x4b8270(0x3b3)](_0x1dc24d),{'status':0x190,'headers':_0x55ab8d(),'body':{'error':_0x4b8270(0x98e),'error_description':_0x4b8270(0x90e)}};if(_0x1f8f8b['clientId']!==_0x50d2dc)return{'status':0x190,'headers':_0x55ab8d(),'body':{'error':'invalid_grant','error_description':_0x4b8270(0x7bd)}};if(_0x1f8f8b[_0x4b8270(0x7b2)]!==_0x1f8495)return{'status':0x190,'headers':_0x55ab8d(),'body':{'error':_0x4b8270(0x98e),'error_description':'redirect_uri\x20mismatch'}};if(_0x1f8f8b['codeChallenge']){if(!_0x5883b2)return{'status':0x190,'headers':_0x55ab8d(),'body':{'error':_0x4b8270(0x98e),'error_description':_0x4b8270(0xa01)}};const _0x49569f=_0x1faf5f[_0x4b8270(0x687)](_0x4b8270(0xeee))[_0x4b8270(0xbb7)](_0x5883b2)[_0x4b8270(0xdea)](_0x4b8270(0xb6e));if(_0x49569f!==_0x1f8f8b[_0x4b8270(0x489)])return{'status':0x190,'headers':_0x55ab8d(),'body':{'error':_0x4b8270(0x98e),'error_description':_0x4b8270(0x8b6)}};}_0x13fa35['delete'](_0x1dc24d);const _0x518d79={'id':_0x1f8f8b[_0x4b8270(0x60f)],'username':_0x1f8f8b['username'],'roles':_0x1f8f8b[_0x4b8270(0xa6d)]},_0x34235c=_0x355bd9[_0x4b8270(0x1121)](_0x518d79),_0xcca607=this[_0x4b8270(0xd4f)][_0x4b8270(0x11e5)]?.[_0x4b8270(0x93f)]?.[_0x4b8270(0x15a)]?.[_0x4b8270(0x347)]??0x36ee80,_0x34176b=_0x27d3bf(_0x1f8f8b['requestedScopes']||[],_0x518d79);return{'status':0xc8,'headers':_0x55ab8d({'pragma':'no-cache'}),'body':{'access_token':_0x34235c,'token_type':'Bearer','expires_in':Math[_0x4b8270(0xf9a)](_0xcca607/0x3e8),'scope':_0x34176b['join']('\x20')}};},_0x29ef3b);}}okdbAdmin=_0x401236;function _0x2945e9({client:_0x401f34,client_id:_0x31c402,redirect_uri:_0x29efd0,state:_0x5de091,code_challenge:_0x5b26e1,scope:_0x3d424f,error:_0x1b29b8}){const _0x44a1fa=_0x5dc724;return'<!DOCTYPE\x20html>\x0a<html\x20lang=\x22en\x22>\x0a<head>\x0a\x20\x20<meta\x20charset=\x22utf-8\x22>\x0a\x20\x20<meta\x20name=\x22viewport\x22\x20content=\x22width=device-width,initial-scale=1\x22>\x0a\x20\x20<title>Authorize\x20—\x20OKDB</title>\x0a\x20\x20<style>\x0a\x20\x20\x20\x20*{box-sizing:border-box;margin:0;padding:0}\x0a\x20\x20\x20\x20body{font-family:system-ui,-apple-system,sans-serif;background:#0d1117;color:#e6edf3;display:flex;align-items:center;justify-content:center;min-height:100vh;padding:16px}\x0a\x20\x20\x20\x20.box{background:#161b22;border:1px\x20solid\x20#30363d;border-radius:14px;padding:32px;width:380px;display:flex;flex-direction:column;gap:20px}\x0a\x20\x20\x20\x20.logo{font-size:12px;font-weight:700;letter-spacing:2px;color:#4da3ff;opacity:.6;text-transform:uppercase}\x0a\x20\x20\x20\x20h2{font-size:20px;font-weight:600}\x0a\x20\x20\x20\x20.app{font-size:13px;color:#8b949e;margin-top:6px}\x0a\x20\x20\x20\x20.app\x20strong{color:#e6edf3}\x0a\x20\x20\x20\x20.tabs{display:flex;background:#0d1117;border:1px\x20solid\x20#30363d;border-radius:8px;overflow:hidden}\x0a\x20\x20\x20\x20.tab{flex:1;padding:8px;background:transparent;border:none;color:#8b949e;cursor:pointer;font-size:13px;transition:.15s}\x0a\x20\x20\x20\x20.tab.active{background:#21262d;color:#e6edf3;font-weight:600}\x0a\x20\x20\x20\x20.field{display:flex;flex-direction:column;gap:4px}\x0a\x20\x20\x20\x20label{font-size:12px;color:#8b949e}\x0a\x20\x20\x20\x20input[type=text],input[type=password]{width:100%;padding:9px\x2012px;background:#0d1117;border:1px\x20solid\x20#30363d;border-radius:8px;color:#e6edf3;font-size:14px;outline:none;transition:border\x20.15s}\x0a\x20\x20\x20\x20input:focus{border-color:#1f6feb}\x0a\x20\x20\x20\x20button#submit{width:100%;padding:10px;background:#1f6feb;border:none;border-radius:8px;color:#fff;font-size:14px;font-weight:600;cursor:pointer;transition:.15s;margin-top:4px}\x0a\x20\x20\x20\x20button#submit:hover:not(:disabled){background:#388bfd}\x0a\x20\x20\x20\x20button#submit:disabled{opacity:.5;cursor:not-allowed}\x0a\x20\x20\x20\x20.err{background:rgba(255,60,60,.08);border:1px\x20solid\x20rgba(255,60,60,.25);border-radius:8px;padding:10px\x2014px;font-size:13px;color:#ff7b72;display:none}\x0a\x20\x20\x20\x20.err.on{display:block}\x0a\x20\x20\x20\x20.note{font-size:11px;color:#8b949e;opacity:.7;text-align:center}\x0a\x20\x20</style>\x0a</head>\x0a<body>\x0a\x20\x20<div\x20class=\x22box\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22logo\x22>OKDB</div>\x0a\x20\x20\x20\x20<div>\x0a\x20\x20\x20\x20\x20\x20<h2>Authorize\x20Access</h2>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22app\x22><strong>'+_0x500f83(_0x401f34[_0x44a1fa(0x1a5)])+_0x44a1fa(0x5b5)+(_0x1b29b8?_0x500f83(_0x1b29b8):'')+_0x44a1fa(0xf6c)+_0x500f83(_0x401f34[_0x44a1fa(0x1a5)])+'\x20after\x20authorizing.</div>\x0a\x20\x20</div>\x0a\x20\x20<script>\x0a\x20\x20\x20\x20var\x20mode\x20=\x20\x27pw\x27;\x0a\x20\x20\x20\x20function\x20sw(id)\x20{\x0a\x20\x20\x20\x20\x20\x20mode\x20=\x20id;\x0a\x20\x20\x20\x20\x20\x20[\x27pw\x27,\x27tk\x27].forEach(function(x){\x20document.getElementById(x).style.display\x20=\x20x===id?\x27\x27:\x27none\x27;\x20});\x0a\x20\x20\x20\x20\x20\x20document.querySelectorAll(\x27.tab\x27).forEach(function(t,i){\x20t.classList.toggle(\x27active\x27,\x20[\x27pw\x27,\x27tk\x27][i]===id);\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20//\x20Auto-focus\x20the\x20right\x20field\x0a\x20\x20\x20\x20document.addEventListener(\x27DOMContentLoaded\x27,\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20('+(_0x1b29b8?_0x44a1fa(0x7e8):_0x44a1fa(0x2fd))+')\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20e\x20=\x20document.getElementById(\x27err\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20e.classList.add(\x27on\x27);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20document.getElementById(\x27password\x27).focus();\x0a\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20document.getElementById(\x27submit\x27).addEventListener(\x27click\x27,\x20submit);\x0a\x20\x20\x20\x20document.addEventListener(\x27keydown\x27,\x20function(e){\x20if(e.key===\x27Enter\x27)\x20submit();\x20});\x0a\x0a\x20\x20\x20\x20async\x20function\x20submit()\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20btn\x20=\x20document.getElementById(\x27submit\x27);\x0a\x20\x20\x20\x20\x20\x20var\x20errEl\x20=\x20document.getElementById(\x27err\x27);\x0a\x20\x20\x20\x20\x20\x20btn.disabled\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20btn.textContent\x20=\x20\x27Authorizing…\x27;\x0a\x20\x20\x20\x20\x20\x20errEl.classList.remove(\x27on\x27);\x0a\x0a\x20\x20\x20\x20\x20\x20var\x20body\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20client_id:\x20\x20\x20\x20\x20\x20'+JSON[_0x44a1fa(0xf75)](_0x31c402)+',\x0a\x20\x20\x20\x20\x20\x20\x20\x20redirect_uri:\x20\x20\x20'+JSON[_0x44a1fa(0xf75)](_0x29efd0)+_0x44a1fa(0xe5d)+JSON['stringify'](_0x5de091||'')+_0x44a1fa(0x91e)+JSON['stringify'](_0x5b26e1)+_0x44a1fa(0xe37)+JSON['stringify'](_0x3d424f||'')+_0x44a1fa(0x8ab);}function _0x500f83(_0x263928){const _0x45b059=_0x5dc724;return String(_0x263928??'')[_0x45b059(0x8d8)](/&/g,_0x45b059(0xbd3))['replace'](/</g,_0x45b059(0xeaf))['replace'](/>/g,'>');}function _0x5f1d0d(_0x338b54,_0x53b788){const _0x31cb4f=_0x5dc724,_0x23c30f=_0x1b1ac3['resolve'](_0x338b54,'.'+_0x53b788);if(!_0x23c30f['startsWith'](_0x1b1ac3[_0x31cb4f(0x797)](_0x338b54)))return null;return _0x23c30f;}function _0x84b78e(_0x5bdf19){const _0x4131c8=_0x5dc724,_0x1b3c8c={};if(!_0x5bdf19)return _0x1b3c8c;for(const _0x1c4917 of String(_0x5bdf19)[_0x4131c8(0xfb1)](';')){const _0x433e9e=_0x1c4917[_0x4131c8(0x10b8)]('=');if(_0x433e9e===-0x1)continue;_0x1b3c8c[_0x1c4917[_0x4131c8(0xc3c)](0x0,_0x433e9e)[_0x4131c8(0xf4d)]()]=decodeURIComponent(_0x1c4917['slice'](_0x433e9e+0x1)[_0x4131c8(0xf4d)]());}return _0x1b3c8c;}function _0x5d2c7a(_0x266b04){const _0x18ec59=_0x5dc724;try{return _0x168b6a[_0x18ec59(0xdcb)](_0x266b04)[_0x18ec59(0xdb3)]();}catch{return![];}}function _0x870b1(_0x174e41,_0x1da2fb){const _0x5d9ad2=_0x5dc724,_0x5dac9f=_0x1b1ac3[_0x5d9ad2(0xfeb)](_0x174e41),_0x5d4224=[_0x5d9ad2(0x326),_0x5d9ad2(0x52f),_0x5d9ad2(0x171)][_0x5d9ad2(0x29c)](_0x5dac9f);return{'status':0xc8,'headers':{'content-type':_0x1da2fb||_0x58e2d9(_0x174e41),..._0x5d4224?{'cache-control':_0x5d9ad2(0x4e4)}:{}},'body':_0x168b6a[_0x5d9ad2(0xf9f)](_0x174e41)};}function _0x58e2d9(_0x3cf748){const _0x35665a=_0x5dc724;switch(_0x1b1ac3['extname'](_0x3cf748)){case'.html':return _0x35665a(0x44c);case _0x35665a(0x326):return _0x35665a(0xee0);case _0x35665a(0x171):return _0x35665a(0x9e3);case _0x35665a(0x41a):return _0x35665a(0xf9b);case'.md':return _0x35665a(0xe8d);case _0x35665a(0x873):return _0x35665a(0xe6e);case'.jpg':return _0x35665a(0x11d);case'.ico':return _0x35665a(0x284);case _0x35665a(0x1d8):return _0x35665a(0x4eb);default:return _0x35665a(0xc2e);}}return okdbAdmin;}var okdbMeta,hasRequiredOkdbMeta;function requireOkdbMeta(){const _0x43253e=_0xef8cd8;if(hasRequiredOkdbMeta)return okdbMeta;hasRequiredOkdbMeta=0x1;class _0x51a652{constructor(_0xae6b82){const _0xb2e9b8=_0x47ab;this[_0xb2e9b8(0xd4f)]=_0xae6b82;}get[_0x43253e(0x308)](){const _0x373b3b=_0x43253e;return this[_0x373b3b(0xd4f)]['env'](_0x373b3b(0x8d0));}['_getEnv'](_0x1d8086='default'){const _0x9d670f=_0x43253e;return this[_0x9d670f(0xd4f)][_0x9d670f(0x30b)](_0x1d8086);}[_0x43253e(0x240)](_0x5048de){const _0x5b98b8=_0x43253e;return[...this['_getEnv'](_0x5048de)[_0x5b98b8(0xce1)][_0x5b98b8(0x40e)]()];}[_0x43253e(0x21d)](_0x33293a){const _0x7b1ba2=_0x43253e;return this[_0x7b1ba2(0xd4f)][_0x7b1ba2(0x7c0)](_0x33293a);}['describeType'](_0x141281,_0x202dcd){const _0x5dcd3b=_0x43253e,_0x4d8f53=this[_0x5dcd3b(0x5ee)](_0x202dcd)['_getType'](_0x141281),_0x3a3657={};for(const [_0x47b1f8,_0x140af7]of _0x4d8f53[_0x5dcd3b(0x970)]){_0x3a3657[_0x47b1f8]=[..._0x140af7][_0x5dcd3b(0x3f6)]();}return{'type':_0x141281,'count':_0x4d8f53[_0x5dcd3b(0xc88)][_0x5dcd3b(0x7df)](),'indexes':[..._0x4d8f53['indexToDb'][_0x5dcd3b(0xa52)]()],'fields':_0x3a3657};}[_0x43253e(0x10cf)](_0x204c06){const _0x298f31=_0x43253e,_0x199d19=this[_0x298f31(0x240)](_0x204c06),_0x456b02={};for(const _0x5950f1 of _0x199d19){_0x456b02[_0x5950f1]=this[_0x298f31(0x196)](_0x5950f1,_0x204c06);}return _0x456b02;}[_0x43253e(0xd51)](_0x18ac6a,_0x280acb){const _0x5508a8=_0x43253e;return[...this[_0x5508a8(0x5ee)](_0x280acb)[_0x5508a8(0x9ca)](_0x18ac6a)[_0x5508a8(0xf7b)][_0x5508a8(0xa52)]()];}[_0x43253e(0x1094)](_0x32ef0f,_0x438086){const _0x5caee4=_0x43253e;return this[_0x5caee4(0xd4f)][_0x5caee4(0x56c)](_0x32ef0f,_0x438086);}[_0x43253e(0x2ec)](_0x38ea1c,_0x2e440c){const _0x3fcded=_0x43253e;return this[_0x3fcded(0xd4f)][_0x3fcded(0x2ec)](_0x38ea1c,_0x2e440c);}[_0x43253e(0x17f)](_0x195c2d,_0x20514e,_0x2359c5){const _0x8785a9=_0x43253e,_0x4d5bdd=_0x20514e[_0x8785a9(0x3d9)]('~'),_0x3de748=this[_0x8785a9(0x5ee)](_0x2359c5)[_0x8785a9(0x9ca)](_0x195c2d),_0x27d06b=_0x3de748['indexes'][_0x8785a9(0xbeb)](_0x4d5bdd);if(!_0x27d06b)return null;return{'type':_0x195c2d,'index':_0x20514e,'status':_0x27d06b[_0x8785a9(0xfcd)],'unique':!!_0x27d06b[_0x8785a9(0x774)]};}[_0x43253e(0xec6)](_0x43582d,_0x88de83){const _0xda0907=_0x43253e,_0x3ab1c=this['_getEnv'](_0x88de83)[_0xda0907(0x9ca)](_0x43582d),_0x1a3c66={};for(const [_0x1a2fb7]of _0x3ab1c['indexToDb']){const _0x5df73c=_0x3ab1c['indexes']['get'](_0x1a2fb7);_0x1a3c66[_0x1a2fb7]={'status':_0x5df73c?.[_0xda0907(0xfcd)]??null,'unique':!!_0x5df73c?.[_0xda0907(0x774)]};}return _0x1a3c66;}#mapStats(_0x2f6664){const _0x52c364=_0x43253e;return{'entryCount':_0x2f6664[_0x52c364(0x1107)],'pages':_0x2f6664[_0x52c364(0x716)]+_0x2f6664[_0x52c364(0x772)]+_0x2f6664[_0x52c364(0xb7b)]};}[_0x43253e(0xa5)](_0x153478,_0x5dcb1b){const _0x44f4da=_0x43253e,_0x3530a=this[_0x44f4da(0x5ee)](_0x5dcb1b)['_getType'](_0x153478)['data'][_0x44f4da(0x1115)]();return this.#mapStats(_0x3530a);}[_0x43253e(0xbea)](_0x5b6b76,_0x503e87,_0x3abe4a){const _0x5d8db9=_0x43253e,_0x13a60e=_0x503e87[_0x5d8db9(0x3d9)]('~'),_0x6d16af=this['_getEnv'](_0x3abe4a)[_0x5d8db9(0x9ca)](_0x5b6b76)[_0x5d8db9(0xf7b)]['get'](_0x13a60e);if(!_0x6d16af)return null;const _0x1eec8b=_0x6d16af['db']['getStats']();return this.#mapStats(_0x1eec8b);}[_0x43253e(0xf8)](_0xe743cf,_0x48edd1){const _0x1a4326=_0x43253e,_0xbaaf65=this[_0x1a4326(0x5ee)](_0x48edd1)['_getType'](_0xe743cf),_0x56d3fb={};for(const [_0x361e2b,_0x4cf367]of _0xbaaf65[_0x1a4326(0x970)]){_0x56d3fb[_0x361e2b]=[..._0x4cf367][_0x1a4326(0x3f6)]();}const _0x120144={'type':_0xe743cf,'count':_0xbaaf65[_0x1a4326(0xc88)][_0x1a4326(0x7df)](),'stats':this[_0x1a4326(0xa5)](_0xe743cf,_0x48edd1),'fields':_0x56d3fb,'indexes':{}};for(const [_0x584beb,_0x26321]of _0xbaaf65[_0x1a4326(0xf7b)]){_0x120144[_0x1a4326(0xb4f)][_0x584beb]={'status':_0xbaaf65['indexes'][_0x1a4326(0xbeb)](_0x584beb)?.[_0x1a4326(0xfcd)]??null,'unique':!!_0xbaaf65[_0x1a4326(0xb4f)]['get'](_0x584beb)?.[_0x1a4326(0x774)],'stats':this.#mapStats(_0x26321['db']['getStats']())};}return _0x120144;}[_0x43253e(0x117a)](_0x54fbea){const _0x4e4c64=_0x43253e,_0x3284d2={};for(const _0xee389b of this['listTypes'](_0x54fbea)){_0x3284d2[_0xee389b]=this[_0x4e4c64(0xf8)](_0xee389b,_0x54fbea);}return _0x3284d2;}async['recomputeFields'](_0xc9db1d,_0x11c5a3){const _0x1bc959=_0x43253e,_0x36f635=this[_0x1bc959(0x5ee)](_0x11c5a3),_0x296ab6=_0x36f635[_0x1bc959(0x9ca)](_0xc9db1d);_0x296ab6[_0x1bc959(0x970)][_0x1bc959(0x859)]();for(const {value:_0x5d5399}of _0x296ab6['data'][_0x1bc959(0x9ce)]()){_0x36f635[_0x1bc959(0x35d)](_0xc9db1d,_0x5d5399);}}[_0x43253e(0xdda)](_0x348340){const _0x1aa349=_0x43253e;return this[_0x1aa349(0xd4f)][_0x1aa349(0x7df)](_0x348340);}[_0x43253e(0xb63)](_0x46a333,_0x5f4c22,_0x3291d5){const _0x17c859=_0x43253e,_0x548174=_0x5f4c22[_0x17c859(0x3d9)]('~'),_0x1c5184=this['_getEnv'](_0x3291d5)[_0x17c859(0x9ca)](_0x46a333)[_0x17c859(0xf7b)][_0x17c859(0xbeb)](_0x548174);return _0x1c5184?_0x1c5184['db'][_0x17c859(0x7df)]():0x0;}[_0x43253e(0x120)](_0x55781d){const _0x393ed4=_0x43253e;return this[_0x393ed4(0xdda)](_0x55781d)===0x0;}[_0x43253e(0x82e)](_0x467540,_0x54db7f){const _0x1cbc0f=_0x43253e,_0x5b538d=this[_0x1cbc0f(0x5ee)](_0x54db7f)['_getType'](_0x467540);for(const [_0x3720f8]of _0x5b538d[_0x1cbc0f(0xf7b)]){if(_0x5b538d['indexes'][_0x1cbc0f(0xbeb)](_0x3720f8)?.[_0x1cbc0f(0xfcd)]!==_0x1cbc0f(0x8f0))return![];}return!![];}['listIndexKeys'](_0x3a8bfb,_0x5caa8b,_0x9fbb29,_0x392c7a){const _0x57a6b4=_0x43253e,_0x3b3848=_0x5caa8b[_0x57a6b4(0x3d9)]('~'),_0x161545=this[_0x57a6b4(0x5ee)](_0x392c7a)[_0x57a6b4(0x9ca)](_0x3a8bfb)[_0x57a6b4(0xf7b)][_0x57a6b4(0xbeb)](_0x3b3848);if(!_0x161545)return[];return[..._0x161545['db'][_0x57a6b4(0x40e)](_0x9fbb29)];}[_0x43253e(0xae8)](_0x4a23ea,_0x691d42=0x64){const _0x170445=_0x43253e,_0xb8d9de=[],_0x4af2e1=this['okdb'][_0x170445(0xe20)][_0x170445(0x9ce)]({'start':[_0x4a23ea,0x0],'end':[_0x4a23ea,Number[_0x170445(0xac8)]],'reverse':!![],'limit':_0x691d42});for(const {key:_0x4cec44,value:_0xc91275}of _0x4af2e1){const _0x284894=_0x4cec44[0x1];_0xb8d9de[_0x170445(0x597)]({'id':_0xc91275,'clock':_0x284894});}return _0xb8d9de;}[_0x43253e(0xbc1)](_0x24a0aa,_0x1bb152){return{'type':_0x24a0aa,'index':_0x1bb152,'paths':_0x1bb152};}['meta'](){const _0x1af753=_0x43253e;return this[_0x1af753(0x117a)]();}}return okdbMeta=_0x51a652,okdbMeta;}var version=_0xef8cd8(0xa58),require$$36={'version':version},okdbMigrate,hasRequiredOkdbMigrate;function requireOkdbMigrate(){const _0x520cc8=_0xef8cd8;if(hasRequiredOkdbMigrate)return okdbMigrate;hasRequiredOkdbMigrate=0x1;const _0x51348b=require$$0$7,_0x3132e1=require$$1$2,_0x547dda='header',_0x1344d4=_0x520cc8(0x30b),_0x4227ad=_0x520cc8(0xdce),_0x36f082=_0x520cc8(0xc88),_0x5ea22c=_0x520cc8(0x3fe),_0x49ce69=0x1f4;class _0xfc0cd7{constructor(_0x100fc4){const _0x820b4b=_0x520cc8;this[_0x820b4b(0xd4f)]=_0x100fc4;}[_0x520cc8(0xebe)](_0x59f27f=_0x520cc8(0x8d0)){const _0x1551f1=_0x520cc8;return this['okdb'][_0x1551f1(0x30b)](_0x59f27f);}async['_resolveOrCreateEnv'](_0x4ee7f4=_0x520cc8(0x8d0)){const _0x5f596a=_0x520cc8;return!this['okdb'][_0x5f596a(0xa3)][_0x5f596a(0x9d0)](_0x4ee7f4)&&await this[_0x5f596a(0xd4f)][_0x5f596a(0xf79)](_0x4ee7f4,{'sync':!![]}),this[_0x5f596a(0xd4f)][_0x5f596a(0x30b)](_0x4ee7f4);}['_listTypes'](_0x46827c,_0x45a520){const _0x30cf77=_0x520cc8,_0x4c5e0e=[..._0x46827c[_0x30cf77(0xce1)][_0x30cf77(0x40e)]()][_0x30cf77(0x1103)](_0x386374=>!_0x386374[_0x30cf77(0x8ba)]('~'));if(!_0x45a520)return _0x4c5e0e;return _0x4c5e0e[_0x30cf77(0x1103)](_0x335ccd=>_0x45a520[_0x30cf77(0x29c)](_0x335ccd));}[_0x520cc8(0xa72)](_0x4132d9,_0x4db9c6){const _0x2c2826=_0x520cc8,_0x56d02b=_0x4132d9[_0x2c2826(0x1145)][_0x2c2826(0xbeb)](_0x4db9c6),_0xaa190d=_0x4132d9[_0x2c2826(0xce1)][_0x2c2826(0xbeb)](_0x4db9c6)||{},_0x327407=[];for(const [,_0x170e9d]of _0x56d02b?.['indexToDb']??new Map()){const _0x3c3cba={'fields':_0x170e9d[_0x2c2826(0x184)]};if(_0x170e9d[_0x2c2826(0x19f)])_0x3c3cba[_0x2c2826(0xf9)]=_0x170e9d[_0x2c2826(0x19f)];if(_0x170e9d['unique'])_0x3c3cba[_0x2c2826(0x774)]=!![];_0x327407[_0x2c2826(0x597)](_0x3c3cba);}const _0x5c3787={};for(const [_0x283fc4,_0x383034]of Object[_0x2c2826(0x1129)](_0xaa190d['ftsIndexes']||{})){_0x5c3787[_0x283fc4]={'fields':_0x383034[_0x2c2826(0x142)]?.[_0x2c2826(0x461)],'tokenizer':_0x383034[_0x2c2826(0x142)]?.[_0x2c2826(0xb75)]};}const _0x40268b={'indexes':_0x327407,'ftsIndexes':_0x5c3787};return _0xaa190d[_0x2c2826(0xdce)]&&(_0x40268b[_0x2c2826(0xdce)]=_0xaa190d[_0x2c2826(0xdce)]),_0x40268b;}async[_0x520cc8(0xfa7)](_0x2488f2,_0x5d99f5={}){const _0x319096=_0x520cc8,{envName:envName=_0x319096(0x8d0),types:types=null,includeChanges:includeChanges=![],_noHeader:_noHeader=![]}=_0x5d99f5,_0x50cdf3=this['_resolveEnv'](envName),_0x238ab8=this['_listTypes'](_0x50cdf3,types);let _0x100419=0x0,_0x1191b5=0x0;const _0x11a053=_0xfe083e=>{const _0x45a5ea=_0x319096;_0x2488f2['write'](JSON[_0x45a5ea(0xf75)](_0xfe083e)+'\x0a');};!_noHeader&&_0x11a053({'r':_0x547dda,'kdbVersion':require$$36[_0x319096(0x45c)],'exportedAt':Date['now'](),'envName':envName});for(const _0x320fb1 of _0x238ab8){const _0x5d9b57=_0x50cdf3[_0x319096(0x1145)][_0x319096(0xbeb)](_0x320fb1);if(!_0x5d9b57)continue;const _0x1b9003=this[_0x319096(0xa72)](_0x50cdf3,_0x320fb1);_0x11a053({'r':_0x4227ad,'type':_0x320fb1,..._0x1b9003});for(const {key:_0x53f2d8,value:_0x48f015,version:_0x2660e2}of _0x5d9b57[_0x319096(0xc88)][_0x319096(0x9ce)]({'snapshot':!![]})){_0x11a053({'r':_0x36f082,'t':_0x320fb1,'k':_0x53f2d8,'v':_0x48f015,'ver':_0x2660e2}),_0x100419++;}}if(includeChanges&&_0x50cdf3[_0x319096(0x745)])for(const {key:_0x1926ec,value:_0x3d7ccc}of _0x50cdf3['clockToChangeDb']['getRange']({'snapshot':!![]})){_0x11a053({'r':_0x5ea22c,'clock':_0x1926ec,'event':_0x3d7ccc}),_0x1191b5++;}return{'types':_0x238ab8['length'],'records':_0x100419,'changes':_0x1191b5};}async[_0x520cc8(0x101b)](_0x5756dc,_0x48e96b={}){const _0x43be58=_0x520cc8;_0x51348b[_0x43be58(0xb69)](_0x3132e1[_0x43be58(0xad5)](_0x5756dc),{'recursive':!![]});const _0x275628=_0x51348b[_0x43be58(0x1113)](_0x5756dc),_0x108b95=await this[_0x43be58(0xfa7)](_0x275628,_0x48e96b);return await new Promise((_0x5e000f,_0x30b67b)=>{const _0x5b4225=_0x43be58;_0x275628[_0x5b4225(0xc9c)](),_0x275628[_0x5b4225(0x1064)](_0x5b4225(0xa2e),_0x5e000f),_0x275628[_0x5b4225(0x1064)](_0x5b4225(0x225),_0x30b67b);}),{..._0x108b95,'filePath':_0x5756dc};}async['exportEnvsToStream'](_0x1eca6a,_0x5e3938={}){const _0x1c2ff1=_0x520cc8,{envNames:envNames=null,types:types=null,includeChanges:includeChanges=![]}=_0x5e3938,_0x6a1031=[...this[_0x1c2ff1(0xd4f)][_0x1c2ff1(0xa3)][_0x1c2ff1(0xa52)]()][_0x1c2ff1(0x1103)](_0x385c32=>!_0x385c32[_0x1c2ff1(0x8ba)]('~')),_0x2fa6a3=envNames?_0x6a1031['filter'](_0x6cb8bd=>envNames[_0x1c2ff1(0x29c)](_0x6cb8bd)):_0x6a1031;_0x1eca6a[_0x1c2ff1(0x61d)](JSON[_0x1c2ff1(0xf75)]({'r':_0x547dda,'kdbVersion':require$$36[_0x1c2ff1(0x45c)],'exportedAt':Date['now'](),'envNames':_0x2fa6a3})+'\x0a');let _0x3e9ccb=0x0,_0x153b32=0x0,_0xe5d04b=0x0;for(const _0x18206f of _0x2fa6a3){_0x1eca6a[_0x1c2ff1(0x61d)](JSON[_0x1c2ff1(0xf75)]({'r':_0x1344d4,'name':_0x18206f})+'\x0a');const _0x2e9248=await this[_0x1c2ff1(0xfa7)](_0x1eca6a,{'envName':_0x18206f,'types':types,'includeChanges':includeChanges,'_noHeader':!![]});_0x3e9ccb+=_0x2e9248[_0x1c2ff1(0x450)],_0x153b32+=_0x2e9248['records'],_0xe5d04b+=_0x2e9248[_0x1c2ff1(0xf0c)];}return{'envs':_0x2fa6a3[_0x1c2ff1(0x156)],'types':_0x3e9ccb,'records':_0x153b32,'changes':_0xe5d04b};}async[_0x520cc8(0xdfa)](_0x2dcbd9,_0x57caeb={}){const _0x32b913=_0x520cc8,{envName:_0x581f64=null,types:_0x3de5f6=null,dropExisting:dropExisting=![],batchSize:batchSize=_0x49ce69,includeChanges:includeChanges=![],onProgress:onProgress=null}=_0x57caeb;let _0x1452c8=_0x581f64??_0x32b913(0x8d0),_0x477839=null,_0x1acb2a=0x0,_0xc4985=0x0,_0xd24e17=0x0,_0xc964bd=null,_0x6d4fdc=[];const _0x556c38=[],_0x37be74=async()=>{const _0x487b27=_0x32b913;if(!_0x6d4fdc[_0x487b27(0x156)]||!_0xc964bd||!_0x477839)return;await _0x477839['db'][_0x487b27(0x683)](()=>{const _0x4745b1=_0x487b27;for(const {k:_0x250614,v:_0x2edc07,ver:_0xd588f1}of _0x6d4fdc){_0x477839[_0x4745b1(0xccd)](null,_0xc964bd,_0x250614,_0x2edc07,{'version':_0xd588f1,'origin':_0x4745b1(0x888)});}}),_0xc4985+=_0x6d4fdc['length'],onProgress?.({'type':_0xc964bd,'count':_0xc4985}),_0x6d4fdc=[];};await this[_0x32b913(0x5de)](_0x2dcbd9,async _0x6b927f=>{const _0x387b55=_0x32b913,_0x4bf689=_0x6b927f['r'];if(_0x4bf689===_0x547dda){if(!_0x581f64&&_0x6b927f['envName'])_0x1452c8=_0x6b927f['envName'];_0x477839=await this[_0x387b55(0x8ff)](_0x1452c8);return;}if(!_0x477839)_0x477839=await this[_0x387b55(0x8ff)](_0x1452c8);if(_0x4bf689===_0x1344d4){await _0x37be74(),_0xc964bd=null,_0x1452c8=_0x581f64??_0x6b927f[_0x387b55(0x1173)],_0x477839=await this['_resolveOrCreateEnv'](_0x1452c8);return;}if(_0x4bf689===_0x4227ad){const {type:_0x20f7c6,indexes:indexes=[],ftsIndexes:ftsIndexes={},schema:_0x262d4c}=_0x6b927f;if(_0x3de5f6&&!_0x3de5f6['includes'](_0x20f7c6))return;await _0x37be74(),_0xc964bd=_0x20f7c6;dropExisting&&_0x477839['hasType'](_0x20f7c6)&&await _0x477839['dropType'](_0x20f7c6);!_0x477839[_0x387b55(0x7c0)](_0x20f7c6)&&(await _0x477839[_0x387b55(0xa39)](_0x20f7c6),_0x1acb2a++);for(const _0x10180e of indexes){if(!_0x477839[_0x387b55(0x56c)](_0x20f7c6,_0x10180e[_0x387b55(0x461)])){const _0x2b589a={};_0x10180e[_0x387b55(0xf9)]&&(_0x2b589a[_0x387b55(0xaee)]=_0x387b55(0xf9),_0x2b589a['precision']=_0x10180e[_0x387b55(0xf9)][_0x387b55(0x105e)]);if(_0x10180e[_0x387b55(0x774)])_0x2b589a[_0x387b55(0x774)]=!![];await _0x477839[_0x387b55(0x11ee)](_0x20f7c6,_0x10180e[_0x387b55(0x461)],_0x2b589a);}}for(const [_0xf05a88,_0x18c9dc]of Object[_0x387b55(0x1129)](ftsIndexes)){!this['okdb'][_0x387b55(0xfca)][_0x387b55(0x9d0)](_0x20f7c6,_0xf05a88,_0x477839)&&await this[_0x387b55(0xd4f)][_0x387b55(0xfca)][_0x387b55(0x2a4)](_0x20f7c6,_0xf05a88,{'fields':_0x18c9dc[_0x387b55(0x461)],'tokenizer':_0x18c9dc[_0x387b55(0xb75)]},undefined,_0x477839);}_0x262d4c?.[_0x387b55(0x83a)]&&_0x556c38['push']({'env':_0x477839,'type':_0x20f7c6,'schema':_0x262d4c});return;}if(_0x4bf689===_0x36f082){if(_0x3de5f6&&!_0x3de5f6['includes'](_0x6b927f['t']))return;_0x6b927f['t']!==_0xc964bd&&(await _0x37be74(),_0xc964bd=_0x6b927f['t']);_0x6d4fdc[_0x387b55(0x597)]({'k':_0x6b927f['k'],'v':_0x6b927f['v'],'ver':_0x6b927f[_0x387b55(0x210)]});if(_0x6d4fdc['length']>=batchSize)await _0x37be74();return;}_0x4bf689===_0x5ea22c&&includeChanges&&_0x477839[_0x387b55(0x745)]&&(_0x477839[_0x387b55(0xcda)][_0x387b55(0xb6f)](_0x6b927f[_0x387b55(0x114d)],_0x6b927f[_0x387b55(0x64d)]),_0xd24e17++);}),await _0x37be74();for(const {env:_0x114379,type:_0x13b3a3,schema:_0x1022cd}of _0x556c38){try{await _0x114379[_0x32b913(0xb46)](_0x13b3a3,_0x1022cd);}catch{if(_0x1022cd[_0x32b913(0xcf0)])try{await _0x114379['setSchema'](_0x13b3a3,{..._0x1022cd,'enforce':![]});}catch{}}}return{'types':_0x1acb2a,'records':_0xc4985,'changes':_0xd24e17};}async['importFromFile'](_0x505a64,_0x1b1108={}){const _0xaca6=_0x520cc8,_0x5dff27=_0x51348b[_0xaca6(0xf9f)](_0x505a64,{'encoding':_0xaca6(0x57a)});return this[_0xaca6(0xdfa)](_0x5dff27,_0x1b1108);}[_0x520cc8(0x5de)](_0x233e43,_0x52c68a){return new Promise((_0x573f6f,_0x3ef60c)=>{const _0x5e4f04=_0x47ab;let _0x1587cd='',_0x30b53e=Promise[_0x5e4f04(0x797)]();const _0x1f6e1b=async _0x5ec725=>{const _0x479208=_0x5e4f04;_0x1587cd+=_0x5ec725;const _0x2c6ad7=_0x1587cd[_0x479208(0xfb1)]('\x0a');_0x1587cd=_0x2c6ad7[_0x479208(0x5f1)]();for(const _0x18800a of _0x2c6ad7){const _0x1732c6=_0x18800a[_0x479208(0xf4d)]();if(!_0x1732c6)continue;let _0x193ace;try{_0x193ace=JSON[_0x479208(0xdcd)](_0x1732c6);}catch{continue;}await _0x52c68a(_0x193ace);}};_0x233e43['on'](_0x5e4f04(0xc88),_0x2d08c1=>{_0x30b53e=_0x30b53e['then'](()=>_0x1f6e1b(String(_0x2d08c1)));}),_0x233e43['on'](_0x5e4f04(0xc9c),()=>{const _0xfa0f48=_0x5e4f04;_0x30b53e[_0xfa0f48(0x7db)](async()=>{const _0xfd0679=_0xfa0f48,_0x1261e0=_0x1587cd[_0xfd0679(0xf4d)]();if(_0x1261e0)try{await _0x52c68a(JSON[_0xfd0679(0xdcd)](_0x1261e0));}catch{}_0x573f6f();})['catch'](_0x3ef60c);}),_0x233e43['on'](_0x5e4f04(0x225),_0x3ef60c);});}async[_0x520cc8(0xb89)](_0x496bde,_0xb1c5ca={}){const _0x25ee3d=_0x520cc8,{envNames:envNames=null,compact:compact=!![]}=_0xb1c5ca;_0x51348b[_0x25ee3d(0xb69)](_0x496bde,{'recursive':!![]});const _0x180b20=envNames?[...this[_0x25ee3d(0xd4f)][_0x25ee3d(0xa3)]['entries']()]['filter'](([_0xcf2aa0])=>envNames[_0x25ee3d(0x29c)](_0xcf2aa0)):[...this[_0x25ee3d(0xd4f)]['_envs'][_0x25ee3d(0x1129)]()],_0x19618e=[];for(const [_0x4f9aab,_0x3ef695]of _0x180b20){if(!_0x3ef695[_0x25ee3d(0xe56)]||!_0x3ef695['db'])continue;const _0x481c90=_0x4f9aab[_0x25ee3d(0x8d8)](/[:/\\?*"<>|]/g,'_'),_0x3faff5=_0x3132e1[_0x25ee3d(0x3d9)](_0x496bde,_0x481c90);_0x51348b[_0x25ee3d(0xb69)](_0x3faff5,{'recursive':!![]});let _0x12dabb=0x0;try{_0x12dabb=_0x51348b['statSync'](_0x3132e1[_0x25ee3d(0x3d9)](_0x3ef695['path'],'data.mdb'))[_0x25ee3d(0xfb)];}catch{}await _0x3ef695['db'][_0x25ee3d(0xb89)](_0x3faff5,{'compact':compact});let _0x15a99c=0x0;try{_0x15a99c=_0x51348b['statSync'](_0x3132e1[_0x25ee3d(0x3d9)](_0x3faff5,_0x25ee3d(0x358)))['size'];}catch{}_0x19618e['push']({'name':_0x4f9aab,'dest':_0x3faff5,'sizeBefore':_0x12dabb,'sizeAfter':_0x15a99c});}const _0x5ccdea=this[_0x25ee3d(0xd4f)][_0x25ee3d(0xf5b)]?.[_0x25ee3d(0x4df)];return _0x5ccdea&&_0x51348b[_0x25ee3d(0x66d)](_0x5ccdea)&&await this[_0x25ee3d(0x123)](_0x5ccdea,_0x3132e1[_0x25ee3d(0x3d9)](_0x496bde,_0x25ee3d(0xd50))),{'ok':!![],'envs':_0x19618e};}async[_0x520cc8(0x123)](_0x30358c,_0x4fcc94){const _0x3d79fb=_0x520cc8;_0x51348b[_0x3d79fb(0xb69)](_0x4fcc94,{'recursive':!![]});for(const _0x559837 of _0x51348b[_0x3d79fb(0xa38)](_0x30358c,{'withFileTypes':!![]})){const _0x59ff38=_0x3132e1[_0x3d79fb(0x3d9)](_0x30358c,_0x559837['name']),_0x38b258=_0x3132e1['join'](_0x4fcc94,_0x559837[_0x3d79fb(0x1173)]);_0x559837['isDirectory']()?await this[_0x3d79fb(0x123)](_0x59ff38,_0x38b258):_0x51348b[_0x3d79fb(0xcf4)](_0x59ff38,_0x38b258);}}async[_0x520cc8(0x1236)](_0x2e40ac={}){const _0x272c3b=_0x520cc8,{envName:envName=_0x272c3b(0x8d0),types:types=null,includeChanges:includeChanges=![]}=_0x2e40ac,_0x55515d={'types':{},'changes':[]},_0x8d8057=[],_0x4f9871=new require$$3[(_0x272c3b(0x5c7))]({'write'(_0x1d5051,_0x424329,_0xa3904f){const _0x206353=_0x272c3b;_0x8d8057[_0x206353(0x597)](String(_0x1d5051)),_0xa3904f();}});await this[_0x272c3b(0xfa7)](_0x4f9871,{'envName':envName,'types':types,'includeChanges':includeChanges});for(const _0x44c480 of _0x8d8057['join']('')[_0x272c3b(0xfb1)]('\x0a')){const _0x4811e8=_0x44c480[_0x272c3b(0xf4d)]();if(!_0x4811e8)continue;let _0x11c549;try{_0x11c549=JSON[_0x272c3b(0xdcd)](_0x4811e8);}catch{continue;}if(_0x11c549['r']===_0x4227ad){if(!_0x55515d['types'][_0x11c549[_0x272c3b(0xaee)]])_0x55515d[_0x272c3b(0x450)][_0x11c549['type']]={'entries':[]};if(_0x11c549[_0x272c3b(0xb4f)])_0x55515d[_0x272c3b(0x450)][_0x11c549['type']][_0x272c3b(0xb4f)]=_0x11c549[_0x272c3b(0xb4f)];if(_0x11c549[_0x272c3b(0xf1c)])_0x55515d[_0x272c3b(0x450)][_0x11c549[_0x272c3b(0xaee)]][_0x272c3b(0xf1c)]=_0x11c549[_0x272c3b(0xf1c)];if(_0x11c549[_0x272c3b(0xdce)])_0x55515d['types'][_0x11c549[_0x272c3b(0xaee)]][_0x272c3b(0xdce)]=_0x11c549['schema'];}else{if(_0x11c549['r']===_0x36f082){if(!_0x55515d['types'][_0x11c549['t']])_0x55515d[_0x272c3b(0x450)][_0x11c549['t']]={'entries':[]};_0x55515d['types'][_0x11c549['t']][_0x272c3b(0x1129)][_0x272c3b(0x597)]({'key':_0x11c549['k'],'value':_0x11c549['v'],'version':_0x11c549[_0x272c3b(0x210)]});}else _0x11c549['r']===_0x5ea22c&&_0x55515d[_0x272c3b(0xf0c)]['push']({'clock':_0x11c549[_0x272c3b(0x114d)],'event':_0x11c549['event']});}}return _0x55515d;}async['import'](_0x1fb1ce,_0x3613e9={}){const _0x9ac1d9=_0x520cc8,_0x598654=[];for(const [_0x19166d,_0x2259fd]of Object['entries'](_0x1fb1ce['types']||{})){const _0x4cf25e={'r':_0x4227ad,'type':_0x19166d,'indexes':_0x2259fd['indexes']||[],'ftsIndexes':_0x2259fd['ftsIndexes']||{}};if(_0x2259fd[_0x9ac1d9(0xdce)])_0x4cf25e[_0x9ac1d9(0xdce)]=_0x2259fd[_0x9ac1d9(0xdce)];_0x598654[_0x9ac1d9(0x597)](JSON[_0x9ac1d9(0xf75)](_0x4cf25e));for(const {key:_0x36e866,value:_0xd6b430,version:_0x2808d9}of _0x2259fd[_0x9ac1d9(0x1129)]||[]){_0x598654['push'](JSON[_0x9ac1d9(0xf75)]({'r':_0x36f082,'t':_0x19166d,'k':_0x36e866,'v':_0xd6b430,'ver':_0x2808d9}));}}for(const {clock:_0x132109,event:_0x2a18d9}of _0x1fb1ce[_0x9ac1d9(0xf0c)]||[]){_0x598654['push'](JSON[_0x9ac1d9(0xf75)]({'r':_0x5ea22c,'clock':_0x132109,'event':_0x2a18d9}));}const {Readable:_0x268e72}=require$$3,_0x34ded4=_0x268e72[_0x9ac1d9(0x9f8)](_0x598654[_0x9ac1d9(0x3d9)]('\x0a')+'\x0a');return this['importFromStream'](_0x34ded4,{..._0x3613e9,'dropExisting':_0x3613e9[_0x9ac1d9(0x7c3)]??!![]});}async[_0x520cc8(0xe35)]({pretty:pretty=![]}={}){const _0x1fe5ac=_0x520cc8,_0x56c39c=await this[_0x1fe5ac(0x1236)]();return JSON[_0x1fe5ac(0xf75)](_0x56c39c,null,pretty?0x2:0x0);}async[_0x520cc8(0x531)](_0x1f0468){const _0x2a58a6=_0x520cc8,_0x44d73b=JSON[_0x2a58a6(0xdcd)](_0x1f0468);return this[_0x2a58a6(0x888)](_0x44d73b);}async['exportBlobs'](_0x5e3590){const _0x528618=_0x520cc8;if(!this['okdb']['files'])throw new Error(_0x528618(0x10c5));const _0x430632=this[_0x528618(0xd4f)][_0x528618(0xf5b)][_0x528618(0x4df)];let _0x19b7ad=0x0,_0xd0aa8d=0x0;const _0x5340ca=_0x2ec58c=>{const _0x3f5887=_0x528618;if(!_0x51348b['existsSync'](_0x2ec58c))return;for(const _0x2db086 of _0x51348b['readdirSync'](_0x2ec58c,{'withFileTypes':!![]})){const _0x3440da=_0x3132e1[_0x3f5887(0x3d9)](_0x2ec58c,_0x2db086[_0x3f5887(0x1173)]);if(_0x2db086[_0x3f5887(0x11a0)]()){if(_0x2db086[_0x3f5887(0x1173)]===_0x3f5887(0x7da))continue;_0x5340ca(_0x3440da);}else{const _0x293a2f=_0x3132e1['basename'](_0x3132e1[_0x3f5887(0xad5)](_0x3440da)),_0x3529ee=_0x293a2f+_0x2db086[_0x3f5887(0x1173)],_0xfaaed8=_0x3132e1['join'](_0x5e3590,_0x3529ee[_0x3f5887(0xc3c)](0x0,0x2)),_0x837b47=_0x3132e1['join'](_0xfaaed8,_0x3529ee[_0x3f5887(0xc3c)](0x2));_0x51348b[_0x3f5887(0xb69)](_0xfaaed8,{'recursive':!![]}),_0x51348b[_0x3f5887(0xcf4)](_0x3440da,_0x837b47),_0x19b7ad++;try{_0xd0aa8d+=_0x51348b[_0x3f5887(0xdcb)](_0x3440da)[_0x3f5887(0xfb)];}catch{}}}};return _0x51348b[_0x528618(0xb69)](_0x5e3590,{'recursive':!![]}),_0x5340ca(_0x430632),{'count':_0x19b7ad,'bytes':_0xd0aa8d};}async[_0x520cc8(0xa87)](_0x2258f1){const _0xafdacc=_0x520cc8;if(!this[_0xafdacc(0xd4f)][_0xafdacc(0xf5b)])throw new Error(_0xafdacc(0x10c5));await this['okdb'][_0xafdacc(0xf5b)]['_ensure']();let _0x36c020=0x0,_0x587707=0x0;const _0x22b7e=_0xf9b17e=>{const _0x35f5cd=_0xafdacc;if(!_0x51348b[_0x35f5cd(0x66d)](_0xf9b17e))return;for(const _0x19d538 of _0x51348b['readdirSync'](_0xf9b17e,{'withFileTypes':!![]})){const _0x269b9c=_0x3132e1[_0x35f5cd(0x3d9)](_0xf9b17e,_0x19d538[_0x35f5cd(0x1173)]);if(_0x19d538['isDirectory']())_0x22b7e(_0x269b9c);else{const _0x5a3c69=_0x3132e1['basename'](_0x3132e1[_0x35f5cd(0xad5)](_0x269b9c)),_0xebaf2c=_0x5a3c69+_0x19d538[_0x35f5cd(0x1173)],_0x2dc66d=this[_0x35f5cd(0xd4f)][_0x35f5cd(0xf5b)][_0x35f5cd(0x93)](_0xebaf2c);if(_0x51348b['existsSync'](_0x2dc66d)){_0x587707++;continue;}const _0x213376=_0x3132e1[_0x35f5cd(0xad5)](_0x2dc66d);_0x51348b[_0x35f5cd(0xb69)](_0x213376,{'recursive':!![]}),_0x51348b['copyFileSync'](_0x269b9c,_0x2dc66d);const _0x4ec5=this[_0x35f5cd(0xd4f)][_0x35f5cd(0xf5b)][_0x35f5cd(0xa0c)](_0xebaf2c);this[_0x35f5cd(0xd4f)][_0x35f5cd(0xf5b)][_0x35f5cd(0xd11)]?.[_0x35f5cd(0xb6f)](_0xebaf2c,{'refs':_0x4ec5}),_0x36c020++;}}};return _0x22b7e(_0x2258f1),{'imported':_0x36c020,'skipped':_0x587707};}[_0x520cc8(0xa44)](){const _0x28be91=_0x520cc8,_0x453338=[];for(const [,_0x2e26eb]of this[_0x28be91(0xd4f)][_0x28be91(0xa3)]){if(_0x2e26eb[_0x28be91(0x745)]&&_0x2e26eb[_0x28be91(0x7c0)](_0x28be91(0x5b9)))_0x453338[_0x28be91(0x597)](_0x2e26eb);}return _0x453338;}async[_0x520cc8(0xb1a)](){const _0x1651fc=_0x520cc8;if(!this['okdb'][_0x1651fc(0xf5b)])throw new Error(_0x1651fc(0x10c5));await this[_0x1651fc(0xd4f)][_0x1651fc(0xf5b)][_0x1651fc(0xd0d)]();const _0x445bd3=[],_0x56f97b=this[_0x1651fc(0xd4f)][_0x1651fc(0xf5b)];for(const _0x308bd4 of this[_0x1651fc(0xa44)]()){for(const {key:_0xa9cedd,value:_0x549d91}of _0x308bd4[_0x1651fc(0x9ce)](_0x1651fc(0x5b9))){if(!_0x549d91[_0x1651fc(0x6f9)])continue;const _0x21e5c0=_0x56f97b[_0x1651fc(0x93)](_0x549d91[_0x1651fc(0x6f9)]);!_0x51348b[_0x1651fc(0x66d)](_0x21e5c0)&&_0x445bd3['push']({'type':_0x1651fc(0x51d),'env':_0x308bd4['name'],'id':String(_0xa9cedd),'hash':_0x549d91[_0x1651fc(0x6f9)],'message':_0x1651fc(0xe31)+_0xa9cedd+_0x1651fc(0x1d9)+_0x308bd4[_0x1651fc(0x1173)]+'\x22\x20(hash:\x20'+_0x549d91[_0x1651fc(0x6f9)]['slice'](0x0,0x8)+'…)'});const _0x7f9db=_0x56f97b[_0x1651fc(0xd11)]?.[_0x1651fc(0xbeb)](_0x549d91['hash']);(!_0x7f9db||_0x7f9db[_0x1651fc(0xbf5)]<=0x0)&&_0x445bd3[_0x1651fc(0x597)]({'type':'zero_refs','env':_0x308bd4['name'],'id':String(_0xa9cedd),'hash':_0x549d91[_0x1651fc(0x6f9)],'message':_0x1651fc(0x87a)+_0xa9cedd+'\x22\x20in\x20env\x20\x22'+_0x308bd4[_0x1651fc(0x1173)]+_0x1651fc(0x9b8)+_0x549d91[_0x1651fc(0x6f9)][_0x1651fc(0xc3c)](0x0,0x8)+'…)'});}}const _0x220a98=new Set();for(const _0x231998 of this['_allEnvsWithFiles']()){for(const {value:_0x1f12e8}of _0x231998[_0x1651fc(0x9ce)](_0x1651fc(0x5b9))){if(_0x1f12e8[_0x1651fc(0x6f9)])_0x220a98[_0x1651fc(0x33c)](_0x1f12e8[_0x1651fc(0x6f9)]);}}const _0x1fb98a=_0xb1b0fa=>{const _0x92e228=_0x1651fc;if(!_0x51348b[_0x92e228(0x66d)](_0xb1b0fa))return;for(const _0x2384e5 of _0x51348b[_0x92e228(0xa38)](_0xb1b0fa,{'withFileTypes':!![]})){const _0x137a79=_0x3132e1[_0x92e228(0x3d9)](_0xb1b0fa,_0x2384e5[_0x92e228(0x1173)]);if(_0x2384e5[_0x92e228(0x11a0)]()){if(_0x2384e5[_0x92e228(0x1173)]==='tmp')continue;_0x1fb98a(_0x137a79);}else{const _0x23a016=_0x3132e1[_0x92e228(0xbe1)](_0x3132e1[_0x92e228(0xad5)](_0x137a79)),_0x59fb1c=_0x23a016+_0x2384e5[_0x92e228(0x1173)];!_0x220a98[_0x92e228(0x9d0)](_0x59fb1c)&&_0x445bd3[_0x92e228(0x597)]({'type':'orphan_blob','hash':_0x59fb1c,'message':_0x92e228(0x755)+_0x59fb1c['slice'](0x0,0x8)+'…)'});}}};return _0x1fb98a(_0x56f97b[_0x1651fc(0x4df)]),_0x445bd3;}async[_0x520cc8(0xadc)](){const _0x111a6f=_0x520cc8;if(!this[_0x111a6f(0xd4f)][_0x111a6f(0xf5b)])throw new Error('files\x20feature\x20not\x20available');await this['okdb']['files'][_0x111a6f(0xd0d)]();const _0x3cc8a1=this[_0x111a6f(0xd4f)][_0x111a6f(0xf5b)]['_blobStatusDb'];if(!_0x3cc8a1)throw new Error(_0x111a6f(0xa6f));const _0x40bac8=[];for(const {key:_0x185828}of _0x3cc8a1[_0x111a6f(0x9ce)]())_0x40bac8[_0x111a6f(0x597)](_0x185828);for(const _0x5dc16c of _0x40bac8)_0x3cc8a1[_0x111a6f(0x123a)](_0x5dc16c);const _0x3d9da3=new Map();for(const _0xfa5645 of this[_0x111a6f(0xa44)]()){for(const {value:_0x56ed92}of _0xfa5645[_0x111a6f(0x9ce)]('~files')){_0x56ed92[_0x111a6f(0x6f9)]&&_0x3d9da3[_0x111a6f(0x211)](_0x56ed92[_0x111a6f(0x6f9)],(_0x3d9da3[_0x111a6f(0xbeb)](_0x56ed92[_0x111a6f(0x6f9)])??0x0)+0x1);}}for(const [_0x44b90c,_0x529e7d]of _0x3d9da3){_0x3cc8a1[_0x111a6f(0xb6f)](_0x44b90c,{'refs':_0x529e7d});}return{'rebuilt':_0x3d9da3[_0x111a6f(0xfb)]};}}return okdbMigrate=_0xfc0cd7,okdbMigrate;}var okdbSyncIdentity,hasRequiredOkdbSyncIdentity;function requireOkdbSyncIdentity(){const _0x42cbf1=_0xef8cd8;if(hasRequiredOkdbSyncIdentity)return okdbSyncIdentity;hasRequiredOkdbSyncIdentity=0x1;const _0x37215d=require$$0$1,_0x2ba1eb=0x5*0x3c*0x3e8,_0x20ed67=0x2710;function _0x159e07(){const _0x1aad15=_0x47ab,{privateKey:_0x1bf1e5,publicKey:_0x192224}=_0x37215d['generateKeyPairSync'](_0x1aad15(0x381));return{'privateKey':_0x1bf1e5['export']({'type':_0x1aad15(0xad7),'format':_0x1aad15(0xa47)}),'publicKey':_0x192224[_0x1aad15(0x1236)]({'type':'spki','format':_0x1aad15(0xa47)})};}function _0x1ee118(_0x11223e){const _0x30c65a=_0x47ab,_0xd9d18a=_0x11223e==null?'':Buffer[_0x30c65a(0x1ba)](_0x11223e)?_0x11223e:Buffer[_0x30c65a(0x9f8)](String(_0x11223e),'utf8');return _0x37215d['createHash']('sha256')['update'](_0xd9d18a)[_0x30c65a(0xdea)](_0x30c65a(0x57b));}function _0x21a9ba(_0x3d3d71,_0x12a5c2,_0x51562d,_0x297f48,_0x4e50b9){const _0x5cae72=_0x47ab;return _0x5cae72(0x150)+_0x3d3d71+'\x0a'+_0x12a5c2+'\x0a'+_0x51562d[_0x5cae72(0x96d)]()+'\x0a'+_0x297f48+'\x0a'+_0x4e50b9;}function _0x5ab0a6(_0x4cb7d3,_0x4c3eee,_0x5d72ef,_0x5df75e,_0x14fd3c,_0x50bd94){const _0x3fcc4b=_0x47ab,_0x266d14=_0x21a9ba(_0x4c3eee,_0x14fd3c,_0x5d72ef,_0x5df75e,_0x50bd94),_0x4072b0=_0x37215d[_0x3fcc4b(0x95b)](_0x4cb7d3);return _0x37215d['sign'](null,Buffer[_0x3fcc4b(0x9f8)](_0x266d14,_0x3fcc4b(0x57a)),_0x4072b0)[_0x3fcc4b(0x583)]('base64url');}function _0x1f8488(_0x4bb5ad,_0x40054f,_0x5e0f41,_0x306765,_0x46510c,_0x41ad09,_0x22c947){const _0xd122f0=_0x47ab;try{const _0x1da56f=_0x21a9ba(_0x40054f,_0x46510c,_0x5e0f41,_0x306765,_0x41ad09),_0x4678d9=_0x37215d[_0xd122f0(0x1021)](_0x4bb5ad),_0x28bf1e=Buffer[_0xd122f0(0x9f8)](_0x22c947,_0xd122f0(0xb6e));return _0x37215d[_0xd122f0(0xec4)](null,Buffer[_0xd122f0(0x9f8)](_0x1da56f,_0xd122f0(0x57a)),_0x4678d9,_0x28bf1e);}catch{return![];}}class _0x4d70d7{constructor({maxSize:maxSize=_0x20ed67}={}){const _0x1e29d=_0x47ab;this[_0x1e29d(0x1192)]=new Map(),this[_0x1e29d(0x31b)]=maxSize,this['_interval']=setInterval(()=>this[_0x1e29d(0x1a0)](),0xea60);if(this['_interval'][_0x1e29d(0xba4)])this[_0x1e29d(0x9bc)][_0x1e29d(0xba4)]();}[_0x42cbf1(0x10db)](_0x5eadec,_0x27be10){const _0x58c2f6=_0x42cbf1,_0xdc6795=Date['parse'](_0x27be10);if(!Number['isFinite'](_0xdc6795))return![];if(Math[_0x58c2f6(0x9f7)](Date['now']()-_0xdc6795)>_0x2ba1eb)return![];const _0x4b5f84=_0x5eadec+':'+_0x27be10;if(this[_0x58c2f6(0x1192)][_0x58c2f6(0x9d0)](_0x4b5f84))return![];if(this[_0x58c2f6(0x1192)]['size']>=this[_0x58c2f6(0x31b)])return![];return this['_cache'][_0x58c2f6(0x211)](_0x4b5f84,_0xdc6795+_0x2ba1eb),!![];}[_0x42cbf1(0x1a0)](){const _0x27b7f7=_0x42cbf1,_0x4aad0f=Date[_0x27b7f7(0x555)]();for(const [_0x2bb789,_0x26a64f]of this['_cache']){if(_0x26a64f<_0x4aad0f)this[_0x27b7f7(0x1192)][_0x27b7f7(0x3b3)](_0x2bb789);}}[_0x42cbf1(0xe69)](){const _0x4c51ea=_0x42cbf1;clearInterval(this[_0x4c51ea(0x9bc)]),this[_0x4c51ea(0x1192)]['clear']();}}function _0x5c6089(_0xc611ee,_0x17ac7a){const _0x31277c=_0x42cbf1;return _0xc611ee[_0x31277c(0xbeb)](_0x17ac7a)||null;}function _0x1c5183(_0xfa67d1,_0x1e5e8a,_0xa3811){const _0x17b58b=_0x42cbf1;_0xfa67d1[_0x17b58b(0xb6f)](_0x1e5e8a,{..._0xa3811,'updatedAt':Date[_0x17b58b(0x555)]()});}function _0x533aa9(_0x309ab1,_0x3ab612){const _0x57d564=_0x42cbf1;try{_0x309ab1[_0x57d564(0x123a)](_0x3ab612);}catch{}}function _0x1960c3(_0x24a369){const _0xe262ac=_0x42cbf1,_0x30296a=[];try{for(const {key:_0x1bf3df,value:_0x15b2b6}of _0x24a369['getRange']({})){_0x15b2b6&&typeof _0x15b2b6===_0xe262ac(0xb36)&&_0x30296a[_0xe262ac(0x597)]({'nodeId':String(_0x1bf3df),..._0x15b2b6});}}catch{}return _0x30296a;}return okdbSyncIdentity={'generateKeypair':_0x159e07,'hashBody':_0x1ee118,'signRequest':_0x5ab0a6,'verifyRequest':_0x1f8488,'ReplayCache':_0x4d70d7,'REPLAY_WINDOW_MS':_0x2ba1eb,'getTrustedPeer':_0x5c6089,'setTrustedPeer':_0x1c5183,'removeTrustedPeer':_0x533aa9,'listTrustedPeers':_0x1960c3},okdbSyncIdentity;}var okdbSyncHttp,hasRequiredOkdbSyncHttp;function requireOkdbSyncHttp(){if(hasRequiredOkdbSyncHttp)return okdbSyncHttp;hasRequiredOkdbSyncHttp=0x1;const {OKDBError:_0x5b2ada}=requireOkdbError(),_0x482561=requireOkdbSyncIdentity();return okdbSyncHttp=function _0x2834ee(_0xc728c9,_0x14a5c4){const _0x36ffb1=_0x47ab,_0xc41d33=_0xc728c9[_0x36ffb1(0x9f4)];function _0x31f40b(){const _0x34fceb=_0x36ffb1;if(!_0x14a5c4)throw new _0x5b2ada(_0x34fceb(0x1010),'SYNC_NOT_AVAILABLE');}_0xc41d33[_0x36ffb1(0xddb)](_0x13dc87=>_0x13dc87[_0x36ffb1(0x20b)][_0x36ffb1(0x8ba)]('/api/sync'),async _0x5f3d55=>{const _0x257a6e=_0x36ffb1;if(_0x5f3d55['context']?.[_0x257a6e(0xbf9)]===!![])return!![];if(_0x5f3d55[_0x257a6e(0x339)]?.[_0x257a6e(0x93f)]?.[_0x257a6e(0xaee)]===_0x257a6e(0x1d7))return!![];const _0x3bdb39=_0x5f3d55[_0x257a6e(0xcc4)]?.[_0x257a6e(0x1af)];if(!_0x3bdb39)return!![];const _0x264358=_0x14a5c4[_0x257a6e(0x36e)](_0x3bdb39);if(!_0x264358?.[_0x257a6e(0x1007)])return!![];const _0x217db2=_0x5f3d55[_0x257a6e(0xcc4)]?.[_0x257a6e(0xf25)],_0x14e46e=_0x5f3d55[_0x257a6e(0xcc4)]?.[_0x257a6e(0x7bc)];if(!_0x217db2||!_0x14e46e)return!![];const _0x43d881=Date['parse'](_0x14e46e);if(!Number[_0x257a6e(0x2b5)](_0x43d881)||Math[_0x257a6e(0x9f7)](Date['now']()-_0x43d881)>0x5*0x3c*0x3e8)return!![];const _0x38e1f8=_0x5f3d55[_0x257a6e(0xcc4)]?.[_0x257a6e(0x4ab)]??_0x482561['hashBody'](null),_0x1494db=_0x482561['verifyRequest'](_0x264358[_0x257a6e(0x1007)],_0x3bdb39,_0x5f3d55[_0x257a6e(0xfc5)],_0x5f3d55[_0x257a6e(0x20b)],_0x14e46e,_0x38e1f8,_0x217db2);if(!_0x1494db)return!![];if(!_0x14a5c4[_0x257a6e(0x867)][_0x257a6e(0x10db)](_0x3bdb39,_0x14e46e))return!![];return _0x5f3d55['context'][_0x257a6e(0x93f)]={'type':_0x257a6e(0x1d7),'isAuthenticated':!![],'roles':[_0x257a6e(0x90a)],'user':{'id':_0x3bdb39,'username':'node:'+_0x3bdb39,'roles':[_0x257a6e(0x90a)]}},!![];}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0xe46),_0x36ffb1(0xae5),async({body:_0x5d1096,headers:_0x396ed5})=>{const _0x282892=_0x36ffb1;_0x31f40b();const {node:_0xd7d160}=_0x5d1096||{};if(!_0xd7d160||!_0xd7d160['id'])throw new _0x5b2ada(_0x282892(0x4fc),'BAD_REQUEST');if(!_0x14a5c4[_0x282892(0x11e5)]['address']){const _0x3c5f05=(_0x5d1096?.[_0x282892(0x44a)]||'')['trim']();if(_0x3c5f05)_0x14a5c4['options']['address']=_0x3c5f05[_0x282892(0x8d8)](/\/+$/,'');else{if(_0x396ed5?.[_0x282892(0x598)]){const _0x47ec81=_0x396ed5['x-forwarded-proto']||'http';_0x14a5c4[_0x282892(0x11e5)][_0x282892(0x7f2)]=_0x47ec81+_0x282892(0x7b4)+_0x396ed5[_0x282892(0x598)];}}}return await _0x14a5c4['_acceptJoin'](_0xd7d160),{'result':{'ok':!![],'node':_0x14a5c4[_0x282892(0x2e4)](),'clock':_0xc728c9[_0x282892(0x5ea)]()}};},{'id':'sync_join','summary':_0x36ffb1(0x795),'tags':[_0x36ffb1(0x1034)],'body':{'node':{'id':'','address':''}},'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{'node':{'type':_0x36ffb1(0xb36),'additionalProperties':!![]}},'required':[_0x36ffb1(0xc9f)],'additionalProperties':!![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),'shell',_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x565)},'safety':{'access':_0x36ffb1(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0xcd7)},'mcp':{'capability':_0x36ffb1(0x1034),'action':_0x36ffb1(0xdf6)}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0xe46),'/api/sync/connect',async({body:_0x3abed8,headers:_0x4706db})=>{const _0x321f7d=_0x36ffb1;_0x31f40b();const _0x1a353b=(_0x3abed8?.['address']||'')['trim']();if(!_0x1a353b)throw new _0x5b2ada('address\x20is\x20required','BAD_REQUEST');if(!_0x14a5c4['options'][_0x321f7d(0x7f2)]){const _0x320759=(_0x3abed8?.[_0x321f7d(0x44a)]||'')[_0x321f7d(0xf4d)]();if(_0x320759)_0x14a5c4[_0x321f7d(0x11e5)][_0x321f7d(0x7f2)]=_0x320759[_0x321f7d(0x8d8)](/\/+$/,'');else{if(_0x4706db?.['host']){const _0x4851fa=_0x4706db[_0x321f7d(0x87d)]||_0x321f7d(0x9f4);_0x14a5c4['options'][_0x321f7d(0x7f2)]=_0x4851fa+'://'+_0x4706db['host'];}}}const _0x53340d=_0x3abed8?.[_0x321f7d(0x608)]!==![],_0x1c34ed=(_0x3abed8?.[_0x321f7d(0x15a)]||'')[_0x321f7d(0xf4d)]()||undefined,_0x2be803=(_0x3abed8?.[_0x321f7d(0xdab)]||'')['trim']()||undefined,_0x344a25=(_0x3abed8?.[_0x321f7d(0x1e8)]||'')[_0x321f7d(0xf4d)]()||undefined;return await _0x14a5c4[_0x321f7d(0x3d9)](_0x1a353b,{'token':_0x1c34ed,'username':_0x2be803,'password':_0x344a25,'dataLink':_0x53340d}),{'result':{'ok':!![],'node':_0x14a5c4[_0x321f7d(0x2e4)]()}};},{'id':_0x36ffb1(0x1090),'summary':_0x36ffb1(0x4bb),'description':_0x36ffb1(0x5f8),'tags':[_0x36ffb1(0x1034)],'body':{'address':_0x36ffb1(0x10ac),'token':'','data_link':!![]},'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{'address':{'type':_0x36ffb1(0xf7a)},'token':{'type':['string',_0x36ffb1(0x11e)],'description':_0x36ffb1(0x222)},'username':{'type':[_0x36ffb1(0xf7a),_0x36ffb1(0x11e)],'description':_0x36ffb1(0xb0)},'password':{'type':[_0x36ffb1(0xf7a),_0x36ffb1(0x11e)],'description':_0x36ffb1(0x10af)},'data_link':{'type':'boolean','default':!![]}},'required':[_0x36ffb1(0x7f2)],'additionalProperties':![]},'outputSchema':{'type':_0x36ffb1(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),'shell',_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x565)},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0xcd7)},'mcp':{'capability':_0x36ffb1(0x1034),'action':_0x36ffb1(0x1090)}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0xe46),'/api/sync/delta',async({body:_0x392c71,context:_0x1e2aa5})=>{const _0x47a62f=_0x36ffb1;_0x31f40b();const _0x2bd670=_0x392c71?.[_0x47a62f(0xbae)]??0x1f4,_0x2da5df=_0x392c71?.[_0x47a62f(0x886)]??(_0x392c71?.[_0x47a62f(0xa5b)]!=null?{'default':Number(_0x392c71[_0x47a62f(0xa5b)])}:{}),_0x51d759=_0x1e2aa5?.[_0x47a62f(0x93f)]?.[_0x47a62f(0xaee)]===_0x47a62f(0x1d7)?_0x1e2aa5?.[_0x47a62f(0x93f)]?.[_0x47a62f(0x45b)]?.['id']??null:null;if(_0x51d759)_0x14a5c4['gc'][_0x47a62f(0xde7)](_0x51d759,_0x2da5df);const _0x1faa66=Array[_0x47a62f(0x10f5)](_0x392c71?.[_0x47a62f(0xfcc)])?_0x392c71[_0x47a62f(0xfcc)]:null,_0x53277f=await _0x14a5c4[_0x47a62f(0xdf5)](_0x2da5df,{'limit':_0x2bd670,'envs':_0x1faa66});return{'result':{'clock':_0x53277f[_0x47a62f(0x11cd)]?.[_0x47a62f(0x8d0)]??_0xc728c9[_0x47a62f(0x5ea)](),'clocks':_0x53277f[_0x47a62f(0x11cd)],'changes':_0x53277f[_0x47a62f(0xf0c)]}};},{'id':'sync_delta','summary':_0x36ffb1(0xbb4),'description':_0x36ffb1(0x85f),'tags':['sync'],'body':{'from_clocks':{},'limit':0x1f4,'envs':null},'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{'from_clocks':{'type':_0x36ffb1(0xb36),'additionalProperties':!![]},'from_clock':{'type':['integer',_0x36ffb1(0x11e)]},'limit':{'type':'integer','default':0x1f4},'envs':{'type':[_0x36ffb1(0xf9d),_0x36ffb1(0x11e)],'items':{'type':'string'}}},'additionalProperties':![]},'outputSchema':{'type':_0x36ffb1(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),_0x36ffb1(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x565)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0xcd7)},'mcp':{'capability':'sync','action':'sync_delta'}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0x929),'/api/sync/gc/status',async()=>{const _0x42b2d2=_0x36ffb1;return _0x31f40b(),{'result':_0x14a5c4['gc'][_0x42b2d2(0x1ab)]()};},{'id':_0x36ffb1(0x107c),'summary':_0x36ffb1(0x673),'description':'Returns\x20watermark\x20state,\x20peer\x20ACKs,\x20and\x20per-env\x20horizon\x20for\x20changelog\x20GC.','tags':[_0x36ffb1(0x1034)],'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0x36ffb1(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),_0x36ffb1(0xd14),_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'sync:read'},'safety':{'access':'admin','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0x11cc)},'mcp':{'capability':_0x36ffb1(0x1034),'action':_0x36ffb1(0x107c),'readOnlyHint':!![]}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0xe46),'/api/sync/gc/run',async()=>{const _0x1130f0=_0x36ffb1;_0x31f40b();const _0x5999e2=await _0x14a5c4['gc'][_0x1130f0(0x618)]();return{'result':_0x5999e2};},{'id':_0x36ffb1(0x72d),'summary':'Run\x20changelog\x20GC\x20sweep\x20now','description':_0x36ffb1(0x1a9),'tags':['sync'],'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0x36ffb1(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),'shell',_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x192)},'safety':{'access':_0x36ffb1(0x90a),'destructive':!![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x36ffb1(0x1034),'action':_0x36ffb1(0x72d)}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0xe46),_0x36ffb1(0xe4e),async({params:_0x2a742e})=>{const _0x541692=_0x36ffb1;_0x31f40b();const _0x249925=_0x2a742e?.['id'];if(!_0x249925)throw new _0x5b2ada(_0x541692(0xe5),_0x541692(0x127));return _0x14a5c4['gc'][_0x541692(0x453)](_0x249925),{'result':{'ok':!![],'peer_id':_0x249925}};},{'id':_0x36ffb1(0x104f),'summary':'Force\x20peer\x20full\x20resync','description':_0x36ffb1(0x860),'tags':['sync'],'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{'id':{'type':'string'}},'required':['id'],'additionalProperties':![]},'outputSchema':{'type':_0x36ffb1(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),_0x36ffb1(0xd14),_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x192)},'safety':{'access':_0x36ffb1(0x90a),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0x11cc)},'mcp':{'capability':_0x36ffb1(0x1034),'action':'sync_gc_peer_resync'}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0x929),_0x36ffb1(0x56b),async()=>{const _0xc82200=_0x36ffb1;_0x31f40b();const _0x4a9bae={},_0x38a957=[];if(_0xc728c9['_isOpen'])for(const [_0x1e61b8,_0x3bb299]of _0xc728c9[_0xc82200(0xa3)]){if(_0x3bb299['_sync']){_0x4a9bae[_0x1e61b8]=_0x3bb299[_0xc82200(0x5ea)]();if(_0x1e61b8!==_0xc82200(0xfd5))_0x38a957[_0xc82200(0x597)](_0x1e61b8);}}return{'result':{'node':_0x14a5c4[_0xc82200(0x2e4)](),'clock':_0x4a9bae['default']??_0xc728c9[_0xc82200(0x5ea)](),'clocks':_0x4a9bae,'availableEnvs':_0x38a957}};},{'id':_0x36ffb1(0x40f),'summary':'Sync\x20node\x20info','tags':[_0x36ffb1(0x1034)],'inputSchema':{'type':'object','properties':{},'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),_0x36ffb1(0xd14),_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x168)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0x11cc)},'mcp':{'capability':_0x36ffb1(0x1034),'action':_0x36ffb1(0x40f),'readOnlyHint':!![]}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0x96f),_0x36ffb1(0x6d4),async({body:_0x42e45f})=>{const _0x544e41=_0x36ffb1;_0x31f40b();const _0x3768fa={};if(_0x42e45f?.[_0x544e41(0x7f2)]!==undefined)_0x3768fa[_0x544e41(0x7f2)]=_0x42e45f[_0x544e41(0x7f2)];if(_0x42e45f?.[_0x544e41(0x654)]!==undefined)_0x3768fa[_0x544e41(0x654)]=_0x42e45f[_0x544e41(0x654)];if(_0x42e45f?.['tags']!==undefined)_0x3768fa[_0x544e41(0x35b)]=_0x42e45f[_0x544e41(0x35b)];const _0x3178b4=await _0x14a5c4[_0x544e41(0x6fa)](_0x3768fa);return{'result':{'ok':!![],'node':_0x3178b4}};},{'id':_0x36ffb1(0x48c),'summary':_0x36ffb1(0x76e),'tags':[_0x36ffb1(0x1034)],'body':{'address':'http://host:port','meta':{}},'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{'address':{'type':[_0x36ffb1(0xf7a),_0x36ffb1(0x11e)]},'meta':{'type':['object',_0x36ffb1(0x11e)],'additionalProperties':!![]},'tags':{'type':[_0x36ffb1(0xf9d),_0x36ffb1(0x11e)],'items':{'type':_0x36ffb1(0xf7a)}}},'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),_0x36ffb1(0xd14),_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'sync:write'},'safety':{'access':_0x36ffb1(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':_0x36ffb1(0x1034),'action':_0x36ffb1(0x48c)}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0x929),_0x36ffb1(0xcfd),async()=>{const _0x4ec1fd=_0x36ffb1;return _0x31f40b(),{'result':{'ok':!![],'clock':_0xc728c9['getClock'](),'peers':_0x14a5c4[_0x4ec1fd(0x215)]()}};},{'id':_0x36ffb1(0x6e4),'summary':'List\x20peers','tags':[_0x36ffb1(0x1034)],'inputSchema':{'type':'object','properties':{},'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),'shell',_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x168)},'safety':{'access':_0x36ffb1(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x36ffb1(0x1034),'action':_0x36ffb1(0x6e4),'readOnlyHint':!![]}}),_0xc41d33['add']('GET','/api/sync/links',async()=>{const _0x5a33fb=_0x36ffb1;return _0x31f40b(),{'result':{'links':_0x14a5c4[_0x5a33fb(0xd3e)]()}};},{'id':_0x36ffb1(0x397),'summary':'List\x20data\x20links','description':_0x36ffb1(0xfd8),'tags':[_0x36ffb1(0x1034)],'inputSchema':{'type':'object','properties':{},'additionalProperties':![]},'outputSchema':{'type':_0x36ffb1(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),_0x36ffb1(0xd14),_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x168)},'safety':{'access':_0x36ffb1(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0x11cc)},'mcp':{'capability':_0x36ffb1(0x1034),'action':_0x36ffb1(0x397),'readOnlyHint':!![]}}),_0xc41d33['add'](_0x36ffb1(0x719),_0x36ffb1(0xc43),async({params:_0x26e44b,body:_0xd7f1c})=>{const _0x5f5d0a=_0x36ffb1;_0x31f40b();const {nodeA:_0x395aca,nodeB:_0x533f5f}=_0x26e44b;if(!_0x395aca||!_0x533f5f)throw new _0x5b2ada(_0x5f5d0a(0xdf0),_0x5f5d0a(0xcee));const _0x22cedb=_0xd7f1c?.[_0x5f5d0a(0xa88)]??_0x5f5d0a(0xfa4);if(![_0x5f5d0a(0xfa4),_0x5f5d0a(0x10a8),'hi_to_lo'][_0x5f5d0a(0x29c)](_0x22cedb))throw new _0x5b2ada('invalid\x20direction:\x20'+_0x22cedb,_0x5f5d0a(0xcee));const _0x423473=Array[_0x5f5d0a(0x10f5)](_0xd7f1c?.['envs'])?_0xd7f1c['envs']:null,_0x2ff7a5=_0xd7f1c?.[_0x5f5d0a(0x951)]!==![],_0x13ffad=_0x395aca===_0xc728c9['id']?_0x533f5f:_0x395aca,_0x34479a=await _0x14a5c4[_0x5f5d0a(0x331)](_0x13ffad,{'direction':_0x22cedb,'envs':_0x423473,'enabled':_0x2ff7a5});return{'result':{'ok':!![],'link':_0x34479a}};},{'id':_0x36ffb1(0x51e),'summary':_0x36ffb1(0x1f1),'description':_0x36ffb1(0x10de),'tags':[_0x36ffb1(0x1034)],'body':{'direction':_0x36ffb1(0xfa4),'envs':null,'enabled':!![]},'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{'nodeA':{'type':_0x36ffb1(0xf7a)},'nodeB':{'type':_0x36ffb1(0xf7a)},'direction':{'type':_0x36ffb1(0xf7a),'default':_0x36ffb1(0xfa4)},'envs':{'type':[_0x36ffb1(0xf9d),_0x36ffb1(0x11e)],'items':{'type':'string'}},'enabled':{'type':_0x36ffb1(0x854),'default':!![]}},'required':[_0x36ffb1(0x4d9),'nodeB'],'additionalProperties':![]},'outputSchema':{'type':_0x36ffb1(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),'shell',_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x192)},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0xcd7)},'mcp':{'capability':_0x36ffb1(0x1034),'action':_0x36ffb1(0x51e)}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0x42f),_0x36ffb1(0xc43),async({params:_0x17042a})=>{const _0x53f9da=_0x36ffb1;_0x31f40b();const {nodeA:_0x5c1921,nodeB:_0xfeeb4a}=_0x17042a;if(!_0x5c1921||!_0xfeeb4a)throw new _0x5b2ada('nodeA\x20and\x20nodeB\x20are\x20required',_0x53f9da(0xcee));const _0x38a6db=_0x5c1921===_0xc728c9['id']?_0xfeeb4a:_0x5c1921;return await _0x14a5c4[_0x53f9da(0x513)](_0x38a6db),{'result':{'ok':!![]}};},{'id':'sync_links_remove','summary':'Remove\x20a\x20data\x20link','tags':[_0x36ffb1(0x1034)],'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{'nodeA':{'type':'string'},'nodeB':{'type':'string'}},'required':[_0x36ffb1(0x4d9),_0x36ffb1(0x1065)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),_0x36ffb1(0xd14),_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x192)},'safety':{'access':_0x36ffb1(0x90a),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0x11cc)},'mcp':{'capability':'sync','action':_0x36ffb1(0xe8f)}}),_0xc41d33['add'](_0x36ffb1(0x929),_0x36ffb1(0x3bd),async()=>{const _0x806db1=_0x36ffb1;_0x31f40b();const _0x1f4012=_0x14a5c4[_0x806db1(0x215)](),_0x558003=_0x14a5c4['getSelfNode'](),_0x15cea6=_0x14a5c4[_0x806db1(0xd3e)](),_0x2cac38={},_0x3e8a1b=[];for(const [_0x396a25,_0x14d335]of _0xc728c9['_envs']){if(_0x14d335[_0x806db1(0x745)]&&_0x396a25!=='~system')_0x3e8a1b['push'](_0x396a25);}const _0x5d4f8c={};for(const _0x2baabc of _0x15cea6)_0x5d4f8c[_0x2baabc['id']]=_0x2baabc;const _0x18a820=_0x3e7489=>{const _0x3afb9f=_0x806db1,_0xd3ca80={};for(const _0x3f521d of _0x3e7489){_0xd3ca80[_0x3f521d[_0x3afb9f(0x896)]]={'status':_0x3f521d[_0x3afb9f(0xfcd)],'last_seen':_0x3f521d[_0x3afb9f(0xdd1)],'last_error':_0x3f521d[_0x3afb9f(0x1101)],'clock':_0x3f521d[_0x3afb9f(0x114d)],'clocks':_0x3f521d[_0x3afb9f(0x11cd)]??{}};}return _0xd3ca80;};_0x2cac38[_0x558003['id']]={'id':_0x558003['id'],'name':_0x558003['name'],'meta':_0x558003[_0x806db1(0x654)],'tags':_0x558003[_0x806db1(0x35b)]??[],'address':_0x558003['address'],'clock':_0xc728c9[_0x806db1(0x5ea)](),'clocks':((()=>{const _0x327618=_0x806db1,_0x52e9ff={};for(const [_0x1da31b,_0x4475ac]of _0xc728c9[_0x327618(0xa3)])if(_0x4475ac[_0x327618(0x745)])_0x52e9ff[_0x1da31b]=_0x4475ac[_0x327618(0x5ea)]();return _0x52e9ff;})()),'peers':_0x18a820(_0x1f4012),'links':_0x5d4f8c,'availableEnvs':_0x3e8a1b,'error':null};for(const _0x2906b9 of _0x1f4012){_0x2cac38[_0x2906b9[_0x806db1(0x896)]]={'id':_0x2906b9[_0x806db1(0x896)],'address':_0x2906b9[_0x806db1(0x7f2)],'meta':_0x2906b9[_0x806db1(0x654)],'tags':_0x2906b9[_0x806db1(0x35b)]??[],'clock':_0x2906b9['info']?.['clock']??null,'clocks':_0x2906b9['clocks']??{},'peers':null,'links':null,'error':null};}const _0x8444a5=new AbortController();await Promise[_0x806db1(0x638)]([new Promise(_0x428046=>setTimeout(()=>{const _0x1fb484=_0x806db1;_0x8444a5[_0x1fb484(0x22a)](_0x1fb484(0x44f)),_0x428046();},0x1f4)),Promise[_0x806db1(0xf09)](_0x1f4012[_0x806db1(0x1166)](async _0x3af951=>{const _0x4d9434=_0x806db1;try{const _0x4ba761=await _0x14a5c4['fetchPeer'](_0x3af951['peer_id'],'GET','/api/sync/peers',null,_0x8444a5['signal']),_0x16b00f=_0x4ba761?.[_0x4d9434(0xc88)]??_0x4ba761;_0x2cac38[_0x3af951[_0x4d9434(0x896)]][_0x4d9434(0x215)]=_0x18a820(_0x16b00f?.[_0x4d9434(0x215)]??[]),_0x2cac38[_0x3af951['peer_id']][_0x4d9434(0x114d)]=_0x16b00f?.[_0x4d9434(0x114d)]??null,_0x2cac38[_0x3af951[_0x4d9434(0x896)]][_0x4d9434(0x11cd)]=_0x16b00f?.[_0x4d9434(0x11cd)]??{};}catch(_0x1ef61e){_0x2cac38[_0x3af951['peer_id']][_0x4d9434(0x225)]=_0x1ef61e[_0x4d9434(0xb4e)]||String(_0x1ef61e);}}))]);for(const _0x2019e9 in _0x2cac38){const _0x25065d=_0x2cac38[_0x2019e9];_0x2019e9!==_0x558003['id']&&_0x25065d['peers']===null&&!_0x25065d[_0x806db1(0x225)]&&(_0x25065d[_0x806db1(0x225)]=_0x806db1(0x2f3));}return{'result':{'topology':_0x2cac38,'availableEnvs':_0x3e8a1b}};},{'id':'sync_topology','summary':'Cluster\x20topology','tags':['sync'],'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),_0x36ffb1(0xd14),_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x168)},'safety':{'access':_0x36ffb1(0xcae),'destructive':![],'idempotent':!![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0x11cc)},'mcp':{'capability':_0x36ffb1(0x1034),'action':_0x36ffb1(0xa1a),'readOnlyHint':!![]}}),_0xc41d33['add'](_0x36ffb1(0xe46),_0x36ffb1(0x1014),async()=>{const _0x2aebde=_0x36ffb1;_0x31f40b();try{await _0x14a5c4['reconcile']();}catch(_0x3865bd){return{'status':0x1f4,'result':{'error':_0x3865bd[_0x2aebde(0xb4e)]}};}return{'result':{'ok':!![]}};},{'id':_0x36ffb1(0x69b),'summary':'Reconcile\x20with\x20all\x20peers','tags':['sync'],'inputSchema':{'type':'object','properties':{},'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':['http',_0x36ffb1(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':'sync:peer'},'safety':{'access':_0x36ffb1(0x90a),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0x11cc)},'mcp':{'capability':'sync','action':_0x36ffb1(0x69b)}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0xe46),_0x36ffb1(0x1178),async()=>{const _0x4115ef=_0x36ffb1;_0x31f40b();const _0x388434=_0x14a5c4[_0x4115ef(0x215)](),_0x4bb633={},_0x1b4841=new AbortController();return setTimeout(()=>_0x1b4841[_0x4115ef(0x22a)]('timeout'),0x1388),await Promise[_0x4115ef(0xf09)](_0x388434[_0x4115ef(0x1166)](async _0x393b8b=>{const _0x91bfa3=_0x4115ef;try{await _0x14a5c4[_0x91bfa3(0x7fd)](_0x393b8b[_0x91bfa3(0x896)],_0x91bfa3(0xe46),_0x91bfa3(0x1014),null,_0x1b4841['signal']);}catch(_0x513979){const _0x3904e8=_0x513979?.['message']||String(_0x513979);_0xc728c9[_0x91bfa3(0x9be)][_0x91bfa3(0xd9b)]({'feature':_0x91bfa3(0x1034)})[_0x91bfa3(0x225)](_0x3904e8,{'stack':_0x513979?.[_0x91bfa3(0x56e)]}),_0x4bb633[_0x393b8b[_0x91bfa3(0x896)]]=_0x3904e8;}})),{'result':{'ok':Object[_0x4115ef(0xa52)](_0x4bb633)['length']===0x0,'errors':Object['keys'](_0x4bb633)[_0x4115ef(0x156)]?_0x4bb633:null}};},{'id':'sync_reconcile_all','summary':_0x36ffb1(0x62c),'tags':[_0x36ffb1(0x1034)],'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0x36ffb1(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x36ffb1(0xd14),_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x565)},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0x11cc)},'mcp':{'capability':'sync','action':'sync_reconcile_all'}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0xe46),_0x36ffb1(0xd74),async({body:_0x2eeaec})=>{const _0x267f88=_0x36ffb1;_0x31f40b();const _0x380584=_0x2eeaec?.[_0x267f88(0x896)];if(!_0x380584)return{'status':0x190,'result':{'error':_0x267f88(0xd21)}};try{await _0x14a5c4[_0x267f88(0x622)](_0x380584);}catch(_0x1707bb){return{'status':0x1f4,'result':{'error':_0x1707bb['message']}};}return{'result':{'ok':!![]}};},{'id':_0x36ffb1(0x108),'summary':_0x36ffb1(0xe01),'tags':['sync'],'body':{'peer_id':''},'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{'peer_id':{'type':_0x36ffb1(0xf7a)}},'required':[_0x36ffb1(0x896)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x36ffb1(0x9f4),_0x36ffb1(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':'sync:peer'},'safety':{'access':_0x36ffb1(0x90a),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0xcd7)},'mcp':{'capability':'sync','action':_0x36ffb1(0x108)}}),_0xc41d33[_0x36ffb1(0x33c)](_0x36ffb1(0xe46),_0x36ffb1(0x494),async({body:_0x3e71c9})=>{const _0x48be69=_0x36ffb1;_0x31f40b();const _0x19f51d=_0x3e71c9?.[_0x48be69(0x9f8)];if(!_0x19f51d||_0x19f51d===_0xc728c9['id'])return{'result':{'ok':!![]}};return _0x14a5c4[_0x48be69(0x622)](_0x19f51d)[_0x48be69(0x415)](()=>{}),{'result':{'ok':!![]}};},{'id':_0x36ffb1(0x10f8),'summary':_0x36ffb1(0xe2a),'tags':[_0x36ffb1(0x1034)],'body':{'from':'node-id'},'inputSchema':{'type':_0x36ffb1(0xb36),'properties':{'from':{'type':_0x36ffb1(0xf7a)}},'required':[_0x36ffb1(0x9f8)],'additionalProperties':![]},'outputSchema':{'type':_0x36ffb1(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x36ffb1(0xd14),_0x36ffb1(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x36ffb1(0x565)},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x36ffb1(0xcd7)},'mcp':{'capability':_0x36ffb1(0x1034),'action':'sync_poke'}});},okdbSyncHttp;}var okdbSyncGc,hasRequiredOkdbSyncGc;function requireOkdbSyncGc(){const _0x407fe7=_0xef8cd8;if(hasRequiredOkdbSyncGc)return okdbSyncGc;hasRequiredOkdbSyncGc=0x1;const _0x586328='__sync:acks',_0x2634eb=0x1f4;function _0x5f42a4(){const _0x5424a5=_0x47ab;return Date[_0x5424a5(0x555)]();}class _0x56fdb4{constructor(_0x1a2609,_0x2d2719={}){const _0x276f66=_0x47ab;this[_0x276f66(0x1034)]=_0x1a2609,this[_0x276f66(0xd4f)]=_0x1a2609['okdb'],this[_0x276f66(0x9be)]=_0x1a2609[_0x276f66(0x9be)][_0x276f66(0xd9b)]({'feature':_0x276f66(0x337)}),this[_0x276f66(0x876)]=(_0x2d2719[_0x276f66(0x579)]??0x1e)*0x18*0x3c*0x3c*0x3e8,this['_ackDb']=null,this[_0x276f66(0x107e)]=![],this[_0x276f66(0x36f)]=null,this[_0x276f66(0x794)]=_0x2d2719[_0x276f66(0x107a)]??0x493e0;}['start'](){const _0x4b58ed=_0x47ab;this[_0x4b58ed(0x1fe)](),this[_0x4b58ed(0x794)]>0x0&&(this['_gcTimer']=setInterval(()=>{const _0x54e420=_0x4b58ed;this[_0x54e420(0x618)]()[_0x54e420(0x415)](_0x48e88b=>this['log'][_0x54e420(0xf78)](_0x54e420(0x734),{'err':_0x48e88b?.[_0x54e420(0xb4e)]}));},this['_gcIntervalMs']),this[_0x4b58ed(0x36f)]['unref']());}['stop'](){const _0x49c876=_0x47ab;this[_0x49c876(0x36f)]&&(clearInterval(this['_gcTimer']),this[_0x49c876(0x36f)]=null);}[_0x407fe7(0xa3e)](){const _0x513d93=_0x407fe7;if(this[_0x513d93(0x59b)])return;this[_0x513d93(0x59b)]=this[_0x513d93(0xd4f)][_0x513d93(0x7a2)][_0x513d93(0x730)](_0x586328,{'dupSort':![]});}['recordPeerAck'](_0x1c44e1,_0x22809d){const _0x496519=_0x407fe7;if(!_0x1c44e1||!_0x22809d||typeof _0x22809d!==_0x496519(0xb36))return;try{this[_0x496519(0xa3e)]();const _0x8cf8e1=this[_0x496519(0x59b)][_0x496519(0xbeb)](_0x1c44e1)||{'envs':{},'last_seen':0x0},_0x11abdc={..._0x8cf8e1[_0x496519(0xfcc)]};let _0x4e8383=![];for(const [_0x468e0e,_0x4a2840]of Object[_0x496519(0x1129)](_0x22809d)){const _0x25bf67=Number(_0x4a2840);if(Number[_0x496519(0x2b5)](_0x25bf67)&&_0x25bf67>0x0){const _0x300f65=_0x11abdc[_0x468e0e]||0x0,_0x50ee41=Math['max'](_0x300f65,_0x25bf67);_0x50ee41>_0x300f65&&(_0x11abdc[_0x468e0e]=_0x50ee41,_0x4e8383=!![]);}}this[_0x496519(0x59b)][_0x496519(0xb6f)](_0x1c44e1,{'envs':_0x11abdc,'last_seen':_0x5f42a4()}),_0x4e8383&&!this['_running']&&this[_0x496519(0x618)]()[_0x496519(0x415)](_0x1b670f=>this[_0x496519(0x9be)][_0x496519(0xf78)](_0x496519(0x2ee),{'err':_0x1b670f?.[_0x496519(0xb4e)]}));}catch(_0x59d444){this[_0x496519(0x9be)][_0x496519(0xf78)]('recordPeerAck\x20failed',{'peer_id':_0x1c44e1,'err':_0x59d444?.[_0x496519(0xb4e)]});}}[_0x407fe7(0x453)](_0x22439f){const _0x4071d7=_0x407fe7;this[_0x4071d7(0xa3e)]();const _0x478c6a=this[_0x4071d7(0x59b)][_0x4071d7(0xbeb)](_0x22439f);if(!_0x478c6a)return;const _0x24a797={};for(const _0x1ff945 of Object['keys'](_0x478c6a[_0x4071d7(0xfcc)]))_0x24a797[_0x1ff945]=0x0;this[_0x4071d7(0x59b)]['putSync'](_0x22439f,{..._0x478c6a,'envs':_0x24a797,'last_seen':_0x478c6a['last_seen']});}[_0x407fe7(0x77c)](){const _0x4e4893=_0x407fe7;this['_openAckDb']();const _0x1e0552=[],_0x3e5762=this['peerStalenessLimitMs'];for(const {key:_0x227151,value:_0x4b01e4}of this['_ackDb'][_0x4e4893(0x9ce)]()){const _0x1f7c28=_0x5f42a4()-(_0x4b01e4[_0x4e4893(0xdd1)]||0x0);_0x1e0552[_0x4e4893(0x597)]({'peer_id':_0x227151,'envs':_0x4b01e4[_0x4e4893(0xfcc)]||{},'last_seen':_0x4b01e4['last_seen']||null,'since_ms':_0x1f7c28,'stale':_0x1f7c28>_0x3e5762});}return _0x1e0552;}[_0x407fe7(0x8a5)](_0x143775){const _0x278650=_0x407fe7,_0x3e8376=this[_0x278650(0xd4f)][_0x278650(0xa3)][_0x278650(0xbeb)](_0x143775);if(!_0x3e8376||!_0x3e8376[_0x278650(0x745)])return 0x0;const _0x16e197=_0x3e8376[_0x278650(0x5ea)]?.()??0x0,_0x5945cc=this[_0x278650(0x77c)]();if(_0x5945cc['length']===0x0)return _0x16e197;const _0x519597=_0x5945cc[_0x278650(0x1103)](_0x542f12=>!_0x542f12[_0x278650(0x78b)]&&_0x542f12[_0x278650(0xfcc)][_0x143775]!=null&&_0x542f12[_0x278650(0xfcc)][_0x143775]>0x0);if(_0x519597['length']===0x0)return 0x0;return Math['min'](..._0x519597[_0x278650(0x1166)](_0x461394=>_0x461394[_0x278650(0xfcc)][_0x143775]));}async[_0x407fe7(0x618)](){const _0x474155=_0x407fe7;if(this[_0x474155(0x107e)])return{'removed':0x0,'durationMs':0x0,'byEnv':{}};this[_0x474155(0x107e)]=!![];const _0x425747=Date[_0x474155(0x555)](),_0x52d612={};let _0x1cb2c0=0x0;try{for(const [_0x57a81c,_0xdcc208]of this['okdb'][_0x474155(0xa3)]){if(!_0xdcc208['_sync']||!_0xdcc208['clockToChangeDb']||!_0xdcc208['changeToClockDb'])continue;const _0x32947f=this[_0x474155(0x8a5)](_0x57a81c);if(_0x32947f<=0x1){_0x52d612[_0x57a81c]=0x0;continue;}const _0x5443bf=[];for(const {key:_0xc475e0}of _0xdcc208['clockToChangeDb'][_0x474155(0x9ce)]({'end':_0x32947f})){_0x5443bf[_0x474155(0x597)](_0xc475e0);if(_0x5443bf[_0x474155(0x156)]>=_0x2634eb*0xa)break;}if(_0x5443bf[_0x474155(0x156)]===0x0){_0x52d612[_0x57a81c]=0x0;continue;}let _0x1c1b1b=0x0;for(let _0x25e023=0x0;_0x25e023<_0x5443bf[_0x474155(0x156)];_0x25e023+=_0x2634eb){const _0x59092f=_0x5443bf[_0x474155(0xc3c)](_0x25e023,_0x25e023+_0x2634eb);await _0xdcc208['db'][_0x474155(0x683)](()=>{const _0xe405f6=_0x474155;for(const _0x101b9c of _0x59092f){const _0x3b44b5=_0xdcc208[_0xe405f6(0xcda)][_0xe405f6(0xbeb)](_0x101b9c);if(!_0x3b44b5)continue;_0xdcc208['clockToChangeDb'][_0xe405f6(0x21e)](_0x101b9c);const _0x373615=_0xdcc208[_0xe405f6(0x969)][_0xe405f6(0xbeb)](_0x3b44b5['id']);_0x373615===_0x101b9c&&_0xdcc208[_0xe405f6(0x969)][_0xe405f6(0x21e)](_0x3b44b5['id']);if(_0x3b44b5[_0xe405f6(0xaee)]){const _0x4ac9b4=_0xdcc208[_0xe405f6(0x1145)]?.[_0xe405f6(0xbeb)](_0x3b44b5['type']);_0x4ac9b4?.['clockToChange']&&_0x4ac9b4[_0xe405f6(0x2de)][_0xe405f6(0x21e)](_0x101b9c);}_0x1c1b1b++;}});}_0x52d612[_0x57a81c]=_0x1c1b1b,_0x1cb2c0+=_0x1c1b1b;}}finally{this[_0x474155(0x107e)]=![];}return{'removed':_0x1cb2c0,'durationMs':Date['now']()-_0x425747,'byEnv':_0x52d612};}['getStatus'](){const _0x3ef7ff=_0x407fe7,_0x3eb012=this[_0x3ef7ff(0x77c)](),_0x481371=[];for(const [_0x2bd791,_0x1b773d]of this[_0x3ef7ff(0xd4f)][_0x3ef7ff(0xa3)]){if(!_0x1b773d['_sync']||!_0x1b773d[_0x3ef7ff(0xcda)])continue;const _0x2f0db8=_0x1b773d[_0x3ef7ff(0x5ea)]?.()??0x0,_0x2d5547=this['getGcHorizon'](_0x2bd791);let _0x259565=0x0;try{_0x259565=_0x1b773d[_0x3ef7ff(0xcda)][_0x3ef7ff(0x7df)]?.()??0x0;}catch{}_0x481371[_0x3ef7ff(0x597)]({'env':_0x2bd791,'currentClock':_0x2f0db8,'gcHorizon':_0x2d5547,'entryCount':_0x259565});}return{'peers':_0x3eb012['map'](_0x235ed9=>({'peer_id':_0x235ed9[_0x3ef7ff(0x896)],'envs':_0x235ed9['envs'],'last_seen':_0x235ed9[_0x3ef7ff(0xdd1)],'since_ms':_0x235ed9[_0x3ef7ff(0xbf3)],'stale':_0x235ed9[_0x3ef7ff(0x78b)]})),'envs':_0x481371,'running':this[_0x3ef7ff(0x107e)],'peerStalenessLimitMs':this[_0x3ef7ff(0x876)]};}}return okdbSyncGc=_0x56fdb4,okdbSyncGc;}var okdbSync,hasRequiredOkdbSync;function requireOkdbSync(){const _0x14c862=_0xef8cd8;if(hasRequiredOkdbSync)return okdbSync;hasRequiredOkdbSync=0x1;const _0x1bb58a=requireOkdbSyncHttp(),_0x3ae8d9=requireOkdbSyncIdentity(),{normalizeNodeTags:_0xb092cc}=requireOkdbEngineAffinity(),{CHANGE_ACTIONS:_0x35decd,EVENTS:_0x3055ad}=requireOkdbEnums(),{OKDBError:_0x5e840a}=requireOkdbError(),_0x344fa5=requireOkdbHlc(),_0x1e463b=requireOkdbEnvSchema(),_0x40d2c7=_0x14c862(0xf35),_0x363255=_0x14c862(0x5e9),_0x3862b='__sync:peer_state',_0x15d07f=requireOkdbSyncGc();function _0x50ff87(){const _0x37c0d3=_0x14c862;return Date[_0x37c0d3(0x555)]();}function _0x34b0d9(_0x5dc9bc,_0x3917cf){return _0x5dc9bc<_0x3917cf?_0x5dc9bc+':'+_0x3917cf:_0x3917cf+':'+_0x5dc9bc;}function _0x96bb1d(_0x117c24,_0x30aa80){const _0xf903e0=_0x14c862,_0x3502f3=_0x344fa5[_0xf903e0(0x283)](Number(_0x117c24?.[_0xf903e0(0xdfe)]||0x0),Number(_0x30aa80?.['timestamp']||0x0));if(_0x3502f3!==0x0)return _0x3502f3;const _0x244ff1=String(_0x117c24?.[_0xf903e0(0xca6)]||''),_0x4cd6fa=String(_0x30aa80?.[_0xf903e0(0xca6)]||'');if(_0x244ff1===_0x4cd6fa)return 0x0;return _0x244ff1>_0x4cd6fa?0x1:-0x1;}class _0x1bce4b{constructor(_0x37c0eb,_0xf07941={}){const _0x2bf905=_0x14c862;this[_0x2bf905(0xd4f)]=_0x37c0eb,this[_0x2bf905(0x9be)]=_0x37c0eb[_0x2bf905(0x9be)][_0x2bf905(0xd9b)]({'feature':_0x2bf905(0x1034)}),this[_0x2bf905(0x11e5)]={'delta_limit':_0xf07941['delta_limit']??0x1f4,'reconcile_concurrency':_0xf07941[_0x2bf905(0xa41)]??0x1,'auto_reconcile':_0xf07941['auto_reconcile']??!![],..._0x37c0eb['options'][_0x2bf905(0x1034)]||{},..._0xf07941},this['_isEnsured']=![],this[_0x2bf905(0x4aa)]=null,this['_reconciling']=new Set(),this[_0x2bf905(0x40c)]=new Set(),this[_0x2bf905(0xcd8)]=null,this[_0x2bf905(0xb9e)]=![],this['_peerDb']=null,this[_0x2bf905(0xd23)]=null,this[_0x2bf905(0x838)]=null,this['_replayCache']=new _0x3ae8d9[(_0x2bf905(0x817))](),this['gc']=new _0x15d07f(this,{'peerStalenessLimitDays':_0xf07941[_0x2bf905(0xd09)]??_0x37c0eb[_0x2bf905(0x11e5)][_0x2bf905(0x1034)]?.['gcPeerStalenessLimitDays']??0x1e,'gcIntervalMs':_0xf07941[_0x2bf905(0x107a)]??_0x37c0eb[_0x2bf905(0x11e5)][_0x2bf905(0x1034)]?.[_0x2bf905(0x107a)]}),this['gc'][_0x2bf905(0xa00)](),_0x1bb58a(_0x37c0eb,this),this[_0x2bf905(0x11e5)][_0x2bf905(0x522)]&&(this[_0x2bf905(0xcd8)]=()=>{const _0x3b8176=_0x2bf905;this[_0x3b8176(0x8d5)]()['catch'](()=>{});},this[_0x2bf905(0x1146)]=()=>{const _0x2f31f1=_0x2bf905;this[_0x2f31f1(0x8d5)]()[_0x2f31f1(0x415)](()=>{});},this[_0x2bf905(0xd4f)]['events']['on'](_0x3055ad['SYSTEM_CLOCK_CHANGE'],this[_0x2bf905(0xcd8)]),this[_0x2bf905(0xd4f)][_0x2bf905(0xea8)]['on'](_0x3055ad['SYSTEM_POKE'],this[_0x2bf905(0x1146)]));}['info'](){const _0x4c1008=_0x14c862,_0x266280=this[_0x4c1008(0x55e)]();return{'node_id':this['okdb']['id'],'clock':this[_0x4c1008(0xd4f)][_0x4c1008(0xe56)]?this[_0x4c1008(0xd4f)][_0x4c1008(0x5ea)]():0x0,'auto_reconcile':this[_0x4c1008(0x11e5)][_0x4c1008(0x522)],'peers':_0x266280[_0x4c1008(0x156)],'reconciling':[...this[_0x4c1008(0x462)]]};}[_0x14c862(0x2e4)](){const _0x8550e8=_0x14c862,_0x2a80fb=((()=>{const _0x11119f=_0x47ab;if(!this[_0x11119f(0xd4f)][_0x11119f(0xe56)])return{'id':this['okdb']['id'],'address':this['options'][_0x11119f(0x7f2)]||null,'meta':{},'tags':[],'updated':_0x50ff87()};const _0x7b93b2=this['_getControlEnv']();return(_0x7b93b2[_0x11119f(0x7c0)](_0x40d2c7)?_0x7b93b2[_0x11119f(0xbeb)](_0x40d2c7,this[_0x11119f(0xd4f)]['id']):null)||{'id':this['okdb']['id'],'address':this[_0x11119f(0x11e5)][_0x11119f(0x7f2)]||null,'meta':{},'tags':[],'updated':_0x50ff87()};})());_0x2a80fb[_0x8550e8(0x35b)]=_0xb092cc(_0x2a80fb[_0x8550e8(0x35b)]);if(this[_0x8550e8(0x838)])_0x2a80fb[_0x8550e8(0x1007)]=this[_0x8550e8(0x838)];return _0x2a80fb;}[_0x14c862(0x215)](){return this['_listPeers']();}async[_0x14c862(0x108d)](){const _0x1b3052=_0x14c862;if(!this[_0x1b3052(0x11e5)][_0x1b3052(0x7f2)])return;await this['_onClock']();}async[_0x14c862(0x622)](_0x452dcf){const _0x2adf78=_0x14c862;if(!this[_0x2adf78(0x11e5)][_0x2adf78(0x7f2)])return;await this[_0x2adf78(0x441)](_0x452dcf);}[_0x14c862(0x1fe)](){const _0x9b4d8a=_0x14c862;this['_clockListener']&&(this[_0x9b4d8a(0xd4f)][_0x9b4d8a(0xea8)][_0x9b4d8a(0xa9b)](_0x3055ad[_0x9b4d8a(0x967)],this[_0x9b4d8a(0xcd8)]),this['_clockListener']=null),this[_0x9b4d8a(0x1146)]&&(this[_0x9b4d8a(0xd4f)]['events'][_0x9b4d8a(0xa9b)](_0x3055ad[_0x9b4d8a(0xd0e)],this[_0x9b4d8a(0x1146)]),this[_0x9b4d8a(0x1146)]=null),this['_replayCache']?.[_0x9b4d8a(0xe69)](),this['gc']?.[_0x9b4d8a(0x1fe)]?.();}[_0x14c862(0xd3e)](){const _0x49abdb=_0x14c862;if(!this[_0x49abdb(0xd4f)][_0x49abdb(0xe56)])return[];const _0x1be733=this[_0x49abdb(0x650)]();if(!_0x1be733[_0x49abdb(0x7c0)](_0x363255))return[];try{return Array[_0x49abdb(0x9f8)](_0x1be733[_0x49abdb(0x11d6)](_0x363255));}catch{return[];}}async[_0x14c862(0x331)](_0x35a86d,{direction:direction=_0x14c862(0xfa4),envs:envs=null,enabled:enabled=!![]}={}){const _0x15f043=_0x14c862;await this[_0x15f043(0xd0d)]();const _0x2b8aa3=this[_0x15f043(0x650)](),_0x383a02=_0x34b0d9(this[_0x15f043(0xd4f)]['id'],_0x35a86d),[_0x4efc37,_0x13fc93]=this[_0x15f043(0xd4f)]['id']<_0x35a86d?[this[_0x15f043(0xd4f)]['id'],_0x35a86d]:[_0x35a86d,this[_0x15f043(0xd4f)]['id']],_0x3ef275=_0x2b8aa3[_0x15f043(0xa57)](_0x363255,_0x383a02),_0x58328e={'id':_0x383a02,'node_lo':_0x4efc37,'node_hi':_0x13fc93,'direction':direction,'envs':envs??null,'enabled':enabled!==![],'created':_0x3ef275?.[_0x15f043(0x568)]?.[_0x15f043(0xf1a)]??_0x50ff87(),'updated':_0x50ff87()};return await _0x2b8aa3['put'](_0x363255,_0x383a02,_0x58328e,_0x3ef275?.[_0x15f043(0x45c)]),_0x58328e;}async[_0x14c862(0x513)](_0x42c2d9){const _0x4b232e=_0x14c862;await this['_ensure']();const _0x5723cc=this[_0x4b232e(0x650)]();if(!_0x5723cc['hasType'](_0x363255))return;const _0x26f67d=_0x34b0d9(this[_0x4b232e(0xd4f)]['id'],_0x42c2d9),_0x37efb8=_0x5723cc[_0x4b232e(0xa57)](_0x363255,_0x26f67d);if(_0x37efb8)await _0x5723cc['remove'](_0x363255,_0x26f67d);}[_0x14c862(0x650)](){const _0x319c17=_0x14c862;return this[_0x319c17(0xd4f)][_0x319c17(0x30b)]('~system');}['_getDataEnvNames'](){const _0x4c21e3=_0x14c862,_0x3bd153=[];for(const [_0x2979e8,_0x380959]of this[_0x4c21e3(0xd4f)][_0x4c21e3(0xa3)]){if(_0x380959[_0x4c21e3(0x745)]&&_0x2979e8!==_0x4c21e3(0xfd5))_0x3bd153[_0x4c21e3(0x597)](_0x2979e8);}return _0x3bd153;}[_0x14c862(0x8a7)](){const _0x230244=_0x14c862,_0x5602b9=this['_getControlEnv']();if(!_0x5602b9[_0x230244(0x7c0)](_0x363255))return![];return _0x5602b9['getCount'](_0x363255)>0x0;}[_0x14c862(0x891)](_0x579e55){const _0x52246d=_0x14c862,_0x10817d=this[_0x52246d(0x650)]();if(!_0x10817d[_0x52246d(0x7c0)](_0x363255))return null;return _0x10817d[_0x52246d(0xbeb)](_0x363255,_0x34b0d9(this[_0x52246d(0xd4f)]['id'],_0x579e55))||null;}[_0x14c862(0xc55)](_0x4cb152){const _0x258aef=_0x14c862,_0x21c222=this['_getLink'](_0x4cb152);if(!_0x21c222||!_0x21c222[_0x258aef(0x951)])return{'push':![],'pull':![],'envs':null};const _0x3af586=this[_0x258aef(0xd4f)]['id']<_0x4cb152;let _0x5b37e1,_0x2e1466;switch(_0x21c222['direction']){case _0x258aef(0xfa4):_0x5b37e1=_0x2e1466=!![];break;case'lo_to_hi':_0x5b37e1=_0x3af586,_0x2e1466=!_0x3af586;break;case'hi_to_lo':_0x5b37e1=!_0x3af586,_0x2e1466=_0x3af586;break;default:_0x5b37e1=_0x2e1466=![];}return{'push':_0x5b37e1,'pull':_0x2e1466,'envs':_0x21c222[_0x258aef(0xfcc)]??null};}async[_0x14c862(0x490)](_0x2023e1,_0x519ec4,_0x430976=null,_0x58c807=null){const _0x2d054a=_0x14c862,_0x4fcc18=_0x430976==null?null:typeof _0x430976===_0x2d054a(0xf7a)?_0x430976:JSON[_0x2d054a(0xf75)](_0x430976),_0x2607f2={'Accept':_0x2d054a(0xf9b)};if(_0x4fcc18!=null)_0x2607f2[_0x2d054a(0x6b8)]='application/json';if(_0x58c807)_0x2607f2[_0x2d054a(0x81d)]=_0x58c807;const _0x5b076b={'method':_0x2023e1,'headers':_0x2607f2};if(_0x4fcc18!=null)_0x5b076b[_0x2d054a(0xce8)]=_0x4fcc18;return fetch(_0x519ec4,_0x5b076b);}async['_fetchRemoteInfo'](_0x3d37ad,_0x33f4d1=null){const _0x1d9d62=_0x14c862,_0x20b283=await this[_0x1d9d62(0x490)]('GET',_0x3d37ad+'/api/sync/info',null,_0x33f4d1);if(!_0x20b283['ok']){const _0x1ff3d6=await _0x20b283[_0x1d9d62(0x1fb)]()[_0x1d9d62(0x415)](()=>'');throw new _0x5e840a((_0x1d9d62(0x551)+_0x20b283[_0x1d9d62(0xfcd)]+'\x20'+_0x1ff3d6)['trim'](),'SYNC_UNREACHABLE_PEER');}return await _0x20b283[_0x1d9d62(0x1ee)]();}async[_0x14c862(0x318)](_0x4ddb67,_0x5eb91c,_0x27f6cf=null){const _0x37ca07=_0x14c862,_0x196e18=await this[_0x37ca07(0x490)](_0x37ca07(0xe46),_0x4ddb67,_0x5eb91c,_0x27f6cf);if(!_0x196e18['ok']){const _0x11bfbc=await _0x196e18[_0x37ca07(0x1fb)]()[_0x37ca07(0x415)](()=>''),_0x419226=new Error((_0x37ca07(0xe07)+_0x196e18[_0x37ca07(0xfcd)]+'\x20'+_0x196e18[_0x37ca07(0x484)]+'\x20'+_0x11bfbc)[_0x37ca07(0xf4d)]());_0x419226[_0x37ca07(0xfcd)]=_0x196e18[_0x37ca07(0xfcd)];throw _0x419226;}return await _0x196e18['json']()[_0x37ca07(0x415)](()=>({}));}async['_resolveJoinCredential'](_0x563b00,{token:_0x28dbf0,username:_0x3d6967,password:_0x101370}={}){const _0xf104ad=_0x14c862;if(_0x28dbf0)return _0xf104ad(0x9a3)+_0x28dbf0;if(_0x3d6967&&_0x101370){const _0x5609e1=await fetch(_0x563b00['replace'](/\/+$/,'')+_0xf104ad(0x539),{'method':_0xf104ad(0xe46),'headers':{'Content-Type':_0xf104ad(0xf9b)},'body':JSON['stringify']({'username':_0x3d6967,'password':_0x101370})});if(!_0x5609e1['ok']){const _0x2202ca=await _0x5609e1[_0xf104ad(0x1fb)]()[_0xf104ad(0x415)](()=>'');throw new _0x5e840a((_0xf104ad(0x1198)+_0x5609e1['status']+'\x20'+_0x2202ca)['trim'](),_0xf104ad(0xd58));}const _0x791113=await _0x5609e1[_0xf104ad(0x1ee)](),_0xf62b43=_0x791113?.['data']?.[_0xf104ad(0x85e)]??_0x791113?.[_0xf104ad(0x80e)]?.[_0xf104ad(0x85e)];if(!_0xf62b43)throw new _0x5e840a(_0xf104ad(0xea0),_0xf104ad(0xd58));return _0xf104ad(0x9a3)+_0xf62b43;}return null;}[_0x14c862(0x36e)](_0xa7623e){const _0x55c2cc=_0x14c862;try{const _0x26604d=this[_0x55c2cc(0x650)]();if(!_0x26604d[_0x55c2cc(0x7c0)](_0x40d2c7))return null;return _0x26604d[_0x55c2cc(0xbeb)](_0x40d2c7,_0xa7623e)||null;}catch{return null;}}[_0x14c862(0x3b5)](){const _0x381694=_0x14c862;if(this[_0x381694(0xad6)])return;this[_0x381694(0xad6)]=this[_0x381694(0xd4f)][_0x381694(0x7a2)]['openDB'](_0x3862b,{'dupSort':![]});}['_getPeerState'](_0x23a5a1){const _0x5c66b6=_0x14c862;return this['_openLocalPeerDb'](),this[_0x5c66b6(0xad6)]['get'](_0x23a5a1)||null;}[_0x14c862(0x872)](_0x233295,_0x4126a9,{merge:merge=!![]}={}){const _0x1f1c90=_0x14c862;this[_0x1f1c90(0x3b5)]();const _0xd711f=this[_0x1f1c90(0xad6)][_0x1f1c90(0xbeb)](_0x233295)||null;let _0x19601c;merge&&_0xd711f?(_0x19601c={..._0xd711f,..._0x4126a9},_0x4126a9[_0x1f1c90(0x11cd)]&&_0xd711f[_0x1f1c90(0x11cd)]&&(_0x19601c[_0x1f1c90(0x11cd)]={..._0xd711f['clocks'],..._0x4126a9['clocks']})):_0x19601c={..._0x4126a9};if(!_0x19601c[_0x1f1c90(0xf1a)])_0x19601c['created']=_0x50ff87();return _0x19601c['updated']=_0x50ff87(),this[_0x1f1c90(0xad6)]['putSync'](_0x233295,_0x19601c),_0x19601c;}[_0x14c862(0x592)](_0x2c9528){const _0x4bf20d=_0x14c862,_0x4228f4=this[_0x4bf20d(0x11e9)](_0x2c9528);if(_0x4228f4)return _0x4228f4;return this[_0x4bf20d(0x872)](_0x2c9528,{'status':_0x4bf20d(0xd2f),'clock':0x0,'clocks':{},'last_seen':null,'last_error':null});}[_0x14c862(0x55e)](){const _0x1f2857=_0x14c862;if(!this['okdb'][_0x1f2857(0xe56)])return[];const _0x67e6f2=this['_getControlEnv']();if(!_0x67e6f2[_0x1f2857(0x7c0)](_0x40d2c7))return[];const _0x1d9bba=[];try{for(const {key:_0x121ba7,value:_0x1357d4}of _0x67e6f2['getRange'](_0x40d2c7)){const _0x3851f1=String(_0x121ba7);if(_0x3851f1===this[_0x1f2857(0xd4f)]['id'])continue;const _0x1ce638=this[_0x1f2857(0x11e9)](_0x3851f1)||{'status':_0x1f2857(0xd2f),'clock':0x0,'last_seen':null,'last_error':null},_0x42253f=this[_0x1f2857(0x891)](_0x3851f1);_0x1d9bba[_0x1f2857(0x597)]({'peer_id':_0x3851f1,'address':_0x1357d4?.[_0x1f2857(0x7f2)]||null,'meta':_0x1357d4?.[_0x1f2857(0x654)]||{},'tags':_0xb092cc(_0x1357d4?.['tags']),'node_updated':_0x1357d4?.[_0x1f2857(0x965)]||null,'link':_0x42253f?{'direction':_0x42253f[_0x1f2857(0xa88)],'envs':_0x42253f[_0x1f2857(0xfcc)],'enabled':_0x42253f['enabled']}:null,..._0x1ce638});}}catch{}return _0x1d9bba;}async[_0x14c862(0xd0d)](){const _0x10b906=_0x14c862;if(this[_0x10b906(0xc62)])return;if(this['_ensurePromise'])return this[_0x10b906(0x4aa)];this[_0x10b906(0x4aa)]=((async()=>{const _0x1cd75d=_0x10b906,_0x4fd4d2=this[_0x1cd75d(0x650)]();if(!_0x4fd4d2[_0x1cd75d(0x7c0)](_0x40d2c7))await _0x4fd4d2[_0x1cd75d(0xa39)](_0x40d2c7);if(!_0x4fd4d2[_0x1cd75d(0x7c0)](_0x363255))await _0x4fd4d2[_0x1cd75d(0xa39)](_0x363255);const _0x65e873=this[_0x1cd75d(0xd4f)][_0x1cd75d(0xa3)]['get']('default');if(_0x65e873&&_0x65e873['hasType'](_0x40d2c7)){for(const {key:_0x27af7a,value:_0x570b99}of _0x65e873[_0x1cd75d(0x9ce)](_0x40d2c7)){!_0x4fd4d2[_0x1cd75d(0xa57)](_0x40d2c7,_0x27af7a)&&await _0x4fd4d2[_0x1cd75d(0x92c)](_0x40d2c7,_0x27af7a,_0x570b99);}try{await _0x65e873[_0x1cd75d(0x665)](_0x40d2c7);}catch{}}this[_0x1cd75d(0x3b5)]();if(!_0x4fd4d2[_0x1cd75d(0xa57)](_0x40d2c7,this[_0x1cd75d(0xd4f)]['id']))await _0x4fd4d2[_0x1cd75d(0x92c)](_0x40d2c7,this[_0x1cd75d(0xd4f)]['id'],{'id':this['okdb']['id'],'address':this[_0x1cd75d(0x11e5)][_0x1cd75d(0x7f2)]??null,'publicKey':this[_0x1cd75d(0x838)]??null,'created':_0x50ff87(),'updated':_0x50ff87(),'joined':_0x50ff87(),'meta':{},'tags':[]});else{if(this[_0x1cd75d(0x838)]){const _0x270a03=_0x4fd4d2['getEntry'](_0x40d2c7,this[_0x1cd75d(0xd4f)]['id']);_0x270a03&&!_0x270a03[_0x1cd75d(0x568)]?.[_0x1cd75d(0x1007)]&&await _0x4fd4d2[_0x1cd75d(0x92c)](_0x40d2c7,this['okdb']['id'],{..._0x270a03[_0x1cd75d(0x568)],'publicKey':this[_0x1cd75d(0x838)],'updated':_0x50ff87()},_0x270a03[_0x1cd75d(0x45c)]);}}this[_0x1cd75d(0xc62)]=!![];})());try{await this[_0x10b906(0x4aa)];}finally{this[_0x10b906(0x4aa)]=null;}}async[_0x14c862(0x6fa)](_0x4aa978){const _0x1d5f44=_0x14c862;await this[_0x1d5f44(0xd0d)]();const _0x5a3d27=this[_0x1d5f44(0x650)](),_0x491cda=_0x5a3d27['getEntry'](_0x40d2c7,this[_0x1d5f44(0xd4f)]['id']);if(!_0x491cda)throw new _0x5e840a('self\x20sync\x20node\x20record\x20missing',_0x1d5f44(0x436));const _0x9d3178={..._0x491cda[_0x1d5f44(0x568)],..._0x4aa978,'id':this['okdb']['id'],'updated':_0x50ff87()};return _0x9d3178[_0x1d5f44(0x35b)]=Object[_0x1d5f44(0x901)][_0x1d5f44(0x9e)][_0x1d5f44(0x834)](_0x4aa978,_0x1d5f44(0x35b))?_0xb092cc(_0x4aa978['tags']):_0xb092cc(_0x491cda[_0x1d5f44(0x568)]?.[_0x1d5f44(0x35b)]),await _0x5a3d27['put'](_0x40d2c7,this[_0x1d5f44(0xd4f)]['id'],_0x9d3178,_0x491cda[_0x1d5f44(0x45c)]),Object['prototype']['hasOwnProperty'][_0x1d5f44(0x834)](_0x4aa978,_0x1d5f44(0x35b))&&this[_0x1d5f44(0xa18)](),_0x9d3178;}async[_0x14c862(0x3d9)](_0x178ed2,{token:_0x48b7e5,username:_0x142fcb,password:_0x52c629,my_info:_0x38c66b,dataLink:dataLink=!![]}={}){const _0x2c7e33=_0x14c862;if(!this[_0x2c7e33(0x11e5)]['address'])throw new _0x5e840a(_0x2c7e33(0x8b7),_0x2c7e33(0x91d));await this[_0x2c7e33(0xd0d)]();if(!_0x178ed2||typeof _0x178ed2!==_0x2c7e33(0xf7a))throw new _0x5e840a(_0x2c7e33(0x2b7),'SYNC_BAD_ADDRESS');_0x178ed2=_0x178ed2[_0x2c7e33(0x8d8)](/\/+$/,'');const _0x1a2ca3=await this['_resolveJoinCredential'](_0x178ed2,{'token':_0x48b7e5,'username':_0x142fcb,'password':_0x52c629}),_0x3ecdd6=await this[_0x2c7e33(0xacb)](_0x178ed2,_0x1a2ca3),_0x47fdc5=_0x3ecdd6?.[_0x2c7e33(0xc88)]??_0x3ecdd6,{node:_0x15aaed}=_0x47fdc5;if(!_0x15aaed?.['id'])throw new _0x5e840a(_0x2c7e33(0x1239),_0x2c7e33(0x7c2));if(_0x15aaed['id']===this[_0x2c7e33(0xd4f)]['id'])throw new _0x5e840a(_0x2c7e33(0x887),_0x2c7e33(0xca8));if(_0x38c66b)await this[_0x2c7e33(0x6fa)](_0x38c66b);await this[_0x2c7e33(0x914)](_0x15aaed,_0x178ed2),this[_0x2c7e33(0x592)](_0x15aaed['id']);dataLink&&await this['upsertLink'](_0x15aaed['id'],{'direction':_0x2c7e33(0xfa4),'envs':null,'enabled':!![]});try{await this[_0x2c7e33(0x318)](_0x178ed2+_0x2c7e33(0xae5),{'node':this[_0x2c7e33(0x2e4)]()},_0x1a2ca3);}catch{}await this[_0x2c7e33(0x441)](_0x15aaed['id']);}async['_acceptJoin'](_0x380ae5){const _0x234d10=_0x14c862;await this[_0x234d10(0xd0d)]();if(!_0x380ae5?.['id'])throw new _0x5e840a(_0x234d10(0x4fc),_0x234d10(0x7c2));if(_0x380ae5['id']===this[_0x234d10(0xd4f)]['id'])throw new _0x5e840a(_0x234d10(0x887),'SYNC_SELF_JOIN');this['okdb']?.[_0x234d10(0x3a3)]?.[_0x234d10(0xa15)](_0x234d10(0x1034));const _0x523c24=this[_0x234d10(0x650)](),_0x5d6a28=_0x523c24[_0x234d10(0x7c0)](_0x40d2c7)?[..._0x523c24[_0x234d10(0x9ce)](_0x40d2c7)][_0x234d10(0x1103)](({key:_0x2146ae})=>_0x2146ae!==this[_0x234d10(0xd4f)]['id'])[_0x234d10(0x156)]:0x0;this[_0x234d10(0xd4f)]?.[_0x234d10(0x3a3)]?.[_0x234d10(0x8b0)](_0x234d10(0xbd),_0x5d6a28),await this[_0x234d10(0x914)](_0x380ae5),this[_0x234d10(0x592)](_0x380ae5['id']),this['options'][_0x234d10(0x7f2)]&&this[_0x234d10(0x441)](_0x380ae5['id'],{'envs':[_0x234d10(0xfd5)],'_isControl':!![]})[_0x234d10(0x415)](()=>{});}async[_0x14c862(0x914)](_0x3266f0,_0x3cf2f6=null){const _0x54eab0=_0x14c862;if(_0x3266f0['id']===this[_0x54eab0(0xd4f)]['id'])return;const _0xf88c20=this[_0x54eab0(0x650)](),_0x14827e=_0xf88c20[_0x54eab0(0xa57)](_0x40d2c7,_0x3266f0['id']),_0x2dbe2b={..._0x14827e?.[_0x54eab0(0x568)]||{},..._0x3266f0,'address':_0x3cf2f6??_0x3266f0[_0x54eab0(0x7f2)]??_0x14827e?.[_0x54eab0(0x568)]?.[_0x54eab0(0x7f2)]??null,'meta':_0x3266f0[_0x54eab0(0x654)]??_0x14827e?.[_0x54eab0(0x568)]?.[_0x54eab0(0x654)]??{},'tags':_0xb092cc(_0x3266f0[_0x54eab0(0x35b)]??_0x14827e?.[_0x54eab0(0x568)]?.[_0x54eab0(0x35b)]),'updated':_0x3266f0[_0x54eab0(0x965)]!=null?_0x3266f0['updated']:_0x14827e?.['value']?.[_0x54eab0(0x965)]!=null?_0x14827e['value'][_0x54eab0(0x965)]:null};await _0xf88c20['put'](_0x40d2c7,_0x3266f0['id'],_0x2dbe2b,_0x14827e?.[_0x54eab0(0x45c)]);}async['calculateDelta'](_0x2a9ae2={},{limit:limit=0x64,envs:envs=null}={}){const _0x429c12=_0x14c862,_0x3619f5=[],_0x58c08b={};for(const [_0x2a1c38,_0x1b448d]of this['okdb'][_0x429c12(0xa3)]){if(!_0x1b448d['_sync'])continue;if(envs!==null&&!envs[_0x429c12(0x29c)](_0x2a1c38))continue;_0x58c08b[_0x2a1c38]=_0x1b448d[_0x429c12(0x5ea)]();const _0x480538=Number(_0x2a9ae2[_0x2a1c38]||0x0)+0x1;for(const _0x42dbe7 of _0x1b448d[_0x429c12(0x151)](null,_0x480538)){if(_0x3619f5['length']>=limit)break;if(_0x42dbe7[_0x429c12(0x942)]===_0x35decd['PUT']){const _0x42e6ea=_0x1b448d[_0x429c12(0xa57)](_0x42dbe7[_0x429c12(0xaee)],_0x42dbe7['key']);if(!_0x42e6ea)continue;_0x3619f5['push']({..._0x42dbe7,'value':_0x42e6ea['value'],'version':_0x42e6ea[_0x429c12(0x45c)],'_env':_0x2a1c38});}else _0x3619f5[_0x429c12(0x597)]({..._0x42dbe7,'_env':_0x2a1c38});}if(_0x3619f5[_0x429c12(0x156)]>=limit)break;}return{'clock':_0x58c08b[_0x429c12(0x8d0)]??0x0,'clocks':_0x58c08b,'changes':_0x3619f5};}async[_0x14c862(0x7fd)](_0x1ad046,_0x58d9af,_0x2f84b4,_0x292d55,_0x43177f){const _0x55a385=_0x14c862;await this[_0x55a385(0xd0d)]();const _0x45852a=this[_0x55a385(0x650)](),_0x5b1a69=_0x45852a[_0x55a385(0xa57)](_0x40d2c7,_0x1ad046);if(!_0x5b1a69?.[_0x55a385(0x568)])throw new _0x5e840a(_0x55a385(0x380)+_0x1ad046,_0x55a385(0x111e));const _0x4f7a87=_0x5b1a69['value'][_0x55a385(0x7f2)];if(!_0x4f7a87)throw new _0x5e840a(_0x55a385(0x9a9),_0x55a385(0xa32));const _0x526f84=_0x4f7a87[_0x55a385(0x8d8)](/\/+$/,'')+_0x2f84b4,_0x10f591=_0x292d55==null?null:JSON[_0x55a385(0xf75)](_0x292d55),_0x41abf4={'Accept':_0x55a385(0xf9b),'Content-Type':_0x55a385(0xf9b)};if(this[_0x55a385(0x11e5)]['token'])_0x41abf4[_0x55a385(0x81d)]=_0x55a385(0x9a3)+this[_0x55a385(0x11e5)]['token'];if(this['_nodePrivateKey']){const _0x1a2813=_0x3ae8d9['hashBody'](_0x10f591),_0x158ca6=new Date()[_0x55a385(0x9cc)]();let _0x5b8c91;try{const _0x42de80=new URL(_0x526f84);_0x5b8c91=_0x42de80[_0x55a385(0x120a)]+(_0x42de80[_0x55a385(0x460)]||'');}catch{_0x5b8c91=_0x2f84b4;}const _0xd8c132=_0x3ae8d9[_0x55a385(0x1160)](this[_0x55a385(0xd23)],this[_0x55a385(0xd4f)]['id'],_0x58d9af,_0x5b8c91,_0x158ca6,_0x1a2813);_0x41abf4[_0x55a385(0xcfc)]=this['okdb']['id'],_0x41abf4[_0x55a385(0x6bc)]=_0x158ca6,_0x41abf4['X-OKDB-Signature']=_0xd8c132,_0x41abf4[_0x55a385(0xfad)]=_0x1a2813;}const _0x5eccd9={'method':_0x58d9af,'headers':_0x41abf4,'signal':_0x43177f};if(_0x10f591!=null)_0x5eccd9['body']=_0x10f591;const _0x34d7b6=await fetch(_0x526f84,_0x5eccd9);if(!_0x34d7b6['ok']){const _0x41bf33=await _0x34d7b6[_0x55a385(0x1fb)]()['catch'](()=>''),_0x44b675=new Error((_0x55a385(0xe07)+_0x34d7b6[_0x55a385(0xfcd)]+'\x20'+_0x34d7b6['statusText']+'\x20'+_0x41bf33)['trim']());_0x44b675['status']=_0x34d7b6[_0x55a385(0xfcd)];throw _0x44b675;}return await _0x34d7b6['json']()[_0x55a385(0x415)](()=>({}));}async[_0x14c862(0xb86)](_0x57c697,_0x219cc4,{limit:limit=0x64,envs:envs=null}={}){const _0x8976c5=_0x14c862,_0x5e773c=Number(_0x219cc4?.[_0x8976c5(0x8d0)]||0x0);return await this['fetchPeer'](_0x57c697,_0x8976c5(0xe46),_0x8976c5(0x584),{'from_clocks':_0x219cc4,'from_clock':_0x5e773c,'limit':limit,'envs':envs});}async['_onClock'](){const _0x35beca=_0x14c862;if(!this[_0x35beca(0x11e5)][_0x35beca(0x7f2)])return;await this[_0x35beca(0xd0d)]();const _0x39159a=!this[_0x35beca(0x8a7)]();try{const _0x1ab081=this['_getControlEnv']();if(!_0x1ab081[_0x35beca(0x7c0)](_0x40d2c7))return;for(const {key:_0x7a582a}of _0x1ab081[_0x35beca(0x9ce)](_0x40d2c7)){const _0x11efed=String(_0x7a582a);if(_0x11efed===this['okdb']['id'])continue;if(_0x39159a)this[_0x35beca(0x441)](_0x11efed)[_0x35beca(0x415)](()=>{})['then'](async()=>{const _0x48e66f=_0x35beca;try{await this[_0x48e66f(0x7fd)](_0x11efed,'POST',_0x48e66f(0x494),{'from':this[_0x48e66f(0xd4f)]['id']});}catch(_0xdc242d){this[_0x48e66f(0x9be)][_0x48e66f(0x225)](_0x48e66f(0x994),{'err':_0xdc242d['message']});}});else{this['_reconcilePeerControl'](_0x11efed)['catch'](()=>{});const _0xc0c966=this['_linkAllows'](_0x11efed);if(!_0xc0c966[_0x35beca(0x881)]&&!_0xc0c966[_0x35beca(0x597)])continue;const _0x16fb32=_0xc0c966['envs']??this['_getDataEnvNames']();if(_0xc0c966[_0x35beca(0x881)]){const _0x4a2043=this[_0x35beca(0x441)](_0x11efed,{'envs':_0x16fb32})[_0x35beca(0x415)](()=>{});_0xc0c966['push']&&_0x4a2043[_0x35beca(0x7db)](async()=>{const _0x471014=_0x35beca;try{await this[_0x471014(0x7fd)](_0x11efed,_0x471014(0xe46),_0x471014(0x494),{'from':this[_0x471014(0xd4f)]['id']});}catch(_0x3fb9aa){this[_0x471014(0x9be)][_0x471014(0x225)](_0x471014(0x994),{'err':_0x3fb9aa[_0x471014(0xb4e)]});}});}else this[_0x35beca(0x7fd)](_0x11efed,_0x35beca(0xe46),_0x35beca(0x494),{'from':this[_0x35beca(0xd4f)]['id']})[_0x35beca(0x415)](_0x4d52d6=>this['log']['error'](_0x35beca(0x994),{'err':_0x4d52d6[_0x35beca(0xb4e)]}));}}}catch{}}async[_0x14c862(0x112a)](_0x270bba){const _0x430171=_0x14c862;if(this[_0x430171(0x40c)][_0x430171(0x9d0)](_0x270bba))return;this[_0x430171(0x40c)][_0x430171(0x33c)](_0x270bba);try{await this[_0x430171(0x441)](_0x270bba,{'envs':[_0x430171(0xfd5)],'_isControl':!![]});}finally{this[_0x430171(0x40c)][_0x430171(0x3b3)](_0x270bba);}}[_0x14c862(0xc73)](_0x21db41,_0xb76711=null){const _0x5f04d0=_0x14c862;if(_0x21db41?.['origin']===this[_0x5f04d0(0xd4f)]['id'])return![];const _0x4ec835=_0x21db41?.['id'];if(!_0x4ec835)return!![];const _0x1c4219=_0xb76711??this[_0x5f04d0(0xd4f)][_0x5f04d0(0x30b)](_0x5f04d0(0x8d0)),_0x55157d=_0x1c4219['changeToClockDb']?.[_0x5f04d0(0xbeb)](_0x4ec835);if(!_0x55157d)return!![];const _0x50471e=_0x1c4219[_0x5f04d0(0xcda)]?.[_0x5f04d0(0xbeb)](_0x55157d);if(!_0x50471e)return!![];return _0x96bb1d(_0x21db41,_0x50471e)>0x0;}['_scheduleRuntimeActivation'](){const _0x4a8679=_0x14c862;if(this[_0x4a8679(0xb9e)])return;this[_0x4a8679(0xb9e)]=!![],setImmediate(()=>{const _0x34b66d=_0x4a8679;this[_0x34b66d(0xb9e)]=![],this[_0x34b66d(0xd4f)][_0x34b66d(0xe1e)]()[_0x34b66d(0x415)](()=>{});});}async[_0x14c862(0x441)](_0x2d4399,{envs:envs=null,_isControl:_isControl=![]}={}){const _0x132a50=_0x14c862;await this['_ensure'](),this[_0x132a50(0x592)](_0x2d4399);if(!_isControl){if(this[_0x132a50(0x462)][_0x132a50(0x9d0)](_0x2d4399))return;this[_0x132a50(0x462)][_0x132a50(0x33c)](_0x2d4399);}try{const _0x4ee42d=this[_0x132a50(0x11e9)](_0x2d4399)||{'clocks':{},'clock':0x0};if(!_isControl)this[_0x132a50(0x872)](_0x2d4399,{'status':'reconciling'});let _0x332c9b={..._0x4ee42d[_0x132a50(0x11cd)]||{}};if(!_0x332c9b['default']&&_0x4ee42d[_0x132a50(0x114d)])_0x332c9b[_0x132a50(0x8d0)]=Number(_0x4ee42d[_0x132a50(0x114d)]);const _0x1de25e=this[_0x132a50(0x11e5)][_0x132a50(0x830)];while(!![]){const _0x4a2580=await this['fetchRemoteDelta'](_0x2d4399,_0x332c9b,{'limit':_0x1de25e,'envs':envs}),_0x381302=_0x4a2580?.[_0x132a50(0xc88)]??_0x4a2580,_0x22eefd=_0x381302?.[_0x132a50(0x11cd)]??(_0x381302?.[_0x132a50(0x114d)]!=null?{'default':Number(_0x381302[_0x132a50(0x114d)])}:{}),_0x3e08e2=Array[_0x132a50(0x10f5)](_0x381302?.[_0x132a50(0xf0c)])?_0x381302[_0x132a50(0xf0c)]:[];if(_0x3e08e2[_0x132a50(0x156)]===0x0){this[_0x132a50(0xae6)](_0x2d4399,_0x332c9b,_isControl,_0x132a50(0xd2f)),this[_0x132a50(0xa18)]();return;}const _0x2617d4=new Map();for(const _0x1e8a56 of _0x3e08e2){const _0x5848dc=_0x1e8a56[_0x132a50(0x308)]||_0x132a50(0x8d0);if(!_0x2617d4[_0x132a50(0x9d0)](_0x5848dc))_0x2617d4['set'](_0x5848dc,[]);_0x2617d4[_0x132a50(0xbeb)](_0x5848dc)[_0x132a50(0x597)](_0x1e8a56);}for(const [_0x7aef8,_0x3234ff]of _0x2617d4){const _0x55e6eb=this['okdb'][_0x132a50(0xa3)][_0x132a50(0xbeb)](_0x7aef8);if(!_0x55e6eb||!_0x55e6eb[_0x132a50(0x745)])continue;await _0x55e6eb['db'][_0x132a50(0x683)](()=>{const _0x32fe4a=_0x132a50,_0x1a1ea9=_0x55e6eb[_0x32fe4a(0x1185)];for(const _0xca9b97 of _0x3234ff){Number['isFinite'](_0xca9b97['clock'])&&(_0x332c9b[_0x7aef8]=Math[_0x32fe4a(0x10bf)](_0x332c9b[_0x7aef8]||0x0,_0xca9b97[_0x32fe4a(0x114d)]));_0xca9b97['timestamp']&&(_0x55e6eb['_hlc']=_0x344fa5[_0x32fe4a(0x1070)](_0x55e6eb[_0x32fe4a(0x1185)],Number(_0xca9b97['timestamp'])));if(!this['_shouldApplyChange'](_0xca9b97,_0x55e6eb))continue;this[_0x32fe4a(0x452)](_0xca9b97,_0x55e6eb);}if(_0x55e6eb[_0x32fe4a(0x1185)]!==_0x1a1ea9)_0x55e6eb['db'][_0x32fe4a(0x92c)](_0x32fe4a(0xab1),String(_0x55e6eb[_0x32fe4a(0x1185)]));});}this[_0x132a50(0xae6)](_0x2d4399,_0x332c9b,_isControl,'reconciling');const _0x5193d9=Object[_0x132a50(0x1129)](_0x22eefd)['every'](([_0x589b95,_0x58f377])=>{const _0x54d815=_0x132a50;if(envs!==null&&!envs[_0x54d815(0x29c)](_0x589b95))return!![];return(_0x332c9b[_0x589b95]||0x0)>=_0x58f377;});if(_0x5193d9||_0x3e08e2[_0x132a50(0x156)]<_0x1de25e){this[_0x132a50(0xae6)](_0x2d4399,_0x332c9b,_isControl,_0x132a50(0xd2f)),this['_scheduleRuntimeActivation']();return;}}}catch(_0xddd10b){!_isControl&&this[_0x132a50(0x872)](_0x2d4399,{'status':_0x132a50(0x225),'last_error':_0xddd10b?.[_0x132a50(0xb4e)]||String(_0xddd10b),'last_error_at':_0x50ff87()});throw _0xddd10b;}finally{if(!_isControl)this['_reconciling'][_0x132a50(0x3b3)](_0x2d4399);}}['_savePeerProgress'](_0x55d7e4,_0xad8494,_0x49488e,_0x2af775){const _0x3209af=_0x14c862;if(_0x49488e){const _0x1430cb=this[_0x3209af(0x11e9)](_0x55d7e4)||{};this['_setPeerState'](_0x55d7e4,{'clocks':{..._0x1430cb[_0x3209af(0x11cd)]||{},..._0xad8494}});}else this['_setPeerState'](_0x55d7e4,{'status':_0x2af775,'clocks':_0xad8494,'clock':_0xad8494[_0x3209af(0x8d0)]||0x0,'last_seen':_0x50ff87(),'last_error':null});}[_0x14c862(0x452)](_0xd058c5,_0x1c0516=null){const _0x33b0f8=_0x14c862;if(_0xd058c5['origin']===this[_0x33b0f8(0xd4f)]['id'])return;const _0x596d4b=_0x1c0516??(_0xd058c5[_0x33b0f8(0x308)]?this[_0x33b0f8(0xd4f)]['_envs'][_0x33b0f8(0xbeb)](_0xd058c5['_env']):null)??this[_0x33b0f8(0xd4f)][_0x33b0f8(0x30b)](_0x33b0f8(0x8d0));switch(_0xd058c5[_0x33b0f8(0x942)]){case _0x35decd[_0x33b0f8(0x719)]:case _0x33b0f8(0x92c):_0x596d4b['_put'](null,_0xd058c5[_0x33b0f8(0xaee)],_0xd058c5[_0x33b0f8(0x9dd)],_0xd058c5[_0x33b0f8(0x568)],{'version':_0xd058c5[_0x33b0f8(0x45c)],'timestamp':_0xd058c5[_0x33b0f8(0xdfe)],'origin':_0xd058c5[_0x33b0f8(0xca6)]});break;case _0x35decd['REMOVE']:case _0x33b0f8(0x21e):_0x596d4b[_0x33b0f8(0xfa0)](null,_0xd058c5['type'],_0xd058c5[_0x33b0f8(0x9dd)],{'timestamp':_0xd058c5[_0x33b0f8(0xdfe)],'origin':_0xd058c5[_0x33b0f8(0xca6)]});break;case _0x35decd[_0x33b0f8(0xaa4)]:!_0x596d4b[_0x33b0f8(0x7c0)](_0xd058c5[_0x33b0f8(0xaee)])&&_0x596d4b[_0x33b0f8(0x924)](_0xd058c5[_0x33b0f8(0xaee)],_0xd058c5[_0x33b0f8(0xdfe)],_0xd058c5[_0x33b0f8(0xca6)]);break;case _0x35decd[_0x33b0f8(0xcaf)]:_0x596d4b[_0x33b0f8(0x7c0)](_0xd058c5['type'])&&_0x596d4b[_0x33b0f8(0x6d6)](_0xd058c5['type'],_0xd058c5[_0x33b0f8(0xdfe)],_0xd058c5[_0x33b0f8(0xca6)]);break;case _0x35decd[_0x33b0f8(0xada)]:{const _0x1b4084=typeof _0xd058c5[_0x33b0f8(0xcc7)]===_0x33b0f8(0xf7a)?_0xd058c5['index'][_0x33b0f8(0xfb1)]('~'):[];if(!_0x1b4084[_0x33b0f8(0x156)])throw new _0x5e840a('invalid\x20index\x20name\x20in\x20change\x20log',_0x33b0f8(0x5fb));if(!_0x596d4b[_0x33b0f8(0x56c)](_0xd058c5[_0x33b0f8(0xaee)],_0x1b4084)){const _0x1c3297={};if(_0xd058c5[_0x33b0f8(0x774)])_0x1c3297['unique']=!![];_0x596d4b[_0x33b0f8(0x117e)](_0xd058c5[_0x33b0f8(0xaee)],_0x1b4084,_0xd058c5[_0x33b0f8(0xdfe)],_0xd058c5[_0x33b0f8(0xca6)],_0x1c3297);}break;}case _0x35decd[_0x33b0f8(0xfa9)]:{const _0x1e0fc6=typeof _0xd058c5['index']===_0x33b0f8(0xf7a)?_0xd058c5[_0x33b0f8(0xcc7)]['split']('~'):[];if(!_0x1e0fc6[_0x33b0f8(0x156)])throw new _0x5e840a(_0x33b0f8(0x6ec),_0x33b0f8(0x5fb));if(_0x596d4b[_0x33b0f8(0x56c)](_0xd058c5[_0x33b0f8(0xaee)],_0x1e0fc6))try{_0x596d4b['_dropIndex'](_0xd058c5[_0x33b0f8(0xaee)],_0x1e0fc6,_0xd058c5[_0x33b0f8(0xdfe)],_0xd058c5[_0x33b0f8(0xca6)]);}catch(_0x5a1045){if(_0x5a1045[_0x33b0f8(0x1f8)]===_0x33b0f8(0x6ae)){this['log'][_0x33b0f8(0xf78)]('sync\x20INDEX_DROP\x20skipped:\x20index\x20has\x20local\x20view\x20consumers',{'type':_0xd058c5['type'],'index':_0xd058c5[_0x33b0f8(0xcc7)]});break;}throw _0x5a1045;}break;}case _0x35decd[_0x33b0f8(0xe13)]:{const _0x10464c=_0xd058c5['fts'],_0x33677f=_0xd058c5[_0x33b0f8(0x142)];if(!_0x10464c||!_0x33677f)break;if(!_0x596d4b[_0x33b0f8(0x7c0)](_0xd058c5[_0x33b0f8(0xaee)]))break;!this[_0x33b0f8(0xd4f)][_0x33b0f8(0xfca)]['has'](_0xd058c5[_0x33b0f8(0xaee)],_0x10464c,_0x596d4b)&&this[_0x33b0f8(0xd4f)]['fts'][_0x33b0f8(0x1075)](_0xd058c5['type'],_0x10464c,_0x33677f,_0xd058c5[_0x33b0f8(0xdfe)],_0x596d4b);break;}case _0x35decd[_0x33b0f8(0xcde)]:{const _0x5711c5=_0xd058c5[_0x33b0f8(0xfca)];if(!_0x5711c5)break;if(!_0x596d4b[_0x33b0f8(0x7c0)](_0xd058c5['type']))break;this[_0x33b0f8(0xd4f)][_0x33b0f8(0xfca)][_0x33b0f8(0x9d0)](_0xd058c5[_0x33b0f8(0xaee)],_0x5711c5,_0x596d4b)&&this[_0x33b0f8(0xd4f)]['fts'][_0x33b0f8(0x448)](_0xd058c5[_0x33b0f8(0xaee)],_0x5711c5,_0x596d4b);break;}case _0x35decd[_0x33b0f8(0xf02)]:{if(!_0x596d4b['hasType'](_0xd058c5[_0x33b0f8(0xaee)]))break;_0xd058c5[_0x33b0f8(0xdce)]&&_0x1e463b['setSchema'](_0x596d4b,null,_0xd058c5[_0x33b0f8(0xaee)],_0xd058c5[_0x33b0f8(0xdce)],{'timestamp':_0xd058c5[_0x33b0f8(0xdfe)],'origin':_0xd058c5['origin']});break;}case _0x35decd[_0x33b0f8(0xd9c)]:{if(!_0x596d4b['hasType'](_0xd058c5[_0x33b0f8(0xaee)]))break;const _0x396159=_0x596d4b[_0x33b0f8(0x9ca)](_0xd058c5['type']);_0x396159[_0x33b0f8(0xdce)]&&_0x1e463b[_0x33b0f8(0x10ea)](_0x596d4b,null,_0xd058c5['type'],{'timestamp':_0xd058c5['timestamp'],'origin':_0xd058c5['origin']});break;}}}}return okdbSync=_0x1bce4b,okdbSync;}var okdbQueueWorker,hasRequiredOkdbQueueWorker;function requireOkdbQueueWorker(){const _0x3d5e8b=_0xef8cd8;if(hasRequiredOkdbQueueWorker)return okdbQueueWorker;return hasRequiredOkdbQueueWorker=0x1,okdbQueueWorker=class _0x14845b{constructor(_0x1b28e7,_0x5c7c72,_0x1ff6a4={}){const _0x47f7e1=_0x47ab;this[_0x47f7e1(0x879)]=_0x1b28e7,this[_0x47f7e1(0xaee)]=_0x5c7c72,this[_0x47f7e1(0x11e5)]=_0x1ff6a4,this[_0x47f7e1(0x94e)]=![],this[_0x47f7e1(0x34c)]=null,this[_0x47f7e1(0x131)]=Promise[_0x47f7e1(0x797)](),this['_laneJobs']=new Map();}[_0x3d5e8b(0xa00)](_0x6bcfd4=this[_0x3d5e8b(0x34c)]){const _0x20b3d3=_0x3d5e8b;if(this[_0x20b3d3(0x94e)]){if(this[_0x20b3d3(0x34c)]===_0x6bcfd4)return;throw new Error(_0x20b3d3(0x84a));}if(!_0x6bcfd4)throw new Error('No\x20handler\x20provided');this['handler']=_0x6bcfd4,this[_0x20b3d3(0x94e)]=!![],this['_loopDone']=this[_0x20b3d3(0xf64)]()[_0x20b3d3(0x415)](_0x5aab01=>{const _0x1a54fb=_0x20b3d3;this[_0x1a54fb(0x94e)]=![];try{this[_0x1a54fb(0x879)][_0x1a54fb(0x9be)]?.[_0x1a54fb(0x225)]?.('worker\x20loop\x20crashed',{'type':this[_0x1a54fb(0xaee)],'error':_0x5aab01?.[_0x1a54fb(0xb4e)],'stack':_0x5aab01?.[_0x1a54fb(0x56e)]});}catch{}});}async[_0x3d5e8b(0x1fe)](_0x4d9feb=0x7530){const _0x2b7488=_0x3d5e8b;this['running']=![],await Promise['race']([this[_0x2b7488(0x131)],new Promise(_0x39295b=>setTimeout(_0x39295b,_0x4d9feb))]);for(const [,{jobId:_0x100c90,claimId:_0x44586d}]of this[_0x2b7488(0x996)]){try{await this['queue'][_0x2b7488(0xf46)](_0x100c90,_0x44586d,new Error(_0x2b7488(0x100b)),_0x2b7488(0xbb3));}catch{}}this['_laneJobs'][_0x2b7488(0x859)]();}async[_0x3d5e8b(0xf64)](){const _0x147d68=_0x3d5e8b,_0x2aa76f=Math[_0x147d68(0x10bf)](0x1,Math[_0x147d68(0xcc)](Number(this['options']['concurrency'])||0x1));if(_0x2aa76f===0x1)return this[_0x147d68(0x13e)](0x0);const _0x34e312=Array['from']({'length':_0x2aa76f},(_0x18a7ab,_0x5a6fdf)=>this[_0x147d68(0x13e)](_0x5a6fdf));await Promise['all'](_0x34e312);}async[_0x3d5e8b(0x13e)](_0x394b36){const _0x5033ad=_0x3d5e8b,_0x2fea80=this['options'][_0x5033ad(0x7e3)]??0x3e8,_0x308766=Math[_0x5033ad(0x10bf)](0x1,Math[_0x5033ad(0xcc)](Number(this['options'][_0x5033ad(0xe4)])||0x1));if(_0x394b36>0x0){const _0x53f00d=Math['floor'](_0x2fea80/_0x308766*_0x394b36);await new Promise(_0xd6ab2f=>setTimeout(_0xd6ab2f,_0x53f00d));}while(this[_0x5033ad(0x94e)]){if(this[_0x5033ad(0x879)]['env']?.[_0x5033ad(0xc57)]&&Atomics[_0x5033ad(0x7c9)](this['queue'][_0x5033ad(0x30b)][_0x5033ad(0xc57)][_0x5033ad(0x2bb)],0x0)>0x0){await new Promise(_0x3fce1b=>setTimeout(_0x3fce1b,0xc8));continue;}let _0x4f0b05;try{_0x4f0b05=await this[_0x5033ad(0x879)][_0x5033ad(0x97)](this[_0x5033ad(0xaee)],this['options']);}catch(_0x902559){if(_0x902559?.['code']==='INVALID_STATE'||!this[_0x5033ad(0x94e)])break;throw _0x902559;}if(!this['running']){if(_0x4f0b05?.['id']&&_0x4f0b05?.[_0x5033ad(0xc82)])try{await this[_0x5033ad(0x879)]['releaseClaim'](_0x4f0b05['id'],_0x4f0b05[_0x5033ad(0xc82)],{'statusCode':_0x5033ad(0xf68)});}catch{}break;}if(!_0x4f0b05){await new Promise(_0x4d2d86=>setTimeout(_0x4d2d86,_0x2fea80));continue;}try{this[_0x5033ad(0x879)][_0x5033ad(0x9be)]?.[_0x5033ad(0xef)]?.(_0x5033ad(0xf3f),{'id':_0x4f0b05['id'],'type':this[_0x5033ad(0xaee)],'tries':_0x4f0b05[_0x5033ad(0x5ca)]});}catch{}this[_0x5033ad(0x996)][_0x5033ad(0x211)](_0x394b36,{'jobId':_0x4f0b05['id'],'claimId':_0x4f0b05[_0x5033ad(0xc82)]});const _0x2a375d=this[_0x5033ad(0x11e5)][_0x5033ad(0x74b)]!==![],_0x1f4490=this[_0x5033ad(0x11e5)][_0x5033ad(0x347)]||0x7530,_0x223834=Math['max'](0x3e8,Math[_0x5033ad(0xf9a)](_0x1f4490/0x3));let _0x4bd1bb=null,_0x3f3e62=![];_0x2a375d&&(_0x4bd1bb=setInterval(async()=>{const _0x227b06=_0x5033ad;try{await this['queue'][_0x227b06(0x29a)](_0x4f0b05['id'],_0x4f0b05[_0x227b06(0xc82)],_0x1f4490);}catch(_0x428701){(_0x428701?.[_0x227b06(0x1f8)]===_0x227b06(0x11a5)||_0x428701?.[_0x227b06(0x1f8)]==='INVALID_STATE')&&(_0x3f3e62=!![]);}},_0x223834));const _0x2b2918={'okdb':this[_0x5033ad(0x879)][_0x5033ad(0xd4f)],'job':_0x4f0b05,'jobId':_0x4f0b05['id'],'heartbeat':()=>this['queue']['markJobHeartbeat'](_0x4f0b05['id'],_0x4f0b05[_0x5033ad(0xc82)],this[_0x5033ad(0x11e5)][_0x5033ad(0x347)]||0x3e8),'markProgress':_0x17fac5=>this[_0x5033ad(0x879)][_0x5033ad(0x710)](_0x4f0b05['id'],_0x4f0b05['claim_id'],_0x17fac5)};let _0x5ae92f,_0x454b1e,_0xb42593=![];try{_0x5ae92f=await this[_0x5033ad(0x34c)](_0x4f0b05['payload'],_0x2b2918),_0xb42593=!![];}catch(_0x4a14a1){_0x454b1e=_0x4a14a1;}if(_0x4bd1bb)clearInterval(_0x4bd1bb);this[_0x5033ad(0x996)][_0x5033ad(0x3b3)](_0x394b36);if(_0x3f3e62)continue;if(_0xb42593)try{await this['queue'][_0x5033ad(0xdd3)](_0x4f0b05['id'],_0x4f0b05[_0x5033ad(0xc82)],_0x5ae92f);}catch(_0x3a6f37){try{this[_0x5033ad(0x879)][_0x5033ad(0x9be)]?.[_0x5033ad(0xf78)]?.(_0x5033ad(0x487),{'id':_0x4f0b05['id'],'type':this[_0x5033ad(0xaee)],'error':_0x3a6f37?.[_0x5033ad(0xb4e)]});}catch{}}else try{const {permanentlyFailed:_0x3ebc95}=await this[_0x5033ad(0x879)][_0x5033ad(0xf46)](_0x4f0b05['id'],_0x4f0b05[_0x5033ad(0xc82)],_0x454b1e);if(_0x3ebc95&&typeof this[_0x5033ad(0x11e5)][_0x5033ad(0x94d)]===_0x5033ad(0x63b))try{await this[_0x5033ad(0x11e5)][_0x5033ad(0x94d)](_0x4f0b05,_0x454b1e);}catch{}}catch(_0x4bbd27){try{this[_0x5033ad(0x879)][_0x5033ad(0x9be)]?.['warn']?.(_0x5033ad(0x1062),{'id':_0x4f0b05['id'],'type':this[_0x5033ad(0xaee)],'error':_0x4bbd27?.['message'],'handlerError':_0x454b1e?.['message']});}catch{}}}}},okdbQueueWorker;}var okdbQueueSpawnedWorker,hasRequiredOkdbQueueSpawnedWorker;function requireOkdbQueueSpawnedWorker(){const _0x43582c=_0xef8cd8;if(hasRequiredOkdbQueueSpawnedWorker)return okdbQueueSpawnedWorker;hasRequiredOkdbQueueSpawnedWorker=0x1;const _0x176188=require$$0$4,{fork:_0x3b5361}=require$$1$1;return okdbQueueSpawnedWorker=class _0x1d2a0a{constructor(_0x5f1ec1,_0x30e30b,_0x1b2c77,_0x228fdb={}){const _0x3bd9fe=_0x47ab;this['queue']=_0x5f1ec1,this[_0x3bd9fe(0xaee)]=_0x30e30b,this['modulePath']=_0x1b2c77,this[_0x3bd9fe(0x11e5)]=_0x228fdb,this[_0x3bd9fe(0xd9b)]=null,this[_0x3bd9fe(0x66c)]=null,this['_stopped']=![];}get['pid'](){const _0x30ba30=_0x47ab;return this[_0x30ba30(0xd9b)]?.['pid']??null;}async[_0x43582c(0xa00)](){const _0x42b653=_0x43582c;if(this[_0x42b653(0xd9b)])return this;const _0x373e9b=_0x176188[_0x42b653(0x3d9)](__dirname,_0x42b653(0x260)),_0x5df080=this[_0x42b653(0x879)][_0x42b653(0x30b)]?.[_0x42b653(0x1173)]??'default';return this[_0x42b653(0xd9b)]=_0x3b5361(_0x373e9b,[],{'stdio':[_0x42b653(0x695),_0x42b653(0x695),'inherit','ipc'],'env':{...process.env,'OKDB_QUEUE_DB_PATH':this['queue'][_0x42b653(0xd4f)][_0x42b653(0x20b)],'OKDB_QUEUE_ENV_NAME':_0x5df080,'OKDB_QUEUE_TYPE':this[_0x42b653(0xaee)],'OKDB_QUEUE_MODULE':_0x176188['resolve'](this['modulePath']),'OKDB_QUEUE_EXPORT':this[_0x42b653(0x11e5)][_0x42b653(0x113c)]??this[_0x42b653(0x11e5)]['export']??_0x42b653(0x8d0),'OKDB_QUEUE_WORKER_OPTIONS':JSON[_0x42b653(0xf75)](this[_0x42b653(0x9d4)]())}}),this['_ready']=new Promise((_0x3b4602,_0x26a146)=>{const _0x57436c=_0x42b653,_0x25958b=this['child'],_0x427ba9=_0x4d1b99=>{const _0x2c8efd=_0x47ab;if(!_0x4d1b99||typeof _0x4d1b99!=='object')return;if(_0x4d1b99[_0x2c8efd(0xaee)]===_0x2c8efd(0x8f0))_0x498a31(),_0x3b4602(this);else _0x4d1b99[_0x2c8efd(0xaee)]==='error'&&(_0x498a31(),_0x26a146(this[_0x2c8efd(0x38a)](_0x4d1b99[_0x2c8efd(0x225)])));},_0x218260=(_0xfa1e0a,_0x18d823)=>{const _0x17f653=_0x47ab;_0x498a31();if(this[_0x17f653(0xcbe)]){_0x3b4602(this);return;}_0x26a146(new Error(_0x17f653(0x1098)+_0xfa1e0a+_0x17f653(0xf3e)+_0x18d823+')'));},_0x427db2=_0x353ace=>{_0x498a31(),_0x26a146(_0x353ace);},_0x498a31=()=>{const _0x387dae=_0x47ab;_0x25958b[_0x387dae(0xa9b)](_0x387dae(0xb4e),_0x427ba9),_0x25958b[_0x387dae(0xa9b)](_0x387dae(0x5e6),_0x218260),_0x25958b[_0x387dae(0xa9b)](_0x387dae(0x225),_0x427db2);};_0x25958b['on'](_0x57436c(0xb4e),_0x427ba9),_0x25958b['on'](_0x57436c(0x5e6),_0x218260),_0x25958b['on'](_0x57436c(0x225),_0x427db2);}),await this['_ready'],this;}async[_0x43582c(0x1fe)](){const _0x1ff44b=_0x43582c;this[_0x1ff44b(0xcbe)]=!![];if(!this[_0x1ff44b(0xd9b)])return;const _0x5554ff=this[_0x1ff44b(0xd9b)];await new Promise(_0x285c33=>{const _0x1df794=_0x1ff44b,_0x516c93=()=>_0x285c33();_0x5554ff[_0x1df794(0x1064)](_0x1df794(0x5e6),_0x516c93);try{_0x5554ff['send']({'type':'stop'},_0x18c344=>{if(_0x18c344)try{_0x5554ff['kill']();}catch{}});}catch{try{_0x5554ff[_0x1df794(0x10e4)]();}catch{}}setTimeout(()=>{const _0x3024=_0x1df794;try{_0x5554ff[_0x3024(0x10e4)]();}catch{}},this[_0x1df794(0x11e5)][_0x1df794(0xe86)]??0x1388);});for(const _0x437ad4 of this[_0x1ff44b(0x879)]?.[_0x1ff44b(0xd4f)]?.[_0x1ff44b(0xa3)]?.[_0x1ff44b(0x231)]?.()??[]){try{_0x437ad4?.['refreshReadTxn']?.();}catch{}}this[_0x1ff44b(0xd9b)]=null;}['_childWorkerOptions'](){const _0x4ce68e=_0x43582c,{exportName:_0x29bcb1,export:_0x5ebfe9,stopTimeout:_0x980e0,..._0x32601a}=this[_0x4ce68e(0x11e5)]||{};return _0x32601a;}[_0x43582c(0x38a)](_0x3a9cd3){const _0x302b2b=_0x43582c;if(!_0x3a9cd3)return new Error(_0x302b2b(0xddf));const _0x2dd3ac=new Error(_0x3a9cd3[_0x302b2b(0xb4e)]||String(_0x3a9cd3));if(_0x3a9cd3[_0x302b2b(0x56e)])_0x2dd3ac[_0x302b2b(0x56e)]=_0x3a9cd3['stack'];if(_0x3a9cd3[_0x302b2b(0x1f8)])_0x2dd3ac[_0x302b2b(0x1f8)]=_0x3a9cd3[_0x302b2b(0x1f8)];return _0x2dd3ac;}},okdbQueueSpawnedWorker;}var okdbQueueStats,hasRequiredOkdbQueueStats;function requireOkdbQueueStats(){const _0xd8283=_0xef8cd8;if(hasRequiredOkdbQueueStats)return okdbQueueStats;hasRequiredOkdbQueueStats=0x1;const {STATUS:_0xf7d5aa}=requireOkdbQueueValidate(),{OKDBVersionMismatchError:_0xe1d57a}=requireOkdbError(),_0x4121db=_0xd8283(0x782),_0x209957='global';function _0x1afd3b(_0x304312=Date[_0xd8283(0x555)]()){const _0x1250bc=_0xd8283;return{'id':_0x209957,'updated':_0x304312,'total':0x0,'byStatus':{[_0xf7d5aa[_0x1250bc(0x11d0)]]:0x0,[_0xf7d5aa[_0x1250bc(0xcbc)]]:0x0,[_0xf7d5aa[_0x1250bc(0x110a)]]:0x0,[_0xf7d5aa[_0x1250bc(0x1f2)]]:0x0},'byType':{}};}function _0x2b920e(_0x4087fc,_0x575168){const _0x58ed99=_0xd8283;return!_0x4087fc[_0x58ed99(0xe4a)][_0x575168]&&(_0x4087fc[_0x58ed99(0xe4a)][_0x575168]={'total':0x0,'byStatus':{[_0xf7d5aa['PENDING']]:0x0,[_0xf7d5aa[_0x58ed99(0xcbc)]]:0x0,[_0xf7d5aa[_0x58ed99(0x110a)]]:0x0,[_0xf7d5aa['FAILED']]:0x0}}),_0x4087fc[_0x58ed99(0xe4a)][_0x575168];}function _0x1edfb7(_0x35ea27){const _0x4f70c0=_0xd8283;_0x35ea27=Number(_0x35ea27||0x0);if(!Number[_0x4f70c0(0x2b5)](_0x35ea27))return 0x0;return _0x35ea27<0x0?0x0:Math[_0x4f70c0(0xcc)](_0x35ea27);}return okdbQueueStats=class _0x3c19f6{constructor(_0x5635a7,_0x2ab723={}){this['okdb']=_0x5635a7,this['options']={'auto_prune_types':!![],..._0x2ab723};}get['type'](){return _0x4121db;}async[_0xd8283(0xfc8)](){const _0x4f274f=_0xd8283;!this[_0x4f274f(0x30b)]['hasType'](_0x4121db)&&await this['env']['registerType'](_0x4121db);const _0x1f72b8=this['env'][_0x4f274f(0xa57)](_0x4121db,_0x209957);!_0x1f72b8&&await this['env'][_0x4f274f(0x92c)](_0x4121db,_0x209957,_0x1afd3b());}[_0xd8283(0x1055)](){const _0xa62927=_0xd8283;if(!this[_0xa62927(0x30b)][_0xa62927(0x7c0)](_0x4121db))return null;return this[_0xa62927(0x30b)]['get'](_0x4121db,_0x209957)||null;}async['rebuildFromJobs'](_0x4603ab,_0xf6d91c){const _0x1770f2=_0xd8283;await this[_0x1770f2(0xfc8)]();const _0x485348=_0x1afd3b();for(const _0x272b16 of _0xf6d91c){const _0x36e2c0=_0x272b16?.[_0x1770f2(0x568)];if(!_0x36e2c0)continue;const _0x29cd5a=String(_0x36e2c0[_0x1770f2(0xaee)]||''),_0x301e87=_0x36e2c0[_0x1770f2(0xfcd)];if(!_0x29cd5a)continue;if(!_0x485348[_0x1770f2(0xb51)][_0x301e87]&&_0x485348[_0x1770f2(0xb51)][_0x301e87]!==0x0)continue;_0x485348[_0x1770f2(0x8bd)]++,_0x485348[_0x1770f2(0xb51)][_0x301e87]++;const _0x5f0640=_0x2b920e(_0x485348,_0x29cd5a);_0x5f0640[_0x1770f2(0x8bd)]++,_0x5f0640['byStatus'][_0x301e87]++;}const _0x36f087=this[_0x1770f2(0x30b)][_0x1770f2(0xa57)](_0x4121db,_0x209957);return!_0x36f087?await this['env']['put'](_0x4121db,_0x209957,_0x485348):await this[_0x1770f2(0x30b)][_0x1770f2(0xbb7)](_0x4121db,_0x209957,_0x485348,{'ifVersion':_0x36f087[_0x1770f2(0x45c)]}),_0x485348;}async[_0xd8283(0xa56)](_0x202af3){const _0xe435df=_0xd8283;for(let _0x4fa1b0=0x0;_0x4fa1b0<0xa;_0x4fa1b0++){const _0x482010=this['env'][_0xe435df(0xa57)](_0x4121db,_0x209957),_0x204c32=_0x482010?.[_0xe435df(0x568)]||_0x1afd3b(),_0x45d730=_0x202af3(JSON[_0xe435df(0xdcd)](JSON[_0xe435df(0xf75)](_0x204c32)));_0x45d730['updated']=Date['now'](),_0x45d730['total']=_0x1edfb7(_0x45d730[_0xe435df(0x8bd)]),_0x45d730[_0xe435df(0xb51)]=_0x45d730[_0xe435df(0xb51)]||{};for(const _0x1aa3ba of Object[_0xe435df(0x231)](_0xf7d5aa)){_0x45d730[_0xe435df(0xb51)][_0x1aa3ba]=_0x1edfb7(_0x45d730['byStatus'][_0x1aa3ba]);}_0x45d730['byType']=_0x45d730[_0xe435df(0xe4a)]||{};for(const [_0x277c94,_0x1878dd]of Object[_0xe435df(0x1129)](_0x45d730['byType'])){_0x1878dd[_0xe435df(0x8bd)]=_0x1edfb7(_0x1878dd[_0xe435df(0x8bd)]),_0x1878dd[_0xe435df(0xb51)]=_0x1878dd[_0xe435df(0xb51)]||{};for(const _0xe478f1 of Object[_0xe435df(0x231)](_0xf7d5aa)){_0x1878dd[_0xe435df(0xb51)][_0xe478f1]=_0x1edfb7(_0x1878dd['byStatus'][_0xe478f1]);}this['options'][_0xe435df(0x3e7)]&&_0x1878dd[_0xe435df(0x8bd)]===0x0&&delete _0x45d730[_0xe435df(0xe4a)][_0x277c94];}try{return!_0x482010?await this[_0xe435df(0x30b)][_0xe435df(0x92c)](_0x4121db,_0x209957,_0x45d730):await this[_0xe435df(0x30b)]['update'](_0x4121db,_0x209957,_0x45d730,{'ifVersion':_0x482010[_0xe435df(0x45c)]}),_0x45d730;}catch(_0x39296b){if(_0x39296b instanceof _0xe1d57a)continue;throw _0x39296b;}}return null;}async[_0xd8283(0x704)](_0x1537a3){const _0x7889c1=_0xd8283,_0x7400cd=String(_0x1537a3?.[_0x7889c1(0xaee)]||''),_0x25fc55=_0x1537a3?.[_0x7889c1(0xfcd)];if(!_0x7400cd||!_0x25fc55)return;return this['_mutate'](_0x2491f4=>{const _0x3cd363=_0x7889c1;_0x2491f4['total']++,_0x2491f4[_0x3cd363(0xb51)][_0x25fc55]=(_0x2491f4[_0x3cd363(0xb51)][_0x25fc55]||0x0)+0x1;const _0x3292b4=_0x2b920e(_0x2491f4,_0x7400cd);return _0x3292b4['total']++,_0x3292b4['byStatus'][_0x25fc55]=(_0x3292b4[_0x3cd363(0xb51)][_0x25fc55]||0x0)+0x1,_0x2491f4;});}async[_0xd8283(0x8b2)](_0x497431){const _0x54a5da=_0xd8283,_0x5904c2=String(_0x497431?.[_0x54a5da(0xaee)]||''),_0x27c968=_0x497431?.[_0x54a5da(0xfcd)];if(!_0x5904c2||!_0x27c968)return;return this[_0x54a5da(0xa56)](_0x108315=>{const _0x494191=_0x54a5da;_0x108315[_0x494191(0x8bd)]--,_0x108315[_0x494191(0xb51)][_0x27c968]=(_0x108315[_0x494191(0xb51)][_0x27c968]||0x0)-0x1;const _0x4d886a=_0x2b920e(_0x108315,_0x5904c2);return _0x4d886a[_0x494191(0x8bd)]--,_0x4d886a[_0x494191(0xb51)][_0x27c968]=(_0x4d886a[_0x494191(0xb51)][_0x27c968]||0x0)-0x1,_0x108315;});}async[_0xd8283(0xe1b)](_0x5eb8a9){const _0x3014b7=_0xd8283;if(!_0x5eb8a9)return;return this[_0x3014b7(0xa56)](_0xd19c36=>{const _0x45b388=_0x3014b7;_0xd19c36[_0x45b388(0x8bd)]+=_0x5eb8a9[_0x45b388(0x8bd)]||0x0;for(const [_0x59a372,_0x26c22d]of Object['entries'](_0x5eb8a9[_0x45b388(0xb51)]||{})){_0xd19c36[_0x45b388(0xb51)][_0x59a372]=(_0xd19c36[_0x45b388(0xb51)][_0x59a372]||0x0)+_0x26c22d;}for(const [_0x1209eb,_0x3d8953]of Object[_0x45b388(0x1129)](_0x5eb8a9[_0x45b388(0xe4a)]||{})){const _0x6bdf62=_0x2b920e(_0xd19c36,_0x1209eb);_0x6bdf62[_0x45b388(0x8bd)]+=_0x3d8953[_0x45b388(0x8bd)]||0x0;for(const [_0x4b479c,_0x35f62e]of Object['entries'](_0x3d8953[_0x45b388(0xb51)]||{})){_0x6bdf62[_0x45b388(0xb51)][_0x4b479c]=(_0x6bdf62[_0x45b388(0xb51)][_0x4b479c]||0x0)+_0x35f62e;}}return _0xd19c36;});}async[_0xd8283(0xcc5)](_0x440185,_0x131bcd,_0x5f30a3){const _0x37ed8f=_0xd8283,_0x3187d3=String(_0x440185?.[_0x37ed8f(0xaee)]||'');if(!_0x3187d3||!_0x131bcd||!_0x5f30a3||_0x131bcd===_0x5f30a3)return;return this[_0x37ed8f(0xa56)](_0x3e223f=>{const _0x145528=_0x37ed8f;_0x3e223f['byStatus'][_0x131bcd]=(_0x3e223f['byStatus'][_0x131bcd]||0x0)-0x1,_0x3e223f[_0x145528(0xb51)][_0x5f30a3]=(_0x3e223f[_0x145528(0xb51)][_0x5f30a3]||0x0)+0x1;const _0x3d0ca7=_0x2b920e(_0x3e223f,_0x3187d3);return _0x3d0ca7['byStatus'][_0x131bcd]=(_0x3d0ca7[_0x145528(0xb51)][_0x131bcd]||0x0)-0x1,_0x3d0ca7['byStatus'][_0x5f30a3]=(_0x3d0ca7[_0x145528(0xb51)][_0x5f30a3]||0x0)+0x1,_0x3e223f;});}},okdbQueueStats;}var okdbQueue,hasRequiredOkdbQueue;function requireOkdbQueue(){const _0x77f610=_0xef8cd8;if(hasRequiredOkdbQueue)return okdbQueue;hasRequiredOkdbQueue=0x1;const _0x3fc96f=require$$0$3,{Cron:_0x511970}=require$$1$4,_0x44bf1f=requireOkdbQueueWorker(),_0x2ffc10=requireOkdbQueueSpawnedWorker(),_0x2e1067=requireOkdbQueueHttp(),_0x40c752=requireOkdbQueueStats(),{STATUS:_0x309f9f,JOB_TYPE_STATUS:_0x13c7c1,QUEUE_EVENTS:_0x3bffbf,clampInt:_0x53a6e0,asNullableString:_0x5eed13,normalizeTags:_0x31bf16,normalizeBucket:_0x371120,normalizeBuckets:_0x544efa,validateJobShape:_0x4d20ce,validateJobTypeShape:_0x5c0087,validateBucketShape:_0x10dda5}=requireOkdbQueueValidate(),_0xe9f584=_0x77f610(0x18f),_0x4c34a4=_0x77f610(0xbb1),_0x485f4c='~queue_buckets',_0x5842fd='~queue_job_types',{OKDBError:_0x37f744,OKDBVersionMismatchError:_0x47da5d}=requireOkdbError(),{validate:_0x2f0f69}=requireOkdbSchemaValidator(),_0x1936c0=require$$9;return okdbQueue=class _0x1375a5{constructor(_0x4b3b8d,_0x278239={}){const _0xd6be36=_0x77f610;this[_0xd6be36(0xd4f)]=_0x4b3b8d,this[_0xd6be36(0x9be)]=_0x4b3b8d[_0xd6be36(0x9be)]['child']({'feature':_0xd6be36(0x879)}),this['env']=_0x278239[_0xd6be36(0x308)]??_0x4b3b8d,this['options']={'default_ttl':0x7530,'claim_batch_limit':0x100,'reconcile_batch_limit':0x2710,'default_bucket_tokens':0x1,'default_max_tries':0x1,'default_retry_delay':0x0,'default_backoff_multiplier':0x1,'cron_next':null,'done_ttl':null,'failed_ttl':null,..._0x278239},this[_0xd6be36(0xea8)]=new _0x1936c0(),this[_0xd6be36(0xd72)]=new _0x40c752(_0x4b3b8d,_0x278239[_0xd6be36(0xd72)]),this['stats']['env']=this[_0xd6be36(0x30b)];if(!_0x278239['_skipHttp'])try{_0x2e1067(this);}catch{}this[_0xd6be36(0xc62)]=![],this[_0xd6be36(0x4aa)]=null,this[_0xd6be36(0xb18)]=new Set();}async[_0x77f610(0xd0d)](){const _0x50502b=_0x77f610;if(this[_0x50502b(0xc62)])return;return!this[_0x50502b(0x4aa)]&&(this[_0x50502b(0x4aa)]=((async()=>{const _0x29b006=_0x50502b;await this['_initTypes'](),await this[_0x29b006(0xd72)][_0x29b006(0xfc8)](),this[_0x29b006(0xc62)]=!![];})())),this[_0x50502b(0x4aa)];}async['_initTypes'](){const _0x21aca9=_0x77f610;await this[_0x21aca9(0x30b)][_0x21aca9(0x49a)](_0xe9f584,{'indexes':[[_0x21aca9(0xaee)],[_0x21aca9(0xfcd)],[_0x21aca9(0x5d9)],['status','when'],[_0x21aca9(0xfcd),_0x21aca9(0x534),_0x21aca9(0x5d9)],[_0x21aca9(0xaee),_0x21aca9(0xfcd)],['type','when'],['type',_0x21aca9(0xfcd),_0x21aca9(0x5d9)],[_0x21aca9(0xaee),'status','priority',_0x21aca9(0x5d9)],[_0x21aca9(0xfcd),'claim_expires'],[_0x21aca9(0x401),'status'],[_0x21aca9(0xd2a)],{'fields':[_0x21aca9(0xda9)],'unique':!![]}]}),await this[_0x21aca9(0x30b)][_0x21aca9(0x49a)](_0x4c34a4),await this[_0x21aca9(0x30b)][_0x21aca9(0x49a)](_0x485f4c),await this[_0x21aca9(0x30b)][_0x21aca9(0x49a)](_0x5842fd,{'indexes':[['status']]});}async['list']({type:type=null,status:status=null,bucket:_0x3c3346=null,tag:_0x4a47a8=null,sort:sort=_0x77f610(0x5d9),direction:direction=_0x77f610(0xfd1),limit:limit=0x32,cursor:cursor=null}={}){const _0x3ab3c4=_0x77f610;await this['_ensure']();const _0x163bdb=Math['max'](0x1,Math[_0x3ab3c4(0x2dc)](0x3e8,Number(limit)||0x32)),_0x16947e=direction===_0x3ab3c4(0xcdd);let _0x396a13,_0x778682=[];if(type&&status)_0x396a13=[_0x3ab3c4(0xaee),'status'],_0x778682=[type,status];else{if(status)_0x396a13=['status'],_0x778682=[status];else type?(_0x396a13=['type'],_0x778682=[type]):_0x396a13=[_0x3ab3c4(0xfcd)];}let _0x1dcb7f;sort===_0x3ab3c4(0x534)?_0x1dcb7f=[..._0x396a13,_0x3ab3c4(0x534),_0x3ab3c4(0x5d9)]:_0x1dcb7f=[..._0x396a13,'when'];const _0x3d3209={'index':_0x1dcb7f,'prefix':_0x778682[_0x3ab3c4(0x156)]?_0x778682:undefined,'reverse':_0x16947e,'limit':_0x163bdb};cursor&&(_0x3d3209[_0x3ab3c4(0x186)]=cursor);const _0x235314=[];for(const _0x206f2c of this[_0x3ab3c4(0x30b)][_0x3ab3c4(0xa28)](_0xe9f584,{},_0x3d3209)){_0x235314['push'](_0x206f2c);}let _0x242195=null;if(_0x235314['length']===_0x163bdb){const _0x338a34=_0x235314[_0x235314[_0x3ab3c4(0x156)]-0x1];_0x242195=_0x338a34[_0x3ab3c4(0x5d5)];}return{'items':_0x235314,'cursor':_0x242195};}[_0x77f610(0x738)](_0x51d425,_0x17274f,_0x44d4ad){const _0x3b3709=_0x77f610,_0x1c8e90=new _0x44bf1f(this,_0x51d425,_0x44d4ad);return _0x1c8e90[_0x3b3709(0xa00)](_0x17274f),this[_0x3b3709(0xb18)][_0x3b3709(0x33c)](_0x1c8e90),_0x1c8e90['_loopDone'][_0x3b3709(0x39e)](()=>this[_0x3b3709(0xb18)]['delete'](_0x1c8e90)),_0x1c8e90;}async[_0x77f610(0x112d)](_0x9d573b,_0x313d75={}){const _0xaf2e3d=_0x77f610;await this[_0xaf2e3d(0xd0d)]();if(typeof _0x9d573b!==_0xaf2e3d(0xf7a)||!_0x9d573b)throw new _0x37f744(_0xaf2e3d(0x464),_0xaf2e3d(0x10b5));return this[_0xaf2e3d(0x97)](_0x9d573b,_0x313d75);}async[_0x77f610(0x29a)](_0x13ac1a,_0x4b7445,_0x4b0987=null){const _0x213478=_0x77f610;await this[_0x213478(0xd0d)]();if(!_0x13ac1a)throw new _0x37f744('job\x20id\x20required',_0x213478(0x10b5));return await this[_0x213478(0x657)](_0x13ac1a,_0x4b7445,_0x4b0987),this[_0x213478(0xdf2)](_0x13ac1a);}async[_0x77f610(0xb04)](_0x56425f,_0x3c9fe9,_0x5e55f4=null){const _0x58a022=_0x77f610;return this[_0x58a022(0x29a)](_0x56425f,_0x3c9fe9,_0x5e55f4);}async[_0x77f610(0x710)](_0x591652,_0x5dd68d,_0x1faf19){const _0x4032ed=_0x77f610;await this[_0x4032ed(0xd0d)]();if(!_0x591652)throw new _0x37f744(_0x4032ed(0xd3d),'BAD_PARAM');return await this[_0x4032ed(0x10d1)](_0x591652,_0x5dd68d,_0x1faf19),this[_0x4032ed(0xdf2)](_0x591652);}async[_0x77f610(0xdd3)](_0xef4131,_0x40bbd7,_0x206d1e){const _0x2ddd20=_0x77f610;await this['_ensure']();if(!_0xef4131)throw new _0x37f744('job\x20id\x20required','BAD_PARAM');return await this[_0x2ddd20(0x807)](_0xef4131,_0x40bbd7,_0x206d1e),this[_0x2ddd20(0xdf2)](_0xef4131);}async[_0x77f610(0x1044)](_0x43ce39,_0x5c12d1,_0x257750){const _0xff575f=_0x77f610;return this[_0xff575f(0xdd3)](_0x43ce39,_0x5c12d1,_0x257750);}async[_0x77f610(0xf46)](_0x48e657,_0xafc6d5,_0x3b29de,_0x5bab41=_0x77f610(0x225)){const _0x4b3dd9=_0x77f610;await this[_0x4b3dd9(0xd0d)]();if(!_0x48e657)throw new _0x37f744(_0x4b3dd9(0xd3d),'BAD_PARAM');const _0x2f7b6c=await this['_markFail'](_0x48e657,_0xafc6d5,_0x3b29de,_0x5bab41),_0x1740e6=await this[_0x4b3dd9(0xdf2)](_0x48e657);return{'permanentlyFailed':_0x2f7b6c,'job':_0x1740e6};}async[_0x77f610(0x4cd)](_0x10e5d1,_0x3cc5e4,_0x105317,_0x264eef=_0x77f610(0x225)){return this['markJobFail'](_0x10e5d1,_0x3cc5e4,_0x105317,_0x264eef);}async['releaseClaim'](_0x4355ac,_0x3d4618,_0x22a265={}){await this['_ensure']();if(!_0x4355ac)throw new _0x37f744('job\x20id\x20required','BAD_PARAM');return this['_releaseClaim'](_0x4355ac,_0x3d4618,_0x22a265);}async[_0x77f610(0xd73)](_0x46d6ca,_0x2a2a46,_0x56d68b={}){const _0x338806=_0x77f610;await this[_0x338806(0xd0d)]();if(typeof _0x46d6ca!=='string'||!_0x46d6ca)throw new _0x37f744('spawn\x20requires\x20non-empty\x20type',_0x338806(0x304));if(typeof _0x2a2a46!==_0x338806(0xf7a)||!_0x2a2a46)throw new _0x37f744(_0x338806(0xe2c),_0x338806(0x304));const _0x265cf1=new _0x2ffc10(this,_0x46d6ca,_0x2a2a46,_0x56d68b);await _0x265cf1[_0x338806(0xa00)](),this[_0x338806(0xb18)][_0x338806(0x33c)](_0x265cf1);const _0x4b3023=_0x265cf1['stop'][_0x338806(0x10d5)](_0x265cf1);return _0x265cf1['stop']=async(..._0x46832a)=>{const _0x5e0b2a=_0x338806;try{return await _0x4b3023(..._0x46832a);}finally{this[_0x5e0b2a(0xb18)][_0x5e0b2a(0x3b3)](_0x265cf1);}},_0x265cf1;}async[_0x77f610(0x910)](_0x1fbeda=0x7530){const _0x11c0a3=_0x77f610,_0x129a05=[...this[_0x11c0a3(0xb18)]][_0x11c0a3(0x1166)](_0x1a4aa4=>_0x1a4aa4[_0x11c0a3(0x1fe)](_0x1fbeda));await Promise[_0x11c0a3(0x472)](_0x129a05);}async[_0x77f610(0xdf2)](_0x25c432){const _0x100049=_0x77f610;await this[_0x100049(0xd0d)]();if(!_0x25c432)throw new _0x37f744(_0x100049(0xd3d),_0x100049(0x10b5));const _0x4927e5=this[_0x100049(0x30b)][_0x100049(0xa57)](_0xe9f584,_0x25c432);if(!_0x4927e5)return null;return{..._0x4927e5[_0x100049(0x568)],'payload':this[_0x100049(0x30b)]['get'](_0x4c34a4,_0x25c432)};}async[_0x77f610(0x737)](_0xa3d126,_0x496f34={},_0x397127={}){const _0x52992b=_0x77f610;await this[_0x52992b(0xd0d)]();if(!_0xa3d126)throw new _0x37f744(_0x52992b(0xd3d),_0x52992b(0x10b5));const _0x47e9da=_0x397127[_0x52992b(0x3b0)]??null,_0x394056=this['env'][_0x52992b(0xa57)](_0xe9f584,_0xa3d126);if(!_0x394056)throw new _0x37f744('job\x20not\x20found:\x20'+_0xa3d126,_0x52992b(0xb7f));const _0x23c9eb=_0x394056[_0x52992b(0x568)],_0x2bcd2e=Date['now'](),_0xe7947={..._0x23c9eb,'updated':_0x2bcd2e};if(_0x52992b(0xaee)in _0x496f34){if(typeof _0x496f34['type']!==_0x52992b(0xf7a)||!_0x496f34['type'][_0x52992b(0xf4d)]())throw new _0x37f744(_0x52992b(0x1de),_0x52992b(0x10b5));_0xe7947[_0x52992b(0xaee)]=_0x496f34[_0x52992b(0xaee)][_0x52992b(0xf4d)]();}if('when'in _0x496f34)_0xe7947['when']=Number['isFinite'](Number(_0x496f34[_0x52992b(0x5d9)]))?Number(_0x496f34[_0x52992b(0x5d9)]):_0x2bcd2e;if(_0x52992b(0x534)in _0x496f34)_0xe7947['priority']=_0x53a6e0(_0x496f34[_0x52992b(0x534)],_0x23c9eb[_0x52992b(0x534)],-0xf4240,0xf4240);if(_0x52992b(0x35b)in _0x496f34){const _0x229717=_0x31bf16(_0x496f34[_0x52992b(0x35b)]);_0xe7947['tags']=_0x229717,_0xe7947[_0x52992b(0xd2a)]=_0x229717[0x0]??null;}if(_0x52992b(0x401)in _0x496f34||_0x52992b(0xfcb)in _0x496f34||_0x52992b(0xd70)in _0x496f34){if(_0x52992b(0xd70)in _0x496f34){const _0x4d39ce=_0x544efa(_0x496f34[_0x52992b(0xd70)]??[],this[_0x52992b(0x11e5)][_0x52992b(0x68f)]);_0xe7947[_0x52992b(0xd70)]=_0x4d39ce[_0x52992b(0x156)]?_0x4d39ce:null,_0xe7947[_0x52992b(0x401)]=null,_0xe7947[_0x52992b(0xfcb)]=null;}else{const _0x40b244=_0x52992b(0x401)in _0x496f34?_0x371120(_0x496f34[_0x52992b(0x401)]):_0x371120(_0x23c9eb[_0x52992b(0x401)]),_0x1557da=_0x53a6e0(_0x52992b(0xfcb)in _0x496f34?_0x496f34[_0x52992b(0xfcb)]:_0x23c9eb[_0x52992b(0xfcb)],_0x40b244?_0x23c9eb[_0x52992b(0xfcb)]??this[_0x52992b(0x11e5)][_0x52992b(0x68f)]:null,0x1,0xf4240);_0xe7947[_0x52992b(0x401)]=null,_0xe7947['bucket_tokens']=null,_0x40b244?_0xe7947[_0x52992b(0xd70)]=[{'id':_0x40b244,'tokens':_0x1557da??this[_0x52992b(0x11e5)][_0x52992b(0x68f)]}]:_0xe7947[_0x52992b(0xd70)]=null;}}if(_0x52992b(0x183)in _0x496f34)_0xe7947['cron']=_0x496f34[_0x52992b(0x183)]==null?null:String(_0x496f34[_0x52992b(0x183)]);'max_tries'in _0x496f34&&(_0xe7947['max_tries']=_0x496f34['max_tries']===null?null:_0x53a6e0(_0x496f34[_0x52992b(0x2e1)],_0x23c9eb[_0x52992b(0x2e1)],0x1,0xf4240));if('retry_delay'in _0x496f34)_0xe7947[_0x52992b(0x849)]=_0x53a6e0(_0x496f34['retry_delay'],_0x23c9eb[_0x52992b(0x849)],0x0,0x16d*0x18*0x36ee80);_0x52992b(0xded)in _0x496f34&&(_0xe7947['backoff_multiplier']=Number[_0x52992b(0x2b5)](Number(_0x496f34[_0x52992b(0xded)]))?Number(_0x496f34[_0x52992b(0xded)]):_0x23c9eb['backoff_multiplier']);if(_0x52992b(0x1bf)in _0x496f34)_0xe7947[_0x52992b(0x1bf)]=_0x5eed13(_0x496f34[_0x52992b(0x1bf)],0x400);if(_0x52992b(0xb97)in _0x496f34)_0xe7947[_0x52992b(0xb97)]=_0x5eed13(_0x496f34[_0x52992b(0xb97)],0x400);_0x4d20ce(_0xe7947);if(_0x47e9da){_0x47e9da[_0x52992b(0xbb7)](_0xe9f584,_0xa3d126,_0xe7947,{'ifVersion':_0x394056[_0x52992b(0x45c)]});if(_0x52992b(0x3c3)in _0x496f34){if(_0x496f34['payload']===undefined){if(this['env'][_0x52992b(0xa57)](_0x4c34a4,_0xa3d126))_0x47e9da[_0x52992b(0x21e)](_0x4c34a4,_0xa3d126);}else _0x47e9da[_0x52992b(0x92c)](_0x4c34a4,_0xa3d126,_0x496f34[_0x52992b(0x3c3)]);}}else{await this[_0x52992b(0x30b)][_0x52992b(0xbb7)](_0xe9f584,_0xa3d126,_0xe7947,{'ifVersion':_0x394056[_0x52992b(0x45c)]});if('payload'in _0x496f34){if(_0x496f34[_0x52992b(0x3c3)]===undefined)try{await this[_0x52992b(0x30b)][_0x52992b(0x21e)](_0x4c34a4,_0xa3d126);}catch{}else await this[_0x52992b(0x30b)][_0x52992b(0x92c)](_0x4c34a4,_0xa3d126,_0x496f34[_0x52992b(0x3c3)]);}}return{..._0xe7947,'payload':_0x52992b(0x3c3)in _0x496f34?_0x496f34[_0x52992b(0x3c3)]:this[_0x52992b(0x30b)]['get'](_0x4c34a4,_0xa3d126)};}async[_0x77f610(0xafa)](_0x498048,_0x36c720,_0x562fb2={}){const _0xe5bfd5=_0x77f610;await this[_0xe5bfd5(0xd0d)]();if(typeof _0x498048!==_0xe5bfd5(0xf7a)||!_0x498048)throw new _0x37f744(_0xe5bfd5(0xbe5),_0xe5bfd5(0xeae));let _0x2aad0f={};const _0x715195=this[_0xe5bfd5(0x30b)][_0xe5bfd5(0xbeb)](_0x5842fd,_0x498048);if(_0x715195){if(_0x715195[_0xe5bfd5(0xfcd)]===_0x13c7c1[_0xe5bfd5(0xb06)])throw new _0x37f744(_0xe5bfd5(0x8e7)+_0x498048+_0xe5bfd5(0xbc0),_0xe5bfd5(0x1013));_0x2aad0f=_0x715195[_0xe5bfd5(0xabb)]??{};if(_0x715195[_0xe5bfd5(0x3ea)]?.[_0xe5bfd5(0xcf0)]&&_0x715195[_0xe5bfd5(0x3ea)][_0xe5bfd5(0x83a)]){const {valid:_0x30ba4e,errors:_0x2046c0}=_0x2f0f69(_0x36c720,_0x715195[_0xe5bfd5(0x3ea)][_0xe5bfd5(0x83a)]);if(!_0x30ba4e){const _0x23cb85=_0x2046c0[_0xe5bfd5(0xc3c)](0x0,0x3)[_0xe5bfd5(0x1166)](_0x4cf004=>(_0x4cf004['path']||_0xe5bfd5(0x2ed))+':\x20'+_0x4cf004['message'])['join'](';\x20');throw new _0x37f744(_0xe5bfd5(0xa42)+_0x23cb85,_0xe5bfd5(0xa3d));}}}const _0x340910=_0x3fc96f[_0xe5bfd5(0xa91)](),_0x20dbb7=Date[_0xe5bfd5(0x555)](),_0x383dcc=_0x562fb2[_0xe5bfd5(0xda9)]!=null?String(_0x562fb2[_0xe5bfd5(0xda9)]):null;if(_0x383dcc)for(const _0x570a71 of this[_0xe5bfd5(0x30b)][_0xe5bfd5(0x22e)](_0xe9f584,['idempotency_key'],{'start':[_0x383dcc,null],'end':[_0x383dcc,'']})){const _0x37167f=_0x570a71[_0xe5bfd5(0x568)];if(_0x37167f[_0xe5bfd5(0xfcd)]===_0x309f9f[_0xe5bfd5(0x11d0)]||_0x37167f[_0xe5bfd5(0xfcd)]===_0x309f9f['RUNNING'])return _0x37167f['id'];}const _0x4b4def=_0x562fb2['cron']!=null?String(_0x562fb2[_0xe5bfd5(0x183)]):null,_0x9f686a=typeof _0x562fb2[_0xe5bfd5(0x5d9)]===_0xe5bfd5(0x9f0)?_0x562fb2[_0xe5bfd5(0x5d9)]:_0x4b4def?this[_0xe5bfd5(0xd7f)](_0x4b4def,_0x20dbb7):_0x20dbb7,_0x3796c7=_0x53a6e0(_0x562fb2[_0xe5bfd5(0x534)]??_0x2aad0f['priority'],0x0,-0xf4240,0xf4240),_0x32d1e0=_0x31bf16(_0x562fb2[_0xe5bfd5(0x35b)]);let _0x1e9c84;if(_0x562fb2[_0xe5bfd5(0xd70)]!=null)_0x1e9c84=_0x544efa(_0x562fb2[_0xe5bfd5(0xd70)],this[_0xe5bfd5(0x11e5)][_0xe5bfd5(0x68f)]);else{if(_0x562fb2[_0xe5bfd5(0x401)]){const _0x2a24f8=_0x371120(_0x562fb2[_0xe5bfd5(0x401)]);if(_0x2a24f8){const _0x35300d=_0x53a6e0(_0x562fb2[_0xe5bfd5(0xfcb)],this['options'][_0xe5bfd5(0x68f)],0x1,0xf4240);_0x1e9c84=[{'id':_0x2a24f8,'tokens':_0x35300d}];}else _0x1e9c84=[];}else _0x2aad0f['buckets']?.[_0xe5bfd5(0x156)]?_0x1e9c84=_0x2aad0f[_0xe5bfd5(0xd70)]:_0x1e9c84=[];}const _0x3fee65={'id':_0x340910,'type':_0x498048,'idempotency_key':_0x383dcc,'status':_0x309f9f[_0xe5bfd5(0x11d0)],'status_code':null,'status_message':null,'error_stack':null,'when':_0x9f686a,'priority':_0x3796c7,'tags':_0x32d1e0,'tag':_0x32d1e0[0x0]??null,'bucket':null,'bucket_tokens':null,'buckets':_0x1e9c84[_0xe5bfd5(0x156)]?_0x1e9c84:null,'cron':_0x562fb2[_0xe5bfd5(0x183)]!=null?String(_0x562fb2[_0xe5bfd5(0x183)]):null,'created':_0x20dbb7,'updated':_0x20dbb7,'finished':null,'tries':0x0,'max_tries':_0x53a6e0(_0x562fb2[_0xe5bfd5(0x2e1)]??_0x2aad0f[_0xe5bfd5(0x2e1)],this[_0xe5bfd5(0x11e5)][_0xe5bfd5(0xc3b)]??0x1,0x1,0xf4240),'retry_delay':_0x53a6e0(_0x562fb2[_0xe5bfd5(0x849)]??_0x2aad0f['retry_delay'],0x0,0x0,0x16d*0x18*0x36ee80),'backoff_multiplier':typeof(_0x562fb2['backoff_multiplier']??_0x2aad0f[_0xe5bfd5(0xded)])===_0xe5bfd5(0x9f0)?_0x562fb2[_0xe5bfd5(0xded)]??_0x2aad0f[_0xe5bfd5(0xded)]:0x1,'claim_id':null,'claim_expires':null,'done_ttl':_0x562fb2[_0xe5bfd5(0xc6b)]!==undefined?_0x53a6e0(_0x562fb2[_0xe5bfd5(0xc6b)],null,0x0,0x16d*0x18*0x36ee80):_0x2aad0f['done_ttl']!==undefined?_0x2aad0f[_0xe5bfd5(0xc6b)]:null,'failed_ttl':_0x562fb2[_0xe5bfd5(0x387)]!==undefined?_0x53a6e0(_0x562fb2[_0xe5bfd5(0x387)],null,0x0,0x16d*0x18*0x36ee80):_0x2aad0f[_0xe5bfd5(0x387)]!==undefined?_0x2aad0f['failed_ttl']:null};_0x4d20ce(_0x3fee65);const _0x5c1b09=_0x562fb2[_0xe5bfd5(0x3b0)]??null;_0x5c1b09?(_0x36c720!==undefined&&_0x5c1b09[_0xe5bfd5(0x92c)](_0x4c34a4,_0x340910,_0x36c720),_0x5c1b09['put'](_0xe9f584,_0x340910,_0x3fee65)):(_0x36c720!==undefined&&await this['env'][_0xe5bfd5(0x92c)](_0x4c34a4,_0x340910,_0x36c720),await this[_0xe5bfd5(0x30b)][_0xe5bfd5(0x92c)](_0xe9f584,_0x340910,_0x3fee65));try{await this[_0xe5bfd5(0xd72)][_0xe5bfd5(0x704)](_0x3fee65);}catch{}try{this['okdb'][_0xe5bfd5(0xea8)][_0xe5bfd5(0xf5d)](_0x3bffbf[_0xe5bfd5(0x103e)],{'id':_0x340910,'type':_0x498048,'when':_0x3fee65[_0xe5bfd5(0x5d9)],'priority':_0x3fee65[_0xe5bfd5(0x534)]});}catch{}return _0x340910;}async['removeJob'](_0x5387ec,_0x3d9427={}){const _0x48d4f7=_0x77f610;await this[_0x48d4f7(0xd0d)]();if(!_0x5387ec)throw new Error(_0x48d4f7(0xd3d));const _0x5e49e0=this[_0x48d4f7(0x30b)][_0x48d4f7(0xa57)](_0xe9f584,_0x5387ec);if(!_0x5e49e0)return![];const _0x2fe82e=_0x5e49e0[_0x48d4f7(0x568)],_0x3a215f=_0x3d9427[_0x48d4f7(0x3b0)]??null;if(_0x3a215f){_0x3a215f[_0x48d4f7(0x21e)](_0xe9f584,_0x5387ec);if(this[_0x48d4f7(0x30b)][_0x48d4f7(0xa57)](_0x4c34a4,_0x5387ec))_0x3a215f[_0x48d4f7(0x21e)](_0x4c34a4,_0x5387ec);return!![];}await this[_0x48d4f7(0x30b)][_0x48d4f7(0x21e)](_0xe9f584,_0x5387ec);try{await this[_0x48d4f7(0x30b)]['remove'](_0x4c34a4,_0x5387ec);}catch{}try{await this[_0x48d4f7(0xd72)]['onDelete'](_0x2fe82e);}catch{}try{this[_0x48d4f7(0xd4f)][_0x48d4f7(0xea8)]['emit'](_0x3bffbf[_0x48d4f7(0x4a1)],{'id':_0x5387ec,'type':_0x2fe82e[_0x48d4f7(0xaee)]});}catch{}return!![];}async[_0x77f610(0x29e)](_0xcb83e5,_0x2321fd={}){const _0x5c1d59=_0x77f610;await this[_0x5c1d59(0xd0d)]();const _0x440c5a=Date[_0x5c1d59(0x555)](),_0x5cf7e7=_0x371120(_0xcb83e5);if(!_0x5cf7e7)throw new Error('bucket\x20id\x20required');const _0x267931=_0x53a6e0(_0x2321fd['capacity'],0x0,0x0,0x3b9aca00),_0x3230e3=_0x53a6e0(_0x2321fd['tokens'],_0x267931,0x0,_0x267931),_0x30a9c6=_0x53a6e0(_0x2321fd[_0x5c1d59(0x75d)],0x0,0x0,0x3b9aca00),_0x572aa7=_0x53a6e0(_0x2321fd[_0x5c1d59(0xd62)],0x0,0x0,0x16d*0x18*0x36ee80),_0x65dd3d={'id':_0x5cf7e7,'tokens':_0x3230e3,'capacity':_0x267931,'refill_amount':_0x30a9c6,'refill_every':_0x572aa7,'updated':_0x440c5a};_0x10dda5(_0x65dd3d);const _0x4b1f0f=_0x2321fd[_0x5c1d59(0x3b0)]??null;_0x4b1f0f?_0x4b1f0f[_0x5c1d59(0x92c)](_0x485f4c,_0x5cf7e7,_0x65dd3d):await this[_0x5c1d59(0x30b)][_0x5c1d59(0x92c)](_0x485f4c,_0x5cf7e7,_0x65dd3d);}async['updateBucket'](_0x1a2007,_0xca0c44={}){const _0x3aafd0=_0x77f610;await this[_0x3aafd0(0xd0d)]();const _0x508a60=_0x371120(_0x1a2007);if(!_0x508a60)throw new Error(_0x3aafd0(0xd5b));const _0x417e9d=this[_0x3aafd0(0x30b)][_0x3aafd0(0xa57)](_0x485f4c,_0x508a60);if(!_0x417e9d)throw new Error(_0x3aafd0(0x24b)+_0x508a60);const _0x377310=_0x417e9d['value'],_0x5e98a4={..._0x377310};if(_0x3aafd0(0xd1e)in _0xca0c44)_0x5e98a4[_0x3aafd0(0xd1e)]=_0x53a6e0(_0xca0c44[_0x3aafd0(0xd1e)],_0x377310[_0x3aafd0(0xd1e)],0x0,0x3b9aca00);if('tokens'in _0xca0c44)_0x5e98a4[_0x3aafd0(0x3d7)]=_0x53a6e0(_0xca0c44[_0x3aafd0(0x3d7)],_0x377310[_0x3aafd0(0x3d7)],0x0,_0x5e98a4['capacity']);if(_0x3aafd0(0x75d)in _0xca0c44)_0x5e98a4[_0x3aafd0(0x75d)]=_0x53a6e0(_0xca0c44[_0x3aafd0(0x75d)],_0x377310[_0x3aafd0(0x75d)],0x0,0x3b9aca00);if(_0x3aafd0(0xd62)in _0xca0c44)_0x5e98a4[_0x3aafd0(0xd62)]=_0x53a6e0(_0xca0c44[_0x3aafd0(0xd62)],_0x377310[_0x3aafd0(0xd62)],0x0,0x16d*0x18*0x36ee80);if(_0x5e98a4[_0x3aafd0(0x3d7)]>_0x5e98a4[_0x3aafd0(0xd1e)])_0x5e98a4['tokens']=_0x5e98a4['capacity'];_0x10dda5(_0x5e98a4),await this[_0x3aafd0(0x30b)][_0x3aafd0(0xbb7)](_0x485f4c,_0x508a60,_0x5e98a4,_0x417e9d[_0x3aafd0(0x45c)]);}async[_0x77f610(0xbf0)](_0x1a4234){const _0x5e2bd1=_0x77f610;await this['_ensure']();const _0x9f2cd7=_0x371120(_0x1a4234);if(!_0x9f2cd7)throw new Error(_0x5e2bd1(0xd5b));await this['env'][_0x5e2bd1(0x21e)](_0x485f4c,_0x9f2cd7);}['getBucket'](_0x187512){const _0x1cea4e=_0x77f610,_0x5b6754=_0x371120(_0x187512);if(!_0x5b6754)return null;return this[_0x1cea4e(0x30b)][_0x1cea4e(0xbeb)](_0x485f4c,_0x5b6754);}[_0x77f610(0xdfd)](_0x3d88a6,_0x495c03){const _0x54206e=_0x77f610;if(!_0x3d88a6['refill_every']||!_0x3d88a6[_0x54206e(0x75d)])return _0x3d88a6;const _0x3c07a7=_0x495c03-_0x3d88a6[_0x54206e(0x965)];if(_0x3c07a7<_0x3d88a6[_0x54206e(0xd62)])return _0x3d88a6;const _0x5a903a=Math[_0x54206e(0xf9a)](_0x3c07a7/_0x3d88a6[_0x54206e(0xd62)]);if(_0x5a903a<=0x0)return _0x3d88a6;const _0x305407=_0x5a903a*_0x3d88a6['refill_amount'],_0x104484=Math[_0x54206e(0x2dc)](_0x3d88a6[_0x54206e(0xd1e)],_0x3d88a6[_0x54206e(0x3d7)]+_0x305407);return{..._0x3d88a6,'tokens':_0x104484,'updated':_0x3d88a6[_0x54206e(0x965)]+_0x5a903a*_0x3d88a6[_0x54206e(0xd62)]};}async[_0x77f610(0xe42)](_0x4dea0b,_0x1b8c55=0x1){const _0x5992e7=_0x77f610;await this['_ensure']();const _0x166b68=_0x371120(_0x4dea0b);if(!_0x166b68)throw new Error(_0x5992e7(0xd47));const _0x4043f1=_0x53a6e0(_0x1b8c55,0x1,0x1,0x3b9aca00);for(let _0x1c7186=0x0;_0x1c7186<0x5;_0x1c7186++){const _0x4e3d77=Date['now'](),_0x2319cc=this[_0x5992e7(0x30b)][_0x5992e7(0xa57)](_0x485f4c,_0x166b68);if(!_0x2319cc)return![];const _0x2fa8ef=this[_0x5992e7(0xdfd)](_0x2319cc[_0x5992e7(0x568)],_0x4e3d77);if(_0x2fa8ef['tokens']<_0x4043f1)return(_0x2fa8ef['updated']!==_0x2319cc['value']['updated']||_0x2fa8ef['tokens']!==_0x2319cc['value']['tokens'])&&(_0x10dda5(_0x2fa8ef),await this[_0x5992e7(0x30b)][_0x5992e7(0xbb7)](_0x485f4c,_0x166b68,_0x2fa8ef,{'ifVersion':_0x2319cc[_0x5992e7(0x45c)]})),![];const _0x302a6f={..._0x2fa8ef,'tokens':_0x2fa8ef[_0x5992e7(0x3d7)]-_0x4043f1};_0x10dda5(_0x302a6f);try{return await this['env']['update'](_0x485f4c,_0x166b68,_0x302a6f,{'ifVersion':_0x2319cc['version']}),!![];}catch(_0x386f5f){if(_0x386f5f instanceof _0x47da5d)continue;throw _0x386f5f;}}return![];}[_0x77f610(0x76f)](_0x62e360){const _0x5f1df8=_0x77f610;if(Array[_0x5f1df8(0x10f5)](_0x62e360[_0x5f1df8(0xd70)])&&_0x62e360[_0x5f1df8(0xd70)][_0x5f1df8(0x156)]>0x0)return _0x62e360['buckets'];if(_0x62e360[_0x5f1df8(0x401)])return[{'id':_0x62e360[_0x5f1df8(0x401)],'tokens':_0x62e360['bucket_tokens']??this[_0x5f1df8(0x11e5)][_0x5f1df8(0x68f)]}];return[];}async[_0x77f610(0x41c)](_0xe80658,_0x5492e7){const _0x1f6fbf=_0x77f610,_0xb62cb0=_0x371120(_0xe80658);if(!_0xb62cb0)return;const _0x43ddeb=Math[_0x1f6fbf(0x10bf)](0x1,Math[_0x1f6fbf(0xcc)](Number(_0x5492e7)||0x1));for(let _0x49f72d=0x0;_0x49f72d<0x5;_0x49f72d++){const _0xce2147=this[_0x1f6fbf(0x30b)][_0x1f6fbf(0xa57)](_0x485f4c,_0xb62cb0);if(!_0xce2147)return;const _0x3431fa=Date['now'](),_0x529a3b=this['_refillBucketNow'](_0xce2147['value'],_0x3431fa),_0x2db062={..._0x529a3b,'tokens':Math[_0x1f6fbf(0x2dc)](_0x529a3b[_0x1f6fbf(0xd1e)],_0x529a3b['tokens']+_0x43ddeb)};_0x10dda5(_0x2db062);try{await this[_0x1f6fbf(0x30b)][_0x1f6fbf(0xbb7)](_0x485f4c,_0xb62cb0,_0x2db062,{'ifVersion':_0xce2147[_0x1f6fbf(0x45c)]});return;}catch(_0x5cda36){if(_0x5cda36 instanceof _0x47da5d)continue;throw _0x5cda36;}}}async[_0x77f610(0x10f9)](_0x1b76f0,_0x521cf6={}){const _0x41675a=_0x77f610;await this['_ensure']();const _0x546c15=String(_0x1b76f0||'')['trim']();if(!_0x546c15)throw new _0x37f744(_0x41675a(0xb5b),'BAD_PARAM');const _0x5e45c3=Date[_0x41675a(0x555)](),_0x50bbc4=this[_0x41675a(0x30b)]['get'](_0x5842fd,_0x546c15),_0x45162b={},_0x507eae=_0x521cf6[_0x41675a(0xabb)]??{};if(_0x507eae[_0x41675a(0x2e1)]!==undefined)_0x45162b[_0x41675a(0x2e1)]=_0x507eae[_0x41675a(0x2e1)]!=null?_0x53a6e0(_0x507eae[_0x41675a(0x2e1)],0x1,0x1,0xf4240):null;if(_0x507eae[_0x41675a(0x849)]!==undefined)_0x45162b[_0x41675a(0x849)]=_0x53a6e0(_0x507eae[_0x41675a(0x849)],0x0,0x0,0x16d*0x18*0x36ee80);if(_0x507eae[_0x41675a(0xded)]!==undefined)_0x45162b[_0x41675a(0xded)]=typeof _0x507eae['backoff_multiplier']===_0x41675a(0x9f0)?_0x507eae[_0x41675a(0xded)]:null;if(_0x507eae['priority']!==undefined)_0x45162b['priority']=_0x53a6e0(_0x507eae[_0x41675a(0x534)],0x0,-0xf4240,0xf4240);if(_0x507eae[_0x41675a(0x347)]!==undefined)_0x45162b[_0x41675a(0x347)]=_0x507eae[_0x41675a(0x347)]!=null?_0x53a6e0(_0x507eae['ttl'],null,0x0,0x16d*0x18*0x36ee80):null;if(_0x507eae[_0x41675a(0xc6b)]!==undefined)_0x45162b[_0x41675a(0xc6b)]=_0x507eae[_0x41675a(0xc6b)]!=null?_0x53a6e0(_0x507eae['done_ttl'],null,0x0,0x16d*0x18*0x36ee80):null;if(_0x507eae['failed_ttl']!==undefined)_0x45162b[_0x41675a(0x387)]=_0x507eae['failed_ttl']!=null?_0x53a6e0(_0x507eae['failed_ttl'],null,0x0,0x16d*0x18*0x36ee80):null;if(_0x507eae['buckets']!==undefined)_0x45162b[_0x41675a(0xd70)]=_0x507eae[_0x41675a(0xd70)]!=null?_0x544efa(_0x507eae[_0x41675a(0xd70)],this[_0x41675a(0x11e5)][_0x41675a(0x68f)]):null;const _0x5d6e95=_0x521cf6['status']!=null?_0x521cf6[_0x41675a(0xfcd)]:_0x50bbc4?.[_0x41675a(0xfcd)]??_0x13c7c1[_0x41675a(0x116d)];if(!Object[_0x41675a(0x231)](_0x13c7c1)[_0x41675a(0x29c)](_0x5d6e95))throw new _0x37f744(_0x41675a(0xa7b)+_0x5d6e95,'BAD_PARAM');const _0x1fa62b={'id':_0x546c15,'status':_0x5d6e95,'max_concurrency':_0x521cf6[_0x41675a(0xd2d)]!=null?_0x53a6e0(_0x521cf6[_0x41675a(0xd2d)],null,0x1,0xf4240):_0x50bbc4?.[_0x41675a(0xd2d)]??null,'defaults':{..._0x50bbc4?.[_0x41675a(0xabb)]??{},..._0x45162b},'payload_schema':_0x50bbc4?.[_0x41675a(0x3ea)]??null,'created_at':_0x50bbc4?.[_0x41675a(0xaa)]??_0x5e45c3,'updated_at':_0x5e45c3};return _0x5c0087(_0x1fa62b),await this[_0x41675a(0x30b)][_0x41675a(0x92c)](_0x5842fd,_0x546c15,_0x1fa62b),_0x1fa62b;}async[_0x77f610(0xf93)](_0x411376){const _0x4bfdec=_0x77f610;return await this[_0x4bfdec(0xd0d)](),this[_0x4bfdec(0x30b)][_0x4bfdec(0xbeb)](_0x5842fd,String(_0x411376))??null;}async[_0x77f610(0x1081)](){const _0x325a4f=_0x77f610;await this['_ensure']();const _0x4425c6=[];for(const _0x4e8df3 of this[_0x325a4f(0x30b)][_0x325a4f(0xa28)](_0x5842fd,{},{})){_0x4425c6[_0x325a4f(0x597)](_0x4e8df3[_0x325a4f(0x568)]??_0x4e8df3);}return _0x4425c6[_0x325a4f(0x3f6)]((_0x57f739,_0x2d5615)=>String(_0x57f739['id'])[_0x325a4f(0x666)](String(_0x2d5615['id'])));}async[_0x77f610(0x115e)](_0x11a99c){const _0x5f100f=_0x77f610;await this[_0x5f100f(0xd0d)]();const _0x5ec290=String(_0x11a99c||'')[_0x5f100f(0xf4d)]();if(!_0x5ec290)throw new _0x37f744('job\x20type\x20id\x20required',_0x5f100f(0x10b5));const _0xac2471=this[_0x5f100f(0x30b)][_0x5f100f(0xbeb)](_0x5842fd,_0x5ec290);if(!_0xac2471)return![];return await this[_0x5f100f(0x30b)][_0x5f100f(0x21e)](_0x5842fd,_0x5ec290),!![];}async[_0x77f610(0x1032)](_0x17a87a,_0x116f97){const _0x489481=_0x77f610;await this[_0x489481(0xd0d)]();const _0x345315=String(_0x17a87a||'')[_0x489481(0xf4d)](),_0x5edeab=this[_0x489481(0x30b)][_0x489481(0xbeb)](_0x5842fd,_0x345315);if(!_0x5edeab)throw new _0x37f744(_0x489481(0xc76)+_0x345315,'NOT_FOUND');const _0x15081f={..._0x5edeab,'status':_0x116f97,'updated_at':Date['now']()};return _0x5c0087(_0x15081f),await this[_0x489481(0x30b)][_0x489481(0x92c)](_0x5842fd,_0x345315,_0x15081f),_0x15081f;}[_0x77f610(0xd41)](_0x489023){const _0x56749a=_0x77f610;return this[_0x56749a(0x1032)](_0x489023,_0x13c7c1[_0x56749a(0xdbe)]);}[_0x77f610(0x8fb)](_0x812f74){const _0x308fa6=_0x77f610;return this[_0x308fa6(0x1032)](_0x812f74,_0x13c7c1['ACTIVE']);}[_0x77f610(0x2a2)](_0x47aeb2){const _0x2be249=_0x77f610;return this['_setJobTypeStatus'](_0x47aeb2,_0x13c7c1[_0x2be249(0xb06)]);}async[_0x77f610(0x655)](_0x1da456,_0x6610e0,_0x4e638c=![]){const _0x2216c8=_0x77f610;await this['_ensure']();const _0x946569=String(_0x1da456||'')[_0x2216c8(0xf4d)](),_0x54c9a7=this['env'][_0x2216c8(0xbeb)](_0x5842fd,_0x946569);if(!_0x54c9a7)throw new _0x37f744('job\x20type\x20not\x20found:\x20'+_0x946569,_0x2216c8(0xb7f));const _0x2c45b8={..._0x54c9a7,'payload_schema':{'definition':_0x6610e0,'enforce':!!_0x4e638c},'updated_at':Date[_0x2216c8(0x555)]()};return _0x5c0087(_0x2c45b8),await this[_0x2216c8(0x30b)]['put'](_0x5842fd,_0x946569,_0x2c45b8),_0x2c45b8;}async[_0x77f610(0xf1e)](_0x3f2574){const _0x3a4c20=_0x77f610;await this[_0x3a4c20(0xd0d)]();const _0x225079=String(_0x3f2574||'')['trim'](),_0x4b9565=this[_0x3a4c20(0x30b)][_0x3a4c20(0xbeb)](_0x5842fd,_0x225079);if(!_0x4b9565)throw new _0x37f744('job\x20type\x20not\x20found:\x20'+_0x225079,_0x3a4c20(0xb7f));const _0x34a85a={..._0x4b9565,'payload_schema':null,'updated_at':Date[_0x3a4c20(0x555)]()};return _0x5c0087(_0x34a85a),await this['env']['put'](_0x5842fd,_0x225079,_0x34a85a),_0x34a85a;}async[_0x77f610(0xeb8)](_0x433fe9,_0x1008d3=0x32){const _0x394dc7=_0x77f610;await this[_0x394dc7(0xd0d)]();const _0x32628a=Math['max'](0x1,Math[_0x394dc7(0x2dc)](0x64,Number(_0x1008d3)||0x32)),_0x57412e=[];for(const _0x18b872 of this[_0x394dc7(0x30b)][_0x394dc7(0x22e)](_0xe9f584,['type'],{'start':[_0x433fe9],'end':[_0x433fe9],'reverse':!![],'limit':_0x32628a})){const _0x3202c4=this[_0x394dc7(0x30b)]['get'](_0x4c34a4,_0x18b872['key']);if(_0x3202c4!==undefined)_0x57412e['push'](_0x3202c4);}return _0x57412e;}[_0x77f610(0x988)](_0x5ac795,_0x1a46cd){const _0x29555e=_0x77f610;if(!_0x1a46cd||_0x1a46cd[_0x29555e(0x156)]===0x0)return!![];if(!Array['isArray'](_0x5ac795)||_0x5ac795[_0x29555e(0x156)]===0x0)return![];const _0x2661b8=new Set(_0x5ac795);for(const _0x3b5d82 of _0x1a46cd)if(!_0x2661b8['has'](_0x3b5d82))return![];return!![];}async[_0x77f610(0x97)](_0x328948,_0x1d19a6={}){const _0x2d5080=_0x77f610;await this[_0x2d5080(0xd0d)](),await this[_0x2d5080(0x3a0)]();const _0x1c12b2=Date[_0x2d5080(0x555)](),_0x42a267=this[_0x2d5080(0x30b)][_0x2d5080(0xbeb)](_0x5842fd,_0x328948);if(_0x42a267?.['status']===_0x13c7c1[_0x2d5080(0xdbe)])return null;if(_0x42a267?.[_0x2d5080(0xd2d)]!=null){let _0x39f4b0=0x0;for(const _0x315b0b of this['env']['byIndex'](_0xe9f584,['type','status'],{'start':[_0x328948,_0x309f9f[_0x2d5080(0xcbc)]],'end':[_0x328948,_0x309f9f[_0x2d5080(0xcbc)]]})){_0x39f4b0++;if(_0x39f4b0>=_0x42a267[_0x2d5080(0xd2d)])break;}if(_0x39f4b0>=_0x42a267['max_concurrency'])return null;}const _0x5cb3c0=_0x1d19a6[_0x2d5080(0x347)]??_0x42a267?.['defaults']?.['ttl']??this[_0x2d5080(0x11e5)][_0x2d5080(0x6b1)],_0x3b3451=_0x31bf16(_0x1d19a6[_0x2d5080(0x35b)]),_0x1ca257=_0x371120(_0x1d19a6[_0x2d5080(0x401)]),_0x1b6961=this['env'][_0x2d5080(0x22e)](_0xe9f584,['type',_0x2d5080(0xfcd),_0x2d5080(0x534),'when'],{'start':[_0x328948,_0x309f9f[_0x2d5080(0x11d0)],-Infinity,0x0],'end':[_0x328948,_0x309f9f[_0x2d5080(0x11d0)],Infinity,_0x1c12b2+0x1],'reverse':![],'limit':this['options'][_0x2d5080(0xe76)]});for(const _0x472565 of _0x1b6961){const _0xf440e4=_0x472565[_0x2d5080(0x568)];if(_0xf440e4[_0x2d5080(0xfcd)]!==_0x309f9f['PENDING'])continue;if(_0xf440e4[_0x2d5080(0x5d9)]>_0x1c12b2)continue;if(_0x3b3451[_0x2d5080(0x156)]&&!this[_0x2d5080(0x988)](_0xf440e4[_0x2d5080(0x35b)],_0x3b3451))continue;if(_0x1ca257&&_0xf440e4[_0x2d5080(0x401)]!==_0x1ca257)continue;const _0x1ffe89=this[_0x2d5080(0x76f)](_0xf440e4);if(_0x1ffe89[_0x2d5080(0x156)]>0x0){const _0x13eb0b=[];let _0x15f7a1=!![];for(const {id:_0x299f6d,tokens:_0x2c67fd}of _0x1ffe89){const _0x1f504d=await this['tryClaimTokens'](_0x299f6d,_0x2c67fd);if(_0x1f504d)_0x13eb0b[_0x2d5080(0x597)]({'id':_0x299f6d,'tokens':_0x2c67fd});else{_0x15f7a1=![];break;}}if(!_0x15f7a1){for(const {id:_0x146975,tokens:_0x98140d}of _0x13eb0b){await this[_0x2d5080(0x41c)](_0x146975,_0x98140d);}continue;}}const _0x4ed246=_0x3fc96f['randomUUID'](),_0x4ee324=_0x1c12b2+_0x5cb3c0,_0x21a3f9={..._0xf440e4,'status':_0x309f9f[_0x2d5080(0xcbc)],'status_code':null,'status_message':null,'error_stack':null,'tries':_0xf440e4[_0x2d5080(0x5ca)]+0x1,'updated':_0x1c12b2,'claim_id':_0x4ed246,'claim_expires':_0x4ee324};try{_0x4d20ce(_0x21a3f9),await this['env'][_0x2d5080(0xbb7)](_0xe9f584,_0x472565[_0x2d5080(0x9dd)],_0x21a3f9,{'ifVersion':_0x472565['version']});try{await this['stats'][_0x2d5080(0xcc5)](_0xf440e4,_0x309f9f[_0x2d5080(0x11d0)],_0x309f9f[_0x2d5080(0xcbc)]);}catch{}return{..._0x21a3f9,'payload':this[_0x2d5080(0x30b)]['get'](_0x4c34a4,_0x472565[_0x2d5080(0x9dd)])};}catch(_0x516a58){if(_0x516a58 instanceof _0x47da5d)continue;throw _0x516a58;}}return null;}async[_0x77f610(0x657)](_0x4d2ceb,_0x5b1c10,_0x7678d9=null){const _0x23a33d=_0x77f610;if(!_0x5b1c10)throw new Error(_0x23a33d(0x1223));const _0x533426=Date[_0x23a33d(0x555)](),_0x234647=_0x7678d9??this[_0x23a33d(0x11e5)][_0x23a33d(0x6b1)],_0x312f06=this[_0x23a33d(0x30b)][_0x23a33d(0xa57)](_0xe9f584,_0x4d2ceb);if(!_0x312f06)return;const _0x964c8f=_0x312f06[_0x23a33d(0x568)];if(_0x964c8f['status']!==_0x309f9f['RUNNING'])return;if(_0x964c8f[_0x23a33d(0xc82)]!==_0x5b1c10)return;const _0x3ab54e={..._0x964c8f,'updated':_0x533426,'claim_expires':_0x533426+_0x234647};_0x4d20ce(_0x3ab54e),await this['env'][_0x23a33d(0xbb7)](_0xe9f584,_0x4d2ceb,_0x3ab54e,{'ifVersion':_0x312f06[_0x23a33d(0x45c)]});}async[_0x77f610(0x880)](_0x1d7d07,_0xaea488,_0x112b8d={}){const _0x24cbd6=_0x77f610;if(!_0xaea488)throw new _0x37f744(_0x24cbd6(0x8b8),_0x24cbd6(0x10b5));const _0x2f9e36=_0x112b8d[_0x24cbd6(0x5d9)]??Date[_0x24cbd6(0x555)](),_0x486f5c=this['env']['getEntry'](_0xe9f584,_0x1d7d07);if(!_0x486f5c)return![];const _0x185030=_0x486f5c['value'];if(_0x185030[_0x24cbd6(0xfcd)]!==_0x309f9f[_0x24cbd6(0xcbc)])return![];if(_0x185030[_0x24cbd6(0xc82)]!==_0xaea488)return![];const _0x49b0b1={..._0x185030,'status':_0x309f9f[_0x24cbd6(0x11d0)],'status_code':_0x112b8d[_0x24cbd6(0xeda)]??_0x24cbd6(0xf68),'status_message':null,'error_stack':null,'when':_0x2f9e36,'updated':_0x2f9e36,'tries':Math[_0x24cbd6(0x10bf)](0x0,(_0x185030[_0x24cbd6(0x5ca)]??0x0)-(_0x112b8d['keepTry']===!![]?0x0:0x1)),'claim_id':null,'claim_expires':null};_0x4d20ce(_0x49b0b1),await this[_0x24cbd6(0x30b)][_0x24cbd6(0xbb7)](_0xe9f584,_0x1d7d07,_0x49b0b1,{'ifVersion':_0x486f5c[_0x24cbd6(0x45c)]});try{await this[_0x24cbd6(0xd72)]['onTransition'](_0x185030,_0x309f9f[_0x24cbd6(0xcbc)],_0x309f9f[_0x24cbd6(0x11d0)]);}catch{}try{this[_0x24cbd6(0xd4f)][_0x24cbd6(0xea8)][_0x24cbd6(0xf5d)](_0x3bffbf[_0x24cbd6(0x1023)],{'count':0x1,'id':_0x1d7d07,'type':_0x185030[_0x24cbd6(0xaee)],'reason':_0x49b0b1[_0x24cbd6(0xb90)]});}catch{}return!![];}async[_0x77f610(0x3a0)](_0x1392a1=null){const _0x18691f=_0x77f610,_0x5be124=Date[_0x18691f(0x555)](),_0xb23e82=_0x53a6e0(_0x1392a1,this[_0x18691f(0x11e5)][_0x18691f(0x305)],0x1,0xf4240),_0x59c835=this[_0x18691f(0x30b)][_0x18691f(0x22e)](_0xe9f584,[_0x18691f(0xfcd),'claim_expires'],{'start':[_0x309f9f[_0x18691f(0xcbc)],0x0],'end':[_0x309f9f['RUNNING'],_0x5be124],'limit':_0xb23e82});let _0x1ddd0a=0x0;for(const _0x465e6b of _0x59c835){const _0xc39c56=_0x465e6b[_0x18691f(0x568)];if(!_0xc39c56[_0x18691f(0xd5a)]||_0xc39c56[_0x18691f(0xd5a)]>_0x5be124)continue;try{const _0x3be72e={..._0xc39c56,'status':_0x309f9f['FAILED'],'status_code':_0x18691f(0x44f),'status_message':'Job\x20claim\x20expired\x20—\x20process\x20may\x20have\x20crashed\x20(SIGKILL)','error_stack':null,'finished':_0x5be124,'updated':_0x5be124,'claim_id':null,'claim_expires':null};_0x4d20ce(_0x3be72e),await this[_0x18691f(0x30b)][_0x18691f(0xbb7)](_0xe9f584,_0x465e6b['key'],_0x3be72e,{'ifVersion':_0x465e6b[_0x18691f(0x45c)]});try{await this[_0x18691f(0xd72)][_0x18691f(0xcc5)](_0xc39c56,_0x309f9f[_0x18691f(0xcbc)],_0x309f9f[_0x18691f(0x1f2)]);}catch{}_0x1ddd0a++;}catch{continue;}}if(_0x1ddd0a>0x0)try{this[_0x18691f(0xd4f)][_0x18691f(0xea8)][_0x18691f(0xf5d)](_0x3bffbf[_0x18691f(0x1023)],{'count':_0x1ddd0a});}catch{}}[_0x77f610(0xdec)](_0x27983d){const _0x4b63a7=_0x77f610,_0x303ace=_0x27983d[_0x4b63a7(0x2e1)]===undefined?this[_0x4b63a7(0x11e5)][_0x4b63a7(0xc3b)]:_0x27983d[_0x4b63a7(0x2e1)],_0xab6369=_0x27983d[_0x4b63a7(0x849)]===undefined?this['options'][_0x4b63a7(0x2e7)]:_0x27983d[_0x4b63a7(0x849)],_0x426231=_0x27983d[_0x4b63a7(0xded)]===undefined?this['options'][_0x4b63a7(0x3ad)]:_0x27983d['backoff_multiplier'];return{'max_tries':_0x303ace===null?null:_0x53a6e0(_0x303ace,this['options'][_0x4b63a7(0xc3b)],0x0,0xf4240),'retry_delay':_0x53a6e0(_0xab6369,this[_0x4b63a7(0x11e5)]['default_retry_delay'],0x0,0x16d*0x18*0x36ee80),'backoff_multiplier':Number['isFinite'](Number(_0x426231))?Number(_0x426231):0x1};}[_0x77f610(0x414)](_0x3090a2,_0x3b18a7){const _0xee518=_0x77f610,{retry_delay:_0x33a2e7,backoff_multiplier:_0x1c6f98}=this[_0xee518(0xdec)](_0x3090a2),_0x3cd4e8=Math[_0xee518(0x10bf)](0x0,(_0x3090a2[_0xee518(0x5ca)]||0x0)-0x1),_0x8afa49=Math['pow'](_0x1c6f98,_0x3cd4e8);return _0x3b18a7+Math[_0xee518(0xf9a)](_0x33a2e7*_0x8afa49);}['_shouldRetry'](_0xd99472){const {max_tries:_0x35819c}=this['_getRetryConfig'](_0xd99472);if(_0x35819c==null)return!![];return(_0xd99472['tries']||0x0)<_0x35819c;}[_0x77f610(0xd7f)](_0x3cc312,_0x119ba0){const _0x97d728=_0x77f610,_0x244fe3=this[_0x97d728(0x11e5)][_0x97d728(0x121a)];if(typeof _0x244fe3===_0x97d728(0x63b)){const _0xf2733f=_0x244fe3(_0x3cc312,_0x119ba0);if(typeof _0xf2733f!==_0x97d728(0x9f0)||!Number[_0x97d728(0x2b5)](_0xf2733f))throw new Error(_0x97d728(0xfea));return _0xf2733f;}try{const _0x4c2134=new _0x511970(_0x3cc312),_0x435fa0=_0x4c2134[_0x97d728(0xac2)](new Date(_0x119ba0));if(!_0x435fa0)throw new Error(_0x97d728(0x98f));return _0x435fa0[_0x97d728(0x83f)]();}catch(_0x1090b8){throw new Error(_0x97d728(0xcfa)+_0x3cc312+_0x97d728(0x449)+_0x1090b8[_0x97d728(0xb4e)]);}}async[_0x77f610(0x807)](_0x38425e,_0x40a301=null){const _0x28737d=_0x77f610,_0x977af0=Date['now'](),_0x15e4f9=this['env']['getEntry'](_0xe9f584,_0x38425e);if(!_0x15e4f9)return;const _0x19029d=_0x15e4f9[_0x28737d(0x568)];if(_0x19029d['status']!==_0x309f9f[_0x28737d(0xcbc)])throw new _0x37f744(_0x28737d(0xe67)+_0x38425e,_0x28737d(0xe5e));if(_0x40a301!=null&&_0x19029d[_0x28737d(0xc82)]!==_0x40a301)throw new _0x37f744(_0x28737d(0x181)+_0x38425e,_0x28737d(0x11a5));const _0x583086={..._0x19029d,'status':_0x309f9f[_0x28737d(0x110a)],'status_code':'ok','status_message':null,'error_stack':null,'finished':_0x977af0,'updated':_0x977af0,'claim_id':null,'claim_expires':null,'idempotency_key':null};_0x4d20ce(_0x583086),await this[_0x28737d(0x30b)][_0x28737d(0xbb7)](_0xe9f584,_0x38425e,_0x583086,{'ifVersion':_0x15e4f9[_0x28737d(0x45c)]});try{await this[_0x28737d(0xd72)]['onTransition'](_0x19029d,_0x309f9f[_0x28737d(0xcbc)],_0x309f9f['DONE']);}catch{}try{this[_0x28737d(0xd4f)][_0x28737d(0xea8)][_0x28737d(0xf5d)](_0x3bffbf[_0x28737d(0x110a)],{'id':_0x38425e,'type':_0x19029d[_0x28737d(0xaee)]});}catch{}if(_0x19029d[_0x28737d(0x183)]){try{const _0x28f328=this[_0x28737d(0xd7f)](_0x19029d[_0x28737d(0x183)],_0x977af0),_0xbe59d0={..._0x583086,'status':_0x309f9f[_0x28737d(0x11d0)],'status_code':null,'status_message':null,'error_stack':null,'when':_0x28f328,'updated':_0x977af0,'finished':null,'claim_id':null,'claim_expires':null,'tries':0x0};_0x4d20ce(_0xbe59d0),await this['env'][_0x28737d(0xbb7)](_0xe9f584,_0x38425e,_0xbe59d0);try{await this['stats'][_0x28737d(0xcc5)](_0x583086,_0x309f9f[_0x28737d(0x110a)],_0x309f9f['PENDING']);}catch{}}catch(_0x32b7c9){try{this[_0x28737d(0x9be)]?.[_0x28737d(0xf78)]?.(_0x28737d(0xb08),{'id':_0x38425e,'error':_0x32b7c9?.['message']});}catch{}}return;}const _0x5313e7=_0x583086[_0x28737d(0xc6b)]??this[_0x28737d(0x11e5)][_0x28737d(0xc6b)]??null;await this[_0x28737d(0xe7a)](_0x38425e,_0x5313e7);}async[_0x77f610(0xe3f)](_0x1d7e78,_0x365cdf,_0x24892f,_0x294862=_0x77f610(0x225)){const _0x2ea9ea=_0x77f610,_0x1ca063=Date['now'](),_0x4e1e2a=this[_0x2ea9ea(0x30b)][_0x2ea9ea(0xa57)](_0xe9f584,_0x1d7e78);if(!_0x4e1e2a)return![];const _0x2ce3ca=_0x4e1e2a[_0x2ea9ea(0x568)];if(_0x2ce3ca[_0x2ea9ea(0xfcd)]!==_0x309f9f['RUNNING'])throw new _0x37f744('job\x20is\x20not\x20running:\x20'+_0x1d7e78,_0x2ea9ea(0xe5e));if(_0x365cdf!=null&&_0x2ce3ca[_0x2ea9ea(0xc82)]!==_0x365cdf)throw new _0x37f744(_0x2ea9ea(0x181)+_0x1d7e78,_0x2ea9ea(0x11a5));const _0x5d5cb3=_0x2ce3ca[_0x2ea9ea(0x5ca)]<_0x2ce3ca[_0x2ea9ea(0x2e1)];if(_0x5d5cb3){const _0x1ea125=_0x2ce3ca[_0x2ea9ea(0x849)]||0x0,_0x2f5919=_0x2ce3ca['backoff_multiplier']||0x1,_0x3273ae=Math[_0x2ea9ea(0xf9a)](_0x1ea125*Math[_0x2ea9ea(0x11c)](_0x2f5919,Math['max'](0x0,_0x2ce3ca['tries']-0x1))),_0x1778ca={..._0x2ce3ca,'status':_0x309f9f[_0x2ea9ea(0x11d0)],'status_code':_0x2ea9ea(0x1116),'status_message':null,'error_stack':null,'when':_0x1ca063+_0x3273ae,'updated':_0x1ca063,'claim_id':null,'claim_expires':null};_0x4d20ce(_0x1778ca),await this[_0x2ea9ea(0x30b)]['update'](_0xe9f584,_0x1d7e78,_0x1778ca,{'ifVersion':_0x4e1e2a[_0x2ea9ea(0x45c)]});try{await this[_0x2ea9ea(0xd72)]['onTransition'](_0x2ce3ca,_0x309f9f['RUNNING'],_0x309f9f['PENDING']);}catch{}try{this[_0x2ea9ea(0xd4f)]['events'][_0x2ea9ea(0xf5d)](_0x3bffbf[_0x2ea9ea(0x11a2)],{'id':_0x1d7e78,'type':_0x2ce3ca[_0x2ea9ea(0xaee)],'tries':_0x1778ca[_0x2ea9ea(0x5ca)]});}catch{}try{this[_0x2ea9ea(0x9be)][_0x2ea9ea(0xf78)](_0x2ea9ea(0x32b),{'id':_0x1d7e78,'type':_0x2ce3ca[_0x2ea9ea(0xaee)],'tries':_0x1778ca[_0x2ea9ea(0x5ca)],'error':_0x24892f?.['message']});}catch{}return![];}const _0x7a0a9a={..._0x2ce3ca,'status':_0x309f9f[_0x2ea9ea(0x1f2)],'status_code':_0x294862,'status_message':_0x24892f?.[_0x2ea9ea(0xb4e)]?String(_0x24892f[_0x2ea9ea(0xb4e)])['slice'](0x0,0x400):String(_0x24892f)['slice'](0x0,0x400),'error_stack':this[_0x2ea9ea(0x11e5)][_0x2ea9ea(0xda5)]&&_0x24892f?.['stack']?String(_0x24892f[_0x2ea9ea(0x56e)])['slice'](0x0,0x2000):null,'finished':_0x1ca063,'updated':_0x1ca063,'claim_id':null,'claim_expires':null,'idempotency_key':null};_0x4d20ce(_0x7a0a9a),await this[_0x2ea9ea(0x30b)][_0x2ea9ea(0xbb7)](_0xe9f584,_0x1d7e78,_0x7a0a9a,{'ifVersion':_0x4e1e2a[_0x2ea9ea(0x45c)]});try{await this[_0x2ea9ea(0xd72)][_0x2ea9ea(0xcc5)](_0x2ce3ca,_0x309f9f[_0x2ea9ea(0xcbc)],_0x309f9f['FAILED']);}catch{}try{this['okdb'][_0x2ea9ea(0xea8)][_0x2ea9ea(0xf5d)](_0x3bffbf[_0x2ea9ea(0x1f2)],{'id':_0x1d7e78,'type':_0x2ce3ca[_0x2ea9ea(0xaee)],'status_code':_0x294862});}catch{}try{this['log']['error'](_0x2ea9ea(0x7bf),{'id':_0x1d7e78,'type':_0x2ce3ca[_0x2ea9ea(0xaee)],'error':_0x24892f?.['message']});}catch{}const _0x21d1fa=_0x7a0a9a[_0x2ea9ea(0x387)]??this['options'][_0x2ea9ea(0x387)]??null;return await this[_0x2ea9ea(0xe7a)](_0x1d7e78,_0x21d1fa),!![];}async[_0x77f610(0x8bb)](_0x47ec70){const _0x54ed64=_0x77f610;await this[_0x54ed64(0xd0d)]();if(!_0x47ec70)throw new _0x37f744(_0x54ed64(0xd3d),_0x54ed64(0x10b5));const _0xb40463=this['env']['getEntry'](_0xe9f584,_0x47ec70);if(!_0xb40463)throw new _0x37f744('job\x20not\x20found:\x20'+_0x47ec70,'NOT_FOUND');const _0x2e7a14=_0xb40463[_0x54ed64(0x568)];if(_0x2e7a14[_0x54ed64(0xfcd)]!==_0x309f9f[_0x54ed64(0x11d0)]&&_0x2e7a14['status']!==_0x309f9f[_0x54ed64(0xcbc)]){const _0xe9f22f=new _0x37f744(_0x54ed64(0x396)+_0x2e7a14[_0x54ed64(0xfcd)]+'\x22',_0x54ed64(0x1bc));_0xe9f22f[_0x54ed64(0xfcd)]=0x190;throw _0xe9f22f;}const _0x45e89f=Date[_0x54ed64(0x555)](),_0x3e7cb8={..._0x2e7a14,'status':_0x309f9f['FAILED'],'status_code':_0x54ed64(0x571),'status_message':_0x54ed64(0x6f3),'finished':_0x45e89f,'updated':_0x45e89f,'claim_id':null,'claim_expires':null};_0x4d20ce(_0x3e7cb8),await this['env'][_0x54ed64(0xbb7)](_0xe9f584,_0x47ec70,_0x3e7cb8,{'ifVersion':_0xb40463['version']});try{await this['stats'][_0x54ed64(0xcc5)](_0x2e7a14,_0x2e7a14[_0x54ed64(0xfcd)],_0x309f9f[_0x54ed64(0x1f2)]);}catch{}try{this[_0x54ed64(0xd4f)][_0x54ed64(0xea8)][_0x54ed64(0xf5d)](_0x3bffbf[_0x54ed64(0x1f2)],{'id':_0x47ec70,'type':_0x2e7a14[_0x54ed64(0xaee)]});}catch{}return _0x3e7cb8;}async['retryJob'](_0x4adb7a){const _0x6f61b5=_0x77f610;await this[_0x6f61b5(0xd0d)]();if(!_0x4adb7a)throw new _0x37f744(_0x6f61b5(0xd3d),_0x6f61b5(0x10b5));const _0x409371=this[_0x6f61b5(0x30b)][_0x6f61b5(0xa57)](_0xe9f584,_0x4adb7a);if(!_0x409371)throw new _0x37f744(_0x6f61b5(0xfc3)+_0x4adb7a,_0x6f61b5(0xb7f));const _0x1ac595=_0x409371[_0x6f61b5(0x568)],_0x240b2a=Date[_0x6f61b5(0x555)](),_0x431a11={..._0x1ac595,'status':_0x309f9f[_0x6f61b5(0x11d0)],'status_code':'manual_retry','status_message':null,'error_stack':null,'when':_0x240b2a,'updated':_0x240b2a,'finished':null,'tries':0x0,'claim_id':null,'claim_expires':null};_0x4d20ce(_0x431a11),await this[_0x6f61b5(0x30b)][_0x6f61b5(0xbb7)](_0xe9f584,_0x4adb7a,_0x431a11,{'ifVersion':_0x409371[_0x6f61b5(0x45c)]});try{await this['stats'][_0x6f61b5(0xcc5)](_0x1ac595,_0x1ac595[_0x6f61b5(0xfcd)],_0x309f9f['PENDING']);}catch{}try{this[_0x6f61b5(0xd4f)]['events']['emit'](_0x3bffbf[_0x6f61b5(0x11a2)],{'id':_0x4adb7a,'type':_0x1ac595[_0x6f61b5(0xaee)],'tries':_0x431a11[_0x6f61b5(0x5ca)]});}catch{}return _0x431a11;}async[_0x77f610(0xba9)](_0x5d3e89,_0x2d0442={}){const _0x21cc2f=_0x77f610,_0x28578e=0x1f4,_0x47c657=_0x5d3e89['length'],_0x593842=_0x2d0442[_0x21cc2f(0x8f)]??null;let _0x57dfbd=0x0;for(let _0x199c34=0x0;_0x199c34<_0x5d3e89['length'];_0x199c34+=_0x28578e){const _0x19112c=_0x5d3e89[_0x21cc2f(0xc3c)](_0x199c34,_0x199c34+_0x28578e),_0x34abda=this['env']['transaction']();for(const _0x53b0fc of _0x19112c){_0x34abda['remove'](_0xe9f584,_0x53b0fc),this[_0x21cc2f(0x30b)][_0x21cc2f(0xa57)](_0x4c34a4,_0x53b0fc)&&_0x34abda[_0x21cc2f(0x21e)](_0x4c34a4,_0x53b0fc);}await _0x34abda['commit'](),_0x57dfbd+=_0x19112c[_0x21cc2f(0x156)];try{this[_0x21cc2f(0xd4f)][_0x21cc2f(0xea8)][_0x21cc2f(0xf5d)](_0x3bffbf[_0x21cc2f(0x966)],{'cleared':_0x57dfbd,'total':_0x47c657,'type':_0x593842});}catch{}_0x199c34+_0x28578e<_0x5d3e89['length']&&await new Promise(_0x23409b=>setImmediate(_0x23409b));}}async[_0x77f610(0xad8)](_0x4f16af=null,_0x13d6a9=0xc350){const _0x53e54e=_0x77f610;await this[_0x53e54e(0xd0d)]();const _0xa36920=Math['max'](0x1,Math[_0x53e54e(0x2dc)](0xc350,Number(_0x13d6a9)||0xc350)),_0xd1868d=_0x4f16af?[_0x53e54e(0xaee),_0x53e54e(0xfcd),_0x53e54e(0x5d9)]:[_0x53e54e(0xfcd),'when'],_0x27c229=_0x4f16af?[_0x4f16af,_0x309f9f[_0x53e54e(0x110a)]]:[_0x309f9f[_0x53e54e(0x110a)]],_0x2e3d06=[],_0x531cda={'total':0x0,'byStatus':{},'byType':{}};for(const _0x4b464f of this['env'][_0x53e54e(0xa28)](_0xe9f584,{},{'index':_0xd1868d,'prefix':_0x27c229,'limit':_0xa36920})){const _0x5a226a=_0x4b464f[_0x53e54e(0x568)]?.['id']??_0x4b464f['key'];if(!_0x5a226a)continue;_0x2e3d06[_0x53e54e(0x597)](_0x5a226a);const _0x3cd3fd=_0x4b464f[_0x53e54e(0x568)]?.[_0x53e54e(0xaee)],_0x48db0f=_0x4b464f[_0x53e54e(0x568)]?.[_0x53e54e(0xfcd)];if(_0x3cd3fd&&_0x48db0f){_0x531cda['total']--,_0x531cda[_0x53e54e(0xb51)][_0x48db0f]=(_0x531cda['byStatus'][_0x48db0f]||0x0)-0x1;if(!_0x531cda['byType'][_0x3cd3fd])_0x531cda[_0x53e54e(0xe4a)][_0x3cd3fd]={'total':0x0,'byStatus':{}};_0x531cda[_0x53e54e(0xe4a)][_0x3cd3fd][_0x53e54e(0x8bd)]--,_0x531cda[_0x53e54e(0xe4a)][_0x3cd3fd][_0x53e54e(0xb51)][_0x48db0f]=(_0x531cda['byType'][_0x3cd3fd][_0x53e54e(0xb51)][_0x48db0f]||0x0)-0x1;}}await this['_bulkRemoveJobs'](_0x2e3d06,{'clearType':_0x4f16af});try{await this[_0x53e54e(0xd72)][_0x53e54e(0xe1b)](_0x531cda);}catch{}try{this[_0x53e54e(0xd4f)][_0x53e54e(0xea8)][_0x53e54e(0xf5d)](_0x3bffbf[_0x53e54e(0x42d)],{'cleared':_0x2e3d06[_0x53e54e(0x156)],'type':_0x4f16af});}catch{}return _0x2e3d06[_0x53e54e(0x156)];}async[_0x77f610(0x108a)](_0x4895a7=null,_0x4277be=0x1388){const _0x1551e0=_0x77f610;await this[_0x1551e0(0xd0d)]();const _0x3ed0fb=Math[_0x1551e0(0x10bf)](0x1,Math[_0x1551e0(0x2dc)](0xc350,Number(_0x4277be)||0x1388)),{items:_0x262e14}=await this[_0x1551e0(0x63e)]({'type':_0x4895a7||null,'status':_0x309f9f[_0x1551e0(0x1f2)],'limit':_0x3ed0fb,'direction':_0x1551e0(0xfd1)});let _0x3fc6a4=0x0;for(const _0x54bce6 of _0x262e14){const _0x27b1a4=_0x54bce6[_0x1551e0(0x9dd)]??_0x54bce6[_0x1551e0(0x568)]?.['id'];if(!_0x27b1a4)continue;try{await this[_0x1551e0(0x820)](_0x27b1a4),_0x3fc6a4++;}catch{}}return _0x3fc6a4;}async['clearFailed'](_0x2212fe=null,_0xac0ae4=0xc350){const _0x2b5880=_0x77f610;await this[_0x2b5880(0xd0d)]();const _0x34ffd8=Math[_0x2b5880(0x10bf)](0x1,Math[_0x2b5880(0x2dc)](0xc350,Number(_0xac0ae4)||0xc350)),_0x24a5df=_0x2212fe?[_0x2b5880(0xaee),_0x2b5880(0xfcd),'when']:[_0x2b5880(0xfcd),'when'],_0x185235=_0x2212fe?[_0x2212fe,_0x309f9f['FAILED']]:[_0x309f9f[_0x2b5880(0x1f2)]],_0x1cdff0=[],_0x8bd3f1={'total':0x0,'byStatus':{},'byType':{}};for(const _0x54c8f0 of this[_0x2b5880(0x30b)][_0x2b5880(0xa28)](_0xe9f584,{},{'index':_0x24a5df,'prefix':_0x185235,'limit':_0x34ffd8})){const _0x49c92a=_0x54c8f0[_0x2b5880(0x568)]?.['id']??_0x54c8f0[_0x2b5880(0x9dd)];if(!_0x49c92a)continue;_0x1cdff0['push'](_0x49c92a);const _0x228163=_0x54c8f0[_0x2b5880(0x568)]?.['type'],_0x3bf9f9=_0x54c8f0[_0x2b5880(0x568)]?.[_0x2b5880(0xfcd)];if(_0x228163&&_0x3bf9f9){_0x8bd3f1[_0x2b5880(0x8bd)]--,_0x8bd3f1[_0x2b5880(0xb51)][_0x3bf9f9]=(_0x8bd3f1[_0x2b5880(0xb51)][_0x3bf9f9]||0x0)-0x1;if(!_0x8bd3f1[_0x2b5880(0xe4a)][_0x228163])_0x8bd3f1['byType'][_0x228163]={'total':0x0,'byStatus':{}};_0x8bd3f1[_0x2b5880(0xe4a)][_0x228163]['total']--,_0x8bd3f1['byType'][_0x228163][_0x2b5880(0xb51)][_0x3bf9f9]=(_0x8bd3f1[_0x2b5880(0xe4a)][_0x228163][_0x2b5880(0xb51)][_0x3bf9f9]||0x0)-0x1;}}await this[_0x2b5880(0xba9)](_0x1cdff0,{'clearType':_0x2212fe});try{await this['stats'][_0x2b5880(0xe1b)](_0x8bd3f1);}catch{}try{this[_0x2b5880(0xd4f)][_0x2b5880(0xea8)][_0x2b5880(0xf5d)](_0x3bffbf[_0x2b5880(0x42d)],{'cleared':_0x1cdff0[_0x2b5880(0x156)],'type':_0x2212fe});}catch{}return _0x1cdff0[_0x2b5880(0x156)];}async[_0x77f610(0x7d8)](_0x30a565=null,_0x59158a=0xc350){const _0xc69e74=_0x77f610;await this['_ensure']();const _0x125244=Math[_0xc69e74(0x10bf)](0x1,Math['min'](0xc350,Number(_0x59158a)||0xc350)),_0x240759=Date[_0xc69e74(0x555)](),_0x115385=['status','when'],_0x5910b7=[_0x309f9f[_0xc69e74(0xcbc)]],_0x407915=[],_0x4eaa52={'total':0x0,'byStatus':{},'byType':{}};for(const _0x5b2f33 of this[_0xc69e74(0x30b)]['query'](_0xe9f584,{},{'index':_0x115385,'prefix':_0x5910b7,'limit':_0x125244})){const _0xc5b70a=_0x5b2f33[_0xc69e74(0x568)];if(!_0xc5b70a)continue;if(!_0xc5b70a[_0xc69e74(0xd5a)]||_0xc5b70a['claim_expires']>_0x240759)continue;if(_0x30a565&&_0xc5b70a['type']!==_0x30a565)continue;const _0x25960a=_0xc5b70a['id']??_0x5b2f33['key'];if(!_0x25960a)continue;_0x407915[_0xc69e74(0x597)](_0x25960a);const _0x1c8cb6=_0xc5b70a[_0xc69e74(0xaee)],_0x44b06d=_0xc5b70a['status'];if(_0x1c8cb6&&_0x44b06d){_0x4eaa52['total']--,_0x4eaa52[_0xc69e74(0xb51)][_0x44b06d]=(_0x4eaa52['byStatus'][_0x44b06d]||0x0)-0x1;if(!_0x4eaa52['byType'][_0x1c8cb6])_0x4eaa52[_0xc69e74(0xe4a)][_0x1c8cb6]={'total':0x0,'byStatus':{}};_0x4eaa52[_0xc69e74(0xe4a)][_0x1c8cb6]['total']--,_0x4eaa52[_0xc69e74(0xe4a)][_0x1c8cb6][_0xc69e74(0xb51)][_0x44b06d]=(_0x4eaa52[_0xc69e74(0xe4a)][_0x1c8cb6]['byStatus'][_0x44b06d]||0x0)-0x1;}}await this[_0xc69e74(0xba9)](_0x407915,{'clearType':_0x30a565});try{await this[_0xc69e74(0xd72)][_0xc69e74(0xe1b)](_0x4eaa52);}catch{}try{this[_0xc69e74(0xd4f)][_0xc69e74(0xea8)][_0xc69e74(0xf5d)](_0x3bffbf[_0xc69e74(0x42d)],{'cleared':_0x407915[_0xc69e74(0x156)],'type':_0x30a565});}catch{}return _0x407915[_0xc69e74(0x156)];}async[_0x77f610(0xe7a)](_0x5b22de,_0x310469){const _0x42bd3c=_0x77f610;if(_0x310469==null)return;if(_0x310469===0x0){try{await this[_0x42bd3c(0x255)](_0x5b22de);}catch{}return;}try{await this[_0x42bd3c(0x30b)][_0x42bd3c(0x6bf)](_0xe9f584,_0x5b22de,_0x310469);}catch{}try{this[_0x42bd3c(0x30b)][_0x42bd3c(0xbeb)](_0x4c34a4,_0x5b22de)!==undefined&&await this[_0x42bd3c(0x30b)][_0x42bd3c(0x6bf)](_0x4c34a4,_0x5b22de,_0x310469);}catch{}}async['_markProgress'](_0x15d932,_0x40ac32,_0x289d3d){const _0x72323f=_0x77f610,_0x59ccf5=Date['now'](),_0x369fab=this[_0x72323f(0x30b)]['getEntry'](_0xe9f584,_0x15d932);if(!_0x369fab)return;const _0x1a10f1=_0x369fab[_0x72323f(0x568)];if(_0x1a10f1[_0x72323f(0xfcd)]!==_0x309f9f[_0x72323f(0xcbc)])throw new _0x37f744(_0x72323f(0xe67)+_0x15d932,_0x72323f(0xe5e));if(_0x40ac32!=null&&_0x1a10f1[_0x72323f(0xc82)]!==_0x40ac32)throw new _0x37f744(_0x72323f(0x181)+_0x15d932,_0x72323f(0x11a5));const _0x10f24e={..._0x1a10f1,'progress':_0x5eed13(_0x289d3d??'',0x400),'updated':_0x59ccf5};_0x4d20ce(_0x10f24e),await this[_0x72323f(0x30b)][_0x72323f(0xbb7)](_0xe9f584,_0x15d932,_0x10f24e,{'ifVersion':_0x369fab['version']});}},okdbQueue;}var embedder,hasRequiredEmbedder;function requireEmbedder(){if(hasRequiredEmbedder)return embedder;hasRequiredEmbedder=0x1;const {OKDBError:_0x2c4d4c}=requireOkdbError();return embedder=function _0x84a9cc({resolveFactory:_0x558b24}){const _0x253e14=_0x47ab;if(typeof _0x558b24!=='function')throw new Error(_0x253e14(0x93b));const _0x2e6ff4=new Map();return{'docs':{'summary':_0x253e14(0x812),'description':_0x253e14(0xe1a),'standalone':!![],'pipelineCompatible':!![],'scope':'global','configSchema':{'type':_0x253e14(0xb36),'required':[_0x253e14(0xaee)],'properties':{'type':{'type':_0x253e14(0xf7a),'description':_0x253e14(0x2af)},'model':{'type':_0x253e14(0xf7a),'description':'Provider\x20model\x20identifier.'},'dims':{'type':'integer','minimum':0x1,'description':_0x253e14(0x6ed)}},'additionalProperties':!![]},'configExample':{'type':_0x253e14(0x113b),'model':'mxbai-embed-large','url':_0x253e14(0x114a)},'notes':['Provider-specific\x20config\x20fields\x20are\x20discoverable\x20through\x20/api/embeddings/providers\x20or\x20okdb_embeddings\x20{\x20action:\x20\x22providers\x22\x20}.',_0x253e14(0xf3a)],'links':['/api/embeddings/providers',_0x253e14(0x113)]},'validate'(_0x2f07ee){const _0xfa4a22=_0x253e14;if(!_0x2f07ee||typeof _0x2f07ee!==_0xfa4a22(0xb36))throw new _0x2c4d4c('embedder\x20config\x20must\x20be\x20an\x20object',_0xfa4a22(0xb0f));if(!_0x2f07ee[_0xfa4a22(0xaee)]||typeof _0x2f07ee['type']!==_0xfa4a22(0xf7a))throw new _0x2c4d4c(_0xfa4a22(0x24c),_0xfa4a22(0xb0f));},async 'start'(_0x4912b0){const _0x454f41=_0x253e14,{config:_0x2ae920,key:_0x56a815,okdb:_0x76b921}=_0x4912b0,_0x5c4cf1=_0x558b24(_0x2ae920[_0x454f41(0xaee)]);if(!_0x5c4cf1)throw new _0x2c4d4c('Unknown\x20embedder\x20type:\x20\x22'+_0x2ae920['type']+_0x454f41(0x141)+(_0x454f41(0x1ff)+_0x2ae920[_0x454f41(0xaee)]+_0x454f41(0x1ca)),'UNKNOWN_EMBEDDER_TYPE');const _0xf375ad=_0x5c4cf1(_0x2ae920,_0x76b921);if(!_0xf375ad||typeof _0xf375ad[_0x454f41(0xa7)]!==_0x454f41(0x63b))throw new _0x2c4d4c(_0x454f41(0x607)+_0x2ae920[_0x454f41(0xaee)]+'\x22\x20must\x20return\x20{\x20embed(input):\x20Promise<Float32Array>\x20}',_0x454f41(0x7c6));if(typeof _0xf375ad[_0x454f41(0xa00)]==='function')await _0xf375ad[_0x454f41(0xa00)]();let _0x398b20=typeof _0x2ae920['dims']===_0x454f41(0x9f0)?_0x2ae920[_0x454f41(0xa67)]:null;_0x398b20==null&&_0x76b921[_0x454f41(0x7f1)]?.[_0x454f41(0x4be)]&&(_0x398b20=_0x76b921[_0x454f41(0x7f1)][_0x454f41(0x4be)](_0x2ae920['type'],_0x2ae920[_0x454f41(0x7d4)])??null);if(_0x398b20==null)try{const _0x540c4d=await _0xf375ad['embed'](_0x454f41(0x7b0));_0x398b20=_0x540c4d[_0x454f41(0x156)],_0x76b921[_0x454f41(0x9be)]?.[_0x454f41(0x26c)]?.('[embedder]\x20probed\x20dims\x20for\x20'+_0x2ae920['type']+'/'+(_0x2ae920[_0x454f41(0x7d4)]??_0x454f41(0x8d0))+':\x20'+_0x398b20+'\x20'+'(add\x20this\x20model\x20to\x20the\x20catalog\x20to\x20skip\x20the\x20probe\x20next\x20time)');}catch(_0x3c387b){_0x76b921[_0x454f41(0x9be)]?.[_0x454f41(0xf78)]?.(_0x454f41(0x604)+_0x56a815+':\x20'+(_0x3c387b?.[_0x454f41(0xb4e)]||_0x3c387b)+'.\x20'+_0x454f41(0x8e8));}else{if(typeof _0x2ae920[_0x454f41(0xa67)]===_0x454f41(0x9f0)){const _0x571800=_0x76b921[_0x454f41(0x7f1)]?.[_0x454f41(0x4be)]?.(_0x2ae920['type'],_0x2ae920[_0x454f41(0x7d4)])??null;_0x571800!==null&&_0x2ae920[_0x454f41(0xa67)]!==_0x571800&&_0x76b921['log']?.[_0x454f41(0xf78)]?.(_0x454f41(0x2ff)+_0x2ae920[_0x454f41(0xa67)]+_0x454f41(0xcc3)+_0x2ae920[_0x454f41(0x7d4)]+'\x22\x20disagrees\x20'+(_0x454f41(0x4c8)+_0x571800+_0x454f41(0x1130)));}}return _0x2e6ff4[_0x454f41(0x211)](_0x56a815,{'embedder':_0xf375ad,'config':_0x2ae920,'dims':_0x398b20}),_0x76b921[_0x454f41(0x9be)]?.[_0x454f41(0x26c)]?.(_0x454f41(0x6f6)+_0x56a815+_0x454f41(0xee8)+_0x2ae920[_0x454f41(0xaee)]+_0x454f41(0x111d)+(_0x2ae920[_0x454f41(0x7d4)]??_0x454f41(0x8d0))+_0x454f41(0x2d9)+(_0x398b20??_0x454f41(0xd08))+')'),{'dims':_0x398b20,async 'embed'(_0x3833b0){const _0x265c6f=_0x454f41;if(Array[_0x265c6f(0x10f5)](_0x3833b0))return Promise[_0x265c6f(0xf09)](_0x3833b0[_0x265c6f(0x1166)](_0x161cac=>_0xf375ad[_0x265c6f(0xa7)](_0x161cac)));return _0xf375ad[_0x265c6f(0xa7)](_0x3833b0);},async 'health'(){const _0x46c2de=_0x454f41;return{'ok':!![],'type':_0x2ae920[_0x46c2de(0xaee)],'model':_0x2ae920[_0x46c2de(0x7d4)]??null,'dims':_0x398b20};}};},async 'stop'(_0x8ea5c){const _0x280fba=_0x253e14,_0x1358d3=_0x2e6ff4[_0x280fba(0xbeb)](_0x8ea5c[_0x280fba(0x9dd)]);if(!_0x1358d3)return;if(typeof _0x1358d3['embedder'][_0x280fba(0x1fe)]===_0x280fba(0x63b))try{await _0x1358d3[_0x280fba(0x37b)]['stop']();}catch(_0x9ff849){_0x8ea5c['okdb'][_0x280fba(0x9be)]?.[_0x280fba(0xf78)]?.(_0x280fba(0x478)+_0x8ea5c[_0x280fba(0x9dd)]+':',_0x9ff849?.[_0x280fba(0xb4e)]||_0x9ff849);}_0x2e6ff4['delete'](_0x8ea5c[_0x280fba(0x9dd)]),_0x8ea5c[_0x280fba(0xd4f)][_0x280fba(0x9be)]?.[_0x280fba(0x26c)]?.(_0x280fba(0xf5a)+_0x8ea5c[_0x280fba(0x9dd)]);}};},embedder;}var okdbChunker,hasRequiredOkdbChunker;function requireOkdbChunker(){const _0x3ed153=_0xef8cd8;if(hasRequiredOkdbChunker)return okdbChunker;hasRequiredOkdbChunker=0x1;const _0x382718=require$$0$1,_0x366780={'none'(_0x42f726){const _0xfd2285=_0x47ab;if(typeof _0x42f726===_0xfd2285(0xf7a))return _0x42f726;if(_0x42f726==null)return'';return JSON[_0xfd2285(0xf75)](_0x42f726);},'html'(_0x5ca2c3){const _0x421fc7=_0x47ab,_0x5e80a4=typeof _0x5ca2c3===_0x421fc7(0xf7a)?_0x5ca2c3:String(_0x5ca2c3??'');return _0x5e80a4['replace'](/<script\b[^>]*>[\s\S]*?<\/script>/gi,'\x20')[_0x421fc7(0x8d8)](/<style\b[^>]*>[\s\S]*?<\/style>/gi,'\x20')[_0x421fc7(0x8d8)](/<[^>]+>/g,'\x20')[_0x421fc7(0x8d8)](/&/g,'&')[_0x421fc7(0x8d8)](/</g,'<')['replace'](/>/g,'>')[_0x421fc7(0x8d8)](/"/g,'\x22')[_0x421fc7(0x8d8)](/'/g,'\x27')[_0x421fc7(0x8d8)](/ /g,'\x20')[_0x421fc7(0x8d8)](/&#(\d+);/g,(_0x32ec80,_0x33ac78)=>String[_0x421fc7(0x3de)](Number(_0x33ac78)))['replace'](/[ \t]+/g,'\x20')[_0x421fc7(0x8d8)](/\n{3,}/g,'\x0a\x0a')['trim']();},'markdown'(_0x315d9d){const _0x2e1c02=_0x47ab,_0x5bf672=typeof _0x315d9d==='string'?_0x315d9d:String(_0x315d9d??'');return _0x5bf672['replace'](/```[\w]*\n([\s\S]*?)```/g,'$1')[_0x2e1c02(0x8d8)](/`([^`]+)`/g,'$1')[_0x2e1c02(0x8d8)](/^#{1,6}\s+/gm,'')['replace'](/\*{1,3}([^*]+)\*{1,3}/g,'$1')[_0x2e1c02(0x8d8)](/_{1,3}([^_]+)_{1,3}/g,'$1')[_0x2e1c02(0x8d8)](/\[([^\]]+)\]\([^)]+\)/g,'$1')[_0x2e1c02(0x8d8)](/!\[([^\]]*)\]\([^)]+\)/g,'$1')['replace'](/^>\s+/gm,'')[_0x2e1c02(0x8d8)](/^[-*_]{3,}\s*$/gm,'')[_0x2e1c02(0x8d8)](/^[\s]*[-*+]\s+/gm,'')[_0x2e1c02(0x8d8)](/^[\s]*\d+\.\s+/gm,'')[_0x2e1c02(0x8d8)](/[ \t]+/g,'\x20')['replace'](/\n{3,}/g,'\x0a\x0a')[_0x2e1c02(0xf4d)]();},'json-text'(_0x1a0635){const _0x50a429=_0x47ab,_0x45a8ad=[];function _0x14a66d(_0x4d0284){const _0x19c5d0=_0x47ab;if(typeof _0x4d0284===_0x19c5d0(0xf7a)){if(_0x4d0284[_0x19c5d0(0xf4d)]())_0x45a8ad[_0x19c5d0(0x597)](_0x4d0284[_0x19c5d0(0xf4d)]());}else{if(Array['isArray'](_0x4d0284)){for(const _0x389c46 of _0x4d0284)_0x14a66d(_0x389c46);}else{if(_0x4d0284&&typeof _0x4d0284===_0x19c5d0(0xb36)){for(const _0x1b9b4c of Object['values'](_0x4d0284))_0x14a66d(_0x1b9b4c);}}}}const _0x2a33da=typeof _0x1a0635===_0x50a429(0xf7a)?((()=>{const _0x5273c6=_0x50a429;try{return JSON[_0x5273c6(0xdcd)](_0x1a0635);}catch{return _0x1a0635;}})()):_0x1a0635;return _0x14a66d(_0x2a33da??''),_0x45a8ad[_0x50a429(0x3d9)]('\x20');}},_0x3f8a59=new Map();function _0x223e2b(_0x18d992,_0xbc5671){const _0x4b6b55=_0x47ab;if(typeof _0xbc5671!==_0x4b6b55(0x63b))throw new TypeError(_0x4b6b55(0xe55));_0x3f8a59[_0x4b6b55(0x211)](_0x18d992,_0xbc5671);}function _0x493c89(_0x5b60ed,_0x5f325b=_0x3ed153(0x11cc)){const _0x305e29=_0x3ed153,_0x29d047=_0x366780[_0x5f325b]??_0x3f8a59[_0x305e29(0xbeb)](_0x5f325b);if(!_0x29d047)throw new Error(_0x305e29(0x230)+_0x5f325b+_0x305e29(0x77e));return _0x29d047(_0x5b60ed)??'';}const _0x1f10d0=new Map();function _0x659e5(_0x116ed9,_0x56dbc4){const _0x3eb1de=_0x3ed153;if(typeof _0x56dbc4!=='function')throw new TypeError(_0x3eb1de(0xd9d));_0x1f10d0[_0x3eb1de(0x211)](_0x116ed9,_0x56dbc4);}function _0xd9a53a(_0x1c76e4,{strategy:strategy='fixed',size:size=0x200,overlap:overlap=0x40}={}){const _0xca7960=_0x3ed153;if(!_0x1c76e4||typeof _0x1c76e4!==_0xca7960(0xf7a))return[];const _0x238fd6=_0x1f10d0[_0xca7960(0xbeb)](strategy);if(_0x238fd6)return _0x238fd6(_0x1c76e4,{'size':size,'overlap':overlap});switch(strategy){case _0xca7960(0x4b2):return _0xef6b02(_0x1c76e4,size,overlap);case _0xca7960(0xa60):return _0x5a7d9b(_0x1c76e4,size);case _0xca7960(0x698):return _0x35d1c0(_0x1c76e4,size);default:throw new Error('Unknown\x20chunk\x20strategy:\x20\x22'+strategy+'\x22.\x20Register\x20custom\x20strategies\x20via\x20okdb.embeddings.registerChunkStrategy(name,\x20fn).');}}function _0xef6b02(_0x12ecbf,_0xc4419f,_0x27403e){const _0x3ffcfd=_0x3ed153,_0x2f7365=[],_0x406778=Math[_0x3ffcfd(0x10bf)](0x1,_0xc4419f-_0x27403e);let _0x2f29e2=0x0;while(_0x2f29e2<_0x12ecbf[_0x3ffcfd(0x156)]){const _0x25b306=Math['min'](_0x2f29e2+_0xc4419f,_0x12ecbf['length']),_0x1b285f=_0x12ecbf[_0x3ffcfd(0xc3c)](_0x2f29e2,_0x25b306);_0x2f7365[_0x3ffcfd(0x597)]({'text':_0x1b285f,'start':_0x2f29e2,'end':_0x25b306});if(_0x25b306>=_0x12ecbf[_0x3ffcfd(0x156)])break;_0x2f29e2+=_0x406778;}return _0x2f7365;}function _0x5a7d9b(_0x13ed8b,_0xe7f511){const _0x5ef804=_0x3ed153,_0x2c744c=/[.!?]+(?:\s+|$)/g,_0x2ecf83=[0x0];let _0x20c446;while((_0x20c446=_0x2c744c[_0x5ef804(0xe6)](_0x13ed8b))!==null){_0x2ecf83['push'](_0x20c446['index']+_0x20c446[0x0][_0x5ef804(0x156)]);}return _0x2ecf83[_0x2ecf83[_0x5ef804(0x156)]-0x1]<_0x13ed8b['length']&&_0x2ecf83[_0x5ef804(0x597)](_0x13ed8b['length']),_0x4fa816(_0x13ed8b,_0x2ecf83,_0xe7f511);}function _0x35d1c0(_0x4ecd81,_0x309114){const _0x2b9be4=_0x3ed153,_0x545b38=/\n\s*\n/g,_0x118132=[0x0];let _0x3bfb9b;while((_0x3bfb9b=_0x545b38[_0x2b9be4(0xe6)](_0x4ecd81))!==null){_0x118132['push'](_0x3bfb9b['index']+_0x3bfb9b[0x0]['length']);}return _0x118132[_0x118132['length']-0x1]<_0x4ecd81['length']&&_0x118132['push'](_0x4ecd81['length']),_0x4fa816(_0x4ecd81,_0x118132,_0x309114);}function _0x4fa816(_0x3bd337,_0x59efdc,_0x2f9abc){const _0x134075=_0x3ed153,_0x5f1862=[];let _0xd32e92=0x0;while(_0xd32e92<_0x59efdc['length']-0x1){let _0x5c7772=_0x59efdc[_0xd32e92],_0x189276=_0x59efdc[_0xd32e92+0x1],_0xc7f4fb=_0xd32e92+0x1;while(_0xc7f4fb<_0x59efdc[_0x134075(0x156)]-0x1&&_0x59efdc[_0xc7f4fb+0x1]-_0x5c7772<=_0x2f9abc){_0xc7f4fb++,_0x189276=_0x59efdc[_0xc7f4fb];}const _0x4cfe19=_0x3bd337['slice'](_0x5c7772,_0x189276)[_0x134075(0xf4d)]();_0x4cfe19[_0x134075(0x156)]>0x0&&_0x5f1862[_0x134075(0x597)]({'text':_0x4cfe19,'start':_0x5c7772,'end':_0x189276}),_0xd32e92=_0xc7f4fb;}return _0x5f1862;}function _0xb11ce9(_0x21ec70){const _0x56ad4d=_0x3ed153;return _0x382718[_0x56ad4d(0x687)]('sha256')[_0x56ad4d(0xbb7)](_0x21ec70,'utf8')[_0x56ad4d(0xdea)](_0x56ad4d(0x57b))['slice'](0x0,0xc);}const _0x5ebfb2='\x09';function _0xc86b(_0x313c42,_0x5eaad9){return _0x313c42+_0x5ebfb2+_0x5eaad9;}function _0x3e2b16(_0x2a41ef){const _0x3fe8d1=_0x3ed153,_0x57eb75=_0x2a41ef[_0x3fe8d1(0x10b8)](_0x5ebfb2);if(_0x57eb75===-0x1)return{'sourceKey':_0x2a41ef,'chunkHash':null};return{'sourceKey':_0x2a41ef[_0x3fe8d1(0xc3c)](0x0,_0x57eb75),'chunkHash':_0x2a41ef[_0x3fe8d1(0xc3c)](_0x57eb75+0x1)};}function _0x20f4bb(_0x3b012e){return{'start':_0x3b012e+_0x5ebfb2,'end':_0x3b012e+_0x5ebfb2+''};}return okdbChunker={'prepare':_0x493c89,'chunk':_0xd9a53a,'hashChunk':_0xb11ce9,'vecKey':_0xc86b,'parseVecKey':_0x3e2b16,'chunkKeyRange':_0x20f4bb,'registerPreparer':_0x223e2b,'registerChunkStrategy':_0x659e5,'CHUNK_SEP':_0x5ebfb2},okdbChunker;}var indexer,hasRequiredIndexer;function requireIndexer(){if(hasRequiredIndexer)return indexer;hasRequiredIndexer=0x1;const {EVENTS:_0x5458e0,CHANGE_ACTIONS:_0x3d68b9,OKDB_STATE:_0x52742e}=requireOkdbEnums(),{OKDBError:_0x224ec3,OKDBVersionMismatchError:_0xbadae8}=requireOkdbError(),{ENGINE_TYPES:_0xf72817,INDEXER_DOC_STATUS:_0x9ec72f,EMBEDDINGS_EVENTS:_0x506cb6}=requireEnums(),{prepare:_0x4a6380,chunk:_0x17c007,hashChunk:_0x1438ed,vecKey:_0x410939,parseVecKey:_0x4d7724,chunkKeyRange:_0x3987fc}=requireOkdbChunker(),_0x33de78=0xa,_0x457a34=new Set([_0x9ec72f['DONE'],_0x9ec72f['DELETED']]);function _0x5bf229(){const _0x56784e=_0x47ab;return Date[_0x56784e(0x555)]();}function _0x4b9a61(_0x3020f7){return _0x3020f7?.['message']?String(_0x3020f7['message'])['slice'](0x0,0x200):String(_0x3020f7);}return indexer=function _0x56fa3a({resolveStorage:_0x4b9485,resolveTypeEnv:_0xc24ed7}){const _0x3c6901=_0x47ab,_0x5a4991=new Map();return{'docs':{'summary':_0x3c6901(0x580),'description':'Watches\x20a\x20source\x20type,\x20embeds\x20changed\x20documents,\x20and\x20writes\x20vectors/doc\x20status\x20for\x20one\x20storage\x20key.','standalone':!![],'pipelineCompatible':!![],'scope':_0x3c6901(0x30b),'configSchema':{'type':'object','required':['source_type',_0x3c6901(0x37b),_0x3c6901(0x1cc)],'properties':{'source_type':{'type':_0x3c6901(0xf7a)},'source_env':{'type':_0x3c6901(0xf7a)},'embedder':{'type':'string','description':_0x3c6901(0x176)},'storage_key':{'type':'string'},'mode':{'type':_0x3c6901(0xf7a),'enum':[_0x3c6901(0x10aa),_0x3c6901(0x879)]},'job_type':{'type':_0x3c6901(0xf7a)},'field':{'type':_0x3c6901(0xf7a)},'dims':{'type':_0x3c6901(0x10f2),'minimum':0x1},'prepare':{'type':_0x3c6901(0xf7a)},'chunk':{'type':'object','additionalProperties':!![]}},'additionalProperties':!![]},'configExample':{'source_type':_0x3c6901(0xb8),'source_env':_0x3c6901(0x8d0),'embedder':_0x3c6901(0xac3),'storage_key':_0x3c6901(0xb8),'field':'body','mode':_0x3c6901(0x10aa)},'notes':[_0x3c6901(0x898),_0x3c6901(0x123b)],'links':['/api/env/:env/type/:type/pipelines',_0x3c6901(0x9cf)]},'validate'(_0x26d536){const _0x116883=_0x3c6901;if(!_0x26d536||typeof _0x26d536!=='object')throw new _0x224ec3(_0x116883(0x545),'BAD_CONFIG');if(!_0x26d536[_0x116883(0x481)]||typeof _0x26d536[_0x116883(0x481)]!==_0x116883(0xf7a))throw new _0x224ec3(_0x116883(0x701),_0x116883(0xb0f));if(!_0x26d536['embedder']||typeof _0x26d536[_0x116883(0x37b)]!==_0x116883(0xf7a))throw new _0x224ec3('indexer\x20config.embedder\x20required\x20(name\x20of\x20the\x20embedder\x20engine\x20to\x20use)',_0x116883(0xb0f));if(!_0x26d536[_0x116883(0x1cc)]||typeof _0x26d536[_0x116883(0x1cc)]!==_0x116883(0xf7a))throw new _0x224ec3(_0x116883(0xe1c),_0x116883(0xb0f));const _0x3c4a0e=_0x26d536[_0x116883(0x259)]??_0x116883(0x10aa);if(_0x3c4a0e!==_0x116883(0x10aa)&&_0x3c4a0e!==_0x116883(0x879))throw new _0x224ec3('indexer\x20config.mode\x20must\x20be\x20\x22inline\x22\x20or\x20\x22queue\x22',_0x116883(0xb0f));if(_0x3c4a0e===_0x116883(0x879)&&_0x26d536['job_type']!==undefined&&typeof _0x26d536['job_type']!=='string')throw new _0x224ec3('indexer\x20config.job_type\x20must\x20be\x20a\x20string','BAD_CONFIG');if(_0x26d536[_0x116883(0xa67)]!==undefined&&!(Number[_0x116883(0x474)](_0x26d536[_0x116883(0xa67)])&&_0x26d536[_0x116883(0xa67)]>0x0))throw new _0x224ec3(_0x116883(0xb48),'BAD_CONFIG');},async 'install'(_0x774e91){const _0x464483=_0x3c6901,{config:_0x2fec90}=_0x774e91,_0xc33917=_0x2fec90[_0x464483(0x481)],_0x32b069=_0x2fec90['source_env']??'default',_0x253db7=_0x2fec90[_0x464483(0x1cc)],_0x3a279a=_0xc24ed7?await _0xc24ed7(_0x32b069,_0xc33917):_0x774e91[_0x464483(0xd4f)],_0x5902e6=_0x464483(0x78f)+_0x253db7;!_0x3a279a[_0x464483(0x7c0)](_0x5902e6)&&await _0x3a279a[_0x464483(0xa39)](_0x5902e6);for(const _0x53dd4d of[[_0x464483(0xfcd)],[_0x464483(0xfcd),'updated']]){!_0x3a279a['hasIndex'](_0x5902e6,_0x53dd4d)&&await _0x3a279a['registerIndex'](_0x5902e6,_0x53dd4d);}const _0x2af007='chunk_status:'+_0x253db7;!_0x3a279a[_0x464483(0x7c0)](_0x2af007)&&await _0x3a279a[_0x464483(0xa39)](_0x2af007);for(const _0x395c8f of[[_0x464483(0xfcd)],[_0x464483(0xfcd),_0x464483(0x965)]]){!_0x3a279a['hasIndex'](_0x2af007,_0x395c8f)&&await _0x3a279a['registerIndex'](_0x2af007,_0x395c8f);}},async 'start'(_0x323aeb){const _0x1278e7=_0x3c6901,{config:_0x3936f4,key:_0x28d894,okdb:_0x229724}=_0x323aeb,_0x2277b3=_0x3936f4[_0x1278e7(0x481)],_0x168f50=_0x3936f4[_0x1278e7(0x43a)]??'default',_0x5707c5=_0x3936f4[_0x1278e7(0x37b)],_0x324579=_0x3936f4[_0x1278e7(0x1cc)],_0x2afa54=_0x3936f4['mode']??_0x1278e7(0x10aa),_0x4c998e=_0x3936f4[_0x1278e7(0x5da)]??_0x1278e7(0x2f4)+_0x28d894,_0x4220f8=_0x3936f4[_0x1278e7(0x221)]??null,_0x28c68b=_0x3936f4[_0x1278e7(0xb62)]??!![],_0x844d5d=_0x3936f4[_0x1278e7(0x12b)]??0x3e8,_0x471a98=_0x3936f4[_0x1278e7(0x246)]??_0x1278e7(0x11cc),_0x7cd0d2=_0x3936f4[_0x1278e7(0xf26)]??null,_0x40f08b=!!(_0x7cd0d2&&_0x7cd0d2[_0x1278e7(0xdaa)]&&_0x7cd0d2['strategy']!==_0x1278e7(0xa9b)),_0x14173b=_0x229724[_0x1278e7(0x30b)](_0x168f50),_0x287fcd=_0xc24ed7?await _0xc24ed7(_0x168f50,_0x2277b3):_0x229724,_0x360f09=_0x1278e7(0x78f)+_0x324579,_0x25cb68=_0x1278e7(0xfe0)+_0x324579;if(_0x2afa54===_0x1278e7(0x879)){if(!_0x287fcd[_0x1278e7(0x879)]||typeof _0x287fcd[_0x1278e7(0x879)][_0x1278e7(0xafa)]!=='function')throw new _0x224ec3(_0x1278e7(0x251)+_0x28d894+_0x1278e7(0x165),'MISSING_QUEUE');}if(!_0x14173b[_0x1278e7(0x7c0)](_0x2277b3))throw new _0x224ec3(_0x1278e7(0x941)+_0x2277b3+'\x22',_0x1278e7(0xb0f));const _0x456fed=_0x4b9485?_0x4b9485(_0x324579,_0x229724,_0x168f50,_0x2277b3):null;!_0x456fed&&_0x229724[_0x1278e7(0x9be)]?.[_0x1278e7(0xf78)]?.(_0x1278e7(0xea5)+_0x324579+_0x1278e7(0x708)+(_0x1278e7(0xd37)+_0x28d894+_0x1278e7(0x3c6))+_0x1278e7(0xd93));let _0x2f2e84=0x0;const _0x22a8bb={'subs':[],'stopped':![],'stopProcessor':null};_0x5a4991[_0x1278e7(0x211)](_0x28d894,_0x22a8bb);function _0x3b9a36(){const _0x5e27a2=_0x1278e7,_0x5b299f=_0x229724[_0x5e27a2(0xab8)][_0x5e27a2(0xdd5)](_0xf72817['EMBEDDER'],_0x5707c5);if(!_0x5b299f)throw new _0x224ec3('Embedder\x20engine\x20not\x20running:\x20\x22'+_0x5707c5+'\x22\x20'+(_0x5e27a2(0x3e4)+_0x28d894+_0x5e27a2(0x6a1)),'EMBEDDER_NOT_RUNNING');return _0x5b299f['api'];}async function _0x21be4b(_0x56bccd,_0xd63ce0){const _0x588719=_0x1278e7,_0x1b2e2d=_0x56bccd,_0x496849=_0x5bf229();for(let _0x17942a=0x0;_0x17942a<_0x33de78;_0x17942a++){const _0x19d705=_0x287fcd[_0x588719(0xa57)](_0x360f09,_0x1b2e2d),_0x390253=_0x19d705?.['value'];if(_0x390253&&_0x457a34[_0x588719(0x9d0)](_0x390253[_0x588719(0xfcd)])){const _0x58eea2=_0x390253[_0x588719(0x114d)]??null,_0x5d58d5=_0xd63ce0[_0x588719(0x114d)]??null;if(_0x58eea2!=null&&_0x5d58d5!=null&&_0x5d58d5<=_0x58eea2)return _0x390253;}const _0x41abf2={'engine_key':_0x28d894,'source_key':_0x56bccd,'mode':_0x2afa54,'created':_0x390253?.[_0x588719(0xf1a)]??_0x496849,..._0x390253,..._0xd63ce0,'updated':_0x496849};try{if(!_0x19d705)await _0x287fcd['put'](_0x360f09,_0x1b2e2d,_0x41abf2);else await _0x287fcd['update'](_0x360f09,_0x1b2e2d,_0x41abf2,_0x19d705[_0x588719(0x45c)]);return _0x41abf2;}catch(_0x4b09b2){if(_0x4b09b2 instanceof _0xbadae8)continue;throw _0x4b09b2;}}throw new _0x224ec3(_0x588719(0x51b)+_0x1b2e2d+')',_0x588719(0xfce));}const _0x2d10ba=new Map();let _0x10e2d8=![];async function _0x3a5106(){const _0x1b6996=_0x1278e7;if(_0x10e2d8||!_0x40f08b||!_0x456fed?.['getAll'])return;_0x10e2d8=!![];try{const _0x1ad8cc=await _0x456fed[_0x1b6996(0xdc7)]();let _0xf2cbdb=0x0;for(const {key:_0x5a4797,vector:_0x34e4e4}of _0x1ad8cc){const {chunkHash:_0x3f0a1d}=_0x4d7724(_0x5a4797);if(!_0x3f0a1d)continue;!_0x2d10ba[_0x1b6996(0x9d0)](_0x3f0a1d)&&(_0x2d10ba[_0x1b6996(0x211)](_0x3f0a1d,_0x34e4e4),_0xf2cbdb++);}_0x229724[_0x1b6996(0x9be)]?.['debug']?.(_0x1b6996(0xd65)+_0xf2cbdb+_0x1b6996(0x109e)+_0x1ad8cc[_0x1b6996(0x156)]+_0x1b6996(0xadd)+_0x28d894+')');}catch(_0xaba0ce){_0x229724[_0x1b6996(0x9be)]?.[_0x1b6996(0xef)]?.(_0x1b6996(0xc7b)+_0xaba0ce?.['message']);}}async function _0x4c7895(_0x50a939,_0x36e549){const _0x33b329=_0x1278e7;let _0x4bf363;try{_0x4bf363=await _0x3b9a36()[_0x33b329(0xa7)](_0x36e549);}catch(_0x1210ae){return{'vec':null,'error':_0x4b9a61(_0x1210ae)};}const _0x2f6a19=!(_0x4bf363 instanceof Float32Array)?'embedder.embed()\x20must\x20return\x20a\x20Float32Array':_0x3936f4[_0x33b329(0xa67)]&&_0x4bf363[_0x33b329(0x156)]!==_0x3936f4[_0x33b329(0xa67)]?_0x33b329(0x62e)+_0x3936f4[_0x33b329(0xa67)]+_0x33b329(0xb43)+_0x4bf363[_0x33b329(0x156)]:null;if(_0x2f6a19)return{'vec':null,'error':_0x2f6a19};if(_0x456fed)await _0x456fed[_0x33b329(0x92c)](_0x50a939,_0x4bf363);return{'vec':_0x4bf363,'error':null};}async function _0x3d7c4c(_0x1107bd,_0x364120,_0x4fbcee){const _0x5a893a=_0x1278e7,_0x2191b6=_0x4220f8!=null?_0x364120?.[_0x4220f8]:_0x364120;if(_0x2191b6==null){const _0x1a8519=_0x4220f8?_0x5a893a(0x36b)+_0x4220f8+_0x5a893a(0x588)+_0x1107bd+'\x22':_0x5a893a(0x60d)+_0x1107bd+_0x5a893a(0x23d);_0x229724[_0x5a893a(0x9be)]?.[_0x5a893a(0xf78)]?.(_0x5a893a(0x48d)+_0x1a8519+'\x20—\x20marking\x20FAILED\x20('+_0x28d894+')'),await _0x21be4b(_0x1107bd,{'status':_0x9ec72f[_0x5a893a(0x1f2)],'error':_0x1a8519,'clock':_0x4fbcee}),_0x229724[_0x5a893a(0xea8)]['emit'](_0x506cb6[_0x5a893a(0xd07)],{'engine_key':_0x28d894,'source_key':_0x1107bd,'reason':_0x1a8519});return;}let _0x391d65;try{_0x391d65=_0x4a6380(_0x2191b6,_0x471a98);}catch(_0x37444f){const _0x8664da=_0x5a893a(0x99f)+_0x471a98+_0x5a893a(0xcf8)+_0x37444f['message'];await _0x21be4b(_0x1107bd,{'status':_0x9ec72f[_0x5a893a(0x1f2)],'error':_0x8664da,'clock':_0x4fbcee}),_0x229724[_0x5a893a(0xea8)][_0x5a893a(0xf5d)](_0x506cb6[_0x5a893a(0xd07)],{'engine_key':_0x28d894,'source_key':_0x1107bd,'reason':_0x8664da});return;}if(!_0x40f08b){const {vec:_0x383434,error:_0x321968}=await _0x4c7895(_0x1107bd,_0x391d65);if(!_0x383434){_0x229724[_0x5a893a(0x9be)]?.[_0x5a893a(0xf78)]?.(_0x5a893a(0xfc7)+_0x1107bd+_0x5a893a(0x449)+_0x321968+'\x20('+_0x28d894+')'),await _0x21be4b(_0x1107bd,{'status':_0x9ec72f[_0x5a893a(0x1f2)],'error':_0x321968,'clock':_0x4fbcee}),_0x229724[_0x5a893a(0xea8)]['emit'](_0x506cb6[_0x5a893a(0xd07)],{'engine_key':_0x28d894,'source_key':_0x1107bd,'error':_0x321968}),_0x229724['events']['emit'](_0x506cb6['DOC_STATUS_CHANGE'],{'engine_key':_0x28d894,'source_key':_0x1107bd,'status':_0x9ec72f[_0x5a893a(0x1f2)],'clock':_0x4fbcee});return;}await _0x21be4b(_0x1107bd,{'status':_0x9ec72f[_0x5a893a(0x110a)],'error':null,'clock':_0x4fbcee}),_0x229724[_0x5a893a(0xea8)]['emit'](_0x506cb6[_0x5a893a(0x1099)],{'engine_key':_0x28d894,'source_key':_0x1107bd,'clock':_0x4fbcee}),_0x229724[_0x5a893a(0xea8)]['emit'](_0x506cb6[_0x5a893a(0xf06)],{'engine_key':_0x28d894,'source_key':_0x1107bd,'status':_0x9ec72f['DONE'],'clock':_0x4fbcee});}else await _0x335b03(_0x1107bd,_0x391d65,_0x4fbcee);}async function _0x335b03(_0x44cb71,_0x22fc19,_0x1a4293){const _0x36b7ee=_0x1278e7;await _0x3a5106();const {strategy:strategy=_0x36b7ee(0x4b2),size:size=0x200,overlap:overlap=0x40,storeText:storeText=![]}=_0x7cd0d2;let _0x345adf;try{_0x345adf=_0x17c007(_0x22fc19,{'strategy':strategy,'size':size,'overlap':overlap});}catch(_0x4e1852){const _0x2ec1e4='chunk\x20split\x20failed:\x20'+_0x4e1852['message'];await _0x21be4b(_0x44cb71,{'status':_0x9ec72f[_0x36b7ee(0x1f2)],'error':_0x2ec1e4,'clock':_0x1a4293}),_0x229724[_0x36b7ee(0xea8)][_0x36b7ee(0xf5d)](_0x506cb6['INDEXER_DOC_FAILED'],{'engine_key':_0x28d894,'source_key':_0x44cb71,'reason':_0x2ec1e4});return;}if(_0x345adf['length']===0x0){const _0x573cc4=_0x36b7ee(0x893)+strategy+'\x22)';await _0x21be4b(_0x44cb71,{'status':_0x9ec72f[_0x36b7ee(0x1f2)],'error':_0x573cc4,'clock':_0x1a4293});return;}const _0x322056=new Map();for(const _0x2d2d38 of _0x345adf){const _0x12301b=_0x1438ed(_0x2d2d38[_0x36b7ee(0x1fb)]);_0x322056[_0x36b7ee(0x211)](_0x12301b,{'hash':_0x12301b,'start':_0x2d2d38['start'],'end':_0x2d2d38[_0x36b7ee(0xc9c)],...storeText?{'text':_0x2d2d38['text']}:{}});}const _0x3f4e8f=_0x287fcd[_0x36b7ee(0x7c0)](_0x360f09)?_0x287fcd['get'](_0x360f09,_0x44cb71)??null:null,_0x4c011c=new Map((_0x3f4e8f?.[_0x36b7ee(0x3a4)]??[])[_0x36b7ee(0x1166)](_0xc16af2=>[_0xc16af2[_0x36b7ee(0x6f9)],_0xc16af2]));if(_0x456fed)for(const [_0x317b0e]of _0x4c011c){if(!_0x322056[_0x36b7ee(0x9d0)](_0x317b0e))try{await _0x456fed[_0x36b7ee(0x21e)](_0x410939(_0x44cb71,_0x317b0e));}catch{}}if(_0x287fcd[_0x36b7ee(0x7c0)](_0x25cb68)){const _0x3ae47c=_0x287fcd[_0x36b7ee(0x9ce)](_0x25cb68,{'start':_0x44cb71+'\x09','end':_0x44cb71+'\x09ÿ'});for(const _0x3cda63 of _0x3ae47c){await _0x287fcd['remove'](_0x25cb68,_0x3cda63[_0x36b7ee(0x9dd)]);}}await _0x21be4b(_0x44cb71,{'status':_0x9ec72f[_0x36b7ee(0x11d0)],'error':null,'clock':_0x1a4293,'total_chunks':_0x322056[_0x36b7ee(0xfb)],'chunk_strategy':strategy});let _0x36fe2=![],_0x3ff88e=0x0;for(const [_0x451054,_0x28e435]of _0x322056){if(_0x4c011c[_0x36b7ee(0x9d0)](_0x451054)){await _0x287fcd[_0x36b7ee(0x92c)](_0x25cb68,_0x410939(_0x44cb71,_0x451054),{'status':'done','error':null,'clock':_0x1a4293,'start':_0x28e435[_0x36b7ee(0xa00)]??null,'end':_0x28e435[_0x36b7ee(0xc9c)]??null,'created':Date['now'](),'updated':Date[_0x36b7ee(0x555)]()});continue;}const _0x14bbdd=_0x410939(_0x44cb71,_0x451054),_0x4bcdb5=_0x2d10ba[_0x36b7ee(0xbeb)](_0x451054);if(_0x4bcdb5){if(_0x456fed)await _0x456fed[_0x36b7ee(0x92c)](_0x14bbdd,_0x4bcdb5);_0x3ff88e++,await _0x287fcd['put'](_0x25cb68,_0x14bbdd,{'status':_0x36b7ee(0x787),'error':null,'clock':_0x1a4293,'start':_0x28e435['start']??null,'end':_0x28e435['end']??null,'created':Date[_0x36b7ee(0x555)](),'updated':Date[_0x36b7ee(0x555)]()});continue;}const _0x3e9b9d=_0x28e435[_0x36b7ee(0x1fb)]??_0x22fc19['slice'](_0x28e435[_0x36b7ee(0xa00)],_0x28e435[_0x36b7ee(0xc9c)]),{vec:_0x3b4f42,error:_0x44ff51}=await _0x4c7895(_0x14bbdd,_0x3e9b9d);if(!_0x3b4f42){_0x229724['log']?.[_0x36b7ee(0xf78)]?.('[indexer]\x20embed\x20chunk\x20failed\x20for\x20\x22'+_0x44cb71+_0x36b7ee(0x449)+_0x44ff51+'\x20('+_0x28d894+')'),await _0x287fcd[_0x36b7ee(0x92c)](_0x25cb68,_0x14bbdd,{'status':_0x36b7ee(0x1200),'error':_0x44ff51,'clock':_0x1a4293,'start':_0x28e435['start']??null,'end':_0x28e435[_0x36b7ee(0xc9c)]??null,'created':Date[_0x36b7ee(0x555)](),'updated':Date[_0x36b7ee(0x555)]()}),_0x36fe2=!![];continue;}_0x2d10ba['set'](_0x451054,_0x3b4f42),await _0x287fcd[_0x36b7ee(0x92c)](_0x25cb68,_0x14bbdd,{'status':_0x36b7ee(0x787),'error':null,'clock':_0x1a4293,'start':_0x28e435[_0x36b7ee(0xa00)]??null,'end':_0x28e435['end']??null,'created':Date[_0x36b7ee(0x555)](),'updated':Date[_0x36b7ee(0x555)]()});}_0x3ff88e>0x0&&_0x229724['log']?.[_0x36b7ee(0xef)]?.(_0x36b7ee(0x48d)+_0x3ff88e+'/'+_0x322056[_0x36b7ee(0xfb)]+'\x20chunks\x20from\x20hash\x20cache\x20('+_0x44cb71+')');if(_0x36fe2){const _0x377f7d=_0x287fcd['hasType'](_0x25cb68)?[..._0x287fcd['getRange'](_0x25cb68,{'start':_0x44cb71+'\x09','end':_0x44cb71+'\x09ÿ'})]:[],_0x2043f4=_0x377f7d[_0x36b7ee(0x1103)](_0x15d477=>_0x15d477[_0x36b7ee(0x568)][_0x36b7ee(0xfcd)]===_0x36b7ee(0x787))[_0x36b7ee(0x156)],_0x5d0bf5=_0x2043f4>0x0?_0x9ec72f[_0x36b7ee(0xbfe)]:_0x9ec72f[_0x36b7ee(0x1f2)];await _0x21be4b(_0x44cb71,{'status':_0x5d0bf5,'error':_0x36b7ee(0x5c0),'clock':_0x1a4293}),_0x229724[_0x36b7ee(0xea8)][_0x36b7ee(0xf5d)](_0x506cb6[_0x36b7ee(0xd07)],{'engine_key':_0x28d894,'source_key':_0x44cb71,'error':_0x36b7ee(0x5c0)}),_0x229724[_0x36b7ee(0xea8)][_0x36b7ee(0xf5d)](_0x506cb6[_0x36b7ee(0xf06)],{'engine_key':_0x28d894,'source_key':_0x44cb71,'status':_0x5d0bf5,'clock':_0x1a4293});return;}const _0x138488=[..._0x322056['values']()];await _0x21be4b(_0x44cb71,{'status':_0x9ec72f['DONE'],'error':null,'clock':_0x1a4293,'chunks':_0x138488,'chunk_strategy':strategy}),_0x229724[_0x36b7ee(0xea8)][_0x36b7ee(0xf5d)](_0x506cb6[_0x36b7ee(0x1099)],{'engine_key':_0x28d894,'source_key':_0x44cb71,'clock':_0x1a4293}),_0x229724[_0x36b7ee(0xea8)]['emit'](_0x506cb6[_0x36b7ee(0xf06)],{'engine_key':_0x28d894,'source_key':_0x44cb71,'status':_0x9ec72f[_0x36b7ee(0x110a)],'clock':_0x1a4293});}async function _0x5ade7c(_0x25ff54,_0x4f1213,_0x404404){const _0x1dbf7d=_0x1278e7;if(_0x40f08b){const _0x3aee95=_0x14173b[_0x1dbf7d(0xbeb)](_0x2277b3,_0x25ff54);if(_0x3aee95==null)return;const _0x32aacd=_0x4220f8!=null?_0x3aee95?.[_0x4220f8]:_0x3aee95;if(_0x32aacd==null){await _0x21be4b(_0x25ff54,{'status':_0x9ec72f[_0x1dbf7d(0x1f2)],'error':_0x1dbf7d(0x36b)+_0x4220f8+'\x22\x20is\x20missing/null','clock':_0x4f1213});return;}const _0x5d1ff5=_0x4a6380(_0x32aacd,_0x471a98),{strategy:strategy='fixed',size:size=0x200,overlap:overlap=0x40}=_0x7cd0d2,_0x4bf3f4=_0x17c007(_0x5d1ff5,{'strategy':strategy,'size':size,'overlap':overlap});if(_0x4bf3f4[_0x1dbf7d(0x156)]===0x0){await _0x21be4b(_0x25ff54,{'status':_0x9ec72f['FAILED'],'error':_0x1dbf7d(0x671),'clock':_0x4f1213});return;}const _0x2bacc6=_0x4bf3f4[_0x1dbf7d(0x1166)]((_0x5789fe,_0x45952a)=>({'hash':_0x1438ed(_0x5789fe[_0x1dbf7d(0x1fb)]),'index':_0x45952a,'text':_0x5789fe[_0x1dbf7d(0x1fb)],'start':_0x5789fe['start'],'end':_0x5789fe['end']}));await _0x21be4b(_0x25ff54,{'status':_0x9ec72f[_0x1dbf7d(0x11d0)],'error':null,'clock':_0x4f1213,'total_chunks':_0x2bacc6['length'],'chunk_strategy':strategy});const _0x212dbd=_0x287fcd[_0x1dbf7d(0x683)]();if(_0x287fcd[_0x1dbf7d(0x7c0)](_0x25cb68)){const _0x3d7f41=_0x287fcd['getRange'](_0x25cb68,{'start':_0x25ff54+'\x09','end':_0x25ff54+'\x09ÿ'});for(const _0x51844b of _0x3d7f41){_0x212dbd[_0x1dbf7d(0x21e)](_0x25cb68,_0x51844b['key']);}}for(const _0x79c38b of _0x2bacc6){await _0x287fcd[_0x1dbf7d(0x879)][_0x1dbf7d(0xafa)](_0x4c998e,{'engine_key':_0x28d894,'embedder':_0x5707c5,'source_env':_0x168f50,'source_type':_0x2277b3,'source_key':_0x25ff54,'source_version':_0x404404??null,'storage_key':_0x324579,'field':_0x4220f8,'dims':_0x3936f4[_0x1dbf7d(0xa67)]??null,'clock':_0x4f1213,'chunk_hash':_0x79c38b[_0x1dbf7d(0x6f9)],'chunk_index':_0x79c38b['index'],'chunk_text':_0x79c38b[_0x1dbf7d(0x1fb)],'chunk_start':_0x79c38b[_0x1dbf7d(0xa00)],'chunk_end':_0x79c38b[_0x1dbf7d(0xc9c)]},{'txn':_0x212dbd});}await _0x212dbd['commit'](),_0x229724[_0x1dbf7d(0xea8)]['emit'](_0x506cb6[_0x1dbf7d(0xc2b)],{'engine_key':_0x28d894,'source_key':_0x25ff54,'clock':_0x4f1213,'total_chunks':_0x2bacc6[_0x1dbf7d(0x156)]});}else await _0x21be4b(_0x25ff54,{'status':_0x9ec72f[_0x1dbf7d(0x11d0)],'error':null,'clock':_0x4f1213}),await _0x287fcd[_0x1dbf7d(0x879)][_0x1dbf7d(0xafa)](_0x4c998e,{'engine_key':_0x28d894,'embedder':_0x5707c5,'source_env':_0x168f50,'source_type':_0x2277b3,'source_key':_0x25ff54,'source_version':_0x404404??null,'storage_key':_0x324579,'field':_0x4220f8,'dims':_0x3936f4[_0x1dbf7d(0xa67)]??null,'clock':_0x4f1213,'prepare':_0x471a98,'chunk':_0x7cd0d2}),_0x229724['events'][_0x1dbf7d(0xf5d)](_0x506cb6[_0x1dbf7d(0xc2b)],{'engine_key':_0x28d894,'source_key':_0x25ff54,'clock':_0x4f1213});}async function _0x90b3c3(_0x70fc1e,_0x252d54,{drop:drop=![]}={}){const _0xe5f229=_0x1278e7;let _0x15d32a=[];if(_0x40f08b&&_0x287fcd[_0xe5f229(0x7c0)](_0x360f09)){const _0x992a5a=_0x287fcd[_0xe5f229(0xbeb)](_0x360f09,_0x70fc1e);_0x992a5a?.[_0xe5f229(0xfcd)]===_0x9ec72f[_0xe5f229(0x110a)]&&(_0x15d32a=(_0x992a5a[_0xe5f229(0x3a4)]??[])[_0xe5f229(0x1166)](_0x5464b2=>_0x5464b2[_0xe5f229(0x6f9)]));}if(_0x456fed){if(_0x40f08b){const _0x435289=_0x3987fc(_0x70fc1e),_0x18681e=[];for(const {key:_0x5d7491}of _0x456fed['scan']?.(_0x435289)??[]){_0x18681e['push'](_0x5d7491);}if(!_0x456fed[_0xe5f229(0x543)]&&_0x15d32a[_0xe5f229(0x156)]>0x0)for(const _0x3d6be4 of _0x15d32a){_0x18681e[_0xe5f229(0x597)](_0x410939(_0x70fc1e,_0x3d6be4));}for(const _0x50b380 of _0x18681e){try{await _0x456fed['remove'](_0x50b380);}catch{}}}else try{await _0x456fed['remove'](_0x70fc1e);}catch{}}if(drop){if(_0x252d54==null)throw new _0x224ec3(_0xe5f229(0x104a),_0xe5f229(0x10b5));try{await _0x287fcd[_0xe5f229(0x21e)](_0x360f09,_0x70fc1e);}catch{}}else await _0x21be4b(_0x70fc1e,{'status':_0x9ec72f[_0xe5f229(0x761)],'clock':_0x252d54,'chunks':null,'chunk_strategy':null}),_0x229724['events'][_0xe5f229(0xf5d)](_0x506cb6[_0xe5f229(0xf06)],{'engine_key':_0x28d894,'source_key':_0x70fc1e,'status':_0x9ec72f[_0xe5f229(0x761)],'clock':_0x252d54});return drop?null:_0x287fcd[_0xe5f229(0xbeb)](_0x360f09,_0x70fc1e);}const _0x293ce3=_0x28d894,_0x268303=_0x1278e7(0x502)+_0x28d894,_0x172982=_0x14173b[_0x1278e7(0xf39)];if(_0x172982[_0x1278e7(0x1c3)](_0x293ce3)===0x0){const _0x45fe67=_0x172982[_0x1278e7(0x1c3)](_0x268303),_0x492dfc=_0x323aeb[_0x1278e7(0x654)]?.['lastSeenClock']??0x0,_0xc8fe0b=_0x45fe67||_0x492dfc;if(_0xc8fe0b>0x0){_0x172982[_0x1278e7(0xeab)]();try{_0x172982[_0x1278e7(0xb3e)][_0x1278e7(0xb6f)](_0x293ce3,_0xc8fe0b);}catch{}}else{if(_0x2afa54===_0x1278e7(0x879)&&_0x14173b[_0x1278e7(0x5ea)](_0x2277b3)===0x0&&_0x287fcd[_0x1278e7(0x7c0)](_0x360f09)){const _0x1cb3ac=_0x14173b['getCount'](_0x2277b3);let _0x36d6a0=0x0;for(const {value:_0x311fb3}of _0x287fcd['getRange'](_0x360f09)){if(_0x311fb3?.['status']===_0x9ec72f['DONE'])_0x36d6a0++;}_0x1cb3ac>0x0&&_0x36d6a0>=_0x1cb3ac&&_0x172982[_0x1278e7(0x16c)](_0x293ce3);}}}const _0x2be008=async _0x3c9de9=>{const _0x2a363c=_0x1278e7;for(const _0x503831 of _0x3c9de9){if(_0x22a8bb[_0x2a363c(0xd45)])break;if(_0x503831[_0x2a363c(0x942)]===_0x3d68b9[_0x2a363c(0x719)]){if(_0x2afa54===_0x2a363c(0x10aa)){const _0x3a96de=_0x14173b[_0x2a363c(0xbeb)](_0x2277b3,_0x503831[_0x2a363c(0x9dd)]);await _0x3d7c4c(_0x503831[_0x2a363c(0x9dd)],_0x3a96de,_0x503831[_0x2a363c(0x114d)]);}else await _0x5ade7c(_0x503831[_0x2a363c(0x9dd)],_0x503831['clock'],_0x503831[_0x2a363c(0x45c)]);}else _0x503831[_0x2a363c(0x942)]===_0x3d68b9[_0x2a363c(0x1b8)]&&_0x28c68b&&await _0x90b3c3(_0x503831[_0x2a363c(0x9dd)],_0x503831[_0x2a363c(0x114d)]);_0x2f2e84=_0x503831[_0x2a363c(0x114d)];}_0x229724[_0x2a363c(0xea8)][_0x2a363c(0xf5d)](_0x506cb6[_0x2a363c(0xc0c)]+'@'+_0x28d894,{'engine_key':_0x28d894}),_0x229724[_0x2a363c(0xea8)][_0x2a363c(0xf5d)](_0x506cb6['INDEXER_FLUSHED'],{'engine_key':_0x28d894});const _0x303a65=_0x14173b[_0x2a363c(0x5ea)](_0x2277b3)||0x0;_0x2f2e84>=_0x303a65&&(_0x229724[_0x2a363c(0xea8)][_0x2a363c(0xf5d)](_0x506cb6[_0x2a363c(0x648)]+'@'+_0x28d894,{'engine_key':_0x28d894}),_0x229724['events']['emit'](_0x506cb6[_0x2a363c(0x648)],{'engine_key':_0x28d894}));},_0x2201c4=()=>{const _0x19357c=_0x1278e7,_0x23919e=_0x28d894['includes']('@')?_0x28d894[_0x19357c(0xc3c)](_0x28d894['indexOf']('@')+0x1):_0x324579,_0xd1e86e=_0x229724[_0x19357c(0xab8)][_0x19357c(0xdd5)](_0xf72817[_0x19357c(0x5a3)],_0x23919e),_0x2a9f65=_0xd1e86e?.[_0x19357c(0x1f5)]?.[_0x19357c(0x1147)]?.()??-0x1,_0x3279a9=_0x172982[_0x19357c(0x1c3)](_0x293ce3),_0x2b6293=_0x14173b[_0x19357c(0x7c0)](_0x2277b3)?_0x14173b[_0x19357c(0x7df)](_0x2277b3):0x0,_0x35f4cc=_0x287fcd['hasType'](_0x360f09)?_0x287fcd[_0x19357c(0x7df)](_0x360f09):0x0;_0x3279a9>0x0&&(_0x2a9f65===0x0&&_0x2b6293>0x0||_0x35f4cc===0x0&&_0x2b6293>0x0)&&(_0x229724['log']?.[_0x19357c(0xf78)]?.(_0x19357c(0x916)+_0x3279a9+_0x19357c(0x84e)+('resetting\x20to\x200\x20and\x20re-embedding\x20all\x20documents\x20('+_0x28d894+').')),_0x172982[_0x19357c(0xcec)](_0x293ce3),_0x2f2e84=0x0),_0x22a8bb[_0x19357c(0x2ba)]=_0x172982[_0x19357c(0x2a4)](_0x2277b3,{'mode':_0x19357c(0x1006),'bootstrap':_0x19357c(0x33f),'originMode':'all','batchSize':_0x844d5d,'hydrateValues':![],'cursorKey':_0x293ce3,'lockMode':_0x19357c(0x7f3),'name':_0x2afa54===_0x19357c(0x879)?_0x4c998e:_0x28d894,'handler':_0x2be008});};return _0x229724[_0x1278e7(0x10e2)]===_0x52742e[_0x1278e7(0x2b1)]?_0x2201c4():_0x229724['events']['once'](_0x5458e0[_0x1278e7(0x21f)],_0x2201c4),{'_storage':_0x456fed,'_hashVecCache':_0x2d10ba,'_typeEnv':_0x287fcd,'_chunkStatusType':_0x25cb68,async 'flush'(){const _0x169f1f=_0x1278e7,_0x15ab92=0x7530,_0x1a5c57=Date['now']();while(Date[_0x169f1f(0x555)]()-_0x1a5c57<_0x15ab92){await new Promise(_0x24ff25=>setTimeout(_0x24ff25,0x14));const _0x56e67e=_0x172982[_0x169f1f(0x1c3)](_0x293ce3),_0x2e1160=_0x14173b['getClock'](_0x2277b3)||0x0;if(_0x56e67e>=_0x2e1160&&_0x2e1160>0x0)break;if(_0x56e67e>=_0x2e1160)break;}},async 'stats'(){const _0x315a9e=_0x1278e7,_0x27ccaf=_0x172982['getCursor'](_0x293ce3),_0x6defd6={'pending':0x0,'done':0x0,'failed':0x0,'deleted':0x0};if(_0x287fcd['hasType'](_0x360f09))for(const {value:_0x67c36c}of _0x287fcd[_0x315a9e(0x9ce)](_0x360f09)){if(!_0x67c36c)continue;const _0x86dc2c=_0x67c36c[_0x315a9e(0xfcd)];if(_0x86dc2c in _0x6defd6)_0x6defd6[_0x86dc2c]++;}return _0x6defd6['total']=_0x6defd6[_0x315a9e(0x178)]+_0x6defd6[_0x315a9e(0x787)]+_0x6defd6[_0x315a9e(0x1200)]+_0x6defd6[_0x315a9e(0x9ef)],{'engine_key':_0x28d894,'mode':_0x2afa54,'source_type':_0x2277b3,'embedder':_0x5707c5,'storage_key':_0x324579,'job_type':_0x2afa54===_0x315a9e(0x879)?_0x4c998e:null,'last_seen_clock':_0x27ccaf,'head_clock':_0x14173b['getClock'](_0x2277b3)||0x0,'processor_cursor':_0x27ccaf,'vector_count':_0x456fed?.[_0x315a9e(0x1147)]?.()??null,'doc_counts':_0x6defd6,..._0x471a98!==_0x315a9e(0x11cc)?{'prepare':_0x471a98}:{},..._0x40f08b?{'chunk':_0x7cd0d2}:{}};},async 'getDocStatus'(_0x5b210c){const _0x9d11f=_0x1278e7;if(!_0x287fcd['hasType'](_0x360f09))return null;return _0x287fcd[_0x9d11f(0xbeb)](_0x360f09,_0x5b210c)??null;},async 'listDocStatus'({status:status=null,limit:limit=0x64}={}){const _0x257212=_0x1278e7,_0x40f7b0=Math['max'](0x1,Math[_0x257212(0x2dc)](0x3e8,Math[_0x257212(0xcc)](limit)));if(!_0x287fcd[_0x257212(0x7c0)](_0x360f09))return[];const _0x2a635c=[];for(const {key:_0x22b3df,value:_0x59e79f}of _0x287fcd[_0x257212(0x9ce)](_0x360f09)){if(!_0x59e79f)continue;if(status&&_0x59e79f[_0x257212(0xfcd)]!==status)continue;const _0x41d7d5={'key':_0x22b3df,..._0x59e79f};if((_0x59e79f[_0x257212(0x78e)]??0x0)>0x0&&_0x287fcd[_0x257212(0x7c0)](_0x25cb68)){const _0x29f568=[..._0x287fcd[_0x257212(0x9ce)](_0x25cb68,{'start':_0x22b3df+'\x09','end':_0x22b3df+'\x09ÿ'})];_0x41d7d5[_0x257212(0xca3)]=_0x29f568['filter'](_0x3bac3d=>_0x3bac3d['value']['status']==='done')['length'],_0x41d7d5[_0x257212(0x8c2)]=_0x29f568[_0x257212(0x1103)](_0x2493db=>_0x2493db[_0x257212(0x568)][_0x257212(0xfcd)]==='failed')[_0x257212(0x156)],_0x41d7d5[_0x257212(0x10ce)]=_0x59e79f[_0x257212(0x78e)]-_0x41d7d5[_0x257212(0xca3)]-_0x41d7d5[_0x257212(0x8c2)];}_0x2a635c[_0x257212(0x597)](_0x41d7d5);if(_0x2a635c[_0x257212(0x156)]>=_0x40f7b0)break;}return _0x2a635c;},async 'markDone'(_0x2a68aa,{vector:_0x2eff73,clock:clock=null,chunks:chunks=null,chunk_strategy:chunk_strategy=null}={}){const _0x3a8d76=_0x1278e7;if(!chunks&&!_0x2eff73);else{if(!chunks){if(!(_0x2eff73 instanceof Float32Array))throw new _0x224ec3(_0x3a8d76(0x1197),_0x3a8d76(0x6d5));if(_0x456fed)await _0x456fed[_0x3a8d76(0x92c)](_0x2a68aa,_0x2eff73);}}if(chunks&&_0x287fcd[_0x3a8d76(0x7c0)](_0x360f09)){const _0x18e750=_0x287fcd[_0x3a8d76(0xbeb)](_0x360f09,_0x2a68aa);_0x18e750?.[_0x3a8d76(0xfcd)]===_0x9ec72f[_0x3a8d76(0x110a)]&&(_0x18e750[_0x3a8d76(0x3a4)]??[])['map'](_0x3e9eb2=>_0x3e9eb2['hash']);}const _0x5b3476=await _0x21be4b(_0x2a68aa,{'status':_0x9ec72f['DONE'],'error':null,'clock':clock,...chunks?{'chunks':chunks}:{},...chunk_strategy?{'chunk_strategy':chunk_strategy}:{}});return _0x229724['events'][_0x3a8d76(0xf5d)](_0x506cb6['INDEXER_DOC_DONE'],{'engine_key':_0x28d894,'source_key':_0x2a68aa,'clock':clock}),_0x5b3476;},async 'markFail'(_0x48d832,_0x411704,{clock:clock=null}={}){return _0x21be4b(_0x48d832,{'status':_0x9ec72f['FAILED'],'error':_0x4b9a61(_0x411704),'clock':clock});},async 'markDelete'(_0x3c95ac,{clock:clock=null,drop:drop=![]}={}){return _0x90b3c3(_0x3c95ac,clock,{'drop':drop});},async 'retryDoc'(_0x5101df){const _0x8b6294=_0x1278e7;if(_0x2afa54!==_0x8b6294(0x879)){const {OKDBError:_0x593b75}=requireOkdbError();throw new _0x593b75(_0x8b6294(0xb10),_0x8b6294(0x10d7));}const _0x34dda0=_0x14173b[_0x8b6294(0xbeb)](_0x2277b3,_0x5101df);if(_0x34dda0==null)return _0x90b3c3(_0x5101df,null);const _0x2daa3b=_0x287fcd[_0x8b6294(0x7c0)](_0x360f09)?_0x287fcd['getEntry'](_0x360f09,_0x5101df):null,_0x1cde5e=_0x2daa3b?.[_0x8b6294(0x568)]?.['clock']??null;return await _0x5ade7c(_0x5101df,_0x1cde5e,null),{'retried':0x1,'source_key':_0x5101df};},async 'retryFailed'({limit:limit=0x3e8,includeStuckPending:includeStuckPending=![]}={}){const _0x1e8fb2=_0x1278e7;if(_0x2afa54!=='queue'){const {OKDBError:_0x112262}=requireOkdbError();throw new _0x112262(_0x1e8fb2(0x7ae),'NOT_SUPPORTED');}const _0x3a7aaa=Math[_0x1e8fb2(0x10bf)](0x1,Math[_0x1e8fb2(0x2dc)](0x2710,Math[_0x1e8fb2(0xcc)](Number(limit)||0x3e8))),_0x6e4da3=[];if(_0x287fcd[_0x1e8fb2(0x7c0)](_0x360f09))for(const {value:_0xd1f090}of _0x287fcd[_0x1e8fb2(0x9ce)](_0x360f09)){if(!_0xd1f090)continue;const _0x1126c9=_0xd1f090[_0x1e8fb2(0xfcd)];if(_0x1126c9===_0x9ec72f[_0x1e8fb2(0x1f2)]||includeStuckPending&&_0x1126c9===_0x9ec72f[_0x1e8fb2(0x11d0)]){_0x6e4da3[_0x1e8fb2(0x597)](_0xd1f090);if(_0x6e4da3[_0x1e8fb2(0x156)]>=_0x3a7aaa)break;}}let _0x2857d4=0x0,_0x3b601e=0x0;for(const _0x5adc41 of _0x6e4da3){const {source_key:_0x3791b4,clock:_0x5d00dc}=_0x5adc41,_0x47fae9=_0x14173b[_0x1e8fb2(0xbeb)](_0x2277b3,_0x3791b4);if(_0x47fae9==null){try{await _0x90b3c3(_0x3791b4,_0x5d00dc??null),_0x3b601e++;}catch{}continue;}try{await _0x5ade7c(_0x3791b4,_0x5d00dc??null,null),_0x2857d4++;}catch{}}return{'retried':_0x2857d4,'deleted':_0x3b601e};}};},async 'uninstall'(_0xf78576){const _0x4c1786=_0x3c6901,{config:_0x393eb7,key:_0x45bed4,okdb:_0x48cf2d}=_0xf78576,_0x744ee0=_0x393eb7?.['source_type'],_0x5d3738=_0x393eb7?.[_0x4c1786(0x43a)]??'default',_0x1815f5=_0x393eb7?.[_0x4c1786(0x1cc)];if(!_0x744ee0||!_0x1815f5)return;const _0x1b6cdc=_0xc24ed7?await _0xc24ed7(_0x5d3738,_0x744ee0)[_0x4c1786(0x415)](()=>null):_0x48cf2d;if(!_0x1b6cdc)return;const _0x46bbef=_0x4c1786(0x78f)+_0x1815f5;if(!_0x1b6cdc['hasType'](_0x46bbef)){_0x48cf2d[_0x4c1786(0x9be)]?.[_0x4c1786(0x26c)]?.(_0x4c1786(0xed7)+_0x45bed4+_0x4c1786(0xebd));return;}const _0x4849d7=[];for(const {key:_0xdc968b}of _0x1b6cdc[_0x4c1786(0x9ce)](_0x46bbef)){_0x4849d7[_0x4c1786(0x597)](_0xdc968b);}for(const _0x3ec648 of _0x4849d7){try{await _0x1b6cdc[_0x4c1786(0x21e)](_0x46bbef,_0x3ec648);}catch{}}_0x48cf2d[_0x4c1786(0x9be)]?.[_0x4c1786(0x26c)]?.(_0x4c1786(0xed7)+_0x45bed4+_0x4c1786(0x9d)+_0x4849d7[_0x4c1786(0x156)]+_0x4c1786(0xfcf));},async 'stop'(_0x58b165){const _0x2c2a0e=_0x3c6901,_0x44ae4f=_0x5a4991[_0x2c2a0e(0xbeb)](_0x58b165['key']);if(!_0x44ae4f)return;_0x44ae4f['stopped']=!![];if(_0x44ae4f['stopProcessor'])try{await _0x44ae4f[_0x2c2a0e(0x2ba)]();}catch{}for(const [_0x540d2b,_0x523312]of _0x44ae4f[_0x2c2a0e(0x498)])_0x58b165[_0x2c2a0e(0xd4f)][_0x2c2a0e(0xea8)]['off'](_0x540d2b,_0x523312);_0x44ae4f['subs']=[],_0x5a4991[_0x2c2a0e(0x3b3)](_0x58b165[_0x2c2a0e(0x9dd)]),_0x58b165['okdb'][_0x2c2a0e(0x9be)]?.[_0x2c2a0e(0x26c)]?.(_0x2c2a0e(0xd19)+_0x58b165['key']);}};},indexer;}var algorithmWorker,hasRequiredAlgorithmWorker;function requireAlgorithmWorker(){const _0x2d27f2=_0xef8cd8;if(hasRequiredAlgorithmWorker)return algorithmWorker;hasRequiredAlgorithmWorker=0x1;const {Worker:_0x440ff3}=require$$0$a,_0x2e6c8e=require$$1$2,_0x35b0ca=_0x2e6c8e[_0x2d27f2(0x3d9)](__dirname,_0x2d27f2(0x516));function _0x5910db(_0x42da22,_0x47f964,{dims:_0xc7ec22,dir:_0x1ee0bb}){let _0x25d1fd=null,_0x178aa2=0x1,_0x2f1e71=![],_0x3b43ac=null;const _0x4e2833=new Map();let _0x40f0b3=0x0,_0x3e348c={'algorithm':_0x42da22,'count':0x0};const _0x5a4941=0x64,_0xbe8d10=[];let _0x51a366=0x0,_0x24bacc=null,_0x715aa8,_0x566f4b;const _0x378079=new Promise((_0x433547,_0x32093)=>{_0x715aa8=_0x433547,_0x566f4b=_0x32093;});function _0x1cb949(_0x117cb1){const _0x244bd9=_0x47ab;if(_0x117cb1 instanceof Error)return _0x117cb1;return new Error(_0x117cb1?.[_0x244bd9(0xb4e)]||String(_0x117cb1));}function _0x5824f3(_0x5eefeb){const _0x384404=_0x47ab,_0x175156=_0x1cb949(_0x5eefeb);_0x3b43ac=_0x175156;!_0x2f1e71&&_0x566f4b(_0x175156);for(const [,_0x4366d4]of _0x4e2833){_0x4366d4[_0x384404(0xc74)](_0x175156);}_0x4e2833[_0x384404(0x859)]();}function _0x3cdc9c(){const _0x47a24c=_0x47ab;_0x25d1fd=new _0x440ff3(_0x35b0ca,{'workerData':{'algorithmName':_0x42da22,'algorithmConfig':_0x47f964,'dims':_0xc7ec22,'dir':_0x1ee0bb}}),_0x25d1fd['on']('message',_0x183018=>{const _0x4e6b91=_0x47ab;if(_0x183018['op']===_0x4e6b91(0x1034)){_0x40f0b3=_0x183018[_0x4e6b91(0x1147)]??_0x40f0b3,_0x3e348c=_0x183018['info']??_0x3e348c;if(_0x183018[_0x4e6b91(0x5fc)])_0x24bacc=_0x183018['memory'];return;}if(_0x183018['op']===_0x4e6b91(0x8f0)){_0x2f1e71=!![],_0x715aa8();return;}const _0x1e4c2a=_0x4e2833[_0x4e6b91(0xbeb)](_0x183018['id']);if(!_0x1e4c2a)return;_0x4e2833[_0x4e6b91(0x3b3)](_0x183018['id']);if(_0x183018['error']){const _0xb33fa5=new Error(_0x183018[_0x4e6b91(0x225)][_0x4e6b91(0xb4e)]);if(_0x183018['error'][_0x4e6b91(0x1f8)])_0xb33fa5[_0x4e6b91(0x1f8)]=_0x183018[_0x4e6b91(0x225)]['code'];_0x1e4c2a[_0x4e6b91(0xc74)](_0xb33fa5);}else _0x1e4c2a[_0x4e6b91(0x797)](_0x183018[_0x4e6b91(0x80e)]);}),_0x25d1fd['on'](_0x47a24c(0x225),_0x38c39d=>{_0x5824f3(_0x38c39d);}),_0x25d1fd['on'](_0x47a24c(0x5e6),_0x357934=>{const _0x50d61d=_0x47a24c,_0x5a2e3f=new Error(_0x50d61d(0xe4b)+_0x357934);if(!_0x2f1e71&&!_0x3b43ac)_0x5824f3(_0x5a2e3f);else{for(const [,_0x1880c9]of _0x4e2833){_0x1880c9[_0x50d61d(0xc74)](_0x5a2e3f);}_0x4e2833[_0x50d61d(0x859)]();}_0x25d1fd=null,_0x2f1e71=![];});}function _0x391f22(_0x445412,_0x4cc2c5={}){const _0x46fa69=_0x47ab;if(_0x3b43ac)return Promise[_0x46fa69(0xc74)](_0x3b43ac);if(!_0x25d1fd)return Promise['reject'](new Error(_0x46fa69(0x61b)));const _0x29803f=_0x178aa2++;return new Promise((_0x2d6f32,_0x1cb823)=>{const _0x1fd9c1=_0x46fa69;_0x4e2833[_0x1fd9c1(0x211)](_0x29803f,{'resolve':_0x2d6f32,'reject':_0x1cb823}),_0x25d1fd[_0x1fd9c1(0xda0)]({'id':_0x29803f,'op':_0x445412,'args':_0x4cc2c5});});}return _0x3cdc9c(),{'ready'(){return _0x378079;},async 'load'(_0x59dea8){const _0x509cd2=_0x47ab;await _0x378079;const _0x41f4e2=_0x59dea8?await _0x59dea8():[],_0x50d2c8=_0x41f4e2['map'](_0x3dc4da=>({'key':_0x3dc4da[_0x509cd2(0x9dd)],'vector':Array[_0x509cd2(0x9f8)](_0x3dc4da[_0x509cd2(0xe59)])}));await _0x391f22(_0x509cd2(0x7c9),{'vectors':_0x50d2c8});},async 'add'(_0x1a028b,_0x444b23,_0x187ae6){await _0x391f22('add',{'key':_0x1a028b,'vector':Array['from'](_0x444b23),'clock':_0x187ae6});},async 'remove'(_0x3e4ed6){const _0x9991fe=_0x47ab;await _0x391f22(_0x9991fe(0x21e),{'key':_0x3e4ed6});},async 'search'(_0x55e3d7,_0x10b9bf={}){const _0x2162d0=_0x47ab,_0x56b3ca=Date[_0x2162d0(0x555)](),_0x3ec342=await _0x391f22('search',{'queryVec':Array['from'](_0x55e3d7),'opts':_0x10b9bf}),_0x18ef85=Date[_0x2162d0(0x555)]()-_0x56b3ca;_0xbe8d10['push'](_0x18ef85);if(_0xbe8d10['length']>_0x5a4941)_0xbe8d10[_0x2162d0(0x9fc)]();return _0x51a366++,_0x3ec342;},async 'snapshot'(_0x26471a){const _0x4a83df=_0x47ab;return _0x391f22(_0x4a83df(0x33f),{'clock':_0x26471a});},async 'rebuild'(_0x2e8edb){const _0x24b328=_0x47ab,_0x53f345=_0x2e8edb?await _0x2e8edb():[],_0x3a5c6c=_0x53f345[_0x24b328(0x1166)](_0x1e0361=>({'key':_0x1e0361[_0x24b328(0x9dd)],'vector':Array[_0x24b328(0x9f8)](_0x1e0361[_0x24b328(0xe59)])}));await _0x391f22(_0x24b328(0x11ab),{'vectors':_0x3a5c6c});},async 'stop'(){const _0x432220=_0x47ab;if(!_0x25d1fd)return;try{await _0x391f22(_0x432220(0x1fe),{});}catch{}try{await _0x25d1fd?.['terminate']();}catch{}_0x25d1fd=null,_0x2f1e71=![];},'count'(){return _0x40f0b3;},'info'(){const _0x16214c=_0x47ab;let _0x24677e=null,_0x2501fe=null;if(_0xbe8d10[_0x16214c(0x156)]>0x0){const _0x35a957=_0xbe8d10[_0x16214c(0xc3c)]()['sort']((_0x1b0f8c,_0x33656e)=>_0x1b0f8c-_0x33656e);_0x24677e=Math[_0x16214c(0xc66)](_0x35a957[_0x16214c(0xce)]((_0xcce2d5,_0x1e9c9b)=>_0xcce2d5+_0x1e9c9b,0x0)/_0x35a957[_0x16214c(0x156)]),_0x2501fe=_0x35a957[Math[_0x16214c(0xf9a)](_0x35a957[_0x16214c(0x156)]*0.95)]??_0x35a957[_0x35a957['length']-0x1];}return{..._0x3e348c,'workerMetrics':{'pendingOps':_0x4e2833['size'],'searchOps':_0x51a366,'searchLatencyAvgMs':_0x24677e,'searchLatencyP95Ms':_0x2501fe,'workerMemory':_0x24bacc}};}};}return algorithmWorker=_0x5910db,algorithmWorker;}var search,hasRequiredSearch;function requireSearch(){if(hasRequiredSearch)return search;hasRequiredSearch=0x1;const _0xd254ec=require$$1$2,{OKDBError:_0x2bec95}=requireOkdbError(),{ENGINE_TYPES:_0x14787a}=requireEnums(),_0x394d41=requireAlgorithmWorker();return search=function _0x1f795a({resolveStorage:_0xf691ae,resolveAlgorithm:_0x5d10c3,resolveTypeEnv:_0x2bea4d}){const _0x4445c4=_0x47ab,_0x5b83e4=new Map();return{'docs':{'summary':_0x4445c4(0x119d),'description':_0x4445c4(0x7e9),'standalone':!![],'pipelineCompatible':!![],'scope':_0x4445c4(0x30b),'configSchema':{'type':'object','required':[_0x4445c4(0x1cc)],'properties':{'source_type':{'type':_0x4445c4(0xf7a)},'source_env':{'type':_0x4445c4(0xf7a)},'storage_key':{'type':_0x4445c4(0xf7a)},'dims':{'type':_0x4445c4(0x10f2),'minimum':0x1},'embedder':{'type':_0x4445c4(0xf7a)},'algorithm':{'type':_0x4445c4(0xf7a),'description':'Search\x20algorithm\x20name\x20such\x20as\x20\x22flat\x22\x20or\x20\x22hnsw\x22.'},'algorithm_config':{'type':_0x4445c4(0xb36),'additionalProperties':!![]},'dir':{'type':_0x4445c4(0xf7a)}},'additionalProperties':!![]},'configExample':{'source_type':_0x4445c4(0xb8),'source_env':'default','storage_key':_0x4445c4(0xb8),'embedder':'articles-embedder','algorithm':'hnsw','algorithm_config':{'M':0x10,'efConstruction':0xc8,'efSearch':0x40}},'notes':[_0x4445c4(0xc39),_0x4445c4(0x77a)],'links':['/api/embeddings/algorithms',_0x4445c4(0x10ed)]},'patchConfig'(_0x36d136,_0x4b9eff){const _0x4cd431=_0x4445c4,_0x297918=[_0x4cd431(0x1cc),_0x4cd431(0xa67),_0x4cd431(0x481),_0x4cd431(0x43a)];for(const _0x20b381 of _0x297918){if(_0x20b381 in _0x4b9eff&&_0x4b9eff[_0x20b381]!==undefined&&_0x4b9eff[_0x20b381]!==_0x36d136[_0x20b381])throw new _0x2bec95(_0x4cd431(0x23f)+_0x20b381+_0x4cd431(0x64a),_0x4cd431(0xc63));}return{..._0x36d136,..._0x4b9eff};},'validate'(_0x4e0b37){const _0x97358c=_0x4445c4;if(!_0x4e0b37||typeof _0x4e0b37!=='object')throw new _0x2bec95(_0x97358c(0xc6d),'BAD_CONFIG');if(!_0x4e0b37[_0x97358c(0x1cc)]||typeof _0x4e0b37['storage_key']!==_0x97358c(0xf7a))throw new _0x2bec95(_0x97358c(0xdc2),_0x97358c(0xb0f));if(_0x4e0b37[_0x97358c(0xa67)]!==undefined&&(!Number[_0x97358c(0x474)](_0x4e0b37['dims'])||_0x4e0b37[_0x97358c(0xa67)]<=0x0))throw new _0x2bec95(_0x97358c(0x843),_0x97358c(0xb0f));if(_0x4e0b37[_0x97358c(0x37b)]!==undefined&&typeof _0x4e0b37[_0x97358c(0x37b)]!==_0x97358c(0xf7a))throw new _0x2bec95(_0x97358c(0xc86),_0x97358c(0xb0f));const _0x5e3a27=_0x4e0b37[_0x97358c(0x7fc)]??_0x97358c(0x103f);if(typeof _0x5e3a27!==_0x97358c(0xf7a))throw new _0x2bec95('vector-search\x20config.algorithm\x20must\x20be\x20a\x20string',_0x97358c(0xb0f));if(_0x4e0b37[_0x97358c(0x82f)]!==undefined&&(typeof _0x4e0b37[_0x97358c(0x82f)]!==_0x97358c(0xb36)||!_0x4e0b37[_0x97358c(0x82f)]))throw new _0x2bec95(_0x97358c(0xdbc),_0x97358c(0xb0f));},async 'start'(_0x46528a){const _0xfa7bb3=_0x4445c4,{config:_0x21f955,key:_0x4f037b,okdb:_0x22deed}=_0x46528a,_0x374316=_0x21f955[_0xfa7bb3(0x481)]??null,_0xc8ffa0=_0x21f955[_0xfa7bb3(0x43a)]??_0xfa7bb3(0x8d0),_0x339a31=_0x21f955[_0xfa7bb3(0x1cc)],_0x5293fc=_0x21f955[_0xfa7bb3(0x37b)]??null,_0x93c64b=_0x21f955[_0xfa7bb3(0x7fc)]??'flat',_0x238920=_0x21f955[_0xfa7bb3(0x82f)]??{};function _0x2647a4(_0x564dc4){return Number['isInteger'](_0x564dc4)&&_0x564dc4>0x0?_0x564dc4:null;}function _0x5f13a2(){const _0x273477=_0xfa7bb3,_0x2906a6=[];if(_0x5293fc){const _0x130905=_0x22deed[_0x273477(0xab8)][_0x273477(0xf83)](_0x14787a['EMBEDDER'],_0x5293fc);_0x2906a6[_0x273477(0x597)](_0x130905?.[_0x273477(0xad3)]?.[_0x273477(0x142)]?.[_0x273477(0xa67)]);}const _0x5e459a=_0x22deed['_envs']?.[_0x273477(0xbeb)]?.(_0xc8ffa0)??null,_0x464e00=_0x5e459a?.[_0x273477(0xab8)]?.['list']?_0x5e459a['engines'][_0x273477(0x63e)]():[];for(const _0x146c09 of _0x464e00){if(!_0x146c09||_0x146c09[_0x273477(0x9dd)]===_0x4f037b)continue;if(_0x146c09[_0x273477(0xaee)]!==_0x14787a[_0x273477(0xb28)]&&_0x146c09['type']!==_0x14787a[_0x273477(0x5a3)])continue;const _0x89a485=_0x146c09[_0x273477(0xad3)]?.[_0x273477(0x142)]??{};if(_0x89a485[_0x273477(0x1cc)]!==_0x339a31)continue;if((_0x89a485['source_env']??_0xc8ffa0)!==_0xc8ffa0)continue;if(_0x374316&&(_0x89a485['source_type']??null)!==_0x374316)continue;_0x2906a6['push'](_0x89a485['dims']);}for(const _0x57cc61 of _0x2906a6){const _0x43edee=_0x2647a4(_0x57cc61);if(_0x43edee!=null)return _0x43edee;}return null;}let _0x55c0b3=_0x21f955[_0xfa7bb3(0xa67)]??null;if(_0x55c0b3==null&&_0x5293fc){const _0x4d9b2d=_0x22deed[_0xfa7bb3(0xab8)]['getRunningEngine'](_0x14787a[_0xfa7bb3(0x1d1)],_0x5293fc)?.['api'];_0x55c0b3=_0x4d9b2d?.['dims']??null;}_0x55c0b3==null&&(_0x55c0b3=_0x5f13a2());if(!Number[_0xfa7bb3(0x474)](_0x55c0b3)||_0x55c0b3<=0x0)throw new _0x2bec95(_0xfa7bb3(0x47f)+_0x4f037b+_0xfa7bb3(0xb95)+('Set\x20config.dims\x20explicitly,\x20or\x20ensure\x20the\x20embedder\x20engine\x20\x22'+(_0x5293fc??_0xfa7bb3(0xe6f))+'\x22\x20')+_0xfa7bb3(0x9fa),_0xfa7bb3(0xb0f));_0x21f955[_0xfa7bb3(0xa67)]==null&&typeof _0x46528a['updateConfig']==='function'&&await _0x46528a[_0xfa7bb3(0xaf7)]({'dims':_0x55c0b3});const _0x280d04=_0x5d10c3?_0x5d10c3(_0x93c64b):null;if(!_0x280d04)throw new _0x2bec95(_0xfa7bb3(0x277)+_0x93c64b+'\x22.\x20'+('Register\x20it\x20with\x20okdb.embeddings.registerAlgorithmFactory(\x27'+_0x93c64b+_0xfa7bb3(0x1ca)),'UNKNOWN_ALGORITHM');const _0x102fed=_0x21f955[_0xfa7bb3(0x3e0)]??_0xd254ec[_0xfa7bb3(0x3d9)](_0x22deed['path'],_0xfa7bb3(0x115f),_0x4f037b[_0xfa7bb3(0x8d8)](/[^a-zA-Z0-9_-]/g,'_')),_0x37b69d=_0x394d41(_0x93c64b,_0x238920,{'dims':_0x55c0b3,'dir':_0x102fed}),_0x8d8eb3=_0xf691ae?_0xf691ae(_0x339a31,_0x22deed,_0xc8ffa0,_0x374316):null,_0x3f01ce=_0x8d8eb3?.[_0xfa7bb3(0xdc7)]?()=>_0x8d8eb3[_0xfa7bb3(0xdc7)]():()=>Promise[_0xfa7bb3(0x797)]([]);await _0x37b69d[_0xfa7bb3(0x8f0)]();let _0x295b25=null;try{_0x295b25=await _0x37b69d[_0xfa7bb3(0x7c9)](_0x3f01ce);}catch(_0x339430){_0x22deed['log']?.[_0xfa7bb3(0xf78)]?.(_0xfa7bb3(0xbc4)+_0x4f037b+_0xfa7bb3(0xc31),_0x339430?.[_0xfa7bb3(0xb4e)]||_0x339430);}if(_0x295b25!=null&&_0x8d8eb3?.[_0xfa7bb3(0x7fe)])try{const _0x333820=await _0x8d8eb3[_0xfa7bb3(0x7fe)](_0x295b25);for(const _0x173f09 of _0x333820){if(_0x173f09[_0xfa7bb3(0x942)]===_0xfa7bb3(0x21e))await _0x37b69d['remove'](_0x173f09[_0xfa7bb3(0x9dd)]);else _0x173f09['vector']&&await _0x37b69d[_0xfa7bb3(0x33c)](_0x173f09[_0xfa7bb3(0x9dd)],_0x173f09[_0xfa7bb3(0xe59)]);}_0x333820['length']>0x0&&_0x22deed[_0xfa7bb3(0x9be)]?.[_0xfa7bb3(0x26c)]?.(_0xfa7bb3(0xc3)+_0x333820[_0xfa7bb3(0x156)]+_0xfa7bb3(0xbe8)+_0x4f037b+'\x22\x20'+(_0xfa7bb3(0x1df)+_0x295b25+')'));}catch(_0x371641){_0x22deed[_0xfa7bb3(0x9be)]?.[_0xfa7bb3(0xf78)]?.(_0xfa7bb3(0x813)+_0x4f037b+_0xfa7bb3(0x708)+_0xfa7bb3(0x4d8),_0x371641?.[_0xfa7bb3(0xb4e)]||_0x371641);}_0x22deed[_0xfa7bb3(0x9be)]?.['info']?.(_0xfa7bb3(0x113a)+_0x4f037b+'\x20—\x20'+(_0xfa7bb3(0xdd8)+_0x93c64b+_0xfa7bb3(0xce4)+_0x55c0b3+',\x20')+(_0xfa7bb3(0x591)+_0x37b69d[_0xfa7bb3(0x1147)]()+',\x20storage='+_0x339a31));let _0x525204=null;if(_0x2bea4d&&_0x374316)try{const _0x452d05=await _0x2bea4d(_0xc8ffa0,_0x374316),_0x113ab2=_0xfa7bb3(0xd13)+_0x339a31;_0x452d05&&_0x452d05[_0xfa7bb3(0xf39)]&&(_0x525204=_0x452d05[_0xfa7bb3(0xf39)][_0xfa7bb3(0x2a4)](_0x113ab2,{'mode':_0xfa7bb3(0x1006),'bootstrap':_0xfa7bb3(0xb7c),'originMode':_0xfa7bb3(0xe61),'batchSize':0x40,'hydrateValues':!![],'cursorKey':'search-refresh:'+_0x4f037b,'handler':async _0x1b1d48=>{const _0x479c9f=_0xfa7bb3;for(const _0x6385ae of _0x1b1d48){if(_0x6385ae['action']===_0x479c9f(0x92c)&&_0x6385ae[_0x479c9f(0x568)]!=null){const _0x293311=_0x6385ae[_0x479c9f(0x568)]instanceof Float32Array?_0x6385ae[_0x479c9f(0x568)]:new Float32Array(_0x6385ae[_0x479c9f(0x568)]);_0x293311[_0x479c9f(0x156)]===_0x55c0b3&&await _0x37b69d[_0x479c9f(0x33c)](_0x6385ae[_0x479c9f(0x9dd)],_0x293311,_0x6385ae[_0x479c9f(0x114d)]??undefined);}else _0x6385ae[_0x479c9f(0x942)]===_0x479c9f(0x21e)&&await _0x37b69d[_0x479c9f(0x21e)](_0x6385ae[_0x479c9f(0x9dd)]);}}}),_0x22deed[_0xfa7bb3(0x9be)]?.[_0xfa7bb3(0x26c)]?.('[vector-search]\x20registered\x20refresh\x20processor\x20on\x20'+_0x113ab2+'\x20'+(_0xfa7bb3(0xef0)+_0x4f037b+_0xfa7bb3(0x7f0))));}catch(_0x29931d){_0x22deed[_0xfa7bb3(0x9be)]?.[_0xfa7bb3(0xf78)]?.(_0xfa7bb3(0xd00)+_0x4f037b+':',_0x29931d?.[_0xfa7bb3(0xb4e)]||_0x29931d);}_0x5b83e4[_0xfa7bb3(0x211)](_0x4f037b,{'algorithm':_0x37b69d,'stopRefreshProc':_0x525204});function _0x260b34(){const _0x330d05=_0xfa7bb3;if(!_0x5293fc)return null;return _0x22deed[_0x330d05(0xab8)][_0x330d05(0xdd5)](_0x14787a[_0x330d05(0x1d1)],_0x5293fc)?.[_0x330d05(0x1f5)]??null;}async function _0x8dcf16(_0x4abc69){const _0x42be0b=_0xfa7bb3;if(_0x4abc69 instanceof Float32Array)return _0x4abc69;if(typeof _0x4abc69===_0x42be0b(0xf7a)){const _0x428161=_0x260b34();if(!_0x428161)throw new _0x2bec95('vector-search\x20\x22'+_0x4f037b+_0x42be0b(0xbd1)+'Set\x20config.embedder\x20or\x20pass\x20a\x20Float32Array\x20directly.',_0x42be0b(0x50c));return _0x428161[_0x42be0b(0xa7)](_0x4abc69);}throw new _0x2bec95(_0x42be0b(0xeb5),_0x42be0b(0x1ec));}return{async 'search'(_0x4faea1,{limit:limit=0xa,threshold:threshold=0x0,..._0x59698e}={}){const _0x1ca64c=_0xfa7bb3,_0x48cebd=await _0x8dcf16(_0x4faea1);if(_0x48cebd[_0x1ca64c(0x156)]!==_0x55c0b3)throw new _0x2bec95(_0x1ca64c(0x962)+_0x55c0b3+_0x1ca64c(0xb43)+_0x48cebd[_0x1ca64c(0x156)],_0x1ca64c(0x140));return _0x37b69d[_0x1ca64c(0x460)](_0x48cebd,{'limit':limit,'threshold':threshold,..._0x59698e});},async 'add'(_0x6469e,_0x56ba18){const _0x3b9b96=_0xfa7bb3;if(!(_0x56ba18 instanceof Float32Array))throw new _0x2bec95(_0x3b9b96(0xe09),'BAD_VECTOR');if(_0x56ba18['length']!==_0x55c0b3)throw new _0x2bec95(_0x3b9b96(0x1fa)+_0x55c0b3+_0x3b9b96(0xb43)+_0x56ba18[_0x3b9b96(0x156)],'BAD_VECTOR_DIMS');_0x8d8eb3?await _0x8d8eb3['put'](_0x6469e,_0x56ba18):await _0x37b69d[_0x3b9b96(0x33c)](_0x6469e,_0x56ba18);},async '_algorithmAdd'(_0x3db66e,_0x2ac512){const _0x439b98=_0xfa7bb3;_0x2ac512 instanceof Float32Array&&_0x2ac512[_0x439b98(0x156)]===_0x55c0b3&&await _0x37b69d[_0x439b98(0x33c)](_0x3db66e,_0x2ac512);},async 'remove'(_0x384020){const _0x30fc6e=_0xfa7bb3;_0x8d8eb3?await _0x8d8eb3[_0x30fc6e(0x21e)](_0x384020):await _0x37b69d[_0x30fc6e(0x21e)](_0x384020);},async '_algorithmRemove'(_0xedff02){const _0x420f2f=_0xfa7bb3;await _0x37b69d[_0x420f2f(0x21e)](_0xedff02);},'count'(){return _0x37b69d['count']();},async 'snapshot'(){const _0x3d8ccb=_0xfa7bb3;return _0x37b69d[_0x3d8ccb(0x33f)]();},async 'rebuild'(){const _0x4ebec5=_0xfa7bb3;return await _0x37b69d[_0x4ebec5(0x11ab)](_0x3f01ce),{'count':_0x37b69d[_0x4ebec5(0x1147)]()};},async 'stats'(){const _0x1b45d4=_0xfa7bb3;return{'engine_key':_0x4f037b,'storage_key':_0x339a31,'dims':_0x55c0b3,'algorithm':_0x93c64b,'count':_0x37b69d[_0x1b45d4(0x1147)](),'vector_count':_0x8d8eb3?.[_0x1b45d4(0x1147)]?.()??null,..._0x37b69d['info']()};}};},async 'stop'(_0x45510f){const _0x56e6f4=_0x4445c4,_0x1d9868=_0x5b83e4['get'](_0x45510f[_0x56e6f4(0x9dd)]);if(!_0x1d9868)return;if(_0x1d9868['stopRefreshProc'])try{_0x1d9868[_0x56e6f4(0x124c)]();}catch{}try{await _0x1d9868[_0x56e6f4(0x7fc)][_0x56e6f4(0x1fe)]();}catch(_0x4deb8f){_0x45510f[_0x56e6f4(0xd4f)][_0x56e6f4(0x9be)]?.['warn']?.(_0x56e6f4(0xf7)+_0x45510f[_0x56e6f4(0x9dd)]+':',_0x4deb8f?.[_0x56e6f4(0xb4e)]||_0x4deb8f);}_0x5b83e4['delete'](_0x45510f[_0x56e6f4(0x9dd)]),_0x45510f['okdb'][_0x56e6f4(0x9be)]?.['info']?.(_0x56e6f4(0x75c)+_0x45510f[_0x56e6f4(0x9dd)]);}};},search;}var embedWorker,hasRequiredEmbedWorker;function requireEmbedWorker(){if(hasRequiredEmbedWorker)return embedWorker;hasRequiredEmbedWorker=0x1;const {OKDBError:_0x5c3356}=requireOkdbError(),{ENGINE_TYPES:_0x522849,EMBEDDINGS_EVENTS:_0x47ec40}=requireEnums(),{prepare:_0x7beb2e,chunk:_0x3dd05e,hashChunk:_0x1ff95d,vecKey:_0x15eafd}=requireOkdbChunker();async function _0x160e88(_0x54246a,_0x47ddbd,_0x5e9f53,_0x28b768,_0x363fa4,_0x11e327,_0x79f6ab={}){const _0x42f959=_0x47ab,_0x12d76c=_0x54246a[_0x42f959(0x4c4)],_0x3d525d=_0x54246a[_0x42f959(0x3fb)];if(!_0x12d76c||!_0x3d525d)return;const _0x19f24b=_0x15eafd(_0x47ddbd,_0x5e9f53),_0x417808=Date[_0x42f959(0x555)]();await _0x12d76c[_0x42f959(0x92c)](_0x3d525d,_0x19f24b,{'status':_0x28b768,'error':_0x363fa4??null,'clock':_0x11e327,'start':_0x79f6ab[_0x42f959(0xa00)]??null,'end':_0x79f6ab[_0x42f959(0xc9c)]??null,'created':_0x417808,'updated':_0x417808});}async function _0x149ff0(_0x5e80fe,_0x45af5b,_0xcf83be,_0x30af6b,_0x406dbb={}){const _0x574880=_0x47ab;await _0x160e88(_0x5e80fe,_0x45af5b,_0xcf83be,_0x574880(0x787),null,_0x30af6b,_0x406dbb);const _0xb623e6=await _0x5e80fe[_0x574880(0x1171)](_0x45af5b);if(!_0xb623e6||!_0xb623e6[_0x574880(0x78e)])return;const _0x439f7a=_0x5e80fe['_typeEnv'],_0x4a1d26=_0x5e80fe[_0x574880(0x3fb)];if(!_0x439f7a||!_0x4a1d26)return;const _0x41d9f5=_0x439f7a[_0x574880(0x7c0)](_0x4a1d26)?[..._0x439f7a[_0x574880(0x9ce)](_0x4a1d26,{'start':_0x45af5b+'\x09','end':_0x45af5b+'\x09ÿ'})]:[],_0x4c7a64=_0x41d9f5[_0x574880(0x1166)](_0x1d9450=>_0x1d9450[_0x574880(0x568)][_0x574880(0xfcd)]),_0x4b744e=_0x4c7a64[_0x574880(0x1103)](_0x28f7c3=>_0x28f7c3==='done')[_0x574880(0x156)],_0x44a6e5=_0x4c7a64[_0x574880(0x1103)](_0x376c76=>_0x376c76==='failed')[_0x574880(0x156)];_0x4b744e+_0x44a6e5>=_0xb623e6[_0x574880(0x78e)]&&(_0x44a6e5>0x0?await _0x5e80fe[_0x574880(0x276)](_0x45af5b,new Error(_0x44a6e5+'/'+_0xb623e6[_0x574880(0x78e)]+_0x574880(0x8ee)),{'clock':_0x30af6b}):await _0x5e80fe[_0x574880(0xcd3)](_0x45af5b,{'clock':_0x30af6b}));}return embedWorker=function _0x28539c({resolveTypeEnv:_0x313a72}={}){const _0x3c1498=_0x47ab,_0x63f13f=new Map();return{'docs':{'summary':_0x3c1498(0xd8e),'description':'Consumes\x20embedding\x20jobs\x20in\x20queue\x20mode,\x20calls\x20an\x20embedder\x20engine,\x20and\x20reports\x20completion/failure\x20back\x20to\x20the\x20indexer.','standalone':!![],'pipelineCompatible':!![],'scope':_0x3c1498(0x30b),'configSchema':{'type':_0x3c1498(0xb36),'required':[_0x3c1498(0x5da),'indexer','embedder'],'properties':{'job_type':{'type':'string'},'indexer':{'type':'string','description':'Indexer\x20engine\x20name\x20to\x20notify\x20via\x20markDone/markFail.'},'embedder':{'type':'string','description':_0x3c1498(0x485)},'source_env':{'type':_0x3c1498(0xf7a)},'source_type':{'type':_0x3c1498(0xf7a)},'concurrency':{'type':_0x3c1498(0x10f2),'minimum':0x1},'pollInterval':{'type':_0x3c1498(0x10f2),'minimum':0x1},'ttl':{'type':'integer','minimum':0x1}},'additionalProperties':!![]},'configExample':{'job_type':_0x3c1498(0x282),'indexer':'default:articles','embedder':_0x3c1498(0xac3),'source_env':_0x3c1498(0x8d0),'source_type':_0x3c1498(0xb8),'concurrency':0x1,'pollInterval':0x3e8,'ttl':0x7530},'notes':['This\x20engine\x20is\x20typically\x20paired\x20with\x20an\x20indexer\x20running\x20in\x20queue\x20mode.',_0x3c1498(0x906)],'links':['/api/env/:env/type/:type/pipelines',_0x3c1498(0xb96)]},'validate'(_0x53c181){const _0xcebee6=_0x3c1498;if(!_0x53c181||typeof _0x53c181!==_0xcebee6(0xb36))throw new _0x5c3356(_0xcebee6(0x7a7),'BAD_CONFIG');if(!_0x53c181[_0xcebee6(0x5da)]||typeof _0x53c181[_0xcebee6(0x5da)]!==_0xcebee6(0xf7a))throw new _0x5c3356(_0xcebee6(0x861)+_0xcebee6(0x6cb),_0xcebee6(0xb0f));if(!_0x53c181[_0xcebee6(0xa4a)]||typeof _0x53c181[_0xcebee6(0xa4a)]!==_0xcebee6(0xf7a))throw new _0x5c3356(_0xcebee6(0x922),'BAD_CONFIG');if(!_0x53c181[_0xcebee6(0x37b)]||typeof _0x53c181[_0xcebee6(0x37b)]!==_0xcebee6(0xf7a))throw new _0x5c3356(_0xcebee6(0xade),_0xcebee6(0xb0f));if(_0x53c181[_0xcebee6(0xe4)]!==undefined&&!(Number[_0xcebee6(0x474)](_0x53c181[_0xcebee6(0xe4)])&&_0x53c181[_0xcebee6(0xe4)]>=0x1))throw new _0x5c3356(_0xcebee6(0xda1),_0xcebee6(0xb0f));},async 'start'(_0x4544bc){const _0x10da16=_0x3c1498,{config:_0x33b091,key:_0x3068f5,okdb:_0x51fb1f}=_0x4544bc,_0x583c5c=_0x33b091[_0x10da16(0x5da)],_0x18fec7=_0x33b091[_0x10da16(0xa4a)],_0x3d6a1e=_0x33b091[_0x10da16(0x37b)],_0x326cd4=_0x33b091[_0x10da16(0x43a)]??'default',_0x51caff=_0x33b091[_0x10da16(0x481)]??null,_0x4ba69d=_0x33b091[_0x10da16(0xe4)]??0x1,_0x296d09=_0x33b091['pollInterval']??0x3e8,_0x4b04e2=_0x33b091[_0x10da16(0x347)]??0x7530,_0x2e0088=_0x313a72&&_0x51caff?await _0x313a72(_0x326cd4,_0x51caff):null,_0x2a1684=_0x2e0088?.['queue']??_0x51fb1f[_0x10da16(0x879)];if(!_0x2a1684||typeof _0x2a1684[_0x10da16(0x738)]!=='function')throw new _0x5c3356(_0x10da16(0x101e)+_0x3068f5+'\x22\x20requires\x20a\x20queue\x20—\x20ensure\x20the\x20queue\x20feature\x20is\x20active',_0x10da16(0xc17));let _0x564547=0x0,_0x407a64=0x0,_0x13f948=0x0;function _0x1055e1(){const _0x5352a1=_0x10da16,_0x488b67=_0x51fb1f[_0x5352a1(0xab8)][_0x5352a1(0xdd5)](_0x522849['EMBEDDER'],_0x3d6a1e);if(!_0x488b67)throw new _0x5c3356(_0x5352a1(0x384)+_0x3d6a1e+_0x5352a1(0x1e7)+_0x3068f5+'\x22)',_0x5352a1(0x104b));return _0x488b67['api'];}function _0x706d31(){const _0x34e27b=_0x10da16,_0x43e066=_0x51fb1f[_0x34e27b(0xab8)][_0x34e27b(0xdd5)](_0x522849[_0x34e27b(0xb28)],_0x18fec7);if(!_0x43e066)throw new _0x5c3356(_0x34e27b(0xf90)+_0x18fec7+'\x22\x20(required\x20by\x20worker\x20\x22'+_0x3068f5+'\x22)',_0x34e27b(0xf05));return _0x43e066[_0x34e27b(0x1f5)];}const _0x4ebf02=async(_0x597c68,{heartbeat:_0x38b2ad})=>{const _0x104f69=_0x10da16,_0x3d8bb4=_0x1055e1(),_0x470c38=_0x706d31();if(_0x597c68[_0x104f69(0x953)]&&_0x597c68[_0x104f69(0xcba)]!=null){const {chunk_hash:_0x5e97d9,chunk_text:_0x43ebc0,chunk_index:_0x50c8ef,chunk_start:_0x2b0e6f,chunk_end:_0x33b0a4,source_key:_0x222d63,storage_key:_0x552b4b,clock:_0x37b283,dims:_0x5a555f}=_0x597c68,_0x308d6f=_0x15eafd(_0x222d63,_0x5e97d9);_0x13f948++;try{const _0xfbcd8a=_0x470c38[_0x104f69(0x11c9)];if(_0xfbcd8a){const _0xf339b4=_0xfbcd8a[_0x104f69(0xbeb)](_0x308d6f);if(_0xf339b4!=null){await _0x149ff0(_0x470c38,_0x222d63,_0x5e97d9,_0x37b283,{'start':_0x2b0e6f,'end':_0x33b0a4}),_0x564547++;return;}}await _0x38b2ad();const _0x3d7804=await _0x3d8bb4[_0x104f69(0xa7)](_0x43ebc0),_0x318757=!(_0x3d7804 instanceof Float32Array)?_0x104f69(0x116e):_0x5a555f&&_0x3d7804[_0x104f69(0x156)]!==_0x5a555f?_0x104f69(0xfe8)+_0x5a555f+_0x104f69(0xb43)+_0x3d7804[_0x104f69(0x156)]:null;if(_0x318757){await _0x160e88(_0x470c38,_0x222d63,_0x5e97d9,_0x104f69(0x1200),_0x318757,_0x37b283,{'start':_0x2b0e6f,'end':_0x33b0a4});throw new Error(_0x318757);}if(_0xfbcd8a)await _0xfbcd8a[_0x104f69(0x92c)](_0x308d6f,_0x3d7804);await _0x149ff0(_0x470c38,_0x222d63,_0x5e97d9,_0x37b283,{'start':_0x2b0e6f,'end':_0x33b0a4}),_0x564547++;}catch(_0x20d124){_0x407a64++,_0x51fb1f[_0x104f69(0x9be)]?.[_0x104f69(0xf78)]?.('[embed-worker]\x20per-chunk\x20failure\x20('+_0x3068f5+_0x104f69(0x1033)+_0x222d63+_0x104f69(0xf10)+_0x5e97d9+'):',_0x20d124?.['message']||_0x20d124);throw _0x20d124;}finally{_0x13f948--;}return;}const {source_key:_0x3cdbd5,source_env:_0x10ecec,source_type:_0xdd7291,field:_0x404b9c,dims:_0x17ffbe,clock:_0x2bd811,prepare:_0x20cf36=_0x104f69(0x11cc),chunk:_0x2a1d34=null}=_0x597c68,_0x396924=!!(_0x2a1d34&&_0x2a1d34['strategy']&&_0x2a1d34[_0x104f69(0xdaa)]!==_0x104f69(0xa9b)),_0x47fe65=_0x10ecec??_0x326cd4,_0x49721a=_0x51fb1f['_envs']?.[_0x104f69(0xbeb)](_0x47fe65)??_0x51fb1f[_0x104f69(0x30b)](_0x104f69(0x8d0)),_0x1e555a=_0x49721a[_0x104f69(0xbeb)](_0xdd7291,_0x3cdbd5);if(_0x1e555a==null){await _0x470c38['markDelete'](_0x3cdbd5,{'clock':_0x2bd811}),_0x564547++;return;}const _0x1b0648=_0x404b9c!=null?_0x1e555a?.[_0x404b9c]:_0x1e555a;if(_0x1b0648==null){const _0x4a123d='field\x20\x22'+_0x404b9c+_0x104f69(0xd4d)+_0x3cdbd5+'\x22';_0x51fb1f[_0x104f69(0x9be)]?.[_0x104f69(0xf78)]?.('[embed-worker]\x20'+_0x4a123d+'\x20('+_0x3068f5+')'),await _0x470c38[_0x104f69(0x276)](_0x3cdbd5,new Error(_0x4a123d),{'clock':_0x2bd811}),_0x407a64++;return;}let _0x3b180a;try{_0x3b180a=_0x7beb2e(_0x1b0648,_0x20cf36);}catch(_0x3e8570){await _0x470c38[_0x104f69(0x276)](_0x3cdbd5,_0x3e8570,{'clock':_0x2bd811}),_0x407a64++;return;}_0x13f948++;try{await _0x38b2ad();if(!_0x396924){const _0x23c7fb=await _0x3d8bb4[_0x104f69(0xa7)](_0x3b180a),_0x439369=!(_0x23c7fb instanceof Float32Array)?_0x104f69(0x116e):_0x17ffbe&&_0x23c7fb[_0x104f69(0x156)]!==_0x17ffbe?_0x104f69(0xfe8)+_0x17ffbe+',\x20got\x20'+_0x23c7fb[_0x104f69(0x156)]:null;if(_0x439369){_0x51fb1f['log']?.[_0x104f69(0xf78)]?.(_0x104f69(0xff8)+_0x439369+'\x20('+_0x3068f5+')'),await _0x470c38[_0x104f69(0x276)](_0x3cdbd5,new Error(_0x439369),{'clock':_0x2bd811}),_0x407a64++;return;}await _0x470c38[_0x104f69(0xcd3)](_0x3cdbd5,{'vector':_0x23c7fb,'clock':_0x2bd811});}else{const {strategy:strategy=_0x104f69(0x4b2),size:size=0x200,overlap:overlap=0x40,storeText:storeText=![]}=_0x2a1d34,_0x3d3d36=_0x3dd05e(_0x3b180a,{'strategy':strategy,'size':size,'overlap':overlap});if(_0x3d3d36[_0x104f69(0x156)]===0x0){await _0x470c38[_0x104f69(0x276)](_0x3cdbd5,new Error(_0x104f69(0x853)+strategy+'\x22)'),{'clock':_0x2bd811}),_0x407a64++;return;}const _0x57f29d=new Map();for(const _0x39c519 of _0x3d3d36){const _0x2541db=_0x1ff95d(_0x39c519[_0x104f69(0x1fb)]);_0x57f29d[_0x104f69(0x211)](_0x2541db,{'hash':_0x2541db,'start':_0x39c519[_0x104f69(0xa00)],'end':_0x39c519[_0x104f69(0xc9c)],...storeText?{'text':_0x39c519[_0x104f69(0x1fb)]}:{}});}const _0x2fc9ed=await _0x470c38[_0x104f69(0x1171)](_0x3cdbd5),_0x1b06c3=new Map((_0x2fc9ed?.[_0x104f69(0x3a4)]??[])[_0x104f69(0x1166)](_0x23ef6c=>[_0x23ef6c[_0x104f69(0x6f9)],_0x23ef6c])),_0x31b432=_0x470c38['_hashVecCache']??null,_0x4dd578=_0x470c38[_0x104f69(0x11c9)];if(_0x4dd578)for(const [_0x28f215]of _0x1b06c3){if(!_0x57f29d[_0x104f69(0x9d0)](_0x28f215))try{await _0x4dd578[_0x104f69(0x21e)](_0x15eafd(_0x3cdbd5,_0x28f215));}catch{}}let _0x5ac945=0x0;for(const [_0x5e36ec,_0x416cad]of _0x57f29d){if(_0x1b06c3['has'](_0x5e36ec))continue;const _0x105fc2=_0x15eafd(_0x3cdbd5,_0x5e36ec),_0x5cc090=_0x31b432?.[_0x104f69(0xbeb)](_0x5e36ec);if(_0x5cc090){if(_0x4dd578)await _0x4dd578[_0x104f69(0x92c)](_0x105fc2,_0x5cc090);_0x5ac945++;continue;}const _0x44efd0=_0x416cad[_0x104f69(0x1fb)]??_0x3b180a[_0x104f69(0xc3c)](_0x416cad[_0x104f69(0xa00)],_0x416cad[_0x104f69(0xc9c)]);await _0x38b2ad();const _0x11b675=await _0x3d8bb4[_0x104f69(0xa7)](_0x44efd0),_0x5deb73=!(_0x11b675 instanceof Float32Array)?_0x104f69(0x116e):_0x17ffbe&&_0x11b675[_0x104f69(0x156)]!==_0x17ffbe?_0x104f69(0xfe8)+_0x17ffbe+',\x20got\x20'+_0x11b675[_0x104f69(0x156)]:null;if(_0x5deb73)throw new Error(_0x5deb73);if(_0x4dd578)await _0x4dd578[_0x104f69(0x92c)](_0x105fc2,_0x11b675);_0x31b432?.[_0x104f69(0x211)](_0x5e36ec,_0x11b675);}_0x5ac945>0x0&&_0x51fb1f[_0x104f69(0x9be)]?.['debug']?.(_0x104f69(0xff8)+_0x5ac945+'/'+_0x57f29d[_0x104f69(0xfb)]+'\x20chunks\x20from\x20hash\x20cache\x20('+_0x3cdbd5+')'),await _0x470c38['markDone'](_0x3cdbd5,{'clock':_0x2bd811,'chunks':[..._0x57f29d[_0x104f69(0x231)]()],'chunk_strategy':strategy});}_0x51fb1f[_0x104f69(0xea8)][_0x104f69(0xf5d)](_0x47ec40[_0x104f69(0x1099)],{'engine_key':_0x522849[_0x104f69(0xb28)]+'@'+_0x18fec7,'source_key':_0x3cdbd5,'clock':_0x2bd811,'worker':_0x3068f5}),_0x564547++;}catch(_0x30c2f8){_0x407a64++,_0x51fb1f[_0x104f69(0x9be)]?.[_0x104f69(0xf78)]?.(_0x104f69(0xf99)+_0x3068f5+_0x104f69(0x1033)+_0x3cdbd5+'):',_0x30c2f8?.[_0x104f69(0xb4e)]||_0x30c2f8);throw _0x30c2f8;}finally{_0x13f948--;}};await _0x2a1684['_ensure']();const _0x42ce58=async(_0x3d5057,_0x3f0a50)=>{const _0x98493=_0x10da16;try{const {source_key:_0x3434f0,clock:_0xe69db7}=_0x3d5057[_0x98493(0x3c3)]??{};if(!_0x3434f0)return;const _0x458e4a=_0x51fb1f[_0x98493(0xab8)][_0x98493(0xdd5)](_0x522849[_0x98493(0xb28)],_0x18fec7);if(!_0x458e4a?.[_0x98493(0x1f5)]?.[_0x98493(0x276)])return;await _0x458e4a[_0x98493(0x1f5)]['markFail'](_0x3434f0,_0x3f0a50,{'clock':_0xe69db7??null}),_0x51fb1f[_0x98493(0x9be)]?.['warn']?.(_0x98493(0x456)+_0x3434f0+_0x98493(0x708)+('marked\x20FAILED\x20in\x20indexer\x20('+_0x3068f5+_0x98493(0x5ff)+(_0x3f0a50?.['message']||_0x3f0a50)));}catch(_0x39352b){_0x51fb1f[_0x98493(0x9be)]?.[_0x98493(0xf78)]?.(_0x98493(0xb4c)+_0x3068f5+'):',_0x39352b?.[_0x98493(0xb4e)]||_0x39352b);}},_0x522a4e=[];for(let _0x49cc66=0x0;_0x49cc66<_0x4ba69d;_0x49cc66++){const _0x15143d=_0x2a1684[_0x10da16(0x738)](_0x583c5c,_0x4ebf02,{'pollInterval':_0x296d09,'ttl':_0x4b04e2,'onPermanentFail':_0x42ce58});_0x522a4e[_0x10da16(0x597)](_0x15143d);}return _0x63f13f[_0x10da16(0x211)](_0x3068f5,{'workers':_0x522a4e,'processed':()=>_0x564547,'failed':()=>_0x407a64,'running':()=>_0x13f948}),_0x51fb1f[_0x10da16(0x9be)]?.[_0x10da16(0x26c)]?.(_0x10da16(0x864)+_0x3068f5+_0x10da16(0x84e)+(_0x10da16(0xb80)+_0x4ba69d+',\x20job_type=\x22'+_0x583c5c+_0x10da16(0x139))+('indexer=\x22'+_0x18fec7+_0x10da16(0x9ed)+_0x3d6a1e+'\x22')),{async 'stats'(){return{'engine_key':_0x3068f5,'job_type':_0x583c5c,'indexer':_0x18fec7,'embedder':_0x3d6a1e,'concurrency':_0x4ba69d,'processed':_0x564547,'failed':_0x407a64,'in_flight':_0x13f948};}};},async 'stop'(_0x1e3b1a){const _0x1f8740=_0x3c1498,_0x1cabad=_0x63f13f[_0x1f8740(0xbeb)](_0x1e3b1a[_0x1f8740(0x9dd)]);if(!_0x1cabad)return;await Promise[_0x1f8740(0xf09)](_0x1cabad['workers'][_0x1f8740(0x1166)](_0x369a17=>_0x369a17[_0x1f8740(0x1fe)]()[_0x1f8740(0x415)](()=>{}))),_0x63f13f[_0x1f8740(0x3b3)](_0x1e3b1a[_0x1f8740(0x9dd)]),_0x1e3b1a[_0x1f8740(0xd4f)][_0x1f8740(0x9be)]?.[_0x1f8740(0x26c)]?.('[embed-worker]\x20stopped\x20'+_0x1e3b1a[_0x1f8740(0x9dd)]);}};},embedWorker;}var modelCatalog,hasRequiredModelCatalog;function requireModelCatalog(){const _0x3de9f9=_0xef8cd8;if(hasRequiredModelCatalog)return modelCatalog;hasRequiredModelCatalog=0x1;const _0x53b059=[{'provider':_0x3de9f9(0xf5e),'model':'fake-v1','dims':0x8,'description':'Fake\x20—\x208\x20dims,\x20pipeline\x20smoke-testing'},{'provider':_0x3de9f9(0xf5e),'model':'fake-v384','dims':0x180,'description':'Fake\x20—\x20384\x20dims,\x20realistic\x20size\x20for\x20testing'},{'provider':'fake','model':_0x3de9f9(0xfc2),'dims':0x300,'description':_0x3de9f9(0xf87)},{'provider':_0x3de9f9(0x113b),'model':_0x3de9f9(0xb6b),'dims':0x300,'description':'Nomic\x20Embed\x20Text\x20—\x20general\x20purpose'},{'provider':'ollama','model':_0x3de9f9(0x2c7),'dims':0x300,'description':_0x3de9f9(0x5fd)},{'provider':'ollama','model':_0x3de9f9(0x5f9),'dims':0x400,'description':_0x3de9f9(0x9f3)},{'provider':_0x3de9f9(0x113b),'model':_0x3de9f9(0xb0e),'dims':0x180,'description':'all-MiniLM-L6-v2\x20—\x20small\x20and\x20fast'},{'provider':_0x3de9f9(0x113b),'model':_0x3de9f9(0x43d),'dims':0x400,'description':_0x3de9f9(0xda4)},{'provider':_0x3de9f9(0x113b),'model':_0x3de9f9(0x945),'dims':0x400,'description':_0x3de9f9(0x10f4)},{'provider':_0x3de9f9(0x113b),'model':_0x3de9f9(0x340),'dims':0x400,'description':_0x3de9f9(0x11cf)},{'provider':_0x3de9f9(0x113b),'model':_0x3de9f9(0x3cf),'dims':0x400,'description':'Snowflake\x20Arctic\x20Embed\x202\x20Medium'},{'provider':_0x3de9f9(0x1161),'model':'text-embedding-3-small','dims':0x600,'description':_0x3de9f9(0x2b2)},{'provider':_0x3de9f9(0x1161),'model':'text-embedding-3-large','dims':0xc00,'description':'OpenAI\x203rd-gen\x20large\x20—\x20highest\x20quality'},{'provider':'openai','model':_0x3de9f9(0x739),'dims':0x600,'description':_0x3de9f9(0xfb3)}];function _0x39d7db(_0x1fdbb0,_0x1e22f7){return _0x1fdbb0+':'+_0x1e22f7;}const _0x582d27=new WeakMap();async function _0x12155d(_0x336282){const _0x4b161e=_0x3de9f9,{INTERNAL_TYPES:_0x256cf1}=requireEnums(),_0x1454b1=_0x256cf1[_0x4b161e(0x773)],_0xf7e2ed=_0x582d27[_0x4b161e(0xbeb)](_0x336282);if(_0xf7e2ed===!![])return;if(_0xf7e2ed instanceof Promise)return _0xf7e2ed;const _0x3832a3=((async()=>{const _0x1c0ae4=_0x4b161e;!_0x336282[_0x1c0ae4(0x7c0)](_0x1454b1)&&await _0x336282[_0x1c0ae4(0xa39)](_0x1454b1);for(const _0x49b57d of _0x53b059){const _0x25e55c=_0x39d7db(_0x49b57d['provider'],_0x49b57d[_0x1c0ae4(0x7d4)]);!_0x336282[_0x1c0ae4(0xbeb)](_0x1454b1,_0x25e55c)&&await _0x336282[_0x1c0ae4(0x92c)](_0x1454b1,_0x25e55c,{..._0x49b57d,'builtin':!![]});}_0x582d27[_0x1c0ae4(0x211)](_0x336282,!![]);})());return _0x582d27[_0x4b161e(0x211)](_0x336282,_0x3832a3),_0x3832a3;}function _0x246cf3(_0x1065a6,_0x163f15,_0x1e57f4){const _0x1529bd=_0x3de9f9;if(!_0x1e57f4)return null;const {INTERNAL_TYPES:_0x417f74}=requireEnums(),_0x5cc385=_0x417f74[_0x1529bd(0x773)];if(!_0x1065a6[_0x1529bd(0x7c0)](_0x5cc385))return null;const _0x10b54c=_0x1065a6['get'](_0x5cc385,_0x39d7db(_0x163f15,_0x1e57f4))??_0x1065a6[_0x1529bd(0xbeb)](_0x5cc385,_0x39d7db(_0x163f15,_0x1e57f4['split'](':')[0x0]));return typeof _0x10b54c?.[_0x1529bd(0xa67)]===_0x1529bd(0x9f0)?_0x10b54c['dims']:null;}function _0x2f4bca(_0x200852,_0x200eba=null){const _0x4facd3=_0x3de9f9,{INTERNAL_TYPES:_0x3d3717}=requireEnums(),_0x2bf0af=_0x3d3717[_0x4facd3(0x773)];if(!_0x200852['hasType'](_0x2bf0af))return[];const _0x4bf40b=[];try{for(const _0x589bb2 of _0x200852['query'](_0x2bf0af,{})){(!_0x200eba||_0x589bb2[_0x4facd3(0x568)]?.['provider']===_0x200eba)&&_0x4bf40b['push'](_0x589bb2[_0x4facd3(0x568)]);}}catch{}return _0x4bf40b;}return modelCatalog={'ensureCatalog':_0x12155d,'lookupDims':_0x246cf3,'listModels':_0x2f4bca,'modelKey':_0x39d7db,'SEED_MODELS':_0x53b059},modelCatalog;}var okdbEmbeddingsHttp,hasRequiredOkdbEmbeddingsHttp;function requireOkdbEmbeddingsHttp(){if(hasRequiredOkdbEmbeddingsHttp)return okdbEmbeddingsHttp;hasRequiredOkdbEmbeddingsHttp=0x1;const {OKDBError:_0x225d52}=requireOkdbError(),{ensureCatalog:_0x308b7e}=requireModelCatalog(),{parseVecKey:_0x3d0c68}=requireOkdbChunker();return okdbEmbeddingsHttp=function _0x2ea155(_0x3c4c94){const _0x9c1df3=_0x47ab;if(!_0x3c4c94[_0x9c1df3(0x9f4)])return;const _0x5747a7=_0x3c4c94[_0x9c1df3(0x9f4)],_0x47f8ce=new Set([_0x9c1df3(0x37b),'indexer',_0x9c1df3(0x17a),_0x9c1df3(0xd8a)]);function _0x2ff70b(_0x41ec8d,_0x146076=0xa,_0x462fb8=0x3e8){const _0x5aca1d=_0x9c1df3;if(_0x41ec8d==null)return _0x146076;const _0x42b02d=Math[_0x5aca1d(0xcc)](Number(_0x41ec8d));if(!Number[_0x5aca1d(0x2b5)](_0x42b02d)||_0x42b02d<0x1)return _0x146076;return Math[_0x5aca1d(0x2dc)](_0x42b02d,_0x462fb8);}function _0x189a66(_0x398c7b){const _0x335415=_0x9c1df3,_0x46b7c6=new _0x225d52(_0x398c7b+_0x335415(0x117b),'ENGINE_NOT_RUNNING');return _0x46b7c6[_0x335415(0xfcd)]=0x199,_0x46b7c6;}function _0x11f1a0(_0x16c04d){const _0x14d421=_0x9c1df3,_0x577d89=new _0x225d52(_0x16c04d+'\x20not\x20found',_0x14d421(0xb7f));return _0x577d89['status']=0x194,_0x577d89;}function _0x11afcc(_0x56d929){const _0x53b30c=_0x9c1df3,_0x57033b=_0x3c4c94[_0x53b30c(0xa3)][_0x53b30c(0xbeb)](_0x56d929);if(!_0x57033b){const _0x1a0dfe=new _0x225d52(_0x53b30c(0x56f)+_0x56d929,_0x53b30c(0xb7f));_0x1a0dfe[_0x53b30c(0xfcd)]=0x194;throw _0x1a0dfe;}return _0x57033b;}function _0x3c57ef(_0xd5dfde,_0x329146){return _0xd5dfde+':'+_0x329146;}function _0x55bbfa(_0x3f2e03,_0x139126){const _0x16861=_0x9c1df3,_0x21393c=_0x3c57ef(_0x3f2e03,_0x139126),_0x10a95c=_0x3c4c94[_0x16861(0x7f1)][_0x16861(0xa4a)](_0x21393c);if(!_0x10a95c)throw _0x189a66(_0x16861(0x251)+_0x21393c+'\x22');return _0x10a95c;}function _0x352d4a(_0x5552e5,_0x5c70f9){const _0x53bb81=_0x9c1df3,_0x563e8b=_0x3c57ef(_0x5552e5,_0x5c70f9),_0xb88c8d=_0x3c4c94[_0x53bb81(0x7f1)][_0x53bb81(0x460)](_0x563e8b);if(!_0xb88c8d)throw _0x189a66(_0x53bb81(0x47f)+_0x563e8b+'\x22');return _0xb88c8d;}function _0x6549e8(_0x32900a){const _0xb69fdd=_0x9c1df3,_0x3a14b3=_0x3c4c94['engines'][_0xb69fdd(0xab8)][_0xb69fdd(0xbeb)](_0x32900a);if(!_0x3a14b3||!_0x47f8ce['has'](_0x3a14b3[_0xb69fdd(0xaee)]))throw _0x11f1a0(_0xb69fdd(0x728)+_0x32900a+'\x22');return _0x3a14b3;}async function _0x5c1a53(_0x48124){const _0x122ec1=_0x9c1df3;let _0x4797c9=null;try{if(typeof _0x48124?.[_0x122ec1(0x1f5)]?.[_0x122ec1(0xd72)]==='function')_0x4797c9=await _0x48124[_0x122ec1(0x1f5)][_0x122ec1(0xd72)]();else{if(_0x48124?.[_0x122ec1(0xaee)]===_0x122ec1(0x37b)&&typeof _0x48124?.[_0x122ec1(0x1f5)]?.['health']===_0x122ec1(0x63b))_0x4797c9=await _0x48124['api'][_0x122ec1(0xe6d)]();}}catch{}return{'key':_0x48124[_0x122ec1(0x9dd)],'type':_0x48124[_0x122ec1(0xaee)],'name':_0x48124[_0x122ec1(0x1173)],'isRunning':_0x48124[_0x122ec1(0xc53)],'status':_0x48124['status']??null,'reason':_0x48124['reason']??null,'enabled':_0x48124[_0x122ec1(0x951)],'affinity':_0x48124[_0x122ec1(0x54a)],'config':_0x48124[_0x122ec1(0xad3)]?.[_0x122ec1(0x142)]??null,'meta':_0x48124[_0x122ec1(0xad3)]?.[_0x122ec1(0x654)]??null,'error':_0x48124['lastError']?.[_0x122ec1(0xb4e)]??null,'runtime':_0x48124[_0x122ec1(0xbe3)]??null,'stats':_0x4797c9};}function _0x206227(_0x526366){const _0x24eacf=_0x9c1df3,_0x393388=String(_0x526366)['indexOf']('@');return{'type':_0x526366[_0x24eacf(0xc3c)](0x0,_0x393388),'name':_0x526366[_0x24eacf(0xc3c)](_0x393388+0x1)};}function _0x35cc60(_0x2a638a,_0x2513cc){const _0x165b74=_0x9c1df3,_0xc3384=_0x2a638a+':';return String(_0x2513cc||'')[_0x165b74(0x8ba)](_0xc3384)?_0x2513cc[_0x165b74(0xc3c)](_0xc3384['length']):_0x2513cc;}function _0x3a9727(_0x1d9123){const _0x50754e=_0x9c1df3;if(_0x1d9123===_0x50754e(0x37b))return _0x50754e(0x37b);if(_0x1d9123==='indexer')return'indexer';if(_0x1d9123==='embed-worker')return'worker';if(_0x1d9123==='vector-search')return _0x50754e(0x460);return _0x1d9123;}function _0x56872c(_0x167e45=[]){const _0x4a8c53=_0x9c1df3;if(!_0x167e45['length'])return _0x4a8c53(0x225);if(_0x167e45[_0x4a8c53(0x244)](_0x18bb9b=>_0x18bb9b[_0x4a8c53(0xc53)]||_0x18bb9b[_0x4a8c53(0x10e2)]===_0x4a8c53(0x998)))return'online';if(_0x167e45[_0x4a8c53(0xa83)](_0x4ae536=>_0x4ae536[_0x4a8c53(0xfcd)]==='error'||_0x4ae536[_0x4a8c53(0x10e2)]===_0x4a8c53(0x225)))return _0x4a8c53(0x225);if(_0x167e45[_0x4a8c53(0x244)](_0x1894c1=>!_0x1894c1[_0x4a8c53(0xc53)]))return _0x4a8c53(0xd45);return _0x4a8c53(0x816);}async function _0x3f692c(_0x46d3e4,_0x2f9c86,_0xfa6bb6){const _0x8d87a5=_0x9c1df3;if(!_0x46d3e4)return null;return{...await _0x5c1a53(_0x46d3e4),'role':_0x2f9c86,'exists':!![],'state':_0x46d3e4[_0x8d87a5(0xc53)]?_0x8d87a5(0x998):_0x46d3e4[_0x8d87a5(0xfcd)]??_0x8d87a5(0xd45),'owned':_0x46d3e4[_0x8d87a5(0x60a)]===_0x3c4c94['env'](_0xfa6bb6),'storeEnv':_0x46d3e4[_0x8d87a5(0x60a)]?.['name']??null,'runtime':_0x46d3e4[_0x8d87a5(0xbe3)]??null};}function _0x2c03c4(_0x33d1c3=[],_0x483447=[]){const _0x5903a7=_0x9c1df3,_0x5a3b2e=new Set(),_0x2a9b93=[];for(const _0x3c2e5d of[..._0x33d1c3,..._0x483447]){if(!_0x3c2e5d)continue;const _0x2ac89a=_0x3c2e5d[_0x5903a7(0x9dd)]??_0x3c2e5d[_0x5903a7(0xaee)]+'@'+_0x3c2e5d['name'];if(_0x5a3b2e[_0x5903a7(0x9d0)](_0x2ac89a))continue;_0x5a3b2e[_0x5903a7(0x33c)](_0x2ac89a),_0x2a9b93[_0x5903a7(0x597)](_0x3c2e5d);}return _0x2a9b93;}async function _0x5cdb72(_0x1363bb,_0x342f35){const _0x496da3=_0x9c1df3,_0x457642=new Map();for(const _0x42fe2a of _0x3c4c94[_0x496da3(0xab8)][_0x496da3(0x63e)]()){if(_0x42fe2a['type']!==_0x496da3(0xd8a))continue;const _0x43688c=_0x42fe2a[_0x496da3(0xad3)]?.['config']?.[_0x496da3(0x43a)]??'default',_0x388374=_0x42fe2a[_0x496da3(0xad3)]?.['config']?.[_0x496da3(0x481)]??null;if(_0x43688c!==_0x1363bb||_0x388374!==_0x342f35)continue;const _0x2022ab=_0x42fe2a[_0x496da3(0xad3)]?.[_0x496da3(0x142)]?.['storage_key']??_0x35cc60(_0x1363bb,_0x42fe2a[_0x496da3(0x1173)]);if(!_0x2022ab)continue;if(!_0x457642[_0x496da3(0x9d0)](_0x2022ab))_0x457642['set'](_0x2022ab,[]);_0x457642[_0x496da3(0xbeb)](_0x2022ab)[_0x496da3(0x597)](await _0x3f692c(_0x42fe2a,_0x496da3(0x460),_0x1363bb));}return _0x457642;}function _0x2c6ab3(_0x27dfdc,_0x106c94=null,_0x266a3a=null,_0x9b3eb7=[]){const _0xdbc2ef=_0x9c1df3;if(!_0x27dfdc)return null;if(_0x27dfdc[_0xdbc2ef(0x654)]?.['family']&&_0x27dfdc[_0xdbc2ef(0x654)][_0xdbc2ef(0xd68)]!==_0xdbc2ef(0x7f1))return null;const _0x4d6ad9=Array[_0xdbc2ef(0x10f5)](_0x27dfdc[_0xdbc2ef(0xab8)])?_0x27dfdc[_0xdbc2ef(0xab8)][_0xdbc2ef(0x1166)](_0x199ddd=>({..._0x199ddd,'role':_0x199ddd[_0xdbc2ef(0xd27)]??_0x3a9727(_0x199ddd['type'])})):[],_0x1901a4=_0x2c03c4(_0x4d6ad9,_0x9b3eb7[_0xdbc2ef(0x1166)](_0x5800db=>({..._0x5800db,'role':_0x5800db[_0xdbc2ef(0xd27)]??_0x3a9727(_0x5800db['type'])}))),_0x44e906=_0x1901a4[_0xdbc2ef(0xbdd)](_0x2d0adc=>_0x2d0adc[_0xdbc2ef(0xd27)]===_0xdbc2ef(0x37b))??null,_0x247d60=_0x1901a4[_0xdbc2ef(0xbdd)](_0x1460df=>_0x1460df['role']===_0xdbc2ef(0xa4a))??null,_0x3f6e51=_0x1901a4['find'](_0x6a1ccf=>_0x6a1ccf[_0xdbc2ef(0xd27)]===_0xdbc2ef(0x738))??null,_0xc4721b=_0x1901a4[_0xdbc2ef(0x1103)](_0x360b8c=>_0x360b8c[_0xdbc2ef(0xd27)]==='search'),_0x39714c=_0xc4721b[0x0]??null;if(!_0x247d60&&!_0x39714c)return null;const _0x5c8149=_0x247d60?.['config']?.[_0xdbc2ef(0x481)]??_0x39714c?.[_0xdbc2ef(0x142)]?.['source_type']??_0x27dfdc['meta']?.[_0xdbc2ef(0x481)]??null;if(_0x106c94&&_0x5c8149!==_0x106c94)return null;const _0x4acfe0=_0x247d60?.['config']?.[_0xdbc2ef(0x43a)]??_0x39714c?.[_0xdbc2ef(0x142)]?.['source_env']??_0x27dfdc['meta']?.[_0xdbc2ef(0x43a)]??_0x27dfdc[_0xdbc2ef(0x30b)]??_0x266a3a??_0xdbc2ef(0x8d0);if(_0x266a3a&&_0x4acfe0!==_0x266a3a)return null;const _0x587d42=_0x247d60?.[_0xdbc2ef(0x142)]?.[_0xdbc2ef(0x1cc)]??_0x39714c?.['config']?.[_0xdbc2ef(0x1cc)]??_0x27dfdc[_0xdbc2ef(0x654)]?.['storage_key']??_0x27dfdc[_0xdbc2ef(0x1173)]??_0x27dfdc['key'];return{'key':_0x27dfdc[_0xdbc2ef(0x9dd)]??_0x27dfdc['name']??_0x587d42,'name':_0x27dfdc['name']??_0x587d42,'pipeline':_0x587d42,'env':_0x4acfe0,'type':_0x5c8149,'storage_key':_0x587d42,'label':_0x27dfdc[_0xdbc2ef(0x654)]?.[_0xdbc2ef(0x757)]??_0x27dfdc[_0xdbc2ef(0x654)]?.[_0xdbc2ef(0x46b)]??_0x27dfdc[_0xdbc2ef(0x1173)]??_0x587d42,'isRunning':_0x1901a4[_0xdbc2ef(0xa83)](_0x1ee7d9=>_0x1ee7d9[_0xdbc2ef(0xc53)]),'status':_0x27dfdc['status']??null,'health':_0x27dfdc[_0xdbc2ef(0xe6d)]??_0x56872c(_0x1901a4),'config':_0x247d60?.[_0xdbc2ef(0x142)]??_0x39714c?.['config']??null,'meta':{..._0x27dfdc[_0xdbc2ef(0x654)]??{},'pipeline':_0x27dfdc[_0xdbc2ef(0x654)]?.[_0xdbc2ef(0x46b)]??_0x27dfdc[_0xdbc2ef(0x1173)]??_0x587d42},'error':_0x1901a4[_0xdbc2ef(0xbdd)](_0x493c27=>_0x493c27[_0xdbc2ef(0x225)])?.['error']??null,'engines':_0x1901a4,'processor':{'embedder':_0x44e906,'indexer':_0x247d60,'worker':_0x3f6e51},'searches':_0xc4721b,'legacy':![]};}function _0x439d2a(_0x3bad9d,_0xf06a9e,_0x3fc74d,_0xa42224=[]){const _0x13aed6=_0x9c1df3,_0x1ed959=_0x3c57ef(_0x3bad9d,_0x3fc74d),_0x112f61=_0x3c4c94['engines'][_0x13aed6(0xab8)][_0x13aed6(0xbeb)](_0x13aed6(0xde3)+_0x1ed959)??null,_0x38c6ed=_0x3c4c94[_0x13aed6(0xab8)][_0x13aed6(0xab8)][_0x13aed6(0xbeb)](_0x13aed6(0xca7)+_0x1ed959)??null;if(!_0x112f61&&!_0x38c6ed&&_0xa42224[_0x13aed6(0x156)]===0x0)return null;const _0x35bfaf=_0x112f61?.[_0x13aed6(0xad3)]?.[_0x13aed6(0x142)]?.[_0x13aed6(0x481)]??_0x38c6ed?.[_0x13aed6(0xad3)]?.[_0x13aed6(0x142)]?.[_0x13aed6(0x481)]??null;if(_0xf06a9e&&_0x35bfaf!==_0xf06a9e)return null;const _0x20f99b=_0x3c4c94[_0x13aed6(0xab8)][_0x13aed6(0xab8)]['get'](_0x13aed6(0xde0)+_0x1ed959+_0x13aed6(0x12a))??null,_0x28ea4b=_0x112f61?.['doc']?.[_0x13aed6(0x142)]?.[_0x13aed6(0x37b)]??_0x38c6ed?.[_0x13aed6(0xad3)]?.[_0x13aed6(0x142)]?.[_0x13aed6(0x37b)]??_0x20f99b?.[_0x13aed6(0xad3)]?.[_0x13aed6(0x142)]?.['embedder']??null,_0x27d9dc=_0x28ea4b?_0x3c4c94[_0x13aed6(0xab8)][_0x13aed6(0xab8)]['get'](_0x13aed6(0x594)+_0x28ea4b)??null:null,_0x57afe7=_0xa42224[_0x13aed6(0x156)]>0x0?_0x2c03c4([_0x3f692c(_0x38c6ed,_0x13aed6(0x460),_0x3bad9d)][_0x13aed6(0x1103)](Boolean),_0xa42224):[_0x3f692c(_0x38c6ed,_0x13aed6(0x460),_0x3bad9d)][_0x13aed6(0x1103)](Boolean),_0x38d70f=[_0x3f692c(_0x27d9dc,_0x13aed6(0x37b),_0x3bad9d),_0x3f692c(_0x112f61,_0x13aed6(0xa4a),_0x3bad9d),_0x3f692c(_0x20f99b,_0x13aed6(0x738),_0x3bad9d),..._0x57afe7][_0x13aed6(0x1103)](Boolean);return{'key':'vector-search@'+_0x1ed959,'name':_0x3fc74d,'pipeline':_0x3fc74d,'env':_0x3bad9d,'type':_0x35bfaf,'storage_key':_0x3fc74d,'label':_0x112f61?.['doc']?.[_0x13aed6(0x654)]?.['pipeline']??_0x38c6ed?.[_0x13aed6(0xad3)]?.['meta']?.['pipeline']??_0x3fc74d,'isRunning':_0x38d70f[_0x13aed6(0xa83)](_0x39f27b=>_0x39f27b[_0x13aed6(0xc53)]),'status':_0x38c6ed?.['status']??_0x112f61?.['status']??null,'health':_0x56872c(_0x38d70f),'config':_0x112f61?.[_0x13aed6(0xad3)]?.['config']??_0x38c6ed?.[_0x13aed6(0xad3)]?.[_0x13aed6(0x142)]??null,'meta':{..._0x112f61?.[_0x13aed6(0xad3)]?.['meta']??_0x38c6ed?.[_0x13aed6(0xad3)]?.[_0x13aed6(0x654)]??{},'family':_0x13aed6(0x7f1),'pipeline':_0x112f61?.[_0x13aed6(0xad3)]?.[_0x13aed6(0x654)]?.[_0x13aed6(0x46b)]??_0x38c6ed?.['doc']?.[_0x13aed6(0x654)]?.['pipeline']??_0x3fc74d,'source_env':_0x3bad9d,'source_type':_0x35bfaf,'storage_key':_0x3fc74d},'error':_0x38d70f[_0x13aed6(0xbdd)](_0x5b1f13=>_0x5b1f13[_0x13aed6(0x225)])?.[_0x13aed6(0x225)]??null,'engines':_0x38d70f,'processor':{'embedder':_0x38d70f[_0x13aed6(0xbdd)](_0x53657c=>_0x53657c['role']===_0x13aed6(0x37b))??null,'indexer':_0x38d70f[_0x13aed6(0xbdd)](_0x5d4853=>_0x5d4853[_0x13aed6(0xd27)]===_0x13aed6(0xa4a))??null,'worker':_0x38d70f[_0x13aed6(0xbdd)](_0x4dc523=>_0x4dc523[_0x13aed6(0xd27)]===_0x13aed6(0x738))??null},'searches':_0x38d70f[_0x13aed6(0x1103)](_0x430e9e=>_0x430e9e[_0x13aed6(0xd27)]===_0x13aed6(0x460)),'legacy':!![]};}async function _0x19ea3b(_0x4351f2,_0x7642e){const _0x3cc1f2=_0x9c1df3,_0x52950e=new Set(),_0x5b7acc=[],_0x1195b5=await _0x5cdb72(_0x4351f2,_0x7642e);for(const _0x5b90b4 of await _0x3c4c94['env'](_0x4351f2)[_0x3cc1f2(0x7d3)][_0x3cc1f2(0x63e)]()){const _0x24a8dd=_0x5b90b4?.[_0x3cc1f2(0x654)]?.[_0x3cc1f2(0x1cc)]??_0x5b90b4?.[_0x3cc1f2(0x1173)]??null,_0x129c07=_0x2c6ab3(_0x5b90b4,_0x7642e,_0x4351f2,_0x24a8dd?_0x1195b5[_0x3cc1f2(0xbeb)](_0x24a8dd)??[]:[]);if(!_0x129c07)continue;_0x52950e[_0x3cc1f2(0x33c)](_0x129c07[_0x3cc1f2(0x46b)]),_0x1195b5[_0x3cc1f2(0x3b3)](_0x129c07[_0x3cc1f2(0x46b)]),_0x5b7acc[_0x3cc1f2(0x597)](_0x129c07);}for(const [_0x122e9a,_0x4e15c6]of _0x1195b5[_0x3cc1f2(0x1129)]()){if(!_0x122e9a||_0x52950e[_0x3cc1f2(0x9d0)](_0x122e9a))continue;const _0x2e36c4=_0x439d2a(_0x4351f2,_0x7642e,_0x122e9a,_0x4e15c6);if(!_0x2e36c4)continue;_0x52950e[_0x3cc1f2(0x33c)](_0x2e36c4[_0x3cc1f2(0x46b)]),_0x5b7acc[_0x3cc1f2(0x597)](_0x2e36c4);}return _0x5b7acc[_0x3cc1f2(0x3f6)]((_0x32a1d2,_0x4bd476)=>_0x32a1d2[_0x3cc1f2(0x46b)][_0x3cc1f2(0x666)](_0x4bd476['pipeline']));}async function _0x2ba074(_0x5dc635,_0x19063b,_0x1c3d4c){const _0x232539=_0x9c1df3,_0x19e3fa=await _0x5cdb72(_0x5dc635,_0x19063b),_0x711d8=await _0x3c4c94['env'](_0x5dc635)[_0x232539(0x7d3)]['get'](_0x1c3d4c);return _0x2c6ab3(_0x711d8,_0x19063b,_0x5dc635,_0x19e3fa[_0x232539(0xbeb)](_0x1c3d4c)??[])??_0x439d2a(_0x5dc635,_0x19063b,_0x1c3d4c,_0x19e3fa[_0x232539(0xbeb)](_0x1c3d4c)??[]);}_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0xe46),_0x9c1df3(0x3ef),async({params:_0x27348b})=>{const _0x72135b=_0x9c1df3,_0x46f546=_0x6549e8(_0x27348b['key']);if(!_0x46f546['isRunning']){const _0xc749e8=new _0x225d52(_0x72135b(0x728)+_0x27348b['key']+'\x22\x20is\x20not\x20running',_0x72135b(0x6af));_0xc749e8[_0x72135b(0xfcd)]=0x199;throw _0xc749e8;}return await _0x46f546[_0x72135b(0x1fe)](),{'result':await _0x5c1a53(_0x46f546)};},{'id':_0x9c1df3(0x22d),'summary':_0x9c1df3(0xe0e),'tags':[_0x9c1df3(0x7f1)],'params':{'key':_0x9c1df3(0x828)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'key':{'type':_0x9c1df3(0xf7a)}},'required':['key'],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x4ce)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x9c1df3(0x7f1),'action':_0x9c1df3(0x22d)}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0xe46),_0x9c1df3(0xc02),async({params:_0x1fdc24})=>{const _0x17f4e7=_0x9c1df3,_0x3cbe59=_0x6549e8(_0x1fdc24[_0x17f4e7(0x9dd)]);if(_0x3cbe59[_0x17f4e7(0xc53)]){const _0x1c809b=new _0x225d52(_0x17f4e7(0x728)+_0x1fdc24[_0x17f4e7(0x9dd)]+'\x22\x20is\x20already\x20running','ENGINE_ALREADY_RUNNING');_0x1c809b[_0x17f4e7(0xfcd)]=0x199;throw _0x1c809b;}return await _0x3cbe59[_0x17f4e7(0xa00)](),{'result':await _0x5c1a53(_0x3cbe59)};},{'id':_0x9c1df3(0x5b0),'summary':'Start\x20engine','tags':[_0x9c1df3(0x7f1)],'params':{'key':_0x9c1df3(0x828)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'key':{'type':_0x9c1df3(0xf7a)}},'required':['key'],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x4ce)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':'embeddings','action':'embeddings_engine_start'}}),_0x5747a7['add']('POST',_0x9c1df3(0x11de),async({params:_0x32f7ff})=>{const _0x266beb=_0x9c1df3,{type:_0x24b334,name:_0x13db79}=_0x206227(_0x32f7ff[_0x266beb(0x9dd)]);if(!_0x47f8ce[_0x266beb(0x9d0)](_0x24b334))throw _0x11f1a0(_0x266beb(0x728)+_0x32f7ff[_0x266beb(0x9dd)]+'\x22');const _0x3265db=await _0x3c4c94['engines'][_0x266beb(0x8af)](_0x24b334,_0x13db79);return{'result':await _0x5c1a53(_0x3265db)};},{'id':_0x9c1df3(0x5c8),'summary':_0x9c1df3(0x601),'tags':['embeddings'],'params':{'key':_0x9c1df3(0x828)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'key':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x4ce)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x7f1),'action':_0x9c1df3(0x5c8)}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x96f),'/api/embeddings/engines/:key',async({params:_0x5d099b,body:_0xb968fe})=>{const _0x4d333b=_0x9c1df3,_0x40117b=_0x6549e8(_0x5d099b['key']),_0x2004cd=_0x40117b['isRunning'],_0x4715e0=_0xb968fe?.[_0x4d333b(0x142)]!=null;return await _0x40117b[_0x4d333b(0x9b1)](_0xb968fe??{}),_0x4715e0&&_0x2004cd?(await _0x40117b[_0x4d333b(0x1fe)](),await _0x40117b['start']()):(await _0x40117b[_0x4d333b(0x7c9)]({'force':!![]}),await _0x40117b[_0x4d333b(0x187)]()),{'result':await _0x5c1a53(_0x40117b)};},{'id':'embeddings_engine_patch','summary':'Update\x20engine\x20declaration','description':_0x9c1df3(0x846),'tags':['embeddings'],'params':{'key':_0x9c1df3(0x828)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'key':{'type':_0x9c1df3(0xf7a)},'enabled':{'type':'boolean'},'affinity':{'type':[_0x9c1df3(0xf9d),_0x9c1df3(0x11e)],'items':{'type':_0x9c1df3(0xf7a)}},'meta':{'type':['object',_0x9c1df3(0x11e)],'additionalProperties':!![]},'config':{'type':'object','additionalProperties':!![]}},'required':['key'],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x9c1df3(0xd14)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x4ce)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0xcd7)},'mcp':{'include':![]}}),_0x5747a7['add'](_0x9c1df3(0x42f),'/api/embeddings/engines/:key',async({params:_0x5c4cc5})=>{const _0x2942f0=_0x9c1df3,{type:_0x4ace4a,name:_0xf90d80}=_0x206227(_0x5c4cc5[_0x2942f0(0x9dd)]);if(!_0x47f8ce[_0x2942f0(0x9d0)](_0x4ace4a))throw _0x11f1a0(_0x2942f0(0x728)+_0x5c4cc5[_0x2942f0(0x9dd)]+'\x22');if(!_0x3c4c94[_0x2942f0(0xab8)][_0x2942f0(0xab8)][_0x2942f0(0x9d0)](_0x5c4cc5[_0x2942f0(0x9dd)]))throw _0x11f1a0('engine\x20\x22'+_0x5c4cc5[_0x2942f0(0x9dd)]+'\x22');return await _0x3c4c94['engines'][_0x2942f0(0x6cd)](_0x4ace4a,_0xf90d80),{'result':_0x2942f0(0xde6)};},{'id':_0x9c1df3(0x4e7),'summary':_0x9c1df3(0x426),'tags':[_0x9c1df3(0x7f1)],'params':{'key':'Engine\x20key'},'inputSchema':{'type':'object','properties':{'key':{'type':'string'}},'required':[_0x9c1df3(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xf7a)},'access':{'audiences':['http','shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x4ce)},'safety':{'access':_0x9c1df3(0x90a),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':'embeddings','action':_0x9c1df3(0x4e7)}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x929),_0x9c1df3(0x106b),async()=>({'result':await Promise[_0x9c1df3(0xf09)](_0x3c4c94[_0x9c1df3(0xab8)][_0x9c1df3(0x63e)]()['filter'](_0x11c050=>_0x11c050[_0x9c1df3(0xaee)]===_0x9c1df3(0x37b))[_0x9c1df3(0x1166)](_0x5c1a53))}),{'id':'embeddings_embedders_list','summary':_0x9c1df3(0xc98),'description':'Returns\x20all\x20embedder\x20engines.\x20Embedders\x20are\x20global\x20�\x20shared\x20across\x20all\x20environments.','tags':[_0x9c1df3(0x7f1)],'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:read'},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':null}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0xe46),'/api/embeddings/embedders',async({body:_0x16315a})=>{const _0x2bb65a=_0x9c1df3,{name:_0x14748d,..._0x3cbc78}=_0x16315a??{};if(!_0x14748d||typeof _0x14748d!=='string')throw new _0x225d52('body.name\x20required','BAD_PARAM');const _0xb50e07=await _0x3c4c94['embeddings'][_0x2bb65a(0x623)](_0x14748d,_0x3cbc78);return{'result':await _0x5c1a53(_0xb50e07)};},{'id':_0x9c1df3(0x32a),'summary':_0x9c1df3(0x10a2),'description':_0x9c1df3(0x57d),'tags':['embeddings'],'body':{'name':_0x9c1df3(0x10fd),'provider':_0x9c1df3(0x113b),'model':'nomic-embed-text','baseUrl':_0x9c1df3(0x114a)},'inputSchema':{'type':'object','properties':{'name':{'type':_0x9c1df3(0xf7a)},'provider':{'type':_0x9c1df3(0xf7a)},'model':{'type':_0x9c1df3(0xf7a)},'baseUrl':{'type':[_0x9c1df3(0xf7a),_0x9c1df3(0x11e)]}},'required':[_0x9c1df3(0x1173)],'additionalProperties':!![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':['http','shell',_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x7be)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0xcd7)},'mcp':{'capability':_0x9c1df3(0x7f1),'action':_0x9c1df3(0x32a)}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0xe46),_0x9c1df3(0xf2a),async({body:_0x76c9c0})=>{const _0x598980=_0x9c1df3,{name:_0x30adbf,..._0xe7a21b}=_0x76c9c0??{};if(!_0x30adbf||typeof _0x30adbf!==_0x598980(0xf7a))throw new _0x225d52(_0x598980(0xda7),'BAD_PARAM');if(!_0xe7a21b['source_type'])throw new _0x225d52(_0x598980(0xe60),_0x598980(0x10b5));if(!_0xe7a21b[_0x598980(0x43a)])_0xe7a21b['source_env']=_0x598980(0x8d0);const _0x22635c=await _0x3c4c94['embeddings']['createIndexer'](_0x30adbf,_0xe7a21b);return{'result':await _0x5c1a53(_0x22635c)};},{'id':_0x9c1df3(0x11dc),'summary':_0x9c1df3(0xccb),'description':_0x9c1df3(0xfc6),'tags':[_0x9c1df3(0x7f1)],'body':{'name':'default:articles-body','source_type':_0x9c1df3(0xb8),'source_env':_0x9c1df3(0x8d0),'embedder':'my-embedder','storage_key':'articles-body'},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'name':{'type':_0x9c1df3(0xf7a)},'source_type':{'type':_0x9c1df3(0xf7a)},'source_env':{'type':'string','default':_0x9c1df3(0x8d0)},'embedder':{'type':[_0x9c1df3(0xf7a),'object']},'storage_key':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x1173),_0x9c1df3(0x481)],'additionalProperties':!![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x7be)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0xcd7)},'mcp':{'capability':'embeddings','action':'embeddings_indexer_create'}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0xe46),_0x9c1df3(0x6f7),async({body:_0x509561})=>{const _0x87e695=_0x9c1df3,{name:_0x3051e4,algorithm_config:_0x1371e9,M:_0x2dd6e4,efConstruction:_0xcdff5e,efSearch:_0x40abbc,maxElements:_0x30b000,..._0x2384cc}=_0x509561??{};if(!_0x3051e4||typeof _0x3051e4!==_0x87e695(0xf7a))throw new _0x225d52(_0x87e695(0xda7),_0x87e695(0x10b5));if(!_0x2384cc[_0x87e695(0x1cc)])throw new _0x225d52('body.storage_key\x20required',_0x87e695(0x10b5));if(!_0x2384cc['source_env'])_0x2384cc[_0x87e695(0x43a)]=_0x87e695(0x8d0);const _0x3571eb={..._0x1371e9??{}};if(_0x2dd6e4!==undefined)_0x3571eb['M']=_0x2dd6e4;if(_0xcdff5e!==undefined)_0x3571eb[_0x87e695(0x4e0)]=_0xcdff5e;if(_0x40abbc!==undefined)_0x3571eb[_0x87e695(0xce0)]=_0x40abbc;if(_0x30b000!==undefined)_0x3571eb['maxElements']=_0x30b000;const _0x29dacc=Object[_0x87e695(0xa52)](_0x3571eb)[_0x87e695(0x156)]>0x0?{..._0x2384cc,'algorithm_config':_0x3571eb}:_0x2384cc,_0x2e0224=await _0x3c4c94[_0x87e695(0x7f1)][_0x87e695(0xed5)](_0x3051e4,_0x29dacc);return{'result':await _0x5c1a53(_0x2e0224)};},{'id':_0x9c1df3(0xae9),'summary':_0x9c1df3(0xa4c),'description':_0x9c1df3(0x10d6),'tags':[_0x9c1df3(0x7f1)],'body':{'name':'default:articles-body-alt','source_type':_0x9c1df3(0xb8),'storage_key':_0x9c1df3(0x1059),'source_env':'default','embedder':_0x9c1df3(0x10fd),'algorithm':_0x9c1df3(0x41e)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'name':{'type':_0x9c1df3(0xf7a)},'source_type':{'type':_0x9c1df3(0xf7a)},'storage_key':{'type':_0x9c1df3(0xf7a)},'source_env':{'type':_0x9c1df3(0xf7a),'default':_0x9c1df3(0x8d0)},'embedder':{'type':[_0x9c1df3(0xf7a),_0x9c1df3(0xb36)]},'algorithm':{'type':'string'},'algorithm_config':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'M':{'type':_0x9c1df3(0x10f2)},'efConstruction':{'type':_0x9c1df3(0x10f2)},'efSearch':{'type':_0x9c1df3(0x10f2)},'maxElements':{'type':_0x9c1df3(0x10f2)}},'required':[_0x9c1df3(0x1173),_0x9c1df3(0x1cc)],'additionalProperties':!![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x7be)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0xcd7)},'mcp':{'capability':'embeddings','action':_0x9c1df3(0xae9)}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x929),_0x9c1df3(0xa2d),async({params:_0xe81f71})=>{const _0x54fe5d=_0x9c1df3,_0x4e61f1=_0x3c4c94[_0x54fe5d(0xab8)][_0x54fe5d(0xdd5)](_0x54fe5d(0x37b),_0xe81f71[_0x54fe5d(0x1173)]);if(!_0x4e61f1?.[_0x54fe5d(0x1f5)]?.[_0x54fe5d(0xe6d)])throw _0x189a66(_0x54fe5d(0x1102)+_0xe81f71['name']+'\x22');return{'result':await _0x4e61f1[_0x54fe5d(0x1f5)][_0x54fe5d(0xe6d)]()};},{'id':_0x9c1df3(0x477),'summary':_0x9c1df3(0x1f0),'description':_0x9c1df3(0x640),'tags':['embeddings'],'params':{'name':'Embedder\x20name'},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'name':{'type':_0x9c1df3(0xf7a)}},'required':['name'],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x58b)},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':null}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x929),_0x9c1df3(0xb22),async({params:_0x1e290c})=>{const _0x433855=_0x9c1df3,_0x3e8d02=_0x433855(0x594)+_0x1e290c[_0x433855(0x1173)],_0x3868bc=_0x3c4c94[_0x433855(0xab8)][_0x433855(0xab8)]['get'](_0x3e8d02);if(!_0x3868bc)throw _0x11f1a0(_0x433855(0x1102)+_0x1e290c['name']+'\x22');const _0x324c47=_0x3868bc['doc']?.[_0x433855(0x142)]??{},_0x24ee10=(_0x324c47[_0x433855(0xb14)]??_0x324c47[_0x433855(0x697)]??_0x433855(0x114a))[_0x433855(0x8d8)](/\/$/,'');try{const _0xc9864=await fetch(_0x24ee10+_0x433855(0xedf),{'signal':AbortSignal[_0x433855(0x44f)](0x1388)});if(!_0xc9864['ok'])throw new Error(_0x433855(0x1242)+_0xc9864[_0x433855(0xfcd)]);const _0x27285b=await _0xc9864[_0x433855(0x1ee)](),_0x52058e=(_0x27285b[_0x433855(0xd9f)]??[])[_0x433855(0x1166)](_0x5f42fb=>({'model':_0x5f42fb[_0x433855(0x1173)],'size':_0x5f42fb[_0x433855(0xfb)]??null}));return{'result':{'models':_0x52058e,'source':_0x433855(0x38b),'baseUrl':_0x24ee10}};}catch(_0x53b654){return{'result':{'models':[],'source':_0x433855(0x225),'error':_0x53b654[_0x433855(0xb4e)],'baseUrl':_0x24ee10}};}},{'id':_0x9c1df3(0x6ea),'summary':_0x9c1df3(0xda),'description':_0x9c1df3(0xd9),'tags':[_0x9c1df3(0x7f1)],'params':{'name':_0x9c1df3(0x1234)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'name':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':'schema:read'},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x7f1),'action':_0x9c1df3(0x6ea),'readOnlyHint':!![]}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x929),_0x9c1df3(0xd8b),async({query:_0x22774b})=>{const _0x349e8c=_0x9c1df3,_0x2a5b6e=(_0x22774b?.[_0x349e8c(0xb14)]??'http://localhost:11434')[_0x349e8c(0x8d8)](/\/$/,'');try{const _0x3db179=await fetch(_0x2a5b6e+_0x349e8c(0xedf),{'signal':AbortSignal['timeout'](0x1388)});if(!_0x3db179['ok'])throw new Error(_0x349e8c(0x1242)+_0x3db179[_0x349e8c(0xfcd)]);const _0x521f53=await _0x3db179['json'](),_0x2ad9b1=(_0x521f53['models']??[])['map'](_0x3b2e5b=>({'model':_0x3b2e5b['name'],'size':_0x3b2e5b['size']??null}));return{'result':{'models':_0x2ad9b1,'source':'live','baseUrl':_0x2a5b6e}};}catch(_0x17ff39){return{'result':{'models':[],'source':_0x349e8c(0x225),'error':_0x17ff39[_0x349e8c(0xb4e)],'baseUrl':_0x2a5b6e}};}},{'id':_0x9c1df3(0xd22),'summary':_0x9c1df3(0x408),'description':_0x9c1df3(0xe51),'tags':['embeddings'],'query':{'url':_0x9c1df3(0x114a)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'url':{'type':_0x9c1df3(0xf7a),'default':_0x9c1df3(0x114a)}},'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),'shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x58b)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none','querySchema':{'url':{'type':_0x9c1df3(0xf7a),'default':_0x9c1df3(0x114a)}}},'mcp':{'capability':_0x9c1df3(0x7f1),'action':_0x9c1df3(0xd22),'readOnlyHint':!![]}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0xe46),_0x9c1df3(0x904),async({body:_0x8f2c40})=>{const _0x56de92=_0x9c1df3,{name:_0x4f138c,..._0x26de3d}=_0x8f2c40??{};if(!_0x4f138c||typeof _0x4f138c!==_0x56de92(0xf7a))throw new _0x225d52(_0x56de92(0xda7),_0x56de92(0x10b5));if(!_0x26de3d[_0x56de92(0x5da)])throw new _0x225d52(_0x56de92(0x110e),_0x56de92(0x10b5));if(!_0x26de3d['indexer'])throw new _0x225d52(_0x56de92(0x723),'BAD_PARAM');if(!_0x26de3d['embedder'])throw new _0x225d52(_0x56de92(0xd4b),_0x56de92(0x10b5));const _0x4c08ae=await _0x3c4c94['embeddings']['createWorker'](_0x4f138c,_0x26de3d);return{'result':await _0x5c1a53(_0x4c08ae)};},{'id':'embeddings_worker_create','summary':_0x9c1df3(0x1187),'description':_0x9c1df3(0x1031),'tags':[_0x9c1df3(0x7f1)],'body':{'name':_0x9c1df3(0x8d2),'job_type':_0x9c1df3(0xa7),'indexer':_0x9c1df3(0xd0),'embedder':'my-embedder'},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'name':{'type':_0x9c1df3(0xf7a)},'job_type':{'type':_0x9c1df3(0xf7a)},'indexer':{'type':_0x9c1df3(0xf7a)},'embedder':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x1173),_0x9c1df3(0x5da),_0x9c1df3(0xa4a),_0x9c1df3(0x37b)],'additionalProperties':!![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:write'},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0xcd7)},'mcp':{'capability':'embeddings','action':_0x9c1df3(0xe7f)}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x929),'/api/embeddings/workers/:name/stats',async({params:_0x25c904})=>{const _0x4772b3=_0x9c1df3,_0x18f0e5=_0x3c4c94[_0x4772b3(0xab8)][_0x4772b3(0xdd5)](_0x4772b3(0x17a),_0x25c904[_0x4772b3(0x1173)]);if(!_0x18f0e5?.['api']?.['stats'])throw _0x189a66(_0x4772b3(0x101e)+_0x25c904[_0x4772b3(0x1173)]+'\x22');return{'result':await _0x18f0e5[_0x4772b3(0x1f5)]['stats']()};},{'id':'embeddings_worker_stats','summary':'Worker\x20stats','tags':[_0x9c1df3(0x7f1)],'params':{'name':_0x9c1df3(0xca0)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'name':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x1173)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x58b)},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':null}),_0x5747a7[_0x9c1df3(0x33c)]('GET',_0x9c1df3(0xc30),async()=>({'result':_0x3c4c94[_0x9c1df3(0x7f1)][_0x9c1df3(0xd1f)]()}),{'id':_0x9c1df3(0xc50),'summary':_0x9c1df3(0xa50),'tags':[_0x9c1df3(0x7f1)],'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xf9d),'items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x58b)},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x7f1),'action':_0x9c1df3(0xc50),'readOnlyHint':!![]}}),_0x5747a7['add'](_0x9c1df3(0x929),_0x9c1df3(0x9cf),async()=>{const _0xb6532=_0x9c1df3;return await _0x308b7e(_0x3c4c94[_0xb6532(0xc65)]??_0x3c4c94),{'result':_0x3c4c94['embeddings']['listProviders']()};},{'id':'embeddings_providers','summary':_0x9c1df3(0x1063),'description':_0x9c1df3(0x72f),'tags':[_0x9c1df3(0x7f1)],'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':[_0x9c1df3(0x9f4),'shell',_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x58b)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x7f1),'action':_0x9c1df3(0x570),'readOnlyHint':!![]}}),_0x5747a7[_0x9c1df3(0x33c)]('GET',_0x9c1df3(0x113),async({query:_0x1d2e74})=>{const _0x24dc5b=_0x9c1df3;await _0x308b7e(_0x3c4c94[_0x24dc5b(0xc65)]??_0x3c4c94);const _0x578652=_0x3c4c94[_0x24dc5b(0x7f1)][_0x24dc5b(0xbc2)](_0x1d2e74?.[_0x24dc5b(0xe04)]??null),_0x2138a1={};for(const _0x522054 of _0x578652){if(!_0x2138a1[_0x522054[_0x24dc5b(0xe04)]])_0x2138a1[_0x522054[_0x24dc5b(0xe04)]]=[];_0x2138a1[_0x522054[_0x24dc5b(0xe04)]][_0x24dc5b(0x597)](_0x522054);}return{'result':_0x2138a1};},{'id':_0x9c1df3(0x79b),'summary':_0x9c1df3(0xa3b),'description':_0x9c1df3(0xfe9),'tags':[_0x9c1df3(0x7f1)],'query':{'provider':null},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'provider':{'type':[_0x9c1df3(0xf7a),'null'],'default':null}},'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x58b)},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc),'querySchema':{'provider':{'type':[_0x9c1df3(0xf7a),_0x9c1df3(0x11e)],'default':null}}},'mcp':{'capability':'embeddings','action':_0x9c1df3(0x79b),'readOnlyHint':!![]}}),_0x5747a7['add'](_0x9c1df3(0x929),_0x9c1df3(0xae0),async({params:_0x65ea9a})=>{const _0x538ffd=_0x9c1df3;return await _0x308b7e(_0x3c4c94[_0x538ffd(0xc65)]??_0x3c4c94),{'result':_0x3c4c94['embeddings'][_0x538ffd(0xbc2)](_0x65ea9a[_0x538ffd(0xe04)])};},{'id':_0x9c1df3(0x91),'summary':'List\x20models\x20by\x20provider','tags':['embeddings'],'params':{'provider':'Provider\x20name,\x20e.g.\x20ollama'},'inputSchema':{'type':'object','properties':{'provider':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0xe04)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xf9d),'items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:read'},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':'embeddings','action':_0x9c1df3(0x91),'readOnlyHint':!![]}}),_0x5747a7['add'](_0x9c1df3(0xe46),'/api/embeddings/models',async({body:_0x140e58})=>{const _0x4171e9=_0x9c1df3,{provider:_0x38323e,model:_0x311056,dims:_0x571cd8,description:_0x255d9d}=_0x140e58??{};if(!_0x38323e||typeof _0x38323e!==_0x4171e9(0xf7a))throw new _0x225d52(_0x4171e9(0xafc),_0x4171e9(0x10b5));if(!_0x311056||typeof _0x311056!==_0x4171e9(0xf7a))throw new _0x225d52(_0x4171e9(0xdf7),_0x4171e9(0x10b5));if(!Number[_0x4171e9(0x474)](_0x571cd8)||_0x571cd8<=0x0)throw new _0x225d52(_0x4171e9(0x275),'BAD_PARAM');return await _0x3c4c94[_0x4171e9(0x7f1)]['registerModel'](_0x38323e,_0x311056,_0x571cd8,_0x255d9d??''),{'result':{'provider':_0x38323e,'model':_0x311056,'dims':_0x571cd8,'description':_0x255d9d??''}};},{'id':_0x9c1df3(0x11fa),'summary':_0x9c1df3(0xba0),'tags':[_0x9c1df3(0x7f1)],'body':{'provider':_0x9c1df3(0x113b),'model':_0x9c1df3(0x1053),'dims':0x300,'description':''},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'provider':{'type':'string'},'model':{'type':'string'},'dims':{'type':_0x9c1df3(0x10f2)},'description':{'type':_0x9c1df3(0xf7a),'default':''}},'required':[_0x9c1df3(0xe04),_0x9c1df3(0x7d4),_0x9c1df3(0xa67)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),'shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x7be)},'safety':{'access':'admin','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0xcd7)},'mcp':{'capability':'embeddings','action':'embeddings_model_register'}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x42f),'/api/embeddings/models/:key',async({params:_0x4b3e48})=>{const _0x20b1d4=_0x9c1df3,{INTERNAL_TYPES:_0x1cce75}=requireEnums(),_0x5a7e5f=_0x1cce75[_0x20b1d4(0x773)],_0x459df8=_0x3c4c94[_0x20b1d4(0xc65)]??_0x3c4c94,_0xe22765=_0x459df8[_0x20b1d4(0xa57)](_0x5a7e5f,_0x4b3e48[_0x20b1d4(0x9dd)]);if(!_0xe22765)throw _0x11f1a0(_0x20b1d4(0xaac)+_0x4b3e48['key']+'\x22');if(_0xe22765[_0x20b1d4(0x568)]?.[_0x20b1d4(0x3e1)]){const _0x835400=new _0x225d52('Built-in\x20model\x20\x22'+_0x4b3e48[_0x20b1d4(0x9dd)]+_0x20b1d4(0xb1d)+_0x20b1d4(0x7de),_0x20b1d4(0xe02));_0x835400[_0x20b1d4(0xfcd)]=0x199;throw _0x835400;}return await _0x459df8[_0x20b1d4(0x21e)](_0x5a7e5f,_0x4b3e48[_0x20b1d4(0x9dd)]),{'result':_0x20b1d4(0x9ef)};},{'id':'embeddings_model_delete','summary':_0x9c1df3(0xd3),'tags':[_0x9c1df3(0x7f1)],'params':{'key':_0x9c1df3(0x1249)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'key':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':'string'},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:write'},'safety':{'access':_0x9c1df3(0x90a),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x7f1),'action':_0x9c1df3(0x52c)}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x929),_0x9c1df3(0x95c),async()=>({'result':_0x3c4c94[_0x9c1df3(0x7f1)]['listVectorStores']()}),{'id':_0x9c1df3(0x33a),'summary':_0x9c1df3(0x79e),'description':_0x9c1df3(0x509),'tags':[_0x9c1df3(0x7f1)],'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{},'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x58b)},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':null}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x929),'/api/embeddings/storage/:key',async({params:_0x38d487})=>{const _0xc3bd16=_0x9c1df3,_0x160a8e=_0x3c4c94[_0xc3bd16(0x7f1)][_0xc3bd16(0x968)](_0x38d487[_0xc3bd16(0x9dd)]);if(!_0x160a8e)throw _0x11f1a0(_0xc3bd16(0xa10)+_0x38d487[_0xc3bd16(0x9dd)]+_0xc3bd16(0xd69));return{'result':_0x160a8e};},{'id':'embeddings_storage_stats','summary':_0x9c1df3(0x3b4),'tags':['embeddings'],'params':{'key':_0x9c1df3(0xced)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'key':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:read'},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':null}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x929),_0x9c1df3(0x4cb),async({params:_0xf69b98})=>{const _0x19c8e9=_0x9c1df3,_0x4db1f5=_0x3c4c94[_0x19c8e9(0x7f1)]['getVector'](_0xf69b98['key'],_0xf69b98[_0x19c8e9(0xc3e)]);if(!_0x4db1f5)throw _0x11f1a0(_0x19c8e9(0xae7)+_0xf69b98['doc_key']+_0x19c8e9(0x631)+_0xf69b98[_0x19c8e9(0x9dd)]+'\x22');return{'result':{'key':_0xf69b98['doc_key'],'storage_key':_0xf69b98['key'],'dims':_0x4db1f5['length'],'vector':Array['from'](_0x4db1f5)}};},{'id':_0x9c1df3(0x338),'summary':_0x9c1df3(0x10a5),'tags':[_0x9c1df3(0x7f1)],'params':{'key':_0x9c1df3(0xced),'doc_key':'Document\x20key'},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'key':{'type':_0x9c1df3(0xf7a)},'doc_key':{'type':'string'}},'required':[_0x9c1df3(0x9dd),_0x9c1df3(0xc3e)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':['http',_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x2ae)},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':null}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x929),_0x9c1df3(0x10ed),async({params:_0x1c5a0e})=>{const _0x1b2562=_0x9c1df3;return _0x11afcc(_0x1c5a0e[_0x1b2562(0x30b)]),{'result':await _0x19ea3b(_0x1c5a0e[_0x1b2562(0x30b)],_0x1c5a0e[_0x1b2562(0xaee)])};},{'id':'env_type_pipelines_list','summary':_0x9c1df3(0x744),'description':'Returns\x20all\x20vector-search\x20pipelines\x20whose\x20source_env\x20and\x20source_type\x20match\x20this\x20env/type.','tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':'Source\x20type\x20name'},'inputSchema':{'type':'object','properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x30b),_0x9c1df3(0xaee)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xf9d),'items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x58b)},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0xfa2),'readOnlyHint':!![]}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0xe46),_0x9c1df3(0x10ed),async({params:_0x351846,body:_0x42c620})=>{const _0x1d517d=_0x9c1df3;_0x11afcc(_0x351846[_0x1d517d(0x30b)]);const {name:_0x281609,..._0x4b09b7}=_0x42c620??{};if(!_0x281609||typeof _0x281609!==_0x1d517d(0xf7a))throw new _0x225d52(_0x1d517d(0xda7),'BAD_PARAM');_0x4b09b7[_0x1d517d(0x43a)]=_0x351846[_0x1d517d(0x30b)],_0x4b09b7['source_type']=_0x351846[_0x1d517d(0xaee)];const _0x491075=await _0x3c4c94[_0x1d517d(0x7f1)]['createPipeline'](_0x281609,_0x4b09b7),_0x2194f8=_0x4b09b7[_0x1d517d(0x1cc)]??_0x281609;return{'status':0xc9,'body':{'result':{'pipeline':_0x2194f8,'label':_0x281609,'env':_0x351846[_0x1d517d(0x30b)],'type':_0x351846[_0x1d517d(0xaee)],'engines':{'embedder':_0x491075[_0x1d517d(0x37b)]?.[_0x1d517d(0x9dd)]??null,'indexer':_0x491075[_0x1d517d(0xa4a)]?.[_0x1d517d(0x9dd)]??null,'worker':_0x491075['worker']?.[_0x1d517d(0x9dd)]??null,'search':_0x491075[_0x1d517d(0x460)]?.[_0x1d517d(0x9dd)]??null}}}};},{'id':_0x9c1df3(0x65e),'summary':'Create\x20pipeline\x20for\x20env+type','description':'Creates\x20embedder\x20+\x20indexer\x20+\x20search\x20(+\x20optional\x20worker)\x20for\x20the\x20given\x20environment\x20and\x20type.\x20'+'source_env\x20and\x20source_type\x20are\x20taken\x20from\x20the\x20URL\x20�\x20do\x20not\x20include\x20them\x20in\x20the\x20body.','tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x7bb)},'body':{'name':_0x9c1df3(0x1059),'embedder':{'provider':'ollama','model':_0x9c1df3(0xb6b)},'field':_0x9c1df3(0xce8),'dims':0x300,'algorithm':_0x9c1df3(0x41e)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)},'name':{'type':'string'},'embedder':{'type':['string','object']},'field':{'type':_0x9c1df3(0xf7a)},'dims':{'type':'integer'},'algorithm':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x30b),_0x9c1df3(0xaee),_0x9c1df3(0x1173)],'additionalProperties':!![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),'shell',_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:write'},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0xcd7)},'mcp':{'capability':'pipeline','action':'env_type_pipeline_create'}});function _0x3d4234(_0x4e0cee,_0x2e9b6f){const _0x3eb7ce=_0x9c1df3,_0x2442d7=_0x3c57ef(_0x4e0cee,_0x2e9b6f),_0x1cd246=['indexer@'+_0x2442d7,_0x3eb7ce(0xca7)+_0x2442d7,_0x3eb7ce(0xde0)+_0x2442d7+'-worker'];return _0x1cd246[_0x3eb7ce(0x1103)](_0x29c094=>_0x3c4c94[_0x3eb7ce(0xab8)]['engines'][_0x3eb7ce(0x9d0)](_0x29c094));}_0x5747a7[_0x9c1df3(0x33c)]('POST',_0x9c1df3(0x258),async({params:_0x577a0b})=>{const _0x3c12c6=_0x9c1df3;_0x11afcc(_0x577a0b['env']);const _0x54a772=await _0x2ba074(_0x577a0b[_0x3c12c6(0x30b)],_0x577a0b['type'],_0x577a0b['pipeline']);if(_0x54a772&&!_0x54a772[_0x3c12c6(0xb1)]){const _0x278808=await _0x3c4c94[_0x3c12c6(0x30b)](_0x577a0b[_0x3c12c6(0x30b)])['pipelines'][_0x3c12c6(0x1fe)](_0x577a0b[_0x3c12c6(0x46b)]),_0x1222dc=_0x2c6ab3(_0x278808,_0x577a0b[_0x3c12c6(0xaee)],_0x577a0b[_0x3c12c6(0x30b)]);return{'result':_0x1222dc?.[_0x3c12c6(0xab8)]??[]};}const _0x1e5b4e=_0x3d4234(_0x577a0b[_0x3c12c6(0x30b)],_0x577a0b[_0x3c12c6(0x46b)]);if(!_0x1e5b4e[_0x3c12c6(0x156)])throw _0x11f1a0(_0x3c12c6(0xedd)+_0x577a0b[_0x3c12c6(0x46b)]+'\x22');const _0x48f55f=[];for(const _0x4a291c of _0x1e5b4e){const _0x4d9866=_0x3c4c94[_0x3c12c6(0xab8)][_0x3c12c6(0xab8)][_0x3c12c6(0xbeb)](_0x4a291c);_0x4d9866?.[_0x3c12c6(0xc53)]&&await _0x4d9866['stop']();if(_0x4d9866)_0x48f55f[_0x3c12c6(0x597)](await _0x5c1a53(_0x4d9866));}return{'result':_0x48f55f};},{'id':_0x9c1df3(0x11b6),'summary':_0x9c1df3(0xe05),'description':_0x9c1df3(0x5e0),'tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':_0x9c1df3(0x116)},'inputSchema':{'type':'object','properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x30b),_0x9c1df3(0xaee),_0x9c1df3(0x46b)],'additionalProperties':![]},'outputSchema':{'type':'array','items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':[_0x9c1df3(0x9f4),'shell',_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x7be)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':'pipeline','action':'env_type_pipeline_stop'}}),_0x5747a7[_0x9c1df3(0x33c)]('POST',_0x9c1df3(0x9d1),async({params:_0x31885c})=>{const _0x2b235f=_0x9c1df3;_0x11afcc(_0x31885c[_0x2b235f(0x30b)]);const _0x5c763a=await _0x2ba074(_0x31885c[_0x2b235f(0x30b)],_0x31885c[_0x2b235f(0xaee)],_0x31885c[_0x2b235f(0x46b)]);if(_0x5c763a&&!_0x5c763a[_0x2b235f(0xb1)]){const _0x1664ff=await _0x3c4c94['env'](_0x31885c[_0x2b235f(0x30b)])['pipelines'][_0x2b235f(0xa00)](_0x31885c['pipeline']),_0x171b97=_0x2c6ab3(_0x1664ff,_0x31885c[_0x2b235f(0xaee)],_0x31885c[_0x2b235f(0x30b)]);return{'result':_0x171b97?.['engines']??[]};}const _0x59a6d0=_0x3d4234(_0x31885c['env'],_0x31885c[_0x2b235f(0x46b)]);if(!_0x59a6d0[_0x2b235f(0x156)])throw _0x11f1a0(_0x2b235f(0xedd)+_0x31885c[_0x2b235f(0x46b)]+'\x22');const _0x2748be=[];for(const _0x31fdcc of _0x59a6d0){const _0x473df4=_0x3c4c94[_0x2b235f(0xab8)][_0x2b235f(0xab8)][_0x2b235f(0xbeb)](_0x31fdcc);_0x473df4&&!_0x473df4[_0x2b235f(0xc53)]&&await _0x473df4[_0x2b235f(0xa00)]();if(_0x473df4)_0x2748be[_0x2b235f(0x597)](await _0x5c1a53(_0x473df4));}return{'result':_0x2748be};},{'id':_0x9c1df3(0xf77),'summary':_0x9c1df3(0xbbd),'description':_0x9c1df3(0x559),'tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':'Source\x20type','pipeline':_0x9c1df3(0x116)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':'string'},'pipeline':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x30b),'type',_0x9c1df3(0x46b)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xf9d),'items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x7be)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0xf77)}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0xe46),'/api/env/:env/type/:type/pipelines/:pipeline/restart',async({params:_0x4ad700})=>{const _0x3fe54b=_0x9c1df3;_0x11afcc(_0x4ad700[_0x3fe54b(0x30b)]);const _0x256bd0=await _0x2ba074(_0x4ad700['env'],_0x4ad700[_0x3fe54b(0xaee)],_0x4ad700['pipeline']);if(_0x256bd0&&!_0x256bd0[_0x3fe54b(0xb1)]){await _0x3c4c94[_0x3fe54b(0x30b)](_0x4ad700[_0x3fe54b(0x30b)])['pipelines'][_0x3fe54b(0x1fe)](_0x4ad700[_0x3fe54b(0x46b)]);const _0xb9e4f8=await _0x3c4c94['env'](_0x4ad700[_0x3fe54b(0x30b)])[_0x3fe54b(0x7d3)][_0x3fe54b(0xa00)](_0x4ad700[_0x3fe54b(0x46b)]),_0x2864f1=_0x2c6ab3(_0xb9e4f8,_0x4ad700['type'],_0x4ad700['env']);return{'result':_0x2864f1?.[_0x3fe54b(0xab8)]??[]};}const _0x1a51a9=_0x3d4234(_0x4ad700[_0x3fe54b(0x30b)],_0x4ad700[_0x3fe54b(0x46b)]);if(!_0x1a51a9[_0x3fe54b(0x156)])throw _0x11f1a0('pipeline\x20\x22'+_0x4ad700[_0x3fe54b(0x46b)]+'\x22');const _0x3c41f9=[];for(const _0x54143d of _0x1a51a9){const {type:_0x5b3973,name:_0x27d642}=_0x206227(_0x54143d),_0x3014e4=await _0x3c4c94[_0x3fe54b(0xab8)]['restart'](_0x5b3973,_0x27d642);_0x3c41f9[_0x3fe54b(0x597)](await _0x5c1a53(_0x3014e4));}return{'result':_0x3c41f9};},{'id':_0x9c1df3(0x8fa),'summary':_0x9c1df3(0x4bf),'description':_0x9c1df3(0x159),'tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':_0x9c1df3(0x116)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':'string'},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x30b),'type',_0x9c1df3(0x46b)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xf9d),'items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:write'},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x46b),'action':'env_type_pipeline_restart'}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x42f),'/api/env/:env/type/:type/pipelines/:pipeline',async({params:_0x46b7c4})=>{const _0x3d975c=_0x9c1df3;_0x11afcc(_0x46b7c4['env']);const _0x12df1a=await _0x2ba074(_0x46b7c4[_0x3d975c(0x30b)],_0x46b7c4[_0x3d975c(0xaee)],_0x46b7c4[_0x3d975c(0x46b)]);if(_0x12df1a&&!_0x12df1a['legacy']){const _0x2879c2=await _0x3c4c94[_0x3d975c(0x30b)](_0x46b7c4[_0x3d975c(0x30b)])[_0x3d975c(0x7d3)][_0x3d975c(0x21e)](_0x46b7c4[_0x3d975c(0x46b)]);return{'result':{'deleted':[..._0x2879c2[_0x3d975c(0xff1)],..._0x2879c2[_0x3d975c(0xcc8)]]}};}const _0x87e7c8=_0x3d4234(_0x46b7c4[_0x3d975c(0x30b)],_0x46b7c4[_0x3d975c(0x46b)]);if(!_0x87e7c8[_0x3d975c(0x156)])throw _0x11f1a0(_0x3d975c(0xedd)+_0x46b7c4[_0x3d975c(0x46b)]+'\x22');const _0x3fcb25=[];for(const _0x5047a2 of _0x87e7c8){const {type:_0x2b446f,name:_0x127c99}=_0x206227(_0x5047a2),_0x315158=_0x3c4c94['engines'][_0x3d975c(0xab8)][_0x3d975c(0xbeb)](_0x5047a2);if(_0x315158?.[_0x3d975c(0xc53)])await _0x315158[_0x3d975c(0x1fe)]()[_0x3d975c(0x415)](()=>{});await _0x3c4c94[_0x3d975c(0xab8)][_0x3d975c(0x6cd)](_0x2b446f,_0x127c99)[_0x3d975c(0x415)](()=>{}),_0x3fcb25[_0x3d975c(0x597)](_0x5047a2);}return{'result':{'deleted':_0x3fcb25}};},{'id':_0x9c1df3(0xb2a),'summary':'Delete\x20pipeline','description':_0x9c1df3(0x8f7)+_0x9c1df3(0xc77),'tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':'Pipeline\x20name\x20(storage_key)'},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':'string'},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':_0x9c1df3(0xf7a)}},'required':['env',_0x9c1df3(0xaee),'pipeline'],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x7be)},'safety':{'access':'admin','destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':'pipeline','action':_0x9c1df3(0xb2a)}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0x929),_0x9c1df3(0xdb2),async({params:_0x2e98ff})=>{const _0x1629bd=_0x9c1df3;_0x11afcc(_0x2e98ff['env']);const _0x1f9fed=_0x3c57ef(_0x2e98ff[_0x1629bd(0x30b)],_0x2e98ff[_0x1629bd(0x46b)]),_0x2ff90d=_0x3c4c94[_0x1629bd(0x7f1)]['indexer'](_0x1f9fed),_0x1f0887=_0x3c4c94[_0x1629bd(0x7f1)][_0x1629bd(0x460)](_0x1f9fed),_0x9c8f43=_0x2ff90d?await _0x2ff90d['stats']():null;let _0x11d2fa=null;if(_0x9c8f43?.[_0x1629bd(0x259)]===_0x1629bd(0x879)&&_0x9c8f43?.[_0x1629bd(0x5da)]){const _0x19418a='~'+_0x2e98ff[_0x1629bd(0x30b)]+_0x1629bd(0x532)+_0x2e98ff['type'],_0x45dfa7=_0x3c4c94[_0x1629bd(0xa3)]?.['get'](_0x19418a);if(_0x45dfa7?.[_0x1629bd(0x879)])try{const _0x3e4dff=_0x45dfa7[_0x1629bd(0x879)][_0x1629bd(0xd72)][_0x1629bd(0x1055)]();_0x11d2fa=_0x3e4dff?.[_0x1629bd(0xe4a)]?.[_0x9c8f43['job_type']]??null;}catch{}}const _0x23c986=_0x1f0887?await _0x1f0887['stats']():null;return{'result':{'pipeline':_0x2e98ff[_0x1629bd(0x46b)],'env':_0x2e98ff['env'],'type':_0x2e98ff[_0x1629bd(0xaee)],'indexer':_0x9c8f43,'search':_0x23c986?{..._0x23c986,..._0x9c8f43?.['chunk']?{'chunk':_0x9c8f43[_0x1629bd(0xf26)]}:{},..._0x9c8f43?.[_0x1629bd(0x246)]?{'prepare':_0x9c8f43[_0x1629bd(0x246)]}:{}}:null,'queue':_0x11d2fa}};},{'id':_0x9c1df3(0x7a6),'summary':_0x9c1df3(0xd4a),'description':'Returns\x20combined\x20indexer\x20progress,\x20search\x20engine\x20stats,\x20and\x20(for\x20queue-mode\x20pipelines)\x20queue\x20job\x20counts.','tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':'Pipeline\x20name\x20(storage_key)'},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':_0x9c1df3(0xf7a)}},'required':['env',_0x9c1df3(0xaee),'pipeline'],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x58b)},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0x7a6),'readOnlyHint':!![]}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0xe46),_0x9c1df3(0x1248),async({params:_0x4805cd})=>{const _0xdecb8e=_0x9c1df3;return _0x11afcc(_0x4805cd[_0xdecb8e(0x30b)]),await _0x55bbfa(_0x4805cd['env'],_0x4805cd[_0xdecb8e(0x46b)])[_0xdecb8e(0x26b)](),{'result':'ok'};},{'id':_0x9c1df3(0x108f),'summary':_0x9c1df3(0x6e0),'description':_0x9c1df3(0x1c7),'tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':_0x9c1df3(0x116)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':'string'}},'required':[_0x9c1df3(0x30b),_0x9c1df3(0xaee),_0x9c1df3(0x46b)],'additionalProperties':![]},'outputSchema':{'type':'string'},'access':{'audiences':['http','shell',_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x7be)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0x108f)}}),_0x5747a7['add']('POST',_0x9c1df3(0xf2),async({params:_0x46b923,body:_0x27f3be})=>{const _0x1c5434=_0x9c1df3;_0x11afcc(_0x46b923[_0x1c5434(0x30b)]);const _0x1a67e4=_0x27f3be?.[_0x1c5434(0xa28)];if(typeof _0x1a67e4!==_0x1c5434(0xf7a)||!_0x1a67e4[_0x1c5434(0xf4d)]())throw new _0x225d52(_0x1c5434(0x4b0),_0x1c5434(0x1ec));const _0x47f93e=_0x2ff70b(_0x27f3be?.[_0x1c5434(0xbae)]??_0x27f3be?.['k'],0xa,0x3e8),_0x452581=await _0x352d4a(_0x46b923[_0x1c5434(0x30b)],_0x46b923[_0x1c5434(0x46b)])[_0x1c5434(0x460)](_0x1a67e4,{'limit':_0x47f93e}),_0x10c485=_0x3c4c94[_0x1c5434(0xa3)][_0x1c5434(0xbeb)](_0x46b923[_0x1c5434(0x30b)]),_0x2f58b3=_0x1c5434(0x78f)+_0x46b923[_0x1c5434(0x46b)],_0x4e0817='~'+_0x46b923[_0x1c5434(0x30b)]+_0x1c5434(0x532)+_0x46b923[_0x1c5434(0xaee)],_0x404e70=_0x3c4c94[_0x1c5434(0xa3)]?.[_0x1c5434(0xbeb)](_0x4e0817)??_0x10c485,_0x12723b=_0x452581[_0x1c5434(0x1166)](_0x4301be=>{const _0x7ba54b=_0x1c5434,{sourceKey:_0x540150,chunkHash:_0x4ad540}=_0x3d0c68(_0x4301be['key']);let _0x1cb46c=null;if(_0x4ad540&&_0x404e70?.[_0x7ba54b(0x7c0)]?.(_0x2f58b3)){const _0x72a1d8=_0x404e70[_0x7ba54b(0xbeb)](_0x2f58b3,_0x540150),_0x49d802=(_0x72a1d8?.[_0x7ba54b(0x3a4)]??[])[_0x7ba54b(0xbdd)](_0x2ca294=>_0x2ca294[_0x7ba54b(0x6f9)]===_0x4ad540);_0x49d802&&(_0x1cb46c={'start':_0x49d802[_0x7ba54b(0xa00)],'end':_0x49d802[_0x7ba54b(0xc9c)],..._0x49d802['text']!=null?{'text':_0x49d802[_0x7ba54b(0x1fb)]}:{}});}const _0x2287c8=_0x10c485?.['hasType']?.(_0x46b923[_0x7ba54b(0xaee)])?_0x10c485[_0x7ba54b(0xbeb)](_0x46b923['type'],_0x540150):undefined;return{'key':_0x540150,'score':_0x4301be[_0x7ba54b(0x1122)],'value':_0x2287c8??null,..._0x4ad540?{'chunkHash':_0x4ad540}:{},..._0x1cb46c?{'chunk':_0x1cb46c}:{}};});return{'result':_0x12723b};},{'id':'env_type_pipeline_query','summary':_0x9c1df3(0x882),'description':_0x9c1df3(0x100e),'tags':['envs'],'params':{'env':_0x9c1df3(0xde1),'type':'Source\x20type','pipeline':'Pipeline\x20name\x20(storage_key)'},'body':{'query':_0x9c1df3(0xc1d),'limit':0xa},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':'string'},'query':{'type':_0x9c1df3(0xf7a)},'limit':{'type':'integer'},'k':{'type':'integer'}},'required':[_0x9c1df3(0x30b),_0x9c1df3(0xaee),_0x9c1df3(0x46b),'query'],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xf9d),'items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':['http',_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0xcd9)},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':'pipeline','action':_0x9c1df3(0x507),'readOnlyHint':!![]}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0xe46),_0x9c1df3(0x5bf),async({params:_0xce444f,body:_0x196bd0})=>{const _0x4ac7b7=_0x9c1df3;_0x11afcc(_0xce444f[_0x4ac7b7(0x30b)]);const _0x19993f=_0x196bd0?.[_0x4ac7b7(0xe59)];if(!Array[_0x4ac7b7(0x10f5)](_0x19993f)||!_0x19993f[_0x4ac7b7(0x244)](Number[_0x4ac7b7(0x2b5)]))throw new _0x225d52(_0x4ac7b7(0x167),_0x4ac7b7(0x6d5));const _0x8ffdf0=_0x2ff70b(_0x196bd0?.['limit']??_0x196bd0?.['k'],0xa,0x3e8);return{'result':await _0x352d4a(_0xce444f['env'],_0xce444f['pipeline'])[_0x4ac7b7(0x460)](new Float32Array(_0x19993f),{'limit':_0x8ffdf0})};},{'id':_0x9c1df3(0xf04),'summary':'Raw\x20vector\x20nearest\x20search','description':'Finds\x20the\x20k\x20nearest\x20neighbours\x20for\x20a\x20raw\x20float\x20vector.','tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':'Pipeline\x20name\x20(storage_key)'},'body':{'vector':[0.1,0.2,0.3],'limit':0xa},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':'string'},'pipeline':{'type':_0x9c1df3(0xf7a)},'vector':{'type':'array','items':{'type':_0x9c1df3(0x9f0)}},'limit':{'type':_0x9c1df3(0x10f2)},'k':{'type':'integer'}},'required':[_0x9c1df3(0x30b),_0x9c1df3(0xaee),_0x9c1df3(0x46b),'vector'],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xf9d),'items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'search:query'},'safety':{'access':'read','destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0xf04),'readOnlyHint':!![]}}),_0x5747a7[_0x9c1df3(0x33c)]('POST',_0x9c1df3(0x1235),async({params:_0x3ce5c7})=>{const _0x3cf744=_0x9c1df3;return _0x11afcc(_0x3ce5c7[_0x3cf744(0x30b)]),{'result':{'snapped':await _0x352d4a(_0x3ce5c7['env'],_0x3ce5c7[_0x3cf744(0x46b)])[_0x3cf744(0x33f)]()}};},{'id':_0x9c1df3(0x116a),'summary':_0x9c1df3(0xeec),'tags':['envs'],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':_0x9c1df3(0x116)},'inputSchema':{'type':'object','properties':{'env':{'type':'string'},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':_0x9c1df3(0xf7a)}},'required':['env',_0x9c1df3(0xaee),_0x9c1df3(0x46b)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),'shell',_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'schema:write'},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0x116a)}}),_0x5747a7['add']('POST',_0x9c1df3(0x295),async({params:_0x5dc43a})=>{const _0x20a0dd=_0x9c1df3;return _0x11afcc(_0x5dc43a['env']),{'result':await _0x352d4a(_0x5dc43a[_0x20a0dd(0x30b)],_0x5dc43a[_0x20a0dd(0x46b)])[_0x20a0dd(0x11ab)]()};},{'id':'env_type_pipeline_rebuild','summary':_0x9c1df3(0xb78),'tags':['envs'],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':'Pipeline\x20name\x20(storage_key)'},'inputSchema':{'type':'object','properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':_0x9c1df3(0xf7a)}},'required':['env','type',_0x9c1df3(0x46b)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':['http',_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x7be)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':!![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0x11cc)},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0xec1)}}),_0x5747a7['add'](_0x9c1df3(0x929),_0x9c1df3(0x10e5),async({params:_0xb691e9,query:_0x23c2da})=>{const _0x1fa53f=_0x9c1df3;_0x11afcc(_0xb691e9[_0x1fa53f(0x30b)]);const _0xdac4b4=_0x2ff70b(_0x23c2da?.[_0x1fa53f(0xbae)],0x64,0x3e8),_0x34a2a1=_0x23c2da?.['status']??null;return{'result':await _0x55bbfa(_0xb691e9[_0x1fa53f(0x30b)],_0xb691e9['pipeline'])['listDocStatus']({'status':_0x34a2a1,'limit':_0xdac4b4})};},{'id':_0x9c1df3(0x87f),'summary':_0x9c1df3(0xbd4),'tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':_0x9c1df3(0x116)},'query':{'status':null,'limit':0x64},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':'string'},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':_0x9c1df3(0xf7a)},'status':{'type':['string',_0x9c1df3(0x11e)],'default':null},'limit':{'type':_0x9c1df3(0x10f2),'default':0x64}},'required':[_0x9c1df3(0x30b),_0x9c1df3(0xaee),'pipeline'],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xf9d),'items':{'type':_0x9c1df3(0xb36)}},'access':{'audiences':[_0x9c1df3(0x9f4),_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x2ae)},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none','querySchema':{'status':{'type':[_0x9c1df3(0xf7a),_0x9c1df3(0x11e)],'default':null},'limit':{'type':[_0x9c1df3(0x10f2),'string'],'default':0x64}}},'mcp':{'capability':'pipeline','action':'env_type_pipeline_docs_list','readOnlyHint':!![]}}),_0x5747a7['add'](_0x9c1df3(0x929),_0x9c1df3(0xcb3),async({params:_0x527a8a})=>{return _0x11afcc(_0x527a8a['env']),{'result':await _0x55bbfa(_0x527a8a['env'],_0x527a8a['pipeline'])['getDocStatus'](_0x527a8a['key'])};},{'id':_0x9c1df3(0x201),'summary':'Get\x20doc\x20status','tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':_0x9c1df3(0x116),'key':_0x9c1df3(0x11a9)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':'string'},'key':{'type':_0x9c1df3(0xf7a)}},'required':[_0x9c1df3(0x30b),'type',_0x9c1df3(0x46b),_0x9c1df3(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':['http',_0x9c1df3(0xd14),'mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x2ae)},'safety':{'access':_0x9c1df3(0xcae),'destructive':![],'idempotent':!![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0x201),'readOnlyHint':!![]}}),_0x5747a7['add'](_0x9c1df3(0xe46),_0x9c1df3(0x627),async({params:_0x54a20b,body:_0x307a98})=>{const _0xd71fbe=_0x9c1df3;_0x11afcc(_0x54a20b[_0xd71fbe(0x30b)]);const _0x21fa7a=_0x307a98?.[_0xd71fbe(0xe59)];if(!Array[_0xd71fbe(0x10f5)](_0x21fa7a)||!_0x21fa7a[_0xd71fbe(0x244)](Number[_0xd71fbe(0x2b5)]))throw new _0x225d52('body.vector\x20must\x20be\x20a\x20finite\x20number[]',_0xd71fbe(0x6d5));return{'result':await _0x55bbfa(_0x54a20b[_0xd71fbe(0x30b)],_0x54a20b['pipeline'])[_0xd71fbe(0xcd3)](_0x54a20b[_0xd71fbe(0x9dd)],{'vector':new Float32Array(_0x21fa7a),'clock':_0x307a98?.[_0xd71fbe(0x114d)]??null})};},{'id':'env_type_pipeline_doc_mark_done','summary':_0x9c1df3(0x58e),'tags':[_0x9c1df3(0xfcc)],'params':{'env':'Environment\x20name','type':_0x9c1df3(0x3f5),'pipeline':'Pipeline\x20name\x20(storage_key)','key':'Source\x20key'},'body':{'vector':[0.1,0.2,0.3],'clock':null},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':'string'},'type':{'type':'string'},'pipeline':{'type':_0x9c1df3(0xf7a)},'key':{'type':_0x9c1df3(0xf7a)},'vector':{'type':_0x9c1df3(0xf9d),'items':{'type':'number'}},'clock':{'type':['integer',_0x9c1df3(0x11e)]}},'required':[_0x9c1df3(0x30b),'type',_0x9c1df3(0x46b),_0x9c1df3(0x9dd),_0x9c1df3(0xe59)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),'shell',_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':'data:write'},'safety':{'access':_0x9c1df3(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0xcd7)},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0x392)}}),_0x5747a7['add'](_0x9c1df3(0xe46),_0x9c1df3(0x399),async({params:_0x3b0bb6,body:_0x1aec3b})=>{const _0x1bcd01=_0x9c1df3;return _0x11afcc(_0x3b0bb6[_0x1bcd01(0x30b)]),{'result':await _0x55bbfa(_0x3b0bb6[_0x1bcd01(0x30b)],_0x3b0bb6['pipeline'])['markFail'](_0x3b0bb6[_0x1bcd01(0x9dd)],_0x1aec3b?.['error']??_0x1bcd01(0xbd5),{'clock':_0x1aec3b?.[_0x1bcd01(0x114d)]??null})};},{'id':_0x9c1df3(0x236),'summary':_0x9c1df3(0x614),'tags':[_0x9c1df3(0xfcc)],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':_0x9c1df3(0x116),'key':_0x9c1df3(0xb20)},'body':{'error':'reason','clock':null},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':_0x9c1df3(0xf7a)},'key':{'type':_0x9c1df3(0xf7a)},'error':{'type':'string'},'clock':{'type':['integer',_0x9c1df3(0x11e)]}},'required':[_0x9c1df3(0x30b),_0x9c1df3(0xaee),_0x9c1df3(0x46b),_0x9c1df3(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),'shell','mcp'],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x328)},'safety':{'access':'write','destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'remaining-fields'},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0x236)}}),_0x5747a7['add'](_0x9c1df3(0xe46),'/api/env/:env/type/:type/pipelines/:pipeline/docs/:key/markDelete',async({params:_0x37b8c3,body:_0x11ac6d})=>{const _0x55459e=_0x9c1df3;return _0x11afcc(_0x37b8c3['env']),{'result':await _0x55bbfa(_0x37b8c3[_0x55459e(0x30b)],_0x37b8c3['pipeline'])[_0x55459e(0x1096)](_0x37b8c3['key'],{'clock':_0x11ac6d?.['clock']??null,'drop':!!_0x11ac6d?.['drop']})};},{'id':_0x9c1df3(0x106d),'summary':_0x9c1df3(0xd26),'tags':['envs'],'params':{'env':'Environment\x20name','type':_0x9c1df3(0x3f5),'pipeline':_0x9c1df3(0x116),'key':_0x9c1df3(0xb20)},'body':{'clock':null,'drop':![]},'inputSchema':{'type':'object','properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':_0x9c1df3(0xf7a)},'key':{'type':_0x9c1df3(0xf7a)},'clock':{'type':[_0x9c1df3(0x10f2),'null']},'drop':{'type':'boolean','default':![]}},'required':[_0x9c1df3(0x30b),_0x9c1df3(0xaee),_0x9c1df3(0x46b),_0x9c1df3(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),'shell',_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x328)},'safety':{'access':_0x9c1df3(0x61d),'destructive':!![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0xcd7)},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0x106d)}}),_0x5747a7['add']('POST',_0x9c1df3(0x788),async({params:_0x4ac2af})=>{const _0xd49db0=_0x9c1df3;_0x11afcc(_0x4ac2af[_0xd49db0(0x30b)]);const _0x599020=_0x55bbfa(_0x4ac2af[_0xd49db0(0x30b)],_0x4ac2af[_0xd49db0(0x46b)]);if(typeof _0x599020[_0xd49db0(0xd4c)]!=='function'){const _0x23c2a3=new _0x225d52(_0xd49db0(0xfed),_0xd49db0(0x10d7));_0x23c2a3[_0xd49db0(0xfcd)]=0x199;throw _0x23c2a3;}return{'result':await _0x599020[_0xd49db0(0xd4c)](_0x4ac2af['key'])};},{'id':_0x9c1df3(0xaaf),'summary':_0x9c1df3(0xb84),'tags':['envs'],'params':{'env':_0x9c1df3(0xde1),'type':_0x9c1df3(0x3f5),'pipeline':'Pipeline\x20name\x20(storage_key)','key':_0x9c1df3(0xb20)},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':_0x9c1df3(0xf7a)},'key':{'type':_0x9c1df3(0xf7a)}},'required':['env',_0x9c1df3(0xaee),_0x9c1df3(0x46b),_0x9c1df3(0x9dd)],'additionalProperties':![]},'outputSchema':{'type':'object','additionalProperties':!![]},'access':{'audiences':['http',_0x9c1df3(0xd14),_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x328)},'safety':{'access':_0x9c1df3(0x61d),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':'none'},'mcp':{'capability':_0x9c1df3(0x46b),'action':_0x9c1df3(0xaaf)}}),_0x5747a7[_0x9c1df3(0x33c)](_0x9c1df3(0xe46),_0x9c1df3(0xb65),async({params:_0x4eff0f,body:_0x3b4b4a})=>{const _0x711c1a=_0x9c1df3;_0x11afcc(_0x4eff0f[_0x711c1a(0x30b)]);const _0x1b1aac=_0x55bbfa(_0x4eff0f[_0x711c1a(0x30b)],_0x4eff0f[_0x711c1a(0x46b)]);if(typeof _0x1b1aac['retryFailed']!=='function'){const _0x5276bb=new _0x225d52(_0x711c1a(0xf73),_0x711c1a(0x10d7));_0x5276bb[_0x711c1a(0xfcd)]=0x199;throw _0x5276bb;}const _0x553098=_0x2ff70b(_0x3b4b4a?.[_0x711c1a(0xbae)],0x3e8,0x2710),_0x22bc09=!!_0x3b4b4a?.[_0x711c1a(0x12c)];return{'result':await _0x1b1aac[_0x711c1a(0x108a)]({'limit':_0x553098,'includeStuckPending':_0x22bc09})};},{'id':'env_type_pipeline_retry_failed','summary':_0x9c1df3(0xdb6),'tags':['envs'],'params':{'env':_0x9c1df3(0xde1),'type':'Source\x20type','pipeline':_0x9c1df3(0x116)},'body':{'limit':0x3e8,'includeStuckPending':![]},'inputSchema':{'type':_0x9c1df3(0xb36),'properties':{'env':{'type':_0x9c1df3(0xf7a)},'type':{'type':_0x9c1df3(0xf7a)},'pipeline':{'type':_0x9c1df3(0xf7a)},'limit':{'type':_0x9c1df3(0x10f2),'default':0x3e8},'includeStuckPending':{'type':'boolean','default':![]}},'required':[_0x9c1df3(0x30b),_0x9c1df3(0xaee),_0x9c1df3(0x46b)],'additionalProperties':![]},'outputSchema':{'type':_0x9c1df3(0xb36),'additionalProperties':!![]},'access':{'audiences':[_0x9c1df3(0x9f4),'shell',_0x9c1df3(0xa8b)],'authRequired':!![],'internalOnly':![],'permission':_0x9c1df3(0x328)},'safety':{'access':_0x9c1df3(0x90a),'destructive':![],'idempotent':![],'longRunning':![],'streaming':![]},'http':{'bodyMode':_0x9c1df3(0xcd7)},'mcp':{'capability':_0x9c1df3(0x46b),'action':'env_type_pipeline_retry_failed'}});},okdbEmbeddingsHttp;}var okdbVectorStore,hasRequiredOkdbVectorStore;function requireOkdbVectorStore(){const _0x52331d=_0xef8cd8;if(hasRequiredOkdbVectorStore)return okdbVectorStore;hasRequiredOkdbVectorStore=0x1;class _0xf2c0a6{static ['TYPE_PREFIX']=_0x52331d(0xd13);constructor(_0x16faab,_0x593bb4){const _0x2b8fdf=_0x52331d;this[_0x2b8fdf(0x735)]=_0x16faab,this['_env']=_0x593bb4??_0x16faab,this[_0x2b8fdf(0x1c5)]=new Map();}[_0x52331d(0x6b7)](_0x8f0865){const _0x797679=_0x52331d;return _0xf2c0a6[_0x797679(0x8c8)]+_0x8f0865;}async[_0x52331d(0x6f5)](_0x451be4){const _0xafff5a=_0x52331d,_0x1b0b56=this[_0xafff5a(0x6b7)](_0x451be4);if(this[_0xafff5a(0x308)][_0xafff5a(0x7c0)](_0x1b0b56))return;!this[_0xafff5a(0x1c5)]['has'](_0x451be4)&&this[_0xafff5a(0x1c5)][_0xafff5a(0x211)](_0x451be4,this[_0xafff5a(0x308)]['registerType'](_0x1b0b56)['catch'](_0x282593=>{if(_0x282593?.['code']!=='TYPE_ALREADY_EXISTS')throw _0x282593;})['finally'](()=>{const _0x3f2941=_0xafff5a;if(!this[_0x3f2941(0x308)]['hasType'](_0x1b0b56))this['_ensured'][_0x3f2941(0x3b3)](_0x451be4);})),await this[_0xafff5a(0x1c5)]['get'](_0x451be4);}[_0x52331d(0x49c)](_0x56e73d){const _0x25d6b1=_0x52331d,{ENGINE_TYPES:_0x1b56f3}=requireEnums();for(const _0x6e517e of this['_kdb'][_0x25d6b1(0xab8)]['list'](_0x1b56f3[_0x25d6b1(0x5a3)])){if(_0x6e517e[_0x25d6b1(0xc53)]&&_0x6e517e[_0x25d6b1(0xad3)]?.[_0x25d6b1(0x142)]?.['storage_key']===_0x56e73d)return _0x6e517e[_0x25d6b1(0x1f5)];}return null;}[_0x52331d(0x9c6)](_0x5496e0){const _0x2b1ea1=_0x52331d,_0x1e7b4d=this,_0x6e8e9e=this[_0x2b1ea1(0x6b7)](_0x5496e0);return{async 'put'(_0x48e629,_0xa67e8f){const _0x3c7d0c=_0x2b1ea1;await _0x1e7b4d[_0x3c7d0c(0x6f5)](_0x5496e0),await _0x1e7b4d[_0x3c7d0c(0x308)][_0x3c7d0c(0x92c)](_0x6e8e9e,_0x48e629,Array[_0x3c7d0c(0x9f8)](_0xa67e8f));try{const _0x350f49=_0x1e7b4d[_0x3c7d0c(0x49c)](_0x5496e0);await _0x350f49?.[_0x3c7d0c(0xd5d)](_0x48e629,_0xa67e8f);}catch{}},async 'remove'(_0x11e045){const _0x2360ea=_0x2b1ea1;if(_0x1e7b4d[_0x2360ea(0x308)]['hasType'](_0x6e8e9e))try{await _0x1e7b4d[_0x2360ea(0x308)][_0x2360ea(0x21e)](_0x6e8e9e,_0x11e045);}catch{}try{const _0x2ba245=_0x1e7b4d[_0x2360ea(0x49c)](_0x5496e0);await _0x2ba245?.[_0x2360ea(0x971)](_0x11e045);}catch{}},async 'getAll'(){const _0x408603=_0x2b1ea1;if(!_0x1e7b4d[_0x408603(0x308)][_0x408603(0x7c0)](_0x6e8e9e))return[];const _0x3232d3=[];for(const {key:_0x1ea484,value:_0x28f7cc}of _0x1e7b4d[_0x408603(0x308)][_0x408603(0x9ce)](_0x6e8e9e)){Array[_0x408603(0x10f5)](_0x28f7cc)&&_0x3232d3[_0x408603(0x597)]({'key':String(_0x1ea484),'vector':new Float32Array(_0x28f7cc)});}return _0x3232d3;},'get'(_0x47e449){const _0x45522c=_0x2b1ea1;if(!_0x1e7b4d['_env'][_0x45522c(0x7c0)](_0x6e8e9e))return null;const _0x394323=_0x1e7b4d['_env'][_0x45522c(0xbeb)](_0x6e8e9e,_0x47e449);if(!Array[_0x45522c(0x10f5)](_0x394323))return null;return new Float32Array(_0x394323);},'count'(){const _0x5b9c93=_0x2b1ea1;if(!_0x1e7b4d[_0x5b9c93(0x308)]['hasType'](_0x6e8e9e))return 0x0;return _0x1e7b4d[_0x5b9c93(0x308)][_0x5b9c93(0x7df)](_0x6e8e9e);},async 'getCatchUp'(_0xee233e){const _0x329127=_0x2b1ea1;if(!_0x1e7b4d['_env'][_0x329127(0x7c0)](_0x6e8e9e))return[];if(typeof _0x1e7b4d[_0x329127(0x308)]['getClock']!==_0x329127(0x63b)||typeof _0x1e7b4d[_0x329127(0x308)][_0x329127(0x151)]!==_0x329127(0x63b))return[];const _0x33567a=_0x1e7b4d['_env'][_0x329127(0x5ea)](_0x6e8e9e);if(!_0x33567a||_0x33567a<=_0xee233e)return[];const _0x208b9f=Array[_0x329127(0x9f8)](_0x1e7b4d[_0x329127(0x308)][_0x329127(0x151)](_0x6e8e9e,_0xee233e+0x1,_0x33567a)),_0x56daca=[];for(const _0x334c9f of _0x208b9f){if(_0x334c9f['action']===_0x329127(0x92c)){const _0x46f22b=_0x1e7b4d['_env'][_0x329127(0xbeb)](_0x6e8e9e,_0x334c9f[_0x329127(0x9dd)]);Array[_0x329127(0x10f5)](_0x46f22b)&&_0x56daca[_0x329127(0x597)]({'key':String(_0x334c9f[_0x329127(0x9dd)]),'vector':new Float32Array(_0x46f22b),'action':_0x329127(0x33c)});}else _0x334c9f[_0x329127(0x942)]===_0x329127(0x21e)&&_0x56daca[_0x329127(0x597)]({'key':String(_0x334c9f[_0x329127(0x9dd)]),'action':_0x329127(0x21e)});}return _0x56daca;},'stats'(){const _0x4e51ac=_0x2b1ea1;return{'storage_key':_0x5496e0,'type':_0x6e8e9e,'count':_0x1e7b4d[_0x4e51ac(0x308)][_0x4e51ac(0x7c0)](_0x6e8e9e)?_0x1e7b4d['_env'][_0x4e51ac(0x7df)](_0x6e8e9e):0x0};}};}[_0x52331d(0x2a9)](){const _0x34bda2=_0x52331d,_0x3bd60b=_0xf2c0a6['TYPE_PREFIX'],_0x16e480=[];for(const _0x4cfee0 of this['_kdb'][_0x34bda2(0x654)][_0x34bda2(0x240)]()){if(!_0x4cfee0[_0x34bda2(0x8ba)](_0x3bd60b))continue;const _0x58ca43=_0x4cfee0[_0x34bda2(0xc3c)](_0x3bd60b[_0x34bda2(0x156)]);_0x16e480[_0x34bda2(0x597)]({'storage_key':_0x58ca43,'type':_0x4cfee0,'count':this[_0x34bda2(0x308)][_0x34bda2(0x7df)](_0x4cfee0)});}return _0x16e480;}async[_0x52331d(0xca4)](_0x36d80c){const _0x812813=_0x52331d,_0x1d9885=this[_0x812813(0x6b7)](_0x36d80c);if(!this[_0x812813(0x308)][_0x812813(0x7c0)](_0x1d9885))return;const _0x1b66fc=[];for(const {key:_0x45d42f}of this['_env'][_0x812813(0x9ce)](_0x1d9885))_0x1b66fc['push'](_0x45d42f);for(const _0x276a3b of _0x1b66fc){try{await this[_0x812813(0x308)]['remove'](_0x1d9885,_0x276a3b);}catch{}}}}return okdbVectorStore=_0xf2c0a6,okdbVectorStore;}var ollama,hasRequiredOllama;function requireOllama(){if(hasRequiredOllama)return ollama;return hasRequiredOllama=0x1,ollama=function _0x4e084e(_0x1fca6b={}){const _0x43868e=_0x47ab,_0x1c16ad=(_0x1fca6b[_0x43868e(0xb14)]??'http://localhost:11434')[_0x43868e(0x8d8)](/\/$/,''),_0x366c9d=_0x1fca6b[_0x43868e(0x7d4)]??_0x43868e(0xb6b),_0x557637=_0x1fca6b[_0x43868e(0x44f)]??0x7530;async function _0x59c69a(_0x4c150a){const _0x5f1c0d=_0x43868e,_0x20f820=typeof _0x4c150a===_0x5f1c0d(0xf7a)?_0x4c150a:JSON[_0x5f1c0d(0xf75)](_0x4c150a);let _0x1087a7;try{_0x1087a7=await fetch(_0x1c16ad+_0x5f1c0d(0xb39),{'method':_0x5f1c0d(0xe46),'headers':{'Content-Type':_0x5f1c0d(0xf9b)},'body':JSON[_0x5f1c0d(0xf75)]({'model':_0x366c9d,'input':_0x20f820}),'signal':AbortSignal[_0x5f1c0d(0x44f)](_0x557637)});}catch(_0x5a0df7){throw new Error(_0x5f1c0d(0x1221)+_0x1c16ad+_0x5f1c0d(0x5ff)+_0x5a0df7[_0x5f1c0d(0xb4e)],{'cause':_0x5a0df7});}if(!_0x1087a7['ok']){const _0x3ce6e6=await _0x1087a7[_0x5f1c0d(0x1fb)]()['catch'](()=>'');throw new Error(_0x5f1c0d(0x98b)+_0x1087a7[_0x5f1c0d(0xfcd)]+':\x20'+_0x3ce6e6);}const _0xbc96b4=await _0x1087a7[_0x5f1c0d(0x1ee)](),_0xad2777=_0xbc96b4['embeddings']?.[0x0]??_0xbc96b4[_0x5f1c0d(0xab9)]??null;if(!_0xad2777||!Array[_0x5f1c0d(0x10f5)](_0xad2777))throw new Error(_0x5f1c0d(0x8bf)+_0x366c9d+')');return new Float32Array(_0xad2777);}return{'embed':_0x59c69a};},ollama;}var openai,hasRequiredOpenai;function requireOpenai(){if(hasRequiredOpenai)return openai;return hasRequiredOpenai=0x1,openai=function _0x3496a0(_0x451284={}){const _0x1e5e6e=_0x47ab,_0xd06697=_0x451284[_0x1e5e6e(0x11fc)]??process.env.OPENAI_API_KEY??null,_0x59305=_0x451284['model']??'text-embedding-3-small',_0x11d334=(_0x451284[_0x1e5e6e(0x42b)]??_0x1e5e6e(0x2b8))['replace'](/\/$/,''),_0x458e6b=_0x451284[_0x1e5e6e(0x44f)]??0xea60;if(!_0xd06697)throw new Error(_0x1e5e6e(0x944));const _0x37ceaa={'Content-Type':_0x1e5e6e(0xf9b),'Authorization':_0x1e5e6e(0x9a3)+_0xd06697};if(_0x451284[_0x1e5e6e(0x11fe)])_0x37ceaa[_0x1e5e6e(0xf51)]=_0x451284[_0x1e5e6e(0x11fe)];async function _0x3ab649(_0x13974e){const _0x5d88d3=_0x1e5e6e,_0x2f236f=typeof _0x13974e===_0x5d88d3(0xf7a)?_0x13974e:JSON[_0x5d88d3(0xf75)](_0x13974e),_0x525f27={'model':_0x59305,'input':_0x2f236f};if(_0x451284[_0x5d88d3(0xa67)])_0x525f27[_0x5d88d3(0xb8f)]=_0x451284[_0x5d88d3(0xa67)];let _0x1a6f14;try{_0x1a6f14=await fetch(_0x11d334+'/embeddings',{'method':_0x5d88d3(0xe46),'headers':_0x37ceaa,'body':JSON['stringify'](_0x525f27),'signal':AbortSignal[_0x5d88d3(0x44f)](_0x458e6b)});}catch(_0x11594a){throw new Error(_0x5d88d3(0xbba)+_0x11d334+_0x5d88d3(0x5ff)+_0x11594a[_0x5d88d3(0xb4e)],{'cause':_0x11594a});}if(!_0x1a6f14['ok']){const _0x37fef3=await _0x1a6f14['json']()[_0x5d88d3(0x415)](()=>({})),_0x18ebba=_0x37fef3?.['error']?.['message']??_0x1a6f14['statusText'];throw new Error(_0x5d88d3(0xb23)+_0x1a6f14[_0x5d88d3(0xfcd)]+':\x20'+_0x18ebba);}const _0x425a7b=await _0x1a6f14[_0x5d88d3(0x1ee)](),_0x2ceff7=_0x425a7b?.['data']?.[0x0]?.[_0x5d88d3(0xab9)]??null;if(!_0x2ceff7||!Array[_0x5d88d3(0x10f5)](_0x2ceff7))throw new Error('OpenAI\x20returned\x20no\x20embedding\x20(model:\x20'+_0x59305+')');return new Float32Array(_0x2ceff7);}return{'embed':_0x3ab649};},openai;}var flat,hasRequiredFlat;function requireFlat(){if(hasRequiredFlat)return flat;hasRequiredFlat=0x1,flat=function _0x1f645a(_0x4d05d2={}){const _0x531d90=new Map();return{async 'load'(_0x3e00f4){const _0x405eab=_0x47ab;_0x531d90[_0x405eab(0x859)]();if(_0x3e00f4)for(const {key:_0x2319fd,vector:_0x16f364}of await _0x3e00f4()){_0x531d90[_0x405eab(0x211)](_0x2319fd,_0x16f364);}},async 'add'(_0x3de0fd,_0x65d146,_0x5d07c3){const _0x219687=_0x47ab;_0x531d90[_0x219687(0x211)](_0x3de0fd,_0x65d146);},async 'remove'(_0x472b8a){const _0x51efd3=_0x47ab;_0x531d90[_0x51efd3(0x3b3)](_0x472b8a);},'search'(_0x4aab2e,{limit:limit=0xa,threshold:threshold=0x0}={}){const _0x4dc581=_0x47ab,_0x272dd2=[];for(const [_0x2bd31e,_0x51e132]of _0x531d90){const _0x158fbe=_0x52e659(_0x4aab2e,_0x51e132);if(_0x158fbe>=threshold)_0x272dd2[_0x4dc581(0x597)]({'key':_0x2bd31e,'score':_0x158fbe});}return _0x272dd2[_0x4dc581(0x3f6)]((_0x26df1c,_0x13bbcf)=>_0x13bbcf['score']-_0x26df1c[_0x4dc581(0x1122)]),_0x272dd2[_0x4dc581(0xc3c)](0x0,limit);},async 'snapshot'(){return![];},async 'rebuild'(_0x4b115c){const _0x182b97=_0x47ab;await this[_0x182b97(0x7c9)](_0x4b115c);},async 'stop'(){},'count'(){return _0x531d90['size'];},'info'(){const _0xbf9689=_0x47ab;return{'algorithm':_0xbf9689(0x103f),'count':_0x531d90[_0xbf9689(0xfb)]};}};};function _0x52e659(_0x50df36,_0x1c5ef4){const _0x24dcd9=_0x47ab;let _0x415277=0x0,_0x1649b3=0x0,_0x55c0da=0x0;for(let _0x1dccd4=0x0;_0x1dccd4<_0x50df36[_0x24dcd9(0x156)];_0x1dccd4++){_0x415277+=_0x50df36[_0x1dccd4]*_0x1c5ef4[_0x1dccd4],_0x1649b3+=_0x50df36[_0x1dccd4]*_0x50df36[_0x1dccd4],_0x55c0da+=_0x1c5ef4[_0x1dccd4]*_0x1c5ef4[_0x1dccd4];}const _0xf8d4b1=Math[_0x24dcd9(0x609)](_0x1649b3)*Math[_0x24dcd9(0x609)](_0x55c0da);return _0xf8d4b1===0x0?0x0:_0x415277/_0xf8d4b1;}return flat;}var snapshotStore,hasRequiredSnapshotStore;function requireSnapshotStore(){const _0x197a18=_0xef8cd8;if(hasRequiredSnapshotStore)return snapshotStore;hasRequiredSnapshotStore=0x1;const _0x3fa488=require$$0$7,_0xd85ae=require$$1$2,_0x122865=require$$1,_0x443983=require$$0$1;function _0x5b1e26(){const _0x5e78ee=_0x47ab;return Date[_0x5e78ee(0x555)]();}function _0x4b26a8(_0x9a4e13){const _0x3ec758=_0x47ab;try{return _0x3fa488[_0x3ec758(0x66d)](_0x9a4e13);}catch{return![];}}function _0x3d99ac(_0x55f009){const _0xca2858=_0x47ab;try{return _0x3fa488[_0xca2858(0x227)](_0x55f009,_0xca2858(0x57a));}catch{return null;}}function _0x330083(_0x571504,_0x34dd79){const _0x469f92=_0x47ab,_0x1ebe6f=_0x571504+_0x469f92(0xa9e)+_0x443983['randomBytes'](0x6)['toString']('hex');_0x3fa488['writeFileSync'](_0x1ebe6f,_0x34dd79),_0x3fa488[_0x469f92(0x27e)](_0x1ebe6f,_0x571504);}function _0x4e947b(_0x194762,_0x3a9b2f=0x10){const _0x11103c=_0x47ab,_0x32188a=String(Math[_0x11103c(0x10bf)](0x0,Math[_0x11103c(0xcc)](_0x194762||0x0)));return _0x32188a['length']>=_0x3a9b2f?_0x32188a:'0'[_0x11103c(0xd5e)](_0x3a9b2f-_0x32188a['length'])+_0x32188a;}return snapshotStore=class _0x4836b4{constructor({dir:_0x5dc6b2,keepSnapshots:keepSnapshots=0x3,log:log=null}={}){const _0x4da42c=_0x47ab;if(!_0x5dc6b2)throw new Error('SnapshotStore\x20requires\x20dir');this['dir']=_0x5dc6b2,this[_0x4da42c(0xa4f)]=_0xd85ae[_0x4da42c(0x3d9)](_0x5dc6b2,_0x4da42c(0x41f)),this['currentPath']=_0xd85ae[_0x4da42c(0x3d9)](_0x5dc6b2,'CURRENT'),this[_0x4da42c(0xfb0)]=_0xd85ae['join'](_0x5dc6b2,_0x4da42c(0x1b9)),this[_0x4da42c(0xf2b)]=keepSnapshots,this[_0x4da42c(0x9be)]=log,_0x3fa488[_0x4da42c(0xb69)](this[_0x4da42c(0x3e0)],{'recursive':!![]}),_0x3fa488[_0x4da42c(0xb69)](this[_0x4da42c(0xa4f)],{'recursive':!![]});}['_snapshotDir'](_0x556848){const _0x5aa9ec=_0x47ab;return _0xd85ae['join'](this[_0x5aa9ec(0xa4f)],_0x556848);}[_0x197a18(0x301)](_0x37dd3a){const _0x2c788e=_0x197a18,_0x507c5e=this['_snapshotDir'](_0x37dd3a);return{'dir':_0x507c5e,'index':_0xd85ae['join'](_0x507c5e,_0x2c788e(0xb61)),'labels':_0xd85ae[_0x2c788e(0x3d9)](_0x507c5e,'labels.json'),'state':_0xd85ae[_0x2c788e(0x3d9)](_0x507c5e,_0x2c788e(0xd0b))};}[_0x197a18(0x9c4)](){if(!_0x4b26a8(this['currentPath']))return null;const _0x505db8=_0x3d99ac(this['currentPath']);if(!_0x505db8)return null;const _0x11ad37=String(_0x505db8)['trim']();return _0x11ad37||null;}[_0x197a18(0xe08)](){const _0x52ca46=_0x197a18,_0x54b335=this['readCurrentId']();if(!_0x54b335)return 0x0;const _0x21d149=Number(_0x54b335);return Number[_0x52ca46(0x2b5)](_0x21d149)?_0x21d149:0x0;}[_0x197a18(0xc5d)](){const _0x4f3de1=_0x197a18;try{return _0x3fa488['readdirSync'](this['snapshotsDir'],{'withFileTypes':!![]})[_0x4f3de1(0x1103)](_0x539387=>_0x539387[_0x4f3de1(0x11a0)]())[_0x4f3de1(0x1166)](_0x2ff787=>_0x2ff787['name'])[_0x4f3de1(0x1103)](_0x3cecc0=>!_0x3cecc0[_0x4f3de1(0x8ba)](_0x4f3de1(0xa9e)))[_0x4f3de1(0x1103)](_0x352d65=>!_0x352d65[_0x4f3de1(0x8ba)]('_tmp-'))[_0x4f3de1(0x3f6)]();}catch{return[];}}['latestSnapshotId'](){const _0x58f358=_0x197a18,_0x22ceac=this[_0x58f358(0x9c4)]();if(_0x22ceac)return _0x22ceac;const _0x578082=this[_0x58f358(0xc5d)]();if(!_0x578082['length'])return null;return _0x578082[_0x578082[_0x58f358(0x156)]-0x1];}[_0x197a18(0xb1b)]({maxAgeMs:maxAgeMs=0x6*0x36ee80}={}){const _0xd79487=_0x197a18;let _0x2aab4b;try{_0x2aab4b=_0x3fa488['readdirSync'](this[_0xd79487(0xa4f)],{'withFileTypes':!![]});}catch{return;}const _0x9cb4ff=_0x5b1e26()-maxAgeMs;for(const _0x1ebdc4 of _0x2aab4b){if(!_0x1ebdc4[_0xd79487(0x11a0)]())continue;const _0x542148=_0x1ebdc4['name'];if(!_0x542148[_0xd79487(0x8ba)](_0xd79487(0xa9e))&&!_0x542148[_0xd79487(0x8ba)]('_tmp-'))continue;const _0x59e40a=_0xd85ae['join'](this['snapshotsDir'],_0x542148);try{const _0x2bf742=_0x3fa488[_0xd79487(0xdcb)](_0x59e40a);if(_0x2bf742[_0xd79487(0xeb3)]>_0x9cb4ff)continue;}catch{}try{_0x3fa488[_0xd79487(0x88d)](_0x59e40a,{'recursive':!![],'force':!![]});}catch{}}}[_0x197a18(0x143)]({keep:keep=null}={}){const _0x78188=_0x197a18,_0x1ed46d=Math[_0x78188(0x10bf)](0x1,Math[_0x78188(0xcc)](keep??this[_0x78188(0xf2b)]??0x3)),_0xe4a4fb=this[_0x78188(0xc5d)]();if(_0xe4a4fb[_0x78188(0x156)]<=_0x1ed46d)return;const _0x5c9732=this[_0x78188(0x9c4)](),_0x1763e4=_0xe4a4fb[_0x78188(0xc3c)](0x0,Math[_0x78188(0x10bf)](0x0,_0xe4a4fb[_0x78188(0x156)]-_0x1ed46d));for(const _0x5cb29f of _0x1763e4){if(_0x5c9732&&_0x5cb29f===_0x5c9732)continue;const _0x4fa814=this[_0x78188(0xc2)](_0x5cb29f);try{_0x3fa488[_0x78188(0x88d)](_0x4fa814,{'recursive':!![],'force':!![]});}catch{}}}async[_0x197a18(0x727)](_0x2e8d8c,_0x261cb4){const _0x2de3ef=_0x197a18;if(!_0x2e8d8c)throw new Error(_0x2de3ef(0x16b));const _0x83b00b=this['_snapshotPaths'](_0x2e8d8c);if(!_0x4b26a8(_0x83b00b['index'])||!_0x4b26a8(_0x83b00b[_0x2de3ef(0xc3f)])||!_0x4b26a8(_0x83b00b[_0x2de3ef(0x10e2)]))throw new Error(_0x2de3ef(0x5e3)+_0x2e8d8c);const _0x9af25f=await _0x261cb4(_0x83b00b);return _0x9af25f||{};}async[_0x197a18(0x925)](_0x279f7f,_0x38cb63,{keep:keep=null,lockTimeoutMs:lockTimeoutMs=0x0,staleLockMaxAgeMs:staleLockMaxAgeMs=0xea60}={}){const _0x3096f5=_0x197a18,_0x391441=Number(_0x279f7f);if(!Number[_0x3096f5(0x2b5)](_0x391441)||_0x391441<0x0)throw new Error('candidateClock\x20must\x20be\x20finite\x20>=\x200');const _0x19e8cd=_0x4e947b(_0x391441),_0x52ee13=this['_snapshotDir'](_0x19e8cd),_0xe331d6=_0xd85ae[_0x3096f5(0x3d9)](this['snapshotsDir'],_0x3096f5(0xa9e)+_0x19e8cd+'-'+_0x443983[_0x3096f5(0x3d0)](0x6)[_0x3096f5(0x583)](_0x3096f5(0x57b)));_0x3fa488[_0x3096f5(0xb69)](_0xe331d6,{'recursive':!![]});const _0x4632b0={'dir':_0xe331d6,'index':_0xd85ae[_0x3096f5(0x3d9)](_0xe331d6,_0x3096f5(0xb61)),'labels':_0xd85ae[_0x3096f5(0x3d9)](_0xe331d6,'labels.json'),'state':_0xd85ae[_0x3096f5(0x3d9)](_0xe331d6,_0x3096f5(0xd0b))};await _0x38cb63(_0x4632b0,{'id':_0x19e8cd,'clock':_0x391441});const _0xaacbb7=JSON['stringify']({'pid':process['pid'],'host':_0x122865[_0x3096f5(0x73b)](),'at':_0x5b1e26()}),_0x4d90f6=_0x5b1e26();let _0x26ac8e=null;const _0x1b2c9f=()=>{const _0x11591f=_0x3096f5;try{const _0x1ae611=JSON[_0x11591f(0xdcd)](_0x3fa488[_0x11591f(0x227)](this['lockPath'],_0x11591f(0x57a)));if(_0x1ae611['at']&&_0x5b1e26()-_0x1ae611['at']>staleLockMaxAgeMs){const _0x40cc36=_0x5b1e26()-_0x1ae611['at'],_0x2d7343=_0x11591f(0x9d8)+Math[_0x11591f(0xc66)](_0x40cc36/0x3e8)+_0x11591f(0xb57)+_0x1ae611[_0x11591f(0x8fc)]+_0x11591f(0x9fb)+_0x1ae611[_0x11591f(0x598)]+').\x20'+_0x11591f(0x53b);this[_0x11591f(0x9be)]?.[_0x11591f(0xf78)]?this[_0x11591f(0x9be)][_0x11591f(0xf78)](_0x2d7343):console['warn']('[SnapshotStore]',_0x2d7343);try{_0x3fa488[_0x11591f(0xff4)](this[_0x11591f(0xfb0)]);}catch{}return!![];}}catch{try{_0x3fa488[_0x11591f(0xff4)](this[_0x11591f(0xfb0)]);}catch{}}return![];},_0x2ca19f=()=>{const _0x2c6f91=_0x3096f5;try{return _0x26ac8e=_0x3fa488['openSync'](this['lockPath'],'wx'),_0x3fa488[_0x2c6f91(0xfc0)](_0x26ac8e,_0xaacbb7),!![];}catch(_0x55cf8f){if(_0x55cf8f&&_0x55cf8f[_0x2c6f91(0x1f8)]===_0x2c6f91(0x952))return![];throw _0x55cf8f;}};if(!_0x2ca19f()){_0x1b2c9f(),_0x2ca19f();if(_0x26ac8e==null&&lockTimeoutMs>0x0)while(_0x5b1e26()-_0x4d90f6<lockTimeoutMs){await new Promise(_0x16cc3c=>setTimeout(_0x16cc3c,0x19));if(_0x2ca19f())break;_0x1b2c9f();}}if(_0x26ac8e==null){try{_0x3fa488[_0x3096f5(0x88d)](_0xe331d6,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':_0x3096f5(0xac0)};}try{const _0x3e89d8=this['readCurrentClock']();if(_0x391441<=_0x3e89d8){try{_0x3fa488[_0x3096f5(0x88d)](_0xe331d6,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':'stale','currentClock':_0x3e89d8};}if(!_0x4b26a8(_0x52ee13))_0x3fa488[_0x3096f5(0x27e)](_0xe331d6,_0x52ee13);else try{_0x3fa488[_0x3096f5(0x88d)](_0xe331d6,{'recursive':!![],'force':!![]});}catch{}return _0x330083(this['currentPath'],_0x19e8cd+'\x0a'),this['prune']({'keep':keep}),{'published':!![],'currentClock':_0x391441};}finally{try{_0x3fa488[_0x3096f5(0x10ba)](_0x26ac8e);}catch{}try{_0x3fa488['unlinkSync'](this[_0x3096f5(0xfb0)]);}catch{}}}},snapshotStore;}var labelMap,hasRequiredLabelMap;function requireLabelMap(){const _0x42370f=_0xef8cd8;if(hasRequiredLabelMap)return labelMap;hasRequiredLabelMap=0x1;const _0x5e3a6a=require$$0$7;class _0x3c00c9{constructor(){const _0xb47bd8=_0x47ab;this[_0xb47bd8(0x5b2)]=new Map(),this[_0xb47bd8(0x10cc)]=new Map(),this[_0xb47bd8(0x2a3)]=0x0,this['_tombstoneCount']=0x0;}async['reset'](){const _0x3c9356=_0x47ab;this[_0x3c9356(0x5b2)]=new Map(),this[_0x3c9356(0x10cc)]=new Map(),this[_0x3c9356(0x2a3)]=0x0,this[_0x3c9356(0x95d)]=0x0;}async[_0x42370f(0x889)](_0x9d3f08){const _0x2cc5e7=_0x42370f;if(!_0x9d3f08||!_0x5e3a6a[_0x2cc5e7(0x66d)](_0x9d3f08))return await this[_0x2cc5e7(0xe97)](),!![];let _0x276c0d;try{_0x276c0d=_0x5e3a6a[_0x2cc5e7(0x227)](_0x9d3f08,_0x2cc5e7(0x57a));}catch{return await this[_0x2cc5e7(0xe97)](),!![];}let _0x17cc97;try{_0x17cc97=JSON[_0x2cc5e7(0xdcd)](_0x276c0d);}catch{return await this['reset'](),!![];}const _0x2836f3=Array['isArray'](_0x17cc97?.[_0x2cc5e7(0x1129)])?_0x17cc97[_0x2cc5e7(0x1129)]:[],_0x18fc8a=Number[_0x2cc5e7(0x474)](_0x17cc97?.[_0x2cc5e7(0x2a3)])?_0x17cc97[_0x2cc5e7(0x2a3)]:0x0,_0x3e7900=new Map(),_0x3c14a4=new Map();let _0x113ded=-0x1;for(const _0x3364b8 of _0x2836f3){if(!Array[_0x2cc5e7(0x10f5)](_0x3364b8)||_0x3364b8[_0x2cc5e7(0x156)]!==0x2)continue;const _0xeba405=Number(_0x3364b8[0x0]),_0x177675=String(_0x3364b8[0x1]??'');if(!Number[_0x2cc5e7(0x474)](_0xeba405)||_0xeba405<0x0)continue;if(!_0x177675)continue;_0x3e7900[_0x2cc5e7(0x211)](_0x177675,_0xeba405),_0x3c14a4['set'](_0xeba405,_0x177675);if(_0xeba405>_0x113ded)_0x113ded=_0xeba405;}return this['keyToLabel']=_0x3e7900,this[_0x2cc5e7(0x10cc)]=_0x3c14a4,this[_0x2cc5e7(0x2a3)]=Math[_0x2cc5e7(0x10bf)](_0x18fc8a,_0x113ded+0x1,0x0),this[_0x2cc5e7(0x95d)]=0x0,!![];}['labelForExisting'](_0x543a8e){const _0x3ee684=_0x42370f;return this[_0x3ee684(0x5b2)][_0x3ee684(0xbeb)](_0x543a8e);}['labelForEphemeral'](_0x450a66){const _0x4394f5=_0x42370f;let _0x26bb78=this[_0x4394f5(0x5b2)]['get'](_0x450a66);if(_0x26bb78!==undefined)return _0x26bb78;return _0x26bb78=this[_0x4394f5(0x2a3)]++,this[_0x4394f5(0x5b2)][_0x4394f5(0x211)](_0x450a66,_0x26bb78),this[_0x4394f5(0x10cc)][_0x4394f5(0x211)](_0x26bb78,_0x450a66),_0x26bb78;}['tombstone'](_0x64cd60){const _0x5b59f1=_0x42370f,_0x363483=this[_0x5b59f1(0x5b2)][_0x5b59f1(0xbeb)](_0x64cd60);if(_0x363483===undefined)return;this[_0x5b59f1(0x5b2)][_0x5b59f1(0x3b3)](_0x64cd60),this['labelToKey']['delete'](_0x363483),this[_0x5b59f1(0x95d)]++;}[_0x42370f(0x10c8)](_0x23aa19){return this['labelToKey']['get'](_0x23aa19)??null;}[_0x42370f(0xfb)](){const _0x5d9a5f=_0x42370f;return this['keyToLabel'][_0x5d9a5f(0xfb)];}['tombstoneCount'](){return this['_tombstoneCount'];}async[_0x42370f(0x11a)](_0x2ec244){const _0x596cca=_0x42370f,_0xe08982=_0x2ec244+_0x596cca(0xa9d),_0x20f82d=[];for(const [_0xec59e2,_0x2edac5]of this[_0x596cca(0x10cc)][_0x596cca(0x1129)]()){_0x20f82d['push']([_0xec59e2,_0x2edac5]);}_0x20f82d[_0x596cca(0x3f6)]((_0x2a32a9,_0x3509fb)=>_0x2a32a9[0x0]-_0x3509fb[0x0]);const _0x49e350={'version':0x1,'nextLabel':this[_0x596cca(0x2a3)],'entries':_0x20f82d};_0x5e3a6a['writeFileSync'](_0xe08982,JSON[_0x596cca(0xf75)](_0x49e350)),_0x5e3a6a[_0x596cca(0x27e)](_0xe08982,_0x2ec244);}}return labelMap=_0x3c00c9,labelMap;}var hnsw,hasRequiredHnsw;function requireHnsw(){if(hasRequiredHnsw)return hnsw;hasRequiredHnsw=0x1;const _0x200c1b=requireSnapshotStore(),_0x26e8f0=requireLabelMap(),_0x5557e7=0x1;let _0x57707b=null;function _0x22f4cd(){const _0x4b55fa=_0x47ab;if(_0x57707b)return _0x57707b;try{return _0x57707b=require('hnswlib-node'),_0x57707b;}catch(_0x34fff4){const _0x26d4ca=new Error(_0x4b55fa(0x2b0)+(_0x4b55fa(0xc81)+process[_0x4b55fa(0xfdc)]['node']+_0x4b55fa(0xf2c)+process[_0x4b55fa(0x578)]+'/'+process[_0x4b55fa(0xdb8)]+'.\x20')+_0x4b55fa(0x1b3)+(_0x4b55fa(0xac4)+(_0x34fff4?.[_0x4b55fa(0xb4e)]||String(_0x34fff4))));_0x26d4ca[_0x4b55fa(0x1f8)]=_0x4b55fa(0xe6a),_0x26d4ca['cause']=_0x34fff4;throw _0x26d4ca;}}return hnsw=function _0xc78f4a(_0x3ede53={},{dims:_0x556e47,dir:_0x43db9e}){const _0x2af5ba=_0x47ab,_0xb73ad8=_0x22f4cd();if(!_0x556e47||_0x556e47<=0x0)throw new Error(_0x2af5ba(0x703));if(!_0x43db9e)throw new Error(_0x2af5ba(0xf8e));const _0x3bccef={'metric':_0x3ede53[_0x2af5ba(0x419)]??_0x2af5ba(0xcf),'M':_0x3ede53['M']??0x10,'efConstruction':_0x3ede53[_0x2af5ba(0x4e0)]??0xc8,'efSearch':_0x3ede53['efSearch']??0x40,'maxElements':_0x3ede53[_0x2af5ba(0x70f)]??0x400,'growFactor':_0x3ede53['growFactor']??0x2,'snapshotEveryChanges':_0x3ede53['snapshotEveryChanges']??0xc350,'keepSnapshots':_0x3ede53[_0x2af5ba(0xf2b)]??0x2,'tmpMaxAgeMs':_0x3ede53[_0x2af5ba(0x8e0)]??0x6*0x36ee80},_0x2f1e16=new _0x200c1b({'dir':_0x43db9e,'keepSnapshots':_0x3bccef[_0x2af5ba(0xf2b)]}),_0x4d6d5c=new _0x26e8f0();let _0x496204=null,_0x791cd4=0x0,_0x4e4bee=null,_0xd60b=Promise[_0x2af5ba(0x797)]();const _0x221621=_0x96a51d=>{const _0x113cda=_0x2af5ba;return _0xd60b=_0xd60b[_0x113cda(0x7db)](_0x96a51d),_0xd60b;};async function _0x4b9976(_0x33f7ed){const _0x44031e=_0x2af5ba;await _0x4d6d5c['reset']();const _0x15bf1b=_0x33f7ed?await _0x33f7ed():[],_0x283e8d=Math[_0x44031e(0x10bf)](_0x3bccef[_0x44031e(0x70f)],Math['ceil'](_0x15bf1b[_0x44031e(0x156)]*(_0x3bccef['growFactor']||1.2)),0x1);_0x496204=new _0xb73ad8[(_0x44031e(0x1183))](_0x3bccef[_0x44031e(0x419)],_0x556e47),_0x496204['initIndex']({'maxElements':_0x283e8d,'efConstruction':_0x3bccef[_0x44031e(0x4e0)],'M':_0x3bccef['M']});for(const {key:_0x1b471a,vector:_0x4d277d}of _0x15bf1b){if(!(_0x4d277d instanceof Float32Array)||_0x4d277d[_0x44031e(0x156)]!==_0x556e47)continue;const _0x36b8a3=_0x4d6d5c[_0x44031e(0x11d7)](_0x1b471a);_0x496204[_0x44031e(0xc64)](Array[_0x44031e(0x9f8)](_0x4d277d),_0x36b8a3);}_0x496204[_0x44031e(0x84d)](_0x3bccef[_0x44031e(0xce0)]),_0x791cd4=0x0;}async function _0x21d423(_0x727e44){const _0x3fa05a=_0x2af5ba;if(!_0x496204||!_0x727e44)return![];const _0x403194=await _0x2f1e16[_0x3fa05a(0x925)](_0x727e44,async _0x38d77c=>{const _0x6300c1=_0x3fa05a;_0x496204[_0x6300c1(0x11f9)](_0x38d77c[_0x6300c1(0xcc7)]),await _0x4d6d5c[_0x6300c1(0x11a)](_0x38d77c[_0x6300c1(0xc3f)]);const _0x1fb493=require$$0$7;_0x1fb493[_0x6300c1(0xfc0)](_0x38d77c[_0x6300c1(0x10e2)],JSON[_0x6300c1(0xf75)]({'manifestVersion':_0x5557e7,'dims':_0x556e47,'metric':_0x3bccef[_0x6300c1(0x419)],'clock':_0x727e44,'snapshotAt':Date[_0x6300c1(0x555)]()},null,0x2));},{'keep':_0x3bccef[_0x3fa05a(0xf2b)]});if(_0x403194?.['published'])_0x791cd4=0x0;return _0x403194?.['published']??![];}async function _0x58bf95(){const _0x2cbd2b=_0x2af5ba,_0x229bdf=_0x2f1e16['readCurrentId']()||_0x2f1e16[_0x2cbd2b(0x135)]();if(!_0x229bdf)return null;let _0x25edbd,_0x5dc859=![];return await _0x2f1e16[_0x2cbd2b(0x727)](_0x229bdf,async _0x95f181=>{const _0xc5dae8=_0x2cbd2b,_0x353470=require$$0$7;_0x25edbd=JSON[_0xc5dae8(0xdcd)](_0x353470[_0xc5dae8(0x227)](_0x95f181[_0xc5dae8(0x10e2)],'utf8'));if(_0x25edbd[_0xc5dae8(0xaf3)]!==_0x5557e7||_0x25edbd[_0xc5dae8(0xa67)]!==_0x556e47||_0x25edbd[_0xc5dae8(0x419)]!==_0x3bccef[_0xc5dae8(0x419)]){_0x25edbd=null;return;}await _0x4d6d5c[_0xc5dae8(0x889)](_0x95f181['labels']),_0x496204=new _0xb73ad8['HierarchicalNSW'](_0x3bccef[_0xc5dae8(0x419)],_0x556e47),_0x496204[_0xc5dae8(0x1213)](_0x95f181[_0xc5dae8(0xcc7)]),_0x496204[_0xc5dae8(0x84d)](_0x3bccef['efSearch']),_0x5dc859=!![];}),_0x5dc859?_0x25edbd?.['clock']??0x0:null;}return{async 'load'(_0x14946c){return _0x221621(async()=>{const _0x1e63bd=_0x47ab;_0x2f1e16[_0x1e63bd(0xb1b)]({'maxAgeMs':_0x3bccef[_0x1e63bd(0x8e0)]}),_0x4e4bee=_0x14946c??null;const _0x569b65=await _0x58bf95();if(_0x569b65!=null)return _0x569b65;return await _0x4b9976(_0x14946c),null;});},async 'add'(_0x593721,_0x3d7744,_0x59c7fa){return _0x221621(async()=>{const _0x18e5bc=_0x47ab;if(!_0x496204)return;const _0x5cd63e=_0x4d6d5c[_0x18e5bc(0x11d7)](_0x593721);try{_0x496204[_0x18e5bc(0x1096)](_0x5cd63e);}catch{}_0x496204['getCurrentCount']()>=_0x496204[_0x18e5bc(0x101f)]()&&(_0x3bccef[_0x18e5bc(0x70f)]=Math[_0x18e5bc(0x84c)](_0x496204[_0x18e5bc(0x101f)]()*(_0x3bccef['growFactor']||0x2)),await _0x4b9976(_0x4e4bee)),_0x496204[_0x18e5bc(0xc64)](Array[_0x18e5bc(0x9f8)](_0x3d7744),_0x5cd63e),_0x791cd4++,_0x791cd4>=_0x3bccef[_0x18e5bc(0xe3)]&&await _0x21d423(_0x59c7fa??Date[_0x18e5bc(0x555)]());});},async 'remove'(_0x32d056){return _0x221621(async()=>{const _0x34e819=_0x47ab;if(!_0x496204)return;const _0x512224=_0x4d6d5c[_0x34e819(0xa55)](_0x32d056);if(_0x512224===undefined)return;try{_0x496204[_0x34e819(0x1096)](_0x512224);}catch{}_0x4d6d5c[_0x34e819(0x8f6)](_0x32d056),_0x791cd4++;});},'search'(_0x3a38a7,{limit:limit=0xa,efSearch:_0x357be5}={}){const _0x1392e7=_0x2af5ba;if(!_0x496204)return[];if(Number['isInteger'](_0x357be5))_0x496204['setEf'](_0x357be5);const _0x3951bf=Math['min'](limit,_0x496204['getCurrentCount']()||0x1),{neighbors:_0x4d8093,distances:_0x3f7d61}=_0x496204[_0x1392e7(0x99a)](Array[_0x1392e7(0x9f8)](_0x3a38a7),_0x3951bf),_0x5e674a=[];for(let _0x9d4091=0x0;_0x9d4091<_0x4d8093['length'];_0x9d4091++){const _0x2c6946=_0x4d6d5c[_0x1392e7(0x10c8)](_0x4d8093[_0x9d4091]);if(!_0x2c6946)continue;const _0x4b8eee=_0x3bccef[_0x1392e7(0x419)]===_0x1392e7(0xcf)?Math[_0x1392e7(0x10bf)](0x0,0x1-_0x3f7d61[_0x9d4091]):0x1/(0x1+_0x3f7d61[_0x9d4091]);_0x5e674a[_0x1392e7(0x597)]({'key':_0x2c6946,'score':_0x4b8eee});}return _0x5e674a;},async 'snapshot'(_0x544b5d=Date[_0x2af5ba(0x555)]()){return _0x221621(()=>_0x21d423(_0x544b5d));},async 'rebuild'(_0x135c35){return _0x221621(()=>{if(_0x135c35!=null)_0x4e4bee=_0x135c35;return _0x4b9976(_0x135c35??_0x4e4bee);});},async 'stop'(){const _0xad620f=_0x2af5ba;return _0x221621(()=>_0x21d423(Date[_0xad620f(0x555)]()));},'count'(){const _0x2705f2=_0x2af5ba;return _0x4d6d5c[_0x2705f2(0xfb)]();},'info'(){const _0x32df59=_0x2af5ba;return{'algorithm':'hnsw','metric':_0x3bccef[_0x32df59(0x419)],'M':_0x3bccef['M'],'efConstruction':_0x3bccef['efConstruction'],'efSearch':_0x3bccef[_0x32df59(0xce0)],'maxElements':_0x496204?.[_0x32df59(0x101f)]()??_0x3bccef[_0x32df59(0x70f)],'count':_0x4d6d5c['size'](),'changesSince':_0x791cd4,'snapshotDir':_0x43db9e,'latestSnapshot':_0x2f1e16[_0x32df59(0x9c4)]()??null};}};},hnsw;}var usearch,hasRequiredUsearch;function requireUsearch(){if(hasRequiredUsearch)return usearch;hasRequiredUsearch=0x1;const _0x3233fe=require$$0$7,_0x35cf92=require$$1$2,_0x29d7d0=requireSnapshotStore(),_0x18166a=requireLabelMap(),_0x558d50=0x1;let _0x230ece=null;function _0x15344e(){const _0x51e41d=_0x47ab;if(_0x230ece)return _0x230ece;try{return _0x230ece=require(_0x51e41d(0x10a1)),_0x230ece;}catch(_0x1eb25a){const _0x13501d=new Error(_0x51e41d(0xed0)+(_0x51e41d(0xc81)+process['versions'][_0x51e41d(0xc9f)]+'\x20on\x20'+process['platform']+'/'+process[_0x51e41d(0xdb8)]+'.\x20')+_0x51e41d(0xc37)+(_0x51e41d(0xac4)+(_0x1eb25a?.[_0x51e41d(0xb4e)]||String(_0x1eb25a))));_0x13501d[_0x51e41d(0x1f8)]=_0x51e41d(0xd42),_0x13501d[_0x51e41d(0x105d)]=_0x1eb25a;throw _0x13501d;}}function _0x30b455(_0x54c59e,_0x1822f2){const _0x48ecb9=_0x47ab;switch(_0x54c59e){case _0x48ecb9(0xcf):return _0x1822f2[_0x48ecb9(0x36a)][_0x48ecb9(0x95a)];case'l2':return _0x1822f2['MetricKind'][_0x48ecb9(0xce5)];case'ip':return _0x1822f2[_0x48ecb9(0x36a)]['IP'];default:return _0x1822f2[_0x48ecb9(0x36a)][_0x48ecb9(0x95a)];}}return usearch=function _0x3ede3d(_0x185d2f={},{dims:_0x454861,dir:_0x224c16}){const _0xf95e0b=_0x47ab,_0xa1c992=_0x15344e();if(!_0x454861||_0x454861<=0x0)throw new Error(_0xf95e0b(0x8de));if(!_0x224c16)throw new Error(_0xf95e0b(0x528));const _0x297674={'metric':_0x185d2f[_0xf95e0b(0x419)]??_0xf95e0b(0xcf),'connectivity':_0x185d2f[_0xf95e0b(0x49f)]??0x10,'expansionAdd':_0x185d2f[_0xf95e0b(0x11a3)]??0x80,'expansionSearch':_0x185d2f[_0xf95e0b(0x7a5)]??0x40,'snapshotEveryChanges':_0x185d2f[_0xf95e0b(0xe3)]??0xc350,'keepSnapshots':_0x185d2f['keepSnapshots']??0x2,'tmpMaxAgeMs':_0x185d2f[_0xf95e0b(0x8e0)]??0x6*0x36ee80,'heartbeatIntervalMs':_0x185d2f[_0xf95e0b(0xb19)]??0x1388,'writerLockMaxAgeMs':_0x185d2f['writerLockMaxAgeMs']??0x3a98,'viewRefreshMs':_0x185d2f[_0xf95e0b(0x57e)]??0x3e8},_0x432bfb=new _0x29d7d0({'dir':_0x224c16,'keepSnapshots':_0x297674[_0xf95e0b(0xf2b)]}),_0x4e7e92=_0x35cf92['join'](_0x224c16,_0xf95e0b(0x832));let _0x20a1a7=new _0x18166a(),_0x2536c=null,_0x17821e=0x0,_0x442eee=null,_0x48e221=![],_0x2cd7eb=null,_0x279fbc=null,_0x28df62=0x0,_0x34044d=![],_0x5cb569=Promise[_0xf95e0b(0x797)]();const _0x4c86fe=_0x1bfb57=>{const _0x464d07=_0xf95e0b;return _0x5cb569=_0x5cb569[_0x464d07(0x7db)](_0x1bfb57),_0x5cb569;};function _0x46b64f(){const _0x51489d=_0xf95e0b;return new _0xa1c992[(_0x51489d(0x6c5))]({'dimensions':_0x454861,'metric':_0x30b455(_0x297674[_0x51489d(0x419)],_0xa1c992),'quantization':_0xa1c992[_0x51489d(0xc6c)][_0x51489d(0x501)],'connectivity':_0x297674[_0x51489d(0x49f)],'expansion_add':_0x297674[_0x51489d(0x11a3)],'expansion_search':_0x297674['expansionSearch'],'multi':![]});}function _0x1c3e5c(_0x4110ef){return _0x4110ef instanceof Float32Array?_0x4110ef:new Float32Array(_0x4110ef);}function _0x75c2de(){const _0x5cd1c3=_0xf95e0b,_0x3addaa=JSON[_0x5cd1c3(0xf75)]({'pid':process[_0x5cd1c3(0x8fc)],'at':Date[_0x5cd1c3(0x555)]()}),_0x50abe7=()=>{const _0x11b99e=_0x5cd1c3;try{const _0x4d334f=_0x3233fe['openSync'](_0x4e7e92,'wx');return _0x3233fe[_0x11b99e(0xfc0)](_0x4d334f,_0x3addaa),_0x3233fe[_0x11b99e(0x10ba)](_0x4d334f),!![];}catch(_0x1d685b){if(_0x1d685b?.['code']==='EEXIST')return![];throw _0x1d685b;}};if(_0x50abe7())return!![];try{const _0x5d524f=JSON[_0x5cd1c3(0xdcd)](_0x3233fe['readFileSync'](_0x4e7e92,_0x5cd1c3(0x57a))),_0x276f6c=Date['now']()-(_0x5d524f['at']??0x0);if(_0x276f6c<_0x297674[_0x5cd1c3(0x6e7)])return![];}catch{}try{_0x3233fe['unlinkSync'](_0x4e7e92);}catch{}return _0x50abe7();}function _0x5e5291(){const _0x19d0b9=_0xf95e0b;if(_0x2cd7eb)clearInterval(_0x2cd7eb);_0x2cd7eb=setInterval(()=>{const _0x2f0ea2=_0x47ab;try{_0x3233fe['writeFileSync'](_0x4e7e92,JSON[_0x2f0ea2(0xf75)]({'pid':process['pid'],'at':Date[_0x2f0ea2(0x555)]()}));}catch{}},_0x297674['heartbeatIntervalMs']),_0x2cd7eb[_0x19d0b9(0xba4)]();}function _0x24bd74(){const _0x1ecb21=_0xf95e0b;_0x2cd7eb&&(clearInterval(_0x2cd7eb),_0x2cd7eb=null);try{const _0x556504=JSON[_0x1ecb21(0xdcd)](_0x3233fe[_0x1ecb21(0x227)](_0x4e7e92,_0x1ecb21(0x57a)));if(_0x556504[_0x1ecb21(0x8fc)]===process['pid'])_0x3233fe['unlinkSync'](_0x4e7e92);}catch{}}async function _0x502c19(_0x2a3c0f){const _0x47bd97=_0xf95e0b;_0x20a1a7=new _0x18166a(),await _0x20a1a7[_0x47bd97(0xe97)](),_0x2536c=_0x46b64f();const _0x2b63a7=_0x2a3c0f?await _0x2a3c0f():[];for(const {key:_0x240ab3,vector:_0x15c6b7}of _0x2b63a7){if(!(_0x15c6b7 instanceof Float32Array)||_0x15c6b7[_0x47bd97(0x156)]!==_0x454861)continue;const _0x31b406=_0x20a1a7[_0x47bd97(0x11d7)](_0x240ab3);_0x2536c[_0x47bd97(0x33c)](BigInt(_0x31b406),_0x15c6b7);}_0x17821e=0x0;}async function _0x394193(_0x224b4b){const _0x871c9d=_0xf95e0b;if(!_0x2536c||!_0x224b4b)return![];const _0x2eed4e=await _0x432bfb[_0x871c9d(0x925)](_0x224b4b,async _0x344c1e=>{const _0x1d0536=_0x871c9d;_0x2536c[_0x1d0536(0x378)](_0x344c1e[_0x1d0536(0xcc7)]),await _0x20a1a7['snapshotTo'](_0x344c1e[_0x1d0536(0xc3f)]),_0x3233fe[_0x1d0536(0xfc0)](_0x344c1e['state'],JSON['stringify']({'manifestVersion':_0x558d50,'algorithm':_0x1d0536(0x10a1),'dims':_0x454861,'metric':_0x297674[_0x1d0536(0x419)],'clock':_0x224b4b,'snapshotAt':Date[_0x1d0536(0x555)]()},null,0x2));},{'keep':_0x297674[_0x871c9d(0xf2b)]});if(_0x2eed4e?.[_0x871c9d(0x11a1)])_0x17821e=0x0;return _0x2eed4e?.[_0x871c9d(0x11a1)]??![];}async function _0x20be44(){const _0x453b7a=_0xf95e0b,_0x3b10e8=_0x432bfb[_0x453b7a(0x9c4)]()||_0x432bfb[_0x453b7a(0x135)]();if(!_0x3b10e8)return null;let _0xf59298,_0x202918=![];return await _0x432bfb[_0x453b7a(0x727)](_0x3b10e8,async _0x2ed1fd=>{const _0x4a6cc8=_0x453b7a;_0xf59298=JSON['parse'](_0x3233fe['readFileSync'](_0x2ed1fd[_0x4a6cc8(0x10e2)],_0x4a6cc8(0x57a)));if(_0xf59298[_0x4a6cc8(0xaf3)]!==_0x558d50||_0xf59298['algorithm']!==_0x4a6cc8(0x10a1)||_0xf59298['dims']!==_0x454861||_0xf59298['metric']!==_0x297674[_0x4a6cc8(0x419)]){_0xf59298=null;return;}_0x20a1a7=new _0x18166a(),await _0x20a1a7['loadFrom'](_0x2ed1fd[_0x4a6cc8(0xc3f)]),_0x2536c=_0x46b64f(),_0x2536c[_0x4a6cc8(0x7c9)](_0x2ed1fd['index']),_0x202918=!![];}),_0x202918?_0xf59298?.[_0x453b7a(0x114d)]??0x0:null;}async function _0x47180c(_0x2e12db){const _0x2acb5e=_0xf95e0b;if(!_0x2e12db)return![];let _0x5e089f=![];try{await _0x432bfb[_0x2acb5e(0x727)](_0x2e12db,async _0x276904=>{const _0x8c2d46=_0x2acb5e,_0x1ae940=JSON[_0x8c2d46(0xdcd)](_0x3233fe[_0x8c2d46(0x227)](_0x276904['state'],_0x8c2d46(0x57a)));if(_0x1ae940[_0x8c2d46(0xaf3)]!==_0x558d50||_0x1ae940[_0x8c2d46(0x7fc)]!=='usearch'||_0x1ae940[_0x8c2d46(0xa67)]!==_0x454861||_0x1ae940['metric']!==_0x297674[_0x8c2d46(0x419)])return;const _0x41b825=new _0x18166a();await _0x41b825[_0x8c2d46(0x889)](_0x276904[_0x8c2d46(0xc3f)]);const _0x1e3ee3=_0x46b64f();_0x1e3ee3[_0x8c2d46(0x2bb)](_0x276904['index']),_0x2536c=_0x1e3ee3,_0x20a1a7=_0x41b825,_0x279fbc=_0x2e12db,_0x5e089f=!![];});}catch{}return _0x5e089f;}async function _0x3f4a49(_0x2bdf53){try{await _0x47180c(_0x2bdf53);}finally{_0x34044d=![];}}function _0x108783(){const _0x3f5b3d=_0xf95e0b,_0x347dc1=Date[_0x3f5b3d(0x555)]();if(_0x347dc1-_0x28df62<_0x297674[_0x3f5b3d(0x57e)])return;_0x28df62=_0x347dc1;if(_0x34044d)return;const _0x24e936=_0x432bfb[_0x3f5b3d(0x9c4)]()||_0x432bfb['latestSnapshotId']();if(!_0x24e936||_0x24e936===_0x279fbc)return;_0x34044d=!![],_0x3f4a49(_0x24e936);}async function _0x502e29(){const _0x113c6c=_0xf95e0b;_0x48e221=!![],_0x5e5291();if(_0x279fbc)try{const _0x376016=new _0x18166a();let _0x1d3367=![];await _0x432bfb[_0x113c6c(0x727)](_0x279fbc,async _0x43afa5=>{const _0x178b28=_0x113c6c;await _0x376016['loadFrom'](_0x43afa5[_0x178b28(0xc3f)]);const _0x402976=_0x46b64f();_0x402976[_0x178b28(0x7c9)](_0x43afa5[_0x178b28(0xcc7)]),_0x2536c=_0x402976,_0x20a1a7=_0x376016,_0x1d3367=!![];});if(_0x1d3367)return;}catch{}await _0x502c19(_0x442eee);}return{async 'load'(_0x1c6630){return _0x4c86fe(async()=>{const _0x25898c=_0x47ab;_0x432bfb['cleanupTmpDirs']({'maxAgeMs':_0x297674[_0x25898c(0x8e0)]}),_0x442eee=_0x1c6630??null,_0x48e221=_0x75c2de();if(_0x48e221){_0x5e5291();const _0x19de03=await _0x20be44();if(_0x19de03!=null)return _0x19de03;return await _0x502c19(_0x1c6630),null;}const _0x4cb01d=_0x432bfb['readCurrentId']()||_0x432bfb[_0x25898c(0x135)]();return await _0x47180c(_0x4cb01d),null;});},async 'add'(_0x47b211,_0x4807c2,_0x4f8de9){return _0x4c86fe(async()=>{const _0x595d5a=_0x47ab;if(!_0x48e221){if(!_0x75c2de())return;await _0x502e29();}if(!_0x2536c)return;const _0x11a6fe=_0x20a1a7[_0x595d5a(0xa55)](_0x47b211);if(_0x11a6fe!==undefined)try{_0x2536c[_0x595d5a(0x21e)](BigInt(_0x11a6fe));}catch{}const _0x2cfa2f=_0x20a1a7[_0x595d5a(0x11d7)](_0x47b211);_0x2536c[_0x595d5a(0x33c)](BigInt(_0x2cfa2f),_0x1c3e5c(_0x4807c2)),_0x17821e++,_0x17821e>=_0x297674[_0x595d5a(0xe3)]&&await _0x394193(_0x4f8de9??Date['now']());});},async 'remove'(_0x1bc6c8){return _0x4c86fe(async()=>{const _0x20a5c7=_0x47ab;if(!_0x48e221){if(!_0x75c2de())return;await _0x502e29();}if(!_0x2536c)return;const _0x4753cf=_0x20a1a7['labelForExisting'](_0x1bc6c8);if(_0x4753cf===undefined)return;try{_0x2536c[_0x20a5c7(0x21e)](BigInt(_0x4753cf));}catch{}_0x20a1a7['tombstone'](_0x1bc6c8),_0x17821e++;});},'search'(_0x1b18ba,{limit:limit=0xa}={}){const _0x2b0c85=_0xf95e0b;if(!_0x48e221)_0x108783();if(!_0x2536c)return[];const _0x5f5827=_0x2536c[_0x2b0c85(0xfb)]();if(_0x5f5827===0x0)return[];const _0x5c186a=Math[_0x2b0c85(0x2dc)](limit,_0x5f5827),_0x10d05e=_0x2536c[_0x2b0c85(0x460)](_0x1c3e5c(_0x1b18ba),_0x5c186a,0x0),_0x4e9f0b=[],_0x1faa42=_0x10d05e[_0x2b0c85(0xa52)],_0x30d013=_0x10d05e[_0x2b0c85(0x8a2)];for(let _0x76df04=0x0;_0x76df04<_0x1faa42[_0x2b0c85(0x156)];_0x76df04++){const _0x2afafc=_0x1faa42[_0x76df04];if(_0x2afafc===0xffffffffffffffffn)continue;const _0x2d5276=Number(_0x2afafc),_0x30fb8a=_0x20a1a7[_0x2b0c85(0x10c8)](_0x2d5276);if(!_0x30fb8a)continue;const _0x4db35c=_0x30d013[_0x76df04];let _0x1d2b07;if(_0x297674['metric']===_0x2b0c85(0xcf))_0x1d2b07=Math['max'](0x0,0x1-_0x4db35c);else{if(_0x297674[_0x2b0c85(0x419)]==='ip')_0x1d2b07=-_0x4db35c;else _0x1d2b07=0x1/(0x1+_0x4db35c);}_0x4e9f0b[_0x2b0c85(0x597)]({'key':_0x30fb8a,'score':_0x1d2b07});}return _0x4e9f0b;},async 'snapshot'(_0xdfa781=Date[_0xf95e0b(0x555)]()){if(!_0x48e221)return![];return _0x4c86fe(()=>_0x394193(_0xdfa781));},async 'rebuild'(_0x20ac40){if(!_0x48e221)return;return _0x4c86fe(()=>{if(_0x20ac40!=null)_0x442eee=_0x20ac40;return _0x502c19(_0x20ac40??_0x442eee);});},async 'stop'(){return _0x4c86fe(async()=>{const _0x230f7f=_0x47ab;_0x48e221&&(await _0x394193(Date[_0x230f7f(0x555)]()),_0x24bd74());});},'count'(){const _0x20d527=_0xf95e0b;return _0x20a1a7[_0x20d527(0xfb)]();},'info'(){const _0x2cc337=_0xf95e0b;return{'algorithm':'usearch','role':_0x48e221?_0x2cc337(0xb21):_0x2cc337(0xb37),'metric':_0x297674[_0x2cc337(0x419)],'connectivity':_0x297674[_0x2cc337(0x49f)],'expansionAdd':_0x297674[_0x2cc337(0x11a3)],'expansionSearch':_0x297674['expansionSearch'],'count':_0x20a1a7[_0x2cc337(0xfb)](),'size':_0x2536c?.[_0x2cc337(0xfb)]?.()??0x0,'capacity':_0x2536c?.['capacity']?.()??0x0,'changesSince':_0x48e221?_0x17821e:null,'viewedSnapshot':_0x279fbc??null,'snapshotDir':_0x224c16,'latestSnapshot':_0x432bfb['readCurrentId']()??null};}};},usearch;}var okdbEmbeddings,hasRequiredOkdbEmbeddings;function requireOkdbEmbeddings(){const _0x553ce9=_0xef8cd8;if(hasRequiredOkdbEmbeddings)return okdbEmbeddings;hasRequiredOkdbEmbeddings=0x1;const _0x3d0ac6=requireEmbedder(),_0x2ddccc=requireIndexer(),_0x30cd64=requireSearch(),_0x2dccd4=requireEmbedWorker(),{ENGINE_TYPES:_0x39b24d,EMBEDDINGS_EVENTS:_0x5d1e41,INTERNAL_TYPES:_0xaa328d}=requireEnums(),_0x69c0db=requireOkdbEmbeddingsHttp(),_0x41d619=requireOkdbVectorStore(),{lookupDims:_0x2b433a,listModels:_0x5f2ed3}=requireModelCatalog();class _0x360c48{constructor(_0x25a7f0,_0x572a9d={}){const _0x58e0c2=_0x47ab;this[_0x58e0c2(0xd4f)]=_0x25a7f0,this['options']=_0x572a9d,this[_0x58e0c2(0x9e5)]=new Map(),this[_0x58e0c2(0x1036)]=new Map(),this[_0x58e0c2(0xdf9)]=new Map(),this[_0x58e0c2(0x29b)]=new Map(),this[_0x58e0c2(0x11e0)]=new Map(),this[_0x58e0c2(0xb6a)]=new Map(),this['_resolveStorage']=_0x572a9d[_0x58e0c2(0xc9d)]??null,this[_0x58e0c2(0x10fc)]=![],this[_0x58e0c2(0x75f)](),this[_0x58e0c2(0x10dd)](),this[_0x58e0c2(0xad0)]();}async['_ensureTypeEnv'](_0x5b5d47,_0x27cd72){const _0x5bdabb=_0x47ab,_0x27b28e='~'+_0x5b5d47+_0x5bdabb(0x532)+_0x27cd72;if(this[_0x5bdabb(0x9e5)][_0x5bdabb(0x9d0)](_0x27b28e))return this[_0x5bdabb(0x9e5)][_0x5bdabb(0xbeb)](_0x27b28e);const _0x3d7447=this[_0x5bdabb(0xd4f)]['createEnvironment'](_0x27b28e,{'parentEnv':_0x5b5d47})[_0x5bdabb(0x7db)](_0x417700=>_0x417700)[_0x5bdabb(0x415)](_0x26c982=>{const _0x3dfcfa=_0x5bdabb;this[_0x3dfcfa(0x9e5)][_0x3dfcfa(0x3b3)](_0x27b28e);throw _0x26c982;});return this['_typeEnvs']['set'](_0x27b28e,_0x3d7447),_0x3d7447;}[_0x553ce9(0xb8a)](_0x10a4f0){const _0x1f07fe=_0x553ce9,_0x4b6060='~'+_0x10a4f0+':';for(const _0x2446eb of[...this[_0x1f07fe(0x9e5)][_0x1f07fe(0xa52)]()]){if(_0x2446eb[_0x1f07fe(0x8ba)](_0x4b6060))this[_0x1f07fe(0x9e5)][_0x1f07fe(0x3b3)](_0x2446eb);}for(const _0x1876cb of[...this[_0x1f07fe(0x1036)][_0x1f07fe(0xa52)]()]){if(_0x1876cb[_0x1f07fe(0x8ba)](_0x4b6060))this['_vectorStores'][_0x1f07fe(0x3b3)](_0x1876cb);}}async[_0x553ce9(0x5e5)](_0x21b953,_0x5e8bb6){const _0x3ec32c=_0x553ce9,_0x4632b8='~'+_0x21b953+':emb:'+_0x5e8bb6;if(this[_0x3ec32c(0x1036)][_0x3ec32c(0x9d0)](_0x4632b8))return this[_0x3ec32c(0x1036)]['get'](_0x4632b8);const _0x1931d5=await this[_0x3ec32c(0x119f)](_0x21b953,_0x5e8bb6),_0x2d0b3b=new _0x41d619(this[_0x3ec32c(0xd4f)],_0x1931d5);return this[_0x3ec32c(0x1036)][_0x3ec32c(0x211)](_0x4632b8,_0x2d0b3b),_0x2d0b3b;}[_0x553ce9(0xd30)](){const _0x26a08a=_0x553ce9;return this[_0x26a08a(0xad0)]();}[_0x553ce9(0xad0)](){const _0x507840=_0x553ce9;if(this['_httpRegistered'])return![];if(!this['okdb']['http'])return![];return _0x69c0db(this['okdb']),this[_0x507840(0x10fc)]=!![],!![];}['_registerBuiltinFactories'](){const _0x17988a=_0x553ce9;this[_0x17988a(0xb11)](_0x17988a(0x113b),(_0x501dd4,_0x373592)=>requireOllama()(_0x501dd4,_0x373592),{'label':_0x17988a(0xdb5),'fields':[{'key':_0x17988a(0xb14),'type':_0x17988a(0xb14),'label':_0x17988a(0x113e),'placeholder':_0x17988a(0x114a),'default':_0x17988a(0x114a)}]}),this[_0x17988a(0xb11)]('openai',(_0x1d3d20,_0x5a9abc)=>requireOpenai()(_0x1d3d20,_0x5a9abc),{'label':_0x17988a(0xfd7),'fields':[{'key':_0x17988a(0x11fc),'type':_0x17988a(0x1e8),'label':'API\x20Key','placeholder':'sk-…','required':!![]},{'key':'base_url','type':_0x17988a(0xb14),'label':'Base\x20URL','placeholder':_0x17988a(0x2b8),'default':'https://api.openai.com/v1'},{'key':_0x17988a(0x44f),'type':_0x17988a(0x9f0),'label':_0x17988a(0xc4),'placeholder':_0x17988a(0x9b6)}]}),this[_0x17988a(0xb11)](_0x17988a(0xf5e),_0x536725=>{const _0x439523=_0x17988a,_0x5da2bf=typeof _0x536725[_0x439523(0xa67)]==='number'&&_0x536725[_0x439523(0xa67)]>0x0?_0x536725['dims']:0x8;function _0x597f32(_0x57eceb){const _0x29124a=_0x439523,_0x5d526b=typeof _0x57eceb===_0x29124a(0xf7a)?_0x57eceb:JSON[_0x29124a(0xf75)](_0x57eceb),_0xbb3f05=new Float32Array(_0x5da2bf);for(let _0x198af1=0x0;_0x198af1<_0x5da2bf;_0x198af1++){_0xbb3f05[_0x198af1]=((_0x5d526b['charCodeAt'](_0x198af1%_0x5d526b[_0x29124a(0x156)])||0x0)+_0x198af1*0xd)%0x64/0x64;}return _0xbb3f05;}return{async 'embed'(_0x207091){const _0x381516=_0x439523;if(Array[_0x381516(0x10f5)](_0x207091))return _0x207091[_0x381516(0x1166)](_0x597f32);return _0x597f32(_0x207091);},async 'health'(){const _0x4b2aad=_0x439523;return{'ok':!![],'type':_0x4b2aad(0xf5e),'model':_0x536725[_0x4b2aad(0x7d4)]??'fake-v1','latency':0x0};}};},{'label':_0x17988a(0x4e1),'fields':[],'note':_0x17988a(0x3be)});const _0x2a9fe1={'key':'metric','type':_0x17988a(0xbd7),'label':_0x17988a(0xe74),'default':_0x17988a(0xcf),'options':[{'value':'cosine','label':_0x17988a(0xdd0)},{'value':'l2','label':_0x17988a(0xfe)},{'value':'ip','label':_0x17988a(0x3d5)}]};this[_0x17988a(0x370)](_0x17988a(0x103f),(_0xab674,_0x24126a)=>requireFlat()(_0xab674,_0x24126a),{'label':_0x17988a(0x9d3),'description':'Exact\x20cosine\x20scan\x20over\x20all\x20vectors.\x20No\x20native\x20bindings\x20required.\x20Best\x20for\x20small\x20corpora\x20(<\x2050k\x20vectors).','note':'O(n)\x20per\x20query\x20—\x20performance\x20degrades\x20linearly\x20with\x20corpus\x20size.','fields':[],'configSchema':{'type':_0x17988a(0xb36),'properties':{},'additionalProperties':![]}}),this['registerAlgorithmFactory'](_0x17988a(0x41e),(_0x36111d,_0x1af5b8)=>requireHnsw()(_0x36111d,_0x1af5b8),{'label':_0x17988a(0xa82),'description':'Hierarchical\x20Navigable\x20Small\x20World\x20graph\x20index.\x20Fast\x20approximate\x20nearest-neighbor\x20search\x20with\x20persistent\x20snapshots.','note':'Requires\x20native\x20hnswlib-node\x20bindings.\x20Startup\x20fails\x20if\x20bindings\x20are\x20unavailable\x20on\x20this\x20runtime.','fields':[_0x2a9fe1,{'key':'M','type':_0x17988a(0x9f0),'label':'M','placeholder':'16','default':0x10,'hint':_0x17988a(0x9e8),'min':0x2},{'key':_0x17988a(0x4e0),'type':_0x17988a(0x9f0),'label':_0x17988a(0x4e0),'placeholder':_0x17988a(0x1114),'default':0xc8,'hint':_0x17988a(0x59e),'min':0x1},{'key':_0x17988a(0xce0),'type':'number','label':_0x17988a(0xce0),'placeholder':'64','default':0x40,'hint':_0x17988a(0xfba),'min':0x1},{'key':_0x17988a(0x70f),'type':_0x17988a(0x9f0),'label':_0x17988a(0xdcc),'placeholder':_0x17988a(0x7b1),'hint':'Initial\x20index\x20capacity.\x20Auto-grows\x20when\x20exceeded.','min':0x1}],'configSchema':{'type':_0x17988a(0xb36),'properties':{'metric':{'type':_0x17988a(0xf7a),'enum':[_0x17988a(0xcf),'l2','ip']},'M':{'type':'integer','minimum':0x2},'efConstruction':{'type':_0x17988a(0x10f2),'minimum':0x1},'efSearch':{'type':_0x17988a(0x10f2),'minimum':0x1},'maxElements':{'type':_0x17988a(0x10f2),'minimum':0x1},'growFactor':{'type':'number','minimum':0x1},'snapshotEveryChanges':{'type':_0x17988a(0x10f2),'minimum':0x1},'keepSnapshots':{'type':'integer','minimum':0x1}},'additionalProperties':![]}}),this[_0x17988a(0x370)](_0x17988a(0x10a1),(_0x20fb17,_0x31f4d5)=>requireUsearch()(_0x20fb17,_0x31f4d5),{'label':'usearch','description':_0x17988a(0xdcf),'note':_0x17988a(0xad9),'fields':[_0x2a9fe1,{'key':_0x17988a(0x49f),'type':_0x17988a(0x9f0),'label':_0x17988a(0x9d9),'placeholder':'16','default':0x10,'hint':'Connections\x20per\x20node\x20(equivalent\x20to\x20HNSW\x20M).','min':0x2},{'key':_0x17988a(0x11a3),'type':'number','label':_0x17988a(0x11a3),'placeholder':'128','default':0x80,'hint':_0x17988a(0x11a4),'min':0x1},{'key':_0x17988a(0x7a5),'type':'number','label':'expansionSearch','placeholder':'64','default':0x40,'hint':_0x17988a(0x596),'min':0x1}],'configSchema':{'type':_0x17988a(0xb36),'properties':{'metric':{'type':_0x17988a(0xf7a),'enum':[_0x17988a(0xcf),'l2','ip']},'connectivity':{'type':'integer','minimum':0x2},'expansionAdd':{'type':'integer','minimum':0x1},'expansionSearch':{'type':_0x17988a(0x10f2),'minimum':0x1},'snapshotEveryChanges':{'type':_0x17988a(0x10f2),'minimum':0x1},'keepSnapshots':{'type':_0x17988a(0x10f2),'minimum':0x1}},'additionalProperties':![]}});}['_registerDrivers'](){const _0xe7c039=_0x553ce9,{engines:_0x2eae25}=this['okdb'];_0x2eae25[_0xe7c039(0x8ed)](_0x39b24d[_0xe7c039(0x1d1)],_0x3d0ac6({'resolveFactory':_0x50b64f=>this[_0xe7c039(0xdf9)][_0xe7c039(0xbeb)](_0x50b64f)??null})),_0x2eae25[_0xe7c039(0x8ed)](_0x39b24d['INDEXER'],_0x2ddccc({'resolveStorage':(_0x2b29a7,_0x1c8899,_0x2be7ce,_0x2c0dcb)=>{const _0x8aaeab=_0xe7c039;if(this[_0x8aaeab(0x2b6)])return this[_0x8aaeab(0x2b6)](_0x2b29a7,_0x1c8899);return this[_0x8aaeab(0x4c0)](_0x2be7ce,_0x2c0dcb,_0x2b29a7);},'resolveTypeEnv':(_0x1c2e02,_0x1521ad)=>this[_0xe7c039(0x119f)](_0x1c2e02,_0x1521ad)})),_0x2eae25['registerDriver'](_0x39b24d['WORKER'],_0x2dccd4({'resolveTypeEnv':(_0x2d3eea,_0x14c4ee)=>this[_0xe7c039(0x119f)](_0x2d3eea,_0x14c4ee)})),_0x2eae25[_0xe7c039(0x8ed)](_0x39b24d[_0xe7c039(0x5a3)],_0x30cd64({'resolveStorage':(_0x2854ee,_0x967bcc,_0x57be34,_0x247dbb)=>{const _0xb4a81e=_0xe7c039;if(this[_0xb4a81e(0x2b6)])return this[_0xb4a81e(0x2b6)](_0x2854ee,_0x967bcc);return this[_0xb4a81e(0x4c0)](_0x57be34,_0x247dbb,_0x2854ee);},'resolveAlgorithm':_0x2c0cb7=>this[_0xe7c039(0x11e0)][_0xe7c039(0xbeb)](_0x2c0cb7)??null,'resolveTypeEnv':(_0x18cd53,_0x2fc0fe)=>this['_ensureTypeEnv'](_0x18cd53,_0x2fc0fe)}));}[_0x553ce9(0x4c0)](_0x3a70c3,_0x1c8576,_0x4c62dd){const _0x688c54=_0x553ce9,_0x1b3147=this,_0x40c836='~'+_0x3a70c3+_0x688c54(0x532)+_0x1c8576;async function _0x348c17(){const _0x422e80=_0x688c54;return(await _0x1b3147[_0x422e80(0x5e5)](_0x3a70c3,_0x1c8576))[_0x422e80(0x9c6)](_0x4c62dd);}return{async 'put'(_0x1b989c,_0x15eaf5){const _0x50a004=_0x688c54;return(await _0x348c17())[_0x50a004(0x92c)](_0x1b989c,_0x15eaf5);},async 'remove'(_0x4d5d3c){const _0x40f811=_0x688c54;return(await _0x348c17())[_0x40f811(0x21e)](_0x4d5d3c);},async 'getAll'(){const _0x17b9df=_0x688c54;return(await _0x348c17())[_0x17b9df(0xdc7)]();},'get'(_0x223e35){const _0x502928=_0x688c54,_0x1d0f77=_0x1b3147[_0x502928(0x1036)]['get'](_0x40c836);if(!_0x1d0f77)return null;return _0x1d0f77['adapter'](_0x4c62dd)[_0x502928(0xbeb)](_0x223e35);},'count'(){const _0x8ea10a=_0x688c54,_0x50336e=_0x1b3147[_0x8ea10a(0x1036)][_0x8ea10a(0xbeb)](_0x40c836);if(!_0x50336e)return 0x0;return _0x50336e[_0x8ea10a(0x9c6)](_0x4c62dd)[_0x8ea10a(0x1147)]();},'stats'(){const _0x2352a6=_0x688c54,_0x26db81=_0x1b3147[_0x2352a6(0x1036)][_0x2352a6(0xbeb)](_0x40c836);if(!_0x26db81)return{'storage_key':_0x4c62dd,'type':_0x2352a6(0xd13)+_0x4c62dd,'count':0x0};return _0x26db81[_0x2352a6(0x9c6)](_0x4c62dd)['stats']();}};}[_0x553ce9(0xb11)](_0x39e7e0,_0x2083af,_0x149809={}){const _0x17d5c6=_0x553ce9;if(!_0x39e7e0||typeof _0x39e7e0!==_0x17d5c6(0xf7a))throw new Error('embedder\x20factory\x20name\x20required');if(typeof _0x2083af!=='function')throw new Error('embedder\x20factory\x20must\x20be\x20a\x20function');this['_embedderFactories'][_0x17d5c6(0x211)](_0x39e7e0,_0x2083af),this[_0x17d5c6(0x29b)][_0x17d5c6(0x211)](_0x39e7e0,{'label':_0x149809[_0x17d5c6(0x757)]??_0x39e7e0,'fields':_0x149809['fields']??[],'note':_0x149809[_0x17d5c6(0xf52)]??null});}[_0x553ce9(0x370)](_0x254d7f,_0xfbfea9,_0x5882dd={}){const _0xa13796=_0x553ce9;if(!_0x254d7f||typeof _0x254d7f!==_0xa13796(0xf7a))throw new Error(_0xa13796(0x799));if(typeof _0xfbfea9!=='function')throw new Error(_0xa13796(0x9ec));this[_0xa13796(0x11e0)][_0xa13796(0x211)](_0x254d7f,_0xfbfea9),this[_0xa13796(0xb6a)]['set'](_0x254d7f,{'label':_0x5882dd[_0xa13796(0x757)]??_0x254d7f,'description':_0x5882dd[_0xa13796(0x69d)]??null,'note':_0x5882dd['note']??null,'fields':Array[_0xa13796(0x10f5)](_0x5882dd[_0xa13796(0x461)])?_0x5882dd['fields']:[],'configSchema':_0x5882dd[_0xa13796(0x8bc)]??null});}[_0x553ce9(0xd1f)](){const _0x312253=_0x553ce9,_0x42029b=[];for(const _0xba2fae of this['_algorithmFactories'][_0x312253(0xa52)]()){const _0x19d609=this[_0x312253(0xb6a)][_0x312253(0xbeb)](_0xba2fae)??{};_0x42029b[_0x312253(0x597)]({'key':_0xba2fae,'label':_0x19d609[_0x312253(0x757)]??_0xba2fae,'description':_0x19d609[_0x312253(0x69d)]??null,'note':_0x19d609[_0x312253(0xf52)]??null,'fields':_0x19d609[_0x312253(0x461)]??[],'configSchema':_0x19d609[_0x312253(0x8bc)]??null});}return _0x42029b;}[_0x553ce9(0x166)](_0xfe39a,_0x5777b9){const {registerPreparer:_0x115bcd}=requireOkdbChunker();_0x115bcd(_0xfe39a,_0x5777b9);}['registerChunkStrategy'](_0x30e09f,_0x3138ea){const {registerChunkStrategy:_0x5a9d3a}=requireOkdbChunker();_0x5a9d3a(_0x30e09f,_0x3138ea);}[_0x553ce9(0xa2)](_0x27a718){const _0x2fcb5c=_0x553ce9;this[_0x2fcb5c(0x2b6)]=_0x27a718;}async[_0x553ce9(0x623)](_0x2f02b0,_0x2dc350={},_0x4a0609={}){const _0x3055eb=_0x553ce9;return this['okdb'][_0x3055eb(0xab8)][_0x3055eb(0x754)](_0x39b24d[_0x3055eb(0x1d1)],_0x2f02b0,_0x2dc350,_0x4a0609);}async[_0x553ce9(0xd40)](_0x5d64c5,_0x26caa0={},_0x591edb={}){const _0x7ab38=_0x553ce9,_0x545830=_0x26caa0[_0x7ab38(0x43a)]??_0x7ab38(0x8d0);return this[_0x7ab38(0xd4f)]['env'](_0x545830)['engines'][_0x7ab38(0x754)](_0x39b24d[_0x7ab38(0xb28)],_0x5d64c5,_0x26caa0,_0x591edb);}async['createSearch'](_0x6ea64,_0x1d2a0d={},_0x2ddc7c={}){const _0x35807f=_0x553ce9,_0x3a3bf3=_0x1d2a0d[_0x35807f(0x43a)]??_0x35807f(0x8d0);return this[_0x35807f(0xd4f)][_0x35807f(0x30b)](_0x3a3bf3)[_0x35807f(0xab8)]['createAndStartEngine'](_0x39b24d[_0x35807f(0x5a3)],_0x6ea64,_0x1d2a0d,_0x2ddc7c);}async[_0x553ce9(0x1209)](_0x2fc1f7,_0x44847e={},_0x136ae1={}){const _0x2c4cfd=_0x553ce9,_0x5454eb=_0x44847e[_0x2c4cfd(0x43a)]??_0x2c4cfd(0x8d0);return this[_0x2c4cfd(0xd4f)][_0x2c4cfd(0x30b)](_0x5454eb)[_0x2c4cfd(0xab8)]['createAndStartEngine'](_0x39b24d[_0x2c4cfd(0xe19)],_0x2fc1f7,_0x44847e,_0x136ae1);}[_0x553ce9(0x593)]({embedder_name:_0x5ee6d2,scoped_name:_0x5f0d5b,worker_name:_0x4d3f7d,mode:_0x58735a}){const _0x1fde57=_0x553ce9;return[{'type':_0x39b24d[_0x1fde57(0x1d1)],'name':_0x5ee6d2,'role':_0x1fde57(0x37b)},{'type':_0x39b24d[_0x1fde57(0xb28)],'name':_0x5f0d5b,'role':_0x1fde57(0xa4a)},..._0x58735a===_0x1fde57(0x879)?[{'type':_0x39b24d[_0x1fde57(0xe19)],'name':_0x4d3f7d,'role':'worker'}]:[],{'type':_0x39b24d[_0x1fde57(0x5a3)],'name':_0x5f0d5b,'role':_0x1fde57(0x460)}];}[_0x553ce9(0x63c)](_0x2eb200,_0x42cc70={},_0x46b6f5={}){const _0x24f25d=_0x553ce9;return{..._0x46b6f5,'label':_0x46b6f5?.[_0x24f25d(0x757)]??_0x2eb200,'family':_0x24f25d(0x7f1),'pipeline':_0x2eb200,'source_env':_0x42cc70[_0x24f25d(0x43a)]??_0x24f25d(0x8d0),'source_type':_0x42cc70[_0x24f25d(0x481)],'storage_key':_0x42cc70[_0x24f25d(0x1cc)]??_0x2eb200,'mode':_0x42cc70[_0x24f25d(0x259)]??_0x24f25d(0x10aa),'lifecycleSkipRoles':[_0x24f25d(0x37b)]};}async[_0x553ce9(0x158)](_0x20f956,_0x1e6125,_0x50389b={},_0x17468a={},_0x48fe0b=[]){const _0x2aed16=_0x553ce9,_0x2c7bab=_0x50389b[_0x2aed16(0x43a)]??'default',_0x29fd55=this[_0x2aed16(0xd4f)]['env'](_0x2c7bab)['pipelines'],_0x51270b=this[_0x2aed16(0x63c)](_0x1e6125,_0x50389b,_0x17468a),_0x126ad3=await _0x29fd55[_0x2aed16(0x1203)](_0x20f956);if(!_0x126ad3)return _0x29fd55[_0x2aed16(0x725)]({'name':_0x20f956,'template':null,'status':_0x2aed16(0x43f),'meta':_0x51270b,'engines':_0x48fe0b});const _0x194dbd=JSON[_0x2aed16(0xf75)](_0x126ad3['engines']??[]),_0x11a4d=JSON[_0x2aed16(0xf75)](_0x48fe0b);if(_0x194dbd!==_0x11a4d)throw new Error(_0x2aed16(0x145)+_0x20f956+_0x2aed16(0xed8));return _0x29fd55[_0x2aed16(0xbb7)](_0x20f956,{'status':'active','meta':_0x51270b});}async[_0x553ce9(0x10ab)](_0x241de2,_0x432fdf={},_0x49d906={}){const _0x3c841e=_0x553ce9;this[_0x3c841e(0xd4f)]?.[_0x3c841e(0x3a3)]?.[_0x3c841e(0xa15)](_0x3c841e(0x7f1));const _0x4049de=_0x432fdf[_0x3c841e(0x259)]??_0x3c841e(0x10aa),_0x1f9293=_0x432fdf[_0x3c841e(0x37b)]?.[_0x3c841e(0x1173)]??_0x241de2,_0x4fc763=_0x432fdf[_0x3c841e(0x1cc)]??_0x241de2,_0x4a37f1=_0x432fdf[_0x3c841e(0x481)],_0x68b07f=_0x432fdf[_0x3c841e(0x43a)]??_0x3c841e(0x8d0),_0x282f74=this[_0x3c841e(0xd4f)][_0x3c841e(0x30b)](_0x68b07f);if(!_0x4a37f1)throw new Error(_0x3c841e(0x112b));if(await _0x282f74[_0x3c841e(0x7d3)][_0x3c841e(0x1203)](_0x4fc763))throw new Error(_0x3c841e(0x682)+_0x4fc763);const _0x17c2e7=_0x68b07f+':'+_0x4fc763,_0x49ec16=_0x432fdf[_0x3c841e(0x738)]?.[_0x3c841e(0x1173)]??_0x17c2e7+'-worker';await this[_0x3c841e(0x119f)](_0x68b07f,_0x4a37f1);const _0x25def1={'pipeline':_0x241de2,..._0x49d906};let _0x387888=this[_0x3c841e(0xd4f)][_0x3c841e(0xab8)][_0x3c841e(0xf83)](_0x39b24d['EMBEDDER'],_0x1f9293);if(!_0x387888)_0x387888=await this[_0x3c841e(0x623)](_0x1f9293,{..._0x432fdf[_0x3c841e(0x37b)]},_0x25def1);else!_0x387888['isRunning']&&await _0x387888['start']();const _0x325220=_0x432fdf[_0x3c841e(0xa67)]??_0x387888[_0x3c841e(0x1f5)]?.['dims']??undefined;let _0x509184=_0x282f74[_0x3c841e(0xab8)][_0x3c841e(0xf83)](_0x39b24d[_0x3c841e(0xb28)],_0x17c2e7);if(!_0x509184)_0x509184=await this[_0x3c841e(0xd40)](_0x17c2e7,{'source_type':_0x4a37f1,'source_env':_0x68b07f,'embedder':_0x1f9293,'field':_0x432fdf[_0x3c841e(0x221)]??null,'storage_key':_0x4fc763,'dims':_0x325220??undefined,'mode':_0x4049de,'prepare':_0x432fdf[_0x3c841e(0x246)]??undefined,'chunk':_0x432fdf[_0x3c841e(0xf26)]??undefined},_0x25def1);else!_0x509184[_0x3c841e(0xc53)]&&await _0x509184[_0x3c841e(0xa00)]();let _0x287cd0=null;if(_0x4049de===_0x3c841e(0x879)){const _0x427aad=_0x3c841e(0x2f4)+_0x39b24d[_0x3c841e(0xb28)]+'@'+_0x17c2e7;_0x287cd0=_0x282f74[_0x3c841e(0xab8)][_0x3c841e(0xf83)](_0x39b24d[_0x3c841e(0xe19)],_0x49ec16);if(!_0x287cd0)_0x287cd0=await this[_0x3c841e(0x1209)](_0x49ec16,{'job_type':_0x427aad,'indexer':_0x17c2e7,'embedder':_0x1f9293,'source_env':_0x68b07f,'source_type':_0x4a37f1,'concurrency':_0x432fdf[_0x3c841e(0x738)]?.['concurrency']??0x1,'pollInterval':_0x432fdf['worker']?.[_0x3c841e(0x7e3)]??0x3e8,'ttl':_0x432fdf['worker']?.['ttl']??0x7530},_0x25def1);else!_0x287cd0[_0x3c841e(0xc53)]&&await _0x287cd0['start']();}let _0x4f07de=_0x282f74['engines']['getEngine'](_0x39b24d[_0x3c841e(0x5a3)],_0x17c2e7);if(!_0x4f07de)_0x4f07de=await this[_0x3c841e(0xed5)](_0x17c2e7,{'source_type':_0x4a37f1,'source_env':_0x68b07f,'storage_key':_0x4fc763,'dims':_0x325220??undefined,'embedder':_0x1f9293,'algorithm':_0x432fdf[_0x3c841e(0x7fc)],'algorithm_config':_0x432fdf[_0x3c841e(0x82f)]},_0x25def1);else!_0x4f07de[_0x3c841e(0xc53)]&&await _0x4f07de[_0x3c841e(0xa00)]();await this[_0x3c841e(0x158)](_0x4fc763,_0x241de2,{..._0x432fdf,'source_env':_0x68b07f,'source_type':_0x4a37f1,'storage_key':_0x4fc763,'mode':_0x4049de},_0x49d906,this[_0x3c841e(0x593)]({'embedder_name':_0x1f9293,'scoped_name':_0x17c2e7,'worker_name':_0x49ec16,'mode':_0x4049de}));const _0x5a6c0c={'embedder':_0x387888,'indexer':_0x509184,'worker':_0x287cd0,'search':_0x4f07de,'api':this[_0x3c841e(0x11d1)](_0x17c2e7,_0x1f9293,_0x49ec16)};return this[_0x3c841e(0xd4f)][_0x3c841e(0xea8)][_0x3c841e(0xf5d)](_0x5d1e41['PIPELINE_READY']+'@'+_0x241de2,{'pipeline':_0x241de2}),this[_0x3c841e(0xd4f)]['events']['emit'](_0x5d1e41['PIPELINE_READY'],{'pipeline':_0x241de2}),_0x5a6c0c;}[_0x553ce9(0x37b)](_0x14c4cc){const _0x2d3638=_0x553ce9;return this[_0x2d3638(0xd4f)][_0x2d3638(0xab8)][_0x2d3638(0xdd5)](_0x39b24d[_0x2d3638(0x1d1)],_0x14c4cc)?.['api']??null;}[_0x553ce9(0xa4a)](_0x4a3638){const _0x931736=_0x553ce9;return this[_0x931736(0xd4f)][_0x931736(0xab8)][_0x931736(0xdd5)](_0x39b24d[_0x931736(0xb28)],_0x4a3638)?.[_0x931736(0x1f5)]??null;}[_0x553ce9(0x738)](_0x34f385){const _0x395922=_0x553ce9;return this[_0x395922(0xd4f)][_0x395922(0xab8)][_0x395922(0xdd5)](_0x39b24d['WORKER'],_0x34f385)?.[_0x395922(0x1f5)]??null;}[_0x553ce9(0x460)](_0x53b4f0){const _0x3c1776=_0x553ce9;return this[_0x3c1776(0xd4f)][_0x3c1776(0xab8)][_0x3c1776(0xdd5)](_0x39b24d[_0x3c1776(0x5a3)],_0x53b4f0)?.[_0x3c1776(0x1f5)]??null;}[_0x553ce9(0x968)](_0x175945){const _0xaf3b23=_0x553ce9;if(this[_0xaf3b23(0x2b6)])return null;for(const [,_0x27030c]of this[_0xaf3b23(0x1036)]){const _0x1a0a3b=_0x27030c[_0xaf3b23(0x9c6)](_0x175945)[_0xaf3b23(0xd72)]();if(_0x1a0a3b[_0xaf3b23(0x1147)]>0x0||_0x27030c[_0xaf3b23(0x308)][_0xaf3b23(0x7c0)]('vec:'+_0x175945))return _0x1a0a3b;}return{'storage_key':_0x175945,'type':_0xaf3b23(0xd13)+_0x175945,'count':0x0};}[_0x553ce9(0x1224)](){const _0x37438=_0x553ce9,_0x87e138=[];for(const [_0x245227,_0x4a849c]of this[_0x37438(0x1036)]){for(const _0x704f58 of _0x4a849c[_0x37438(0x2a9)]()){_0x87e138[_0x37438(0x597)]({..._0x704f58,'env':_0x245227});}}return _0x87e138;}[_0x553ce9(0x82a)](_0x33f7a4,_0x54f1e7){const _0x6ea2c7=_0x553ce9;if(this['_resolveStorage'])return null;for(const [,_0x4625f8]of this[_0x6ea2c7(0x1036)]){const _0x411959=_0x4625f8[_0x6ea2c7(0x9c6)](_0x33f7a4)[_0x6ea2c7(0xbeb)](_0x54f1e7);if(_0x411959!==null)return _0x411959;}return null;}get[_0x553ce9(0x308)](){const _0x531af4=_0x553ce9;return this['okdb'][_0x531af4(0xc65)]??this[_0x531af4(0xd4f)];}[_0x553ce9(0x4be)](_0x1a1dc9,_0x414167){const _0x5186f0=_0x553ce9;return _0x2b433a(this[_0x5186f0(0x308)],_0x1a1dc9,_0x414167);}async[_0x553ce9(0xc95)](_0x42ad5a,_0x509451,_0x36e1a5,_0x58c73f=''){const _0x1dc29d=_0x553ce9,_0x176953=await this['okdb'][_0x1dc29d(0xa7f)]();!_0x176953[_0x1dc29d(0x7c0)](_0xaa328d[_0x1dc29d(0x773)])&&await _0x176953['registerType'](_0xaa328d[_0x1dc29d(0x773)]);const _0x58dddd=_0x42ad5a+':'+_0x509451;await _0x176953[_0x1dc29d(0x92c)](_0xaa328d[_0x1dc29d(0x773)],_0x58dddd,{'provider':_0x42ad5a,'model':_0x509451,'dims':_0x36e1a5,'description':_0x58c73f,'builtin':![]});}['listModels'](_0x1f2c30=null){const _0x13e7d6=_0x553ce9;return _0x5f2ed3(this[_0x13e7d6(0x308)],_0x1f2c30);}['listProviders'](){const _0x1a6340=_0x553ce9,_0x5b6e98=[];for(const _0x5cb0bd of this[_0x1a6340(0xdf9)]['keys']()){const _0x3a79af=this[_0x1a6340(0x29b)][_0x1a6340(0xbeb)](_0x5cb0bd)??{};_0x5b6e98['push']({'key':_0x5cb0bd,'label':_0x3a79af[_0x1a6340(0x757)]??_0x5cb0bd,'fields':_0x3a79af[_0x1a6340(0x461)]??[],'note':_0x3a79af[_0x1a6340(0xf52)]??null});}return _0x5b6e98;}async[_0x553ce9(0xa00)](){}async[_0x553ce9(0x1fe)](){}['_makePipelineApi'](_0x242467,_0x4e1e49,_0x226d4b){const _0x13c544=_0x553ce9;return{'search':(_0x46590f,_0x3a7a90={})=>{const _0x1e92bb=_0x47ab,_0x59c56c=this[_0x1e92bb(0x460)](_0x242467);if(!_0x59c56c)throw new Error(_0x1e92bb(0x626)+_0x242467+'\x22');return _0x59c56c[_0x1e92bb(0x460)](_0x46590f,_0x3a7a90);},'flush':()=>{const _0x36061a=_0x47ab,_0x4afaf6=this[_0x36061a(0xa4a)](_0x242467);if(!_0x4afaf6)throw new Error(_0x36061a(0xa30)+_0x242467+'\x22');return _0x4afaf6[_0x36061a(0x26b)]();},'stats':async()=>({'embedder':await this[_0x13c544(0x37b)](_0x4e1e49)?.[_0x13c544(0xe6d)]?.(),'indexer':await this[_0x13c544(0xa4a)](_0x242467)?.[_0x13c544(0xd72)]?.(),'worker':await this[_0x13c544(0x738)](_0x226d4b)?.[_0x13c544(0xd72)]?.(),'search':await this[_0x13c544(0x460)](_0x242467)?.[_0x13c544(0xd72)]?.()})};}}return okdbEmbeddings=_0x360c48,okdbEmbeddings;}var tokenizer,hasRequiredTokenizer;function requireTokenizer(){if(hasRequiredTokenizer)return tokenizer;hasRequiredTokenizer=0x1;function _0x3dc359(_0x368c76,_0x5edaf7={}){const _0x2f1f66=_0x47ab;if(_0x368c76==null)return[];const _0x28c6b0=String(_0x368c76),_0x3d1f48=Number[_0x2f1f66(0x474)](_0x5edaf7[_0x2f1f66(0x124e)])?_0x5edaf7[_0x2f1f66(0x124e)]:0x2,_0x159ff2=Number[_0x2f1f66(0x474)](_0x5edaf7[_0x2f1f66(0x11b4)])?_0x5edaf7[_0x2f1f66(0x11b4)]:0x40,_0x1ae851=_0x5edaf7[_0x2f1f66(0x4c3)]!==![],_0x564906=_0x5edaf7['toLower']!==![],_0x3ebdae=Array['isArray'](_0x5edaf7[_0x2f1f66(0x60b)])&&_0x5edaf7['stopwords'][_0x2f1f66(0x156)]?new Set(_0x5edaf7[_0x2f1f66(0x60b)]['map'](String)):null,_0x56eda5=_0x28c6b0[_0x2f1f66(0xfb1)](/[^\p{L}\p{N}_]+/u),_0x31ba65=[];for(let _0x264dfc of _0x56eda5){if(!_0x264dfc)continue;if(_0x564906)_0x264dfc=_0x264dfc[_0x2f1f66(0xb52)]();if(!_0x1ae851&&/^[0-9]+$/[_0x2f1f66(0xe10)](_0x264dfc))continue;if(_0x264dfc[_0x2f1f66(0x156)]<_0x3d1f48)continue;if(_0x264dfc[_0x2f1f66(0x156)]>_0x159ff2)_0x264dfc=_0x264dfc[_0x2f1f66(0xc3c)](0x0,_0x159ff2);if(_0x3ebdae&&_0x3ebdae['has'](_0x264dfc))continue;_0x31ba65[_0x2f1f66(0x597)](_0x264dfc);}return _0x31ba65;}return tokenizer={'tokenize':_0x3dc359},tokenizer;}var okdbFts,hasRequiredOkdbFts;function requireOkdbFts(){const _0x24a2b3=_0xef8cd8;if(hasRequiredOkdbFts)return okdbFts;hasRequiredOkdbFts=0x1;const _0x236677=require$$1$2,_0x82633e=require$$0$7,_0x529d81=require$$0$6,{tokenize:_0x32c157}=requireTokenizer(),{INDEX_STATE:_0x1cb858,EVENTS:_0x87c72,CHANGE_ACTIONS:_0xf45fb3}=requireOkdbEnums(),{OKDBError:_0x1e058e,OKDBTypeNotRegisteredError:_0x51f8e6}=requireOkdbError();class _0x1810ee{constructor(_0x4dbfaf){const _0x37b835=_0x47ab;this[_0x37b835(0xd4f)]=_0x4dbfaf,this[_0x37b835(0x9be)]=_0x4dbfaf[_0x37b835(0x9be)]['child']({'feature':_0x37b835(0xfca)}),this[_0x37b835(0x553)]=new Map(),this['_pendingOps']=[],this[_0x37b835(0x97a)]=new Map();}['_trackPending'](_0x4f1e40){const _0x1d1014=_0x47ab,_0x18be03=_0x4f1e40[_0x1d1014(0x39e)](()=>{const _0x5a3a76=_0x1d1014,_0x1a8fae=this['_pendingOps'][_0x5a3a76(0x10b8)](_0x18be03);if(_0x1a8fae!==-0x1)this['_pendingOps'][_0x5a3a76(0x8ad)](_0x1a8fae,0x1);});return this[_0x1d1014(0x2b9)][_0x1d1014(0x597)](_0x18be03),_0x18be03;}async['drain'](){const _0x2c5463=_0x47ab;for(const [,_0x3c537d]of this[_0x2c5463(0x97a)]){try{await _0x3c537d();}catch(_0x4b8020){}}this[_0x2c5463(0x97a)]['clear']();while(this[_0x2c5463(0x2b9)][_0x2c5463(0x156)]>0x0){await Promise[_0x2c5463(0x472)]([...this[_0x2c5463(0x2b9)]]);}for(const [,_0x121d3f]of this[_0x2c5463(0xd4f)][_0x2c5463(0xa3)]){for(const [,_0x1bb9d4]of _0x121d3f[_0x2c5463(0x1145)]??[]){if(!_0x1bb9d4[_0x2c5463(0x6ef)])continue;for(const [,_0x33941d]of _0x1bb9d4['ftsToDb']){if(!_0x33941d[_0x2c5463(0xc9)]||_0x33941d[_0x2c5463(0x361)])continue;_0x33941d[_0x2c5463(0x361)]=!![];try{await _0x33941d[_0x2c5463(0xc9)]['close']();}catch(_0x4e34b5){}}}}}[_0x24a2b3(0x51a)](_0x41b338){const _0xe56957=_0x24a2b3;if(typeof _0x41b338!==_0xe56957(0xf7a)||!_0x41b338[_0xe56957(0xf4d)]())throw new _0x1e058e(_0xe56957(0x101a),_0xe56957(0x5d2));return _0x41b338['trim']();}['_normalizeConfig'](_0x1895fb){const _0x543569=_0x24a2b3,_0x423558=_0x1895fb&&typeof _0x1895fb==='object'?Object[_0x543569(0x299)]({},_0x1895fb):{};if(!Array['isArray'](_0x423558['fields'])||_0x423558[_0x543569(0x461)][_0x543569(0x156)]===0x0)throw new _0x1e058e(_0x543569(0x939),_0x543569(0x5d2));_0x423558['fields']=_0x423558[_0x543569(0x461)][_0x543569(0x1166)](String);if(!_0x423558['tokenizer'])_0x423558[_0x543569(0xb75)]={'minTokenLength':0x2,'maxTokenLength':0x40,'keepNumbers':!![],'toLower':!![]};return _0x423558;}[_0x24a2b3(0xabd)](_0x2779fc){const _0x5978db=_0x24a2b3;return _0x2779fc??this[_0x5978db(0xd4f)][_0x5978db(0x30b)](_0x5978db(0x8d0));}[_0x24a2b3(0x842)](_0x539fea,_0x5ea703){const _0x2a95fb=_0x24a2b3,_0x19526d=this['_envOrDefault'](_0x5ea703),_0x2d30a5=_0x19526d['typeSubDbs']?.[_0x2a95fb(0xbeb)](_0x539fea);if(_0x2d30a5)return _0x2d30a5;throw new _0x51f8e6(_0x539fea);}[_0x24a2b3(0x5bc)](_0x5be5ea,_0x5b31fd){const _0x1d4831=_0x24a2b3;return this[_0x1d4831(0xabd)](_0x5b31fd)?.['typeSubDbs']?.[_0x1d4831(0xbeb)](_0x5be5ea)??null;}[_0x24a2b3(0x9c9)](_0x45ec92,_0x2ac431){const _0x3ea200=_0x24a2b3;return this[_0x3ea200(0xabd)](_0x2ac431)[_0x3ea200(0xce1)][_0x3ea200(0xbeb)](_0x45ec92)||{};}[_0x24a2b3(0x429)](_0x1cd1d8,_0x63e119,_0x23cc2a){const _0x4b2e47=_0x24a2b3;this[_0x4b2e47(0xabd)](_0x23cc2a)[_0x4b2e47(0xce1)][_0x4b2e47(0x92c)](_0x1cd1d8,_0x63e119);}[_0x24a2b3(0x858)](_0x3379ba,_0x4cb8ad,_0x99e89d){const _0x491021=_0x24a2b3,_0x13cc0c=_0x50649d=>_0x50649d[_0x491021(0x8d8)](/[:/\\?*"<>|]/g,'_'),_0x1dd920=this['_envOrDefault'](_0x99e89d)[_0x491021(0x1173)]??_0x491021(0x8d0),_0x235726=_0x236677[_0x491021(0x3d9)](this[_0x491021(0xd4f)]['path'],'~fts',_0x13cc0c(_0x1dd920),_0x13cc0c(_0x3379ba),_0x13cc0c(_0x4cb8ad));_0x82633e['mkdirSync'](_0x235726,{'recursive':!![]});const _0x4a457a=_0x529d81[_0x491021(0x717)](_0x235726,{'maxDbs':0x4,'pageSize':0x1000,'compression':![]}),_0x26a115=_0x4a457a[_0x491021(0x730)](_0x491021(0x72c),{'dupSort':!![],'keyEncoding':_0x491021(0x24a),'valueEncoding':_0x491021(0x24a)}),_0x3d2e86=_0x4a457a[_0x491021(0x730)](_0x491021(0x5dd),{'dupSort':![]});return{'ftsDb':_0x4a457a,'post':_0x26a115,'docs':_0x3d2e86};}[_0x24a2b3(0x37c)](_0x13d582,_0x11b7c4,_0x50bd41){const _0x3607e0=_0x24a2b3,_0x284b4b=this[_0x3607e0(0xabd)](_0x50bd41),_0x55baba=this[_0x3607e0(0x9c9)](_0x11b7c4,_0x284b4b),_0x3ba4b2=_0x55baba[_0x3607e0(0xf1c)]||{};_0x13d582[_0x3607e0(0x6ef)]=new Map();for(const [_0x10d6f9,_0x4748be]of Object[_0x3607e0(0x1129)](_0x3ba4b2)){const _0x504a0e=_0x4748be[_0x3607e0(0x142)]||{},_0x31a6d5=this[_0x3607e0(0x858)](_0x11b7c4,_0x10d6f9,_0x284b4b);_0x13d582[_0x3607e0(0x6ef)][_0x3607e0(0x211)](_0x10d6f9,Object[_0x3607e0(0x299)]({'name':_0x10d6f9,'config':_0x504a0e},_0x31a6d5));}if(_0x13d582[_0x3607e0(0x6ef)][_0x3607e0(0xfb)]>0x0)this[_0x3607e0(0xdf8)](_0x11b7c4,_0x284b4b);}[_0x24a2b3(0x11c0)](_0x40333c,_0x291087,_0x53447a){const _0x34b101=_0x24a2b3;if(!_0x291087[_0x34b101(0x6ef)])this[_0x34b101(0x37c)](_0x291087,_0x40333c,_0x53447a);}['_ensureFtsProcessor'](_0x579ea0,_0x2ac54e){const _0x1dee00=_0x24a2b3,_0x2c6b69=this[_0x1dee00(0xabd)](_0x2ac54e),_0x599df4=_0x2c6b69[_0x1dee00(0x1173)]+':'+_0x579ea0;if(this[_0x1dee00(0x97a)][_0x1dee00(0x9d0)](_0x599df4))return;const _0x433fbf=this,_0x23112f=_0x2c6b69[_0x1dee00(0xf39)][_0x1dee00(0x2a4)](_0x579ea0,{'mode':'inline','originMode':_0x1dee00(0xf09),'name':_0x1dee00(0xdc3)+_0x579ea0,'handler'(_0x5c9ac9){const _0x42d695=_0x1dee00;for(const _0x1ddd53 of _0x5c9ac9){const _0x2f640b=_0x433fbf[_0x42d695(0x5bc)](_0x1ddd53[_0x42d695(0xaee)],_0x2c6b69);if(!_0x2f640b||!_0x2f640b['ftsToDb']||_0x2f640b[_0x42d695(0x6ef)][_0x42d695(0xfb)]===0x0)continue;const _0xaecafc=_0x1ddd53[_0x42d695(0x942)]===_0xf45fb3[_0x42d695(0x719)]?_0x1ddd53[_0x42d695(0xac)]:undefined,_0x42397a=_0x1ddd53[_0x42d695(0x1f7)];for(const _0xf175e0 of _0x2f640b[_0x42d695(0x6ef)][_0x42d695(0x231)]()){if(_0xf175e0[_0x42d695(0x361)])continue;_0x433fbf[_0x42d695(0x658)](_0xf175e0,_0x1ddd53[_0x42d695(0x9dd)],_0xaecafc,_0x42397a);}}}});this[_0x1dee00(0x97a)][_0x1dee00(0x211)](_0x599df4,_0x23112f);}['_stopFtsProcessor'](_0x35550d,_0x4e59a5){const _0x45ec84=_0x24a2b3,_0x2abfdb=this[_0x45ec84(0xabd)](_0x4e59a5),_0x4dc1ae=_0x2abfdb[_0x45ec84(0x1173)]+':'+_0x35550d,_0x49abd6=this[_0x45ec84(0x97a)]['get'](_0x4dc1ae);_0x49abd6&&(_0x49abd6(),this['_processorStops']['delete'](_0x4dc1ae));}[_0x24a2b3(0x208)](_0x433564,_0x292aad){const _0x17d19b=_0x24a2b3;this[_0x17d19b(0xeac)](_0x433564,_0x292aad);const _0x3f7b5a=this[_0x17d19b(0x5bc)](_0x433564,_0x292aad);if(!_0x3f7b5a||!_0x3f7b5a['ftsToDb'])return;for(const [,_0x3b8738]of _0x3f7b5a[_0x17d19b(0x6ef)]){try{if(_0x3b8738[_0x17d19b(0x72c)]&&_0x3b8738[_0x17d19b(0x72c)]['drop'])_0x3b8738[_0x17d19b(0x72c)]['drop']();}catch(_0x5a51a5){}try{if(_0x3b8738[_0x17d19b(0x5dd)]&&_0x3b8738[_0x17d19b(0x5dd)][_0x17d19b(0xca4)])_0x3b8738['docs'][_0x17d19b(0xca4)]();}catch(_0xaf9eac){}if(_0x3b8738[_0x17d19b(0xc9)]&&!_0x3b8738[_0x17d19b(0x361)]){_0x3b8738['_ftsDbClosed']=!![];try{_0x3b8738[_0x17d19b(0xc9)]['close']();}catch(_0x4abf92){}}}_0x3f7b5a[_0x17d19b(0x6ef)]=null;}['_syncApplyFtsRegister'](_0x3033b0,_0x71ceb2,_0x4aa938,_0x500077,_0x53c31c){const _0x2f747e=_0x24a2b3;let _0x4a62b9;try{_0x4a62b9=this['_normalizeConfig'](_0x4aa938);}catch{return;}const _0x41f2dc=this['_envOrDefault'](_0x53c31c),_0x2fa7c2=this[_0x2f747e(0x5bc)](_0x3033b0,_0x41f2dc);if(!_0x2fa7c2)return;this[_0x2f747e(0x11c0)](_0x3033b0,_0x2fa7c2,_0x41f2dc);if(_0x2fa7c2[_0x2f747e(0x6ef)][_0x2f747e(0x9d0)](_0x71ceb2))return;const _0x8efe3b=this[_0x2f747e(0x858)](_0x3033b0,_0x71ceb2,_0x41f2dc);_0x2fa7c2['ftsToDb'][_0x2f747e(0x211)](_0x71ceb2,Object['assign']({'name':_0x71ceb2,'config':_0x4a62b9},_0x8efe3b)),this[_0x2f747e(0xdf8)](_0x3033b0,_0x41f2dc);const _0x51d2d7=this[_0x2f747e(0x9c9)](_0x3033b0,_0x41f2dc),_0x456801=Object['assign']({},_0x51d2d7[_0x2f747e(0xf1c)]||{});_0x456801[_0x71ceb2]={'status':_0x1cb858['CREATING'],'config':_0x4a62b9,'created':_0x500077,'updated':_0x500077},this['_writeTypeMeta'](_0x3033b0,Object[_0x2f747e(0x299)]({},_0x51d2d7,{'ftsIndexes':_0x456801}),_0x41f2dc),_0x41f2dc['db']['committed'][_0x2f747e(0x7db)](async()=>{const _0x55148e=_0x2f747e;if(!_0x41f2dc[_0x55148e(0xe56)]||this[_0x55148e(0xd4f)][_0x55148e(0x10e2)]!==_0x55148e(0x3c4))return;try{await this[_0x55148e(0xe97)](_0x3033b0,_0x71ceb2,![],_0x41f2dc);}catch(_0x4dcce1){try{this['log'][_0x55148e(0x225)](_0x55148e(0x245),{'err':_0x4dcce1['message']});}catch(_0x37603a){}}});}[_0x24a2b3(0x448)](_0x488414,_0xfeee9e,_0x559e48){const _0x14910b=_0x24a2b3,_0x42872e=this[_0x14910b(0xabd)](_0x559e48),_0x51328b=this[_0x14910b(0x5bc)](_0x488414,_0x42872e);if(!_0x51328b)return;this[_0x14910b(0x11c0)](_0x488414,_0x51328b,_0x42872e);const _0x4d2d46=_0x51328b['ftsToDb']['get'](_0xfeee9e);if(!_0x4d2d46)return;const _0x294118=this[_0x14910b(0x9c9)](_0x488414,_0x42872e),_0x4c426d=Object[_0x14910b(0x299)]({},_0x294118[_0x14910b(0xf1c)]||{});delete _0x4c426d[_0xfeee9e],this['_writeTypeMeta'](_0x488414,Object[_0x14910b(0x299)]({},_0x294118,{'ftsIndexes':_0x4c426d}),_0x42872e),_0x42872e['db'][_0x14910b(0x1cd)][_0x14910b(0x7db)](async()=>{const _0x585a3e=_0x14910b;try{if(_0x4d2d46[_0x585a3e(0x72c)]&&_0x4d2d46[_0x585a3e(0x72c)][_0x585a3e(0xca4)])_0x4d2d46[_0x585a3e(0x72c)]['drop']();}catch(_0x2e50b7){}try{if(_0x4d2d46[_0x585a3e(0x5dd)]&&_0x4d2d46[_0x585a3e(0x5dd)][_0x585a3e(0xca4)])_0x4d2d46[_0x585a3e(0x5dd)][_0x585a3e(0xca4)]();}catch(_0x239b13){}if(_0x4d2d46[_0x585a3e(0xc9)]&&!_0x4d2d46['_ftsDbClosed']){_0x4d2d46['_ftsDbClosed']=!![];try{await _0x4d2d46[_0x585a3e(0xc9)]['close']();}catch(_0x4c85e3){}}_0x51328b[_0x585a3e(0x6ef)][_0x585a3e(0x3b3)](_0xfeee9e);if(_0x51328b[_0x585a3e(0x6ef)]['size']===0x0)this[_0x585a3e(0xeac)](_0x488414,_0x42872e);});}[_0x24a2b3(0x74e)](_0x2fc7a0,_0x2a515c,_0x581324){const _0x45a51e=_0x24a2b3,_0x464ed5=this[_0x45a51e(0xabd)](_0x581324)[_0x45a51e(0x1173)]+':'+_0x2fc7a0+'@'+_0x2a515c,_0x88fe25=this[_0x45a51e(0x553)]['get'](_0x464ed5);_0x88fe25&&(_0x88fe25[_0x45a51e(0x797)](!![]),this[_0x45a51e(0x553)][_0x45a51e(0x3b3)](_0x464ed5));}[_0x24a2b3(0x9d0)](_0x2efcea,_0x56e068,_0xa40d19){const _0x464a6f=_0x24a2b3;this[_0x464a6f(0xd4f)][_0x464a6f(0xf13)](),_0x56e068=this[_0x464a6f(0x51a)](_0x56e068);const _0x47414f=this['_readTypeMeta'](_0x2efcea,_0xa40d19);return!!(_0x47414f[_0x464a6f(0xf1c)]&&_0x56e068 in _0x47414f[_0x464a6f(0xf1c)]);}[_0x24a2b3(0xfcd)](_0x92655e,_0x4ffd23,_0x5ce94a){const _0x38c78a=_0x24a2b3;this[_0x38c78a(0xd4f)]['_assertOpen'](),_0x4ffd23=this['_normalizeName'](_0x4ffd23);const _0x7ed958=this[_0x38c78a(0x9c9)](_0x92655e,_0x5ce94a)[_0x38c78a(0xf1c)];return _0x7ed958&&_0x7ed958[_0x4ffd23]?_0x7ed958[_0x4ffd23]['status']||null:null;}[_0x24a2b3(0x63e)](_0x3389d2,_0x350f2f){const _0x1206b1=_0x24a2b3;this['okdb']['_assertOpen']();const _0x2f2935=this[_0x1206b1(0x9c9)](_0x3389d2,_0x350f2f)[_0x1206b1(0xf1c)]||{},_0x4231f2=this[_0x1206b1(0x5bc)](_0x3389d2,_0x350f2f);return Object[_0x1206b1(0x1129)](_0x2f2935)['map'](([_0x4ce33a,_0xcda5b8])=>{const _0x32167f=_0x1206b1,_0x5227d6=_0x4231f2?.['ftsToDb']?.[_0x32167f(0xbeb)](_0x4ce33a),_0x20f045=_0x5227d6?.[_0x32167f(0xc9)]?.['env']?.[_0x32167f(0x26c)]?.(),_0x4aef13=0x1000,_0x25e8ea=_0x20f045?(_0x20f045[_0x32167f(0x1228)]??0x0)*_0x4aef13:null;return{'name':_0x4ce33a,'status':_0xcda5b8[_0x32167f(0xfcd)]||null,'config':_0xcda5b8['config']||null,'created':_0xcda5b8['created']||null,'updated':_0xcda5b8[_0x32167f(0x965)]||null,'sizeBytes':_0x25e8ea};});}async[_0x24a2b3(0x8f0)](_0x99fb2e,_0x2f8db4,_0x4f949b){const _0x1b1aeb=_0x24a2b3;this['okdb'][_0x1b1aeb(0xf13)](),_0x2f8db4=this[_0x1b1aeb(0x51a)](_0x2f8db4);const _0x41ac69=this['_envOrDefault'](_0x4f949b),_0x159d83=_0x41ac69['name']+':'+_0x99fb2e+'@'+_0x2f8db4;if(this[_0x1b1aeb(0x553)]['has'](_0x159d83))return this[_0x1b1aeb(0x553)][_0x1b1aeb(0xbeb)](_0x159d83)[_0x1b1aeb(0xbfa)];if(this['status'](_0x99fb2e,_0x2f8db4,_0x41ac69)===_0x1cb858[_0x1b1aeb(0x1b5)])return!![];const _0x4e4ea9={};return _0x4e4ea9[_0x1b1aeb(0xbfa)]=new Promise(function(_0x253f4b){const _0x69c7a8=_0x1b1aeb;_0x4e4ea9[_0x69c7a8(0x797)]=_0x253f4b;}),this[_0x1b1aeb(0x553)]['set'](_0x159d83,_0x4e4ea9),_0x4e4ea9[_0x1b1aeb(0xbfa)];}async[_0x24a2b3(0x2a4)](_0x407630,_0x9bfee0,_0x2dd818,_0x48851c,_0x26e053){const _0x4edb68=_0x24a2b3;this[_0x4edb68(0xd4f)]?.[_0x4edb68(0x3a3)]?.[_0x4edb68(0xa15)](_0x4edb68(0xfca));if(_0x48851c===undefined)_0x48851c=Date['now']();this[_0x4edb68(0xd4f)][_0x4edb68(0xf13)](),_0x9bfee0=this[_0x4edb68(0x51a)](_0x9bfee0);const _0x2d7794=this[_0x4edb68(0x5ed)](_0x2dd818),_0x58af27=this[_0x4edb68(0xabd)](_0x26e053),_0x35b6cc=this[_0x4edb68(0x842)](_0x407630,_0x58af27);this[_0x4edb68(0x11c0)](_0x407630,_0x35b6cc,_0x58af27);if(_0x35b6cc[_0x4edb68(0x6ef)][_0x4edb68(0x9d0)](_0x9bfee0))throw new _0x1e058e(_0x4edb68(0x789)+_0x407630+'@'+_0x9bfee0,'ALREADY_EXISTS');const _0x405676=this['_openFtsEnv'](_0x407630,_0x9bfee0,_0x58af27);_0x35b6cc[_0x4edb68(0x6ef)][_0x4edb68(0x211)](_0x9bfee0,Object[_0x4edb68(0x299)]({'name':_0x9bfee0,'config':_0x2d7794},_0x405676)),this[_0x4edb68(0xdf8)](_0x407630,_0x58af27),await _0x58af27['db'][_0x4edb68(0x683)](()=>{const _0x58755a=_0x4edb68,_0x2fca93=this['_readTypeMeta'](_0x407630,_0x58af27),_0x4b565a=Object['assign']({},_0x2fca93[_0x58755a(0xf1c)]||{});_0x4b565a[_0x9bfee0]={'status':_0x1cb858[_0x58755a(0x179)],'config':_0x2d7794,'created':_0x48851c,'updated':_0x48851c},this[_0x58755a(0x429)](_0x407630,Object[_0x58755a(0x299)]({},_0x2fca93,{'ftsIndexes':_0x4b565a}),_0x58af27),_0x58af27[_0x58755a(0xee9)]({'id':_0x58755a(0xdc3)+_0x407630+'@'+_0x9bfee0,'type':_0x407630,'fts':_0x9bfee0,'config':_0x2d7794,'action':_0xf45fb3[_0x58755a(0xe13)],'timestamp':_0x48851c});}),this['_trackPending'](_0x58af27[_0x4edb68(0xce1)][_0x4edb68(0x1cd)][_0x4edb68(0x7db)](async()=>{const _0x23769c=_0x4edb68;if(!_0x58af27[_0x23769c(0xe56)]||this[_0x23769c(0xd4f)][_0x23769c(0x10e2)]!==_0x23769c(0x3c4))return;try{await this[_0x23769c(0xe97)](_0x407630,_0x9bfee0,![],_0x58af27);}catch(_0x2c882f){try{this['log'][_0x23769c(0x225)](_0x23769c(0xfb6),{'err':_0x2c882f[_0x23769c(0xb4e)]});}catch(_0x12fb3e){}}}));}async[_0x24a2b3(0xca4)](_0x134810,_0x5a0f06,_0x315495){const _0x366e0f=_0x24a2b3;this['okdb'][_0x366e0f(0xf13)](),_0x5a0f06=this[_0x366e0f(0x51a)](_0x5a0f06);const _0x485165=this['_envOrDefault'](_0x315495),_0x16024e=this['_getTypeMap'](_0x134810,_0x485165);this[_0x366e0f(0x11c0)](_0x134810,_0x16024e,_0x485165);const _0x246d95=_0x16024e[_0x366e0f(0x6ef)][_0x366e0f(0xbeb)](_0x5a0f06);if(!_0x246d95)return;await _0x485165['db'][_0x366e0f(0x683)](()=>{const _0xc9f985=_0x366e0f,_0x2bd926=this[_0xc9f985(0x9c9)](_0x134810,_0x485165),_0x2d35cb=Object[_0xc9f985(0x299)]({},_0x2bd926['ftsIndexes']||{});delete _0x2d35cb[_0x5a0f06],this[_0xc9f985(0x429)](_0x134810,Object[_0xc9f985(0x299)]({},_0x2bd926,{'ftsIndexes':_0x2d35cb}),_0x485165),_0x485165[_0xc9f985(0xee9)]({'id':_0xc9f985(0xdc3)+_0x134810+'@'+_0x5a0f06,'type':_0x134810,'fts':_0x5a0f06,'action':_0xf45fb3[_0xc9f985(0xcde)],'timestamp':Date[_0xc9f985(0x555)]()});}),this[_0x366e0f(0x1f9)](_0x485165['db'][_0x366e0f(0x1cd)]['then'](async()=>{const _0x200415=_0x366e0f;try{if(_0x246d95[_0x200415(0x72c)]&&_0x246d95[_0x200415(0x72c)]['drop'])_0x246d95['post'][_0x200415(0xca4)]();}catch(_0x1266d0){}try{if(_0x246d95[_0x200415(0x5dd)]&&_0x246d95[_0x200415(0x5dd)]['drop'])_0x246d95['docs'][_0x200415(0xca4)]();}catch(_0x5045f5){}if(_0x246d95[_0x200415(0xc9)]&&!_0x246d95[_0x200415(0x361)]){_0x246d95[_0x200415(0x361)]=!![];try{await _0x246d95[_0x200415(0xc9)][_0x200415(0x11ac)]();}catch(_0x2bc75f){}}_0x16024e[_0x200415(0x6ef)][_0x200415(0x3b3)](_0x5a0f06);if(_0x16024e[_0x200415(0x6ef)]['size']===0x0)this['_stopFtsProcessor'](_0x134810,_0x485165);}));}async['ensure'](_0x44c043,_0xb0bf48,_0xad37c3,_0x3e8295){const _0x45ab21=_0x24a2b3;this[_0x45ab21(0xd4f)][_0x45ab21(0xf13)](),_0xb0bf48=this[_0x45ab21(0x51a)](_0xb0bf48);if(!this['has'](_0x44c043,_0xb0bf48,_0x3e8295))await this[_0x45ab21(0x2a4)](_0x44c043,_0xb0bf48,_0xad37c3,undefined,_0x3e8295);}async['reset'](_0x37c127,_0x5e0916,_0xf649cc,_0x499131){const _0x147e17=_0x24a2b3;if(_0xf649cc===undefined)_0xf649cc=!![];this[_0x147e17(0xd4f)][_0x147e17(0xf13)](),_0x5e0916=this['_normalizeName'](_0x5e0916);const _0x356cff=this[_0x147e17(0xabd)](_0x499131),_0x33dd2e=this[_0x147e17(0x842)](_0x37c127,_0x356cff);this[_0x147e17(0x11c0)](_0x37c127,_0x33dd2e,_0x356cff);const _0xaa890c=_0x33dd2e['ftsToDb'][_0x147e17(0xbeb)](_0x5e0916);if(!_0xaa890c)throw new _0x1e058e(_0x147e17(0x1085)+_0x37c127+'@'+_0x5e0916,_0x147e17(0xb7f));if(_0xaa890c[_0x147e17(0x361)])return;const _0x56fb7d=_0x356cff[_0x147e17(0x7df)](_0x37c127);await _0x356cff['db'][_0x147e17(0x683)](()=>{const _0x306eb9=_0x147e17;if(_0xf649cc){try{_0xaa890c['post']['clearSync']();}catch(_0x525ae7){try{_0xaa890c[_0x306eb9(0x72c)]['drop']();}catch(_0x40ab23){}}try{_0xaa890c[_0x306eb9(0x5dd)]['clearSync']();}catch(_0x11e689){try{_0xaa890c[_0x306eb9(0x5dd)][_0x306eb9(0xca4)]();}catch(_0x1f648a){}}}const _0x31902b=this['_readTypeMeta'](_0x37c127,_0x356cff),_0x44274a=Object[_0x306eb9(0x299)]({},_0x31902b['ftsIndexes']||{});_0x44274a[_0x5e0916]=Object[_0x306eb9(0x299)]({},_0x44274a[_0x5e0916]||{},{'status':_0x1cb858['RESETTING'],'updated':Date[_0x306eb9(0x555)]()}),this[_0x306eb9(0x429)](_0x37c127,Object['assign']({},_0x31902b,{'ftsIndexes':_0x44274a}),_0x356cff);}),this[_0x147e17(0xd4f)][_0x147e17(0xea8)]['emit'](_0x87c72[_0x147e17(0xbdc)],{'type':_0x37c127,'index':[_0x147e17(0xfca),_0x5e0916]});const _0x23449f=_0x33dd2e[_0x147e17(0xc88)][_0x147e17(0x9ce)]({'snapshot':!![]}),_0x2fe557=0x1388;let _0x404717=0x0,_0x3cdd54=[];for(const {key:_0x29751b,value:_0x60be63}of _0x23449f){_0x3cdd54['push']({'key':_0x29751b,'value':_0x60be63}),_0x3cdd54[_0x147e17(0x156)]>=_0x2fe557&&(await this[_0x147e17(0x546)](_0x37c127,_0xaa890c,_0x3cdd54),_0x404717+=_0x3cdd54['length'],this[_0x147e17(0xd4f)][_0x147e17(0xea8)]['emit'](_0x87c72[_0x147e17(0xb40)],_0x37c127,[_0x147e17(0xfca),_0x5e0916],_0x404717,_0x56fb7d),_0x3cdd54=[]);}if(_0x3cdd54[_0x147e17(0x156)])await this[_0x147e17(0x546)](_0x37c127,_0xaa890c,_0x3cdd54);await _0x356cff['db'][_0x147e17(0x683)](()=>{const _0x155eaf=_0x147e17,_0xb0b2e0=this['_readTypeMeta'](_0x37c127,_0x356cff),_0x3a9186=Object[_0x155eaf(0x299)]({},_0xb0b2e0['ftsIndexes']||{});_0x3a9186[_0x5e0916]=Object[_0x155eaf(0x299)]({},_0x3a9186[_0x5e0916]||{},{'status':_0x1cb858[_0x155eaf(0x1b5)],'updated':Date[_0x155eaf(0x555)]()}),this[_0x155eaf(0x429)](_0x37c127,Object[_0x155eaf(0x299)]({},_0xb0b2e0,{'ftsIndexes':_0x3a9186}),_0x356cff),_0x356cff[_0x155eaf(0xee9)]({'id':'fts:'+_0x37c127+'@'+_0x5e0916+_0x155eaf(0xdde),'type':_0x37c127,'fts':_0x5e0916,'action':_0xf45fb3[_0x155eaf(0x14a)],'timestamp':Date[_0x155eaf(0x555)]()});}),this['_resolveReady'](_0x37c127,_0x5e0916,_0x356cff),this[_0x147e17(0xd4f)]['events']['emit'](_0x87c72[_0x147e17(0x11b3)],{'type':_0x37c127,'index':[_0x147e17(0xfca),_0x5e0916]});}[_0x24a2b3(0x52d)](_0x2de318,_0xf04bbb,_0x172cbd,_0x4e9952,_0x19c131){const _0x7b444a=_0x24a2b3;let _0x134b2e;try{_0x134b2e=this[_0x7b444a(0x842)](_0x2de318,_0x19c131);}catch{return;}if(!_0x134b2e[_0x7b444a(0x6ef)]||_0x134b2e[_0x7b444a(0x6ef)][_0x7b444a(0xfb)]===0x0)return;for(const _0x32eef1 of _0x134b2e[_0x7b444a(0x6ef)][_0x7b444a(0x231)]())this[_0x7b444a(0x658)](_0x32eef1,_0xf04bbb,_0x172cbd,_0x4e9952);}async['_batchIndexDocs'](_0x328afa,_0x224094,_0x23112a){const _0x29a54d=_0x24a2b3;if(!_0x224094[_0x29a54d(0xc9)]||_0x224094[_0x29a54d(0x361)])return;await _0x224094[_0x29a54d(0xc9)][_0x29a54d(0x683)](()=>{const _0x298edb=_0x29a54d;for(const {key:_0x2bdff2,value:_0x3ae911}of _0x23112a)this[_0x298edb(0x658)](_0x224094,_0x2bdff2,_0x3ae911,undefined);});}['_getField'](_0x12a0fc,_0x353eea){const _0x18c5b9=_0x24a2b3;if(_0x12a0fc==null)return null;let _0x36852a=_0x12a0fc;for(const _0xe20d64 of String(_0x353eea)[_0x18c5b9(0xfb1)]('.')){if(_0x36852a==null||typeof _0x36852a!==_0x18c5b9(0xb36)||!(_0xe20d64 in _0x36852a))return null;_0x36852a=_0x36852a[_0xe20d64];}return _0x36852a!=null?_0x36852a:null;}[_0x24a2b3(0x5bb)](_0x24766e,_0x560a64){const _0x2688b4=_0x24a2b3,_0x275745=[];for(const _0x1e9c4e of _0x24766e[_0x2688b4(0x461)]){if(_0x1e9c4e==='*'){this[_0x2688b4(0xc26)](_0x560a64,_0x275745);continue;}const _0x18d917=this[_0x2688b4(0x54f)](_0x560a64,_0x1e9c4e);if(_0x18d917==null)continue;const _0x187940=typeof _0x18d917;if(_0x187940===_0x2688b4(0xf7a)||_0x187940===_0x2688b4(0x9f0)||_0x187940==='boolean'||_0x187940===_0x2688b4(0x438))_0x275745['push'](String(_0x18d917));else{if(Array[_0x2688b4(0x10f5)](_0x18d917))for(const _0xeab13f of _0x18d917){if(_0xeab13f==null)continue;const _0x31fc6a=typeof _0xeab13f;if(_0x31fc6a===_0x2688b4(0xf7a)||_0x31fc6a===_0x2688b4(0x9f0)||_0x31fc6a===_0x2688b4(0x854)||_0x31fc6a===_0x2688b4(0x438))_0x275745[_0x2688b4(0x597)](String(_0xeab13f));}}}return _0x275745[_0x2688b4(0x3d9)]('\x20');}[_0x24a2b3(0xc26)](_0x5989a8,_0x1d96f1){const _0x2280b3=_0x24a2b3;if(_0x5989a8==null)return;const _0x1d3b49=typeof _0x5989a8;if(_0x1d3b49==='string'||_0x1d3b49===_0x2280b3(0x9f0)||_0x1d3b49==='boolean'||_0x1d3b49===_0x2280b3(0x438))_0x1d96f1['push'](String(_0x5989a8));else{if(Array[_0x2280b3(0x10f5)](_0x5989a8)){for(const _0x59e810 of _0x5989a8)this[_0x2280b3(0xc26)](_0x59e810,_0x1d96f1);}else{if(_0x1d3b49===_0x2280b3(0xb36)){for(const _0x23b87d of Object[_0x2280b3(0x231)](_0x5989a8))this[_0x2280b3(0xc26)](_0x23b87d,_0x1d96f1);}}}}[_0x24a2b3(0x363)](_0x5423ac){const _0x38c465=_0x24a2b3;return _0x5423ac[_0x38c465(0x156)]?[...new Set(_0x5423ac)]:[];}[_0x24a2b3(0x658)](_0x5da3f3,_0x2cc2f2,_0x219685,_0x478cdd){const _0x132c8b=_0x24a2b3;if(typeof _0x2cc2f2!==_0x132c8b(0xf7a))return;const _0x38588b=_0x5da3f3[_0x132c8b(0x142)]||{},_0x8430d1=_0x38588b[_0x132c8b(0xb75)]||{};let _0x1994c9=null;if(_0x478cdd){try{_0x1994c9=_0x5da3f3['docs']['get'](_0x2cc2f2);}catch(_0x5d6c22){_0x1994c9=null;}if(!Array[_0x132c8b(0x10f5)](_0x1994c9))_0x1994c9=this[_0x132c8b(0x363)](_0x32c157(this[_0x132c8b(0x5bb)](_0x38588b,_0x478cdd),_0x8430d1));}let _0x4cc35e=null;if(_0x219685)_0x4cc35e=this['_uniqueTokens'](_0x32c157(this[_0x132c8b(0x5bb)](_0x38588b,_0x219685),_0x8430d1));if(Array[_0x132c8b(0x10f5)](_0x1994c9)&&Array[_0x132c8b(0x10f5)](_0x4cc35e)&&_0x1994c9[_0x132c8b(0x156)]===_0x4cc35e[_0x132c8b(0x156)]){const _0x3998b3=new Set(_0x1994c9);let _0x11864b=!![];for(const _0x2f686f of _0x4cc35e)if(!_0x3998b3[_0x132c8b(0x9d0)](_0x2f686f)){_0x11864b=![];break;}if(_0x11864b)return;}if(Array[_0x132c8b(0x10f5)](_0x1994c9)){for(const _0x294b88 of _0x1994c9)try{_0x5da3f3[_0x132c8b(0x72c)]['removeSync'](_0x294b88,_0x2cc2f2);}catch(_0x5259fe){}try{_0x5da3f3[_0x132c8b(0x5dd)]['removeSync'](_0x2cc2f2);}catch(_0x1d3ed5){}}if(Array[_0x132c8b(0x10f5)](_0x4cc35e)){for(const _0x19728a of _0x4cc35e)_0x5da3f3['post']['putSync'](_0x19728a,_0x2cc2f2);_0x5da3f3[_0x132c8b(0x5dd)]['putSync'](_0x2cc2f2,_0x4cc35e);}}[_0x24a2b3(0xaf6)](_0x1f0157,_0x2ce840,_0xcabb2a,_0x5666a5,_0x19d9d6){const _0x3ceb52=_0x24a2b3;if(!_0x5666a5)_0x5666a5={};this[_0x3ceb52(0xd4f)][_0x3ceb52(0xf13)](),_0x2ce840=this[_0x3ceb52(0x51a)](_0x2ce840);const _0x11b503=this[_0x3ceb52(0xabd)](_0x19d9d6),_0x23d59b=this[_0x3ceb52(0x842)](_0x1f0157,_0x11b503);this[_0x3ceb52(0x11c0)](_0x1f0157,_0x23d59b,_0x11b503);const _0x4f52e5=_0x23d59b[_0x3ceb52(0x6ef)][_0x3ceb52(0xbeb)](_0x2ce840);if(!_0x4f52e5)throw new _0x1e058e('FTS\x20index\x20not\x20found:\x20'+_0x1f0157+'@'+_0x2ce840,_0x3ceb52(0xb7f));const _0x507b2a=_0x4f52e5[_0x3ceb52(0x142)]||{},_0x49e75e=this[_0x3ceb52(0x363)](_0x32c157(String(_0xcabb2a||''),_0x507b2a[_0x3ceb52(0xb75)]||{})),_0x3c9136=Number[_0x3ceb52(0x474)](_0x5666a5[_0x3ceb52(0xbae)])?Math[_0x3ceb52(0x10bf)](0x1,_0x5666a5[_0x3ceb52(0xbae)]):0x32,_0x32a441=_0x5666a5[_0x3ceb52(0x259)]==='or'?'or':_0x3ceb52(0x10d3),_0x1505eb=!!_0x5666a5[_0x3ceb52(0x1ae)],_0x55bd0e=_0x49e75e[_0x3ceb52(0x156)],_0x4586e=_0x55bd0e*0x2;if(_0x55bd0e===0x0)return{'keys':[],'scores':new Map(),'numTerms':0x0,'maxScore':0x0};const _0x3d356a=_0x275522=>{const _0x15403a=_0x3ceb52;if(!_0x1505eb)return[..._0x4f52e5[_0x15403a(0x72c)]['getValues'](_0x275522)]['map'](function(_0x54f75c){return{'docKey':_0x54f75c,'weight':0x2};});const _0x20550f=[];for(const {key:_0xbea42b,value:_0x515f97}of _0x4f52e5[_0x15403a(0x72c)][_0x15403a(0x9ce)]({'start':_0x275522})){if(typeof _0xbea42b==='string'?!_0xbea42b[_0x15403a(0x8ba)](_0x275522):!![])break;_0x20550f[_0x15403a(0x597)]({'docKey':_0x515f97,'weight':_0xbea42b===_0x275522?0x2:0x1});}return _0x20550f;},_0x3728b3=_0x49e75e['map'](function(_0x1b3ae7){return{'t':_0x1b3ae7,'arr':_0x3d356a(_0x1b3ae7)};});if(_0x32a441==='or'){const _0x1a08de=new Map();for(const {arr:_0x5acbc8}of _0x3728b3)for(const {docKey:_0x34ad52,weight:_0x2c0abd}of _0x5acbc8)_0x1a08de[_0x3ceb52(0x211)](_0x34ad52,(_0x1a08de[_0x3ceb52(0xbeb)](_0x34ad52)||0x0)+_0x2c0abd);const _0x2b9dbf=[..._0x1a08de[_0x3ceb52(0x1129)]()]['sort'](function(_0x2cacd7,_0x3bb114){return _0x3bb114[0x1]-_0x2cacd7[0x1];})[_0x3ceb52(0xc3c)](0x0,_0x3c9136);return{'keys':_0x2b9dbf[_0x3ceb52(0x1166)](function([_0x20bfdc]){return _0x20bfdc;}),'scores':new Map(_0x2b9dbf),'numTerms':_0x55bd0e,'maxScore':_0x4586e};}_0x3728b3[_0x3ceb52(0x3f6)](function(_0x148e38,_0xd33e98){const _0xb618a6=_0x3ceb52;return _0x148e38[_0xb618a6(0x605)]['length']-_0xd33e98[_0xb618a6(0x605)][_0xb618a6(0x156)];});if(_0x3728b3[0x0][_0x3ceb52(0x605)]['length']===0x0)return{'keys':[],'scores':new Map(),'numTerms':_0x55bd0e,'maxScore':_0x4586e};let _0x858661=new Set(_0x3728b3[0x0][_0x3ceb52(0x605)][_0x3ceb52(0x1166)](function(_0x379639){return _0x379639['docKey'];}));for(let _0x4f5e00=0x1;_0x4f5e00<_0x3728b3[_0x3ceb52(0x156)];_0x4f5e00++){const _0xf541ea=new Set();for(const {docKey:_0x4e47af}of _0x3728b3[_0x4f5e00][_0x3ceb52(0x605)])if(_0x858661[_0x3ceb52(0x9d0)](_0x4e47af))_0xf541ea[_0x3ceb52(0x33c)](_0x4e47af);_0x858661=_0xf541ea;if(_0x858661[_0x3ceb52(0xfb)]===0x0)return{'keys':[],'scores':new Map(),'numTerms':_0x55bd0e,'maxScore':_0x4586e};}const _0x16445c=new Map();for(const {arr:_0x160932}of _0x3728b3)for(const {docKey:_0x63183,weight:_0x552539}of _0x160932)if(_0x858661[_0x3ceb52(0x9d0)](_0x63183))_0x16445c[_0x3ceb52(0x211)](_0x63183,(_0x16445c[_0x3ceb52(0xbeb)](_0x63183)||0x0)+_0x552539);const _0x34e7a5=[];for(const _0x5ac919 of _0x858661){_0x34e7a5[_0x3ceb52(0x597)](_0x5ac919);if(_0x34e7a5[_0x3ceb52(0x156)]>=_0x3c9136)break;}return{'keys':_0x34e7a5,'scores':_0x16445c,'numTerms':_0x55bd0e,'maxScore':_0x4586e};}[_0x24a2b3(0x460)](_0x5619b0,_0x5c2852,_0x4002b4,_0x59c28e,_0xfc2925){const _0x4bfb53=_0x24a2b3;return this[_0x4bfb53(0xaf6)](_0x5619b0,_0x5c2852,_0x4002b4,_0x59c28e||{},_0xfc2925)[_0x4bfb53(0xa52)];}['searchDocs'](_0x263873,_0x5e0f06,_0x59c8b8,_0x520b9c,_0x18725f){const _0x3929d1=_0x24a2b3;if(!_0x520b9c)_0x520b9c={};if(_0x520b9c[_0x3929d1(0x5f6)])return this[_0x3929d1(0x460)](_0x263873,_0x5e0f06,_0x59c8b8,_0x520b9c,_0x18725f);const {keys:_0x1ec120,scores:_0x3eaa75,numTerms:_0x39c07f,maxScore:_0x501d03}=this['_searchWithScores'](_0x263873,_0x5e0f06,_0x59c8b8,_0x520b9c,_0x18725f),_0x12fc6b=this[_0x3929d1(0xabd)](_0x18725f),_0xba4123=_0x12fc6b[_0x3929d1(0x1145)][_0x3929d1(0xbeb)](_0x263873);return _0x1ec120[_0x3929d1(0x1166)](function(_0x7e5299){const _0x4d0a8f=_0x3929d1,_0xb6496a=_0xba4123[_0x4d0a8f(0xc88)][_0x4d0a8f(0xa57)](_0x7e5299);return{'key':_0x7e5299,'value':_0xb6496a?_0xb6496a['value']:null,'version':_0xb6496a?_0xb6496a[_0x4d0a8f(0x45c)]:null,'score':_0x3eaa75[_0x4d0a8f(0xbeb)](_0x7e5299)||null,'numTerms':_0x39c07f,'maxScore':_0x501d03};});}}return okdbFts=_0x1810ee,okdbFts;}var okdbFiles,hasRequiredOkdbFiles;function requireOkdbFiles(){const _0x56c593=_0xef8cd8;if(hasRequiredOkdbFiles)return okdbFiles;hasRequiredOkdbFiles=0x1;const _0xd89003=require$$0$7,_0x10b7aa=require$$1$2,_0x71fc2a=require$$0$1,_0x481c5a=require$$3,_0x1356e0=requireOkdbFilesHttp(),_0x24ec77='~files',_0x45576b='~file:blob_status';class _0x1e0ade{constructor(_0x5a858f,_0x5ed7c5={}){const _0x1c1b2d=_0x47ab;this[_0x1c1b2d(0xd4f)]=_0x5a858f,this['_envRef']=_0x5ed7c5['_env']??null,this[_0x1c1b2d(0x11df)]=_0x5ed7c5[_0x1c1b2d(0x11df)]??![],this[_0x1c1b2d(0xc62)]=![],this[_0x1c1b2d(0x4aa)]=null;}get[_0x56c593(0x30b)](){const _0x30f805=_0x56c593;return this[_0x30f805(0x9c0)]??this[_0x30f805(0xd4f)];}get[_0x56c593(0x4df)](){const _0x4e62ca=_0x56c593;return this[_0x4e62ca(0xd4f)][_0x4e62ca(0x4df)]??_0x10b7aa['join'](this[_0x4e62ca(0xd4f)][_0x4e62ca(0x20b)],_0x4e62ca(0xd50));}get[_0x56c593(0xd11)](){const _0x28e381=_0x56c593;return this[_0x28e381(0xd4f)][_0x28e381(0xd11)]??null;}async[_0x56c593(0xa00)](){const _0x2b7d30=_0x56c593;if(this[_0x2b7d30(0xd4f)]?.[_0x2b7d30(0x3a3)]&&!this['okdb'][_0x2b7d30(0x3a3)][_0x2b7d30(0x79f)](_0x2b7d30(0xf5b)))return;!this[_0x2b7d30(0x11df)]&&_0x1356e0(this[_0x2b7d30(0xd4f)]);}[_0x56c593(0x2ac)](){const _0x5b3f0a=_0x56c593;!this[_0x5b3f0a(0xd4f)][_0x5b3f0a(0x4df)]&&(this[_0x5b3f0a(0xd4f)]['_blobsDir']=_0x10b7aa[_0x5b3f0a(0x3d9)](this[_0x5b3f0a(0xd4f)]['path'],'~blobs'),_0xd89003[_0x5b3f0a(0xb69)](this[_0x5b3f0a(0xd4f)][_0x5b3f0a(0x4df)],{'recursive':!![]})),!this[_0x5b3f0a(0xd4f)][_0x5b3f0a(0xd11)]&&this[_0x5b3f0a(0xd4f)][_0x5b3f0a(0x30b)]('default')['db']&&(this[_0x5b3f0a(0xd4f)]['_blobStatusDb']=this[_0x5b3f0a(0xd4f)][_0x5b3f0a(0x30b)](_0x5b3f0a(0x8d0))['db'][_0x5b3f0a(0x730)](_0x45576b,{'dupSort':![]}));}[_0x56c593(0x1fe)](){}async[_0x56c593(0xd0d)](){const _0x159e3d=_0x56c593;if(this[_0x159e3d(0xc62)])return;if(this[_0x159e3d(0x4aa)])return this[_0x159e3d(0x4aa)];return this['_ensurePromise']=((async()=>{const _0xda0f47=_0x159e3d;this[_0xda0f47(0x2ac)]();const _0x17cdc8=this[_0xda0f47(0x30b)];!_0x17cdc8['hasType'](_0x24ec77)&&(await _0x17cdc8[_0xda0f47(0xa39)](_0x24ec77),await _0x17cdc8['registerIndex'](_0x24ec77,[_0xda0f47(0x20b)]),await _0x17cdc8[_0xda0f47(0x11ee)](_0x24ec77,[_0xda0f47(0x6f9)]),await _0x17cdc8[_0xda0f47(0x959)](_0x24ec77,[_0xda0f47(0x20b)]),await _0x17cdc8[_0xda0f47(0x959)](_0x24ec77,[_0xda0f47(0x6f9)])),this[_0xda0f47(0xc62)]=!![];})()),this[_0x159e3d(0x4aa)];}async['upload']({id:_0x173ae3,stream:_0x333c9c,mime:mime=_0x56c593(0xc2e),path:_0x4b5a4c='',txn:txn=null}){const _0x448278=_0x56c593;this[_0x448278(0xd4f)]?.[_0x448278(0x3a3)]?.[_0x448278(0xa15)](_0x448278(0xf5b));if(!_0x173ae3)throw new Error(_0x448278(0xdf1));if(!_0x333c9c)throw new Error(_0x448278(0xe84));await this[_0x448278(0xd0d)]();const _0x1cd222=_0x10b7aa[_0x448278(0x3d9)](this['_blobsDir'],_0x448278(0x7da));_0xd89003[_0x448278(0xb69)](_0x1cd222,{'recursive':!![]});const _0xb498db=_0x10b7aa['join'](_0x1cd222,_0x173ae3+'-'+Date[_0x448278(0x555)]());let _0xe6d4ce,_0x570ed7;try{({hash:_0xe6d4ce,size:_0x570ed7}=await this[_0x448278(0x114e)](_0x333c9c,_0xb498db));const _0x47adc8=this[_0x448278(0x93)](_0xe6d4ce),_0x4a08=_0x10b7aa[_0x448278(0xad5)](_0x47adc8),_0x5174aa=!_0xd89003['existsSync'](_0x47adc8);if(_0x5174aa)_0xd89003[_0x448278(0xb69)](_0x4a08,{'recursive':!![]}),await this['_renameRetry'](_0xb498db,_0x47adc8);else try{_0xd89003[_0x448278(0xff4)](_0xb498db);}catch{}const _0x54f2fc={'id':_0x173ae3,'hash':_0xe6d4ce,'size':_0x570ed7,'mime':mime,'path':_0x4b5a4c,'createdAt':Date[_0x448278(0x555)]()};return txn?(txn[_0x448278(0x92c)](_0x24ec77,_0x173ae3,_0x54f2fc),txn['onDo'](()=>this['_incRef'](_0xe6d4ce)),_0x5174aa&&txn[_0x448278(0xf48)](()=>{const _0x2455a5=_0x448278;try{_0xd89003[_0x2455a5(0xff4)](_0x47adc8);}catch{}})):(this['_incRef'](_0xe6d4ce),await this[_0x448278(0x30b)][_0x448278(0x92c)](_0x24ec77,_0x173ae3,_0x54f2fc),this[_0x448278(0xd4f)][_0x448278(0xea8)][_0x448278(0xf5d)](_0x448278(0xd90),{'id':_0x173ae3,'hash':_0xe6d4ce,'size':_0x570ed7,'path':_0x4b5a4c}),this[_0x448278(0x11e6)](_0xe6d4ce)[_0x448278(0x415)](()=>{})),_0x54f2fc;}catch(_0x1803f0){try{_0xd89003[_0x448278(0xff4)](_0xb498db);}catch{}throw _0x1803f0;}}async[_0x56c593(0xdc1)](_0x3e2c2f){const _0x49910f=_0x56c593;if(!this[_0x49910f(0xc62)]&&!this[_0x49910f(0x30b)][_0x49910f(0x7c0)](_0x24ec77))throw Object[_0x49910f(0x299)](new Error(_0x49910f(0x11bd)+_0x3e2c2f),{'status':0x194});const _0x182412=this['env'][_0x49910f(0xbeb)](_0x24ec77,_0x3e2c2f);if(!_0x182412)throw Object[_0x49910f(0x299)](new Error('File\x20not\x20found:\x20'+_0x3e2c2f),{'status':0x194});const _0x51e20e=this[_0x49910f(0x93)](_0x182412[_0x49910f(0x6f9)]);if(!_0xd89003[_0x49910f(0x66d)](_0x51e20e))throw Object[_0x49910f(0x299)](new Error(_0x49910f(0x362)+_0x3e2c2f),{'status':0x194});return{'stream':_0xd89003[_0x49910f(0xf9f)](_0x51e20e),'record':_0x182412};}async[_0x56c593(0x21e)](_0x4e9251,{txn:txn=null}={}){const _0x129ad6=_0x56c593;await this[_0x129ad6(0xd0d)]();const _0x50df3f=this[_0x129ad6(0x30b)][_0x129ad6(0xbeb)](_0x24ec77,_0x4e9251);if(!_0x50df3f)throw Object[_0x129ad6(0x299)](new Error(_0x129ad6(0x11bd)+_0x4e9251),{'status':0x194});if(txn){const {hash:_0x161dd6}=_0x50df3f;txn[_0x129ad6(0x21e)](_0x24ec77,_0x4e9251),txn[_0x129ad6(0xd17)](()=>{const _0x581533=_0x129ad6,_0x1cf1ed=this[_0x581533(0x38c)](_0x161dd6);if(_0x1cf1ed<=0x0)try{_0xd89003['unlinkSync'](this[_0x581533(0x93)](_0x161dd6));}catch{}});return;}await this[_0x129ad6(0x30b)][_0x129ad6(0x21e)](_0x24ec77,_0x4e9251);const _0xd1cd32=this[_0x129ad6(0x38c)](_0x50df3f[_0x129ad6(0x6f9)]);if(_0xd1cd32<=0x0)try{_0xd89003[_0x129ad6(0xff4)](this[_0x129ad6(0x93)](_0x50df3f['hash']));}catch{}this['okdb'][_0x129ad6(0xea8)][_0x129ad6(0xf5d)](_0x129ad6(0x8e2),{'id':_0x4e9251,'hash':_0x50df3f['hash']});}async['listPath'](_0x587cc2,{recursive:recursive=!![],limit:limit=0x3e8}={}){const _0x52e51f=_0x56c593;if(!this[_0x52e51f(0xc62)]&&!this[_0x52e51f(0x30b)]['hasType'](_0x24ec77))return[];await this['_ensure']();const _0x2d04c9=[];if(_0x587cc2==='/'||_0x587cc2===''){if(recursive)for(const _0x2939d8 of this[_0x52e51f(0x30b)]['query'](_0x24ec77,{})){_0x2d04c9[_0x52e51f(0x597)](_0x2939d8[_0x52e51f(0x568)]);if(_0x2d04c9[_0x52e51f(0x156)]>=limit)break;}else for(const _0x446bc9 of this[_0x52e51f(0x30b)][_0x52e51f(0xa28)](_0x24ec77,{})){const _0x15b908=_0x446bc9[_0x52e51f(0x568)]?.[_0x52e51f(0x20b)]??'',_0x39f332=_0x15b908['slice'](0x1);if(!_0x39f332[_0x52e51f(0x29c)]('/')){_0x2d04c9['push'](_0x446bc9[_0x52e51f(0x568)]);if(_0x2d04c9[_0x52e51f(0x156)]>=limit)break;}}return _0x2d04c9;}const _0x298128=_0x587cc2[_0x52e51f(0x11aa)]('/')?_0x587cc2:_0x587cc2+'/';for(const _0x3998b1 of this['env'][_0x52e51f(0xa28)](_0x24ec77,{})){const _0x6f204f=_0x3998b1[_0x52e51f(0x568)]?.[_0x52e51f(0x20b)]??'';if(!_0x6f204f[_0x52e51f(0x8ba)](_0x298128))continue;if(!recursive){const _0x3b07b4=_0x6f204f['slice'](_0x298128[_0x52e51f(0x156)]);if(_0x3b07b4[_0x52e51f(0x29c)]('/'))continue;}_0x2d04c9[_0x52e51f(0x597)](_0x3998b1[_0x52e51f(0x568)]);if(_0x2d04c9[_0x52e51f(0x156)]>=limit)break;}return _0x2d04c9;}[_0x56c593(0xee2)](_0x291af1){const _0x37bd5a=_0x56c593;if(!this[_0x37bd5a(0xd11)])return null;return this[_0x37bd5a(0xd11)][_0x37bd5a(0xbeb)](_0x291af1)??null;}[_0x56c593(0xa71)](){let _0x291806=0x0;const _0x368738=_0x39ad1b=>{const _0x1cbbe7=_0x47ab;if(!_0xd89003['existsSync'](_0x39ad1b))return;for(const _0x21f156 of _0xd89003[_0x1cbbe7(0xa38)](_0x39ad1b,{'withFileTypes':!![]})){const _0x3f067b=_0x10b7aa[_0x1cbbe7(0x3d9)](_0x39ad1b,_0x21f156[_0x1cbbe7(0x1173)]);if(_0x21f156[_0x1cbbe7(0x11a0)]()){if(_0x21f156[_0x1cbbe7(0x1173)]===_0x1cbbe7(0x7da))continue;_0x368738(_0x3f067b);}else{const _0x796cf7=_0x10b7aa[_0x1cbbe7(0xbe1)](_0x10b7aa[_0x1cbbe7(0xad5)](_0x3f067b))+_0x21f156[_0x1cbbe7(0x1173)],_0x4f7b0f=this['_blobStatusDb']?.[_0x1cbbe7(0xbeb)](_0x796cf7);if(!_0x4f7b0f||_0x4f7b0f[_0x1cbbe7(0xbf5)]<=0x0)try{_0xd89003[_0x1cbbe7(0xff4)](_0x3f067b),_0x291806++;}catch{}}}};return _0x368738(this['_blobsDir']),_0x291806;}[_0x56c593(0x69c)](){const _0x3a6179=_0x56c593,_0x3ac23f=[];if(!this['_blobStatusDb'])return _0x3ac23f;for(const {key:_0x1c26c7,value:_0x5bfa42}of this[_0x3a6179(0xd11)][_0x3a6179(0x9ce)]()){const _0x3d50c0=this[_0x3a6179(0x93)](_0x1c26c7);let _0xd580e1=null;const _0x36660a=_0xd89003[_0x3a6179(0x66d)](_0x3d50c0);if(_0x36660a)try{_0xd580e1=_0xd89003[_0x3a6179(0xdcb)](_0x3d50c0)[_0x3a6179(0xfb)];}catch{}_0x3ac23f[_0x3a6179(0x597)]({'hash':_0x1c26c7,'refs':_0x5bfa42[_0x3a6179(0xbf5)]??0x0,'nodes':_0x5bfa42[_0x3a6179(0x253)]??{},'onDisk':_0x36660a,'sizeBytes':_0xd580e1});}return _0x3ac23f;}[_0x56c593(0x1233)](_0x42c438){const _0x50ba98=_0x56c593,_0x2b9d89=this[_0x50ba98(0x93)](_0x42c438);if(!_0xd89003[_0x50ba98(0x66d)](_0x2b9d89))throw Object[_0x50ba98(0x299)](new Error(_0x50ba98(0xdef)+_0x42c438),{'status':0x194});return _0xd89003['createReadStream'](_0x2b9d89);}async[_0x56c593(0x1c1)]({peerIds:_0x8f1a1f}={}){const _0x4c98b2=_0x56c593,_0x8b3052=this[_0x4c98b2(0xd4f)];if(!_0x8b3052['sync'])return{'synced':0x0,'errors':[_0x4c98b2(0x1010)]};let _0x1d3477;try{_0x8f1a1f?_0x1d3477=_0x8f1a1f[_0x4c98b2(0x1166)](_0x21b871=>{const _0xf34c29=_0x4c98b2,_0x26ca14=_0x8b3052[_0xf34c29(0xa57)](_0xf34c29(0xf35),_0x21b871);return _0x26ca14?.[_0xf34c29(0x568)]?{'peer_id':_0x21b871,'address':_0x26ca14[_0xf34c29(0x568)][_0xf34c29(0x7f2)]}:null;})['filter'](Boolean):_0x1d3477=_0x8b3052[_0x4c98b2(0x1034)][_0x4c98b2(0x215)]();}catch{return{'synced':0x0,'errors':['failed\x20to\x20list\x20peers']};}let _0x45969d=0x0;const _0x39f018=[];return await Promise['allSettled'](_0x1d3477[_0x4c98b2(0x1166)](async _0x362362=>{const _0x30103d=_0x4c98b2,_0x4eb8c4=_0x362362[_0x30103d(0x896)]??_0x362362['id'];try{const _0x30bdbe=await this['_pullBlobsFromPeer'](_0x4eb8c4);_0x45969d+=_0x30bdbe;}catch(_0xb1d8e0){_0x39f018[_0x30103d(0x597)](_0x4eb8c4+':\x20'+_0xb1d8e0[_0x30103d(0xb4e)]);}})),{'synced':_0x45969d,'errors':_0x39f018};}async[_0x56c593(0x1097)](_0x5e17c9){const _0x4de648=_0x56c593,_0x129beb=this[_0x4de648(0xd4f)];let _0xcefcf9;try{_0xcefcf9=await _0x129beb[_0x4de648(0x1034)][_0x4de648(0x7fd)](_0x5e17c9,'GET',_0x4de648(0xc85),null);}catch(_0x5a2aad){throw new Error(_0x4de648(0x6de)+_0x5e17c9+':\x20'+_0x5a2aad[_0x4de648(0xb4e)],{'cause':_0x5a2aad});}const _0x331f9a=_0xcefcf9?.[_0x4de648(0x80e)]??[];let _0x48e304=0x0;for(const {hash:_0x164a81}of _0x331f9a){if(!_0x164a81)continue;const _0x4b2777=this[_0x4de648(0x93)](_0x164a81);if(_0xd89003[_0x4de648(0x66d)](_0x4b2777)){this[_0x4de648(0xc21)](_0x164a81,_0x5e17c9,!![]);continue;}try{await this[_0x4de648(0xe87)](_0x5e17c9,_0x164a81),this['_setNodeHasBlob'](_0x164a81,_0x5e17c9,!![]),_0x48e304++;}catch(_0x5c492b){_0x129beb[_0x4de648(0x9be)]?.[_0x4de648(0xf78)]?.(_0x4de648(0x1208)+_0x164a81['slice'](0x0,0x8)+_0x4de648(0x67b)+_0x5e17c9+':\x20'+_0x5c492b[_0x4de648(0xb4e)]);}}return _0x48e304;}async['_pullBlobFromPeer'](_0x25fc01,_0x16b42e){const _0x3efe81=_0x56c593,_0x1db504=this[_0x3efe81(0xd4f)],_0x4b73fd=_0x1db504[_0x3efe81(0xa57)](_0x3efe81(0xf35),_0x25fc01);if(!_0x4b73fd?.['value']?.['address'])throw new Error(_0x3efe81(0x45f)+_0x25fc01+'\x20has\x20no\x20address');const _0x203fde=_0x4b73fd[_0x3efe81(0x568)]['address'][_0x3efe81(0x8d8)](/\/+$/,'')+(_0x3efe81(0x5f3)+_0x16b42e),_0x4994f2={};if(_0x1db504[_0x3efe81(0x1034)]?.['options']?.[_0x3efe81(0x15a)])_0x4994f2[_0x3efe81(0x81d)]='Bearer\x20'+_0x1db504[_0x3efe81(0x1034)]['options'][_0x3efe81(0x15a)];const _0x4228c0=await fetch(_0x203fde,{'headers':_0x4994f2});if(!_0x4228c0['ok'])throw new Error(_0x3efe81(0xe07)+_0x4228c0[_0x3efe81(0xfcd)]+_0x3efe81(0x5ec)+_0x16b42e[_0x3efe81(0xc3c)](0x0,0x8));let _0x1c20f1;if(_0x481c5a['Readable']['fromWeb'])_0x1c20f1=_0x481c5a[_0x3efe81(0x7e7)][_0x3efe81(0x1133)](_0x4228c0[_0x3efe81(0xce8)]);else{const _0x504e5c=Buffer[_0x3efe81(0x9f8)](await _0x4228c0[_0x3efe81(0x11f6)]()),_0x2ecd3a=new _0x481c5a[(_0x3efe81(0x8ec))]();_0x2ecd3a[_0x3efe81(0xc9c)](_0x504e5c),_0x1c20f1=_0x2ecd3a;}await this[_0x3efe81(0x547)](_0x16b42e,_0x1c20f1);}async[_0x56c593(0x547)](_0x1ee385,_0xa2089){const _0x1e1227=_0x56c593,_0x732539=this[_0x1e1227(0x93)](_0x1ee385);if(_0xd89003[_0x1e1227(0x66d)](_0x732539))return;const _0x126d05=_0x10b7aa['join'](this[_0x1e1227(0x4df)],_0x1e1227(0x7da));_0xd89003[_0x1e1227(0xb69)](_0x126d05,{'recursive':!![]});const _0x323146=_0x10b7aa['join'](_0x126d05,'blob-'+_0x1ee385+'-'+Date[_0x1e1227(0x555)]());try{const {hash:_0xe7906b}=await this[_0x1e1227(0x114e)](_0xa2089,_0x323146);if(_0xe7906b!==_0x1ee385)throw new Error(_0x1e1227(0x60c)+_0x1ee385+',\x20got\x20'+_0xe7906b);const _0x51b8cf=_0x10b7aa['dirname'](_0x732539);_0xd89003[_0x1e1227(0xb69)](_0x51b8cf,{'recursive':!![]}),await this['_renameRetry'](_0x323146,_0x732539);const _0x216b66=this[_0x1e1227(0xa0c)](_0x1ee385),_0x720a82=this['_blobStatusDb']?.['get'](_0x1ee385);this['_blobStatusDb']?.['putSync'](_0x1ee385,{..._0x720a82??{},'refs':_0x216b66});}catch(_0x4472fb){try{_0xd89003[_0x1e1227(0xff4)](_0x323146);}catch{}throw _0x4472fb;}}[_0x56c593(0xc21)](_0x387c34,_0x3296b1,_0x1f5c32){const _0x36b08d=_0x56c593;if(!this[_0x36b08d(0xd11)])return;const _0x3b33a7=this['_blobStatusDb']['get'](_0x387c34)??{'refs':0x0},_0x249cad={..._0x3b33a7[_0x36b08d(0x253)]??{}};_0x249cad[_0x3296b1]=_0x1f5c32,this['_blobStatusDb'][_0x36b08d(0xb6f)](_0x387c34,{..._0x3b33a7,'nodes':_0x249cad});}async[_0x56c593(0x11e6)](_0x30921b){const _0xd968a3=_0x56c593,_0x26a658=this[_0xd968a3(0xd4f)];if(!_0x26a658['sync']?.[_0xd968a3(0xc62)])return;const _0x2f1b64=_0x26a658['sync']['peers']();if(_0x2f1b64[_0xd968a3(0x156)]===0x0)return;const _0x44aaed=_0x26a658['id'];await Promise['allSettled'](_0x2f1b64['map'](_0x285da2=>_0x26a658[_0xd968a3(0x1034)]['fetchPeer'](_0x285da2[_0xd968a3(0x896)],_0xd968a3(0xe46),_0xd968a3(0x90c),{'peerIds':[_0x44aaed]})[_0xd968a3(0x415)](()=>{})));}['_blobPath'](_0x4bd86e){const _0x52cd37=_0x56c593;return _0x10b7aa[_0x52cd37(0x3d9)](this[_0x52cd37(0x4df)],_0x4bd86e[_0x52cd37(0xc3c)](0x0,0x2),_0x4bd86e[_0x52cd37(0xc3c)](0x2));}[_0x56c593(0xa0c)](_0x1c6594){const _0x17a444=_0x56c593;let _0x6b06ab=0x0;for(const [,_0x2109c2]of this[_0x17a444(0xd4f)][_0x17a444(0xa3)]){if(!_0x2109c2['_sync'])continue;if(!_0x2109c2[_0x17a444(0x7c0)](_0x24ec77))continue;try{for(const _0x185e2d of _0x2109c2[_0x17a444(0xa28)](_0x24ec77,{'hash':_0x1c6594}))_0x6b06ab++;}catch{}}return _0x6b06ab;}[_0x56c593(0x114e)](_0x533cf6,_0x2faf65){return new Promise((_0x142256,_0x4b7a23)=>{const _0x1f4c07=_0x47ab,_0x49abb6=_0x71fc2a[_0x1f4c07(0x687)](_0x1f4c07(0xeee)),_0x8c772b=_0xd89003['createWriteStream'](_0x2faf65);let _0x214f7c=0x0,_0x4a4677=null;_0x533cf6['on']('data',_0x532cef=>{const _0x3d348c=_0x1f4c07;_0x214f7c+=_0x532cef[_0x3d348c(0x156)],_0x49abb6[_0x3d348c(0xbb7)](_0x532cef);}),_0x533cf6['on'](_0x1f4c07(0x225),_0x4b7a23),_0x8c772b['on']('error',_0x4b7a23),_0x533cf6[_0x1f4c07(0xe12)](_0x8c772b),_0x8c772b['on'](_0x1f4c07(0xa2e),()=>{const _0x56be56=_0x1f4c07;_0x4a4677=_0x49abb6[_0x56be56(0xdea)](_0x56be56(0x57b));}),_0x8c772b['on'](_0x1f4c07(0x11ac),()=>{if(_0x4a4677!==null)_0x142256({'hash':_0x4a4677,'size':_0x214f7c});});});}[_0x56c593(0x5d1)](_0x3971e4){const _0x9e9ee7=_0x56c593;return this[_0x9e9ee7(0xd11)]?.['get'](_0x3971e4)?.['refs']??0x0;}[_0x56c593(0x718)](_0x5b0c94){const _0x4d532b=_0x56c593,_0x536e20=this[_0x4d532b(0x5d1)](_0x5b0c94)+0x1;return this[_0x4d532b(0xd11)][_0x4d532b(0xb6f)](_0x5b0c94,{'refs':_0x536e20}),_0x536e20;}[_0x56c593(0x38c)](_0x506a0a){const _0x57ab96=_0x56c593,_0x4a78f9=Math[_0x57ab96(0x10bf)](0x0,this['_getRef'](_0x506a0a)-0x1);return this[_0x57ab96(0xd11)][_0x57ab96(0xb6f)](_0x506a0a,{'refs':_0x4a78f9}),_0x4a78f9;}async[_0x56c593(0xe17)](_0xe4de34,_0x3f2bd4,_0x5ba87f=0xf,_0x4af8b9=0x32){const _0x3a4e6d=_0x56c593;for(let _0x2e57b1=0x0;_0x2e57b1<=_0x5ba87f;_0x2e57b1++){try{await _0xd89003[_0x3a4e6d(0x47d)][_0x3a4e6d(0x43b)](_0xe4de34,_0x3f2bd4);return;}catch(_0x3eda12){if(_0x3eda12['code']!=='EBUSY'||_0x2e57b1===_0x5ba87f)throw _0x3eda12;const _0x5257e1=Math[_0x3a4e6d(0x2dc)](_0x4af8b9*Math[_0x3a4e6d(0x11c)](0x2,_0x2e57b1),0x1f4);await new Promise(_0xd872f7=>setTimeout(_0xd872f7,_0x5257e1));}}}}return okdbFiles=_0x1e0ade,okdbFiles;}var okdbMcp,hasRequiredOkdbMcp;function requireOkdbMcp(){const _0x461c12=_0xef8cd8;if(hasRequiredOkdbMcp)return okdbMcp;hasRequiredOkdbMcp=0x1;const _0x283d67=require$$0$1;function _0x1dc713(_0x53a685){const _0x19e0f8=_0x47ab;return _0x53a685==null?_0x53a685:JSON['parse'](JSON[_0x19e0f8(0xf75)](_0x53a685));}function _0x136eb2(_0x35a276){const _0x38ec60=_0x47ab;if(_0x35a276==null)return[];return Array['isArray'](_0x35a276)?_0x35a276[_0x38ec60(0x1103)](Boolean):[_0x35a276];}class _0x9880ce{constructor(_0x2550b9){const _0x358fed=_0x47ab;this[_0x358fed(0xd4f)]=_0x2550b9,this['clients']=new Map();const _0x2230a8=_0x2550b9?.[_0x358fed(0x11e5)]?.['mcp']?.[_0x358fed(0xa1f)]??null,_0x4105b3=_0x2230a8??![];_0x4105b3!==![]?this[_0x358fed(0x7d2)]={'origins':_0x4105b3,'methods':[_0x358fed(0x929),_0x358fed(0xe46),_0x358fed(0x42f),'OPTIONS'],'headers':[_0x358fed(0x306),_0x358fed(0x202),_0x358fed(0x714),_0x358fed(0x1131),_0x358fed(0x10bd),_0x358fed(0x562)],'exposeHeaders':[_0x358fed(0x1131)],'maxAge':0x15180}:this[_0x358fed(0x7d2)]=null,this[_0x358fed(0xc10)]();}['_register'](){const _0x146443=_0x47ab;this[_0x146443(0xd4f)]?.[_0x146443(0x3a3)]?.[_0x146443(0xa15)](_0x146443(0xa8b));const _0xec909=this[_0x146443(0xd4f)][_0x146443(0x9f4)];_0xec909[_0x146443(0xddb)](_0x2d137d=>_0x2d137d['path']==='/mcp'||_0x2d137d[_0x146443(0x20b)]===_0x146443(0x517)||_0x2d137d[_0x146443(0x20b)]===_0x146443(0x468),async(_0x6cd647,_0x3ea8f6)=>{const _0x4168e4=_0x146443;if(_0x6cd647[_0x4168e4(0xfc5)]==='OPTIONS')return!![];if(_0x6cd647['context']?.['internal']===!![])return!![];if(_0x6cd647['context']?.[_0x4168e4(0x93f)]?.[_0x4168e4(0x717)]===!![])return!![];if(!_0x6cd647[_0x4168e4(0xcc4)]?.[_0x4168e4(0x714)]?.['startsWith'](_0x4168e4(0x9a3)))return _0x3ea8f6[_0x4168e4(0xfcd)](0x191),_0x3ea8f6[_0x4168e4(0x771)]({'error':_0x4168e4(0xb64)}),![];const _0x2cc8f8=await this[_0x4168e4(0xd4f)]['auth'][_0x4168e4(0x617)](_0x6cd647);if(_0x2cc8f8?.[_0x4168e4(0xb77)])return _0x6cd647[_0x4168e4(0x339)][_0x4168e4(0x93f)]=_0x2cc8f8,_0x6cd647[_0x4168e4(0x339)][_0x4168e4(0x45b)]=_0x2cc8f8[_0x4168e4(0x45b)]||_0x2cc8f8,!![];return _0x3ea8f6[_0x4168e4(0xfcd)](0x191),_0x3ea8f6['send']({'error':_0x4168e4(0x6ce)}),![];}),_0xec909['addSSE'](_0x146443(0x491),({send:_0x5ca512,setHeader:_0x10388c,context:_0x5e51d2})=>{const _0x59c5ad=_0x146443,_0x457607=_0x283d67['randomUUID']();return this[_0x59c5ad(0xb82)][_0x59c5ad(0x211)](_0x457607,{'send':_0x5ca512,'subject':_0x5e51d2?.['auth']?.['subject']??null}),_0x10388c(_0x59c5ad(0x1131),_0x457607),_0x5ca512(_0x59c5ad(0xc79),JSON[_0x59c5ad(0xf75)]({'sessionId':_0x457607})),()=>this[_0x59c5ad(0xb82)][_0x59c5ad(0x3b3)](_0x457607);},{...this['cors']?{'cors':this[_0x146443(0x7d2)]}:{},'rawResponse':!![]}),_0xec909['add'](_0x146443(0xe46),'/mcp',async({body:_0x54a1c1,headers:_0x5b697a,context:_0x3e5aca})=>{const _0x498a77=_0x146443;if(!_0x54a1c1||typeof _0x54a1c1!==_0x498a77(0xb36)||Array[_0x498a77(0x10f5)](_0x54a1c1)||_0x54a1c1[_0x498a77(0x220)]!==_0x498a77(0xe38)||typeof _0x54a1c1[_0x498a77(0xfc5)]!=='string')return{'status':0x190,'headers':{'content-type':_0x498a77(0xf9b)},'body':this['_jsonRpcError'](null,-0x7f58,'Invalid\x20Request')};const _0x32fd43=_0x5b697a?.[_0x498a77(0x1131)]||_0x283d67['randomUUID'](),_0x1219ca=_0x54a1c1['id']==null;try{const _0x3f5022=await this[_0x498a77(0xf76)](_0x54a1c1,_0x3e5aca);if(_0x1219ca)return{'status':0xca,'headers':{'mcp-session-id':_0x32fd43}};return{'status':0xc8,'headers':{'content-type':'application/json','mcp-session-id':_0x32fd43},'body':{'jsonrpc':_0x498a77(0xe38),'id':_0x54a1c1['id'],'result':_0x3f5022}};}catch(_0x2e8e47){const _0xf5abed=Number[_0x498a77(0x474)](_0x2e8e47?.[_0x498a77(0x6c3)])?_0x2e8e47[_0x498a77(0x6c3)]:-0x7f5b,_0x3fc3ee=_0x2e8e47?.[_0x498a77(0xb4e)]||'Internal\x20error';if(_0x1219ca)return{'status':0xca,'headers':{'mcp-session-id':_0x32fd43}};return{'status':0xc8,'headers':{'content-type':_0x498a77(0xf9b),'mcp-session-id':_0x32fd43},'body':this[_0x498a77(0x1205)](_0x54a1c1['id'],_0xf5abed,_0x3fc3ee,_0x2e8e47?.[_0x498a77(0x933)])};}},{...this[_0x146443(0x7d2)]?{'cors':this[_0x146443(0x7d2)]}:{},'rawResponse':!![]}),_0xec909[_0x146443(0x8b3)](_0x146443(0x517),({send:_0x243252,setHeader:_0x14dce7,context:_0x361098})=>{const _0x5f3a9c=_0x146443,_0x4aadec=_0x283d67[_0x5f3a9c(0xa91)]();return this['clients'][_0x5f3a9c(0x211)](_0x4aadec,{'send':_0x243252,'subject':_0x361098?.[_0x5f3a9c(0x93f)]?.[_0x5f3a9c(0x155)]??null}),_0x14dce7(_0x5f3a9c(0x1131),_0x4aadec),_0x243252(_0x5f3a9c(0x796),_0x5f3a9c(0x468),{'raw':!![]}),()=>this['clients'][_0x5f3a9c(0x3b3)](_0x4aadec);},{...this[_0x146443(0x7d2)]?{'cors':this[_0x146443(0x7d2)]}:{},'rawResponse':!![]}),_0xec909[_0x146443(0x33c)](_0x146443(0xe46),'/mcp/messages',async({body:_0x1470db,headers:_0xaa1dc2,context:_0x484833})=>{const _0x2462e6=_0x146443,_0x33c6ab=_0xaa1dc2?.['mcp-session-id'],_0x58b8fe=_0x33c6ab?{'mcp-session-id':_0x33c6ab}:{},_0x1dd3d1=_0x33c6ab?this[_0x2462e6(0xb82)][_0x2462e6(0xbeb)](_0x33c6ab):null;if(!_0x1470db||typeof _0x1470db!==_0x2462e6(0xb36)||Array[_0x2462e6(0x10f5)](_0x1470db)||_0x1470db['jsonrpc']!==_0x2462e6(0xe38)||typeof _0x1470db[_0x2462e6(0xfc5)]!==_0x2462e6(0xf7a))return{'status':0x190,'headers':_0x58b8fe,'body':this[_0x2462e6(0x1205)](null,-0x7f58,_0x2462e6(0xacf))};if(_0x33c6ab&&!_0x1dd3d1)return{'status':0x191,'headers':_0x58b8fe,'body':this['_jsonRpcError'](_0x1470db['id']??null,-0x7d01,_0x2462e6(0x9a))};if(_0x1dd3d1?.['subject']&&_0x484833?.['auth']?.[_0x2462e6(0x155)]&&_0x1dd3d1['subject']!==_0x484833[_0x2462e6(0x93f)]['subject'])return{'status':0x193,'headers':_0x58b8fe,'body':this[_0x2462e6(0x1205)](_0x1470db['id']??null,-0x7d02,'MCP\x20session\x20subject\x20mismatch')};const _0x23d5a3=_0x1470db['id']==null;try{const _0x56958b=await this[_0x2462e6(0xf76)](_0x1470db,_0x484833);if(_0x23d5a3)return{'status':0xcc,'headers':_0x58b8fe};const _0x470a4e={'jsonrpc':_0x2462e6(0xe38),'id':_0x1470db['id'],'result':_0x56958b};return this['_broadcast'](_0x470a4e,_0x33c6ab),{'status':0xca,'headers':_0x58b8fe};}catch(_0xf98e0e){const _0x38675b=Number['isInteger'](_0xf98e0e?.[_0x2462e6(0x6c3)])?_0xf98e0e[_0x2462e6(0x6c3)]:-0x7f5b,_0x488a39=_0xf98e0e?.[_0x2462e6(0xb4e)]||_0x2462e6(0xd77);if(_0x23d5a3)return{'status':_0x38675b===-0x7f5b?0x1f4:0xcc,'headers':_0x58b8fe};return{'status':_0x38675b===-0x7f5b?0x1f4:0x190,'headers':_0x58b8fe,'body':this[_0x2462e6(0x1205)](_0x1470db['id'],_0x38675b,_0x488a39,_0xf98e0e?.[_0x2462e6(0x933)])};}},{...this[_0x146443(0x7d2)]?{'cors':this[_0x146443(0x7d2)]}:{},'rawResponse':!![]});}[_0x461c12(0x1205)](_0x5d8a27,_0xfc8719,_0x15763e,_0x542487=undefined){const _0x4e9366=_0x461c12;return{'jsonrpc':_0x4e9366(0xe38),'id':_0x5d8a27??null,'error':_0x542487===undefined?{'code':_0xfc8719,'message':_0x15763e}:{'code':_0xfc8719,'message':_0x15763e,'data':_0x542487}};}[_0x461c12(0x630)](_0x4b3096,_0xa8d843=null){const _0x31406a=_0x461c12;if(!_0xa8d843)return;for(const [_0x26b844,_0x4ddda9]of this[_0x31406a(0xb82)]['entries']()){if(_0xa8d843&&_0x26b844!==_0xa8d843)continue;_0x4ddda9[_0x31406a(0x771)]('message',_0x4b3096);}}async[_0x461c12(0xf76)](_0x31e95d,_0x7dedf5=null){const _0x11147b=_0x461c12;switch(_0x31e95d[_0x11147b(0xfc5)]){case _0x11147b(0xa84):return null;case _0x11147b(0xc23):return this[_0x11147b(0x947)](_0x31e95d[_0x11147b(0x3f1)]);case _0x11147b(0xfae):return this[_0x11147b(0xe06)]();case _0x11147b(0xb0c):return this[_0x11147b(0xa99)](_0x31e95d[_0x11147b(0x3f1)],_0x7dedf5);default:throw this['_methodNotFound'](_0x31e95d[_0x11147b(0xfc5)]);}}['_methodNotFound'](_0x2ba72b){const _0x3add69=_0x461c12,_0x582971=new Error(_0x3add69(0x63f)+_0x2ba72b);return _0x582971[_0x3add69(0x6c3)]=-0x7f59,_0x582971;}[_0x461c12(0x947)](_0x2d014d={}){const _0x2f1423=_0x461c12,_0xf26143=_0x2d014d?.[_0x2f1423(0xe78)],_0x3cebdf=['2025-03-26',_0x2f1423(0x109f)],_0x10f98b=_0xf26143&&_0x3cebdf[_0x2f1423(0x29c)](_0xf26143)?_0xf26143:'2025-03-26',{tools:_0x2cab28}=this[_0x2f1423(0xe06)]();return{'protocolVersion':_0x10f98b,'capabilities':{'tools':{'listChanged':![]}},'serverInfo':{'name':'okdb','version':this['okdb'][_0x2f1423(0x26c)]?.[_0x2f1423(0x45c)]||_0x2f1423(0x51f)},'tools':_0x2cab28};}[_0x461c12(0x7e6)](_0x34eb13){return'okdb_'+_0x34eb13;}[_0x461c12(0xb68)](){const _0x397681=_0x461c12;return['data',_0x397681(0x30b),'type',_0x397681(0xcc7),_0x397681(0xdce),_0x397681(0xfca),'queue',_0x397681(0x46b),_0x397681(0xcbd),_0x397681(0x63b),_0x397681(0x2db),_0x397681(0xf39),_0x397681(0x1034),'embeddings',_0x397681(0xf5b)];}['_systemToolNames'](){const _0x25518b=_0x461c12;return new Set([_0x25518b(0xb99),_0x25518b(0x1056),'system_metrics',_0x25518b(0x6d8),_0x25518b(0x1117),_0x25518b(0x954)]);}[_0x461c12(0x88c)](){const _0x4fb741=_0x461c12;return this[_0x4fb741(0xd4f)][_0x4fb741(0x9f4)][_0x4fb741(0x53a)]()['filter'](_0x39e9f6=>this[_0x4fb741(0x913)](_0x39e9f6));}[_0x461c12(0x913)](_0xd5e3a8){const _0x709823=_0x461c12,_0x25f50d=_0xd5e3a8?.[_0x709823(0x4dd)];if(!_0x25f50d?.[_0x709823(0xb07)])return![];if(!_0x25f50d?.[_0x709823(0xa8b)])return![];if(_0x25f50d[_0x709823(0xa8b)]?.[_0x709823(0xcb7)]===![])return![];if(_0x25f50d[_0x709823(0x9f4)]?.[_0x709823(0x10bb)]&&_0x25f50d[_0x709823(0x9f4)]['transport']!==_0x709823(0xe40))return![];if(_0x25f50d['access']?.[_0x709823(0x960)])return![];if(_0xd5e3a8[_0x709823(0x654)]?.[_0x709823(0xc59)])return![];return!![];}[_0x461c12(0x9d2)](_0x1b6a8c){const _0x29c325=_0x461c12,_0x5f2553=_0x1b6a8c?.['operation'],_0x5e369f=_0x5f2553?.['mcp']?.[_0x29c325(0xd4)],_0x5b80d1=_0x5f2553?.[_0x29c325(0xa8b)]?.['action']??_0x5f2553?.['id'];if(!_0x5e369f||!_0x5b80d1)return null;if(_0x5e369f===_0x29c325(0x83e)&&_0x5b80d1['startsWith'](_0x29c325(0x14b)))return _0x29c325(0xf39);if(_0x5e369f==='function'){if(_0x5b80d1===_0x29c325(0xa86)||_0x5b80d1===_0x29c325(0x1061)||_0x5b80d1===_0x29c325(0xd88)||_0x5b80d1==='get_function_run')return _0x29c325(0x2db);}if(_0x5e369f===_0x29c325(0x30b)&&(_0x5b80d1==='remove_env'||_0x5b80d1===_0x29c325(0xeb9)))return _0x29c325(0x30b);return _0x5e369f;}[_0x461c12(0xfb2)](_0x10cce5){const _0x1cfffd=_0x461c12;return this['_supportedCapabilities']()[_0x1cfffd(0x29c)](_0x10cce5);}['_normalizedActionName'](_0x5adcc2,_0x10da9b){const _0x3d6295=_0x461c12,_0xd981bb={'data':{'get_item':_0x3d6295(0xbeb),'put_item':_0x3d6295(0x92c),'patch_item':'patch','delete_item':'remove','query_type':_0x3d6295(0xa28),'count_items':_0x3d6295(0x1147),'run_transaction':'txn'},'env':{'list_envs':_0x3d6295(0x63e),'get_env_info':_0x3d6295(0xbeb),'create_env':'create','remove_env':_0x3d6295(0x3b3),'compact_env':_0x3d6295(0xd76),'get_env_changelog':_0x3d6295(0xb74),'get_env_config':_0x3d6295(0x142)},'type':{'list_types':'list','describe_type':'describe','register_type':'create','drop_type':'delete','recompute_type_fields':_0x3d6295(0xdc9),'list_type_properties':_0x3d6295(0x7f8),'get_type_deep_properties':'deep_properties'},'index':{'list_indexes':_0x3d6295(0x63e),'register_index':_0x3d6295(0x725),'drop_index':_0x3d6295(0x3b3),'rebuild_index':_0x3d6295(0x11ab),'list_index_violations':_0x3d6295(0x8d1),'list_unique_violations':_0x3d6295(0x5aa)},'fts':{'list_fts_indexes':_0x3d6295(0x63e),'register_fts_index':_0x3d6295(0x725),'drop_fts_index':_0x3d6295(0x3b3),'rebuild_fts_index':'rebuild','search_fts_index':'search'},'queue':{'queue_enqueue_job':_0x3d6295(0xafa),'queue_get_job':_0x3d6295(0xbeb),'queue_list_jobs':_0x3d6295(0x63e),'queue_stats':'stats','queue_claim_next_job':_0x3d6295(0x112d),'queue_update_job':_0x3d6295(0xbb7),'queue_remove_job':'remove','queue_retry_job':_0x3d6295(0x1116),'queue_cancel_job':_0x3d6295(0x18a),'queue_mark_job_heartbeat':_0x3d6295(0xb04),'queue_mark_job_progress':_0x3d6295(0xb97),'queue_mark_job_complete':'complete','queue_mark_job_fail':_0x3d6295(0x5a8),'queue_reconcile':_0x3d6295(0x108d),'queue_types':'types','queue_stats_rebuild':_0x3d6295(0x4b7),'queue_clear_done_jobs':_0x3d6295(0xe7c),'queue_clear_failed_jobs':_0x3d6295(0x78c),'queue_clear_stuck_jobs':_0x3d6295(0x27b),'queue_retry_failed_jobs':'retry_failed','queue_list_buckets':_0x3d6295(0x11b1),'queue_add_bucket':_0x3d6295(0xb3),'queue_update_bucket':_0x3d6295(0xc8a),'queue_remove_bucket':_0x3d6295(0x1b7),'queue_try_claim_tokens':_0x3d6295(0xde8)},'pipeline':{'env_engines_list':'engines','pipelines_list':_0x3d6295(0x11f4),'pipeline_templates_list':_0x3d6295(0x986),'pipeline_template_get':_0x3d6295(0x6f2),'pipeline_template_preview':'template_preview','env_pipeline_template_create':_0x3d6295(0xad2),'env_pipelines_list':_0x3d6295(0x1155),'env_pipeline_get':_0x3d6295(0x10b1),'env_pipeline_create':_0x3d6295(0x14c),'env_pipeline_stop':_0x3d6295(0x7aa),'env_pipeline_start':_0x3d6295(0xe24),'env_pipeline_delete':_0x3d6295(0xae3),'env_pipeline_scaffold':_0x3d6295(0x352),'env_type_pipelines_list':_0x3d6295(0x63e),'env_type_pipeline_doc_get':_0x3d6295(0xc6e),'env_type_pipeline_docs_list':_0x3d6295(0xcab),'env_type_pipeline_nearest':'nearest','env_type_pipeline_query':_0x3d6295(0xa28),'env_type_pipeline_stats':_0x3d6295(0xd72),'env_type_pipeline_create':'create','env_type_pipeline_stop':_0x3d6295(0x1fe),'env_type_pipeline_start':_0x3d6295(0xa00),'env_type_pipeline_restart':_0x3d6295(0x8af),'env_type_pipeline_delete':_0x3d6295(0x3b3),'env_type_pipeline_flush':_0x3d6295(0x26b),'env_type_pipeline_snapshot':_0x3d6295(0x33f),'env_type_pipeline_rebuild':_0x3d6295(0x11ab),'env_type_pipeline_doc_mark_done':_0x3d6295(0x10d0),'env_type_pipeline_doc_mark_fail':_0x3d6295(0x7cd),'env_type_pipeline_doc_mark_delete':_0x3d6295(0x5cb),'env_type_pipeline_doc_retry':_0x3d6295(0x280),'env_type_pipeline_retry_failed':'retry_failed'},'engine':{'engine_types_list':'types','engine_templates_list':'templates','engine_template_get':_0x3d6295(0x6f2),'engine_template_preview':'template_preview','env_engine_template_create':_0x3d6295(0xad2),'env_engines_list':_0x3d6295(0x63e),'env_engine_get':_0x3d6295(0xbeb),'env_engine_create':'create','env_engine_patch':_0x3d6295(0xba7),'env_engine_delete':_0x3d6295(0x3b3),'env_engine_restart':_0x3d6295(0x8af),'env_engine_pause':_0x3d6295(0x315),'env_engine_resume':'resume','env_engine_retry':_0x3d6295(0x1116),'env_engine_reset_cursor':_0x3d6295(0xe99),'env_engine_rebuild':_0x3d6295(0x11ab)},'function':{'list_functions':'list','create_function':'create','get_function':_0x3d6295(0xbeb),'update_function':_0x3d6295(0xbb7),'delete_function':'delete','validate_function':_0x3d6295(0x33d),'get_function_template':_0x3d6295(0x1049),'get_function_global':_0x3d6295(0xcb0),'update_function_global':'update_global','delete_function_global':_0x3d6295(0xa05)},'function_run':{'run_function':_0x3d6295(0x110b),'preview_function':'preview','list_function_runs':_0x3d6295(0x2a5),'get_function_run':'get_run'},'processor':{'processor_list':'list','processor_get':'get','processor_retry':_0x3d6295(0x1116),'processor_pause':_0x3d6295(0x315),'processor_resume':_0x3d6295(0x445),'processor_cursor_get':_0x3d6295(0xcb2),'processor_cursor_reset':'cursor_reset'},'sync':{'sync_info':_0x3d6295(0x26c),'sync_peers':_0x3d6295(0x215),'sync_links_list':'links','sync_topology':_0x3d6295(0x423),'sync_join':_0x3d6295(0x3d9),'sync_connect':_0x3d6295(0xf29),'sync_self_patch':_0x3d6295(0x4f9),'sync_links_upsert':_0x3d6295(0x1072),'sync_links_remove':_0x3d6295(0x122a),'sync_reconcile':_0x3d6295(0x108d),'sync_reconcile_all':_0x3d6295(0x2a7),'sync_reconcile_peer':_0x3d6295(0x11ff),'sync_poke':_0x3d6295(0xe43)},'embeddings':{'embeddings_algorithms':_0x3d6295(0x402),'embeddings_providers':_0x3d6295(0x17e),'embeddings_models':_0x3d6295(0xd9f),'embeddings_models_by_provider':_0x3d6295(0x298),'embeddings_probe_ollama_models':_0x3d6295(0xe0d),'embeddings_embedder_models':_0x3d6295(0x13a),'embeddings_engine_stop':_0x3d6295(0x3d3),'embeddings_engine_start':_0x3d6295(0xd0f),'embeddings_engine_restart':_0x3d6295(0xa62),'embeddings_engine_delete':_0x3d6295(0x878),'embeddings_embedder_create':_0x3d6295(0x18e),'embeddings_indexer_create':_0x3d6295(0x1017),'embeddings_search_create':_0x3d6295(0xe26),'embeddings_worker_create':_0x3d6295(0x9db),'embeddings_model_register':'model_register','embeddings_model_delete':_0x3d6295(0x649)},'schema':{'schema_get':_0x3d6295(0xbeb),'schema_set':'set','schema_drop':'drop','violations_list':_0x3d6295(0x8d1),'violations_list_type':_0x3d6295(0x1165),'violation_get':_0x3d6295(0x81b),'ref_violations_list':_0x3d6295(0x978),'ref_violations_list_type':_0x3d6295(0x1c4)},'files':{'files_blob_sync':'blob_sync'}};return _0xd981bb[_0x5adcc2]?.[_0x10da9b]||_0x10da9b;}[_0x461c12(0xf27)](_0x2a0d44,_0xaee171,_0x18b269={}){const _0x5272fa=_0x461c12,_0xcb6366={..._0x18b269||{}};delete _0xcb6366['capability'],delete _0xcb6366['action'];if(_0x2a0d44===_0x5272fa(0xc88)&&_0xaee171===_0x5272fa(0xa28)&&Object[_0x5272fa(0x901)][_0x5272fa(0x9e)][_0x5272fa(0x834)](_0xcb6366,_0x5272fa(0x10be))){_0xcb6366[_0x5272fa(0x11e5)]={..._0xcb6366[_0x5272fa(0x11e5)]||{}};if(!Object[_0x5272fa(0x901)]['hasOwnProperty']['call'](_0xcb6366['options'],_0x5272fa(0x58c))){const _0xe76f61=!!_0xcb6366[_0x5272fa(0x11e5)]['index'];_0xcb6366['options']['startKey']=typeof _0xcb6366[_0x5272fa(0x10be)]==='string'&&!_0xe76f61?_0xcb6366[_0x5272fa(0x10be)]+'\x00':_0xcb6366[_0x5272fa(0x10be)];}}else Object[_0x5272fa(0x901)][_0x5272fa(0x9e)][_0x5272fa(0x834)](_0xcb6366,'cursor')&&!Object['prototype']['hasOwnProperty'][_0x5272fa(0x834)](_0xcb6366,'before')&&(_0x2a0d44===_0x5272fa(0x30b)&&_0xaee171===_0x5272fa(0xb74)||_0x2a0d44===_0x5272fa(0xc88)&&[_0x5272fa(0x65a),'get_item_changelog'][_0x5272fa(0x29c)](_0xaee171))&&(_0xcb6366[_0x5272fa(0x2ea)]=typeof _0xcb6366['cursor']===_0x5272fa(0xf7a)&&/^-?\d+$/['test'](_0xcb6366['cursor'])?parseInt(_0xcb6366[_0x5272fa(0x10be)],0xa):_0xcb6366[_0x5272fa(0x10be)]);return _0x2a0d44===_0x5272fa(0xc88)&&(_0xaee171===_0x5272fa(0xa28)||_0xaee171===_0x5272fa(0x1147))&&Object[_0x5272fa(0x901)][_0x5272fa(0x9e)][_0x5272fa(0x834)](_0xcb6366,_0x5272fa(0xa28))&&!Object[_0x5272fa(0x901)]['hasOwnProperty'][_0x5272fa(0x834)](_0xcb6366,_0x5272fa(0x1103))&&(_0xcb6366[_0x5272fa(0x1103)]=_0xcb6366[_0x5272fa(0xa28)],delete _0xcb6366[_0x5272fa(0xa28)]),_0x2a0d44==='fts'&&Object[_0x5272fa(0x901)][_0x5272fa(0x9e)][_0x5272fa(0x834)](_0xcb6366,'where')&&!Object[_0x5272fa(0x901)][_0x5272fa(0x9e)][_0x5272fa(0x834)](_0xcb6366,_0x5272fa(0x1103))&&(_0xcb6366[_0x5272fa(0x1103)]=_0xcb6366[_0x5272fa(0xb27)],delete _0xcb6366[_0x5272fa(0xb27)]),_0x2a0d44===_0x5272fa(0xc88)&&_0xaee171===_0x5272fa(0xa28)&&Object[_0x5272fa(0x901)][_0x5272fa(0x9e)][_0x5272fa(0x834)](_0xcb6366,'fields')&&(_0xcb6366[_0x5272fa(0x11e5)]={..._0xcb6366[_0x5272fa(0x11e5)]||{},'fields':_0xcb6366[_0x5272fa(0x461)]},delete _0xcb6366['fields']),_0x2a0d44===_0x5272fa(0xc88)&&_0xaee171===_0x5272fa(0xa28)&&Object['prototype'][_0x5272fa(0x9e)][_0x5272fa(0x834)](_0xcb6366,'limit')&&(_0xcb6366[_0x5272fa(0x11e5)]={..._0xcb6366[_0x5272fa(0x11e5)]||{}},!Object[_0x5272fa(0x901)][_0x5272fa(0x9e)][_0x5272fa(0x834)](_0xcb6366[_0x5272fa(0x11e5)],'limit')&&(_0xcb6366[_0x5272fa(0x11e5)][_0x5272fa(0xbae)]=_0xcb6366[_0x5272fa(0xbae)]),delete _0xcb6366[_0x5272fa(0xbae)]),_0x2a0d44==='queue'&&Object['prototype']['hasOwnProperty']['call'](_0xcb6366,'jobType')&&!Object[_0x5272fa(0x901)][_0x5272fa(0x9e)]['call'](_0xcb6366,_0x5272fa(0xaee))&&(_0xcb6366['type']=_0xcb6366[_0x5272fa(0xd97)],delete _0xcb6366['jobType']),_0x2a0d44===_0x5272fa(0xcc7)&&(Array[_0x5272fa(0x10f5)](_0xcb6366[_0x5272fa(0x461)])&&!_0xcb6366[_0x5272fa(0xcc7)]&&(_0xcb6366[_0x5272fa(0xcc7)]=_0xcb6366['fields'][_0x5272fa(0x3d9)]('~')),delete _0xcb6366[_0x5272fa(0x461)],Object[_0x5272fa(0x901)][_0x5272fa(0x9e)][_0x5272fa(0x834)](_0xcb6366,'indexType')&&!Object[_0x5272fa(0x901)][_0x5272fa(0x9e)]['call'](_0xcb6366,_0x5272fa(0x103a))&&(_0xcb6366[_0x5272fa(0x103a)]=_0xcb6366[_0x5272fa(0xe4c)]),delete _0xcb6366[_0x5272fa(0xe4c)],typeof _0xcb6366[_0x5272fa(0x1173)]===_0x5272fa(0xf7a)&&!_0xcb6366[_0x5272fa(0xcc7)]&&(_0xcb6366[_0x5272fa(0xcc7)]=_0xcb6366[_0x5272fa(0x1173)]),delete _0xcb6366[_0x5272fa(0x1173)]),delete _0xcb6366['cursor'],_0xcb6366;}['_mergePropertySchema'](_0x3f7aef,_0x19231b){const _0x4a0c14=_0x461c12;if(!_0x3f7aef)return _0x1dc713(_0x19231b);if(!_0x19231b)return _0x1dc713(_0x3f7aef);const _0x58831d=_0x1dc713(_0x3f7aef)||{},_0x2f852f=_0x1dc713(_0x19231b)||{},_0x5bc73d=[...new Set([..._0x136eb2(_0x58831d[_0x4a0c14(0xaee)]),..._0x136eb2(_0x2f852f[_0x4a0c14(0xaee)])])];if(_0x5bc73d[_0x4a0c14(0x156)]===0x1)_0x58831d['type']=_0x5bc73d[0x0];else{if(_0x5bc73d[_0x4a0c14(0x156)]>0x1)_0x58831d[_0x4a0c14(0xaee)]=_0x5bc73d;}const _0x19bfc0=!_0x58831d[_0x4a0c14(0x428)]||!_0x2f852f[_0x4a0c14(0x428)];_0x19bfc0?delete _0x58831d[_0x4a0c14(0x428)]:_0x58831d[_0x4a0c14(0x428)]=[...new Set([..._0x58831d[_0x4a0c14(0x428)],..._0x2f852f[_0x4a0c14(0x428)]])];for(const _0x36d69b of[_0x4a0c14(0x69d),_0x4a0c14(0x8d0),_0x4a0c14(0x344),_0x4a0c14(0x3dd),'minItems',_0x4a0c14(0xa54),_0x4a0c14(0x9f6)]){_0x58831d[_0x36d69b]===undefined&&_0x2f852f[_0x36d69b]!==undefined&&(_0x58831d[_0x36d69b]=_0x1dc713(_0x2f852f[_0x36d69b]));}if(_0x58831d['items']===undefined&&_0x2f852f['items']!==undefined)_0x58831d[_0x4a0c14(0xe50)]=_0x1dc713(_0x2f852f[_0x4a0c14(0xe50)]);if(_0x2f852f[_0x4a0c14(0x1ef)]){_0x58831d[_0x4a0c14(0x1ef)]??={};for(const [_0x5a1ddc,_0x40bb55]of Object[_0x4a0c14(0x1129)](_0x2f852f[_0x4a0c14(0x1ef)])){_0x58831d[_0x4a0c14(0x1ef)][_0x5a1ddc]=this[_0x4a0c14(0x2d8)](_0x58831d[_0x4a0c14(0x1ef)][_0x5a1ddc],_0x40bb55);}}return _0x58831d;}[_0x461c12(0x394)](_0x26d92f,_0x3438f,_0x56642f={}){const _0x82609=_0x461c12;for(const [_0x5f35bb,_0x5f7000]of Object[_0x82609(0x1129)](_0x56642f||{})){_0x3438f[_0x5f35bb]=this[_0x82609(0x2d8)](_0x3438f[_0x5f35bb],_0x5f7000);}return this[_0x82609(0xecf)](_0x26d92f,_0x3438f);}['_capabilitySchemaOverrides'](_0x169922){const _0x5d178b=_0x461c12;switch(_0x169922){case _0x5d178b(0xc88):return{'fields':{'type':_0x5d178b(0xf9d),'items':{'type':_0x5d178b(0xf7a)}},'cursor':{'type':[_0x5d178b(0xf7a),_0x5d178b(0x10f2),_0x5d178b(0x11e)],'default':null}};case _0x5d178b(0x30b):return{'cursor':{'type':[_0x5d178b(0xf7a),_0x5d178b(0x10f2),'null'],'default':null}};case _0x5d178b(0x879):return{'jobType':{'type':_0x5d178b(0xf7a),'description':_0x5d178b(0x50a)},'cursor':{'type':[_0x5d178b(0xf7a),_0x5d178b(0x11e)]}};case _0x5d178b(0x46b):return{'limit':{'type':_0x5d178b(0x10f2),'default':0x64}};case _0x5d178b(0xcc7):return{'fields':{'type':_0x5d178b(0xf9d),'items':{'type':_0x5d178b(0xf7a)},'description':_0x5d178b(0xeb1)},'indexType':{'type':_0x5d178b(0xf7a),'description':'Convenience\x20alias\x20for\x20the\x20index\x20kind,\x20e.g.\x20\x22geo\x22.\x20Maps\x20to\x20the\x20canonical\x20typeHint/body.type\x20field.'}};case _0x5d178b(0x2db):return{'env':{'type':_0x5d178b(0xf7a),'default':_0x5d178b(0x8d0),'description':_0x5d178b(0x1243)}};case _0x5d178b(0x63b):return{'env':{'type':_0x5d178b(0xf7a),'default':_0x5d178b(0x8d0),'description':'Environment\x20name.\x20Defaults\x20to\x20\x22default\x22.'}};default:return{};}}[_0x461c12(0xecf)](_0x152f7c,_0x5e391a){const _0x7d4093=_0x461c12,_0x139288={..._0x5e391a||{}};return _0x139288[_0x7d4093(0x30b)]&&typeof _0x139288[_0x7d4093(0x30b)]==='object'&&(_0x139288['env']={..._0x139288[_0x7d4093(0x30b)],'description':_0x7d4093(0x9da)},delete _0x139288['env'][_0x7d4093(0x8d0)]),_0x152f7c===_0x7d4093(0xc88)&&(delete _0x139288[_0x7d4093(0x2ea)],delete _0x139288[_0x7d4093(0x11e5)]),_0x152f7c===_0x7d4093(0x30b)&&(delete _0x139288[_0x7d4093(0x2ea)],delete _0x139288['after']),_0x152f7c===_0x7d4093(0x879)&&(delete _0x139288[_0x7d4093(0x11e5)],delete _0x139288['type']),_0x152f7c===_0x7d4093(0xfca)&&delete _0x139288[_0x7d4093(0x1103)],_0x152f7c===_0x7d4093(0x46b)&&_0x139288[_0x7d4093(0xbae)]&&(_0x139288[_0x7d4093(0xbae)]={'type':'integer','default':0x64}),_0x139288;}[_0x461c12(0x6ff)](_0xc769a9,_0x4cee02,_0x1134ec){const _0x56cdb1=_0x461c12,_0x4a9918=new Set([_0x56cdb1(0x942),..._0x1134ec[_0x56cdb1(0x359)]||[]]);return _0xc769a9===_0x56cdb1(0xc88)&&_0x4cee02==='query'&&_0x4a9918[_0x56cdb1(0x3b3)](_0x56cdb1(0x1103)),_0xc769a9===_0x56cdb1(0x879)&&_0x4cee02==='enqueue'&&(_0x4a9918[_0x56cdb1(0x3b3)](_0x56cdb1(0xaee)),_0x4a9918[_0x56cdb1(0x33c)](_0x56cdb1(0xd97))),_0xc769a9===_0x56cdb1(0xcc7)&&[_0x56cdb1(0x725),'delete','rebuild',_0x56cdb1(0x8d1)][_0x56cdb1(0x29c)](_0x4cee02)&&_0x4a9918[_0x56cdb1(0x3b3)](_0x56cdb1(0xcc7)),[..._0x4a9918];}['_buildCapabilityIndex'](_0x399bde=this[_0x461c12(0x88c)]()){const _0x5c9dd0=_0x461c12,_0x12801c={};for(const _0x30c97f of _0x399bde){const _0xc4760c=_0x30c97f['operation'],_0x3a57da=_0xc4760c[_0x5c9dd0(0xa8b)]?.[_0x5c9dd0(0x942)]??_0xc4760c['id'],_0x6334d8=this[_0x5c9dd0(0x9d2)](_0x30c97f);if(!_0x6334d8)continue;if(this['_systemToolNames']()[_0x5c9dd0(0x9d0)](_0x3a57da))continue;const _0x596dbc=this['_normalizedActionName'](_0x6334d8,_0x3a57da);_0x12801c[_0x6334d8]??=[],_0x12801c[_0x6334d8][_0x5c9dd0(0x597)]({'action':_0x596dbc,'route':_0x30c97f});}for(const [_0x254811,_0x56c887]of Object[_0x5c9dd0(0x1129)](_0x12801c)){const _0x2ba095=new Map();for(const _0x1c2065 of _0x56c887){!_0x2ba095[_0x5c9dd0(0x9d0)](_0x1c2065[_0x5c9dd0(0x942)])&&_0x2ba095[_0x5c9dd0(0x211)](_0x1c2065['action'],_0x1c2065);}_0x12801c[_0x254811]=[..._0x2ba095[_0x5c9dd0(0x231)]()]['sort']((_0x5bf85c,_0x416bf5)=>_0x5bf85c[_0x5c9dd0(0x942)][_0x5c9dd0(0x666)](_0x416bf5[_0x5c9dd0(0x942)]));}return _0x12801c;}[_0x461c12(0xd2)](_0x248b16=this[_0x461c12(0x88c)]()){const _0x53b91b=_0x461c12;return _0x248b16[_0x53b91b(0x1103)](_0x32129b=>this[_0x53b91b(0x1247)]()[_0x53b91b(0x9d0)](_0x32129b[_0x53b91b(0x4dd)]?.[_0x53b91b(0xa8b)]?.[_0x53b91b(0x942)]??_0x32129b[_0x53b91b(0x4dd)]?.['id']))[_0x53b91b(0x1166)](_0x1a386d=>({'name':_0x1a386d[_0x53b91b(0x4dd)][_0x53b91b(0xa8b)]?.[_0x53b91b(0x942)]??_0x1a386d[_0x53b91b(0x4dd)]['id'],'description':_0x1a386d[_0x53b91b(0x4dd)][_0x53b91b(0x69d)]||_0x1a386d[_0x53b91b(0x4dd)][_0x53b91b(0x541)]||_0x1a386d[_0x53b91b(0x4dd)]['id'],'inputSchema':_0x1a386d['operation'][_0x53b91b(0x1210)]||{'type':_0x53b91b(0xb36),'properties':{},'additionalProperties':![]},'annotations':this[_0x53b91b(0xc8)](_0x1a386d[_0x53b91b(0x4dd)],_0x1a386d[_0x53b91b(0x4dd)][_0x53b91b(0x1210)])}))['sort']((_0x39db8a,_0x52d262)=>_0x39db8a['name'][_0x53b91b(0x666)](_0x52d262[_0x53b91b(0x1173)]));}[_0x461c12(0xa96)](_0x52a831){const _0x212f08=_0x461c12;switch(_0x52a831){case'data':return _0x212f08(0x91c)+_0x212f08(0x8ce)+_0x212f08(0x1220)+_0x212f08(0x7e1)+_0x212f08(0xa4e)+_0x212f08(0x34e)+_0x212f08(0x5cc)+_0x212f08(0x920)+_0x212f08(0x552)+_0x212f08(0x5b8)+_0x212f08(0x94)+_0x212f08(0x2c4)+'Discovery:\x20okdb_env\x20action=\x22list\x22\x20for\x20envs;\x20okdb_type\x20action=\x22list\x22\x20for\x20types;\x20okdb_type\x20action=\x22describe\x22\x20for\x20type\x20fields.';case _0x212f08(0x30b):return _0x212f08(0xe15)+_0x212f08(0x11be)+'delete\x20(name;\x20pass\x20keepSubEnvs=[...]\x20to\x20preserve\x20specific\x20child\x20envs);\x20compact\x20(reclaim\x20space);\x20'+_0x212f08(0xc13);case _0x212f08(0xaee):return _0x212f08(0xf97)+_0x212f08(0x3a6)+_0x212f08(0x111f)+_0x212f08(0xbc7);case _0x212f08(0xcc7):return'Manage\x20secondary\x20indexes.\x20Pass\x20fields\x20(array\x20of\x20dotted\x20field\x20paths)\x20—\x20MCP\x20joins\x20them\x20with\x20\x22~\x22\x20to\x20form\x20the\x20canonical\x20index\x20id;\x20'+'use\x20indexType=\x22geo\x22\x20for\x20geospatial.\x20'+_0x212f08(0xf74)+'delete;\x20rebuild;\x20violations\x20(rows\x20that\x20would\x20break\x20the\x20index);\x20unique_violations\x20(duplicate\x20keys\x20for\x20unique\x20indexes).\x20'+_0x212f08(0xe0c);case _0x212f08(0xfca):return'Full-text\x20search\x20indexes.\x20Multiple\x20FTS\x20indexes\x20per\x20type\x20are\x20supported,\x20identified\x20by\x20ftsName.\x20'+_0x212f08(0xe53)+_0x212f08(0x10a3);case _0x212f08(0x879):return _0x212f08(0xd66)+_0x212f08(0xa3a)+_0x212f08(0xc6)+_0x212f08(0x37e)+'get\x20(env+id);\x20list\x20(env,\x20optional\x20status/bucket/tag/sort/direction/limit/cursor);\x20'+'claim\x20(env+jobType,\x20optional\x20concurrency\x20→\x20atomically\x20claim\x20next\x20job\x20for\x20a\x20worker);\x20'+_0x212f08(0xefc)+_0x212f08(0xa6c)+_0x212f08(0x9a0)+'Cleanup\x20actions:\x20clear_done,\x20clear_failed,\x20clear_stuck,\x20retry_failed\x20(all\x20env-scoped).\x20'+_0x212f08(0x7cb)+'Diagnostics:\x20stats,\x20stats_rebuild,\x20types,\x20reconcile.';case _0x212f08(0x46b):return _0x212f08(0xc70)+_0x212f08(0x130)+_0x212f08(0xf33)+_0x212f08(0x9a2)+'docs_list,\x20doc_get,\x20doc_mark_done,\x20doc_mark_fail,\x20doc_mark_delete,\x20doc_retry,\x20retry_failed.\x20'+_0x212f08(0x930);case _0x212f08(0xcbd):return _0x212f08(0x5b6)+_0x212f08(0x1079)+_0x212f08(0xaec);case'function':return'Stored\x20functions\x20(named\x20server-side\x20JS\x20arrow\x20functions\x20invoked\x20via\x20okdb_function_run\x20or\x20as\x20queue\x20/\x20pipeline\x20steps).\x20'+_0x212f08(0x8cb)+'Global\x20(system-wide)\x20variants:\x20get_global,\x20update_global,\x20delete_global.\x20'+'unsafe=true\x20grants\x20ctx.okdb\x20cross-env\x20access\x20—\x20use\x20with\x20care.';case'function_run':return _0x212f08(0xd89)+_0x212f08(0x10fa)+_0x212f08(0x119b)+_0x212f08(0xfee);case _0x212f08(0xf39):return'Inspect\x20and\x20control\x20change\x20processors\x20(subscribers\x20that\x20react\x20to\x20writes\x20on\x20a\x20type).\x20'+_0x212f08(0x870);case _0x212f08(0x1034):return _0x212f08(0x4b4)+_0x212f08(0x982)+_0x212f08(0x7a4)+_0x212f08(0xaf0)+_0x212f08(0xbc)+'GC:\x20sync_gc_status,\x20sync_gc_run,\x20sync_gc_peer_resync.\x20Low-level:\x20sync_delta.';case _0x212f08(0x7f1):return'Build\x20and\x20operate\x20semantic-search\x20infrastructure\x20(lower\x20level\x20than\x20okdb_pipeline\x20embeddings).\x20'+_0x212f08(0x8f2)+_0x212f08(0xe3e)+_0x212f08(0x940)+'Engine\x20instance\x20creation:\x20embedder_create\x20(name+provider+model+baseUrl?),\x20indexer_create,\x20search_create,\x20worker_create.\x20'+_0x212f08(0x32f)+_0x212f08(0xc7d);case _0x212f08(0xf5b):return _0x212f08(0xde)+_0x212f08(0x8a4);case'admin':return'Manage\x20admin\x20API\x20tokens\x20(the\x20bearer\x20credentials\x20used\x20for\x20programmatic\x20access).\x20'+_0x212f08(0x4d0)+_0x212f08(0x21a);case _0x212f08(0xdce):return _0x212f08(0x39d)+_0x212f08(0x1026)+'Actions:\x20get\x20(env+type\x20→\x20fetch\x20the\x20schema\x20definition\x20and\x20enforce\x20flag,\x20or\x20null);\x20'+_0x212f08(0x616)+_0x212f08(0x369)+'violations\x20/\x20violations_type\x20/\x20violation_get\x20(rows\x20that\x20fail\x20JSON-Schema\x20validation);\x20'+_0x212f08(0x473);case _0x212f08(0xaa5):return _0x212f08(0x2a8)+_0x212f08(0xc1)+_0x212f08(0x1068)+_0x212f08(0xf8d);case'data_delta':return _0x212f08(0x9af);default:return'Manage\x20'+_0x52a831+'.';}}[_0x461c12(0x28f)](_0x55ba5a){const _0x2a29d3=_0x461c12,_0x2f08ec=this[_0x2a29d3(0x9d2)](_0x55ba5a[0x0][_0x2a29d3(0xd98)]),_0x1b8ca5=_0x55ba5a[_0x2a29d3(0x156)]>0x0&&_0x55ba5a[_0x2a29d3(0x244)](({route:_0x44df44})=>!!_0x44df44[_0x2a29d3(0x4dd)]?.['inputSchema']?.[_0x2a29d3(0x1ef)]?.[_0x2a29d3(0x30b)]),_0x2954e0={'action':{'type':_0x2a29d3(0xf7a),'enum':[...new Set(_0x55ba5a['map'](({action:_0x435a46})=>_0x435a46))][_0x2a29d3(0x3f6)]()}};for(const {route:_0x30c597}of _0x55ba5a){const _0x3db185=_0x30c597['operation']?.['inputSchema']||{'properties':{}},_0x401237=this['_sanitizeCapabilityProperties'](_0x2f08ec,_0x3db185[_0x2a29d3(0x1ef)]||{});this[_0x2a29d3(0x394)](_0x2f08ec,_0x2954e0,_0x401237);}return Object[_0x2a29d3(0x299)](_0x2954e0,this[_0x2a29d3(0x8d9)](_0x2f08ec)),{'type':_0x2a29d3(0xb36),'required':_0x1b8ca5?['action','env']:['action'],'properties':_0x2954e0,'additionalProperties':!![]};}async[_0x461c12(0x3a8)](_0x3e85db,_0x9cab60){const _0x3faffc=_0x461c12;if(!_0x3e85db||!_0x9cab60)return null;const _0xdf401b=this[_0x3faffc(0xd4f)][_0x3faffc(0xa3)][_0x3faffc(0xbeb)](_0x3e85db);if(!_0xdf401b)return null;const _0x36d9e1=await _0xdf401b[_0x3faffc(0x7d3)][_0x3faffc(0xbeb)](_0x9cab60)['catch'](()=>null),_0x5d621d=Array[_0x3faffc(0x10f5)](_0x36d9e1?.['engines'])?_0x36d9e1[_0x3faffc(0xab8)]:[];for(const _0x50c7be of _0x5d621d){const _0x3ca2a6=this['okdb']['engines'][_0x3faffc(0xab8)][_0x3faffc(0xbeb)](_0x50c7be[_0x3faffc(0xaee)]+'@'+_0x50c7be[_0x3faffc(0x1173)]),_0x27fc7b=_0x3ca2a6?.[_0x3faffc(0xad3)]?.[_0x3faffc(0x142)]?.[_0x3faffc(0x481)]??null;if(typeof _0x27fc7b===_0x3faffc(0xf7a)&&_0x27fc7b)return _0x27fc7b;}const _0x56d464=_0x3e85db+':'+_0x9cab60,_0x62fc46=[_0x3faffc(0xde3)+_0x56d464,_0x3faffc(0xca7)+_0x56d464];for(const _0x45c8df of _0x62fc46){const _0x1727eb=this['okdb'][_0x3faffc(0xab8)][_0x3faffc(0xab8)][_0x3faffc(0xbeb)](_0x45c8df),_0x1ff61c=_0x1727eb?.[_0x3faffc(0xad3)]?.[_0x3faffc(0x142)]?.[_0x3faffc(0x481)]??null;if(typeof _0x1ff61c==='string'&&_0x1ff61c)return _0x1ff61c;}return null;}[_0x461c12(0xc8)](_0x164d23,_0x5c0dfd=_0x164d23?.[_0x461c12(0x1210)]){const _0x105119=_0x461c12;return{'title':_0x164d23[_0x105119(0x541)]||_0x164d23['id'],'readOnlyHint':_0x164d23[_0x105119(0xa8b)]?.[_0x105119(0x300)]??!!_0x164d23[_0x105119(0x653)]?.[_0x105119(0x866)],'destructiveHint':!!_0x164d23[_0x105119(0x653)]?.['destructive'],'idempotentHint':!!_0x164d23[_0x105119(0x653)]?.[_0x105119(0x866)],'openWorldHint':_0x5c0dfd?.[_0x105119(0x9f6)]!==![]};}[_0x461c12(0xdc)](_0x30e8f9=[]){const _0x28e938=_0x461c12;return(_0x30e8f9||[])[_0x28e938(0xc3c)](0x0,0x3)[_0x28e938(0x1166)](_0x454110=>{const _0x26de9d=_0x28e938,_0x1f05a7=_0x454110?.[_0x26de9d(0x221)]||'argument',_0x166e6c=_0x454110?.['message']||_0x26de9d(0x2a6),_0x57334e=_0x454110?.['expected']?_0x26de9d(0x7cc)+_0x454110[_0x26de9d(0x957)]+')':'',_0x29b94d=Object['prototype'][_0x26de9d(0x9e)]['call'](_0x454110||{},_0x26de9d(0x65c))?_0x26de9d(0xaf4)+JSON[_0x26de9d(0xf75)](_0x454110['actual']):'';return _0x1f05a7+'\x20'+_0x166e6c+_0x57334e+_0x29b94d;})['join'](';\x20');}[_0x461c12(0xd57)](_0x4bd079=this[_0x461c12(0x3cc)]()){const _0x453811=_0x461c12;return Object[_0x453811(0x1129)](_0x4bd079)[_0x453811(0x1166)](([_0x4c8f85,_0xed21c5])=>({'name':this['_capabilityNameForTool'](_0x4c8f85),'description':this['_buildCapabilityDescription'](_0x4c8f85),'inputSchema':this[_0x453811(0x28f)](_0xed21c5),'annotations':{'title':this['_capabilityNameForTool'](_0x4c8f85),'readOnlyHint':_0xed21c5[_0x453811(0x244)](({route:_0x59ae15})=>_0x59ae15[_0x453811(0x4dd)]?.[_0x453811(0xa8b)]?.[_0x453811(0x300)]??!!_0x59ae15[_0x453811(0x4dd)]?.[_0x453811(0x653)]?.[_0x453811(0x866)]),'destructiveHint':_0xed21c5['some'](({route:_0x35466a})=>!!_0x35466a[_0x453811(0x4dd)]?.['safety']?.[_0x453811(0x122d)]),'idempotentHint':_0xed21c5[_0x453811(0x244)](({route:_0x3953dc})=>!!_0x3953dc['operation']?.['safety']?.[_0x453811(0x866)]),'openWorldHint':_0xed21c5[_0x453811(0xa83)](({route:_0x12063d})=>_0x12063d['operation']?.[_0x453811(0x1210)]?.[_0x453811(0x9f6)]!==![])}}))[_0x453811(0x3f6)]((_0x23712a,_0x1a908f)=>_0x23712a['name'][_0x453811(0x666)](_0x1a908f[_0x453811(0x1173)]));}[_0x461c12(0x5eb)](_0x4daf04,_0x430005=this[_0x461c12(0x88c)]()){const _0x91cfa2=_0x461c12;return _0x430005[_0x91cfa2(0xbdd)](_0xbea5da=>(_0xbea5da[_0x91cfa2(0x4dd)]?.[_0x91cfa2(0xa8b)]?.[_0x91cfa2(0x942)]??_0xbea5da[_0x91cfa2(0x4dd)]?.['id'])===_0x4daf04&&this['_systemToolNames']()['has'](_0x4daf04));}[_0x461c12(0xc00)](_0x1b7faf,_0x5121fe,_0x5adf18=this[_0x461c12(0x3cc)]()){const _0x2f0aae=_0x461c12;return _0x5adf18[_0x1b7faf]?.[_0x2f0aae(0xbdd)](_0x549658=>_0x549658[_0x2f0aae(0x942)]===_0x5121fe)||null;}['_resolveCapabilityAction'](_0x545802,_0x3d55e1,_0x2778d2={},_0x4c50e3=this[_0x461c12(0x3cc)]()){const _0x22a38c=_0x461c12;if(_0x545802==='pipeline'&&_0x3d55e1===_0x22a38c(0x63e)&&(_0x2778d2?.[_0x22a38c(0xaee)]==null||_0x2778d2?.['type']===''))return this[_0x22a38c(0xc00)](_0x545802,'generic_list',_0x4c50e3)||this[_0x22a38c(0xc00)](_0x545802,_0x3d55e1,_0x4c50e3);return this[_0x22a38c(0xc00)](_0x545802,_0x3d55e1,_0x4c50e3);}async[_0x461c12(0x72e)](_0x1c1888,_0x8ddf7c,_0x15ec29){const _0x121109=_0x461c12;if(_0x8ddf7c?.['operation']?.['id']?.[_0x121109(0x8ba)](_0x121109(0xd3c))&&_0x8ddf7c?.[_0x121109(0x4dd)]?.[_0x121109(0x1210)]?.['properties']?.['type']&&(_0x15ec29?.[_0x121109(0xaee)]==null||_0x15ec29?.[_0x121109(0xaee)]==='')&&typeof _0x15ec29?.[_0x121109(0x30b)]===_0x121109(0xf7a)&&_0x15ec29['env']&&typeof _0x15ec29?.[_0x121109(0x46b)]===_0x121109(0xf7a)&&_0x15ec29['pipeline']){const _0x367e01=await this[_0x121109(0x3a8)](_0x15ec29[_0x121109(0x30b)],_0x15ec29[_0x121109(0x46b)]);if(_0x367e01)_0x15ec29={..._0x15ec29,'type':_0x367e01};}const _0x22cd3a=_0x8ddf7c?.[_0x121109(0x4dd)]?.[_0x121109(0x1210)]?.[_0x121109(0x1ef)]?.[_0x121109(0x30b)];if(_0x22cd3a&&(_0x15ec29?.[_0x121109(0x30b)]==null||_0x15ec29?.['env']==='')){const _0x49f06a=new Error(_0x121109(0xb79)+_0x1c1888+_0x121109(0x136));_0x49f06a['jsonrpcCode']=-0x7f5a,_0x49f06a[_0x121109(0x933)]=[{'field':'env','message':_0x121109(0x1157),'expected':_0x121109(0xcf5),'actual':_0x15ec29?.[_0x121109(0x30b)]}];throw _0x49f06a;}const _0x2feaa4=this[_0x121109(0xd4f)]['http'][_0x121109(0xfde)](_0x8ddf7c,_0x15ec29);if(_0x2feaa4){const _0x304517=this[_0x121109(0xdc)](_0x2feaa4[_0x121109(0x933)]),_0x137365=new Error(_0x304517?'Invalid\x20arguments\x20for\x20'+_0x1c1888+':\x20'+_0x304517:_0x121109(0x2c0)+_0x1c1888);_0x137365[_0x121109(0x6c3)]=-0x7f5a,_0x137365[_0x121109(0x933)]=_0x2feaa4[_0x121109(0x933)];throw _0x137365;}const _0x38d9d2=this['_projectHttpCall'](_0x8ddf7c,_0x15ec29),_0x22e265=await this[_0x121109(0xd4f)][_0x121109(0x9f4)][_0x121109(0xaf9)](_0x8ddf7c['method'],_0x38d9d2['path'],{'headers':_0x38d9d2[_0x121109(0xcc4)],'query':_0x38d9d2[_0x121109(0xa28)],'body':_0x38d9d2[_0x121109(0xce8)]},{'internal':!![],'transport':_0x121109(0xa8b),'mcp':!![]});if((_0x22e265[_0x121109(0xfcd)]||0xc8)>=0x190){const _0x840c80=new Error(_0x22e265[_0x121109(0xce8)]?.['error']||_0x22e265[_0x121109(0xce8)]?.[_0x121109(0x80e)]?.[_0x121109(0x225)]||'HTTP\x20'+_0x22e265[_0x121109(0xfcd)]);if(_0x22e265['status']===0x190)_0x840c80[_0x121109(0x6c3)]=-0x7f5a;throw _0x840c80;}const _0x98689b=Object['prototype'][_0x121109(0x9e)][_0x121109(0x834)](_0x22e265['body']??{},_0x121109(0x80e))?_0x22e265[_0x121109(0xce8)][_0x121109(0x80e)]:_0x22e265[_0x121109(0xce8)],_0x162d89=_0x98689b===undefined||_0x98689b===null?'ok':JSON['stringify'](_0x98689b);return{'content':[{'type':_0x121109(0x1fb),'text':_0x162d89}]};}[_0x461c12(0xe2d)](_0x5efdbd){const _0x838dd4=_0x461c12,_0xa1561d=Object[_0x838dd4(0xa52)](_0x5efdbd)[_0x838dd4(0x3f6)]();if(_0xa1561d[_0x838dd4(0x156)]===0x0)return null;const _0x4cab6f=[...new Set(_0xa1561d['flatMap'](_0x18be09=>(_0x5efdbd[_0x18be09]||[])[_0x838dd4(0x1166)](_0x5ed8c7=>_0x5ed8c7['action'])))][_0x838dd4(0x3f6)](),_0x18ffe4={};for(const _0x4c1114 of _0xa1561d){for(const {route:_0x48fb11}of _0x5efdbd[_0x4c1114]||[]){const _0x5ea2fb=this[_0x838dd4(0xecf)](_0x4c1114,_0x48fb11[_0x838dd4(0x4dd)]?.[_0x838dd4(0x1210)]?.['properties']||{});for(const [_0x3afb4c,_0x577f79]of Object[_0x838dd4(0x1129)](_0x5ea2fb)){if(_0x3afb4c==='action')continue;_0x18ffe4[_0x3afb4c]=this[_0x838dd4(0x2d8)](_0x18ffe4[_0x3afb4c],_0x577f79);}}}return{'name':_0x838dd4(0xd4f),'description':_0x838dd4(0x121e)+_0x838dd4(0x12f)+_0x838dd4(0xd16)+_0x838dd4(0xae2)+_0x838dd4(0xe88),'inputSchema':{'type':_0x838dd4(0xb36),'required':[_0x838dd4(0xd4),_0x838dd4(0x942)],'properties':{'capability':{'type':_0x838dd4(0xf7a),'enum':_0xa1561d,'description':_0x838dd4(0xbd6)},'action':{'type':_0x838dd4(0xf7a),'enum':_0x4cab6f,'description':_0x838dd4(0x3eb)},..._0x18ffe4},'additionalProperties':!![]},'annotations':{'title':_0x838dd4(0xd4f),'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':![],'openWorldHint':!![]}};}[_0x461c12(0xe06)](){const _0x336d7c=_0x461c12,_0x49d5c0=this['_listMcpRoutes'](),_0x5eb6a6=this[_0x336d7c(0x3cc)](_0x49d5c0),_0x3ef3f3=[...this[_0x336d7c(0xd57)](_0x5eb6a6),...this[_0x336d7c(0xd2)](_0x49d5c0),this[_0x336d7c(0xf61)]()];return _0x3ef3f3[_0x336d7c(0x3f6)]((_0x2c0961,_0xa8747b)=>_0x2c0961['name'][_0x336d7c(0x666)](_0xa8747b[_0x336d7c(0x1173)])),{'tools':_0x3ef3f3};}async[_0x461c12(0xa99)](_0x4733f0,_0x1a00ed=null){const _0x48c7f4=_0x461c12;if(!_0x4733f0||typeof _0x4733f0!=='object'){const _0x497015=new Error(_0x48c7f4(0x8c9));_0x497015[_0x48c7f4(0x6c3)]=-0x7f5a;throw _0x497015;}const {name:_0x4b9fa2,arguments:_0x56a7f4={}}=_0x4733f0;if(_0x4b9fa2===_0x48c7f4(0x15f))return this[_0x48c7f4(0xef8)](_0x56a7f4,_0x1a00ed);const _0x139fd0=this[_0x48c7f4(0x88c)](),_0x2e75dc=this[_0x48c7f4(0x3cc)](_0x139fd0);if(_0x4b9fa2===_0x48c7f4(0xd4f)){const {capability:_0x424caf,action:_0x30325d,..._0xba5d24}=_0x56a7f4;if(!_0x424caf||!_0x30325d){const _0x1f4761=new Error(_0x48c7f4(0xdf));_0x1f4761[_0x48c7f4(0x6c3)]=-0x7f5a;throw _0x1f4761;}const _0x509e0b=this[_0x48c7f4(0x377)](_0x424caf,_0x30325d,_0xba5d24,_0x2e75dc);if(!_0x509e0b)throw this[_0x48c7f4(0xbbf)](_0x48c7f4(0x724)+_0x424caf+':'+_0x30325d);return this[_0x48c7f4(0x72e)](_0x48c7f4(0xb92)+_0x424caf+':'+_0x30325d,_0x509e0b[_0x48c7f4(0xd98)],this[_0x48c7f4(0xf27)](_0x424caf,_0x30325d,_0xba5d24));}if(_0x4b9fa2[_0x48c7f4(0x8ba)](_0x48c7f4(0x746))){const _0x3eac6e=_0x4b9fa2['slice'](_0x48c7f4(0x746)['length']),_0x1d735e=_0x56a7f4['action'];if(!_0x1d735e){const _0x4213a6=new Error('Missing\x20action\x20for\x20'+_0x4b9fa2);_0x4213a6[_0x48c7f4(0x6c3)]=-0x7f5a;throw _0x4213a6;}const _0x5cc81a=this[_0x48c7f4(0x377)](_0x3eac6e,_0x1d735e,_0x56a7f4,_0x2e75dc);if(!_0x5cc81a)throw this[_0x48c7f4(0xbbf)]('tools/call:'+_0x4b9fa2);return this[_0x48c7f4(0x72e)](_0x4b9fa2+':'+_0x1d735e,_0x5cc81a[_0x48c7f4(0xd98)],this['_routeArgsForCapability'](_0x3eac6e,_0x1d735e,_0x56a7f4));}const _0x5587f5=this['_findStandaloneRoute'](_0x4b9fa2,_0x139fd0);if(!_0x5587f5)throw this['_methodNotFound'](_0x48c7f4(0xca5)+_0x4b9fa2);return this[_0x48c7f4(0x72e)](_0x4b9fa2,_0x5587f5,_0x56a7f4);}['_projectHttpCall'](_0x40e27e,_0x1792cc){const _0x17eb67=_0x461c12,_0xa257a4=_0x40e27e[_0x17eb67(0x4dd)],_0x39c689=_0xa257a4[_0x17eb67(0x9f4)]?.['querySchema']?.[_0x17eb67(0x1ef)]||{},_0x2fa710=new Set((_0xa257a4['pathParams']||[])[_0x17eb67(0x1166)](_0x508886=>_0x508886[_0x17eb67(0x1173)])),_0x10cf2c=new Set(Object[_0x17eb67(0xa52)](_0x39c689)),_0x806872={},_0x21595d={};let _0x5774f5=_0x40e27e[_0x17eb67(0x20b)];const _0x4d7187={};for(const _0x51e193 of _0xa257a4[_0x17eb67(0x749)]||[]){const _0x5af175=Object['prototype'][_0x17eb67(0x9e)]['call'](_0x1792cc,_0x51e193[_0x17eb67(0x1173)])?_0x1792cc[_0x51e193['name']]:_0x51e193[_0x17eb67(0x8d0)];if(_0x5af175==null&&_0x51e193[_0x17eb67(0x359)])throw new Error('Missing\x20required\x20argument:\x20'+_0x51e193[_0x17eb67(0x1173)]);_0x4d7187[_0x51e193[_0x17eb67(0x1173)]]=_0x5af175;}_0x5774f5=_0x5774f5[_0x17eb67(0x8d8)](/\[([^\]]*)\]/g,(_0x452ece,_0x5c1289)=>{return _0x5c1289['replace'](/:(\w+)(?:=([^/\]]+))?/g,(_0x366f34,_0x1b43b8,_0x54a5e4)=>{const _0x3e6370=_0x4d7187[_0x1b43b8]??_0x54a5e4;return _0x3e6370==null?'':encodeURIComponent(String(_0x3e6370));});}),_0x5774f5=_0x5774f5[_0x17eb67(0x8d8)](/:(\w+)/g,(_0x4bca9f,_0x23e749)=>encodeURIComponent(String(_0x4d7187[_0x23e749]))),_0x5774f5=_0x5774f5[_0x17eb67(0x8d8)](/\/+/g,'/')[_0x17eb67(0x8d8)](/\/$/,'')||'/';for(const [_0x66bf16,_0x36cfd6]of Object[_0x17eb67(0x1129)](_0x1792cc)){if(_0x2fa710[_0x17eb67(0x9d0)](_0x66bf16))continue;if(_0x10cf2c[_0x17eb67(0x9d0)](_0x66bf16)){_0x36cfd6!=null&&(_0x21595d[_0x66bf16]=typeof _0x36cfd6===_0x17eb67(0xb36)?JSON[_0x17eb67(0xf75)](_0x36cfd6):String(_0x36cfd6));continue;}_0x806872[_0x66bf16]=_0x36cfd6;}let _0x37beb5;const _0x554442={};if(_0xa257a4[_0x17eb67(0x9f4)]?.[_0x17eb67(0xa2b)])for(const [_0x2db5dd,_0x31d872]of Object['entries'](_0xa257a4[_0x17eb67(0x9f4)][_0x17eb67(0xa2b)])){if(!Object[_0x17eb67(0x901)][_0x17eb67(0x9e)][_0x17eb67(0x834)](_0x806872,_0x2db5dd))continue;if(_0x31d872==='body')continue;if(typeof _0x31d872!==_0x17eb67(0xf7a)||!_0x31d872[_0x17eb67(0x8ba)](_0x17eb67(0x10e1)))continue;const _0x397a68=_0x806872[_0x2db5dd];delete _0x806872[_0x2db5dd];const _0x277f51=_0x31d872['slice'](_0x17eb67(0x10e1)[_0x17eb67(0x156)])['split']('.')['filter'](Boolean);if(_0x277f51[_0x17eb67(0x156)]===0x0)continue;let _0x1599ae=_0x554442;while(_0x277f51[_0x17eb67(0x156)]>0x1){const _0x504c96=_0x277f51[_0x17eb67(0x9fc)]();_0x1599ae[_0x504c96]??={},_0x1599ae=_0x1599ae[_0x504c96];}_0x1599ae[_0x277f51[0x0]]=_0x397a68;}const _0x232d36=_0xa257a4[_0x17eb67(0x9f4)]?.['bindings']?Object[_0x17eb67(0xa52)](_0xa257a4[_0x17eb67(0x9f4)]['bindings'])[_0x17eb67(0xbdd)](_0x5050e1=>_0xa257a4['http']['bindings'][_0x5050e1]===_0x17eb67(0xce8)):null;if(_0x232d36&&Object[_0x17eb67(0x901)]['hasOwnProperty'][_0x17eb67(0x834)](_0x806872,_0x232d36))_0x37beb5=_0x806872[_0x232d36];else{const _0x4463c2=Object['keys'](_0x554442)[_0x17eb67(0x156)]>0x0?{..._0x806872,..._0x554442}:_0x806872;switch(_0xa257a4[_0x17eb67(0x9f4)]?.[_0x17eb67(0x1151)]){case'none':_0x37beb5=null;break;case _0x17eb67(0x11fb):_0x37beb5=_0x4463c2;break;case _0x17eb67(0xb36):case _0x17eb67(0xcd7):default:_0x37beb5=Object[_0x17eb67(0xa52)](_0x4463c2)[_0x17eb67(0x156)]>0x0?_0x4463c2:null;break;}}return{'path':_0x5774f5,'query':_0x21595d,'body':_0x37beb5,'headers':{'content-type':_0x17eb67(0xf9b)}};}[_0x461c12(0xc15)](_0x5baebf){const _0x2a6112=_0x461c12,_0x283a47=_0x5baebf?.['operation'];if(!_0x283a47?.[_0x2a6112(0xb07)])return![];if(_0x5baebf['meta']?.[_0x2a6112(0xc59)])return![];if(_0x283a47['access']?.[_0x2a6112(0x960)])return![];if(_0x283a47[_0x2a6112(0x9f4)]?.[_0x2a6112(0x10bb)]&&_0x283a47['http'][_0x2a6112(0x10bb)]!==_0x2a6112(0xe40))return![];const _0x119866=_0x283a47['access']?.[_0x2a6112(0xfd6)];if(!Array[_0x2a6112(0x10f5)](_0x119866)||!_0x119866[_0x2a6112(0x29c)](_0x2a6112(0xa8b)))return![];return!![];}[_0x461c12(0x505)](_0x489bd1,_0x36fe68){const _0x51d33a=_0x461c12,_0x6779b3=String(_0x489bd1||'')[_0x51d33a(0x96d)](),_0x37a096=String(_0x36fe68||'');return this[_0x51d33a(0xd4f)]['http'][_0x51d33a(0x53a)]()[_0x51d33a(0xbdd)](_0xed8327=>_0xed8327[_0x51d33a(0xfc5)]===_0x6779b3&&_0xed8327[_0x51d33a(0x20b)]===_0x37a096)||null;}[_0x461c12(0xf61)](){const _0x11dbce=_0x461c12;return{'name':_0x11dbce(0x15f),'description':_0x11dbce(0xdc0)+'(unlike\x20okdb_*\x20tools,\x20the\x20route\x27s\x20permission\x20is\x20enforced\x20against\x20the\x20bearer\x20token\x27s\x20scopes).\x20'+_0x11dbce(0xc78)+_0x11dbce(0xa6e)+_0x11dbce(0x572)+'call\x20—\x20invoke\x20method+path\x20with\x20named\x20path\x20params,\x20query,\x20body,\x20headers;\x20returns\x20{status,\x20body,\x20headers}.\x20'+_0x11dbce(0x4d6)+_0x11dbce(0x9fd)+_0x11dbce(0xd53)+'Routes\x20whose\x20safety.destructive=true\x20require\x20allowDestructive:\x20true\x20to\x20call.','inputSchema':{'type':_0x11dbce(0xb36),'required':[_0x11dbce(0x942)],'properties':{'action':{'type':_0x11dbce(0xf7a),'enum':['list',_0x11dbce(0xd7a),_0x11dbce(0x834)]},'method':{'type':'string','description':_0x11dbce(0x376)},'path':{'type':_0x11dbce(0xf7a),'description':_0x11dbce(0xe44)},'params':{'type':_0x11dbce(0xb36),'description':_0x11dbce(0xa2a)+'For\x20wildcard\x20segments\x20(/docs/*),\x20use\x20{\x20\x22*\x22:\x20\x22querying.md\x22\x20}.','additionalProperties':{'type':[_0x11dbce(0xf7a),_0x11dbce(0x9f0),_0x11dbce(0x854)]}},'query':{'type':_0x11dbce(0xb36),'description':'Query-string\x20parameters\x20for\x20call.','additionalProperties':!![]},'body':{'description':_0x11dbce(0x463)},'headers':{'type':'object','description':_0x11dbce(0x10c3),'additionalProperties':{'type':'string'}},'allowDestructive':{'type':_0x11dbce(0x854),'default':![],'description':_0x11dbce(0x764)},'filter':{'type':_0x11dbce(0xb36),'description':_0x11dbce(0x355),'properties':{'tag':{'type':_0x11dbce(0xf7a)},'search':{'type':_0x11dbce(0xf7a)},'mutating':{'type':_0x11dbce(0x854)}},'additionalProperties':![]}},'additionalProperties':!![]},'annotations':{'title':_0x11dbce(0x15f),'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':![],'openWorldHint':!![]}};}async[_0x461c12(0xef8)](_0x1c6b39={},_0x4419a8=null){const _0x244bcb=_0x461c12,_0x6dc212=_0x1c6b39?.['action'];if(_0x6dc212===_0x244bcb(0x63e))return this[_0x244bcb(0xa09)](_0x1c6b39);if(_0x6dc212===_0x244bcb(0xd7a))return this[_0x244bcb(0x1206)](_0x1c6b39);if(_0x6dc212===_0x244bcb(0x834))return this['_mcpApiCall'](_0x1c6b39,_0x4419a8);const _0x5ee7f5=new Error(_0x244bcb(0xbf7)+JSON[_0x244bcb(0xf75)](_0x6dc212)+'\x20—\x20expected\x20list,\x20describe,\x20or\x20call');_0x5ee7f5[_0x244bcb(0x6c3)]=-0x7f5a;throw _0x5ee7f5;}['_mcpApiList'](_0x54cf67={}){const _0x2bb43d=_0x461c12,_0x1b7611=_0x54cf67?.['filter']||{};let _0xc67106=this[_0x2bb43d(0xd4f)]['http']['listRoutes']()[_0x2bb43d(0x1103)](_0xbdb1ab=>this[_0x2bb43d(0xc15)](_0xbdb1ab));_0x1b7611['tag']&&(_0xc67106=_0xc67106[_0x2bb43d(0x1103)](_0x2c1868=>(_0x2c1868['operation']['tags']||[])[_0x2bb43d(0x29c)](_0x1b7611[_0x2bb43d(0xd2a)])));if(_0x1b7611[_0x2bb43d(0x460)]){const _0x25b7d0=String(_0x1b7611[_0x2bb43d(0x460)])[_0x2bb43d(0xb52)]();_0xc67106=_0xc67106['filter'](_0x2dca02=>{const _0x3aae40=_0x2bb43d,_0x3a5028=_0x2dca02[_0x3aae40(0x4dd)];return(_0x3a5028['id']||'')['toLowerCase']()[_0x3aae40(0x29c)](_0x25b7d0)||(_0x3a5028['summary']||'')[_0x3aae40(0xb52)]()[_0x3aae40(0x29c)](_0x25b7d0)||(_0x3a5028[_0x3aae40(0x69d)]||'')[_0x3aae40(0xb52)]()[_0x3aae40(0x29c)](_0x25b7d0)||_0x2dca02[_0x3aae40(0x20b)][_0x3aae40(0xb52)]()[_0x3aae40(0x29c)](_0x25b7d0);});}if(_0x1b7611[_0x2bb43d(0xc06)]===!![])_0xc67106=_0xc67106['filter'](_0x474538=>_0x474538[_0x2bb43d(0x4dd)][_0x2bb43d(0x653)]?.[_0x2bb43d(0x2f8)]&&_0x474538['operation']['safety']['access']!==_0x2bb43d(0xcae));else _0x1b7611[_0x2bb43d(0xc06)]===![]&&(_0xc67106=_0xc67106[_0x2bb43d(0x1103)](_0x3629b4=>_0x3629b4[_0x2bb43d(0x4dd)][_0x2bb43d(0x653)]?.[_0x2bb43d(0x2f8)]==='read'));const _0x3b89a1=_0xc67106[_0x2bb43d(0x1166)](_0x543f07=>({'method':_0x543f07['method'],'path':_0x543f07['path'],'id':_0x543f07[_0x2bb43d(0x4dd)]['id']||null,'summary':_0x543f07[_0x2bb43d(0x4dd)][_0x2bb43d(0x541)]||null,'tags':_0x543f07[_0x2bb43d(0x4dd)][_0x2bb43d(0x35b)]||[],'safety':{'access':_0x543f07[_0x2bb43d(0x4dd)][_0x2bb43d(0x653)]?.[_0x2bb43d(0x2f8)]||null,'destructive':!!_0x543f07[_0x2bb43d(0x4dd)]['safety']?.[_0x2bb43d(0x122d)],'idempotent':!!_0x543f07['operation']['safety']?.['idempotent']},'auth':{'required':!!_0x543f07[_0x2bb43d(0x4dd)]['access']?.[_0x2bb43d(0xa90)],'permission':_0x543f07[_0x2bb43d(0x4dd)]['access']?.['permission']||null}}))[_0x2bb43d(0x3f6)]((_0x5e5b56,_0x2e3709)=>_0x5e5b56[_0x2bb43d(0x20b)][_0x2bb43d(0x666)](_0x2e3709[_0x2bb43d(0x20b)])||_0x5e5b56[_0x2bb43d(0xfc5)][_0x2bb43d(0x666)](_0x2e3709[_0x2bb43d(0xfc5)])),_0x20e91e=JSON[_0x2bb43d(0xf75)]({'count':_0x3b89a1[_0x2bb43d(0x156)],'routes':_0x3b89a1});return{'content':[{'type':_0x2bb43d(0x1fb),'text':_0x20e91e}]};}[_0x461c12(0x1206)](_0x463307={}){const _0x4c3b64=_0x461c12,_0x42bfdf=this['_findRouteByMethodPath'](_0x463307[_0x4c3b64(0xfc5)],_0x463307[_0x4c3b64(0x20b)]);if(!_0x42bfdf){const _0x9c6227=new Error('mcp_api.describe:\x20route\x20not\x20found\x20'+(_0x463307[_0x4c3b64(0xfc5)]||'')+'\x20'+(_0x463307[_0x4c3b64(0x20b)]||''));_0x9c6227[_0x4c3b64(0x6c3)]=-0x7f5a;throw _0x9c6227;}if(!this[_0x4c3b64(0xc15)](_0x42bfdf)){const _0x3e0b77=new Error(_0x4c3b64(0xa14)+_0x42bfdf[_0x4c3b64(0xfc5)]+'\x20'+_0x42bfdf['path']+_0x4c3b64(0x5c5));_0x3e0b77[_0x4c3b64(0x6c3)]=-0x7f5a;throw _0x3e0b77;}const _0x127925=_0x42bfdf[_0x4c3b64(0x4dd)],_0xb729bc={'method':_0x42bfdf[_0x4c3b64(0xfc5)],'path':_0x42bfdf['path'],'id':_0x127925['id'],'summary':_0x127925[_0x4c3b64(0x541)],'description':_0x127925[_0x4c3b64(0x69d)],'tags':_0x127925[_0x4c3b64(0x35b)]||[],'pathParams':_0x127925[_0x4c3b64(0x749)]||[],'inputSchema':_0x127925[_0x4c3b64(0x1210)]||null,'outputSchema':_0x127925['outputSchema']||null,'querySchema':_0x127925['http']?.[_0x4c3b64(0xe18)]||null,'access':_0x127925[_0x4c3b64(0x2f8)]||null,'safety':_0x127925[_0x4c3b64(0x653)]||null,'http':{'bodyMode':_0x127925[_0x4c3b64(0x9f4)]?.[_0x4c3b64(0x1151)]||null,'bindings':_0x127925[_0x4c3b64(0x9f4)]?.[_0x4c3b64(0xa2b)]||null}};if(_0x127925['mcp']?.[_0x4c3b64(0xd4)]&&_0x127925[_0x4c3b64(0xa8b)]?.[_0x4c3b64(0x942)])_0xb729bc['mcpEquivalent']={'tool':this['_capabilityNameForTool'](_0x127925[_0x4c3b64(0xa8b)]['capability']),'action':this[_0x4c3b64(0x4d4)](_0x127925[_0x4c3b64(0xa8b)][_0x4c3b64(0xd4)],_0x127925[_0x4c3b64(0xa8b)][_0x4c3b64(0x942)])};else _0x127925['mcp']?.[_0x4c3b64(0x10f3)]&&_0x127925[_0x4c3b64(0xa8b)]?.['action']&&(_0xb729bc[_0x4c3b64(0x1d5)]={'tool':_0x127925['mcp']['action']});return{'content':[{'type':_0x4c3b64(0x1fb),'text':JSON['stringify'](_0xb729bc)}]};}async[_0x461c12(0x9bf)](_0x4778fe={},_0x2536f4=null){const _0x4fa314=_0x461c12,_0x3119b1=String(_0x4778fe?.['method']||'')[_0x4fa314(0x96d)](),_0x4c7736=String(_0x4778fe?.[_0x4fa314(0x20b)]||'');if(!_0x3119b1||!_0x4c7736){const _0x20516d=new Error(_0x4fa314(0x1177));_0x20516d[_0x4fa314(0x6c3)]=-0x7f5a;throw _0x20516d;}const _0x29a2d0=this[_0x4fa314(0x505)](_0x3119b1,_0x4c7736);if(!_0x29a2d0){const _0x3eabb8=new Error(_0x4fa314(0x4f0)+_0x3119b1+'\x20'+_0x4c7736);_0x3eabb8[_0x4fa314(0x6c3)]=-0x7f5a;throw _0x3eabb8;}if(!this[_0x4fa314(0xc15)](_0x29a2d0)){const _0x1fb32e=new Error(_0x4fa314(0xa26)+_0x3119b1+'\x20'+_0x4c7736+_0x4fa314(0x5c5));_0x1fb32e[_0x4fa314(0x6c3)]=-0x7f5a;throw _0x1fb32e;}const _0x235752=_0x4778fe?.[_0x4fa314(0x20d)]===!![];if(_0x29a2d0[_0x4fa314(0x4dd)][_0x4fa314(0x653)]?.[_0x4fa314(0x122d)]&&!_0x235752){const _0x4a2acd=new Error('mcp_api.call:\x20refusing\x20to\x20call\x20destructive\x20route\x20'+_0x3119b1+'\x20'+_0x4c7736+_0x4fa314(0xb26));_0x4a2acd[_0x4fa314(0x6c3)]=-0x7f5a;throw _0x4a2acd;}const _0x1854c0=_0x4778fe?.[_0x4fa314(0x3f1)]||{};let _0xa5c009;try{_0xa5c009=this[_0x4fa314(0x94f)](_0x4c7736,_0x1854c0);}catch(_0x35f0f6){const _0x6b2ada=new Error(_0x4fa314(0xab0)+_0x35f0f6[_0x4fa314(0xb4e)]);_0x6b2ada[_0x4fa314(0x6c3)]=-0x7f5a;throw _0x6b2ada;}const _0x181500={'content-type':_0x4fa314(0xf9b),..._0x4778fe?.[_0x4fa314(0xcc4)]||{}},_0x3621df=_0x4778fe?.[_0x4fa314(0xa28)]||{},_0x31c1d9=Object[_0x4fa314(0x901)][_0x4fa314(0x9e)][_0x4fa314(0x834)](_0x4778fe||{},_0x4fa314(0xce8))?_0x4778fe[_0x4fa314(0xce8)]:null,_0x273d0c=_0x2536f4?.[_0x4fa314(0x93f)]??null,_0x2aece0={'transport':_0x4fa314(0xa8b),'mcp':!![]};if(_0x273d0c)_0x2aece0['auth']=_0x273d0c;const _0x527865=await this[_0x4fa314(0xd4f)]['http'][_0x4fa314(0xaf9)](_0x3119b1,_0xa5c009,{'headers':_0x181500,'query':_0x3621df,'body':_0x31c1d9},_0x2aece0),_0x41824e=_0x527865?.[_0x4fa314(0xfcd)]??0xc8,_0x57b578=_0x527865?.[_0x4fa314(0xcc4)]||{},_0x40c152=_0x57b578[_0x4fa314(0x202)]||_0x57b578[_0x4fa314(0x6b8)]||'',_0x3969dc=await this[_0x4fa314(0xe14)](_0x527865?.['body']??null,_0x40c152),_0x4ce199=JSON['stringify']({'status':_0x41824e,'headers':_0x57b578,'body':_0x3969dc});return{'content':[{'type':_0x4fa314(0x1fb),'text':_0x4ce199}]};}async['_normalizeResponseBody'](_0x2442a4,_0x1a00d2=''){const _0x1e4031=_0x461c12;if(_0x2442a4==null)return null;if(typeof _0x2442a4==='string')return _0x2442a4;if(Buffer['isBuffer'](_0x2442a4))return this['_decodeBuffer'](_0x2442a4,_0x1a00d2);if(_0x2442a4&&typeof _0x2442a4[_0x1e4031(0xe12)]===_0x1e4031(0x63b)){const _0x65f816=[];for await(const _0x265b0b of _0x2442a4){_0x65f816[_0x1e4031(0x597)](Buffer[_0x1e4031(0x1ba)](_0x265b0b)?_0x265b0b:Buffer[_0x1e4031(0x9f8)](_0x265b0b));}return this[_0x1e4031(0x9d7)](Buffer[_0x1e4031(0xbad)](_0x65f816),_0x1a00d2);}return _0x2442a4;}[_0x461c12(0x9d7)](_0x30dde8,_0x30e6f8=''){const _0x429d46=_0x461c12,_0x24c8bb=String(_0x30e6f8||'')['toLowerCase'](),_0x1d0018=_0x24c8bb['startsWith'](_0x429d46(0x1162))||_0x24c8bb[_0x429d46(0x29c)](_0x429d46(0x1ee))||_0x24c8bb[_0x429d46(0x29c)](_0x429d46(0xcbb))||_0x24c8bb[_0x429d46(0x29c)](_0x429d46(0xb34))||_0x24c8bb['includes'](_0x429d46(0xe96));if(_0x1d0018){const _0x2451b8=_0x30dde8[_0x429d46(0x583)](_0x429d46(0x57a));if(_0x24c8bb[_0x429d46(0x29c)]('json'))try{return JSON[_0x429d46(0xdcd)](_0x2451b8);}catch{return _0x2451b8;}return _0x2451b8;}return{'encoding':'base64','data':_0x30dde8[_0x429d46(0x583)]('base64')};}[_0x461c12(0x94f)](_0x4117fc,_0x3e4859={}){const _0x74d3a3=_0x461c12;let _0x45a2af=_0x4117fc[_0x74d3a3(0x8d8)](/\[([^\]]*)\]/g,(_0x1164a7,_0x22ac96)=>{return _0x22ac96['replace'](/:(\w+)(?:=([^/\]]+))?/g,(_0x274f8a,_0x568632,_0x597322)=>{const _0x1b2f10=_0x47ab,_0x1270ee=Object[_0x1b2f10(0x901)][_0x1b2f10(0x9e)][_0x1b2f10(0x834)](_0x3e4859,_0x568632)?_0x3e4859[_0x568632]:_0x597322;return _0x1270ee==null?'':encodeURIComponent(String(_0x1270ee));});});_0x45a2af=_0x45a2af['replace'](/:(\w+)/g,(_0x5f044e,_0x461773)=>{const _0x374b72=_0x74d3a3;if(!Object[_0x374b72(0x901)][_0x374b72(0x9e)][_0x374b72(0x834)](_0x3e4859,_0x461773))throw new Error('missing\x20path\x20parameter\x20\x22'+_0x461773+'\x22');return encodeURIComponent(String(_0x3e4859[_0x461773]));});if(_0x45a2af[_0x74d3a3(0x11aa)]('/*')){const _0x461465=_0x3e4859['*'];if(_0x461465==null)throw new Error(_0x74d3a3(0xa33));_0x45a2af=_0x45a2af[_0x74d3a3(0xc3c)](0x0,-0x1)+String(_0x461465)['split']('/')[_0x74d3a3(0x1166)](encodeURIComponent)[_0x74d3a3(0x3d9)]('/');}_0x45a2af=_0x45a2af[_0x74d3a3(0x8d8)](/\/+/g,'/');if(_0x45a2af[_0x74d3a3(0x156)]>0x1&&_0x45a2af[_0x74d3a3(0x11aa)]('/'))_0x45a2af=_0x45a2af[_0x74d3a3(0xc3c)](0x0,-0x1);return _0x45a2af||'/';}}return okdbMcp=_0x9880ce,okdbMcp;}var okdbAuthSeal,hasRequiredOkdbAuthSeal;function requireOkdbAuthSeal(){if(hasRequiredOkdbAuthSeal)return okdbAuthSeal;hasRequiredOkdbAuthSeal=0x1;const _0x5f7a92=require$$0$1;function _0x9a06b3(_0x34e775){const _0x3b7276=_0x47ab;return Buffer['from'](_0x34e775,_0x3b7276(0x57b))[_0x3b7276(0xc3c)](0x0,0x20);}function _0x2ccd71(_0xaeb853,_0x43d6e8){const _0x5069d6=_0x47ab,_0x307733=_0x9a06b3(_0xaeb853),_0x40db21=_0x5f7a92[_0x5069d6(0x3d0)](0xc),_0x17b64b=_0x5f7a92[_0x5069d6(0xf70)](_0x5069d6(0x22f),_0x307733,_0x40db21);let _0x2ddf9f=_0x17b64b[_0x5069d6(0xbb7)](JSON[_0x5069d6(0xf75)](_0x43d6e8),_0x5069d6(0x57a));_0x2ddf9f=Buffer[_0x5069d6(0xbad)]([_0x2ddf9f,_0x17b64b[_0x5069d6(0x4e2)]()]);const _0x3db710=_0x17b64b[_0x5069d6(0x1180)]();return Buffer[_0x5069d6(0xbad)]([_0x40db21,_0x3db710,_0x2ddf9f])['toString'](_0x5069d6(0xb6e));}function _0xb9c580(_0x49ef73,_0x135836){const _0x4ae9ba=_0x47ab;try{const _0x6bd64d=_0x9a06b3(_0x49ef73),_0x4950cd=Buffer[_0x4ae9ba(0x9f8)](_0x135836,'base64url'),_0x403304=_0x4950cd['slice'](0x0,0xc),_0x1e9e01=_0x4950cd[_0x4ae9ba(0xc3c)](0xc,0x1c),_0x4e78c9=_0x4950cd[_0x4ae9ba(0xc3c)](0x1c),_0x2626b0=_0x5f7a92[_0x4ae9ba(0x214)]('aes-256-gcm',_0x6bd64d,_0x403304);_0x2626b0[_0x4ae9ba(0x15b)](_0x1e9e01);let _0x25dc67=_0x2626b0['update'](_0x4e78c9);return _0x25dc67=Buffer[_0x4ae9ba(0xbad)]([_0x25dc67,_0x2626b0['final']()]),JSON[_0x4ae9ba(0xdcd)](_0x25dc67[_0x4ae9ba(0x583)](_0x4ae9ba(0x57a)));}catch{return null;}}function _0x4fe8ff({name:_0xf9af7b,tokenId:_0x5590be,tokenHash:_0x3f70c1,ttlMs:_0xf1b07d}){const _0x2c0dea=_0x47ab,_0x450115=Date['now']()+(_0xf1b07d||0x36ee80),_0x1999d5=_0x2ccd71(_0x3f70c1,{'name':_0xf9af7b,'tokenId':_0x5590be,'exp':_0x450115});return Buffer[_0x2c0dea(0x9f8)](_0xf9af7b,_0x2c0dea(0x57a))['toString']('base64url')+'.'+_0x1999d5;}async function _0x13e1e1(_0x26991a,_0x5188a0){const _0x2e23f1=_0x47ab;try{const _0x5d88dd=_0x26991a[_0x2e23f1(0x10b8)]('.');if(_0x5d88dd<=0x0||_0x5d88dd===_0x26991a[_0x2e23f1(0x156)]-0x1)return null;const _0x13b2f9=_0x26991a[_0x2e23f1(0xc3c)](0x0,_0x5d88dd),_0x18c082=_0x26991a[_0x2e23f1(0xc3c)](_0x5d88dd+0x1),_0x3dd929=Buffer[_0x2e23f1(0x9f8)](_0x13b2f9,_0x2e23f1(0xb6e))[_0x2e23f1(0x583)](_0x2e23f1(0x57a));if(!_0x3dd929)return null;const _0x401003=await _0x5188a0(_0x3dd929);if(!_0x401003)return null;const _0x4d9667=Array[_0x2e23f1(0x10f5)](_0x401003)?_0x401003:[_0x401003];for(const _0x5679ff of _0x4d9667){if(!_0x5679ff||typeof _0x5679ff!==_0x2e23f1(0xf7a))continue;const _0x16d2c6=_0xb9c580(_0x5679ff,_0x18c082);if(!_0x16d2c6)continue;if(_0x16d2c6['name']!==_0x3dd929)continue;if(_0x16d2c6[_0x2e23f1(0x116f)]&&_0x16d2c6[_0x2e23f1(0x116f)]<=Date[_0x2e23f1(0x555)]())continue;return _0x16d2c6;}return null;}catch{return null;}}return okdbAuthSeal={'seal':_0x2ccd71,'unseal':_0xb9c580,'sealCookie':_0x4fe8ff,'unsealCookie':_0x13e1e1},okdbAuthSeal;}var okdbAuthIp,hasRequiredOkdbAuthIp;function requireOkdbAuthIp(){const _0x5e18ce=_0xef8cd8;if(hasRequiredOkdbAuthIp)return okdbAuthIp;hasRequiredOkdbAuthIp=0x1;const _0x5d39a2=require$$0$b,_0x559145=[_0x5e18ce(0x923),_0x5e18ce(0x25c),_0x5e18ce(0xbc6)];function _0x3b4260(_0x5a7780){const _0x357127=_0x5e18ce;if(typeof _0x5a7780===_0x357127(0xf7a)&&_0x5a7780['startsWith'](_0x357127(0x533))){const _0x5d37f7=_0x5a7780[_0x357127(0xc3c)](0x7);if(_0x5d39a2['isIPv4'](_0x5d37f7))return _0x5d37f7;}return _0x5a7780;}function _0x41b5be(_0x3df24e){const _0x281f09=_0x5e18ce;if(_0x3df24e==='*')return{'kind':_0x281f09(0xd02)};if(_0x3df24e===_0x281f09(0xf37))return{'kind':'list','ips':_0x559145};if(_0x3df24e[_0x281f09(0x29c)]('/')){const [_0x1bb43e,_0x30d4f8]=_0x3df24e['split']('/'),_0x1b0842=Number(_0x30d4f8),_0x2861f8=_0x5d39a2[_0x281f09(0xeef)](_0x1bb43e);if(!_0x2861f8)throw new Error(_0x281f09(0x732)+_0x3df24e);const _0xdff1ee=_0x2861f8===0x4?0x20:0x80;if(!Number['isInteger'](_0x1b0842)||_0x1b0842<0x0||_0x1b0842>_0xdff1ee)throw new Error(_0x281f09(0x9a7)+_0x3df24e);return{'kind':_0x281f09(0x6f4),'addr':_0x1bb43e,'prefix':_0x1b0842,'ipVersion':_0x2861f8};}const _0x7de158=_0x5d39a2[_0x281f09(0xeef)](_0x3df24e);if(!_0x7de158)throw new Error(_0x281f09(0xd01)+_0x3df24e);return{'kind':'ip','addr':_0x3df24e,'ipVersion':_0x7de158};}function _0x14d4e7(_0x3bbf28){const _0x144ce9=_0x5e18ce;if(_0x3bbf28===undefined||_0x3bbf28===![]||_0x3bbf28===null)return null;let _0x37746d;if(_0x3bbf28===!![])_0x37746d=[_0x144ce9(0xf37)];else{if(typeof _0x3bbf28===_0x144ce9(0xf7a))_0x37746d=[_0x3bbf28];else{if(Array['isArray'](_0x3bbf28))_0x37746d=_0x3bbf28;else throw new Error(_0x144ce9(0x1ad));}}const _0x493261=_0x37746d[_0x144ce9(0x1166)](_0x41b5be),_0x31f6ad=_0x493261[_0x144ce9(0xa83)](_0x213c6d=>_0x213c6d[_0x144ce9(0x31e)]===_0x144ce9(0xd02));return{'rules':_0x493261,'matchAny':_0x31f6ad};}function _0x9714f3(_0x470a27,_0x358c9f){const _0x12eecc=_0x5e18ce;if(!_0x470a27)return![];if(_0x470a27[_0x12eecc(0x823)])return!![];const _0x1c93ed=_0x3b4260(_0x358c9f);for(const _0x4fcb1b of _0x470a27[_0x12eecc(0x9ea)]){if(_0x4fcb1b['kind']===_0x12eecc(0xd02))return!![];if(_0x4fcb1b[_0x12eecc(0x31e)]==='ip'){if(_0x3b4260(_0x4fcb1b['addr'])===_0x1c93ed)return!![];continue;}if(_0x4fcb1b[_0x12eecc(0x31e)]==='list'){if(_0x4fcb1b[_0x12eecc(0x9c3)]['some'](_0x8afb4b=>_0x3b4260(_0x8afb4b)===_0x1c93ed))return!![];continue;}if(_0x4fcb1b[_0x12eecc(0x31e)]===_0x12eecc(0x6f4)){const _0x5a4e68=new _0x5d39a2[(_0x12eecc(0x9c8))](),_0x4aea07=_0x4fcb1b[_0x12eecc(0x900)]===0x4?_0x12eecc(0x90d):_0x12eecc(0x32e);_0x5a4e68[_0x12eecc(0x871)](_0x4fcb1b[_0x12eecc(0x118d)],_0x4fcb1b[_0x12eecc(0x1ae)],_0x4aea07);const _0x2c757f=_0x5d39a2[_0x12eecc(0xa48)](_0x1c93ed)?'ipv4':'ipv6';try{if(_0x5a4e68[_0x12eecc(0x10db)](_0x1c93ed,_0x2c757f))return!![];}catch{}}}return![];}return okdbAuthIp={'parseOpenSpec':_0x14d4e7,'matchIp':_0x9714f3},okdbAuthIp;}var okdbAuth,hasRequiredOkdbAuth;function requireOkdbAuth(){const _0x420984=_0xef8cd8;if(hasRequiredOkdbAuth)return okdbAuth;hasRequiredOkdbAuth=0x1;const _0x4ba9f6=requireOkdbAuthTokens(),{unsealCookie:_0x11a016,sealCookie:_0xde3571}=requireOkdbAuthSeal(),{parseOpenSpec:_0x482302,matchIp:_0xda6a8}=requireOkdbAuthIp();function _0x250224(_0x1d261c){const _0x53ac0c=_0x47ab;if(!_0x1d261c)return'';if(_0x1d261c['matchAny'])return _0x53ac0c(0xbdf);const _0x5d6ffe=[];for(const _0x1309db of _0x1d261c[_0x53ac0c(0x9ea)]){if(_0x1309db['kind']===_0x53ac0c(0xd02))_0x5d6ffe['push']('*');else{if(_0x1309db['kind']==='list')_0x5d6ffe[_0x53ac0c(0x597)](_0x53ac0c(0xf37));else{if(_0x1309db[_0x53ac0c(0x31e)]===_0x53ac0c(0x6f4))_0x5d6ffe[_0x53ac0c(0x597)](_0x1309db[_0x53ac0c(0x118d)]+'/'+_0x1309db[_0x53ac0c(0x1ae)]);else _0x1309db['kind']==='ip'&&_0x5d6ffe[_0x53ac0c(0x597)](_0x1309db[_0x53ac0c(0x118d)]);}}}return _0x5d6ffe['join'](',\x20')||'localhost';}function _0x1a9284(_0x5e7d32){const _0x23b9e4=_0x47ab;if(!Array[_0x23b9e4(0x10f5)](_0x5e7d32)||_0x5e7d32['length']===0x0)return null;const _0x5d3e55=new Set();for(const _0xe87225 of _0x5e7d32){if(typeof _0xe87225===_0x23b9e4(0xf7a)&&_0xe87225)_0x5d3e55['add'](_0xe87225[_0x23b9e4(0xb52)]());}return _0x5d3e55[_0x23b9e4(0xfb)]>0x0?_0x5d3e55:null;}const {base64UrlDecode:_0x1f4af7,parseJwt:_0x2590c4,normalizeAudience:_0x471f15,normalizePemCertificate:_0x219163,jwkToKeyObject:_0x22fe7d,verifyJwtSignature:_0x31a894,fetchJson:_0x1a4fe8}=requireOkdbJwtUtils();class _0x3abf06{constructor(_0x5763fa){const _0x21535c=_0x47ab;this[_0x21535c(0xd4f)]=_0x5763fa,this[_0x21535c(0x3b8)]=null,this[_0x21535c(0x9c)]=_0x482302(!![]),this[_0x21535c(0x9b)]=null,this[_0x21535c(0xb8e)]=0x36ee80,this[_0x21535c(0xd96)]=_0x21535c(0x488),this['_session']={'secure':![],'sameSite':'Lax'},this[_0x21535c(0x9c5)]={},this['_loginStates']=new Map(),this[_0x21535c(0x829)]=null,this[_0x21535c(0xde5)]=null,this['_jwksNegativeCache']=new Map(),this[_0x21535c(0xec2)]=null,this['_oauthAllowedDomains']=null,this[_0x21535c(0x118a)]=[_0x21535c(0x90a)];}async[_0x420984(0xa00)](_0x502570,_0x34e644={}){const _0x4d3dd6=_0x420984;this[_0x4d3dd6(0x3b8)]=_0x482302(_0x34e644[_0x4d3dd6(0x717)]??![]),this['_tokenSecret']=_0x34e644[_0x4d3dd6(0x503)]??null,this[_0x4d3dd6(0xb8e)]=_0x34e644[_0x4d3dd6(0x1153)]??0x36ee80,this[_0x4d3dd6(0xe81)]={'secure':_0x34e644[_0x4d3dd6(0x5f0)]?.[_0x4d3dd6(0x102a)]??![],'sameSite':_0x34e644[_0x4d3dd6(0x5f0)]?.[_0x4d3dd6(0x7ac)]??'Lax'},this['_oauthConfig']=_0x34e644[_0x4d3dd6(0xce9)]||{},this[_0x4d3dd6(0xd96)]=_0x34e644[_0x4d3dd6(0x950)]??this[_0x4d3dd6(0xd96)];const _0x5dba63=this[_0x4d3dd6(0x9c5)];this[_0x4d3dd6(0xec2)]=_0x1a9284(_0x5dba63['allowedEmails']),this['_oauthAllowedDomains']=_0x1a9284(_0x5dba63['allowedDomains']);Array['isArray'](_0x5dba63[_0x4d3dd6(0xd95)])&&(this['_oauthDefaultRoles']=_0x5dba63[_0x4d3dd6(0xd95)]);if(this[_0x4d3dd6(0x3b8)]){const _0x579fd3=this[_0x4d3dd6(0x11cb)]();this[_0x4d3dd6(0xd4f)]?.[_0x4d3dd6(0x9be)]?.[_0x4d3dd6(0xf78)]?.(_0x579fd3,{'feature':_0x4d3dd6(0x93f),'component':_0x4d3dd6(0x93f)});const _0x6c0d8=this['okdb']?.['_logEnv'];if(_0x6c0d8)try{await _0x6c0d8['put'](_0x4d3dd6(0xd2e),null,{'ts':Date[_0x4d3dd6(0x555)](),'level':_0x4d3dd6(0xf78),'feature':_0x4d3dd6(0x93f),'message':_0x579fd3});}catch{}}}[_0x420984(0x4fd)](_0x2abd3b){const _0x397b92=_0x420984;if(!_0x2abd3b)return![];const _0x4f667a=String(_0x2abd3b)[_0x397b92(0xb52)](),_0x2ab097=!!(this[_0x397b92(0xec2)]||this[_0x397b92(0x9b5)]);if(!_0x2ab097)return![];if(this[_0x397b92(0xec2)]?.[_0x397b92(0x9d0)](_0x4f667a))return!![];if(this[_0x397b92(0x9b5)]){const _0x550686=_0x4f667a[_0x397b92(0x2f0)]('@');if(_0x550686>=0x0){const _0x1c5b12=_0x4f667a[_0x397b92(0xc3c)](_0x550686+0x1);if(this[_0x397b92(0x9b5)][_0x397b92(0x9d0)](_0x1c5b12))return!![];}}return![];}get[_0x420984(0x259)](){const _0x423c31=_0x420984;return this[_0x423c31(0x3b8)]?'open':_0x423c31(0x102a);}get[_0x420984(0x1019)](){return![];}['_isOpenForIp'](_0x45faf3){const _0x33580b=_0x420984;return _0xda6a8(this[_0x33580b(0x3b8)],_0x45faf3);}[_0x420984(0x320)](_0x1ad52f){const _0xcf759=_0x420984;return _0xda6a8(this[_0xcf759(0x9c)],_0x1ad52f);}[_0x420984(0x10b0)](){const _0x1384ac=_0x420984;if(this[_0x1384ac(0x3b8)]!==null)return![];const _0x493f14=this[_0x1384ac(0xd4f)][_0x1384ac(0xc65)];if(!_0x493f14||!_0x493f14[_0x1384ac(0x7c0)]('~tokens'))return!![];for(const _0x237d01 of _0x493f14[_0x1384ac(0x9ce)](_0x1384ac(0xbb0)))return![];return!![];}[_0x420984(0x11cb)](){const _0x37d5ee=_0x420984;if(!this[_0x37d5ee(0x3b8)])return null;const _0x25acd7=_0x250224(this[_0x37d5ee(0x3b8)]);return _0x37d5ee(0xe45)+_0x25acd7+_0x37d5ee(0x8da);}['getAuthOptions'](){const _0x13e176=_0x420984;return{'mode':this['mode'],'session':{...this[_0x13e176(0xe81)]},'oauth':this[_0x13e176(0x9c5)],'tokenSecret':this[_0x13e176(0x9b)],'tokenTtl':this[_0x13e176(0xb8e)]};}[_0x420984(0x1121)](_0x12c52b){const _0x5e5b15=_0x420984;return _0x4ba9f6[_0x5e5b15(0x1121)](_0x12c52b,this[_0x5e5b15(0x9b)],this[_0x5e5b15(0xb8e)]);}[_0x420984(0x526)](_0x5e4ede){const _0x37e532=_0x420984;return _0x4ba9f6[_0x37e532(0x526)](_0x5e4ede,this[_0x37e532(0x9b)]);}[_0x420984(0xaca)](_0x4770e7){const _0x2ef86e=_0x420984;return _0x4ba9f6[_0x2ef86e(0xaca)](_0x4770e7);}async[_0x420984(0x10e8)](){const _0x8e949a=_0x420984,_0x535c03=this[_0x8e949a(0xd4f)]['_systemEnv'];if(!_0x535c03)return;!_0x535c03['hasType'](_0x8e949a(0xbb0))&&(await _0x535c03[_0x8e949a(0xa39)]('~tokens'),await _0x535c03[_0x8e949a(0x11ee)](_0x8e949a(0xbb0),[_0x8e949a(0x6e5)]),await _0x535c03['registerIndex']('~tokens',[_0x8e949a(0x1173)]));}async[_0x420984(0xf50)](_0x249718){const _0x46d836=_0x420984,_0x5af293=this[_0x46d836(0xd4f)][_0x46d836(0xc65)];if(!_0x5af293||!_0x5af293[_0x46d836(0x7c0)]('~tokens'))return null;const _0x25ce19=Buffer[_0x46d836(0x9f8)]([0xff]);for(const {value:_0x4c0dcf}of _0x5af293[_0x46d836(0x22e)]('~tokens',[_0x46d836(0x6e5)],{'start':[_0x249718],'end':[_0x249718,_0x25ce19],'limit':0x1})){return _0x4c0dcf;}return null;}async[_0x420984(0x157)](_0x1f022b){const _0x18049a=_0x420984,_0x5834da=this[_0x18049a(0xd4f)][_0x18049a(0xc65)];if(!_0x5834da||!_0x5834da[_0x18049a(0x7c0)](_0x18049a(0xbb0)))return null;const _0x2bbec7=Buffer['from']([0xff]);for(const {value:_0x3b48a8}of _0x5834da[_0x18049a(0x22e)](_0x18049a(0xbb0),['name'],{'start':[_0x1f022b],'end':[_0x1f022b,_0x2bbec7],'limit':0x1})){return _0x3b48a8;}return null;}async[_0x420984(0xb7)](_0xf063b8){const _0x2153a1=_0x420984,_0x2c75e8=this[_0x2153a1(0xd4f)][_0x2153a1(0xc65)];if(!_0x2c75e8||!_0x2c75e8[_0x2153a1(0x7c0)](_0x2153a1(0xbb0)))return[];const _0x19984f=Buffer[_0x2153a1(0x9f8)]([0xff]),_0x50f921=[];for(const {key:_0x5c5dc2,value:_0x283741}of _0x2c75e8[_0x2153a1(0x22e)](_0x2153a1(0xbb0),[_0x2153a1(0x1173)],{'start':[_0xf063b8],'end':[_0xf063b8,_0x19984f]})){_0x50f921[_0x2153a1(0x597)]({'id':_0x5c5dc2,..._0x283741});}return _0x50f921;}async[_0x420984(0x617)](_0x15f3e3){const _0x18afbd=_0x420984,_0x5c5944=_0x15f3e3[_0x18afbd(0x82d)]?.[_0x18afbd(0xf85)]??_0x15f3e3['remoteAddress']??null;if(this[_0x18afbd(0x10b0)]()){if(!this[_0x18afbd(0x320)](_0x5c5944))return{'type':_0x18afbd(0xcea),'isAuthenticated':![],'isSystem':![],'user':null,'bootstrapBlocked':!![]};return{'type':'system','id':_0x18afbd(0x83e),'username':_0x18afbd(0x83e),'roles':['admin'],'subject':_0x18afbd(0x83e),'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x18afbd(0x83e),'username':_0x18afbd(0x83e),'roles':[_0x18afbd(0x90a)],'isAuthenticated':!![],'isSystem':!![]},'open':![],'token':{'permissions':['*'],'grants':{}}};}if(_0x15f3e3[_0x18afbd(0x339)]?.[_0x18afbd(0xbf9)]===!![]||this['_isOpenForIp'](_0x5c5944)){const _0x501550={'id':_0x18afbd(0x83e),'username':_0x18afbd(0x83e),'roles':[_0x18afbd(0x90a)],'isAuthenticated':!![],'isSystem':!![]};return{'type':_0x18afbd(0x83e),'id':_0x501550['id'],'username':_0x501550[_0x18afbd(0xdab)],'roles':_0x501550['roles'],'subject':_0x501550['id'],'isAuthenticated':!![],'isSystem':!![],'user':_0x501550,'open':this[_0x18afbd(0x3b8)]!==null,'token':{'permissions':['*'],'grants':{}}};}const _0x4491a1=this[_0x18afbd(0xaca)](_0x15f3e3[_0x18afbd(0xcc4)]?.[_0x18afbd(0x714)]),_0x3b1c60=_0x15f3e3[_0x18afbd(0x1124)]?.[this[_0x18afbd(0xd96)]];if(_0x4491a1){const _0x400eea=_0x4ba9f6[_0x18afbd(0xde2)](_0x4491a1),_0x5aa922=await this[_0x18afbd(0xf50)](_0x400eea);if(_0x5aa922){const _0x4eb35b=Array[_0x18afbd(0x10f5)](_0x5aa922[_0x18afbd(0x6c9)])?_0x5aa922[_0x18afbd(0x6c9)]:['*'],_0x374cb1={'id':_0x18afbd(0x15a),'username':'token','roles':_0x4eb35b,'isAuthenticated':!![],'isSystem':![]};return{'type':'token','id':_0x374cb1['id'],'username':_0x374cb1[_0x18afbd(0xdab)],'roles':_0x374cb1[_0x18afbd(0xa6d)],'subject':_0x374cb1['id'],'isAuthenticated':!![],'isSystem':![],'user':_0x374cb1,'token':{'permissions':_0x4eb35b,'grants':_0x5aa922[_0x18afbd(0x912)]??{}}};}const _0x1b6fa5=this[_0x18afbd(0x526)](_0x4491a1);if(_0x1b6fa5){const _0x3af1af={'id':_0x1b6fa5[_0x18afbd(0x52e)]??null,'username':_0x1b6fa5[_0x18afbd(0xdab)]??null,'roles':Array[_0x18afbd(0x10f5)](_0x1b6fa5['roles'])?_0x1b6fa5[_0x18afbd(0xa6d)]:[],'isAuthenticated':!![],'isSystem':![]};return{'type':'user','id':_0x3af1af['id'],'username':_0x3af1af['username'],'roles':_0x3af1af[_0x18afbd(0xa6d)],'subject':_0x3af1af['id'],'isAuthenticated':!![],'isSystem':![],'user':_0x3af1af,'claims':_0x1b6fa5,'token':{'permissions':_0x3af1af[_0x18afbd(0xa6d)],'grants':{}}};}const _0x2eb54a=await _0x11a016(_0x4491a1,async _0x3d6f10=>{const _0x39a09a=_0x18afbd,_0x284e2f=await this[_0x39a09a(0x157)](_0x3d6f10);return _0x284e2f?_0x284e2f[_0x39a09a(0x6e5)]:null;});if(_0x2eb54a){const _0x73f07=_0x2eb54a[_0x18afbd(0xa5f)]?this[_0x18afbd(0xd4f)][_0x18afbd(0xc65)]?.[_0x18afbd(0xbeb)](_0x18afbd(0xbb0),_0x2eb54a['tokenId']):await this[_0x18afbd(0x157)](_0x2eb54a[_0x18afbd(0x1173)]);if(_0x73f07){const _0x2b13fd=Array[_0x18afbd(0x10f5)](_0x73f07[_0x18afbd(0x6c9)])?_0x73f07[_0x18afbd(0x6c9)]:['*'],_0x441c76={'id':_0x2eb54a[_0x18afbd(0x1173)]??_0x18afbd(0x15a),'username':_0x2eb54a[_0x18afbd(0x1173)]??'token','roles':_0x2b13fd,'isAuthenticated':!![],'isSystem':![]};return{'type':'user','id':_0x441c76['id'],'username':_0x441c76[_0x18afbd(0xdab)],'roles':_0x441c76[_0x18afbd(0xa6d)],'subject':_0x441c76['id'],'isAuthenticated':!![],'isSystem':![],'user':_0x441c76,'token':{'permissions':_0x2b13fd,'grants':_0x73f07[_0x18afbd(0x912)]??{}}};}}const _0x44cf7d=this[_0x18afbd(0x9c5)];if(_0x44cf7d?.[_0x18afbd(0x7ce)])try{const _0x24af52=await this[_0x18afbd(0xc28)](_0x4491a1,_0x44cf7d);if(_0x24af52){if(!this[_0x18afbd(0x4fd)](_0x24af52[_0x18afbd(0x5d0)]))return{'type':_0x18afbd(0x1d4),'isAuthenticated':![],'isSystem':![],'user':null};const _0x3bf7b3={'id':_0x24af52[_0x18afbd(0x155)]??null,'username':_0x24af52[_0x18afbd(0x5d0)]??null,'roles':[...this[_0x18afbd(0x118a)]],'isAuthenticated':!![],'isSystem':![]};return{'type':_0x18afbd(0x45b),'id':_0x3bf7b3['id'],'username':_0x3bf7b3[_0x18afbd(0xdab)],'roles':_0x3bf7b3[_0x18afbd(0xa6d)],'subject':_0x3bf7b3['id'],'isAuthenticated':!![],'isSystem':![],'user':_0x3bf7b3,'claims':_0x24af52[_0x18afbd(0x525)],'token':{'permissions':this['_oauthDefaultRoles'],'grants':{}}};}}catch{}return{'type':_0x18afbd(0x1d4),'isAuthenticated':![],'isSystem':![],'user':null};}if(_0x3b1c60){const _0x35e150=this['authenticateToken'](_0x3b1c60);if(_0x35e150){const _0x549b43={'id':_0x35e150[_0x18afbd(0x52e)]??null,'username':_0x35e150[_0x18afbd(0xdab)]??null,'roles':Array[_0x18afbd(0x10f5)](_0x35e150['roles'])?_0x35e150[_0x18afbd(0xa6d)]:[],'isAuthenticated':!![],'isSystem':![]};return{'type':_0x18afbd(0x45b),'id':_0x549b43['id'],'username':_0x549b43[_0x18afbd(0xdab)],'roles':_0x549b43[_0x18afbd(0xa6d)],'subject':_0x549b43['id'],'isAuthenticated':!![],'isSystem':![],'user':_0x549b43,'claims':_0x35e150,'token':{'permissions':_0x549b43['roles'],'grants':{}}};}const _0x260788=await _0x11a016(_0x3b1c60,async _0x3f1607=>{const _0x3937b1=_0x18afbd,_0x1c51c6=await this['_lookupByName'](_0x3f1607);return _0x1c51c6?_0x1c51c6[_0x3937b1(0x6e5)]:null;});if(_0x260788){const _0x38a566=_0x260788[_0x18afbd(0xa5f)]?this['okdb'][_0x18afbd(0xc65)]?.[_0x18afbd(0xbeb)]('~tokens',_0x260788[_0x18afbd(0xa5f)]):await this[_0x18afbd(0x157)](_0x260788[_0x18afbd(0x1173)]);if(_0x38a566){const _0x2a2011=Array[_0x18afbd(0x10f5)](_0x38a566[_0x18afbd(0x6c9)])?_0x38a566[_0x18afbd(0x6c9)]:['*'],_0x291b42={'id':_0x260788[_0x18afbd(0x1173)]??_0x18afbd(0xc83),'username':_0x260788[_0x18afbd(0x1173)]??_0x18afbd(0xc83),'roles':_0x2a2011,'isAuthenticated':!![],'isSystem':![]};return{'type':'user','id':_0x291b42['id'],'username':_0x291b42[_0x18afbd(0xdab)],'roles':_0x291b42[_0x18afbd(0xa6d)],'subject':_0x291b42['id'],'isAuthenticated':!![],'isSystem':![],'user':_0x291b42,'token':{'permissions':_0x2a2011,'grants':_0x38a566['grants']??{}}};}}return{'type':_0x18afbd(0x1d4),'isAuthenticated':![],'isSystem':![],'user':null};}return{'type':_0x18afbd(0x1d4),'isAuthenticated':![],'isSystem':![],'user':null};}async[_0x420984(0x3c7)](_0x36f5bd,_0xd73432){const _0x3d95de=_0x420984;if(!_0x36f5bd||!_0xd73432)return{'ok':![],'error':'Username\x20and\x20password\x20are\x20required'};const _0xe0b4d4=String(_0x36f5bd)[_0x3d95de(0xf4d)]()['toLowerCase'](),_0x211dd3=await this[_0x3d95de(0xb7)](_0xe0b4d4),_0x527356=_0x211dd3['filter'](_0x1c93f2=>_0x1c93f2['passwordHash']);if(_0x527356[_0x3d95de(0x156)]===0x0)return{'ok':![],'code':_0x3d95de(0x980),'error':_0x3d95de(0x365)};const _0x357155=await Promise['all'](_0x527356[_0x3d95de(0x1166)](async _0x35c4d7=>({'record':_0x35c4d7,'valid':await _0x4ba9f6[_0x3d95de(0xaf2)](_0xd73432,_0x35c4d7[_0x3d95de(0xab5)])}))),_0x333925=_0x357155[_0x3d95de(0x1103)](_0x57555b=>_0x57555b[_0x3d95de(0x64c)])['map'](_0x599575=>_0x599575[_0x3d95de(0xd20)]);if(_0x333925[_0x3d95de(0x156)]===0x0)return{'ok':![],'code':_0x3d95de(0x980),'error':'Invalid\x20username\x20or\x20password'};if(_0x333925[_0x3d95de(0x156)]>=0x2)return{'ok':!![],'ambiguous':!![],'candidates':_0x333925[_0x3d95de(0x1166)](_0x2c21f5=>({'tokenId':_0x2c21f5['id'],'label':_0x2c21f5[_0x3d95de(0x757)],'permissions':_0x2c21f5[_0x3d95de(0x6c9)]||[],'createdAt':_0x2c21f5[_0x3d95de(0x1156)]}))};const _0x521033=_0x333925[0x0],_0x83b11d=_0xde3571({'name':_0xe0b4d4,'tokenId':_0x521033['id']||null,'tokenHash':_0x521033[_0x3d95de(0x6e5)],'ttlMs':this[_0x3d95de(0xb8e)]});return this[_0x3d95de(0xd4f)]?.[_0x3d95de(0x9be)]?.['info']?.(_0x3d95de(0x303),{'feature':_0x3d95de(0x93f),'name':_0xe0b4d4}),{'ok':!![],'user':{'name':_0xe0b4d4,'permissions':_0x521033[_0x3d95de(0x6c9)]||[]},'cookie':_0x83b11d,'cookieName':this[_0x3d95de(0xd96)],'expiresIn':Math[_0x3d95de(0xf9a)](this['_tokenTtl']/0x3e8)};}async['loginSelect'](_0x50b112,_0x59d4df,_0x313ba6){const _0x3e9304=_0x420984;if(!_0x50b112||!_0x59d4df||!_0x313ba6)return{'ok':![],'error':_0x3e9304(0x8fd)};const _0x52836f=String(_0x50b112)[_0x3e9304(0xf4d)]()[_0x3e9304(0xb52)](),_0xd4745e=await this[_0x3e9304(0xb7)](_0x52836f),_0x5eafc2=_0xd4745e[_0x3e9304(0xbdd)](_0x341399=>_0x341399['id']===_0x313ba6);if(!_0x5eafc2||!_0x5eafc2[_0x3e9304(0xab5)])return{'ok':![],'code':'INVALID_CREDENTIALS','error':_0x3e9304(0x365)};const _0x49299f=await _0x4ba9f6['verifyPassword'](_0x59d4df,_0x5eafc2[_0x3e9304(0xab5)]);if(!_0x49299f)return{'ok':![],'code':_0x3e9304(0x980),'error':_0x3e9304(0x365)};const _0x52bbe4=_0xde3571({'name':_0x52836f,'tokenId':_0x5eafc2['id']||null,'tokenHash':_0x5eafc2[_0x3e9304(0x6e5)],'ttlMs':this[_0x3e9304(0xb8e)]});return this[_0x3e9304(0xd4f)]?.[_0x3e9304(0x9be)]?.['info']?.(_0x3e9304(0x303),{'feature':_0x3e9304(0x93f),'name':_0x52836f,'tokenId':_0x313ba6}),{'ok':!![],'user':{'name':_0x52836f,'permissions':_0x5eafc2['permissions']||[]},'cookie':_0x52bbe4,'cookieName':this['_cookieName'],'expiresIn':Math[_0x3e9304(0xf9a)](this[_0x3e9304(0xb8e)]/0x3e8)};}[_0x420984(0x123f)](){const _0x529bcf=_0x420984,_0x320f6c=[];return this['_openSpec']!==null&&_0x320f6c[_0x529bcf(0x597)]({'level':_0x529bcf(0xf78),'code':_0x529bcf(0x7e4),'title':_0x529bcf(0x1202),'message':_0x529bcf(0x254),'hint':_0x529bcf(0x67c)}),_0x320f6c;}[_0x420984(0x5ae)](){const _0x3fdf60=_0x420984,_0x2c7bfe=this[_0x3fdf60(0x3b8)]!==null,_0x35ea6e=this[_0x3fdf60(0x10b0)](),_0x48a642=this[_0x3fdf60(0xd4f)][_0x3fdf60(0xc65)]&&this[_0x3fdf60(0xd4f)][_0x3fdf60(0xc65)][_0x3fdf60(0x7c0)](_0x3fdf60(0xbb0)),_0x4b9a9d=typeof this[_0x3fdf60(0x9c5)]?.[_0x3fdf60(0x8b1)]===_0x3fdf60(0x63b);return{'mode':this['mode'],'openAccess':_0x2c7bfe,'bootstrap':_0x35ea6e,'setupRequired':![],'login':{'enabled':!_0x2c7bfe&&!_0x35ea6e&&_0x48a642},'oauth':{'enabled':_0x4b9a9d,'providers':_0x4b9a9d?[this[_0x3fdf60(0x9c5)][_0x3fdf60(0xe27)]||_0x3fdf60(0xce9)]:[]}};}[_0x420984(0xebb)](_0x539ed7={},_0x1d91c1=0x927c0){const _0x2f785d=_0x420984,_0x4cdd61=_0x4ba9f6[_0x2f785d(0x431)](0x18);return this[_0x2f785d(0x291)][_0x2f785d(0x211)](_0x4cdd61,{..._0x539ed7,'exp':Date['now']()+_0x1d91c1}),_0x4cdd61;}[_0x420984(0x105a)](_0x555a00){const _0x2ae822=_0x420984;if(!_0x555a00)return null;const _0x45db54=this[_0x2ae822(0x291)]['get'](_0x555a00);this[_0x2ae822(0x291)]['delete'](_0x555a00);if(!_0x45db54)return null;if(_0x45db54[_0x2ae822(0x116f)]<=Date['now']())return null;return _0x45db54;}async['_validateOidcAccessToken'](_0x3eef6a,_0x553ab8={}){const _0x2df309=_0x420984,_0x9a8567=_0x2590c4(_0x3eef6a),_0x449f48=Array[_0x2df309(0x10f5)](_0x553ab8[_0x2df309(0xbef)])&&_0x553ab8[_0x2df309(0xbef)][_0x2df309(0x156)]>0x0?_0x553ab8[_0x2df309(0xbef)]:['RS256',_0x2df309(0x10c7)],_0x1a3b4b=_0x9a8567[_0x2df309(0x3f8)]?.[_0x2df309(0x6d3)];if(!_0x449f48[_0x2df309(0x29c)](_0x1a3b4b))throw new Error(_0x2df309(0x806)+_0x1a3b4b);if(!_0x9a8567['header']?.[_0x2df309(0xe91)])throw new Error('JWT\x20is\x20missing\x20kid');const _0x505e11=await this[_0x2df309(0xbca)](_0x553ab8);if(!_0x505e11?.[_0x2df309(0x4e9)])throw new Error(_0x2df309(0x3f7));const _0xcdea27=await this[_0x2df309(0x926)](_0x505e11[_0x2df309(0x4e9)],_0x9a8567[_0x2df309(0x3f8)][_0x2df309(0xe91)],_0x553ab8);if(!_0x31a894(_0x1a3b4b,_0xcdea27,_0x9a8567[_0x2df309(0x5b1)],_0x9a8567[_0x2df309(0x1215)]))throw new Error(_0x2df309(0xdd));const _0x11a3c8=Math[_0x2df309(0xf9a)](Date[_0x2df309(0x555)]()/0x3e8),_0x711dec=_0x9a8567['payload']||{};if(_0x711dec[_0x2df309(0x6bd)]!==_0x505e11['issuer'])throw new Error(_0x2df309(0x7a8));const _0x1ead1a=_0x553ab8['audience'];if(_0x1ead1a){const _0x9bfed2=_0x471f15(_0x711dec[_0x2df309(0x28a)]);if(!_0x9bfed2['includes'](_0x1ead1a))throw new Error(_0x2df309(0x111));}if(typeof _0x711dec[_0x2df309(0x116f)]!==_0x2df309(0x9f0)||_0x711dec[_0x2df309(0x116f)]<=_0x11a3c8)throw new Error(_0x2df309(0xb98));if(_0x711dec[_0x2df309(0xb3a)]!=null&&_0x711dec[_0x2df309(0xb3a)]>_0x11a3c8)throw new Error(_0x2df309(0xbf));if(_0x711dec[_0x2df309(0x644)]==='id')throw new Error('ID\x20token\x20is\x20not\x20accepted');return{'subject':_0x711dec['sub']??null,'email':_0x711dec[_0x2df309(0x5d0)]??null,'scopes':typeof _0x711dec[_0x2df309(0x85b)]===_0x2df309(0xf7a)?_0x711dec[_0x2df309(0x85b)][_0x2df309(0xfb1)](/\s+/)[_0x2df309(0x1103)](Boolean):[],'claims':_0x711dec,'tokenType':_0x2df309(0x2f8)};}async['_getOidcDiscovery'](_0x3fdf00={}){const _0x2893e6=_0x420984,_0x14a524=String(_0x3fdf00[_0x2893e6(0x7ce)]||'')[_0x2893e6(0x8d8)](/\/+$/,'');if(!_0x14a524)return null;const _0x258178=Number[_0x2893e6(0x2b5)](_0x3fdf00[_0x2893e6(0x2d7)])?_0x3fdf00[_0x2893e6(0x2d7)]:0xa*0x3c*0x3e8;if(this[_0x2893e6(0x829)]?.[_0x2893e6(0x7ce)]===_0x14a524&&this[_0x2893e6(0x829)][_0x2893e6(0xa92)]>Date[_0x2893e6(0x555)]())return this[_0x2893e6(0x829)]['value'];const _0x2bf23d=await _0x1a4fe8(_0x14a524+_0x2893e6(0xbcc)),_0x2ede72={'issuer':_0x2bf23d[_0x2893e6(0x7ce)]||_0x14a524,'authorization_endpoint':_0x3fdf00[_0x2893e6(0x2fc)]||_0x2bf23d[_0x2893e6(0x6bb)],'token_endpoint':_0x3fdf00[_0x2893e6(0xcd)]||_0x2bf23d[_0x2893e6(0x844)],'jwks_uri':_0x3fdf00['jwksUri']||_0x2bf23d['jwks_uri']};return this[_0x2893e6(0x829)]={'issuer':_0x14a524,'value':_0x2ede72,'expiresAt':Date[_0x2893e6(0x555)]()+_0x258178},_0x2ede72;}async['_fetchJwks'](_0x327566,_0x2b7733=0x5*0x3c*0x3e8){const _0x296329=_0x420984,_0x16e5a5=await _0x1a4fe8(_0x327566),_0x5873ee=new Map();for(const _0x2bd48e of _0x16e5a5[_0x296329(0xa52)]||[]){if(!_0x2bd48e?.[_0x296329(0xe91)])continue;_0x5873ee[_0x296329(0x211)](_0x2bd48e['kid'],_0x22fe7d(_0x2bd48e));}return this['_jwksCache']={'uri':_0x327566,'keys':_0x5873ee,'expiresAt':Date['now']()+_0x2b7733},this[_0x296329(0xde5)];}async['_getJwkKey'](_0x2fbf3a,_0x16e14f,_0xc146a9={}){const _0x5bf124=_0x420984,_0x2141c2=Number[_0x5bf124(0x2b5)](_0xc146a9[_0x5bf124(0x40d)])?_0xc146a9[_0x5bf124(0x40d)]:0x5*0x3c*0x3e8,_0x3c2fdc=0x1e*0x3e8,_0x1f8942=this[_0x5bf124(0x1241)][_0x5bf124(0xbeb)](_0x16e14f);if(_0x1f8942!==undefined&&_0x1f8942>Date['now']())throw new Error(_0x5bf124(0x108e)+_0x16e14f);(!this[_0x5bf124(0xde5)]||this[_0x5bf124(0xde5)][_0x5bf124(0x3d4)]!==_0x2fbf3a||this[_0x5bf124(0xde5)][_0x5bf124(0xa92)]<=Date[_0x5bf124(0x555)]())&&await this[_0x5bf124(0x3b7)](_0x2fbf3a,_0x2141c2);let _0xa45992=this[_0x5bf124(0xde5)]?.[_0x5bf124(0xa52)]?.['get'](_0x16e14f);if(_0xa45992)return _0xa45992;await this[_0x5bf124(0x3b7)](_0x2fbf3a,_0x2141c2),_0xa45992=this[_0x5bf124(0xde5)]?.[_0x5bf124(0xa52)]?.[_0x5bf124(0xbeb)](_0x16e14f);if(!_0xa45992){this[_0x5bf124(0x1241)][_0x5bf124(0x211)](_0x16e14f,Date[_0x5bf124(0x555)]()+_0x3c2fdc);throw new Error('Unknown\x20JWKS\x20kid:\x20'+_0x16e14f);}return _0xa45992;}[_0x420984(0x1172)](_0xc14d9d){const _0x1f3f2d=_0x420984,_0x1c2ead=_0xc14d9d?.[_0x1f3f2d(0x525)]||{},_0x2b685c={'sub':_0xc14d9d?.[_0x1f3f2d(0x155)]??_0x1c2ead[_0x1f3f2d(0x52e)]??null,'email':_0xc14d9d?.[_0x1f3f2d(0x5d0)]??_0x1c2ead['email']??null,'name':_0xc14d9d?.[_0x1f3f2d(0x1173)]??_0x1c2ead[_0x1f3f2d(0x1173)]??_0x1c2ead[_0x1f3f2d(0x1071)]??null,'groups':_0xc14d9d?.[_0x1f3f2d(0xa59)]??_0x1c2ead[_0x1f3f2d(0xa59)]??[],'roles':_0xc14d9d?.['roles']??_0x1c2ead[_0x1f3f2d(0xa6d)]??[]};return{'type':_0x1f3f2d(0xce9),'tokenType':_0xc14d9d?.[_0x1f3f2d(0x123c)]??_0x1f3f2d(0x2f8),'subject':_0x2b685c['sub'],'email':_0x2b685c['email'],'scopes':_0xc14d9d?.[_0x1f3f2d(0x10a4)]??_0x1c2ead[_0x1f3f2d(0x85b)]?.[_0x1f3f2d(0xfb1)]?.('\x20')?.[_0x1f3f2d(0x1103)](Boolean)??[],'claims':_0x1c2ead,'user':_0x2b685c,'isAuthenticated':!![]};}}return okdbAuth=_0x3abf06,okdbAuth;}var okdb$2,hasRequiredOkdb$1;function requireOkdb$1(){const _0x374c80=_0xef8cd8;if(hasRequiredOkdb$1)return okdb$2;hasRequiredOkdb$1=0x1;const _0x155663=require$$0$6,_0x32a01f=require$$1$2,_0x2979f9=require$$0$7,_0x5c32e1=require$$3$1,_0x2fea4a=require$$0$1,_0x3d2df1=requireOkdbEnv(),{OKDB_STATE:_0x51165e,EVENTS:_0x3fcb4f,CHANGE_ACTIONS:_0xa683a}=requireOkdbEnums(),{OKDBError:_0x30d9e7}=requireOkdbError(),_0x2946d9=requireOkdbHttp(),_0x1a03e8=requireOkdbLogger(),_0xb0c502=requireOkdbBus(),_0x4466bc=requireOkdbEngines(),_0x56fd0f=requireOkdbPlugins(),_0xd0f49f=requireOkdbFunctions(),_0x26b40c=requireOkdbPipelines(),_0x47e8fd=requireOkdbQueueHttp(),_0x18fa44=requireOkdbFilesHttp(),_0x5e2e12=requireOkdbPipelinesHttp(),_0x2fd0d2=requireOkdbEnginesHttp(),_0x632499=requireOkdbSchemaHttp(),_0x13584f=requireOkdbTimeMachineHttp(),{OKDBTimeMachine:_0x314e70}=requireOkdbTimeMachine(),_0x4fdb56=requireOkdbApi(),_0x39aa75=requireOkdbAdmin(),_0x4e2247=requireOkdbMeta(),_0x26408a=requireOkdbMigrate(),_0x38326a=requireOkdbSync(),_0x56d688=requireOkdbQueue(),_0x4e4449=requireOkdbEmbeddings(),_0x3211d6=requireOkdbFts(),_0x2ebed9=requireOkdbFiles(),_0x29aca3=requireOkdbMcp(),_0x33b220=requireOkdbAuth(),_0x24386f='~envs';function _0x1c186f(_0x2099e2){const _0x24c8d1=_0x47ab;try{return commonjsRequire(require[_0x24c8d1(0x797)](_0x2099e2))[_0x24c8d1(0x45c)];}catch{return null;}}const {equal:_0x2ea86f}=requireOkdbEqual();class _0x1cfeee{static [_0x374c80(0xabb)]={'maxDbs':0x400,'pageSize':0x1000,'compression':!![],'encryptionKey':undefined,'mapSize':0x4*0x400**0x3,'durability':_0x374c80(0x2c3)};['state']=_0x51165e[_0x374c80(0x364)];[_0x374c80(0xe56)]=![];['_envs']=new Map();[_0x374c80(0xc65)]=null;[_0x374c80(0xaf5)]=null;get[_0x374c80(0x7a2)](){const _0x587a07=_0x374c80;return this[_0x587a07(0xc65)]?.['db']??null;}[_0x374c80(0x11e5)];constructor(_0x55a6b0,_0x597512={}){const _0x1f2743=_0x374c80;this['path']=_0x55a6b0,this[_0x1f2743(0x11e5)]={..._0x1cfeee[_0x1f2743(0xabb)],..._0x597512,'auth':_0x597512['auth']?{..._0x597512[_0x1f2743(0x93f)]}:undefined,'lmdb':{..._0x597512[_0x1f2743(0x96b)]||{}}},this[_0x1f2743(0xea8)]=new _0x5c32e1(),this['http']=new _0x2946d9(),this[_0x1f2743(0x93f)]=new _0x33b220(this),this['http'][_0x1f2743(0x443)]=this;const _0x3a2012=this[_0x1f2743(0x11e5)]?.['auth']?.['open']??![];let _0x31943a=this[_0x1f2743(0x11e5)]?.[_0x1f2743(0x93f)]?.[_0x1f2743(0xce9)]||{};if(this[_0x1f2743(0x11e5)]?.['auth']?.['providers']){const _0x116965=Object[_0x1f2743(0x1129)](this[_0x1f2743(0x11e5)][_0x1f2743(0x93f)][_0x1f2743(0x17e)])[0x0];if(_0x116965){const [_0x38a3bc,_0x424325]=_0x116965;_0x31943a={'providerLabel':_0x38a3bc,'issuer':_0x424325[_0x1f2743(0x7ce)],'clientId':_0x424325['clientId'],'scopes':_0x424325[_0x1f2743(0x10a4)]||[_0x1f2743(0xa64),_0x1f2743(0x5d0),_0x1f2743(0xca1)],..._0x424325};}}this[_0x1f2743(0x270)]={'open':_0x3a2012,'session':{'secure':this[_0x1f2743(0x11e5)]?.[_0x1f2743(0x93f)]?.[_0x1f2743(0x5f0)]?.[_0x1f2743(0x102a)]??![],'sameSite':this['options']?.[_0x1f2743(0x93f)]?.['session']?.[_0x1f2743(0x7ac)]??'Lax'},'oauth':_0x31943a};if(typeof this['http']['configureAuth']==='function')this[_0x1f2743(0x9f4)]['configureAuth']({...this[_0x1f2743(0x270)]});else this[_0x1f2743(0x9f4)][_0x1f2743(0x809)]={...this['_resolvedAuthConfig']};this[_0x1f2743(0x9be)]=new _0x1a03e8(this),this[_0x1f2743(0x9be)][_0x1f2743(0x7f6)](),this[_0x1f2743(0xafb)]=_0x597512[_0x1f2743(0xafb)]!==![]?new _0xb0c502(this,_0x597512[_0x1f2743(0xafb)]):null,this['engines']=new _0x4466bc(this),this['pipelines']=new _0x26b40c(this),this[_0x1f2743(0x678)]=new _0x56fd0f(this),this[_0x1f2743(0x705)]=new _0xd0f49f(this,{'runtimeDefaults':this[_0x1f2743(0x11e5)][_0x1f2743(0x705)]}),this[_0x1f2743(0x90a)]=new _0x39aa75(this),this[_0x1f2743(0x1034)]=new _0x38326a(this),this[_0x1f2743(0x1f5)]=new _0x4fdb56(this),this[_0x1f2743(0x654)]=new _0x4e2247(this),this[_0x1f2743(0x454)]=new _0x26408a(this),_0x47e8fd(this),_0x18fa44(this),_0x5e2e12(this),_0x2fd0d2(this),_0x632499(this),_0x13584f(this),this[_0x1f2743(0x7f1)]=new _0x4e4449(this),this[_0x1f2743(0xfca)]=new _0x3211d6(this),this['mcp']=new _0x29aca3(this),this['_license']=null,this['_licenseInterval']=null;}async[_0x374c80(0xa7f)](){const _0x6009f9=_0x374c80;if(this['_systemEnv'])return this[_0x6009f9(0xc65)];if(this[_0x6009f9(0xa3)][_0x6009f9(0x9d0)](_0x6009f9(0xfd5)))return this['_systemEnv']=this[_0x6009f9(0xa3)][_0x6009f9(0xbeb)]('~system'),this[_0x6009f9(0xc65)];return!this['_systemEnvPromise']&&(this['_systemEnvPromise']=this[_0x6009f9(0xc01)]()[_0x6009f9(0x7db)](_0x234b7b=>{const _0x1c21ed=_0x6009f9;return this[_0x1c21ed(0xc65)]=_0x234b7b,_0x234b7b;})[_0x6009f9(0x415)](_0x17afe9=>{const _0x4f44df=_0x6009f9;this[_0x4f44df(0xaf5)]=null;throw _0x17afe9;})),this[_0x6009f9(0xaf5)];}async[_0x374c80(0xc01)](){const _0x5dea8d=_0x374c80,_0x9d04f=_0x32a01f['join'](this[_0x5dea8d(0x20b)],'~system');_0x2979f9['mkdirSync'](_0x9d04f,{'recursive':!![]});const _0x4a70f6=new _0x3d2df1(this,'~system',_0x9d04f,{'sync':!![]});return this[_0x5dea8d(0xa3)]['set']('~system',_0x4a70f6),await _0x4a70f6['open'](),_0x4a70f6;}[_0x374c80(0x30b)](_0x81f43f=_0x374c80(0x8d0)){const _0x26dce8=_0x374c80,_0x29c4ee=this[_0x26dce8(0xa3)][_0x26dce8(0xbeb)](_0x81f43f);if(!_0x29c4ee)throw new _0x30d9e7(_0x26dce8(0x409)+_0x81f43f+_0x26dce8(0x310),'ENV_NOT_FOUND');return _0x29c4ee;}get['default'](){const _0x2429ae=_0x374c80;return this[_0x2429ae(0x30b)]('default');}get['queue'](){const _0x2dc279=_0x374c80;return this[_0x2dc279(0x30b)](_0x2dc279(0x8d0))['queue'];}get[_0x374c80(0xf5b)](){const _0x1363a9=_0x374c80;return this[_0x1363a9(0x30b)]('default')[_0x1363a9(0xf5b)];}async[_0x374c80(0xf79)](_0x1824ba,_0x46fa13={}){const _0x108f5e=_0x374c80;if(this['_envs'][_0x108f5e(0x9d0)](_0x1824ba))return this['_envs'][_0x108f5e(0xbeb)](_0x1824ba);if(this[_0x108f5e(0x3a3)]){const _0x2286fd=[...this[_0x108f5e(0xa3)][_0x108f5e(0xa52)]()][_0x108f5e(0x1103)](_0x5dc9a7=>!_0x5dc9a7[_0x108f5e(0x8ba)]('~'))[_0x108f5e(0x156)];this[_0x108f5e(0x3a3)][_0x108f5e(0x8b0)]('envs',_0x2286fd);}const _0x2248a2=_0x1824ba[_0x108f5e(0x8d8)](/:/g,'-')[_0x108f5e(0x8d8)](/[<>"|?*]/g,'_'),_0x3ebcb6=_0x32a01f['join'](this['path'],_0x2248a2);_0x2979f9[_0x108f5e(0xb69)](_0x3ebcb6,{'recursive':!![]});const _0x21e3d0=new _0x3d2df1(this,_0x1824ba,_0x3ebcb6,_0x46fa13);this[_0x108f5e(0xa3)][_0x108f5e(0x211)](_0x1824ba,_0x21e3d0),await _0x21e3d0[_0x108f5e(0x717)]();const _0xb0940d=_0x1824ba===_0x108f5e(0xfd5);!_0xb0940d&&(_0x21e3d0[_0x108f5e(0x879)]=new _0x56d688(this,{...this[_0x108f5e(0x11e5)][_0x108f5e(0x879)],'_env':_0x21e3d0,'_skipHttp':!![]}),_0x21e3d0['files']=new _0x2ebed9(this,{'_env':_0x21e3d0,'_skipHttp':!![]}));this[_0x108f5e(0xab8)][_0x108f5e(0x250)]&&await _0x21e3d0[_0x108f5e(0xab8)][_0x108f5e(0xa00)]();this[_0x108f5e(0xe4f)](_0x21e3d0,_0x1824ba);if(this['_isOpen']&&_0x21e3d0[_0x108f5e(0x4db)])_0x21e3d0['timeMachine']['start']();return!_0xb0940d&&this[_0x108f5e(0xc65)]&&await this[_0x108f5e(0x66e)](_0x1824ba,_0x3ebcb6,_0x46fa13),this['events'][_0x108f5e(0xf5d)](_0x3fcb4f[_0x108f5e(0x554)],{'name':_0x1824ba}),_0x21e3d0;}async[_0x374c80(0x66e)](_0x38752d,_0x37997c,_0x2a6959){const _0x4b9a3e=_0x374c80,_0x8c6e60=this[_0x4b9a3e(0xc65)];if(!_0x8c6e60)return;if(!_0x8c6e60[_0x4b9a3e(0x7c0)](_0x24386f))await _0x8c6e60[_0x4b9a3e(0xa39)](_0x24386f);const _0x127bdd=_0x8c6e60[_0x4b9a3e(0xbeb)](_0x24386f,_0x38752d);if(_0x127bdd)return;await _0x8c6e60[_0x4b9a3e(0x92c)](_0x24386f,_0x38752d,{'name':_0x38752d,'path':_0x37997c,'config':_0x2a6959??{},'createdAt':Date[_0x4b9a3e(0x555)](),'parentEnv':_0x2a6959?.[_0x4b9a3e(0xd0c)]??null});}async[_0x374c80(0x6a2)](_0x5f127d,_0x1c4e0b={}){const _0x381e90=_0x374c80,_0x517798=new Set([_0x381e90(0xfd5),_0x381e90(0xf1f)]);if(_0x517798['has'](_0x5f127d))throw new _0x30d9e7(_0x381e90(0xac1)+_0x5f127d+'\x22',_0x381e90(0x629));const _0x53e213=new Set(_0x1c4e0b[_0x381e90(0xe03)]??[]),_0x58c3be=_0x3cd17a=>{const _0x14d2f8=_0x381e90;if(!_0x3cd17a)return![];try{if(!_0x2979f9[_0x14d2f8(0x66d)](_0x3cd17a))return!![];return _0x2979f9['rmSync'](_0x3cd17a,{'recursive':!![],'force':!![]}),!![];}catch{return![];}},_0x5945a2=async _0x5a0c10=>{const _0x177e0d=_0x381e90,_0x343db9=this['_envs']['get'](_0x5a0c10);if(!_0x343db9)return null;const _0x1fcac9=_0x343db9['path'];_0x343db9['_isOpen']=![];const _0x2d9551=[...this[_0x177e0d(0xfca)][_0x177e0d(0x97a)][_0x177e0d(0xa52)]()][_0x177e0d(0x1103)](_0x403e14=>_0x403e14[_0x177e0d(0x8ba)](_0x5a0c10+':'));for(const _0x62d62b of _0x2d9551){try{await this[_0x177e0d(0xfca)]['_processorStops'][_0x177e0d(0xbeb)](_0x62d62b)?.();}catch{}this[_0x177e0d(0xfca)][_0x177e0d(0x97a)][_0x177e0d(0x3b3)](_0x62d62b);}for(const [,_0x416f7c]of _0x343db9[_0x177e0d(0x1145)]??new Map()){if(!_0x416f7c[_0x177e0d(0x6ef)])continue;for(const [,_0xa186e9]of _0x416f7c['ftsToDb']){if(!_0xa186e9[_0x177e0d(0xc9)]||_0xa186e9[_0x177e0d(0x361)])continue;_0xa186e9[_0x177e0d(0x361)]=!![];try{await _0xa186e9[_0x177e0d(0xc9)][_0x177e0d(0x11ac)]();}catch{}}}try{await _0x343db9[_0x177e0d(0xf39)]?.[_0x177e0d(0x910)]?.();}catch{}try{await _0x343db9[_0x177e0d(0x11ac)]();}catch{}return this[_0x177e0d(0xa3)][_0x177e0d(0x3b3)](_0x5a0c10),_0x1fcac9;},_0xc990b=(_0x2940ea,_0x386f5b)=>{const _0x5ef28a=_0x381e90,_0xe1986e=[],_0xf2fdaa=[];if(_0x386f5b){if(_0x58c3be(_0x386f5b))_0xe1986e[_0x5ef28a(0x597)](_0x386f5b);else _0xf2fdaa[_0x5ef28a(0x597)](_0x386f5b);}const _0x2ced43=_0x2940ea['replace'](/[:/\\?*"<>|]/g,'_'),_0x9b0f8b=_0x32a01f[_0x5ef28a(0x3d9)](this[_0x5ef28a(0x20b)],_0x5ef28a(0xcb9),_0x2ced43);if(_0x2979f9[_0x5ef28a(0x66d)](_0x9b0f8b)){if(_0x58c3be(_0x9b0f8b))_0xe1986e[_0x5ef28a(0x597)](_0x9b0f8b);else _0xf2fdaa['push'](_0x9b0f8b);}return{'removed':_0xe1986e,'locked':_0xf2fdaa};};if(!this[_0x381e90(0xa3)][_0x381e90(0x9d0)](_0x5f127d)){const _0x18f7e2=this[_0x381e90(0xc65)]?.[_0x381e90(0x7c0)](_0x24386f)?this[_0x381e90(0xc65)][_0x381e90(0xbeb)](_0x24386f,_0x5f127d):null;if(!_0x18f7e2)throw new _0x30d9e7('Environment\x20\x22'+_0x5f127d+_0x381e90(0x310),_0x381e90(0x8ef));await this[_0x381e90(0xc65)][_0x381e90(0x21e)](_0x24386f,_0x5f127d);const {removed:_0x120a0d,locked:_0x37fe08}=_0xc990b(_0x5f127d,_0x18f7e2[_0x381e90(0x20b)]??null);return this['events']['emit'](_0x3fcb4f[_0x381e90(0xe6b)],{'name':_0x5f127d}),{'ok':!![],'name':_0x5f127d,'filesRemoved':_0x120a0d,'filesLocked':_0x37fe08};}const _0x2b8ff7=this[_0x381e90(0xa3)]['get'](_0x5f127d)?.['path']??null,_0x547a68=[];if(this['_systemEnv']?.['hasType'](_0x24386f))for(const {key:_0x5d0d8f,value:_0x2bdd15}of this[_0x381e90(0xc65)][_0x381e90(0x9ce)](_0x24386f)){(_0x2bdd15[_0x381e90(0xd0c)]===_0x5f127d||_0x5d0d8f[_0x381e90(0x8ba)]('~'+_0x5f127d+':'))&&_0x547a68[_0x381e90(0x597)]({'key':_0x5d0d8f,'path':_0x2bdd15[_0x381e90(0x20b)]??this[_0x381e90(0xa3)]['get'](_0x5d0d8f)?.[_0x381e90(0x20b)]??null});}await _0x5945a2(_0x5f127d);this['_systemEnv']?.[_0x381e90(0x7c0)](_0x24386f)&&await this[_0x381e90(0xc65)]['remove'](_0x24386f,_0x5f127d);const _0x55ea15=[];for(const _0x3bd989 of _0x547a68){await _0x5945a2(_0x3bd989[_0x381e90(0x9dd)]);if(_0x53e213[_0x381e90(0x9d0)](_0x3bd989[_0x381e90(0x9dd)])){_0x55ea15['push'](_0x3bd989['key']);continue;}if(this['_systemEnv']?.[_0x381e90(0x7c0)](_0x24386f))try{await this['_systemEnv'][_0x381e90(0x21e)](_0x24386f,_0x3bd989[_0x381e90(0x9dd)]);}catch{}}this[_0x381e90(0x7f1)]?.[_0x381e90(0xb8a)]?.(_0x5f127d);const _0x48f516=[],_0x57a31a=[],_0x57c158=_0xc990b(_0x5f127d,_0x2b8ff7);_0x48f516[_0x381e90(0x597)](..._0x57c158['removed']),_0x57a31a[_0x381e90(0x597)](..._0x57c158[_0x381e90(0x1120)]);for(const _0x3e58f7 of _0x547a68){if(_0x53e213['has'](_0x3e58f7[_0x381e90(0x9dd)]))continue;const _0x28fa92=_0xc990b(_0x3e58f7['key'],_0x3e58f7[_0x381e90(0x20b)]);_0x48f516[_0x381e90(0x597)](..._0x28fa92[_0x381e90(0xe3b)]),_0x57a31a[_0x381e90(0x597)](..._0x28fa92['locked']);}return this[_0x381e90(0xea8)][_0x381e90(0xf5d)](_0x3fcb4f['ENV_REMOVED'],{'name':_0x5f127d,'filesRemoved':_0x48f516,'filesLocked':_0x57a31a,'keptSubEnvs':_0x55ea15}),{'ok':!![],'name':_0x5f127d,'filesRemoved':_0x48f516,'filesLocked':_0x57a31a,'keptSubEnvs':_0x55ea15};}async['_openEnvFromRecord'](_0x3c57ed,_0x3f6a40){const _0xb85ca7=_0x374c80;if(!this['_isOpen'])return null;if(this[_0xb85ca7(0xa3)]['has'](_0x3c57ed))return this[_0xb85ca7(0xa3)]['get'](_0x3c57ed);const _0x1626d4=_0x3c57ed[_0xb85ca7(0x8d8)](/:/g,'-')[_0xb85ca7(0x8d8)](/[<>"|?*]/g,'_'),_0x4ca1c1=_0x32a01f['join'](this['path'],_0x1626d4);_0x2979f9['mkdirSync'](_0x4ca1c1,{'recursive':!![]});const _0x13d006=_0x3f6a40[_0xb85ca7(0x142)]??{},_0x100252=new _0x3d2df1(this,_0x3c57ed,_0x4ca1c1,_0x13d006);this[_0xb85ca7(0xa3)]['set'](_0x3c57ed,_0x100252),await _0x100252[_0xb85ca7(0x717)]();_0x3c57ed!==_0xb85ca7(0xfd5)&&(_0x100252['queue']=new _0x56d688(this,{...this[_0xb85ca7(0x11e5)][_0xb85ca7(0x879)],'_env':_0x100252,'_skipHttp':!![]}),_0x100252['files']=new _0x2ebed9(this,{'_env':_0x100252,'_skipHttp':!![]}));this[_0xb85ca7(0xab8)]['_started']&&await _0x100252[_0xb85ca7(0xab8)][_0xb85ca7(0xa00)]();this[_0xb85ca7(0xe4f)](_0x100252,_0x3c57ed);if(_0x100252[_0xb85ca7(0x4db)])_0x100252[_0xb85ca7(0x4db)]['start']();return this[_0xb85ca7(0xea8)]['emit'](_0x3fcb4f[_0xb85ca7(0x554)],{'name':_0x3c57ed,'env':_0x100252}),_0x100252;}get[_0x374c80(0xf39)](){const _0x2b3c9b=_0x374c80;return this[_0x2b3c9b(0x1cb)]??this[_0x2b3c9b(0x30b)](_0x2b3c9b(0x8d0))[_0x2b3c9b(0xf39)];}get[_0x374c80(0x1185)](){const _0x5f15c5=_0x374c80;return this[_0x5f15c5(0x30b)](_0x5f15c5(0x8d0))[_0x5f15c5(0x1185)];}set[_0x374c80(0x1185)](_0x190874){const _0xd82a06=_0x374c80;this['env'](_0xd82a06(0x8d0))[_0xd82a06(0x1185)]=_0x190874;}[_0x374c80(0x107)](){const _0x10ed0a=_0x374c80;return this['env'](_0x10ed0a(0x8d0))[_0x10ed0a(0x107)]();}async['bootRuntimeDeclarations'](){const _0x6c8fcd=_0x374c80;await this[_0x6c8fcd(0xab8)]['bootSyncedEngines'](),await this[_0x6c8fcd(0x7d3)]['bootSyncedPipelines']();for(const [,_0x51ba81]of this['_envs']){if(_0x51ba81[_0x6c8fcd(0x1173)][_0x6c8fcd(0x8ba)]('~'))continue;await _0x51ba81[_0x6c8fcd(0xaa5)][_0x6c8fcd(0xb41)]();}}async[_0x374c80(0x717)](){const _0x480b71=_0x374c80;if(this['state']!==_0x51165e[_0x480b71(0x364)])throw new _0x30d9e7(_0x480b71(0x395),_0x480b71(0xe5e),{'state':this[_0x480b71(0x10e2)]});this[_0x480b71(0x10e2)]=_0x51165e[_0x480b71(0xec9)];const {LicenseChecker:_0x4377dc}=requireOkdbLicense();this[_0x480b71(0x3a3)]=new _0x4377dc(this),this[_0x480b71(0x2ef)](),await this[_0x480b71(0xc01)](),this[_0x480b71(0xc65)]=this[_0x480b71(0xa3)][_0x480b71(0xbeb)](_0x480b71(0xfd5));let _0x95844f=this[_0x480b71(0xc65)]['db']['get'](_0x480b71(0x10c4));!_0x95844f&&(_0x95844f=this[_0x480b71(0x780)]()??_0x2fea4a['randomUUID'](),this[_0x480b71(0xc65)]['db'][_0x480b71(0xb6f)]('__identity',_0x95844f));this['id']=_0x95844f,this[_0x480b71(0x705)]['_registryEnv']=this[_0x480b71(0xc65)];this[_0x480b71(0x3a3)]&&(await this[_0x480b71(0x3a3)][_0x480b71(0x619)](),this[_0x480b71(0x3a3)][_0x480b71(0x43f)]?this['log'][_0x480b71(0x26c)]('license\x20active:\x20'+this[_0x480b71(0x3a3)][_0x480b71(0x43f)][_0x480b71(0xaf)],{'feature':_0x480b71(0x908)}):this['log'][_0x480b71(0x26c)](_0x480b71(0xecc),{'feature':_0x480b71(0x908)}),this[_0x480b71(0x204)]=setInterval(async()=>{const _0x58fd46=_0x480b71;try{await this[_0x58fd46(0x3a3)][_0x58fd46(0x350)]();}catch(_0x4c0444){this['log']['error'](_0x58fd46(0xce3),{'feature':_0x58fd46(0x908),'err':_0x4c0444['message']});}},0x36ee80),this[_0x480b71(0x204)][_0x480b71(0xba4)]());this[_0x480b71(0xafb)]?.['_usingDefaultSecret']&&(this[_0x480b71(0xafb)]['magic']=Buffer['from']('okdb-'+this['id']),this[_0x480b71(0xafb)][_0x480b71(0x93e)]=![]);!this[_0x480b71(0xc65)][_0x480b71(0x7c0)](_0x24386f)&&await this[_0x480b71(0xc65)][_0x480b71(0xa39)](_0x24386f);!this[_0x480b71(0xc65)][_0x480b71(0xbeb)](_0x24386f,'~log')&&await this[_0x480b71(0xc65)][_0x480b71(0x92c)](_0x24386f,_0x480b71(0xf1f),{'name':'~log','path':_0x32a01f[_0x480b71(0x3d9)](this[_0x480b71(0x20b)],'~log'),'config':{},'createdAt':Date['now']()});const _0x2b73ee=_0x32a01f[_0x480b71(0x3d9)](this[_0x480b71(0x20b)],'~log');_0x2979f9[_0x480b71(0xb69)](_0x2b73ee,{'recursive':!![]});const _0x392000=new _0x3d2df1(this,_0x480b71(0xf1f),_0x2b73ee,{'sync':![]});this[_0x480b71(0xa3)][_0x480b71(0x211)]('~log',_0x392000),await _0x392000[_0x480b71(0x717)](),_0x392000[_0x480b71(0x879)]=new _0x56d688(this,{...this['options'][_0x480b71(0x879)],'_env':_0x392000,'_skipHttp':!![]}),_0x392000[_0x480b71(0xf5b)]=new _0x2ebed9(this,{'_env':_0x392000,'_skipHttp':!![]});!_0x392000['hasType'](_0x480b71(0xd2e))&&(await _0x392000['registerType']('~log_entry'),await _0x392000[_0x480b71(0x11ee)]('~log_entry',['ts']),await _0x392000[_0x480b71(0x11ee)]('~log_entry',['level','ts']),await _0x392000[_0x480b71(0x11ee)]('~log_entry',[_0x480b71(0xc9f),'ts']),await _0x392000[_0x480b71(0x11ee)](_0x480b71(0xd2e),[_0x480b71(0x19e),'ts']));const _0xdfcf72=(this[_0x480b71(0x11e5)]?.[_0x480b71(0x9be)]?.[_0x480b71(0xd1c)]??0x2)*0x5265c00;await _0x392000[_0x480b71(0x471)](_0x480b71(0xd2e),_0xdfcf72),this[_0x480b71(0x6d1)]=_0x392000,this['_detachLogSink']=this[_0x480b71(0x9be)][_0x480b71(0x7fb)](_0x392000,this['id']);let _0x7e2edc=this[_0x480b71(0xc65)]['db']['get']('__tokenSecret');!_0x7e2edc&&(_0x7e2edc=this['options']?.[_0x480b71(0x93f)]?.['token']?.['secret']??_0x2fea4a[_0x480b71(0x3d0)](0x20)['toString'](_0x480b71(0xb6e)),this['_systemEnv']['db'][_0x480b71(0xb6f)](_0x480b71(0x4ec),_0x7e2edc));this[_0x480b71(0x9b)]=_0x7e2edc,this[_0x480b71(0x9f4)][_0x480b71(0x809)][_0x480b71(0x503)]=_0x7e2edc,this[_0x480b71(0x9f4)][_0x480b71(0x809)][_0x480b71(0x1153)]=this[_0x480b71(0x11e5)]?.[_0x480b71(0x93f)]?.[_0x480b71(0x15a)]?.[_0x480b71(0x347)]??0x36ee80,await this[_0x480b71(0x93f)]['start'](this[_0x480b71(0xc65)],{...this[_0x480b71(0x270)],'tokenSecret':_0x7e2edc,'tokenTtl':this['options']?.[_0x480b71(0x93f)]?.['token']?.['ttl']??0x36ee80,'cookieName':this[_0x480b71(0x9f4)][_0x480b71(0x93f)][_0x480b71(0x950)]});let _0x1f4ed9=this[_0x480b71(0xc65)]['db'][_0x480b71(0xbeb)](_0x480b71(0x5b3)),_0x1d165e=this[_0x480b71(0xc65)]['db'][_0x480b71(0xbeb)](_0x480b71(0x411));if(!_0x1f4ed9||!_0x1d165e){const _0x4b4f1c=requireOkdbSyncIdentity(),_0x98de56=_0x4b4f1c[_0x480b71(0xef4)]();_0x1f4ed9=_0x98de56[_0x480b71(0xfa1)],_0x1d165e=_0x98de56[_0x480b71(0x1007)],this[_0x480b71(0xc65)]['db']['putSync']('__nodePrivateKey',_0x1f4ed9),this['_systemEnv']['db'][_0x480b71(0xb6f)](_0x480b71(0x411),_0x1d165e),this[_0x480b71(0x9be)][_0x480b71(0xd9b)]({'feature':_0x480b71(0x1034)})['info']('generated\x20Ed25519\x20keypair');}this[_0x480b71(0xd23)]=_0x1f4ed9,this[_0x480b71(0x838)]=_0x1d165e,this[_0x480b71(0x1034)][_0x480b71(0xd23)]=_0x1f4ed9,this[_0x480b71(0x1034)][_0x480b71(0x838)]=_0x1d165e;this[_0x480b71(0x1034)]['options']?.[_0x480b71(0x7f2)]&&await this[_0x480b71(0x1034)]['_ensure']();!this[_0x480b71(0xc65)][_0x480b71(0x7c0)](_0x24386f)&&await this[_0x480b71(0xc65)][_0x480b71(0xa39)](_0x24386f);const _0x4c2a20=_0x32a01f[_0x480b71(0x3d9)](this[_0x480b71(0x20b)],_0x480b71(0x8d0));!this[_0x480b71(0xc65)][_0x480b71(0xbeb)](_0x24386f,_0x480b71(0x8d0))&&await this['_systemEnv'][_0x480b71(0x92c)](_0x24386f,_0x480b71(0x8d0),{'name':_0x480b71(0x8d0),'path':_0x4c2a20,'config':{},'createdAt':Date[_0x480b71(0x555)]()});for(const {key:_0x5e726a,value:_0x26e821}of this['_systemEnv']['getRange'](_0x24386f)){if(this[_0x480b71(0xa3)][_0x480b71(0x9d0)](_0x5e726a))continue;const _0x2b8281=_0x26e821[_0x480b71(0x20b)]??_0x32a01f[_0x480b71(0x3d9)](this[_0x480b71(0x20b)],_0x5e726a['replace'](/:/g,'-')[_0x480b71(0x8d8)](/[<>"|?*]/g,'_'));_0x2979f9['mkdirSync'](_0x2b8281,{'recursive':!![]});const _0x5d6e86=new _0x3d2df1(this,_0x5e726a,_0x2b8281,_0x26e821[_0x480b71(0x142)]??{});this[_0x480b71(0xa3)][_0x480b71(0x211)](_0x5e726a,_0x5d6e86),await _0x5d6e86[_0x480b71(0x717)](),_0x5e726a!=='~system'&&(_0x5d6e86[_0x480b71(0x879)]=new _0x56d688(this,{...this[_0x480b71(0x11e5)][_0x480b71(0x879)],'_env':_0x5d6e86,'_skipHttp':!![]}),_0x5d6e86[_0x480b71(0xf5b)]=new _0x2ebed9(this,{'_env':_0x5d6e86,'_skipHttp':!![]})),this[_0x480b71(0xe4f)](_0x5d6e86,_0x5e726a);}this[_0x480b71(0xedb)](),this['_defaultProcessor']=this[_0x480b71(0x30b)]('default')[_0x480b71(0xf39)],this[_0x480b71(0xe56)]=!![];for(const [_0xc6facc,_0x5b1c8e]of this[_0x480b71(0xa3)]){if(_0x5b1c8e[_0x480b71(0x4db)])_0x5b1c8e[_0x480b71(0x4db)][_0x480b71(0xa00)]();}await this[_0x480b71(0x678)][_0x480b71(0xa00)](),await this[_0x480b71(0x30b)]('default')[_0x480b71(0xf5b)][_0x480b71(0xa00)](),await this[_0x480b71(0x7f1)]['start']();this[_0x480b71(0x11e5)][_0x480b71(0x61a)]!==![]&&(await this[_0x480b71(0xab8)]['start'](),await this[_0x480b71(0xe1e)]());this['bus']?.['start'](),this[_0x480b71(0x10e2)]=_0x51165e[_0x480b71(0x2b1)],this[_0x480b71(0xea8)][_0x480b71(0xf5d)](_0x3fcb4f['SYSTEM_READY'],this);const _0x4319e7=[...this['_envs'][_0x480b71(0xa52)]()][_0x480b71(0x1103)](_0x5269ab=>!_0x5269ab[_0x480b71(0x8ba)]('~'));this[_0x480b71(0x9be)][_0x480b71(0x26c)](_0x480b71(0x3c4),{'path':this[_0x480b71(0x20b)],'envs':_0x4319e7});}[_0x374c80(0xedb)](){const _0x19ce32=_0x374c80,_0x11cfb6=this,_0xeedf0a=this['_systemEnv'];if(!_0xeedf0a?.[_0x19ce32(0xf39)])return;this['_envSyncStop']=_0xeedf0a[_0x19ce32(0xf39)][_0x19ce32(0x2a4)](_0x24386f,{'mode':'inline','originMode':_0x19ce32(0xe61),'name':_0x19ce32(0x98d),'handler'(_0x4d73c2){const _0x52a536=_0x19ce32;for(const _0x55153a of _0x4d73c2){if(_0x55153a[_0x52a536(0xaee)]!==_0x24386f)continue;if(_0x55153a[_0x52a536(0x942)]!==_0xa683a[_0x52a536(0x719)])continue;const _0x2900f6=_0x55153a[_0x52a536(0xac)]??_0xeedf0a[_0x52a536(0xbeb)](_0x24386f,_0x55153a[_0x52a536(0x9dd)]);if(!_0x2900f6||_0x11cfb6[_0x52a536(0xa3)][_0x52a536(0x9d0)](_0x55153a[_0x52a536(0x9dd)]))continue;_0x11cfb6[_0x52a536(0xad)](_0x55153a['key'],_0x2900f6)[_0x52a536(0x415)](_0x522a77=>{const _0x357407=_0x52a536;_0x11cfb6[_0x357407(0x9be)][_0x357407(0xd9b)]({'feature':_0x357407(0xe2b)})[_0x357407(0x225)]('failed\x20to\x20open\x20env\x20\x22'+_0x55153a[_0x357407(0x9dd)]+'\x22',{'err':_0x522a77['message']});});}}});}[_0x374c80(0xe4f)](_0x21a48c,_0x190e2d){const _0x26b360=_0x374c80;if(!this['options'][_0x26b360(0x4db)])return;if(typeof _0x190e2d===_0x26b360(0xf7a)&&_0x190e2d['startsWith']('~'))return;if(this[_0x26b360(0x3a3)]&&!this[_0x26b360(0x3a3)][_0x26b360(0x79f)]('timeMachine'))return;_0x21a48c['timeMachine']=new _0x314e70(this,_0x21a48c,this[_0x26b360(0x11e5)][_0x26b360(0x4db)]);}[_0x374c80(0x2ef)](){const _0x267373=_0x374c80,_0x36a9ea=[[_0x267373(0x11d3),_0x267373(0xc38)],['blobs','~blobs'],[_0x267373(0xd8a),_0x267373(0x115f)]];for(const [_0x1b5644,_0xc55104]of _0x36a9ea){const _0x200e0e=_0x32a01f[_0x267373(0x3d9)](this['path'],_0x1b5644),_0xd1e7c1=_0x32a01f[_0x267373(0x3d9)](this['path'],_0xc55104);if(_0x2979f9[_0x267373(0x66d)](_0x200e0e)&&!_0x2979f9[_0x267373(0x66d)](_0xd1e7c1))try{_0x2979f9[_0x267373(0x27e)](_0x200e0e,_0xd1e7c1);}catch{}}const _0x39d186=_0x32a01f[_0x267373(0x3d9)](this['path'],_0x267373(0xcb9));try{const _0x5d48d4=_0x2979f9[_0x267373(0xa38)](this[_0x267373(0x20b)],{'withFileTypes':!![]});for(const _0x45fe1c of _0x5d48d4){if(!_0x45fe1c[_0x267373(0x11a0)]()||!_0x45fe1c['name'][_0x267373(0x8ba)](_0x267373(0x1005)))continue;_0x2979f9[_0x267373(0xb69)](_0x39d186,{'recursive':!![]});const _0x49c100=_0x32a01f[_0x267373(0x3d9)](this['path'],_0x45fe1c[_0x267373(0x1173)]),_0x21a1ba=_0x32a01f[_0x267373(0x3d9)](_0x39d186,_0x45fe1c[_0x267373(0x1173)][_0x267373(0xc3c)](0x4));if(!_0x2979f9[_0x267373(0x66d)](_0x21a1ba))try{_0x2979f9[_0x267373(0x27e)](_0x49c100,_0x21a1ba);}catch{}}}catch{}}[_0x374c80(0x780)](){const _0xdd9bdf=_0x374c80;for(const _0x359dde of[_0xdd9bdf(0xc38),_0xdd9bdf(0x11d3)]){try{const _0x319cb2=_0x32a01f[_0xdd9bdf(0x3d9)](this['path'],_0x359dde,'data.mdb');if(!_0x2979f9[_0xdd9bdf(0x66d)](_0x319cb2))continue;const _0x4ed3d3=_0x155663[_0xdd9bdf(0x717)](_0x32a01f[_0xdd9bdf(0x3d9)](this[_0xdd9bdf(0x20b)],_0x359dde),{'readOnly':![],'maxDbs':0x8}),_0x4c1305=_0x4ed3d3[_0xdd9bdf(0xbeb)](_0xdd9bdf(0x10c4))??_0x4ed3d3[_0xdd9bdf(0xbeb)]('id')??null;try{const _0x1e09aa=_0x4ed3d3[_0xdd9bdf(0x730)]('__env_registry',{'dupSort':![]});for(const {key:_0x288f15,value:_0x381ac7}of _0x1e09aa[_0xdd9bdf(0x9ce)]()){!this[_0xdd9bdf(0xc65)]['get'](_0x24386f,_0x288f15)&&this[_0xdd9bdf(0xc65)][_0xdd9bdf(0x92c)](_0x24386f,_0x288f15,{'name':_0x288f15,'path':_0x381ac7[_0xdd9bdf(0x20b)],'config':_0x381ac7[_0xdd9bdf(0x142)]??{},'createdAt':Date[_0xdd9bdf(0x555)]()})['catch'](()=>{});}}catch{}return _0x4ed3d3[_0xdd9bdf(0x11ac)](),_0x4c1305&&setImmediate(()=>{const _0x5ac7fe=_0xdd9bdf;try{_0x2979f9['rmSync'](_0x32a01f[_0x5ac7fe(0x3d9)](this[_0x5ac7fe(0x20b)],_0x359dde),{'recursive':!![]});}catch{}}),_0x4c1305;}catch{}}return null;}async[_0x374c80(0x11ac)](){const _0x55acd5=_0x374c80;if(this['state']!==_0x51165e['STARTED'])throw new _0x30d9e7(_0x55acd5(0x7d7),_0x55acd5(0xe5e),{'state':this[_0x55acd5(0x10e2)]});this[_0x55acd5(0x10e2)]=_0x51165e[_0x55acd5(0x10b4)],this[_0x55acd5(0xe56)]=![];this[_0x55acd5(0x204)]&&(clearInterval(this[_0x55acd5(0x204)]),this['_licenseInterval']=null);this[_0x55acd5(0x892)]?.(),this['_detachLogSink']=null,this[_0x55acd5(0x10a7)]?.(),this[_0x55acd5(0x10a7)]=null,this[_0x55acd5(0x118e)]?.(),this[_0x55acd5(0x118e)]=null,await this[_0x55acd5(0x9f4)]?.['close']?.(),await this[_0x55acd5(0xfca)][_0x55acd5(0x6a4)](),this[_0x55acd5(0x1034)]?.['stop']?.(),await this['_defaultProcessor']?.['stopAll'](),await this[_0x55acd5(0x705)][_0x55acd5(0x1fe)](),await this[_0x55acd5(0xab8)][_0x55acd5(0x1fe)]();const _0x447222=this[_0x55acd5(0x11e5)][_0x55acd5(0x102c)]??0x7530,_0x3c12b2=[];for(const _0x309f6c of this['_envs'][_0x55acd5(0x231)]()){_0x309f6c[_0x55acd5(0x879)]?.[_0x55acd5(0xb18)]?.[_0x55acd5(0xfb)]>0x0&&_0x3c12b2['push'](_0x309f6c[_0x55acd5(0x879)][_0x55acd5(0x910)](_0x447222));}if(_0x3c12b2[_0x55acd5(0x156)]>0x0)await Promise[_0x55acd5(0x472)](_0x3c12b2);for(const _0x17df04 of this['_envs'][_0x55acd5(0x231)]())_0x17df04[_0x55acd5(0xe56)]=![];for(const _0x470ca0 of this[_0x55acd5(0xa3)][_0x55acd5(0x231)]()){if(_0x470ca0[_0x55acd5(0x4db)])await _0x470ca0[_0x55acd5(0x4db)][_0x55acd5(0x1fe)]()['catch'](()=>{});}await this[_0x55acd5(0x7f1)]?.['stop']?.(),this['bus']?.[_0x55acd5(0x1fe)](),await this[_0x55acd5(0x678)][_0x55acd5(0x1fe)]();for(const _0x5087b5 of this[_0x55acd5(0xa3)][_0x55acd5(0x231)]())await _0x5087b5['close']();this[_0x55acd5(0xa3)][_0x55acd5(0x859)](),this[_0x55acd5(0x4df)]=null,this[_0x55acd5(0xd11)]=null,this[_0x55acd5(0xc65)]=null,this[_0x55acd5(0x705)]['_registryEnv']=null,this[_0x55acd5(0x10e2)]=_0x51165e['STOPPED'],this['events'][_0x55acd5(0xf5d)](_0x3fcb4f[_0x55acd5(0xc5b)]);}get['info'](){const _0x4209a2=_0x374c80;this[_0x4209a2(0xf13)]();const _0xe010c4=this[_0x4209a2(0x30b)]('default'),_0xfc3ba6=_0xe010c4['db']?.['env']?.[_0x4209a2(0x26c)]?.()??{},_0x52599b=this[_0x4209a2(0x11e5)][_0x4209a2(0x3ff)]??0x1000,_0x72cf58={};function _0x5247ea(_0x4425ff){const _0x57d815=_0x4209a2;if(!_0x4425ff)return{'entryCount':0x0,'pages':0x0};return{'entryCount':_0x4425ff[_0x57d815(0x1107)]??0x0,'pages':(_0x4425ff[_0x57d815(0x716)]??0x0)+(_0x4425ff[_0x57d815(0x772)]??0x0)+(_0x4425ff[_0x57d815(0xb7b)]??0x0)};}for(const _0x52406a of _0xe010c4['typesDb'][_0x4209a2(0x40e)]()){const _0x496ef1=_0xe010c4[_0x4209a2(0x9ca)](_0x52406a);_0x72cf58[_0x52406a]={'indexes':{},'data':_0x5247ea(_0x496ef1['data']?.[_0x4209a2(0x1115)]?.()),'clockToChange':_0x5247ea(_0x496ef1[_0x4209a2(0x2de)]?.[_0x4209a2(0x1115)]?.()),'keyToChange':_0x5247ea(_0x496ef1[_0x4209a2(0x770)]?.[_0x4209a2(0x1115)]?.())};for(const [_0x24d342,_0x572cef]of _0x496ef1['indexToDb'][_0x4209a2(0x1129)]()){_0x72cf58[_0x52406a][_0x4209a2(0xb4f)][_0x24d342]=_0x5247ea(_0x572cef['db']?.['getStats']?.());}}return{'id':this['id'],'pageSize':_0x52599b,'lastPageNumber':_0xfc3ba6[_0x4209a2(0x1228)]??0x0,'mapSize':_0xfc3ba6['mapSize']??0x0,'clock':_0xe010c4[_0x4209a2(0x5ea)](),'clockToChange':_0x5247ea(_0xe010c4['clockToChangeDb']?.[_0x4209a2(0x1115)]?.()),'changeToClock':_0x5247ea(_0xe010c4[_0x4209a2(0x969)]?.[_0x4209a2(0x1115)]?.()),'plugins':this[_0x4209a2(0x678)][_0x4209a2(0x3e5)][_0x4209a2(0x1166)](_0x3bd269=>_0x3bd269['module']?.[_0x4209a2(0x1173)]),'versions':{'okdb':require$$36[_0x4209a2(0x45c)],'lmdb':_0x1c186f('lmdb/package.json'),'lmdbNative':_0x155663[_0x4209a2(0x45c)]['versionString']},'version':require$$36[_0x4209a2(0x45c)],'ttl':_0xe010c4['ttlStats'](),'types':_0x72cf58,'config':this[_0x4209a2(0x107)]()};}[_0x374c80(0xf13)](){const _0x566553=_0x374c80;if(!this[_0x566553(0xe56)])throw new _0x30d9e7('OKDB\x20not\x20opened','INVALID_STATE',{'state':this[_0x566553(0x10e2)]});}[_0x374c80(0x683)](_0x15438c){const _0x15b2a5=_0x374c80;return this[_0x15b2a5(0x30b)](_0x15b2a5(0x8d0))[_0x15b2a5(0x683)](_0x15438c);}async[_0x374c80(0x3b0)](_0x5ac2a3,_0x530e48){const _0x4b0429=_0x374c80;return this['env'](_0x4b0429(0x8d0))[_0x4b0429(0x3b0)](_0x5ac2a3,_0x530e48);}async['put'](_0x33306c,_0x536ebf,_0x74f849,_0x3b8804){return this['env']('default')['put'](_0x33306c,_0x536ebf,_0x74f849,_0x3b8804);}async['update'](_0x3aff28,_0x324f3d,_0x17c6bb,_0x20f8e1){const _0x330fce=_0x374c80;return this[_0x330fce(0x30b)](_0x330fce(0x8d0))['update'](_0x3aff28,_0x324f3d,_0x17c6bb,_0x20f8e1);}async[_0x374c80(0xba7)](_0x52926e,_0x8b97ff,_0x38920c,_0x3108a2){const _0x169146=_0x374c80;return this[_0x169146(0x30b)](_0x169146(0x8d0))[_0x169146(0xba7)](_0x52926e,_0x8b97ff,_0x38920c,_0x3108a2);}async[_0x374c80(0x725)](_0x168f61,_0x49b78d,_0x5689df,_0x1b0bee){const _0x2fd0f5=_0x374c80;return this[_0x2fd0f5(0x30b)](_0x2fd0f5(0x8d0))['create'](_0x168f61,_0x49b78d,_0x5689df,_0x1b0bee);}async[_0x374c80(0x21e)](_0x1a8729,_0x47f218,_0x1af7a5){const _0xe1fcee=_0x374c80;return this[_0xe1fcee(0x30b)](_0xe1fcee(0x8d0))[_0xe1fcee(0x21e)](_0x1a8729,_0x47f218,_0x1af7a5);}[_0x374c80(0xbeb)](_0x163191,_0xf494,_0x123596){const _0x51356e=_0x374c80;return this['env'](_0x51356e(0x8d0))['get'](_0x163191,_0xf494,_0x123596);}[_0x374c80(0x32d)](_0x3664b8,_0x52c993,_0x13c4a){const _0x118d08=_0x374c80;return this[_0x118d08(0x30b)]('default')[_0x118d08(0x32d)](_0x3664b8,_0x52c993,_0x13c4a);}[_0x374c80(0xa57)](_0x2364d6,_0x9c3c84,_0x5a95d4){const _0xbda54=_0x374c80;return this[_0xbda54(0x30b)](_0xbda54(0x8d0))[_0xbda54(0xa57)](_0x2364d6,_0x9c3c84,_0x5a95d4);}[_0x374c80(0x9ce)](_0x1af0c6,_0x2193e5){const _0x87cd5=_0x374c80;return this['env']('default')[_0x87cd5(0x9ce)](_0x1af0c6,_0x2193e5);}[_0x374c80(0x11d6)](_0x508840,_0xe0305){const _0xccecbf=_0x374c80;return this[_0xccecbf(0x30b)](_0xccecbf(0x8d0))['getValues'](_0x508840,_0xe0305);}[_0x374c80(0x40e)](_0x234d96,_0x4f77f2){return this['env']('default')['getKeys'](_0x234d96,_0x4f77f2);}['getCount'](_0x5570e0,_0x23950a){const _0x395cd1=_0x374c80;return this[_0x395cd1(0x30b)](_0x395cd1(0x8d0))[_0x395cd1(0x7df)](_0x5570e0,_0x23950a);}[_0x374c80(0xf2f)](_0x5a1585,_0x17f2d6,_0x2dd301){const _0x2592c6=_0x374c80;return this[_0x2592c6(0x30b)]('default')[_0x2592c6(0xf2f)](_0x5a1585,_0x17f2d6,_0x2dd301);}[_0x374c80(0xab)](_0x16ccd7,_0x11f9f5,_0x3ae9d8){const _0x4f3823=_0x374c80;return this['env'](_0x4f3823(0x8d0))[_0x4f3823(0xab)](_0x16ccd7,_0x11f9f5,_0x3ae9d8);}['byIndex'](_0x410aed,_0xf87d4d,_0x4f2767){const _0x4ae37a=_0x374c80;return this[_0x4ae37a(0x30b)]('default')['byIndex'](_0x410aed,_0xf87d4d,_0x4f2767);}[_0x374c80(0xa28)](_0x3faa63,_0x316cef,_0x527805){const _0x1c0763=_0x374c80;return this[_0x1c0763(0x30b)]('default')[_0x1c0763(0xa28)](_0x3faa63,_0x316cef,_0x527805);}[_0x374c80(0xf5f)](_0x537c2e,_0x3ba21e,_0x1ddb8a){const _0x3e6cff=_0x374c80;return this['env'](_0x3e6cff(0x8d0))[_0x3e6cff(0xf5f)](_0x537c2e,_0x3ba21e,_0x1ddb8a);}[_0x374c80(0xf4b)](_0x46549e,_0x26af49,_0x368c87,_0x32233b,_0x444608){const _0x4992f6=_0x374c80;return this[_0x4992f6(0x30b)]('default')[_0x4992f6(0xf4b)](_0x46549e,_0x26af49,_0x368c87,_0x32233b,_0x444608);}async['registerType'](_0x888378,_0x591be6){const _0x5944da=_0x374c80;return this[_0x5944da(0x30b)](_0x5944da(0x8d0))['registerType'](_0x888378,_0x591be6);}async[_0x374c80(0x49a)](_0x59d91f,_0xd98e0b){const _0x3308bf=_0x374c80;return this[_0x3308bf(0x30b)](_0x3308bf(0x8d0))[_0x3308bf(0x49a)](_0x59d91f,_0xd98e0b);}[_0x374c80(0x7c0)](_0x58f8d9){const _0x38db28=_0x374c80;return this[_0x38db28(0x30b)](_0x38db28(0x8d0))[_0x38db28(0x7c0)](_0x58f8d9);}async[_0x374c80(0x665)](_0x9f2678,_0x4c3067){const _0x4f206c=_0x374c80;return this[_0x4f206c(0x30b)]('default')[_0x4f206c(0x665)](_0x9f2678,_0x4c3067);}async[_0x374c80(0x11ee)](_0x55b2cc,_0x39251f,_0x4b4230){const _0x11cf17=_0x374c80;return this[_0x11cf17(0x30b)](_0x11cf17(0x8d0))[_0x11cf17(0x11ee)](_0x55b2cc,_0x39251f,_0x4b4230);}[_0x374c80(0x56c)](_0x167a53,_0x2b571b){const _0x47f19a=_0x374c80;return this[_0x47f19a(0x30b)](_0x47f19a(0x8d0))['hasIndex'](_0x167a53,_0x2b571b);}async['dropIndex'](_0x1902d8,_0x423bd3,_0x13186e){const _0x5f113b=_0x374c80;return this[_0x5f113b(0x30b)]('default')[_0x5f113b(0xfff)](_0x1902d8,_0x423bd3,_0x13186e);}async[_0x374c80(0x2c8)](_0x4945e1,_0xc20a59,_0x5bc873){const _0xcaffd2=_0x374c80;return this[_0xcaffd2(0x30b)](_0xcaffd2(0x8d0))[_0xcaffd2(0x2c8)](_0x4945e1,_0xc20a59,_0x5bc873);}async[_0x374c80(0x959)](_0x4868b5,_0x24e28f){const _0x48b940=_0x374c80;return this['env'](_0x48b940(0x8d0))[_0x48b940(0x959)](_0x4868b5,_0x24e28f);}[_0x374c80(0x2ec)](_0x23af5d,_0x171397){const _0x3c13a5=_0x374c80;return this['env'](_0x3c13a5(0x8d0))['getIndexStatus'](_0x23af5d,_0x171397);}[_0x374c80(0x263)](_0x2aa8ea,_0x202e1c){const _0x377a2c=_0x374c80;return this[_0x377a2c(0x30b)](_0x377a2c(0x8d0))[_0x377a2c(0x263)](_0x2aa8ea,_0x202e1c);}[_0x374c80(0x2f1)](_0x57c78c,_0x1af685){const _0x45a2d2=_0x374c80;return this['env'](_0x45a2d2(0x8d0))[_0x45a2d2(0x2f1)](_0x57c78c,_0x1af685);}['getUniqueViolation'](_0x4e2005,_0x5335a0,_0x1179ee){return this['env']('default')['getUniqueViolation'](_0x4e2005,_0x5335a0,_0x1179ee);}[_0x374c80(0x5ea)](_0x3e5286,_0x5402d0){const _0x34411f=_0x374c80;return this[_0x34411f(0x30b)](_0x34411f(0x8d0))[_0x34411f(0x5ea)](_0x3e5286,_0x5402d0);}[_0x374c80(0x151)](_0x322947,_0x5309fa,_0x384e5b,_0x2bc95f){const _0x5afa87=_0x374c80;return this['env'](_0x5afa87(0x8d0))[_0x5afa87(0x151)](_0x322947,_0x5309fa,_0x384e5b,_0x2bc95f);}async[_0x374c80(0x6bf)](_0x220fa8,_0x57c76d,_0x10cf96){const _0x4e96b0=_0x374c80;return this[_0x4e96b0(0x30b)](_0x4e96b0(0x8d0))[_0x4e96b0(0x6bf)](_0x220fa8,_0x57c76d,_0x10cf96);}['getTTL'](_0x6194e0,_0x286662){const _0x13b0df=_0x374c80;return this[_0x13b0df(0x30b)](_0x13b0df(0x8d0))['getTTL'](_0x6194e0,_0x286662);}async[_0x374c80(0xb8b)](_0x4f23bd,_0x2e71ac){return this['env']('default')['clearTTL'](_0x4f23bd,_0x2e71ac);}async[_0x374c80(0x2ad)](_0x4d88f4){const _0x18d2aa=_0x374c80;return this['env'](_0x18d2aa(0x8d0))['sweepExpiredTTL'](_0x4d88f4);}[_0x374c80(0xe48)](_0x7b2de7){const _0x1de6fb=_0x374c80;return this['env'](_0x1de6fb(0x8d0))[_0x1de6fb(0xe48)](_0x7b2de7);}[_0x374c80(0xed9)](_0x5b24e1){const _0x14d086=_0x374c80;return this['env']('default')[_0x14d086(0xed9)](_0x5b24e1);}async['setDefaultTTL'](_0x2b6402,_0x5816f7){const _0x2e165e=_0x374c80;return this[_0x2e165e(0x30b)](_0x2e165e(0x8d0))[_0x2e165e(0x471)](_0x2b6402,_0x5816f7);}[_0x374c80(0xc27)](_0x384e29){const _0x260fe8=_0x374c80;return this[_0x260fe8(0x30b)](_0x260fe8(0x8d0))[_0x260fe8(0xc27)](_0x384e29);}async[_0x374c80(0x6be)](_0x2dc5ee){const _0x33b5e0=_0x374c80;return this[_0x33b5e0(0x30b)]('default')[_0x33b5e0(0x6be)](_0x2dc5ee);}['count'](_0x4ced9c){const _0x48ce1d=_0x374c80;return this['env'](_0x48ce1d(0x8d0))['count'](_0x4ced9c);}*[_0x374c80(0x120b)](_0xe17505){const _0x1d2697=_0x374c80;yield*this[_0x1d2697(0x30b)]('default')[_0x1d2697(0x120b)](_0xe17505);}[_0x374c80(0x555)](){const _0x453dfb=_0x374c80;return this[_0x453dfb(0x30b)]('default')[_0x453dfb(0x555)]();}['equal'](_0x3659aa,_0x37cb79){return _0x2ea86f(_0x3659aa,_0x37cb79);}}return okdb$2=_0x1cfeee,_0x1cfeee[_0x374c80(0x9ad)]=_0x3d2df1['HIGH_SENTINEL'],okdb$2;}var okdb$1,hasRequiredOkdb;function requireOkdb(){if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;const _0x4ac0da=requireOkdb$1();return okdb$1=_0x4ac0da,okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0xef8cd8(0xe5f)]=okdb;
|