@kedem/okdb 2.6.2 → 2.6.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 _0x1383d2=_0x2fe0;(function(_0x5c2333,_0x5f14c6){const _0x1a5f2e=_0x2fe0,_0x195a68=_0x5c2333();while(!![]){try{const _0x4938e0=parseInt(_0x1a5f2e(0x2ad))/0x1*(-parseInt(_0x1a5f2e(0x11f))/0x2)+-parseInt(_0x1a5f2e(0x16e))/0x3+-parseInt(_0x1a5f2e(0x112))/0x4*(-parseInt(_0x1a5f2e(0x9d))/0x5)+parseInt(_0x1a5f2e(0x2a3))/0x6+parseInt(_0x1a5f2e(0x202))/0x7+-parseInt(_0x1a5f2e(0x22f))/0x8+parseInt(_0x1a5f2e(0x152))/0x9;if(_0x4938e0===_0x5f14c6)break;else _0x195a68['push'](_0x195a68['shift']());}catch(_0x49e39f){_0x195a68['push'](_0x195a68['shift']());}}}(_0x2b1c,0x45fc3));var require$$0$5=require(_0x1383d2(0x27c)),require$$1$1=require(_0x1383d2(0x87)),require$$1=require(_0x1383d2(0x189)),require$$0$3=require('os'),require$$2=require(_0x1383d2(0x133)),require$$0=require(_0x1383d2(0xd0)),require$$0$2=require(_0x1383d2(0x1b5)),require$$0$1=require('fs'),require$$0$4=require(_0x1383d2(0x2b4));function _0x2b1c(){const _0x3886ba=['loop-lag','warn','[okdb-cluster]\x20respawning\x20worker\x20slot=','start','inflightAgesMs','cli','_baselines','all','selfKey','oldestPendingMs','_getType','instanceId','isHeld','closed','disable','reap','getDesired','env','txn:rollback','hard-killed','SYSTEM_STOPPED','parse','_wantDb','nodesView','_admissionTimer','halted','writerStatus','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','close','committed','okdb-diag.','replace','processor','mkdirSync','_participate','indexOf','attachFeed','transaction','commit','fanout','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','dropIndex','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','isEnabled','FTS_RESET','_clusterWorkerAttached','true','FTS_DROP','draining','ttl:set','license:activated','extend','processor:retry','\x20drainAge=','49148UahuFx','2.6.2','list','rowKey','_publishNow','_openEnvLazy','listen','_heartbeatTimer','busy','_enqueuedAt','isConnected','setupPrimary','functions','2jkHriA','fork','_servingEngines','win32','listAll','maxMs','filter','listDesired','type:drop','_isWriter','\x20statusEnv=','_key','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','starting','dedupeMax','unref','msg','keys','external','FTS_REGISTERED','crypto','publishChildRow','addSupervisedChild','SYSTEM_POKE','treeView','code','beforeWrite','force','queue-worker','stringify','\x20died\x20','\x20pid=','raw-remove','processes','async','_lastCpuAt','_log','stderr','slotKey','has','caps','ITEM_UPDATE','openDB','\x20(slot=','hasDesired','compaction','uptime','_db','resetReadTxn','_refreshDesiredSnapshot','--test','4324842vmHtdJ','lifecycle','dropping','license:added','type','_wantDbHandle','_sandbox','view','_startAdmission','_rowKey','call','allSettled','change','--print','system:env_release','getCmd','processKey','SWAP','_durs','INDEX_RESET','http\x20worker\x20child\x20failed:\x20','_processStartedAt','stopHeartbeat','_putRowAsync','_handleInProcess','removeSync','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','_buildProcessingFacet','525708JeWVWM','heartbeatMs','ms\x20busy=','fn-runner','processor:resumed','waiting','send','_removeRowAsync','index:drop','_rootDb','_cmd','trim','_lockDb','engines','_children','sandbox','_inflight','_outstanding','exports','ORPHAN\x20(env-closed\x20write)','registerFts','_done','reportThreadStats','setOwnMeta','_migrateVocab','bus:type_drop','processingSig','path','envsOpen','isDead','events','_onItem','heapUsed','_startHeartbeat','detachConsole','\x20oldestPendingMs=','prependListener','_buildChildRow','dropFts','label','__vocab/version','_released','_nestedTotal','license:invalid','exit','_ownMeta','index:registered','_acquiredAt','system:stopped','listNodes','once','getProcess','_writer','write','getChanges','ephemeral','ttlMs','memoryUsage','size','field:resolver_registered','error:\x20','node','emit','cpuWindowMs','processor:paused','slice','dropType','count','some','message','processors','perf_hooks','withPoolHold','okdb-lock:\x20env\x20closed','_held','mean','okdb-writer:\x20env\x20closing\x20—\x20retry',')\x20exited\x20','_onProcEvent','\x20sync','threads','repeat','_highWater','processor:progress','_seen','getRange','children','options','primary','item:update','ttl:expired','max','claims','_pendingLocal','deaths','isActive','enabled','isWorker','setSchema','INDEX_REGISTERED','cluster:','_selfKey','_startedAt','building','disconnect','bumpCmd','_nodeDb','_quantum','dropSchema','getClock','setTtl','resetIndex','_buckets','removeNode','_systemEnv','_publishFailWarned','system:drain','_timer','standalone','_lastCpuPct','\x20writer{depth=','entry','index:progress','killable','index:reset','_desired',');\x20','freeze','hasOwnProperty','startedAt','--inspect','ITEM_REMOVE','supervisorKey','note','schema:drop','SIGKILL','_onPending','registry\x20publish\x20failing:\x20','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','drain','confirm','add','level','log','_heldTotal','listenAddr','find','.log','2143169gkLOnY','_changefeed','transactionSync','CHANGEFEED_QUANTUM','default','registerType','_closed','process\x20','_draining','ms\x20max=','entries','\x0a\x20\x20\x20\x20\x20\x20','_hbTimer','off','view:progress','_cursors','_lockDbOf','noteListenAddr','unclaimed','host','_clusterOnMessage','stopping','fts:drop','_lastPublishAt','_isStale','_singletonLock','single','system:clock_change','running','state','toISOString','value','_nestedWarned','_drain','user','toFixed','_rawDb','nodeKey','_admissionStarted','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','reduce','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_windowCbs','\x0a===\x20OKDB_DIAG\x20','randomUUID','3084888GdvEOo','_lastCpuUsage','stopped','online','flushLmdb','kind','_nodeDead','string','liveThreadStats','ensureType','env:opened','holder','_lock','processor:error','_kind','_buildOwnRow','test','creating','next','http-server','length','raw-put','maxExtra','shift','setDesired','_instanceId','SYSTEM_PROC','onWindow','bus:proc','ms\x20p99=','cursorKey','_threadStats','_wantDbOf','error','unhandledRejection','decommission','singletonClaims','_markSeen','_listenAddr','_role','rss','firstTs','\x20ipc\x20error:\x20','stack','consecutiveFailures','ms\x20on\x20env=','_desiredOverlay','none','workers','\x20forked\x20','_started','process','childTransaction','delete','http','commitsPerSec','catch','participate','paused','bus:env_release','system:bus_state_change','\x20\x20(no\x20env\x20draining)','putSync','embedded','now','started','migrations','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','object','~lock','heldBy','clusterStatusView','processor:ready','workersConfigured','version','heapTotal','respawnTimer','./okdb','dead','set','kill','ready','fromEntries','_adminRelay','sort','ITEM_CREATE','_drainOne','updatedAt','_nodeDbFor','stop','_onPoke','decommissioned','race','abs','system:poke','min','_ensureDesired','remove','_holderDead','status','_dedupeMax','_onTick','_statusEnv','_committed','uncaughtException','ESRCH','appendFileSync','data','removeSupervisedChild','MAX_POOL_HOLDS','pid','sync','join','execArgv','REMOVE','resetting','1862454kXvedg','commitP99Ms','role','get','map','enable','_heartbeatInFlight','updateSupervisedChildStats','VIEW_PROGRESS','_scheduleFlush','261895SVnmTq','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','_assertUsable','\x20===','_sampleOwnStats','feed:','processorId','node:events','dumpedAt','ref:violation_resolved','clear','parkedNow','[okdb-cluster]\x20','okdb','startsWith',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','deregisterSelf','expiresAt','[okdb-cluster]\x20worker\x20pid=','_collectWriterFacet','_dedupeKey','startHeartbeat','_handlePoke','claimGated','recordWrite','registerIndex','_isReader','ENV_CLOSING_RETRY','_putRowSync','hostname','cpuPct','\x20\x20env=','\x20@\x20','env:removed','system','register','__esModule','_supervisorKey','cluster','info','seq','null','cpus','item:pending','then','reset','_lastCpuWindowMs','_envs','put','_maybePublish','load','fts:reset','ttl:clear','floor','ms\x20env=','runtimeProcessesView','ms\x20(attempt\x20','__okdbCluster','\x20\x20#','pushEphemeral','5JJJTCm','round','stats','_bpWaiters','name','schema:set','number','type:registered','release','_collectSingletonClaims','decommissioning','_caps','afterWrite','ppid','values','\x20HTTP\x20server(s)\x20on\x20port\x20','\x20│\x20','open','\x20(durable\x20desired-state)','_groupByProcess','push','_coordinator','_report','meta','\x20times\x20in\x20',',\x20signal=','connected','fast','slot','_handlePending','_bpParkedTotal','~processes','namespace','acquiredAt','cpuUsage','ingest','clearThreadStats','quantum','--eval','putNode','processingStatusView','_pending','_flushTimer','includes','\x20in\x20','_versionSkewWarned','split','closing','resolve','percentile','processing','node:perf_hooks','function',':want','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','mode','_onStop','_enableChangelog','_flushDebounce','item:create','depth','node/','_singletonLocks'];_0x2b1c=function(){return _0x3886ba;};return _0x2b1c();}function getDefaultExportFromCjs(_0x74629d){const _0x30cfe9=_0x1383d2;return _0x74629d&&_0x74629d[_0x30cfe9(0x85)]&&Object['prototype'][_0x30cfe9(0x1ee)][_0x30cfe9(0x15c)](_0x74629d,_0x30cfe9(0x206))?_0x74629d[_0x30cfe9(0x206)]:_0x74629d;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5d88c7=_0x1383d2;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2d7f3e={'PUT':_0x5d88c7(0x91),'REMOVE':_0x5d88c7(0x290),'INDEX_DROP':_0x5d88c7(0x105),'INDEX_REGISTER':_0x5d88c7(0x2c6),'INDEX_RESET':_0x5d88c7(0x1dd),'TYPE_REGISTER':_0x5d88c7(0x207),'TYPE_DROP':_0x5d88c7(0x1b0),'FTS_REGISTER':_0x5d88c7(0x182),'FTS_DROP':_0x5d88c7(0x194),'FTS_RESET':'resetFts','SCHEMA_SET':_0x5d88c7(0x1d0),'SCHEMA_DROP':_0x5d88c7(0x1da),'TTL_SET':_0x5d88c7(0x1dc),'TTL_CLEAR':'clearTtl'},_0x347b32={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x5d88c7(0x1a9),'SYSTEM_STOPPED':_0x5d88c7(0x19e),'SYSTEM_CLOCK_CHANGE':_0x5d88c7(0x21d),'SYSTEM_POKE':_0x5d88c7(0x28d),'SYSTEM_DRAIN':_0x5d88c7(0x1e2),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x5d88c7(0x26b),'ITEM_CREATE':_0x5d88c7(0xd8),'ITEM_UPDATE':_0x5d88c7(0x1c7),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x5d88c7(0x8c),'INDEX_RESET':_0x5d88c7(0x1ea),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x5d88c7(0x1e8),'VIEW_PROGRESS':_0x5d88c7(0x210),'INDEX_DROP':_0x5d88c7(0x176),'INDEX_REGISTERED':_0x5d88c7(0x19c),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x5d88c7(0x218),'FTS_RESET':_0x5d88c7(0x94),'SCHEMA_SET':_0x5d88c7(0xa2),'SCHEMA_DROP':_0x5d88c7(0x1f4),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x5d88c7(0x2b6),'SYNC_APPLY':'sync:apply','TXN_START':'txn:start','TXN_END':'txn:end','TXN_ROLLBACK':_0x5d88c7(0xee),'TYPE_REGISTERED':_0x5d88c7(0xa4),'TYPE_DROP':_0x5d88c7(0x127),'ENV_OPENED':_0x5d88c7(0x239),'ENV_REMOVED':_0x5d88c7(0x82),'SYSTEM_ENV_RELEASE':_0x5d88c7(0x160),'TTL_EXPIRED':_0x5d88c7(0x1c8),'TTL_SET':_0x5d88c7(0x10d),'TTL_CLEAR':_0x5d88c7(0x95),'LICENSE_INVALID':_0x5d88c7(0x199),'LICENSE_ADDED':_0x5d88c7(0x155),'LICENSE_ACTIVATED':_0x5d88c7(0x10e),'LICENSE_REMOVED':'license:removed'},_0x56a2d1={'CREATING':_0x5d88c7(0x240),'RESETTING':_0x5d88c7(0x2a2),'READY':_0x5d88c7(0x280),'DROPPING':_0x5d88c7(0x154),'WAITING':_0x5d88c7(0x173),'ERROR':_0x5d88c7(0x250)},_0x49596c={'CREATED':'created','STARTING':_0x5d88c7(0x12c),'STARTED':_0x5d88c7(0x270),'STOPPING':_0x5d88c7(0x217),'STOPPED':'stopped'},_0x4b2fad={'CREATING':_0x5d88c7(0x240),'READY':'ready','HALTED':_0x5d88c7(0xf5),'STOPPED':_0x5d88c7(0x231),'RESETTING':_0x5d88c7(0x2a2)},_0x4c6601=Object[_0x5d88c7(0x1ed)]({'POKE':'bus:poke','DRAIN':'bus:drain','TYPE_DROP':_0x5d88c7(0x187),'PROC':_0x5d88c7(0x24b),'ENV_RELEASE':_0x5d88c7(0x26a)});return okdbEnums={'BUS_EVENTS':_0x4c6601,'CHANGE_ACTIONS':_0x2d7f3e,'EVENTS':_0x347b32,'INDEX_STATE':_0x56a2d1,'OKDB_STATE':_0x49596c,'VIEW_STATE':_0x4b2fad},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x4f3b4a=_0x1383d2;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2a1a5e,performance:_0x308b75}=require$$0,_0x1fe9fa=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x4f3b4a(0x10a),_0x5d2b2c=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2e4b6f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x465edc=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4a99b0{constructor(){const _0x13a8cf=_0x4f3b4a;this[_0x13a8cf(0x1ce)]=_0x1fe9fa,this[_0x13a8cf(0x1de)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x13a8cf(0x261)]=![],this[_0x13a8cf(0x143)]=(_0x1c7d7b,_0x2b8928)=>process[_0x13a8cf(0x144)][_0x13a8cf(0x1a3)](_0x1c7d7b+(_0x2b8928?'\x20'+JSON[_0x13a8cf(0x13c)](_0x2b8928):'')+'\x0a');}[_0x4f3b4a(0x26f)](){const _0x55a994=_0x4f3b4a;return _0x308b75[_0x55a994(0x26f)]();}['setLogger'](_0x1eae66){const _0x5064b4=_0x4f3b4a;if(typeof _0x1eae66==='function')this[_0x5064b4(0x143)]=_0x1eae66;}['note'](_0x4e9183,_0x38aa14,_0x331b1d){const _0x3b30bb=_0x4f3b4a;if(!this[_0x3b30bb(0x1ce)])return;let _0x1e8e71=this['_buckets'][_0x3b30bb(0x2a6)](_0x4e9183);!_0x1e8e71&&(_0x1e8e71={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x3b30bb(0x27e)](_0x4e9183,_0x1e8e71)),_0x1e8e71['ms']+=_0x38aa14,_0x1e8e71[_0x3b30bb(0x1b1)]+=0x1,_0x38aa14>_0x1e8e71[_0x3b30bb(0x124)]&&(_0x1e8e71[_0x3b30bb(0x124)]=_0x38aa14,_0x1e8e71['maxExtra']=_0x331b1d||'');}[_0x4f3b4a(0xdf)](_0x536abe){const _0x39b458=_0x4f3b4a;if(!this['enabled']||this[_0x39b458(0x261)])return;this[_0x39b458(0x261)]=!![];if(_0x536abe)this['_log']=_0x536abe;this['_h']=_0x2a1a5e({'resolution':0xa}),this['_h'][_0x39b458(0x2a8)](),this[_0x39b458(0x1e3)]=setInterval(()=>this[_0x39b458(0xb3)](),_0x5d2b2c);if(this[_0x39b458(0x1e3)]['unref'])this[_0x39b458(0x1e3)][_0x39b458(0x12e)]();}[_0x4f3b4a(0x24a)](_0x5ce18a){const _0xb86f69=_0x4f3b4a;if(!this['_windowCbs'])this[_0xb86f69(0x22c)]=new Set();this[_0xb86f69(0x22c)][_0xb86f69(0x1fb)](_0x5ce18a);if(!this[_0xb86f69(0x261)])this[_0xb86f69(0x15a)]();}['offWindow'](_0x5340ca){const _0x3099c7=_0x4f3b4a;this['_windowCbs']?.[_0x3099c7(0x264)](_0x5340ca);}[_0x4f3b4a(0x15a)](){const _0xf4cabe=_0x4f3b4a;if(this[_0xf4cabe(0x228)])return;this[_0xf4cabe(0x228)]=!![];!this['_h']&&(this['_h']=_0x2a1a5e({'resolution':0xa}),this['_h'][_0xf4cabe(0x2a8)]());const _0x1b468b=_0x5d2b2c;this[_0xf4cabe(0xf4)]=setInterval(()=>{const _0x2761f2=_0xf4cabe,_0x477886=this['_h'];if(!_0x477886)return;const _0x4bfa40=_0x477886[_0x2761f2(0xce)](0x63)/0xf4240,_0x5d2970=_0x477886[_0x2761f2(0x1c9)]/0xf4240,_0x48f5c4=_0x477886[_0x2761f2(0x1b9)]/0xf4240;_0x477886[_0x2761f2(0x8e)]();if(this[_0x2761f2(0x22c)])for(const _0x5872a2 of this['_windowCbs']){try{_0x5872a2({'p99Ms':_0x4bfa40,'maxMs':_0x5d2970,'meanMs':_0x48f5c4,'reportMs':_0x1b468b});}catch{}}},_0x1b468b);if(this[_0xf4cabe(0xf4)][_0xf4cabe(0x12e)])this['_admissionTimer'][_0xf4cabe(0x12e)]();}[_0x4f3b4a(0xb3)](){const _0x33f508=_0x4f3b4a,_0xd7706e=this['_h'],_0x80922=_0xd7706e['max']/0xf4240,_0x2d7fbc=_0xd7706e[_0x33f508(0xce)](0x63)/0xf4240,_0x3fb118=_0xd7706e[_0x33f508(0x1b9)]/0xf4240;_0xd7706e[_0x33f508(0x8e)]();const _0x5e3ac0=[...this[_0x33f508(0x1de)][_0x33f508(0x20c)]()][_0x33f508(0x2a7)](([_0x46108f,_0x19d38a])=>({'label':_0x46108f,..._0x19d38a}))[_0x33f508(0x283)]((_0x31d0fe,_0x44fc28)=>_0x44fc28['ms']-_0x31d0fe['ms'])[_0x33f508(0x1af)](0x0,0x8);this[_0x33f508(0x1de)][_0x33f508(0x2b7)]();const _0x38cad4=_0x5e3ac0[_0x33f508(0x22a)]((_0x4f4e21,_0xc1c24e)=>_0x4f4e21+_0xc1c24e['ms'],0x0),_0x3ddbd1=_0x5e3ac0[_0x33f508(0x2a7)](_0x5ed4ef=>_0x5ed4ef[_0x33f508(0x195)]+'='+_0x5ed4ef['ms']['toFixed'](0x0)+'ms/'+_0x5ed4ef[_0x33f508(0x1b1)]+(_0x5ed4ef[_0x33f508(0x124)]>0x5?'(worst\x20'+_0x5ed4ef[_0x33f508(0x124)][_0x33f508(0x225)](0x0)+'ms'+(_0x5ed4ef[_0x33f508(0x245)]?'\x20'+_0x5ed4ef[_0x33f508(0x245)]:'')+')':''));(_0x2e4b6f||_0x80922>=_0x465edc)&&this[_0x33f508(0x143)]('loop-lag\x20'+_0x5d2b2c+_0x33f508(0x20b)+_0x80922['toFixed'](0x0)+_0x33f508(0x24c)+_0x2d7fbc[_0x33f508(0x225)](0x0)+'ms\x20mean='+_0x3fb118['toFixed'](0x0)+_0x33f508(0x170)+_0x38cad4[_0x33f508(0x225)](0x0)+'ms'+(_0x3ddbd1[_0x33f508(0x243)]?_0x33f508(0xad)+_0x3ddbd1['join']('\x20\x20'):''),{'feature':_0x33f508(0xdc)});if(this[_0x33f508(0x22c)])for(const _0x168a43 of this[_0x33f508(0x22c)]){try{_0x168a43({'p99Ms':_0x2d7fbc,'maxMs':_0x80922,'meanMs':_0x3fb118,'reportMs':_0x5d2b2c});}catch{}}}[_0x4f3b4a(0x288)](){const _0x23b1af=_0x4f3b4a;if(this['_timer'])clearInterval(this[_0x23b1af(0x1e3)]);if(this['_h'])this['_h'][_0x23b1af(0xea)]();this[_0x23b1af(0x1e3)]=null,this['_h']=null,this['_started']=![];}}const _0x29cf64=new _0x4a99b0();if(_0x29cf64[_0x4f3b4a(0x1ce)])_0x29cf64[_0x4f3b4a(0xdf)]();return okdbLoopMonitor={'LOOP':_0x29cf64},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x5ac596=require$$0$1,_0x3f7c27=require$$1;let _0x423ae4,_0x3192a2,_0x12e525,_0x28d84c,_0x21637f,_0x122150,_0x58cab3,_0x2d7bdb=![];const _0x1bcbb3=new Set();let _0x3fd984=null;const _0x129f96=new Map();function _0xf2004b(){const _0x1f642f=_0x2fe0;if(_0x423ae4!==undefined)return _0x423ae4;_0x423ae4=process.env.OKDB_DIAG==='1';if(!_0x423ae4)return![];_0x3192a2=process.env.OKDB_DIAG_STACK==='1',_0x28d84c=Math[_0x1f642f(0x1c9)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x12e525=new Array(_0x28d84c),_0x21637f=0x0,_0x122150=0x0,_0x58cab3=process.env.OKDB_DIAG_DIR||null;if(_0x58cab3)try{_0x5ac596[_0x1f642f(0xfd)](_0x58cab3,{'recursive':!![]});}catch{}return!![];}function _0x146b36(){return _0x423ae4===undefined?_0xf2004b():_0x423ae4;}function _0x201422(_0xb08516,_0x132eb8){const _0x4f079d=_0x2fe0;if(_0x423ae4===undefined?!_0xf2004b():!_0x423ae4)return;let _0x3b4a83;if(_0x3192a2){const _0xc75c3f=new Error()['stack']||'';_0x3b4a83=_0xc75c3f[_0x4f079d(0xcb)]('\x0a')[_0x4f079d(0x1af)](0x3)['map'](_0x382fa4=>_0x382fa4[_0x4f079d(0x179)]())['filter'](Boolean)[_0x4f079d(0x1af)](0x0,0x8);}_0x12e525[_0x21637f]={'seq':_0x122150++,'t':Date['now'](),'env':_0xb08516,'kind':_0x132eb8||_0x4f079d(0x102),'stack':_0x3b4a83},_0x21637f=(_0x21637f+0x1)%_0x28d84c;}function _0x449182(_0x2ecd98){const _0x4828a4=[];for(let _0x56fc2b=0x0;_0x56fc2b<_0x28d84c;_0x56fc2b++){const _0x33a7c8=_0x12e525[(_0x21637f-0x1-_0x56fc2b+_0x28d84c*0x2)%_0x28d84c];if(!_0x33a7c8)continue;_0x4828a4['push'](_0x33a7c8);if(_0x4828a4['length']>=_0x2ecd98)break;}return _0x4828a4;}function _0x5b9e39(_0x2d153f){const _0x58a04b=_0x2fe0;try{process[_0x58a04b(0x144)]['write'](_0x2d153f+'\x0a');}catch{}if(_0x58cab3)try{_0x5ac596[_0x58a04b(0x299)](_0x3f7c27[_0x58a04b(0x29f)](_0x58cab3,_0x58a04b(0xfa)+process[_0x58a04b(0x29d)]+_0x58a04b(0x201)),_0x2d153f+'\x0a');}catch{}}function _0x13aad0(_0x669a6d){const _0x34b18d=_0x2fe0,_0x27b1b4=_0x449182(_0x669a6d);if(!_0x27b1b4[_0x34b18d(0x243)])return _0x34b18d(0x16c);const _0x674cf0=Date[_0x34b18d(0x26f)]();return _0x27b1b4['map'](_0x119efa=>{const _0x526c1d=_0x34b18d,_0x2ed6eb=_0x526c1d(0x9b)+_0x119efa[_0x526c1d(0x89)]+'\x20-'+(_0x674cf0-_0x119efa['t'])+_0x526c1d(0x97)+_0x119efa[_0x526c1d(0xed)]+'\x20'+_0x119efa[_0x526c1d(0x234)];return _0x119efa[_0x526c1d(0x25a)]&&_0x119efa['stack'][_0x526c1d(0x243)]?_0x2ed6eb+'\x0a\x20\x20\x20\x20\x20\x20'+_0x119efa[_0x526c1d(0x25a)][_0x526c1d(0x29f)](_0x526c1d(0x20d)):_0x2ed6eb;})[_0x34b18d(0x29f)]('\x0a');}function _0x29f1d4(_0x370f55,_0x5b4890){const _0x55b60c=_0x2fe0,_0x2555cb=_0x55b60c(0x22d)+_0x370f55+'\x20@\x20'+new Date()[_0x55b60c(0x220)]()+_0x55b60c(0x13e)+process[_0x55b60c(0x29d)]+_0x55b60c(0x2b0),_0x30df5e=[_0x2555cb,_0x55b60c(0x1aa)+(_0x5b4890&&_0x5b4890[_0x55b60c(0x25a)]?_0x5b4890[_0x55b60c(0x25a)][_0x55b60c(0xcb)]('\x0a')[0x0]:_0x5b4890),'recent\x20writes\x20(newest\x20first)'+(_0x3192a2?'':_0x55b60c(0x12b))+':',_0x13aad0(0x18),_0x3ea26b(),'='[_0x55b60c(0x1bf)](_0x2555cb['length']-0x1)];_0x5b9e39(_0x30df5e[_0x55b60c(0x29f)]('\x0a'));}function _0x2e7a6f(_0x3aa846){const _0x186c72=_0x2fe0;if(!_0x146b36())return;const _0x10a0f4=String(_0x3aa846&&_0x3aa846[_0x186c72(0x1b3)]||_0x3aa846||''),_0x151668=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x186c72(0x23f)](_0x10a0f4);_0x29f1d4(_0x151668?_0x186c72(0x181):_0x186c72(0x297),_0x3aa846);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x151668)return;try{console[_0x186c72(0x250)](_0x3aa846&&_0x3aa846['stack']?_0x3aa846[_0x186c72(0x25a)]:_0x3aa846);}catch{}process[_0x186c72(0x19a)](0x1);}function _0x5ea280(_0x2a01e1){const _0x724238=_0x2fe0;if(!_0x146b36())return;const _0x46384a=String(_0x2a01e1&&_0x2a01e1['message']||_0x2a01e1||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x724238(0x23f)](_0x46384a)&&_0x29f1d4(_0x724238(0xf7),_0x2a01e1);}function _0x3ea26b(){const _0x1492d6=_0x2fe0,_0x219486=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x5960f4=![];for(const _0x3c9e11 of _0x1bcbb3){const _0x29ba69=_0x3c9e11&&_0x3c9e11['_envs'];if(!_0x29ba69)continue;for(const [_0x313402,_0x15bdb7]of _0x29ba69){const _0x2a1829=_0x15bdb7&&_0x15bdb7[_0x1492d6(0xb2)]&&_0x15bdb7[_0x1492d6(0xb2)][_0x1492d6(0x159)];if(!_0x2a1829)continue;let _0x461cc2,_0x1fda55;try{_0x461cc2=Atomics[_0x1492d6(0x93)](_0x2a1829,0x0),_0x1fda55=Atomics[_0x1492d6(0x93)](_0x2a1829,0x1);}catch{continue;}if(_0x461cc2===0x0)continue;_0x5960f4=!![];const _0x5b6f83=_0x461cc2>0x0?_0x1492d6(0x163):'copy',_0x4ab0ce=Date[_0x1492d6(0x26f)]()-Math[_0x1492d6(0x28c)](_0x461cc2)*0x3e8,_0x11751b=((()=>{const _0x320057=_0x1492d6;try{return _0x15bdb7['_writer']&&_0x15bdb7['_writer'][_0x320057(0x292)]?_0x15bdb7[_0x320057(0x1a2)]['status']():null;}catch{return null;}})());_0x219486['push'](_0x1492d6(0x80)+_0x313402+'\x20phase='+_0x5b6f83+_0x1492d6(0x111)+_0x4ab0ce+'ms\x20activeWriters='+_0x1fda55+(_0x11751b?_0x1492d6(0x1e6)+_0x11751b[_0x1492d6(0xd9)]+_0x1492d6(0x191)+_0x11751b['oldestPendingMs']+'\x20parkedNow='+_0x11751b[_0x1492d6(0x2b8)]+'}':''));}}if(!_0x5960f4)_0x219486[_0x1492d6(0xb1)](_0x1492d6(0x26c));return _0x219486[_0x1492d6(0x29f)]('\x0a');}function _0x449e5c(){const _0x5d724f=_0x2fe0;if(!_0x146b36())return;const _0x2957bb=Math[_0x5d724f(0x1c9)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x57c5fd=Date[_0x5d724f(0x26f)]();for(const _0x3550cd of _0x1bcbb3){const _0x23ce32=_0x3550cd&&_0x3550cd['_envs'];if(!_0x23ce32)continue;for(const [_0x2485c2,_0x1688c7]of _0x23ce32){const _0x214ac7=_0x1688c7&&_0x1688c7[_0x5d724f(0xb2)]&&_0x1688c7['_coordinator'][_0x5d724f(0x159)];if(!_0x214ac7)continue;let _0x3c9903;try{_0x3c9903=Atomics[_0x5d724f(0x93)](_0x214ac7,0x0);}catch{continue;}const _0x37d6e7=_0x3550cd[_0x5d724f(0x189)]+'|'+_0x2485c2;if(_0x3c9903<=0x0){_0x129f96[_0x5d724f(0x264)](_0x37d6e7);continue;}const _0x4538be=_0x57c5fd-_0x3c9903*0x3e8,_0x526716=_0x129f96[_0x5d724f(0x2a6)](_0x37d6e7);if(_0x4538be<_0x2957bb)continue;if(_0x526716&&_0x57c5fd-_0x526716[_0x5d724f(0x2b5)]<_0x2957bb)continue;_0x129f96[_0x5d724f(0x27e)](_0x37d6e7,{'firstTs':_0x526716?_0x526716[_0x5d724f(0x258)]:_0x3c9903,'dumpedAt':_0x57c5fd});const _0x3ca92d=_0x5d724f(0x1f8)+_0x4538be+_0x5d724f(0x25c)+_0x2485c2+_0x5d724f(0x81)+new Date()[_0x5d724f(0x220)]()+_0x5d724f(0x13e)+process['pid']+_0x5d724f(0x2b0);_0x5b9e39([_0x3ca92d,_0x3ea26b(),'='[_0x5d724f(0x1bf)](_0x3ca92d['length']-0x1)]['join']('\x0a'));}}}function _0x14b00f(){const _0x47abd7=_0x2fe0;if(!_0x146b36()||_0x2d7bdb)return;_0x2d7bdb=!![],process[_0x47abd7(0x192)](_0x47abd7(0x297),_0x2e7a6f),process[_0x47abd7(0x192)](_0x47abd7(0x251),_0x5ea280);const _0x189803=Math[_0x47abd7(0x1c9)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x3fd984=setInterval(_0x449e5c,_0x189803);if(_0x3fd984[_0x47abd7(0x12e)])_0x3fd984[_0x47abd7(0x12e)]();}function _0x498b39(_0x242fa7){const _0x4a2093=_0x2fe0;if(!_0x146b36()||!_0x242fa7)return;_0x1bcbb3[_0x4a2093(0x1fb)](_0x242fa7),_0x14b00f();}function _0x19d505(_0x2c2b68){_0x1bcbb3['delete'](_0x2c2b68);}function _0x21e1b9(){if(!_0x146b36())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x3192a2,'recentWrites':_0x449182(0x10),'drain':_0x3ea26b()};}return okdbDiag={'isEnabled':_0x146b36,'recordWrite':_0x201422,'installDiag':_0x14b00f,'registerOkdb':_0x498b39,'unregisterOkdb':_0x19d505,'snapshot':_0x21e1b9},okdbDiag;}function _0x2fe0(_0xc0320e,_0x2fce2b){_0xc0320e=_0xc0320e-0x7c;const _0x2b1c79=_0x2b1c();let _0x2fe061=_0x2b1c79[_0xc0320e];return _0x2fe061;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x1cad83=_0x1383d2;if(hasRequiredOkdbWriter)return okdbWriter[_0x1cad83(0x180)];hasRequiredOkdbWriter=0x1;const {performance:_0xd2cf61}=require$$0$2,_0x23f70a=requireOkdbDiag(),_0x1b7eb3=process.env.OKDB_COMMIT_MODE===_0x1cad83(0x29e);class _0x587c12{constructor(_0x479ac1){const _0x21ea1c=_0x1cad83;this['env']=_0x479ac1,this[_0x21ea1c(0x17e)]=new Set(),this[_0x21ea1c(0x11b)]=new Map(),this[_0x21ea1c(0x296)]=0x0,this[_0x21ea1c(0x164)]=[],this['_done']=[],this[_0x21ea1c(0x1c0)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x21ea1c(0x17f)]=0x0,this[_0x21ea1c(0xa0)]=[],this['_bpParkedTotal']=0x0,this['_held']=null,this[_0x21ea1c(0x1fe)]=0x0,this[_0x21ea1c(0x198)]=0x0,this[_0x21ea1c(0x222)]=![];}async[_0x1cad83(0x101)](_0x3477da,_0x1f31e8,{admitted:admitted=![]}={}){const _0x4bbac6=_0x1cad83;if(_0x23f70a[_0x4bbac6(0x107)]())_0x23f70a[_0x4bbac6(0x2c5)](this['env']?.['name'],_0x1f31e8);if(this[_0x4bbac6(0x208)]){const _0x322321=new Error(_0x4bbac6(0x1ba));_0x322321[_0x4bbac6(0x138)]=_0x4bbac6(0x7c);throw _0x322321;}if(this['_highWater']>0x0){let _0x40f3f6=![];while(this[_0x4bbac6(0x17f)]>=this[_0x4bbac6(0x1c0)]&&!this[_0x4bbac6(0x208)]){!_0x40f3f6&&(_0x40f3f6=!![],this['_bpParkedTotal']++),await new Promise(_0x28296c=>this[_0x4bbac6(0xa0)]['push'](_0x28296c));}if(this[_0x4bbac6(0x208)]){const _0x36816e=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x36816e[_0x4bbac6(0x138)]=_0x4bbac6(0x7c);throw _0x36816e;}}this[_0x4bbac6(0x17f)]++;const _0x410451=admitted?null:this['env'][_0x4bbac6(0xb2)];for(;;){while(this[_0x4bbac6(0x1b8)])await this[_0x4bbac6(0x1b8)];if(_0x410451)try{await _0x410451[_0x4bbac6(0x139)]();}catch(_0x4d9346){this[_0x4bbac6(0x17f)]--;if(this[_0x4bbac6(0xa0)][_0x4bbac6(0x243)]&&this[_0x4bbac6(0x17f)]<this[_0x4bbac6(0x1c0)])this['_bpWaiters'][_0x4bbac6(0x246)]()();throw _0x4d9346;}if(!this[_0x4bbac6(0x1b8)])break;if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}if(this['_closed']){if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();this['_outstanding']--;if(this[_0x4bbac6(0xa0)][_0x4bbac6(0x243)]&&this[_0x4bbac6(0x17f)]<this[_0x4bbac6(0x1c0)])this[_0x4bbac6(0xa0)][_0x4bbac6(0x246)]()();const _0x19a865=new Error(_0x4bbac6(0x1ba));_0x19a865[_0x4bbac6(0x138)]='ENV_CLOSING_RETRY';throw _0x19a865;}const _0x4597fe=_0xd2cf61[_0x4bbac6(0x26f)]();if(_0x1b7eb3)try{const _0x4171e4=this[_0x4bbac6(0xed)]['db'][_0x4bbac6(0x204)](_0x3477da);this[_0x4bbac6(0x296)]++;if(this[_0x4bbac6(0x164)][_0x4bbac6(0xb1)](_0xd2cf61[_0x4bbac6(0x26f)]()-_0x4597fe)>0x100)this[_0x4bbac6(0x164)]['shift']();if(this[_0x4bbac6(0x183)][_0x4bbac6(0xb1)](_0xd2cf61[_0x4bbac6(0x26f)]())>0x800)this[_0x4bbac6(0x183)][_0x4bbac6(0x246)]();return _0x4171e4;}finally{this[_0x4bbac6(0x17f)]--;if(this['_bpWaiters'][_0x4bbac6(0x243)]&&this['_outstanding']<this[_0x4bbac6(0x1c0)])this[_0x4bbac6(0xa0)][_0x4bbac6(0x246)]()();if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}let _0x3bb020=null;const _0x3b04e8=()=>{const _0x44f4fb=_0x4bbac6,_0x5bc8c7=_0x3477da();if(_0x5bc8c7&&typeof _0x5bc8c7[_0x44f4fb(0x8d)]==='function'&&!_0x3bb020){this['_heldTotal']++;let _0x165da5;const _0x580d36=new Promise(_0x272dde=>_0x165da5=_0x272dde);this['_held']=_0x580d36,_0x3bb020=()=>{if(this['_held']===_0x580d36)this['_held']=null;_0x165da5();};}return _0x5bc8c7;};let _0x12613e;try{_0x12613e=this[_0x4bbac6(0xed)]['db'][_0x4bbac6(0x263)](_0x3b04e8);}catch(_0x1cacde){_0x12613e=Promise['reject'](_0x1cacde);}(!_0x12613e||typeof _0x12613e['then']!=='function')&&(this['_nestedTotal']++,!this[_0x4bbac6(0x222)]&&(this[_0x4bbac6(0x222)]=!![],console[_0x4bbac6(0xdd)]('okdb-writer['+(this['env']?.[_0x4bbac6(0xa1)]??'?')+']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller')),_0x12613e=Promise[_0x4bbac6(0xcd)](_0x12613e));const _0x3f3d06=()=>{if(_0x3bb020)_0x3bb020();};_0x12613e[_0x4bbac6(0x8d)](_0x3f3d06,_0x3f3d06),this[_0x4bbac6(0x17e)][_0x4bbac6(0x1fb)](_0x12613e),this[_0x4bbac6(0x11b)][_0x4bbac6(0x27e)](_0x12613e,_0x4597fe);const _0x782c1d=()=>{const _0x515bcb=_0x4bbac6;this[_0x515bcb(0x17e)]['delete'](_0x12613e),this[_0x515bcb(0x11b)]['delete'](_0x12613e),this[_0x515bcb(0x296)]++,this[_0x515bcb(0x17f)]--;this['_bpWaiters'][_0x515bcb(0x243)]&&this[_0x515bcb(0x17f)]<this[_0x515bcb(0x1c0)]&&this['_bpWaiters'][_0x515bcb(0x246)]()();if(this[_0x515bcb(0x164)]['push'](_0xd2cf61[_0x515bcb(0x26f)]()-_0x4597fe)>0x100)this[_0x515bcb(0x164)][_0x515bcb(0x246)]();if(this['_done'][_0x515bcb(0xb1)](_0xd2cf61['now']())>0x800)this[_0x515bcb(0x183)]['shift']();};_0x12613e[_0x4bbac6(0x8d)](_0x782c1d,_0x782c1d);try{return await _0x12613e;}finally{if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}}[_0x1cad83(0x292)](){const _0x3eebb2=_0x1cad83,_0x321f6a=_0xd2cf61[_0x3eebb2(0x26f)]();let _0x11d0bc=0x0;for(const _0x48b3a3 of this[_0x3eebb2(0x11b)][_0x3eebb2(0xab)]()){const _0x1db7f9=_0x321f6a-_0x48b3a3;if(_0x1db7f9>_0x11d0bc)_0x11d0bc=_0x1db7f9;}let _0x4dbe5d=0x0;for(let _0x5353a7=this[_0x3eebb2(0x183)]['length']-0x1;_0x5353a7>=0x0;_0x5353a7--){if(_0x321f6a-this[_0x3eebb2(0x183)][_0x5353a7]>0x3e8)break;_0x4dbe5d++;}let _0x3d68f3=0x0;if(this[_0x3eebb2(0x164)]['length']){const _0x440cfa=[...this[_0x3eebb2(0x164)]][_0x3eebb2(0x283)]((_0x3a1c79,_0x268c50)=>_0x3a1c79-_0x268c50);_0x3d68f3=_0x440cfa[Math[_0x3eebb2(0x28e)](_0x440cfa[_0x3eebb2(0x243)]-0x1,Math[_0x3eebb2(0x96)](_0x440cfa['length']*0.99))];}return{'depth':this[_0x3eebb2(0x17e)][_0x3eebb2(0x1a8)],'oldestPendingMs':Math[_0x3eebb2(0x9e)](_0x11d0bc),'committed':this[_0x3eebb2(0x296)],'commitsPerSec':_0x4dbe5d,'commitP99Ms':Math[_0x3eebb2(0x9e)](_0x3d68f3),'parkedNow':this[_0x3eebb2(0xa0)]['length'],'parkedTotal':this[_0x3eebb2(0xbb)],'highWater':this['_highWater']};}[_0x1cad83(0xe0)](){const _0x340bbc=_0x1cad83,_0x443186=_0xd2cf61[_0x340bbc(0x26f)]();return[...this['_enqueuedAt'][_0x340bbc(0xab)]()][_0x340bbc(0x2a7)](_0x3d31c6=>Math[_0x340bbc(0x9e)](_0x443186-_0x3d31c6))[_0x340bbc(0x283)]((_0x3d3dca,_0x1c87ad)=>_0x1c87ad-_0x3d3dca);}['markClosed'](){const _0x56fea1=_0x1cad83;this['_closed']=!![];for(const _0xc5a57b of this[_0x56fea1(0xa0)]['splice'](0x0))_0xc5a57b();}async[_0x1cad83(0x1f9)](){const _0x44a7ad=_0x1cad83;let _0x505298=0x0;while(this['_inflight'][_0x44a7ad(0x1a8)]&&_0x505298++<0x3e8){await Promise[_0x44a7ad(0x15d)]([...this['_inflight']]);}}async['put'](_0x58b2a1,_0x2db002,_0x526f8f,_0x489d45){const _0x28bf2f=_0x1cad83;return this[_0x28bf2f(0x101)](()=>{const _0x38b308=_0x28bf2f;if(_0x489d45===undefined)_0x58b2a1[_0x38b308(0x26d)](_0x2db002,_0x526f8f);else _0x58b2a1[_0x38b308(0x26d)](_0x2db002,_0x526f8f,_0x489d45);},_0x28bf2f(0x244));}async[_0x1cad83(0x290)](_0x264d57,_0x5795ba){const _0x35e248=_0x1cad83;return this[_0x35e248(0x101)](()=>_0x264d57[_0x35e248(0x16b)](_0x5795ba),_0x35e248(0x13f));}}async function _0x2b4714(_0x4d40fa,_0x59a054){const _0x3f4810=_0x1cad83;if(_0x59a054==null)_0x59a054=Math[_0x3f4810(0x1c9)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x20200c=_0x4d40fa?.['flushed'];if(!_0x20200c||typeof _0x20200c[_0x3f4810(0x8d)]!==_0x3f4810(0xd1))return;await Promise[_0x3f4810(0x28b)]([Promise['resolve'](_0x20200c)[_0x3f4810(0x267)](()=>{}),new Promise(_0x4db935=>{const _0x431a55=_0x3f4810,_0x4d8ec7=setTimeout(_0x4db935,_0x59a054);if(_0x4d8ec7['unref'])_0x4d8ec7[_0x431a55(0x12e)]();})]);}catch{}}function _0x5974cc(_0x1b0aca){const _0x4fd484=_0x1cad83;if(_0x1b7eb3)return Promise[_0x4fd484(0xcd)]();const _0x1144c5=_0x1b0aca?.[_0x4fd484(0xf9)];return _0x1144c5&&typeof _0x1144c5[_0x4fd484(0x8d)]==='function'?_0x1144c5:Promise[_0x4fd484(0xcd)]();}const _0x27462c=Math[_0x1cad83(0x1c9)](0x1,Math['floor'](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x187185=Math[_0x1cad83(0x1c9)](0x1,_0x27462c-0x2);let _0x21b5c3=0x0;const _0xdb11df=[];async function _0x3dd99f(_0x5705ff){const _0x54af2b=_0x1cad83;if(_0x21b5c3<_0x187185)_0x21b5c3++;else await new Promise(_0x3e4d4d=>_0xdb11df[_0x54af2b(0xb1)](_0x3e4d4d));try{return await _0x5705ff();}finally{const _0xe7ace9=_0xdb11df[_0x54af2b(0x246)]();if(_0xe7ace9)_0xe7ace9();else _0x21b5c3--;}}return okdbWriter[_0x1cad83(0x180)]=_0x587c12,okdbWriter['exports'][_0x1cad83(0x1b6)]=_0x3dd99f,okdbWriter[_0x1cad83(0x180)][_0x1cad83(0x29c)]=_0x187185,okdbWriter['exports'][_0x1cad83(0x233)]=_0x2b4714,okdbWriter[_0x1cad83(0x180)][_0x1cad83(0xf9)]=_0x5974cc,okdbWriter[_0x1cad83(0x180)]['SYNC_COMMITS']=_0x1b7eb3,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x3202ed=_0x1383d2;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4cbc8c=require$$0$3,{SYNC_COMMITS:_0x5687fd}=requireOkdbWriter(),_0x48ddc8=_0x3202ed(0x274);class _0x3431a6{constructor(_0x408933,_0x5a4957,_0x1f2515){const _0x53c249=_0x3202ed;this[_0x53c249(0x23b)]=_0x408933,this[_0x53c249(0x12a)]=_0x5a4957,this['_acquiredAt']=_0x1f2515,this[_0x53c249(0x197)]=![],this[_0x53c249(0x119)]=null,this['_heartbeatInFlight']=null;}[_0x3202ed(0xe8)](){const _0x37aa26=_0x3202ed;if(this[_0x37aa26(0x197)])return![];try{const _0x22cc76=this[_0x37aa26(0x23b)][_0x37aa26(0x14e)]()[_0x37aa26(0x2a6)](this['_key']);if(!_0x22cc76||_0x22cc76['acquiredAt']!==this[_0x37aa26(0x19d)])return![];const _0x4460c6=_0x22cc76['updatedAt']??_0x22cc76[_0x37aa26(0xbe)];if(_0x4460c6+_0x22cc76[_0x37aa26(0x1a6)]<Date[_0x37aa26(0x26f)]())return![];return!![];}catch{return!this[_0x37aa26(0x197)];}}[_0x3202ed(0x23a)](){const _0x79336f=_0x3202ed;if(this[_0x79336f(0x197)])return null;try{return this['_lock'][_0x79336f(0x14e)]()[_0x79336f(0x2a6)](this[_0x79336f(0x12a)])??null;}catch{return null;}}async[_0x3202ed(0x10f)](_0x4bd86f){const _0x1efb97=_0x3202ed;if(this['_released'])return;try{if(this[_0x1efb97(0x23b)][_0x1efb97(0x208)]())return;const _0x187afa=this['_lock']['_db']()[_0x1efb97(0x2a6)](this[_0x1efb97(0x12a)]);if(!_0x187afa||_0x187afa[_0x1efb97(0xbe)]!==this[_0x1efb97(0x19d)])return;if(_0x5687fd)this[_0x1efb97(0x23b)]['_db']()['putSync'](this[_0x1efb97(0x12a)],{..._0x187afa,'ttlMs':_0x187afa[_0x1efb97(0x1a6)]+_0x4bd86f});else await this[_0x1efb97(0x23b)][_0x1efb97(0x14e)]()[_0x1efb97(0x91)](this['_key'],{..._0x187afa,'ttlMs':_0x187afa[_0x1efb97(0x1a6)]+_0x4bd86f});}catch{}}async[_0x3202ed(0xa5)](){const _0x58df2e=_0x3202ed;if(this['_released'])return;if(this['_heartbeatInFlight'])try{await this[_0x58df2e(0x2a9)];}catch{}clearInterval(this[_0x58df2e(0x119)]),this[_0x58df2e(0x119)]=null,this[_0x58df2e(0x197)]=!![];try{if(this[_0x58df2e(0x23b)][_0x58df2e(0x208)]())return;const _0x534d52=this[_0x58df2e(0x23b)]['_db']()[_0x58df2e(0x2a6)](this['_key']);if(_0x534d52&&_0x534d52[_0x58df2e(0xbe)]===this[_0x58df2e(0x19d)]){if(_0x5687fd)this[_0x58df2e(0x23b)]['_db']()[_0x58df2e(0x16b)](this[_0x58df2e(0x12a)]);else await this[_0x58df2e(0x23b)][_0x58df2e(0x14e)]()[_0x58df2e(0x290)](this[_0x58df2e(0x12a)]);}}catch{}}[_0x3202ed(0x18f)](_0x22351e,_0x3a5623){const _0x563e8d=_0x3202ed,_0x3b2c8a=_0x3a5623??Math[_0x563e8d(0x96)](_0x22351e/0x3);this['_heartbeatTimer']=setInterval(()=>{const _0x51fdb8=_0x563e8d;if(this[_0x51fdb8(0x197)])return;this[_0x51fdb8(0x2a9)]=((async()=>{const _0x415243=_0x51fdb8;try{if(this['_lock'][_0x415243(0x208)]())return;const _0x34c80c=this[_0x415243(0x23b)]['_db']()['get'](this['_key']);if(!_0x34c80c||_0x34c80c[_0x415243(0xbe)]!==this[_0x415243(0x19d)]){this[_0x415243(0x197)]=!![],clearInterval(this[_0x415243(0x119)]),this['_heartbeatTimer']=null;return;}if(_0x5687fd)this['_lock']['_db']()[_0x415243(0x26d)](this[_0x415243(0x12a)],{..._0x34c80c,'updatedAt':Date[_0x415243(0x26f)]()});else await this[_0x415243(0x23b)][_0x415243(0x14e)]()[_0x415243(0x91)](this[_0x415243(0x12a)],{..._0x34c80c,'updatedAt':Date[_0x415243(0x26f)]()});}catch{}this[_0x415243(0x2a9)]=null;})());},_0x3b2c8a);if(this[_0x563e8d(0x119)]['unref'])this[_0x563e8d(0x119)][_0x563e8d(0x12e)]();}}class _0x312597{constructor(_0x4434d8,{namespace:_0x306af2,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x1e5b81=_0x3202ed;this['_rawDb']=_0x4434d8,this['namespace']=_0x306af2,this[_0x1e5b81(0x1a6)]=ttlMs,this[_0x1e5b81(0x16f)]=heartbeatMs,this[_0x1e5b81(0x17a)]=null;}[_0x3202ed(0x14e)](){const _0x3c0763=_0x3202ed;return this[_0x3c0763(0x2af)](),(!this[_0x3c0763(0x17a)]||this[_0x3c0763(0x212)]!==this['_rawDb'])&&(this['_lockDb']=this[_0x3c0763(0x226)]['openDB'](_0x48ddc8,{'dupSort':![]}),this[_0x3c0763(0x212)]=this[_0x3c0763(0x226)]),this[_0x3c0763(0x17a)];}[_0x3202ed(0xf2)](){const _0x19a85e=_0x3202ed;return this['_assertUsable'](),(!this['_wantDbHandle']||this['_wantDbOf']!==this[_0x19a85e(0x226)])&&(this[_0x19a85e(0x157)]=this[_0x19a85e(0x226)]['openDB'](_0x48ddc8+_0x19a85e(0xd2),{'dupSort':![]}),this[_0x19a85e(0x24f)]=this[_0x19a85e(0x226)]),this['_wantDbHandle'];}[_0x3202ed(0x208)](){const _0x59e983=_0x3202ed,_0x2b2c4d=this[_0x59e983(0x226)]?.[_0x59e983(0x292)];return _0x2b2c4d===_0x59e983(0xcc)||_0x2b2c4d===_0x59e983(0xe9);}[_0x3202ed(0x2af)](){const _0xd9709a=_0x3202ed;if(this[_0xd9709a(0x208)]())throw new Error(_0xd9709a(0x1b7));}[_0x3202ed(0x12a)](_0x10493d){const _0x27d9e6=_0x3202ed;return this[_0x27d9e6(0xbd)]+':'+_0x10493d;}['signalWant'](_0x47367d){const _0x1f9127=_0x3202ed;try{if(this[_0x1f9127(0x208)]())return;_0x5687fd?this[_0x1f9127(0xf2)]()[_0x1f9127(0x26d)](this[_0x1f9127(0x12a)](_0x47367d),Date[_0x1f9127(0x26f)]()):this['_wantDb']()[_0x1f9127(0x91)](this[_0x1f9127(0x12a)](_0x47367d),Date['now']())?.[_0x1f9127(0x267)]?.(()=>{});}catch{}}['isWanted'](_0x2ba853,_0x2dd0d2=0x3e8){const _0x5858e2=_0x3202ed;try{const _0x1ab23f=this['_wantDb']()['get'](this[_0x5858e2(0x12a)](_0x2ba853));return typeof _0x1ab23f===_0x5858e2(0xa3)&&Date[_0x5858e2(0x26f)]()-_0x1ab23f<_0x2dd0d2;}catch{return![];}}[_0x3202ed(0x21a)](_0x30ab70){const _0x47158f=_0x3202ed,_0x6f1c4=_0x30ab70['updatedAt']??_0x30ab70[_0x47158f(0xbe)];return _0x6f1c4+_0x30ab70[_0x47158f(0x1a6)]<Date[_0x47158f(0x26f)]();}static[_0x3202ed(0x291)](_0x374c6b){const _0x4e064f=_0x3202ed,_0x5510f3=_0x374c6b?.[_0x4e064f(0x23a)];if(!_0x5510f3||typeof _0x5510f3[_0x4e064f(0x29d)]!=='number')return![];if(_0x5510f3[_0x4e064f(0x7e)]!==_0x4cbc8c['hostname']())return![];if(_0x5510f3[_0x4e064f(0x29d)]===process['pid'])return![];try{return process[_0x4e064f(0x27f)](_0x5510f3[_0x4e064f(0x29d)],0x0),![];}catch(_0x4f5b8){return _0x4f5b8[_0x4e064f(0x138)]===_0x4e064f(0x298);}}async['tryAcquire'](_0x495ffc,_0x2b7d12={},_0x4a35d8={}){const _0x5f25d6=_0x3202ed,_0x33674c=this['_key'](_0x495ffc),_0x1a1914=_0x4a35d8[_0x5f25d6(0x1a6)]??this[_0x5f25d6(0x1a6)],_0x72d2e2=Date[_0x5f25d6(0x26f)](),_0x785956={'holder':{'pid':process[_0x5f25d6(0x29d)],'hostname':_0x4cbc8c[_0x5f25d6(0x7e)](),..._0x2b7d12},'acquiredAt':_0x72d2e2,'updatedAt':_0x72d2e2,'ttlMs':_0x1a1914};let _0x20eb90=![],_0x10ff53=null;if(this[_0x5f25d6(0x208)]())return{'acquired':![],'handle':null,'current':null};try{const _0x35cdcc=()=>{const _0x5a724b=_0x5f25d6,_0x352f3a=this[_0x5a724b(0x14e)]()[_0x5a724b(0x2a6)](_0x33674c);if(_0x352f3a&&!this['_isStale'](_0x352f3a)&&!_0x312597[_0x5a724b(0x291)](_0x352f3a)){const _0x1b396c=_0x2b7d12[_0x5a724b(0x2b3)]!=null&&_0x352f3a[_0x5a724b(0x23a)][_0x5a724b(0x29d)]===process[_0x5a724b(0x29d)]&&_0x352f3a['holder'][_0x5a724b(0x2b3)]===_0x2b7d12[_0x5a724b(0x2b3)];if(!_0x1b396c){_0x20eb90=![],_0x10ff53=_0x352f3a;return;}_0x785956['acquiredAt']<=_0x352f3a[_0x5a724b(0xbe)]&&(_0x785956['acquiredAt']=_0x352f3a[_0x5a724b(0xbe)]+0x1,_0x785956[_0x5a724b(0x286)]=_0x785956[_0x5a724b(0xbe)]);}this[_0x5a724b(0x14e)]()[_0x5a724b(0x91)](_0x33674c,_0x785956),_0x20eb90=!![],_0x10ff53=_0x785956;};if(_0x5687fd)this[_0x5f25d6(0x14e)]()[_0x5f25d6(0x204)](_0x35cdcc);else await this[_0x5f25d6(0x14e)]()[_0x5f25d6(0x263)](_0x35cdcc);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x20eb90)return{'acquired':![],'handle':null,'current':_0x10ff53};const _0x287960=new _0x3431a6(this,_0x33674c,_0x785956[_0x5f25d6(0xbe)]);return _0x287960[_0x5f25d6(0x18f)](_0x1a1914,this[_0x5f25d6(0x16f)]),{'acquired':!![],'handle':_0x287960,'current':_0x10ff53};}['inspect'](_0x12d61e){const _0x5be763=_0x3202ed;try{return this['_db']()['get'](this[_0x5be763(0x12a)](_0x12d61e))??null;}catch{return null;}}['list'](){const _0x452f21=_0x3202ed,_0x48e7ba=this[_0x452f21(0xbd)]+':',_0x14721c=[];try{for(const {key:_0xd2ea04,value:_0x32a989}of this[_0x452f21(0x14e)]()[_0x452f21(0x1c3)]({'start':_0x48e7ba,'end':_0x48e7ba+'\xff'})){typeof _0xd2ea04==='string'&&_0xd2ea04[_0x452f21(0x2bb)](_0x48e7ba)&&_0x14721c[_0x452f21(0xb1)]({'id':_0xd2ea04[_0x452f21(0x1af)](_0x48e7ba[_0x452f21(0x243)]),'entry':_0x32a989});}}catch{}return _0x14721c;}static[_0x3202ed(0x123)](_0x441f8f){const _0x301bf7=_0x3202ed,_0x1e075b=[];try{const _0x5692c9=_0x441f8f[_0x301bf7(0x149)](_0x48ddc8,{'dupSort':![]});for(const {key:_0x2b1af3,value:_0x6f5540}of _0x5692c9[_0x301bf7(0x1c3)]({})){if(typeof _0x2b1af3!==_0x301bf7(0x236))continue;const _0x2192c1=_0x2b1af3[_0x301bf7(0xff)](':');if(_0x2192c1<0x1)continue;_0x1e075b[_0x301bf7(0xb1)]({'namespace':_0x2b1af3[_0x301bf7(0x1af)](0x0,_0x2192c1),'id':_0x2b1af3[_0x301bf7(0x1af)](_0x2192c1+0x1),'entry':_0x6f5540});}}catch{}return _0x1e075b;}}return okdbLock={'OKDBLock':_0x312597},okdbLock;}var version=_0x1383d2(0x113),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x31854b=_0x1383d2;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x38474c=require$$0$3,_0x3c5db5=require$$1$1,_0x12e936=require$$2,{LOOP:_0x212f76}=requireOkdbLoopMonitor(),{OKDBLock:_0x5e0e06}=requireOkdbLock(),{SYNC_COMMITS:_0x4d57ac}=requireOkdbWriter(),_0x4181c5=_0x31854b(0xbc),_0x5f0107=_0x31854b(0x1ab),_0xd36915='~processes:desired',_0x404721='~processes:cmd',_0x5bb0f0=(_0x56bbd3,_0x2d9283)=>_0x56bbd3+':'+_0x2d9283,_0x53f064=(_0x325791,_0x231392)=>_0x325791+'::'+_0x231392,_0x10a4ca=(_0x45768f,_0xe3427e)=>_0x45768f+'/'+_0xe3427e,_0x155c92=(_0x3ec002,_0x38ce6b)=>_0x3ec002+'#'+_0x38ce6b,_0x113fc1=_0x292194=>{const _0x102bbe=_0x31854b;if(_0x292194?.[_0x102bbe(0x162)])return _0x292194[_0x102bbe(0x162)];const _0x142e49=_0x292194?.[_0x102bbe(0x227)];return typeof _0x142e49===_0x102bbe(0x236)&&_0x142e49[_0x102bbe(0xc8)]('#')?_0x142e49[_0x102bbe(0x1af)](0x0,_0x142e49[_0x102bbe(0xff)]('#')):_0x142e49;},_0x1cffbf=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1d6332=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5397d1=_0x1cffbf*0x3,_0x2f75bf=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x31854b(0x1c9)](0x927c0,_0x5397d1*0x14),_0x218a3d=[_0x31854b(0x1c1),_0x31854b(0x277),_0x31854b(0x110),_0x31854b(0x23c),_0x31854b(0x1ae),_0x31854b(0x172)];let _0x371ab4=null;function _0x3b877a(){const _0x14a56f=_0x31854b;if(_0x371ab4==null)_0x371ab4=Math[_0x14a56f(0x9e)]((Date[_0x14a56f(0x26f)]()-process[_0x14a56f(0x14d)]()*0x3e8)/0x3e8)*0x3e8;return _0x371ab4;}function _0x57b2dd(_0x5230df){const _0xb64131=_0x31854b;if(process.env.OKDB_PROCESS_KILL===_0xb64131(0x20f))return![];if(_0x5230df?.[_0xb64131(0x1c5)]?.[_0xb64131(0x140)]&&typeof _0x5230df['options'][_0xb64131(0x140)]===_0xb64131(0x273)&&_0x5230df['options']['processes']['kill']===![])return![];return!![];}function _0x52c120(_0x1469a8,_0x55ad77){const _0x5ecf50=_0x31854b,_0x32ac92=!!_0x55ad77?.[_0x5ecf50(0x1b4)];switch(_0x1469a8){case _0x5ecf50(0x1c6):return{'controllable':_0x32ac92,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x5ecf50(0xe1):case _0x5ecf50(0x1e4):return{'controllable':_0x32ac92,'decommissionable':![],'killable':!![],'killConfirm':_0x5ecf50(0x1fa)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x5ecf50(0x242):case _0x5ecf50(0x13b):case _0x5ecf50(0x171):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5ecf50(0x13a)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x4b6f2f{constructor(_0x1d334b){const _0x502a1e=_0x31854b;this[_0x502a1e(0x2ba)]=_0x1d334b,this['_statusEnv']=null,this['_desired']=null,this[_0x502a1e(0x25d)]=new Map(),this['_cmd']=null,this[_0x502a1e(0x128)]=![],this[_0x502a1e(0x2c7)]=![],this[_0x502a1e(0x167)]=_0x3b877a(),this['_selfKey']=_0x5bb0f0(process[_0x502a1e(0x29d)],this[_0x502a1e(0x167)]),this['_instanceId']=_0x12e936[_0x502a1e(0x22e)]()[_0x502a1e(0x1af)](0x0,0x8),this['_rowKey']=_0x155c92(this[_0x502a1e(0x1d3)],this[_0x502a1e(0x248)]),this['_startedAt']=Date[_0x502a1e(0x26f)](),this[_0x502a1e(0x23d)]=null,this[_0x502a1e(0x86)]=null,this[_0x502a1e(0x255)]=null,this[_0x502a1e(0x20e)]=null,this[_0x502a1e(0x1bc)]=null,this['_onTick']=null,this[_0x502a1e(0x219)]=0x0,this['_ownMeta']={},this[_0x502a1e(0x17c)]=new Map(),this[_0x502a1e(0x230)]=process['cpuUsage'](),this[_0x502a1e(0x142)]=Date[_0x502a1e(0x26f)](),this[_0x502a1e(0x1e5)]=0x0,this[_0x502a1e(0x24e)]=new Map();}get[_0x31854b(0xe4)](){const _0x5b332c=_0x31854b;return this[_0x5b332c(0x1d3)];}get[_0x31854b(0x115)](){const _0x258c6d=_0x31854b;return this[_0x258c6d(0x15b)];}['_caps'](_0x548435,_0x4d4395){const _0x30718d=_0x31854b,_0x76ee07=_0x52c120(_0x548435,_0x4d4395);if(_0x76ee07[_0x30718d(0x1e9)]&&!_0x57b2dd(this[_0x30718d(0x2ba)]))return{..._0x76ee07,'killable':![],'killConfirm':undefined};return _0x76ee07;}[_0x31854b(0x1cd)](){const _0x5a9ce7=_0x31854b;return!!this[_0x5a9ce7(0x295)];}[_0x31854b(0x185)](_0x2a1cbb){Object['assign'](this['_ownMeta'],_0x2a1cbb||{});}[_0x31854b(0x213)](_0x480160){const _0x4b709e=_0x31854b;if(_0x480160)this[_0x4b709e(0x255)]=_0x480160;}[_0x31854b(0x84)](_0x77dee3={}){const _0x269bb3=_0x31854b;return this[_0x269bb3(0x2ba)]['_activateProcesses'](_0x77dee3);}[_0x31854b(0xc5)](){const _0x17bf96=_0x31854b,_0x49231d={};let _0x48f2d2=0x0,_0x3e5fe4=0x0;const _0x3102f5=new Set();for(const _0x221feb of this[_0x17bf96(0x19f)]()){_0x3e5fe4++;const _0x2dfcef=_0x221feb['processing'];if(!_0x2dfcef)continue;if(_0x2dfcef[_0x17bf96(0x268)])_0x48f2d2++;for(const _0x4f536a of _0x2dfcef[_0x17bf96(0x1b4)]||[]){if(![_0x17bf96(0x21c),_0x17bf96(0x103)][_0x17bf96(0xc8)](_0x4f536a[_0x17bf96(0xd4)]))continue;(_0x4f536a[_0x17bf96(0x21f)]===_0x17bf96(0x232)||_0x4f536a[_0x17bf96(0x21f)]===_0x17bf96(0x1d5))&&_0x4f536a[_0x17bf96(0x24d)]&&_0x3102f5[_0x17bf96(0x1fb)]((_0x4f536a[_0x17bf96(0xed)]||_0x17bf96(0x206))+':'+_0x4f536a[_0x17bf96(0x24d)]);const _0x17e4ed=_0x4f536a['env']||_0x17bf96(0x206);(_0x49231d[_0x17e4ed]||=[])[_0x17bf96(0xb1)]({..._0x4f536a,'env':_0x17e4ed,'owner':{'pid':_0x221feb['pid']??null,'kind':_0x221feb['kind']??null}});}}for(const [_0x1d8475,_0x25e5c2]of Object[_0x17bf96(0x20c)](_0x49231d)){for(const _0x541cf7 of _0x25e5c2){if(_0x541cf7['mode']==='single'&&!_0x541cf7[_0x17bf96(0x2c4)]){const _0x49e553=_0x1d8475+':'+(_0x541cf7[_0x17bf96(0x24d)]??'');if(!_0x3102f5[_0x17bf96(0x146)](_0x49e553))_0x541cf7[_0x17bf96(0x214)]=!![];}}}return{'envs':_0x49231d,'policy':null,'participation':{'participating':_0x48f2d2,'total':_0x3e5fe4},'source':_0x17bf96(0x25f)};}['processorsView'](){const _0xd69f27=_0x31854b,_0x1473e9=_0x24c753=>{const _0x461775=_0x2fe0;if(_0x24c753['state']===_0x461775(0x232)||_0x24c753[_0x461775(0x21f)]==='building'||_0x24c753[_0x461775(0x21f)]===_0x461775(0x250))return 0x3;if(_0x24c753[_0x461775(0x2c4)])return 0x1;return 0x2;},_0x9e4d4f=new Map();for(const _0x1896be of this[_0xd69f27(0x19f)]()){for(const _0x18e307 of _0x1896be[_0xd69f27(0xcf)]?.[_0xd69f27(0x1b4)]||[]){const _0x5145e4={..._0x18e307,'owner':{'pid':_0x1896be[_0xd69f27(0x29d)]??null,'kind':_0x1896be[_0xd69f27(0x234)]??null,'host':_0x1896be[_0xd69f27(0x215)]??null}},_0x2b048e=_0x18e307['mode']===_0xd69f27(0x21c)?'1ofN:'+(_0x18e307[_0xd69f27(0xed)]??'')+'::'+(_0x18e307[_0xd69f27(0x24d)]??_0x18e307[_0xd69f27(0x156)]??_0x18e307['id']):'inst:'+(_0x1896be['nodeKey']??_0x1896be[_0xd69f27(0x162)]??'')+'::'+(_0x18e307['env']??'')+'::'+_0x18e307['id'],_0x3d758f=_0x9e4d4f[_0xd69f27(0x2a6)](_0x2b048e);if(!_0x3d758f||_0x1473e9(_0x5145e4)>_0x1473e9(_0x3d758f))_0x9e4d4f[_0xd69f27(0x27e)](_0x2b048e,_0x5145e4);}}return[..._0x9e4d4f[_0xd69f27(0xab)]()];}[_0x31854b(0x276)](){const _0x30ad85=_0x31854b,_0x16915c=Date[_0x30ad85(0x26f)](),_0x2f505c=this[_0x30ad85(0x19f)](),_0x30cb45=_0x28d25f=>Math[_0x30ad85(0x1c9)](0x0,Math[_0x30ad85(0x9e)]((_0x16915c-(_0x28d25f[_0x30ad85(0x1ef)]||_0x16915c))/0x3e8)),_0x1836db=_0x2f505c[_0x30ad85(0x200)](_0x4c6756=>_0x4c6756[_0x30ad85(0x234)]===_0x30ad85(0x1c6)),_0x23f9a3=_0x2f505c[_0x30ad85(0x125)](_0x5251a1=>_0x5251a1['kind']===_0x30ad85(0x242));if(_0x1836db||_0x23f9a3[_0x30ad85(0x243)])return{'primary':_0x1836db?{'pid':_0x1836db[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x1836db)}:null,'workers':_0x23f9a3[_0x30ad85(0x2a7)](_0x47789f=>({'pid':_0x47789f[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x47789f)})),'workersConfigured':_0x1836db?.[_0x30ad85(0xb4)]?.[_0x30ad85(0x278)]??_0x23f9a3[_0x30ad85(0x243)],'mode':_0x30ad85(0x87)};const _0x4e58cc=_0x2f505c[_0x30ad85(0x200)](_0x1e00a1=>_0x1e00a1[_0x30ad85(0x234)]===_0x30ad85(0xe1)||_0x1e00a1[_0x30ad85(0x234)]==='standalone'||_0x1e00a1[_0x30ad85(0x234)]===_0x30ad85(0x26e)),_0x27b636=_0x4e58cc?{'pid':_0x4e58cc[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x4e58cc)}:{'pid':process[_0x30ad85(0x29d)],'uptime':Math[_0x30ad85(0x1c9)](0x0,Math[_0x30ad85(0x9e)](process['uptime']()))};return{'primary':_0x27b636,'workers':[_0x27b636],'workersConfigured':0x1,'mode':_0x30ad85(0x21c)};}[_0x31854b(0xf3)](){return this['_groupByProcess']();}[_0x31854b(0x137)](){const _0x2211d3=_0x31854b,_0x53e46e=new Map();for(const _0x51d27a of this[_0x2211d3(0xb0)]())_0x53e46e['set'](_0x51d27a['processKey'],{..._0x51d27a,'children':[]});const _0x29c698=[];for(const _0x227d29 of _0x53e46e[_0x2211d3(0xab)]()){const _0x48ff39=_0x227d29['supervisorKey']?_0x53e46e[_0x2211d3(0x2a6)](_0x227d29[_0x2211d3(0x1f2)]):null;if(_0x48ff39&&_0x48ff39!==_0x227d29)_0x48ff39['children']['push'](_0x227d29);else _0x29c698['push'](_0x227d29);}const _0x2ee7a0=(_0x50915f,_0x2bcc7c)=>_0x50915f[_0x2211d3(0x234)]===_0x2bcc7c['kind']?(_0x50915f['pid']||0x0)-(_0x2bcc7c['pid']||0x0):(_0x50915f[_0x2211d3(0x234)]??'')<(_0x2bcc7c[_0x2211d3(0x234)]??'')?-0x1:0x1,_0x4a3e1e=_0x367c1d=>{const _0x5b4eb9=_0x2211d3;_0x367c1d[_0x5b4eb9(0x283)](_0x2ee7a0);for(const _0x2c91da of _0x367c1d)if(_0x2c91da[_0x5b4eb9(0x1c4)]['length'])_0x4a3e1e(_0x2c91da[_0x5b4eb9(0x1c4)]);};return _0x4a3e1e(_0x29c698),_0x29c698;}[_0x31854b(0x1a1)](_0x1ba441){const _0x5ba1fe=_0x31854b;return this['_groupByProcess']()[_0x5ba1fe(0x200)](_0x4f4b9d=>_0x4f4b9d['processKey']===_0x1ba441)??null;}[_0x31854b(0xb0)](_0x253ae1=Date[_0x31854b(0x26f)]()){const _0x52a8d0=_0x31854b,_0x4a537e=new Map();for(const _0x53e4a0 of this[_0x52a8d0(0x19f)]()){const _0x311fd2=_0x113fc1(_0x53e4a0);let _0x377331=_0x4a537e[_0x52a8d0(0x2a6)](_0x311fd2);!_0x377331&&(_0x377331={'processKey':_0x311fd2,'nodeKey':_0x311fd2,'pid':_0x53e4a0[_0x52a8d0(0x29d)],'ppid':_0x53e4a0[_0x52a8d0(0xaa)]??null,'host':_0x53e4a0[_0x52a8d0(0x215)]??null,'kind':_0x53e4a0[_0x52a8d0(0x234)],'role':null,'supervisorKey':_0x53e4a0[_0x52a8d0(0x1f2)]??null,'slot':_0x53e4a0[_0x52a8d0(0xb9)]??null,'slotKey':_0x53e4a0[_0x52a8d0(0x145)]??null,'caps':_0x53e4a0['caps']??null,'lifecycle':_0x53e4a0['lifecycle']??null,'uptime':Math[_0x52a8d0(0x1c9)](0x0,Math[_0x52a8d0(0x9e)]((_0x253ae1-(_0x53e4a0['startedAt']||_0x253ae1))/0x3e8)),'startedAt':_0x53e4a0['startedAt']??null,'meta':_0x53e4a0[_0x52a8d0(0xb4)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x4a537e[_0x52a8d0(0x27e)](_0x311fd2,_0x377331));_0x377331['instances'][_0x52a8d0(0xb1)]({'instanceId':_0x53e4a0[_0x52a8d0(0xe7)]??null,'role':_0x53e4a0[_0x52a8d0(0x2a5)]??null,'listenAddr':_0x53e4a0['listenAddr']??null,'lifecycle':_0x53e4a0[_0x52a8d0(0x153)]??null,'processing':_0x53e4a0[_0x52a8d0(0xcf)]??null});if(!_0x377331[_0x52a8d0(0x2a5)]&&_0x53e4a0[_0x52a8d0(0x2a5)])_0x377331[_0x52a8d0(0x2a5)]=_0x53e4a0['role'];if(!_0x377331[_0x52a8d0(0x1ff)]&&_0x53e4a0[_0x52a8d0(0x1ff)])_0x377331[_0x52a8d0(0x1ff)]=_0x53e4a0[_0x52a8d0(0x1ff)];if(!_0x377331['processing']&&_0x53e4a0[_0x52a8d0(0xcf)])_0x377331['processing']=_0x53e4a0['processing'];if(!_0x377331[_0x52a8d0(0x17b)]&&_0x53e4a0[_0x52a8d0(0x17b)])_0x377331[_0x52a8d0(0x17b)]=_0x53e4a0[_0x52a8d0(0x17b)];if(!_0x377331[_0x52a8d0(0x253)]&&_0x53e4a0[_0x52a8d0(0x253)])_0x377331[_0x52a8d0(0x253)]=_0x53e4a0[_0x52a8d0(0x253)];if(_0x377331[_0x52a8d0(0x147)]==null&&_0x53e4a0[_0x52a8d0(0x147)])_0x377331['caps']=_0x53e4a0['caps'];if(_0x53e4a0[_0x52a8d0(0x9f)]&&(!_0x377331[_0x52a8d0(0x9f)]||(_0x53e4a0[_0x52a8d0(0x9f)]['at']??0x0)>(_0x377331['stats']['at']??0x0)))_0x377331[_0x52a8d0(0x9f)]=_0x53e4a0[_0x52a8d0(0x9f)];}return[..._0x4a537e['values']()];}[_0x31854b(0x98)](){const _0x26965b=_0x31854b,_0x2069e7=[],_0x247dcb={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x5d3945 of this['_groupByProcess']()){_0x2069e7[_0x26965b(0xb1)]({'processKey':_0x5d3945[_0x26965b(0x162)],'kind':_0x5d3945[_0x26965b(0x234)],'pid':_0x5d3945[_0x26965b(0x29d)],'supervisorKey':_0x5d3945[_0x26965b(0x1f2)],'meta':_0x5d3945['meta']??null,'uptime':_0x5d3945[_0x26965b(0x14d)],'stats':_0x5d3945[_0x26965b(0x9f)]??null}),_0x247dcb[_0x26965b(0x140)]++;if(_0x5d3945[_0x26965b(0x9f)]){_0x247dcb[_0x26965b(0x257)]+=_0x5d3945['stats'][_0x26965b(0x257)]||0x0,_0x247dcb[_0x26965b(0x18e)]+=(_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x18e)]||0x0)+(_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x1be)]?.[_0x26965b(0x18e)]||0x0);const _0x4c601c=_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x1be)];_0x4c601c&&(_0x247dcb[_0x26965b(0x1be)][_0x26965b(0x1b1)]+=_0x4c601c[_0x26965b(0x1b1)]||0x0,_0x247dcb['threads'][_0x26965b(0x17d)]+=_0x4c601c[_0x26965b(0x17d)]||0x0,_0x247dcb['threads'][_0x26965b(0x11a)]+=_0x4c601c['busy']||0x0);}}return{'totals':_0x247dcb,'nodes':_0x2069e7};}async[_0x31854b(0xae)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x194036=_0x31854b;this[_0x194036(0x128)]=this[_0x194036(0x128)]||!!writer,this[_0x194036(0x2c7)]=this['_isReader']||!!reader,this['_kind']=kind||this[_0x194036(0x23d)]||(_0x3c5db5[_0x194036(0x1cf)]?_0x194036(0x242):_0x194036(0xe1)),this[_0x194036(0x86)]=supervisorKey??this[_0x194036(0x86)],this['_listenAddr']=listenAddr??this[_0x194036(0x255)],this[_0x194036(0x28f)](),await this[_0x194036(0x186)]();if(!writer&&!reader)return null;if(!this[_0x194036(0x295)]){const _0x1edc90=await this[_0x194036(0x2ba)]['createEnvironment'](_0x4181c5,{'sync':![],'durability':_0x194036(0xb8)});await _0x1edc90[_0x194036(0x238)](_0x5f0107),this[_0x194036(0x295)]=_0x1edc90;}return this['_statusEnv'];}[_0x31854b(0x1d8)](){const _0x365a89=_0x31854b;return this[_0x365a89(0x287)]!==this[_0x365a89(0x295)]&&(this['_nodeDbFor']=this[_0x365a89(0x295)],this['_nodeDbCache']=this[_0x365a89(0x295)][_0x365a89(0xe6)](_0x5f0107)[_0x365a89(0x29a)]),this['_nodeDbCache'];}[_0x31854b(0x169)](_0x41cc93){const _0x2fcbed=_0x31854b;if(_0x4d57ac)return this['_nodeDb']()[_0x2fcbed(0x26d)](_0x41cc93[_0x2fcbed(0x227)],_0x41cc93,0x1);const _0x3a0462=this[_0x2fcbed(0x1d8)]()[_0x2fcbed(0x91)](_0x41cc93['nodeKey'],_0x41cc93,0x1);if(_0x3a0462&&typeof _0x3a0462[_0x2fcbed(0x8d)]===_0x2fcbed(0xd1))_0x3a0462[_0x2fcbed(0x8d)](undefined,()=>{});return _0x3a0462;}[_0x31854b(0x7d)](_0x4c4e72){const _0x2b4d87=_0x31854b;return this['_nodeDb']()[_0x2b4d87(0x26d)](_0x4c4e72[_0x2b4d87(0x227)],_0x4c4e72,0x1);}[_0x31854b(0x175)](_0x97fb74){const _0x449114=_0x31854b;if(_0x4d57ac)try{return this['_nodeDb']()[_0x449114(0x16b)](_0x97fb74);}catch{return![];}const _0x135f18=this[_0x449114(0x1d8)]()[_0x449114(0x290)](_0x97fb74);if(_0x135f18&&typeof _0x135f18[_0x449114(0x8d)]===_0x449114(0xd1))_0x135f18[_0x449114(0x8d)](undefined,()=>{});return _0x135f18;}async[_0x31854b(0xc4)](_0x254c0d){const _0x78cf67=_0x31854b;if(!this[_0x78cf67(0x295)]||!this[_0x78cf67(0x128)]||!_0x254c0d?.[_0x78cf67(0x227)])return;return this['_putRowAsync'](_0x254c0d);}async[_0x31854b(0x1df)](_0x2a53eb){const _0x14ca3b=_0x31854b;if(!this[_0x14ca3b(0x295)]||!this[_0x14ca3b(0x128)]||!_0x2a53eb)return;const _0x107112=_0x2a53eb[_0x14ca3b(0xc8)]('#'),_0x256c5f=[];for(const {key:_0x4f2f1c}of this['_statusEnv']['getRange'](_0x5f0107)){if(_0x4f2f1c===_0x2a53eb||!_0x107112&&typeof _0x4f2f1c===_0x14ca3b(0x236)&&_0x4f2f1c['startsWith'](_0x2a53eb+'#'))_0x256c5f['push'](_0x4f2f1c);}for(const _0x171981 of _0x256c5f){try{this[_0x14ca3b(0x1d8)]()[_0x14ca3b(0x16b)](_0x171981);}catch{}}}[_0x31854b(0x235)](_0x4d6b03){const _0x40d85e=_0x31854b;if(typeof _0x4d6b03?.[_0x40d85e(0x29d)]!=='number')return![];if(_0x4d6b03[_0x40d85e(0x215)]!==_0x38474c[_0x40d85e(0x7e)]())return![];if(_0x4d6b03[_0x40d85e(0x29d)]===process[_0x40d85e(0x29d)])return![];if(_0x4d6b03[_0x40d85e(0x2be)]!=null&&_0x4d6b03[_0x40d85e(0x2be)]<Date[_0x40d85e(0x26f)]()-_0x2f75bf)return!![];try{return process['kill'](_0x4d6b03[_0x40d85e(0x29d)],0x0),![];}catch(_0x435a95){return _0x435a95[_0x40d85e(0x138)]===_0x40d85e(0x298);}}[_0x31854b(0x19f)](){const _0x494322=_0x31854b;if(!this[_0x494322(0x295)])return[];try{this['_statusEnv']['db']?.[_0x494322(0x14f)]?.();}catch{}const _0x450b4e=Date[_0x494322(0x26f)](),_0x5cdfac=_0x38474c[_0x494322(0x7e)](),_0x183078=[];for(const {value:_0x25d682}of this[_0x494322(0x295)][_0x494322(0x1c3)](_0x5f0107)){if(!_0x25d682)continue;let _0x4efeb1=null;_0x25d682['host']===_0x5cdfac&&typeof _0x25d682[_0x494322(0x29d)]===_0x494322(0xa3)&&(_0x4efeb1=!this['_nodeDead'](_0x25d682));if(_0x4efeb1===![])continue;const _0x163d41=_0x25d682[_0x494322(0x2be)]==null||_0x25d682[_0x494322(0x2be)]>=_0x450b4e;if(_0x4efeb1===!![]||_0x163d41)_0x183078[_0x494322(0xb1)](_0x25d682);}return _0x183078;}async[_0x31854b(0xeb)](_0x12ed7a=0x0){const _0x298716=_0x31854b;if(!this['_statusEnv']||!this[_0x298716(0x128)])return;const _0x287c6c=Date[_0x298716(0x26f)]()-_0x12ed7a,_0x387b45=new Set(),_0x43c0c1=[],_0x4a3e4e=_0x38474c[_0x298716(0x7e)](),_0x6daaf5=require$$6[_0x298716(0x279)];for(const {key:_0x1f6e50,value:_0x1d0179}of this[_0x298716(0x295)][_0x298716(0x1c3)](_0x5f0107)){if(!_0x1d0179)continue;const _0xcf5f1d=_0x1d0179[_0x298716(0x215)]===_0x4a3e4e&&typeof _0x1d0179['pid']===_0x298716(0xa3),_0x527a88=_0xcf5f1d?this[_0x298716(0x235)](_0x1d0179):_0x1d0179['expiresAt']!=null&&_0x1d0179[_0x298716(0x2be)]<_0x287c6c;if(_0x527a88)_0x43c0c1[_0x298716(0xb1)](_0x1f6e50);else{_0x387b45[_0x298716(0x1fb)](_0x113fc1(_0x1d0179)??_0x1f6e50);if(_0x1d0179[_0x298716(0x279)]&&_0x1d0179[_0x298716(0x279)]!==_0x6daaf5){if(!this['_versionSkewWarned'])this[_0x298716(0xca)]=new Set();!this['_versionSkewWarned'][_0x298716(0x146)](_0x1d0179['version'])&&(this[_0x298716(0xca)][_0x298716(0x1fb)](_0x1d0179[_0x298716(0x279)]),this[_0x298716(0x2ba)]['log']?.['warn']?.(_0x298716(0x209)+(_0x1d0179[_0x298716(0x29d)]??'?')+_0x298716(0x106)+_0x1d0179[_0x298716(0x279)]+'\x20while\x20this\x20process\x20runs\x20'+_0x6daaf5+'\x20—\x20'+_0x298716(0x2ae),{'feature':_0x298716(0x271)}));}}}for(const _0x26f968 of _0x43c0c1)this[_0x298716(0x175)](_0x26f968);if(this[_0x298716(0x28f)]()){const _0x14a278=[];for(const {key:_0x19c1ef}of this[_0x298716(0x126)]('node')){if(!_0x387b45[_0x298716(0x146)](_0x19c1ef)){if(_0x4d57ac)try{this[_0x298716(0x1eb)][_0x298716(0x16b)]('node/'+_0x19c1ef);}catch{}else _0x14a278[_0x298716(0xb1)](this[_0x298716(0x1eb)][_0x298716(0x290)](_0x298716(0xda)+_0x19c1ef));}}if(_0x14a278[_0x298716(0x243)])await Promise['allSettled'](_0x14a278);}}[_0x31854b(0x2c2)](_0x124452=null){const _0x5bcf4b=_0x31854b;if(this[_0x5bcf4b(0x20e)])return;if(!this[_0x5bcf4b(0x128)]||!this[_0x5bcf4b(0x295)]){this['okdb']?.[_0x5bcf4b(0x1fd)]?.[_0x5bcf4b(0xdd)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this['_isWriter']+_0x5bcf4b(0x129)+!!this['_statusEnv']+_0x5bcf4b(0x2bc),{'feature':_0x5bcf4b(0x140)});return;}this['_onTick']=_0x124452,this[_0x5bcf4b(0x1bc)]=()=>this[_0x5bcf4b(0x92)]();for(const _0x2cf309 of _0x218a3d)this['okdb'][_0x5bcf4b(0x18c)]['on'](_0x2cf309,this[_0x5bcf4b(0x1bc)]);this['_publishNow']();const _0x1ffe2f=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x1cffbf;this['_hbTimer']=setInterval(()=>{const _0x5cb38e=_0x5bcf4b;if(this['_onTick'])try{this[_0x5cb38e(0x294)]();}catch{}this['_publishNow'](),this[_0x5cb38e(0xeb)]()[_0x5cb38e(0x267)](()=>{});},_0x1ffe2f);if(this[_0x5bcf4b(0x20e)]['unref'])this[_0x5bcf4b(0x20e)]['unref']();}['_maybePublish'](){const _0x17fd23=_0x31854b;if(!this[_0x17fd23(0x128)]||!this[_0x17fd23(0x295)])return;if(Date[_0x17fd23(0x26f)]()-this[_0x17fd23(0x219)]<_0x1d6332)return;this[_0x17fd23(0x116)]();}[_0x31854b(0x116)](){const _0x890c81=_0x31854b;if(!this[_0x890c81(0x128)]||!this[_0x890c81(0x295)])return;this[_0x890c81(0x219)]=Date[_0x890c81(0x26f)]();try{const _0x47fed5=[this['_buildOwnRow']()];for(const _0x4ebf6b of this[_0x890c81(0x17c)][_0x890c81(0xab)]())_0x47fed5['push'](this['_buildChildRow'](_0x4ebf6b));const _0x337b73=_0x212f76[_0x890c81(0x1ce)]?_0x212f76[_0x890c81(0x26f)]():0x0;for(const _0x4b672c of _0x47fed5){try{this[_0x890c81(0x7d)](_0x4b672c),this[_0x890c81(0x1e1)]=![];}catch(_0x1a3376){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x890c81(0x2ba)]?.[_0x890c81(0x1fd)]?.[_0x890c81(0xdd)]?.('registry\x20publish\x20failing:\x20'+_0x1a3376[_0x890c81(0x1b3)],{'feature':_0x890c81(0x140)}));}}if(_0x212f76[_0x890c81(0x1ce)])_0x212f76[_0x890c81(0x1f3)]('registry-publish',_0x212f76[_0x890c81(0x26f)]()-_0x337b73,'rows='+_0x47fed5[_0x890c81(0x243)]+_0x890c81(0x1bd));}catch(_0x4558fb){!this['_publishFailWarned']&&(this[_0x890c81(0x1e1)]=!![],this['okdb']?.['log']?.[_0x890c81(0xdd)]?.(_0x890c81(0x1f7)+_0x4558fb[_0x890c81(0x1b3)],{'feature':_0x890c81(0x140)}));}}async[_0x31854b(0x168)](){const _0x4fb0b0=_0x31854b;if(this['_onProcEvent']){for(const _0x3e1eb8 of _0x218a3d){try{this['okdb'][_0x4fb0b0(0x18c)][_0x4fb0b0(0x20f)](_0x3e1eb8,this['_onProcEvent']);}catch{}}this[_0x4fb0b0(0x1bc)]=null;}this[_0x4fb0b0(0x20e)]&&(clearInterval(this['_hbTimer']),this[_0x4fb0b0(0x20e)]=null);try{if(this['_statusEnv']&&this[_0x4fb0b0(0x128)])await this[_0x4fb0b0(0x1df)](this[_0x4fb0b0(0x15b)]);}catch{}}async[_0x31854b(0x2bd)](){const _0x311966=_0x31854b;if(!this['_statusEnv']||!this['_isWriter'])return;try{await this['removeNode'](this[_0x311966(0x15b)]);}catch{}try{const _0x9f58e8=[];for(const {value:_0x53bbab}of this[_0x311966(0x295)][_0x311966(0x1c3)](_0x5f0107)){if(_0x53bbab?.[_0x311966(0xaa)]===process[_0x311966(0x29d)]&&_0x53bbab[_0x311966(0x227)])_0x9f58e8[_0x311966(0xb1)](_0x53bbab[_0x311966(0x227)]);}for(const _0x29f570 of _0x9f58e8){try{await this[_0x311966(0x1df)](_0x29f570);}catch{}}}catch{}}async['publishOwnRow'](){const _0x38f68c=_0x31854b;return this[_0x38f68c(0xc4)](this[_0x38f68c(0x23e)]());}async[_0x31854b(0x134)](_0x13ded6){const _0x148321=_0x31854b;if(!this[_0x148321(0x295)]||!this[_0x148321(0x128)])return;return this[_0x148321(0xc4)](this[_0x148321(0x193)](_0x13ded6));}[_0x31854b(0x193)]({pid:_0xc3a010,startedAt:_0x5a86e2,kind:_0x4527d4,supervisorKey:_0x3e950e,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x3cce98=_0x31854b,_0x367a18=Date[_0x3cce98(0x26f)](),_0x23534f=_0x5bb0f0(_0xc3a010,_0x5a86e2);return{'nodeKey':_0x155c92(_0x23534f,'0'),'processKey':_0x23534f,'instanceId':'0','pid':_0xc3a010,'startedAt':_0x5a86e2,'ppid':process[_0x3cce98(0x29d)],'host':_0x38474c['hostname'](),'supervisorKey':_0x3e950e,'slot':slot,'slotKey':slotKey,'kind':_0x4527d4,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x367a18,'expiresAt':_0x367a18+_0x5397d1,'caps':this[_0x3cce98(0xa8)](_0x4527d4,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x31854b(0x135)](_0x5b6f73){const _0x3a22c3=_0x31854b;if(!_0x5b6f73?.[_0x3a22c3(0x29d)])return null;const _0x5a5be5=_0x5bb0f0(_0x5b6f73[_0x3a22c3(0x29d)],_0x5b6f73[_0x3a22c3(0x1ef)]);this[_0x3a22c3(0x17c)][_0x3a22c3(0x27e)](_0x5a5be5,{..._0x5b6f73,'supervisorKey':_0x5b6f73[_0x3a22c3(0x1f2)]??this['_selfKey']});if(this[_0x3a22c3(0x128)])await this[_0x3a22c3(0x134)](this[_0x3a22c3(0x17c)][_0x3a22c3(0x2a6)](_0x5a5be5))['catch']?.(()=>{});return _0x5a5be5;}[_0x31854b(0x29b)](_0x513500){const _0xabfbf8=_0x31854b;if(!_0x513500)return;return this[_0xabfbf8(0x17c)][_0xabfbf8(0x264)](_0x513500),this[_0xabfbf8(0x1df)](_0x513500);}['_sampleOwnStats'](){const _0x3314a3=_0x31854b,_0x136783=Date['now'](),_0x2509aa=process['cpuUsage'](),_0x173efc=(_0x136783-this['_lastCpuAt'])*0x3e8;if(_0x173efc>=0x3d090){const _0x507f14=_0x2509aa[_0x3314a3(0x224)]-this['_lastCpuUsage'][_0x3314a3(0x224)]+(_0x2509aa[_0x3314a3(0x83)]-this[_0x3314a3(0x230)][_0x3314a3(0x83)]),_0x43bb6=_0x38474c[_0x3314a3(0x8b)]()[_0x3314a3(0x243)]||0x1;this[_0x3314a3(0x1e5)]=Math[_0x3314a3(0x28e)](0x64,Math['round'](_0x507f14/(_0x173efc*_0x43bb6)*0x64)),this[_0x3314a3(0x8f)]=Math['round'](_0x173efc/0x3e8),this[_0x3314a3(0x230)]=_0x2509aa,this[_0x3314a3(0x142)]=_0x136783;}const _0x32e4e2=process[_0x3314a3(0x1a7)](),_0x492822=this[_0x3314a3(0x24e)][_0x3314a3(0x1a8)];let _0x1c278b=0x0;if(_0x492822>0x0){const _0x5bffb0=[this['okdb'],...this['okdb'][_0x3314a3(0x90)]?.[_0x3314a3(0xab)]?.()??[]];for(const _0x4bb94d of _0x5bffb0){const _0x481507=_0x4bb94d[_0x3314a3(0x11e)]?.[_0x3314a3(0x158)];if(_0x481507)_0x1c278b+=_0x481507[_0x3314a3(0x237)]['busy'];}}let _0x242d2b=null;const _0x1949f6=_0x492822;if(_0x1949f6>0x0){let _0x5c922c=0x0;for(const _0x4b4bdd of this[_0x3314a3(0x24e)][_0x3314a3(0xab)]())_0x5c922c+=_0x4b4bdd[_0x3314a3(0x18e)]||0x0;_0x242d2b={'count':_0x1949f6,'heapUsed':_0x5c922c,'sandbox':_0x492822,'busy':_0x1c278b};}return{'rss':_0x32e4e2[_0x3314a3(0x257)],'heapUsed':_0x32e4e2[_0x3314a3(0x18e)],'heapTotal':_0x32e4e2[_0x3314a3(0x27a)],'external':_0x32e4e2[_0x3314a3(0x131)],'cpuPct':this[_0x3314a3(0x1e5)],'cpuWindowMs':this[_0x3314a3(0x8f)]??null,'threads':_0x242d2b,'at':_0x136783};}[_0x31854b(0x184)](_0x198b25,_0x5562e6){const _0x22db4b=_0x31854b;if(!_0x198b25||!_0x5562e6)return;this[_0x22db4b(0x24e)][_0x22db4b(0x27e)](_0x198b25,_0x5562e6);}[_0x31854b(0xc1)](_0x5c6a75){const _0x2cc844=_0x31854b;this[_0x2cc844(0x24e)][_0x2cc844(0x264)](_0x5c6a75);}[_0x31854b(0x2aa)](_0x346532,_0x11c138,_0x102338=undefined){const _0x2446fc=_0x31854b,_0x5726d2=this[_0x2446fc(0x17c)][_0x2446fc(0x2a6)](_0x346532);if(!_0x5726d2||!_0x11c138)return;if(_0x102338!==undefined)_0x5726d2[_0x2446fc(0xcf)]=_0x102338;_0x5726d2[_0x2446fc(0x9f)]={'rss':_0x11c138[_0x2446fc(0x257)]??null,'heapUsed':_0x11c138[_0x2446fc(0x18e)]??null,'heapTotal':_0x11c138[_0x2446fc(0x27a)]??null,'external':_0x11c138[_0x2446fc(0x131)]??null,'cpuPct':_0x11c138[_0x2446fc(0x7f)]??null,'cpuWindowMs':_0x11c138[_0x2446fc(0x1ad)]??null,'threads':_0x11c138[_0x2446fc(0x1be)]??null,'claims':_0x11c138[_0x2446fc(0x1ca)]??null,'envsOpen':_0x11c138[_0x2446fc(0x18a)]??null,'at':Date[_0x2446fc(0x26f)]()};}[_0x31854b(0x23e)](){const _0x29baa2=_0x31854b,_0x2ab6a1=Date[_0x29baa2(0x26f)](),_0x10661c=this['okdb'][_0x29baa2(0x256)]||{},_0x3c9f45=this[_0x29baa2(0x23d)]||'cli';return{'nodeKey':this[_0x29baa2(0x15b)],'processKey':this['_selfKey'],'instanceId':this[_0x29baa2(0x248)],'pid':process[_0x29baa2(0x29d)],'startedAt':this[_0x29baa2(0x167)],'instanceStartedAt':this[_0x29baa2(0x1d4)],'ppid':typeof process[_0x29baa2(0xaa)]===_0x29baa2(0xa3)?process['ppid']:null,'host':_0x38474c[_0x29baa2(0x7e)](),'supervisorKey':this[_0x29baa2(0x86)]??null,'version':require$$6[_0x29baa2(0x279)],'kind':_0x3c9f45,'role':{'engines':!!_0x10661c['engines'],'processors':!!_0x10661c[_0x29baa2(0x1b4)],'compaction':_0x10661c[_0x29baa2(0x14c)],'http':_0x10661c[_0x29baa2(0x265)]},'listenAddr':this[_0x29baa2(0x255)]??null,'heartbeatAt':_0x2ab6a1,'expiresAt':_0x2ab6a1+_0x5397d1,'caps':this[_0x29baa2(0xa8)](_0x3c9f45,_0x10661c),'lifecycle':{'state':_0x29baa2(0x21e),'desiredVersionApplied':null},'meta':{...this[_0x29baa2(0x19b)]},'processing':_0x10661c[_0x29baa2(0x1b4)]?this[_0x29baa2(0x16d)]():null,'engines':_0x10661c[_0x29baa2(0x17b)]?[...this[_0x29baa2(0x2ba)][_0x29baa2(0x121)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x29baa2(0x2b1)](),'writers':this[_0x29baa2(0x2c0)]()};}['_collectWriterFacet'](){const _0x32279a=_0x31854b,_0x4a120c={};try{for(const [_0x433197,_0x3e3fca]of this[_0x32279a(0x2ba)][_0x32279a(0x90)]){try{const _0x478ab9=_0x3e3fca[_0x32279a(0xf6)]?.();if(!_0x478ab9)continue;if(!_0x478ab9[_0x32279a(0xd9)]&&!_0x478ab9[_0x32279a(0xf9)]&&!(_0x478ab9['parkedNow']??0x0)&&!_0x478ab9[_0x32279a(0x10c)])continue;_0x4a120c[_0x433197]={'depth':_0x478ab9[_0x32279a(0xd9)],'oldestPendingMs':_0x478ab9[_0x32279a(0xe5)],'committed':_0x478ab9[_0x32279a(0xf9)],'commitsPerSec':_0x478ab9[_0x32279a(0x266)],'commitP99Ms':_0x478ab9[_0x32279a(0x2a4)],'parkedNow':_0x478ab9[_0x32279a(0x2b8)]??0x0,'draining':!!_0x478ab9[_0x32279a(0x10c)]};}catch{}}}catch{}return Object[_0x32279a(0x130)](_0x4a120c)[_0x32279a(0x243)]?_0x4a120c:null;}[_0x31854b(0xa6)](){const _0x42acc0=_0x31854b,_0x31524c=process[_0x42acc0(0x29d)],_0x331173=Date[_0x42acc0(0x26f)](),_0x2051b9=_0x1cc6c8=>{const _0x3c4d9a=_0x42acc0;if(!_0x1cc6c8)return[];const _0xcd88c8=[];try{for(const {id:_0x42ddb6,entry:_0x36bd34}of _0x1cc6c8[_0x3c4d9a(0x114)]()){if(_0x36bd34?.[_0x3c4d9a(0x23a)]?.[_0x3c4d9a(0x29d)]!==_0x31524c)continue;const _0xc65a42=_0x36bd34[_0x3c4d9a(0x286)]??_0x36bd34[_0x3c4d9a(0xbe)]??0x0;if(_0xc65a42+(_0x36bd34[_0x3c4d9a(0x1a6)]??0x0)<_0x331173)continue;_0xcd88c8[_0x3c4d9a(0xb1)](_0x42ddb6);}}catch{}return _0xcd88c8;},_0x1861d7=_0x2051b9(this['_singletonLock']('compact')),_0x4005c7=_0x2051b9(this[_0x42acc0(0x21b)](_0x42acc0(0x29e)));if(!_0x1861d7[_0x42acc0(0x243)]&&!_0x4005c7[_0x42acc0(0x243)])return null;return{'compact':_0x1861d7,'replicate':_0x4005c7};}['_singletonLock'](_0x4f9640){const _0x5265fd=_0x31854b;if(!this[_0x5265fd(0x2ba)]?.['_rootDb'])return null;if(!this[_0x5265fd(0xdb)])this[_0x5265fd(0xdb)]=new Map();let _0x54b411=this['_singletonLocks'][_0x5265fd(0x2a6)](_0x4f9640);if(!_0x54b411)try{_0x54b411=new _0x5e0e06(this[_0x5265fd(0x2ba)][_0x5265fd(0x177)],{'namespace':_0x4f9640}),this[_0x5265fd(0xdb)][_0x5265fd(0x27e)](_0x4f9640,_0x54b411);}catch{return null;}return _0x54b411;}[_0x31854b(0x16d)](){const _0x2ab542=_0x31854b,_0x281efb=[];try{for(const [_0x152cd2,_0x29472f]of this['okdb'][_0x2ab542(0x90)]){if(_0x152cd2[_0x2ab542(0x2bb)]('~'))continue;for(const _0x4597d0 of _0x29472f[_0x2ab542(0xfc)]['tierList']())_0x281efb[_0x2ab542(0xb1)]({..._0x4597d0,'env':_0x152cd2});}}catch{}return{'participate':this['okdb'][_0x2ab542(0x1b4)]?.[_0x2ab542(0xfe)]??![],'processors':_0x281efb};}[_0x31854b(0x28f)](){const _0x48d7c8=_0x31854b;if(this['_desired'])return!![];const _0x3aeda3=this[_0x48d7c8(0x2ba)][_0x48d7c8(0x177)];if(!_0x3aeda3)return![];return this[_0x48d7c8(0x1eb)]=_0x3aeda3[_0x48d7c8(0x149)](_0xd36915,{'dupSort':![]}),this[_0x48d7c8(0x178)]=_0x3aeda3['openDB'](_0x404721,{'dupSort':![]}),!![];}async[_0x31854b(0x186)](){const _0x299d32=_0x31854b;if(!this[_0x299d32(0x28f)]())return;const _0x2f0614=_0x299d32(0x196),_0x1996b2=0x1,_0x16105b=this[_0x299d32(0x1eb)]['get'](_0x2f0614)??0x0;if(_0x16105b>=_0x1996b2)return;const _0x228dfd=_0x65824d=>{const _0x2e714a=_0x299d32;if(_0x65824d==='worker')return _0x2e714a(0x21c);if(_0x65824d===_0x2e714a(0x141))return _0x2e714a(0x103);return _0x65824d;};await this['okdb'][_0x299d32(0x1e0)]['_writer'][_0x299d32(0x101)](()=>{const _0xe80766=_0x299d32;for(const _0x26f466 of['procmode/','procmodeack/']){for(const {key:_0x410e4b,value:_0xe5f3bf}of this[_0xe80766(0x1eb)][_0xe80766(0x1c3)]({'start':_0x26f466,'end':_0x26f466+'\xff'})){if(typeof _0x410e4b!=='string'||!_0x410e4b[_0xe80766(0x2bb)](_0x26f466))break;const _0x19586d=_0x228dfd(_0xe5f3bf[_0xe80766(0xd4)]);if(_0x19586d!==_0xe5f3bf['mode'])this[_0xe80766(0x1eb)][_0xe80766(0x91)](_0x410e4b,{..._0xe5f3bf,'mode':_0x19586d});}}this['_desired'][_0xe80766(0x91)](_0x2f0614,_0x1996b2);});}[_0x31854b(0x14b)](){const _0x4d7f20=_0x31854b;return!!this[_0x4d7f20(0x1eb)];}[_0x31854b(0xec)](_0x4c6122,_0x203f83){const _0x545b7b=_0x31854b;if(!this[_0x545b7b(0x28f)]())return null;const _0x373ae4=_0x4c6122+'/'+_0x203f83;return this[_0x545b7b(0x150)](),this['_desiredOverlay']['get'](_0x373ae4)??this[_0x545b7b(0x1eb)][_0x545b7b(0x2a6)](_0x373ae4)??null;}['_refreshDesiredSnapshot'](){const _0x46fe9a=_0x31854b;if(!_0x4d57ac)return;try{this[_0x46fe9a(0x2ba)]['_systemEnv']?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x31854b(0x247)](_0x5d223d,_0x5911ac,_0x246586){const _0x161c47=_0x31854b;if(!this[_0x161c47(0x28f)]())return null;const _0x2d1111=_0x5d223d+'/'+_0x5911ac;this[_0x161c47(0x150)]();const _0x78a0c4=this[_0x161c47(0x25d)][_0x161c47(0x2a6)](_0x2d1111)??this[_0x161c47(0x1eb)][_0x161c47(0x2a6)](_0x2d1111)??{'version':0x0},_0x411d81=(_0x78a0c4[_0x161c47(0x279)]||0x0)+0x1,_0x5814ef={..._0x78a0c4,..._0x246586,'version':_0x411d81,'updatedAt':Date[_0x161c47(0x26f)]()};this[_0x161c47(0x25d)]['set'](_0x2d1111,_0x5814ef);try{await this['okdb'][_0x161c47(0x1e0)]['_writer'][_0x161c47(0x101)](()=>{const _0x52739a=_0x161c47;this[_0x52739a(0x1eb)][_0x52739a(0x91)](_0x2d1111,_0x5814ef);});}finally{if(this[_0x161c47(0x25d)][_0x161c47(0x2a6)](_0x2d1111)===_0x5814ef)this[_0x161c47(0x25d)][_0x161c47(0x264)](_0x2d1111);}return _0x411d81;}[_0x31854b(0x126)](_0x579b91){const _0x7ebcf2=_0x31854b;if(!this[_0x7ebcf2(0x28f)]())return[];this[_0x7ebcf2(0x150)]();const _0x289d46=_0x579b91+'/',_0x5152a0=[];for(const {key:_0x22bd2b,value:_0x1f3077}of this[_0x7ebcf2(0x1eb)][_0x7ebcf2(0x1c3)]({'start':_0x289d46,'end':_0x289d46+'\xff'})){if(typeof _0x22bd2b!==_0x7ebcf2(0x236)||!_0x22bd2b['startsWith'](_0x289d46))break;_0x5152a0[_0x7ebcf2(0xb1)]({'key':_0x22bd2b[_0x7ebcf2(0x1af)](_0x289d46['length']),'value':_0x1f3077});}return _0x5152a0;}[_0x31854b(0x161)](_0x138092){const _0x4ceb6f=_0x31854b;if(!this[_0x4ceb6f(0x28f)]())return null;return this[_0x4ceb6f(0x178)]['get'](_0x138092)??null;}async[_0x31854b(0x1d7)](_0x271c94,_0x39bdd8,_0x5e9162={}){const _0xd98464=_0x31854b;if(!this[_0xd98464(0x28f)]())return null;let _0x2b8f4b;return await this[_0xd98464(0x2ba)][_0xd98464(0x1e0)]['_writer'][_0xd98464(0x101)](()=>{const _0x11e6a3=_0xd98464,_0x1fa739=this[_0x11e6a3(0x178)][_0x11e6a3(0x2a6)](_0x271c94)||{'epoch':0x0};_0x2b8f4b=(_0x1fa739['epoch']||0x0)+0x1,this['_cmd'][_0x11e6a3(0x91)](_0x271c94,{..._0x1fa739,..._0x5e9162,'cmd':_0x39bdd8,'epoch':_0x2b8f4b,'updatedAt':Date['now']()});}),_0x2b8f4b;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x4b6f2f,'nodeKey':_0x5bb0f0,'logicalKey':_0x53f064,'slotKey':_0x10a4ca,'PROCESS_ENV':_0x4181c5,'NODE_TYPE':_0x5f0107},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x5988e7=_0x1383d2;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5d4835=require$$0$4,{EVENTS:_0x312803,CHANGE_ACTIONS:_0xfb8d4c}=requireOkdbEnums(),{LOOP:_0x2dc572}=requireOkdbLoopMonitor(),_0x3ef022=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x4a19eb=0x5,_0x2a5675=0x2710;class _0x1b64a2 extends _0x5d4835{constructor(_0x287021,_0x51e35a={}){const _0x210495=_0x2fe0;super(),this[_0x210495(0x2ba)]=_0x287021,this['_quantum']=_0x51e35a[_0x210495(0xc2)]??_0x3ef022,this[_0x210495(0xd7)]=_0x51e35a['flushDebounce']??_0x4a19eb,this[_0x210495(0x293)]=_0x51e35a[_0x210495(0x12d)]??_0x2a5675,this['_started']=![],this[_0x210495(0x211)]=new Map(),this[_0x210495(0xe2)]=new Map(),this['_pending']=new Map(),this['_flushTimer']=null,this[_0x210495(0x20a)]=![],this[_0x210495(0x1c2)]=new Set(),this[_0x210495(0x1cb)]=new Set(),this['_onItem']=_0x51695b=>this['_handleInProcess'](_0x51695b),this[_0x210495(0x1f6)]=_0x37f863=>this[_0x210495(0xba)](_0x37f863),this[_0x210495(0x289)]=_0x24493d=>this[_0x210495(0x2c3)](_0x24493d),this[_0x210495(0xd5)]=()=>this[_0x210495(0x288)]();}[_0x5988e7(0xdf)](){const _0x50347d=_0x5988e7;if(this[_0x50347d(0x261)])return;this[_0x50347d(0x261)]=!![];for(const [_0x444f23,_0x6709b9]of this['okdb'][_0x50347d(0x90)]){if(_0x444f23[_0x50347d(0x2bb)]('~'))continue;try{_0x6709b9['_enableChangelog']();}catch{}}for(const [_0x367d24,_0x19e31c]of this[_0x50347d(0x2ba)][_0x50347d(0x90)]){if(_0x367d24[_0x50347d(0x2bb)]('~'))continue;try{this[_0x50347d(0xe2)][_0x50347d(0x27e)](_0x367d24,_0x19e31c[_0x50347d(0x1db)]()||0x0);}catch{}}const {events:_0x2d808f}=this[_0x50347d(0x2ba)];_0x2d808f['on'](_0x312803['ITEM_PENDING'],this['_onPending']),_0x2d808f['on'](_0x312803[_0x50347d(0x284)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x148)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x1f1)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x136)],this['_onPoke']),_0x2d808f[_0x50347d(0x1a0)](_0x312803[_0x50347d(0xf0)],this['_onStop']);}[_0x5988e7(0x288)](){const _0x3bc802=_0x5988e7;if(!this['_started'])return;this[_0x3bc802(0x261)]=![];const {events:_0x58fc1c}=this[_0x3bc802(0x2ba)];_0x58fc1c[_0x3bc802(0x20f)](_0x312803['ITEM_PENDING'],this['_onPending']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803[_0x3bc802(0x284)],this['_onItem']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803[_0x3bc802(0x148)],this[_0x3bc802(0x18d)]),_0x58fc1c['off'](_0x312803[_0x3bc802(0x1f1)],this['_onItem']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803['SYSTEM_POKE'],this['_onPoke']);try{_0x58fc1c[_0x3bc802(0x20f)](_0x312803['SYSTEM_STOPPED'],this['_onStop']);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this['_pending']['clear'](),this[_0x3bc802(0x211)][_0x3bc802(0x2b7)](),this[_0x3bc802(0xe2)][_0x3bc802(0x2b7)](),this[_0x3bc802(0x1c2)][_0x3bc802(0x2b7)](),this['_pendingLocal'][_0x3bc802(0x2b7)]();}[_0x5988e7(0x2c1)](_0x1e77fd,_0x34579d,_0x5ce680,_0x4eb301){return _0x1e77fd+'\x00'+_0x34579d+'\x00'+_0x5ce680+'\x00'+_0x4eb301;}[_0x5988e7(0x254)](_0x11c739,_0x2f340d,_0xa865d6,_0x17cbb1){const _0x547b84=_0x5988e7,_0x594ea3=this[_0x547b84(0x2c1)](_0x11c739,_0x2f340d,_0xa865d6,_0x17cbb1);if(this['_seen']['has'](_0x594ea3))return![];this[_0x547b84(0x1c2)]['add'](_0x594ea3);if(this[_0x547b84(0x1c2)]['size']>this[_0x547b84(0x293)]){const _0x327cc=this[_0x547b84(0x1c2)][_0x547b84(0xab)]()['next']()[_0x547b84(0x221)];this[_0x547b84(0x1c2)][_0x547b84(0x264)](_0x327cc);}return!![];}[_0x5988e7(0xba)](_0x41fc67){const _0x359375=_0x5988e7;if(!this[_0x359375(0x261)]||!_0x41fc67)return;const {env:_0x1541e9,type:_0x4bed29,key:_0x1043d7,clock:_0x34417b}=_0x41fc67;if(_0x1541e9==null||_0x4bed29==null||_0x1043d7==null)return;if(typeof _0x1541e9===_0x359375(0x236)&&_0x1541e9[_0x359375(0x2bb)]('~'))return;if(typeof _0x4bed29===_0x359375(0x236)&&_0x4bed29[_0x359375(0x2bb)]('~'))return;this[_0x359375(0x1cb)][_0x359375(0x1fb)](this[_0x359375(0x2c1)](_0x1541e9,_0x4bed29,_0x1043d7,_0x34417b)),this[_0x359375(0x1cb)][_0x359375(0x1a8)]>this[_0x359375(0x293)]&&this[_0x359375(0x1cb)]['delete'](this[_0x359375(0x1cb)][_0x359375(0xab)]()[_0x359375(0x241)]()[_0x359375(0x221)]);}[_0x5988e7(0x16a)](_0x12f547){const _0x54aa94=_0x5988e7;if(!this[_0x54aa94(0x261)]||!_0x12f547)return;const {env:_0x5eb0a1,type:_0x1740ae,key:_0x52e9e1,clock:_0xd27cb,origin:_0xa309c7,action:_0x320e28,newValue:_0x2a2d69,oldValue:_0x5267d0}=_0x12f547;if(_0x5eb0a1==null||_0x1740ae==null||_0x52e9e1==null)return;if(typeof _0x5eb0a1==='string'&&_0x5eb0a1['startsWith']('~'))return;if(typeof _0x1740ae===_0x54aa94(0x236)&&_0x1740ae['startsWith']('~'))return;this[_0x54aa94(0x1cb)]['delete'](this[_0x54aa94(0x2c1)](_0x5eb0a1,_0x1740ae,_0x52e9e1,_0xd27cb));if(!this[_0x54aa94(0x254)](_0x5eb0a1,_0x1740ae,_0x52e9e1,_0xd27cb))return;const _0x5a1759=_0x320e28===_0xfb8d4c['REMOVE']?_0x54aa94(0x290):_0x54aa94(0x91);this[_0x54aa94(0x1ac)](_0x54aa94(0x15e),{'env':_0x5eb0a1,'type':_0x1740ae,'key':_0x52e9e1,'op':_0x5a1759,'clock':_0xd27cb,'origin':_0xa309c7,'value':_0x5a1759===_0x54aa94(0x290)?null:_0x2a2d69,'prevValue':_0x5267d0});}[_0x5988e7(0x2c3)](_0x5b278f){const _0x5eff9a=_0x5988e7;if(!this[_0x5eff9a(0x261)])return;if(!_0x5b278f||typeof _0x5b278f[_0x5eff9a(0xed)]!==_0x5eff9a(0x236)||typeof _0x5b278f['type']!==_0x5eff9a(0x236))return;const {env:_0x32d9aa,type:_0x526e02}=_0x5b278f;if(_0x32d9aa[_0x5eff9a(0x2bb)]('~')||_0x526e02[_0x5eff9a(0x2bb)]('~'))return;this['_pending'][_0x5eff9a(0x27e)](_0x32d9aa+'\x00'+_0x526e02,{'env':_0x32d9aa,'type':_0x526e02}),this[_0x5eff9a(0x2ac)]();}[_0x5988e7(0x2ac)](){const _0xca1bf3=_0x5988e7;if(this[_0xca1bf3(0xc7)])return;const _0x5ce295=()=>{const _0x26c20b=_0xca1bf3;this[_0x26c20b(0xc7)]=null,this[_0x26c20b(0x223)]()[_0x26c20b(0x267)](()=>{});};this[_0xca1bf3(0xc7)]=setTimeout(_0x5ce295,this[_0xca1bf3(0xd7)]>0x0?this[_0xca1bf3(0xd7)]:0x0);}async[_0x5988e7(0x223)](){const _0xd87ef7=_0x5988e7;if(this[_0xd87ef7(0x20a)]){this[_0xd87ef7(0x2ac)]();return;}this[_0xd87ef7(0x20a)]=!![];try{const _0x4ead8e=[...this[_0xd87ef7(0xc6)][_0xd87ef7(0xab)]()];this['_pending']['clear']();let _0x1391a2=![];for(const {env:_0x1b36aa,type:_0x3bc81b}of _0x4ead8e){try{const _0x4fb8dd=await this[_0xd87ef7(0x285)](_0x1b36aa,_0x3bc81b);if(_0x4fb8dd)_0x1391a2=!![];}catch{this[_0xd87ef7(0xc6)][_0xd87ef7(0x27e)](_0x1b36aa+'\x00'+_0x3bc81b,{'env':_0x1b36aa,'type':_0x3bc81b}),_0x1391a2=!![];}}if(_0x1391a2||this[_0xd87ef7(0xc6)][_0xd87ef7(0x1a8)]>0x0)this[_0xd87ef7(0x2ac)]();}finally{this[_0xd87ef7(0x20a)]=![];}}async[_0x5988e7(0x285)](_0x3d91a0,_0x58bd8e){const _0x491698=_0x5988e7,_0x8b8ef6=await this['okdb'][_0x491698(0x117)](_0x3d91a0),_0x3a2a96=_0x3d91a0+'\x00'+_0x58bd8e;!this['_cursors'][_0x491698(0x146)](_0x3a2a96)&&(!this[_0x491698(0xe2)][_0x491698(0x146)](_0x3d91a0)&&(_0x8b8ef6[_0x491698(0xd6)](),this[_0x491698(0xe2)][_0x491698(0x27e)](_0x3d91a0,_0x8b8ef6[_0x491698(0x1db)]()||0x0)),this[_0x491698(0x211)][_0x491698(0x27e)](_0x3a2a96,this[_0x491698(0xe2)]['get'](_0x3d91a0)));const _0x4b315b=this[_0x491698(0x211)][_0x491698(0x2a6)](_0x3a2a96),_0x554cb6=_0x8b8ef6['getClock'](_0x58bd8e)||0x0;if(_0x554cb6<=_0x4b315b)return![];const _0x372f3d=_0x4b315b+this[_0x491698(0x1d9)],_0x5b5bf3=Math['min'](_0x554cb6,_0x372f3d),_0x1be66d=_0x2dc572[_0x491698(0x1ce)]?_0x2dc572[_0x491698(0x26f)]():0x0,_0x5ada13=Array['from'](_0x8b8ef6[_0x491698(0x1a4)](_0x58bd8e,_0x4b315b+0x1,_0x5b5bf3));let _0x1ac508=_0x4b315b;for(const _0x2c02be of _0x5ada13){const {clock:_0x1d2f36,key:_0x180e85,action:_0x33d8e8,origin:_0x1b6b55}=_0x2c02be;if(_0x1d2f36>_0x1ac508)_0x1ac508=_0x1d2f36;if(_0x180e85==null)continue;if(this[_0x491698(0x1cb)][_0x491698(0x146)](this[_0x491698(0x2c1)](_0x3d91a0,_0x58bd8e,_0x180e85,_0x1d2f36)))continue;if(!this[_0x491698(0x254)](_0x3d91a0,_0x58bd8e,_0x180e85,_0x1d2f36))continue;let _0x5ee792,_0x2a8a36;if(_0x33d8e8===_0xfb8d4c[_0x491698(0x2a1)])_0x5ee792=_0x491698(0x290),_0x2a8a36=null;else{const _0xa10cb6=_0x8b8ef6['get'](_0x58bd8e,_0x180e85);_0xa10cb6==null?(_0x5ee792=_0x491698(0x290),_0x2a8a36=null):(_0x5ee792='put',_0x2a8a36=_0xa10cb6);}this['emit']('change',{'env':_0x3d91a0,'type':_0x58bd8e,'key':_0x180e85,'op':_0x5ee792,'clock':_0x1d2f36,'origin':_0x1b6b55,'value':_0x2a8a36});}if(_0x2dc572['enabled'])_0x2dc572['note'](_0x491698(0x2b2)+_0x3d91a0+':'+_0x58bd8e,_0x2dc572[_0x491698(0x26f)]()-_0x1be66d,'n='+_0x5ada13[_0x491698(0x243)]);return this[_0x491698(0x211)]['set'](_0x3a2a96,Math[_0x491698(0x1c9)](_0x1ac508,_0x5b5bf3)),_0x8b8ef6['getClock'](_0x58bd8e)>_0x5b5bf3;}[_0x5988e7(0x292)](){const _0x3a5643=_0x5988e7;return{'started':this[_0x3a5643(0x261)],'quantum':this[_0x3a5643(0x1d9)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x3a5643(0x281)]([...this[_0x3a5643(0x211)][_0x3a5643(0x20c)]()]['map'](([_0x4a48e6,_0x53eaa5])=>[_0x4a48e6[_0x3a5643(0xfb)]('\x00',':'),_0x53eaa5])),'pending':this['_pending'][_0x3a5643(0x1a8)],'seen':this['_seen'][_0x3a5643(0x1a8)]};}}return _0x1b64a2[_0x5988e7(0x205)]=_0x3ef022,okdbChangefeed={'OKDBChangefeed':_0x1b64a2},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3300c4=_0x1383d2;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x303525=require$$1$1,_0x48d93e=require$$1,{EVENTS:_0x375187}=requireOkdbEnums(),_0x59dbab=require$$0$3,{slotKey:_0x401d35}=requireOkdbProcessRegistry(),_0x544e97=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x51ea7c=0xfa0,_0x3a6900=0x5,_0x486cf4=0x2710,_0x32feb6=0xbb8,_0x3e6003=0x7d0,_0x5646ec=_0x3300c4(0x9a),_0x15a485=_0x3300c4(0x1a5),_0x3ff8cd='log',_0x518df2=_0x3300c4(0x9f),_0x2d6394=[_0x375187[_0x3300c4(0x2ab)],_0x375187[_0x3300c4(0x132)],_0x375187[_0x3300c4(0x10b)],_0x375187[_0x3300c4(0x108)],_0x375187['INDEX_PROGRESS'],_0x375187['INDEX_READY'],_0x375187[_0x3300c4(0x165)],_0x375187[_0x3300c4(0x1d1)],_0x3300c4(0x277),_0x3300c4(0x1c1),_0x3300c4(0x23c),_0x3300c4(0x1ae),_0x3300c4(0x172),_0x3300c4(0x110)],_0x1d46f0=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x292a34=0x64;function _0x4d9dad(_0x36d010){const _0x530efc=_0x3300c4;if(!_0x36d010)return _0x530efc(0x8a);const _0x485f44=(_0x36d010[_0x530efc(0x1b4)]||[])['map'](_0x5a8d53=>[_0x5a8d53['env'],_0x5a8d53['id'],_0x5a8d53[_0x530efc(0xd4)],_0x5a8d53['state'],!!_0x5a8d53[_0x530efc(0x269)],!!_0x5a8d53[_0x530efc(0x214)],!!_0x5a8d53[_0x530efc(0x2c4)],_0x5a8d53[_0x530efc(0x275)]?.[_0x530efc(0x29d)]??null,_0x5a8d53[_0x530efc(0x250)]?String(_0x5a8d53['error']?.[_0x530efc(0x1b3)]??_0x5a8d53[_0x530efc(0x250)]):null]);return JSON['stringify']([!!_0x36d010[_0x530efc(0x268)],_0x485f44]);}function _0x2d53fb({workers:_0x47a331,makeOkdb:_0x54ea77,port:_0x3d60fe,primaryOkdb:_0x4eb198,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x5ee63e=_0x3300c4;if(_0x303525['isPrimary'])return childEntry&&_0x303525[_0x5ee63e(0x11d)]({'exec':_0x48d93e[_0x5ee63e(0x29f)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x54b2af=_0x5ee63e,_0x24d809=[];for(let _0x3d43c6=0x0;_0x3d43c6<process[_0x54b2af(0x2a0)][_0x54b2af(0x243)];_0x3d43c6++){const _0x5810ad=process[_0x54b2af(0x2a0)][_0x3d43c6];if(_0x5810ad[_0x54b2af(0x2bb)](_0x54b2af(0x151))||_0x5810ad['startsWith']('--watch')||_0x5810ad[_0x54b2af(0x2bb)](_0x54b2af(0x1f0)))continue;if(_0x5810ad==='-e'||_0x5810ad===_0x54b2af(0xc3)||_0x5810ad==='-p'||_0x5810ad===_0x54b2af(0x15f)){_0x3d43c6++;continue;}_0x24d809[_0x54b2af(0xb1)](_0x5810ad);}return _0x24d809;})())}),_0x15fc5b({'workers':_0x47a331,'port':_0x3d60fe,'primaryOkdb':_0x4eb198,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x3d60fe});return _0x320482({'makeOkdb':_0x54ea77,'port':_0x3d60fe});}function _0x15fc5b({workers:_0x1d99a3,port:_0x56d99f,primaryOkdb:_0x1374e8,workerEnv:_0x4f800e,workerRole:_0x46bc6f,listenAddr:_0x155d63}){const _0x39ff7b=_0x3300c4,_0x5dbdd3=new Map(),_0x2568d5=new Map();let _0x18f01f=![];const _0x49a6e8=_0x18cec8=>_0x18cec8?.['__okdbSlot'],_0x25980d=_0x2ddfbd=>{const _0x3276cc=_0x2fe0,_0x2098b4=_0x303525[_0x3276cc(0x120)]({...process.env,..._0x4f800e||{},'OKDB_CLUSTER_SLOT':String(_0x2ddfbd)});return _0x2098b4['__okdbSlot']=_0x2ddfbd,_0x5dbdd3[_0x3276cc(0x27e)](_0x2098b4['process'][_0x3276cc(0x29d)],{'worker':_0x2098b4,'startedAt':Date[_0x3276cc(0x26f)](),'slot':_0x2ddfbd}),_0x2098b4['on'](_0x3276cc(0x250),_0x484d57=>{const _0x4c1253=_0x3276cc;console[_0x4c1253(0x1fd)](_0x4c1253(0x2bf)+_0x2098b4[_0x4c1253(0x262)][_0x4c1253(0x29d)]+_0x4c1253(0x259)+(_0x484d57?.[_0x4c1253(0x1b3)]??_0x484d57));}),_0x2098b4['on'](_0x3276cc(0x232),()=>_0x375f82()),_0x2098b4;},_0x556783=_0x15a76f=>{const _0x16bb9b=_0x2fe0;for(const {worker:_0x204497}of _0x5dbdd3[_0x16bb9b(0xab)]()){if(_0x204497[_0x16bb9b(0x18b)]()||!_0x204497[_0x16bb9b(0x11c)]())continue;try{_0x204497[_0x16bb9b(0x174)](_0x15a76f);}catch{}}};_0x1374e8?.['_activateProcesses']?.({'kind':'primary','listenAddr':_0x155d63})['catch'](()=>{}),_0x1374e8?.[_0x39ff7b(0x140)]?.['setOwnMeta']?.({'workersConfigured':_0x1d99a3});const _0x12a7ad={'engines':!![],'processors':!![],'compaction':!![],..._0x46bc6f,'http':!![]},_0x375f82=()=>{const _0x2e8535=_0x39ff7b,_0x3264f6=_0x1374e8?.[_0x2e8535(0x140)];if(!_0x3264f6||!_0x3264f6[_0x2e8535(0x128)])return;const _0x3656dd=_0x3264f6['selfKey'];for(const {worker:_0x351d82,startedAt:_0x27e729,slot:_0x527011,stats:_0x4ad251,processing:_0x4f495a}of _0x5dbdd3[_0x2e8535(0xab)]()){if(_0x351d82[_0x2e8535(0x18b)]())continue;const _0x38b47f=_0x3264f6[_0x2e8535(0x14b)]?.()&&_0x3264f6[_0x2e8535(0xec)](_0x2e8535(0xb9),_0x4532ae(_0x527011))?.[_0x2e8535(0x252)]===!![];_0x3264f6[_0x2e8535(0x134)]({'pid':_0x351d82[_0x2e8535(0x262)][_0x2e8535(0x29d)],'startedAt':_0x27e729,'kind':_0x2e8535(0x242),'supervisorKey':_0x3656dd,'slot':_0x527011,'slotKey':_0x4532ae(_0x527011),'role':_0x12a7ad,'listenAddr':_0x155d63,'lifecycle':_0x38b47f?_0x2e8535(0xa7):_0x2e8535(0x21e),'processing':_0x4f495a??null,'stats':_0x4ad251??null})['catch'](()=>{});}},_0x4532ae=_0x255f68=>_0x401d35(_0x39ff7b(0x1d2)+_0x56d99f,_0x255f68),_0xb176fb=_0x238537=>{const _0x3e7be6=_0x39ff7b,_0x1ab15c=_0x1374e8?.[_0x3e7be6(0x140)];if(!_0x1ab15c?.[_0x3e7be6(0x14b)]?.())return![];return _0x1ab15c[_0x3e7be6(0xec)]('slot',_0x4532ae(_0x238537))?.[_0x3e7be6(0x252)]===!![];};for(let _0x2c1032=0x0;_0x2c1032<_0x1d99a3;_0x2c1032++){const _0x1f94ea=_0xb176fb(_0x2c1032);_0x2568d5[_0x39ff7b(0x27e)](_0x2c1032,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1f94ea,'respawnTimer':null}),_0x1f94ea?console[_0x39ff7b(0x1fd)]('[okdb-cluster]\x20slot='+_0x2c1032+_0x39ff7b(0x104)):_0x25980d(_0x2c1032);}const _0x389db2=()=>{const _0x536851=_0x39ff7b,_0x30bdca=_0x1374e8?.['processes'];if(!_0x30bdca?.['_isWriter']||!_0x30bdca['hasDesired']?.())return;for(const [_0x15bee4,_0x4b9923]of _0x2568d5[_0x536851(0x20c)]()){const _0x23a458=_0x30bdca['getDesired'](_0x536851(0xb9),_0x4532ae(_0x15bee4)),_0x2e357a=_0x23a458?.[_0x536851(0x252)]===!![],_0x58cdd8=_0x23a458?.[_0x536851(0x27f)]===!![];if(_0x2e357a&&!_0x4b9923[_0x536851(0x27d)]){_0x4b9923[_0x536851(0x27d)]=!![];_0x4b9923['respawnTimer']&&(clearTimeout(_0x4b9923[_0x536851(0x27b)]),_0x4b9923[_0x536851(0x27b)]=null);for(const {worker:_0x4c97eb}of _0x5dbdd3[_0x536851(0xab)]()){if(_0x49a6e8(_0x4c97eb)!==_0x15bee4||_0x4c97eb[_0x536851(0x18b)]())continue;try{if(_0x58cdd8)_0x4c97eb['process'][_0x536851(0x27f)](_0x536851(0x1f5));else _0x4c97eb['isConnected']()&&_0x4c97eb[_0x536851(0x1d6)]();}catch{}}console['log'](_0x536851(0x2b9)+(_0x58cdd8?_0x536851(0xef):_0x536851(0x28a))+'\x20worker\x20slot='+_0x15bee4+_0x536851(0xaf));}else{if(!_0x2e357a&&_0x4b9923['dead']&&_0x23a458){_0x4b9923[_0x536851(0x27d)]=![],_0x4b9923[_0x536851(0x1cc)]=[],_0x4b9923['consecutiveFailures']=0x0;const _0x31b770=[..._0x5dbdd3[_0x536851(0xab)]()][_0x536851(0x1b2)](({worker:_0x4cbf31})=>_0x49a6e8(_0x4cbf31)===_0x15bee4&&!_0x4cbf31[_0x536851(0x18b)]());!_0x31b770&&!_0x18f01f&&(_0x25980d(_0x15bee4),console['log']('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x15bee4));}}}},_0x377965=()=>{try{_0x389db2();}catch{}};_0x1374e8?.[_0x39ff7b(0x18c)]?.['on']?.(_0x375187[_0x39ff7b(0x249)],_0x377965);const _0x20fa91=[];if(_0x1374e8?.[_0x39ff7b(0x18c)]?.['on'])for(const _0x5e0bdd of _0x2d6394){const _0x5cb815=_0x4a1dc8=>{_0x556783({[_0x5646ec]:_0x15a485,'event':_0x5e0bdd,'data':_0x4a1dc8??{}});};_0x1374e8[_0x39ff7b(0x18c)]['on'](_0x5e0bdd,_0x5cb815),_0x20fa91[_0x39ff7b(0xb1)]({'event':_0x5e0bdd,'handler':_0x5cb815});}const _0x5e8ae6=setInterval(()=>{_0x389db2(),_0x375f82();},_0x1d46f0);_0x5e8ae6[_0x39ff7b(0x12e)]?.();const _0x42ab4b=(_0x3446e5,_0x372194)=>{const _0x37a7f4=_0x39ff7b;if(!_0x372194||typeof _0x372194!=='object'||_0x372194[_0x5646ec]!==_0x3ff8cd)return;if(!_0x1374e8?.['log']?.[_0x37a7f4(0xc0)])return;const _0x347481=_0x372194[_0x37a7f4(0x1e7)]||{};_0x1374e8[_0x37a7f4(0x1fd)]['ingest']({..._0x347481,'msg':'[w'+_0x372194[_0x37a7f4(0xb9)]+']\x20'+(_0x347481[_0x37a7f4(0x12f)]??''),'meta':{..._0x347481['meta']||{},'worker':_0x372194[_0x37a7f4(0xb9)],'workerPid':_0x372194[_0x37a7f4(0x29d)]}});};_0x303525['on']('message',_0x42ab4b);const _0x5aa13b=(_0x8028f7,_0x344ebc)=>{const _0x1b5438=_0x39ff7b;if(!_0x344ebc||typeof _0x344ebc!==_0x1b5438(0x273)||_0x344ebc[_0x5646ec]!==_0x518df2)return;const _0x1bfd37=_0x5dbdd3[_0x1b5438(0x2a6)](_0x8028f7[_0x1b5438(0x262)][_0x1b5438(0x29d)]);if(_0x1bfd37){_0x1bfd37['stats']={..._0x344ebc[_0x1b5438(0x9f)],'at':Date['now']()};if(_0x344ebc[_0x1b5438(0xcf)]!==undefined){const _0x26d243=_0x4d9dad(_0x344ebc[_0x1b5438(0xcf)]);_0x26d243!==_0x1bfd37[_0x1b5438(0x188)]&&(_0x1bfd37[_0x1b5438(0x188)]=_0x26d243,_0x38b12c()),_0x1bfd37[_0x1b5438(0xcf)]=_0x344ebc[_0x1b5438(0xcf)];}}};let _0x1a76b8=null;const _0x38b12c=()=>{if(_0x1a76b8||_0x18f01f)return;_0x1a76b8=setTimeout(()=>{_0x1a76b8=null;if(!_0x18f01f)_0x375f82();},_0x292a34),_0x1a76b8['unref']?.();};_0x303525['on'](_0x39ff7b(0x1b3),_0x5aa13b),_0x303525['on'](_0x39ff7b(0x19a),(_0x1e8bc2,_0x576e66,_0x4d4077)=>{const _0x2eb6cc=_0x39ff7b,_0x5c28ba=_0x1e8bc2[_0x2eb6cc(0x262)][_0x2eb6cc(0x29d)],_0x3e46db=_0x49a6e8(_0x1e8bc2),_0x39aaab=_0x5dbdd3['get'](_0x5c28ba);if(_0x39aaab&&_0x1374e8?.[_0x2eb6cc(0x140)])_0x1374e8['processes'][_0x2eb6cc(0x1df)](_0x5c28ba+':'+_0x39aaab['startedAt'])[_0x2eb6cc(0x267)](()=>{});_0x5dbdd3[_0x2eb6cc(0x264)](_0x5c28ba),console['log']('[okdb-cluster]\x20worker\x20pid='+_0x5c28ba+_0x2eb6cc(0x14a)+(_0x3e46db??'?')+_0x2eb6cc(0x1bb)+('(code='+_0x576e66+_0x2eb6cc(0xb6)+(_0x4d4077??_0x2eb6cc(0x25e))+_0x2eb6cc(0x1ec)+_0x5dbdd3['size']+'\x20worker(s)\x20remaining')),_0x375f82();if(_0x18f01f||_0x3e46db==null)return;const _0x2deae1=_0x2568d5[_0x2eb6cc(0x2a6)](_0x3e46db);if(!_0x2deae1||_0x2deae1[_0x2eb6cc(0x27d)])return;const _0x350dc4=Date['now']();_0x2deae1[_0x2eb6cc(0x1cc)]['push'](_0x350dc4),_0x2deae1[_0x2eb6cc(0x1cc)]=_0x2deae1['deaths'][_0x2eb6cc(0x125)](_0x1b1ae5=>_0x350dc4-_0x1b1ae5<=_0x486cf4);if(_0x2deae1[_0x2eb6cc(0x1cc)][_0x2eb6cc(0x243)]>=_0x3a6900){_0x2deae1[_0x2eb6cc(0x27d)]=!![],console[_0x2eb6cc(0x250)](_0x2eb6cc(0x272)+_0x3e46db+_0x2eb6cc(0x13d)+_0x2deae1[_0x2eb6cc(0x1cc)]['length']+_0x2eb6cc(0xb5)+(_0x486cf4+_0x2eb6cc(0xd3)+_0x5dbdd3[_0x2eb6cc(0x1a8)]+'\x20worker(s)\x20still\x20serving'));return;}_0x2deae1[_0x2eb6cc(0x25b)]++;const _0x23db14=Math[_0x2eb6cc(0x28e)](_0x51ea7c,_0x544e97*0x2**(_0x2deae1[_0x2eb6cc(0x25b)]-0x1));console[_0x2eb6cc(0x1fd)](_0x2eb6cc(0xde)+_0x3e46db+_0x2eb6cc(0xc9)+_0x23db14+_0x2eb6cc(0x99)+_0x2deae1[_0x2eb6cc(0x25b)]+')'),_0x2deae1[_0x2eb6cc(0x27b)]=setTimeout(()=>{const _0x3ed60f=_0x2eb6cc;_0x2deae1[_0x3ed60f(0x27b)]=null;if(_0x18f01f||_0x2deae1[_0x3ed60f(0x27d)])return;const _0x12443e=_0x25980d(_0x3e46db);_0x12443e[_0x3ed60f(0x1a0)]('listening',()=>{const _0xf4d123=_0x3ed60f;if(_0x2568d5[_0xf4d123(0x2a6)](_0x3e46db)===_0x2deae1)_0x2deae1[_0xf4d123(0x25b)]=0x0;});},_0x23db14),_0x2deae1[_0x2eb6cc(0x27b)][_0x2eb6cc(0x12e)]?.();});const _0x492dc0=[..._0x5dbdd3[_0x39ff7b(0x130)]()];console[_0x39ff7b(0x1fd)]('[okdb-cluster]\x20primary\x20pid='+process[_0x39ff7b(0x29d)]+_0x39ff7b(0x260)+_0x1d99a3+_0x39ff7b(0xac)+_0x56d99f+':\x20'+('['+_0x492dc0[_0x39ff7b(0x29f)](',\x20')+']'));const _0x4d78fe={'_isClusterController':!![],'port':_0x56d99f,'primaryOkdb':_0x1374e8??null,'status'(){const _0x243b74=_0x39ff7b;return{'clustered':!![],'primaryPid':process[_0x243b74(0x29d)],'port':_0x56d99f,'primaryRole':_0x1374e8?.[_0x243b74(0x2a5)]??null,'processorPid':null,'supervisorPid':process[_0x243b74(0x29d)],'workers':[..._0x5dbdd3[_0x243b74(0xab)]()]['map'](({worker:_0x19d70b})=>({'pid':_0x19d70b[_0x243b74(0x262)]['pid'],'id':_0x19d70b['id'],'dead':_0x19d70b[_0x243b74(0x18b)]()}))};},async 'close'(){const _0x13ad33=_0x39ff7b;_0x18f01f=!![];for(const _0x4deb1f of _0x2568d5[_0x13ad33(0xab)]()){_0x4deb1f[_0x13ad33(0x27d)]=!![],_0x4deb1f[_0x13ad33(0x27b)]&&(clearTimeout(_0x4deb1f[_0x13ad33(0x27b)]),_0x4deb1f['respawnTimer']=null);}clearInterval(_0x5e8ae6);_0x1a76b8&&(clearTimeout(_0x1a76b8),_0x1a76b8=null);_0x303525[_0x13ad33(0x20f)]('message',_0x42ab4b),_0x303525['off'](_0x13ad33(0x1b3),_0x5aa13b),_0x1374e8?.[_0x13ad33(0x18c)]?.[_0x13ad33(0x20f)]?.(_0x375187[_0x13ad33(0x249)],_0x377965);if(_0x1374e8?.[_0x13ad33(0x18c)]?.[_0x13ad33(0x20f)])for(const {event:_0x2c40d6,handler:_0x1e3a3a}of _0x20fa91){try{_0x1374e8[_0x13ad33(0x18c)][_0x13ad33(0x20f)](_0x2c40d6,_0x1e3a3a);}catch{}}_0x20fa91[_0x13ad33(0x243)]=0x0;const _0x54d4cf=[..._0x5dbdd3[_0x13ad33(0xab)]()][_0x13ad33(0x2a7)](({worker:_0x352402})=>_0x352402);if(_0x54d4cf[_0x13ad33(0x243)]===0x0)return;await Promise[_0x13ad33(0xe3)](_0x54d4cf[_0x13ad33(0x2a7)](_0x1dc333=>new Promise(_0xc4220e=>{const _0xb61f75=_0x13ad33;if(_0x1dc333[_0xb61f75(0x18b)]()){_0xc4220e();return;}let _0x21b08d=![];const _0x52dc02=()=>{if(_0x21b08d)return;_0x21b08d=!![];if(_0x2e0182)clearTimeout(_0x2e0182);_0xc4220e();};_0x1dc333[_0xb61f75(0x1a0)]('exit',_0x52dc02);const _0x2e0182=setTimeout(()=>{const _0x460ec9=_0xb61f75;try{_0x1dc333[_0x460ec9(0x262)][_0x460ec9(0x27f)]();}catch{}},_0x32feb6+0x1f4);_0x2e0182[_0xb61f75(0x12e)]?.();try{_0x1dc333['disconnect']();}catch{try{_0x1dc333[_0xb61f75(0x262)][_0xb61f75(0x27f)]();}catch{}}})));}};return _0x4d78fe;}async function _0x320482({makeOkdb:_0xe63f9,port:_0x1367bb}){const _0x26d252=_0x3300c4,_0x5989d1=await _0xe63f9();return _0x1beb5b(_0x5989d1),_0x5989d1[_0x26d252(0x265)][_0x26d252(0x118)](_0x1367bb);}function _0x1beb5b(_0x4a940a){const _0x4e0542=_0x3300c4;if(!_0x4a940a||_0x4a940a['_clusterWorkerAttached'])return;_0x4a940a[_0x4e0542(0x109)]=!![];try{const {OKDBChangefeed:_0x2bed63}=requireOkdbChangefeed(),_0x37af58=_0x4a940a['_adminRelay'];if(_0x37af58&&typeof _0x37af58[_0x4e0542(0x100)]===_0x4e0542(0xd1)){const _0x3b22be=new _0x2bed63(_0x4a940a);_0x3b22be[_0x4e0542(0xdf)](),_0x37af58[_0x4e0542(0x100)](_0x3b22be),_0x4a940a[_0x4e0542(0x203)]=_0x3b22be;}}catch(_0x4bf98a){_0x4a940a[_0x4e0542(0x1fd)]?.['warn']?.(_0x4e0542(0x229)+(_0x4bf98a?.[_0x4e0542(0x1b3)]??_0x4bf98a),{'feature':_0x4e0542(0x87)});}const _0x4ad3f2=_0x270629=>{const _0x5482b0=_0x4e0542;if(!_0x270629||typeof _0x270629!==_0x5482b0(0x273)||_0x270629[_0x5646ec]==null)return;if(_0x270629[_0x5646ec]===_0x15a485)try{_0x4a940a[_0x5482b0(0x282)]?.[_0x5482b0(0x9c)]?.(_0x270629['event'],_0x270629[_0x5482b0(0x29a)]);}catch{}};process['on'](_0x4e0542(0x1b3),_0x4ad3f2),_0x4a940a[_0x4e0542(0x216)]=_0x4ad3f2;{let _0x14d2a9=process[_0x4e0542(0xbf)](),_0x75035c=Date['now']();const _0x50f851=()=>{const _0x55655d=_0x4e0542;if(typeof process[_0x55655d(0x174)]!=='function'||!process[_0x55655d(0xb7)])return;const _0x47d054=Date[_0x55655d(0x26f)](),_0x49c70d=process[_0x55655d(0xbf)](),_0x2b1936=(_0x47d054-_0x75035c)*0x3e8,_0x12190e=_0x49c70d[_0x55655d(0x224)]-_0x14d2a9[_0x55655d(0x224)]+(_0x49c70d[_0x55655d(0x83)]-_0x14d2a9['system']),_0x31df54=_0x2b1936>0x0?Math[_0x55655d(0x28e)](0x64,Math[_0x55655d(0x9e)](_0x12190e/(_0x2b1936*(_0x59dbab[_0x55655d(0x8b)]()['length']||0x1))*0x64)):0x0;_0x14d2a9=_0x49c70d,_0x75035c=_0x47d054;const _0x446cfe=process[_0x55655d(0x1a7)]();let _0x25765a=null;try{_0x25765a=_0x4a940a[_0x55655d(0x2a5)]?.[_0x55655d(0x1b4)]?_0x4a940a[_0x55655d(0x140)]?.[_0x55655d(0x16d)]?.()??null:null;}catch{}try{process[_0x55655d(0x174)]({[_0x5646ec]:_0x518df2,'stats':{'rss':_0x446cfe[_0x55655d(0x257)],'heapUsed':_0x446cfe[_0x55655d(0x18e)],'heapTotal':_0x446cfe[_0x55655d(0x27a)],'external':_0x446cfe[_0x55655d(0x131)],'cpuPct':_0x31df54,'cpuWindowMs':Math[_0x55655d(0x9e)](_0x2b1936/0x3e8)||null},'processing':_0x25765a});}catch{}},_0x3e4db9=Math[_0x4e0542(0x1c9)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x246659=setInterval(_0x50f851,_0x3e4db9);_0x246659[_0x4e0542(0x12e)]?.(),_0x50f851();for(const _0x369d6b of[_0x4e0542(0x1ae),_0x4e0542(0x172)]){_0x4a940a[_0x4e0542(0x18c)]?.['on']?.(_0x369d6b,()=>{try{_0x50f851();}catch{}});}}let _0x16dbfc=![];const _0x39ce67=async _0x5c81a0=>{const _0x4f369f=_0x4e0542;if(_0x16dbfc)return;_0x16dbfc=!![];const _0x2893dd=setTimeout(()=>process[_0x4f369f(0x19a)](_0x5c81a0),_0x32feb6);_0x2893dd[_0x4f369f(0x12e)]?.();try{await _0x4a940a[_0x4f369f(0xf8)]?.();}catch{}process[_0x4f369f(0x19a)](_0x5c81a0);};process['on'](_0x4e0542(0x1d6),()=>_0x39ce67(0x0));if(process[_0x4e0542(0x174)]&&!process[_0x4e0542(0xb7)])_0x39ce67(0x0);if(process['platform']!==_0x4e0542(0x122)){const _0x1c4c75=setInterval(()=>{if(process['ppid']===0x1)_0x39ce67(0x0);},_0x3e6003);_0x1c4c75[_0x4e0542(0x12e)]?.(),_0x4a940a['_clusterOrphanWatch']=_0x1c4c75;}}return okdbCluster={'runClustered':_0x2d53fb,'attachWorkerCluster':_0x1beb5b},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x2f2539=require$$0$5,{attachWorkerCluster:_0x46b847}=requireOkdbCluster();async function _0x210b1f(){const _0x2ddb0e=_0x2fe0,_0x429dbb=process.env.OKDB_HTTP_CHILD;if(!_0x429dbb)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0x3d04c6,port:_0x212127,options:options={},logLevel:logLevel=_0x2ddb0e(0x88)}=JSON[_0x2ddb0e(0xf1)](_0x429dbb);if(!_0x3d04c6||!_0x212127)throw new Error(_0x2ddb0e(0x22b));const _0x482ab7=new _0x2f2539(_0x3d04c6,{...options,'engines':![],'processors':![],'compaction':![]});_0x482ab7[_0x2ddb0e(0x1fd)][_0x2ddb0e(0x190)]?.();const _0x56f506=process.env.OKDB_CLUSTER_SLOT??'?',_0x52b646={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3a9689=_0x52b646[logLevel]??_0x52b646[_0x2ddb0e(0x88)];_0x482ab7[_0x2ddb0e(0x1fd)]['attach'](_0x4f283d=>{const _0x4ee181=_0x2ddb0e;if((_0x52b646[_0x4f283d[_0x4ee181(0x1fc)]]??0x1)<_0x3a9689)return;try{process['send']?.({'__okdbCluster':'log','slot':_0x56f506,'pid':process[_0x4ee181(0x29d)],'entry':_0x4f283d});}catch{}}),await _0x482ab7['open'](),_0x46b847(_0x482ab7),await _0x482ab7['http']['listen'](_0x212127);}return _0x210b1f()['catch'](_0x1aa40a=>{const _0x24ec76=_0x2fe0;try{process[_0x24ec76(0x174)]?.({'__okdbCluster':_0x24ec76(0x1fd),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x24ec76(0x29d)],'entry':{'level':_0x24ec76(0x250),'msg':_0x24ec76(0x166)+(_0x1aa40a?.[_0x24ec76(0x1b3)]??_0x1aa40a)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
1
+ 'use strict';const _0x5e06fa=_0x5881;(function(_0x167fb2,_0x2561f6){const _0x319a0e=_0x5881,_0x5cd7d1=_0x167fb2();while(!![]){try{const _0x310b57=-parseInt(_0x319a0e(0x287))/0x1+-parseInt(_0x319a0e(0x184))/0x2+parseInt(_0x319a0e(0x1c9))/0x3*(parseInt(_0x319a0e(0x122))/0x4)+-parseInt(_0x319a0e(0x151))/0x5+parseInt(_0x319a0e(0x2a9))/0x6*(parseInt(_0x319a0e(0x1c6))/0x7)+parseInt(_0x319a0e(0x192))/0x8*(parseInt(_0x319a0e(0x15c))/0x9)+parseInt(_0x319a0e(0x2d3))/0xa*(parseInt(_0x319a0e(0x2a0))/0xb);if(_0x310b57===_0x2561f6)break;else _0x5cd7d1['push'](_0x5cd7d1['shift']());}catch(_0x5df2fe){_0x5cd7d1['push'](_0x5cd7d1['shift']());}}}(_0x2913,0xc7b65));var require$$0$5=require(_0x5e06fa(0xd9)),require$$1$1=require(_0x5e06fa(0x1c7)),require$$1=require('path'),require$$0$3=require('os'),require$$2=require(_0x5e06fa(0x1d8)),require$$0=require(_0x5e06fa(0x1e4)),require$$0$2=require(_0x5e06fa(0x29e)),require$$0$1=require('fs'),require$$0$4=require(_0x5e06fa(0x205));function _0x5881(_0x39ddc,_0x17eac9){_0x39ddc=_0x39ddc-0xa5;const _0x291301=_0x2913();let _0x5881cc=_0x291301[_0x39ddc];return _0x5881cc;}function getDefaultExportFromCjs(_0x4671f9){const _0x3441ed=_0x5e06fa;return _0x4671f9&&_0x4671f9[_0x3441ed(0xdc)]&&Object[_0x3441ed(0xd0)]['hasOwnProperty'][_0x3441ed(0x1f5)](_0x4671f9,_0x3441ed(0x201))?_0x4671f9[_0x3441ed(0x201)]:_0x4671f9;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4b98dc=_0x5e06fa;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5ac31c={'PUT':'put','REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x4b98dc(0x1aa),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0x4b98dc(0x263),'FTS_REGISTER':_0x4b98dc(0xfc),'FTS_DROP':'dropFts','FTS_RESET':'resetFts','SCHEMA_SET':'setSchema','SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':'clearTtl'},_0x5a29aa={'SYSTEM_READY':_0x4b98dc(0x1f0),'FIELD_RESOLVER_REGISTERED':_0x4b98dc(0x2e0),'SYSTEM_STOPPED':_0x4b98dc(0x219),'SYSTEM_CLOCK_CHANGE':_0x4b98dc(0x11c),'SYSTEM_POKE':_0x4b98dc(0x286),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x4b98dc(0xf9),'SYSTEM_PROC':_0x4b98dc(0xf3),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x4b98dc(0x2c2),'ITEM_UPDATE':_0x4b98dc(0x152),'ITEM_REMOVE':_0x4b98dc(0xe6),'ITEM_PENDING':'item:pending','INDEX_RESET':_0x4b98dc(0x241),'INDEX_READY':_0x4b98dc(0xd6),'INDEX_PROGRESS':_0x4b98dc(0x200),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x4b98dc(0x1d9),'INDEX_REGISTERED':_0x4b98dc(0x1f1),'FTS_REGISTERED':_0x4b98dc(0x2d5),'FTS_DROP':_0x4b98dc(0x15e),'FTS_RESET':_0x4b98dc(0x1df),'SCHEMA_SET':_0x4b98dc(0x129),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x4b98dc(0xc9),'UNIQUE_VIOLATION_RESOLVED':_0x4b98dc(0xf7),'REF_VIOLATION':_0x4b98dc(0x1b8),'REF_VIOLATION_RESOLVED':_0x4b98dc(0x26c),'SYNC_APPLY':_0x4b98dc(0x21f),'TXN_START':_0x4b98dc(0x249),'TXN_END':_0x4b98dc(0xd4),'TXN_ROLLBACK':_0x4b98dc(0x155),'TYPE_REGISTERED':_0x4b98dc(0x188),'TYPE_DROP':_0x4b98dc(0x10b),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x4b98dc(0x145),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x4b98dc(0x270),'TTL_SET':_0x4b98dc(0x22c),'TTL_CLEAR':_0x4b98dc(0x1fc),'LICENSE_INVALID':_0x4b98dc(0xba),'LICENSE_ADDED':_0x4b98dc(0x2d8),'LICENSE_ACTIVATED':_0x4b98dc(0x24e),'LICENSE_REMOVED':_0x4b98dc(0x12e)},_0x32f1be={'CREATING':_0x4b98dc(0xcb),'RESETTING':_0x4b98dc(0x29b),'READY':'ready','DROPPING':'dropping','WAITING':_0x4b98dc(0x2ca),'ERROR':_0x4b98dc(0x277)},_0x36a08d={'CREATED':'created','STARTING':'starting','STARTED':_0x4b98dc(0x29c),'STOPPING':_0x4b98dc(0xdd),'STOPPED':_0x4b98dc(0xa5)},_0x9beedc={'CREATING':_0x4b98dc(0xcb),'READY':'ready','HALTED':'halted','STOPPED':_0x4b98dc(0xa5),'RESETTING':_0x4b98dc(0x29b)},_0x10155f=Object[_0x4b98dc(0xb5)]({'POKE':_0x4b98dc(0x181),'DRAIN':'bus:drain','TYPE_DROP':_0x4b98dc(0xc6),'PROC':_0x4b98dc(0x21c),'ENV_RELEASE':_0x4b98dc(0xd1)});return okdbEnums={'BUS_EVENTS':_0x10155f,'CHANGE_ACTIONS':_0x5ac31c,'EVENTS':_0x5a29aa,'INDEX_STATE':_0x32f1be,'OKDB_STATE':_0x36a08d,'VIEW_STATE':_0x9beedc},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x51eba8=_0x5e06fa;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x250bd0,performance:_0x317f2c}=require$$0,_0x5b65d1=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x39e5a7=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4f6437=process.env.OKDB_LOOP_LAG_ALL==='1',_0x488830=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x353e76{constructor(){const _0x185889=_0x5881;this[_0x185889(0xcf)]=_0x5b65d1,this[_0x185889(0x1c8)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x185889(0x2e1)]=![],this[_0x185889(0x25b)]=(_0x8cf10,_0x1b1c79)=>process[_0x185889(0xca)][_0x185889(0x21e)](_0x8cf10+(_0x1b1c79?'\x20'+JSON[_0x185889(0xd8)](_0x1b1c79):'')+'\x0a');}[_0x51eba8(0x24a)](){const _0x3d87ff=_0x51eba8;return _0x317f2c[_0x3d87ff(0x24a)]();}[_0x51eba8(0x23c)](_0x1aa61e){const _0x33c911=_0x51eba8;if(typeof _0x1aa61e===_0x33c911(0x18c))this[_0x33c911(0x25b)]=_0x1aa61e;}[_0x51eba8(0x1d2)](_0x5ae808,_0x3a8fc1,_0x38a688){const _0x5f5ac6=_0x51eba8;if(!this['enabled'])return;let _0x17aff7=this['_buckets'][_0x5f5ac6(0xec)](_0x5ae808);!_0x17aff7&&(_0x17aff7={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x5f5ac6(0x1c8)][_0x5f5ac6(0x17a)](_0x5ae808,_0x17aff7)),_0x17aff7['ms']+=_0x3a8fc1,_0x17aff7[_0x5f5ac6(0x235)]+=0x1,_0x3a8fc1>_0x17aff7['maxMs']&&(_0x17aff7[_0x5f5ac6(0x1b2)]=_0x3a8fc1,_0x17aff7[_0x5f5ac6(0x1b0)]=_0x38a688||'');}[_0x51eba8(0x177)](_0x425d76){const _0x5695dc=_0x51eba8;if(!this[_0x5695dc(0xcf)]||this[_0x5695dc(0x2e1)])return;this[_0x5695dc(0x2e1)]=!![];if(_0x425d76)this[_0x5695dc(0x25b)]=_0x425d76;this['_h']=_0x250bd0({'resolution':0xa}),this['_h'][_0x5695dc(0xbd)](),this[_0x5695dc(0xa7)]=setInterval(()=>this[_0x5695dc(0x128)](),_0x39e5a7);if(this[_0x5695dc(0xa7)][_0x5695dc(0x13e)])this[_0x5695dc(0xa7)][_0x5695dc(0x13e)]();}[_0x51eba8(0x186)](_0x1674a5){const _0x367dbf=_0x51eba8;if(!this[_0x367dbf(0x15a)])this[_0x367dbf(0x15a)]=new Set();this[_0x367dbf(0x15a)][_0x367dbf(0x25e)](_0x1674a5);if(!this['_started'])this['_startAdmission']();}[_0x51eba8(0x2b6)](_0x472136){const _0x47c89f=_0x51eba8;this[_0x47c89f(0x15a)]?.[_0x47c89f(0x2aa)](_0x472136);}[_0x51eba8(0x233)](){const _0x39c11e=_0x51eba8;if(this[_0x39c11e(0x1f3)])return;this[_0x39c11e(0x1f3)]=!![];!this['_h']&&(this['_h']=_0x250bd0({'resolution':0xa}),this['_h']['enable']());const _0x56d82b=_0x39e5a7;this['_admissionTimer']=setInterval(()=>{const _0x28f812=_0x39c11e,_0x2c9ebf=this['_h'];if(!_0x2c9ebf)return;const _0x7f7bbb=_0x2c9ebf['percentile'](0x63)/0xf4240,_0x6e0719=_0x2c9ebf['max']/0xf4240,_0x2b3028=_0x2c9ebf[_0x28f812(0x251)]/0xf4240;_0x2c9ebf[_0x28f812(0x1d4)]();if(this[_0x28f812(0x15a)])for(const _0x103f56 of this[_0x28f812(0x15a)]){try{_0x103f56({'p99Ms':_0x7f7bbb,'maxMs':_0x6e0719,'meanMs':_0x2b3028,'reportMs':_0x56d82b});}catch{}}},_0x56d82b);if(this['_admissionTimer'][_0x39c11e(0x13e)])this[_0x39c11e(0xe1)]['unref']();}[_0x51eba8(0x128)](){const _0x1579f4=_0x51eba8,_0xe21e6f=this['_h'],_0x3acd09=_0xe21e6f[_0x1579f4(0x2bc)]/0xf4240,_0x27b181=_0xe21e6f[_0x1579f4(0x295)](0x63)/0xf4240,_0x1a7d84=_0xe21e6f[_0x1579f4(0x251)]/0xf4240;_0xe21e6f['reset']();const _0x469d3c=[...this[_0x1579f4(0x1c8)][_0x1579f4(0x24c)]()]['map'](([_0x52bc5c,_0x2f3640])=>({'label':_0x52bc5c,..._0x2f3640}))['sort']((_0x1c0057,_0x3684ed)=>_0x3684ed['ms']-_0x1c0057['ms'])[_0x1579f4(0x272)](0x0,0x8);this[_0x1579f4(0x1c8)]['clear']();const _0x512a03=_0x469d3c[_0x1579f4(0x1fa)]((_0x4bdc43,_0x1e2add)=>_0x4bdc43+_0x1e2add['ms'],0x0),_0x32d924=_0x469d3c[_0x1579f4(0x173)](_0x5eeb24=>_0x5eeb24['label']+'='+_0x5eeb24['ms'][_0x1579f4(0x19f)](0x0)+_0x1579f4(0x208)+_0x5eeb24[_0x1579f4(0x235)]+(_0x5eeb24['maxMs']>0x5?'(worst\x20'+_0x5eeb24['maxMs'][_0x1579f4(0x19f)](0x0)+'ms'+(_0x5eeb24[_0x1579f4(0x1b0)]?'\x20'+_0x5eeb24['maxExtra']:'')+')':''));(_0x4f6437||_0x3acd09>=_0x488830)&&this[_0x1579f4(0x25b)]('loop-lag\x20'+_0x39e5a7+_0x1579f4(0x20b)+_0x3acd09[_0x1579f4(0x19f)](0x0)+_0x1579f4(0x140)+_0x27b181[_0x1579f4(0x19f)](0x0)+'ms\x20mean='+_0x1a7d84[_0x1579f4(0x19f)](0x0)+_0x1579f4(0xb7)+_0x512a03[_0x1579f4(0x19f)](0x0)+'ms'+(_0x32d924[_0x1579f4(0x17e)]?_0x1579f4(0x2b5)+_0x32d924[_0x1579f4(0x20d)]('\x20\x20'):''),{'feature':_0x1579f4(0x2d0)});if(this[_0x1579f4(0x15a)])for(const _0x59cdd7 of this[_0x1579f4(0x15a)]){try{_0x59cdd7({'p99Ms':_0x27b181,'maxMs':_0x3acd09,'meanMs':_0x1a7d84,'reportMs':_0x39e5a7});}catch{}}}[_0x51eba8(0x2d6)](){const _0x5a4bab=_0x51eba8;if(this[_0x5a4bab(0xa7)])clearInterval(this[_0x5a4bab(0xa7)]);if(this['_h'])this['_h'][_0x5a4bab(0x104)]();this['_timer']=null,this['_h']=null,this[_0x5a4bab(0x2e1)]=![];}}const _0x1e9376=new _0x353e76();if(_0x1e9376[_0x51eba8(0xcf)])_0x1e9376[_0x51eba8(0x177)]();return okdbLoopMonitor={'LOOP':_0x1e9376},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0xe28128=0x2**0x1f-0x1;function _0xf2ee1b(_0x59e134){if(!(_0x59e134>0x0))return 0x0;return _0x59e134>_0xe28128?_0xe28128:_0x59e134;}function _0x9e6700(_0x3deb80){return _0x3deb80===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0xe28128,'clampTimerDelay':_0xf2ee1b,'isNeverDelay':_0x9e6700},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2be06a=require$$0$1,_0x3e1b57=require$$1;let _0x55a92a,_0x4b2e27,_0x53e33a,_0x4c3fe3,_0x22e776,_0x17ea60,_0x46011a,_0x47c0d0=![];const _0x56b643=new Set();let _0x32e4b6=null;const _0x95dda7=new Map();function _0x45057b(){if(_0x55a92a!==undefined)return _0x55a92a;_0x55a92a=process.env.OKDB_DIAG==='1';if(!_0x55a92a)return![];_0x4b2e27=process.env.OKDB_DIAG_STACK==='1',_0x4c3fe3=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x53e33a=new Array(_0x4c3fe3),_0x22e776=0x0,_0x17ea60=0x0,_0x46011a=process.env.OKDB_DIAG_DIR||null;if(_0x46011a)try{_0x2be06a['mkdirSync'](_0x46011a,{'recursive':!![]});}catch{}return!![];}function _0x439df5(){return _0x55a92a===undefined?_0x45057b():_0x55a92a;}function _0x30b4ee(_0x23e943,_0x1d3fc0){const _0x4f6d78=_0x5881;if(_0x55a92a===undefined?!_0x45057b():!_0x55a92a)return;let _0x564c37;if(_0x4b2e27){const _0x100732=new Error()[_0x4f6d78(0x2d4)]||'';_0x564c37=_0x100732[_0x4f6d78(0x137)]('\x0a')[_0x4f6d78(0x272)](0x3)[_0x4f6d78(0x173)](_0x221d77=>_0x221d77[_0x4f6d78(0x289)]())[_0x4f6d78(0x2c0)](Boolean)[_0x4f6d78(0x272)](0x0,0x8);}_0x53e33a[_0x22e776]={'seq':_0x17ea60++,'t':Date[_0x4f6d78(0x24a)](),'env':_0x23e943,'kind':_0x1d3fc0||_0x4f6d78(0x158),'stack':_0x564c37},_0x22e776=(_0x22e776+0x1)%_0x4c3fe3;}function _0x271cfe(_0x5a8381){const _0x185ac2=[];for(let _0x28b93f=0x0;_0x28b93f<_0x4c3fe3;_0x28b93f++){const _0x4ef42b=_0x53e33a[(_0x22e776-0x1-_0x28b93f+_0x4c3fe3*0x2)%_0x4c3fe3];if(!_0x4ef42b)continue;_0x185ac2['push'](_0x4ef42b);if(_0x185ac2['length']>=_0x5a8381)break;}return _0x185ac2;}function _0x5616af(_0x433ff7){const _0x5416a1=_0x5881;try{process[_0x5416a1(0xca)][_0x5416a1(0x21e)](_0x433ff7+'\x0a');}catch{}if(_0x46011a)try{_0x2be06a[_0x5416a1(0x237)](_0x3e1b57[_0x5416a1(0x20d)](_0x46011a,_0x5416a1(0x268)+process[_0x5416a1(0x11d)]+_0x5416a1(0x134)),_0x433ff7+'\x0a');}catch{}}function _0x55b2ff(_0x4e252e){const _0x3b152f=_0x5881,_0x6e1ebf=_0x271cfe(_0x4e252e);if(!_0x6e1ebf[_0x3b152f(0x17e)])return _0x3b152f(0x1ef);const _0xf74ce4=Date['now']();return _0x6e1ebf[_0x3b152f(0x173)](_0x51d0c7=>{const _0x510dce=_0x3b152f,_0x13d802='\x20\x20#'+_0x51d0c7[_0x510dce(0x278)]+'\x20-'+(_0xf74ce4-_0x51d0c7['t'])+_0x510dce(0xfa)+_0x51d0c7[_0x510dce(0x136)]+'\x20'+_0x51d0c7['kind'];return _0x51d0c7[_0x510dce(0x2d4)]&&_0x51d0c7[_0x510dce(0x2d4)][_0x510dce(0x17e)]?_0x13d802+_0x510dce(0x1a7)+_0x51d0c7['stack']['join'](_0x510dce(0x1a7)):_0x13d802;})[_0x3b152f(0x20d)]('\x0a');}function _0xa4389e(_0x4ea8c3,_0x5f13fe){const _0x3bd1a8=_0x5881,_0x1e87b1=_0x3bd1a8(0x28b)+_0x4ea8c3+'\x20@\x20'+new Date()[_0x3bd1a8(0xb6)]()+_0x3bd1a8(0x27c)+process[_0x3bd1a8(0x11d)]+_0x3bd1a8(0x1bb),_0x478074=[_0x1e87b1,'error:\x20'+(_0x5f13fe&&_0x5f13fe[_0x3bd1a8(0x2d4)]?_0x5f13fe[_0x3bd1a8(0x2d4)][_0x3bd1a8(0x137)]('\x0a')[0x0]:_0x5f13fe),_0x3bd1a8(0x1ba)+(_0x4b2e27?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x55b2ff(0x18),_0xff36e5(),'='[_0x3bd1a8(0x2b3)](_0x1e87b1['length']-0x1)];_0x5616af(_0x478074[_0x3bd1a8(0x20d)]('\x0a'));}function _0xd0f069(_0x2f2fef){const _0xbff4d8=_0x5881;if(!_0x439df5())return;const _0x58d8bd=String(_0x2f2fef&&_0x2f2fef[_0xbff4d8(0x25d)]||_0x2f2fef||''),_0x38ce3b=/already closed|environment is already|invalid read txn|reset an invalid/i[_0xbff4d8(0x160)](_0x58d8bd);_0xa4389e(_0x38ce3b?_0xbff4d8(0xbf):_0xbff4d8(0x299),_0x2f2fef);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x38ce3b)return;try{console[_0xbff4d8(0x277)](_0x2f2fef&&_0x2f2fef['stack']?_0x2f2fef[_0xbff4d8(0x2d4)]:_0x2f2fef);}catch{}process['exit'](0x1);}function _0x5e56c5(_0xa4e34a){const _0x46bdb3=_0x5881;if(!_0x439df5())return;const _0x49527e=String(_0xa4e34a&&_0xa4e34a[_0x46bdb3(0x25d)]||_0xa4e34a||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x46bdb3(0x160)](_0x49527e)&&_0xa4389e(_0x46bdb3(0x182),_0xa4e34a);}function _0xff36e5(){const _0x35c831=_0x5881,_0x11c091=[_0x35c831(0xef)];let _0x5c2b4b=![];for(const _0x32d308 of _0x56b643){const _0xb96b34=_0x32d308&&_0x32d308[_0x35c831(0x139)];if(!_0xb96b34)continue;for(const [_0x56d630,_0x396cc2]of _0xb96b34){const _0x2df2d2=_0x396cc2&&_0x396cc2[_0x35c831(0x1e1)]&&_0x396cc2[_0x35c831(0x1e1)][_0x35c831(0x22f)];if(!_0x2df2d2)continue;let _0x3c55ff,_0x5a7c42;try{_0x3c55ff=Atomics[_0x35c831(0x283)](_0x2df2d2,0x0),_0x5a7c42=Atomics['load'](_0x2df2d2,0x1);}catch{continue;}if(_0x3c55ff===0x0)continue;_0x5c2b4b=!![];const _0x202ff2=_0x3c55ff>0x0?'SWAP':'copy',_0x1082c5=Date['now']()-Math[_0x35c831(0xce)](_0x3c55ff)*0x3e8,_0x6e48b3=((()=>{const _0x3674ed=_0x35c831;try{return _0x396cc2['_writer']&&_0x396cc2[_0x3674ed(0x2da)][_0x3674ed(0x2cf)]?_0x396cc2['_writer'][_0x3674ed(0x2cf)]():null;}catch{return null;}})());_0x11c091[_0x35c831(0x1a0)]('\x20\x20env='+_0x56d630+'\x20phase='+_0x202ff2+_0x35c831(0x2b9)+_0x1082c5+_0x35c831(0xf6)+_0x5a7c42+(_0x6e48b3?_0x35c831(0x2a8)+_0x6e48b3[_0x35c831(0xcc)]+'\x20oldestPendingMs='+_0x6e48b3['oldestPendingMs']+_0x35c831(0xe0)+_0x6e48b3[_0x35c831(0x1c4)]+'}':''));}}if(!_0x5c2b4b)_0x11c091['push'](_0x35c831(0xe5));return _0x11c091[_0x35c831(0x20d)]('\x0a');}function _0x215fd4(){const _0x29e8bf=_0x5881;if(!_0x439df5())return;const _0x5ea374=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x38ddc8=Date[_0x29e8bf(0x24a)]();for(const _0x328ef8 of _0x56b643){const _0x2d7105=_0x328ef8&&_0x328ef8[_0x29e8bf(0x139)];if(!_0x2d7105)continue;for(const [_0x160141,_0x16442b]of _0x2d7105){const _0x4808df=_0x16442b&&_0x16442b['_coordinator']&&_0x16442b[_0x29e8bf(0x1e1)]['view'];if(!_0x4808df)continue;let _0x1f573c;try{_0x1f573c=Atomics[_0x29e8bf(0x283)](_0x4808df,0x0);}catch{continue;}const _0x362857=_0x328ef8[_0x29e8bf(0x1d7)]+'|'+_0x160141;if(_0x1f573c<=0x0){_0x95dda7['delete'](_0x362857);continue;}const _0x310f30=_0x38ddc8-_0x1f573c*0x3e8,_0x3c17bc=_0x95dda7[_0x29e8bf(0xec)](_0x362857);if(_0x310f30<_0x5ea374)continue;if(_0x3c17bc&&_0x38ddc8-_0x3c17bc[_0x29e8bf(0x28c)]<_0x5ea374)continue;_0x95dda7['set'](_0x362857,{'firstTs':_0x3c17bc?_0x3c17bc['firstTs']:_0x1f573c,'dumpedAt':_0x38ddc8});const _0x375e8c='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x310f30+_0x29e8bf(0xf0)+_0x160141+_0x29e8bf(0x275)+new Date()['toISOString']()+_0x29e8bf(0x27c)+process[_0x29e8bf(0x11d)]+_0x29e8bf(0x1bb);_0x5616af([_0x375e8c,_0xff36e5(),'='[_0x29e8bf(0x2b3)](_0x375e8c['length']-0x1)][_0x29e8bf(0x20d)]('\x0a'));}}}function _0x5dfea7(){const _0x5d915c=_0x5881;if(!_0x439df5()||_0x47c0d0)return;_0x47c0d0=!![],process['prependListener'](_0x5d915c(0x299),_0xd0f069),process[_0x5d915c(0x19a)]('unhandledRejection',_0x5e56c5);const _0x5a25ae=Math[_0x5d915c(0x2bc)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x32e4b6=setInterval(_0x215fd4,_0x5a25ae);if(_0x32e4b6[_0x5d915c(0x13e)])_0x32e4b6[_0x5d915c(0x13e)]();}function _0x5eee3f(_0x7ae850){const _0x43aafa=_0x5881;if(!_0x439df5()||!_0x7ae850)return;_0x56b643[_0x43aafa(0x25e)](_0x7ae850),_0x5dfea7();}function _0x551aa3(_0x18ff8e){const _0x14f1eb=_0x5881;_0x56b643[_0x14f1eb(0x2aa)](_0x18ff8e);}function _0x17181f(){const _0x4f4af2=_0x5881;if(!_0x439df5())return{'enabled':![],'hint':_0x4f4af2(0x16b)};return{'enabled':!![],'stackCapture':!!_0x4b2e27,'recentWrites':_0x271cfe(0x10),'drain':_0xff36e5()};}return okdbDiag={'isEnabled':_0x439df5,'recordWrite':_0x30b4ee,'installDiag':_0x5dfea7,'registerOkdb':_0x5eee3f,'unregisterOkdb':_0x551aa3,'snapshot':_0x17181f},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x44635e=_0x5e06fa;if(hasRequiredOkdbWriter)return okdbWriter[_0x44635e(0x16f)];hasRequiredOkdbWriter=0x1;const {performance:_0x1739b4}=require$$0$2,_0x2c04e4=requireOkdbDiag(),_0x52fb54=process.env.OKDB_COMMIT_MODE===_0x44635e(0x1d6);class _0x460fa7{constructor(_0x5659d9){const _0x3d69d3=_0x44635e;this[_0x3d69d3(0x136)]=_0x5659d9,this[_0x3d69d3(0x1f7)]=new Set(),this[_0x3d69d3(0x18d)]=new Map(),this[_0x3d69d3(0x18a)]=0x0,this['_durs']=[],this['_done']=[],this[_0x3d69d3(0x111)]=Math[_0x3d69d3(0x2bc)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x3d69d3(0x1ec)]=0x0,this['_bpWaiters']=[],this['_bpParkedTotal']=0x0,this[_0x3d69d3(0x232)]=null,this[_0x3d69d3(0x12c)]=0x0,this['_nestedTotal']=0x0,this[_0x3d69d3(0x14e)]=![];}async['transaction'](_0xd40a09,_0x231758,{admitted:admitted=![]}={}){const _0x2f8578=_0x44635e;if(_0x2c04e4[_0x2f8578(0xcd)]())_0x2c04e4[_0x2f8578(0x2b2)](this[_0x2f8578(0x136)]?.[_0x2f8578(0x178)],_0x231758);if(this['_closed']){const _0xfebe66=new Error(_0x2f8578(0x28e));_0xfebe66[_0x2f8578(0x2d9)]=_0x2f8578(0x228);throw _0xfebe66;}if(this[_0x2f8578(0x111)]>0x0){let _0x4fb87d=![];while(this[_0x2f8578(0x1ec)]>=this['_highWater']&&!this[_0x2f8578(0x2a7)]){!_0x4fb87d&&(_0x4fb87d=!![],this[_0x2f8578(0x29a)]++),await new Promise(_0x2c02cc=>this[_0x2f8578(0x2ab)][_0x2f8578(0x1a0)](_0x2c02cc));}if(this[_0x2f8578(0x2a7)]){const _0x52f821=new Error(_0x2f8578(0x28e));_0x52f821['code']=_0x2f8578(0x228);throw _0x52f821;}}this[_0x2f8578(0x1ec)]++;const _0x22ee90=admitted?null:this['env'][_0x2f8578(0x1e1)];for(;;){while(this['_held'])await this[_0x2f8578(0x232)];if(_0x22ee90)try{await _0x22ee90[_0x2f8578(0x26e)]();}catch(_0x1396a2){this[_0x2f8578(0x1ec)]--;if(this[_0x2f8578(0x2ab)]['length']&&this['_outstanding']<this[_0x2f8578(0x111)])this[_0x2f8578(0x2ab)][_0x2f8578(0x276)]()();throw _0x1396a2;}if(!this[_0x2f8578(0x232)])break;if(_0x22ee90)_0x22ee90[_0x2f8578(0x196)]();}if(this[_0x2f8578(0x2a7)]){if(_0x22ee90)_0x22ee90[_0x2f8578(0x196)]();this[_0x2f8578(0x1ec)]--;if(this[_0x2f8578(0x2ab)]['length']&&this['_outstanding']<this[_0x2f8578(0x111)])this[_0x2f8578(0x2ab)][_0x2f8578(0x276)]()();const _0x3f4af8=new Error(_0x2f8578(0x28e));_0x3f4af8[_0x2f8578(0x2d9)]=_0x2f8578(0x228);throw _0x3f4af8;}const _0x26bc17=_0x1739b4['now']();if(_0x52fb54)try{const _0x3de17d=this['env']['db'][_0x2f8578(0x2c6)](_0xd40a09);this[_0x2f8578(0x18a)]++;if(this['_durs'][_0x2f8578(0x1a0)](_0x1739b4[_0x2f8578(0x24a)]()-_0x26bc17)>0x100)this[_0x2f8578(0x1f4)][_0x2f8578(0x276)]();if(this['_done'][_0x2f8578(0x1a0)](_0x1739b4[_0x2f8578(0x24a)]())>0x800)this[_0x2f8578(0x2ac)][_0x2f8578(0x276)]();return _0x3de17d;}finally{this[_0x2f8578(0x1ec)]--;if(this['_bpWaiters'][_0x2f8578(0x17e)]&&this['_outstanding']<this[_0x2f8578(0x111)])this[_0x2f8578(0x2ab)]['shift']()();if(_0x22ee90)_0x22ee90['afterWrite']();}let _0x280a50=null;const _0x52bd02=()=>{const _0x43345b=_0x2f8578,_0x322fcf=_0xd40a09();if(_0x322fcf&&typeof _0x322fcf[_0x43345b(0xda)]==='function'&&!_0x280a50){this[_0x43345b(0x12c)]++;let _0x583119;const _0x14ff7c=new Promise(_0x5617a9=>_0x583119=_0x5617a9);this[_0x43345b(0x232)]=_0x14ff7c,_0x280a50=()=>{const _0x330526=_0x43345b;if(this[_0x330526(0x232)]===_0x14ff7c)this['_held']=null;_0x583119();};}return _0x322fcf;};let _0x152722;try{_0x152722=this[_0x2f8578(0x136)]['db'][_0x2f8578(0x24f)](_0x52bd02);}catch(_0x4237bb){_0x152722=Promise[_0x2f8578(0xf2)](_0x4237bb);}(!_0x152722||typeof _0x152722['then']!==_0x2f8578(0x18c))&&(this[_0x2f8578(0xdb)]++,!this['_nestedWarned']&&(this[_0x2f8578(0x14e)]=!![],console[_0x2f8578(0x26f)](_0x2f8578(0x185)+(this[_0x2f8578(0x136)]?.[_0x2f8578(0x178)]??'?')+_0x2f8578(0x17b))),_0x152722=Promise[_0x2f8578(0x1ce)](_0x152722));const _0xbeb51b=()=>{if(_0x280a50)_0x280a50();};_0x152722[_0x2f8578(0xda)](_0xbeb51b,_0xbeb51b),this[_0x2f8578(0x1f7)][_0x2f8578(0x25e)](_0x152722),this[_0x2f8578(0x18d)][_0x2f8578(0x17a)](_0x152722,_0x26bc17);const _0x33e2a0=()=>{const _0x4b163a=_0x2f8578;this[_0x4b163a(0x1f7)][_0x4b163a(0x2aa)](_0x152722),this[_0x4b163a(0x18d)][_0x4b163a(0x2aa)](_0x152722),this[_0x4b163a(0x18a)]++,this[_0x4b163a(0x1ec)]--;this['_bpWaiters']['length']&&this['_outstanding']<this[_0x4b163a(0x111)]&&this['_bpWaiters']['shift']()();if(this['_durs'][_0x4b163a(0x1a0)](_0x1739b4['now']()-_0x26bc17)>0x100)this['_durs'][_0x4b163a(0x276)]();if(this[_0x4b163a(0x2ac)][_0x4b163a(0x1a0)](_0x1739b4[_0x4b163a(0x24a)]())>0x800)this[_0x4b163a(0x2ac)][_0x4b163a(0x276)]();};_0x152722[_0x2f8578(0xda)](_0x33e2a0,_0x33e2a0);try{return await _0x152722;}finally{if(_0x22ee90)_0x22ee90[_0x2f8578(0x196)]();}}[_0x44635e(0x2cf)](){const _0x5e438b=_0x44635e,_0x120003=_0x1739b4[_0x5e438b(0x24a)]();let _0x33bfc7=0x0;for(const _0x26d40c of this['_enqueuedAt'][_0x5e438b(0x2e6)]()){const _0x5f2ef1=_0x120003-_0x26d40c;if(_0x5f2ef1>_0x33bfc7)_0x33bfc7=_0x5f2ef1;}let _0x5668f9=0x0;for(let _0x3a2ba8=this[_0x5e438b(0x2ac)][_0x5e438b(0x17e)]-0x1;_0x3a2ba8>=0x0;_0x3a2ba8--){if(_0x120003-this[_0x5e438b(0x2ac)][_0x3a2ba8]>0x3e8)break;_0x5668f9++;}let _0x20b527=0x0;if(this['_durs'][_0x5e438b(0x17e)]){const _0x2dcafc=[...this[_0x5e438b(0x1f4)]]['sort']((_0x14b21d,_0x37f6d2)=>_0x14b21d-_0x37f6d2);_0x20b527=_0x2dcafc[Math[_0x5e438b(0x22d)](_0x2dcafc[_0x5e438b(0x17e)]-0x1,Math[_0x5e438b(0x27a)](_0x2dcafc[_0x5e438b(0x17e)]*0.99))];}return{'depth':this[_0x5e438b(0x1f7)][_0x5e438b(0x2e3)],'oldestPendingMs':Math[_0x5e438b(0x24b)](_0x33bfc7),'committed':this[_0x5e438b(0x18a)],'commitsPerSec':_0x5668f9,'commitP99Ms':Math[_0x5e438b(0x24b)](_0x20b527),'parkedNow':this[_0x5e438b(0x2ab)]['length'],'parkedTotal':this[_0x5e438b(0x29a)],'highWater':this[_0x5e438b(0x111)]};}[_0x44635e(0x2c8)](){const _0x419b3f=_0x44635e,_0x4d11f7=_0x1739b4[_0x419b3f(0x24a)]();return[...this[_0x419b3f(0x18d)][_0x419b3f(0x2e6)]()][_0x419b3f(0x173)](_0x475ac3=>Math[_0x419b3f(0x24b)](_0x4d11f7-_0x475ac3))[_0x419b3f(0x101)]((_0x169f32,_0x1bd34f)=>_0x1bd34f-_0x169f32);}[_0x44635e(0x17c)](){const _0x576d3f=_0x44635e;this['_closed']=!![];for(const _0x55126c of this['_bpWaiters'][_0x576d3f(0x142)](0x0))_0x55126c();}async[_0x44635e(0x180)](){const _0x21c1e2=_0x44635e;let _0xf7c9b6=0x0;while(this[_0x21c1e2(0x1f7)][_0x21c1e2(0x2e3)]&&_0xf7c9b6++<0x3e8){await Promise[_0x21c1e2(0x138)]([...this['_inflight']]);}}async[_0x44635e(0x170)](_0x1f96e0,_0x461297,_0x26cc47,_0x2f1bad){const _0x339f56=_0x44635e;return this[_0x339f56(0x285)](()=>{const _0x37b012=_0x339f56;if(_0x2f1bad===undefined)_0x1f96e0[_0x37b012(0x156)](_0x461297,_0x26cc47);else _0x1f96e0[_0x37b012(0x156)](_0x461297,_0x26cc47,_0x2f1bad);},_0x339f56(0x2d7));}async[_0x44635e(0x2de)](_0x5ed422,_0x47d4f9){const _0x507850=_0x44635e;return this[_0x507850(0x285)](()=>_0x5ed422[_0x507850(0x20c)](_0x47d4f9),_0x507850(0xae));}}async function _0x18823b(_0x48e0c8,_0x5f526b){const _0x103c91=_0x44635e;if(_0x5f526b==null)_0x5f526b=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x7bbf3f=_0x48e0c8?.['flushed'];if(!_0x7bbf3f||typeof _0x7bbf3f[_0x103c91(0xda)]!==_0x103c91(0x18c))return;await Promise[_0x103c91(0xd7)]([Promise['resolve'](_0x7bbf3f)[_0x103c91(0x230)](()=>{}),new Promise(_0x529b8c=>{const _0x2b7d58=_0x103c91,_0xd62b10=setTimeout(_0x529b8c,_0x5f526b);if(_0xd62b10[_0x2b7d58(0x13e)])_0xd62b10['unref']();})]);}catch{}}function _0x18651e(_0x45dbd6){const _0x452a68=_0x44635e;if(_0x52fb54)return Promise[_0x452a68(0x1ce)]();const _0x5a93f5=_0x45dbd6?.[_0x452a68(0x121)];return _0x5a93f5&&typeof _0x5a93f5[_0x452a68(0xda)]===_0x452a68(0x18c)?_0x5a93f5:Promise['resolve']();}const _0x46f4df=Math[_0x44635e(0x2bc)](0x1,Math[_0x44635e(0x27a)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x1b08c2=Math[_0x44635e(0x2bc)](0x1,_0x46f4df-0x2);let _0x5be501=0x0;const _0x122216=[];async function _0x2e0bae(_0x4d949b){const _0x41b3d2=_0x44635e;if(_0x5be501<_0x1b08c2)_0x5be501++;else await new Promise(_0x33b8fb=>_0x122216[_0x41b3d2(0x1a0)](_0x33b8fb));try{return await _0x4d949b();}finally{const _0x21f502=_0x122216[_0x41b3d2(0x276)]();if(_0x21f502)_0x21f502();else _0x5be501--;}}return okdbWriter[_0x44635e(0x16f)]=_0x460fa7,okdbWriter['exports'][_0x44635e(0x2b4)]=_0x2e0bae,okdbWriter[_0x44635e(0x16f)][_0x44635e(0x1f8)]=_0x1b08c2,okdbWriter[_0x44635e(0x16f)]['flushLmdb']=_0x18823b,okdbWriter[_0x44635e(0x16f)][_0x44635e(0x121)]=_0x18651e,okdbWriter[_0x44635e(0x16f)]['SYNC_COMMITS']=_0x52fb54,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x845a12=_0x5e06fa;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x389a49=require$$0$3,{clampTimerDelay:_0x10ffdb}=requireOkdbTimers(),{SYNC_COMMITS:_0x52c0f3}=requireOkdbWriter(),_0x497627=_0x845a12(0x2be);class _0x260cdf{constructor(_0x2c9e0f,_0x4d25c4,_0x5e9f19){const _0x46554a=_0x845a12;this[_0x46554a(0x211)]=_0x2c9e0f,this['_key']=_0x4d25c4,this[_0x46554a(0x15f)]=_0x5e9f19,this[_0x46554a(0x11a)]=![],this[_0x46554a(0x2e4)]=null,this[_0x46554a(0x2e7)]=null;}['isHeld'](){const _0xf34c5d=_0x845a12;if(this[_0xf34c5d(0x11a)])return![];try{const _0x3aa289=this[_0xf34c5d(0x211)][_0xf34c5d(0x2ae)]()['get'](this[_0xf34c5d(0x269)]);if(!_0x3aa289||_0x3aa289[_0xf34c5d(0x187)]!==this[_0xf34c5d(0x15f)])return![];const _0x57aac2=_0x3aa289['updatedAt']??_0x3aa289[_0xf34c5d(0x187)];if(_0x57aac2+_0x3aa289['ttlMs']<Date[_0xf34c5d(0x24a)]())return![];return!![];}catch{return!this[_0xf34c5d(0x11a)];}}['holder'](){const _0x28cef3=_0x845a12;if(this[_0x28cef3(0x11a)])return null;try{return this[_0x28cef3(0x211)][_0x28cef3(0x2ae)]()[_0x28cef3(0xec)](this[_0x28cef3(0x269)])??null;}catch{return null;}}async[_0x845a12(0xe2)](_0x195a06){const _0x391c48=_0x845a12;if(this['_released'])return;try{if(this[_0x391c48(0x211)][_0x391c48(0x2a7)]())return;const _0x342815=this[_0x391c48(0x211)][_0x391c48(0x2ae)]()[_0x391c48(0xec)](this[_0x391c48(0x269)]);if(!_0x342815||_0x342815[_0x391c48(0x187)]!==this[_0x391c48(0x15f)])return;if(_0x52c0f3)this[_0x391c48(0x211)][_0x391c48(0x2ae)]()[_0x391c48(0x156)](this['_key'],{..._0x342815,'ttlMs':_0x342815[_0x391c48(0x1bd)]+_0x195a06});else await this['_lock'][_0x391c48(0x2ae)]()['put'](this['_key'],{..._0x342815,'ttlMs':_0x342815[_0x391c48(0x1bd)]+_0x195a06});}catch{}}async[_0x845a12(0x1e8)](){const _0x1ecf35=_0x845a12;if(this['_released'])return;if(this[_0x1ecf35(0x2e7)])try{await this[_0x1ecf35(0x2e7)];}catch{}clearInterval(this[_0x1ecf35(0x2e4)]),this[_0x1ecf35(0x2e4)]=null,this['_released']=!![];try{if(this[_0x1ecf35(0x211)][_0x1ecf35(0x2a7)]())return;const _0x56bd85=this['_lock']['_db']()[_0x1ecf35(0xec)](this[_0x1ecf35(0x269)]);if(_0x56bd85&&_0x56bd85[_0x1ecf35(0x187)]===this[_0x1ecf35(0x15f)]){if(_0x52c0f3)this['_lock'][_0x1ecf35(0x2ae)]()[_0x1ecf35(0x20c)](this[_0x1ecf35(0x269)]);else await this['_lock'][_0x1ecf35(0x2ae)]()[_0x1ecf35(0x2de)](this['_key']);}}catch{}}[_0x845a12(0xaa)](_0x3b5373,_0x58b8a0){const _0x44ec45=_0x845a12,_0x23591d=_0x10ffdb(_0x58b8a0??Math[_0x44ec45(0x27a)](_0x3b5373/0x3));this[_0x44ec45(0x2e4)]=setInterval(()=>{if(this['_released'])return;this['_heartbeatInFlight']=((async()=>{const _0x2cd5e5=_0x5881;try{if(this[_0x2cd5e5(0x211)][_0x2cd5e5(0x2a7)]())return;const _0x3f14dd=this['_lock']['_db']()[_0x2cd5e5(0xec)](this[_0x2cd5e5(0x269)]);if(!_0x3f14dd||_0x3f14dd[_0x2cd5e5(0x187)]!==this[_0x2cd5e5(0x15f)]){this['_released']=!![],clearInterval(this['_heartbeatTimer']),this[_0x2cd5e5(0x2e4)]=null;return;}if(_0x52c0f3)this['_lock'][_0x2cd5e5(0x2ae)]()[_0x2cd5e5(0x156)](this[_0x2cd5e5(0x269)],{..._0x3f14dd,'updatedAt':Date[_0x2cd5e5(0x24a)]()});else await this[_0x2cd5e5(0x211)][_0x2cd5e5(0x2ae)]()[_0x2cd5e5(0x170)](this[_0x2cd5e5(0x269)],{..._0x3f14dd,'updatedAt':Date[_0x2cd5e5(0x24a)]()});}catch{}this[_0x2cd5e5(0x2e7)]=null;})());},_0x23591d);if(this['_heartbeatTimer']['unref'])this[_0x44ec45(0x2e4)][_0x44ec45(0x13e)]();}}class _0x2bb68f{constructor(_0x327b19,{namespace:_0x3da95a,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x5b48be=_0x845a12;this[_0x5b48be(0x242)]=_0x327b19,this[_0x5b48be(0x1be)]=_0x3da95a,this['ttlMs']=ttlMs,this[_0x5b48be(0x21b)]=heartbeatMs,this['_lockDb']=null;}[_0x845a12(0x2ae)](){const _0x54ca99=_0x845a12;return this['_assertUsable'](),(!this['_lockDb']||this['_lockDbOf']!==this[_0x54ca99(0x242)])&&(this['_lockDb']=this['_rawDb'][_0x54ca99(0x254)](_0x497627,{'dupSort':![]}),this[_0x54ca99(0xf5)]=this[_0x54ca99(0x242)]),this[_0x54ca99(0x297)];}[_0x845a12(0x115)](){const _0x14fee1=_0x845a12;return this[_0x14fee1(0x1bf)](),(!this['_wantDbHandle']||this[_0x14fee1(0x203)]!==this[_0x14fee1(0x242)])&&(this[_0x14fee1(0xee)]=this[_0x14fee1(0x242)]['openDB'](_0x497627+':want',{'dupSort':![]}),this[_0x14fee1(0x203)]=this[_0x14fee1(0x242)]),this[_0x14fee1(0xee)];}[_0x845a12(0x2a7)](){const _0x386be2=_0x845a12,_0x48bc9e=this[_0x386be2(0x242)]?.[_0x386be2(0x2cf)];return _0x48bc9e===_0x386be2(0x27d)||_0x48bc9e==='closed';}[_0x845a12(0x1bf)](){const _0x49cadb=_0x845a12;if(this[_0x49cadb(0x2a7)]())throw new Error(_0x49cadb(0x12d));}[_0x845a12(0x269)](_0x97de4f){const _0x38436e=_0x845a12;return this[_0x38436e(0x1be)]+':'+_0x97de4f;}['signalWant'](_0x10c1e6){const _0x523572=_0x845a12;try{if(this[_0x523572(0x2a7)]())return;_0x52c0f3?this[_0x523572(0x115)]()[_0x523572(0x156)](this[_0x523572(0x269)](_0x10c1e6),Date[_0x523572(0x24a)]()):this[_0x523572(0x115)]()[_0x523572(0x170)](this['_key'](_0x10c1e6),Date[_0x523572(0x24a)]())?.[_0x523572(0x230)]?.(()=>{});}catch{}}[_0x845a12(0x162)](_0x2108bd,_0x507b51=0x3e8){const _0xd0d138=_0x845a12;try{const _0x3c4c91=this[_0xd0d138(0x115)]()[_0xd0d138(0xec)](this[_0xd0d138(0x269)](_0x2108bd));return typeof _0x3c4c91==='number'&&Date[_0xd0d138(0x24a)]()-_0x3c4c91<_0x507b51;}catch{return![];}}['_isStale'](_0x2846ed){const _0xd15cd2=_0x845a12,_0x1f7345=_0x2846ed[_0xd15cd2(0xc7)]??_0x2846ed['acquiredAt'];return _0x1f7345+_0x2846ed[_0xd15cd2(0x1bd)]<Date['now']();}static['_holderDead'](_0x5539b0){const _0x21988d=_0x845a12,_0x383a4e=_0x5539b0?.[_0x21988d(0x27b)];if(!_0x383a4e||typeof _0x383a4e[_0x21988d(0x11d)]!==_0x21988d(0x2a4))return![];if(_0x383a4e['hostname']!==_0x389a49[_0x21988d(0x165)]())return![];if(_0x383a4e[_0x21988d(0x11d)]===process['pid'])return![];try{return process[_0x21988d(0x209)](_0x383a4e['pid'],0x0),![];}catch(_0x27d8dd){return _0x27d8dd['code']===_0x21988d(0x1de);}}async[_0x845a12(0x28f)](_0x374cd6,_0x52813a={},_0x5c30d4={}){const _0x5cf27d=_0x845a12,_0x5cbf3a=this['_key'](_0x374cd6),_0x239cad=_0x5c30d4[_0x5cf27d(0x1bd)]??this['ttlMs'],_0x1908c6=Date[_0x5cf27d(0x24a)](),_0x3d9c84={'holder':{'pid':process[_0x5cf27d(0x11d)],'hostname':_0x389a49['hostname'](),..._0x52813a},'acquiredAt':_0x1908c6,'updatedAt':_0x1908c6,'ttlMs':_0x239cad};let _0x26c417=![],_0x5c7bfc=null;if(this[_0x5cf27d(0x2a7)]())return{'acquired':![],'handle':null,'current':null};try{const _0x11dc9d=()=>{const _0x486264=_0x5cf27d,_0x280337=this[_0x486264(0x2ae)]()[_0x486264(0xec)](_0x5cbf3a);if(_0x280337&&!this[_0x486264(0x231)](_0x280337)&&!_0x2bb68f[_0x486264(0x105)](_0x280337)){const _0x101274=_0x52813a[_0x486264(0x10d)]!=null&&_0x280337[_0x486264(0x27b)][_0x486264(0x11d)]===process['pid']&&_0x280337[_0x486264(0x27b)][_0x486264(0x10d)]===_0x52813a[_0x486264(0x10d)];if(!_0x101274){_0x26c417=![],_0x5c7bfc=_0x280337;return;}_0x3d9c84[_0x486264(0x187)]<=_0x280337[_0x486264(0x187)]&&(_0x3d9c84[_0x486264(0x187)]=_0x280337[_0x486264(0x187)]+0x1,_0x3d9c84[_0x486264(0xc7)]=_0x3d9c84[_0x486264(0x187)]);}this[_0x486264(0x2ae)]()[_0x486264(0x170)](_0x5cbf3a,_0x3d9c84),_0x26c417=!![],_0x5c7bfc=_0x3d9c84;};if(_0x52c0f3)this[_0x5cf27d(0x2ae)]()[_0x5cf27d(0x2c6)](_0x11dc9d);else await this[_0x5cf27d(0x2ae)]()[_0x5cf27d(0x24f)](_0x11dc9d);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x26c417)return{'acquired':![],'handle':null,'current':_0x5c7bfc};const _0x2529bb=new _0x260cdf(this,_0x5cbf3a,_0x3d9c84[_0x5cf27d(0x187)]);return _0x2529bb['_startHeartbeat'](_0x239cad,this[_0x5cf27d(0x21b)]),{'acquired':!![],'handle':_0x2529bb,'current':_0x5c7bfc};}[_0x845a12(0x1cf)](_0x5e9456){const _0x474ebe=_0x845a12;try{return this[_0x474ebe(0x2ae)]()['get'](this[_0x474ebe(0x269)](_0x5e9456))??null;}catch{return null;}}[_0x845a12(0x1b4)](){const _0x5f5294=_0x845a12,_0x220bee=this['namespace']+':',_0x432413=[];try{for(const {key:_0x244164,value:_0x21cab9}of this[_0x5f5294(0x2ae)]()[_0x5f5294(0x1c1)]({'start':_0x220bee,'end':_0x220bee+'\xff'})){typeof _0x244164===_0x5f5294(0xa8)&&_0x244164[_0x5f5294(0x218)](_0x220bee)&&_0x432413[_0x5f5294(0x1a0)]({'id':_0x244164[_0x5f5294(0x272)](_0x220bee[_0x5f5294(0x17e)]),'entry':_0x21cab9});}}catch{}return _0x432413;}static['listAll'](_0x5159c3){const _0x579138=_0x845a12,_0x312d36=[];try{const _0x237cb8=_0x5159c3[_0x579138(0x254)](_0x497627,{'dupSort':![]});for(const {key:_0x1ea58c,value:_0x44d58a}of _0x237cb8['getRange']({})){if(typeof _0x1ea58c!=='string')continue;const _0x378b83=_0x1ea58c[_0x579138(0x2cb)](':');if(_0x378b83<0x1)continue;_0x312d36['push']({'namespace':_0x1ea58c[_0x579138(0x272)](0x0,_0x378b83),'id':_0x1ea58c['slice'](_0x378b83+0x1),'entry':_0x44d58a});}}catch{}return _0x312d36;}}return okdbLock={'OKDBLock':_0x2bb68f},okdbLock;}var version=_0x5e06fa(0x110),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x3faefc=_0x5e06fa;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x5e8a97=require$$0$3,_0x4e3516=require$$1$1,_0x5706c7=require$$2,{LOOP:_0x23d241}=requireOkdbLoopMonitor(),{OKDBLock:_0x30fdf7}=requireOkdbLock(),{SYNC_COMMITS:_0x2e88d8}=requireOkdbWriter(),_0xc4a0da=_0x3faefc(0x2e9),_0x16f04c=_0x3faefc(0x1a4),_0x1f78d9=_0x3faefc(0x2d2),_0x1b0b76=_0x3faefc(0x168),_0x1f48f5=(_0x1383bc,_0x233411)=>_0x1383bc+':'+_0x233411,_0x394355=(_0x1e181f,_0xd2575d)=>_0x1e181f+'::'+_0xd2575d,_0x2204da=(_0x196df9,_0x5e80b)=>_0x196df9+'/'+_0x5e80b,_0xce4ca5=(_0x514bec,_0x5ce859)=>_0x514bec+'#'+_0x5ce859,_0x573832=_0x28e1b8=>{const _0x2a75eb=_0x3faefc;if(_0x28e1b8?.[_0x2a75eb(0x1a1)])return _0x28e1b8[_0x2a75eb(0x1a1)];const _0x3cb30e=_0x28e1b8?.[_0x2a75eb(0x253)];return typeof _0x3cb30e===_0x2a75eb(0xa8)&&_0x3cb30e['includes']('#')?_0x3cb30e[_0x2a75eb(0x272)](0x0,_0x3cb30e[_0x2a75eb(0x2cb)]('#')):_0x3cb30e;},_0x13a537=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1f6e90=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4b5ec0=_0x13a537*0x3,_0x1e5760=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x3faefc(0x2bc)](0x927c0,_0x4b5ec0*0x14),_0x53d213=[_0x3faefc(0x10e),_0x3faefc(0xed),_0x3faefc(0x1da),'processor:error',_0x3faefc(0xc8),_0x3faefc(0x221)];let _0x51077c=null;function _0x22a38e(){const _0x845372=_0x3faefc;if(_0x51077c==null)_0x51077c=Math[_0x845372(0x24b)]((Date['now']()-process[_0x845372(0x14f)]()*0x3e8)/0x3e8)*0x3e8;return _0x51077c;}function _0x3f99cb(_0x275b27){const _0x286524=_0x3faefc;if(process.env.OKDB_PROCESS_KILL==='off')return![];if(_0x275b27?.[_0x286524(0x118)]?.[_0x286524(0x2bd)]&&typeof _0x275b27[_0x286524(0x118)][_0x286524(0x2bd)]==='object'&&_0x275b27[_0x286524(0x118)][_0x286524(0x2bd)][_0x286524(0x209)]===![])return![];return!![];}function _0x56b357(_0x1e9a7d,_0x367863){const _0x257db4=_0x3faefc,_0xa3d395=!!_0x367863?.[_0x257db4(0x1a3)];switch(_0x1e9a7d){case _0x257db4(0x240):return{'controllable':_0xa3d395,'decommissionable':![],'killable':!![],'killConfirm':_0x257db4(0x197)};case'cli':case _0x257db4(0x26b):return{'controllable':_0xa3d395,'decommissionable':![],'killable':!![],'killConfirm':_0x257db4(0x11e)};case _0x257db4(0x1fe):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x257db4(0xea):case'queue-worker':case _0x257db4(0x1d1):case _0x257db4(0x1b7):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x257db4(0x23b)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x33776{constructor(_0xcf4b7d){const _0x4739d4=_0x3faefc;this[_0x4739d4(0x1dc)]=_0xcf4b7d,this[_0x4739d4(0xb0)]=null,this['_desired']=null,this[_0x4739d4(0x116)]=new Map(),this[_0x4739d4(0x25c)]=null,this['_isWriter']=![],this['_isReader']=![],this[_0x4739d4(0x1af)]=_0x22a38e(),this[_0x4739d4(0x1db)]=_0x1f48f5(process[_0x4739d4(0x11d)],this['_processStartedAt']),this[_0x4739d4(0x171)]=_0x5706c7[_0x4739d4(0x1cb)]()['slice'](0x0,0x8),this[_0x4739d4(0x2c1)]=_0xce4ca5(this['_selfKey'],this[_0x4739d4(0x171)]),this['_startedAt']=Date[_0x4739d4(0x24a)](),this[_0x4739d4(0x14b)]=null,this['_supervisorKey']=null,this[_0x4739d4(0x2a3)]=null,this[_0x4739d4(0x175)]=null,this[_0x4739d4(0x103)]=null,this[_0x4739d4(0xb8)]=null,this[_0x4739d4(0x159)]=0x0,this[_0x4739d4(0x245)]={},this['_children']=new Map(),this[_0x4739d4(0x164)]=process['cpuUsage'](),this['_lastCpuAt']=Date[_0x4739d4(0x24a)](),this[_0x4739d4(0x123)]=0x0,this[_0x4739d4(0x250)]=new Map();}get[_0x3faefc(0x146)](){const _0x5c85b6=_0x3faefc;return this[_0x5c85b6(0x1db)];}get[_0x3faefc(0x108)](){return this['_rowKey'];}['_caps'](_0x2314e1,_0x79c352){const _0x3d7409=_0x3faefc,_0x5ceafd=_0x56b357(_0x2314e1,_0x79c352);if(_0x5ceafd[_0x3d7409(0x1a2)]&&!_0x3f99cb(this[_0x3d7409(0x1dc)]))return{..._0x5ceafd,'killable':![],'killConfirm':undefined};return _0x5ceafd;}[_0x3faefc(0xc4)](){return!!this['_statusEnv'];}[_0x3faefc(0x239)](_0x159a0f){const _0x48b9de=_0x3faefc;Object[_0x48b9de(0x174)](this['_ownMeta'],_0x159a0f||{});}[_0x3faefc(0x202)](_0x42af4a){const _0x4474f4=_0x3faefc;if(_0x42af4a)this[_0x4474f4(0x2a3)]=_0x42af4a;}[_0x3faefc(0x262)](_0x1a280f={}){const _0x5b9902=_0x3faefc;return this[_0x5b9902(0x1dc)][_0x5b9902(0x1d5)](_0x1a280f);}[_0x3faefc(0x161)](){const _0x2ab144=_0x3faefc,_0x7bc635={};let _0x532491=0x0,_0x3c6003=0x0;const _0x50ad80=new Set();for(const _0x497b66 of this[_0x2ab144(0x2a6)]()){_0x3c6003++;const _0x25a5b7=_0x497b66['processing'];if(!_0x25a5b7)continue;if(_0x25a5b7[_0x2ab144(0x23e)])_0x532491++;for(const _0x1f3395 of _0x25a5b7[_0x2ab144(0x1a3)]||[]){if(![_0x2ab144(0x157),_0x2ab144(0x2c9)][_0x2ab144(0x1a9)](_0x1f3395[_0x2ab144(0x220)]))continue;(_0x1f3395['state']===_0x2ab144(0x1c2)||_0x1f3395[_0x2ab144(0x29d)]===_0x2ab144(0x296))&&_0x1f3395[_0x2ab144(0x143)]&&_0x50ad80[_0x2ab144(0x25e)]((_0x1f3395['env']||_0x2ab144(0x201))+':'+_0x1f3395['cursorKey']);const _0x2016dc=_0x1f3395[_0x2ab144(0x136)]||'default';(_0x7bc635[_0x2016dc]||=[])['push']({..._0x1f3395,'env':_0x2016dc,'owner':{'pid':_0x497b66[_0x2ab144(0x11d)]??null,'kind':_0x497b66[_0x2ab144(0xb9)]??null}});}}for(const [_0x5be7e5,_0x5060af]of Object['entries'](_0x7bc635)){for(const _0x10adbb of _0x5060af){if(_0x10adbb[_0x2ab144(0x220)]===_0x2ab144(0x157)&&!_0x10adbb[_0x2ab144(0x1eb)]){const _0x3a2c01=_0x5be7e5+':'+(_0x10adbb['cursorKey']??'');if(!_0x50ad80[_0x2ab144(0xab)](_0x3a2c01))_0x10adbb[_0x2ab144(0x223)]=!![];}}}return{'envs':_0x7bc635,'policy':null,'participation':{'participating':_0x532491,'total':_0x3c6003},'source':_0x2ab144(0x102)};}['processorsView'](){const _0x30953c=_0x3faefc,_0x1f629b=_0x438142=>{const _0x362f95=_0x5881;if(_0x438142[_0x362f95(0x29d)]===_0x362f95(0x1c2)||_0x438142['state']==='building'||_0x438142['state']===_0x362f95(0x277))return 0x3;if(_0x438142[_0x362f95(0x1eb)])return 0x1;return 0x2;},_0x43cf73=new Map();for(const _0x25a4e9 of this[_0x30953c(0x2a6)]()){for(const _0xec1949 of _0x25a4e9[_0x30953c(0x106)]?.[_0x30953c(0x1a3)]||[]){const _0x145aad={..._0xec1949,'owner':{'pid':_0x25a4e9['pid']??null,'kind':_0x25a4e9[_0x30953c(0xb9)]??null,'host':_0x25a4e9[_0x30953c(0xfb)]??null}},_0x1a811c=_0xec1949['mode']==='single'?_0x30953c(0x1dd)+(_0xec1949['env']??'')+'::'+(_0xec1949['cursorKey']??_0xec1949[_0x30953c(0x22e)]??_0xec1949['id']):'inst:'+(_0x25a4e9['nodeKey']??_0x25a4e9['processKey']??'')+'::'+(_0xec1949[_0x30953c(0x136)]??'')+'::'+_0xec1949['id'],_0x37e89b=_0x43cf73[_0x30953c(0xec)](_0x1a811c);if(!_0x37e89b||_0x1f629b(_0x145aad)>_0x1f629b(_0x37e89b))_0x43cf73['set'](_0x1a811c,_0x145aad);}}return[..._0x43cf73[_0x30953c(0x2e6)]()];}[_0x3faefc(0xd2)](){const _0x5aac86=_0x3faefc,_0x3546f1=Date[_0x5aac86(0x24a)](),_0x318306=this['listNodes'](),_0x33389e=_0x58cc75=>Math[_0x5aac86(0x2bc)](0x0,Math['round']((_0x3546f1-(_0x58cc75[_0x5aac86(0x1ff)]||_0x3546f1))/0x3e8)),_0x15179f=_0x318306['find'](_0x32c567=>_0x32c567[_0x5aac86(0xb9)]===_0x5aac86(0x240)),_0xf30549=_0x318306['filter'](_0x2f584d=>_0x2f584d[_0x5aac86(0xb9)]==='http-server');if(_0x15179f||_0xf30549[_0x5aac86(0x17e)])return{'primary':_0x15179f?{'pid':_0x15179f[_0x5aac86(0x11d)],'uptime':_0x33389e(_0x15179f)}:null,'workers':_0xf30549['map'](_0x51c948=>({'pid':_0x51c948[_0x5aac86(0x11d)],'uptime':_0x33389e(_0x51c948)})),'workersConfigured':_0x15179f?.[_0x5aac86(0x1a8)]?.[_0x5aac86(0x292)]??_0xf30549[_0x5aac86(0x17e)],'mode':'cluster'};const _0x3bd38f=_0x318306[_0x5aac86(0x217)](_0x184276=>_0x184276[_0x5aac86(0xb9)]===_0x5aac86(0x23a)||_0x184276['kind']===_0x5aac86(0x26b)||_0x184276[_0x5aac86(0xb9)]===_0x5aac86(0x1fe)),_0x2b4113=_0x3bd38f?{'pid':_0x3bd38f[_0x5aac86(0x11d)],'uptime':_0x33389e(_0x3bd38f)}:{'pid':process['pid'],'uptime':Math[_0x5aac86(0x2bc)](0x0,Math[_0x5aac86(0x24b)](process[_0x5aac86(0x14f)]()))};return{'primary':_0x2b4113,'workers':[_0x2b4113],'workersConfigured':0x1,'mode':_0x5aac86(0x157)};}[_0x3faefc(0x264)](){const _0x43d82b=_0x3faefc;return this[_0x43d82b(0x131)]();}['treeView'](){const _0x2699c7=_0x3faefc,_0x3ede49=new Map();for(const _0x56ecd0 of this[_0x2699c7(0x131)]())_0x3ede49[_0x2699c7(0x17a)](_0x56ecd0['processKey'],{..._0x56ecd0,'children':[]});const _0x1b6edb=[];for(const _0x43469f of _0x3ede49['values']()){const _0x2038c1=_0x43469f[_0x2699c7(0x2a5)]?_0x3ede49[_0x2699c7(0xec)](_0x43469f[_0x2699c7(0x2a5)]):null;if(_0x2038c1&&_0x2038c1!==_0x43469f)_0x2038c1[_0x2699c7(0x148)][_0x2699c7(0x1a0)](_0x43469f);else _0x1b6edb[_0x2699c7(0x1a0)](_0x43469f);}const _0x4bf7a5=(_0xae704f,_0x2df507)=>_0xae704f[_0x2699c7(0xb9)]===_0x2df507[_0x2699c7(0xb9)]?(_0xae704f[_0x2699c7(0x11d)]||0x0)-(_0x2df507['pid']||0x0):(_0xae704f[_0x2699c7(0xb9)]??'')<(_0x2df507[_0x2699c7(0xb9)]??'')?-0x1:0x1,_0x5c8af8=_0x29e8a2=>{const _0xd811ba=_0x2699c7;_0x29e8a2[_0xd811ba(0x101)](_0x4bf7a5);for(const _0xaf54e4 of _0x29e8a2)if(_0xaf54e4[_0xd811ba(0x148)][_0xd811ba(0x17e)])_0x5c8af8(_0xaf54e4[_0xd811ba(0x148)]);};return _0x5c8af8(_0x1b6edb),_0x1b6edb;}[_0x3faefc(0x282)](_0x116212){const _0x40a9df=_0x3faefc;return this[_0x40a9df(0x131)]()[_0x40a9df(0x217)](_0x1c2929=>_0x1c2929['processKey']===_0x116212)??null;}[_0x3faefc(0x131)](_0x274932=Date[_0x3faefc(0x24a)]()){const _0x2ffbb6=_0x3faefc,_0x3b85ad=new Map();for(const _0x269d9d of this['listNodes']()){const _0x31623b=_0x573832(_0x269d9d);let _0xeb2c9b=_0x3b85ad['get'](_0x31623b);!_0xeb2c9b&&(_0xeb2c9b={'processKey':_0x31623b,'nodeKey':_0x31623b,'pid':_0x269d9d[_0x2ffbb6(0x11d)],'ppid':_0x269d9d[_0x2ffbb6(0xfe)]??null,'host':_0x269d9d['host']??null,'kind':_0x269d9d[_0x2ffbb6(0xb9)],'role':null,'supervisorKey':_0x269d9d[_0x2ffbb6(0x2a5)]??null,'slot':_0x269d9d[_0x2ffbb6(0x124)]??null,'slotKey':_0x269d9d[_0x2ffbb6(0x2c4)]??null,'caps':_0x269d9d[_0x2ffbb6(0x271)]??null,'lifecycle':_0x269d9d[_0x2ffbb6(0x19e)]??null,'uptime':Math[_0x2ffbb6(0x2bc)](0x0,Math[_0x2ffbb6(0x24b)]((_0x274932-(_0x269d9d[_0x2ffbb6(0x1ff)]||_0x274932))/0x3e8)),'startedAt':_0x269d9d[_0x2ffbb6(0x1ff)]??null,'meta':_0x269d9d[_0x2ffbb6(0x1a8)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x3b85ad['set'](_0x31623b,_0xeb2c9b));_0xeb2c9b[_0x2ffbb6(0x154)][_0x2ffbb6(0x1a0)]({'instanceId':_0x269d9d[_0x2ffbb6(0xbe)]??null,'role':_0x269d9d[_0x2ffbb6(0x119)]??null,'listenAddr':_0x269d9d[_0x2ffbb6(0x22b)]??null,'lifecycle':_0x269d9d['lifecycle']??null,'processing':_0x269d9d['processing']??null});if(!_0xeb2c9b[_0x2ffbb6(0x119)]&&_0x269d9d[_0x2ffbb6(0x119)])_0xeb2c9b[_0x2ffbb6(0x119)]=_0x269d9d[_0x2ffbb6(0x119)];if(!_0xeb2c9b[_0x2ffbb6(0x22b)]&&_0x269d9d[_0x2ffbb6(0x22b)])_0xeb2c9b['listenAddr']=_0x269d9d['listenAddr'];if(!_0xeb2c9b['processing']&&_0x269d9d[_0x2ffbb6(0x106)])_0xeb2c9b[_0x2ffbb6(0x106)]=_0x269d9d[_0x2ffbb6(0x106)];if(!_0xeb2c9b[_0x2ffbb6(0x1b3)]&&_0x269d9d[_0x2ffbb6(0x1b3)])_0xeb2c9b[_0x2ffbb6(0x1b3)]=_0x269d9d[_0x2ffbb6(0x1b3)];if(!_0xeb2c9b[_0x2ffbb6(0x21a)]&&_0x269d9d[_0x2ffbb6(0x21a)])_0xeb2c9b[_0x2ffbb6(0x21a)]=_0x269d9d[_0x2ffbb6(0x21a)];if(_0xeb2c9b['caps']==null&&_0x269d9d[_0x2ffbb6(0x271)])_0xeb2c9b['caps']=_0x269d9d[_0x2ffbb6(0x271)];if(_0x269d9d[_0x2ffbb6(0x215)]&&(!_0xeb2c9b['stats']||(_0x269d9d[_0x2ffbb6(0x215)]['at']??0x0)>(_0xeb2c9b[_0x2ffbb6(0x215)]['at']??0x0)))_0xeb2c9b['stats']=_0x269d9d['stats'];}return[..._0x3b85ad[_0x2ffbb6(0x2e6)]()];}[_0x3faefc(0x19d)](){const _0x141ab6=_0x3faefc,_0x27aabf=[],_0x55bc2c={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x278066 of this[_0x141ab6(0x131)]()){_0x27aabf[_0x141ab6(0x1a0)]({'processKey':_0x278066['processKey'],'kind':_0x278066[_0x141ab6(0xb9)],'pid':_0x278066[_0x141ab6(0x11d)],'supervisorKey':_0x278066[_0x141ab6(0x2a5)],'meta':_0x278066[_0x141ab6(0x1a8)]??null,'uptime':_0x278066['uptime'],'stats':_0x278066['stats']??null}),_0x55bc2c[_0x141ab6(0x2bd)]++;if(_0x278066[_0x141ab6(0x215)]){_0x55bc2c[_0x141ab6(0xd5)]+=_0x278066[_0x141ab6(0x215)][_0x141ab6(0xd5)]||0x0,_0x55bc2c[_0x141ab6(0x1f2)]+=(_0x278066[_0x141ab6(0x215)]['heapUsed']||0x0)+(_0x278066['stats']['threads']?.['heapUsed']||0x0);const _0x2c585f=_0x278066[_0x141ab6(0x215)][_0x141ab6(0x25f)];_0x2c585f&&(_0x55bc2c[_0x141ab6(0x25f)][_0x141ab6(0x235)]+=_0x2c585f[_0x141ab6(0x235)]||0x0,_0x55bc2c[_0x141ab6(0x25f)][_0x141ab6(0x293)]+=_0x2c585f['sandbox']||0x0,_0x55bc2c['threads']['busy']+=_0x2c585f['busy']||0x0);}}return{'totals':_0x55bc2c,'nodes':_0x27aabf};}async[_0x3faefc(0x2e5)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x19eb2f=_0x3faefc;this[_0x19eb2f(0x238)]=this[_0x19eb2f(0x238)]||!!writer,this[_0x19eb2f(0x2ea)]=this[_0x19eb2f(0x2ea)]||!!reader,this[_0x19eb2f(0x14b)]=kind||this[_0x19eb2f(0x14b)]||(_0x4e3516[_0x19eb2f(0x10a)]?'http-server':_0x19eb2f(0x23a)),this[_0x19eb2f(0x113)]=supervisorKey??this[_0x19eb2f(0x113)],this[_0x19eb2f(0x2a3)]=listenAddr??this[_0x19eb2f(0x2a3)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x19eb2f(0xb0)]){const _0x11337c=await this[_0x19eb2f(0x1dc)][_0x19eb2f(0x166)](_0xc4a0da,{'sync':![],'durability':'fast'});await _0x11337c[_0x19eb2f(0x1c3)](_0x16f04c),this['_statusEnv']=_0x11337c;}return this[_0x19eb2f(0xb0)];}[_0x3faefc(0x15d)](){const _0x9780d4=_0x3faefc;return this[_0x9780d4(0x1ca)]!==this[_0x9780d4(0xb0)]&&(this[_0x9780d4(0x1ca)]=this[_0x9780d4(0xb0)],this[_0x9780d4(0x144)]=this[_0x9780d4(0xb0)][_0x9780d4(0x2ba)](_0x16f04c)[_0x9780d4(0xb3)]),this[_0x9780d4(0x144)];}[_0x3faefc(0x1d3)](_0x4349e2){const _0x37c67e=_0x3faefc;if(_0x2e88d8)return this[_0x37c67e(0x15d)]()[_0x37c67e(0x156)](_0x4349e2[_0x37c67e(0x253)],_0x4349e2,0x1);const _0x27e034=this[_0x37c67e(0x15d)]()[_0x37c67e(0x170)](_0x4349e2[_0x37c67e(0x253)],_0x4349e2,0x1);if(_0x27e034&&typeof _0x27e034[_0x37c67e(0xda)]===_0x37c67e(0x18c))_0x27e034['then'](undefined,()=>{});return _0x27e034;}[_0x3faefc(0x1b6)](_0x25f449){const _0x1254f3=_0x3faefc;return this[_0x1254f3(0x15d)]()[_0x1254f3(0x156)](_0x25f449['nodeKey'],_0x25f449,0x1);}[_0x3faefc(0x273)](_0x276bdc){const _0x521e1e=_0x3faefc;if(_0x2e88d8)try{return this[_0x521e1e(0x15d)]()[_0x521e1e(0x20c)](_0x276bdc);}catch{return![];}const _0x31b917=this['_nodeDb']()[_0x521e1e(0x2de)](_0x276bdc);if(_0x31b917&&typeof _0x31b917['then']===_0x521e1e(0x18c))_0x31b917[_0x521e1e(0xda)](undefined,()=>{});return _0x31b917;}async[_0x3faefc(0x120)](_0x2cac4f){const _0x153eec=_0x3faefc;if(!this[_0x153eec(0xb0)]||!this[_0x153eec(0x238)]||!_0x2cac4f?.['nodeKey'])return;return this[_0x153eec(0x1d3)](_0x2cac4f);}async[_0x3faefc(0x1fb)](_0x396e97){const _0x11fddd=_0x3faefc;if(!this[_0x11fddd(0xb0)]||!this[_0x11fddd(0x238)]||!_0x396e97)return;const _0xef3489=_0x396e97[_0x11fddd(0x1a9)]('#'),_0x787e39=[];for(const {key:_0x1f7a53}of this[_0x11fddd(0xb0)][_0x11fddd(0x1c1)](_0x16f04c)){if(_0x1f7a53===_0x396e97||!_0xef3489&&typeof _0x1f7a53==='string'&&_0x1f7a53[_0x11fddd(0x218)](_0x396e97+'#'))_0x787e39[_0x11fddd(0x1a0)](_0x1f7a53);}for(const _0x2328d5 of _0x787e39){try{this['_nodeDb']()[_0x11fddd(0x20c)](_0x2328d5);}catch{}}}[_0x3faefc(0x1c0)](_0x2ecd36){const _0x206dba=_0x3faefc;if(typeof _0x2ecd36?.[_0x206dba(0x11d)]!==_0x206dba(0x2a4))return![];if(_0x2ecd36[_0x206dba(0xfb)]!==_0x5e8a97[_0x206dba(0x165)]())return![];if(_0x2ecd36[_0x206dba(0x11d)]===process[_0x206dba(0x11d)])return![];if(_0x2ecd36[_0x206dba(0x16e)]!=null&&_0x2ecd36['expiresAt']<Date[_0x206dba(0x24a)]()-_0x1e5760)return!![];try{return process[_0x206dba(0x209)](_0x2ecd36['pid'],0x0),![];}catch(_0x59750f){return _0x59750f[_0x206dba(0x2d9)]===_0x206dba(0x1de);}}[_0x3faefc(0x2a6)](){const _0x2dab70=_0x3faefc;if(!this[_0x2dab70(0xb0)])return[];try{this[_0x2dab70(0xb0)]['db']?.[_0x2dab70(0x149)]?.();}catch{}const _0x3722a7=Date['now'](),_0x46933b=_0x5e8a97[_0x2dab70(0x165)](),_0x22fad4=[];for(const {value:_0x1d378f}of this[_0x2dab70(0xb0)][_0x2dab70(0x1c1)](_0x16f04c)){if(!_0x1d378f)continue;let _0x127daa=null;_0x1d378f[_0x2dab70(0xfb)]===_0x46933b&&typeof _0x1d378f[_0x2dab70(0x11d)]===_0x2dab70(0x2a4)&&(_0x127daa=!this[_0x2dab70(0x1c0)](_0x1d378f));if(_0x127daa===![])continue;const _0x36b82d=_0x1d378f[_0x2dab70(0x16e)]==null||_0x1d378f[_0x2dab70(0x16e)]>=_0x3722a7;if(_0x127daa===!![]||_0x36b82d)_0x22fad4['push'](_0x1d378f);}return _0x22fad4;}async[_0x3faefc(0xbb)](_0x549740=0x0){const _0x2a8760=_0x3faefc;if(!this[_0x2a8760(0xb0)]||!this[_0x2a8760(0x238)])return;const _0x393a83=Date[_0x2a8760(0x24a)]()-_0x549740,_0x54e37d=new Set(),_0x301290=[],_0x306507=_0x5e8a97[_0x2a8760(0x165)](),_0x89c1a5=require$$6[_0x2a8760(0x1e5)];for(const {key:_0x2c0326,value:_0x531c1c}of this[_0x2a8760(0xb0)]['getRange'](_0x16f04c)){if(!_0x531c1c)continue;const _0x280024=_0x531c1c[_0x2a8760(0xfb)]===_0x306507&&typeof _0x531c1c[_0x2a8760(0x11d)]==='number',_0x4b3251=_0x280024?this[_0x2a8760(0x1c0)](_0x531c1c):_0x531c1c[_0x2a8760(0x16e)]!=null&&_0x531c1c[_0x2a8760(0x16e)]<_0x393a83;if(_0x4b3251)_0x301290[_0x2a8760(0x1a0)](_0x2c0326);else{_0x54e37d[_0x2a8760(0x25e)](_0x573832(_0x531c1c)??_0x2c0326);if(_0x531c1c['version']&&_0x531c1c[_0x2a8760(0x1e5)]!==_0x89c1a5){if(!this['_versionSkewWarned'])this[_0x2a8760(0x288)]=new Set();!this[_0x2a8760(0x288)][_0x2a8760(0xab)](_0x531c1c[_0x2a8760(0x1e5)])&&(this[_0x2a8760(0x288)]['add'](_0x531c1c['version']),this['okdb'][_0x2a8760(0x2cd)]?.[_0x2a8760(0x26f)]?.('process\x20'+(_0x531c1c['pid']??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x531c1c[_0x2a8760(0x1e5)]+_0x2a8760(0x176)+_0x89c1a5+_0x2a8760(0x257)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x2a8760(0x1cc)}));}}}for(const _0x21bc21 of _0x301290)this['_removeRowAsync'](_0x21bc21);if(this[_0x2a8760(0x100)]()){const _0x48d4d9=[];for(const {key:_0x3c1a62}of this['listDesired']('node')){if(!_0x54e37d[_0x2a8760(0xab)](_0x3c1a62)){if(_0x2e88d8)try{this[_0x2a8760(0x2a1)][_0x2a8760(0x20c)](_0x2a8760(0x16a)+_0x3c1a62);}catch{}else _0x48d4d9['push'](this['_desired'][_0x2a8760(0x2de)]('node/'+_0x3c1a62));}}if(_0x48d4d9[_0x2a8760(0x17e)])await Promise[_0x2a8760(0x138)](_0x48d4d9);}}[_0x3faefc(0x213)](_0x1e3773=null){const _0x55f6be=_0x3faefc;if(this[_0x55f6be(0x175)])return;if(!this['_isWriter']||!this[_0x55f6be(0xb0)]){this[_0x55f6be(0x1dc)]?.[_0x55f6be(0x2cd)]?.['warn']?.(_0x55f6be(0x1ed)+this[_0x55f6be(0x238)]+_0x55f6be(0xc0)+!!this[_0x55f6be(0xb0)]+_0x55f6be(0x244),{'feature':_0x55f6be(0x2bd)});return;}this['_onTick']=_0x1e3773,this[_0x55f6be(0x103)]=()=>this[_0x55f6be(0x265)]();for(const _0x5a8fa3 of _0x53d213)this['okdb'][_0x55f6be(0x1f9)]['on'](_0x5a8fa3,this[_0x55f6be(0x103)]);this[_0x55f6be(0x1d0)]();const _0x171b26=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x13a537;this[_0x55f6be(0x175)]=setInterval(()=>{const _0x2a3adf=_0x55f6be;if(this[_0x2a3adf(0xb8)])try{this[_0x2a3adf(0xb8)]();}catch{}this[_0x2a3adf(0x1d0)](),this[_0x2a3adf(0xbb)]()[_0x2a3adf(0x230)](()=>{});},_0x171b26);if(this[_0x55f6be(0x175)][_0x55f6be(0x13e)])this[_0x55f6be(0x175)][_0x55f6be(0x13e)]();}[_0x3faefc(0x265)](){const _0x100c77=_0x3faefc;if(!this['_isWriter']||!this['_statusEnv'])return;if(Date[_0x100c77(0x24a)]()-this[_0x100c77(0x159)]<_0x1f6e90)return;this[_0x100c77(0x1d0)]();}[_0x3faefc(0x1d0)](){const _0x19fa38=_0x3faefc;if(!this[_0x19fa38(0x238)]||!this[_0x19fa38(0xb0)])return;this[_0x19fa38(0x159)]=Date[_0x19fa38(0x24a)]();try{const _0x385e27=[this[_0x19fa38(0x133)]()];for(const _0x587bfd of this['_children'][_0x19fa38(0x2e6)]())_0x385e27[_0x19fa38(0x1a0)](this['_buildChildRow'](_0x587bfd));const _0x486889=_0x23d241['enabled']?_0x23d241[_0x19fa38(0x24a)]():0x0;for(const _0x354b8c of _0x385e27){try{this[_0x19fa38(0x1b6)](_0x354b8c),this[_0x19fa38(0x19c)]=![];}catch(_0x5a4fa4){!this[_0x19fa38(0x19c)]&&(this[_0x19fa38(0x19c)]=!![],this[_0x19fa38(0x1dc)]?.[_0x19fa38(0x2cd)]?.[_0x19fa38(0x26f)]?.(_0x19fa38(0x16d)+_0x5a4fa4[_0x19fa38(0x25d)],{'feature':_0x19fa38(0x2bd)}));}}if(_0x23d241[_0x19fa38(0xcf)])_0x23d241[_0x19fa38(0x1d2)]('registry-publish',_0x23d241[_0x19fa38(0x24a)]()-_0x486889,_0x19fa38(0xc1)+_0x385e27[_0x19fa38(0x17e)]+_0x19fa38(0x1ae));}catch(_0x24c84c){!this[_0x19fa38(0x19c)]&&(this['_publishFailWarned']=!![],this[_0x19fa38(0x1dc)]?.['log']?.[_0x19fa38(0x26f)]?.(_0x19fa38(0x16d)+_0x24c84c[_0x19fa38(0x25d)],{'feature':_0x19fa38(0x2bd)}));}}async[_0x3faefc(0x167)](){const _0x4175f6=_0x3faefc;if(this[_0x4175f6(0x103)]){for(const _0x484e6b of _0x53d213){try{this[_0x4175f6(0x1dc)][_0x4175f6(0x1f9)][_0x4175f6(0x191)](_0x484e6b,this[_0x4175f6(0x103)]);}catch{}}this['_onProcEvent']=null;}this[_0x4175f6(0x175)]&&(clearInterval(this[_0x4175f6(0x175)]),this[_0x4175f6(0x175)]=null);try{if(this['_statusEnv']&&this[_0x4175f6(0x238)])await this[_0x4175f6(0x1fb)](this[_0x4175f6(0x2c1)]);}catch{}}async[_0x3faefc(0x18e)](){const _0x4741f7=_0x3faefc;if(!this[_0x4741f7(0xb0)]||!this[_0x4741f7(0x238)])return;try{await this[_0x4741f7(0x1fb)](this[_0x4741f7(0x2c1)]);}catch{}try{const _0x5f1ea8=[];for(const {value:_0x4b00e2}of this['_statusEnv'][_0x4741f7(0x1c1)](_0x16f04c)){if(_0x4b00e2?.['ppid']===process[_0x4741f7(0x11d)]&&_0x4b00e2[_0x4741f7(0x253)])_0x5f1ea8[_0x4741f7(0x1a0)](_0x4b00e2[_0x4741f7(0x253)]);}for(const _0x27d7d8 of _0x5f1ea8){try{await this[_0x4741f7(0x1fb)](_0x27d7d8);}catch{}}}catch{}}async[_0x3faefc(0x26a)](){return this['putNode'](this['_buildOwnRow']());}async[_0x3faefc(0x2af)](_0x191c94){const _0x14f316=_0x3faefc;if(!this[_0x14f316(0xb0)]||!this[_0x14f316(0x238)])return;return this['putNode'](this[_0x14f316(0x2c5)](_0x191c94));}['_buildChildRow']({pid:_0x4fb122,startedAt:_0x3fab1a,kind:_0x50675d,supervisorKey:_0x4d1f14,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x3faefc(0xad),meta:meta=null,stats:stats=null}){const _0x1c31e3=_0x3faefc,_0x2789a2=Date[_0x1c31e3(0x24a)](),_0x4de7c6=_0x1f48f5(_0x4fb122,_0x3fab1a);return{'nodeKey':_0xce4ca5(_0x4de7c6,'0'),'processKey':_0x4de7c6,'instanceId':'0','pid':_0x4fb122,'startedAt':_0x3fab1a,'ppid':process['pid'],'host':_0x5e8a97[_0x1c31e3(0x165)](),'supervisorKey':_0x4d1f14,'slot':slot,'slotKey':slotKey,'kind':_0x50675d,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x2789a2,'expiresAt':_0x2789a2+_0x4b5ec0,'caps':this['_caps'](_0x50675d,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x3faefc(0x17f)](_0x1d801e){const _0x1cdf01=_0x3faefc;if(!_0x1d801e?.[_0x1cdf01(0x11d)])return null;const _0x2809ef=_0x1f48f5(_0x1d801e[_0x1cdf01(0x11d)],_0x1d801e[_0x1cdf01(0x1ff)]);this['_children'][_0x1cdf01(0x17a)](_0x2809ef,{..._0x1d801e,'supervisorKey':_0x1d801e[_0x1cdf01(0x2a5)]??this['_selfKey']});if(this[_0x1cdf01(0x238)])await this[_0x1cdf01(0x2af)](this[_0x1cdf01(0x252)][_0x1cdf01(0xec)](_0x2809ef))['catch']?.(()=>{});return _0x2809ef;}[_0x3faefc(0x222)](_0x1f16d7){const _0x17eaee=_0x3faefc;if(!_0x1f16d7)return;return this['_children'][_0x17eaee(0x2aa)](_0x1f16d7),this[_0x17eaee(0x1fb)](_0x1f16d7);}[_0x3faefc(0x195)](){const _0x5edaa3=_0x3faefc,_0x1b9ef4=Date[_0x5edaa3(0x24a)](),_0x122e58=process[_0x5edaa3(0x16c)](),_0x34265c=(_0x1b9ef4-this[_0x5edaa3(0x194)])*0x3e8;if(_0x34265c>=0x3d090){const _0x50edf3=_0x122e58[_0x5edaa3(0x10c)]-this[_0x5edaa3(0x164)]['user']+(_0x122e58[_0x5edaa3(0x1fd)]-this[_0x5edaa3(0x164)][_0x5edaa3(0x1fd)]),_0x4609f0=_0x5e8a97[_0x5edaa3(0x206)]()[_0x5edaa3(0x17e)]||0x1;this[_0x5edaa3(0x123)]=Math[_0x5edaa3(0x22d)](0x64,Math[_0x5edaa3(0x24b)](_0x50edf3/(_0x34265c*_0x4609f0)*0x64)),this[_0x5edaa3(0x172)]=Math[_0x5edaa3(0x24b)](_0x34265c/0x3e8),this[_0x5edaa3(0x164)]=_0x122e58,this[_0x5edaa3(0x194)]=_0x1b9ef4;}const _0x3c2ff8=process[_0x5edaa3(0xc2)](),_0x426aed=this[_0x5edaa3(0x250)]['size'];let _0x3658c4=0x0;if(_0x426aed>0x0){const _0x363840=[this[_0x5edaa3(0x1dc)],...this['okdb'][_0x5edaa3(0x139)]?.[_0x5edaa3(0x2e6)]?.()??[]];for(const _0x440f4c of _0x363840){const _0x933a99=_0x440f4c['functions']?.[_0x5edaa3(0xa6)];if(_0x933a99)_0x3658c4+=_0x933a99['liveThreadStats']['busy'];}}let _0x1a84f3=null;const _0x1873b8=_0x426aed;if(_0x1873b8>0x0){let _0x3e1da6=0x0;for(const _0x46cfd8 of this['_threadStats'][_0x5edaa3(0x2e6)]())_0x3e1da6+=_0x46cfd8[_0x5edaa3(0x1f2)]||0x0;_0x1a84f3={'count':_0x1873b8,'heapUsed':_0x3e1da6,'sandbox':_0x426aed,'busy':_0x3658c4};}return{'rss':_0x3c2ff8[_0x5edaa3(0xd5)],'heapUsed':_0x3c2ff8['heapUsed'],'heapTotal':_0x3c2ff8[_0x5edaa3(0x2dd)],'external':_0x3c2ff8[_0x5edaa3(0x189)],'cpuPct':this[_0x5edaa3(0x123)],'cpuWindowMs':this[_0x5edaa3(0x172)]??null,'threads':_0x1a84f3,'at':_0x1b9ef4};}[_0x3faefc(0x274)](_0x1e780e,_0x578c9c){const _0x4d879b=_0x3faefc;if(!_0x1e780e||!_0x578c9c)return;this[_0x4d879b(0x250)][_0x4d879b(0x17a)](_0x1e780e,_0x578c9c);}['clearThreadStats'](_0x470a10){const _0x154a19=_0x3faefc;this[_0x154a19(0x250)][_0x154a19(0x2aa)](_0x470a10);}[_0x3faefc(0x117)](_0x4230e1,_0x407371,_0xa7266c=undefined){const _0x456c20=_0x3faefc,_0x23171c=this['_children']['get'](_0x4230e1);if(!_0x23171c||!_0x407371)return;if(_0xa7266c!==undefined)_0x23171c[_0x456c20(0x106)]=_0xa7266c;_0x23171c[_0x456c20(0x215)]={'rss':_0x407371[_0x456c20(0xd5)]??null,'heapUsed':_0x407371[_0x456c20(0x1f2)]??null,'heapTotal':_0x407371[_0x456c20(0x2dd)]??null,'external':_0x407371['external']??null,'cpuPct':_0x407371[_0x456c20(0x294)]??null,'cpuWindowMs':_0x407371['cpuWindowMs']??null,'threads':_0x407371[_0x456c20(0x25f)]??null,'claims':_0x407371[_0x456c20(0x1e7)]??null,'envsOpen':_0x407371[_0x456c20(0x260)]??null,'at':Date[_0x456c20(0x24a)]()};}[_0x3faefc(0x133)](){const _0x4321a0=_0x3faefc,_0x209d09=Date[_0x4321a0(0x24a)](),_0x2da84d=this[_0x4321a0(0x1dc)][_0x4321a0(0x2b8)]||{},_0x3a6b4b=this[_0x4321a0(0x14b)]||_0x4321a0(0x23a);return{'nodeKey':this['_rowKey'],'processKey':this[_0x4321a0(0x1db)],'instanceId':this[_0x4321a0(0x171)],'pid':process[_0x4321a0(0x11d)],'startedAt':this[_0x4321a0(0x1af)],'instanceStartedAt':this[_0x4321a0(0x15b)],'ppid':typeof process[_0x4321a0(0xfe)]==='number'?process[_0x4321a0(0xfe)]:null,'host':_0x5e8a97[_0x4321a0(0x165)](),'supervisorKey':this[_0x4321a0(0x113)]??null,'version':require$$6['version'],'kind':_0x3a6b4b,'role':{'engines':!!_0x2da84d['engines'],'processors':!!_0x2da84d[_0x4321a0(0x1a3)],'compaction':_0x2da84d[_0x4321a0(0x12b)],'http':_0x2da84d[_0x4321a0(0x27f)]},'listenAddr':this[_0x4321a0(0x2a3)]??null,'heartbeatAt':_0x209d09,'expiresAt':_0x209d09+_0x4b5ec0,'caps':this['_caps'](_0x3a6b4b,_0x2da84d),'lifecycle':{'state':_0x4321a0(0xad),'desiredVersionApplied':null},'meta':{...this[_0x4321a0(0x245)]},'processing':_0x2da84d[_0x4321a0(0x1a3)]?this['_buildProcessingFacet']():null,'engines':_0x2da84d['engines']?[...this[_0x4321a0(0x1dc)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x4321a0(0x14c)](),'stats':this[_0x4321a0(0x195)](),'writers':this[_0x4321a0(0x141)]()};}[_0x3faefc(0x141)](){const _0x1ff821=_0x3faefc,_0x53a88c={};try{for(const [_0x24e82b,_0x45bfaf]of this[_0x1ff821(0x1dc)][_0x1ff821(0x139)]){try{const _0x4f1b4c=_0x45bfaf[_0x1ff821(0x259)]?.();if(!_0x4f1b4c)continue;if(!_0x4f1b4c['depth']&&!_0x4f1b4c['committed']&&!(_0x4f1b4c[_0x1ff821(0x1c4)]??0x0)&&!_0x4f1b4c['draining'])continue;_0x53a88c[_0x24e82b]={'depth':_0x4f1b4c[_0x1ff821(0xcc)],'oldestPendingMs':_0x4f1b4c[_0x1ff821(0x163)],'committed':_0x4f1b4c[_0x1ff821(0x121)],'commitsPerSec':_0x4f1b4c['commitsPerSec'],'commitP99Ms':_0x4f1b4c[_0x1ff821(0x226)],'parkedNow':_0x4f1b4c['parkedNow']??0x0,'draining':!!_0x4f1b4c['draining']};}catch{}}}catch{}return Object[_0x1ff821(0x114)](_0x53a88c)[_0x1ff821(0x17e)]?_0x53a88c:null;}['_collectSingletonClaims'](){const _0x46ce49=_0x3faefc,_0x274089=process['pid'],_0x2802cf=Date[_0x46ce49(0x24a)](),_0x55575b=_0x5db560=>{const _0x4c3109=_0x46ce49;if(!_0x5db560)return[];const _0x15f935=[];try{for(const {id:_0x329816,entry:_0x429518}of _0x5db560[_0x4c3109(0x1b4)]()){if(_0x429518?.[_0x4c3109(0x27b)]?.[_0x4c3109(0x11d)]!==_0x274089)continue;const _0x427a76=_0x429518[_0x4c3109(0xc7)]??_0x429518[_0x4c3109(0x187)]??0x0;if(_0x427a76+(_0x429518[_0x4c3109(0x1bd)]??0x0)<_0x2802cf)continue;_0x15f935[_0x4c3109(0x1a0)](_0x329816);}}catch{}return _0x15f935;},_0x361097=_0x55575b(this[_0x46ce49(0x236)](_0x46ce49(0x1e2))),_0x25d3c8=_0x55575b(this[_0x46ce49(0x236)](_0x46ce49(0x1d6)));if(!_0x361097[_0x46ce49(0x17e)]&&!_0x25d3c8[_0x46ce49(0x17e)])return null;return{'compact':_0x361097,'replicate':_0x25d3c8};}[_0x3faefc(0x236)](_0x398ee6){const _0xad6f41=_0x3faefc;if(!this[_0xad6f41(0x1dc)]?.[_0xad6f41(0xac)])return null;if(!this[_0xad6f41(0x20f)])this[_0xad6f41(0x20f)]=new Map();let _0x1b983d=this[_0xad6f41(0x20f)][_0xad6f41(0xec)](_0x398ee6);if(!_0x1b983d)try{_0x1b983d=new _0x30fdf7(this['okdb'][_0xad6f41(0xac)],{'namespace':_0x398ee6}),this[_0xad6f41(0x20f)]['set'](_0x398ee6,_0x1b983d);}catch{return null;}return _0x1b983d;}['_buildProcessingFacet'](){const _0x34c6b3=_0x3faefc,_0x2f9269=[];try{for(const [_0x35c41b,_0x1dd3d5]of this['okdb'][_0x34c6b3(0x139)]){if(_0x35c41b['startsWith']('~'))continue;for(const _0x2fd2be of _0x1dd3d5[_0x34c6b3(0x207)]['tierList']())_0x2f9269['push']({..._0x2fd2be,'env':_0x35c41b});}}catch{}return{'participate':this[_0x34c6b3(0x1dc)][_0x34c6b3(0x1a3)]?.[_0x34c6b3(0x2bf)]??![],'processors':_0x2f9269};}['_ensureDesired'](){const _0x5d3e8d=_0x3faefc;if(this['_desired'])return!![];const _0x3cc796=this['okdb']['_rootDb'];if(!_0x3cc796)return![];return this['_desired']=_0x3cc796[_0x5d3e8d(0x254)](_0x1f78d9,{'dupSort':![]}),this['_cmd']=_0x3cc796['openDB'](_0x1b0b76,{'dupSort':![]}),!![];}async[_0x3faefc(0x20a)](){const _0x5e6973=_0x3faefc;if(!this[_0x5e6973(0x100)]())return;const _0x41a4f1=_0x5e6973(0x27e),_0x10783f=0x1,_0xf8a63a=this[_0x5e6973(0x2a1)][_0x5e6973(0xec)](_0x41a4f1)??0x0;if(_0xf8a63a>=_0x10783f)return;const _0x12ccec=_0x445a54=>{const _0x242788=_0x5e6973;if(_0x445a54===_0x242788(0x1b7))return _0x242788(0x157);if(_0x445a54===_0x242788(0x2e2))return _0x242788(0x2c9);return _0x445a54;};await this[_0x5e6973(0x1dc)]['_systemEnv']['_writer'][_0x5e6973(0x285)](()=>{const _0x38d50a=_0x5e6973;for(const _0x22cb9f of['procmode/',_0x38d50a(0x1b1)]){for(const {key:_0x405e44,value:_0x725421}of this[_0x38d50a(0x2a1)][_0x38d50a(0x1c1)]({'start':_0x22cb9f,'end':_0x22cb9f+'\xff'})){if(typeof _0x405e44!==_0x38d50a(0xa8)||!_0x405e44[_0x38d50a(0x218)](_0x22cb9f))break;const _0x5d70e9=_0x12ccec(_0x725421[_0x38d50a(0x220)]);if(_0x5d70e9!==_0x725421[_0x38d50a(0x220)])this[_0x38d50a(0x2a1)]['put'](_0x405e44,{..._0x725421,'mode':_0x5d70e9});}}this[_0x38d50a(0x2a1)][_0x38d50a(0x170)](_0x41a4f1,_0x10783f);});}[_0x3faefc(0x14a)](){const _0x261091=_0x3faefc;return!!this[_0x261091(0x2a1)];}[_0x3faefc(0x13c)](_0x431c4c,_0x5ca9a8){const _0x19943c=_0x3faefc;if(!this[_0x19943c(0x100)]())return null;const _0x59e1d1=_0x431c4c+'/'+_0x5ca9a8;return this['_refreshDesiredSnapshot'](),this[_0x19943c(0x116)][_0x19943c(0xec)](_0x59e1d1)??this[_0x19943c(0x2a1)][_0x19943c(0xec)](_0x59e1d1)??null;}['_refreshDesiredSnapshot'](){const _0x13ae6a=_0x3faefc;if(!_0x2e88d8)return;try{this[_0x13ae6a(0x1dc)]['_systemEnv']?.['db']?.[_0x13ae6a(0x149)]?.();}catch{}}async[_0x3faefc(0x2a2)](_0x302035,_0x25fe9d,_0x33521f){const _0x45c32c=_0x3faefc;if(!this[_0x45c32c(0x100)]())return null;const _0x4caa2c=_0x302035+'/'+_0x25fe9d;this[_0x45c32c(0x229)]();const _0x406658=this[_0x45c32c(0x116)][_0x45c32c(0xec)](_0x4caa2c)??this['_desired']['get'](_0x4caa2c)??{'version':0x0},_0x497acc=(_0x406658['version']||0x0)+0x1,_0x4e2356={..._0x406658,..._0x33521f,'version':_0x497acc,'updatedAt':Date[_0x45c32c(0x24a)]()};this[_0x45c32c(0x116)][_0x45c32c(0x17a)](_0x4caa2c,_0x4e2356);try{await this['okdb'][_0x45c32c(0x23d)][_0x45c32c(0x2da)][_0x45c32c(0x285)](()=>{const _0x1a5712=_0x45c32c;this[_0x1a5712(0x2a1)][_0x1a5712(0x170)](_0x4caa2c,_0x4e2356);});}finally{if(this[_0x45c32c(0x116)][_0x45c32c(0xec)](_0x4caa2c)===_0x4e2356)this['_desiredOverlay'][_0x45c32c(0x2aa)](_0x4caa2c);}return _0x497acc;}['listDesired'](_0x407b62){const _0x10d8c2=_0x3faefc;if(!this[_0x10d8c2(0x100)]())return[];this['_refreshDesiredSnapshot']();const _0x5550b4=_0x407b62+'/',_0x57d5e8=[];for(const {key:_0x8e1a6a,value:_0x18ba1e}of this['_desired'][_0x10d8c2(0x1c1)]({'start':_0x5550b4,'end':_0x5550b4+'\xff'})){if(typeof _0x8e1a6a!==_0x10d8c2(0xa8)||!_0x8e1a6a[_0x10d8c2(0x218)](_0x5550b4))break;_0x57d5e8[_0x10d8c2(0x1a0)]({'key':_0x8e1a6a[_0x10d8c2(0x272)](_0x5550b4[_0x10d8c2(0x17e)]),'value':_0x18ba1e});}return _0x57d5e8;}[_0x3faefc(0x183)](_0x36e79d){const _0x3fb7c3=_0x3faefc;if(!this[_0x3fb7c3(0x100)]())return null;return this[_0x3fb7c3(0x25c)]['get'](_0x36e79d)??null;}async[_0x3faefc(0x179)](_0x6c74c5,_0x1a4281,_0x527e82={}){const _0x1f8387=_0x3faefc;if(!this[_0x1f8387(0x100)]())return null;let _0xf8be6b;return await this[_0x1f8387(0x1dc)]['_systemEnv'][_0x1f8387(0x2da)]['transaction'](()=>{const _0x2088b9=_0x1f8387,_0xbd9f5b=this[_0x2088b9(0x25c)][_0x2088b9(0xec)](_0x6c74c5)||{'epoch':0x0};_0xf8be6b=(_0xbd9f5b[_0x2088b9(0x2d1)]||0x0)+0x1,this[_0x2088b9(0x25c)]['put'](_0x6c74c5,{..._0xbd9f5b,..._0x527e82,'cmd':_0x1a4281,'epoch':_0xf8be6b,'updatedAt':Date['now']()});}),_0xf8be6b;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x33776,'nodeKey':_0x1f48f5,'logicalKey':_0x394355,'slotKey':_0x2204da,'PROCESS_ENV':_0xc4a0da,'NODE_TYPE':_0x16f04c},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x537b61=_0x5e06fa;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x34ee6e=require$$0$4,{clampTimerDelay:_0x5395c8}=requireOkdbTimers(),{EVENTS:_0x10e255,CHANGE_ACTIONS:_0x491d12}=requireOkdbEnums(),{LOOP:_0x5365a8}=requireOkdbLoopMonitor(),_0x303d82=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x54c1bc=0x5,_0x212568=0x2710;class _0x40a8d4 extends _0x34ee6e{constructor(_0x437429,_0xc3a46c={}){const _0x1355b2=_0x5881;super(),this[_0x1355b2(0x1dc)]=_0x437429,this[_0x1355b2(0x1e9)]=_0xc3a46c[_0x1355b2(0x132)]??_0x303d82,this[_0x1355b2(0xdf)]=_0xc3a46c[_0x1355b2(0x147)]??_0x54c1bc,this[_0x1355b2(0x2e8)]=_0xc3a46c[_0x1355b2(0x29f)]??_0x212568,this['_started']=![],this[_0x1355b2(0x1b5)]=new Map(),this[_0x1355b2(0x169)]=new Map(),this['_pending']=new Map(),this[_0x1355b2(0x199)]=null,this['_draining']=![],this[_0x1355b2(0x2cc)]=new Set(),this[_0x1355b2(0x2b0)]=new Set(),this['_onItem']=_0x300f7c=>this[_0x1355b2(0x107)](_0x300f7c),this['_onPending']=_0x4edf60=>this[_0x1355b2(0x10f)](_0x4edf60),this[_0x1355b2(0xe7)]=_0x5b8a25=>this['_handlePoke'](_0x5b8a25),this['_onStop']=()=>this[_0x1355b2(0x2d6)]();}[_0x537b61(0x177)](){const _0x25b8dd=_0x537b61;if(this[_0x25b8dd(0x2e1)])return;this[_0x25b8dd(0x2e1)]=!![];for(const [_0x3e9665,_0x2c972b]of this[_0x25b8dd(0x1dc)][_0x25b8dd(0x139)]){if(_0x3e9665[_0x25b8dd(0x218)]('~'))continue;try{_0x2c972b[_0x25b8dd(0x1e3)]();}catch{}}for(const [_0x1cb73d,_0x5e47f1]of this[_0x25b8dd(0x1dc)][_0x25b8dd(0x139)]){if(_0x1cb73d[_0x25b8dd(0x218)]('~'))continue;try{this['_baselines'][_0x25b8dd(0x17a)](_0x1cb73d,_0x5e47f1[_0x25b8dd(0x2ad)]()||0x0);}catch{}}const {events:_0x238be7}=this[_0x25b8dd(0x1dc)];_0x238be7['on'](_0x10e255[_0x25b8dd(0x1cd)],this[_0x25b8dd(0x1c5)]),_0x238be7['on'](_0x10e255[_0x25b8dd(0x2dc)],this[_0x25b8dd(0x24d)]),_0x238be7['on'](_0x10e255[_0x25b8dd(0x284)],this[_0x25b8dd(0x24d)]),_0x238be7['on'](_0x10e255[_0x25b8dd(0x280)],this['_onItem']),_0x238be7['on'](_0x10e255[_0x25b8dd(0x1a5)],this[_0x25b8dd(0xe7)]),_0x238be7[_0x25b8dd(0x1a6)](_0x10e255[_0x25b8dd(0x1e0)],this[_0x25b8dd(0x12f)]);}[_0x537b61(0x2d6)](){const _0x14e790=_0x537b61;if(!this[_0x14e790(0x2e1)])return;this['_started']=![];const {events:_0x386ae3}=this[_0x14e790(0x1dc)];_0x386ae3['off'](_0x10e255['ITEM_PENDING'],this['_onPending']),_0x386ae3[_0x14e790(0x191)](_0x10e255['ITEM_CREATE'],this['_onItem']),_0x386ae3['off'](_0x10e255['ITEM_UPDATE'],this[_0x14e790(0x24d)]),_0x386ae3[_0x14e790(0x191)](_0x10e255[_0x14e790(0x280)],this[_0x14e790(0x24d)]),_0x386ae3[_0x14e790(0x191)](_0x10e255['SYSTEM_POKE'],this['_onPoke']);try{_0x386ae3[_0x14e790(0x191)](_0x10e255[_0x14e790(0x1e0)],this[_0x14e790(0x12f)]);}catch{}this[_0x14e790(0x199)]&&(clearTimeout(this[_0x14e790(0x199)]),this[_0x14e790(0x199)]=null),this[_0x14e790(0xb1)]['clear'](),this[_0x14e790(0x1b5)][_0x14e790(0xe3)](),this['_baselines'][_0x14e790(0xe3)](),this['_seen'][_0x14e790(0xe3)](),this[_0x14e790(0x2b0)]['clear']();}[_0x537b61(0x112)](_0x5570c5,_0x20fdf6,_0x3bcb30,_0x2f19bf){return _0x5570c5+'\x00'+_0x20fdf6+'\x00'+_0x3bcb30+'\x00'+_0x2f19bf;}[_0x537b61(0x212)](_0x57d2b3,_0x276cb3,_0x1cfce2,_0x58644c){const _0x2d264a=_0x537b61,_0x28a1d9=this[_0x2d264a(0x112)](_0x57d2b3,_0x276cb3,_0x1cfce2,_0x58644c);if(this[_0x2d264a(0x2cc)][_0x2d264a(0xab)](_0x28a1d9))return![];this[_0x2d264a(0x2cc)][_0x2d264a(0x25e)](_0x28a1d9);if(this['_seen'][_0x2d264a(0x2e3)]>this[_0x2d264a(0x2e8)]){const _0x1e052b=this['_seen'][_0x2d264a(0x2e6)]()[_0x2d264a(0x2bb)]()[_0x2d264a(0x248)];this[_0x2d264a(0x2cc)]['delete'](_0x1e052b);}return!![];}[_0x537b61(0x10f)](_0x65f5f5){const _0xb81209=_0x537b61;if(!this[_0xb81209(0x2e1)]||!_0x65f5f5)return;const {env:_0x300732,type:_0x26f062,key:_0x22e0c5,clock:_0xa9e774}=_0x65f5f5;if(_0x300732==null||_0x26f062==null||_0x22e0c5==null)return;if(typeof _0x300732===_0xb81209(0xa8)&&_0x300732[_0xb81209(0x218)]('~'))return;if(typeof _0x26f062==='string'&&_0x26f062[_0xb81209(0x218)]('~'))return;this[_0xb81209(0x2b0)]['add'](this['_dedupeKey'](_0x300732,_0x26f062,_0x22e0c5,_0xa9e774)),this[_0xb81209(0x2b0)][_0xb81209(0x2e3)]>this[_0xb81209(0x2e8)]&&this[_0xb81209(0x2b0)]['delete'](this['_pendingLocal']['values']()[_0xb81209(0x2bb)]()[_0xb81209(0x248)]);}['_handleInProcess'](_0x40ef4a){const _0x56f217=_0x537b61;if(!this[_0x56f217(0x2e1)]||!_0x40ef4a)return;const {env:_0x44f217,type:_0x293ab6,key:_0x47a12f,clock:_0x2d09ea,origin:_0x4314c3,action:_0x162925,newValue:_0x1ee018,oldValue:_0x3dcedd}=_0x40ef4a;if(_0x44f217==null||_0x293ab6==null||_0x47a12f==null)return;if(typeof _0x44f217===_0x56f217(0xa8)&&_0x44f217[_0x56f217(0x218)]('~'))return;if(typeof _0x293ab6===_0x56f217(0xa8)&&_0x293ab6[_0x56f217(0x218)]('~'))return;this['_pendingLocal'][_0x56f217(0x2aa)](this[_0x56f217(0x112)](_0x44f217,_0x293ab6,_0x47a12f,_0x2d09ea));if(!this[_0x56f217(0x212)](_0x44f217,_0x293ab6,_0x47a12f,_0x2d09ea))return;const _0x53faa1=_0x162925===_0x491d12['REMOVE']?'remove':_0x56f217(0x170);this[_0x56f217(0x126)](_0x56f217(0xde),{'env':_0x44f217,'type':_0x293ab6,'key':_0x47a12f,'op':_0x53faa1,'clock':_0x2d09ea,'origin':_0x4314c3,'value':_0x53faa1===_0x56f217(0x2de)?null:_0x1ee018,'prevValue':_0x3dcedd});}[_0x537b61(0x1ad)](_0x183d3a){const _0x9af8eb=_0x537b61;if(!this['_started'])return;if(!_0x183d3a||typeof _0x183d3a['env']!=='string'||typeof _0x183d3a['type']!==_0x9af8eb(0xa8))return;const {env:_0x2b09d4,type:_0x8837cc}=_0x183d3a;if(_0x2b09d4[_0x9af8eb(0x218)]('~')||_0x8837cc[_0x9af8eb(0x218)]('~'))return;this[_0x9af8eb(0xb1)][_0x9af8eb(0x17a)](_0x2b09d4+'\x00'+_0x8837cc,{'env':_0x2b09d4,'type':_0x8837cc}),this[_0x9af8eb(0xf1)]();}[_0x537b61(0xf1)](){const _0x48afdc=_0x537b61;if(this[_0x48afdc(0x199)])return;const _0x510515=()=>{const _0xc50e06=_0x48afdc;this[_0xc50e06(0x199)]=null,this[_0xc50e06(0x2b7)]()[_0xc50e06(0x230)](()=>{});};this[_0x48afdc(0x199)]=setTimeout(_0x510515,_0x5395c8(this[_0x48afdc(0xdf)]));}async[_0x537b61(0x2b7)](){const _0x269ad4=_0x537b61;if(this[_0x269ad4(0x127)]){this[_0x269ad4(0xf1)]();return;}this[_0x269ad4(0x127)]=!![];try{const _0xf370eb=[...this[_0x269ad4(0xb1)][_0x269ad4(0x2e6)]()];this['_pending'][_0x269ad4(0xe3)]();let _0xea247d=![];for(const {env:_0x23c80a,type:_0x43e4c4}of _0xf370eb){try{const _0x4bc5df=await this[_0x269ad4(0x2ce)](_0x23c80a,_0x43e4c4);if(_0x4bc5df)_0xea247d=!![];}catch{this[_0x269ad4(0xb1)][_0x269ad4(0x17a)](_0x23c80a+'\x00'+_0x43e4c4,{'env':_0x23c80a,'type':_0x43e4c4}),_0xea247d=!![];}}if(_0xea247d||this[_0x269ad4(0xb1)][_0x269ad4(0x2e3)]>0x0)this['_scheduleFlush']();}finally{this[_0x269ad4(0x127)]=![];}}async[_0x537b61(0x2ce)](_0x273162,_0x142567){const _0x15803a=_0x537b61,_0x42f0a0=await this[_0x15803a(0x1dc)][_0x15803a(0x21d)](_0x273162),_0x1b2ff9=_0x273162+'\x00'+_0x142567;!this['_cursors'][_0x15803a(0xab)](_0x1b2ff9)&&(!this[_0x15803a(0x169)][_0x15803a(0xab)](_0x273162)&&(_0x42f0a0[_0x15803a(0x1e3)](),this[_0x15803a(0x169)][_0x15803a(0x17a)](_0x273162,_0x42f0a0[_0x15803a(0x2ad)]()||0x0)),this[_0x15803a(0x1b5)][_0x15803a(0x17a)](_0x1b2ff9,this['_baselines']['get'](_0x273162)));const _0x26912d=this[_0x15803a(0x1b5)][_0x15803a(0xec)](_0x1b2ff9),_0x2ce4ad=_0x42f0a0[_0x15803a(0x2ad)](_0x142567)||0x0;if(_0x2ce4ad<=_0x26912d)return![];const _0x26bbe5=_0x26912d+this['_quantum'],_0x273dfa=Math['min'](_0x2ce4ad,_0x26bbe5),_0x1f53cf=_0x5365a8[_0x15803a(0xcf)]?_0x5365a8[_0x15803a(0x24a)]():0x0,_0x59fada=Array['from'](_0x42f0a0[_0x15803a(0x153)](_0x142567,_0x26912d+0x1,_0x273dfa));let _0x85399=_0x26912d;for(const _0x8664de of _0x59fada){const {clock:_0x33ad36,key:_0x34add1,action:_0x58498f,origin:_0x130f8d}=_0x8664de;if(_0x33ad36>_0x85399)_0x85399=_0x33ad36;if(_0x34add1==null)continue;if(this['_pendingLocal'][_0x15803a(0xab)](this[_0x15803a(0x112)](_0x273162,_0x142567,_0x34add1,_0x33ad36)))continue;if(!this[_0x15803a(0x212)](_0x273162,_0x142567,_0x34add1,_0x33ad36))continue;let _0x34fed5,_0xf62f5;if(_0x58498f===_0x491d12[_0x15803a(0x20e)])_0x34fed5='remove',_0xf62f5=null;else{const _0x160a92=_0x42f0a0[_0x15803a(0xec)](_0x142567,_0x34add1);_0x160a92==null?(_0x34fed5='remove',_0xf62f5=null):(_0x34fed5=_0x15803a(0x170),_0xf62f5=_0x160a92);}this[_0x15803a(0x126)](_0x15803a(0xde),{'env':_0x273162,'type':_0x142567,'key':_0x34add1,'op':_0x34fed5,'clock':_0x33ad36,'origin':_0x130f8d,'value':_0xf62f5});}if(_0x5365a8[_0x15803a(0xcf)])_0x5365a8[_0x15803a(0x1d2)](_0x15803a(0x258)+_0x273162+':'+_0x142567,_0x5365a8[_0x15803a(0x24a)]()-_0x1f53cf,'n='+_0x59fada[_0x15803a(0x17e)]);return this[_0x15803a(0x1b5)][_0x15803a(0x17a)](_0x1b2ff9,Math[_0x15803a(0x2bc)](_0x85399,_0x273dfa)),_0x42f0a0[_0x15803a(0x2ad)](_0x142567)>_0x273dfa;}[_0x537b61(0x2cf)](){const _0x43de51=_0x537b61;return{'started':this['_started'],'quantum':this['_quantum'],'flushDebounce':this[_0x43de51(0xdf)],'cursors':Object['fromEntries']([...this[_0x43de51(0x1b5)][_0x43de51(0x24c)]()][_0x43de51(0x173)](([_0x49102a,_0x400d3c])=>[_0x49102a[_0x43de51(0x193)]('\x00',':'),_0x400d3c])),'pending':this['_pending'][_0x43de51(0x2e3)],'seen':this[_0x43de51(0x2cc)]['size']};}}return _0x40a8d4['CHANGEFEED_QUANTUM']=_0x303d82,okdbChangefeed={'OKDBChangefeed':_0x40a8d4},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3c1326=_0x5e06fa;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x4107ac=require$$1$1,_0x2f3343=require$$1,{EVENTS:_0x10044b}=requireOkdbEnums(),_0x623a23=require$$0$3,{slotKey:_0x3b112d}=requireOkdbProcessRegistry(),_0x298871=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x112ca3=0xfa0,_0x2ba25e=0x5,_0x11cbb8=0x2710,_0x23daec=0xbb8,_0x43acc7=0x7d0,_0xa47e1c=_0x3c1326(0x26d),_0x9715ae=_0x3c1326(0x135),_0x2e3060=_0x3c1326(0x2cd),_0x477b24=_0x3c1326(0x215),_0xf34cfb=[_0x10044b['VIEW_PROGRESS'],_0x10044b[_0x3c1326(0x198)],_0x10044b['FTS_DROP'],_0x10044b[_0x3c1326(0x1ee)],_0x10044b[_0x3c1326(0xe4)],_0x10044b[_0x3c1326(0x204)],_0x10044b[_0x3c1326(0x261)],_0x10044b[_0x3c1326(0x243)],'processor:ready','processor:progress',_0x3c1326(0x23f),_0x3c1326(0xc8),_0x3c1326(0x221),_0x3c1326(0x1da)],_0x4632dd=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x5375e1=0x64;function _0x259dbf(_0x37dcea){const _0x2474a2=_0x3c1326;if(!_0x37dcea)return _0x2474a2(0x298);const _0x24576a=(_0x37dcea[_0x2474a2(0x1a3)]||[])['map'](_0x2bd169=>[_0x2bd169[_0x2474a2(0x136)],_0x2bd169['id'],_0x2bd169[_0x2474a2(0x220)],_0x2bd169[_0x2474a2(0x29d)],!!_0x2bd169['paused'],!!_0x2bd169[_0x2474a2(0x223)],!!_0x2bd169[_0x2474a2(0x1eb)],_0x2bd169[_0x2474a2(0x291)]?.['pid']??null,_0x2bd169[_0x2474a2(0x277)]?String(_0x2bd169[_0x2474a2(0x277)]?.[_0x2474a2(0x25d)]??_0x2bd169[_0x2474a2(0x277)]):null]);return JSON[_0x2474a2(0xd8)]([!!_0x37dcea[_0x2474a2(0x23e)],_0x24576a]);}function _0x40dc2f({workers:_0x5a06ae,makeOkdb:_0x410ca6,port:_0x36c3c4,primaryOkdb:_0x551112,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x1c2358=_0x3c1326;if(_0x4107ac[_0x1c2358(0x281)])return childEntry&&_0x4107ac[_0x1c2358(0xd3)]({'exec':_0x2f3343[_0x1c2358(0x20d)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0xbb9685=_0x1c2358,_0x29d39a=[];for(let _0x5b1915=0x0;_0x5b1915<process[_0xbb9685(0x11f)][_0xbb9685(0x17e)];_0x5b1915++){const _0x9f0363=process[_0xbb9685(0x11f)][_0x5b1915];if(_0x9f0363[_0xbb9685(0x218)](_0xbb9685(0x13f))||_0x9f0363['startsWith'](_0xbb9685(0x1bc))||_0x9f0363[_0xbb9685(0x218)]('--inspect'))continue;if(_0x9f0363==='-e'||_0x9f0363===_0xbb9685(0x190)||_0x9f0363==='-p'||_0x9f0363===_0xbb9685(0xeb)){_0x5b1915++;continue;}_0x29d39a[_0xbb9685(0x1a0)](_0x9f0363);}return _0x29d39a;})())}),_0x7308f3({'workers':_0x5a06ae,'port':_0x36c3c4,'primaryOkdb':_0x551112,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x36c3c4});return _0x49ca77({'makeOkdb':_0x410ca6,'port':_0x36c3c4});}function _0x7308f3({workers:_0xfd60e9,port:_0x3eae0a,primaryOkdb:_0x4720a9,workerEnv:_0x1671e1,workerRole:_0x5e3bde,listenAddr:_0x1617d5}){const _0xf4cfb0=_0x3c1326,_0x1211c1=new Map(),_0x2524f7=new Map();let _0x3fe2c6=![];const _0x50acb4=_0x1d64d5=>_0x1d64d5?.[_0xf4cfb0(0x2c7)],_0x583836=_0x4bbc79=>{const _0x12fdc1=_0xf4cfb0,_0x314621=_0x4107ac[_0x12fdc1(0x234)]({...process.env,..._0x1671e1||{},'OKDB_CLUSTER_SLOT':String(_0x4bbc79)});return _0x314621[_0x12fdc1(0x2c7)]=_0x4bbc79,_0x1211c1[_0x12fdc1(0x17a)](_0x314621[_0x12fdc1(0x13a)]['pid'],{'worker':_0x314621,'startedAt':Date[_0x12fdc1(0x24a)](),'slot':_0x4bbc79}),_0x314621['on'](_0x12fdc1(0x277),_0xb8f408=>{const _0x383e19=_0x12fdc1;console[_0x383e19(0x2cd)](_0x383e19(0x28d)+_0x314621[_0x383e19(0x13a)][_0x383e19(0x11d)]+_0x383e19(0xff)+(_0xb8f408?.[_0x383e19(0x25d)]??_0xb8f408));}),_0x314621['on'](_0x12fdc1(0x1c2),()=>_0x2f5b63()),_0x314621;},_0x1f46ca=_0x2ba09c=>{const _0x56a4=_0xf4cfb0;for(const {worker:_0x21ecef}of _0x1211c1[_0x56a4(0x2e6)]()){if(_0x21ecef[_0x56a4(0x267)]()||!_0x21ecef[_0x56a4(0x18f)]())continue;try{_0x21ecef['send'](_0x2ba09c);}catch{}}};_0x4720a9?.['_activateProcesses']?.({'kind':_0xf4cfb0(0x240),'listenAddr':_0x1617d5})[_0xf4cfb0(0x230)](()=>{}),_0x4720a9?.['processes']?.[_0xf4cfb0(0x239)]?.({'workersConfigured':_0xfd60e9});const _0x333b8f={'engines':!![],'processors':!![],'compaction':!![],..._0x5e3bde,'http':!![]},_0x2f5b63=()=>{const _0x48a4ac=_0xf4cfb0,_0x12d3e4=_0x4720a9?.[_0x48a4ac(0x2bd)];if(!_0x12d3e4||!_0x12d3e4[_0x48a4ac(0x238)])return;const _0xe25ed=_0x12d3e4[_0x48a4ac(0x146)];for(const {worker:_0x59296f,startedAt:_0x281bf5,slot:_0x2a5d80,stats:_0x4d0e32,processing:_0xc10360}of _0x1211c1[_0x48a4ac(0x2e6)]()){if(_0x59296f['isDead']())continue;const _0x179d31=_0x12d3e4[_0x48a4ac(0x14a)]?.()&&_0x12d3e4['getDesired'](_0x48a4ac(0x124),_0x4dd95a(_0x2a5d80))?.['decommission']===!![];_0x12d3e4['publishChildRow']({'pid':_0x59296f[_0x48a4ac(0x13a)][_0x48a4ac(0x11d)],'startedAt':_0x281bf5,'kind':_0x48a4ac(0xea),'supervisorKey':_0xe25ed,'slot':_0x2a5d80,'slotKey':_0x4dd95a(_0x2a5d80),'role':_0x333b8f,'listenAddr':_0x1617d5,'lifecycle':_0x179d31?_0x48a4ac(0x279):'running','processing':_0xc10360??null,'stats':_0x4d0e32??null})[_0x48a4ac(0x230)](()=>{});}},_0x4dd95a=_0x351de8=>_0x3b112d('cluster:'+_0x3eae0a,_0x351de8),_0x2c5ba0=_0x53d00e=>{const _0x511047=_0xf4cfb0,_0x183250=_0x4720a9?.[_0x511047(0x2bd)];if(!_0x183250?.['hasDesired']?.())return![];return _0x183250[_0x511047(0x13c)](_0x511047(0x124),_0x4dd95a(_0x53d00e))?.['decommission']===!![];};for(let _0x1ab215=0x0;_0x1ab215<_0xfd60e9;_0x1ab215++){const _0x485e57=_0x2c5ba0(_0x1ab215);_0x2524f7[_0xf4cfb0(0x17a)](_0x1ab215,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x485e57,'respawnTimer':null}),_0x485e57?console[_0xf4cfb0(0x2cd)]('[okdb-cluster]\x20slot='+_0x1ab215+_0xf4cfb0(0x266)):_0x583836(_0x1ab215);}const _0x43cff=()=>{const _0x1d0976=_0xf4cfb0,_0x1f32b6=_0x4720a9?.[_0x1d0976(0x2bd)];if(!_0x1f32b6?.[_0x1d0976(0x238)]||!_0x1f32b6['hasDesired']?.())return;for(const [_0x47e387,_0x3f752e]of _0x2524f7[_0x1d0976(0x24c)]()){const _0x9e52ba=_0x1f32b6['getDesired'](_0x1d0976(0x124),_0x4dd95a(_0x47e387)),_0x1147d2=_0x9e52ba?.[_0x1d0976(0x11b)]===!![],_0x157d86=_0x9e52ba?.[_0x1d0976(0x209)]===!![];if(_0x1147d2&&!_0x3f752e[_0x1d0976(0x290)]){_0x3f752e['dead']=!![];_0x3f752e[_0x1d0976(0x1f6)]&&(clearTimeout(_0x3f752e[_0x1d0976(0x1f6)]),_0x3f752e[_0x1d0976(0x1f6)]=null);for(const {worker:_0x6e0175}of _0x1211c1['values']()){if(_0x50acb4(_0x6e0175)!==_0x47e387||_0x6e0175[_0x1d0976(0x267)]())continue;try{if(_0x157d86)_0x6e0175[_0x1d0976(0x13a)]['kill'](_0x1d0976(0x247));else _0x6e0175[_0x1d0976(0x18f)]()&&_0x6e0175[_0x1d0976(0x17d)]();}catch{}}console['log'](_0x1d0976(0x2df)+(_0x157d86?'hard-killed':'decommissioned')+_0x1d0976(0x19b)+_0x47e387+'\x20(durable\x20desired-state)');}else{if(!_0x1147d2&&_0x3f752e[_0x1d0976(0x290)]&&_0x9e52ba){_0x3f752e[_0x1d0976(0x290)]=![],_0x3f752e['deaths']=[],_0x3f752e['consecutiveFailures']=0x0;const _0x177ba1=[..._0x1211c1[_0x1d0976(0x2e6)]()][_0x1d0976(0x210)](({worker:_0x4c5518})=>_0x50acb4(_0x4c5518)===_0x47e387&&!_0x4c5518[_0x1d0976(0x267)]());!_0x177ba1&&!_0x3fe2c6&&(_0x583836(_0x47e387),console[_0x1d0976(0x2cd)](_0x1d0976(0x216)+_0x47e387));}}}},_0x5b32d7=()=>{try{_0x43cff();}catch{}};_0x4720a9?.['events']?.['on']?.(_0x10044b[_0xf4cfb0(0x1ab)],_0x5b32d7);const _0xbdb097=[];if(_0x4720a9?.[_0xf4cfb0(0x1f9)]?.['on'])for(const _0x3c2d3d of _0xf34cfb){const _0x3eaac3=_0x10aebd=>{_0x1f46ca({[_0xa47e1c]:_0x9715ae,'event':_0x3c2d3d,'data':_0x10aebd??{}});};_0x4720a9[_0xf4cfb0(0x1f9)]['on'](_0x3c2d3d,_0x3eaac3),_0xbdb097[_0xf4cfb0(0x1a0)]({'event':_0x3c2d3d,'handler':_0x3eaac3});}const _0x4e6e77=setInterval(()=>{_0x43cff(),_0x2f5b63();},_0x4632dd);_0x4e6e77['unref']?.();const _0x550f66=(_0x32908d,_0x13d6d7)=>{const _0x474666=_0xf4cfb0;if(!_0x13d6d7||typeof _0x13d6d7!==_0x474666(0x1ea)||_0x13d6d7[_0xa47e1c]!==_0x2e3060)return;if(!_0x4720a9?.[_0x474666(0x2cd)]?.[_0x474666(0x12a)])return;const _0x493c08=_0x13d6d7[_0x474666(0x224)]||{};_0x4720a9['log']['ingest']({..._0x493c08,'msg':'[w'+_0x13d6d7[_0x474666(0x124)]+']\x20'+(_0x493c08['msg']??''),'meta':{..._0x493c08[_0x474666(0x1a8)]||{},'worker':_0x13d6d7['slot'],'workerPid':_0x13d6d7[_0x474666(0x11d)]}});};_0x4107ac['on'](_0xf4cfb0(0x25d),_0x550f66);const _0xcd6a45=(_0x373b8a,_0x53829f)=>{const _0xa72ab8=_0xf4cfb0;if(!_0x53829f||typeof _0x53829f!=='object'||_0x53829f[_0xa47e1c]!==_0x477b24)return;const _0x6e13f5=_0x1211c1['get'](_0x373b8a[_0xa72ab8(0x13a)][_0xa72ab8(0x11d)]);if(_0x6e13f5){_0x6e13f5[_0xa72ab8(0x215)]={..._0x53829f[_0xa72ab8(0x215)],'at':Date[_0xa72ab8(0x24a)]()};if(_0x53829f['processing']!==undefined){const _0x564665=_0x259dbf(_0x53829f[_0xa72ab8(0x106)]);_0x564665!==_0x6e13f5[_0xa72ab8(0x150)]&&(_0x6e13f5[_0xa72ab8(0x150)]=_0x564665,_0x58225e()),_0x6e13f5['processing']=_0x53829f['processing'];}}};let _0x18d9d7=null;const _0x58225e=()=>{if(_0x18d9d7||_0x3fe2c6)return;_0x18d9d7=setTimeout(()=>{_0x18d9d7=null;if(!_0x3fe2c6)_0x2f5b63();},_0x5375e1),_0x18d9d7['unref']?.();};_0x4107ac['on'](_0xf4cfb0(0x25d),_0xcd6a45),_0x4107ac['on']('exit',(_0x384d7d,_0x157ccc,_0x50625d)=>{const _0x58fa31=_0xf4cfb0,_0x456e52=_0x384d7d[_0x58fa31(0x13a)][_0x58fa31(0x11d)],_0x3d25c3=_0x50acb4(_0x384d7d),_0x22ae4e=_0x1211c1[_0x58fa31(0xec)](_0x456e52);if(_0x22ae4e&&_0x4720a9?.['processes'])_0x4720a9['processes'][_0x58fa31(0x1fb)](_0x456e52+':'+_0x22ae4e[_0x58fa31(0x1ff)])[_0x58fa31(0x230)](()=>{});_0x1211c1[_0x58fa31(0x2aa)](_0x456e52),console[_0x58fa31(0x2cd)]('[okdb-cluster]\x20worker\x20pid='+_0x456e52+_0x58fa31(0xf8)+(_0x3d25c3??'?')+_0x58fa31(0x109)+(_0x58fa31(0xbc)+_0x157ccc+_0x58fa31(0xe8)+(_0x50625d??_0x58fa31(0x256))+_0x58fa31(0x1e6)+_0x1211c1[_0x58fa31(0x2e3)]+_0x58fa31(0xb2))),_0x2f5b63();if(_0x3fe2c6||_0x3d25c3==null)return;const _0x449a0d=_0x2524f7['get'](_0x3d25c3);if(!_0x449a0d||_0x449a0d['dead'])return;const _0x3d62f2=Date[_0x58fa31(0x24a)]();_0x449a0d['deaths'][_0x58fa31(0x1a0)](_0x3d62f2),_0x449a0d['deaths']=_0x449a0d[_0x58fa31(0x214)][_0x58fa31(0x2c0)](_0x29bb21=>_0x3d62f2-_0x29bb21<=_0x11cbb8);if(_0x449a0d[_0x58fa31(0x214)][_0x58fa31(0x17e)]>=_0x2ba25e){_0x449a0d[_0x58fa31(0x290)]=!![],console[_0x58fa31(0x277)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x3d25c3+_0x58fa31(0x22a)+_0x449a0d[_0x58fa31(0x214)][_0x58fa31(0x17e)]+'\x20times\x20in\x20'+(_0x11cbb8+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x1211c1[_0x58fa31(0x2e3)]+'\x20worker(s)\x20still\x20serving'));return;}_0x449a0d['consecutiveFailures']++;const _0x4eb1ad=Math['min'](_0x112ca3,_0x298871*0x2**(_0x449a0d['consecutiveFailures']-0x1));console[_0x58fa31(0x2cd)](_0x58fa31(0x1b9)+_0x3d25c3+'\x20in\x20'+_0x4eb1ad+'ms\x20(attempt\x20'+_0x449a0d[_0x58fa31(0xa9)]+')'),_0x449a0d[_0x58fa31(0x1f6)]=setTimeout(()=>{const _0x5cd895=_0x58fa31;_0x449a0d['respawnTimer']=null;if(_0x3fe2c6||_0x449a0d[_0x5cd895(0x290)])return;const _0xca6bab=_0x583836(_0x3d25c3);_0xca6bab[_0x5cd895(0x1a6)](_0x5cd895(0xb4),()=>{const _0x4c20bc=_0x5cd895;if(_0x2524f7['get'](_0x3d25c3)===_0x449a0d)_0x449a0d[_0x4c20bc(0xa9)]=0x0;});},_0x4eb1ad),_0x449a0d[_0x58fa31(0x1f6)][_0x58fa31(0x13e)]?.();});const _0x7b7f11=[..._0x1211c1[_0xf4cfb0(0x114)]()];console[_0xf4cfb0(0x2cd)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+_0xf4cfb0(0x2c3)+_0xfd60e9+_0xf4cfb0(0x1ac)+_0x3eae0a+':\x20'+('['+_0x7b7f11[_0xf4cfb0(0x20d)](',\x20')+']'));const _0x5c79fe={'_isClusterController':!![],'port':_0x3eae0a,'primaryOkdb':_0x4720a9??null,'status'(){const _0x2d70a1=_0xf4cfb0;return{'clustered':!![],'primaryPid':process[_0x2d70a1(0x11d)],'port':_0x3eae0a,'primaryRole':_0x4720a9?.[_0x2d70a1(0x119)]??null,'processorPid':null,'supervisorPid':process[_0x2d70a1(0x11d)],'workers':[..._0x1211c1[_0x2d70a1(0x2e6)]()]['map'](({worker:_0x4169de})=>({'pid':_0x4169de[_0x2d70a1(0x13a)][_0x2d70a1(0x11d)],'id':_0x4169de['id'],'dead':_0x4169de[_0x2d70a1(0x267)]()}))};},async 'close'(){const _0xf95f80=_0xf4cfb0;_0x3fe2c6=!![];for(const _0x182306 of _0x2524f7[_0xf95f80(0x2e6)]()){_0x182306[_0xf95f80(0x290)]=!![],_0x182306['respawnTimer']&&(clearTimeout(_0x182306[_0xf95f80(0x1f6)]),_0x182306[_0xf95f80(0x1f6)]=null);}clearInterval(_0x4e6e77);_0x18d9d7&&(clearTimeout(_0x18d9d7),_0x18d9d7=null);_0x4107ac[_0xf95f80(0x191)]('message',_0x550f66),_0x4107ac[_0xf95f80(0x191)](_0xf95f80(0x25d),_0xcd6a45),_0x4720a9?.['events']?.[_0xf95f80(0x191)]?.(_0x10044b[_0xf95f80(0x1ab)],_0x5b32d7);if(_0x4720a9?.[_0xf95f80(0x1f9)]?.[_0xf95f80(0x191)])for(const {event:_0x1fb7f5,handler:_0x35723a}of _0xbdb097){try{_0x4720a9[_0xf95f80(0x1f9)][_0xf95f80(0x191)](_0x1fb7f5,_0x35723a);}catch{}}_0xbdb097[_0xf95f80(0x17e)]=0x0;const _0x1795d2=[..._0x1211c1[_0xf95f80(0x2e6)]()][_0xf95f80(0x173)](({worker:_0x14d71c})=>_0x14d71c);if(_0x1795d2[_0xf95f80(0x17e)]===0x0)return;await Promise[_0xf95f80(0xc5)](_0x1795d2[_0xf95f80(0x173)](_0x3cc97b=>new Promise(_0xc376e1=>{const _0x22757a=_0xf95f80;if(_0x3cc97b[_0x22757a(0x267)]()){_0xc376e1();return;}let _0x327ac1=![];const _0x32bd53=()=>{if(_0x327ac1)return;_0x327ac1=!![];if(_0x3442c9)clearTimeout(_0x3442c9);_0xc376e1();};_0x3cc97b[_0x22757a(0x1a6)](_0x22757a(0x13b),_0x32bd53);const _0x3442c9=setTimeout(()=>{const _0x2f41bb=_0x22757a;try{_0x3cc97b[_0x2f41bb(0x13a)][_0x2f41bb(0x209)]();}catch{}},_0x23daec+0x1f4);_0x3442c9['unref']?.();try{_0x3cc97b[_0x22757a(0x17d)]();}catch{try{_0x3cc97b[_0x22757a(0x13a)][_0x22757a(0x209)]();}catch{}}})));}};return _0x5c79fe;}async function _0x49ca77({makeOkdb:_0x3d8fa2,port:_0x2aa4b3}){const _0x5edcd4=_0x3c1326,_0x2c167b=await _0x3d8fa2();return _0x5a181e(_0x2c167b),_0x2c167b['http'][_0x5edcd4(0xf4)](_0x2aa4b3);}function _0x5a181e(_0x324f28){const _0x5a02d5=_0x3c1326;if(!_0x324f28||_0x324f28['_clusterWorkerAttached'])return;_0x324f28['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x514158}=requireOkdbChangefeed(),_0x5ba487=_0x324f28[_0x5a02d5(0xc3)];if(_0x5ba487&&typeof _0x5ba487[_0x5a02d5(0x130)]===_0x5a02d5(0x18c)){const _0x4504ca=new _0x514158(_0x324f28);_0x4504ca[_0x5a02d5(0x177)](),_0x5ba487[_0x5a02d5(0x130)](_0x4504ca),_0x324f28[_0x5a02d5(0x2db)]=_0x4504ca;}}catch(_0x567922){_0x324f28[_0x5a02d5(0x2cd)]?.[_0x5a02d5(0x26f)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x567922?.[_0x5a02d5(0x25d)]??_0x567922),{'feature':_0x5a02d5(0x1c7)});}const _0x4d37b0=_0x4fff9c=>{const _0x19c4f2=_0x5a02d5;if(!_0x4fff9c||typeof _0x4fff9c!=='object'||_0x4fff9c[_0xa47e1c]==null)return;if(_0x4fff9c[_0xa47e1c]===_0x9715ae)try{_0x324f28['_adminRelay']?.['pushEphemeral']?.(_0x4fff9c[_0x19c4f2(0x227)],_0x4fff9c[_0x19c4f2(0xb3)]);}catch{}};process['on'](_0x5a02d5(0x25d),_0x4d37b0),_0x324f28[_0x5a02d5(0x28a)]=_0x4d37b0;{let _0x44dd92=process[_0x5a02d5(0x16c)](),_0x1d911d=Date[_0x5a02d5(0x24a)]();const _0x30b52b=()=>{const _0x4b4a6a=_0x5a02d5;if(typeof process[_0x4b4a6a(0xe9)]!==_0x4b4a6a(0x18c)||!process['connected'])return;const _0x4c8194=Date[_0x4b4a6a(0x24a)](),_0x455284=process[_0x4b4a6a(0x16c)](),_0x4cedeb=(_0x4c8194-_0x1d911d)*0x3e8,_0xa92649=_0x455284['user']-_0x44dd92[_0x4b4a6a(0x10c)]+(_0x455284['system']-_0x44dd92[_0x4b4a6a(0x1fd)]),_0x1f9d33=_0x4cedeb>0x0?Math[_0x4b4a6a(0x22d)](0x64,Math['round'](_0xa92649/(_0x4cedeb*(_0x623a23[_0x4b4a6a(0x206)]()[_0x4b4a6a(0x17e)]||0x1))*0x64)):0x0;_0x44dd92=_0x455284,_0x1d911d=_0x4c8194;const _0x209d07=process[_0x4b4a6a(0xc2)]();let _0x48ae1b=null;try{_0x48ae1b=_0x324f28[_0x4b4a6a(0x119)]?.['processors']?_0x324f28[_0x4b4a6a(0x2bd)]?.[_0x4b4a6a(0x13d)]?.()??null:null;}catch{}try{process['send']({[_0xa47e1c]:_0x477b24,'stats':{'rss':_0x209d07[_0x4b4a6a(0xd5)],'heapUsed':_0x209d07[_0x4b4a6a(0x1f2)],'heapTotal':_0x209d07[_0x4b4a6a(0x2dd)],'external':_0x209d07[_0x4b4a6a(0x189)],'cpuPct':_0x1f9d33,'cpuWindowMs':Math[_0x4b4a6a(0x24b)](_0x4cedeb/0x3e8)||null},'processing':_0x48ae1b});}catch{}},_0x199968=Math[_0x5a02d5(0x2bc)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x1bc8c2=setInterval(_0x30b52b,_0x199968);_0x1bc8c2[_0x5a02d5(0x13e)]?.(),_0x30b52b();for(const _0x2ff64b of[_0x5a02d5(0xc8),'processor:resumed']){_0x324f28[_0x5a02d5(0x1f9)]?.['on']?.(_0x2ff64b,()=>{try{_0x30b52b();}catch{}});}}let _0x26d306=![];const _0x4a3e2d=async _0x4c500d=>{const _0x433aa5=_0x5a02d5;if(_0x26d306)return;_0x26d306=!![];const _0x4eba93=setTimeout(()=>process[_0x433aa5(0x13b)](_0x4c500d),_0x23daec);_0x4eba93[_0x433aa5(0x13e)]?.();try{await _0x324f28[_0x433aa5(0x2b1)]?.();}catch{}process[_0x433aa5(0x13b)](_0x4c500d);};process['on'](_0x5a02d5(0x17d),()=>_0x4a3e2d(0x0));if(process[_0x5a02d5(0xe9)]&&!process[_0x5a02d5(0xfd)])_0x4a3e2d(0x0);if(process[_0x5a02d5(0x125)]!==_0x5a02d5(0x225)){const _0x4a3f5a=setInterval(()=>{const _0x332d46=_0x5a02d5;if(process[_0x332d46(0xfe)]===0x1)_0x4a3e2d(0x0);},_0x43acc7);_0x4a3f5a[_0x5a02d5(0x13e)]?.(),_0x324f28['_clusterOrphanWatch']=_0x4a3f5a;}}return okdbCluster={'runClustered':_0x40dc2f,'attachWorkerCluster':_0x5a181e},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x4ed60c=_0x5e06fa;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x4e679c=require$$0$5,{attachWorkerCluster:_0x524c2b}=requireOkdbCluster();async function _0x52b2d3(){const _0x2822b9=_0x5881,_0x4c6fbd=process.env.OKDB_HTTP_CHILD;if(!_0x4c6fbd)throw new Error(_0x2822b9(0x255));const {rootPath:_0xd9ac6f,port:_0x45ca6c,options:options={},logLevel:logLevel='info'}=JSON[_0x2822b9(0x14d)](_0x4c6fbd);if(!_0xd9ac6f||!_0x45ca6c)throw new Error(_0x2822b9(0x18b));const _0x194504=new _0x4e679c(_0xd9ac6f,{...options,'engines':![],'processors':![],'compaction':![]});_0x194504[_0x2822b9(0x2cd)][_0x2822b9(0x25a)]?.();const _0x3e8c05=process.env.OKDB_CLUSTER_SLOT??'?',_0x27805e={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x324eb4=_0x27805e[logLevel]??_0x27805e['info'];_0x194504[_0x2822b9(0x2cd)][_0x2822b9(0xaf)](_0xca5fe6=>{const _0x560092=_0x2822b9;if((_0x27805e[_0xca5fe6['level']]??0x1)<_0x324eb4)return;try{process[_0x560092(0xe9)]?.({'__okdbCluster':_0x560092(0x2cd),'slot':_0x3e8c05,'pid':process[_0x560092(0x11d)],'entry':_0xca5fe6});}catch{}}),await _0x194504[_0x2822b9(0x2e5)](),_0x524c2b(_0x194504),await _0x194504[_0x2822b9(0x27f)][_0x2822b9(0xf4)](_0x45ca6c);}return _0x52b2d3()[_0x4ed60c(0x230)](_0x3389f3=>{const _0x38d7ae=_0x4ed60c;try{process[_0x38d7ae(0xe9)]?.({'__okdbCluster':_0x38d7ae(0x2cd),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x38d7ae(0x11d)],'entry':{'level':_0x38d7ae(0x277),'msg':_0x38d7ae(0x246)+(_0x3389f3?.[_0x38d7ae(0x25d)]??_0x3389f3)}});}catch{}process[_0x38d7ae(0x13b)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);function _0x2913(){const _0x1063da=['cluster-wide','FTS_REGISTERED','_flushTimer','prependListener','\x20worker\x20slot=','_publishFailWarned','runtimeProcessesView','lifecycle','toFixed','push','processKey','killable','processors','node','SYSTEM_POKE','once','\x0a\x20\x20\x20\x20\x20\x20','meta','includes','registerIndex','SYSTEM_PROC','\x20HTTP\x20server(s)\x20on\x20port\x20','_handlePoke','\x20sync','_processStartedAt','maxExtra','procmodeack/','maxMs','engines','list','_cursors','_putRowSync','worker','ref:violation','[okdb-cluster]\x20respawning\x20worker\x20slot=','recent\x20writes\x20(newest\x20first)','\x20===','--watch','ttlMs','namespace','_assertUsable','_nodeDead','getRange','online','ensureType','parkedNow','_onPending','135947ifukcg','cluster','_buckets','3QbjGpM','_nodeDbFor','randomUUID','migrations','ITEM_PENDING','resolve','inspect','_publishNow','fn-runner','note','_putRowAsync','reset','_activateProcesses','sync','path','crypto','index:drop','processor:retry','_selfKey','okdb','1ofN:','ESRCH','fts:reset','SYSTEM_STOPPED','_coordinator','compact','_enableChangelog','node:perf_hooks','version',');\x20','claims','release','_quantum','object','claimGated','_outstanding','registry\x20heartbeat\x20skipped\x20(writer=','FTS_RESET','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','system:ready','index:registered','heapUsed','_admissionStarted','_durs','call','respawnTimer','_inflight','MAX_POOL_HOLDS','events','reduce','removeNode','ttl:clear','system','embedded','startedAt','index:progress','default','noteListenAddr','_wantDbOf','INDEX_READY','node:events','cpus','processor','ms/','kill','_migrateVocab','ms\x20max=','removeSync','join','REMOVE','_singletonLocks','some','_lock','_markSeen','startHeartbeat','deaths','stats','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','find','startsWith','system:stopped','singletonClaims','heartbeatMs','bus:proc','_openEnvLazy','write','sync:apply','mode','processor:resumed','removeSupervisedChild','unclaimed','entry','win32','commitP99Ms','event','ENV_CLOSING_RETRY','_refreshDesiredSnapshot','\x20died\x20','listenAddr','ttl:set','min','type','view','catch','_isStale','_held','_startAdmission','fork','count','_singletonLock','appendFileSync','_isWriter','setOwnMeta','cli','force','setLogger','_systemEnv','participate','processor:error','primary','index:reset','_rawDb','INDEX_REGISTERED',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_ownMeta','http\x20worker\x20child\x20failed:\x20','SIGKILL','value','txn:start','now','round','entries','_onItem','license:activated','childTransaction','_threadStats','mean','_children','nodeKey','openDB','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','none','\x20—\x20','feed:','writerStatus','detachConsole','_log','_cmd','message','add','threads','envsOpen','INDEX_RESET','register','dropType','nodesView','_maybePublish','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','isDead','okdb-diag.','_key','publishOwnRow','standalone','ref:violation_resolved','__okdbCluster','beforeWrite','warn','ttl:expired','caps','slice','_removeRowAsync','reportThreadStats','\x20@\x20','shift','error','seq','decommissioning','floor','holder','\x20pid=','closing','__vocab/version','http','ITEM_REMOVE','isPrimary','getProcess','load','ITEM_UPDATE','transaction','system:poke','1295802EPkkDl','_versionSkewWarned','trim','_clusterOnMessage','\x0a===\x20OKDB_DIAG\x20','dumpedAt','[okdb-cluster]\x20worker\x20pid=','okdb-writer:\x20env\x20closing\x20—\x20retry','tryAcquire','dead','heldBy','workersConfigured','sandbox','cpuPct','percentile','building','_lockDb','null','uncaughtException','_bpParkedTotal','resetting','started','state','perf_hooks','dedupeMax','11reTRmR','_desired','setDesired','_listenAddr','number','supervisorKey','listNodes','_closed','\x20writer{depth=','258NpDLFV','delete','_bpWaiters','_done','getClock','_db','publishChildRow','_pendingLocal','close','recordWrite','repeat','withPoolHold','\x20│\x20','offWindow','_drain','_role','\x20drainAge=','_getType','next','max','processes','~lock','_participate','filter','_rowKey','item:create','\x20forked\x20','slotKey','_buildChildRow','transactionSync','__okdbSlot','inflightAgesMs','fanout','waiting','indexOf','_seen','log','_drainOne','status','loop-lag','epoch','~processes:desired','12968000mFTCOi','stack','fts:registered','stop','raw-put','license:added','code','_writer','_changefeed','ITEM_CREATE','heapTotal','remove','[okdb-cluster]\x20','field:resolver_registered','_started','async','size','_heartbeatTimer','open','values','_heartbeatInFlight','_dedupeMax','~processes','_isReader','stopped','_sandbox','_timer','string','consecutiveFailures','_startHeartbeat','has','_rootDb','running','raw-remove','attach','_statusEnv','_pending','\x20worker(s)\x20remaining','data','listening','freeze','toISOString','ms\x20busy=','_onTick','kind','license:invalid','reap','(code=','enable','instanceId','ORPHAN\x20(env-closed\x20write)','\x20statusEnv=','rows=','memoryUsage','_adminRelay','isActive','all','bus:type_drop','updatedAt','processor:paused','unique:violation','stderr','creating','depth','isEnabled','abs','enabled','prototype','bus:env_release','clusterStatusView','setupPrimary','txn:end','rss','index:ready','race','stringify','./okdb','then','_nestedTotal','__esModule','stopping','change','_flushDebounce','\x20parkedNow=','_admissionTimer','extend','clear','INDEX_PROGRESS','\x20\x20(no\x20env\x20draining)','item:remove','_onPoke',',\x20signal=','send','http-server','--print','get','processor:ready','_wantDbHandle','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','ms\x20on\x20env=','_scheduleFlush','reject','system:proc','listen','_lockDbOf','ms\x20activeWriters=','unique:violation_resolved','\x20(slot=','system:type_drop','ms\x20env=','host','registerFts','connected','ppid','\x20ipc\x20error:\x20','_ensureDesired','sort','workers','_onProcEvent','disable','_holderDead','processing','_handleInProcess','rowKey',')\x20exited\x20','isWorker','type:drop','user','processorId','processor:progress','_handlePending','2.6.3','_highWater','_dedupeKey','_supervisorKey','keys','_wantDb','_desiredOverlay','updateSupervisedChildStats','options','role','_released','decommission','system:clock_change','pid','confirm','execArgv','putNode','committed','4301284qVUrRl','_lastCpuPct','slot','platform','emit','_draining','_report','schema:set','ingest','compaction','_heldTotal','okdb-lock:\x20env\x20closed','license:removed','_onStop','attachFeed','_groupByProcess','quantum','_buildOwnRow','.log','ephemeral','env','split','allSettled','_envs','process','exit','getDesired','_buildProcessingFacet','unref','--test','ms\x20p99=','_collectWriterFacet','splice','cursorKey','_nodeDbCache','env:removed','selfKey','flushDebounce','children','resetReadTxn','hasDesired','_kind','_collectSingletonClaims','parse','_nestedWarned','uptime','processingSig','1548080gHqGOr','item:update','getChanges','instances','txn:rollback','putSync','single','commit','_lastPublishAt','_windowCbs','_startedAt','144epwLBv','_nodeDb','fts:drop','_acquiredAt','test','processingStatusView','isWanted','oldestPendingMs','_lastCpuUsage','hostname','createEnvironment','stopHeartbeat','~processes:cmd','_baselines','node/','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','cpuUsage','registry\x20publish\x20failing:\x20','expiresAt','exports','put','_instanceId','_lastCpuWindowMs','map','assign','_hbTimer','\x20while\x20this\x20process\x20runs\x20','start','name','bumpCmd','set',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','markClosed','disconnect','length','addSupervisedChild','drain','bus:poke','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','getCmd','3131346xWfIkY','okdb-writer[','onWindow','acquiredAt','type:registered','external','_committed','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','function','_enqueuedAt','deregisterSelf','isConnected','--eval','off','390944NcnhAE','replace','_lastCpuAt','_sampleOwnStats','afterWrite'];_0x2913=function(){return _0x1063da;};return _0x2913();}module[_0x5e06fa(0x16f)]=okdbHttpWorkerChild;