@kedem/okdb 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 'use strict';const _0x22d7b4=_0x23ad;(function(_0x4a2553,_0x53ed29){const _0x5ec238=_0x23ad,_0x5f29fa=_0x4a2553();while(!![]){try{const _0x62a821=-parseInt(_0x5ec238(0x1f1))/0x1*(parseInt(_0x5ec238(0x28c))/0x2)+parseInt(_0x5ec238(0xd3))/0x3*(parseInt(_0x5ec238(0x2ab))/0x4)+parseInt(_0x5ec238(0x14d))/0x5*(parseInt(_0x5ec238(0x191))/0x6)+parseInt(_0x5ec238(0xf0))/0x7+parseInt(_0x5ec238(0x1b3))/0x8*(parseInt(_0x5ec238(0x283))/0x9)+parseInt(_0x5ec238(0x230))/0xa+-parseInt(_0x5ec238(0x202))/0xb;if(_0x62a821===_0x53ed29)break;else _0x5f29fa['push'](_0x5f29fa['shift']());}catch(_0x3deb00){_0x5f29fa['push'](_0x5f29fa['shift']());}}}(_0xd49b,0x85b59));var require$$0$5=require(_0x22d7b4(0x1c2)),require$$1$1=require(_0x22d7b4(0xf1)),require$$1=require(_0x22d7b4(0x2d0)),require$$0$3=require('os'),require$$2=require('crypto'),require$$0=require(_0x22d7b4(0xcb)),require$$0$2=require(_0x22d7b4(0x1c7)),require$$0$1=require('fs'),require$$0$4=require(_0x22d7b4(0x1ed));function getDefaultExportFromCjs(_0x44aed7){const _0x77c688=_0x22d7b4;return _0x44aed7&&_0x44aed7['__esModule']&&Object[_0x77c688(0x103)]['hasOwnProperty'][_0x77c688(0x115)](_0x44aed7,_0x77c688(0x2b0))?_0x44aed7[_0x77c688(0x2b0)]:_0x44aed7;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2d4452=_0x22d7b4;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x593b09={'PUT':'put','REMOVE':_0x2d4452(0x17d),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x2d4452(0x27c),'INDEX_RESET':_0x2d4452(0x159),'TYPE_REGISTER':_0x2d4452(0x29d),'TYPE_DROP':_0x2d4452(0x2d4),'FTS_REGISTER':_0x2d4452(0xee),'FTS_DROP':_0x2d4452(0x1b9),'FTS_RESET':_0x2d4452(0x112),'SCHEMA_SET':_0x2d4452(0x10e),'SCHEMA_DROP':_0x2d4452(0xcc),'TTL_SET':_0x2d4452(0x233),'TTL_CLEAR':_0x2d4452(0xd8)},_0x37dfcc={'SYSTEM_READY':_0x2d4452(0x130),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x2d4452(0x186),'SYSTEM_POKE':_0x2d4452(0x101),'SYSTEM_DRAIN':_0x2d4452(0x16b),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x2d4452(0x258),'ITEM_CREATE':_0x2d4452(0x15d),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':_0x2d4452(0x28d),'INDEX_READY':_0x2d4452(0x140),'INDEX_PROGRESS':_0x2d4452(0x14c),'VIEW_PROGRESS':_0x2d4452(0x21c),'INDEX_DROP':_0x2d4452(0x2db),'INDEX_REGISTERED':_0x2d4452(0x175),'FTS_REGISTERED':_0x2d4452(0xf6),'FTS_DROP':'fts:drop','FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x2d4452(0x10d),'UNIQUE_VIOLATION':_0x2d4452(0xe7),'UNIQUE_VIOLATION_RESOLVED':_0x2d4452(0x28e),'REF_VIOLATION':_0x2d4452(0x2a5),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x2d4452(0xfe),'TXN_START':_0x2d4452(0x177),'TXN_END':'txn:end','TXN_ROLLBACK':_0x2d4452(0x267),'TYPE_REGISTERED':_0x2d4452(0x1f7),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':_0x2d4452(0x155),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':'ttl:expired','TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x2d4452(0x20a),'LICENSE_ADDED':_0x2d4452(0x252),'LICENSE_ACTIVATED':_0x2d4452(0x263),'LICENSE_REMOVED':_0x2d4452(0x25b)},_0x458a2b={'CREATING':'creating','RESETTING':'resetting','READY':_0x2d4452(0x1c5),'DROPPING':_0x2d4452(0x270),'WAITING':_0x2d4452(0x28f)},_0x173534={'CREATED':_0x2d4452(0x20d),'STARTING':'starting','STARTED':_0x2d4452(0x25e),'STOPPING':'stopping','STOPPED':'stopped'},_0x40233b={'CREATING':'creating','READY':'ready','HALTED':'halted','STOPPED':_0x2d4452(0x1cf),'RESETTING':_0x2d4452(0xda)},_0x1cdb25=Object[_0x2d4452(0x1b4)]({'POKE':_0x2d4452(0x193),'DRAIN':_0x2d4452(0x19a),'TYPE_DROP':_0x2d4452(0x2d1),'PROC':_0x2d4452(0x19b),'ENV_RELEASE':_0x2d4452(0xe1)});return okdbEnums={'BUS_EVENTS':_0x1cdb25,'CHANGE_ACTIONS':_0x593b09,'EVENTS':_0x37dfcc,'INDEX_STATE':_0x458a2b,'OKDB_STATE':_0x173534,'VIEW_STATE':_0x40233b},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function _0xd49b(){const _0x4fab52=['resetFts','next','_heartbeatTimer','call','_timer','\x20pid=','isPrimary','ms\x20(attempt\x20','INDEX_PROGRESS','_closed','addSupervisedChild','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','_committed','emit','sync','_startedAt','_drain','FTS_REGISTERED','publishChildRow','lifecycle','put','migrations','_versionSkewWarned','_maybePublish','_publishNow','cli','workersConfigured','ms\x20activeWriters=','~processes:cmd','_admissionTimer','system:ready','maxMs','killable','INDEX_READY','processingStatusView','_handlePoke','cpuUsage','write','processorsView','events','http-server','instanceId','copy','okdb','_role','_heartbeatInFlight','index:ready','\x20worker(s)\x20still\x20serving','ITEM_UPDATE',')\x20exited\x20','bumpCmd','add','raw-put','reset','startedAt','_admissionStarted','consecutiveFailures','stats','index:progress','860InjNCy','meta','randomUUID','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','user','mkdirSync','registry\x20heartbeat\x20skipped\x20(writer=','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','env:removed','function','clear','http','resetIndex','extend','kill','_children','item:create','change','updateSupervisedChildStats','some','_envs','cluster-wide','isDead','cursorKey','startsWith','http\x20worker\x20child\x20failed:\x20','async','reduce','uptime','isWanted','system:drain','busy','_flushDebounce','rss','entry','standalone','_draining','_started','dumpedAt','slotKey','index:registered','note','txn:start','claims','dedupeMax','processorId','onWindow','_supervisorKey','remove','_ensureDesired','_threadStats','unclaimed','split','\x20times\x20in\x20','SYNC_COMMITS','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','release','system:clock_change','SYSTEM_STOPPED','map','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','kind','_lock','acquiredAt','cpus','find','\x20===','info','2232pUdULI','markClosed','bus:poke','once','_isReader','setDesired','ms\x20env=','_isStale','_processStartedAt','bus:drain','bus:proc','listen','stderr','\x20phase=','seq','_flushTimer','ms\x20busy=','_collectWriterFacet','_cursors','_lastCpuWindowMs','_lastCpuAt','_startHeartbeat','embedded','_migrateVocab','toISOString','_nodeDb','SYSTEM_POKE','_outstanding','_groupByProcess','~processes:desired','processor:progress','disable','disconnect','\x20statusEnv=','7871200NePliZ','freeze','listening','compaction','round','unref','dropFts','_activateProcesses','processing','_onStop','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','repeat','get','online','processor:error','./okdb','_inflight','processor:paused','ready','filter','perf_hooks','data','caps','_durs','_ownMeta','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','instances','warn','stopped','putNode','_enableChangelog','_desired','_dedupeKey','_singletonLocks','host','rows=','recordWrite','transactionSync','code','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_rawDb','send','values','heapTotal','transaction','slice','epoch','selfKey','_onItem','supervisorKey','ms\x20p99=','_nodeDbCache','inflightAgesMs','VIEW_PROGRESS','listNodes','flushDebounce','(code=','_startAdmission','node:events','reap','removeSync','_cmd','1bUAuRH','signalWant','_key','[okdb-cluster]\x20worker\x20pid=','CHANGEFEED_QUANTUM','_highWater','type:registered','inspect','size','includes','running','_drainOne','test','options','_pending','rowKey','processor:ready','11340681RrLoxe','register','ms/','clearThreadStats','none','_report','race','_seen','license:invalid','indexOf','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','created','processes','_sampleOwnStats','version','state','_markSeen','max','sandbox','list','keys','hostname','trim','listDesired','committed','decommissioning','view:progress','getClock','liveThreadStats','_listenAddr','_bpParkedTotal','shift','_hbTimer','stopHeartbeat','children','_removeRowAsync','_writer','listAll','_acquiredAt','_refreshDesiredSnapshot','_clusterOnMessage','processKey','system','functions','SWAP',':want','1720880VmxZpz','error','off','setTtl','inst:','replace','_onPoke','primary','string','external','_nodeDbFor','_wantDbHandle','mode','_baselines','startHeartbeat','reportThreadStats','fast','ms\x20max=','push','type','_clusterOrphanWatch','flushed','_coordinator','resolve','listenAddr','min','depth','_buildProcessingFacet','ms\x20mean=','getDesired','allSettled','ephemeral','_db','percentile','license:added','number','has','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','(worst\x20','abs','system:bus_state_change','floor','exit','license:removed','_onTick','node','started','_kind','isActive','process\x20','getCmd','license:activated','ppid','join','uncaughtException','txn:rollback','_collectSingletonClaims','oldestPendingMs','getRange','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','firstTs','setLogger','respawnTimer','load','dropping','single','detachConsole','length','_holderDead','prependListener','[okdb-cluster]\x20','raw-remove','building',');\x20','env','toFixed','registerIndex','createEnvironment','registry-publish','tierList','parkedNow','now','threads','9mkpQQB','\x20(durable\x20desired-state)','status','_windowCbs','resetReadTxn','view','ttlMs','commit','_systemEnv','271756sBjCGM','index:reset','unique:violation_resolved','waiting','_singletonLock','_sandbox','maxExtra','_done','pushEphemeral','memoryUsage','set','mean','stop','isEnabled','all','decommission','unhandledRejection','registerType','object','okdb-writer:\x20env\x20closing\x20—\x20retry','win32','then','\x20worker(s)\x20remaining','ITEM_REMOVE','hasDesired','ref:violation','holder','_lastCpuUsage','singletonClaims','hasType','name','4Bafnof','level','fanout','open','[okdb-cluster]\x20respawning\x20worker\x20slot=','default','_quantum','_clusterWorkerAttached','enable','\x20parkedNow=','_nodeDead','\x20\x20#','start','role','_onProcEvent','ORPHAN\x20(env-closed\x20write)','treeView','writerStatus','_openEnvLazy','beforeWrite','_lastPublishAt','loop-lag','event','cluster:','_dedupeMax','fromEntries','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','ENV_CLOSING_RETRY','log','loop-lag\x20','claimGated','openDB','\x20died\x20','_buildChildRow','catch','stack','tryAcquire','path','bus:type_drop','_changefeed','process','dropType','_buildOwnRow','setupPrimary','splice','_isWriter','_scheduleFlush','_enqueuedAt','index:drop','label','\x20forked\x20','pid','enabled','heartbeatMs','count','expiresAt','setOwnMeta','_servingEngines','entries','removeNode','flushLmdb','\x20sync','\x20@\x20','ingest','sort','isConnected','nodeKey','noteListenAddr','attach','ITEM_CREATE','_lockDb','offWindow','INDEX_RESET','\x20ipc\x20error:\x20','\x20HTTP\x20server(s)\x20on\x20port\x20','draining','processor:resumed','connected','SYSTEM_PROC','2.1.0','from','queue-worker','_wantDb','node:perf_hooks','dropSchema','INDEX_REGISTERED','_putRowSync','_rowKey','_handleInProcess','_selfKey','updatedAt','450339FYtHSY','heapUsed','_desiredOverlay','deaths','_adminRelay','clearTtl','\x20worker\x20slot=','resetting','\x20(slot=','_released','\x20writer{depth=','error:\x20','_bpWaiters','afterWrite','bus:env_release','putSync','attachFeed','parse','REMOVE','procmodeack/','unique:violation','\x20\x20env=','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','ms\x20on\x20env=','ESRCH','hard-killed','processors','registerFts','slot','2411059QJygxf','cluster','~lock','_statusEnv','~processes','\x0a===\x20OKDB_DIAG\x20','fts:registered','namespace','engines','message','worker','exports','envsOpen','_rootDb','sync:apply','__vocab/version','platform','system:poke','delete','prototype','\x20│\x20','dead','_log','_lastCpuPct','_buckets','--test','--print','commitsPerSec','value','schema:drop','setSchema','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_publishFailWarned','\x20oldestPendingMs='];_0xd49b=function(){return _0x4fab52;};return _0xd49b();}function requireOkdbLoopMonitor(){const _0x2931ab=_0x22d7b4;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x361d87,performance:_0x2077cc}=require$$0,_0x38140b=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0xf3582c=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x512947=process.env.OKDB_LOOP_LAG_ALL==='1',_0x903509=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x5d06b5{constructor(){const _0x1a6ce9=_0x23ad;this[_0x1a6ce9(0x2df)]=_0x38140b,this[_0x1a6ce9(0x108)]=new Map(),this['_h']=null,this[_0x1a6ce9(0x116)]=null,this[_0x1a6ce9(0x172)]=![],this[_0x1a6ce9(0x106)]=(_0x19abd5,_0x15ccbc)=>process[_0x1a6ce9(0x19d)][_0x1a6ce9(0x137)](_0x19abd5+(_0x15ccbc?'\x20'+JSON['stringify'](_0x15ccbc):'')+'\x0a');}[_0x2931ab(0x281)](){const _0x211367=_0x2931ab;return _0x2077cc[_0x211367(0x281)]();}[_0x2931ab(0x26d)](_0x356f5d){const _0x566022=_0x2931ab;if(typeof _0x356f5d===_0x566022(0x156))this[_0x566022(0x106)]=_0x356f5d;}[_0x2931ab(0x176)](_0x3a8c4f,_0x1b3c06,_0x1908b8){const _0x2ce2a0=_0x2931ab;if(!this[_0x2ce2a0(0x2df)])return;let _0x592113=this[_0x2ce2a0(0x108)]['get'](_0x3a8c4f);!_0x592113&&(_0x592113={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x2ce2a0(0x108)][_0x2ce2a0(0x296)](_0x3a8c4f,_0x592113)),_0x592113['ms']+=_0x1b3c06,_0x592113[_0x2ce2a0(0x2e1)]+=0x1,_0x1b3c06>_0x592113[_0x2ce2a0(0x131)]&&(_0x592113['maxMs']=_0x1b3c06,_0x592113[_0x2ce2a0(0x292)]=_0x1908b8||'');}['start'](_0x36bf63){const _0x5a9f47=_0x2931ab;if(!this[_0x5a9f47(0x2df)]||this[_0x5a9f47(0x172)])return;this[_0x5a9f47(0x172)]=!![];if(_0x36bf63)this[_0x5a9f47(0x106)]=_0x36bf63;this['_h']=_0x361d87({'resolution':0xa}),this['_h'][_0x5a9f47(0x2b3)](),this['_timer']=setInterval(()=>this[_0x5a9f47(0x207)](),_0xf3582c);if(this['_timer'][_0x5a9f47(0x1b8)])this['_timer'][_0x5a9f47(0x1b8)]();}[_0x2931ab(0x17b)](_0x5a859d){const _0x1653c2=_0x2931ab;if(!this['_windowCbs'])this[_0x1653c2(0x286)]=new Set();this['_windowCbs'][_0x1653c2(0x145)](_0x5a859d);if(!this[_0x1653c2(0x172)])this[_0x1653c2(0x1ec)]();}[_0x2931ab(0x2f2)](_0x49c1e6){this['_windowCbs']?.['delete'](_0x49c1e6);}[_0x2931ab(0x1ec)](){const _0x59e2ab=_0x2931ab;if(this[_0x59e2ab(0x149)])return;this[_0x59e2ab(0x149)]=!![];!this['_h']&&(this['_h']=_0x361d87({'resolution':0xa}),this['_h'][_0x59e2ab(0x2b3)]());const _0x522ff3=_0xf3582c;this['_admissionTimer']=setInterval(()=>{const _0x16d369=_0x59e2ab,_0x54fa2e=this['_h'];if(!_0x54fa2e)return;const _0x5ce422=_0x54fa2e[_0x16d369(0x251)](0x63)/0xf4240,_0x524424=_0x54fa2e[_0x16d369(0x213)]/0xf4240,_0x579b87=_0x54fa2e[_0x16d369(0x297)]/0xf4240;_0x54fa2e['reset']();if(this[_0x16d369(0x286)])for(const _0x5de96d of this[_0x16d369(0x286)]){try{_0x5de96d({'p99Ms':_0x5ce422,'maxMs':_0x524424,'meanMs':_0x579b87,'reportMs':_0x522ff3});}catch{}}},_0x522ff3);if(this['_admissionTimer']['unref'])this[_0x59e2ab(0x12f)]['unref']();}[_0x2931ab(0x207)](){const _0x3fb4d6=_0x2931ab,_0x105619=this['_h'],_0x29db70=_0x105619['max']/0xf4240,_0xab13a0=_0x105619[_0x3fb4d6(0x251)](0x63)/0xf4240,_0x26500f=_0x105619[_0x3fb4d6(0x297)]/0xf4240;_0x105619[_0x3fb4d6(0x147)]();const _0x5eb30e=[...this[_0x3fb4d6(0x108)][_0x3fb4d6(0x2e5)]()]['map'](([_0x5c8045,_0x1b6bbd])=>({'label':_0x5c8045,..._0x1b6bbd}))[_0x3fb4d6(0x2eb)]((_0x510f4b,_0x497e1c)=>_0x497e1c['ms']-_0x510f4b['ms'])['slice'](0x0,0x8);this[_0x3fb4d6(0x108)][_0x3fb4d6(0x157)]();const _0x1e4e0d=_0x5eb30e[_0x3fb4d6(0x168)]((_0x5538a2,_0x404837)=>_0x5538a2+_0x404837['ms'],0x0),_0x4cd05f=_0x5eb30e[_0x3fb4d6(0x188)](_0x36d748=>_0x36d748[_0x3fb4d6(0x2dc)]+'='+_0x36d748['ms']['toFixed'](0x0)+_0x3fb4d6(0x204)+_0x36d748[_0x3fb4d6(0x2e1)]+(_0x36d748[_0x3fb4d6(0x131)]>0x5?_0x3fb4d6(0x256)+_0x36d748[_0x3fb4d6(0x131)][_0x3fb4d6(0x27b)](0x0)+'ms'+(_0x36d748[_0x3fb4d6(0x292)]?'\x20'+_0x36d748[_0x3fb4d6(0x292)]:'')+')':''));(_0x512947||_0x29db70>=_0x903509)&&this[_0x3fb4d6(0x106)](_0x3fb4d6(0x2c8)+_0xf3582c+_0x3fb4d6(0x241)+_0x29db70[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x1e5)+_0xab13a0[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x24c)+_0x26500f[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x1a1)+_0x1e4e0d['toFixed'](0x0)+'ms'+(_0x4cd05f['length']?_0x3fb4d6(0x104)+_0x4cd05f[_0x3fb4d6(0x265)]('\x20\x20'):''),{'feature':_0x3fb4d6(0x2c0)});if(this['_windowCbs'])for(const _0xe0d7c0 of this['_windowCbs']){try{_0xe0d7c0({'p99Ms':_0xab13a0,'maxMs':_0x29db70,'meanMs':_0x26500f,'reportMs':_0xf3582c});}catch{}}}[_0x2931ab(0x298)](){const _0x1e3000=_0x2931ab;if(this[_0x1e3000(0x116)])clearInterval(this[_0x1e3000(0x116)]);if(this['_h'])this['_h'][_0x1e3000(0x1b0)]();this[_0x1e3000(0x116)]=null,this['_h']=null,this[_0x1e3000(0x172)]=![];}}const _0xf56b53=new _0x5d06b5();if(_0xf56b53[_0x2931ab(0x2df)])_0xf56b53[_0x2931ab(0x2b7)]();return okdbLoopMonitor={'LOOP':_0xf56b53},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x45cf1a=require$$0$1,_0x646d19=require$$1;let _0x2aaa2d,_0xf0d1bd,_0x512264,_0x4dfa34,_0xcd6621,_0x8fbdf2,_0xd03a81,_0x3a19da=![];const _0x3578a2=new Set();let _0x2acfc2=null;const _0x513d7c=new Map();function _0xbd344b(){const _0x17215f=_0x23ad;if(_0x2aaa2d!==undefined)return _0x2aaa2d;_0x2aaa2d=process.env.OKDB_DIAG==='1';if(!_0x2aaa2d)return![];_0xf0d1bd=process.env.OKDB_DIAG_STACK==='1',_0x4dfa34=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x512264=new Array(_0x4dfa34),_0xcd6621=0x0,_0x8fbdf2=0x0,_0xd03a81=process.env.OKDB_DIAG_DIR||null;if(_0xd03a81)try{_0x45cf1a[_0x17215f(0x152)](_0xd03a81,{'recursive':!![]});}catch{}return!![];}function _0x450031(){return _0x2aaa2d===undefined?_0xbd344b():_0x2aaa2d;}function _0x4eba4a(_0x56066a,_0xa0b8e8){const _0x20768b=_0x23ad;if(_0x2aaa2d===undefined?!_0xbd344b():!_0x2aaa2d)return;let _0x48d353;if(_0xf0d1bd){const _0x5ec2be=new Error()['stack']||'';_0x48d353=_0x5ec2be[_0x20768b(0x181)]('\x0a')[_0x20768b(0x1e0)](0x3)['map'](_0x56bc48=>_0x56bc48[_0x20768b(0x218)]())[_0x20768b(0x1c6)](Boolean)[_0x20768b(0x1e0)](0x0,0x8);}_0x512264[_0xcd6621]={'seq':_0x8fbdf2++,'t':Date[_0x20768b(0x281)](),'env':_0x56066a,'kind':_0xa0b8e8||_0x20768b(0x28a),'stack':_0x48d353},_0xcd6621=(_0xcd6621+0x1)%_0x4dfa34;}function _0x57c9bf(_0x1add2f){const _0x304777=_0x23ad,_0xd222de=[];for(let _0xec3719=0x0;_0xec3719<_0x4dfa34;_0xec3719++){const _0x414d43=_0x512264[(_0xcd6621-0x1-_0xec3719+_0x4dfa34*0x2)%_0x4dfa34];if(!_0x414d43)continue;_0xd222de[_0x304777(0x242)](_0x414d43);if(_0xd222de[_0x304777(0x273)]>=_0x1add2f)break;}return _0xd222de;}function _0x480794(_0x373343){const _0x157306=_0x23ad;try{process[_0x157306(0x19d)][_0x157306(0x137)](_0x373343+'\x0a');}catch{}if(_0xd03a81)try{_0x45cf1a['appendFileSync'](_0x646d19['join'](_0xd03a81,'okdb-diag.'+process['pid']+'.log'),_0x373343+'\x0a');}catch{}}function _0x3839e1(_0x2c87f1){const _0x3bbca6=_0x23ad,_0x4658b8=_0x57c9bf(_0x2c87f1);if(!_0x4658b8[_0x3bbca6(0x273)])return _0x3bbca6(0x26b);const _0x3f67d0=Date[_0x3bbca6(0x281)]();return _0x4658b8[_0x3bbca6(0x188)](_0x3bc0ce=>{const _0x209dfc=_0x3bbca6,_0x44161c=_0x209dfc(0x2b6)+_0x3bc0ce[_0x209dfc(0x19f)]+'\x20-'+(_0x3f67d0-_0x3bc0ce['t'])+_0x209dfc(0x197)+_0x3bc0ce[_0x209dfc(0x27a)]+'\x20'+_0x3bc0ce[_0x209dfc(0x18a)];return _0x3bc0ce[_0x209dfc(0x2ce)]&&_0x3bc0ce[_0x209dfc(0x2ce)]['length']?_0x44161c+'\x0a\x20\x20\x20\x20\x20\x20'+_0x3bc0ce[_0x209dfc(0x2ce)][_0x209dfc(0x265)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x44161c;})[_0x3bbca6(0x265)]('\x0a');}function _0x5bc995(_0x26391f,_0x43c436){const _0x1cde3e=_0x23ad,_0x330416=_0x1cde3e(0xf5)+_0x26391f+_0x1cde3e(0x2e9)+new Date()[_0x1cde3e(0x1a9)]()+_0x1cde3e(0x117)+process[_0x1cde3e(0x2de)]+_0x1cde3e(0x18f),_0x5daf05=[_0x330416,_0x1cde3e(0xde)+(_0x43c436&&_0x43c436['stack']?_0x43c436[_0x1cde3e(0x2ce)][_0x1cde3e(0x181)]('\x0a')[0x0]:_0x43c436),'recent\x20writes\x20(newest\x20first)'+(_0xf0d1bd?'':_0x1cde3e(0x154))+':',_0x3839e1(0x18),_0x25db0b(),'='[_0x1cde3e(0x1be)](_0x330416[_0x1cde3e(0x273)]-0x1)];_0x480794(_0x5daf05['join']('\x0a'));}function _0x6c56ec(_0x502feb){const _0x2f9db7=_0x23ad;if(!_0x450031())return;const _0x2796c9=String(_0x502feb&&_0x502feb[_0x2f9db7(0xf9)]||_0x502feb||''),_0x584ea9=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x2f9db7(0x1fd)](_0x2796c9);_0x5bc995(_0x584ea9?_0x2f9db7(0x2ba):_0x2f9db7(0x266),_0x502feb);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x584ea9)return;try{console[_0x2f9db7(0x231)](_0x502feb&&_0x502feb[_0x2f9db7(0x2ce)]?_0x502feb[_0x2f9db7(0x2ce)]:_0x502feb);}catch{}process['exit'](0x1);}function _0x48eff7(_0x110bd4){const _0x41f3ec=_0x23ad;if(!_0x450031())return;const _0xdaae40=String(_0x110bd4&&_0x110bd4['message']||_0x110bd4||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0xdaae40)&&_0x5bc995(_0x41f3ec(0x189),_0x110bd4);}function _0x25db0b(){const _0x1c15e3=_0x23ad,_0x1848d0=[_0x1c15e3(0x10f)];let _0x80a65f=![];for(const _0x3ce420 of _0x3578a2){const _0x1ee3fe=_0x3ce420&&_0x3ce420['_envs'];if(!_0x1ee3fe)continue;for(const [_0x529ff8,_0x533716]of _0x1ee3fe){const _0xe99e30=_0x533716&&_0x533716[_0x1c15e3(0x246)]&&_0x533716[_0x1c15e3(0x246)]['view'];if(!_0xe99e30)continue;let _0x599e3c,_0x2f2509;try{_0x599e3c=Atomics[_0x1c15e3(0x26f)](_0xe99e30,0x0),_0x2f2509=Atomics[_0x1c15e3(0x26f)](_0xe99e30,0x1);}catch{continue;}if(_0x599e3c===0x0)continue;_0x80a65f=!![];const _0x2364b3=_0x599e3c>0x0?_0x1c15e3(0x22e):_0x1c15e3(0x13c),_0x3af1d9=Date[_0x1c15e3(0x281)]()-Math[_0x1c15e3(0x257)](_0x599e3c)*0x3e8,_0x1eb5a9=((()=>{const _0x30637f=_0x1c15e3;try{return _0x533716[_0x30637f(0x226)]&&_0x533716[_0x30637f(0x226)][_0x30637f(0x285)]?_0x533716['_writer'][_0x30637f(0x285)]():null;}catch{return null;}})());_0x1848d0['push'](_0x1c15e3(0xe8)+_0x529ff8+_0x1c15e3(0x19e)+_0x2364b3+'\x20drainAge='+_0x3af1d9+_0x1c15e3(0x12d)+_0x2f2509+(_0x1eb5a9?_0x1c15e3(0xdd)+_0x1eb5a9[_0x1c15e3(0x24a)]+_0x1c15e3(0x111)+_0x1eb5a9[_0x1c15e3(0x269)]+_0x1c15e3(0x2b4)+_0x1eb5a9[_0x1c15e3(0x280)]+'}':''));}}if(!_0x80a65f)_0x1848d0[_0x1c15e3(0x242)]('\x20\x20(no\x20env\x20draining)');return _0x1848d0[_0x1c15e3(0x265)]('\x0a');}function _0x5ea369(){const _0x3c3c02=_0x23ad;if(!_0x450031())return;const _0x2cd034=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x59154c=Date[_0x3c3c02(0x281)]();for(const _0x4e2db8 of _0x3578a2){const _0x1cc5d6=_0x4e2db8&&_0x4e2db8[_0x3c3c02(0x161)];if(!_0x1cc5d6)continue;for(const [_0x120305,_0x3d8d2b]of _0x1cc5d6){const _0x50d19d=_0x3d8d2b&&_0x3d8d2b[_0x3c3c02(0x246)]&&_0x3d8d2b[_0x3c3c02(0x246)][_0x3c3c02(0x288)];if(!_0x50d19d)continue;let _0x48f654;try{_0x48f654=Atomics[_0x3c3c02(0x26f)](_0x50d19d,0x0);}catch{continue;}const _0x33fb37=_0x4e2db8[_0x3c3c02(0x2d0)]+'|'+_0x120305;if(_0x48f654<=0x0){_0x513d7c[_0x3c3c02(0x102)](_0x33fb37);continue;}const _0x1ccbb0=_0x59154c-_0x48f654*0x3e8,_0x1817a2=_0x513d7c[_0x3c3c02(0x1bf)](_0x33fb37);if(_0x1ccbb0<_0x2cd034)continue;if(_0x1817a2&&_0x59154c-_0x1817a2[_0x3c3c02(0x173)]<_0x2cd034)continue;_0x513d7c[_0x3c3c02(0x296)](_0x33fb37,{'firstTs':_0x1817a2?_0x1817a2[_0x3c3c02(0x26c)]:_0x48f654,'dumpedAt':_0x59154c});const _0x1153ea=_0x3c3c02(0x1da)+_0x1ccbb0+_0x3c3c02(0xea)+_0x120305+_0x3c3c02(0x2e9)+new Date()[_0x3c3c02(0x1a9)]()+_0x3c3c02(0x117)+process[_0x3c3c02(0x2de)]+_0x3c3c02(0x18f);_0x480794([_0x1153ea,_0x25db0b(),'='[_0x3c3c02(0x1be)](_0x1153ea[_0x3c3c02(0x273)]-0x1)][_0x3c3c02(0x265)]('\x0a'));}}}function _0x9283b2(){const _0x60606f=_0x23ad;if(!_0x450031()||_0x3a19da)return;_0x3a19da=!![],process[_0x60606f(0x275)](_0x60606f(0x266),_0x6c56ec),process[_0x60606f(0x275)](_0x60606f(0x29c),_0x48eff7);const _0x204875=Math[_0x60606f(0x213)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x2acfc2=setInterval(_0x5ea369,_0x204875);if(_0x2acfc2[_0x60606f(0x1b8)])_0x2acfc2[_0x60606f(0x1b8)]();}function _0xe41b32(_0x510ed2){if(!_0x450031()||!_0x510ed2)return;_0x3578a2['add'](_0x510ed2),_0x9283b2();}function _0x50c9ff(_0x40c067){const _0x248d70=_0x23ad;_0x3578a2[_0x248d70(0x102)](_0x40c067);}function _0x1ad34e(){const _0x4508ed=_0x23ad;if(!_0x450031())return{'enabled':![],'hint':_0x4508ed(0x150)};return{'enabled':!![],'stackCapture':!!_0xf0d1bd,'recentWrites':_0x57c9bf(0x10),'drain':_0x25db0b()};}return okdbDiag={'isEnabled':_0x450031,'recordWrite':_0x4eba4a,'installDiag':_0x9283b2,'registerOkdb':_0xe41b32,'unregisterOkdb':_0x50c9ff,'snapshot':_0x1ad34e},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x5297ff=_0x22d7b4;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x5186b6}=require$$0$2,_0x34f69c=requireOkdbDiag(),_0x191309=process.env.OKDB_COMMIT_MODE===_0x5297ff(0x120);class _0x1d28fa{constructor(_0x414e53){const _0x5663ad=_0x5297ff;this[_0x5663ad(0x27a)]=_0x414e53,this[_0x5663ad(0x1c3)]=new Set(),this[_0x5663ad(0x2da)]=new Map(),this[_0x5663ad(0x11e)]=0x0,this[_0x5663ad(0x1ca)]=[],this['_done']=[],this[_0x5663ad(0x1f6)]=Math[_0x5663ad(0x213)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x5663ad(0x1ac)]=0x0,this[_0x5663ad(0xdf)]=[],this[_0x5663ad(0x220)]=0x0;}async[_0x5297ff(0x1df)](_0x5b0f08,_0xc0820f){const _0x16c168=_0x5297ff;if(_0x34f69c[_0x16c168(0x299)]())_0x34f69c[_0x16c168(0x1d7)](this[_0x16c168(0x27a)]?.[_0x16c168(0x2aa)],_0xc0820f);if(this[_0x16c168(0x11b)]){const _0x18a250=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x18a250['code']=_0x16c168(0x2c6);throw _0x18a250;}if(this[_0x16c168(0x1f6)]>0x0){let _0x324669=![];while(this[_0x16c168(0x1ac)]>=this['_highWater']&&!this['_closed']){!_0x324669&&(_0x324669=!![],this[_0x16c168(0x220)]++),await new Promise(_0x23c88b=>this[_0x16c168(0xdf)]['push'](_0x23c88b));}if(this[_0x16c168(0x11b)]){const _0x4de2db=new Error(_0x16c168(0x29f));_0x4de2db[_0x16c168(0x1d9)]=_0x16c168(0x2c6);throw _0x4de2db;}}this['_outstanding']++;const _0x257ac5=this[_0x16c168(0x27a)]['_coordinator'];if(_0x257ac5)await _0x257ac5[_0x16c168(0x2be)]();if(this[_0x16c168(0x11b)]){if(_0x257ac5)_0x257ac5[_0x16c168(0xe0)]();this[_0x16c168(0x1ac)]--;if(this[_0x16c168(0xdf)][_0x16c168(0x273)]&&this[_0x16c168(0x1ac)]<this[_0x16c168(0x1f6)])this[_0x16c168(0xdf)]['shift']()();const _0x2c8967=new Error(_0x16c168(0x29f));_0x2c8967['code']=_0x16c168(0x2c6);throw _0x2c8967;}const _0x3a5696=_0x5186b6[_0x16c168(0x281)]();if(_0x191309)try{const _0x36939d=this['env']['db'][_0x16c168(0x1d8)](_0x5b0f08);this[_0x16c168(0x11e)]++;if(this[_0x16c168(0x1ca)][_0x16c168(0x242)](_0x5186b6['now']()-_0x3a5696)>0x100)this[_0x16c168(0x1ca)][_0x16c168(0x221)]();if(this[_0x16c168(0x293)][_0x16c168(0x242)](_0x5186b6['now']())>0x800)this[_0x16c168(0x293)][_0x16c168(0x221)]();return _0x36939d;}finally{this[_0x16c168(0x1ac)]--;if(this['_bpWaiters']['length']&&this[_0x16c168(0x1ac)]<this[_0x16c168(0x1f6)])this[_0x16c168(0xdf)][_0x16c168(0x221)]()();if(_0x257ac5)_0x257ac5[_0x16c168(0xe0)]();}const _0x1bc5aa=this[_0x16c168(0x27a)]['db']['childTransaction'](_0x5b0f08);this[_0x16c168(0x1c3)]['add'](_0x1bc5aa),this['_enqueuedAt'][_0x16c168(0x296)](_0x1bc5aa,_0x3a5696);const _0x498f6b=()=>{const _0x1f10ba=_0x16c168;this[_0x1f10ba(0x1c3)]['delete'](_0x1bc5aa),this[_0x1f10ba(0x2da)]['delete'](_0x1bc5aa),this[_0x1f10ba(0x11e)]++,this[_0x1f10ba(0x1ac)]--;this['_bpWaiters'][_0x1f10ba(0x273)]&&this[_0x1f10ba(0x1ac)]<this[_0x1f10ba(0x1f6)]&&this[_0x1f10ba(0xdf)]['shift']()();if(this['_durs'][_0x1f10ba(0x242)](_0x5186b6['now']()-_0x3a5696)>0x100)this[_0x1f10ba(0x1ca)]['shift']();if(this[_0x1f10ba(0x293)][_0x1f10ba(0x242)](_0x5186b6[_0x1f10ba(0x281)]())>0x800)this[_0x1f10ba(0x293)][_0x1f10ba(0x221)]();};_0x1bc5aa['then'](_0x498f6b,_0x498f6b);try{return await _0x1bc5aa;}finally{if(_0x257ac5)_0x257ac5['afterWrite']();}}[_0x5297ff(0x285)](){const _0x3412ea=_0x5297ff,_0x4fcdcc=_0x5186b6[_0x3412ea(0x281)]();let _0x23da00=0x0;for(const _0x10f6d4 of this[_0x3412ea(0x2da)][_0x3412ea(0x1dd)]()){const _0x55a789=_0x4fcdcc-_0x10f6d4;if(_0x55a789>_0x23da00)_0x23da00=_0x55a789;}let _0x4365b2=0x0;for(let _0x26636f=this[_0x3412ea(0x293)][_0x3412ea(0x273)]-0x1;_0x26636f>=0x0;_0x26636f--){if(_0x4fcdcc-this[_0x3412ea(0x293)][_0x26636f]>0x3e8)break;_0x4365b2++;}let _0x5de5b2=0x0;if(this[_0x3412ea(0x1ca)]['length']){const _0x37940b=[...this[_0x3412ea(0x1ca)]][_0x3412ea(0x2eb)]((_0x8acf3,_0x4c8515)=>_0x8acf3-_0x4c8515);_0x5de5b2=_0x37940b[Math['min'](_0x37940b[_0x3412ea(0x273)]-0x1,Math[_0x3412ea(0x259)](_0x37940b[_0x3412ea(0x273)]*0.99))];}return{'depth':this[_0x3412ea(0x1c3)][_0x3412ea(0x1f9)],'oldestPendingMs':Math['round'](_0x23da00),'committed':this[_0x3412ea(0x11e)],'commitsPerSec':_0x4365b2,'commitP99Ms':Math[_0x3412ea(0x1b7)](_0x5de5b2),'parkedNow':this[_0x3412ea(0xdf)][_0x3412ea(0x273)],'parkedTotal':this[_0x3412ea(0x220)],'highWater':this[_0x3412ea(0x1f6)]};}[_0x5297ff(0x1e7)](){const _0x4a6450=_0x5297ff,_0x48e9b8=_0x5186b6['now']();return[...this[_0x4a6450(0x2da)]['values']()]['map'](_0x117b77=>Math['round'](_0x48e9b8-_0x117b77))['sort']((_0x1af56c,_0x4ccc18)=>_0x4ccc18-_0x1af56c);}[_0x5297ff(0x192)](){const _0x2cc576=_0x5297ff;this[_0x2cc576(0x11b)]=!![];for(const _0x2328a6 of this[_0x2cc576(0xdf)][_0x2cc576(0x2d7)](0x0))_0x2328a6();}async['drain'](){const _0x55c0e2=_0x5297ff;let _0x1128e0=0x0;while(this['_inflight'][_0x55c0e2(0x1f9)]&&_0x1128e0++<0x3e8){await Promise['allSettled']([...this['_inflight']]);}}async[_0x5297ff(0x126)](_0x178a8f,_0x157c08,_0x38215c,_0x5a92d4){const _0x1deb9a=_0x5297ff;return this[_0x1deb9a(0x1df)](()=>{const _0x26297b=_0x1deb9a;if(_0x5a92d4===undefined)_0x178a8f[_0x26297b(0xe2)](_0x157c08,_0x38215c);else _0x178a8f[_0x26297b(0xe2)](_0x157c08,_0x38215c,_0x5a92d4);},_0x1deb9a(0x146));}async[_0x5297ff(0x17d)](_0x4cf5fe,_0x571efc){const _0x39b9a1=_0x5297ff;return this[_0x39b9a1(0x1df)](()=>_0x4cf5fe[_0x39b9a1(0x1ef)](_0x571efc),_0x39b9a1(0x277));}}async function _0xd0e818(_0x8bec01,_0x4a60b5){const _0x3ee11b=_0x5297ff;if(_0x4a60b5==null)_0x4a60b5=Math[_0x3ee11b(0x213)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x519a48=_0x8bec01?.[_0x3ee11b(0x245)];if(!_0x519a48||typeof _0x519a48[_0x3ee11b(0x2a1)]!==_0x3ee11b(0x156))return;await Promise[_0x3ee11b(0x208)]([Promise[_0x3ee11b(0x247)](_0x519a48)[_0x3ee11b(0x2cd)](()=>{}),new Promise(_0x5f1c3c=>{const _0x26c60c=_0x3ee11b,_0x37ab55=setTimeout(_0x5f1c3c,_0x4a60b5);if(_0x37ab55[_0x26c60c(0x1b8)])_0x37ab55[_0x26c60c(0x1b8)]();})]);}catch{}}function _0x38cf86(_0x5b8ec6){const _0x16c700=_0x5297ff;if(_0x191309)return Promise['resolve']();const _0x229dbe=_0x5b8ec6?.[_0x16c700(0x21a)];return _0x229dbe&&typeof _0x229dbe[_0x16c700(0x2a1)]==='function'?_0x229dbe:Promise[_0x16c700(0x247)]();}return okdbWriter[_0x5297ff(0xfb)]=_0x1d28fa,okdbWriter[_0x5297ff(0xfb)][_0x5297ff(0x2e7)]=_0xd0e818,okdbWriter['exports'][_0x5297ff(0x21a)]=_0x38cf86,okdbWriter[_0x5297ff(0xfb)][_0x5297ff(0x183)]=_0x191309,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x2f564a=_0x22d7b4;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x39dcdf=require$$0$3,{SYNC_COMMITS:_0x519f42}=requireOkdbWriter(),_0x3d6189=_0x2f564a(0xf2);class _0x4d80e0{constructor(_0x3b32ce,_0xaec81f,_0x2d5180){const _0x3ec9e5=_0x2f564a;this['_lock']=_0x3b32ce,this[_0x3ec9e5(0x1f3)]=_0xaec81f,this[_0x3ec9e5(0x228)]=_0x2d5180,this['_released']=![],this['_heartbeatTimer']=null,this[_0x3ec9e5(0x13f)]=null;}['isHeld'](){const _0x49762e=_0x2f564a;if(this[_0x49762e(0xdc)])return![];try{const _0x30b2e9=this[_0x49762e(0x18b)][_0x49762e(0x250)]()[_0x49762e(0x1bf)](this[_0x49762e(0x1f3)]);if(!_0x30b2e9||_0x30b2e9['acquiredAt']!==this[_0x49762e(0x228)])return![];const _0x35fd6c=_0x30b2e9[_0x49762e(0xd2)]??_0x30b2e9[_0x49762e(0x18c)];if(_0x35fd6c+_0x30b2e9[_0x49762e(0x289)]<Date[_0x49762e(0x281)]())return![];return!![];}catch{return!this[_0x49762e(0xdc)];}}[_0x2f564a(0x2a6)](){const _0x2cf02a=_0x2f564a;if(this[_0x2cf02a(0xdc)])return null;try{return this[_0x2cf02a(0x18b)][_0x2cf02a(0x250)]()['get'](this[_0x2cf02a(0x1f3)])??null;}catch{return null;}}async[_0x2f564a(0x15a)](_0x265a57){const _0x4bb390=_0x2f564a;if(this[_0x4bb390(0xdc)])return;try{const _0x35356b=this[_0x4bb390(0x18b)][_0x4bb390(0x250)]()[_0x4bb390(0x1bf)](this[_0x4bb390(0x1f3)]);if(!_0x35356b||_0x35356b['acquiredAt']!==this['_acquiredAt'])return;if(_0x519f42)this['_lock'][_0x4bb390(0x250)]()[_0x4bb390(0xe2)](this[_0x4bb390(0x1f3)],{..._0x35356b,'ttlMs':_0x35356b[_0x4bb390(0x289)]+_0x265a57});else await this['_lock'][_0x4bb390(0x250)]()[_0x4bb390(0x126)](this[_0x4bb390(0x1f3)],{..._0x35356b,'ttlMs':_0x35356b['ttlMs']+_0x265a57});}catch{}}async[_0x2f564a(0x185)](){const _0x1c63ee=_0x2f564a;if(this['_released'])return;if(this[_0x1c63ee(0x13f)])try{await this[_0x1c63ee(0x13f)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0x1c63ee(0x114)]=null,this[_0x1c63ee(0xdc)]=!![];try{const _0x5f5b48=this[_0x1c63ee(0x18b)][_0x1c63ee(0x250)]()[_0x1c63ee(0x1bf)](this['_key']);if(_0x5f5b48&&_0x5f5b48[_0x1c63ee(0x18c)]===this[_0x1c63ee(0x228)]){if(_0x519f42)this[_0x1c63ee(0x18b)]['_db']()[_0x1c63ee(0x1ef)](this[_0x1c63ee(0x1f3)]);else await this['_lock']['_db']()[_0x1c63ee(0x17d)](this[_0x1c63ee(0x1f3)]);}}catch{}}['_startHeartbeat'](_0xde546f,_0x10b21d){const _0x97700f=_0x2f564a,_0x4ccd20=_0x10b21d??Math[_0x97700f(0x259)](_0xde546f/0x3);this[_0x97700f(0x114)]=setInterval(()=>{const _0x2cea5f=_0x97700f;if(this[_0x2cea5f(0xdc)])return;this['_heartbeatInFlight']=((async()=>{const _0x1f6973=_0x2cea5f;try{const _0x368001=this[_0x1f6973(0x18b)][_0x1f6973(0x250)]()[_0x1f6973(0x1bf)](this[_0x1f6973(0x1f3)]);if(!_0x368001||_0x368001[_0x1f6973(0x18c)]!==this['_acquiredAt']){this['_released']=!![],clearInterval(this[_0x1f6973(0x114)]),this[_0x1f6973(0x114)]=null;return;}if(_0x519f42)this[_0x1f6973(0x18b)]['_db']()[_0x1f6973(0xe2)](this[_0x1f6973(0x1f3)],{..._0x368001,'updatedAt':Date[_0x1f6973(0x281)]()});else await this['_lock'][_0x1f6973(0x250)]()['put'](this[_0x1f6973(0x1f3)],{..._0x368001,'updatedAt':Date[_0x1f6973(0x281)]()});}catch{}this[_0x1f6973(0x13f)]=null;})());},_0x4ccd20);if(this[_0x97700f(0x114)][_0x97700f(0x1b8)])this['_heartbeatTimer'][_0x97700f(0x1b8)]();}}class _0x996d2a{constructor(_0x1ed1b0,{namespace:_0x37543b,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x4d9dea=_0x2f564a;this[_0x4d9dea(0x1db)]=_0x1ed1b0,this[_0x4d9dea(0xf7)]=_0x37543b,this['ttlMs']=ttlMs,this[_0x4d9dea(0x2e0)]=heartbeatMs,this['_lockDb']=null;}[_0x2f564a(0x250)](){const _0x43c48e=_0x2f564a;return!this[_0x43c48e(0x2f1)]&&(this[_0x43c48e(0x2f1)]=this[_0x43c48e(0x1db)][_0x43c48e(0x2ca)](_0x3d6189,{'dupSort':![]})),this[_0x43c48e(0x2f1)];}['_wantDb'](){const _0x490696=_0x2f564a;return!this[_0x490696(0x23b)]&&(this[_0x490696(0x23b)]=this[_0x490696(0x1db)][_0x490696(0x2ca)](_0x3d6189+_0x490696(0x22f),{'dupSort':![]})),this[_0x490696(0x23b)];}[_0x2f564a(0x1f3)](_0x1cc92c){const _0x2f24ac=_0x2f564a;return this[_0x2f24ac(0xf7)]+':'+_0x1cc92c;}[_0x2f564a(0x1f2)](_0x1c14ee){const _0x4ab296=_0x2f564a;try{_0x519f42?this['_wantDb']()[_0x4ab296(0xe2)](this[_0x4ab296(0x1f3)](_0x1c14ee),Date[_0x4ab296(0x281)]()):this[_0x4ab296(0xca)]()['put'](this['_key'](_0x1c14ee),Date[_0x4ab296(0x281)]())?.[_0x4ab296(0x2cd)]?.(()=>{});}catch{}}[_0x2f564a(0x16a)](_0x4e49dc,_0x3eb9c1=0x3e8){const _0x5a82cd=_0x2f564a;try{const _0x5cb38b=this[_0x5a82cd(0xca)]()[_0x5a82cd(0x1bf)](this[_0x5a82cd(0x1f3)](_0x4e49dc));return typeof _0x5cb38b===_0x5a82cd(0x253)&&Date[_0x5a82cd(0x281)]()-_0x5cb38b<_0x3eb9c1;}catch{return![];}}[_0x2f564a(0x198)](_0x1f83c4){const _0x3094b8=_0x2f564a,_0x1e419e=_0x1f83c4[_0x3094b8(0xd2)]??_0x1f83c4[_0x3094b8(0x18c)];return _0x1e419e+_0x1f83c4['ttlMs']<Date[_0x3094b8(0x281)]();}static['_holderDead'](_0x47cf66){const _0x4b93b7=_0x2f564a,_0x7a5997=_0x47cf66?.['holder'];if(!_0x7a5997||typeof _0x7a5997[_0x4b93b7(0x2de)]!==_0x4b93b7(0x253))return![];if(_0x7a5997['hostname']!==_0x39dcdf[_0x4b93b7(0x217)]())return![];if(_0x7a5997[_0x4b93b7(0x2de)]===process[_0x4b93b7(0x2de)])return![];try{return process[_0x4b93b7(0x15b)](_0x7a5997['pid'],0x0),![];}catch(_0x1fec5b){return _0x1fec5b[_0x4b93b7(0x1d9)]===_0x4b93b7(0xeb);}}async[_0x2f564a(0x2cf)](_0x2e2efe,_0x443647={},_0x1e4d8a={}){const _0x26e0bd=_0x2f564a,_0x5ab990=this[_0x26e0bd(0x1f3)](_0x2e2efe),_0x7e942e=_0x1e4d8a[_0x26e0bd(0x289)]??this[_0x26e0bd(0x289)],_0x381ae0=Date['now'](),_0x154535={'holder':{'pid':process[_0x26e0bd(0x2de)],'hostname':_0x39dcdf[_0x26e0bd(0x217)](),..._0x443647},'acquiredAt':_0x381ae0,'updatedAt':_0x381ae0,'ttlMs':_0x7e942e};let _0x5dda0d=![],_0x56b06b=null;try{const _0x115e1b=()=>{const _0x295fbe=_0x26e0bd,_0x26590b=this[_0x295fbe(0x250)]()[_0x295fbe(0x1bf)](_0x5ab990);if(_0x26590b&&!this['_isStale'](_0x26590b)&&!_0x996d2a[_0x295fbe(0x274)](_0x26590b)){const _0x392b04=_0x443647['processorId']!=null&&_0x26590b[_0x295fbe(0x2a6)][_0x295fbe(0x2de)]===process[_0x295fbe(0x2de)]&&_0x26590b[_0x295fbe(0x2a6)][_0x295fbe(0x17a)]===_0x443647[_0x295fbe(0x17a)];if(!_0x392b04){_0x5dda0d=![],_0x56b06b=_0x26590b;return;}_0x154535[_0x295fbe(0x18c)]<=_0x26590b[_0x295fbe(0x18c)]&&(_0x154535[_0x295fbe(0x18c)]=_0x26590b['acquiredAt']+0x1,_0x154535[_0x295fbe(0xd2)]=_0x154535[_0x295fbe(0x18c)]);}this['_db']()['put'](_0x5ab990,_0x154535),_0x5dda0d=!![],_0x56b06b=_0x154535;};if(_0x519f42)this['_db']()[_0x26e0bd(0x1d8)](_0x115e1b);else await this[_0x26e0bd(0x250)]()['childTransaction'](_0x115e1b);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x5dda0d)return{'acquired':![],'handle':null,'current':_0x56b06b};const _0x4b8fd0=new _0x4d80e0(this,_0x5ab990,_0x154535[_0x26e0bd(0x18c)]);return _0x4b8fd0[_0x26e0bd(0x1a6)](_0x7e942e,this[_0x26e0bd(0x2e0)]),{'acquired':!![],'handle':_0x4b8fd0,'current':_0x56b06b};}[_0x2f564a(0x1f8)](_0x30e2fe){const _0x159fb0=_0x2f564a;try{return this[_0x159fb0(0x250)]()['get'](this[_0x159fb0(0x1f3)](_0x30e2fe))??null;}catch{return null;}}[_0x2f564a(0x215)](){const _0x22c0f3=_0x2f564a,_0x27318c=this[_0x22c0f3(0xf7)]+':',_0x1cb248=[];try{for(const {key:_0x4a3ef7,value:_0x41b487}of this[_0x22c0f3(0x250)]()[_0x22c0f3(0x26a)]({'start':_0x27318c,'end':_0x27318c+'ÿ'})){typeof _0x4a3ef7==='string'&&_0x4a3ef7[_0x22c0f3(0x165)](_0x27318c)&&_0x1cb248[_0x22c0f3(0x242)]({'id':_0x4a3ef7['slice'](_0x27318c[_0x22c0f3(0x273)]),'entry':_0x41b487});}}catch{}return _0x1cb248;}static[_0x2f564a(0x227)](_0x23f9de){const _0x3f1695=_0x2f564a,_0x24e7ac=[];try{const _0x5564fb=_0x23f9de[_0x3f1695(0x2ca)](_0x3d6189,{'dupSort':![]});for(const {key:_0x516bbb,value:_0x2b3c85}of _0x5564fb[_0x3f1695(0x26a)]({})){if(typeof _0x516bbb!==_0x3f1695(0x238))continue;const _0x174d1c=_0x516bbb[_0x3f1695(0x20b)](':');if(_0x174d1c<0x1)continue;_0x24e7ac[_0x3f1695(0x242)]({'namespace':_0x516bbb['slice'](0x0,_0x174d1c),'id':_0x516bbb[_0x3f1695(0x1e0)](_0x174d1c+0x1),'entry':_0x2b3c85});}}catch{}return _0x24e7ac;}}return okdbLock={'OKDBLock':_0x996d2a},okdbLock;}function _0x23ad(_0x36b5ef,_0x1223cf){_0x36b5ef=_0x36b5ef-0xc1;const _0xd49bb5=_0xd49b();let _0x23ad8a=_0xd49bb5[_0x36b5ef];return _0x23ad8a;}var version=_0x22d7b4(0xc7),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x7e59cb=_0x22d7b4;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x35c0b3=require$$0$3,_0x2dce24=require$$1$1,_0xc06fd=require$$2,{LOOP:_0x3c3950}=requireOkdbLoopMonitor(),{OKDBLock:_0x1c02f9}=requireOkdbLock(),{SYNC_COMMITS:_0x491529}=requireOkdbWriter(),_0x532f67=_0x7e59cb(0xf4),_0x1a2a79=_0x7e59cb(0x25d),_0x5cc13b=_0x7e59cb(0x1ae),_0x6ff6ec=_0x7e59cb(0x12e),_0x467e6e=(_0xa14041,_0x34afd1)=>_0xa14041+':'+_0x34afd1,_0x3a0ecf=(_0x4d2ad2,_0x3b422c)=>_0x4d2ad2+'::'+_0x3b422c,_0x300894=(_0x23a7b3,_0x1c9ae6)=>_0x23a7b3+'/'+_0x1c9ae6,_0x1f463e=(_0x2c6a5a,_0x30dbb9)=>_0x2c6a5a+'#'+_0x30dbb9,_0x346692=_0x450c90=>{const _0x5fbd52=_0x7e59cb;if(_0x450c90?.['processKey'])return _0x450c90['processKey'];const _0x19fff7=_0x450c90?.[_0x5fbd52(0x2ed)];return typeof _0x19fff7==='string'&&_0x19fff7[_0x5fbd52(0x1fa)]('#')?_0x19fff7[_0x5fbd52(0x1e0)](0x0,_0x19fff7['indexOf']('#')):_0x19fff7;},_0x4960b3=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1c3d4a=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x394c48=_0x4960b3*0x3,_0x412fba=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x7e59cb(0x213)](0x927c0,_0x394c48*0x14),_0x4383ca=[_0x7e59cb(0x1af),_0x7e59cb(0x201),'processor:retry',_0x7e59cb(0x1c1),_0x7e59cb(0x1c4),_0x7e59cb(0xc4)];let _0x3525aa=null;function _0x1ca0cd(){const _0x53be32=_0x7e59cb;if(_0x3525aa==null)_0x3525aa=Math['round']((Date[_0x53be32(0x281)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x3525aa;}function _0xcc725e(_0xe45bd7){const _0x135205=_0x7e59cb;if(process.env.OKDB_PROCESS_KILL===_0x135205(0x232))return![];if(_0xe45bd7?.[_0x135205(0x1fe)]?.[_0x135205(0x20e)]&&typeof _0xe45bd7[_0x135205(0x1fe)][_0x135205(0x20e)]===_0x135205(0x29e)&&_0xe45bd7[_0x135205(0x1fe)][_0x135205(0x20e)][_0x135205(0x15b)]===![])return![];return!![];}function _0x22c756(_0x3076d8,_0x35fa31){const _0x39eecd=_0x7e59cb,_0x412685=!!_0x35fa31?.[_0x39eecd(0xed)];switch(_0x3076d8){case _0x39eecd(0x237):return{'controllable':_0x412685,'decommissionable':![],'killable':!![],'killConfirm':_0x39eecd(0x162)};case'cli':case _0x39eecd(0x170):return{'controllable':_0x412685,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x39eecd(0x1a7):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x39eecd(0xc9):case'fn-runner':case _0x39eecd(0xfa):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x573e35{constructor(_0x23e531){const _0x594abb=_0x7e59cb;this[_0x594abb(0x13d)]=_0x23e531,this[_0x594abb(0xf3)]=null,this['_desired']=null,this[_0x594abb(0xd5)]=new Map(),this['_cmd']=null,this[_0x594abb(0x2d8)]=![],this[_0x594abb(0x195)]=![],this[_0x594abb(0x199)]=_0x1ca0cd(),this['_selfKey']=_0x467e6e(process['pid'],this[_0x594abb(0x199)]),this['_instanceId']=_0xc06fd[_0x594abb(0x14f)]()[_0x594abb(0x1e0)](0x0,0x8),this['_rowKey']=_0x1f463e(this[_0x594abb(0xd1)],this['_instanceId']),this[_0x594abb(0x121)]=Date[_0x594abb(0x281)](),this[_0x594abb(0x25f)]=null,this[_0x594abb(0x17c)]=null,this[_0x594abb(0x21f)]=null,this[_0x594abb(0x222)]=null,this[_0x594abb(0x2b9)]=null,this[_0x594abb(0x25c)]=null,this[_0x594abb(0x2bf)]=0x0,this[_0x594abb(0x1cb)]={},this[_0x594abb(0x15c)]=new Map(),this[_0x594abb(0x2a7)]=process['cpuUsage'](),this[_0x594abb(0x1a5)]=Date[_0x594abb(0x281)](),this[_0x594abb(0x107)]=0x0,this[_0x594abb(0x17f)]=new Map();}get[_0x7e59cb(0x1e2)](){const _0x4f7d95=_0x7e59cb;return this[_0x4f7d95(0xd1)];}get[_0x7e59cb(0x200)](){const _0x2939b1=_0x7e59cb;return this[_0x2939b1(0xcf)];}['_caps'](_0x14d461,_0x362606){const _0x28fd0f=_0x7e59cb,_0x388bc2=_0x22c756(_0x14d461,_0x362606);if(_0x388bc2[_0x28fd0f(0x132)]&&!_0xcc725e(this[_0x28fd0f(0x13d)]))return{..._0x388bc2,'killable':![],'killConfirm':undefined};return _0x388bc2;}[_0x7e59cb(0x260)](){const _0x5bbd6a=_0x7e59cb;return!!this[_0x5bbd6a(0xf3)];}[_0x7e59cb(0x2e3)](_0x163918){Object['assign'](this['_ownMeta'],_0x163918||{});}[_0x7e59cb(0x2ee)](_0x2a3c88){if(_0x2a3c88)this['_listenAddr']=_0x2a3c88;}[_0x7e59cb(0x203)](_0x212118={}){const _0x322718=_0x7e59cb;return this[_0x322718(0x13d)][_0x322718(0x1ba)](_0x212118);}[_0x7e59cb(0x134)](){const _0x5d8532=_0x7e59cb,_0x4b39c9={};let _0x597762=0x0,_0x2debc7=0x0;const _0x1a5b19=new Set();for(const _0x460e99 of this[_0x5d8532(0x1e9)]()){_0x2debc7++;const _0x3faa7d=_0x460e99['processing'];if(!_0x3faa7d)continue;if(_0x3faa7d['participate'])_0x597762++;for(const _0xf603b6 of _0x3faa7d['processors']||[]){if(![_0x5d8532(0x271),_0x5d8532(0x2ad)][_0x5d8532(0x1fa)](_0xf603b6[_0x5d8532(0x23c)]))continue;(_0xf603b6[_0x5d8532(0x211)]==='online'||_0xf603b6['state']==='building')&&_0xf603b6[_0x5d8532(0x164)]&&_0x1a5b19[_0x5d8532(0x145)]((_0xf603b6[_0x5d8532(0x27a)]||_0x5d8532(0x2b0))+':'+_0xf603b6[_0x5d8532(0x164)]);const _0x355efb=_0xf603b6[_0x5d8532(0x27a)]||'default';(_0x4b39c9[_0x355efb]||=[])[_0x5d8532(0x242)]({..._0xf603b6,'env':_0x355efb,'owner':{'pid':_0x460e99[_0x5d8532(0x2de)]??null,'kind':_0x460e99[_0x5d8532(0x18a)]??null}});}}for(const [_0x1f9cae,_0x18dd4c]of Object[_0x5d8532(0x2e5)](_0x4b39c9)){for(const _0x5036b9 of _0x18dd4c){if(_0x5036b9[_0x5d8532(0x23c)]==='single'&&!_0x5036b9[_0x5d8532(0x2c9)]){const _0x1f2f85=_0x1f9cae+':'+(_0x5036b9['cursorKey']??'');if(!_0x1a5b19[_0x5d8532(0x254)](_0x1f2f85))_0x5036b9[_0x5d8532(0x180)]=!![];}}}return{'envs':_0x4b39c9,'policy':null,'participation':{'participating':_0x597762,'total':_0x2debc7},'source':'workers'};}[_0x7e59cb(0x138)](){const _0x4008dc=_0x7e59cb,_0x12cd5a=_0xca3e8f=>{const _0x46f18a=_0x23ad;if(_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x1c0)||_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x278)||_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x231))return 0x3;if(_0xca3e8f[_0x46f18a(0x2c9)])return 0x1;return 0x2;},_0x5586bd=new Map();for(const _0xa3b91e of this['listNodes']()){for(const _0x571139 of _0xa3b91e[_0x4008dc(0x1bb)]?.[_0x4008dc(0xed)]||[]){const _0x39ba3d={..._0x571139,'owner':{'pid':_0xa3b91e[_0x4008dc(0x2de)]??null,'kind':_0xa3b91e[_0x4008dc(0x18a)]??null,'host':_0xa3b91e[_0x4008dc(0x1d5)]??null}},_0x4722a8=_0x571139[_0x4008dc(0x23c)]===_0x4008dc(0x271)?'1ofN:'+(_0x571139[_0x4008dc(0x27a)]??'')+'::'+(_0x571139[_0x4008dc(0x164)]??_0x571139['type']??_0x571139['id']):_0x4008dc(0x234)+(_0xa3b91e[_0x4008dc(0x2ed)]??_0xa3b91e[_0x4008dc(0x22b)]??'')+'::'+(_0x571139['env']??'')+'::'+_0x571139['id'],_0x5a6d7a=_0x5586bd['get'](_0x4722a8);if(!_0x5a6d7a||_0x12cd5a(_0x39ba3d)>_0x12cd5a(_0x5a6d7a))_0x5586bd['set'](_0x4722a8,_0x39ba3d);}}return[..._0x5586bd[_0x4008dc(0x1dd)]()];}['clusterStatusView'](){const _0x3fd594=_0x7e59cb,_0x3f0dc7=Date[_0x3fd594(0x281)](),_0x2958bf=this[_0x3fd594(0x1e9)](),_0x43687a=_0xf8f0fb=>Math[_0x3fd594(0x213)](0x0,Math['round']((_0x3f0dc7-(_0xf8f0fb[_0x3fd594(0x148)]||_0x3f0dc7))/0x3e8)),_0x67cae2=_0x2958bf[_0x3fd594(0x18e)](_0x4c35d6=>_0x4c35d6['kind']===_0x3fd594(0x237)),_0x56b2ea=_0x2958bf[_0x3fd594(0x1c6)](_0x3fe88f=>_0x3fe88f[_0x3fd594(0x18a)]===_0x3fd594(0x13a));if(_0x67cae2||_0x56b2ea[_0x3fd594(0x273)])return{'primary':_0x67cae2?{'pid':_0x67cae2[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x67cae2)}:null,'workers':_0x56b2ea[_0x3fd594(0x188)](_0x5c6c2d=>({'pid':_0x5c6c2d[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x5c6c2d)})),'workersConfigured':_0x67cae2?.[_0x3fd594(0x14e)]?.[_0x3fd594(0x12c)]??_0x56b2ea[_0x3fd594(0x273)],'mode':'cluster'};const _0x5ef8bb=_0x2958bf[_0x3fd594(0x18e)](_0x5bb6f1=>_0x5bb6f1[_0x3fd594(0x18a)]===_0x3fd594(0x12b)||_0x5bb6f1['kind']===_0x3fd594(0x170)||_0x5bb6f1['kind']==='embedded'),_0x2b4d01=_0x5ef8bb?{'pid':_0x5ef8bb[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x5ef8bb)}:{'pid':process[_0x3fd594(0x2de)],'uptime':Math[_0x3fd594(0x213)](0x0,Math['round'](process[_0x3fd594(0x169)]()))};return{'primary':_0x2b4d01,'workers':[_0x2b4d01],'workersConfigured':0x1,'mode':_0x3fd594(0x271)};}['nodesView'](){const _0x552323=_0x7e59cb;return this[_0x552323(0x1ad)]();}[_0x7e59cb(0x2bb)](){const _0x7442d4=_0x7e59cb,_0x40463e=new Map();for(const _0x2bb7b8 of this[_0x7442d4(0x1ad)]())_0x40463e[_0x7442d4(0x296)](_0x2bb7b8[_0x7442d4(0x22b)],{..._0x2bb7b8,'children':[]});const _0x422663=[];for(const _0x134932 of _0x40463e['values']()){const _0x1bd64e=_0x134932['supervisorKey']?_0x40463e[_0x7442d4(0x1bf)](_0x134932[_0x7442d4(0x1e4)]):null;if(_0x1bd64e&&_0x1bd64e!==_0x134932)_0x1bd64e[_0x7442d4(0x224)][_0x7442d4(0x242)](_0x134932);else _0x422663[_0x7442d4(0x242)](_0x134932);}const _0x4eab2e=(_0x2b7830,_0x12e2f1)=>_0x2b7830[_0x7442d4(0x18a)]===_0x12e2f1['kind']?(_0x2b7830[_0x7442d4(0x2de)]||0x0)-(_0x12e2f1[_0x7442d4(0x2de)]||0x0):(_0x2b7830[_0x7442d4(0x18a)]??'')<(_0x12e2f1['kind']??'')?-0x1:0x1,_0x142c4d=_0x4f81ed=>{const _0x35d379=_0x7442d4;_0x4f81ed['sort'](_0x4eab2e);for(const _0x545ff1 of _0x4f81ed)if(_0x545ff1[_0x35d379(0x224)]['length'])_0x142c4d(_0x545ff1[_0x35d379(0x224)]);};return _0x142c4d(_0x422663),_0x422663;}['getProcess'](_0x34582f){const _0x34ed96=_0x7e59cb;return this[_0x34ed96(0x1ad)]()[_0x34ed96(0x18e)](_0x2a0fc9=>_0x2a0fc9[_0x34ed96(0x22b)]===_0x34582f)??null;}[_0x7e59cb(0x1ad)](_0x3d7764=Date['now']()){const _0x352921=_0x7e59cb,_0x271c73=new Map();for(const _0x4c7aff of this[_0x352921(0x1e9)]()){const _0x1e9d9a=_0x346692(_0x4c7aff);let _0x58a22d=_0x271c73[_0x352921(0x1bf)](_0x1e9d9a);!_0x58a22d&&(_0x58a22d={'processKey':_0x1e9d9a,'nodeKey':_0x1e9d9a,'pid':_0x4c7aff[_0x352921(0x2de)],'ppid':_0x4c7aff['ppid']??null,'host':_0x4c7aff[_0x352921(0x1d5)]??null,'kind':_0x4c7aff[_0x352921(0x18a)],'role':null,'supervisorKey':_0x4c7aff[_0x352921(0x1e4)]??null,'slot':_0x4c7aff[_0x352921(0xef)]??null,'slotKey':_0x4c7aff[_0x352921(0x174)]??null,'caps':_0x4c7aff[_0x352921(0x1c9)]??null,'lifecycle':_0x4c7aff[_0x352921(0x125)]??null,'uptime':Math[_0x352921(0x213)](0x0,Math[_0x352921(0x1b7)]((_0x3d7764-(_0x4c7aff[_0x352921(0x148)]||_0x3d7764))/0x3e8)),'startedAt':_0x4c7aff[_0x352921(0x148)]??null,'meta':_0x4c7aff['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x271c73[_0x352921(0x296)](_0x1e9d9a,_0x58a22d));_0x58a22d[_0x352921(0x1cd)][_0x352921(0x242)]({'instanceId':_0x4c7aff[_0x352921(0x13b)]??null,'role':_0x4c7aff['role']??null,'listenAddr':_0x4c7aff[_0x352921(0x248)]??null,'lifecycle':_0x4c7aff[_0x352921(0x125)]??null,'processing':_0x4c7aff['processing']??null});if(!_0x58a22d['role']&&_0x4c7aff['role'])_0x58a22d['role']=_0x4c7aff[_0x352921(0x2b8)];if(!_0x58a22d[_0x352921(0x248)]&&_0x4c7aff[_0x352921(0x248)])_0x58a22d[_0x352921(0x248)]=_0x4c7aff[_0x352921(0x248)];if(!_0x58a22d[_0x352921(0x1bb)]&&_0x4c7aff['processing'])_0x58a22d['processing']=_0x4c7aff[_0x352921(0x1bb)];if(!_0x58a22d[_0x352921(0xf8)]&&_0x4c7aff['engines'])_0x58a22d['engines']=_0x4c7aff[_0x352921(0xf8)];if(!_0x58a22d[_0x352921(0x2a8)]&&_0x4c7aff['singletonClaims'])_0x58a22d[_0x352921(0x2a8)]=_0x4c7aff[_0x352921(0x2a8)];if(_0x58a22d[_0x352921(0x1c9)]==null&&_0x4c7aff[_0x352921(0x1c9)])_0x58a22d['caps']=_0x4c7aff['caps'];if(_0x4c7aff['stats']&&(!_0x58a22d[_0x352921(0x14b)]||(_0x4c7aff[_0x352921(0x14b)]['at']??0x0)>(_0x58a22d['stats']['at']??0x0)))_0x58a22d[_0x352921(0x14b)]=_0x4c7aff['stats'];}return[..._0x271c73[_0x352921(0x1dd)]()];}['runtimeProcessesView'](){const _0x28c9ea=_0x7e59cb,_0x2c4901=[],_0x5b6448={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x4fe2f5 of this[_0x28c9ea(0x1ad)]()){_0x2c4901['push']({'processKey':_0x4fe2f5[_0x28c9ea(0x22b)],'kind':_0x4fe2f5[_0x28c9ea(0x18a)],'pid':_0x4fe2f5[_0x28c9ea(0x2de)],'supervisorKey':_0x4fe2f5[_0x28c9ea(0x1e4)],'meta':_0x4fe2f5[_0x28c9ea(0x14e)]??null,'uptime':_0x4fe2f5['uptime'],'stats':_0x4fe2f5[_0x28c9ea(0x14b)]??null}),_0x5b6448[_0x28c9ea(0x20e)]++;if(_0x4fe2f5[_0x28c9ea(0x14b)]){_0x5b6448[_0x28c9ea(0x16e)]+=_0x4fe2f5[_0x28c9ea(0x14b)][_0x28c9ea(0x16e)]||0x0,_0x5b6448[_0x28c9ea(0xd4)]+=(_0x4fe2f5[_0x28c9ea(0x14b)]['heapUsed']||0x0)+(_0x4fe2f5[_0x28c9ea(0x14b)][_0x28c9ea(0x282)]?.[_0x28c9ea(0xd4)]||0x0);const _0x211176=_0x4fe2f5[_0x28c9ea(0x14b)]['threads'];_0x211176&&(_0x5b6448['threads'][_0x28c9ea(0x2e1)]+=_0x211176[_0x28c9ea(0x2e1)]||0x0,_0x5b6448['threads'][_0x28c9ea(0x214)]+=_0x211176[_0x28c9ea(0x214)]||0x0,_0x5b6448[_0x28c9ea(0x282)][_0x28c9ea(0x16c)]+=_0x211176['busy']||0x0);}}return{'totals':_0x5b6448,'nodes':_0x2c4901};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x7ee9be=_0x7e59cb;this['_isWriter']=this[_0x7ee9be(0x2d8)]||!!writer,this['_isReader']=this[_0x7ee9be(0x195)]||!!reader,this['_kind']=kind||this[_0x7ee9be(0x25f)]||(_0x2dce24['isWorker']?_0x7ee9be(0x13a):'cli'),this[_0x7ee9be(0x17c)]=supervisorKey??this[_0x7ee9be(0x17c)],this[_0x7ee9be(0x21f)]=listenAddr??this[_0x7ee9be(0x21f)],this['_ensureDesired'](),await this[_0x7ee9be(0x1a8)]();if(!writer&&!reader)return null;if(!this[_0x7ee9be(0xf3)]){const _0x50b216=await this[_0x7ee9be(0x13d)][_0x7ee9be(0x27d)](_0x532f67,{'sync':![],'durability':_0x7ee9be(0x240)});if(!_0x50b216[_0x7ee9be(0x2a9)](_0x1a2a79))await _0x50b216[_0x7ee9be(0x29d)](_0x1a2a79);this[_0x7ee9be(0xf3)]=_0x50b216;}return this[_0x7ee9be(0xf3)];}[_0x7e59cb(0x1aa)](){const _0x496037=_0x7e59cb;return this[_0x496037(0x23a)]!==this[_0x496037(0xf3)]&&(this[_0x496037(0x23a)]=this[_0x496037(0xf3)],this[_0x496037(0x1e6)]=this['_statusEnv']['_getType'](_0x1a2a79)['data']),this[_0x496037(0x1e6)];}['_putRowAsync'](_0x3f575c){const _0x10c091=_0x7e59cb;if(_0x491529)return this[_0x10c091(0x1aa)]()[_0x10c091(0xe2)](_0x3f575c[_0x10c091(0x2ed)],_0x3f575c,0x1);const _0x488c24=this[_0x10c091(0x1aa)]()[_0x10c091(0x126)](_0x3f575c['nodeKey'],_0x3f575c,0x1);if(_0x488c24&&typeof _0x488c24[_0x10c091(0x2a1)]==='function')_0x488c24['then'](undefined,()=>{});return _0x488c24;}[_0x7e59cb(0xce)](_0x5dddd2){const _0xc2772d=_0x7e59cb;return this[_0xc2772d(0x1aa)]()[_0xc2772d(0xe2)](_0x5dddd2['nodeKey'],_0x5dddd2,0x1);}['_removeRowAsync'](_0x3fa943){const _0x29d730=_0x7e59cb;if(_0x491529)try{return this[_0x29d730(0x1aa)]()[_0x29d730(0x1ef)](_0x3fa943);}catch{return![];}const _0x2164c1=this['_nodeDb']()[_0x29d730(0x17d)](_0x3fa943);if(_0x2164c1&&typeof _0x2164c1[_0x29d730(0x2a1)]===_0x29d730(0x156))_0x2164c1['then'](undefined,()=>{});return _0x2164c1;}async[_0x7e59cb(0x1d0)](_0x2b7561){const _0x16f8aa=_0x7e59cb;if(!this[_0x16f8aa(0xf3)]||!this[_0x16f8aa(0x2d8)]||!_0x2b7561?.['nodeKey'])return;return this['_putRowAsync'](_0x2b7561);}async[_0x7e59cb(0x2e6)](_0xfa1e9a){const _0x6503b1=_0x7e59cb;if(!this[_0x6503b1(0xf3)]||!this['_isWriter']||!_0xfa1e9a)return;const _0x2abce8=_0xfa1e9a[_0x6503b1(0x1fa)]('#'),_0x28b6c0=[];for(const {key:_0x79e0ce}of this[_0x6503b1(0xf3)][_0x6503b1(0x26a)](_0x1a2a79)){if(_0x79e0ce===_0xfa1e9a||!_0x2abce8&&typeof _0x79e0ce===_0x6503b1(0x238)&&_0x79e0ce[_0x6503b1(0x165)](_0xfa1e9a+'#'))_0x28b6c0[_0x6503b1(0x242)](_0x79e0ce);}for(const _0x15e848 of _0x28b6c0){try{this['_nodeDb']()['removeSync'](_0x15e848);}catch{}}}['_nodeDead'](_0x3ec149){const _0x5443ea=_0x7e59cb;if(typeof _0x3ec149?.['pid']!==_0x5443ea(0x253))return![];if(_0x3ec149[_0x5443ea(0x1d5)]!==_0x35c0b3[_0x5443ea(0x217)]())return![];if(_0x3ec149[_0x5443ea(0x2de)]===process[_0x5443ea(0x2de)])return![];if(_0x3ec149[_0x5443ea(0x2e2)]!=null&&_0x3ec149[_0x5443ea(0x2e2)]<Date[_0x5443ea(0x281)]()-_0x412fba)return!![];try{return process[_0x5443ea(0x15b)](_0x3ec149['pid'],0x0),![];}catch(_0x5010d2){return _0x5010d2['code']==='ESRCH';}}[_0x7e59cb(0x1e9)](){const _0x4e7e11=_0x7e59cb;if(!this[_0x4e7e11(0xf3)])return[];try{this[_0x4e7e11(0xf3)]['db']?.['resetReadTxn']?.();}catch{}const _0x2792e1=Date[_0x4e7e11(0x281)](),_0x33ed42=_0x35c0b3[_0x4e7e11(0x217)](),_0x4383ed=[];for(const {value:_0x597bb7}of this[_0x4e7e11(0xf3)]['getRange'](_0x1a2a79)){if(!_0x597bb7)continue;let _0x212776=null;_0x597bb7[_0x4e7e11(0x1d5)]===_0x33ed42&&typeof _0x597bb7[_0x4e7e11(0x2de)]===_0x4e7e11(0x253)&&(_0x212776=!this[_0x4e7e11(0x2b5)](_0x597bb7));if(_0x212776===![])continue;const _0x24ea08=_0x597bb7[_0x4e7e11(0x2e2)]==null||_0x597bb7[_0x4e7e11(0x2e2)]>=_0x2792e1;if(_0x212776===!![]||_0x24ea08)_0x4383ed[_0x4e7e11(0x242)](_0x597bb7);}return _0x4383ed;}async[_0x7e59cb(0x1ee)](_0x368340=0x0){const _0x3f8546=_0x7e59cb;if(!this[_0x3f8546(0xf3)]||!this['_isWriter'])return;const _0x16cecf=Date['now']()-_0x368340,_0x2b3fc6=new Set(),_0x487172=[],_0xe794d4=_0x35c0b3[_0x3f8546(0x217)](),_0x253aa2=require$$6[_0x3f8546(0x210)];for(const {key:_0x46ceb4,value:_0x4d9740}of this[_0x3f8546(0xf3)][_0x3f8546(0x26a)](_0x1a2a79)){if(!_0x4d9740)continue;const _0xc9b26d=_0x4d9740[_0x3f8546(0x1d5)]===_0xe794d4&&typeof _0x4d9740[_0x3f8546(0x2de)]===_0x3f8546(0x253),_0x5c0e69=_0xc9b26d?this[_0x3f8546(0x2b5)](_0x4d9740):_0x4d9740[_0x3f8546(0x2e2)]!=null&&_0x4d9740[_0x3f8546(0x2e2)]<_0x16cecf;if(_0x5c0e69)_0x487172['push'](_0x46ceb4);else{_0x2b3fc6[_0x3f8546(0x145)](_0x346692(_0x4d9740)??_0x46ceb4);if(_0x4d9740[_0x3f8546(0x210)]&&_0x4d9740[_0x3f8546(0x210)]!==_0x253aa2){if(!this[_0x3f8546(0x128)])this[_0x3f8546(0x128)]=new Set();!this[_0x3f8546(0x128)][_0x3f8546(0x254)](_0x4d9740[_0x3f8546(0x210)])&&(this[_0x3f8546(0x128)]['add'](_0x4d9740['version']),this[_0x3f8546(0x13d)]['log']?.['warn']?.(_0x3f8546(0x261)+(_0x4d9740[_0x3f8546(0x2de)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x4d9740['version']+'\x20while\x20this\x20process\x20runs\x20'+_0x253aa2+'\x20—\x20'+_0x3f8546(0x20c),{'feature':_0x3f8546(0x127)}));}}}for(const _0x2b70ec of _0x487172)this[_0x3f8546(0x225)](_0x2b70ec);if(this[_0x3f8546(0x17e)]()){const _0x394432=[];for(const {key:_0x5a18fc}of this['listDesired'](_0x3f8546(0x25d))){if(!_0x2b3fc6[_0x3f8546(0x254)](_0x5a18fc)){if(_0x491529)try{this['_desired'][_0x3f8546(0x1ef)]('node/'+_0x5a18fc);}catch{}else _0x394432['push'](this['_desired'][_0x3f8546(0x17d)]('node/'+_0x5a18fc));}}if(_0x394432[_0x3f8546(0x273)])await Promise[_0x3f8546(0x24e)](_0x394432);}}[_0x7e59cb(0x23e)](_0x3c61e6=null){const _0x5ee033=_0x7e59cb;if(this[_0x5ee033(0x222)])return;if(!this[_0x5ee033(0x2d8)]||!this['_statusEnv']){this[_0x5ee033(0x13d)]?.[_0x5ee033(0x2c7)]?.[_0x5ee033(0x1ce)]?.(_0x5ee033(0x153)+this[_0x5ee033(0x2d8)]+_0x5ee033(0x1b2)+!!this[_0x5ee033(0xf3)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':'processes'});return;}this[_0x5ee033(0x25c)]=_0x3c61e6,this['_onProcEvent']=()=>this['_maybePublish']();for(const _0x41eaff of _0x4383ca)this[_0x5ee033(0x13d)]['events']['on'](_0x41eaff,this[_0x5ee033(0x2b9)]);this[_0x5ee033(0x12a)]();const _0x2fee57=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x4960b3;this[_0x5ee033(0x222)]=setInterval(()=>{const _0x209990=_0x5ee033;if(this[_0x209990(0x25c)])try{this[_0x209990(0x25c)]();}catch{}this['_publishNow'](),this[_0x209990(0x1ee)]()[_0x209990(0x2cd)](()=>{});},_0x2fee57);if(this[_0x5ee033(0x222)][_0x5ee033(0x1b8)])this[_0x5ee033(0x222)][_0x5ee033(0x1b8)]();}[_0x7e59cb(0x129)](){const _0x567009=_0x7e59cb;if(!this[_0x567009(0x2d8)]||!this['_statusEnv'])return;if(Date[_0x567009(0x281)]()-this['_lastPublishAt']<_0x1c3d4a)return;this[_0x567009(0x12a)]();}['_publishNow'](){const _0x5520e6=_0x7e59cb;if(!this[_0x5520e6(0x2d8)]||!this[_0x5520e6(0xf3)])return;this['_lastPublishAt']=Date[_0x5520e6(0x281)]();try{const _0x3bb801=[this[_0x5520e6(0x2d5)]()];for(const _0xe529b9 of this[_0x5520e6(0x15c)]['values']())_0x3bb801[_0x5520e6(0x242)](this[_0x5520e6(0x2cc)](_0xe529b9));const _0x2c4b90=_0x3c3950['enabled']?_0x3c3950[_0x5520e6(0x281)]():0x0;for(const _0x41c358 of _0x3bb801){try{this['_putRowSync'](_0x41c358),this[_0x5520e6(0x110)]=![];}catch(_0x504303){!this[_0x5520e6(0x110)]&&(this[_0x5520e6(0x110)]=!![],this[_0x5520e6(0x13d)]?.[_0x5520e6(0x2c7)]?.['warn']?.('registry\x20publish\x20failing:\x20'+_0x504303['message'],{'feature':_0x5520e6(0x20e)}));}}if(_0x3c3950[_0x5520e6(0x2df)])_0x3c3950['note'](_0x5520e6(0x27e),_0x3c3950[_0x5520e6(0x281)]()-_0x2c4b90,_0x5520e6(0x1d6)+_0x3bb801[_0x5520e6(0x273)]+_0x5520e6(0x2e8));}catch(_0x37cdbc){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this['okdb']?.[_0x5520e6(0x2c7)]?.[_0x5520e6(0x1ce)]?.('registry\x20publish\x20failing:\x20'+_0x37cdbc[_0x5520e6(0xf9)],{'feature':_0x5520e6(0x20e)}));}}async[_0x7e59cb(0x223)](){const _0x104f59=_0x7e59cb;if(this['_onProcEvent']){for(const _0x7a537f of _0x4383ca){try{this[_0x104f59(0x13d)]['events'][_0x104f59(0x232)](_0x7a537f,this[_0x104f59(0x2b9)]);}catch{}}this[_0x104f59(0x2b9)]=null;}this[_0x104f59(0x222)]&&(clearInterval(this[_0x104f59(0x222)]),this[_0x104f59(0x222)]=null);try{if(this[_0x104f59(0xf3)]&&this[_0x104f59(0x2d8)])await this[_0x104f59(0x2e6)](this['_rowKey']);}catch{}}async['deregisterSelf'](){const _0xbf1a35=_0x7e59cb;if(!this[_0xbf1a35(0xf3)]||!this[_0xbf1a35(0x2d8)])return;try{await this['removeNode'](this[_0xbf1a35(0xcf)]);}catch{}try{const _0x536f30=[];for(const {value:_0x109b81}of this[_0xbf1a35(0xf3)][_0xbf1a35(0x26a)](_0x1a2a79)){if(_0x109b81?.[_0xbf1a35(0x264)]===process['pid']&&_0x109b81[_0xbf1a35(0x2ed)])_0x536f30['push'](_0x109b81[_0xbf1a35(0x2ed)]);}for(const _0x2850ef of _0x536f30){try{await this[_0xbf1a35(0x2e6)](_0x2850ef);}catch{}}}catch{}}async['publishOwnRow'](){const _0x3a66bf=_0x7e59cb;return this['putNode'](this[_0x3a66bf(0x2d5)]());}async['publishChildRow'](_0x19ad63){const _0x473961=_0x7e59cb;if(!this[_0x473961(0xf3)]||!this[_0x473961(0x2d8)])return;return this[_0x473961(0x1d0)](this[_0x473961(0x2cc)](_0x19ad63));}[_0x7e59cb(0x2cc)]({pid:_0x38b542,startedAt:_0x356957,kind:_0x53dafa,supervisorKey:_0x357970,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x7e59cb(0x1fb),meta:meta=null,stats:stats=null}){const _0x50299c=_0x7e59cb,_0x515d0e=Date[_0x50299c(0x281)](),_0x34d54b=_0x467e6e(_0x38b542,_0x356957);return{'nodeKey':_0x1f463e(_0x34d54b,'0'),'processKey':_0x34d54b,'instanceId':'0','pid':_0x38b542,'startedAt':_0x356957,'ppid':process[_0x50299c(0x2de)],'host':_0x35c0b3[_0x50299c(0x217)](),'supervisorKey':_0x357970,'slot':slot,'slotKey':slotKey,'kind':_0x53dafa,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x515d0e,'expiresAt':_0x515d0e+_0x394c48,'caps':this['_caps'](_0x53dafa,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x7e59cb(0x11c)](_0x5cfd18){const _0x15a5a5=_0x7e59cb;if(!_0x5cfd18?.[_0x15a5a5(0x2de)])return null;const _0x135231=_0x467e6e(_0x5cfd18[_0x15a5a5(0x2de)],_0x5cfd18[_0x15a5a5(0x148)]);this[_0x15a5a5(0x15c)][_0x15a5a5(0x296)](_0x135231,{..._0x5cfd18,'supervisorKey':_0x5cfd18[_0x15a5a5(0x1e4)]??this[_0x15a5a5(0xd1)]});if(this[_0x15a5a5(0x2d8)])await this[_0x15a5a5(0x124)](this[_0x15a5a5(0x15c)][_0x15a5a5(0x1bf)](_0x135231))['catch']?.(()=>{});return _0x135231;}['removeSupervisedChild'](_0x1ea405){const _0x112241=_0x7e59cb;if(!_0x1ea405)return;return this['_children']['delete'](_0x1ea405),this[_0x112241(0x2e6)](_0x1ea405);}[_0x7e59cb(0x20f)](){const _0x2ff36c=_0x7e59cb,_0x5d5be6=Date[_0x2ff36c(0x281)](),_0x2b0d0a=process[_0x2ff36c(0x136)](),_0xe11e99=(_0x5d5be6-this['_lastCpuAt'])*0x3e8;if(_0xe11e99>=0x3d090){const _0x1ab081=_0x2b0d0a[_0x2ff36c(0x151)]-this[_0x2ff36c(0x2a7)][_0x2ff36c(0x151)]+(_0x2b0d0a[_0x2ff36c(0x22c)]-this['_lastCpuUsage']['system']),_0x1d9283=_0x35c0b3[_0x2ff36c(0x18d)]()[_0x2ff36c(0x273)]||0x1;this[_0x2ff36c(0x107)]=Math['min'](0x64,Math[_0x2ff36c(0x1b7)](_0x1ab081/(_0xe11e99*_0x1d9283)*0x64)),this[_0x2ff36c(0x1a4)]=Math['round'](_0xe11e99/0x3e8),this['_lastCpuUsage']=_0x2b0d0a,this[_0x2ff36c(0x1a5)]=_0x5d5be6;}const _0xca5921=process[_0x2ff36c(0x295)](),_0x4c3968=this[_0x2ff36c(0x17f)][_0x2ff36c(0x1f9)];let _0x3ebc83=0x0;if(_0x4c3968>0x0){const _0x243f37=[this[_0x2ff36c(0x13d)],...this['okdb'][_0x2ff36c(0x161)]?.[_0x2ff36c(0x1dd)]?.()??[]];for(const _0x360121 of _0x243f37){const _0x2b45f8=_0x360121[_0x2ff36c(0x22d)]?.[_0x2ff36c(0x291)];if(_0x2b45f8)_0x3ebc83+=_0x2b45f8[_0x2ff36c(0x21e)][_0x2ff36c(0x16c)];}}let _0x5059d5=null;const _0x59f473=_0x4c3968;if(_0x59f473>0x0){let _0x56da43=0x0;for(const _0x3b4016 of this[_0x2ff36c(0x17f)][_0x2ff36c(0x1dd)]())_0x56da43+=_0x3b4016[_0x2ff36c(0xd4)]||0x0;_0x5059d5={'count':_0x59f473,'heapUsed':_0x56da43,'sandbox':_0x4c3968,'busy':_0x3ebc83};}return{'rss':_0xca5921[_0x2ff36c(0x16e)],'heapUsed':_0xca5921['heapUsed'],'heapTotal':_0xca5921[_0x2ff36c(0x1de)],'external':_0xca5921[_0x2ff36c(0x239)],'cpuPct':this[_0x2ff36c(0x107)],'cpuWindowMs':this[_0x2ff36c(0x1a4)]??null,'threads':_0x5059d5,'at':_0x5d5be6};}[_0x7e59cb(0x23f)](_0x3297b3,_0x469501){const _0x25d800=_0x7e59cb;if(!_0x3297b3||!_0x469501)return;this[_0x25d800(0x17f)][_0x25d800(0x296)](_0x3297b3,_0x469501);}[_0x7e59cb(0x205)](_0x49495d){const _0x17577c=_0x7e59cb;this[_0x17577c(0x17f)][_0x17577c(0x102)](_0x49495d);}[_0x7e59cb(0x15f)](_0x3ff4f3,_0x51148b,_0x21b39f=undefined){const _0x1dfb47=_0x7e59cb,_0x4ed629=this[_0x1dfb47(0x15c)][_0x1dfb47(0x1bf)](_0x3ff4f3);if(!_0x4ed629||!_0x51148b)return;if(_0x21b39f!==undefined)_0x4ed629['processing']=_0x21b39f;_0x4ed629[_0x1dfb47(0x14b)]={'rss':_0x51148b[_0x1dfb47(0x16e)]??null,'heapUsed':_0x51148b[_0x1dfb47(0xd4)]??null,'heapTotal':_0x51148b[_0x1dfb47(0x1de)]??null,'external':_0x51148b[_0x1dfb47(0x239)]??null,'cpuPct':_0x51148b['cpuPct']??null,'cpuWindowMs':_0x51148b['cpuWindowMs']??null,'threads':_0x51148b[_0x1dfb47(0x282)]??null,'claims':_0x51148b[_0x1dfb47(0x178)]??null,'envsOpen':_0x51148b[_0x1dfb47(0xfc)]??null,'at':Date['now']()};}[_0x7e59cb(0x2d5)](){const _0x51de43=_0x7e59cb,_0x52bf9d=Date[_0x51de43(0x281)](),_0x49cc9a=this['okdb'][_0x51de43(0x13e)]||{},_0x7e8ac5=this[_0x51de43(0x25f)]||_0x51de43(0x12b);return{'nodeKey':this[_0x51de43(0xcf)],'processKey':this[_0x51de43(0xd1)],'instanceId':this['_instanceId'],'pid':process[_0x51de43(0x2de)],'startedAt':this[_0x51de43(0x199)],'instanceStartedAt':this[_0x51de43(0x121)],'ppid':typeof process['ppid']===_0x51de43(0x253)?process[_0x51de43(0x264)]:null,'host':_0x35c0b3['hostname'](),'supervisorKey':this['_supervisorKey']??null,'version':require$$6['version'],'kind':_0x7e8ac5,'role':{'engines':!!_0x49cc9a[_0x51de43(0xf8)],'processors':!!_0x49cc9a['processors'],'compaction':_0x49cc9a[_0x51de43(0x1b6)],'http':_0x49cc9a[_0x51de43(0x158)]},'listenAddr':this[_0x51de43(0x21f)]??null,'heartbeatAt':_0x52bf9d,'expiresAt':_0x52bf9d+_0x394c48,'caps':this['_caps'](_0x7e8ac5,_0x49cc9a),'lifecycle':{'state':_0x51de43(0x1fb),'desiredVersionApplied':null},'meta':{...this[_0x51de43(0x1cb)]},'processing':_0x49cc9a[_0x51de43(0xed)]?this[_0x51de43(0x24b)]():null,'engines':_0x49cc9a['engines']?[...this[_0x51de43(0x13d)][_0x51de43(0x2e4)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x51de43(0x20f)](),'writers':this[_0x51de43(0x1a2)]()};}['_collectWriterFacet'](){const _0x449a59=_0x7e59cb,_0x19a1c7={};try{for(const [_0x4f2ca3,_0x45bc35]of this[_0x449a59(0x13d)]['_envs']){try{const _0x4ef7a7=_0x45bc35[_0x449a59(0x2bc)]?.();if(!_0x4ef7a7)continue;if(!_0x4ef7a7[_0x449a59(0x24a)]&&!_0x4ef7a7[_0x449a59(0x21a)]&&!(_0x4ef7a7[_0x449a59(0x280)]??0x0)&&!_0x4ef7a7[_0x449a59(0xc3)])continue;_0x19a1c7[_0x4f2ca3]={'depth':_0x4ef7a7['depth'],'oldestPendingMs':_0x4ef7a7[_0x449a59(0x269)],'committed':_0x4ef7a7[_0x449a59(0x21a)],'commitsPerSec':_0x4ef7a7[_0x449a59(0x10b)],'commitP99Ms':_0x4ef7a7['commitP99Ms'],'parkedNow':_0x4ef7a7[_0x449a59(0x280)]??0x0,'draining':!!_0x4ef7a7['draining']};}catch{}}}catch{}return Object['keys'](_0x19a1c7)['length']?_0x19a1c7:null;}[_0x7e59cb(0x268)](){const _0x1d7833=_0x7e59cb,_0x81fdb7=process['pid'],_0x2b6666=Date[_0x1d7833(0x281)](),_0x24eaf9=_0x3a25da=>{const _0xa18a32=_0x1d7833;if(!_0x3a25da)return[];const _0x233253=[];try{for(const {id:_0x140d9b,entry:_0x474296}of _0x3a25da['list']()){if(_0x474296?.[_0xa18a32(0x2a6)]?.[_0xa18a32(0x2de)]!==_0x81fdb7)continue;const _0x3fe93c=_0x474296['updatedAt']??_0x474296[_0xa18a32(0x18c)]??0x0;if(_0x3fe93c+(_0x474296[_0xa18a32(0x289)]??0x0)<_0x2b6666)continue;_0x233253[_0xa18a32(0x242)](_0x140d9b);}}catch{}return _0x233253;},_0x907d44=_0x24eaf9(this[_0x1d7833(0x290)]('compact')),_0x4bfc23=_0x24eaf9(this[_0x1d7833(0x290)](_0x1d7833(0x120)));if(!_0x907d44['length']&&!_0x4bfc23[_0x1d7833(0x273)])return null;return{'compact':_0x907d44,'replicate':_0x4bfc23};}[_0x7e59cb(0x290)](_0x5141ce){const _0x17dd12=_0x7e59cb;if(!this[_0x17dd12(0x13d)]?.[_0x17dd12(0xfd)])return null;if(!this[_0x17dd12(0x1d4)])this['_singletonLocks']=new Map();let _0x8db4f7=this['_singletonLocks'][_0x17dd12(0x1bf)](_0x5141ce);if(!_0x8db4f7)try{_0x8db4f7=new _0x1c02f9(this['okdb'][_0x17dd12(0xfd)],{'namespace':_0x5141ce}),this[_0x17dd12(0x1d4)]['set'](_0x5141ce,_0x8db4f7);}catch{return null;}return _0x8db4f7;}['_buildProcessingFacet'](){const _0x1e5707=_0x7e59cb,_0x1b13f4=[];try{for(const [_0x11dd59,_0xa5ecd1]of this[_0x1e5707(0x13d)]['_envs']){if(_0x11dd59[_0x1e5707(0x165)]('~'))continue;for(const _0x4b7779 of _0xa5ecd1['processor'][_0x1e5707(0x27f)]())_0x1b13f4[_0x1e5707(0x242)]({..._0x4b7779,'env':_0x11dd59});}}catch{}return{'participate':this[_0x1e5707(0x13d)][_0x1e5707(0xed)]?.['_participate']??![],'processors':_0x1b13f4};}[_0x7e59cb(0x17e)](){const _0x518b49=_0x7e59cb;if(this['_desired'])return!![];const _0x14f847=this[_0x518b49(0x13d)][_0x518b49(0xfd)];if(!_0x14f847)return![];return this[_0x518b49(0x1d2)]=_0x14f847['openDB'](_0x5cc13b,{'dupSort':![]}),this[_0x518b49(0x1f0)]=_0x14f847['openDB'](_0x6ff6ec,{'dupSort':![]}),!![];}async[_0x7e59cb(0x1a8)](){const _0x27d5bd=_0x7e59cb;if(!this[_0x27d5bd(0x17e)]())return;const _0x349655=_0x27d5bd(0xff),_0x5025de=0x1,_0x2d8955=this[_0x27d5bd(0x1d2)][_0x27d5bd(0x1bf)](_0x349655)??0x0;if(_0x2d8955>=_0x5025de)return;const _0x6f575b=_0x5ab2b0=>{const _0x393496=_0x27d5bd;if(_0x5ab2b0===_0x393496(0xfa))return _0x393496(0x271);if(_0x5ab2b0===_0x393496(0x167))return'fanout';return _0x5ab2b0;};await this[_0x27d5bd(0x13d)][_0x27d5bd(0x28b)][_0x27d5bd(0x226)][_0x27d5bd(0x1df)](()=>{const _0x1934b7=_0x27d5bd;for(const _0xec656 of['procmode/',_0x1934b7(0xe6)]){for(const {key:_0x2f13f6,value:_0x853af}of this[_0x1934b7(0x1d2)][_0x1934b7(0x26a)]({'start':_0xec656,'end':_0xec656+'ÿ'})){if(typeof _0x2f13f6!==_0x1934b7(0x238)||!_0x2f13f6[_0x1934b7(0x165)](_0xec656))break;const _0xe2e3af=_0x6f575b(_0x853af[_0x1934b7(0x23c)]);if(_0xe2e3af!==_0x853af[_0x1934b7(0x23c)])this[_0x1934b7(0x1d2)][_0x1934b7(0x126)](_0x2f13f6,{..._0x853af,'mode':_0xe2e3af});}}this[_0x1934b7(0x1d2)][_0x1934b7(0x126)](_0x349655,_0x5025de);});}[_0x7e59cb(0x2a4)](){const _0x29160b=_0x7e59cb;return!!this[_0x29160b(0x1d2)];}[_0x7e59cb(0x24d)](_0x3b6676,_0xb2d767){const _0x54e065=_0x7e59cb;if(!this[_0x54e065(0x17e)]())return null;const _0x431016=_0x3b6676+'/'+_0xb2d767;return this['_refreshDesiredSnapshot'](),this[_0x54e065(0xd5)][_0x54e065(0x1bf)](_0x431016)??this['_desired']['get'](_0x431016)??null;}[_0x7e59cb(0x229)](){const _0x5cc0b8=_0x7e59cb;if(!_0x491529)return;try{this['okdb']['_systemEnv']?.['db']?.[_0x5cc0b8(0x287)]?.();}catch{}}async[_0x7e59cb(0x196)](_0x1a8bbd,_0x3bfcc7,_0x41d344){const _0x10d683=_0x7e59cb;if(!this[_0x10d683(0x17e)]())return null;const _0x292eda=_0x1a8bbd+'/'+_0x3bfcc7;this['_refreshDesiredSnapshot']();const _0x1a1c74=this['_desiredOverlay'][_0x10d683(0x1bf)](_0x292eda)??this[_0x10d683(0x1d2)][_0x10d683(0x1bf)](_0x292eda)??{'version':0x0},_0x50f3de=(_0x1a1c74[_0x10d683(0x210)]||0x0)+0x1,_0x561a39={..._0x1a1c74,..._0x41d344,'version':_0x50f3de,'updatedAt':Date['now']()};this[_0x10d683(0xd5)][_0x10d683(0x296)](_0x292eda,_0x561a39);try{await this['okdb'][_0x10d683(0x28b)]['_writer'][_0x10d683(0x1df)](()=>{const _0x2294c7=_0x10d683;this[_0x2294c7(0x1d2)][_0x2294c7(0x126)](_0x292eda,_0x561a39);});}finally{if(this[_0x10d683(0xd5)][_0x10d683(0x1bf)](_0x292eda)===_0x561a39)this[_0x10d683(0xd5)]['delete'](_0x292eda);}return _0x50f3de;}[_0x7e59cb(0x219)](_0x29f231){const _0x411172=_0x7e59cb;if(!this[_0x411172(0x17e)]())return[];this[_0x411172(0x229)]();const _0x3009a9=_0x29f231+'/',_0x44f02e=[];for(const {key:_0x43fd19,value:_0x401c7f}of this[_0x411172(0x1d2)]['getRange']({'start':_0x3009a9,'end':_0x3009a9+'ÿ'})){if(typeof _0x43fd19!=='string'||!_0x43fd19[_0x411172(0x165)](_0x3009a9))break;_0x44f02e[_0x411172(0x242)]({'key':_0x43fd19[_0x411172(0x1e0)](_0x3009a9['length']),'value':_0x401c7f});}return _0x44f02e;}[_0x7e59cb(0x262)](_0x109f6a){const _0x1d5139=_0x7e59cb;if(!this[_0x1d5139(0x17e)]())return null;return this[_0x1d5139(0x1f0)]['get'](_0x109f6a)??null;}async[_0x7e59cb(0x144)](_0x31df6d,_0x803b8a,_0x18dd22={}){const _0x4b3a5e=_0x7e59cb;if(!this['_ensureDesired']())return null;let _0x595dc5;return await this[_0x4b3a5e(0x13d)][_0x4b3a5e(0x28b)][_0x4b3a5e(0x226)][_0x4b3a5e(0x1df)](()=>{const _0x1f58bc=_0x4b3a5e,_0x329a7f=this[_0x1f58bc(0x1f0)][_0x1f58bc(0x1bf)](_0x31df6d)||{'epoch':0x0};_0x595dc5=(_0x329a7f[_0x1f58bc(0x1e1)]||0x0)+0x1,this[_0x1f58bc(0x1f0)][_0x1f58bc(0x126)](_0x31df6d,{..._0x329a7f,..._0x18dd22,'cmd':_0x803b8a,'epoch':_0x595dc5,'updatedAt':Date[_0x1f58bc(0x281)]()});}),_0x595dc5;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x573e35,'nodeKey':_0x467e6e,'logicalKey':_0x3a0ecf,'slotKey':_0x300894,'PROCESS_ENV':_0x532f67,'NODE_TYPE':_0x1a2a79},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x2237e1=_0x22d7b4;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x46878c=require$$0$4,{EVENTS:_0x3c1f43,CHANGE_ACTIONS:_0xe917bb}=requireOkdbEnums(),{LOOP:_0x547220}=requireOkdbLoopMonitor(),_0x589d40=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x38eed1=0x5,_0x267883=0x2710;class _0x4c07d9 extends _0x46878c{constructor(_0x513e7c,_0x4d44e2={}){const _0x51eb9f=_0x23ad;super(),this[_0x51eb9f(0x13d)]=_0x513e7c,this[_0x51eb9f(0x2b1)]=_0x4d44e2['quantum']??_0x589d40,this[_0x51eb9f(0x16d)]=_0x4d44e2[_0x51eb9f(0x1ea)]??_0x38eed1,this[_0x51eb9f(0x2c3)]=_0x4d44e2[_0x51eb9f(0x179)]??_0x267883,this['_started']=![],this[_0x51eb9f(0x1a3)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x51eb9f(0x1a0)]=null,this[_0x51eb9f(0x171)]=![],this[_0x51eb9f(0x209)]=new Set(),this['_onItem']=_0x59af0d=>this[_0x51eb9f(0xd0)](_0x59af0d),this['_onPoke']=_0x14d5af=>this[_0x51eb9f(0x135)](_0x14d5af),this[_0x51eb9f(0x1bc)]=()=>this[_0x51eb9f(0x298)]();}['start'](){const _0x42b110=_0x23ad;if(this['_started'])return;this[_0x42b110(0x172)]=!![];for(const [_0x4391fb,_0x1e5946]of this[_0x42b110(0x13d)][_0x42b110(0x161)]){if(_0x4391fb[_0x42b110(0x165)]('~'))continue;try{_0x1e5946[_0x42b110(0x1d1)]();}catch{}}for(const [_0xadff12,_0x1b199c]of this[_0x42b110(0x13d)]['_envs']){if(_0xadff12[_0x42b110(0x165)]('~'))continue;try{this[_0x42b110(0x23d)][_0x42b110(0x296)](_0xadff12,_0x1b199c[_0x42b110(0x21d)]()||0x0);}catch{}}const {events:_0x40d243}=this[_0x42b110(0x13d)];_0x40d243['on'](_0x3c1f43[_0x42b110(0x2f0)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x142)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x2a3)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x1ab)],this[_0x42b110(0x236)]),_0x40d243[_0x42b110(0x194)](_0x3c1f43[_0x42b110(0x187)],this[_0x42b110(0x1bc)]);}['stop'](){const _0x594938=_0x23ad;if(!this['_started'])return;this[_0x594938(0x172)]=![];const {events:_0x5efc6c}=this['okdb'];_0x5efc6c[_0x594938(0x232)](_0x3c1f43['ITEM_CREATE'],this['_onItem']),_0x5efc6c[_0x594938(0x232)](_0x3c1f43[_0x594938(0x142)],this[_0x594938(0x1e3)]),_0x5efc6c['off'](_0x3c1f43[_0x594938(0x2a3)],this[_0x594938(0x1e3)]),_0x5efc6c[_0x594938(0x232)](_0x3c1f43[_0x594938(0x1ab)],this['_onPoke']);try{_0x5efc6c['off'](_0x3c1f43[_0x594938(0x187)],this[_0x594938(0x1bc)]);}catch{}this[_0x594938(0x1a0)]&&(clearTimeout(this[_0x594938(0x1a0)]),this[_0x594938(0x1a0)]=null),this[_0x594938(0x1ff)][_0x594938(0x157)](),this[_0x594938(0x1a3)]['clear'](),this['_baselines'][_0x594938(0x157)](),this[_0x594938(0x209)][_0x594938(0x157)]();}[_0x2237e1(0x1d3)](_0x5ee511,_0x45e978,_0x1bbad9,_0x45c163){return _0x5ee511+'\x00'+_0x45e978+'\x00'+_0x1bbad9+'\x00'+_0x45c163;}[_0x2237e1(0x212)](_0x30e4bc,_0xd30508,_0x33ed93,_0x4e82b1){const _0x4de95f=_0x2237e1,_0x15b285=this['_dedupeKey'](_0x30e4bc,_0xd30508,_0x33ed93,_0x4e82b1);if(this[_0x4de95f(0x209)][_0x4de95f(0x254)](_0x15b285))return![];this[_0x4de95f(0x209)][_0x4de95f(0x145)](_0x15b285);if(this[_0x4de95f(0x209)][_0x4de95f(0x1f9)]>this['_dedupeMax']){const _0x402263=this[_0x4de95f(0x209)]['values']()[_0x4de95f(0x113)]()[_0x4de95f(0x10c)];this[_0x4de95f(0x209)]['delete'](_0x402263);}return!![];}[_0x2237e1(0xd0)](_0x553fee){const _0x2e2eff=_0x2237e1;if(!this[_0x2e2eff(0x172)]||!_0x553fee)return;const {env:_0xca1fee,type:_0x4cdb89,key:_0x1b0693,clock:_0x14243e,origin:_0xf2c78e,action:_0x5af85a,newValue:_0x308da8,oldValue:_0x3df825}=_0x553fee;if(_0xca1fee==null||_0x4cdb89==null||_0x1b0693==null)return;if(typeof _0xca1fee===_0x2e2eff(0x238)&&_0xca1fee[_0x2e2eff(0x165)]('~'))return;if(typeof _0x4cdb89==='string'&&_0x4cdb89[_0x2e2eff(0x165)]('~'))return;if(!this[_0x2e2eff(0x212)](_0xca1fee,_0x4cdb89,_0x1b0693,_0x14243e))return;const _0x5c1c15=_0x5af85a===_0xe917bb[_0x2e2eff(0xe5)]?_0x2e2eff(0x17d):_0x2e2eff(0x126);this[_0x2e2eff(0x11f)]('change',{'env':_0xca1fee,'type':_0x4cdb89,'key':_0x1b0693,'op':_0x5c1c15,'clock':_0x14243e,'origin':_0xf2c78e,'value':_0x5c1c15===_0x2e2eff(0x17d)?null:_0x308da8,'prevValue':_0x3df825});}[_0x2237e1(0x135)](_0xa65a2f){const _0x5bd67f=_0x2237e1;if(!this[_0x5bd67f(0x172)])return;if(!_0xa65a2f||typeof _0xa65a2f[_0x5bd67f(0x27a)]!==_0x5bd67f(0x238)||typeof _0xa65a2f[_0x5bd67f(0x243)]!=='string')return;const {env:_0x22fe64,type:_0x34c1a1}=_0xa65a2f;if(_0x22fe64[_0x5bd67f(0x165)]('~')||_0x34c1a1['startsWith']('~'))return;this[_0x5bd67f(0x1ff)]['set'](_0x22fe64+'\x00'+_0x34c1a1,{'env':_0x22fe64,'type':_0x34c1a1}),this[_0x5bd67f(0x2d9)]();}['_scheduleFlush'](){const _0x32aa3a=_0x2237e1;if(this[_0x32aa3a(0x1a0)])return;const _0x41aa4e=()=>{const _0x1e0bf8=_0x32aa3a;this['_flushTimer']=null,this[_0x1e0bf8(0x122)]()[_0x1e0bf8(0x2cd)](()=>{});};this[_0x32aa3a(0x1a0)]=setTimeout(_0x41aa4e,this['_flushDebounce']>0x0?this['_flushDebounce']:0x0);}async['_drain'](){const _0x3f7775=_0x2237e1;if(this[_0x3f7775(0x171)]){this['_scheduleFlush']();return;}this['_draining']=!![];try{const _0x8212ae=[...this['_pending']['values']()];this['_pending'][_0x3f7775(0x157)]();let _0x492705=![];for(const {env:_0xd009f0,type:_0x23a2f8}of _0x8212ae){try{const _0x4c688a=await this[_0x3f7775(0x1fc)](_0xd009f0,_0x23a2f8);if(_0x4c688a)_0x492705=!![];}catch{this[_0x3f7775(0x1ff)]['set'](_0xd009f0+'\x00'+_0x23a2f8,{'env':_0xd009f0,'type':_0x23a2f8}),_0x492705=!![];}}if(_0x492705||this[_0x3f7775(0x1ff)][_0x3f7775(0x1f9)]>0x0)this[_0x3f7775(0x2d9)]();}finally{this[_0x3f7775(0x171)]=![];}}async[_0x2237e1(0x1fc)](_0x5d46ca,_0x8b19dc){const _0x3ea0b2=_0x2237e1,_0x164be8=await this[_0x3ea0b2(0x13d)][_0x3ea0b2(0x2bd)](_0x5d46ca),_0x5dd470=_0x5d46ca+'\x00'+_0x8b19dc;!this['_cursors']['has'](_0x5dd470)&&(!this['_baselines'][_0x3ea0b2(0x254)](_0x5d46ca)&&(_0x164be8[_0x3ea0b2(0x1d1)](),this[_0x3ea0b2(0x23d)]['set'](_0x5d46ca,_0x164be8[_0x3ea0b2(0x21d)]()||0x0)),this['_cursors'][_0x3ea0b2(0x296)](_0x5dd470,this[_0x3ea0b2(0x23d)][_0x3ea0b2(0x1bf)](_0x5d46ca)));const _0x5679b0=this[_0x3ea0b2(0x1a3)][_0x3ea0b2(0x1bf)](_0x5dd470),_0x24b1fa=_0x164be8[_0x3ea0b2(0x21d)](_0x8b19dc)||0x0;if(_0x24b1fa<=_0x5679b0)return![];const _0x28c18c=_0x5679b0+this[_0x3ea0b2(0x2b1)],_0x169ebf=Math[_0x3ea0b2(0x249)](_0x24b1fa,_0x28c18c),_0x550810=_0x547220[_0x3ea0b2(0x2df)]?_0x547220['now']():0x0,_0x179b52=Array[_0x3ea0b2(0xc8)](_0x164be8['getChanges'](_0x8b19dc,_0x5679b0+0x1,_0x169ebf));let _0x5524b0=_0x5679b0;for(const _0x2deac0 of _0x179b52){const {clock:_0x4a6d9d,key:_0x106c56,action:_0x46298e,origin:_0x45b98e}=_0x2deac0;if(_0x4a6d9d>_0x5524b0)_0x5524b0=_0x4a6d9d;if(_0x106c56==null)continue;if(!this['_markSeen'](_0x5d46ca,_0x8b19dc,_0x106c56,_0x4a6d9d))continue;let _0x461c64,_0xe6519d;if(_0x46298e===_0xe917bb[_0x3ea0b2(0xe5)])_0x461c64=_0x3ea0b2(0x17d),_0xe6519d=null;else{const _0x1fa4dd=_0x164be8[_0x3ea0b2(0x1bf)](_0x8b19dc,_0x106c56);_0x1fa4dd==null?(_0x461c64=_0x3ea0b2(0x17d),_0xe6519d=null):(_0x461c64=_0x3ea0b2(0x126),_0xe6519d=_0x1fa4dd);}this[_0x3ea0b2(0x11f)](_0x3ea0b2(0x15e),{'env':_0x5d46ca,'type':_0x8b19dc,'key':_0x106c56,'op':_0x461c64,'clock':_0x4a6d9d,'origin':_0x45b98e,'value':_0xe6519d});}if(_0x547220[_0x3ea0b2(0x2df)])_0x547220[_0x3ea0b2(0x176)]('feed:'+_0x5d46ca+':'+_0x8b19dc,_0x547220[_0x3ea0b2(0x281)]()-_0x550810,'n='+_0x179b52[_0x3ea0b2(0x273)]);return this[_0x3ea0b2(0x1a3)][_0x3ea0b2(0x296)](_0x5dd470,Math[_0x3ea0b2(0x213)](_0x5524b0,_0x169ebf)),_0x164be8['getClock'](_0x8b19dc)>_0x169ebf;}[_0x2237e1(0x285)](){const _0x282225=_0x2237e1;return{'started':this[_0x282225(0x172)],'quantum':this[_0x282225(0x2b1)],'flushDebounce':this[_0x282225(0x16d)],'cursors':Object[_0x282225(0x2c4)]([...this['_cursors'][_0x282225(0x2e5)]()]['map'](([_0x427512,_0x110658])=>[_0x427512[_0x282225(0x235)]('\x00',':'),_0x110658])),'pending':this[_0x282225(0x1ff)]['size'],'seen':this[_0x282225(0x209)]['size']};}}return _0x4c07d9[_0x2237e1(0x1f5)]=_0x589d40,okdbChangefeed={'OKDBChangefeed':_0x4c07d9},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2ee492=_0x22d7b4;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x50b153=require$$1$1,_0x17a294=require$$1,{EVENTS:_0x202811}=requireOkdbEnums(),_0x543808=require$$0$3,{slotKey:_0xbe14c2}=requireOkdbProcessRegistry(),_0x38877c=0xfa,_0x4320c9=0xfa0,_0x26ff64=0x5,_0x5cfb6e=0x2710,_0x5d24e5=0xbb8,_0x2f0390=0x7d0,_0x563ecb='__okdbCluster',_0x4362bb=_0x2ee492(0x24f),_0x2b1558=_0x2ee492(0x2c7),_0x50a606=_0x2ee492(0x14b),_0x2624cb=[_0x202811[_0x2ee492(0x1e8)],_0x202811[_0x2ee492(0x123)],_0x202811['FTS_DROP'],_0x202811['FTS_RESET'],_0x202811[_0x2ee492(0x11a)],_0x202811[_0x2ee492(0x133)],_0x202811[_0x2ee492(0x2f3)],_0x202811[_0x2ee492(0xcd)],_0x2ee492(0x201),_0x2ee492(0x1af),_0x2ee492(0x1c1),'processor:paused',_0x2ee492(0xc4),'processor:retry'],_0x48cbbd=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x1f51a0({workers:_0x534e7e,makeOkdb:_0x56bbe7,port:_0x35cb1e,primaryOkdb:_0x21d591,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0xa1b305=_0x2ee492;if(_0x50b153[_0xa1b305(0x118)])return childEntry&&_0x50b153[_0xa1b305(0x2d6)]({'exec':_0x17a294[_0xa1b305(0x265)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x4824e4=_0xa1b305,_0x338e91=[];for(let _0x2c09f8=0x0;_0x2c09f8<process['execArgv'][_0x4824e4(0x273)];_0x2c09f8++){const _0x1bed64=process['execArgv'][_0x2c09f8];if(_0x1bed64[_0x4824e4(0x165)](_0x4824e4(0x109))||_0x1bed64[_0x4824e4(0x165)]('--watch')||_0x1bed64[_0x4824e4(0x165)]('--inspect'))continue;if(_0x1bed64==='-e'||_0x1bed64==='--eval'||_0x1bed64==='-p'||_0x1bed64===_0x4824e4(0x10a)){_0x2c09f8++;continue;}_0x338e91[_0x4824e4(0x242)](_0x1bed64);}return _0x338e91;})())}),_0x23b690({'workers':_0x534e7e,'port':_0x35cb1e,'primaryOkdb':_0x21d591,'workerEnv':workerEnv});return _0x1bd1dd({'makeOkdb':_0x56bbe7,'port':_0x35cb1e});}function _0x23b690({workers:_0x3eed5c,port:_0x489e36,primaryOkdb:_0x36f1b3,workerEnv:_0x112e99}){const _0x491653=_0x2ee492,_0x30ef9f=new Map(),_0x1852ab=new Map();let _0x2e926e=![];const _0x364111=_0x384346=>_0x384346?.['__okdbSlot'],_0x46acfd=_0x30db62=>{const _0x3f5695=_0x23ad,_0xed62e3=_0x50b153['fork']({...process.env,..._0x112e99||{},'OKDB_CLUSTER_SLOT':String(_0x30db62)});return _0xed62e3['__okdbSlot']=_0x30db62,_0x30ef9f[_0x3f5695(0x296)](_0xed62e3[_0x3f5695(0x2d3)][_0x3f5695(0x2de)],{'worker':_0xed62e3,'startedAt':Date[_0x3f5695(0x281)](),'slot':_0x30db62}),_0xed62e3['on'](_0x3f5695(0x231),_0x5cf2c7=>{const _0x15e09a=_0x3f5695;console[_0x15e09a(0x2c7)]('[okdb-cluster]\x20worker\x20pid='+_0xed62e3['process'][_0x15e09a(0x2de)]+_0x15e09a(0xc1)+(_0x5cf2c7?.[_0x15e09a(0xf9)]??_0x5cf2c7));}),_0xed62e3['on'](_0x3f5695(0x1c0),()=>_0x37d404()),_0xed62e3;},_0x3017ce=_0x5d6b5e=>{const _0x5eb18e=_0x23ad;for(const {worker:_0x539718}of _0x30ef9f['values']()){if(_0x539718[_0x5eb18e(0x163)]()||!_0x539718[_0x5eb18e(0x2ec)]())continue;try{_0x539718[_0x5eb18e(0x1dc)](_0x5d6b5e);}catch{}}};_0x36f1b3?.['_activateProcesses']?.({'kind':_0x491653(0x237),'listenAddr':':'+_0x489e36})[_0x491653(0x2cd)](()=>{}),_0x36f1b3?.['processes']?.[_0x491653(0x2e3)]?.({'workersConfigured':_0x3eed5c});const _0xa9dd90={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x37d404=()=>{const _0x24cc38=_0x491653,_0x490b96=_0x36f1b3?.[_0x24cc38(0x20e)];if(!_0x490b96||!_0x490b96['_isWriter'])return;const _0x131e40=_0x490b96[_0x24cc38(0x1e2)];for(const {worker:_0x313211,startedAt:_0x4a7723,slot:_0xab1e06,stats:_0x1e2dca,processing:_0x62a7cb}of _0x30ef9f['values']()){if(_0x313211[_0x24cc38(0x163)]())continue;const _0x4c0f90=_0x490b96[_0x24cc38(0x2a4)]?.()&&_0x490b96['getDesired'](_0x24cc38(0xef),_0x4d5c87(_0xab1e06))?.['decommission']===!![];_0x490b96[_0x24cc38(0x124)]({'pid':_0x313211[_0x24cc38(0x2d3)]['pid'],'startedAt':_0x4a7723,'kind':_0x24cc38(0x13a),'supervisorKey':_0x131e40,'slot':_0xab1e06,'slotKey':_0x4d5c87(_0xab1e06),'role':_0xa9dd90,'listenAddr':':'+_0x489e36,'lifecycle':_0x4c0f90?_0x24cc38(0x21b):_0x24cc38(0x1fb),'processing':_0x62a7cb??null,'stats':_0x1e2dca??null})['catch'](()=>{});}},_0x4d5c87=_0x40f449=>_0xbe14c2(_0x491653(0x2c2)+_0x489e36,_0x40f449),_0x4453c2=_0x360a79=>{const _0x38d75a=_0x491653,_0x3314ce=_0x36f1b3?.[_0x38d75a(0x20e)];if(!_0x3314ce?.[_0x38d75a(0x2a4)]?.())return![];return _0x3314ce[_0x38d75a(0x24d)]('slot',_0x4d5c87(_0x360a79))?.[_0x38d75a(0x29b)]===!![];};for(let _0x12adf8=0x0;_0x12adf8<_0x3eed5c;_0x12adf8++){const _0x321926=_0x4453c2(_0x12adf8);_0x1852ab[_0x491653(0x296)](_0x12adf8,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x321926,'respawnTimer':null}),_0x321926?console['log']('[okdb-cluster]\x20slot='+_0x12adf8+_0x491653(0x1bd)):_0x46acfd(_0x12adf8);}const _0x2ba3ba=()=>{const _0x1b4c15=_0x491653,_0x445889=_0x36f1b3?.[_0x1b4c15(0x20e)];if(!_0x445889?.[_0x1b4c15(0x2d8)]||!_0x445889[_0x1b4c15(0x2a4)]?.())return;for(const [_0x1acd05,_0x3d1089]of _0x1852ab[_0x1b4c15(0x2e5)]()){const _0x45c2c4=_0x445889[_0x1b4c15(0x24d)]('slot',_0x4d5c87(_0x1acd05)),_0x522f20=_0x45c2c4?.['decommission']===!![],_0x2983c8=_0x45c2c4?.[_0x1b4c15(0x15b)]===!![];if(_0x522f20&&!_0x3d1089[_0x1b4c15(0x105)]){_0x3d1089[_0x1b4c15(0x105)]=!![];_0x3d1089[_0x1b4c15(0x26e)]&&(clearTimeout(_0x3d1089[_0x1b4c15(0x26e)]),_0x3d1089[_0x1b4c15(0x26e)]=null);for(const {worker:_0x4b7bf0}of _0x30ef9f['values']()){if(_0x364111(_0x4b7bf0)!==_0x1acd05||_0x4b7bf0['isDead']())continue;try{if(_0x2983c8)_0x4b7bf0[_0x1b4c15(0x2d3)]['kill']('SIGKILL');else _0x4b7bf0['isConnected']()&&_0x4b7bf0[_0x1b4c15(0x1b1)]();}catch{}}console['log'](_0x1b4c15(0x276)+(_0x2983c8?_0x1b4c15(0xec):'decommissioned')+_0x1b4c15(0xd9)+_0x1acd05+_0x1b4c15(0x284));}else{if(!_0x522f20&&_0x3d1089[_0x1b4c15(0x105)]&&_0x45c2c4){_0x3d1089[_0x1b4c15(0x105)]=![],_0x3d1089[_0x1b4c15(0xd6)]=[],_0x3d1089[_0x1b4c15(0x14a)]=0x0;const _0x448050=[..._0x30ef9f[_0x1b4c15(0x1dd)]()][_0x1b4c15(0x160)](({worker:_0x1f42ef})=>_0x364111(_0x1f42ef)===_0x1acd05&&!_0x1f42ef[_0x1b4c15(0x163)]());!_0x448050&&!_0x2e926e&&(_0x46acfd(_0x1acd05),console['log'](_0x1b4c15(0x11d)+_0x1acd05));}}}},_0x2805d7=()=>{try{_0x2ba3ba();}catch{}};_0x36f1b3?.[_0x491653(0x139)]?.['on']?.(_0x202811[_0x491653(0xc6)],_0x2805d7);const _0x6c7c39=[];if(_0x36f1b3?.[_0x491653(0x139)]?.['on'])for(const _0x22f1b3 of _0x2624cb){const _0x338b7e=_0xeed357=>{_0x3017ce({[_0x563ecb]:_0x4362bb,'event':_0x22f1b3,'data':_0xeed357??{}});};_0x36f1b3[_0x491653(0x139)]['on'](_0x22f1b3,_0x338b7e),_0x6c7c39[_0x491653(0x242)]({'event':_0x22f1b3,'handler':_0x338b7e});}const _0x34b625=setInterval(()=>{_0x2ba3ba(),_0x37d404();},_0x48cbbd);_0x34b625[_0x491653(0x1b8)]?.();const _0x325bd8=(_0x55ca48,_0xbb7c1a)=>{const _0x4df44b=_0x491653;if(!_0xbb7c1a||typeof _0xbb7c1a!=='object'||_0xbb7c1a[_0x563ecb]!==_0x2b1558)return;if(!_0x36f1b3?.[_0x4df44b(0x2c7)]?.[_0x4df44b(0x2ea)])return;const _0x8f67f8=_0xbb7c1a[_0x4df44b(0x16f)]||{};_0x36f1b3['log'][_0x4df44b(0x2ea)]({..._0x8f67f8,'msg':'[w'+_0xbb7c1a[_0x4df44b(0xef)]+']\x20'+(_0x8f67f8['msg']??''),'meta':{..._0x8f67f8[_0x4df44b(0x14e)]||{},'worker':_0xbb7c1a[_0x4df44b(0xef)],'workerPid':_0xbb7c1a[_0x4df44b(0x2de)]}});};_0x50b153['on'](_0x491653(0xf9),_0x325bd8);const _0x93e07b=(_0x21dc4a,_0xc592de)=>{const _0x42dd4f=_0x491653;if(!_0xc592de||typeof _0xc592de!==_0x42dd4f(0x29e)||_0xc592de[_0x563ecb]!==_0x50a606)return;const _0xb269d8=_0x30ef9f[_0x42dd4f(0x1bf)](_0x21dc4a['process'][_0x42dd4f(0x2de)]);if(_0xb269d8){_0xb269d8[_0x42dd4f(0x14b)]={..._0xc592de['stats'],'at':Date[_0x42dd4f(0x281)]()};if(_0xc592de[_0x42dd4f(0x1bb)]!==undefined)_0xb269d8[_0x42dd4f(0x1bb)]=_0xc592de[_0x42dd4f(0x1bb)];}};_0x50b153['on'](_0x491653(0xf9),_0x93e07b),_0x50b153['on'](_0x491653(0x25a),(_0x5223f1,_0x4cf79a,_0x454545)=>{const _0x477e58=_0x491653,_0x2b2b7b=_0x5223f1[_0x477e58(0x2d3)][_0x477e58(0x2de)],_0x4b1f22=_0x364111(_0x5223f1),_0x1705e1=_0x30ef9f['get'](_0x2b2b7b);if(_0x1705e1&&_0x36f1b3?.['processes'])_0x36f1b3[_0x477e58(0x20e)][_0x477e58(0x2e6)](_0x2b2b7b+':'+_0x1705e1[_0x477e58(0x148)])[_0x477e58(0x2cd)](()=>{});_0x30ef9f[_0x477e58(0x102)](_0x2b2b7b),console[_0x477e58(0x2c7)](_0x477e58(0x1f4)+_0x2b2b7b+_0x477e58(0xdb)+(_0x4b1f22??'?')+_0x477e58(0x143)+(_0x477e58(0x1eb)+_0x4cf79a+',\x20signal='+(_0x454545??_0x477e58(0x206))+_0x477e58(0x279)+_0x30ef9f[_0x477e58(0x1f9)]+_0x477e58(0x2a2))),_0x37d404();if(_0x2e926e||_0x4b1f22==null)return;const _0x3f56a0=_0x1852ab[_0x477e58(0x1bf)](_0x4b1f22);if(!_0x3f56a0||_0x3f56a0[_0x477e58(0x105)])return;const _0x7b6bf8=Date['now']();_0x3f56a0[_0x477e58(0xd6)]['push'](_0x7b6bf8),_0x3f56a0[_0x477e58(0xd6)]=_0x3f56a0[_0x477e58(0xd6)]['filter'](_0x11ee84=>_0x7b6bf8-_0x11ee84<=_0x5cfb6e);if(_0x3f56a0['deaths'][_0x477e58(0x273)]>=_0x26ff64){_0x3f56a0[_0x477e58(0x105)]=!![],console[_0x477e58(0x231)](_0x477e58(0xe9)+_0x4b1f22+_0x477e58(0x2cb)+_0x3f56a0[_0x477e58(0xd6)][_0x477e58(0x273)]+_0x477e58(0x182)+(_0x5cfb6e+_0x477e58(0x2c5)+_0x30ef9f[_0x477e58(0x1f9)]+_0x477e58(0x141)));return;}_0x3f56a0[_0x477e58(0x14a)]++;const _0xe250db=Math[_0x477e58(0x249)](_0x4320c9,_0x38877c*0x2**(_0x3f56a0[_0x477e58(0x14a)]-0x1));console[_0x477e58(0x2c7)](_0x477e58(0x2af)+_0x4b1f22+'\x20in\x20'+_0xe250db+_0x477e58(0x119)+_0x3f56a0[_0x477e58(0x14a)]+')'),_0x3f56a0[_0x477e58(0x26e)]=setTimeout(()=>{const _0x5bf880=_0x477e58;_0x3f56a0[_0x5bf880(0x26e)]=null;if(_0x2e926e||_0x3f56a0[_0x5bf880(0x105)])return;const _0x141b2c=_0x46acfd(_0x4b1f22);_0x141b2c[_0x5bf880(0x194)](_0x5bf880(0x1b5),()=>{const _0x408ce7=_0x5bf880;if(_0x1852ab[_0x408ce7(0x1bf)](_0x4b1f22)===_0x3f56a0)_0x3f56a0[_0x408ce7(0x14a)]=0x0;});},_0xe250db),_0x3f56a0[_0x477e58(0x26e)][_0x477e58(0x1b8)]?.();});const _0x2cadae=[..._0x30ef9f[_0x491653(0x216)]()];console[_0x491653(0x2c7)]('[okdb-cluster]\x20primary\x20pid='+process[_0x491653(0x2de)]+_0x491653(0x2dd)+_0x3eed5c+_0x491653(0xc2)+_0x489e36+':\x20'+('['+_0x2cadae['join'](',\x20')+']'));const _0x3d7efc={'_isClusterController':!![],'port':_0x489e36,'primaryOkdb':_0x36f1b3??null,'status'(){const _0x87350c=_0x491653;return{'clustered':!![],'primaryPid':process[_0x87350c(0x2de)],'port':_0x489e36,'primaryRole':_0x36f1b3?.['role']??null,'processorPid':null,'supervisorPid':process[_0x87350c(0x2de)],'workers':[..._0x30ef9f[_0x87350c(0x1dd)]()][_0x87350c(0x188)](({worker:_0x41ab3c})=>({'pid':_0x41ab3c[_0x87350c(0x2d3)][_0x87350c(0x2de)],'id':_0x41ab3c['id'],'dead':_0x41ab3c[_0x87350c(0x163)]()}))};},async 'close'(){const _0x2eced8=_0x491653;_0x2e926e=!![];for(const _0x8063dc of _0x1852ab[_0x2eced8(0x1dd)]()){_0x8063dc[_0x2eced8(0x105)]=!![],_0x8063dc[_0x2eced8(0x26e)]&&(clearTimeout(_0x8063dc[_0x2eced8(0x26e)]),_0x8063dc[_0x2eced8(0x26e)]=null);}clearInterval(_0x34b625),_0x50b153['off'](_0x2eced8(0xf9),_0x325bd8),_0x50b153[_0x2eced8(0x232)]('message',_0x93e07b),_0x36f1b3?.[_0x2eced8(0x139)]?.[_0x2eced8(0x232)]?.(_0x202811[_0x2eced8(0xc6)],_0x2805d7);if(_0x36f1b3?.[_0x2eced8(0x139)]?.[_0x2eced8(0x232)])for(const {event:_0x430a41,handler:_0x4f86c0}of _0x6c7c39){try{_0x36f1b3[_0x2eced8(0x139)][_0x2eced8(0x232)](_0x430a41,_0x4f86c0);}catch{}}_0x6c7c39[_0x2eced8(0x273)]=0x0;const _0x18ebe0=[..._0x30ef9f['values']()][_0x2eced8(0x188)](({worker:_0x214a1c})=>_0x214a1c);if(_0x18ebe0['length']===0x0)return;await Promise[_0x2eced8(0x29a)](_0x18ebe0[_0x2eced8(0x188)](_0x4b1a65=>new Promise(_0x47f0e8=>{const _0x1921ad=_0x2eced8;if(_0x4b1a65['isDead']()){_0x47f0e8();return;}let _0xdba262=![];const _0x10c8fc=()=>{if(_0xdba262)return;_0xdba262=!![];if(_0x127826)clearTimeout(_0x127826);_0x47f0e8();};_0x4b1a65[_0x1921ad(0x194)](_0x1921ad(0x25a),_0x10c8fc);const _0x127826=setTimeout(()=>{const _0x127cd5=_0x1921ad;try{_0x4b1a65[_0x127cd5(0x2d3)][_0x127cd5(0x15b)]();}catch{}},_0x5d24e5+0x1f4);_0x127826[_0x1921ad(0x1b8)]?.();try{_0x4b1a65[_0x1921ad(0x1b1)]();}catch{try{_0x4b1a65[_0x1921ad(0x2d3)][_0x1921ad(0x15b)]();}catch{}}})));}};return _0x3d7efc;}async function _0x1bd1dd({makeOkdb:_0x16ea72,port:_0x937de7}){const _0x5d1e9c=_0x2ee492,_0x25df7e=await _0x16ea72();return _0x36d0ab(_0x25df7e),_0x25df7e[_0x5d1e9c(0x158)][_0x5d1e9c(0x19c)](_0x937de7);}function _0x36d0ab(_0x3c68d4){const _0x3303d3=_0x2ee492;if(!_0x3c68d4||_0x3c68d4[_0x3303d3(0x2b2)])return;_0x3c68d4['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x3103ff}=requireOkdbChangefeed(),_0x231bb3=_0x3c68d4['_adminRelay'];if(_0x231bb3&&typeof _0x231bb3[_0x3303d3(0xe3)]===_0x3303d3(0x156)){const _0x1b5e8f=new _0x3103ff(_0x3c68d4);_0x1b5e8f[_0x3303d3(0x2b7)](),_0x231bb3[_0x3303d3(0xe3)](_0x1b5e8f),_0x3c68d4[_0x3303d3(0x2d2)]=_0x1b5e8f;}}catch(_0x3fd195){_0x3c68d4[_0x3303d3(0x2c7)]?.[_0x3303d3(0x1ce)]?.(_0x3303d3(0x1cc)+(_0x3fd195?.[_0x3303d3(0xf9)]??_0x3fd195),{'feature':_0x3303d3(0xf1)});}const _0xbd5b7d=_0x428851=>{const _0x403a62=_0x3303d3;if(!_0x428851||typeof _0x428851!==_0x403a62(0x29e)||_0x428851[_0x563ecb]==null)return;if(_0x428851[_0x563ecb]===_0x4362bb)try{_0x3c68d4[_0x403a62(0xd7)]?.[_0x403a62(0x294)]?.(_0x428851[_0x403a62(0x2c1)],_0x428851[_0x403a62(0x1c8)]);}catch{}};process['on']('message',_0xbd5b7d),_0x3c68d4[_0x3303d3(0x22a)]=_0xbd5b7d;{let _0x34336f=process[_0x3303d3(0x136)](),_0x5b46d8=Date[_0x3303d3(0x281)]();const _0x1bf3fe=()=>{const _0xa4b108=_0x3303d3;if(typeof process[_0xa4b108(0x1dc)]!==_0xa4b108(0x156)||!process[_0xa4b108(0xc5)])return;const _0x1b07d0=Date[_0xa4b108(0x281)](),_0x473b41=process['cpuUsage'](),_0x10f65b=(_0x1b07d0-_0x5b46d8)*0x3e8,_0x4ac6e1=_0x473b41['user']-_0x34336f[_0xa4b108(0x151)]+(_0x473b41[_0xa4b108(0x22c)]-_0x34336f['system']),_0x4e7215=_0x10f65b>0x0?Math[_0xa4b108(0x249)](0x64,Math[_0xa4b108(0x1b7)](_0x4ac6e1/(_0x10f65b*(_0x543808[_0xa4b108(0x18d)]()[_0xa4b108(0x273)]||0x1))*0x64)):0x0;_0x34336f=_0x473b41,_0x5b46d8=_0x1b07d0;const _0x27c962=process[_0xa4b108(0x295)]();let _0x4f2bd9=null;try{_0x4f2bd9=_0x3c68d4[_0xa4b108(0x2b8)]?.[_0xa4b108(0xed)]?_0x3c68d4['processes']?.[_0xa4b108(0x24b)]?.()??null:null;}catch{}try{process['send']({[_0x563ecb]:_0x50a606,'stats':{'rss':_0x27c962[_0xa4b108(0x16e)],'heapUsed':_0x27c962[_0xa4b108(0xd4)],'heapTotal':_0x27c962['heapTotal'],'external':_0x27c962[_0xa4b108(0x239)],'cpuPct':_0x4e7215,'cpuWindowMs':Math[_0xa4b108(0x1b7)](_0x10f65b/0x3e8)||null},'processing':_0x4f2bd9});}catch{}},_0x2c7229=Math[_0x3303d3(0x213)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x416cf6=setInterval(_0x1bf3fe,_0x2c7229);_0x416cf6[_0x3303d3(0x1b8)]?.(),_0x1bf3fe();for(const _0x5a8596 of[_0x3303d3(0x1c4),_0x3303d3(0xc4)]){_0x3c68d4[_0x3303d3(0x139)]?.['on']?.(_0x5a8596,()=>{try{_0x1bf3fe();}catch{}});}}let _0x535bfb=![];const _0x4feb23=async _0x5e4563=>{const _0x275b91=_0x3303d3;if(_0x535bfb)return;_0x535bfb=!![];const _0x2c943f=setTimeout(()=>process[_0x275b91(0x25a)](_0x5e4563),_0x5d24e5);_0x2c943f[_0x275b91(0x1b8)]?.();try{await _0x3c68d4['close']?.();}catch{}process[_0x275b91(0x25a)](_0x5e4563);};process['on']('disconnect',()=>_0x4feb23(0x0));if(process[_0x3303d3(0x100)]!==_0x3303d3(0x2a0)){const _0x2ee181=setInterval(()=>{if(process['ppid']===0x1)_0x4feb23(0x0);},_0x2f0390);_0x2ee181[_0x3303d3(0x1b8)]?.(),_0x3c68d4[_0x3303d3(0x244)]=_0x2ee181;}}return okdbCluster={'runClustered':_0x1f51a0,'attachWorkerCluster':_0x36d0ab},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x1d56e9=_0x22d7b4;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x38071a=require$$0$5,{attachWorkerCluster:_0x2b4ebf}=requireOkdbCluster();async function _0x48edc9(){const _0x2814d9=_0x23ad,_0x5c12e1=process.env.OKDB_HTTP_CHILD;if(!_0x5c12e1)throw new Error(_0x2814d9(0x184));const {rootPath:_0x468d23,port:_0x59f28c,options:options={},logLevel:logLevel=_0x2814d9(0x190)}=JSON[_0x2814d9(0xe4)](_0x5c12e1);if(!_0x468d23||!_0x59f28c)throw new Error(_0x2814d9(0x255));const _0x402880=new _0x38071a(_0x468d23,{...options,'engines':![],'processors':![],'compaction':![]});_0x402880[_0x2814d9(0x2c7)][_0x2814d9(0x272)]?.();const _0xdfb2b=process.env.OKDB_CLUSTER_SLOT??'?',_0xe98e9e={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x4554ee=_0xe98e9e[logLevel]??_0xe98e9e[_0x2814d9(0x190)];_0x402880[_0x2814d9(0x2c7)][_0x2814d9(0x2ef)](_0x445dd1=>{const _0x392d26=_0x2814d9;if((_0xe98e9e[_0x445dd1[_0x392d26(0x2ac)]]??0x1)<_0x4554ee)return;try{process[_0x392d26(0x1dc)]?.({'__okdbCluster':_0x392d26(0x2c7),'slot':_0xdfb2b,'pid':process[_0x392d26(0x2de)],'entry':_0x445dd1});}catch{}}),await _0x402880[_0x2814d9(0x2ae)](),_0x2b4ebf(_0x402880),await _0x402880['http'][_0x2814d9(0x19c)](_0x59f28c);}return _0x48edc9()[_0x1d56e9(0x2cd)](_0x242a2d=>{const _0x146184=_0x1d56e9;try{process[_0x146184(0x1dc)]?.({'__okdbCluster':_0x146184(0x2c7),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x146184(0x2de)],'entry':{'level':_0x146184(0x231),'msg':_0x146184(0x166)+(_0x242a2d?.[_0x146184(0xf9)]??_0x242a2d)}});}catch{}process[_0x146184(0x25a)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x22d7b4(0xfb)]=okdbHttpWorkerChild;
1
+ 'use strict';function _0x5e6c(_0x241df7,_0x3d3c2c){_0x241df7=_0x241df7-0x163;const _0x7d069e=_0x7d06();let _0x5e6cec=_0x7d069e[_0x241df7];return _0x5e6cec;}const _0x37b856=_0x5e6c;(function(_0x54eb52,_0x99b820){const _0x37001e=_0x5e6c,_0x338129=_0x54eb52();while(!![]){try{const _0x505e73=-parseInt(_0x37001e(0x16a))/0x1*(parseInt(_0x37001e(0x1bd))/0x2)+parseInt(_0x37001e(0x2ca))/0x3+-parseInt(_0x37001e(0x164))/0x4+-parseInt(_0x37001e(0x2a2))/0x5*(-parseInt(_0x37001e(0x23f))/0x6)+parseInt(_0x37001e(0x21e))/0x7+parseInt(_0x37001e(0x34a))/0x8*(-parseInt(_0x37001e(0x252))/0x9)+-parseInt(_0x37001e(0x301))/0xa*(-parseInt(_0x37001e(0x22e))/0xb);if(_0x505e73===_0x99b820)break;else _0x338129['push'](_0x338129['shift']());}catch(_0xabe90e){_0x338129['push'](_0x338129['shift']());}}}(_0x7d06,0x74606));var require$$0$5=require(_0x37b856(0x206)),require$$1$1=require(_0x37b856(0x31d)),require$$1=require(_0x37b856(0x291)),require$$0$3=require('os'),require$$2=require(_0x37b856(0x2e1)),require$$0=require(_0x37b856(0x190)),require$$0$2=require('perf_hooks'),require$$0$1=require('fs'),require$$0$4=require(_0x37b856(0x396));function getDefaultExportFromCjs(_0x1a47e9){const _0x3e6b57=_0x37b856;return _0x1a47e9&&_0x1a47e9[_0x3e6b57(0x384)]&&Object[_0x3e6b57(0x34b)][_0x3e6b57(0x239)]['call'](_0x1a47e9,'default')?_0x1a47e9[_0x3e6b57(0x2a1)]:_0x1a47e9;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x57ddda=_0x37b856;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x7aef76={'PUT':_0x57ddda(0x25d),'REMOVE':'remove','INDEX_DROP':_0x57ddda(0x381),'INDEX_REGISTER':_0x57ddda(0x338),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x57ddda(0x32a),'TYPE_DROP':_0x57ddda(0x279),'FTS_REGISTER':_0x57ddda(0x24b),'FTS_DROP':_0x57ddda(0x1e8),'FTS_RESET':_0x57ddda(0x26f),'SCHEMA_SET':_0x57ddda(0x2fa),'SCHEMA_DROP':_0x57ddda(0x1a6),'TTL_SET':'setTtl','TTL_CLEAR':_0x57ddda(0x315)},_0x43bf74={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x57ddda(0x2b3),'SYSTEM_CLOCK_CHANGE':_0x57ddda(0x236),'SYSTEM_POKE':_0x57ddda(0x1e6),'SYSTEM_DRAIN':_0x57ddda(0x28e),'SYSTEM_TYPE_DROP':_0x57ddda(0x25e),'SYSTEM_PROC':_0x57ddda(0x30c),'SYSTEM_BUS_STATE_CHANGE':_0x57ddda(0x2e2),'ITEM_CREATE':_0x57ddda(0x2fd),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x57ddda(0x358),'INDEX_RESET':'index:reset','INDEX_READY':'index:ready','INDEX_PROGRESS':_0x57ddda(0x177),'VIEW_PROGRESS':_0x57ddda(0x243),'INDEX_DROP':_0x57ddda(0x281),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x57ddda(0x2e9),'FTS_DROP':'fts:drop','FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x57ddda(0x17e),'UNIQUE_VIOLATION':_0x57ddda(0x1ba),'UNIQUE_VIOLATION_RESOLVED':_0x57ddda(0x20c),'REF_VIOLATION':_0x57ddda(0x226),'REF_VIOLATION_RESOLVED':_0x57ddda(0x196),'SYNC_APPLY':_0x57ddda(0x2bd),'TXN_START':_0x57ddda(0x272),'TXN_END':_0x57ddda(0x21d),'TXN_ROLLBACK':_0x57ddda(0x354),'TYPE_REGISTERED':_0x57ddda(0x2d2),'TYPE_DROP':_0x57ddda(0x37a),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x57ddda(0x1dc),'SYSTEM_ENV_RELEASE':_0x57ddda(0x251),'TTL_EXPIRED':_0x57ddda(0x35b),'TTL_SET':_0x57ddda(0x308),'TTL_CLEAR':_0x57ddda(0x2ff),'LICENSE_INVALID':_0x57ddda(0x391),'LICENSE_ADDED':_0x57ddda(0x35d),'LICENSE_ACTIVATED':_0x57ddda(0x36e),'LICENSE_REMOVED':_0x57ddda(0x1fb)},_0x344b0f={'CREATING':'creating','RESETTING':_0x57ddda(0x1c2),'READY':_0x57ddda(0x180),'DROPPING':_0x57ddda(0x38e),'WAITING':_0x57ddda(0x18a)},_0x4f9e3e={'CREATED':_0x57ddda(0x389),'STARTING':'starting','STARTED':_0x57ddda(0x35c),'STOPPING':'stopping','STOPPED':_0x57ddda(0x2d7)},_0x35d611={'CREATING':_0x57ddda(0x361),'READY':_0x57ddda(0x180),'HALTED':'halted','STOPPED':_0x57ddda(0x2d7),'RESETTING':_0x57ddda(0x1c2)},_0x7a3d41=Object[_0x57ddda(0x332)]({'POKE':_0x57ddda(0x2de),'DRAIN':_0x57ddda(0x33d),'TYPE_DROP':'bus:type_drop','PROC':_0x57ddda(0x2a0),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x7a3d41,'CHANGE_ACTIONS':_0x7aef76,'EVENTS':_0x43bf74,'INDEX_STATE':_0x344b0f,'OKDB_STATE':_0x4f9e3e,'VIEW_STATE':_0x35d611},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x34608e=_0x37b856;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x57c551,performance:_0x468338}=require$$0,_0x4a41a2=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x34608e(0x2b8),_0x4611f1=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x672ed4=process.env.OKDB_LOOP_LAG_ALL==='1',_0x5d778c=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x374f2d{constructor(){const _0x367b86=_0x34608e;this['enabled']=_0x4a41a2,this[_0x367b86(0x32d)]=new Map(),this['_h']=null,this[_0x367b86(0x2c0)]=null,this[_0x367b86(0x2ea)]=![],this[_0x367b86(0x1d2)]=(_0x58dedb,_0xdbf3ca)=>process[_0x367b86(0x1b9)][_0x367b86(0x25a)](_0x58dedb+(_0xdbf3ca?'\x20'+JSON['stringify'](_0xdbf3ca):'')+'\x0a');}[_0x34608e(0x309)](){const _0x591b1d=_0x34608e;return _0x468338[_0x591b1d(0x309)]();}[_0x34608e(0x17f)](_0x5b9a2a){if(typeof _0x5b9a2a==='function')this['_log']=_0x5b9a2a;}[_0x34608e(0x1bf)](_0x43accc,_0x5df42e,_0x3a72cd){const _0x56c2ba=_0x34608e;if(!this['enabled'])return;let _0x2474f6=this[_0x56c2ba(0x32d)][_0x56c2ba(0x2d9)](_0x43accc);!_0x2474f6&&(_0x2474f6={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x56c2ba(0x32d)]['set'](_0x43accc,_0x2474f6)),_0x2474f6['ms']+=_0x5df42e,_0x2474f6['count']+=0x1,_0x5df42e>_0x2474f6[_0x56c2ba(0x349)]&&(_0x2474f6['maxMs']=_0x5df42e,_0x2474f6['maxExtra']=_0x3a72cd||'');}['start'](_0x4d70c6){const _0x5ed103=_0x34608e;if(!this['enabled']||this[_0x5ed103(0x2ea)])return;this['_started']=!![];if(_0x4d70c6)this[_0x5ed103(0x1d2)]=_0x4d70c6;this['_h']=_0x57c551({'resolution':0xa}),this['_h'][_0x5ed103(0x25c)](),this['_timer']=setInterval(()=>this['_report'](),_0x4611f1);if(this['_timer']['unref'])this[_0x5ed103(0x2c0)][_0x5ed103(0x38b)]();}[_0x34608e(0x2eb)](_0x49295a){const _0x54c951=_0x34608e;if(!this['_windowCbs'])this['_windowCbs']=new Set();this[_0x54c951(0x254)][_0x54c951(0x23c)](_0x49295a);if(!this[_0x54c951(0x2ea)])this['_startAdmission']();}[_0x34608e(0x172)](_0x55aeaf){const _0x2b0968=_0x34608e;this[_0x2b0968(0x254)]?.[_0x2b0968(0x18b)](_0x55aeaf);}[_0x34608e(0x205)](){const _0x43b80a=_0x34608e;if(this[_0x43b80a(0x2f0)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x57c551({'resolution':0xa}),this['_h'][_0x43b80a(0x25c)]());const _0x5d66d0=_0x4611f1;this[_0x43b80a(0x357)]=setInterval(()=>{const _0x4370c0=_0x43b80a,_0x1cf234=this['_h'];if(!_0x1cf234)return;const _0x308f80=_0x1cf234[_0x4370c0(0x277)](0x63)/0xf4240,_0x4fa44d=_0x1cf234[_0x4370c0(0x1b4)]/0xf4240,_0x15ec2a=_0x1cf234[_0x4370c0(0x34c)]/0xf4240;_0x1cf234[_0x4370c0(0x1f3)]();if(this[_0x4370c0(0x254)])for(const _0x58bdbc of this[_0x4370c0(0x254)]){try{_0x58bdbc({'p99Ms':_0x308f80,'maxMs':_0x4fa44d,'meanMs':_0x15ec2a,'reportMs':_0x5d66d0});}catch{}}},_0x5d66d0);if(this[_0x43b80a(0x357)]['unref'])this[_0x43b80a(0x357)][_0x43b80a(0x38b)]();}[_0x34608e(0x217)](){const _0x56f118=_0x34608e,_0x305110=this['_h'],_0x488101=_0x305110[_0x56f118(0x1b4)]/0xf4240,_0x69b06e=_0x305110['percentile'](0x63)/0xf4240,_0x4bcdfa=_0x305110[_0x56f118(0x34c)]/0xf4240;_0x305110[_0x56f118(0x1f3)]();const _0x5f4ead=[...this['_buckets'][_0x56f118(0x2f1)]()]['map'](([_0x4106ed,_0x1029ef])=>({'label':_0x4106ed,..._0x1029ef}))[_0x56f118(0x25b)]((_0x2e888e,_0x6ddc9)=>_0x6ddc9['ms']-_0x2e888e['ms'])[_0x56f118(0x26d)](0x0,0x8);this[_0x56f118(0x32d)][_0x56f118(0x1c7)]();const _0x3f84ef=_0x5f4ead[_0x56f118(0x16d)]((_0x46cc93,_0x3a50ae)=>_0x46cc93+_0x3a50ae['ms'],0x0),_0x52d7d=_0x5f4ead[_0x56f118(0x2b2)](_0x1ad017=>_0x1ad017[_0x56f118(0x36c)]+'='+_0x1ad017['ms'][_0x56f118(0x19b)](0x0)+_0x56f118(0x29c)+_0x1ad017['count']+(_0x1ad017[_0x56f118(0x349)]>0x5?_0x56f118(0x17c)+_0x1ad017[_0x56f118(0x349)][_0x56f118(0x19b)](0x0)+'ms'+(_0x1ad017[_0x56f118(0x302)]?'\x20'+_0x1ad017[_0x56f118(0x302)]:'')+')':''));(_0x672ed4||_0x488101>=_0x5d778c)&&this[_0x56f118(0x1d2)]('loop-lag\x20'+_0x4611f1+'ms\x20max='+_0x488101[_0x56f118(0x19b)](0x0)+_0x56f118(0x346)+_0x69b06e[_0x56f118(0x19b)](0x0)+_0x56f118(0x249)+_0x4bcdfa[_0x56f118(0x19b)](0x0)+_0x56f118(0x225)+_0x3f84ef['toFixed'](0x0)+'ms'+(_0x52d7d[_0x56f118(0x330)]?_0x56f118(0x297)+_0x52d7d[_0x56f118(0x280)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x56f118(0x254)])for(const _0x4b811c of this['_windowCbs']){try{_0x4b811c({'p99Ms':_0x69b06e,'maxMs':_0x488101,'meanMs':_0x4bcdfa,'reportMs':_0x4611f1});}catch{}}}[_0x34608e(0x294)](){const _0x3c7ffd=_0x34608e;if(this[_0x3c7ffd(0x2c0)])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x3c7ffd(0x18d)]();this[_0x3c7ffd(0x2c0)]=null,this['_h']=null,this[_0x3c7ffd(0x2ea)]=![];}}const _0x59ec1d=new _0x374f2d();if(_0x59ec1d[_0x34608e(0x1d8)])_0x59ec1d[_0x34608e(0x2c5)]();return okdbLoopMonitor={'LOOP':_0x59ec1d},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x44b11f=require$$0$1,_0x49fed4=require$$1;let _0x193dd0,_0x423dd9,_0x1c11cb,_0x414559,_0x6ba238,_0x5c2ca0,_0x144a8a,_0x4f3711=![];const _0x511f13=new Set();let _0x526c89=null;const _0x8f176b=new Map();function _0x21f4d6(){const _0x118dd1=_0x5e6c;if(_0x193dd0!==undefined)return _0x193dd0;_0x193dd0=process.env.OKDB_DIAG==='1';if(!_0x193dd0)return![];_0x423dd9=process.env.OKDB_DIAG_STACK==='1',_0x414559=Math[_0x118dd1(0x1b4)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x1c11cb=new Array(_0x414559),_0x6ba238=0x0,_0x5c2ca0=0x0,_0x144a8a=process.env.OKDB_DIAG_DIR||null;if(_0x144a8a)try{_0x44b11f[_0x118dd1(0x2dd)](_0x144a8a,{'recursive':!![]});}catch{}return!![];}function _0x556509(){return _0x193dd0===undefined?_0x21f4d6():_0x193dd0;}function _0x49ca18(_0x477bf1,_0x521b57){const _0x4b989c=_0x5e6c;if(_0x193dd0===undefined?!_0x21f4d6():!_0x193dd0)return;let _0xeb322f;if(_0x423dd9){const _0x4b8b7c=new Error()[_0x4b989c(0x26b)]||'';_0xeb322f=_0x4b8b7c['split']('\x0a')[_0x4b989c(0x26d)](0x3)[_0x4b989c(0x2b2)](_0x1f6524=>_0x1f6524[_0x4b989c(0x199)]())[_0x4b989c(0x255)](Boolean)['slice'](0x0,0x8);}_0x1c11cb[_0x6ba238]={'seq':_0x5c2ca0++,'t':Date[_0x4b989c(0x309)](),'env':_0x477bf1,'kind':_0x521b57||_0x4b989c(0x20b),'stack':_0xeb322f},_0x6ba238=(_0x6ba238+0x1)%_0x414559;}function _0x3938ad(_0x529aa5){const _0x296bb7=_0x5e6c,_0x1484a2=[];for(let _0x3050aa=0x0;_0x3050aa<_0x414559;_0x3050aa++){const _0x5b1306=_0x1c11cb[(_0x6ba238-0x1-_0x3050aa+_0x414559*0x2)%_0x414559];if(!_0x5b1306)continue;_0x1484a2[_0x296bb7(0x31c)](_0x5b1306);if(_0x1484a2['length']>=_0x529aa5)break;}return _0x1484a2;}function _0x51283a(_0x922120){const _0x4e0d0f=_0x5e6c;try{process[_0x4e0d0f(0x1b9)][_0x4e0d0f(0x25a)](_0x922120+'\x0a');}catch{}if(_0x144a8a)try{_0x44b11f[_0x4e0d0f(0x2f8)](_0x49fed4['join'](_0x144a8a,'okdb-diag.'+process[_0x4e0d0f(0x174)]+'.log'),_0x922120+'\x0a');}catch{}}function _0x56fb46(_0x3e2d21){const _0x4b072e=_0x5e6c,_0x3fb05f=_0x3938ad(_0x3e2d21);if(!_0x3fb05f[_0x4b072e(0x330)])return _0x4b072e(0x393);const _0x68c074=Date[_0x4b072e(0x309)]();return _0x3fb05f[_0x4b072e(0x2b2)](_0x4451b1=>{const _0x2e208d=_0x4b072e,_0x2e0d7e='\x20\x20#'+_0x4451b1['seq']+'\x20-'+(_0x68c074-_0x4451b1['t'])+_0x2e208d(0x22f)+_0x4451b1[_0x2e208d(0x377)]+'\x20'+_0x4451b1[_0x2e208d(0x341)];return _0x4451b1[_0x2e208d(0x26b)]&&_0x4451b1[_0x2e208d(0x26b)][_0x2e208d(0x330)]?_0x2e0d7e+_0x2e208d(0x2ce)+_0x4451b1[_0x2e208d(0x26b)][_0x2e208d(0x280)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x2e0d7e;})[_0x4b072e(0x280)]('\x0a');}function _0x78e000(_0x50148e,_0xb84476){const _0x11a169=_0x5e6c,_0x7a4bef=_0x11a169(0x324)+_0x50148e+_0x11a169(0x286)+new Date()[_0x11a169(0x285)]()+_0x11a169(0x2f3)+process[_0x11a169(0x174)]+_0x11a169(0x233),_0x5e2d23=[_0x7a4bef,_0x11a169(0x351)+(_0xb84476&&_0xb84476[_0x11a169(0x26b)]?_0xb84476['stack'][_0x11a169(0x321)]('\x0a')[0x0]:_0xb84476),_0x11a169(0x322)+(_0x423dd9?'':_0x11a169(0x366))+':',_0x56fb46(0x18),_0x4df24b(),'='['repeat'](_0x7a4bef[_0x11a169(0x330)]-0x1)];_0x51283a(_0x5e2d23['join']('\x0a'));}function _0x1d737c(_0x591698){const _0x5bb78a=_0x5e6c;if(!_0x556509())return;const _0x408c1d=String(_0x591698&&_0x591698['message']||_0x591698||''),_0x583941=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x5bb78a(0x36d)](_0x408c1d);_0x78e000(_0x583941?_0x5bb78a(0x369):'uncaughtException',_0x591698);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x583941)return;try{console[_0x5bb78a(0x326)](_0x591698&&_0x591698[_0x5bb78a(0x26b)]?_0x591698[_0x5bb78a(0x26b)]:_0x591698);}catch{}process[_0x5bb78a(0x382)](0x1);}function _0x5e8a15(_0x39d0df){const _0x30b717=_0x5e6c;if(!_0x556509())return;const _0x4b5b3c=String(_0x39d0df&&_0x39d0df[_0x30b717(0x16c)]||_0x39d0df||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x30b717(0x36d)](_0x4b5b3c)&&_0x78e000(_0x30b717(0x1db),_0x39d0df);}function _0x4df24b(){const _0x1fe731=_0x5e6c,_0x1ad4fa=[_0x1fe731(0x1e0)];let _0x224e06=![];for(const _0x3f9995 of _0x511f13){const _0x53b1c2=_0x3f9995&&_0x3f9995[_0x1fe731(0x238)];if(!_0x53b1c2)continue;for(const [_0x15c0bc,_0x3c015b]of _0x53b1c2){const _0x507a0f=_0x3c015b&&_0x3c015b[_0x1fe731(0x317)]&&_0x3c015b[_0x1fe731(0x317)]['view'];if(!_0x507a0f)continue;let _0x5c854b,_0x4b4dce;try{_0x5c854b=Atomics[_0x1fe731(0x260)](_0x507a0f,0x0),_0x4b4dce=Atomics['load'](_0x507a0f,0x1);}catch{continue;}if(_0x5c854b===0x0)continue;_0x224e06=!![];const _0x7a9bac=_0x5c854b>0x0?_0x1fe731(0x2c6):_0x1fe731(0x333),_0x4a085c=Date['now']()-Math[_0x1fe731(0x215)](_0x5c854b)*0x3e8,_0x52f7cb=((()=>{const _0x256694=_0x1fe731;try{return _0x3c015b['_writer']&&_0x3c015b['_writer'][_0x256694(0x319)]?_0x3c015b[_0x256694(0x179)]['status']():null;}catch{return null;}})());_0x1ad4fa[_0x1fe731(0x31c)]('\x20\x20env='+_0x15c0bc+_0x1fe731(0x1fa)+_0x7a9bac+_0x1fe731(0x278)+_0x4a085c+_0x1fe731(0x1dd)+_0x4b4dce+(_0x52f7cb?'\x20writer{depth='+_0x52f7cb[_0x1fe731(0x24a)]+_0x1fe731(0x231)+_0x52f7cb['oldestPendingMs']+_0x1fe731(0x22c)+_0x52f7cb[_0x1fe731(0x323)]+'}':''));}}if(!_0x224e06)_0x1ad4fa[_0x1fe731(0x31c)]('\x20\x20(no\x20env\x20draining)');return _0x1ad4fa[_0x1fe731(0x280)]('\x0a');}function _0x3db488(){const _0x3f85b0=_0x5e6c;if(!_0x556509())return;const _0x2a342e=Math[_0x3f85b0(0x1b4)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x11f518=Date[_0x3f85b0(0x309)]();for(const _0x1454e2 of _0x511f13){const _0x53705c=_0x1454e2&&_0x1454e2[_0x3f85b0(0x238)];if(!_0x53705c)continue;for(const [_0xbb6da6,_0x522bef]of _0x53705c){const _0xd29ce5=_0x522bef&&_0x522bef['_coordinator']&&_0x522bef[_0x3f85b0(0x317)][_0x3f85b0(0x38d)];if(!_0xd29ce5)continue;let _0x27ac89;try{_0x27ac89=Atomics[_0x3f85b0(0x260)](_0xd29ce5,0x0);}catch{continue;}const _0x1dbee3=_0x1454e2['path']+'|'+_0xbb6da6;if(_0x27ac89<=0x0){_0x8f176b[_0x3f85b0(0x18b)](_0x1dbee3);continue;}const _0x43af8e=_0x11f518-_0x27ac89*0x3e8,_0x26dfd0=_0x8f176b[_0x3f85b0(0x2d9)](_0x1dbee3);if(_0x43af8e<_0x2a342e)continue;if(_0x26dfd0&&_0x11f518-_0x26dfd0[_0x3f85b0(0x2f7)]<_0x2a342e)continue;_0x8f176b['set'](_0x1dbee3,{'firstTs':_0x26dfd0?_0x26dfd0['firstTs']:_0x27ac89,'dumpedAt':_0x11f518});const _0x2f16a1=_0x3f85b0(0x37e)+_0x43af8e+_0x3f85b0(0x216)+_0xbb6da6+_0x3f85b0(0x286)+new Date()['toISOString']()+'\x20pid='+process['pid']+_0x3f85b0(0x233);_0x51283a([_0x2f16a1,_0x4df24b(),'='[_0x3f85b0(0x365)](_0x2f16a1[_0x3f85b0(0x330)]-0x1)][_0x3f85b0(0x280)]('\x0a'));}}}function _0x2d09d2(){const _0x2e83c0=_0x5e6c;if(!_0x556509()||_0x4f3711)return;_0x4f3711=!![],process['prependListener'](_0x2e83c0(0x299),_0x1d737c),process[_0x2e83c0(0x165)](_0x2e83c0(0x20d),_0x5e8a15);const _0x527b14=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x526c89=setInterval(_0x3db488,_0x527b14);if(_0x526c89[_0x2e83c0(0x38b)])_0x526c89['unref']();}function _0x5c8da7(_0x870d27){const _0x3fd057=_0x5e6c;if(!_0x556509()||!_0x870d27)return;_0x511f13[_0x3fd057(0x23c)](_0x870d27),_0x2d09d2();}function _0x29be90(_0x465619){_0x511f13['delete'](_0x465619);}function _0x4a3f26(){const _0x38327e=_0x5e6c;if(!_0x556509())return{'enabled':![],'hint':_0x38327e(0x268)};return{'enabled':!![],'stackCapture':!!_0x423dd9,'recentWrites':_0x3938ad(0x10),'drain':_0x4df24b()};}return okdbDiag={'isEnabled':_0x556509,'recordWrite':_0x49ca18,'installDiag':_0x2d09d2,'registerOkdb':_0x5c8da7,'unregisterOkdb':_0x29be90,'snapshot':_0x4a3f26},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x3068cd=_0x37b856;if(hasRequiredOkdbWriter)return okdbWriter[_0x3068cd(0x1df)];hasRequiredOkdbWriter=0x1;const {performance:_0xbbd563}=require$$0$2,_0x383fcd=requireOkdbDiag(),_0x534a0d=process.env.OKDB_COMMIT_MODE===_0x3068cd(0x328);class _0x3e857e{constructor(_0x26f0be){const _0x2067c8=_0x3068cd;this[_0x2067c8(0x377)]=_0x26f0be,this[_0x2067c8(0x337)]=new Set(),this[_0x2067c8(0x2ae)]=new Map(),this[_0x2067c8(0x27c)]=0x0,this[_0x2067c8(0x192)]=[],this[_0x2067c8(0x31a)]=[],this[_0x2067c8(0x186)]=Math[_0x2067c8(0x1b4)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0x2067c8(0x2a4)]=[],this[_0x2067c8(0x2a8)]=0x0;}async[_0x3068cd(0x2a3)](_0xd053f4,_0x55f441){const _0x13cd9f=_0x3068cd;if(_0x383fcd[_0x13cd9f(0x1aa)]())_0x383fcd['recordWrite'](this['env']?.['name'],_0x55f441);if(this[_0x13cd9f(0x313)]){const _0x8bbc3e=new Error(_0x13cd9f(0x220));_0x8bbc3e[_0x13cd9f(0x2cf)]=_0x13cd9f(0x34f);throw _0x8bbc3e;}if(this['_highWater']>0x0){let _0x2a35ce=![];while(this[_0x13cd9f(0x166)]>=this['_highWater']&&!this[_0x13cd9f(0x313)]){!_0x2a35ce&&(_0x2a35ce=!![],this[_0x13cd9f(0x2a8)]++),await new Promise(_0x371d48=>this[_0x13cd9f(0x2a4)][_0x13cd9f(0x31c)](_0x371d48));}if(this[_0x13cd9f(0x313)]){const _0x51e93c=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x51e93c[_0x13cd9f(0x2cf)]=_0x13cd9f(0x34f);throw _0x51e93c;}}this[_0x13cd9f(0x166)]++;const _0x13c627=this[_0x13cd9f(0x377)][_0x13cd9f(0x317)];if(_0x13c627)await _0x13c627[_0x13cd9f(0x292)]();if(this[_0x13cd9f(0x313)]){if(_0x13c627)_0x13c627['afterWrite']();this[_0x13cd9f(0x166)]--;if(this[_0x13cd9f(0x2a4)][_0x13cd9f(0x330)]&&this[_0x13cd9f(0x166)]<this[_0x13cd9f(0x186)])this[_0x13cd9f(0x2a4)][_0x13cd9f(0x2ab)]()();const _0xa7b1e9=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0xa7b1e9[_0x13cd9f(0x2cf)]=_0x13cd9f(0x34f);throw _0xa7b1e9;}const _0x2757a2=_0xbbd563['now']();if(_0x534a0d)try{const _0x1601f1=this[_0x13cd9f(0x377)]['db'][_0x13cd9f(0x27b)](_0xd053f4);this[_0x13cd9f(0x27c)]++;if(this['_durs']['push'](_0xbbd563['now']()-_0x2757a2)>0x100)this[_0x13cd9f(0x192)]['shift']();if(this['_done'][_0x13cd9f(0x31c)](_0xbbd563[_0x13cd9f(0x309)]())>0x800)this[_0x13cd9f(0x31a)]['shift']();return _0x1601f1;}finally{this[_0x13cd9f(0x166)]--;if(this[_0x13cd9f(0x2a4)]['length']&&this['_outstanding']<this['_highWater'])this[_0x13cd9f(0x2a4)][_0x13cd9f(0x2ab)]()();if(_0x13c627)_0x13c627['afterWrite']();}const _0xe717c4=this[_0x13cd9f(0x377)]['db'][_0x13cd9f(0x270)](_0xd053f4);this[_0x13cd9f(0x337)][_0x13cd9f(0x23c)](_0xe717c4),this['_enqueuedAt'][_0x13cd9f(0x335)](_0xe717c4,_0x2757a2);const _0x168bb3=()=>{const _0x220d5d=_0x13cd9f;this[_0x220d5d(0x337)][_0x220d5d(0x18b)](_0xe717c4),this['_enqueuedAt']['delete'](_0xe717c4),this[_0x220d5d(0x27c)]++,this[_0x220d5d(0x166)]--;this[_0x220d5d(0x2a4)]['length']&&this[_0x220d5d(0x166)]<this[_0x220d5d(0x186)]&&this[_0x220d5d(0x2a4)][_0x220d5d(0x2ab)]()();if(this['_durs']['push'](_0xbbd563[_0x220d5d(0x309)]()-_0x2757a2)>0x100)this[_0x220d5d(0x192)][_0x220d5d(0x2ab)]();if(this[_0x220d5d(0x31a)][_0x220d5d(0x31c)](_0xbbd563[_0x220d5d(0x309)]())>0x800)this[_0x220d5d(0x31a)][_0x220d5d(0x2ab)]();};_0xe717c4[_0x13cd9f(0x373)](_0x168bb3,_0x168bb3);try{return await _0xe717c4;}finally{if(_0x13c627)_0x13c627[_0x13cd9f(0x31e)]();}}[_0x3068cd(0x319)](){const _0x4ec026=_0x3068cd,_0xcf427c=_0xbbd563[_0x4ec026(0x309)]();let _0x2329f1=0x0;for(const _0x3d34a9 of this[_0x4ec026(0x2ae)][_0x4ec026(0x344)]()){const _0x4878b2=_0xcf427c-_0x3d34a9;if(_0x4878b2>_0x2329f1)_0x2329f1=_0x4878b2;}let _0x26aded=0x0;for(let _0x589e50=this[_0x4ec026(0x31a)][_0x4ec026(0x330)]-0x1;_0x589e50>=0x0;_0x589e50--){if(_0xcf427c-this[_0x4ec026(0x31a)][_0x589e50]>0x3e8)break;_0x26aded++;}let _0x53acaf=0x0;if(this[_0x4ec026(0x192)][_0x4ec026(0x330)]){const _0x229772=[...this['_durs']][_0x4ec026(0x25b)]((_0x25ee47,_0x4ab352)=>_0x25ee47-_0x4ab352);_0x53acaf=_0x229772[Math[_0x4ec026(0x1e4)](_0x229772[_0x4ec026(0x330)]-0x1,Math[_0x4ec026(0x2db)](_0x229772[_0x4ec026(0x330)]*0.99))];}return{'depth':this[_0x4ec026(0x337)][_0x4ec026(0x33c)],'oldestPendingMs':Math[_0x4ec026(0x2aa)](_0x2329f1),'committed':this[_0x4ec026(0x27c)],'commitsPerSec':_0x26aded,'commitP99Ms':Math['round'](_0x53acaf),'parkedNow':this[_0x4ec026(0x2a4)][_0x4ec026(0x330)],'parkedTotal':this[_0x4ec026(0x2a8)],'highWater':this[_0x4ec026(0x186)]};}[_0x3068cd(0x1bb)](){const _0x25a7b0=_0x3068cd,_0x2b91d0=_0xbbd563[_0x25a7b0(0x309)]();return[...this[_0x25a7b0(0x2ae)]['values']()][_0x25a7b0(0x2b2)](_0x5622ae=>Math['round'](_0x2b91d0-_0x5622ae))['sort']((_0x41338f,_0x4fcde6)=>_0x4fcde6-_0x41338f);}[_0x3068cd(0x32c)](){const _0x592973=_0x3068cd;this['_closed']=!![];for(const _0x5ddd45 of this[_0x592973(0x2a4)]['splice'](0x0))_0x5ddd45();}async[_0x3068cd(0x1a0)](){const _0x10d025=_0x3068cd;let _0x268e95=0x0;while(this[_0x10d025(0x337)][_0x10d025(0x33c)]&&_0x268e95++<0x3e8){await Promise[_0x10d025(0x1a8)]([...this[_0x10d025(0x337)]]);}}async[_0x3068cd(0x25d)](_0x16f715,_0x334f22,_0x5c5988,_0xe56cbb){const _0x2a725c=_0x3068cd;return this[_0x2a725c(0x2a3)](()=>{const _0x1b0280=_0x2a725c;if(_0xe56cbb===undefined)_0x16f715['putSync'](_0x334f22,_0x5c5988);else _0x16f715[_0x1b0280(0x1b8)](_0x334f22,_0x5c5988,_0xe56cbb);},'raw-put');}async['remove'](_0x503859,_0x5d0287){const _0x3bcafa=_0x3068cd;return this[_0x3bcafa(0x2a3)](()=>_0x503859[_0x3bcafa(0x1d6)](_0x5d0287),_0x3bcafa(0x2ee));}}async function _0x4b002b(_0x3910df,_0x1a3d7e){const _0x3e13f2=_0x3068cd;if(_0x1a3d7e==null)_0x1a3d7e=Math[_0x3e13f2(0x1b4)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0xb0d471=_0x3910df?.['flushed'];if(!_0xb0d471||typeof _0xb0d471[_0x3e13f2(0x373)]!==_0x3e13f2(0x306))return;await Promise[_0x3e13f2(0x29e)]([Promise[_0x3e13f2(0x2ed)](_0xb0d471)[_0x3e13f2(0x28b)](()=>{}),new Promise(_0x82774c=>{const _0x5ee37b=_0x3e13f2,_0x58b2e4=setTimeout(_0x82774c,_0x1a3d7e);if(_0x58b2e4[_0x5ee37b(0x38b)])_0x58b2e4['unref']();})]);}catch{}}function _0x4549e3(_0x20b0d3){const _0x3a9afe=_0x3068cd;if(_0x534a0d)return Promise['resolve']();const _0x18d92b=_0x20b0d3?.['committed'];return _0x18d92b&&typeof _0x18d92b[_0x3a9afe(0x373)]===_0x3a9afe(0x306)?_0x18d92b:Promise[_0x3a9afe(0x2ed)]();}return okdbWriter[_0x3068cd(0x1df)]=_0x3e857e,okdbWriter[_0x3068cd(0x1df)][_0x3068cd(0x2c7)]=_0x4b002b,okdbWriter['exports'][_0x3068cd(0x2e7)]=_0x4549e3,okdbWriter['exports'][_0x3068cd(0x212)]=_0x534a0d,okdbWriter[_0x3068cd(0x1df)];}function _0x7d06(){const _0x4eaae5=['pushEphemeral','_dedupeKey','_ownMeta','_onPoke','_acquiredAt','SYSTEM_PROC','_startAdmission','./okdb','ingest','remove','_onProcEvent','_kind','commit','unique:violation_resolved','unhandledRejection','once','_singletonLock','deaths','\x20—\x20','SYNC_COMMITS','msg','INDEX_REGISTERED','abs','ms\x20on\x20env=','_report','_lastCpuWindowMs','entry','cpus','getDesired','_quantum','txn:end','881321xtqLAC','\x20forked\x20','okdb-writer:\x20env\x20closing\x20—\x20retry','_wantDbHandle','getProcess','singletonClaims','uptime','ms\x20busy=','ref:violation','processorId','ESRCH','epoch','state','_lastCpuAt','\x20parkedNow=','commitP99Ms','517hOnbjz','ms\x20env=','_dedupeMax','\x20oldestPendingMs=','heartbeatMs','\x20===','_wantDb','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','system:clock_change','dead','_envs','hasOwnProperty','fast','external','add','children','nodesView','966lWUSfm','_seen','data','registry\x20heartbeat\x20skipped\x20(writer=','view:progress','ITEM_UPDATE','_buildChildRow','isConnected','_desired','cluster-wide','ms\x20mean=','depth','registerFts','parse','processor:retry','mode','level','\x20died\x20','system:env_release','173115YuBCRX',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_windowCbs','filter','stats','includes','fork','\x20worker(s)\x20still\x20serving','write','sort','enable','put','system:type_drop','_instanceId','load','_statusEnv','_removeRowAsync','acquiredAt','close','all','connected','heapTotal','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','okdb','updatedAt','stack','expiresAt','slice','processor','resetFts','childTransaction','building','txn:start','--inspect','reportThreadStats','win32','resetReadTxn','percentile','\x20drainAge=','dropType','getCmd','transactionSync','_committed','instances','listening','single','join','index:drop','_singletonLocks','[okdb-cluster]\x20respawning\x20worker\x20slot=',')\x20exited\x20','toISOString','\x20@\x20','claims','type','change','ttlMs','catch','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','_lock','system:drain','nodeKey','2.1.1','path','beforeWrite','_publishNow','stop','processingStatusView','processorsView','\x20│\x20','_rowKey','uncaughtException','[okdb-cluster]\x20','getChanges','ms/','system','race','kill','bus:proc','default','24420PDdrBu','transaction','_bpWaiters','runtimeProcessesView','CHANGEFEED_QUANTUM','openDB','_bpParkedTotal','__okdbSlot','round','shift','cli','_caps','_enqueuedAt','cursorKey','consecutiveFailures','_putRowAsync','map','system:stopped','has','ITEM_CREATE','FTS_DROP','_clusterWorkerAttached','true','rss','primary','listNodes','queue-worker','sync:apply','_role','find','_timer','_openEnvLazy','_flushDebounce','_handlePoke','listDesired','start','SWAP','flushLmdb','process\x20','addSupervisedChild','1008840GijaUd','processor:paused','_flushTimer','INDEX_READY','\x0a\x20\x20\x20\x20\x20\x20','code','claimGated','ppid','type:registered','standalone','processor:progress','number','count','stopped','_buildProcessingFacet','get','instanceId','floor','_heartbeatInFlight','mkdirSync','bus:poke','_db','_children','crypto','system:bus_state_change','sandbox','INDEX_RESET','_baselines','_migrateVocab','committed','_drain','fts:registered','_started','onWindow','cpuWindowMs','resolve','raw-remove','list','_admissionStarted','entries','INDEX_PROGRESS','\x20pid=','busy','memoryUsage','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','dumpedAt','appendFileSync','publishChildRow','setSchema','VIEW_PROGRESS','respawnTimer','item:create','draining','ttl:clear','_isReader','149960ZCsbpX','maxExtra','~lock','namespace','keys','function','_servingEngines','ttl:set','now','fanout','ms\x20(attempt\x20','system:proc','holder','ITEM_REMOVE','registry\x20publish\x20failing:\x20','from','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','events','_closed','host','clearTtl','--eval','_coordinator','_desiredOverlay','status','_done','setDesired','push','cluster','afterWrite','slot','tryAcquire','split','recent\x20writes\x20(newest\x20first)','parkedNow','\x0a===\x20OKDB_DIAG\x20','~processes:desired','error','~processes:cmd','sync','(code=','registerType','rowKey','markClosed','_buckets','_lockDb','_cursors','length','event','freeze','copy',',\x20signal=','set','dedupeMax','_inflight','registerIndex','processes','next','randomUUID','size','bus:drain','user','decommission','_heartbeatTimer','kind','_released','REMOVE','values','http-server','ms\x20p99=','isWanted','_lastCpuUsage','maxMs','16wUndHX','prototype','mean','_isWriter','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','ENV_CLOSING_RETRY','removeNode','error:\x20','_onItem','release','txn:rollback','_refreshDesiredSnapshot','http\x20worker\x20child\x20failed:\x20','_admissionTimer','item:remove','quantum','_systemEnv','ttl:expired','started','license:added','_publishFailWarned','worker','engines','creating','_selfKey','_draining','_groupByProcess','repeat','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','removeSupervisedChild','_versionSkewWarned','ORPHAN\x20(env-closed\x20write)','_onStop','options','label','test','license:activated','off','inst:','http',':want','then','listen','version','processor:ready','env','clearThreadStats','workersConfigured','type:drop','startedAt','_clusterOnMessage','commitsPerSec','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','getRange','_getType','dropIndex','exit','listenAddr','__esModule','createEnvironment','attach','execArgv','SYSTEM_POKE','created','_holderDead','unref','_enableChangelog','view','dropping','emit','flushDebounce','license:invalid','unclaimed','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','attachFeed','[okdb-cluster]\x20worker\x20pid=','node:events','_ensureDesired','assign','2455536MSkbqW','prependListener','_outstanding','SYSTEM_STOPPED','_supervisorKey','_sandbox','824287unaINm','_nodeDb','message','reduce','_scheduleFlush','processing','signalWant','slotKey','offWindow','workers','pid','_clusterOrphanWatch','treeView','index:progress','putNode','_writer','info','noteListenAddr','(worst\x20','_putRowSync','schema:drop','setLogger','ready','_listenAddr','ephemeral','_processStartedAt','_rawDb','_collectWriterFacet','_highWater','participate','\x20statusEnv=','processKey','waiting','delete','cpuUsage','disable','processor:resumed','--test','node:perf_hooks','heapUsed','_durs','_lastCpuPct','_pending','_adminRelay','ref:violation_resolved','killable','\x20(slot=','trim','cpuPct','toFixed','warn','feed:','string','role','drain','_lastPublishAt','lifecycle','FTS_RESET','registry-publish','log','dropSchema','disconnect','allSettled','object','isEnabled','_key','hostname','bumpCmd','isDead','reap','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','_cmd','threads','rows=','max','SIGKILL','_buildOwnRow','isWorker','putSync','stderr','unique:violation','inflightAgesMs','node','2Gleanh','isHeld','note','1ofN:','running','resetting','extend','\x20HTTP\x20server(s)\x20on\x20port\x20','embedded','hasDesired','clear','\x20times\x20in\x20','compact','indexOf','_changefeed','_isStale','startsWith','async','caps','\x20in\x20','_nodeDead','_log','processors','_nodeDbFor','send','removeSync','replace','enabled','online','_threadStats','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','env:removed','ms\x20activeWriters=','hasType','exports','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_markSeen','_startHeartbeat','__vocab/version','min','_collectSingletonClaims','system:poke','isPrimary','dropFts','open','processor:error','node/','_startedAt','_rootDb','_onTick','getClock','selfKey','\x20sync','writerStatus','reset','process','procmodeack/','supervisorKey','\x20(durable\x20desired-state)','meta','_handleInProcess','\x20phase=','license:removed','_sampleOwnStats','__okdbCluster','_hbTimer'];_0x7d06=function(){return _0x4eaae5;};return _0x7d06();}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x213d45=_0x37b856;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x3623d8=require$$0$3,{SYNC_COMMITS:_0x576287}=requireOkdbWriter(),_0x7954db=_0x213d45(0x303);class _0x1437e9{constructor(_0x16ca90,_0x451610,_0x598dcc){const _0x10e14e=_0x213d45;this[_0x10e14e(0x28d)]=_0x16ca90,this[_0x10e14e(0x1ab)]=_0x451610,this[_0x10e14e(0x203)]=_0x598dcc,this[_0x10e14e(0x342)]=![],this[_0x10e14e(0x340)]=null,this[_0x10e14e(0x2dc)]=null;}[_0x213d45(0x1be)](){const _0x144b67=_0x213d45;if(this[_0x144b67(0x342)])return![];try{const _0x59d8a2=this['_lock'][_0x144b67(0x2df)]()['get'](this[_0x144b67(0x1ab)]);if(!_0x59d8a2||_0x59d8a2[_0x144b67(0x263)]!==this[_0x144b67(0x203)])return![];const _0x9ca2d4=_0x59d8a2['updatedAt']??_0x59d8a2[_0x144b67(0x263)];if(_0x9ca2d4+_0x59d8a2[_0x144b67(0x28a)]<Date[_0x144b67(0x309)]())return![];return!![];}catch{return!this['_released'];}}[_0x213d45(0x30d)](){const _0xcc760f=_0x213d45;if(this[_0xcc760f(0x342)])return null;try{return this[_0xcc760f(0x28d)][_0xcc760f(0x2df)]()[_0xcc760f(0x2d9)](this[_0xcc760f(0x1ab)])??null;}catch{return null;}}async[_0x213d45(0x1c3)](_0x50dfc7){const _0x2109d9=_0x213d45;if(this[_0x2109d9(0x342)])return;try{const _0x1bc4aa=this[_0x2109d9(0x28d)][_0x2109d9(0x2df)]()[_0x2109d9(0x2d9)](this['_key']);if(!_0x1bc4aa||_0x1bc4aa[_0x2109d9(0x263)]!==this['_acquiredAt'])return;if(_0x576287)this['_lock'][_0x2109d9(0x2df)]()['putSync'](this[_0x2109d9(0x1ab)],{..._0x1bc4aa,'ttlMs':_0x1bc4aa['ttlMs']+_0x50dfc7});else await this[_0x2109d9(0x28d)][_0x2109d9(0x2df)]()[_0x2109d9(0x25d)](this[_0x2109d9(0x1ab)],{..._0x1bc4aa,'ttlMs':_0x1bc4aa[_0x2109d9(0x28a)]+_0x50dfc7});}catch{}}async[_0x213d45(0x353)](){const _0x335b5a=_0x213d45;if(this[_0x335b5a(0x342)])return;if(this[_0x335b5a(0x2dc)])try{await this[_0x335b5a(0x2dc)];}catch{}clearInterval(this['_heartbeatTimer']),this['_heartbeatTimer']=null,this[_0x335b5a(0x342)]=!![];try{const _0x5bb24f=this[_0x335b5a(0x28d)][_0x335b5a(0x2df)]()[_0x335b5a(0x2d9)](this['_key']);if(_0x5bb24f&&_0x5bb24f[_0x335b5a(0x263)]===this['_acquiredAt']){if(_0x576287)this[_0x335b5a(0x28d)][_0x335b5a(0x2df)]()[_0x335b5a(0x1d6)](this[_0x335b5a(0x1ab)]);else await this[_0x335b5a(0x28d)][_0x335b5a(0x2df)]()[_0x335b5a(0x208)](this['_key']);}}catch{}}['_startHeartbeat'](_0xd8eb5f,_0x3c37ce){const _0x38e973=_0x213d45,_0x346dd1=_0x3c37ce??Math['floor'](_0xd8eb5f/0x3);this[_0x38e973(0x340)]=setInterval(()=>{const _0x5dfcab=_0x38e973;if(this[_0x5dfcab(0x342)])return;this[_0x5dfcab(0x2dc)]=((async()=>{const _0x199e8c=_0x5dfcab;try{const _0x328dbc=this[_0x199e8c(0x28d)][_0x199e8c(0x2df)]()['get'](this[_0x199e8c(0x1ab)]);if(!_0x328dbc||_0x328dbc['acquiredAt']!==this[_0x199e8c(0x203)]){this[_0x199e8c(0x342)]=!![],clearInterval(this[_0x199e8c(0x340)]),this['_heartbeatTimer']=null;return;}if(_0x576287)this[_0x199e8c(0x28d)][_0x199e8c(0x2df)]()[_0x199e8c(0x1b8)](this['_key'],{..._0x328dbc,'updatedAt':Date[_0x199e8c(0x309)]()});else await this[_0x199e8c(0x28d)][_0x199e8c(0x2df)]()['put'](this['_key'],{..._0x328dbc,'updatedAt':Date[_0x199e8c(0x309)]()});}catch{}this[_0x199e8c(0x2dc)]=null;})());},_0x346dd1);if(this['_heartbeatTimer'][_0x38e973(0x38b)])this[_0x38e973(0x340)][_0x38e973(0x38b)]();}}class _0x1fc7b9{constructor(_0x5e0761,{namespace:_0x1923d2,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x3dad2d=_0x213d45;this[_0x3dad2d(0x184)]=_0x5e0761,this['namespace']=_0x1923d2,this[_0x3dad2d(0x28a)]=ttlMs,this['heartbeatMs']=heartbeatMs,this['_lockDb']=null;}[_0x213d45(0x2df)](){const _0x1bb936=_0x213d45;return!this[_0x1bb936(0x32e)]&&(this[_0x1bb936(0x32e)]=this[_0x1bb936(0x184)][_0x1bb936(0x2a7)](_0x7954db,{'dupSort':![]})),this[_0x1bb936(0x32e)];}[_0x213d45(0x234)](){const _0x3c9ec2=_0x213d45;return!this[_0x3c9ec2(0x221)]&&(this[_0x3c9ec2(0x221)]=this[_0x3c9ec2(0x184)][_0x3c9ec2(0x2a7)](_0x7954db+_0x3c9ec2(0x372),{'dupSort':![]})),this[_0x3c9ec2(0x221)];}[_0x213d45(0x1ab)](_0x3ec7b8){const _0x4aa5b6=_0x213d45;return this[_0x4aa5b6(0x304)]+':'+_0x3ec7b8;}[_0x213d45(0x170)](_0x2469c1){const _0x5dcf92=_0x213d45;try{_0x576287?this[_0x5dcf92(0x234)]()[_0x5dcf92(0x1b8)](this['_key'](_0x2469c1),Date['now']()):this[_0x5dcf92(0x234)]()['put'](this[_0x5dcf92(0x1ab)](_0x2469c1),Date[_0x5dcf92(0x309)]())?.[_0x5dcf92(0x28b)]?.(()=>{});}catch{}}[_0x213d45(0x347)](_0x10f4e3,_0x264305=0x3e8){const _0xd36dfb=_0x213d45;try{const _0x1de2cd=this[_0xd36dfb(0x234)]()[_0xd36dfb(0x2d9)](this['_key'](_0x10f4e3));return typeof _0x1de2cd==='number'&&Date[_0xd36dfb(0x309)]()-_0x1de2cd<_0x264305;}catch{return![];}}[_0x213d45(0x1cc)](_0x555305){const _0x47c544=_0x213d45,_0x330107=_0x555305[_0x47c544(0x26a)]??_0x555305[_0x47c544(0x263)];return _0x330107+_0x555305[_0x47c544(0x28a)]<Date[_0x47c544(0x309)]();}static[_0x213d45(0x38a)](_0x35cc59){const _0x45c116=_0x213d45,_0x32ec59=_0x35cc59?.[_0x45c116(0x30d)];if(!_0x32ec59||typeof _0x32ec59[_0x45c116(0x174)]!=='number')return![];if(_0x32ec59[_0x45c116(0x1ac)]!==_0x3623d8[_0x45c116(0x1ac)]())return![];if(_0x32ec59[_0x45c116(0x174)]===process[_0x45c116(0x174)])return![];try{return process['kill'](_0x32ec59[_0x45c116(0x174)],0x0),![];}catch(_0x1d7dac){return _0x1d7dac[_0x45c116(0x2cf)]===_0x45c116(0x228);}}async[_0x213d45(0x320)](_0x2e730d,_0x580365={},_0x5116ea={}){const _0x4af130=_0x213d45,_0x32f425=this[_0x4af130(0x1ab)](_0x2e730d),_0x383531=_0x5116ea[_0x4af130(0x28a)]??this['ttlMs'],_0x1e9a97=Date[_0x4af130(0x309)](),_0x472bc5={'holder':{'pid':process[_0x4af130(0x174)],'hostname':_0x3623d8['hostname'](),..._0x580365},'acquiredAt':_0x1e9a97,'updatedAt':_0x1e9a97,'ttlMs':_0x383531};let _0x5ac347=![],_0x1a020e=null;try{const _0x505a11=()=>{const _0x21cff5=_0x4af130,_0x31769f=this['_db']()['get'](_0x32f425);if(_0x31769f&&!this[_0x21cff5(0x1cc)](_0x31769f)&&!_0x1fc7b9['_holderDead'](_0x31769f)){const _0x4b1f71=_0x580365[_0x21cff5(0x227)]!=null&&_0x31769f[_0x21cff5(0x30d)][_0x21cff5(0x174)]===process[_0x21cff5(0x174)]&&_0x31769f[_0x21cff5(0x30d)][_0x21cff5(0x227)]===_0x580365['processorId'];if(!_0x4b1f71){_0x5ac347=![],_0x1a020e=_0x31769f;return;}_0x472bc5['acquiredAt']<=_0x31769f['acquiredAt']&&(_0x472bc5[_0x21cff5(0x263)]=_0x31769f[_0x21cff5(0x263)]+0x1,_0x472bc5['updatedAt']=_0x472bc5[_0x21cff5(0x263)]);}this[_0x21cff5(0x2df)]()[_0x21cff5(0x25d)](_0x32f425,_0x472bc5),_0x5ac347=!![],_0x1a020e=_0x472bc5;};if(_0x576287)this[_0x4af130(0x2df)]()['transactionSync'](_0x505a11);else await this[_0x4af130(0x2df)]()[_0x4af130(0x270)](_0x505a11);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x5ac347)return{'acquired':![],'handle':null,'current':_0x1a020e};const _0x1cbd3b=new _0x1437e9(this,_0x32f425,_0x472bc5['acquiredAt']);return _0x1cbd3b[_0x4af130(0x1e2)](_0x383531,this[_0x4af130(0x232)]),{'acquired':!![],'handle':_0x1cbd3b,'current':_0x1a020e};}['inspect'](_0x286b2b){const _0x306b0e=_0x213d45;try{return this[_0x306b0e(0x2df)]()[_0x306b0e(0x2d9)](this[_0x306b0e(0x1ab)](_0x286b2b))??null;}catch{return null;}}['list'](){const _0x53a125=_0x213d45,_0x134dc7=this[_0x53a125(0x304)]+':',_0x44df0d=[];try{for(const {key:_0x58fac8,value:_0x3fab8e}of this[_0x53a125(0x2df)]()[_0x53a125(0x37f)]({'start':_0x134dc7,'end':_0x134dc7+'\xff'})){typeof _0x58fac8===_0x53a125(0x19e)&&_0x58fac8[_0x53a125(0x1cd)](_0x134dc7)&&_0x44df0d[_0x53a125(0x31c)]({'id':_0x58fac8[_0x53a125(0x26d)](_0x134dc7['length']),'entry':_0x3fab8e});}}catch{}return _0x44df0d;}static['listAll'](_0x569af9){const _0x59e5ba=_0x213d45,_0x36a077=[];try{const _0x29a170=_0x569af9[_0x59e5ba(0x2a7)](_0x7954db,{'dupSort':![]});for(const {key:_0x321f36,value:_0x12b88b}of _0x29a170[_0x59e5ba(0x37f)]({})){if(typeof _0x321f36!==_0x59e5ba(0x19e))continue;const _0x3de917=_0x321f36['indexOf'](':');if(_0x3de917<0x1)continue;_0x36a077[_0x59e5ba(0x31c)]({'namespace':_0x321f36[_0x59e5ba(0x26d)](0x0,_0x3de917),'id':_0x321f36['slice'](_0x3de917+0x1),'entry':_0x12b88b});}}catch{}return _0x36a077;}}return okdbLock={'OKDBLock':_0x1fc7b9},okdbLock;}var version=_0x37b856(0x290),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x5799d2=_0x37b856;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x3929a3=require$$0$3,_0x374a0d=require$$1$1,_0x3de86e=require$$2,{LOOP:_0x415ae2}=requireOkdbLoopMonitor(),{OKDBLock:_0x3fea87}=requireOkdbLock(),{SYNC_COMMITS:_0x3d246f}=requireOkdbWriter(),_0x45a41f='~processes',_0x5919ed=_0x5799d2(0x1bc),_0x3cbef9=_0x5799d2(0x325),_0x2b9a46=_0x5799d2(0x327),_0x5d6437=(_0x451cd6,_0xa6b47e)=>_0x451cd6+':'+_0xa6b47e,_0x29c110=(_0x31096c,_0x4e1900)=>_0x31096c+'::'+_0x4e1900,_0x1453c9=(_0x13d478,_0x2c15ab)=>_0x13d478+'/'+_0x2c15ab,_0x6e86fb=(_0x2ee770,_0x468afb)=>_0x2ee770+'#'+_0x468afb,_0xce368e=_0x523563=>{const _0x2a9e4e=_0x5799d2;if(_0x523563?.['processKey'])return _0x523563[_0x2a9e4e(0x189)];const _0x4337d2=_0x523563?.[_0x2a9e4e(0x28f)];return typeof _0x4337d2===_0x2a9e4e(0x19e)&&_0x4337d2[_0x2a9e4e(0x257)]('#')?_0x4337d2['slice'](0x0,_0x4337d2[_0x2a9e4e(0x1ca)]('#')):_0x4337d2;},_0x3c3978=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x4f56a6=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x10928f=_0x3c3978*0x3,_0x436ff4=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x10928f*0x14),_0x48ceff=[_0x5799d2(0x2d4),_0x5799d2(0x376),_0x5799d2(0x24d),'processor:error',_0x5799d2(0x2cb),_0x5799d2(0x18e)];let _0x1b7637=null;function _0x690b6f(){const _0x3c15e9=_0x5799d2;if(_0x1b7637==null)_0x1b7637=Math['round']((Date[_0x3c15e9(0x309)]()-process[_0x3c15e9(0x224)]()*0x3e8)/0x3e8)*0x3e8;return _0x1b7637;}function _0x502c0c(_0x84d844){const _0x593324=_0x5799d2;if(process.env.OKDB_PROCESS_KILL===_0x593324(0x36f))return![];if(_0x84d844?.[_0x593324(0x36b)]?.[_0x593324(0x339)]&&typeof _0x84d844[_0x593324(0x36b)]['processes']==='object'&&_0x84d844[_0x593324(0x36b)][_0x593324(0x339)][_0x593324(0x29f)]===![])return![];return!![];}function _0x2f7007(_0x5e0b5d,_0x2f4c3a){const _0x1fecf4=_0x5799d2,_0x1e72d3=!!_0x2f4c3a?.[_0x1fecf4(0x1d3)];switch(_0x5e0b5d){case _0x1fecf4(0x2ba):return{'controllable':_0x1e72d3,'decommissionable':![],'killable':!![],'killConfirm':_0x1fecf4(0x248)};case _0x1fecf4(0x2ac):case _0x1fecf4(0x2d3):return{'controllable':_0x1e72d3,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x1fecf4(0x345):case _0x1fecf4(0x2bc):case'fn-runner':case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x57ebda{constructor(_0x3310ca){const _0x6c03ad=_0x5799d2;this[_0x6c03ad(0x269)]=_0x3310ca,this[_0x6c03ad(0x261)]=null,this[_0x6c03ad(0x247)]=null,this[_0x6c03ad(0x318)]=new Map(),this['_cmd']=null,this['_isWriter']=![],this['_isReader']=![],this[_0x6c03ad(0x183)]=_0x690b6f(),this['_selfKey']=_0x5d6437(process[_0x6c03ad(0x174)],this[_0x6c03ad(0x183)]),this[_0x6c03ad(0x25f)]=_0x3de86e[_0x6c03ad(0x33b)]()[_0x6c03ad(0x26d)](0x0,0x8),this['_rowKey']=_0x6e86fb(this[_0x6c03ad(0x362)],this[_0x6c03ad(0x25f)]),this['_startedAt']=Date[_0x6c03ad(0x309)](),this['_kind']=null,this[_0x6c03ad(0x168)]=null,this[_0x6c03ad(0x181)]=null,this['_hbTimer']=null,this['_onProcEvent']=null,this['_onTick']=null,this[_0x6c03ad(0x1a1)]=0x0,this['_ownMeta']={},this[_0x6c03ad(0x2e0)]=new Map(),this['_lastCpuUsage']=process[_0x6c03ad(0x18c)](),this['_lastCpuAt']=Date[_0x6c03ad(0x309)](),this[_0x6c03ad(0x193)]=0x0,this['_threadStats']=new Map();}get[_0x5799d2(0x1f0)](){return this['_selfKey'];}get[_0x5799d2(0x32b)](){const _0x3454d9=_0x5799d2;return this[_0x3454d9(0x298)];}[_0x5799d2(0x2ad)](_0x1c3be0,_0x30e3db){const _0x1d6d04=_0x5799d2,_0x41e96d=_0x2f7007(_0x1c3be0,_0x30e3db);if(_0x41e96d[_0x1d6d04(0x197)]&&!_0x502c0c(this[_0x1d6d04(0x269)]))return{..._0x41e96d,'killable':![],'killConfirm':undefined};return _0x41e96d;}['isActive'](){const _0x2a4587=_0x5799d2;return!!this[_0x2a4587(0x261)];}['setOwnMeta'](_0x37f176){const _0xbf34d3=_0x5799d2;Object[_0xbf34d3(0x163)](this['_ownMeta'],_0x37f176||{});}[_0x5799d2(0x17b)](_0x1a6f20){const _0x4e1ed7=_0x5799d2;if(_0x1a6f20)this[_0x4e1ed7(0x181)]=_0x1a6f20;}['register'](_0x24c2c9={}){const _0xbc6749=_0x5799d2;return this[_0xbc6749(0x269)]['_activateProcesses'](_0x24c2c9);}[_0x5799d2(0x295)](){const _0xfa686=_0x5799d2,_0x4621af={};let _0x4c1375=0x0,_0x51b009=0x0;const _0x627726=new Set();for(const _0x57b714 of this['listNodes']()){_0x51b009++;const _0x2f17f3=_0x57b714[_0xfa686(0x16f)];if(!_0x2f17f3)continue;if(_0x2f17f3[_0xfa686(0x187)])_0x4c1375++;for(const _0x4009b6 of _0x2f17f3[_0xfa686(0x1d3)]||[]){if(![_0xfa686(0x27f),_0xfa686(0x30a)][_0xfa686(0x257)](_0x4009b6[_0xfa686(0x24e)]))continue;(_0x4009b6['state']===_0xfa686(0x1d9)||_0x4009b6[_0xfa686(0x22a)]==='building')&&_0x4009b6[_0xfa686(0x2af)]&&_0x627726['add']((_0x4009b6[_0xfa686(0x377)]||_0xfa686(0x2a1))+':'+_0x4009b6[_0xfa686(0x2af)]);const _0x502455=_0x4009b6[_0xfa686(0x377)]||_0xfa686(0x2a1);(_0x4621af[_0x502455]||=[])[_0xfa686(0x31c)]({..._0x4009b6,'env':_0x502455,'owner':{'pid':_0x57b714[_0xfa686(0x174)]??null,'kind':_0x57b714[_0xfa686(0x341)]??null}});}}for(const [_0x2766e8,_0xd7ddbd]of Object['entries'](_0x4621af)){for(const _0x529e41 of _0xd7ddbd){if(_0x529e41[_0xfa686(0x24e)]==='single'&&!_0x529e41[_0xfa686(0x2d0)]){const _0x2dce4f=_0x2766e8+':'+(_0x529e41[_0xfa686(0x2af)]??'');if(!_0x627726[_0xfa686(0x2b4)](_0x2dce4f))_0x529e41[_0xfa686(0x392)]=!![];}}}return{'envs':_0x4621af,'policy':null,'participation':{'participating':_0x4c1375,'total':_0x51b009},'source':_0xfa686(0x173)};}[_0x5799d2(0x296)](){const _0x493dd1=_0x5799d2,_0x323c3c=_0x3f39cd=>{const _0x32b815=_0x5e6c;if(_0x3f39cd[_0x32b815(0x22a)]===_0x32b815(0x1d9)||_0x3f39cd['state']===_0x32b815(0x271)||_0x3f39cd[_0x32b815(0x22a)]===_0x32b815(0x326))return 0x3;if(_0x3f39cd['claimGated'])return 0x1;return 0x2;},_0x53b1e4=new Map();for(const _0x3c8f81 of this[_0x493dd1(0x2bb)]()){for(const _0x30bcc2 of _0x3c8f81[_0x493dd1(0x16f)]?.[_0x493dd1(0x1d3)]||[]){const _0x25622e={..._0x30bcc2,'owner':{'pid':_0x3c8f81[_0x493dd1(0x174)]??null,'kind':_0x3c8f81[_0x493dd1(0x341)]??null,'host':_0x3c8f81[_0x493dd1(0x314)]??null}},_0x487d47=_0x30bcc2['mode']===_0x493dd1(0x27f)?_0x493dd1(0x1c0)+(_0x30bcc2[_0x493dd1(0x377)]??'')+'::'+(_0x30bcc2[_0x493dd1(0x2af)]??_0x30bcc2[_0x493dd1(0x288)]??_0x30bcc2['id']):_0x493dd1(0x370)+(_0x3c8f81['nodeKey']??_0x3c8f81[_0x493dd1(0x189)]??'')+'::'+(_0x30bcc2[_0x493dd1(0x377)]??'')+'::'+_0x30bcc2['id'],_0x119ec1=_0x53b1e4['get'](_0x487d47);if(!_0x119ec1||_0x323c3c(_0x25622e)>_0x323c3c(_0x119ec1))_0x53b1e4[_0x493dd1(0x335)](_0x487d47,_0x25622e);}}return[..._0x53b1e4[_0x493dd1(0x344)]()];}['clusterStatusView'](){const _0x4a2824=_0x5799d2,_0x523269=Date[_0x4a2824(0x309)](),_0x4399b7=this[_0x4a2824(0x2bb)](),_0x103939=_0x5b5cd4=>Math[_0x4a2824(0x1b4)](0x0,Math['round']((_0x523269-(_0x5b5cd4[_0x4a2824(0x37b)]||_0x523269))/0x3e8)),_0x487634=_0x4399b7[_0x4a2824(0x2bf)](_0x42526c=>_0x42526c[_0x4a2824(0x341)]===_0x4a2824(0x2ba)),_0x1b1b69=_0x4399b7[_0x4a2824(0x255)](_0x2d3d86=>_0x2d3d86[_0x4a2824(0x341)]===_0x4a2824(0x345));if(_0x487634||_0x1b1b69[_0x4a2824(0x330)])return{'primary':_0x487634?{'pid':_0x487634[_0x4a2824(0x174)],'uptime':_0x103939(_0x487634)}:null,'workers':_0x1b1b69[_0x4a2824(0x2b2)](_0x42d58a=>({'pid':_0x42d58a['pid'],'uptime':_0x103939(_0x42d58a)})),'workersConfigured':_0x487634?.[_0x4a2824(0x1f8)]?.[_0x4a2824(0x379)]??_0x1b1b69[_0x4a2824(0x330)],'mode':_0x4a2824(0x31d)};const _0x2cab0c=_0x4399b7['find'](_0x5f0283=>_0x5f0283['kind']===_0x4a2824(0x2ac)||_0x5f0283[_0x4a2824(0x341)]===_0x4a2824(0x2d3)||_0x5f0283[_0x4a2824(0x341)]===_0x4a2824(0x1c5)),_0x2a91b3=_0x2cab0c?{'pid':_0x2cab0c['pid'],'uptime':_0x103939(_0x2cab0c)}:{'pid':process['pid'],'uptime':Math[_0x4a2824(0x1b4)](0x0,Math[_0x4a2824(0x2aa)](process[_0x4a2824(0x224)]()))};return{'primary':_0x2a91b3,'workers':[_0x2a91b3],'workersConfigured':0x1,'mode':_0x4a2824(0x27f)};}[_0x5799d2(0x23e)](){const _0x5bb20c=_0x5799d2;return this[_0x5bb20c(0x364)]();}[_0x5799d2(0x176)](){const _0x5f5444=_0x5799d2,_0x32a938=new Map();for(const _0x51bacc of this[_0x5f5444(0x364)]())_0x32a938[_0x5f5444(0x335)](_0x51bacc[_0x5f5444(0x189)],{..._0x51bacc,'children':[]});const _0x3c1ab8=[];for(const _0x44d2f5 of _0x32a938[_0x5f5444(0x344)]()){const _0x8c293c=_0x44d2f5[_0x5f5444(0x1f6)]?_0x32a938['get'](_0x44d2f5[_0x5f5444(0x1f6)]):null;if(_0x8c293c&&_0x8c293c!==_0x44d2f5)_0x8c293c['children']['push'](_0x44d2f5);else _0x3c1ab8[_0x5f5444(0x31c)](_0x44d2f5);}const _0x1436f3=(_0x3222e5,_0x579450)=>_0x3222e5[_0x5f5444(0x341)]===_0x579450[_0x5f5444(0x341)]?(_0x3222e5['pid']||0x0)-(_0x579450['pid']||0x0):(_0x3222e5['kind']??'')<(_0x579450['kind']??'')?-0x1:0x1,_0x3ca018=_0x37d4e2=>{const _0x2a3c65=_0x5f5444;_0x37d4e2[_0x2a3c65(0x25b)](_0x1436f3);for(const _0xe710df of _0x37d4e2)if(_0xe710df[_0x2a3c65(0x23d)][_0x2a3c65(0x330)])_0x3ca018(_0xe710df[_0x2a3c65(0x23d)]);};return _0x3ca018(_0x3c1ab8),_0x3c1ab8;}[_0x5799d2(0x222)](_0x545466){const _0xe718e=_0x5799d2;return this[_0xe718e(0x364)]()[_0xe718e(0x2bf)](_0x26b122=>_0x26b122[_0xe718e(0x189)]===_0x545466)??null;}[_0x5799d2(0x364)](_0x57ccab=Date[_0x5799d2(0x309)]()){const _0x33e218=_0x5799d2,_0x1fd756=new Map();for(const _0x2f155e of this[_0x33e218(0x2bb)]()){const _0x21fabb=_0xce368e(_0x2f155e);let _0x17eb3f=_0x1fd756[_0x33e218(0x2d9)](_0x21fabb);!_0x17eb3f&&(_0x17eb3f={'processKey':_0x21fabb,'nodeKey':_0x21fabb,'pid':_0x2f155e[_0x33e218(0x174)],'ppid':_0x2f155e['ppid']??null,'host':_0x2f155e[_0x33e218(0x314)]??null,'kind':_0x2f155e[_0x33e218(0x341)],'role':null,'supervisorKey':_0x2f155e[_0x33e218(0x1f6)]??null,'slot':_0x2f155e[_0x33e218(0x31f)]??null,'slotKey':_0x2f155e[_0x33e218(0x171)]??null,'caps':_0x2f155e['caps']??null,'lifecycle':_0x2f155e[_0x33e218(0x1a2)]??null,'uptime':Math[_0x33e218(0x1b4)](0x0,Math['round']((_0x57ccab-(_0x2f155e['startedAt']||_0x57ccab))/0x3e8)),'startedAt':_0x2f155e[_0x33e218(0x37b)]??null,'meta':_0x2f155e['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x1fd756[_0x33e218(0x335)](_0x21fabb,_0x17eb3f));_0x17eb3f[_0x33e218(0x27d)][_0x33e218(0x31c)]({'instanceId':_0x2f155e[_0x33e218(0x2da)]??null,'role':_0x2f155e[_0x33e218(0x19f)]??null,'listenAddr':_0x2f155e[_0x33e218(0x383)]??null,'lifecycle':_0x2f155e[_0x33e218(0x1a2)]??null,'processing':_0x2f155e[_0x33e218(0x16f)]??null});if(!_0x17eb3f[_0x33e218(0x19f)]&&_0x2f155e[_0x33e218(0x19f)])_0x17eb3f[_0x33e218(0x19f)]=_0x2f155e['role'];if(!_0x17eb3f[_0x33e218(0x383)]&&_0x2f155e[_0x33e218(0x383)])_0x17eb3f[_0x33e218(0x383)]=_0x2f155e[_0x33e218(0x383)];if(!_0x17eb3f['processing']&&_0x2f155e[_0x33e218(0x16f)])_0x17eb3f['processing']=_0x2f155e[_0x33e218(0x16f)];if(!_0x17eb3f['engines']&&_0x2f155e[_0x33e218(0x360)])_0x17eb3f['engines']=_0x2f155e['engines'];if(!_0x17eb3f[_0x33e218(0x223)]&&_0x2f155e[_0x33e218(0x223)])_0x17eb3f[_0x33e218(0x223)]=_0x2f155e[_0x33e218(0x223)];if(_0x17eb3f[_0x33e218(0x1cf)]==null&&_0x2f155e[_0x33e218(0x1cf)])_0x17eb3f[_0x33e218(0x1cf)]=_0x2f155e[_0x33e218(0x1cf)];if(_0x2f155e[_0x33e218(0x256)]&&(!_0x17eb3f[_0x33e218(0x256)]||(_0x2f155e[_0x33e218(0x256)]['at']??0x0)>(_0x17eb3f['stats']['at']??0x0)))_0x17eb3f[_0x33e218(0x256)]=_0x2f155e[_0x33e218(0x256)];}return[..._0x1fd756['values']()];}[_0x5799d2(0x2a5)](){const _0x543f88=_0x5799d2,_0x6d5dcf=[],_0x1406b2={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x1b9dda of this[_0x543f88(0x364)]()){_0x6d5dcf[_0x543f88(0x31c)]({'processKey':_0x1b9dda[_0x543f88(0x189)],'kind':_0x1b9dda[_0x543f88(0x341)],'pid':_0x1b9dda[_0x543f88(0x174)],'supervisorKey':_0x1b9dda[_0x543f88(0x1f6)],'meta':_0x1b9dda[_0x543f88(0x1f8)]??null,'uptime':_0x1b9dda['uptime'],'stats':_0x1b9dda[_0x543f88(0x256)]??null}),_0x1406b2[_0x543f88(0x339)]++;if(_0x1b9dda['stats']){_0x1406b2[_0x543f88(0x2b9)]+=_0x1b9dda[_0x543f88(0x256)][_0x543f88(0x2b9)]||0x0,_0x1406b2[_0x543f88(0x191)]+=(_0x1b9dda['stats'][_0x543f88(0x191)]||0x0)+(_0x1b9dda[_0x543f88(0x256)]['threads']?.[_0x543f88(0x191)]||0x0);const _0x5b2621=_0x1b9dda[_0x543f88(0x256)]['threads'];_0x5b2621&&(_0x1406b2[_0x543f88(0x1b2)][_0x543f88(0x2d6)]+=_0x5b2621[_0x543f88(0x2d6)]||0x0,_0x1406b2[_0x543f88(0x1b2)][_0x543f88(0x2e3)]+=_0x5b2621['sandbox']||0x0,_0x1406b2['threads'][_0x543f88(0x2f4)]+=_0x5b2621[_0x543f88(0x2f4)]||0x0);}}return{'totals':_0x1406b2,'nodes':_0x6d5dcf};}async[_0x5799d2(0x1e9)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5c6fbc=_0x5799d2;this[_0x5c6fbc(0x34d)]=this['_isWriter']||!!writer,this[_0x5c6fbc(0x300)]=this[_0x5c6fbc(0x300)]||!!reader,this['_kind']=kind||this[_0x5c6fbc(0x20a)]||(_0x374a0d[_0x5c6fbc(0x1b7)]?_0x5c6fbc(0x345):_0x5c6fbc(0x2ac)),this[_0x5c6fbc(0x168)]=supervisorKey??this[_0x5c6fbc(0x168)],this[_0x5c6fbc(0x181)]=listenAddr??this[_0x5c6fbc(0x181)],this[_0x5c6fbc(0x397)](),await this[_0x5c6fbc(0x2e6)]();if(!writer&&!reader)return null;if(!this[_0x5c6fbc(0x261)]){const _0x7cf7a0=await this[_0x5c6fbc(0x269)][_0x5c6fbc(0x385)](_0x45a41f,{'sync':![],'durability':_0x5c6fbc(0x23a)});if(!_0x7cf7a0[_0x5c6fbc(0x1de)](_0x5919ed))await _0x7cf7a0[_0x5c6fbc(0x32a)](_0x5919ed);this[_0x5c6fbc(0x261)]=_0x7cf7a0;}return this['_statusEnv'];}[_0x5799d2(0x16b)](){const _0x52a2d9=_0x5799d2;return this[_0x52a2d9(0x1d4)]!==this[_0x52a2d9(0x261)]&&(this[_0x52a2d9(0x1d4)]=this[_0x52a2d9(0x261)],this['_nodeDbCache']=this['_statusEnv'][_0x52a2d9(0x380)](_0x5919ed)[_0x52a2d9(0x241)]),this['_nodeDbCache'];}[_0x5799d2(0x2b1)](_0x39994f){const _0x3f2886=_0x5799d2;if(_0x3d246f)return this[_0x3f2886(0x16b)]()[_0x3f2886(0x1b8)](_0x39994f['nodeKey'],_0x39994f,0x1);const _0x3dccf7=this[_0x3f2886(0x16b)]()['put'](_0x39994f[_0x3f2886(0x28f)],_0x39994f,0x1);if(_0x3dccf7&&typeof _0x3dccf7[_0x3f2886(0x373)]===_0x3f2886(0x306))_0x3dccf7['then'](undefined,()=>{});return _0x3dccf7;}['_putRowSync'](_0x24da66){const _0x339724=_0x5799d2;return this[_0x339724(0x16b)]()['putSync'](_0x24da66['nodeKey'],_0x24da66,0x1);}[_0x5799d2(0x262)](_0x1cd927){const _0x140e5c=_0x5799d2;if(_0x3d246f)try{return this['_nodeDb']()[_0x140e5c(0x1d6)](_0x1cd927);}catch{return![];}const _0x1ff357=this[_0x140e5c(0x16b)]()[_0x140e5c(0x208)](_0x1cd927);if(_0x1ff357&&typeof _0x1ff357[_0x140e5c(0x373)]===_0x140e5c(0x306))_0x1ff357[_0x140e5c(0x373)](undefined,()=>{});return _0x1ff357;}async[_0x5799d2(0x178)](_0x4abd84){const _0x514821=_0x5799d2;if(!this[_0x514821(0x261)]||!this[_0x514821(0x34d)]||!_0x4abd84?.[_0x514821(0x28f)])return;return this[_0x514821(0x2b1)](_0x4abd84);}async[_0x5799d2(0x350)](_0x881ba8){const _0x1ddcbb=_0x5799d2;if(!this['_statusEnv']||!this[_0x1ddcbb(0x34d)]||!_0x881ba8)return;const _0x4d8130=_0x881ba8['includes']('#'),_0x534d0b=[];for(const {key:_0x34ce7c}of this[_0x1ddcbb(0x261)][_0x1ddcbb(0x37f)](_0x5919ed)){if(_0x34ce7c===_0x881ba8||!_0x4d8130&&typeof _0x34ce7c==='string'&&_0x34ce7c['startsWith'](_0x881ba8+'#'))_0x534d0b[_0x1ddcbb(0x31c)](_0x34ce7c);}for(const _0x22b5a7 of _0x534d0b){try{this['_nodeDb']()[_0x1ddcbb(0x1d6)](_0x22b5a7);}catch{}}}[_0x5799d2(0x1d1)](_0x14651a){const _0x54dea9=_0x5799d2;if(typeof _0x14651a?.[_0x54dea9(0x174)]!=='number')return![];if(_0x14651a['host']!==_0x3929a3[_0x54dea9(0x1ac)]())return![];if(_0x14651a[_0x54dea9(0x174)]===process[_0x54dea9(0x174)])return![];if(_0x14651a[_0x54dea9(0x26c)]!=null&&_0x14651a['expiresAt']<Date[_0x54dea9(0x309)]()-_0x436ff4)return!![];try{return process[_0x54dea9(0x29f)](_0x14651a[_0x54dea9(0x174)],0x0),![];}catch(_0x2d4d72){return _0x2d4d72[_0x54dea9(0x2cf)]==='ESRCH';}}[_0x5799d2(0x2bb)](){const _0x2aaf77=_0x5799d2;if(!this[_0x2aaf77(0x261)])return[];try{this[_0x2aaf77(0x261)]['db']?.[_0x2aaf77(0x276)]?.();}catch{}const _0x303cad=Date[_0x2aaf77(0x309)](),_0x320240=_0x3929a3['hostname'](),_0x3e67b6=[];for(const {value:_0x493fac}of this[_0x2aaf77(0x261)]['getRange'](_0x5919ed)){if(!_0x493fac)continue;let _0xff9ce8=null;_0x493fac[_0x2aaf77(0x314)]===_0x320240&&typeof _0x493fac[_0x2aaf77(0x174)]===_0x2aaf77(0x2d5)&&(_0xff9ce8=!this[_0x2aaf77(0x1d1)](_0x493fac));if(_0xff9ce8===![])continue;const _0x2277b6=_0x493fac[_0x2aaf77(0x26c)]==null||_0x493fac[_0x2aaf77(0x26c)]>=_0x303cad;if(_0xff9ce8===!![]||_0x2277b6)_0x3e67b6[_0x2aaf77(0x31c)](_0x493fac);}return _0x3e67b6;}async[_0x5799d2(0x1af)](_0x121e92=0x0){const _0x20e907=_0x5799d2;if(!this[_0x20e907(0x261)]||!this[_0x20e907(0x34d)])return;const _0x21037a=Date[_0x20e907(0x309)]()-_0x121e92,_0x11ac14=new Set(),_0x2111cb=[],_0x2e07f0=_0x3929a3[_0x20e907(0x1ac)](),_0x4772d9=require$$6['version'];for(const {key:_0x37392a,value:_0x35beab}of this[_0x20e907(0x261)]['getRange'](_0x5919ed)){if(!_0x35beab)continue;const _0x5425d6=_0x35beab['host']===_0x2e07f0&&typeof _0x35beab[_0x20e907(0x174)]===_0x20e907(0x2d5),_0x49d559=_0x5425d6?this[_0x20e907(0x1d1)](_0x35beab):_0x35beab[_0x20e907(0x26c)]!=null&&_0x35beab[_0x20e907(0x26c)]<_0x21037a;if(_0x49d559)_0x2111cb[_0x20e907(0x31c)](_0x37392a);else{_0x11ac14[_0x20e907(0x23c)](_0xce368e(_0x35beab)??_0x37392a);if(_0x35beab[_0x20e907(0x375)]&&_0x35beab['version']!==_0x4772d9){if(!this[_0x20e907(0x368)])this[_0x20e907(0x368)]=new Set();!this[_0x20e907(0x368)][_0x20e907(0x2b4)](_0x35beab[_0x20e907(0x375)])&&(this['_versionSkewWarned']['add'](_0x35beab[_0x20e907(0x375)]),this[_0x20e907(0x269)][_0x20e907(0x1a5)]?.[_0x20e907(0x19c)]?.(_0x20e907(0x2c8)+(_0x35beab[_0x20e907(0x174)]??'?')+_0x20e907(0x1b0)+_0x35beab[_0x20e907(0x375)]+'\x20while\x20this\x20process\x20runs\x20'+_0x4772d9+_0x20e907(0x211)+_0x20e907(0x235),{'feature':'migrations'}));}}}for(const _0x331b63 of _0x2111cb)this[_0x20e907(0x262)](_0x331b63);if(this[_0x20e907(0x397)]()){const _0x554198=[];for(const {key:_0x51cbb5}of this[_0x20e907(0x2c4)](_0x20e907(0x1bc))){if(!_0x11ac14[_0x20e907(0x2b4)](_0x51cbb5)){if(_0x3d246f)try{this[_0x20e907(0x247)][_0x20e907(0x1d6)](_0x20e907(0x1eb)+_0x51cbb5);}catch{}else _0x554198[_0x20e907(0x31c)](this['_desired'][_0x20e907(0x208)](_0x20e907(0x1eb)+_0x51cbb5));}}if(_0x554198['length'])await Promise['allSettled'](_0x554198);}}['startHeartbeat'](_0x3d3aa0=null){const _0x583f3b=_0x5799d2;if(this[_0x583f3b(0x1fe)])return;if(!this['_isWriter']||!this['_statusEnv']){this[_0x583f3b(0x269)]?.[_0x583f3b(0x1a5)]?.[_0x583f3b(0x19c)]?.(_0x583f3b(0x242)+this[_0x583f3b(0x34d)]+_0x583f3b(0x188)+!!this[_0x583f3b(0x261)]+_0x583f3b(0x253),{'feature':_0x583f3b(0x339)});return;}this['_onTick']=_0x3d3aa0,this[_0x583f3b(0x209)]=()=>this['_maybePublish']();for(const _0x33c61a of _0x48ceff)this[_0x583f3b(0x269)][_0x583f3b(0x312)]['on'](_0x33c61a,this['_onProcEvent']);this['_publishNow']();const _0x3f011b=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x3c3978;this['_hbTimer']=setInterval(()=>{const _0x956444=_0x583f3b;if(this[_0x956444(0x1ee)])try{this[_0x956444(0x1ee)]();}catch{}this[_0x956444(0x293)](),this['reap']()[_0x956444(0x28b)](()=>{});},_0x3f011b);if(this[_0x583f3b(0x1fe)][_0x583f3b(0x38b)])this[_0x583f3b(0x1fe)][_0x583f3b(0x38b)]();}['_maybePublish'](){const _0xa94265=_0x5799d2;if(!this[_0xa94265(0x34d)]||!this[_0xa94265(0x261)])return;if(Date[_0xa94265(0x309)]()-this[_0xa94265(0x1a1)]<_0x4f56a6)return;this[_0xa94265(0x293)]();}[_0x5799d2(0x293)](){const _0x157b44=_0x5799d2;if(!this[_0x157b44(0x34d)]||!this[_0x157b44(0x261)])return;this[_0x157b44(0x1a1)]=Date[_0x157b44(0x309)]();try{const _0x2b8834=[this[_0x157b44(0x1b6)]()];for(const _0x17d3fc of this[_0x157b44(0x2e0)][_0x157b44(0x344)]())_0x2b8834['push'](this[_0x157b44(0x245)](_0x17d3fc));const _0x456b6b=_0x415ae2[_0x157b44(0x1d8)]?_0x415ae2[_0x157b44(0x309)]():0x0;for(const _0x28ce24 of _0x2b8834){try{this[_0x157b44(0x17d)](_0x28ce24),this[_0x157b44(0x35e)]=![];}catch(_0x3fd06){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x157b44(0x269)]?.[_0x157b44(0x1a5)]?.['warn']?.(_0x157b44(0x30f)+_0x3fd06[_0x157b44(0x16c)],{'feature':_0x157b44(0x339)}));}}if(_0x415ae2['enabled'])_0x415ae2[_0x157b44(0x1bf)](_0x157b44(0x1a4),_0x415ae2[_0x157b44(0x309)]()-_0x456b6b,_0x157b44(0x1b3)+_0x2b8834[_0x157b44(0x330)]+_0x157b44(0x1f1));}catch(_0x2d2ce7){!this[_0x157b44(0x35e)]&&(this[_0x157b44(0x35e)]=!![],this[_0x157b44(0x269)]?.[_0x157b44(0x1a5)]?.[_0x157b44(0x19c)]?.(_0x157b44(0x30f)+_0x2d2ce7[_0x157b44(0x16c)],{'feature':_0x157b44(0x339)}));}}async['stopHeartbeat'](){const _0x2d250f=_0x5799d2;if(this['_onProcEvent']){for(const _0x63d993 of _0x48ceff){try{this[_0x2d250f(0x269)]['events']['off'](_0x63d993,this[_0x2d250f(0x209)]);}catch{}}this[_0x2d250f(0x209)]=null;}this[_0x2d250f(0x1fe)]&&(clearInterval(this[_0x2d250f(0x1fe)]),this[_0x2d250f(0x1fe)]=null);try{if(this['_statusEnv']&&this[_0x2d250f(0x34d)])await this[_0x2d250f(0x350)](this[_0x2d250f(0x298)]);}catch{}}async['deregisterSelf'](){const _0x3698a7=_0x5799d2;if(!this[_0x3698a7(0x261)]||!this[_0x3698a7(0x34d)])return;try{await this[_0x3698a7(0x350)](this[_0x3698a7(0x298)]);}catch{}try{const _0x67d76b=[];for(const {value:_0x135bd7}of this['_statusEnv'][_0x3698a7(0x37f)](_0x5919ed)){if(_0x135bd7?.[_0x3698a7(0x2d1)]===process[_0x3698a7(0x174)]&&_0x135bd7[_0x3698a7(0x28f)])_0x67d76b['push'](_0x135bd7[_0x3698a7(0x28f)]);}for(const _0x175c26 of _0x67d76b){try{await this['removeNode'](_0x175c26);}catch{}}}catch{}}async['publishOwnRow'](){const _0x233ec5=_0x5799d2;return this[_0x233ec5(0x178)](this[_0x233ec5(0x1b6)]());}async[_0x5799d2(0x2f9)](_0x30042f){const _0x104913=_0x5799d2;if(!this[_0x104913(0x261)]||!this[_0x104913(0x34d)])return;return this[_0x104913(0x178)](this['_buildChildRow'](_0x30042f));}[_0x5799d2(0x245)]({pid:_0x50397f,startedAt:_0x2dd67d,kind:_0x485fcd,supervisorKey:_0x13cf95,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x5799d2(0x1c1),meta:meta=null,stats:stats=null}){const _0x43d64e=_0x5799d2,_0x305c14=Date['now'](),_0x21ca61=_0x5d6437(_0x50397f,_0x2dd67d);return{'nodeKey':_0x6e86fb(_0x21ca61,'0'),'processKey':_0x21ca61,'instanceId':'0','pid':_0x50397f,'startedAt':_0x2dd67d,'ppid':process[_0x43d64e(0x174)],'host':_0x3929a3[_0x43d64e(0x1ac)](),'supervisorKey':_0x13cf95,'slot':slot,'slotKey':slotKey,'kind':_0x485fcd,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x305c14,'expiresAt':_0x305c14+_0x10928f,'caps':this[_0x43d64e(0x2ad)](_0x485fcd,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x5799d2(0x2c9)](_0x6b03af){const _0x521ee3=_0x5799d2;if(!_0x6b03af?.[_0x521ee3(0x174)])return null;const _0x1c61d2=_0x5d6437(_0x6b03af['pid'],_0x6b03af[_0x521ee3(0x37b)]);this[_0x521ee3(0x2e0)]['set'](_0x1c61d2,{..._0x6b03af,'supervisorKey':_0x6b03af[_0x521ee3(0x1f6)]??this[_0x521ee3(0x362)]});if(this[_0x521ee3(0x34d)])await this[_0x521ee3(0x2f9)](this[_0x521ee3(0x2e0)]['get'](_0x1c61d2))[_0x521ee3(0x28b)]?.(()=>{});return _0x1c61d2;}[_0x5799d2(0x367)](_0x52022e){const _0x1c63c9=_0x5799d2;if(!_0x52022e)return;return this[_0x1c63c9(0x2e0)][_0x1c63c9(0x18b)](_0x52022e),this['removeNode'](_0x52022e);}[_0x5799d2(0x1fc)](){const _0x158bb0=_0x5799d2,_0x12f57e=Date[_0x158bb0(0x309)](),_0x39c378=process[_0x158bb0(0x18c)](),_0x50d167=(_0x12f57e-this[_0x158bb0(0x22b)])*0x3e8;if(_0x50d167>=0x3d090){const _0xd20142=_0x39c378[_0x158bb0(0x33e)]-this[_0x158bb0(0x348)][_0x158bb0(0x33e)]+(_0x39c378[_0x158bb0(0x29d)]-this[_0x158bb0(0x348)][_0x158bb0(0x29d)]),_0xa20ed4=_0x3929a3[_0x158bb0(0x21a)]()['length']||0x1;this[_0x158bb0(0x193)]=Math[_0x158bb0(0x1e4)](0x64,Math[_0x158bb0(0x2aa)](_0xd20142/(_0x50d167*_0xa20ed4)*0x64)),this[_0x158bb0(0x218)]=Math[_0x158bb0(0x2aa)](_0x50d167/0x3e8),this['_lastCpuUsage']=_0x39c378,this[_0x158bb0(0x22b)]=_0x12f57e;}const _0x1adcdd=process[_0x158bb0(0x2f5)](),_0x149a9b=this[_0x158bb0(0x1da)][_0x158bb0(0x33c)];let _0x47b82c=0x0;if(_0x149a9b>0x0){const _0x3b2dd8=[this['okdb'],...this[_0x158bb0(0x269)][_0x158bb0(0x238)]?.[_0x158bb0(0x344)]?.()??[]];for(const _0x118ba6 of _0x3b2dd8){const _0x1b0ac5=_0x118ba6['functions']?.[_0x158bb0(0x169)];if(_0x1b0ac5)_0x47b82c+=_0x1b0ac5['liveThreadStats'][_0x158bb0(0x2f4)];}}let _0x169738=null;const _0x357b25=_0x149a9b;if(_0x357b25>0x0){let _0x1acb2e=0x0;for(const _0x5cbb20 of this['_threadStats']['values']())_0x1acb2e+=_0x5cbb20[_0x158bb0(0x191)]||0x0;_0x169738={'count':_0x357b25,'heapUsed':_0x1acb2e,'sandbox':_0x149a9b,'busy':_0x47b82c};}return{'rss':_0x1adcdd[_0x158bb0(0x2b9)],'heapUsed':_0x1adcdd[_0x158bb0(0x191)],'heapTotal':_0x1adcdd[_0x158bb0(0x267)],'external':_0x1adcdd[_0x158bb0(0x23b)],'cpuPct':this[_0x158bb0(0x193)],'cpuWindowMs':this[_0x158bb0(0x218)]??null,'threads':_0x169738,'at':_0x12f57e};}[_0x5799d2(0x274)](_0x1fee77,_0x1639c3){const _0x19c8de=_0x5799d2;if(!_0x1fee77||!_0x1639c3)return;this[_0x19c8de(0x1da)]['set'](_0x1fee77,_0x1639c3);}[_0x5799d2(0x378)](_0x4aa777){const _0x56e9ff=_0x5799d2;this[_0x56e9ff(0x1da)]['delete'](_0x4aa777);}['updateSupervisedChildStats'](_0x526295,_0x17042d,_0x5df8f9=undefined){const _0x377c40=_0x5799d2,_0x251d7a=this[_0x377c40(0x2e0)]['get'](_0x526295);if(!_0x251d7a||!_0x17042d)return;if(_0x5df8f9!==undefined)_0x251d7a[_0x377c40(0x16f)]=_0x5df8f9;_0x251d7a['stats']={'rss':_0x17042d[_0x377c40(0x2b9)]??null,'heapUsed':_0x17042d[_0x377c40(0x191)]??null,'heapTotal':_0x17042d[_0x377c40(0x267)]??null,'external':_0x17042d[_0x377c40(0x23b)]??null,'cpuPct':_0x17042d[_0x377c40(0x19a)]??null,'cpuWindowMs':_0x17042d[_0x377c40(0x2ec)]??null,'threads':_0x17042d[_0x377c40(0x1b2)]??null,'claims':_0x17042d[_0x377c40(0x287)]??null,'envsOpen':_0x17042d['envsOpen']??null,'at':Date[_0x377c40(0x309)]()};}[_0x5799d2(0x1b6)](){const _0xca4f18=_0x5799d2,_0x8d5f40=Date[_0xca4f18(0x309)](),_0xecfaeb=this[_0xca4f18(0x269)][_0xca4f18(0x2be)]||{},_0x1aa782=this['_kind']||_0xca4f18(0x2ac);return{'nodeKey':this[_0xca4f18(0x298)],'processKey':this['_selfKey'],'instanceId':this['_instanceId'],'pid':process[_0xca4f18(0x174)],'startedAt':this[_0xca4f18(0x183)],'instanceStartedAt':this[_0xca4f18(0x1ec)],'ppid':typeof process[_0xca4f18(0x2d1)]===_0xca4f18(0x2d5)?process[_0xca4f18(0x2d1)]:null,'host':_0x3929a3[_0xca4f18(0x1ac)](),'supervisorKey':this[_0xca4f18(0x168)]??null,'version':require$$6['version'],'kind':_0x1aa782,'role':{'engines':!!_0xecfaeb[_0xca4f18(0x360)],'processors':!!_0xecfaeb[_0xca4f18(0x1d3)],'compaction':_0xecfaeb['compaction'],'http':_0xecfaeb[_0xca4f18(0x371)]},'listenAddr':this[_0xca4f18(0x181)]??null,'heartbeatAt':_0x8d5f40,'expiresAt':_0x8d5f40+_0x10928f,'caps':this[_0xca4f18(0x2ad)](_0x1aa782,_0xecfaeb),'lifecycle':{'state':_0xca4f18(0x1c1),'desiredVersionApplied':null},'meta':{...this[_0xca4f18(0x201)]},'processing':_0xecfaeb[_0xca4f18(0x1d3)]?this['_buildProcessingFacet']():null,'engines':_0xecfaeb[_0xca4f18(0x360)]?[...this[_0xca4f18(0x269)][_0xca4f18(0x307)]??[]]:null,'singletonClaims':this[_0xca4f18(0x1e5)](),'stats':this[_0xca4f18(0x1fc)](),'writers':this[_0xca4f18(0x185)]()};}[_0x5799d2(0x185)](){const _0x12c287=_0x5799d2,_0x5e482a={};try{for(const [_0x4a48f9,_0x25d25c]of this[_0x12c287(0x269)][_0x12c287(0x238)]){try{const _0x2a4f15=_0x25d25c[_0x12c287(0x1f2)]?.();if(!_0x2a4f15)continue;if(!_0x2a4f15[_0x12c287(0x24a)]&&!_0x2a4f15['committed']&&!(_0x2a4f15[_0x12c287(0x323)]??0x0)&&!_0x2a4f15[_0x12c287(0x2fe)])continue;_0x5e482a[_0x4a48f9]={'depth':_0x2a4f15['depth'],'oldestPendingMs':_0x2a4f15['oldestPendingMs'],'committed':_0x2a4f15[_0x12c287(0x2e7)],'commitsPerSec':_0x2a4f15[_0x12c287(0x37d)],'commitP99Ms':_0x2a4f15[_0x12c287(0x22d)],'parkedNow':_0x2a4f15['parkedNow']??0x0,'draining':!!_0x2a4f15[_0x12c287(0x2fe)]};}catch{}}}catch{}return Object[_0x12c287(0x305)](_0x5e482a)[_0x12c287(0x330)]?_0x5e482a:null;}[_0x5799d2(0x1e5)](){const _0x205fc4=_0x5799d2,_0x56f46e=process[_0x205fc4(0x174)],_0x439250=Date[_0x205fc4(0x309)](),_0x471af0=_0x33f1de=>{const _0x422cb8=_0x205fc4;if(!_0x33f1de)return[];const _0x18ca92=[];try{for(const {id:_0x28bb6f,entry:_0x532a2b}of _0x33f1de[_0x422cb8(0x2ef)]()){if(_0x532a2b?.['holder']?.[_0x422cb8(0x174)]!==_0x56f46e)continue;const _0x88f56b=_0x532a2b[_0x422cb8(0x26a)]??_0x532a2b[_0x422cb8(0x263)]??0x0;if(_0x88f56b+(_0x532a2b[_0x422cb8(0x28a)]??0x0)<_0x439250)continue;_0x18ca92['push'](_0x28bb6f);}}catch{}return _0x18ca92;},_0x28a3d3=_0x471af0(this['_singletonLock'](_0x205fc4(0x1c9))),_0x3e0fc7=_0x471af0(this[_0x205fc4(0x20f)](_0x205fc4(0x328)));if(!_0x28a3d3['length']&&!_0x3e0fc7[_0x205fc4(0x330)])return null;return{'compact':_0x28a3d3,'replicate':_0x3e0fc7};}[_0x5799d2(0x20f)](_0x57dbf8){const _0x21c26b=_0x5799d2;if(!this[_0x21c26b(0x269)]?.[_0x21c26b(0x1ed)])return null;if(!this[_0x21c26b(0x282)])this[_0x21c26b(0x282)]=new Map();let _0x589f91=this['_singletonLocks'][_0x21c26b(0x2d9)](_0x57dbf8);if(!_0x589f91)try{_0x589f91=new _0x3fea87(this[_0x21c26b(0x269)]['_rootDb'],{'namespace':_0x57dbf8}),this['_singletonLocks']['set'](_0x57dbf8,_0x589f91);}catch{return null;}return _0x589f91;}[_0x5799d2(0x2d8)](){const _0x54792b=_0x5799d2,_0x307c7e=[];try{for(const [_0x49f4c8,_0xa758fe]of this[_0x54792b(0x269)][_0x54792b(0x238)]){if(_0x49f4c8[_0x54792b(0x1cd)]('~'))continue;for(const _0x1a9f46 of _0xa758fe[_0x54792b(0x26e)]['tierList']())_0x307c7e[_0x54792b(0x31c)]({..._0x1a9f46,'env':_0x49f4c8});}}catch{}return{'participate':this[_0x54792b(0x269)][_0x54792b(0x1d3)]?.['_participate']??![],'processors':_0x307c7e};}['_ensureDesired'](){const _0x877f23=_0x5799d2;if(this[_0x877f23(0x247)])return!![];const _0x46b9b2=this[_0x877f23(0x269)][_0x877f23(0x1ed)];if(!_0x46b9b2)return![];return this['_desired']=_0x46b9b2[_0x877f23(0x2a7)](_0x3cbef9,{'dupSort':![]}),this['_cmd']=_0x46b9b2[_0x877f23(0x2a7)](_0x2b9a46,{'dupSort':![]}),!![];}async[_0x5799d2(0x2e6)](){const _0x197d2e=_0x5799d2;if(!this[_0x197d2e(0x397)]())return;const _0x3c69b3=_0x197d2e(0x1e3),_0x1d41d7=0x1,_0x2636e3=this[_0x197d2e(0x247)]['get'](_0x3c69b3)??0x0;if(_0x2636e3>=_0x1d41d7)return;const _0x395d01=_0x3cbff9=>{const _0x1f91aa=_0x197d2e;if(_0x3cbff9===_0x1f91aa(0x35f))return _0x1f91aa(0x27f);if(_0x3cbff9===_0x1f91aa(0x1ce))return _0x1f91aa(0x30a);return _0x3cbff9;};await this['okdb'][_0x197d2e(0x35a)][_0x197d2e(0x179)][_0x197d2e(0x2a3)](()=>{const _0x3c44bc=_0x197d2e;for(const _0x4d3fe3 of['procmode/',_0x3c44bc(0x1f5)]){for(const {key:_0x180fc6,value:_0x2cabbf}of this[_0x3c44bc(0x247)][_0x3c44bc(0x37f)]({'start':_0x4d3fe3,'end':_0x4d3fe3+'\xff'})){if(typeof _0x180fc6!==_0x3c44bc(0x19e)||!_0x180fc6[_0x3c44bc(0x1cd)](_0x4d3fe3))break;const _0x51880b=_0x395d01(_0x2cabbf[_0x3c44bc(0x24e)]);if(_0x51880b!==_0x2cabbf[_0x3c44bc(0x24e)])this['_desired'][_0x3c44bc(0x25d)](_0x180fc6,{..._0x2cabbf,'mode':_0x51880b});}}this[_0x3c44bc(0x247)][_0x3c44bc(0x25d)](_0x3c69b3,_0x1d41d7);});}['hasDesired'](){const _0x27089b=_0x5799d2;return!!this[_0x27089b(0x247)];}[_0x5799d2(0x21b)](_0x3e9b63,_0x12f836){const _0x21173a=_0x5799d2;if(!this[_0x21173a(0x397)]())return null;const _0x1333b1=_0x3e9b63+'/'+_0x12f836;return this['_refreshDesiredSnapshot'](),this[_0x21173a(0x318)][_0x21173a(0x2d9)](_0x1333b1)??this['_desired'][_0x21173a(0x2d9)](_0x1333b1)??null;}[_0x5799d2(0x355)](){const _0x3efe10=_0x5799d2;if(!_0x3d246f)return;try{this['okdb'][_0x3efe10(0x35a)]?.['db']?.[_0x3efe10(0x276)]?.();}catch{}}async[_0x5799d2(0x31b)](_0x5a397c,_0x54b360,_0x22d230){const _0x349f72=_0x5799d2;if(!this[_0x349f72(0x397)]())return null;const _0x3de363=_0x5a397c+'/'+_0x54b360;this[_0x349f72(0x355)]();const _0x5b5200=this[_0x349f72(0x318)][_0x349f72(0x2d9)](_0x3de363)??this[_0x349f72(0x247)]['get'](_0x3de363)??{'version':0x0},_0x5d5126=(_0x5b5200[_0x349f72(0x375)]||0x0)+0x1,_0x3a3491={..._0x5b5200,..._0x22d230,'version':_0x5d5126,'updatedAt':Date[_0x349f72(0x309)]()};this[_0x349f72(0x318)][_0x349f72(0x335)](_0x3de363,_0x3a3491);try{await this[_0x349f72(0x269)][_0x349f72(0x35a)][_0x349f72(0x179)][_0x349f72(0x2a3)](()=>{const _0x4a25d7=_0x349f72;this[_0x4a25d7(0x247)][_0x4a25d7(0x25d)](_0x3de363,_0x3a3491);});}finally{if(this[_0x349f72(0x318)][_0x349f72(0x2d9)](_0x3de363)===_0x3a3491)this[_0x349f72(0x318)][_0x349f72(0x18b)](_0x3de363);}return _0x5d5126;}[_0x5799d2(0x2c4)](_0x17bacf){const _0x3c30ff=_0x5799d2;if(!this['_ensureDesired']())return[];this[_0x3c30ff(0x355)]();const _0x58a82c=_0x17bacf+'/',_0x508531=[];for(const {key:_0x3270f1,value:_0x3bf6c6}of this[_0x3c30ff(0x247)][_0x3c30ff(0x37f)]({'start':_0x58a82c,'end':_0x58a82c+'\xff'})){if(typeof _0x3270f1!=='string'||!_0x3270f1[_0x3c30ff(0x1cd)](_0x58a82c))break;_0x508531['push']({'key':_0x3270f1[_0x3c30ff(0x26d)](_0x58a82c[_0x3c30ff(0x330)]),'value':_0x3bf6c6});}return _0x508531;}[_0x5799d2(0x27a)](_0x1af053){const _0x2e753d=_0x5799d2;if(!this[_0x2e753d(0x397)]())return null;return this[_0x2e753d(0x1b1)][_0x2e753d(0x2d9)](_0x1af053)??null;}async[_0x5799d2(0x1ad)](_0x24b56d,_0x35e0e3,_0xacc9f9={}){const _0x1546a8=_0x5799d2;if(!this[_0x1546a8(0x397)]())return null;let _0x3cbabe;return await this[_0x1546a8(0x269)][_0x1546a8(0x35a)][_0x1546a8(0x179)]['transaction'](()=>{const _0x4a56e0=_0x1546a8,_0x3dc966=this[_0x4a56e0(0x1b1)][_0x4a56e0(0x2d9)](_0x24b56d)||{'epoch':0x0};_0x3cbabe=(_0x3dc966[_0x4a56e0(0x229)]||0x0)+0x1,this['_cmd'][_0x4a56e0(0x25d)](_0x24b56d,{..._0x3dc966,..._0xacc9f9,'cmd':_0x35e0e3,'epoch':_0x3cbabe,'updatedAt':Date[_0x4a56e0(0x309)]()});}),_0x3cbabe;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x57ebda,'nodeKey':_0x5d6437,'logicalKey':_0x29c110,'slotKey':_0x1453c9,'PROCESS_ENV':_0x45a41f,'NODE_TYPE':_0x5919ed},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x13b021=_0x37b856;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x8cb31c=require$$0$4,{EVENTS:_0x5a527d,CHANGE_ACTIONS:_0x49e9bc}=requireOkdbEnums(),{LOOP:_0x532388}=requireOkdbLoopMonitor(),_0x594125=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x47a1b8=0x5,_0x50e254=0x2710;class _0x4f0f5b extends _0x8cb31c{constructor(_0x2f53f8,_0x20c55e={}){const _0x33eebd=_0x5e6c;super(),this[_0x33eebd(0x269)]=_0x2f53f8,this['_quantum']=_0x20c55e[_0x33eebd(0x359)]??_0x594125,this[_0x33eebd(0x2c2)]=_0x20c55e[_0x33eebd(0x390)]??_0x47a1b8,this[_0x33eebd(0x230)]=_0x20c55e[_0x33eebd(0x336)]??_0x50e254,this[_0x33eebd(0x2ea)]=![],this[_0x33eebd(0x32f)]=new Map(),this['_baselines']=new Map(),this[_0x33eebd(0x194)]=new Map(),this[_0x33eebd(0x2cc)]=null,this['_draining']=![],this[_0x33eebd(0x240)]=new Set(),this[_0x33eebd(0x352)]=_0x3e8934=>this[_0x33eebd(0x1f9)](_0x3e8934),this[_0x33eebd(0x202)]=_0x12a4a6=>this['_handlePoke'](_0x12a4a6),this[_0x33eebd(0x36a)]=()=>this[_0x33eebd(0x294)]();}[_0x13b021(0x2c5)](){const _0x41c0b3=_0x13b021;if(this[_0x41c0b3(0x2ea)])return;this[_0x41c0b3(0x2ea)]=!![];for(const [_0x4358cf,_0x5782ec]of this[_0x41c0b3(0x269)]['_envs']){if(_0x4358cf['startsWith']('~'))continue;try{_0x5782ec['_enableChangelog']();}catch{}}for(const [_0xf464b4,_0x2ebde9]of this[_0x41c0b3(0x269)]['_envs']){if(_0xf464b4[_0x41c0b3(0x1cd)]('~'))continue;try{this[_0x41c0b3(0x2e5)][_0x41c0b3(0x335)](_0xf464b4,_0x2ebde9[_0x41c0b3(0x1ef)]()||0x0);}catch{}}const {events:_0x4588c2}=this[_0x41c0b3(0x269)];_0x4588c2['on'](_0x5a527d['ITEM_CREATE'],this['_onItem']),_0x4588c2['on'](_0x5a527d['ITEM_UPDATE'],this[_0x41c0b3(0x352)]),_0x4588c2['on'](_0x5a527d[_0x41c0b3(0x30e)],this[_0x41c0b3(0x352)]),_0x4588c2['on'](_0x5a527d[_0x41c0b3(0x388)],this[_0x41c0b3(0x202)]),_0x4588c2['once'](_0x5a527d['SYSTEM_STOPPED'],this[_0x41c0b3(0x36a)]);}[_0x13b021(0x294)](){const _0x23a3d3=_0x13b021;if(!this[_0x23a3d3(0x2ea)])return;this[_0x23a3d3(0x2ea)]=![];const {events:_0x520caa}=this[_0x23a3d3(0x269)];_0x520caa[_0x23a3d3(0x36f)](_0x5a527d[_0x23a3d3(0x2b5)],this[_0x23a3d3(0x352)]),_0x520caa[_0x23a3d3(0x36f)](_0x5a527d[_0x23a3d3(0x244)],this[_0x23a3d3(0x352)]),_0x520caa['off'](_0x5a527d[_0x23a3d3(0x30e)],this[_0x23a3d3(0x352)]),_0x520caa[_0x23a3d3(0x36f)](_0x5a527d[_0x23a3d3(0x388)],this['_onPoke']);try{_0x520caa[_0x23a3d3(0x36f)](_0x5a527d[_0x23a3d3(0x167)],this[_0x23a3d3(0x36a)]);}catch{}this[_0x23a3d3(0x2cc)]&&(clearTimeout(this[_0x23a3d3(0x2cc)]),this['_flushTimer']=null),this['_pending']['clear'](),this[_0x23a3d3(0x32f)][_0x23a3d3(0x1c7)](),this[_0x23a3d3(0x2e5)][_0x23a3d3(0x1c7)](),this['_seen'][_0x23a3d3(0x1c7)]();}[_0x13b021(0x200)](_0x108f42,_0x1945c5,_0x3aea4a,_0x33e303){return _0x108f42+'\x00'+_0x1945c5+'\x00'+_0x3aea4a+'\x00'+_0x33e303;}[_0x13b021(0x1e1)](_0x24cbaf,_0x32ad2d,_0xe8a6fa,_0x52dba3){const _0x3d98f3=_0x13b021,_0x52b1c8=this[_0x3d98f3(0x200)](_0x24cbaf,_0x32ad2d,_0xe8a6fa,_0x52dba3);if(this['_seen']['has'](_0x52b1c8))return![];this[_0x3d98f3(0x240)][_0x3d98f3(0x23c)](_0x52b1c8);if(this['_seen'][_0x3d98f3(0x33c)]>this['_dedupeMax']){const _0xdf91d8=this[_0x3d98f3(0x240)][_0x3d98f3(0x344)]()[_0x3d98f3(0x33a)]()['value'];this[_0x3d98f3(0x240)]['delete'](_0xdf91d8);}return!![];}['_handleInProcess'](_0x57d7a0){const _0x57fd36=_0x13b021;if(!this[_0x57fd36(0x2ea)]||!_0x57d7a0)return;const {env:_0x5d35f8,type:_0x5d58bb,key:_0x23f16b,clock:_0x36af5b,origin:_0x4c8db1,action:_0x1cbdb9,newValue:_0xd979f9,oldValue:_0x8398b6}=_0x57d7a0;if(_0x5d35f8==null||_0x5d58bb==null||_0x23f16b==null)return;if(typeof _0x5d35f8==='string'&&_0x5d35f8[_0x57fd36(0x1cd)]('~'))return;if(typeof _0x5d58bb===_0x57fd36(0x19e)&&_0x5d58bb[_0x57fd36(0x1cd)]('~'))return;if(!this['_markSeen'](_0x5d35f8,_0x5d58bb,_0x23f16b,_0x36af5b))return;const _0x230a42=_0x1cbdb9===_0x49e9bc[_0x57fd36(0x343)]?_0x57fd36(0x208):_0x57fd36(0x25d);this[_0x57fd36(0x38f)](_0x57fd36(0x289),{'env':_0x5d35f8,'type':_0x5d58bb,'key':_0x23f16b,'op':_0x230a42,'clock':_0x36af5b,'origin':_0x4c8db1,'value':_0x230a42==='remove'?null:_0xd979f9,'prevValue':_0x8398b6});}[_0x13b021(0x2c3)](_0x2e7051){const _0x485a6a=_0x13b021;if(!this[_0x485a6a(0x2ea)])return;if(!_0x2e7051||typeof _0x2e7051[_0x485a6a(0x377)]!==_0x485a6a(0x19e)||typeof _0x2e7051[_0x485a6a(0x288)]!=='string')return;const {env:_0x1dc826,type:_0x42c6ae}=_0x2e7051;if(_0x1dc826[_0x485a6a(0x1cd)]('~')||_0x42c6ae[_0x485a6a(0x1cd)]('~'))return;this[_0x485a6a(0x194)][_0x485a6a(0x335)](_0x1dc826+'\x00'+_0x42c6ae,{'env':_0x1dc826,'type':_0x42c6ae}),this[_0x485a6a(0x16e)]();}['_scheduleFlush'](){const _0x34bc55=_0x13b021;if(this[_0x34bc55(0x2cc)])return;const _0x37d339=()=>{const _0x1eaf60=_0x34bc55;this['_flushTimer']=null,this['_drain']()[_0x1eaf60(0x28b)](()=>{});};this[_0x34bc55(0x2cc)]=setTimeout(_0x37d339,this[_0x34bc55(0x2c2)]>0x0?this[_0x34bc55(0x2c2)]:0x0);}async[_0x13b021(0x2e8)](){const _0x47d4b5=_0x13b021;if(this[_0x47d4b5(0x363)]){this[_0x47d4b5(0x16e)]();return;}this[_0x47d4b5(0x363)]=!![];try{const _0x21faa9=[...this[_0x47d4b5(0x194)][_0x47d4b5(0x344)]()];this[_0x47d4b5(0x194)][_0x47d4b5(0x1c7)]();let _0x170aa4=![];for(const {env:_0x18b8da,type:_0x358b83}of _0x21faa9){try{const _0x13aec5=await this['_drainOne'](_0x18b8da,_0x358b83);if(_0x13aec5)_0x170aa4=!![];}catch{this[_0x47d4b5(0x194)][_0x47d4b5(0x335)](_0x18b8da+'\x00'+_0x358b83,{'env':_0x18b8da,'type':_0x358b83}),_0x170aa4=!![];}}if(_0x170aa4||this[_0x47d4b5(0x194)][_0x47d4b5(0x33c)]>0x0)this[_0x47d4b5(0x16e)]();}finally{this[_0x47d4b5(0x363)]=![];}}async['_drainOne'](_0x16eab2,_0x55bd27){const _0x121c24=_0x13b021,_0xb68b38=await this[_0x121c24(0x269)][_0x121c24(0x2c1)](_0x16eab2),_0x9f7dc9=_0x16eab2+'\x00'+_0x55bd27;!this[_0x121c24(0x32f)][_0x121c24(0x2b4)](_0x9f7dc9)&&(!this['_baselines'][_0x121c24(0x2b4)](_0x16eab2)&&(_0xb68b38[_0x121c24(0x38c)](),this[_0x121c24(0x2e5)][_0x121c24(0x335)](_0x16eab2,_0xb68b38[_0x121c24(0x1ef)]()||0x0)),this[_0x121c24(0x32f)][_0x121c24(0x335)](_0x9f7dc9,this[_0x121c24(0x2e5)][_0x121c24(0x2d9)](_0x16eab2)));const _0x1f5c56=this[_0x121c24(0x32f)][_0x121c24(0x2d9)](_0x9f7dc9),_0x3b5eb7=_0xb68b38['getClock'](_0x55bd27)||0x0;if(_0x3b5eb7<=_0x1f5c56)return![];const _0xc8f920=_0x1f5c56+this[_0x121c24(0x21c)],_0xf39c99=Math['min'](_0x3b5eb7,_0xc8f920),_0x47d38e=_0x532388[_0x121c24(0x1d8)]?_0x532388[_0x121c24(0x309)]():0x0,_0x463ce9=Array[_0x121c24(0x310)](_0xb68b38[_0x121c24(0x29b)](_0x55bd27,_0x1f5c56+0x1,_0xf39c99));let _0x3ec647=_0x1f5c56;for(const _0xd6c0d6 of _0x463ce9){const {clock:_0x66845e,key:_0x4b9f48,action:_0x560b09,origin:_0x5821ad}=_0xd6c0d6;if(_0x66845e>_0x3ec647)_0x3ec647=_0x66845e;if(_0x4b9f48==null)continue;if(!this['_markSeen'](_0x16eab2,_0x55bd27,_0x4b9f48,_0x66845e))continue;let _0x1ef202,_0x3b7be0;if(_0x560b09===_0x49e9bc[_0x121c24(0x343)])_0x1ef202=_0x121c24(0x208),_0x3b7be0=null;else{const _0xc36658=_0xb68b38[_0x121c24(0x2d9)](_0x55bd27,_0x4b9f48);_0xc36658==null?(_0x1ef202='remove',_0x3b7be0=null):(_0x1ef202=_0x121c24(0x25d),_0x3b7be0=_0xc36658);}this[_0x121c24(0x38f)](_0x121c24(0x289),{'env':_0x16eab2,'type':_0x55bd27,'key':_0x4b9f48,'op':_0x1ef202,'clock':_0x66845e,'origin':_0x5821ad,'value':_0x3b7be0});}if(_0x532388['enabled'])_0x532388[_0x121c24(0x1bf)](_0x121c24(0x19d)+_0x16eab2+':'+_0x55bd27,_0x532388[_0x121c24(0x309)]()-_0x47d38e,'n='+_0x463ce9[_0x121c24(0x330)]);return this[_0x121c24(0x32f)][_0x121c24(0x335)](_0x9f7dc9,Math[_0x121c24(0x1b4)](_0x3ec647,_0xf39c99)),_0xb68b38[_0x121c24(0x1ef)](_0x55bd27)>_0xf39c99;}[_0x13b021(0x319)](){const _0x232658=_0x13b021;return{'started':this[_0x232658(0x2ea)],'quantum':this[_0x232658(0x21c)],'flushDebounce':this[_0x232658(0x2c2)],'cursors':Object['fromEntries']([...this[_0x232658(0x32f)][_0x232658(0x2f1)]()][_0x232658(0x2b2)](([_0xcd804a,_0x5101f0])=>[_0xcd804a[_0x232658(0x1d7)]('\x00',':'),_0x5101f0])),'pending':this['_pending']['size'],'seen':this[_0x232658(0x240)]['size']};}}return _0x4f0f5b[_0x13b021(0x2a6)]=_0x594125,okdbChangefeed={'OKDBChangefeed':_0x4f0f5b},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x5a63ba=_0x37b856;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x3f2a8c=require$$1$1,_0x4fa879=require$$1,{EVENTS:_0x371daa}=requireOkdbEnums(),_0x31e10c=require$$0$3,{slotKey:_0x83092e}=requireOkdbProcessRegistry(),_0x39d48e=0xfa,_0x1c105c=0xfa0,_0x23e868=0x5,_0x542b9f=0x2710,_0x515b32=0xbb8,_0x20aad3=0x7d0,_0x541d5c=_0x5a63ba(0x1fd),_0x27ae24=_0x5a63ba(0x182),_0x13e283=_0x5a63ba(0x1a5),_0x46180a=_0x5a63ba(0x256),_0x49c777=[_0x371daa[_0x5a63ba(0x2fb)],_0x371daa['FTS_REGISTERED'],_0x371daa[_0x5a63ba(0x2b6)],_0x371daa[_0x5a63ba(0x1a3)],_0x371daa[_0x5a63ba(0x2f2)],_0x371daa[_0x5a63ba(0x2cd)],_0x371daa[_0x5a63ba(0x2e4)],_0x371daa[_0x5a63ba(0x214)],'processor:ready',_0x5a63ba(0x2d4),_0x5a63ba(0x1ea),_0x5a63ba(0x2cb),_0x5a63ba(0x18e),_0x5a63ba(0x24d)],_0x56ec29=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x21b5b1({workers:_0x2a7023,makeOkdb:_0x17b2e9,port:_0x4ebc79,primaryOkdb:_0x28f706,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x401ef3=_0x5a63ba;if(_0x3f2a8c[_0x401ef3(0x1e7)])return childEntry&&_0x3f2a8c['setupPrimary']({'exec':_0x4fa879['join'](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0xebedd6=_0x401ef3,_0x19c7cc=[];for(let _0x5a0515=0x0;_0x5a0515<process[_0xebedd6(0x387)]['length'];_0x5a0515++){const _0x946989=process[_0xebedd6(0x387)][_0x5a0515];if(_0x946989[_0xebedd6(0x1cd)](_0xebedd6(0x18f))||_0x946989[_0xebedd6(0x1cd)]('--watch')||_0x946989[_0xebedd6(0x1cd)](_0xebedd6(0x273)))continue;if(_0x946989==='-e'||_0x946989===_0xebedd6(0x316)||_0x946989==='-p'||_0x946989==='--print'){_0x5a0515++;continue;}_0x19c7cc[_0xebedd6(0x31c)](_0x946989);}return _0x19c7cc;})())}),_0x1cc9c4({'workers':_0x2a7023,'port':_0x4ebc79,'primaryOkdb':_0x28f706,'workerEnv':workerEnv});return _0x23abbb({'makeOkdb':_0x17b2e9,'port':_0x4ebc79});}function _0x1cc9c4({workers:_0x3574a2,port:_0x5a3e52,primaryOkdb:_0x415a24,workerEnv:_0x294d09}){const _0x184286=_0x5a63ba,_0x410883=new Map(),_0x43af35=new Map();let _0x365a7c=![];const _0x332977=_0x145763=>_0x145763?.['__okdbSlot'],_0x245e6b=_0x769ec9=>{const _0x2e891f=_0x5e6c,_0x28f6d4=_0x3f2a8c[_0x2e891f(0x258)]({...process.env,..._0x294d09||{},'OKDB_CLUSTER_SLOT':String(_0x769ec9)});return _0x28f6d4[_0x2e891f(0x2a9)]=_0x769ec9,_0x410883[_0x2e891f(0x335)](_0x28f6d4[_0x2e891f(0x1f4)][_0x2e891f(0x174)],{'worker':_0x28f6d4,'startedAt':Date[_0x2e891f(0x309)](),'slot':_0x769ec9}),_0x28f6d4['on'](_0x2e891f(0x326),_0x354a96=>{const _0x1481ca=_0x2e891f;console[_0x1481ca(0x1a5)](_0x1481ca(0x395)+_0x28f6d4['process'][_0x1481ca(0x174)]+'\x20ipc\x20error:\x20'+(_0x354a96?.[_0x1481ca(0x16c)]??_0x354a96));}),_0x28f6d4['on'](_0x2e891f(0x1d9),()=>_0x333d4c()),_0x28f6d4;},_0x4f51a5=_0x576f01=>{const _0x18375e=_0x5e6c;for(const {worker:_0x577f98}of _0x410883[_0x18375e(0x344)]()){if(_0x577f98[_0x18375e(0x1ae)]()||!_0x577f98[_0x18375e(0x246)]())continue;try{_0x577f98[_0x18375e(0x1d5)](_0x576f01);}catch{}}};_0x415a24?.['_activateProcesses']?.({'kind':'primary','listenAddr':':'+_0x5a3e52})[_0x184286(0x28b)](()=>{}),_0x415a24?.[_0x184286(0x339)]?.['setOwnMeta']?.({'workersConfigured':_0x3574a2});const _0x217ea5={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x333d4c=()=>{const _0x53e063=_0x184286,_0x58f481=_0x415a24?.[_0x53e063(0x339)];if(!_0x58f481||!_0x58f481[_0x53e063(0x34d)])return;const _0x4cdee1=_0x58f481[_0x53e063(0x1f0)];for(const {worker:_0x4129ad,startedAt:_0xd6019e,slot:_0x4697ba,stats:_0xd2eb8f,processing:_0x328aa6}of _0x410883[_0x53e063(0x344)]()){if(_0x4129ad[_0x53e063(0x1ae)]())continue;const _0x3454c3=_0x58f481[_0x53e063(0x1c6)]?.()&&_0x58f481['getDesired'](_0x53e063(0x31f),_0x1d7fc0(_0x4697ba))?.[_0x53e063(0x33f)]===!![];_0x58f481[_0x53e063(0x2f9)]({'pid':_0x4129ad[_0x53e063(0x1f4)][_0x53e063(0x174)],'startedAt':_0xd6019e,'kind':_0x53e063(0x345),'supervisorKey':_0x4cdee1,'slot':_0x4697ba,'slotKey':_0x1d7fc0(_0x4697ba),'role':_0x217ea5,'listenAddr':':'+_0x5a3e52,'lifecycle':_0x3454c3?'decommissioning':_0x53e063(0x1c1),'processing':_0x328aa6??null,'stats':_0xd2eb8f??null})[_0x53e063(0x28b)](()=>{});}},_0x1d7fc0=_0x4540a8=>_0x83092e('cluster:'+_0x5a3e52,_0x4540a8),_0x279923=_0x2e6136=>{const _0x3a4e0f=_0x184286,_0x34f15c=_0x415a24?.['processes'];if(!_0x34f15c?.[_0x3a4e0f(0x1c6)]?.())return![];return _0x34f15c['getDesired'](_0x3a4e0f(0x31f),_0x1d7fc0(_0x2e6136))?.[_0x3a4e0f(0x33f)]===!![];};for(let _0x1639bc=0x0;_0x1639bc<_0x3574a2;_0x1639bc++){const _0x99690d=_0x279923(_0x1639bc);_0x43af35[_0x184286(0x335)](_0x1639bc,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x99690d,'respawnTimer':null}),_0x99690d?console[_0x184286(0x1a5)]('[okdb-cluster]\x20slot='+_0x1639bc+_0x184286(0x34e)):_0x245e6b(_0x1639bc);}const _0x52680d=()=>{const _0xa92aee=_0x184286,_0x5a81bf=_0x415a24?.[_0xa92aee(0x339)];if(!_0x5a81bf?.['_isWriter']||!_0x5a81bf[_0xa92aee(0x1c6)]?.())return;for(const [_0x4f0675,_0x5545c8]of _0x43af35['entries']()){const _0x1554ce=_0x5a81bf[_0xa92aee(0x21b)]('slot',_0x1d7fc0(_0x4f0675)),_0x3f0eb6=_0x1554ce?.[_0xa92aee(0x33f)]===!![],_0x2d4cd5=_0x1554ce?.[_0xa92aee(0x29f)]===!![];if(_0x3f0eb6&&!_0x5545c8[_0xa92aee(0x237)]){_0x5545c8['dead']=!![];_0x5545c8['respawnTimer']&&(clearTimeout(_0x5545c8[_0xa92aee(0x2fc)]),_0x5545c8[_0xa92aee(0x2fc)]=null);for(const {worker:_0x214e67}of _0x410883[_0xa92aee(0x344)]()){if(_0x332977(_0x214e67)!==_0x4f0675||_0x214e67[_0xa92aee(0x1ae)]())continue;try{if(_0x2d4cd5)_0x214e67[_0xa92aee(0x1f4)][_0xa92aee(0x29f)](_0xa92aee(0x1b5));else _0x214e67[_0xa92aee(0x246)]()&&_0x214e67['disconnect']();}catch{}}console[_0xa92aee(0x1a5)](_0xa92aee(0x29a)+(_0x2d4cd5?'hard-killed':'decommissioned')+'\x20worker\x20slot='+_0x4f0675+_0xa92aee(0x1f7));}else{if(!_0x3f0eb6&&_0x5545c8['dead']&&_0x1554ce){_0x5545c8[_0xa92aee(0x237)]=![],_0x5545c8[_0xa92aee(0x210)]=[],_0x5545c8[_0xa92aee(0x2b0)]=0x0;const _0x3ddffc=[..._0x410883[_0xa92aee(0x344)]()]['some'](({worker:_0x262376})=>_0x332977(_0x262376)===_0x4f0675&&!_0x262376[_0xa92aee(0x1ae)]());!_0x3ddffc&&!_0x365a7c&&(_0x245e6b(_0x4f0675),console[_0xa92aee(0x1a5)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x4f0675));}}}},_0x4d2f4f=()=>{try{_0x52680d();}catch{}};_0x415a24?.[_0x184286(0x312)]?.['on']?.(_0x371daa[_0x184286(0x204)],_0x4d2f4f);const _0x5ad64d=[];if(_0x415a24?.[_0x184286(0x312)]?.['on'])for(const _0x13bf74 of _0x49c777){const _0x45b483=_0x40cc9b=>{_0x4f51a5({[_0x541d5c]:_0x27ae24,'event':_0x13bf74,'data':_0x40cc9b??{}});};_0x415a24[_0x184286(0x312)]['on'](_0x13bf74,_0x45b483),_0x5ad64d[_0x184286(0x31c)]({'event':_0x13bf74,'handler':_0x45b483});}const _0x5c0d12=setInterval(()=>{_0x52680d(),_0x333d4c();},_0x56ec29);_0x5c0d12[_0x184286(0x38b)]?.();const _0x29098a=(_0x54350f,_0x3918ac)=>{const _0x43cd7a=_0x184286;if(!_0x3918ac||typeof _0x3918ac!==_0x43cd7a(0x1a9)||_0x3918ac[_0x541d5c]!==_0x13e283)return;if(!_0x415a24?.['log']?.[_0x43cd7a(0x207)])return;const _0x1d6723=_0x3918ac[_0x43cd7a(0x219)]||{};_0x415a24[_0x43cd7a(0x1a5)]['ingest']({..._0x1d6723,'msg':'[w'+_0x3918ac[_0x43cd7a(0x31f)]+']\x20'+(_0x1d6723[_0x43cd7a(0x213)]??''),'meta':{..._0x1d6723[_0x43cd7a(0x1f8)]||{},'worker':_0x3918ac[_0x43cd7a(0x31f)],'workerPid':_0x3918ac[_0x43cd7a(0x174)]}});};_0x3f2a8c['on'](_0x184286(0x16c),_0x29098a);const _0x3601c7=(_0x35e1d1,_0x3cf646)=>{const _0x6b1558=_0x184286;if(!_0x3cf646||typeof _0x3cf646!==_0x6b1558(0x1a9)||_0x3cf646[_0x541d5c]!==_0x46180a)return;const _0x41a4dc=_0x410883[_0x6b1558(0x2d9)](_0x35e1d1[_0x6b1558(0x1f4)][_0x6b1558(0x174)]);if(_0x41a4dc){_0x41a4dc['stats']={..._0x3cf646['stats'],'at':Date[_0x6b1558(0x309)]()};if(_0x3cf646[_0x6b1558(0x16f)]!==undefined)_0x41a4dc[_0x6b1558(0x16f)]=_0x3cf646[_0x6b1558(0x16f)];}};_0x3f2a8c['on'](_0x184286(0x16c),_0x3601c7),_0x3f2a8c['on'](_0x184286(0x382),(_0x354c31,_0x2b8057,_0x5250d6)=>{const _0x5e12ea=_0x184286,_0x1ae538=_0x354c31[_0x5e12ea(0x1f4)][_0x5e12ea(0x174)],_0x3b2557=_0x332977(_0x354c31),_0x554eb2=_0x410883[_0x5e12ea(0x2d9)](_0x1ae538);if(_0x554eb2&&_0x415a24?.[_0x5e12ea(0x339)])_0x415a24[_0x5e12ea(0x339)][_0x5e12ea(0x350)](_0x1ae538+':'+_0x554eb2['startedAt'])[_0x5e12ea(0x28b)](()=>{});_0x410883[_0x5e12ea(0x18b)](_0x1ae538),console[_0x5e12ea(0x1a5)](_0x5e12ea(0x395)+_0x1ae538+_0x5e12ea(0x198)+(_0x3b2557??'?')+_0x5e12ea(0x284)+(_0x5e12ea(0x329)+_0x2b8057+_0x5e12ea(0x334)+(_0x5250d6??'none')+');\x20'+_0x410883[_0x5e12ea(0x33c)]+'\x20worker(s)\x20remaining')),_0x333d4c();if(_0x365a7c||_0x3b2557==null)return;const _0x388f58=_0x43af35[_0x5e12ea(0x2d9)](_0x3b2557);if(!_0x388f58||_0x388f58[_0x5e12ea(0x237)])return;const _0x76cd72=Date[_0x5e12ea(0x309)]();_0x388f58[_0x5e12ea(0x210)][_0x5e12ea(0x31c)](_0x76cd72),_0x388f58['deaths']=_0x388f58['deaths'][_0x5e12ea(0x255)](_0x50d09e=>_0x76cd72-_0x50d09e<=_0x542b9f);if(_0x388f58[_0x5e12ea(0x210)][_0x5e12ea(0x330)]>=_0x23e868){_0x388f58[_0x5e12ea(0x237)]=!![],console[_0x5e12ea(0x326)](_0x5e12ea(0x2f6)+_0x3b2557+_0x5e12ea(0x250)+_0x388f58[_0x5e12ea(0x210)][_0x5e12ea(0x330)]+_0x5e12ea(0x1c8)+(_0x542b9f+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x410883[_0x5e12ea(0x33c)]+_0x5e12ea(0x259)));return;}_0x388f58[_0x5e12ea(0x2b0)]++;const _0x36c79c=Math[_0x5e12ea(0x1e4)](_0x1c105c,_0x39d48e*0x2**(_0x388f58['consecutiveFailures']-0x1));console[_0x5e12ea(0x1a5)](_0x5e12ea(0x283)+_0x3b2557+_0x5e12ea(0x1d0)+_0x36c79c+_0x5e12ea(0x30b)+_0x388f58[_0x5e12ea(0x2b0)]+')'),_0x388f58[_0x5e12ea(0x2fc)]=setTimeout(()=>{const _0x18eb9a=_0x5e12ea;_0x388f58[_0x18eb9a(0x2fc)]=null;if(_0x365a7c||_0x388f58[_0x18eb9a(0x237)])return;const _0x517639=_0x245e6b(_0x3b2557);_0x517639[_0x18eb9a(0x20e)](_0x18eb9a(0x27e),()=>{const _0x18cfce=_0x18eb9a;if(_0x43af35[_0x18cfce(0x2d9)](_0x3b2557)===_0x388f58)_0x388f58[_0x18cfce(0x2b0)]=0x0;});},_0x36c79c),_0x388f58[_0x5e12ea(0x2fc)][_0x5e12ea(0x38b)]?.();});const _0x27297d=[..._0x410883[_0x184286(0x305)]()];console['log']('[okdb-cluster]\x20primary\x20pid='+process[_0x184286(0x174)]+_0x184286(0x21f)+_0x3574a2+_0x184286(0x1c4)+_0x5a3e52+':\x20'+('['+_0x27297d[_0x184286(0x280)](',\x20')+']'));const _0x548912={'_isClusterController':!![],'port':_0x5a3e52,'primaryOkdb':_0x415a24??null,'status'(){const _0x5a9605=_0x184286;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x5a3e52,'primaryRole':_0x415a24?.[_0x5a9605(0x19f)]??null,'processorPid':null,'supervisorPid':process[_0x5a9605(0x174)],'workers':[..._0x410883[_0x5a9605(0x344)]()][_0x5a9605(0x2b2)](({worker:_0x2a90ef})=>({'pid':_0x2a90ef['process'][_0x5a9605(0x174)],'id':_0x2a90ef['id'],'dead':_0x2a90ef['isDead']()}))};},async 'close'(){const _0x16692c=_0x184286;_0x365a7c=!![];for(const _0x5bb517 of _0x43af35[_0x16692c(0x344)]()){_0x5bb517['dead']=!![],_0x5bb517[_0x16692c(0x2fc)]&&(clearTimeout(_0x5bb517['respawnTimer']),_0x5bb517[_0x16692c(0x2fc)]=null);}clearInterval(_0x5c0d12),_0x3f2a8c[_0x16692c(0x36f)]('message',_0x29098a),_0x3f2a8c[_0x16692c(0x36f)](_0x16692c(0x16c),_0x3601c7),_0x415a24?.[_0x16692c(0x312)]?.[_0x16692c(0x36f)]?.(_0x371daa['SYSTEM_PROC'],_0x4d2f4f);if(_0x415a24?.[_0x16692c(0x312)]?.[_0x16692c(0x36f)])for(const {event:_0x35c978,handler:_0x5cda3c}of _0x5ad64d){try{_0x415a24[_0x16692c(0x312)][_0x16692c(0x36f)](_0x35c978,_0x5cda3c);}catch{}}_0x5ad64d['length']=0x0;const _0x4fded8=[..._0x410883['values']()]['map'](({worker:_0x43eb7c})=>_0x43eb7c);if(_0x4fded8[_0x16692c(0x330)]===0x0)return;await Promise[_0x16692c(0x265)](_0x4fded8[_0x16692c(0x2b2)](_0x562e8c=>new Promise(_0x277368=>{const _0x4073d6=_0x16692c;if(_0x562e8c[_0x4073d6(0x1ae)]()){_0x277368();return;}let _0x3c968b=![];const _0x1ed0b0=()=>{if(_0x3c968b)return;_0x3c968b=!![];if(_0x63a91c)clearTimeout(_0x63a91c);_0x277368();};_0x562e8c['once'](_0x4073d6(0x382),_0x1ed0b0);const _0x63a91c=setTimeout(()=>{const _0x15c2ae=_0x4073d6;try{_0x562e8c[_0x15c2ae(0x1f4)][_0x15c2ae(0x29f)]();}catch{}},_0x515b32+0x1f4);_0x63a91c['unref']?.();try{_0x562e8c[_0x4073d6(0x1a7)]();}catch{try{_0x562e8c[_0x4073d6(0x1f4)]['kill']();}catch{}}})));}};return _0x548912;}async function _0x23abbb({makeOkdb:_0x26fbe4,port:_0x4a3e89}){const _0x189b1a=await _0x26fbe4();return _0x53ab33(_0x189b1a),_0x189b1a['http']['listen'](_0x4a3e89);}function _0x53ab33(_0x20c3fd){const _0x322e4e=_0x5a63ba;if(!_0x20c3fd||_0x20c3fd[_0x322e4e(0x2b7)])return;_0x20c3fd[_0x322e4e(0x2b7)]=!![];try{const {OKDBChangefeed:_0x3186fd}=requireOkdbChangefeed(),_0x3516ed=_0x20c3fd[_0x322e4e(0x195)];if(_0x3516ed&&typeof _0x3516ed[_0x322e4e(0x394)]==='function'){const _0x1485cb=new _0x3186fd(_0x20c3fd);_0x1485cb[_0x322e4e(0x2c5)](),_0x3516ed[_0x322e4e(0x394)](_0x1485cb),_0x20c3fd[_0x322e4e(0x1cb)]=_0x1485cb;}}catch(_0x34086){_0x20c3fd[_0x322e4e(0x1a5)]?.[_0x322e4e(0x19c)]?.(_0x322e4e(0x28c)+(_0x34086?.[_0x322e4e(0x16c)]??_0x34086),{'feature':'cluster'});}const _0x3d352f=_0x5ed72e=>{const _0x413dad=_0x322e4e;if(!_0x5ed72e||typeof _0x5ed72e!==_0x413dad(0x1a9)||_0x5ed72e[_0x541d5c]==null)return;if(_0x5ed72e[_0x541d5c]===_0x27ae24)try{_0x20c3fd['_adminRelay']?.[_0x413dad(0x1ff)]?.(_0x5ed72e[_0x413dad(0x331)],_0x5ed72e[_0x413dad(0x241)]);}catch{}};process['on'](_0x322e4e(0x16c),_0x3d352f),_0x20c3fd[_0x322e4e(0x37c)]=_0x3d352f;{let _0xc2c523=process[_0x322e4e(0x18c)](),_0x2d861c=Date['now']();const _0x20302c=()=>{const _0x2bb12d=_0x322e4e;if(typeof process[_0x2bb12d(0x1d5)]!==_0x2bb12d(0x306)||!process[_0x2bb12d(0x266)])return;const _0x1ce551=Date[_0x2bb12d(0x309)](),_0x2c3b7e=process[_0x2bb12d(0x18c)](),_0x5f16f2=(_0x1ce551-_0x2d861c)*0x3e8,_0x3536c4=_0x2c3b7e['user']-_0xc2c523['user']+(_0x2c3b7e[_0x2bb12d(0x29d)]-_0xc2c523['system']),_0x217898=_0x5f16f2>0x0?Math[_0x2bb12d(0x1e4)](0x64,Math[_0x2bb12d(0x2aa)](_0x3536c4/(_0x5f16f2*(_0x31e10c[_0x2bb12d(0x21a)]()[_0x2bb12d(0x330)]||0x1))*0x64)):0x0;_0xc2c523=_0x2c3b7e,_0x2d861c=_0x1ce551;const _0x42ec4d=process[_0x2bb12d(0x2f5)]();let _0x553f8f=null;try{_0x553f8f=_0x20c3fd['role']?.[_0x2bb12d(0x1d3)]?_0x20c3fd['processes']?.[_0x2bb12d(0x2d8)]?.()??null:null;}catch{}try{process[_0x2bb12d(0x1d5)]({[_0x541d5c]:_0x46180a,'stats':{'rss':_0x42ec4d[_0x2bb12d(0x2b9)],'heapUsed':_0x42ec4d[_0x2bb12d(0x191)],'heapTotal':_0x42ec4d[_0x2bb12d(0x267)],'external':_0x42ec4d[_0x2bb12d(0x23b)],'cpuPct':_0x217898,'cpuWindowMs':Math[_0x2bb12d(0x2aa)](_0x5f16f2/0x3e8)||null},'processing':_0x553f8f});}catch{}},_0x206663=Math[_0x322e4e(0x1b4)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4f6575=setInterval(_0x20302c,_0x206663);_0x4f6575[_0x322e4e(0x38b)]?.(),_0x20302c();for(const _0x3ff5a1 of[_0x322e4e(0x2cb),_0x322e4e(0x18e)]){_0x20c3fd['events']?.['on']?.(_0x3ff5a1,()=>{try{_0x20302c();}catch{}});}}let _0x44a480=![];const _0x1ab060=async _0x2753d3=>{const _0x51675c=_0x322e4e;if(_0x44a480)return;_0x44a480=!![];const _0x386dff=setTimeout(()=>process[_0x51675c(0x382)](_0x2753d3),_0x515b32);_0x386dff['unref']?.();try{await _0x20c3fd[_0x51675c(0x264)]?.();}catch{}process[_0x51675c(0x382)](_0x2753d3);};process['on'](_0x322e4e(0x1a7),()=>_0x1ab060(0x0));if(process['platform']!==_0x322e4e(0x275)){const _0x1c33fe=setInterval(()=>{const _0x581411=_0x322e4e;if(process[_0x581411(0x2d1)]===0x1)_0x1ab060(0x0);},_0x20aad3);_0x1c33fe[_0x322e4e(0x38b)]?.(),_0x20c3fd[_0x322e4e(0x175)]=_0x1c33fe;}}return okdbCluster={'runClustered':_0x21b5b1,'attachWorkerCluster':_0x53ab33},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x45362d=_0x37b856;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x1d16d2=require$$0$5,{attachWorkerCluster:_0x1690ca}=requireOkdbCluster();async function _0x3dfcd1(){const _0x5d246f=_0x5e6c,_0x3b8c8f=process.env.OKDB_HTTP_CHILD;if(!_0x3b8c8f)throw new Error(_0x5d246f(0x311));const {rootPath:_0x16f999,port:_0x24c8a0,options:options={},logLevel:logLevel=_0x5d246f(0x17a)}=JSON[_0x5d246f(0x24c)](_0x3b8c8f);if(!_0x16f999||!_0x24c8a0)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0x62146c=new _0x1d16d2(_0x16f999,{...options,'engines':![],'processors':![],'compaction':![]});_0x62146c[_0x5d246f(0x1a5)]['detachConsole']?.();const _0x9b8505=process.env.OKDB_CLUSTER_SLOT??'?',_0x3e6fa5={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1e0f4d=_0x3e6fa5[logLevel]??_0x3e6fa5[_0x5d246f(0x17a)];_0x62146c[_0x5d246f(0x1a5)][_0x5d246f(0x386)](_0xcc540f=>{const _0x2b7a3e=_0x5d246f;if((_0x3e6fa5[_0xcc540f[_0x2b7a3e(0x24f)]]??0x1)<_0x1e0f4d)return;try{process[_0x2b7a3e(0x1d5)]?.({'__okdbCluster':_0x2b7a3e(0x1a5),'slot':_0x9b8505,'pid':process[_0x2b7a3e(0x174)],'entry':_0xcc540f});}catch{}}),await _0x62146c[_0x5d246f(0x1e9)](),_0x1690ca(_0x62146c),await _0x62146c[_0x5d246f(0x371)][_0x5d246f(0x374)](_0x24c8a0);}return _0x3dfcd1()[_0x45362d(0x28b)](_0x60e9b=>{const _0x443beb=_0x45362d;try{process[_0x443beb(0x1d5)]?.({'__okdbCluster':_0x443beb(0x1a5),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x443beb(0x174)],'entry':{'level':_0x443beb(0x326),'msg':_0x443beb(0x356)+(_0x60e9b?.[_0x443beb(0x16c)]??_0x60e9b)}});}catch{}process[_0x443beb(0x382)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x37b856(0x1df)]=okdbHttpWorkerChild;
@@ -1 +1 @@
1
- 'use strict';function _0x2427(_0x5ba289,_0x517568){_0x5ba289=_0x5ba289-0x77;const _0x194937=_0x1949();let _0x2427df=_0x194937[_0x5ba289];return _0x2427df;}const _0x115263=_0x2427;(function(_0x108e36,_0x4d22cf){const _0x429604=_0x2427,_0x5428ad=_0x108e36();while(!![]){try{const _0x2de57f=-parseInt(_0x429604(0x92))/0x1+-parseInt(_0x429604(0x98))/0x2*(-parseInt(_0x429604(0xba))/0x3)+-parseInt(_0x429604(0x84))/0x4*(-parseInt(_0x429604(0x82))/0x5)+parseInt(_0x429604(0xc7))/0x6+-parseInt(_0x429604(0xc8))/0x7*(-parseInt(_0x429604(0x78))/0x8)+parseInt(_0x429604(0xcd))/0x9*(-parseInt(_0x429604(0x88))/0xa)+parseInt(_0x429604(0x90))/0xb*(-parseInt(_0x429604(0xbc))/0xc);if(_0x2de57f===_0x4d22cf)break;else _0x5428ad['push'](_0x5428ad['shift']());}catch(_0x219bbc){_0x5428ad['push'](_0x5428ad['shift']());}}}(_0x1949,0x48d45));var require$$0=require(_0x115263(0x7b)),require$$1=require(_0x115263(0xa8));function getDefaultExportFromCjs(_0x1797ed){const _0x1f78d1=_0x115263;return _0x1797ed&&_0x1797ed[_0x1f78d1(0x7a)]&&Object[_0x1f78d1(0x9d)][_0x1f78d1(0x7d)][_0x1f78d1(0x81)](_0x1797ed,'default')?_0x1797ed['default']:_0x1797ed;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x12b32d=_0x115263;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4d2cde={'PUT':_0x12b32d(0xa1),'REMOVE':_0x12b32d(0xb8),'INDEX_DROP':_0x12b32d(0x77),'INDEX_REGISTER':_0x12b32d(0xa4),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x12b32d(0xb2),'TYPE_DROP':_0x12b32d(0x8f),'FTS_REGISTER':_0x12b32d(0xa6),'FTS_DROP':_0x12b32d(0x79),'FTS_RESET':'resetFts','SCHEMA_SET':_0x12b32d(0x8a),'SCHEMA_DROP':_0x12b32d(0xc2),'TTL_SET':_0x12b32d(0xae),'TTL_CLEAR':'clearTtl'},_0x4da3fe={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x12b32d(0xb4),'SYSTEM_CLOCK_CHANGE':_0x12b32d(0xbb),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x12b32d(0xa9),'SYSTEM_TYPE_DROP':_0x12b32d(0xb1),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x12b32d(0x85),'ITEM_UPDATE':_0x12b32d(0x94),'ITEM_REMOVE':_0x12b32d(0xa7),'INDEX_RESET':_0x12b32d(0x97),'INDEX_READY':_0x12b32d(0xb0),'INDEX_PROGRESS':_0x12b32d(0xad),'VIEW_PROGRESS':_0x12b32d(0xc3),'INDEX_DROP':_0x12b32d(0x80),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x12b32d(0x87),'FTS_DROP':_0x12b32d(0x8b),'FTS_RESET':_0x12b32d(0xb6),'SCHEMA_SET':_0x12b32d(0x8e),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x12b32d(0x8d),'REF_VIOLATION':_0x12b32d(0xaa),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x12b32d(0xab),'TXN_START':_0x12b32d(0x9e),'TXN_END':_0x12b32d(0xac),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x12b32d(0x91),'TYPE_DROP':_0x12b32d(0xc4),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x12b32d(0xcc),'SYSTEM_ENV_RELEASE':_0x12b32d(0xa5),'TTL_EXPIRED':_0x12b32d(0xbe),'TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x12b32d(0xb3),'LICENSE_ADDED':_0x12b32d(0x86),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x12b32d(0xc9)},_0x547878={'CREATING':'creating','RESETTING':_0x12b32d(0x9b),'READY':'ready','DROPPING':_0x12b32d(0x7f),'WAITING':_0x12b32d(0xcb)},_0x21c3ff={'CREATED':_0x12b32d(0xaf),'STARTING':_0x12b32d(0xa3),'STARTED':'started','STOPPING':'stopping','STOPPED':_0x12b32d(0x83)},_0x4252b6={'CREATING':_0x12b32d(0xca),'READY':_0x12b32d(0xb9),'HALTED':'halted','STOPPED':'stopped','RESETTING':_0x12b32d(0x9b)},_0x1aa24a=Object[_0x12b32d(0x9a)]({'POKE':'bus:poke','DRAIN':_0x12b32d(0xa2),'TYPE_DROP':_0x12b32d(0xc0),'PROC':_0x12b32d(0x89),'ENV_RELEASE':_0x12b32d(0x95)});return okdbEnums={'BUS_EVENTS':_0x1aa24a,'CHANGE_ACTIONS':_0x4d2cde,'EVENTS':_0x4da3fe,'INDEX_STATE':_0x547878,'OKDB_STATE':_0x21c3ff,'VIEW_STATE':_0x4252b6},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x1315e2=_0x115263;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x37002f,workerData:_0x22f60f}=require$$0,_0x5e207c=require$$1,{EVENTS:_0x2b0311}=requireOkdbEnums();async function _0x35d515(){const _0x133f36=_0x2427,{rootPath:_0x3ef0f2,envName:_0x4f3e03,viewName:_0x577864,definition:_0x2f0793}=_0x22f60f,_0x2812b7=new _0x5e207c(_0x3ef0f2,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x2812b7[_0x133f36(0x99)]();const _0xab4f3b=_0x2812b7[_0x133f36(0xc6)](_0x4f3e03);_0xab4f3b[_0x133f36(0xbd)]['on'](_0x2b0311[_0x133f36(0x7c)],_0x206b96=>{const _0xf1d52c=_0x133f36;if(_0x206b96?.[_0xf1d52c(0x96)]!==_0x577864)return;try{_0x37002f[_0xf1d52c(0xb7)]({'type':_0xf1d52c(0x9f),'event':_0x206b96});}catch{}}),await _0xab4f3b[_0x133f36(0xc1)]['_prepareViewDict'](_0x2f0793),await _0xab4f3b[_0x133f36(0xc1)]['_activateViewStorage'](_0x577864,_0x2f0793),await _0xab4f3b['views'][_0x133f36(0xc5)](_0x577864,_0x2f0793),_0x37002f[_0x133f36(0xb7)]({'type':_0x133f36(0x8c)}),await _0x2812b7[_0x133f36(0xb5)](),process[_0x133f36(0x7e)](0x0);}return _0x35d515()[_0x1315e2(0x93)](_0x51cc07=>{const _0x42c3bb=_0x1315e2;try{_0x37002f[_0x42c3bb(0xb7)]({'type':_0x42c3bb(0xa0),'error':_0x51cc07['message']??String(_0x51cc07),'stack':_0x51cc07[_0x42c3bb(0x9c)]});}catch{}process[_0x42c3bb(0x7e)](0x1);}),okdbViewsBootstrapWorker$1;}function _0x1949(){const _0x251e01=['ttl:expired','exports','bus:type_drop','views','dropSchema','view:progress','type:drop','_runBootstrapScanPhases','env','1116210mmcHZk','14RHUSlf','license:removed','creating','waiting','env:removed','342vRZeDX','dropIndex','1633008EPHPWP','dropFts','__esModule','worker_threads','VIEW_PROGRESS','hasOwnProperty','exit','dropping','index:drop','call','5BfAIcK','stopped','1911124jkWaym','item:create','license:added','fts:registered','79670pZwQHJ','bus:proc','setSchema','fts:drop','done','unique:violation_resolved','schema:set','dropType','77Fxxgya','type:registered','286474osDxdv','catch','item:update','bus:env_release','name','index:reset','15818cvypED','open','freeze','resetting','stack','prototype','txn:start','progress','error','put','bus:drain','starting','registerIndex','system:env_release','registerFts','item:remove','./okdb','system:drain','ref:violation','sync:apply','txn:end','index:progress','setTtl','created','index:ready','system:type_drop','registerType','license:invalid','system:stopped','close','fts:reset','postMessage','remove','ready','120NDTXId','system:clock_change','858684awmQNQ','events'];_0x1949=function(){return _0x251e01;};return _0x1949();}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x115263(0xbf)]=okdbViewsBootstrapWorker;
1
+ 'use strict';const _0x36def4=_0x22b5;(function(_0x224d7f,_0x187b99){const _0x135d78=_0x22b5,_0x4526ef=_0x224d7f();while(!![]){try{const _0x8b81db=parseInt(_0x135d78(0xb7))/0x1+-parseInt(_0x135d78(0x89))/0x2+parseInt(_0x135d78(0x8d))/0x3+-parseInt(_0x135d78(0x92))/0x4+-parseInt(_0x135d78(0x77))/0x5*(parseInt(_0x135d78(0x6f))/0x6)+-parseInt(_0x135d78(0x86))/0x7+-parseInt(_0x135d78(0x79))/0x8*(-parseInt(_0x135d78(0x82))/0x9);if(_0x8b81db===_0x187b99)break;else _0x4526ef['push'](_0x4526ef['shift']());}catch(_0x2b02b9){_0x4526ef['push'](_0x4526ef['shift']());}}}(_0x26e1,0x58769));function _0x26e1(){const _0x2518a6=['stopping','name','remove','index:reset','exit','type:registered','unique:violation','ready','system:poke','freeze','done','dropFts','item:create','bus:proc','system:type_drop','halted','clearTtl','index:ready','prototype','resetFts','system:drain','put','starting','73996ozZpmL','VIEW_PROGRESS','resetting','fts:reset','setTtl','item:remove','_prepareViewDict','189786RFTieO','bus:env_release','__esModule','txn:start','dropIndex','setSchema','env:removed','resetIndex','75lFheFV','registerIndex','8tpLPsP','registerFts','index:drop','bus:poke','bus:type_drop','started','catch','message','bus:drain','13387320Aqbrfd','exports','stopped','system:env_release','499156vyLhYd','index:progress','txn:end','894196paNMth','license:removed','system:stopped','schema:set','623130AGwlht','license:invalid','txn:rollback','ttl:clear','license:added','1655880NbwCmk','type:drop','unique:violation_resolved','env:opened','fts:drop','ref:violation','views','open','_runBootstrapScanPhases','waiting','env','system:ready','postMessage','default'];_0x26e1=function(){return _0x2518a6;};return _0x26e1();}function _0x22b5(_0x4dfa6c,_0x4ef16b){_0x4dfa6c=_0x4dfa6c-0x69;const _0x26e18a=_0x26e1();let _0x22b502=_0x26e18a[_0x4dfa6c];return _0x22b502;}var require$$0=require('worker_threads'),require$$1=require('./okdb');function getDefaultExportFromCjs(_0x562ee5){const _0x505d69=_0x22b5;return _0x562ee5&&_0x562ee5[_0x505d69(0x71)]&&Object[_0x505d69(0xb2)]['hasOwnProperty']['call'](_0x562ee5,_0x505d69(0x9f))?_0x562ee5[_0x505d69(0x9f)]:_0x562ee5;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4e3175=_0x22b5;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4ce4cc={'PUT':_0x4e3175(0xb5),'REMOVE':_0x4e3175(0xa2),'INDEX_DROP':_0x4e3175(0x73),'INDEX_REGISTER':_0x4e3175(0x78),'INDEX_RESET':_0x4e3175(0x76),'TYPE_REGISTER':'registerType','TYPE_DROP':'dropType','FTS_REGISTER':_0x4e3175(0x7a),'FTS_DROP':_0x4e3175(0xab),'FTS_RESET':_0x4e3175(0xb3),'SCHEMA_SET':_0x4e3175(0x74),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x4e3175(0x6c),'TTL_CLEAR':_0x4e3175(0xb0)},_0x5d2aef={'SYSTEM_READY':_0x4e3175(0x9d),'SYSTEM_STOPPED':_0x4e3175(0x8b),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x4e3175(0xa8),'SYSTEM_DRAIN':_0x4e3175(0xb4),'SYSTEM_TYPE_DROP':_0x4e3175(0xae),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x4e3175(0xac),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x4e3175(0x6d),'INDEX_RESET':_0x4e3175(0xa3),'INDEX_READY':_0x4e3175(0xb1),'INDEX_PROGRESS':_0x4e3175(0x87),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x4e3175(0x7b),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':'fts:registered','FTS_DROP':_0x4e3175(0x96),'FTS_RESET':_0x4e3175(0x6b),'SCHEMA_SET':_0x4e3175(0x8c),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x4e3175(0xa6),'UNIQUE_VIOLATION_RESOLVED':_0x4e3175(0x94),'REF_VIOLATION':_0x4e3175(0x97),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':_0x4e3175(0x72),'TXN_END':_0x4e3175(0x88),'TXN_ROLLBACK':_0x4e3175(0x8f),'TYPE_REGISTERED':_0x4e3175(0xa5),'TYPE_DROP':_0x4e3175(0x93),'ENV_OPENED':_0x4e3175(0x95),'ENV_REMOVED':_0x4e3175(0x75),'SYSTEM_ENV_RELEASE':_0x4e3175(0x85),'TTL_EXPIRED':'ttl:expired','TTL_SET':'ttl:set','TTL_CLEAR':_0x4e3175(0x90),'LICENSE_INVALID':_0x4e3175(0x8e),'LICENSE_ADDED':_0x4e3175(0x91),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x4e3175(0x8a)},_0xca92db={'CREATING':'creating','RESETTING':_0x4e3175(0x6a),'READY':_0x4e3175(0xa7),'DROPPING':'dropping','WAITING':_0x4e3175(0x9b)},_0x100bf1={'CREATED':'created','STARTING':_0x4e3175(0xb6),'STARTED':_0x4e3175(0x7e),'STOPPING':_0x4e3175(0xa0),'STOPPED':'stopped'},_0x1ae804={'CREATING':'creating','READY':_0x4e3175(0xa7),'HALTED':_0x4e3175(0xaf),'STOPPED':_0x4e3175(0x84),'RESETTING':_0x4e3175(0x6a)},_0x315d30=Object[_0x4e3175(0xa9)]({'POKE':_0x4e3175(0x7c),'DRAIN':_0x4e3175(0x81),'TYPE_DROP':_0x4e3175(0x7d),'PROC':_0x4e3175(0xad),'ENV_RELEASE':_0x4e3175(0x70)});return okdbEnums={'BUS_EVENTS':_0x315d30,'CHANGE_ACTIONS':_0x4ce4cc,'EVENTS':_0x5d2aef,'INDEX_STATE':_0xca92db,'OKDB_STATE':_0x100bf1,'VIEW_STATE':_0x1ae804},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x17b435=_0x22b5;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x5ba29d,workerData:_0x515a04}=require$$0,_0x138d62=require$$1,{EVENTS:_0x170abe}=requireOkdbEnums();async function _0x5ec6a6(){const _0x17043a=_0x22b5,{rootPath:_0x49ee0d,envName:_0x8b5fce,viewName:_0x17902f,definition:_0x13ce3c}=_0x515a04,_0x3e63d4=new _0x138d62(_0x49ee0d,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x3e63d4[_0x17043a(0x99)]();const _0x2e872e=_0x3e63d4[_0x17043a(0x9c)](_0x8b5fce);_0x2e872e['events']['on'](_0x170abe[_0x17043a(0x69)],_0x30eb60=>{const _0x1f82b4=_0x17043a;if(_0x30eb60?.[_0x1f82b4(0xa1)]!==_0x17902f)return;try{_0x5ba29d['postMessage']({'type':'progress','event':_0x30eb60});}catch{}}),await _0x2e872e['views'][_0x17043a(0x6e)](_0x13ce3c),await _0x2e872e[_0x17043a(0x98)]['_activateViewStorage'](_0x17902f,_0x13ce3c),await _0x2e872e[_0x17043a(0x98)][_0x17043a(0x9a)](_0x17902f,_0x13ce3c),_0x5ba29d[_0x17043a(0x9e)]({'type':_0x17043a(0xaa)}),await _0x3e63d4['close'](),process[_0x17043a(0xa4)](0x0);}return _0x5ec6a6()[_0x17b435(0x7f)](_0x126eb5=>{const _0x209652=_0x17b435;try{_0x5ba29d[_0x209652(0x9e)]({'type':'error','error':_0x126eb5[_0x209652(0x80)]??String(_0x126eb5),'stack':_0x126eb5['stack']});}catch{}process[_0x209652(0xa4)](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x36def4(0x83)]=okdbViewsBootstrapWorker;