@kedem/okdb 1.9.2 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/algorithm-worker-thread.js +1 -0
- package/bin/okdb.js +1 -1
- package/docs/deployment.md +155 -0
- package/docs/diagnostics.md +115 -0
- package/docs/embeddings.md +1 -1
- package/docs/functions.md +30 -27
- package/docs/getting-started.md +14 -3
- package/docs/http-api.md +3 -3
- package/docs/http-cluster.md +93 -60
- package/docs/index.md +13 -1
- package/docs/manifest.json +6 -3
- package/docs/pipelines.md +1 -1
- package/docs/process-registry.md +5 -5
- package/docs/processors.md +35 -18
- package/docs/queue.md +112 -42
- package/docs/sync.md +10 -7
- package/docs/ttl.md +1 -1
- package/docs/upgrade-2.0.md +290 -0
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/layouts/_default.ok.html +1 -1
- package/public/sections/db/modals/create-env-modal.ok.js +1 -1
- package/public/sections/db/modals/demo-env-modal.ok.js +1 -1
- package/public/sections/db/parts/db-overview.ok.js +1 -1
- package/public/sections/engines/engine-ui-utils.js +1 -1
- package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
- package/public/sections/engines/parts/generic-engine-panel.ok.js +1 -1
- package/public/sections/queue/parts/code-panel.ok.js +1 -1
- package/public/sections/queue/parts/job-log-panel.ok.js +1 -1
- package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
- package/public/sections/sync/parts/sync-topology.ok.js +1 -1
- package/public/sections/system/index.ok.html +1 -1
- package/public/sections/system/parts/system-process-panel.ok.js +1 -1
- package/public/sections/system/parts/system-processing-panel.ok.js +1 -1
- package/public/sections/system/parts/system-runtime-overview.ok.js +1 -1
- package/public/setup-app.js +1 -1
- package/public/setup.html +116 -55
- package/types/index.d.ts +33 -3
- package/types/options.d.ts +19 -10
- package/docs/worker-fleet.md +0 -139
- package/okdb-functions-runner-child.js +0 -1
- package/okdb-queue-load-handler.js +0 -1
- package/okdb-queue-spawn-child.js +0 -1
- package/okdb-worker-child.js +0 -1
- package/public/sections/system/parts/system-workers-panel.ok.js +0 -1
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
# Upgrading to okdb 2.0
|
|
2
|
+
|
|
3
|
+
okdb 2.0 is a **breaking redesign of the runtime model**. The document model, storage
|
|
4
|
+
formats, HLC, sync wire protocol, and query/index APIs are **unchanged** — your data and
|
|
5
|
+
your read/write code keep working as-is. What changed is **how a process declares the work
|
|
6
|
+
it does**.
|
|
7
|
+
|
|
8
|
+
> **The one-sentence shift.** okdb stops being a runtime _orchestrator_ (a managed,
|
|
9
|
+
> auto-scaled "worker population") and becomes a _substrate_: **the process is the control
|
|
10
|
+
> unit**, it **declares** what it runs (it is never told by a supervisor), the per-`(env,type)`
|
|
11
|
+
> lease is the load balancer, and **spawning/placement is the launcher's job** — `bin/okdb`,
|
|
12
|
+
> systemd/k8s, or your own code. `new OKDB(path)` is still a correct, do-everything
|
|
13
|
+
> single-process node; you only add nodes when you decide you need them.
|
|
14
|
+
|
|
15
|
+
If you only ever used `new OKDB(path)` and the built-in CLI, **most of this doesn't affect
|
|
16
|
+
you** — the zero-config default is unchanged. The breaking surface is concentrated in the
|
|
17
|
+
constructor options and a few cluster/worker APIs.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Constructor: now pure policy
|
|
22
|
+
|
|
23
|
+
The constructor declares **what role a node plays**. Every _mechanism_ that used to be a flag
|
|
24
|
+
is now **derived** — okdb turns it on the moment it's needed.
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
new OKDB(path, {
|
|
28
|
+
processors: true | false, // does this node participate in processing? (claim leases + drain)
|
|
29
|
+
engines: true | false, // embeddings/vector-search this node runs
|
|
30
|
+
compaction: true | false, // eligible to claim the per-env compaction lease
|
|
31
|
+
auth,
|
|
32
|
+
encryptionKey,
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
There is no `http` constructor option — the HTTP server exists only when you call
|
|
37
|
+
`db.http.listen(port)`.
|
|
38
|
+
|
|
39
|
+
> **`processors` is a plain boolean.** An earlier 2.0 draft exposed a _filtered_ claim API
|
|
40
|
+
> (`processors: '<filter>'`, `db.processors.process()/processRest()/processEverything()`,
|
|
41
|
+
> per-node "dedication" + intent/complement). That was **removed** before release — it is one
|
|
42
|
+
> boolean: `true` = participate (claim every unclaimed `single` lease, the default), `false` =
|
|
43
|
+
> passive (claim nothing). Passing a filter string/array throws. See _Processors: one boolean_ below.
|
|
44
|
+
|
|
45
|
+
### Removed options — they now **throw** with a migration message
|
|
46
|
+
|
|
47
|
+
| 1.9 option | 2.0 | Error |
|
|
48
|
+
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
|
|
49
|
+
| `asyncProcessors: true` | `processors: true` (participate — claim every unclaimed lease) | _(thrown, with message)_ |
|
|
50
|
+
| `asyncProcessors: false` | `processors: false` (passive — claim nothing) | _(thrown, with message)_ |
|
|
51
|
+
| `processors: '<filter>'` (2.0 draft) | `processors: true \| false` — the filtered claim form was removed before release | _(thrown, with message)_ |
|
|
52
|
+
| `bus: true \| false` | **removed** — auto-enabled when the LMDB path is shared and the shmbuf native binding is present | `BUS_OPTION_REMOVED` |
|
|
53
|
+
| `envs: 'all' \| 'core' \| […]` | **removed** — envs always open lazily; `removeEnvironment` broadcasts a release signal so handles close | `ENVS_REMOVED` |
|
|
54
|
+
| `sync: false` (per env) | **removed** — the changelog auto-enables for every user env; a pure local store simply never gets a consumer | `SYNC_OPTION_REMOVED` |
|
|
55
|
+
| `processing: 'auto' \| 'main'` | **removed** — participation is the `processors` boolean (see below) | `PROCESSING_REMOVED` _(thrown)_ |
|
|
56
|
+
| `processing: 'threads' \| 'processes'` | **removed** — there is no execution placement to configure: all drains run on the owner's loop in bounded quanta (see _Execution_ below) | `PROCESSING_REMOVED` _(thrown)_ |
|
|
57
|
+
| `workers: …` | **removed** — there is no managed population (see _Workers dissolved_) | _(see `db.workers` below)_ |
|
|
58
|
+
| `compaction: 'active' \| 'passive'` | **removed** (pre-release draft alias, never shipped) — `compaction` is boolean-only, like the other role flags | `COMPACTION_ALIAS_REMOVED` |
|
|
59
|
+
|
|
60
|
+
**Why these are safe to remove:** `bus` is load-bearing but detectable (shared path ⇒ on);
|
|
61
|
+
`envs` was never a real boundary (self-trusted embedded code can `openEnv()` anything) — its
|
|
62
|
+
only job was a Windows file-deletion race, now fixed by the env-release broadcast; the
|
|
63
|
+
changelog only costs anything when something consumes it, so it switches on with the first
|
|
64
|
+
consumer (a view, FTS, processor, subscription, or replication peer) — pre-existing writes are
|
|
65
|
+
covered by that consumer's normal bootstrap (snapshot scan + replay tail).
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Processors: one boolean
|
|
70
|
+
|
|
71
|
+
A node either **participates** in processing or it doesn't. That's the whole control surface.
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
new OKDB(path, { processors: true }); // participate: claim every unclaimed `single` lease (default)
|
|
75
|
+
new OKDB(path, { processors: false }); // passive: claim nothing (reads/writes + inline still work)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- `new OKDB(path)` (no `processors` option) ⇒ **`processors: true`** — a single node claims
|
|
79
|
+
everything, exactly like 1.9's default full-role instance.
|
|
80
|
+
- The per-`(env,type)` `OKDBLock` lease is the load balancer: with N participating nodes, each
|
|
81
|
+
`single` processor is claimed by exactly one of them (1-of-N); a dead node's leases lapse and a
|
|
82
|
+
survivor re-claims (failover).
|
|
83
|
+
- Under sustained load the lease **load-shares by cooperative hold-window claiming**: a holder
|
|
84
|
+
drains for up to `OKDB_LEASE_HOLD_MS` (200 ms) per window and yields **only if a peer has
|
|
85
|
+
signalled it wants a turn** (a decaying marker in `~lock:want`). A lone process therefore keeps
|
|
86
|
+
its leases and drains at full speed with zero lock churn; when a second process has backlog they
|
|
87
|
+
rotate, splitting the work ≈evenly.
|
|
88
|
+
- Coverage is guaranteed while ≥1 participating node is live. A `single` processor that **no**
|
|
89
|
+
live node claims surfaces as **`unclaimed`** in the Processors view (a warning).
|
|
90
|
+
|
|
91
|
+
`asyncProcessors: true` ≡ `processors: true`; `asyncProcessors: false` ≡ `processors: false`.
|
|
92
|
+
|
|
93
|
+
> **Removed:** the filtered claim API — `processors: '<filter>'`, `db.processors.process(filter)`,
|
|
94
|
+
> `processRest()`, `processEverything()`, and per-node dedication/intent/complement. There is no
|
|
95
|
+
> per-type claim filter: every participating node is identical and the lease distributes the work.
|
|
96
|
+
> The verbs throw with a migration message; a filter value throws at construction. To **dedicate**
|
|
97
|
+
> hardware to processing, invert the flag: run the dedicated node with `processors: true` and open
|
|
98
|
+
> every other node `processors: false` — participation is per-node, so the passive nodes serve
|
|
99
|
+
> reads/writes while the dedicated one drains everything.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Execution: everything on the owner's loop
|
|
104
|
+
|
|
105
|
+
There is exactly **one** execution model, and it is the simple one:
|
|
106
|
+
|
|
107
|
+
- **The event loop** runs reads/writes, sync apply, and every derived-work drain (FTS, views,
|
|
108
|
+
time-machine, materializer, embeddings). A drain never runs monolithically: `_flush` works in
|
|
109
|
+
**FLUSH_QUANTUM-bounded batches** (default 5 000 changes, `OKDB_PROCESSOR_FLUSH_QUANTUM`;
|
|
110
|
+
heavy per-item handlers like FTS use a smaller per-processor quantum), yielding to the loop
|
|
111
|
+
between chunks. The single async **`OKDBWriter`** per env keeps commit fsyncs on lmdb-js's
|
|
112
|
+
native committer thread, so the loop is never blocked on durability.
|
|
113
|
+
- **The sandbox** is the one thread in the engine — it runs **untrusted** per-call function code
|
|
114
|
+
only. Its concurrency is capped per process (`OKDB_FN_SANDBOX_CONCURRENCY`).
|
|
115
|
+
- There is **no processing pool, no slot threads, no off-loop trusted compute**. This was built
|
|
116
|
+
and measured: okdb's derived work is write-dominated (posting/group read-modify-write + fsync),
|
|
117
|
+
which cannot leave the owner — threads bought ~1.0× at real workloads while adding shared-env
|
|
118
|
+
lifecycle hazards. If one process's loop is not enough, run more processes — the 1-of-N lease
|
|
119
|
+
spreads the processors across them (see _Processors_ above).
|
|
120
|
+
|
|
121
|
+
**Ephemeral nodes** (CLI one-shots, serverless, short-lived scripts) should pass
|
|
122
|
+
`processors: false`: a process that grabs a 1-of-N lease and exits mid-quantum would thrash it.
|
|
123
|
+
`bin/okdb`'s one-shot subcommands already open passive.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Workers dissolved — placement is the launcher's job
|
|
128
|
+
|
|
129
|
+
There is **no managed worker population** in 2.0. A "worker" was only ever a process that
|
|
130
|
+
opened the root and claimed processors.
|
|
131
|
+
|
|
132
|
+
| 1.9 | 2.0 |
|
|
133
|
+
| --------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
134
|
+
| `db.workers.ensure({ scale })` | **throws `WORKERS_REMOVED`.** Fork your own nodes: `new OKDB(path, { processors: true })`. |
|
|
135
|
+
| `db.workers.destroy()` | **throws `WORKERS_REMOVED`.** |
|
|
136
|
+
| autoscaler / desired-state / supervisor | gone from the library; survives only as **`bin/okdb`** launcher internals (the reference launcher). |
|
|
137
|
+
| `GET /api/workers`, `POST /api/workers/scale` | **410 `WORKERS_REMOVED`.** |
|
|
138
|
+
|
|
139
|
+
**To run a multi-process processing tier:** start more nodes over the same path — a plain
|
|
140
|
+
`new OKDB(path, { processors: true })` in a process you launch (pm2, systemd, docker, k8s, or
|
|
141
|
+
your own `child_process`). Opening the path _is_ joining — the leases distribute the work across
|
|
142
|
+
whatever nodes exist, and the hold-window rotation load-shares under sustained backlog.
|
|
143
|
+
|
|
144
|
+
okdb still **exposes the scaling signals** (per-processor durable lag, writer queue depth,
|
|
145
|
+
loop-lag) on the Processors/Processes admin surfaces so an external orchestrator can decide when
|
|
146
|
+
to add or retire nodes — but the _policy_ lives wherever you run the processes, not inside okdb.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## HTTP clustering: launcher-level only
|
|
151
|
+
|
|
152
|
+
A library node **never forks**. The embeddable child-entry clustering API is removed.
|
|
153
|
+
|
|
154
|
+
| 1.9 | 2.0 |
|
|
155
|
+
| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
156
|
+
| `http.listen(port, { workers, makeOkdb, primaryOkdb })` | **throws `HTTP_CLUSTER_REMOVED`.** |
|
|
157
|
+
| `bin/okdb` HTTP cluster | **N identical capable nodes** — each forked worker serves HTTP **and** processes (claims leases, drains on its own loop). No privileged processor; the Node-cluster primary is a thin **passive supervisor** (seeds the shared token secret, owns the registry). A dead worker's claims fail over to the rest. |
|
|
158
|
+
| embedder wants socket-sharing | use plain Node `cluster` yourself — a cluster worker calling `http.listen(port)` shares the socket natively, no okdb involvement. Or run **N independent `new OKDB(path)` full nodes** behind your balancer (same "N capable nodes" shape; they coordinate via the shared LMDB + bus + the 1-of-N lease). |
|
|
159
|
+
|
|
160
|
+
`http.listen(port)` (single-process) is **unchanged** and still returns a plain `http.Server`.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Queue & functions
|
|
165
|
+
|
|
166
|
+
**Queue.** The queue is a **substrate okdb coordinates but does not place** — handlers are trusted
|
|
167
|
+
user code of unknown nature. Single-execution and at-least-once come from the CAS claim on the
|
|
168
|
+
durable job row, not from any pool. One verb:
|
|
169
|
+
|
|
170
|
+
- `queue.process(type, closure)` — an in-process consumer on **this** loop.
|
|
171
|
+
|
|
172
|
+
Scale by running more independent consumer processes (pm2, systemd, docker, kubernetes). Each opens
|
|
173
|
+
okdb and calls `process()` — the durable CAS claim hands each job to exactly one consumer without
|
|
174
|
+
coordination. The canonical pattern is a `workers/default.js` standalone script (see docs/queue.md).
|
|
175
|
+
|
|
176
|
+
`queue.worker(type, module)` — the auto-adopted "shared pool" form — was **removed** (throws
|
|
177
|
+
`QUEUE_WORKER_REMOVED`). `queue.spawn(type, module)` — the dedicated forked child — was also
|
|
178
|
+
**removed** in 2.0. Run independent consumer processes instead; they claim the same durable jobs
|
|
179
|
+
exactly once via CAS. The orphan-lock hazard (a forked okdb child that outlives its parent holds
|
|
180
|
+
the LMDB lock) is avoided by using independent processes instead of `child_process.fork`.
|
|
181
|
+
|
|
182
|
+
**Functions.** A function runs on **the node it was asked on**, in that node's per-process
|
|
183
|
+
sandbox thread — no `~fn:requests` round-trip for synchronous calls. Durable / run-eventually
|
|
184
|
+
functions become a queue job on a designated node. `OKDB_FN_LEGACY_POOL` and the fork-pool
|
|
185
|
+
path are gone.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Processor handlers: named-registry vocab
|
|
190
|
+
|
|
191
|
+
okdb 2.0 adopts the **named-registry vocab** for processor handlers (PV-04). The document
|
|
192
|
+
model, storage formats, HLC, sync wire protocol, query/index, and view APIs are **unchanged**.
|
|
193
|
+
|
|
194
|
+
### Breaking: closure handlers rejected without a quantum or durable definition
|
|
195
|
+
|
|
196
|
+
Bare closures passed as `handler` to `processor.register()` are no longer accepted for
|
|
197
|
+
`single`/`fanout` processors. Replace them with one of:
|
|
198
|
+
|
|
199
|
+
- **Named handler** (built-in, resolved at runtime):
|
|
200
|
+
|
|
201
|
+
```js
|
|
202
|
+
// Register once at feature-load time:
|
|
203
|
+
OKDBProcessor.registerHandler('my:handler', async (ctx, changes, info) => { ... });
|
|
204
|
+
|
|
205
|
+
// Then register the processor:
|
|
206
|
+
env.processor.register('MyType', { handler: 'my:handler', mode: 'async', distribution: 'single', cursorKey: 'my:key' });
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
- **Module reference** (external file, resolved via `require`):
|
|
210
|
+
```js
|
|
211
|
+
env.processor.register('MyType', {
|
|
212
|
+
module: { path: require.resolve('./my-handler.js'), export: 'apply' },
|
|
213
|
+
mode: 'async',
|
|
214
|
+
distribution: 'single',
|
|
215
|
+
cursorKey: 'my:key',
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Internal processors that need a closure snapshot-handler must pair it with a `quantum`
|
|
220
|
+
(the reconstructible drain module — FTS, time-machine, materializer use this form) or declare
|
|
221
|
+
`definition: { durable: true }` for inline processors.
|
|
222
|
+
|
|
223
|
+
### New: handler identity in status output
|
|
224
|
+
|
|
225
|
+
`processor.status()`, `GET /api/processors`, and `GET /api/processors/status` now include:
|
|
226
|
+
|
|
227
|
+
- `handler`: the registered handler name (`'my:handler'`), or `null`
|
|
228
|
+
- `module`: the module spec (`{ path, export }`), or `null`
|
|
229
|
+
|
|
230
|
+
These fields are also persisted to `~proc:state` as `<cursorKey>:handlerMeta` so the
|
|
231
|
+
handler identity is durable across restarts.
|
|
232
|
+
|
|
233
|
+
### Stored-meta migration
|
|
234
|
+
|
|
235
|
+
On open, FTS type meta (`typesDb`) and procmode desired-state records are automatically
|
|
236
|
+
migrated: `runIn` is dropped, and old mode tokens (`worker`→`single`, `async`→`fanout`)
|
|
237
|
+
are normalized. This migration is idempotent and runs at most once per env.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Compaction, replication, engines — claimed responsibilities
|
|
242
|
+
|
|
243
|
+
Three things that were "a role flag standing in for a cross-process lock" are now explicit
|
|
244
|
+
**claims on the existing flat `OKDBLock`** — which fixes real latent bugs:
|
|
245
|
+
|
|
246
|
+
- **Compaction** is a per-env lease. Concurrent compaction is now impossible by construction
|
|
247
|
+
(1.9 had _no_ lock — two `active` nodes could race the `data.mdb` swap). `compaction: true`
|
|
248
|
+
means "eligible to claim," not "the sole compactor by fiat." A **two-phase drain** shrinks
|
|
249
|
+
reader unavailability from the whole compaction to just the file swap.
|
|
250
|
+
- **Replication** is a `replicate:<peer>` claim — one local owner per remote peer, with
|
|
251
|
+
**lease failover** (1.9 had none; if the syncing process died, replication stopped). The peer
|
|
252
|
+
set stays a durable definition; `sync` never returns as a constructor flag.
|
|
253
|
+
- **Engines** (`vector-search`) fold into the same filter/claim model: a node loads only the
|
|
254
|
+
engines it's placed to run, lazy-loads the HNSW on first query, and evicts when idle (fixing
|
|
255
|
+
the eager-load memory bomb). `embeddings.search()` is **location-transparent** — it resolves
|
|
256
|
+
the index holder and proxies the query over internal HTTP, so search works on any node. The
|
|
257
|
+
`affinity`-tag placement mechanism is deleted.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Persisted records — one open-time shim (automatic)
|
|
262
|
+
|
|
263
|
+
On the first 2.0 `open()`, an idempotent shim reconciles old records. You do nothing.
|
|
264
|
+
|
|
265
|
+
| Record | 2.0 action |
|
|
266
|
+
| --------------------------------------- | ------------------------------------------ |
|
|
267
|
+
| desired-state scope `'workers'` (scale) | obsolete — ignored + deleted |
|
|
268
|
+
| scope `'queue-worker'` definitions | obsolete — auto-adoption removed; inert |
|
|
269
|
+
| scope `'procmode'` records | kept — already canonical `single`/`fanout` |
|
|
270
|
+
| `~engines` records: `affinity` field | stripped/ignored — placement is claims now |
|
|
271
|
+
| `~engines` records: definition fields | kept — the durable engine config |
|
|
272
|
+
| scope `'node'` registry rows | kept |
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Quick checklist
|
|
277
|
+
|
|
278
|
+
1. Remove `asyncProcessors`, `bus`, `envs`, `sync`, `processing`, `workers` from your
|
|
279
|
+
constructor calls. Map `asyncProcessors:true/false` → `processors:true/false`.
|
|
280
|
+
2. Replace any filtered claim (`processors:'<filter>'`, `db.processors.process()/processRest()/
|
|
281
|
+
processEverything()`) with the boolean `processors: true|false`. Place a processor type by
|
|
282
|
+
running a node where you want it — claiming is first-come on the lease, not configured.
|
|
283
|
+
3. Replace `queue.worker(type, module)` or `queue.spawn(type, module)` with `queue.process(type, fn)`
|
|
284
|
+
(in-loop), or run a consumer on another independent process/node.
|
|
285
|
+
4. Replace `db.workers.ensure({scale})` with launching extra `new OKDB(path, { processors: true })`
|
|
286
|
+
nodes (or let `bin/okdb` do it). Use `processors: false` for short-lived/ephemeral processes.
|
|
287
|
+
5. Replace any `http.listen(port, { workers })` with `bin/okdb` clustering or plain Node `cluster`.
|
|
288
|
+
6. Drop `sync: false` on environments — a pure local store simply never attaches a consumer.
|
|
289
|
+
7. If you scraped `/api/workers`, read the registry-sourced `/api/processes/tree` +
|
|
290
|
+
`/api/processors/status` instead.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1da89e=_0x3fa0;(function(_0x484bf5,_0x4d2516){const _0x157de0=_0x3fa0,_0xa0640e=_0x484bf5();while(!![]){try{const _0x5e92d8=-parseInt(_0x157de0(0x211))/0x1*(-parseInt(_0x157de0(0x2f4))/0x2)+parseInt(_0x157de0(0x299))/0x3*(-parseInt(_0x157de0(0x21b))/0x4)+parseInt(_0x157de0(0x292))/0x5+parseInt(_0x157de0(0x1e2))/0x6*(-parseInt(_0x157de0(0x24d))/0x7)+-parseInt(_0x157de0(0x2bc))/0x8*(-parseInt(_0x157de0(0x2bf))/0x9)+-parseInt(_0x157de0(0x31f))/0xa*(-parseInt(_0x157de0(0x1cb))/0xb)+-parseInt(_0x157de0(0x218))/0xc*(parseInt(_0x157de0(0x2d5))/0xd);if(_0x5e92d8===_0x4d2516)break;else _0xa0640e['push'](_0xa0640e['shift']());}catch(_0x199cc5){_0xa0640e['push'](_0xa0640e['shift']());}}}(_0x42d0,0x433f3));var require$$0$3=require('worker_threads'),require$$1=require('v8'),require$$0=require(_0x1da89e(0x2e5)),require$$0$2=require('uuid'),require$$0$1=require(_0x1da89e(0x2ac)),require$$5=require(_0x1da89e(0x264));function getDefaultExportFromCjs(_0x36e0e9){const _0x58bf2a=_0x1da89e;return _0x36e0e9&&_0x36e0e9[_0x58bf2a(0x2cf)]&&Object[_0x58bf2a(0x269)][_0x58bf2a(0x2dd)]['call'](_0x36e0e9,'default')?_0x36e0e9['default']:_0x36e0e9;}var okdbFunctionsSandboxWorker$1={},okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function requireOkdbFunctionsSandbox(){if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0x109e3a=require$$0;function _0x589b07(_0x25b847){const _0x3a1472=_0x3fa0,_0x37f788=_0x25b847==='*',_0x14a2a5=_0x37f788?null:new Set(Array[_0x3a1472(0x261)](_0x25b847)?_0x25b847:[]);return function _0x57199e(_0x2e219c,_0x36bffc){const _0x1c57d6=_0x3a1472;if(!_0x37f788){let _0x5637a0;try{const _0x17cf48=new URL(typeof _0x2e219c==='string'?_0x2e219c:_0x2e219c?.[_0x1c57d6(0x1df)]??String(_0x2e219c));_0x5637a0=_0x17cf48[_0x1c57d6(0x2f8)];}catch{const _0x757598=new Error(_0x1c57d6(0x304));return _0x757598['code']=_0x1c57d6(0x256),Promise[_0x1c57d6(0x298)](_0x757598);}if(!_0x14a2a5[_0x1c57d6(0x1d1)](_0x5637a0)){const _0x3bd2cd=new Error(_0x14a2a5[_0x1c57d6(0x24a)]===0x0?'fetch\x20is\x20not\x20allowed\x20in\x20this\x20function\x20sandbox\x20(no\x20allowedFetchDomains\x20configured)':'fetch\x20blocked:\x20hostname\x20\x22'+_0x5637a0+_0x1c57d6(0x1ea));return _0x3bd2cd['code']=_0x1c57d6(0x256),Promise['reject'](_0x3bd2cd);}}return fetch(_0x2e219c,_0x36bffc);};}function _0x363bae(_0xebf73e={}){const _0x21e285=_0x3fa0,_0x4a421a=_0xebf73e[_0x21e285(0x262)]!==![],_0x5008cd=_0xebf73e[_0x21e285(0x2b7)]??[],_0x4f3e86={'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[_0x21e285(0x307)]};return _0x4a421a&&typeof fetch==='function'&&(_0x4f3e86['fetch']=_0x589b07(_0x5008cd)),_0x4f3e86[_0x21e285(0x21d)]=_0x4f3e86,_0x4f3e86;}function _0xbcd0c1(_0x50ec8d,_0xd59e={}){const _0x3e1cc2=_0x3fa0,_0x3c69f0=_0x363bae(_0xd59e),_0x325662=_0x109e3a[_0x3e1cc2(0x31b)](_0x3c69f0,{'name':'okdb-function-sandbox','codeGeneration':{'strings':![],'wasm':![]}});let _0x370266;try{_0x370266=new _0x109e3a[(_0x3e1cc2(0x23c))]('('+_0x50ec8d+')',{'filename':_0xd59e[_0x3e1cc2(0x31d)]??_0x3e1cc2(0x30a)});}catch(_0x4d08d8){const _0xcd6766=new Error(_0x4d08d8?.[_0x3e1cc2(0x28d)]||_0x3e1cc2(0x1e6));_0xcd6766[_0x3e1cc2(0x2f2)]='FUNCTION_SCRIPT_COMPILE_FAILED',_0xcd6766[_0x3e1cc2(0x220)]=_0x4d08d8;throw _0xcd6766;}let _0x376bf3;try{_0x376bf3=_0x370266[_0x3e1cc2(0x210)](_0x325662,{'timeout':_0xd59e['compileTimeoutMs']??0x64});}catch(_0x486d3e){const _0x570fec=new Error(_0x486d3e?.[_0x3e1cc2(0x28d)]||_0x3e1cc2(0x2c9));_0x570fec['code']=_0x3e1cc2(0x22a),_0x570fec['cause']=_0x486d3e;throw _0x570fec;}if(typeof _0x376bf3!==_0x3e1cc2(0x23b)){const _0xa5b789=new Error(_0x3e1cc2(0x2a6));_0xa5b789['code']=_0x3e1cc2(0x1de);throw _0xa5b789;}return _0x376bf3;}return okdbFunctionsSandbox={'createSandboxGlobals':_0x363bae,'compileFunctionExpression':_0xbcd0c1,'_buildRestrictedFetch':_0x589b07},okdbFunctionsSandbox;}var okdbFunctionsIpc,hasRequiredOkdbFunctionsIpc;function _0x3fa0(_0x20fcb4,_0x2aef7c){_0x20fcb4=_0x20fcb4-0x1c6;const _0x42d00c=_0x42d0();let _0x3fa026=_0x42d00c[_0x20fcb4];return _0x3fa026;}function requireOkdbFunctionsIpc(){if(hasRequiredOkdbFunctionsIpc)return okdbFunctionsIpc;hasRequiredOkdbFunctionsIpc=0x1;function _0x27bbd9(_0x9ffa34){const _0x38e66c=_0x3fa0;if(!_0x9ffa34)return null;return{'message':_0x9ffa34[_0x38e66c(0x28d)]||String(_0x9ffa34),'stack':_0x9ffa34[_0x38e66c(0x305)]||null,'code':_0x9ffa34[_0x38e66c(0x2f2)]||null,'details':_0x9ffa34[_0x38e66c(0x1e8)]||null};}function _0x5738a1(_0x141aff){const _0x4ada2a=_0x3fa0;if(!_0x141aff)return new Error('Unknown\x20custom\x20function\x20error');const _0x4a427f=new Error(_0x141aff[_0x4ada2a(0x28d)]||String(_0x141aff));if(_0x141aff['stack'])_0x4a427f['stack']=_0x141aff[_0x4ada2a(0x305)];if(_0x141aff[_0x4ada2a(0x2f2)])_0x4a427f[_0x4ada2a(0x2f2)]=_0x141aff[_0x4ada2a(0x2f2)];if(_0x141aff['details'])_0x4a427f['details']=_0x141aff[_0x4ada2a(0x1e8)];return _0x4a427f;}return okdbFunctionsIpc={'serializeError':_0x27bbd9,'deserializeError':_0x5738a1},okdbFunctionsIpc;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x3279b6=_0x1da89e;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5441aa={'PUT':'put','REMOVE':_0x3279b6(0x293),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x3279b6(0x277),'INDEX_RESET':_0x3279b6(0x280),'TYPE_REGISTER':_0x3279b6(0x223),'TYPE_DROP':_0x3279b6(0x27c),'FTS_REGISTER':_0x3279b6(0x2a4),'FTS_DROP':_0x3279b6(0x2b4),'FTS_RESET':'resetFts','SCHEMA_SET':_0x3279b6(0x2f1),'SCHEMA_DROP':_0x3279b6(0x1dd),'TTL_SET':_0x3279b6(0x2f3),'TTL_CLEAR':'clearTtl'},_0x4a75f6={'SYSTEM_READY':_0x3279b6(0x21f),'SYSTEM_STOPPED':_0x3279b6(0x243),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x3279b6(0x28c),'SYSTEM_DRAIN':_0x3279b6(0x2c6),'SYSTEM_TYPE_DROP':_0x3279b6(0x301),'SYSTEM_PROC':_0x3279b6(0x2bb),'SYSTEM_BUS_STATE_CHANGE':_0x3279b6(0x29f),'ITEM_CREATE':'item:create','ITEM_UPDATE':_0x3279b6(0x24e),'ITEM_REMOVE':_0x3279b6(0x1d9),'INDEX_RESET':_0x3279b6(0x25a),'INDEX_READY':_0x3279b6(0x21e),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x3279b6(0x1f3),'INDEX_DROP':_0x3279b6(0x2c5),'INDEX_REGISTERED':_0x3279b6(0x229),'FTS_REGISTERED':_0x3279b6(0x20d),'FTS_DROP':_0x3279b6(0x2b1),'FTS_RESET':_0x3279b6(0x1ec),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x3279b6(0x1ce),'UNIQUE_VIOLATION':_0x3279b6(0x238),'UNIQUE_VIOLATION_RESOLVED':_0x3279b6(0x30b),'REF_VIOLATION':_0x3279b6(0x1f5),'REF_VIOLATION_RESOLVED':_0x3279b6(0x202),'SYNC_APPLY':'sync:apply','TXN_START':_0x3279b6(0x29d),'TXN_END':_0x3279b6(0x253),'TXN_ROLLBACK':_0x3279b6(0x2a7),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x3279b6(0x2a5),'ENV_OPENED':_0x3279b6(0x2d8),'ENV_REMOVED':'env:removed','TTL_EXPIRED':_0x3279b6(0x270),'TTL_SET':'ttl:set','TTL_CLEAR':_0x3279b6(0x1f1),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x3279b6(0x26b),'LICENSE_ACTIVATED':_0x3279b6(0x2c1),'LICENSE_REMOVED':'license:removed'},_0x65a6a2={'CREATING':_0x3279b6(0x250),'RESETTING':_0x3279b6(0x21c),'READY':_0x3279b6(0x231),'DROPPING':'dropping','WAITING':_0x3279b6(0x308)},_0x54df45={'CREATED':'created','STARTING':'starting','STARTED':_0x3279b6(0x31c),'STOPPING':_0x3279b6(0x2b5),'STOPPED':'stopped'},_0x2a6c29={'CREATING':_0x3279b6(0x250),'READY':_0x3279b6(0x231),'HALTED':'halted','STOPPED':_0x3279b6(0x31a),'RESETTING':_0x3279b6(0x21c)},_0xf87ea3=Object['freeze']({'POKE':_0x3279b6(0x22d),'DRAIN':_0x3279b6(0x2c2),'TYPE_DROP':_0x3279b6(0x22c),'PROC':_0x3279b6(0x318)});return okdbEnums={'BUS_EVENTS':_0xf87ea3,'CHANGE_ACTIONS':_0x5441aa,'EVENTS':_0x4a75f6,'INDEX_STATE':_0x65a6a2,'OKDB_STATE':_0x54df45,'VIEW_STATE':_0x2a6c29},okdbEnums;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x1ebfbc extends Error{constructor(_0x4d0947,_0x4a5876,_0x5738d3={}){const _0x532ccf=_0x3fa0;super(_0x4d0947),this[_0x532ccf(0x2df)]=_0x532ccf(0x213),this[_0x532ccf(0x2f2)]=_0x4a5876,this[_0x532ccf(0x1e8)]=_0x5738d3,_0x5738d3[_0x532ccf(0x220)]&&(this[_0x532ccf(0x220)]=_0x5738d3[_0x532ccf(0x220)]),Error[_0x532ccf(0x2a3)](this,this[_0x532ccf(0x215)]);}}class _0x46382d extends _0x1ebfbc{constructor(_0x1eaa99,_0x37f8e6,_0xfe5753,_0x318796){const _0x23ef99=_0x3fa0;super(_0x23ef99(0x25e)+_0x1eaa99+'@'+_0x37f8e6+_0x23ef99(0x276)+_0xfe5753+_0x23ef99(0x27f)+_0x318796,_0x23ef99(0x2ad),{'type':_0x1eaa99,'key':_0x37f8e6,'expectedVersion':_0xfe5753,'actualVersion':_0x318796}),this['name']=_0x23ef99(0x227);}}class _0x406b14 extends _0x1ebfbc{constructor(_0x3d4ce0,_0x5ecc27){const _0x4b670e=_0x3fa0;super(_0x3d4ce0+'@'+_0x5ecc27+_0x4b670e(0x232),_0x4b670e(0x1e3),{'type':_0x3d4ce0,'key':_0x5ecc27}),this['name']=_0x4b670e(0x302);}}class _0x31407d extends _0x1ebfbc{constructor(_0x34dce5,_0x32262f){const _0x451caf=_0x3fa0;super(_0x34dce5+'@'+_0x32262f+_0x451caf(0x2f6),_0x451caf(0x2d6),{'type':_0x34dce5,'key':_0x32262f}),this[_0x451caf(0x2df)]='OKDBAlreadyExistsError';}}class _0x900e3 extends _0x1ebfbc{constructor(_0x521155,_0x319058){const _0x276e6a=_0x3fa0,_0x1ea993=typeof _0x319058;super(_0x276e6a(0x2e2)+_0x521155+_0x276e6a(0x30f)+_0x1ea993+_0x276e6a(0x252)+_0x319058,'INVALID_INDEX_KEY',{'index':_0x521155,'key':_0x319058,'keyType':_0x1ea993}),this['name']=_0x276e6a(0x30c);}}class _0x2bb951 extends _0x1ebfbc{constructor(_0x21518f){const _0x22aa2e=_0x3fa0,_0x5d9581=typeof _0x21518f;super('Invalid\x20primary\x20key\x20type:\x20'+_0x5d9581+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x21518f,_0x22aa2e(0x306),{'key':_0x21518f,'keyType':_0x5d9581}),this[_0x22aa2e(0x2df)]=_0x22aa2e(0x282);}}class _0x105782 extends _0x1ebfbc{constructor(_0x58d3bf){const _0x267e49=_0x3fa0;super(_0x267e49(0x21a)+_0x58d3bf+_0x267e49(0x247),_0x267e49(0x201),{'type':_0x58d3bf}),this[_0x267e49(0x2df)]=_0x267e49(0x1fe);}}class _0x1514cb extends _0x1ebfbc{constructor(_0x3b154a){const _0x3cf534=_0x3fa0;super('Type\x20\x27'+_0x3b154a+_0x3cf534(0x2b2),'TYPE_ALREADY_REGISTERED',{'type':_0x3b154a}),this[_0x3cf534(0x2df)]='OKDBTypeAlreadyRegisteredError';}}class _0x2bbc84 extends _0x1ebfbc{constructor(_0x52a1f8,_0x3ea1d3){const _0x246b8e=_0x3fa0;super(_0x246b8e(0x244)+_0x3ea1d3+'\x27\x20on\x20type\x20\x27'+_0x52a1f8+_0x246b8e(0x247),_0x246b8e(0x24b),{'type':_0x52a1f8,'index':_0x3ea1d3}),this[_0x246b8e(0x2df)]=_0x246b8e(0x2ed);}}class _0x3904b5 extends _0x1ebfbc{constructor(_0x33caf3,_0x7d3fdd){const _0x1bbefc=_0x3fa0;super('Index\x20\x27'+_0x7d3fdd+'\x27\x20on\x20type\x20\x27'+_0x33caf3+_0x1bbefc(0x1d3),_0x1bbefc(0x1cd),{'type':_0x33caf3,'index':_0x7d3fdd}),this[_0x1bbefc(0x2df)]=_0x1bbefc(0x24c);}}class _0x27e925 extends _0x1ebfbc{constructor(_0x372fed,_0x27b588={}){const _0x47be81=_0x3fa0;super(_0x372fed,_0x47be81(0x258),_0x27b588),this['name']=_0x47be81(0x1c7);}}class _0x4b2acc extends _0x1ebfbc{constructor(_0x5c5727,_0x28943e,_0x3af958,_0x269460,_0xc5c193){const _0x43531b=_0x3fa0;super('Unique\x20constraint\x20violated\x20on\x20'+_0x5c5727+'@'+_0x28943e+_0x43531b(0x2da)+_0x3af958+']\x20already\x20maps\x20to\x20\x27'+_0x269460+_0x43531b(0x2c8)+_0xc5c193+'\x27',_0x43531b(0x27e),{'type':_0x5c5727,'index':_0x28943e,'indexKey':_0x3af958,'existingKey':_0x269460,'conflictingKey':_0xc5c193}),this['name']=_0x43531b(0x281);}}class _0x3a7ab8 extends _0x1ebfbc{constructor(_0xc91f8,_0x43b2a0,_0x1e1e53){const _0x33970a=_0x3fa0;super(_0x33970a(0x2b0)+_0xc91f8+'@'+_0x43b2a0,'SCHEMA_VALIDATION_FAILED',{'type':_0xc91f8,'key':_0x43b2a0,'errors':_0x1e1e53}),this[_0x33970a(0x2df)]=_0x33970a(0x2b8),this[_0x33970a(0x2dc)]=_0xc91f8,this[_0x33970a(0x28e)]=_0x43b2a0,this[_0x33970a(0x2f9)]=_0x1e1e53;}}class _0x3ff7ee extends _0x1ebfbc{constructor(_0x411908,_0x1f07ed){const _0x4a8dfb=_0x3fa0;super(_0x4a8dfb(0x290)+_0x411908+':\x20'+_0x1f07ed[_0x4a8dfb(0x1c8)]+_0x4a8dfb(0x1f4),_0x4a8dfb(0x26c),{'type':_0x411908,'failures':_0x1f07ed}),this[_0x4a8dfb(0x2df)]='OKDBSchemaCollectionError',this[_0x4a8dfb(0x2dc)]=_0x411908,this[_0x4a8dfb(0x23a)]=_0x1f07ed;}}class _0x1d1806 extends _0x1ebfbc{constructor(_0x3d70ee,_0x7e3e4f,_0x3bae58,_0x49b21a,_0x2e57bc){const _0x10a314=_0x3fa0;super(_0x10a314(0x2d7)+_0x3d70ee+'@'+_0x7e3e4f+'.'+_0x3bae58+_0x10a314(0x2ba)+_0x49b21a+'@'+_0x2e57bc+_0x10a314(0x2c4),_0x10a314(0x29a),{'sourceType':_0x3d70ee,'sourceKey':_0x7e3e4f,'fieldPath':_0x3bae58,'targetType':_0x49b21a,'targetKey':_0x2e57bc}),this['name']=_0x10a314(0x26d),this[_0x10a314(0x203)]=_0x3d70ee,this[_0x10a314(0x245)]=_0x7e3e4f,this[_0x10a314(0x2e0)]=_0x3bae58,this[_0x10a314(0x205)]=_0x49b21a,this[_0x10a314(0x1db)]=_0x2e57bc;}}class _0x5cdebd extends _0x1ebfbc{constructor(_0x322a3d,_0x553b92,_0x79447c){const _0x1be65f=_0x3fa0;super(_0x1be65f(0x1c6)+_0x322a3d+'@'+_0x553b92+':\x20'+_0x79447c[_0x1be65f(0x1c8)]+_0x1be65f(0x1e5),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x322a3d,'targetKey':_0x553b92,'references':_0x79447c}),this[_0x1be65f(0x2df)]=_0x1be65f(0x267),this[_0x1be65f(0x205)]=_0x322a3d,this[_0x1be65f(0x1db)]=_0x553b92,this[_0x1be65f(0x2e1)]=_0x79447c;}}class _0xb5bbff extends _0x1ebfbc{constructor(_0x316bb2,_0x2ddd28,_0x1b1d21){const _0x631096=_0x3fa0;super(_0x631096(0x236)+_0x2ddd28+_0x631096(0x2ec)+_0x316bb2+'\x22\x20is\x20used\x20by:\x20'+_0x1b1d21['map'](_0x2df38d=>_0x2df38d[_0x631096(0x241)]+':'+_0x2df38d[_0x631096(0x2df)])['join'](',\x20'),_0x631096(0x1e1),{'type':_0x316bb2,'index':_0x2ddd28,'usedBy':_0x1b1d21}),this[_0x631096(0x2df)]=_0x631096(0x240);}}return okdbError={'OKDBError':_0x1ebfbc,'OKDBVersionMismatchError':_0x46382d,'OKDBNotFoundError':_0x406b14,'OKDBAlreadyExistsError':_0x31407d,'OKDBInvalidIndexKeyError':_0x900e3,'OKDBInvalidPrimaryKeyError':_0x2bb951,'OKDBTypeNotRegisteredError':_0x105782,'OKDBTypeAlreadyRegisteredError':_0x1514cb,'OKDBIndexNotRegisteredError':_0x2bbc84,'OKDBIndexAlreadyRegisteredError':_0x3904b5,'OKDBInvalidValueError':_0x27e925,'OKDBUniqueConstraintError':_0x4b2acc,'OKDBSchemaValidationError':_0x3a7ab8,'OKDBSchemaCollectionError':_0x3ff7ee,'OKDBForeignKeyError':_0x1d1806,'OKDBForeignKeyDeleteError':_0x5cdebd,'OKDBIndexHasConsumersError':_0xb5bbff},okdbError;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x2d3970=_0x1da89e;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x4c7c63,performance:_0x2fe85e}=require$$0$1,_0x4bc4f7=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x3ee5ab=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x452e0b=process.env.OKDB_LOOP_LAG_ALL==='1',_0x34db66=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x495a22{constructor(){const _0x4dd08e=_0x3fa0;this[_0x4dd08e(0x1fa)]=_0x4bc4f7,this[_0x4dd08e(0x2e7)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x4dd08e(0x309)]=![],this[_0x4dd08e(0x2c0)]=(_0x4f8dbf,_0x6d8379)=>process['stderr']['write'](_0x4f8dbf+(_0x6d8379?'\x20'+JSON[_0x4dd08e(0x206)](_0x6d8379):'')+'\x0a');}[_0x2d3970(0x26a)](){const _0x143c60=_0x2d3970;return _0x2fe85e[_0x143c60(0x26a)]();}[_0x2d3970(0x279)](_0x22f471){if(typeof _0x22f471==='function')this['_log']=_0x22f471;}[_0x2d3970(0x2f0)](_0x26f289,_0x2c8539,_0x22fbf9){const _0x1f8df7=_0x2d3970;if(!this[_0x1f8df7(0x1fa)])return;let _0x4ef763=this['_buckets'][_0x1f8df7(0x1ed)](_0x26f289);!_0x4ef763&&(_0x4ef763={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x1f8df7(0x2e7)]['set'](_0x26f289,_0x4ef763)),_0x4ef763['ms']+=_0x2c8539,_0x4ef763[_0x1f8df7(0x219)]+=0x1,_0x2c8539>_0x4ef763[_0x1f8df7(0x296)]&&(_0x4ef763[_0x1f8df7(0x296)]=_0x2c8539,_0x4ef763[_0x1f8df7(0x2d3)]=_0x22fbf9||'');}[_0x2d3970(0x2a1)](_0x1c161a){const _0x240987=_0x2d3970;if(!this[_0x240987(0x1fa)]||this[_0x240987(0x309)])return;this[_0x240987(0x309)]=!![];if(_0x1c161a)this[_0x240987(0x2c0)]=_0x1c161a;this['_h']=_0x4c7c63({'resolution':0xa}),this['_h'][_0x240987(0x2fd)](),this[_0x240987(0x272)]=setInterval(()=>this[_0x240987(0x266)](),_0x3ee5ab);if(this[_0x240987(0x272)][_0x240987(0x2e4)])this[_0x240987(0x272)][_0x240987(0x2e4)]();}[_0x2d3970(0x1f0)](_0x299c30){const _0x40766c=_0x2d3970;if(!this[_0x40766c(0x1e7)])this[_0x40766c(0x1e7)]=new Set();this[_0x40766c(0x1e7)][_0x40766c(0x1c9)](_0x299c30);if(!this['_started'])this['_startAdmission']();}[_0x2d3970(0x2ce)](_0x34e604){const _0x3a4292=_0x2d3970;this[_0x3a4292(0x1e7)]?.[_0x3a4292(0x22f)](_0x34e604);}['_startAdmission'](){const _0x324087=_0x2d3970;if(this[_0x324087(0x2cc)])return;this[_0x324087(0x2cc)]=!![];!this['_h']&&(this['_h']=_0x4c7c63({'resolution':0xa}),this['_h'][_0x324087(0x2fd)]());const _0x2f2ce0=_0x3ee5ab;this['_admissionTimer']=setInterval(()=>{const _0x3b125a=_0x324087,_0x50060b=this['_h'];if(!_0x50060b)return;const _0x2d9be2=_0x50060b[_0x3b125a(0x2af)](0x63)/0xf4240,_0x2a957f=_0x50060b['max']/0xf4240,_0x423a1a=_0x50060b[_0x3b125a(0x2ca)]/0xf4240;_0x50060b[_0x3b125a(0x24f)]();if(this[_0x3b125a(0x1e7)])for(const _0x2cc46b of this['_windowCbs']){try{_0x2cc46b({'p99Ms':_0x2d9be2,'maxMs':_0x2a957f,'meanMs':_0x423a1a,'reportMs':_0x2f2ce0});}catch{}}},_0x2f2ce0);if(this[_0x324087(0x221)]['unref'])this[_0x324087(0x221)]['unref']();}[_0x2d3970(0x266)](){const _0x1362d0=_0x2d3970,_0x239ea3=this['_h'],_0x3042f2=_0x239ea3[_0x1362d0(0x1d5)]/0xf4240,_0x5f43da=_0x239ea3[_0x1362d0(0x2af)](0x63)/0xf4240,_0x3da5bf=_0x239ea3[_0x1362d0(0x2ca)]/0xf4240;_0x239ea3[_0x1362d0(0x24f)]();const _0x1c444b=[...this[_0x1362d0(0x2e7)][_0x1362d0(0x2fe)]()][_0x1362d0(0x2eb)](([_0x4fe394,_0x2f82aa])=>({'label':_0x4fe394,..._0x2f82aa}))[_0x1362d0(0x249)]((_0x586f49,_0x22256f)=>_0x22256f['ms']-_0x586f49['ms'])['slice'](0x0,0x8);this[_0x1362d0(0x2e7)][_0x1362d0(0x2be)]();const _0x19243c=_0x1c444b[_0x1362d0(0x200)]((_0x454011,_0x1972cf)=>_0x454011+_0x1972cf['ms'],0x0),_0x43fa10=_0x1c444b[_0x1362d0(0x2eb)](_0x2c2974=>_0x2c2974[_0x1362d0(0x2e6)]+'='+_0x2c2974['ms']['toFixed'](0x0)+'ms/'+_0x2c2974[_0x1362d0(0x219)]+(_0x2c2974[_0x1362d0(0x296)]>0x5?'(worst\x20'+_0x2c2974['maxMs'][_0x1362d0(0x313)](0x0)+'ms'+(_0x2c2974[_0x1362d0(0x2d3)]?'\x20'+_0x2c2974['maxExtra']:'')+')':''));(_0x452e0b||_0x3042f2>=_0x34db66)&&this['_log'](_0x1362d0(0x222)+_0x3ee5ab+'ms\x20max='+_0x3042f2[_0x1362d0(0x313)](0x0)+_0x1362d0(0x214)+_0x5f43da[_0x1362d0(0x313)](0x0)+_0x1362d0(0x20e)+_0x3da5bf['toFixed'](0x0)+_0x1362d0(0x291)+_0x19243c['toFixed'](0x0)+'ms'+(_0x43fa10[_0x1362d0(0x1c8)]?_0x1362d0(0x207)+_0x43fa10['join']('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x1362d0(0x1e7)])for(const _0x50921c of this['_windowCbs']){try{_0x50921c({'p99Ms':_0x5f43da,'maxMs':_0x3042f2,'meanMs':_0x3da5bf,'reportMs':_0x3ee5ab});}catch{}}}['stop'](){const _0x843e=_0x2d3970;if(this[_0x843e(0x272)])clearInterval(this[_0x843e(0x272)]);if(this['_h'])this['_h']['disable']();this[_0x843e(0x272)]=null,this['_h']=null,this[_0x843e(0x309)]=![];}}const _0x33dcca=new _0x495a22();if(_0x33dcca[_0x2d3970(0x1fa)])_0x33dcca['start']();return okdbLoopMonitor={'LOOP':_0x33dcca},okdbLoopMonitor;}var okdbTransaction,hasRequiredOkdbTransaction;function requireOkdbTransaction(){const _0x38be38=_0x1da89e;if(hasRequiredOkdbTransaction)return okdbTransaction;hasRequiredOkdbTransaction=0x1;const _0x2248f7=require$$0$2,{EVENTS:_0x398079}=requireOkdbEnums(),{OKDBError:_0x3aa78a}=requireOkdbError(),{LOOP:_0x1702a0}=requireOkdbLoopMonitor();class _0x5c21b0{[_0x38be38(0x1f6)];[_0x38be38(0x2d9)]=[];[_0x38be38(0x1e0)]=[];['_undoHooks']=[];constructor(_0x539989,_0x5f0c25={'useReadTransaction':![]}){const _0x4da76b=_0x38be38;this[_0x4da76b(0x1f6)]=_0x539989,this[_0x4da76b(0x314)]=_0x5f0c25,this['id']=_0x2248f7['v4'](),this[_0x4da76b(0x2e9)]=this[_0x4da76b(0x314)][_0x4da76b(0x2fc)]?this['okdb']['db']['useReadTransaction']():null,this['_closed']=![];}[_0x38be38(0x295)](_0xf44cb5){const _0x3327a2=_0x38be38;this[_0x3327a2(0x1e0)]['push'](_0xf44cb5);}['onUndo'](_0x2fd787){const _0x109085=_0x38be38;this[_0x109085(0x237)][_0x109085(0x22e)](_0x2fd787);}[_0x38be38(0x2d1)](){const _0x461714=_0x38be38;if(!this[_0x461714(0x2e9)])return;try{this[_0x461714(0x2e9)][_0x461714(0x310)]();}catch(_0xcffd53){}this[_0x461714(0x2e9)]=null;}[_0x38be38(0x2a2)](){const _0x43dcf9=_0x38be38;if(this['_closed'])throw new _0x3aa78a(_0x43dcf9(0x20b),'TXN_CLOSED');}['get'](_0x5bae13,_0x3ead45){const _0x2325b7=_0x38be38;return this['_assertOpen'](),this[_0x2325b7(0x1f6)][_0x2325b7(0x1ed)](_0x5bae13,_0x3ead45,{'transaction':this[_0x2325b7(0x2e9)]});}[_0x38be38(0x29e)](_0x241368,_0x52c990){const _0x2eb585=_0x38be38;return this[_0x2eb585(0x2a2)](),this[_0x2eb585(0x1f6)][_0x2eb585(0x29e)](_0x241368,_0x52c990,{'transaction':this['readTransaction']});}[_0x38be38(0x208)](_0x225d58,_0x59cfc2){const _0x33d02d=_0x38be38;return this[_0x33d02d(0x2a2)](),this[_0x33d02d(0x1f6)][_0x33d02d(0x208)](_0x225d58,_0x59cfc2,{'transaction':this[_0x33d02d(0x2e9)]});}[_0x38be38(0x2d2)](_0x1d1f8d,_0x5af7c4={}){const _0xba81b=_0x38be38;return this[_0xba81b(0x2a2)](),this[_0xba81b(0x1f6)][_0xba81b(0x2d2)](_0x1d1f8d,{'transaction':this[_0xba81b(0x2e9)],..._0x5af7c4});}[_0x38be38(0x294)](_0x1e4e0b,_0x4b5e78={}){const _0x25caa3=_0x38be38;return this[_0x25caa3(0x2a2)](),this[_0x25caa3(0x1f6)][_0x25caa3(0x294)](_0x1e4e0b,{'transaction':this[_0x25caa3(0x2e9)],..._0x4b5e78});}['getKeys'](_0x4212f3,_0x1ddb38={}){const _0x4b06a5=_0x38be38;return this[_0x4b06a5(0x2a2)](),this[_0x4b06a5(0x1f6)][_0x4b06a5(0x321)](_0x4212f3,{'transaction':this['readTransaction'],..._0x1ddb38});}['byIndex'](_0x4d6f5a,_0x309589,_0x38a5bb={}){const _0x46fe1d=_0x38be38;return this[_0x46fe1d(0x2a2)](),this['okdb']['byIndex'](_0x4d6f5a,_0x309589,{'transaction':this[_0x46fe1d(0x2e9)],..._0x38a5bb});}[_0x38be38(0x2ae)](_0x46591f,_0x508167,_0x4329a0={}){const _0x4e3a9a=_0x38be38;return this['_assertOpen'](),this['okdb'][_0x4e3a9a(0x2ae)](_0x46591f,_0x508167,{'transaction':this[_0x4e3a9a(0x2e9)],..._0x4329a0});}[_0x38be38(0x2fa)](_0xb12b21=null){const _0x4e1bce=_0x38be38;return this[_0x4e1bce(0x2a2)](),this['okdb'][_0x4e1bce(0x2fa)](_0xb12b21,{'transaction':this['readTransaction']});}[_0x38be38(0x1ee)](_0x1c3b97){const _0x37fc58=_0x38be38;return this[_0x37fc58(0x2a2)](),this[_0x37fc58(0x1f6)]['getCount'](_0x1c3b97,{'transaction':this[_0x37fc58(0x2e9)]});}[_0x38be38(0x20a)](_0x3c0110,_0x4d9104,_0x566041,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date['now'](),origin:origin=null,ttl:ttl=null}={}){const _0x571054=_0x38be38;this[_0x571054(0x2d9)][_0x571054(0x22e)]({'action':_0x571054(0x20a),'args':[_0x3c0110,_0x4d9104,_0x566041,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x38be38(0x273)](_0xb02bcd,_0x36ca92,_0xc5765b,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date['now'](),origin:origin=null,ttl:ttl=null}={}){const _0x59736d=_0x38be38;this[_0x59736d(0x2d9)][_0x59736d(0x22e)]({'action':_0x59736d(0x273),'args':[_0xb02bcd,_0x36ca92,_0xc5765b,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x38be38(0x26f)](_0xaaa77e,_0x628833,_0x303439,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x38be38(0x26a)](),origin:origin=null,ttl:ttl=null}={}){const _0x57796c=_0x38be38;this[_0x57796c(0x2d9)]['push']({'action':_0x57796c(0x26f),'args':[_0xaaa77e,_0x628833,_0x303439,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x38be38(0x274)](_0x1274a5,_0x2dd791,_0x241442,{version:version=null,timestamp:timestamp=Date[_0x38be38(0x26a)](),origin:origin=null,ttl:ttl=null}={}){const _0x444dcd=_0x38be38;this['actions']['push']({'action':_0x444dcd(0x274),'args':[_0x1274a5,_0x2dd791,_0x241442,{'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x38be38(0x293)](_0x4b1e47,_0x1015c0,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x38be38(0x26a)](),origin:origin=null}={}){const _0x24a4c4=_0x38be38;this[_0x24a4c4(0x2d9)][_0x24a4c4(0x22e)]({'action':_0x24a4c4(0x293),'args':[_0x4b1e47,_0x1015c0,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin}]});}[_0x38be38(0x2f5)](_0x4f49de,_0x5058df,_0x253239){const _0x46ab36=_0x38be38;this[_0x46ab36(0x2d9)][_0x46ab36(0x22e)]({'action':'setTTL','args':[_0x4f49de,_0x5058df,_0x253239]});}[_0x38be38(0x1da)](_0x37f0cf,_0x490a4e){const _0x587803=_0x38be38;this[_0x587803(0x2d9)][_0x587803(0x22e)]({'action':_0x587803(0x1da),'args':[_0x37f0cf,_0x490a4e]});}[_0x38be38(0x235)](){const _0x1f98eb=_0x38be38;if(this['_closed'])return;for(const _0x41a44f of this['_undoHooks']){try{_0x41a44f();}catch{}}this[_0x1f98eb(0x1f6)][_0x1f98eb(0x1ff)][_0x1f98eb(0x1e9)](_0x398079['TXN_ROLLBACK'],{'id':this['id']}),this['actions']=[],this[_0x1f98eb(0x2d1)](),this[_0x1f98eb(0x2e8)]=!![];}async[_0x38be38(0x283)](){const _0x135b59=_0x38be38;if(this[_0x135b59(0x2e8)])throw new Error(_0x135b59(0x20b));const _0x99029={'id':this['id'],'timestamp':Date['now'](),'actions':this[_0x135b59(0x2d9)]};this[_0x135b59(0x1f6)][_0x135b59(0x1ff)][_0x135b59(0x1e9)](_0x398079[_0x135b59(0x224)],_0x99029);try{const _0x174025=_0x1702a0[_0x135b59(0x1fa)]?_0x1702a0[_0x135b59(0x26a)]():0x0;this[_0x135b59(0x1f6)]['db'][_0x135b59(0x25d)](()=>{const _0x39e5df=_0x135b59;for(const _0x1c0bf3 of this[_0x39e5df(0x2d9)]){const _0x4ae21c=this[_0x39e5df(0x1f6)]['_'+_0x1c0bf3[_0x39e5df(0x209)]];if(typeof _0x4ae21c!==_0x39e5df(0x23b))throw new Error(_0x39e5df(0x316)+_0x1c0bf3[_0x39e5df(0x209)]);_0x4ae21c[_0x39e5df(0x2ab)](this[_0x39e5df(0x1f6)],this,..._0x1c0bf3[_0x39e5df(0x2c7)]);}}),_0x1702a0[_0x135b59(0x1fa)]&&_0x1702a0[_0x135b59(0x2f0)](_0x135b59(0x2e3),_0x1702a0[_0x135b59(0x26a)]()-_0x174025,(this[_0x135b59(0x1f6)][_0x135b59(0x2df)]??'?')+_0x135b59(0x2cd)+this[_0x135b59(0x2d9)][_0x135b59(0x1c8)]);}catch(_0x28f6a0){for(const _0x51869c of this['_undoHooks']){try{_0x51869c();}catch{}}this[_0x135b59(0x2d1)](),this[_0x135b59(0x2e8)]=!![];if(_0x28f6a0 instanceof _0x3aa78a)throw _0x28f6a0;throw new _0x3aa78a(_0x28f6a0?.[_0x135b59(0x28d)]||_0x135b59(0x1fc),_0x135b59(0x278),{'cause':_0x28f6a0});}this[_0x135b59(0x1f6)][_0x135b59(0x1ff)][_0x135b59(0x1e9)](_0x398079[_0x135b59(0x2a0)],_0x99029);for(const _0x25b922 of this[_0x135b59(0x1e0)]){try{_0x25b922();}catch{}}this['actions']=[],this['_closeReadTransaction'](),this[_0x135b59(0x2e8)]=!![];}static['createWriteFacade'](_0x587862){const _0x487fab=_0x38be38;return Object[_0x487fab(0x30d)]({'id':_0x587862['id'],'put':_0x587862[_0x487fab(0x20a)]['bind'](_0x587862),'update':_0x587862[_0x487fab(0x273)][_0x487fab(0x234)](_0x587862),'patch':_0x587862[_0x487fab(0x26f)][_0x487fab(0x234)](_0x587862),'create':_0x587862[_0x487fab(0x274)][_0x487fab(0x234)](_0x587862),'remove':_0x587862[_0x487fab(0x293)][_0x487fab(0x234)](_0x587862),'setTTL':_0x587862['setTTL'][_0x487fab(0x234)](_0x587862),'clearTTL':_0x587862[_0x487fab(0x1da)][_0x487fab(0x234)](_0x587862),'commit':_0x587862['commit']['bind'](_0x587862),'rollback':_0x587862['rollback'][_0x487fab(0x234)](_0x587862),'get':_0x587862[_0x487fab(0x1ed)][_0x487fab(0x234)](_0x587862),'getEntry':_0x587862[_0x487fab(0x29e)]['bind'](_0x587862),'getMany':_0x587862[_0x487fab(0x208)][_0x487fab(0x234)](_0x587862),'getRange':_0x587862[_0x487fab(0x2d2)][_0x487fab(0x234)](_0x587862),'getValues':_0x587862[_0x487fab(0x294)][_0x487fab(0x234)](_0x587862),'getKeys':_0x587862[_0x487fab(0x321)][_0x487fab(0x234)](_0x587862),'byIndex':_0x587862[_0x487fab(0x319)][_0x487fab(0x234)](_0x587862),'query':_0x587862[_0x487fab(0x2ae)][_0x487fab(0x234)](_0x587862),'getClock':_0x587862[_0x487fab(0x2fa)][_0x487fab(0x234)](_0x587862),'getCount':_0x587862['getCount'][_0x487fab(0x234)](_0x587862),'read':_0x587862,'raw':_0x587862});}static['applyOps'](_0x88d5bb,_0x397a35=[]){const _0x1c8088=_0x38be38;if(!Array[_0x1c8088(0x261)](_0x397a35))throw new _0x3aa78a('txn\x20ops\x20must\x20be\x20an\x20array',_0x1c8088(0x1ef));for(const _0x4d6e20 of _0x397a35){if(Array['isArray'](_0x4d6e20)){const [_0x53f30e,..._0x42400c]=_0x4d6e20;if(typeof _0x88d5bb[_0x53f30e]!==_0x1c8088(0x23b))throw new _0x3aa78a('Unknown\x20transaction\x20action:\x20'+_0x53f30e,_0x1c8088(0x2b9),{'action':_0x53f30e});_0x88d5bb[_0x53f30e](..._0x42400c);continue;}if(!_0x4d6e20||typeof _0x4d6e20!=='object')throw new _0x3aa78a('txn\x20op\x20must\x20be\x20an\x20object\x20or\x20tuple',_0x1c8088(0x212));const {action:_0x1ea471}=_0x4d6e20;if(typeof _0x1ea471!=='string'||typeof _0x88d5bb[_0x1ea471]!==_0x1c8088(0x23b))throw new _0x3aa78a(_0x1c8088(0x316)+_0x1ea471,_0x1c8088(0x2b9),{'action':_0x1ea471});switch(_0x1ea471){case _0x1c8088(0x20a):case _0x1c8088(0x273):case _0x1c8088(0x274):_0x88d5bb[_0x1ea471](_0x4d6e20[_0x1c8088(0x2dc)],_0x4d6e20[_0x1c8088(0x28e)],_0x4d6e20[_0x1c8088(0x2ff)],{..._0x4d6e20['options'],'ttl':_0x4d6e20[_0x1c8088(0x29b)]??_0x4d6e20['options']?.[_0x1c8088(0x29b)]??null});break;case _0x1c8088(0x26f):_0x88d5bb['patch'](_0x4d6e20[_0x1c8088(0x2dc)],_0x4d6e20[_0x1c8088(0x28e)],_0x4d6e20['patch'],{..._0x4d6e20[_0x1c8088(0x314)],'ttl':_0x4d6e20[_0x1c8088(0x29b)]??_0x4d6e20['options']?.['ttl']??null});break;case _0x1c8088(0x293):_0x88d5bb[_0x1c8088(0x293)](_0x4d6e20[_0x1c8088(0x2dc)],_0x4d6e20['key'],_0x4d6e20['options']||{});break;case _0x1c8088(0x2f5):_0x88d5bb[_0x1c8088(0x2f5)](_0x4d6e20['type'],_0x4d6e20[_0x1c8088(0x28e)],_0x4d6e20[_0x1c8088(0x29b)]);break;case'clearTTL':_0x88d5bb['clearTTL'](_0x4d6e20[_0x1c8088(0x2dc)],_0x4d6e20[_0x1c8088(0x28e)]);break;default:throw new _0x3aa78a('Unsupported\x20transaction\x20action:\x20'+_0x1ea471,_0x1c8088(0x2b9),{'action':_0x1ea471});}}}static async[_0x38be38(0x225)](_0x4d0ff7,_0x36621c,_0x43d698={}){const _0x34e76e=_0x38be38,_0x319265=new _0x5c21b0(_0x4d0ff7,_0x43d698),_0x5f4bb9=_0x5c21b0[_0x34e76e(0x2b6)](_0x319265);try{typeof _0x36621c===_0x34e76e(0x23b)?await _0x36621c(_0x5f4bb9):_0x5c21b0[_0x34e76e(0x226)](_0x319265,_0x36621c||[]);const _0xa89b97=_0x319265['actions'][_0x34e76e(0x1c8)];return await _0x319265[_0x34e76e(0x283)](),{'id':_0x319265['id'],'actions':_0xa89b97};}catch(_0x4825b9){try{_0x319265[_0x34e76e(0x235)]();}catch(_0x5d820d){}throw _0x4825b9;}}}return okdbTransaction=_0x5c21b0,okdbTransaction;}var okdbFunctionsFacades,hasRequiredOkdbFunctionsFacades;function requireOkdbFunctionsFacades(){if(hasRequiredOkdbFunctionsFacades)return okdbFunctionsFacades;hasRequiredOkdbFunctionsFacades=0x1;const _0x537050=requireOkdbTransaction();function _0x4c98ad(_0x338184){const _0x224cdd=_0x3fa0;return{'transaction':typeof _0x338184['transaction']===_0x224cdd(0x23b)?_0x338184[_0x224cdd(0x20f)][_0x224cdd(0x234)](_0x338184):_0x323f0d=>new _0x537050(_0x338184,_0x323f0d),'txn':typeof _0x338184['txn']===_0x224cdd(0x23b)?_0x338184['txn'][_0x224cdd(0x234)](_0x338184):(_0x42e68b,_0x213a63)=>_0x537050[_0x224cdd(0x225)](_0x338184,_0x42e68b,_0x213a63)};}function _0x2ae85a(_0x5d3964){const _0xdd86cf=_0x3fa0;return{'name':_0x5d3964[_0xdd86cf(0x2df)],..._0x4c98ad(_0x5d3964),'put':_0x5d3964['put'][_0xdd86cf(0x234)](_0x5d3964),'update':_0x5d3964['update'][_0xdd86cf(0x234)](_0x5d3964),'patch':_0x5d3964[_0xdd86cf(0x26f)]['bind'](_0x5d3964),'create':_0x5d3964[_0xdd86cf(0x274)][_0xdd86cf(0x234)](_0x5d3964),'remove':_0x5d3964[_0xdd86cf(0x293)][_0xdd86cf(0x234)](_0x5d3964),'get':_0x5d3964['get'][_0xdd86cf(0x234)](_0x5d3964),'getMany':_0x5d3964[_0xdd86cf(0x208)][_0xdd86cf(0x234)](_0x5d3964),'getEntry':_0x5d3964[_0xdd86cf(0x29e)][_0xdd86cf(0x234)](_0x5d3964),'getRange':_0x5d3964[_0xdd86cf(0x2d2)][_0xdd86cf(0x234)](_0x5d3964),'getValues':_0x5d3964[_0xdd86cf(0x294)][_0xdd86cf(0x234)](_0x5d3964),'getKeys':_0x5d3964[_0xdd86cf(0x321)][_0xdd86cf(0x234)](_0x5d3964),'getCount':_0x5d3964['getCount'][_0xdd86cf(0x234)](_0x5d3964),'getByPrefix':_0x5d3964[_0xdd86cf(0x2ea)][_0xdd86cf(0x234)](_0x5d3964),'getIndex':_0x5d3964['getIndex'][_0xdd86cf(0x234)](_0x5d3964),'byIndex':_0x5d3964[_0xdd86cf(0x319)][_0xdd86cf(0x234)](_0x5d3964),'query':_0x5d3964['query'][_0xdd86cf(0x234)](_0x5d3964),'geoQuery':_0x5d3964[_0xdd86cf(0x315)][_0xdd86cf(0x234)](_0x5d3964),'ftsQuery':_0x5d3964[_0xdd86cf(0x20c)][_0xdd86cf(0x234)](_0x5d3964),'setTTL':_0x5d3964[_0xdd86cf(0x2f5)][_0xdd86cf(0x234)](_0x5d3964),'getTTL':_0x5d3964[_0xdd86cf(0x28a)][_0xdd86cf(0x234)](_0x5d3964),'clearTTL':_0x5d3964[_0xdd86cf(0x1da)][_0xdd86cf(0x234)](_0x5d3964),'sweepExpiredTTL':_0x5d3964[_0xdd86cf(0x25b)][_0xdd86cf(0x234)](_0x5d3964),'listTTL':_0x5d3964[_0xdd86cf(0x275)][_0xdd86cf(0x234)](_0x5d3964),'ttlStats':_0x5d3964['ttlStats']['bind'](_0x5d3964),'setDefaultTTL':_0x5d3964[_0xdd86cf(0x2bd)][_0xdd86cf(0x234)](_0x5d3964),'getDefaultTTL':_0x5d3964[_0xdd86cf(0x1fb)][_0xdd86cf(0x234)](_0x5d3964),'clearDefaultTTL':_0x5d3964[_0xdd86cf(0x217)][_0xdd86cf(0x234)](_0x5d3964),'registerType':_0x5d3964['registerType'][_0xdd86cf(0x234)](_0x5d3964),'ensureType':_0x5d3964[_0xdd86cf(0x259)][_0xdd86cf(0x234)](_0x5d3964),'hasType':_0x5d3964[_0xdd86cf(0x1d4)][_0xdd86cf(0x234)](_0x5d3964),'dropType':_0x5d3964[_0xdd86cf(0x27c)]['bind'](_0x5d3964),'registerIndex':_0x5d3964['registerIndex'][_0xdd86cf(0x234)](_0x5d3964),'hasIndex':_0x5d3964[_0xdd86cf(0x1dc)][_0xdd86cf(0x234)](_0x5d3964),'dropIndex':_0x5d3964[_0xdd86cf(0x1d2)][_0xdd86cf(0x234)](_0x5d3964),'resetIndex':_0x5d3964[_0xdd86cf(0x280)]['bind'](_0x5d3964),'indexReady':_0x5d3964['indexReady']['bind'](_0x5d3964),'getIndexStatus':_0x5d3964['getIndexStatus'][_0xdd86cf(0x234)](_0x5d3964),'getClock':_0x5d3964['getClock'][_0xdd86cf(0x234)](_0x5d3964),'getChanges':_0x5d3964['getChanges'][_0xdd86cf(0x234)](_0x5d3964),'count':_0x5d3964[_0xdd86cf(0x219)][_0xdd86cf(0x234)](_0x5d3964),'range':_0x5d3964[_0xdd86cf(0x27b)][_0xdd86cf(0x234)](_0x5d3964),'now':_0x5d3964['now'][_0xdd86cf(0x234)](_0x5d3964)};}function _0x39f7e7(_0x472922){const _0x3b4821=_0x3fa0;if(!_0x472922)return null;const _0x22f542={};for(const _0x2e310c of[_0x3b4821(0x2cb),_0x3b4821(0x27a),_0x3b4821(0x1d8),'updateJob',_0x3b4821(0x2d0),_0x3b4821(0x246),'getBucket',_0x3b4821(0x2db)]){if(typeof _0x472922[_0x2e310c]===_0x3b4821(0x23b))_0x22f542[_0x2e310c]=_0x472922[_0x2e310c]['bind'](_0x472922);}return Object[_0x3b4821(0x1cf)](_0x22f542)[_0x3b4821(0x1c8)]?_0x22f542:null;}function _0x1fd98e(_0x54f439){const _0x29d76d=_0x3fa0;if(!_0x54f439)return null;const _0x4e3254={};for(const _0x2be428 of[_0x29d76d(0x248),_0x29d76d(0x2f7),'remove',_0x29d76d(0x1ed),_0x29d76d(0x1d8),'getByPath']){if(typeof _0x54f439[_0x2be428]==='function')_0x4e3254[_0x2be428]=_0x54f439[_0x2be428][_0x29d76d(0x234)](_0x54f439);}return Object[_0x29d76d(0x1cf)](_0x4e3254)[_0x29d76d(0x1c8)]?_0x4e3254:null;}function _0x14125e(_0x4f20cf){const _0x56e2d7=_0x3fa0;return{'env':_0x4f20cf[_0x56e2d7(0x251)]['bind'](_0x4f20cf),'createEnvironment':_0x4f20cf[_0x56e2d7(0x25c)][_0x56e2d7(0x234)](_0x4f20cf),'removeEnvironment':_0x4f20cf['removeEnvironment'][_0x56e2d7(0x234)](_0x4f20cf),'info':_0x4f20cf['info'],..._0x4c98ad(_0x4f20cf),'put':_0x4f20cf[_0x56e2d7(0x20a)]['bind'](_0x4f20cf),'update':_0x4f20cf['update'][_0x56e2d7(0x234)](_0x4f20cf),'patch':_0x4f20cf[_0x56e2d7(0x26f)][_0x56e2d7(0x234)](_0x4f20cf),'create':_0x4f20cf[_0x56e2d7(0x274)][_0x56e2d7(0x234)](_0x4f20cf),'remove':_0x4f20cf[_0x56e2d7(0x293)]['bind'](_0x4f20cf),'get':_0x4f20cf['get'][_0x56e2d7(0x234)](_0x4f20cf),'getMany':_0x4f20cf[_0x56e2d7(0x208)][_0x56e2d7(0x234)](_0x4f20cf),'getEntry':_0x4f20cf[_0x56e2d7(0x29e)]['bind'](_0x4f20cf),'getRange':_0x4f20cf[_0x56e2d7(0x2d2)][_0x56e2d7(0x234)](_0x4f20cf),'getValues':_0x4f20cf['getValues'][_0x56e2d7(0x234)](_0x4f20cf),'getKeys':_0x4f20cf[_0x56e2d7(0x321)][_0x56e2d7(0x234)](_0x4f20cf),'getCount':_0x4f20cf[_0x56e2d7(0x1ee)][_0x56e2d7(0x234)](_0x4f20cf),'getByPrefix':_0x4f20cf['getByPrefix'][_0x56e2d7(0x234)](_0x4f20cf),'getIndex':_0x4f20cf['getIndex'][_0x56e2d7(0x234)](_0x4f20cf),'byIndex':_0x4f20cf[_0x56e2d7(0x319)][_0x56e2d7(0x234)](_0x4f20cf),'query':_0x4f20cf['query'][_0x56e2d7(0x234)](_0x4f20cf),'setTTL':_0x4f20cf[_0x56e2d7(0x2f5)][_0x56e2d7(0x234)](_0x4f20cf),'getTTL':_0x4f20cf[_0x56e2d7(0x28a)][_0x56e2d7(0x234)](_0x4f20cf),'clearTTL':_0x4f20cf[_0x56e2d7(0x1da)][_0x56e2d7(0x234)](_0x4f20cf),'sweepExpiredTTL':_0x4f20cf[_0x56e2d7(0x25b)]['bind'](_0x4f20cf),'listTTL':_0x4f20cf[_0x56e2d7(0x275)][_0x56e2d7(0x234)](_0x4f20cf),'ttlStats':_0x4f20cf[_0x56e2d7(0x1f2)][_0x56e2d7(0x234)](_0x4f20cf),'setDefaultTTL':_0x4f20cf[_0x56e2d7(0x2bd)][_0x56e2d7(0x234)](_0x4f20cf),'getDefaultTTL':_0x4f20cf[_0x56e2d7(0x1fb)]['bind'](_0x4f20cf),'clearDefaultTTL':_0x4f20cf[_0x56e2d7(0x217)][_0x56e2d7(0x234)](_0x4f20cf),'ensureType':_0x4f20cf[_0x56e2d7(0x259)][_0x56e2d7(0x234)](_0x4f20cf),'registerType':_0x4f20cf[_0x56e2d7(0x223)][_0x56e2d7(0x234)](_0x4f20cf),'hasType':_0x4f20cf[_0x56e2d7(0x1d4)][_0x56e2d7(0x234)](_0x4f20cf),'dropType':_0x4f20cf[_0x56e2d7(0x27c)]['bind'](_0x4f20cf),'registerIndex':_0x4f20cf[_0x56e2d7(0x277)][_0x56e2d7(0x234)](_0x4f20cf),'hasIndex':_0x4f20cf[_0x56e2d7(0x1dc)][_0x56e2d7(0x234)](_0x4f20cf),'dropIndex':_0x4f20cf[_0x56e2d7(0x1d2)][_0x56e2d7(0x234)](_0x4f20cf),'resetIndex':_0x4f20cf['resetIndex'][_0x56e2d7(0x234)](_0x4f20cf),'indexReady':_0x4f20cf[_0x56e2d7(0x1cc)]['bind'](_0x4f20cf),'getIndexStatus':_0x4f20cf['getIndexStatus']['bind'](_0x4f20cf),'getClock':_0x4f20cf['getClock']['bind'](_0x4f20cf),'getChanges':_0x4f20cf['getChanges']['bind'](_0x4f20cf),'queue':_0x4f20cf[_0x56e2d7(0x23d)],'files':_0x4f20cf[_0x56e2d7(0x27d)]};}return okdbFunctionsFacades={'createEnvFacade':_0x2ae85a,'createQueueFacade':_0x39f7e7,'createFilesFacade':_0x1fd98e,'createGlobalFacade':_0x14125e},okdbFunctionsFacades;}var okdbFunctionsDryrun,hasRequiredOkdbFunctionsDryrun;function requireOkdbFunctionsDryrun(){const _0x16c6d8=_0x1da89e;if(hasRequiredOkdbFunctionsDryrun)return okdbFunctionsDryrun;hasRequiredOkdbFunctionsDryrun=0x1;const _0x2de48b=new Set([_0x16c6d8(0x20a),'patch','create',_0x16c6d8(0x293),'update',_0x16c6d8(0x2f5),_0x16c6d8(0x1da),_0x16c6d8(0x25b),'setDefaultTTL',_0x16c6d8(0x217),_0x16c6d8(0x27c),'dropIndex','resetIndex']),_0x269527=new Set(['enqueue',_0x16c6d8(0x2ef),_0x16c6d8(0x2d0),'addBucket']),_0x2202a4=new Set([_0x16c6d8(0x248),_0x16c6d8(0x293)]);function _0x15d2f3(_0x31386c,_0x3b948d){const _0x5a7852=_0x16c6d8;if(_0x31386c===_0x5a7852(0x251)||_0x31386c==='global')return _0x2de48b['has'](_0x3b948d);if(_0x31386c===_0x5a7852(0x23d))return _0x269527[_0x5a7852(0x1d1)](_0x3b948d);if(_0x31386c===_0x5a7852(0x27d))return _0x2202a4[_0x5a7852(0x1d1)](_0x3b948d);return![];}function _0x128aa4(_0x2ccab8,_0x3b57fa,_0x54d6e9,_0x55a1e2){if(!_0x2ccab8)return _0x2ccab8;return new Proxy(_0x2ccab8,{'get'(_0x1a81b1,_0x5680e9,_0x508645){const _0x2a1232=_0x3fa0,_0x14f850=Reflect[_0x2a1232(0x1ed)](_0x1a81b1,_0x5680e9,_0x508645);if(typeof _0x14f850!==_0x2a1232(0x23b))return _0x14f850;if(!_0x15d2f3(_0x3b57fa,_0x5680e9))return _0x14f850['bind'](_0x1a81b1);return function(..._0x26a98a){const _0x31896c=_0x2a1232;return _0x55a1e2[_0x31896c(0x22e)]({'scope':_0x3b57fa,'method':_0x5680e9,'envName':_0x54d6e9,'args':_0x26a98a}),null;};}});}function _0x5117d8(_0x3d6e73,_0x4aab99,_0x2773c7,_0x47e6bc){const _0x381f6b={};for(const _0x5365d5 of _0x2773c7){_0x381f6b[_0x5365d5]=(..._0x5317e3)=>{const _0x37f02a=_0x3fa0;return _0x15d2f3(_0x3d6e73,_0x5365d5)&&_0x47e6bc[_0x37f02a(0x22e)]({'scope':_0x3d6e73,'method':_0x5365d5,'envName':_0x4aab99,'args':_0x5317e3}),null;};}return _0x381f6b;}return okdbFunctionsDryrun={'isWriteMethod':_0x15d2f3,'wrapForDryRun':_0x128aa4,'syntheticDryRunFacade':_0x5117d8,'ENV_WRITE_METHODS':_0x2de48b,'QUEUE_WRITE_METHODS':_0x269527,'FILES_WRITE_METHODS':_0x2202a4},okdbFunctionsDryrun;}var okdbFunctionsContext,hasRequiredOkdbFunctionsContext;function requireOkdbFunctionsContext(){const _0x2bc32d=_0x1da89e;if(hasRequiredOkdbFunctionsContext)return okdbFunctionsContext;hasRequiredOkdbFunctionsContext=0x1;const {createEnvFacade:_0x83d1b8,createQueueFacade:_0x40af69,createFilesFacade:_0x5eb89b,createGlobalFacade:_0x47b4d8}=requireOkdbFunctionsFacades(),{wrapForDryRun:_0x2070ed,syntheticDryRunFacade:_0x922f37}=requireOkdbFunctionsDryrun(),_0x436713=[_0x2bc32d(0x2cb),_0x2bc32d(0x27a),_0x2bc32d(0x1d8),_0x2bc32d(0x2ef),'removeJob',_0x2bc32d(0x246),_0x2bc32d(0x23e),_0x2bc32d(0x2db)],_0x17c5d3=[_0x2bc32d(0x248),_0x2bc32d(0x2f7),_0x2bc32d(0x293),_0x2bc32d(0x1ed),'list','getByPath'];function _0x111ab4(_0xe9b618,_0x360b25){const _0x215833=_0x2bc32d,_0x3773d0=(_0x2eb69d,_0x57b8ee,_0xc384f)=>_0x360b25({'type':_0x215833(0x2c3),'requestId':_0xe9b618['requestId'],'runId':_0xe9b618[_0x215833(0x288)],'entry':{'level':_0x2eb69d,'msg':_0x57b8ee,'context':_0xc384f,'ts':Date[_0x215833(0x26a)]()}}),_0x4801cc=(_0x217cbb,_0x37cc6a)=>_0x3773d0(_0x215833(0x1f9),_0x217cbb,_0x37cc6a);return _0x4801cc[_0x215833(0x1f9)]=(_0x2e4bd9,_0x4db859)=>_0x3773d0('info',_0x2e4bd9,_0x4db859),_0x4801cc[_0x215833(0x254)]=(_0x49e1fa,_0x3f298b)=>_0x3773d0(_0x215833(0x254),_0x49e1fa,_0x3f298b),_0x4801cc['error']=(_0x16f365,_0x3145fe)=>_0x3773d0(_0x215833(0x311),_0x16f365,_0x3145fe),_0x4801cc['debug']=(_0x52bdb6,_0x4a0c11)=>_0x3773d0(_0x215833(0x1e4),_0x52bdb6,_0x4a0c11),_0x4801cc;}function _0x2e8567(_0x501404,_0x5cbb78,_0x54e76c){const _0x5f5cf0=_0x2bc32d;if(!_0x501404)return null;return{'id':_0x501404['id']??null,'type':_0x501404[_0x5f5cf0(0x2dc)]??null,'tries':_0x501404[_0x5f5cf0(0x1f7)]??null,'created':_0x501404['created']??null,'tags':_0x501404[_0x5f5cf0(0x271)]??null,'priority':_0x501404['priority']??null,'bucket':_0x501404[_0x5f5cf0(0x1fd)]??null,'cron':_0x501404[_0x5f5cf0(0x230)]??null,'heartbeat'(){const _0x5ce1d8=_0x5f5cf0;_0x54e76c({'type':'job_heartbeat','requestId':_0x5cbb78[_0x5ce1d8(0x25f)],'runId':_0x5cbb78['runId'],'jobId':_0x501404['id'],'claimId':_0x501404[_0x5ce1d8(0x2d4)]});},'markProgress'(_0x3fe056){const _0x58e273=_0x5f5cf0;_0x54e76c({'type':_0x58e273(0x2ee),'requestId':_0x5cbb78[_0x58e273(0x25f)],'runId':_0x5cbb78[_0x58e273(0x288)],'jobId':_0x501404['id'],'claimId':_0x501404['claimId'],'message':_0x3fe056});}};}function _0x40a087(_0x4adcc7){const _0x1a6a99=_0x2bc32d;if(!_0x4adcc7)return null;return{'mode':_0x4adcc7['mode']??null,'sourceType':_0x4adcc7[_0x1a6a99(0x203)]??null,'sourceEnv':_0x4adcc7[_0x1a6a99(0x216)]??null,'processor':_0x4adcc7[_0x1a6a99(0x28f)]??null,'engineKey':_0x4adcc7[_0x1a6a99(0x317)]??null,'cursorKey':_0x4adcc7[_0x1a6a99(0x285)]??null};}function _0xed221f(_0x232e79){const _0x9d6faa=_0x2bc32d;if(!_0x232e79)return null;return{'mode':_0x232e79[_0x9d6faa(0x297)]??null,'sourceType':_0x232e79[_0x9d6faa(0x203)]??null,'targetType':_0x232e79[_0x9d6faa(0x205)]??null,'sourceEnv':_0x232e79[_0x9d6faa(0x216)]??null,'targetEnv':_0x232e79[_0x9d6faa(0x239)]??null,'engineKey':_0x232e79['engineKey']??null,'cursorKey':_0x232e79['cursorKey']??null};}function _0xf6fad9(_0x4e41f4,_0x18a520,_0x5a8275,_0x1a56bc=null,_0x1ca4f3=null){const _0x54e7ec=_0x2bc32d,_0x1d9c1d={'runId':_0x18a520['runId'],'scope':_0x54e7ec(0x251),'env':_0x18a520['envName']??null,'functionName':_0x18a520[_0x54e7ec(0x1d6)],'trigger':_0x18a520[_0x54e7ec(0x1f9)]?.[_0x54e7ec(0x29c)]??'sdk','requestedAt':_0x18a520[_0x54e7ec(0x1f9)]?.[_0x54e7ec(0x2b3)]??Date['now']()},_0x4c9381=_0x111ab4(_0x18a520,_0x5a8275),_0x2c79ed=AbortSignal[_0x54e7ec(0x26e)](Math[_0x54e7ec(0x1d5)](0x1,_0x18a520[_0x54e7ec(0x265)]?.['timeoutMs']??0x3e8)),_0x2d5405=_0x1ca4f3?AbortSignal['any']([_0x2c79ed,_0x1ca4f3]):_0x2c79ed,_0x4328b3=_0x4e41f4['env'](_0x18a520[_0x54e7ec(0x2de)]),_0x21e821=_0x1a56bc?_0x2070ed(_0x4328b3,_0x54e7ec(0x251),_0x18a520[_0x54e7ec(0x2de)],_0x1a56bc):_0x4328b3,_0xd51a2d=_0x1a56bc?_0x4328b3[_0x54e7ec(0x23d)]?_0x2070ed(_0x4328b3[_0x54e7ec(0x23d)],'queue',_0x18a520[_0x54e7ec(0x2de)],_0x1a56bc):_0x922f37(_0x54e7ec(0x23d),_0x18a520[_0x54e7ec(0x2de)],_0x436713,_0x1a56bc):_0x4328b3[_0x54e7ec(0x23d)],_0x3bb3bf=_0x1a56bc?_0x4328b3[_0x54e7ec(0x27d)]?_0x2070ed(_0x4328b3[_0x54e7ec(0x27d)],_0x54e7ec(0x27d),_0x18a520['envName'],_0x1a56bc):_0x922f37('files',_0x18a520[_0x54e7ec(0x2de)],_0x17c5d3,_0x1a56bc):_0x4328b3[_0x54e7ec(0x27d)],_0xa227db=_0x83d1b8(_0x21e821),_0x3aa95c=_0x40af69(_0xd51a2d),_0x1b38e1=_0x5eb89b(_0x3bb3bf);if(_0x3aa95c)_0xa227db['queue']=_0x3aa95c;if(_0x1b38e1)_0xa227db[_0x54e7ec(0x27d)]=_0x1b38e1;const _0x34f873={'payload':_0x18a520['payload']??null,'info':_0x1d9c1d,'signal':_0x2d5405,'log':_0x4c9381,'env':_0xa227db},_0x1f18bf=_0x2e8567(_0x18a520[_0x54e7ec(0x260)],_0x18a520,_0x5a8275);if(_0x1f18bf)_0x34f873[_0x54e7ec(0x2a9)]=_0x1f18bf;const _0x2b3408=_0x40a087(_0x18a520[_0x54e7ec(0x28b)]);if(_0x2b3408)_0x34f873[_0x54e7ec(0x28f)]=_0x2b3408;const _0xcbe5cd=_0xed221f(_0x18a520['materializerContext']);if(_0xcbe5cd)_0x34f873[_0x54e7ec(0x31e)]=_0xcbe5cd;if(_0x18a520[_0x54e7ec(0x312)]){const _0x4464f7=_0x1a56bc?_0x2070ed(_0x4e41f4,'global',null,_0x1a56bc):_0x4e41f4;_0x34f873[_0x54e7ec(0x1f6)]=_0x47b4d8(_0x4464f7);}return _0x34f873;}return okdbFunctionsContext={'createExecutionContext':_0xf6fad9,'createScriptLogger':_0x111ab4},okdbFunctionsContext;}function _0x42d0(){const _0x1f035f=['clear','18VfmsDb','_log','license:activated','bus:drain','log','\x20which\x20does\x20not\x20exist','index:drop','system:drain','args','\x27,\x20cannot\x20map\x20to\x20\x27','Function\x20script\x20failed\x20to\x20initialize','mean','enqueue','_admissionStarted','\x20actions=','offWindow','__esModule','removeJob','_closeReadTransaction','getRange','maxExtra','claimId','1131TzRjII','ALREADY_EXISTS','Foreign\x20key\x20violation:\x20','env:opened','actions',':\x20key\x20[','listBuckets','type','hasOwnProperty','envName','name','fieldPath','references','Invalid\x20index\x20key\x20type\x20for\x20\x27','txn-commit','unref','node:vm','label','_buckets','_closed','readTransaction','getByPrefix','map','\x22\x20on\x20\x22','OKDBIndexNotRegisteredError','job_progress','updateJob','note','setSchema','code','setTtl','338XjRDOs','setTTL','\x20already\x20exists','stream','hostname','errors','getClock','stop','useReadTransaction','enable','entries','value','catch','system:type_drop','OKDBNotFoundError','cancelled\x20by\x20caller','fetch\x20blocked:\x20invalid\x20URL','stack','INVALID_PRIMARY_KEY','crypto','waiting','_started','okdb-function.js','unique:violation_resolved','OKDBInvalidIndexKeyError','freeze','dryRun','\x27:\x20','done','error','unsafe','toFixed','options','geoQuery','Unknown\x20transaction\x20action:\x20','engineKey','bus:proc','byIndex','stopped','createContext','started','filename','materializer','4550kBoRxh','object','getKeys','Cannot\x20delete\x20','OKDBInvalidValueError','length','add','passive','11088ZarDnf','indexReady','INDEX_ALREADY_REGISTERED','schema:drop','keys','result','has','dropIndex','\x27\x20is\x20already\x20registered','hasType','max','functionName','script','list','item:remove','clearTTL','targetKey','hasIndex','dropSchema','FUNCTION_SCRIPT_INVALID_SHAPE','url','_doHooks','INDEX_HAS_CONSUMERS','66HaFnZl','NOT_FOUND','debug','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','Function\x20script\x20failed\x20to\x20compile','_windowCbs','details','emit','\x22\x20is\x20not\x20in\x20the\x20allowedFetchDomains\x20list','abort','fts:reset','get','getCount','TXN_INVALID_OPS','onWindow','ttl:clear','ttlStats','view:progress','\x20documents\x20fail\x20validation','ref:violation','okdb','tries','~system','info','enabled','getDefaultTTL','Unknown\x20OKDB\x20transaction\x20error','bucket','OKDBTypeNotRegisteredError','events','reduce','TYPE_NOT_REGISTERED','ref:violation_resolved','sourceType','close','targetType','stringify','\x20│\x20','getMany','action','put','Transaction\x20already\x20closed','ftsQuery','fts:registered','ms\x20mean=','transaction','runInContext','958WZzQwm','TXN_INVALID_OP','OKDBError','ms\x20p99=','constructor','sourceEnv','clearDefaultTTL','31764itHXTL','count','Type\x20\x27','10156MXUhqq','resetting','globalThis','index:ready','system:ready','cause','_admissionTimer','loop-lag\x20','registerType','TXN_START','run','applyOps','OKDBVersionMismatchError','exit','index:registered','FUNCTION_SCRIPT_COMPILE_FAILED','cancel','bus:type_drop','bus:poke','push','delete','cron','ready','\x20does\x20not\x20exist','pid','bind','rollback','Index\x20\x22','_undoHooks','unique:violation','targetEnv','failures','function','Script','queue','getBucket','getHeapStatistics','OKDBIndexHasConsumersError','kind','dryRunActions','system:stopped','Index\x20\x27','sourceKey','addBucket','\x27\x20doesn\x27t\x20exist','upload','sort','size','INDEX_NOT_REGISTERED','OKDBIndexAlreadyRegisteredError','162757sGOPoh','item:update','reset','creating','env','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','txn:end','warn','.okdb-function.js','FETCH_NOT_ALLOWED','signal','INVALID_VALUE','ensureType','index:reset','sweepExpiredTTL','createEnvironment','transactionSync','Version\x20mismatch\x20for\x20','requestId','jobContext','isArray','allowFetch','version','./okdb','runtime','_report','OKDBForeignKeyDeleteError','set','prototype','now','license:added','SCHEMA_COLLECTION_INVALID','OKDBForeignKeyError','timeout','patch','ttl:expired','tags','_timer','update','create','listTTL',':\x20expected\x20','registerIndex','TXN_ERROR','setLogger','getJob','range','dropType','files','UNIQUE_CONSTRAINT',',\x20got\x20','resetIndex','OKDBUniqueConstraintError','OKDBInvalidPrimaryKeyError','commit','fatal','cursorKey','sandbox-','_envs','runId','sandbox\x20worker:\x20rootPath\x20missing\x20from\x20workerData','getTTL','processorContext','system:poke','message','key','processor','Cannot\x20set\x20enforce\x20schema\x20on\x20','ms\x20busy=','348880MrIIis','remove','getValues','onDo','maxMs','mode','reject','15SQnVvs','FOREIGN_KEY_VIOLATION','ttl','trigger','txn:start','getEntry','system:bus_state_change','TXN_END','start','_assertOpen','captureStackTrace','registerFts','type:drop','Function\x20script\x20must\x20evaluate\x20to\x20a\x20callable\x20function','txn:rollback','openEnv','job','exports','call','node:perf_hooks','VERSION_MISMATCH','query','percentile','Schema\x20validation\x20failed\x20for\x20','fts:drop','\x27\x20already\x20registered','requestedAt','dropFts','stopping','createWriteFacade','allowedFetchDomains','OKDBSchemaValidationError','TXN_INVALID_ACTION','\x20references\x20','system:proc','335480qnDHaB','setDefaultTTL'];_0x42d0=function(){return _0x1f035f;};return _0x42d0();}var hasRequiredOkdbFunctionsSandboxWorker;function requireOkdbFunctionsSandboxWorker(){const _0x3eb21b=_0x1da89e;if(hasRequiredOkdbFunctionsSandboxWorker)return okdbFunctionsSandboxWorker$1;hasRequiredOkdbFunctionsSandboxWorker=0x1;const {parentPort:_0x1d5afc,workerData:_0x1e366c}=require$$0$3,_0x1c594f=require$$1,{compileFunctionExpression:_0x34ac85}=requireOkdbFunctionsSandbox(),{serializeError:_0x5ba8e1}=requireOkdbFunctionsIpc(),{createExecutionContext:_0x51e19e}=requireOkdbFunctionsContext(),_0x59154c=require$$5;let _0x5bc4a5=null,_0x25b74c=![];const _0xfa372d=new Map(),_0x1e10db=new Map();function _0x2a3f72(_0x140355){try{_0x1d5afc['postMessage'](_0x140355);}catch{}}function _0x55db8e(_0xcd135b){const _0x393bd7=_0x3fa0,_0x5a15ab=(_0xcd135b[_0x393bd7(0x2de)]||_0x393bd7(0x1f8))+':'+_0xcd135b[_0x393bd7(0x1d6)]+':'+_0xcd135b[_0x393bd7(0x263)]+':'+_0xcd135b['hash'];let _0x4eb7fb=_0xfa372d[_0x393bd7(0x1ed)](_0x5a15ab);return!_0x4eb7fb&&(_0x4eb7fb=_0x34ac85(_0xcd135b[_0x393bd7(0x1d7)],{'allowFetch':_0xcd135b[_0x393bd7(0x265)]?.[_0x393bd7(0x262)]!==![],'allowedFetchDomains':_0xcd135b['runtime']?.[_0x393bd7(0x2b7)],'filename':_0xcd135b[_0x393bd7(0x1d6)]+_0x393bd7(0x255)}),_0xfa372d[_0x393bd7(0x268)](_0x5a15ab,_0x4eb7fb)),_0x4eb7fb;}async function _0x14f94a(_0x5a4b68){const _0x174280=_0x3fa0,_0x3848f1=Date['now'](),_0x3146c4=new AbortController();_0x1e10db[_0x174280(0x268)](_0x5a4b68[_0x174280(0x25f)],_0x3146c4);try{const _0x443180=_0x55db8e(_0x5a4b68);if(_0x5a4b68[_0x174280(0x2de)])await _0x5bc4a5[_0x174280(0x2a8)](_0x5a4b68['envName']);const _0x413919=_0x5a4b68[_0x174280(0x30e)]?[]:null,_0xca1eb9=_0x51e19e(_0x5bc4a5,_0x5a4b68,_0x2a3f72,_0x413919,_0x3146c4[_0x174280(0x257)]),_0x36b97a=await _0x443180(_0xca1eb9),_0x53661b={'type':_0x174280(0x1d0),'requestId':_0x5a4b68['requestId'],'runId':_0x5a4b68[_0x174280(0x288)],'result':_0x36b97a,'meta':{'runnerId':_0x174280(0x286)+process[_0x174280(0x233)],'startedAt':_0x3848f1,'finishedAt':Date[_0x174280(0x26a)](),'durationMs':Date[_0x174280(0x26a)]()-_0x3848f1}};if(_0x413919)_0x53661b[_0x174280(0x242)]=_0x413919;_0x2a3f72(_0x53661b);}catch(_0x1cf865){_0x2a3f72({'type':'error','requestId':_0x5a4b68[_0x174280(0x25f)],'runId':_0x5a4b68['runId'],'error':_0x5ba8e1(_0x1cf865),'meta':{'runnerId':'sandbox-'+process[_0x174280(0x233)],'startedAt':_0x3848f1,'finishedAt':Date[_0x174280(0x26a)](),'durationMs':Date[_0x174280(0x26a)]()-_0x3848f1}});}finally{_0x1e10db['delete'](_0x5a4b68[_0x174280(0x25f)]);}}async function _0x84e9d8(){const _0x227141=_0x3fa0;if(_0x25b74c)return;_0x25b74c=!![];try{await _0x5bc4a5?.[_0x227141(0x204)]?.();}catch{}process[_0x227141(0x228)](0x0);}async function _0x5b761d(){const _0x2a61f3=_0x3fa0,{rootPath:_0x3caf7c}=_0x1e366c??{};if(!_0x3caf7c)throw new Error(_0x2a61f3(0x289));_0x5bc4a5=new _0x59154c(_0x3caf7c,{'engines':![],'asyncProcessors':![],'compaction':_0x2a61f3(0x1ca),'http':![],'auth':{'open':!![]}}),await _0x5bc4a5['open']();const _0x16f12a=setInterval(()=>{const _0x1cfc25=_0x2a61f3;if(_0x25b74c)return;for(const [,_0x1a66f7]of _0x5bc4a5[_0x1cfc25(0x287)]){try{_0x1a66f7['_drainHandler']?.();}catch{}}},0xc8);if(typeof _0x16f12a['unref']===_0x2a61f3(0x23b))_0x16f12a['unref']();_0x1d5afc['on'](_0x2a61f3(0x28d),_0x2ca31b=>{const _0x2f7a4b=_0x2a61f3;if(!_0x2ca31b||typeof _0x2ca31b!==_0x2f7a4b(0x320))return;if(_0x2ca31b[_0x2f7a4b(0x2dc)]===_0x2f7a4b(0x2fb))return void _0x84e9d8();if(_0x2ca31b['type']===_0x2f7a4b(0x22b)){_0x1e10db['get'](_0x2ca31b[_0x2f7a4b(0x25f)])?.[_0x2f7a4b(0x1eb)](new Error(_0x2f7a4b(0x303)));return;}_0x2ca31b[_0x2f7a4b(0x2dc)]===_0x2f7a4b(0x225)&&void _0x14f94a(_0x2ca31b[_0x2f7a4b(0x2a9)]);});const _0x57d701=Math[_0x2a61f3(0x1d5)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x26e375=setInterval(()=>{const _0x40af36=_0x2a61f3;try{_0x2a3f72({'type':'stats','heapUsed':_0x1c594f[_0x40af36(0x23f)]()['used_heap_size']});}catch{}},_0x57d701);if(typeof _0x26e375['unref']==='function')_0x26e375[_0x2a61f3(0x2e4)]();_0x2a3f72({'type':_0x2a61f3(0x231)});}return _0x5b761d()[_0x3eb21b(0x300)](_0x3c5a51=>{const _0x5cf145=_0x3eb21b;_0x2a3f72({'type':_0x5cf145(0x284),'error':_0x5ba8e1(_0x3c5a51)}),process[_0x5cf145(0x228)](0x1);}),okdbFunctionsSandboxWorker$1;}var okdbFunctionsSandboxWorkerExports=requireOkdbFunctionsSandboxWorker(),okdbFunctionsSandboxWorker=getDefaultExportFromCjs(okdbFunctionsSandboxWorkerExports);module[_0x1da89e(0x2aa)]=okdbFunctionsSandboxWorker;
|
|
1
|
+
'use strict';const _0x2c7ed1=_0x1d78;(function(_0x3eee2e,_0x4f51de){const _0x530d47=_0x1d78,_0x9fdc32=_0x3eee2e();while(!![]){try{const _0x38d9ab=parseInt(_0x530d47(0x1d9))/0x1+-parseInt(_0x530d47(0x11e))/0x2*(parseInt(_0x530d47(0x1ad))/0x3)+parseInt(_0x530d47(0x11d))/0x4+parseInt(_0x530d47(0x27d))/0x5*(-parseInt(_0x530d47(0x153))/0x6)+-parseInt(_0x530d47(0x146))/0x7+-parseInt(_0x530d47(0x163))/0x8*(-parseInt(_0x530d47(0x239))/0x9)+parseInt(_0x530d47(0x1c3))/0xa;if(_0x38d9ab===_0x4f51de)break;else _0x9fdc32['push'](_0x9fdc32['shift']());}catch(_0x28cbe9){_0x9fdc32['push'](_0x9fdc32['shift']());}}}(_0x4abc,0x1ed5a));var require$$0$3=require(_0x2c7ed1(0x226)),require$$2=require('v8'),require$$0=require('node:vm'),require$$0$2=require(_0x2c7ed1(0x230)),require$$0$1=require('node:perf_hooks'),require$$6=require(_0x2c7ed1(0x265));function getDefaultExportFromCjs(_0x467fd4){const _0x4491fb=_0x2c7ed1;return _0x467fd4&&_0x467fd4[_0x4491fb(0x1e4)]&&Object[_0x4491fb(0x12f)][_0x4491fb(0x168)][_0x4491fb(0x241)](_0x467fd4,'default')?_0x467fd4[_0x4491fb(0x184)]:_0x467fd4;}var okdbFunctionsSandboxWorker$1={},okdbFatalReport,hasRequiredOkdbFatalReport;function requireOkdbFatalReport(){if(hasRequiredOkdbFatalReport)return okdbFatalReport;hasRequiredOkdbFatalReport=0x1;function _0x386208(_0x46ded0){const _0x2d6dc6=_0x1d78;if(process.env.OKDB_FATAL_REPORT!=='1')return;try{if(!process[_0x2d6dc6(0x25f)])return;process[_0x2d6dc6(0x25f)][_0x2d6dc6(0x1f7)]=!![];try{if(_0x2d6dc6(0x111)in process[_0x2d6dc6(0x25f)])process[_0x2d6dc6(0x25f)][_0x2d6dc6(0x111)]=process.env.OKDB_FATAL_REPORT_ENV!=='1';}catch{}if(process[_0x2d6dc6(0x260)]!==_0x2d6dc6(0x1e6))try{process[_0x2d6dc6(0x25f)][_0x2d6dc6(0x1df)]=!![];if(typeof process[_0x2d6dc6(0x25f)][_0x2d6dc6(0x122)]===_0x2d6dc6(0x24a))process[_0x2d6dc6(0x25f)][_0x2d6dc6(0x122)]='SIGSEGV';}catch{}if(process.env.OKDB_REPORT_DIR)try{require('fs')[_0x2d6dc6(0x1ff)](process.env.OKDB_REPORT_DIR,{'recursive':!![]}),process['report'][_0x2d6dc6(0x261)]=process.env.OKDB_REPORT_DIR;}catch{}try{process['report'][_0x2d6dc6(0x195)]='';}catch{}if(_0x46ded0)process.env.OKDB_REPORT_TAG=String(_0x46ded0);}catch{}}return okdbFatalReport={'enableFatalReport':_0x386208},okdbFatalReport;}var okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function requireOkdbFunctionsSandbox(){if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0x3a8693=require$$0;function _0x55c56c(_0x104d68){const _0x1374f6=_0x104d68==='*',_0x4a9fcf=_0x1374f6?null:new Set(Array['isArray'](_0x104d68)?_0x104d68:[]);return function _0x4587f4(_0x27ad7,_0x49577f){const _0x34042e=_0x1d78;if(!_0x1374f6){let _0x130228;try{const _0x5be7f3=new URL(typeof _0x27ad7===_0x34042e(0x24a)?_0x27ad7:_0x27ad7?.[_0x34042e(0x12b)]??String(_0x27ad7));_0x130228=_0x5be7f3[_0x34042e(0x152)];}catch{const _0x454118=new Error(_0x34042e(0x1bb));return _0x454118[_0x34042e(0x205)]='FETCH_NOT_ALLOWED',Promise[_0x34042e(0x1ba)](_0x454118);}if(!_0x4a9fcf['has'](_0x130228)){const _0x1dabcf=new Error(_0x4a9fcf[_0x34042e(0x132)]===0x0?_0x34042e(0x26e):_0x34042e(0x24f)+_0x130228+_0x34042e(0x1ac));return _0x1dabcf[_0x34042e(0x205)]='FETCH_NOT_ALLOWED',Promise['reject'](_0x1dabcf);}}return fetch(_0x27ad7,_0x49577f);};}function _0x191e46(_0x19bc13={}){const _0x283992=_0x1d78,_0xed964b=_0x19bc13[_0x283992(0x201)]!==![],_0x406565=_0x19bc13[_0x283992(0x1cb)]??[],_0x384a6c={'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[_0x283992(0x227)]};return _0xed964b&&typeof fetch===_0x283992(0x249)&&(_0x384a6c[_0x283992(0x179)]=_0x55c56c(_0x406565)),_0x384a6c[_0x283992(0x128)]=_0x384a6c,_0x384a6c;}function _0x321dc5(_0x244443,_0x2d03d8={}){const _0x3a0773=_0x1d78,_0x3a784d=_0x191e46(_0x2d03d8),_0x5817d9=_0x3a8693[_0x3a0773(0x20c)](_0x3a784d,{'name':'okdb-function-sandbox','codeGeneration':{'strings':![],'wasm':![]}});let _0x4f25e3;try{_0x4f25e3=new _0x3a8693[(_0x3a0773(0x220))]('('+_0x244443+')',{'filename':_0x2d03d8[_0x3a0773(0x195)]??_0x3a0773(0x224)});}catch(_0x554b9b){const _0x425f06=new Error(_0x554b9b?.[_0x3a0773(0x165)]||_0x3a0773(0x244));_0x425f06[_0x3a0773(0x205)]=_0x3a0773(0x248),_0x425f06[_0x3a0773(0x19f)]=_0x554b9b;throw _0x425f06;}let _0x230836;try{_0x230836=_0x4f25e3[_0x3a0773(0x25d)](_0x5817d9,{'timeout':_0x2d03d8[_0x3a0773(0x1a7)]??0x64});}catch(_0x3d04de){const _0x413b5e=new Error(_0x3d04de?.[_0x3a0773(0x165)]||_0x3a0773(0x1c9));_0x413b5e['code']=_0x3a0773(0x248),_0x413b5e[_0x3a0773(0x19f)]=_0x3d04de;throw _0x413b5e;}if(typeof _0x230836!==_0x3a0773(0x249)){const _0x3046b3=new Error(_0x3a0773(0x256));_0x3046b3[_0x3a0773(0x205)]=_0x3a0773(0x218);throw _0x3046b3;}return _0x230836;}return okdbFunctionsSandbox={'createSandboxGlobals':_0x191e46,'compileFunctionExpression':_0x321dc5,'_buildRestrictedFetch':_0x55c56c},okdbFunctionsSandbox;}function _0x4abc(){const _0x523218=['upload','win32','_undoHooks','disable','query','license:invalid','sourceEnv','type:drop','\x20does\x20not\x20exist','env:removed','getTTL','txn:rollback','envName','remove','openEnv','stringify','loop-lag','system:env_release','reportOnFatalError','ref:violation','sync:apply','captureStackTrace','cancel','_admissionTimer','timeout','length','mkdirSync','result','allowFetch','txn:start','OKDBError','percentile','code','txn\x20ops\x20must\x20be\x20an\x20array','getIndex','getChanges','OKDBUniqueConstraintError','applyOps','requestedAt','createContext','cron','getByPrefix','requestId','getJob','stop','Type\x20\x27','index:ready','byIndex','fts:registered','emit','rollback','FUNCTION_SCRIPT_INVALID_SHAPE','license:added','onUndo','txn-commit','cursorKey','type:registered','functionName','bucket','Script','runtime','getClock','start','okdb-function.js','_closeReadTransaction','worker_threads','crypto','sourceType','TXN_ROLLBACK','getBucket','TXN_INVALID_ACTION','failures','INVALID_PRIMARY_KEY','geoQuery','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','uuid','pid','files','index:registered','registerIndex','stderr','FOREIGN_KEY_VIOLATION','warn','Index\x20\x27','1038591vFHdvy','fatal','createWriteFacade','OKDBForeignKeyDeleteError','fts:reset','removeJob','close','ms/','call','dropIndex','addBucket','Function\x20script\x20failed\x20to\x20compile','txnId','view:progress','materializerContext','FUNCTION_SCRIPT_COMPILE_FAILED','function','string','commit','envPath','_windowCbs','actions','fetch\x20blocked:\x20hostname\x20\x22','_timer','_buckets','delete','name','createEnvironment','readTransaction','Function\x20script\x20must\x20evaluate\x20to\x20a\x20callable\x20function','Cannot\x20set\x20enforce\x20schema\x20on\x20','_doHooks','setTTL','patch','Invalid\x20primary\x20key\x20type:\x20','creating','runInContext','timeoutMs','report','platform','directory','OKDBTypeAlreadyRegisteredError','getMany','isArray','./okdb','system:stopped','fieldPath','OKDBNotFoundError','priority','set','runId','Unknown\x20custom\x20function\x20error','Version\x20mismatch\x20for\x20','fetch\x20is\x20not\x20allowed\x20in\x20this\x20function\x20sandbox\x20(no\x20allowedFetchDomains\x20configured)','maxExtra','_admissionStarted','TXN_CLOSED','now','bind','schema:drop','processor','OKDBAlreadyExistsError','clearTTL','TXN_INVALID_OPS','VERSION_MISMATCH','ms\x20p99=','\x22\x20on\x20\x22','targetType','35DiidKg','job','getKeys','registerType','any','ready','item:create','reset','ttl:clear','excludeEnv','_closed','hasType','OKDBIndexNotRegisteredError','info','bus:env_release','index:progress','Transaction\x20already\x20closed','Unknown\x20OKDB\x20transaction\x20error','get','Invalid\x20index\x20key\x20type\x20for\x20\x27','INDEX_ALREADY_REGISTERED','595540YOFJQW','214iYLiIT','\x20references\x20',':\x20expected\x20','TXN_ERROR','signal','run','map','system:type_drop','env','registerFts','globalThis','write','okdb','url','abort','freeze','used_heap_size','prototype','clearTtl','ensureType','size','postMessage','OKDBIndexHasConsumersError','\x27,\x20cannot\x20map\x20to\x20\x27','unique:violation','getCount','started','bus:poke','Cannot\x20delete\x20','~system','key','INDEX_NOT_REGISTERED','updateJob','job_heartbeat','dropType','ttl:set','_report','exports','dryRun','entries','1545208VqqoKY','has','\x20documents\x20fail\x20validation','resetIndex','args','(worst\x20','ttl','\x27\x20on\x20type\x20\x27','useReadTransaction','push','txn','payload','hostname','49926Jvlzel','sweepExpiredTTL','sandbox-','create','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','\x20which\x20does\x20not\x20exist','log','getIndexStatus','\x27\x20already\x20registered','transaction\x20commit\x20failed','Unique\x20constraint\x20violated\x20on\x20','put','OKDBSchemaValidationError','clearDefaultTTL','references','action','16sXsqdX',':\x20key\x20[','message','cancelled\x20by\x20caller','enqueue','hasOwnProperty','system:drain','getByPath','OKDBTypeNotRegisteredError','TYPE_NOT_REGISTERED','ms\x20busy=','errors','enable','bus:drain','actionCount','\x27\x20is\x20already\x20registered','SCHEMA_VALIDATION_FAILED','INVALID_VALUE','OKDBForeignKeyError','getRange','_envs','fts:drop','fetch','tries','starting','unref','resetFts','hasIndex','claimId','maxMs','stream','setTtl','range','default','OKDBVersionMismatchError','targetEnv','system:ready','transaction','ref:violation_resolved','options','ttl:expired','getValues','_writer','ms\x20max=','.okdb-function.js','type','enabled','update','INVALID_INDEX_KEY','events','filename','ttlStats','materializer','queue','license:removed','FOREIGN_KEY_DELETE_RESTRICTED','getEntry','setDefaultTTL','INDEX_HAS_CONSUMERS','_startAdmission','cause','script','schema:set','jobContext','tags','_assertOpen','resetting','sourceKey','compileTimeoutMs','NOT_FOUND','Unknown\x20transaction\x20action:\x20','_log','kind','\x22\x20is\x20not\x20in\x20the\x20allowedFetchDomains\x20list','6444JOKcBy','targetKey','created','item:remove','dryRunActions','index:reset','listBuckets',',\x20got\x20','details','\x27\x20doesn\x27t\x20exist','UNIQUE_CONSTRAINT','debug','object','reject','fetch\x20blocked:\x20invalid\x20URL','mode','processorContext','error','toFixed','_started','engineKey','stack','1390400UIJEjX','version','stopping','keys','sdk','exit','Function\x20script\x20failed\x20to\x20initialize','unsafe','allowedFetchDomains','list','item:update','join','\x20already\x20exists','OKDBInvalidValueError','max','nativeCode','system:bus_state_change','OKDBSchemaCollectionError','hash','unique:violation_resolved','global','txn:end','116402XJqcMg','listTTL','Index\x20\x22',']\x20already\x20maps\x20to\x20\x27','stopped','count','reportOnSignal','TYPE_ALREADY_REGISTERED','value','add','OKDBInvalidPrimaryKeyError','__esModule'];_0x4abc=function(){return _0x523218;};return _0x4abc();}var okdbFunctionsIpc,hasRequiredOkdbFunctionsIpc;function requireOkdbFunctionsIpc(){if(hasRequiredOkdbFunctionsIpc)return okdbFunctionsIpc;hasRequiredOkdbFunctionsIpc=0x1;function _0x530694(_0x24702e){const _0x5f2b1d=_0x1d78;if(!_0x24702e)return null;return{'message':_0x24702e[_0x5f2b1d(0x165)]||String(_0x24702e),'stack':_0x24702e[_0x5f2b1d(0x1c2)]||null,'code':_0x24702e[_0x5f2b1d(0x205)]||null,'details':_0x24702e[_0x5f2b1d(0x1b5)]||null};}function _0x575957(_0x509c46){const _0x20ca9e=_0x1d78;if(!_0x509c46)return new Error(_0x20ca9e(0x26c));const _0x5e552f=new Error(_0x509c46[_0x20ca9e(0x165)]||String(_0x509c46));if(_0x509c46[_0x20ca9e(0x1c2)])_0x5e552f[_0x20ca9e(0x1c2)]=_0x509c46['stack'];if(_0x509c46[_0x20ca9e(0x205)])_0x5e552f['code']=_0x509c46[_0x20ca9e(0x205)];if(_0x509c46[_0x20ca9e(0x1b5)])_0x5e552f['details']=_0x509c46[_0x20ca9e(0x1b5)];return _0x5e552f;}return okdbFunctionsIpc={'serializeError':_0x530694,'deserializeError':_0x575957},okdbFunctionsIpc;}var okdbEnums,hasRequiredOkdbEnums;function _0x1d78(_0x4ae8c9,_0x22df4f){_0x4ae8c9=_0x4ae8c9-0x111;const _0x4abc94=_0x4abc();let _0x1d7808=_0x4abc94[_0x4ae8c9];return _0x1d7808;}function requireOkdbEnums(){const _0x339720=_0x2c7ed1;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x93ffe3={'PUT':_0x339720(0x15e),'REMOVE':_0x339720(0x1f2),'INDEX_DROP':_0x339720(0x242),'INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x339720(0x149),'TYPE_REGISTER':_0x339720(0x280),'TYPE_DROP':_0x339720(0x140),'FTS_REGISTER':_0x339720(0x127),'FTS_DROP':'dropFts','FTS_RESET':_0x339720(0x17d),'SCHEMA_SET':'setSchema','SCHEMA_DROP':'dropSchema','TTL_SET':_0x339720(0x182),'TTL_CLEAR':_0x339720(0x130)},_0x2d2c22={'SYSTEM_READY':_0x339720(0x187),'SYSTEM_STOPPED':_0x339720(0x266),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x339720(0x169),'SYSTEM_TYPE_DROP':_0x339720(0x125),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x339720(0x1d3),'ITEM_CREATE':_0x339720(0x283),'ITEM_UPDATE':_0x339720(0x1cd),'ITEM_REMOVE':_0x339720(0x1b0),'INDEX_RESET':_0x339720(0x1b2),'INDEX_READY':_0x339720(0x213),'INDEX_PROGRESS':_0x339720(0x117),'VIEW_PROGRESS':_0x339720(0x246),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x339720(0x233),'FTS_REGISTERED':_0x339720(0x215),'FTS_DROP':_0x339720(0x178),'FTS_RESET':_0x339720(0x23d),'SCHEMA_SET':_0x339720(0x1a1),'SCHEMA_DROP':_0x339720(0x274),'UNIQUE_VIOLATION':_0x339720(0x136),'UNIQUE_VIOLATION_RESOLVED':_0x339720(0x1d6),'REF_VIOLATION':_0x339720(0x1f8),'REF_VIOLATION_RESOLVED':_0x339720(0x189),'SYNC_APPLY':_0x339720(0x1f9),'TXN_START':_0x339720(0x202),'TXN_END':_0x339720(0x1d8),'TXN_ROLLBACK':_0x339720(0x1f0),'TYPE_REGISTERED':_0x339720(0x21d),'TYPE_DROP':_0x339720(0x1ec),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x339720(0x1ee),'SYSTEM_ENV_RELEASE':_0x339720(0x1f6),'TTL_EXPIRED':_0x339720(0x18b),'TTL_SET':_0x339720(0x141),'TTL_CLEAR':_0x339720(0x285),'LICENSE_INVALID':_0x339720(0x1ea),'LICENSE_ADDED':_0x339720(0x219),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x339720(0x199)},_0x28f175={'CREATING':_0x339720(0x25c),'RESETTING':'resetting','READY':_0x339720(0x282),'DROPPING':'dropping','WAITING':'waiting'},_0x168272={'CREATED':_0x339720(0x1af),'STARTING':_0x339720(0x17b),'STARTED':_0x339720(0x138),'STOPPING':_0x339720(0x1c5),'STOPPED':'stopped'},_0x2105c0={'CREATING':'creating','READY':'ready','HALTED':'halted','STOPPED':_0x339720(0x1dd),'RESETTING':_0x339720(0x1a5)},_0x48638e=Object[_0x339720(0x12d)]({'POKE':_0x339720(0x139),'DRAIN':_0x339720(0x170),'TYPE_DROP':'bus:type_drop','PROC':'bus:proc','ENV_RELEASE':_0x339720(0x116)});return okdbEnums={'BUS_EVENTS':_0x48638e,'CHANGE_ACTIONS':_0x93ffe3,'EVENTS':_0x2d2c22,'INDEX_STATE':_0x28f175,'OKDB_STATE':_0x168272,'VIEW_STATE':_0x2105c0},okdbEnums;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x39f2f6 extends Error{constructor(_0x5e68fe,_0x1948b9,_0x20267b={}){const _0x5d7ff0=_0x1d78;super(_0x5e68fe),this[_0x5d7ff0(0x253)]=_0x5d7ff0(0x203),this['code']=_0x1948b9,this[_0x5d7ff0(0x1b5)]=_0x20267b,_0x20267b[_0x5d7ff0(0x19f)]&&(this[_0x5d7ff0(0x19f)]=_0x20267b['cause']),Error[_0x5d7ff0(0x1fa)](this,this['constructor']);}}class _0xf4f53f extends _0x39f2f6{constructor(_0x3a3e87,_0x42a4d1,_0x4c43ed,_0x45bd53){const _0xff10a7=_0x1d78;super(_0xff10a7(0x26d)+_0x3a3e87+'@'+_0x42a4d1+_0xff10a7(0x120)+_0x4c43ed+_0xff10a7(0x1b4)+_0x45bd53,_0xff10a7(0x279),{'type':_0x3a3e87,'key':_0x42a4d1,'expectedVersion':_0x4c43ed,'actualVersion':_0x45bd53}),this['name']=_0xff10a7(0x185);}}class _0x5a4d1b extends _0x39f2f6{constructor(_0x10599b,_0x1508da){const _0x464d5f=_0x1d78;super(_0x10599b+'@'+_0x1508da+_0x464d5f(0x1ed),_0x464d5f(0x1a8),{'type':_0x10599b,'key':_0x1508da}),this[_0x464d5f(0x253)]=_0x464d5f(0x268);}}class _0x21969f extends _0x39f2f6{constructor(_0x56e2ee,_0x5aaf3f){const _0x27dc60=_0x1d78;super(_0x56e2ee+'@'+_0x5aaf3f+_0x27dc60(0x1cf),'ALREADY_EXISTS',{'type':_0x56e2ee,'key':_0x5aaf3f}),this[_0x27dc60(0x253)]=_0x27dc60(0x276);}}class _0x5d8a16 extends _0x39f2f6{constructor(_0x8ff56,_0x7d24c6){const _0x37d0dd=_0x1d78,_0x57d37d=typeof _0x7d24c6;super(_0x37d0dd(0x11b)+_0x8ff56+'\x27:\x20'+_0x57d37d+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x7d24c6,_0x37d0dd(0x193),{'index':_0x8ff56,'key':_0x7d24c6,'keyType':_0x57d37d}),this[_0x37d0dd(0x253)]='OKDBInvalidIndexKeyError';}}class _0x45f366 extends _0x39f2f6{constructor(_0x3afd21){const _0x3b6bd1=_0x1d78,_0x3d8027=typeof _0x3afd21;super(_0x3b6bd1(0x25b)+_0x3d8027+_0x3b6bd1(0x157)+_0x3afd21,_0x3b6bd1(0x22d),{'key':_0x3afd21,'keyType':_0x3d8027}),this[_0x3b6bd1(0x253)]=_0x3b6bd1(0x1e3);}}class _0x5c8bf4 extends _0x39f2f6{constructor(_0x4eff27){const _0x99a9b8=_0x1d78;super(_0x99a9b8(0x212)+_0x4eff27+'\x27\x20doesn\x27t\x20exist',_0x99a9b8(0x16c),{'type':_0x4eff27}),this['name']=_0x99a9b8(0x16b);}}class _0x54f48d extends _0x39f2f6{constructor(_0x2f8736){const _0x2b5aad=_0x1d78;super(_0x2b5aad(0x212)+_0x2f8736+_0x2b5aad(0x15b),_0x2b5aad(0x1e0),{'type':_0x2f8736}),this['name']=_0x2b5aad(0x262);}}class _0x3e4bab extends _0x39f2f6{constructor(_0x4d194b,_0x508d08){const _0x24c128=_0x1d78;super('Index\x20\x27'+_0x508d08+_0x24c128(0x14d)+_0x4d194b+_0x24c128(0x1b6),_0x24c128(0x13d),{'type':_0x4d194b,'index':_0x508d08}),this[_0x24c128(0x253)]=_0x24c128(0x114);}}class _0x34082d extends _0x39f2f6{constructor(_0xff10e3,_0x59f3a0){const _0x53afc6=_0x1d78;super(_0x53afc6(0x238)+_0x59f3a0+_0x53afc6(0x14d)+_0xff10e3+_0x53afc6(0x172),_0x53afc6(0x11c),{'type':_0xff10e3,'index':_0x59f3a0}),this[_0x53afc6(0x253)]='OKDBIndexAlreadyRegisteredError';}}class _0x402536 extends _0x39f2f6{constructor(_0x2ca024,_0x5edaca={}){const _0x16adc9=_0x1d78;super(_0x2ca024,_0x16adc9(0x174),_0x5edaca),this[_0x16adc9(0x253)]=_0x16adc9(0x1d0);}}class _0xb4bee8 extends _0x39f2f6{constructor(_0x23bf62,_0x14698e,_0x455edb,_0x38d2bb,_0x11f3af){const _0x5ea66e=_0x1d78;super(_0x5ea66e(0x15d)+_0x23bf62+'@'+_0x14698e+_0x5ea66e(0x164)+_0x455edb+_0x5ea66e(0x1dc)+_0x38d2bb+_0x5ea66e(0x135)+_0x11f3af+'\x27',_0x5ea66e(0x1b7),{'type':_0x23bf62,'index':_0x14698e,'indexKey':_0x455edb,'existingKey':_0x38d2bb,'conflictingKey':_0x11f3af}),this[_0x5ea66e(0x253)]=_0x5ea66e(0x209);}}class _0x170891 extends _0x39f2f6{constructor(_0xf18f88,_0x522450,_0x50ff62){const _0x4a365d=_0x1d78;super('Schema\x20validation\x20failed\x20for\x20'+_0xf18f88+'@'+_0x522450,_0x4a365d(0x173),{'type':_0xf18f88,'key':_0x522450,'errors':_0x50ff62}),this[_0x4a365d(0x253)]=_0x4a365d(0x15f),this[_0x4a365d(0x190)]=_0xf18f88,this[_0x4a365d(0x13c)]=_0x522450,this[_0x4a365d(0x16e)]=_0x50ff62;}}class _0x2e07d5 extends _0x39f2f6{constructor(_0x1a4fb1,_0x3f0d8d){const _0x364362=_0x1d78;super(_0x364362(0x257)+_0x1a4fb1+':\x20'+_0x3f0d8d[_0x364362(0x1fe)]+_0x364362(0x148),'SCHEMA_COLLECTION_INVALID',{'type':_0x1a4fb1,'failures':_0x3f0d8d}),this[_0x364362(0x253)]=_0x364362(0x1d4),this[_0x364362(0x190)]=_0x1a4fb1,this[_0x364362(0x22c)]=_0x3f0d8d;}}class _0xe89c8d extends _0x39f2f6{constructor(_0x9de961,_0x42730b,_0x11b8e0,_0x225b0b,_0x49b5b1){const _0x26cbcb=_0x1d78;super('Foreign\x20key\x20violation:\x20'+_0x9de961+'@'+_0x42730b+'.'+_0x11b8e0+_0x26cbcb(0x11f)+_0x225b0b+'@'+_0x49b5b1+_0x26cbcb(0x158),_0x26cbcb(0x236),{'sourceType':_0x9de961,'sourceKey':_0x42730b,'fieldPath':_0x11b8e0,'targetType':_0x225b0b,'targetKey':_0x49b5b1}),this[_0x26cbcb(0x253)]=_0x26cbcb(0x175),this[_0x26cbcb(0x228)]=_0x9de961,this[_0x26cbcb(0x1a6)]=_0x42730b,this[_0x26cbcb(0x267)]=_0x11b8e0,this[_0x26cbcb(0x27c)]=_0x225b0b,this[_0x26cbcb(0x1ae)]=_0x49b5b1;}}class _0x4ab416 extends _0x39f2f6{constructor(_0x445acf,_0x3936a8,_0x32d82a){const _0xbe077=_0x1d78;super(_0xbe077(0x13a)+_0x445acf+'@'+_0x3936a8+':\x20'+_0x32d82a[_0xbe077(0x1fe)]+_0xbe077(0x22f),_0xbe077(0x19a),{'targetType':_0x445acf,'targetKey':_0x3936a8,'references':_0x32d82a}),this['name']=_0xbe077(0x23c),this[_0xbe077(0x27c)]=_0x445acf,this[_0xbe077(0x1ae)]=_0x3936a8,this[_0xbe077(0x161)]=_0x32d82a;}}class _0x1f0dba extends _0x39f2f6{constructor(_0x1cbb54,_0x5e69ae,_0x4c8646){const _0x120e0f=_0x1d78;super(_0x120e0f(0x1db)+_0x5e69ae+_0x120e0f(0x27b)+_0x1cbb54+'\x22\x20is\x20used\x20by:\x20'+_0x4c8646[_0x120e0f(0x124)](_0x2d4809=>_0x2d4809[_0x120e0f(0x1ab)]+':'+_0x2d4809[_0x120e0f(0x253)])[_0x120e0f(0x1ce)](',\x20'),_0x120e0f(0x19d),{'type':_0x1cbb54,'index':_0x5e69ae,'usedBy':_0x4c8646}),this[_0x120e0f(0x253)]=_0x120e0f(0x134);}}return okdbError={'OKDBError':_0x39f2f6,'OKDBVersionMismatchError':_0xf4f53f,'OKDBNotFoundError':_0x5a4d1b,'OKDBAlreadyExistsError':_0x21969f,'OKDBInvalidIndexKeyError':_0x5d8a16,'OKDBInvalidPrimaryKeyError':_0x45f366,'OKDBTypeNotRegisteredError':_0x5c8bf4,'OKDBTypeAlreadyRegisteredError':_0x54f48d,'OKDBIndexNotRegisteredError':_0x3e4bab,'OKDBIndexAlreadyRegisteredError':_0x34082d,'OKDBInvalidValueError':_0x402536,'OKDBUniqueConstraintError':_0xb4bee8,'OKDBSchemaValidationError':_0x170891,'OKDBSchemaCollectionError':_0x2e07d5,'OKDBForeignKeyError':_0xe89c8d,'OKDBForeignKeyDeleteError':_0x4ab416,'OKDBIndexHasConsumersError':_0x1f0dba},okdbError;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x48a41b=_0x2c7ed1;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x18ff31,performance:_0x1c8110}=require$$0$1,_0x4c1507=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x3f0c0c=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4d0428=process.env.OKDB_LOOP_LAG_ALL==='1',_0x139a8e=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x1e7ecc{constructor(){const _0x1d1a35=_0x1d78;this[_0x1d1a35(0x191)]=_0x4c1507,this[_0x1d1a35(0x251)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x1d1a35(0x1c0)]=![],this[_0x1d1a35(0x1aa)]=(_0x5687f8,_0x1f0337)=>process[_0x1d1a35(0x235)][_0x1d1a35(0x129)](_0x5687f8+(_0x1f0337?'\x20'+JSON[_0x1d1a35(0x1f4)](_0x1f0337):'')+'\x0a');}[_0x48a41b(0x272)](){const _0x9ecaae=_0x48a41b;return _0x1c8110[_0x9ecaae(0x272)]();}['setLogger'](_0x574fa9){const _0x23747b=_0x48a41b;if(typeof _0x574fa9===_0x23747b(0x249))this[_0x23747b(0x1aa)]=_0x574fa9;}['note'](_0x1da940,_0x3c64f3,_0x14d537){const _0xaa92a9=_0x48a41b;if(!this['enabled'])return;let _0x40b21d=this['_buckets'][_0xaa92a9(0x11a)](_0x1da940);!_0x40b21d&&(_0x40b21d={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0xaa92a9(0x251)][_0xaa92a9(0x26a)](_0x1da940,_0x40b21d)),_0x40b21d['ms']+=_0x3c64f3,_0x40b21d[_0xaa92a9(0x1de)]+=0x1,_0x3c64f3>_0x40b21d[_0xaa92a9(0x180)]&&(_0x40b21d[_0xaa92a9(0x180)]=_0x3c64f3,_0x40b21d['maxExtra']=_0x14d537||'');}[_0x48a41b(0x223)](_0x3f716e){const _0x248850=_0x48a41b;if(!this[_0x248850(0x191)]||this[_0x248850(0x1c0)])return;this[_0x248850(0x1c0)]=!![];if(_0x3f716e)this[_0x248850(0x1aa)]=_0x3f716e;this['_h']=_0x18ff31({'resolution':0xa}),this['_h'][_0x248850(0x16f)](),this[_0x248850(0x250)]=setInterval(()=>this[_0x248850(0x142)](),_0x3f0c0c);if(this[_0x248850(0x250)][_0x248850(0x17c)])this['_timer'][_0x248850(0x17c)]();}['onWindow'](_0x74520e){const _0x23a95d=_0x48a41b;if(!this[_0x23a95d(0x24d)])this[_0x23a95d(0x24d)]=new Set();this['_windowCbs'][_0x23a95d(0x1e2)](_0x74520e);if(!this[_0x23a95d(0x1c0)])this[_0x23a95d(0x19e)]();}['offWindow'](_0x224161){const _0x147e45=_0x48a41b;this[_0x147e45(0x24d)]?.[_0x147e45(0x252)](_0x224161);}[_0x48a41b(0x19e)](){const _0xc4e63d=_0x48a41b;if(this[_0xc4e63d(0x270)])return;this[_0xc4e63d(0x270)]=!![];!this['_h']&&(this['_h']=_0x18ff31({'resolution':0xa}),this['_h'][_0xc4e63d(0x16f)]());const _0x18a0c9=_0x3f0c0c;this['_admissionTimer']=setInterval(()=>{const _0x10f18c=_0xc4e63d,_0x143fde=this['_h'];if(!_0x143fde)return;const _0x22d062=_0x143fde[_0x10f18c(0x204)](0x63)/0xf4240,_0x2fb06d=_0x143fde[_0x10f18c(0x1d1)]/0xf4240,_0x4ed8bf=_0x143fde['mean']/0xf4240;_0x143fde[_0x10f18c(0x284)]();if(this['_windowCbs'])for(const _0x4cc5a5 of this[_0x10f18c(0x24d)]){try{_0x4cc5a5({'p99Ms':_0x22d062,'maxMs':_0x2fb06d,'meanMs':_0x4ed8bf,'reportMs':_0x18a0c9});}catch{}}},_0x18a0c9);if(this['_admissionTimer']['unref'])this[_0xc4e63d(0x1fc)][_0xc4e63d(0x17c)]();}[_0x48a41b(0x142)](){const _0xf11dcb=_0x48a41b,_0xec383d=this['_h'],_0x240563=_0xec383d[_0xf11dcb(0x1d1)]/0xf4240,_0x5a506e=_0xec383d[_0xf11dcb(0x204)](0x63)/0xf4240,_0x56dbff=_0xec383d['mean']/0xf4240;_0xec383d[_0xf11dcb(0x284)]();const _0x5ee03a=[...this[_0xf11dcb(0x251)][_0xf11dcb(0x145)]()][_0xf11dcb(0x124)](([_0x3b9102,_0x4c8839])=>({'label':_0x3b9102,..._0x4c8839}))['sort']((_0x1a6fc8,_0x1261b7)=>_0x1261b7['ms']-_0x1a6fc8['ms'])['slice'](0x0,0x8);this['_buckets']['clear']();const _0x325456=_0x5ee03a['reduce']((_0x5d0c9d,_0x26db10)=>_0x5d0c9d+_0x26db10['ms'],0x0),_0x5c2ecf=_0x5ee03a['map'](_0x4e8a88=>_0x4e8a88['label']+'='+_0x4e8a88['ms']['toFixed'](0x0)+_0xf11dcb(0x240)+_0x4e8a88[_0xf11dcb(0x1de)]+(_0x4e8a88[_0xf11dcb(0x180)]>0x5?_0xf11dcb(0x14b)+_0x4e8a88[_0xf11dcb(0x180)][_0xf11dcb(0x1bf)](0x0)+'ms'+(_0x4e8a88[_0xf11dcb(0x26f)]?'\x20'+_0x4e8a88[_0xf11dcb(0x26f)]:'')+')':''));(_0x4d0428||_0x240563>=_0x139a8e)&&this[_0xf11dcb(0x1aa)]('loop-lag\x20'+_0x3f0c0c+_0xf11dcb(0x18e)+_0x240563['toFixed'](0x0)+_0xf11dcb(0x27a)+_0x5a506e['toFixed'](0x0)+'ms\x20mean='+_0x56dbff[_0xf11dcb(0x1bf)](0x0)+_0xf11dcb(0x16d)+_0x325456['toFixed'](0x0)+'ms'+(_0x5c2ecf[_0xf11dcb(0x1fe)]?'\x20│\x20'+_0x5c2ecf[_0xf11dcb(0x1ce)]('\x20\x20'):''),{'feature':_0xf11dcb(0x1f5)});if(this['_windowCbs'])for(const _0x6d87f2 of this[_0xf11dcb(0x24d)]){try{_0x6d87f2({'p99Ms':_0x5a506e,'maxMs':_0x240563,'meanMs':_0x56dbff,'reportMs':_0x3f0c0c});}catch{}}}[_0x48a41b(0x211)](){const _0x30adab=_0x48a41b;if(this[_0x30adab(0x250)])clearInterval(this[_0x30adab(0x250)]);if(this['_h'])this['_h'][_0x30adab(0x1e8)]();this[_0x30adab(0x250)]=null,this['_h']=null,this[_0x30adab(0x1c0)]=![];}}const _0x19e934=new _0x1e7ecc();if(_0x19e934['enabled'])_0x19e934[_0x48a41b(0x223)]();return okdbLoopMonitor={'LOOP':_0x19e934},okdbLoopMonitor;}var okdbTransaction,hasRequiredOkdbTransaction;function requireOkdbTransaction(){const _0x4e74ee=_0x2c7ed1;if(hasRequiredOkdbTransaction)return okdbTransaction;hasRequiredOkdbTransaction=0x1;const _0x3867c1=require$$0$2,{EVENTS:_0x5847d6}=requireOkdbEnums(),{OKDBError:_0x132856}=requireOkdbError(),{LOOP:_0x1629df}=requireOkdbLoopMonitor();function _0x1a1f2b(_0x2b2884){const _0x364be0=_0x1d78;return _0x2b2884[_0x364be0(0x124)](_0x83093a=>{const _0x3238d9=_0x364be0,[_0x2823b4,_0x29b1ac]=_0x83093a[_0x3238d9(0x14a)]||[];return{'action':_0x83093a[_0x3238d9(0x162)],'type':_0x2823b4,'key':_0x29b1ac};});}class _0x5af86d{[_0x4e74ee(0x12a)];[_0x4e74ee(0x24e)]=[];[_0x4e74ee(0x258)]=[];[_0x4e74ee(0x1e7)]=[];constructor(_0x42b6e1,_0x24c386={'useReadTransaction':![]}){const _0x5b55ac=_0x4e74ee;this['okdb']=_0x42b6e1,this[_0x5b55ac(0x18a)]=_0x24c386,this['id']=_0x3867c1['v4'](),this['readTransaction']=this[_0x5b55ac(0x18a)][_0x5b55ac(0x14e)]?this[_0x5b55ac(0x12a)]['db'][_0x5b55ac(0x14e)]():null,this['_closed']=![];}['onDo'](_0xc0ec4d){const _0x420fd6=_0x4e74ee;this['_doHooks'][_0x420fd6(0x14f)](_0xc0ec4d);}[_0x4e74ee(0x21a)](_0x15709f){const _0x44089f=_0x4e74ee;this[_0x44089f(0x1e7)]['push'](_0x15709f);}[_0x4e74ee(0x225)](){const _0x34e6f6=_0x4e74ee;if(!this['readTransaction'])return;try{this['readTransaction']['done']();}catch(_0x49b4b8){}this[_0x34e6f6(0x255)]=null;}[_0x4e74ee(0x1a4)](){const _0xd758b3=_0x4e74ee;if(this[_0xd758b3(0x112)])throw new _0x132856(_0xd758b3(0x118),_0xd758b3(0x271));}['get'](_0xf0c2a7,_0x4a47c6){return this['_assertOpen'](),this['okdb']['get'](_0xf0c2a7,_0x4a47c6,{'transaction':this['readTransaction']});}['getEntry'](_0x1c064b,_0x2aff47){const _0x415bd6=_0x4e74ee;return this[_0x415bd6(0x1a4)](),this[_0x415bd6(0x12a)][_0x415bd6(0x19b)](_0x1c064b,_0x2aff47,{'transaction':this[_0x415bd6(0x255)]});}[_0x4e74ee(0x263)](_0x3b30b0,_0x59b35d){const _0x179192=_0x4e74ee;return this[_0x179192(0x1a4)](),this[_0x179192(0x12a)][_0x179192(0x263)](_0x3b30b0,_0x59b35d,{'transaction':this[_0x179192(0x255)]});}[_0x4e74ee(0x176)](_0x36da6e,_0x391a34={}){const _0x5a09b6=_0x4e74ee;return this[_0x5a09b6(0x1a4)](),this[_0x5a09b6(0x12a)]['getRange'](_0x36da6e,{'transaction':this[_0x5a09b6(0x255)],..._0x391a34});}[_0x4e74ee(0x18c)](_0x5cde8d,_0x278a8d={}){return this['_assertOpen'](),this['okdb']['getValues'](_0x5cde8d,{'transaction':this['readTransaction'],..._0x278a8d});}['getKeys'](_0x5d6c8e,_0x2d6510={}){const _0x2546d9=_0x4e74ee;return this[_0x2546d9(0x1a4)](),this[_0x2546d9(0x12a)][_0x2546d9(0x27f)](_0x5d6c8e,{'transaction':this[_0x2546d9(0x255)],..._0x2d6510});}['byIndex'](_0x56e5b4,_0x899db,_0x3a0a9d={}){const _0xa85fc=_0x4e74ee;return this[_0xa85fc(0x1a4)](),this[_0xa85fc(0x12a)][_0xa85fc(0x214)](_0x56e5b4,_0x899db,{'transaction':this['readTransaction'],..._0x3a0a9d});}['query'](_0x1e78e8,_0x2d253f,_0x2a5afb={}){const _0x19a498=_0x4e74ee;return this['_assertOpen'](),this[_0x19a498(0x12a)][_0x19a498(0x1e9)](_0x1e78e8,_0x2d253f,{'transaction':this['readTransaction'],..._0x2a5afb});}['getClock'](_0x2831bb=null){const _0x158b5e=_0x4e74ee;return this[_0x158b5e(0x1a4)](),this['okdb'][_0x158b5e(0x222)](_0x2831bb,{'transaction':this[_0x158b5e(0x255)]});}['getCount'](_0x4f06c6){const _0x2361e6=_0x4e74ee;return this[_0x2361e6(0x1a4)](),this[_0x2361e6(0x12a)][_0x2361e6(0x137)](_0x4f06c6,{'transaction':this[_0x2361e6(0x255)]});}['put'](_0x2553c0,_0x203a68,_0x21e04f,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x4e74ee(0x272)](),origin:origin=null,ttl:ttl=null}={}){const _0x57b2cd=_0x4e74ee;this['actions'][_0x57b2cd(0x14f)]({'action':_0x57b2cd(0x15e),'args':[_0x2553c0,_0x203a68,_0x21e04f,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x4e74ee(0x192)](_0x26f080,_0x3da62c,_0x2769a1,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x4e74ee(0x272)](),origin:origin=null,ttl:ttl=null}={}){const _0x28e300=_0x4e74ee;this[_0x28e300(0x24e)][_0x28e300(0x14f)]({'action':_0x28e300(0x192),'args':[_0x26f080,_0x3da62c,_0x2769a1,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x4e74ee(0x25a)](_0x3e7474,_0x2a69ec,_0x18fcf4,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x4e74ee(0x272)](),origin:origin=null,ttl:ttl=null}={}){const _0x2a7d56=_0x4e74ee;this[_0x2a7d56(0x24e)][_0x2a7d56(0x14f)]({'action':'patch','args':[_0x3e7474,_0x2a69ec,_0x18fcf4,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x4e74ee(0x156)](_0x4365d3,_0x20f457,_0x2d4544,{version:version=null,timestamp:timestamp=Date[_0x4e74ee(0x272)](),origin:origin=null,ttl:ttl=null}={}){const _0x3cce91=_0x4e74ee;this[_0x3cce91(0x24e)][_0x3cce91(0x14f)]({'action':_0x3cce91(0x156),'args':[_0x4365d3,_0x20f457,_0x2d4544,{'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x4e74ee(0x1f2)](_0x32ac7e,_0x2ff8dc,{ifVersion:ifVersion=null,timestamp:timestamp=Date['now'](),origin:origin=null}={}){const _0x2e4d4c=_0x4e74ee;this['actions'][_0x2e4d4c(0x14f)]({'action':_0x2e4d4c(0x1f2),'args':[_0x32ac7e,_0x2ff8dc,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin}]});}['setTTL'](_0x513263,_0x559ce9,_0x4b7cfb){const _0x1364e6=_0x4e74ee;this['actions']['push']({'action':_0x1364e6(0x259),'args':[_0x513263,_0x559ce9,_0x4b7cfb]});}[_0x4e74ee(0x277)](_0x49df12,_0x5aa32b){const _0x57a898=_0x4e74ee;this[_0x57a898(0x24e)][_0x57a898(0x14f)]({'action':'clearTTL','args':[_0x49df12,_0x5aa32b]});}['rollback'](){const _0x2e41f9=_0x4e74ee;if(this[_0x2e41f9(0x112)])return;for(const _0x2c5d93 of this[_0x2e41f9(0x1e7)]){try{_0x2c5d93();}catch{}}this[_0x2e41f9(0x12a)][_0x2e41f9(0x194)][_0x2e41f9(0x216)](_0x5847d6[_0x2e41f9(0x229)],{'id':this['id']}),this[_0x2e41f9(0x24e)]=[],this[_0x2e41f9(0x225)](),this[_0x2e41f9(0x112)]=!![];}async[_0x4e74ee(0x24b)](){const _0x1621df=_0x4e74ee;if(this[_0x1621df(0x112)])throw new Error(_0x1621df(0x118));const _0x5ac287={'id':this['id'],'timestamp':Date[_0x1621df(0x272)](),'actions':this[_0x1621df(0x24e)]};this['okdb'][_0x1621df(0x194)][_0x1621df(0x216)](_0x5847d6['TXN_START'],_0x5ac287);try{const _0x59433e=_0x1629df[_0x1621df(0x191)]?_0x1629df[_0x1621df(0x272)]():0x0;await this[_0x1621df(0x12a)][_0x1621df(0x18d)][_0x1621df(0x188)](()=>{const _0x4deefb=_0x1621df;for(const _0x522b39 of this[_0x4deefb(0x24e)]){const _0xbed48e=this[_0x4deefb(0x12a)]['_'+_0x522b39[_0x4deefb(0x162)]];if(typeof _0xbed48e!==_0x4deefb(0x249))throw new Error(_0x4deefb(0x1a9)+_0x522b39[_0x4deefb(0x162)]);_0xbed48e['call'](this['okdb'],this,..._0x522b39['args']);}}),_0x1629df[_0x1621df(0x191)]&&_0x1629df['note'](_0x1621df(0x21b),_0x1629df[_0x1621df(0x272)]()-_0x59433e,(this[_0x1621df(0x12a)][_0x1621df(0x253)]??'?')+'\x20actions='+this[_0x1621df(0x24e)][_0x1621df(0x1fe)]);}catch(_0x2eb9c2){for(const _0x2f3ac6 of this[_0x1621df(0x1e7)]){try{_0x2f3ac6();}catch{}}this['_closeReadTransaction'](),this['_closed']=!![];if(_0x2eb9c2 instanceof _0x132856)throw _0x2eb9c2;const _0x243692={'cause':_0x2eb9c2,'env':this[_0x1621df(0x12a)]?.[_0x1621df(0x253)],'envPath':this[_0x1621df(0x12a)]?.['path'],'pid':process['pid'],'txnId':this['id'],'actionCount':this[_0x1621df(0x24e)]['length'],'actions':_0x1a1f2b(this[_0x1621df(0x24e)]),'nativeCode':_0x2eb9c2?.[_0x1621df(0x205)],'nativeName':_0x2eb9c2?.['name']};try{this[_0x1621df(0x12a)]?.[_0x1621df(0x159)]?.[_0x1621df(0x1be)]?.(_0x1621df(0x15c),{'env':_0x243692[_0x1621df(0x126)],'envPath':_0x243692[_0x1621df(0x24c)],'pid':_0x243692[_0x1621df(0x231)],'txnId':_0x243692[_0x1621df(0x245)],'actionCount':_0x243692[_0x1621df(0x171)],'actions':_0x243692['actions'],'nativeCode':_0x243692[_0x1621df(0x1d2)],'error':_0x2eb9c2?.[_0x1621df(0x165)],'stack':_0x2eb9c2?.[_0x1621df(0x1c2)]});}catch{}throw new _0x132856(_0x2eb9c2?.[_0x1621df(0x165)]||_0x1621df(0x119),_0x1621df(0x121),_0x243692);}this['okdb']['events'][_0x1621df(0x216)](_0x5847d6['TXN_END'],_0x5ac287);for(const _0xeed0e7 of this['_doHooks']){try{await _0xeed0e7();}catch{}}this[_0x1621df(0x24e)]=[],this['_closeReadTransaction'](),this[_0x1621df(0x112)]=!![];}static[_0x4e74ee(0x23b)](_0x5793d4){const _0x1f3aa9=_0x4e74ee;return Object[_0x1f3aa9(0x12d)]({'id':_0x5793d4['id'],'put':_0x5793d4[_0x1f3aa9(0x15e)][_0x1f3aa9(0x273)](_0x5793d4),'update':_0x5793d4['update'][_0x1f3aa9(0x273)](_0x5793d4),'patch':_0x5793d4[_0x1f3aa9(0x25a)][_0x1f3aa9(0x273)](_0x5793d4),'create':_0x5793d4['create'][_0x1f3aa9(0x273)](_0x5793d4),'remove':_0x5793d4[_0x1f3aa9(0x1f2)][_0x1f3aa9(0x273)](_0x5793d4),'setTTL':_0x5793d4[_0x1f3aa9(0x259)]['bind'](_0x5793d4),'clearTTL':_0x5793d4[_0x1f3aa9(0x277)]['bind'](_0x5793d4),'commit':_0x5793d4['commit'][_0x1f3aa9(0x273)](_0x5793d4),'rollback':_0x5793d4[_0x1f3aa9(0x217)][_0x1f3aa9(0x273)](_0x5793d4),'get':_0x5793d4['get'][_0x1f3aa9(0x273)](_0x5793d4),'getEntry':_0x5793d4[_0x1f3aa9(0x19b)][_0x1f3aa9(0x273)](_0x5793d4),'getMany':_0x5793d4['getMany'][_0x1f3aa9(0x273)](_0x5793d4),'getRange':_0x5793d4[_0x1f3aa9(0x176)][_0x1f3aa9(0x273)](_0x5793d4),'getValues':_0x5793d4[_0x1f3aa9(0x18c)]['bind'](_0x5793d4),'getKeys':_0x5793d4[_0x1f3aa9(0x27f)]['bind'](_0x5793d4),'byIndex':_0x5793d4[_0x1f3aa9(0x214)][_0x1f3aa9(0x273)](_0x5793d4),'query':_0x5793d4[_0x1f3aa9(0x1e9)][_0x1f3aa9(0x273)](_0x5793d4),'getClock':_0x5793d4['getClock'][_0x1f3aa9(0x273)](_0x5793d4),'getCount':_0x5793d4[_0x1f3aa9(0x137)][_0x1f3aa9(0x273)](_0x5793d4),'read':_0x5793d4,'raw':_0x5793d4});}static[_0x4e74ee(0x20a)](_0x1aea79,_0x205523=[]){const _0x5a23fd=_0x4e74ee;if(!Array[_0x5a23fd(0x264)](_0x205523))throw new _0x132856(_0x5a23fd(0x206),_0x5a23fd(0x278));for(const _0xe055b1 of _0x205523){if(Array[_0x5a23fd(0x264)](_0xe055b1)){const [_0x564264,..._0x5c9ca2]=_0xe055b1;if(typeof _0x1aea79[_0x564264]!==_0x5a23fd(0x249))throw new _0x132856(_0x5a23fd(0x1a9)+_0x564264,_0x5a23fd(0x22b),{'action':_0x564264});_0x1aea79[_0x564264](..._0x5c9ca2);continue;}if(!_0xe055b1||typeof _0xe055b1!==_0x5a23fd(0x1b9))throw new _0x132856('txn\x20op\x20must\x20be\x20an\x20object\x20or\x20tuple','TXN_INVALID_OP');const {action:_0x2cfa35}=_0xe055b1;if(typeof _0x2cfa35!==_0x5a23fd(0x24a)||typeof _0x1aea79[_0x2cfa35]!==_0x5a23fd(0x249))throw new _0x132856(_0x5a23fd(0x1a9)+_0x2cfa35,_0x5a23fd(0x22b),{'action':_0x2cfa35});switch(_0x2cfa35){case _0x5a23fd(0x15e):case _0x5a23fd(0x192):case _0x5a23fd(0x156):_0x1aea79[_0x2cfa35](_0xe055b1[_0x5a23fd(0x190)],_0xe055b1['key'],_0xe055b1[_0x5a23fd(0x1e1)],{..._0xe055b1['options'],'ttl':_0xe055b1[_0x5a23fd(0x14c)]??_0xe055b1[_0x5a23fd(0x18a)]?.[_0x5a23fd(0x14c)]??null});break;case _0x5a23fd(0x25a):_0x1aea79[_0x5a23fd(0x25a)](_0xe055b1['type'],_0xe055b1['key'],_0xe055b1['patch'],{..._0xe055b1[_0x5a23fd(0x18a)],'ttl':_0xe055b1[_0x5a23fd(0x14c)]??_0xe055b1[_0x5a23fd(0x18a)]?.[_0x5a23fd(0x14c)]??null});break;case _0x5a23fd(0x1f2):_0x1aea79[_0x5a23fd(0x1f2)](_0xe055b1[_0x5a23fd(0x190)],_0xe055b1[_0x5a23fd(0x13c)],_0xe055b1[_0x5a23fd(0x18a)]||{});break;case _0x5a23fd(0x259):_0x1aea79[_0x5a23fd(0x259)](_0xe055b1[_0x5a23fd(0x190)],_0xe055b1['key'],_0xe055b1['ttl']);break;case _0x5a23fd(0x277):_0x1aea79[_0x5a23fd(0x277)](_0xe055b1[_0x5a23fd(0x190)],_0xe055b1[_0x5a23fd(0x13c)]);break;default:throw new _0x132856('Unsupported\x20transaction\x20action:\x20'+_0x2cfa35,'TXN_INVALID_ACTION',{'action':_0x2cfa35});}}}static async[_0x4e74ee(0x123)](_0x40e062,_0xd82436,_0x53743a={}){const _0x47bd8b=_0x4e74ee,_0x6e3a4e=new _0x5af86d(_0x40e062,_0x53743a),_0x3c7670=_0x5af86d[_0x47bd8b(0x23b)](_0x6e3a4e);try{typeof _0xd82436===_0x47bd8b(0x249)?await _0xd82436(_0x3c7670):_0x5af86d[_0x47bd8b(0x20a)](_0x6e3a4e,_0xd82436||[]);const _0x59e642=_0x6e3a4e[_0x47bd8b(0x24e)][_0x47bd8b(0x1fe)];return await _0x6e3a4e['commit'](),{'id':_0x6e3a4e['id'],'actions':_0x59e642};}catch(_0x55d563){try{_0x6e3a4e[_0x47bd8b(0x217)]();}catch(_0x115d7c){}throw _0x55d563;}}}return okdbTransaction=_0x5af86d,okdbTransaction;}var okdbFunctionsFacades,hasRequiredOkdbFunctionsFacades;function requireOkdbFunctionsFacades(){if(hasRequiredOkdbFunctionsFacades)return okdbFunctionsFacades;hasRequiredOkdbFunctionsFacades=0x1;const _0x5becbd=requireOkdbTransaction();function _0x1d3b81(_0xfa17ee){const _0x1d742c=_0x1d78;return{'transaction':typeof _0xfa17ee['transaction']===_0x1d742c(0x249)?_0xfa17ee[_0x1d742c(0x188)][_0x1d742c(0x273)](_0xfa17ee):_0x18e772=>new _0x5becbd(_0xfa17ee,_0x18e772),'txn':typeof _0xfa17ee[_0x1d742c(0x150)]==='function'?_0xfa17ee[_0x1d742c(0x150)][_0x1d742c(0x273)](_0xfa17ee):(_0x2eba82,_0x303916)=>_0x5becbd[_0x1d742c(0x123)](_0xfa17ee,_0x2eba82,_0x303916)};}function _0x57f11e(_0x192db8){const _0xce997=_0x1d78;return{'name':_0x192db8[_0xce997(0x253)],..._0x1d3b81(_0x192db8),'put':_0x192db8[_0xce997(0x15e)][_0xce997(0x273)](_0x192db8),'update':_0x192db8[_0xce997(0x192)][_0xce997(0x273)](_0x192db8),'patch':_0x192db8[_0xce997(0x25a)][_0xce997(0x273)](_0x192db8),'create':_0x192db8['create'][_0xce997(0x273)](_0x192db8),'remove':_0x192db8[_0xce997(0x1f2)][_0xce997(0x273)](_0x192db8),'get':_0x192db8['get'][_0xce997(0x273)](_0x192db8),'getMany':_0x192db8[_0xce997(0x263)][_0xce997(0x273)](_0x192db8),'getEntry':_0x192db8[_0xce997(0x19b)][_0xce997(0x273)](_0x192db8),'getRange':_0x192db8[_0xce997(0x176)][_0xce997(0x273)](_0x192db8),'getValues':_0x192db8[_0xce997(0x18c)][_0xce997(0x273)](_0x192db8),'getKeys':_0x192db8[_0xce997(0x27f)][_0xce997(0x273)](_0x192db8),'getCount':_0x192db8[_0xce997(0x137)][_0xce997(0x273)](_0x192db8),'getByPrefix':_0x192db8[_0xce997(0x20e)][_0xce997(0x273)](_0x192db8),'getIndex':_0x192db8[_0xce997(0x207)][_0xce997(0x273)](_0x192db8),'byIndex':_0x192db8[_0xce997(0x214)][_0xce997(0x273)](_0x192db8),'query':_0x192db8[_0xce997(0x1e9)][_0xce997(0x273)](_0x192db8),'geoQuery':_0x192db8[_0xce997(0x22e)]['bind'](_0x192db8),'ftsQuery':_0x192db8['ftsQuery']['bind'](_0x192db8),'setTTL':_0x192db8['setTTL'][_0xce997(0x273)](_0x192db8),'getTTL':_0x192db8['getTTL'][_0xce997(0x273)](_0x192db8),'clearTTL':_0x192db8['clearTTL'][_0xce997(0x273)](_0x192db8),'sweepExpiredTTL':_0x192db8[_0xce997(0x154)][_0xce997(0x273)](_0x192db8),'listTTL':_0x192db8[_0xce997(0x1da)][_0xce997(0x273)](_0x192db8),'ttlStats':_0x192db8[_0xce997(0x196)][_0xce997(0x273)](_0x192db8),'setDefaultTTL':_0x192db8[_0xce997(0x19c)][_0xce997(0x273)](_0x192db8),'getDefaultTTL':_0x192db8['getDefaultTTL'][_0xce997(0x273)](_0x192db8),'clearDefaultTTL':_0x192db8['clearDefaultTTL'][_0xce997(0x273)](_0x192db8),'registerType':_0x192db8[_0xce997(0x280)]['bind'](_0x192db8),'ensureType':_0x192db8[_0xce997(0x131)][_0xce997(0x273)](_0x192db8),'hasType':_0x192db8['hasType'][_0xce997(0x273)](_0x192db8),'dropType':_0x192db8['dropType'][_0xce997(0x273)](_0x192db8),'registerIndex':_0x192db8['registerIndex'][_0xce997(0x273)](_0x192db8),'hasIndex':_0x192db8[_0xce997(0x17e)][_0xce997(0x273)](_0x192db8),'dropIndex':_0x192db8[_0xce997(0x242)][_0xce997(0x273)](_0x192db8),'resetIndex':_0x192db8['resetIndex']['bind'](_0x192db8),'indexReady':_0x192db8['indexReady'][_0xce997(0x273)](_0x192db8),'getIndexStatus':_0x192db8[_0xce997(0x15a)][_0xce997(0x273)](_0x192db8),'getClock':_0x192db8['getClock'][_0xce997(0x273)](_0x192db8),'getChanges':_0x192db8[_0xce997(0x208)][_0xce997(0x273)](_0x192db8),'count':_0x192db8[_0xce997(0x1de)][_0xce997(0x273)](_0x192db8),'range':_0x192db8[_0xce997(0x183)][_0xce997(0x273)](_0x192db8),'now':_0x192db8[_0xce997(0x272)][_0xce997(0x273)](_0x192db8)};}function _0x51ba7a(_0x33c266){const _0x124d2c=_0x1d78;if(!_0x33c266)return null;const _0x4e9815={};for(const _0x218e8c of[_0x124d2c(0x167),_0x124d2c(0x210),'list',_0x124d2c(0x13e),_0x124d2c(0x23e),_0x124d2c(0x243),_0x124d2c(0x22a),_0x124d2c(0x1b3)]){if(typeof _0x33c266[_0x218e8c]===_0x124d2c(0x249))_0x4e9815[_0x218e8c]=_0x33c266[_0x218e8c][_0x124d2c(0x273)](_0x33c266);}return Object[_0x124d2c(0x1c6)](_0x4e9815)[_0x124d2c(0x1fe)]?_0x4e9815:null;}function _0x5b6ebb(_0x485023){const _0x1b25f9=_0x1d78;if(!_0x485023)return null;const _0x564a5b={};for(const _0x1de119 of[_0x1b25f9(0x1e5),'stream',_0x1b25f9(0x1f2),'get',_0x1b25f9(0x1cc),_0x1b25f9(0x16a)]){if(typeof _0x485023[_0x1de119]===_0x1b25f9(0x249))_0x564a5b[_0x1de119]=_0x485023[_0x1de119][_0x1b25f9(0x273)](_0x485023);}return Object[_0x1b25f9(0x1c6)](_0x564a5b)['length']?_0x564a5b:null;}function _0x2b1153(_0x401e9f){const _0x4486f3=_0x1d78;return{'env':_0x401e9f[_0x4486f3(0x126)][_0x4486f3(0x273)](_0x401e9f),'createEnvironment':_0x401e9f[_0x4486f3(0x254)][_0x4486f3(0x273)](_0x401e9f),'removeEnvironment':_0x401e9f['removeEnvironment'][_0x4486f3(0x273)](_0x401e9f),'info':_0x401e9f[_0x4486f3(0x115)],..._0x1d3b81(_0x401e9f),'put':_0x401e9f[_0x4486f3(0x15e)][_0x4486f3(0x273)](_0x401e9f),'update':_0x401e9f[_0x4486f3(0x192)][_0x4486f3(0x273)](_0x401e9f),'patch':_0x401e9f[_0x4486f3(0x25a)][_0x4486f3(0x273)](_0x401e9f),'create':_0x401e9f['create'][_0x4486f3(0x273)](_0x401e9f),'remove':_0x401e9f[_0x4486f3(0x1f2)][_0x4486f3(0x273)](_0x401e9f),'get':_0x401e9f['get']['bind'](_0x401e9f),'getMany':_0x401e9f[_0x4486f3(0x263)]['bind'](_0x401e9f),'getEntry':_0x401e9f[_0x4486f3(0x19b)]['bind'](_0x401e9f),'getRange':_0x401e9f['getRange'][_0x4486f3(0x273)](_0x401e9f),'getValues':_0x401e9f[_0x4486f3(0x18c)][_0x4486f3(0x273)](_0x401e9f),'getKeys':_0x401e9f['getKeys'][_0x4486f3(0x273)](_0x401e9f),'getCount':_0x401e9f['getCount'][_0x4486f3(0x273)](_0x401e9f),'getByPrefix':_0x401e9f[_0x4486f3(0x20e)][_0x4486f3(0x273)](_0x401e9f),'getIndex':_0x401e9f[_0x4486f3(0x207)][_0x4486f3(0x273)](_0x401e9f),'byIndex':_0x401e9f[_0x4486f3(0x214)][_0x4486f3(0x273)](_0x401e9f),'query':_0x401e9f[_0x4486f3(0x1e9)]['bind'](_0x401e9f),'setTTL':_0x401e9f[_0x4486f3(0x259)][_0x4486f3(0x273)](_0x401e9f),'getTTL':_0x401e9f[_0x4486f3(0x1ef)][_0x4486f3(0x273)](_0x401e9f),'clearTTL':_0x401e9f[_0x4486f3(0x277)][_0x4486f3(0x273)](_0x401e9f),'sweepExpiredTTL':_0x401e9f['sweepExpiredTTL'][_0x4486f3(0x273)](_0x401e9f),'listTTL':_0x401e9f[_0x4486f3(0x1da)]['bind'](_0x401e9f),'ttlStats':_0x401e9f[_0x4486f3(0x196)][_0x4486f3(0x273)](_0x401e9f),'setDefaultTTL':_0x401e9f[_0x4486f3(0x19c)][_0x4486f3(0x273)](_0x401e9f),'getDefaultTTL':_0x401e9f['getDefaultTTL'][_0x4486f3(0x273)](_0x401e9f),'clearDefaultTTL':_0x401e9f[_0x4486f3(0x160)]['bind'](_0x401e9f),'ensureType':_0x401e9f[_0x4486f3(0x131)][_0x4486f3(0x273)](_0x401e9f),'registerType':_0x401e9f[_0x4486f3(0x280)][_0x4486f3(0x273)](_0x401e9f),'hasType':_0x401e9f[_0x4486f3(0x113)][_0x4486f3(0x273)](_0x401e9f),'dropType':_0x401e9f['dropType'][_0x4486f3(0x273)](_0x401e9f),'registerIndex':_0x401e9f[_0x4486f3(0x234)][_0x4486f3(0x273)](_0x401e9f),'hasIndex':_0x401e9f['hasIndex']['bind'](_0x401e9f),'dropIndex':_0x401e9f[_0x4486f3(0x242)][_0x4486f3(0x273)](_0x401e9f),'resetIndex':_0x401e9f[_0x4486f3(0x149)][_0x4486f3(0x273)](_0x401e9f),'indexReady':_0x401e9f['indexReady'][_0x4486f3(0x273)](_0x401e9f),'getIndexStatus':_0x401e9f[_0x4486f3(0x15a)]['bind'](_0x401e9f),'getClock':_0x401e9f[_0x4486f3(0x222)][_0x4486f3(0x273)](_0x401e9f),'getChanges':_0x401e9f[_0x4486f3(0x208)][_0x4486f3(0x273)](_0x401e9f),'queue':_0x401e9f[_0x4486f3(0x198)],'files':_0x401e9f[_0x4486f3(0x232)]};}return okdbFunctionsFacades={'createEnvFacade':_0x57f11e,'createQueueFacade':_0x51ba7a,'createFilesFacade':_0x5b6ebb,'createGlobalFacade':_0x2b1153},okdbFunctionsFacades;}var okdbFunctionsDryrun,hasRequiredOkdbFunctionsDryrun;function requireOkdbFunctionsDryrun(){const _0x10f12a=_0x2c7ed1;if(hasRequiredOkdbFunctionsDryrun)return okdbFunctionsDryrun;hasRequiredOkdbFunctionsDryrun=0x1;const _0x5db320=new Set([_0x10f12a(0x15e),_0x10f12a(0x25a),_0x10f12a(0x156),_0x10f12a(0x1f2),_0x10f12a(0x192),'setTTL',_0x10f12a(0x277),_0x10f12a(0x154),'setDefaultTTL',_0x10f12a(0x160),'dropType',_0x10f12a(0x242),'resetIndex']),_0x4b3aa6=new Set([_0x10f12a(0x167),'updateJob','removeJob',_0x10f12a(0x243)]),_0x157b0e=new Set([_0x10f12a(0x1e5),'remove']);function _0x39345f(_0x7ded98,_0x301a25){const _0x202e01=_0x10f12a;if(_0x7ded98===_0x202e01(0x126)||_0x7ded98===_0x202e01(0x1d7))return _0x5db320[_0x202e01(0x147)](_0x301a25);if(_0x7ded98===_0x202e01(0x198))return _0x4b3aa6[_0x202e01(0x147)](_0x301a25);if(_0x7ded98===_0x202e01(0x232))return _0x157b0e[_0x202e01(0x147)](_0x301a25);return![];}function _0x1121fb(_0x1082fb,_0x48d1df,_0x5bf8e4,_0x40c9da){if(!_0x1082fb)return _0x1082fb;return new Proxy(_0x1082fb,{'get'(_0x3b69ce,_0x180492,_0x355444){const _0x3275ca=_0x1d78,_0x173e87=Reflect[_0x3275ca(0x11a)](_0x3b69ce,_0x180492,_0x355444);if(typeof _0x173e87!=='function')return _0x173e87;if(!_0x39345f(_0x48d1df,_0x180492))return _0x173e87[_0x3275ca(0x273)](_0x3b69ce);return function(..._0x386015){const _0x187581=_0x3275ca;return _0x40c9da[_0x187581(0x14f)]({'scope':_0x48d1df,'method':_0x180492,'envName':_0x5bf8e4,'args':_0x386015}),null;};}});}function _0xec4e49(_0x4eaf20,_0x2a25e4,_0x536702,_0x2ab3ea){const _0x20eca4={};for(const _0x2b288f of _0x536702){_0x20eca4[_0x2b288f]=(..._0x5ed6eb)=>{const _0x2bc846=_0x1d78;return _0x39345f(_0x4eaf20,_0x2b288f)&&_0x2ab3ea[_0x2bc846(0x14f)]({'scope':_0x4eaf20,'method':_0x2b288f,'envName':_0x2a25e4,'args':_0x5ed6eb}),null;};}return _0x20eca4;}return okdbFunctionsDryrun={'isWriteMethod':_0x39345f,'wrapForDryRun':_0x1121fb,'syntheticDryRunFacade':_0xec4e49,'ENV_WRITE_METHODS':_0x5db320,'QUEUE_WRITE_METHODS':_0x4b3aa6,'FILES_WRITE_METHODS':_0x157b0e},okdbFunctionsDryrun;}var okdbFunctionsContext,hasRequiredOkdbFunctionsContext;function requireOkdbFunctionsContext(){const _0x57f005=_0x2c7ed1;if(hasRequiredOkdbFunctionsContext)return okdbFunctionsContext;hasRequiredOkdbFunctionsContext=0x1;const {createEnvFacade:_0x56dd3f,createQueueFacade:_0x57a025,createFilesFacade:_0x1e11c8,createGlobalFacade:_0x9f9b67}=requireOkdbFunctionsFacades(),{wrapForDryRun:_0x50b498,syntheticDryRunFacade:_0x41975c}=requireOkdbFunctionsDryrun(),_0xa63a88=[_0x57f005(0x167),_0x57f005(0x210),_0x57f005(0x1cc),_0x57f005(0x13e),_0x57f005(0x23e),_0x57f005(0x243),'getBucket','listBuckets'],_0x4a41b2=[_0x57f005(0x1e5),_0x57f005(0x181),_0x57f005(0x1f2),_0x57f005(0x11a),_0x57f005(0x1cc),_0x57f005(0x16a)];function _0x39aaa6(_0x72be09,_0x3a1fd9){const _0x59d782=_0x57f005,_0xa7e6bc=(_0x1e1f30,_0x4f0bd0,_0xddfbf6)=>_0x3a1fd9({'type':_0x59d782(0x159),'requestId':_0x72be09[_0x59d782(0x20f)],'runId':_0x72be09[_0x59d782(0x26b)],'entry':{'level':_0x1e1f30,'msg':_0x4f0bd0,'context':_0xddfbf6,'ts':Date[_0x59d782(0x272)]()}}),_0xd02866=(_0x380dc7,_0x76e738)=>_0xa7e6bc('info',_0x380dc7,_0x76e738);return _0xd02866['info']=(_0x5b1d5a,_0x3234ba)=>_0xa7e6bc('info',_0x5b1d5a,_0x3234ba),_0xd02866['warn']=(_0x40fbde,_0x14607a)=>_0xa7e6bc(_0x59d782(0x237),_0x40fbde,_0x14607a),_0xd02866[_0x59d782(0x1be)]=(_0x3cbce1,_0x30e138)=>_0xa7e6bc(_0x59d782(0x1be),_0x3cbce1,_0x30e138),_0xd02866['debug']=(_0xe5209c,_0x29b0d2)=>_0xa7e6bc(_0x59d782(0x1b8),_0xe5209c,_0x29b0d2),_0xd02866;}function _0x307a7e(_0x43764a,_0x1ab009,_0xc2e409){const _0x3ff36a=_0x57f005;if(!_0x43764a)return null;return{'id':_0x43764a['id']??null,'type':_0x43764a['type']??null,'tries':_0x43764a[_0x3ff36a(0x17a)]??null,'created':_0x43764a[_0x3ff36a(0x1af)]??null,'tags':_0x43764a[_0x3ff36a(0x1a3)]??null,'priority':_0x43764a[_0x3ff36a(0x269)]??null,'bucket':_0x43764a[_0x3ff36a(0x21f)]??null,'cron':_0x43764a[_0x3ff36a(0x20d)]??null,'heartbeat'(){const _0x16e0ff=_0x3ff36a;_0xc2e409({'type':_0x16e0ff(0x13f),'requestId':_0x1ab009[_0x16e0ff(0x20f)],'runId':_0x1ab009['runId'],'jobId':_0x43764a['id'],'claimId':_0x43764a[_0x16e0ff(0x17f)]});},'markProgress'(_0x4f795d){const _0x1163c3=_0x3ff36a;_0xc2e409({'type':'job_progress','requestId':_0x1ab009[_0x1163c3(0x20f)],'runId':_0x1ab009['runId'],'jobId':_0x43764a['id'],'claimId':_0x43764a['claimId'],'message':_0x4f795d});}};}function _0xc1553d(_0x40b263){const _0x15ca97=_0x57f005;if(!_0x40b263)return null;return{'mode':_0x40b263[_0x15ca97(0x1bc)]??null,'sourceType':_0x40b263['sourceType']??null,'sourceEnv':_0x40b263[_0x15ca97(0x1eb)]??null,'processor':_0x40b263[_0x15ca97(0x275)]??null,'engineKey':_0x40b263[_0x15ca97(0x1c1)]??null,'cursorKey':_0x40b263[_0x15ca97(0x21c)]??null};}function _0x448c58(_0x205e46){const _0x1f0edf=_0x57f005;if(!_0x205e46)return null;return{'mode':_0x205e46[_0x1f0edf(0x1bc)]??null,'sourceType':_0x205e46[_0x1f0edf(0x228)]??null,'targetType':_0x205e46[_0x1f0edf(0x27c)]??null,'sourceEnv':_0x205e46[_0x1f0edf(0x1eb)]??null,'targetEnv':_0x205e46[_0x1f0edf(0x186)]??null,'engineKey':_0x205e46['engineKey']??null,'cursorKey':_0x205e46[_0x1f0edf(0x21c)]??null};}function _0xb0ed37(_0x4c6876,_0x49b3df,_0x3595ee,_0x21daf9=null,_0x395e47=null){const _0x1fc518=_0x57f005,_0x13b805={'runId':_0x49b3df[_0x1fc518(0x26b)],'scope':_0x1fc518(0x126),'env':_0x49b3df['envName']??null,'functionName':_0x49b3df[_0x1fc518(0x21e)],'trigger':_0x49b3df[_0x1fc518(0x115)]?.['trigger']??_0x1fc518(0x1c7),'requestedAt':_0x49b3df[_0x1fc518(0x115)]?.[_0x1fc518(0x20b)]??Date[_0x1fc518(0x272)]()},_0x2ccaef=_0x39aaa6(_0x49b3df,_0x3595ee),_0x474063=AbortSignal[_0x1fc518(0x1fd)](Math[_0x1fc518(0x1d1)](0x1,_0x49b3df['runtime']?.[_0x1fc518(0x25e)]??0x3e8)),_0x1351e7=_0x395e47?AbortSignal[_0x1fc518(0x281)]([_0x474063,_0x395e47]):_0x474063,_0x26edd1=_0x4c6876[_0x1fc518(0x126)](_0x49b3df[_0x1fc518(0x1f1)]),_0x599aea=_0x21daf9?_0x50b498(_0x26edd1,_0x1fc518(0x126),_0x49b3df[_0x1fc518(0x1f1)],_0x21daf9):_0x26edd1,_0x4824e0=_0x21daf9?_0x26edd1['queue']?_0x50b498(_0x26edd1[_0x1fc518(0x198)],_0x1fc518(0x198),_0x49b3df[_0x1fc518(0x1f1)],_0x21daf9):_0x41975c(_0x1fc518(0x198),_0x49b3df[_0x1fc518(0x1f1)],_0xa63a88,_0x21daf9):_0x26edd1[_0x1fc518(0x198)],_0x24867a=_0x21daf9?_0x26edd1[_0x1fc518(0x232)]?_0x50b498(_0x26edd1['files'],_0x1fc518(0x232),_0x49b3df[_0x1fc518(0x1f1)],_0x21daf9):_0x41975c(_0x1fc518(0x232),_0x49b3df['envName'],_0x4a41b2,_0x21daf9):_0x26edd1['files'],_0x33523a=_0x56dd3f(_0x599aea),_0x34278f=_0x57a025(_0x4824e0),_0x5ba357=_0x1e11c8(_0x24867a);if(_0x34278f)_0x33523a['queue']=_0x34278f;if(_0x5ba357)_0x33523a[_0x1fc518(0x232)]=_0x5ba357;const _0x28fc92={'payload':_0x49b3df[_0x1fc518(0x151)]??null,'info':_0x13b805,'signal':_0x1351e7,'log':_0x2ccaef,'env':_0x33523a},_0x3c88e8=_0x307a7e(_0x49b3df[_0x1fc518(0x1a2)],_0x49b3df,_0x3595ee);if(_0x3c88e8)_0x28fc92[_0x1fc518(0x27e)]=_0x3c88e8;const _0x337eca=_0xc1553d(_0x49b3df[_0x1fc518(0x1bd)]);if(_0x337eca)_0x28fc92[_0x1fc518(0x275)]=_0x337eca;const _0x1778eb=_0x448c58(_0x49b3df[_0x1fc518(0x247)]);if(_0x1778eb)_0x28fc92[_0x1fc518(0x197)]=_0x1778eb;if(_0x49b3df[_0x1fc518(0x1ca)]){const _0x5d5915=_0x21daf9?_0x50b498(_0x4c6876,_0x1fc518(0x1d7),null,_0x21daf9):_0x4c6876;_0x28fc92['okdb']=_0x9f9b67(_0x5d5915);}return _0x28fc92;}return okdbFunctionsContext={'createExecutionContext':_0xb0ed37,'createScriptLogger':_0x39aaa6},okdbFunctionsContext;}var hasRequiredOkdbFunctionsSandboxWorker;function requireOkdbFunctionsSandboxWorker(){if(hasRequiredOkdbFunctionsSandboxWorker)return okdbFunctionsSandboxWorker$1;hasRequiredOkdbFunctionsSandboxWorker=0x1;const {parentPort:_0x1ff91d,workerData:_0x277fa3}=require$$0$3;requireOkdbFatalReport()['enableFatalReport']('sandbox');const _0x3d4e1d=require$$2,{compileFunctionExpression:_0xd50e6d}=requireOkdbFunctionsSandbox(),{serializeError:_0x4143c5}=requireOkdbFunctionsIpc(),{createExecutionContext:_0x452ae8}=requireOkdbFunctionsContext(),_0x56df09=require$$6;let _0x28c902=null,_0x627b10=![];const _0xcd5326=new Map(),_0x17147e=new Map();function _0x210992(_0x4f816a){const _0xb3f235=_0x1d78;try{_0x1ff91d[_0xb3f235(0x133)](_0x4f816a);}catch{}}function _0x412a24(_0x53b8b7){const _0x4d1476=_0x1d78,_0x453685=(_0x53b8b7['envName']||_0x4d1476(0x13b))+':'+_0x53b8b7[_0x4d1476(0x21e)]+':'+_0x53b8b7[_0x4d1476(0x1c4)]+':'+_0x53b8b7[_0x4d1476(0x1d5)];let _0x4d7522=_0xcd5326[_0x4d1476(0x11a)](_0x453685);return!_0x4d7522&&(_0x4d7522=_0xd50e6d(_0x53b8b7[_0x4d1476(0x1a0)],{'allowFetch':_0x53b8b7[_0x4d1476(0x221)]?.[_0x4d1476(0x201)]!==![],'allowedFetchDomains':_0x53b8b7[_0x4d1476(0x221)]?.[_0x4d1476(0x1cb)],'filename':_0x53b8b7[_0x4d1476(0x21e)]+_0x4d1476(0x18f)}),_0xcd5326[_0x4d1476(0x26a)](_0x453685,_0x4d7522)),_0x4d7522;}async function _0xf45c9a(_0x4da3bd){const _0x39db9b=_0x1d78,_0x371674=Date[_0x39db9b(0x272)](),_0x3faeef=new AbortController();_0x17147e[_0x39db9b(0x26a)](_0x4da3bd[_0x39db9b(0x20f)],_0x3faeef);try{const _0x2c6f6c=_0x412a24(_0x4da3bd);if(_0x4da3bd[_0x39db9b(0x1f1)])await _0x28c902[_0x39db9b(0x1f3)](_0x4da3bd[_0x39db9b(0x1f1)]);const _0x482f04=_0x4da3bd[_0x39db9b(0x144)]?[]:null,_0x1f3990=_0x452ae8(_0x28c902,_0x4da3bd,_0x210992,_0x482f04,_0x3faeef[_0x39db9b(0x122)]),_0x5f0a62=await _0x2c6f6c(_0x1f3990),_0x26d604={'type':_0x39db9b(0x200),'requestId':_0x4da3bd[_0x39db9b(0x20f)],'runId':_0x4da3bd[_0x39db9b(0x26b)],'result':_0x5f0a62,'meta':{'runnerId':'sandbox-'+process[_0x39db9b(0x231)],'startedAt':_0x371674,'finishedAt':Date[_0x39db9b(0x272)](),'durationMs':Date[_0x39db9b(0x272)]()-_0x371674}};if(_0x482f04)_0x26d604[_0x39db9b(0x1b1)]=_0x482f04;_0x210992(_0x26d604);}catch(_0x10d338){_0x210992({'type':_0x39db9b(0x1be),'requestId':_0x4da3bd[_0x39db9b(0x20f)],'runId':_0x4da3bd['runId'],'error':_0x4143c5(_0x10d338),'meta':{'runnerId':_0x39db9b(0x155)+process[_0x39db9b(0x231)],'startedAt':_0x371674,'finishedAt':Date[_0x39db9b(0x272)](),'durationMs':Date['now']()-_0x371674}});}finally{_0x17147e['delete'](_0x4da3bd[_0x39db9b(0x20f)]);}}async function _0x41caea(){const _0x5d6d0b=_0x1d78;if(_0x627b10)return;_0x627b10=!![];try{await _0x28c902?.[_0x5d6d0b(0x23f)]?.();}catch{}process[_0x5d6d0b(0x1c8)](0x0);}async function _0x311c64(){const _0x3c4b70=_0x1d78,{rootPath:_0x571df4}=_0x277fa3??{};if(!_0x571df4)throw new Error('sandbox\x20worker:\x20rootPath\x20missing\x20from\x20workerData');_0x28c902=new _0x56df09(_0x571df4,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]},'processes':![]}),await _0x28c902['open']();const _0x4e2763=setInterval(()=>{const _0x37c98b=_0x1d78;if(_0x627b10)return;for(const [,_0x39782b]of _0x28c902[_0x37c98b(0x177)]){try{_0x39782b['_drainHandler']?.();}catch{}}},0xc8);if(typeof _0x4e2763['unref']===_0x3c4b70(0x249))_0x4e2763['unref']();_0x1ff91d['on']('message',_0x28f1f9=>{const _0x4a45e1=_0x3c4b70;if(!_0x28f1f9||typeof _0x28f1f9!==_0x4a45e1(0x1b9))return;if(_0x28f1f9[_0x4a45e1(0x190)]===_0x4a45e1(0x211))return void _0x41caea();if(_0x28f1f9[_0x4a45e1(0x190)]===_0x4a45e1(0x1fb)){_0x17147e['get'](_0x28f1f9[_0x4a45e1(0x20f)])?.[_0x4a45e1(0x12c)](new Error(_0x4a45e1(0x166)));return;}_0x28f1f9[_0x4a45e1(0x190)]==='run'&&void _0xf45c9a(_0x28f1f9['job']);});const _0x57b213=Math[_0x3c4b70(0x1d1)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x324603=setInterval(()=>{const _0x2649cb=_0x3c4b70;try{_0x210992({'type':'stats','heapUsed':_0x3d4e1d['getHeapStatistics']()[_0x2649cb(0x12e)]});}catch{}},_0x57b213);if(typeof _0x324603[_0x3c4b70(0x17c)]===_0x3c4b70(0x249))_0x324603[_0x3c4b70(0x17c)]();_0x210992({'type':'ready'});}return _0x311c64()['catch'](_0x437f2b=>{const _0x4e91d1=_0x1d78;_0x210992({'type':_0x4e91d1(0x23a),'error':_0x4143c5(_0x437f2b)}),process[_0x4e91d1(0x1c8)](0x1);}),okdbFunctionsSandboxWorker$1;}var okdbFunctionsSandboxWorkerExports=requireOkdbFunctionsSandboxWorker(),okdbFunctionsSandboxWorker=getDefaultExportFromCjs(okdbFunctionsSandboxWorkerExports);module[_0x2c7ed1(0x143)]=okdbFunctionsSandboxWorker;
|