@kedem/okdb 2.3.2 → 2.3.3

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.
@@ -1 +1 @@
1
- 'use strict';const _0x74f0a9=_0x30d0;function _0x30d0(_0xe60607,_0x5dd3ae){_0xe60607=_0xe60607-0xa6;const _0x33d29e=_0x33d2();let _0x30d0a6=_0x33d29e[_0xe60607];return _0x30d0a6;}(function(_0x285b11,_0x1a4150){const _0x368cc7=_0x30d0,_0x37532e=_0x285b11();while(!![]){try{const _0x144214=-parseInt(_0x368cc7(0x2bf))/0x1+parseInt(_0x368cc7(0x237))/0x2*(parseInt(_0x368cc7(0x106))/0x3)+parseInt(_0x368cc7(0x113))/0x4+parseInt(_0x368cc7(0x1ba))/0x5+-parseInt(_0x368cc7(0x123))/0x6+-parseInt(_0x368cc7(0xf5))/0x7+-parseInt(_0x368cc7(0x20d))/0x8;if(_0x144214===_0x1a4150)break;else _0x37532e['push'](_0x37532e['shift']());}catch(_0x20e94f){_0x37532e['push'](_0x37532e['shift']());}}}(_0x33d2,0xb541d));var require$$0$5=require(_0x74f0a9(0xcd)),require$$1$1=require(_0x74f0a9(0x1bc)),require$$1=require(_0x74f0a9(0x1b5)),require$$0$3=require('os'),require$$2=require(_0x74f0a9(0x281)),require$$0=require(_0x74f0a9(0x15e)),require$$0$2=require(_0x74f0a9(0x209)),require$$0$1=require('fs'),require$$0$4=require(_0x74f0a9(0xe8));function getDefaultExportFromCjs(_0x3d54f4){const _0x3d5c36=_0x74f0a9;return _0x3d54f4&&_0x3d54f4[_0x3d5c36(0x109)]&&Object['prototype'][_0x3d5c36(0x15a)][_0x3d5c36(0xb2)](_0x3d54f4,'default')?_0x3d54f4[_0x3d5c36(0x2a6)]:_0x3d54f4;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x13ee2a=_0x74f0a9;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x488412={'PUT':_0x13ee2a(0x1c0),'REMOVE':'remove','INDEX_DROP':_0x13ee2a(0x177),'INDEX_REGISTER':'registerIndex','INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x13ee2a(0x159),'TYPE_DROP':'dropType','FTS_REGISTER':_0x13ee2a(0x114),'FTS_DROP':_0x13ee2a(0x158),'FTS_RESET':'resetFts','SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x13ee2a(0x15b),'TTL_SET':_0x13ee2a(0x1d9),'TTL_CLEAR':_0x13ee2a(0x15f)},_0x5027f8={'SYSTEM_READY':_0x13ee2a(0x29f),'FIELD_RESOLVER_REGISTERED':_0x13ee2a(0x1df),'SYSTEM_STOPPED':_0x13ee2a(0xd2),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x13ee2a(0x19d),'SYSTEM_DRAIN':_0x13ee2a(0x2dd),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x13ee2a(0xd8),'ITEM_CREATE':_0x13ee2a(0x20c),'ITEM_UPDATE':_0x13ee2a(0xd1),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x13ee2a(0x1e7),'INDEX_READY':_0x13ee2a(0x1d6),'INDEX_PROGRESS':_0x13ee2a(0x257),'VIEW_PROGRESS':_0x13ee2a(0x1e3),'INDEX_DROP':_0x13ee2a(0xdc),'INDEX_REGISTERED':_0x13ee2a(0x2d1),'FTS_REGISTERED':_0x13ee2a(0x290),'FTS_DROP':_0x13ee2a(0x172),'FTS_RESET':_0x13ee2a(0x1f6),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x13ee2a(0xb5),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x13ee2a(0xe6),'REF_VIOLATION':_0x13ee2a(0x283),'REF_VIOLATION_RESOLVED':_0x13ee2a(0x234),'SYNC_APPLY':_0x13ee2a(0x150),'TXN_START':'txn:start','TXN_END':_0x13ee2a(0x174),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x13ee2a(0x21a),'TYPE_DROP':'type:drop','ENV_OPENED':_0x13ee2a(0x213),'ENV_REMOVED':_0x13ee2a(0xad),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x13ee2a(0x1f4),'TTL_SET':_0x13ee2a(0x105),'TTL_CLEAR':_0x13ee2a(0x120),'LICENSE_INVALID':_0x13ee2a(0x208),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x13ee2a(0x20f),'LICENSE_REMOVED':_0x13ee2a(0x1f2)},_0x22d4d7={'CREATING':'creating','RESETTING':'resetting','READY':_0x13ee2a(0x1c2),'DROPPING':_0x13ee2a(0x24c),'WAITING':_0x13ee2a(0x282),'ERROR':_0x13ee2a(0x192)},_0x1db663={'CREATED':_0x13ee2a(0x170),'STARTING':'starting','STARTED':_0x13ee2a(0x1a1),'STOPPING':_0x13ee2a(0x22e),'STOPPED':_0x13ee2a(0x17a)},_0x3d65f8={'CREATING':_0x13ee2a(0x2ce),'READY':_0x13ee2a(0x1c2),'HALTED':'halted','STOPPED':_0x13ee2a(0x17a),'RESETTING':_0x13ee2a(0x2ba)},_0x2a297b=Object['freeze']({'POKE':_0x13ee2a(0xa7),'DRAIN':'bus:drain','TYPE_DROP':_0x13ee2a(0x253),'PROC':'bus:proc','ENV_RELEASE':_0x13ee2a(0x23b)});return okdbEnums={'BUS_EVENTS':_0x2a297b,'CHANGE_ACTIONS':_0x488412,'EVENTS':_0x5027f8,'INDEX_STATE':_0x22d4d7,'OKDB_STATE':_0x1db663,'VIEW_STATE':_0x3d65f8},okdbEnums;}function _0x33d2(){const _0x15785d=['has','_committed','_openEnvLazy','acquiredAt','~lock','__okdbSlot','_draining','_onPoke','_writer','index:ready','\x20times\x20in\x20','attach','setTtl','1ofN:','_putRowSync','race','warn','_lock','field:resolver_registered','user','http-server','\x20ipc\x20error:\x20','view:progress','_coordinator','okdb-writer:\x20env\x20closing\x20—\x20retry','_bpWaiters','index:reset','test','_held','mean','\x20died\x20','listAll','_selfKey','publishOwnRow','close','_quantum','startsWith','license:removed','decommission','ttl:expired','_nodeDbFor','fts:reset','processKey','_heartbeatTimer','join','rows=','raw-remove','stopHeartbeat','committed','listen','kill','respawnTimer','log','instanceId','min','isDead','transactionSync','seq','inst:','license:invalid','perf_hooks','[okdb-cluster]\x20','supervisorKey','item:create','11956016sluMkL','engines','license:activated','stringify','clear','isPrimary','env:opened','--watch','FTS_RESET','beforeWrite','okdb','write','now','type:registered','getProcess','floor','_startHeartbeat','events',',\x20signal=','note','(worst\x20','disable','_putRowAsync','createEnvironment','emit','function','_children','sandbox','getCmd','\x20phase=','setupPrimary','_changefeed','error:\x20','stopping','_removeRowAsync','_heartbeatInFlight','then','claimGated','decommissioned','ref:violation_resolved','_markSeen','_baselines','2004146GbDIQY','_groupByProcess','cluster-wide','_handlePoke','bus:env_release','_activateProcesses','_enableChangelog','depth','confirm',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','_collectSingletonClaims','some','mkdirSync','max','stack','commitP99Ms','addSupervisedChild','cluster:','busy','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','system','dropping','string','FTS_DROP','resetReadTxn','\x20===','values','onWindow','bus:type_drop','startedAt','toFixed','_startAdmission','index:progress','kind','_flushTimer','sort','unclaimed','\x20—\x20','uptime','~processes:cmd','claims','_drain','unhandledRejection','message','threads','_bpParkedTotal','repeat','stats','_envs','trim','getDesired','__okdbCluster','SYSTEM_STOPPED','version','_onTick','markClosed','workers','hostname','exports','_buckets','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_maybePublish','listNodes','_durs',':want','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','commitsPerSec','_dedupeMax','_handleInProcess','async','getRange','reap','_onItem','holder','crypto','waiting','ref:violation','map','_clusterWorkerAttached','\x20\x20#','SWAP','change','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','label','processingStatusView','_sandbox','delete','enabled','_onStop','fts:registered','\x20statusEnv=','detachConsole','connected','nodesView','_getType','_ownMeta','_isStale','building','killable','_publishNow','view','\x20\x20(no\x20env\x20draining)','publishChildRow','_rowKey','system:ready','state','reduce','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','indexOf','level','_migrateVocab','default','_buildOwnRow','setLogger','includes','caps','node/','registry-publish','_systemEnv','[okdb-cluster]\x20worker\x20pid=','pid','_acquiredAt','ppid','_startedAt','cli','\x20│\x20','_ensureDesired','\x20drainAge=','openDB','commit','\x20while\x20this\x20process\x20runs\x20','resetting','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','attachFeed','set','_done','1378089xMRhGD','[okdb-cluster]\x20slot=','push','maxMs','_rootDb','pushEphemeral','oldestPendingMs','from','nodeKey',')\x20exited\x20','round','http\x20worker\x20child\x20failed:\x20','_released','_singletonLock','feed:','creating','_admissionTimer','_heldTotal','index:registered','tierList','_drainOne','enable','filter','_instanceId','_seen','_lastCpuWindowMs','_nestedWarned','_started','ms\x20(attempt\x20','getClock','system:drain','_closed','okdb-http-worker-child.js','namespace','--inspect','maxExtra','_lockDb','expiresAt','_versionSkewWarned','bus:poke','_isReader','heapUsed','msg','_singletonLocks','setOwnMeta','env:removed','_wantDb','_report','inflightAgesMs','hasDesired','call','\x20\x20env=','workersConfigured','schema:drop','_buildProcessingFacet','loop-lag','lifecycle','\x20in\x20','firstTs','ESRCH','putSync','_nodeDb','_nodeDead','number','splice','processor','SYNC_COMMITS','list','size','_key','\x20oldestPendingMs=','deaths','processor:progress','processor:error','mode','split','_lastCpuPct','./okdb','~processes','percentile',');\x20','item:update','system:stopped','FTS_REGISTERED','_role','ms\x20p99=','open','_adminRelay','system:bus_state_change','external','primary','_log','index:drop','uncaughtException','registry\x20heartbeat\x20skipped\x20(writer=','isActive','SYSTEM_PROC','[okdb-cluster]\x20respawning\x20worker\x20slot=','_onProcEvent','_desired','SIGKILL','isWorker','unique:violation_resolved','migrations','node:events','allSettled','isConnected','[okdb-cluster]\x20primary\x20pid=','randomUUID','status','_nestedTotal','_timer','removeNode','liveThreadStats','\x0a\x20\x20\x20\x20\x20\x20','INDEX_PROGRESS','processing','429121XIilsQ','startHeartbeat','compaction','noteListenAddr','data','ORPHAN\x20(env-closed\x20write)','__vocab/version','_lastPublishAt','rowKey','quantum','execArgv','keys','SYSTEM_POKE','_cursors','http','setDesired','ttl:set','3eyVHRX','flushed','_outstanding','__esModule','embedded','ms\x20on\x20env=','flushLmdb','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','_lastCpuAt','getChanges','_processStartedAt','shift','object','5569112DqdbDZ','registerFts','registry\x20publish\x20failing:\x20','single','_nodeDbCache','ingest','_supervisorKey','_enqueuedAt','children','updatedAt','disconnect','_participate','ms\x20busy=','ttl:clear','processor:ready','_admissionStarted','393726mqWqdF','processors','online','cursorKey','host','_kind','slotKey','remove','compact','all','(code=','recordWrite','parkedNow','listenAddr','reject','INDEX_REGISTERED','.log','env','name','childTransaction','_scheduleFlush','ms\x20env=',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','options','_wantDbHandle','prependListener','fanout','processor:paused','ms\x20max=','role','heartbeatMs','drain','epoch','memoryUsage','none','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','toISOString','send','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','standalone','find','removeSync','_statusEnv','afterWrite','processor:resumed','sync:apply','updateSupervisedChildStats','_publishFailWarned','_collectWriterFacet','_listenAddr','\x20sync','add','\x20@\x20','dropFts','registerType','hasOwnProperty','dropSchema','participate','info','node:perf_hooks','clearTtl','processorId','count','deregisterSelf','code','_desiredOverlay','envsOpen','_isWriter','stderr','VIEW_PROGRESS','ms\x20activeWriters=','fn-runner','_holderDead','\x20worker\x20slot=','processorsView','_highWater','_db','created','_flushDebounce','fts:drop','sync','txn:end','signalWant','\x20HTTP\x20server(s)\x20on\x20port\x20','dropIndex','instances','singletonClaims','stopped','ms/','catch','--eval','event','running','exit','unref','processes','selfKey','dedupeMax','listening','win32','stop','true','ITEM_UPDATE','--test','_threadStats','_dedupeKey','_inflight','hard-killed','ENV_CLOSING_RETRY','cpuWindowMs','cpuUsage','error','off','force','get','\x20writer{depth=','_caps','entries','slot','load','listDesired','_lastCpuUsage','system:poke','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_pending','\x0a===\x20OKDB_DIAG\x20','started','processor:retry','process','transaction','clusterStatusView','_windowCbs','consecutiveFailures','\x20pid=','type','ttlMs','once','putNode','_refreshDesiredSnapshot','_cmd','resolve','CHANGEFEED_QUANTUM','replace','reset','_hbTimer','fromEntries','path','ensureType','dead','worker','inspect','6737965hLwZZo','heapTotal','cluster','_buildChildRow','node','draining','put','ITEM_REMOVE','ready','slice','length','tryAcquire','start','reportThreadStats','value','_rawDb','rss','parse','INDEX_RESET'];_0x33d2=function(){return _0x15785d;};return _0x33d2();}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3d0059=_0x74f0a9;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1f9be7,performance:_0x1c95db}=require$$0,_0x17d124=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3d0059(0x188),_0x5c550f=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2b887f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x3c9be7=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0xec9dc3{constructor(){const _0x23d42c=_0x3d0059;this[_0x23d42c(0x28e)]=_0x17d124,this['_buckets']=new Map(),this['_h']=null,this['_timer']=null,this['_started']=![],this[_0x23d42c(0xdb)]=(_0x3a3cae,_0x363e31)=>process[_0x23d42c(0x167)][_0x23d42c(0x218)](_0x3a3cae+(_0x363e31?'\x20'+JSON[_0x23d42c(0x210)](_0x363e31):'')+'\x0a');}['now'](){const _0x57e40c=_0x3d0059;return _0x1c95db[_0x57e40c(0x219)]();}[_0x3d0059(0x2a8)](_0x538265){const _0x3b7b20=_0x3d0059;if(typeof _0x538265===_0x3b7b20(0x226))this[_0x3b7b20(0xdb)]=_0x538265;}[_0x3d0059(0x220)](_0x25b292,_0x279e5b,_0x14d3e4){const _0x382317=_0x3d0059;if(!this[_0x382317(0x28e)])return;let _0x32b071=this[_0x382317(0x272)][_0x382317(0x195)](_0x25b292);!_0x32b071&&(_0x32b071={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x382317(0x272)][_0x382317(0x2bd)](_0x25b292,_0x32b071)),_0x32b071['ms']+=_0x279e5b,_0x32b071['count']+=0x1,_0x279e5b>_0x32b071['maxMs']&&(_0x32b071[_0x382317(0x2c2)]=_0x279e5b,_0x32b071[_0x382317(0x2e2)]=_0x14d3e4||'');}[_0x3d0059(0x1c6)](_0x2aa04a){const _0xc07884=_0x3d0059;if(!this[_0xc07884(0x28e)]||this[_0xc07884(0x2da)])return;this[_0xc07884(0x2da)]=!![];if(_0x2aa04a)this['_log']=_0x2aa04a;this['_h']=_0x1f9be7({'resolution':0xa}),this['_h'][_0xc07884(0x2d4)](),this[_0xc07884(0xef)]=setInterval(()=>this[_0xc07884(0xaf)](),_0x5c550f);if(this[_0xc07884(0xef)][_0xc07884(0x181)])this[_0xc07884(0xef)]['unref']();}[_0x3d0059(0x252)](_0x38c7a6){const _0x41e28e=_0x3d0059;if(!this[_0x41e28e(0x1a6)])this['_windowCbs']=new Set();this['_windowCbs'][_0x41e28e(0x156)](_0x38c7a6);if(!this[_0x41e28e(0x2da)])this[_0x41e28e(0x256)]();}['offWindow'](_0x30bb99){const _0x5c9bec=_0x3d0059;this[_0x5c9bec(0x1a6)]?.[_0x5c9bec(0x28d)](_0x30bb99);}[_0x3d0059(0x256)](){const _0x4091cd=_0x3d0059;if(this[_0x4091cd(0x122)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x1f9be7({'resolution':0xa}),this['_h']['enable']());const _0x4a0a27=_0x5c550f;this[_0x4091cd(0x2cf)]=setInterval(()=>{const _0x29c128=_0x4091cd,_0x5e3706=this['_h'];if(!_0x5e3706)return;const _0x13d9c9=_0x5e3706[_0x29c128(0xcf)](0x63)/0xf4240,_0x4935b3=_0x5e3706['max']/0xf4240,_0x4107ec=_0x5e3706[_0x29c128(0x1ea)]/0xf4240;_0x5e3706[_0x29c128(0x1b2)]();if(this[_0x29c128(0x1a6)])for(const _0x47d3d7 of this[_0x29c128(0x1a6)]){try{_0x47d3d7({'p99Ms':_0x13d9c9,'maxMs':_0x4935b3,'meanMs':_0x4107ec,'reportMs':_0x4a0a27});}catch{}}},_0x4a0a27);if(this[_0x4091cd(0x2cf)][_0x4091cd(0x181)])this['_admissionTimer']['unref']();}[_0x3d0059(0xaf)](){const _0x852961=_0x3d0059,_0x3c14ae=this['_h'],_0x3e42c5=_0x3c14ae['max']/0xf4240,_0x460914=_0x3c14ae[_0x852961(0xcf)](0x63)/0xf4240,_0x3c5dec=_0x3c14ae[_0x852961(0x1ea)]/0xf4240;_0x3c14ae[_0x852961(0x1b2)]();const _0x2382fa=[...this[_0x852961(0x272)][_0x852961(0x198)]()]['map'](([_0x276e64,_0x4a1f7c])=>({'label':_0x276e64,..._0x4a1f7c}))[_0x852961(0x25a)]((_0x5b3c51,_0x5433a2)=>_0x5433a2['ms']-_0x5b3c51['ms'])[_0x852961(0x1c3)](0x0,0x8);this['_buckets'][_0x852961(0x211)]();const _0x7b0004=_0x2382fa[_0x852961(0x2a1)]((_0x55db80,_0xc42e2d)=>_0x55db80+_0xc42e2d['ms'],0x0),_0x2b8c52=_0x2382fa['map'](_0x345f7a=>_0x345f7a[_0x852961(0x28a)]+'='+_0x345f7a['ms'][_0x852961(0x255)](0x0)+_0x852961(0x17b)+_0x345f7a[_0x852961(0x161)]+(_0x345f7a['maxMs']>0x5?_0x852961(0x221)+_0x345f7a[_0x852961(0x2c2)][_0x852961(0x255)](0x0)+'ms'+(_0x345f7a[_0x852961(0x2e2)]?'\x20'+_0x345f7a[_0x852961(0x2e2)]:'')+')':''));(_0x2b887f||_0x3e42c5>=_0x3c9be7)&&this['_log']('loop-lag\x20'+_0x5c550f+_0x852961(0x13f)+_0x3e42c5[_0x852961(0x255)](0x0)+_0x852961(0xd5)+_0x460914[_0x852961(0x255)](0x0)+'ms\x20mean='+_0x3c5dec['toFixed'](0x0)+_0x852961(0x11f)+_0x7b0004[_0x852961(0x255)](0x0)+'ms'+(_0x2b8c52[_0x852961(0x1c4)]?_0x852961(0x2b4)+_0x2b8c52['join']('\x20\x20'):''),{'feature':_0x852961(0xb7)});if(this[_0x852961(0x1a6)])for(const _0x37b8eb of this['_windowCbs']){try{_0x37b8eb({'p99Ms':_0x460914,'maxMs':_0x3e42c5,'meanMs':_0x3c5dec,'reportMs':_0x5c550f});}catch{}}}[_0x3d0059(0x187)](){const _0x30ded6=_0x3d0059;if(this[_0x30ded6(0xef)])clearInterval(this[_0x30ded6(0xef)]);if(this['_h'])this['_h'][_0x30ded6(0x222)]();this[_0x30ded6(0xef)]=null,this['_h']=null,this[_0x30ded6(0x2da)]=![];}}const _0x29a307=new _0xec9dc3();if(_0x29a307[_0x3d0059(0x28e)])_0x29a307[_0x3d0059(0x1c6)]();return okdbLoopMonitor={'LOOP':_0x29a307},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x4523b4=require$$0$1,_0x520d5c=require$$1;let _0x43517d,_0x19ebef,_0x59524b,_0x126fa7,_0x54da5b,_0x1be9b0,_0x3f21dd,_0x5a8ed7=![];const _0x5b50df=new Set();let _0x467544=null;const _0x2e8397=new Map();function _0x2314ea(){const _0x27554b=_0x30d0;if(_0x43517d!==undefined)return _0x43517d;_0x43517d=process.env.OKDB_DIAG==='1';if(!_0x43517d)return![];_0x19ebef=process.env.OKDB_DIAG_STACK==='1',_0x126fa7=Math[_0x27554b(0x244)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x59524b=new Array(_0x126fa7),_0x54da5b=0x0,_0x1be9b0=0x0,_0x3f21dd=process.env.OKDB_DIAG_DIR||null;if(_0x3f21dd)try{_0x4523b4[_0x27554b(0x243)](_0x3f21dd,{'recursive':!![]});}catch{}return!![];}function _0x1ab510(){return _0x43517d===undefined?_0x2314ea():_0x43517d;}function _0x4b9a2d(_0x44cce5,_0x4bfd8f){const _0x568f88=_0x30d0;if(_0x43517d===undefined?!_0x2314ea():!_0x43517d)return;let _0x13e435;if(_0x19ebef){const _0xb06f05=new Error()[_0x568f88(0x245)]||'';_0x13e435=_0xb06f05[_0x568f88(0xcb)]('\x0a')[_0x568f88(0x1c3)](0x3)['map'](_0x429103=>_0x429103[_0x568f88(0x268)]())[_0x568f88(0x2d5)](Boolean)['slice'](0x0,0x8);}_0x59524b[_0x54da5b]={'seq':_0x1be9b0++,'t':Date[_0x568f88(0x219)](),'env':_0x44cce5,'kind':_0x4bfd8f||_0x568f88(0x2b8),'stack':_0x13e435},_0x54da5b=(_0x54da5b+0x1)%_0x126fa7;}function _0x4f75c5(_0x45fc53){const _0x48fcc8=_0x30d0,_0x212c98=[];for(let _0x56ddf5=0x0;_0x56ddf5<_0x126fa7;_0x56ddf5++){const _0x61e397=_0x59524b[(_0x54da5b-0x1-_0x56ddf5+_0x126fa7*0x2)%_0x126fa7];if(!_0x61e397)continue;_0x212c98[_0x48fcc8(0x2c1)](_0x61e397);if(_0x212c98[_0x48fcc8(0x1c4)]>=_0x45fc53)break;}return _0x212c98;}function _0x51d65e(_0x25bb84){const _0x2ca0d3=_0x30d0;try{process[_0x2ca0d3(0x167)][_0x2ca0d3(0x218)](_0x25bb84+'\x0a');}catch{}if(_0x3f21dd)try{_0x4523b4['appendFileSync'](_0x520d5c[_0x2ca0d3(0x1f9)](_0x3f21dd,'okdb-diag.'+process[_0x2ca0d3(0x2af)]+_0x2ca0d3(0x133)),_0x25bb84+'\x0a');}catch{}}function _0x13410a(_0x534d79){const _0x20392e=_0x30d0,_0xbdeb4d=_0x4f75c5(_0x534d79);if(!_0xbdeb4d[_0x20392e(0x1c4)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x164b0b=Date[_0x20392e(0x219)]();return _0xbdeb4d[_0x20392e(0x284)](_0x4481d2=>{const _0x177e22=_0x20392e,_0x7fa882=_0x177e22(0x286)+_0x4481d2[_0x177e22(0x206)]+'\x20-'+(_0x164b0b-_0x4481d2['t'])+_0x177e22(0x138)+_0x4481d2[_0x177e22(0x134)]+'\x20'+_0x4481d2[_0x177e22(0x258)];return _0x4481d2[_0x177e22(0x245)]&&_0x4481d2[_0x177e22(0x245)][_0x177e22(0x1c4)]?_0x7fa882+_0x177e22(0xf2)+_0x4481d2[_0x177e22(0x245)][_0x177e22(0x1f9)](_0x177e22(0xf2)):_0x7fa882;})[_0x20392e(0x1f9)]('\x0a');}function _0x295f00(_0x158e72,_0x55022f){const _0x2c0767=_0x30d0,_0x522905=_0x2c0767(0x1a0)+_0x158e72+_0x2c0767(0x157)+new Date()[_0x2c0767(0x147)]()+_0x2c0767(0x1a8)+process[_0x2c0767(0x2af)]+_0x2c0767(0x250),_0x5aa24a=[_0x522905,_0x2c0767(0x22d)+(_0x55022f&&_0x55022f['stack']?_0x55022f['stack'][_0x2c0767(0xcb)]('\x0a')[0x0]:_0x55022f),'recent\x20writes\x20(newest\x20first)'+(_0x19ebef?'':_0x2c0767(0x149))+':',_0x13410a(0x18),_0x41e50e(),'='['repeat'](_0x522905[_0x2c0767(0x1c4)]-0x1)];_0x51d65e(_0x5aa24a[_0x2c0767(0x1f9)]('\x0a'));}function _0x30e2bc(_0x5e6ee7){const _0x44ae62=_0x30d0;if(!_0x1ab510())return;const _0x4716dc=String(_0x5e6ee7&&_0x5e6ee7['message']||_0x5e6ee7||''),_0x2ea36e=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x44ae62(0x1e8)](_0x4716dc);_0x295f00(_0x2ea36e?_0x44ae62(0xfa):'uncaughtException',_0x5e6ee7);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x2ea36e)return;try{console[_0x44ae62(0x192)](_0x5e6ee7&&_0x5e6ee7[_0x44ae62(0x245)]?_0x5e6ee7['stack']:_0x5e6ee7);}catch{}process[_0x44ae62(0x180)](0x1);}function _0x33709a(_0x432473){const _0x4f99be=_0x30d0;if(!_0x1ab510())return;const _0xd51ae5=String(_0x432473&&_0x432473[_0x4f99be(0x262)]||_0x432473||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4f99be(0x1e8)](_0xd51ae5)&&_0x295f00(_0x4f99be(0x273),_0x432473);}function _0x41e50e(){const _0x14681d=_0x30d0,_0xc55977=[_0x14681d(0x19e)];let _0x195e21=![];for(const _0x328be7 of _0x5b50df){const _0x500a8a=_0x328be7&&_0x328be7[_0x14681d(0x267)];if(!_0x500a8a)continue;for(const [_0x2e446b,_0x2a6086]of _0x500a8a){const _0x21d074=_0x2a6086&&_0x2a6086[_0x14681d(0x1e4)]&&_0x2a6086[_0x14681d(0x1e4)][_0x14681d(0x29b)];if(!_0x21d074)continue;let _0x4991f9,_0x176a07;try{_0x4991f9=Atomics[_0x14681d(0x19a)](_0x21d074,0x0),_0x176a07=Atomics[_0x14681d(0x19a)](_0x21d074,0x1);}catch{continue;}if(_0x4991f9===0x0)continue;_0x195e21=!![];const _0x398bc2=_0x4991f9>0x0?_0x14681d(0x287):'copy',_0x3c025d=Date['now']()-Math['abs'](_0x4991f9)*0x3e8,_0x241385=((()=>{const _0x186f35=_0x14681d;try{return _0x2a6086[_0x186f35(0x1d5)]&&_0x2a6086[_0x186f35(0x1d5)][_0x186f35(0xed)]?_0x2a6086['_writer'][_0x186f35(0xed)]():null;}catch{return null;}})());_0xc55977['push'](_0x14681d(0xb3)+_0x2e446b+_0x14681d(0x22a)+_0x398bc2+_0x14681d(0x2b6)+_0x3c025d+_0x14681d(0x169)+_0x176a07+(_0x241385?_0x14681d(0x196)+_0x241385[_0x14681d(0x23e)]+_0x14681d(0xc6)+_0x241385[_0x14681d(0x2c5)]+'\x20parkedNow='+_0x241385[_0x14681d(0x12f)]+'}':''));}}if(!_0x195e21)_0xc55977[_0x14681d(0x2c1)](_0x14681d(0x29c));return _0xc55977[_0x14681d(0x1f9)]('\x0a');}function _0x2425d2(){const _0xc30693=_0x30d0;if(!_0x1ab510())return;const _0x475b61=Math[_0xc30693(0x244)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x178136=Date[_0xc30693(0x219)]();for(const _0x43cdd6 of _0x5b50df){const _0x2510e9=_0x43cdd6&&_0x43cdd6[_0xc30693(0x267)];if(!_0x2510e9)continue;for(const [_0x1b42b7,_0x17e42f]of _0x2510e9){const _0xd9d710=_0x17e42f&&_0x17e42f['_coordinator']&&_0x17e42f[_0xc30693(0x1e4)][_0xc30693(0x29b)];if(!_0xd9d710)continue;let _0x2e09ef;try{_0x2e09ef=Atomics[_0xc30693(0x19a)](_0xd9d710,0x0);}catch{continue;}const _0x401828=_0x43cdd6[_0xc30693(0x1b5)]+'|'+_0x1b42b7;if(_0x2e09ef<=0x0){_0x2e8397[_0xc30693(0x28d)](_0x401828);continue;}const _0x46f778=_0x178136-_0x2e09ef*0x3e8,_0x274e25=_0x2e8397['get'](_0x401828);if(_0x46f778<_0x475b61)continue;if(_0x274e25&&_0x178136-_0x274e25['dumpedAt']<_0x475b61)continue;_0x2e8397[_0xc30693(0x2bd)](_0x401828,{'firstTs':_0x274e25?_0x274e25[_0xc30693(0xba)]:_0x2e09ef,'dumpedAt':_0x178136});const _0x2a978a=_0xc30693(0x146)+_0x46f778+_0xc30693(0x10b)+_0x1b42b7+_0xc30693(0x157)+new Date()['toISOString']()+_0xc30693(0x1a8)+process[_0xc30693(0x2af)]+_0xc30693(0x250);_0x51d65e([_0x2a978a,_0x41e50e(),'='[_0xc30693(0x265)](_0x2a978a[_0xc30693(0x1c4)]-0x1)][_0xc30693(0x1f9)]('\x0a'));}}}function _0x507dd2(){const _0x3fa3f1=_0x30d0;if(!_0x1ab510()||_0x5a8ed7)return;_0x5a8ed7=!![],process[_0x3fa3f1(0x13c)](_0x3fa3f1(0xdd),_0x30e2bc),process['prependListener'](_0x3fa3f1(0x261),_0x33709a);const _0x2b0344=Math[_0x3fa3f1(0x244)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x467544=setInterval(_0x2425d2,_0x2b0344);if(_0x467544[_0x3fa3f1(0x181)])_0x467544[_0x3fa3f1(0x181)]();}function _0x37930b(_0x286827){const _0x6d0af9=_0x30d0;if(!_0x1ab510()||!_0x286827)return;_0x5b50df[_0x6d0af9(0x156)](_0x286827),_0x507dd2();}function _0x4723b6(_0x3b0751){const _0x4edf73=_0x30d0;_0x5b50df[_0x4edf73(0x28d)](_0x3b0751);}function _0x308b23(){if(!_0x1ab510())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x19ebef,'recentWrites':_0x4f75c5(0x10),'drain':_0x41e50e()};}return okdbDiag={'isEnabled':_0x1ab510,'recordWrite':_0x4b9a2d,'installDiag':_0x507dd2,'registerOkdb':_0x37930b,'unregisterOkdb':_0x4723b6,'snapshot':_0x308b23},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x4ff54a=_0x74f0a9;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x5d733f}=require$$0$2,_0x157042=requireOkdbDiag(),_0xa50e87=process.env.OKDB_COMMIT_MODE===_0x4ff54a(0x173);class _0x3dfd5c{constructor(_0xb3f39e){const _0x1e52c7=_0x4ff54a;this['env']=_0xb3f39e,this[_0x1e52c7(0x18d)]=new Set(),this[_0x1e52c7(0x11a)]=new Map(),this[_0x1e52c7(0x1ce)]=0x0,this[_0x1e52c7(0x276)]=[],this[_0x1e52c7(0x2be)]=[],this[_0x1e52c7(0x16e)]=Math[_0x1e52c7(0x244)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x1e52c7(0x108)]=0x0,this[_0x1e52c7(0x1e6)]=[],this['_bpParkedTotal']=0x0,this[_0x1e52c7(0x1e9)]=null,this[_0x1e52c7(0x2d0)]=0x0,this[_0x1e52c7(0xee)]=0x0,this[_0x1e52c7(0x2d9)]=![];}async[_0x4ff54a(0x1a4)](_0x133332,_0x40bc49){const _0x552fb8=_0x4ff54a;if(_0x157042['isEnabled']())_0x157042[_0x552fb8(0x12e)](this[_0x552fb8(0x134)]?.[_0x552fb8(0x135)],_0x40bc49);if(this[_0x552fb8(0x2de)]){const _0x332e2e=new Error(_0x552fb8(0x1e5));_0x332e2e[_0x552fb8(0x163)]='ENV_CLOSING_RETRY';throw _0x332e2e;}if(this[_0x552fb8(0x16e)]>0x0){let _0x9fb1c9=![];while(this['_outstanding']>=this['_highWater']&&!this[_0x552fb8(0x2de)]){!_0x9fb1c9&&(_0x9fb1c9=!![],this[_0x552fb8(0x264)]++),await new Promise(_0x227b8c=>this[_0x552fb8(0x1e6)][_0x552fb8(0x2c1)](_0x227b8c));}if(this[_0x552fb8(0x2de)]){const _0x17d1c6=new Error(_0x552fb8(0x1e5));_0x17d1c6[_0x552fb8(0x163)]=_0x552fb8(0x18f);throw _0x17d1c6;}}this[_0x552fb8(0x108)]++;const _0x7c105a=this[_0x552fb8(0x134)][_0x552fb8(0x1e4)];for(;;){while(this[_0x552fb8(0x1e9)])await this[_0x552fb8(0x1e9)];if(_0x7c105a)await _0x7c105a[_0x552fb8(0x216)]();if(!this[_0x552fb8(0x1e9)])break;if(_0x7c105a)_0x7c105a[_0x552fb8(0x14e)]();}if(this[_0x552fb8(0x2de)]){if(_0x7c105a)_0x7c105a['afterWrite']();this[_0x552fb8(0x108)]--;if(this[_0x552fb8(0x1e6)][_0x552fb8(0x1c4)]&&this[_0x552fb8(0x108)]<this['_highWater'])this[_0x552fb8(0x1e6)][_0x552fb8(0x111)]()();const _0x4fb32a=new Error(_0x552fb8(0x1e5));_0x4fb32a[_0x552fb8(0x163)]=_0x552fb8(0x18f);throw _0x4fb32a;}const _0x53ebb4=_0x5d733f[_0x552fb8(0x219)]();if(_0xa50e87)try{const _0x2fc88f=this[_0x552fb8(0x134)]['db'][_0x552fb8(0x205)](_0x133332);this[_0x552fb8(0x1ce)]++;if(this[_0x552fb8(0x276)][_0x552fb8(0x2c1)](_0x5d733f['now']()-_0x53ebb4)>0x100)this[_0x552fb8(0x276)][_0x552fb8(0x111)]();if(this[_0x552fb8(0x2be)][_0x552fb8(0x2c1)](_0x5d733f[_0x552fb8(0x219)]())>0x800)this[_0x552fb8(0x2be)]['shift']();return _0x2fc88f;}finally{this['_outstanding']--;if(this['_bpWaiters'][_0x552fb8(0x1c4)]&&this['_outstanding']<this[_0x552fb8(0x16e)])this[_0x552fb8(0x1e6)]['shift']()();if(_0x7c105a)_0x7c105a['afterWrite']();}let _0x377784=null;const _0x1c30eb=()=>{const _0x10b3f0=_0x552fb8,_0x239876=_0x133332();if(_0x239876&&typeof _0x239876[_0x10b3f0(0x231)]===_0x10b3f0(0x226)&&!_0x377784){this[_0x10b3f0(0x2d0)]++;let _0x587809;const _0x5a857f=new Promise(_0x4124b7=>_0x587809=_0x4124b7);this['_held']=_0x5a857f,_0x377784=()=>{const _0x528ed1=_0x10b3f0;if(this['_held']===_0x5a857f)this[_0x528ed1(0x1e9)]=null;_0x587809();};}return _0x239876;};let _0x428c75;try{_0x428c75=this['env']['db'][_0x552fb8(0x136)](_0x1c30eb);}catch(_0x10dc3e){_0x428c75=Promise[_0x552fb8(0x131)](_0x10dc3e);}(!_0x428c75||typeof _0x428c75[_0x552fb8(0x231)]!==_0x552fb8(0x226))&&(this[_0x552fb8(0xee)]++,!this[_0x552fb8(0x2d9)]&&(this[_0x552fb8(0x2d9)]=!![],console[_0x552fb8(0x1dd)]('okdb-writer['+(this[_0x552fb8(0x134)]?.['name']??'?')+_0x552fb8(0x240))),_0x428c75=Promise[_0x552fb8(0x1af)](_0x428c75));const _0x2c4d00=()=>{if(_0x377784)_0x377784();};_0x428c75[_0x552fb8(0x231)](_0x2c4d00,_0x2c4d00),this['_inflight']['add'](_0x428c75),this[_0x552fb8(0x11a)][_0x552fb8(0x2bd)](_0x428c75,_0x53ebb4);const _0x474e54=()=>{const _0x4a1fad=_0x552fb8;this[_0x4a1fad(0x18d)]['delete'](_0x428c75),this[_0x4a1fad(0x11a)][_0x4a1fad(0x28d)](_0x428c75),this['_committed']++,this[_0x4a1fad(0x108)]--;this[_0x4a1fad(0x1e6)]['length']&&this[_0x4a1fad(0x108)]<this[_0x4a1fad(0x16e)]&&this['_bpWaiters'][_0x4a1fad(0x111)]()();if(this[_0x4a1fad(0x276)][_0x4a1fad(0x2c1)](_0x5d733f['now']()-_0x53ebb4)>0x100)this[_0x4a1fad(0x276)][_0x4a1fad(0x111)]();if(this[_0x4a1fad(0x2be)][_0x4a1fad(0x2c1)](_0x5d733f[_0x4a1fad(0x219)]())>0x800)this[_0x4a1fad(0x2be)][_0x4a1fad(0x111)]();};_0x428c75[_0x552fb8(0x231)](_0x474e54,_0x474e54);try{return await _0x428c75;}finally{if(_0x7c105a)_0x7c105a[_0x552fb8(0x14e)]();}}[_0x4ff54a(0xed)](){const _0x20cbf8=_0x4ff54a,_0x59b756=_0x5d733f['now']();let _0x2d71fc=0x0;for(const _0x5936a3 of this[_0x20cbf8(0x11a)][_0x20cbf8(0x251)]()){const _0x1224a4=_0x59b756-_0x5936a3;if(_0x1224a4>_0x2d71fc)_0x2d71fc=_0x1224a4;}let _0x2f1c08=0x0;for(let _0x467db1=this[_0x20cbf8(0x2be)]['length']-0x1;_0x467db1>=0x0;_0x467db1--){if(_0x59b756-this['_done'][_0x467db1]>0x3e8)break;_0x2f1c08++;}let _0x38bba4=0x0;if(this['_durs'][_0x20cbf8(0x1c4)]){const _0x3f10cc=[...this[_0x20cbf8(0x276)]][_0x20cbf8(0x25a)]((_0x11af12,_0x1a7ee9)=>_0x11af12-_0x1a7ee9);_0x38bba4=_0x3f10cc[Math[_0x20cbf8(0x203)](_0x3f10cc[_0x20cbf8(0x1c4)]-0x1,Math[_0x20cbf8(0x21c)](_0x3f10cc[_0x20cbf8(0x1c4)]*0.99))];}return{'depth':this[_0x20cbf8(0x18d)][_0x20cbf8(0xc4)],'oldestPendingMs':Math[_0x20cbf8(0x2c9)](_0x2d71fc),'committed':this[_0x20cbf8(0x1ce)],'commitsPerSec':_0x2f1c08,'commitP99Ms':Math[_0x20cbf8(0x2c9)](_0x38bba4),'parkedNow':this[_0x20cbf8(0x1e6)][_0x20cbf8(0x1c4)],'parkedTotal':this[_0x20cbf8(0x264)],'highWater':this[_0x20cbf8(0x16e)]};}[_0x4ff54a(0xb0)](){const _0xb72599=_0x4ff54a,_0x2b3f08=_0x5d733f['now']();return[...this['_enqueuedAt']['values']()][_0xb72599(0x284)](_0xdf40c2=>Math[_0xb72599(0x2c9)](_0x2b3f08-_0xdf40c2))[_0xb72599(0x25a)]((_0x503df8,_0x41b0d2)=>_0x41b0d2-_0x503df8);}[_0x4ff54a(0x26e)](){const _0x4e83a5=_0x4ff54a;this[_0x4e83a5(0x2de)]=!![];for(const _0x12efac of this['_bpWaiters'][_0x4e83a5(0xc0)](0x0))_0x12efac();}async[_0x4ff54a(0x142)](){const _0x4629a9=_0x4ff54a;let _0x31bb0a=0x0;while(this['_inflight']['size']&&_0x31bb0a++<0x3e8){await Promise[_0x4629a9(0xe9)]([...this[_0x4629a9(0x18d)]]);}}async[_0x4ff54a(0x1c0)](_0xa3fe0,_0x49699d,_0x599125,_0x347542){const _0x5b3a6a=_0x4ff54a;return this[_0x5b3a6a(0x1a4)](()=>{const _0x5728c7=_0x5b3a6a;if(_0x347542===undefined)_0xa3fe0[_0x5728c7(0xbc)](_0x49699d,_0x599125);else _0xa3fe0[_0x5728c7(0xbc)](_0x49699d,_0x599125,_0x347542);},'raw-put');}async[_0x4ff54a(0x12a)](_0x59b88a,_0x4cb4fe){const _0xfe78ac=_0x4ff54a;return this['transaction'](()=>_0x59b88a['removeSync'](_0x4cb4fe),_0xfe78ac(0x1fb));}}async function _0x2cb879(_0x4f98b6,_0x36737c){const _0x56bdfe=_0x4ff54a;if(_0x36737c==null)_0x36737c=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x31b291=_0x4f98b6?.[_0x56bdfe(0x107)];if(!_0x31b291||typeof _0x31b291[_0x56bdfe(0x231)]!==_0x56bdfe(0x226))return;await Promise[_0x56bdfe(0x1dc)]([Promise[_0x56bdfe(0x1af)](_0x31b291)[_0x56bdfe(0x17c)](()=>{}),new Promise(_0x2926cc=>{const _0x4426a8=_0x56bdfe,_0x4e7b71=setTimeout(_0x2926cc,_0x36737c);if(_0x4e7b71[_0x4426a8(0x181)])_0x4e7b71[_0x4426a8(0x181)]();})]);}catch{}}function _0x19b581(_0x53097a){const _0x5225bf=_0x4ff54a;if(_0xa50e87)return Promise[_0x5225bf(0x1af)]();const _0x337b78=_0x53097a?.[_0x5225bf(0x1fd)];return _0x337b78&&typeof _0x337b78[_0x5225bf(0x231)]===_0x5225bf(0x226)?_0x337b78:Promise[_0x5225bf(0x1af)]();}return okdbWriter[_0x4ff54a(0x271)]=_0x3dfd5c,okdbWriter[_0x4ff54a(0x271)][_0x4ff54a(0x10c)]=_0x2cb879,okdbWriter[_0x4ff54a(0x271)][_0x4ff54a(0x1fd)]=_0x19b581,okdbWriter['exports'][_0x4ff54a(0xc2)]=_0xa50e87,okdbWriter[_0x4ff54a(0x271)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0xacead1=_0x74f0a9;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x435b9c=require$$0$3,{SYNC_COMMITS:_0x44b48a}=requireOkdbWriter(),_0x3bed41=_0xacead1(0x1d1);class _0x38dbb6{constructor(_0x469a54,_0x1449a1,_0x46e036){const _0x1fb19a=_0xacead1;this[_0x1fb19a(0x1de)]=_0x469a54,this['_key']=_0x1449a1,this[_0x1fb19a(0x2b0)]=_0x46e036,this[_0x1fb19a(0x2cb)]=![],this[_0x1fb19a(0x1f8)]=null,this['_heartbeatInFlight']=null;}['isHeld'](){const _0x4bbea6=_0xacead1;if(this['_released'])return![];try{const _0x4d00f1=this[_0x4bbea6(0x1de)][_0x4bbea6(0x16f)]()[_0x4bbea6(0x195)](this[_0x4bbea6(0xc5)]);if(!_0x4d00f1||_0x4d00f1[_0x4bbea6(0x1d0)]!==this[_0x4bbea6(0x2b0)])return![];const _0x387cac=_0x4d00f1[_0x4bbea6(0x11c)]??_0x4d00f1['acquiredAt'];if(_0x387cac+_0x4d00f1[_0x4bbea6(0x1aa)]<Date[_0x4bbea6(0x219)]())return![];return!![];}catch{return!this[_0x4bbea6(0x2cb)];}}['holder'](){const _0x4428b7=_0xacead1;if(this[_0x4428b7(0x2cb)])return null;try{return this[_0x4428b7(0x1de)]['_db']()[_0x4428b7(0x195)](this['_key'])??null;}catch{return null;}}async['extend'](_0x585d4f){const _0xf89d75=_0xacead1;if(this[_0xf89d75(0x2cb)])return;try{const _0x15a11f=this[_0xf89d75(0x1de)][_0xf89d75(0x16f)]()['get'](this[_0xf89d75(0xc5)]);if(!_0x15a11f||_0x15a11f[_0xf89d75(0x1d0)]!==this[_0xf89d75(0x2b0)])return;if(_0x44b48a)this[_0xf89d75(0x1de)][_0xf89d75(0x16f)]()[_0xf89d75(0xbc)](this['_key'],{..._0x15a11f,'ttlMs':_0x15a11f[_0xf89d75(0x1aa)]+_0x585d4f});else await this[_0xf89d75(0x1de)][_0xf89d75(0x16f)]()[_0xf89d75(0x1c0)](this[_0xf89d75(0xc5)],{..._0x15a11f,'ttlMs':_0x15a11f[_0xf89d75(0x1aa)]+_0x585d4f});}catch{}}async['release'](){const _0x4e4b6b=_0xacead1;if(this[_0x4e4b6b(0x2cb)])return;if(this['_heartbeatInFlight'])try{await this[_0x4e4b6b(0x230)];}catch{}clearInterval(this[_0x4e4b6b(0x1f8)]),this[_0x4e4b6b(0x1f8)]=null,this[_0x4e4b6b(0x2cb)]=!![];try{const _0x2292be=this[_0x4e4b6b(0x1de)][_0x4e4b6b(0x16f)]()['get'](this['_key']);if(_0x2292be&&_0x2292be[_0x4e4b6b(0x1d0)]===this['_acquiredAt']){if(_0x44b48a)this[_0x4e4b6b(0x1de)][_0x4e4b6b(0x16f)]()[_0x4e4b6b(0x14c)](this[_0x4e4b6b(0xc5)]);else await this[_0x4e4b6b(0x1de)][_0x4e4b6b(0x16f)]()[_0x4e4b6b(0x12a)](this['_key']);}}catch{}}[_0xacead1(0x21d)](_0x4a0830,_0x4c01fe){const _0x1e4763=_0xacead1,_0x5d49ad=_0x4c01fe??Math[_0x1e4763(0x21c)](_0x4a0830/0x3);this[_0x1e4763(0x1f8)]=setInterval(()=>{if(this['_released'])return;this['_heartbeatInFlight']=((async()=>{const _0x1056ae=_0x30d0;try{const _0x150b7f=this[_0x1056ae(0x1de)][_0x1056ae(0x16f)]()[_0x1056ae(0x195)](this[_0x1056ae(0xc5)]);if(!_0x150b7f||_0x150b7f[_0x1056ae(0x1d0)]!==this[_0x1056ae(0x2b0)]){this[_0x1056ae(0x2cb)]=!![],clearInterval(this[_0x1056ae(0x1f8)]),this['_heartbeatTimer']=null;return;}if(_0x44b48a)this[_0x1056ae(0x1de)][_0x1056ae(0x16f)]()[_0x1056ae(0xbc)](this[_0x1056ae(0xc5)],{..._0x150b7f,'updatedAt':Date[_0x1056ae(0x219)]()});else await this[_0x1056ae(0x1de)][_0x1056ae(0x16f)]()[_0x1056ae(0x1c0)](this[_0x1056ae(0xc5)],{..._0x150b7f,'updatedAt':Date[_0x1056ae(0x219)]()});}catch{}this[_0x1056ae(0x230)]=null;})());},_0x5d49ad);if(this[_0x1e4763(0x1f8)]['unref'])this[_0x1e4763(0x1f8)][_0x1e4763(0x181)]();}}class _0x2ca7e9{constructor(_0x43e888,{namespace:_0x397825,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x15f8db=_0xacead1;this[_0x15f8db(0x1c9)]=_0x43e888,this[_0x15f8db(0x2e0)]=_0x397825,this[_0x15f8db(0x1aa)]=ttlMs,this[_0x15f8db(0x141)]=heartbeatMs,this[_0x15f8db(0x2e3)]=null;}[_0xacead1(0x16f)](){const _0x5d3a4b=_0xacead1;return!this['_lockDb']&&(this[_0x5d3a4b(0x2e3)]=this[_0x5d3a4b(0x1c9)][_0x5d3a4b(0x2b7)](_0x3bed41,{'dupSort':![]})),this[_0x5d3a4b(0x2e3)];}[_0xacead1(0xae)](){const _0xdd5ed3=_0xacead1;return!this['_wantDbHandle']&&(this[_0xdd5ed3(0x13b)]=this[_0xdd5ed3(0x1c9)][_0xdd5ed3(0x2b7)](_0x3bed41+_0xdd5ed3(0x277),{'dupSort':![]})),this[_0xdd5ed3(0x13b)];}[_0xacead1(0xc5)](_0x363b00){const _0x525d1c=_0xacead1;return this[_0x525d1c(0x2e0)]+':'+_0x363b00;}[_0xacead1(0x175)](_0x5d4599){const _0xa723d0=_0xacead1;try{_0x44b48a?this[_0xa723d0(0xae)]()[_0xa723d0(0xbc)](this['_key'](_0x5d4599),Date[_0xa723d0(0x219)]()):this[_0xa723d0(0xae)]()[_0xa723d0(0x1c0)](this[_0xa723d0(0xc5)](_0x5d4599),Date[_0xa723d0(0x219)]())?.[_0xa723d0(0x17c)]?.(()=>{});}catch{}}['isWanted'](_0xc9fc73,_0x1a97f8=0x3e8){const _0x19d9d0=_0xacead1;try{const _0x2719ae=this[_0x19d9d0(0xae)]()[_0x19d9d0(0x195)](this['_key'](_0xc9fc73));return typeof _0x2719ae==='number'&&Date['now']()-_0x2719ae<_0x1a97f8;}catch{return![];}}[_0xacead1(0x297)](_0x4827fa){const _0x26531b=_0xacead1,_0x375a0f=_0x4827fa[_0x26531b(0x11c)]??_0x4827fa[_0x26531b(0x1d0)];return _0x375a0f+_0x4827fa[_0x26531b(0x1aa)]<Date[_0x26531b(0x219)]();}static[_0xacead1(0x16b)](_0xc94f9a){const _0xacf3c2=_0xacead1,_0x581a69=_0xc94f9a?.['holder'];if(!_0x581a69||typeof _0x581a69[_0xacf3c2(0x2af)]!=='number')return![];if(_0x581a69[_0xacf3c2(0x270)]!==_0x435b9c[_0xacf3c2(0x270)]())return![];if(_0x581a69[_0xacf3c2(0x2af)]===process['pid'])return![];try{return process[_0xacf3c2(0x1ff)](_0x581a69[_0xacf3c2(0x2af)],0x0),![];}catch(_0x551029){return _0x551029[_0xacf3c2(0x163)]===_0xacf3c2(0xbb);}}async[_0xacead1(0x1c5)](_0x16b623,_0x451e72={},_0x8c8a5b={}){const _0x26f2e2=_0xacead1,_0x26b428=this[_0x26f2e2(0xc5)](_0x16b623),_0x404224=_0x8c8a5b[_0x26f2e2(0x1aa)]??this[_0x26f2e2(0x1aa)],_0x1b6974=Date['now'](),_0x317635={'holder':{'pid':process[_0x26f2e2(0x2af)],'hostname':_0x435b9c[_0x26f2e2(0x270)](),..._0x451e72},'acquiredAt':_0x1b6974,'updatedAt':_0x1b6974,'ttlMs':_0x404224};let _0x56fad8=![],_0x50326f=null;try{const _0x3a3bae=()=>{const _0x4b7964=_0x26f2e2,_0x14053d=this[_0x4b7964(0x16f)]()[_0x4b7964(0x195)](_0x26b428);if(_0x14053d&&!this[_0x4b7964(0x297)](_0x14053d)&&!_0x2ca7e9[_0x4b7964(0x16b)](_0x14053d)){const _0x1fd16e=_0x451e72['processorId']!=null&&_0x14053d[_0x4b7964(0x280)][_0x4b7964(0x2af)]===process[_0x4b7964(0x2af)]&&_0x14053d[_0x4b7964(0x280)]['processorId']===_0x451e72[_0x4b7964(0x160)];if(!_0x1fd16e){_0x56fad8=![],_0x50326f=_0x14053d;return;}_0x317635[_0x4b7964(0x1d0)]<=_0x14053d[_0x4b7964(0x1d0)]&&(_0x317635[_0x4b7964(0x1d0)]=_0x14053d[_0x4b7964(0x1d0)]+0x1,_0x317635[_0x4b7964(0x11c)]=_0x317635[_0x4b7964(0x1d0)]);}this[_0x4b7964(0x16f)]()['put'](_0x26b428,_0x317635),_0x56fad8=!![],_0x50326f=_0x317635;};if(_0x44b48a)this['_db']()['transactionSync'](_0x3a3bae);else await this[_0x26f2e2(0x16f)]()[_0x26f2e2(0x136)](_0x3a3bae);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x56fad8)return{'acquired':![],'handle':null,'current':_0x50326f};const _0x6dfea8=new _0x38dbb6(this,_0x26b428,_0x317635[_0x26f2e2(0x1d0)]);return _0x6dfea8['_startHeartbeat'](_0x404224,this['heartbeatMs']),{'acquired':!![],'handle':_0x6dfea8,'current':_0x50326f};}[_0xacead1(0x1b9)](_0x2b8f51){const _0x42a00d=_0xacead1;try{return this[_0x42a00d(0x16f)]()[_0x42a00d(0x195)](this[_0x42a00d(0xc5)](_0x2b8f51))??null;}catch{return null;}}[_0xacead1(0xc3)](){const _0x2ab29d=_0xacead1,_0x29e1a3=this[_0x2ab29d(0x2e0)]+':',_0x3cb758=[];try{for(const {key:_0x5f94c1,value:_0x5cfea2}of this[_0x2ab29d(0x16f)]()[_0x2ab29d(0x27d)]({'start':_0x29e1a3,'end':_0x29e1a3+'\xff'})){typeof _0x5f94c1===_0x2ab29d(0x24d)&&_0x5f94c1[_0x2ab29d(0x1f1)](_0x29e1a3)&&_0x3cb758[_0x2ab29d(0x2c1)]({'id':_0x5f94c1[_0x2ab29d(0x1c3)](_0x29e1a3[_0x2ab29d(0x1c4)]),'entry':_0x5cfea2});}}catch{}return _0x3cb758;}static[_0xacead1(0x1ec)](_0x3196fb){const _0x41875c=_0xacead1,_0x1c5ed3=[];try{const _0x17a06c=_0x3196fb[_0x41875c(0x2b7)](_0x3bed41,{'dupSort':![]});for(const {key:_0x163d84,value:_0x31154e}of _0x17a06c[_0x41875c(0x27d)]({})){if(typeof _0x163d84!==_0x41875c(0x24d))continue;const _0x2e8b06=_0x163d84[_0x41875c(0x2a3)](':');if(_0x2e8b06<0x1)continue;_0x1c5ed3[_0x41875c(0x2c1)]({'namespace':_0x163d84[_0x41875c(0x1c3)](0x0,_0x2e8b06),'id':_0x163d84[_0x41875c(0x1c3)](_0x2e8b06+0x1),'entry':_0x31154e});}}catch{}return _0x1c5ed3;}}return okdbLock={'OKDBLock':_0x2ca7e9},okdbLock;}var version='2.3.2',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x4779c3=_0x74f0a9;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x2d0bfc=require$$0$3,_0x1b3070=require$$1$1,_0x47ce0f=require$$2,{LOOP:_0x3cd62f}=requireOkdbLoopMonitor(),{OKDBLock:_0x1e5cb6}=requireOkdbLock(),{SYNC_COMMITS:_0x2c6821}=requireOkdbWriter(),_0x1359c9=_0x4779c3(0xce),_0x341fee=_0x4779c3(0x1be),_0x257a11='~processes:desired',_0x38d988=_0x4779c3(0x25e),_0x5d03f6=(_0xbb77aa,_0x476696)=>_0xbb77aa+':'+_0x476696,_0x2516a2=(_0x58a4c9,_0x104e42)=>_0x58a4c9+'::'+_0x104e42,_0x1a1470=(_0xaa0fc3,_0x5efc21)=>_0xaa0fc3+'/'+_0x5efc21,_0x5ea47f=(_0x30c801,_0x4a3567)=>_0x30c801+'#'+_0x4a3567,_0x2017b5=_0x23da81=>{const _0x1345d1=_0x4779c3;if(_0x23da81?.['processKey'])return _0x23da81['processKey'];const _0x2042b5=_0x23da81?.[_0x1345d1(0x2c7)];return typeof _0x2042b5===_0x1345d1(0x24d)&&_0x2042b5['includes']('#')?_0x2042b5[_0x1345d1(0x1c3)](0x0,_0x2042b5[_0x1345d1(0x2a3)]('#')):_0x2042b5;},_0x5e18a7=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x140074=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x24b71d=_0x5e18a7*0x3,_0x261f92=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x24b71d*0x14),_0x5dc771=[_0x4779c3(0xc8),_0x4779c3(0x121),_0x4779c3(0x1a2),_0x4779c3(0xc9),_0x4779c3(0x13e),_0x4779c3(0x14f)];let _0x54bcf0=null;function _0x1a95fa(){const _0x35150a=_0x4779c3;if(_0x54bcf0==null)_0x54bcf0=Math['round']((Date[_0x35150a(0x219)]()-process[_0x35150a(0x25d)]()*0x3e8)/0x3e8)*0x3e8;return _0x54bcf0;}function _0x10c631(_0x3a551e){const _0x30c2fd=_0x4779c3;if(process.env.OKDB_PROCESS_KILL===_0x30c2fd(0x193))return![];if(_0x3a551e?.[_0x30c2fd(0x13a)]?.[_0x30c2fd(0x182)]&&typeof _0x3a551e['options'][_0x30c2fd(0x182)]===_0x30c2fd(0x112)&&_0x3a551e[_0x30c2fd(0x13a)][_0x30c2fd(0x182)][_0x30c2fd(0x1ff)]===![])return![];return!![];}function _0xed25af(_0x5b3046,_0x5cd169){const _0x421d55=_0x4779c3,_0x24163a=!!_0x5cd169?.['processors'];switch(_0x5b3046){case'primary':return{'controllable':_0x24163a,'decommissionable':![],'killable':!![],'killConfirm':_0x421d55(0x239)};case _0x421d55(0x2b3):case _0x421d55(0x14a):return{'controllable':_0x24163a,'decommissionable':![],'killable':!![],'killConfirm':_0x421d55(0x23f)};case _0x421d55(0x10a):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x421d55(0x16a):case _0x421d55(0x1b8):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x421d55(0x194)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x14bf54{constructor(_0x242415){const _0x2a31ff=_0x4779c3;this['okdb']=_0x242415,this['_statusEnv']=null,this[_0x2a31ff(0xe3)]=null,this['_desiredOverlay']=new Map(),this[_0x2a31ff(0x1ae)]=null,this[_0x2a31ff(0x166)]=![],this[_0x2a31ff(0xa8)]=![],this[_0x2a31ff(0x110)]=_0x1a95fa(),this[_0x2a31ff(0x1ed)]=_0x5d03f6(process[_0x2a31ff(0x2af)],this['_processStartedAt']),this[_0x2a31ff(0x2d6)]=_0x47ce0f[_0x2a31ff(0xec)]()[_0x2a31ff(0x1c3)](0x0,0x8),this[_0x2a31ff(0x29e)]=_0x5ea47f(this[_0x2a31ff(0x1ed)],this[_0x2a31ff(0x2d6)]),this[_0x2a31ff(0x2b2)]=Date[_0x2a31ff(0x219)](),this['_kind']=null,this[_0x2a31ff(0x119)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0x2a31ff(0xe2)]=null,this[_0x2a31ff(0x26d)]=null,this[_0x2a31ff(0xfc)]=0x0,this[_0x2a31ff(0x296)]={},this[_0x2a31ff(0x227)]=new Map(),this['_lastCpuUsage']=process[_0x2a31ff(0x191)](),this[_0x2a31ff(0x10e)]=Date[_0x2a31ff(0x219)](),this[_0x2a31ff(0xcc)]=0x0,this[_0x2a31ff(0x18b)]=new Map();}get[_0x4779c3(0x183)](){return this['_selfKey'];}get[_0x4779c3(0xfd)](){return this['_rowKey'];}[_0x4779c3(0x197)](_0x21ed35,_0x1d0533){const _0x3a9f6b=_0x4779c3,_0x5eee0f=_0xed25af(_0x21ed35,_0x1d0533);if(_0x5eee0f[_0x3a9f6b(0x299)]&&!_0x10c631(this[_0x3a9f6b(0x217)]))return{..._0x5eee0f,'killable':![],'killConfirm':undefined};return _0x5eee0f;}[_0x4779c3(0xdf)](){const _0x2bd220=_0x4779c3;return!!this[_0x2bd220(0x14d)];}[_0x4779c3(0xac)](_0x44c2f3){Object['assign'](this['_ownMeta'],_0x44c2f3||{});}[_0x4779c3(0xf8)](_0xb66fbd){const _0x48f086=_0x4779c3;if(_0xb66fbd)this[_0x48f086(0x154)]=_0xb66fbd;}['register'](_0x258926={}){const _0x5cacce=_0x4779c3;return this['okdb'][_0x5cacce(0x23c)](_0x258926);}[_0x4779c3(0x28b)](){const _0x3424e4=_0x4779c3,_0x328142={};let _0x1f1320=0x0,_0x3a8e55=0x0;const _0x14c372=new Set();for(const _0x15453f of this['listNodes']()){_0x3a8e55++;const _0x3430d9=_0x15453f[_0x3424e4(0xf4)];if(!_0x3430d9)continue;if(_0x3430d9[_0x3424e4(0x15c)])_0x1f1320++;for(const _0x5eab94 of _0x3430d9[_0x3424e4(0x124)]||[]){if(![_0x3424e4(0x116),_0x3424e4(0x13d)][_0x3424e4(0x2a9)](_0x5eab94[_0x3424e4(0xca)]))continue;(_0x5eab94[_0x3424e4(0x2a0)]===_0x3424e4(0x125)||_0x5eab94['state']===_0x3424e4(0x298))&&_0x5eab94[_0x3424e4(0x126)]&&_0x14c372['add']((_0x5eab94[_0x3424e4(0x134)]||'default')+':'+_0x5eab94[_0x3424e4(0x126)]);const _0x258848=_0x5eab94[_0x3424e4(0x134)]||_0x3424e4(0x2a6);(_0x328142[_0x258848]||=[])[_0x3424e4(0x2c1)]({..._0x5eab94,'env':_0x258848,'owner':{'pid':_0x15453f[_0x3424e4(0x2af)]??null,'kind':_0x15453f[_0x3424e4(0x258)]??null}});}}for(const [_0x2ec3e2,_0x568cbe]of Object['entries'](_0x328142)){for(const _0x163220 of _0x568cbe){if(_0x163220[_0x3424e4(0xca)]===_0x3424e4(0x116)&&!_0x163220[_0x3424e4(0x232)]){const _0x4d43e4=_0x2ec3e2+':'+(_0x163220[_0x3424e4(0x126)]??'');if(!_0x14c372[_0x3424e4(0x1cd)](_0x4d43e4))_0x163220[_0x3424e4(0x25b)]=!![];}}}return{'envs':_0x328142,'policy':null,'participation':{'participating':_0x1f1320,'total':_0x3a8e55},'source':_0x3424e4(0x26f)};}[_0x4779c3(0x16d)](){const _0x40c140=_0x4779c3,_0xeb5e9=_0x2040ae=>{const _0x1be4d2=_0x30d0;if(_0x2040ae[_0x1be4d2(0x2a0)]===_0x1be4d2(0x125)||_0x2040ae['state']===_0x1be4d2(0x298)||_0x2040ae['state']===_0x1be4d2(0x192))return 0x3;if(_0x2040ae[_0x1be4d2(0x232)])return 0x1;return 0x2;},_0x374f62=new Map();for(const _0x59020b of this['listNodes']()){for(const _0x24065a of _0x59020b[_0x40c140(0xf4)]?.['processors']||[]){const _0x2127c9={..._0x24065a,'owner':{'pid':_0x59020b['pid']??null,'kind':_0x59020b['kind']??null,'host':_0x59020b[_0x40c140(0x127)]??null}},_0x438f57=_0x24065a[_0x40c140(0xca)]===_0x40c140(0x116)?_0x40c140(0x1da)+(_0x24065a[_0x40c140(0x134)]??'')+'::'+(_0x24065a[_0x40c140(0x126)]??_0x24065a['type']??_0x24065a['id']):_0x40c140(0x207)+(_0x59020b[_0x40c140(0x2c7)]??_0x59020b[_0x40c140(0x1f7)]??'')+'::'+(_0x24065a[_0x40c140(0x134)]??'')+'::'+_0x24065a['id'],_0x5b7601=_0x374f62[_0x40c140(0x195)](_0x438f57);if(!_0x5b7601||_0xeb5e9(_0x2127c9)>_0xeb5e9(_0x5b7601))_0x374f62['set'](_0x438f57,_0x2127c9);}}return[..._0x374f62['values']()];}[_0x4779c3(0x1a5)](){const _0x1cd2aa=_0x4779c3,_0xeed1b6=Date['now'](),_0x38ab7f=this[_0x1cd2aa(0x275)](),_0x335ccf=_0x4fbaec=>Math[_0x1cd2aa(0x244)](0x0,Math[_0x1cd2aa(0x2c9)]((_0xeed1b6-(_0x4fbaec[_0x1cd2aa(0x254)]||_0xeed1b6))/0x3e8)),_0x2fb6c3=_0x38ab7f['find'](_0x3d1198=>_0x3d1198[_0x1cd2aa(0x258)]==='primary'),_0x47004e=_0x38ab7f[_0x1cd2aa(0x2d5)](_0x44776a=>_0x44776a[_0x1cd2aa(0x258)]===_0x1cd2aa(0x1e1));if(_0x2fb6c3||_0x47004e['length'])return{'primary':_0x2fb6c3?{'pid':_0x2fb6c3[_0x1cd2aa(0x2af)],'uptime':_0x335ccf(_0x2fb6c3)}:null,'workers':_0x47004e[_0x1cd2aa(0x284)](_0x33fd92=>({'pid':_0x33fd92[_0x1cd2aa(0x2af)],'uptime':_0x335ccf(_0x33fd92)})),'workersConfigured':_0x2fb6c3?.['meta']?.[_0x1cd2aa(0xb4)]??_0x47004e[_0x1cd2aa(0x1c4)],'mode':_0x1cd2aa(0x1bc)};const _0x3c41a1=_0x38ab7f[_0x1cd2aa(0x14b)](_0x21fd4f=>_0x21fd4f[_0x1cd2aa(0x258)]==='cli'||_0x21fd4f[_0x1cd2aa(0x258)]==='standalone'||_0x21fd4f[_0x1cd2aa(0x258)]==='embedded'),_0xec7038=_0x3c41a1?{'pid':_0x3c41a1[_0x1cd2aa(0x2af)],'uptime':_0x335ccf(_0x3c41a1)}:{'pid':process[_0x1cd2aa(0x2af)],'uptime':Math[_0x1cd2aa(0x244)](0x0,Math[_0x1cd2aa(0x2c9)](process['uptime']()))};return{'primary':_0xec7038,'workers':[_0xec7038],'workersConfigured':0x1,'mode':_0x1cd2aa(0x116)};}[_0x4779c3(0x294)](){const _0x2ef482=_0x4779c3;return this[_0x2ef482(0x238)]();}['treeView'](){const _0x46720e=_0x4779c3,_0x5cfc99=new Map();for(const _0x5d740e of this[_0x46720e(0x238)]())_0x5cfc99['set'](_0x5d740e[_0x46720e(0x1f7)],{..._0x5d740e,'children':[]});const _0x58616a=[];for(const _0x4c2276 of _0x5cfc99[_0x46720e(0x251)]()){const _0x41966e=_0x4c2276[_0x46720e(0x20b)]?_0x5cfc99[_0x46720e(0x195)](_0x4c2276[_0x46720e(0x20b)]):null;if(_0x41966e&&_0x41966e!==_0x4c2276)_0x41966e[_0x46720e(0x11b)][_0x46720e(0x2c1)](_0x4c2276);else _0x58616a[_0x46720e(0x2c1)](_0x4c2276);}const _0x4296fd=(_0x2b13a7,_0x4a44f1)=>_0x2b13a7[_0x46720e(0x258)]===_0x4a44f1[_0x46720e(0x258)]?(_0x2b13a7[_0x46720e(0x2af)]||0x0)-(_0x4a44f1[_0x46720e(0x2af)]||0x0):(_0x2b13a7['kind']??'')<(_0x4a44f1['kind']??'')?-0x1:0x1,_0xb09ba=_0xcade0=>{const _0x1a44a1=_0x46720e;_0xcade0[_0x1a44a1(0x25a)](_0x4296fd);for(const _0xd728c6 of _0xcade0)if(_0xd728c6[_0x1a44a1(0x11b)][_0x1a44a1(0x1c4)])_0xb09ba(_0xd728c6['children']);};return _0xb09ba(_0x58616a),_0x58616a;}[_0x4779c3(0x21b)](_0x49e461){const _0x358832=_0x4779c3;return this[_0x358832(0x238)]()[_0x358832(0x14b)](_0x149c54=>_0x149c54[_0x358832(0x1f7)]===_0x49e461)??null;}['_groupByProcess'](_0x2f3877=Date[_0x4779c3(0x219)]()){const _0x44fa0a=_0x4779c3,_0x461589=new Map();for(const _0x511d56 of this[_0x44fa0a(0x275)]()){const _0x111feb=_0x2017b5(_0x511d56);let _0x15e462=_0x461589[_0x44fa0a(0x195)](_0x111feb);!_0x15e462&&(_0x15e462={'processKey':_0x111feb,'nodeKey':_0x111feb,'pid':_0x511d56[_0x44fa0a(0x2af)],'ppid':_0x511d56[_0x44fa0a(0x2b1)]??null,'host':_0x511d56[_0x44fa0a(0x127)]??null,'kind':_0x511d56[_0x44fa0a(0x258)],'role':null,'supervisorKey':_0x511d56['supervisorKey']??null,'slot':_0x511d56[_0x44fa0a(0x199)]??null,'slotKey':_0x511d56[_0x44fa0a(0x129)]??null,'caps':_0x511d56[_0x44fa0a(0x2aa)]??null,'lifecycle':_0x511d56[_0x44fa0a(0xb8)]??null,'uptime':Math[_0x44fa0a(0x244)](0x0,Math[_0x44fa0a(0x2c9)]((_0x2f3877-(_0x511d56[_0x44fa0a(0x254)]||_0x2f3877))/0x3e8)),'startedAt':_0x511d56[_0x44fa0a(0x254)]??null,'meta':_0x511d56['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x461589[_0x44fa0a(0x2bd)](_0x111feb,_0x15e462));_0x15e462[_0x44fa0a(0x178)][_0x44fa0a(0x2c1)]({'instanceId':_0x511d56[_0x44fa0a(0x202)]??null,'role':_0x511d56['role']??null,'listenAddr':_0x511d56['listenAddr']??null,'lifecycle':_0x511d56[_0x44fa0a(0xb8)]??null,'processing':_0x511d56['processing']??null});if(!_0x15e462['role']&&_0x511d56[_0x44fa0a(0x140)])_0x15e462['role']=_0x511d56[_0x44fa0a(0x140)];if(!_0x15e462[_0x44fa0a(0x130)]&&_0x511d56[_0x44fa0a(0x130)])_0x15e462[_0x44fa0a(0x130)]=_0x511d56[_0x44fa0a(0x130)];if(!_0x15e462['processing']&&_0x511d56[_0x44fa0a(0xf4)])_0x15e462[_0x44fa0a(0xf4)]=_0x511d56[_0x44fa0a(0xf4)];if(!_0x15e462[_0x44fa0a(0x20e)]&&_0x511d56[_0x44fa0a(0x20e)])_0x15e462[_0x44fa0a(0x20e)]=_0x511d56[_0x44fa0a(0x20e)];if(!_0x15e462[_0x44fa0a(0x179)]&&_0x511d56[_0x44fa0a(0x179)])_0x15e462[_0x44fa0a(0x179)]=_0x511d56['singletonClaims'];if(_0x15e462[_0x44fa0a(0x2aa)]==null&&_0x511d56[_0x44fa0a(0x2aa)])_0x15e462[_0x44fa0a(0x2aa)]=_0x511d56['caps'];if(_0x511d56[_0x44fa0a(0x266)]&&(!_0x15e462[_0x44fa0a(0x266)]||(_0x511d56['stats']['at']??0x0)>(_0x15e462['stats']['at']??0x0)))_0x15e462[_0x44fa0a(0x266)]=_0x511d56['stats'];}return[..._0x461589[_0x44fa0a(0x251)]()];}['runtimeProcessesView'](){const _0x26deff=_0x4779c3,_0xc83056=[],_0x5ec3cf={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x41a097 of this[_0x26deff(0x238)]()){_0xc83056[_0x26deff(0x2c1)]({'processKey':_0x41a097['processKey'],'kind':_0x41a097[_0x26deff(0x258)],'pid':_0x41a097[_0x26deff(0x2af)],'supervisorKey':_0x41a097[_0x26deff(0x20b)],'meta':_0x41a097['meta']??null,'uptime':_0x41a097[_0x26deff(0x25d)],'stats':_0x41a097[_0x26deff(0x266)]??null}),_0x5ec3cf[_0x26deff(0x182)]++;if(_0x41a097[_0x26deff(0x266)]){_0x5ec3cf[_0x26deff(0x1ca)]+=_0x41a097[_0x26deff(0x266)][_0x26deff(0x1ca)]||0x0,_0x5ec3cf[_0x26deff(0xa9)]+=(_0x41a097[_0x26deff(0x266)][_0x26deff(0xa9)]||0x0)+(_0x41a097[_0x26deff(0x266)]['threads']?.['heapUsed']||0x0);const _0x966afe=_0x41a097[_0x26deff(0x266)][_0x26deff(0x263)];_0x966afe&&(_0x5ec3cf[_0x26deff(0x263)]['count']+=_0x966afe[_0x26deff(0x161)]||0x0,_0x5ec3cf['threads'][_0x26deff(0x228)]+=_0x966afe[_0x26deff(0x228)]||0x0,_0x5ec3cf[_0x26deff(0x263)][_0x26deff(0x249)]+=_0x966afe[_0x26deff(0x249)]||0x0);}}return{'totals':_0x5ec3cf,'nodes':_0xc83056};}async[_0x4779c3(0xd6)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x3b018e=_0x4779c3;this['_isWriter']=this[_0x3b018e(0x166)]||!!writer,this[_0x3b018e(0xa8)]=this[_0x3b018e(0xa8)]||!!reader,this[_0x3b018e(0x128)]=kind||this[_0x3b018e(0x128)]||(_0x1b3070[_0x3b018e(0xe5)]?_0x3b018e(0x1e1):'cli'),this[_0x3b018e(0x119)]=supervisorKey??this['_supervisorKey'],this[_0x3b018e(0x154)]=listenAddr??this[_0x3b018e(0x154)],this[_0x3b018e(0x2b5)](),await this[_0x3b018e(0x2a5)]();if(!writer&&!reader)return null;if(!this[_0x3b018e(0x14d)]){const _0x45b804=await this['okdb'][_0x3b018e(0x224)](_0x1359c9,{'sync':![],'durability':'fast'});await _0x45b804[_0x3b018e(0x1b6)](_0x341fee),this[_0x3b018e(0x14d)]=_0x45b804;}return this[_0x3b018e(0x14d)];}[_0x4779c3(0xbd)](){const _0x22fad8=_0x4779c3;return this[_0x22fad8(0x1f5)]!==this[_0x22fad8(0x14d)]&&(this['_nodeDbFor']=this[_0x22fad8(0x14d)],this[_0x22fad8(0x117)]=this['_statusEnv'][_0x22fad8(0x295)](_0x341fee)[_0x22fad8(0xf9)]),this[_0x22fad8(0x117)];}['_putRowAsync'](_0x15895a){const _0x10828b=_0x4779c3;if(_0x2c6821)return this[_0x10828b(0xbd)]()['putSync'](_0x15895a['nodeKey'],_0x15895a,0x1);const _0x5f20ec=this[_0x10828b(0xbd)]()[_0x10828b(0x1c0)](_0x15895a['nodeKey'],_0x15895a,0x1);if(_0x5f20ec&&typeof _0x5f20ec[_0x10828b(0x231)]===_0x10828b(0x226))_0x5f20ec['then'](undefined,()=>{});return _0x5f20ec;}[_0x4779c3(0x1db)](_0x4a99fd){const _0x4aa8e3=_0x4779c3;return this[_0x4aa8e3(0xbd)]()[_0x4aa8e3(0xbc)](_0x4a99fd[_0x4aa8e3(0x2c7)],_0x4a99fd,0x1);}[_0x4779c3(0x22f)](_0x386faf){const _0x1200b7=_0x4779c3;if(_0x2c6821)try{return this['_nodeDb']()[_0x1200b7(0x14c)](_0x386faf);}catch{return![];}const _0x567249=this[_0x1200b7(0xbd)]()[_0x1200b7(0x12a)](_0x386faf);if(_0x567249&&typeof _0x567249[_0x1200b7(0x231)]===_0x1200b7(0x226))_0x567249[_0x1200b7(0x231)](undefined,()=>{});return _0x567249;}async[_0x4779c3(0x1ac)](_0x22124d){const _0x2fc252=_0x4779c3;if(!this[_0x2fc252(0x14d)]||!this[_0x2fc252(0x166)]||!_0x22124d?.[_0x2fc252(0x2c7)])return;return this[_0x2fc252(0x223)](_0x22124d);}async[_0x4779c3(0xf0)](_0x1eb063){const _0x193631=_0x4779c3;if(!this[_0x193631(0x14d)]||!this[_0x193631(0x166)]||!_0x1eb063)return;const _0x373ad9=_0x1eb063[_0x193631(0x2a9)]('#'),_0x202ea1=[];for(const {key:_0x5d289e}of this[_0x193631(0x14d)][_0x193631(0x27d)](_0x341fee)){if(_0x5d289e===_0x1eb063||!_0x373ad9&&typeof _0x5d289e===_0x193631(0x24d)&&_0x5d289e[_0x193631(0x1f1)](_0x1eb063+'#'))_0x202ea1[_0x193631(0x2c1)](_0x5d289e);}for(const _0xcde788 of _0x202ea1){try{this['_nodeDb']()['removeSync'](_0xcde788);}catch{}}}['_nodeDead'](_0x5ae3d2){const _0x1db41a=_0x4779c3;if(typeof _0x5ae3d2?.[_0x1db41a(0x2af)]!==_0x1db41a(0xbf))return![];if(_0x5ae3d2[_0x1db41a(0x127)]!==_0x2d0bfc[_0x1db41a(0x270)]())return![];if(_0x5ae3d2[_0x1db41a(0x2af)]===process[_0x1db41a(0x2af)])return![];if(_0x5ae3d2[_0x1db41a(0x2e4)]!=null&&_0x5ae3d2[_0x1db41a(0x2e4)]<Date['now']()-_0x261f92)return!![];try{return process[_0x1db41a(0x1ff)](_0x5ae3d2[_0x1db41a(0x2af)],0x0),![];}catch(_0x2241eb){return _0x2241eb[_0x1db41a(0x163)]===_0x1db41a(0xbb);}}['listNodes'](){const _0x569199=_0x4779c3;if(!this[_0x569199(0x14d)])return[];try{this[_0x569199(0x14d)]['db']?.[_0x569199(0x24f)]?.();}catch{}const _0x345dc7=Date['now'](),_0xa6e7cc=_0x2d0bfc[_0x569199(0x270)](),_0x28019e=[];for(const {value:_0x2f680d}of this['_statusEnv']['getRange'](_0x341fee)){if(!_0x2f680d)continue;let _0x377d8f=null;_0x2f680d[_0x569199(0x127)]===_0xa6e7cc&&typeof _0x2f680d[_0x569199(0x2af)]===_0x569199(0xbf)&&(_0x377d8f=!this[_0x569199(0xbe)](_0x2f680d));if(_0x377d8f===![])continue;const _0x38ae8f=_0x2f680d['expiresAt']==null||_0x2f680d[_0x569199(0x2e4)]>=_0x345dc7;if(_0x377d8f===!![]||_0x38ae8f)_0x28019e['push'](_0x2f680d);}return _0x28019e;}async['reap'](_0x2e4aaf=0x0){const _0x52dd61=_0x4779c3;if(!this['_statusEnv']||!this[_0x52dd61(0x166)])return;const _0x12654c=Date['now']()-_0x2e4aaf,_0x2c790a=new Set(),_0x58d4d6=[],_0x5b17f6=_0x2d0bfc[_0x52dd61(0x270)](),_0x52ab6f=require$$6[_0x52dd61(0x26c)];for(const {key:_0x1361e2,value:_0x582309}of this[_0x52dd61(0x14d)][_0x52dd61(0x27d)](_0x341fee)){if(!_0x582309)continue;const _0x4acc05=_0x582309[_0x52dd61(0x127)]===_0x5b17f6&&typeof _0x582309[_0x52dd61(0x2af)]===_0x52dd61(0xbf),_0xf1eb9=_0x4acc05?this['_nodeDead'](_0x582309):_0x582309[_0x52dd61(0x2e4)]!=null&&_0x582309['expiresAt']<_0x12654c;if(_0xf1eb9)_0x58d4d6[_0x52dd61(0x2c1)](_0x1361e2);else{_0x2c790a[_0x52dd61(0x156)](_0x2017b5(_0x582309)??_0x1361e2);if(_0x582309[_0x52dd61(0x26c)]&&_0x582309['version']!==_0x52ab6f){if(!this[_0x52dd61(0xa6)])this['_versionSkewWarned']=new Set();!this[_0x52dd61(0xa6)]['has'](_0x582309[_0x52dd61(0x26c)])&&(this[_0x52dd61(0xa6)][_0x52dd61(0x156)](_0x582309[_0x52dd61(0x26c)]),this[_0x52dd61(0x217)][_0x52dd61(0x201)]?.[_0x52dd61(0x1dd)]?.('process\x20'+(_0x582309[_0x52dd61(0x2af)]??'?')+_0x52dd61(0x2a2)+_0x582309['version']+_0x52dd61(0x2b9)+_0x52ab6f+_0x52dd61(0x25c)+_0x52dd61(0x289),{'feature':_0x52dd61(0xe7)}));}}}for(const _0x32a009 of _0x58d4d6)this[_0x52dd61(0x22f)](_0x32a009);if(this['_ensureDesired']()){const _0x30d07f=[];for(const {key:_0x10c8af}of this[_0x52dd61(0x19b)](_0x52dd61(0x1be))){if(!_0x2c790a['has'](_0x10c8af)){if(_0x2c6821)try{this[_0x52dd61(0xe3)][_0x52dd61(0x14c)](_0x52dd61(0x2ab)+_0x10c8af);}catch{}else _0x30d07f[_0x52dd61(0x2c1)](this['_desired']['remove'](_0x52dd61(0x2ab)+_0x10c8af));}}if(_0x30d07f[_0x52dd61(0x1c4)])await Promise['allSettled'](_0x30d07f);}}[_0x4779c3(0xf6)](_0x3c8694=null){const _0x18d3cf=_0x4779c3;if(this[_0x18d3cf(0x1b3)])return;if(!this[_0x18d3cf(0x166)]||!this[_0x18d3cf(0x14d)]){this[_0x18d3cf(0x217)]?.[_0x18d3cf(0x201)]?.['warn']?.(_0x18d3cf(0xde)+this['_isWriter']+_0x18d3cf(0x291)+!!this[_0x18d3cf(0x14d)]+_0x18d3cf(0x139),{'feature':_0x18d3cf(0x182)});return;}this[_0x18d3cf(0x26d)]=_0x3c8694,this[_0x18d3cf(0xe2)]=()=>this['_maybePublish']();for(const _0x1a9d08 of _0x5dc771)this[_0x18d3cf(0x217)][_0x18d3cf(0x21e)]['on'](_0x1a9d08,this[_0x18d3cf(0xe2)]);this[_0x18d3cf(0x29a)]();const _0x334503=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x5e18a7;this['_hbTimer']=setInterval(()=>{const _0x498aba=_0x18d3cf;if(this[_0x498aba(0x26d)])try{this['_onTick']();}catch{}this['_publishNow'](),this[_0x498aba(0x27e)]()[_0x498aba(0x17c)](()=>{});},_0x334503);if(this[_0x18d3cf(0x1b3)][_0x18d3cf(0x181)])this[_0x18d3cf(0x1b3)][_0x18d3cf(0x181)]();}[_0x4779c3(0x274)](){const _0x588e7f=_0x4779c3;if(!this[_0x588e7f(0x166)]||!this[_0x588e7f(0x14d)])return;if(Date[_0x588e7f(0x219)]()-this['_lastPublishAt']<_0x140074)return;this[_0x588e7f(0x29a)]();}[_0x4779c3(0x29a)](){const _0x5c848d=_0x4779c3;if(!this[_0x5c848d(0x166)]||!this['_statusEnv'])return;this[_0x5c848d(0xfc)]=Date[_0x5c848d(0x219)]();try{const _0x4d243f=[this['_buildOwnRow']()];for(const _0x56b534 of this[_0x5c848d(0x227)][_0x5c848d(0x251)]())_0x4d243f[_0x5c848d(0x2c1)](this['_buildChildRow'](_0x56b534));const _0x34ad25=_0x3cd62f[_0x5c848d(0x28e)]?_0x3cd62f[_0x5c848d(0x219)]():0x0;for(const _0x58353d of _0x4d243f){try{this[_0x5c848d(0x1db)](_0x58353d),this['_publishFailWarned']=![];}catch(_0x1cb595){!this[_0x5c848d(0x152)]&&(this[_0x5c848d(0x152)]=!![],this[_0x5c848d(0x217)]?.[_0x5c848d(0x201)]?.[_0x5c848d(0x1dd)]?.(_0x5c848d(0x115)+_0x1cb595[_0x5c848d(0x262)],{'feature':'processes'}));}}if(_0x3cd62f[_0x5c848d(0x28e)])_0x3cd62f[_0x5c848d(0x220)](_0x5c848d(0x2ac),_0x3cd62f[_0x5c848d(0x219)]()-_0x34ad25,_0x5c848d(0x1fa)+_0x4d243f['length']+_0x5c848d(0x155));}catch(_0x131771){!this[_0x5c848d(0x152)]&&(this['_publishFailWarned']=!![],this[_0x5c848d(0x217)]?.[_0x5c848d(0x201)]?.[_0x5c848d(0x1dd)]?.(_0x5c848d(0x115)+_0x131771[_0x5c848d(0x262)],{'feature':'processes'}));}}async[_0x4779c3(0x1fc)](){const _0x28aade=_0x4779c3;if(this[_0x28aade(0xe2)]){for(const _0x3c975c of _0x5dc771){try{this[_0x28aade(0x217)][_0x28aade(0x21e)]['off'](_0x3c975c,this[_0x28aade(0xe2)]);}catch{}}this[_0x28aade(0xe2)]=null;}this[_0x28aade(0x1b3)]&&(clearInterval(this[_0x28aade(0x1b3)]),this['_hbTimer']=null);try{if(this[_0x28aade(0x14d)]&&this['_isWriter'])await this[_0x28aade(0xf0)](this[_0x28aade(0x29e)]);}catch{}}async[_0x4779c3(0x162)](){const _0x3e87b4=_0x4779c3;if(!this[_0x3e87b4(0x14d)]||!this[_0x3e87b4(0x166)])return;try{await this[_0x3e87b4(0xf0)](this[_0x3e87b4(0x29e)]);}catch{}try{const _0x12df90=[];for(const {value:_0x1d17e}of this['_statusEnv'][_0x3e87b4(0x27d)](_0x341fee)){if(_0x1d17e?.[_0x3e87b4(0x2b1)]===process['pid']&&_0x1d17e[_0x3e87b4(0x2c7)])_0x12df90[_0x3e87b4(0x2c1)](_0x1d17e[_0x3e87b4(0x2c7)]);}for(const _0x92df60 of _0x12df90){try{await this['removeNode'](_0x92df60);}catch{}}}catch{}}async[_0x4779c3(0x1ee)](){const _0x113f18=_0x4779c3;return this[_0x113f18(0x1ac)](this[_0x113f18(0x2a7)]());}async['publishChildRow'](_0x157a9f){const _0x4183d5=_0x4779c3;if(!this[_0x4183d5(0x14d)]||!this[_0x4183d5(0x166)])return;return this['putNode'](this['_buildChildRow'](_0x157a9f));}[_0x4779c3(0x1bd)]({pid:_0xb5bf3b,startedAt:_0x563cf8,kind:_0x4d5b36,supervisorKey:_0x1590d8,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x4779c3(0x17f),meta:meta=null,stats:stats=null}){const _0x15cd7f=_0x4779c3,_0xb6f2c=Date['now'](),_0x216be1=_0x5d03f6(_0xb5bf3b,_0x563cf8);return{'nodeKey':_0x5ea47f(_0x216be1,'0'),'processKey':_0x216be1,'instanceId':'0','pid':_0xb5bf3b,'startedAt':_0x563cf8,'ppid':process[_0x15cd7f(0x2af)],'host':_0x2d0bfc[_0x15cd7f(0x270)](),'supervisorKey':_0x1590d8,'slot':slot,'slotKey':slotKey,'kind':_0x4d5b36,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0xb6f2c,'expiresAt':_0xb6f2c+_0x24b71d,'caps':this[_0x15cd7f(0x197)](_0x4d5b36,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x4779c3(0x247)](_0x105e5b){const _0x386068=_0x4779c3;if(!_0x105e5b?.[_0x386068(0x2af)])return null;const _0x5aa8a1=_0x5d03f6(_0x105e5b[_0x386068(0x2af)],_0x105e5b[_0x386068(0x254)]);this['_children'][_0x386068(0x2bd)](_0x5aa8a1,{..._0x105e5b,'supervisorKey':_0x105e5b[_0x386068(0x20b)]??this[_0x386068(0x1ed)]});if(this[_0x386068(0x166)])await this['publishChildRow'](this[_0x386068(0x227)]['get'](_0x5aa8a1))[_0x386068(0x17c)]?.(()=>{});return _0x5aa8a1;}['removeSupervisedChild'](_0x2fce76){const _0x22ef62=_0x4779c3;if(!_0x2fce76)return;return this[_0x22ef62(0x227)][_0x22ef62(0x28d)](_0x2fce76),this[_0x22ef62(0xf0)](_0x2fce76);}['_sampleOwnStats'](){const _0x1947e0=_0x4779c3,_0x473d21=Date[_0x1947e0(0x219)](),_0x2df8ae=process[_0x1947e0(0x191)](),_0xe66026=(_0x473d21-this[_0x1947e0(0x10e)])*0x3e8;if(_0xe66026>=0x3d090){const _0x1f4ac5=_0x2df8ae[_0x1947e0(0x1e0)]-this[_0x1947e0(0x19c)][_0x1947e0(0x1e0)]+(_0x2df8ae[_0x1947e0(0x24b)]-this['_lastCpuUsage'][_0x1947e0(0x24b)]),_0x4a355f=_0x2d0bfc['cpus']()['length']||0x1;this[_0x1947e0(0xcc)]=Math[_0x1947e0(0x203)](0x64,Math[_0x1947e0(0x2c9)](_0x1f4ac5/(_0xe66026*_0x4a355f)*0x64)),this[_0x1947e0(0x2d8)]=Math[_0x1947e0(0x2c9)](_0xe66026/0x3e8),this['_lastCpuUsage']=_0x2df8ae,this['_lastCpuAt']=_0x473d21;}const _0x4aa5d7=process[_0x1947e0(0x144)](),_0x45039=this[_0x1947e0(0x18b)]['size'];let _0x30128a=0x0;if(_0x45039>0x0){const _0x355269=[this[_0x1947e0(0x217)],...this[_0x1947e0(0x217)][_0x1947e0(0x267)]?.[_0x1947e0(0x251)]?.()??[]];for(const _0x1b83e1 of _0x355269){const _0x72a96b=_0x1b83e1['functions']?.[_0x1947e0(0x28c)];if(_0x72a96b)_0x30128a+=_0x72a96b[_0x1947e0(0xf1)]['busy'];}}let _0x5fd7e0=null;const _0x186e62=_0x45039;if(_0x186e62>0x0){let _0x54fa3f=0x0;for(const _0x40fb76 of this[_0x1947e0(0x18b)]['values']())_0x54fa3f+=_0x40fb76['heapUsed']||0x0;_0x5fd7e0={'count':_0x186e62,'heapUsed':_0x54fa3f,'sandbox':_0x45039,'busy':_0x30128a};}return{'rss':_0x4aa5d7[_0x1947e0(0x1ca)],'heapUsed':_0x4aa5d7['heapUsed'],'heapTotal':_0x4aa5d7[_0x1947e0(0x1bb)],'external':_0x4aa5d7['external'],'cpuPct':this[_0x1947e0(0xcc)],'cpuWindowMs':this[_0x1947e0(0x2d8)]??null,'threads':_0x5fd7e0,'at':_0x473d21};}[_0x4779c3(0x1c7)](_0x5e93e6,_0x229558){const _0x3b5f25=_0x4779c3;if(!_0x5e93e6||!_0x229558)return;this[_0x3b5f25(0x18b)]['set'](_0x5e93e6,_0x229558);}['clearThreadStats'](_0x459264){const _0x5e775e=_0x4779c3;this[_0x5e775e(0x18b)][_0x5e775e(0x28d)](_0x459264);}[_0x4779c3(0x151)](_0x1bc93d,_0x18e72f,_0x5478c6=undefined){const _0x3e8710=_0x4779c3,_0x4bad2e=this[_0x3e8710(0x227)][_0x3e8710(0x195)](_0x1bc93d);if(!_0x4bad2e||!_0x18e72f)return;if(_0x5478c6!==undefined)_0x4bad2e[_0x3e8710(0xf4)]=_0x5478c6;_0x4bad2e['stats']={'rss':_0x18e72f[_0x3e8710(0x1ca)]??null,'heapUsed':_0x18e72f['heapUsed']??null,'heapTotal':_0x18e72f[_0x3e8710(0x1bb)]??null,'external':_0x18e72f[_0x3e8710(0xd9)]??null,'cpuPct':_0x18e72f['cpuPct']??null,'cpuWindowMs':_0x18e72f[_0x3e8710(0x190)]??null,'threads':_0x18e72f[_0x3e8710(0x263)]??null,'claims':_0x18e72f[_0x3e8710(0x25f)]??null,'envsOpen':_0x18e72f[_0x3e8710(0x165)]??null,'at':Date['now']()};}['_buildOwnRow'](){const _0x568da6=_0x4779c3,_0x45863e=Date['now'](),_0x5379fd=this['okdb'][_0x568da6(0xd4)]||{},_0x500df2=this[_0x568da6(0x128)]||_0x568da6(0x2b3);return{'nodeKey':this['_rowKey'],'processKey':this[_0x568da6(0x1ed)],'instanceId':this[_0x568da6(0x2d6)],'pid':process[_0x568da6(0x2af)],'startedAt':this[_0x568da6(0x110)],'instanceStartedAt':this[_0x568da6(0x2b2)],'ppid':typeof process[_0x568da6(0x2b1)]===_0x568da6(0xbf)?process[_0x568da6(0x2b1)]:null,'host':_0x2d0bfc[_0x568da6(0x270)](),'supervisorKey':this[_0x568da6(0x119)]??null,'version':require$$6['version'],'kind':_0x500df2,'role':{'engines':!!_0x5379fd['engines'],'processors':!!_0x5379fd[_0x568da6(0x124)],'compaction':_0x5379fd[_0x568da6(0xf7)],'http':_0x5379fd[_0x568da6(0x103)]},'listenAddr':this[_0x568da6(0x154)]??null,'heartbeatAt':_0x45863e,'expiresAt':_0x45863e+_0x24b71d,'caps':this[_0x568da6(0x197)](_0x500df2,_0x5379fd),'lifecycle':{'state':_0x568da6(0x17f),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x5379fd[_0x568da6(0x124)]?this[_0x568da6(0xb6)]():null,'engines':_0x5379fd[_0x568da6(0x20e)]?[...this['okdb']['_servingEngines']??[]]:null,'singletonClaims':this[_0x568da6(0x241)](),'stats':this['_sampleOwnStats'](),'writers':this['_collectWriterFacet']()};}[_0x4779c3(0x153)](){const _0x450f04=_0x4779c3,_0x40a472={};try{for(const [_0x308eaa,_0x276dfb]of this[_0x450f04(0x217)][_0x450f04(0x267)]){try{const _0x4afcf9=_0x276dfb['writerStatus']?.();if(!_0x4afcf9)continue;if(!_0x4afcf9[_0x450f04(0x23e)]&&!_0x4afcf9[_0x450f04(0x1fd)]&&!(_0x4afcf9['parkedNow']??0x0)&&!_0x4afcf9['draining'])continue;_0x40a472[_0x308eaa]={'depth':_0x4afcf9[_0x450f04(0x23e)],'oldestPendingMs':_0x4afcf9[_0x450f04(0x2c5)],'committed':_0x4afcf9[_0x450f04(0x1fd)],'commitsPerSec':_0x4afcf9[_0x450f04(0x279)],'commitP99Ms':_0x4afcf9[_0x450f04(0x246)],'parkedNow':_0x4afcf9[_0x450f04(0x12f)]??0x0,'draining':!!_0x4afcf9[_0x450f04(0x1bf)]};}catch{}}}catch{}return Object['keys'](_0x40a472)[_0x450f04(0x1c4)]?_0x40a472:null;}[_0x4779c3(0x241)](){const _0x8cf457=_0x4779c3,_0x47fe92=process['pid'],_0x165f37=Date[_0x8cf457(0x219)](),_0xd8bba1=_0x55425b=>{const _0xfbfea3=_0x8cf457;if(!_0x55425b)return[];const _0x18a303=[];try{for(const {id:_0x2ae886,entry:_0x4f3f45}of _0x55425b[_0xfbfea3(0xc3)]()){if(_0x4f3f45?.[_0xfbfea3(0x280)]?.[_0xfbfea3(0x2af)]!==_0x47fe92)continue;const _0x45b37f=_0x4f3f45[_0xfbfea3(0x11c)]??_0x4f3f45[_0xfbfea3(0x1d0)]??0x0;if(_0x45b37f+(_0x4f3f45[_0xfbfea3(0x1aa)]??0x0)<_0x165f37)continue;_0x18a303['push'](_0x2ae886);}}catch{}return _0x18a303;},_0x5f3026=_0xd8bba1(this[_0x8cf457(0x2cc)](_0x8cf457(0x12b))),_0x50bc43=_0xd8bba1(this['_singletonLock'](_0x8cf457(0x173)));if(!_0x5f3026[_0x8cf457(0x1c4)]&&!_0x50bc43[_0x8cf457(0x1c4)])return null;return{'compact':_0x5f3026,'replicate':_0x50bc43};}[_0x4779c3(0x2cc)](_0x2c5d8c){const _0x247274=_0x4779c3;if(!this[_0x247274(0x217)]?.['_rootDb'])return null;if(!this[_0x247274(0xab)])this[_0x247274(0xab)]=new Map();let _0x5b0e8c=this['_singletonLocks'][_0x247274(0x195)](_0x2c5d8c);if(!_0x5b0e8c)try{_0x5b0e8c=new _0x1e5cb6(this[_0x247274(0x217)][_0x247274(0x2c3)],{'namespace':_0x2c5d8c}),this[_0x247274(0xab)][_0x247274(0x2bd)](_0x2c5d8c,_0x5b0e8c);}catch{return null;}return _0x5b0e8c;}['_buildProcessingFacet'](){const _0x161c3d=_0x4779c3,_0x42bdfe=[];try{for(const [_0x2bc8b1,_0x4028a]of this[_0x161c3d(0x217)][_0x161c3d(0x267)]){if(_0x2bc8b1[_0x161c3d(0x1f1)]('~'))continue;for(const _0x58544e of _0x4028a[_0x161c3d(0xc1)][_0x161c3d(0x2d2)]())_0x42bdfe[_0x161c3d(0x2c1)]({..._0x58544e,'env':_0x2bc8b1});}}catch{}return{'participate':this['okdb'][_0x161c3d(0x124)]?.[_0x161c3d(0x11e)]??![],'processors':_0x42bdfe};}[_0x4779c3(0x2b5)](){const _0x872a7f=_0x4779c3;if(this['_desired'])return!![];const _0x39dc51=this[_0x872a7f(0x217)][_0x872a7f(0x2c3)];if(!_0x39dc51)return![];return this[_0x872a7f(0xe3)]=_0x39dc51['openDB'](_0x257a11,{'dupSort':![]}),this[_0x872a7f(0x1ae)]=_0x39dc51['openDB'](_0x38d988,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x53b7e2=_0x4779c3;if(!this[_0x53b7e2(0x2b5)]())return;const _0x3baf99=_0x53b7e2(0xfb),_0xd7c3ef=0x1,_0x2064fb=this['_desired'][_0x53b7e2(0x195)](_0x3baf99)??0x0;if(_0x2064fb>=_0xd7c3ef)return;const _0x51b79b=_0x2dd81e=>{const _0x1c7161=_0x53b7e2;if(_0x2dd81e===_0x1c7161(0x1b8))return _0x1c7161(0x116);if(_0x2dd81e===_0x1c7161(0x27c))return _0x1c7161(0x13d);return _0x2dd81e;};await this[_0x53b7e2(0x217)][_0x53b7e2(0x2ad)][_0x53b7e2(0x1d5)][_0x53b7e2(0x1a4)](()=>{const _0x3f7ab4=_0x53b7e2;for(const _0x1a344a of['procmode/','procmodeack/']){for(const {key:_0xeeb97,value:_0x1934e3}of this[_0x3f7ab4(0xe3)][_0x3f7ab4(0x27d)]({'start':_0x1a344a,'end':_0x1a344a+'\xff'})){if(typeof _0xeeb97!==_0x3f7ab4(0x24d)||!_0xeeb97[_0x3f7ab4(0x1f1)](_0x1a344a))break;const _0x37da2c=_0x51b79b(_0x1934e3[_0x3f7ab4(0xca)]);if(_0x37da2c!==_0x1934e3[_0x3f7ab4(0xca)])this['_desired'][_0x3f7ab4(0x1c0)](_0xeeb97,{..._0x1934e3,'mode':_0x37da2c});}}this['_desired'][_0x3f7ab4(0x1c0)](_0x3baf99,_0xd7c3ef);});}['hasDesired'](){const _0x378172=_0x4779c3;return!!this[_0x378172(0xe3)];}[_0x4779c3(0x269)](_0x1cf547,_0x3dbc92){const _0x499f15=_0x4779c3;if(!this[_0x499f15(0x2b5)]())return null;const _0x32fa89=_0x1cf547+'/'+_0x3dbc92;return this['_refreshDesiredSnapshot'](),this[_0x499f15(0x164)][_0x499f15(0x195)](_0x32fa89)??this[_0x499f15(0xe3)]['get'](_0x32fa89)??null;}[_0x4779c3(0x1ad)](){const _0xe8ef63=_0x4779c3;if(!_0x2c6821)return;try{this['okdb'][_0xe8ef63(0x2ad)]?.['db']?.[_0xe8ef63(0x24f)]?.();}catch{}}async[_0x4779c3(0x104)](_0x1677e3,_0x4d5002,_0x39d742){const _0x3eb753=_0x4779c3;if(!this[_0x3eb753(0x2b5)]())return null;const _0x59b919=_0x1677e3+'/'+_0x4d5002;this['_refreshDesiredSnapshot']();const _0x4a3b15=this[_0x3eb753(0x164)][_0x3eb753(0x195)](_0x59b919)??this[_0x3eb753(0xe3)][_0x3eb753(0x195)](_0x59b919)??{'version':0x0},_0x22bd75=(_0x4a3b15[_0x3eb753(0x26c)]||0x0)+0x1,_0x308ff6={..._0x4a3b15,..._0x39d742,'version':_0x22bd75,'updatedAt':Date[_0x3eb753(0x219)]()};this[_0x3eb753(0x164)][_0x3eb753(0x2bd)](_0x59b919,_0x308ff6);try{await this[_0x3eb753(0x217)][_0x3eb753(0x2ad)][_0x3eb753(0x1d5)][_0x3eb753(0x1a4)](()=>{const _0x8e5652=_0x3eb753;this[_0x8e5652(0xe3)][_0x8e5652(0x1c0)](_0x59b919,_0x308ff6);});}finally{if(this[_0x3eb753(0x164)][_0x3eb753(0x195)](_0x59b919)===_0x308ff6)this[_0x3eb753(0x164)][_0x3eb753(0x28d)](_0x59b919);}return _0x22bd75;}['listDesired'](_0x15f243){const _0x32ed3a=_0x4779c3;if(!this[_0x32ed3a(0x2b5)]())return[];this['_refreshDesiredSnapshot']();const _0x1f6f94=_0x15f243+'/',_0x19fdf9=[];for(const {key:_0x3d8d28,value:_0x42ab1b}of this[_0x32ed3a(0xe3)][_0x32ed3a(0x27d)]({'start':_0x1f6f94,'end':_0x1f6f94+'\xff'})){if(typeof _0x3d8d28!==_0x32ed3a(0x24d)||!_0x3d8d28[_0x32ed3a(0x1f1)](_0x1f6f94))break;_0x19fdf9[_0x32ed3a(0x2c1)]({'key':_0x3d8d28[_0x32ed3a(0x1c3)](_0x1f6f94[_0x32ed3a(0x1c4)]),'value':_0x42ab1b});}return _0x19fdf9;}[_0x4779c3(0x229)](_0x177c23){const _0x2a0240=_0x4779c3;if(!this['_ensureDesired']())return null;return this[_0x2a0240(0x1ae)]['get'](_0x177c23)??null;}async['bumpCmd'](_0x24906e,_0x5d6156,_0x4acb07={}){const _0x162e08=_0x4779c3;if(!this[_0x162e08(0x2b5)]())return null;let _0x368763;return await this[_0x162e08(0x217)][_0x162e08(0x2ad)]['_writer'][_0x162e08(0x1a4)](()=>{const _0x50bcd2=_0x162e08,_0x244588=this[_0x50bcd2(0x1ae)]['get'](_0x24906e)||{'epoch':0x0};_0x368763=(_0x244588[_0x50bcd2(0x143)]||0x0)+0x1,this[_0x50bcd2(0x1ae)][_0x50bcd2(0x1c0)](_0x24906e,{..._0x244588,..._0x4acb07,'cmd':_0x5d6156,'epoch':_0x368763,'updatedAt':Date['now']()});}),_0x368763;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x14bf54,'nodeKey':_0x5d03f6,'logicalKey':_0x2516a2,'slotKey':_0x1a1470,'PROCESS_ENV':_0x1359c9,'NODE_TYPE':_0x341fee},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x18afd9=_0x74f0a9;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x1b2e92=require$$0$4,{EVENTS:_0x5f2164,CHANGE_ACTIONS:_0x450c3d}=requireOkdbEnums(),{LOOP:_0x5e255f}=requireOkdbLoopMonitor(),_0x48aa95=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x21295d=0x5,_0x18a3d5=0x2710;class _0x4b6a33 extends _0x1b2e92{constructor(_0x140374,_0x1a2f9d={}){const _0x1a8fa1=_0x30d0;super(),this[_0x1a8fa1(0x217)]=_0x140374,this[_0x1a8fa1(0x1f0)]=_0x1a2f9d[_0x1a8fa1(0xfe)]??_0x48aa95,this[_0x1a8fa1(0x171)]=_0x1a2f9d['flushDebounce']??_0x21295d,this[_0x1a8fa1(0x27a)]=_0x1a2f9d[_0x1a8fa1(0x184)]??_0x18a3d5,this[_0x1a8fa1(0x2da)]=![],this[_0x1a8fa1(0x102)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x1a8fa1(0x259)]=null,this[_0x1a8fa1(0x1d3)]=![],this[_0x1a8fa1(0x2d7)]=new Set(),this['_onItem']=_0x3be8f2=>this['_handleInProcess'](_0x3be8f2),this[_0x1a8fa1(0x1d4)]=_0xb801e1=>this[_0x1a8fa1(0x23a)](_0xb801e1),this[_0x1a8fa1(0x28f)]=()=>this[_0x1a8fa1(0x187)]();}[_0x18afd9(0x1c6)](){const _0x4ef253=_0x18afd9;if(this[_0x4ef253(0x2da)])return;this[_0x4ef253(0x2da)]=!![];for(const [_0x56ac7e,_0x2ef8ec]of this[_0x4ef253(0x217)][_0x4ef253(0x267)]){if(_0x56ac7e[_0x4ef253(0x1f1)]('~'))continue;try{_0x2ef8ec[_0x4ef253(0x23d)]();}catch{}}for(const [_0x527884,_0x188358]of this[_0x4ef253(0x217)][_0x4ef253(0x267)]){if(_0x527884['startsWith']('~'))continue;try{this[_0x4ef253(0x236)][_0x4ef253(0x2bd)](_0x527884,_0x188358[_0x4ef253(0x2dc)]()||0x0);}catch{}}const {events:_0x2aa7c6}=this[_0x4ef253(0x217)];_0x2aa7c6['on'](_0x5f2164['ITEM_CREATE'],this[_0x4ef253(0x27f)]),_0x2aa7c6['on'](_0x5f2164[_0x4ef253(0x189)],this[_0x4ef253(0x27f)]),_0x2aa7c6['on'](_0x5f2164[_0x4ef253(0x1c1)],this[_0x4ef253(0x27f)]),_0x2aa7c6['on'](_0x5f2164['SYSTEM_POKE'],this[_0x4ef253(0x1d4)]),_0x2aa7c6[_0x4ef253(0x1ab)](_0x5f2164['SYSTEM_STOPPED'],this[_0x4ef253(0x28f)]);}[_0x18afd9(0x187)](){const _0x33a4da=_0x18afd9;if(!this[_0x33a4da(0x2da)])return;this[_0x33a4da(0x2da)]=![];const {events:_0x606580}=this[_0x33a4da(0x217)];_0x606580[_0x33a4da(0x193)](_0x5f2164['ITEM_CREATE'],this['_onItem']),_0x606580[_0x33a4da(0x193)](_0x5f2164['ITEM_UPDATE'],this['_onItem']),_0x606580[_0x33a4da(0x193)](_0x5f2164['ITEM_REMOVE'],this[_0x33a4da(0x27f)]),_0x606580['off'](_0x5f2164[_0x33a4da(0x101)],this[_0x33a4da(0x1d4)]);try{_0x606580[_0x33a4da(0x193)](_0x5f2164[_0x33a4da(0x26b)],this[_0x33a4da(0x28f)]);}catch{}this[_0x33a4da(0x259)]&&(clearTimeout(this[_0x33a4da(0x259)]),this[_0x33a4da(0x259)]=null),this['_pending']['clear'](),this[_0x33a4da(0x102)][_0x33a4da(0x211)](),this[_0x33a4da(0x236)]['clear'](),this[_0x33a4da(0x2d7)][_0x33a4da(0x211)]();}[_0x18afd9(0x18c)](_0x1008cd,_0x4b94b8,_0xf4c296,_0x18e50e){return _0x1008cd+'\x00'+_0x4b94b8+'\x00'+_0xf4c296+'\x00'+_0x18e50e;}['_markSeen'](_0x14b0c8,_0x5327f0,_0xae5ff9,_0x14875e){const _0x46da8e=_0x18afd9,_0x3bb85e=this[_0x46da8e(0x18c)](_0x14b0c8,_0x5327f0,_0xae5ff9,_0x14875e);if(this[_0x46da8e(0x2d7)][_0x46da8e(0x1cd)](_0x3bb85e))return![];this[_0x46da8e(0x2d7)][_0x46da8e(0x156)](_0x3bb85e);if(this['_seen'][_0x46da8e(0xc4)]>this[_0x46da8e(0x27a)]){const _0xba9a72=this[_0x46da8e(0x2d7)][_0x46da8e(0x251)]()['next']()[_0x46da8e(0x1c8)];this[_0x46da8e(0x2d7)][_0x46da8e(0x28d)](_0xba9a72);}return!![];}[_0x18afd9(0x27b)](_0x33a01b){const _0x4dae87=_0x18afd9;if(!this[_0x4dae87(0x2da)]||!_0x33a01b)return;const {env:_0x130c5b,type:_0x26010f,key:_0x4fb94b,clock:_0x360cff,origin:_0xf44311,action:_0x303b5b,newValue:_0x24f979,oldValue:_0x1ee92e}=_0x33a01b;if(_0x130c5b==null||_0x26010f==null||_0x4fb94b==null)return;if(typeof _0x130c5b===_0x4dae87(0x24d)&&_0x130c5b['startsWith']('~'))return;if(typeof _0x26010f===_0x4dae87(0x24d)&&_0x26010f[_0x4dae87(0x1f1)]('~'))return;if(!this[_0x4dae87(0x235)](_0x130c5b,_0x26010f,_0x4fb94b,_0x360cff))return;const _0x401cb9=_0x303b5b===_0x450c3d['REMOVE']?_0x4dae87(0x12a):_0x4dae87(0x1c0);this[_0x4dae87(0x225)](_0x4dae87(0x288),{'env':_0x130c5b,'type':_0x26010f,'key':_0x4fb94b,'op':_0x401cb9,'clock':_0x360cff,'origin':_0xf44311,'value':_0x401cb9===_0x4dae87(0x12a)?null:_0x24f979,'prevValue':_0x1ee92e});}[_0x18afd9(0x23a)](_0x49952d){const _0x2fc1cb=_0x18afd9;if(!this[_0x2fc1cb(0x2da)])return;if(!_0x49952d||typeof _0x49952d[_0x2fc1cb(0x134)]!==_0x2fc1cb(0x24d)||typeof _0x49952d[_0x2fc1cb(0x1a9)]!=='string')return;const {env:_0x56c7c5,type:_0x149e91}=_0x49952d;if(_0x56c7c5[_0x2fc1cb(0x1f1)]('~')||_0x149e91[_0x2fc1cb(0x1f1)]('~'))return;this[_0x2fc1cb(0x19f)][_0x2fc1cb(0x2bd)](_0x56c7c5+'\x00'+_0x149e91,{'env':_0x56c7c5,'type':_0x149e91}),this['_scheduleFlush']();}[_0x18afd9(0x137)](){const _0xcabab6=_0x18afd9;if(this[_0xcabab6(0x259)])return;const _0x894669=()=>{const _0x99fd08=_0xcabab6;this[_0x99fd08(0x259)]=null,this[_0x99fd08(0x260)]()[_0x99fd08(0x17c)](()=>{});};this['_flushTimer']=setTimeout(_0x894669,this['_flushDebounce']>0x0?this[_0xcabab6(0x171)]:0x0);}async[_0x18afd9(0x260)](){const _0x6043b2=_0x18afd9;if(this['_draining']){this[_0x6043b2(0x137)]();return;}this[_0x6043b2(0x1d3)]=!![];try{const _0x4ecd94=[...this['_pending']['values']()];this[_0x6043b2(0x19f)][_0x6043b2(0x211)]();let _0x15d776=![];for(const {env:_0x3fb51d,type:_0x5de338}of _0x4ecd94){try{const _0x1973d1=await this[_0x6043b2(0x2d3)](_0x3fb51d,_0x5de338);if(_0x1973d1)_0x15d776=!![];}catch{this[_0x6043b2(0x19f)][_0x6043b2(0x2bd)](_0x3fb51d+'\x00'+_0x5de338,{'env':_0x3fb51d,'type':_0x5de338}),_0x15d776=!![];}}if(_0x15d776||this[_0x6043b2(0x19f)][_0x6043b2(0xc4)]>0x0)this['_scheduleFlush']();}finally{this[_0x6043b2(0x1d3)]=![];}}async['_drainOne'](_0x4a2e16,_0x3f3ab3){const _0x1edb2d=_0x18afd9,_0x1f0e4a=await this[_0x1edb2d(0x217)][_0x1edb2d(0x1cf)](_0x4a2e16),_0x21bb45=_0x4a2e16+'\x00'+_0x3f3ab3;!this[_0x1edb2d(0x102)][_0x1edb2d(0x1cd)](_0x21bb45)&&(!this['_baselines'][_0x1edb2d(0x1cd)](_0x4a2e16)&&(_0x1f0e4a[_0x1edb2d(0x23d)](),this['_baselines'][_0x1edb2d(0x2bd)](_0x4a2e16,_0x1f0e4a[_0x1edb2d(0x2dc)]()||0x0)),this['_cursors'][_0x1edb2d(0x2bd)](_0x21bb45,this[_0x1edb2d(0x236)][_0x1edb2d(0x195)](_0x4a2e16)));const _0x136c59=this[_0x1edb2d(0x102)]['get'](_0x21bb45),_0x44ba99=_0x1f0e4a['getClock'](_0x3f3ab3)||0x0;if(_0x44ba99<=_0x136c59)return![];const _0x32e5d5=_0x136c59+this[_0x1edb2d(0x1f0)],_0x2c0b3c=Math['min'](_0x44ba99,_0x32e5d5),_0x5be9ac=_0x5e255f[_0x1edb2d(0x28e)]?_0x5e255f[_0x1edb2d(0x219)]():0x0,_0x1484f7=Array[_0x1edb2d(0x2c6)](_0x1f0e4a[_0x1edb2d(0x10f)](_0x3f3ab3,_0x136c59+0x1,_0x2c0b3c));let _0x99cebd=_0x136c59;for(const _0x1621d6 of _0x1484f7){const {clock:_0x544ca0,key:_0x576fac,action:_0xd7067a,origin:_0x292872}=_0x1621d6;if(_0x544ca0>_0x99cebd)_0x99cebd=_0x544ca0;if(_0x576fac==null)continue;if(!this[_0x1edb2d(0x235)](_0x4a2e16,_0x3f3ab3,_0x576fac,_0x544ca0))continue;let _0xb6589b,_0x76b92f;if(_0xd7067a===_0x450c3d['REMOVE'])_0xb6589b='remove',_0x76b92f=null;else{const _0x194cc9=_0x1f0e4a[_0x1edb2d(0x195)](_0x3f3ab3,_0x576fac);_0x194cc9==null?(_0xb6589b=_0x1edb2d(0x12a),_0x76b92f=null):(_0xb6589b=_0x1edb2d(0x1c0),_0x76b92f=_0x194cc9);}this[_0x1edb2d(0x225)](_0x1edb2d(0x288),{'env':_0x4a2e16,'type':_0x3f3ab3,'key':_0x576fac,'op':_0xb6589b,'clock':_0x544ca0,'origin':_0x292872,'value':_0x76b92f});}if(_0x5e255f[_0x1edb2d(0x28e)])_0x5e255f['note'](_0x1edb2d(0x2cd)+_0x4a2e16+':'+_0x3f3ab3,_0x5e255f['now']()-_0x5be9ac,'n='+_0x1484f7['length']);return this[_0x1edb2d(0x102)][_0x1edb2d(0x2bd)](_0x21bb45,Math[_0x1edb2d(0x244)](_0x99cebd,_0x2c0b3c)),_0x1f0e4a['getClock'](_0x3f3ab3)>_0x2c0b3c;}[_0x18afd9(0xed)](){const _0x352c13=_0x18afd9;return{'started':this['_started'],'quantum':this[_0x352c13(0x1f0)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x352c13(0x1b4)]([...this[_0x352c13(0x102)][_0x352c13(0x198)]()][_0x352c13(0x284)](([_0xb7d2ad,_0x239859])=>[_0xb7d2ad[_0x352c13(0x1b1)]('\x00',':'),_0x239859])),'pending':this[_0x352c13(0x19f)][_0x352c13(0xc4)],'seen':this[_0x352c13(0x2d7)][_0x352c13(0xc4)]};}}return _0x4b6a33[_0x18afd9(0x1b0)]=_0x48aa95,okdbChangefeed={'OKDBChangefeed':_0x4b6a33},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x47f2b0=_0x74f0a9;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x543c4a=require$$1$1,_0xbe165c=require$$1,{EVENTS:_0x21a053}=requireOkdbEnums(),_0x586975=require$$0$3,{slotKey:_0x15ee0c}=requireOkdbProcessRegistry(),_0x189b09=0xfa,_0x4af729=0xfa0,_0x199441=0x5,_0x2ad0b4=0x2710,_0x2c38ab=0xbb8,_0x54da0a=0x7d0,_0x591097=_0x47f2b0(0x26a),_0x28e962='ephemeral',_0x56c702=_0x47f2b0(0x201),_0xb6ef70='stats',_0x4f9294=[_0x21a053[_0x47f2b0(0x168)],_0x21a053[_0x47f2b0(0xd3)],_0x21a053[_0x47f2b0(0x24e)],_0x21a053[_0x47f2b0(0x215)],_0x21a053[_0x47f2b0(0xf3)],_0x21a053['INDEX_READY'],_0x21a053[_0x47f2b0(0x1cc)],_0x21a053[_0x47f2b0(0x132)],_0x47f2b0(0x121),_0x47f2b0(0xc8),_0x47f2b0(0xc9),_0x47f2b0(0x13e),'processor:resumed','processor:retry'],_0xd15276=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0xe9b296({workers:_0x51a1da,makeOkdb:_0x2388c2,port:_0x30de57,primaryOkdb:_0x4d0a58,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x1ba3d7=_0x47f2b0;if(_0x543c4a[_0x1ba3d7(0x212)])return childEntry&&_0x543c4a[_0x1ba3d7(0x22b)]({'exec':_0xbe165c[_0x1ba3d7(0x1f9)](__dirname,_0x1ba3d7(0x2df)),'args':[],'execArgv':((()=>{const _0x287baa=_0x1ba3d7,_0x39dab2=[];for(let _0x5d408c=0x0;_0x5d408c<process[_0x287baa(0xff)][_0x287baa(0x1c4)];_0x5d408c++){const _0x29a772=process['execArgv'][_0x5d408c];if(_0x29a772['startsWith'](_0x287baa(0x18a))||_0x29a772[_0x287baa(0x1f1)](_0x287baa(0x214))||_0x29a772[_0x287baa(0x1f1)](_0x287baa(0x2e1)))continue;if(_0x29a772==='-e'||_0x29a772===_0x287baa(0x17d)||_0x29a772==='-p'||_0x29a772==='--print'){_0x5d408c++;continue;}_0x39dab2[_0x287baa(0x2c1)](_0x29a772);}return _0x39dab2;})())}),_0x4b7e07({'workers':_0x51a1da,'port':_0x30de57,'primaryOkdb':_0x4d0a58,'workerEnv':workerEnv});return _0x4b6aec({'makeOkdb':_0x2388c2,'port':_0x30de57});}function _0x4b7e07({workers:_0x3a1812,port:_0x535fc1,primaryOkdb:_0x2eed88,workerEnv:_0xc79f01}){const _0x5aef5f=_0x47f2b0,_0x485219=new Map(),_0x2e9e0f=new Map();let _0x59fc5b=![];const _0x36e511=_0x28f9e1=>_0x28f9e1?.[_0x5aef5f(0x1d2)],_0x226fb2=_0x191eaf=>{const _0x4c953d=_0x5aef5f,_0x1c992d=_0x543c4a['fork']({...process.env,..._0xc79f01||{},'OKDB_CLUSTER_SLOT':String(_0x191eaf)});return _0x1c992d[_0x4c953d(0x1d2)]=_0x191eaf,_0x485219[_0x4c953d(0x2bd)](_0x1c992d[_0x4c953d(0x1a3)]['pid'],{'worker':_0x1c992d,'startedAt':Date[_0x4c953d(0x219)](),'slot':_0x191eaf}),_0x1c992d['on'](_0x4c953d(0x192),_0x53240e=>{const _0x2c2fea=_0x4c953d;console[_0x2c2fea(0x201)](_0x2c2fea(0x2ae)+_0x1c992d['process'][_0x2c2fea(0x2af)]+_0x2c2fea(0x1e2)+(_0x53240e?.[_0x2c2fea(0x262)]??_0x53240e));}),_0x1c992d['on']('online',()=>_0x857ca8()),_0x1c992d;},_0x147ad4=_0xeb91a1=>{const _0x5b740c=_0x5aef5f;for(const {worker:_0x227577}of _0x485219[_0x5b740c(0x251)]()){if(_0x227577[_0x5b740c(0x204)]()||!_0x227577[_0x5b740c(0xea)]())continue;try{_0x227577['send'](_0xeb91a1);}catch{}}};_0x2eed88?.[_0x5aef5f(0x23c)]?.({'kind':_0x5aef5f(0xda),'listenAddr':':'+_0x535fc1})['catch'](()=>{}),_0x2eed88?.[_0x5aef5f(0x182)]?.[_0x5aef5f(0xac)]?.({'workersConfigured':_0x3a1812});const _0x5ccaa0={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x857ca8=()=>{const _0x18f114=_0x5aef5f,_0x2250fd=_0x2eed88?.[_0x18f114(0x182)];if(!_0x2250fd||!_0x2250fd[_0x18f114(0x166)])return;const _0x343871=_0x2250fd[_0x18f114(0x183)];for(const {worker:_0x32ed8e,startedAt:_0xceb49f,slot:_0x3beb05,stats:_0x1ff938,processing:_0xb28af1}of _0x485219['values']()){if(_0x32ed8e['isDead']())continue;const _0x581351=_0x2250fd[_0x18f114(0xb1)]?.()&&_0x2250fd[_0x18f114(0x269)](_0x18f114(0x199),_0x50433d(_0x3beb05))?.['decommission']===!![];_0x2250fd[_0x18f114(0x29d)]({'pid':_0x32ed8e[_0x18f114(0x1a3)]['pid'],'startedAt':_0xceb49f,'kind':_0x18f114(0x1e1),'supervisorKey':_0x343871,'slot':_0x3beb05,'slotKey':_0x50433d(_0x3beb05),'role':_0x5ccaa0,'listenAddr':':'+_0x535fc1,'lifecycle':_0x581351?'decommissioning':_0x18f114(0x17f),'processing':_0xb28af1??null,'stats':_0x1ff938??null})['catch'](()=>{});}},_0x50433d=_0x3330cf=>_0x15ee0c(_0x5aef5f(0x248)+_0x535fc1,_0x3330cf),_0xb5767d=_0x10222a=>{const _0x179193=_0x5aef5f,_0x470984=_0x2eed88?.[_0x179193(0x182)];if(!_0x470984?.[_0x179193(0xb1)]?.())return![];return _0x470984[_0x179193(0x269)](_0x179193(0x199),_0x50433d(_0x10222a))?.[_0x179193(0x1f3)]===!![];};for(let _0x41d601=0x0;_0x41d601<_0x3a1812;_0x41d601++){const _0x22d012=_0xb5767d(_0x41d601);_0x2e9e0f[_0x5aef5f(0x2bd)](_0x41d601,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x22d012,'respawnTimer':null}),_0x22d012?console[_0x5aef5f(0x201)](_0x5aef5f(0x2c0)+_0x41d601+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x226fb2(_0x41d601);}const _0x1760a0=()=>{const _0x1218f1=_0x5aef5f,_0x3e04b2=_0x2eed88?.[_0x1218f1(0x182)];if(!_0x3e04b2?.[_0x1218f1(0x166)]||!_0x3e04b2['hasDesired']?.())return;for(const [_0x4948e6,_0x2e9d0]of _0x2e9e0f['entries']()){const _0x187237=_0x3e04b2[_0x1218f1(0x269)](_0x1218f1(0x199),_0x50433d(_0x4948e6)),_0x18ff6b=_0x187237?.['decommission']===!![],_0x53b2a7=_0x187237?.[_0x1218f1(0x1ff)]===!![];if(_0x18ff6b&&!_0x2e9d0[_0x1218f1(0x1b7)]){_0x2e9d0[_0x1218f1(0x1b7)]=!![];_0x2e9d0[_0x1218f1(0x200)]&&(clearTimeout(_0x2e9d0[_0x1218f1(0x200)]),_0x2e9d0['respawnTimer']=null);for(const {worker:_0xcca9b5}of _0x485219[_0x1218f1(0x251)]()){if(_0x36e511(_0xcca9b5)!==_0x4948e6||_0xcca9b5[_0x1218f1(0x204)]())continue;try{if(_0x53b2a7)_0xcca9b5[_0x1218f1(0x1a3)][_0x1218f1(0x1ff)](_0x1218f1(0xe4));else _0xcca9b5[_0x1218f1(0xea)]()&&_0xcca9b5['disconnect']();}catch{}}console['log'](_0x1218f1(0x20a)+(_0x53b2a7?_0x1218f1(0x18e):_0x1218f1(0x233))+_0x1218f1(0x16c)+_0x4948e6+'\x20(durable\x20desired-state)');}else{if(!_0x18ff6b&&_0x2e9d0[_0x1218f1(0x1b7)]&&_0x187237){_0x2e9d0[_0x1218f1(0x1b7)]=![],_0x2e9d0[_0x1218f1(0xc7)]=[],_0x2e9d0[_0x1218f1(0x1a7)]=0x0;const _0x58e207=[..._0x485219[_0x1218f1(0x251)]()][_0x1218f1(0x242)](({worker:_0x376527})=>_0x36e511(_0x376527)===_0x4948e6&&!_0x376527[_0x1218f1(0x204)]());!_0x58e207&&!_0x59fc5b&&(_0x226fb2(_0x4948e6),console[_0x1218f1(0x201)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x4948e6));}}}},_0x4707f8=()=>{try{_0x1760a0();}catch{}};_0x2eed88?.[_0x5aef5f(0x21e)]?.['on']?.(_0x21a053[_0x5aef5f(0xe0)],_0x4707f8);const _0x2deeb9=[];if(_0x2eed88?.[_0x5aef5f(0x21e)]?.['on'])for(const _0x495f56 of _0x4f9294){const _0x5c4f96=_0x4ff193=>{_0x147ad4({[_0x591097]:_0x28e962,'event':_0x495f56,'data':_0x4ff193??{}});};_0x2eed88[_0x5aef5f(0x21e)]['on'](_0x495f56,_0x5c4f96),_0x2deeb9[_0x5aef5f(0x2c1)]({'event':_0x495f56,'handler':_0x5c4f96});}const _0x4a734d=setInterval(()=>{_0x1760a0(),_0x857ca8();},_0xd15276);_0x4a734d['unref']?.();const _0x3b13ff=(_0x12c428,_0x20d8e0)=>{const _0x1209b6=_0x5aef5f;if(!_0x20d8e0||typeof _0x20d8e0!==_0x1209b6(0x112)||_0x20d8e0[_0x591097]!==_0x56c702)return;if(!_0x2eed88?.[_0x1209b6(0x201)]?.[_0x1209b6(0x118)])return;const _0x1b082c=_0x20d8e0['entry']||{};_0x2eed88[_0x1209b6(0x201)][_0x1209b6(0x118)]({..._0x1b082c,'msg':'[w'+_0x20d8e0[_0x1209b6(0x199)]+']\x20'+(_0x1b082c[_0x1209b6(0xaa)]??''),'meta':{..._0x1b082c['meta']||{},'worker':_0x20d8e0[_0x1209b6(0x199)],'workerPid':_0x20d8e0[_0x1209b6(0x2af)]}});};_0x543c4a['on'](_0x5aef5f(0x262),_0x3b13ff);const _0x332460=(_0x3aac23,_0x3c57bc)=>{const _0x339505=_0x5aef5f;if(!_0x3c57bc||typeof _0x3c57bc!=='object'||_0x3c57bc[_0x591097]!==_0xb6ef70)return;const _0x1c83bb=_0x485219[_0x339505(0x195)](_0x3aac23[_0x339505(0x1a3)][_0x339505(0x2af)]);if(_0x1c83bb){_0x1c83bb[_0x339505(0x266)]={..._0x3c57bc[_0x339505(0x266)],'at':Date[_0x339505(0x219)]()};if(_0x3c57bc[_0x339505(0xf4)]!==undefined)_0x1c83bb['processing']=_0x3c57bc[_0x339505(0xf4)];}};_0x543c4a['on'](_0x5aef5f(0x262),_0x332460),_0x543c4a['on'](_0x5aef5f(0x180),(_0x38a0de,_0x44ea2d,_0x35fff4)=>{const _0x1f23d2=_0x5aef5f,_0x4f2b55=_0x38a0de[_0x1f23d2(0x1a3)][_0x1f23d2(0x2af)],_0xca82e5=_0x36e511(_0x38a0de),_0xcffcd7=_0x485219[_0x1f23d2(0x195)](_0x4f2b55);if(_0xcffcd7&&_0x2eed88?.[_0x1f23d2(0x182)])_0x2eed88[_0x1f23d2(0x182)]['removeNode'](_0x4f2b55+':'+_0xcffcd7['startedAt'])['catch'](()=>{});_0x485219['delete'](_0x4f2b55),console[_0x1f23d2(0x201)](_0x1f23d2(0x2ae)+_0x4f2b55+'\x20(slot='+(_0xca82e5??'?')+_0x1f23d2(0x2c8)+(_0x1f23d2(0x12d)+_0x44ea2d+_0x1f23d2(0x21f)+(_0x35fff4??_0x1f23d2(0x145))+_0x1f23d2(0xd0)+_0x485219[_0x1f23d2(0xc4)]+'\x20worker(s)\x20remaining')),_0x857ca8();if(_0x59fc5b||_0xca82e5==null)return;const _0x393b6d=_0x2e9e0f['get'](_0xca82e5);if(!_0x393b6d||_0x393b6d[_0x1f23d2(0x1b7)])return;const _0x2953d5=Date[_0x1f23d2(0x219)]();_0x393b6d['deaths'][_0x1f23d2(0x2c1)](_0x2953d5),_0x393b6d[_0x1f23d2(0xc7)]=_0x393b6d['deaths'][_0x1f23d2(0x2d5)](_0x51262e=>_0x2953d5-_0x51262e<=_0x2ad0b4);if(_0x393b6d[_0x1f23d2(0xc7)][_0x1f23d2(0x1c4)]>=_0x199441){_0x393b6d[_0x1f23d2(0x1b7)]=!![],console[_0x1f23d2(0x192)](_0x1f23d2(0x278)+_0xca82e5+_0x1f23d2(0x1eb)+_0x393b6d[_0x1f23d2(0xc7)][_0x1f23d2(0x1c4)]+_0x1f23d2(0x1d7)+(_0x2ad0b4+_0x1f23d2(0x10d)+_0x485219['size']+'\x20worker(s)\x20still\x20serving'));return;}_0x393b6d['consecutiveFailures']++;const _0x22cbd1=Math[_0x1f23d2(0x203)](_0x4af729,_0x189b09*0x2**(_0x393b6d[_0x1f23d2(0x1a7)]-0x1));console['log'](_0x1f23d2(0xe1)+_0xca82e5+_0x1f23d2(0xb9)+_0x22cbd1+_0x1f23d2(0x2db)+_0x393b6d[_0x1f23d2(0x1a7)]+')'),_0x393b6d[_0x1f23d2(0x200)]=setTimeout(()=>{const _0x581926=_0x1f23d2;_0x393b6d['respawnTimer']=null;if(_0x59fc5b||_0x393b6d['dead'])return;const _0x31ec65=_0x226fb2(_0xca82e5);_0x31ec65[_0x581926(0x1ab)](_0x581926(0x185),()=>{const _0x293355=_0x581926;if(_0x2e9e0f[_0x293355(0x195)](_0xca82e5)===_0x393b6d)_0x393b6d['consecutiveFailures']=0x0;});},_0x22cbd1),_0x393b6d[_0x1f23d2(0x200)][_0x1f23d2(0x181)]?.();});const _0x4f36d0=[..._0x485219[_0x5aef5f(0x100)]()];console[_0x5aef5f(0x201)](_0x5aef5f(0xeb)+process[_0x5aef5f(0x2af)]+'\x20forked\x20'+_0x3a1812+_0x5aef5f(0x176)+_0x535fc1+':\x20'+('['+_0x4f36d0[_0x5aef5f(0x1f9)](',\x20')+']'));const _0x27939b={'_isClusterController':!![],'port':_0x535fc1,'primaryOkdb':_0x2eed88??null,'status'(){const _0x253c34=_0x5aef5f;return{'clustered':!![],'primaryPid':process[_0x253c34(0x2af)],'port':_0x535fc1,'primaryRole':_0x2eed88?.[_0x253c34(0x140)]??null,'processorPid':null,'supervisorPid':process[_0x253c34(0x2af)],'workers':[..._0x485219['values']()]['map'](({worker:_0x24f4ff})=>({'pid':_0x24f4ff[_0x253c34(0x1a3)][_0x253c34(0x2af)],'id':_0x24f4ff['id'],'dead':_0x24f4ff[_0x253c34(0x204)]()}))};},async 'close'(){const _0x5b564b=_0x5aef5f;_0x59fc5b=!![];for(const _0x59ee9c of _0x2e9e0f[_0x5b564b(0x251)]()){_0x59ee9c[_0x5b564b(0x1b7)]=!![],_0x59ee9c[_0x5b564b(0x200)]&&(clearTimeout(_0x59ee9c['respawnTimer']),_0x59ee9c[_0x5b564b(0x200)]=null);}clearInterval(_0x4a734d),_0x543c4a[_0x5b564b(0x193)]('message',_0x3b13ff),_0x543c4a[_0x5b564b(0x193)](_0x5b564b(0x262),_0x332460),_0x2eed88?.['events']?.['off']?.(_0x21a053['SYSTEM_PROC'],_0x4707f8);if(_0x2eed88?.[_0x5b564b(0x21e)]?.['off'])for(const {event:_0x22a15d,handler:_0x232203}of _0x2deeb9){try{_0x2eed88[_0x5b564b(0x21e)][_0x5b564b(0x193)](_0x22a15d,_0x232203);}catch{}}_0x2deeb9[_0x5b564b(0x1c4)]=0x0;const _0x56fe1a=[..._0x485219[_0x5b564b(0x251)]()][_0x5b564b(0x284)](({worker:_0x476218})=>_0x476218);if(_0x56fe1a[_0x5b564b(0x1c4)]===0x0)return;await Promise[_0x5b564b(0x12c)](_0x56fe1a[_0x5b564b(0x284)](_0x163293=>new Promise(_0x40342b=>{const _0xb6aa0d=_0x5b564b;if(_0x163293[_0xb6aa0d(0x204)]()){_0x40342b();return;}let _0x518a96=![];const _0x3c63d5=()=>{if(_0x518a96)return;_0x518a96=!![];if(_0xa97082)clearTimeout(_0xa97082);_0x40342b();};_0x163293['once'](_0xb6aa0d(0x180),_0x3c63d5);const _0xa97082=setTimeout(()=>{const _0x1daf51=_0xb6aa0d;try{_0x163293[_0x1daf51(0x1a3)]['kill']();}catch{}},_0x2c38ab+0x1f4);_0xa97082['unref']?.();try{_0x163293[_0xb6aa0d(0x11d)]();}catch{try{_0x163293['process']['kill']();}catch{}}})));}};return _0x27939b;}async function _0x4b6aec({makeOkdb:_0x3c2ac5,port:_0x22299c}){const _0x302ab5=_0x47f2b0,_0xb6bcb6=await _0x3c2ac5();return _0x2f6db0(_0xb6bcb6),_0xb6bcb6[_0x302ab5(0x103)][_0x302ab5(0x1fe)](_0x22299c);}function _0x2f6db0(_0x1ec54d){const _0x36fc69=_0x47f2b0;if(!_0x1ec54d||_0x1ec54d[_0x36fc69(0x285)])return;_0x1ec54d[_0x36fc69(0x285)]=!![];try{const {OKDBChangefeed:_0x21e40f}=requireOkdbChangefeed(),_0x46f494=_0x1ec54d[_0x36fc69(0xd7)];if(_0x46f494&&typeof _0x46f494[_0x36fc69(0x2bc)]===_0x36fc69(0x226)){const _0x495e00=new _0x21e40f(_0x1ec54d);_0x495e00[_0x36fc69(0x1c6)](),_0x46f494['attachFeed'](_0x495e00),_0x1ec54d[_0x36fc69(0x22c)]=_0x495e00;}}catch(_0x9c4cdd){_0x1ec54d[_0x36fc69(0x201)]?.[_0x36fc69(0x1dd)]?.(_0x36fc69(0x24a)+(_0x9c4cdd?.[_0x36fc69(0x262)]??_0x9c4cdd),{'feature':_0x36fc69(0x1bc)});}const _0x483b01=_0x218d9b=>{const _0x2ce55a=_0x36fc69;if(!_0x218d9b||typeof _0x218d9b!==_0x2ce55a(0x112)||_0x218d9b[_0x591097]==null)return;if(_0x218d9b[_0x591097]===_0x28e962)try{_0x1ec54d[_0x2ce55a(0xd7)]?.[_0x2ce55a(0x2c4)]?.(_0x218d9b[_0x2ce55a(0x17e)],_0x218d9b['data']);}catch{}};process['on'](_0x36fc69(0x262),_0x483b01),_0x1ec54d['_clusterOnMessage']=_0x483b01;{let _0x566821=process[_0x36fc69(0x191)](),_0x16a2f4=Date[_0x36fc69(0x219)]();const _0x5f7d49=()=>{const _0x3ae4f7=_0x36fc69;if(typeof process[_0x3ae4f7(0x148)]!==_0x3ae4f7(0x226)||!process[_0x3ae4f7(0x293)])return;const _0x2bb5c1=Date[_0x3ae4f7(0x219)](),_0x5b100e=process[_0x3ae4f7(0x191)](),_0x1b1f87=(_0x2bb5c1-_0x16a2f4)*0x3e8,_0x126ab1=_0x5b100e['user']-_0x566821['user']+(_0x5b100e[_0x3ae4f7(0x24b)]-_0x566821[_0x3ae4f7(0x24b)]),_0x5758b5=_0x1b1f87>0x0?Math[_0x3ae4f7(0x203)](0x64,Math['round'](_0x126ab1/(_0x1b1f87*(_0x586975['cpus']()['length']||0x1))*0x64)):0x0;_0x566821=_0x5b100e,_0x16a2f4=_0x2bb5c1;const _0x38d899=process[_0x3ae4f7(0x144)]();let _0x10d0b1=null;try{_0x10d0b1=_0x1ec54d[_0x3ae4f7(0x140)]?.[_0x3ae4f7(0x124)]?_0x1ec54d[_0x3ae4f7(0x182)]?.[_0x3ae4f7(0xb6)]?.()??null:null;}catch{}try{process['send']({[_0x591097]:_0xb6ef70,'stats':{'rss':_0x38d899['rss'],'heapUsed':_0x38d899[_0x3ae4f7(0xa9)],'heapTotal':_0x38d899[_0x3ae4f7(0x1bb)],'external':_0x38d899['external'],'cpuPct':_0x5758b5,'cpuWindowMs':Math[_0x3ae4f7(0x2c9)](_0x1b1f87/0x3e8)||null},'processing':_0x10d0b1});}catch{}},_0x1662ae=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0xeca21d=setInterval(_0x5f7d49,_0x1662ae);_0xeca21d[_0x36fc69(0x181)]?.(),_0x5f7d49();for(const _0x5cdf6a of['processor:paused',_0x36fc69(0x14f)]){_0x1ec54d[_0x36fc69(0x21e)]?.['on']?.(_0x5cdf6a,()=>{try{_0x5f7d49();}catch{}});}}let _0x224ba1=![];const _0x114851=async _0x199503=>{const _0x438683=_0x36fc69;if(_0x224ba1)return;_0x224ba1=!![];const _0x30f230=setTimeout(()=>process[_0x438683(0x180)](_0x199503),_0x2c38ab);_0x30f230[_0x438683(0x181)]?.();try{await _0x1ec54d[_0x438683(0x1ef)]?.();}catch{}process[_0x438683(0x180)](_0x199503);};process['on'](_0x36fc69(0x11d),()=>_0x114851(0x0));if(process['platform']!==_0x36fc69(0x186)){const _0x25e410=setInterval(()=>{const _0x3b3969=_0x36fc69;if(process[_0x3b3969(0x2b1)]===0x1)_0x114851(0x0);},_0x54da0a);_0x25e410['unref']?.(),_0x1ec54d['_clusterOrphanWatch']=_0x25e410;}}return okdbCluster={'runClustered':_0xe9b296,'attachWorkerCluster':_0x2f6db0},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x835cbc=require$$0$5,{attachWorkerCluster:_0x3c7a3a}=requireOkdbCluster();async function _0x4921e7(){const _0x2cd1b2=_0x30d0,_0x1ad461=process.env.OKDB_HTTP_CHILD;if(!_0x1ad461)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0xd56a9b,port:_0x4d0344,options:options={},logLevel:logLevel=_0x2cd1b2(0x15d)}=JSON[_0x2cd1b2(0x1cb)](_0x1ad461);if(!_0xd56a9b||!_0x4d0344)throw new Error(_0x2cd1b2(0x2bb));const _0x2753d3=new _0x835cbc(_0xd56a9b,{...options,'engines':![],'processors':![],'compaction':![]});_0x2753d3[_0x2cd1b2(0x201)][_0x2cd1b2(0x292)]?.();const _0x51e214=process.env.OKDB_CLUSTER_SLOT??'?',_0x1a16ae={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3a7a04=_0x1a16ae[logLevel]??_0x1a16ae[_0x2cd1b2(0x15d)];_0x2753d3['log'][_0x2cd1b2(0x1d8)](_0x39083e=>{const _0xe8de14=_0x2cd1b2;if((_0x1a16ae[_0x39083e[_0xe8de14(0x2a4)]]??0x1)<_0x3a7a04)return;try{process[_0xe8de14(0x148)]?.({'__okdbCluster':_0xe8de14(0x201),'slot':_0x51e214,'pid':process['pid'],'entry':_0x39083e});}catch{}}),await _0x2753d3['open'](),_0x3c7a3a(_0x2753d3),await _0x2753d3['http']['listen'](_0x4d0344);}return _0x4921e7()['catch'](_0x539054=>{const _0x5999e3=_0x30d0;try{process[_0x5999e3(0x148)]?.({'__okdbCluster':_0x5999e3(0x201),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x5999e3(0x2af)],'entry':{'level':'error','msg':_0x5999e3(0x2ca)+(_0x539054?.[_0x5999e3(0x262)]??_0x539054)}});}catch{}process[_0x5999e3(0x180)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x74f0a9(0x271)]=okdbHttpWorkerChild;
1
+ 'use strict';const _0x204085=_0x10a2;(function(_0x3b8fd3,_0x47dc9b){const _0x232fe1=_0x10a2,_0x2030e9=_0x3b8fd3();while(!![]){try{const _0x1b4d00=parseInt(_0x232fe1(0x1ee))/0x1+-parseInt(_0x232fe1(0x28d))/0x2*(parseInt(_0x232fe1(0x1c0))/0x3)+-parseInt(_0x232fe1(0x2b4))/0x4+parseInt(_0x232fe1(0xcb))/0x5+parseInt(_0x232fe1(0x136))/0x6*(-parseInt(_0x232fe1(0xa3))/0x7)+parseInt(_0x232fe1(0xe9))/0x8+parseInt(_0x232fe1(0xfb))/0x9*(parseInt(_0x232fe1(0x2b9))/0xa);if(_0x1b4d00===_0x47dc9b)break;else _0x2030e9['push'](_0x2030e9['shift']());}catch(_0x2dac16){_0x2030e9['push'](_0x2030e9['shift']());}}}(_0x3e77,0xb3e9f));function _0x10a2(_0x11255f,_0x24657f){_0x11255f=_0x11255f-0x92;const _0x3e77ca=_0x3e77();let _0x10a286=_0x3e77ca[_0x11255f];return _0x10a286;}var require$$0$5=require(_0x204085(0xe3)),require$$1$1=require('cluster'),require$$1=require(_0x204085(0x1a5)),require$$0$3=require('os'),require$$2=require(_0x204085(0x13e)),require$$0=require(_0x204085(0x13d)),require$$0$2=require(_0x204085(0x142)),require$$0$1=require('fs'),require$$0$4=require(_0x204085(0x185));function getDefaultExportFromCjs(_0x4bdf05){const _0x3ae8d9=_0x204085;return _0x4bdf05&&_0x4bdf05['__esModule']&&Object[_0x3ae8d9(0x1f1)][_0x3ae8d9(0x1d4)][_0x3ae8d9(0x171)](_0x4bdf05,'default')?_0x4bdf05[_0x3ae8d9(0x97)]:_0x4bdf05;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x6b5b7=_0x204085;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x1b3326={'PUT':_0x6b5b7(0x1b9),'REMOVE':_0x6b5b7(0x28f),'INDEX_DROP':_0x6b5b7(0x20f),'INDEX_REGISTER':_0x6b5b7(0x124),'INDEX_RESET':_0x6b5b7(0x1ed),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x6b5b7(0x13b),'FTS_REGISTER':_0x6b5b7(0x283),'FTS_DROP':_0x6b5b7(0x16b),'FTS_RESET':_0x6b5b7(0x2be),'SCHEMA_SET':_0x6b5b7(0x19d),'SCHEMA_DROP':_0x6b5b7(0x1a7),'TTL_SET':'setTtl','TTL_CLEAR':_0x6b5b7(0x196)},_0x1dd0f1={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x6b5b7(0x24e),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x6b5b7(0xe7),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x6b5b7(0x20c),'SYSTEM_TYPE_DROP':_0x6b5b7(0x25c),'SYSTEM_PROC':_0x6b5b7(0x1f6),'SYSTEM_BUS_STATE_CHANGE':_0x6b5b7(0x21f),'ITEM_CREATE':_0x6b5b7(0x220),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':_0x6b5b7(0x132),'INDEX_READY':_0x6b5b7(0x18d),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x6b5b7(0x1af),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x6b5b7(0xd1),'FTS_REGISTERED':_0x6b5b7(0x292),'FTS_DROP':'fts:drop','FTS_RESET':_0x6b5b7(0x104),'SCHEMA_SET':_0x6b5b7(0x1f0),'SCHEMA_DROP':_0x6b5b7(0xcd),'UNIQUE_VIOLATION':_0x6b5b7(0x1ad),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x6b5b7(0x1cd),'REF_VIOLATION_RESOLVED':_0x6b5b7(0x10e),'SYNC_APPLY':_0x6b5b7(0x2aa),'TXN_START':_0x6b5b7(0x1ec),'TXN_END':_0x6b5b7(0xeb),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x6b5b7(0x12c),'ENV_OPENED':_0x6b5b7(0x2a6),'ENV_REMOVED':_0x6b5b7(0x1ca),'SYSTEM_ENV_RELEASE':_0x6b5b7(0xd6),'TTL_EXPIRED':_0x6b5b7(0x112),'TTL_SET':_0x6b5b7(0xaa),'TTL_CLEAR':_0x6b5b7(0x27c),'LICENSE_INVALID':_0x6b5b7(0x2b1),'LICENSE_ADDED':_0x6b5b7(0x145),'LICENSE_ACTIVATED':_0x6b5b7(0x2a0),'LICENSE_REMOVED':_0x6b5b7(0x281)},_0x203439={'CREATING':'creating','RESETTING':_0x6b5b7(0x248),'READY':'ready','DROPPING':_0x6b5b7(0x22f),'WAITING':_0x6b5b7(0xd2),'ERROR':_0x6b5b7(0x119)},_0x5631e5={'CREATED':_0x6b5b7(0xe2),'STARTING':'starting','STARTED':_0x6b5b7(0xaf),'STOPPING':_0x6b5b7(0x298),'STOPPED':_0x6b5b7(0x1c9)},_0x5a1dde={'CREATING':_0x6b5b7(0x1e2),'READY':_0x6b5b7(0x169),'HALTED':'halted','STOPPED':_0x6b5b7(0x1c9),'RESETTING':_0x6b5b7(0x248)},_0x2ef819=Object[_0x6b5b7(0x23b)]({'POKE':_0x6b5b7(0x265),'DRAIN':_0x6b5b7(0x1d6),'TYPE_DROP':'bus:type_drop','PROC':_0x6b5b7(0x157),'ENV_RELEASE':_0x6b5b7(0xca)});return okdbEnums={'BUS_EVENTS':_0x2ef819,'CHANGE_ACTIONS':_0x1b3326,'EVENTS':_0x1dd0f1,'INDEX_STATE':_0x203439,'OKDB_STATE':_0x5631e5,'VIEW_STATE':_0x5a1dde},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0xe8b8cd=_0x204085;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x21c403,performance:_0x2c2b80}=require$$0,_0x24810e=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x320d34=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x35fbfb=process.env.OKDB_LOOP_LAG_ALL==='1',_0x3ded14=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x417ebd{constructor(){const _0x387715=_0x10a2;this[_0x387715(0x21b)]=_0x24810e,this['_buckets']=new Map(),this['_h']=null,this['_timer']=null,this[_0x387715(0x1b8)]=![],this[_0x387715(0x246)]=(_0x3ad097,_0x130ac0)=>process[_0x387715(0x110)][_0x387715(0x226)](_0x3ad097+(_0x130ac0?'\x20'+JSON[_0x387715(0xc4)](_0x130ac0):'')+'\x0a');}[_0xe8b8cd(0xef)](){const _0xb56dcd=_0xe8b8cd;return _0x2c2b80[_0xb56dcd(0xef)]();}['setLogger'](_0x548e76){const _0x468cbf=_0xe8b8cd;if(typeof _0x548e76==='function')this[_0x468cbf(0x246)]=_0x548e76;}[_0xe8b8cd(0x21e)](_0x4f52e8,_0x13da61,_0x443af0){const _0x405f69=_0xe8b8cd;if(!this[_0x405f69(0x21b)])return;let _0x5917f0=this[_0x405f69(0x291)][_0x405f69(0x162)](_0x4f52e8);!_0x5917f0&&(_0x5917f0={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x405f69(0x291)][_0x405f69(0x198)](_0x4f52e8,_0x5917f0)),_0x5917f0['ms']+=_0x13da61,_0x5917f0[_0x405f69(0x92)]+=0x1,_0x13da61>_0x5917f0[_0x405f69(0xe4)]&&(_0x5917f0[_0x405f69(0xe4)]=_0x13da61,_0x5917f0[_0x405f69(0x1e6)]=_0x443af0||'');}['start'](_0x2d23d0){const _0x46c48f=_0xe8b8cd;if(!this[_0x46c48f(0x21b)]||this[_0x46c48f(0x1b8)])return;this['_started']=!![];if(_0x2d23d0)this[_0x46c48f(0x246)]=_0x2d23d0;this['_h']=_0x21c403({'resolution':0xa}),this['_h'][_0x46c48f(0x9e)](),this[_0x46c48f(0x1e4)]=setInterval(()=>this['_report'](),_0x320d34);if(this[_0x46c48f(0x1e4)][_0x46c48f(0x113)])this[_0x46c48f(0x1e4)]['unref']();}[_0xe8b8cd(0xd0)](_0x4cffc8){const _0x3c98be=_0xe8b8cd;if(!this[_0x3c98be(0xc8)])this[_0x3c98be(0xc8)]=new Set();this[_0x3c98be(0xc8)]['add'](_0x4cffc8);if(!this['_started'])this[_0x3c98be(0xfa)]();}[_0xe8b8cd(0x13f)](_0x56491e){const _0x462563=_0xe8b8cd;this[_0x462563(0xc8)]?.[_0x462563(0x15a)](_0x56491e);}[_0xe8b8cd(0xfa)](){const _0x175e8a=_0xe8b8cd;if(this['_admissionStarted'])return;this[_0x175e8a(0xab)]=!![];!this['_h']&&(this['_h']=_0x21c403({'resolution':0xa}),this['_h'][_0x175e8a(0x9e)]());const _0x3a0833=_0x320d34;this[_0x175e8a(0xbf)]=setInterval(()=>{const _0x378077=_0x175e8a,_0x4e4b74=this['_h'];if(!_0x4e4b74)return;const _0x1b51f8=_0x4e4b74['percentile'](0x63)/0xf4240,_0x580c5e=_0x4e4b74[_0x378077(0x121)]/0xf4240,_0x12a612=_0x4e4b74[_0x378077(0x181)]/0xf4240;_0x4e4b74['reset']();if(this[_0x378077(0xc8)])for(const _0x186115 of this[_0x378077(0xc8)]){try{_0x186115({'p99Ms':_0x1b51f8,'maxMs':_0x580c5e,'meanMs':_0x12a612,'reportMs':_0x3a0833});}catch{}}},_0x3a0833);if(this[_0x175e8a(0xbf)]['unref'])this[_0x175e8a(0xbf)][_0x175e8a(0x113)]();}[_0xe8b8cd(0x191)](){const _0x400eb9=_0xe8b8cd,_0x3e206c=this['_h'],_0x5d6ac7=_0x3e206c['max']/0xf4240,_0x259856=_0x3e206c[_0x400eb9(0x263)](0x63)/0xf4240,_0x5a3b93=_0x3e206c[_0x400eb9(0x181)]/0xf4240;_0x3e206c['reset']();const _0x1fd294=[...this['_buckets'][_0x400eb9(0x252)]()][_0x400eb9(0x280)](([_0x5ce88e,_0x104c77])=>({'label':_0x5ce88e,..._0x104c77}))[_0x400eb9(0xb3)]((_0x4fe1d3,_0x2dfe8f)=>_0x2dfe8f['ms']-_0x4fe1d3['ms'])[_0x400eb9(0x278)](0x0,0x8);this['_buckets']['clear']();const _0x492f83=_0x1fd294[_0x400eb9(0xbd)]((_0x137a1a,_0x44f5f7)=>_0x137a1a+_0x44f5f7['ms'],0x0),_0x3435bf=_0x1fd294[_0x400eb9(0x280)](_0x55c64a=>_0x55c64a[_0x400eb9(0x94)]+'='+_0x55c64a['ms'][_0x400eb9(0x288)](0x0)+_0x400eb9(0x223)+_0x55c64a['count']+(_0x55c64a['maxMs']>0x5?_0x400eb9(0x10d)+_0x55c64a[_0x400eb9(0xe4)][_0x400eb9(0x288)](0x0)+'ms'+(_0x55c64a[_0x400eb9(0x1e6)]?'\x20'+_0x55c64a[_0x400eb9(0x1e6)]:'')+')':''));(_0x35fbfb||_0x5d6ac7>=_0x3ded14)&&this[_0x400eb9(0x246)](_0x400eb9(0x1f9)+_0x320d34+_0x400eb9(0x9d)+_0x5d6ac7[_0x400eb9(0x288)](0x0)+'ms\x20p99='+_0x259856[_0x400eb9(0x288)](0x0)+'ms\x20mean='+_0x5a3b93[_0x400eb9(0x288)](0x0)+_0x400eb9(0x258)+_0x492f83[_0x400eb9(0x288)](0x0)+'ms'+(_0x3435bf[_0x400eb9(0xf6)]?_0x400eb9(0x247)+_0x3435bf[_0x400eb9(0x1f5)]('\x20\x20'):''),{'feature':'loop-lag'});if(this['_windowCbs'])for(const _0x2ebd80 of this[_0x400eb9(0xc8)]){try{_0x2ebd80({'p99Ms':_0x259856,'maxMs':_0x5d6ac7,'meanMs':_0x5a3b93,'reportMs':_0x320d34});}catch{}}}[_0xe8b8cd(0x26b)](){const _0x445f7e=_0xe8b8cd;if(this['_timer'])clearInterval(this[_0x445f7e(0x1e4)]);if(this['_h'])this['_h'][_0x445f7e(0xcf)]();this[_0x445f7e(0x1e4)]=null,this['_h']=null,this[_0x445f7e(0x1b8)]=![];}}const _0x42c623=new _0x417ebd();if(_0x42c623['enabled'])_0x42c623['start']();return okdbLoopMonitor={'LOOP':_0x42c623},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x722895=require$$0$1,_0x208d94=require$$1;let _0x296a1f,_0xf602ad,_0x2dbe2e,_0x202c0a,_0x438952,_0x1db0d4,_0x4eed6b,_0x38f26f=![];const _0x5ce6ad=new Set();let _0x147465=null;const _0x4840e8=new Map();function _0x569eb7(){const _0x107a16=_0x10a2;if(_0x296a1f!==undefined)return _0x296a1f;_0x296a1f=process.env.OKDB_DIAG==='1';if(!_0x296a1f)return![];_0xf602ad=process.env.OKDB_DIAG_STACK==='1',_0x202c0a=Math[_0x107a16(0x121)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x2dbe2e=new Array(_0x202c0a),_0x438952=0x0,_0x1db0d4=0x0,_0x4eed6b=process.env.OKDB_DIAG_DIR||null;if(_0x4eed6b)try{_0x722895[_0x107a16(0x28a)](_0x4eed6b,{'recursive':!![]});}catch{}return!![];}function _0x44e885(){return _0x296a1f===undefined?_0x569eb7():_0x296a1f;}function _0x80ad7f(_0x3d5c97,_0x82566a){const _0x3e1b12=_0x10a2;if(_0x296a1f===undefined?!_0x569eb7():!_0x296a1f)return;let _0x1e4980;if(_0xf602ad){const _0x58bbb8=new Error()[_0x3e1b12(0xa6)]||'';_0x1e4980=_0x58bbb8[_0x3e1b12(0x2bd)]('\x0a')[_0x3e1b12(0x278)](0x3)[_0x3e1b12(0x280)](_0x216147=>_0x216147['trim']())[_0x3e1b12(0x17c)](Boolean)['slice'](0x0,0x8);}_0x2dbe2e[_0x438952]={'seq':_0x1db0d4++,'t':Date[_0x3e1b12(0xef)](),'env':_0x3d5c97,'kind':_0x82566a||_0x3e1b12(0x1fc),'stack':_0x1e4980},_0x438952=(_0x438952+0x1)%_0x202c0a;}function _0x1bcf95(_0x3ab37f){const _0x23a6a4=_0x10a2,_0x11a80e=[];for(let _0xf0ef08=0x0;_0xf0ef08<_0x202c0a;_0xf0ef08++){const _0x3dac4e=_0x2dbe2e[(_0x438952-0x1-_0xf0ef08+_0x202c0a*0x2)%_0x202c0a];if(!_0x3dac4e)continue;_0x11a80e[_0x23a6a4(0x159)](_0x3dac4e);if(_0x11a80e[_0x23a6a4(0xf6)]>=_0x3ab37f)break;}return _0x11a80e;}function _0x46ba7f(_0x425bfd){const _0x3cb7ff=_0x10a2;try{process[_0x3cb7ff(0x110)][_0x3cb7ff(0x226)](_0x425bfd+'\x0a');}catch{}if(_0x4eed6b)try{_0x722895[_0x3cb7ff(0x147)](_0x208d94[_0x3cb7ff(0x1f5)](_0x4eed6b,_0x3cb7ff(0x202)+process['pid']+_0x3cb7ff(0x1c4)),_0x425bfd+'\x0a');}catch{}}function _0x3a4797(_0x1e8bb8){const _0x558d24=_0x10a2,_0x4ff7ea=_0x1bcf95(_0x1e8bb8);if(!_0x4ff7ea[_0x558d24(0xf6)])return _0x558d24(0xa5);const _0x2cdce9=Date[_0x558d24(0xef)]();return _0x4ff7ea['map'](_0x4d2b30=>{const _0x11c1f3=_0x558d24,_0x77004=_0x11c1f3(0x209)+_0x4d2b30[_0x11c1f3(0x2ab)]+'\x20-'+(_0x2cdce9-_0x4d2b30['t'])+_0x11c1f3(0x138)+_0x4d2b30['env']+'\x20'+_0x4d2b30['kind'];return _0x4d2b30[_0x11c1f3(0xa6)]&&_0x4d2b30[_0x11c1f3(0xa6)]['length']?_0x77004+_0x11c1f3(0x118)+_0x4d2b30[_0x11c1f3(0xa6)][_0x11c1f3(0x1f5)](_0x11c1f3(0x118)):_0x77004;})[_0x558d24(0x1f5)]('\x0a');}function _0x2d8111(_0x39f45e,_0x20ce1b){const _0x535a83=_0x10a2,_0x349ae7=_0x535a83(0x15f)+_0x39f45e+'\x20@\x20'+new Date()['toISOString']()+_0x535a83(0x1f2)+process[_0x535a83(0xf3)]+_0x535a83(0x25a),_0x1261be=[_0x349ae7,_0x535a83(0x2b0)+(_0x20ce1b&&_0x20ce1b[_0x535a83(0xa6)]?_0x20ce1b[_0x535a83(0xa6)]['split']('\x0a')[0x0]:_0x20ce1b),_0x535a83(0x284)+(_0xf602ad?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x3a4797(0x18),_0x3a8273(),'='['repeat'](_0x349ae7['length']-0x1)];_0x46ba7f(_0x1261be[_0x535a83(0x1f5)]('\x0a'));}function _0x35da77(_0x3caeb1){const _0xf62da3=_0x10a2;if(!_0x44e885())return;const _0x155458=String(_0x3caeb1&&_0x3caeb1[_0xf62da3(0x230)]||_0x3caeb1||''),_0x50942b=/already closed|environment is already|invalid read txn|reset an invalid/i[_0xf62da3(0xea)](_0x155458);_0x2d8111(_0x50942b?_0xf62da3(0xc2):_0xf62da3(0x294),_0x3caeb1);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x50942b)return;try{console['error'](_0x3caeb1&&_0x3caeb1[_0xf62da3(0xa6)]?_0x3caeb1[_0xf62da3(0xa6)]:_0x3caeb1);}catch{}process[_0xf62da3(0x232)](0x1);}function _0x2e57fd(_0x3aee4d){const _0x504999=_0x10a2;if(!_0x44e885())return;const _0x571a34=String(_0x3aee4d&&_0x3aee4d[_0x504999(0x230)]||_0x3aee4d||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x504999(0xea)](_0x571a34)&&_0x2d8111('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x3aee4d);}function _0x3a8273(){const _0x3f4f16=_0x10a2,_0x4b6d71=[_0x3f4f16(0x22d)];let _0x539060=![];for(const _0x1545f1 of _0x5ce6ad){const _0x44744f=_0x1545f1&&_0x1545f1['_envs'];if(!_0x44744f)continue;for(const [_0x5f22a0,_0x5d6303]of _0x44744f){const _0x50fa40=_0x5d6303&&_0x5d6303[_0x3f4f16(0x14a)]&&_0x5d6303['_coordinator']['view'];if(!_0x50fa40)continue;let _0x49059c,_0x372d9b;try{_0x49059c=Atomics['load'](_0x50fa40,0x0),_0x372d9b=Atomics[_0x3f4f16(0x27e)](_0x50fa40,0x1);}catch{continue;}if(_0x49059c===0x0)continue;_0x539060=!![];const _0x4b9d56=_0x49059c>0x0?_0x3f4f16(0xdd):'copy',_0x1b25e5=Date[_0x3f4f16(0xef)]()-Math['abs'](_0x49059c)*0x3e8,_0x26b3ef=((()=>{const _0x503efa=_0x3f4f16;try{return _0x5d6303[_0x503efa(0x140)]&&_0x5d6303[_0x503efa(0x140)][_0x503efa(0x16f)]?_0x5d6303['_writer'][_0x503efa(0x16f)]():null;}catch{return null;}})());_0x4b6d71[_0x3f4f16(0x159)](_0x3f4f16(0x207)+_0x5f22a0+_0x3f4f16(0x144)+_0x4b9d56+_0x3f4f16(0x13c)+_0x1b25e5+_0x3f4f16(0x1ea)+_0x372d9b+(_0x26b3ef?_0x3f4f16(0x14d)+_0x26b3ef[_0x3f4f16(0x168)]+_0x3f4f16(0x1a8)+_0x26b3ef['oldestPendingMs']+'\x20parkedNow='+_0x26b3ef[_0x3f4f16(0x1b6)]+'}':''));}}if(!_0x539060)_0x4b6d71[_0x3f4f16(0x159)](_0x3f4f16(0x219));return _0x4b6d71[_0x3f4f16(0x1f5)]('\x0a');}function _0xccd258(){const _0x3bc311=_0x10a2;if(!_0x44e885())return;const _0xacad9=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x535697=Date['now']();for(const _0x39606f of _0x5ce6ad){const _0x518d68=_0x39606f&&_0x39606f[_0x3bc311(0xba)];if(!_0x518d68)continue;for(const [_0x4326e6,_0x312adc]of _0x518d68){const _0x526b65=_0x312adc&&_0x312adc[_0x3bc311(0x14a)]&&_0x312adc[_0x3bc311(0x14a)][_0x3bc311(0x1f4)];if(!_0x526b65)continue;let _0x79756a;try{_0x79756a=Atomics[_0x3bc311(0x27e)](_0x526b65,0x0);}catch{continue;}const _0x14c840=_0x39606f[_0x3bc311(0x1a5)]+'|'+_0x4326e6;if(_0x79756a<=0x0){_0x4840e8['delete'](_0x14c840);continue;}const _0x1a3428=_0x535697-_0x79756a*0x3e8,_0x36e6a=_0x4840e8[_0x3bc311(0x162)](_0x14c840);if(_0x1a3428<_0xacad9)continue;if(_0x36e6a&&_0x535697-_0x36e6a[_0x3bc311(0x98)]<_0xacad9)continue;_0x4840e8[_0x3bc311(0x198)](_0x14c840,{'firstTs':_0x36e6a?_0x36e6a[_0x3bc311(0x105)]:_0x79756a,'dumpedAt':_0x535697});const _0x2e1644=_0x3bc311(0xa7)+_0x1a3428+_0x3bc311(0x208)+_0x4326e6+_0x3bc311(0x2a3)+new Date()['toISOString']()+_0x3bc311(0x1f2)+process['pid']+'\x20===';_0x46ba7f([_0x2e1644,_0x3a8273(),'='[_0x3bc311(0x10a)](_0x2e1644[_0x3bc311(0xf6)]-0x1)][_0x3bc311(0x1f5)]('\x0a'));}}}function _0x32bba9(){const _0x399ae5=_0x10a2;if(!_0x44e885()||_0x38f26f)return;_0x38f26f=!![],process['prependListener']('uncaughtException',_0x35da77),process[_0x399ae5(0x18c)](_0x399ae5(0x19a),_0x2e57fd);const _0x119c42=Math[_0x399ae5(0x121)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x147465=setInterval(_0xccd258,_0x119c42);if(_0x147465[_0x399ae5(0x113)])_0x147465[_0x399ae5(0x113)]();}function _0x21e7b7(_0x376177){const _0x18bc09=_0x10a2;if(!_0x44e885()||!_0x376177)return;_0x5ce6ad[_0x18bc09(0x15d)](_0x376177),_0x32bba9();}function _0x380fd8(_0x495c4e){const _0x19ac04=_0x10a2;_0x5ce6ad[_0x19ac04(0x15a)](_0x495c4e);}function _0x1b1b05(){if(!_0x44e885())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0xf602ad,'recentWrites':_0x1bcf95(0x10),'drain':_0x3a8273()};}return okdbDiag={'isEnabled':_0x44e885,'recordWrite':_0x80ad7f,'installDiag':_0x32bba9,'registerOkdb':_0x21e7b7,'unregisterOkdb':_0x380fd8,'snapshot':_0x1b1b05},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x1f15d6=_0x204085;if(hasRequiredOkdbWriter)return okdbWriter[_0x1f15d6(0x9a)];hasRequiredOkdbWriter=0x1;const {performance:_0x1254ae}=require$$0$2,_0x525c23=requireOkdbDiag(),_0x4317b0=process.env.OKDB_COMMIT_MODE==='sync';class _0x5d10b5{constructor(_0x35daa7){const _0x291294=_0x1f15d6;this[_0x291294(0x14e)]=_0x35daa7,this[_0x291294(0x192)]=new Set(),this[_0x291294(0x19f)]=new Map(),this[_0x291294(0x163)]=0x0,this[_0x291294(0x26e)]=[],this['_done']=[],this[_0x291294(0x137)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x291294(0x17b)]=0x0,this[_0x291294(0xcc)]=[],this[_0x291294(0x2a8)]=0x0,this[_0x291294(0x1e7)]=null,this[_0x291294(0x287)]=0x0,this['_nestedTotal']=0x0,this[_0x291294(0x114)]=![];}async[_0x1f15d6(0x1ac)](_0x3dde67,_0x5b59f3){const _0x110903=_0x1f15d6;if(_0x525c23[_0x110903(0x1f7)]())_0x525c23[_0x110903(0x161)](this['env']?.[_0x110903(0x271)],_0x5b59f3);if(this['_closed']){const _0x235de4=new Error(_0x110903(0x111));_0x235de4[_0x110903(0x228)]=_0x110903(0x17d);throw _0x235de4;}if(this['_highWater']>0x0){let _0x23dfc3=![];while(this['_outstanding']>=this[_0x110903(0x137)]&&!this['_closed']){!_0x23dfc3&&(_0x23dfc3=!![],this['_bpParkedTotal']++),await new Promise(_0x1df019=>this[_0x110903(0xcc)][_0x110903(0x159)](_0x1df019));}if(this['_closed']){const _0x4aad2b=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x4aad2b['code']=_0x110903(0x17d);throw _0x4aad2b;}}this[_0x110903(0x17b)]++;const _0x101443=this[_0x110903(0x14e)]['_coordinator'];for(;;){while(this['_held'])await this[_0x110903(0x1e7)];if(_0x101443)await _0x101443[_0x110903(0x148)]();if(!this[_0x110903(0x1e7)])break;if(_0x101443)_0x101443[_0x110903(0x16e)]();}if(this[_0x110903(0x24f)]){if(_0x101443)_0x101443[_0x110903(0x16e)]();this[_0x110903(0x17b)]--;if(this[_0x110903(0xcc)][_0x110903(0xf6)]&&this[_0x110903(0x17b)]<this[_0x110903(0x137)])this[_0x110903(0xcc)]['shift']()();const _0x5a4eeb=new Error(_0x110903(0x111));_0x5a4eeb[_0x110903(0x228)]='ENV_CLOSING_RETRY';throw _0x5a4eeb;}const _0x230214=_0x1254ae[_0x110903(0xef)]();if(_0x4317b0)try{const _0x3dc609=this[_0x110903(0x14e)]['db']['transactionSync'](_0x3dde67);this[_0x110903(0x163)]++;if(this[_0x110903(0x26e)][_0x110903(0x159)](_0x1254ae[_0x110903(0xef)]()-_0x230214)>0x100)this[_0x110903(0x26e)]['shift']();if(this['_done'][_0x110903(0x159)](_0x1254ae['now']())>0x800)this['_done'][_0x110903(0x14f)]();return _0x3dc609;}finally{this[_0x110903(0x17b)]--;if(this['_bpWaiters']['length']&&this[_0x110903(0x17b)]<this[_0x110903(0x137)])this[_0x110903(0xcc)][_0x110903(0x14f)]()();if(_0x101443)_0x101443[_0x110903(0x16e)]();}let _0x30fbb6=null;const _0x536efe=()=>{const _0x409487=_0x110903,_0x2d96e0=_0x3dde67();if(_0x2d96e0&&typeof _0x2d96e0[_0x409487(0x205)]==='function'&&!_0x30fbb6){this[_0x409487(0x287)]++;let _0x5e53cf;const _0x3e873b=new Promise(_0x11f6b8=>_0x5e53cf=_0x11f6b8);this[_0x409487(0x1e7)]=_0x3e873b,_0x30fbb6=()=>{const _0x6e45b8=_0x409487;if(this[_0x6e45b8(0x1e7)]===_0x3e873b)this[_0x6e45b8(0x1e7)]=null;_0x5e53cf();};}return _0x2d96e0;};let _0x148609;try{_0x148609=this[_0x110903(0x14e)]['db'][_0x110903(0x17a)](_0x536efe);}catch(_0x96725b){_0x148609=Promise[_0x110903(0x1bf)](_0x96725b);}(!_0x148609||typeof _0x148609['then']!==_0x110903(0xf0))&&(this['_nestedTotal']++,!this[_0x110903(0x114)]&&(this['_nestedWarned']=!![],console['warn'](_0x110903(0xc5)+(this[_0x110903(0x14e)]?.['name']??'?')+_0x110903(0x274))),_0x148609=Promise[_0x110903(0x21d)](_0x148609));const _0x418288=()=>{if(_0x30fbb6)_0x30fbb6();};_0x148609[_0x110903(0x205)](_0x418288,_0x418288),this['_inflight'][_0x110903(0x15d)](_0x148609),this[_0x110903(0x19f)]['set'](_0x148609,_0x230214);const _0x3ca364=()=>{const _0x272457=_0x110903;this[_0x272457(0x192)][_0x272457(0x15a)](_0x148609),this[_0x272457(0x19f)][_0x272457(0x15a)](_0x148609),this[_0x272457(0x163)]++,this['_outstanding']--;this['_bpWaiters'][_0x272457(0xf6)]&&this[_0x272457(0x17b)]<this[_0x272457(0x137)]&&this[_0x272457(0xcc)]['shift']()();if(this['_durs']['push'](_0x1254ae[_0x272457(0xef)]()-_0x230214)>0x100)this['_durs'][_0x272457(0x14f)]();if(this['_done'][_0x272457(0x159)](_0x1254ae[_0x272457(0xef)]())>0x800)this[_0x272457(0x221)][_0x272457(0x14f)]();};_0x148609[_0x110903(0x205)](_0x3ca364,_0x3ca364);try{return await _0x148609;}finally{if(_0x101443)_0x101443[_0x110903(0x16e)]();}}[_0x1f15d6(0x16f)](){const _0x3a538c=_0x1f15d6,_0x5ed417=_0x1254ae['now']();let _0x503130=0x0;for(const _0x4fead9 of this[_0x3a538c(0x19f)][_0x3a538c(0x241)]()){const _0x5033fe=_0x5ed417-_0x4fead9;if(_0x5033fe>_0x503130)_0x503130=_0x5033fe;}let _0x1cb99a=0x0;for(let _0x53b7a0=this[_0x3a538c(0x221)][_0x3a538c(0xf6)]-0x1;_0x53b7a0>=0x0;_0x53b7a0--){if(_0x5ed417-this[_0x3a538c(0x221)][_0x53b7a0]>0x3e8)break;_0x1cb99a++;}let _0x376919=0x0;if(this['_durs']['length']){const _0x1841de=[...this['_durs']][_0x3a538c(0xb3)]((_0x8641d1,_0x3689ea)=>_0x8641d1-_0x3689ea);_0x376919=_0x1841de[Math[_0x3a538c(0x16a)](_0x1841de['length']-0x1,Math[_0x3a538c(0x295)](_0x1841de['length']*0.99))];}return{'depth':this[_0x3a538c(0x192)][_0x3a538c(0x212)],'oldestPendingMs':Math[_0x3a538c(0xb0)](_0x503130),'committed':this[_0x3a538c(0x163)],'commitsPerSec':_0x1cb99a,'commitP99Ms':Math[_0x3a538c(0xb0)](_0x376919),'parkedNow':this[_0x3a538c(0xcc)][_0x3a538c(0xf6)],'parkedTotal':this[_0x3a538c(0x2a8)],'highWater':this['_highWater']};}[_0x1f15d6(0x106)](){const _0x1f69bc=_0x1f15d6,_0x31839b=_0x1254ae[_0x1f69bc(0xef)]();return[...this[_0x1f69bc(0x19f)][_0x1f69bc(0x241)]()][_0x1f69bc(0x280)](_0x37f9c7=>Math[_0x1f69bc(0xb0)](_0x31839b-_0x37f9c7))[_0x1f69bc(0xb3)]((_0x123700,_0x26069f)=>_0x26069f-_0x123700);}['markClosed'](){const _0x24f9fc=_0x1f15d6;this[_0x24f9fc(0x24f)]=!![];for(const _0x19adfc of this[_0x24f9fc(0xcc)][_0x24f9fc(0x1b2)](0x0))_0x19adfc();}async[_0x1f15d6(0x1d9)](){const _0x37a011=_0x1f15d6;let _0x4fc81d=0x0;while(this['_inflight'][_0x37a011(0x212)]&&_0x4fc81d++<0x3e8){await Promise['allSettled']([...this[_0x37a011(0x192)]]);}}async[_0x1f15d6(0x1b9)](_0xe8d190,_0x5ed7a4,_0x23dc3e,_0x4cabe8){const _0x46ebeb=_0x1f15d6;return this['transaction'](()=>{const _0xefe652=_0x10a2;if(_0x4cabe8===undefined)_0xe8d190[_0xefe652(0x1a4)](_0x5ed7a4,_0x23dc3e);else _0xe8d190[_0xefe652(0x1a4)](_0x5ed7a4,_0x23dc3e,_0x4cabe8);},_0x46ebeb(0x195));}async[_0x1f15d6(0x28f)](_0x3d6010,_0x1bce89){const _0x852b22=_0x1f15d6;return this[_0x852b22(0x1ac)](()=>_0x3d6010['removeSync'](_0x1bce89),'raw-remove');}}async function _0x153157(_0x495c6b,_0x554d3e){const _0x32e879=_0x1f15d6;if(_0x554d3e==null)_0x554d3e=Math[_0x32e879(0x121)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x1bd3b5=_0x495c6b?.[_0x32e879(0x1a9)];if(!_0x1bd3b5||typeof _0x1bd3b5['then']!==_0x32e879(0xf0))return;await Promise['race']([Promise[_0x32e879(0x21d)](_0x1bd3b5)[_0x32e879(0x22a)](()=>{}),new Promise(_0x29129a=>{const _0x3b06d6=setTimeout(_0x29129a,_0x554d3e);if(_0x3b06d6['unref'])_0x3b06d6['unref']();})]);}catch{}}function _0x2bfe41(_0x27342b){const _0x3a861a=_0x1f15d6;if(_0x4317b0)return Promise['resolve']();const _0x247fdf=_0x27342b?.[_0x3a861a(0x1bc)];return _0x247fdf&&typeof _0x247fdf['then']===_0x3a861a(0xf0)?_0x247fdf:Promise['resolve']();}return okdbWriter[_0x1f15d6(0x9a)]=_0x5d10b5,okdbWriter[_0x1f15d6(0x9a)][_0x1f15d6(0x186)]=_0x153157,okdbWriter[_0x1f15d6(0x9a)][_0x1f15d6(0x1bc)]=_0x2bfe41,okdbWriter[_0x1f15d6(0x9a)][_0x1f15d6(0x2b5)]=_0x4317b0,okdbWriter[_0x1f15d6(0x9a)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x1bc2cd=_0x204085;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4b6e95=require$$0$3,{SYNC_COMMITS:_0x53f2be}=requireOkdbWriter(),_0x595bda='~lock';class _0x299c74{constructor(_0x4b5a14,_0xb7a0a7,_0x40befd){const _0x343b61=_0x10a2;this['_lock']=_0x4b5a14,this[_0x343b61(0x296)]=_0xb7a0a7,this[_0x343b61(0x165)]=_0x40befd,this[_0x343b61(0x297)]=![],this[_0x343b61(0x1c8)]=null,this['_heartbeatInFlight']=null;}[_0x1bc2cd(0x2ad)](){const _0x445398=_0x1bc2cd;if(this[_0x445398(0x297)])return![];try{const _0x38955e=this[_0x445398(0x9f)][_0x445398(0x29a)]()[_0x445398(0x162)](this[_0x445398(0x296)]);if(!_0x38955e||_0x38955e[_0x445398(0x275)]!==this['_acquiredAt'])return![];const _0x4499d5=_0x38955e[_0x445398(0xbe)]??_0x38955e[_0x445398(0x275)];if(_0x4499d5+_0x38955e[_0x445398(0xde)]<Date[_0x445398(0xef)]())return![];return!![];}catch{return!this[_0x445398(0x297)];}}[_0x1bc2cd(0x237)](){const _0x410fd4=_0x1bc2cd;if(this[_0x410fd4(0x297)])return null;try{return this[_0x410fd4(0x9f)][_0x410fd4(0x29a)]()[_0x410fd4(0x162)](this[_0x410fd4(0x296)])??null;}catch{return null;}}async['extend'](_0x1e86aa){const _0x49e9ad=_0x1bc2cd;if(this['_released'])return;try{const _0xd805a0=this['_lock']['_db']()[_0x49e9ad(0x162)](this[_0x49e9ad(0x296)]);if(!_0xd805a0||_0xd805a0[_0x49e9ad(0x275)]!==this[_0x49e9ad(0x165)])return;if(_0x53f2be)this[_0x49e9ad(0x9f)][_0x49e9ad(0x29a)]()[_0x49e9ad(0x1a4)](this[_0x49e9ad(0x296)],{..._0xd805a0,'ttlMs':_0xd805a0['ttlMs']+_0x1e86aa});else await this[_0x49e9ad(0x9f)][_0x49e9ad(0x29a)]()[_0x49e9ad(0x1b9)](this[_0x49e9ad(0x296)],{..._0xd805a0,'ttlMs':_0xd805a0['ttlMs']+_0x1e86aa});}catch{}}async[_0x1bc2cd(0x250)](){const _0x2915a7=_0x1bc2cd;if(this[_0x2915a7(0x297)])return;if(this['_heartbeatInFlight'])try{await this[_0x2915a7(0x1a0)];}catch{}clearInterval(this[_0x2915a7(0x1c8)]),this[_0x2915a7(0x1c8)]=null,this[_0x2915a7(0x297)]=!![];try{const _0x2172ac=this[_0x2915a7(0x9f)][_0x2915a7(0x29a)]()[_0x2915a7(0x162)](this[_0x2915a7(0x296)]);if(_0x2172ac&&_0x2172ac[_0x2915a7(0x275)]===this['_acquiredAt']){if(_0x53f2be)this[_0x2915a7(0x9f)][_0x2915a7(0x29a)]()[_0x2915a7(0x10f)](this[_0x2915a7(0x296)]);else await this['_lock'][_0x2915a7(0x29a)]()[_0x2915a7(0x28f)](this['_key']);}}catch{}}[_0x1bc2cd(0x14c)](_0x44783b,_0x117214){const _0x224824=_0x1bc2cd,_0x33baac=_0x117214??Math[_0x224824(0x295)](_0x44783b/0x3);this[_0x224824(0x1c8)]=setInterval(()=>{const _0x1bf096=_0x224824;if(this[_0x1bf096(0x297)])return;this[_0x1bf096(0x1a0)]=((async()=>{const _0x56eeeb=_0x1bf096;try{const _0x3d4e81=this['_lock'][_0x56eeeb(0x29a)]()[_0x56eeeb(0x162)](this[_0x56eeeb(0x296)]);if(!_0x3d4e81||_0x3d4e81[_0x56eeeb(0x275)]!==this[_0x56eeeb(0x165)]){this[_0x56eeeb(0x297)]=!![],clearInterval(this['_heartbeatTimer']),this['_heartbeatTimer']=null;return;}if(_0x53f2be)this[_0x56eeeb(0x9f)][_0x56eeeb(0x29a)]()['putSync'](this[_0x56eeeb(0x296)],{..._0x3d4e81,'updatedAt':Date[_0x56eeeb(0xef)]()});else await this[_0x56eeeb(0x9f)][_0x56eeeb(0x29a)]()[_0x56eeeb(0x1b9)](this['_key'],{..._0x3d4e81,'updatedAt':Date[_0x56eeeb(0xef)]()});}catch{}this[_0x56eeeb(0x1a0)]=null;})());},_0x33baac);if(this[_0x224824(0x1c8)]['unref'])this[_0x224824(0x1c8)][_0x224824(0x113)]();}}class _0x96781c{constructor(_0xcf3a8a,{namespace:_0x4ea465,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x52b7dc=_0x1bc2cd;this[_0x52b7dc(0xfe)]=_0xcf3a8a,this[_0x52b7dc(0x12f)]=_0x4ea465,this[_0x52b7dc(0xde)]=ttlMs,this[_0x52b7dc(0x1d7)]=heartbeatMs,this[_0x52b7dc(0xbc)]=null;}['_db'](){const _0x59da0a=_0x1bc2cd;return!this[_0x59da0a(0xbc)]&&(this['_lockDb']=this['_rawDb'][_0x59da0a(0x234)](_0x595bda,{'dupSort':![]})),this[_0x59da0a(0xbc)];}[_0x1bc2cd(0xa2)](){const _0x4243e2=_0x1bc2cd;return!this[_0x4243e2(0x201)]&&(this[_0x4243e2(0x201)]=this[_0x4243e2(0xfe)][_0x4243e2(0x234)](_0x595bda+':want',{'dupSort':![]})),this[_0x4243e2(0x201)];}['_key'](_0x263322){const _0x25acc9=_0x1bc2cd;return this[_0x25acc9(0x12f)]+':'+_0x263322;}[_0x1bc2cd(0x1ce)](_0x46b37c){const _0x29adfa=_0x1bc2cd;try{_0x53f2be?this[_0x29adfa(0xa2)]()[_0x29adfa(0x1a4)](this[_0x29adfa(0x296)](_0x46b37c),Date[_0x29adfa(0xef)]()):this['_wantDb']()[_0x29adfa(0x1b9)](this[_0x29adfa(0x296)](_0x46b37c),Date[_0x29adfa(0xef)]())?.['catch']?.(()=>{});}catch{}}[_0x1bc2cd(0x1e1)](_0x30d179,_0x20a995=0x3e8){const _0x253c5b=_0x1bc2cd;try{const _0xdb35da=this[_0x253c5b(0xa2)]()[_0x253c5b(0x162)](this[_0x253c5b(0x296)](_0x30d179));return typeof _0xdb35da===_0x253c5b(0x27d)&&Date['now']()-_0xdb35da<_0x20a995;}catch{return![];}}[_0x1bc2cd(0x1d8)](_0x544bb5){const _0xf0031=_0x1bc2cd,_0x23ca55=_0x544bb5[_0xf0031(0xbe)]??_0x544bb5[_0xf0031(0x275)];return _0x23ca55+_0x544bb5[_0xf0031(0xde)]<Date['now']();}static[_0x1bc2cd(0x240)](_0x4e7f8e){const _0x53cd51=_0x1bc2cd,_0x1805fc=_0x4e7f8e?.[_0x53cd51(0x237)];if(!_0x1805fc||typeof _0x1805fc['pid']!==_0x53cd51(0x27d))return![];if(_0x1805fc[_0x53cd51(0x1df)]!==_0x4b6e95['hostname']())return![];if(_0x1805fc[_0x53cd51(0xf3)]===process[_0x53cd51(0xf3)])return![];try{return process[_0x53cd51(0x120)](_0x1805fc['pid'],0x0),![];}catch(_0x4592c9){return _0x4592c9[_0x53cd51(0x228)]===_0x53cd51(0x1be);}}async['tryAcquire'](_0xbf7741,_0x47ecb7={},_0x338a85={}){const _0x4c6b8b=_0x1bc2cd,_0x14aef0=this[_0x4c6b8b(0x296)](_0xbf7741),_0x210ec9=_0x338a85[_0x4c6b8b(0xde)]??this[_0x4c6b8b(0xde)],_0x5a36bc=Date[_0x4c6b8b(0xef)](),_0x151c9d={'holder':{'pid':process[_0x4c6b8b(0xf3)],'hostname':_0x4b6e95[_0x4c6b8b(0x1df)](),..._0x47ecb7},'acquiredAt':_0x5a36bc,'updatedAt':_0x5a36bc,'ttlMs':_0x210ec9};let _0x293570=![],_0x5d7cfc=null;try{const _0xd83b83=()=>{const _0x3b4adb=_0x4c6b8b,_0x2a023e=this[_0x3b4adb(0x29a)]()[_0x3b4adb(0x162)](_0x14aef0);if(_0x2a023e&&!this['_isStale'](_0x2a023e)&&!_0x96781c['_holderDead'](_0x2a023e)){const _0x3aeaa7=_0x47ecb7[_0x3b4adb(0x242)]!=null&&_0x2a023e['holder'][_0x3b4adb(0xf3)]===process[_0x3b4adb(0xf3)]&&_0x2a023e[_0x3b4adb(0x237)][_0x3b4adb(0x242)]===_0x47ecb7[_0x3b4adb(0x242)];if(!_0x3aeaa7){_0x293570=![],_0x5d7cfc=_0x2a023e;return;}_0x151c9d[_0x3b4adb(0x275)]<=_0x2a023e[_0x3b4adb(0x275)]&&(_0x151c9d[_0x3b4adb(0x275)]=_0x2a023e[_0x3b4adb(0x275)]+0x1,_0x151c9d['updatedAt']=_0x151c9d[_0x3b4adb(0x275)]);}this[_0x3b4adb(0x29a)]()[_0x3b4adb(0x1b9)](_0x14aef0,_0x151c9d),_0x293570=!![],_0x5d7cfc=_0x151c9d;};if(_0x53f2be)this[_0x4c6b8b(0x29a)]()['transactionSync'](_0xd83b83);else await this['_db']()[_0x4c6b8b(0x17a)](_0xd83b83);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x293570)return{'acquired':![],'handle':null,'current':_0x5d7cfc};const _0x40481d=new _0x299c74(this,_0x14aef0,_0x151c9d[_0x4c6b8b(0x275)]);return _0x40481d['_startHeartbeat'](_0x210ec9,this[_0x4c6b8b(0x1d7)]),{'acquired':!![],'handle':_0x40481d,'current':_0x5d7cfc};}[_0x1bc2cd(0x1cb)](_0x501c1e){const _0x20d096=_0x1bc2cd;try{return this['_db']()[_0x20d096(0x162)](this[_0x20d096(0x296)](_0x501c1e))??null;}catch{return null;}}[_0x1bc2cd(0xf7)](){const _0x15dccc=_0x1bc2cd,_0x2f9fb1=this['namespace']+':',_0x4b3e92=[];try{for(const {key:_0x3fa5cb,value:_0x1df167}of this[_0x15dccc(0x29a)]()[_0x15dccc(0xc7)]({'start':_0x2f9fb1,'end':_0x2f9fb1+'\xff'})){typeof _0x3fa5cb===_0x15dccc(0x1a6)&&_0x3fa5cb[_0x15dccc(0x218)](_0x2f9fb1)&&_0x4b3e92[_0x15dccc(0x159)]({'id':_0x3fa5cb[_0x15dccc(0x278)](_0x2f9fb1[_0x15dccc(0xf6)]),'entry':_0x1df167});}}catch{}return _0x4b3e92;}static[_0x1bc2cd(0x1e3)](_0x2d2255){const _0x5b5bee=_0x1bc2cd,_0x3dc994=[];try{const _0x3145cc=_0x2d2255[_0x5b5bee(0x234)](_0x595bda,{'dupSort':![]});for(const {key:_0x36dd65,value:_0x1c4021}of _0x3145cc[_0x5b5bee(0xc7)]({})){if(typeof _0x36dd65!==_0x5b5bee(0x1a6))continue;const _0x530cdb=_0x36dd65[_0x5b5bee(0xa8)](':');if(_0x530cdb<0x1)continue;_0x3dc994[_0x5b5bee(0x159)]({'namespace':_0x36dd65[_0x5b5bee(0x278)](0x0,_0x530cdb),'id':_0x36dd65['slice'](_0x530cdb+0x1),'entry':_0x1c4021});}}catch{}return _0x3dc994;}}return okdbLock={'OKDBLock':_0x96781c},okdbLock;}var version=_0x204085(0x269),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0xf19f3d=_0x204085;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0xad8865=require$$0$3,_0x5c94c4=require$$1$1,_0x56641d=require$$2,{LOOP:_0x2cc0ef}=requireOkdbLoopMonitor(),{OKDBLock:_0x49deb8}=requireOkdbLock(),{SYNC_COMMITS:_0x139a26}=requireOkdbWriter(),_0x472831='~processes',_0xfc1650='node',_0x4902a2=_0xf19f3d(0x2a9),_0x1116a0=_0xf19f3d(0x125),_0x439257=(_0x5d30a3,_0x250d5c)=>_0x5d30a3+':'+_0x250d5c,_0x1db3e5=(_0x5c4232,_0x2b18db)=>_0x5c4232+'::'+_0x2b18db,_0xb8bb4d=(_0xea7f35,_0x483e6f)=>_0xea7f35+'/'+_0x483e6f,_0x3400d7=(_0x1dde7e,_0x32e5fe)=>_0x1dde7e+'#'+_0x32e5fe,_0x2c1389=_0x288064=>{const _0x49ca1e=_0xf19f3d;if(_0x288064?.[_0x49ca1e(0x210)])return _0x288064['processKey'];const _0x33397a=_0x288064?.['nodeKey'];return typeof _0x33397a===_0x49ca1e(0x1a6)&&_0x33397a[_0x49ca1e(0x216)]('#')?_0x33397a[_0x49ca1e(0x278)](0x0,_0x33397a[_0x49ca1e(0xa8)]('#')):_0x33397a;},_0x497778=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x47b5ad=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5de4ee=_0x497778*0x3,_0x8a1a71=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0xf19f3d(0x121)](0x927c0,_0x5de4ee*0x14),_0x3c7bab=['processor:progress',_0xf19f3d(0x27f),_0xf19f3d(0x203),_0xf19f3d(0x131),_0xf19f3d(0x249),'processor:resumed'];let _0x5b7a96=null;function _0xf61e86(){const _0x1f49e0=_0xf19f3d;if(_0x5b7a96==null)_0x5b7a96=Math['round']((Date[_0x1f49e0(0xef)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x5b7a96;}function _0x12f73e(_0x555663){const _0x4ae1ca=_0xf19f3d;if(process.env.OKDB_PROCESS_KILL===_0x4ae1ca(0xae))return![];if(_0x555663?.['options']?.[_0x4ae1ca(0x11a)]&&typeof _0x555663['options'][_0x4ae1ca(0x11a)]===_0x4ae1ca(0xe5)&&_0x555663[_0x4ae1ca(0x1fb)][_0x4ae1ca(0x11a)]['kill']===![])return![];return!![];}function _0x117399(_0x4e0162,_0x328279){const _0x1ac904=_0xf19f3d,_0x465ae7=!!_0x328279?.[_0x1ac904(0x146)];switch(_0x4e0162){case _0x1ac904(0xce):return{'controllable':_0x465ae7,'decommissionable':![],'killable':!![],'killConfirm':_0x1ac904(0x15e)};case _0x1ac904(0x277):case _0x1ac904(0x23a):return{'controllable':_0x465ae7,'decommissionable':![],'killable':!![],'killConfirm':_0x1ac904(0x22b)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x1ac904(0x173):case _0x1ac904(0xe1):case _0x1ac904(0x28e):case _0x1ac904(0x1cc):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x189f9b{constructor(_0x196367){const _0x253cda=_0xf19f3d;this[_0x253cda(0xec)]=_0x196367,this[_0x253cda(0x259)]=null,this['_desired']=null,this[_0x253cda(0x231)]=new Map(),this[_0x253cda(0x153)]=null,this['_isWriter']=![],this[_0x253cda(0xb8)]=![],this['_processStartedAt']=_0xf61e86(),this[_0x253cda(0x23e)]=_0x439257(process['pid'],this[_0x253cda(0xc9)]),this[_0x253cda(0x23c)]=_0x56641d[_0x253cda(0x1db)]()[_0x253cda(0x278)](0x0,0x8),this['_rowKey']=_0x3400d7(this[_0x253cda(0x23e)],this['_instanceId']),this['_startedAt']=Date['now'](),this[_0x253cda(0x1b5)]=null,this[_0x253cda(0x100)]=null,this[_0x253cda(0x1c2)]=null,this['_hbTimer']=null,this[_0x253cda(0x2a4)]=null,this[_0x253cda(0x178)]=null,this[_0x253cda(0x1bb)]=0x0,this[_0x253cda(0x151)]={},this[_0x253cda(0x26f)]=new Map(),this[_0x253cda(0xf8)]=process[_0x253cda(0x96)](),this[_0x253cda(0x193)]=Date[_0x253cda(0xef)](),this[_0x253cda(0x1e9)]=0x0,this[_0x253cda(0x1b7)]=new Map();}get[_0xf19f3d(0xf9)](){const _0x57ab0c=_0xf19f3d;return this[_0x57ab0c(0x23e)];}get[_0xf19f3d(0x254)](){return this['_rowKey'];}[_0xf19f3d(0x149)](_0x5971e2,_0x43bacd){const _0x3425e1=_0xf19f3d,_0x5e5bb7=_0x117399(_0x5971e2,_0x43bacd);if(_0x5e5bb7[_0x3425e1(0x18f)]&&!_0x12f73e(this[_0x3425e1(0xec)]))return{..._0x5e5bb7,'killable':![],'killConfirm':undefined};return _0x5e5bb7;}['isActive'](){return!!this['_statusEnv'];}[_0xf19f3d(0xb5)](_0x158c0d){Object['assign'](this['_ownMeta'],_0x158c0d||{});}[_0xf19f3d(0x29b)](_0x588856){if(_0x588856)this['_listenAddr']=_0x588856;}[_0xf19f3d(0x2af)](_0x4b5984={}){const _0x172bce=_0xf19f3d;return this[_0x172bce(0xec)][_0x172bce(0xe6)](_0x4b5984);}[_0xf19f3d(0x2a1)](){const _0x2c2cb9=_0xf19f3d,_0x479e91={};let _0x2f501e=0x0,_0x314c81=0x0;const _0x51c50b=new Set();for(const _0x19f616 of this[_0x2c2cb9(0xac)]()){_0x314c81++;const _0x1e4958=_0x19f616['processing'];if(!_0x1e4958)continue;if(_0x1e4958['participate'])_0x2f501e++;for(const _0x53f65d of _0x1e4958[_0x2c2cb9(0x146)]||[]){if(![_0x2c2cb9(0x239),_0x2c2cb9(0x1ab)][_0x2c2cb9(0x216)](_0x53f65d[_0x2c2cb9(0x214)]))continue;(_0x53f65d[_0x2c2cb9(0x1fe)]===_0x2c2cb9(0x272)||_0x53f65d[_0x2c2cb9(0x1fe)]===_0x2c2cb9(0x293))&&_0x53f65d[_0x2c2cb9(0x27a)]&&_0x51c50b[_0x2c2cb9(0x15d)]((_0x53f65d[_0x2c2cb9(0x14e)]||_0x2c2cb9(0x97))+':'+_0x53f65d[_0x2c2cb9(0x27a)]);const _0x3d211a=_0x53f65d[_0x2c2cb9(0x14e)]||_0x2c2cb9(0x97);(_0x479e91[_0x3d211a]||=[])[_0x2c2cb9(0x159)]({..._0x53f65d,'env':_0x3d211a,'owner':{'pid':_0x19f616[_0x2c2cb9(0xf3)]??null,'kind':_0x19f616[_0x2c2cb9(0x10c)]??null}});}}for(const [_0x136253,_0x3308c6]of Object[_0x2c2cb9(0x252)](_0x479e91)){for(const _0x380738 of _0x3308c6){if(_0x380738['mode']===_0x2c2cb9(0x239)&&!_0x380738[_0x2c2cb9(0x179)]){const _0x14ca92=_0x136253+':'+(_0x380738[_0x2c2cb9(0x27a)]??'');if(!_0x51c50b[_0x2c2cb9(0x217)](_0x14ca92))_0x380738[_0x2c2cb9(0x14b)]=!![];}}}return{'envs':_0x479e91,'policy':null,'participation':{'participating':_0x2f501e,'total':_0x314c81},'source':_0x2c2cb9(0xd9)};}['processorsView'](){const _0x362625=_0xf19f3d,_0x2266ae=_0x11c391=>{const _0x4f05e0=_0x10a2;if(_0x11c391[_0x4f05e0(0x1fe)]===_0x4f05e0(0x272)||_0x11c391[_0x4f05e0(0x1fe)]===_0x4f05e0(0x293)||_0x11c391[_0x4f05e0(0x1fe)]==='error')return 0x3;if(_0x11c391[_0x4f05e0(0x179)])return 0x1;return 0x2;},_0x4b9ddc=new Map();for(const _0x37ee6d of this['listNodes']()){for(const _0x202c31 of _0x37ee6d[_0x362625(0x101)]?.[_0x362625(0x146)]||[]){const _0x579e70={..._0x202c31,'owner':{'pid':_0x37ee6d[_0x362625(0xf3)]??null,'kind':_0x37ee6d[_0x362625(0x10c)]??null,'host':_0x37ee6d[_0x362625(0x129)]??null}},_0x5a0af1=_0x202c31['mode']===_0x362625(0x239)?_0x362625(0x16c)+(_0x202c31['env']??'')+'::'+(_0x202c31['cursorKey']??_0x202c31[_0x362625(0x1b3)]??_0x202c31['id']):_0x362625(0x11d)+(_0x37ee6d[_0x362625(0x24c)]??_0x37ee6d[_0x362625(0x210)]??'')+'::'+(_0x202c31['env']??'')+'::'+_0x202c31['id'],_0x3908fa=_0x4b9ddc['get'](_0x5a0af1);if(!_0x3908fa||_0x2266ae(_0x579e70)>_0x2266ae(_0x3908fa))_0x4b9ddc['set'](_0x5a0af1,_0x579e70);}}return[..._0x4b9ddc[_0x362625(0x241)]()];}[_0xf19f3d(0x282)](){const _0x58aba8=_0xf19f3d,_0x4841d5=Date['now'](),_0x2f8650=this[_0x58aba8(0xac)](),_0x495e8c=_0x21f9c1=>Math[_0x58aba8(0x121)](0x0,Math[_0x58aba8(0xb0)]((_0x4841d5-(_0x21f9c1['startedAt']||_0x4841d5))/0x3e8)),_0x42f965=_0x2f8650['find'](_0x4030f6=>_0x4030f6[_0x58aba8(0x10c)]===_0x58aba8(0xce)),_0x44b59d=_0x2f8650['filter'](_0x1e940f=>_0x1e940f[_0x58aba8(0x10c)]===_0x58aba8(0x173));if(_0x42f965||_0x44b59d['length'])return{'primary':_0x42f965?{'pid':_0x42f965[_0x58aba8(0xf3)],'uptime':_0x495e8c(_0x42f965)}:null,'workers':_0x44b59d['map'](_0x3f37bd=>({'pid':_0x3f37bd['pid'],'uptime':_0x495e8c(_0x3f37bd)})),'workersConfigured':_0x42f965?.[_0x58aba8(0x25f)]?.[_0x58aba8(0x1d3)]??_0x44b59d['length'],'mode':'cluster'};const _0x150b54=_0x2f8650[_0x58aba8(0x103)](_0xc31907=>_0xc31907[_0x58aba8(0x10c)]===_0x58aba8(0x277)||_0xc31907[_0x58aba8(0x10c)]===_0x58aba8(0x23a)||_0xc31907['kind']==='embedded'),_0x4a48d7=_0x150b54?{'pid':_0x150b54['pid'],'uptime':_0x495e8c(_0x150b54)}:{'pid':process[_0x58aba8(0xf3)],'uptime':Math['max'](0x0,Math[_0x58aba8(0xb0)](process[_0x58aba8(0x182)]()))};return{'primary':_0x4a48d7,'workers':[_0x4a48d7],'workersConfigured':0x1,'mode':_0x58aba8(0x239)};}[_0xf19f3d(0x23f)](){const _0x41aefb=_0xf19f3d;return this[_0x41aefb(0xa9)]();}[_0xf19f3d(0x268)](){const _0x31916f=_0xf19f3d,_0x247c87=new Map();for(const _0x1c8fa8 of this[_0x31916f(0xa9)]())_0x247c87['set'](_0x1c8fa8[_0x31916f(0x210)],{..._0x1c8fa8,'children':[]});const _0x187fa1=[];for(const _0x4d9174 of _0x247c87[_0x31916f(0x241)]()){const _0x2afcca=_0x4d9174[_0x31916f(0x289)]?_0x247c87[_0x31916f(0x162)](_0x4d9174[_0x31916f(0x289)]):null;if(_0x2afcca&&_0x2afcca!==_0x4d9174)_0x2afcca[_0x31916f(0x11e)][_0x31916f(0x159)](_0x4d9174);else _0x187fa1[_0x31916f(0x159)](_0x4d9174);}const _0x444a81=(_0x2c993b,_0x6bec8c)=>_0x2c993b[_0x31916f(0x10c)]===_0x6bec8c[_0x31916f(0x10c)]?(_0x2c993b[_0x31916f(0xf3)]||0x0)-(_0x6bec8c[_0x31916f(0xf3)]||0x0):(_0x2c993b['kind']??'')<(_0x6bec8c[_0x31916f(0x10c)]??'')?-0x1:0x1,_0x22872c=_0x4ed5bb=>{const _0x36f091=_0x31916f;_0x4ed5bb[_0x36f091(0xb3)](_0x444a81);for(const _0x1e4825 of _0x4ed5bb)if(_0x1e4825[_0x36f091(0x11e)]['length'])_0x22872c(_0x1e4825[_0x36f091(0x11e)]);};return _0x22872c(_0x187fa1),_0x187fa1;}[_0xf19f3d(0x158)](_0x503598){const _0x427e71=_0xf19f3d;return this['_groupByProcess']()[_0x427e71(0x103)](_0x28bc17=>_0x28bc17[_0x427e71(0x210)]===_0x503598)??null;}[_0xf19f3d(0xa9)](_0x92fe3d=Date['now']()){const _0x3b2926=_0xf19f3d,_0x2969b7=new Map();for(const _0x5ed308 of this[_0x3b2926(0xac)]()){const _0x51db63=_0x2c1389(_0x5ed308);let _0xa314dc=_0x2969b7[_0x3b2926(0x162)](_0x51db63);!_0xa314dc&&(_0xa314dc={'processKey':_0x51db63,'nodeKey':_0x51db63,'pid':_0x5ed308[_0x3b2926(0xf3)],'ppid':_0x5ed308[_0x3b2926(0x12a)]??null,'host':_0x5ed308[_0x3b2926(0x129)]??null,'kind':_0x5ed308[_0x3b2926(0x10c)],'role':null,'supervisorKey':_0x5ed308[_0x3b2926(0x289)]??null,'slot':_0x5ed308['slot']??null,'slotKey':_0x5ed308['slotKey']??null,'caps':_0x5ed308[_0x3b2926(0x187)]??null,'lifecycle':_0x5ed308[_0x3b2926(0xf5)]??null,'uptime':Math['max'](0x0,Math[_0x3b2926(0xb0)]((_0x92fe3d-(_0x5ed308['startedAt']||_0x92fe3d))/0x3e8)),'startedAt':_0x5ed308[_0x3b2926(0x135)]??null,'meta':_0x5ed308[_0x3b2926(0x25f)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x2969b7[_0x3b2926(0x198)](_0x51db63,_0xa314dc));_0xa314dc[_0x3b2926(0xed)][_0x3b2926(0x159)]({'instanceId':_0x5ed308[_0x3b2926(0x1fa)]??null,'role':_0x5ed308['role']??null,'listenAddr':_0x5ed308['listenAddr']??null,'lifecycle':_0x5ed308[_0x3b2926(0xf5)]??null,'processing':_0x5ed308[_0x3b2926(0x101)]??null});if(!_0xa314dc[_0x3b2926(0x262)]&&_0x5ed308[_0x3b2926(0x262)])_0xa314dc[_0x3b2926(0x262)]=_0x5ed308[_0x3b2926(0x262)];if(!_0xa314dc['listenAddr']&&_0x5ed308[_0x3b2926(0x99)])_0xa314dc['listenAddr']=_0x5ed308[_0x3b2926(0x99)];if(!_0xa314dc[_0x3b2926(0x101)]&&_0x5ed308[_0x3b2926(0x101)])_0xa314dc[_0x3b2926(0x101)]=_0x5ed308[_0x3b2926(0x101)];if(!_0xa314dc[_0x3b2926(0xb4)]&&_0x5ed308['engines'])_0xa314dc['engines']=_0x5ed308['engines'];if(!_0xa314dc[_0x3b2926(0x270)]&&_0x5ed308[_0x3b2926(0x270)])_0xa314dc[_0x3b2926(0x270)]=_0x5ed308[_0x3b2926(0x270)];if(_0xa314dc[_0x3b2926(0x187)]==null&&_0x5ed308[_0x3b2926(0x187)])_0xa314dc[_0x3b2926(0x187)]=_0x5ed308[_0x3b2926(0x187)];if(_0x5ed308['stats']&&(!_0xa314dc[_0x3b2926(0xfc)]||(_0x5ed308['stats']['at']??0x0)>(_0xa314dc[_0x3b2926(0xfc)]['at']??0x0)))_0xa314dc['stats']=_0x5ed308[_0x3b2926(0xfc)];}return[..._0x2969b7[_0x3b2926(0x241)]()];}['runtimeProcessesView'](){const _0x7aac0=_0xf19f3d,_0x409b58=[],_0x40df53={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x4c9c2f of this['_groupByProcess']()){_0x409b58[_0x7aac0(0x159)]({'processKey':_0x4c9c2f[_0x7aac0(0x210)],'kind':_0x4c9c2f[_0x7aac0(0x10c)],'pid':_0x4c9c2f[_0x7aac0(0xf3)],'supervisorKey':_0x4c9c2f[_0x7aac0(0x289)],'meta':_0x4c9c2f[_0x7aac0(0x25f)]??null,'uptime':_0x4c9c2f[_0x7aac0(0x182)],'stats':_0x4c9c2f[_0x7aac0(0xfc)]??null}),_0x40df53[_0x7aac0(0x11a)]++;if(_0x4c9c2f['stats']){_0x40df53[_0x7aac0(0xe8)]+=_0x4c9c2f[_0x7aac0(0xfc)][_0x7aac0(0xe8)]||0x0,_0x40df53[_0x7aac0(0x20d)]+=(_0x4c9c2f[_0x7aac0(0xfc)][_0x7aac0(0x20d)]||0x0)+(_0x4c9c2f['stats'][_0x7aac0(0x10b)]?.[_0x7aac0(0x20d)]||0x0);const _0x212585=_0x4c9c2f[_0x7aac0(0xfc)][_0x7aac0(0x10b)];_0x212585&&(_0x40df53['threads']['count']+=_0x212585[_0x7aac0(0x92)]||0x0,_0x40df53['threads'][_0x7aac0(0x126)]+=_0x212585['sandbox']||0x0,_0x40df53[_0x7aac0(0x10b)][_0x7aac0(0x1d2)]+=_0x212585[_0x7aac0(0x1d2)]||0x0);}}return{'totals':_0x40df53,'nodes':_0x409b58};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x569eaf=_0xf19f3d;this[_0x569eaf(0x24a)]=this['_isWriter']||!!writer,this[_0x569eaf(0xb8)]=this['_isReader']||!!reader,this[_0x569eaf(0x1b5)]=kind||this[_0x569eaf(0x1b5)]||(_0x5c94c4['isWorker']?_0x569eaf(0x173):_0x569eaf(0x277)),this[_0x569eaf(0x100)]=supervisorKey??this[_0x569eaf(0x100)],this['_listenAddr']=listenAddr??this[_0x569eaf(0x1c2)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x45d428=await this[_0x569eaf(0xec)][_0x569eaf(0x174)](_0x472831,{'sync':![],'durability':_0x569eaf(0x109)});await _0x45d428['ensureType'](_0xfc1650),this[_0x569eaf(0x259)]=_0x45d428;}return this[_0x569eaf(0x259)];}['_nodeDb'](){const _0x18073f=_0xf19f3d;return this[_0x18073f(0x2b8)]!==this['_statusEnv']&&(this[_0x18073f(0x2b8)]=this[_0x18073f(0x259)],this['_nodeDbCache']=this[_0x18073f(0x259)][_0x18073f(0xdb)](_0xfc1650)[_0x18073f(0x167)]),this['_nodeDbCache'];}[_0xf19f3d(0x156)](_0x35f561){const _0x5bfd8c=_0xf19f3d;if(_0x139a26)return this[_0x5bfd8c(0x17f)]()['putSync'](_0x35f561[_0x5bfd8c(0x24c)],_0x35f561,0x1);const _0x15aee9=this[_0x5bfd8c(0x17f)]()[_0x5bfd8c(0x1b9)](_0x35f561[_0x5bfd8c(0x24c)],_0x35f561,0x1);if(_0x15aee9&&typeof _0x15aee9['then']===_0x5bfd8c(0xf0))_0x15aee9[_0x5bfd8c(0x205)](undefined,()=>{});return _0x15aee9;}[_0xf19f3d(0xd3)](_0x4adf0e){const _0x4978b7=_0xf19f3d;return this['_nodeDb']()[_0x4978b7(0x1a4)](_0x4adf0e['nodeKey'],_0x4adf0e,0x1);}[_0xf19f3d(0x1dc)](_0x2d2e80){const _0x346e3e=_0xf19f3d;if(_0x139a26)try{return this[_0x346e3e(0x17f)]()['removeSync'](_0x2d2e80);}catch{return![];}const _0x4a1eb5=this[_0x346e3e(0x17f)]()[_0x346e3e(0x28f)](_0x2d2e80);if(_0x4a1eb5&&typeof _0x4a1eb5[_0x346e3e(0x205)]===_0x346e3e(0xf0))_0x4a1eb5[_0x346e3e(0x205)](undefined,()=>{});return _0x4a1eb5;}async[_0xf19f3d(0x154)](_0x5cf608){const _0x4aa7b3=_0xf19f3d;if(!this[_0x4aa7b3(0x259)]||!this[_0x4aa7b3(0x24a)]||!_0x5cf608?.['nodeKey'])return;return this[_0x4aa7b3(0x156)](_0x5cf608);}async['removeNode'](_0x55df20){const _0x54e31a=_0xf19f3d;if(!this['_statusEnv']||!this[_0x54e31a(0x24a)]||!_0x55df20)return;const _0x4ab972=_0x55df20[_0x54e31a(0x216)]('#'),_0x222bec=[];for(const {key:_0x1388e0}of this[_0x54e31a(0x259)][_0x54e31a(0xc7)](_0xfc1650)){if(_0x1388e0===_0x55df20||!_0x4ab972&&typeof _0x1388e0==='string'&&_0x1388e0['startsWith'](_0x55df20+'#'))_0x222bec[_0x54e31a(0x159)](_0x1388e0);}for(const _0x17b543 of _0x222bec){try{this[_0x54e31a(0x17f)]()[_0x54e31a(0x10f)](_0x17b543);}catch{}}}['_nodeDead'](_0x1601ec){const _0x1e0934=_0xf19f3d;if(typeof _0x1601ec?.[_0x1e0934(0xf3)]!==_0x1e0934(0x27d))return![];if(_0x1601ec[_0x1e0934(0x129)]!==_0xad8865['hostname']())return![];if(_0x1601ec[_0x1e0934(0xf3)]===process['pid'])return![];if(_0x1601ec[_0x1e0934(0x128)]!=null&&_0x1601ec[_0x1e0934(0x128)]<Date[_0x1e0934(0xef)]()-_0x8a1a71)return!![];try{return process['kill'](_0x1601ec[_0x1e0934(0xf3)],0x0),![];}catch(_0x1a2ad0){return _0x1a2ad0['code']==='ESRCH';}}['listNodes'](){const _0x2a1050=_0xf19f3d;if(!this[_0x2a1050(0x259)])return[];try{this['_statusEnv']['db']?.[_0x2a1050(0x122)]?.();}catch{}const _0x187401=Date['now'](),_0x5e98ef=_0xad8865['hostname'](),_0xa2a97e=[];for(const {value:_0x3d70ba}of this[_0x2a1050(0x259)][_0x2a1050(0xc7)](_0xfc1650)){if(!_0x3d70ba)continue;let _0x3e283e=null;_0x3d70ba[_0x2a1050(0x129)]===_0x5e98ef&&typeof _0x3d70ba['pid']===_0x2a1050(0x27d)&&(_0x3e283e=!this[_0x2a1050(0x1c3)](_0x3d70ba));if(_0x3e283e===![])continue;const _0x230c6c=_0x3d70ba['expiresAt']==null||_0x3d70ba[_0x2a1050(0x128)]>=_0x187401;if(_0x3e283e===!![]||_0x230c6c)_0xa2a97e[_0x2a1050(0x159)](_0x3d70ba);}return _0xa2a97e;}async[_0xf19f3d(0xc6)](_0x3208db=0x0){const _0x541161=_0xf19f3d;if(!this[_0x541161(0x259)]||!this[_0x541161(0x24a)])return;const _0x4f6ec8=Date[_0x541161(0xef)]()-_0x3208db,_0x52cf35=new Set(),_0x101c75=[],_0x4697c3=_0xad8865[_0x541161(0x1df)](),_0x5cbd48=require$$6[_0x541161(0x267)];for(const {key:_0x11eb8e,value:_0x2b45dc}of this['_statusEnv'][_0x541161(0xc7)](_0xfc1650)){if(!_0x2b45dc)continue;const _0x45d07b=_0x2b45dc[_0x541161(0x129)]===_0x4697c3&&typeof _0x2b45dc[_0x541161(0xf3)]===_0x541161(0x27d),_0x5592d3=_0x45d07b?this[_0x541161(0x1c3)](_0x2b45dc):_0x2b45dc[_0x541161(0x128)]!=null&&_0x2b45dc['expiresAt']<_0x4f6ec8;if(_0x5592d3)_0x101c75['push'](_0x11eb8e);else{_0x52cf35[_0x541161(0x15d)](_0x2c1389(_0x2b45dc)??_0x11eb8e);if(_0x2b45dc['version']&&_0x2b45dc[_0x541161(0x267)]!==_0x5cbd48){if(!this[_0x541161(0x170)])this[_0x541161(0x170)]=new Set();!this[_0x541161(0x170)]['has'](_0x2b45dc[_0x541161(0x267)])&&(this[_0x541161(0x170)][_0x541161(0x15d)](_0x2b45dc[_0x541161(0x267)]),this[_0x541161(0xec)][_0x541161(0x141)]?.[_0x541161(0xa1)]?.(_0x541161(0x20a)+(_0x2b45dc['pid']??'?')+_0x541161(0x2bb)+_0x2b45dc[_0x541161(0x267)]+_0x541161(0x213)+_0x5cbd48+_0x541161(0x133)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x541161(0x23d)}));}}}for(const _0xdfa73 of _0x101c75)this[_0x541161(0x1dc)](_0xdfa73);if(this[_0x541161(0x160)]()){const _0x263d49=[];for(const {key:_0x5f52b8}of this[_0x541161(0x25b)]('node')){if(!_0x52cf35[_0x541161(0x217)](_0x5f52b8)){if(_0x139a26)try{this['_desired'][_0x541161(0x10f)]('node/'+_0x5f52b8);}catch{}else _0x263d49[_0x541161(0x159)](this[_0x541161(0x200)][_0x541161(0x28f)](_0x541161(0x184)+_0x5f52b8));}}if(_0x263d49[_0x541161(0xf6)])await Promise[_0x541161(0x2b2)](_0x263d49);}}[_0xf19f3d(0x1e5)](_0x1130d7=null){const _0x5c288c=_0xf19f3d;if(this[_0x5c288c(0x266)])return;if(!this['_isWriter']||!this[_0x5c288c(0x259)]){this[_0x5c288c(0xec)]?.[_0x5c288c(0x141)]?.[_0x5c288c(0xa1)]?.(_0x5c288c(0x257)+this[_0x5c288c(0x24a)]+_0x5c288c(0x236)+!!this[_0x5c288c(0x259)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':'processes'});return;}this[_0x5c288c(0x178)]=_0x1130d7,this['_onProcEvent']=()=>this[_0x5c288c(0x19c)]();for(const _0x357860 of _0x3c7bab)this[_0x5c288c(0xec)][_0x5c288c(0x1dd)]['on'](_0x357860,this[_0x5c288c(0x2a4)]);this[_0x5c288c(0xdf)]();const _0x5d14e2=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x497778;this[_0x5c288c(0x266)]=setInterval(()=>{const _0x5b3732=_0x5c288c;if(this['_onTick'])try{this['_onTick']();}catch{}this[_0x5b3732(0xdf)](),this['reap']()['catch'](()=>{});},_0x5d14e2);if(this[_0x5c288c(0x266)][_0x5c288c(0x113)])this[_0x5c288c(0x266)][_0x5c288c(0x113)]();}[_0xf19f3d(0x19c)](){const _0xab8ac0=_0xf19f3d;if(!this[_0xab8ac0(0x24a)]||!this[_0xab8ac0(0x259)])return;if(Date['now']()-this['_lastPublishAt']<_0x47b5ad)return;this[_0xab8ac0(0xdf)]();}[_0xf19f3d(0xdf)](){const _0x42500a=_0xf19f3d;if(!this[_0x42500a(0x24a)]||!this[_0x42500a(0x259)])return;this['_lastPublishAt']=Date[_0x42500a(0xef)]();try{const _0x723dd3=[this['_buildOwnRow']()];for(const _0x105b74 of this[_0x42500a(0x26f)][_0x42500a(0x241)]())_0x723dd3['push'](this['_buildChildRow'](_0x105b74));const _0x3e668d=_0x2cc0ef['enabled']?_0x2cc0ef[_0x42500a(0xef)]():0x0;for(const _0x2eedb5 of _0x723dd3){try{this['_putRowSync'](_0x2eedb5),this[_0x42500a(0x1de)]=![];}catch(_0x43b4d1){!this[_0x42500a(0x1de)]&&(this[_0x42500a(0x1de)]=!![],this['okdb']?.[_0x42500a(0x141)]?.[_0x42500a(0xa1)]?.(_0x42500a(0xf1)+_0x43b4d1[_0x42500a(0x230)],{'feature':_0x42500a(0x11a)}));}}if(_0x2cc0ef['enabled'])_0x2cc0ef[_0x42500a(0x21e)](_0x42500a(0x189),_0x2cc0ef[_0x42500a(0xef)]()-_0x3e668d,_0x42500a(0x261)+_0x723dd3[_0x42500a(0xf6)]+'\x20sync');}catch(_0x19d2af){!this[_0x42500a(0x1de)]&&(this['_publishFailWarned']=!![],this[_0x42500a(0xec)]?.['log']?.['warn']?.(_0x42500a(0xf1)+_0x19d2af[_0x42500a(0x230)],{'feature':_0x42500a(0x11a)}));}}async['stopHeartbeat'](){const _0x8dee24=_0xf19f3d;if(this[_0x8dee24(0x2a4)]){for(const _0x1392f5 of _0x3c7bab){try{this[_0x8dee24(0xec)][_0x8dee24(0x1dd)][_0x8dee24(0xae)](_0x1392f5,this[_0x8dee24(0x2a4)]);}catch{}}this[_0x8dee24(0x2a4)]=null;}this[_0x8dee24(0x266)]&&(clearInterval(this[_0x8dee24(0x266)]),this[_0x8dee24(0x266)]=null);try{if(this[_0x8dee24(0x259)]&&this[_0x8dee24(0x24a)])await this[_0x8dee24(0x155)](this[_0x8dee24(0x1d5)]);}catch{}}async['deregisterSelf'](){const _0x324d8e=_0xf19f3d;if(!this[_0x324d8e(0x259)]||!this['_isWriter'])return;try{await this[_0x324d8e(0x155)](this[_0x324d8e(0x1d5)]);}catch{}try{const _0x1aad84=[];for(const {value:_0x311cc8}of this[_0x324d8e(0x259)]['getRange'](_0xfc1650)){if(_0x311cc8?.['ppid']===process[_0x324d8e(0xf3)]&&_0x311cc8['nodeKey'])_0x1aad84[_0x324d8e(0x159)](_0x311cc8['nodeKey']);}for(const _0x2a9f56 of _0x1aad84){try{await this['removeNode'](_0x2a9f56);}catch{}}}catch{}}async[_0xf19f3d(0x260)](){return this['putNode'](this['_buildOwnRow']());}async[_0xf19f3d(0x243)](_0x21d360){const _0x1e54a9=_0xf19f3d;if(!this[_0x1e54a9(0x259)]||!this[_0x1e54a9(0x24a)])return;return this[_0x1e54a9(0x154)](this[_0x1e54a9(0xa0)](_0x21d360));}[_0xf19f3d(0xa0)]({pid:_0x498c26,startedAt:_0x5d9e3a,kind:_0x59ffe9,supervisorKey:_0x1926fc,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0xf19f3d(0x29c),meta:meta=null,stats:stats=null}){const _0x13b9bf=_0xf19f3d,_0x165c91=Date[_0x13b9bf(0xef)](),_0x47256f=_0x439257(_0x498c26,_0x5d9e3a);return{'nodeKey':_0x3400d7(_0x47256f,'0'),'processKey':_0x47256f,'instanceId':'0','pid':_0x498c26,'startedAt':_0x5d9e3a,'ppid':process[_0x13b9bf(0xf3)],'host':_0xad8865['hostname'](),'supervisorKey':_0x1926fc,'slot':slot,'slotKey':slotKey,'kind':_0x59ffe9,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x165c91,'expiresAt':_0x165c91+_0x5de4ee,'caps':this[_0x13b9bf(0x149)](_0x59ffe9,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0xf19f3d(0x139)](_0x1e5ee9){const _0x571a77=_0xf19f3d;if(!_0x1e5ee9?.['pid'])return null;const _0x20d83a=_0x439257(_0x1e5ee9[_0x571a77(0xf3)],_0x1e5ee9[_0x571a77(0x135)]);this[_0x571a77(0x26f)][_0x571a77(0x198)](_0x20d83a,{..._0x1e5ee9,'supervisorKey':_0x1e5ee9['supervisorKey']??this[_0x571a77(0x23e)]});if(this[_0x571a77(0x24a)])await this['publishChildRow'](this[_0x571a77(0x26f)][_0x571a77(0x162)](_0x20d83a))['catch']?.(()=>{});return _0x20d83a;}['removeSupervisedChild'](_0x4fbf7d){if(!_0x4fbf7d)return;return this['_children']['delete'](_0x4fbf7d),this['removeNode'](_0x4fbf7d);}['_sampleOwnStats'](){const _0x617d2b=_0xf19f3d,_0xfc3a68=Date[_0x617d2b(0xef)](),_0x2dda1f=process[_0x617d2b(0x96)](),_0xe32ced=(_0xfc3a68-this[_0x617d2b(0x193)])*0x3e8;if(_0xe32ced>=0x3d090){const _0x46be08=_0x2dda1f[_0x617d2b(0x177)]-this[_0x617d2b(0xf8)][_0x617d2b(0x177)]+(_0x2dda1f['system']-this['_lastCpuUsage'][_0x617d2b(0x9b)]),_0x2239a4=_0xad8865[_0x617d2b(0xb7)]()[_0x617d2b(0xf6)]||0x1;this['_lastCpuPct']=Math[_0x617d2b(0x16a)](0x64,Math['round'](_0x46be08/(_0xe32ced*_0x2239a4)*0x64)),this['_lastCpuWindowMs']=Math[_0x617d2b(0xb0)](_0xe32ced/0x3e8),this[_0x617d2b(0xf8)]=_0x2dda1f,this[_0x617d2b(0x193)]=_0xfc3a68;}const _0x3c07de=process['memoryUsage'](),_0x4569f2=this[_0x617d2b(0x1b7)][_0x617d2b(0x212)];let _0x279a96=0x0;if(_0x4569f2>0x0){const _0xe7d305=[this[_0x617d2b(0xec)],...this[_0x617d2b(0xec)][_0x617d2b(0xba)]?.['values']?.()??[]];for(const _0x946d7b of _0xe7d305){const _0x1ccd2f=_0x946d7b[_0x617d2b(0x256)]?.[_0x617d2b(0x16d)];if(_0x1ccd2f)_0x279a96+=_0x1ccd2f[_0x617d2b(0x9c)][_0x617d2b(0x1d2)];}}let _0x1fbda5=null;const _0xe2c109=_0x4569f2;if(_0xe2c109>0x0){let _0x46959b=0x0;for(const _0x540eae of this[_0x617d2b(0x1b7)]['values']())_0x46959b+=_0x540eae[_0x617d2b(0x20d)]||0x0;_0x1fbda5={'count':_0xe2c109,'heapUsed':_0x46959b,'sandbox':_0x4569f2,'busy':_0x279a96};}return{'rss':_0x3c07de[_0x617d2b(0xe8)],'heapUsed':_0x3c07de[_0x617d2b(0x20d)],'heapTotal':_0x3c07de[_0x617d2b(0x21a)],'external':_0x3c07de[_0x617d2b(0xe0)],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x617d2b(0xda)]??null,'threads':_0x1fbda5,'at':_0xfc3a68};}[_0xf19f3d(0x2bc)](_0x1131e9,_0xf77ac3){const _0x3cecb4=_0xf19f3d;if(!_0x1131e9||!_0xf77ac3)return;this[_0x3cecb4(0x1b7)][_0x3cecb4(0x198)](_0x1131e9,_0xf77ac3);}[_0xf19f3d(0x1c6)](_0x20614a){const _0x233d8b=_0xf19f3d;this[_0x233d8b(0x1b7)][_0x233d8b(0x15a)](_0x20614a);}[_0xf19f3d(0x233)](_0x26b202,_0x4a06cb,_0xd51fbf=undefined){const _0x476c36=_0xf19f3d,_0x59e384=this['_children']['get'](_0x26b202);if(!_0x59e384||!_0x4a06cb)return;if(_0xd51fbf!==undefined)_0x59e384[_0x476c36(0x101)]=_0xd51fbf;_0x59e384[_0x476c36(0xfc)]={'rss':_0x4a06cb[_0x476c36(0xe8)]??null,'heapUsed':_0x4a06cb[_0x476c36(0x20d)]??null,'heapTotal':_0x4a06cb[_0x476c36(0x21a)]??null,'external':_0x4a06cb['external']??null,'cpuPct':_0x4a06cb[_0x476c36(0x2a5)]??null,'cpuWindowMs':_0x4a06cb['cpuWindowMs']??null,'threads':_0x4a06cb[_0x476c36(0x10b)]??null,'claims':_0x4a06cb[_0x476c36(0x1e8)]??null,'envsOpen':_0x4a06cb['envsOpen']??null,'at':Date[_0x476c36(0xef)]()};}[_0xf19f3d(0xa4)](){const _0x254c0c=_0xf19f3d,_0x3d6e07=Date['now'](),_0x1af931=this[_0x254c0c(0xec)][_0x254c0c(0x286)]||{},_0x22a235=this[_0x254c0c(0x1b5)]||_0x254c0c(0x277);return{'nodeKey':this['_rowKey'],'processKey':this[_0x254c0c(0x23e)],'instanceId':this['_instanceId'],'pid':process['pid'],'startedAt':this[_0x254c0c(0xc9)],'instanceStartedAt':this[_0x254c0c(0x20b)],'ppid':typeof process[_0x254c0c(0x12a)]===_0x254c0c(0x27d)?process['ppid']:null,'host':_0xad8865[_0x254c0c(0x1df)](),'supervisorKey':this[_0x254c0c(0x100)]??null,'version':require$$6[_0x254c0c(0x267)],'kind':_0x22a235,'role':{'engines':!!_0x1af931['engines'],'processors':!!_0x1af931['processors'],'compaction':_0x1af931[_0x254c0c(0x2ac)],'http':_0x1af931[_0x254c0c(0x2a7)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x3d6e07,'expiresAt':_0x3d6e07+_0x5de4ee,'caps':this[_0x254c0c(0x149)](_0x22a235,_0x1af931),'lifecycle':{'state':_0x254c0c(0x29c),'desiredVersionApplied':null},'meta':{...this[_0x254c0c(0x151)]},'processing':_0x1af931[_0x254c0c(0x146)]?this[_0x254c0c(0x1da)]():null,'engines':_0x1af931[_0x254c0c(0xb4)]?[...this[_0x254c0c(0xec)][_0x254c0c(0x93)]??[]]:null,'singletonClaims':this[_0x254c0c(0xf2)](),'stats':this['_sampleOwnStats'](),'writers':this['_collectWriterFacet']()};}[_0xf19f3d(0x15c)](){const _0x1babf2=_0xf19f3d,_0x33e05e={};try{for(const [_0x17e146,_0x3defe5]of this[_0x1babf2(0xec)]['_envs']){try{const _0x353495=_0x3defe5['writerStatus']?.();if(!_0x353495)continue;if(!_0x353495[_0x1babf2(0x168)]&&!_0x353495[_0x1babf2(0x1bc)]&&!(_0x353495[_0x1babf2(0x1b6)]??0x0)&&!_0x353495[_0x1babf2(0x1ba)])continue;_0x33e05e[_0x17e146]={'depth':_0x353495[_0x1babf2(0x168)],'oldestPendingMs':_0x353495[_0x1babf2(0x244)],'committed':_0x353495['committed'],'commitsPerSec':_0x353495[_0x1babf2(0x116)],'commitP99Ms':_0x353495[_0x1babf2(0x1cf)],'parkedNow':_0x353495[_0x1babf2(0x1b6)]??0x0,'draining':!!_0x353495['draining']};}catch{}}}catch{}return Object['keys'](_0x33e05e)[_0x1babf2(0xf6)]?_0x33e05e:null;}['_collectSingletonClaims'](){const _0x50ee73=_0xf19f3d,_0x44aab6=process[_0x50ee73(0xf3)],_0x212c08=Date[_0x50ee73(0xef)](),_0x2809f7=_0x1b81b9=>{const _0x437789=_0x50ee73;if(!_0x1b81b9)return[];const _0x3722bf=[];try{for(const {id:_0x15db0d,entry:_0x5b4ef9}of _0x1b81b9['list']()){if(_0x5b4ef9?.['holder']?.[_0x437789(0xf3)]!==_0x44aab6)continue;const _0x1e9c40=_0x5b4ef9[_0x437789(0xbe)]??_0x5b4ef9[_0x437789(0x275)]??0x0;if(_0x1e9c40+(_0x5b4ef9[_0x437789(0xde)]??0x0)<_0x212c08)continue;_0x3722bf['push'](_0x15db0d);}}catch{}return _0x3722bf;},_0x3f6eb8=_0x2809f7(this['_singletonLock'](_0x50ee73(0xc0))),_0x35d122=_0x2809f7(this[_0x50ee73(0xbb)](_0x50ee73(0x1a3)));if(!_0x3f6eb8[_0x50ee73(0xf6)]&&!_0x35d122[_0x50ee73(0xf6)])return null;return{'compact':_0x3f6eb8,'replicate':_0x35d122};}[_0xf19f3d(0xbb)](_0xbe06a9){const _0x127848=_0xf19f3d;if(!this[_0x127848(0xec)]?.[_0x127848(0x108)])return null;if(!this[_0x127848(0x299)])this[_0x127848(0x299)]=new Map();let _0x3c4c3d=this['_singletonLocks'][_0x127848(0x162)](_0xbe06a9);if(!_0x3c4c3d)try{_0x3c4c3d=new _0x49deb8(this[_0x127848(0xec)]['_rootDb'],{'namespace':_0xbe06a9}),this[_0x127848(0x299)]['set'](_0xbe06a9,_0x3c4c3d);}catch{return null;}return _0x3c4c3d;}[_0xf19f3d(0x1da)](){const _0x1c7740=_0xf19f3d,_0x17e2eb=[];try{for(const [_0x2ef706,_0x3bcf9d]of this[_0x1c7740(0xec)]['_envs']){if(_0x2ef706['startsWith']('~'))continue;for(const _0x2e06c8 of _0x3bcf9d[_0x1c7740(0x227)][_0x1c7740(0x2b7)]())_0x17e2eb['push']({..._0x2e06c8,'env':_0x2ef706});}}catch{}return{'participate':this[_0x1c7740(0xec)]['processors']?.[_0x1c7740(0x11c)]??![],'processors':_0x17e2eb};}[_0xf19f3d(0x160)](){const _0x255bd2=_0xf19f3d;if(this['_desired'])return!![];const _0x2d1e06=this['okdb'][_0x255bd2(0x108)];if(!_0x2d1e06)return![];return this[_0x255bd2(0x200)]=_0x2d1e06[_0x255bd2(0x234)](_0x4902a2,{'dupSort':![]}),this[_0x255bd2(0x153)]=_0x2d1e06[_0x255bd2(0x234)](_0x1116a0,{'dupSort':![]}),!![];}async[_0xf19f3d(0xad)](){const _0x1c95ae=_0xf19f3d;if(!this[_0x1c95ae(0x160)]())return;const _0x4e8203='__vocab/version',_0x19027d=0x1,_0x2dca62=this[_0x1c95ae(0x200)][_0x1c95ae(0x162)](_0x4e8203)??0x0;if(_0x2dca62>=_0x19027d)return;const _0x32050a=_0x2d25ca=>{const _0x3a1b15=_0x1c95ae;if(_0x2d25ca===_0x3a1b15(0x1cc))return'single';if(_0x2d25ca===_0x3a1b15(0x29e))return _0x3a1b15(0x1ab);return _0x2d25ca;};await this[_0x1c95ae(0xec)][_0x1c95ae(0x29d)]['_writer'][_0x1c95ae(0x1ac)](()=>{const _0x4825c5=_0x1c95ae;for(const _0x389de2 of['procmode/',_0x4825c5(0x215)]){for(const {key:_0x8c7e9a,value:_0x377813}of this[_0x4825c5(0x200)][_0x4825c5(0xc7)]({'start':_0x389de2,'end':_0x389de2+'\xff'})){if(typeof _0x8c7e9a!==_0x4825c5(0x1a6)||!_0x8c7e9a['startsWith'](_0x389de2))break;const _0x59de3a=_0x32050a(_0x377813[_0x4825c5(0x214)]);if(_0x59de3a!==_0x377813[_0x4825c5(0x214)])this[_0x4825c5(0x200)][_0x4825c5(0x1b9)](_0x8c7e9a,{..._0x377813,'mode':_0x59de3a});}}this[_0x4825c5(0x200)][_0x4825c5(0x1b9)](_0x4e8203,_0x19027d);});}[_0xf19f3d(0x1b1)](){const _0xb9f8b7=_0xf19f3d;return!!this[_0xb9f8b7(0x200)];}[_0xf19f3d(0x164)](_0x26b3e3,_0x4daa16){const _0x34e43b=_0xf19f3d;if(!this[_0x34e43b(0x160)]())return null;const _0x147dc7=_0x26b3e3+'/'+_0x4daa16;return this[_0x34e43b(0x134)](),this[_0x34e43b(0x231)][_0x34e43b(0x162)](_0x147dc7)??this[_0x34e43b(0x200)][_0x34e43b(0x162)](_0x147dc7)??null;}[_0xf19f3d(0x134)](){const _0x33593f=_0xf19f3d;if(!_0x139a26)return;try{this[_0x33593f(0xec)]['_systemEnv']?.['db']?.['resetReadTxn']?.();}catch{}}async[_0xf19f3d(0x2b3)](_0x5d0193,_0x360ac0,_0x3bc65d){const _0x42b615=_0xf19f3d;if(!this[_0x42b615(0x160)]())return null;const _0x3b329d=_0x5d0193+'/'+_0x360ac0;this[_0x42b615(0x134)]();const _0x5550c6=this[_0x42b615(0x231)][_0x42b615(0x162)](_0x3b329d)??this['_desired'][_0x42b615(0x162)](_0x3b329d)??{'version':0x0},_0x942332=(_0x5550c6[_0x42b615(0x267)]||0x0)+0x1,_0x3eadb8={..._0x5550c6,..._0x3bc65d,'version':_0x942332,'updatedAt':Date[_0x42b615(0xef)]()};this['_desiredOverlay']['set'](_0x3b329d,_0x3eadb8);try{await this[_0x42b615(0xec)][_0x42b615(0x29d)]['_writer']['transaction'](()=>{const _0x19e7f5=_0x42b615;this[_0x19e7f5(0x200)][_0x19e7f5(0x1b9)](_0x3b329d,_0x3eadb8);});}finally{if(this['_desiredOverlay'][_0x42b615(0x162)](_0x3b329d)===_0x3eadb8)this[_0x42b615(0x231)][_0x42b615(0x15a)](_0x3b329d);}return _0x942332;}['listDesired'](_0x3dbb60){const _0x3f6af7=_0xf19f3d;if(!this[_0x3f6af7(0x160)]())return[];this[_0x3f6af7(0x134)]();const _0x5623b2=_0x3dbb60+'/',_0x13399a=[];for(const {key:_0xb35e37,value:_0x29fb30}of this[_0x3f6af7(0x200)]['getRange']({'start':_0x5623b2,'end':_0x5623b2+'\xff'})){if(typeof _0xb35e37!=='string'||!_0xb35e37[_0x3f6af7(0x218)](_0x5623b2))break;_0x13399a[_0x3f6af7(0x159)]({'key':_0xb35e37[_0x3f6af7(0x278)](_0x5623b2['length']),'value':_0x29fb30});}return _0x13399a;}['getCmd'](_0x75727c){const _0xf597b8=_0xf19f3d;if(!this[_0xf597b8(0x160)]())return null;return this[_0xf597b8(0x153)][_0xf597b8(0x162)](_0x75727c)??null;}async['bumpCmd'](_0x465864,_0x354351,_0x472af3={}){const _0x55d754=_0xf19f3d;if(!this['_ensureDesired']())return null;let _0x10624e;return await this[_0x55d754(0xec)][_0x55d754(0x29d)]['_writer'][_0x55d754(0x1ac)](()=>{const _0x1100ac=_0x55d754,_0x542795=this['_cmd'][_0x1100ac(0x162)](_0x465864)||{'epoch':0x0};_0x10624e=(_0x542795[_0x1100ac(0x222)]||0x0)+0x1,this['_cmd'][_0x1100ac(0x1b9)](_0x465864,{..._0x542795,..._0x472af3,'cmd':_0x354351,'epoch':_0x10624e,'updatedAt':Date[_0x1100ac(0xef)]()});}),_0x10624e;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x189f9b,'nodeKey':_0x439257,'logicalKey':_0x1db3e5,'slotKey':_0xb8bb4d,'PROCESS_ENV':_0x472831,'NODE_TYPE':_0xfc1650},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x41fd15=_0x204085;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x7b1064=require$$0$4,{EVENTS:_0x28d747,CHANGE_ACTIONS:_0x1efe03}=requireOkdbEnums(),{LOOP:_0x23f096}=requireOkdbLoopMonitor(),_0x5bf83e=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x54ec4f=0x5,_0x2793cf=0x2710;class _0x26ede8 extends _0x7b1064{constructor(_0x345310,_0x4c60a9={}){const _0x3d7a3d=_0x10a2;super(),this[_0x3d7a3d(0xec)]=_0x345310,this['_quantum']=_0x4c60a9['quantum']??_0x5bf83e,this[_0x3d7a3d(0xee)]=_0x4c60a9['flushDebounce']??_0x54ec4f,this[_0x3d7a3d(0x24d)]=_0x4c60a9[_0x3d7a3d(0x2b6)]??_0x2793cf,this[_0x3d7a3d(0x1b8)]=![],this[_0x3d7a3d(0xb1)]=new Map(),this[_0x3d7a3d(0x12e)]=new Map(),this[_0x3d7a3d(0x27b)]=new Map(),this['_flushTimer']=null,this[_0x3d7a3d(0x25d)]=![],this[_0x3d7a3d(0x1d0)]=new Set(),this['_onItem']=_0x19da05=>this[_0x3d7a3d(0x211)](_0x19da05),this[_0x3d7a3d(0x188)]=_0x41efdb=>this[_0x3d7a3d(0x123)](_0x41efdb),this['_onStop']=()=>this['stop']();}[_0x41fd15(0xf4)](){const _0x49e7db=_0x41fd15;if(this[_0x49e7db(0x1b8)])return;this[_0x49e7db(0x1b8)]=!![];for(const [_0x150c33,_0x1dc15c]of this['okdb'][_0x49e7db(0xba)]){if(_0x150c33[_0x49e7db(0x218)]('~'))continue;try{_0x1dc15c['_enableChangelog']();}catch{}}for(const [_0x464de1,_0x401d42]of this['okdb']['_envs']){if(_0x464de1[_0x49e7db(0x218)]('~'))continue;try{this[_0x49e7db(0x12e)][_0x49e7db(0x198)](_0x464de1,_0x401d42[_0x49e7db(0x225)]()||0x0);}catch{}}const {events:_0x58ebed}=this[_0x49e7db(0xec)];_0x58ebed['on'](_0x28d747[_0x49e7db(0x1a2)],this['_onItem']),_0x58ebed['on'](_0x28d747[_0x49e7db(0x130)],this[_0x49e7db(0x183)]),_0x58ebed['on'](_0x28d747[_0x49e7db(0x19b)],this['_onItem']),_0x58ebed['on'](_0x28d747[_0x49e7db(0x1f3)],this[_0x49e7db(0x188)]),_0x58ebed['once'](_0x28d747[_0x49e7db(0x1eb)],this[_0x49e7db(0xc3)]);}[_0x41fd15(0x26b)](){const _0x156b94=_0x41fd15;if(!this[_0x156b94(0x1b8)])return;this['_started']=![];const {events:_0x2ddf9f}=this['okdb'];_0x2ddf9f['off'](_0x28d747[_0x156b94(0x1a2)],this[_0x156b94(0x183)]),_0x2ddf9f[_0x156b94(0xae)](_0x28d747['ITEM_UPDATE'],this[_0x156b94(0x183)]),_0x2ddf9f[_0x156b94(0xae)](_0x28d747['ITEM_REMOVE'],this[_0x156b94(0x183)]),_0x2ddf9f[_0x156b94(0xae)](_0x28d747[_0x156b94(0x1f3)],this[_0x156b94(0x188)]);try{_0x2ddf9f[_0x156b94(0xae)](_0x28d747[_0x156b94(0x1eb)],this[_0x156b94(0xc3)]);}catch{}this[_0x156b94(0x102)]&&(clearTimeout(this['_flushTimer']),this[_0x156b94(0x102)]=null),this[_0x156b94(0x27b)][_0x156b94(0x285)](),this['_cursors'][_0x156b94(0x285)](),this[_0x156b94(0x12e)]['clear'](),this[_0x156b94(0x1d0)]['clear']();}[_0x41fd15(0x194)](_0xa8ce4f,_0x485f9b,_0x12435b,_0x44d659){return _0xa8ce4f+'\x00'+_0x485f9b+'\x00'+_0x12435b+'\x00'+_0x44d659;}[_0x41fd15(0x127)](_0x1e1cb3,_0x5c5ffe,_0x20273a,_0x23b761){const _0x59fb27=_0x41fd15,_0x4be086=this[_0x59fb27(0x194)](_0x1e1cb3,_0x5c5ffe,_0x20273a,_0x23b761);if(this['_seen'][_0x59fb27(0x217)](_0x4be086))return![];this[_0x59fb27(0x1d0)][_0x59fb27(0x15d)](_0x4be086);if(this[_0x59fb27(0x1d0)][_0x59fb27(0x212)]>this[_0x59fb27(0x24d)]){const _0x118523=this[_0x59fb27(0x1d0)][_0x59fb27(0x241)]()['next']()[_0x59fb27(0x1bd)];this['_seen'][_0x59fb27(0x15a)](_0x118523);}return!![];}[_0x41fd15(0x211)](_0x520d48){const _0xfcb17c=_0x41fd15;if(!this[_0xfcb17c(0x1b8)]||!_0x520d48)return;const {env:_0x56da74,type:_0x47782c,key:_0x29b988,clock:_0x1b1b1f,origin:_0x47763a,action:_0x27c010,newValue:_0x12992f,oldValue:_0x391d1e}=_0x520d48;if(_0x56da74==null||_0x47782c==null||_0x29b988==null)return;if(typeof _0x56da74===_0xfcb17c(0x1a6)&&_0x56da74['startsWith']('~'))return;if(typeof _0x47782c===_0xfcb17c(0x1a6)&&_0x47782c['startsWith']('~'))return;if(!this[_0xfcb17c(0x127)](_0x56da74,_0x47782c,_0x29b988,_0x1b1b1f))return;const _0xf35714=_0x27c010===_0x1efe03[_0xfcb17c(0xc1)]?'remove':_0xfcb17c(0x1b9);this['emit'](_0xfcb17c(0x152),{'env':_0x56da74,'type':_0x47782c,'key':_0x29b988,'op':_0xf35714,'clock':_0x1b1b1f,'origin':_0x47763a,'value':_0xf35714===_0xfcb17c(0x28f)?null:_0x12992f,'prevValue':_0x391d1e});}['_handlePoke'](_0x246641){const _0x5e6e6b=_0x41fd15;if(!this[_0x5e6e6b(0x1b8)])return;if(!_0x246641||typeof _0x246641[_0x5e6e6b(0x14e)]!==_0x5e6e6b(0x1a6)||typeof _0x246641[_0x5e6e6b(0x1b3)]!=='string')return;const {env:_0x8f488a,type:_0x3bf551}=_0x246641;if(_0x8f488a[_0x5e6e6b(0x218)]('~')||_0x3bf551[_0x5e6e6b(0x218)]('~'))return;this[_0x5e6e6b(0x27b)]['set'](_0x8f488a+'\x00'+_0x3bf551,{'env':_0x8f488a,'type':_0x3bf551}),this[_0x5e6e6b(0xd4)]();}[_0x41fd15(0xd4)](){const _0x91343f=_0x41fd15;if(this[_0x91343f(0x102)])return;const _0x2a740e=()=>{const _0x5ed3e5=_0x91343f;this[_0x5ed3e5(0x102)]=null,this['_drain']()[_0x5ed3e5(0x22a)](()=>{});};this['_flushTimer']=setTimeout(_0x2a740e,this['_flushDebounce']>0x0?this[_0x91343f(0xee)]:0x0);}async[_0x41fd15(0xff)](){const _0x3da47b=_0x41fd15;if(this['_draining']){this['_scheduleFlush']();return;}this[_0x3da47b(0x25d)]=!![];try{const _0x2d6a4b=[...this[_0x3da47b(0x27b)]['values']()];this['_pending'][_0x3da47b(0x285)]();let _0x36dbfc=![];for(const {env:_0x42e8a1,type:_0x5a6e9e}of _0x2d6a4b){try{const _0x16e4fe=await this['_drainOne'](_0x42e8a1,_0x5a6e9e);if(_0x16e4fe)_0x36dbfc=!![];}catch{this[_0x3da47b(0x27b)][_0x3da47b(0x198)](_0x42e8a1+'\x00'+_0x5a6e9e,{'env':_0x42e8a1,'type':_0x5a6e9e}),_0x36dbfc=!![];}}if(_0x36dbfc||this[_0x3da47b(0x27b)][_0x3da47b(0x212)]>0x0)this[_0x3da47b(0xd4)]();}finally{this[_0x3da47b(0x25d)]=![];}}async['_drainOne'](_0x29289f,_0x197aee){const _0x2f97d8=_0x41fd15,_0x39c492=await this[_0x2f97d8(0xec)][_0x2f97d8(0x1d1)](_0x29289f),_0xea92bb=_0x29289f+'\x00'+_0x197aee;!this[_0x2f97d8(0xb1)]['has'](_0xea92bb)&&(!this['_baselines'][_0x2f97d8(0x217)](_0x29289f)&&(_0x39c492['_enableChangelog'](),this[_0x2f97d8(0x12e)][_0x2f97d8(0x198)](_0x29289f,_0x39c492[_0x2f97d8(0x225)]()||0x0)),this[_0x2f97d8(0xb1)][_0x2f97d8(0x198)](_0xea92bb,this[_0x2f97d8(0x12e)][_0x2f97d8(0x162)](_0x29289f)));const _0x791ff0=this[_0x2f97d8(0xb1)][_0x2f97d8(0x162)](_0xea92bb),_0x1fa415=_0x39c492['getClock'](_0x197aee)||0x0;if(_0x1fa415<=_0x791ff0)return![];const _0x19c1e4=_0x791ff0+this[_0x2f97d8(0xdc)],_0x3f3ea1=Math['min'](_0x1fa415,_0x19c1e4),_0x2b5604=_0x23f096[_0x2f97d8(0x21b)]?_0x23f096[_0x2f97d8(0xef)]():0x0,_0x189f95=Array[_0x2f97d8(0x21c)](_0x39c492[_0x2f97d8(0x1b0)](_0x197aee,_0x791ff0+0x1,_0x3f3ea1));let _0x6c3151=_0x791ff0;for(const _0x4b35c1 of _0x189f95){const {clock:_0x57aff5,key:_0x2f543c,action:_0xdb62e,origin:_0x4e4d33}=_0x4b35c1;if(_0x57aff5>_0x6c3151)_0x6c3151=_0x57aff5;if(_0x2f543c==null)continue;if(!this[_0x2f97d8(0x127)](_0x29289f,_0x197aee,_0x2f543c,_0x57aff5))continue;let _0x42e305,_0x20e3f;if(_0xdb62e===_0x1efe03[_0x2f97d8(0xc1)])_0x42e305=_0x2f97d8(0x28f),_0x20e3f=null;else{const _0x5056ab=_0x39c492[_0x2f97d8(0x162)](_0x197aee,_0x2f543c);_0x5056ab==null?(_0x42e305='remove',_0x20e3f=null):(_0x42e305=_0x2f97d8(0x1b9),_0x20e3f=_0x5056ab);}this[_0x2f97d8(0x22e)](_0x2f97d8(0x152),{'env':_0x29289f,'type':_0x197aee,'key':_0x2f543c,'op':_0x42e305,'clock':_0x57aff5,'origin':_0x4e4d33,'value':_0x20e3f});}if(_0x23f096[_0x2f97d8(0x21b)])_0x23f096[_0x2f97d8(0x21e)]('feed:'+_0x29289f+':'+_0x197aee,_0x23f096['now']()-_0x2b5604,'n='+_0x189f95['length']);return this['_cursors'][_0x2f97d8(0x198)](_0xea92bb,Math['max'](_0x6c3151,_0x3f3ea1)),_0x39c492[_0x2f97d8(0x225)](_0x197aee)>_0x3f3ea1;}[_0x41fd15(0x16f)](){const _0x5302c4=_0x41fd15;return{'started':this[_0x5302c4(0x1b8)],'quantum':this[_0x5302c4(0xdc)],'flushDebounce':this['_flushDebounce'],'cursors':Object['fromEntries']([...this[_0x5302c4(0xb1)][_0x5302c4(0x252)]()][_0x5302c4(0x280)](([_0x4d1ff6,_0x34dbdf])=>[_0x4d1ff6['replace']('\x00',':'),_0x34dbdf])),'pending':this[_0x5302c4(0x27b)]['size'],'seen':this[_0x5302c4(0x1d0)][_0x5302c4(0x212)]};}}return _0x26ede8[_0x41fd15(0x20e)]=_0x5bf83e,okdbChangefeed={'OKDBChangefeed':_0x26ede8},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2a8cd9=_0x204085;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x37aa72=require$$1$1,_0x5c363f=require$$1,{EVENTS:_0x3e3427}=requireOkdbEnums(),_0x37346e=require$$0$3,{slotKey:_0x57b86e}=requireOkdbProcessRegistry(),_0x225ddb=0xfa,_0x263da8=0xfa0,_0x589cfb=0x5,_0x4f3777=0x2710,_0x17fba2=0xbb8,_0x5c627c=0x7d0,_0x4bdee5='__okdbCluster',_0x4b5dd1='ephemeral',_0x8681cc='log',_0x65e282=_0x2a8cd9(0xfc),_0x333319=[_0x3e3427[_0x2a8cd9(0x22c)],_0x3e3427['FTS_REGISTERED'],_0x3e3427[_0x2a8cd9(0x1c7)],_0x3e3427[_0x2a8cd9(0x253)],_0x3e3427[_0x2a8cd9(0x15b)],_0x3e3427['INDEX_READY'],_0x3e3427[_0x2a8cd9(0x1ef)],_0x3e3427['INDEX_REGISTERED'],_0x2a8cd9(0x27f),_0x2a8cd9(0x11b),_0x2a8cd9(0x131),_0x2a8cd9(0x249),'processor:resumed',_0x2a8cd9(0x203)],_0x22a787=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x9491d1({workers:_0x3a5573,makeOkdb:_0x37e3e5,port:_0x1c39f7,primaryOkdb:_0x3c47a5,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x4459f8=_0x2a8cd9;if(_0x37aa72[_0x4459f8(0xb6)])return childEntry&&_0x37aa72[_0x4459f8(0x117)]({'exec':_0x5c363f[_0x4459f8(0x1f5)](__dirname,_0x4459f8(0x13a)),'args':[],'execArgv':((()=>{const _0x4c8cd5=_0x4459f8,_0x56a207=[];for(let _0xc72cd5=0x0;_0xc72cd5<process[_0x4c8cd5(0x180)][_0x4c8cd5(0xf6)];_0xc72cd5++){const _0x3317ed=process[_0x4c8cd5(0x180)][_0xc72cd5];if(_0x3317ed['startsWith'](_0x4c8cd5(0x197))||_0x3317ed[_0x4c8cd5(0x218)]('--watch')||_0x3317ed[_0x4c8cd5(0x218)](_0x4c8cd5(0xfd)))continue;if(_0x3317ed==='-e'||_0x3317ed==='--eval'||_0x3317ed==='-p'||_0x3317ed==='--print'){_0xc72cd5++;continue;}_0x56a207[_0x4c8cd5(0x159)](_0x3317ed);}return _0x56a207;})())}),_0x149452({'workers':_0x3a5573,'port':_0x1c39f7,'primaryOkdb':_0x3c47a5,'workerEnv':workerEnv});return _0x288a6c({'makeOkdb':_0x37e3e5,'port':_0x1c39f7});}function _0x149452({workers:_0x1875df,port:_0x2b381d,primaryOkdb:_0x3bc1b6,workerEnv:_0x3b1a77}){const _0x1d442b=_0x2a8cd9,_0x403b83=new Map(),_0x2afb86=new Map();let _0x5ce93d=![];const _0x42d545=_0x20dd08=>_0x20dd08?.[_0x1d442b(0x28b)],_0x469f55=_0x102f4a=>{const _0x6033=_0x1d442b,_0xc27d3b=_0x37aa72[_0x6033(0x245)]({...process.env,..._0x3b1a77||{},'OKDB_CLUSTER_SLOT':String(_0x102f4a)});return _0xc27d3b[_0x6033(0x28b)]=_0x102f4a,_0x403b83[_0x6033(0x198)](_0xc27d3b[_0x6033(0x24b)]['pid'],{'worker':_0xc27d3b,'startedAt':Date[_0x6033(0xef)](),'slot':_0x102f4a}),_0xc27d3b['on']('error',_0x49a036=>{const _0x312c8f=_0x6033;console[_0x312c8f(0x141)](_0x312c8f(0x264)+_0xc27d3b[_0x312c8f(0x24b)][_0x312c8f(0xf3)]+_0x312c8f(0x190)+(_0x49a036?.[_0x312c8f(0x230)]??_0x49a036));}),_0xc27d3b['on'](_0x6033(0x272),()=>_0x2067a1()),_0xc27d3b;},_0x46fd16=_0x3b3851=>{const _0x1a5b0d=_0x1d442b;for(const {worker:_0x1dd675}of _0x403b83['values']()){if(_0x1dd675['isDead']()||!_0x1dd675[_0x1a5b0d(0xb2)]())continue;try{_0x1dd675[_0x1a5b0d(0x229)](_0x3b3851);}catch{}}};_0x3bc1b6?.['_activateProcesses']?.({'kind':_0x1d442b(0xce),'listenAddr':':'+_0x2b381d})[_0x1d442b(0x22a)](()=>{}),_0x3bc1b6?.['processes']?.[_0x1d442b(0xb5)]?.({'workersConfigured':_0x1875df});const _0x5c3b36={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x2067a1=()=>{const _0x15a45d=_0x1d442b,_0x3c50ce=_0x3bc1b6?.[_0x15a45d(0x11a)];if(!_0x3c50ce||!_0x3c50ce[_0x15a45d(0x24a)])return;const _0x3e33ef=_0x3c50ce[_0x15a45d(0xf9)];for(const {worker:_0x23f4d4,startedAt:_0x29d554,slot:_0x2c8827,stats:_0x595769,processing:_0x1dcd94}of _0x403b83[_0x15a45d(0x241)]()){if(_0x23f4d4['isDead']())continue;const _0x70be55=_0x3c50ce[_0x15a45d(0x1b1)]?.()&&_0x3c50ce['getDesired'](_0x15a45d(0x2ba),_0xac3acf(_0x2c8827))?.['decommission']===!![];_0x3c50ce[_0x15a45d(0x243)]({'pid':_0x23f4d4[_0x15a45d(0x24b)][_0x15a45d(0xf3)],'startedAt':_0x29d554,'kind':_0x15a45d(0x173),'supervisorKey':_0x3e33ef,'slot':_0x2c8827,'slotKey':_0xac3acf(_0x2c8827),'role':_0x5c3b36,'listenAddr':':'+_0x2b381d,'lifecycle':_0x70be55?_0x15a45d(0x1ff):_0x15a45d(0x29c),'processing':_0x1dcd94??null,'stats':_0x595769??null})[_0x15a45d(0x22a)](()=>{});}},_0xac3acf=_0x506d4b=>_0x57b86e(_0x1d442b(0x276)+_0x2b381d,_0x506d4b),_0x453847=_0x4345a4=>{const _0x5a5708=_0x1d442b,_0x3c961e=_0x3bc1b6?.['processes'];if(!_0x3c961e?.[_0x5a5708(0x1b1)]?.())return![];return _0x3c961e[_0x5a5708(0x164)](_0x5a5708(0x2ba),_0xac3acf(_0x4345a4))?.['decommission']===!![];};for(let _0x23ccab=0x0;_0x23ccab<_0x1875df;_0x23ccab++){const _0x304f32=_0x453847(_0x23ccab);_0x2afb86[_0x1d442b(0x198)](_0x23ccab,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x304f32,'respawnTimer':null}),_0x304f32?console[_0x1d442b(0x141)](_0x1d442b(0x238)+_0x23ccab+_0x1d442b(0x143)):_0x469f55(_0x23ccab);}const _0x31dffb=()=>{const _0x4f6969=_0x1d442b,_0x20ab13=_0x3bc1b6?.[_0x4f6969(0x11a)];if(!_0x20ab13?.['_isWriter']||!_0x20ab13['hasDesired']?.())return;for(const [_0x38a5ad,_0x1f0dd3]of _0x2afb86[_0x4f6969(0x252)]()){const _0x55c3f6=_0x20ab13[_0x4f6969(0x164)]('slot',_0xac3acf(_0x38a5ad)),_0x4bfa97=_0x55c3f6?.[_0x4f6969(0x1ae)]===!![],_0x181431=_0x55c3f6?.[_0x4f6969(0x120)]===!![];if(_0x4bfa97&&!_0x1f0dd3[_0x4f6969(0x26c)]){_0x1f0dd3[_0x4f6969(0x26c)]=!![];_0x1f0dd3['respawnTimer']&&(clearTimeout(_0x1f0dd3['respawnTimer']),_0x1f0dd3[_0x4f6969(0x26d)]=null);for(const {worker:_0x4996a9}of _0x403b83[_0x4f6969(0x241)]()){if(_0x42d545(_0x4996a9)!==_0x38a5ad||_0x4996a9[_0x4f6969(0x199)]())continue;try{if(_0x181431)_0x4996a9[_0x4f6969(0x24b)][_0x4f6969(0x120)](_0x4f6969(0x18b));else _0x4996a9[_0x4f6969(0xb2)]()&&_0x4996a9[_0x4f6969(0x1c1)]();}catch{}}console[_0x4f6969(0x141)](_0x4f6969(0x251)+(_0x181431?_0x4f6969(0x29f):'decommissioned')+_0x4f6969(0x95)+_0x38a5ad+'\x20(durable\x20desired-state)');}else{if(!_0x4bfa97&&_0x1f0dd3[_0x4f6969(0x26c)]&&_0x55c3f6){_0x1f0dd3[_0x4f6969(0x26c)]=![],_0x1f0dd3[_0x4f6969(0xd8)]=[],_0x1f0dd3[_0x4f6969(0x1a1)]=0x0;const _0xedf0d2=[..._0x403b83[_0x4f6969(0x241)]()][_0x4f6969(0x107)](({worker:_0x52e032})=>_0x42d545(_0x52e032)===_0x38a5ad&&!_0x52e032[_0x4f6969(0x199)]());!_0xedf0d2&&!_0x5ce93d&&(_0x469f55(_0x38a5ad),console['log'](_0x4f6969(0x12b)+_0x38a5ad));}}}},_0x4f11a8=()=>{try{_0x31dffb();}catch{}};_0x3bc1b6?.[_0x1d442b(0x1dd)]?.['on']?.(_0x3e3427[_0x1d442b(0xd7)],_0x4f11a8);const _0x3cf4c2=[];if(_0x3bc1b6?.[_0x1d442b(0x1dd)]?.['on'])for(const _0x399ffc of _0x333319){const _0xfc835=_0x3c600a=>{_0x46fd16({[_0x4bdee5]:_0x4b5dd1,'event':_0x399ffc,'data':_0x3c600a??{}});};_0x3bc1b6[_0x1d442b(0x1dd)]['on'](_0x399ffc,_0xfc835),_0x3cf4c2[_0x1d442b(0x159)]({'event':_0x399ffc,'handler':_0xfc835});}const _0x55f7d2=setInterval(()=>{_0x31dffb(),_0x2067a1();},_0x22a787);_0x55f7d2[_0x1d442b(0x113)]?.();const _0x4eca31=(_0x3ea529,_0xcb5d54)=>{const _0x5185ef=_0x1d442b;if(!_0xcb5d54||typeof _0xcb5d54!=='object'||_0xcb5d54[_0x4bdee5]!==_0x8681cc)return;if(!_0x3bc1b6?.[_0x5185ef(0x141)]?.[_0x5185ef(0x224)])return;const _0x120085=_0xcb5d54[_0x5185ef(0x176)]||{};_0x3bc1b6[_0x5185ef(0x141)]['ingest']({..._0x120085,'msg':'[w'+_0xcb5d54[_0x5185ef(0x2ba)]+']\x20'+(_0x120085['msg']??''),'meta':{..._0x120085[_0x5185ef(0x25f)]||{},'worker':_0xcb5d54['slot'],'workerPid':_0xcb5d54['pid']}});};_0x37aa72['on'](_0x1d442b(0x230),_0x4eca31);const _0x861af1=(_0x3818c4,_0x752266)=>{const _0x11cff5=_0x1d442b;if(!_0x752266||typeof _0x752266!=='object'||_0x752266[_0x4bdee5]!==_0x65e282)return;const _0x280f62=_0x403b83['get'](_0x3818c4['process'][_0x11cff5(0xf3)]);if(_0x280f62){_0x280f62['stats']={..._0x752266[_0x11cff5(0xfc)],'at':Date['now']()};if(_0x752266[_0x11cff5(0x101)]!==undefined)_0x280f62[_0x11cff5(0x101)]=_0x752266[_0x11cff5(0x101)];}};_0x37aa72['on'](_0x1d442b(0x230),_0x861af1),_0x37aa72['on'](_0x1d442b(0x232),(_0x30dadb,_0x423faf,_0x3a0529)=>{const _0x15ed1f=_0x1d442b,_0xc00726=_0x30dadb[_0x15ed1f(0x24b)]['pid'],_0x3ad20a=_0x42d545(_0x30dadb),_0x5caa90=_0x403b83[_0x15ed1f(0x162)](_0xc00726);if(_0x5caa90&&_0x3bc1b6?.[_0x15ed1f(0x11a)])_0x3bc1b6[_0x15ed1f(0x11a)][_0x15ed1f(0x155)](_0xc00726+':'+_0x5caa90[_0x15ed1f(0x135)])[_0x15ed1f(0x22a)](()=>{});_0x403b83[_0x15ed1f(0x15a)](_0xc00726),console[_0x15ed1f(0x141)](_0x15ed1f(0x264)+_0xc00726+_0x15ed1f(0x150)+(_0x3ad20a??'?')+_0x15ed1f(0x18a)+('(code='+_0x423faf+',\x20signal='+(_0x3a0529??'none')+_0x15ed1f(0x17e)+_0x403b83[_0x15ed1f(0x212)]+_0x15ed1f(0x172))),_0x2067a1();if(_0x5ce93d||_0x3ad20a==null)return;const _0x2ddaab=_0x2afb86[_0x15ed1f(0x162)](_0x3ad20a);if(!_0x2ddaab||_0x2ddaab[_0x15ed1f(0x26c)])return;const _0xb12548=Date['now']();_0x2ddaab[_0x15ed1f(0xd8)][_0x15ed1f(0x159)](_0xb12548),_0x2ddaab[_0x15ed1f(0xd8)]=_0x2ddaab[_0x15ed1f(0xd8)][_0x15ed1f(0x17c)](_0x3af21e=>_0xb12548-_0x3af21e<=_0x4f3777);if(_0x2ddaab[_0x15ed1f(0xd8)][_0x15ed1f(0xf6)]>=_0x589cfb){_0x2ddaab[_0x15ed1f(0x26c)]=!![],console[_0x15ed1f(0x119)](_0x15ed1f(0x25e)+_0x3ad20a+_0x15ed1f(0x1fd)+_0x2ddaab[_0x15ed1f(0xd8)][_0x15ed1f(0xf6)]+'\x20times\x20in\x20'+(_0x4f3777+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x403b83[_0x15ed1f(0x212)]+_0x15ed1f(0x18e)));return;}_0x2ddaab[_0x15ed1f(0x1a1)]++;const _0x1c99f=Math[_0x15ed1f(0x16a)](_0x263da8,_0x225ddb*0x2**(_0x2ddaab[_0x15ed1f(0x1a1)]-0x1));console[_0x15ed1f(0x141)](_0x15ed1f(0x175)+_0x3ad20a+_0x15ed1f(0x255)+_0x1c99f+_0x15ed1f(0x1aa)+_0x2ddaab[_0x15ed1f(0x1a1)]+')'),_0x2ddaab[_0x15ed1f(0x26d)]=setTimeout(()=>{const _0x3a4f7c=_0x15ed1f;_0x2ddaab['respawnTimer']=null;if(_0x5ce93d||_0x2ddaab[_0x3a4f7c(0x26c)])return;const _0x3ad1df=_0x469f55(_0x3ad20a);_0x3ad1df[_0x3a4f7c(0x290)]('listening',()=>{const _0x4bc912=_0x3a4f7c;if(_0x2afb86[_0x4bc912(0x162)](_0x3ad20a)===_0x2ddaab)_0x2ddaab[_0x4bc912(0x1a1)]=0x0;});},_0x1c99f),_0x2ddaab[_0x15ed1f(0x26d)][_0x15ed1f(0x113)]?.();});const _0x195654=[..._0x403b83[_0x1d442b(0x1b4)]()];console[_0x1d442b(0x141)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+'\x20forked\x20'+_0x1875df+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x2b381d+':\x20'+('['+_0x195654[_0x1d442b(0x1f5)](',\x20')+']'));const _0x179cad={'_isClusterController':!![],'port':_0x2b381d,'primaryOkdb':_0x3bc1b6??null,'status'(){const _0x2b056d=_0x1d442b;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x2b381d,'primaryRole':_0x3bc1b6?.['role']??null,'processorPid':null,'supervisorPid':process[_0x2b056d(0xf3)],'workers':[..._0x403b83[_0x2b056d(0x241)]()][_0x2b056d(0x280)](({worker:_0x2dbc09})=>({'pid':_0x2dbc09[_0x2b056d(0x24b)]['pid'],'id':_0x2dbc09['id'],'dead':_0x2dbc09[_0x2b056d(0x199)]()}))};},async 'close'(){const _0x279d59=_0x1d442b;_0x5ce93d=!![];for(const _0x39d5c8 of _0x2afb86[_0x279d59(0x241)]()){_0x39d5c8[_0x279d59(0x26c)]=!![],_0x39d5c8[_0x279d59(0x26d)]&&(clearTimeout(_0x39d5c8[_0x279d59(0x26d)]),_0x39d5c8[_0x279d59(0x26d)]=null);}clearInterval(_0x55f7d2),_0x37aa72[_0x279d59(0xae)]('message',_0x4eca31),_0x37aa72['off'](_0x279d59(0x230),_0x861af1),_0x3bc1b6?.[_0x279d59(0x1dd)]?.['off']?.(_0x3e3427[_0x279d59(0xd7)],_0x4f11a8);if(_0x3bc1b6?.['events']?.[_0x279d59(0xae)])for(const {event:_0x1897de,handler:_0x3b29dd}of _0x3cf4c2){try{_0x3bc1b6['events'][_0x279d59(0xae)](_0x1897de,_0x3b29dd);}catch{}}_0x3cf4c2[_0x279d59(0xf6)]=0x0;const _0x4192d1=[..._0x403b83[_0x279d59(0x241)]()][_0x279d59(0x280)](({worker:_0x34c826})=>_0x34c826);if(_0x4192d1[_0x279d59(0xf6)]===0x0)return;await Promise[_0x279d59(0x115)](_0x4192d1[_0x279d59(0x280)](_0x56090a=>new Promise(_0x1d82f8=>{const _0x268116=_0x279d59;if(_0x56090a['isDead']()){_0x1d82f8();return;}let _0x3214bd=![];const _0x12212a=()=>{if(_0x3214bd)return;_0x3214bd=!![];if(_0x30acbc)clearTimeout(_0x30acbc);_0x1d82f8();};_0x56090a[_0x268116(0x290)](_0x268116(0x232),_0x12212a);const _0x30acbc=setTimeout(()=>{const _0x2d95f2=_0x268116;try{_0x56090a['process'][_0x2d95f2(0x120)]();}catch{}},_0x17fba2+0x1f4);_0x30acbc['unref']?.();try{_0x56090a[_0x268116(0x1c1)]();}catch{try{_0x56090a['process'][_0x268116(0x120)]();}catch{}}})));}};return _0x179cad;}async function _0x288a6c({makeOkdb:_0x1b0e8f,port:_0x420865}){const _0x3f70dd=_0x2a8cd9,_0x114f51=await _0x1b0e8f();return _0x3303f7(_0x114f51),_0x114f51['http'][_0x3f70dd(0x12d)](_0x420865);}function _0x3303f7(_0x2d52c3){const _0x81778a=_0x2a8cd9;if(!_0x2d52c3||_0x2d52c3[_0x81778a(0x206)])return;_0x2d52c3[_0x81778a(0x206)]=!![];try{const {OKDBChangefeed:_0x346884}=requireOkdbChangefeed(),_0x4faa48=_0x2d52c3[_0x81778a(0xd5)];if(_0x4faa48&&typeof _0x4faa48['attachFeed']===_0x81778a(0xf0)){const _0x1480c2=new _0x346884(_0x2d52c3);_0x1480c2[_0x81778a(0xf4)](),_0x4faa48[_0x81778a(0x273)](_0x1480c2),_0x2d52c3['_changefeed']=_0x1480c2;}}catch(_0x128061){_0x2d52c3[_0x81778a(0x141)]?.[_0x81778a(0xa1)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x128061?.['message']??_0x128061),{'feature':_0x81778a(0x2ae)});}const _0x9cdb12=_0x47292f=>{const _0x60c3c5=_0x81778a;if(!_0x47292f||typeof _0x47292f!==_0x60c3c5(0xe5)||_0x47292f[_0x4bdee5]==null)return;if(_0x47292f[_0x4bdee5]===_0x4b5dd1)try{_0x2d52c3[_0x60c3c5(0xd5)]?.[_0x60c3c5(0x1e0)]?.(_0x47292f[_0x60c3c5(0x204)],_0x47292f[_0x60c3c5(0x167)]);}catch{}};process['on'](_0x81778a(0x230),_0x9cdb12),_0x2d52c3['_clusterOnMessage']=_0x9cdb12;{let _0x2adf20=process[_0x81778a(0x96)](),_0x4202c7=Date[_0x81778a(0xef)]();const _0x466a43=()=>{const _0x2bc848=_0x81778a;if(typeof process[_0x2bc848(0x229)]!==_0x2bc848(0xf0)||!process[_0x2bc848(0x19e)])return;const _0x26f27c=Date[_0x2bc848(0xef)](),_0x568023=process[_0x2bc848(0x96)](),_0x2be4f9=(_0x26f27c-_0x4202c7)*0x3e8,_0x477add=_0x568023[_0x2bc848(0x177)]-_0x2adf20['user']+(_0x568023['system']-_0x2adf20['system']),_0x490851=_0x2be4f9>0x0?Math[_0x2bc848(0x16a)](0x64,Math['round'](_0x477add/(_0x2be4f9*(_0x37346e[_0x2bc848(0xb7)]()[_0x2bc848(0xf6)]||0x1))*0x64)):0x0;_0x2adf20=_0x568023,_0x4202c7=_0x26f27c;const _0xbd5439=process[_0x2bc848(0x1c5)]();let _0x8c0be4=null;try{_0x8c0be4=_0x2d52c3[_0x2bc848(0x262)]?.[_0x2bc848(0x146)]?_0x2d52c3[_0x2bc848(0x11a)]?.[_0x2bc848(0x1da)]?.()??null:null;}catch{}try{process[_0x2bc848(0x229)]({[_0x4bdee5]:_0x65e282,'stats':{'rss':_0xbd5439[_0x2bc848(0xe8)],'heapUsed':_0xbd5439[_0x2bc848(0x20d)],'heapTotal':_0xbd5439[_0x2bc848(0x21a)],'external':_0xbd5439[_0x2bc848(0xe0)],'cpuPct':_0x490851,'cpuWindowMs':Math[_0x2bc848(0xb0)](_0x2be4f9/0x3e8)||null},'processing':_0x8c0be4});}catch{}},_0x11f36f=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x2c8c33=setInterval(_0x466a43,_0x11f36f);_0x2c8c33[_0x81778a(0x113)]?.(),_0x466a43();for(const _0x3c620e of[_0x81778a(0x249),'processor:resumed']){_0x2d52c3['events']?.['on']?.(_0x3c620e,()=>{try{_0x466a43();}catch{}});}}let _0x280c67=![];const _0x2667af=async _0x10a3dd=>{const _0x4736a0=_0x81778a;if(_0x280c67)return;_0x280c67=!![];const _0x45b3ff=setTimeout(()=>process[_0x4736a0(0x232)](_0x10a3dd),_0x17fba2);_0x45b3ff[_0x4736a0(0x113)]?.();try{await _0x2d52c3['close']?.();}catch{}process[_0x4736a0(0x232)](_0x10a3dd);};process['on']('disconnect',()=>_0x2667af(0x0));if(process[_0x81778a(0x11f)]!=='win32'){const _0x10df7c=setInterval(()=>{const _0x3d3541=_0x81778a;if(process[_0x3d3541(0x12a)]===0x1)_0x2667af(0x0);},_0x5c627c);_0x10df7c['unref']?.(),_0x2d52c3[_0x81778a(0xb9)]=_0x10df7c;}}return okdbCluster={'runClustered':_0x9491d1,'attachWorkerCluster':_0x3303f7},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0xb661cc=require$$0$5,{attachWorkerCluster:_0x200410}=requireOkdbCluster();async function _0x3df8e8(){const _0x45f2ab=_0x10a2,_0x46655c=process.env.OKDB_HTTP_CHILD;if(!_0x46655c)throw new Error(_0x45f2ab(0x28c));const {rootPath:_0x5989f6,port:_0x238618,options:options={},logLevel:logLevel=_0x45f2ab(0x166)}=JSON[_0x45f2ab(0x235)](_0x46655c);if(!_0x5989f6||!_0x238618)throw new Error(_0x45f2ab(0x26a));const _0x16def4=new _0xb661cc(_0x5989f6,{...options,'engines':![],'processors':![],'compaction':![]});_0x16def4['log'][_0x45f2ab(0x1f8)]?.();const _0x322a38=process.env.OKDB_CLUSTER_SLOT??'?',_0x163666={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x19d1bd=_0x163666[logLevel]??_0x163666['info'];_0x16def4['log'][_0x45f2ab(0x2a2)](_0x378fa2=>{const _0x54a939=_0x45f2ab;if((_0x163666[_0x378fa2['level']]??0x1)<_0x19d1bd)return;try{process['send']?.({'__okdbCluster':_0x54a939(0x141),'slot':_0x322a38,'pid':process[_0x54a939(0xf3)],'entry':_0x378fa2});}catch{}}),await _0x16def4['open'](),_0x200410(_0x16def4),await _0x16def4[_0x45f2ab(0x2a7)]['listen'](_0x238618);}return _0x3df8e8()['catch'](_0x3c8e86=>{const _0x285ffd=_0x10a2;try{process['send']?.({'__okdbCluster':'log','slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x285ffd(0xf3)],'entry':{'level':_0x285ffd(0x119),'msg':_0x285ffd(0x279)+(_0x3c8e86?.[_0x285ffd(0x230)]??_0x3c8e86)}});}catch{}process[_0x285ffd(0x232)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x204085(0x9a)]=okdbHttpWorkerChild;function _0x3e77(){const _0x28d32a=['claims','_lastCpuPct','ms\x20activeWriters=','SYSTEM_STOPPED','txn:start','resetIndex','1026590ncUgiH','INDEX_RESET','schema:set','prototype','\x20pid=','SYSTEM_POKE','view','join','system:proc','isEnabled','detachConsole','loop-lag\x20','instanceId','options','commit','\x20died\x20','state','decommissioning','_desired','_wantDbHandle','okdb-diag.','processor:retry','event','then','_clusterWorkerAttached','\x20\x20env=','ms\x20on\x20env=','\x20\x20#','process\x20','_startedAt','system:drain','heapUsed','CHANGEFEED_QUANTUM','dropIndex','processKey','_handleInProcess','size','\x20while\x20this\x20process\x20runs\x20','mode','procmodeack/','includes','has','startsWith','\x20\x20(no\x20env\x20draining)','heapTotal','enabled','from','resolve','note','system:bus_state_change','item:create','_done','epoch','ms/','ingest','getClock','write','processor','code','send','catch','confirm','VIEW_PROGRESS','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','emit','dropping','message','_desiredOverlay','exit','updateSupervisedChildStats','openDB','parse','\x20statusEnv=','holder','[okdb-cluster]\x20slot=','single','standalone','freeze','_instanceId','migrations','_selfKey','nodesView','_holderDead','values','processorId','publishChildRow','oldestPendingMs','fork','_log','\x20│\x20','resetting','processor:paused','_isWriter','process','nodeKey','_dedupeMax','field:resolver_registered','_closed','release','[okdb-cluster]\x20','entries','FTS_RESET','rowKey','\x20in\x20','functions','registry\x20heartbeat\x20skipped\x20(writer=','ms\x20busy=','_statusEnv','\x20===','listDesired','system:type_drop','_draining','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','meta','publishOwnRow','rows=','role','percentile','[okdb-cluster]\x20worker\x20pid=','bus:poke','_hbTimer','version','treeView','2.3.3','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','stop','dead','respawnTimer','_durs','_children','singletonClaims','name','online','attachFeed',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','acquiredAt','cluster:','cli','slice','http\x20worker\x20child\x20failed:\x20','cursorKey','_pending','ttl:clear','number','load','processor:ready','map','license:removed','clusterStatusView','registerFts','recent\x20writes\x20(newest\x20first)','clear','_role','_heldTotal','toFixed','supervisorKey','mkdirSync','__okdbSlot','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','572822NrFNvq','fn-runner','remove','once','_buckets','fts:registered','building','uncaughtException','floor','_key','_released','stopping','_singletonLocks','_db','noteListenAddr','running','_systemEnv','async','hard-killed','license:activated','processingStatusView','attach','\x20@\x20','_onProcEvent','cpuPct','env:opened','http','_bpParkedTotal','~processes:desired','sync:apply','seq','compaction','isHeld','cluster','register','error:\x20','license:invalid','allSettled','setDesired','4824528CcAdgo','SYNC_COMMITS','dedupeMax','tierList','_nodeDbFor','2594180QGdJdN','slot','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','reportThreadStats','split','resetFts','count','_servingEngines','label','\x20worker\x20slot=','cpuUsage','default','dumpedAt','listenAddr','exports','system','liveThreadStats','ms\x20max=','enable','_lock','_buildChildRow','warn','_wantDb','4846499bgRcHA','_buildOwnRow','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','stack','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','indexOf','_groupByProcess','ttl:set','_admissionStarted','listNodes','_migrateVocab','off','started','round','_cursors','isConnected','sort','engines','setOwnMeta','isPrimary','cpus','_isReader','_clusterOrphanWatch','_envs','_singletonLock','_lockDb','reduce','updatedAt','_admissionTimer','compact','REMOVE','ORPHAN\x20(env-closed\x20write)','_onStop','stringify','okdb-writer[','reap','getRange','_windowCbs','_processStartedAt','bus:env_release','3817555SqqGrJ','_bpWaiters','schema:drop','primary','disable','onWindow','index:registered','waiting','_putRowSync','_scheduleFlush','_adminRelay','system:env_release','SYSTEM_PROC','deaths','workers','_lastCpuWindowMs','_getType','_quantum','SWAP','ttlMs','_publishNow','external','queue-worker','created','./okdb','maxMs','object','_activateProcesses','system:clock_change','rss','11089808GsuvML','test','txn:end','okdb','instances','_flushDebounce','now','function','registry\x20publish\x20failing:\x20','_collectSingletonClaims','pid','start','lifecycle','length','list','_lastCpuUsage','selfKey','_startAdmission','45WXtOGd','stats','--inspect','_rawDb','_drain','_supervisorKey','processing','_flushTimer','find','fts:reset','firstTs','inflightAgesMs','some','_rootDb','fast','repeat','threads','kind','(worst\x20','ref:violation_resolved','removeSync','stderr','okdb-writer:\x20env\x20closing\x20—\x20retry','ttl:expired','unref','_nestedWarned','all','commitsPerSec','setupPrimary','\x0a\x20\x20\x20\x20\x20\x20','error','processes','processor:progress','_participate','inst:','children','platform','kill','max','resetReadTxn','_handlePoke','registerIndex','~processes:cmd','sandbox','_markSeen','expiresAt','host','ppid','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','type:drop','listen','_baselines','namespace','ITEM_UPDATE','processor:error','index:reset','\x20—\x20','_refreshDesiredSnapshot','startedAt','12eNtROK','_highWater','ms\x20env=','addSupervisedChild','okdb-http-worker-child.js','dropType','\x20drainAge=','node:perf_hooks','crypto','offWindow','_writer','log','perf_hooks','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','\x20phase=','license:added','processors','appendFileSync','beforeWrite','_caps','_coordinator','unclaimed','_startHeartbeat','\x20writer{depth=','env','shift','\x20(slot=','_ownMeta','change','_cmd','putNode','removeNode','_putRowAsync','bus:proc','getProcess','push','delete','INDEX_PROGRESS','_collectWriterFacet','add','cluster-wide','\x0a===\x20OKDB_DIAG\x20','_ensureDesired','recordWrite','get','_committed','getDesired','_acquiredAt','info','data','depth','ready','min','dropFts','1ofN:','_sandbox','afterWrite','status','_versionSkewWarned','call','\x20worker(s)\x20remaining','http-server','createEnvironment','[okdb-cluster]\x20respawning\x20worker\x20slot=','entry','user','_onTick','claimGated','childTransaction','_outstanding','filter','ENV_CLOSING_RETRY',');\x20','_nodeDb','execArgv','mean','uptime','_onItem','node/','node:events','flushLmdb','caps','_onPoke','registry-publish',')\x20exited\x20','SIGKILL','prependListener','index:ready','\x20worker(s)\x20still\x20serving','killable','\x20ipc\x20error:\x20','_report','_inflight','_lastCpuAt','_dedupeKey','raw-put','clearTtl','--test','set','isDead','unhandledRejection','ITEM_REMOVE','_maybePublish','setSchema','connected','_enqueuedAt','_heartbeatInFlight','consecutiveFailures','ITEM_CREATE','sync','putSync','path','string','dropSchema','\x20oldestPendingMs=','flushed','ms\x20(attempt\x20','fanout','transaction','unique:violation','decommission','view:progress','getChanges','hasDesired','splice','type','keys','_kind','parkedNow','_threadStats','_started','put','draining','_lastPublishAt','committed','value','ESRCH','reject','12lEyLWe','disconnect','_listenAddr','_nodeDead','.log','memoryUsage','clearThreadStats','FTS_DROP','_heartbeatTimer','stopped','env:removed','inspect','worker','ref:violation','signalWant','commitP99Ms','_seen','_openEnvLazy','busy','workersConfigured','hasOwnProperty','_rowKey','bus:drain','heartbeatMs','_isStale','drain','_buildProcessingFacet','randomUUID','_removeRowAsync','events','_publishFailWarned','hostname','pushEphemeral','isWanted','creating','listAll','_timer','startHeartbeat','maxExtra','_held'];_0x3e77=function(){return _0x28d32a;};return _0x3e77();}