@kedem/okdb 2.4.0 → 2.5.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.
@@ -146,7 +146,8 @@ Pull-based, last-write-wins replication over HTTP; no coordinator, no consensus.
146
146
  ```
147
147
 
148
148
  Each node has a persistent `nodeId` (`__identity`) and an Ed25519 keypair (`__nodePrivateKey` /
149
- `__nodePublicKey`), generated on first open and never replicated. Peers are recorded in the
149
+ `__nodePublicKey`), generated on first use (the first sync operation that needs it — a join, a
150
+ signed request, the node's own `~sync_nodes` record) and never replicated. Peers are recorded in the
150
151
  `~sync_nodes` type in `~system` — with their address and **public key** — which itself replicates,
151
152
  so the mesh forms from one join.
152
153
 
@@ -171,13 +171,13 @@ Async (`single`/`fanout`) handlers receive change-log records:
171
171
 
172
172
  ### originMode
173
173
 
174
- `origin` is the id of the OKDB instance that made the write (every process has its own, even on the same path).
174
+ `origin` is the identity of the store that made the write — every process on the same path shares it, so `'remote'` means writes synced in from other stores. A cloned store counts its history from before the copy as its own. The filter applies to inline and async processors alike (live drains, log replay, and the snapshot bootstrap); a drain chunk that is filtered out entirely still advances the cursor.
175
175
 
176
- | Value | Fires when |
177
- | ---------- | ----------------------------------------------------------------- |
178
- | `'self'` | **Default.** Only writes made by this OKDB instance |
179
- | `'remote'` | Only writes made by other instances (other processes, sync peers) |
180
- | `'all'` | Any write |
176
+ | Value | Fires when |
177
+ | ---------- | --------------------------------------------- |
178
+ | `'self'` | **Default.** Only writes made by this store |
179
+ | `'remote'` | Only writes made by other stores (sync peers) |
180
+ | `'all'` | Any write |
181
181
 
182
182
  This is useful for reacting differently to local vs. replicated changes — e.g., sending a notification only when your own node creates a record, not when it receives one from a peer.
183
183
 
package/docs/licensing.md CHANGED
@@ -180,13 +180,18 @@ A missing or invalid file is a warning naming the error code — never the file'
180
180
  ## Node identity, reset, and moving a database
181
181
 
182
182
  The activation is bound to the node identity created when the database was first initialized.
183
- Two consequences:
183
+ Consequences:
184
184
 
185
185
  - **`okdb reset` preserves your license.** The reset command deliberately carries the node
186
186
  identity and all stored licenses into the fresh database, so activation survives.
187
187
  - **Deleting the data directory by hand does not.** A new directory means a new node identity;
188
188
  previously activated licenses show `wrong_node` and need a re-activation from your vendor
189
189
  (add the license again, send the new PIN).
190
+ - **A clone is a new node.** `OKDB.clone()`, `OKDB.reidentify()` and
191
+ `okdb restore --new-identity` give the copy its own identity: its licence records come along,
192
+ but a node-bound activation shows `wrong_node` there until the copy is activated with its own
193
+ PIN. The source keeps its activation. See
194
+ [Cloning a store](migration.md#cloning-a-store-new-identity).
190
195
 
191
196
  The same applies to copying a license between machines: the blob can be added anywhere, but
192
197
  each node needs its own activation.
package/docs/migration.md CHANGED
@@ -5,6 +5,7 @@ OKDB's migration feature handles export/import of all types and records as JSON
5
5
  | You want | Use |
6
6
  | ----------------------------------------- | --------------------------------------------------------------------------------- |
7
7
  | a restorable copy of the whole store | [`migrate.backup(dir)`](#hot-backup-and-restore) / `okdb backup` + `okdb restore` |
8
+ | a copy that is a store of its own | [`OKDB.clone(src, dst)`](#cloning-a-store-new-identity) / `OKDB.reidentify(dir)` |
8
9
  | portable, version-independent data | [`migrate.exportToFile()`](#streaming-export-ndjson) / `okdb export` |
9
10
  | a small in-memory snapshot (tests, demos) | `migrate.export()` / `exportJSON()` |
10
11
 
@@ -196,7 +197,9 @@ overwrites. The result directory **is a store**: open OKDB on it (or on a copy o
196
197
  `okdb restore <backup> --path <target>` copies it into a new/empty target. Things to know:
197
198
 
198
199
  - The restored store has the **same node identity** as the source. Do not run it as a sync
199
- peer alongside the original — restore replaces a node, it does not clone one.
200
+ peer alongside the original — restore replaces a node, it does not clone one. To bring the
201
+ copy up as a **new** node instead, use `okdb restore <backup> --path <target> --new-identity`
202
+ (or `OKDB.reidentify(target)`) — see [Cloning a store](#cloning-a-store-new-identity).
200
203
  - An env registered with an absolute path _outside_ the store (legacy / hand-edited records
201
204
  only; `createEnvironment` always places envs under the root) is copied to its default
202
205
  placement and flagged `outOfTree` in the manifest; while its original path still exists,
@@ -216,6 +219,62 @@ new OKDB('/data/okdb', { backup: { root: '/mnt/backups/okdb' } });
216
219
 
217
220
  ---
218
221
 
222
+ ## Cloning a store (new identity)
223
+
224
+ Every store has a node identity (`db.id`), created on its first open. A byte copy keeps it, so
225
+ two copies of one store behave as one node: they join the same bus group (and receive each
226
+ other's change and compaction signals), share the sync node id, keypair and token secret, and
227
+ match the same licence activation. Use `OKDB.clone()` whenever a copy must be a store of its
228
+ own — test templates, a staging copy, a backup brought up next to the original.
229
+
230
+ ```javascript
231
+ await OKDB.clone('/data/template', '/tmp/test-42'); // → { path, files, bytes, ms }
232
+ const db = new OKDB('/tmp/test-42');
233
+ await db.open(); // the first open gives the copy its own identity
234
+ db.id; // new UUID
235
+ db.formerIds; // [ '<template id>' ]
236
+ ```
237
+
238
+ - **The source must be closed** by every process. A copy of a running store is not consistent
239
+ across its LMDB files, so `clone()` refuses with `STORE_IN_USE` when a process has the store
240
+ open (detected on Linux from the LMDB file locks; on other platforms this is your
241
+ responsibility). For a store that must stay up, take a [hot backup](#hot-backup-and-restore)
242
+ and re-identify it: `await db.migrate.backup(dir); OKDB.reidentify(dir)`.
243
+ - `dstPath` must not exist or be empty (`CLONE_DEST_NOT_EMPTY`), and must not overlap the source.
244
+ - **Everything is copied** — every env, `~fts`, time-machine history, `~vectors`, `~blobs`, views,
245
+ indexes and processor cursors — **except** LMDB `lock.mdb` files, the disposable `~processes`
246
+ env, upload staging (`~blobs/tmp`) and compaction leftovers. The copy is fast (a file copy,
247
+ reflinked where the filesystem supports it: a small store clones in a few milliseconds) and
248
+ opens with every index, view and search index ready — nothing is rebuilt or reprocessed.
249
+ - Envs are expected to live under the store directory (the default). If an env was registered at
250
+ an absolute path outside it and that directory exists, the copy's first open refuses with
251
+ `REIDENTIFY_OUT_OF_TREE_ENV` instead of opening the source's files.
252
+
253
+ **`OKDB.reidentify(path)`** marks a closed copy you made yourself (`cp -r`, a restored backup) to
254
+ take a new identity on its next open — the same step `clone()` ends with. It only writes a small
255
+ marker file (`okdb-reidentify.json`) at the store root; the store's **first open** applies it,
256
+ exactly once, even when several processes open the copy at the same time. Marking is idempotent,
257
+ and a marked copy that is copied again before it is opened still gives each copy its own identity.
258
+ A store that has already been opened under its new identity is an ordinary store: copying it
259
+ again needs another `clone()` / `reidentify()`.
260
+
261
+ **What the first open changes** — and what it keeps:
262
+
263
+ | Area | On the copy |
264
+ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
265
+ | Identity | a new `db.id`; the old one is kept in `db.formerIds`. The bus group (`okdb-<id>`) follows the id, so the copy and the source never hear each other. |
266
+ | Secrets | a new token secret (sessions signed by the source stop validating, unless you set `auth.token.secret` yourself) and a new sync keypair (minted on first sync use). Stored users and API tokens are data and are copied. |
267
+ | Sync | not a member of anything: no `~sync_nodes` / `~sync_links` rows, no peer cursors. They are removed from the copy's changelog too, so nothing it later sends can delete them in the source's cluster. `db.sync.join(...)` makes it a new node, which pulls the topology back. |
268
+ | Licences | records are kept. A node-bound (standard) activation shows `wrong_node` on the copy; activate it again with the copy's own PIN. Open and internal licences, and `OKDB_LICENSE_FILE` installs of them, keep working. |
269
+ | Processes | leases, want-markers, the migration lock and process-keyed control rows are dropped — they belonged to the source's processes. |
270
+ | Changelog | kept as-is, origins included. Changes stamped with a former identity up to the point the copy was made count as the copy's own (`originMode: 'self'`); a former identity's later changes — the source's, synced in — are remote. |
271
+ | Data and derived | untouched: documents, indexes, views, FTS, time machine, vectors, files, queue jobs and every processor cursor. |
272
+
273
+ Queue jobs that were claimed when the source closed are recovered by the normal claim-timeout
274
+ path, as after a restart.
275
+
276
+ ---
277
+
219
278
  ## Logical backup workflow
220
279
 
221
280
  A version-independent alternative to the hot backup (slower; re-derives indexes on import):
package/docs/plugins.md CHANGED
@@ -75,7 +75,7 @@ Plugin name must not conflict with existing OKDB properties (`env`, `put`, `get`
75
75
  | `instance.start(okdb)` | async | **yes** | Start servers, timers, workers |
76
76
  | `instance.stop(okdb)` | async | **yes** | Stop everything started in `start()` |
77
77
 
78
- `start`/`stop` are optional. Plugins start in registration order at the end of `open()` and stop in reverse order during `close()`. If any plugin's `start()` throws, all already-started plugins are stopped in reverse order before the error propagates.
78
+ `start`/`stop` are optional. Plugins start in registration order at the end of `open()` and stop in reverse order during `close()`. If any plugin's `start()` throws, all already-started plugins are stopped in reverse order (the throwing plugin's `stop()` is not called), then `open()` releases everything else it had opened and rethrows the error; the instance is left stopped, so `close()` is a no-op.
79
79
 
80
80
  ---
81
81
 
@@ -82,7 +82,7 @@ Both are called as `fn(ctx, changes, info)`. A bare closure (`handler: async (ch
82
82
 
83
83
  `changes` are change-log records (`{ type, key, action, clock, origin, ... }`). With the default `hydrateValues: true`, `put` records also carry `.value` (the current document); otherwise read the document via `ctx.env.get(c.type, c.key)`.
84
84
 
85
- `originMode` filters by who wrote the change (compared to the change's `origin`, the writing OKDB instance id): `self` (default — this instance's writes only), `remote` (other instances/processes), or `all`. Async processors with `remote`/`all` also wake on cross-process writes via the bus.
85
+ `originMode` filters by who wrote the change (compared to the change's `origin`, the writing store's identity — shared by every process on the same path): `self` (default — this store's writes, including a cloned store's history from before the copy), `remote` (writes synced in from other stores), or `all`. It applies on every delivery path — inline, async live drains, log replay and the snapshot bootstrap (which judges each doc by its latest change). A drain chunk whose changes are all filtered out is not delivered, and the cursor still moves past it. A `quantum` module receives the mode as `payload.originMode` and applies it itself with `filterByOrigin` (`src/runtime/okdb-processor-origin.js`), as the built-in quanta do. Async processors with `remote`/`all` also wake on cross-process writes via the bus.
86
86
 
87
87
  **`rebuild` (snapshot-bootstrap processors).** With `bootstrap: 'snapshot'` you may pass `rebuild: async () => { ... }` — a feature-owned **full rebuild** (scan the actual docs, then reposition the cursor via `setCursor` + `markSnapshotComplete`). It runs whenever the processor bootstraps with an **un-positioned cursor**: after a cursor reset (the admin ⟲ "full reprocess"), or when a build handoff was interrupted by a crash. Without it, the framework's only option is replaying the changelog from 0 — which is **not** a rebuild: sync-GC prunes the changelog (its horizon ignores processor cursors), so replay-from-0 can silently yield a partial derived store. FTS registers one (re-scans all docs of the type into every index, clearing first).
88
88
 
@@ -230,10 +230,12 @@ Subscription state lives in a dedicated environment named `~sub`, opened `sync:f
230
230
  `onDelete: cascade`, and a reverse index on `[dataEnv, type, key]` for O(interested
231
231
  sessions) routing.
232
232
 
233
- Routing is lazy: a process routes changes only while it holds at least one open subscription
234
- connection (signals are only ever delivered to connections on the process that holds them).
235
- An embedded instance that never serves subscriptions does no per-change subscription work,
236
- and no change-feed is started on its behalf.
233
+ Everything is lazy. The `~sub` store and the signal router are built on a process's first
234
+ subscription use (its first SSE connection or control call), never at `open()` — a store that
235
+ never had a subscriber has no `~sub` env at all. Routing is lazy too: a process routes changes
236
+ only while it holds at least one open subscription connection (signals are only ever delivered
237
+ to connections on the process that holds them). An embedded instance that never serves
238
+ subscriptions does no per-change subscription work, and no change-feed is started on its behalf.
237
239
 
238
240
  The `~sub` _env_ name starts with `~` so its writes stay out of the data change-feed, while
239
241
  the non-`~` type names keep FK cascade and TTL working. `sync:false` keeps machine-bound
package/docs/views.md CHANGED
@@ -694,6 +694,10 @@ See [pipelines.md](./pipelines.md) for materializer documentation.
694
694
 
695
695
  View definitions are stored in the `~views` system type within their environment and sync to connected peers like any other document. On startup and after each sync reconcile pass, OKDB activates any view definitions that arrived from remote peers but are not yet live locally.
696
696
 
697
+ A view counts every document of its source types, whoever wrote it: documents synced in from a peer are maintained live exactly like local writes — by sync and async views, `$ref` sections and live map `$ref`s alike — so a view's live result always equals what a rebuild of the same data gives. Up to okdb 2.4.0 the sync-mode handlers (sync views, and every view's `$ref` / live map `$ref` sections) skipped remote-origin writes. View storage version 7 repairs that once, on first open: on a store that has or had a sync peer (a peer in `~sync_nodes`, a peer sync cursor, a sync link, or a cloned / re-identified store) those views rebuild; everywhere else — pure async views, and every view on a store that never synced — the version is restamped without a rebuild, since nothing can be missing. One info line (`views storage v7: …`) logs the decision and its reason.
698
+
699
+ The one case the upgrade cannot see: writes stamped with an explicit foreign `origin` (`put(..., { origin })`) on a store that never synced. If a sync-mode view was fed such writes before the upgrade, repair it with `await env.views.rebuild(name)`.
700
+
697
701
  ---
698
702
 
699
703
  ## Error codes
@@ -1 +1 @@
1
- 'use strict';const _0x212165=_0x3847;(function(_0x55e4cc,_0x27f13c){const _0x14453f=_0x3847,_0x224bd8=_0x55e4cc();while(!![]){try{const _0x5aca76=parseInt(_0x14453f(0x237))/0x1+-parseInt(_0x14453f(0x16c))/0x2+-parseInt(_0x14453f(0x2d4))/0x3*(-parseInt(_0x14453f(0x2dd))/0x4)+-parseInt(_0x14453f(0x17d))/0x5*(parseInt(_0x14453f(0x2ef))/0x6)+parseInt(_0x14453f(0x1ec))/0x7*(-parseInt(_0x14453f(0x1a0))/0x8)+parseInt(_0x14453f(0x1d7))/0x9*(-parseInt(_0x14453f(0x23a))/0xa)+parseInt(_0x14453f(0x235))/0xb;if(_0x5aca76===_0x27f13c)break;else _0x224bd8['push'](_0x224bd8['shift']());}catch(_0x661ec5){_0x224bd8['push'](_0x224bd8['shift']());}}}(_0x57b4,0x2d6e0));var require$$0$4=require('worker_threads'),require$$2=require('v8'),require$$0=require(_0x212165(0x293)),require$$0$3=require(_0x212165(0x272)),require$$0$1=require(_0x212165(0x168)),require$$0$2=require(_0x212165(0x273)),require$$6=require(_0x212165(0x255));function getDefaultExportFromCjs(_0x38ae9e){const _0x40897d=_0x212165;return _0x38ae9e&&_0x38ae9e[_0x40897d(0x1b8)]&&Object[_0x40897d(0x27e)]['hasOwnProperty'][_0x40897d(0x21d)](_0x38ae9e,_0x40897d(0x2f0))?_0x38ae9e['default']:_0x38ae9e;}var okdbFunctionsSandboxWorker$1={},okdbFatalReport,hasRequiredOkdbFatalReport;function requireOkdbFatalReport(){if(hasRequiredOkdbFatalReport)return okdbFatalReport;hasRequiredOkdbFatalReport=0x1;function _0x3db0a3(_0x13b4e6){const _0x592e73=_0x3847;if(process.env.OKDB_FATAL_REPORT!=='1')return;try{if(!process[_0x592e73(0x1fc)])return;process['report'][_0x592e73(0x276)]=!![];try{if('excludeEnv'in process[_0x592e73(0x1fc)])process[_0x592e73(0x1fc)][_0x592e73(0x1de)]=process.env.OKDB_FATAL_REPORT_ENV!=='1';}catch{}if(process['platform']!=='win32')try{process[_0x592e73(0x1fc)]['reportOnSignal']=!![];if(typeof process['report'][_0x592e73(0x1e1)]===_0x592e73(0x1bb))process[_0x592e73(0x1fc)]['signal']=_0x592e73(0x1e0);}catch{}if(process.env.OKDB_REPORT_DIR)try{require('fs')[_0x592e73(0x186)](process.env.OKDB_REPORT_DIR,{'recursive':!![]}),process[_0x592e73(0x1fc)][_0x592e73(0x29a)]=process.env.OKDB_REPORT_DIR;}catch{}try{process[_0x592e73(0x1fc)]['filename']='';}catch{}if(_0x13b4e6)process.env.OKDB_REPORT_TAG=String(_0x13b4e6);}catch{}}return okdbFatalReport={'enableFatalReport':_0x3db0a3},okdbFatalReport;}var okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function requireOkdbFunctionsSandbox(){if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0x4c4d14=require$$0;function _0x53f781(_0x3921fc){const _0x3ad4f7=_0x3847,_0x8cc3df=_0x3921fc==='*',_0x119be3=_0x8cc3df?null:new Set(Array[_0x3ad4f7(0x27d)](_0x3921fc)?_0x3921fc:[]);return function _0x59c0d3(_0x480416,_0x1c8dd9){const _0x14bba9=_0x3ad4f7;if(!_0x8cc3df){let _0x2af3cc;try{const _0x27bb32=new URL(typeof _0x480416===_0x14bba9(0x1bb)?_0x480416:_0x480416?.[_0x14bba9(0x1fd)]??String(_0x480416));_0x2af3cc=_0x27bb32[_0x14bba9(0x1a6)];}catch{const _0x5c1e1d=new Error('fetch\x20blocked:\x20invalid\x20URL');return _0x5c1e1d[_0x14bba9(0x25f)]=_0x14bba9(0x2ab),Promise['reject'](_0x5c1e1d);}if(!_0x119be3[_0x14bba9(0x16b)](_0x2af3cc)){const _0x563b8d=new Error(_0x119be3[_0x14bba9(0x278)]===0x0?_0x14bba9(0x1a5):_0x14bba9(0x1e8)+_0x2af3cc+_0x14bba9(0x1cd));return _0x563b8d[_0x14bba9(0x25f)]=_0x14bba9(0x2ab),Promise[_0x14bba9(0x23b)](_0x563b8d);}}return fetch(_0x480416,_0x1c8dd9);};}function _0x204d33(_0x2f6905={}){const _0x66ac4b=_0x3847,_0x15ede1=_0x2f6905[_0x66ac4b(0x18d)]!==![],_0x43815a=_0x2f6905[_0x66ac4b(0x2b5)]??[],_0xa0684a={'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,'setTimeout':setTimeout,'clearTimeout':clearTimeout,'setInterval':setInterval,'clearInterval':clearInterval,'queueMicrotask':queueMicrotask,'structuredClone':structuredClone,'crypto':globalThis[_0x66ac4b(0x1a2)]};return _0x15ede1&&typeof fetch==='function'&&(_0xa0684a[_0x66ac4b(0x221)]=_0x53f781(_0x43815a)),_0xa0684a[_0x66ac4b(0x22e)]=_0xa0684a,_0xa0684a;}const _0x166794=0x3e8;function _0x302df7(_0x25572a){const _0x3372de=_0x3847,_0x22db4a=Number(_0x25572a[_0x3372de(0x2cc)]);if(Number[_0x3372de(0x277)](_0x22db4a)&&_0x22db4a>0x0)return _0x22db4a;const _0x392c5e=Number(process.env.OKDB_FN_COMPILE_TIMEOUT_MS);if(Number[_0x3372de(0x277)](_0x392c5e)&&_0x392c5e>0x0)return _0x392c5e;return _0x166794;}function _0x256a3e(_0xe9ddab,_0x164a12={}){const _0xe242b3=_0x3847,_0x5388b6=_0x204d33(_0x164a12),_0x2a1c47=_0x4c4d14[_0xe242b3(0x2df)](_0x5388b6,{'name':_0xe242b3(0x2a7),'codeGeneration':{'strings':![],'wasm':![]}});let _0x192277;try{_0x192277=new _0x4c4d14[(_0xe242b3(0x214))]('('+_0xe9ddab+')',{'filename':_0x164a12['filename']??'okdb-function.js'});}catch(_0x4cdcc1){const _0x1f3a75=new Error(_0x4cdcc1?.[_0xe242b3(0x1fe)]||'Function\x20script\x20failed\x20to\x20compile');_0x1f3a75['code']=_0xe242b3(0x1e2),_0x1f3a75[_0xe242b3(0x20f)]=_0x4cdcc1;throw _0x1f3a75;}let _0x185bf1;try{_0x185bf1=_0x192277[_0xe242b3(0x29e)](_0x2a1c47,{'timeout':_0x302df7(_0x164a12)});}catch(_0x5ac12d){const _0x3f8b52=new Error(_0x5ac12d?.[_0xe242b3(0x1fe)]||'Function\x20script\x20failed\x20to\x20initialize');_0x3f8b52[_0xe242b3(0x25f)]=_0xe242b3(0x1e2),_0x3f8b52[_0xe242b3(0x20f)]=_0x5ac12d;throw _0x3f8b52;}if(typeof _0x185bf1!=='function'){const _0x52334a=new Error(_0xe242b3(0x210));_0x52334a['code']=_0xe242b3(0x2bc);throw _0x52334a;}return _0x185bf1;}return okdbFunctionsSandbox={'createSandboxGlobals':_0x204d33,'compileFunctionExpression':_0x256a3e,'DEFAULT_COMPILE_TIMEOUT_MS':_0x166794,'_buildRestrictedFetch':_0x53f781},okdbFunctionsSandbox;}var okdbFunctionsIpc,hasRequiredOkdbFunctionsIpc;function requireOkdbFunctionsIpc(){if(hasRequiredOkdbFunctionsIpc)return okdbFunctionsIpc;hasRequiredOkdbFunctionsIpc=0x1;function _0x3418cb(_0x3bd72a){const _0x5780be=_0x3847;if(!_0x3bd72a)return null;return{'message':_0x3bd72a[_0x5780be(0x1fe)]||String(_0x3bd72a),'stack':_0x3bd72a[_0x5780be(0x2eb)]||null,'code':_0x3bd72a[_0x5780be(0x25f)]||null,'details':_0x3bd72a[_0x5780be(0x1ed)]||null};}function _0x57c58b(_0x12b1cf){const _0xf24cb6=_0x3847;if(!_0x12b1cf)return new Error(_0xf24cb6(0x175));const _0x3ff004=new Error(_0x12b1cf[_0xf24cb6(0x1fe)]||String(_0x12b1cf));if(_0x12b1cf['stack'])_0x3ff004[_0xf24cb6(0x2eb)]=_0x12b1cf[_0xf24cb6(0x2eb)];if(_0x12b1cf[_0xf24cb6(0x25f)])_0x3ff004[_0xf24cb6(0x25f)]=_0x12b1cf[_0xf24cb6(0x25f)];if(_0x12b1cf[_0xf24cb6(0x1ed)])_0x3ff004[_0xf24cb6(0x1ed)]=_0x12b1cf[_0xf24cb6(0x1ed)];return _0x3ff004;}return okdbFunctionsIpc={'serializeError':_0x3418cb,'deserializeError':_0x57c58b},okdbFunctionsIpc;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x29225b=_0x212165;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3d2a3e={'PUT':'put','REMOVE':'remove','INDEX_DROP':_0x29225b(0x269),'INDEX_REGISTER':_0x29225b(0x1b0),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x29225b(0x2ee),'TYPE_DROP':_0x29225b(0x2ba),'FTS_REGISTER':_0x29225b(0x21e),'FTS_DROP':'dropFts','FTS_RESET':'resetFts','SCHEMA_SET':_0x29225b(0x2c5),'SCHEMA_DROP':_0x29225b(0x2da),'TTL_SET':'setTtl','TTL_CLEAR':_0x29225b(0x17b)},_0x456a10={'SYSTEM_READY':_0x29225b(0x1c8),'FIELD_RESOLVER_REGISTERED':_0x29225b(0x24b),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x29225b(0x24a),'SYSTEM_POKE':_0x29225b(0x1ad),'SYSTEM_DRAIN':_0x29225b(0x239),'SYSTEM_TYPE_DROP':_0x29225b(0x1f5),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x29225b(0x274),'ITEM_CREATE':_0x29225b(0x268),'ITEM_UPDATE':_0x29225b(0x1c3),'ITEM_REMOVE':_0x29225b(0x2e4),'ITEM_PENDING':_0x29225b(0x2a8),'INDEX_RESET':'index:reset','INDEX_READY':_0x29225b(0x178),'INDEX_PROGRESS':_0x29225b(0x282),'VIEW_PROGRESS':_0x29225b(0x21c),'INDEX_DROP':'index:drop','INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x29225b(0x164),'FTS_DROP':_0x29225b(0x18c),'FTS_RESET':_0x29225b(0x169),'SCHEMA_SET':_0x29225b(0x16e),'SCHEMA_DROP':_0x29225b(0x2e5),'UNIQUE_VIOLATION':_0x29225b(0x271),'UNIQUE_VIOLATION_RESOLVED':_0x29225b(0x2c3),'REF_VIOLATION':_0x29225b(0x207),'REF_VIOLATION_RESOLVED':_0x29225b(0x250),'SYNC_APPLY':_0x29225b(0x1f0),'TXN_START':'txn:start','TXN_END':_0x29225b(0x266),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x29225b(0x1ca),'TYPE_DROP':'type:drop','ENV_OPENED':_0x29225b(0x1c7),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x29225b(0x2b2),'TTL_EXPIRED':_0x29225b(0x1d0),'TTL_SET':_0x29225b(0x18f),'TTL_CLEAR':_0x29225b(0x2d6),'LICENSE_INVALID':_0x29225b(0x1d5),'LICENSE_ADDED':_0x29225b(0x262),'LICENSE_ACTIVATED':_0x29225b(0x1da),'LICENSE_REMOVED':'license:removed'},_0x6705ec={'CREATING':'creating','RESETTING':_0x29225b(0x2e7),'READY':_0x29225b(0x226),'DROPPING':'dropping','WAITING':'waiting','ERROR':_0x29225b(0x260)},_0x5a9ca0={'CREATED':_0x29225b(0x188),'STARTING':_0x29225b(0x227),'STARTED':_0x29225b(0x296),'STOPPING':'stopping','STOPPED':'stopped'},_0x392d23={'CREATING':'creating','READY':_0x29225b(0x226),'HALTED':_0x29225b(0x2c2),'STOPPED':_0x29225b(0x2a3),'RESETTING':'resetting'},_0x120b67=Object['freeze']({'POKE':_0x29225b(0x2ac),'DRAIN':_0x29225b(0x2a4),'TYPE_DROP':_0x29225b(0x28a),'PROC':_0x29225b(0x257),'ENV_RELEASE':_0x29225b(0x2e8)});return okdbEnums={'BUS_EVENTS':_0x120b67,'CHANGE_ACTIONS':_0x3d2a3e,'EVENTS':_0x456a10,'INDEX_STATE':_0x6705ec,'OKDB_STATE':_0x5a9ca0,'VIEW_STATE':_0x392d23},okdbEnums;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x476b20 extends Error{constructor(_0x29d2d2,_0x23e2f7,_0x54ba67={}){const _0x32b13d=_0x3847;super(_0x29d2d2),this[_0x32b13d(0x215)]=_0x32b13d(0x212),this[_0x32b13d(0x25f)]=_0x23e2f7,this[_0x32b13d(0x1ed)]=_0x54ba67,_0x54ba67['cause']&&(this[_0x32b13d(0x20f)]=_0x54ba67[_0x32b13d(0x20f)]),Error[_0x32b13d(0x2d5)](this,this[_0x32b13d(0x217)]);}}class _0x599b3c extends _0x476b20{constructor(_0xa71610,_0x54aa14,_0x471983,_0x215b1){const _0x146bc2=_0x3847;super(_0x146bc2(0x2f2)+_0xa71610+'@'+_0x54aa14+_0x146bc2(0x1fa)+_0x471983+_0x146bc2(0x24e)+_0x215b1,'VERSION_MISMATCH',{'type':_0xa71610,'key':_0x54aa14,'expectedVersion':_0x471983,'actualVersion':_0x215b1}),this[_0x146bc2(0x215)]=_0x146bc2(0x2b0);}}class _0x36a513 extends _0x476b20{constructor(_0xdb6b3e,_0x501140){const _0x4064e2=_0x3847;super(_0xdb6b3e+'@'+_0x501140+_0x4064e2(0x24c),'NOT_FOUND',{'type':_0xdb6b3e,'key':_0x501140}),this[_0x4064e2(0x215)]=_0x4064e2(0x1bd);}}class _0x45c082 extends _0x476b20{constructor(_0x311ea0,_0x3fb1f9){const _0x56a3c8=_0x3847;super(_0x311ea0+'@'+_0x3fb1f9+_0x56a3c8(0x2e0),_0x56a3c8(0x279),{'type':_0x311ea0,'key':_0x3fb1f9}),this[_0x56a3c8(0x215)]=_0x56a3c8(0x16f);}}class _0x50e0a9 extends _0x476b20{constructor(_0x32a29a,_0x1c3e42){const _0x5e1ee9=_0x3847,_0x506c3b=typeof _0x1c3e42;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x32a29a+'\x27:\x20'+_0x506c3b+_0x5e1ee9(0x1d4)+_0x1c3e42,_0x5e1ee9(0x1a7),{'index':_0x32a29a,'key':_0x1c3e42,'keyType':_0x506c3b}),this[_0x5e1ee9(0x215)]=_0x5e1ee9(0x180);}}class _0x20094e extends _0x476b20{constructor(_0x584166){const _0x558457=_0x3847,_0x507582=typeof _0x584166;super(_0x558457(0x205)+_0x507582+_0x558457(0x1a3)+_0x584166,_0x558457(0x2f4),{'key':_0x584166,'keyType':_0x507582}),this['name']=_0x558457(0x299);}}class _0x55ba14 extends _0x476b20{constructor(_0x3f37ba){const _0x4baae3=_0x3847;super('Type\x20\x27'+_0x3f37ba+_0x4baae3(0x1af),'TYPE_NOT_REGISTERED',{'type':_0x3f37ba}),this[_0x4baae3(0x215)]='OKDBTypeNotRegisteredError';}}class _0x46e85c extends _0x476b20{constructor(_0x4a457a){const _0x351b01=_0x3847;super(_0x351b01(0x182)+_0x4a457a+_0x351b01(0x2aa),_0x351b01(0x2c1),{'type':_0x4a457a}),this[_0x351b01(0x215)]='OKDBTypeAlreadyRegisteredError';}}class _0x2b86f7 extends _0x476b20{constructor(_0x154e10,_0x2774a5){const _0x5a19d1=_0x3847;super('Index\x20\x27'+_0x2774a5+_0x5a19d1(0x1f4)+_0x154e10+_0x5a19d1(0x1af),'INDEX_NOT_REGISTERED',{'type':_0x154e10,'index':_0x2774a5}),this['name']=_0x5a19d1(0x2ec);}}class _0x4532a0 extends _0x476b20{constructor(_0x1b3b8c,_0x5220fa){const _0x4566ed=_0x3847;super('Index\x20\x27'+_0x5220fa+_0x4566ed(0x1f4)+_0x1b3b8c+_0x4566ed(0x2b9),_0x4566ed(0x286),{'type':_0x1b3b8c,'index':_0x5220fa}),this['name']=_0x4566ed(0x1e9);}}class _0x4db35f extends _0x476b20{constructor(_0x33a8a0,_0x33befa={}){const _0x3a8141=_0x3847;super(_0x33a8a0,_0x3a8141(0x2c6),_0x33befa),this[_0x3a8141(0x215)]=_0x3a8141(0x1a4);}}class _0x10cc60 extends _0x476b20{constructor(_0x44fbd1,_0x16e9ec,_0x59f5bc,_0x7b58f4,_0x2edf60){const _0x10410f=_0x3847;super('Unique\x20constraint\x20violated\x20on\x20'+_0x44fbd1+'@'+_0x16e9ec+':\x20key\x20['+_0x59f5bc+_0x10410f(0x263)+_0x7b58f4+_0x10410f(0x2d8)+_0x2edf60+'\x27',_0x10410f(0x21b),{'type':_0x44fbd1,'index':_0x16e9ec,'indexKey':_0x59f5bc,'existingKey':_0x7b58f4,'conflictingKey':_0x2edf60}),this[_0x10410f(0x215)]=_0x10410f(0x26e);}}class _0xae1097 extends _0x476b20{constructor(_0x3992dc,_0x36f423,_0x4026bc){const _0x267993=_0x3847;super(_0x267993(0x200)+_0x3992dc+'@'+_0x36f423,'SCHEMA_VALIDATION_FAILED',{'type':_0x3992dc,'key':_0x36f423,'errors':_0x4026bc}),this[_0x267993(0x215)]=_0x267993(0x1aa),this[_0x267993(0x19c)]=_0x3992dc,this[_0x267993(0x161)]=_0x36f423,this[_0x267993(0x28e)]=_0x4026bc;}}class _0x2c02ba extends _0x476b20{constructor(_0x360ba2,_0x38ab82){const _0x26d834=_0x3847;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x360ba2+':\x20'+_0x38ab82['length']+_0x26d834(0x1d3),_0x26d834(0x185),{'type':_0x360ba2,'failures':_0x38ab82}),this[_0x26d834(0x215)]=_0x26d834(0x232),this[_0x26d834(0x19c)]=_0x360ba2,this[_0x26d834(0x265)]=_0x38ab82;}}class _0x24bda4 extends _0x476b20{constructor(_0x302963,_0x4d8678,_0xe9bd9e,_0x18e950,_0x5cd1c8){const _0x527ea8=_0x3847;super('Foreign\x20key\x20violation:\x20'+_0x302963+'@'+_0x4d8678+'.'+_0xe9bd9e+'\x20references\x20'+_0x18e950+'@'+_0x5cd1c8+_0x527ea8(0x251),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x302963,'sourceKey':_0x4d8678,'fieldPath':_0xe9bd9e,'targetType':_0x18e950,'targetKey':_0x5cd1c8}),this[_0x527ea8(0x215)]=_0x527ea8(0x246),this['sourceType']=_0x302963,this[_0x527ea8(0x2bd)]=_0x4d8678,this[_0x527ea8(0x2ca)]=_0xe9bd9e,this[_0x527ea8(0x22b)]=_0x18e950,this[_0x527ea8(0x166)]=_0x5cd1c8;}}class _0x32e24b extends _0x476b20{constructor(_0x86f7fc,_0x42b063,_0x4c6e53){const _0x2bf074=_0x3847;super(_0x2bf074(0x1d1)+_0x86f7fc+'@'+_0x42b063+':\x20'+_0x4c6e53[_0x2bf074(0x28d)]+_0x2bf074(0x19b),_0x2bf074(0x1e5),{'targetType':_0x86f7fc,'targetKey':_0x42b063,'references':_0x4c6e53}),this[_0x2bf074(0x215)]='OKDBForeignKeyDeleteError',this[_0x2bf074(0x22b)]=_0x86f7fc,this[_0x2bf074(0x166)]=_0x42b063,this[_0x2bf074(0x204)]=_0x4c6e53;}}class _0x259a25 extends _0x476b20{constructor(_0x2cb178,_0x9f469b,_0x2739ad){const _0x1dec46=_0x3847;super(_0x1dec46(0x294)+_0x9f469b+_0x1dec46(0x267)+_0x2cb178+_0x1dec46(0x25b)+_0x2739ad[_0x1dec46(0x2a5)](_0x5d9b18=>_0x5d9b18[_0x1dec46(0x193)]+':'+_0x5d9b18[_0x1dec46(0x215)])[_0x1dec46(0x236)](',\x20'),_0x1dec46(0x16d),{'type':_0x2cb178,'index':_0x9f469b,'usedBy':_0x2739ad}),this[_0x1dec46(0x215)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x476b20,'OKDBVersionMismatchError':_0x599b3c,'OKDBNotFoundError':_0x36a513,'OKDBAlreadyExistsError':_0x45c082,'OKDBInvalidIndexKeyError':_0x50e0a9,'OKDBInvalidPrimaryKeyError':_0x20094e,'OKDBTypeNotRegisteredError':_0x55ba14,'OKDBTypeAlreadyRegisteredError':_0x46e85c,'OKDBIndexNotRegisteredError':_0x2b86f7,'OKDBIndexAlreadyRegisteredError':_0x4532a0,'OKDBInvalidValueError':_0x4db35f,'OKDBUniqueConstraintError':_0x10cc60,'OKDBSchemaValidationError':_0xae1097,'OKDBSchemaCollectionError':_0x2c02ba,'OKDBForeignKeyError':_0x24bda4,'OKDBForeignKeyDeleteError':_0x32e24b,'OKDBIndexHasConsumersError':_0x259a25},okdbError;}var okdbGuardedRange,hasRequiredOkdbGuardedRange;function _0x57b4(){const _0x934539=['_makeIterator','okdb-function-sandbox','item:pending','onUndo','\x27\x20already\x20registered','FETCH_NOT_ALLOWED','bus:poke','indexReady','TXN_ROLLBACK','count','OKDBVersionMismatchError','_closed','system:env_release','getByPrefix','clearTTL','allowedFetchDomains','transaction\x20commit\x20failed','setLogger','byLabel','\x27\x20is\x20already\x20registered','dropType','getHeapStatistics','FUNCTION_SCRIPT_INVALID_SHAPE','sourceKey','patch','released\x20at\x20the\x20first\x20await/turn\x20boundary.\x20Consume\x20ranges\x20before\x20any\x20await,\x20or\x20','warn','TYPE_ALREADY_REGISTERED','halted','unique:violation_resolved','\x20│\x20','setSchema','INVALID_VALUE','return','Unknown\x20OKDB\x20transaction\x20error','concat','fieldPath','ftsQuery','compileTimeoutMs','_txnIdAtSnapshot','now','resetIndex','list','envName','setDefaultTTL','stderr','57KBRkSr','captureStackTrace','ttl:clear','stream','\x27,\x20cannot\x20map\x20to\x20\x27','set','dropSchema','_log','(no\x20unambiguous\x20bookmark)\x20—\x20consume\x20it\x20in\x20one\x20synchronous\x20block:\x20materialize\x20(e.g.\x20','26152NAgejr','files','createContext','\x20already\x20exists','getClock','SKIP','listBuckets','item:remove','schema:drop','read','resetting','bus:env_release','start','true','stack','OKDBIndexNotRegisteredError','commit','registerType','3432ZWFIZQ','default','txnId','Version\x20mismatch\x20for\x20','sort','INVALID_PRIMARY_KEY','key','lastTxnId','listPath','fts:registered','materializer','targetKey','_admissionTimer','lmdb','fts:reset','_writer','has','504826GTGrLb','INDEX_HAS_CONSUMERS','schema:set','OKDBAlreadyExistsError','loop-lag','.okdb-function.js','exit','removeEnvironment','slice','Unknown\x20custom\x20function\x20error','mode','READER_HELD_ACROSS_AWAIT','index:ready','_startAdmission','object','clearTtl','filter','1525QxmgJN','sdk','updateJob','OKDBInvalidIndexKeyError','clearDefaultTTL','Type\x20\x27','runtime','enabled','SCHEMA_COLLECTION_INVALID','mkdirSync','iterator','created','materializerContext','fatal','_timer','fts:drop','allowFetch','log','ttl:set',':useReadTransaction','last','upload','kind','unref','_started','update','tolerant','useReadTransaction\x20range\x20consumed\x20after\x20the\x20creation\x20turn\x20—\x20the\x20consistent\x20view\x20was\x20','getJob','hash','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','type',':txnRange','job_heartbeat','cancelled\x20by\x20caller','792Gpmlfn','_report','crypto','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','OKDBInvalidValueError','fetch\x20is\x20not\x20allowed\x20in\x20this\x20function\x20sandbox\x20(no\x20allowedFetchDomains\x20configured)','hostname','INVALID_INDEX_KEY','label','DONE','OKDBSchemaValidationError','job_progress','applyOps','system:poke','result','\x27\x20doesn\x27t\x20exist','registerIndex','args','reset','TXN_CLOSED','mapError','getBucket','flatMap','functionName','__esModule','getTTL','Unknown\x20transaction\x20action:\x20','string','transaction','OKDBNotFoundError','pinned\x20range\x20iterator\x20held\x20across\x20an\x20await/turn\x20boundary.\x20This\x20surface\x20cannot\x20resume\x20','toJSON','reduce','mean','claimId','item:update','sweepExpiredTTL','from','Transaction\x20already\x20closed','env:opened','system:ready','txn\x20op\x20must\x20be\x20an\x20object\x20or\x20tuple','type:registered','materialize\x20them\x20(Array.from)\x20while\x20the\x20view\x20is\x20live.','_admissionStarted','\x22\x20is\x20not\x20in\x20the\x20allowedFetchDomains\x20list','maxMs','timeout','ttl:expired','Cannot\x20delete\x20','postMessage','\x20documents\x20fail\x20validation','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','license:invalid','bind','963ccArnX','debug','rollback','license:activated','cancel','sourceEnv','get','excludeEnv','any','SIGSEGV','signal','FUNCTION_SCRIPT_COMPILE_FAILED','readTransaction','getIndex','FOREIGN_KEY_DELETE_RESTRICTED','txn-commit','done','fetch\x20blocked:\x20hostname\x20\x22','OKDBIndexAlreadyRegisteredError','getRange','_doHooks','22141IISWWa','details','_windowCbs','requestId','sync:apply','processor','create','version','\x27\x20on\x20type\x20\x27','system:type_drop','listTTL','getIndexStatus','_range','removeJob',':\x20expected\x20','function','report','url','message','sandbox-','Schema\x20validation\x20failed\x20for\x20','events','path','catch','references','Invalid\x20primary\x20key\x20type:\x20','runId','ref:violation','ensureType','note','actions','stats','run','action','script','cause','Function\x20script\x20must\x20evaluate\x20to\x20a\x20callable\x20function','getStats','OKDBError','exports','Script','name','push','constructor','TXN_ERROR','no\x20write\x20has\x20landed.\x20Writes/commit\x20are\x20unaffected.','queue','UNIQUE_CONSTRAINT','view:progress','call','registerFts','addBucket','hasType','fetch','info','txn','stop','targetEnv','ready','starting','getCount','clear','getEntry','targetType','_undoHooks','total','globalThis','nativeCode','TXN_START','pinned\x20range\x20iterator\x20parked\x20across\x20an\x20await/turn\x20boundary\x20and\x20the\x20env\x20was\x20written\x20','OKDBSchemaCollectionError','disable','_closeReadTransaction','5434869UwvRyU','join','342350EhdgLu','value','system:drain','3230kiumnG','reject','useReadTransaction','global','used_heap_size','byIndex','cursorKey','TXN_END','tries','okdb','_readViewExpired','query','OKDBForeignKeyError','geoQuery','maxExtra','setTTL','system:clock_change','field:resolver_registered','\x20does\x20not\x20exist','offWindow',',\x20got\x20','sourceType','ref:violation_resolved','\x20which\x20does\x20not\x20exist','createWriteFacade','next','enable','./okdb','put','bus:proc','Array.from)\x20before\x20any\x20await.','toFixed','processorContext','\x22\x20is\x20used\x20by:\x20','max','write','delete','code','error','env','license:added',']\x20already\x20maps\x20to\x20\x27','close','failures','txn:end','\x22\x20on\x20\x22','item:create','dropIndex','onDo','enableFatalReport','actionCount','cron','OKDBUniqueConstraintError','trigger','getDefaultTTL','unique:violation','uuid','node:perf_hooks','system:bus_state_change','bucket','reportOnFatalError','isFinite','size','ALREADY_EXISTS','percentile','keys','tags','isArray','prototype','asArray','ttl','ttlStats','index:progress','options','~system','(worst\x20','INDEX_ALREADY_REGISTERED','pid','getKeys','_assertOpen','bus:type_drop','remove','enqueue','length','errors','\x20actions=','then','ms\x20busy=','timeoutMs','node:vm','Index\x20\x22','before\x20any\x20await,\x20chunk\x20with\x20{limit,\x20start,\x20exclusiveStart},\x20or\x20drop\x20snapshot:true.','started','engineKey','forEach','OKDBInvalidPrimaryKeyError','directory','emit','hasIndex','TXN_INVALID_ACTION','runInContext','getMany','freeze','_buckets','getValues','stopped','bus:drain','map'];_0x57b4=function(){return _0x934539;};return _0x57b4();}function requireOkdbGuardedRange(){const _0x1c08a1=_0x212165;if(hasRequiredOkdbGuardedRange)return okdbGuardedRange;hasRequiredOkdbGuardedRange=0x1;const _0x35acbc=require$$0$1,{OKDBError:_0x28d09c}=requireOkdbError(),_0x3b03d4={'value':null,'done':!![]};class _0x5a0336{constructor(_0x349e77){const _0x286101=_0x3847;this[_0x286101(0x2a6)]=_0x349e77;}get[_0x1c08a1(0x1a9)](){return _0x3b03d4;}[Symbol[_0x1c08a1(0x187)]](){return this['_makeIterator']();}[_0x1c08a1(0x2a5)](_0x381273){const _0x54b02b=this;return new _0x5a0336(()=>{const _0x1a8396=_0x3847,_0x173ad6=_0x54b02b[Symbol[_0x1a8396(0x187)]]();return{'next'(){const _0x5ba1c7=_0x1a8396;for(;;){const _0x11217b=_0x173ad6['next']();if(_0x11217b[_0x5ba1c7(0x1e7)])return{'done':!![],'value':undefined};const _0x59249e=_0x381273(_0x11217b[_0x5ba1c7(0x238)]);if(_0x59249e===_0x35acbc[_0x5ba1c7(0x2e2)])continue;if(_0x59249e===_0x3b03d4)return _0x173ad6['return']?.(),{'done':!![],'value':undefined};return{'done':![],'value':_0x59249e};}},'return'(){const _0x4cf6a8=_0x1a8396;return _0x173ad6[_0x4cf6a8(0x2c7)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x1a8396(0x187)]](){return this;}};});}[_0x1c08a1(0x17c)](_0x13a5b2){const _0x128e30=_0x1c08a1;return this[_0x128e30(0x2a5)](_0x1d5bb3=>_0x13a5b2(_0x1d5bb3)?_0x1d5bb3:_0x35acbc[_0x128e30(0x2e2)]);}[_0x1c08a1(0x298)](_0x57eb9a){for(const _0x484365 of this)_0x57eb9a(_0x484365);}[_0x1c08a1(0x174)](_0x34c557=0x0,_0xfa19a1=Infinity){const _0xbd7081=this;return new _0x5a0336(()=>{const _0x469e36=_0x3847,_0x10d64b=_0xbd7081[Symbol['iterator']]();let _0x55ac7d=0x0;return{'next'(){const _0x188728=_0x3847;for(;;){const _0x427368=_0x10d64b['next']();if(_0x427368['done'])return{'done':!![],'value':undefined};const _0x19c6aa=_0x55ac7d++;if(_0x19c6aa<_0x34c557)continue;if(_0x19c6aa>=_0xfa19a1)return _0x10d64b[_0x188728(0x2c7)]?.(),{'done':!![],'value':undefined};return _0x427368;}},'return'(){const _0x5d0474=_0x3847;return _0x10d64b[_0x5d0474(0x2c7)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x469e36(0x187)]](){return this;}};});}['at'](_0x3f88af){let _0x15bce2=0x0;for(const _0x55e937 of this)if(_0x15bce2++===_0x3f88af)return _0x55e937;return undefined;}[_0x1c08a1(0x1b6)](_0x54b5b9){const _0x1cec6c=this;return new _0x5a0336(()=>{const _0x32549c=_0x3847,_0x37dde6=_0x1cec6c[Symbol[_0x32549c(0x187)]]();let _0xe8c772=[];return{'next'(){const _0x2b6bfa=_0x32549c;for(;;){if(_0xe8c772['length'])return{'done':![],'value':_0xe8c772['shift']()};const _0x4ada7f=_0x37dde6[_0x2b6bfa(0x253)]();if(_0x4ada7f[_0x2b6bfa(0x1e7)])return{'done':!![],'value':undefined};const _0x54d648=_0x54b5b9(_0x4ada7f['value']);if(Array['isArray'](_0x54d648))_0xe8c772=_0xe8c772[_0x2b6bfa(0x2c9)](_0x54d648);else{if(_0x54d648!=null&&(_0x54d648 instanceof _0x5a0336||typeof _0x54d648[Symbol[_0x2b6bfa(0x187)]]===_0x2b6bfa(0x1fb)&&_0x2b6bfa(0x27f)in _0x54d648))_0xe8c772=_0xe8c772[_0x2b6bfa(0x2c9)](Array['from'](_0x54d648));else{if(_0x54d648!==_0x35acbc[_0x2b6bfa(0x2e2)])return{'done':![],'value':_0x54d648};}}}},'return'(){const _0x15e169=_0x32549c;return _0x37dde6[_0x15e169(0x2c7)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x32549c(0x187)]](){return this;}};});}[_0x1c08a1(0x2c9)](_0x276490){const _0x307776=this;return new _0x5a0336(()=>{const _0x3f8113=_0x3847;let _0x7a0935=_0x307776[Symbol[_0x3f8113(0x187)]](),_0x23ac3f=![];return{'next'(){const _0x489d86=_0x3f8113;for(;;){const _0x228a7a=_0x7a0935[_0x489d86(0x253)]();if(!_0x228a7a[_0x489d86(0x1e7)])return _0x228a7a;if(_0x23ac3f)return{'done':!![],'value':undefined};_0x23ac3f=!![],_0x7a0935=_0x276490[Symbol['iterator']]();}},'return'(){const _0x526733=_0x3f8113;return _0x7a0935[_0x526733(0x2c7)]?.(),{'done':!![],'value':undefined};},[Symbol['iterator']](){return this;}};});}[_0x1c08a1(0x1b4)](_0xde753d){const _0x9e2f45=this;return new _0x5a0336(()=>{const _0x40c319=_0x3847,_0x4e4a65=_0x9e2f45[Symbol[_0x40c319(0x187)]]();return{'next'(){const _0x5d630c=_0x40c319;for(;;){try{return _0x4e4a65[_0x5d630c(0x253)]();}catch(_0xc9f072){const _0x39ed01=_0xde753d(_0xc9f072);if(_0x39ed01===_0x35acbc['SKIP']||_0x39ed01===undefined)continue;return{'done':![],'value':_0x39ed01};}}},'return'(){const _0x390afc=_0x40c319;return _0x4e4a65[_0x390afc(0x2c7)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x40c319(0x187)]](){return this;}};});}[_0x1c08a1(0x1bf)](){const _0x893aaf=_0x1c08a1;return Array[_0x893aaf(0x1c5)](this);}get['asArray'](){const _0x3942c5=_0x1c08a1;return Array[_0x3942c5(0x1c5)](this);}}const _0x1e3bd8={'total':0x0,'byLabel':{},'last':null};function _0x508b37(_0x108d82){const _0x221b61=_0x1c08a1;_0x1e3bd8[_0x221b61(0x22d)]++;if(_0x108d82)_0x1e3bd8['byLabel'][_0x108d82]=(_0x1e3bd8['byLabel'][_0x108d82]??0x0)+0x1;_0x1e3bd8[_0x221b61(0x191)]={'label':_0x108d82??null,'at':Date[_0x221b61(0x2ce)]()};}function _0x1faa37(){const _0x3da43c=_0x1c08a1;return{'total':_0x1e3bd8[_0x3da43c(0x22d)],'byLabel':{..._0x1e3bd8[_0x3da43c(0x2b8)]},'last':_0x1e3bd8[_0x3da43c(0x191)]};}function _0x1e5b8e(_0x2bb528,_0x3cdff5={}){const {getTxnId:_0x363374,resume:_0x5efeec,label:_0xe61d99,baseline:_0x3b2ef1}=_0x3cdff5;return new _0x5a0336(()=>{const _0x55b906=_0x3847;let _0x6a16f7=null,_0x4459b9=![],_0x412073=![],_0x4aceeb=![],_0x5d22c8,_0x4a77c5=0x0,_0x599e82;return{'next'(){const _0x32aa00=_0x3847;if(_0x4aceeb)return{'done':!![],'value':undefined};if(_0x412073){let _0x521ab7=![];if(_0x5efeec&&_0x363374)try{_0x521ab7=_0x363374()===_0x599e82;}catch{}if(!_0x521ab7){_0x4aceeb=!![],_0x508b37(_0xe61d99);throw new _0x28d09c(_0x5efeec?_0x32aa00(0x231)+'meanwhile\x20—\x20the\x20frozen\x20view\x20cannot\x20be\x20kept.\x20Materialize\x20synchronously\x20(e.g.\x20Array.from)\x20'+_0x32aa00(0x295):_0x32aa00(0x1be)+_0x32aa00(0x2dc)+_0x32aa00(0x258),_0x32aa00(0x177));}_0x6a16f7=_0x5efeec(_0x5d22c8,_0x4a77c5)[Symbol[_0x32aa00(0x187)]](),_0x412073=![];}if(!_0x6a16f7){if(_0x3b2ef1!==undefined)_0x599e82=_0x3b2ef1;else try{_0x599e82=_0x363374?_0x363374():undefined;}catch{_0x599e82=undefined;}try{_0x6a16f7=_0x2bb528()[Symbol[_0x32aa00(0x187)]]();}catch(_0x5def27){_0x4aceeb=!![];throw _0x5def27;}}!_0x4459b9&&(_0x4459b9=!![],queueMicrotask(()=>{const _0x33d15c=_0x32aa00;_0x4459b9=![];if(_0x4aceeb||_0x412073)return;try{_0x6a16f7?.[_0x33d15c(0x2c7)]?.();}catch{}_0x6a16f7=null,_0x412073=!![];}));const _0x864ee=_0x6a16f7[_0x32aa00(0x253)]();if(_0x864ee[_0x32aa00(0x1e7)])return _0x4aceeb=!![],{'done':!![],'value':undefined};return _0x5d22c8=_0x864ee[_0x32aa00(0x238)],_0x4a77c5++,_0x864ee;},'return'(){_0x4aceeb=!![];try{_0x6a16f7?.['return']?.();}catch{}return{'done':!![],'value':undefined};},[Symbol[_0x55b906(0x187)]](){return this;}};});}return okdbGuardedRange={'guardSnapshotIterable':_0x1e5b8e,'OKDBGuardedRange':_0x5a0336,'recordGuardTrip':_0x508b37,'getGuardTripStats':_0x1faa37},okdbGuardedRange;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x4af2b7=_0x212165;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1e2fbb,performance:_0x8a8c97}=require$$0$2,_0x120c92=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x4af2b7(0x2ea),_0x552864=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x61b3=process.env.OKDB_LOOP_LAG_ALL==='1',_0x132004=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x13e1bc{constructor(){const _0x19b0db=_0x4af2b7;this[_0x19b0db(0x184)]=_0x120c92,this['_buckets']=new Map(),this['_h']=null,this[_0x19b0db(0x18b)]=null,this['_started']=![],this[_0x19b0db(0x2db)]=(_0xbc8bf,_0xa731cf)=>process[_0x19b0db(0x2d3)][_0x19b0db(0x25d)](_0xbc8bf+(_0xa731cf?'\x20'+JSON['stringify'](_0xa731cf):'')+'\x0a');}[_0x4af2b7(0x2ce)](){const _0x1ac09e=_0x4af2b7;return _0x8a8c97[_0x1ac09e(0x2ce)]();}[_0x4af2b7(0x2b7)](_0x494927){const _0x197b18=_0x4af2b7;if(typeof _0x494927==='function')this[_0x197b18(0x2db)]=_0x494927;}['note'](_0x57044a,_0x513900,_0x22722d){const _0x3889fb=_0x4af2b7;if(!this[_0x3889fb(0x184)])return;let _0x280623=this[_0x3889fb(0x2a1)]['get'](_0x57044a);!_0x280623&&(_0x280623={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x3889fb(0x2a1)]['set'](_0x57044a,_0x280623)),_0x280623['ms']+=_0x513900,_0x280623['count']+=0x1,_0x513900>_0x280623['maxMs']&&(_0x280623[_0x3889fb(0x1ce)]=_0x513900,_0x280623[_0x3889fb(0x248)]=_0x22722d||'');}[_0x4af2b7(0x2e9)](_0x1753fa){const _0x4b701f=_0x4af2b7;if(!this[_0x4b701f(0x184)]||this[_0x4b701f(0x195)])return;this[_0x4b701f(0x195)]=!![];if(_0x1753fa)this[_0x4b701f(0x2db)]=_0x1753fa;this['_h']=_0x1e2fbb({'resolution':0xa}),this['_h']['enable'](),this[_0x4b701f(0x18b)]=setInterval(()=>this['_report'](),_0x552864);if(this[_0x4b701f(0x18b)][_0x4b701f(0x194)])this['_timer']['unref']();}['onWindow'](_0x375cef){const _0x347a80=_0x4af2b7;if(!this['_windowCbs'])this[_0x347a80(0x1ee)]=new Set();this[_0x347a80(0x1ee)]['add'](_0x375cef);if(!this[_0x347a80(0x195)])this[_0x347a80(0x179)]();}[_0x4af2b7(0x24d)](_0x440e26){const _0x1e457b=_0x4af2b7;this[_0x1e457b(0x1ee)]?.[_0x1e457b(0x25e)](_0x440e26);}['_startAdmission'](){const _0x266ef1=_0x4af2b7;if(this[_0x266ef1(0x1cc)])return;this[_0x266ef1(0x1cc)]=!![];!this['_h']&&(this['_h']=_0x1e2fbb({'resolution':0xa}),this['_h'][_0x266ef1(0x254)]());const _0x3067c2=_0x552864;this[_0x266ef1(0x167)]=setInterval(()=>{const _0x5ccd46=_0x266ef1,_0x4bb3cc=this['_h'];if(!_0x4bb3cc)return;const _0x1f283e=_0x4bb3cc[_0x5ccd46(0x27a)](0x63)/0xf4240,_0x2a7d13=_0x4bb3cc[_0x5ccd46(0x25c)]/0xf4240,_0x4b3ceb=_0x4bb3cc[_0x5ccd46(0x1c1)]/0xf4240;_0x4bb3cc[_0x5ccd46(0x1b2)]();if(this[_0x5ccd46(0x1ee)])for(const _0x574e53 of this[_0x5ccd46(0x1ee)]){try{_0x574e53({'p99Ms':_0x1f283e,'maxMs':_0x2a7d13,'meanMs':_0x4b3ceb,'reportMs':_0x3067c2});}catch{}}},_0x3067c2);if(this['_admissionTimer']['unref'])this[_0x266ef1(0x167)][_0x266ef1(0x194)]();}[_0x4af2b7(0x1a1)](){const _0x401cc5=_0x4af2b7,_0x1d9664=this['_h'],_0x3033e0=_0x1d9664[_0x401cc5(0x25c)]/0xf4240,_0x2e02a5=_0x1d9664[_0x401cc5(0x27a)](0x63)/0xf4240,_0xdaf754=_0x1d9664['mean']/0xf4240;_0x1d9664[_0x401cc5(0x1b2)]();const _0x30e8a4=[...this[_0x401cc5(0x2a1)]['entries']()][_0x401cc5(0x2a5)](([_0x2425f0,_0x4dc8e3])=>({'label':_0x2425f0,..._0x4dc8e3}))[_0x401cc5(0x2f3)]((_0x5e3e63,_0x48e0e5)=>_0x48e0e5['ms']-_0x5e3e63['ms'])[_0x401cc5(0x174)](0x0,0x8);this['_buckets'][_0x401cc5(0x229)]();const _0x321aa8=_0x30e8a4[_0x401cc5(0x1c0)]((_0x530777,_0x5b8099)=>_0x530777+_0x5b8099['ms'],0x0),_0x61c215=_0x30e8a4[_0x401cc5(0x2a5)](_0x440b65=>_0x440b65[_0x401cc5(0x1a8)]+'='+_0x440b65['ms'][_0x401cc5(0x259)](0x0)+'ms/'+_0x440b65[_0x401cc5(0x2af)]+(_0x440b65[_0x401cc5(0x1ce)]>0x5?_0x401cc5(0x285)+_0x440b65['maxMs']['toFixed'](0x0)+'ms'+(_0x440b65['maxExtra']?'\x20'+_0x440b65['maxExtra']:'')+')':''));(_0x61b3||_0x3033e0>=_0x132004)&&this[_0x401cc5(0x2db)]('loop-lag\x20'+_0x552864+'ms\x20max='+_0x3033e0[_0x401cc5(0x259)](0x0)+'ms\x20p99='+_0x2e02a5[_0x401cc5(0x259)](0x0)+'ms\x20mean='+_0xdaf754[_0x401cc5(0x259)](0x0)+_0x401cc5(0x291)+_0x321aa8['toFixed'](0x0)+'ms'+(_0x61c215['length']?_0x401cc5(0x2c4)+_0x61c215['join']('\x20\x20'):''),{'feature':_0x401cc5(0x170)});if(this['_windowCbs'])for(const _0x2d0d30 of this[_0x401cc5(0x1ee)]){try{_0x2d0d30({'p99Ms':_0x2e02a5,'maxMs':_0x3033e0,'meanMs':_0xdaf754,'reportMs':_0x552864});}catch{}}}[_0x4af2b7(0x224)](){const _0xc08576=_0x4af2b7;if(this[_0xc08576(0x18b)])clearInterval(this[_0xc08576(0x18b)]);if(this['_h'])this['_h'][_0xc08576(0x233)]();this[_0xc08576(0x18b)]=null,this['_h']=null,this[_0xc08576(0x195)]=![];}}const _0x45afdf=new _0x13e1bc();if(_0x45afdf[_0x4af2b7(0x184)])_0x45afdf['start']();return okdbLoopMonitor={'LOOP':_0x45afdf},okdbLoopMonitor;}var okdbTransaction,hasRequiredOkdbTransaction;function requireOkdbTransaction(){const _0x4e6f2c=_0x212165;if(hasRequiredOkdbTransaction)return okdbTransaction;hasRequiredOkdbTransaction=0x1;const _0x988fc6=require$$0$3,{EVENTS:_0x2f7fcf}=requireOkdbEnums(),{OKDBError:_0x599905}=requireOkdbError(),{recordGuardTrip:_0x3098e3,guardSnapshotIterable:_0x170071}=requireOkdbGuardedRange(),{LOOP:_0x310ef4}=requireOkdbLoopMonitor();function _0x195d4e(_0x275522){const _0x25e363=_0x3847;return _0x275522[_0x25e363(0x2a5)](_0x45e26b=>{const _0x278196=_0x25e363,[_0x178650,_0x4bdd28]=_0x45e26b[_0x278196(0x1b1)]||[];return{'action':_0x45e26b[_0x278196(0x20d)],'type':_0x178650,'key':_0x4bdd28};});}class _0x3b0455{[_0x4e6f2c(0x243)];[_0x4e6f2c(0x20a)]=[];[_0x4e6f2c(0x1eb)]=[];[_0x4e6f2c(0x22c)]=[];constructor(_0x404f92,_0x441da2={'useReadTransaction':![]}){const _0x15193a=_0x4e6f2c;this[_0x15193a(0x243)]=_0x404f92,this[_0x15193a(0x283)]=_0x441da2,this['id']=_0x988fc6['v4']();if(this[_0x15193a(0x283)][_0x15193a(0x23c)])try{this[_0x15193a(0x2cd)]=this[_0x15193a(0x243)]['db']['getStats']()[_0x15193a(0x162)];}catch{this[_0x15193a(0x2cd)]=undefined;}this[_0x15193a(0x1e3)]=this[_0x15193a(0x283)][_0x15193a(0x23c)]?this['okdb']['db'][_0x15193a(0x23c)]():null,this[_0x15193a(0x2b1)]=![],this[_0x15193a(0x244)]=![],this[_0x15193a(0x1e3)]&&queueMicrotask(()=>{const _0x54601b=_0x15193a;this[_0x54601b(0x1e3)]&&(this[_0x54601b(0x234)](),this[_0x54601b(0x244)]=!![]);});}[_0x4e6f2c(0x26a)](_0x307351){const _0x3c42ca=_0x4e6f2c;this[_0x3c42ca(0x1eb)]['push'](_0x307351);}[_0x4e6f2c(0x2a9)](_0x1176ca){const _0x510226=_0x4e6f2c;this[_0x510226(0x22c)][_0x510226(0x216)](_0x1176ca);}['_closeReadTransaction'](){const _0x4755f6=_0x4e6f2c;if(!this['readTransaction'])return;try{this[_0x4755f6(0x1e3)][_0x4755f6(0x1e7)]();}catch(_0x3cb49c){}this[_0x4755f6(0x1e3)]=null;}[_0x4e6f2c(0x289)](){const _0x4c8462=_0x4e6f2c;if(this[_0x4c8462(0x2b1)])throw new _0x599905(_0x4c8462(0x1c6),_0x4c8462(0x1b3));if(this['_readViewExpired']){let _0x1b28d9=![];if(this['options'][_0x4c8462(0x23c)]===_0x4c8462(0x197)&&this[_0x4c8462(0x2cd)]!==undefined)try{_0x1b28d9=this[_0x4c8462(0x243)]['db']['getStats']()[_0x4c8462(0x162)]===this[_0x4c8462(0x2cd)];}catch{}if(!_0x1b28d9){_0x3098e3((this[_0x4c8462(0x243)]?.[_0x4c8462(0x215)]??'?')+_0x4c8462(0x190));throw new _0x599905('useReadTransaction\x20read\x20view\x20expired:\x20the\x20snapshot\x20was\x20released\x20at\x20the\x20first\x20await/turn\x20'+'boundary\x20(a\x20pinned\x20read\x20txn\x20blocks\x20LMDB\x20free-page\x20reuse).\x20Do\x20all\x20consistent\x20reads\x20'+'before\x20any\x20await\x20—\x20or\x20opt\x20into\x20useReadTransaction:\x27tolerant\x27\x20to\x20keep\x20reading\x20while\x20'+_0x4c8462(0x219),_0x4c8462(0x177));}}}[_0x4e6f2c(0x1dd)](_0x2fcc0c,_0x11677c){const _0x4feafd=_0x4e6f2c;return this[_0x4feafd(0x289)](),this['okdb'][_0x4feafd(0x1dd)](_0x2fcc0c,_0x11677c,{'transaction':this[_0x4feafd(0x1e3)]});}[_0x4e6f2c(0x22a)](_0x4248ad,_0xb16707){const _0x1daec2=_0x4e6f2c;return this[_0x1daec2(0x289)](),this['okdb']['getEntry'](_0x4248ad,_0xb16707,{'transaction':this[_0x1daec2(0x1e3)]});}['getMany'](_0x17eb5f,_0x3c1c1c){const _0x4252fa=_0x4e6f2c;return this[_0x4252fa(0x289)](),this[_0x4252fa(0x243)][_0x4252fa(0x29f)](_0x17eb5f,_0x3c1c1c,{'transaction':this[_0x4252fa(0x1e3)]});}['_range'](_0x15cf8b){const _0x503e6d=_0x4e6f2c;if(!this[_0x503e6d(0x283)][_0x503e6d(0x23c)])return _0x15cf8b;if(_0x15cf8b&&typeof _0x15cf8b[_0x503e6d(0x290)]===_0x503e6d(0x1fb))return _0x15cf8b;if(Array[_0x503e6d(0x27d)](_0x15cf8b))return _0x15cf8b;const _0x3d6fae=this,_0x2bde2c=_0x3d6fae['options'][_0x503e6d(0x23c)]===_0x503e6d(0x197),_0x3e67ca=()=>{const _0x17b80e=_0x503e6d;if(!_0x3d6fae[_0x17b80e(0x244)])return![];if(!_0x2bde2c)return!![];if(_0x3d6fae['_txnIdAtSnapshot']===undefined)return!![];try{return _0x3d6fae['okdb']['db']['getStats']()[_0x17b80e(0x162)]!==_0x3d6fae[_0x17b80e(0x2cd)];}catch{return!![];}};return _0x170071(()=>{const _0x374090=_0x503e6d;if(_0x3d6fae['_closed'])throw new _0x599905(_0x374090(0x1c6),_0x374090(0x1b3));if(_0x3e67ca()){_0x3098e3((_0x3d6fae['okdb']?.[_0x374090(0x215)]??'?')+_0x374090(0x19d));throw new _0x599905(_0x374090(0x198)+_0x374090(0x2bf)+_0x374090(0x1cb),_0x374090(0x177));}return _0x15cf8b;},{'label':(_0x3d6fae[_0x503e6d(0x243)]?.[_0x503e6d(0x215)]??'?')+_0x503e6d(0x19d),..._0x2bde2c?{'baseline':_0x3d6fae['_txnIdAtSnapshot'],'getTxnId':()=>_0x3d6fae['okdb']['db'][_0x503e6d(0x211)]()['lastTxnId'],'resume':(_0x2b68f3,_0x17f5fc)=>_0x15cf8b['slice'](_0x17f5fc)}:{}});}[_0x4e6f2c(0x1ea)](_0xc3eb9c,_0x3d8f55={}){const _0x52756f=_0x4e6f2c;return this[_0x52756f(0x289)](),this['_range'](this[_0x52756f(0x243)][_0x52756f(0x1ea)](_0xc3eb9c,{'transaction':this[_0x52756f(0x1e3)],..._0x3d8f55}));}[_0x4e6f2c(0x2a2)](_0x1343e3,_0x5a6b01={}){const _0x45f12c=_0x4e6f2c;return this['_assertOpen'](),this[_0x45f12c(0x1f8)](this[_0x45f12c(0x243)][_0x45f12c(0x2a2)](_0x1343e3,{'transaction':this[_0x45f12c(0x1e3)],..._0x5a6b01}));}[_0x4e6f2c(0x288)](_0x235445,_0x3065bf={}){const _0x522cdf=_0x4e6f2c;return this[_0x522cdf(0x289)](),this[_0x522cdf(0x1f8)](this[_0x522cdf(0x243)][_0x522cdf(0x288)](_0x235445,{'transaction':this['readTransaction'],..._0x3065bf}));}['byIndex'](_0x5d5be5,_0x509a8f,_0x4828bf={}){const _0x992dba=_0x4e6f2c;return this[_0x992dba(0x289)](),this[_0x992dba(0x1f8)](this['okdb'][_0x992dba(0x23f)](_0x5d5be5,_0x509a8f,{'transaction':this[_0x992dba(0x1e3)],..._0x4828bf}));}[_0x4e6f2c(0x245)](_0x2f97cf,_0x12acff,_0x3490bf={}){const _0xb7a679=_0x4e6f2c;return this[_0xb7a679(0x289)](),this[_0xb7a679(0x1f8)](this['okdb'][_0xb7a679(0x245)](_0x2f97cf,_0x12acff,{'transaction':this['readTransaction'],..._0x3490bf}));}['getClock'](_0x45bd67=null){const _0x376978=_0x4e6f2c;return this['_assertOpen'](),this['okdb'][_0x376978(0x2e1)](_0x45bd67,{'transaction':this[_0x376978(0x1e3)]});}[_0x4e6f2c(0x228)](_0x58c1ed){const _0x2a608a=_0x4e6f2c;return this[_0x2a608a(0x289)](),this[_0x2a608a(0x243)]['getCount'](_0x58c1ed,{'transaction':this[_0x2a608a(0x1e3)]});}[_0x4e6f2c(0x256)](_0x443acd,_0x3cb75c,_0x50f745,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x4e6f2c(0x2ce)](),origin:origin=null,ttl:ttl=null}={}){const _0x4cc785=_0x4e6f2c;this['actions']['push']({'action':_0x4cc785(0x256),'args':[_0x443acd,_0x3cb75c,_0x50f745,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x4e6f2c(0x196)](_0x343673,_0xc6f823,_0xe7c007,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x4e6f2c(0x2ce)](),origin:origin=null,ttl:ttl=null}={}){const _0x4f84e4=_0x4e6f2c;this['actions']['push']({'action':_0x4f84e4(0x196),'args':[_0x343673,_0xc6f823,_0xe7c007,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x4e6f2c(0x2be)](_0x305cdd,_0x291f6e,_0x52a406,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x4e6f2c(0x2ce)](),origin:origin=null,ttl:ttl=null}={}){const _0x1b63b1=_0x4e6f2c;this[_0x1b63b1(0x20a)]['push']({'action':_0x1b63b1(0x2be),'args':[_0x305cdd,_0x291f6e,_0x52a406,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x4e6f2c(0x1f2)](_0x3fa890,_0x370166,_0x385ff1,{version:version=null,timestamp:timestamp=Date[_0x4e6f2c(0x2ce)](),origin:origin=null,ttl:ttl=null}={}){const _0x2d8c6c=_0x4e6f2c;this[_0x2d8c6c(0x20a)][_0x2d8c6c(0x216)]({'action':_0x2d8c6c(0x1f2),'args':[_0x3fa890,_0x370166,_0x385ff1,{'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x4e6f2c(0x28b)](_0x40ff12,_0x339ab7,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x4e6f2c(0x2ce)](),origin:origin=null}={}){const _0x800b27=_0x4e6f2c;this['actions'][_0x800b27(0x216)]({'action':'remove','args':[_0x40ff12,_0x339ab7,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin}]});}[_0x4e6f2c(0x249)](_0x53b652,_0x54d672,_0x564d4d){const _0x477ae1=_0x4e6f2c;this[_0x477ae1(0x20a)][_0x477ae1(0x216)]({'action':_0x477ae1(0x249),'args':[_0x53b652,_0x54d672,_0x564d4d]});}[_0x4e6f2c(0x2b4)](_0x24fca6,_0x470682){const _0x45ac33=_0x4e6f2c;this[_0x45ac33(0x20a)][_0x45ac33(0x216)]({'action':'clearTTL','args':[_0x24fca6,_0x470682]});}[_0x4e6f2c(0x1d9)](){const _0x145b10=_0x4e6f2c;if(this[_0x145b10(0x2b1)])return;for(const _0x118f01 of this[_0x145b10(0x22c)]){try{_0x118f01();}catch{}}this[_0x145b10(0x243)]['events'][_0x145b10(0x29b)](_0x2f7fcf[_0x145b10(0x2ae)],{'id':this['id']}),this[_0x145b10(0x20a)]=[],this[_0x145b10(0x234)](),this[_0x145b10(0x2b1)]=!![];}async[_0x4e6f2c(0x2ed)](){const _0x10abcb=_0x4e6f2c;if(this[_0x10abcb(0x2b1)])throw new Error('Transaction\x20already\x20closed');const _0x15f37e={'id':this['id'],'timestamp':Date[_0x10abcb(0x2ce)](),'actions':this[_0x10abcb(0x20a)]};this[_0x10abcb(0x243)][_0x10abcb(0x201)][_0x10abcb(0x29b)](_0x2f7fcf[_0x10abcb(0x230)],_0x15f37e);try{const _0x5cc8bc=_0x310ef4[_0x10abcb(0x184)]?_0x310ef4[_0x10abcb(0x2ce)]():0x0;await this['okdb'][_0x10abcb(0x16a)][_0x10abcb(0x1bc)](()=>{const _0x2d8c65=_0x10abcb;for(const _0x1cbea5 of this[_0x2d8c65(0x20a)]){const _0x3b6325=this[_0x2d8c65(0x243)]['_'+_0x1cbea5['action']];if(typeof _0x3b6325!=='function')throw new Error(_0x2d8c65(0x1ba)+_0x1cbea5[_0x2d8c65(0x20d)]);_0x3b6325['call'](this[_0x2d8c65(0x243)],this,..._0x1cbea5[_0x2d8c65(0x1b1)]);}}),_0x310ef4[_0x10abcb(0x184)]&&_0x310ef4[_0x10abcb(0x209)](_0x10abcb(0x1e6),_0x310ef4[_0x10abcb(0x2ce)]()-_0x5cc8bc,(this[_0x10abcb(0x243)][_0x10abcb(0x215)]??'?')+_0x10abcb(0x28f)+this[_0x10abcb(0x20a)][_0x10abcb(0x28d)]);}catch(_0x189959){for(const _0x26f835 of this['_undoHooks']){try{_0x26f835();}catch{}}this[_0x10abcb(0x234)](),this[_0x10abcb(0x2b1)]=!![];if(_0x189959 instanceof _0x599905)throw _0x189959;const _0x5c0156={'cause':_0x189959,'env':this[_0x10abcb(0x243)]?.[_0x10abcb(0x215)],'envPath':this[_0x10abcb(0x243)]?.[_0x10abcb(0x202)],'pid':process['pid'],'txnId':this['id'],'actionCount':this[_0x10abcb(0x20a)]['length'],'actions':_0x195d4e(this['actions']),'nativeCode':_0x189959?.['code'],'nativeName':_0x189959?.['name']};try{this[_0x10abcb(0x243)]?.[_0x10abcb(0x18e)]?.[_0x10abcb(0x260)]?.(_0x10abcb(0x2b6),{'env':_0x5c0156[_0x10abcb(0x261)],'envPath':_0x5c0156['envPath'],'pid':_0x5c0156[_0x10abcb(0x287)],'txnId':_0x5c0156[_0x10abcb(0x2f1)],'actionCount':_0x5c0156[_0x10abcb(0x26c)],'actions':_0x5c0156[_0x10abcb(0x20a)],'nativeCode':_0x5c0156[_0x10abcb(0x22f)],'error':_0x189959?.[_0x10abcb(0x1fe)],'stack':_0x189959?.['stack']});}catch{}throw new _0x599905(_0x189959?.['message']||_0x10abcb(0x2c8),_0x10abcb(0x218),_0x5c0156);}this[_0x10abcb(0x243)][_0x10abcb(0x201)][_0x10abcb(0x29b)](_0x2f7fcf[_0x10abcb(0x241)],_0x15f37e);for(const _0x297864 of this[_0x10abcb(0x1eb)]){try{await _0x297864();}catch{}}this[_0x10abcb(0x20a)]=[],this[_0x10abcb(0x234)](),this[_0x10abcb(0x2b1)]=!![];}static[_0x4e6f2c(0x252)](_0x432931){const _0x1a5d10=_0x4e6f2c;return Object[_0x1a5d10(0x2a0)]({'id':_0x432931['id'],'put':_0x432931[_0x1a5d10(0x256)]['bind'](_0x432931),'update':_0x432931[_0x1a5d10(0x196)]['bind'](_0x432931),'patch':_0x432931[_0x1a5d10(0x2be)][_0x1a5d10(0x1d6)](_0x432931),'create':_0x432931[_0x1a5d10(0x1f2)]['bind'](_0x432931),'remove':_0x432931[_0x1a5d10(0x28b)][_0x1a5d10(0x1d6)](_0x432931),'setTTL':_0x432931[_0x1a5d10(0x249)][_0x1a5d10(0x1d6)](_0x432931),'clearTTL':_0x432931[_0x1a5d10(0x2b4)]['bind'](_0x432931),'commit':_0x432931[_0x1a5d10(0x2ed)][_0x1a5d10(0x1d6)](_0x432931),'rollback':_0x432931[_0x1a5d10(0x1d9)][_0x1a5d10(0x1d6)](_0x432931),'get':_0x432931[_0x1a5d10(0x1dd)][_0x1a5d10(0x1d6)](_0x432931),'getEntry':_0x432931[_0x1a5d10(0x22a)][_0x1a5d10(0x1d6)](_0x432931),'getMany':_0x432931['getMany']['bind'](_0x432931),'getRange':_0x432931[_0x1a5d10(0x1ea)][_0x1a5d10(0x1d6)](_0x432931),'getValues':_0x432931[_0x1a5d10(0x2a2)]['bind'](_0x432931),'getKeys':_0x432931['getKeys'][_0x1a5d10(0x1d6)](_0x432931),'byIndex':_0x432931[_0x1a5d10(0x23f)]['bind'](_0x432931),'query':_0x432931[_0x1a5d10(0x245)][_0x1a5d10(0x1d6)](_0x432931),'getClock':_0x432931[_0x1a5d10(0x2e1)][_0x1a5d10(0x1d6)](_0x432931),'getCount':_0x432931[_0x1a5d10(0x228)][_0x1a5d10(0x1d6)](_0x432931),'read':_0x432931,'raw':_0x432931});}static['applyOps'](_0x3572d0,_0x376328=[]){const _0x2409f0=_0x4e6f2c;if(!Array[_0x2409f0(0x27d)](_0x376328))throw new _0x599905('txn\x20ops\x20must\x20be\x20an\x20array','TXN_INVALID_OPS');for(const _0x43e6ab of _0x376328){if(Array['isArray'](_0x43e6ab)){const [_0x1edf25,..._0x379796]=_0x43e6ab;if(typeof _0x3572d0[_0x1edf25]!==_0x2409f0(0x1fb))throw new _0x599905(_0x2409f0(0x1ba)+_0x1edf25,'TXN_INVALID_ACTION',{'action':_0x1edf25});_0x3572d0[_0x1edf25](..._0x379796);continue;}if(!_0x43e6ab||typeof _0x43e6ab!==_0x2409f0(0x17a))throw new _0x599905(_0x2409f0(0x1c9),'TXN_INVALID_OP');const {action:_0x12dafb}=_0x43e6ab;if(typeof _0x12dafb!=='string'||typeof _0x3572d0[_0x12dafb]!==_0x2409f0(0x1fb))throw new _0x599905(_0x2409f0(0x1ba)+_0x12dafb,'TXN_INVALID_ACTION',{'action':_0x12dafb});switch(_0x12dafb){case _0x2409f0(0x256):case _0x2409f0(0x196):case _0x2409f0(0x1f2):_0x3572d0[_0x12dafb](_0x43e6ab[_0x2409f0(0x19c)],_0x43e6ab['key'],_0x43e6ab[_0x2409f0(0x238)],{..._0x43e6ab[_0x2409f0(0x283)],'ttl':_0x43e6ab[_0x2409f0(0x280)]??_0x43e6ab[_0x2409f0(0x283)]?.[_0x2409f0(0x280)]??null});break;case _0x2409f0(0x2be):_0x3572d0['patch'](_0x43e6ab[_0x2409f0(0x19c)],_0x43e6ab[_0x2409f0(0x161)],_0x43e6ab['patch'],{..._0x43e6ab['options'],'ttl':_0x43e6ab[_0x2409f0(0x280)]??_0x43e6ab[_0x2409f0(0x283)]?.['ttl']??null});break;case _0x2409f0(0x28b):_0x3572d0[_0x2409f0(0x28b)](_0x43e6ab[_0x2409f0(0x19c)],_0x43e6ab[_0x2409f0(0x161)],_0x43e6ab['options']||{});break;case _0x2409f0(0x249):_0x3572d0[_0x2409f0(0x249)](_0x43e6ab[_0x2409f0(0x19c)],_0x43e6ab[_0x2409f0(0x161)],_0x43e6ab['ttl']);break;case _0x2409f0(0x2b4):_0x3572d0[_0x2409f0(0x2b4)](_0x43e6ab['type'],_0x43e6ab[_0x2409f0(0x161)]);break;default:throw new _0x599905('Unsupported\x20transaction\x20action:\x20'+_0x12dafb,_0x2409f0(0x29d),{'action':_0x12dafb});}}}static async['run'](_0x4703be,_0x5153c2,_0x536c2e={}){const _0x16f38f=_0x4e6f2c,_0x5cfd43=new _0x3b0455(_0x4703be,_0x536c2e),_0x2cb1a1=_0x3b0455[_0x16f38f(0x252)](_0x5cfd43);try{typeof _0x5153c2===_0x16f38f(0x1fb)?await _0x5153c2(_0x2cb1a1):_0x3b0455[_0x16f38f(0x1ac)](_0x5cfd43,_0x5153c2||[]);const _0x45e335=_0x5cfd43[_0x16f38f(0x20a)]['length'];return await _0x5cfd43[_0x16f38f(0x2ed)](),{'id':_0x5cfd43['id'],'actions':_0x45e335};}catch(_0x3c09b1){try{_0x5cfd43[_0x16f38f(0x1d9)]();}catch(_0x2b1e3b){}throw _0x3c09b1;}}}return okdbTransaction=_0x3b0455,okdbTransaction;}function _0x3847(_0x5d5dc1,_0x42d982){_0x5d5dc1=_0x5d5dc1-0x161;const _0x57b427=_0x57b4();let _0x38475b=_0x57b427[_0x5d5dc1];return _0x38475b;}var okdbFunctionsFacades,hasRequiredOkdbFunctionsFacades;function requireOkdbFunctionsFacades(){if(hasRequiredOkdbFunctionsFacades)return okdbFunctionsFacades;hasRequiredOkdbFunctionsFacades=0x1;const _0x356658=requireOkdbTransaction();function _0x19d40d(_0x73bbc){const _0x47b551=_0x3847;return{'transaction':typeof _0x73bbc['transaction']===_0x47b551(0x1fb)?_0x73bbc[_0x47b551(0x1bc)][_0x47b551(0x1d6)](_0x73bbc):_0x4df197=>new _0x356658(_0x73bbc,_0x4df197),'txn':typeof _0x73bbc[_0x47b551(0x223)]===_0x47b551(0x1fb)?_0x73bbc[_0x47b551(0x223)]['bind'](_0x73bbc):(_0x2acf08,_0x5d4a3d)=>_0x356658[_0x47b551(0x20c)](_0x73bbc,_0x2acf08,_0x5d4a3d)};}function _0x4a717a(_0x50083a){const _0x5a3dfb=_0x3847;return{'name':_0x50083a[_0x5a3dfb(0x215)],..._0x19d40d(_0x50083a),'put':_0x50083a[_0x5a3dfb(0x256)]['bind'](_0x50083a),'update':_0x50083a[_0x5a3dfb(0x196)]['bind'](_0x50083a),'patch':_0x50083a[_0x5a3dfb(0x2be)][_0x5a3dfb(0x1d6)](_0x50083a),'create':_0x50083a[_0x5a3dfb(0x1f2)][_0x5a3dfb(0x1d6)](_0x50083a),'remove':_0x50083a[_0x5a3dfb(0x28b)][_0x5a3dfb(0x1d6)](_0x50083a),'get':_0x50083a[_0x5a3dfb(0x1dd)][_0x5a3dfb(0x1d6)](_0x50083a),'getMany':_0x50083a[_0x5a3dfb(0x29f)][_0x5a3dfb(0x1d6)](_0x50083a),'getEntry':_0x50083a[_0x5a3dfb(0x22a)][_0x5a3dfb(0x1d6)](_0x50083a),'getRange':_0x50083a[_0x5a3dfb(0x1ea)][_0x5a3dfb(0x1d6)](_0x50083a),'getValues':_0x50083a[_0x5a3dfb(0x2a2)]['bind'](_0x50083a),'getKeys':_0x50083a[_0x5a3dfb(0x288)][_0x5a3dfb(0x1d6)](_0x50083a),'getCount':_0x50083a['getCount'][_0x5a3dfb(0x1d6)](_0x50083a),'getByPrefix':_0x50083a[_0x5a3dfb(0x2b3)][_0x5a3dfb(0x1d6)](_0x50083a),'getIndex':_0x50083a[_0x5a3dfb(0x1e4)][_0x5a3dfb(0x1d6)](_0x50083a),'byIndex':_0x50083a[_0x5a3dfb(0x23f)][_0x5a3dfb(0x1d6)](_0x50083a),'query':_0x50083a['query'][_0x5a3dfb(0x1d6)](_0x50083a),'geoQuery':_0x50083a[_0x5a3dfb(0x247)][_0x5a3dfb(0x1d6)](_0x50083a),'ftsQuery':_0x50083a[_0x5a3dfb(0x2cb)][_0x5a3dfb(0x1d6)](_0x50083a),'setTTL':_0x50083a[_0x5a3dfb(0x249)]['bind'](_0x50083a),'getTTL':_0x50083a[_0x5a3dfb(0x1b9)]['bind'](_0x50083a),'clearTTL':_0x50083a[_0x5a3dfb(0x2b4)]['bind'](_0x50083a),'sweepExpiredTTL':_0x50083a[_0x5a3dfb(0x1c4)][_0x5a3dfb(0x1d6)](_0x50083a),'listTTL':_0x50083a[_0x5a3dfb(0x1f6)][_0x5a3dfb(0x1d6)](_0x50083a),'ttlStats':_0x50083a[_0x5a3dfb(0x281)][_0x5a3dfb(0x1d6)](_0x50083a),'setDefaultTTL':_0x50083a[_0x5a3dfb(0x2d2)][_0x5a3dfb(0x1d6)](_0x50083a),'getDefaultTTL':_0x50083a[_0x5a3dfb(0x270)][_0x5a3dfb(0x1d6)](_0x50083a),'clearDefaultTTL':_0x50083a['clearDefaultTTL'][_0x5a3dfb(0x1d6)](_0x50083a),'registerType':_0x50083a[_0x5a3dfb(0x2ee)][_0x5a3dfb(0x1d6)](_0x50083a),'ensureType':_0x50083a[_0x5a3dfb(0x208)][_0x5a3dfb(0x1d6)](_0x50083a),'hasType':_0x50083a[_0x5a3dfb(0x220)]['bind'](_0x50083a),'dropType':_0x50083a['dropType']['bind'](_0x50083a),'registerIndex':_0x50083a['registerIndex'][_0x5a3dfb(0x1d6)](_0x50083a),'hasIndex':_0x50083a[_0x5a3dfb(0x29c)][_0x5a3dfb(0x1d6)](_0x50083a),'dropIndex':_0x50083a[_0x5a3dfb(0x269)]['bind'](_0x50083a),'resetIndex':_0x50083a[_0x5a3dfb(0x2cf)]['bind'](_0x50083a),'indexReady':_0x50083a[_0x5a3dfb(0x2ad)]['bind'](_0x50083a),'getIndexStatus':_0x50083a[_0x5a3dfb(0x1f7)]['bind'](_0x50083a),'getClock':_0x50083a[_0x5a3dfb(0x2e1)][_0x5a3dfb(0x1d6)](_0x50083a),'getChanges':_0x50083a['getChanges'][_0x5a3dfb(0x1d6)](_0x50083a),'count':_0x50083a[_0x5a3dfb(0x2af)][_0x5a3dfb(0x1d6)](_0x50083a),'range':_0x50083a['range'][_0x5a3dfb(0x1d6)](_0x50083a),'now':_0x50083a[_0x5a3dfb(0x2ce)][_0x5a3dfb(0x1d6)](_0x50083a)};}function _0x386bf9(_0x14c0b3){const _0x4a1546=_0x3847;if(!_0x14c0b3)return null;const _0x38372e={};for(const _0x397e0d of[_0x4a1546(0x28c),_0x4a1546(0x199),'list','updateJob',_0x4a1546(0x1f9),'addBucket',_0x4a1546(0x1b5),'listBuckets']){if(typeof _0x14c0b3[_0x397e0d]===_0x4a1546(0x1fb))_0x38372e[_0x397e0d]=_0x14c0b3[_0x397e0d]['bind'](_0x14c0b3);}return Object[_0x4a1546(0x27b)](_0x38372e)[_0x4a1546(0x28d)]?_0x38372e:null;}function _0x4692e9(_0x55db21){const _0x241e14=_0x3847;if(!_0x55db21)return null;const _0x23500c={};for(const _0x563ca9 of[_0x241e14(0x192),'stream',_0x241e14(0x2e6),_0x241e14(0x28b),'get',_0x241e14(0x163)]){if(typeof _0x55db21[_0x563ca9]===_0x241e14(0x1fb))_0x23500c[_0x563ca9]=_0x55db21[_0x563ca9]['bind'](_0x55db21);}return Object[_0x241e14(0x27b)](_0x23500c)[_0x241e14(0x28d)]?_0x23500c:null;}function _0x29d4c2(_0x388d5d){const _0x36e717=_0x3847;return{'env':_0x388d5d[_0x36e717(0x261)][_0x36e717(0x1d6)](_0x388d5d),'createEnvironment':_0x388d5d['createEnvironment']['bind'](_0x388d5d),'removeEnvironment':_0x388d5d[_0x36e717(0x173)][_0x36e717(0x1d6)](_0x388d5d),'info':_0x388d5d[_0x36e717(0x222)],..._0x19d40d(_0x388d5d),'put':_0x388d5d[_0x36e717(0x256)][_0x36e717(0x1d6)](_0x388d5d),'update':_0x388d5d['update']['bind'](_0x388d5d),'patch':_0x388d5d[_0x36e717(0x2be)][_0x36e717(0x1d6)](_0x388d5d),'create':_0x388d5d[_0x36e717(0x1f2)][_0x36e717(0x1d6)](_0x388d5d),'remove':_0x388d5d['remove'][_0x36e717(0x1d6)](_0x388d5d),'get':_0x388d5d['get']['bind'](_0x388d5d),'getMany':_0x388d5d[_0x36e717(0x29f)][_0x36e717(0x1d6)](_0x388d5d),'getEntry':_0x388d5d[_0x36e717(0x22a)]['bind'](_0x388d5d),'getRange':_0x388d5d[_0x36e717(0x1ea)][_0x36e717(0x1d6)](_0x388d5d),'getValues':_0x388d5d[_0x36e717(0x2a2)]['bind'](_0x388d5d),'getKeys':_0x388d5d[_0x36e717(0x288)]['bind'](_0x388d5d),'getCount':_0x388d5d[_0x36e717(0x228)]['bind'](_0x388d5d),'getByPrefix':_0x388d5d[_0x36e717(0x2b3)][_0x36e717(0x1d6)](_0x388d5d),'getIndex':_0x388d5d[_0x36e717(0x1e4)][_0x36e717(0x1d6)](_0x388d5d),'byIndex':_0x388d5d[_0x36e717(0x23f)][_0x36e717(0x1d6)](_0x388d5d),'query':_0x388d5d[_0x36e717(0x245)][_0x36e717(0x1d6)](_0x388d5d),'setTTL':_0x388d5d[_0x36e717(0x249)][_0x36e717(0x1d6)](_0x388d5d),'getTTL':_0x388d5d[_0x36e717(0x1b9)][_0x36e717(0x1d6)](_0x388d5d),'clearTTL':_0x388d5d['clearTTL'][_0x36e717(0x1d6)](_0x388d5d),'sweepExpiredTTL':_0x388d5d[_0x36e717(0x1c4)][_0x36e717(0x1d6)](_0x388d5d),'listTTL':_0x388d5d[_0x36e717(0x1f6)][_0x36e717(0x1d6)](_0x388d5d),'ttlStats':_0x388d5d[_0x36e717(0x281)][_0x36e717(0x1d6)](_0x388d5d),'setDefaultTTL':_0x388d5d[_0x36e717(0x2d2)][_0x36e717(0x1d6)](_0x388d5d),'getDefaultTTL':_0x388d5d[_0x36e717(0x270)][_0x36e717(0x1d6)](_0x388d5d),'clearDefaultTTL':_0x388d5d[_0x36e717(0x181)]['bind'](_0x388d5d),'ensureType':_0x388d5d['ensureType']['bind'](_0x388d5d),'registerType':_0x388d5d[_0x36e717(0x2ee)][_0x36e717(0x1d6)](_0x388d5d),'hasType':_0x388d5d[_0x36e717(0x220)]['bind'](_0x388d5d),'dropType':_0x388d5d[_0x36e717(0x2ba)]['bind'](_0x388d5d),'registerIndex':_0x388d5d[_0x36e717(0x1b0)][_0x36e717(0x1d6)](_0x388d5d),'hasIndex':_0x388d5d[_0x36e717(0x29c)][_0x36e717(0x1d6)](_0x388d5d),'dropIndex':_0x388d5d[_0x36e717(0x269)]['bind'](_0x388d5d),'resetIndex':_0x388d5d['resetIndex'][_0x36e717(0x1d6)](_0x388d5d),'indexReady':_0x388d5d['indexReady'][_0x36e717(0x1d6)](_0x388d5d),'getIndexStatus':_0x388d5d[_0x36e717(0x1f7)]['bind'](_0x388d5d),'getClock':_0x388d5d['getClock'][_0x36e717(0x1d6)](_0x388d5d),'getChanges':_0x388d5d['getChanges'][_0x36e717(0x1d6)](_0x388d5d),'queue':_0x388d5d[_0x36e717(0x21a)],'files':_0x388d5d[_0x36e717(0x2de)]};}return okdbFunctionsFacades={'createEnvFacade':_0x4a717a,'createQueueFacade':_0x386bf9,'createFilesFacade':_0x4692e9,'createGlobalFacade':_0x29d4c2},okdbFunctionsFacades;}var okdbFunctionsDryrun,hasRequiredOkdbFunctionsDryrun;function requireOkdbFunctionsDryrun(){const _0x49481a=_0x212165;if(hasRequiredOkdbFunctionsDryrun)return okdbFunctionsDryrun;hasRequiredOkdbFunctionsDryrun=0x1;const _0x40ec3e=new Set([_0x49481a(0x256),_0x49481a(0x2be),'create',_0x49481a(0x28b),_0x49481a(0x196),'setTTL',_0x49481a(0x2b4),_0x49481a(0x1c4),_0x49481a(0x2d2),'clearDefaultTTL',_0x49481a(0x2ba),_0x49481a(0x269),_0x49481a(0x2cf)]),_0x45079b=new Set([_0x49481a(0x28c),_0x49481a(0x17f),'removeJob',_0x49481a(0x21f)]),_0x120e1a=new Set([_0x49481a(0x192),_0x49481a(0x28b)]);function _0x545613(_0x48d7b1,_0x5a8cff){const _0x51b8fe=_0x49481a;if(_0x48d7b1===_0x51b8fe(0x261)||_0x48d7b1===_0x51b8fe(0x23d))return _0x40ec3e['has'](_0x5a8cff);if(_0x48d7b1===_0x51b8fe(0x21a))return _0x45079b[_0x51b8fe(0x16b)](_0x5a8cff);if(_0x48d7b1===_0x51b8fe(0x2de))return _0x120e1a['has'](_0x5a8cff);return![];}function _0x420bce(_0x5be1e4,_0x47899e,_0x15654c,_0x3932ec){if(!_0x5be1e4)return _0x5be1e4;return new Proxy(_0x5be1e4,{'get'(_0x1ec20a,_0xe4791f,_0x581eb5){const _0x460cdc=_0x3847,_0x5c2321=Reflect[_0x460cdc(0x1dd)](_0x1ec20a,_0xe4791f,_0x581eb5);if(typeof _0x5c2321!==_0x460cdc(0x1fb))return _0x5c2321;if(!_0x545613(_0x47899e,_0xe4791f))return _0x5c2321[_0x460cdc(0x1d6)](_0x1ec20a);return function(..._0x96d7b){const _0xa367c3=_0x460cdc;return _0x3932ec[_0xa367c3(0x216)]({'scope':_0x47899e,'method':_0xe4791f,'envName':_0x15654c,'args':_0x96d7b}),null;};}});}function _0x3fb918(_0x56c02a,_0xe75abf,_0x34fa94,_0x5f10e4){const _0x3a3d37={};for(const _0x56e0cb of _0x34fa94){_0x3a3d37[_0x56e0cb]=(..._0x1b6bc9)=>{const _0x42c988=_0x3847;return _0x545613(_0x56c02a,_0x56e0cb)&&_0x5f10e4[_0x42c988(0x216)]({'scope':_0x56c02a,'method':_0x56e0cb,'envName':_0xe75abf,'args':_0x1b6bc9}),null;};}return _0x3a3d37;}return okdbFunctionsDryrun={'isWriteMethod':_0x545613,'wrapForDryRun':_0x420bce,'syntheticDryRunFacade':_0x3fb918,'ENV_WRITE_METHODS':_0x40ec3e,'QUEUE_WRITE_METHODS':_0x45079b,'FILES_WRITE_METHODS':_0x120e1a},okdbFunctionsDryrun;}var okdbFunctionsContext,hasRequiredOkdbFunctionsContext;function requireOkdbFunctionsContext(){const _0x463d07=_0x212165;if(hasRequiredOkdbFunctionsContext)return okdbFunctionsContext;hasRequiredOkdbFunctionsContext=0x1;const {createEnvFacade:_0x1423fa,createQueueFacade:_0x21b828,createFilesFacade:_0x507bdb,createGlobalFacade:_0xb62443}=requireOkdbFunctionsFacades(),{wrapForDryRun:_0xebeec6,syntheticDryRunFacade:_0x539ad9}=requireOkdbFunctionsDryrun(),_0x2c2c75=[_0x463d07(0x28c),_0x463d07(0x199),_0x463d07(0x2d0),_0x463d07(0x17f),_0x463d07(0x1f9),'addBucket','getBucket',_0x463d07(0x2e3)],_0x24e0c3=[_0x463d07(0x192),_0x463d07(0x2d7),_0x463d07(0x2e6),'remove',_0x463d07(0x1dd),_0x463d07(0x163)];function _0x4aac7b(_0x4cdeba,_0xd30580){const _0x242ed5=_0x463d07,_0x56ca3f=(_0x36dddd,_0x13d0b1,_0xc9a4a5)=>_0xd30580({'type':_0x242ed5(0x18e),'requestId':_0x4cdeba[_0x242ed5(0x1ef)],'runId':_0x4cdeba[_0x242ed5(0x206)],'entry':{'level':_0x36dddd,'msg':_0x13d0b1,'context':_0xc9a4a5,'ts':Date['now']()}}),_0x538345=(_0x938557,_0x2159f6)=>_0x56ca3f(_0x242ed5(0x222),_0x938557,_0x2159f6);return _0x538345[_0x242ed5(0x222)]=(_0x5b33a6,_0x566cb3)=>_0x56ca3f('info',_0x5b33a6,_0x566cb3),_0x538345[_0x242ed5(0x2c0)]=(_0x1fbd1e,_0x568554)=>_0x56ca3f('warn',_0x1fbd1e,_0x568554),_0x538345[_0x242ed5(0x260)]=(_0x8e8fed,_0x2af024)=>_0x56ca3f(_0x242ed5(0x260),_0x8e8fed,_0x2af024),_0x538345['debug']=(_0x136e52,_0x4f5954)=>_0x56ca3f(_0x242ed5(0x1d8),_0x136e52,_0x4f5954),_0x538345;}function _0x1d3ee3(_0x5923a5,_0xa98834,_0x229756){const _0x3a2d30=_0x463d07;if(!_0x5923a5)return null;return{'id':_0x5923a5['id']??null,'type':_0x5923a5[_0x3a2d30(0x19c)]??null,'tries':_0x5923a5[_0x3a2d30(0x242)]??null,'created':_0x5923a5[_0x3a2d30(0x188)]??null,'tags':_0x5923a5[_0x3a2d30(0x27c)]??null,'priority':_0x5923a5['priority']??null,'bucket':_0x5923a5[_0x3a2d30(0x275)]??null,'cron':_0x5923a5[_0x3a2d30(0x26d)]??null,'heartbeat'(){const _0x423a67=_0x3a2d30;_0x229756({'type':_0x423a67(0x19e),'requestId':_0xa98834[_0x423a67(0x1ef)],'runId':_0xa98834[_0x423a67(0x206)],'jobId':_0x5923a5['id'],'claimId':_0x5923a5[_0x423a67(0x1c2)]});},'markProgress'(_0x558aab){const _0xf25b6f=_0x3a2d30;_0x229756({'type':_0xf25b6f(0x1ab),'requestId':_0xa98834['requestId'],'runId':_0xa98834[_0xf25b6f(0x206)],'jobId':_0x5923a5['id'],'claimId':_0x5923a5[_0xf25b6f(0x1c2)],'message':_0x558aab});}};}function _0x1876d0(_0x1d85f0){const _0x3bccea=_0x463d07;if(!_0x1d85f0)return null;return{'mode':_0x1d85f0[_0x3bccea(0x176)]??null,'sourceType':_0x1d85f0[_0x3bccea(0x24f)]??null,'sourceEnv':_0x1d85f0[_0x3bccea(0x1dc)]??null,'processor':_0x1d85f0['processor']??null,'engineKey':_0x1d85f0[_0x3bccea(0x297)]??null,'cursorKey':_0x1d85f0['cursorKey']??null};}function _0x177944(_0x5624b4){const _0x282f2c=_0x463d07;if(!_0x5624b4)return null;return{'mode':_0x5624b4['mode']??null,'sourceType':_0x5624b4[_0x282f2c(0x24f)]??null,'targetType':_0x5624b4['targetType']??null,'sourceEnv':_0x5624b4[_0x282f2c(0x1dc)]??null,'targetEnv':_0x5624b4[_0x282f2c(0x225)]??null,'engineKey':_0x5624b4[_0x282f2c(0x297)]??null,'cursorKey':_0x5624b4[_0x282f2c(0x240)]??null};}function _0x2fcbf4(_0x4bd711,_0x324732,_0x3d4314,_0x2eba85=null,_0x5d64dc=null){const _0xf3444e=_0x463d07,_0x57f238={'runId':_0x324732['runId'],'scope':_0xf3444e(0x261),'env':_0x324732[_0xf3444e(0x2d1)]??null,'functionName':_0x324732[_0xf3444e(0x1b7)],'trigger':_0x324732['info']?.[_0xf3444e(0x26f)]??_0xf3444e(0x17e),'requestedAt':_0x324732[_0xf3444e(0x222)]?.['requestedAt']??Date[_0xf3444e(0x2ce)]()},_0x1364ca=_0x4aac7b(_0x324732,_0x3d4314),_0x2bb705=AbortSignal[_0xf3444e(0x1cf)](Math['max'](0x1,_0x324732[_0xf3444e(0x183)]?.[_0xf3444e(0x292)]??0x3e8)),_0x55210a=_0x5d64dc?AbortSignal[_0xf3444e(0x1df)]([_0x2bb705,_0x5d64dc]):_0x2bb705,_0x1d6cf3=_0x4bd711[_0xf3444e(0x261)](_0x324732[_0xf3444e(0x2d1)]),_0xa6f75=_0x2eba85?_0xebeec6(_0x1d6cf3,'env',_0x324732[_0xf3444e(0x2d1)],_0x2eba85):_0x1d6cf3,_0x192164=_0x2eba85?_0x1d6cf3[_0xf3444e(0x21a)]?_0xebeec6(_0x1d6cf3[_0xf3444e(0x21a)],'queue',_0x324732[_0xf3444e(0x2d1)],_0x2eba85):_0x539ad9(_0xf3444e(0x21a),_0x324732[_0xf3444e(0x2d1)],_0x2c2c75,_0x2eba85):_0x1d6cf3[_0xf3444e(0x21a)],_0x2f8020=_0x2eba85?_0x1d6cf3[_0xf3444e(0x2de)]?_0xebeec6(_0x1d6cf3['files'],_0xf3444e(0x2de),_0x324732[_0xf3444e(0x2d1)],_0x2eba85):_0x539ad9('files',_0x324732[_0xf3444e(0x2d1)],_0x24e0c3,_0x2eba85):_0x1d6cf3[_0xf3444e(0x2de)],_0xcb2d2b=_0x1423fa(_0xa6f75),_0x1e5d43=_0x21b828(_0x192164),_0x24f432=_0x507bdb(_0x2f8020);if(_0x1e5d43)_0xcb2d2b[_0xf3444e(0x21a)]=_0x1e5d43;if(_0x24f432)_0xcb2d2b['files']=_0x24f432;const _0x1ef647={'payload':_0x324732['payload']??null,'info':_0x57f238,'signal':_0x55210a,'log':_0x1364ca,'env':_0xcb2d2b},_0x3d83e0=_0x1d3ee3(_0x324732['jobContext'],_0x324732,_0x3d4314);if(_0x3d83e0)_0x1ef647['job']=_0x3d83e0;const _0x16555b=_0x1876d0(_0x324732[_0xf3444e(0x25a)]);if(_0x16555b)_0x1ef647[_0xf3444e(0x1f1)]=_0x16555b;const _0x2b794a=_0x177944(_0x324732[_0xf3444e(0x189)]);if(_0x2b794a)_0x1ef647[_0xf3444e(0x165)]=_0x2b794a;if(_0x324732['unsafe']){const _0x1d4174=_0x2eba85?_0xebeec6(_0x4bd711,_0xf3444e(0x23d),null,_0x2eba85):_0x4bd711;_0x1ef647[_0xf3444e(0x243)]=_0xb62443(_0x1d4174);}return _0x1ef647;}return okdbFunctionsContext={'createExecutionContext':_0x2fcbf4,'createScriptLogger':_0x4aac7b},okdbFunctionsContext;}var hasRequiredOkdbFunctionsSandboxWorker;function requireOkdbFunctionsSandboxWorker(){const _0x444864=_0x212165;if(hasRequiredOkdbFunctionsSandboxWorker)return okdbFunctionsSandboxWorker$1;hasRequiredOkdbFunctionsSandboxWorker=0x1;const {parentPort:_0x1f2785,workerData:_0x4c8f1a}=require$$0$4;requireOkdbFatalReport()[_0x444864(0x26b)]('sandbox');const _0x1d3097=require$$2,{compileFunctionExpression:_0x16f155}=requireOkdbFunctionsSandbox(),{serializeError:_0x1e14e4}=requireOkdbFunctionsIpc(),{createExecutionContext:_0x276d5d}=requireOkdbFunctionsContext(),_0x103df9=require$$6;let _0x3583c2=null,_0x359fe5=![];const _0x171de8=new Map(),_0x3ba0d0=new Map();function _0x32f46f(_0x257182){const _0x5aaf10=_0x444864;try{_0x1f2785[_0x5aaf10(0x1d2)](_0x257182);}catch{}}function _0x5dafbc(_0x479652){const _0x5b1ad2=_0x444864,_0x16eafc=(_0x479652['envName']||_0x5b1ad2(0x284))+':'+_0x479652[_0x5b1ad2(0x1b7)]+':'+_0x479652[_0x5b1ad2(0x1f3)]+':'+_0x479652[_0x5b1ad2(0x19a)];let _0x30d2b9=_0x171de8[_0x5b1ad2(0x1dd)](_0x16eafc);return!_0x30d2b9&&(_0x30d2b9=_0x16f155(_0x479652[_0x5b1ad2(0x20e)],{'allowFetch':_0x479652[_0x5b1ad2(0x183)]?.[_0x5b1ad2(0x18d)]!==![],'allowedFetchDomains':_0x479652['runtime']?.[_0x5b1ad2(0x2b5)],'filename':_0x479652[_0x5b1ad2(0x1b7)]+_0x5b1ad2(0x171)}),_0x171de8[_0x5b1ad2(0x2d9)](_0x16eafc,_0x30d2b9)),_0x30d2b9;}async function _0x2fd611(_0xfd2835){const _0x19e29c=_0x444864,_0x22ab2a=Date[_0x19e29c(0x2ce)](),_0x502364=new AbortController();_0x3ba0d0['set'](_0xfd2835[_0x19e29c(0x1ef)],_0x502364);try{const _0x2ce098=_0x5dafbc(_0xfd2835);if(_0xfd2835[_0x19e29c(0x2d1)])await _0x3583c2['openEnv'](_0xfd2835[_0x19e29c(0x2d1)]);const _0x151f49=_0xfd2835['dryRun']?[]:null,_0xa5e52b=_0x276d5d(_0x3583c2,_0xfd2835,_0x32f46f,_0x151f49,_0x502364[_0x19e29c(0x1e1)]),_0x2f188f=await _0x2ce098(_0xa5e52b),_0x47428e={'type':_0x19e29c(0x1ae),'requestId':_0xfd2835[_0x19e29c(0x1ef)],'runId':_0xfd2835[_0x19e29c(0x206)],'result':_0x2f188f,'meta':{'runnerId':'sandbox-'+process[_0x19e29c(0x287)],'startedAt':_0x22ab2a,'finishedAt':Date['now'](),'durationMs':Date[_0x19e29c(0x2ce)]()-_0x22ab2a}};if(_0x151f49)_0x47428e['dryRunActions']=_0x151f49;_0x32f46f(_0x47428e);}catch(_0x1994c7){_0x32f46f({'type':'error','requestId':_0xfd2835['requestId'],'runId':_0xfd2835[_0x19e29c(0x206)],'error':_0x1e14e4(_0x1994c7),'meta':{'runnerId':_0x19e29c(0x1ff)+process['pid'],'startedAt':_0x22ab2a,'finishedAt':Date[_0x19e29c(0x2ce)](),'durationMs':Date[_0x19e29c(0x2ce)]()-_0x22ab2a}});}finally{_0x3ba0d0[_0x19e29c(0x25e)](_0xfd2835['requestId']);}}async function _0x4eb32c(){const _0x44e8c2=_0x444864;if(_0x359fe5)return;_0x359fe5=!![];try{await _0x3583c2?.[_0x44e8c2(0x264)]?.();}catch{}process[_0x44e8c2(0x172)](0x0);}async function _0x115647(){const _0x18b372=_0x444864,{rootPath:_0x4a9dfe}=_0x4c8f1a??{};if(!_0x4a9dfe)throw new Error('sandbox\x20worker:\x20rootPath\x20missing\x20from\x20workerData');_0x3583c2=new _0x103df9(_0x4a9dfe,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]},'processes':![]}),await _0x3583c2['open']();const _0x31aafc=setInterval(()=>{if(_0x359fe5)return;for(const [,_0x1985d6]of _0x3583c2['_envs']){try{_0x1985d6['_drainHandler']?.();}catch{}}},0xc8);if(typeof _0x31aafc['unref']===_0x18b372(0x1fb))_0x31aafc['unref']();_0x1f2785['on'](_0x18b372(0x1fe),_0x27cfc0=>{const _0x2f5d33=_0x18b372;if(!_0x27cfc0||typeof _0x27cfc0!=='object')return;if(_0x27cfc0[_0x2f5d33(0x19c)]==='stop')return void _0x4eb32c();if(_0x27cfc0['type']===_0x2f5d33(0x1db)){_0x3ba0d0['get'](_0x27cfc0['requestId'])?.['abort'](new Error(_0x2f5d33(0x19f)));return;}_0x27cfc0[_0x2f5d33(0x19c)]===_0x2f5d33(0x20c)&&void _0x2fd611(_0x27cfc0['job']);});const _0x17135e=Math[_0x18b372(0x25c)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x488502=setInterval(()=>{const _0x3bc012=_0x18b372;try{_0x32f46f({'type':_0x3bc012(0x20b),'heapUsed':_0x1d3097[_0x3bc012(0x2bb)]()[_0x3bc012(0x23e)]});}catch{}},_0x17135e);if(typeof _0x488502[_0x18b372(0x194)]==='function')_0x488502[_0x18b372(0x194)]();_0x32f46f({'type':_0x18b372(0x226)});}return _0x115647()[_0x444864(0x203)](_0x90e149=>{const _0x53cd3f=_0x444864;_0x32f46f({'type':_0x53cd3f(0x18a),'error':_0x1e14e4(_0x90e149)}),process['exit'](0x1);}),okdbFunctionsSandboxWorker$1;}var okdbFunctionsSandboxWorkerExports=requireOkdbFunctionsSandboxWorker(),okdbFunctionsSandboxWorker=getDefaultExportFromCjs(okdbFunctionsSandboxWorkerExports);module[_0x212165(0x213)]=okdbFunctionsSandboxWorker;
1
+ 'use strict';const _0x2928d4=_0x2c44;(function(_0x522074,_0x3f816f){const _0x4bdca6=_0x2c44,_0x5db100=_0x522074();while(!![]){try{const _0x4db31b=parseInt(_0x4bdca6(0x34e))/0x1*(-parseInt(_0x4bdca6(0x1e3))/0x2)+parseInt(_0x4bdca6(0x2f8))/0x3+-parseInt(_0x4bdca6(0x20b))/0x4*(parseInt(_0x4bdca6(0x2d3))/0x5)+parseInt(_0x4bdca6(0x1e9))/0x6*(-parseInt(_0x4bdca6(0x2bb))/0x7)+parseInt(_0x4bdca6(0x2e7))/0x8+-parseInt(_0x4bdca6(0x339))/0x9+parseInt(_0x4bdca6(0x2b2))/0xa;if(_0x4db31b===_0x3f816f)break;else _0x5db100['push'](_0x5db100['shift']());}catch(_0x2a3bd6){_0x5db100['push'](_0x5db100['shift']());}}}(_0x21d6,0x50f57));var require$$0$4=require(_0x2928d4(0x24b)),require$$2=require('v8'),require$$0=require(_0x2928d4(0x281)),require$$0$3=require(_0x2928d4(0x2cf)),require$$0$1=require(_0x2928d4(0x211)),require$$0$2=require(_0x2928d4(0x309)),require$$6=require(_0x2928d4(0x22b));function getDefaultExportFromCjs(_0x5c3114){const _0x14ab2a=_0x2928d4;return _0x5c3114&&_0x5c3114[_0x14ab2a(0x1c4)]&&Object[_0x14ab2a(0x30c)]['hasOwnProperty']['call'](_0x5c3114,_0x14ab2a(0x34d))?_0x5c3114['default']:_0x5c3114;}function _0x21d6(){const _0x4b5f7b=[':\x20expected\x20','_writer','directory','sandbox',']\x20already\x20maps\x20to\x20\x27','log','getDefaultTTL','error','transaction\x20commit\x20failed','isFinite','stderr','envName','TXN_ERROR','key','details','OKDBInvalidValueError','now','system:type_drop','getIndex','addBucket','engineKey','rollback','lastTxnId','function','cursorKey','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','waiting','getValues','offWindow','length','slice','Unknown\x20OKDB\x20transaction\x20error','fetch\x20blocked:\x20hostname\x20\x22','14561680PtjQsD','runId','SIGSEGV','pinned\x20range\x20iterator\x20parked\x20across\x20an\x20await/turn\x20boundary\x20and\x20the\x20env\x20was\x20written\x20','errors','reportOnSignal','Cannot\x20set\x20enforce\x20schema\x20on\x20','close','started','46249OddzRb','path','dropIndex','env','_started','script','_doHooks','sourceEnv','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','_buckets','index:drop','sort','platform','_readViewExpired','~system','INVALID_VALUE','getHeapStatistics','removeJob','captureStackTrace','\x27,\x20cannot\x20map\x20to\x20\x27','uuid','INVALID_INDEX_KEY','dropSchema','fieldPath','2062405hZbOeo','Cannot\x20delete\x20','setTtl','references','UNIQUE_CONSTRAINT','system:ready','\x20already\x20exists','string','hasIndex','readTransaction','concat','max','unique:violation','\x27\x20doesn\x27t\x20exist','FOREIGN_KEY_VIOLATION','stop','loop-lag','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','info','system:bus_state_change','1885888XjEiAw','ALREADY_EXISTS','dropType','enable','value','fatal','claimId','getIndexStatus','registerIndex','_undoHooks','sync:apply','reduce','onWindow','envPath','released\x20at\x20the\x20first\x20await/turn\x20boundary.\x20Consume\x20ranges\x20before\x20any\x20await,\x20or\x20','okdb','has','1363170GwhuAB','ready','bus:proc','OKDBAlreadyExistsError','license:invalid','SKIP','delete','useReadTransaction\x20range\x20consumed\x20after\x20the\x20creation\x20turn\x20—\x20the\x20consistent\x20view\x20was\x20','\x27:\x20','ttl:clear','useReadTransaction','byIndex','sdk','resetting','bind','toFixed','registerFts','node:perf_hooks','emit',':txnRange','prototype','targetType','debug','warn','_admissionTimer','set','Function\x20script\x20failed\x20to\x20compile','commit','READER_HELD_ACROSS_AWAIT','createWriteFacade','shift','runtime','iterator','FUNCTION_SCRIPT_INVALID_SHAPE','OKDBInvalidIndexKeyError','_windowCbs','excludeEnv','done','getByPrefix','license:activated','listPath','\x20documents\x20fail\x20validation','OKDBSchemaValidationError','type:drop','getEntry','priority','setSchema','txnId','_closed','_log','upload','bus:env_release','mode','getTTL','mean','report','version','code','system:env_release','stats','unique:violation_resolved','forEach','SCHEMA_VALIDATION_FAILED','item:pending','isArray','4176333iRrbGj','fts:reset','Function\x20script\x20must\x20evaluate\x20to\x20a\x20callable\x20function','before\x20any\x20await\x20—\x20or\x20opt\x20into\x20useReadTransaction:\x27tolerant\x27\x20to\x20keep\x20reading\x20while\x20','OKDBUniqueConstraintError','mkdirSync','_timer','\x20which\x20does\x20not\x20exist','Invalid\x20primary\x20key\x20type:\x20','functionName','_admissionStarted','OKDBForeignKeyDeleteError','getChanges','last','getClock','OKDBTypeAlreadyRegisteredError','FOREIGN_KEY_DELETE_RESTRICTED','fts:drop','sourceType','listBuckets','default','90840DaMGwH',':\x20key\x20[','targetEnv','okdb-function-sandbox','(no\x20unambiguous\x20bookmark)\x20—\x20consume\x20it\x20in\x20one\x20synchronous\x20block:\x20materialize\x20(e.g.\x20','\x22\x20on\x20\x22','\x27\x20on\x20type\x20\x27','TXN_CLOSED','clear','type:registered','name','Invalid\x20index\x20key\x20type\x20for\x20\x27',':useReadTransaction','stream','requestId','exit','_startAdmission','cancelled\x20by\x20caller','_txnIdAtSnapshot','applyOps','dryRunActions','push','system:drain','then','__esModule','createContext','clearTTL','OKDBTypeNotRegisteredError','options','ttlStats','reset','abort','getMany','next','trigger','stack','ttl:expired','from','Index\x20\x22','Unknown\x20custom\x20function\x20error','filename','object','cron','enqueue','getBucket','start',',\x20got\x20','hash','fetch\x20blocked:\x20invalid\x20URL','getKeys','\x20actions=','cancel','byLabel','timeout','maxExtra','8WIGDqi','halted','fetch\x20is\x20not\x20allowed\x20in\x20this\x20function\x20sandbox\x20(no\x20allowedFetchDomains\x20configured)','true','materializer','TXN_START','522zZMgQf','list','\x20│\x20','INVALID_PRIMARY_KEY','Type\x20\x27','allowedFetchDomains','OKDBIndexNotRegisteredError','loop-lag\x20','freeze','query','allowFetch','_drainHandler','count','\x22\x20is\x20not\x20in\x20the\x20allowedFetchDomains\x20list','nativeCode','message','getJob','job_progress','meanwhile\x20—\x20the\x20frozen\x20view\x20cannot\x20be\x20kept.\x20Materialize\x20synchronously\x20(e.g.\x20Array.from)\x20','registerType','payload','targetKey','Index\x20\x27','OKDBSchemaCollectionError','OKDBNotFoundError','toJSON','args','FETCH_NOT_ALLOWED','win32','add','Transaction\x20already\x20closed','processor','index:registered','listTTL','4bWDEDY','events','Script','index:progress','.okdb-function.js','write','lmdb','DONE','mapError','onDo','TXN_INVALID_OPS','item:remove','stopping','patch','_report','txn:end','total','bucket','stringify','system:poke','jobContext','OKDBError','OKDBIndexHasConsumersError','reportOnFatalError','sweepExpiredTTL','txn:rollback','label','requestedAt','action','keys','postMessage','disable','./okdb','stopped','dryRun','hasType','\x27\x20is\x20already\x20registered','ttl','item:create','timeoutMs','update','removeEnvironment','env:opened','queue','ms\x20mean=','_closeReadTransaction','note','\x22\x20is\x20used\x20by:\x20','clearTtl','openEnv','exports','bus:type_drop','dropping','return','pid','map','processorContext','hostname','OKDBForeignKeyError','runInContext','open','system:clock_change','_range','_assertOpen','worker_threads','reject','put','no\x20write\x20has\x20landed.\x20Writes/commit\x20are\x20unaffected.','txn','Array.from)\x20before\x20any\x20await.','ms\x20p99=','range','failures','get','clearDefaultTTL','updateJob','getCount','FUNCTION_SCRIPT_COMPILE_FAILED','tolerant','Unknown\x20transaction\x20action:\x20','size','before\x20any\x20await,\x20chunk\x20with\x20{limit,\x20start,\x20exclusiveStart},\x20or\x20drop\x20snapshot:true.','setTTL','\x20references\x20','created','Foreign\x20key\x20violation:\x20','license:removed','txn:start','actions','any','resetIndex','cause','result','enabled','materializerContext','creating','\x27\x20already\x20registered','TXN_INVALID_ACTION','view:progress','getRange','\x20does\x20not\x20exist','files','fetch','license:added','type','txn-commit','asArray','ms/','global','run','sandbox-','Unsupported\x20transaction\x20action:\x20','useReadTransaction\x20read\x20view\x20expired:\x20the\x20snapshot\x20was\x20released\x20at\x20the\x20first\x20await/turn\x20','signal','sandbox\x20worker:\x20rootPath\x20missing\x20from\x20workerData','item:update','INDEX_NOT_REGISTERED','enableFatalReport','node:vm','ensureType','remove','create','VERSION_MISMATCH','unref','starting','tags','getStats','txn\x20ops\x20must\x20be\x20an\x20array','transaction','maxMs','percentile','kind','sourceKey','join'];_0x21d6=function(){return _0x4b5f7b;};return _0x21d6();}var okdbFunctionsSandboxWorker$1={},okdbFatalReport,hasRequiredOkdbFatalReport;function requireOkdbFatalReport(){if(hasRequiredOkdbFatalReport)return okdbFatalReport;hasRequiredOkdbFatalReport=0x1;function _0x4b9df1(_0x384456){const _0x4f1dd1=_0x2c44;if(process.env.OKDB_FATAL_REPORT!=='1')return;try{if(!process[_0x4f1dd1(0x32f)])return;process[_0x4f1dd1(0x32f)][_0x4f1dd1(0x222)]=!![];try{if(_0x4f1dd1(0x31c)in process['report'])process['report']['excludeEnv']=process.env.OKDB_FATAL_REPORT_ENV!=='1';}catch{}if(process[_0x4f1dd1(0x2c7)]!==_0x4f1dd1(0x205))try{process[_0x4f1dd1(0x32f)][_0x4f1dd1(0x2b7)]=!![];if(typeof process[_0x4f1dd1(0x32f)][_0x4f1dd1(0x27c)]==='string')process[_0x4f1dd1(0x32f)]['signal']=_0x4f1dd1(0x2b4);}catch{}if(process.env.OKDB_REPORT_DIR)try{require('fs')[_0x4f1dd1(0x33e)](process.env.OKDB_REPORT_DIR,{'recursive':!![]}),process[_0x4f1dd1(0x32f)][_0x4f1dd1(0x293)]=process.env.OKDB_REPORT_DIR;}catch{}try{process[_0x4f1dd1(0x32f)]['filename']='';}catch{}if(_0x384456)process.env.OKDB_REPORT_TAG=String(_0x384456);}catch{}}return okdbFatalReport={'enableFatalReport':_0x4b9df1},okdbFatalReport;}var okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function requireOkdbFunctionsSandbox(){if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0x596ce2=require$$0;function _0x460a8b(_0x1f2a22){const _0x48b90f=_0x2c44,_0x5a505e=_0x1f2a22==='*',_0x4ef194=_0x5a505e?null:new Set(Array[_0x48b90f(0x338)](_0x1f2a22)?_0x1f2a22:[]);return function _0x5e72be(_0x28fd29,_0x23d7db){const _0x7fe47f=_0x48b90f;if(!_0x5a505e){let _0x4458ae;try{const _0x325496=new URL(typeof _0x28fd29===_0x7fe47f(0x2da)?_0x28fd29:_0x28fd29?.['url']??String(_0x28fd29));_0x4458ae=_0x325496[_0x7fe47f(0x244)];}catch{const _0x1ecceb=new Error(_0x7fe47f(0x1dc));return _0x1ecceb[_0x7fe47f(0x331)]=_0x7fe47f(0x204),Promise[_0x7fe47f(0x24c)](_0x1ecceb);}if(!_0x4ef194[_0x7fe47f(0x2f7)](_0x4458ae)){const _0x696c44=new Error(_0x4ef194[_0x7fe47f(0x25b)]===0x0?_0x7fe47f(0x1e5):_0x7fe47f(0x2b1)+_0x4458ae+_0x7fe47f(0x1f6));return _0x696c44[_0x7fe47f(0x331)]=_0x7fe47f(0x204),Promise['reject'](_0x696c44);}}return fetch(_0x28fd29,_0x23d7db);};}function _0x23d68c(_0x3121d0={}){const _0x18b735=_0x2c44,_0x59fbce=_0x3121d0['allowFetch']!==![],_0x2f4fd3=_0x3121d0[_0x18b735(0x1ee)]??[],_0x209e1a={'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,'setTimeout':setTimeout,'clearTimeout':clearTimeout,'setInterval':setInterval,'clearInterval':clearInterval,'queueMicrotask':queueMicrotask,'structuredClone':structuredClone,'crypto':globalThis['crypto']};return _0x59fbce&&typeof fetch===_0x18b735(0x2a8)&&(_0x209e1a[_0x18b735(0x271)]=_0x460a8b(_0x2f4fd3)),_0x209e1a['globalThis']=_0x209e1a,_0x209e1a;}const _0x333d55=0x3e8;function _0x1e94f7(_0x4edf0e){const _0x4efbe4=_0x2c44,_0x27d761=Number(_0x4edf0e['compileTimeoutMs']);if(Number[_0x4efbe4(0x29a)](_0x27d761)&&_0x27d761>0x0)return _0x27d761;const _0x19b2fc=Number(process.env.OKDB_FN_COMPILE_TIMEOUT_MS);if(Number[_0x4efbe4(0x29a)](_0x19b2fc)&&_0x19b2fc>0x0)return _0x19b2fc;return _0x333d55;}function _0x525a14(_0x19efb0,_0x3b7706={}){const _0xce8ec6=_0x2c44,_0x59fd38=_0x23d68c(_0x3b7706),_0x374b3a=_0x596ce2[_0xce8ec6(0x1c5)](_0x59fd38,{'name':_0xce8ec6(0x1af),'codeGeneration':{'strings':![],'wasm':![]}});let _0x285791;try{_0x285791=new _0x596ce2[(_0xce8ec6(0x20d))]('('+_0x19efb0+')',{'filename':_0x3b7706[_0xce8ec6(0x1d4)]??'okdb-function.js'});}catch(_0x34ce3e){const _0x41eae0=new Error(_0x34ce3e?.[_0xce8ec6(0x1f8)]||_0xce8ec6(0x312));_0x41eae0[_0xce8ec6(0x331)]=_0xce8ec6(0x258),_0x41eae0[_0xce8ec6(0x266)]=_0x34ce3e;throw _0x41eae0;}let _0x525d28;try{_0x525d28=_0x285791[_0xce8ec6(0x246)](_0x374b3a,{'timeout':_0x1e94f7(_0x3b7706)});}catch(_0x3d0cd8){const _0x131362=new Error(_0x3d0cd8?.['message']||'Function\x20script\x20failed\x20to\x20initialize');_0x131362[_0xce8ec6(0x331)]=_0xce8ec6(0x258),_0x131362[_0xce8ec6(0x266)]=_0x3d0cd8;throw _0x131362;}if(typeof _0x525d28!==_0xce8ec6(0x2a8)){const _0x5b7d9f=new Error(_0xce8ec6(0x33b));_0x5b7d9f[_0xce8ec6(0x331)]=_0xce8ec6(0x319);throw _0x5b7d9f;}return _0x525d28;}return okdbFunctionsSandbox={'createSandboxGlobals':_0x23d68c,'compileFunctionExpression':_0x525a14,'DEFAULT_COMPILE_TIMEOUT_MS':_0x333d55,'_buildRestrictedFetch':_0x460a8b},okdbFunctionsSandbox;}var okdbFunctionsIpc,hasRequiredOkdbFunctionsIpc;function requireOkdbFunctionsIpc(){if(hasRequiredOkdbFunctionsIpc)return okdbFunctionsIpc;hasRequiredOkdbFunctionsIpc=0x1;function _0x310570(_0x2e9911){const _0x51b51c=_0x2c44;if(!_0x2e9911)return null;return{'message':_0x2e9911[_0x51b51c(0x1f8)]||String(_0x2e9911),'stack':_0x2e9911[_0x51b51c(0x1cf)]||null,'code':_0x2e9911[_0x51b51c(0x331)]||null,'details':_0x2e9911[_0x51b51c(0x29f)]||null};}function _0x3f98a8(_0x2bf621){const _0x222bb4=_0x2c44;if(!_0x2bf621)return new Error(_0x222bb4(0x1d3));const _0x1805c9=new Error(_0x2bf621[_0x222bb4(0x1f8)]||String(_0x2bf621));if(_0x2bf621[_0x222bb4(0x1cf)])_0x1805c9[_0x222bb4(0x1cf)]=_0x2bf621[_0x222bb4(0x1cf)];if(_0x2bf621[_0x222bb4(0x331)])_0x1805c9[_0x222bb4(0x331)]=_0x2bf621[_0x222bb4(0x331)];if(_0x2bf621[_0x222bb4(0x29f)])_0x1805c9[_0x222bb4(0x29f)]=_0x2bf621[_0x222bb4(0x29f)];return _0x1805c9;}return okdbFunctionsIpc={'serializeError':_0x310570,'deserializeError':_0x3f98a8},okdbFunctionsIpc;}var okdbEnums,hasRequiredOkdbEnums;function _0x2c44(_0x352c76,_0x1b9eb1){_0x352c76=_0x352c76-0x1ae;const _0x21d6e0=_0x21d6();let _0x2c4403=_0x21d6e0[_0x352c76];return _0x2c4403;}function requireOkdbEnums(){const _0x48f389=_0x2928d4;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2493d4={'PUT':_0x48f389(0x24d),'REMOVE':_0x48f389(0x283),'INDEX_DROP':_0x48f389(0x2bd),'INDEX_REGISTER':_0x48f389(0x2ef),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x48f389(0x1fc),'TYPE_DROP':_0x48f389(0x2e9),'FTS_REGISTER':_0x48f389(0x308),'FTS_DROP':'dropFts','FTS_RESET':'resetFts','SCHEMA_SET':_0x48f389(0x326),'SCHEMA_DROP':_0x48f389(0x2d1),'TTL_SET':_0x48f389(0x2d5),'TTL_CLEAR':_0x48f389(0x23b)},_0x392534={'SYSTEM_READY':_0x48f389(0x2d8),'FIELD_RESOLVER_REGISTERED':'field:resolver_registered','SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x48f389(0x248),'SYSTEM_POKE':_0x48f389(0x21e),'SYSTEM_DRAIN':_0x48f389(0x1c2),'SYSTEM_TYPE_DROP':_0x48f389(0x2a2),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x48f389(0x2e6),'ITEM_CREATE':_0x48f389(0x231),'ITEM_UPDATE':_0x48f389(0x27e),'ITEM_REMOVE':_0x48f389(0x216),'ITEM_PENDING':_0x48f389(0x337),'INDEX_RESET':'index:reset','INDEX_READY':'index:ready','INDEX_PROGRESS':_0x48f389(0x20e),'VIEW_PROGRESS':_0x48f389(0x26d),'INDEX_DROP':_0x48f389(0x2c5),'INDEX_REGISTERED':_0x48f389(0x209),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x48f389(0x34a),'FTS_RESET':_0x48f389(0x33a),'SCHEMA_SET':'schema:set','SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x48f389(0x2df),'UNIQUE_VIOLATION_RESOLVED':_0x48f389(0x334),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x48f389(0x2f1),'TXN_START':_0x48f389(0x262),'TXN_END':_0x48f389(0x21a),'TXN_ROLLBACK':_0x48f389(0x224),'TYPE_REGISTERED':_0x48f389(0x1b5),'TYPE_DROP':_0x48f389(0x323),'ENV_OPENED':_0x48f389(0x235),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x48f389(0x332),'TTL_EXPIRED':_0x48f389(0x1d0),'TTL_SET':'ttl:set','TTL_CLEAR':_0x48f389(0x301),'LICENSE_INVALID':_0x48f389(0x2fc),'LICENSE_ADDED':_0x48f389(0x272),'LICENSE_ACTIVATED':_0x48f389(0x31f),'LICENSE_REMOVED':_0x48f389(0x261)},_0x20d182={'CREATING':_0x48f389(0x26a),'RESETTING':_0x48f389(0x305),'READY':'ready','DROPPING':_0x48f389(0x23f),'WAITING':_0x48f389(0x2ab),'ERROR':_0x48f389(0x298)},_0x3b278a={'CREATED':_0x48f389(0x25f),'STARTING':_0x48f389(0x287),'STARTED':_0x48f389(0x2ba),'STOPPING':_0x48f389(0x217),'STOPPED':_0x48f389(0x22c)},_0x18fe8b={'CREATING':_0x48f389(0x26a),'READY':'ready','HALTED':_0x48f389(0x1e4),'STOPPED':_0x48f389(0x22c),'RESETTING':_0x48f389(0x305)},_0x2811a5=Object[_0x48f389(0x1f1)]({'POKE':'bus:poke','DRAIN':'bus:drain','TYPE_DROP':_0x48f389(0x23e),'PROC':_0x48f389(0x2fa),'ENV_RELEASE':_0x48f389(0x32b)});return okdbEnums={'BUS_EVENTS':_0x2811a5,'CHANGE_ACTIONS':_0x2493d4,'EVENTS':_0x392534,'INDEX_STATE':_0x20d182,'OKDB_STATE':_0x3b278a,'VIEW_STATE':_0x18fe8b},okdbEnums;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x8397fd extends Error{constructor(_0x13e2a0,_0x5e9739,_0x153aeb={}){const _0x3d046f=_0x2c44;super(_0x13e2a0),this[_0x3d046f(0x1b6)]=_0x3d046f(0x220),this[_0x3d046f(0x331)]=_0x5e9739,this['details']=_0x153aeb,_0x153aeb['cause']&&(this[_0x3d046f(0x266)]=_0x153aeb[_0x3d046f(0x266)]),Error[_0x3d046f(0x2cd)](this,this['constructor']);}}class _0x32f51b extends _0x8397fd{constructor(_0x521e3d,_0x272357,_0x13b350,_0x160eff){const _0x2417d3=_0x2c44;super('Version\x20mismatch\x20for\x20'+_0x521e3d+'@'+_0x272357+_0x2417d3(0x291)+_0x13b350+_0x2417d3(0x1da)+_0x160eff,_0x2417d3(0x285),{'type':_0x521e3d,'key':_0x272357,'expectedVersion':_0x13b350,'actualVersion':_0x160eff}),this[_0x2417d3(0x1b6)]='OKDBVersionMismatchError';}}class _0x1c9658 extends _0x8397fd{constructor(_0x22a95e,_0x386d0e){const _0x3aab7c=_0x2c44;super(_0x22a95e+'@'+_0x386d0e+_0x3aab7c(0x26f),'NOT_FOUND',{'type':_0x22a95e,'key':_0x386d0e}),this[_0x3aab7c(0x1b6)]=_0x3aab7c(0x201);}}class _0x42c2b9 extends _0x8397fd{constructor(_0x49857f,_0x31f67a){const _0x32cccd=_0x2c44;super(_0x49857f+'@'+_0x31f67a+_0x32cccd(0x2d9),_0x32cccd(0x2e8),{'type':_0x49857f,'key':_0x31f67a}),this[_0x32cccd(0x1b6)]=_0x32cccd(0x2fb);}}class _0xbde13 extends _0x8397fd{constructor(_0x36f4e0,_0x4e2449){const _0x210f3a=_0x2c44,_0x3e3fd7=typeof _0x4e2449;super(_0x210f3a(0x1b7)+_0x36f4e0+_0x210f3a(0x300)+_0x3e3fd7+_0x210f3a(0x2e4)+_0x4e2449,_0x210f3a(0x2d0),{'index':_0x36f4e0,'key':_0x4e2449,'keyType':_0x3e3fd7}),this[_0x210f3a(0x1b6)]=_0x210f3a(0x31a);}}class _0x26a7d8 extends _0x8397fd{constructor(_0x3230a7){const _0x5e3f88=_0x2c44,_0x321db2=typeof _0x3230a7;super(_0x5e3f88(0x341)+_0x321db2+_0x5e3f88(0x2aa)+_0x3230a7,_0x5e3f88(0x1ec),{'key':_0x3230a7,'keyType':_0x321db2}),this[_0x5e3f88(0x1b6)]='OKDBInvalidPrimaryKeyError';}}class _0x40511a extends _0x8397fd{constructor(_0x10fa54){const _0x2ecb39=_0x2c44;super(_0x2ecb39(0x1ed)+_0x10fa54+_0x2ecb39(0x2e0),'TYPE_NOT_REGISTERED',{'type':_0x10fa54}),this[_0x2ecb39(0x1b6)]=_0x2ecb39(0x1c7);}}class _0x19bb82 extends _0x8397fd{constructor(_0x316705){const _0x6efcfc=_0x2c44;super(_0x6efcfc(0x1ed)+_0x316705+_0x6efcfc(0x26b),'TYPE_ALREADY_REGISTERED',{'type':_0x316705}),this[_0x6efcfc(0x1b6)]=_0x6efcfc(0x348);}}class _0x8d3f62 extends _0x8397fd{constructor(_0x57120d,_0x3e54b4){const _0x363b74=_0x2c44;super(_0x363b74(0x1ff)+_0x3e54b4+_0x363b74(0x1b2)+_0x57120d+_0x363b74(0x2e0),_0x363b74(0x27f),{'type':_0x57120d,'index':_0x3e54b4}),this[_0x363b74(0x1b6)]=_0x363b74(0x1ef);}}class _0xe1242 extends _0x8397fd{constructor(_0x34e3a2,_0x4ce9b5){const _0x8597c4=_0x2c44;super(_0x8597c4(0x1ff)+_0x4ce9b5+_0x8597c4(0x1b2)+_0x34e3a2+_0x8597c4(0x22f),'INDEX_ALREADY_REGISTERED',{'type':_0x34e3a2,'index':_0x4ce9b5}),this[_0x8597c4(0x1b6)]='OKDBIndexAlreadyRegisteredError';}}class _0x466342 extends _0x8397fd{constructor(_0x37a2fc,_0x53e519={}){const _0x4c37f5=_0x2c44;super(_0x37a2fc,_0x4c37f5(0x2ca),_0x53e519),this[_0x4c37f5(0x1b6)]=_0x4c37f5(0x2a0);}}class _0x2c3aa0 extends _0x8397fd{constructor(_0x3f984c,_0x1ac871,_0x1be2d8,_0x189aa4,_0x3c5909){const _0x5abe55=_0x2c44;super('Unique\x20constraint\x20violated\x20on\x20'+_0x3f984c+'@'+_0x1ac871+_0x5abe55(0x34f)+_0x1be2d8+_0x5abe55(0x295)+_0x189aa4+_0x5abe55(0x2ce)+_0x3c5909+'\x27',_0x5abe55(0x2d7),{'type':_0x3f984c,'index':_0x1ac871,'indexKey':_0x1be2d8,'existingKey':_0x189aa4,'conflictingKey':_0x3c5909}),this[_0x5abe55(0x1b6)]=_0x5abe55(0x33d);}}class _0x2c1f41 extends _0x8397fd{constructor(_0xea8d7c,_0x1a8383,_0x5e6078){const _0x147b84=_0x2c44;super('Schema\x20validation\x20failed\x20for\x20'+_0xea8d7c+'@'+_0x1a8383,_0x147b84(0x336),{'type':_0xea8d7c,'key':_0x1a8383,'errors':_0x5e6078}),this[_0x147b84(0x1b6)]=_0x147b84(0x322),this[_0x147b84(0x273)]=_0xea8d7c,this[_0x147b84(0x29e)]=_0x1a8383,this[_0x147b84(0x2b6)]=_0x5e6078;}}class _0xcc23d2 extends _0x8397fd{constructor(_0x1bdcc3,_0x52ba8a){const _0x56a3f2=_0x2c44;super(_0x56a3f2(0x2b8)+_0x1bdcc3+':\x20'+_0x52ba8a[_0x56a3f2(0x2ae)]+_0x56a3f2(0x321),'SCHEMA_COLLECTION_INVALID',{'type':_0x1bdcc3,'failures':_0x52ba8a}),this[_0x56a3f2(0x1b6)]=_0x56a3f2(0x200),this[_0x56a3f2(0x273)]=_0x1bdcc3,this[_0x56a3f2(0x253)]=_0x52ba8a;}}class _0x4f19b0 extends _0x8397fd{constructor(_0x2eefa2,_0x573b3f,_0x5e015b,_0x490db9,_0x43e881){const _0x129278=_0x2c44;super(_0x129278(0x260)+_0x2eefa2+'@'+_0x573b3f+'.'+_0x5e015b+_0x129278(0x25e)+_0x490db9+'@'+_0x43e881+_0x129278(0x340),_0x129278(0x2e1),{'sourceType':_0x2eefa2,'sourceKey':_0x573b3f,'fieldPath':_0x5e015b,'targetType':_0x490db9,'targetKey':_0x43e881}),this[_0x129278(0x1b6)]=_0x129278(0x245),this[_0x129278(0x34b)]=_0x2eefa2,this[_0x129278(0x28f)]=_0x573b3f,this[_0x129278(0x2d2)]=_0x5e015b,this[_0x129278(0x30d)]=_0x490db9,this[_0x129278(0x1fe)]=_0x43e881;}}class _0x340a37 extends _0x8397fd{constructor(_0x3e1cd4,_0x440a1d,_0x37255a){const _0x494aeb=_0x2c44;super(_0x494aeb(0x2d4)+_0x3e1cd4+'@'+_0x440a1d+':\x20'+_0x37255a['length']+_0x494aeb(0x2c3),_0x494aeb(0x349),{'targetType':_0x3e1cd4,'targetKey':_0x440a1d,'references':_0x37255a}),this[_0x494aeb(0x1b6)]=_0x494aeb(0x344),this['targetType']=_0x3e1cd4,this[_0x494aeb(0x1fe)]=_0x440a1d,this[_0x494aeb(0x2d6)]=_0x37255a;}}class _0x5936c2 extends _0x8397fd{constructor(_0x4b7fd,_0x2490d4,_0x3033f0){const _0xda8c29=_0x2c44;super(_0xda8c29(0x1d2)+_0x2490d4+_0xda8c29(0x1b1)+_0x4b7fd+_0xda8c29(0x23a)+_0x3033f0[_0xda8c29(0x242)](_0x163778=>_0x163778[_0xda8c29(0x28e)]+':'+_0x163778[_0xda8c29(0x1b6)])[_0xda8c29(0x290)](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x4b7fd,'index':_0x2490d4,'usedBy':_0x3033f0}),this[_0xda8c29(0x1b6)]=_0xda8c29(0x221);}}return okdbError={'OKDBError':_0x8397fd,'OKDBVersionMismatchError':_0x32f51b,'OKDBNotFoundError':_0x1c9658,'OKDBAlreadyExistsError':_0x42c2b9,'OKDBInvalidIndexKeyError':_0xbde13,'OKDBInvalidPrimaryKeyError':_0x26a7d8,'OKDBTypeNotRegisteredError':_0x40511a,'OKDBTypeAlreadyRegisteredError':_0x19bb82,'OKDBIndexNotRegisteredError':_0x8d3f62,'OKDBIndexAlreadyRegisteredError':_0xe1242,'OKDBInvalidValueError':_0x466342,'OKDBUniqueConstraintError':_0x2c3aa0,'OKDBSchemaValidationError':_0x2c1f41,'OKDBSchemaCollectionError':_0xcc23d2,'OKDBForeignKeyError':_0x4f19b0,'OKDBForeignKeyDeleteError':_0x340a37,'OKDBIndexHasConsumersError':_0x5936c2},okdbError;}var okdbGuardedRange,hasRequiredOkdbGuardedRange;function requireOkdbGuardedRange(){const _0x48f9a3=_0x2928d4;if(hasRequiredOkdbGuardedRange)return okdbGuardedRange;hasRequiredOkdbGuardedRange=0x1;const _0x153295=require$$0$1,{OKDBError:_0x4b80d2}=requireOkdbError(),_0x57bf95={'value':null,'done':!![]};class _0x396b4e{constructor(_0xd5735d){this['_makeIterator']=_0xd5735d;}get[_0x48f9a3(0x212)](){return _0x57bf95;}[Symbol[_0x48f9a3(0x318)]](){return this['_makeIterator']();}[_0x48f9a3(0x242)](_0xbbdfc4){const _0x51881a=this;return new _0x396b4e(()=>{const _0x24c2a7=_0x2c44,_0x916eae=_0x51881a[Symbol['iterator']]();return{'next'(){const _0x2b40c8=_0x2c44;for(;;){const _0x209646=_0x916eae[_0x2b40c8(0x1cd)]();if(_0x209646[_0x2b40c8(0x31d)])return{'done':!![],'value':undefined};const _0x544f18=_0xbbdfc4(_0x209646[_0x2b40c8(0x2eb)]);if(_0x544f18===_0x153295[_0x2b40c8(0x2fd)])continue;if(_0x544f18===_0x57bf95)return _0x916eae['return']?.(),{'done':!![],'value':undefined};return{'done':![],'value':_0x544f18};}},'return'(){const _0x287177=_0x2c44;return _0x916eae[_0x287177(0x240)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x24c2a7(0x318)]](){return this;}};});}['filter'](_0x1e8ef8){const _0x6a037a=_0x48f9a3;return this[_0x6a037a(0x242)](_0xd3a469=>_0x1e8ef8(_0xd3a469)?_0xd3a469:_0x153295['SKIP']);}[_0x48f9a3(0x335)](_0x5a1a17){for(const _0x2ca821 of this)_0x5a1a17(_0x2ca821);}[_0x48f9a3(0x2af)](_0x52ce12=0x0,_0x159188=Infinity){const _0x176c23=this;return new _0x396b4e(()=>{const _0x451e03=_0x2c44,_0x1405a9=_0x176c23[Symbol[_0x451e03(0x318)]]();let _0x583c15=0x0;return{'next'(){const _0x2e9117=_0x451e03;for(;;){const _0x3dc144=_0x1405a9[_0x2e9117(0x1cd)]();if(_0x3dc144[_0x2e9117(0x31d)])return{'done':!![],'value':undefined};const _0x11c5ce=_0x583c15++;if(_0x11c5ce<_0x52ce12)continue;if(_0x11c5ce>=_0x159188)return _0x1405a9[_0x2e9117(0x240)]?.(),{'done':!![],'value':undefined};return _0x3dc144;}},'return'(){const _0x56cb1d=_0x451e03;return _0x1405a9[_0x56cb1d(0x240)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x451e03(0x318)]](){return this;}};});}['at'](_0x7f7fda){let _0x5e7619=0x0;for(const _0x388328 of this)if(_0x5e7619++===_0x7f7fda)return _0x388328;return undefined;}['flatMap'](_0x873891){const _0x21ff21=this;return new _0x396b4e(()=>{const _0xa0f407=_0x2c44,_0xdfa9dc=_0x21ff21[Symbol[_0xa0f407(0x318)]]();let _0x17b386=[];return{'next'(){const _0x230655=_0xa0f407;for(;;){if(_0x17b386[_0x230655(0x2ae)])return{'done':![],'value':_0x17b386[_0x230655(0x316)]()};const _0x417aaa=_0xdfa9dc['next']();if(_0x417aaa['done'])return{'done':!![],'value':undefined};const _0x1d2a40=_0x873891(_0x417aaa[_0x230655(0x2eb)]);if(Array[_0x230655(0x338)](_0x1d2a40))_0x17b386=_0x17b386[_0x230655(0x2dd)](_0x1d2a40);else{if(_0x1d2a40!=null&&(_0x1d2a40 instanceof _0x396b4e||typeof _0x1d2a40[Symbol[_0x230655(0x318)]]===_0x230655(0x2a8)&&_0x230655(0x275)in _0x1d2a40))_0x17b386=_0x17b386[_0x230655(0x2dd)](Array[_0x230655(0x1d1)](_0x1d2a40));else{if(_0x1d2a40!==_0x153295[_0x230655(0x2fd)])return{'done':![],'value':_0x1d2a40};}}}},'return'(){const _0x31610b=_0xa0f407;return _0xdfa9dc[_0x31610b(0x240)]?.(),{'done':!![],'value':undefined};},[Symbol[_0xa0f407(0x318)]](){return this;}};});}['concat'](_0x233995){const _0x3feafa=this;return new _0x396b4e(()=>{const _0x74ec9f=_0x2c44;let _0x61352a=_0x3feafa[Symbol[_0x74ec9f(0x318)]](),_0x1fe075=![];return{'next'(){const _0xb35a8a=_0x74ec9f;for(;;){const _0x29764f=_0x61352a[_0xb35a8a(0x1cd)]();if(!_0x29764f[_0xb35a8a(0x31d)])return _0x29764f;if(_0x1fe075)return{'done':!![],'value':undefined};_0x1fe075=!![],_0x61352a=_0x233995[Symbol[_0xb35a8a(0x318)]]();}},'return'(){return _0x61352a['return']?.(),{'done':!![],'value':undefined};},[Symbol['iterator']](){return this;}};});}[_0x48f9a3(0x213)](_0xdbec9d){const _0xdee62d=this;return new _0x396b4e(()=>{const _0x10fbfa=_0x2c44,_0x2c47a1=_0xdee62d[Symbol[_0x10fbfa(0x318)]]();return{'next'(){const _0x1e4c3b=_0x10fbfa;for(;;){try{return _0x2c47a1[_0x1e4c3b(0x1cd)]();}catch(_0x5f4588){const _0x288b35=_0xdbec9d(_0x5f4588);if(_0x288b35===_0x153295[_0x1e4c3b(0x2fd)]||_0x288b35===undefined)continue;return{'done':![],'value':_0x288b35};}}},'return'(){return _0x2c47a1['return']?.(),{'done':!![],'value':undefined};},[Symbol[_0x10fbfa(0x318)]](){return this;}};});}[_0x48f9a3(0x202)](){const _0xf7a9f4=_0x48f9a3;return Array[_0xf7a9f4(0x1d1)](this);}get[_0x48f9a3(0x275)](){const _0x386811=_0x48f9a3;return Array[_0x386811(0x1d1)](this);}}const _0x406546={'total':0x0,'byLabel':{},'last':null};function _0x24311d(_0x1282ce){const _0x2c8f88=_0x48f9a3;_0x406546['total']++;if(_0x1282ce)_0x406546[_0x2c8f88(0x1e0)][_0x1282ce]=(_0x406546['byLabel'][_0x1282ce]??0x0)+0x1;_0x406546[_0x2c8f88(0x346)]={'label':_0x1282ce??null,'at':Date['now']()};}function _0x4dcf8b(){const _0x2cca5b=_0x48f9a3;return{'total':_0x406546[_0x2cca5b(0x21b)],'byLabel':{..._0x406546[_0x2cca5b(0x1e0)]},'last':_0x406546['last']};}function _0x430cf6(_0x4df4cc,_0x253248={}){const {getTxnId:_0x5674fe,resume:_0xa7144e,label:_0x3bb792,baseline:_0x16c8a2}=_0x253248;return new _0x396b4e(()=>{const _0x469f42=_0x2c44;let _0x20ce5b=null,_0xfd09ac=![],_0x209f39=![],_0x14adf2=![],_0x5375ff,_0x31452a=0x0,_0x46a5e4;return{'next'(){const _0x157b33=_0x2c44;if(_0x14adf2)return{'done':!![],'value':undefined};if(_0x209f39){let _0x4566c9=![];if(_0xa7144e&&_0x5674fe)try{_0x4566c9=_0x5674fe()===_0x46a5e4;}catch{}if(!_0x4566c9){_0x14adf2=!![],_0x24311d(_0x3bb792);throw new _0x4b80d2(_0xa7144e?_0x157b33(0x2b5)+_0x157b33(0x1fb)+_0x157b33(0x25c):'pinned\x20range\x20iterator\x20held\x20across\x20an\x20await/turn\x20boundary.\x20This\x20surface\x20cannot\x20resume\x20'+_0x157b33(0x1b0)+_0x157b33(0x250),_0x157b33(0x314));}_0x20ce5b=_0xa7144e(_0x5375ff,_0x31452a)[Symbol[_0x157b33(0x318)]](),_0x209f39=![];}if(!_0x20ce5b){if(_0x16c8a2!==undefined)_0x46a5e4=_0x16c8a2;else try{_0x46a5e4=_0x5674fe?_0x5674fe():undefined;}catch{_0x46a5e4=undefined;}try{_0x20ce5b=_0x4df4cc()[Symbol['iterator']]();}catch(_0x758232){_0x14adf2=!![];throw _0x758232;}}!_0xfd09ac&&(_0xfd09ac=!![],queueMicrotask(()=>{const _0x4f477a=_0x157b33;_0xfd09ac=![];if(_0x14adf2||_0x209f39)return;try{_0x20ce5b?.[_0x4f477a(0x240)]?.();}catch{}_0x20ce5b=null,_0x209f39=!![];}));const _0x1c84b4=_0x20ce5b[_0x157b33(0x1cd)]();if(_0x1c84b4[_0x157b33(0x31d)])return _0x14adf2=!![],{'done':!![],'value':undefined};return _0x5375ff=_0x1c84b4[_0x157b33(0x2eb)],_0x31452a++,_0x1c84b4;},'return'(){_0x14adf2=!![];try{_0x20ce5b?.['return']?.();}catch{}return{'done':!![],'value':undefined};},[Symbol[_0x469f42(0x318)]](){return this;}};});}return okdbGuardedRange={'guardSnapshotIterable':_0x430cf6,'OKDBGuardedRange':_0x396b4e,'recordGuardTrip':_0x24311d,'getGuardTripStats':_0x4dcf8b},okdbGuardedRange;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x37aa03=_0x2928d4;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x273d6e,performance:_0xa58e51}=require$$0$2,_0x10ff53=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x37aa03(0x1e6),_0x1fffad=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x9ffa7b=process.env.OKDB_LOOP_LAG_ALL==='1',_0x301f7b=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x28a13a{constructor(){const _0xb71c06=_0x37aa03;this[_0xb71c06(0x268)]=_0x10ff53,this[_0xb71c06(0x2c4)]=new Map(),this['_h']=null,this[_0xb71c06(0x33f)]=null,this[_0xb71c06(0x2bf)]=![],this[_0xb71c06(0x329)]=(_0x2e3f07,_0x2339a1)=>process[_0xb71c06(0x29b)][_0xb71c06(0x210)](_0x2e3f07+(_0x2339a1?'\x20'+JSON[_0xb71c06(0x21d)](_0x2339a1):'')+'\x0a');}[_0x37aa03(0x2a1)](){const _0x196c60=_0x37aa03;return _0xa58e51[_0x196c60(0x2a1)]();}['setLogger'](_0x16560a){if(typeof _0x16560a==='function')this['_log']=_0x16560a;}['note'](_0x1e6fea,_0x3d1ba2,_0x55f261){const _0x348e60=_0x37aa03;if(!this['enabled'])return;let _0x104ea2=this[_0x348e60(0x2c4)][_0x348e60(0x254)](_0x1e6fea);!_0x104ea2&&(_0x104ea2={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x348e60(0x2c4)][_0x348e60(0x311)](_0x1e6fea,_0x104ea2)),_0x104ea2['ms']+=_0x3d1ba2,_0x104ea2['count']+=0x1,_0x3d1ba2>_0x104ea2[_0x348e60(0x28c)]&&(_0x104ea2[_0x348e60(0x28c)]=_0x3d1ba2,_0x104ea2['maxExtra']=_0x55f261||'');}[_0x37aa03(0x1d9)](_0x556e73){const _0x46465f=_0x37aa03;if(!this['enabled']||this[_0x46465f(0x2bf)])return;this[_0x46465f(0x2bf)]=!![];if(_0x556e73)this[_0x46465f(0x329)]=_0x556e73;this['_h']=_0x273d6e({'resolution':0xa}),this['_h']['enable'](),this[_0x46465f(0x33f)]=setInterval(()=>this[_0x46465f(0x219)](),_0x1fffad);if(this['_timer'][_0x46465f(0x286)])this[_0x46465f(0x33f)]['unref']();}[_0x37aa03(0x2f3)](_0x33f237){const _0x2733a8=_0x37aa03;if(!this[_0x2733a8(0x31b)])this[_0x2733a8(0x31b)]=new Set();this['_windowCbs'][_0x2733a8(0x206)](_0x33f237);if(!this[_0x2733a8(0x2bf)])this[_0x2733a8(0x1bc)]();}[_0x37aa03(0x2ad)](_0x25d6a9){const _0x324070=_0x37aa03;this[_0x324070(0x31b)]?.['delete'](_0x25d6a9);}['_startAdmission'](){const _0x452f86=_0x37aa03;if(this[_0x452f86(0x343)])return;this[_0x452f86(0x343)]=!![];!this['_h']&&(this['_h']=_0x273d6e({'resolution':0xa}),this['_h'][_0x452f86(0x2ea)]());const _0x454859=_0x1fffad;this[_0x452f86(0x310)]=setInterval(()=>{const _0x4f37f4=_0x452f86,_0x3a01b7=this['_h'];if(!_0x3a01b7)return;const _0x34978f=_0x3a01b7[_0x4f37f4(0x28d)](0x63)/0xf4240,_0x448481=_0x3a01b7[_0x4f37f4(0x2de)]/0xf4240,_0x1b2151=_0x3a01b7['mean']/0xf4240;_0x3a01b7[_0x4f37f4(0x1ca)]();if(this[_0x4f37f4(0x31b)])for(const _0x7ccf2b of this[_0x4f37f4(0x31b)]){try{_0x7ccf2b({'p99Ms':_0x34978f,'maxMs':_0x448481,'meanMs':_0x1b2151,'reportMs':_0x454859});}catch{}}},_0x454859);if(this['_admissionTimer'][_0x452f86(0x286)])this[_0x452f86(0x310)]['unref']();}[_0x37aa03(0x219)](){const _0x2b975e=_0x37aa03,_0xc5ae4d=this['_h'],_0x308c8b=_0xc5ae4d['max']/0xf4240,_0x5be55a=_0xc5ae4d[_0x2b975e(0x28d)](0x63)/0xf4240,_0x3bcbf0=_0xc5ae4d[_0x2b975e(0x32e)]/0xf4240;_0xc5ae4d[_0x2b975e(0x1ca)]();const _0x148a90=[...this[_0x2b975e(0x2c4)]['entries']()][_0x2b975e(0x242)](([_0x49e76f,_0xa07991])=>({'label':_0x49e76f,..._0xa07991}))[_0x2b975e(0x2c6)]((_0x4ec5bb,_0x35f6bd)=>_0x35f6bd['ms']-_0x4ec5bb['ms'])[_0x2b975e(0x2af)](0x0,0x8);this[_0x2b975e(0x2c4)][_0x2b975e(0x1b4)]();const _0x15f961=_0x148a90[_0x2b975e(0x2f2)]((_0xc0a530,_0x15f898)=>_0xc0a530+_0x15f898['ms'],0x0),_0x5f164e=_0x148a90[_0x2b975e(0x242)](_0x2a6384=>_0x2a6384[_0x2b975e(0x225)]+'='+_0x2a6384['ms'][_0x2b975e(0x307)](0x0)+_0x2b975e(0x276)+_0x2a6384[_0x2b975e(0x1f5)]+(_0x2a6384[_0x2b975e(0x28c)]>0x5?'(worst\x20'+_0x2a6384[_0x2b975e(0x28c)][_0x2b975e(0x307)](0x0)+'ms'+(_0x2a6384[_0x2b975e(0x1e2)]?'\x20'+_0x2a6384['maxExtra']:'')+')':''));(_0x9ffa7b||_0x308c8b>=_0x301f7b)&&this[_0x2b975e(0x329)](_0x2b975e(0x1f0)+_0x1fffad+'ms\x20max='+_0x308c8b[_0x2b975e(0x307)](0x0)+_0x2b975e(0x251)+_0x5be55a[_0x2b975e(0x307)](0x0)+_0x2b975e(0x237)+_0x3bcbf0['toFixed'](0x0)+'ms\x20busy='+_0x15f961[_0x2b975e(0x307)](0x0)+'ms'+(_0x5f164e['length']?_0x2b975e(0x1eb)+_0x5f164e[_0x2b975e(0x290)]('\x20\x20'):''),{'feature':_0x2b975e(0x2e3)});if(this[_0x2b975e(0x31b)])for(const _0x261063 of this[_0x2b975e(0x31b)]){try{_0x261063({'p99Ms':_0x5be55a,'maxMs':_0x308c8b,'meanMs':_0x3bcbf0,'reportMs':_0x1fffad});}catch{}}}[_0x37aa03(0x2e2)](){const _0x5d7a21=_0x37aa03;if(this['_timer'])clearInterval(this[_0x5d7a21(0x33f)]);if(this['_h'])this['_h'][_0x5d7a21(0x22a)]();this[_0x5d7a21(0x33f)]=null,this['_h']=null,this[_0x5d7a21(0x2bf)]=![];}}const _0x13b489=new _0x28a13a();if(_0x13b489['enabled'])_0x13b489[_0x37aa03(0x1d9)]();return okdbLoopMonitor={'LOOP':_0x13b489},okdbLoopMonitor;}var okdbTransaction,hasRequiredOkdbTransaction;function requireOkdbTransaction(){const _0x26c3ce=_0x2928d4;if(hasRequiredOkdbTransaction)return okdbTransaction;hasRequiredOkdbTransaction=0x1;const _0x443b9d=require$$0$3,{EVENTS:_0x1da095}=requireOkdbEnums(),{OKDBError:_0x10b476}=requireOkdbError(),{recordGuardTrip:_0x19a436,guardSnapshotIterable:_0x3dc75b}=requireOkdbGuardedRange(),{LOOP:_0x9febc5}=requireOkdbLoopMonitor();function _0xb07230(_0x20af1b){const _0x560972=_0x2c44;return _0x20af1b[_0x560972(0x242)](_0x3f8e95=>{const _0x1a030d=_0x560972,[_0x100049,_0x56f2fb]=_0x3f8e95[_0x1a030d(0x203)]||[];return{'action':_0x3f8e95['action'],'type':_0x100049,'key':_0x56f2fb};});}class _0x37fe93{[_0x26c3ce(0x2f6)];[_0x26c3ce(0x263)]=[];[_0x26c3ce(0x2c1)]=[];[_0x26c3ce(0x2f0)]=[];constructor(_0x1992bf,_0x31edf9={'useReadTransaction':![]}){const _0x1bd085=_0x26c3ce;this['okdb']=_0x1992bf,this[_0x1bd085(0x1c8)]=_0x31edf9,this['id']=_0x443b9d['v4']();if(this[_0x1bd085(0x1c8)][_0x1bd085(0x302)])try{this['_txnIdAtSnapshot']=this[_0x1bd085(0x2f6)]['db'][_0x1bd085(0x289)]()[_0x1bd085(0x2a7)];}catch{this[_0x1bd085(0x1be)]=undefined;}this['readTransaction']=this['options'][_0x1bd085(0x302)]?this[_0x1bd085(0x2f6)]['db']['useReadTransaction']():null,this[_0x1bd085(0x328)]=![],this[_0x1bd085(0x2c8)]=![],this['readTransaction']&&queueMicrotask(()=>{const _0x551b86=_0x1bd085;this[_0x551b86(0x2dc)]&&(this[_0x551b86(0x238)](),this[_0x551b86(0x2c8)]=!![]);});}[_0x26c3ce(0x214)](_0x4a80df){const _0xc89e94=_0x26c3ce;this[_0xc89e94(0x2c1)][_0xc89e94(0x1c1)](_0x4a80df);}['onUndo'](_0xa95df0){const _0xeb0fe6=_0x26c3ce;this[_0xeb0fe6(0x2f0)][_0xeb0fe6(0x1c1)](_0xa95df0);}[_0x26c3ce(0x238)](){const _0xe35409=_0x26c3ce;if(!this['readTransaction'])return;try{this[_0xe35409(0x2dc)][_0xe35409(0x31d)]();}catch(_0xb20ecf){}this[_0xe35409(0x2dc)]=null;}['_assertOpen'](){const _0x3f1a30=_0x26c3ce;if(this[_0x3f1a30(0x328)])throw new _0x10b476(_0x3f1a30(0x207),_0x3f1a30(0x1b3));if(this['_readViewExpired']){let _0x2aa33c=![];if(this['options'][_0x3f1a30(0x302)]===_0x3f1a30(0x259)&&this['_txnIdAtSnapshot']!==undefined)try{_0x2aa33c=this[_0x3f1a30(0x2f6)]['db'][_0x3f1a30(0x289)]()['lastTxnId']===this[_0x3f1a30(0x1be)];}catch{}if(!_0x2aa33c){_0x19a436((this[_0x3f1a30(0x2f6)]?.[_0x3f1a30(0x1b6)]??'?')+_0x3f1a30(0x1b8));throw new _0x10b476(_0x3f1a30(0x27b)+'boundary\x20(a\x20pinned\x20read\x20txn\x20blocks\x20LMDB\x20free-page\x20reuse).\x20Do\x20all\x20consistent\x20reads\x20'+_0x3f1a30(0x33c)+_0x3f1a30(0x24e),_0x3f1a30(0x314));}}}[_0x26c3ce(0x254)](_0x5423a9,_0x4a515a){const _0x2ec37d=_0x26c3ce;return this[_0x2ec37d(0x24a)](),this['okdb'][_0x2ec37d(0x254)](_0x5423a9,_0x4a515a,{'transaction':this['readTransaction']});}[_0x26c3ce(0x324)](_0x104023,_0x589432){const _0x1ae796=_0x26c3ce;return this[_0x1ae796(0x24a)](),this[_0x1ae796(0x2f6)][_0x1ae796(0x324)](_0x104023,_0x589432,{'transaction':this['readTransaction']});}[_0x26c3ce(0x1cc)](_0x3413f6,_0x265690){const _0x3e70d2=_0x26c3ce;return this[_0x3e70d2(0x24a)](),this[_0x3e70d2(0x2f6)][_0x3e70d2(0x1cc)](_0x3413f6,_0x265690,{'transaction':this[_0x3e70d2(0x2dc)]});}[_0x26c3ce(0x249)](_0x2336f4){const _0x58cdf1=_0x26c3ce;if(!this[_0x58cdf1(0x1c8)][_0x58cdf1(0x302)])return _0x2336f4;if(_0x2336f4&&typeof _0x2336f4[_0x58cdf1(0x1c3)]==='function')return _0x2336f4;if(Array['isArray'](_0x2336f4))return _0x2336f4;const _0x3291b1=this,_0x1a2dd3=_0x3291b1['options'][_0x58cdf1(0x302)]===_0x58cdf1(0x259),_0x4df0a7=()=>{const _0x35bc34=_0x58cdf1;if(!_0x3291b1[_0x35bc34(0x2c8)])return![];if(!_0x1a2dd3)return!![];if(_0x3291b1[_0x35bc34(0x1be)]===undefined)return!![];try{return _0x3291b1[_0x35bc34(0x2f6)]['db'][_0x35bc34(0x289)]()['lastTxnId']!==_0x3291b1[_0x35bc34(0x1be)];}catch{return!![];}};return _0x3dc75b(()=>{const _0x6dc7f6=_0x58cdf1;if(_0x3291b1['_closed'])throw new _0x10b476('Transaction\x20already\x20closed','TXN_CLOSED');if(_0x4df0a7()){_0x19a436((_0x3291b1[_0x6dc7f6(0x2f6)]?.['name']??'?')+_0x6dc7f6(0x30b));throw new _0x10b476(_0x6dc7f6(0x2ff)+_0x6dc7f6(0x2f5)+'materialize\x20them\x20(Array.from)\x20while\x20the\x20view\x20is\x20live.',_0x6dc7f6(0x314));}return _0x2336f4;},{'label':(_0x3291b1['okdb']?.['name']??'?')+':txnRange',..._0x1a2dd3?{'baseline':_0x3291b1[_0x58cdf1(0x1be)],'getTxnId':()=>_0x3291b1['okdb']['db'][_0x58cdf1(0x289)]()[_0x58cdf1(0x2a7)],'resume':(_0x81d26d,_0x38221f)=>_0x2336f4[_0x58cdf1(0x2af)](_0x38221f)}:{}});}[_0x26c3ce(0x26e)](_0x50f553,_0x5ae980={}){const _0x36c15b=_0x26c3ce;return this[_0x36c15b(0x24a)](),this['_range'](this[_0x36c15b(0x2f6)][_0x36c15b(0x26e)](_0x50f553,{'transaction':this[_0x36c15b(0x2dc)],..._0x5ae980}));}['getValues'](_0x95c677,_0x1e9b81={}){const _0x3d1e7b=_0x26c3ce;return this['_assertOpen'](),this[_0x3d1e7b(0x249)](this['okdb'][_0x3d1e7b(0x2ac)](_0x95c677,{'transaction':this[_0x3d1e7b(0x2dc)],..._0x1e9b81}));}[_0x26c3ce(0x1dd)](_0x313432,_0x3a0920={}){const _0x3ea7e0=_0x26c3ce;return this[_0x3ea7e0(0x24a)](),this[_0x3ea7e0(0x249)](this['okdb'][_0x3ea7e0(0x1dd)](_0x313432,{'transaction':this[_0x3ea7e0(0x2dc)],..._0x3a0920}));}[_0x26c3ce(0x303)](_0x4d2e3b,_0x5a9a9c,_0x45db1e={}){const _0x4ca888=_0x26c3ce;return this[_0x4ca888(0x24a)](),this[_0x4ca888(0x249)](this[_0x4ca888(0x2f6)][_0x4ca888(0x303)](_0x4d2e3b,_0x5a9a9c,{'transaction':this[_0x4ca888(0x2dc)],..._0x45db1e}));}[_0x26c3ce(0x1f2)](_0x368bb8,_0x5c8cb5,_0x389a24={}){const _0x3c72dc=_0x26c3ce;return this[_0x3c72dc(0x24a)](),this[_0x3c72dc(0x249)](this[_0x3c72dc(0x2f6)][_0x3c72dc(0x1f2)](_0x368bb8,_0x5c8cb5,{'transaction':this[_0x3c72dc(0x2dc)],..._0x389a24}));}['getClock'](_0x1e8d65=null){const _0x3c7928=_0x26c3ce;return this[_0x3c7928(0x24a)](),this[_0x3c7928(0x2f6)]['getClock'](_0x1e8d65,{'transaction':this[_0x3c7928(0x2dc)]});}[_0x26c3ce(0x257)](_0x123141){const _0x47e8f2=_0x26c3ce;return this[_0x47e8f2(0x24a)](),this[_0x47e8f2(0x2f6)][_0x47e8f2(0x257)](_0x123141,{'transaction':this[_0x47e8f2(0x2dc)]});}[_0x26c3ce(0x24d)](_0xd8044e,_0xdac87a,_0x31a7ee,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date['now'](),origin:origin=null,ttl:ttl=null}={}){const _0x3ead49=_0x26c3ce;this[_0x3ead49(0x263)][_0x3ead49(0x1c1)]({'action':_0x3ead49(0x24d),'args':[_0xd8044e,_0xdac87a,_0x31a7ee,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}['update'](_0x2d54fc,_0x4e697d,_0x5d57c9,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date['now'](),origin:origin=null,ttl:ttl=null}={}){const _0x59aa30=_0x26c3ce;this['actions'][_0x59aa30(0x1c1)]({'action':_0x59aa30(0x233),'args':[_0x2d54fc,_0x4e697d,_0x5d57c9,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x26c3ce(0x218)](_0x3ec8f6,_0x59b017,_0x39c071,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x26c3ce(0x2a1)](),origin:origin=null,ttl:ttl=null}={}){const _0x3f3821=_0x26c3ce;this[_0x3f3821(0x263)][_0x3f3821(0x1c1)]({'action':_0x3f3821(0x218),'args':[_0x3ec8f6,_0x59b017,_0x39c071,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x26c3ce(0x284)](_0x4eee5f,_0x328699,_0xf262e9,{version:version=null,timestamp:timestamp=Date[_0x26c3ce(0x2a1)](),origin:origin=null,ttl:ttl=null}={}){const _0x288ad4=_0x26c3ce;this[_0x288ad4(0x263)][_0x288ad4(0x1c1)]({'action':_0x288ad4(0x284),'args':[_0x4eee5f,_0x328699,_0xf262e9,{'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x26c3ce(0x283)](_0x341701,_0x39c4f4,{ifVersion:ifVersion=null,timestamp:timestamp=Date['now'](),origin:origin=null}={}){const _0x169113=_0x26c3ce;this[_0x169113(0x263)][_0x169113(0x1c1)]({'action':_0x169113(0x283),'args':[_0x341701,_0x39c4f4,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin}]});}[_0x26c3ce(0x25d)](_0x4cf0d4,_0x5a98d0,_0xbbecc8){const _0x5d5a84=_0x26c3ce;this[_0x5d5a84(0x263)]['push']({'action':'setTTL','args':[_0x4cf0d4,_0x5a98d0,_0xbbecc8]});}[_0x26c3ce(0x1c6)](_0x2d0914,_0x43a5f4){const _0x50fdda=_0x26c3ce;this[_0x50fdda(0x263)][_0x50fdda(0x1c1)]({'action':'clearTTL','args':[_0x2d0914,_0x43a5f4]});}['rollback'](){const _0x13f149=_0x26c3ce;if(this[_0x13f149(0x328)])return;for(const _0x52c7bf of this[_0x13f149(0x2f0)]){try{_0x52c7bf();}catch{}}this[_0x13f149(0x2f6)]['events'][_0x13f149(0x30a)](_0x1da095['TXN_ROLLBACK'],{'id':this['id']}),this[_0x13f149(0x263)]=[],this[_0x13f149(0x238)](),this[_0x13f149(0x328)]=!![];}async[_0x26c3ce(0x313)](){const _0x241870=_0x26c3ce;if(this['_closed'])throw new Error(_0x241870(0x207));const _0x5f97d1={'id':this['id'],'timestamp':Date[_0x241870(0x2a1)](),'actions':this['actions']};this[_0x241870(0x2f6)][_0x241870(0x20c)][_0x241870(0x30a)](_0x1da095[_0x241870(0x1e8)],_0x5f97d1);try{const _0x550d92=_0x9febc5[_0x241870(0x268)]?_0x9febc5[_0x241870(0x2a1)]():0x0;await this[_0x241870(0x2f6)][_0x241870(0x292)]['transaction'](()=>{const _0x51410b=_0x241870;for(const _0x84a0ba of this[_0x51410b(0x263)]){const _0x5cef46=this[_0x51410b(0x2f6)]['_'+_0x84a0ba['action']];if(typeof _0x5cef46!==_0x51410b(0x2a8))throw new Error(_0x51410b(0x25a)+_0x84a0ba[_0x51410b(0x227)]);_0x5cef46['call'](this['okdb'],this,..._0x84a0ba['args']);}}),_0x9febc5[_0x241870(0x268)]&&_0x9febc5[_0x241870(0x239)](_0x241870(0x274),_0x9febc5[_0x241870(0x2a1)]()-_0x550d92,(this['okdb'][_0x241870(0x1b6)]??'?')+_0x241870(0x1de)+this[_0x241870(0x263)][_0x241870(0x2ae)]);}catch(_0x394240){for(const _0x1076dc of this['_undoHooks']){try{_0x1076dc();}catch{}}this[_0x241870(0x238)](),this[_0x241870(0x328)]=!![];if(_0x394240 instanceof _0x10b476)throw _0x394240;const _0x39b215={'cause':_0x394240,'env':this[_0x241870(0x2f6)]?.[_0x241870(0x1b6)],'envPath':this[_0x241870(0x2f6)]?.[_0x241870(0x2bc)],'pid':process[_0x241870(0x241)],'txnId':this['id'],'actionCount':this[_0x241870(0x263)]['length'],'actions':_0xb07230(this[_0x241870(0x263)]),'nativeCode':_0x394240?.[_0x241870(0x331)],'nativeName':_0x394240?.['name']};try{this[_0x241870(0x2f6)]?.[_0x241870(0x296)]?.[_0x241870(0x298)]?.(_0x241870(0x299),{'env':_0x39b215['env'],'envPath':_0x39b215[_0x241870(0x2f4)],'pid':_0x39b215[_0x241870(0x241)],'txnId':_0x39b215[_0x241870(0x327)],'actionCount':_0x39b215['actionCount'],'actions':_0x39b215[_0x241870(0x263)],'nativeCode':_0x39b215[_0x241870(0x1f7)],'error':_0x394240?.[_0x241870(0x1f8)],'stack':_0x394240?.[_0x241870(0x1cf)]});}catch{}throw new _0x10b476(_0x394240?.[_0x241870(0x1f8)]||_0x241870(0x2b0),_0x241870(0x29d),_0x39b215);}this[_0x241870(0x2f6)]['events']['emit'](_0x1da095['TXN_END'],_0x5f97d1);for(const _0x1c17da of this[_0x241870(0x2c1)]){try{await _0x1c17da();}catch{}}this[_0x241870(0x263)]=[],this[_0x241870(0x238)](),this[_0x241870(0x328)]=!![];}static[_0x26c3ce(0x315)](_0x477166){const _0x41283f=_0x26c3ce;return Object[_0x41283f(0x1f1)]({'id':_0x477166['id'],'put':_0x477166[_0x41283f(0x24d)][_0x41283f(0x306)](_0x477166),'update':_0x477166[_0x41283f(0x233)]['bind'](_0x477166),'patch':_0x477166[_0x41283f(0x218)][_0x41283f(0x306)](_0x477166),'create':_0x477166['create']['bind'](_0x477166),'remove':_0x477166[_0x41283f(0x283)][_0x41283f(0x306)](_0x477166),'setTTL':_0x477166[_0x41283f(0x25d)]['bind'](_0x477166),'clearTTL':_0x477166[_0x41283f(0x1c6)][_0x41283f(0x306)](_0x477166),'commit':_0x477166[_0x41283f(0x313)][_0x41283f(0x306)](_0x477166),'rollback':_0x477166[_0x41283f(0x2a6)][_0x41283f(0x306)](_0x477166),'get':_0x477166[_0x41283f(0x254)][_0x41283f(0x306)](_0x477166),'getEntry':_0x477166[_0x41283f(0x324)][_0x41283f(0x306)](_0x477166),'getMany':_0x477166[_0x41283f(0x1cc)]['bind'](_0x477166),'getRange':_0x477166[_0x41283f(0x26e)][_0x41283f(0x306)](_0x477166),'getValues':_0x477166['getValues'][_0x41283f(0x306)](_0x477166),'getKeys':_0x477166[_0x41283f(0x1dd)][_0x41283f(0x306)](_0x477166),'byIndex':_0x477166['byIndex'][_0x41283f(0x306)](_0x477166),'query':_0x477166[_0x41283f(0x1f2)]['bind'](_0x477166),'getClock':_0x477166[_0x41283f(0x347)][_0x41283f(0x306)](_0x477166),'getCount':_0x477166[_0x41283f(0x257)]['bind'](_0x477166),'read':_0x477166,'raw':_0x477166});}static[_0x26c3ce(0x1bf)](_0x505315,_0x533617=[]){const _0xa1a02c=_0x26c3ce;if(!Array[_0xa1a02c(0x338)](_0x533617))throw new _0x10b476(_0xa1a02c(0x28a),_0xa1a02c(0x215));for(const _0x3c5a15 of _0x533617){if(Array[_0xa1a02c(0x338)](_0x3c5a15)){const [_0x4af08f,..._0x419046]=_0x3c5a15;if(typeof _0x505315[_0x4af08f]!==_0xa1a02c(0x2a8))throw new _0x10b476(_0xa1a02c(0x25a)+_0x4af08f,_0xa1a02c(0x26c),{'action':_0x4af08f});_0x505315[_0x4af08f](..._0x419046);continue;}if(!_0x3c5a15||typeof _0x3c5a15!==_0xa1a02c(0x1d5))throw new _0x10b476('txn\x20op\x20must\x20be\x20an\x20object\x20or\x20tuple','TXN_INVALID_OP');const {action:_0x1e3436}=_0x3c5a15;if(typeof _0x1e3436!==_0xa1a02c(0x2da)||typeof _0x505315[_0x1e3436]!==_0xa1a02c(0x2a8))throw new _0x10b476('Unknown\x20transaction\x20action:\x20'+_0x1e3436,_0xa1a02c(0x26c),{'action':_0x1e3436});switch(_0x1e3436){case _0xa1a02c(0x24d):case'update':case _0xa1a02c(0x284):_0x505315[_0x1e3436](_0x3c5a15[_0xa1a02c(0x273)],_0x3c5a15[_0xa1a02c(0x29e)],_0x3c5a15[_0xa1a02c(0x2eb)],{..._0x3c5a15[_0xa1a02c(0x1c8)],'ttl':_0x3c5a15[_0xa1a02c(0x230)]??_0x3c5a15[_0xa1a02c(0x1c8)]?.[_0xa1a02c(0x230)]??null});break;case'patch':_0x505315[_0xa1a02c(0x218)](_0x3c5a15[_0xa1a02c(0x273)],_0x3c5a15[_0xa1a02c(0x29e)],_0x3c5a15[_0xa1a02c(0x218)],{..._0x3c5a15[_0xa1a02c(0x1c8)],'ttl':_0x3c5a15[_0xa1a02c(0x230)]??_0x3c5a15['options']?.[_0xa1a02c(0x230)]??null});break;case _0xa1a02c(0x283):_0x505315[_0xa1a02c(0x283)](_0x3c5a15[_0xa1a02c(0x273)],_0x3c5a15[_0xa1a02c(0x29e)],_0x3c5a15[_0xa1a02c(0x1c8)]||{});break;case _0xa1a02c(0x25d):_0x505315['setTTL'](_0x3c5a15[_0xa1a02c(0x273)],_0x3c5a15['key'],_0x3c5a15[_0xa1a02c(0x230)]);break;case'clearTTL':_0x505315[_0xa1a02c(0x1c6)](_0x3c5a15[_0xa1a02c(0x273)],_0x3c5a15[_0xa1a02c(0x29e)]);break;default:throw new _0x10b476(_0xa1a02c(0x27a)+_0x1e3436,_0xa1a02c(0x26c),{'action':_0x1e3436});}}}static async['run'](_0x14e9c7,_0x10e484,_0x41e0b2={}){const _0x1034ef=_0x26c3ce,_0x1b61e6=new _0x37fe93(_0x14e9c7,_0x41e0b2),_0x763094=_0x37fe93['createWriteFacade'](_0x1b61e6);try{typeof _0x10e484===_0x1034ef(0x2a8)?await _0x10e484(_0x763094):_0x37fe93[_0x1034ef(0x1bf)](_0x1b61e6,_0x10e484||[]);const _0x1efd62=_0x1b61e6[_0x1034ef(0x263)][_0x1034ef(0x2ae)];return await _0x1b61e6[_0x1034ef(0x313)](),{'id':_0x1b61e6['id'],'actions':_0x1efd62};}catch(_0x49702a){try{_0x1b61e6[_0x1034ef(0x2a6)]();}catch(_0x5be6d0){}throw _0x49702a;}}}return okdbTransaction=_0x37fe93,okdbTransaction;}var okdbFunctionsFacades,hasRequiredOkdbFunctionsFacades;function requireOkdbFunctionsFacades(){if(hasRequiredOkdbFunctionsFacades)return okdbFunctionsFacades;hasRequiredOkdbFunctionsFacades=0x1;const _0x252147=requireOkdbTransaction();function _0x52e11f(_0x40f7d8){const _0x2803c7=_0x2c44;return{'transaction':typeof _0x40f7d8['transaction']==='function'?_0x40f7d8[_0x2803c7(0x28b)]['bind'](_0x40f7d8):_0x2d1e76=>new _0x252147(_0x40f7d8,_0x2d1e76),'txn':typeof _0x40f7d8[_0x2803c7(0x24f)]===_0x2803c7(0x2a8)?_0x40f7d8[_0x2803c7(0x24f)][_0x2803c7(0x306)](_0x40f7d8):(_0x4340c5,_0x5757e0)=>_0x252147[_0x2803c7(0x278)](_0x40f7d8,_0x4340c5,_0x5757e0)};}function _0x1790f4(_0x4c2d3b){const _0x25c899=_0x2c44;return{'name':_0x4c2d3b['name'],..._0x52e11f(_0x4c2d3b),'put':_0x4c2d3b[_0x25c899(0x24d)][_0x25c899(0x306)](_0x4c2d3b),'update':_0x4c2d3b[_0x25c899(0x233)][_0x25c899(0x306)](_0x4c2d3b),'patch':_0x4c2d3b[_0x25c899(0x218)][_0x25c899(0x306)](_0x4c2d3b),'create':_0x4c2d3b[_0x25c899(0x284)][_0x25c899(0x306)](_0x4c2d3b),'remove':_0x4c2d3b[_0x25c899(0x283)][_0x25c899(0x306)](_0x4c2d3b),'get':_0x4c2d3b[_0x25c899(0x254)][_0x25c899(0x306)](_0x4c2d3b),'getMany':_0x4c2d3b['getMany'][_0x25c899(0x306)](_0x4c2d3b),'getEntry':_0x4c2d3b['getEntry']['bind'](_0x4c2d3b),'getRange':_0x4c2d3b[_0x25c899(0x26e)]['bind'](_0x4c2d3b),'getValues':_0x4c2d3b[_0x25c899(0x2ac)][_0x25c899(0x306)](_0x4c2d3b),'getKeys':_0x4c2d3b[_0x25c899(0x1dd)][_0x25c899(0x306)](_0x4c2d3b),'getCount':_0x4c2d3b[_0x25c899(0x257)]['bind'](_0x4c2d3b),'getByPrefix':_0x4c2d3b[_0x25c899(0x31e)][_0x25c899(0x306)](_0x4c2d3b),'getIndex':_0x4c2d3b[_0x25c899(0x2a3)]['bind'](_0x4c2d3b),'byIndex':_0x4c2d3b['byIndex'][_0x25c899(0x306)](_0x4c2d3b),'query':_0x4c2d3b[_0x25c899(0x1f2)]['bind'](_0x4c2d3b),'geoQuery':_0x4c2d3b['geoQuery'][_0x25c899(0x306)](_0x4c2d3b),'ftsQuery':_0x4c2d3b['ftsQuery'][_0x25c899(0x306)](_0x4c2d3b),'setTTL':_0x4c2d3b['setTTL']['bind'](_0x4c2d3b),'getTTL':_0x4c2d3b[_0x25c899(0x32d)][_0x25c899(0x306)](_0x4c2d3b),'clearTTL':_0x4c2d3b['clearTTL']['bind'](_0x4c2d3b),'sweepExpiredTTL':_0x4c2d3b[_0x25c899(0x223)][_0x25c899(0x306)](_0x4c2d3b),'listTTL':_0x4c2d3b[_0x25c899(0x20a)]['bind'](_0x4c2d3b),'ttlStats':_0x4c2d3b[_0x25c899(0x1c9)][_0x25c899(0x306)](_0x4c2d3b),'setDefaultTTL':_0x4c2d3b['setDefaultTTL'][_0x25c899(0x306)](_0x4c2d3b),'getDefaultTTL':_0x4c2d3b[_0x25c899(0x297)][_0x25c899(0x306)](_0x4c2d3b),'clearDefaultTTL':_0x4c2d3b[_0x25c899(0x255)][_0x25c899(0x306)](_0x4c2d3b),'registerType':_0x4c2d3b[_0x25c899(0x1fc)][_0x25c899(0x306)](_0x4c2d3b),'ensureType':_0x4c2d3b['ensureType'][_0x25c899(0x306)](_0x4c2d3b),'hasType':_0x4c2d3b['hasType'][_0x25c899(0x306)](_0x4c2d3b),'dropType':_0x4c2d3b[_0x25c899(0x2e9)][_0x25c899(0x306)](_0x4c2d3b),'registerIndex':_0x4c2d3b[_0x25c899(0x2ef)][_0x25c899(0x306)](_0x4c2d3b),'hasIndex':_0x4c2d3b[_0x25c899(0x2db)][_0x25c899(0x306)](_0x4c2d3b),'dropIndex':_0x4c2d3b[_0x25c899(0x2bd)]['bind'](_0x4c2d3b),'resetIndex':_0x4c2d3b[_0x25c899(0x265)]['bind'](_0x4c2d3b),'indexReady':_0x4c2d3b['indexReady'][_0x25c899(0x306)](_0x4c2d3b),'getIndexStatus':_0x4c2d3b[_0x25c899(0x2ee)]['bind'](_0x4c2d3b),'getClock':_0x4c2d3b[_0x25c899(0x347)]['bind'](_0x4c2d3b),'getChanges':_0x4c2d3b['getChanges'][_0x25c899(0x306)](_0x4c2d3b),'count':_0x4c2d3b['count'][_0x25c899(0x306)](_0x4c2d3b),'range':_0x4c2d3b[_0x25c899(0x252)][_0x25c899(0x306)](_0x4c2d3b),'now':_0x4c2d3b['now']['bind'](_0x4c2d3b)};}function _0x1c179f(_0x436345){const _0x1d64fc=_0x2c44;if(!_0x436345)return null;const _0x5cf8a3={};for(const _0x24b5cf of['enqueue',_0x1d64fc(0x1f9),'list',_0x1d64fc(0x256),'removeJob',_0x1d64fc(0x2a4),_0x1d64fc(0x1d8),_0x1d64fc(0x34c)]){if(typeof _0x436345[_0x24b5cf]===_0x1d64fc(0x2a8))_0x5cf8a3[_0x24b5cf]=_0x436345[_0x24b5cf]['bind'](_0x436345);}return Object[_0x1d64fc(0x228)](_0x5cf8a3)[_0x1d64fc(0x2ae)]?_0x5cf8a3:null;}function _0x460200(_0x2464f4){const _0x5ba77b=_0x2c44;if(!_0x2464f4)return null;const _0x2d3a35={};for(const _0x514afb of[_0x5ba77b(0x32a),'stream','read',_0x5ba77b(0x283),_0x5ba77b(0x254),_0x5ba77b(0x320)]){if(typeof _0x2464f4[_0x514afb]==='function')_0x2d3a35[_0x514afb]=_0x2464f4[_0x514afb]['bind'](_0x2464f4);}return Object[_0x5ba77b(0x228)](_0x2d3a35)[_0x5ba77b(0x2ae)]?_0x2d3a35:null;}function _0x239ed0(_0x218a75){const _0x81cbb4=_0x2c44;return{'env':_0x218a75[_0x81cbb4(0x2be)][_0x81cbb4(0x306)](_0x218a75),'createEnvironment':_0x218a75['createEnvironment'][_0x81cbb4(0x306)](_0x218a75),'removeEnvironment':_0x218a75[_0x81cbb4(0x234)][_0x81cbb4(0x306)](_0x218a75),'info':_0x218a75[_0x81cbb4(0x2e5)],..._0x52e11f(_0x218a75),'put':_0x218a75[_0x81cbb4(0x24d)][_0x81cbb4(0x306)](_0x218a75),'update':_0x218a75['update']['bind'](_0x218a75),'patch':_0x218a75[_0x81cbb4(0x218)][_0x81cbb4(0x306)](_0x218a75),'create':_0x218a75[_0x81cbb4(0x284)]['bind'](_0x218a75),'remove':_0x218a75['remove'][_0x81cbb4(0x306)](_0x218a75),'get':_0x218a75[_0x81cbb4(0x254)][_0x81cbb4(0x306)](_0x218a75),'getMany':_0x218a75[_0x81cbb4(0x1cc)]['bind'](_0x218a75),'getEntry':_0x218a75['getEntry'][_0x81cbb4(0x306)](_0x218a75),'getRange':_0x218a75[_0x81cbb4(0x26e)]['bind'](_0x218a75),'getValues':_0x218a75[_0x81cbb4(0x2ac)][_0x81cbb4(0x306)](_0x218a75),'getKeys':_0x218a75[_0x81cbb4(0x1dd)][_0x81cbb4(0x306)](_0x218a75),'getCount':_0x218a75[_0x81cbb4(0x257)][_0x81cbb4(0x306)](_0x218a75),'getByPrefix':_0x218a75[_0x81cbb4(0x31e)][_0x81cbb4(0x306)](_0x218a75),'getIndex':_0x218a75[_0x81cbb4(0x2a3)][_0x81cbb4(0x306)](_0x218a75),'byIndex':_0x218a75[_0x81cbb4(0x303)][_0x81cbb4(0x306)](_0x218a75),'query':_0x218a75[_0x81cbb4(0x1f2)][_0x81cbb4(0x306)](_0x218a75),'setTTL':_0x218a75[_0x81cbb4(0x25d)][_0x81cbb4(0x306)](_0x218a75),'getTTL':_0x218a75[_0x81cbb4(0x32d)][_0x81cbb4(0x306)](_0x218a75),'clearTTL':_0x218a75['clearTTL'][_0x81cbb4(0x306)](_0x218a75),'sweepExpiredTTL':_0x218a75['sweepExpiredTTL'][_0x81cbb4(0x306)](_0x218a75),'listTTL':_0x218a75[_0x81cbb4(0x20a)][_0x81cbb4(0x306)](_0x218a75),'ttlStats':_0x218a75[_0x81cbb4(0x1c9)]['bind'](_0x218a75),'setDefaultTTL':_0x218a75['setDefaultTTL']['bind'](_0x218a75),'getDefaultTTL':_0x218a75['getDefaultTTL'][_0x81cbb4(0x306)](_0x218a75),'clearDefaultTTL':_0x218a75[_0x81cbb4(0x255)][_0x81cbb4(0x306)](_0x218a75),'ensureType':_0x218a75[_0x81cbb4(0x282)][_0x81cbb4(0x306)](_0x218a75),'registerType':_0x218a75['registerType']['bind'](_0x218a75),'hasType':_0x218a75[_0x81cbb4(0x22e)][_0x81cbb4(0x306)](_0x218a75),'dropType':_0x218a75[_0x81cbb4(0x2e9)]['bind'](_0x218a75),'registerIndex':_0x218a75['registerIndex'][_0x81cbb4(0x306)](_0x218a75),'hasIndex':_0x218a75[_0x81cbb4(0x2db)][_0x81cbb4(0x306)](_0x218a75),'dropIndex':_0x218a75[_0x81cbb4(0x2bd)][_0x81cbb4(0x306)](_0x218a75),'resetIndex':_0x218a75['resetIndex']['bind'](_0x218a75),'indexReady':_0x218a75['indexReady'][_0x81cbb4(0x306)](_0x218a75),'getIndexStatus':_0x218a75[_0x81cbb4(0x2ee)]['bind'](_0x218a75),'getClock':_0x218a75['getClock'][_0x81cbb4(0x306)](_0x218a75),'getChanges':_0x218a75[_0x81cbb4(0x345)][_0x81cbb4(0x306)](_0x218a75),'queue':_0x218a75[_0x81cbb4(0x236)],'files':_0x218a75['files']};}return okdbFunctionsFacades={'createEnvFacade':_0x1790f4,'createQueueFacade':_0x1c179f,'createFilesFacade':_0x460200,'createGlobalFacade':_0x239ed0},okdbFunctionsFacades;}var okdbFunctionsDryrun,hasRequiredOkdbFunctionsDryrun;function requireOkdbFunctionsDryrun(){const _0x10ebc9=_0x2928d4;if(hasRequiredOkdbFunctionsDryrun)return okdbFunctionsDryrun;hasRequiredOkdbFunctionsDryrun=0x1;const _0x23017c=new Set([_0x10ebc9(0x24d),_0x10ebc9(0x218),'create',_0x10ebc9(0x283),_0x10ebc9(0x233),_0x10ebc9(0x25d),'clearTTL','sweepExpiredTTL','setDefaultTTL',_0x10ebc9(0x255),'dropType',_0x10ebc9(0x2bd),_0x10ebc9(0x265)]),_0xc1bdc2=new Set([_0x10ebc9(0x1d7),_0x10ebc9(0x256),_0x10ebc9(0x2cc),_0x10ebc9(0x2a4)]),_0xd2eb2c=new Set([_0x10ebc9(0x32a),'remove']);function _0x522501(_0x2f99b7,_0x502232){const _0x473737=_0x10ebc9;if(_0x2f99b7==='env'||_0x2f99b7===_0x473737(0x277))return _0x23017c[_0x473737(0x2f7)](_0x502232);if(_0x2f99b7===_0x473737(0x236))return _0xc1bdc2['has'](_0x502232);if(_0x2f99b7===_0x473737(0x270))return _0xd2eb2c[_0x473737(0x2f7)](_0x502232);return![];}function _0x302dd0(_0x3e73b5,_0x2e9b84,_0x5952b5,_0x5b7419){if(!_0x3e73b5)return _0x3e73b5;return new Proxy(_0x3e73b5,{'get'(_0x2f3870,_0x2d6b81,_0x3d25a4){const _0x1388e0=_0x2c44,_0x59fa74=Reflect['get'](_0x2f3870,_0x2d6b81,_0x3d25a4);if(typeof _0x59fa74!==_0x1388e0(0x2a8))return _0x59fa74;if(!_0x522501(_0x2e9b84,_0x2d6b81))return _0x59fa74[_0x1388e0(0x306)](_0x2f3870);return function(..._0x44267e){const _0x3974d8=_0x1388e0;return _0x5b7419[_0x3974d8(0x1c1)]({'scope':_0x2e9b84,'method':_0x2d6b81,'envName':_0x5952b5,'args':_0x44267e}),null;};}});}function _0x24dc1d(_0x57aa71,_0x29e1e3,_0xcb3c9d,_0xdd5c33){const _0x13bea9={};for(const _0x24d160 of _0xcb3c9d){_0x13bea9[_0x24d160]=(..._0x51d627)=>{const _0x542244=_0x2c44;return _0x522501(_0x57aa71,_0x24d160)&&_0xdd5c33[_0x542244(0x1c1)]({'scope':_0x57aa71,'method':_0x24d160,'envName':_0x29e1e3,'args':_0x51d627}),null;};}return _0x13bea9;}return okdbFunctionsDryrun={'isWriteMethod':_0x522501,'wrapForDryRun':_0x302dd0,'syntheticDryRunFacade':_0x24dc1d,'ENV_WRITE_METHODS':_0x23017c,'QUEUE_WRITE_METHODS':_0xc1bdc2,'FILES_WRITE_METHODS':_0xd2eb2c},okdbFunctionsDryrun;}var okdbFunctionsContext,hasRequiredOkdbFunctionsContext;function requireOkdbFunctionsContext(){const _0x180357=_0x2928d4;if(hasRequiredOkdbFunctionsContext)return okdbFunctionsContext;hasRequiredOkdbFunctionsContext=0x1;const {createEnvFacade:_0x3daea7,createQueueFacade:_0x355288,createFilesFacade:_0x40ca33,createGlobalFacade:_0x4a323b}=requireOkdbFunctionsFacades(),{wrapForDryRun:_0x32d34f,syntheticDryRunFacade:_0x3a2b94}=requireOkdbFunctionsDryrun(),_0x157f21=[_0x180357(0x1d7),'getJob',_0x180357(0x1ea),_0x180357(0x256),_0x180357(0x2cc),'addBucket',_0x180357(0x1d8),_0x180357(0x34c)],_0x3e346c=[_0x180357(0x32a),_0x180357(0x1b9),'read',_0x180357(0x283),'get',_0x180357(0x320)];function _0x21751c(_0x3296e8,_0x3942ec){const _0x16b6cb=_0x180357,_0x4409fd=(_0x4d43ed,_0x551593,_0x12ea1a)=>_0x3942ec({'type':'log','requestId':_0x3296e8['requestId'],'runId':_0x3296e8['runId'],'entry':{'level':_0x4d43ed,'msg':_0x551593,'context':_0x12ea1a,'ts':Date[_0x16b6cb(0x2a1)]()}}),_0x4620f4=(_0x56c93b,_0x21fc69)=>_0x4409fd(_0x16b6cb(0x2e5),_0x56c93b,_0x21fc69);return _0x4620f4[_0x16b6cb(0x2e5)]=(_0x24f4ed,_0x480637)=>_0x4409fd(_0x16b6cb(0x2e5),_0x24f4ed,_0x480637),_0x4620f4[_0x16b6cb(0x30f)]=(_0x491c76,_0x40bedc)=>_0x4409fd(_0x16b6cb(0x30f),_0x491c76,_0x40bedc),_0x4620f4[_0x16b6cb(0x298)]=(_0x4f5704,_0x17c3be)=>_0x4409fd('error',_0x4f5704,_0x17c3be),_0x4620f4[_0x16b6cb(0x30e)]=(_0x42afb6,_0x28f50f)=>_0x4409fd(_0x16b6cb(0x30e),_0x42afb6,_0x28f50f),_0x4620f4;}function _0x1d4327(_0x1c68e3,_0x37af47,_0x960695){const _0x3873cb=_0x180357;if(!_0x1c68e3)return null;return{'id':_0x1c68e3['id']??null,'type':_0x1c68e3[_0x3873cb(0x273)]??null,'tries':_0x1c68e3['tries']??null,'created':_0x1c68e3[_0x3873cb(0x25f)]??null,'tags':_0x1c68e3[_0x3873cb(0x288)]??null,'priority':_0x1c68e3[_0x3873cb(0x325)]??null,'bucket':_0x1c68e3[_0x3873cb(0x21c)]??null,'cron':_0x1c68e3[_0x3873cb(0x1d6)]??null,'heartbeat'(){const _0xd560df=_0x3873cb;_0x960695({'type':'job_heartbeat','requestId':_0x37af47[_0xd560df(0x1ba)],'runId':_0x37af47['runId'],'jobId':_0x1c68e3['id'],'claimId':_0x1c68e3['claimId']});},'markProgress'(_0x2df639){const _0x7642f0=_0x3873cb;_0x960695({'type':_0x7642f0(0x1fa),'requestId':_0x37af47[_0x7642f0(0x1ba)],'runId':_0x37af47[_0x7642f0(0x2b3)],'jobId':_0x1c68e3['id'],'claimId':_0x1c68e3[_0x7642f0(0x2ed)],'message':_0x2df639});}};}function _0x38ac29(_0x560c84){const _0xdc7fc8=_0x180357;if(!_0x560c84)return null;return{'mode':_0x560c84[_0xdc7fc8(0x32c)]??null,'sourceType':_0x560c84[_0xdc7fc8(0x34b)]??null,'sourceEnv':_0x560c84[_0xdc7fc8(0x2c2)]??null,'processor':_0x560c84['processor']??null,'engineKey':_0x560c84[_0xdc7fc8(0x2a5)]??null,'cursorKey':_0x560c84[_0xdc7fc8(0x2a9)]??null};}function _0x2b1dba(_0x386261){const _0x200dd2=_0x180357;if(!_0x386261)return null;return{'mode':_0x386261['mode']??null,'sourceType':_0x386261[_0x200dd2(0x34b)]??null,'targetType':_0x386261[_0x200dd2(0x30d)]??null,'sourceEnv':_0x386261[_0x200dd2(0x2c2)]??null,'targetEnv':_0x386261[_0x200dd2(0x1ae)]??null,'engineKey':_0x386261[_0x200dd2(0x2a5)]??null,'cursorKey':_0x386261[_0x200dd2(0x2a9)]??null};}function _0x469120(_0x21c763,_0x18bcb9,_0x5929ce,_0x56e0b7=null,_0xb4ba56=null){const _0xdcb314=_0x180357,_0x214e79={'runId':_0x18bcb9[_0xdcb314(0x2b3)],'scope':_0xdcb314(0x2be),'env':_0x18bcb9[_0xdcb314(0x29c)]??null,'functionName':_0x18bcb9[_0xdcb314(0x342)],'trigger':_0x18bcb9[_0xdcb314(0x2e5)]?.[_0xdcb314(0x1ce)]??_0xdcb314(0x304),'requestedAt':_0x18bcb9[_0xdcb314(0x2e5)]?.[_0xdcb314(0x226)]??Date[_0xdcb314(0x2a1)]()},_0x2b1e5a=_0x21751c(_0x18bcb9,_0x5929ce),_0x417d89=AbortSignal[_0xdcb314(0x1e1)](Math[_0xdcb314(0x2de)](0x1,_0x18bcb9[_0xdcb314(0x317)]?.[_0xdcb314(0x232)]??0x3e8)),_0x2a5b27=_0xb4ba56?AbortSignal[_0xdcb314(0x264)]([_0x417d89,_0xb4ba56]):_0x417d89,_0x381a23=_0x21c763[_0xdcb314(0x2be)](_0x18bcb9['envName']),_0xa36d52=_0x56e0b7?_0x32d34f(_0x381a23,_0xdcb314(0x2be),_0x18bcb9[_0xdcb314(0x29c)],_0x56e0b7):_0x381a23,_0x303e6b=_0x56e0b7?_0x381a23[_0xdcb314(0x236)]?_0x32d34f(_0x381a23['queue'],_0xdcb314(0x236),_0x18bcb9[_0xdcb314(0x29c)],_0x56e0b7):_0x3a2b94(_0xdcb314(0x236),_0x18bcb9['envName'],_0x157f21,_0x56e0b7):_0x381a23[_0xdcb314(0x236)],_0x4c2e4c=_0x56e0b7?_0x381a23['files']?_0x32d34f(_0x381a23[_0xdcb314(0x270)],_0xdcb314(0x270),_0x18bcb9[_0xdcb314(0x29c)],_0x56e0b7):_0x3a2b94('files',_0x18bcb9[_0xdcb314(0x29c)],_0x3e346c,_0x56e0b7):_0x381a23[_0xdcb314(0x270)],_0x4cb8a4=_0x3daea7(_0xa36d52),_0x50bde2=_0x355288(_0x303e6b),_0x35f749=_0x40ca33(_0x4c2e4c);if(_0x50bde2)_0x4cb8a4[_0xdcb314(0x236)]=_0x50bde2;if(_0x35f749)_0x4cb8a4[_0xdcb314(0x270)]=_0x35f749;const _0x2aa431={'payload':_0x18bcb9[_0xdcb314(0x1fd)]??null,'info':_0x214e79,'signal':_0x2a5b27,'log':_0x2b1e5a,'env':_0x4cb8a4},_0x398ddb=_0x1d4327(_0x18bcb9[_0xdcb314(0x21f)],_0x18bcb9,_0x5929ce);if(_0x398ddb)_0x2aa431['job']=_0x398ddb;const _0x2f7752=_0x38ac29(_0x18bcb9[_0xdcb314(0x243)]);if(_0x2f7752)_0x2aa431[_0xdcb314(0x208)]=_0x2f7752;const _0x3ccd2c=_0x2b1dba(_0x18bcb9[_0xdcb314(0x269)]);if(_0x3ccd2c)_0x2aa431[_0xdcb314(0x1e7)]=_0x3ccd2c;if(_0x18bcb9['unsafe']){const _0x2aa324=_0x56e0b7?_0x32d34f(_0x21c763,'global',null,_0x56e0b7):_0x21c763;_0x2aa431[_0xdcb314(0x2f6)]=_0x4a323b(_0x2aa324);}return _0x2aa431;}return okdbFunctionsContext={'createExecutionContext':_0x469120,'createScriptLogger':_0x21751c},okdbFunctionsContext;}var hasRequiredOkdbFunctionsSandboxWorker;function requireOkdbFunctionsSandboxWorker(){const _0x4d84d5=_0x2928d4;if(hasRequiredOkdbFunctionsSandboxWorker)return okdbFunctionsSandboxWorker$1;hasRequiredOkdbFunctionsSandboxWorker=0x1;const {parentPort:_0x52ac55,workerData:_0x1f3def}=require$$0$4;requireOkdbFatalReport()[_0x4d84d5(0x280)](_0x4d84d5(0x294));const _0x4d908d=require$$2,{compileFunctionExpression:_0x3ed481}=requireOkdbFunctionsSandbox(),{serializeError:_0x5a1ce8}=requireOkdbFunctionsIpc(),{createExecutionContext:_0x465d20}=requireOkdbFunctionsContext(),_0x202c73=require$$6;let _0x5e6609=null,_0x42f03a=![];const _0x113e60=new Map(),_0x223046=new Map();function _0x44d16b(_0x49de25){const _0x4c4125=_0x4d84d5;try{_0x52ac55[_0x4c4125(0x229)](_0x49de25);}catch{}}function _0x375f15(_0x1effb5){const _0x42c651=_0x4d84d5,_0x3df3a8=(_0x1effb5[_0x42c651(0x29c)]||_0x42c651(0x2c9))+':'+_0x1effb5[_0x42c651(0x342)]+':'+_0x1effb5[_0x42c651(0x330)]+':'+_0x1effb5[_0x42c651(0x1db)];let _0x35421a=_0x113e60[_0x42c651(0x254)](_0x3df3a8);return!_0x35421a&&(_0x35421a=_0x3ed481(_0x1effb5[_0x42c651(0x2c0)],{'allowFetch':_0x1effb5[_0x42c651(0x317)]?.[_0x42c651(0x1f3)]!==![],'allowedFetchDomains':_0x1effb5[_0x42c651(0x317)]?.[_0x42c651(0x1ee)],'filename':_0x1effb5[_0x42c651(0x342)]+_0x42c651(0x20f)}),_0x113e60['set'](_0x3df3a8,_0x35421a)),_0x35421a;}async function _0x144ef1(_0x4e541e){const _0x22e9a7=_0x4d84d5,_0x1764a7=Date[_0x22e9a7(0x2a1)](),_0xeb8596=new AbortController();_0x223046['set'](_0x4e541e[_0x22e9a7(0x1ba)],_0xeb8596);try{const _0x3b791b=_0x375f15(_0x4e541e);if(_0x4e541e[_0x22e9a7(0x29c)])await _0x5e6609[_0x22e9a7(0x23c)](_0x4e541e[_0x22e9a7(0x29c)]);const _0x16a3d9=_0x4e541e[_0x22e9a7(0x22d)]?[]:null,_0x44f526=_0x465d20(_0x5e6609,_0x4e541e,_0x44d16b,_0x16a3d9,_0xeb8596[_0x22e9a7(0x27c)]),_0x191531=await _0x3b791b(_0x44f526),_0x52f6d0={'type':_0x22e9a7(0x267),'requestId':_0x4e541e['requestId'],'runId':_0x4e541e[_0x22e9a7(0x2b3)],'result':_0x191531,'meta':{'runnerId':'sandbox-'+process['pid'],'startedAt':_0x1764a7,'finishedAt':Date[_0x22e9a7(0x2a1)](),'durationMs':Date[_0x22e9a7(0x2a1)]()-_0x1764a7}};if(_0x16a3d9)_0x52f6d0[_0x22e9a7(0x1c0)]=_0x16a3d9;_0x44d16b(_0x52f6d0);}catch(_0x5f1918){_0x44d16b({'type':_0x22e9a7(0x298),'requestId':_0x4e541e[_0x22e9a7(0x1ba)],'runId':_0x4e541e[_0x22e9a7(0x2b3)],'error':_0x5a1ce8(_0x5f1918),'meta':{'runnerId':_0x22e9a7(0x279)+process[_0x22e9a7(0x241)],'startedAt':_0x1764a7,'finishedAt':Date[_0x22e9a7(0x2a1)](),'durationMs':Date[_0x22e9a7(0x2a1)]()-_0x1764a7}});}finally{_0x223046[_0x22e9a7(0x2fe)](_0x4e541e['requestId']);}}async function _0x447fe7(){const _0x5b7ecb=_0x4d84d5;if(_0x42f03a)return;_0x42f03a=!![];try{await _0x5e6609?.[_0x5b7ecb(0x2b9)]?.();}catch{}process[_0x5b7ecb(0x1bb)](0x0);}async function _0x2c43f(){const _0x1c883f=_0x4d84d5,{rootPath:_0x4414db}=_0x1f3def??{};if(!_0x4414db)throw new Error(_0x1c883f(0x27d));_0x5e6609=new _0x202c73(_0x4414db,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]},'processes':![]}),await _0x5e6609[_0x1c883f(0x247)]();const _0x42d654=setInterval(()=>{const _0x3909e2=_0x1c883f;if(_0x42f03a)return;for(const [,_0x55362b]of _0x5e6609['_envs']){try{_0x55362b[_0x3909e2(0x1f4)]?.();}catch{}}},0xc8);if(typeof _0x42d654[_0x1c883f(0x286)]===_0x1c883f(0x2a8))_0x42d654[_0x1c883f(0x286)]();_0x52ac55['on'](_0x1c883f(0x1f8),_0x133fba=>{const _0x25858b=_0x1c883f;if(!_0x133fba||typeof _0x133fba!=='object')return;if(_0x133fba[_0x25858b(0x273)]===_0x25858b(0x2e2))return void _0x447fe7();if(_0x133fba[_0x25858b(0x273)]===_0x25858b(0x1df)){_0x223046[_0x25858b(0x254)](_0x133fba[_0x25858b(0x1ba)])?.[_0x25858b(0x1cb)](new Error(_0x25858b(0x1bd)));return;}_0x133fba[_0x25858b(0x273)]===_0x25858b(0x278)&&void _0x144ef1(_0x133fba['job']);});const _0x308614=Math[_0x1c883f(0x2de)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x362d71=setInterval(()=>{const _0x531aef=_0x1c883f;try{_0x44d16b({'type':_0x531aef(0x333),'heapUsed':_0x4d908d[_0x531aef(0x2cb)]()['used_heap_size']});}catch{}},_0x308614);if(typeof _0x362d71['unref']===_0x1c883f(0x2a8))_0x362d71[_0x1c883f(0x286)]();_0x44d16b({'type':_0x1c883f(0x2f9)});}return _0x2c43f()['catch'](_0x58a191=>{const _0x79919c=_0x4d84d5;_0x44d16b({'type':_0x79919c(0x2ec),'error':_0x5a1ce8(_0x58a191)}),process['exit'](0x1);}),okdbFunctionsSandboxWorker$1;}var okdbFunctionsSandboxWorkerExports=requireOkdbFunctionsSandboxWorker(),okdbFunctionsSandboxWorker=getDefaultExportFromCjs(okdbFunctionsSandboxWorkerExports);module[_0x2928d4(0x23d)]=okdbFunctionsSandboxWorker;