@kedem/okdb 2.0.3 → 2.1.0

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.
Files changed (61) hide show
  1. package/algorithm-worker-thread.js +1 -1
  2. package/bin/okdb.js +1 -1
  3. package/docs/OKDB-ARCHITECTURE.md +16 -2
  4. package/docs/embeddings.md +11 -7
  5. package/docs/index.md +1 -0
  6. package/docs/manifest.json +2 -1
  7. package/docs/pipelines.md +12 -0
  8. package/docs/upgrade-2.1.md +74 -0
  9. package/okdb-functions-sandbox-worker.js +1 -1
  10. package/okdb-http-worker-child.js +1 -1
  11. package/okdb-views-bootstrap-worker.js +1 -1
  12. package/okdb.js +1 -1
  13. package/package.json +1 -1
  14. package/public/layouts/_default.ok.html +3 -1
  15. package/public/sections/db/parts/db-overview.ok.js +1 -1
  16. package/public/sections/embeddings/modals/edit-pipeline-modal.ok.js +1 -0
  17. package/public/sections/embeddings/modals/replace-embedder-modal.ok.js +1 -0
  18. package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -1
  19. package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +1 -1
  20. package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +1 -1
  21. package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -1
  22. package/public/sections/embeddings/parts/embed-worker-panel.ok.js +1 -1
  23. package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
  24. package/public/sections/embeddings/parts/pipeline-flow-strip.ok.js +1 -0
  25. package/public/sections/embeddings/parts/pipeline-try-search.ok.js +1 -0
  26. package/public/sections/engines/engine-ui-utils.js +1 -1
  27. package/public/sections/engines/index.ok.html +1 -1
  28. package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
  29. package/public/sections/engines/parts/engine-lifecycle-actions.ok.js +1 -1
  30. package/public/sections/engines/parts/engine-panel-shell.ok.js +1 -1
  31. package/public/sections/engines/parts/engine-resource-card.ok.js +1 -1
  32. package/public/sections/functions/index.ok.html +1 -1
  33. package/public/sections/system/index.ok.html +1 -1
  34. package/public/sections/system/parts/system-locks-panel.ok.js +1 -1
  35. package/public/sections/system/parts/system-storage-panel.ok.js +1 -0
  36. package/public/sections/views/index.ok.html +1 -1
  37. package/public/stores/auth-store.js +1 -1
  38. package/public/stores/events-store.js +1 -1
  39. package/public/styles.css +1 -1
  40. package/public/vendor/okjs/ok.esm.min.js +1 -1
  41. package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
  42. package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -1
  43. package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
  44. package/public/vendor/okjs/toolkit/core/ok-layer-service.ok.js +1 -1
  45. package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
  46. package/public/vendor/okjs/toolkit/devtools/ok-console.ok.js +1 -1
  47. package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor-service.ok.js +1 -1
  48. package/public/vendor/okjs/toolkit/errors/ok-crash-info.ok.js +1 -1
  49. package/public/vendor/okjs/toolkit/interaction/ok-contextmenu.ok.js +1 -1
  50. package/public/vendor/okjs/toolkit/interaction/ok-flyover-panel.ok.js +1 -1
  51. package/public/vendor/okjs/toolkit/interaction/ok-hotkeys-service.ok.js +1 -1
  52. package/public/vendor/okjs/toolkit/interaction/ok-popout-service.ok.js +1 -1
  53. package/public/vendor/okjs/toolkit/interaction/ok-submenu.ok.js +1 -1
  54. package/public/vendor/okjs/toolkit/layout/ok-resizer.ok.js +1 -1
  55. package/public/vendor/okjs/toolkit/manifest.js +1 -1
  56. package/public/vendor/okjs/toolkit/modals/ok-modal-service.ok.js +1 -1
  57. package/public/vendor/okjs/toolkit/modals/ok-modal.ok.js +1 -1
  58. package/public/vendor/okjs/toolkit/modals/ok-toast-service.ok.js +1 -1
  59. package/public/vendor/okjs/toolkit/theming/ok-design-style.js +1 -1
  60. package/public/vendor/okjs/toolkit/theming/ok-theme.ok.js +1 -1
  61. package/public/sections/db/parts/db-pipelines-panel.ok.js +0 -1
