@kedem/okdb 2.3.3 → 2.3.4

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 _0x204085=_0x10a2;(function(_0x3b8fd3,_0x47dc9b){const _0x232fe1=_0x10a2,_0x2030e9=_0x3b8fd3();while(!![]){try{const _0x1b4d00=parseInt(_0x232fe1(0x1ee))/0x1+-parseInt(_0x232fe1(0x28d))/0x2*(parseInt(_0x232fe1(0x1c0))/0x3)+-parseInt(_0x232fe1(0x2b4))/0x4+parseInt(_0x232fe1(0xcb))/0x5+parseInt(_0x232fe1(0x136))/0x6*(-parseInt(_0x232fe1(0xa3))/0x7)+parseInt(_0x232fe1(0xe9))/0x8+parseInt(_0x232fe1(0xfb))/0x9*(parseInt(_0x232fe1(0x2b9))/0xa);if(_0x1b4d00===_0x47dc9b)break;else _0x2030e9['push'](_0x2030e9['shift']());}catch(_0x2dac16){_0x2030e9['push'](_0x2030e9['shift']());}}}(_0x3e77,0xb3e9f));function _0x10a2(_0x11255f,_0x24657f){_0x11255f=_0x11255f-0x92;const _0x3e77ca=_0x3e77();let _0x10a286=_0x3e77ca[_0x11255f];return _0x10a286;}var require$$0$5=require(_0x204085(0xe3)),require$$1$1=require('cluster'),require$$1=require(_0x204085(0x1a5)),require$$0$3=require('os'),require$$2=require(_0x204085(0x13e)),require$$0=require(_0x204085(0x13d)),require$$0$2=require(_0x204085(0x142)),require$$0$1=require('fs'),require$$0$4=require(_0x204085(0x185));function getDefaultExportFromCjs(_0x4bdf05){const _0x3ae8d9=_0x204085;return _0x4bdf05&&_0x4bdf05['__esModule']&&Object[_0x3ae8d9(0x1f1)][_0x3ae8d9(0x1d4)][_0x3ae8d9(0x171)](_0x4bdf05,'default')?_0x4bdf05[_0x3ae8d9(0x97)]:_0x4bdf05;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x6b5b7=_0x204085;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x1b3326={'PUT':_0x6b5b7(0x1b9),'REMOVE':_0x6b5b7(0x28f),'INDEX_DROP':_0x6b5b7(0x20f),'INDEX_REGISTER':_0x6b5b7(0x124),'INDEX_RESET':_0x6b5b7(0x1ed),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x6b5b7(0x13b),'FTS_REGISTER':_0x6b5b7(0x283),'FTS_DROP':_0x6b5b7(0x16b),'FTS_RESET':_0x6b5b7(0x2be),'SCHEMA_SET':_0x6b5b7(0x19d),'SCHEMA_DROP':_0x6b5b7(0x1a7),'TTL_SET':'setTtl','TTL_CLEAR':_0x6b5b7(0x196)},_0x1dd0f1={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x6b5b7(0x24e),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x6b5b7(0xe7),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x6b5b7(0x20c),'SYSTEM_TYPE_DROP':_0x6b5b7(0x25c),'SYSTEM_PROC':_0x6b5b7(0x1f6),'SYSTEM_BUS_STATE_CHANGE':_0x6b5b7(0x21f),'ITEM_CREATE':_0x6b5b7(0x220),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':_0x6b5b7(0x132),'INDEX_READY':_0x6b5b7(0x18d),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x6b5b7(0x1af),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x6b5b7(0xd1),'FTS_REGISTERED':_0x6b5b7(0x292),'FTS_DROP':'fts:drop','FTS_RESET':_0x6b5b7(0x104),'SCHEMA_SET':_0x6b5b7(0x1f0),'SCHEMA_DROP':_0x6b5b7(0xcd),'UNIQUE_VIOLATION':_0x6b5b7(0x1ad),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x6b5b7(0x1cd),'REF_VIOLATION_RESOLVED':_0x6b5b7(0x10e),'SYNC_APPLY':_0x6b5b7(0x2aa),'TXN_START':_0x6b5b7(0x1ec),'TXN_END':_0x6b5b7(0xeb),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x6b5b7(0x12c),'ENV_OPENED':_0x6b5b7(0x2a6),'ENV_REMOVED':_0x6b5b7(0x1ca),'SYSTEM_ENV_RELEASE':_0x6b5b7(0xd6),'TTL_EXPIRED':_0x6b5b7(0x112),'TTL_SET':_0x6b5b7(0xaa),'TTL_CLEAR':_0x6b5b7(0x27c),'LICENSE_INVALID':_0x6b5b7(0x2b1),'LICENSE_ADDED':_0x6b5b7(0x145),'LICENSE_ACTIVATED':_0x6b5b7(0x2a0),'LICENSE_REMOVED':_0x6b5b7(0x281)},_0x203439={'CREATING':'creating','RESETTING':_0x6b5b7(0x248),'READY':'ready','DROPPING':_0x6b5b7(0x22f),'WAITING':_0x6b5b7(0xd2),'ERROR':_0x6b5b7(0x119)},_0x5631e5={'CREATED':_0x6b5b7(0xe2),'STARTING':'starting','STARTED':_0x6b5b7(0xaf),'STOPPING':_0x6b5b7(0x298),'STOPPED':_0x6b5b7(0x1c9)},_0x5a1dde={'CREATING':_0x6b5b7(0x1e2),'READY':_0x6b5b7(0x169),'HALTED':'halted','STOPPED':_0x6b5b7(0x1c9),'RESETTING':_0x6b5b7(0x248)},_0x2ef819=Object[_0x6b5b7(0x23b)]({'POKE':_0x6b5b7(0x265),'DRAIN':_0x6b5b7(0x1d6),'TYPE_DROP':'bus:type_drop','PROC':_0x6b5b7(0x157),'ENV_RELEASE':_0x6b5b7(0xca)});return okdbEnums={'BUS_EVENTS':_0x2ef819,'CHANGE_ACTIONS':_0x1b3326,'EVENTS':_0x1dd0f1,'INDEX_STATE':_0x203439,'OKDB_STATE':_0x5631e5,'VIEW_STATE':_0x5a1dde},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0xe8b8cd=_0x204085;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x21c403,performance:_0x2c2b80}=require$$0,_0x24810e=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x320d34=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x35fbfb=process.env.OKDB_LOOP_LAG_ALL==='1',_0x3ded14=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x417ebd{constructor(){const _0x387715=_0x10a2;this[_0x387715(0x21b)]=_0x24810e,this['_buckets']=new Map(),this['_h']=null,this['_timer']=null,this[_0x387715(0x1b8)]=![],this[_0x387715(0x246)]=(_0x3ad097,_0x130ac0)=>process[_0x387715(0x110)][_0x387715(0x226)](_0x3ad097+(_0x130ac0?'\x20'+JSON[_0x387715(0xc4)](_0x130ac0):'')+'\x0a');}[_0xe8b8cd(0xef)](){const _0xb56dcd=_0xe8b8cd;return _0x2c2b80[_0xb56dcd(0xef)]();}['setLogger'](_0x548e76){const _0x468cbf=_0xe8b8cd;if(typeof _0x548e76==='function')this[_0x468cbf(0x246)]=_0x548e76;}[_0xe8b8cd(0x21e)](_0x4f52e8,_0x13da61,_0x443af0){const _0x405f69=_0xe8b8cd;if(!this[_0x405f69(0x21b)])return;let _0x5917f0=this[_0x405f69(0x291)][_0x405f69(0x162)](_0x4f52e8);!_0x5917f0&&(_0x5917f0={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x405f69(0x291)][_0x405f69(0x198)](_0x4f52e8,_0x5917f0)),_0x5917f0['ms']+=_0x13da61,_0x5917f0[_0x405f69(0x92)]+=0x1,_0x13da61>_0x5917f0[_0x405f69(0xe4)]&&(_0x5917f0[_0x405f69(0xe4)]=_0x13da61,_0x5917f0[_0x405f69(0x1e6)]=_0x443af0||'');}['start'](_0x2d23d0){const _0x46c48f=_0xe8b8cd;if(!this[_0x46c48f(0x21b)]||this[_0x46c48f(0x1b8)])return;this['_started']=!![];if(_0x2d23d0)this[_0x46c48f(0x246)]=_0x2d23d0;this['_h']=_0x21c403({'resolution':0xa}),this['_h'][_0x46c48f(0x9e)](),this[_0x46c48f(0x1e4)]=setInterval(()=>this['_report'](),_0x320d34);if(this[_0x46c48f(0x1e4)][_0x46c48f(0x113)])this[_0x46c48f(0x1e4)]['unref']();}[_0xe8b8cd(0xd0)](_0x4cffc8){const _0x3c98be=_0xe8b8cd;if(!this[_0x3c98be(0xc8)])this[_0x3c98be(0xc8)]=new Set();this[_0x3c98be(0xc8)]['add'](_0x4cffc8);if(!this['_started'])this[_0x3c98be(0xfa)]();}[_0xe8b8cd(0x13f)](_0x56491e){const _0x462563=_0xe8b8cd;this[_0x462563(0xc8)]?.[_0x462563(0x15a)](_0x56491e);}[_0xe8b8cd(0xfa)](){const _0x175e8a=_0xe8b8cd;if(this['_admissionStarted'])return;this[_0x175e8a(0xab)]=!![];!this['_h']&&(this['_h']=_0x21c403({'resolution':0xa}),this['_h'][_0x175e8a(0x9e)]());const _0x3a0833=_0x320d34;this[_0x175e8a(0xbf)]=setInterval(()=>{const _0x378077=_0x175e8a,_0x4e4b74=this['_h'];if(!_0x4e4b74)return;const _0x1b51f8=_0x4e4b74['percentile'](0x63)/0xf4240,_0x580c5e=_0x4e4b74[_0x378077(0x121)]/0xf4240,_0x12a612=_0x4e4b74[_0x378077(0x181)]/0xf4240;_0x4e4b74['reset']();if(this[_0x378077(0xc8)])for(const _0x186115 of this[_0x378077(0xc8)]){try{_0x186115({'p99Ms':_0x1b51f8,'maxMs':_0x580c5e,'meanMs':_0x12a612,'reportMs':_0x3a0833});}catch{}}},_0x3a0833);if(this[_0x175e8a(0xbf)]['unref'])this[_0x175e8a(0xbf)][_0x175e8a(0x113)]();}[_0xe8b8cd(0x191)](){const _0x400eb9=_0xe8b8cd,_0x3e206c=this['_h'],_0x5d6ac7=_0x3e206c['max']/0xf4240,_0x259856=_0x3e206c[_0x400eb9(0x263)](0x63)/0xf4240,_0x5a3b93=_0x3e206c[_0x400eb9(0x181)]/0xf4240;_0x3e206c['reset']();const _0x1fd294=[...this['_buckets'][_0x400eb9(0x252)]()][_0x400eb9(0x280)](([_0x5ce88e,_0x104c77])=>({'label':_0x5ce88e,..._0x104c77}))[_0x400eb9(0xb3)]((_0x4fe1d3,_0x2dfe8f)=>_0x2dfe8f['ms']-_0x4fe1d3['ms'])[_0x400eb9(0x278)](0x0,0x8);this['_buckets']['clear']();const _0x492f83=_0x1fd294[_0x400eb9(0xbd)]((_0x137a1a,_0x44f5f7)=>_0x137a1a+_0x44f5f7['ms'],0x0),_0x3435bf=_0x1fd294[_0x400eb9(0x280)](_0x55c64a=>_0x55c64a[_0x400eb9(0x94)]+'='+_0x55c64a['ms'][_0x400eb9(0x288)](0x0)+_0x400eb9(0x223)+_0x55c64a['count']+(_0x55c64a['maxMs']>0x5?_0x400eb9(0x10d)+_0x55c64a[_0x400eb9(0xe4)][_0x400eb9(0x288)](0x0)+'ms'+(_0x55c64a[_0x400eb9(0x1e6)]?'\x20'+_0x55c64a[_0x400eb9(0x1e6)]:'')+')':''));(_0x35fbfb||_0x5d6ac7>=_0x3ded14)&&this[_0x400eb9(0x246)](_0x400eb9(0x1f9)+_0x320d34+_0x400eb9(0x9d)+_0x5d6ac7[_0x400eb9(0x288)](0x0)+'ms\x20p99='+_0x259856[_0x400eb9(0x288)](0x0)+'ms\x20mean='+_0x5a3b93[_0x400eb9(0x288)](0x0)+_0x400eb9(0x258)+_0x492f83[_0x400eb9(0x288)](0x0)+'ms'+(_0x3435bf[_0x400eb9(0xf6)]?_0x400eb9(0x247)+_0x3435bf[_0x400eb9(0x1f5)]('\x20\x20'):''),{'feature':'loop-lag'});if(this['_windowCbs'])for(const _0x2ebd80 of this[_0x400eb9(0xc8)]){try{_0x2ebd80({'p99Ms':_0x259856,'maxMs':_0x5d6ac7,'meanMs':_0x5a3b93,'reportMs':_0x320d34});}catch{}}}[_0xe8b8cd(0x26b)](){const _0x445f7e=_0xe8b8cd;if(this['_timer'])clearInterval(this[_0x445f7e(0x1e4)]);if(this['_h'])this['_h'][_0x445f7e(0xcf)]();this[_0x445f7e(0x1e4)]=null,this['_h']=null,this[_0x445f7e(0x1b8)]=![];}}const _0x42c623=new _0x417ebd();if(_0x42c623['enabled'])_0x42c623['start']();return okdbLoopMonitor={'LOOP':_0x42c623},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x722895=require$$0$1,_0x208d94=require$$1;let _0x296a1f,_0xf602ad,_0x2dbe2e,_0x202c0a,_0x438952,_0x1db0d4,_0x4eed6b,_0x38f26f=![];const _0x5ce6ad=new Set();let _0x147465=null;const _0x4840e8=new Map();function _0x569eb7(){const _0x107a16=_0x10a2;if(_0x296a1f!==undefined)return _0x296a1f;_0x296a1f=process.env.OKDB_DIAG==='1';if(!_0x296a1f)return![];_0xf602ad=process.env.OKDB_DIAG_STACK==='1',_0x202c0a=Math[_0x107a16(0x121)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x2dbe2e=new Array(_0x202c0a),_0x438952=0x0,_0x1db0d4=0x0,_0x4eed6b=process.env.OKDB_DIAG_DIR||null;if(_0x4eed6b)try{_0x722895[_0x107a16(0x28a)](_0x4eed6b,{'recursive':!![]});}catch{}return!![];}function _0x44e885(){return _0x296a1f===undefined?_0x569eb7():_0x296a1f;}function _0x80ad7f(_0x3d5c97,_0x82566a){const _0x3e1b12=_0x10a2;if(_0x296a1f===undefined?!_0x569eb7():!_0x296a1f)return;let _0x1e4980;if(_0xf602ad){const _0x58bbb8=new Error()[_0x3e1b12(0xa6)]||'';_0x1e4980=_0x58bbb8[_0x3e1b12(0x2bd)]('\x0a')[_0x3e1b12(0x278)](0x3)[_0x3e1b12(0x280)](_0x216147=>_0x216147['trim']())[_0x3e1b12(0x17c)](Boolean)['slice'](0x0,0x8);}_0x2dbe2e[_0x438952]={'seq':_0x1db0d4++,'t':Date[_0x3e1b12(0xef)](),'env':_0x3d5c97,'kind':_0x82566a||_0x3e1b12(0x1fc),'stack':_0x1e4980},_0x438952=(_0x438952+0x1)%_0x202c0a;}function _0x1bcf95(_0x3ab37f){const _0x23a6a4=_0x10a2,_0x11a80e=[];for(let _0xf0ef08=0x0;_0xf0ef08<_0x202c0a;_0xf0ef08++){const _0x3dac4e=_0x2dbe2e[(_0x438952-0x1-_0xf0ef08+_0x202c0a*0x2)%_0x202c0a];if(!_0x3dac4e)continue;_0x11a80e[_0x23a6a4(0x159)](_0x3dac4e);if(_0x11a80e[_0x23a6a4(0xf6)]>=_0x3ab37f)break;}return _0x11a80e;}function _0x46ba7f(_0x425bfd){const _0x3cb7ff=_0x10a2;try{process[_0x3cb7ff(0x110)][_0x3cb7ff(0x226)](_0x425bfd+'\x0a');}catch{}if(_0x4eed6b)try{_0x722895[_0x3cb7ff(0x147)](_0x208d94[_0x3cb7ff(0x1f5)](_0x4eed6b,_0x3cb7ff(0x202)+process['pid']+_0x3cb7ff(0x1c4)),_0x425bfd+'\x0a');}catch{}}function _0x3a4797(_0x1e8bb8){const _0x558d24=_0x10a2,_0x4ff7ea=_0x1bcf95(_0x1e8bb8);if(!_0x4ff7ea[_0x558d24(0xf6)])return _0x558d24(0xa5);const _0x2cdce9=Date[_0x558d24(0xef)]();return _0x4ff7ea['map'](_0x4d2b30=>{const _0x11c1f3=_0x558d24,_0x77004=_0x11c1f3(0x209)+_0x4d2b30[_0x11c1f3(0x2ab)]+'\x20-'+(_0x2cdce9-_0x4d2b30['t'])+_0x11c1f3(0x138)+_0x4d2b30['env']+'\x20'+_0x4d2b30['kind'];return _0x4d2b30[_0x11c1f3(0xa6)]&&_0x4d2b30[_0x11c1f3(0xa6)]['length']?_0x77004+_0x11c1f3(0x118)+_0x4d2b30[_0x11c1f3(0xa6)][_0x11c1f3(0x1f5)](_0x11c1f3(0x118)):_0x77004;})[_0x558d24(0x1f5)]('\x0a');}function _0x2d8111(_0x39f45e,_0x20ce1b){const _0x535a83=_0x10a2,_0x349ae7=_0x535a83(0x15f)+_0x39f45e+'\x20@\x20'+new Date()['toISOString']()+_0x535a83(0x1f2)+process[_0x535a83(0xf3)]+_0x535a83(0x25a),_0x1261be=[_0x349ae7,_0x535a83(0x2b0)+(_0x20ce1b&&_0x20ce1b[_0x535a83(0xa6)]?_0x20ce1b[_0x535a83(0xa6)]['split']('\x0a')[0x0]:_0x20ce1b),_0x535a83(0x284)+(_0xf602ad?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x3a4797(0x18),_0x3a8273(),'='['repeat'](_0x349ae7['length']-0x1)];_0x46ba7f(_0x1261be[_0x535a83(0x1f5)]('\x0a'));}function _0x35da77(_0x3caeb1){const _0xf62da3=_0x10a2;if(!_0x44e885())return;const _0x155458=String(_0x3caeb1&&_0x3caeb1[_0xf62da3(0x230)]||_0x3caeb1||''),_0x50942b=/already closed|environment is already|invalid read txn|reset an invalid/i[_0xf62da3(0xea)](_0x155458);_0x2d8111(_0x50942b?_0xf62da3(0xc2):_0xf62da3(0x294),_0x3caeb1);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x50942b)return;try{console['error'](_0x3caeb1&&_0x3caeb1[_0xf62da3(0xa6)]?_0x3caeb1[_0xf62da3(0xa6)]:_0x3caeb1);}catch{}process[_0xf62da3(0x232)](0x1);}function _0x2e57fd(_0x3aee4d){const _0x504999=_0x10a2;if(!_0x44e885())return;const _0x571a34=String(_0x3aee4d&&_0x3aee4d[_0x504999(0x230)]||_0x3aee4d||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x504999(0xea)](_0x571a34)&&_0x2d8111('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x3aee4d);}function _0x3a8273(){const _0x3f4f16=_0x10a2,_0x4b6d71=[_0x3f4f16(0x22d)];let _0x539060=![];for(const _0x1545f1 of _0x5ce6ad){const _0x44744f=_0x1545f1&&_0x1545f1['_envs'];if(!_0x44744f)continue;for(const [_0x5f22a0,_0x5d6303]of _0x44744f){const _0x50fa40=_0x5d6303&&_0x5d6303[_0x3f4f16(0x14a)]&&_0x5d6303['_coordinator']['view'];if(!_0x50fa40)continue;let _0x49059c,_0x372d9b;try{_0x49059c=Atomics['load'](_0x50fa40,0x0),_0x372d9b=Atomics[_0x3f4f16(0x27e)](_0x50fa40,0x1);}catch{continue;}if(_0x49059c===0x0)continue;_0x539060=!![];const _0x4b9d56=_0x49059c>0x0?_0x3f4f16(0xdd):'copy',_0x1b25e5=Date[_0x3f4f16(0xef)]()-Math['abs'](_0x49059c)*0x3e8,_0x26b3ef=((()=>{const _0x503efa=_0x3f4f16;try{return _0x5d6303[_0x503efa(0x140)]&&_0x5d6303[_0x503efa(0x140)][_0x503efa(0x16f)]?_0x5d6303['_writer'][_0x503efa(0x16f)]():null;}catch{return null;}})());_0x4b6d71[_0x3f4f16(0x159)](_0x3f4f16(0x207)+_0x5f22a0+_0x3f4f16(0x144)+_0x4b9d56+_0x3f4f16(0x13c)+_0x1b25e5+_0x3f4f16(0x1ea)+_0x372d9b+(_0x26b3ef?_0x3f4f16(0x14d)+_0x26b3ef[_0x3f4f16(0x168)]+_0x3f4f16(0x1a8)+_0x26b3ef['oldestPendingMs']+'\x20parkedNow='+_0x26b3ef[_0x3f4f16(0x1b6)]+'}':''));}}if(!_0x539060)_0x4b6d71[_0x3f4f16(0x159)](_0x3f4f16(0x219));return _0x4b6d71[_0x3f4f16(0x1f5)]('\x0a');}function _0xccd258(){const _0x3bc311=_0x10a2;if(!_0x44e885())return;const _0xacad9=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x535697=Date['now']();for(const _0x39606f of _0x5ce6ad){const _0x518d68=_0x39606f&&_0x39606f[_0x3bc311(0xba)];if(!_0x518d68)continue;for(const [_0x4326e6,_0x312adc]of _0x518d68){const _0x526b65=_0x312adc&&_0x312adc[_0x3bc311(0x14a)]&&_0x312adc[_0x3bc311(0x14a)][_0x3bc311(0x1f4)];if(!_0x526b65)continue;let _0x79756a;try{_0x79756a=Atomics[_0x3bc311(0x27e)](_0x526b65,0x0);}catch{continue;}const _0x14c840=_0x39606f[_0x3bc311(0x1a5)]+'|'+_0x4326e6;if(_0x79756a<=0x0){_0x4840e8['delete'](_0x14c840);continue;}const _0x1a3428=_0x535697-_0x79756a*0x3e8,_0x36e6a=_0x4840e8[_0x3bc311(0x162)](_0x14c840);if(_0x1a3428<_0xacad9)continue;if(_0x36e6a&&_0x535697-_0x36e6a[_0x3bc311(0x98)]<_0xacad9)continue;_0x4840e8[_0x3bc311(0x198)](_0x14c840,{'firstTs':_0x36e6a?_0x36e6a[_0x3bc311(0x105)]:_0x79756a,'dumpedAt':_0x535697});const _0x2e1644=_0x3bc311(0xa7)+_0x1a3428+_0x3bc311(0x208)+_0x4326e6+_0x3bc311(0x2a3)+new Date()['toISOString']()+_0x3bc311(0x1f2)+process['pid']+'\x20===';_0x46ba7f([_0x2e1644,_0x3a8273(),'='[_0x3bc311(0x10a)](_0x2e1644[_0x3bc311(0xf6)]-0x1)][_0x3bc311(0x1f5)]('\x0a'));}}}function _0x32bba9(){const _0x399ae5=_0x10a2;if(!_0x44e885()||_0x38f26f)return;_0x38f26f=!![],process['prependListener']('uncaughtException',_0x35da77),process[_0x399ae5(0x18c)](_0x399ae5(0x19a),_0x2e57fd);const _0x119c42=Math[_0x399ae5(0x121)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x147465=setInterval(_0xccd258,_0x119c42);if(_0x147465[_0x399ae5(0x113)])_0x147465[_0x399ae5(0x113)]();}function _0x21e7b7(_0x376177){const _0x18bc09=_0x10a2;if(!_0x44e885()||!_0x376177)return;_0x5ce6ad[_0x18bc09(0x15d)](_0x376177),_0x32bba9();}function _0x380fd8(_0x495c4e){const _0x19ac04=_0x10a2;_0x5ce6ad[_0x19ac04(0x15a)](_0x495c4e);}function _0x1b1b05(){if(!_0x44e885())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0xf602ad,'recentWrites':_0x1bcf95(0x10),'drain':_0x3a8273()};}return okdbDiag={'isEnabled':_0x44e885,'recordWrite':_0x80ad7f,'installDiag':_0x32bba9,'registerOkdb':_0x21e7b7,'unregisterOkdb':_0x380fd8,'snapshot':_0x1b1b05},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x1f15d6=_0x204085;if(hasRequiredOkdbWriter)return okdbWriter[_0x1f15d6(0x9a)];hasRequiredOkdbWriter=0x1;const {performance:_0x1254ae}=require$$0$2,_0x525c23=requireOkdbDiag(),_0x4317b0=process.env.OKDB_COMMIT_MODE==='sync';class _0x5d10b5{constructor(_0x35daa7){const _0x291294=_0x1f15d6;this[_0x291294(0x14e)]=_0x35daa7,this[_0x291294(0x192)]=new Set(),this[_0x291294(0x19f)]=new Map(),this[_0x291294(0x163)]=0x0,this[_0x291294(0x26e)]=[],this['_done']=[],this[_0x291294(0x137)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x291294(0x17b)]=0x0,this[_0x291294(0xcc)]=[],this[_0x291294(0x2a8)]=0x0,this[_0x291294(0x1e7)]=null,this[_0x291294(0x287)]=0x0,this['_nestedTotal']=0x0,this[_0x291294(0x114)]=![];}async[_0x1f15d6(0x1ac)](_0x3dde67,_0x5b59f3){const _0x110903=_0x1f15d6;if(_0x525c23[_0x110903(0x1f7)]())_0x525c23[_0x110903(0x161)](this['env']?.[_0x110903(0x271)],_0x5b59f3);if(this['_closed']){const _0x235de4=new Error(_0x110903(0x111));_0x235de4[_0x110903(0x228)]=_0x110903(0x17d);throw _0x235de4;}if(this['_highWater']>0x0){let _0x23dfc3=![];while(this['_outstanding']>=this[_0x110903(0x137)]&&!this['_closed']){!_0x23dfc3&&(_0x23dfc3=!![],this['_bpParkedTotal']++),await new Promise(_0x1df019=>this[_0x110903(0xcc)][_0x110903(0x159)](_0x1df019));}if(this['_closed']){const _0x4aad2b=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x4aad2b['code']=_0x110903(0x17d);throw _0x4aad2b;}}this[_0x110903(0x17b)]++;const _0x101443=this[_0x110903(0x14e)]['_coordinator'];for(;;){while(this['_held'])await this[_0x110903(0x1e7)];if(_0x101443)await _0x101443[_0x110903(0x148)]();if(!this[_0x110903(0x1e7)])break;if(_0x101443)_0x101443[_0x110903(0x16e)]();}if(this[_0x110903(0x24f)]){if(_0x101443)_0x101443[_0x110903(0x16e)]();this[_0x110903(0x17b)]--;if(this[_0x110903(0xcc)][_0x110903(0xf6)]&&this[_0x110903(0x17b)]<this[_0x110903(0x137)])this[_0x110903(0xcc)]['shift']()();const _0x5a4eeb=new Error(_0x110903(0x111));_0x5a4eeb[_0x110903(0x228)]='ENV_CLOSING_RETRY';throw _0x5a4eeb;}const _0x230214=_0x1254ae[_0x110903(0xef)]();if(_0x4317b0)try{const _0x3dc609=this[_0x110903(0x14e)]['db']['transactionSync'](_0x3dde67);this[_0x110903(0x163)]++;if(this[_0x110903(0x26e)][_0x110903(0x159)](_0x1254ae[_0x110903(0xef)]()-_0x230214)>0x100)this[_0x110903(0x26e)]['shift']();if(this['_done'][_0x110903(0x159)](_0x1254ae['now']())>0x800)this['_done'][_0x110903(0x14f)]();return _0x3dc609;}finally{this[_0x110903(0x17b)]--;if(this['_bpWaiters']['length']&&this[_0x110903(0x17b)]<this[_0x110903(0x137)])this[_0x110903(0xcc)][_0x110903(0x14f)]()();if(_0x101443)_0x101443[_0x110903(0x16e)]();}let _0x30fbb6=null;const _0x536efe=()=>{const _0x409487=_0x110903,_0x2d96e0=_0x3dde67();if(_0x2d96e0&&typeof _0x2d96e0[_0x409487(0x205)]==='function'&&!_0x30fbb6){this[_0x409487(0x287)]++;let _0x5e53cf;const _0x3e873b=new Promise(_0x11f6b8=>_0x5e53cf=_0x11f6b8);this[_0x409487(0x1e7)]=_0x3e873b,_0x30fbb6=()=>{const _0x6e45b8=_0x409487;if(this[_0x6e45b8(0x1e7)]===_0x3e873b)this[_0x6e45b8(0x1e7)]=null;_0x5e53cf();};}return _0x2d96e0;};let _0x148609;try{_0x148609=this[_0x110903(0x14e)]['db'][_0x110903(0x17a)](_0x536efe);}catch(_0x96725b){_0x148609=Promise[_0x110903(0x1bf)](_0x96725b);}(!_0x148609||typeof _0x148609['then']!==_0x110903(0xf0))&&(this['_nestedTotal']++,!this[_0x110903(0x114)]&&(this['_nestedWarned']=!![],console['warn'](_0x110903(0xc5)+(this[_0x110903(0x14e)]?.['name']??'?')+_0x110903(0x274))),_0x148609=Promise[_0x110903(0x21d)](_0x148609));const _0x418288=()=>{if(_0x30fbb6)_0x30fbb6();};_0x148609[_0x110903(0x205)](_0x418288,_0x418288),this['_inflight'][_0x110903(0x15d)](_0x148609),this[_0x110903(0x19f)]['set'](_0x148609,_0x230214);const _0x3ca364=()=>{const _0x272457=_0x110903;this[_0x272457(0x192)][_0x272457(0x15a)](_0x148609),this[_0x272457(0x19f)][_0x272457(0x15a)](_0x148609),this[_0x272457(0x163)]++,this['_outstanding']--;this['_bpWaiters'][_0x272457(0xf6)]&&this[_0x272457(0x17b)]<this[_0x272457(0x137)]&&this[_0x272457(0xcc)]['shift']()();if(this['_durs']['push'](_0x1254ae[_0x272457(0xef)]()-_0x230214)>0x100)this['_durs'][_0x272457(0x14f)]();if(this['_done'][_0x272457(0x159)](_0x1254ae[_0x272457(0xef)]())>0x800)this[_0x272457(0x221)][_0x272457(0x14f)]();};_0x148609[_0x110903(0x205)](_0x3ca364,_0x3ca364);try{return await _0x148609;}finally{if(_0x101443)_0x101443[_0x110903(0x16e)]();}}[_0x1f15d6(0x16f)](){const _0x3a538c=_0x1f15d6,_0x5ed417=_0x1254ae['now']();let _0x503130=0x0;for(const _0x4fead9 of this[_0x3a538c(0x19f)][_0x3a538c(0x241)]()){const _0x5033fe=_0x5ed417-_0x4fead9;if(_0x5033fe>_0x503130)_0x503130=_0x5033fe;}let _0x1cb99a=0x0;for(let _0x53b7a0=this[_0x3a538c(0x221)][_0x3a538c(0xf6)]-0x1;_0x53b7a0>=0x0;_0x53b7a0--){if(_0x5ed417-this[_0x3a538c(0x221)][_0x53b7a0]>0x3e8)break;_0x1cb99a++;}let _0x376919=0x0;if(this['_durs']['length']){const _0x1841de=[...this['_durs']][_0x3a538c(0xb3)]((_0x8641d1,_0x3689ea)=>_0x8641d1-_0x3689ea);_0x376919=_0x1841de[Math[_0x3a538c(0x16a)](_0x1841de['length']-0x1,Math[_0x3a538c(0x295)](_0x1841de['length']*0.99))];}return{'depth':this[_0x3a538c(0x192)][_0x3a538c(0x212)],'oldestPendingMs':Math[_0x3a538c(0xb0)](_0x503130),'committed':this[_0x3a538c(0x163)],'commitsPerSec':_0x1cb99a,'commitP99Ms':Math[_0x3a538c(0xb0)](_0x376919),'parkedNow':this[_0x3a538c(0xcc)][_0x3a538c(0xf6)],'parkedTotal':this[_0x3a538c(0x2a8)],'highWater':this['_highWater']};}[_0x1f15d6(0x106)](){const _0x1f69bc=_0x1f15d6,_0x31839b=_0x1254ae[_0x1f69bc(0xef)]();return[...this[_0x1f69bc(0x19f)][_0x1f69bc(0x241)]()][_0x1f69bc(0x280)](_0x37f9c7=>Math[_0x1f69bc(0xb0)](_0x31839b-_0x37f9c7))[_0x1f69bc(0xb3)]((_0x123700,_0x26069f)=>_0x26069f-_0x123700);}['markClosed'](){const _0x24f9fc=_0x1f15d6;this[_0x24f9fc(0x24f)]=!![];for(const _0x19adfc of this[_0x24f9fc(0xcc)][_0x24f9fc(0x1b2)](0x0))_0x19adfc();}async[_0x1f15d6(0x1d9)](){const _0x37a011=_0x1f15d6;let _0x4fc81d=0x0;while(this['_inflight'][_0x37a011(0x212)]&&_0x4fc81d++<0x3e8){await Promise['allSettled']([...this[_0x37a011(0x192)]]);}}async[_0x1f15d6(0x1b9)](_0xe8d190,_0x5ed7a4,_0x23dc3e,_0x4cabe8){const _0x46ebeb=_0x1f15d6;return this['transaction'](()=>{const _0xefe652=_0x10a2;if(_0x4cabe8===undefined)_0xe8d190[_0xefe652(0x1a4)](_0x5ed7a4,_0x23dc3e);else _0xe8d190[_0xefe652(0x1a4)](_0x5ed7a4,_0x23dc3e,_0x4cabe8);},_0x46ebeb(0x195));}async[_0x1f15d6(0x28f)](_0x3d6010,_0x1bce89){const _0x852b22=_0x1f15d6;return this[_0x852b22(0x1ac)](()=>_0x3d6010['removeSync'](_0x1bce89),'raw-remove');}}async function _0x153157(_0x495c6b,_0x554d3e){const _0x32e879=_0x1f15d6;if(_0x554d3e==null)_0x554d3e=Math[_0x32e879(0x121)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x1bd3b5=_0x495c6b?.[_0x32e879(0x1a9)];if(!_0x1bd3b5||typeof _0x1bd3b5['then']!==_0x32e879(0xf0))return;await Promise['race']([Promise[_0x32e879(0x21d)](_0x1bd3b5)[_0x32e879(0x22a)](()=>{}),new Promise(_0x29129a=>{const _0x3b06d6=setTimeout(_0x29129a,_0x554d3e);if(_0x3b06d6['unref'])_0x3b06d6['unref']();})]);}catch{}}function _0x2bfe41(_0x27342b){const _0x3a861a=_0x1f15d6;if(_0x4317b0)return Promise['resolve']();const _0x247fdf=_0x27342b?.[_0x3a861a(0x1bc)];return _0x247fdf&&typeof _0x247fdf['then']===_0x3a861a(0xf0)?_0x247fdf:Promise['resolve']();}return okdbWriter[_0x1f15d6(0x9a)]=_0x5d10b5,okdbWriter[_0x1f15d6(0x9a)][_0x1f15d6(0x186)]=_0x153157,okdbWriter[_0x1f15d6(0x9a)][_0x1f15d6(0x1bc)]=_0x2bfe41,okdbWriter[_0x1f15d6(0x9a)][_0x1f15d6(0x2b5)]=_0x4317b0,okdbWriter[_0x1f15d6(0x9a)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x1bc2cd=_0x204085;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4b6e95=require$$0$3,{SYNC_COMMITS:_0x53f2be}=requireOkdbWriter(),_0x595bda='~lock';class _0x299c74{constructor(_0x4b5a14,_0xb7a0a7,_0x40befd){const _0x343b61=_0x10a2;this['_lock']=_0x4b5a14,this[_0x343b61(0x296)]=_0xb7a0a7,this[_0x343b61(0x165)]=_0x40befd,this[_0x343b61(0x297)]=![],this[_0x343b61(0x1c8)]=null,this['_heartbeatInFlight']=null;}[_0x1bc2cd(0x2ad)](){const _0x445398=_0x1bc2cd;if(this[_0x445398(0x297)])return![];try{const _0x38955e=this[_0x445398(0x9f)][_0x445398(0x29a)]()[_0x445398(0x162)](this[_0x445398(0x296)]);if(!_0x38955e||_0x38955e[_0x445398(0x275)]!==this['_acquiredAt'])return![];const _0x4499d5=_0x38955e[_0x445398(0xbe)]??_0x38955e[_0x445398(0x275)];if(_0x4499d5+_0x38955e[_0x445398(0xde)]<Date[_0x445398(0xef)]())return![];return!![];}catch{return!this[_0x445398(0x297)];}}[_0x1bc2cd(0x237)](){const _0x410fd4=_0x1bc2cd;if(this[_0x410fd4(0x297)])return null;try{return this[_0x410fd4(0x9f)][_0x410fd4(0x29a)]()[_0x410fd4(0x162)](this[_0x410fd4(0x296)])??null;}catch{return null;}}async['extend'](_0x1e86aa){const _0x49e9ad=_0x1bc2cd;if(this['_released'])return;try{const _0xd805a0=this['_lock']['_db']()[_0x49e9ad(0x162)](this[_0x49e9ad(0x296)]);if(!_0xd805a0||_0xd805a0[_0x49e9ad(0x275)]!==this[_0x49e9ad(0x165)])return;if(_0x53f2be)this[_0x49e9ad(0x9f)][_0x49e9ad(0x29a)]()[_0x49e9ad(0x1a4)](this[_0x49e9ad(0x296)],{..._0xd805a0,'ttlMs':_0xd805a0['ttlMs']+_0x1e86aa});else await this[_0x49e9ad(0x9f)][_0x49e9ad(0x29a)]()[_0x49e9ad(0x1b9)](this[_0x49e9ad(0x296)],{..._0xd805a0,'ttlMs':_0xd805a0['ttlMs']+_0x1e86aa});}catch{}}async[_0x1bc2cd(0x250)](){const _0x2915a7=_0x1bc2cd;if(this[_0x2915a7(0x297)])return;if(this['_heartbeatInFlight'])try{await this[_0x2915a7(0x1a0)];}catch{}clearInterval(this[_0x2915a7(0x1c8)]),this[_0x2915a7(0x1c8)]=null,this[_0x2915a7(0x297)]=!![];try{const _0x2172ac=this[_0x2915a7(0x9f)][_0x2915a7(0x29a)]()[_0x2915a7(0x162)](this[_0x2915a7(0x296)]);if(_0x2172ac&&_0x2172ac[_0x2915a7(0x275)]===this['_acquiredAt']){if(_0x53f2be)this[_0x2915a7(0x9f)][_0x2915a7(0x29a)]()[_0x2915a7(0x10f)](this[_0x2915a7(0x296)]);else await this['_lock'][_0x2915a7(0x29a)]()[_0x2915a7(0x28f)](this['_key']);}}catch{}}[_0x1bc2cd(0x14c)](_0x44783b,_0x117214){const _0x224824=_0x1bc2cd,_0x33baac=_0x117214??Math[_0x224824(0x295)](_0x44783b/0x3);this[_0x224824(0x1c8)]=setInterval(()=>{const _0x1bf096=_0x224824;if(this[_0x1bf096(0x297)])return;this[_0x1bf096(0x1a0)]=((async()=>{const _0x56eeeb=_0x1bf096;try{const _0x3d4e81=this['_lock'][_0x56eeeb(0x29a)]()[_0x56eeeb(0x162)](this[_0x56eeeb(0x296)]);if(!_0x3d4e81||_0x3d4e81[_0x56eeeb(0x275)]!==this[_0x56eeeb(0x165)]){this[_0x56eeeb(0x297)]=!![],clearInterval(this['_heartbeatTimer']),this['_heartbeatTimer']=null;return;}if(_0x53f2be)this[_0x56eeeb(0x9f)][_0x56eeeb(0x29a)]()['putSync'](this[_0x56eeeb(0x296)],{..._0x3d4e81,'updatedAt':Date[_0x56eeeb(0xef)]()});else await this[_0x56eeeb(0x9f)][_0x56eeeb(0x29a)]()[_0x56eeeb(0x1b9)](this['_key'],{..._0x3d4e81,'updatedAt':Date[_0x56eeeb(0xef)]()});}catch{}this[_0x56eeeb(0x1a0)]=null;})());},_0x33baac);if(this[_0x224824(0x1c8)]['unref'])this[_0x224824(0x1c8)][_0x224824(0x113)]();}}class _0x96781c{constructor(_0xcf3a8a,{namespace:_0x4ea465,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x52b7dc=_0x1bc2cd;this[_0x52b7dc(0xfe)]=_0xcf3a8a,this[_0x52b7dc(0x12f)]=_0x4ea465,this[_0x52b7dc(0xde)]=ttlMs,this[_0x52b7dc(0x1d7)]=heartbeatMs,this[_0x52b7dc(0xbc)]=null;}['_db'](){const _0x59da0a=_0x1bc2cd;return!this[_0x59da0a(0xbc)]&&(this['_lockDb']=this['_rawDb'][_0x59da0a(0x234)](_0x595bda,{'dupSort':![]})),this[_0x59da0a(0xbc)];}[_0x1bc2cd(0xa2)](){const _0x4243e2=_0x1bc2cd;return!this[_0x4243e2(0x201)]&&(this[_0x4243e2(0x201)]=this[_0x4243e2(0xfe)][_0x4243e2(0x234)](_0x595bda+':want',{'dupSort':![]})),this[_0x4243e2(0x201)];}['_key'](_0x263322){const _0x25acc9=_0x1bc2cd;return this[_0x25acc9(0x12f)]+':'+_0x263322;}[_0x1bc2cd(0x1ce)](_0x46b37c){const _0x29adfa=_0x1bc2cd;try{_0x53f2be?this[_0x29adfa(0xa2)]()[_0x29adfa(0x1a4)](this[_0x29adfa(0x296)](_0x46b37c),Date[_0x29adfa(0xef)]()):this['_wantDb']()[_0x29adfa(0x1b9)](this[_0x29adfa(0x296)](_0x46b37c),Date[_0x29adfa(0xef)]())?.['catch']?.(()=>{});}catch{}}[_0x1bc2cd(0x1e1)](_0x30d179,_0x20a995=0x3e8){const _0x253c5b=_0x1bc2cd;try{const _0xdb35da=this[_0x253c5b(0xa2)]()[_0x253c5b(0x162)](this[_0x253c5b(0x296)](_0x30d179));return typeof _0xdb35da===_0x253c5b(0x27d)&&Date['now']()-_0xdb35da<_0x20a995;}catch{return![];}}[_0x1bc2cd(0x1d8)](_0x544bb5){const _0xf0031=_0x1bc2cd,_0x23ca55=_0x544bb5[_0xf0031(0xbe)]??_0x544bb5[_0xf0031(0x275)];return _0x23ca55+_0x544bb5[_0xf0031(0xde)]<Date['now']();}static[_0x1bc2cd(0x240)](_0x4e7f8e){const _0x53cd51=_0x1bc2cd,_0x1805fc=_0x4e7f8e?.[_0x53cd51(0x237)];if(!_0x1805fc||typeof _0x1805fc['pid']!==_0x53cd51(0x27d))return![];if(_0x1805fc[_0x53cd51(0x1df)]!==_0x4b6e95['hostname']())return![];if(_0x1805fc[_0x53cd51(0xf3)]===process[_0x53cd51(0xf3)])return![];try{return process[_0x53cd51(0x120)](_0x1805fc['pid'],0x0),![];}catch(_0x4592c9){return _0x4592c9[_0x53cd51(0x228)]===_0x53cd51(0x1be);}}async['tryAcquire'](_0xbf7741,_0x47ecb7={},_0x338a85={}){const _0x4c6b8b=_0x1bc2cd,_0x14aef0=this[_0x4c6b8b(0x296)](_0xbf7741),_0x210ec9=_0x338a85[_0x4c6b8b(0xde)]??this[_0x4c6b8b(0xde)],_0x5a36bc=Date[_0x4c6b8b(0xef)](),_0x151c9d={'holder':{'pid':process[_0x4c6b8b(0xf3)],'hostname':_0x4b6e95[_0x4c6b8b(0x1df)](),..._0x47ecb7},'acquiredAt':_0x5a36bc,'updatedAt':_0x5a36bc,'ttlMs':_0x210ec9};let _0x293570=![],_0x5d7cfc=null;try{const _0xd83b83=()=>{const _0x3b4adb=_0x4c6b8b,_0x2a023e=this[_0x3b4adb(0x29a)]()[_0x3b4adb(0x162)](_0x14aef0);if(_0x2a023e&&!this['_isStale'](_0x2a023e)&&!_0x96781c['_holderDead'](_0x2a023e)){const _0x3aeaa7=_0x47ecb7[_0x3b4adb(0x242)]!=null&&_0x2a023e['holder'][_0x3b4adb(0xf3)]===process[_0x3b4adb(0xf3)]&&_0x2a023e[_0x3b4adb(0x237)][_0x3b4adb(0x242)]===_0x47ecb7[_0x3b4adb(0x242)];if(!_0x3aeaa7){_0x293570=![],_0x5d7cfc=_0x2a023e;return;}_0x151c9d[_0x3b4adb(0x275)]<=_0x2a023e[_0x3b4adb(0x275)]&&(_0x151c9d[_0x3b4adb(0x275)]=_0x2a023e[_0x3b4adb(0x275)]+0x1,_0x151c9d['updatedAt']=_0x151c9d[_0x3b4adb(0x275)]);}this[_0x3b4adb(0x29a)]()[_0x3b4adb(0x1b9)](_0x14aef0,_0x151c9d),_0x293570=!![],_0x5d7cfc=_0x151c9d;};if(_0x53f2be)this[_0x4c6b8b(0x29a)]()['transactionSync'](_0xd83b83);else await this['_db']()[_0x4c6b8b(0x17a)](_0xd83b83);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x293570)return{'acquired':![],'handle':null,'current':_0x5d7cfc};const _0x40481d=new _0x299c74(this,_0x14aef0,_0x151c9d[_0x4c6b8b(0x275)]);return _0x40481d['_startHeartbeat'](_0x210ec9,this[_0x4c6b8b(0x1d7)]),{'acquired':!![],'handle':_0x40481d,'current':_0x5d7cfc};}[_0x1bc2cd(0x1cb)](_0x501c1e){const _0x20d096=_0x1bc2cd;try{return this['_db']()[_0x20d096(0x162)](this[_0x20d096(0x296)](_0x501c1e))??null;}catch{return null;}}[_0x1bc2cd(0xf7)](){const _0x15dccc=_0x1bc2cd,_0x2f9fb1=this['namespace']+':',_0x4b3e92=[];try{for(const {key:_0x3fa5cb,value:_0x1df167}of this[_0x15dccc(0x29a)]()[_0x15dccc(0xc7)]({'start':_0x2f9fb1,'end':_0x2f9fb1+'\xff'})){typeof _0x3fa5cb===_0x15dccc(0x1a6)&&_0x3fa5cb[_0x15dccc(0x218)](_0x2f9fb1)&&_0x4b3e92[_0x15dccc(0x159)]({'id':_0x3fa5cb[_0x15dccc(0x278)](_0x2f9fb1[_0x15dccc(0xf6)]),'entry':_0x1df167});}}catch{}return _0x4b3e92;}static[_0x1bc2cd(0x1e3)](_0x2d2255){const _0x5b5bee=_0x1bc2cd,_0x3dc994=[];try{const _0x3145cc=_0x2d2255[_0x5b5bee(0x234)](_0x595bda,{'dupSort':![]});for(const {key:_0x36dd65,value:_0x1c4021}of _0x3145cc[_0x5b5bee(0xc7)]({})){if(typeof _0x36dd65!==_0x5b5bee(0x1a6))continue;const _0x530cdb=_0x36dd65[_0x5b5bee(0xa8)](':');if(_0x530cdb<0x1)continue;_0x3dc994[_0x5b5bee(0x159)]({'namespace':_0x36dd65[_0x5b5bee(0x278)](0x0,_0x530cdb),'id':_0x36dd65['slice'](_0x530cdb+0x1),'entry':_0x1c4021});}}catch{}return _0x3dc994;}}return okdbLock={'OKDBLock':_0x96781c},okdbLock;}var version=_0x204085(0x269),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0xf19f3d=_0x204085;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0xad8865=require$$0$3,_0x5c94c4=require$$1$1,_0x56641d=require$$2,{LOOP:_0x2cc0ef}=requireOkdbLoopMonitor(),{OKDBLock:_0x49deb8}=requireOkdbLock(),{SYNC_COMMITS:_0x139a26}=requireOkdbWriter(),_0x472831='~processes',_0xfc1650='node',_0x4902a2=_0xf19f3d(0x2a9),_0x1116a0=_0xf19f3d(0x125),_0x439257=(_0x5d30a3,_0x250d5c)=>_0x5d30a3+':'+_0x250d5c,_0x1db3e5=(_0x5c4232,_0x2b18db)=>_0x5c4232+'::'+_0x2b18db,_0xb8bb4d=(_0xea7f35,_0x483e6f)=>_0xea7f35+'/'+_0x483e6f,_0x3400d7=(_0x1dde7e,_0x32e5fe)=>_0x1dde7e+'#'+_0x32e5fe,_0x2c1389=_0x288064=>{const _0x49ca1e=_0xf19f3d;if(_0x288064?.[_0x49ca1e(0x210)])return _0x288064['processKey'];const _0x33397a=_0x288064?.['nodeKey'];return typeof _0x33397a===_0x49ca1e(0x1a6)&&_0x33397a[_0x49ca1e(0x216)]('#')?_0x33397a[_0x49ca1e(0x278)](0x0,_0x33397a[_0x49ca1e(0xa8)]('#')):_0x33397a;},_0x497778=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x47b5ad=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5de4ee=_0x497778*0x3,_0x8a1a71=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0xf19f3d(0x121)](0x927c0,_0x5de4ee*0x14),_0x3c7bab=['processor:progress',_0xf19f3d(0x27f),_0xf19f3d(0x203),_0xf19f3d(0x131),_0xf19f3d(0x249),'processor:resumed'];let _0x5b7a96=null;function _0xf61e86(){const _0x1f49e0=_0xf19f3d;if(_0x5b7a96==null)_0x5b7a96=Math['round']((Date[_0x1f49e0(0xef)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x5b7a96;}function _0x12f73e(_0x555663){const _0x4ae1ca=_0xf19f3d;if(process.env.OKDB_PROCESS_KILL===_0x4ae1ca(0xae))return![];if(_0x555663?.['options']?.[_0x4ae1ca(0x11a)]&&typeof _0x555663['options'][_0x4ae1ca(0x11a)]===_0x4ae1ca(0xe5)&&_0x555663[_0x4ae1ca(0x1fb)][_0x4ae1ca(0x11a)]['kill']===![])return![];return!![];}function _0x117399(_0x4e0162,_0x328279){const _0x1ac904=_0xf19f3d,_0x465ae7=!!_0x328279?.[_0x1ac904(0x146)];switch(_0x4e0162){case _0x1ac904(0xce):return{'controllable':_0x465ae7,'decommissionable':![],'killable':!![],'killConfirm':_0x1ac904(0x15e)};case _0x1ac904(0x277):case _0x1ac904(0x23a):return{'controllable':_0x465ae7,'decommissionable':![],'killable':!![],'killConfirm':_0x1ac904(0x22b)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x1ac904(0x173):case _0x1ac904(0xe1):case _0x1ac904(0x28e):case _0x1ac904(0x1cc):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x189f9b{constructor(_0x196367){const _0x253cda=_0xf19f3d;this[_0x253cda(0xec)]=_0x196367,this[_0x253cda(0x259)]=null,this['_desired']=null,this[_0x253cda(0x231)]=new Map(),this[_0x253cda(0x153)]=null,this['_isWriter']=![],this[_0x253cda(0xb8)]=![],this['_processStartedAt']=_0xf61e86(),this[_0x253cda(0x23e)]=_0x439257(process['pid'],this[_0x253cda(0xc9)]),this[_0x253cda(0x23c)]=_0x56641d[_0x253cda(0x1db)]()[_0x253cda(0x278)](0x0,0x8),this['_rowKey']=_0x3400d7(this[_0x253cda(0x23e)],this['_instanceId']),this['_startedAt']=Date['now'](),this[_0x253cda(0x1b5)]=null,this[_0x253cda(0x100)]=null,this[_0x253cda(0x1c2)]=null,this['_hbTimer']=null,this[_0x253cda(0x2a4)]=null,this[_0x253cda(0x178)]=null,this[_0x253cda(0x1bb)]=0x0,this[_0x253cda(0x151)]={},this[_0x253cda(0x26f)]=new Map(),this[_0x253cda(0xf8)]=process[_0x253cda(0x96)](),this[_0x253cda(0x193)]=Date[_0x253cda(0xef)](),this[_0x253cda(0x1e9)]=0x0,this[_0x253cda(0x1b7)]=new Map();}get[_0xf19f3d(0xf9)](){const _0x57ab0c=_0xf19f3d;return this[_0x57ab0c(0x23e)];}get[_0xf19f3d(0x254)](){return this['_rowKey'];}[_0xf19f3d(0x149)](_0x5971e2,_0x43bacd){const _0x3425e1=_0xf19f3d,_0x5e5bb7=_0x117399(_0x5971e2,_0x43bacd);if(_0x5e5bb7[_0x3425e1(0x18f)]&&!_0x12f73e(this[_0x3425e1(0xec)]))return{..._0x5e5bb7,'killable':![],'killConfirm':undefined};return _0x5e5bb7;}['isActive'](){return!!this['_statusEnv'];}[_0xf19f3d(0xb5)](_0x158c0d){Object['assign'](this['_ownMeta'],_0x158c0d||{});}[_0xf19f3d(0x29b)](_0x588856){if(_0x588856)this['_listenAddr']=_0x588856;}[_0xf19f3d(0x2af)](_0x4b5984={}){const _0x172bce=_0xf19f3d;return this[_0x172bce(0xec)][_0x172bce(0xe6)](_0x4b5984);}[_0xf19f3d(0x2a1)](){const _0x2c2cb9=_0xf19f3d,_0x479e91={};let _0x2f501e=0x0,_0x314c81=0x0;const _0x51c50b=new Set();for(const _0x19f616 of this[_0x2c2cb9(0xac)]()){_0x314c81++;const _0x1e4958=_0x19f616['processing'];if(!_0x1e4958)continue;if(_0x1e4958['participate'])_0x2f501e++;for(const _0x53f65d of _0x1e4958[_0x2c2cb9(0x146)]||[]){if(![_0x2c2cb9(0x239),_0x2c2cb9(0x1ab)][_0x2c2cb9(0x216)](_0x53f65d[_0x2c2cb9(0x214)]))continue;(_0x53f65d[_0x2c2cb9(0x1fe)]===_0x2c2cb9(0x272)||_0x53f65d[_0x2c2cb9(0x1fe)]===_0x2c2cb9(0x293))&&_0x53f65d[_0x2c2cb9(0x27a)]&&_0x51c50b[_0x2c2cb9(0x15d)]((_0x53f65d[_0x2c2cb9(0x14e)]||_0x2c2cb9(0x97))+':'+_0x53f65d[_0x2c2cb9(0x27a)]);const _0x3d211a=_0x53f65d[_0x2c2cb9(0x14e)]||_0x2c2cb9(0x97);(_0x479e91[_0x3d211a]||=[])[_0x2c2cb9(0x159)]({..._0x53f65d,'env':_0x3d211a,'owner':{'pid':_0x19f616[_0x2c2cb9(0xf3)]??null,'kind':_0x19f616[_0x2c2cb9(0x10c)]??null}});}}for(const [_0x136253,_0x3308c6]of Object[_0x2c2cb9(0x252)](_0x479e91)){for(const _0x380738 of _0x3308c6){if(_0x380738['mode']===_0x2c2cb9(0x239)&&!_0x380738[_0x2c2cb9(0x179)]){const _0x14ca92=_0x136253+':'+(_0x380738[_0x2c2cb9(0x27a)]??'');if(!_0x51c50b[_0x2c2cb9(0x217)](_0x14ca92))_0x380738[_0x2c2cb9(0x14b)]=!![];}}}return{'envs':_0x479e91,'policy':null,'participation':{'participating':_0x2f501e,'total':_0x314c81},'source':_0x2c2cb9(0xd9)};}['processorsView'](){const _0x362625=_0xf19f3d,_0x2266ae=_0x11c391=>{const _0x4f05e0=_0x10a2;if(_0x11c391[_0x4f05e0(0x1fe)]===_0x4f05e0(0x272)||_0x11c391[_0x4f05e0(0x1fe)]===_0x4f05e0(0x293)||_0x11c391[_0x4f05e0(0x1fe)]==='error')return 0x3;if(_0x11c391[_0x4f05e0(0x179)])return 0x1;return 0x2;},_0x4b9ddc=new Map();for(const _0x37ee6d of this['listNodes']()){for(const _0x202c31 of _0x37ee6d[_0x362625(0x101)]?.[_0x362625(0x146)]||[]){const _0x579e70={..._0x202c31,'owner':{'pid':_0x37ee6d[_0x362625(0xf3)]??null,'kind':_0x37ee6d[_0x362625(0x10c)]??null,'host':_0x37ee6d[_0x362625(0x129)]??null}},_0x5a0af1=_0x202c31['mode']===_0x362625(0x239)?_0x362625(0x16c)+(_0x202c31['env']??'')+'::'+(_0x202c31['cursorKey']??_0x202c31[_0x362625(0x1b3)]??_0x202c31['id']):_0x362625(0x11d)+(_0x37ee6d[_0x362625(0x24c)]??_0x37ee6d[_0x362625(0x210)]??'')+'::'+(_0x202c31['env']??'')+'::'+_0x202c31['id'],_0x3908fa=_0x4b9ddc['get'](_0x5a0af1);if(!_0x3908fa||_0x2266ae(_0x579e70)>_0x2266ae(_0x3908fa))_0x4b9ddc['set'](_0x5a0af1,_0x579e70);}}return[..._0x4b9ddc[_0x362625(0x241)]()];}[_0xf19f3d(0x282)](){const _0x58aba8=_0xf19f3d,_0x4841d5=Date['now'](),_0x2f8650=this[_0x58aba8(0xac)](),_0x495e8c=_0x21f9c1=>Math[_0x58aba8(0x121)](0x0,Math[_0x58aba8(0xb0)]((_0x4841d5-(_0x21f9c1['startedAt']||_0x4841d5))/0x3e8)),_0x42f965=_0x2f8650['find'](_0x4030f6=>_0x4030f6[_0x58aba8(0x10c)]===_0x58aba8(0xce)),_0x44b59d=_0x2f8650['filter'](_0x1e940f=>_0x1e940f[_0x58aba8(0x10c)]===_0x58aba8(0x173));if(_0x42f965||_0x44b59d['length'])return{'primary':_0x42f965?{'pid':_0x42f965[_0x58aba8(0xf3)],'uptime':_0x495e8c(_0x42f965)}:null,'workers':_0x44b59d['map'](_0x3f37bd=>({'pid':_0x3f37bd['pid'],'uptime':_0x495e8c(_0x3f37bd)})),'workersConfigured':_0x42f965?.[_0x58aba8(0x25f)]?.[_0x58aba8(0x1d3)]??_0x44b59d['length'],'mode':'cluster'};const _0x150b54=_0x2f8650[_0x58aba8(0x103)](_0xc31907=>_0xc31907[_0x58aba8(0x10c)]===_0x58aba8(0x277)||_0xc31907[_0x58aba8(0x10c)]===_0x58aba8(0x23a)||_0xc31907['kind']==='embedded'),_0x4a48d7=_0x150b54?{'pid':_0x150b54['pid'],'uptime':_0x495e8c(_0x150b54)}:{'pid':process[_0x58aba8(0xf3)],'uptime':Math['max'](0x0,Math[_0x58aba8(0xb0)](process[_0x58aba8(0x182)]()))};return{'primary':_0x4a48d7,'workers':[_0x4a48d7],'workersConfigured':0x1,'mode':_0x58aba8(0x239)};}[_0xf19f3d(0x23f)](){const _0x41aefb=_0xf19f3d;return this[_0x41aefb(0xa9)]();}[_0xf19f3d(0x268)](){const _0x31916f=_0xf19f3d,_0x247c87=new Map();for(const _0x1c8fa8 of this[_0x31916f(0xa9)]())_0x247c87['set'](_0x1c8fa8[_0x31916f(0x210)],{..._0x1c8fa8,'children':[]});const _0x187fa1=[];for(const _0x4d9174 of _0x247c87[_0x31916f(0x241)]()){const _0x2afcca=_0x4d9174[_0x31916f(0x289)]?_0x247c87[_0x31916f(0x162)](_0x4d9174[_0x31916f(0x289)]):null;if(_0x2afcca&&_0x2afcca!==_0x4d9174)_0x2afcca[_0x31916f(0x11e)][_0x31916f(0x159)](_0x4d9174);else _0x187fa1[_0x31916f(0x159)](_0x4d9174);}const _0x444a81=(_0x2c993b,_0x6bec8c)=>_0x2c993b[_0x31916f(0x10c)]===_0x6bec8c[_0x31916f(0x10c)]?(_0x2c993b[_0x31916f(0xf3)]||0x0)-(_0x6bec8c[_0x31916f(0xf3)]||0x0):(_0x2c993b['kind']??'')<(_0x6bec8c[_0x31916f(0x10c)]??'')?-0x1:0x1,_0x22872c=_0x4ed5bb=>{const _0x36f091=_0x31916f;_0x4ed5bb[_0x36f091(0xb3)](_0x444a81);for(const _0x1e4825 of _0x4ed5bb)if(_0x1e4825[_0x36f091(0x11e)]['length'])_0x22872c(_0x1e4825[_0x36f091(0x11e)]);};return _0x22872c(_0x187fa1),_0x187fa1;}[_0xf19f3d(0x158)](_0x503598){const _0x427e71=_0xf19f3d;return this['_groupByProcess']()[_0x427e71(0x103)](_0x28bc17=>_0x28bc17[_0x427e71(0x210)]===_0x503598)??null;}[_0xf19f3d(0xa9)](_0x92fe3d=Date['now']()){const _0x3b2926=_0xf19f3d,_0x2969b7=new Map();for(const _0x5ed308 of this[_0x3b2926(0xac)]()){const _0x51db63=_0x2c1389(_0x5ed308);let _0xa314dc=_0x2969b7[_0x3b2926(0x162)](_0x51db63);!_0xa314dc&&(_0xa314dc={'processKey':_0x51db63,'nodeKey':_0x51db63,'pid':_0x5ed308[_0x3b2926(0xf3)],'ppid':_0x5ed308[_0x3b2926(0x12a)]??null,'host':_0x5ed308[_0x3b2926(0x129)]??null,'kind':_0x5ed308[_0x3b2926(0x10c)],'role':null,'supervisorKey':_0x5ed308[_0x3b2926(0x289)]??null,'slot':_0x5ed308['slot']??null,'slotKey':_0x5ed308['slotKey']??null,'caps':_0x5ed308[_0x3b2926(0x187)]??null,'lifecycle':_0x5ed308[_0x3b2926(0xf5)]??null,'uptime':Math['max'](0x0,Math[_0x3b2926(0xb0)]((_0x92fe3d-(_0x5ed308['startedAt']||_0x92fe3d))/0x3e8)),'startedAt':_0x5ed308[_0x3b2926(0x135)]??null,'meta':_0x5ed308[_0x3b2926(0x25f)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x2969b7[_0x3b2926(0x198)](_0x51db63,_0xa314dc));_0xa314dc[_0x3b2926(0xed)][_0x3b2926(0x159)]({'instanceId':_0x5ed308[_0x3b2926(0x1fa)]??null,'role':_0x5ed308['role']??null,'listenAddr':_0x5ed308['listenAddr']??null,'lifecycle':_0x5ed308[_0x3b2926(0xf5)]??null,'processing':_0x5ed308[_0x3b2926(0x101)]??null});if(!_0xa314dc[_0x3b2926(0x262)]&&_0x5ed308[_0x3b2926(0x262)])_0xa314dc[_0x3b2926(0x262)]=_0x5ed308[_0x3b2926(0x262)];if(!_0xa314dc['listenAddr']&&_0x5ed308[_0x3b2926(0x99)])_0xa314dc['listenAddr']=_0x5ed308[_0x3b2926(0x99)];if(!_0xa314dc[_0x3b2926(0x101)]&&_0x5ed308[_0x3b2926(0x101)])_0xa314dc[_0x3b2926(0x101)]=_0x5ed308[_0x3b2926(0x101)];if(!_0xa314dc[_0x3b2926(0xb4)]&&_0x5ed308['engines'])_0xa314dc['engines']=_0x5ed308['engines'];if(!_0xa314dc[_0x3b2926(0x270)]&&_0x5ed308[_0x3b2926(0x270)])_0xa314dc[_0x3b2926(0x270)]=_0x5ed308[_0x3b2926(0x270)];if(_0xa314dc[_0x3b2926(0x187)]==null&&_0x5ed308[_0x3b2926(0x187)])_0xa314dc[_0x3b2926(0x187)]=_0x5ed308[_0x3b2926(0x187)];if(_0x5ed308['stats']&&(!_0xa314dc[_0x3b2926(0xfc)]||(_0x5ed308['stats']['at']??0x0)>(_0xa314dc[_0x3b2926(0xfc)]['at']??0x0)))_0xa314dc['stats']=_0x5ed308[_0x3b2926(0xfc)];}return[..._0x2969b7[_0x3b2926(0x241)]()];}['runtimeProcessesView'](){const _0x7aac0=_0xf19f3d,_0x409b58=[],_0x40df53={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x4c9c2f of this['_groupByProcess']()){_0x409b58[_0x7aac0(0x159)]({'processKey':_0x4c9c2f[_0x7aac0(0x210)],'kind':_0x4c9c2f[_0x7aac0(0x10c)],'pid':_0x4c9c2f[_0x7aac0(0xf3)],'supervisorKey':_0x4c9c2f[_0x7aac0(0x289)],'meta':_0x4c9c2f[_0x7aac0(0x25f)]??null,'uptime':_0x4c9c2f[_0x7aac0(0x182)],'stats':_0x4c9c2f[_0x7aac0(0xfc)]??null}),_0x40df53[_0x7aac0(0x11a)]++;if(_0x4c9c2f['stats']){_0x40df53[_0x7aac0(0xe8)]+=_0x4c9c2f[_0x7aac0(0xfc)][_0x7aac0(0xe8)]||0x0,_0x40df53[_0x7aac0(0x20d)]+=(_0x4c9c2f[_0x7aac0(0xfc)][_0x7aac0(0x20d)]||0x0)+(_0x4c9c2f['stats'][_0x7aac0(0x10b)]?.[_0x7aac0(0x20d)]||0x0);const _0x212585=_0x4c9c2f[_0x7aac0(0xfc)][_0x7aac0(0x10b)];_0x212585&&(_0x40df53['threads']['count']+=_0x212585[_0x7aac0(0x92)]||0x0,_0x40df53['threads'][_0x7aac0(0x126)]+=_0x212585['sandbox']||0x0,_0x40df53[_0x7aac0(0x10b)][_0x7aac0(0x1d2)]+=_0x212585[_0x7aac0(0x1d2)]||0x0);}}return{'totals':_0x40df53,'nodes':_0x409b58};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x569eaf=_0xf19f3d;this[_0x569eaf(0x24a)]=this['_isWriter']||!!writer,this[_0x569eaf(0xb8)]=this['_isReader']||!!reader,this[_0x569eaf(0x1b5)]=kind||this[_0x569eaf(0x1b5)]||(_0x5c94c4['isWorker']?_0x569eaf(0x173):_0x569eaf(0x277)),this[_0x569eaf(0x100)]=supervisorKey??this[_0x569eaf(0x100)],this['_listenAddr']=listenAddr??this[_0x569eaf(0x1c2)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x45d428=await this[_0x569eaf(0xec)][_0x569eaf(0x174)](_0x472831,{'sync':![],'durability':_0x569eaf(0x109)});await _0x45d428['ensureType'](_0xfc1650),this[_0x569eaf(0x259)]=_0x45d428;}return this[_0x569eaf(0x259)];}['_nodeDb'](){const _0x18073f=_0xf19f3d;return this[_0x18073f(0x2b8)]!==this['_statusEnv']&&(this[_0x18073f(0x2b8)]=this[_0x18073f(0x259)],this['_nodeDbCache']=this[_0x18073f(0x259)][_0x18073f(0xdb)](_0xfc1650)[_0x18073f(0x167)]),this['_nodeDbCache'];}[_0xf19f3d(0x156)](_0x35f561){const _0x5bfd8c=_0xf19f3d;if(_0x139a26)return this[_0x5bfd8c(0x17f)]()['putSync'](_0x35f561[_0x5bfd8c(0x24c)],_0x35f561,0x1);const _0x15aee9=this[_0x5bfd8c(0x17f)]()[_0x5bfd8c(0x1b9)](_0x35f561[_0x5bfd8c(0x24c)],_0x35f561,0x1);if(_0x15aee9&&typeof _0x15aee9['then']===_0x5bfd8c(0xf0))_0x15aee9[_0x5bfd8c(0x205)](undefined,()=>{});return _0x15aee9;}[_0xf19f3d(0xd3)](_0x4adf0e){const _0x4978b7=_0xf19f3d;return this['_nodeDb']()[_0x4978b7(0x1a4)](_0x4adf0e['nodeKey'],_0x4adf0e,0x1);}[_0xf19f3d(0x1dc)](_0x2d2e80){const _0x346e3e=_0xf19f3d;if(_0x139a26)try{return this[_0x346e3e(0x17f)]()['removeSync'](_0x2d2e80);}catch{return![];}const _0x4a1eb5=this[_0x346e3e(0x17f)]()[_0x346e3e(0x28f)](_0x2d2e80);if(_0x4a1eb5&&typeof _0x4a1eb5[_0x346e3e(0x205)]===_0x346e3e(0xf0))_0x4a1eb5[_0x346e3e(0x205)](undefined,()=>{});return _0x4a1eb5;}async[_0xf19f3d(0x154)](_0x5cf608){const _0x4aa7b3=_0xf19f3d;if(!this[_0x4aa7b3(0x259)]||!this[_0x4aa7b3(0x24a)]||!_0x5cf608?.['nodeKey'])return;return this[_0x4aa7b3(0x156)](_0x5cf608);}async['removeNode'](_0x55df20){const _0x54e31a=_0xf19f3d;if(!this['_statusEnv']||!this[_0x54e31a(0x24a)]||!_0x55df20)return;const _0x4ab972=_0x55df20[_0x54e31a(0x216)]('#'),_0x222bec=[];for(const {key:_0x1388e0}of this[_0x54e31a(0x259)][_0x54e31a(0xc7)](_0xfc1650)){if(_0x1388e0===_0x55df20||!_0x4ab972&&typeof _0x1388e0==='string'&&_0x1388e0['startsWith'](_0x55df20+'#'))_0x222bec[_0x54e31a(0x159)](_0x1388e0);}for(const _0x17b543 of _0x222bec){try{this[_0x54e31a(0x17f)]()[_0x54e31a(0x10f)](_0x17b543);}catch{}}}['_nodeDead'](_0x1601ec){const _0x1e0934=_0xf19f3d;if(typeof _0x1601ec?.[_0x1e0934(0xf3)]!==_0x1e0934(0x27d))return![];if(_0x1601ec[_0x1e0934(0x129)]!==_0xad8865['hostname']())return![];if(_0x1601ec[_0x1e0934(0xf3)]===process['pid'])return![];if(_0x1601ec[_0x1e0934(0x128)]!=null&&_0x1601ec[_0x1e0934(0x128)]<Date[_0x1e0934(0xef)]()-_0x8a1a71)return!![];try{return process['kill'](_0x1601ec[_0x1e0934(0xf3)],0x0),![];}catch(_0x1a2ad0){return _0x1a2ad0['code']==='ESRCH';}}['listNodes'](){const _0x2a1050=_0xf19f3d;if(!this[_0x2a1050(0x259)])return[];try{this['_statusEnv']['db']?.[_0x2a1050(0x122)]?.();}catch{}const _0x187401=Date['now'](),_0x5e98ef=_0xad8865['hostname'](),_0xa2a97e=[];for(const {value:_0x3d70ba}of this[_0x2a1050(0x259)][_0x2a1050(0xc7)](_0xfc1650)){if(!_0x3d70ba)continue;let _0x3e283e=null;_0x3d70ba[_0x2a1050(0x129)]===_0x5e98ef&&typeof _0x3d70ba['pid']===_0x2a1050(0x27d)&&(_0x3e283e=!this[_0x2a1050(0x1c3)](_0x3d70ba));if(_0x3e283e===![])continue;const _0x230c6c=_0x3d70ba['expiresAt']==null||_0x3d70ba[_0x2a1050(0x128)]>=_0x187401;if(_0x3e283e===!![]||_0x230c6c)_0xa2a97e[_0x2a1050(0x159)](_0x3d70ba);}return _0xa2a97e;}async[_0xf19f3d(0xc6)](_0x3208db=0x0){const _0x541161=_0xf19f3d;if(!this[_0x541161(0x259)]||!this[_0x541161(0x24a)])return;const _0x4f6ec8=Date[_0x541161(0xef)]()-_0x3208db,_0x52cf35=new Set(),_0x101c75=[],_0x4697c3=_0xad8865[_0x541161(0x1df)](),_0x5cbd48=require$$6[_0x541161(0x267)];for(const {key:_0x11eb8e,value:_0x2b45dc}of this['_statusEnv'][_0x541161(0xc7)](_0xfc1650)){if(!_0x2b45dc)continue;const _0x45d07b=_0x2b45dc[_0x541161(0x129)]===_0x4697c3&&typeof _0x2b45dc[_0x541161(0xf3)]===_0x541161(0x27d),_0x5592d3=_0x45d07b?this[_0x541161(0x1c3)](_0x2b45dc):_0x2b45dc[_0x541161(0x128)]!=null&&_0x2b45dc['expiresAt']<_0x4f6ec8;if(_0x5592d3)_0x101c75['push'](_0x11eb8e);else{_0x52cf35[_0x541161(0x15d)](_0x2c1389(_0x2b45dc)??_0x11eb8e);if(_0x2b45dc['version']&&_0x2b45dc[_0x541161(0x267)]!==_0x5cbd48){if(!this[_0x541161(0x170)])this[_0x541161(0x170)]=new Set();!this[_0x541161(0x170)]['has'](_0x2b45dc[_0x541161(0x267)])&&(this[_0x541161(0x170)][_0x541161(0x15d)](_0x2b45dc[_0x541161(0x267)]),this[_0x541161(0xec)][_0x541161(0x141)]?.[_0x541161(0xa1)]?.(_0x541161(0x20a)+(_0x2b45dc['pid']??'?')+_0x541161(0x2bb)+_0x2b45dc[_0x541161(0x267)]+_0x541161(0x213)+_0x5cbd48+_0x541161(0x133)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x541161(0x23d)}));}}}for(const _0xdfa73 of _0x101c75)this[_0x541161(0x1dc)](_0xdfa73);if(this[_0x541161(0x160)]()){const _0x263d49=[];for(const {key:_0x5f52b8}of this[_0x541161(0x25b)]('node')){if(!_0x52cf35[_0x541161(0x217)](_0x5f52b8)){if(_0x139a26)try{this['_desired'][_0x541161(0x10f)]('node/'+_0x5f52b8);}catch{}else _0x263d49[_0x541161(0x159)](this[_0x541161(0x200)][_0x541161(0x28f)](_0x541161(0x184)+_0x5f52b8));}}if(_0x263d49[_0x541161(0xf6)])await Promise[_0x541161(0x2b2)](_0x263d49);}}[_0xf19f3d(0x1e5)](_0x1130d7=null){const _0x5c288c=_0xf19f3d;if(this[_0x5c288c(0x266)])return;if(!this['_isWriter']||!this[_0x5c288c(0x259)]){this[_0x5c288c(0xec)]?.[_0x5c288c(0x141)]?.[_0x5c288c(0xa1)]?.(_0x5c288c(0x257)+this[_0x5c288c(0x24a)]+_0x5c288c(0x236)+!!this[_0x5c288c(0x259)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':'processes'});return;}this[_0x5c288c(0x178)]=_0x1130d7,this['_onProcEvent']=()=>this[_0x5c288c(0x19c)]();for(const _0x357860 of _0x3c7bab)this[_0x5c288c(0xec)][_0x5c288c(0x1dd)]['on'](_0x357860,this[_0x5c288c(0x2a4)]);this[_0x5c288c(0xdf)]();const _0x5d14e2=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x497778;this[_0x5c288c(0x266)]=setInterval(()=>{const _0x5b3732=_0x5c288c;if(this['_onTick'])try{this['_onTick']();}catch{}this[_0x5b3732(0xdf)](),this['reap']()['catch'](()=>{});},_0x5d14e2);if(this[_0x5c288c(0x266)][_0x5c288c(0x113)])this[_0x5c288c(0x266)][_0x5c288c(0x113)]();}[_0xf19f3d(0x19c)](){const _0xab8ac0=_0xf19f3d;if(!this[_0xab8ac0(0x24a)]||!this[_0xab8ac0(0x259)])return;if(Date['now']()-this['_lastPublishAt']<_0x47b5ad)return;this[_0xab8ac0(0xdf)]();}[_0xf19f3d(0xdf)](){const _0x42500a=_0xf19f3d;if(!this[_0x42500a(0x24a)]||!this[_0x42500a(0x259)])return;this['_lastPublishAt']=Date[_0x42500a(0xef)]();try{const _0x723dd3=[this['_buildOwnRow']()];for(const _0x105b74 of this[_0x42500a(0x26f)][_0x42500a(0x241)]())_0x723dd3['push'](this['_buildChildRow'](_0x105b74));const _0x3e668d=_0x2cc0ef['enabled']?_0x2cc0ef[_0x42500a(0xef)]():0x0;for(const _0x2eedb5 of _0x723dd3){try{this['_putRowSync'](_0x2eedb5),this[_0x42500a(0x1de)]=![];}catch(_0x43b4d1){!this[_0x42500a(0x1de)]&&(this[_0x42500a(0x1de)]=!![],this['okdb']?.[_0x42500a(0x141)]?.[_0x42500a(0xa1)]?.(_0x42500a(0xf1)+_0x43b4d1[_0x42500a(0x230)],{'feature':_0x42500a(0x11a)}));}}if(_0x2cc0ef['enabled'])_0x2cc0ef[_0x42500a(0x21e)](_0x42500a(0x189),_0x2cc0ef[_0x42500a(0xef)]()-_0x3e668d,_0x42500a(0x261)+_0x723dd3[_0x42500a(0xf6)]+'\x20sync');}catch(_0x19d2af){!this[_0x42500a(0x1de)]&&(this['_publishFailWarned']=!![],this[_0x42500a(0xec)]?.['log']?.['warn']?.(_0x42500a(0xf1)+_0x19d2af[_0x42500a(0x230)],{'feature':_0x42500a(0x11a)}));}}async['stopHeartbeat'](){const _0x8dee24=_0xf19f3d;if(this[_0x8dee24(0x2a4)]){for(const _0x1392f5 of _0x3c7bab){try{this[_0x8dee24(0xec)][_0x8dee24(0x1dd)][_0x8dee24(0xae)](_0x1392f5,this[_0x8dee24(0x2a4)]);}catch{}}this[_0x8dee24(0x2a4)]=null;}this[_0x8dee24(0x266)]&&(clearInterval(this[_0x8dee24(0x266)]),this[_0x8dee24(0x266)]=null);try{if(this[_0x8dee24(0x259)]&&this[_0x8dee24(0x24a)])await this[_0x8dee24(0x155)](this[_0x8dee24(0x1d5)]);}catch{}}async['deregisterSelf'](){const _0x324d8e=_0xf19f3d;if(!this[_0x324d8e(0x259)]||!this['_isWriter'])return;try{await this[_0x324d8e(0x155)](this[_0x324d8e(0x1d5)]);}catch{}try{const _0x1aad84=[];for(const {value:_0x311cc8}of this[_0x324d8e(0x259)]['getRange'](_0xfc1650)){if(_0x311cc8?.['ppid']===process[_0x324d8e(0xf3)]&&_0x311cc8['nodeKey'])_0x1aad84[_0x324d8e(0x159)](_0x311cc8['nodeKey']);}for(const _0x2a9f56 of _0x1aad84){try{await this['removeNode'](_0x2a9f56);}catch{}}}catch{}}async[_0xf19f3d(0x260)](){return this['putNode'](this['_buildOwnRow']());}async[_0xf19f3d(0x243)](_0x21d360){const _0x1e54a9=_0xf19f3d;if(!this[_0x1e54a9(0x259)]||!this[_0x1e54a9(0x24a)])return;return this[_0x1e54a9(0x154)](this[_0x1e54a9(0xa0)](_0x21d360));}[_0xf19f3d(0xa0)]({pid:_0x498c26,startedAt:_0x5d9e3a,kind:_0x59ffe9,supervisorKey:_0x1926fc,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0xf19f3d(0x29c),meta:meta=null,stats:stats=null}){const _0x13b9bf=_0xf19f3d,_0x165c91=Date[_0x13b9bf(0xef)](),_0x47256f=_0x439257(_0x498c26,_0x5d9e3a);return{'nodeKey':_0x3400d7(_0x47256f,'0'),'processKey':_0x47256f,'instanceId':'0','pid':_0x498c26,'startedAt':_0x5d9e3a,'ppid':process[_0x13b9bf(0xf3)],'host':_0xad8865['hostname'](),'supervisorKey':_0x1926fc,'slot':slot,'slotKey':slotKey,'kind':_0x59ffe9,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x165c91,'expiresAt':_0x165c91+_0x5de4ee,'caps':this[_0x13b9bf(0x149)](_0x59ffe9,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0xf19f3d(0x139)](_0x1e5ee9){const _0x571a77=_0xf19f3d;if(!_0x1e5ee9?.['pid'])return null;const _0x20d83a=_0x439257(_0x1e5ee9[_0x571a77(0xf3)],_0x1e5ee9[_0x571a77(0x135)]);this[_0x571a77(0x26f)][_0x571a77(0x198)](_0x20d83a,{..._0x1e5ee9,'supervisorKey':_0x1e5ee9['supervisorKey']??this[_0x571a77(0x23e)]});if(this[_0x571a77(0x24a)])await this['publishChildRow'](this[_0x571a77(0x26f)][_0x571a77(0x162)](_0x20d83a))['catch']?.(()=>{});return _0x20d83a;}['removeSupervisedChild'](_0x4fbf7d){if(!_0x4fbf7d)return;return this['_children']['delete'](_0x4fbf7d),this['removeNode'](_0x4fbf7d);}['_sampleOwnStats'](){const _0x617d2b=_0xf19f3d,_0xfc3a68=Date[_0x617d2b(0xef)](),_0x2dda1f=process[_0x617d2b(0x96)](),_0xe32ced=(_0xfc3a68-this[_0x617d2b(0x193)])*0x3e8;if(_0xe32ced>=0x3d090){const _0x46be08=_0x2dda1f[_0x617d2b(0x177)]-this[_0x617d2b(0xf8)][_0x617d2b(0x177)]+(_0x2dda1f['system']-this['_lastCpuUsage'][_0x617d2b(0x9b)]),_0x2239a4=_0xad8865[_0x617d2b(0xb7)]()[_0x617d2b(0xf6)]||0x1;this['_lastCpuPct']=Math[_0x617d2b(0x16a)](0x64,Math['round'](_0x46be08/(_0xe32ced*_0x2239a4)*0x64)),this['_lastCpuWindowMs']=Math[_0x617d2b(0xb0)](_0xe32ced/0x3e8),this[_0x617d2b(0xf8)]=_0x2dda1f,this[_0x617d2b(0x193)]=_0xfc3a68;}const _0x3c07de=process['memoryUsage'](),_0x4569f2=this[_0x617d2b(0x1b7)][_0x617d2b(0x212)];let _0x279a96=0x0;if(_0x4569f2>0x0){const _0xe7d305=[this[_0x617d2b(0xec)],...this[_0x617d2b(0xec)][_0x617d2b(0xba)]?.['values']?.()??[]];for(const _0x946d7b of _0xe7d305){const _0x1ccd2f=_0x946d7b[_0x617d2b(0x256)]?.[_0x617d2b(0x16d)];if(_0x1ccd2f)_0x279a96+=_0x1ccd2f[_0x617d2b(0x9c)][_0x617d2b(0x1d2)];}}let _0x1fbda5=null;const _0xe2c109=_0x4569f2;if(_0xe2c109>0x0){let _0x46959b=0x0;for(const _0x540eae of this[_0x617d2b(0x1b7)]['values']())_0x46959b+=_0x540eae[_0x617d2b(0x20d)]||0x0;_0x1fbda5={'count':_0xe2c109,'heapUsed':_0x46959b,'sandbox':_0x4569f2,'busy':_0x279a96};}return{'rss':_0x3c07de[_0x617d2b(0xe8)],'heapUsed':_0x3c07de[_0x617d2b(0x20d)],'heapTotal':_0x3c07de[_0x617d2b(0x21a)],'external':_0x3c07de[_0x617d2b(0xe0)],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x617d2b(0xda)]??null,'threads':_0x1fbda5,'at':_0xfc3a68};}[_0xf19f3d(0x2bc)](_0x1131e9,_0xf77ac3){const _0x3cecb4=_0xf19f3d;if(!_0x1131e9||!_0xf77ac3)return;this[_0x3cecb4(0x1b7)][_0x3cecb4(0x198)](_0x1131e9,_0xf77ac3);}[_0xf19f3d(0x1c6)](_0x20614a){const _0x233d8b=_0xf19f3d;this[_0x233d8b(0x1b7)][_0x233d8b(0x15a)](_0x20614a);}[_0xf19f3d(0x233)](_0x26b202,_0x4a06cb,_0xd51fbf=undefined){const _0x476c36=_0xf19f3d,_0x59e384=this['_children']['get'](_0x26b202);if(!_0x59e384||!_0x4a06cb)return;if(_0xd51fbf!==undefined)_0x59e384[_0x476c36(0x101)]=_0xd51fbf;_0x59e384[_0x476c36(0xfc)]={'rss':_0x4a06cb[_0x476c36(0xe8)]??null,'heapUsed':_0x4a06cb[_0x476c36(0x20d)]??null,'heapTotal':_0x4a06cb[_0x476c36(0x21a)]??null,'external':_0x4a06cb['external']??null,'cpuPct':_0x4a06cb[_0x476c36(0x2a5)]??null,'cpuWindowMs':_0x4a06cb['cpuWindowMs']??null,'threads':_0x4a06cb[_0x476c36(0x10b)]??null,'claims':_0x4a06cb[_0x476c36(0x1e8)]??null,'envsOpen':_0x4a06cb['envsOpen']??null,'at':Date[_0x476c36(0xef)]()};}[_0xf19f3d(0xa4)](){const _0x254c0c=_0xf19f3d,_0x3d6e07=Date['now'](),_0x1af931=this[_0x254c0c(0xec)][_0x254c0c(0x286)]||{},_0x22a235=this[_0x254c0c(0x1b5)]||_0x254c0c(0x277);return{'nodeKey':this['_rowKey'],'processKey':this[_0x254c0c(0x23e)],'instanceId':this['_instanceId'],'pid':process['pid'],'startedAt':this[_0x254c0c(0xc9)],'instanceStartedAt':this[_0x254c0c(0x20b)],'ppid':typeof process[_0x254c0c(0x12a)]===_0x254c0c(0x27d)?process['ppid']:null,'host':_0xad8865[_0x254c0c(0x1df)](),'supervisorKey':this[_0x254c0c(0x100)]??null,'version':require$$6[_0x254c0c(0x267)],'kind':_0x22a235,'role':{'engines':!!_0x1af931['engines'],'processors':!!_0x1af931['processors'],'compaction':_0x1af931[_0x254c0c(0x2ac)],'http':_0x1af931[_0x254c0c(0x2a7)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x3d6e07,'expiresAt':_0x3d6e07+_0x5de4ee,'caps':this[_0x254c0c(0x149)](_0x22a235,_0x1af931),'lifecycle':{'state':_0x254c0c(0x29c),'desiredVersionApplied':null},'meta':{...this[_0x254c0c(0x151)]},'processing':_0x1af931[_0x254c0c(0x146)]?this[_0x254c0c(0x1da)]():null,'engines':_0x1af931[_0x254c0c(0xb4)]?[...this[_0x254c0c(0xec)][_0x254c0c(0x93)]??[]]:null,'singletonClaims':this[_0x254c0c(0xf2)](),'stats':this['_sampleOwnStats'](),'writers':this['_collectWriterFacet']()};}[_0xf19f3d(0x15c)](){const _0x1babf2=_0xf19f3d,_0x33e05e={};try{for(const [_0x17e146,_0x3defe5]of this[_0x1babf2(0xec)]['_envs']){try{const _0x353495=_0x3defe5['writerStatus']?.();if(!_0x353495)continue;if(!_0x353495[_0x1babf2(0x168)]&&!_0x353495[_0x1babf2(0x1bc)]&&!(_0x353495[_0x1babf2(0x1b6)]??0x0)&&!_0x353495[_0x1babf2(0x1ba)])continue;_0x33e05e[_0x17e146]={'depth':_0x353495[_0x1babf2(0x168)],'oldestPendingMs':_0x353495[_0x1babf2(0x244)],'committed':_0x353495['committed'],'commitsPerSec':_0x353495[_0x1babf2(0x116)],'commitP99Ms':_0x353495[_0x1babf2(0x1cf)],'parkedNow':_0x353495[_0x1babf2(0x1b6)]??0x0,'draining':!!_0x353495['draining']};}catch{}}}catch{}return Object['keys'](_0x33e05e)[_0x1babf2(0xf6)]?_0x33e05e:null;}['_collectSingletonClaims'](){const _0x50ee73=_0xf19f3d,_0x44aab6=process[_0x50ee73(0xf3)],_0x212c08=Date[_0x50ee73(0xef)](),_0x2809f7=_0x1b81b9=>{const _0x437789=_0x50ee73;if(!_0x1b81b9)return[];const _0x3722bf=[];try{for(const {id:_0x15db0d,entry:_0x5b4ef9}of _0x1b81b9['list']()){if(_0x5b4ef9?.['holder']?.[_0x437789(0xf3)]!==_0x44aab6)continue;const _0x1e9c40=_0x5b4ef9[_0x437789(0xbe)]??_0x5b4ef9[_0x437789(0x275)]??0x0;if(_0x1e9c40+(_0x5b4ef9[_0x437789(0xde)]??0x0)<_0x212c08)continue;_0x3722bf['push'](_0x15db0d);}}catch{}return _0x3722bf;},_0x3f6eb8=_0x2809f7(this['_singletonLock'](_0x50ee73(0xc0))),_0x35d122=_0x2809f7(this[_0x50ee73(0xbb)](_0x50ee73(0x1a3)));if(!_0x3f6eb8[_0x50ee73(0xf6)]&&!_0x35d122[_0x50ee73(0xf6)])return null;return{'compact':_0x3f6eb8,'replicate':_0x35d122};}[_0xf19f3d(0xbb)](_0xbe06a9){const _0x127848=_0xf19f3d;if(!this[_0x127848(0xec)]?.[_0x127848(0x108)])return null;if(!this[_0x127848(0x299)])this[_0x127848(0x299)]=new Map();let _0x3c4c3d=this['_singletonLocks'][_0x127848(0x162)](_0xbe06a9);if(!_0x3c4c3d)try{_0x3c4c3d=new _0x49deb8(this[_0x127848(0xec)]['_rootDb'],{'namespace':_0xbe06a9}),this[_0x127848(0x299)]['set'](_0xbe06a9,_0x3c4c3d);}catch{return null;}return _0x3c4c3d;}[_0xf19f3d(0x1da)](){const _0x1c7740=_0xf19f3d,_0x17e2eb=[];try{for(const [_0x2ef706,_0x3bcf9d]of this[_0x1c7740(0xec)]['_envs']){if(_0x2ef706['startsWith']('~'))continue;for(const _0x2e06c8 of _0x3bcf9d[_0x1c7740(0x227)][_0x1c7740(0x2b7)]())_0x17e2eb['push']({..._0x2e06c8,'env':_0x2ef706});}}catch{}return{'participate':this[_0x1c7740(0xec)]['processors']?.[_0x1c7740(0x11c)]??![],'processors':_0x17e2eb};}[_0xf19f3d(0x160)](){const _0x255bd2=_0xf19f3d;if(this['_desired'])return!![];const _0x2d1e06=this['okdb'][_0x255bd2(0x108)];if(!_0x2d1e06)return![];return this[_0x255bd2(0x200)]=_0x2d1e06[_0x255bd2(0x234)](_0x4902a2,{'dupSort':![]}),this[_0x255bd2(0x153)]=_0x2d1e06[_0x255bd2(0x234)](_0x1116a0,{'dupSort':![]}),!![];}async[_0xf19f3d(0xad)](){const _0x1c95ae=_0xf19f3d;if(!this[_0x1c95ae(0x160)]())return;const _0x4e8203='__vocab/version',_0x19027d=0x1,_0x2dca62=this[_0x1c95ae(0x200)][_0x1c95ae(0x162)](_0x4e8203)??0x0;if(_0x2dca62>=_0x19027d)return;const _0x32050a=_0x2d25ca=>{const _0x3a1b15=_0x1c95ae;if(_0x2d25ca===_0x3a1b15(0x1cc))return'single';if(_0x2d25ca===_0x3a1b15(0x29e))return _0x3a1b15(0x1ab);return _0x2d25ca;};await this[_0x1c95ae(0xec)][_0x1c95ae(0x29d)]['_writer'][_0x1c95ae(0x1ac)](()=>{const _0x4825c5=_0x1c95ae;for(const _0x389de2 of['procmode/',_0x4825c5(0x215)]){for(const {key:_0x8c7e9a,value:_0x377813}of this[_0x4825c5(0x200)][_0x4825c5(0xc7)]({'start':_0x389de2,'end':_0x389de2+'\xff'})){if(typeof _0x8c7e9a!==_0x4825c5(0x1a6)||!_0x8c7e9a['startsWith'](_0x389de2))break;const _0x59de3a=_0x32050a(_0x377813[_0x4825c5(0x214)]);if(_0x59de3a!==_0x377813[_0x4825c5(0x214)])this[_0x4825c5(0x200)][_0x4825c5(0x1b9)](_0x8c7e9a,{..._0x377813,'mode':_0x59de3a});}}this[_0x4825c5(0x200)][_0x4825c5(0x1b9)](_0x4e8203,_0x19027d);});}[_0xf19f3d(0x1b1)](){const _0xb9f8b7=_0xf19f3d;return!!this[_0xb9f8b7(0x200)];}[_0xf19f3d(0x164)](_0x26b3e3,_0x4daa16){const _0x34e43b=_0xf19f3d;if(!this[_0x34e43b(0x160)]())return null;const _0x147dc7=_0x26b3e3+'/'+_0x4daa16;return this[_0x34e43b(0x134)](),this[_0x34e43b(0x231)][_0x34e43b(0x162)](_0x147dc7)??this[_0x34e43b(0x200)][_0x34e43b(0x162)](_0x147dc7)??null;}[_0xf19f3d(0x134)](){const _0x33593f=_0xf19f3d;if(!_0x139a26)return;try{this[_0x33593f(0xec)]['_systemEnv']?.['db']?.['resetReadTxn']?.();}catch{}}async[_0xf19f3d(0x2b3)](_0x5d0193,_0x360ac0,_0x3bc65d){const _0x42b615=_0xf19f3d;if(!this[_0x42b615(0x160)]())return null;const _0x3b329d=_0x5d0193+'/'+_0x360ac0;this[_0x42b615(0x134)]();const _0x5550c6=this[_0x42b615(0x231)][_0x42b615(0x162)](_0x3b329d)??this['_desired'][_0x42b615(0x162)](_0x3b329d)??{'version':0x0},_0x942332=(_0x5550c6[_0x42b615(0x267)]||0x0)+0x1,_0x3eadb8={..._0x5550c6,..._0x3bc65d,'version':_0x942332,'updatedAt':Date[_0x42b615(0xef)]()};this['_desiredOverlay']['set'](_0x3b329d,_0x3eadb8);try{await this[_0x42b615(0xec)][_0x42b615(0x29d)]['_writer']['transaction'](()=>{const _0x19e7f5=_0x42b615;this[_0x19e7f5(0x200)][_0x19e7f5(0x1b9)](_0x3b329d,_0x3eadb8);});}finally{if(this['_desiredOverlay'][_0x42b615(0x162)](_0x3b329d)===_0x3eadb8)this[_0x42b615(0x231)][_0x42b615(0x15a)](_0x3b329d);}return _0x942332;}['listDesired'](_0x3dbb60){const _0x3f6af7=_0xf19f3d;if(!this[_0x3f6af7(0x160)]())return[];this[_0x3f6af7(0x134)]();const _0x5623b2=_0x3dbb60+'/',_0x13399a=[];for(const {key:_0xb35e37,value:_0x29fb30}of this[_0x3f6af7(0x200)]['getRange']({'start':_0x5623b2,'end':_0x5623b2+'\xff'})){if(typeof _0xb35e37!=='string'||!_0xb35e37[_0x3f6af7(0x218)](_0x5623b2))break;_0x13399a[_0x3f6af7(0x159)]({'key':_0xb35e37[_0x3f6af7(0x278)](_0x5623b2['length']),'value':_0x29fb30});}return _0x13399a;}['getCmd'](_0x75727c){const _0xf597b8=_0xf19f3d;if(!this[_0xf597b8(0x160)]())return null;return this[_0xf597b8(0x153)][_0xf597b8(0x162)](_0x75727c)??null;}async['bumpCmd'](_0x465864,_0x354351,_0x472af3={}){const _0x55d754=_0xf19f3d;if(!this['_ensureDesired']())return null;let _0x10624e;return await this[_0x55d754(0xec)][_0x55d754(0x29d)]['_writer'][_0x55d754(0x1ac)](()=>{const _0x1100ac=_0x55d754,_0x542795=this['_cmd'][_0x1100ac(0x162)](_0x465864)||{'epoch':0x0};_0x10624e=(_0x542795[_0x1100ac(0x222)]||0x0)+0x1,this['_cmd'][_0x1100ac(0x1b9)](_0x465864,{..._0x542795,..._0x472af3,'cmd':_0x354351,'epoch':_0x10624e,'updatedAt':Date[_0x1100ac(0xef)]()});}),_0x10624e;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x189f9b,'nodeKey':_0x439257,'logicalKey':_0x1db3e5,'slotKey':_0xb8bb4d,'PROCESS_ENV':_0x472831,'NODE_TYPE':_0xfc1650},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x41fd15=_0x204085;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x7b1064=require$$0$4,{EVENTS:_0x28d747,CHANGE_ACTIONS:_0x1efe03}=requireOkdbEnums(),{LOOP:_0x23f096}=requireOkdbLoopMonitor(),_0x5bf83e=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x54ec4f=0x5,_0x2793cf=0x2710;class _0x26ede8 extends _0x7b1064{constructor(_0x345310,_0x4c60a9={}){const _0x3d7a3d=_0x10a2;super(),this[_0x3d7a3d(0xec)]=_0x345310,this['_quantum']=_0x4c60a9['quantum']??_0x5bf83e,this[_0x3d7a3d(0xee)]=_0x4c60a9['flushDebounce']??_0x54ec4f,this[_0x3d7a3d(0x24d)]=_0x4c60a9[_0x3d7a3d(0x2b6)]??_0x2793cf,this[_0x3d7a3d(0x1b8)]=![],this[_0x3d7a3d(0xb1)]=new Map(),this[_0x3d7a3d(0x12e)]=new Map(),this[_0x3d7a3d(0x27b)]=new Map(),this['_flushTimer']=null,this[_0x3d7a3d(0x25d)]=![],this[_0x3d7a3d(0x1d0)]=new Set(),this['_onItem']=_0x19da05=>this[_0x3d7a3d(0x211)](_0x19da05),this[_0x3d7a3d(0x188)]=_0x41efdb=>this[_0x3d7a3d(0x123)](_0x41efdb),this['_onStop']=()=>this['stop']();}[_0x41fd15(0xf4)](){const _0x49e7db=_0x41fd15;if(this[_0x49e7db(0x1b8)])return;this[_0x49e7db(0x1b8)]=!![];for(const [_0x150c33,_0x1dc15c]of this['okdb'][_0x49e7db(0xba)]){if(_0x150c33[_0x49e7db(0x218)]('~'))continue;try{_0x1dc15c['_enableChangelog']();}catch{}}for(const [_0x464de1,_0x401d42]of this['okdb']['_envs']){if(_0x464de1[_0x49e7db(0x218)]('~'))continue;try{this[_0x49e7db(0x12e)][_0x49e7db(0x198)](_0x464de1,_0x401d42[_0x49e7db(0x225)]()||0x0);}catch{}}const {events:_0x58ebed}=this[_0x49e7db(0xec)];_0x58ebed['on'](_0x28d747[_0x49e7db(0x1a2)],this['_onItem']),_0x58ebed['on'](_0x28d747[_0x49e7db(0x130)],this[_0x49e7db(0x183)]),_0x58ebed['on'](_0x28d747[_0x49e7db(0x19b)],this['_onItem']),_0x58ebed['on'](_0x28d747[_0x49e7db(0x1f3)],this[_0x49e7db(0x188)]),_0x58ebed['once'](_0x28d747[_0x49e7db(0x1eb)],this[_0x49e7db(0xc3)]);}[_0x41fd15(0x26b)](){const _0x156b94=_0x41fd15;if(!this[_0x156b94(0x1b8)])return;this['_started']=![];const {events:_0x2ddf9f}=this['okdb'];_0x2ddf9f['off'](_0x28d747[_0x156b94(0x1a2)],this[_0x156b94(0x183)]),_0x2ddf9f[_0x156b94(0xae)](_0x28d747['ITEM_UPDATE'],this[_0x156b94(0x183)]),_0x2ddf9f[_0x156b94(0xae)](_0x28d747['ITEM_REMOVE'],this[_0x156b94(0x183)]),_0x2ddf9f[_0x156b94(0xae)](_0x28d747[_0x156b94(0x1f3)],this[_0x156b94(0x188)]);try{_0x2ddf9f[_0x156b94(0xae)](_0x28d747[_0x156b94(0x1eb)],this[_0x156b94(0xc3)]);}catch{}this[_0x156b94(0x102)]&&(clearTimeout(this['_flushTimer']),this[_0x156b94(0x102)]=null),this[_0x156b94(0x27b)][_0x156b94(0x285)](),this['_cursors'][_0x156b94(0x285)](),this[_0x156b94(0x12e)]['clear'](),this[_0x156b94(0x1d0)]['clear']();}[_0x41fd15(0x194)](_0xa8ce4f,_0x485f9b,_0x12435b,_0x44d659){return _0xa8ce4f+'\x00'+_0x485f9b+'\x00'+_0x12435b+'\x00'+_0x44d659;}[_0x41fd15(0x127)](_0x1e1cb3,_0x5c5ffe,_0x20273a,_0x23b761){const _0x59fb27=_0x41fd15,_0x4be086=this[_0x59fb27(0x194)](_0x1e1cb3,_0x5c5ffe,_0x20273a,_0x23b761);if(this['_seen'][_0x59fb27(0x217)](_0x4be086))return![];this[_0x59fb27(0x1d0)][_0x59fb27(0x15d)](_0x4be086);if(this[_0x59fb27(0x1d0)][_0x59fb27(0x212)]>this[_0x59fb27(0x24d)]){const _0x118523=this[_0x59fb27(0x1d0)][_0x59fb27(0x241)]()['next']()[_0x59fb27(0x1bd)];this['_seen'][_0x59fb27(0x15a)](_0x118523);}return!![];}[_0x41fd15(0x211)](_0x520d48){const _0xfcb17c=_0x41fd15;if(!this[_0xfcb17c(0x1b8)]||!_0x520d48)return;const {env:_0x56da74,type:_0x47782c,key:_0x29b988,clock:_0x1b1b1f,origin:_0x47763a,action:_0x27c010,newValue:_0x12992f,oldValue:_0x391d1e}=_0x520d48;if(_0x56da74==null||_0x47782c==null||_0x29b988==null)return;if(typeof _0x56da74===_0xfcb17c(0x1a6)&&_0x56da74['startsWith']('~'))return;if(typeof _0x47782c===_0xfcb17c(0x1a6)&&_0x47782c['startsWith']('~'))return;if(!this[_0xfcb17c(0x127)](_0x56da74,_0x47782c,_0x29b988,_0x1b1b1f))return;const _0xf35714=_0x27c010===_0x1efe03[_0xfcb17c(0xc1)]?'remove':_0xfcb17c(0x1b9);this['emit'](_0xfcb17c(0x152),{'env':_0x56da74,'type':_0x47782c,'key':_0x29b988,'op':_0xf35714,'clock':_0x1b1b1f,'origin':_0x47763a,'value':_0xf35714===_0xfcb17c(0x28f)?null:_0x12992f,'prevValue':_0x391d1e});}['_handlePoke'](_0x246641){const _0x5e6e6b=_0x41fd15;if(!this[_0x5e6e6b(0x1b8)])return;if(!_0x246641||typeof _0x246641[_0x5e6e6b(0x14e)]!==_0x5e6e6b(0x1a6)||typeof _0x246641[_0x5e6e6b(0x1b3)]!=='string')return;const {env:_0x8f488a,type:_0x3bf551}=_0x246641;if(_0x8f488a[_0x5e6e6b(0x218)]('~')||_0x3bf551[_0x5e6e6b(0x218)]('~'))return;this[_0x5e6e6b(0x27b)]['set'](_0x8f488a+'\x00'+_0x3bf551,{'env':_0x8f488a,'type':_0x3bf551}),this[_0x5e6e6b(0xd4)]();}[_0x41fd15(0xd4)](){const _0x91343f=_0x41fd15;if(this[_0x91343f(0x102)])return;const _0x2a740e=()=>{const _0x5ed3e5=_0x91343f;this[_0x5ed3e5(0x102)]=null,this['_drain']()[_0x5ed3e5(0x22a)](()=>{});};this['_flushTimer']=setTimeout(_0x2a740e,this['_flushDebounce']>0x0?this[_0x91343f(0xee)]:0x0);}async[_0x41fd15(0xff)](){const _0x3da47b=_0x41fd15;if(this['_draining']){this['_scheduleFlush']();return;}this[_0x3da47b(0x25d)]=!![];try{const _0x2d6a4b=[...this[_0x3da47b(0x27b)]['values']()];this['_pending'][_0x3da47b(0x285)]();let _0x36dbfc=![];for(const {env:_0x42e8a1,type:_0x5a6e9e}of _0x2d6a4b){try{const _0x16e4fe=await this['_drainOne'](_0x42e8a1,_0x5a6e9e);if(_0x16e4fe)_0x36dbfc=!![];}catch{this[_0x3da47b(0x27b)][_0x3da47b(0x198)](_0x42e8a1+'\x00'+_0x5a6e9e,{'env':_0x42e8a1,'type':_0x5a6e9e}),_0x36dbfc=!![];}}if(_0x36dbfc||this[_0x3da47b(0x27b)][_0x3da47b(0x212)]>0x0)this[_0x3da47b(0xd4)]();}finally{this[_0x3da47b(0x25d)]=![];}}async['_drainOne'](_0x29289f,_0x197aee){const _0x2f97d8=_0x41fd15,_0x39c492=await this[_0x2f97d8(0xec)][_0x2f97d8(0x1d1)](_0x29289f),_0xea92bb=_0x29289f+'\x00'+_0x197aee;!this[_0x2f97d8(0xb1)]['has'](_0xea92bb)&&(!this['_baselines'][_0x2f97d8(0x217)](_0x29289f)&&(_0x39c492['_enableChangelog'](),this[_0x2f97d8(0x12e)][_0x2f97d8(0x198)](_0x29289f,_0x39c492[_0x2f97d8(0x225)]()||0x0)),this[_0x2f97d8(0xb1)][_0x2f97d8(0x198)](_0xea92bb,this[_0x2f97d8(0x12e)][_0x2f97d8(0x162)](_0x29289f)));const _0x791ff0=this[_0x2f97d8(0xb1)][_0x2f97d8(0x162)](_0xea92bb),_0x1fa415=_0x39c492['getClock'](_0x197aee)||0x0;if(_0x1fa415<=_0x791ff0)return![];const _0x19c1e4=_0x791ff0+this[_0x2f97d8(0xdc)],_0x3f3ea1=Math['min'](_0x1fa415,_0x19c1e4),_0x2b5604=_0x23f096[_0x2f97d8(0x21b)]?_0x23f096[_0x2f97d8(0xef)]():0x0,_0x189f95=Array[_0x2f97d8(0x21c)](_0x39c492[_0x2f97d8(0x1b0)](_0x197aee,_0x791ff0+0x1,_0x3f3ea1));let _0x6c3151=_0x791ff0;for(const _0x4b35c1 of _0x189f95){const {clock:_0x57aff5,key:_0x2f543c,action:_0xdb62e,origin:_0x4e4d33}=_0x4b35c1;if(_0x57aff5>_0x6c3151)_0x6c3151=_0x57aff5;if(_0x2f543c==null)continue;if(!this[_0x2f97d8(0x127)](_0x29289f,_0x197aee,_0x2f543c,_0x57aff5))continue;let _0x42e305,_0x20e3f;if(_0xdb62e===_0x1efe03[_0x2f97d8(0xc1)])_0x42e305=_0x2f97d8(0x28f),_0x20e3f=null;else{const _0x5056ab=_0x39c492[_0x2f97d8(0x162)](_0x197aee,_0x2f543c);_0x5056ab==null?(_0x42e305='remove',_0x20e3f=null):(_0x42e305=_0x2f97d8(0x1b9),_0x20e3f=_0x5056ab);}this[_0x2f97d8(0x22e)](_0x2f97d8(0x152),{'env':_0x29289f,'type':_0x197aee,'key':_0x2f543c,'op':_0x42e305,'clock':_0x57aff5,'origin':_0x4e4d33,'value':_0x20e3f});}if(_0x23f096[_0x2f97d8(0x21b)])_0x23f096[_0x2f97d8(0x21e)]('feed:'+_0x29289f+':'+_0x197aee,_0x23f096['now']()-_0x2b5604,'n='+_0x189f95['length']);return this['_cursors'][_0x2f97d8(0x198)](_0xea92bb,Math['max'](_0x6c3151,_0x3f3ea1)),_0x39c492[_0x2f97d8(0x225)](_0x197aee)>_0x3f3ea1;}[_0x41fd15(0x16f)](){const _0x5302c4=_0x41fd15;return{'started':this[_0x5302c4(0x1b8)],'quantum':this[_0x5302c4(0xdc)],'flushDebounce':this['_flushDebounce'],'cursors':Object['fromEntries']([...this[_0x5302c4(0xb1)][_0x5302c4(0x252)]()][_0x5302c4(0x280)](([_0x4d1ff6,_0x34dbdf])=>[_0x4d1ff6['replace']('\x00',':'),_0x34dbdf])),'pending':this[_0x5302c4(0x27b)]['size'],'seen':this[_0x5302c4(0x1d0)][_0x5302c4(0x212)]};}}return _0x26ede8[_0x41fd15(0x20e)]=_0x5bf83e,okdbChangefeed={'OKDBChangefeed':_0x26ede8},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2a8cd9=_0x204085;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x37aa72=require$$1$1,_0x5c363f=require$$1,{EVENTS:_0x3e3427}=requireOkdbEnums(),_0x37346e=require$$0$3,{slotKey:_0x57b86e}=requireOkdbProcessRegistry(),_0x225ddb=0xfa,_0x263da8=0xfa0,_0x589cfb=0x5,_0x4f3777=0x2710,_0x17fba2=0xbb8,_0x5c627c=0x7d0,_0x4bdee5='__okdbCluster',_0x4b5dd1='ephemeral',_0x8681cc='log',_0x65e282=_0x2a8cd9(0xfc),_0x333319=[_0x3e3427[_0x2a8cd9(0x22c)],_0x3e3427['FTS_REGISTERED'],_0x3e3427[_0x2a8cd9(0x1c7)],_0x3e3427[_0x2a8cd9(0x253)],_0x3e3427[_0x2a8cd9(0x15b)],_0x3e3427['INDEX_READY'],_0x3e3427[_0x2a8cd9(0x1ef)],_0x3e3427['INDEX_REGISTERED'],_0x2a8cd9(0x27f),_0x2a8cd9(0x11b),_0x2a8cd9(0x131),_0x2a8cd9(0x249),'processor:resumed',_0x2a8cd9(0x203)],_0x22a787=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x9491d1({workers:_0x3a5573,makeOkdb:_0x37e3e5,port:_0x1c39f7,primaryOkdb:_0x3c47a5,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x4459f8=_0x2a8cd9;if(_0x37aa72[_0x4459f8(0xb6)])return childEntry&&_0x37aa72[_0x4459f8(0x117)]({'exec':_0x5c363f[_0x4459f8(0x1f5)](__dirname,_0x4459f8(0x13a)),'args':[],'execArgv':((()=>{const _0x4c8cd5=_0x4459f8,_0x56a207=[];for(let _0xc72cd5=0x0;_0xc72cd5<process[_0x4c8cd5(0x180)][_0x4c8cd5(0xf6)];_0xc72cd5++){const _0x3317ed=process[_0x4c8cd5(0x180)][_0xc72cd5];if(_0x3317ed['startsWith'](_0x4c8cd5(0x197))||_0x3317ed[_0x4c8cd5(0x218)]('--watch')||_0x3317ed[_0x4c8cd5(0x218)](_0x4c8cd5(0xfd)))continue;if(_0x3317ed==='-e'||_0x3317ed==='--eval'||_0x3317ed==='-p'||_0x3317ed==='--print'){_0xc72cd5++;continue;}_0x56a207[_0x4c8cd5(0x159)](_0x3317ed);}return _0x56a207;})())}),_0x149452({'workers':_0x3a5573,'port':_0x1c39f7,'primaryOkdb':_0x3c47a5,'workerEnv':workerEnv});return _0x288a6c({'makeOkdb':_0x37e3e5,'port':_0x1c39f7});}function _0x149452({workers:_0x1875df,port:_0x2b381d,primaryOkdb:_0x3bc1b6,workerEnv:_0x3b1a77}){const _0x1d442b=_0x2a8cd9,_0x403b83=new Map(),_0x2afb86=new Map();let _0x5ce93d=![];const _0x42d545=_0x20dd08=>_0x20dd08?.[_0x1d442b(0x28b)],_0x469f55=_0x102f4a=>{const _0x6033=_0x1d442b,_0xc27d3b=_0x37aa72[_0x6033(0x245)]({...process.env,..._0x3b1a77||{},'OKDB_CLUSTER_SLOT':String(_0x102f4a)});return _0xc27d3b[_0x6033(0x28b)]=_0x102f4a,_0x403b83[_0x6033(0x198)](_0xc27d3b[_0x6033(0x24b)]['pid'],{'worker':_0xc27d3b,'startedAt':Date[_0x6033(0xef)](),'slot':_0x102f4a}),_0xc27d3b['on']('error',_0x49a036=>{const _0x312c8f=_0x6033;console[_0x312c8f(0x141)](_0x312c8f(0x264)+_0xc27d3b[_0x312c8f(0x24b)][_0x312c8f(0xf3)]+_0x312c8f(0x190)+(_0x49a036?.[_0x312c8f(0x230)]??_0x49a036));}),_0xc27d3b['on'](_0x6033(0x272),()=>_0x2067a1()),_0xc27d3b;},_0x46fd16=_0x3b3851=>{const _0x1a5b0d=_0x1d442b;for(const {worker:_0x1dd675}of _0x403b83['values']()){if(_0x1dd675['isDead']()||!_0x1dd675[_0x1a5b0d(0xb2)]())continue;try{_0x1dd675[_0x1a5b0d(0x229)](_0x3b3851);}catch{}}};_0x3bc1b6?.['_activateProcesses']?.({'kind':_0x1d442b(0xce),'listenAddr':':'+_0x2b381d})[_0x1d442b(0x22a)](()=>{}),_0x3bc1b6?.['processes']?.[_0x1d442b(0xb5)]?.({'workersConfigured':_0x1875df});const _0x5c3b36={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x2067a1=()=>{const _0x15a45d=_0x1d442b,_0x3c50ce=_0x3bc1b6?.[_0x15a45d(0x11a)];if(!_0x3c50ce||!_0x3c50ce[_0x15a45d(0x24a)])return;const _0x3e33ef=_0x3c50ce[_0x15a45d(0xf9)];for(const {worker:_0x23f4d4,startedAt:_0x29d554,slot:_0x2c8827,stats:_0x595769,processing:_0x1dcd94}of _0x403b83[_0x15a45d(0x241)]()){if(_0x23f4d4['isDead']())continue;const _0x70be55=_0x3c50ce[_0x15a45d(0x1b1)]?.()&&_0x3c50ce['getDesired'](_0x15a45d(0x2ba),_0xac3acf(_0x2c8827))?.['decommission']===!![];_0x3c50ce[_0x15a45d(0x243)]({'pid':_0x23f4d4[_0x15a45d(0x24b)][_0x15a45d(0xf3)],'startedAt':_0x29d554,'kind':_0x15a45d(0x173),'supervisorKey':_0x3e33ef,'slot':_0x2c8827,'slotKey':_0xac3acf(_0x2c8827),'role':_0x5c3b36,'listenAddr':':'+_0x2b381d,'lifecycle':_0x70be55?_0x15a45d(0x1ff):_0x15a45d(0x29c),'processing':_0x1dcd94??null,'stats':_0x595769??null})[_0x15a45d(0x22a)](()=>{});}},_0xac3acf=_0x506d4b=>_0x57b86e(_0x1d442b(0x276)+_0x2b381d,_0x506d4b),_0x453847=_0x4345a4=>{const _0x5a5708=_0x1d442b,_0x3c961e=_0x3bc1b6?.['processes'];if(!_0x3c961e?.[_0x5a5708(0x1b1)]?.())return![];return _0x3c961e[_0x5a5708(0x164)](_0x5a5708(0x2ba),_0xac3acf(_0x4345a4))?.['decommission']===!![];};for(let _0x23ccab=0x0;_0x23ccab<_0x1875df;_0x23ccab++){const _0x304f32=_0x453847(_0x23ccab);_0x2afb86[_0x1d442b(0x198)](_0x23ccab,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x304f32,'respawnTimer':null}),_0x304f32?console[_0x1d442b(0x141)](_0x1d442b(0x238)+_0x23ccab+_0x1d442b(0x143)):_0x469f55(_0x23ccab);}const _0x31dffb=()=>{const _0x4f6969=_0x1d442b,_0x20ab13=_0x3bc1b6?.[_0x4f6969(0x11a)];if(!_0x20ab13?.['_isWriter']||!_0x20ab13['hasDesired']?.())return;for(const [_0x38a5ad,_0x1f0dd3]of _0x2afb86[_0x4f6969(0x252)]()){const _0x55c3f6=_0x20ab13[_0x4f6969(0x164)]('slot',_0xac3acf(_0x38a5ad)),_0x4bfa97=_0x55c3f6?.[_0x4f6969(0x1ae)]===!![],_0x181431=_0x55c3f6?.[_0x4f6969(0x120)]===!![];if(_0x4bfa97&&!_0x1f0dd3[_0x4f6969(0x26c)]){_0x1f0dd3[_0x4f6969(0x26c)]=!![];_0x1f0dd3['respawnTimer']&&(clearTimeout(_0x1f0dd3['respawnTimer']),_0x1f0dd3[_0x4f6969(0x26d)]=null);for(const {worker:_0x4996a9}of _0x403b83[_0x4f6969(0x241)]()){if(_0x42d545(_0x4996a9)!==_0x38a5ad||_0x4996a9[_0x4f6969(0x199)]())continue;try{if(_0x181431)_0x4996a9[_0x4f6969(0x24b)][_0x4f6969(0x120)](_0x4f6969(0x18b));else _0x4996a9[_0x4f6969(0xb2)]()&&_0x4996a9[_0x4f6969(0x1c1)]();}catch{}}console[_0x4f6969(0x141)](_0x4f6969(0x251)+(_0x181431?_0x4f6969(0x29f):'decommissioned')+_0x4f6969(0x95)+_0x38a5ad+'\x20(durable\x20desired-state)');}else{if(!_0x4bfa97&&_0x1f0dd3[_0x4f6969(0x26c)]&&_0x55c3f6){_0x1f0dd3[_0x4f6969(0x26c)]=![],_0x1f0dd3[_0x4f6969(0xd8)]=[],_0x1f0dd3[_0x4f6969(0x1a1)]=0x0;const _0xedf0d2=[..._0x403b83[_0x4f6969(0x241)]()][_0x4f6969(0x107)](({worker:_0x52e032})=>_0x42d545(_0x52e032)===_0x38a5ad&&!_0x52e032[_0x4f6969(0x199)]());!_0xedf0d2&&!_0x5ce93d&&(_0x469f55(_0x38a5ad),console['log'](_0x4f6969(0x12b)+_0x38a5ad));}}}},_0x4f11a8=()=>{try{_0x31dffb();}catch{}};_0x3bc1b6?.[_0x1d442b(0x1dd)]?.['on']?.(_0x3e3427[_0x1d442b(0xd7)],_0x4f11a8);const _0x3cf4c2=[];if(_0x3bc1b6?.[_0x1d442b(0x1dd)]?.['on'])for(const _0x399ffc of _0x333319){const _0xfc835=_0x3c600a=>{_0x46fd16({[_0x4bdee5]:_0x4b5dd1,'event':_0x399ffc,'data':_0x3c600a??{}});};_0x3bc1b6[_0x1d442b(0x1dd)]['on'](_0x399ffc,_0xfc835),_0x3cf4c2[_0x1d442b(0x159)]({'event':_0x399ffc,'handler':_0xfc835});}const _0x55f7d2=setInterval(()=>{_0x31dffb(),_0x2067a1();},_0x22a787);_0x55f7d2[_0x1d442b(0x113)]?.();const _0x4eca31=(_0x3ea529,_0xcb5d54)=>{const _0x5185ef=_0x1d442b;if(!_0xcb5d54||typeof _0xcb5d54!=='object'||_0xcb5d54[_0x4bdee5]!==_0x8681cc)return;if(!_0x3bc1b6?.[_0x5185ef(0x141)]?.[_0x5185ef(0x224)])return;const _0x120085=_0xcb5d54[_0x5185ef(0x176)]||{};_0x3bc1b6[_0x5185ef(0x141)]['ingest']({..._0x120085,'msg':'[w'+_0xcb5d54[_0x5185ef(0x2ba)]+']\x20'+(_0x120085['msg']??''),'meta':{..._0x120085[_0x5185ef(0x25f)]||{},'worker':_0xcb5d54['slot'],'workerPid':_0xcb5d54['pid']}});};_0x37aa72['on'](_0x1d442b(0x230),_0x4eca31);const _0x861af1=(_0x3818c4,_0x752266)=>{const _0x11cff5=_0x1d442b;if(!_0x752266||typeof _0x752266!=='object'||_0x752266[_0x4bdee5]!==_0x65e282)return;const _0x280f62=_0x403b83['get'](_0x3818c4['process'][_0x11cff5(0xf3)]);if(_0x280f62){_0x280f62['stats']={..._0x752266[_0x11cff5(0xfc)],'at':Date['now']()};if(_0x752266[_0x11cff5(0x101)]!==undefined)_0x280f62[_0x11cff5(0x101)]=_0x752266[_0x11cff5(0x101)];}};_0x37aa72['on'](_0x1d442b(0x230),_0x861af1),_0x37aa72['on'](_0x1d442b(0x232),(_0x30dadb,_0x423faf,_0x3a0529)=>{const _0x15ed1f=_0x1d442b,_0xc00726=_0x30dadb[_0x15ed1f(0x24b)]['pid'],_0x3ad20a=_0x42d545(_0x30dadb),_0x5caa90=_0x403b83[_0x15ed1f(0x162)](_0xc00726);if(_0x5caa90&&_0x3bc1b6?.[_0x15ed1f(0x11a)])_0x3bc1b6[_0x15ed1f(0x11a)][_0x15ed1f(0x155)](_0xc00726+':'+_0x5caa90[_0x15ed1f(0x135)])[_0x15ed1f(0x22a)](()=>{});_0x403b83[_0x15ed1f(0x15a)](_0xc00726),console[_0x15ed1f(0x141)](_0x15ed1f(0x264)+_0xc00726+_0x15ed1f(0x150)+(_0x3ad20a??'?')+_0x15ed1f(0x18a)+('(code='+_0x423faf+',\x20signal='+(_0x3a0529??'none')+_0x15ed1f(0x17e)+_0x403b83[_0x15ed1f(0x212)]+_0x15ed1f(0x172))),_0x2067a1();if(_0x5ce93d||_0x3ad20a==null)return;const _0x2ddaab=_0x2afb86[_0x15ed1f(0x162)](_0x3ad20a);if(!_0x2ddaab||_0x2ddaab[_0x15ed1f(0x26c)])return;const _0xb12548=Date['now']();_0x2ddaab[_0x15ed1f(0xd8)][_0x15ed1f(0x159)](_0xb12548),_0x2ddaab[_0x15ed1f(0xd8)]=_0x2ddaab[_0x15ed1f(0xd8)][_0x15ed1f(0x17c)](_0x3af21e=>_0xb12548-_0x3af21e<=_0x4f3777);if(_0x2ddaab[_0x15ed1f(0xd8)][_0x15ed1f(0xf6)]>=_0x589cfb){_0x2ddaab[_0x15ed1f(0x26c)]=!![],console[_0x15ed1f(0x119)](_0x15ed1f(0x25e)+_0x3ad20a+_0x15ed1f(0x1fd)+_0x2ddaab[_0x15ed1f(0xd8)][_0x15ed1f(0xf6)]+'\x20times\x20in\x20'+(_0x4f3777+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x403b83[_0x15ed1f(0x212)]+_0x15ed1f(0x18e)));return;}_0x2ddaab[_0x15ed1f(0x1a1)]++;const _0x1c99f=Math[_0x15ed1f(0x16a)](_0x263da8,_0x225ddb*0x2**(_0x2ddaab[_0x15ed1f(0x1a1)]-0x1));console[_0x15ed1f(0x141)](_0x15ed1f(0x175)+_0x3ad20a+_0x15ed1f(0x255)+_0x1c99f+_0x15ed1f(0x1aa)+_0x2ddaab[_0x15ed1f(0x1a1)]+')'),_0x2ddaab[_0x15ed1f(0x26d)]=setTimeout(()=>{const _0x3a4f7c=_0x15ed1f;_0x2ddaab['respawnTimer']=null;if(_0x5ce93d||_0x2ddaab[_0x3a4f7c(0x26c)])return;const _0x3ad1df=_0x469f55(_0x3ad20a);_0x3ad1df[_0x3a4f7c(0x290)]('listening',()=>{const _0x4bc912=_0x3a4f7c;if(_0x2afb86[_0x4bc912(0x162)](_0x3ad20a)===_0x2ddaab)_0x2ddaab[_0x4bc912(0x1a1)]=0x0;});},_0x1c99f),_0x2ddaab[_0x15ed1f(0x26d)][_0x15ed1f(0x113)]?.();});const _0x195654=[..._0x403b83[_0x1d442b(0x1b4)]()];console[_0x1d442b(0x141)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+'\x20forked\x20'+_0x1875df+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x2b381d+':\x20'+('['+_0x195654[_0x1d442b(0x1f5)](',\x20')+']'));const _0x179cad={'_isClusterController':!![],'port':_0x2b381d,'primaryOkdb':_0x3bc1b6??null,'status'(){const _0x2b056d=_0x1d442b;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x2b381d,'primaryRole':_0x3bc1b6?.['role']??null,'processorPid':null,'supervisorPid':process[_0x2b056d(0xf3)],'workers':[..._0x403b83[_0x2b056d(0x241)]()][_0x2b056d(0x280)](({worker:_0x2dbc09})=>({'pid':_0x2dbc09[_0x2b056d(0x24b)]['pid'],'id':_0x2dbc09['id'],'dead':_0x2dbc09[_0x2b056d(0x199)]()}))};},async 'close'(){const _0x279d59=_0x1d442b;_0x5ce93d=!![];for(const _0x39d5c8 of _0x2afb86[_0x279d59(0x241)]()){_0x39d5c8[_0x279d59(0x26c)]=!![],_0x39d5c8[_0x279d59(0x26d)]&&(clearTimeout(_0x39d5c8[_0x279d59(0x26d)]),_0x39d5c8[_0x279d59(0x26d)]=null);}clearInterval(_0x55f7d2),_0x37aa72[_0x279d59(0xae)]('message',_0x4eca31),_0x37aa72['off'](_0x279d59(0x230),_0x861af1),_0x3bc1b6?.[_0x279d59(0x1dd)]?.['off']?.(_0x3e3427[_0x279d59(0xd7)],_0x4f11a8);if(_0x3bc1b6?.['events']?.[_0x279d59(0xae)])for(const {event:_0x1897de,handler:_0x3b29dd}of _0x3cf4c2){try{_0x3bc1b6['events'][_0x279d59(0xae)](_0x1897de,_0x3b29dd);}catch{}}_0x3cf4c2[_0x279d59(0xf6)]=0x0;const _0x4192d1=[..._0x403b83[_0x279d59(0x241)]()][_0x279d59(0x280)](({worker:_0x34c826})=>_0x34c826);if(_0x4192d1[_0x279d59(0xf6)]===0x0)return;await Promise[_0x279d59(0x115)](_0x4192d1[_0x279d59(0x280)](_0x56090a=>new Promise(_0x1d82f8=>{const _0x268116=_0x279d59;if(_0x56090a['isDead']()){_0x1d82f8();return;}let _0x3214bd=![];const _0x12212a=()=>{if(_0x3214bd)return;_0x3214bd=!![];if(_0x30acbc)clearTimeout(_0x30acbc);_0x1d82f8();};_0x56090a[_0x268116(0x290)](_0x268116(0x232),_0x12212a);const _0x30acbc=setTimeout(()=>{const _0x2d95f2=_0x268116;try{_0x56090a['process'][_0x2d95f2(0x120)]();}catch{}},_0x17fba2+0x1f4);_0x30acbc['unref']?.();try{_0x56090a[_0x268116(0x1c1)]();}catch{try{_0x56090a['process'][_0x268116(0x120)]();}catch{}}})));}};return _0x179cad;}async function _0x288a6c({makeOkdb:_0x1b0e8f,port:_0x420865}){const _0x3f70dd=_0x2a8cd9,_0x114f51=await _0x1b0e8f();return _0x3303f7(_0x114f51),_0x114f51['http'][_0x3f70dd(0x12d)](_0x420865);}function _0x3303f7(_0x2d52c3){const _0x81778a=_0x2a8cd9;if(!_0x2d52c3||_0x2d52c3[_0x81778a(0x206)])return;_0x2d52c3[_0x81778a(0x206)]=!![];try{const {OKDBChangefeed:_0x346884}=requireOkdbChangefeed(),_0x4faa48=_0x2d52c3[_0x81778a(0xd5)];if(_0x4faa48&&typeof _0x4faa48['attachFeed']===_0x81778a(0xf0)){const _0x1480c2=new _0x346884(_0x2d52c3);_0x1480c2[_0x81778a(0xf4)](),_0x4faa48[_0x81778a(0x273)](_0x1480c2),_0x2d52c3['_changefeed']=_0x1480c2;}}catch(_0x128061){_0x2d52c3[_0x81778a(0x141)]?.[_0x81778a(0xa1)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x128061?.['message']??_0x128061),{'feature':_0x81778a(0x2ae)});}const _0x9cdb12=_0x47292f=>{const _0x60c3c5=_0x81778a;if(!_0x47292f||typeof _0x47292f!==_0x60c3c5(0xe5)||_0x47292f[_0x4bdee5]==null)return;if(_0x47292f[_0x4bdee5]===_0x4b5dd1)try{_0x2d52c3[_0x60c3c5(0xd5)]?.[_0x60c3c5(0x1e0)]?.(_0x47292f[_0x60c3c5(0x204)],_0x47292f[_0x60c3c5(0x167)]);}catch{}};process['on'](_0x81778a(0x230),_0x9cdb12),_0x2d52c3['_clusterOnMessage']=_0x9cdb12;{let _0x2adf20=process[_0x81778a(0x96)](),_0x4202c7=Date[_0x81778a(0xef)]();const _0x466a43=()=>{const _0x2bc848=_0x81778a;if(typeof process[_0x2bc848(0x229)]!==_0x2bc848(0xf0)||!process[_0x2bc848(0x19e)])return;const _0x26f27c=Date[_0x2bc848(0xef)](),_0x568023=process[_0x2bc848(0x96)](),_0x2be4f9=(_0x26f27c-_0x4202c7)*0x3e8,_0x477add=_0x568023[_0x2bc848(0x177)]-_0x2adf20['user']+(_0x568023['system']-_0x2adf20['system']),_0x490851=_0x2be4f9>0x0?Math[_0x2bc848(0x16a)](0x64,Math['round'](_0x477add/(_0x2be4f9*(_0x37346e[_0x2bc848(0xb7)]()[_0x2bc848(0xf6)]||0x1))*0x64)):0x0;_0x2adf20=_0x568023,_0x4202c7=_0x26f27c;const _0xbd5439=process[_0x2bc848(0x1c5)]();let _0x8c0be4=null;try{_0x8c0be4=_0x2d52c3[_0x2bc848(0x262)]?.[_0x2bc848(0x146)]?_0x2d52c3[_0x2bc848(0x11a)]?.[_0x2bc848(0x1da)]?.()??null:null;}catch{}try{process[_0x2bc848(0x229)]({[_0x4bdee5]:_0x65e282,'stats':{'rss':_0xbd5439[_0x2bc848(0xe8)],'heapUsed':_0xbd5439[_0x2bc848(0x20d)],'heapTotal':_0xbd5439[_0x2bc848(0x21a)],'external':_0xbd5439[_0x2bc848(0xe0)],'cpuPct':_0x490851,'cpuWindowMs':Math[_0x2bc848(0xb0)](_0x2be4f9/0x3e8)||null},'processing':_0x8c0be4});}catch{}},_0x11f36f=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x2c8c33=setInterval(_0x466a43,_0x11f36f);_0x2c8c33[_0x81778a(0x113)]?.(),_0x466a43();for(const _0x3c620e of[_0x81778a(0x249),'processor:resumed']){_0x2d52c3['events']?.['on']?.(_0x3c620e,()=>{try{_0x466a43();}catch{}});}}let _0x280c67=![];const _0x2667af=async _0x10a3dd=>{const _0x4736a0=_0x81778a;if(_0x280c67)return;_0x280c67=!![];const _0x45b3ff=setTimeout(()=>process[_0x4736a0(0x232)](_0x10a3dd),_0x17fba2);_0x45b3ff[_0x4736a0(0x113)]?.();try{await _0x2d52c3['close']?.();}catch{}process[_0x4736a0(0x232)](_0x10a3dd);};process['on']('disconnect',()=>_0x2667af(0x0));if(process[_0x81778a(0x11f)]!=='win32'){const _0x10df7c=setInterval(()=>{const _0x3d3541=_0x81778a;if(process[_0x3d3541(0x12a)]===0x1)_0x2667af(0x0);},_0x5c627c);_0x10df7c['unref']?.(),_0x2d52c3[_0x81778a(0xb9)]=_0x10df7c;}}return okdbCluster={'runClustered':_0x9491d1,'attachWorkerCluster':_0x3303f7},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0xb661cc=require$$0$5,{attachWorkerCluster:_0x200410}=requireOkdbCluster();async function _0x3df8e8(){const _0x45f2ab=_0x10a2,_0x46655c=process.env.OKDB_HTTP_CHILD;if(!_0x46655c)throw new Error(_0x45f2ab(0x28c));const {rootPath:_0x5989f6,port:_0x238618,options:options={},logLevel:logLevel=_0x45f2ab(0x166)}=JSON[_0x45f2ab(0x235)](_0x46655c);if(!_0x5989f6||!_0x238618)throw new Error(_0x45f2ab(0x26a));const _0x16def4=new _0xb661cc(_0x5989f6,{...options,'engines':![],'processors':![],'compaction':![]});_0x16def4['log'][_0x45f2ab(0x1f8)]?.();const _0x322a38=process.env.OKDB_CLUSTER_SLOT??'?',_0x163666={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x19d1bd=_0x163666[logLevel]??_0x163666['info'];_0x16def4['log'][_0x45f2ab(0x2a2)](_0x378fa2=>{const _0x54a939=_0x45f2ab;if((_0x163666[_0x378fa2['level']]??0x1)<_0x19d1bd)return;try{process['send']?.({'__okdbCluster':_0x54a939(0x141),'slot':_0x322a38,'pid':process[_0x54a939(0xf3)],'entry':_0x378fa2});}catch{}}),await _0x16def4['open'](),_0x200410(_0x16def4),await _0x16def4[_0x45f2ab(0x2a7)]['listen'](_0x238618);}return _0x3df8e8()['catch'](_0x3c8e86=>{const _0x285ffd=_0x10a2;try{process['send']?.({'__okdbCluster':'log','slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x285ffd(0xf3)],'entry':{'level':_0x285ffd(0x119),'msg':_0x285ffd(0x279)+(_0x3c8e86?.[_0x285ffd(0x230)]??_0x3c8e86)}});}catch{}process[_0x285ffd(0x232)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x204085(0x9a)]=okdbHttpWorkerChild;function _0x3e77(){const _0x28d32a=['claims','_lastCpuPct','ms\x20activeWriters=','SYSTEM_STOPPED','txn:start','resetIndex','1026590ncUgiH','INDEX_RESET','schema:set','prototype','\x20pid=','SYSTEM_POKE','view','join','system:proc','isEnabled','detachConsole','loop-lag\x20','instanceId','options','commit','\x20died\x20','state','decommissioning','_desired','_wantDbHandle','okdb-diag.','processor:retry','event','then','_clusterWorkerAttached','\x20\x20env=','ms\x20on\x20env=','\x20\x20#','process\x20','_startedAt','system:drain','heapUsed','CHANGEFEED_QUANTUM','dropIndex','processKey','_handleInProcess','size','\x20while\x20this\x20process\x20runs\x20','mode','procmodeack/','includes','has','startsWith','\x20\x20(no\x20env\x20draining)','heapTotal','enabled','from','resolve','note','system:bus_state_change','item:create','_done','epoch','ms/','ingest','getClock','write','processor','code','send','catch','confirm','VIEW_PROGRESS','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','emit','dropping','message','_desiredOverlay','exit','updateSupervisedChildStats','openDB','parse','\x20statusEnv=','holder','[okdb-cluster]\x20slot=','single','standalone','freeze','_instanceId','migrations','_selfKey','nodesView','_holderDead','values','processorId','publishChildRow','oldestPendingMs','fork','_log','\x20│\x20','resetting','processor:paused','_isWriter','process','nodeKey','_dedupeMax','field:resolver_registered','_closed','release','[okdb-cluster]\x20','entries','FTS_RESET','rowKey','\x20in\x20','functions','registry\x20heartbeat\x20skipped\x20(writer=','ms\x20busy=','_statusEnv','\x20===','listDesired','system:type_drop','_draining','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','meta','publishOwnRow','rows=','role','percentile','[okdb-cluster]\x20worker\x20pid=','bus:poke','_hbTimer','version','treeView','2.3.3','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','stop','dead','respawnTimer','_durs','_children','singletonClaims','name','online','attachFeed',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','acquiredAt','cluster:','cli','slice','http\x20worker\x20child\x20failed:\x20','cursorKey','_pending','ttl:clear','number','load','processor:ready','map','license:removed','clusterStatusView','registerFts','recent\x20writes\x20(newest\x20first)','clear','_role','_heldTotal','toFixed','supervisorKey','mkdirSync','__okdbSlot','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','572822NrFNvq','fn-runner','remove','once','_buckets','fts:registered','building','uncaughtException','floor','_key','_released','stopping','_singletonLocks','_db','noteListenAddr','running','_systemEnv','async','hard-killed','license:activated','processingStatusView','attach','\x20@\x20','_onProcEvent','cpuPct','env:opened','http','_bpParkedTotal','~processes:desired','sync:apply','seq','compaction','isHeld','cluster','register','error:\x20','license:invalid','allSettled','setDesired','4824528CcAdgo','SYNC_COMMITS','dedupeMax','tierList','_nodeDbFor','2594180QGdJdN','slot','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','reportThreadStats','split','resetFts','count','_servingEngines','label','\x20worker\x20slot=','cpuUsage','default','dumpedAt','listenAddr','exports','system','liveThreadStats','ms\x20max=','enable','_lock','_buildChildRow','warn','_wantDb','4846499bgRcHA','_buildOwnRow','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','stack','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','indexOf','_groupByProcess','ttl:set','_admissionStarted','listNodes','_migrateVocab','off','started','round','_cursors','isConnected','sort','engines','setOwnMeta','isPrimary','cpus','_isReader','_clusterOrphanWatch','_envs','_singletonLock','_lockDb','reduce','updatedAt','_admissionTimer','compact','REMOVE','ORPHAN\x20(env-closed\x20write)','_onStop','stringify','okdb-writer[','reap','getRange','_windowCbs','_processStartedAt','bus:env_release','3817555SqqGrJ','_bpWaiters','schema:drop','primary','disable','onWindow','index:registered','waiting','_putRowSync','_scheduleFlush','_adminRelay','system:env_release','SYSTEM_PROC','deaths','workers','_lastCpuWindowMs','_getType','_quantum','SWAP','ttlMs','_publishNow','external','queue-worker','created','./okdb','maxMs','object','_activateProcesses','system:clock_change','rss','11089808GsuvML','test','txn:end','okdb','instances','_flushDebounce','now','function','registry\x20publish\x20failing:\x20','_collectSingletonClaims','pid','start','lifecycle','length','list','_lastCpuUsage','selfKey','_startAdmission','45WXtOGd','stats','--inspect','_rawDb','_drain','_supervisorKey','processing','_flushTimer','find','fts:reset','firstTs','inflightAgesMs','some','_rootDb','fast','repeat','threads','kind','(worst\x20','ref:violation_resolved','removeSync','stderr','okdb-writer:\x20env\x20closing\x20—\x20retry','ttl:expired','unref','_nestedWarned','all','commitsPerSec','setupPrimary','\x0a\x20\x20\x20\x20\x20\x20','error','processes','processor:progress','_participate','inst:','children','platform','kill','max','resetReadTxn','_handlePoke','registerIndex','~processes:cmd','sandbox','_markSeen','expiresAt','host','ppid','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','type:drop','listen','_baselines','namespace','ITEM_UPDATE','processor:error','index:reset','\x20—\x20','_refreshDesiredSnapshot','startedAt','12eNtROK','_highWater','ms\x20env=','addSupervisedChild','okdb-http-worker-child.js','dropType','\x20drainAge=','node:perf_hooks','crypto','offWindow','_writer','log','perf_hooks','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','\x20phase=','license:added','processors','appendFileSync','beforeWrite','_caps','_coordinator','unclaimed','_startHeartbeat','\x20writer{depth=','env','shift','\x20(slot=','_ownMeta','change','_cmd','putNode','removeNode','_putRowAsync','bus:proc','getProcess','push','delete','INDEX_PROGRESS','_collectWriterFacet','add','cluster-wide','\x0a===\x20OKDB_DIAG\x20','_ensureDesired','recordWrite','get','_committed','getDesired','_acquiredAt','info','data','depth','ready','min','dropFts','1ofN:','_sandbox','afterWrite','status','_versionSkewWarned','call','\x20worker(s)\x20remaining','http-server','createEnvironment','[okdb-cluster]\x20respawning\x20worker\x20slot=','entry','user','_onTick','claimGated','childTransaction','_outstanding','filter','ENV_CLOSING_RETRY',');\x20','_nodeDb','execArgv','mean','uptime','_onItem','node/','node:events','flushLmdb','caps','_onPoke','registry-publish',')\x20exited\x20','SIGKILL','prependListener','index:ready','\x20worker(s)\x20still\x20serving','killable','\x20ipc\x20error:\x20','_report','_inflight','_lastCpuAt','_dedupeKey','raw-put','clearTtl','--test','set','isDead','unhandledRejection','ITEM_REMOVE','_maybePublish','setSchema','connected','_enqueuedAt','_heartbeatInFlight','consecutiveFailures','ITEM_CREATE','sync','putSync','path','string','dropSchema','\x20oldestPendingMs=','flushed','ms\x20(attempt\x20','fanout','transaction','unique:violation','decommission','view:progress','getChanges','hasDesired','splice','type','keys','_kind','parkedNow','_threadStats','_started','put','draining','_lastPublishAt','committed','value','ESRCH','reject','12lEyLWe','disconnect','_listenAddr','_nodeDead','.log','memoryUsage','clearThreadStats','FTS_DROP','_heartbeatTimer','stopped','env:removed','inspect','worker','ref:violation','signalWant','commitP99Ms','_seen','_openEnvLazy','busy','workersConfigured','hasOwnProperty','_rowKey','bus:drain','heartbeatMs','_isStale','drain','_buildProcessingFacet','randomUUID','_removeRowAsync','events','_publishFailWarned','hostname','pushEphemeral','isWanted','creating','listAll','_timer','startHeartbeat','maxExtra','_held'];_0x3e77=function(){return _0x28d32a;};return _0x3e77();}
1
+ 'use strict';const _0x3b4fb0=_0x55dd;function _0x2fbd(){const _0x35e54d=['rowKey',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','license:activated','loop-lag','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_caps','publishChildRow','_lastCpuWindowMs','fanout','ITEM_UPDATE','heartbeatMs','ENV_CLOSING_RETRY','txn:start','none','transaction','single','change','SIGKILL','http-server','system:bus_state_change','ready','FTS_REGISTERED','message','parkedNow','setDesired','open','cli','./okdb','ORPHAN\x20(env-closed\x20write)','split','registry-publish','_log','ms\x20mean=','queue-worker','waiting','_coordinator','_buildOwnRow','decommissioning','_kind','_bpParkedTotal',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_writer','cpuPct','_putRowAsync','_nodeDb','removeNode','fork','compact','resolve','_closed','markClosed','dead','updateSupervisedChildStats','getChanges','afterWrite','mkdirSync','isDead','_seen','listNodes','FTS_RESET','clusterStatusView','building','cluster','treeView','_envs','SYSTEM_STOPPED','\x20writer{depth=','namespace','_isReader','_removeRowAsync','attach','stats','__vocab/version','dropSchema','add','_systemEnv','options',':want','_lastPublishAt','entry','list','isWorker','ITEM_CREATE','claimGated','rss','processor:ready','remove','all','license:added','committed','REMOVE','_collectSingletonClaims','tryAcquire','_enableChangelog','keys','uncaughtException','_threadStats','1171310wrRBoe','running','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','~lock','2.3.4','stopping','primary','[okdb-cluster]\x20respawning\x20worker\x20slot=','string','processor:progress','crypto','hard-killed','next','compaction','lifecycle','beforeWrite','_publishFailWarned','_cmd','stack','processor:paused','setupPrimary','warn','nodesView','_processStartedAt','parse','raw-put','_db','transactionSync','\x20===','exit','prependListener','_statusEnv','participate','_role','error:\x20','_handlePoke','ppid','ms\x20on\x20env=','_singletonLock','dropType','user','halted','ITEM_REMOVE','ttl:clear','function','--inspect','_instanceId','\x20\x20(no\x20env\x20draining)','_clusterOrphanWatch','\x20statusEnv=','map','schema:set','_versionSkewWarned','ephemeral','procmodeack/','dedupeMax','_putRowSync','_onItem','_groupByProcess','env','memoryUsage','node:events','processor','started','engines','push','_inflight','setTtl','true','cursorKey','_wantDbHandle','migrations','http','platform','loop-lag\x20','\x20drainAge=','processor:retry','cluster-wide','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_enqueuedAt','system:env_release','_sampleOwnStats','sync','starting','runtimeProcessesView','commitsPerSec','8AwiasC','splice','_dedupeMax','_clusterWorkerAttached','_report','_lock','test','fn-runner','_maybePublish','system:poke','http\x20worker\x20child\x20failed:\x20','index:drop','setSchema','_handleInProcess','sort','commit','ms\x20p99=','nodeKey','item:create','indexOf','start','bumpCmd','72726WgOMyF','flushDebounce','ESRCH','processor:resumed','--print','deregisterSelf','getRange','addSupervisedChild','startHeartbeat','system:stopped','_rootDb','INDEX_PROGRESS','openDB','ingest','bus:poke','INDEX_REGISTERED','processor:error','maxExtra','filter','_released','depth','recent\x20writes\x20(newest\x20first)','registerIndex','process','listen','stderr','attachFeed','processingStatusView','disable','_getType','unref','_quantum','_onTick','mode','_buildChildRow','setOwnMeta','item:update','info','\x20@\x20','_drain','write','_nodeDbFor','kill','_outstanding','heapTotal','\x20\x20#','send','putSync','processorId','system:clock_change','_onPoke','_started','view:progress','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','number','now','_lockDb','values','decommissioned','getProcess','_hbTimer','~processes','appendFileSync','shift','percentile','SYSTEM_PROC','label','code','okdb-writer:\x20env\x20closing\x20—\x20retry','_listenAddr','processors','toISOString','_heldTotal','ttlMs','uptime','ms\x20env=','close','license:removed','version','_buckets','_lastCpuPct','--eval','reap','meta','maxMs','isActive','_nodeDbCache','online','msg','path','field:resolver_registered','\x20(slot=','__esModule','busy','join','[okdb-cluster]\x20primary\x20pid=','seq','supervisorKey','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','count','processKey','\x20parkedNow=','__okdbCluster','_singletonLocks','startsWith','SYNC_COMMITS','bus:type_drop','unique:violation_resolved','getDesired','cpuUsage','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','load','_desired','\x20oldestPendingMs=','6924910QgGpnC','ms\x20activeWriters=','_flushTimer','slice','freeze','removeSupervisedChild','resetting','_admissionTimer','_draining','toFixed','_activateProcesses','entries','_ensureDesired','fast','resetIndex','publishOwnRow','startedAt','replace','_wantDb','creating','enabled','\x20pid=','respawnTimer','515OcrkpI','type:registered','length','unclaimed','okdb-writer[','resetFts','\x20forked\x20','value','repeat','mean','getCmd','_migrateVocab','inflightAgesMs','threads','ttl:expired','stop','_acquiredAt','call','feed:','_nodeDead','_adminRelay','procmode/','_heartbeatInFlight','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','state','inspect','_heartbeatTimer','registerType','object','_highWater','getClock','removeSync','stopHeartbeat','ms\x20busy=','sandbox','listAll','_holderDead','_onProcEvent','has','singletonClaims','\x20ipc\x20error:\x20','pushEphemeral','drain','status','node/','execArgv','(worst\x20','enable','_drainOne','min','_pending','slot','\x20—\x20','quantum','confirm','reportThreadStats','events','selfKey','\x20in\x20','acquiredAt','_committed','_selfKey','get','host','error','sync:apply','_collectWriterFacet','randomUUID','data','heapUsed','SYSTEM_POKE','okdb-diag.','_bpWaiters','size','exports','_changefeed','caps','_clusterOnMessage','resetReadTxn','stringify','~processes:desired','embedded','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','isEnabled','index:registered','11218446Nqvvgg','fromEntries','decommission','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','assign','deaths','ref:violation','\x20worker(s)\x20remaining','set','round','expiresAt','_markSeen','40lvZwKR','register','process\x20','children','system','reset','_desiredOverlay','_participate','put','reject','noteListenAddr','\x0a===\x20OKDB_DIAG\x20','listenAddr','\x20while\x20this\x20process\x20runs\x20','max','hasDesired','stopped','detachConsole','_refreshDesiredSnapshot','cluster:','holder','raw-remove','txn:rollback','_cursors','role','okdb','FTS_DROP','\x20times\x20in\x20','_startedAt','index:progress','registry\x20publish\x20failing:\x20','default','catch','async','slotKey','draining','clearThreadStats','ttl:set','off','_publishNow','note','\x0a\x20\x20\x20\x20\x20\x20','external','listDesired','tierList','_startHeartbeat','log','consecutiveFailures','epoch','delete','_admissionStarted','index:reset','8183042FQVOzb','_key','_startAdmission','release','find','_rawDb','_isWriter','disconnect','_held','floor','_rowKey','env:opened','_onStop','clear','ms\x20(attempt\x20','once','cpus','dropFts','hostname','system:ready','200775mxTCYg','ms\x20max=','INDEX_READY','_baselines','dumpedAt','processes','_windowCbs','pid','_flushDebounce','processorsView',');\x20','fts:drop','recordWrite','[okdb-cluster]\x20worker\x20pid=','offWindow','txn:end','fts:registered','emit','_lastCpuAt','_supervisorKey','_buildProcessingFacet','_scheduleFlush','extend','type','flushLmdb','allSettled','_timer','clearTtl','processing','_durs','copy','isHeld','1624498jGPsKR','system:type_drop','prototype','_ownMeta','then','_done','view','setLogger','dropping','putNode','_sandbox','level','includes','_servingEngines','updatedAt','childTransaction','oldestPendingMs','kind','killable','_children','[okdb-cluster]\x20','signalWant'];_0x2fbd=function(){return _0x35e54d;};return _0x2fbd();}(function(_0x1f2244,_0x182d0c){const _0x32e69b=_0x55dd,_0x5b3ea0=_0x1f2244();while(!![]){try{const _0x457f38=-parseInt(_0x32e69b(0x359))/0x1+parseInt(_0x32e69b(0x2e1))/0x2+-parseInt(_0x32e69b(0x2c1))/0x3*(-parseInt(_0x32e69b(0x279))/0x4)+-parseInt(_0x32e69b(0x218))/0x5*(-parseInt(_0x32e69b(0x3c5))/0x6)+parseInt(_0x32e69b(0x2ad))/0x7+parseInt(_0x32e69b(0x3af))/0x8*(-parseInt(_0x32e69b(0x26d))/0x9)+-parseInt(_0x32e69b(0x201))/0xa;if(_0x457f38===_0x182d0c)break;else _0x5b3ea0['push'](_0x5b3ea0['shift']());}catch(_0x1bf491){_0x5b3ea0['push'](_0x5b3ea0['shift']());}}}(_0x2fbd,0xc08c1));function _0x55dd(_0x55c56c,_0xfa2227){_0x55c56c=_0x55c56c-0x1cb;const _0x2fbdac=_0x2fbd();let _0x55dd18=_0x2fbdac[_0x55c56c];return _0x55dd18;}var require$$0$5=require(_0x3b4fb0(0x313)),require$$1$1=require('cluster'),require$$1=require(_0x3b4fb0(0x1e7)),require$$0$3=require('os'),require$$2=require(_0x3b4fb0(0x363)),require$$0=require('node:perf_hooks'),require$$0$2=require('perf_hooks'),require$$0$1=require('fs'),require$$0$4=require(_0x3b4fb0(0x396));function getDefaultExportFromCjs(_0x49b1e5){const _0x55c1be=_0x3b4fb0;return _0x49b1e5&&_0x49b1e5[_0x55c1be(0x1ea)]&&Object[_0x55c1be(0x2e3)]['hasOwnProperty'][_0x55c1be(0x229)](_0x49b1e5,_0x55c1be(0x298))?_0x49b1e5['default']:_0x49b1e5;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x42820e=_0x3b4fb0;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x53288b={'PUT':'put','REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x42820e(0x3db),'INDEX_RESET':_0x42820e(0x20f),'TYPE_REGISTER':_0x42820e(0x233),'TYPE_DROP':_0x42820e(0x380),'FTS_REGISTER':'registerFts','FTS_DROP':_0x42820e(0x2be),'FTS_RESET':_0x42820e(0x21d),'SCHEMA_SET':_0x42820e(0x3bb),'SCHEMA_DROP':_0x42820e(0x341),'TTL_SET':_0x42820e(0x39c),'TTL_CLEAR':_0x42820e(0x2dc)},_0x2c5487={'SYSTEM_READY':_0x42820e(0x2c0),'FIELD_RESOLVER_REGISTERED':_0x42820e(0x1e8),'SYSTEM_STOPPED':_0x42820e(0x3ce),'SYSTEM_CLOCK_CHANGE':_0x42820e(0x3f6),'SYSTEM_POKE':_0x42820e(0x3b8),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x42820e(0x2e2),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x42820e(0x30b),'ITEM_CREATE':_0x42820e(0x3c1),'ITEM_UPDATE':_0x42820e(0x3e9),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x42820e(0x2ac),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x42820e(0x296),'VIEW_PROGRESS':_0x42820e(0x3f9),'INDEX_DROP':_0x42820e(0x3ba),'INDEX_REGISTERED':_0x42820e(0x26c),'FTS_REGISTERED':_0x42820e(0x2d1),'FTS_DROP':_0x42820e(0x2cc),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x42820e(0x38c),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x42820e(0x1fa),'REF_VIOLATION':_0x42820e(0x273),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x42820e(0x259),'TXN_START':_0x42820e(0x304),'TXN_END':_0x42820e(0x2d0),'TXN_ROLLBACK':_0x42820e(0x28f),'TYPE_REGISTERED':_0x42820e(0x219),'TYPE_DROP':'type:drop','ENV_OPENED':_0x42820e(0x2b8),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x42820e(0x3a9),'TTL_EXPIRED':_0x42820e(0x226),'TTL_SET':_0x42820e(0x29e),'TTL_CLEAR':_0x42820e(0x384),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x42820e(0x350),'LICENSE_ACTIVATED':_0x42820e(0x2fa),'LICENSE_REMOVED':_0x42820e(0x1db)},_0x2f3202={'CREATING':_0x42820e(0x214),'RESETTING':_0x42820e(0x207),'READY':_0x42820e(0x30c),'DROPPING':_0x42820e(0x2e9),'WAITING':_0x42820e(0x31a),'ERROR':_0x42820e(0x258)},_0xadee31={'CREATED':'created','STARTING':_0x42820e(0x3ac),'STARTED':_0x42820e(0x398),'STOPPING':_0x42820e(0x35e),'STOPPED':_0x42820e(0x289)},_0x32dd5d={'CREATING':'creating','READY':'ready','HALTED':_0x42820e(0x382),'STOPPED':_0x42820e(0x289),'RESETTING':_0x42820e(0x207)},_0x1bb843=Object[_0x42820e(0x205)]({'POKE':_0x42820e(0x3d3),'DRAIN':'bus:drain','TYPE_DROP':_0x42820e(0x1f9),'PROC':'bus:proc','ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x1bb843,'CHANGE_ACTIONS':_0x53288b,'EVENTS':_0x2c5487,'INDEX_STATE':_0x2f3202,'OKDB_STATE':_0xadee31,'VIEW_STATE':_0x32dd5d},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3bebcb=_0x3b4fb0;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x4026e7,performance:_0x583838}=require$$0,_0xb06de1=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3bebcb(0x39d),_0x56118b=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4f924c=process.env.OKDB_LOOP_LAG_ALL==='1',_0x30e64=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4d5af7{constructor(){const _0x10f9a8=_0x3bebcb;this[_0x10f9a8(0x215)]=_0xb06de1,this[_0x10f9a8(0x1dd)]=new Map(),this['_h']=null,this[_0x10f9a8(0x2db)]=null,this[_0x10f9a8(0x3f8)]=![],this[_0x10f9a8(0x317)]=(_0x34a1ed,_0x21f342)=>process[_0x10f9a8(0x3de)]['write'](_0x34a1ed+(_0x21f342?'\x20'+JSON[_0x10f9a8(0x267)](_0x21f342):'')+'\x0a');}[_0x3bebcb(0x3fc)](){return _0x583838['now']();}[_0x3bebcb(0x2e8)](_0x553573){const _0x250908=_0x3bebcb;if(typeof _0x553573===_0x250908(0x385))this['_log']=_0x553573;}[_0x3bebcb(0x2a1)](_0x398d0d,_0x6125fd,_0x3656f5){const _0x1d8516=_0x3bebcb;if(!this[_0x1d8516(0x215)])return;let _0x36bf9e=this[_0x1d8516(0x1dd)][_0x1d8516(0x256)](_0x398d0d);!_0x36bf9e&&(_0x36bf9e={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x1d8516(0x1dd)][_0x1d8516(0x275)](_0x398d0d,_0x36bf9e)),_0x36bf9e['ms']+=_0x6125fd,_0x36bf9e[_0x1d8516(0x1f2)]+=0x1,_0x6125fd>_0x36bf9e['maxMs']&&(_0x36bf9e[_0x1d8516(0x1e2)]=_0x6125fd,_0x36bf9e[_0x1d8516(0x3d6)]=_0x3656f5||'');}[_0x3bebcb(0x3c3)](_0x4e9de5){const _0x4f7163=_0x3bebcb;if(!this['enabled']||this[_0x4f7163(0x3f8)])return;this[_0x4f7163(0x3f8)]=!![];if(_0x4e9de5)this[_0x4f7163(0x317)]=_0x4e9de5;this['_h']=_0x4026e7({'resolution':0xa}),this['_h'][_0x4f7163(0x247)](),this[_0x4f7163(0x2db)]=setInterval(()=>this[_0x4f7163(0x3b3)](),_0x56118b);if(this[_0x4f7163(0x2db)]['unref'])this[_0x4f7163(0x2db)]['unref']();}['onWindow'](_0x1f14b1){const _0x3f017f=_0x3bebcb;if(!this[_0x3f017f(0x2c7)])this['_windowCbs']=new Set();this[_0x3f017f(0x2c7)]['add'](_0x1f14b1);if(!this[_0x3f017f(0x3f8)])this['_startAdmission']();}[_0x3bebcb(0x2cf)](_0x103a85){const _0x2a7aea=_0x3bebcb;this[_0x2a7aea(0x2c7)]?.['delete'](_0x103a85);}[_0x3bebcb(0x2af)](){const _0x17fd32=_0x3bebcb;if(this[_0x17fd32(0x2ab)])return;this[_0x17fd32(0x2ab)]=!![];!this['_h']&&(this['_h']=_0x4026e7({'resolution':0xa}),this['_h'][_0x17fd32(0x247)]());const _0xc8cee9=_0x56118b;this['_admissionTimer']=setInterval(()=>{const _0x84bd13=_0x17fd32,_0x450a63=this['_h'];if(!_0x450a63)return;const _0x43cd21=_0x450a63['percentile'](0x63)/0xf4240,_0x38095c=_0x450a63[_0x84bd13(0x287)]/0xf4240,_0xa25610=_0x450a63[_0x84bd13(0x221)]/0xf4240;_0x450a63[_0x84bd13(0x27e)]();if(this[_0x84bd13(0x2c7)])for(const _0x3ff269 of this[_0x84bd13(0x2c7)]){try{_0x3ff269({'p99Ms':_0x43cd21,'maxMs':_0x38095c,'meanMs':_0xa25610,'reportMs':_0xc8cee9});}catch{}}},_0xc8cee9);if(this[_0x17fd32(0x208)][_0x17fd32(0x3e3)])this[_0x17fd32(0x208)]['unref']();}[_0x3bebcb(0x3b3)](){const _0x16835c=_0x3bebcb,_0x41ead0=this['_h'],_0x2640be=_0x41ead0['max']/0xf4240,_0x2aa1d5=_0x41ead0[_0x16835c(0x1ce)](0x63)/0xf4240,_0x5a62dd=_0x41ead0['mean']/0xf4240;_0x41ead0['reset']();const _0x242b4c=[...this[_0x16835c(0x1dd)][_0x16835c(0x20c)]()][_0x16835c(0x38b)](([_0x225cbc,_0x5f26fd])=>({'label':_0x225cbc,..._0x5f26fd}))[_0x16835c(0x3bd)]((_0x101e12,_0x412cc8)=>_0x412cc8['ms']-_0x101e12['ms'])['slice'](0x0,0x8);this[_0x16835c(0x1dd)][_0x16835c(0x2ba)]();const _0x29b0a5=_0x242b4c['reduce']((_0x2043d9,_0x386663)=>_0x2043d9+_0x386663['ms'],0x0),_0x5957af=_0x242b4c[_0x16835c(0x38b)](_0x394162=>_0x394162[_0x16835c(0x1d0)]+'='+_0x394162['ms']['toFixed'](0x0)+'ms/'+_0x394162['count']+(_0x394162[_0x16835c(0x1e2)]>0x5?_0x16835c(0x246)+_0x394162['maxMs'][_0x16835c(0x20a)](0x0)+'ms'+(_0x394162[_0x16835c(0x3d6)]?'\x20'+_0x394162[_0x16835c(0x3d6)]:'')+')':''));(_0x4f924c||_0x2640be>=_0x30e64)&&this[_0x16835c(0x317)](_0x16835c(0x3a3)+_0x56118b+_0x16835c(0x2c2)+_0x2640be[_0x16835c(0x20a)](0x0)+_0x16835c(0x3bf)+_0x2aa1d5[_0x16835c(0x20a)](0x0)+_0x16835c(0x318)+_0x5a62dd[_0x16835c(0x20a)](0x0)+_0x16835c(0x239)+_0x29b0a5[_0x16835c(0x20a)](0x0)+'ms'+(_0x5957af[_0x16835c(0x21a)]?'\x20│\x20'+_0x5957af['join']('\x20\x20'):''),{'feature':_0x16835c(0x2fb)});if(this[_0x16835c(0x2c7)])for(const _0x440f7d of this[_0x16835c(0x2c7)]){try{_0x440f7d({'p99Ms':_0x2aa1d5,'maxMs':_0x2640be,'meanMs':_0x5a62dd,'reportMs':_0x56118b});}catch{}}}[_0x3bebcb(0x227)](){const _0x31aab9=_0x3bebcb;if(this[_0x31aab9(0x2db)])clearInterval(this[_0x31aab9(0x2db)]);if(this['_h'])this['_h'][_0x31aab9(0x3e1)]();this['_timer']=null,this['_h']=null,this[_0x31aab9(0x3f8)]=![];}}const _0x19b181=new _0x4d5af7();if(_0x19b181[_0x3bebcb(0x215)])_0x19b181[_0x3bebcb(0x3c3)]();return okdbLoopMonitor={'LOOP':_0x19b181},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x376412=require$$0$1,_0x40d66b=require$$1;let _0x280b67,_0x11aadf,_0x28c07d,_0x419227,_0x1d90eb,_0x11bc3d,_0x362ad6,_0x3f25b1=![];const _0x5e875f=new Set();let _0x50c4c5=null;const _0x2e27e0=new Map();function _0x55d051(){const _0x1627d6=_0x55dd;if(_0x280b67!==undefined)return _0x280b67;_0x280b67=process.env.OKDB_DIAG==='1';if(!_0x280b67)return![];_0x11aadf=process.env.OKDB_DIAG_STACK==='1',_0x419227=Math[_0x1627d6(0x287)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x28c07d=new Array(_0x419227),_0x1d90eb=0x0,_0x11bc3d=0x0,_0x362ad6=process.env.OKDB_DIAG_DIR||null;if(_0x362ad6)try{_0x376412[_0x1627d6(0x32f)](_0x362ad6,{'recursive':!![]});}catch{}return!![];}function _0xb7a045(){return _0x280b67===undefined?_0x55d051():_0x280b67;}function _0x5d1c05(_0x2d184f,_0x429ede){const _0x17ed5c=_0x55dd;if(_0x280b67===undefined?!_0x55d051():!_0x280b67)return;let _0x2c09bb;if(_0x11aadf){const _0x4f83e1=new Error()[_0x17ed5c(0x36b)]||'';_0x2c09bb=_0x4f83e1['split']('\x0a')[_0x17ed5c(0x204)](0x3)['map'](_0x309651=>_0x309651['trim']())[_0x17ed5c(0x3d7)](Boolean)['slice'](0x0,0x8);}_0x28c07d[_0x1d90eb]={'seq':_0x11bc3d++,'t':Date[_0x17ed5c(0x3fc)](),'env':_0x2d184f,'kind':_0x429ede||_0x17ed5c(0x3be),'stack':_0x2c09bb},_0x1d90eb=(_0x1d90eb+0x1)%_0x419227;}function _0x53a055(_0x2f3609){const _0x1194d3=_0x55dd,_0x18d4ce=[];for(let _0xa35f30=0x0;_0xa35f30<_0x419227;_0xa35f30++){const _0x3c0e4b=_0x28c07d[(_0x1d90eb-0x1-_0xa35f30+_0x419227*0x2)%_0x419227];if(!_0x3c0e4b)continue;_0x18d4ce[_0x1194d3(0x39a)](_0x3c0e4b);if(_0x18d4ce[_0x1194d3(0x21a)]>=_0x2f3609)break;}return _0x18d4ce;}function _0x1c5278(_0x487644){const _0x428379=_0x55dd;try{process[_0x428379(0x3de)][_0x428379(0x3ed)](_0x487644+'\x0a');}catch{}if(_0x362ad6)try{_0x376412[_0x428379(0x1cc)](_0x40d66b[_0x428379(0x1ec)](_0x362ad6,_0x428379(0x25f)+process['pid']+'.log'),_0x487644+'\x0a');}catch{}}function _0x5a3e86(_0x2671f2){const _0x3715e1=_0x55dd,_0x1a33fe=_0x53a055(_0x2671f2);if(!_0x1a33fe[_0x3715e1(0x21a)])return _0x3715e1(0x3fa);const _0x44dca8=Date[_0x3715e1(0x3fc)]();return _0x1a33fe[_0x3715e1(0x38b)](_0xa6a50b=>{const _0x57ca4e=_0x3715e1,_0x27dd44=_0x57ca4e(0x3f2)+_0xa6a50b[_0x57ca4e(0x1ee)]+'\x20-'+(_0x44dca8-_0xa6a50b['t'])+_0x57ca4e(0x1d9)+_0xa6a50b[_0x57ca4e(0x394)]+'\x20'+_0xa6a50b[_0x57ca4e(0x2f2)];return _0xa6a50b[_0x57ca4e(0x36b)]&&_0xa6a50b[_0x57ca4e(0x36b)][_0x57ca4e(0x21a)]?_0x27dd44+_0x57ca4e(0x2a2)+_0xa6a50b[_0x57ca4e(0x36b)]['join'](_0x57ca4e(0x2a2)):_0x27dd44;})['join']('\x0a');}function _0x144a1d(_0x140ec8,_0x1b4bc2){const _0x300463=_0x55dd,_0xf6a717=_0x300463(0x284)+_0x140ec8+'\x20@\x20'+new Date()[_0x300463(0x1d5)]()+_0x300463(0x216)+process['pid']+_0x300463(0x375),_0x456962=[_0xf6a717,_0x300463(0x37b)+(_0x1b4bc2&&_0x1b4bc2[_0x300463(0x36b)]?_0x1b4bc2[_0x300463(0x36b)][_0x300463(0x315)]('\x0a')[0x0]:_0x1b4bc2),_0x300463(0x3da)+(_0x11aadf?'':_0x300463(0x22f))+':',_0x5a3e86(0x18),_0x5bb131(),'='[_0x300463(0x220)](_0xf6a717[_0x300463(0x21a)]-0x1)];_0x1c5278(_0x456962['join']('\x0a'));}function _0x51ad5e(_0x1b0f2c){const _0xb97767=_0x55dd;if(!_0xb7a045())return;const _0x3f17de=String(_0x1b0f2c&&_0x1b0f2c['message']||_0x1b0f2c||''),_0x21d915=/already closed|environment is already|invalid read txn|reset an invalid/i[_0xb97767(0x3b5)](_0x3f17de);_0x144a1d(_0x21d915?_0xb97767(0x314):'uncaughtException',_0x1b0f2c);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x21d915)return;try{console[_0xb97767(0x258)](_0x1b0f2c&&_0x1b0f2c[_0xb97767(0x36b)]?_0x1b0f2c[_0xb97767(0x36b)]:_0x1b0f2c);}catch{}process[_0xb97767(0x376)](0x1);}function _0x3d8de8(_0x370e4c){const _0x43ab3f=_0x55dd;if(!_0xb7a045())return;const _0x29e7af=String(_0x370e4c&&_0x370e4c['message']||_0x370e4c||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x43ab3f(0x3b5)](_0x29e7af)&&_0x144a1d(_0x43ab3f(0x2fc),_0x370e4c);}function _0x5bb131(){const _0x3f464f=_0x55dd,_0x19e245=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0xe1150a=![];for(const _0x8f253f of _0x5e875f){const _0x4b2b88=_0x8f253f&&_0x8f253f['_envs'];if(!_0x4b2b88)continue;for(const [_0x24d550,_0x2c2985]of _0x4b2b88){const _0x2320d1=_0x2c2985&&_0x2c2985[_0x3f464f(0x31b)]&&_0x2c2985[_0x3f464f(0x31b)][_0x3f464f(0x2e7)];if(!_0x2320d1)continue;let _0x36c237,_0x5c8240;try{_0x36c237=Atomics['load'](_0x2320d1,0x0),_0x5c8240=Atomics[_0x3f464f(0x1fe)](_0x2320d1,0x1);}catch{continue;}if(_0x36c237===0x0)continue;_0xe1150a=!![];const _0x2f103e=_0x36c237>0x0?'SWAP':_0x3f464f(0x2df),_0x5618d0=Date[_0x3f464f(0x3fc)]()-Math['abs'](_0x36c237)*0x3e8,_0x458d34=((()=>{const _0x228eb7=_0x3f464f;try{return _0x2c2985[_0x228eb7(0x321)]&&_0x2c2985[_0x228eb7(0x321)][_0x228eb7(0x243)]?_0x2c2985[_0x228eb7(0x321)][_0x228eb7(0x243)]():null;}catch{return null;}})());_0x19e245['push']('\x20\x20env='+_0x24d550+'\x20phase='+_0x2f103e+_0x3f464f(0x3a4)+_0x5618d0+_0x3f464f(0x202)+_0x5c8240+(_0x458d34?_0x3f464f(0x33a)+_0x458d34[_0x3f464f(0x3d9)]+_0x3f464f(0x200)+_0x458d34[_0x3f464f(0x2f1)]+_0x3f464f(0x1f4)+_0x458d34[_0x3f464f(0x30f)]+'}':''));}}if(!_0xe1150a)_0x19e245['push'](_0x3f464f(0x388));return _0x19e245[_0x3f464f(0x1ec)]('\x0a');}function _0x16a629(){const _0x3150cc=_0x55dd;if(!_0xb7a045())return;const _0x1c6374=Math[_0x3150cc(0x287)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x15ed38=Date[_0x3150cc(0x3fc)]();for(const _0x1ea42a of _0x5e875f){const _0x292082=_0x1ea42a&&_0x1ea42a['_envs'];if(!_0x292082)continue;for(const [_0x1a2c46,_0x2ea26d]of _0x292082){const _0x8302dc=_0x2ea26d&&_0x2ea26d[_0x3150cc(0x31b)]&&_0x2ea26d[_0x3150cc(0x31b)]['view'];if(!_0x8302dc)continue;let _0x303ef4;try{_0x303ef4=Atomics['load'](_0x8302dc,0x0);}catch{continue;}const _0x22c844=_0x1ea42a[_0x3150cc(0x1e7)]+'|'+_0x1a2c46;if(_0x303ef4<=0x0){_0x2e27e0['delete'](_0x22c844);continue;}const _0x250dfc=_0x15ed38-_0x303ef4*0x3e8,_0xc02f2=_0x2e27e0[_0x3150cc(0x256)](_0x22c844);if(_0x250dfc<_0x1c6374)continue;if(_0xc02f2&&_0x15ed38-_0xc02f2[_0x3150cc(0x2c5)]<_0x1c6374)continue;_0x2e27e0[_0x3150cc(0x275)](_0x22c844,{'firstTs':_0xc02f2?_0xc02f2['firstTs']:_0x303ef4,'dumpedAt':_0x15ed38});const _0x216b05=_0x3150cc(0x3a7)+_0x250dfc+_0x3150cc(0x37e)+_0x1a2c46+_0x3150cc(0x3eb)+new Date()[_0x3150cc(0x1d5)]()+_0x3150cc(0x216)+process[_0x3150cc(0x2c8)]+_0x3150cc(0x375);_0x1c5278([_0x216b05,_0x5bb131(),'='[_0x3150cc(0x220)](_0x216b05[_0x3150cc(0x21a)]-0x1)][_0x3150cc(0x1ec)]('\x0a'));}}}function _0x5a3795(){const _0x4cb95f=_0x55dd;if(!_0xb7a045()||_0x3f25b1)return;_0x3f25b1=!![],process[_0x4cb95f(0x377)](_0x4cb95f(0x357),_0x51ad5e),process[_0x4cb95f(0x377)]('unhandledRejection',_0x3d8de8);const _0x566ff2=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x50c4c5=setInterval(_0x16a629,_0x566ff2);if(_0x50c4c5[_0x4cb95f(0x3e3)])_0x50c4c5[_0x4cb95f(0x3e3)]();}function _0x333d65(_0x4c7c56){const _0x3ffdb5=_0x55dd;if(!_0xb7a045()||!_0x4c7c56)return;_0x5e875f[_0x3ffdb5(0x342)](_0x4c7c56),_0x5a3795();}function _0x3bdcd0(_0x38070d){const _0x8a3f8e=_0x55dd;_0x5e875f[_0x8a3f8e(0x2aa)](_0x38070d);}function _0xe3f763(){const _0x391c89=_0x55dd;if(!_0xb7a045())return{'enabled':![],'hint':_0x391c89(0x1f1)};return{'enabled':!![],'stackCapture':!!_0x11aadf,'recentWrites':_0x53a055(0x10),'drain':_0x5bb131()};}return okdbDiag={'isEnabled':_0xb7a045,'recordWrite':_0x5d1c05,'installDiag':_0x5a3795,'registerOkdb':_0x333d65,'unregisterOkdb':_0x3bdcd0,'snapshot':_0xe3f763},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x19bb83=_0x3b4fb0;if(hasRequiredOkdbWriter)return okdbWriter[_0x19bb83(0x262)];hasRequiredOkdbWriter=0x1;const {performance:_0x50317d}=require$$0$2,_0x57f24b=requireOkdbDiag(),_0x26f1c0=process.env.OKDB_COMMIT_MODE===_0x19bb83(0x3ab);class _0x59fcac{constructor(_0x29cd12){const _0x1bb2ea=_0x19bb83;this[_0x1bb2ea(0x394)]=_0x29cd12,this[_0x1bb2ea(0x39b)]=new Set(),this['_enqueuedAt']=new Map(),this[_0x1bb2ea(0x254)]=0x0,this[_0x1bb2ea(0x2de)]=[],this[_0x1bb2ea(0x2e6)]=[],this[_0x1bb2ea(0x235)]=Math[_0x1bb2ea(0x287)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x1bb2ea(0x3f0)]=0x0,this[_0x1bb2ea(0x260)]=[],this['_bpParkedTotal']=0x0,this[_0x1bb2ea(0x2b5)]=null,this['_heldTotal']=0x0,this['_nestedTotal']=0x0,this['_nestedWarned']=![];}async[_0x19bb83(0x306)](_0x131516,_0x45f67d){const _0x3698a0=_0x19bb83;if(_0x57f24b[_0x3698a0(0x26b)]())_0x57f24b[_0x3698a0(0x2cd)](this[_0x3698a0(0x394)]?.['name'],_0x45f67d);if(this[_0x3698a0(0x329)]){const _0x1f0cc8=new Error(_0x3698a0(0x1d2));_0x1f0cc8[_0x3698a0(0x1d1)]=_0x3698a0(0x303);throw _0x1f0cc8;}if(this[_0x3698a0(0x235)]>0x0){let _0x1661e4=![];while(this[_0x3698a0(0x3f0)]>=this[_0x3698a0(0x235)]&&!this[_0x3698a0(0x329)]){!_0x1661e4&&(_0x1661e4=!![],this[_0x3698a0(0x31f)]++),await new Promise(_0x6927c2=>this[_0x3698a0(0x260)][_0x3698a0(0x39a)](_0x6927c2));}if(this[_0x3698a0(0x329)]){const _0xe5af64=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0xe5af64[_0x3698a0(0x1d1)]=_0x3698a0(0x303);throw _0xe5af64;}}this[_0x3698a0(0x3f0)]++;const _0x46bf0c=this[_0x3698a0(0x394)]['_coordinator'];for(;;){while(this[_0x3698a0(0x2b5)])await this[_0x3698a0(0x2b5)];if(_0x46bf0c)await _0x46bf0c[_0x3698a0(0x368)]();if(!this['_held'])break;if(_0x46bf0c)_0x46bf0c['afterWrite']();}if(this[_0x3698a0(0x329)]){if(_0x46bf0c)_0x46bf0c[_0x3698a0(0x32e)]();this['_outstanding']--;if(this[_0x3698a0(0x260)]['length']&&this['_outstanding']<this[_0x3698a0(0x235)])this[_0x3698a0(0x260)][_0x3698a0(0x1cd)]()();const _0x15578c=new Error(_0x3698a0(0x1d2));_0x15578c['code']=_0x3698a0(0x303);throw _0x15578c;}const _0x56727f=_0x50317d[_0x3698a0(0x3fc)]();if(_0x26f1c0)try{const _0x214395=this['env']['db'][_0x3698a0(0x374)](_0x131516);this[_0x3698a0(0x254)]++;if(this['_durs'][_0x3698a0(0x39a)](_0x50317d[_0x3698a0(0x3fc)]()-_0x56727f)>0x100)this[_0x3698a0(0x2de)][_0x3698a0(0x1cd)]();if(this[_0x3698a0(0x2e6)][_0x3698a0(0x39a)](_0x50317d[_0x3698a0(0x3fc)]())>0x800)this[_0x3698a0(0x2e6)][_0x3698a0(0x1cd)]();return _0x214395;}finally{this[_0x3698a0(0x3f0)]--;if(this['_bpWaiters'][_0x3698a0(0x21a)]&&this['_outstanding']<this[_0x3698a0(0x235)])this[_0x3698a0(0x260)]['shift']()();if(_0x46bf0c)_0x46bf0c[_0x3698a0(0x32e)]();}let _0x3780b4=null;const _0x158569=()=>{const _0x4ca617=_0x3698a0,_0x3fad41=_0x131516();if(_0x3fad41&&typeof _0x3fad41[_0x4ca617(0x2e5)]===_0x4ca617(0x385)&&!_0x3780b4){this[_0x4ca617(0x1d6)]++;let _0x32335c;const _0xd26ccf=new Promise(_0x5382e0=>_0x32335c=_0x5382e0);this[_0x4ca617(0x2b5)]=_0xd26ccf,_0x3780b4=()=>{const _0x3870fa=_0x4ca617;if(this[_0x3870fa(0x2b5)]===_0xd26ccf)this[_0x3870fa(0x2b5)]=null;_0x32335c();};}return _0x3fad41;};let _0x487903;try{_0x487903=this[_0x3698a0(0x394)]['db'][_0x3698a0(0x2f0)](_0x158569);}catch(_0x47e93a){_0x487903=Promise[_0x3698a0(0x282)](_0x47e93a);}(!_0x487903||typeof _0x487903[_0x3698a0(0x2e5)]!==_0x3698a0(0x385))&&(this['_nestedTotal']++,!this['_nestedWarned']&&(this['_nestedWarned']=!![],console[_0x3698a0(0x36e)](_0x3698a0(0x21c)+(this[_0x3698a0(0x394)]?.['name']??'?')+_0x3698a0(0x2f8))),_0x487903=Promise[_0x3698a0(0x328)](_0x487903));const _0x23ba80=()=>{if(_0x3780b4)_0x3780b4();};_0x487903['then'](_0x23ba80,_0x23ba80),this['_inflight'][_0x3698a0(0x342)](_0x487903),this[_0x3698a0(0x3a8)][_0x3698a0(0x275)](_0x487903,_0x56727f);const _0x255be3=()=>{const _0x20301c=_0x3698a0;this[_0x20301c(0x39b)]['delete'](_0x487903),this[_0x20301c(0x3a8)][_0x20301c(0x2aa)](_0x487903),this['_committed']++,this[_0x20301c(0x3f0)]--;this[_0x20301c(0x260)][_0x20301c(0x21a)]&&this[_0x20301c(0x3f0)]<this[_0x20301c(0x235)]&&this[_0x20301c(0x260)][_0x20301c(0x1cd)]()();if(this[_0x20301c(0x2de)]['push'](_0x50317d[_0x20301c(0x3fc)]()-_0x56727f)>0x100)this[_0x20301c(0x2de)][_0x20301c(0x1cd)]();if(this[_0x20301c(0x2e6)]['push'](_0x50317d[_0x20301c(0x3fc)]())>0x800)this[_0x20301c(0x2e6)][_0x20301c(0x1cd)]();};_0x487903[_0x3698a0(0x2e5)](_0x255be3,_0x255be3);try{return await _0x487903;}finally{if(_0x46bf0c)_0x46bf0c[_0x3698a0(0x32e)]();}}['status'](){const _0xf0ecbb=_0x19bb83,_0x3c4db0=_0x50317d['now']();let _0x258435=0x0;for(const _0x4132de of this['_enqueuedAt'][_0xf0ecbb(0x3fe)]()){const _0x395b47=_0x3c4db0-_0x4132de;if(_0x395b47>_0x258435)_0x258435=_0x395b47;}let _0x3c569e=0x0;for(let _0x50ac41=this[_0xf0ecbb(0x2e6)][_0xf0ecbb(0x21a)]-0x1;_0x50ac41>=0x0;_0x50ac41--){if(_0x3c4db0-this[_0xf0ecbb(0x2e6)][_0x50ac41]>0x3e8)break;_0x3c569e++;}let _0x5fd250=0x0;if(this[_0xf0ecbb(0x2de)][_0xf0ecbb(0x21a)]){const _0x592137=[...this[_0xf0ecbb(0x2de)]][_0xf0ecbb(0x3bd)]((_0x49f96a,_0x2a4bac)=>_0x49f96a-_0x2a4bac);_0x5fd250=_0x592137[Math[_0xf0ecbb(0x249)](_0x592137[_0xf0ecbb(0x21a)]-0x1,Math[_0xf0ecbb(0x2b6)](_0x592137[_0xf0ecbb(0x21a)]*0.99))];}return{'depth':this['_inflight']['size'],'oldestPendingMs':Math['round'](_0x258435),'committed':this[_0xf0ecbb(0x254)],'commitsPerSec':_0x3c569e,'commitP99Ms':Math[_0xf0ecbb(0x276)](_0x5fd250),'parkedNow':this[_0xf0ecbb(0x260)][_0xf0ecbb(0x21a)],'parkedTotal':this['_bpParkedTotal'],'highWater':this['_highWater']};}[_0x19bb83(0x224)](){const _0x27c026=_0x19bb83,_0x537509=_0x50317d[_0x27c026(0x3fc)]();return[...this[_0x27c026(0x3a8)]['values']()]['map'](_0x1440f4=>Math[_0x27c026(0x276)](_0x537509-_0x1440f4))[_0x27c026(0x3bd)]((_0x4f442b,_0x3524ad)=>_0x3524ad-_0x4f442b);}[_0x19bb83(0x32a)](){const _0x21d9fb=_0x19bb83;this[_0x21d9fb(0x329)]=!![];for(const _0x4d8df8 of this['_bpWaiters'][_0x21d9fb(0x3b0)](0x0))_0x4d8df8();}async[_0x19bb83(0x242)](){const _0x7b708e=_0x19bb83;let _0xc1017f=0x0;while(this[_0x7b708e(0x39b)][_0x7b708e(0x261)]&&_0xc1017f++<0x3e8){await Promise[_0x7b708e(0x2da)]([...this[_0x7b708e(0x39b)]]);}}async[_0x19bb83(0x281)](_0x4efd5b,_0x4386d0,_0x3ca386,_0x5042cd){const _0x51c34b=_0x19bb83;return this[_0x51c34b(0x306)](()=>{const _0x5739b5=_0x51c34b;if(_0x5042cd===undefined)_0x4efd5b[_0x5739b5(0x3f4)](_0x4386d0,_0x3ca386);else _0x4efd5b[_0x5739b5(0x3f4)](_0x4386d0,_0x3ca386,_0x5042cd);},_0x51c34b(0x372));}async['remove'](_0x53c6fb,_0x55472b){const _0x1deed5=_0x19bb83;return this['transaction'](()=>_0x53c6fb[_0x1deed5(0x237)](_0x55472b),_0x1deed5(0x28e));}}async function _0x58fba9(_0x2cbde8,_0x2e2cb7){const _0x43d66a=_0x19bb83;if(_0x2e2cb7==null)_0x2e2cb7=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x51151c=_0x2cbde8?.['flushed'];if(!_0x51151c||typeof _0x51151c[_0x43d66a(0x2e5)]!==_0x43d66a(0x385))return;await Promise['race']([Promise['resolve'](_0x51151c)['catch'](()=>{}),new Promise(_0x3d6a8c=>{const _0x5b7d9b=_0x43d66a,_0x1f7eb3=setTimeout(_0x3d6a8c,_0x2e2cb7);if(_0x1f7eb3[_0x5b7d9b(0x3e3)])_0x1f7eb3['unref']();})]);}catch{}}function _0x188616(_0x575c72){const _0xb8a735=_0x19bb83;if(_0x26f1c0)return Promise[_0xb8a735(0x328)]();const _0x24f39d=_0x575c72?.[_0xb8a735(0x351)];return _0x24f39d&&typeof _0x24f39d[_0xb8a735(0x2e5)]===_0xb8a735(0x385)?_0x24f39d:Promise[_0xb8a735(0x328)]();}return okdbWriter['exports']=_0x59fcac,okdbWriter['exports'][_0x19bb83(0x2d9)]=_0x58fba9,okdbWriter['exports']['committed']=_0x188616,okdbWriter[_0x19bb83(0x262)][_0x19bb83(0x1f8)]=_0x26f1c0,okdbWriter[_0x19bb83(0x262)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x150bc8=_0x3b4fb0;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x5b1379=require$$0$3,{SYNC_COMMITS:_0x184540}=requireOkdbWriter(),_0x236a6e=_0x150bc8(0x35c);class _0x389445{constructor(_0x438b56,_0x20568b,_0x4995bb){const _0x51fbd5=_0x150bc8;this[_0x51fbd5(0x3b4)]=_0x438b56,this['_key']=_0x20568b,this[_0x51fbd5(0x228)]=_0x4995bb,this[_0x51fbd5(0x3d8)]=![],this[_0x51fbd5(0x232)]=null,this['_heartbeatInFlight']=null;}[_0x150bc8(0x2e0)](){const _0x4381bb=_0x150bc8;if(this[_0x4381bb(0x3d8)])return![];try{const _0x11c8f4=this['_lock'][_0x4381bb(0x373)]()[_0x4381bb(0x256)](this[_0x4381bb(0x2ae)]);if(!_0x11c8f4||_0x11c8f4[_0x4381bb(0x253)]!==this[_0x4381bb(0x228)])return![];const _0x1246aa=_0x11c8f4['updatedAt']??_0x11c8f4[_0x4381bb(0x253)];if(_0x1246aa+_0x11c8f4[_0x4381bb(0x1d7)]<Date[_0x4381bb(0x3fc)]())return![];return!![];}catch{return!this['_released'];}}[_0x150bc8(0x28d)](){const _0x1b41c6=_0x150bc8;if(this['_released'])return null;try{return this[_0x1b41c6(0x3b4)]['_db']()[_0x1b41c6(0x256)](this['_key'])??null;}catch{return null;}}async[_0x150bc8(0x2d7)](_0x53ead9){const _0x3c407f=_0x150bc8;if(this[_0x3c407f(0x3d8)])return;try{const _0x9a8960=this[_0x3c407f(0x3b4)]['_db']()[_0x3c407f(0x256)](this[_0x3c407f(0x2ae)]);if(!_0x9a8960||_0x9a8960[_0x3c407f(0x253)]!==this['_acquiredAt'])return;if(_0x184540)this[_0x3c407f(0x3b4)][_0x3c407f(0x373)]()[_0x3c407f(0x3f4)](this[_0x3c407f(0x2ae)],{..._0x9a8960,'ttlMs':_0x9a8960[_0x3c407f(0x1d7)]+_0x53ead9});else await this['_lock']['_db']()[_0x3c407f(0x281)](this[_0x3c407f(0x2ae)],{..._0x9a8960,'ttlMs':_0x9a8960[_0x3c407f(0x1d7)]+_0x53ead9});}catch{}}async[_0x150bc8(0x2b0)](){const _0x455de0=_0x150bc8;if(this[_0x455de0(0x3d8)])return;if(this[_0x455de0(0x22e)])try{await this[_0x455de0(0x22e)];}catch{}clearInterval(this[_0x455de0(0x232)]),this['_heartbeatTimer']=null,this[_0x455de0(0x3d8)]=!![];try{const _0x48332b=this[_0x455de0(0x3b4)][_0x455de0(0x373)]()[_0x455de0(0x256)](this['_key']);if(_0x48332b&&_0x48332b['acquiredAt']===this[_0x455de0(0x228)]){if(_0x184540)this[_0x455de0(0x3b4)][_0x455de0(0x373)]()['removeSync'](this['_key']);else await this[_0x455de0(0x3b4)][_0x455de0(0x373)]()['remove'](this['_key']);}}catch{}}[_0x150bc8(0x2a6)](_0x57fdf0,_0xea91a8){const _0x48c7f9=_0x150bc8,_0x4641b0=_0xea91a8??Math[_0x48c7f9(0x2b6)](_0x57fdf0/0x3);this[_0x48c7f9(0x232)]=setInterval(()=>{const _0x2adabb=_0x48c7f9;if(this[_0x2adabb(0x3d8)])return;this[_0x2adabb(0x22e)]=((async()=>{const _0x12b537=_0x2adabb;try{const _0x27c514=this[_0x12b537(0x3b4)]['_db']()[_0x12b537(0x256)](this['_key']);if(!_0x27c514||_0x27c514[_0x12b537(0x253)]!==this[_0x12b537(0x228)]){this[_0x12b537(0x3d8)]=!![],clearInterval(this['_heartbeatTimer']),this[_0x12b537(0x232)]=null;return;}if(_0x184540)this[_0x12b537(0x3b4)]['_db']()[_0x12b537(0x3f4)](this['_key'],{..._0x27c514,'updatedAt':Date['now']()});else await this[_0x12b537(0x3b4)][_0x12b537(0x373)]()['put'](this[_0x12b537(0x2ae)],{..._0x27c514,'updatedAt':Date[_0x12b537(0x3fc)]()});}catch{}this[_0x12b537(0x22e)]=null;})());},_0x4641b0);if(this[_0x48c7f9(0x232)][_0x48c7f9(0x3e3)])this[_0x48c7f9(0x232)]['unref']();}}class _0x18bfa6{constructor(_0x3dfa6f,{namespace:_0x395028,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x520cc3=_0x150bc8;this['_rawDb']=_0x3dfa6f,this[_0x520cc3(0x33b)]=_0x395028,this[_0x520cc3(0x1d7)]=ttlMs,this[_0x520cc3(0x302)]=heartbeatMs,this[_0x520cc3(0x3fd)]=null;}[_0x150bc8(0x373)](){const _0x43b9bb=_0x150bc8;return!this['_lockDb']&&(this[_0x43b9bb(0x3fd)]=this[_0x43b9bb(0x2b2)][_0x43b9bb(0x3d1)](_0x236a6e,{'dupSort':![]})),this[_0x43b9bb(0x3fd)];}[_0x150bc8(0x213)](){const _0x366408=_0x150bc8;return!this[_0x366408(0x39f)]&&(this[_0x366408(0x39f)]=this['_rawDb']['openDB'](_0x236a6e+_0x366408(0x345),{'dupSort':![]})),this[_0x366408(0x39f)];}[_0x150bc8(0x2ae)](_0x44c454){return this['namespace']+':'+_0x44c454;}[_0x150bc8(0x2f6)](_0x446bb9){const _0x37d67f=_0x150bc8;try{_0x184540?this['_wantDb']()['putSync'](this[_0x37d67f(0x2ae)](_0x446bb9),Date[_0x37d67f(0x3fc)]()):this['_wantDb']()[_0x37d67f(0x281)](this[_0x37d67f(0x2ae)](_0x446bb9),Date[_0x37d67f(0x3fc)]())?.[_0x37d67f(0x299)]?.(()=>{});}catch{}}['isWanted'](_0x1f167c,_0x1f7ac3=0x3e8){const _0x2c1d82=_0x150bc8;try{const _0x4fb92c=this[_0x2c1d82(0x213)]()[_0x2c1d82(0x256)](this['_key'](_0x1f167c));return typeof _0x4fb92c===_0x2c1d82(0x3fb)&&Date[_0x2c1d82(0x3fc)]()-_0x4fb92c<_0x1f7ac3;}catch{return![];}}['_isStale'](_0x231d83){const _0x207782=_0x150bc8,_0x38961e=_0x231d83['updatedAt']??_0x231d83[_0x207782(0x253)];return _0x38961e+_0x231d83[_0x207782(0x1d7)]<Date[_0x207782(0x3fc)]();}static[_0x150bc8(0x23c)](_0x5f118c){const _0x2e4ed9=_0x150bc8,_0x2560d1=_0x5f118c?.[_0x2e4ed9(0x28d)];if(!_0x2560d1||typeof _0x2560d1['pid']!==_0x2e4ed9(0x3fb))return![];if(_0x2560d1[_0x2e4ed9(0x2bf)]!==_0x5b1379[_0x2e4ed9(0x2bf)]())return![];if(_0x2560d1['pid']===process['pid'])return![];try{return process[_0x2e4ed9(0x3ef)](_0x2560d1[_0x2e4ed9(0x2c8)],0x0),![];}catch(_0x494018){return _0x494018[_0x2e4ed9(0x1d1)]===_0x2e4ed9(0x3c7);}}async[_0x150bc8(0x354)](_0x482f47,_0x57faf2={},_0x4dded4={}){const _0x461185=_0x150bc8,_0x49ff28=this[_0x461185(0x2ae)](_0x482f47),_0xe3b514=_0x4dded4[_0x461185(0x1d7)]??this[_0x461185(0x1d7)],_0x56e45e=Date[_0x461185(0x3fc)](),_0x4ca242={'holder':{'pid':process[_0x461185(0x2c8)],'hostname':_0x5b1379['hostname'](),..._0x57faf2},'acquiredAt':_0x56e45e,'updatedAt':_0x56e45e,'ttlMs':_0xe3b514};let _0x18d5fe=![],_0x481c79=null;try{const _0x378306=()=>{const _0xcb6356=_0x461185,_0x2f4f7f=this[_0xcb6356(0x373)]()[_0xcb6356(0x256)](_0x49ff28);if(_0x2f4f7f&&!this['_isStale'](_0x2f4f7f)&&!_0x18bfa6[_0xcb6356(0x23c)](_0x2f4f7f)){const _0x21afc8=_0x57faf2[_0xcb6356(0x3f5)]!=null&&_0x2f4f7f[_0xcb6356(0x28d)][_0xcb6356(0x2c8)]===process['pid']&&_0x2f4f7f[_0xcb6356(0x28d)][_0xcb6356(0x3f5)]===_0x57faf2['processorId'];if(!_0x21afc8){_0x18d5fe=![],_0x481c79=_0x2f4f7f;return;}_0x4ca242['acquiredAt']<=_0x2f4f7f[_0xcb6356(0x253)]&&(_0x4ca242['acquiredAt']=_0x2f4f7f[_0xcb6356(0x253)]+0x1,_0x4ca242[_0xcb6356(0x2ef)]=_0x4ca242['acquiredAt']);}this[_0xcb6356(0x373)]()[_0xcb6356(0x281)](_0x49ff28,_0x4ca242),_0x18d5fe=!![],_0x481c79=_0x4ca242;};if(_0x184540)this[_0x461185(0x373)]()[_0x461185(0x374)](_0x378306);else await this['_db']()[_0x461185(0x2f0)](_0x378306);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x18d5fe)return{'acquired':![],'handle':null,'current':_0x481c79};const _0x8c1e51=new _0x389445(this,_0x49ff28,_0x4ca242[_0x461185(0x253)]);return _0x8c1e51[_0x461185(0x2a6)](_0xe3b514,this[_0x461185(0x302)]),{'acquired':!![],'handle':_0x8c1e51,'current':_0x481c79};}[_0x150bc8(0x231)](_0x1bf221){const _0x1d0336=_0x150bc8;try{return this[_0x1d0336(0x373)]()[_0x1d0336(0x256)](this[_0x1d0336(0x2ae)](_0x1bf221))??null;}catch{return null;}}[_0x150bc8(0x348)](){const _0x181d1f=_0x150bc8,_0x20df21=this[_0x181d1f(0x33b)]+':',_0x542ca9=[];try{for(const {key:_0x1831a1,value:_0x5c0983}of this[_0x181d1f(0x373)]()[_0x181d1f(0x3cb)]({'start':_0x20df21,'end':_0x20df21+'\xff'})){typeof _0x1831a1===_0x181d1f(0x361)&&_0x1831a1[_0x181d1f(0x1f7)](_0x20df21)&&_0x542ca9[_0x181d1f(0x39a)]({'id':_0x1831a1[_0x181d1f(0x204)](_0x20df21['length']),'entry':_0x5c0983});}}catch{}return _0x542ca9;}static[_0x150bc8(0x23b)](_0x283301){const _0x5efcd8=_0x150bc8,_0x15389f=[];try{const _0x4a47db=_0x283301[_0x5efcd8(0x3d1)](_0x236a6e,{'dupSort':![]});for(const {key:_0x10f9e2,value:_0x4ae68f}of _0x4a47db[_0x5efcd8(0x3cb)]({})){if(typeof _0x10f9e2!=='string')continue;const _0x2fa608=_0x10f9e2[_0x5efcd8(0x3c2)](':');if(_0x2fa608<0x1)continue;_0x15389f[_0x5efcd8(0x39a)]({'namespace':_0x10f9e2['slice'](0x0,_0x2fa608),'id':_0x10f9e2[_0x5efcd8(0x204)](_0x2fa608+0x1),'entry':_0x4ae68f});}}catch{}return _0x15389f;}}return okdbLock={'OKDBLock':_0x18bfa6},okdbLock;}var version=_0x3b4fb0(0x35d),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x12bded=_0x3b4fb0;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x11c5cb=require$$0$3,_0x46a014=require$$1$1,_0x4b67b2=require$$2,{LOOP:_0x267e86}=requireOkdbLoopMonitor(),{OKDBLock:_0x123333}=requireOkdbLock(),{SYNC_COMMITS:_0x4c3ede}=requireOkdbWriter(),_0x361773=_0x12bded(0x1cb),_0x616751='node',_0x493b20=_0x12bded(0x268),_0x2cba6b='~processes:cmd',_0x509992=(_0x5d60c3,_0x2dbbb1)=>_0x5d60c3+':'+_0x2dbbb1,_0x55b4bd=(_0x226b16,_0x5dd48e)=>_0x226b16+'::'+_0x5dd48e,_0x2bfa24=(_0x33d6fc,_0x4b03bc)=>_0x33d6fc+'/'+_0x4b03bc,_0x4563a6=(_0x16a6d1,_0x318969)=>_0x16a6d1+'#'+_0x318969,_0x263ca6=_0xe016d9=>{const _0x14469e=_0x12bded;if(_0xe016d9?.[_0x14469e(0x1f3)])return _0xe016d9[_0x14469e(0x1f3)];const _0x4e2f7a=_0xe016d9?.[_0x14469e(0x3c0)];return typeof _0x4e2f7a===_0x14469e(0x361)&&_0x4e2f7a[_0x14469e(0x2ed)]('#')?_0x4e2f7a[_0x14469e(0x204)](0x0,_0x4e2f7a[_0x14469e(0x3c2)]('#')):_0x4e2f7a;},_0x84f429=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x66d92d=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4d9548=_0x84f429*0x3,_0x343193=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x4d9548*0x14),_0x481f2e=[_0x12bded(0x362),'processor:ready','processor:retry',_0x12bded(0x3d5),_0x12bded(0x36c),'processor:resumed'];let _0x57c9d1=null;function _0x1fc979(){const _0x2a7cdc=_0x12bded;if(_0x57c9d1==null)_0x57c9d1=Math[_0x2a7cdc(0x276)]((Date[_0x2a7cdc(0x3fc)]()-process[_0x2a7cdc(0x1d8)]()*0x3e8)/0x3e8)*0x3e8;return _0x57c9d1;}function _0x5f3d32(_0x2cda97){const _0x57a391=_0x12bded;if(process.env.OKDB_PROCESS_KILL===_0x57a391(0x29f))return![];if(_0x2cda97?.['options']?.[_0x57a391(0x2c6)]&&typeof _0x2cda97[_0x57a391(0x344)][_0x57a391(0x2c6)]===_0x57a391(0x234)&&_0x2cda97['options'][_0x57a391(0x2c6)][_0x57a391(0x3ef)]===![])return![];return!![];}function _0x32283e(_0x4c13d2,_0x5dcf5d){const _0x253bc1=_0x12bded,_0x1d9a63=!!_0x5dcf5d?.[_0x253bc1(0x1d4)];switch(_0x4c13d2){case _0x253bc1(0x35f):return{'controllable':_0x1d9a63,'decommissionable':![],'killable':!![],'killConfirm':_0x253bc1(0x3a6)};case _0x253bc1(0x312):case'standalone':return{'controllable':_0x1d9a63,'decommissionable':![],'killable':!![],'killConfirm':_0x253bc1(0x24e)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x253bc1(0x319):case _0x253bc1(0x3b6):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1058ee{constructor(_0x2fc28c){const _0x5c33c5=_0x12bded;this[_0x5c33c5(0x292)]=_0x2fc28c,this[_0x5c33c5(0x378)]=null,this[_0x5c33c5(0x1ff)]=null,this[_0x5c33c5(0x27f)]=new Map(),this[_0x5c33c5(0x36a)]=null,this[_0x5c33c5(0x2b3)]=![],this['_isReader']=![],this['_processStartedAt']=_0x1fc979(),this[_0x5c33c5(0x255)]=_0x509992(process['pid'],this['_processStartedAt']),this[_0x5c33c5(0x387)]=_0x4b67b2[_0x5c33c5(0x25b)]()[_0x5c33c5(0x204)](0x0,0x8),this[_0x5c33c5(0x2b7)]=_0x4563a6(this['_selfKey'],this[_0x5c33c5(0x387)]),this['_startedAt']=Date[_0x5c33c5(0x3fc)](),this[_0x5c33c5(0x31e)]=null,this[_0x5c33c5(0x2d4)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0x5c33c5(0x23d)]=null,this['_onTick']=null,this[_0x5c33c5(0x346)]=0x0,this['_ownMeta']={},this[_0x5c33c5(0x2f4)]=new Map(),this['_lastCpuUsage']=process[_0x5c33c5(0x1fc)](),this[_0x5c33c5(0x2d3)]=Date[_0x5c33c5(0x3fc)](),this[_0x5c33c5(0x1de)]=0x0,this[_0x5c33c5(0x358)]=new Map();}get[_0x12bded(0x251)](){const _0xd2aa93=_0x12bded;return this[_0xd2aa93(0x255)];}get[_0x12bded(0x2f7)](){const _0x5894a1=_0x12bded;return this[_0x5894a1(0x2b7)];}['_caps'](_0x179bee,_0x1b6266){const _0x1b2fcb=_0x12bded,_0x1eaeff=_0x32283e(_0x179bee,_0x1b6266);if(_0x1eaeff[_0x1b2fcb(0x2f3)]&&!_0x5f3d32(this['okdb']))return{..._0x1eaeff,'killable':![],'killConfirm':undefined};return _0x1eaeff;}[_0x12bded(0x1e3)](){const _0x4ed892=_0x12bded;return!!this[_0x4ed892(0x378)];}['setOwnMeta'](_0x564659){const _0x2f0a1d=_0x12bded;Object[_0x2f0a1d(0x271)](this[_0x2f0a1d(0x2e4)],_0x564659||{});}[_0x12bded(0x283)](_0x124120){if(_0x124120)this['_listenAddr']=_0x124120;}[_0x12bded(0x27a)](_0x5a8e13={}){const _0x82c46a=_0x12bded;return this[_0x82c46a(0x292)][_0x82c46a(0x20b)](_0x5a8e13);}[_0x12bded(0x3e0)](){const _0x56164a=_0x12bded,_0x3af40f={};let _0x2b41d6=0x0,_0x1021d7=0x0;const _0x1f0e25=new Set();for(const _0x5884ea of this[_0x56164a(0x332)]()){_0x1021d7++;const _0x23f2e2=_0x5884ea[_0x56164a(0x2dd)];if(!_0x23f2e2)continue;if(_0x23f2e2[_0x56164a(0x379)])_0x2b41d6++;for(const _0x1874aa of _0x23f2e2[_0x56164a(0x1d4)]||[]){if(!['single','fanout'][_0x56164a(0x2ed)](_0x1874aa['mode']))continue;(_0x1874aa[_0x56164a(0x230)]==='online'||_0x1874aa[_0x56164a(0x230)]===_0x56164a(0x335))&&_0x1874aa[_0x56164a(0x39e)]&&_0x1f0e25[_0x56164a(0x342)]((_0x1874aa[_0x56164a(0x394)]||'default')+':'+_0x1874aa[_0x56164a(0x39e)]);const _0x8d04a7=_0x1874aa[_0x56164a(0x394)]||_0x56164a(0x298);(_0x3af40f[_0x8d04a7]||=[])[_0x56164a(0x39a)]({..._0x1874aa,'env':_0x8d04a7,'owner':{'pid':_0x5884ea[_0x56164a(0x2c8)]??null,'kind':_0x5884ea[_0x56164a(0x2f2)]??null}});}}for(const [_0x11f7f7,_0x31adf7]of Object[_0x56164a(0x20c)](_0x3af40f)){for(const _0x2a0139 of _0x31adf7){if(_0x2a0139[_0x56164a(0x3e6)]===_0x56164a(0x307)&&!_0x2a0139[_0x56164a(0x34b)]){const _0x11b228=_0x11f7f7+':'+(_0x2a0139[_0x56164a(0x39e)]??'');if(!_0x1f0e25['has'](_0x11b228))_0x2a0139[_0x56164a(0x21b)]=!![];}}}return{'envs':_0x3af40f,'policy':null,'participation':{'participating':_0x2b41d6,'total':_0x1021d7},'source':'workers'};}[_0x12bded(0x2ca)](){const _0x159c8b=_0x12bded,_0x18383c=_0x1eaf5f=>{const _0x467bea=_0x55dd;if(_0x1eaf5f[_0x467bea(0x230)]===_0x467bea(0x1e5)||_0x1eaf5f[_0x467bea(0x230)]===_0x467bea(0x335)||_0x1eaf5f['state']===_0x467bea(0x258))return 0x3;if(_0x1eaf5f[_0x467bea(0x34b)])return 0x1;return 0x2;},_0x51e040=new Map();for(const _0x3a0e5b of this[_0x159c8b(0x332)]()){for(const _0x570263 of _0x3a0e5b['processing']?.[_0x159c8b(0x1d4)]||[]){const _0x4befac={..._0x570263,'owner':{'pid':_0x3a0e5b[_0x159c8b(0x2c8)]??null,'kind':_0x3a0e5b['kind']??null,'host':_0x3a0e5b['host']??null}},_0x48a8d1=_0x570263[_0x159c8b(0x3e6)]===_0x159c8b(0x307)?'1ofN:'+(_0x570263[_0x159c8b(0x394)]??'')+'::'+(_0x570263[_0x159c8b(0x39e)]??_0x570263[_0x159c8b(0x2d8)]??_0x570263['id']):'inst:'+(_0x3a0e5b[_0x159c8b(0x3c0)]??_0x3a0e5b[_0x159c8b(0x1f3)]??'')+'::'+(_0x570263[_0x159c8b(0x394)]??'')+'::'+_0x570263['id'],_0x277c91=_0x51e040[_0x159c8b(0x256)](_0x48a8d1);if(!_0x277c91||_0x18383c(_0x4befac)>_0x18383c(_0x277c91))_0x51e040[_0x159c8b(0x275)](_0x48a8d1,_0x4befac);}}return[..._0x51e040[_0x159c8b(0x3fe)]()];}[_0x12bded(0x334)](){const _0x1f8292=_0x12bded,_0x42ac83=Date[_0x1f8292(0x3fc)](),_0x7e2fea=this[_0x1f8292(0x332)](),_0x59252a=_0x526ac9=>Math[_0x1f8292(0x287)](0x0,Math['round']((_0x42ac83-(_0x526ac9[_0x1f8292(0x211)]||_0x42ac83))/0x3e8)),_0x1eb17c=_0x7e2fea['find'](_0x56a301=>_0x56a301[_0x1f8292(0x2f2)]===_0x1f8292(0x35f)),_0xd8348f=_0x7e2fea[_0x1f8292(0x3d7)](_0x1dc530=>_0x1dc530['kind']===_0x1f8292(0x30a));if(_0x1eb17c||_0xd8348f[_0x1f8292(0x21a)])return{'primary':_0x1eb17c?{'pid':_0x1eb17c[_0x1f8292(0x2c8)],'uptime':_0x59252a(_0x1eb17c)}:null,'workers':_0xd8348f[_0x1f8292(0x38b)](_0x1f76d5=>({'pid':_0x1f76d5['pid'],'uptime':_0x59252a(_0x1f76d5)})),'workersConfigured':_0x1eb17c?.[_0x1f8292(0x1e1)]?.['workersConfigured']??_0xd8348f[_0x1f8292(0x21a)],'mode':'cluster'};const _0x4ffd3d=_0x7e2fea[_0x1f8292(0x2b1)](_0x50f21f=>_0x50f21f[_0x1f8292(0x2f2)]===_0x1f8292(0x312)||_0x50f21f[_0x1f8292(0x2f2)]==='standalone'||_0x50f21f[_0x1f8292(0x2f2)]===_0x1f8292(0x269)),_0x57a254=_0x4ffd3d?{'pid':_0x4ffd3d['pid'],'uptime':_0x59252a(_0x4ffd3d)}:{'pid':process[_0x1f8292(0x2c8)],'uptime':Math[_0x1f8292(0x287)](0x0,Math['round'](process['uptime']()))};return{'primary':_0x57a254,'workers':[_0x57a254],'workersConfigured':0x1,'mode':'single'};}[_0x12bded(0x36f)](){const _0x354542=_0x12bded;return this[_0x354542(0x393)]();}[_0x12bded(0x337)](){const _0x200d6a=_0x12bded,_0x239d7e=new Map();for(const _0x16c357 of this[_0x200d6a(0x393)]())_0x239d7e['set'](_0x16c357[_0x200d6a(0x1f3)],{..._0x16c357,'children':[]});const _0x1705a0=[];for(const _0x52b6bf of _0x239d7e['values']()){const _0x3fc92b=_0x52b6bf[_0x200d6a(0x1ef)]?_0x239d7e['get'](_0x52b6bf[_0x200d6a(0x1ef)]):null;if(_0x3fc92b&&_0x3fc92b!==_0x52b6bf)_0x3fc92b[_0x200d6a(0x27c)][_0x200d6a(0x39a)](_0x52b6bf);else _0x1705a0[_0x200d6a(0x39a)](_0x52b6bf);}const _0x23cb35=(_0x4e3287,_0x12e869)=>_0x4e3287[_0x200d6a(0x2f2)]===_0x12e869[_0x200d6a(0x2f2)]?(_0x4e3287['pid']||0x0)-(_0x12e869['pid']||0x0):(_0x4e3287[_0x200d6a(0x2f2)]??'')<(_0x12e869[_0x200d6a(0x2f2)]??'')?-0x1:0x1,_0x25dd57=_0xb1ae27=>{const _0x4fbff4=_0x200d6a;_0xb1ae27[_0x4fbff4(0x3bd)](_0x23cb35);for(const _0x367f0f of _0xb1ae27)if(_0x367f0f['children'][_0x4fbff4(0x21a)])_0x25dd57(_0x367f0f[_0x4fbff4(0x27c)]);};return _0x25dd57(_0x1705a0),_0x1705a0;}[_0x12bded(0x400)](_0x44258f){const _0x5759b7=_0x12bded;return this[_0x5759b7(0x393)]()[_0x5759b7(0x2b1)](_0x202fed=>_0x202fed['processKey']===_0x44258f)??null;}[_0x12bded(0x393)](_0x40d754=Date[_0x12bded(0x3fc)]()){const _0x6a844b=_0x12bded,_0x5cc282=new Map();for(const _0x2186bf of this['listNodes']()){const _0x46d88d=_0x263ca6(_0x2186bf);let _0x309d99=_0x5cc282[_0x6a844b(0x256)](_0x46d88d);!_0x309d99&&(_0x309d99={'processKey':_0x46d88d,'nodeKey':_0x46d88d,'pid':_0x2186bf[_0x6a844b(0x2c8)],'ppid':_0x2186bf[_0x6a844b(0x37d)]??null,'host':_0x2186bf[_0x6a844b(0x257)]??null,'kind':_0x2186bf[_0x6a844b(0x2f2)],'role':null,'supervisorKey':_0x2186bf['supervisorKey']??null,'slot':_0x2186bf[_0x6a844b(0x24b)]??null,'slotKey':_0x2186bf[_0x6a844b(0x29b)]??null,'caps':_0x2186bf[_0x6a844b(0x264)]??null,'lifecycle':_0x2186bf[_0x6a844b(0x367)]??null,'uptime':Math[_0x6a844b(0x287)](0x0,Math[_0x6a844b(0x276)]((_0x40d754-(_0x2186bf[_0x6a844b(0x211)]||_0x40d754))/0x3e8)),'startedAt':_0x2186bf[_0x6a844b(0x211)]??null,'meta':_0x2186bf[_0x6a844b(0x1e1)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x5cc282['set'](_0x46d88d,_0x309d99));_0x309d99['instances'][_0x6a844b(0x39a)]({'instanceId':_0x2186bf['instanceId']??null,'role':_0x2186bf['role']??null,'listenAddr':_0x2186bf[_0x6a844b(0x285)]??null,'lifecycle':_0x2186bf[_0x6a844b(0x367)]??null,'processing':_0x2186bf[_0x6a844b(0x2dd)]??null});if(!_0x309d99[_0x6a844b(0x291)]&&_0x2186bf[_0x6a844b(0x291)])_0x309d99[_0x6a844b(0x291)]=_0x2186bf['role'];if(!_0x309d99[_0x6a844b(0x285)]&&_0x2186bf[_0x6a844b(0x285)])_0x309d99[_0x6a844b(0x285)]=_0x2186bf[_0x6a844b(0x285)];if(!_0x309d99[_0x6a844b(0x2dd)]&&_0x2186bf[_0x6a844b(0x2dd)])_0x309d99['processing']=_0x2186bf[_0x6a844b(0x2dd)];if(!_0x309d99[_0x6a844b(0x399)]&&_0x2186bf['engines'])_0x309d99[_0x6a844b(0x399)]=_0x2186bf['engines'];if(!_0x309d99[_0x6a844b(0x23f)]&&_0x2186bf['singletonClaims'])_0x309d99[_0x6a844b(0x23f)]=_0x2186bf[_0x6a844b(0x23f)];if(_0x309d99[_0x6a844b(0x264)]==null&&_0x2186bf[_0x6a844b(0x264)])_0x309d99[_0x6a844b(0x264)]=_0x2186bf['caps'];if(_0x2186bf['stats']&&(!_0x309d99[_0x6a844b(0x33f)]||(_0x2186bf[_0x6a844b(0x33f)]['at']??0x0)>(_0x309d99['stats']['at']??0x0)))_0x309d99['stats']=_0x2186bf[_0x6a844b(0x33f)];}return[..._0x5cc282[_0x6a844b(0x3fe)]()];}[_0x12bded(0x3ad)](){const _0x3749a4=_0x12bded,_0x139155=[],_0x4e2ef4={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x10a86e of this[_0x3749a4(0x393)]()){_0x139155[_0x3749a4(0x39a)]({'processKey':_0x10a86e[_0x3749a4(0x1f3)],'kind':_0x10a86e[_0x3749a4(0x2f2)],'pid':_0x10a86e['pid'],'supervisorKey':_0x10a86e[_0x3749a4(0x1ef)],'meta':_0x10a86e[_0x3749a4(0x1e1)]??null,'uptime':_0x10a86e[_0x3749a4(0x1d8)],'stats':_0x10a86e[_0x3749a4(0x33f)]??null}),_0x4e2ef4['processes']++;if(_0x10a86e[_0x3749a4(0x33f)]){_0x4e2ef4['rss']+=_0x10a86e[_0x3749a4(0x33f)][_0x3749a4(0x34c)]||0x0,_0x4e2ef4[_0x3749a4(0x25d)]+=(_0x10a86e[_0x3749a4(0x33f)]['heapUsed']||0x0)+(_0x10a86e['stats']['threads']?.[_0x3749a4(0x25d)]||0x0);const _0x327cec=_0x10a86e[_0x3749a4(0x33f)][_0x3749a4(0x225)];_0x327cec&&(_0x4e2ef4[_0x3749a4(0x225)][_0x3749a4(0x1f2)]+=_0x327cec[_0x3749a4(0x1f2)]||0x0,_0x4e2ef4[_0x3749a4(0x225)][_0x3749a4(0x23a)]+=_0x327cec[_0x3749a4(0x23a)]||0x0,_0x4e2ef4[_0x3749a4(0x225)][_0x3749a4(0x1eb)]+=_0x327cec['busy']||0x0);}}return{'totals':_0x4e2ef4,'nodes':_0x139155};}async[_0x12bded(0x311)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0xf0ce8=_0x12bded;this[_0xf0ce8(0x2b3)]=this[_0xf0ce8(0x2b3)]||!!writer,this[_0xf0ce8(0x33c)]=this[_0xf0ce8(0x33c)]||!!reader,this['_kind']=kind||this[_0xf0ce8(0x31e)]||(_0x46a014[_0xf0ce8(0x349)]?_0xf0ce8(0x30a):_0xf0ce8(0x312)),this['_supervisorKey']=supervisorKey??this['_supervisorKey'],this[_0xf0ce8(0x1d3)]=listenAddr??this[_0xf0ce8(0x1d3)],this[_0xf0ce8(0x20d)](),await this[_0xf0ce8(0x223)]();if(!writer&&!reader)return null;if(!this[_0xf0ce8(0x378)]){const _0x4dd9d4=await this[_0xf0ce8(0x292)]['createEnvironment'](_0x361773,{'sync':![],'durability':_0xf0ce8(0x20e)});await _0x4dd9d4['ensureType'](_0x616751),this[_0xf0ce8(0x378)]=_0x4dd9d4;}return this[_0xf0ce8(0x378)];}[_0x12bded(0x324)](){const _0x172665=_0x12bded;return this[_0x172665(0x3ee)]!==this['_statusEnv']&&(this['_nodeDbFor']=this[_0x172665(0x378)],this[_0x172665(0x1e4)]=this[_0x172665(0x378)][_0x172665(0x3e2)](_0x616751)[_0x172665(0x25c)]),this[_0x172665(0x1e4)];}[_0x12bded(0x323)](_0xea43e6){const _0x5d0f1f=_0x12bded;if(_0x4c3ede)return this['_nodeDb']()[_0x5d0f1f(0x3f4)](_0xea43e6[_0x5d0f1f(0x3c0)],_0xea43e6,0x1);const _0x58a0cd=this[_0x5d0f1f(0x324)]()[_0x5d0f1f(0x281)](_0xea43e6[_0x5d0f1f(0x3c0)],_0xea43e6,0x1);if(_0x58a0cd&&typeof _0x58a0cd[_0x5d0f1f(0x2e5)]==='function')_0x58a0cd[_0x5d0f1f(0x2e5)](undefined,()=>{});return _0x58a0cd;}[_0x12bded(0x391)](_0x56d9c2){const _0x5c2ee6=_0x12bded;return this[_0x5c2ee6(0x324)]()[_0x5c2ee6(0x3f4)](_0x56d9c2[_0x5c2ee6(0x3c0)],_0x56d9c2,0x1);}[_0x12bded(0x33d)](_0xf526c7){const _0x160677=_0x12bded;if(_0x4c3ede)try{return this[_0x160677(0x324)]()[_0x160677(0x237)](_0xf526c7);}catch{return![];}const _0x44417a=this[_0x160677(0x324)]()[_0x160677(0x34e)](_0xf526c7);if(_0x44417a&&typeof _0x44417a[_0x160677(0x2e5)]===_0x160677(0x385))_0x44417a[_0x160677(0x2e5)](undefined,()=>{});return _0x44417a;}async['putNode'](_0x48f160){const _0x819ccb=_0x12bded;if(!this[_0x819ccb(0x378)]||!this[_0x819ccb(0x2b3)]||!_0x48f160?.[_0x819ccb(0x3c0)])return;return this[_0x819ccb(0x323)](_0x48f160);}async['removeNode'](_0x5f3055){const _0x599c1e=_0x12bded;if(!this[_0x599c1e(0x378)]||!this[_0x599c1e(0x2b3)]||!_0x5f3055)return;const _0x11f2bb=_0x5f3055[_0x599c1e(0x2ed)]('#'),_0x49af8b=[];for(const {key:_0x4167a2}of this[_0x599c1e(0x378)][_0x599c1e(0x3cb)](_0x616751)){if(_0x4167a2===_0x5f3055||!_0x11f2bb&&typeof _0x4167a2===_0x599c1e(0x361)&&_0x4167a2['startsWith'](_0x5f3055+'#'))_0x49af8b['push'](_0x4167a2);}for(const _0x197e4a of _0x49af8b){try{this[_0x599c1e(0x324)]()[_0x599c1e(0x237)](_0x197e4a);}catch{}}}['_nodeDead'](_0x15c7f9){const _0xdd17c2=_0x12bded;if(typeof _0x15c7f9?.[_0xdd17c2(0x2c8)]!==_0xdd17c2(0x3fb))return![];if(_0x15c7f9[_0xdd17c2(0x257)]!==_0x11c5cb[_0xdd17c2(0x2bf)]())return![];if(_0x15c7f9[_0xdd17c2(0x2c8)]===process[_0xdd17c2(0x2c8)])return![];if(_0x15c7f9['expiresAt']!=null&&_0x15c7f9[_0xdd17c2(0x277)]<Date[_0xdd17c2(0x3fc)]()-_0x343193)return!![];try{return process[_0xdd17c2(0x3ef)](_0x15c7f9['pid'],0x0),![];}catch(_0x130963){return _0x130963[_0xdd17c2(0x1d1)]===_0xdd17c2(0x3c7);}}[_0x12bded(0x332)](){const _0x49abe5=_0x12bded;if(!this[_0x49abe5(0x378)])return[];try{this[_0x49abe5(0x378)]['db']?.[_0x49abe5(0x266)]?.();}catch{}const _0xdf54ea=Date[_0x49abe5(0x3fc)](),_0x8cd19=_0x11c5cb['hostname'](),_0x5aa205=[];for(const {value:_0x147600}of this['_statusEnv']['getRange'](_0x616751)){if(!_0x147600)continue;let _0x3e196e=null;_0x147600['host']===_0x8cd19&&typeof _0x147600[_0x49abe5(0x2c8)]==='number'&&(_0x3e196e=!this[_0x49abe5(0x22b)](_0x147600));if(_0x3e196e===![])continue;const _0x1f4032=_0x147600[_0x49abe5(0x277)]==null||_0x147600[_0x49abe5(0x277)]>=_0xdf54ea;if(_0x3e196e===!![]||_0x1f4032)_0x5aa205[_0x49abe5(0x39a)](_0x147600);}return _0x5aa205;}async[_0x12bded(0x1e0)](_0x34ae28=0x0){const _0x4dda89=_0x12bded;if(!this[_0x4dda89(0x378)]||!this[_0x4dda89(0x2b3)])return;const _0x2da8e2=Date[_0x4dda89(0x3fc)]()-_0x34ae28,_0x1986ae=new Set(),_0x2344bd=[],_0x5e5714=_0x11c5cb['hostname'](),_0x39aee2=require$$6[_0x4dda89(0x1dc)];for(const {key:_0x35c4da,value:_0xc30508}of this[_0x4dda89(0x378)][_0x4dda89(0x3cb)](_0x616751)){if(!_0xc30508)continue;const _0x12880a=_0xc30508[_0x4dda89(0x257)]===_0x5e5714&&typeof _0xc30508[_0x4dda89(0x2c8)]==='number',_0xf6b587=_0x12880a?this[_0x4dda89(0x22b)](_0xc30508):_0xc30508['expiresAt']!=null&&_0xc30508['expiresAt']<_0x2da8e2;if(_0xf6b587)_0x2344bd['push'](_0x35c4da);else{_0x1986ae[_0x4dda89(0x342)](_0x263ca6(_0xc30508)??_0x35c4da);if(_0xc30508['version']&&_0xc30508['version']!==_0x39aee2){if(!this[_0x4dda89(0x38d)])this[_0x4dda89(0x38d)]=new Set();!this[_0x4dda89(0x38d)]['has'](_0xc30508['version'])&&(this['_versionSkewWarned'][_0x4dda89(0x342)](_0xc30508[_0x4dda89(0x1dc)]),this[_0x4dda89(0x292)]['log']?.[_0x4dda89(0x36e)]?.(_0x4dda89(0x27b)+(_0xc30508[_0x4dda89(0x2c8)]??'?')+_0x4dda89(0x35b)+_0xc30508[_0x4dda89(0x1dc)]+_0x4dda89(0x286)+_0x39aee2+_0x4dda89(0x24c)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x4dda89(0x3a0)}));}}}for(const _0x469346 of _0x2344bd)this['_removeRowAsync'](_0x469346);if(this[_0x4dda89(0x20d)]()){const _0x3a36e8=[];for(const {key:_0x3d440a}of this[_0x4dda89(0x2a4)]('node')){if(!_0x1986ae[_0x4dda89(0x23e)](_0x3d440a)){if(_0x4c3ede)try{this[_0x4dda89(0x1ff)][_0x4dda89(0x237)](_0x4dda89(0x244)+_0x3d440a);}catch{}else _0x3a36e8[_0x4dda89(0x39a)](this['_desired'][_0x4dda89(0x34e)](_0x4dda89(0x244)+_0x3d440a));}}if(_0x3a36e8[_0x4dda89(0x21a)])await Promise[_0x4dda89(0x2da)](_0x3a36e8);}}[_0x12bded(0x3cd)](_0x3c7517=null){const _0x31d520=_0x12bded;if(this[_0x31d520(0x401)])return;if(!this[_0x31d520(0x2b3)]||!this[_0x31d520(0x378)]){this[_0x31d520(0x292)]?.[_0x31d520(0x2a7)]?.[_0x31d520(0x36e)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this[_0x31d520(0x2b3)]+_0x31d520(0x38a)+!!this[_0x31d520(0x378)]+_0x31d520(0x320),{'feature':_0x31d520(0x2c6)});return;}this['_onTick']=_0x3c7517,this[_0x31d520(0x23d)]=()=>this[_0x31d520(0x3b7)]();for(const _0x414283 of _0x481f2e)this[_0x31d520(0x292)][_0x31d520(0x250)]['on'](_0x414283,this['_onProcEvent']);this[_0x31d520(0x2a0)]();const _0x3a7f24=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x84f429;this[_0x31d520(0x401)]=setInterval(()=>{const _0x4c0b22=_0x31d520;if(this['_onTick'])try{this[_0x4c0b22(0x3e5)]();}catch{}this['_publishNow'](),this[_0x4c0b22(0x1e0)]()[_0x4c0b22(0x299)](()=>{});},_0x3a7f24);if(this[_0x31d520(0x401)][_0x31d520(0x3e3)])this['_hbTimer']['unref']();}[_0x12bded(0x3b7)](){const _0x3ff0ce=_0x12bded;if(!this[_0x3ff0ce(0x2b3)]||!this['_statusEnv'])return;if(Date[_0x3ff0ce(0x3fc)]()-this['_lastPublishAt']<_0x66d92d)return;this[_0x3ff0ce(0x2a0)]();}[_0x12bded(0x2a0)](){const _0x3724c5=_0x12bded;if(!this[_0x3724c5(0x2b3)]||!this[_0x3724c5(0x378)])return;this['_lastPublishAt']=Date[_0x3724c5(0x3fc)]();try{const _0x3875e0=[this[_0x3724c5(0x31c)]()];for(const _0x57aa57 of this['_children']['values']())_0x3875e0[_0x3724c5(0x39a)](this[_0x3724c5(0x3e7)](_0x57aa57));const _0x3f7788=_0x267e86[_0x3724c5(0x215)]?_0x267e86['now']():0x0;for(const _0x489b13 of _0x3875e0){try{this[_0x3724c5(0x391)](_0x489b13),this[_0x3724c5(0x369)]=![];}catch(_0x2e6d87){!this['_publishFailWarned']&&(this[_0x3724c5(0x369)]=!![],this['okdb']?.['log']?.[_0x3724c5(0x36e)]?.(_0x3724c5(0x297)+_0x2e6d87[_0x3724c5(0x30e)],{'feature':_0x3724c5(0x2c6)}));}}if(_0x267e86[_0x3724c5(0x215)])_0x267e86[_0x3724c5(0x2a1)](_0x3724c5(0x316),_0x267e86[_0x3724c5(0x3fc)]()-_0x3f7788,'rows='+_0x3875e0[_0x3724c5(0x21a)]+'\x20sync');}catch(_0x8db6f7){!this['_publishFailWarned']&&(this[_0x3724c5(0x369)]=!![],this[_0x3724c5(0x292)]?.[_0x3724c5(0x2a7)]?.[_0x3724c5(0x36e)]?.(_0x3724c5(0x297)+_0x8db6f7[_0x3724c5(0x30e)],{'feature':_0x3724c5(0x2c6)}));}}async[_0x12bded(0x238)](){const _0xec652c=_0x12bded;if(this[_0xec652c(0x23d)]){for(const _0x2fcac2 of _0x481f2e){try{this[_0xec652c(0x292)]['events'][_0xec652c(0x29f)](_0x2fcac2,this[_0xec652c(0x23d)]);}catch{}}this[_0xec652c(0x23d)]=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0xec652c(0x401)]=null);try{if(this[_0xec652c(0x378)]&&this['_isWriter'])await this[_0xec652c(0x325)](this[_0xec652c(0x2b7)]);}catch{}}async[_0x12bded(0x3ca)](){const _0x8df948=_0x12bded;if(!this['_statusEnv']||!this[_0x8df948(0x2b3)])return;try{await this[_0x8df948(0x325)](this['_rowKey']);}catch{}try{const _0x4ca2ba=[];for(const {value:_0xaadca3}of this[_0x8df948(0x378)]['getRange'](_0x616751)){if(_0xaadca3?.[_0x8df948(0x37d)]===process[_0x8df948(0x2c8)]&&_0xaadca3[_0x8df948(0x3c0)])_0x4ca2ba[_0x8df948(0x39a)](_0xaadca3[_0x8df948(0x3c0)]);}for(const _0x3d3274 of _0x4ca2ba){try{await this[_0x8df948(0x325)](_0x3d3274);}catch{}}}catch{}}async[_0x12bded(0x210)](){const _0x2c12b4=_0x12bded;return this[_0x2c12b4(0x2ea)](this[_0x2c12b4(0x31c)]());}async['publishChildRow'](_0x478687){const _0x165449=_0x12bded;if(!this['_statusEnv']||!this['_isWriter'])return;return this[_0x165449(0x2ea)](this[_0x165449(0x3e7)](_0x478687));}[_0x12bded(0x3e7)]({pid:_0x49a2aa,startedAt:_0x52e676,kind:_0x5e28e8,supervisorKey:_0x4b5529,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x12bded(0x35a),meta:meta=null,stats:stats=null}){const _0x420629=_0x12bded,_0x42dd30=Date[_0x420629(0x3fc)](),_0x401163=_0x509992(_0x49a2aa,_0x52e676);return{'nodeKey':_0x4563a6(_0x401163,'0'),'processKey':_0x401163,'instanceId':'0','pid':_0x49a2aa,'startedAt':_0x52e676,'ppid':process[_0x420629(0x2c8)],'host':_0x11c5cb['hostname'](),'supervisorKey':_0x4b5529,'slot':slot,'slotKey':slotKey,'kind':_0x5e28e8,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x42dd30,'expiresAt':_0x42dd30+_0x4d9548,'caps':this[_0x420629(0x2fd)](_0x5e28e8,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x12bded(0x3cc)](_0x55cb3e){const _0x38dc5e=_0x12bded;if(!_0x55cb3e?.['pid'])return null;const _0x4670ad=_0x509992(_0x55cb3e[_0x38dc5e(0x2c8)],_0x55cb3e[_0x38dc5e(0x211)]);this['_children'][_0x38dc5e(0x275)](_0x4670ad,{..._0x55cb3e,'supervisorKey':_0x55cb3e[_0x38dc5e(0x1ef)]??this[_0x38dc5e(0x255)]});if(this[_0x38dc5e(0x2b3)])await this[_0x38dc5e(0x2fe)](this[_0x38dc5e(0x2f4)][_0x38dc5e(0x256)](_0x4670ad))['catch']?.(()=>{});return _0x4670ad;}[_0x12bded(0x206)](_0x9be88a){const _0x9229f8=_0x12bded;if(!_0x9be88a)return;return this[_0x9229f8(0x2f4)][_0x9229f8(0x2aa)](_0x9be88a),this['removeNode'](_0x9be88a);}[_0x12bded(0x3aa)](){const _0xbc5238=_0x12bded,_0x38a2d7=Date[_0xbc5238(0x3fc)](),_0x49d55a=process[_0xbc5238(0x1fc)](),_0x5ee1e6=(_0x38a2d7-this[_0xbc5238(0x2d3)])*0x3e8;if(_0x5ee1e6>=0x3d090){const _0x274a7d=_0x49d55a['user']-this['_lastCpuUsage'][_0xbc5238(0x381)]+(_0x49d55a['system']-this['_lastCpuUsage'][_0xbc5238(0x27d)]),_0x340795=_0x11c5cb[_0xbc5238(0x2bd)]()[_0xbc5238(0x21a)]||0x1;this['_lastCpuPct']=Math[_0xbc5238(0x249)](0x64,Math['round'](_0x274a7d/(_0x5ee1e6*_0x340795)*0x64)),this['_lastCpuWindowMs']=Math['round'](_0x5ee1e6/0x3e8),this['_lastCpuUsage']=_0x49d55a,this[_0xbc5238(0x2d3)]=_0x38a2d7;}const _0x241573=process[_0xbc5238(0x395)](),_0x5910f0=this[_0xbc5238(0x358)][_0xbc5238(0x261)];let _0x40b6af=0x0;if(_0x5910f0>0x0){const _0x53a3e2=[this['okdb'],...this[_0xbc5238(0x292)][_0xbc5238(0x338)]?.['values']?.()??[]];for(const _0x2e7892 of _0x53a3e2){const _0x50c131=_0x2e7892['functions']?.[_0xbc5238(0x2eb)];if(_0x50c131)_0x40b6af+=_0x50c131['liveThreadStats']['busy'];}}let _0x1844ea=null;const _0x58b919=_0x5910f0;if(_0x58b919>0x0){let _0x37111f=0x0;for(const _0x2cafb1 of this['_threadStats']['values']())_0x37111f+=_0x2cafb1[_0xbc5238(0x25d)]||0x0;_0x1844ea={'count':_0x58b919,'heapUsed':_0x37111f,'sandbox':_0x5910f0,'busy':_0x40b6af};}return{'rss':_0x241573[_0xbc5238(0x34c)],'heapUsed':_0x241573[_0xbc5238(0x25d)],'heapTotal':_0x241573[_0xbc5238(0x3f1)],'external':_0x241573[_0xbc5238(0x2a3)],'cpuPct':this[_0xbc5238(0x1de)],'cpuWindowMs':this[_0xbc5238(0x2ff)]??null,'threads':_0x1844ea,'at':_0x38a2d7};}[_0x12bded(0x24f)](_0x291196,_0x473724){const _0x1e687c=_0x12bded;if(!_0x291196||!_0x473724)return;this['_threadStats'][_0x1e687c(0x275)](_0x291196,_0x473724);}[_0x12bded(0x29d)](_0x478fd8){const _0x2a5b3f=_0x12bded;this[_0x2a5b3f(0x358)][_0x2a5b3f(0x2aa)](_0x478fd8);}[_0x12bded(0x32c)](_0x2daa69,_0x36b0e6,_0x212446=undefined){const _0x19470b=_0x12bded,_0x43ded1=this['_children'][_0x19470b(0x256)](_0x2daa69);if(!_0x43ded1||!_0x36b0e6)return;if(_0x212446!==undefined)_0x43ded1[_0x19470b(0x2dd)]=_0x212446;_0x43ded1[_0x19470b(0x33f)]={'rss':_0x36b0e6[_0x19470b(0x34c)]??null,'heapUsed':_0x36b0e6[_0x19470b(0x25d)]??null,'heapTotal':_0x36b0e6[_0x19470b(0x3f1)]??null,'external':_0x36b0e6[_0x19470b(0x2a3)]??null,'cpuPct':_0x36b0e6[_0x19470b(0x322)]??null,'cpuWindowMs':_0x36b0e6['cpuWindowMs']??null,'threads':_0x36b0e6[_0x19470b(0x225)]??null,'claims':_0x36b0e6['claims']??null,'envsOpen':_0x36b0e6['envsOpen']??null,'at':Date['now']()};}[_0x12bded(0x31c)](){const _0x32bb70=_0x12bded,_0x137730=Date['now'](),_0x361b68=this[_0x32bb70(0x292)][_0x32bb70(0x37a)]||{},_0xfd79af=this[_0x32bb70(0x31e)]||'cli';return{'nodeKey':this[_0x32bb70(0x2b7)],'processKey':this[_0x32bb70(0x255)],'instanceId':this[_0x32bb70(0x387)],'pid':process[_0x32bb70(0x2c8)],'startedAt':this[_0x32bb70(0x370)],'instanceStartedAt':this[_0x32bb70(0x295)],'ppid':typeof process[_0x32bb70(0x37d)]==='number'?process[_0x32bb70(0x37d)]:null,'host':_0x11c5cb[_0x32bb70(0x2bf)](),'supervisorKey':this[_0x32bb70(0x2d4)]??null,'version':require$$6[_0x32bb70(0x1dc)],'kind':_0xfd79af,'role':{'engines':!!_0x361b68[_0x32bb70(0x399)],'processors':!!_0x361b68['processors'],'compaction':_0x361b68[_0x32bb70(0x366)],'http':_0x361b68[_0x32bb70(0x3a1)]},'listenAddr':this[_0x32bb70(0x1d3)]??null,'heartbeatAt':_0x137730,'expiresAt':_0x137730+_0x4d9548,'caps':this[_0x32bb70(0x2fd)](_0xfd79af,_0x361b68),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x32bb70(0x2e4)]},'processing':_0x361b68[_0x32bb70(0x1d4)]?this[_0x32bb70(0x2d5)]():null,'engines':_0x361b68[_0x32bb70(0x399)]?[...this[_0x32bb70(0x292)][_0x32bb70(0x2ee)]??[]]:null,'singletonClaims':this[_0x32bb70(0x353)](),'stats':this['_sampleOwnStats'](),'writers':this[_0x32bb70(0x25a)]()};}['_collectWriterFacet'](){const _0x477c88=_0x12bded,_0x45651e={};try{for(const [_0x241374,_0x5512a9]of this[_0x477c88(0x292)][_0x477c88(0x338)]){try{const _0x1d05b1=_0x5512a9['writerStatus']?.();if(!_0x1d05b1)continue;if(!_0x1d05b1[_0x477c88(0x3d9)]&&!_0x1d05b1[_0x477c88(0x351)]&&!(_0x1d05b1[_0x477c88(0x30f)]??0x0)&&!_0x1d05b1[_0x477c88(0x29c)])continue;_0x45651e[_0x241374]={'depth':_0x1d05b1[_0x477c88(0x3d9)],'oldestPendingMs':_0x1d05b1[_0x477c88(0x2f1)],'committed':_0x1d05b1['committed'],'commitsPerSec':_0x1d05b1[_0x477c88(0x3ae)],'commitP99Ms':_0x1d05b1['commitP99Ms'],'parkedNow':_0x1d05b1['parkedNow']??0x0,'draining':!!_0x1d05b1[_0x477c88(0x29c)]};}catch{}}}catch{}return Object[_0x477c88(0x356)](_0x45651e)[_0x477c88(0x21a)]?_0x45651e:null;}[_0x12bded(0x353)](){const _0x2cb477=_0x12bded,_0x3c63a7=process[_0x2cb477(0x2c8)],_0x5afe43=Date['now'](),_0x5281df=_0x37d460=>{const _0x1d3145=_0x2cb477;if(!_0x37d460)return[];const _0x14ba5d=[];try{for(const {id:_0x16d98b,entry:_0x2cb12a}of _0x37d460[_0x1d3145(0x348)]()){if(_0x2cb12a?.['holder']?.['pid']!==_0x3c63a7)continue;const _0x3ae012=_0x2cb12a[_0x1d3145(0x2ef)]??_0x2cb12a[_0x1d3145(0x253)]??0x0;if(_0x3ae012+(_0x2cb12a['ttlMs']??0x0)<_0x5afe43)continue;_0x14ba5d['push'](_0x16d98b);}}catch{}return _0x14ba5d;},_0x291e54=_0x5281df(this['_singletonLock'](_0x2cb477(0x327))),_0x5daac6=_0x5281df(this[_0x2cb477(0x37f)](_0x2cb477(0x3ab)));if(!_0x291e54[_0x2cb477(0x21a)]&&!_0x5daac6[_0x2cb477(0x21a)])return null;return{'compact':_0x291e54,'replicate':_0x5daac6};}[_0x12bded(0x37f)](_0x187664){const _0x1c4e54=_0x12bded;if(!this[_0x1c4e54(0x292)]?.['_rootDb'])return null;if(!this['_singletonLocks'])this[_0x1c4e54(0x1f6)]=new Map();let _0x2d58f5=this[_0x1c4e54(0x1f6)]['get'](_0x187664);if(!_0x2d58f5)try{_0x2d58f5=new _0x123333(this[_0x1c4e54(0x292)][_0x1c4e54(0x3cf)],{'namespace':_0x187664}),this['_singletonLocks'][_0x1c4e54(0x275)](_0x187664,_0x2d58f5);}catch{return null;}return _0x2d58f5;}[_0x12bded(0x2d5)](){const _0x26633d=_0x12bded,_0x49d87a=[];try{for(const [_0x19a6d1,_0x1912ce]of this[_0x26633d(0x292)]['_envs']){if(_0x19a6d1[_0x26633d(0x1f7)]('~'))continue;for(const _0x1ea00f of _0x1912ce[_0x26633d(0x397)][_0x26633d(0x2a5)]())_0x49d87a[_0x26633d(0x39a)]({..._0x1ea00f,'env':_0x19a6d1});}}catch{}return{'participate':this[_0x26633d(0x292)][_0x26633d(0x1d4)]?.[_0x26633d(0x280)]??![],'processors':_0x49d87a};}[_0x12bded(0x20d)](){const _0x32f27a=_0x12bded;if(this[_0x32f27a(0x1ff)])return!![];const _0x4508c5=this[_0x32f27a(0x292)][_0x32f27a(0x3cf)];if(!_0x4508c5)return![];return this[_0x32f27a(0x1ff)]=_0x4508c5[_0x32f27a(0x3d1)](_0x493b20,{'dupSort':![]}),this[_0x32f27a(0x36a)]=_0x4508c5[_0x32f27a(0x3d1)](_0x2cba6b,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x224c29=_0x12bded;if(!this['_ensureDesired']())return;const _0x4bff85=_0x224c29(0x340),_0x4c3d79=0x1,_0x4064c9=this[_0x224c29(0x1ff)][_0x224c29(0x256)](_0x4bff85)??0x0;if(_0x4064c9>=_0x4c3d79)return;const _0x570032=_0x30119d=>{const _0x1ceb1b=_0x224c29;if(_0x30119d==='worker')return _0x1ceb1b(0x307);if(_0x30119d===_0x1ceb1b(0x29a))return _0x1ceb1b(0x300);return _0x30119d;};await this['okdb'][_0x224c29(0x343)]['_writer'][_0x224c29(0x306)](()=>{const _0x104d54=_0x224c29;for(const _0xf4b0a of[_0x104d54(0x22d),_0x104d54(0x38f)]){for(const {key:_0x436255,value:_0x3fb22c}of this[_0x104d54(0x1ff)][_0x104d54(0x3cb)]({'start':_0xf4b0a,'end':_0xf4b0a+'\xff'})){if(typeof _0x436255!==_0x104d54(0x361)||!_0x436255[_0x104d54(0x1f7)](_0xf4b0a))break;const _0x13bc2b=_0x570032(_0x3fb22c['mode']);if(_0x13bc2b!==_0x3fb22c[_0x104d54(0x3e6)])this[_0x104d54(0x1ff)]['put'](_0x436255,{..._0x3fb22c,'mode':_0x13bc2b});}}this[_0x104d54(0x1ff)][_0x104d54(0x281)](_0x4bff85,_0x4c3d79);});}[_0x12bded(0x288)](){const _0x15e26b=_0x12bded;return!!this[_0x15e26b(0x1ff)];}[_0x12bded(0x1fb)](_0x55ebef,_0xe3cf51){const _0x456162=_0x12bded;if(!this['_ensureDesired']())return null;const _0x38e701=_0x55ebef+'/'+_0xe3cf51;return this[_0x456162(0x28b)](),this[_0x456162(0x27f)][_0x456162(0x256)](_0x38e701)??this[_0x456162(0x1ff)][_0x456162(0x256)](_0x38e701)??null;}[_0x12bded(0x28b)](){const _0x59dbd4=_0x12bded;if(!_0x4c3ede)return;try{this['okdb'][_0x59dbd4(0x343)]?.['db']?.[_0x59dbd4(0x266)]?.();}catch{}}async[_0x12bded(0x310)](_0x2d0cf9,_0x5f53ef,_0x2fc683){const _0x22e133=_0x12bded;if(!this[_0x22e133(0x20d)]())return null;const _0x47893b=_0x2d0cf9+'/'+_0x5f53ef;this[_0x22e133(0x28b)]();const _0x3774a6=this[_0x22e133(0x27f)]['get'](_0x47893b)??this['_desired'][_0x22e133(0x256)](_0x47893b)??{'version':0x0},_0x52e3ef=(_0x3774a6[_0x22e133(0x1dc)]||0x0)+0x1,_0x4b71e4={..._0x3774a6,..._0x2fc683,'version':_0x52e3ef,'updatedAt':Date[_0x22e133(0x3fc)]()};this['_desiredOverlay'][_0x22e133(0x275)](_0x47893b,_0x4b71e4);try{await this[_0x22e133(0x292)][_0x22e133(0x343)]['_writer']['transaction'](()=>{const _0x4bc440=_0x22e133;this[_0x4bc440(0x1ff)][_0x4bc440(0x281)](_0x47893b,_0x4b71e4);});}finally{if(this[_0x22e133(0x27f)][_0x22e133(0x256)](_0x47893b)===_0x4b71e4)this['_desiredOverlay'][_0x22e133(0x2aa)](_0x47893b);}return _0x52e3ef;}[_0x12bded(0x2a4)](_0x5cf53b){const _0x335588=_0x12bded;if(!this[_0x335588(0x20d)]())return[];this['_refreshDesiredSnapshot']();const _0x4afbce=_0x5cf53b+'/',_0x1bffd7=[];for(const {key:_0x24fc88,value:_0xba8522}of this['_desired'][_0x335588(0x3cb)]({'start':_0x4afbce,'end':_0x4afbce+'\xff'})){if(typeof _0x24fc88!==_0x335588(0x361)||!_0x24fc88[_0x335588(0x1f7)](_0x4afbce))break;_0x1bffd7['push']({'key':_0x24fc88[_0x335588(0x204)](_0x4afbce['length']),'value':_0xba8522});}return _0x1bffd7;}[_0x12bded(0x222)](_0x10a75b){const _0x5348b1=_0x12bded;if(!this[_0x5348b1(0x20d)]())return null;return this[_0x5348b1(0x36a)][_0x5348b1(0x256)](_0x10a75b)??null;}async[_0x12bded(0x3c4)](_0x3c6597,_0xef229d,_0x329a00={}){const _0x518db6=_0x12bded;if(!this[_0x518db6(0x20d)]())return null;let _0x4f80ec;return await this[_0x518db6(0x292)][_0x518db6(0x343)][_0x518db6(0x321)][_0x518db6(0x306)](()=>{const _0x5d3689=_0x518db6,_0x21d058=this[_0x5d3689(0x36a)][_0x5d3689(0x256)](_0x3c6597)||{'epoch':0x0};_0x4f80ec=(_0x21d058[_0x5d3689(0x2a9)]||0x0)+0x1,this[_0x5d3689(0x36a)]['put'](_0x3c6597,{..._0x21d058,..._0x329a00,'cmd':_0xef229d,'epoch':_0x4f80ec,'updatedAt':Date['now']()});}),_0x4f80ec;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1058ee,'nodeKey':_0x509992,'logicalKey':_0x55b4bd,'slotKey':_0x2bfa24,'PROCESS_ENV':_0x361773,'NODE_TYPE':_0x616751},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x4bddb6=_0x3b4fb0;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x7a3a80=require$$0$4,{EVENTS:_0xa86aad,CHANGE_ACTIONS:_0x4a6cfb}=requireOkdbEnums(),{LOOP:_0x20ca17}=requireOkdbLoopMonitor(),_0x1eb994=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x3f103b=0x5,_0x580070=0x2710;class _0x5092d4 extends _0x7a3a80{constructor(_0x768cc3,_0x3d8a79={}){const _0x29acb7=_0x55dd;super(),this[_0x29acb7(0x292)]=_0x768cc3,this['_quantum']=_0x3d8a79[_0x29acb7(0x24d)]??_0x1eb994,this[_0x29acb7(0x2c9)]=_0x3d8a79[_0x29acb7(0x3c6)]??_0x3f103b,this[_0x29acb7(0x3b1)]=_0x3d8a79[_0x29acb7(0x390)]??_0x580070,this['_started']=![],this['_cursors']=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x29acb7(0x203)]=null,this[_0x29acb7(0x209)]=![],this[_0x29acb7(0x331)]=new Set(),this['_onItem']=_0x545954=>this[_0x29acb7(0x3bc)](_0x545954),this[_0x29acb7(0x3f7)]=_0x4369c5=>this[_0x29acb7(0x37c)](_0x4369c5),this[_0x29acb7(0x2b9)]=()=>this[_0x29acb7(0x227)]();}['start'](){const _0x58da1c=_0x55dd;if(this['_started'])return;this[_0x58da1c(0x3f8)]=!![];for(const [_0x332efd,_0x32bf86]of this[_0x58da1c(0x292)]['_envs']){if(_0x332efd[_0x58da1c(0x1f7)]('~'))continue;try{_0x32bf86[_0x58da1c(0x355)]();}catch{}}for(const [_0x4d5f3d,_0x18d836]of this[_0x58da1c(0x292)]['_envs']){if(_0x4d5f3d[_0x58da1c(0x1f7)]('~'))continue;try{this[_0x58da1c(0x2c4)][_0x58da1c(0x275)](_0x4d5f3d,_0x18d836[_0x58da1c(0x236)]()||0x0);}catch{}}const {events:_0x79e346}=this[_0x58da1c(0x292)];_0x79e346['on'](_0xa86aad[_0x58da1c(0x34a)],this[_0x58da1c(0x392)]),_0x79e346['on'](_0xa86aad[_0x58da1c(0x301)],this[_0x58da1c(0x392)]),_0x79e346['on'](_0xa86aad[_0x58da1c(0x383)],this['_onItem']),_0x79e346['on'](_0xa86aad['SYSTEM_POKE'],this[_0x58da1c(0x3f7)]),_0x79e346['once'](_0xa86aad[_0x58da1c(0x339)],this[_0x58da1c(0x2b9)]);}[_0x4bddb6(0x227)](){const _0x288ca7=_0x4bddb6;if(!this[_0x288ca7(0x3f8)])return;this[_0x288ca7(0x3f8)]=![];const {events:_0x48a002}=this[_0x288ca7(0x292)];_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x34a)],this['_onItem']),_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x301)],this[_0x288ca7(0x392)]),_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x383)],this[_0x288ca7(0x392)]),_0x48a002['off'](_0xa86aad[_0x288ca7(0x25e)],this[_0x288ca7(0x3f7)]);try{_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x339)],this[_0x288ca7(0x2b9)]);}catch{}this[_0x288ca7(0x203)]&&(clearTimeout(this[_0x288ca7(0x203)]),this['_flushTimer']=null),this['_pending'][_0x288ca7(0x2ba)](),this[_0x288ca7(0x290)][_0x288ca7(0x2ba)](),this[_0x288ca7(0x2c4)][_0x288ca7(0x2ba)](),this[_0x288ca7(0x331)][_0x288ca7(0x2ba)]();}['_dedupeKey'](_0x468e1d,_0x129800,_0x280382,_0x43417f){return _0x468e1d+'\x00'+_0x129800+'\x00'+_0x280382+'\x00'+_0x43417f;}['_markSeen'](_0x27abbb,_0x1b1506,_0x106e53,_0x2adf00){const _0x221f93=_0x4bddb6,_0x544f2b=this['_dedupeKey'](_0x27abbb,_0x1b1506,_0x106e53,_0x2adf00);if(this[_0x221f93(0x331)][_0x221f93(0x23e)](_0x544f2b))return![];this[_0x221f93(0x331)]['add'](_0x544f2b);if(this[_0x221f93(0x331)][_0x221f93(0x261)]>this[_0x221f93(0x3b1)]){const _0x503859=this[_0x221f93(0x331)]['values']()[_0x221f93(0x365)]()[_0x221f93(0x21f)];this[_0x221f93(0x331)][_0x221f93(0x2aa)](_0x503859);}return!![];}[_0x4bddb6(0x3bc)](_0x42f7f3){const _0x15272b=_0x4bddb6;if(!this[_0x15272b(0x3f8)]||!_0x42f7f3)return;const {env:_0x4fafd1,type:_0x1afdf3,key:_0x10f674,clock:_0x33865a,origin:_0x323d35,action:_0xb9e285,newValue:_0x1ef4a6,oldValue:_0xd47885}=_0x42f7f3;if(_0x4fafd1==null||_0x1afdf3==null||_0x10f674==null)return;if(typeof _0x4fafd1===_0x15272b(0x361)&&_0x4fafd1[_0x15272b(0x1f7)]('~'))return;if(typeof _0x1afdf3===_0x15272b(0x361)&&_0x1afdf3['startsWith']('~'))return;if(!this[_0x15272b(0x278)](_0x4fafd1,_0x1afdf3,_0x10f674,_0x33865a))return;const _0x205581=_0xb9e285===_0x4a6cfb[_0x15272b(0x352)]?'remove':_0x15272b(0x281);this['emit'](_0x15272b(0x308),{'env':_0x4fafd1,'type':_0x1afdf3,'key':_0x10f674,'op':_0x205581,'clock':_0x33865a,'origin':_0x323d35,'value':_0x205581===_0x15272b(0x34e)?null:_0x1ef4a6,'prevValue':_0xd47885});}[_0x4bddb6(0x37c)](_0x55fcbf){const _0x17d8a7=_0x4bddb6;if(!this[_0x17d8a7(0x3f8)])return;if(!_0x55fcbf||typeof _0x55fcbf[_0x17d8a7(0x394)]!=='string'||typeof _0x55fcbf['type']!==_0x17d8a7(0x361))return;const {env:_0xe40746,type:_0x55acce}=_0x55fcbf;if(_0xe40746[_0x17d8a7(0x1f7)]('~')||_0x55acce[_0x17d8a7(0x1f7)]('~'))return;this[_0x17d8a7(0x24a)][_0x17d8a7(0x275)](_0xe40746+'\x00'+_0x55acce,{'env':_0xe40746,'type':_0x55acce}),this[_0x17d8a7(0x2d6)]();}[_0x4bddb6(0x2d6)](){const _0x59a0b4=_0x4bddb6;if(this[_0x59a0b4(0x203)])return;const _0x493b09=()=>{const _0x1c5c0b=_0x59a0b4;this[_0x1c5c0b(0x203)]=null,this[_0x1c5c0b(0x3ec)]()['catch'](()=>{});};this['_flushTimer']=setTimeout(_0x493b09,this[_0x59a0b4(0x2c9)]>0x0?this[_0x59a0b4(0x2c9)]:0x0);}async[_0x4bddb6(0x3ec)](){const _0x4b4e45=_0x4bddb6;if(this[_0x4b4e45(0x209)]){this[_0x4b4e45(0x2d6)]();return;}this[_0x4b4e45(0x209)]=!![];try{const _0xdad157=[...this['_pending']['values']()];this[_0x4b4e45(0x24a)][_0x4b4e45(0x2ba)]();let _0x4aa216=![];for(const {env:_0x405c0a,type:_0x301da6}of _0xdad157){try{const _0x10cc30=await this[_0x4b4e45(0x248)](_0x405c0a,_0x301da6);if(_0x10cc30)_0x4aa216=!![];}catch{this['_pending'][_0x4b4e45(0x275)](_0x405c0a+'\x00'+_0x301da6,{'env':_0x405c0a,'type':_0x301da6}),_0x4aa216=!![];}}if(_0x4aa216||this[_0x4b4e45(0x24a)][_0x4b4e45(0x261)]>0x0)this[_0x4b4e45(0x2d6)]();}finally{this[_0x4b4e45(0x209)]=![];}}async['_drainOne'](_0x7dafd5,_0x4b98b3){const _0x17c2bc=_0x4bddb6,_0x36e2a2=await this[_0x17c2bc(0x292)]['_openEnvLazy'](_0x7dafd5),_0x2324bb=_0x7dafd5+'\x00'+_0x4b98b3;!this[_0x17c2bc(0x290)][_0x17c2bc(0x23e)](_0x2324bb)&&(!this[_0x17c2bc(0x2c4)][_0x17c2bc(0x23e)](_0x7dafd5)&&(_0x36e2a2[_0x17c2bc(0x355)](),this['_baselines']['set'](_0x7dafd5,_0x36e2a2['getClock']()||0x0)),this[_0x17c2bc(0x290)][_0x17c2bc(0x275)](_0x2324bb,this[_0x17c2bc(0x2c4)][_0x17c2bc(0x256)](_0x7dafd5)));const _0x51ac58=this[_0x17c2bc(0x290)][_0x17c2bc(0x256)](_0x2324bb),_0x316732=_0x36e2a2[_0x17c2bc(0x236)](_0x4b98b3)||0x0;if(_0x316732<=_0x51ac58)return![];const _0x381b21=_0x51ac58+this[_0x17c2bc(0x3e4)],_0x55afb4=Math[_0x17c2bc(0x249)](_0x316732,_0x381b21),_0x56646=_0x20ca17[_0x17c2bc(0x215)]?_0x20ca17[_0x17c2bc(0x3fc)]():0x0,_0x4b654d=Array['from'](_0x36e2a2[_0x17c2bc(0x32d)](_0x4b98b3,_0x51ac58+0x1,_0x55afb4));let _0x4eeeec=_0x51ac58;for(const _0x57b222 of _0x4b654d){const {clock:_0x3dd85c,key:_0x24394c,action:_0x2cffed,origin:_0x149591}=_0x57b222;if(_0x3dd85c>_0x4eeeec)_0x4eeeec=_0x3dd85c;if(_0x24394c==null)continue;if(!this['_markSeen'](_0x7dafd5,_0x4b98b3,_0x24394c,_0x3dd85c))continue;let _0xbc399a,_0x5f3088;if(_0x2cffed===_0x4a6cfb[_0x17c2bc(0x352)])_0xbc399a=_0x17c2bc(0x34e),_0x5f3088=null;else{const _0x1f09d4=_0x36e2a2[_0x17c2bc(0x256)](_0x4b98b3,_0x24394c);_0x1f09d4==null?(_0xbc399a=_0x17c2bc(0x34e),_0x5f3088=null):(_0xbc399a=_0x17c2bc(0x281),_0x5f3088=_0x1f09d4);}this[_0x17c2bc(0x2d2)](_0x17c2bc(0x308),{'env':_0x7dafd5,'type':_0x4b98b3,'key':_0x24394c,'op':_0xbc399a,'clock':_0x3dd85c,'origin':_0x149591,'value':_0x5f3088});}if(_0x20ca17['enabled'])_0x20ca17[_0x17c2bc(0x2a1)](_0x17c2bc(0x22a)+_0x7dafd5+':'+_0x4b98b3,_0x20ca17['now']()-_0x56646,'n='+_0x4b654d['length']);return this[_0x17c2bc(0x290)][_0x17c2bc(0x275)](_0x2324bb,Math[_0x17c2bc(0x287)](_0x4eeeec,_0x55afb4)),_0x36e2a2[_0x17c2bc(0x236)](_0x4b98b3)>_0x55afb4;}[_0x4bddb6(0x243)](){const _0x1e60a2=_0x4bddb6;return{'started':this[_0x1e60a2(0x3f8)],'quantum':this[_0x1e60a2(0x3e4)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x1e60a2(0x26e)]([...this[_0x1e60a2(0x290)][_0x1e60a2(0x20c)]()][_0x1e60a2(0x38b)](([_0xe8e7bb,_0x1b8da1])=>[_0xe8e7bb[_0x1e60a2(0x212)]('\x00',':'),_0x1b8da1])),'pending':this['_pending'][_0x1e60a2(0x261)],'seen':this[_0x1e60a2(0x331)][_0x1e60a2(0x261)]};}}return _0x5092d4['CHANGEFEED_QUANTUM']=_0x1eb994,okdbChangefeed={'OKDBChangefeed':_0x5092d4},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x5ba5e3=_0x3b4fb0;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x31d508=require$$1$1,_0xea03e7=require$$1,{EVENTS:_0xd81128}=requireOkdbEnums(),_0x237cd5=require$$0$3,{slotKey:_0x64c170}=requireOkdbProcessRegistry(),_0x12f7f5=0xfa,_0x349298=0xfa0,_0x91b31f=0x5,_0x41ab54=0x2710,_0xf72a24=0xbb8,_0x1e616f=0x7d0,_0x19b40e=_0x5ba5e3(0x1f5),_0x38dd32=_0x5ba5e3(0x38e),_0x4a1564='log',_0x447617=_0x5ba5e3(0x33f),_0x53ba27=[_0xd81128['VIEW_PROGRESS'],_0xd81128[_0x5ba5e3(0x30d)],_0xd81128[_0x5ba5e3(0x293)],_0xd81128[_0x5ba5e3(0x333)],_0xd81128[_0x5ba5e3(0x3d0)],_0xd81128[_0x5ba5e3(0x2c3)],_0xd81128['INDEX_RESET'],_0xd81128[_0x5ba5e3(0x3d4)],_0x5ba5e3(0x34d),_0x5ba5e3(0x362),'processor:error',_0x5ba5e3(0x36c),'processor:resumed',_0x5ba5e3(0x3a5)],_0x4e75af=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x3e5f8b({workers:_0x4f10f5,makeOkdb:_0x5b2c9d,port:_0x46aca5,primaryOkdb:_0x65e3ea,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x5bc2a2=_0x5ba5e3;if(_0x31d508['isPrimary'])return childEntry&&_0x31d508[_0x5bc2a2(0x36d)]({'exec':_0xea03e7[_0x5bc2a2(0x1ec)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x54df4d=_0x5bc2a2,_0x18f907=[];for(let _0x214f7f=0x0;_0x214f7f<process[_0x54df4d(0x245)]['length'];_0x214f7f++){const _0x2a2eda=process[_0x54df4d(0x245)][_0x214f7f];if(_0x2a2eda[_0x54df4d(0x1f7)]('--test')||_0x2a2eda[_0x54df4d(0x1f7)]('--watch')||_0x2a2eda['startsWith'](_0x54df4d(0x386)))continue;if(_0x2a2eda==='-e'||_0x2a2eda===_0x54df4d(0x1df)||_0x2a2eda==='-p'||_0x2a2eda===_0x54df4d(0x3c9)){_0x214f7f++;continue;}_0x18f907[_0x54df4d(0x39a)](_0x2a2eda);}return _0x18f907;})())}),_0x5dc38e({'workers':_0x4f10f5,'port':_0x46aca5,'primaryOkdb':_0x65e3ea,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x46aca5});return _0x32dd4a({'makeOkdb':_0x5b2c9d,'port':_0x46aca5});}function _0x5dc38e({workers:_0x545f3b,port:_0x1d9c2e,primaryOkdb:_0x100b0c,workerEnv:_0x1d703f,workerRole:_0xd3eb50,listenAddr:_0x334ce}){const _0x333c73=_0x5ba5e3,_0x342899=new Map(),_0x273236=new Map();let _0x4df2d7=![];const _0x4d7510=_0x574f6c=>_0x574f6c?.['__okdbSlot'],_0x29d494=_0xc83bd9=>{const _0x49122a=_0x55dd,_0x327e1b=_0x31d508[_0x49122a(0x326)]({...process.env,..._0x1d703f||{},'OKDB_CLUSTER_SLOT':String(_0xc83bd9)});return _0x327e1b['__okdbSlot']=_0xc83bd9,_0x342899[_0x49122a(0x275)](_0x327e1b[_0x49122a(0x3dc)][_0x49122a(0x2c8)],{'worker':_0x327e1b,'startedAt':Date[_0x49122a(0x3fc)](),'slot':_0xc83bd9}),_0x327e1b['on'](_0x49122a(0x258),_0x5a0f0c=>{const _0x124fce=_0x49122a;console[_0x124fce(0x2a7)](_0x124fce(0x2ce)+_0x327e1b[_0x124fce(0x3dc)][_0x124fce(0x2c8)]+_0x124fce(0x240)+(_0x5a0f0c?.[_0x124fce(0x30e)]??_0x5a0f0c));}),_0x327e1b['on'](_0x49122a(0x1e5),()=>_0x5574a3()),_0x327e1b;},_0xc76da8=_0x378eee=>{const _0xabbb62=_0x55dd;for(const {worker:_0x34ec89}of _0x342899[_0xabbb62(0x3fe)]()){if(_0x34ec89['isDead']()||!_0x34ec89['isConnected']())continue;try{_0x34ec89[_0xabbb62(0x3f3)](_0x378eee);}catch{}}};_0x100b0c?.[_0x333c73(0x20b)]?.({'kind':_0x333c73(0x35f),'listenAddr':_0x334ce})['catch'](()=>{}),_0x100b0c?.[_0x333c73(0x2c6)]?.[_0x333c73(0x3e8)]?.({'workersConfigured':_0x545f3b});const _0x2223a8={'engines':!![],'processors':!![],'compaction':!![],..._0xd3eb50,'http':!![]},_0x5574a3=()=>{const _0x3da994=_0x333c73,_0x180b1f=_0x100b0c?.['processes'];if(!_0x180b1f||!_0x180b1f[_0x3da994(0x2b3)])return;const _0xb292a6=_0x180b1f[_0x3da994(0x251)];for(const {worker:_0xfcc9c2,startedAt:_0x12bca,slot:_0x2c6c11,stats:_0x3dc7d6,processing:_0x7ce78f}of _0x342899['values']()){if(_0xfcc9c2[_0x3da994(0x330)]())continue;const _0x589f03=_0x180b1f[_0x3da994(0x288)]?.()&&_0x180b1f[_0x3da994(0x1fb)](_0x3da994(0x24b),_0x31325e(_0x2c6c11))?.[_0x3da994(0x26f)]===!![];_0x180b1f['publishChildRow']({'pid':_0xfcc9c2[_0x3da994(0x3dc)]['pid'],'startedAt':_0x12bca,'kind':'http-server','supervisorKey':_0xb292a6,'slot':_0x2c6c11,'slotKey':_0x31325e(_0x2c6c11),'role':_0x2223a8,'listenAddr':_0x334ce,'lifecycle':_0x589f03?_0x3da994(0x31d):'running','processing':_0x7ce78f??null,'stats':_0x3dc7d6??null})[_0x3da994(0x299)](()=>{});}},_0x31325e=_0x5b4212=>_0x64c170(_0x333c73(0x28c)+_0x1d9c2e,_0x5b4212),_0x4088cc=_0xae2e4a=>{const _0x4557cf=_0x333c73,_0x361d9c=_0x100b0c?.[_0x4557cf(0x2c6)];if(!_0x361d9c?.[_0x4557cf(0x288)]?.())return![];return _0x361d9c[_0x4557cf(0x1fb)](_0x4557cf(0x24b),_0x31325e(_0xae2e4a))?.[_0x4557cf(0x26f)]===!![];};for(let _0x5744f9=0x0;_0x5744f9<_0x545f3b;_0x5744f9++){const _0x907e3e=_0x4088cc(_0x5744f9);_0x273236[_0x333c73(0x275)](_0x5744f9,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x907e3e,'respawnTimer':null}),_0x907e3e?console[_0x333c73(0x2a7)]('[okdb-cluster]\x20slot='+_0x5744f9+_0x333c73(0x1f0)):_0x29d494(_0x5744f9);}const _0x56626a=()=>{const _0x42acc7=_0x333c73,_0xae9667=_0x100b0c?.[_0x42acc7(0x2c6)];if(!_0xae9667?.[_0x42acc7(0x2b3)]||!_0xae9667[_0x42acc7(0x288)]?.())return;for(const [_0x47debe,_0x3fa150]of _0x273236['entries']()){const _0x1d888e=_0xae9667['getDesired'](_0x42acc7(0x24b),_0x31325e(_0x47debe)),_0xfdcf4f=_0x1d888e?.[_0x42acc7(0x26f)]===!![],_0x226f64=_0x1d888e?.['kill']===!![];if(_0xfdcf4f&&!_0x3fa150[_0x42acc7(0x32b)]){_0x3fa150[_0x42acc7(0x32b)]=!![];_0x3fa150[_0x42acc7(0x217)]&&(clearTimeout(_0x3fa150[_0x42acc7(0x217)]),_0x3fa150[_0x42acc7(0x217)]=null);for(const {worker:_0x4b2cbd}of _0x342899[_0x42acc7(0x3fe)]()){if(_0x4d7510(_0x4b2cbd)!==_0x47debe||_0x4b2cbd[_0x42acc7(0x330)]())continue;try{if(_0x226f64)_0x4b2cbd[_0x42acc7(0x3dc)][_0x42acc7(0x3ef)](_0x42acc7(0x309));else _0x4b2cbd['isConnected']()&&_0x4b2cbd[_0x42acc7(0x2b4)]();}catch{}}console[_0x42acc7(0x2a7)](_0x42acc7(0x2f5)+(_0x226f64?_0x42acc7(0x364):_0x42acc7(0x3ff))+'\x20worker\x20slot='+_0x47debe+'\x20(durable\x20desired-state)');}else{if(!_0xfdcf4f&&_0x3fa150[_0x42acc7(0x32b)]&&_0x1d888e){_0x3fa150[_0x42acc7(0x32b)]=![],_0x3fa150['deaths']=[],_0x3fa150['consecutiveFailures']=0x0;const _0x103bbf=[..._0x342899[_0x42acc7(0x3fe)]()]['some'](({worker:_0x51b709})=>_0x4d7510(_0x51b709)===_0x47debe&&!_0x51b709[_0x42acc7(0x330)]());!_0x103bbf&&!_0x4df2d7&&(_0x29d494(_0x47debe),console['log'](_0x42acc7(0x2f9)+_0x47debe));}}}},_0x19418a=()=>{try{_0x56626a();}catch{}};_0x100b0c?.['events']?.['on']?.(_0xd81128['SYSTEM_PROC'],_0x19418a);const _0x371323=[];if(_0x100b0c?.[_0x333c73(0x250)]?.['on'])for(const _0x5d3c0e of _0x53ba27){const _0x4004b2=_0x3be4dd=>{_0xc76da8({[_0x19b40e]:_0x38dd32,'event':_0x5d3c0e,'data':_0x3be4dd??{}});};_0x100b0c[_0x333c73(0x250)]['on'](_0x5d3c0e,_0x4004b2),_0x371323['push']({'event':_0x5d3c0e,'handler':_0x4004b2});}const _0xe772aa=setInterval(()=>{_0x56626a(),_0x5574a3();},_0x4e75af);_0xe772aa['unref']?.();const _0x510abb=(_0x13762b,_0x11e59f)=>{const _0x128404=_0x333c73;if(!_0x11e59f||typeof _0x11e59f!==_0x128404(0x234)||_0x11e59f[_0x19b40e]!==_0x4a1564)return;if(!_0x100b0c?.[_0x128404(0x2a7)]?.[_0x128404(0x3d2)])return;const _0x385764=_0x11e59f[_0x128404(0x347)]||{};_0x100b0c[_0x128404(0x2a7)][_0x128404(0x3d2)]({..._0x385764,'msg':'[w'+_0x11e59f[_0x128404(0x24b)]+']\x20'+(_0x385764[_0x128404(0x1e6)]??''),'meta':{..._0x385764[_0x128404(0x1e1)]||{},'worker':_0x11e59f[_0x128404(0x24b)],'workerPid':_0x11e59f[_0x128404(0x2c8)]}});};_0x31d508['on'](_0x333c73(0x30e),_0x510abb);const _0x17c8cc=(_0x2682d1,_0x5a29a3)=>{const _0x23abc7=_0x333c73;if(!_0x5a29a3||typeof _0x5a29a3!==_0x23abc7(0x234)||_0x5a29a3[_0x19b40e]!==_0x447617)return;const _0x3aded9=_0x342899[_0x23abc7(0x256)](_0x2682d1['process'][_0x23abc7(0x2c8)]);if(_0x3aded9){_0x3aded9[_0x23abc7(0x33f)]={..._0x5a29a3['stats'],'at':Date[_0x23abc7(0x3fc)]()};if(_0x5a29a3[_0x23abc7(0x2dd)]!==undefined)_0x3aded9[_0x23abc7(0x2dd)]=_0x5a29a3[_0x23abc7(0x2dd)];}};_0x31d508['on'](_0x333c73(0x30e),_0x17c8cc),_0x31d508['on'](_0x333c73(0x376),(_0xf0f750,_0x263ee3,_0x34f628)=>{const _0x5c6ece=_0x333c73,_0x206cce=_0xf0f750[_0x5c6ece(0x3dc)][_0x5c6ece(0x2c8)],_0x34f51f=_0x4d7510(_0xf0f750),_0x39f7d8=_0x342899[_0x5c6ece(0x256)](_0x206cce);if(_0x39f7d8&&_0x100b0c?.[_0x5c6ece(0x2c6)])_0x100b0c['processes'][_0x5c6ece(0x325)](_0x206cce+':'+_0x39f7d8[_0x5c6ece(0x211)])[_0x5c6ece(0x299)](()=>{});_0x342899[_0x5c6ece(0x2aa)](_0x206cce),console['log']('[okdb-cluster]\x20worker\x20pid='+_0x206cce+_0x5c6ece(0x1e9)+(_0x34f51f??'?')+')\x20exited\x20'+('(code='+_0x263ee3+',\x20signal='+(_0x34f628??_0x5c6ece(0x305))+_0x5c6ece(0x2cb)+_0x342899[_0x5c6ece(0x261)]+_0x5c6ece(0x274))),_0x5574a3();if(_0x4df2d7||_0x34f51f==null)return;const _0x55f244=_0x273236['get'](_0x34f51f);if(!_0x55f244||_0x55f244['dead'])return;const _0x358d6c=Date[_0x5c6ece(0x3fc)]();_0x55f244['deaths']['push'](_0x358d6c),_0x55f244[_0x5c6ece(0x272)]=_0x55f244[_0x5c6ece(0x272)][_0x5c6ece(0x3d7)](_0xc85848=>_0x358d6c-_0xc85848<=_0x41ab54);if(_0x55f244['deaths'][_0x5c6ece(0x21a)]>=_0x91b31f){_0x55f244[_0x5c6ece(0x32b)]=!![],console[_0x5c6ece(0x258)](_0x5c6ece(0x270)+_0x34f51f+'\x20died\x20'+_0x55f244[_0x5c6ece(0x272)][_0x5c6ece(0x21a)]+_0x5c6ece(0x294)+(_0x41ab54+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x342899[_0x5c6ece(0x261)]+'\x20worker(s)\x20still\x20serving'));return;}_0x55f244[_0x5c6ece(0x2a8)]++;const _0x2e493b=Math[_0x5c6ece(0x249)](_0x349298,_0x12f7f5*0x2**(_0x55f244[_0x5c6ece(0x2a8)]-0x1));console['log'](_0x5c6ece(0x360)+_0x34f51f+_0x5c6ece(0x252)+_0x2e493b+_0x5c6ece(0x2bb)+_0x55f244[_0x5c6ece(0x2a8)]+')'),_0x55f244[_0x5c6ece(0x217)]=setTimeout(()=>{const _0x40bc37=_0x5c6ece;_0x55f244[_0x40bc37(0x217)]=null;if(_0x4df2d7||_0x55f244[_0x40bc37(0x32b)])return;const _0x5102be=_0x29d494(_0x34f51f);_0x5102be[_0x40bc37(0x2bc)]('listening',()=>{const _0x2c955a=_0x40bc37;if(_0x273236[_0x2c955a(0x256)](_0x34f51f)===_0x55f244)_0x55f244[_0x2c955a(0x2a8)]=0x0;});},_0x2e493b),_0x55f244[_0x5c6ece(0x217)][_0x5c6ece(0x3e3)]?.();});const _0x23c70d=[..._0x342899['keys']()];console[_0x333c73(0x2a7)](_0x333c73(0x1ed)+process[_0x333c73(0x2c8)]+_0x333c73(0x21e)+_0x545f3b+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x1d9c2e+':\x20'+('['+_0x23c70d[_0x333c73(0x1ec)](',\x20')+']'));const _0x589a59={'_isClusterController':!![],'port':_0x1d9c2e,'primaryOkdb':_0x100b0c??null,'status'(){const _0x50d009=_0x333c73;return{'clustered':!![],'primaryPid':process[_0x50d009(0x2c8)],'port':_0x1d9c2e,'primaryRole':_0x100b0c?.['role']??null,'processorPid':null,'supervisorPid':process[_0x50d009(0x2c8)],'workers':[..._0x342899[_0x50d009(0x3fe)]()][_0x50d009(0x38b)](({worker:_0x2ef154})=>({'pid':_0x2ef154[_0x50d009(0x3dc)][_0x50d009(0x2c8)],'id':_0x2ef154['id'],'dead':_0x2ef154[_0x50d009(0x330)]()}))};},async 'close'(){const _0x45134c=_0x333c73;_0x4df2d7=!![];for(const _0x17d20c of _0x273236[_0x45134c(0x3fe)]()){_0x17d20c['dead']=!![],_0x17d20c[_0x45134c(0x217)]&&(clearTimeout(_0x17d20c[_0x45134c(0x217)]),_0x17d20c['respawnTimer']=null);}clearInterval(_0xe772aa),_0x31d508[_0x45134c(0x29f)](_0x45134c(0x30e),_0x510abb),_0x31d508[_0x45134c(0x29f)]('message',_0x17c8cc),_0x100b0c?.[_0x45134c(0x250)]?.[_0x45134c(0x29f)]?.(_0xd81128[_0x45134c(0x1cf)],_0x19418a);if(_0x100b0c?.[_0x45134c(0x250)]?.[_0x45134c(0x29f)])for(const {event:_0x10fffb,handler:_0x24ad4e}of _0x371323){try{_0x100b0c[_0x45134c(0x250)][_0x45134c(0x29f)](_0x10fffb,_0x24ad4e);}catch{}}_0x371323[_0x45134c(0x21a)]=0x0;const _0x18a545=[..._0x342899[_0x45134c(0x3fe)]()][_0x45134c(0x38b)](({worker:_0x4059e8})=>_0x4059e8);if(_0x18a545[_0x45134c(0x21a)]===0x0)return;await Promise[_0x45134c(0x34f)](_0x18a545['map'](_0x1db7a9=>new Promise(_0x25822d=>{const _0xc94eca=_0x45134c;if(_0x1db7a9[_0xc94eca(0x330)]()){_0x25822d();return;}let _0x4dff2a=![];const _0x5a6884=()=>{if(_0x4dff2a)return;_0x4dff2a=!![];if(_0x3b9c11)clearTimeout(_0x3b9c11);_0x25822d();};_0x1db7a9[_0xc94eca(0x2bc)]('exit',_0x5a6884);const _0x3b9c11=setTimeout(()=>{const _0x1fd4b6=_0xc94eca;try{_0x1db7a9[_0x1fd4b6(0x3dc)][_0x1fd4b6(0x3ef)]();}catch{}},_0xf72a24+0x1f4);_0x3b9c11[_0xc94eca(0x3e3)]?.();try{_0x1db7a9['disconnect']();}catch{try{_0x1db7a9[_0xc94eca(0x3dc)][_0xc94eca(0x3ef)]();}catch{}}})));}};return _0x589a59;}async function _0x32dd4a({makeOkdb:_0x5f2b11,port:_0x497032}){const _0x2da356=_0x5ba5e3,_0x33860e=await _0x5f2b11();return _0x1611db(_0x33860e),_0x33860e['http'][_0x2da356(0x3dd)](_0x497032);}function _0x1611db(_0x159330){const _0x34bf2f=_0x5ba5e3;if(!_0x159330||_0x159330[_0x34bf2f(0x3b2)])return;_0x159330['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x161623}=requireOkdbChangefeed(),_0x8f5c7c=_0x159330[_0x34bf2f(0x22c)];if(_0x8f5c7c&&typeof _0x8f5c7c[_0x34bf2f(0x3df)]==='function'){const _0xb1c41=new _0x161623(_0x159330);_0xb1c41[_0x34bf2f(0x3c3)](),_0x8f5c7c[_0x34bf2f(0x3df)](_0xb1c41),_0x159330[_0x34bf2f(0x263)]=_0xb1c41;}}catch(_0x828495){_0x159330[_0x34bf2f(0x2a7)]?.['warn']?.(_0x34bf2f(0x26a)+(_0x828495?.['message']??_0x828495),{'feature':_0x34bf2f(0x336)});}const _0x5d39b4=_0x5deb2e=>{const _0x76e57d=_0x34bf2f;if(!_0x5deb2e||typeof _0x5deb2e!==_0x76e57d(0x234)||_0x5deb2e[_0x19b40e]==null)return;if(_0x5deb2e[_0x19b40e]===_0x38dd32)try{_0x159330['_adminRelay']?.[_0x76e57d(0x241)]?.(_0x5deb2e['event'],_0x5deb2e[_0x76e57d(0x25c)]);}catch{}};process['on'](_0x34bf2f(0x30e),_0x5d39b4),_0x159330[_0x34bf2f(0x265)]=_0x5d39b4;{let _0x41ef50=process['cpuUsage'](),_0x1459cc=Date['now']();const _0x47ffdb=()=>{const _0x1673e2=_0x34bf2f;if(typeof process[_0x1673e2(0x3f3)]!=='function'||!process['connected'])return;const _0x5a9007=Date[_0x1673e2(0x3fc)](),_0x51a590=process[_0x1673e2(0x1fc)](),_0x35229b=(_0x5a9007-_0x1459cc)*0x3e8,_0x315318=_0x51a590[_0x1673e2(0x381)]-_0x41ef50['user']+(_0x51a590[_0x1673e2(0x27d)]-_0x41ef50[_0x1673e2(0x27d)]),_0x205eb8=_0x35229b>0x0?Math[_0x1673e2(0x249)](0x64,Math[_0x1673e2(0x276)](_0x315318/(_0x35229b*(_0x237cd5[_0x1673e2(0x2bd)]()[_0x1673e2(0x21a)]||0x1))*0x64)):0x0;_0x41ef50=_0x51a590,_0x1459cc=_0x5a9007;const _0x34f147=process[_0x1673e2(0x395)]();let _0x1884dc=null;try{_0x1884dc=_0x159330['role']?.['processors']?_0x159330[_0x1673e2(0x2c6)]?.['_buildProcessingFacet']?.()??null:null;}catch{}try{process['send']({[_0x19b40e]:_0x447617,'stats':{'rss':_0x34f147[_0x1673e2(0x34c)],'heapUsed':_0x34f147['heapUsed'],'heapTotal':_0x34f147[_0x1673e2(0x3f1)],'external':_0x34f147['external'],'cpuPct':_0x205eb8,'cpuWindowMs':Math[_0x1673e2(0x276)](_0x35229b/0x3e8)||null},'processing':_0x1884dc});}catch{}},_0x5961da=Math[_0x34bf2f(0x287)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3a81ba=setInterval(_0x47ffdb,_0x5961da);_0x3a81ba[_0x34bf2f(0x3e3)]?.(),_0x47ffdb();for(const _0x3816e1 of[_0x34bf2f(0x36c),_0x34bf2f(0x3c8)]){_0x159330[_0x34bf2f(0x250)]?.['on']?.(_0x3816e1,()=>{try{_0x47ffdb();}catch{}});}}let _0x20ce7e=![];const _0x400a49=async _0x59f0c3=>{const _0x47521d=_0x34bf2f;if(_0x20ce7e)return;_0x20ce7e=!![];const _0x236035=setTimeout(()=>process['exit'](_0x59f0c3),_0xf72a24);_0x236035[_0x47521d(0x3e3)]?.();try{await _0x159330[_0x47521d(0x1da)]?.();}catch{}process[_0x47521d(0x376)](_0x59f0c3);};process['on']('disconnect',()=>_0x400a49(0x0));if(process[_0x34bf2f(0x3a2)]!=='win32'){const _0x41904b=setInterval(()=>{const _0x9585a5=_0x34bf2f;if(process[_0x9585a5(0x37d)]===0x1)_0x400a49(0x0);},_0x1e616f);_0x41904b[_0x34bf2f(0x3e3)]?.(),_0x159330[_0x34bf2f(0x389)]=_0x41904b;}}return okdbCluster={'runClustered':_0x3e5f8b,'attachWorkerCluster':_0x1611db},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x2e0b34=_0x3b4fb0;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x5bd2d9=require$$0$5,{attachWorkerCluster:_0x294172}=requireOkdbCluster();async function _0x9560(){const _0x14a846=_0x55dd,_0x2c76fc=process.env.OKDB_HTTP_CHILD;if(!_0x2c76fc)throw new Error(_0x14a846(0x1fd));const {rootPath:_0x2062a1,port:_0x4d1e52,options:options={},logLevel:logLevel=_0x14a846(0x3ea)}=JSON[_0x14a846(0x371)](_0x2c76fc);if(!_0x2062a1||!_0x4d1e52)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0x37d494=new _0x5bd2d9(_0x2062a1,{...options,'engines':![],'processors':![],'compaction':![]});_0x37d494['log'][_0x14a846(0x28a)]?.();const _0x1ba4b9=process.env.OKDB_CLUSTER_SLOT??'?',_0x7ed467={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x23cf5c=_0x7ed467[logLevel]??_0x7ed467[_0x14a846(0x3ea)];_0x37d494[_0x14a846(0x2a7)][_0x14a846(0x33e)](_0x48c4bc=>{const _0x4ddc15=_0x14a846;if((_0x7ed467[_0x48c4bc[_0x4ddc15(0x2ec)]]??0x1)<_0x23cf5c)return;try{process[_0x4ddc15(0x3f3)]?.({'__okdbCluster':'log','slot':_0x1ba4b9,'pid':process[_0x4ddc15(0x2c8)],'entry':_0x48c4bc});}catch{}}),await _0x37d494[_0x14a846(0x311)](),_0x294172(_0x37d494),await _0x37d494['http']['listen'](_0x4d1e52);}return _0x9560()[_0x2e0b34(0x299)](_0x11cd63=>{const _0x3a2491=_0x2e0b34;try{process['send']?.({'__okdbCluster':_0x3a2491(0x2a7),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x3a2491(0x2c8)],'entry':{'level':_0x3a2491(0x258),'msg':_0x3a2491(0x3b9)+(_0x11cd63?.[_0x3a2491(0x30e)]??_0x11cd63)}});}catch{}process[_0x3a2491(0x376)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x3b4fb0(0x262)]=okdbHttpWorkerChild;