@@ -1 +1 @@
1
- 'use strict';const _0x6505f9=_0x53b1;function _0x53b1(_0xf05cc9,_0x49d982){_0xf05cc9=_0xf05cc9-0x165;const _0x2029ab=_0x2029();let _0x53b1a4=_0x2029ab[_0xf05cc9];return _0x53b1a4;}(function(_0x1ff62d,_0x1f530b){const _0x40532=_0x53b1,_0x628f3c=_0x1ff62d();while(!![]){try{const _0x3c0be3=-parseInt(_0x40532(0x31f))/0x1+-parseInt(_0x40532(0x2a5))/0x2+parseInt(_0x40532(0x327))/0x3*(-parseInt(_0x40532(0x283))/0x4)+parseInt(_0x40532(0x215))/0x5+parseInt(_0x40532(0x2bf))/0x6+parseInt(_0x40532(0x26c))/0x7*(-parseInt(_0x40532(0x274))/0x8)+parseInt(_0x40532(0x2ec))/0x9;if(_0x3c0be3===_0x1f530b)break;else _0x628f3c['push'](_0x628f3c['shift']());}catch(_0x4a233b){_0x628f3c['push'](_0x628f3c['shift']());}}}(_0x2029,0x93456));var require$$0$5=require(_0x6505f9(0x2bc)),require$$1$1=require(_0x6505f9(0x311)),require$$1=require(_0x6505f9(0x394)),require$$0$3=require('os'),require$$2=require(_0x6505f9(0x26a)),require$$0=require(_0x6505f9(0x275)),require$$0$2=require(_0x6505f9(0x363)),require$$0$1=require('fs'),require$$0$4=require(_0x6505f9(0x35e));function getDefaultExportFromCjs(_0x2ac225){const _0x10e744=_0x6505f9;return _0x2ac225&&_0x2ac225['__esModule']&&Object[_0x10e744(0x249)][_0x10e744(0x168)]['call'](_0x2ac225,_0x10e744(0x262))?_0x2ac225[_0x10e744(0x262)]:_0x2ac225;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x349c19=_0x6505f9;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x1f6fb0={'PUT':'put','REMOVE':_0x349c19(0x2cb),'INDEX_DROP':_0x349c19(0x2fd),'INDEX_REGISTER':_0x349c19(0x1e2),'INDEX_RESET':_0x349c19(0x264),'TYPE_REGISTER':_0x349c19(0x1f9),'TYPE_DROP':_0x349c19(0x329),'FTS_REGISTER':_0x349c19(0x2c9),'FTS_DROP':'dropFts','FTS_RESET':_0x349c19(0x2e3),'SCHEMA_SET':_0x349c19(0x18c),'SCHEMA_DROP':_0x349c19(0x16b),'TTL_SET':_0x349c19(0x36b),'TTL_CLEAR':'clearTtl'},_0x23f4e0={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x349c19(0x2d5),'SYSTEM_DRAIN':_0x349c19(0x17c),'SYSTEM_TYPE_DROP':_0x349c19(0x1dc),'SYSTEM_PROC':_0x349c19(0x229),'SYSTEM_BUS_STATE_CHANGE':_0x349c19(0x31d),'ITEM_CREATE':_0x349c19(0x2d6),'ITEM_UPDATE':_0x349c19(0x390),'ITEM_REMOVE':_0x349c19(0x2c1),'INDEX_RESET':_0x349c19(0x212),'INDEX_READY':_0x349c19(0x2d0),'INDEX_PROGRESS':_0x349c19(0x385),'VIEW_PROGRESS':_0x349c19(0x1f3),'INDEX_DROP':_0x349c19(0x210),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x349c19(0x18e),'FTS_DROP':_0x349c19(0x2af),'FTS_RESET':_0x349c19(0x36c),'SCHEMA_SET':'schema:set','SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x349c19(0x2c0),'UNIQUE_VIOLATION_RESOLVED':_0x349c19(0x334),'REF_VIOLATION':_0x349c19(0x319),'REF_VIOLATION_RESOLVED':_0x349c19(0x1e9),'SYNC_APPLY':_0x349c19(0x1c9),'TXN_START':_0x349c19(0x1a1),'TXN_END':'txn:end','TXN_ROLLBACK':_0x349c19(0x33e),'TYPE_REGISTERED':_0x349c19(0x239),'TYPE_DROP':_0x349c19(0x2fc),'ENV_OPENED':_0x349c19(0x1cb),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x349c19(0x178),'TTL_SET':_0x349c19(0x314),'TTL_CLEAR':_0x349c19(0x33b),'LICENSE_INVALID':_0x349c19(0x286),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x349c19(0x200),'LICENSE_REMOVED':'license:removed'},_0x2874df={'CREATING':'creating','RESETTING':_0x349c19(0x23a),'READY':_0x349c19(0x27b),'DROPPING':_0x349c19(0x331),'WAITING':_0x349c19(0x295)},_0x108634={'CREATED':_0x349c19(0x2db),'STARTING':_0x349c19(0x38a),'STARTED':_0x349c19(0x278),'STOPPING':'stopping','STOPPED':'stopped'},_0x139f53={'CREATING':'creating','READY':_0x349c19(0x27b),'HALTED':_0x349c19(0x28b),'STOPPED':'stopped','RESETTING':_0x349c19(0x23a)},_0xa44e8f=Object[_0x349c19(0x181)]({'POKE':_0x349c19(0x2f3),'DRAIN':_0x349c19(0x32a),'TYPE_DROP':_0x349c19(0x2ad),'PROC':_0x349c19(0x1d8),'ENV_RELEASE':_0x349c19(0x1f0)});return okdbEnums={'BUS_EVENTS':_0xa44e8f,'CHANGE_ACTIONS':_0x1f6fb0,'EVENTS':_0x23f4e0,'INDEX_STATE':_0x2874df,'OKDB_STATE':_0x108634,'VIEW_STATE':_0x139f53},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x2d9d95=_0x6505f9;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x17ee31,performance:_0x43c452}=require$$0,_0x296584=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x2d9d95(0x230),_0x5ac7f1=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x56d273=process.env.OKDB_LOOP_LAG_ALL==='1',_0x344b23=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x431de9{constructor(){const _0xab3d8d=_0x2d9d95;this[_0xab3d8d(0x251)]=_0x296584,this[_0xab3d8d(0x381)]=new Map(),this['_h']=null,this['_timer']=null,this[_0xab3d8d(0x19a)]=![],this[_0xab3d8d(0x1c1)]=(_0x4d06b3,_0x1c7f8e)=>process[_0xab3d8d(0x397)][_0xab3d8d(0x29c)](_0x4d06b3+(_0x1c7f8e?'\x20'+JSON[_0xab3d8d(0x276)](_0x1c7f8e):'')+'\x0a');}[_0x2d9d95(0x2d7)](){const _0x288098=_0x2d9d95;return _0x43c452[_0x288098(0x2d7)]();}['setLogger'](_0x5133ee){const _0x998c27=_0x2d9d95;if(typeof _0x5133ee===_0x998c27(0x296))this['_log']=_0x5133ee;}[_0x2d9d95(0x1a2)](_0x483943,_0x55f1ea,_0x1530fd){const _0x317fdf=_0x2d9d95;if(!this[_0x317fdf(0x251)])return;let _0xe15bc6=this[_0x317fdf(0x381)]['get'](_0x483943);!_0xe15bc6&&(_0xe15bc6={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x317fdf(0x381)][_0x317fdf(0x37b)](_0x483943,_0xe15bc6)),_0xe15bc6['ms']+=_0x55f1ea,_0xe15bc6[_0x317fdf(0x392)]+=0x1,_0x55f1ea>_0xe15bc6['maxMs']&&(_0xe15bc6[_0x317fdf(0x1b1)]=_0x55f1ea,_0xe15bc6[_0x317fdf(0x17d)]=_0x1530fd||'');}[_0x2d9d95(0x1d6)](_0xcc2438){const _0x1d4952=_0x2d9d95;if(!this['enabled']||this[_0x1d4952(0x19a)])return;this['_started']=!![];if(_0xcc2438)this[_0x1d4952(0x1c1)]=_0xcc2438;this['_h']=_0x17ee31({'resolution':0xa}),this['_h']['enable'](),this[_0x1d4952(0x2e1)]=setInterval(()=>this[_0x1d4952(0x170)](),_0x5ac7f1);if(this[_0x1d4952(0x2e1)][_0x1d4952(0x369)])this[_0x1d4952(0x2e1)][_0x1d4952(0x369)]();}['onWindow'](_0x30d910){const _0x5ebcd3=_0x2d9d95;if(!this[_0x5ebcd3(0x2ea)])this[_0x5ebcd3(0x2ea)]=new Set();this['_windowCbs'][_0x5ebcd3(0x237)](_0x30d910);if(!this[_0x5ebcd3(0x19a)])this[_0x5ebcd3(0x2c5)]();}[_0x2d9d95(0x205)](_0x31b506){const _0x2a1064=_0x2d9d95;this[_0x2a1064(0x2ea)]?.[_0x2a1064(0x2e7)](_0x31b506);}['_startAdmission'](){const _0x5141aa=_0x2d9d95;if(this[_0x5141aa(0x1ee)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x17ee31({'resolution':0xa}),this['_h'][_0x5141aa(0x293)]());const _0xd82238=_0x5ac7f1;this['_admissionTimer']=setInterval(()=>{const _0x193af0=_0x5141aa,_0x291f9f=this['_h'];if(!_0x291f9f)return;const _0x19d299=_0x291f9f[_0x193af0(0x23d)](0x63)/0xf4240,_0x2a643d=_0x291f9f[_0x193af0(0x284)]/0xf4240,_0x3b6c56=_0x291f9f['mean']/0xf4240;_0x291f9f[_0x193af0(0x16a)]();if(this[_0x193af0(0x2ea)])for(const _0x30bcbb of this[_0x193af0(0x2ea)]){try{_0x30bcbb({'p99Ms':_0x19d299,'maxMs':_0x2a643d,'meanMs':_0x3b6c56,'reportMs':_0xd82238});}catch{}}},_0xd82238);if(this[_0x5141aa(0x235)][_0x5141aa(0x369)])this[_0x5141aa(0x235)]['unref']();}[_0x2d9d95(0x170)](){const _0x3eafda=_0x2d9d95,_0x513c97=this['_h'],_0x44bc45=_0x513c97[_0x3eafda(0x284)]/0xf4240,_0x14f295=_0x513c97[_0x3eafda(0x23d)](0x63)/0xf4240,_0x23365b=_0x513c97['mean']/0xf4240;_0x513c97[_0x3eafda(0x16a)]();const _0x389344=[...this[_0x3eafda(0x381)][_0x3eafda(0x190)]()][_0x3eafda(0x2bb)](([_0x333fec,_0x5e2cb1])=>({'label':_0x333fec,..._0x5e2cb1}))['sort']((_0x36c262,_0xf14ff1)=>_0xf14ff1['ms']-_0x36c262['ms'])['slice'](0x0,0x8);this[_0x3eafda(0x381)][_0x3eafda(0x225)]();const _0x5a0655=_0x389344[_0x3eafda(0x2e6)]((_0x35af66,_0x1ce033)=>_0x35af66+_0x1ce033['ms'],0x0),_0x38426d=_0x389344[_0x3eafda(0x2bb)](_0x1869bf=>_0x1869bf[_0x3eafda(0x338)]+'='+_0x1869bf['ms'][_0x3eafda(0x291)](0x0)+_0x3eafda(0x350)+_0x1869bf[_0x3eafda(0x392)]+(_0x1869bf[_0x3eafda(0x1b1)]>0x5?'(worst\x20'+_0x1869bf[_0x3eafda(0x1b1)]['toFixed'](0x0)+'ms'+(_0x1869bf[_0x3eafda(0x17d)]?'\x20'+_0x1869bf[_0x3eafda(0x17d)]:'')+')':''));(_0x56d273||_0x44bc45>=_0x344b23)&&this['_log'](_0x3eafda(0x258)+_0x5ac7f1+'ms\x20max='+_0x44bc45[_0x3eafda(0x291)](0x0)+_0x3eafda(0x22b)+_0x14f295[_0x3eafda(0x291)](0x0)+_0x3eafda(0x1e0)+_0x23365b[_0x3eafda(0x291)](0x0)+'ms\x20busy='+_0x5a0655[_0x3eafda(0x291)](0x0)+'ms'+(_0x38426d[_0x3eafda(0x263)]?_0x3eafda(0x1fc)+_0x38426d[_0x3eafda(0x355)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x3eafda(0x2ea)])for(const _0x44259f of this[_0x3eafda(0x2ea)]){try{_0x44259f({'p99Ms':_0x14f295,'maxMs':_0x44bc45,'meanMs':_0x23365b,'reportMs':_0x5ac7f1});}catch{}}}[_0x2d9d95(0x243)](){const _0x221508=_0x2d9d95;if(this[_0x221508(0x2e1)])clearInterval(this[_0x221508(0x2e1)]);if(this['_h'])this['_h'][_0x221508(0x2b1)]();this[_0x221508(0x2e1)]=null,this['_h']=null,this['_started']=![];}}const _0x319ed8=new _0x431de9();if(_0x319ed8['enabled'])_0x319ed8[_0x2d9d95(0x1d6)]();return okdbLoopMonitor={'LOOP':_0x319ed8},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2db843=require$$0$1,_0x26ac9c=require$$1;let _0x12a0b4,_0x34f008,_0x5c400a,_0x2f9468,_0xf2003b,_0x388367,_0x217dec,_0xadbda=![];const _0x264d37=new Set();let _0xdcbd17=null;const _0x7fa144=new Map();function _0x43e3e9(){const _0x4b38e2=_0x53b1;if(_0x12a0b4!==undefined)return _0x12a0b4;_0x12a0b4=process.env.OKDB_DIAG==='1';if(!_0x12a0b4)return![];_0x34f008=process.env.OKDB_DIAG_STACK==='1',_0x2f9468=Math[_0x4b38e2(0x284)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x5c400a=new Array(_0x2f9468),_0xf2003b=0x0,_0x388367=0x0,_0x217dec=process.env.OKDB_DIAG_DIR||null;if(_0x217dec)try{_0x2db843[_0x4b38e2(0x1d7)](_0x217dec,{'recursive':!![]});}catch{}return!![];}function _0x50b782(){return _0x12a0b4===undefined?_0x43e3e9():_0x12a0b4;}function _0x252ac0(_0x245bfe,_0x5718ac){const _0x35a269=_0x53b1;if(_0x12a0b4===undefined?!_0x43e3e9():!_0x12a0b4)return;let _0x5bb7e7;if(_0x34f008){const _0x25abd4=new Error()[_0x35a269(0x171)]||'';_0x5bb7e7=_0x25abd4[_0x35a269(0x1bd)]('\x0a')['slice'](0x3)[_0x35a269(0x2bb)](_0x3987d9=>_0x3987d9[_0x35a269(0x2b0)]())[_0x35a269(0x23e)](Boolean)['slice'](0x0,0x8);}_0x5c400a[_0xf2003b]={'seq':_0x388367++,'t':Date['now'](),'env':_0x245bfe,'kind':_0x5718ac||_0x35a269(0x2cf),'stack':_0x5bb7e7},_0xf2003b=(_0xf2003b+0x1)%_0x2f9468;}function _0x12be9f(_0x5bf97c){const _0x4e7dc4=_0x53b1,_0x53588b=[];for(let _0x1871af=0x0;_0x1871af<_0x2f9468;_0x1871af++){const _0x3c5546=_0x5c400a[(_0xf2003b-0x1-_0x1871af+_0x2f9468*0x2)%_0x2f9468];if(!_0x3c5546)continue;_0x53588b[_0x4e7dc4(0x18a)](_0x3c5546);if(_0x53588b[_0x4e7dc4(0x263)]>=_0x5bf97c)break;}return _0x53588b;}function _0x59e6f7(_0x583796){const _0x57d4fa=_0x53b1;try{process['stderr'][_0x57d4fa(0x29c)](_0x583796+'\x0a');}catch{}if(_0x217dec)try{_0x2db843[_0x57d4fa(0x2ef)](_0x26ac9c[_0x57d4fa(0x355)](_0x217dec,_0x57d4fa(0x20c)+process[_0x57d4fa(0x322)]+_0x57d4fa(0x1a9)),_0x583796+'\x0a');}catch{}}function _0x3f000b(_0x1b0b9d){const _0x461e60=_0x53b1,_0x1fbafb=_0x12be9f(_0x1b0b9d);if(!_0x1fbafb[_0x461e60(0x263)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x4ddc33=Date['now']();return _0x1fbafb[_0x461e60(0x2bb)](_0x6a43d8=>{const _0x128be5=_0x461e60,_0x2825f4='\x20\x20#'+_0x6a43d8[_0x128be5(0x303)]+'\x20-'+(_0x4ddc33-_0x6a43d8['t'])+'ms\x20env='+_0x6a43d8[_0x128be5(0x24b)]+'\x20'+_0x6a43d8['kind'];return _0x6a43d8[_0x128be5(0x171)]&&_0x6a43d8[_0x128be5(0x171)][_0x128be5(0x263)]?_0x2825f4+_0x128be5(0x367)+_0x6a43d8[_0x128be5(0x171)][_0x128be5(0x355)](_0x128be5(0x367)):_0x2825f4;})[_0x461e60(0x355)]('\x0a');}function _0x5911f7(_0x1f7bbe,_0x1ac396){const _0x40cc16=_0x53b1,_0x61eac1=_0x40cc16(0x2c3)+_0x1f7bbe+'\x20@\x20'+new Date()[_0x40cc16(0x192)]()+_0x40cc16(0x2cc)+process[_0x40cc16(0x322)]+'\x20===',_0x15920e=[_0x61eac1,_0x40cc16(0x2d1)+(_0x1ac396&&_0x1ac396[_0x40cc16(0x171)]?_0x1ac396[_0x40cc16(0x171)]['split']('\x0a')[0x0]:_0x1ac396),'recent\x20writes\x20(newest\x20first)'+(_0x34f008?'':_0x40cc16(0x273))+':',_0x3f000b(0x18),_0x1ae2cf(),'='[_0x40cc16(0x313)](_0x61eac1['length']-0x1)];_0x59e6f7(_0x15920e[_0x40cc16(0x355)]('\x0a'));}function _0x38ebca(_0x573186){const _0x4079af=_0x53b1;if(!_0x50b782())return;const _0x430529=String(_0x573186&&_0x573186['message']||_0x573186||''),_0x6e13ee=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4079af(0x22d)](_0x430529);_0x5911f7(_0x6e13ee?_0x4079af(0x1bb):'uncaughtException',_0x573186);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x6e13ee)return;try{console[_0x4079af(0x20f)](_0x573186&&_0x573186[_0x4079af(0x171)]?_0x573186[_0x4079af(0x171)]:_0x573186);}catch{}process[_0x4079af(0x175)](0x1);}function _0x8dbdde(_0x49156a){const _0x1f05c9=_0x53b1;if(!_0x50b782())return;const _0x1127c9=String(_0x49156a&&_0x49156a[_0x1f05c9(0x198)]||_0x49156a||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x1f05c9(0x22d)](_0x1127c9)&&_0x5911f7(_0x1f05c9(0x29b),_0x49156a);}function _0x1ae2cf(){const _0x4bc6eb=_0x53b1,_0x1a84cd=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x5570ea=![];for(const _0x5f154d of _0x264d37){const _0x2932f1=_0x5f154d&&_0x5f154d[_0x4bc6eb(0x299)];if(!_0x2932f1)continue;for(const [_0x784ab7,_0x26d2d1]of _0x2932f1){const _0x13855d=_0x26d2d1&&_0x26d2d1[_0x4bc6eb(0x366)]&&_0x26d2d1[_0x4bc6eb(0x366)][_0x4bc6eb(0x2c8)];if(!_0x13855d)continue;let _0x2cad78,_0x5a07b2;try{_0x2cad78=Atomics[_0x4bc6eb(0x2dc)](_0x13855d,0x0),_0x5a07b2=Atomics['load'](_0x13855d,0x1);}catch{continue;}if(_0x2cad78===0x0)continue;_0x5570ea=!![];const _0x545970=_0x2cad78>0x0?_0x4bc6eb(0x23b):_0x4bc6eb(0x1ef),_0x59040f=Date[_0x4bc6eb(0x2d7)]()-Math[_0x4bc6eb(0x1be)](_0x2cad78)*0x3e8,_0x4ed326=((()=>{const _0x16fd70=_0x4bc6eb;try{return _0x26d2d1[_0x16fd70(0x177)]&&_0x26d2d1[_0x16fd70(0x177)][_0x16fd70(0x1e8)]?_0x26d2d1[_0x16fd70(0x177)][_0x16fd70(0x1e8)]():null;}catch{return null;}})());_0x1a84cd['push'](_0x4bc6eb(0x2ff)+_0x784ab7+_0x4bc6eb(0x1f1)+_0x545970+_0x4bc6eb(0x184)+_0x59040f+_0x4bc6eb(0x281)+_0x5a07b2+(_0x4ed326?_0x4bc6eb(0x231)+_0x4ed326['depth']+_0x4bc6eb(0x298)+_0x4ed326['oldestPendingMs']+_0x4bc6eb(0x312)+_0x4ed326[_0x4bc6eb(0x207)]+'}':''));}}if(!_0x5570ea)_0x1a84cd['push'](_0x4bc6eb(0x227));return _0x1a84cd['join']('\x0a');}function _0x168c55(){const _0x479e47=_0x53b1;if(!_0x50b782())return;const _0x35b56e=Math[_0x479e47(0x284)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x18f80a=Date[_0x479e47(0x2d7)]();for(const _0x4d5500 of _0x264d37){const _0x5bab6a=_0x4d5500&&_0x4d5500[_0x479e47(0x299)];if(!_0x5bab6a)continue;for(const [_0x3dc0bd,_0x2b9110]of _0x5bab6a){const _0x51c6e2=_0x2b9110&&_0x2b9110['_coordinator']&&_0x2b9110[_0x479e47(0x366)][_0x479e47(0x2c8)];if(!_0x51c6e2)continue;let _0x46d90b;try{_0x46d90b=Atomics[_0x479e47(0x2dc)](_0x51c6e2,0x0);}catch{continue;}const _0x1910a1=_0x4d5500[_0x479e47(0x394)]+'|'+_0x3dc0bd;if(_0x46d90b<=0x0){_0x7fa144[_0x479e47(0x2e7)](_0x1910a1);continue;}const _0x56afe5=_0x18f80a-_0x46d90b*0x3e8,_0x10b32b=_0x7fa144[_0x479e47(0x36d)](_0x1910a1);if(_0x56afe5<_0x35b56e)continue;if(_0x10b32b&&_0x18f80a-_0x10b32b[_0x479e47(0x2e8)]<_0x35b56e)continue;_0x7fa144['set'](_0x1910a1,{'firstTs':_0x10b32b?_0x10b32b[_0x479e47(0x395)]:_0x46d90b,'dumpedAt':_0x18f80a});const _0x68db='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x56afe5+_0x479e47(0x24a)+_0x3dc0bd+'\x20@\x20'+new Date()[_0x479e47(0x192)]()+'\x20pid='+process[_0x479e47(0x322)]+'\x20===';_0x59e6f7([_0x68db,_0x1ae2cf(),'='[_0x479e47(0x313)](_0x68db['length']-0x1)][_0x479e47(0x355)]('\x0a'));}}}function _0x2e71e0(){const _0x2c3dce=_0x53b1;if(!_0x50b782()||_0xadbda)return;_0xadbda=!![],process[_0x2c3dce(0x188)](_0x2c3dce(0x16c),_0x38ebca),process[_0x2c3dce(0x188)](_0x2c3dce(0x1c8),_0x8dbdde);const _0x20470e=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0xdcbd17=setInterval(_0x168c55,_0x20470e);if(_0xdcbd17['unref'])_0xdcbd17['unref']();}function _0x165646(_0x4343a9){const _0x59033=_0x53b1;if(!_0x50b782()||!_0x4343a9)return;_0x264d37[_0x59033(0x237)](_0x4343a9),_0x2e71e0();}function _0x5375d0(_0x583422){const _0x11f4a0=_0x53b1;_0x264d37[_0x11f4a0(0x2e7)](_0x583422);}function _0x2de96f(){const _0x312054=_0x53b1;if(!_0x50b782())return{'enabled':![],'hint':_0x312054(0x353)};return{'enabled':!![],'stackCapture':!!_0x34f008,'recentWrites':_0x12be9f(0x10),'drain':_0x1ae2cf()};}return okdbDiag={'isEnabled':_0x50b782,'recordWrite':_0x252ac0,'installDiag':_0x2e71e0,'registerOkdb':_0x165646,'unregisterOkdb':_0x5375d0,'snapshot':_0x2de96f},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x53757a=_0x6505f9;if(hasRequiredOkdbWriter)return okdbWriter[_0x53757a(0x292)];hasRequiredOkdbWriter=0x1;const {performance:_0x345c06}=require$$0$2,_0x57d48c=requireOkdbDiag(),_0x4f5084=process.env.OKDB_COMMIT_MODE===_0x53757a(0x204);class _0x1e03eb{constructor(_0x3ee7d6){const _0x58fcce=_0x53757a;this[_0x58fcce(0x24b)]=_0x3ee7d6,this[_0x58fcce(0x28f)]=new Set(),this[_0x58fcce(0x25e)]=new Map(),this[_0x58fcce(0x336)]=0x0,this['_durs']=[],this[_0x58fcce(0x250)]=[],this['_highWater']=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x58fcce(0x326)]=0x0,this[_0x58fcce(0x399)]=[],this['_bpParkedTotal']=0x0;}async[_0x53757a(0x1e6)](_0x39b82c,_0x4d3c30){const _0x511b7b=_0x53757a;if(_0x57d48c[_0x511b7b(0x22e)]())_0x57d48c[_0x511b7b(0x26e)](this[_0x511b7b(0x24b)]?.[_0x511b7b(0x351)],_0x4d3c30);if(this[_0x511b7b(0x2f6)]){const _0x1e89f4=new Error(_0x511b7b(0x176));_0x1e89f4[_0x511b7b(0x203)]='ENV_CLOSING_RETRY';throw _0x1e89f4;}if(this['_highWater']>0x0){let _0x16e9fd=![];while(this['_outstanding']>=this[_0x511b7b(0x285)]&&!this[_0x511b7b(0x2f6)]){!_0x16e9fd&&(_0x16e9fd=!![],this[_0x511b7b(0x25a)]++),await new Promise(_0x4350b6=>this[_0x511b7b(0x399)][_0x511b7b(0x18a)](_0x4350b6));}if(this[_0x511b7b(0x2f6)]){const _0x49fa88=new Error(_0x511b7b(0x176));_0x49fa88['code']=_0x511b7b(0x216);throw _0x49fa88;}}this[_0x511b7b(0x326)]++;const _0x5407c2=this[_0x511b7b(0x24b)][_0x511b7b(0x366)];if(_0x5407c2)await _0x5407c2[_0x511b7b(0x341)]();if(this[_0x511b7b(0x2f6)]){if(_0x5407c2)_0x5407c2['afterWrite']();this['_outstanding']--;if(this[_0x511b7b(0x399)][_0x511b7b(0x263)]&&this[_0x511b7b(0x326)]<this['_highWater'])this['_bpWaiters']['shift']()();const _0x51aca1=new Error(_0x511b7b(0x176));_0x51aca1['code']=_0x511b7b(0x216);throw _0x51aca1;}const _0x211ea2=_0x345c06[_0x511b7b(0x2d7)]();if(_0x4f5084)try{const _0x1273db=this[_0x511b7b(0x24b)]['db']['transactionSync'](_0x39b82c);this['_committed']++;if(this[_0x511b7b(0x1ba)]['push'](_0x345c06[_0x511b7b(0x2d7)]()-_0x211ea2)>0x100)this[_0x511b7b(0x1ba)]['shift']();if(this[_0x511b7b(0x250)][_0x511b7b(0x18a)](_0x345c06[_0x511b7b(0x2d7)]())>0x800)this['_done'][_0x511b7b(0x27c)]();return _0x1273db;}finally{this[_0x511b7b(0x326)]--;if(this[_0x511b7b(0x399)][_0x511b7b(0x263)]&&this[_0x511b7b(0x326)]<this[_0x511b7b(0x285)])this[_0x511b7b(0x399)][_0x511b7b(0x27c)]()();if(_0x5407c2)_0x5407c2[_0x511b7b(0x1fe)]();}const _0x45629f=this[_0x511b7b(0x24b)]['db'][_0x511b7b(0x348)](_0x39b82c);this[_0x511b7b(0x28f)][_0x511b7b(0x237)](_0x45629f),this[_0x511b7b(0x25e)]['set'](_0x45629f,_0x211ea2);const _0x4ca377=()=>{const _0x40e6bd=_0x511b7b;this[_0x40e6bd(0x28f)]['delete'](_0x45629f),this[_0x40e6bd(0x25e)][_0x40e6bd(0x2e7)](_0x45629f),this[_0x40e6bd(0x336)]++,this[_0x40e6bd(0x326)]--;this['_bpWaiters'][_0x40e6bd(0x263)]&&this[_0x40e6bd(0x326)]<this['_highWater']&&this[_0x40e6bd(0x399)][_0x40e6bd(0x27c)]()();if(this[_0x40e6bd(0x1ba)][_0x40e6bd(0x18a)](_0x345c06[_0x40e6bd(0x2d7)]()-_0x211ea2)>0x100)this[_0x40e6bd(0x1ba)][_0x40e6bd(0x27c)]();if(this[_0x40e6bd(0x250)][_0x40e6bd(0x18a)](_0x345c06[_0x40e6bd(0x2d7)]())>0x800)this[_0x40e6bd(0x250)][_0x40e6bd(0x27c)]();};_0x45629f[_0x511b7b(0x1ca)](_0x4ca377,_0x4ca377);try{return await _0x45629f;}finally{if(_0x5407c2)_0x5407c2[_0x511b7b(0x1fe)]();}}[_0x53757a(0x1e8)](){const _0x3d36f0=_0x53757a,_0x9dd0c6=_0x345c06['now']();let _0x3fddf0=0x0;for(const _0x578509 of this[_0x3d36f0(0x25e)][_0x3d36f0(0x1ed)]()){const _0x59d868=_0x9dd0c6-_0x578509;if(_0x59d868>_0x3fddf0)_0x3fddf0=_0x59d868;}let _0x4e31b1=0x0;for(let _0x1fc94e=this[_0x3d36f0(0x250)][_0x3d36f0(0x263)]-0x1;_0x1fc94e>=0x0;_0x1fc94e--){if(_0x9dd0c6-this['_done'][_0x1fc94e]>0x3e8)break;_0x4e31b1++;}let _0x5bd2ab=0x0;if(this[_0x3d36f0(0x1ba)][_0x3d36f0(0x263)]){const _0xb16e8e=[...this[_0x3d36f0(0x1ba)]][_0x3d36f0(0x26f)]((_0xcebcf9,_0x139770)=>_0xcebcf9-_0x139770);_0x5bd2ab=_0xb16e8e[Math['min'](_0xb16e8e[_0x3d36f0(0x263)]-0x1,Math[_0x3d36f0(0x2ce)](_0xb16e8e[_0x3d36f0(0x263)]*0.99))];}return{'depth':this[_0x3d36f0(0x28f)][_0x3d36f0(0x302)],'oldestPendingMs':Math[_0x3d36f0(0x35c)](_0x3fddf0),'committed':this['_committed'],'commitsPerSec':_0x4e31b1,'commitP99Ms':Math[_0x3d36f0(0x35c)](_0x5bd2ab),'parkedNow':this[_0x3d36f0(0x399)][_0x3d36f0(0x263)],'parkedTotal':this[_0x3d36f0(0x25a)],'highWater':this[_0x3d36f0(0x285)]};}['inflightAgesMs'](){const _0x1b60ee=_0x53757a,_0x96b665=_0x345c06['now']();return[...this[_0x1b60ee(0x25e)][_0x1b60ee(0x1ed)]()]['map'](_0x1b456c=>Math[_0x1b60ee(0x35c)](_0x96b665-_0x1b456c))['sort']((_0xb87e46,_0x383075)=>_0x383075-_0xb87e46);}[_0x53757a(0x214)](){const _0x227ea0=_0x53757a;this[_0x227ea0(0x2f6)]=!![];for(const _0x4818e9 of this[_0x227ea0(0x399)][_0x227ea0(0x24c)](0x0))_0x4818e9();}async[_0x53757a(0x2d2)](){const _0x2364fe=_0x53757a;let _0x1d0166=0x0;while(this[_0x2364fe(0x28f)][_0x2364fe(0x302)]&&_0x1d0166++<0x3e8){await Promise['allSettled']([...this['_inflight']]);}}async[_0x53757a(0x1fb)](_0x2a65b9,_0x40bef8,_0xef64ee,_0xd8cac1){const _0xbfe3b9=_0x53757a;return this[_0xbfe3b9(0x1e6)](()=>{const _0x5e0856=_0xbfe3b9;if(_0xd8cac1===undefined)_0x2a65b9[_0x5e0856(0x1c7)](_0x40bef8,_0xef64ee);else _0x2a65b9['putSync'](_0x40bef8,_0xef64ee,_0xd8cac1);},_0xbfe3b9(0x330));}async[_0x53757a(0x2cb)](_0x3b3147,_0x775f6a){const _0x31e34f=_0x53757a;return this['transaction'](()=>_0x3b3147['removeSync'](_0x775f6a),_0x31e34f(0x1d0));}}async function _0x597e63(_0x14e9db,_0x38a436){const _0x54dd53=_0x53757a;if(_0x38a436==null)_0x38a436=Math[_0x54dd53(0x284)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x423fac=_0x14e9db?.['flushed'];if(!_0x423fac||typeof _0x423fac[_0x54dd53(0x1ca)]!==_0x54dd53(0x296))return;await Promise[_0x54dd53(0x33c)]([Promise[_0x54dd53(0x261)](_0x423fac)[_0x54dd53(0x16f)](()=>{}),new Promise(_0x2a0456=>{const _0x576bcf=_0x54dd53,_0x3d79d4=setTimeout(_0x2a0456,_0x38a436);if(_0x3d79d4['unref'])_0x3d79d4[_0x576bcf(0x369)]();})]);}catch{}}function _0x446f8f(_0x34b4d5){const _0xcba820=_0x53757a;if(_0x4f5084)return Promise['resolve']();const _0x7abfcd=_0x34b4d5?.[_0xcba820(0x193)];return _0x7abfcd&&typeof _0x7abfcd['then']===_0xcba820(0x296)?_0x7abfcd:Promise[_0xcba820(0x261)]();}return okdbWriter['exports']=_0x1e03eb,okdbWriter[_0x53757a(0x292)][_0x53757a(0x19c)]=_0x597e63,okdbWriter[_0x53757a(0x292)][_0x53757a(0x193)]=_0x446f8f,okdbWriter[_0x53757a(0x292)][_0x53757a(0x18d)]=_0x4f5084,okdbWriter[_0x53757a(0x292)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x25c695=_0x6505f9;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x1737dc=require$$0$3,{SYNC_COMMITS:_0x78185a}=requireOkdbWriter(),_0x2e50f5=_0x25c695(0x30b);class _0x46e309{constructor(_0x197cbd,_0x50035e,_0x235c3b){const _0x3f3c5f=_0x25c695;this[_0x3f3c5f(0x267)]=_0x197cbd,this['_key']=_0x50035e,this[_0x3f3c5f(0x371)]=_0x235c3b,this[_0x3f3c5f(0x169)]=![],this[_0x3f3c5f(0x257)]=null,this[_0x3f3c5f(0x2f1)]=null;}[_0x25c695(0x226)](){const _0x36cd7c=_0x25c695;if(this[_0x36cd7c(0x169)])return![];try{const _0x5ea32e=this[_0x36cd7c(0x267)][_0x36cd7c(0x1e7)]()[_0x36cd7c(0x36d)](this[_0x36cd7c(0x2f8)]);if(!_0x5ea32e||_0x5ea32e[_0x36cd7c(0x182)]!==this['_acquiredAt'])return![];const _0x4f04c2=_0x5ea32e[_0x36cd7c(0x1f8)]??_0x5ea32e[_0x36cd7c(0x182)];if(_0x4f04c2+_0x5ea32e[_0x36cd7c(0x301)]<Date['now']())return![];return!![];}catch{return!this[_0x36cd7c(0x169)];}}[_0x25c695(0x1b0)](){const _0x215f30=_0x25c695;if(this[_0x215f30(0x169)])return null;try{return this['_lock'][_0x215f30(0x1e7)]()[_0x215f30(0x36d)](this[_0x215f30(0x2f8)])??null;}catch{return null;}}async[_0x25c695(0x21f)](_0x29398e){const _0x1162e3=_0x25c695;if(this[_0x1162e3(0x169)])return;try{const _0x1ea7e7=this[_0x1162e3(0x267)][_0x1162e3(0x1e7)]()['get'](this[_0x1162e3(0x2f8)]);if(!_0x1ea7e7||_0x1ea7e7[_0x1162e3(0x182)]!==this[_0x1162e3(0x371)])return;if(_0x78185a)this[_0x1162e3(0x267)][_0x1162e3(0x1e7)]()[_0x1162e3(0x1c7)](this['_key'],{..._0x1ea7e7,'ttlMs':_0x1ea7e7[_0x1162e3(0x301)]+_0x29398e});else await this[_0x1162e3(0x267)][_0x1162e3(0x1e7)]()[_0x1162e3(0x1fb)](this['_key'],{..._0x1ea7e7,'ttlMs':_0x1ea7e7[_0x1162e3(0x301)]+_0x29398e});}catch{}}async[_0x25c695(0x357)](){const _0x3b7290=_0x25c695;if(this[_0x3b7290(0x169)])return;if(this[_0x3b7290(0x2f1)])try{await this[_0x3b7290(0x2f1)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0x3b7290(0x257)]=null,this[_0x3b7290(0x169)]=!![];try{const _0x5c4aca=this[_0x3b7290(0x267)]['_db']()[_0x3b7290(0x36d)](this[_0x3b7290(0x2f8)]);if(_0x5c4aca&&_0x5c4aca[_0x3b7290(0x182)]===this['_acquiredAt']){if(_0x78185a)this['_lock'][_0x3b7290(0x1e7)]()['removeSync'](this[_0x3b7290(0x2f8)]);else await this['_lock'][_0x3b7290(0x1e7)]()['remove'](this[_0x3b7290(0x2f8)]);}}catch{}}['_startHeartbeat'](_0x15424c,_0x32d61c){const _0x494cdb=_0x25c695,_0x4f3dd6=_0x32d61c??Math[_0x494cdb(0x2ce)](_0x15424c/0x3);this[_0x494cdb(0x257)]=setInterval(()=>{const _0x5ef7a2=_0x494cdb;if(this[_0x5ef7a2(0x169)])return;this[_0x5ef7a2(0x2f1)]=((async()=>{const _0x3edb66=_0x5ef7a2;try{const _0x20f060=this['_lock'][_0x3edb66(0x1e7)]()[_0x3edb66(0x36d)](this['_key']);if(!_0x20f060||_0x20f060[_0x3edb66(0x182)]!==this[_0x3edb66(0x371)]){this[_0x3edb66(0x169)]=!![],clearInterval(this[_0x3edb66(0x257)]),this[_0x3edb66(0x257)]=null;return;}if(_0x78185a)this[_0x3edb66(0x267)]['_db']()[_0x3edb66(0x1c7)](this[_0x3edb66(0x2f8)],{..._0x20f060,'updatedAt':Date[_0x3edb66(0x2d7)]()});else await this[_0x3edb66(0x267)][_0x3edb66(0x1e7)]()[_0x3edb66(0x1fb)](this[_0x3edb66(0x2f8)],{..._0x20f060,'updatedAt':Date[_0x3edb66(0x2d7)]()});}catch{}this[_0x3edb66(0x2f1)]=null;})());},_0x4f3dd6);if(this['_heartbeatTimer'][_0x494cdb(0x369)])this[_0x494cdb(0x257)][_0x494cdb(0x369)]();}}class _0x467cf7{constructor(_0x408260,{namespace:_0x57b638,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x2412e9=_0x25c695;this[_0x2412e9(0x374)]=_0x408260,this[_0x2412e9(0x2de)]=_0x57b638,this[_0x2412e9(0x301)]=ttlMs,this[_0x2412e9(0x279)]=heartbeatMs,this[_0x2412e9(0x2a6)]=null;}['_db'](){const _0x975fcf=_0x25c695;return!this[_0x975fcf(0x2a6)]&&(this[_0x975fcf(0x2a6)]=this[_0x975fcf(0x374)][_0x975fcf(0x309)](_0x2e50f5,{'dupSort':![]})),this[_0x975fcf(0x2a6)];}[_0x25c695(0x362)](){const _0x38b93c=_0x25c695;return!this[_0x38b93c(0x304)]&&(this[_0x38b93c(0x304)]=this['_rawDb'][_0x38b93c(0x309)](_0x2e50f5+_0x38b93c(0x2f0),{'dupSort':![]})),this[_0x38b93c(0x304)];}['_key'](_0x2f07c5){const _0x4bf842=_0x25c695;return this[_0x4bf842(0x2de)]+':'+_0x2f07c5;}['signalWant'](_0xb6d118){const _0x28afb5=_0x25c695;try{_0x78185a?this[_0x28afb5(0x362)]()[_0x28afb5(0x1c7)](this[_0x28afb5(0x2f8)](_0xb6d118),Date[_0x28afb5(0x2d7)]()):this[_0x28afb5(0x362)]()[_0x28afb5(0x1fb)](this[_0x28afb5(0x2f8)](_0xb6d118),Date[_0x28afb5(0x2d7)]())?.['catch']?.(()=>{});}catch{}}[_0x25c695(0x328)](_0x1bee2e,_0x305d5a=0x3e8){const _0x4153f3=_0x25c695;try{const _0x4b09aa=this[_0x4153f3(0x362)]()[_0x4153f3(0x36d)](this[_0x4153f3(0x2f8)](_0x1bee2e));return typeof _0x4b09aa==='number'&&Date[_0x4153f3(0x2d7)]()-_0x4b09aa<_0x305d5a;}catch{return![];}}[_0x25c695(0x1a0)](_0x2b7680){const _0x57ce3e=_0x25c695,_0x400fac=_0x2b7680[_0x57ce3e(0x1f8)]??_0x2b7680[_0x57ce3e(0x182)];return _0x400fac+_0x2b7680[_0x57ce3e(0x301)]<Date[_0x57ce3e(0x2d7)]();}static[_0x25c695(0x1a3)](_0x4d4e2f){const _0x510daf=_0x25c695,_0x60f8c2=_0x4d4e2f?.[_0x510daf(0x1b0)];if(!_0x60f8c2||typeof _0x60f8c2[_0x510daf(0x322)]!=='number')return![];if(_0x60f8c2[_0x510daf(0x21a)]!==_0x1737dc[_0x510daf(0x21a)]())return![];if(_0x60f8c2[_0x510daf(0x322)]===process[_0x510daf(0x322)])return![];try{return process['kill'](_0x60f8c2[_0x510daf(0x322)],0x0),![];}catch(_0x32c54e){return _0x32c54e['code']==='ESRCH';}}async[_0x25c695(0x2b4)](_0x5ab5a0,_0xf1ea16={},_0xa0450={}){const _0x1a8d12=_0x25c695,_0x2d136b=this['_key'](_0x5ab5a0),_0x1dfb06=_0xa0450[_0x1a8d12(0x301)]??this[_0x1a8d12(0x301)],_0x1de8c8=Date[_0x1a8d12(0x2d7)](),_0x4bb02f={'holder':{'pid':process[_0x1a8d12(0x322)],'hostname':_0x1737dc[_0x1a8d12(0x21a)](),..._0xf1ea16},'acquiredAt':_0x1de8c8,'updatedAt':_0x1de8c8,'ttlMs':_0x1dfb06};let _0x3c5f7f=![],_0x54c4d5=null;try{const _0x4291d5=()=>{const _0x568555=_0x1a8d12,_0x1423b1=this['_db']()[_0x568555(0x36d)](_0x2d136b);if(_0x1423b1&&!this['_isStale'](_0x1423b1)&&!_0x467cf7[_0x568555(0x1a3)](_0x1423b1)){const _0x3d2503=_0xf1ea16[_0x568555(0x29a)]!=null&&_0x1423b1[_0x568555(0x1b0)][_0x568555(0x322)]===process[_0x568555(0x322)]&&_0x1423b1[_0x568555(0x1b0)][_0x568555(0x29a)]===_0xf1ea16[_0x568555(0x29a)];if(!_0x3d2503){_0x3c5f7f=![],_0x54c4d5=_0x1423b1;return;}_0x4bb02f['acquiredAt']<=_0x1423b1[_0x568555(0x182)]&&(_0x4bb02f['acquiredAt']=_0x1423b1[_0x568555(0x182)]+0x1,_0x4bb02f[_0x568555(0x1f8)]=_0x4bb02f[_0x568555(0x182)]);}this['_db']()['put'](_0x2d136b,_0x4bb02f),_0x3c5f7f=!![],_0x54c4d5=_0x4bb02f;};if(_0x78185a)this[_0x1a8d12(0x1e7)]()[_0x1a8d12(0x271)](_0x4291d5);else await this[_0x1a8d12(0x1e7)]()[_0x1a8d12(0x348)](_0x4291d5);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x3c5f7f)return{'acquired':![],'handle':null,'current':_0x54c4d5};const _0x526381=new _0x46e309(this,_0x2d136b,_0x4bb02f[_0x1a8d12(0x182)]);return _0x526381['_startHeartbeat'](_0x1dfb06,this[_0x1a8d12(0x279)]),{'acquired':!![],'handle':_0x526381,'current':_0x54c4d5};}['inspect'](_0x163b7){const _0x64a4d7=_0x25c695;try{return this[_0x64a4d7(0x1e7)]()[_0x64a4d7(0x36d)](this[_0x64a4d7(0x2f8)](_0x163b7))??null;}catch{return null;}}[_0x25c695(0x388)](){const _0x12d187=_0x25c695,_0x2a9af2=this['namespace']+':',_0x1ff92e=[];try{for(const {key:_0x19994f,value:_0x53b1ad}of this[_0x12d187(0x1e7)]()['getRange']({'start':_0x2a9af2,'end':_0x2a9af2+'ÿ'})){typeof _0x19994f===_0x12d187(0x256)&&_0x19994f['startsWith'](_0x2a9af2)&&_0x1ff92e[_0x12d187(0x18a)]({'id':_0x19994f[_0x12d187(0x280)](_0x2a9af2[_0x12d187(0x263)]),'entry':_0x53b1ad});}}catch{}return _0x1ff92e;}static[_0x25c695(0x27d)](_0x6e79cc){const _0x109fa7=_0x25c695,_0x5cc523=[];try{const _0x4d1b7b=_0x6e79cc['openDB'](_0x2e50f5,{'dupSort':![]});for(const {key:_0x27a019,value:_0x24e754}of _0x4d1b7b['getRange']({})){if(typeof _0x27a019!==_0x109fa7(0x256))continue;const _0x4082de=_0x27a019[_0x109fa7(0x2ac)](':');if(_0x4082de<0x1)continue;_0x5cc523[_0x109fa7(0x18a)]({'namespace':_0x27a019[_0x109fa7(0x280)](0x0,_0x4082de),'id':_0x27a019['slice'](_0x4082de+0x1),'entry':_0x24e754});}}catch{}return _0x5cc523;}}return okdbLock={'OKDBLock':_0x467cf7},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function _0x2029(){const _0x4b17bd=['\x20\x20env=','fanout','ttlMs','size','seq','_wantDbHandle','stopHeartbeat','liveThreadStats','warn','instances','openDB','none','~lock','_nodeDead','_listenAddr','has','off','_sampleOwnStats','cluster','\x20parkedNow=','repeat','ttl:set','ppid','listening','execArgv','rss','ref:violation',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','--inspect','ingest','system:bus_state_change','node','1101295iELFLt','workersConfigured','heapUsed','pid','find','_threadStats','events','_outstanding','1294701reFPfz','isWanted','dropType','bus:drain','_buildOwnRow','decommission','_processStartedAt','(code=','SYSTEM_PROC','raw-put','dropping','commitP99Ms','detachConsole','unique:violation_resolved','number','_committed','event','label','assign','functions','ttl:clear','race','msg','txn:rollback','listDesired','_selfKey','beforeWrite','confirm','draining','includes','value','deregisterSelf','_activateProcesses','childTransaction','VIEW_PROGRESS','epoch','object','--watch','meta','processKey','cpus','ms/','name','cli','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','caps','join','emit','release','depth','keys','_drain','consecutiveFailures','round','FTS_REGISTERED','node:events','resetReadTxn','~processes','_lastCpuPct','_wantDb','perf_hooks','win32','processor:ready','_coordinator','\x0a\x20\x20\x20\x20\x20\x20','[okdb-cluster]\x20respawning\x20worker\x20slot=','unref','sandbox','setTtl','fts:reset','get','entry','nodeKey','_clusterOrphanWatch','_acquiredAt','__okdbSlot','_singletonLock','_rawDb','supervisorKey','removeNode','SIGKILL','isDead','rows=','unclaimed','set','_enableChangelog','ITEM_REMOVE','_lastCpuAt','_sandbox','_maybePublish','_buckets','data','_caps','procmodeack/','index:progress','attach','http\x20worker\x20child\x20failed:\x20','list','_draining','starting','processingStatusView','[okdb-cluster]\x20worker\x20pid=','ms\x20(attempt\x20','async','log','item:update','open','count','setDesired','path','firstTs','selfKey','stderr','_cursors','_bpWaiters','_nodeDbFor','cursorKey','oldestPendingMs','_markSeen','--eval','setOwnMeta','hasOwnProperty','_released','reset','dropSchema','uncaughtException','uptime','_adminRelay','catch','_report','stack','singletonClaims','randomUUID','\x20(slot=','exit','okdb-writer:\x20env\x20closing\x20—\x20retry','_writer','ttl:expired','updateSupervisedChildStats','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','SYSTEM_STOPPED','system:drain','maxExtra','running','removeSupervisedChild','fn-runner','freeze','acquiredAt','stats','\x20drainAge=','slotKey','_flushTimer','_publishNow','prependListener','_nodeDb','push','processors','setSchema','SYNC_COMMITS','fts:registered','primary','entries','expiresAt','toISOString','committed','_onTick','register','threads','commitsPerSec','message','_collectSingletonClaims','_started','\x20sync','flushLmdb','_removeRowAsync','version','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','_isStale','txn:start','note','_holderDead','dead','_nodeDbCache','_isReader','_children','\x20worker(s)\x20remaining','.log','host','_hbTimer','_handleInProcess','startedAt','_isWriter','dedupeMax','holder','maxMs','mode','system','cpuWindowMs','kind','getClock','claimGated','inst:','type','_durs','ORPHAN\x20(env-closed\x20write)','http-server','split','abs','feed:','_dedupeMax','_log','removeSync','_pending','putNode','processor:paused','setupPrimary','putSync','unhandledRejection','sync:apply','then','env:opened','_drainOne','\x20ipc\x20error:\x20','decommissioning','ITEM_CREATE','raw-remove','INDEX_READY','publishOwnRow','attachFeed','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','[okdb-cluster]\x20','start','mkdirSync','bus:proc','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','isActive','kill','system:type_drop','isWorker','flushDebounce','writerStatus','ms\x20mean=','_desiredOverlay','registerIndex','replace','nodesView','_putRowAsync','transaction','_db','status','ref:violation_resolved','_quantum','lifecycle','fromEntries','values','_admissionStarted','copy','bus:env_release','\x20phase=','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','view:progress','online','_flushDebounce','INDEX_RESET','worker','updatedAt','registerType','FTS_RESET','put','\x20│\x20','single','afterWrite','processing','license:activated','getDesired','_changefeed','code','sync','offWindow','_onItem','parkedNow','getCmd','__vocab/version','_ensureDesired','external','okdb-diag.','_groupByProcess','CHANGEFEED_QUANTUM','error','index:drop','registry\x20publish\x20failing:\x20','index:reset','memoryUsage','markClosed','264445pYSzoT','ENV_CLOSING_RETRY','parse','_rowKey','_baselines','hostname','listNodes','_scheduleFlush','--test','\x20times\x20in\x20','extend','disconnect','cluster-wide','startHeartbeat','listenAddr','children','clear','isHeld','\x20\x20(no\x20env\x20draining)','noteListenAddr','system:proc','processor','ms\x20p99=','state','test','isEnabled','processorsView','true','\x20writer{depth=','pushEphemeral','close','compact','_admissionTimer','addSupervisedChild','add','--print','type:registered','resetting','SWAP','runtimeProcessesView','percentile','filter','cluster:','\x20HTTP\x20server(s)\x20on\x20port\x20','FTS_DROP','_buildProcessingFacet','stop','_statusEnv','_refreshDesiredSnapshot','_onStop','[okdb-cluster]\x20slot=','okdb','prototype','ms\x20on\x20env=','env','splice','engines','isConnected','SYSTEM_POKE','_done','enabled','reap','isPrimary','ITEM_UPDATE','procmode/','string','_heartbeatTimer','loop-lag\x20','_lastPublishAt','_bpParkedTotal','level','next','cpuUsage','_enqueuedAt','info','\x20died\x20','resolve','default','length','resetIndex','_onProcEvent','reportThreadStats','_lock','processor:progress','_dedupeKey','crypto','_participate','20958BgtJnJ','options','recordWrite','sort','_instanceId','transactionSync','_lastCpuWindowMs','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','2272BFeyia','node:perf_hooks','stringify','process','started','heartbeatMs','getProcess','ready','shift','listAll','allSettled','publishChildRow','slice','ms\x20activeWriters=','instanceId','4meXQfe','max','_highWater','license:invalid','deaths','_migrateVocab','INDEX_PROGRESS','\x20worker\x20slot=','halted','_openEnvLazy','bumpCmd','embedded','_inflight','\x20(durable\x20desired-state)','toFixed','exports','enable','_rootDb','waiting','function','_startedAt','\x20oldestPendingMs=','_envs','processorId','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','write','\x20statusEnv=','building','processor:error','quantum','processor:retry','\x20in\x20','listen','processes','2086014ROXyxs','_lockDb','node/','busy','_onPoke','_seen','ESRCH','indexOf','bus:type_drop','_collectWriterFacet','fts:drop','trim','disable','registry-publish','processor:resumed','tryAcquire','hasDesired','startsWith','_handlePoke','createEnvironment','_ownMeta','from','map','./okdb','_lastCpuUsage','slot','5939292jGLRPy','unique:violation','item:remove','_systemEnv','\x0a===\x20OKDB_DIAG\x20',')\x20exited\x20','_startAdmission','_singletonLocks','user','view','registerFts','_putRowSync','remove','\x20pid=','getRange','floor','commit','index:ready','error:\x20','drain','REMOVE','http','system:poke','item:create','now','min','_buildChildRow','role','created','load','heapTotal','namespace',',\x20signal=','_clusterWorkerAttached','_timer','connected','resetFts','~processes:cmd','claims','reduce','delete','dumpedAt','respawnTimer','_windowCbs','_publishFailWarned','26879544rYxgCX','_cmd','once','appendFileSync',':want','_heartbeatInFlight','_desired','bus:poke','compaction','killable','_closed','tierList','_key','send','participate','_supervisorKey','type:drop','dropIndex','_kind'];_0x2029=function(){return _0x4b17bd;};return _0x2029();}function requireOkdbProcessRegistry(){const _0x2ac2f1=_0x6505f9;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x5630bb=require$$0$3,_0x520439=require$$1$1,_0x3b56bd=require$$2,{LOOP:_0x4a856d}=requireOkdbLoopMonitor(),{OKDBLock:_0x1803c0}=requireOkdbLock(),{SYNC_COMMITS:_0x5805ea}=requireOkdbWriter(),_0x740393=_0x2ac2f1(0x360),_0x356b61=_0x2ac2f1(0x31e),_0x4d8e2d='~processes:desired',_0x2f768e=_0x2ac2f1(0x2e4),_0x3e0005=(_0x1d6b82,_0x536685)=>_0x1d6b82+':'+_0x536685,_0x4b609f=(_0x1a7279,_0x3b0b47)=>_0x1a7279+'::'+_0x3b0b47,_0x311e67=(_0x210f13,_0x41b276)=>_0x210f13+'/'+_0x41b276,_0x33fae2=(_0x3a11f7,_0x18d952)=>_0x3a11f7+'#'+_0x18d952,_0x14bad7=_0x5ce7dc=>{const _0x55dfad=_0x2ac2f1;if(_0x5ce7dc?.[_0x55dfad(0x34e)])return _0x5ce7dc[_0x55dfad(0x34e)];const _0xfaa8f0=_0x5ce7dc?.[_0x55dfad(0x36f)];return typeof _0xfaa8f0===_0x55dfad(0x256)&&_0xfaa8f0[_0x55dfad(0x344)]('#')?_0xfaa8f0[_0x55dfad(0x280)](0x0,_0xfaa8f0[_0x55dfad(0x2ac)]('#')):_0xfaa8f0;},_0x5d5cc2=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x28ab7d=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4e288c=_0x5d5cc2*0x3,_0x4d54d3=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x4e288c*0x14),_0x5ca496=[_0x2ac2f1(0x268),_0x2ac2f1(0x365),'processor:retry','processor:error',_0x2ac2f1(0x1c5),_0x2ac2f1(0x2b3)];let _0x55f677=null;function _0x311318(){const _0x513f3a=_0x2ac2f1;if(_0x55f677==null)_0x55f677=Math[_0x513f3a(0x35c)]((Date[_0x513f3a(0x2d7)]()-process[_0x513f3a(0x16d)]()*0x3e8)/0x3e8)*0x3e8;return _0x55f677;}function _0x185644(_0x59834a){const _0x3b3f35=_0x2ac2f1;if(process.env.OKDB_PROCESS_KILL===_0x3b3f35(0x30f))return![];if(_0x59834a?.[_0x3b3f35(0x26d)]?.[_0x3b3f35(0x2a4)]&&typeof _0x59834a[_0x3b3f35(0x26d)]['processes']===_0x3b3f35(0x34b)&&_0x59834a[_0x3b3f35(0x26d)][_0x3b3f35(0x2a4)][_0x3b3f35(0x1db)]===![])return![];return!![];}function _0x1a62d3(_0x588a8a,_0x1906fa){const _0x379081=_0x2ac2f1,_0x5cb79f=!!_0x1906fa?.[_0x379081(0x18b)];switch(_0x588a8a){case _0x379081(0x18f):return{'controllable':_0x5cb79f,'decommissionable':![],'killable':!![],'killConfirm':_0x379081(0x221)};case _0x379081(0x352):case'standalone':return{'controllable':_0x5cb79f,'decommissionable':![],'killable':!![],'killConfirm':_0x379081(0x342)};case _0x379081(0x28e):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x379081(0x1bc):case'queue-worker':case _0x379081(0x180):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x53a352{constructor(_0x59c872){const _0x5b7ac3=_0x2ac2f1;this[_0x5b7ac3(0x248)]=_0x59c872,this[_0x5b7ac3(0x244)]=null,this['_desired']=null,this[_0x5b7ac3(0x1e1)]=new Map(),this[_0x5b7ac3(0x2ed)]=null,this[_0x5b7ac3(0x1ae)]=![],this[_0x5b7ac3(0x1a6)]=![],this['_processStartedAt']=_0x311318(),this[_0x5b7ac3(0x340)]=_0x3e0005(process['pid'],this[_0x5b7ac3(0x32d)]),this[_0x5b7ac3(0x270)]=_0x3b56bd[_0x5b7ac3(0x173)]()[_0x5b7ac3(0x280)](0x0,0x8),this[_0x5b7ac3(0x218)]=_0x33fae2(this[_0x5b7ac3(0x340)],this[_0x5b7ac3(0x270)]),this[_0x5b7ac3(0x297)]=Date[_0x5b7ac3(0x2d7)](),this[_0x5b7ac3(0x2fe)]=null,this[_0x5b7ac3(0x2fb)]=null,this[_0x5b7ac3(0x30d)]=null,this[_0x5b7ac3(0x1ab)]=null,this[_0x5b7ac3(0x265)]=null,this[_0x5b7ac3(0x194)]=null,this[_0x5b7ac3(0x259)]=0x0,this['_ownMeta']={},this['_children']=new Map(),this[_0x5b7ac3(0x2bd)]=process[_0x5b7ac3(0x25d)](),this[_0x5b7ac3(0x37e)]=Date[_0x5b7ac3(0x2d7)](),this['_lastCpuPct']=0x0,this[_0x5b7ac3(0x324)]=new Map();}get['selfKey'](){const _0xecd4f7=_0x2ac2f1;return this[_0xecd4f7(0x340)];}get['rowKey'](){const _0x2d9806=_0x2ac2f1;return this[_0x2d9806(0x218)];}['_caps'](_0x25feab,_0x2a3900){const _0x565e43=_0x2ac2f1,_0x3cc1c1=_0x1a62d3(_0x25feab,_0x2a3900);if(_0x3cc1c1[_0x565e43(0x2f5)]&&!_0x185644(this['okdb']))return{..._0x3cc1c1,'killable':![],'killConfirm':undefined};return _0x3cc1c1;}[_0x2ac2f1(0x1da)](){const _0xc19621=_0x2ac2f1;return!!this[_0xc19621(0x244)];}[_0x2ac2f1(0x167)](_0x5809fc){const _0x50ccd9=_0x2ac2f1;Object[_0x50ccd9(0x339)](this['_ownMeta'],_0x5809fc||{});}[_0x2ac2f1(0x228)](_0x209798){const _0x35cc2c=_0x2ac2f1;if(_0x209798)this[_0x35cc2c(0x30d)]=_0x209798;}[_0x2ac2f1(0x195)](_0x3da04c={}){const _0x25e8fe=_0x2ac2f1;return this['okdb'][_0x25e8fe(0x347)](_0x3da04c);}[_0x2ac2f1(0x38b)](){const _0x1130ae=_0x2ac2f1,_0x396035={};let _0x41dbcf=0x0,_0x4d31f5=0x0;const _0x93993=new Set();for(const _0x1d4b45 of this[_0x1130ae(0x21b)]()){_0x4d31f5++;const _0x47f1ae=_0x1d4b45[_0x1130ae(0x1ff)];if(!_0x47f1ae)continue;if(_0x47f1ae[_0x1130ae(0x2fa)])_0x41dbcf++;for(const _0x4dc1a6 of _0x47f1ae[_0x1130ae(0x18b)]||[]){if(![_0x1130ae(0x1fd),_0x1130ae(0x300)]['includes'](_0x4dc1a6[_0x1130ae(0x1b2)]))continue;(_0x4dc1a6[_0x1130ae(0x22c)]===_0x1130ae(0x1f4)||_0x4dc1a6[_0x1130ae(0x22c)]===_0x1130ae(0x29e))&&_0x4dc1a6[_0x1130ae(0x39b)]&&_0x93993[_0x1130ae(0x237)]((_0x4dc1a6['env']||_0x1130ae(0x262))+':'+_0x4dc1a6[_0x1130ae(0x39b)]);const _0x16c156=_0x4dc1a6[_0x1130ae(0x24b)]||'default';(_0x396035[_0x16c156]||=[])[_0x1130ae(0x18a)]({..._0x4dc1a6,'env':_0x16c156,'owner':{'pid':_0x1d4b45[_0x1130ae(0x322)]??null,'kind':_0x1d4b45[_0x1130ae(0x1b5)]??null}});}}for(const [_0x398b13,_0x33af54]of Object[_0x1130ae(0x190)](_0x396035)){for(const _0x540393 of _0x33af54){if(_0x540393['mode']===_0x1130ae(0x1fd)&&!_0x540393[_0x1130ae(0x1b7)]){const _0x49f95d=_0x398b13+':'+(_0x540393[_0x1130ae(0x39b)]??'');if(!_0x93993[_0x1130ae(0x30e)](_0x49f95d))_0x540393[_0x1130ae(0x37a)]=!![];}}}return{'envs':_0x396035,'policy':null,'participation':{'participating':_0x41dbcf,'total':_0x4d31f5},'source':'workers'};}[_0x2ac2f1(0x22f)](){const _0x420163=_0x2ac2f1,_0x4aa7d8=_0x754b32=>{const _0x512bfb=_0x53b1;if(_0x754b32[_0x512bfb(0x22c)]==='online'||_0x754b32['state']===_0x512bfb(0x29e)||_0x754b32['state']===_0x512bfb(0x20f))return 0x3;if(_0x754b32[_0x512bfb(0x1b7)])return 0x1;return 0x2;},_0x350eab=new Map();for(const _0x9f0de3 of this['listNodes']()){for(const _0x2a0f53 of _0x9f0de3[_0x420163(0x1ff)]?.[_0x420163(0x18b)]||[]){const _0x52e8a5={..._0x2a0f53,'owner':{'pid':_0x9f0de3[_0x420163(0x322)]??null,'kind':_0x9f0de3['kind']??null,'host':_0x9f0de3['host']??null}},_0x19c51c=_0x2a0f53['mode']==='single'?'1ofN:'+(_0x2a0f53[_0x420163(0x24b)]??'')+'::'+(_0x2a0f53[_0x420163(0x39b)]??_0x2a0f53[_0x420163(0x1b9)]??_0x2a0f53['id']):_0x420163(0x1b8)+(_0x9f0de3['nodeKey']??_0x9f0de3[_0x420163(0x34e)]??'')+'::'+(_0x2a0f53['env']??'')+'::'+_0x2a0f53['id'],_0x1d017c=_0x350eab[_0x420163(0x36d)](_0x19c51c);if(!_0x1d017c||_0x4aa7d8(_0x52e8a5)>_0x4aa7d8(_0x1d017c))_0x350eab['set'](_0x19c51c,_0x52e8a5);}}return[..._0x350eab[_0x420163(0x1ed)]()];}['clusterStatusView'](){const _0x43d473=_0x2ac2f1,_0x580071=Date['now'](),_0x17d24c=this[_0x43d473(0x21b)](),_0x18167d=_0x22a856=>Math[_0x43d473(0x284)](0x0,Math[_0x43d473(0x35c)]((_0x580071-(_0x22a856[_0x43d473(0x1ad)]||_0x580071))/0x3e8)),_0x27995a=_0x17d24c['find'](_0x11165e=>_0x11165e[_0x43d473(0x1b5)]==='primary'),_0x236c5d=_0x17d24c[_0x43d473(0x23e)](_0x930aab=>_0x930aab[_0x43d473(0x1b5)]===_0x43d473(0x1bc));if(_0x27995a||_0x236c5d['length'])return{'primary':_0x27995a?{'pid':_0x27995a[_0x43d473(0x322)],'uptime':_0x18167d(_0x27995a)}:null,'workers':_0x236c5d[_0x43d473(0x2bb)](_0x158b33=>({'pid':_0x158b33[_0x43d473(0x322)],'uptime':_0x18167d(_0x158b33)})),'workersConfigured':_0x27995a?.['meta']?.[_0x43d473(0x320)]??_0x236c5d[_0x43d473(0x263)],'mode':_0x43d473(0x311)};const _0x2bbcb5=_0x17d24c[_0x43d473(0x323)](_0x38eeed=>_0x38eeed['kind']===_0x43d473(0x352)||_0x38eeed[_0x43d473(0x1b5)]==='standalone'||_0x38eeed[_0x43d473(0x1b5)]==='embedded'),_0x8f41bb=_0x2bbcb5?{'pid':_0x2bbcb5[_0x43d473(0x322)],'uptime':_0x18167d(_0x2bbcb5)}:{'pid':process['pid'],'uptime':Math[_0x43d473(0x284)](0x0,Math[_0x43d473(0x35c)](process['uptime']()))};return{'primary':_0x8f41bb,'workers':[_0x8f41bb],'workersConfigured':0x1,'mode':'single'};}[_0x2ac2f1(0x1e4)](){const _0x23252c=_0x2ac2f1;return this[_0x23252c(0x20d)]();}['treeView'](){const _0x359dd3=_0x2ac2f1,_0x2c3e11=new Map();for(const _0x3216d2 of this[_0x359dd3(0x20d)]())_0x2c3e11[_0x359dd3(0x37b)](_0x3216d2[_0x359dd3(0x34e)],{..._0x3216d2,'children':[]});const _0x3a849f=[];for(const _0xee960e of _0x2c3e11['values']()){const _0x106426=_0xee960e['supervisorKey']?_0x2c3e11[_0x359dd3(0x36d)](_0xee960e[_0x359dd3(0x375)]):null;if(_0x106426&&_0x106426!==_0xee960e)_0x106426[_0x359dd3(0x224)][_0x359dd3(0x18a)](_0xee960e);else _0x3a849f[_0x359dd3(0x18a)](_0xee960e);}const _0x2ab3f2=(_0x520819,_0x2e6960)=>_0x520819['kind']===_0x2e6960['kind']?(_0x520819[_0x359dd3(0x322)]||0x0)-(_0x2e6960[_0x359dd3(0x322)]||0x0):(_0x520819[_0x359dd3(0x1b5)]??'')<(_0x2e6960[_0x359dd3(0x1b5)]??'')?-0x1:0x1,_0x16e5da=_0x3e33ee=>{const _0x5ac873=_0x359dd3;_0x3e33ee[_0x5ac873(0x26f)](_0x2ab3f2);for(const _0x2e5851 of _0x3e33ee)if(_0x2e5851['children']['length'])_0x16e5da(_0x2e5851[_0x5ac873(0x224)]);};return _0x16e5da(_0x3a849f),_0x3a849f;}[_0x2ac2f1(0x27a)](_0x22c69f){const _0x27c1cd=_0x2ac2f1;return this[_0x27c1cd(0x20d)]()[_0x27c1cd(0x323)](_0x1cde17=>_0x1cde17['processKey']===_0x22c69f)??null;}[_0x2ac2f1(0x20d)](_0x26eadc=Date[_0x2ac2f1(0x2d7)]()){const _0x381959=_0x2ac2f1,_0x454782=new Map();for(const _0x47370a of this[_0x381959(0x21b)]()){const _0x4ce46f=_0x14bad7(_0x47370a);let _0x1775e0=_0x454782[_0x381959(0x36d)](_0x4ce46f);!_0x1775e0&&(_0x1775e0={'processKey':_0x4ce46f,'nodeKey':_0x4ce46f,'pid':_0x47370a[_0x381959(0x322)],'ppid':_0x47370a[_0x381959(0x315)]??null,'host':_0x47370a[_0x381959(0x1aa)]??null,'kind':_0x47370a['kind'],'role':null,'supervisorKey':_0x47370a[_0x381959(0x375)]??null,'slot':_0x47370a['slot']??null,'slotKey':_0x47370a[_0x381959(0x185)]??null,'caps':_0x47370a[_0x381959(0x354)]??null,'lifecycle':_0x47370a[_0x381959(0x1eb)]??null,'uptime':Math[_0x381959(0x284)](0x0,Math[_0x381959(0x35c)]((_0x26eadc-(_0x47370a[_0x381959(0x1ad)]||_0x26eadc))/0x3e8)),'startedAt':_0x47370a[_0x381959(0x1ad)]??null,'meta':_0x47370a[_0x381959(0x34d)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x454782[_0x381959(0x37b)](_0x4ce46f,_0x1775e0));_0x1775e0[_0x381959(0x308)][_0x381959(0x18a)]({'instanceId':_0x47370a[_0x381959(0x282)]??null,'role':_0x47370a[_0x381959(0x2da)]??null,'listenAddr':_0x47370a[_0x381959(0x223)]??null,'lifecycle':_0x47370a[_0x381959(0x1eb)]??null,'processing':_0x47370a[_0x381959(0x1ff)]??null});if(!_0x1775e0[_0x381959(0x2da)]&&_0x47370a[_0x381959(0x2da)])_0x1775e0[_0x381959(0x2da)]=_0x47370a[_0x381959(0x2da)];if(!_0x1775e0['listenAddr']&&_0x47370a['listenAddr'])_0x1775e0[_0x381959(0x223)]=_0x47370a[_0x381959(0x223)];if(!_0x1775e0['processing']&&_0x47370a[_0x381959(0x1ff)])_0x1775e0[_0x381959(0x1ff)]=_0x47370a[_0x381959(0x1ff)];if(!_0x1775e0['engines']&&_0x47370a['engines'])_0x1775e0[_0x381959(0x24d)]=_0x47370a[_0x381959(0x24d)];if(!_0x1775e0[_0x381959(0x172)]&&_0x47370a[_0x381959(0x172)])_0x1775e0[_0x381959(0x172)]=_0x47370a[_0x381959(0x172)];if(_0x1775e0[_0x381959(0x354)]==null&&_0x47370a[_0x381959(0x354)])_0x1775e0['caps']=_0x47370a[_0x381959(0x354)];if(_0x47370a[_0x381959(0x183)]&&(!_0x1775e0[_0x381959(0x183)]||(_0x47370a[_0x381959(0x183)]['at']??0x0)>(_0x1775e0[_0x381959(0x183)]['at']??0x0)))_0x1775e0[_0x381959(0x183)]=_0x47370a['stats'];}return[..._0x454782[_0x381959(0x1ed)]()];}[_0x2ac2f1(0x23c)](){const _0x15fc0d=_0x2ac2f1,_0x3c2338=[],_0x394980={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x4a6013 of this[_0x15fc0d(0x20d)]()){_0x3c2338[_0x15fc0d(0x18a)]({'processKey':_0x4a6013[_0x15fc0d(0x34e)],'kind':_0x4a6013[_0x15fc0d(0x1b5)],'pid':_0x4a6013[_0x15fc0d(0x322)],'supervisorKey':_0x4a6013[_0x15fc0d(0x375)],'meta':_0x4a6013['meta']??null,'uptime':_0x4a6013[_0x15fc0d(0x16d)],'stats':_0x4a6013['stats']??null}),_0x394980[_0x15fc0d(0x2a4)]++;if(_0x4a6013['stats']){_0x394980[_0x15fc0d(0x318)]+=_0x4a6013[_0x15fc0d(0x183)]['rss']||0x0,_0x394980[_0x15fc0d(0x321)]+=(_0x4a6013[_0x15fc0d(0x183)]['heapUsed']||0x0)+(_0x4a6013['stats'][_0x15fc0d(0x196)]?.[_0x15fc0d(0x321)]||0x0);const _0x239155=_0x4a6013[_0x15fc0d(0x183)]['threads'];_0x239155&&(_0x394980[_0x15fc0d(0x196)]['count']+=_0x239155[_0x15fc0d(0x392)]||0x0,_0x394980[_0x15fc0d(0x196)][_0x15fc0d(0x36a)]+=_0x239155[_0x15fc0d(0x36a)]||0x0,_0x394980['threads'][_0x15fc0d(0x2a8)]+=_0x239155[_0x15fc0d(0x2a8)]||0x0);}}return{'totals':_0x394980,'nodes':_0x3c2338};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x35945a=_0x2ac2f1;this['_isWriter']=this['_isWriter']||!!writer,this[_0x35945a(0x1a6)]=this[_0x35945a(0x1a6)]||!!reader,this[_0x35945a(0x2fe)]=kind||this['_kind']||(_0x520439[_0x35945a(0x1dd)]?_0x35945a(0x1bc):_0x35945a(0x352)),this[_0x35945a(0x2fb)]=supervisorKey??this['_supervisorKey'],this['_listenAddr']=listenAddr??this[_0x35945a(0x30d)],this[_0x35945a(0x20a)](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x35945a(0x244)]){const _0x181228=await this[_0x35945a(0x248)][_0x35945a(0x2b8)](_0x740393,{'sync':![],'durability':'fast'});if(!_0x181228['hasType'](_0x356b61))await _0x181228[_0x35945a(0x1f9)](_0x356b61);this[_0x35945a(0x244)]=_0x181228;}return this[_0x35945a(0x244)];}[_0x2ac2f1(0x189)](){const _0xedcbfe=_0x2ac2f1;return this[_0xedcbfe(0x39a)]!==this[_0xedcbfe(0x244)]&&(this[_0xedcbfe(0x39a)]=this[_0xedcbfe(0x244)],this[_0xedcbfe(0x1a5)]=this[_0xedcbfe(0x244)]['_getType'](_0x356b61)[_0xedcbfe(0x382)]),this[_0xedcbfe(0x1a5)];}[_0x2ac2f1(0x1e5)](_0x20c168){const _0xda641f=_0x2ac2f1;if(_0x5805ea)return this[_0xda641f(0x189)]()[_0xda641f(0x1c7)](_0x20c168[_0xda641f(0x36f)],_0x20c168,0x1);const _0x47a90d=this[_0xda641f(0x189)]()[_0xda641f(0x1fb)](_0x20c168[_0xda641f(0x36f)],_0x20c168,0x1);if(_0x47a90d&&typeof _0x47a90d[_0xda641f(0x1ca)]===_0xda641f(0x296))_0x47a90d[_0xda641f(0x1ca)](undefined,()=>{});return _0x47a90d;}[_0x2ac2f1(0x2ca)](_0x4d4b1d){const _0x424375=_0x2ac2f1;return this[_0x424375(0x189)]()[_0x424375(0x1c7)](_0x4d4b1d[_0x424375(0x36f)],_0x4d4b1d,0x1);}[_0x2ac2f1(0x19d)](_0xbb6103){const _0x56ddd4=_0x2ac2f1;if(_0x5805ea)try{return this[_0x56ddd4(0x189)]()[_0x56ddd4(0x1c2)](_0xbb6103);}catch{return![];}const _0x2b67aa=this[_0x56ddd4(0x189)]()[_0x56ddd4(0x2cb)](_0xbb6103);if(_0x2b67aa&&typeof _0x2b67aa[_0x56ddd4(0x1ca)]===_0x56ddd4(0x296))_0x2b67aa[_0x56ddd4(0x1ca)](undefined,()=>{});return _0x2b67aa;}async[_0x2ac2f1(0x1c4)](_0x3127d6){const _0x24d440=_0x2ac2f1;if(!this[_0x24d440(0x244)]||!this[_0x24d440(0x1ae)]||!_0x3127d6?.['nodeKey'])return;return this[_0x24d440(0x1e5)](_0x3127d6);}async[_0x2ac2f1(0x376)](_0x48eef0){const _0x35f723=_0x2ac2f1;if(!this[_0x35f723(0x244)]||!this[_0x35f723(0x1ae)]||!_0x48eef0)return;const _0x28e01c=_0x48eef0[_0x35f723(0x344)]('#'),_0x5c0693=[];for(const {key:_0x39abab}of this['_statusEnv']['getRange'](_0x356b61)){if(_0x39abab===_0x48eef0||!_0x28e01c&&typeof _0x39abab===_0x35f723(0x256)&&_0x39abab[_0x35f723(0x2b6)](_0x48eef0+'#'))_0x5c0693['push'](_0x39abab);}for(const _0x256a38 of _0x5c0693){try{this[_0x35f723(0x189)]()[_0x35f723(0x1c2)](_0x256a38);}catch{}}}[_0x2ac2f1(0x30c)](_0x5d63e8){const _0x454194=_0x2ac2f1;if(typeof _0x5d63e8?.[_0x454194(0x322)]!==_0x454194(0x335))return![];if(_0x5d63e8[_0x454194(0x1aa)]!==_0x5630bb[_0x454194(0x21a)]())return![];if(_0x5d63e8['pid']===process[_0x454194(0x322)])return![];if(_0x5d63e8[_0x454194(0x191)]!=null&&_0x5d63e8[_0x454194(0x191)]<Date['now']()-_0x4d54d3)return!![];try{return process[_0x454194(0x1db)](_0x5d63e8[_0x454194(0x322)],0x0),![];}catch(_0x2e53de){return _0x2e53de[_0x454194(0x203)]===_0x454194(0x2ab);}}[_0x2ac2f1(0x21b)](){const _0x35c73d=_0x2ac2f1;if(!this['_statusEnv'])return[];try{this[_0x35c73d(0x244)]['db']?.[_0x35c73d(0x35f)]?.();}catch{}const _0x464a48=Date[_0x35c73d(0x2d7)](),_0x144cbe=_0x5630bb[_0x35c73d(0x21a)](),_0x5740ee=[];for(const {value:_0xd8a8bc}of this['_statusEnv'][_0x35c73d(0x2cd)](_0x356b61)){if(!_0xd8a8bc)continue;let _0x1530f0=null;_0xd8a8bc[_0x35c73d(0x1aa)]===_0x144cbe&&typeof _0xd8a8bc[_0x35c73d(0x322)]===_0x35c73d(0x335)&&(_0x1530f0=!this['_nodeDead'](_0xd8a8bc));if(_0x1530f0===![])continue;const _0x224e11=_0xd8a8bc[_0x35c73d(0x191)]==null||_0xd8a8bc['expiresAt']>=_0x464a48;if(_0x1530f0===!![]||_0x224e11)_0x5740ee[_0x35c73d(0x18a)](_0xd8a8bc);}return _0x5740ee;}async['reap'](_0x1f7150=0x0){const _0x17b0f2=_0x2ac2f1;if(!this[_0x17b0f2(0x244)]||!this[_0x17b0f2(0x1ae)])return;const _0x5d06f2=Date[_0x17b0f2(0x2d7)]()-_0x1f7150,_0x373894=new Set(),_0x2d53b4=[],_0x45e3f3=_0x5630bb[_0x17b0f2(0x21a)]();for(const {key:_0x57ba64,value:_0x317a86}of this[_0x17b0f2(0x244)][_0x17b0f2(0x2cd)](_0x356b61)){if(!_0x317a86)continue;const _0x9c991b=_0x317a86['host']===_0x45e3f3&&typeof _0x317a86['pid']===_0x17b0f2(0x335),_0xbd4861=_0x9c991b?this[_0x17b0f2(0x30c)](_0x317a86):_0x317a86[_0x17b0f2(0x191)]!=null&&_0x317a86[_0x17b0f2(0x191)]<_0x5d06f2;if(_0xbd4861)_0x2d53b4[_0x17b0f2(0x18a)](_0x57ba64);else _0x373894[_0x17b0f2(0x237)](_0x14bad7(_0x317a86)??_0x57ba64);}for(const _0x3c3a43 of _0x2d53b4)this[_0x17b0f2(0x19d)](_0x3c3a43);if(this[_0x17b0f2(0x20a)]()){const _0x332118=[];for(const {key:_0x223250}of this[_0x17b0f2(0x33f)](_0x17b0f2(0x31e))){if(!_0x373894[_0x17b0f2(0x30e)](_0x223250)){if(_0x5805ea)try{this['_desired'][_0x17b0f2(0x1c2)](_0x17b0f2(0x2a7)+_0x223250);}catch{}else _0x332118[_0x17b0f2(0x18a)](this[_0x17b0f2(0x2f2)][_0x17b0f2(0x2cb)](_0x17b0f2(0x2a7)+_0x223250));}}if(_0x332118['length'])await Promise[_0x17b0f2(0x27e)](_0x332118);}}[_0x2ac2f1(0x222)](_0x38004c=null){const _0xf393d4=_0x2ac2f1;if(this[_0xf393d4(0x1ab)])return;if(!this[_0xf393d4(0x1ae)]||!this[_0xf393d4(0x244)]){this[_0xf393d4(0x248)]?.[_0xf393d4(0x38f)]?.['warn']?.('registry\x20heartbeat\x20skipped\x20(writer='+this[_0xf393d4(0x1ae)]+_0xf393d4(0x29d)+!!this[_0xf393d4(0x244)]+_0xf393d4(0x31a),{'feature':_0xf393d4(0x2a4)});return;}this[_0xf393d4(0x194)]=_0x38004c,this[_0xf393d4(0x265)]=()=>this['_maybePublish']();for(const _0xca82fb of _0x5ca496)this[_0xf393d4(0x248)][_0xf393d4(0x325)]['on'](_0xca82fb,this[_0xf393d4(0x265)]);this[_0xf393d4(0x187)]();const _0x26717a=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x5d5cc2;this[_0xf393d4(0x1ab)]=setInterval(()=>{const _0x23bd8a=_0xf393d4;if(this[_0x23bd8a(0x194)])try{this['_onTick']();}catch{}this[_0x23bd8a(0x187)](),this[_0x23bd8a(0x252)]()['catch'](()=>{});},_0x26717a);if(this[_0xf393d4(0x1ab)]['unref'])this[_0xf393d4(0x1ab)][_0xf393d4(0x369)]();}[_0x2ac2f1(0x380)](){const _0x519b9d=_0x2ac2f1;if(!this[_0x519b9d(0x1ae)]||!this[_0x519b9d(0x244)])return;if(Date['now']()-this[_0x519b9d(0x259)]<_0x28ab7d)return;this[_0x519b9d(0x187)]();}[_0x2ac2f1(0x187)](){const _0x198631=_0x2ac2f1;if(!this[_0x198631(0x1ae)]||!this['_statusEnv'])return;this['_lastPublishAt']=Date[_0x198631(0x2d7)]();try{const _0x197709=[this[_0x198631(0x32b)]()];for(const _0x2850d6 of this['_children'][_0x198631(0x1ed)]())_0x197709['push'](this[_0x198631(0x2d9)](_0x2850d6));const _0x5c5622=_0x4a856d[_0x198631(0x251)]?_0x4a856d[_0x198631(0x2d7)]():0x0;for(const _0x2e2b73 of _0x197709){try{this['_putRowSync'](_0x2e2b73),this['_publishFailWarned']=![];}catch(_0xdf0c73){!this[_0x198631(0x2eb)]&&(this[_0x198631(0x2eb)]=!![],this[_0x198631(0x248)]?.[_0x198631(0x38f)]?.['warn']?.(_0x198631(0x211)+_0xdf0c73['message'],{'feature':_0x198631(0x2a4)}));}}if(_0x4a856d[_0x198631(0x251)])_0x4a856d[_0x198631(0x1a2)](_0x198631(0x2b2),_0x4a856d['now']()-_0x5c5622,_0x198631(0x379)+_0x197709['length']+_0x198631(0x19b));}catch(_0x289074){!this[_0x198631(0x2eb)]&&(this[_0x198631(0x2eb)]=!![],this['okdb']?.[_0x198631(0x38f)]?.[_0x198631(0x307)]?.(_0x198631(0x211)+_0x289074[_0x198631(0x198)],{'feature':'processes'}));}}async[_0x2ac2f1(0x305)](){const _0x5241b9=_0x2ac2f1;if(this['_onProcEvent']){for(const _0x27f80d of _0x5ca496){try{this['okdb'][_0x5241b9(0x325)][_0x5241b9(0x30f)](_0x27f80d,this[_0x5241b9(0x265)]);}catch{}}this[_0x5241b9(0x265)]=null;}this[_0x5241b9(0x1ab)]&&(clearInterval(this[_0x5241b9(0x1ab)]),this['_hbTimer']=null);try{if(this[_0x5241b9(0x244)]&&this[_0x5241b9(0x1ae)])await this[_0x5241b9(0x376)](this[_0x5241b9(0x218)]);}catch{}}async[_0x2ac2f1(0x346)](){const _0x2f3c67=_0x2ac2f1;if(!this['_statusEnv']||!this[_0x2f3c67(0x1ae)])return;try{await this[_0x2f3c67(0x376)](this['_rowKey']);}catch{}try{const _0x5eb738=[];for(const {value:_0x1ce9d1}of this['_statusEnv'][_0x2f3c67(0x2cd)](_0x356b61)){if(_0x1ce9d1?.[_0x2f3c67(0x315)]===process[_0x2f3c67(0x322)]&&_0x1ce9d1[_0x2f3c67(0x36f)])_0x5eb738[_0x2f3c67(0x18a)](_0x1ce9d1['nodeKey']);}for(const _0x36069a of _0x5eb738){try{await this['removeNode'](_0x36069a);}catch{}}}catch{}}async[_0x2ac2f1(0x1d2)](){const _0x5b8c2a=_0x2ac2f1;return this[_0x5b8c2a(0x1c4)](this['_buildOwnRow']());}async[_0x2ac2f1(0x27f)](_0x7bed91){const _0x3d879f=_0x2ac2f1;if(!this[_0x3d879f(0x244)]||!this[_0x3d879f(0x1ae)])return;return this['putNode'](this[_0x3d879f(0x2d9)](_0x7bed91));}['_buildChildRow']({pid:_0x80b9a5,startedAt:_0x52ce16,kind:_0x45ff16,supervisorKey:_0x43e309,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x2ac2f1(0x17e),meta:meta=null,stats:stats=null}){const _0x23d4a1=_0x2ac2f1,_0x514ae9=Date[_0x23d4a1(0x2d7)](),_0x4ee4f2=_0x3e0005(_0x80b9a5,_0x52ce16);return{'nodeKey':_0x33fae2(_0x4ee4f2,'0'),'processKey':_0x4ee4f2,'instanceId':'0','pid':_0x80b9a5,'startedAt':_0x52ce16,'ppid':process[_0x23d4a1(0x322)],'host':_0x5630bb['hostname'](),'supervisorKey':_0x43e309,'slot':slot,'slotKey':slotKey,'kind':_0x45ff16,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x514ae9,'expiresAt':_0x514ae9+_0x4e288c,'caps':this[_0x23d4a1(0x383)](_0x45ff16,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x2ac2f1(0x236)](_0x230d5d){const _0xcb4598=_0x2ac2f1;if(!_0x230d5d?.[_0xcb4598(0x322)])return null;const _0x5bfda6=_0x3e0005(_0x230d5d['pid'],_0x230d5d[_0xcb4598(0x1ad)]);this[_0xcb4598(0x1a7)]['set'](_0x5bfda6,{..._0x230d5d,'supervisorKey':_0x230d5d[_0xcb4598(0x375)]??this['_selfKey']});if(this[_0xcb4598(0x1ae)])await this[_0xcb4598(0x27f)](this[_0xcb4598(0x1a7)][_0xcb4598(0x36d)](_0x5bfda6))[_0xcb4598(0x16f)]?.(()=>{});return _0x5bfda6;}[_0x2ac2f1(0x17f)](_0x25770d){const _0x3c9f23=_0x2ac2f1;if(!_0x25770d)return;return this[_0x3c9f23(0x1a7)][_0x3c9f23(0x2e7)](_0x25770d),this['removeNode'](_0x25770d);}[_0x2ac2f1(0x310)](){const _0x42c924=_0x2ac2f1,_0x30da1d=Date[_0x42c924(0x2d7)](),_0x14b490=process['cpuUsage'](),_0xbca1dd=(_0x30da1d-this[_0x42c924(0x37e)])*0x3e8;if(_0xbca1dd>=0x3d090){const _0x397841=_0x14b490[_0x42c924(0x2c7)]-this['_lastCpuUsage'][_0x42c924(0x2c7)]+(_0x14b490['system']-this[_0x42c924(0x2bd)][_0x42c924(0x1b3)]),_0x1ab98f=_0x5630bb[_0x42c924(0x34f)]()[_0x42c924(0x263)]||0x1;this['_lastCpuPct']=Math['min'](0x64,Math[_0x42c924(0x35c)](_0x397841/(_0xbca1dd*_0x1ab98f)*0x64)),this[_0x42c924(0x272)]=Math[_0x42c924(0x35c)](_0xbca1dd/0x3e8),this[_0x42c924(0x2bd)]=_0x14b490,this['_lastCpuAt']=_0x30da1d;}const _0x17691b=process['memoryUsage'](),_0x17996f=this[_0x42c924(0x324)][_0x42c924(0x302)];let _0x1bbd88=0x0;if(_0x17996f>0x0){const _0x33f5b4=[this['okdb'],...this[_0x42c924(0x248)][_0x42c924(0x299)]?.['values']?.()??[]];for(const _0x2e22a3 of _0x33f5b4){const _0x55db0c=_0x2e22a3[_0x42c924(0x33a)]?.[_0x42c924(0x37f)];if(_0x55db0c)_0x1bbd88+=_0x55db0c[_0x42c924(0x306)]['busy'];}}let _0x3d25e1=null;const _0x8f155f=_0x17996f;if(_0x8f155f>0x0){let _0x32c8b0=0x0;for(const _0x2463ab of this[_0x42c924(0x324)]['values']())_0x32c8b0+=_0x2463ab[_0x42c924(0x321)]||0x0;_0x3d25e1={'count':_0x8f155f,'heapUsed':_0x32c8b0,'sandbox':_0x17996f,'busy':_0x1bbd88};}return{'rss':_0x17691b[_0x42c924(0x318)],'heapUsed':_0x17691b[_0x42c924(0x321)],'heapTotal':_0x17691b[_0x42c924(0x2dd)],'external':_0x17691b[_0x42c924(0x20b)],'cpuPct':this[_0x42c924(0x361)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x3d25e1,'at':_0x30da1d};}[_0x2ac2f1(0x266)](_0x5701d3,_0x47ecce){const _0x42176f=_0x2ac2f1;if(!_0x5701d3||!_0x47ecce)return;this[_0x42176f(0x324)]['set'](_0x5701d3,_0x47ecce);}['clearThreadStats'](_0x54ccb9){this['_threadStats']['delete'](_0x54ccb9);}[_0x2ac2f1(0x179)](_0x21bf8e,_0x381329,_0x243e1f=undefined){const _0x4cf77f=_0x2ac2f1,_0x56e848=this['_children'][_0x4cf77f(0x36d)](_0x21bf8e);if(!_0x56e848||!_0x381329)return;if(_0x243e1f!==undefined)_0x56e848[_0x4cf77f(0x1ff)]=_0x243e1f;_0x56e848[_0x4cf77f(0x183)]={'rss':_0x381329['rss']??null,'heapUsed':_0x381329['heapUsed']??null,'heapTotal':_0x381329[_0x4cf77f(0x2dd)]??null,'external':_0x381329['external']??null,'cpuPct':_0x381329['cpuPct']??null,'cpuWindowMs':_0x381329[_0x4cf77f(0x1b4)]??null,'threads':_0x381329['threads']??null,'claims':_0x381329[_0x4cf77f(0x2e5)]??null,'envsOpen':_0x381329['envsOpen']??null,'at':Date['now']()};}[_0x2ac2f1(0x32b)](){const _0x2e93a7=_0x2ac2f1,_0x45dab0=Date[_0x2e93a7(0x2d7)](),_0x126e40=this['okdb']['_role']||{},_0x2c40db=this['_kind']||'cli';return{'nodeKey':this['_rowKey'],'processKey':this[_0x2e93a7(0x340)],'instanceId':this[_0x2e93a7(0x270)],'pid':process[_0x2e93a7(0x322)],'startedAt':this[_0x2e93a7(0x32d)],'instanceStartedAt':this[_0x2e93a7(0x297)],'ppid':typeof process[_0x2e93a7(0x315)]===_0x2e93a7(0x335)?process[_0x2e93a7(0x315)]:null,'host':_0x5630bb[_0x2e93a7(0x21a)](),'supervisorKey':this[_0x2e93a7(0x2fb)]??null,'kind':_0x2c40db,'role':{'engines':!!_0x126e40['engines'],'processors':!!_0x126e40[_0x2e93a7(0x18b)],'compaction':_0x126e40[_0x2e93a7(0x2f4)],'http':_0x126e40[_0x2e93a7(0x2d4)]},'listenAddr':this[_0x2e93a7(0x30d)]??null,'heartbeatAt':_0x45dab0,'expiresAt':_0x45dab0+_0x4e288c,'caps':this['_caps'](_0x2c40db,_0x126e40),'lifecycle':{'state':_0x2e93a7(0x17e),'desiredVersionApplied':null},'meta':{...this[_0x2e93a7(0x2b9)]},'processing':_0x126e40[_0x2e93a7(0x18b)]?this[_0x2e93a7(0x242)]():null,'engines':_0x126e40[_0x2e93a7(0x24d)]?[...this[_0x2e93a7(0x248)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x2e93a7(0x199)](),'stats':this[_0x2e93a7(0x310)](),'writers':this[_0x2e93a7(0x2ae)]()};}[_0x2ac2f1(0x2ae)](){const _0xcd869e=_0x2ac2f1,_0x5e205c={};try{for(const [_0x5b99d1,_0x193951]of this[_0xcd869e(0x248)][_0xcd869e(0x299)]){try{const _0x15c0cc=_0x193951[_0xcd869e(0x1df)]?.();if(!_0x15c0cc)continue;if(!_0x15c0cc[_0xcd869e(0x358)]&&!_0x15c0cc[_0xcd869e(0x193)]&&!(_0x15c0cc[_0xcd869e(0x207)]??0x0)&&!_0x15c0cc[_0xcd869e(0x343)])continue;_0x5e205c[_0x5b99d1]={'depth':_0x15c0cc[_0xcd869e(0x358)],'oldestPendingMs':_0x15c0cc[_0xcd869e(0x39c)],'committed':_0x15c0cc[_0xcd869e(0x193)],'commitsPerSec':_0x15c0cc[_0xcd869e(0x197)],'commitP99Ms':_0x15c0cc[_0xcd869e(0x332)],'parkedNow':_0x15c0cc[_0xcd869e(0x207)]??0x0,'draining':!!_0x15c0cc[_0xcd869e(0x343)]};}catch{}}}catch{}return Object[_0xcd869e(0x359)](_0x5e205c)['length']?_0x5e205c:null;}[_0x2ac2f1(0x199)](){const _0x457282=_0x2ac2f1,_0x27ae96=process[_0x457282(0x322)],_0x2abec6=Date[_0x457282(0x2d7)](),_0x29a29a=_0x4e2ec0=>{const _0x10ce4a=_0x457282;if(!_0x4e2ec0)return[];const _0xf3abfe=[];try{for(const {id:_0x390176,entry:_0x37c4de}of _0x4e2ec0['list']()){if(_0x37c4de?.['holder']?.[_0x10ce4a(0x322)]!==_0x27ae96)continue;const _0x3a1607=_0x37c4de['updatedAt']??_0x37c4de[_0x10ce4a(0x182)]??0x0;if(_0x3a1607+(_0x37c4de[_0x10ce4a(0x301)]??0x0)<_0x2abec6)continue;_0xf3abfe[_0x10ce4a(0x18a)](_0x390176);}}catch{}return _0xf3abfe;},_0x4875e1=_0x29a29a(this['_singletonLock'](_0x457282(0x234))),_0x2f9648=_0x29a29a(this[_0x457282(0x373)](_0x457282(0x204)));if(!_0x4875e1[_0x457282(0x263)]&&!_0x2f9648[_0x457282(0x263)])return null;return{'compact':_0x4875e1,'replicate':_0x2f9648};}[_0x2ac2f1(0x373)](_0x16e72b){const _0x4ac713=_0x2ac2f1;if(!this['okdb']?.['_rootDb'])return null;if(!this[_0x4ac713(0x2c6)])this['_singletonLocks']=new Map();let _0x5c734f=this[_0x4ac713(0x2c6)][_0x4ac713(0x36d)](_0x16e72b);if(!_0x5c734f)try{_0x5c734f=new _0x1803c0(this[_0x4ac713(0x248)][_0x4ac713(0x294)],{'namespace':_0x16e72b}),this['_singletonLocks'][_0x4ac713(0x37b)](_0x16e72b,_0x5c734f);}catch{return null;}return _0x5c734f;}['_buildProcessingFacet'](){const _0x4d467e=_0x2ac2f1,_0x1a0967=[];try{for(const [_0xeb26ca,_0x4461c4]of this[_0x4d467e(0x248)][_0x4d467e(0x299)]){if(_0xeb26ca[_0x4d467e(0x2b6)]('~'))continue;for(const _0x23a857 of _0x4461c4[_0x4d467e(0x22a)][_0x4d467e(0x2f7)]())_0x1a0967[_0x4d467e(0x18a)]({..._0x23a857,'env':_0xeb26ca});}}catch{}return{'participate':this[_0x4d467e(0x248)]['processors']?.[_0x4d467e(0x26b)]??![],'processors':_0x1a0967};}[_0x2ac2f1(0x20a)](){const _0x1f1c3d=_0x2ac2f1;if(this[_0x1f1c3d(0x2f2)])return!![];const _0x15fe46=this[_0x1f1c3d(0x248)][_0x1f1c3d(0x294)];if(!_0x15fe46)return![];return this[_0x1f1c3d(0x2f2)]=_0x15fe46[_0x1f1c3d(0x309)](_0x4d8e2d,{'dupSort':![]}),this[_0x1f1c3d(0x2ed)]=_0x15fe46[_0x1f1c3d(0x309)](_0x2f768e,{'dupSort':![]}),!![];}async[_0x2ac2f1(0x288)](){const _0x24e4b9=_0x2ac2f1;if(!this[_0x24e4b9(0x20a)]())return;const _0x465c17=_0x24e4b9(0x209),_0x11ecd9=0x1,_0xda7147=this[_0x24e4b9(0x2f2)][_0x24e4b9(0x36d)](_0x465c17)??0x0;if(_0xda7147>=_0x11ecd9)return;const _0x341011=_0x1c5544=>{const _0x3df16a=_0x24e4b9;if(_0x1c5544===_0x3df16a(0x1f7))return _0x3df16a(0x1fd);if(_0x1c5544===_0x3df16a(0x38e))return _0x3df16a(0x300);return _0x1c5544;};await this[_0x24e4b9(0x248)][_0x24e4b9(0x2c2)][_0x24e4b9(0x177)][_0x24e4b9(0x1e6)](()=>{const _0x5527c6=_0x24e4b9;for(const _0x397dee of[_0x5527c6(0x255),_0x5527c6(0x384)]){for(const {key:_0x5293b4,value:_0x59f3c6}of this[_0x5527c6(0x2f2)]['getRange']({'start':_0x397dee,'end':_0x397dee+'ÿ'})){if(typeof _0x5293b4!==_0x5527c6(0x256)||!_0x5293b4[_0x5527c6(0x2b6)](_0x397dee))break;const _0x278584=_0x341011(_0x59f3c6[_0x5527c6(0x1b2)]);if(_0x278584!==_0x59f3c6[_0x5527c6(0x1b2)])this[_0x5527c6(0x2f2)]['put'](_0x5293b4,{..._0x59f3c6,'mode':_0x278584});}}this[_0x5527c6(0x2f2)][_0x5527c6(0x1fb)](_0x465c17,_0x11ecd9);});}[_0x2ac2f1(0x2b5)](){const _0x409e6f=_0x2ac2f1;return!!this[_0x409e6f(0x2f2)];}[_0x2ac2f1(0x201)](_0x58a46a,_0x2e37ae){const _0x561746=_0x2ac2f1;if(!this['_ensureDesired']())return null;const _0x5db3dd=_0x58a46a+'/'+_0x2e37ae;return this[_0x561746(0x245)](),this[_0x561746(0x1e1)]['get'](_0x5db3dd)??this[_0x561746(0x2f2)][_0x561746(0x36d)](_0x5db3dd)??null;}['_refreshDesiredSnapshot'](){const _0x216c5e=_0x2ac2f1;if(!_0x5805ea)return;try{this['okdb'][_0x216c5e(0x2c2)]?.['db']?.[_0x216c5e(0x35f)]?.();}catch{}}async[_0x2ac2f1(0x393)](_0x474056,_0x3485ab,_0x2c8eff){const _0x56f560=_0x2ac2f1;if(!this[_0x56f560(0x20a)]())return null;const _0x5d9423=_0x474056+'/'+_0x3485ab;this['_refreshDesiredSnapshot']();const _0x732f34=this['_desiredOverlay']['get'](_0x5d9423)??this['_desired'][_0x56f560(0x36d)](_0x5d9423)??{'version':0x0},_0x4f706b=(_0x732f34[_0x56f560(0x19e)]||0x0)+0x1,_0x5c0f59={..._0x732f34,..._0x2c8eff,'version':_0x4f706b,'updatedAt':Date[_0x56f560(0x2d7)]()};this[_0x56f560(0x1e1)][_0x56f560(0x37b)](_0x5d9423,_0x5c0f59);try{await this[_0x56f560(0x248)][_0x56f560(0x2c2)][_0x56f560(0x177)]['transaction'](()=>{const _0x29b67e=_0x56f560;this[_0x29b67e(0x2f2)]['put'](_0x5d9423,_0x5c0f59);});}finally{if(this[_0x56f560(0x1e1)]['get'](_0x5d9423)===_0x5c0f59)this[_0x56f560(0x1e1)][_0x56f560(0x2e7)](_0x5d9423);}return _0x4f706b;}['listDesired'](_0x49f93){const _0x14beb7=_0x2ac2f1;if(!this[_0x14beb7(0x20a)]())return[];this[_0x14beb7(0x245)]();const _0x37bcc5=_0x49f93+'/',_0x17eee2=[];for(const {key:_0x4db94a,value:_0x2ecfb5}of this['_desired'][_0x14beb7(0x2cd)]({'start':_0x37bcc5,'end':_0x37bcc5+'ÿ'})){if(typeof _0x4db94a!=='string'||!_0x4db94a[_0x14beb7(0x2b6)](_0x37bcc5))break;_0x17eee2['push']({'key':_0x4db94a['slice'](_0x37bcc5[_0x14beb7(0x263)]),'value':_0x2ecfb5});}return _0x17eee2;}[_0x2ac2f1(0x208)](_0x1af9ca){const _0x56d67d=_0x2ac2f1;if(!this[_0x56d67d(0x20a)]())return null;return this['_cmd'][_0x56d67d(0x36d)](_0x1af9ca)??null;}async[_0x2ac2f1(0x28d)](_0x2efb34,_0x21af14,_0x8373cb={}){const _0x334fb2=_0x2ac2f1;if(!this[_0x334fb2(0x20a)]())return null;let _0x298a45;return await this['okdb']['_systemEnv'][_0x334fb2(0x177)][_0x334fb2(0x1e6)](()=>{const _0x152650=_0x334fb2,_0x263741=this[_0x152650(0x2ed)][_0x152650(0x36d)](_0x2efb34)||{'epoch':0x0};_0x298a45=(_0x263741[_0x152650(0x34a)]||0x0)+0x1,this['_cmd'][_0x152650(0x1fb)](_0x2efb34,{..._0x263741,..._0x8373cb,'cmd':_0x21af14,'epoch':_0x298a45,'updatedAt':Date[_0x152650(0x2d7)]()});}),_0x298a45;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x53a352,'nodeKey':_0x3e0005,'logicalKey':_0x4b609f,'slotKey':_0x311e67,'PROCESS_ENV':_0x740393,'NODE_TYPE':_0x356b61},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x4c383b=_0x6505f9;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0xda7576=require$$0$4,{EVENTS:_0x1d59ac,CHANGE_ACTIONS:_0x414039}=requireOkdbEnums(),{LOOP:_0x38987a}=requireOkdbLoopMonitor(),_0x426194=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0xdfcc57=0x5,_0x5296f9=0x2710;class _0x46695e extends _0xda7576{constructor(_0xd12307,_0x42708b={}){const _0x24cea0=_0x53b1;super(),this[_0x24cea0(0x248)]=_0xd12307,this['_quantum']=_0x42708b[_0x24cea0(0x2a0)]??_0x426194,this[_0x24cea0(0x1f5)]=_0x42708b[_0x24cea0(0x1de)]??_0xdfcc57,this[_0x24cea0(0x1c0)]=_0x42708b[_0x24cea0(0x1af)]??_0x5296f9,this[_0x24cea0(0x19a)]=![],this['_cursors']=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x24cea0(0x186)]=null,this[_0x24cea0(0x389)]=![],this['_seen']=new Set(),this[_0x24cea0(0x206)]=_0xc7b5a0=>this[_0x24cea0(0x1ac)](_0xc7b5a0),this[_0x24cea0(0x2a9)]=_0x42cfa4=>this[_0x24cea0(0x2b7)](_0x42cfa4),this['_onStop']=()=>this[_0x24cea0(0x243)]();}[_0x4c383b(0x1d6)](){const _0x4d2a72=_0x4c383b;if(this[_0x4d2a72(0x19a)])return;this[_0x4d2a72(0x19a)]=!![];for(const [_0x325e2b,_0xf58c7]of this[_0x4d2a72(0x248)][_0x4d2a72(0x299)]){if(_0x325e2b[_0x4d2a72(0x2b6)]('~'))continue;try{_0xf58c7[_0x4d2a72(0x37c)]();}catch{}}for(const [_0x180880,_0x220a9d]of this[_0x4d2a72(0x248)]['_envs']){if(_0x180880[_0x4d2a72(0x2b6)]('~'))continue;try{this[_0x4d2a72(0x219)][_0x4d2a72(0x37b)](_0x180880,_0x220a9d['getClock']()||0x0);}catch{}}const {events:_0x41403d}=this[_0x4d2a72(0x248)];_0x41403d['on'](_0x1d59ac[_0x4d2a72(0x1cf)],this[_0x4d2a72(0x206)]),_0x41403d['on'](_0x1d59ac['ITEM_UPDATE'],this[_0x4d2a72(0x206)]),_0x41403d['on'](_0x1d59ac['ITEM_REMOVE'],this[_0x4d2a72(0x206)]),_0x41403d['on'](_0x1d59ac[_0x4d2a72(0x24f)],this[_0x4d2a72(0x2a9)]),_0x41403d[_0x4d2a72(0x2ee)](_0x1d59ac['SYSTEM_STOPPED'],this[_0x4d2a72(0x246)]);}['stop'](){const _0x2978c=_0x4c383b;if(!this[_0x2978c(0x19a)])return;this['_started']=![];const {events:_0x50a95a}=this[_0x2978c(0x248)];_0x50a95a[_0x2978c(0x30f)](_0x1d59ac[_0x2978c(0x1cf)],this[_0x2978c(0x206)]),_0x50a95a[_0x2978c(0x30f)](_0x1d59ac[_0x2978c(0x254)],this[_0x2978c(0x206)]),_0x50a95a[_0x2978c(0x30f)](_0x1d59ac[_0x2978c(0x37d)],this[_0x2978c(0x206)]),_0x50a95a['off'](_0x1d59ac[_0x2978c(0x24f)],this[_0x2978c(0x2a9)]);try{_0x50a95a[_0x2978c(0x30f)](_0x1d59ac[_0x2978c(0x17b)],this['_onStop']);}catch{}this[_0x2978c(0x186)]&&(clearTimeout(this[_0x2978c(0x186)]),this[_0x2978c(0x186)]=null),this[_0x2978c(0x1c3)]['clear'](),this[_0x2978c(0x398)][_0x2978c(0x225)](),this[_0x2978c(0x219)]['clear'](),this[_0x2978c(0x2aa)][_0x2978c(0x225)]();}[_0x4c383b(0x269)](_0x6969e9,_0x3335df,_0x420e67,_0x5b44fa){return _0x6969e9+'\x00'+_0x3335df+'\x00'+_0x420e67+'\x00'+_0x5b44fa;}['_markSeen'](_0x1e64f4,_0x3a560b,_0x148798,_0x349c67){const _0x9a84dc=_0x4c383b,_0x546c02=this['_dedupeKey'](_0x1e64f4,_0x3a560b,_0x148798,_0x349c67);if(this['_seen'][_0x9a84dc(0x30e)](_0x546c02))return![];this['_seen'][_0x9a84dc(0x237)](_0x546c02);if(this[_0x9a84dc(0x2aa)][_0x9a84dc(0x302)]>this[_0x9a84dc(0x1c0)]){const _0x5d292d=this[_0x9a84dc(0x2aa)][_0x9a84dc(0x1ed)]()[_0x9a84dc(0x25c)]()[_0x9a84dc(0x345)];this['_seen']['delete'](_0x5d292d);}return!![];}['_handleInProcess'](_0x1e2b3a){const _0x3b7897=_0x4c383b;if(!this['_started']||!_0x1e2b3a)return;const {env:_0x344716,type:_0x51eeb8,key:_0xf902b6,clock:_0x1f1b70,origin:_0x1d155d,action:_0x5b4e1d,newValue:_0x3c81b8,oldValue:_0x322019}=_0x1e2b3a;if(_0x344716==null||_0x51eeb8==null||_0xf902b6==null)return;if(typeof _0x344716===_0x3b7897(0x256)&&_0x344716[_0x3b7897(0x2b6)]('~'))return;if(typeof _0x51eeb8===_0x3b7897(0x256)&&_0x51eeb8[_0x3b7897(0x2b6)]('~'))return;if(!this[_0x3b7897(0x165)](_0x344716,_0x51eeb8,_0xf902b6,_0x1f1b70))return;const _0x320878=_0x5b4e1d===_0x414039[_0x3b7897(0x2d3)]?_0x3b7897(0x2cb):_0x3b7897(0x1fb);this[_0x3b7897(0x356)]('change',{'env':_0x344716,'type':_0x51eeb8,'key':_0xf902b6,'op':_0x320878,'clock':_0x1f1b70,'origin':_0x1d155d,'value':_0x320878===_0x3b7897(0x2cb)?null:_0x3c81b8,'prevValue':_0x322019});}['_handlePoke'](_0x3a7a63){const _0xc76845=_0x4c383b;if(!this[_0xc76845(0x19a)])return;if(!_0x3a7a63||typeof _0x3a7a63[_0xc76845(0x24b)]!==_0xc76845(0x256)||typeof _0x3a7a63[_0xc76845(0x1b9)]!==_0xc76845(0x256))return;const {env:_0x13118e,type:_0x2d4806}=_0x3a7a63;if(_0x13118e[_0xc76845(0x2b6)]('~')||_0x2d4806[_0xc76845(0x2b6)]('~'))return;this[_0xc76845(0x1c3)][_0xc76845(0x37b)](_0x13118e+'\x00'+_0x2d4806,{'env':_0x13118e,'type':_0x2d4806}),this[_0xc76845(0x21c)]();}[_0x4c383b(0x21c)](){const _0x49cf48=_0x4c383b;if(this[_0x49cf48(0x186)])return;const _0x2230a6=()=>{const _0x17305d=_0x49cf48;this[_0x17305d(0x186)]=null,this[_0x17305d(0x35a)]()[_0x17305d(0x16f)](()=>{});};this[_0x49cf48(0x186)]=setTimeout(_0x2230a6,this[_0x49cf48(0x1f5)]>0x0?this[_0x49cf48(0x1f5)]:0x0);}async['_drain'](){const _0x581530=_0x4c383b;if(this[_0x581530(0x389)]){this[_0x581530(0x21c)]();return;}this['_draining']=!![];try{const _0x5908be=[...this[_0x581530(0x1c3)][_0x581530(0x1ed)]()];this[_0x581530(0x1c3)][_0x581530(0x225)]();let _0x5635d1=![];for(const {env:_0x3b9c04,type:_0x4323f4}of _0x5908be){try{const _0x35be8c=await this[_0x581530(0x1cc)](_0x3b9c04,_0x4323f4);if(_0x35be8c)_0x5635d1=!![];}catch{this[_0x581530(0x1c3)][_0x581530(0x37b)](_0x3b9c04+'\x00'+_0x4323f4,{'env':_0x3b9c04,'type':_0x4323f4}),_0x5635d1=!![];}}if(_0x5635d1||this['_pending'][_0x581530(0x302)]>0x0)this[_0x581530(0x21c)]();}finally{this[_0x581530(0x389)]=![];}}async['_drainOne'](_0x287655,_0x3e71a4){const _0xd7510a=_0x4c383b,_0x2cd750=await this['okdb'][_0xd7510a(0x28c)](_0x287655),_0x4fe359=_0x287655+'\x00'+_0x3e71a4;!this[_0xd7510a(0x398)][_0xd7510a(0x30e)](_0x4fe359)&&(!this[_0xd7510a(0x219)][_0xd7510a(0x30e)](_0x287655)&&(_0x2cd750[_0xd7510a(0x37c)](),this['_baselines'][_0xd7510a(0x37b)](_0x287655,_0x2cd750['getClock']()||0x0)),this[_0xd7510a(0x398)]['set'](_0x4fe359,this[_0xd7510a(0x219)][_0xd7510a(0x36d)](_0x287655)));const _0x4a8bea=this[_0xd7510a(0x398)][_0xd7510a(0x36d)](_0x4fe359),_0x4a798f=_0x2cd750[_0xd7510a(0x1b6)](_0x3e71a4)||0x0;if(_0x4a798f<=_0x4a8bea)return![];const _0x34e327=_0x4a8bea+this[_0xd7510a(0x1ea)],_0x2aa655=Math[_0xd7510a(0x2d8)](_0x4a798f,_0x34e327),_0x21ce62=_0x38987a[_0xd7510a(0x251)]?_0x38987a[_0xd7510a(0x2d7)]():0x0,_0x5c2c1c=Array[_0xd7510a(0x2ba)](_0x2cd750['getChanges'](_0x3e71a4,_0x4a8bea+0x1,_0x2aa655));let _0x46950b=_0x4a8bea;for(const _0x2baa20 of _0x5c2c1c){const {clock:_0x36a130,key:_0x26f9b3,action:_0x332292,origin:_0x27d4f4}=_0x2baa20;if(_0x36a130>_0x46950b)_0x46950b=_0x36a130;if(_0x26f9b3==null)continue;if(!this[_0xd7510a(0x165)](_0x287655,_0x3e71a4,_0x26f9b3,_0x36a130))continue;let _0x44e657,_0x56c5b0;if(_0x332292===_0x414039[_0xd7510a(0x2d3)])_0x44e657=_0xd7510a(0x2cb),_0x56c5b0=null;else{const _0x26040d=_0x2cd750[_0xd7510a(0x36d)](_0x3e71a4,_0x26f9b3);_0x26040d==null?(_0x44e657='remove',_0x56c5b0=null):(_0x44e657=_0xd7510a(0x1fb),_0x56c5b0=_0x26040d);}this[_0xd7510a(0x356)]('change',{'env':_0x287655,'type':_0x3e71a4,'key':_0x26f9b3,'op':_0x44e657,'clock':_0x36a130,'origin':_0x27d4f4,'value':_0x56c5b0});}if(_0x38987a['enabled'])_0x38987a['note'](_0xd7510a(0x1bf)+_0x287655+':'+_0x3e71a4,_0x38987a[_0xd7510a(0x2d7)]()-_0x21ce62,'n='+_0x5c2c1c['length']);return this['_cursors'][_0xd7510a(0x37b)](_0x4fe359,Math[_0xd7510a(0x284)](_0x46950b,_0x2aa655)),_0x2cd750[_0xd7510a(0x1b6)](_0x3e71a4)>_0x2aa655;}[_0x4c383b(0x1e8)](){const _0x3036f9=_0x4c383b;return{'started':this[_0x3036f9(0x19a)],'quantum':this[_0x3036f9(0x1ea)],'flushDebounce':this[_0x3036f9(0x1f5)],'cursors':Object[_0x3036f9(0x1ec)]([...this[_0x3036f9(0x398)][_0x3036f9(0x190)]()]['map'](([_0x4b858d,_0x1eed33])=>[_0x4b858d[_0x3036f9(0x1e3)]('\x00',':'),_0x1eed33])),'pending':this[_0x3036f9(0x1c3)][_0x3036f9(0x302)],'seen':this['_seen']['size']};}}return _0x46695e[_0x4c383b(0x20e)]=_0x426194,okdbChangefeed={'OKDBChangefeed':_0x46695e},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x21dc80=_0x6505f9;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x12f8f5=require$$1$1,_0x4f7cda=require$$1,{EVENTS:_0x1e1ac2}=requireOkdbEnums(),_0x4fad02=require$$0$3,{slotKey:_0x403c50}=requireOkdbProcessRegistry(),_0x369aea=0xfa,_0x3a81ab=0xfa0,_0x413e0e=0x5,_0x9076ad=0x2710,_0x3784f1=0xbb8,_0x31dc40=0x7d0,_0x4b8194='__okdbCluster',_0x25b6c6='ephemeral',_0x43f69c=_0x21dc80(0x38f),_0x1e6ea8=_0x21dc80(0x183),_0x44df28=[_0x1e1ac2[_0x21dc80(0x349)],_0x1e1ac2[_0x21dc80(0x35d)],_0x1e1ac2[_0x21dc80(0x241)],_0x1e1ac2[_0x21dc80(0x1fa)],_0x1e1ac2[_0x21dc80(0x289)],_0x1e1ac2[_0x21dc80(0x1d1)],_0x1e1ac2[_0x21dc80(0x1f6)],_0x1e1ac2['INDEX_REGISTERED'],_0x21dc80(0x365),_0x21dc80(0x268),_0x21dc80(0x29f),_0x21dc80(0x1c5),_0x21dc80(0x2b3),_0x21dc80(0x2a1)],_0x3ba143=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x15ba26({workers:_0x3068b4,makeOkdb:_0x230d0b,port:_0x404091,primaryOkdb:_0x1462d6,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x3762ed=_0x21dc80;if(_0x12f8f5[_0x3762ed(0x253)])return childEntry&&_0x12f8f5[_0x3762ed(0x1c6)]({'exec':_0x4f7cda[_0x3762ed(0x355)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x1d533c=_0x3762ed,_0xfa5a4b=[];for(let _0x21de25=0x0;_0x21de25<process['execArgv'][_0x1d533c(0x263)];_0x21de25++){const _0x3882ea=process[_0x1d533c(0x317)][_0x21de25];if(_0x3882ea['startsWith'](_0x1d533c(0x21d))||_0x3882ea['startsWith'](_0x1d533c(0x34c))||_0x3882ea[_0x1d533c(0x2b6)](_0x1d533c(0x31b)))continue;if(_0x3882ea==='-e'||_0x3882ea===_0x1d533c(0x166)||_0x3882ea==='-p'||_0x3882ea===_0x1d533c(0x238)){_0x21de25++;continue;}_0xfa5a4b[_0x1d533c(0x18a)](_0x3882ea);}return _0xfa5a4b;})())}),_0x45e456({'workers':_0x3068b4,'port':_0x404091,'primaryOkdb':_0x1462d6,'workerEnv':workerEnv});return _0x24b546({'makeOkdb':_0x230d0b,'port':_0x404091});}function _0x45e456({workers:_0xa41de6,port:_0x3ec7f2,primaryOkdb:_0x110044,workerEnv:_0x12c41c}){const _0x53d2c9=_0x21dc80,_0x2c097b=new Map(),_0x228f25=new Map();let _0x2cae61=![];const _0x1a40d4=_0xd00fd=>_0xd00fd?.[_0x53d2c9(0x372)],_0x596cd5=_0x2f4002=>{const _0x292d64=_0x53d2c9,_0x19395d=_0x12f8f5['fork']({...process.env,..._0x12c41c||{},'OKDB_CLUSTER_SLOT':String(_0x2f4002)});return _0x19395d['__okdbSlot']=_0x2f4002,_0x2c097b[_0x292d64(0x37b)](_0x19395d[_0x292d64(0x277)][_0x292d64(0x322)],{'worker':_0x19395d,'startedAt':Date[_0x292d64(0x2d7)](),'slot':_0x2f4002}),_0x19395d['on'](_0x292d64(0x20f),_0x4561fa=>{const _0x33a1a6=_0x292d64;console[_0x33a1a6(0x38f)](_0x33a1a6(0x38c)+_0x19395d[_0x33a1a6(0x277)][_0x33a1a6(0x322)]+_0x33a1a6(0x1cd)+(_0x4561fa?.[_0x33a1a6(0x198)]??_0x4561fa));}),_0x19395d['on'](_0x292d64(0x1f4),()=>_0x5e8b07()),_0x19395d;},_0x42d6a0=_0x2341c8=>{const _0x4e53e6=_0x53d2c9;for(const {worker:_0x1da04d}of _0x2c097b[_0x4e53e6(0x1ed)]()){if(_0x1da04d[_0x4e53e6(0x378)]()||!_0x1da04d[_0x4e53e6(0x24e)]())continue;try{_0x1da04d[_0x4e53e6(0x2f9)](_0x2341c8);}catch{}}};_0x110044?.[_0x53d2c9(0x347)]?.({'kind':'primary','listenAddr':':'+_0x3ec7f2})['catch'](()=>{}),_0x110044?.[_0x53d2c9(0x2a4)]?.[_0x53d2c9(0x167)]?.({'workersConfigured':_0xa41de6});const _0x5dbede={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x5e8b07=()=>{const _0x41a5fb=_0x53d2c9,_0x1ca108=_0x110044?.['processes'];if(!_0x1ca108||!_0x1ca108[_0x41a5fb(0x1ae)])return;const _0x412ee7=_0x1ca108[_0x41a5fb(0x396)];for(const {worker:_0x4127b8,startedAt:_0x423ab6,slot:_0x4819bc,stats:_0x56005d,processing:_0x359c79}of _0x2c097b[_0x41a5fb(0x1ed)]()){if(_0x4127b8['isDead']())continue;const _0x1b5d59=_0x1ca108[_0x41a5fb(0x2b5)]?.()&&_0x1ca108['getDesired']('slot',_0x4c45d7(_0x4819bc))?.[_0x41a5fb(0x32c)]===!![];_0x1ca108[_0x41a5fb(0x27f)]({'pid':_0x4127b8[_0x41a5fb(0x277)]['pid'],'startedAt':_0x423ab6,'kind':'http-server','supervisorKey':_0x412ee7,'slot':_0x4819bc,'slotKey':_0x4c45d7(_0x4819bc),'role':_0x5dbede,'listenAddr':':'+_0x3ec7f2,'lifecycle':_0x1b5d59?_0x41a5fb(0x1ce):_0x41a5fb(0x17e),'processing':_0x359c79??null,'stats':_0x56005d??null})[_0x41a5fb(0x16f)](()=>{});}},_0x4c45d7=_0x5b1cae=>_0x403c50(_0x53d2c9(0x23f)+_0x3ec7f2,_0x5b1cae),_0x4a4c13=_0x15237c=>{const _0x539e74=_0x53d2c9,_0x5455ca=_0x110044?.[_0x539e74(0x2a4)];if(!_0x5455ca?.[_0x539e74(0x2b5)]?.())return![];return _0x5455ca['getDesired']('slot',_0x4c45d7(_0x15237c))?.['decommission']===!![];};for(let _0x5d4be9=0x0;_0x5d4be9<_0xa41de6;_0x5d4be9++){const _0x430e65=_0x4a4c13(_0x5d4be9);_0x228f25['set'](_0x5d4be9,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x430e65,'respawnTimer':null}),_0x430e65?console[_0x53d2c9(0x38f)](_0x53d2c9(0x247)+_0x5d4be9+_0x53d2c9(0x1d9)):_0x596cd5(_0x5d4be9);}const _0x4ad162=()=>{const _0x26536a=_0x53d2c9,_0x26878d=_0x110044?.['processes'];if(!_0x26878d?.['_isWriter']||!_0x26878d['hasDesired']?.())return;for(const [_0x5941eb,_0x44e7a7]of _0x228f25[_0x26536a(0x190)]()){const _0x1136ba=_0x26878d[_0x26536a(0x201)](_0x26536a(0x2be),_0x4c45d7(_0x5941eb)),_0x4be58f=_0x1136ba?.[_0x26536a(0x32c)]===!![],_0x2f5a6b=_0x1136ba?.[_0x26536a(0x1db)]===!![];if(_0x4be58f&&!_0x44e7a7[_0x26536a(0x1a4)]){_0x44e7a7['dead']=!![];_0x44e7a7[_0x26536a(0x2e9)]&&(clearTimeout(_0x44e7a7[_0x26536a(0x2e9)]),_0x44e7a7['respawnTimer']=null);for(const {worker:_0x4d28dd}of _0x2c097b[_0x26536a(0x1ed)]()){if(_0x1a40d4(_0x4d28dd)!==_0x5941eb||_0x4d28dd[_0x26536a(0x378)]())continue;try{if(_0x2f5a6b)_0x4d28dd[_0x26536a(0x277)][_0x26536a(0x1db)](_0x26536a(0x377));else _0x4d28dd[_0x26536a(0x24e)]()&&_0x4d28dd[_0x26536a(0x220)]();}catch{}}console[_0x26536a(0x38f)](_0x26536a(0x1d5)+(_0x2f5a6b?'hard-killed':'decommissioned')+_0x26536a(0x28a)+_0x5941eb+_0x26536a(0x290));}else{if(!_0x4be58f&&_0x44e7a7['dead']&&_0x1136ba){_0x44e7a7[_0x26536a(0x1a4)]=![],_0x44e7a7[_0x26536a(0x287)]=[],_0x44e7a7[_0x26536a(0x35b)]=0x0;const _0x219834=[..._0x2c097b['values']()]['some'](({worker:_0x33f013})=>_0x1a40d4(_0x33f013)===_0x5941eb&&!_0x33f013[_0x26536a(0x378)]());!_0x219834&&!_0x2cae61&&(_0x596cd5(_0x5941eb),console['log'](_0x26536a(0x19f)+_0x5941eb));}}}},_0x342ee5=()=>{try{_0x4ad162();}catch{}};_0x110044?.['events']?.['on']?.(_0x1e1ac2['SYSTEM_PROC'],_0x342ee5);const _0xc3d875=[];if(_0x110044?.['events']?.['on'])for(const _0x3f6ccb of _0x44df28){const _0x22a421=_0x4a09d6=>{_0x42d6a0({[_0x4b8194]:_0x25b6c6,'event':_0x3f6ccb,'data':_0x4a09d6??{}});};_0x110044['events']['on'](_0x3f6ccb,_0x22a421),_0xc3d875[_0x53d2c9(0x18a)]({'event':_0x3f6ccb,'handler':_0x22a421});}const _0x5229cf=setInterval(()=>{_0x4ad162(),_0x5e8b07();},_0x3ba143);_0x5229cf[_0x53d2c9(0x369)]?.();const _0x5dad9a=(_0x2dfc7d,_0x361021)=>{const _0x723e1e=_0x53d2c9;if(!_0x361021||typeof _0x361021!==_0x723e1e(0x34b)||_0x361021[_0x4b8194]!==_0x43f69c)return;if(!_0x110044?.[_0x723e1e(0x38f)]?.['ingest'])return;const _0x512930=_0x361021[_0x723e1e(0x36e)]||{};_0x110044[_0x723e1e(0x38f)][_0x723e1e(0x31c)]({..._0x512930,'msg':'[w'+_0x361021[_0x723e1e(0x2be)]+']\x20'+(_0x512930[_0x723e1e(0x33d)]??''),'meta':{..._0x512930[_0x723e1e(0x34d)]||{},'worker':_0x361021['slot'],'workerPid':_0x361021['pid']}});};_0x12f8f5['on'](_0x53d2c9(0x198),_0x5dad9a);const _0x2acb33=(_0xd852bd,_0x158058)=>{const _0x4ce29d=_0x53d2c9;if(!_0x158058||typeof _0x158058!=='object'||_0x158058[_0x4b8194]!==_0x1e6ea8)return;const _0x4934d4=_0x2c097b['get'](_0xd852bd['process'][_0x4ce29d(0x322)]);if(_0x4934d4){_0x4934d4[_0x4ce29d(0x183)]={..._0x158058['stats'],'at':Date[_0x4ce29d(0x2d7)]()};if(_0x158058[_0x4ce29d(0x1ff)]!==undefined)_0x4934d4[_0x4ce29d(0x1ff)]=_0x158058[_0x4ce29d(0x1ff)];}};_0x12f8f5['on'](_0x53d2c9(0x198),_0x2acb33),_0x12f8f5['on']('exit',(_0x102d0c,_0x3bfc23,_0x371ac9)=>{const _0x89172b=_0x53d2c9,_0x120349=_0x102d0c['process'][_0x89172b(0x322)],_0x34df71=_0x1a40d4(_0x102d0c),_0x71957a=_0x2c097b[_0x89172b(0x36d)](_0x120349);if(_0x71957a&&_0x110044?.[_0x89172b(0x2a4)])_0x110044['processes']['removeNode'](_0x120349+':'+_0x71957a[_0x89172b(0x1ad)])['catch'](()=>{});_0x2c097b[_0x89172b(0x2e7)](_0x120349),console[_0x89172b(0x38f)](_0x89172b(0x38c)+_0x120349+_0x89172b(0x174)+(_0x34df71??'?')+_0x89172b(0x2c4)+(_0x89172b(0x32e)+_0x3bfc23+_0x89172b(0x2df)+(_0x371ac9??_0x89172b(0x30a))+');\x20'+_0x2c097b['size']+_0x89172b(0x1a8))),_0x5e8b07();if(_0x2cae61||_0x34df71==null)return;const _0x45ab15=_0x228f25[_0x89172b(0x36d)](_0x34df71);if(!_0x45ab15||_0x45ab15[_0x89172b(0x1a4)])return;const _0x59bcef=Date['now']();_0x45ab15[_0x89172b(0x287)][_0x89172b(0x18a)](_0x59bcef),_0x45ab15[_0x89172b(0x287)]=_0x45ab15[_0x89172b(0x287)][_0x89172b(0x23e)](_0x3b71d4=>_0x59bcef-_0x3b71d4<=_0x9076ad);if(_0x45ab15['deaths'][_0x89172b(0x263)]>=_0x413e0e){_0x45ab15[_0x89172b(0x1a4)]=!![],console['error']('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x34df71+_0x89172b(0x260)+_0x45ab15[_0x89172b(0x287)][_0x89172b(0x263)]+_0x89172b(0x21e)+(_0x9076ad+_0x89172b(0x1d4)+_0x2c097b['size']+'\x20worker(s)\x20still\x20serving'));return;}_0x45ab15[_0x89172b(0x35b)]++;const _0x160688=Math['min'](_0x3a81ab,_0x369aea*0x2**(_0x45ab15['consecutiveFailures']-0x1));console[_0x89172b(0x38f)](_0x89172b(0x368)+_0x34df71+_0x89172b(0x2a2)+_0x160688+_0x89172b(0x38d)+_0x45ab15['consecutiveFailures']+')'),_0x45ab15[_0x89172b(0x2e9)]=setTimeout(()=>{const _0x119f29=_0x89172b;_0x45ab15['respawnTimer']=null;if(_0x2cae61||_0x45ab15[_0x119f29(0x1a4)])return;const _0x3f5415=_0x596cd5(_0x34df71);_0x3f5415['once'](_0x119f29(0x316),()=>{const _0x3caf8d=_0x119f29;if(_0x228f25[_0x3caf8d(0x36d)](_0x34df71)===_0x45ab15)_0x45ab15[_0x3caf8d(0x35b)]=0x0;});},_0x160688),_0x45ab15['respawnTimer'][_0x89172b(0x369)]?.();});const _0x387d55=[..._0x2c097b['keys']()];console[_0x53d2c9(0x38f)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+'\x20forked\x20'+_0xa41de6+_0x53d2c9(0x240)+_0x3ec7f2+':\x20'+('['+_0x387d55[_0x53d2c9(0x355)](',\x20')+']'));const _0x2d13c7={'_isClusterController':!![],'port':_0x3ec7f2,'primaryOkdb':_0x110044??null,'status'(){const _0x2611fa=_0x53d2c9;return{'clustered':!![],'primaryPid':process[_0x2611fa(0x322)],'port':_0x3ec7f2,'primaryRole':_0x110044?.['role']??null,'processorPid':null,'supervisorPid':process[_0x2611fa(0x322)],'workers':[..._0x2c097b[_0x2611fa(0x1ed)]()][_0x2611fa(0x2bb)](({worker:_0x5ad7f2})=>({'pid':_0x5ad7f2[_0x2611fa(0x277)]['pid'],'id':_0x5ad7f2['id'],'dead':_0x5ad7f2[_0x2611fa(0x378)]()}))};},async 'close'(){const _0x2db997=_0x53d2c9;_0x2cae61=!![];for(const _0x46298f of _0x228f25['values']()){_0x46298f[_0x2db997(0x1a4)]=!![],_0x46298f[_0x2db997(0x2e9)]&&(clearTimeout(_0x46298f[_0x2db997(0x2e9)]),_0x46298f[_0x2db997(0x2e9)]=null);}clearInterval(_0x5229cf),_0x12f8f5[_0x2db997(0x30f)](_0x2db997(0x198),_0x5dad9a),_0x12f8f5[_0x2db997(0x30f)](_0x2db997(0x198),_0x2acb33),_0x110044?.[_0x2db997(0x325)]?.[_0x2db997(0x30f)]?.(_0x1e1ac2[_0x2db997(0x32f)],_0x342ee5);if(_0x110044?.[_0x2db997(0x325)]?.[_0x2db997(0x30f)])for(const {event:_0x489ff6,handler:_0x2a37e7}of _0xc3d875){try{_0x110044[_0x2db997(0x325)][_0x2db997(0x30f)](_0x489ff6,_0x2a37e7);}catch{}}_0xc3d875[_0x2db997(0x263)]=0x0;const _0x53d80b=[..._0x2c097b[_0x2db997(0x1ed)]()][_0x2db997(0x2bb)](({worker:_0x1d6c8b})=>_0x1d6c8b);if(_0x53d80b[_0x2db997(0x263)]===0x0)return;await Promise['all'](_0x53d80b[_0x2db997(0x2bb)](_0x455b78=>new Promise(_0xa08d7f=>{const _0xa1619=_0x2db997;if(_0x455b78[_0xa1619(0x378)]()){_0xa08d7f();return;}let _0x50b79d=![];const _0xa01371=()=>{if(_0x50b79d)return;_0x50b79d=!![];if(_0x4ae14c)clearTimeout(_0x4ae14c);_0xa08d7f();};_0x455b78['once'](_0xa1619(0x175),_0xa01371);const _0x4ae14c=setTimeout(()=>{const _0x50a9a5=_0xa1619;try{_0x455b78[_0x50a9a5(0x277)][_0x50a9a5(0x1db)]();}catch{}},_0x3784f1+0x1f4);_0x4ae14c[_0xa1619(0x369)]?.();try{_0x455b78[_0xa1619(0x220)]();}catch{try{_0x455b78[_0xa1619(0x277)][_0xa1619(0x1db)]();}catch{}}})));}};return _0x2d13c7;}async function _0x24b546({makeOkdb:_0x5bf477,port:_0x2e7e00}){const _0xfadbd4=_0x21dc80,_0x507c94=await _0x5bf477();return _0x2abdbf(_0x507c94),_0x507c94[_0xfadbd4(0x2d4)][_0xfadbd4(0x2a3)](_0x2e7e00);}function _0x2abdbf(_0x4ba770){const _0x3dc53d=_0x21dc80;if(!_0x4ba770||_0x4ba770[_0x3dc53d(0x2e0)])return;_0x4ba770[_0x3dc53d(0x2e0)]=!![];try{const {OKDBChangefeed:_0x5e7b99}=requireOkdbChangefeed(),_0x33d3b8=_0x4ba770[_0x3dc53d(0x16e)];if(_0x33d3b8&&typeof _0x33d3b8[_0x3dc53d(0x1d3)]==='function'){const _0x179ad5=new _0x5e7b99(_0x4ba770);_0x179ad5['start'](),_0x33d3b8['attachFeed'](_0x179ad5),_0x4ba770[_0x3dc53d(0x202)]=_0x179ad5;}}catch(_0x3b2783){_0x4ba770[_0x3dc53d(0x38f)]?.[_0x3dc53d(0x307)]?.(_0x3dc53d(0x1f2)+(_0x3b2783?.[_0x3dc53d(0x198)]??_0x3b2783),{'feature':_0x3dc53d(0x311)});}const _0x177821=_0xbe89b9=>{const _0x20cc9d=_0x3dc53d;if(!_0xbe89b9||typeof _0xbe89b9!==_0x20cc9d(0x34b)||_0xbe89b9[_0x4b8194]==null)return;if(_0xbe89b9[_0x4b8194]===_0x25b6c6)try{_0x4ba770[_0x20cc9d(0x16e)]?.[_0x20cc9d(0x232)]?.(_0xbe89b9[_0x20cc9d(0x337)],_0xbe89b9['data']);}catch{}};process['on'](_0x3dc53d(0x198),_0x177821),_0x4ba770['_clusterOnMessage']=_0x177821;{let _0x1a969a=process[_0x3dc53d(0x25d)](),_0x460a46=Date[_0x3dc53d(0x2d7)]();const _0x36ca5d=()=>{const _0x5527de=_0x3dc53d;if(typeof process[_0x5527de(0x2f9)]!==_0x5527de(0x296)||!process[_0x5527de(0x2e2)])return;const _0x383541=Date['now'](),_0x25e1b2=process[_0x5527de(0x25d)](),_0x1d1c7c=(_0x383541-_0x460a46)*0x3e8,_0x778197=_0x25e1b2[_0x5527de(0x2c7)]-_0x1a969a['user']+(_0x25e1b2[_0x5527de(0x1b3)]-_0x1a969a[_0x5527de(0x1b3)]),_0x19736c=_0x1d1c7c>0x0?Math[_0x5527de(0x2d8)](0x64,Math['round'](_0x778197/(_0x1d1c7c*(_0x4fad02[_0x5527de(0x34f)]()['length']||0x1))*0x64)):0x0;_0x1a969a=_0x25e1b2,_0x460a46=_0x383541;const _0x315bac=process[_0x5527de(0x213)]();let _0x512df8=null;try{_0x512df8=_0x4ba770[_0x5527de(0x2da)]?.[_0x5527de(0x18b)]?_0x4ba770['processes']?.[_0x5527de(0x242)]?.()??null:null;}catch{}try{process[_0x5527de(0x2f9)]({[_0x4b8194]:_0x1e6ea8,'stats':{'rss':_0x315bac[_0x5527de(0x318)],'heapUsed':_0x315bac['heapUsed'],'heapTotal':_0x315bac['heapTotal'],'external':_0x315bac[_0x5527de(0x20b)],'cpuPct':_0x19736c,'cpuWindowMs':Math[_0x5527de(0x35c)](_0x1d1c7c/0x3e8)||null},'processing':_0x512df8});}catch{}},_0x2960d5=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x2ddcba=setInterval(_0x36ca5d,_0x2960d5);_0x2ddcba[_0x3dc53d(0x369)]?.(),_0x36ca5d();for(const _0x5bef81 of[_0x3dc53d(0x1c5),_0x3dc53d(0x2b3)]){_0x4ba770[_0x3dc53d(0x325)]?.['on']?.(_0x5bef81,()=>{try{_0x36ca5d();}catch{}});}}let _0x18c5e0=![];const _0x18efd1=async _0xc14431=>{const _0x5b74f4=_0x3dc53d;if(_0x18c5e0)return;_0x18c5e0=!![];const _0x1cd369=setTimeout(()=>process['exit'](_0xc14431),_0x3784f1);_0x1cd369[_0x5b74f4(0x369)]?.();try{await _0x4ba770[_0x5b74f4(0x233)]?.();}catch{}process[_0x5b74f4(0x175)](_0xc14431);};process['on']('disconnect',()=>_0x18efd1(0x0));if(process['platform']!==_0x3dc53d(0x364)){const _0x3da3a0=setInterval(()=>{const _0x285c38=_0x3dc53d;if(process[_0x285c38(0x315)]===0x1)_0x18efd1(0x0);},_0x31dc40);_0x3da3a0[_0x3dc53d(0x369)]?.(),_0x4ba770[_0x3dc53d(0x370)]=_0x3da3a0;}}return okdbCluster={'runClustered':_0x15ba26,'attachWorkerCluster':_0x2abdbf},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x165dc1=_0x6505f9;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x441f3d=require$$0$5,{attachWorkerCluster:_0x1f2456}=requireOkdbCluster();async function _0x6d2a44(){const _0x329a57=_0x53b1,_0x9b78f0=process.env.OKDB_HTTP_CHILD;if(!_0x9b78f0)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0x3d2153,port:_0x5a647d,options:options={},logLevel:logLevel=_0x329a57(0x25f)}=JSON[_0x329a57(0x217)](_0x9b78f0);if(!_0x3d2153||!_0x5a647d)throw new Error(_0x329a57(0x17a));const _0x47b84c=new _0x441f3d(_0x3d2153,{...options,'engines':![],'processors':![],'compaction':![]});_0x47b84c[_0x329a57(0x38f)][_0x329a57(0x333)]?.();const _0x1231be=process.env.OKDB_CLUSTER_SLOT??'?',_0xa8d02e={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3b302c=_0xa8d02e[logLevel]??_0xa8d02e[_0x329a57(0x25f)];_0x47b84c[_0x329a57(0x38f)][_0x329a57(0x386)](_0x5aa2f7=>{const _0x2e60d3=_0x329a57;if((_0xa8d02e[_0x5aa2f7[_0x2e60d3(0x25b)]]??0x1)<_0x3b302c)return;try{process[_0x2e60d3(0x2f9)]?.({'__okdbCluster':_0x2e60d3(0x38f),'slot':_0x1231be,'pid':process['pid'],'entry':_0x5aa2f7});}catch{}}),await _0x47b84c[_0x329a57(0x391)](),_0x1f2456(_0x47b84c),await _0x47b84c['http']['listen'](_0x5a647d);}return _0x6d2a44()[_0x165dc1(0x16f)](_0x276fad=>{const _0x150951=_0x165dc1;try{process['send']?.({'__okdbCluster':_0x150951(0x38f),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x150951(0x322)],'entry':{'level':_0x150951(0x20f),'msg':_0x150951(0x387)+(_0x276fad?.[_0x150951(0x198)]??_0x276fad)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
1
+ 'use strict';const _0x22d7b4=_0x23ad;(function(_0x4a2553,_0x53ed29){const _0x5ec238=_0x23ad,_0x5f29fa=_0x4a2553();while(!![]){try{const _0x62a821=-parseInt(_0x5ec238(0x1f1))/0x1*(parseInt(_0x5ec238(0x28c))/0x2)+parseInt(_0x5ec238(0xd3))/0x3*(parseInt(_0x5ec238(0x2ab))/0x4)+parseInt(_0x5ec238(0x14d))/0x5*(parseInt(_0x5ec238(0x191))/0x6)+parseInt(_0x5ec238(0xf0))/0x7+parseInt(_0x5ec238(0x1b3))/0x8*(parseInt(_0x5ec238(0x283))/0x9)+parseInt(_0x5ec238(0x230))/0xa+-parseInt(_0x5ec238(0x202))/0xb;if(_0x62a821===_0x53ed29)break;else _0x5f29fa['push'](_0x5f29fa['shift']());}catch(_0x3deb00){_0x5f29fa['push'](_0x5f29fa['shift']());}}}(_0xd49b,0x85b59));var require$$0$5=require(_0x22d7b4(0x1c2)),require$$1$1=require(_0x22d7b4(0xf1)),require$$1=require(_0x22d7b4(0x2d0)),require$$0$3=require('os'),require$$2=require('crypto'),require$$0=require(_0x22d7b4(0xcb)),require$$0$2=require(_0x22d7b4(0x1c7)),require$$0$1=require('fs'),require$$0$4=require(_0x22d7b4(0x1ed));function getDefaultExportFromCjs(_0x44aed7){const _0x77c688=_0x22d7b4;return _0x44aed7&&_0x44aed7['__esModule']&&Object[_0x77c688(0x103)]['hasOwnProperty'][_0x77c688(0x115)](_0x44aed7,_0x77c688(0x2b0))?_0x44aed7[_0x77c688(0x2b0)]:_0x44aed7;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2d4452=_0x22d7b4;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x593b09={'PUT':'put','REMOVE':_0x2d4452(0x17d),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x2d4452(0x27c),'INDEX_RESET':_0x2d4452(0x159),'TYPE_REGISTER':_0x2d4452(0x29d),'TYPE_DROP':_0x2d4452(0x2d4),'FTS_REGISTER':_0x2d4452(0xee),'FTS_DROP':_0x2d4452(0x1b9),'FTS_RESET':_0x2d4452(0x112),'SCHEMA_SET':_0x2d4452(0x10e),'SCHEMA_DROP':_0x2d4452(0xcc),'TTL_SET':_0x2d4452(0x233),'TTL_CLEAR':_0x2d4452(0xd8)},_0x37dfcc={'SYSTEM_READY':_0x2d4452(0x130),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x2d4452(0x186),'SYSTEM_POKE':_0x2d4452(0x101),'SYSTEM_DRAIN':_0x2d4452(0x16b),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x2d4452(0x258),'ITEM_CREATE':_0x2d4452(0x15d),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':_0x2d4452(0x28d),'INDEX_READY':_0x2d4452(0x140),'INDEX_PROGRESS':_0x2d4452(0x14c),'VIEW_PROGRESS':_0x2d4452(0x21c),'INDEX_DROP':_0x2d4452(0x2db),'INDEX_REGISTERED':_0x2d4452(0x175),'FTS_REGISTERED':_0x2d4452(0xf6),'FTS_DROP':'fts:drop','FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x2d4452(0x10d),'UNIQUE_VIOLATION':_0x2d4452(0xe7),'UNIQUE_VIOLATION_RESOLVED':_0x2d4452(0x28e),'REF_VIOLATION':_0x2d4452(0x2a5),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x2d4452(0xfe),'TXN_START':_0x2d4452(0x177),'TXN_END':'txn:end','TXN_ROLLBACK':_0x2d4452(0x267),'TYPE_REGISTERED':_0x2d4452(0x1f7),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':_0x2d4452(0x155),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':'ttl:expired','TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x2d4452(0x20a),'LICENSE_ADDED':_0x2d4452(0x252),'LICENSE_ACTIVATED':_0x2d4452(0x263),'LICENSE_REMOVED':_0x2d4452(0x25b)},_0x458a2b={'CREATING':'creating','RESETTING':'resetting','READY':_0x2d4452(0x1c5),'DROPPING':_0x2d4452(0x270),'WAITING':_0x2d4452(0x28f)},_0x173534={'CREATED':_0x2d4452(0x20d),'STARTING':'starting','STARTED':_0x2d4452(0x25e),'STOPPING':'stopping','STOPPED':'stopped'},_0x40233b={'CREATING':'creating','READY':'ready','HALTED':'halted','STOPPED':_0x2d4452(0x1cf),'RESETTING':_0x2d4452(0xda)},_0x1cdb25=Object[_0x2d4452(0x1b4)]({'POKE':_0x2d4452(0x193),'DRAIN':_0x2d4452(0x19a),'TYPE_DROP':_0x2d4452(0x2d1),'PROC':_0x2d4452(0x19b),'ENV_RELEASE':_0x2d4452(0xe1)});return okdbEnums={'BUS_EVENTS':_0x1cdb25,'CHANGE_ACTIONS':_0x593b09,'EVENTS':_0x37dfcc,'INDEX_STATE':_0x458a2b,'OKDB_STATE':_0x173534,'VIEW_STATE':_0x40233b},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function _0xd49b(){const _0x4fab52=['resetFts','next','_heartbeatTimer','call','_timer','\x20pid=','isPrimary','ms\x20(attempt\x20','INDEX_PROGRESS','_closed','addSupervisedChild','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','_committed','emit','sync','_startedAt','_drain','FTS_REGISTERED','publishChildRow','lifecycle','put','migrations','_versionSkewWarned','_maybePublish','_publishNow','cli','workersConfigured','ms\x20activeWriters=','~processes:cmd','_admissionTimer','system:ready','maxMs','killable','INDEX_READY','processingStatusView','_handlePoke','cpuUsage','write','processorsView','events','http-server','instanceId','copy','okdb','_role','_heartbeatInFlight','index:ready','\x20worker(s)\x20still\x20serving','ITEM_UPDATE',')\x20exited\x20','bumpCmd','add','raw-put','reset','startedAt','_admissionStarted','consecutiveFailures','stats','index:progress','860InjNCy','meta','randomUUID','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','user','mkdirSync','registry\x20heartbeat\x20skipped\x20(writer=','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','env:removed','function','clear','http','resetIndex','extend','kill','_children','item:create','change','updateSupervisedChildStats','some','_envs','cluster-wide','isDead','cursorKey','startsWith','http\x20worker\x20child\x20failed:\x20','async','reduce','uptime','isWanted','system:drain','busy','_flushDebounce','rss','entry','standalone','_draining','_started','dumpedAt','slotKey','index:registered','note','txn:start','claims','dedupeMax','processorId','onWindow','_supervisorKey','remove','_ensureDesired','_threadStats','unclaimed','split','\x20times\x20in\x20','SYNC_COMMITS','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','release','system:clock_change','SYSTEM_STOPPED','map','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','kind','_lock','acquiredAt','cpus','find','\x20===','info','2232pUdULI','markClosed','bus:poke','once','_isReader','setDesired','ms\x20env=','_isStale','_processStartedAt','bus:drain','bus:proc','listen','stderr','\x20phase=','seq','_flushTimer','ms\x20busy=','_collectWriterFacet','_cursors','_lastCpuWindowMs','_lastCpuAt','_startHeartbeat','embedded','_migrateVocab','toISOString','_nodeDb','SYSTEM_POKE','_outstanding','_groupByProcess','~processes:desired','processor:progress','disable','disconnect','\x20statusEnv=','7871200NePliZ','freeze','listening','compaction','round','unref','dropFts','_activateProcesses','processing','_onStop','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','repeat','get','online','processor:error','./okdb','_inflight','processor:paused','ready','filter','perf_hooks','data','caps','_durs','_ownMeta','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','instances','warn','stopped','putNode','_enableChangelog','_desired','_dedupeKey','_singletonLocks','host','rows=','recordWrite','transactionSync','code','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_rawDb','send','values','heapTotal','transaction','slice','epoch','selfKey','_onItem','supervisorKey','ms\x20p99=','_nodeDbCache','inflightAgesMs','VIEW_PROGRESS','listNodes','flushDebounce','(code=','_startAdmission','node:events','reap','removeSync','_cmd','1bUAuRH','signalWant','_key','[okdb-cluster]\x20worker\x20pid=','CHANGEFEED_QUANTUM','_highWater','type:registered','inspect','size','includes','running','_drainOne','test','options','_pending','rowKey','processor:ready','11340681RrLoxe','register','ms/','clearThreadStats','none','_report','race','_seen','license:invalid','indexOf','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','created','processes','_sampleOwnStats','version','state','_markSeen','max','sandbox','list','keys','hostname','trim','listDesired','committed','decommissioning','view:progress','getClock','liveThreadStats','_listenAddr','_bpParkedTotal','shift','_hbTimer','stopHeartbeat','children','_removeRowAsync','_writer','listAll','_acquiredAt','_refreshDesiredSnapshot','_clusterOnMessage','processKey','system','functions','SWAP',':want','1720880VmxZpz','error','off','setTtl','inst:','replace','_onPoke','primary','string','external','_nodeDbFor','_wantDbHandle','mode','_baselines','startHeartbeat','reportThreadStats','fast','ms\x20max=','push','type','_clusterOrphanWatch','flushed','_coordinator','resolve','listenAddr','min','depth','_buildProcessingFacet','ms\x20mean=','getDesired','allSettled','ephemeral','_db','percentile','license:added','number','has','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','(worst\x20','abs','system:bus_state_change','floor','exit','license:removed','_onTick','node','started','_kind','isActive','process\x20','getCmd','license:activated','ppid','join','uncaughtException','txn:rollback','_collectSingletonClaims','oldestPendingMs','getRange','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','firstTs','setLogger','respawnTimer','load','dropping','single','detachConsole','length','_holderDead','prependListener','[okdb-cluster]\x20','raw-remove','building',');\x20','env','toFixed','registerIndex','createEnvironment','registry-publish','tierList','parkedNow','now','threads','9mkpQQB','\x20(durable\x20desired-state)','status','_windowCbs','resetReadTxn','view','ttlMs','commit','_systemEnv','271756sBjCGM','index:reset','unique:violation_resolved','waiting','_singletonLock','_sandbox','maxExtra','_done','pushEphemeral','memoryUsage','set','mean','stop','isEnabled','all','decommission','unhandledRejection','registerType','object','okdb-writer:\x20env\x20closing\x20—\x20retry','win32','then','\x20worker(s)\x20remaining','ITEM_REMOVE','hasDesired','ref:violation','holder','_lastCpuUsage','singletonClaims','hasType','name','4Bafnof','level','fanout','open','[okdb-cluster]\x20respawning\x20worker\x20slot=','default','_quantum','_clusterWorkerAttached','enable','\x20parkedNow=','_nodeDead','\x20\x20#','start','role','_onProcEvent','ORPHAN\x20(env-closed\x20write)','treeView','writerStatus','_openEnvLazy','beforeWrite','_lastPublishAt','loop-lag','event','cluster:','_dedupeMax','fromEntries','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','ENV_CLOSING_RETRY','log','loop-lag\x20','claimGated','openDB','\x20died\x20','_buildChildRow','catch','stack','tryAcquire','path','bus:type_drop','_changefeed','process','dropType','_buildOwnRow','setupPrimary','splice','_isWriter','_scheduleFlush','_enqueuedAt','index:drop','label','\x20forked\x20','pid','enabled','heartbeatMs','count','expiresAt','setOwnMeta','_servingEngines','entries','removeNode','flushLmdb','\x20sync','\x20@\x20','ingest','sort','isConnected','nodeKey','noteListenAddr','attach','ITEM_CREATE','_lockDb','offWindow','INDEX_RESET','\x20ipc\x20error:\x20','\x20HTTP\x20server(s)\x20on\x20port\x20','draining','processor:resumed','connected','SYSTEM_PROC','2.1.0','from','queue-worker','_wantDb','node:perf_hooks','dropSchema','INDEX_REGISTERED','_putRowSync','_rowKey','_handleInProcess','_selfKey','updatedAt','450339FYtHSY','heapUsed','_desiredOverlay','deaths','_adminRelay','clearTtl','\x20worker\x20slot=','resetting','\x20(slot=','_released','\x20writer{depth=','error:\x20','_bpWaiters','afterWrite','bus:env_release','putSync','attachFeed','parse','REMOVE','procmodeack/','unique:violation','\x20\x20env=','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','ms\x20on\x20env=','ESRCH','hard-killed','processors','registerFts','slot','2411059QJygxf','cluster','~lock','_statusEnv','~processes','\x0a===\x20OKDB_DIAG\x20','fts:registered','namespace','engines','message','worker','exports','envsOpen','_rootDb','sync:apply','__vocab/version','platform','system:poke','delete','prototype','\x20│\x20','dead','_log','_lastCpuPct','_buckets','--test','--print','commitsPerSec','value','schema:drop','setSchema','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_publishFailWarned','\x20oldestPendingMs='];_0xd49b=function(){return _0x4fab52;};return _0xd49b();}function requireOkdbLoopMonitor(){const _0x2931ab=_0x22d7b4;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x361d87,performance:_0x2077cc}=require$$0,_0x38140b=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0xf3582c=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x512947=process.env.OKDB_LOOP_LAG_ALL==='1',_0x903509=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x5d06b5{constructor(){const _0x1a6ce9=_0x23ad;this[_0x1a6ce9(0x2df)]=_0x38140b,this[_0x1a6ce9(0x108)]=new Map(),this['_h']=null,this[_0x1a6ce9(0x116)]=null,this[_0x1a6ce9(0x172)]=![],this[_0x1a6ce9(0x106)]=(_0x19abd5,_0x15ccbc)=>process[_0x1a6ce9(0x19d)][_0x1a6ce9(0x137)](_0x19abd5+(_0x15ccbc?'\x20'+JSON['stringify'](_0x15ccbc):'')+'\x0a');}[_0x2931ab(0x281)](){const _0x211367=_0x2931ab;return _0x2077cc[_0x211367(0x281)]();}[_0x2931ab(0x26d)](_0x356f5d){const _0x566022=_0x2931ab;if(typeof _0x356f5d===_0x566022(0x156))this[_0x566022(0x106)]=_0x356f5d;}[_0x2931ab(0x176)](_0x3a8c4f,_0x1b3c06,_0x1908b8){const _0x2ce2a0=_0x2931ab;if(!this[_0x2ce2a0(0x2df)])return;let _0x592113=this[_0x2ce2a0(0x108)]['get'](_0x3a8c4f);!_0x592113&&(_0x592113={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x2ce2a0(0x108)][_0x2ce2a0(0x296)](_0x3a8c4f,_0x592113)),_0x592113['ms']+=_0x1b3c06,_0x592113[_0x2ce2a0(0x2e1)]+=0x1,_0x1b3c06>_0x592113[_0x2ce2a0(0x131)]&&(_0x592113['maxMs']=_0x1b3c06,_0x592113[_0x2ce2a0(0x292)]=_0x1908b8||'');}['start'](_0x36bf63){const _0x5a9f47=_0x2931ab;if(!this[_0x5a9f47(0x2df)]||this[_0x5a9f47(0x172)])return;this[_0x5a9f47(0x172)]=!![];if(_0x36bf63)this[_0x5a9f47(0x106)]=_0x36bf63;this['_h']=_0x361d87({'resolution':0xa}),this['_h'][_0x5a9f47(0x2b3)](),this['_timer']=setInterval(()=>this[_0x5a9f47(0x207)](),_0xf3582c);if(this['_timer'][_0x5a9f47(0x1b8)])this['_timer'][_0x5a9f47(0x1b8)]();}[_0x2931ab(0x17b)](_0x5a859d){const _0x1653c2=_0x2931ab;if(!this['_windowCbs'])this[_0x1653c2(0x286)]=new Set();this['_windowCbs'][_0x1653c2(0x145)](_0x5a859d);if(!this[_0x1653c2(0x172)])this[_0x1653c2(0x1ec)]();}[_0x2931ab(0x2f2)](_0x49c1e6){this['_windowCbs']?.['delete'](_0x49c1e6);}[_0x2931ab(0x1ec)](){const _0x59e2ab=_0x2931ab;if(this[_0x59e2ab(0x149)])return;this[_0x59e2ab(0x149)]=!![];!this['_h']&&(this['_h']=_0x361d87({'resolution':0xa}),this['_h'][_0x59e2ab(0x2b3)]());const _0x522ff3=_0xf3582c;this['_admissionTimer']=setInterval(()=>{const _0x16d369=_0x59e2ab,_0x54fa2e=this['_h'];if(!_0x54fa2e)return;const _0x5ce422=_0x54fa2e[_0x16d369(0x251)](0x63)/0xf4240,_0x524424=_0x54fa2e[_0x16d369(0x213)]/0xf4240,_0x579b87=_0x54fa2e[_0x16d369(0x297)]/0xf4240;_0x54fa2e['reset']();if(this[_0x16d369(0x286)])for(const _0x5de96d of this[_0x16d369(0x286)]){try{_0x5de96d({'p99Ms':_0x5ce422,'maxMs':_0x524424,'meanMs':_0x579b87,'reportMs':_0x522ff3});}catch{}}},_0x522ff3);if(this['_admissionTimer']['unref'])this[_0x59e2ab(0x12f)]['unref']();}[_0x2931ab(0x207)](){const _0x3fb4d6=_0x2931ab,_0x105619=this['_h'],_0x29db70=_0x105619['max']/0xf4240,_0xab13a0=_0x105619[_0x3fb4d6(0x251)](0x63)/0xf4240,_0x26500f=_0x105619[_0x3fb4d6(0x297)]/0xf4240;_0x105619[_0x3fb4d6(0x147)]();const _0x5eb30e=[...this[_0x3fb4d6(0x108)][_0x3fb4d6(0x2e5)]()]['map'](([_0x5c8045,_0x1b6bbd])=>({'label':_0x5c8045,..._0x1b6bbd}))[_0x3fb4d6(0x2eb)]((_0x510f4b,_0x497e1c)=>_0x497e1c['ms']-_0x510f4b['ms'])['slice'](0x0,0x8);this[_0x3fb4d6(0x108)][_0x3fb4d6(0x157)]();const _0x1e4e0d=_0x5eb30e[_0x3fb4d6(0x168)]((_0x5538a2,_0x404837)=>_0x5538a2+_0x404837['ms'],0x0),_0x4cd05f=_0x5eb30e[_0x3fb4d6(0x188)](_0x36d748=>_0x36d748[_0x3fb4d6(0x2dc)]+'='+_0x36d748['ms']['toFixed'](0x0)+_0x3fb4d6(0x204)+_0x36d748[_0x3fb4d6(0x2e1)]+(_0x36d748[_0x3fb4d6(0x131)]>0x5?_0x3fb4d6(0x256)+_0x36d748[_0x3fb4d6(0x131)][_0x3fb4d6(0x27b)](0x0)+'ms'+(_0x36d748[_0x3fb4d6(0x292)]?'\x20'+_0x36d748[_0x3fb4d6(0x292)]:'')+')':''));(_0x512947||_0x29db70>=_0x903509)&&this[_0x3fb4d6(0x106)](_0x3fb4d6(0x2c8)+_0xf3582c+_0x3fb4d6(0x241)+_0x29db70[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x1e5)+_0xab13a0[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x24c)+_0x26500f[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x1a1)+_0x1e4e0d['toFixed'](0x0)+'ms'+(_0x4cd05f['length']?_0x3fb4d6(0x104)+_0x4cd05f[_0x3fb4d6(0x265)]('\x20\x20'):''),{'feature':_0x3fb4d6(0x2c0)});if(this['_windowCbs'])for(const _0xe0d7c0 of this['_windowCbs']){try{_0xe0d7c0({'p99Ms':_0xab13a0,'maxMs':_0x29db70,'meanMs':_0x26500f,'reportMs':_0xf3582c});}catch{}}}[_0x2931ab(0x298)](){const _0x1e3000=_0x2931ab;if(this[_0x1e3000(0x116)])clearInterval(this[_0x1e3000(0x116)]);if(this['_h'])this['_h'][_0x1e3000(0x1b0)]();this[_0x1e3000(0x116)]=null,this['_h']=null,this[_0x1e3000(0x172)]=![];}}const _0xf56b53=new _0x5d06b5();if(_0xf56b53[_0x2931ab(0x2df)])_0xf56b53[_0x2931ab(0x2b7)]();return okdbLoopMonitor={'LOOP':_0xf56b53},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x45cf1a=require$$0$1,_0x646d19=require$$1;let _0x2aaa2d,_0xf0d1bd,_0x512264,_0x4dfa34,_0xcd6621,_0x8fbdf2,_0xd03a81,_0x3a19da=![];const _0x3578a2=new Set();let _0x2acfc2=null;const _0x513d7c=new Map();function _0xbd344b(){const _0x17215f=_0x23ad;if(_0x2aaa2d!==undefined)return _0x2aaa2d;_0x2aaa2d=process.env.OKDB_DIAG==='1';if(!_0x2aaa2d)return![];_0xf0d1bd=process.env.OKDB_DIAG_STACK==='1',_0x4dfa34=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x512264=new Array(_0x4dfa34),_0xcd6621=0x0,_0x8fbdf2=0x0,_0xd03a81=process.env.OKDB_DIAG_DIR||null;if(_0xd03a81)try{_0x45cf1a[_0x17215f(0x152)](_0xd03a81,{'recursive':!![]});}catch{}return!![];}function _0x450031(){return _0x2aaa2d===undefined?_0xbd344b():_0x2aaa2d;}function _0x4eba4a(_0x56066a,_0xa0b8e8){const _0x20768b=_0x23ad;if(_0x2aaa2d===undefined?!_0xbd344b():!_0x2aaa2d)return;let _0x48d353;if(_0xf0d1bd){const _0x5ec2be=new Error()['stack']||'';_0x48d353=_0x5ec2be[_0x20768b(0x181)]('\x0a')[_0x20768b(0x1e0)](0x3)['map'](_0x56bc48=>_0x56bc48[_0x20768b(0x218)]())[_0x20768b(0x1c6)](Boolean)[_0x20768b(0x1e0)](0x0,0x8);}_0x512264[_0xcd6621]={'seq':_0x8fbdf2++,'t':Date[_0x20768b(0x281)](),'env':_0x56066a,'kind':_0xa0b8e8||_0x20768b(0x28a),'stack':_0x48d353},_0xcd6621=(_0xcd6621+0x1)%_0x4dfa34;}function _0x57c9bf(_0x1add2f){const _0x304777=_0x23ad,_0xd222de=[];for(let _0xec3719=0x0;_0xec3719<_0x4dfa34;_0xec3719++){const _0x414d43=_0x512264[(_0xcd6621-0x1-_0xec3719+_0x4dfa34*0x2)%_0x4dfa34];if(!_0x414d43)continue;_0xd222de[_0x304777(0x242)](_0x414d43);if(_0xd222de[_0x304777(0x273)]>=_0x1add2f)break;}return _0xd222de;}function _0x480794(_0x373343){const _0x157306=_0x23ad;try{process[_0x157306(0x19d)][_0x157306(0x137)](_0x373343+'\x0a');}catch{}if(_0xd03a81)try{_0x45cf1a['appendFileSync'](_0x646d19['join'](_0xd03a81,'okdb-diag.'+process['pid']+'.log'),_0x373343+'\x0a');}catch{}}function _0x3839e1(_0x2c87f1){const _0x3bbca6=_0x23ad,_0x4658b8=_0x57c9bf(_0x2c87f1);if(!_0x4658b8[_0x3bbca6(0x273)])return _0x3bbca6(0x26b);const _0x3f67d0=Date[_0x3bbca6(0x281)]();return _0x4658b8[_0x3bbca6(0x188)](_0x3bc0ce=>{const _0x209dfc=_0x3bbca6,_0x44161c=_0x209dfc(0x2b6)+_0x3bc0ce[_0x209dfc(0x19f)]+'\x20-'+(_0x3f67d0-_0x3bc0ce['t'])+_0x209dfc(0x197)+_0x3bc0ce[_0x209dfc(0x27a)]+'\x20'+_0x3bc0ce[_0x209dfc(0x18a)];return _0x3bc0ce[_0x209dfc(0x2ce)]&&_0x3bc0ce[_0x209dfc(0x2ce)]['length']?_0x44161c+'\x0a\x20\x20\x20\x20\x20\x20'+_0x3bc0ce[_0x209dfc(0x2ce)][_0x209dfc(0x265)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x44161c;})[_0x3bbca6(0x265)]('\x0a');}function _0x5bc995(_0x26391f,_0x43c436){const _0x1cde3e=_0x23ad,_0x330416=_0x1cde3e(0xf5)+_0x26391f+_0x1cde3e(0x2e9)+new Date()[_0x1cde3e(0x1a9)]()+_0x1cde3e(0x117)+process[_0x1cde3e(0x2de)]+_0x1cde3e(0x18f),_0x5daf05=[_0x330416,_0x1cde3e(0xde)+(_0x43c436&&_0x43c436['stack']?_0x43c436[_0x1cde3e(0x2ce)][_0x1cde3e(0x181)]('\x0a')[0x0]:_0x43c436),'recent\x20writes\x20(newest\x20first)'+(_0xf0d1bd?'':_0x1cde3e(0x154))+':',_0x3839e1(0x18),_0x25db0b(),'='[_0x1cde3e(0x1be)](_0x330416[_0x1cde3e(0x273)]-0x1)];_0x480794(_0x5daf05['join']('\x0a'));}function _0x6c56ec(_0x502feb){const _0x2f9db7=_0x23ad;if(!_0x450031())return;const _0x2796c9=String(_0x502feb&&_0x502feb[_0x2f9db7(0xf9)]||_0x502feb||''),_0x584ea9=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x2f9db7(0x1fd)](_0x2796c9);_0x5bc995(_0x584ea9?_0x2f9db7(0x2ba):_0x2f9db7(0x266),_0x502feb);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x584ea9)return;try{console[_0x2f9db7(0x231)](_0x502feb&&_0x502feb[_0x2f9db7(0x2ce)]?_0x502feb[_0x2f9db7(0x2ce)]:_0x502feb);}catch{}process['exit'](0x1);}function _0x48eff7(_0x110bd4){const _0x41f3ec=_0x23ad;if(!_0x450031())return;const _0xdaae40=String(_0x110bd4&&_0x110bd4['message']||_0x110bd4||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0xdaae40)&&_0x5bc995(_0x41f3ec(0x189),_0x110bd4);}function _0x25db0b(){const _0x1c15e3=_0x23ad,_0x1848d0=[_0x1c15e3(0x10f)];let _0x80a65f=![];for(const _0x3ce420 of _0x3578a2){const _0x1ee3fe=_0x3ce420&&_0x3ce420['_envs'];if(!_0x1ee3fe)continue;for(const [_0x529ff8,_0x533716]of _0x1ee3fe){const _0xe99e30=_0x533716&&_0x533716[_0x1c15e3(0x246)]&&_0x533716[_0x1c15e3(0x246)]['view'];if(!_0xe99e30)continue;let _0x599e3c,_0x2f2509;try{_0x599e3c=Atomics[_0x1c15e3(0x26f)](_0xe99e30,0x0),_0x2f2509=Atomics[_0x1c15e3(0x26f)](_0xe99e30,0x1);}catch{continue;}if(_0x599e3c===0x0)continue;_0x80a65f=!![];const _0x2364b3=_0x599e3c>0x0?_0x1c15e3(0x22e):_0x1c15e3(0x13c),_0x3af1d9=Date[_0x1c15e3(0x281)]()-Math[_0x1c15e3(0x257)](_0x599e3c)*0x3e8,_0x1eb5a9=((()=>{const _0x30637f=_0x1c15e3;try{return _0x533716[_0x30637f(0x226)]&&_0x533716[_0x30637f(0x226)][_0x30637f(0x285)]?_0x533716['_writer'][_0x30637f(0x285)]():null;}catch{return null;}})());_0x1848d0['push'](_0x1c15e3(0xe8)+_0x529ff8+_0x1c15e3(0x19e)+_0x2364b3+'\x20drainAge='+_0x3af1d9+_0x1c15e3(0x12d)+_0x2f2509+(_0x1eb5a9?_0x1c15e3(0xdd)+_0x1eb5a9[_0x1c15e3(0x24a)]+_0x1c15e3(0x111)+_0x1eb5a9[_0x1c15e3(0x269)]+_0x1c15e3(0x2b4)+_0x1eb5a9[_0x1c15e3(0x280)]+'}':''));}}if(!_0x80a65f)_0x1848d0[_0x1c15e3(0x242)]('\x20\x20(no\x20env\x20draining)');return _0x1848d0[_0x1c15e3(0x265)]('\x0a');}function _0x5ea369(){const _0x3c3c02=_0x23ad;if(!_0x450031())return;const _0x2cd034=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x59154c=Date[_0x3c3c02(0x281)]();for(const _0x4e2db8 of _0x3578a2){const _0x1cc5d6=_0x4e2db8&&_0x4e2db8[_0x3c3c02(0x161)];if(!_0x1cc5d6)continue;for(const [_0x120305,_0x3d8d2b]of _0x1cc5d6){const _0x50d19d=_0x3d8d2b&&_0x3d8d2b[_0x3c3c02(0x246)]&&_0x3d8d2b[_0x3c3c02(0x246)][_0x3c3c02(0x288)];if(!_0x50d19d)continue;let _0x48f654;try{_0x48f654=Atomics[_0x3c3c02(0x26f)](_0x50d19d,0x0);}catch{continue;}const _0x33fb37=_0x4e2db8[_0x3c3c02(0x2d0)]+'|'+_0x120305;if(_0x48f654<=0x0){_0x513d7c[_0x3c3c02(0x102)](_0x33fb37);continue;}const _0x1ccbb0=_0x59154c-_0x48f654*0x3e8,_0x1817a2=_0x513d7c[_0x3c3c02(0x1bf)](_0x33fb37);if(_0x1ccbb0<_0x2cd034)continue;if(_0x1817a2&&_0x59154c-_0x1817a2[_0x3c3c02(0x173)]<_0x2cd034)continue;_0x513d7c[_0x3c3c02(0x296)](_0x33fb37,{'firstTs':_0x1817a2?_0x1817a2[_0x3c3c02(0x26c)]:_0x48f654,'dumpedAt':_0x59154c});const _0x1153ea=_0x3c3c02(0x1da)+_0x1ccbb0+_0x3c3c02(0xea)+_0x120305+_0x3c3c02(0x2e9)+new Date()[_0x3c3c02(0x1a9)]()+_0x3c3c02(0x117)+process[_0x3c3c02(0x2de)]+_0x3c3c02(0x18f);_0x480794([_0x1153ea,_0x25db0b(),'='[_0x3c3c02(0x1be)](_0x1153ea[_0x3c3c02(0x273)]-0x1)][_0x3c3c02(0x265)]('\x0a'));}}}function _0x9283b2(){const _0x60606f=_0x23ad;if(!_0x450031()||_0x3a19da)return;_0x3a19da=!![],process[_0x60606f(0x275)](_0x60606f(0x266),_0x6c56ec),process[_0x60606f(0x275)](_0x60606f(0x29c),_0x48eff7);const _0x204875=Math[_0x60606f(0x213)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x2acfc2=setInterval(_0x5ea369,_0x204875);if(_0x2acfc2[_0x60606f(0x1b8)])_0x2acfc2[_0x60606f(0x1b8)]();}function _0xe41b32(_0x510ed2){if(!_0x450031()||!_0x510ed2)return;_0x3578a2['add'](_0x510ed2),_0x9283b2();}function _0x50c9ff(_0x40c067){const _0x248d70=_0x23ad;_0x3578a2[_0x248d70(0x102)](_0x40c067);}function _0x1ad34e(){const _0x4508ed=_0x23ad;if(!_0x450031())return{'enabled':![],'hint':_0x4508ed(0x150)};return{'enabled':!![],'stackCapture':!!_0xf0d1bd,'recentWrites':_0x57c9bf(0x10),'drain':_0x25db0b()};}return okdbDiag={'isEnabled':_0x450031,'recordWrite':_0x4eba4a,'installDiag':_0x9283b2,'registerOkdb':_0xe41b32,'unregisterOkdb':_0x50c9ff,'snapshot':_0x1ad34e},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x5297ff=_0x22d7b4;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x5186b6}=require$$0$2,_0x34f69c=requireOkdbDiag(),_0x191309=process.env.OKDB_COMMIT_MODE===_0x5297ff(0x120);class _0x1d28fa{constructor(_0x414e53){const _0x5663ad=_0x5297ff;this[_0x5663ad(0x27a)]=_0x414e53,this[_0x5663ad(0x1c3)]=new Set(),this[_0x5663ad(0x2da)]=new Map(),this[_0x5663ad(0x11e)]=0x0,this[_0x5663ad(0x1ca)]=[],this['_done']=[],this[_0x5663ad(0x1f6)]=Math[_0x5663ad(0x213)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x5663ad(0x1ac)]=0x0,this[_0x5663ad(0xdf)]=[],this[_0x5663ad(0x220)]=0x0;}async[_0x5297ff(0x1df)](_0x5b0f08,_0xc0820f){const _0x16c168=_0x5297ff;if(_0x34f69c[_0x16c168(0x299)]())_0x34f69c[_0x16c168(0x1d7)](this[_0x16c168(0x27a)]?.[_0x16c168(0x2aa)],_0xc0820f);if(this[_0x16c168(0x11b)]){const _0x18a250=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x18a250['code']=_0x16c168(0x2c6);throw _0x18a250;}if(this[_0x16c168(0x1f6)]>0x0){let _0x324669=![];while(this[_0x16c168(0x1ac)]>=this['_highWater']&&!this['_closed']){!_0x324669&&(_0x324669=!![],this[_0x16c168(0x220)]++),await new Promise(_0x23c88b=>this[_0x16c168(0xdf)]['push'](_0x23c88b));}if(this[_0x16c168(0x11b)]){const _0x4de2db=new Error(_0x16c168(0x29f));_0x4de2db[_0x16c168(0x1d9)]=_0x16c168(0x2c6);throw _0x4de2db;}}this['_outstanding']++;const _0x257ac5=this[_0x16c168(0x27a)]['_coordinator'];if(_0x257ac5)await _0x257ac5[_0x16c168(0x2be)]();if(this[_0x16c168(0x11b)]){if(_0x257ac5)_0x257ac5[_0x16c168(0xe0)]();this[_0x16c168(0x1ac)]--;if(this[_0x16c168(0xdf)][_0x16c168(0x273)]&&this[_0x16c168(0x1ac)]<this[_0x16c168(0x1f6)])this[_0x16c168(0xdf)]['shift']()();const _0x2c8967=new Error(_0x16c168(0x29f));_0x2c8967['code']=_0x16c168(0x2c6);throw _0x2c8967;}const _0x3a5696=_0x5186b6[_0x16c168(0x281)]();if(_0x191309)try{const _0x36939d=this['env']['db'][_0x16c168(0x1d8)](_0x5b0f08);this[_0x16c168(0x11e)]++;if(this[_0x16c168(0x1ca)][_0x16c168(0x242)](_0x5186b6['now']()-_0x3a5696)>0x100)this[_0x16c168(0x1ca)][_0x16c168(0x221)]();if(this[_0x16c168(0x293)][_0x16c168(0x242)](_0x5186b6['now']())>0x800)this[_0x16c168(0x293)][_0x16c168(0x221)]();return _0x36939d;}finally{this[_0x16c168(0x1ac)]--;if(this['_bpWaiters']['length']&&this[_0x16c168(0x1ac)]<this[_0x16c168(0x1f6)])this[_0x16c168(0xdf)][_0x16c168(0x221)]()();if(_0x257ac5)_0x257ac5[_0x16c168(0xe0)]();}const _0x1bc5aa=this[_0x16c168(0x27a)]['db']['childTransaction'](_0x5b0f08);this[_0x16c168(0x1c3)]['add'](_0x1bc5aa),this['_enqueuedAt'][_0x16c168(0x296)](_0x1bc5aa,_0x3a5696);const _0x498f6b=()=>{const _0x1f10ba=_0x16c168;this[_0x1f10ba(0x1c3)]['delete'](_0x1bc5aa),this[_0x1f10ba(0x2da)]['delete'](_0x1bc5aa),this[_0x1f10ba(0x11e)]++,this[_0x1f10ba(0x1ac)]--;this['_bpWaiters'][_0x1f10ba(0x273)]&&this[_0x1f10ba(0x1ac)]<this[_0x1f10ba(0x1f6)]&&this[_0x1f10ba(0xdf)]['shift']()();if(this['_durs'][_0x1f10ba(0x242)](_0x5186b6['now']()-_0x3a5696)>0x100)this[_0x1f10ba(0x1ca)]['shift']();if(this[_0x1f10ba(0x293)][_0x1f10ba(0x242)](_0x5186b6[_0x1f10ba(0x281)]())>0x800)this[_0x1f10ba(0x293)][_0x1f10ba(0x221)]();};_0x1bc5aa['then'](_0x498f6b,_0x498f6b);try{return await _0x1bc5aa;}finally{if(_0x257ac5)_0x257ac5['afterWrite']();}}[_0x5297ff(0x285)](){const _0x3412ea=_0x5297ff,_0x4fcdcc=_0x5186b6[_0x3412ea(0x281)]();let _0x23da00=0x0;for(const _0x10f6d4 of this[_0x3412ea(0x2da)][_0x3412ea(0x1dd)]()){const _0x55a789=_0x4fcdcc-_0x10f6d4;if(_0x55a789>_0x23da00)_0x23da00=_0x55a789;}let _0x4365b2=0x0;for(let _0x26636f=this[_0x3412ea(0x293)][_0x3412ea(0x273)]-0x1;_0x26636f>=0x0;_0x26636f--){if(_0x4fcdcc-this[_0x3412ea(0x293)][_0x26636f]>0x3e8)break;_0x4365b2++;}let _0x5de5b2=0x0;if(this[_0x3412ea(0x1ca)]['length']){const _0x37940b=[...this[_0x3412ea(0x1ca)]][_0x3412ea(0x2eb)]((_0x8acf3,_0x4c8515)=>_0x8acf3-_0x4c8515);_0x5de5b2=_0x37940b[Math['min'](_0x37940b[_0x3412ea(0x273)]-0x1,Math[_0x3412ea(0x259)](_0x37940b[_0x3412ea(0x273)]*0.99))];}return{'depth':this[_0x3412ea(0x1c3)][_0x3412ea(0x1f9)],'oldestPendingMs':Math['round'](_0x23da00),'committed':this[_0x3412ea(0x11e)],'commitsPerSec':_0x4365b2,'commitP99Ms':Math[_0x3412ea(0x1b7)](_0x5de5b2),'parkedNow':this[_0x3412ea(0xdf)][_0x3412ea(0x273)],'parkedTotal':this[_0x3412ea(0x220)],'highWater':this[_0x3412ea(0x1f6)]};}[_0x5297ff(0x1e7)](){const _0x4a6450=_0x5297ff,_0x48e9b8=_0x5186b6['now']();return[...this[_0x4a6450(0x2da)]['values']()]['map'](_0x117b77=>Math['round'](_0x48e9b8-_0x117b77))['sort']((_0x1af56c,_0x4ccc18)=>_0x4ccc18-_0x1af56c);}[_0x5297ff(0x192)](){const _0x2cc576=_0x5297ff;this[_0x2cc576(0x11b)]=!![];for(const _0x2328a6 of this[_0x2cc576(0xdf)][_0x2cc576(0x2d7)](0x0))_0x2328a6();}async['drain'](){const _0x55c0e2=_0x5297ff;let _0x1128e0=0x0;while(this['_inflight'][_0x55c0e2(0x1f9)]&&_0x1128e0++<0x3e8){await Promise['allSettled']([...this['_inflight']]);}}async[_0x5297ff(0x126)](_0x178a8f,_0x157c08,_0x38215c,_0x5a92d4){const _0x1deb9a=_0x5297ff;return this[_0x1deb9a(0x1df)](()=>{const _0x26297b=_0x1deb9a;if(_0x5a92d4===undefined)_0x178a8f[_0x26297b(0xe2)](_0x157c08,_0x38215c);else _0x178a8f[_0x26297b(0xe2)](_0x157c08,_0x38215c,_0x5a92d4);},_0x1deb9a(0x146));}async[_0x5297ff(0x17d)](_0x4cf5fe,_0x571efc){const _0x39b9a1=_0x5297ff;return this[_0x39b9a1(0x1df)](()=>_0x4cf5fe[_0x39b9a1(0x1ef)](_0x571efc),_0x39b9a1(0x277));}}async function _0xd0e818(_0x8bec01,_0x4a60b5){const _0x3ee11b=_0x5297ff;if(_0x4a60b5==null)_0x4a60b5=Math[_0x3ee11b(0x213)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x519a48=_0x8bec01?.[_0x3ee11b(0x245)];if(!_0x519a48||typeof _0x519a48[_0x3ee11b(0x2a1)]!==_0x3ee11b(0x156))return;await Promise[_0x3ee11b(0x208)]([Promise[_0x3ee11b(0x247)](_0x519a48)[_0x3ee11b(0x2cd)](()=>{}),new Promise(_0x5f1c3c=>{const _0x26c60c=_0x3ee11b,_0x37ab55=setTimeout(_0x5f1c3c,_0x4a60b5);if(_0x37ab55[_0x26c60c(0x1b8)])_0x37ab55[_0x26c60c(0x1b8)]();})]);}catch{}}function _0x38cf86(_0x5b8ec6){const _0x16c700=_0x5297ff;if(_0x191309)return Promise['resolve']();const _0x229dbe=_0x5b8ec6?.[_0x16c700(0x21a)];return _0x229dbe&&typeof _0x229dbe[_0x16c700(0x2a1)]==='function'?_0x229dbe:Promise[_0x16c700(0x247)]();}return okdbWriter[_0x5297ff(0xfb)]=_0x1d28fa,okdbWriter[_0x5297ff(0xfb)][_0x5297ff(0x2e7)]=_0xd0e818,okdbWriter['exports'][_0x5297ff(0x21a)]=_0x38cf86,okdbWriter[_0x5297ff(0xfb)][_0x5297ff(0x183)]=_0x191309,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x2f564a=_0x22d7b4;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x39dcdf=require$$0$3,{SYNC_COMMITS:_0x519f42}=requireOkdbWriter(),_0x3d6189=_0x2f564a(0xf2);class _0x4d80e0{constructor(_0x3b32ce,_0xaec81f,_0x2d5180){const _0x3ec9e5=_0x2f564a;this['_lock']=_0x3b32ce,this[_0x3ec9e5(0x1f3)]=_0xaec81f,this[_0x3ec9e5(0x228)]=_0x2d5180,this['_released']=![],this['_heartbeatTimer']=null,this[_0x3ec9e5(0x13f)]=null;}['isHeld'](){const _0x49762e=_0x2f564a;if(this[_0x49762e(0xdc)])return![];try{const _0x30b2e9=this[_0x49762e(0x18b)][_0x49762e(0x250)]()[_0x49762e(0x1bf)](this[_0x49762e(0x1f3)]);if(!_0x30b2e9||_0x30b2e9['acquiredAt']!==this[_0x49762e(0x228)])return![];const _0x35fd6c=_0x30b2e9[_0x49762e(0xd2)]??_0x30b2e9[_0x49762e(0x18c)];if(_0x35fd6c+_0x30b2e9[_0x49762e(0x289)]<Date[_0x49762e(0x281)]())return![];return!![];}catch{return!this[_0x49762e(0xdc)];}}[_0x2f564a(0x2a6)](){const _0x2cf02a=_0x2f564a;if(this[_0x2cf02a(0xdc)])return null;try{return this[_0x2cf02a(0x18b)][_0x2cf02a(0x250)]()['get'](this[_0x2cf02a(0x1f3)])??null;}catch{return null;}}async[_0x2f564a(0x15a)](_0x265a57){const _0x4bb390=_0x2f564a;if(this[_0x4bb390(0xdc)])return;try{const _0x35356b=this[_0x4bb390(0x18b)][_0x4bb390(0x250)]()[_0x4bb390(0x1bf)](this[_0x4bb390(0x1f3)]);if(!_0x35356b||_0x35356b['acquiredAt']!==this['_acquiredAt'])return;if(_0x519f42)this['_lock'][_0x4bb390(0x250)]()[_0x4bb390(0xe2)](this[_0x4bb390(0x1f3)],{..._0x35356b,'ttlMs':_0x35356b[_0x4bb390(0x289)]+_0x265a57});else await this['_lock'][_0x4bb390(0x250)]()[_0x4bb390(0x126)](this[_0x4bb390(0x1f3)],{..._0x35356b,'ttlMs':_0x35356b['ttlMs']+_0x265a57});}catch{}}async[_0x2f564a(0x185)](){const _0x1c63ee=_0x2f564a;if(this['_released'])return;if(this[_0x1c63ee(0x13f)])try{await this[_0x1c63ee(0x13f)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0x1c63ee(0x114)]=null,this[_0x1c63ee(0xdc)]=!![];try{const _0x5f5b48=this[_0x1c63ee(0x18b)][_0x1c63ee(0x250)]()[_0x1c63ee(0x1bf)](this['_key']);if(_0x5f5b48&&_0x5f5b48[_0x1c63ee(0x18c)]===this[_0x1c63ee(0x228)]){if(_0x519f42)this[_0x1c63ee(0x18b)]['_db']()[_0x1c63ee(0x1ef)](this[_0x1c63ee(0x1f3)]);else await this['_lock']['_db']()[_0x1c63ee(0x17d)](this[_0x1c63ee(0x1f3)]);}}catch{}}['_startHeartbeat'](_0xde546f,_0x10b21d){const _0x97700f=_0x2f564a,_0x4ccd20=_0x10b21d??Math[_0x97700f(0x259)](_0xde546f/0x3);this[_0x97700f(0x114)]=setInterval(()=>{const _0x2cea5f=_0x97700f;if(this[_0x2cea5f(0xdc)])return;this['_heartbeatInFlight']=((async()=>{const _0x1f6973=_0x2cea5f;try{const _0x368001=this[_0x1f6973(0x18b)][_0x1f6973(0x250)]()[_0x1f6973(0x1bf)](this[_0x1f6973(0x1f3)]);if(!_0x368001||_0x368001[_0x1f6973(0x18c)]!==this['_acquiredAt']){this['_released']=!![],clearInterval(this[_0x1f6973(0x114)]),this[_0x1f6973(0x114)]=null;return;}if(_0x519f42)this[_0x1f6973(0x18b)]['_db']()[_0x1f6973(0xe2)](this[_0x1f6973(0x1f3)],{..._0x368001,'updatedAt':Date[_0x1f6973(0x281)]()});else await this['_lock'][_0x1f6973(0x250)]()['put'](this[_0x1f6973(0x1f3)],{..._0x368001,'updatedAt':Date[_0x1f6973(0x281)]()});}catch{}this[_0x1f6973(0x13f)]=null;})());},_0x4ccd20);if(this[_0x97700f(0x114)][_0x97700f(0x1b8)])this['_heartbeatTimer'][_0x97700f(0x1b8)]();}}class _0x996d2a{constructor(_0x1ed1b0,{namespace:_0x37543b,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x4d9dea=_0x2f564a;this[_0x4d9dea(0x1db)]=_0x1ed1b0,this[_0x4d9dea(0xf7)]=_0x37543b,this['ttlMs']=ttlMs,this[_0x4d9dea(0x2e0)]=heartbeatMs,this['_lockDb']=null;}[_0x2f564a(0x250)](){const _0x43c48e=_0x2f564a;return!this[_0x43c48e(0x2f1)]&&(this[_0x43c48e(0x2f1)]=this[_0x43c48e(0x1db)][_0x43c48e(0x2ca)](_0x3d6189,{'dupSort':![]})),this[_0x43c48e(0x2f1)];}['_wantDb'](){const _0x490696=_0x2f564a;return!this[_0x490696(0x23b)]&&(this[_0x490696(0x23b)]=this[_0x490696(0x1db)][_0x490696(0x2ca)](_0x3d6189+_0x490696(0x22f),{'dupSort':![]})),this[_0x490696(0x23b)];}[_0x2f564a(0x1f3)](_0x1cc92c){const _0x2f24ac=_0x2f564a;return this[_0x2f24ac(0xf7)]+':'+_0x1cc92c;}[_0x2f564a(0x1f2)](_0x1c14ee){const _0x4ab296=_0x2f564a;try{_0x519f42?this['_wantDb']()[_0x4ab296(0xe2)](this[_0x4ab296(0x1f3)](_0x1c14ee),Date[_0x4ab296(0x281)]()):this[_0x4ab296(0xca)]()['put'](this['_key'](_0x1c14ee),Date[_0x4ab296(0x281)]())?.[_0x4ab296(0x2cd)]?.(()=>{});}catch{}}[_0x2f564a(0x16a)](_0x4e49dc,_0x3eb9c1=0x3e8){const _0x5a82cd=_0x2f564a;try{const _0x5cb38b=this[_0x5a82cd(0xca)]()[_0x5a82cd(0x1bf)](this[_0x5a82cd(0x1f3)](_0x4e49dc));return typeof _0x5cb38b===_0x5a82cd(0x253)&&Date[_0x5a82cd(0x281)]()-_0x5cb38b<_0x3eb9c1;}catch{return![];}}[_0x2f564a(0x198)](_0x1f83c4){const _0x3094b8=_0x2f564a,_0x1e419e=_0x1f83c4[_0x3094b8(0xd2)]??_0x1f83c4[_0x3094b8(0x18c)];return _0x1e419e+_0x1f83c4['ttlMs']<Date[_0x3094b8(0x281)]();}static['_holderDead'](_0x47cf66){const _0x4b93b7=_0x2f564a,_0x7a5997=_0x47cf66?.['holder'];if(!_0x7a5997||typeof _0x7a5997[_0x4b93b7(0x2de)]!==_0x4b93b7(0x253))return![];if(_0x7a5997['hostname']!==_0x39dcdf[_0x4b93b7(0x217)]())return![];if(_0x7a5997[_0x4b93b7(0x2de)]===process[_0x4b93b7(0x2de)])return![];try{return process[_0x4b93b7(0x15b)](_0x7a5997['pid'],0x0),![];}catch(_0x1fec5b){return _0x1fec5b[_0x4b93b7(0x1d9)]===_0x4b93b7(0xeb);}}async[_0x2f564a(0x2cf)](_0x2e2efe,_0x443647={},_0x1e4d8a={}){const _0x26e0bd=_0x2f564a,_0x5ab990=this[_0x26e0bd(0x1f3)](_0x2e2efe),_0x7e942e=_0x1e4d8a[_0x26e0bd(0x289)]??this[_0x26e0bd(0x289)],_0x381ae0=Date['now'](),_0x154535={'holder':{'pid':process[_0x26e0bd(0x2de)],'hostname':_0x39dcdf[_0x26e0bd(0x217)](),..._0x443647},'acquiredAt':_0x381ae0,'updatedAt':_0x381ae0,'ttlMs':_0x7e942e};let _0x5dda0d=![],_0x56b06b=null;try{const _0x115e1b=()=>{const _0x295fbe=_0x26e0bd,_0x26590b=this[_0x295fbe(0x250)]()[_0x295fbe(0x1bf)](_0x5ab990);if(_0x26590b&&!this['_isStale'](_0x26590b)&&!_0x996d2a[_0x295fbe(0x274)](_0x26590b)){const _0x392b04=_0x443647['processorId']!=null&&_0x26590b[_0x295fbe(0x2a6)][_0x295fbe(0x2de)]===process[_0x295fbe(0x2de)]&&_0x26590b[_0x295fbe(0x2a6)][_0x295fbe(0x17a)]===_0x443647[_0x295fbe(0x17a)];if(!_0x392b04){_0x5dda0d=![],_0x56b06b=_0x26590b;return;}_0x154535[_0x295fbe(0x18c)]<=_0x26590b[_0x295fbe(0x18c)]&&(_0x154535[_0x295fbe(0x18c)]=_0x26590b['acquiredAt']+0x1,_0x154535[_0x295fbe(0xd2)]=_0x154535[_0x295fbe(0x18c)]);}this['_db']()['put'](_0x5ab990,_0x154535),_0x5dda0d=!![],_0x56b06b=_0x154535;};if(_0x519f42)this['_db']()[_0x26e0bd(0x1d8)](_0x115e1b);else await this[_0x26e0bd(0x250)]()['childTransaction'](_0x115e1b);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x5dda0d)return{'acquired':![],'handle':null,'current':_0x56b06b};const _0x4b8fd0=new _0x4d80e0(this,_0x5ab990,_0x154535[_0x26e0bd(0x18c)]);return _0x4b8fd0[_0x26e0bd(0x1a6)](_0x7e942e,this[_0x26e0bd(0x2e0)]),{'acquired':!![],'handle':_0x4b8fd0,'current':_0x56b06b};}[_0x2f564a(0x1f8)](_0x30e2fe){const _0x159fb0=_0x2f564a;try{return this[_0x159fb0(0x250)]()['get'](this[_0x159fb0(0x1f3)](_0x30e2fe))??null;}catch{return null;}}[_0x2f564a(0x215)](){const _0x22c0f3=_0x2f564a,_0x27318c=this[_0x22c0f3(0xf7)]+':',_0x1cb248=[];try{for(const {key:_0x4a3ef7,value:_0x41b487}of this[_0x22c0f3(0x250)]()[_0x22c0f3(0x26a)]({'start':_0x27318c,'end':_0x27318c+'ÿ'})){typeof _0x4a3ef7==='string'&&_0x4a3ef7[_0x22c0f3(0x165)](_0x27318c)&&_0x1cb248[_0x22c0f3(0x242)]({'id':_0x4a3ef7['slice'](_0x27318c[_0x22c0f3(0x273)]),'entry':_0x41b487});}}catch{}return _0x1cb248;}static[_0x2f564a(0x227)](_0x23f9de){const _0x3f1695=_0x2f564a,_0x24e7ac=[];try{const _0x5564fb=_0x23f9de[_0x3f1695(0x2ca)](_0x3d6189,{'dupSort':![]});for(const {key:_0x516bbb,value:_0x2b3c85}of _0x5564fb[_0x3f1695(0x26a)]({})){if(typeof _0x516bbb!==_0x3f1695(0x238))continue;const _0x174d1c=_0x516bbb[_0x3f1695(0x20b)](':');if(_0x174d1c<0x1)continue;_0x24e7ac[_0x3f1695(0x242)]({'namespace':_0x516bbb['slice'](0x0,_0x174d1c),'id':_0x516bbb[_0x3f1695(0x1e0)](_0x174d1c+0x1),'entry':_0x2b3c85});}}catch{}return _0x24e7ac;}}return okdbLock={'OKDBLock':_0x996d2a},okdbLock;}function _0x23ad(_0x36b5ef,_0x1223cf){_0x36b5ef=_0x36b5ef-0xc1;const _0xd49bb5=_0xd49b();let _0x23ad8a=_0xd49bb5[_0x36b5ef];return _0x23ad8a;}var version=_0x22d7b4(0xc7),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x7e59cb=_0x22d7b4;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x35c0b3=require$$0$3,_0x2dce24=require$$1$1,_0xc06fd=require$$2,{LOOP:_0x3c3950}=requireOkdbLoopMonitor(),{OKDBLock:_0x1c02f9}=requireOkdbLock(),{SYNC_COMMITS:_0x491529}=requireOkdbWriter(),_0x532f67=_0x7e59cb(0xf4),_0x1a2a79=_0x7e59cb(0x25d),_0x5cc13b=_0x7e59cb(0x1ae),_0x6ff6ec=_0x7e59cb(0x12e),_0x467e6e=(_0xa14041,_0x34afd1)=>_0xa14041+':'+_0x34afd1,_0x3a0ecf=(_0x4d2ad2,_0x3b422c)=>_0x4d2ad2+'::'+_0x3b422c,_0x300894=(_0x23a7b3,_0x1c9ae6)=>_0x23a7b3+'/'+_0x1c9ae6,_0x1f463e=(_0x2c6a5a,_0x30dbb9)=>_0x2c6a5a+'#'+_0x30dbb9,_0x346692=_0x450c90=>{const _0x5fbd52=_0x7e59cb;if(_0x450c90?.['processKey'])return _0x450c90['processKey'];const _0x19fff7=_0x450c90?.[_0x5fbd52(0x2ed)];return typeof _0x19fff7==='string'&&_0x19fff7[_0x5fbd52(0x1fa)]('#')?_0x19fff7[_0x5fbd52(0x1e0)](0x0,_0x19fff7['indexOf']('#')):_0x19fff7;},_0x4960b3=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1c3d4a=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x394c48=_0x4960b3*0x3,_0x412fba=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x7e59cb(0x213)](0x927c0,_0x394c48*0x14),_0x4383ca=[_0x7e59cb(0x1af),_0x7e59cb(0x201),'processor:retry',_0x7e59cb(0x1c1),_0x7e59cb(0x1c4),_0x7e59cb(0xc4)];let _0x3525aa=null;function _0x1ca0cd(){const _0x53be32=_0x7e59cb;if(_0x3525aa==null)_0x3525aa=Math['round']((Date[_0x53be32(0x281)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x3525aa;}function _0xcc725e(_0xe45bd7){const _0x135205=_0x7e59cb;if(process.env.OKDB_PROCESS_KILL===_0x135205(0x232))return![];if(_0xe45bd7?.[_0x135205(0x1fe)]?.[_0x135205(0x20e)]&&typeof _0xe45bd7[_0x135205(0x1fe)][_0x135205(0x20e)]===_0x135205(0x29e)&&_0xe45bd7[_0x135205(0x1fe)][_0x135205(0x20e)][_0x135205(0x15b)]===![])return![];return!![];}function _0x22c756(_0x3076d8,_0x35fa31){const _0x39eecd=_0x7e59cb,_0x412685=!!_0x35fa31?.[_0x39eecd(0xed)];switch(_0x3076d8){case _0x39eecd(0x237):return{'controllable':_0x412685,'decommissionable':![],'killable':!![],'killConfirm':_0x39eecd(0x162)};case'cli':case _0x39eecd(0x170):return{'controllable':_0x412685,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x39eecd(0x1a7):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x39eecd(0xc9):case'fn-runner':case _0x39eecd(0xfa):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x573e35{constructor(_0x23e531){const _0x594abb=_0x7e59cb;this[_0x594abb(0x13d)]=_0x23e531,this[_0x594abb(0xf3)]=null,this['_desired']=null,this[_0x594abb(0xd5)]=new Map(),this['_cmd']=null,this[_0x594abb(0x2d8)]=![],this[_0x594abb(0x195)]=![],this[_0x594abb(0x199)]=_0x1ca0cd(),this['_selfKey']=_0x467e6e(process['pid'],this[_0x594abb(0x199)]),this['_instanceId']=_0xc06fd[_0x594abb(0x14f)]()[_0x594abb(0x1e0)](0x0,0x8),this['_rowKey']=_0x1f463e(this[_0x594abb(0xd1)],this['_instanceId']),this[_0x594abb(0x121)]=Date[_0x594abb(0x281)](),this[_0x594abb(0x25f)]=null,this[_0x594abb(0x17c)]=null,this[_0x594abb(0x21f)]=null,this[_0x594abb(0x222)]=null,this[_0x594abb(0x2b9)]=null,this[_0x594abb(0x25c)]=null,this[_0x594abb(0x2bf)]=0x0,this[_0x594abb(0x1cb)]={},this[_0x594abb(0x15c)]=new Map(),this[_0x594abb(0x2a7)]=process['cpuUsage'](),this[_0x594abb(0x1a5)]=Date[_0x594abb(0x281)](),this[_0x594abb(0x107)]=0x0,this[_0x594abb(0x17f)]=new Map();}get[_0x7e59cb(0x1e2)](){const _0x4f7d95=_0x7e59cb;return this[_0x4f7d95(0xd1)];}get[_0x7e59cb(0x200)](){const _0x2939b1=_0x7e59cb;return this[_0x2939b1(0xcf)];}['_caps'](_0x14d461,_0x362606){const _0x28fd0f=_0x7e59cb,_0x388bc2=_0x22c756(_0x14d461,_0x362606);if(_0x388bc2[_0x28fd0f(0x132)]&&!_0xcc725e(this[_0x28fd0f(0x13d)]))return{..._0x388bc2,'killable':![],'killConfirm':undefined};return _0x388bc2;}[_0x7e59cb(0x260)](){const _0x5bbd6a=_0x7e59cb;return!!this[_0x5bbd6a(0xf3)];}[_0x7e59cb(0x2e3)](_0x163918){Object['assign'](this['_ownMeta'],_0x163918||{});}[_0x7e59cb(0x2ee)](_0x2a3c88){if(_0x2a3c88)this['_listenAddr']=_0x2a3c88;}[_0x7e59cb(0x203)](_0x212118={}){const _0x322718=_0x7e59cb;return this[_0x322718(0x13d)][_0x322718(0x1ba)](_0x212118);}[_0x7e59cb(0x134)](){const _0x5d8532=_0x7e59cb,_0x4b39c9={};let _0x597762=0x0,_0x2debc7=0x0;const _0x1a5b19=new Set();for(const _0x460e99 of this[_0x5d8532(0x1e9)]()){_0x2debc7++;const _0x3faa7d=_0x460e99['processing'];if(!_0x3faa7d)continue;if(_0x3faa7d['participate'])_0x597762++;for(const _0xf603b6 of _0x3faa7d['processors']||[]){if(![_0x5d8532(0x271),_0x5d8532(0x2ad)][_0x5d8532(0x1fa)](_0xf603b6[_0x5d8532(0x23c)]))continue;(_0xf603b6[_0x5d8532(0x211)]==='online'||_0xf603b6['state']==='building')&&_0xf603b6[_0x5d8532(0x164)]&&_0x1a5b19[_0x5d8532(0x145)]((_0xf603b6[_0x5d8532(0x27a)]||_0x5d8532(0x2b0))+':'+_0xf603b6[_0x5d8532(0x164)]);const _0x355efb=_0xf603b6[_0x5d8532(0x27a)]||'default';(_0x4b39c9[_0x355efb]||=[])[_0x5d8532(0x242)]({..._0xf603b6,'env':_0x355efb,'owner':{'pid':_0x460e99[_0x5d8532(0x2de)]??null,'kind':_0x460e99[_0x5d8532(0x18a)]??null}});}}for(const [_0x1f9cae,_0x18dd4c]of Object[_0x5d8532(0x2e5)](_0x4b39c9)){for(const _0x5036b9 of _0x18dd4c){if(_0x5036b9[_0x5d8532(0x23c)]==='single'&&!_0x5036b9[_0x5d8532(0x2c9)]){const _0x1f2f85=_0x1f9cae+':'+(_0x5036b9['cursorKey']??'');if(!_0x1a5b19[_0x5d8532(0x254)](_0x1f2f85))_0x5036b9[_0x5d8532(0x180)]=!![];}}}return{'envs':_0x4b39c9,'policy':null,'participation':{'participating':_0x597762,'total':_0x2debc7},'source':'workers'};}[_0x7e59cb(0x138)](){const _0x4008dc=_0x7e59cb,_0x12cd5a=_0xca3e8f=>{const _0x46f18a=_0x23ad;if(_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x1c0)||_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x278)||_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x231))return 0x3;if(_0xca3e8f[_0x46f18a(0x2c9)])return 0x1;return 0x2;},_0x5586bd=new Map();for(const _0xa3b91e of this['listNodes']()){for(const _0x571139 of _0xa3b91e[_0x4008dc(0x1bb)]?.[_0x4008dc(0xed)]||[]){const _0x39ba3d={..._0x571139,'owner':{'pid':_0xa3b91e[_0x4008dc(0x2de)]??null,'kind':_0xa3b91e[_0x4008dc(0x18a)]??null,'host':_0xa3b91e[_0x4008dc(0x1d5)]??null}},_0x4722a8=_0x571139[_0x4008dc(0x23c)]===_0x4008dc(0x271)?'1ofN:'+(_0x571139[_0x4008dc(0x27a)]??'')+'::'+(_0x571139[_0x4008dc(0x164)]??_0x571139['type']??_0x571139['id']):_0x4008dc(0x234)+(_0xa3b91e[_0x4008dc(0x2ed)]??_0xa3b91e[_0x4008dc(0x22b)]??'')+'::'+(_0x571139['env']??'')+'::'+_0x571139['id'],_0x5a6d7a=_0x5586bd['get'](_0x4722a8);if(!_0x5a6d7a||_0x12cd5a(_0x39ba3d)>_0x12cd5a(_0x5a6d7a))_0x5586bd['set'](_0x4722a8,_0x39ba3d);}}return[..._0x5586bd[_0x4008dc(0x1dd)]()];}['clusterStatusView'](){const _0x3fd594=_0x7e59cb,_0x3f0dc7=Date[_0x3fd594(0x281)](),_0x2958bf=this[_0x3fd594(0x1e9)](),_0x43687a=_0xf8f0fb=>Math[_0x3fd594(0x213)](0x0,Math['round']((_0x3f0dc7-(_0xf8f0fb[_0x3fd594(0x148)]||_0x3f0dc7))/0x3e8)),_0x67cae2=_0x2958bf[_0x3fd594(0x18e)](_0x4c35d6=>_0x4c35d6['kind']===_0x3fd594(0x237)),_0x56b2ea=_0x2958bf[_0x3fd594(0x1c6)](_0x3fe88f=>_0x3fe88f[_0x3fd594(0x18a)]===_0x3fd594(0x13a));if(_0x67cae2||_0x56b2ea[_0x3fd594(0x273)])return{'primary':_0x67cae2?{'pid':_0x67cae2[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x67cae2)}:null,'workers':_0x56b2ea[_0x3fd594(0x188)](_0x5c6c2d=>({'pid':_0x5c6c2d[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x5c6c2d)})),'workersConfigured':_0x67cae2?.[_0x3fd594(0x14e)]?.[_0x3fd594(0x12c)]??_0x56b2ea[_0x3fd594(0x273)],'mode':'cluster'};const _0x5ef8bb=_0x2958bf[_0x3fd594(0x18e)](_0x5bb6f1=>_0x5bb6f1[_0x3fd594(0x18a)]===_0x3fd594(0x12b)||_0x5bb6f1['kind']===_0x3fd594(0x170)||_0x5bb6f1['kind']==='embedded'),_0x2b4d01=_0x5ef8bb?{'pid':_0x5ef8bb[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x5ef8bb)}:{'pid':process[_0x3fd594(0x2de)],'uptime':Math[_0x3fd594(0x213)](0x0,Math['round'](process[_0x3fd594(0x169)]()))};return{'primary':_0x2b4d01,'workers':[_0x2b4d01],'workersConfigured':0x1,'mode':_0x3fd594(0x271)};}['nodesView'](){const _0x552323=_0x7e59cb;return this[_0x552323(0x1ad)]();}[_0x7e59cb(0x2bb)](){const _0x7442d4=_0x7e59cb,_0x40463e=new Map();for(const _0x2bb7b8 of this[_0x7442d4(0x1ad)]())_0x40463e[_0x7442d4(0x296)](_0x2bb7b8[_0x7442d4(0x22b)],{..._0x2bb7b8,'children':[]});const _0x422663=[];for(const _0x134932 of _0x40463e['values']()){const _0x1bd64e=_0x134932['supervisorKey']?_0x40463e[_0x7442d4(0x1bf)](_0x134932[_0x7442d4(0x1e4)]):null;if(_0x1bd64e&&_0x1bd64e!==_0x134932)_0x1bd64e[_0x7442d4(0x224)][_0x7442d4(0x242)](_0x134932);else _0x422663[_0x7442d4(0x242)](_0x134932);}const _0x4eab2e=(_0x2b7830,_0x12e2f1)=>_0x2b7830[_0x7442d4(0x18a)]===_0x12e2f1['kind']?(_0x2b7830[_0x7442d4(0x2de)]||0x0)-(_0x12e2f1[_0x7442d4(0x2de)]||0x0):(_0x2b7830[_0x7442d4(0x18a)]??'')<(_0x12e2f1['kind']??'')?-0x1:0x1,_0x142c4d=_0x4f81ed=>{const _0x35d379=_0x7442d4;_0x4f81ed['sort'](_0x4eab2e);for(const _0x545ff1 of _0x4f81ed)if(_0x545ff1[_0x35d379(0x224)]['length'])_0x142c4d(_0x545ff1[_0x35d379(0x224)]);};return _0x142c4d(_0x422663),_0x422663;}['getProcess'](_0x34582f){const _0x34ed96=_0x7e59cb;return this[_0x34ed96(0x1ad)]()[_0x34ed96(0x18e)](_0x2a0fc9=>_0x2a0fc9[_0x34ed96(0x22b)]===_0x34582f)??null;}[_0x7e59cb(0x1ad)](_0x3d7764=Date['now']()){const _0x352921=_0x7e59cb,_0x271c73=new Map();for(const _0x4c7aff of this[_0x352921(0x1e9)]()){const _0x1e9d9a=_0x346692(_0x4c7aff);let _0x58a22d=_0x271c73[_0x352921(0x1bf)](_0x1e9d9a);!_0x58a22d&&(_0x58a22d={'processKey':_0x1e9d9a,'nodeKey':_0x1e9d9a,'pid':_0x4c7aff[_0x352921(0x2de)],'ppid':_0x4c7aff['ppid']??null,'host':_0x4c7aff[_0x352921(0x1d5)]??null,'kind':_0x4c7aff[_0x352921(0x18a)],'role':null,'supervisorKey':_0x4c7aff[_0x352921(0x1e4)]??null,'slot':_0x4c7aff[_0x352921(0xef)]??null,'slotKey':_0x4c7aff[_0x352921(0x174)]??null,'caps':_0x4c7aff[_0x352921(0x1c9)]??null,'lifecycle':_0x4c7aff[_0x352921(0x125)]??null,'uptime':Math[_0x352921(0x213)](0x0,Math[_0x352921(0x1b7)]((_0x3d7764-(_0x4c7aff[_0x352921(0x148)]||_0x3d7764))/0x3e8)),'startedAt':_0x4c7aff[_0x352921(0x148)]??null,'meta':_0x4c7aff['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x271c73[_0x352921(0x296)](_0x1e9d9a,_0x58a22d));_0x58a22d[_0x352921(0x1cd)][_0x352921(0x242)]({'instanceId':_0x4c7aff[_0x352921(0x13b)]??null,'role':_0x4c7aff['role']??null,'listenAddr':_0x4c7aff[_0x352921(0x248)]??null,'lifecycle':_0x4c7aff[_0x352921(0x125)]??null,'processing':_0x4c7aff['processing']??null});if(!_0x58a22d['role']&&_0x4c7aff['role'])_0x58a22d['role']=_0x4c7aff[_0x352921(0x2b8)];if(!_0x58a22d[_0x352921(0x248)]&&_0x4c7aff[_0x352921(0x248)])_0x58a22d[_0x352921(0x248)]=_0x4c7aff[_0x352921(0x248)];if(!_0x58a22d[_0x352921(0x1bb)]&&_0x4c7aff['processing'])_0x58a22d['processing']=_0x4c7aff[_0x352921(0x1bb)];if(!_0x58a22d[_0x352921(0xf8)]&&_0x4c7aff['engines'])_0x58a22d['engines']=_0x4c7aff[_0x352921(0xf8)];if(!_0x58a22d[_0x352921(0x2a8)]&&_0x4c7aff['singletonClaims'])_0x58a22d[_0x352921(0x2a8)]=_0x4c7aff[_0x352921(0x2a8)];if(_0x58a22d[_0x352921(0x1c9)]==null&&_0x4c7aff[_0x352921(0x1c9)])_0x58a22d['caps']=_0x4c7aff['caps'];if(_0x4c7aff['stats']&&(!_0x58a22d[_0x352921(0x14b)]||(_0x4c7aff[_0x352921(0x14b)]['at']??0x0)>(_0x58a22d['stats']['at']??0x0)))_0x58a22d[_0x352921(0x14b)]=_0x4c7aff['stats'];}return[..._0x271c73[_0x352921(0x1dd)]()];}['runtimeProcessesView'](){const _0x28c9ea=_0x7e59cb,_0x2c4901=[],_0x5b6448={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x4fe2f5 of this[_0x28c9ea(0x1ad)]()){_0x2c4901['push']({'processKey':_0x4fe2f5[_0x28c9ea(0x22b)],'kind':_0x4fe2f5[_0x28c9ea(0x18a)],'pid':_0x4fe2f5[_0x28c9ea(0x2de)],'supervisorKey':_0x4fe2f5[_0x28c9ea(0x1e4)],'meta':_0x4fe2f5[_0x28c9ea(0x14e)]??null,'uptime':_0x4fe2f5['uptime'],'stats':_0x4fe2f5[_0x28c9ea(0x14b)]??null}),_0x5b6448[_0x28c9ea(0x20e)]++;if(_0x4fe2f5[_0x28c9ea(0x14b)]){_0x5b6448[_0x28c9ea(0x16e)]+=_0x4fe2f5[_0x28c9ea(0x14b)][_0x28c9ea(0x16e)]||0x0,_0x5b6448[_0x28c9ea(0xd4)]+=(_0x4fe2f5[_0x28c9ea(0x14b)]['heapUsed']||0x0)+(_0x4fe2f5[_0x28c9ea(0x14b)][_0x28c9ea(0x282)]?.[_0x28c9ea(0xd4)]||0x0);const _0x211176=_0x4fe2f5[_0x28c9ea(0x14b)]['threads'];_0x211176&&(_0x5b6448['threads'][_0x28c9ea(0x2e1)]+=_0x211176[_0x28c9ea(0x2e1)]||0x0,_0x5b6448['threads'][_0x28c9ea(0x214)]+=_0x211176[_0x28c9ea(0x214)]||0x0,_0x5b6448[_0x28c9ea(0x282)][_0x28c9ea(0x16c)]+=_0x211176['busy']||0x0);}}return{'totals':_0x5b6448,'nodes':_0x2c4901};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x7ee9be=_0x7e59cb;this['_isWriter']=this[_0x7ee9be(0x2d8)]||!!writer,this['_isReader']=this[_0x7ee9be(0x195)]||!!reader,this['_kind']=kind||this[_0x7ee9be(0x25f)]||(_0x2dce24['isWorker']?_0x7ee9be(0x13a):'cli'),this[_0x7ee9be(0x17c)]=supervisorKey??this[_0x7ee9be(0x17c)],this[_0x7ee9be(0x21f)]=listenAddr??this[_0x7ee9be(0x21f)],this['_ensureDesired'](),await this[_0x7ee9be(0x1a8)]();if(!writer&&!reader)return null;if(!this[_0x7ee9be(0xf3)]){const _0x50b216=await this[_0x7ee9be(0x13d)][_0x7ee9be(0x27d)](_0x532f67,{'sync':![],'durability':_0x7ee9be(0x240)});if(!_0x50b216[_0x7ee9be(0x2a9)](_0x1a2a79))await _0x50b216[_0x7ee9be(0x29d)](_0x1a2a79);this[_0x7ee9be(0xf3)]=_0x50b216;}return this[_0x7ee9be(0xf3)];}[_0x7e59cb(0x1aa)](){const _0x496037=_0x7e59cb;return this[_0x496037(0x23a)]!==this[_0x496037(0xf3)]&&(this[_0x496037(0x23a)]=this[_0x496037(0xf3)],this[_0x496037(0x1e6)]=this['_statusEnv']['_getType'](_0x1a2a79)['data']),this[_0x496037(0x1e6)];}['_putRowAsync'](_0x3f575c){const _0x10c091=_0x7e59cb;if(_0x491529)return this[_0x10c091(0x1aa)]()[_0x10c091(0xe2)](_0x3f575c[_0x10c091(0x2ed)],_0x3f575c,0x1);const _0x488c24=this[_0x10c091(0x1aa)]()[_0x10c091(0x126)](_0x3f575c['nodeKey'],_0x3f575c,0x1);if(_0x488c24&&typeof _0x488c24[_0x10c091(0x2a1)]==='function')_0x488c24['then'](undefined,()=>{});return _0x488c24;}[_0x7e59cb(0xce)](_0x5dddd2){const _0xc2772d=_0x7e59cb;return this[_0xc2772d(0x1aa)]()[_0xc2772d(0xe2)](_0x5dddd2['nodeKey'],_0x5dddd2,0x1);}['_removeRowAsync'](_0x3fa943){const _0x29d730=_0x7e59cb;if(_0x491529)try{return this[_0x29d730(0x1aa)]()[_0x29d730(0x1ef)](_0x3fa943);}catch{return![];}const _0x2164c1=this['_nodeDb']()[_0x29d730(0x17d)](_0x3fa943);if(_0x2164c1&&typeof _0x2164c1[_0x29d730(0x2a1)]===_0x29d730(0x156))_0x2164c1['then'](undefined,()=>{});return _0x2164c1;}async[_0x7e59cb(0x1d0)](_0x2b7561){const _0x16f8aa=_0x7e59cb;if(!this[_0x16f8aa(0xf3)]||!this[_0x16f8aa(0x2d8)]||!_0x2b7561?.['nodeKey'])return;return this['_putRowAsync'](_0x2b7561);}async[_0x7e59cb(0x2e6)](_0xfa1e9a){const _0x6503b1=_0x7e59cb;if(!this[_0x6503b1(0xf3)]||!this['_isWriter']||!_0xfa1e9a)return;const _0x2abce8=_0xfa1e9a[_0x6503b1(0x1fa)]('#'),_0x28b6c0=[];for(const {key:_0x79e0ce}of this[_0x6503b1(0xf3)][_0x6503b1(0x26a)](_0x1a2a79)){if(_0x79e0ce===_0xfa1e9a||!_0x2abce8&&typeof _0x79e0ce===_0x6503b1(0x238)&&_0x79e0ce[_0x6503b1(0x165)](_0xfa1e9a+'#'))_0x28b6c0[_0x6503b1(0x242)](_0x79e0ce);}for(const _0x15e848 of _0x28b6c0){try{this['_nodeDb']()['removeSync'](_0x15e848);}catch{}}}['_nodeDead'](_0x3ec149){const _0x5443ea=_0x7e59cb;if(typeof _0x3ec149?.['pid']!==_0x5443ea(0x253))return![];if(_0x3ec149[_0x5443ea(0x1d5)]!==_0x35c0b3[_0x5443ea(0x217)]())return![];if(_0x3ec149[_0x5443ea(0x2de)]===process[_0x5443ea(0x2de)])return![];if(_0x3ec149[_0x5443ea(0x2e2)]!=null&&_0x3ec149[_0x5443ea(0x2e2)]<Date[_0x5443ea(0x281)]()-_0x412fba)return!![];try{return process[_0x5443ea(0x15b)](_0x3ec149['pid'],0x0),![];}catch(_0x5010d2){return _0x5010d2['code']==='ESRCH';}}[_0x7e59cb(0x1e9)](){const _0x4e7e11=_0x7e59cb;if(!this[_0x4e7e11(0xf3)])return[];try{this[_0x4e7e11(0xf3)]['db']?.['resetReadTxn']?.();}catch{}const _0x2792e1=Date[_0x4e7e11(0x281)](),_0x33ed42=_0x35c0b3[_0x4e7e11(0x217)](),_0x4383ed=[];for(const {value:_0x597bb7}of this[_0x4e7e11(0xf3)]['getRange'](_0x1a2a79)){if(!_0x597bb7)continue;let _0x212776=null;_0x597bb7[_0x4e7e11(0x1d5)]===_0x33ed42&&typeof _0x597bb7[_0x4e7e11(0x2de)]===_0x4e7e11(0x253)&&(_0x212776=!this[_0x4e7e11(0x2b5)](_0x597bb7));if(_0x212776===![])continue;const _0x24ea08=_0x597bb7[_0x4e7e11(0x2e2)]==null||_0x597bb7[_0x4e7e11(0x2e2)]>=_0x2792e1;if(_0x212776===!![]||_0x24ea08)_0x4383ed[_0x4e7e11(0x242)](_0x597bb7);}return _0x4383ed;}async[_0x7e59cb(0x1ee)](_0x368340=0x0){const _0x3f8546=_0x7e59cb;if(!this[_0x3f8546(0xf3)]||!this['_isWriter'])return;const _0x16cecf=Date['now']()-_0x368340,_0x2b3fc6=new Set(),_0x487172=[],_0xe794d4=_0x35c0b3[_0x3f8546(0x217)](),_0x253aa2=require$$6[_0x3f8546(0x210)];for(const {key:_0x46ceb4,value:_0x4d9740}of this[_0x3f8546(0xf3)][_0x3f8546(0x26a)](_0x1a2a79)){if(!_0x4d9740)continue;const _0xc9b26d=_0x4d9740[_0x3f8546(0x1d5)]===_0xe794d4&&typeof _0x4d9740[_0x3f8546(0x2de)]===_0x3f8546(0x253),_0x5c0e69=_0xc9b26d?this[_0x3f8546(0x2b5)](_0x4d9740):_0x4d9740[_0x3f8546(0x2e2)]!=null&&_0x4d9740[_0x3f8546(0x2e2)]<_0x16cecf;if(_0x5c0e69)_0x487172['push'](_0x46ceb4);else{_0x2b3fc6[_0x3f8546(0x145)](_0x346692(_0x4d9740)??_0x46ceb4);if(_0x4d9740[_0x3f8546(0x210)]&&_0x4d9740[_0x3f8546(0x210)]!==_0x253aa2){if(!this[_0x3f8546(0x128)])this[_0x3f8546(0x128)]=new Set();!this[_0x3f8546(0x128)][_0x3f8546(0x254)](_0x4d9740[_0x3f8546(0x210)])&&(this[_0x3f8546(0x128)]['add'](_0x4d9740['version']),this[_0x3f8546(0x13d)]['log']?.['warn']?.(_0x3f8546(0x261)+(_0x4d9740[_0x3f8546(0x2de)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x4d9740['version']+'\x20while\x20this\x20process\x20runs\x20'+_0x253aa2+'\x20—\x20'+_0x3f8546(0x20c),{'feature':_0x3f8546(0x127)}));}}}for(const _0x2b70ec of _0x487172)this[_0x3f8546(0x225)](_0x2b70ec);if(this[_0x3f8546(0x17e)]()){const _0x394432=[];for(const {key:_0x5a18fc}of this['listDesired'](_0x3f8546(0x25d))){if(!_0x2b3fc6[_0x3f8546(0x254)](_0x5a18fc)){if(_0x491529)try{this['_desired'][_0x3f8546(0x1ef)]('node/'+_0x5a18fc);}catch{}else _0x394432['push'](this['_desired'][_0x3f8546(0x17d)]('node/'+_0x5a18fc));}}if(_0x394432[_0x3f8546(0x273)])await Promise[_0x3f8546(0x24e)](_0x394432);}}[_0x7e59cb(0x23e)](_0x3c61e6=null){const _0x5ee033=_0x7e59cb;if(this[_0x5ee033(0x222)])return;if(!this[_0x5ee033(0x2d8)]||!this['_statusEnv']){this[_0x5ee033(0x13d)]?.[_0x5ee033(0x2c7)]?.[_0x5ee033(0x1ce)]?.(_0x5ee033(0x153)+this[_0x5ee033(0x2d8)]+_0x5ee033(0x1b2)+!!this[_0x5ee033(0xf3)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':'processes'});return;}this[_0x5ee033(0x25c)]=_0x3c61e6,this['_onProcEvent']=()=>this['_maybePublish']();for(const _0x41eaff of _0x4383ca)this[_0x5ee033(0x13d)]['events']['on'](_0x41eaff,this[_0x5ee033(0x2b9)]);this[_0x5ee033(0x12a)]();const _0x2fee57=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x4960b3;this[_0x5ee033(0x222)]=setInterval(()=>{const _0x209990=_0x5ee033;if(this[_0x209990(0x25c)])try{this[_0x209990(0x25c)]();}catch{}this['_publishNow'](),this[_0x209990(0x1ee)]()[_0x209990(0x2cd)](()=>{});},_0x2fee57);if(this[_0x5ee033(0x222)][_0x5ee033(0x1b8)])this[_0x5ee033(0x222)][_0x5ee033(0x1b8)]();}[_0x7e59cb(0x129)](){const _0x567009=_0x7e59cb;if(!this[_0x567009(0x2d8)]||!this['_statusEnv'])return;if(Date[_0x567009(0x281)]()-this['_lastPublishAt']<_0x1c3d4a)return;this[_0x567009(0x12a)]();}['_publishNow'](){const _0x5520e6=_0x7e59cb;if(!this[_0x5520e6(0x2d8)]||!this[_0x5520e6(0xf3)])return;this['_lastPublishAt']=Date[_0x5520e6(0x281)]();try{const _0x3bb801=[this[_0x5520e6(0x2d5)]()];for(const _0xe529b9 of this[_0x5520e6(0x15c)]['values']())_0x3bb801[_0x5520e6(0x242)](this[_0x5520e6(0x2cc)](_0xe529b9));const _0x2c4b90=_0x3c3950['enabled']?_0x3c3950[_0x5520e6(0x281)]():0x0;for(const _0x41c358 of _0x3bb801){try{this['_putRowSync'](_0x41c358),this[_0x5520e6(0x110)]=![];}catch(_0x504303){!this[_0x5520e6(0x110)]&&(this[_0x5520e6(0x110)]=!![],this[_0x5520e6(0x13d)]?.[_0x5520e6(0x2c7)]?.['warn']?.('registry\x20publish\x20failing:\x20'+_0x504303['message'],{'feature':_0x5520e6(0x20e)}));}}if(_0x3c3950[_0x5520e6(0x2df)])_0x3c3950['note'](_0x5520e6(0x27e),_0x3c3950[_0x5520e6(0x281)]()-_0x2c4b90,_0x5520e6(0x1d6)+_0x3bb801[_0x5520e6(0x273)]+_0x5520e6(0x2e8));}catch(_0x37cdbc){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this['okdb']?.[_0x5520e6(0x2c7)]?.[_0x5520e6(0x1ce)]?.('registry\x20publish\x20failing:\x20'+_0x37cdbc[_0x5520e6(0xf9)],{'feature':_0x5520e6(0x20e)}));}}async[_0x7e59cb(0x223)](){const _0x104f59=_0x7e59cb;if(this['_onProcEvent']){for(const _0x7a537f of _0x4383ca){try{this[_0x104f59(0x13d)]['events'][_0x104f59(0x232)](_0x7a537f,this[_0x104f59(0x2b9)]);}catch{}}this[_0x104f59(0x2b9)]=null;}this[_0x104f59(0x222)]&&(clearInterval(this[_0x104f59(0x222)]),this[_0x104f59(0x222)]=null);try{if(this[_0x104f59(0xf3)]&&this[_0x104f59(0x2d8)])await this[_0x104f59(0x2e6)](this['_rowKey']);}catch{}}async['deregisterSelf'](){const _0xbf1a35=_0x7e59cb;if(!this[_0xbf1a35(0xf3)]||!this[_0xbf1a35(0x2d8)])return;try{await this['removeNode'](this[_0xbf1a35(0xcf)]);}catch{}try{const _0x536f30=[];for(const {value:_0x109b81}of this[_0xbf1a35(0xf3)][_0xbf1a35(0x26a)](_0x1a2a79)){if(_0x109b81?.[_0xbf1a35(0x264)]===process['pid']&&_0x109b81[_0xbf1a35(0x2ed)])_0x536f30['push'](_0x109b81[_0xbf1a35(0x2ed)]);}for(const _0x2850ef of _0x536f30){try{await this[_0xbf1a35(0x2e6)](_0x2850ef);}catch{}}}catch{}}async['publishOwnRow'](){const _0x3a66bf=_0x7e59cb;return this['putNode'](this[_0x3a66bf(0x2d5)]());}async['publishChildRow'](_0x19ad63){const _0x473961=_0x7e59cb;if(!this[_0x473961(0xf3)]||!this[_0x473961(0x2d8)])return;return this[_0x473961(0x1d0)](this[_0x473961(0x2cc)](_0x19ad63));}[_0x7e59cb(0x2cc)]({pid:_0x38b542,startedAt:_0x356957,kind:_0x53dafa,supervisorKey:_0x357970,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x7e59cb(0x1fb),meta:meta=null,stats:stats=null}){const _0x50299c=_0x7e59cb,_0x515d0e=Date[_0x50299c(0x281)](),_0x34d54b=_0x467e6e(_0x38b542,_0x356957);return{'nodeKey':_0x1f463e(_0x34d54b,'0'),'processKey':_0x34d54b,'instanceId':'0','pid':_0x38b542,'startedAt':_0x356957,'ppid':process[_0x50299c(0x2de)],'host':_0x35c0b3[_0x50299c(0x217)](),'supervisorKey':_0x357970,'slot':slot,'slotKey':slotKey,'kind':_0x53dafa,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x515d0e,'expiresAt':_0x515d0e+_0x394c48,'caps':this['_caps'](_0x53dafa,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x7e59cb(0x11c)](_0x5cfd18){const _0x15a5a5=_0x7e59cb;if(!_0x5cfd18?.[_0x15a5a5(0x2de)])return null;const _0x135231=_0x467e6e(_0x5cfd18[_0x15a5a5(0x2de)],_0x5cfd18[_0x15a5a5(0x148)]);this[_0x15a5a5(0x15c)][_0x15a5a5(0x296)](_0x135231,{..._0x5cfd18,'supervisorKey':_0x5cfd18[_0x15a5a5(0x1e4)]??this[_0x15a5a5(0xd1)]});if(this[_0x15a5a5(0x2d8)])await this[_0x15a5a5(0x124)](this[_0x15a5a5(0x15c)][_0x15a5a5(0x1bf)](_0x135231))['catch']?.(()=>{});return _0x135231;}['removeSupervisedChild'](_0x1ea405){const _0x112241=_0x7e59cb;if(!_0x1ea405)return;return this['_children']['delete'](_0x1ea405),this[_0x112241(0x2e6)](_0x1ea405);}[_0x7e59cb(0x20f)](){const _0x2ff36c=_0x7e59cb,_0x5d5be6=Date[_0x2ff36c(0x281)](),_0x2b0d0a=process[_0x2ff36c(0x136)](),_0xe11e99=(_0x5d5be6-this['_lastCpuAt'])*0x3e8;if(_0xe11e99>=0x3d090){const _0x1ab081=_0x2b0d0a[_0x2ff36c(0x151)]-this[_0x2ff36c(0x2a7)][_0x2ff36c(0x151)]+(_0x2b0d0a[_0x2ff36c(0x22c)]-this['_lastCpuUsage']['system']),_0x1d9283=_0x35c0b3[_0x2ff36c(0x18d)]()[_0x2ff36c(0x273)]||0x1;this[_0x2ff36c(0x107)]=Math['min'](0x64,Math[_0x2ff36c(0x1b7)](_0x1ab081/(_0xe11e99*_0x1d9283)*0x64)),this[_0x2ff36c(0x1a4)]=Math['round'](_0xe11e99/0x3e8),this['_lastCpuUsage']=_0x2b0d0a,this[_0x2ff36c(0x1a5)]=_0x5d5be6;}const _0xca5921=process[_0x2ff36c(0x295)](),_0x4c3968=this[_0x2ff36c(0x17f)][_0x2ff36c(0x1f9)];let _0x3ebc83=0x0;if(_0x4c3968>0x0){const _0x243f37=[this[_0x2ff36c(0x13d)],...this['okdb'][_0x2ff36c(0x161)]?.[_0x2ff36c(0x1dd)]?.()??[]];for(const _0x360121 of _0x243f37){const _0x2b45f8=_0x360121[_0x2ff36c(0x22d)]?.[_0x2ff36c(0x291)];if(_0x2b45f8)_0x3ebc83+=_0x2b45f8[_0x2ff36c(0x21e)][_0x2ff36c(0x16c)];}}let _0x5059d5=null;const _0x59f473=_0x4c3968;if(_0x59f473>0x0){let _0x56da43=0x0;for(const _0x3b4016 of this[_0x2ff36c(0x17f)][_0x2ff36c(0x1dd)]())_0x56da43+=_0x3b4016[_0x2ff36c(0xd4)]||0x0;_0x5059d5={'count':_0x59f473,'heapUsed':_0x56da43,'sandbox':_0x4c3968,'busy':_0x3ebc83};}return{'rss':_0xca5921[_0x2ff36c(0x16e)],'heapUsed':_0xca5921['heapUsed'],'heapTotal':_0xca5921[_0x2ff36c(0x1de)],'external':_0xca5921[_0x2ff36c(0x239)],'cpuPct':this[_0x2ff36c(0x107)],'cpuWindowMs':this[_0x2ff36c(0x1a4)]??null,'threads':_0x5059d5,'at':_0x5d5be6};}[_0x7e59cb(0x23f)](_0x3297b3,_0x469501){const _0x25d800=_0x7e59cb;if(!_0x3297b3||!_0x469501)return;this[_0x25d800(0x17f)][_0x25d800(0x296)](_0x3297b3,_0x469501);}[_0x7e59cb(0x205)](_0x49495d){const _0x17577c=_0x7e59cb;this[_0x17577c(0x17f)][_0x17577c(0x102)](_0x49495d);}[_0x7e59cb(0x15f)](_0x3ff4f3,_0x51148b,_0x21b39f=undefined){const _0x1dfb47=_0x7e59cb,_0x4ed629=this[_0x1dfb47(0x15c)][_0x1dfb47(0x1bf)](_0x3ff4f3);if(!_0x4ed629||!_0x51148b)return;if(_0x21b39f!==undefined)_0x4ed629['processing']=_0x21b39f;_0x4ed629[_0x1dfb47(0x14b)]={'rss':_0x51148b[_0x1dfb47(0x16e)]??null,'heapUsed':_0x51148b[_0x1dfb47(0xd4)]??null,'heapTotal':_0x51148b[_0x1dfb47(0x1de)]??null,'external':_0x51148b[_0x1dfb47(0x239)]??null,'cpuPct':_0x51148b['cpuPct']??null,'cpuWindowMs':_0x51148b['cpuWindowMs']??null,'threads':_0x51148b[_0x1dfb47(0x282)]??null,'claims':_0x51148b[_0x1dfb47(0x178)]??null,'envsOpen':_0x51148b[_0x1dfb47(0xfc)]??null,'at':Date['now']()};}[_0x7e59cb(0x2d5)](){const _0x51de43=_0x7e59cb,_0x52bf9d=Date[_0x51de43(0x281)](),_0x49cc9a=this['okdb'][_0x51de43(0x13e)]||{},_0x7e8ac5=this[_0x51de43(0x25f)]||_0x51de43(0x12b);return{'nodeKey':this[_0x51de43(0xcf)],'processKey':this[_0x51de43(0xd1)],'instanceId':this['_instanceId'],'pid':process[_0x51de43(0x2de)],'startedAt':this[_0x51de43(0x199)],'instanceStartedAt':this[_0x51de43(0x121)],'ppid':typeof process['ppid']===_0x51de43(0x253)?process[_0x51de43(0x264)]:null,'host':_0x35c0b3['hostname'](),'supervisorKey':this['_supervisorKey']??null,'version':require$$6['version'],'kind':_0x7e8ac5,'role':{'engines':!!_0x49cc9a[_0x51de43(0xf8)],'processors':!!_0x49cc9a['processors'],'compaction':_0x49cc9a[_0x51de43(0x1b6)],'http':_0x49cc9a[_0x51de43(0x158)]},'listenAddr':this[_0x51de43(0x21f)]??null,'heartbeatAt':_0x52bf9d,'expiresAt':_0x52bf9d+_0x394c48,'caps':this['_caps'](_0x7e8ac5,_0x49cc9a),'lifecycle':{'state':_0x51de43(0x1fb),'desiredVersionApplied':null},'meta':{...this[_0x51de43(0x1cb)]},'processing':_0x49cc9a[_0x51de43(0xed)]?this[_0x51de43(0x24b)]():null,'engines':_0x49cc9a['engines']?[...this[_0x51de43(0x13d)][_0x51de43(0x2e4)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x51de43(0x20f)](),'writers':this[_0x51de43(0x1a2)]()};}['_collectWriterFacet'](){const _0x449a59=_0x7e59cb,_0x19a1c7={};try{for(const [_0x4f2ca3,_0x45bc35]of this[_0x449a59(0x13d)]['_envs']){try{const _0x4ef7a7=_0x45bc35[_0x449a59(0x2bc)]?.();if(!_0x4ef7a7)continue;if(!_0x4ef7a7[_0x449a59(0x24a)]&&!_0x4ef7a7[_0x449a59(0x21a)]&&!(_0x4ef7a7[_0x449a59(0x280)]??0x0)&&!_0x4ef7a7[_0x449a59(0xc3)])continue;_0x19a1c7[_0x4f2ca3]={'depth':_0x4ef7a7['depth'],'oldestPendingMs':_0x4ef7a7[_0x449a59(0x269)],'committed':_0x4ef7a7[_0x449a59(0x21a)],'commitsPerSec':_0x4ef7a7[_0x449a59(0x10b)],'commitP99Ms':_0x4ef7a7['commitP99Ms'],'parkedNow':_0x4ef7a7[_0x449a59(0x280)]??0x0,'draining':!!_0x4ef7a7['draining']};}catch{}}}catch{}return Object['keys'](_0x19a1c7)['length']?_0x19a1c7:null;}[_0x7e59cb(0x268)](){const _0x1d7833=_0x7e59cb,_0x81fdb7=process['pid'],_0x2b6666=Date[_0x1d7833(0x281)](),_0x24eaf9=_0x3a25da=>{const _0xa18a32=_0x1d7833;if(!_0x3a25da)return[];const _0x233253=[];try{for(const {id:_0x140d9b,entry:_0x474296}of _0x3a25da['list']()){if(_0x474296?.[_0xa18a32(0x2a6)]?.[_0xa18a32(0x2de)]!==_0x81fdb7)continue;const _0x3fe93c=_0x474296['updatedAt']??_0x474296[_0xa18a32(0x18c)]??0x0;if(_0x3fe93c+(_0x474296[_0xa18a32(0x289)]??0x0)<_0x2b6666)continue;_0x233253[_0xa18a32(0x242)](_0x140d9b);}}catch{}return _0x233253;},_0x907d44=_0x24eaf9(this[_0x1d7833(0x290)]('compact')),_0x4bfc23=_0x24eaf9(this[_0x1d7833(0x290)](_0x1d7833(0x120)));if(!_0x907d44['length']&&!_0x4bfc23[_0x1d7833(0x273)])return null;return{'compact':_0x907d44,'replicate':_0x4bfc23};}[_0x7e59cb(0x290)](_0x5141ce){const _0x17dd12=_0x7e59cb;if(!this[_0x17dd12(0x13d)]?.[_0x17dd12(0xfd)])return null;if(!this[_0x17dd12(0x1d4)])this['_singletonLocks']=new Map();let _0x8db4f7=this['_singletonLocks'][_0x17dd12(0x1bf)](_0x5141ce);if(!_0x8db4f7)try{_0x8db4f7=new _0x1c02f9(this['okdb'][_0x17dd12(0xfd)],{'namespace':_0x5141ce}),this[_0x17dd12(0x1d4)]['set'](_0x5141ce,_0x8db4f7);}catch{return null;}return _0x8db4f7;}['_buildProcessingFacet'](){const _0x1e5707=_0x7e59cb,_0x1b13f4=[];try{for(const [_0x11dd59,_0xa5ecd1]of this[_0x1e5707(0x13d)]['_envs']){if(_0x11dd59[_0x1e5707(0x165)]('~'))continue;for(const _0x4b7779 of _0xa5ecd1['processor'][_0x1e5707(0x27f)]())_0x1b13f4[_0x1e5707(0x242)]({..._0x4b7779,'env':_0x11dd59});}}catch{}return{'participate':this[_0x1e5707(0x13d)][_0x1e5707(0xed)]?.['_participate']??![],'processors':_0x1b13f4};}[_0x7e59cb(0x17e)](){const _0x518b49=_0x7e59cb;if(this['_desired'])return!![];const _0x14f847=this[_0x518b49(0x13d)][_0x518b49(0xfd)];if(!_0x14f847)return![];return this[_0x518b49(0x1d2)]=_0x14f847['openDB'](_0x5cc13b,{'dupSort':![]}),this[_0x518b49(0x1f0)]=_0x14f847['openDB'](_0x6ff6ec,{'dupSort':![]}),!![];}async[_0x7e59cb(0x1a8)](){const _0x27d5bd=_0x7e59cb;if(!this[_0x27d5bd(0x17e)]())return;const _0x349655=_0x27d5bd(0xff),_0x5025de=0x1,_0x2d8955=this[_0x27d5bd(0x1d2)][_0x27d5bd(0x1bf)](_0x349655)??0x0;if(_0x2d8955>=_0x5025de)return;const _0x6f575b=_0x5ab2b0=>{const _0x393496=_0x27d5bd;if(_0x5ab2b0===_0x393496(0xfa))return _0x393496(0x271);if(_0x5ab2b0===_0x393496(0x167))return'fanout';return _0x5ab2b0;};await this[_0x27d5bd(0x13d)][_0x27d5bd(0x28b)][_0x27d5bd(0x226)][_0x27d5bd(0x1df)](()=>{const _0x1934b7=_0x27d5bd;for(const _0xec656 of['procmode/',_0x1934b7(0xe6)]){for(const {key:_0x2f13f6,value:_0x853af}of this[_0x1934b7(0x1d2)][_0x1934b7(0x26a)]({'start':_0xec656,'end':_0xec656+'ÿ'})){if(typeof _0x2f13f6!==_0x1934b7(0x238)||!_0x2f13f6[_0x1934b7(0x165)](_0xec656))break;const _0xe2e3af=_0x6f575b(_0x853af[_0x1934b7(0x23c)]);if(_0xe2e3af!==_0x853af[_0x1934b7(0x23c)])this[_0x1934b7(0x1d2)][_0x1934b7(0x126)](_0x2f13f6,{..._0x853af,'mode':_0xe2e3af});}}this[_0x1934b7(0x1d2)][_0x1934b7(0x126)](_0x349655,_0x5025de);});}[_0x7e59cb(0x2a4)](){const _0x29160b=_0x7e59cb;return!!this[_0x29160b(0x1d2)];}[_0x7e59cb(0x24d)](_0x3b6676,_0xb2d767){const _0x54e065=_0x7e59cb;if(!this[_0x54e065(0x17e)]())return null;const _0x431016=_0x3b6676+'/'+_0xb2d767;return this['_refreshDesiredSnapshot'](),this[_0x54e065(0xd5)][_0x54e065(0x1bf)](_0x431016)??this['_desired']['get'](_0x431016)??null;}[_0x7e59cb(0x229)](){const _0x5cc0b8=_0x7e59cb;if(!_0x491529)return;try{this['okdb']['_systemEnv']?.['db']?.[_0x5cc0b8(0x287)]?.();}catch{}}async[_0x7e59cb(0x196)](_0x1a8bbd,_0x3bfcc7,_0x41d344){const _0x10d683=_0x7e59cb;if(!this[_0x10d683(0x17e)]())return null;const _0x292eda=_0x1a8bbd+'/'+_0x3bfcc7;this['_refreshDesiredSnapshot']();const _0x1a1c74=this['_desiredOverlay'][_0x10d683(0x1bf)](_0x292eda)??this[_0x10d683(0x1d2)][_0x10d683(0x1bf)](_0x292eda)??{'version':0x0},_0x50f3de=(_0x1a1c74[_0x10d683(0x210)]||0x0)+0x1,_0x561a39={..._0x1a1c74,..._0x41d344,'version':_0x50f3de,'updatedAt':Date['now']()};this[_0x10d683(0xd5)][_0x10d683(0x296)](_0x292eda,_0x561a39);try{await this['okdb'][_0x10d683(0x28b)]['_writer'][_0x10d683(0x1df)](()=>{const _0x2294c7=_0x10d683;this[_0x2294c7(0x1d2)][_0x2294c7(0x126)](_0x292eda,_0x561a39);});}finally{if(this[_0x10d683(0xd5)][_0x10d683(0x1bf)](_0x292eda)===_0x561a39)this[_0x10d683(0xd5)]['delete'](_0x292eda);}return _0x50f3de;}[_0x7e59cb(0x219)](_0x29f231){const _0x411172=_0x7e59cb;if(!this[_0x411172(0x17e)]())return[];this[_0x411172(0x229)]();const _0x3009a9=_0x29f231+'/',_0x44f02e=[];for(const {key:_0x43fd19,value:_0x401c7f}of this[_0x411172(0x1d2)]['getRange']({'start':_0x3009a9,'end':_0x3009a9+'ÿ'})){if(typeof _0x43fd19!=='string'||!_0x43fd19[_0x411172(0x165)](_0x3009a9))break;_0x44f02e[_0x411172(0x242)]({'key':_0x43fd19[_0x411172(0x1e0)](_0x3009a9['length']),'value':_0x401c7f});}return _0x44f02e;}[_0x7e59cb(0x262)](_0x109f6a){const _0x1d5139=_0x7e59cb;if(!this[_0x1d5139(0x17e)]())return null;return this[_0x1d5139(0x1f0)]['get'](_0x109f6a)??null;}async[_0x7e59cb(0x144)](_0x31df6d,_0x803b8a,_0x18dd22={}){const _0x4b3a5e=_0x7e59cb;if(!this['_ensureDesired']())return null;let _0x595dc5;return await this[_0x4b3a5e(0x13d)][_0x4b3a5e(0x28b)][_0x4b3a5e(0x226)][_0x4b3a5e(0x1df)](()=>{const _0x1f58bc=_0x4b3a5e,_0x329a7f=this[_0x1f58bc(0x1f0)][_0x1f58bc(0x1bf)](_0x31df6d)||{'epoch':0x0};_0x595dc5=(_0x329a7f[_0x1f58bc(0x1e1)]||0x0)+0x1,this[_0x1f58bc(0x1f0)][_0x1f58bc(0x126)](_0x31df6d,{..._0x329a7f,..._0x18dd22,'cmd':_0x803b8a,'epoch':_0x595dc5,'updatedAt':Date[_0x1f58bc(0x281)]()});}),_0x595dc5;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x573e35,'nodeKey':_0x467e6e,'logicalKey':_0x3a0ecf,'slotKey':_0x300894,'PROCESS_ENV':_0x532f67,'NODE_TYPE':_0x1a2a79},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x2237e1=_0x22d7b4;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x46878c=require$$0$4,{EVENTS:_0x3c1f43,CHANGE_ACTIONS:_0xe917bb}=requireOkdbEnums(),{LOOP:_0x547220}=requireOkdbLoopMonitor(),_0x589d40=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x38eed1=0x5,_0x267883=0x2710;class _0x4c07d9 extends _0x46878c{constructor(_0x513e7c,_0x4d44e2={}){const _0x51eb9f=_0x23ad;super(),this[_0x51eb9f(0x13d)]=_0x513e7c,this[_0x51eb9f(0x2b1)]=_0x4d44e2['quantum']??_0x589d40,this[_0x51eb9f(0x16d)]=_0x4d44e2[_0x51eb9f(0x1ea)]??_0x38eed1,this[_0x51eb9f(0x2c3)]=_0x4d44e2[_0x51eb9f(0x179)]??_0x267883,this['_started']=![],this[_0x51eb9f(0x1a3)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x51eb9f(0x1a0)]=null,this[_0x51eb9f(0x171)]=![],this[_0x51eb9f(0x209)]=new Set(),this['_onItem']=_0x59af0d=>this[_0x51eb9f(0xd0)](_0x59af0d),this['_onPoke']=_0x14d5af=>this[_0x51eb9f(0x135)](_0x14d5af),this[_0x51eb9f(0x1bc)]=()=>this[_0x51eb9f(0x298)]();}['start'](){const _0x42b110=_0x23ad;if(this['_started'])return;this[_0x42b110(0x172)]=!![];for(const [_0x4391fb,_0x1e5946]of this[_0x42b110(0x13d)][_0x42b110(0x161)]){if(_0x4391fb[_0x42b110(0x165)]('~'))continue;try{_0x1e5946[_0x42b110(0x1d1)]();}catch{}}for(const [_0xadff12,_0x1b199c]of this[_0x42b110(0x13d)]['_envs']){if(_0xadff12[_0x42b110(0x165)]('~'))continue;try{this[_0x42b110(0x23d)][_0x42b110(0x296)](_0xadff12,_0x1b199c[_0x42b110(0x21d)]()||0x0);}catch{}}const {events:_0x40d243}=this[_0x42b110(0x13d)];_0x40d243['on'](_0x3c1f43[_0x42b110(0x2f0)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x142)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x2a3)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x1ab)],this[_0x42b110(0x236)]),_0x40d243[_0x42b110(0x194)](_0x3c1f43[_0x42b110(0x187)],this[_0x42b110(0x1bc)]);}['stop'](){const _0x594938=_0x23ad;if(!this['_started'])return;this[_0x594938(0x172)]=![];const {events:_0x5efc6c}=this['okdb'];_0x5efc6c[_0x594938(0x232)](_0x3c1f43['ITEM_CREATE'],this['_onItem']),_0x5efc6c[_0x594938(0x232)](_0x3c1f43[_0x594938(0x142)],this[_0x594938(0x1e3)]),_0x5efc6c['off'](_0x3c1f43[_0x594938(0x2a3)],this[_0x594938(0x1e3)]),_0x5efc6c[_0x594938(0x232)](_0x3c1f43[_0x594938(0x1ab)],this['_onPoke']);try{_0x5efc6c['off'](_0x3c1f43[_0x594938(0x187)],this[_0x594938(0x1bc)]);}catch{}this[_0x594938(0x1a0)]&&(clearTimeout(this[_0x594938(0x1a0)]),this[_0x594938(0x1a0)]=null),this[_0x594938(0x1ff)][_0x594938(0x157)](),this[_0x594938(0x1a3)]['clear'](),this['_baselines'][_0x594938(0x157)](),this[_0x594938(0x209)][_0x594938(0x157)]();}[_0x2237e1(0x1d3)](_0x5ee511,_0x45e978,_0x1bbad9,_0x45c163){return _0x5ee511+'\x00'+_0x45e978+'\x00'+_0x1bbad9+'\x00'+_0x45c163;}[_0x2237e1(0x212)](_0x30e4bc,_0xd30508,_0x33ed93,_0x4e82b1){const _0x4de95f=_0x2237e1,_0x15b285=this['_dedupeKey'](_0x30e4bc,_0xd30508,_0x33ed93,_0x4e82b1);if(this[_0x4de95f(0x209)][_0x4de95f(0x254)](_0x15b285))return![];this[_0x4de95f(0x209)][_0x4de95f(0x145)](_0x15b285);if(this[_0x4de95f(0x209)][_0x4de95f(0x1f9)]>this['_dedupeMax']){const _0x402263=this[_0x4de95f(0x209)]['values']()[_0x4de95f(0x113)]()[_0x4de95f(0x10c)];this[_0x4de95f(0x209)]['delete'](_0x402263);}return!![];}[_0x2237e1(0xd0)](_0x553fee){const _0x2e2eff=_0x2237e1;if(!this[_0x2e2eff(0x172)]||!_0x553fee)return;const {env:_0xca1fee,type:_0x4cdb89,key:_0x1b0693,clock:_0x14243e,origin:_0xf2c78e,action:_0x5af85a,newValue:_0x308da8,oldValue:_0x3df825}=_0x553fee;if(_0xca1fee==null||_0x4cdb89==null||_0x1b0693==null)return;if(typeof _0xca1fee===_0x2e2eff(0x238)&&_0xca1fee[_0x2e2eff(0x165)]('~'))return;if(typeof _0x4cdb89==='string'&&_0x4cdb89[_0x2e2eff(0x165)]('~'))return;if(!this[_0x2e2eff(0x212)](_0xca1fee,_0x4cdb89,_0x1b0693,_0x14243e))return;const _0x5c1c15=_0x5af85a===_0xe917bb[_0x2e2eff(0xe5)]?_0x2e2eff(0x17d):_0x2e2eff(0x126);this[_0x2e2eff(0x11f)]('change',{'env':_0xca1fee,'type':_0x4cdb89,'key':_0x1b0693,'op':_0x5c1c15,'clock':_0x14243e,'origin':_0xf2c78e,'value':_0x5c1c15===_0x2e2eff(0x17d)?null:_0x308da8,'prevValue':_0x3df825});}[_0x2237e1(0x135)](_0xa65a2f){const _0x5bd67f=_0x2237e1;if(!this[_0x5bd67f(0x172)])return;if(!_0xa65a2f||typeof _0xa65a2f[_0x5bd67f(0x27a)]!==_0x5bd67f(0x238)||typeof _0xa65a2f[_0x5bd67f(0x243)]!=='string')return;const {env:_0x22fe64,type:_0x34c1a1}=_0xa65a2f;if(_0x22fe64[_0x5bd67f(0x165)]('~')||_0x34c1a1['startsWith']('~'))return;this[_0x5bd67f(0x1ff)]['set'](_0x22fe64+'\x00'+_0x34c1a1,{'env':_0x22fe64,'type':_0x34c1a1}),this[_0x5bd67f(0x2d9)]();}['_scheduleFlush'](){const _0x32aa3a=_0x2237e1;if(this[_0x32aa3a(0x1a0)])return;const _0x41aa4e=()=>{const _0x1e0bf8=_0x32aa3a;this['_flushTimer']=null,this[_0x1e0bf8(0x122)]()[_0x1e0bf8(0x2cd)](()=>{});};this[_0x32aa3a(0x1a0)]=setTimeout(_0x41aa4e,this['_flushDebounce']>0x0?this['_flushDebounce']:0x0);}async['_drain'](){const _0x3f7775=_0x2237e1;if(this[_0x3f7775(0x171)]){this['_scheduleFlush']();return;}this['_draining']=!![];try{const _0x8212ae=[...this['_pending']['values']()];this['_pending'][_0x3f7775(0x157)]();let _0x492705=![];for(const {env:_0xd009f0,type:_0x23a2f8}of _0x8212ae){try{const _0x4c688a=await this[_0x3f7775(0x1fc)](_0xd009f0,_0x23a2f8);if(_0x4c688a)_0x492705=!![];}catch{this[_0x3f7775(0x1ff)]['set'](_0xd009f0+'\x00'+_0x23a2f8,{'env':_0xd009f0,'type':_0x23a2f8}),_0x492705=!![];}}if(_0x492705||this[_0x3f7775(0x1ff)][_0x3f7775(0x1f9)]>0x0)this[_0x3f7775(0x2d9)]();}finally{this[_0x3f7775(0x171)]=![];}}async[_0x2237e1(0x1fc)](_0x5d46ca,_0x8b19dc){const _0x3ea0b2=_0x2237e1,_0x164be8=await this[_0x3ea0b2(0x13d)][_0x3ea0b2(0x2bd)](_0x5d46ca),_0x5dd470=_0x5d46ca+'\x00'+_0x8b19dc;!this['_cursors']['has'](_0x5dd470)&&(!this['_baselines'][_0x3ea0b2(0x254)](_0x5d46ca)&&(_0x164be8[_0x3ea0b2(0x1d1)](),this[_0x3ea0b2(0x23d)]['set'](_0x5d46ca,_0x164be8[_0x3ea0b2(0x21d)]()||0x0)),this['_cursors'][_0x3ea0b2(0x296)](_0x5dd470,this[_0x3ea0b2(0x23d)][_0x3ea0b2(0x1bf)](_0x5d46ca)));const _0x5679b0=this[_0x3ea0b2(0x1a3)][_0x3ea0b2(0x1bf)](_0x5dd470),_0x24b1fa=_0x164be8[_0x3ea0b2(0x21d)](_0x8b19dc)||0x0;if(_0x24b1fa<=_0x5679b0)return![];const _0x28c18c=_0x5679b0+this[_0x3ea0b2(0x2b1)],_0x169ebf=Math[_0x3ea0b2(0x249)](_0x24b1fa,_0x28c18c),_0x550810=_0x547220[_0x3ea0b2(0x2df)]?_0x547220['now']():0x0,_0x179b52=Array[_0x3ea0b2(0xc8)](_0x164be8['getChanges'](_0x8b19dc,_0x5679b0+0x1,_0x169ebf));let _0x5524b0=_0x5679b0;for(const _0x2deac0 of _0x179b52){const {clock:_0x4a6d9d,key:_0x106c56,action:_0x46298e,origin:_0x45b98e}=_0x2deac0;if(_0x4a6d9d>_0x5524b0)_0x5524b0=_0x4a6d9d;if(_0x106c56==null)continue;if(!this['_markSeen'](_0x5d46ca,_0x8b19dc,_0x106c56,_0x4a6d9d))continue;let _0x461c64,_0xe6519d;if(_0x46298e===_0xe917bb[_0x3ea0b2(0xe5)])_0x461c64=_0x3ea0b2(0x17d),_0xe6519d=null;else{const _0x1fa4dd=_0x164be8[_0x3ea0b2(0x1bf)](_0x8b19dc,_0x106c56);_0x1fa4dd==null?(_0x461c64=_0x3ea0b2(0x17d),_0xe6519d=null):(_0x461c64=_0x3ea0b2(0x126),_0xe6519d=_0x1fa4dd);}this[_0x3ea0b2(0x11f)](_0x3ea0b2(0x15e),{'env':_0x5d46ca,'type':_0x8b19dc,'key':_0x106c56,'op':_0x461c64,'clock':_0x4a6d9d,'origin':_0x45b98e,'value':_0xe6519d});}if(_0x547220[_0x3ea0b2(0x2df)])_0x547220[_0x3ea0b2(0x176)]('feed:'+_0x5d46ca+':'+_0x8b19dc,_0x547220[_0x3ea0b2(0x281)]()-_0x550810,'n='+_0x179b52[_0x3ea0b2(0x273)]);return this[_0x3ea0b2(0x1a3)][_0x3ea0b2(0x296)](_0x5dd470,Math[_0x3ea0b2(0x213)](_0x5524b0,_0x169ebf)),_0x164be8['getClock'](_0x8b19dc)>_0x169ebf;}[_0x2237e1(0x285)](){const _0x282225=_0x2237e1;return{'started':this[_0x282225(0x172)],'quantum':this[_0x282225(0x2b1)],'flushDebounce':this[_0x282225(0x16d)],'cursors':Object[_0x282225(0x2c4)]([...this['_cursors'][_0x282225(0x2e5)]()]['map'](([_0x427512,_0x110658])=>[_0x427512[_0x282225(0x235)]('\x00',':'),_0x110658])),'pending':this[_0x282225(0x1ff)]['size'],'seen':this[_0x282225(0x209)]['size']};}}return _0x4c07d9[_0x2237e1(0x1f5)]=_0x589d40,okdbChangefeed={'OKDBChangefeed':_0x4c07d9},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2ee492=_0x22d7b4;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x50b153=require$$1$1,_0x17a294=require$$1,{EVENTS:_0x202811}=requireOkdbEnums(),_0x543808=require$$0$3,{slotKey:_0xbe14c2}=requireOkdbProcessRegistry(),_0x38877c=0xfa,_0x4320c9=0xfa0,_0x26ff64=0x5,_0x5cfb6e=0x2710,_0x5d24e5=0xbb8,_0x2f0390=0x7d0,_0x563ecb='__okdbCluster',_0x4362bb=_0x2ee492(0x24f),_0x2b1558=_0x2ee492(0x2c7),_0x50a606=_0x2ee492(0x14b),_0x2624cb=[_0x202811[_0x2ee492(0x1e8)],_0x202811[_0x2ee492(0x123)],_0x202811['FTS_DROP'],_0x202811['FTS_RESET'],_0x202811[_0x2ee492(0x11a)],_0x202811[_0x2ee492(0x133)],_0x202811[_0x2ee492(0x2f3)],_0x202811[_0x2ee492(0xcd)],_0x2ee492(0x201),_0x2ee492(0x1af),_0x2ee492(0x1c1),'processor:paused',_0x2ee492(0xc4),'processor:retry'],_0x48cbbd=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x1f51a0({workers:_0x534e7e,makeOkdb:_0x56bbe7,port:_0x35cb1e,primaryOkdb:_0x21d591,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0xa1b305=_0x2ee492;if(_0x50b153[_0xa1b305(0x118)])return childEntry&&_0x50b153[_0xa1b305(0x2d6)]({'exec':_0x17a294[_0xa1b305(0x265)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x4824e4=_0xa1b305,_0x338e91=[];for(let _0x2c09f8=0x0;_0x2c09f8<process['execArgv'][_0x4824e4(0x273)];_0x2c09f8++){const _0x1bed64=process['execArgv'][_0x2c09f8];if(_0x1bed64[_0x4824e4(0x165)](_0x4824e4(0x109))||_0x1bed64[_0x4824e4(0x165)]('--watch')||_0x1bed64[_0x4824e4(0x165)]('--inspect'))continue;if(_0x1bed64==='-e'||_0x1bed64==='--eval'||_0x1bed64==='-p'||_0x1bed64===_0x4824e4(0x10a)){_0x2c09f8++;continue;}_0x338e91[_0x4824e4(0x242)](_0x1bed64);}return _0x338e91;})())}),_0x23b690({'workers':_0x534e7e,'port':_0x35cb1e,'primaryOkdb':_0x21d591,'workerEnv':workerEnv});return _0x1bd1dd({'makeOkdb':_0x56bbe7,'port':_0x35cb1e});}function _0x23b690({workers:_0x3eed5c,port:_0x489e36,primaryOkdb:_0x36f1b3,workerEnv:_0x112e99}){const _0x491653=_0x2ee492,_0x30ef9f=new Map(),_0x1852ab=new Map();let _0x2e926e=![];const _0x364111=_0x384346=>_0x384346?.['__okdbSlot'],_0x46acfd=_0x30db62=>{const _0x3f5695=_0x23ad,_0xed62e3=_0x50b153['fork']({...process.env,..._0x112e99||{},'OKDB_CLUSTER_SLOT':String(_0x30db62)});return _0xed62e3['__okdbSlot']=_0x30db62,_0x30ef9f[_0x3f5695(0x296)](_0xed62e3[_0x3f5695(0x2d3)][_0x3f5695(0x2de)],{'worker':_0xed62e3,'startedAt':Date[_0x3f5695(0x281)](),'slot':_0x30db62}),_0xed62e3['on'](_0x3f5695(0x231),_0x5cf2c7=>{const _0x15e09a=_0x3f5695;console[_0x15e09a(0x2c7)]('[okdb-cluster]\x20worker\x20pid='+_0xed62e3['process'][_0x15e09a(0x2de)]+_0x15e09a(0xc1)+(_0x5cf2c7?.[_0x15e09a(0xf9)]??_0x5cf2c7));}),_0xed62e3['on'](_0x3f5695(0x1c0),()=>_0x37d404()),_0xed62e3;},_0x3017ce=_0x5d6b5e=>{const _0x5eb18e=_0x23ad;for(const {worker:_0x539718}of _0x30ef9f['values']()){if(_0x539718[_0x5eb18e(0x163)]()||!_0x539718[_0x5eb18e(0x2ec)]())continue;try{_0x539718[_0x5eb18e(0x1dc)](_0x5d6b5e);}catch{}}};_0x36f1b3?.['_activateProcesses']?.({'kind':_0x491653(0x237),'listenAddr':':'+_0x489e36})[_0x491653(0x2cd)](()=>{}),_0x36f1b3?.['processes']?.[_0x491653(0x2e3)]?.({'workersConfigured':_0x3eed5c});const _0xa9dd90={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x37d404=()=>{const _0x24cc38=_0x491653,_0x490b96=_0x36f1b3?.[_0x24cc38(0x20e)];if(!_0x490b96||!_0x490b96['_isWriter'])return;const _0x131e40=_0x490b96[_0x24cc38(0x1e2)];for(const {worker:_0x313211,startedAt:_0x4a7723,slot:_0xab1e06,stats:_0x1e2dca,processing:_0x62a7cb}of _0x30ef9f['values']()){if(_0x313211[_0x24cc38(0x163)]())continue;const _0x4c0f90=_0x490b96[_0x24cc38(0x2a4)]?.()&&_0x490b96['getDesired'](_0x24cc38(0xef),_0x4d5c87(_0xab1e06))?.['decommission']===!![];_0x490b96[_0x24cc38(0x124)]({'pid':_0x313211[_0x24cc38(0x2d3)]['pid'],'startedAt':_0x4a7723,'kind':_0x24cc38(0x13a),'supervisorKey':_0x131e40,'slot':_0xab1e06,'slotKey':_0x4d5c87(_0xab1e06),'role':_0xa9dd90,'listenAddr':':'+_0x489e36,'lifecycle':_0x4c0f90?_0x24cc38(0x21b):_0x24cc38(0x1fb),'processing':_0x62a7cb??null,'stats':_0x1e2dca??null})['catch'](()=>{});}},_0x4d5c87=_0x40f449=>_0xbe14c2(_0x491653(0x2c2)+_0x489e36,_0x40f449),_0x4453c2=_0x360a79=>{const _0x38d75a=_0x491653,_0x3314ce=_0x36f1b3?.[_0x38d75a(0x20e)];if(!_0x3314ce?.[_0x38d75a(0x2a4)]?.())return![];return _0x3314ce[_0x38d75a(0x24d)]('slot',_0x4d5c87(_0x360a79))?.[_0x38d75a(0x29b)]===!![];};for(let _0x12adf8=0x0;_0x12adf8<_0x3eed5c;_0x12adf8++){const _0x321926=_0x4453c2(_0x12adf8);_0x1852ab[_0x491653(0x296)](_0x12adf8,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x321926,'respawnTimer':null}),_0x321926?console['log']('[okdb-cluster]\x20slot='+_0x12adf8+_0x491653(0x1bd)):_0x46acfd(_0x12adf8);}const _0x2ba3ba=()=>{const _0x1b4c15=_0x491653,_0x445889=_0x36f1b3?.[_0x1b4c15(0x20e)];if(!_0x445889?.[_0x1b4c15(0x2d8)]||!_0x445889[_0x1b4c15(0x2a4)]?.())return;for(const [_0x1acd05,_0x3d1089]of _0x1852ab[_0x1b4c15(0x2e5)]()){const _0x45c2c4=_0x445889[_0x1b4c15(0x24d)]('slot',_0x4d5c87(_0x1acd05)),_0x522f20=_0x45c2c4?.['decommission']===!![],_0x2983c8=_0x45c2c4?.[_0x1b4c15(0x15b)]===!![];if(_0x522f20&&!_0x3d1089[_0x1b4c15(0x105)]){_0x3d1089[_0x1b4c15(0x105)]=!![];_0x3d1089[_0x1b4c15(0x26e)]&&(clearTimeout(_0x3d1089[_0x1b4c15(0x26e)]),_0x3d1089[_0x1b4c15(0x26e)]=null);for(const {worker:_0x4b7bf0}of _0x30ef9f['values']()){if(_0x364111(_0x4b7bf0)!==_0x1acd05||_0x4b7bf0['isDead']())continue;try{if(_0x2983c8)_0x4b7bf0[_0x1b4c15(0x2d3)]['kill']('SIGKILL');else _0x4b7bf0['isConnected']()&&_0x4b7bf0[_0x1b4c15(0x1b1)]();}catch{}}console['log'](_0x1b4c15(0x276)+(_0x2983c8?_0x1b4c15(0xec):'decommissioned')+_0x1b4c15(0xd9)+_0x1acd05+_0x1b4c15(0x284));}else{if(!_0x522f20&&_0x3d1089[_0x1b4c15(0x105)]&&_0x45c2c4){_0x3d1089[_0x1b4c15(0x105)]=![],_0x3d1089[_0x1b4c15(0xd6)]=[],_0x3d1089[_0x1b4c15(0x14a)]=0x0;const _0x448050=[..._0x30ef9f[_0x1b4c15(0x1dd)]()][_0x1b4c15(0x160)](({worker:_0x1f42ef})=>_0x364111(_0x1f42ef)===_0x1acd05&&!_0x1f42ef[_0x1b4c15(0x163)]());!_0x448050&&!_0x2e926e&&(_0x46acfd(_0x1acd05),console['log'](_0x1b4c15(0x11d)+_0x1acd05));}}}},_0x2805d7=()=>{try{_0x2ba3ba();}catch{}};_0x36f1b3?.[_0x491653(0x139)]?.['on']?.(_0x202811[_0x491653(0xc6)],_0x2805d7);const _0x6c7c39=[];if(_0x36f1b3?.[_0x491653(0x139)]?.['on'])for(const _0x22f1b3 of _0x2624cb){const _0x338b7e=_0xeed357=>{_0x3017ce({[_0x563ecb]:_0x4362bb,'event':_0x22f1b3,'data':_0xeed357??{}});};_0x36f1b3[_0x491653(0x139)]['on'](_0x22f1b3,_0x338b7e),_0x6c7c39[_0x491653(0x242)]({'event':_0x22f1b3,'handler':_0x338b7e});}const _0x34b625=setInterval(()=>{_0x2ba3ba(),_0x37d404();},_0x48cbbd);_0x34b625[_0x491653(0x1b8)]?.();const _0x325bd8=(_0x55ca48,_0xbb7c1a)=>{const _0x4df44b=_0x491653;if(!_0xbb7c1a||typeof _0xbb7c1a!=='object'||_0xbb7c1a[_0x563ecb]!==_0x2b1558)return;if(!_0x36f1b3?.[_0x4df44b(0x2c7)]?.[_0x4df44b(0x2ea)])return;const _0x8f67f8=_0xbb7c1a[_0x4df44b(0x16f)]||{};_0x36f1b3['log'][_0x4df44b(0x2ea)]({..._0x8f67f8,'msg':'[w'+_0xbb7c1a[_0x4df44b(0xef)]+']\x20'+(_0x8f67f8['msg']??''),'meta':{..._0x8f67f8[_0x4df44b(0x14e)]||{},'worker':_0xbb7c1a[_0x4df44b(0xef)],'workerPid':_0xbb7c1a[_0x4df44b(0x2de)]}});};_0x50b153['on'](_0x491653(0xf9),_0x325bd8);const _0x93e07b=(_0x21dc4a,_0xc592de)=>{const _0x42dd4f=_0x491653;if(!_0xc592de||typeof _0xc592de!==_0x42dd4f(0x29e)||_0xc592de[_0x563ecb]!==_0x50a606)return;const _0xb269d8=_0x30ef9f[_0x42dd4f(0x1bf)](_0x21dc4a['process'][_0x42dd4f(0x2de)]);if(_0xb269d8){_0xb269d8[_0x42dd4f(0x14b)]={..._0xc592de['stats'],'at':Date[_0x42dd4f(0x281)]()};if(_0xc592de[_0x42dd4f(0x1bb)]!==undefined)_0xb269d8[_0x42dd4f(0x1bb)]=_0xc592de[_0x42dd4f(0x1bb)];}};_0x50b153['on'](_0x491653(0xf9),_0x93e07b),_0x50b153['on'](_0x491653(0x25a),(_0x5223f1,_0x4cf79a,_0x454545)=>{const _0x477e58=_0x491653,_0x2b2b7b=_0x5223f1[_0x477e58(0x2d3)][_0x477e58(0x2de)],_0x4b1f22=_0x364111(_0x5223f1),_0x1705e1=_0x30ef9f['get'](_0x2b2b7b);if(_0x1705e1&&_0x36f1b3?.['processes'])_0x36f1b3[_0x477e58(0x20e)][_0x477e58(0x2e6)](_0x2b2b7b+':'+_0x1705e1[_0x477e58(0x148)])[_0x477e58(0x2cd)](()=>{});_0x30ef9f[_0x477e58(0x102)](_0x2b2b7b),console[_0x477e58(0x2c7)](_0x477e58(0x1f4)+_0x2b2b7b+_0x477e58(0xdb)+(_0x4b1f22??'?')+_0x477e58(0x143)+(_0x477e58(0x1eb)+_0x4cf79a+',\x20signal='+(_0x454545??_0x477e58(0x206))+_0x477e58(0x279)+_0x30ef9f[_0x477e58(0x1f9)]+_0x477e58(0x2a2))),_0x37d404();if(_0x2e926e||_0x4b1f22==null)return;const _0x3f56a0=_0x1852ab[_0x477e58(0x1bf)](_0x4b1f22);if(!_0x3f56a0||_0x3f56a0[_0x477e58(0x105)])return;const _0x7b6bf8=Date['now']();_0x3f56a0[_0x477e58(0xd6)]['push'](_0x7b6bf8),_0x3f56a0[_0x477e58(0xd6)]=_0x3f56a0[_0x477e58(0xd6)]['filter'](_0x11ee84=>_0x7b6bf8-_0x11ee84<=_0x5cfb6e);if(_0x3f56a0['deaths'][_0x477e58(0x273)]>=_0x26ff64){_0x3f56a0[_0x477e58(0x105)]=!![],console[_0x477e58(0x231)](_0x477e58(0xe9)+_0x4b1f22+_0x477e58(0x2cb)+_0x3f56a0[_0x477e58(0xd6)][_0x477e58(0x273)]+_0x477e58(0x182)+(_0x5cfb6e+_0x477e58(0x2c5)+_0x30ef9f[_0x477e58(0x1f9)]+_0x477e58(0x141)));return;}_0x3f56a0[_0x477e58(0x14a)]++;const _0xe250db=Math[_0x477e58(0x249)](_0x4320c9,_0x38877c*0x2**(_0x3f56a0[_0x477e58(0x14a)]-0x1));console[_0x477e58(0x2c7)](_0x477e58(0x2af)+_0x4b1f22+'\x20in\x20'+_0xe250db+_0x477e58(0x119)+_0x3f56a0[_0x477e58(0x14a)]+')'),_0x3f56a0[_0x477e58(0x26e)]=setTimeout(()=>{const _0x5bf880=_0x477e58;_0x3f56a0[_0x5bf880(0x26e)]=null;if(_0x2e926e||_0x3f56a0[_0x5bf880(0x105)])return;const _0x141b2c=_0x46acfd(_0x4b1f22);_0x141b2c[_0x5bf880(0x194)](_0x5bf880(0x1b5),()=>{const _0x408ce7=_0x5bf880;if(_0x1852ab[_0x408ce7(0x1bf)](_0x4b1f22)===_0x3f56a0)_0x3f56a0[_0x408ce7(0x14a)]=0x0;});},_0xe250db),_0x3f56a0[_0x477e58(0x26e)][_0x477e58(0x1b8)]?.();});const _0x2cadae=[..._0x30ef9f[_0x491653(0x216)]()];console[_0x491653(0x2c7)]('[okdb-cluster]\x20primary\x20pid='+process[_0x491653(0x2de)]+_0x491653(0x2dd)+_0x3eed5c+_0x491653(0xc2)+_0x489e36+':\x20'+('['+_0x2cadae['join'](',\x20')+']'));const _0x3d7efc={'_isClusterController':!![],'port':_0x489e36,'primaryOkdb':_0x36f1b3??null,'status'(){const _0x87350c=_0x491653;return{'clustered':!![],'primaryPid':process[_0x87350c(0x2de)],'port':_0x489e36,'primaryRole':_0x36f1b3?.['role']??null,'processorPid':null,'supervisorPid':process[_0x87350c(0x2de)],'workers':[..._0x30ef9f[_0x87350c(0x1dd)]()][_0x87350c(0x188)](({worker:_0x41ab3c})=>({'pid':_0x41ab3c[_0x87350c(0x2d3)][_0x87350c(0x2de)],'id':_0x41ab3c['id'],'dead':_0x41ab3c[_0x87350c(0x163)]()}))};},async 'close'(){const _0x2eced8=_0x491653;_0x2e926e=!![];for(const _0x8063dc of _0x1852ab[_0x2eced8(0x1dd)]()){_0x8063dc[_0x2eced8(0x105)]=!![],_0x8063dc[_0x2eced8(0x26e)]&&(clearTimeout(_0x8063dc[_0x2eced8(0x26e)]),_0x8063dc[_0x2eced8(0x26e)]=null);}clearInterval(_0x34b625),_0x50b153['off'](_0x2eced8(0xf9),_0x325bd8),_0x50b153[_0x2eced8(0x232)]('message',_0x93e07b),_0x36f1b3?.[_0x2eced8(0x139)]?.[_0x2eced8(0x232)]?.(_0x202811[_0x2eced8(0xc6)],_0x2805d7);if(_0x36f1b3?.[_0x2eced8(0x139)]?.[_0x2eced8(0x232)])for(const {event:_0x430a41,handler:_0x4f86c0}of _0x6c7c39){try{_0x36f1b3[_0x2eced8(0x139)][_0x2eced8(0x232)](_0x430a41,_0x4f86c0);}catch{}}_0x6c7c39[_0x2eced8(0x273)]=0x0;const _0x18ebe0=[..._0x30ef9f['values']()][_0x2eced8(0x188)](({worker:_0x214a1c})=>_0x214a1c);if(_0x18ebe0['length']===0x0)return;await Promise[_0x2eced8(0x29a)](_0x18ebe0[_0x2eced8(0x188)](_0x4b1a65=>new Promise(_0x47f0e8=>{const _0x1921ad=_0x2eced8;if(_0x4b1a65['isDead']()){_0x47f0e8();return;}let _0xdba262=![];const _0x10c8fc=()=>{if(_0xdba262)return;_0xdba262=!![];if(_0x127826)clearTimeout(_0x127826);_0x47f0e8();};_0x4b1a65[_0x1921ad(0x194)](_0x1921ad(0x25a),_0x10c8fc);const _0x127826=setTimeout(()=>{const _0x127cd5=_0x1921ad;try{_0x4b1a65[_0x127cd5(0x2d3)][_0x127cd5(0x15b)]();}catch{}},_0x5d24e5+0x1f4);_0x127826[_0x1921ad(0x1b8)]?.();try{_0x4b1a65[_0x1921ad(0x1b1)]();}catch{try{_0x4b1a65[_0x1921ad(0x2d3)][_0x1921ad(0x15b)]();}catch{}}})));}};return _0x3d7efc;}async function _0x1bd1dd({makeOkdb:_0x16ea72,port:_0x937de7}){const _0x5d1e9c=_0x2ee492,_0x25df7e=await _0x16ea72();return _0x36d0ab(_0x25df7e),_0x25df7e[_0x5d1e9c(0x158)][_0x5d1e9c(0x19c)](_0x937de7);}function _0x36d0ab(_0x3c68d4){const _0x3303d3=_0x2ee492;if(!_0x3c68d4||_0x3c68d4[_0x3303d3(0x2b2)])return;_0x3c68d4['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x3103ff}=requireOkdbChangefeed(),_0x231bb3=_0x3c68d4['_adminRelay'];if(_0x231bb3&&typeof _0x231bb3[_0x3303d3(0xe3)]===_0x3303d3(0x156)){const _0x1b5e8f=new _0x3103ff(_0x3c68d4);_0x1b5e8f[_0x3303d3(0x2b7)](),_0x231bb3[_0x3303d3(0xe3)](_0x1b5e8f),_0x3c68d4[_0x3303d3(0x2d2)]=_0x1b5e8f;}}catch(_0x3fd195){_0x3c68d4[_0x3303d3(0x2c7)]?.[_0x3303d3(0x1ce)]?.(_0x3303d3(0x1cc)+(_0x3fd195?.[_0x3303d3(0xf9)]??_0x3fd195),{'feature':_0x3303d3(0xf1)});}const _0xbd5b7d=_0x428851=>{const _0x403a62=_0x3303d3;if(!_0x428851||typeof _0x428851!==_0x403a62(0x29e)||_0x428851[_0x563ecb]==null)return;if(_0x428851[_0x563ecb]===_0x4362bb)try{_0x3c68d4[_0x403a62(0xd7)]?.[_0x403a62(0x294)]?.(_0x428851[_0x403a62(0x2c1)],_0x428851[_0x403a62(0x1c8)]);}catch{}};process['on']('message',_0xbd5b7d),_0x3c68d4[_0x3303d3(0x22a)]=_0xbd5b7d;{let _0x34336f=process[_0x3303d3(0x136)](),_0x5b46d8=Date[_0x3303d3(0x281)]();const _0x1bf3fe=()=>{const _0xa4b108=_0x3303d3;if(typeof process[_0xa4b108(0x1dc)]!==_0xa4b108(0x156)||!process[_0xa4b108(0xc5)])return;const _0x1b07d0=Date[_0xa4b108(0x281)](),_0x473b41=process['cpuUsage'](),_0x10f65b=(_0x1b07d0-_0x5b46d8)*0x3e8,_0x4ac6e1=_0x473b41['user']-_0x34336f[_0xa4b108(0x151)]+(_0x473b41[_0xa4b108(0x22c)]-_0x34336f['system']),_0x4e7215=_0x10f65b>0x0?Math[_0xa4b108(0x249)](0x64,Math[_0xa4b108(0x1b7)](_0x4ac6e1/(_0x10f65b*(_0x543808[_0xa4b108(0x18d)]()[_0xa4b108(0x273)]||0x1))*0x64)):0x0;_0x34336f=_0x473b41,_0x5b46d8=_0x1b07d0;const _0x27c962=process[_0xa4b108(0x295)]();let _0x4f2bd9=null;try{_0x4f2bd9=_0x3c68d4[_0xa4b108(0x2b8)]?.[_0xa4b108(0xed)]?_0x3c68d4['processes']?.[_0xa4b108(0x24b)]?.()??null:null;}catch{}try{process['send']({[_0x563ecb]:_0x50a606,'stats':{'rss':_0x27c962[_0xa4b108(0x16e)],'heapUsed':_0x27c962[_0xa4b108(0xd4)],'heapTotal':_0x27c962['heapTotal'],'external':_0x27c962[_0xa4b108(0x239)],'cpuPct':_0x4e7215,'cpuWindowMs':Math[_0xa4b108(0x1b7)](_0x10f65b/0x3e8)||null},'processing':_0x4f2bd9});}catch{}},_0x2c7229=Math[_0x3303d3(0x213)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x416cf6=setInterval(_0x1bf3fe,_0x2c7229);_0x416cf6[_0x3303d3(0x1b8)]?.(),_0x1bf3fe();for(const _0x5a8596 of[_0x3303d3(0x1c4),_0x3303d3(0xc4)]){_0x3c68d4[_0x3303d3(0x139)]?.['on']?.(_0x5a8596,()=>{try{_0x1bf3fe();}catch{}});}}let _0x535bfb=![];const _0x4feb23=async _0x5e4563=>{const _0x275b91=_0x3303d3;if(_0x535bfb)return;_0x535bfb=!![];const _0x2c943f=setTimeout(()=>process[_0x275b91(0x25a)](_0x5e4563),_0x5d24e5);_0x2c943f[_0x275b91(0x1b8)]?.();try{await _0x3c68d4['close']?.();}catch{}process[_0x275b91(0x25a)](_0x5e4563);};process['on']('disconnect',()=>_0x4feb23(0x0));if(process[_0x3303d3(0x100)]!==_0x3303d3(0x2a0)){const _0x2ee181=setInterval(()=>{if(process['ppid']===0x1)_0x4feb23(0x0);},_0x2f0390);_0x2ee181[_0x3303d3(0x1b8)]?.(),_0x3c68d4[_0x3303d3(0x244)]=_0x2ee181;}}return okdbCluster={'runClustered':_0x1f51a0,'attachWorkerCluster':_0x36d0ab},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x1d56e9=_0x22d7b4;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x38071a=require$$0$5,{attachWorkerCluster:_0x2b4ebf}=requireOkdbCluster();async function _0x48edc9(){const _0x2814d9=_0x23ad,_0x5c12e1=process.env.OKDB_HTTP_CHILD;if(!_0x5c12e1)throw new Error(_0x2814d9(0x184));const {rootPath:_0x468d23,port:_0x59f28c,options:options={},logLevel:logLevel=_0x2814d9(0x190)}=JSON[_0x2814d9(0xe4)](_0x5c12e1);if(!_0x468d23||!_0x59f28c)throw new Error(_0x2814d9(0x255));const _0x402880=new _0x38071a(_0x468d23,{...options,'engines':![],'processors':![],'compaction':![]});_0x402880[_0x2814d9(0x2c7)][_0x2814d9(0x272)]?.();const _0xdfb2b=process.env.OKDB_CLUSTER_SLOT??'?',_0xe98e9e={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x4554ee=_0xe98e9e[logLevel]??_0xe98e9e[_0x2814d9(0x190)];_0x402880[_0x2814d9(0x2c7)][_0x2814d9(0x2ef)](_0x445dd1=>{const _0x392d26=_0x2814d9;if((_0xe98e9e[_0x445dd1[_0x392d26(0x2ac)]]??0x1)<_0x4554ee)return;try{process[_0x392d26(0x1dc)]?.({'__okdbCluster':_0x392d26(0x2c7),'slot':_0xdfb2b,'pid':process[_0x392d26(0x2de)],'entry':_0x445dd1});}catch{}}),await _0x402880[_0x2814d9(0x2ae)](),_0x2b4ebf(_0x402880),await _0x402880['http'][_0x2814d9(0x19c)](_0x59f28c);}return _0x48edc9()[_0x1d56e9(0x2cd)](_0x242a2d=>{const _0x146184=_0x1d56e9;try{process[_0x146184(0x1dc)]?.({'__okdbCluster':_0x146184(0x2c7),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x146184(0x2de)],'entry':{'level':_0x146184(0x231),'msg':_0x146184(0x166)+(_0x242a2d?.[_0x146184(0xf9)]??_0x242a2d)}});}catch{}process[_0x146184(0x25a)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x22d7b4(0xfb)]=okdbHttpWorkerChild;
@@ -1 +1 @@
1
- 'use strict';const _0x47719a=_0x3de3;(function(_0x4d9e79,_0x40ff6e){const _0x46b9c2=_0x3de3,_0x4b5a7f=_0x4d9e79();while(!![]){try{const _0x445bac=-parseInt(_0x46b9c2(0x147))/0x1+-parseInt(_0x46b9c2(0x12f))/0x2*(parseInt(_0x46b9c2(0x149))/0x3)+parseInt(_0x46b9c2(0x12b))/0x4+-parseInt(_0x46b9c2(0x14a))/0x5+parseInt(_0x46b9c2(0x16d))/0x6*(parseInt(_0x46b9c2(0x173))/0x7)+-parseInt(_0x46b9c2(0x13e))/0x8+parseInt(_0x46b9c2(0x14b))/0x9*(parseInt(_0x46b9c2(0x158))/0xa);if(_0x445bac===_0x40ff6e)break;else _0x4b5a7f['push'](_0x4b5a7f['shift']());}catch(_0x133337){_0x4b5a7f['push'](_0x4b5a7f['shift']());}}}(_0x9dcf,0x9e3c4));function _0x3de3(_0x3cd155,_0x47e212){_0x3cd155=_0x3cd155-0x126;const _0x9dcf49=_0x9dcf();let _0x3de3bf=_0x9dcf49[_0x3cd155];return _0x3de3bf;}function _0x9dcf(){const _0x817e2c=['system:proc','item:remove','dropFts','_activateViewStorage','done','9443880QhgXKl','system:ready','index:registered','bus:type_drop','index:drop','fts:reset','VIEW_PROGRESS','system:env_release','put','868837EbjBch','unique:violation','76317aBTbQZ','5934465BOAEWM','19869723bfHzYI','license:added','bus:proc','schema:set','system:drain','system:stopped','hasOwnProperty','type:drop','message','env:removed','bus:drain','registerFts','stopped','10HrFmew','license:invalid','registerType','system:poke','created','creating','env','type:registered','freeze','item:update','resetting','waiting','stopping','exit','txn:end','catch','exports','starting','started','dropping','error','6SHZrns','system:bus_state_change','open','system:type_drop','index:progress','resetFts','6795292QTnadL','dropSchema','postMessage','views','license:removed','ttl:set','txn:start','resetIndex','index:reset','clearTtl','ready','view:progress','5163764SBlOfM','worker_threads','_prepareViewDict','events','46gYtBdK','schema:drop','txn:rollback','dropType','default','__esModule','ref:violation_resolved','call','bus:poke','progress'];_0x9dcf=function(){return _0x817e2c;};return _0x9dcf();}var require$$0=require(_0x47719a(0x12c)),require$$1=require('./okdb');function getDefaultExportFromCjs(_0x2c446d){const _0x55d9b9=_0x47719a;return _0x2c446d&&_0x2c446d[_0x55d9b9(0x134)]&&Object['prototype'][_0x55d9b9(0x151)][_0x55d9b9(0x136)](_0x2c446d,'default')?_0x2c446d[_0x55d9b9(0x133)]:_0x2c446d;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x52b94d=_0x47719a;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x1805de={'PUT':_0x52b94d(0x146),'REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x52b94d(0x126),'TYPE_REGISTER':_0x52b94d(0x15a),'TYPE_DROP':_0x52b94d(0x132),'FTS_REGISTER':_0x52b94d(0x156),'FTS_DROP':_0x52b94d(0x13b),'FTS_RESET':_0x52b94d(0x172),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x52b94d(0x174),'TTL_SET':'setTtl','TTL_CLEAR':_0x52b94d(0x128)},_0x300790={'SYSTEM_READY':_0x52b94d(0x13f),'SYSTEM_STOPPED':_0x52b94d(0x150),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x52b94d(0x15b),'SYSTEM_DRAIN':_0x52b94d(0x14f),'SYSTEM_TYPE_DROP':_0x52b94d(0x170),'SYSTEM_PROC':_0x52b94d(0x139),'SYSTEM_BUS_STATE_CHANGE':_0x52b94d(0x16e),'ITEM_CREATE':'item:create','ITEM_UPDATE':_0x52b94d(0x161),'ITEM_REMOVE':_0x52b94d(0x13a),'INDEX_RESET':_0x52b94d(0x127),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x52b94d(0x171),'VIEW_PROGRESS':_0x52b94d(0x12a),'INDEX_DROP':_0x52b94d(0x142),'INDEX_REGISTERED':_0x52b94d(0x140),'FTS_REGISTERED':'fts:registered','FTS_DROP':'fts:drop','FTS_RESET':_0x52b94d(0x143),'SCHEMA_SET':_0x52b94d(0x14e),'SCHEMA_DROP':_0x52b94d(0x130),'UNIQUE_VIOLATION':_0x52b94d(0x148),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x52b94d(0x135),'SYNC_APPLY':'sync:apply','TXN_START':_0x52b94d(0x179),'TXN_END':_0x52b94d(0x166),'TXN_ROLLBACK':_0x52b94d(0x131),'TYPE_REGISTERED':_0x52b94d(0x15f),'TYPE_DROP':_0x52b94d(0x152),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x52b94d(0x154),'SYSTEM_ENV_RELEASE':_0x52b94d(0x145),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x52b94d(0x178),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x52b94d(0x159),'LICENSE_ADDED':_0x52b94d(0x14c),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x52b94d(0x177)},_0x59a5ff={'CREATING':_0x52b94d(0x15d),'RESETTING':_0x52b94d(0x162),'READY':_0x52b94d(0x129),'DROPPING':_0x52b94d(0x16b),'WAITING':_0x52b94d(0x163)},_0x5d41fc={'CREATED':_0x52b94d(0x15c),'STARTING':_0x52b94d(0x169),'STARTED':_0x52b94d(0x16a),'STOPPING':_0x52b94d(0x164),'STOPPED':_0x52b94d(0x157)},_0x25ac3e={'CREATING':_0x52b94d(0x15d),'READY':_0x52b94d(0x129),'HALTED':'halted','STOPPED':_0x52b94d(0x157),'RESETTING':'resetting'},_0x65c369=Object[_0x52b94d(0x160)]({'POKE':_0x52b94d(0x137),'DRAIN':_0x52b94d(0x155),'TYPE_DROP':_0x52b94d(0x141),'PROC':_0x52b94d(0x14d),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x65c369,'CHANGE_ACTIONS':_0x1805de,'EVENTS':_0x300790,'INDEX_STATE':_0x59a5ff,'OKDB_STATE':_0x5d41fc,'VIEW_STATE':_0x25ac3e},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x5927e0=_0x47719a;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x46c0db,workerData:_0x4dce17}=require$$0,_0x37b4f9=require$$1,{EVENTS:_0xfbf416}=requireOkdbEnums();async function _0xba2d24(){const _0x2739f4=_0x3de3,{rootPath:_0x176638,envName:_0x2c0a34,viewName:_0x59d5f2,definition:_0x1b55a4}=_0x4dce17,_0x84411=new _0x37b4f9(_0x176638,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x84411[_0x2739f4(0x16f)]();const _0x2c3bfc=_0x84411[_0x2739f4(0x15e)](_0x2c0a34);_0x2c3bfc[_0x2739f4(0x12e)]['on'](_0xfbf416[_0x2739f4(0x144)],_0x243102=>{const _0x372b0f=_0x2739f4;if(_0x243102?.['name']!==_0x59d5f2)return;try{_0x46c0db[_0x372b0f(0x175)]({'type':_0x372b0f(0x138),'event':_0x243102});}catch{}}),await _0x2c3bfc[_0x2739f4(0x176)][_0x2739f4(0x12d)](_0x1b55a4),await _0x2c3bfc[_0x2739f4(0x176)][_0x2739f4(0x13c)](_0x59d5f2,_0x1b55a4),await _0x2c3bfc[_0x2739f4(0x176)]['_runBootstrapScanPhases'](_0x59d5f2,_0x1b55a4),_0x46c0db['postMessage']({'type':_0x2739f4(0x13d)}),await _0x84411['close'](),process[_0x2739f4(0x165)](0x0);}return _0xba2d24()[_0x5927e0(0x167)](_0x11739c=>{const _0x4bb567=_0x5927e0;try{_0x46c0db['postMessage']({'type':_0x4bb567(0x16c),'error':_0x11739c[_0x4bb567(0x153)]??String(_0x11739c),'stack':_0x11739c['stack']});}catch{}process[_0x4bb567(0x165)](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x47719a(0x168)]=okdbViewsBootstrapWorker;
1
+ 'use strict';function _0x2427(_0x5ba289,_0x517568){_0x5ba289=_0x5ba289-0x77;const _0x194937=_0x1949();let _0x2427df=_0x194937[_0x5ba289];return _0x2427df;}const _0x115263=_0x2427;(function(_0x108e36,_0x4d22cf){const _0x429604=_0x2427,_0x5428ad=_0x108e36();while(!![]){try{const _0x2de57f=-parseInt(_0x429604(0x92))/0x1+-parseInt(_0x429604(0x98))/0x2*(-parseInt(_0x429604(0xba))/0x3)+-parseInt(_0x429604(0x84))/0x4*(-parseInt(_0x429604(0x82))/0x5)+parseInt(_0x429604(0xc7))/0x6+-parseInt(_0x429604(0xc8))/0x7*(-parseInt(_0x429604(0x78))/0x8)+parseInt(_0x429604(0xcd))/0x9*(-parseInt(_0x429604(0x88))/0xa)+parseInt(_0x429604(0x90))/0xb*(-parseInt(_0x429604(0xbc))/0xc);if(_0x2de57f===_0x4d22cf)break;else _0x5428ad['push'](_0x5428ad['shift']());}catch(_0x219bbc){_0x5428ad['push'](_0x5428ad['shift']());}}}(_0x1949,0x48d45));var require$$0=require(_0x115263(0x7b)),require$$1=require(_0x115263(0xa8));function getDefaultExportFromCjs(_0x1797ed){const _0x1f78d1=_0x115263;return _0x1797ed&&_0x1797ed[_0x1f78d1(0x7a)]&&Object[_0x1f78d1(0x9d)][_0x1f78d1(0x7d)][_0x1f78d1(0x81)](_0x1797ed,'default')?_0x1797ed['default']:_0x1797ed;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x12b32d=_0x115263;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4d2cde={'PUT':_0x12b32d(0xa1),'REMOVE':_0x12b32d(0xb8),'INDEX_DROP':_0x12b32d(0x77),'INDEX_REGISTER':_0x12b32d(0xa4),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x12b32d(0xb2),'TYPE_DROP':_0x12b32d(0x8f),'FTS_REGISTER':_0x12b32d(0xa6),'FTS_DROP':_0x12b32d(0x79),'FTS_RESET':'resetFts','SCHEMA_SET':_0x12b32d(0x8a),'SCHEMA_DROP':_0x12b32d(0xc2),'TTL_SET':_0x12b32d(0xae),'TTL_CLEAR':'clearTtl'},_0x4da3fe={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x12b32d(0xb4),'SYSTEM_CLOCK_CHANGE':_0x12b32d(0xbb),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x12b32d(0xa9),'SYSTEM_TYPE_DROP':_0x12b32d(0xb1),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x12b32d(0x85),'ITEM_UPDATE':_0x12b32d(0x94),'ITEM_REMOVE':_0x12b32d(0xa7),'INDEX_RESET':_0x12b32d(0x97),'INDEX_READY':_0x12b32d(0xb0),'INDEX_PROGRESS':_0x12b32d(0xad),'VIEW_PROGRESS':_0x12b32d(0xc3),'INDEX_DROP':_0x12b32d(0x80),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x12b32d(0x87),'FTS_DROP':_0x12b32d(0x8b),'FTS_RESET':_0x12b32d(0xb6),'SCHEMA_SET':_0x12b32d(0x8e),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x12b32d(0x8d),'REF_VIOLATION':_0x12b32d(0xaa),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x12b32d(0xab),'TXN_START':_0x12b32d(0x9e),'TXN_END':_0x12b32d(0xac),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x12b32d(0x91),'TYPE_DROP':_0x12b32d(0xc4),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x12b32d(0xcc),'SYSTEM_ENV_RELEASE':_0x12b32d(0xa5),'TTL_EXPIRED':_0x12b32d(0xbe),'TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x12b32d(0xb3),'LICENSE_ADDED':_0x12b32d(0x86),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x12b32d(0xc9)},_0x547878={'CREATING':'creating','RESETTING':_0x12b32d(0x9b),'READY':'ready','DROPPING':_0x12b32d(0x7f),'WAITING':_0x12b32d(0xcb)},_0x21c3ff={'CREATED':_0x12b32d(0xaf),'STARTING':_0x12b32d(0xa3),'STARTED':'started','STOPPING':'stopping','STOPPED':_0x12b32d(0x83)},_0x4252b6={'CREATING':_0x12b32d(0xca),'READY':_0x12b32d(0xb9),'HALTED':'halted','STOPPED':'stopped','RESETTING':_0x12b32d(0x9b)},_0x1aa24a=Object[_0x12b32d(0x9a)]({'POKE':'bus:poke','DRAIN':_0x12b32d(0xa2),'TYPE_DROP':_0x12b32d(0xc0),'PROC':_0x12b32d(0x89),'ENV_RELEASE':_0x12b32d(0x95)});return okdbEnums={'BUS_EVENTS':_0x1aa24a,'CHANGE_ACTIONS':_0x4d2cde,'EVENTS':_0x4da3fe,'INDEX_STATE':_0x547878,'OKDB_STATE':_0x21c3ff,'VIEW_STATE':_0x4252b6},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x1315e2=_0x115263;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x37002f,workerData:_0x22f60f}=require$$0,_0x5e207c=require$$1,{EVENTS:_0x2b0311}=requireOkdbEnums();async function _0x35d515(){const _0x133f36=_0x2427,{rootPath:_0x3ef0f2,envName:_0x4f3e03,viewName:_0x577864,definition:_0x2f0793}=_0x22f60f,_0x2812b7=new _0x5e207c(_0x3ef0f2,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x2812b7[_0x133f36(0x99)]();const _0xab4f3b=_0x2812b7[_0x133f36(0xc6)](_0x4f3e03);_0xab4f3b[_0x133f36(0xbd)]['on'](_0x2b0311[_0x133f36(0x7c)],_0x206b96=>{const _0xf1d52c=_0x133f36;if(_0x206b96?.[_0xf1d52c(0x96)]!==_0x577864)return;try{_0x37002f[_0xf1d52c(0xb7)]({'type':_0xf1d52c(0x9f),'event':_0x206b96});}catch{}}),await _0xab4f3b[_0x133f36(0xc1)]['_prepareViewDict'](_0x2f0793),await _0xab4f3b[_0x133f36(0xc1)]['_activateViewStorage'](_0x577864,_0x2f0793),await _0xab4f3b['views'][_0x133f36(0xc5)](_0x577864,_0x2f0793),_0x37002f[_0x133f36(0xb7)]({'type':_0x133f36(0x8c)}),await _0x2812b7[_0x133f36(0xb5)](),process[_0x133f36(0x7e)](0x0);}return _0x35d515()[_0x1315e2(0x93)](_0x51cc07=>{const _0x42c3bb=_0x1315e2;try{_0x37002f[_0x42c3bb(0xb7)]({'type':_0x42c3bb(0xa0),'error':_0x51cc07['message']??String(_0x51cc07),'stack':_0x51cc07[_0x42c3bb(0x9c)]});}catch{}process[_0x42c3bb(0x7e)](0x1);}),okdbViewsBootstrapWorker$1;}function _0x1949(){const _0x251e01=['ttl:expired','exports','bus:type_drop','views','dropSchema','view:progress','type:drop','_runBootstrapScanPhases','env','1116210mmcHZk','14RHUSlf','license:removed','creating','waiting','env:removed','342vRZeDX','dropIndex','1633008EPHPWP','dropFts','__esModule','worker_threads','VIEW_PROGRESS','hasOwnProperty','exit','dropping','index:drop','call','5BfAIcK','stopped','1911124jkWaym','item:create','license:added','fts:registered','79670pZwQHJ','bus:proc','setSchema','fts:drop','done','unique:violation_resolved','schema:set','dropType','77Fxxgya','type:registered','286474osDxdv','catch','item:update','bus:env_release','name','index:reset','15818cvypED','open','freeze','resetting','stack','prototype','txn:start','progress','error','put','bus:drain','starting','registerIndex','system:env_release','registerFts','item:remove','./okdb','system:drain','ref:violation','sync:apply','txn:end','index:progress','setTtl','created','index:ready','system:type_drop','registerType','license:invalid','system:stopped','close','fts:reset','postMessage','remove','ready','120NDTXId','system:clock_change','858684awmQNQ','events'];_0x1949=function(){return _0x251e01;};return _0x1949();}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x115263(0xbf)]=okdbViewsBootstrapWorker;